/* NEXORA ONE v3 — Android-native design system (Material 3 foundations, NEXORA brand)
   Primary: deep indigo #1F3A6E · Tertiary: marigold · Tonal surfaces · Roboto (system) · 4dp grid */

:root {
  /* NEXORA Signature — Evergreen Luxury (light, default) */
  --primary: #1F3D33; --primary-hover: #294F42; --primary-active: #173128; --on-primary: #FFFFFF;
  --primary-container: #DDE8E1; --on-primary-container: #12271F;
  --secondary: #547A69; --secondary-container: #E5EDE7; --on-secondary-container: #1F3D33;
  --tertiary: #8A6D2C; --tertiary-container: #F4ECD9; --on-tertiary-container: #4A3A14;
  --champagne: #C9A961; --champagne-hover: #B99A55;
  --error: #B93838; --error-container: #F8E3E1; --on-error-container: #6E1B1B;
  --success: #237A57; --success-container: #DDEFE5; --on-success-container: #0F3F2B;
  --warning: #A66A1D; --warning-container: #F6E8D4; --on-warning-container: #5A3A0E;
  --info: #376D91; --info-container: #E1ECF3; --on-info-container: #183B52;
  --surface: #F7F6F2; --surface-dim: #E9E7E0;
  --sc-lowest: #FFFFFF; --sc-low: #F9FAF8; --sc: #F0F2EE; --sc-high: #EAEDE8; --sc-highest: #E3E7E1;
  --on-surface: #1A2420; --on-surface-variant: #52615A; --muted-text: #68746E;
  --outline: #8A968F; --outline-variant: #E3E7E1;
  --inverse-surface: #1A2420; --inverse-on-surface: #F5F7F5; --inverse-primary: #9FD0B9;
  --scrim: rgba(10, 18, 15, .38);
  --shadow: 0 1px 2px rgba(26, 36, 32, .06), 0 1px 3px rgba(26, 36, 32, .05);
  --shadow-2: 0 2px 8px rgba(26, 36, 32, .07), 0 1px 2px rgba(26, 36, 32, .05);
  --shadow-3: 0 10px 30px rgba(26, 36, 32, .12), 0 2px 6px rgba(26, 36, 32, .06);

  /* legacy aliases used across screens */
  --ink: var(--on-surface); --ink-2: var(--on-surface-variant); --muted: var(--on-surface-variant); --faint: var(--muted-text);
  --line: var(--outline-variant); --paper: var(--surface); --sunk: var(--sc-high);
  --brand: #1F3D33; --brand-fg: #FFFFFF; --brand-muted: rgba(255, 255, 255, .78);
  --accent: #C9A961; --accent-soft: var(--tertiary-container); --accent-ink: var(--on-tertiary-container);
  --ok: var(--success); --warn: var(--warning); --bad: var(--error); --star: #B98D2E;

  /* shape — NEXORA Signature radius scale */
  --r-xs: 6px; --r-s: 8px; --r-input: 10px; --r-btn: 12px; --r-m: 14px; --r-l: 16px; --r-xl: 20px; --r-dialog: 18px; --r-full: 999px;
  --top-h: 64px; --nav-h: 76px;
  --ease: cubic-bezier(.2, 0, 0, 1); --ease-dec: cubic-bezier(0, 0, 0, 1); --ease-acc: cubic-bezier(.3, 0, 1, 1);
  --font: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Gujarati", "Noto Sans Devanagari", sans-serif;
  --font-head: Manrope, Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans Gujarati", "Noto Sans Devanagari", sans-serif;
  color-scheme: light;

  /* restrained category tones (no random colours): sage, champagne, mist, stone */
  --c-sage: #E5EDE7; --c-sage-on: #1F3D33; --c-gold: #F4ECD9; --c-gold-on: #6B5420; --c-mist: #E3ECF2; --c-mist-on: #2C5874; --c-stone: #ECEAE3; --c-stone-on: #4A4A3E;
  --c-grid: var(--sc-high); --c-grid-on: var(--on-surface-variant);
}
:root[data-theme="dark"] {
  --primary: #79B79B; --primary-hover: #8CC5AB; --primary-active: #66A688; --on-primary: #0B1A14;
  --primary-container: #1F4A3C; --on-primary-container: #D7EDE2;
  --secondary: #9CC1AE; --secondary-container: #22352C; --on-secondary-container: #D7EDE2;
  --tertiary: #D4B06A; --tertiary-container: #3A3018; --on-tertiary-container: #F1DFB5;
  --champagne: #D4B06A; --champagne-hover: #E0C084;
  --error: #F18484; --error-container: #4A1E1E; --on-error-container: #FADADA;
  --success: #66C59A; --success-container: #143526; --on-success-container: #C9EEDB;
  --warning: #E3B56E; --warning-container: #3E2E14; --on-warning-container: #F6E3C2;
  --info: #82B7DC; --info-container: #17303F; --on-info-container: #D4E8F5;
  --surface: #0B0F0E; --surface-dim: #0B0F0E;
  --sc-lowest: #151D19; --sc-low: #101714; --sc: #151D19; --sc-high: #1D2822; --sc-highest: #24312A;
  --on-surface: #F5F7F5; --on-surface-variant: #BEC9C1; --muted-text: #9CAAA1;
  --outline: #6F7E75; --outline-variant: #2A3830;
  --inverse-surface: #F5F7F5; --inverse-on-surface: #1A2420; --inverse-primary: #1F3D33;
  --scrim: rgba(0, 0, 0, .55);
  --shadow: 0 1px 2px rgba(0, 0, 0, .4); --shadow-2: 0 2px 8px rgba(0, 0, 0, .45); --shadow-3: 0 10px 30px rgba(0, 0, 0, .55);
  --brand: #1F4A3C; --brand-fg: #F5F7F5; --brand-muted: rgba(245, 247, 245, .72); --accent: #D4B06A; color-scheme: dark;
  --c-sage: #1D2E26; --c-sage-on: #A9D3BF; --c-gold: #2E2716; --c-gold-on: #E3C88E; --c-mist: #16252F; --c-mist-on: #A9CBE3; --c-stone: #24261F; --c-stone-on: #D2CDBB;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
  --primary: #79B79B; --primary-hover: #8CC5AB; --primary-active: #66A688; --on-primary: #0B1A14;
  --primary-container: #1F4A3C; --on-primary-container: #D7EDE2;
  --secondary: #9CC1AE; --secondary-container: #22352C; --on-secondary-container: #D7EDE2;
  --tertiary: #D4B06A; --tertiary-container: #3A3018; --on-tertiary-container: #F1DFB5;
  --champagne: #D4B06A; --champagne-hover: #E0C084;
  --error: #F18484; --error-container: #4A1E1E; --on-error-container: #FADADA;
  --success: #66C59A; --success-container: #143526; --on-success-container: #C9EEDB;
  --warning: #E3B56E; --warning-container: #3E2E14; --on-warning-container: #F6E3C2;
  --info: #82B7DC; --info-container: #17303F; --on-info-container: #D4E8F5;
  --surface: #0B0F0E; --surface-dim: #0B0F0E;
  --sc-lowest: #151D19; --sc-low: #101714; --sc: #151D19; --sc-high: #1D2822; --sc-highest: #24312A;
  --on-surface: #F5F7F5; --on-surface-variant: #BEC9C1; --muted-text: #9CAAA1;
  --outline: #6F7E75; --outline-variant: #2A3830;
  --inverse-surface: #F5F7F5; --inverse-on-surface: #1A2420; --inverse-primary: #1F3D33;
  --scrim: rgba(0, 0, 0, .55);
  --shadow: 0 1px 2px rgba(0, 0, 0, .4); --shadow-2: 0 2px 8px rgba(0, 0, 0, .45); --shadow-3: 0 10px 30px rgba(0, 0, 0, .55);
  --brand: #1F4A3C; --brand-fg: #F5F7F5; --brand-muted: rgba(245, 247, 245, .72); --accent: #D4B06A; color-scheme: dark;
  --c-sage: #1D2E26; --c-sage-on: #A9D3BF; --c-gold: #2E2716; --c-gold-on: #E3C88E; --c-mist: #16252F; --c-mist-on: #A9CBE3; --c-stone: #24261F; --c-stone-on: #D2CDBB;
  }
}

/* ---------- base ---------- */
:root { box-sizing: border-box; }
*, *::before, *::after { box-sizing: inherit; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--top-h) + env(safe-area-inset-top, 0px)); }
body {
  margin: 0; background: var(--surface); color: var(--on-surface);
  font: 400 14px/20px var(--font); letter-spacing: .25px;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: contain; /* our own pull-to-refresh */
}
img, svg { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: var(--r-s); }
.num { font-variant-numeric: tabular-nums; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
::selection { background: var(--primary-container); color: var(--on-primary-container); }

@media (min-width: 600px) {
  body { background: var(--sc-high); }
  .app { box-shadow: var(--shadow-2); }
}
.app { max-width: 480px; min-height: 100vh; margin: 0 auto; background: var(--surface); position: relative; padding-top: env(safe-area-inset-top, 0px); }

/* ---------- top app bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20; height: calc(var(--top-h) + env(safe-area-inset-top, 0px));
  padding: env(safe-area-inset-top, 0px) 4px 0 4px; margin-top: calc(-1 * env(safe-area-inset-top, 0px));
  display: flex; align-items: center; gap: 4px; background: var(--surface); transition: background .2s var(--ease);
}
.topbar.scrolled { background: var(--sc); }
.topbar h1 { font-size: 22px; line-height: 28px; font-weight: 400; letter-spacing: 0; margin: 0 0 0 12px; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar [data-back] + h1 { margin-left: 0; }
.brand { display: flex; align-items: center; gap: 10px; flex: 1; padding-left: 12px; font-size: 20px; font-weight: 500; letter-spacing: -.2px; }
.brand .mark { width: 32px; height: 32px; }
.brand b { font-weight: 700; }
.iconbtn { width: 48px; height: 48px; display: grid; place-items: center; border: 0; background: none; border-radius: var(--r-full); position: relative; cursor: pointer; color: var(--on-surface-variant); flex: none; }
.iconbtn svg { width: 24px; height: 24px; }
.avatar { width: 32px; height: 32px; border-radius: var(--r-full); background: var(--primary-container); color: var(--on-primary-container); display: grid; place-items: center; font-weight: 500; font-size: 14px; }
.dot { position: absolute; top: 8px; right: 8px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--error); color: #fff; font-size: 11px; font-weight: 500; display: grid; place-items: center; line-height: 1; }

main.view { padding: 4px 16px calc(var(--nav-h) + 32px + env(safe-area-inset-bottom, 0px)); min-height: calc(100vh - var(--top-h)); outline: 0; }
main.view.has-cta { padding-bottom: calc(var(--nav-h) + 120px + env(safe-area-inset-bottom, 0px)); }

/* ---------- navigation bar (M3) ---------- */
.tabbar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px; z-index: 30;
  display: grid; grid-template-columns: repeat(5, 1fr); background: var(--sc);
  height: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px)); padding: 12px 0 calc(16px + env(safe-area-inset-bottom, 0px));
}
.tabbar a { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12px; line-height: 16px; font-weight: 500; letter-spacing: .5px; color: var(--on-surface-variant); position: relative; }
.tabbar a .pill { width: 64px; height: 32px; border-radius: var(--r-full); display: grid; place-items: center; position: relative; transition: background .2s var(--ease); overflow: hidden; }
.tabbar a svg { width: 24px; height: 24px; }
.tabbar a.on { color: var(--on-surface); font-weight: 700; }
.tabbar a.on .pill { background: var(--secondary-container); color: var(--on-secondary-container); animation: pillIn .25s var(--ease-dec); }
.tabbar a.on svg path, .tabbar a.on svg rect, .tabbar a.on svg circle { stroke-width: 2.1; }
@keyframes pillIn { from { transform: scaleX(.4); opacity: .3; } to { transform: none; opacity: 1; } }
.tabbar .dot { top: -4px; right: 10px; }

/* ---------- type scale (M3) ---------- */
.h-xl { font-size: 28px; line-height: 36px; font-weight: 400; letter-spacing: 0; margin: 0; }
.h-l { font-size: 22px; line-height: 28px; font-weight: 400; margin: 0; }
.h-m { font-size: 16px; line-height: 24px; font-weight: 500; letter-spacing: .15px; margin: 0; }
.h-s { font-size: 14px; line-height: 20px; font-weight: 500; letter-spacing: .1px; margin: 0; }
.display { font-size: 32px; line-height: 40px; font-weight: 400; margin: 0; }
.muted { color: var(--on-surface-variant); }
.faint { color: var(--outline); }
.small { font-size: 14px; line-height: 20px; }
.tiny { font-size: 12px; line-height: 16px; letter-spacing: .4px; }
.label { font-size: 12px; line-height: 16px; font-weight: 500; letter-spacing: .5px; color: var(--on-surface-variant); }
.section { margin-top: 24px; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; gap: 12px; min-height: 40px; }
.section-head .h-m { font-size: 16px; }
.section-head a { font-size: 14px; font-weight: 500; color: var(--primary); padding: 10px 12px; margin-right: -12px; border-radius: var(--r-full); position: relative; overflow: hidden; }
.stack > * + * { margin-top: 12px; }
.stack-s > * + * { margin-top: 8px; }
.row { display: flex; align-items: center; gap: 12px; }
.row.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
hr.rule { border: 0; border-top: 1px solid var(--outline-variant); margin: 16px 0; }

/* ---------- home header ---------- */
.greet { padding: 4px 4px 16px; }
.greet .label { margin-bottom: 2px; }
.hero { margin: 0; padding: 0; background: none; color: inherit; position: relative; z-index: 3; }
.hero .h-xl { max-width: none; }
.hero p { color: var(--on-surface-variant); margin: 4px 0 16px; }
.ledger-lines, .ledger-margin, .hero-stats { display: none !important; }
.search {
  display: flex; align-items: center; gap: 4px; background: var(--sc-high); color: var(--on-surface);
  border-radius: var(--r-xl); padding: 0 4px 0 16px; height: 56px; position: relative; z-index: 1; border: 0;
  transition: background .2s var(--ease), box-shadow .2s var(--ease);
}
.search:focus-within { background: var(--sc-highest); box-shadow: var(--shadow); }
.search svg { width: 24px; height: 24px; color: var(--on-surface-variant); flex: none; }
.search input { border: 0; outline: 0; background: none; flex: 1; height: 100%; font-size: 16px; min-width: 0; padding-left: 12px; }
.search input::placeholder { color: var(--on-surface-variant); }
.search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.announce { margin: 12px 0 0; padding: 12px 16px; border-radius: var(--r-m); background: var(--tertiary-container); color: var(--on-tertiary-container); font-size: 14px; font-weight: 500; display: flex; gap: 12px; align-items: center; }
.announce svg { width: 20px; height: 20px; flex: none; }
.announce .grow { flex: 1; }
.install svg { width: 24px; height: 24px; flex: none; }
.assist { display: flex; gap: 8px; overflow-x: auto; margin: 12px -16px 0; padding: 0 16px; scrollbar-width: none; }
.assist::-webkit-scrollbar { display: none; }
.assist span { flex: none; height: 32px; padding: 0 12px 0 8px; border-radius: var(--r-s); border: 1px solid var(--outline-variant); display: inline-flex; gap: 8px; align-items: center; font-size: 14px; font-weight: 500; color: var(--on-surface-variant); }
.assist svg { width: 18px; height: 18px; color: var(--primary); }

/* ---------- category grid (super-app style) ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px 4px; padding: 16px 8px; background: var(--sc-lowest); border-radius: var(--r-xl); }
.cat { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 4px 0; border-radius: var(--r-l); position: relative; overflow: hidden; }
.cat .ic { width: 56px; height: 56px; border-radius: var(--r-l); display: grid; place-items: center; background: var(--c-grid); color: var(--c-grid-on); border: 0; transition: border-radius .25s var(--ease); }
.cat:active .ic { border-radius: var(--r-full); }
.cat .ic svg { width: 28px; height: 28px; }
.cat span { font-size: 12px; font-weight: 500; line-height: 16px; letter-spacing: .3px; color: var(--on-surface); }
.tone-pos { --c-grid: var(--c-sage); --c-grid-on: var(--c-sage-on); }
.tone-hotel { --c-grid: var(--c-gold); --c-grid-on: var(--c-gold-on); }
.tone-food { --c-grid: var(--c-stone); --c-grid-on: var(--c-stone-on); }
.tone-legal { --c-grid: var(--c-sage); --c-grid-on: var(--c-sage-on); }
.tone-web { --c-grid: var(--c-mist); --c-grid-on: var(--c-mist-on); }
.tone-ai { --c-grid: var(--c-mist); --c-grid-on: var(--c-mist-on); }
.tone-edu { --c-grid: var(--c-gold); --c-grid-on: var(--c-gold-on); }
.tone-health { --c-grid: var(--c-sage); --c-grid-on: var(--c-sage-on); }
.tone-property { --c-grid: var(--c-stone); --c-grid-on: var(--c-stone-on); }
.tone-tools { --c-grid: var(--c-gold); --c-grid-on: var(--c-gold-on); }
.tone-events { --c-grid: var(--c-stone); --c-grid-on: var(--c-stone-on); }
.tone-finance { --c-grid: var(--c-mist); --c-grid-on: var(--c-mist-on); }
.tone-invoice { --c-grid: var(--c-gold); --c-grid-on: var(--c-gold-on); }
.tone-briefcase { --c-grid: var(--c-sage); --c-grid-on: var(--c-sage-on); }
[class*="tone-"] .ic, .ic[class*="tone-"] { background: var(--c-grid); color: var(--c-grid-on); }

/* ---------- rails & tiles ---------- */
.rail { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -16px; padding: 4px 16px 8px; scrollbar-width: none; scroll-padding: 0 16px; }
.rail::-webkit-scrollbar { display: none; }
.rail > * { scroll-snap-align: start; flex: none; }
.tile { width: 196px; background: var(--sc-low); border-radius: var(--r-l); padding: 12px; display: flex; flex-direction: column; gap: 6px; position: relative; overflow: hidden; }
.tile .kind { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--on-surface-variant); font-weight: 500; margin-bottom: 4px; }
.tile .kind svg { width: 20px; height: 20px; }
.tile .kind .ic { width: 40px; height: 40px; border-radius: var(--r-m); display: grid; place-items: center; flex: none; }
.tile h3 { font-size: 16px; line-height: 22px; font-weight: 500; margin: 0; letter-spacing: .1px; }
.tile p { margin: 0; font-size: 13px; line-height: 18px; color: var(--on-surface-variant); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 36px; }
.price { font-weight: 500; font-size: 16px; font-variant-numeric: tabular-nums; color: var(--on-surface); }
.price small { font-weight: 400; color: var(--on-surface-variant); font-size: 12px; margin-left: 2px; }

/* ---------- lists ---------- */
.list { background: var(--sc-lowest); border-radius: var(--r-l); overflow: hidden; }
.item { display: flex; align-items: center; gap: 16px; padding: 12px 16px; min-height: 72px; width: 100%; background: none; border: 0; text-align: left; cursor: pointer; position: relative; overflow: hidden; }
.item + .item::before { content: ""; position: absolute; top: 0; left: 72px; right: 0; border-top: 1px solid var(--outline-variant); opacity: .6; }
.item .ic { width: 40px; height: 40px; border-radius: var(--r-full); background: var(--c-grid, var(--sc-high)); color: var(--c-grid-on, var(--on-surface-variant)); display: grid; place-items: center; flex: none; }
.item .ic svg { width: 22px; height: 22px; }
.item .chev { width: 20px; height: 20px; color: var(--on-surface-variant); flex: none; }
.item .t { font-weight: 400; font-size: 16px; line-height: 24px; letter-spacing: .15px; }
.item .s { font-size: 14px; color: var(--on-surface-variant); line-height: 20px; margin-top: 0; }

/* ---------- cards ---------- */
.card { background: var(--sc-lowest); border-radius: var(--r-l); padding: 16px; }
.card.flat { background: var(--sc-high); }
.card.ink { background: var(--primary); color: var(--on-primary); }
.card.ink .muted { color: var(--brand-muted); }
.card.ink .btn.accent, .card.ink .btn:not(.ghost):not(.tonal) { background: var(--accent); color: #271900; }
.card.ink .btn.ghost { color: var(--on-primary); border-color: rgba(255,255,255,.5); }
:root[data-theme="dark"] .card.ink { background: var(--primary-container); color: var(--on-primary-container); }
.card.outlined { background: var(--surface); border: 1px solid var(--outline-variant); }

.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.kpi { background: var(--sc-lowest); border-radius: var(--r-l); padding: 14px 16px; }
.kpi .l { font-size: 12px; color: var(--on-surface-variant); font-weight: 500; letter-spacing: .4px; }
.kpi .v { font-size: 22px; line-height: 28px; font-weight: 400; font-variant-numeric: tabular-nums; margin-top: 4px; }
.kpi.alert { background: var(--tertiary-container); color: var(--on-tertiary-container); }

/* ---------- chips & badges ---------- */
.chips { display: flex; gap: 8px; overflow-x: auto; margin: 0 -16px; padding: 0 16px 4px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; height: 32px; padding: 0 16px; border-radius: var(--r-s); border: 1px solid var(--outline-variant); background: transparent; font-size: 14px; font-weight: 500; letter-spacing: .1px; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; white-space: nowrap; color: var(--on-surface-variant); position: relative; overflow: hidden; }
.chip.on { background: var(--secondary-container); color: var(--on-secondary-container); border-color: transparent; padding-left: 8px; }
.chip.on::before { content: ""; width: 14px; height: 8px; margin: 0 2px 3px 2px; border-left: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); }
.badge { display: inline-flex; align-items: center; height: 24px; padding: 0 8px; border-radius: var(--r-s); font-size: 12px; font-weight: 500; letter-spacing: .4px; background: var(--sc-high); color: var(--on-surface-variant); white-space: nowrap; }
.badge.ok { background: var(--success-container); color: var(--on-success-container); }
.badge.warn { background: var(--warning-container); color: var(--on-warning-container); }
.badge.bad { background: var(--error-container); color: var(--on-error-container); }
.badge.info { background: var(--primary-container); color: var(--on-primary-container); }
.badge.accent { background: var(--tertiary-container); color: var(--on-tertiary-container); }

/* ---------- buttons (M3) ---------- */
.btn { white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 24px; border-radius: var(--r-full); border: 0; font-weight: 500; font-size: 14px; letter-spacing: .1px; cursor: pointer; background: var(--primary); color: var(--on-primary); position: relative; overflow: hidden; transition: box-shadow .2s var(--ease), opacity .2s; text-decoration: none; }
.btn.block { width: 100%; height: 48px; font-size: 15px; }
.btn.ghost { background: transparent; color: var(--primary); border: 1px solid var(--outline); }
.btn.accent { background: var(--primary); color: var(--on-primary); }
.btn.tonal { background: var(--secondary-container); color: var(--on-secondary-container); }
.btn.danger { background: transparent; color: var(--error); border: 1px solid var(--outline); }
.btn.small { height: 36px; padding: 0 16px; font-size: 14px; }
.btn svg { width: 18px; height: 18px; margin-left: -6px; }
.btn[disabled], .btn.busy { opacity: .38; pointer-events: none; }
.btn.busy::after { content: ""; position: absolute; right: 14px; width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.linkbtn { background: none; border: 0; padding: 0; font-weight: 500; color: var(--primary); cursor: pointer; text-decoration: none; }
.fab { position: fixed; right: max(16px, calc(50% - 240px + 16px)); bottom: calc(var(--nav-h) + 16px + env(safe-area-inset-bottom, 0px)); height: 56px; padding: 0 20px 0 16px; border-radius: var(--r-l); background: var(--primary-container); color: var(--on-primary-container); border: 0; display: inline-flex; align-items: center; gap: 12px; font-weight: 500; font-size: 14px; box-shadow: var(--shadow-3); z-index: 24; overflow: hidden; }
.fab svg { width: 24px; height: 24px; }

.cta-bar {
  position: fixed; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px; z-index: 25;
  bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px)); background: var(--sc-low);
  padding: 12px 16px; display: flex; align-items: center; gap: 16px; border-radius: var(--r-xl) var(--r-xl) 0 0; box-shadow: 0 -1px 3px rgba(0, 0, 0, .08);
}
.cta-bar .btn { height: 48px; padding: 0 28px; font-size: 15px; }

/* ---------- text fields (M3 outlined) ---------- */
.field { display: block; margin-top: 16px; position: relative; }
.field > span:first-child { display: block; font-size: 12px; line-height: 16px; font-weight: 500; letter-spacing: .4px; margin: 0 0 6px 4px; color: var(--on-surface-variant); }
.input, .field input, .field select, .field textarea {
  width: 100%; min-height: 56px; padding: 16px; border-radius: var(--r-xs); border: 1px solid var(--outline);
  background: transparent; font-size: 16px; line-height: 24px; outline: 0; transition: border-color .15s, box-shadow .15s; color: var(--on-surface);
}
.field select { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--on-surface-variant) 50%), linear-gradient(135deg, var(--on-surface-variant) 50%, transparent 50%); background-position: calc(100% - 22px) 26px, calc(100% - 17px) 26px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 40px; }
.field textarea { min-height: 112px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, .input:focus { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }
.field:focus-within > span:first-child { color: var(--primary); }
.field .err { display: block; color: var(--error); font-size: 12px; margin: 4px 0 0 16px; }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: var(--error); box-shadow: inset 0 0 0 1px var(--error); }
.field.invalid > span:first-child { color: var(--error); }
.field .hint { display: block; color: var(--on-surface-variant); font-size: 12px; margin: 4px 0 0 16px; }
.check { display: flex; gap: 16px; align-items: flex-start; margin-top: 16px; font-size: 14px; line-height: 20px; }
.check input { width: 18px; height: 18px; margin: 1px 0 0 3px; accent-color: var(--primary); flex: none; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }

/* ---------- plans ---------- */
.plans { display: grid; gap: 12px; }
.plan { position: relative; display: block; border: 1px solid var(--outline-variant); border-radius: var(--r-l); padding: 16px 16px 16px 56px; background: var(--sc-lowest); cursor: pointer; overflow: hidden; transition: background .2s var(--ease), border-color .2s; }
.plan input { position: absolute; left: 18px; top: 18px; width: 20px; height: 20px; accent-color: var(--primary); margin: 0; }
.plan.on { border-color: var(--primary); background: color-mix(in srgb, var(--primary-container) 45%, var(--sc-lowest)); box-shadow: inset 0 0 0 1px var(--primary); }
.plan .save { position: absolute; bottom: 14px; right: 16px; top: auto; }
.plan .save + .row { padding-right: 0; }
.plan ul { margin: 8px 0 0; padding: 0; list-style: none; font-size: 14px; color: var(--on-surface-variant); }
.plan li { padding-left: 24px; position: relative; margin-top: 4px; }
.plan li::before, .ticks li::before { content: ""; position: absolute; left: 4px; top: 6px; width: 10px; height: 6px; border-left: 2px solid var(--success); border-bottom: 2px solid var(--success); transform: rotate(-45deg); }
.ticks { margin: 0; padding: 4px 16px; list-style: none; background: var(--sc-lowest); border-radius: var(--r-l); }
.ticks li { padding: 12px 0 12px 28px; position: relative; font-size: 15px; }
.ticks li + li { border-top: 1px solid var(--outline-variant); }
.ticks li::before { top: 18px; }
.trial { font-size: 12px; color: var(--success); font-weight: 500; }

/* ---------- receipt (signature element: perforated bill) ---------- */
.receipt { background: var(--sc-lowest); border-radius: var(--r-l) var(--r-l) 0 0; padding: 16px 16px 20px; position: relative; margin-bottom: 10px; }
.receipt::after { content: ""; position: absolute; left: 0; right: 0; bottom: -8px; height: 8px;
  background: radial-gradient(circle at 8px 0, transparent 6px, var(--sc-lowest) 6.5px) 0 0 / 16px 8px repeat-x; }
.receipt .ln { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; font-variant-numeric: tabular-nums; font-size: 14px; }
.receipt .ln.total { border-top: 1px dashed var(--outline); margin-top: 8px; padding-top: 12px; font-weight: 500; font-size: 18px; }
.receipt .ln.minus { color: var(--success); }

.cline { display: flex; gap: 16px; padding: 16px 0; }
.cline + .cline { border-top: 1px solid var(--outline-variant); }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--outline); border-radius: var(--r-full); height: 32px; overflow: hidden; }
.qty button { width: 36px; height: 32px; border: 0; background: none; font-size: 18px; cursor: pointer; color: var(--primary); position: relative; overflow: hidden; }
.qty span { min-width: 20px; text-align: center; font-weight: 500; }

/* ---------- timeline ---------- */
.timeline { list-style: none; margin: 0; padding: 16px; position: relative; background: var(--sc-lowest); border-radius: var(--r-l); }
.timeline li { position: relative; padding: 0 0 20px 32px; }
.timeline li::before { content: ""; position: absolute; left: 9px; top: 20px; bottom: -2px; width: 2px; background: var(--outline-variant); }
.timeline li:last-child { padding-bottom: 0; }
.timeline li:last-child::before { display: none; }
.timeline li::after { content: ""; position: absolute; left: 3px; top: 3px; width: 14px; height: 14px; border-radius: 50%; background: var(--sc-lowest); border: 2px solid var(--outline); }
.timeline li:last-child::after { background: var(--primary); border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-container); }

/* ---------- tabs / segmented ---------- */
.tabs { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; border-bottom: 1px solid var(--outline-variant); margin: 0 -16px; background: var(--surface); position: sticky; top: calc(var(--top-h)); z-index: 10; }
.tabs button { height: 48px; border: 0; background: none; font-weight: 500; font-size: 14px; letter-spacing: .1px; color: var(--on-surface-variant); cursor: pointer; position: relative; overflow: hidden; }
.tabs button.on { color: var(--primary); }
.tabs button.on::after { content: ""; position: absolute; left: 20%; right: 20%; bottom: 0; height: 3px; border-radius: 3px 3px 0 0; background: var(--primary); }
.seg { display: inline-flex; border: 1px solid var(--outline); border-radius: var(--r-full); overflow: hidden; }
.seg button { border: 0; background: none; height: 36px; padding: 0 14px; font-size: 13px; font-weight: 500; color: var(--on-surface); cursor: pointer; position: relative; overflow: hidden; }
.seg button + button { border-left: 1px solid var(--outline); }
.seg button.on { background: var(--secondary-container); color: var(--on-secondary-container); }

/* ---------- messages ---------- */
.msg { max-width: 84%; padding: 10px 14px; border-radius: 20px 20px 20px 6px; background: var(--sc-high); font-size: 15px; line-height: 21px; }
.msg.me { margin-left: auto; background: var(--primary); color: var(--on-primary); border-radius: 20px 20px 6px 20px; }
.msg.staff { background: var(--tertiary-container); color: var(--on-tertiary-container); }
.msg .meta { font-size: 11px; opacity: .75; margin-top: 4px; }

/* ---------- feedback ---------- */
.empty { text-align: center; padding: 48px 24px; }
.empty > svg { width: 64px; height: 64px; margin: 0 auto 16px; color: var(--on-surface-variant); padding: 16px; box-sizing: content-box; background: var(--sc-high); border-radius: var(--r-xl); }
.empty p { color: var(--on-surface-variant); margin: 8px auto 20px; max-width: 32ch; }
.sk { background: var(--sc-high); border-radius: var(--r-l); position: relative; overflow: hidden; }
.sk::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--sc-lowest) 60%, transparent), transparent); animation: shimmer 1.3s infinite; }
@keyframes shimmer { to { transform: translateX(100%); } }

/* snackbar */
.toast { position: fixed; left: 50%; transform: translate(-50%, 16px); bottom: calc(var(--nav-h) + 12px + env(safe-area-inset-bottom, 0px)); z-index: 60;
  background: var(--inverse-surface); color: var(--inverse-on-surface); min-height: 48px; padding: 6px 8px 6px 16px; border-radius: var(--r-xs);
  font-size: 14px; width: calc(100% - 24px); max-width: 456px; opacity: 0; transition: opacity .15s, transform .2s var(--ease-dec); pointer-events: none;
  display: flex; align-items: center; gap: 8px; box-shadow: var(--shadow-3); }
.toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.toast .txt { flex: 1; padding: 8px 0; }
.toast button { background: none; border: 0; color: var(--inverse-primary); font-weight: 500; height: 36px; padding: 0 12px; border-radius: var(--r-full); cursor: pointer; }
.toast.bad { background: var(--inverse-surface); }
.toast.bad .txt::before { content: "!"; display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--error); color: #fff; font-weight: 700; font-size: 12px; margin-right: 10px; vertical-align: 1px; }

/* bottom sheet (M3) */
.scrim { position: fixed; inset: 0; background: var(--scrim); z-index: 70; opacity: 0; transition: opacity .25s var(--ease); }
.scrim.show { opacity: 1; }
.sheet { position: fixed; left: 50%; bottom: 0; transform: translate(-50%, 100%); width: 100%; max-width: 480px; max-height: 90vh; overflow-y: auto; z-index: 71;
  background: var(--sc-low); border-radius: var(--r-xl) var(--r-xl) 0 0; padding: 0 24px calc(24px + env(safe-area-inset-bottom, 0px)); transition: transform .3s var(--ease-dec); overscroll-behavior: contain; }
.sheet.show { transform: translate(-50%, 0); }
.sheet.dragging { transition: none; }
.sheet .grip { width: 32px; height: 4px; border-radius: 2px; background: var(--on-surface-variant); opacity: .4; margin: 0 auto; position: relative; }
.sheet .grip::before { content: ""; position: absolute; inset: -18px -60px; } /* larger drag target */
.sheet > .grip { margin-top: 22px; margin-bottom: 20px; }
.qr { background: #fff; padding: 12px; border-radius: var(--r-l); width: 184px; margin: 0 auto; }
.qr img, .qr canvas { width: 160px !important; height: 160px !important; }

/* charts */
.bars { display: flex; align-items: flex-end; gap: 4px; height: 128px; padding-top: 8px; }
.bars div { flex: 1; background: var(--primary-container); border-radius: 6px 6px 2px 2px; min-height: 3px; }
.bars div.today { background: var(--primary); }
.bars-x { display: flex; justify-content: space-between; font-size: 11px; color: var(--on-surface-variant); margin-top: 6px; }
.dl { display: grid; grid-template-columns: auto 1fr; gap: 10px 16px; font-size: 14px; }
.dl dt { color: var(--on-surface-variant); }
.dl dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; word-break: break-word; }
.mono { font-family: "Roboto Mono", ui-monospace, Menlo, monospace; font-size: 13px; }
.lang-switch { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }

/* ---------- v2 components (restyled) ---------- */
.stars { display: inline-flex; gap: 1px; color: var(--star); vertical-align: -2px; }
.stars svg { width: 14px; height: 14px; }
.stars.lg svg { width: 22px; height: 22px; }
.rating-line { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--on-surface-variant); font-weight: 500; }
.rating-pick { display: flex; gap: 8px; justify-content: center; }
.rating-pick button { width: 48px; height: 48px; border: 0; border-radius: var(--r-full); background: none; color: var(--outline); cursor: pointer; display: grid; place-items: center; transition: transform .15s var(--ease); }
.rating-pick button.on { color: var(--star); }
.rating-pick button.on svg path { fill: currentColor; }
.rating-pick button:active { transform: scale(1.2); }
.rating-pick svg { width: 32px; height: 32px; }
.dist { display: grid; grid-template-columns: 12px 1fr 28px; gap: 6px 8px; align-items: center; font-size: 12px; color: var(--on-surface-variant); }
.dist .track { height: 8px; border-radius: 4px; background: var(--sc-high); overflow: hidden; }
.dist .track i { display: block; height: 100%; background: var(--primary); border-radius: 4px; }
.review { padding: 16px 0; }
.review + .review { border-top: 1px solid var(--outline-variant); }
.tick { display: inline-block; width: 14px; height: 14px; vertical-align: -3px; color: var(--success); }

.banners { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 16px -16px 0; padding: 0 16px; scrollbar-width: none; scroll-padding: 0 16px; }
.banners::-webkit-scrollbar { display: none; }
.banner { flex: 0 0 84%; scroll-snap-align: start; border-radius: var(--r-xl); padding: 20px; min-height: 148px; display: flex; flex-direction: column; justify-content: space-between; gap: 12px; position: relative; overflow: hidden; border: 0; }
.banner.brand { background: var(--primary); color: var(--on-primary); }
.banner.brand p { color: var(--brand-muted); }
.banner.accent { background: var(--tertiary-container); color: var(--on-tertiary-container); }
.banner.paper { background: var(--primary-container); color: var(--on-primary-container); }
.banner h3 { margin: 0; font-size: 22px; line-height: 28px; font-weight: 400; }
.banner p { margin: 6px 0 0; font-size: 14px; line-height: 20px; opacity: .9; max-width: 30ch; }
.banner .go { align-self: flex-start; font-weight: 500; font-size: 14px; height: 36px; padding: 0 16px; border-radius: var(--r-full); display: inline-flex; align-items: center; background: color-mix(in srgb, currentColor 14%, transparent); text-decoration: none; }
.banner::after { content: ""; position: absolute; right: -36px; top: -36px; width: 140px; height: 140px; border-radius: 42% 58% 61% 39% / 45% 39% 61% 55%; background: currentColor; opacity: .07; }
.dots { display: flex; justify-content: center; gap: 6px; margin-top: 12px; }
.dots i { width: 6px; height: 6px; border-radius: 3px; background: var(--outline-variant); transition: width .25s var(--ease), background .25s; }
.dots i.on { width: 20px; background: var(--primary); }

.dash { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.dash a { background: var(--sc-lowest); border-radius: var(--r-l); padding: 14px 12px; display: flex; flex-direction: column; gap: 2px; min-height: 88px; position: relative; overflow: hidden; }
.dash a b { font-size: 22px; line-height: 28px; font-weight: 400; font-variant-numeric: tabular-nums; }
.dash a span { font-size: 12px; color: var(--on-surface-variant); line-height: 16px; }
.dash a.hot { background: var(--tertiary-container); color: var(--on-tertiary-container); }
.dash a.hot span { color: inherit; opacity: .85; }

.suggest { position: absolute; left: 0; right: 0; top: 0; padding-top: 56px; background: var(--sc-highest); border-radius: var(--r-xl); box-shadow: var(--shadow-2); z-index: 0; overflow: hidden; color: var(--on-surface); }
.search-wrap:has(.suggest) .search { background: var(--sc-highest); border-radius: var(--r-xl) var(--r-xl) 0 0; box-shadow: none; }
.suggest a { display: flex; align-items: center; gap: 16px; padding: 12px 16px; font-size: 15px; position: relative; overflow: hidden; }
.suggest a:first-child { border-top: 1px solid var(--outline-variant); }
.suggest a.hl { background: color-mix(in srgb, var(--on-surface) 8%, transparent); }
.suggest svg { width: 24px; height: 24px; color: var(--on-surface-variant); flex: none; }
.suggest small { display: block; color: var(--on-surface-variant); font-size: 12px; }
.search-wrap { position: relative; z-index: 6; }
.search-wrap .search { z-index: 1; }

.heart { width: 48px; height: 48px; border-radius: var(--r-full); border: 0; background: var(--sc-high); display: grid; place-items: center; cursor: pointer; color: var(--on-surface-variant); flex: none; position: relative; overflow: hidden; transition: transform .15s var(--ease); }
.heart svg { width: 24px; height: 24px; }
.heart.on { color: #D93025; background: var(--error-container); }
.heart.on svg path { fill: currentColor; }
.heart.pop { animation: pop .35s var(--ease-dec); }
@keyframes pop { 40% { transform: scale(1.25); } }

.faq details + details { border-top: 1px solid var(--outline-variant); }
.faq summary { list-style: none; padding: 16px 40px 16px 0; font-weight: 500; font-size: 15px; cursor: pointer; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 8px; top: 22px; width: 8px; height: 8px; border-right: 2px solid var(--on-surface-variant); border-bottom: 2px solid var(--on-surface-variant); transform: rotate(45deg); transition: transform .2s var(--ease); }
.faq details[open] summary::after { transform: rotate(-135deg); top: 26px; }
.faq details p { margin: 0 0 16px; color: var(--on-surface-variant); font-size: 14px; }

.files { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.file { aspect-ratio: 1; border-radius: var(--r-m); background: var(--sc-high); overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; font-size: 11px; color: var(--on-surface-variant); text-align: center; padding: 8px; position: relative; }
.file img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.file svg { width: 28px; height: 28px; }
.file.add { border: 1.5px dashed var(--outline); color: var(--primary); font-weight: 500; cursor: pointer; background: transparent; }
.file.busy { opacity: .5; pointer-events: none; }
.file .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }

.hbars { display: grid; gap: 12px; }
.hbars .r { display: grid; grid-template-columns: 1fr auto; gap: 4px 8px; font-size: 14px; }
.hbars .t { grid-column: 1 / -1; height: 8px; background: var(--sc-high); border-radius: 4px; overflow: hidden; }
.hbars .t i { display: block; height: 100%; background: var(--primary); border-radius: 4px; }
.strength { height: 4px; border-radius: 2px; background: var(--sc-high); margin: 8px 4px 0; overflow: hidden; }
.strength i { display: block; height: 100%; width: 0; transition: width .2s, background .2s; }

/* ---------- v3: app header for service page (Play-Store style) ---------- */
.app-head { display: flex; gap: 16px; align-items: flex-start; padding-top: 8px; }
.app-head .ic { width: 72px; height: 72px; border-radius: 20px; display: grid; place-items: center; flex: none; background: var(--c-grid); color: var(--c-grid-on); }
.app-head .ic svg { width: 38px; height: 38px; }
.app-head h1 { font-size: 22px; line-height: 28px; font-weight: 400; margin: 0; }
.app-head .by { color: var(--primary); font-size: 14px; font-weight: 500; margin-top: 2px; display: inline-block; }
.stats { display: flex; margin: 20px -16px 0; padding: 0 16px; overflow-x: auto; scrollbar-width: none; }
.stats::-webkit-scrollbar { display: none; }
.stats > div { flex: none; min-width: 96px; padding: 0 16px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.stats > div + div { border-left: 1px solid var(--outline-variant); }
.stats b { font-size: 14px; font-weight: 500; display: inline-flex; align-items: center; gap: 2px; }
.stats b svg { width: 14px; height: 14px; }
.stats span { font-size: 12px; color: var(--on-surface-variant); white-space: nowrap; }
.head-actions { display: flex; gap: 8px; margin-top: 20px; }
.head-actions .btn { flex: 1; height: 40px; }

/* install card */
.install { display: flex; align-items: center; gap: 16px; padding: 16px; border-radius: var(--r-l); background: var(--primary-container); color: var(--on-primary-container); }
.install img { width: 48px; height: 48px; border-radius: 12px; }

/* ---------- motion: ripple, transitions, pull-to-refresh, splash ---------- */
.ripple { position: absolute; border-radius: 50%; pointer-events: none; background: currentColor; opacity: .12; transform: scale(0); animation: ripple .45s var(--ease-dec) forwards; }
@keyframes ripple { to { transform: scale(1); opacity: 0; } }
.btn, .item, .chip, .cat, .tile, .iconbtn, .tabbar a .pill, .plan, .dash a, .banner, .tabs button, .seg button, .suggest a, .heart, .qty button, .section-head a, .fab, .file.add { -webkit-user-select: none; user-select: none; }
.iconbtn, .tile, .banner { overflow: hidden; }

.view.v-fwd { animation: vFwd .3s var(--ease-dec) both; }
.view.v-back { animation: vBack .3s var(--ease-dec) both; }
.view.v-fade { animation: vFade .25s var(--ease-dec) both; }
@keyframes vFwd { from { opacity: 0; transform: translateX(32px); } }
@keyframes vBack { from { opacity: 0; transform: translateX(-32px); } }
@keyframes vFade { from { opacity: 0; transform: scale(.985); } }

.ptr { position: fixed; left: 50%; top: calc(var(--top-h) + env(safe-area-inset-top, 0px)); z-index: 19; width: 40px; height: 40px; margin-left: -20px; border-radius: 50%; background: var(--sc-lowest); box-shadow: var(--shadow-2); display: grid; place-items: center; transform: translateY(-56px); opacity: 0; pointer-events: none; }
.ptr svg { width: 24px; height: 24px; color: var(--primary); }
.ptr.spin svg { animation: spin .8s linear infinite; }

#splash { position: fixed; inset: 0; z-index: 100; background: var(--surface); display: grid; place-items: center; transition: opacity .3s var(--ease); }
#splash svg { width: 96px; height: 96px; animation: splashIn .5s var(--ease-dec) both; }
#splash.out { opacity: 0; pointer-events: none; }
@keyframes splashIn { from { transform: scale(.8); opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* =================== v4 components =================== */
/* cover-image cards */
.tile.has-cover { padding: 0; width: 248px; background: var(--sc-lowest); }
.tile .cover { aspect-ratio: 16 / 9; width: 100%; object-fit: cover; display: block; background: var(--sc-high); }
.tile.has-cover .body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; }
.tile.has-cover .kind { margin-bottom: 0; }
.tile.has-cover .kind .ic { width: 28px; height: 28px; border-radius: var(--r-s); }
.tile.has-cover .kind svg { width: 16px; height: 16px; }
.item .thumb { width: 72px; height: 54px; border-radius: var(--r-m); object-fit: cover; flex: none; background: var(--sc-high); }
.feature { display: block; border-radius: var(--r-xl); overflow: hidden; background: var(--sc-lowest); position: relative; }
.feature img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.feature .body { padding: 16px; }
.feature .tag { position: absolute; top: 12px; left: 12px; }

/* screenshot gallery (Play Store style) */
.gallery { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 20px -16px 0; padding: 0 16px; scrollbar-width: none; scroll-padding: 0 16px; }
.gallery::-webkit-scrollbar { display: none; }
.gallery img { flex: 0 0 86%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--r-l); scroll-snap-align: start; background: var(--sc-high); cursor: zoom-in; }
.gallery img:only-child { flex-basis: 100%; }
.lightbox { position: fixed; inset: 0; z-index: 90; background: rgba(0, 0, 0, .92); display: flex; align-items: center; overflow-x: auto; scroll-snap-type: x mandatory; animation: vFade .2s var(--ease-dec); }
.lightbox img { flex: 0 0 100%; max-height: 100%; object-fit: contain; scroll-snap-align: center; }
.lightbox button { position: fixed; top: calc(12px + env(safe-area-inset-top, 0px)); right: 12px; width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .14); color: #fff; display: grid; place-items: center; }
.lightbox button svg { width: 24px; height: 24px; }

/* date + slot picker */
.days { display: flex; gap: 8px; overflow-x: auto; margin: 0 -24px; padding: 4px 24px 8px; scrollbar-width: none; }
.days::-webkit-scrollbar { display: none; }
.day { flex: none; width: 60px; height: 76px; border-radius: var(--r-l); border: 1px solid var(--outline-variant); background: transparent; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; cursor: pointer; position: relative; overflow: hidden; }
.day small { font-size: 12px; color: var(--on-surface-variant); }
.day b { font-size: 22px; line-height: 26px; font-weight: 400; }
.day.on { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
.day.on small { color: inherit; opacity: .8; }
.day.full { opacity: .4; }
.slots { display: grid; grid-template-columns: 1fr; gap: 8px; }
.slot { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: var(--r-l); border: 1px solid var(--outline-variant); background: transparent; cursor: pointer; text-align: left; position: relative; overflow: hidden; min-height: 60px; }
.slot .grow b { display: block; font-weight: 500; font-size: 15px; }
.slot .grow span { font-size: 13px; color: var(--on-surface-variant); }
.slot .left { font-size: 12px; font-weight: 500; color: var(--success); }
.slot .left.low { color: var(--warning); }
.slot.on { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); background: color-mix(in srgb, var(--primary-container) 45%, transparent); }
.slot[disabled] { opacity: .45; cursor: not-allowed; }
.slot[disabled] .left { color: var(--on-surface-variant); }

/* progress stepper */
.stepper { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; margin: 20px 0 4px; }
.stepper .s { display: flex; flex-direction: column; align-items: center; gap: 6px; position: relative; font-size: 11px; text-align: center; color: var(--on-surface-variant); line-height: 14px; }
.stepper .s::before { content: ""; position: absolute; top: 11px; left: -50%; right: 50%; height: 2px; background: var(--outline-variant); }
.stepper .s:first-child::before { display: none; }
.stepper .s i { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--outline-variant); background: var(--surface); position: relative; z-index: 1; display: grid; place-items: center; font-style: normal; }
.stepper .s.done::before, .stepper .s.now::before { background: var(--primary); }
.stepper .s.done i { background: var(--primary); border-color: var(--primary); }
.stepper .s.done i::after { content: ""; width: 9px; height: 5px; border-left: 2px solid var(--on-primary); border-bottom: 2px solid var(--on-primary); transform: rotate(-45deg) translate(1px, -1px); }
.stepper .s.now { color: var(--on-surface); font-weight: 500; }
.stepper .s.now i { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-container); }
.stepper .s.now i::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--primary); }
.stepper.cancelled .s.now i { border-color: var(--error); box-shadow: 0 0 0 4px var(--error-container); }
.stepper.cancelled .s.now i::after { background: var(--error); }

/* chat */
.chat { display: flex; flex-direction: column; gap: 6px; padding: 12px; background: var(--sc-lowest); border-radius: var(--r-l); max-height: 420px; overflow-y: auto; overscroll-behavior: contain; }
.chat .bub { max-width: 82%; padding: 8px 12px; border-radius: 18px 18px 18px 4px; background: var(--sc-high); font-size: 15px; line-height: 21px; white-space: pre-wrap; word-wrap: break-word; }
.chat .bub.mine { align-self: flex-end; background: var(--primary); color: var(--on-primary); border-radius: 18px 18px 4px 18px; }
.chat .bub.support { background: var(--tertiary-container); color: var(--on-tertiary-container); }
.chat .who { font-size: 11px; font-weight: 500; opacity: .75; margin-bottom: 2px; }
.chat .at { font-size: 10px; opacity: .65; margin-top: 2px; text-align: right; }
.chat .day-sep { align-self: center; font-size: 11px; color: var(--on-surface-variant); background: var(--sc-high); padding: 2px 10px; border-radius: var(--r-full); margin: 6px 0; }
.composer { display: flex; gap: 8px; align-items: flex-end; margin-top: 8px; }
.composer textarea { flex: 1; min-height: 48px; max-height: 140px; padding: 12px 16px; border-radius: 24px; border: 0; background: var(--sc-high); font-size: 15px; resize: none; outline: 0; color: var(--on-surface); }
.composer textarea:focus { background: var(--sc-highest); }
.composer button { width: 48px; height: 48px; border-radius: 50%; border: 0; background: var(--primary); color: var(--on-primary); display: grid; place-items: center; flex: none; cursor: pointer; position: relative; overflow: hidden; }
.composer button svg { width: 22px; height: 22px; }

/* offer tickets */
.offer { display: flex; background: var(--sc-lowest); border-radius: var(--r-l); overflow: hidden; position: relative; }
.offer .amt { flex: none; width: 96px; background: var(--tertiary-container); color: var(--on-tertiary-container); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 16px 8px; position: relative; }
.offer .amt b { font-size: 26px; line-height: 30px; font-weight: 500; }
.offer .amt span { font-size: 11px; font-weight: 500; letter-spacing: .6px; }
.offer .amt::after { content: ""; position: absolute; right: -6px; top: 0; bottom: 0; width: 12px; background: radial-gradient(circle at 6px 8px, var(--surface) 4px, transparent 4.5px) 0 0 / 12px 16px repeat-y; }
.offer .body { flex: 1; padding: 14px 16px; min-width: 0; }
.offer .code { display: inline-flex; align-items: center; gap: 6px; border: 1px dashed var(--outline); border-radius: var(--r-s); padding: 4px 10px; font-family: "Roboto Mono", ui-monospace, monospace; font-size: 13px; font-weight: 500; letter-spacing: 1px; margin-top: 8px; }
.offer-hint { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: var(--r-l); background: var(--success-container); color: var(--on-success-container); margin-top: 12px; font-weight: 500; font-size: 14px; }
.offer-hint svg { width: 20px; height: 20px; flex: none; }

/* onboarding */
.onboard { position: fixed; inset: 0; z-index: 95; background: var(--surface); display: flex; flex-direction: column; padding: calc(16px + env(safe-area-inset-top, 0px)) 0 calc(24px + env(safe-area-inset-bottom, 0px)); max-width: 480px; margin: 0 auto; animation: vFade .3s var(--ease-dec); }
.onboard .skip { align-self: flex-end; margin-right: 8px; }
.onboard .slides { flex: 1; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.onboard .slides::-webkit-scrollbar { display: none; }
.onboard .slide { flex: 0 0 100%; scroll-snap-align: center; padding: 8px 28px; display: flex; flex-direction: column; justify-content: center; gap: 20px; }
.onboard .art { border-radius: var(--r-xl); overflow: hidden; box-shadow: var(--shadow-2); aspect-ratio: 16 / 10; background: var(--sc-high); }
.onboard .art img { width: 100%; height: 100%; object-fit: cover; }
.onboard h2 { font-size: 28px; line-height: 36px; font-weight: 400; margin: 0; }
.onboard p { margin: 0; color: var(--on-surface-variant); font-size: 16px; line-height: 24px; }
.onboard .foot { display: flex; align-items: center; justify-content: space-between; padding: 0 24px; }

/* admin media manager */
.media-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.media-grid .m { position: relative; border-radius: var(--r-m); overflow: hidden; aspect-ratio: 16 / 9; background: var(--sc-high); }
.media-grid .m img { width: 100%; height: 100%; object-fit: cover; }
.media-grid .m .acts { position: absolute; right: 6px; bottom: 6px; display: flex; gap: 6px; }
.media-grid .m .acts button { height: 30px; padding: 0 10px; border-radius: var(--r-full); border: 0; background: rgba(0, 0, 0, .6); color: #fff; font-size: 12px; font-weight: 500; cursor: pointer; }
.media-grid .m .first { position: absolute; left: 6px; top: 6px; }
.media-grid label.m { display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 6px; border: 1.5px dashed var(--outline); background: transparent; color: var(--primary); font-weight: 500; cursor: pointer; }
.media-grid label.m svg { width: 26px; height: 26px; }

/* =================== v5 Demo Center =================== */
.kit { display: flex; gap: 6px; flex-wrap: wrap; }
.kit span { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 8px; border-radius: var(--r-s); font-size: 11px; font-weight: 500; letter-spacing: .3px; background: var(--sc-high); color: var(--outline); }
.kit span.on { background: var(--primary-container); color: var(--on-primary-container); }
.kit svg { width: 14px; height: 14px; }
.demo-card { display: block; background: var(--sc-lowest); border-radius: var(--r-xl); overflow: hidden; position: relative; }
.demo-card img.cover { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; background: var(--sc-high); }
.demo-card .body { padding: 14px 16px 16px; }
.demo-card .live { position: absolute; top: 12px; left: 12px; background: var(--error); color: #fff; height: 24px; padding: 0 10px 0 8px; border-radius: var(--r-full); font-size: 11px; font-weight: 700; letter-spacing: .8px; display: inline-flex; align-items: center; gap: 6px; }
.demo-card .live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #fff; animation: blink 1.4s infinite; }
@keyframes blink { 50% { opacity: .3; } }
.try-demo { display: flex; gap: 16px; align-items: center; padding: 16px; border-radius: var(--r-xl); background: linear-gradient(135deg, var(--primary) 0%, color-mix(in srgb, var(--primary) 70%, #6E3CBC) 100%); color: var(--on-primary); margin-top: 20px; position: relative; overflow: hidden; }
.try-demo > svg { width: 24px; height: 24px; flex: none; }
.try-demo > .grow { flex: 1; min-width: 0; }
.try-demo .ic { width: 48px; height: 48px; border-radius: 14px; background: rgba(255, 255, 255, .16); display: grid; place-items: center; flex: none; }
.try-demo .ic svg { width: 26px; height: 26px; }
.try-demo .kit span { background: rgba(255, 255, 255, .14); color: rgba(255, 255, 255, .55); }
.try-demo .kit span.on { background: rgba(255, 255, 255, .24); color: #fff; }
:root[data-theme="dark"] .try-demo { color: #fff; background: linear-gradient(135deg, #1D4185, #4B2C86); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .try-demo { color: #fff; background: linear-gradient(135deg, #1D4185, #4B2C86); } }

.demo-hero { margin: 0 -16px; padding: 8px 16px 0; }
.launch { display: grid; gap: 12px; }
.launch .l { background: var(--sc-lowest); border-radius: var(--r-xl); padding: 16px; }
.launch .l .row:first-child .ic { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--primary-container); color: var(--on-primary-container); flex: none; }
.launch .l .ic svg { width: 26px; height: 26px; }
.launch .l.admin .row:first-child .ic { background: var(--tertiary-container); color: var(--on-tertiary-container); }
.launch .l .acts { display: flex; gap: 8px; margin-top: 14px; }
.launch .l .acts .btn { flex: 1; }
.launch .l.off { opacity: .6; }
.cred { margin-top: 12px; border-radius: var(--r-m); background: var(--sc-high); padding: 4px 4px 4px 14px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 0 12px; font-size: 14px; }
.cred dt { color: var(--on-surface-variant); font-size: 12px; }
.cred dd { margin: 0; font-family: "Roboto Mono", ui-monospace, monospace; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cred button { width: 40px; height: 40px; border: 0; background: none; border-radius: 50%; color: var(--primary); display: grid; place-items: center; cursor: pointer; position: relative; overflow: hidden; }
.cred button svg { width: 18px; height: 18px; }

/* device preview */
.device-overlay { position: fixed; inset: 0; z-index: 92; background: #0B0D12; display: flex; flex-direction: column; animation: vFade .2s var(--ease-dec); }
.device-overlay .bar { display: flex; align-items: center; gap: 4px; padding: calc(8px + env(safe-area-inset-top, 0px)) 8px 8px; color: #E1E2E9; }
.device-overlay .bar .iconbtn { color: #E1E2E9; }
.device-overlay .bar .t { flex: 1; min-width: 0; font-size: 14px; }
.device-overlay .bar .t small { display: block; color: #8E9099; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.device-overlay .stage { flex: 1; display: grid; place-items: center; overflow: auto; padding: 8px; }
.device-overlay iframe { border: 0; background: #fff; display: block; }
.device-overlay .phone { width: min(390px, 100%); height: min(780px, 100%); border-radius: 36px; overflow: hidden; border: 10px solid #22252B; box-shadow: 0 30px 80px rgba(0, 0, 0, .6); }
.device-overlay .phone iframe { width: 100%; height: 100%; }
.device-overlay .desk { width: 100%; height: 100%; border-radius: 12px; overflow: hidden; }
.device-overlay .desk iframe { width: 1280px; height: 800px; transform-origin: 0 0; }
.device-overlay .seg { border-color: #44474F; }
.seg button svg { width: 20px; height: 20px; display: block; }
.device-overlay .seg button { color: #C4C6D0; }
.device-overlay .seg button + button { border-color: #44474F; }
.device-overlay .seg button.on { background: #3E4759; color: #fff; }
.device-overlay .note { color: #8E9099; font-size: 12px; text-align: center; padding: 0 16px calc(12px + env(safe-area-inset-bottom, 0px)); }

/* view-only slide viewer */
.deck { position: relative; background: #0B0D12; border-radius: var(--r-l); overflow: hidden; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-action: pan-y; }
.deck canvas { width: 100%; aspect-ratio: 16 / 9; display: block; }
.deck .nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .45); color: #fff; display: grid; place-items: center; cursor: pointer; }
.deck .nav svg { width: 22px; height: 22px; }
.deck .nav.prev { left: 8px; } .deck .nav.next { right: 8px; }
.deck .count { position: absolute; right: 10px; bottom: 10px; background: rgba(0, 0, 0, .55); color: #fff; font-size: 12px; padding: 3px 10px; border-radius: var(--r-full); }
.deck .fs { position: absolute; left: 8px; bottom: 6px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .45); color: #fff; display: grid; place-items: center; cursor: pointer; }
.deck .fs svg { width: 20px; height: 20px; }
.deck .spin { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; }
.deck:fullscreen { border-radius: 0; display: flex; align-items: center; background: #000; }
.deck:fullscreen canvas { max-height: 100vh; object-fit: contain; }
.thumbs { display: flex; gap: 8px; overflow-x: auto; margin: 10px -16px 0; padding: 0 16px; scrollbar-width: none; }
.thumbs::-webkit-scrollbar { display: none; }
.thumbs button { flex: none; width: 88px; aspect-ratio: 16 / 9; border-radius: var(--r-s); border: 2px solid transparent; background: var(--sc-high); padding: 0; overflow: hidden; cursor: pointer; font-size: 12px; color: var(--on-surface-variant); }
.thumbs button.on { border-color: var(--primary); }
.thumbs canvas { width: 100%; height: 100%; display: block; }
.viewonly { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--on-surface-variant); margin-top: 10px; }
.viewonly svg { width: 16px; height: 16px; flex: none; }

/* videos */
.vcard { background: var(--sc-lowest); border-radius: var(--r-l); overflow: hidden; }
.vcard .frame { position: relative; aspect-ratio: 16 / 9; background: #0B0D12; display: grid; place-items: center; cursor: pointer; overflow: hidden; }
.vcard .frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.vcard .frame .play { position: relative; width: 64px; height: 64px; border-radius: 50%; background: rgba(0, 0, 0, .6); display: grid; place-items: center; color: #fff; transition: transform .15s var(--ease); }
.vcard .frame:active .play { transform: scale(.92); }
.vcard .frame .play svg { width: 30px; height: 30px; margin-left: 4px; }
.vcard iframe, .vcard video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }
.vcard .body { padding: 12px 16px; }
.posters { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.posters img { width: 100%; border-radius: var(--r-m); background: var(--sc-high); cursor: zoom-in; display: block; }
.shots { display: grid; gap: 8px; }
.shots img { width: 100%; border-radius: var(--r-m); background: var(--sc-high); cursor: zoom-in; display: block; aspect-ratio: 16 / 9; object-fit: cover; }

/* admin v5 */
.cat-group { margin-top: 16px; }
.cat-group > summary { list-style: none; display: flex; align-items: center; gap: 12px; padding: 10px 4px; cursor: pointer; position: sticky; top: var(--top-h); background: var(--surface); z-index: 5; }
.cat-group > summary::-webkit-details-marker { display: none; }
.cat-group > summary .ic { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.cat-group > summary .ic svg { width: 18px; height: 18px; }
.cat-group > summary::after { content: ""; width: 8px; height: 8px; border-right: 2px solid var(--on-surface-variant); border-bottom: 2px solid var(--on-surface-variant); transform: rotate(45deg); margin-right: 8px; transition: transform .2s var(--ease); }
.cat-group:not([open]) > summary::after { transform: rotate(-45deg); }
.srow { display: flex; align-items: center; gap: 12px; padding: 10px 12px; min-height: 68px; position: relative; overflow: hidden; cursor: pointer; }
.srow + .srow { border-top: 1px solid var(--outline-variant); }
.srow .thumb { width: 64px; height: 40px; border-radius: 8px; object-fit: cover; flex: none; background: var(--sc-high); }
.srow > svg { width: 20px; height: 20px; flex: none; color: var(--on-surface-variant); }
.srow .thumb svg { width: 22px; height: 22px; }
.srow .sel { width: 22px; height: 22px; accent-color: var(--primary); flex: none; display: none; }
.selecting .srow .sel { display: block; }
.srow.picked { background: color-mix(in srgb, var(--primary-container) 50%, transparent); }
.srow .meta { font-size: 12px; color: var(--on-surface-variant); display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 2px; }
.srow .meta .badge { height: 20px; font-size: 11px; padding: 0 6px; }
.bulkbar { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--nav-h) + 12px + env(safe-area-inset-bottom, 0px)); z-index: 26; width: calc(100% - 24px); max-width: 456px; display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 16px; border-radius: var(--r-l); background: var(--inverse-surface); color: var(--inverse-on-surface); box-shadow: var(--shadow-3); }
.bulkbar .btn { height: 40px; }
.meter { height: 8px; border-radius: 4px; background: var(--sc-high); overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--success); border-radius: 4px; transition: width .3s var(--ease); }
.asset-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.asset-grid.slides { grid-template-columns: repeat(2, 1fr); }
.asset-grid .a { position: relative; border-radius: var(--r-m); overflow: hidden; background: var(--sc-high); aspect-ratio: 16 / 9; }
.asset-grid.posters-g .a { aspect-ratio: 4 / 5; }
.asset-grid .a img, .asset-grid .a video { width: 100%; height: 100%; object-fit: cover; display: block; }
.asset-grid .a .n { position: absolute; left: 6px; top: 6px; background: rgba(0, 0, 0, .6); color: #fff; font-size: 11px; border-radius: 8px; padding: 1px 7px; }
.asset-grid .a .acts { position: absolute; right: 4px; bottom: 4px; display: flex; gap: 4px; }
.asset-grid .a .acts button { width: 30px; height: 30px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .62); color: #fff; display: grid; place-items: center; cursor: pointer; padding: 0; }
.asset-grid .a .acts svg { width: 16px; height: 16px; }
.asset-grid .a .cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 8px 6px; font-size: 11px; color: #fff; background: linear-gradient(transparent, rgba(0, 0, 0, .7)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-right: 72px; }
.drop { border: 1.5px dashed var(--outline); border-radius: var(--r-l); padding: 16px; display: flex; align-items: center; gap: 14px; color: var(--primary); cursor: pointer; position: relative; overflow: hidden; }
.drop svg { width: 28px; height: 28px; flex: none; }
.drop b { display: block; font-weight: 500; }
.drop span { font-size: 12px; color: var(--on-surface-variant); }
.drop.drag { background: var(--primary-container); }
.progress { height: 4px; border-radius: 2px; background: var(--sc-high); overflow: hidden; margin-top: 8px; }
.progress i { display: block; height: 100%; width: 0; background: var(--primary); transition: width .2s; }
.table-mini { width: 100%; border-collapse: collapse; font-size: 13px; }
.table-mini th { text-align: left; font-weight: 500; color: var(--on-surface-variant); padding: 8px 6px; border-bottom: 1px solid var(--outline-variant); font-size: 12px; }
.table-mini td { padding: 10px 6px; border-bottom: 1px solid var(--outline-variant); font-variant-numeric: tabular-nums; }
.table-mini td:not(:first-child), .table-mini th:not(:first-child) { text-align: right; }

/* =================== v6 cases =================== */
.case-steps { overflow-x: auto; grid-auto-columns: minmax(72px, 1fr); scrollbar-width: none; padding-bottom: 4px; }
.case-steps::-webkit-scrollbar { display: none; }
.docrow { padding: 14px 16px; }
.docrow + .docrow { border-top: 1px solid var(--outline-variant); }
.docrow .t { font-size: 15px; font-weight: 500; }
.docrow .s { font-size: 13px; color: var(--on-surface-variant); margin-top: 2px; }
.docrow label.btn { flex: none; }
.docstate { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--sc-high); color: var(--on-surface-variant); }
.docstate svg { width: 18px; height: 18px; }
.docstate.ok { background: var(--success-container); color: var(--on-success-container); }
.docstate.bad { background: var(--error-container); color: var(--on-error-container); }
.docstate.info { background: var(--primary-container); color: var(--on-primary-container); }
.docfiles { margin: 10px 0 0 44px; display: grid; gap: 6px; }
.docfile { display: flex; align-items: center; gap: 8px; background: var(--sc-low); border-radius: var(--r-m); padding: 4px 4px 4px 10px; min-height: 44px; }
.docfile a { display: flex; align-items: center; gap: 8px; font-size: 14px; min-width: 0; color: var(--primary); }
.docfile a svg { width: 18px; height: 18px; flex: none; }
.docfile .badge { height: 22px; font-size: 11px; flex: none; }
.docfile .iconbtn { width: 36px; height: 36px; }
.docfile .iconbtn svg { width: 18px; height: 18px; }
.docfile [data-approve] { color: var(--success); }
.docfile [data-reject] { color: var(--error); }
.docnote { display: flex; gap: 6px; align-items: flex-start; font-size: 12px; color: var(--error); padding: 0 6px; }
.docnote svg { width: 14px; height: 14px; flex: none; margin-top: 2px; }
.offer-card { margin-top: 16px; padding: 16px; border-radius: var(--r-xl); background: var(--tertiary-container); color: var(--on-tertiary-container); }
.stagepick { display: flex; flex-wrap: wrap; gap: 8px; }
.announce > svg { width: 20px; height: 20px; flex: none; }
.card.row > svg, a.card > svg { width: 24px; height: 24px; flex: none; }
.pro-head { display: flex; align-items: center; gap: 14px; padding: 4px 4px 0; }
.pro-head .avatar { width: 52px; height: 52px; font-size: 20px; }
.switch { position: relative; width: 52px; height: 32px; flex: none; }
.switch input { opacity: 0; width: 100%; height: 100%; position: absolute; margin: 0; cursor: pointer; z-index: 1; }
.switch i { position: absolute; inset: 0; border-radius: 16px; background: var(--sc-highest); border: 2px solid var(--outline); transition: background .2s; }
.switch i::after { content: ""; position: absolute; left: 6px; top: 6px; width: 16px; height: 16px; border-radius: 50%; background: var(--outline); transition: all .2s var(--ease); }
.switch input:checked + i { background: var(--primary); border-color: var(--primary); }
.switch input:checked + i::after { left: 24px; top: 2px; width: 24px; height: 24px; background: var(--on-primary); }
.lead { background: var(--sc-lowest); border-radius: var(--r-l); padding: 14px 16px; }
.lead + .lead { margin-top: 8px; }
.lead .row .badge { flex: none; }

/* =====================================================================
   NEXORA SIGNATURE — EVERGREEN LUXURY · component layer (v7)
   Spacing 8pt · radius: controls 8 · inputs 10 · buttons 12 · cards 16 · banners 20 · dialogs 18
   ===================================================================== */
body { font-family: var(--font); font-size: 15px; line-height: 22px; letter-spacing: 0; }
.h-xl, .h-l, .h-m, .display, .topbar h1, .brand, .banner h3, .tile h3, .app-head h1, .side-brand, .hx { font-family: var(--font-head); letter-spacing: -.2px; }
.h-xl { font-size: 30px; line-height: 38px; font-weight: 700; letter-spacing: -.6px; }
.h-l { font-size: 22px; line-height: 30px; font-weight: 700; letter-spacing: -.3px; }
.h-m { font-size: 17px; line-height: 24px; font-weight: 700; }
.h-s { font-size: 15px; line-height: 22px; font-weight: 600; }
.label { font-size: 13px; letter-spacing: .2px; font-weight: 500; }
.topbar h1 { font-size: 20px; font-weight: 700; }
.brand { font-size: 19px; font-weight: 600; letter-spacing: -.2px; }
.brand b { font-weight: 800; }
.muted, .small.muted { color: var(--on-surface-variant); }

/* surfaces: white cards + hairline borders, very subtle shadow */
.card, .list, .kpi, .dash a, .tile, .tile.has-cover, .receipt, .ticks, .timeline, .chat, .vcard, .demo-card, .lead, .cat-grid, .launch .l, .offer {
  background: var(--sc-lowest); border: 1px solid var(--outline-variant); border-radius: var(--r-l); box-shadow: var(--shadow);
}
.card.flat { background: var(--sc); border-color: transparent; box-shadow: none; }
.card.ink { background: var(--brand); color: var(--brand-fg); border-color: transparent; }
.receipt { border-radius: var(--r-l) var(--r-l) 0 0; }
.item + .item::before { border-color: var(--outline-variant); opacity: 1; }

/* buttons */
.btn { height: 44px; padding: 0 20px; border-radius: var(--r-btn); font-weight: 600; font-size: 15px; letter-spacing: 0; transition: background .18s var(--ease), box-shadow .18s var(--ease), opacity .2s; }
.btn:hover { background: var(--primary-hover); }
.btn:active { background: var(--primary-active); }
.btn.block { height: 50px; font-size: 16px; }
.btn.small { height: 38px; padding: 0 14px; font-size: 14px; border-radius: 10px; }
.btn.ghost, .btn.danger { background: var(--sc-lowest); border: 1px solid color-mix(in srgb, var(--primary) 28%, var(--outline-variant)); color: var(--primary); }
.btn.ghost:hover { background: var(--sc); }
.btn.danger { color: var(--error); border-color: color-mix(in srgb, var(--error) 35%, var(--outline-variant)); }
.btn.tonal { background: var(--secondary-container); color: var(--on-secondary-container); }
.btn.tonal:hover { background: color-mix(in srgb, var(--secondary-container) 80%, var(--primary)); }
.btn.accent { background: var(--primary); color: var(--on-primary); }
.btn.gold { background: var(--champagne); color: #1A2420; }
.btn.gold:hover { background: var(--champagne-hover); }
.cta-bar .btn { height: 50px; border-radius: var(--r-btn); }
.linkbtn { font-weight: 600; }

/* inputs */
.input, .field input, .field select, .field textarea { border-radius: var(--r-input); border: 1px solid color-mix(in srgb, var(--outline) 45%, var(--outline-variant)); background: var(--sc-lowest); min-height: 50px; padding: 13px 14px; }
.field > span:first-child { font-size: 13px; font-weight: 600; color: var(--on-surface); margin-left: 2px; }
.field input:focus, .field select:focus, .field textarea:focus, .input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 16%, transparent); }
.search { background: var(--sc-lowest); border: 1px solid var(--outline-variant); border-radius: 14px; height: 52px; box-shadow: var(--shadow); padding-left: 14px; }
.search:focus-within { background: var(--sc-lowest); border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 14%, transparent); }
.search input { font-size: 15px; padding-left: 10px; }
.suggest { background: var(--sc-lowest); border: 1px solid var(--outline-variant); border-radius: 14px; padding-top: 52px; }
.search-wrap:has(.suggest) .search { background: var(--sc-lowest); border-radius: 14px 14px 0 0; }

/* chips, badges, tabs */
.chip { border-radius: 10px; height: 36px; border-color: var(--outline-variant); background: var(--sc-lowest); color: var(--on-surface); font-weight: 500; }
.chip.on { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
.chip.on::before { border-color: var(--on-primary); }
.badge { border-radius: 6px; font-weight: 600; letter-spacing: .2px; }
.tabs button.on { color: var(--primary); }
.tabs button.on::after { background: var(--primary); height: 2px; }

/* navigation */
.topbar { background: var(--surface); }
.topbar.scrolled { background: var(--sc-lowest); box-shadow: 0 1px 0 var(--outline-variant); }
.tabbar { background: var(--sc-lowest); border-top: 1px solid var(--outline-variant); padding-top: 10px; }
.tabbar a { color: var(--muted-text); font-weight: 500; letter-spacing: .1px; }
.tabbar a.on { color: var(--primary); font-weight: 700; }
.tabbar a .pill { width: 56px; height: 30px; }
.tabbar a.on .pill { background: var(--primary-container); color: var(--primary); }
.tabbar .dot, .dot { background: var(--champagne); color: #1A2420; font-weight: 700; }
.avatar { background: var(--primary); color: var(--on-primary); font-weight: 700; font-family: var(--font-head); }

/* dialogs, snackbar */
.sheet { border-radius: var(--r-dialog) var(--r-dialog) 0 0; background: var(--sc-lowest); }
.toast { border-radius: 12px; background: var(--inverse-surface); color: var(--inverse-on-surface); }
.toast button { color: var(--champagne); }

/* categories, tiles, banners */
.cat-grid { padding: 18px 8px 14px; gap: 18px 2px; border-radius: var(--r-l); }
.cat .ic { width: 54px; height: 54px; border-radius: 14px; }
.cat .ic svg { width: 26px; height: 26px; stroke-width: 1.6; }
.cat span { font-size: 12px; font-weight: 600; color: var(--on-surface); }
.tile { border-radius: var(--r-l); }
.tile h3 { font-weight: 700; font-size: 15px; }
.banner { border-radius: var(--r-xl); min-height: 156px; box-shadow: none; }
.banner.brand { background: var(--brand); color: #F7F6F2; }
.banner.brand::before { content: ""; position: absolute; left: 20px; top: 0; width: 48px; height: 3px; background: var(--champagne); border-radius: 0 0 3px 3px; }
.banner.accent { background: var(--tertiary-container); color: var(--on-tertiary-container); }
.banner.paper { background: var(--sc-lowest); color: var(--on-surface); border: 1px solid var(--outline-variant); }
.banner h3 { font-weight: 700; font-size: 21px; line-height: 27px; letter-spacing: -.3px; }
.banner .go { border-radius: 10px; font-weight: 600; }
.banner.brand .go { background: var(--champagne); color: #1A2420; }
.banner::after { opacity: .05; }
.dots i.on { background: var(--primary); }
.try-demo, :root[data-theme="dark"] .try-demo { background: var(--brand); color: #F7F6F2; border-radius: var(--r-l); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .try-demo { background: var(--brand); color: #F7F6F2; } }
.try-demo .ic { background: rgba(201, 169, 97, .18); color: var(--champagne); }
.offer-hint { border-radius: var(--r-l); }
.announce { border-radius: 12px; }
.stars { color: var(--star); }
.plan.on { background: color-mix(in srgb, var(--primary-container) 40%, var(--sc-lowest)); }
.empty > svg { background: var(--sc); border-radius: 20px; color: var(--primary); }
.meter i, .hbars .t i, .dist .track i { background: var(--primary); }
.bars div { background: color-mix(in srgb, var(--primary) 22%, var(--sc-lowest)); }
.bars div.today { background: var(--champagne); }

/* ------------------------- v7 home ------------------------- */
.home-hello { padding: 8px 2px 18px; }
.home-hello .eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--secondary); letter-spacing: .3px; }
.home-hello .eyebrow::before { content: ""; width: 18px; height: 2px; border-radius: 2px; background: var(--champagne); }
.home-hello h1 { margin: 6px 0 0; }
.home-hello p { margin: 6px 0 0; color: var(--on-surface-variant); font-size: 15px; line-height: 22px; max-width: 34ch; }
.sec-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.sec-title h2 { font-family: var(--font-head); font-size: 18px; line-height: 24px; font-weight: 700; margin: 0; letter-spacing: -.2px; }
.sec-title p { margin: 2px 0 0; font-size: 13px; color: var(--on-surface-variant); }
.sec-title a { font-size: 14px; font-weight: 600; color: var(--primary); white-space: nowrap; }
.hsec { margin-top: 28px; }
.case-card { display: block; padding: 14px 16px; background: var(--sc-lowest); border: 1px solid var(--outline-variant); border-radius: var(--r-l); box-shadow: var(--shadow); }
.case-card + .case-card { margin-top: 8px; }
.case-card .row { gap: 10px; }
.case-card .prog { height: 6px; border-radius: 3px; background: var(--sc-high); overflow: hidden; margin-top: 10px; }
.case-card .prog i { display: block; height: 100%; background: var(--primary); border-radius: 3px; }
.case-card .meta { display: flex; justify-content: space-between; font-size: 12px; color: var(--on-surface-variant); margin-top: 6px; }
.quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 8px; }
.quick a { background: var(--sc-lowest); border: 1px solid var(--outline-variant); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 2px; min-height: 74px; position: relative; overflow: hidden; }
.quick a b { font-family: var(--font-head); font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
.quick a span { font-size: 12px; color: var(--on-surface-variant); line-height: 16px; }
.quick a.hot { border-color: color-mix(in srgb, var(--champagne) 60%, var(--outline-variant)); background: var(--tertiary-container); }
.steps3 { display: grid; gap: 0; background: var(--sc-lowest); border: 1px solid var(--outline-variant); border-radius: var(--r-l); overflow: hidden; }
.steps3 > div { display: flex; gap: 14px; padding: 14px 16px; align-items: flex-start; }
.steps3 > div + div { border-top: 1px solid var(--outline-variant); }
.steps3 .n { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--primary); color: var(--on-primary); font-family: var(--font-head); font-weight: 700; font-size: 14px; }
.steps3 b { display: block; font-size: 15px; font-weight: 600; }
.steps3 span { font-size: 13px; color: var(--on-surface-variant); line-height: 19px; }
.prof-row { display: flex; gap: 10px; overflow-x: auto; margin: 0 -16px; padding: 2px 16px 6px; scrollbar-width: none; scroll-snap-type: x proximity; }
.prof-row::-webkit-scrollbar { display: none; }
.prof { flex: none; width: 132px; scroll-snap-align: start; background: var(--sc-lowest); border: 1px solid var(--outline-variant); border-radius: var(--r-l); padding: 14px 12px; display: flex; flex-direction: column; gap: 8px; position: relative; overflow: hidden; box-shadow: var(--shadow); }
.prof .ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--c-grid); color: var(--c-grid-on); }
.prof .ic svg { width: 22px; height: 22px; stroke-width: 1.6; }
.prof b { font-size: 14px; font-weight: 600; line-height: 18px; }
.prof span { font-size: 12px; color: var(--on-surface-variant); }
.pro-card { width: 236px; flex: none; scroll-snap-align: start; background: var(--sc-lowest); border: 1px solid var(--outline-variant); border-radius: var(--r-l); padding: 14px; display: flex; flex-direction: column; gap: 6px; position: relative; overflow: hidden; box-shadow: var(--shadow); }
.pro-card .who { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--secondary); }
.pro-card .who svg { width: 15px; height: 15px; }
.pro-card h3 { font-family: var(--font-head); font-size: 15px; line-height: 21px; font-weight: 700; margin: 0; }
.pro-card p { margin: 0; font-size: 13px; line-height: 18px; color: var(--on-surface-variant); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 36px; }
.pro-card .foot { display: flex; align-items: center; justify-content: space-between; margin-top: 4px; }
.pro-card .foot .pill2 { font-size: 11px; font-weight: 600; color: var(--on-secondary-container); background: var(--secondary-container); padding: 3px 8px; border-radius: 6px; }
.help { display: flex; gap: 14px; align-items: center; padding: 16px; background: var(--sc-lowest); border: 1px solid var(--outline-variant); border-radius: var(--r-l); }
.help .ic { width: 44px; height: 44px; border-radius: 12px; background: var(--secondary-container); color: var(--primary); display: grid; place-items: center; flex: none; }
.help .ic svg, .help > svg { width: 22px; height: 22px; flex: none; }
.ref-card { display: flex; gap: 14px; align-items: center; padding: 16px; border-radius: var(--r-l); background: var(--tertiary-container); color: var(--on-tertiary-container); border: 1px solid color-mix(in srgb, var(--champagne) 45%, transparent); }
.ref-card .ic { width: 44px; height: 44px; border-radius: 12px; background: var(--champagne); color: #1A2420; display: grid; place-items: center; flex: none; }
.ref-card .ic svg, .ref-card > svg { width: 22px; height: 22px; flex: none; }
.home-foot { text-align: center; margin: 32px 0 8px; font-size: 12px; color: var(--muted-text); }
.home-foot b { font-family: var(--font-head); color: var(--on-surface-variant); font-weight: 700; letter-spacing: .4px; }
.trust-row { display: flex; flex-wrap: wrap; gap: 8px 16px; justify-content: center; margin-top: 24px; font-size: 12px; color: var(--on-surface-variant); }
.trust-row span { display: inline-flex; align-items: center; gap: 6px; }
.trust-row svg { width: 15px; height: 15px; color: var(--secondary); }
.assist span { border-radius: 8px; background: var(--sc-lowest); }

/* ---- v8 colourful category tones (brand mockup); one hue → soft tile, auto-adjusted for dark mode ---- */
.tone-gov { --tone: #1F6B4A; }
.tone-pos { --tone: #2457C5; }
.tone-web { --tone: #1E5A84; }
.tone-briefcase { --tone: #C26A12; }
.tone-legal { --tone: #5B4632; }
.tone-gavel { --tone: #3A2A1A; }
.tone-finance { --tone: #5B3FB6; }
.tone-chart { --tone: #5B3FB6; }
.tone-edu { --tone: #1E4E6B; }
.tone-health { --tone: #D23B4B; }
.tone-pulse { --tone: #D23B4B; }
.tone-travel { --tone: #D88A12; }
.tone-house { --tone: #2E8B3E; }
.tone-property { --tone: #2E8B3E; }
.tone-cart2 { --tone: #D63A3A; }
.tone-bag { --tone: #D63A3A; }
.tone-hotel { --tone: #B5651D; }
.tone-food { --tone: #C2410C; }
.tone-ai { --tone: #6D28D9; }
.tone-tools { --tone: #C26A12; }
.tone-events { --tone: #9D2F7A; }
.tone-invoice { --tone: #C26A12; }
.tone-mobile { --tone: #1F7A4A; }
.tone-send { --tone: #2563EB; }
.tone-bolt { --tone: #1F7A4A; }
.tone-drop { --tone: #2563EB; }
.tone-flame { --tone: #DC2626; }
.tone-tv { --tone: #6D28D9; }
.tone-grid { --tone: #1F3D33; }
.tone-explore { --tone: #52615A; }
.tone-monitor { --tone: #2457C5; }
.tone-calendar { --tone: #1F6B4A; }
[class*="tone-"] { --c-grid: color-mix(in srgb, var(--tone, #52615A) 11%, #fff); --c-grid-on: var(--tone, #52615A); }
:root[data-theme="dark"] [class*="tone-"] { --c-grid: color-mix(in srgb, var(--tone, #9CAAA1) 22%, #151D19); --c-grid-on: color-mix(in srgb, var(--tone, #9CAAA1) 55%, #fff); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) [class*="tone-"] { --c-grid: color-mix(in srgb, var(--tone, #9CAAA1) 22%, #151D19); --c-grid-on: color-mix(in srgb, var(--tone, #9CAAA1) 55%, #fff); } }

/* =================== v8 home (brand mockup) =================== */
/* header */
.topbar.home { height: calc(76px + env(safe-area-inset-top, 0px)); padding-left: 16px; gap: 2px; }
.wordmark { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.wordmark img { width: 36px; height: 36px; border-radius: 10px; object-fit: contain; }
.wordmark b { display: block; font-family: var(--font-head); font-weight: 800; font-size: 27px; line-height: 28px; letter-spacing: 3.5px; color: var(--primary); }
:root[data-theme="dark"] .wordmark b { color: #F5F7F5; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .wordmark b { color: #F5F7F5; } }
.wordmark .x { color: var(--champagne); }
.wordmark small { display: block; font-size: 8.5px; font-weight: 600; letter-spacing: 2.2px; text-transform: uppercase; color: var(--on-surface-variant); margin-top: 3px; white-space: nowrap; }
.loc { display: inline-flex; align-items: center; gap: 3px; height: 36px; padding: 0 6px; border: 0; background: none; color: var(--on-surface); font-weight: 600; font-size: 14px; max-width: 108px; cursor: pointer; border-radius: 10px; }
.loc svg { width: 17px; height: 17px; flex: none; }
.loc svg:last-child { width: 14px; height: 14px; }
.topbar.home .iconbtn { width: 44px; height: 44px; }
.topbar.home a[href="#/notifications"] { background: var(--sc-lowest); border-radius: 50%; box-shadow: var(--shadow); margin: 0 4px; }
.avatar.lg { width: 40px; height: 40px; font-size: 15px; box-shadow: 0 0 0 2px var(--sc-lowest), 0 0 0 3px var(--outline-variant); }
.avatar.ghost { background: var(--sc-high); color: var(--on-surface-variant); }
.avatar.ghost svg { width: 22px; height: 22px; }
.topbar .dot { background: var(--error); color: #fff; }

/* bottom navigation with centre scan */
.tabbar.six { grid-template-columns: 1fr 1fr 1fr 76px 1.5fr 1.5fr; padding: 8px 8px calc(10px + env(safe-area-inset-bottom, 0px)); height: calc(78px + env(safe-area-inset-bottom, 0px)); overflow: visible; }
.tabbar.six a { justify-content: center; gap: 2px; border-radius: 16px; margin: 0 2px; }
.tabbar.six a .pill { width: auto; height: 28px; background: none !important; animation: none; }
.tabbar.six a.on { background: var(--primary); color: var(--on-primary); }
.tabbar.six a.on .pill { color: var(--on-primary); }
.tabbar.six .scanbtn { background: none !important; position: relative; }
.fabscan { position: absolute; top: -26px; left: 50%; transform: translateX(-50%); width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 35% 30%, #E0C88F, #C9A961 55%, #A88A45); color: #1A2420; box-shadow: 0 8px 20px rgba(169, 136, 64, .45), 0 0 0 5px var(--sc-lowest); }
.fabscan svg { width: 28px; height: 28px; stroke-width: 2; }
.tabbar.six .scanbtn:active .fabscan { transform: translateX(-50%) scale(.94); }

/* search */
.home-search { height: 56px; border-radius: 16px; padding-right: 4px; margin-top: 2px; }
.home-search .iconbtn { color: var(--on-surface-variant); }

/* hero carousel */
.hero-wrap { margin-top: 16px; }
.hero-strip { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; border-radius: var(--r-xl); }
.hero-strip::-webkit-scrollbar { display: none; }
.hero-slide { flex: 0 0 100%; scroll-snap-align: start; position: relative; min-height: 226px; border-radius: var(--r-xl); overflow: hidden; display: flex; align-items: stretch;
  background: linear-gradient(120deg, #153027 0%, #1F3D33 55%, #2D5747 100%); color: #F7F6F2; }
.hero-slide.tone-accent { background: linear-gradient(120deg, #EBDDB8, #F4ECD9); color: #3A2D10; }
.hero-slide.tone-paper { background: var(--sc-lowest); color: var(--on-surface); border: 1px solid var(--outline-variant); }
.hero-slide img { position: absolute; right: 0; top: 0; height: 100%; width: 70%; object-fit: cover; object-position: 70% center; }
.hero-slide.has-img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, #12291f 0%, rgba(18, 41, 31, .94) 42%, rgba(18, 41, 31, .35) 72%, rgba(18, 41, 31, .05) 100%); }
.hero-slide.has-img.tone-accent::after { background: linear-gradient(90deg, #F4ECD9 0%, rgba(244, 236, 217, .92) 45%, rgba(244, 236, 217, 0) 85%); }
.hero-txt { position: relative; z-index: 1; padding: 20px 18px 18px; display: flex; flex-direction: column; justify-content: center; max-width: 76%; gap: 8px; }
.hero-txt .eb { font-size: 10.5px; font-weight: 700; letter-spacing: 2.6px; text-transform: uppercase; color: var(--champagne); }
.hero-slide.tone-accent .eb, .hero-slide.tone-paper .eb { color: #8A6D2C; }
.hero-txt h2 { font-family: var(--font-head); font-size: 24px; line-height: 29px; font-weight: 700; letter-spacing: -.4px; margin: 0; }
.hero-txt p { margin: 0; font-size: 13px; line-height: 18px; opacity: .88; }
.hero-txt .pts { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 11.5px; opacity: .92; }
.hero-txt .pts span { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.hero-txt .pts svg { width: 15px; height: 15px; }
.hero-txt .cta { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 18px; margin-top: 6px; border-radius: 22px; font-weight: 700; font-size: 14px;
  background: linear-gradient(180deg, #D7BC7C, #C9A961); color: #1A2420; box-shadow: 0 6px 16px rgba(0, 0, 0, .18); }
.hero-txt .cta svg { width: 16px; height: 16px; }
.hero-slide.tone-accent .cta, .hero-slide.tone-paper .cta { background: var(--primary); color: #fff; }
.hero-slide .count { position: absolute; z-index: 1; top: 14px; right: 14px; display: grid; grid-template-columns: auto auto; align-items: center; column-gap: 8px; padding: 8px 12px; border-radius: 12px; background: rgba(12, 22, 18, .62); color: #fff; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.hero-slide .count svg { width: 22px; height: 22px; color: var(--champagne); grid-row: span 2; }
.hero-slide .count b { font-family: var(--font-head); font-size: 17px; line-height: 18px; }
.hero-slide .count small { font-size: 11px; opacity: .85; }
.hero-wrap .dots { margin-top: -22px; position: relative; z-index: 2; }
.hero-wrap .dots i { background: rgba(255, 255, 255, .45); }
.hero-wrap .dots i.on { background: #fff; width: 18px; }

/* quick actions */
.quick4 { display: grid; gap: 8px; margin-top: 16px; }
.quick4 a { background: var(--sc-lowest); border: 1px solid var(--outline-variant); border-radius: 16px; box-shadow: var(--shadow); padding: 14px 6px 12px; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; position: relative; overflow: hidden; }
.quick4 .ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--c-grid); color: var(--c-grid-on); }
.quick4 .ic svg { width: 24px; height: 24px; stroke-width: 1.8; }
.quick4 .l { font-size: 13px; font-weight: 600; line-height: 16px; color: var(--on-surface); }

/* 6-column category grid */
.cat6 { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px 6px; margin-top: 22px; }
.cat6 .cat { padding: 0; gap: 6px; }
.cat6 .cat .ic { width: 100%; aspect-ratio: 1; height: auto; max-width: 58px; border-radius: 16px; background: var(--c-grid); color: var(--c-grid-on); }
.cat6 .cat .ic svg { width: 26px; height: 26px; stroke-width: 1.8; }
.cat6 .cat span:last-child { font-size: 11px; line-height: 14px; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* promo cards */
.promo-row { display: flex; gap: 10px; overflow-x: auto; margin-left: -16px; margin-right: -16px; padding: 0 16px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.promo-row::-webkit-scrollbar { display: none; }
.promo { flex: 0 0 calc(50% - 5px); min-width: 176px; scroll-snap-align: start; position: relative; min-height: 196px; border-radius: 18px; overflow: hidden; display: flex; color: #F7F6F2;
  background: linear-gradient(135deg, #17342A, #24493C); }
.promo.tone-ink { background: linear-gradient(135deg, #1E2622, #2E3A35); }
.promo.tone-accent { background: linear-gradient(135deg, #E8D6AA, #F4ECD9); color: #3A2D10; }
.promo img { position: absolute; right: -10%; bottom: 0; width: 80%; height: 62%; object-fit: cover; object-position: left center; border-radius: 12px 0 0 0; opacity: .95; }
.promo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10, 22, 17, .96) 0%, rgba(10, 22, 17, .82) 42%, rgba(10, 22, 17, .15) 75%); pointer-events: none; }
.promo.tone-accent::after { background: linear-gradient(180deg, #F2E8D2 0%, rgba(242, 232, 210, .9) 45%, rgba(242, 232, 210, 0) 80%); }
.ptxt { position: relative; z-index: 1; padding: 14px 14px 12px; display: flex; flex-direction: column; gap: 5px; }
.ptxt .eb { font-size: 9.5px; font-weight: 700; letter-spacing: 1.8px; text-transform: uppercase; color: var(--champagne); }
.promo.tone-accent .ptxt .eb { color: #8A6D2C; }
.ptxt h3 { font-family: var(--font-head); font-size: 16px; line-height: 20px; font-weight: 700; margin: 0; }
.ptxt p { margin: 0; font-size: 11.5px; line-height: 15px; opacity: .85; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ptxt .cta { position: absolute; left: 14px; top: 150px; display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 18px; background: #fff; color: #1A2420; font-weight: 700; font-size: 12.5px; box-shadow: 0 4px 12px rgba(0, 0, 0, .2); z-index: 2; }
.ptxt .cta svg { width: 14px; height: 14px; }

/* popular services */
.pop-rail { gap: 8px; }
.pop { width: 112px; flex: none; background: var(--sc-lowest); border: 1px solid var(--outline-variant); border-radius: 16px; padding: 12px 10px 10px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; box-shadow: var(--shadow); scroll-snap-align: start; position: relative; overflow: hidden; }
.pop .ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--c-grid); color: var(--c-grid-on); }
.pop .ic svg { width: 24px; height: 24px; stroke-width: 1.8; }
.pop b { font-size: 12.5px; line-height: 16px; font-weight: 700; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 32px; }
.pop .sub { display: flex; align-items: center; gap: 4px; width: 100%; justify-content: space-between; font-size: 11px; color: var(--on-surface-variant); }
.pop .sub svg { width: 14px; height: 14px; flex: none; }

/* top business solutions */
.sol { width: 210px; flex: none; background: var(--sc-lowest); border: 1px solid var(--outline-variant); border-radius: 16px; padding: 12px 12px 12px; display: flex; flex-direction: column; box-shadow: var(--shadow); scroll-snap-align: start; position: relative; overflow: hidden; }
.sol b { font-family: var(--font-head); font-size: 15px; line-height: 20px; font-weight: 700; }
.sol .tg { font-size: 12px; color: var(--on-surface-variant); margin-bottom: 10px; display: block; }
.sol img, .sol .noimg { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; background: var(--sc-high); display: grid; place-items: center; }
.sol .noimg { background: var(--c-grid); color: var(--c-grid-on); }
.sol .noimg svg { width: 36px; height: 36px; }
.sec-title h2 { font-size: 19px; }
/* scanner */
.scanbox { position: relative; margin-top: 4px; border-radius: 20px; overflow: hidden; background: #0B0F0E; aspect-ratio: 1; }
.scanbox video { width: 100%; height: 100%; object-fit: cover; display: block; }
.scanbox .frame { position: absolute; inset: 16%; border-radius: 20px; box-shadow: 0 0 0 999px rgba(11, 15, 14, .45); border: 3px solid var(--champagne); }
.scanbox .line { position: absolute; left: 20%; right: 20%; top: 20%; height: 2px; background: var(--champagne); box-shadow: 0 0 12px var(--champagne); animation: scanline 2.2s ease-in-out infinite alternate; }
@keyframes scanline { to { top: 78%; } }
.scanbox .hint { position: absolute; left: 0; right: 0; bottom: 12px; text-align: center; color: #fff; font-size: 13px; font-weight: 500; text-shadow: 0 1px 3px rgba(0, 0, 0, .6); padding: 0 16px; }

/* v8 fit: six columns of category labels on 360–430px phones */
.cat6 { margin-left: -8px; margin-right: -8px; gap: 14px 2px; }
.cat6 .cat span:last-child { font-size: 10.5px; line-height: 13px; letter-spacing: -.1px; overflow-wrap: normal; word-break: normal; width: 100%; padding: 0 1px; }
.cat6 .cat .ic { max-width: 56px; }
@media (max-width: 370px) { .cat6 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
