/* ==========================================================================
   Templora design system – storefront, account and back office
   Light and dark themes (html[data-theme]), Inter + Noto Sans Thai, no CDN.
   ========================================================================== */

@font-face {
  font-family: "Inter";
  src: url("../fonts/Inter.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0000-0E00, U+0E80-FFFF;
}
@font-face {
  font-family: "Noto Sans Thai";
  src: url("../fonts/NotoSansThai.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0E01-0E7F, U+200B-200D, U+25CC;
}

:root {
  --font: "Inter", "Noto Sans Thai", system-ui, -apple-system, "Segoe UI", "Leelawadee UI", Tahoma, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;

  --brand: #5b5bf6;
  --brand-2: #8b5cf6;
  --brand-3: #06b6d4;
  --brand-ink: #ffffff;
  --brand-soft: #ecebff;
  --grad: linear-gradient(120deg, #5b5bf6 0%, #8b5cf6 45%, #06b6d4 100%);
  --grad-text: linear-gradient(100deg, #7c7cff 0%, #c084fc 40%, #22d3ee 100%);

  --bg: #f6f7fb;
  --bg-2: #eef0f7;
  --surface: #ffffff;
  --surface-2: #f8f9fc;
  --surface-3: #f1f3f9;
  --text: #0f1424;
  --text-2: #333b52;
  --muted: #5d6680;
  --faint: #8a93a8;
  --border: #e3e6ef;
  --border-2: #d3d8e4;
  --ring: rgba(91, 91, 246, .35);

  --ok: #0f9f6e;
  --ok-soft: #e3f7ef;
  --warn: #b7791f;
  --warn-soft: #fdf3dd;
  --danger: #dc2f45;
  --danger-soft: #fde8eb;
  --info: #2563eb;
  --info-soft: #e5eeff;
  --sale: #e11d74;
  --sale-soft: #ffe4f1;
  --star: #f5a524;

  --hero-bg: #070912;
  --hero-text: #f3f4fa;
  --hero-muted: #a5adc4;

  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --shadow-sm: 0 1px 2px rgba(15, 20, 36, .06), 0 1px 3px rgba(15, 20, 36, .05);
  --shadow: 0 6px 24px -8px rgba(15, 20, 36, .14), 0 2px 6px rgba(15, 20, 36, .05);
  --shadow-lg: 0 24px 60px -20px rgba(15, 20, 36, .28), 0 8px 20px -10px rgba(15, 20, 36, .12);
  --container: 1240px;
  --header-h: 68px;
  color-scheme: light;
}

html[data-theme="dark"] {
  --brand: #7b7bff;
  --brand-2: #a78bfa;
  --brand-3: #22d3ee;
  --brand-soft: #1f1f45;
  --bg: #090b13;
  --bg-2: #0e111c;
  --surface: #11141f;
  --surface-2: #151926;
  --surface-3: #1b2030;
  --text: #eceef6;
  --text-2: #c9cede;
  --muted: #9aa2b8;
  --faint: #6f7891;
  --border: #232839;
  --border-2: #2f3549;
  --ring: rgba(123, 123, 255, .45);
  --ok: #34d399;
  --ok-soft: #0f2a22;
  --warn: #fbbf24;
  --warn-soft: #2d2410;
  --danger: #fb7185;
  --danger-soft: #331722;
  --info: #60a5fa;
  --info-soft: #14223d;
  --sale: #f472b6;
  --sale-soft: #35142a;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow: 0 8px 30px -10px rgba(0, 0, 0, .6);
  --shadow-lg: 0 30px 70px -20px rgba(0, 0, 0, .75);
  color-scheme: dark;
}

/* ---------------------------------------------------------------- base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.6; color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; min-height: 100vh; display: flex; flex-direction: column;
}
html[lang="th"] body { line-height: 1.7; }
main { flex: 1 0 auto; }
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3, h4 { line-height: 1.2; letter-spacing: -.02em; margin: 0 0 .5em; color: var(--text); font-weight: 750; }
html[lang="th"] h1, html[lang="th"] h2, html[lang="th"] h3 { letter-spacing: 0; line-height: 1.35; }
h1 { font-size: clamp(1.9rem, 1.2rem + 2.4vw, 3rem); }
h2 { font-size: clamp(1.4rem, 1.1rem + 1vw, 1.95rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
hr { border: 0; border-top: 1px solid var(--border); margin: 1.5rem 0; }
code, kbd, .mono { font-family: var(--mono); font-size: .92em; }
:focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--brand); color: #fff; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 1rem; top: -4rem; z-index: 999; background: var(--brand); color: #fff; padding: .6rem 1rem; border-radius: var(--radius-sm); }
.skip-link:focus { top: 1rem; }

.ico { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -.18em; display: inline-block; }
.ico-fill { fill: currentColor; }
.ico-lg { width: 1.5em; height: 1.5em; }
.ico-xl { width: 2.2em; height: 2.2em; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.container-narrow { max-width: 880px; }
.container-mid { max-width: 1060px; }
.stack > * + * { margin-top: 1rem; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row-between { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.grow { flex: 1 1 auto; min-width: 0; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: .86rem; }
.tiny { font-size: .76rem; }
.center { text-align: center; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.mt-0 { margin-top: 0 !important; } .mt-1 { margin-top: .5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; } .mt-4 { margin-top: 2.5rem; }
.mb-0 { margin-bottom: 0 !important; } .mb-1 { margin-bottom: .5rem; } .mb-2 { margin-bottom: 1rem; } .mb-3 { margin-bottom: 1.5rem; }
.hidden { display: none !important; }
.grad-text { background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------------------------------------------------------------- buttons */
.btn {
  --b-bg: var(--surface); --b-fg: var(--text); --b-bd: var(--border-2);
  display: inline-flex; align-items: center; justify-content: center; gap: .5em; height: 42px; padding: 0 18px;
  border-radius: var(--radius-sm); border: 1px solid var(--b-bd); background: var(--b-bg); color: var(--b-fg);
  font: inherit; font-weight: 620; font-size: .94rem; cursor: pointer; white-space: nowrap; text-decoration: none !important;
  transition: background .15s, border-color .15s, transform .08s, box-shadow .15s, color .15s; user-select: none;
}
.btn:hover { border-color: var(--brand); color: var(--brand); }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn.disabled { opacity: .55; pointer-events: none; }
.btn-primary { --b-bg: var(--brand); --b-fg: #fff; --b-bd: transparent; background: var(--grad); background-size: 140% 100%; box-shadow: 0 8px 20px -8px rgba(91, 91, 246, .6); }
.btn-primary:hover { color: #fff; background-position: 100% 0; box-shadow: 0 12px 26px -8px rgba(91, 91, 246, .7); border-color: transparent; }
.btn-dark { --b-bg: #10131f; --b-fg: #fff; --b-bd: #10131f; }
.btn-dark:hover { color: #fff; background: #1d2234; border-color: #1d2234; }
html[data-theme="dark"] .btn-dark { --b-bg: #f3f4fa; --b-fg: #0b0d14; --b-bd: #f3f4fa; }
html[data-theme="dark"] .btn-dark:hover { color: #0b0d14; background: #fff; }
.btn-ghost { --b-bg: transparent; --b-bd: transparent; }
.btn-ghost:hover { background: var(--surface-3); border-color: transparent; color: var(--text); }
.btn-soft { --b-bg: var(--brand-soft); --b-fg: var(--brand); --b-bd: transparent; }
.btn-soft:hover { border-color: transparent; filter: brightness(.97); }
.btn-ok { --b-bg: var(--ok); --b-fg: #fff; --b-bd: var(--ok); }
.btn-ok:hover { color: #fff; filter: brightness(1.06); border-color: var(--ok); }
.btn-danger { --b-bg: transparent; --b-fg: var(--danger); --b-bd: var(--danger); }
.btn-danger:hover { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-sm { height: 34px; padding: 0 12px; font-size: .86rem; border-radius: 8px; }
.btn-xs { height: 28px; padding: 0 10px; font-size: .8rem; border-radius: 7px; }
.btn-lg { height: 52px; padding: 0 26px; font-size: 1.02rem; border-radius: 12px; }
.btn-block { width: 100%; }
.btn-icon { width: 42px; padding: 0; }
.btn-icon.btn-sm { width: 34px; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--brand); cursor: pointer; }
.link-btn:hover { text-decoration: underline; }
.link-muted { color: var(--muted); }
.link-muted:hover { color: var(--text); }

/* ---------------------------------------------------------------- badges & chips */
.badge {
  display: inline-flex; align-items: center; gap: .3em; padding: 2px 9px; border-radius: 999px; font-size: .74rem; font-weight: 650;
  background: var(--surface-3); color: var(--text-2); line-height: 1.6; white-space: nowrap; border: 1px solid transparent;
}
.badge-new { background: #16a34a; color: #fff; }
.badge-update { background: #2563eb; color: #fff; }
.badge-sale { background: var(--sale); color: #fff; }
.badge-free { background: #0f766e; color: #fff; }
.badge-brand { background: var(--brand-soft); color: var(--brand); }
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-info { background: var(--info-soft); color: var(--info); }
.badge-muted { background: var(--surface-3); color: var(--muted); }
.badge-outline { background: transparent; border-color: var(--border-2); color: var(--muted); }
.status { font-weight: 650; }
.status-ok { color: var(--ok); } .status-warn { color: var(--warn); } .status-info { color: var(--info); } .status-muted { color: var(--muted); } .status-danger { color: var(--danger); }

.chip {
  display: inline-flex; align-items: center; gap: .45em; height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text-2); font-size: .88rem; font-weight: 560; white-space: nowrap; text-decoration: none !important;
  transition: border-color .15s, background .15s, color .15s;
}
.chip:hover { border-color: var(--brand); color: var(--brand); }
.chip.active { background: var(--text); color: var(--bg); border-color: var(--text); }
.chip .count { color: var(--faint); font-weight: 500; font-size: .8rem; }
.chip.active .count { color: inherit; opacity: .7; }
.chip-x { font-size: .82rem; height: 30px; padding: 0 10px 0 12px; background: var(--brand-soft); color: var(--brand); border-color: transparent; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chips-scroll { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.chips-scroll::-webkit-scrollbar { display: none; }

.tech { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; color: var(--text-2); font-weight: 560; }
.tech-mark {
  width: 22px; height: 22px; border-radius: 6px; display: inline-grid; place-items: center; font-size: .62rem; font-weight: 800; color: #fff;
  background: var(--tc, #64748b); letter-spacing: -.02em; flex: none;
}
.tech-list { display: flex; gap: 6px; flex-wrap: wrap; }

/* ---------------------------------------------------------------- announcement + header */
.announce { background: #10131f; color: #e9ebf5; font-size: .84rem; text-align: center; padding: 7px 16px; }
.announce a { color: #c7c9ff; font-weight: 600; }
.demo-bar { background: repeating-linear-gradient(45deg, #fff7d6, #fff7d6 14px, #ffefb0 14px, #ffefb0 28px); color: #5c4400; font-size: .8rem; text-align: center; padding: 4px 12px; font-weight: 600; }
html[data-theme="dark"] .demo-bar { background: repeating-linear-gradient(45deg, #2c2510, #2c2510 14px, #3a3014 14px, #3a3014 28px); color: #f8e3a3; }

.site-header {
  position: sticky; top: 0; z-index: 50; height: var(--header-h); background: color-mix(in srgb, var(--surface) 86%, transparent);
  backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px); border-bottom: 1px solid var(--border);
}
.site-header.on-hero { background: rgba(7, 9, 18, .72); border-bottom-color: rgba(255, 255, 255, .08); color: #fff; }
.header-inner { height: 100%; display: flex; align-items: center; gap: 18px; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 800; font-size: 1.18rem; letter-spacing: -.03em; text-decoration: none !important; flex: none; }
.on-hero .logo { color: #fff; }
.logo-mark { width: 34px; height: 34px; border-radius: 10px; background: var(--grad); display: grid; place-items: center; box-shadow: 0 6px 16px -6px rgba(91, 91, 246, .8); }
.logo-mark svg { width: 20px; height: 20px; }
.main-nav { display: flex; align-items: center; gap: 2px; }
.nav-link, .nav-trigger {
  display: inline-flex; align-items: center; gap: 5px; height: 38px; padding: 0 12px; border-radius: 9px; color: var(--text-2); font-weight: 580;
  font-size: .92rem; background: none; border: 0; cursor: pointer; font-family: inherit; text-decoration: none !important; white-space: nowrap;
}
.nav-link:hover, .nav-trigger:hover, .nav-item.open > .nav-trigger { background: var(--surface-3); color: var(--text); }
.on-hero .nav-link, .on-hero .nav-trigger { color: #d6d9e8; }
.on-hero .nav-link:hover, .on-hero .nav-trigger:hover, .on-hero .nav-item.open > .nav-trigger { background: rgba(255, 255, 255, .08); color: #fff; }
.nav-item { position: relative; }
.nav-trigger .ico { width: 15px; height: 15px; transition: transform .2s; }
.nav-item.open > .nav-trigger .ico { transform: rotate(180deg); }
.mega {
  position: absolute; top: calc(100% + 10px); left: -12px; width: min(760px, calc(100vw - 40px)); background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 22px; display: none;
  grid-template-columns: 1.4fr 1fr; gap: 26px; z-index: 60;
}
.nav-item.open > .mega { display: grid; animation: pop .16s ease-out; }
@keyframes pop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.mega h4 { font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); margin: 0 0 10px; font-weight: 700; }
.mega-cats { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
.mega-cat { display: flex; gap: 10px; align-items: flex-start; padding: 9px 10px; border-radius: 10px; color: var(--text); text-decoration: none !important; }
.mega-cat:hover { background: var(--surface-3); }
.mega-cat .mc-ico { width: 34px; height: 34px; border-radius: 9px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; flex: none; }
.mega-cat b { display: block; font-size: .9rem; font-weight: 640; }
.mega-cat span { display: block; font-size: .76rem; color: var(--muted); }
.mega-techs { display: flex; flex-wrap: wrap; gap: 6px; }
.mega-techs a { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px 5px 5px; border: 1px solid var(--border); border-radius: 999px; color: var(--text-2); font-size: .82rem; text-decoration: none !important; }
.mega-techs a:hover { border-color: var(--brand); color: var(--brand); }
.mega-foot { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; padding-top: 14px; border-top: 1px solid var(--border); font-size: .88rem; }
.mega-platforms { display: flex; gap: 8px; }

.header-search { flex: 1 1 auto; max-width: 420px; position: relative; margin-left: auto; }
.header-search input {
  width: 100%; height: 40px; border-radius: 11px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text);
  padding: 0 14px 0 38px; font: inherit; font-size: .9rem;
}
.header-search input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--ring); background: var(--surface); }
.header-search .ico { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--faint); }
.on-hero .header-search input { background: rgba(255, 255, 255, .07); border-color: rgba(255, 255, 255, .14); color: #fff; }
.on-hero .header-search input::placeholder { color: #9aa1b8; }
.header-actions { display: flex; align-items: center; gap: 4px; flex: none; }
.hdr-btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 40px; height: 40px; padding: 0 10px;
  border-radius: 10px; color: var(--text-2); background: none; border: 0; cursor: pointer; font: inherit; font-size: .84rem; font-weight: 650; text-decoration: none !important;
}
.hdr-btn:hover { background: var(--surface-3); color: var(--text); }
.on-hero .hdr-btn { color: #d6d9e8; }
.on-hero .hdr-btn:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.hdr-count { position: absolute; top: 3px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--sale); color: #fff; font-size: .68rem; font-weight: 750; display: grid; place-items: center; line-height: 1; }
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: 9px; overflow: hidden; height: 32px; }
.seg a { display: inline-grid; place-items: center; padding: 0 9px; font-size: .78rem; font-weight: 700; color: var(--muted); text-decoration: none !important; }
.seg a.on { background: var(--text); color: var(--bg); }
.on-hero .seg { border-color: rgba(255, 255, 255, .16); }
.on-hero .seg a { color: #b8bed3; }
.on-hero .seg a.on { background: #fff; color: #0b0d14; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--grad); color: #fff; display: inline-grid; place-items: center; font-size: .76rem; font-weight: 750; flex: none; }
.avatar-lg { width: 56px; height: 56px; font-size: 1.1rem; }
.dropdown { position: relative; }
.dropdown-menu {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 230px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 6px; display: none; z-index: 70; color: var(--text);
}
.dropdown.open > .dropdown-menu { display: block; animation: pop .14s ease-out; }
.dropdown-menu a, .dropdown-menu button { display: flex; width: 100%; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 9px; color: var(--text-2); font: inherit; font-size: .9rem; text-decoration: none !important; background: none; border: 0; cursor: pointer; text-align: left; }
.dropdown-menu a:hover, .dropdown-menu button:hover { background: var(--surface-3); color: var(--text); }
.dropdown-head { padding: 10px 12px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.dropdown-head b { display: block; font-size: .92rem; }
.dropdown-head span { font-size: .78rem; color: var(--muted); }
.menu-toggle { display: none; }

/* mobile drawer */
.drawer { position: fixed; inset: 0; z-index: 100; display: none; }
.drawer.open { display: block; }
.drawer-backdrop { position: absolute; inset: 0; background: rgba(5, 7, 14, .55); backdrop-filter: blur(2px); }
.drawer-panel { position: absolute; top: 0; left: 0; bottom: 0; width: min(360px, 88vw); background: var(--surface); padding: 18px; overflow-y: auto; box-shadow: var(--shadow-lg); animation: slide .2s ease-out; }
@keyframes slide { from { transform: translateX(-30px); opacity: 0; } to { transform: none; opacity: 1; } }
.drawer-panel h4 { font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); margin: 18px 0 6px; }
.drawer-panel a.dl { display: flex; align-items: center; justify-content: space-between; padding: 10px 8px; border-radius: 9px; color: var(--text); font-weight: 560; text-decoration: none !important; }
.drawer-panel a.dl:hover { background: var(--surface-3); }
.drawer-panel a.dl span { color: var(--faint); font-size: .8rem; }

/* ---------------------------------------------------------------- flash */
.flash-wrap { position: fixed; top: calc(var(--header-h) + 12px); right: 16px; z-index: 90; display: flex; flex-direction: column; gap: 8px; max-width: min(420px, calc(100vw - 32px)); }
.flash { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-lg); font-size: .92rem; animation: pop .2s ease-out; }
.flash .ico { margin-top: 2px; }
.flash-ok .ico { color: var(--ok); } .flash-error .ico { color: var(--danger); } .flash-info .ico { color: var(--info); }
.flash-error { border-color: color-mix(in srgb, var(--danger) 40%, var(--border)); }
.flash button { margin-left: auto; background: none; border: 0; color: var(--faint); cursor: pointer; padding: 0; }
.alert { display: flex; gap: 10px; padding: 12px 14px; border-radius: 12px; font-size: .92rem; border: 1px solid transparent; align-items: flex-start; }
.alert .ico { margin-top: 3px; }
.alert-info { background: var(--info-soft); color: var(--text); border-color: color-mix(in srgb, var(--info) 25%, transparent); }
.alert-info .ico { color: var(--info); }
.alert-ok { background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 25%, transparent); }
.alert-ok .ico { color: var(--ok); }
.alert-warn { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 30%, transparent); }
.alert-warn .ico { color: var(--warn); }
.alert-danger { background: var(--danger-soft); border-color: color-mix(in srgb, var(--danger) 25%, transparent); }
.alert-danger .ico { color: var(--danger); }

/* ---------------------------------------------------------------- hero */
.hero {
  position: relative; background: var(--hero-bg); color: var(--hero-text); overflow: hidden; margin-top: calc(-1 * var(--header-h));
  padding: calc(var(--header-h) + 64px) 0 72px; isolation: isolate;
}
.hero::before {
  content: ""; position: absolute; inset: -20% -10% auto -10%; height: 140%; z-index: -2;
  background:
    radial-gradient(40% 50% at 18% 30%, rgba(91, 91, 246, .45), transparent 70%),
    radial-gradient(35% 45% at 82% 20%, rgba(6, 182, 212, .32), transparent 70%),
    radial-gradient(40% 50% at 60% 90%, rgba(168, 85, 247, .35), transparent 70%);
  filter: blur(10px);
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: .35;
  background-image: linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
  background-size: 56px 56px; mask-image: radial-gradient(70% 60% at 50% 35%, #000 30%, transparent 80%);
}
.hero-collage {
  position: absolute; inset: 0; z-index: -1; display: grid; grid-template-columns: repeat(6, 1fr); gap: 18px; padding: 0 2%;
  transform: perspective(1400px) rotateX(22deg) rotateZ(-8deg) translateY(-6%) scale(1.25); opacity: .22; pointer-events: none;
  mask-image: radial-gradient(60% 60% at 50% 40%, transparent 30%, #000 75%);
}
.hero-collage img { border-radius: 12px; aspect-ratio: 16 / 10; object-fit: cover; width: 100%; box-shadow: 0 20px 40px rgba(0, 0, 0, .5); }
.hero-collage .col { display: flex; flex-direction: column; gap: 18px; }
.hero-collage .col:nth-child(even) { margin-top: 70px; }
.hero-inner { text-align: center; max-width: 880px; margin: 0 auto; }
.hero-pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 8px; border-radius: 999px; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .12); font-size: .84rem; color: #d7dbea; margin-bottom: 22px; }
.hero-pill .dot { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: rgba(16, 185, 129, .18); color: #34d399; }
.hero h1 { color: #fff; font-size: clamp(2.3rem, 1.3rem + 4vw, 4.3rem); font-weight: 820; letter-spacing: -.035em; margin-bottom: 18px; }
html[lang="th"] .hero h1 { font-size: clamp(2rem, 1.2rem + 3.4vw, 3.6rem); letter-spacing: -.01em; }
.hero p.lead { color: var(--hero-muted); font-size: clamp(1rem, .9rem + .4vw, 1.2rem); max-width: 640px; margin: 0 auto 30px; }
.hero-search { max-width: 640px; margin: 0 auto; position: relative; }
.hero-search input {
  width: 100%; height: 60px; border-radius: 16px; border: 1px solid rgba(255, 255, 255, .14); background: rgba(16, 19, 33, .82); color: #fff;
  font: inherit; font-size: 1.02rem; padding: 0 140px 0 52px; box-shadow: 0 20px 50px -18px rgba(0, 0, 0, .8);
}
.hero-search input::placeholder { color: #8f97ae; }
.hero-search input:focus { outline: none; border-color: rgba(123, 123, 255, .7); box-shadow: 0 0 0 5px rgba(91, 91, 246, .25); }
.hero-search > .ico { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); color: #8f97ae; width: 22px; height: 22px; }
.hero-search .btn { position: absolute; right: 8px; top: 8px; height: 44px; }
.hero-quick { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 18px; }
.hero-quick a { padding: 6px 13px; border-radius: 999px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1); color: #cfd3e3; font-size: .84rem; text-decoration: none !important; }
.hero-quick a:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.hero-stats { display: flex; justify-content: center; gap: clamp(20px, 5vw, 56px); margin-top: 46px; flex-wrap: wrap; }
.hero-stats div { text-align: center; }
.hero-stats b { display: block; font-size: 1.7rem; font-weight: 800; color: #fff; letter-spacing: -.02em; }
.hero-stats span { font-size: .82rem; color: var(--hero-muted); }

.page-hero { background: var(--surface); border-bottom: 1px solid var(--border); padding: 34px 0 26px; }
.page-hero h1 { font-size: clamp(1.7rem, 1.2rem + 1.6vw, 2.5rem); margin-bottom: 6px; }
.page-hero p { color: var(--muted); margin: 0; max-width: 720px; }
.page-hero.dark { background: var(--hero-bg); border-bottom: 0; position: relative; overflow: hidden; color: #fff; }
.page-hero.dark::before { content: ""; position: absolute; inset: 0; background: radial-gradient(50% 120% at 15% 0%, rgba(91, 91, 246, .35), transparent 70%), radial-gradient(40% 100% at 90% 10%, rgba(6, 182, 212, .25), transparent 70%); }
.page-hero.dark .container { position: relative; }
.page-hero.dark h1 { color: #fff; }
.page-hero.dark p, .page-hero.dark .crumbs, .page-hero.dark .crumbs a { color: #b4bbd0; }
.crumbs { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; font-size: .84rem; color: var(--muted); margin-bottom: 12px; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--brand); }
.crumbs .ico { width: 14px; height: 14px; color: var(--faint); }

/* ---------------------------------------------------------------- sections */
.section { padding: 64px 0; }
.section-tight { padding: 40px 0; }
.section-alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 26px; flex-wrap: wrap; }
.section-head h2 { margin: 0 0 4px; }
.section-head p { margin: 0; color: var(--muted); }
.eyebrow { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--brand); margin-bottom: 8px; }

/* ---------------------------------------------------------------- product cards */
.grid { display: grid; gap: 22px; }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pcard { position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: transform .2s, box-shadow .2s, border-color .2s; }
.pcard:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--border-2); }
.pcard-media { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--surface-3); }
.pcard-media img { width: 100%; height: 100%; object-fit: cover; object-position: top center; transition: transform .5s ease; }
.pcard:hover .pcard-media img { transform: scale(1.045); }
.pcard-badges { position: absolute; top: 10px; left: 10px; display: flex; gap: 6px; z-index: 2; }
.pcard-actions { position: absolute; inset: auto 10px 10px 10px; display: flex; gap: 8px; justify-content: flex-end; opacity: 0; transform: translateY(6px); transition: .2s; z-index: 2; }
.pcard:hover .pcard-actions, .pcard:focus-within .pcard-actions { opacity: 1; transform: none; }
.pcard-actions .btn { height: 34px; font-size: .82rem; background: rgba(255, 255, 255, .96); color: #10131f; border-color: transparent; box-shadow: var(--shadow); }
.pcard-actions .btn:hover { color: var(--brand); }
.heart-btn { position: absolute; top: 10px; right: 10px; z-index: 3; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .92); color: #3b4259; border: 0; cursor: pointer; box-shadow: var(--shadow-sm); }
.heart-btn:hover { color: var(--sale); }
.heart-btn.saved { color: var(--sale); }
.heart-btn.saved .ico { fill: currentColor; }
.pcard-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.pcard-kind { display: flex; align-items: center; gap: 8px; font-size: .75rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.pcard-kind .plat { display: inline-flex; gap: 4px; color: var(--text-2); }
.pcard-title { font-size: 1rem; font-weight: 680; line-height: 1.35; margin: 0; color: var(--text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pcard-title a { color: inherit; text-decoration: none !important; }
.pcard-title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.pcard-tagline { font-size: .84rem; color: var(--muted); margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pcard-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 10px; border-top: 1px dashed var(--border); }
.price { display: inline-flex; align-items: baseline; gap: 7px; font-weight: 780; font-size: 1.06rem; color: var(--text); white-space: nowrap; }
.price s { color: var(--faint); font-weight: 500; font-size: .84rem; }
.price .from { font-size: .74rem; color: var(--muted); font-weight: 600; }
.price-free { color: #0f9f6e; }
.rating { display: inline-flex; align-items: center; gap: 4px; font-size: .82rem; color: var(--muted); font-weight: 600; }
.rating .ico { color: var(--star); fill: var(--star); width: 15px; height: 15px; }
.stars { display: inline-flex; gap: 1px; color: var(--border-2); }
.stars .ico { width: 16px; height: 16px; }
.stars .on { color: var(--star); fill: var(--star); }
.stars-lg .ico { width: 22px; height: 22px; }

/* category / platform tiles */
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.tile { position: relative; display: flex; gap: 14px; align-items: flex-start; padding: 18px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); color: var(--text); text-decoration: none !important; transition: .2s; overflow: hidden; }
.tile:hover { border-color: var(--brand); transform: translateY(-2px); box-shadow: var(--shadow); }
.tile-ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); flex: none; }
.tile b { display: block; font-size: .98rem; font-weight: 680; margin-bottom: 2px; }
.tile span { display: block; font-size: .82rem; color: var(--muted); line-height: 1.45; }
.tile em { font-style: normal; display: inline-block; margin-top: 8px; font-size: .76rem; font-weight: 700; color: var(--faint); }
.tile-arrow { position: absolute; right: 14px; top: 16px; color: var(--faint); transition: .2s; }
.tile:hover .tile-arrow { color: var(--brand); transform: translateX(3px); }

.platform-band { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center; }
.platform-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.plat-card { padding: 22px; border-radius: var(--radius-lg); border: 1px solid var(--border); background: var(--surface); color: var(--text); text-decoration: none !important; transition: .2s; }
.plat-card:hover { border-color: var(--brand); box-shadow: var(--shadow); transform: translateY(-2px); }
.plat-card .ico { width: 30px; height: 30px; margin-bottom: 12px; }
.plat-card b { display: block; font-size: 1.05rem; }
.plat-card span { color: var(--muted); font-size: .86rem; }
.phones { position: relative; height: 420px; }
.phone {
  position: absolute; width: 210px; aspect-ratio: 9 / 19.5; border-radius: 34px; background: #0b0d14; padding: 9px; box-shadow: var(--shadow-lg), inset 0 0 0 2px #2a2f42;
}
.phone img { width: 100%; height: 100%; object-fit: cover; object-position: top; border-radius: 26px; }
.phone::before { content: ""; position: absolute; top: 15px; left: 50%; transform: translateX(-50%); width: 64px; height: 18px; border-radius: 10px; background: #0b0d14; z-index: 2; }
.phones .phone:nth-child(1) { left: 6%; top: 40px; transform: rotate(-8deg); }
.phones .phone:nth-child(2) { left: 34%; top: 0; z-index: 2; }
.phones .phone:nth-child(3) { left: 62%; top: 50px; transform: rotate(7deg); }

.tech-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.tech-tile { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--text); text-decoration: none !important; transition: .15s; }
.tech-tile:hover { border-color: var(--brand); }
.tech-tile .tech-mark { width: 36px; height: 36px; border-radius: 10px; font-size: .84rem; }
.tech-tile b { display: block; font-size: .92rem; font-weight: 650; }
.tech-tile > span:not(.tech-mark) span { display: block; font-size: .76rem; color: var(--muted); }

.perks { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.perk { padding: 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.perk .ico { width: 26px; height: 26px; color: var(--brand); margin-bottom: 12px; }
.perk b { display: block; margin-bottom: 4px; }
.perk p { margin: 0; color: var(--muted); font-size: .88rem; }

.deal-card { display: grid; grid-template-columns: 180px 1fr; gap: 16px; align-items: center; padding: 14px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); color: var(--text); position: relative; }
.deal-card img { border-radius: 10px; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; }
.deal-off { position: absolute; top: 20px; left: 20px; }
.countdown { display: inline-flex; gap: 4px; font-variant-numeric: tabular-nums; font-weight: 700; font-size: .84rem; color: var(--sale); }
.countdown-box { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 10px; background: var(--sale-soft); color: var(--sale); font-size: .86rem; font-weight: 650; }

.review-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.review-card { padding: 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); display: flex; flex-direction: column; gap: 10px; }
.review-card p { margin: 0; color: var(--text-2); font-size: .92rem; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.review-card .who { display: flex; align-items: center; gap: 10px; margin-top: auto; font-size: .84rem; }
.review-card .who a { font-weight: 600; }

.cta-band { border-radius: var(--radius-xl); padding: clamp(28px, 5vw, 56px); background: var(--hero-bg); color: #fff; position: relative; overflow: hidden; display: grid; grid-template-columns: 1.3fr 1fr; gap: 30px; align-items: center; }
.cta-band::before { content: ""; position: absolute; inset: 0; background: radial-gradient(60% 120% at 0% 0%, rgba(91, 91, 246, .5), transparent 70%), radial-gradient(50% 100% at 100% 100%, rgba(6, 182, 212, .35), transparent 70%); }
.cta-band > * { position: relative; }
.cta-band h2 { color: #fff; }
.cta-band p { color: #b9c0d6; }
.newsletter { display: flex; gap: 8px; }
.newsletter input { flex: 1; height: 48px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .18); background: rgba(255, 255, 255, .07); color: #fff; padding: 0 14px; font: inherit; }
.newsletter input::placeholder { color: #9aa1b8; }
.wallet-band { display: grid; grid-template-columns: 1fr 340px; gap: 30px; align-items: center; padding: 32px; border-radius: var(--radius-xl); background: var(--surface); border: 1px solid var(--border); }
.wallet-demo { border-radius: var(--radius-lg); padding: 22px; background: var(--surface-2); border: 1px solid var(--border); }
.wallet-demo .row-between { padding: 8px 0; border-bottom: 1px dashed var(--border); }
.wallet-demo .row-between:last-child { border: 0; }

/* ---------------------------------------------------------------- browse */
.browse { display: grid; grid-template-columns: 260px 1fr; gap: 30px; padding: 30px 0 64px; }
.filters { position: sticky; top: calc(var(--header-h) + 16px); align-self: start; display: flex; flex-direction: column; gap: 18px; max-height: calc(100vh - var(--header-h) - 32px); overflow-y: auto; padding-right: 4px; }
.filter-box { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); padding: 14px; }
.filter-box h4 { font-size: .78rem; text-transform: uppercase; letter-spacing: .07em; color: var(--faint); margin: 0 0 10px; }
.filter-link { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 9px; border-radius: 8px; color: var(--text-2); font-size: .9rem; text-decoration: none !important; }
.filter-link:hover { background: var(--surface-3); color: var(--text); }
.filter-link.active { background: var(--brand-soft); color: var(--brand); font-weight: 650; }
.filter-link > span:last-child:not(:first-child) { color: var(--faint); font-size: .78rem; }
.filter-link.active > span:last-child:not(:first-child) { color: inherit; }
.filter-link .tech { font-size: inherit; color: inherit; font-weight: inherit; gap: 8px; }
.price-form { display: flex; gap: 6px; align-items: center; }
.price-form input { width: 100%; height: 36px; padding: 0 8px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); font: inherit; font-size: .86rem; }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.toolbar .count { color: var(--muted); font-size: .9rem; }
.select { height: 38px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text); padding: 0 34px 0 12px; font: inherit; font-size: .88rem; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238a93a8' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; cursor: pointer; }
.filters-toggle { display: none; }
.empty { text-align: center; padding: 60px 20px; border: 1px dashed var(--border-2); border-radius: var(--radius-lg); background: var(--surface); }
.empty .ico { width: 44px; height: 44px; color: var(--faint); margin: 0 auto 12px; }
.empty h3 { margin-bottom: 6px; }
.empty p { color: var(--muted); }
.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 34px; flex-wrap: wrap; }
.pagination a, .pagination span { min-width: 40px; height: 40px; display: inline-grid; place-items: center; padding: 0 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); font-weight: 600; font-size: .9rem; text-decoration: none !important; }
.pagination a:hover { border-color: var(--brand); color: var(--brand); }
.pagination .on { background: var(--text); color: var(--bg); border-color: var(--text); }
.pagination .gap { border: 0; background: none; }

/* ---------------------------------------------------------------- item page */
.item-head { padding: 26px 0 8px; }
.item-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 34px; align-items: start; padding-bottom: 64px; }
.gallery-main { position: relative; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border); background: var(--surface-3); aspect-ratio: 16 / 10; cursor: zoom-in; }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.gallery-thumbs { display: flex; gap: 10px; margin-top: 12px; overflow-x: auto; padding-bottom: 4px; }
.gallery-thumbs button { flex: none; width: 104px; aspect-ratio: 16 / 10; border-radius: 10px; overflow: hidden; border: 2px solid transparent; padding: 0; cursor: pointer; background: var(--surface-3); opacity: .7; transition: .15s; }
.gallery-thumbs button.on, .gallery-thumbs button:hover { border-color: var(--brand); opacity: 1; }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.gallery-thumbs.screens button { width: 62px; aspect-ratio: 9 / 19.5; }
.app-showcase { display: flex; gap: 18px; overflow-x: auto; padding: 26px; border-radius: var(--radius-lg); border: 1px solid var(--border); background: radial-gradient(80% 80% at 50% 0%, var(--brand-soft), var(--surface) 70%); scroll-snap-type: x mandatory; }
.app-showcase .phone { position: relative; width: 200px; flex: none; scroll-snap-align: center; }
.item-actions { display: flex; gap: 10px; justify-content: center; margin: 16px 0 8px; flex-wrap: wrap; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin: 26px 0 22px; overflow-x: auto; scrollbar-width: none; }
.tabs a { padding: 12px 16px; color: var(--muted); font-weight: 620; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; text-decoration: none !important; }
.tabs a:hover { color: var(--text); }
.tabs a.on { color: var(--text); border-bottom-color: var(--brand); }
.tabs a .badge { margin-left: 6px; }
.tab-panel { display: none; }
.tab-panel.on { display: block; animation: fade .2s; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.prose { color: var(--text-2); font-size: 1rem; line-height: 1.75; }
.prose h2, .prose h3 { color: var(--text); margin-top: 1.6em; }
.prose h3 { font-size: 1.12rem; }
.prose ul { padding-left: 1.2em; }
.prose li { margin: .3em 0; }
.prose li::marker { color: var(--brand); }
.prose blockquote { margin: 1em 0; padding: 12px 16px; border-left: 3px solid var(--brand); background: var(--surface-2); border-radius: 0 10px 10px 0; color: var(--text); }
.prose code { background: var(--surface-3); padding: 2px 6px; border-radius: 5px; }
.prose a { font-weight: 600; }
.prose img { border-radius: 12px; }
.md-table { border-collapse: collapse; width: 100%; margin: 1em 0; font-size: .92rem; }
.md-table th, .md-table td { border: 1px solid var(--border); padding: 8px 10px; text-align: left; }
.md-table th { background: var(--surface-2); }
.highlights { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 0 0 26px; padding: 0; list-style: none; }
.highlights li { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); font-size: .92rem; }
.highlights .ico { color: var(--ok); margin-top: 3px; }

.buy-box { position: sticky; top: calc(var(--header-h) + 16px); display: flex; flex-direction: column; gap: 14px; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; }
.panel-tight { padding: 14px 16px; }
.buy-title { font-size: 1.45rem; font-weight: 790; margin: 0 0 4px; }
.buy-sub { color: var(--muted); font-size: .95rem; margin: 0 0 12px; }
.license-opt { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; border: 1.5px solid var(--border); cursor: pointer; transition: .15s; margin-bottom: 8px; background: var(--surface); }
.license-opt:hover { border-color: var(--border-2); }
.license-opt:has(input:checked) { border-color: var(--brand); background: color-mix(in srgb, var(--brand-soft) 55%, var(--surface)); box-shadow: 0 0 0 3px var(--ring); }
.license-opt input { margin-top: 4px; accent-color: var(--brand); }
.license-opt b { display: block; font-size: .95rem; }
.license-opt small { display: block; color: var(--muted); font-size: .8rem; line-height: 1.45; }
.license-opt .price { margin-left: auto; font-size: 1rem; flex-direction: column; align-items: flex-end; gap: 0; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--border-2); border-radius: 10px; overflow: hidden; height: 38px; }
.qty button { width: 34px; height: 100%; border: 0; background: var(--surface-2); color: var(--text); cursor: pointer; display: grid; place-items: center; }
.qty input { width: 44px; height: 100%; border: 0; text-align: center; background: var(--surface); color: var(--text); font: inherit; font-weight: 650; -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; }
.addon { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border-radius: 12px; background: var(--surface-2); border: 1px dashed var(--border-2); font-size: .88rem; cursor: pointer; }
.addon input { margin-top: 3px; accent-color: var(--brand); }
.buy-total { display: flex; justify-content: space-between; align-items: baseline; padding: 12px 0 4px; border-top: 1px solid var(--border); margin-top: 6px; }
.buy-total b { font-size: 1.6rem; font-weight: 820; letter-spacing: -.02em; }
.trust { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-size: .88rem; color: var(--text-2); }
.trust li { display: flex; gap: 10px; align-items: center; }
.trust .ico { color: var(--ok); }
.meta-table { width: 100%; font-size: .88rem; border-collapse: collapse; }
.meta-table td { padding: 7px 0; border-bottom: 1px solid var(--border); vertical-align: top; }
.meta-table tr:last-child td { border-bottom: 0; }
.meta-table td:first-child { color: var(--muted); width: 45%; }
.meta-table td:last-child { text-align: right; font-weight: 600; }
.tech-group + .tech-group { margin-top: 12px; }
.tech-group h5 { margin: 0 0 8px; font-size: .78rem; color: var(--faint); text-transform: uppercase; letter-spacing: .06em; }
.tech-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; font-size: .88rem; color: var(--text); text-decoration: none !important; }
.tech-row:hover b { color: var(--brand); }
.tech-row > span:not(.tech-mark) span { color: var(--muted); font-size: .78rem; display: block; font-weight: 400; }
.tech-row .tech-mark { width: 32px; height: 32px; border-radius: 9px; font-size: .72rem; }
.browsers { display: flex; flex-wrap: wrap; gap: 6px; }

.review-summary { display: grid; grid-template-columns: 200px 1fr; gap: 26px; align-items: center; padding: 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); margin-bottom: 18px; }
.review-score { text-align: center; }
.review-score b { font-size: 3rem; font-weight: 800; display: block; line-height: 1; }
.histo-row { display: grid; grid-template-columns: 34px 1fr 40px; gap: 10px; align-items: center; font-size: .82rem; color: var(--muted); }
.histo-bar { height: 8px; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.histo-bar i { display: block; height: 100%; background: var(--star); border-radius: 4px; }
.review { padding: 18px 0; border-bottom: 1px solid var(--border); }
.review-head { display: flex; gap: 12px; align-items: center; margin-bottom: 8px; }
.review-head b { font-size: .95rem; }
.review h4 { margin: 0 0 4px; font-size: 1rem; }
.review p { margin: 0; color: var(--text-2); white-space: pre-line; }
.review-reply { margin-top: 12px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); border-left: 3px solid var(--brand); font-size: .92rem; }
.verified { display: inline-flex; align-items: center; gap: 4px; color: var(--ok); font-size: .76rem; font-weight: 650; }
.star-input { display: inline-flex; flex-direction: row-reverse; gap: 4px; }
.star-input input { position: absolute; opacity: 0; pointer-events: none; }
.star-input label { cursor: pointer; color: var(--border-2); }
.star-input label .ico { width: 30px; height: 30px; }
.star-input label:hover, .star-input label:hover ~ label, .star-input input:checked ~ label { color: var(--star); }
.star-input label:hover .ico, .star-input label:hover ~ label .ico, .star-input input:checked ~ label .ico { fill: var(--star); }
.star-input input:focus-visible + label { outline: 3px solid var(--ring); border-radius: 6px; }

.version { padding: 18px 0; border-bottom: 1px solid var(--border); display: grid; grid-template-columns: 150px 1fr; gap: 20px; }
.version b { font-size: 1.05rem; }
.version .prose { font-size: .94rem; }

/* lightbox */
.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(5, 7, 14, .92); display: none; align-items: center; justify-content: center; padding: 40px 70px; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 10px; box-shadow: 0 30px 80px rgba(0, 0, 0, .6); }
.lightbox button { position: absolute; background: rgba(255, 255, 255, .1); border: 0; color: #fff; width: 46px; height: 46px; border-radius: 50%; cursor: pointer; display: grid; place-items: center; }
.lightbox button:hover { background: rgba(255, 255, 255, .2); }
.lb-close { top: 16px; right: 16px; }
.lb-prev { left: 14px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 14px; top: 50%; transform: translateY(-50%); }
.lb-count { position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); color: #aab0c4; font-size: .86rem; }

/* ---------------------------------------------------------------- preview */
.preview-page { background: #0b0d14; height: 100vh; display: flex; flex-direction: column; overflow: hidden; color: #e8eaf2; }
.preview-bar { height: 58px; display: flex; align-items: center; gap: 14px; padding: 0 16px; background: #10131f; border-bottom: 1px solid #222739; flex: none; }
.preview-bar .logo { color: #fff; font-size: 1rem; }
.preview-bar .logo-mark { width: 28px; height: 28px; border-radius: 8px; }
.preview-title { font-weight: 650; font-size: .92rem; color: #c9cede; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.devices { display: inline-flex; gap: 2px; background: #1a1e2d; border-radius: 10px; padding: 3px; margin: 0 auto; }
.devices button { width: 40px; height: 32px; border-radius: 8px; border: 0; background: none; color: #8f97ae; cursor: pointer; display: grid; place-items: center; }
.devices button.on, .devices button:hover { background: #2a3044; color: #fff; }
.preview-stage { flex: 1; display: flex; justify-content: center; align-items: stretch; padding: 0; overflow: auto; background: #0b0d14; }
.preview-stage iframe { border: 0; width: 100%; height: 100%; background: #fff; transition: width .3s ease; }
.preview-stage.tablet, .preview-stage.mobile { padding: 22px 0; }
.preview-stage.tablet iframe { width: 820px; border-radius: 18px; box-shadow: 0 0 0 10px #1a1e2d, var(--shadow-lg); }
.preview-stage.mobile iframe { width: 390px; border-radius: 28px; box-shadow: 0 0 0 10px #1a1e2d, var(--shadow-lg); }
.preview-bar .btn { height: 36px; font-size: .86rem; }
.preview-bar .btn-ghost { color: #c9cede; }
.preview-bar .btn-ghost:hover { background: #1f2434; color: #fff; }
.preview-app { flex: 1; overflow: auto; display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 40px; padding: 30px clamp(16px, 5vw, 70px); background: radial-gradient(60% 70% at 70% 40%, rgba(91, 91, 246, .25), transparent 70%), #0b0d14; }
.device-frame { position: relative; margin: 0 auto; width: 340px; height: 700px; border-radius: 52px; background: #05060a; padding: 14px; box-shadow: 0 0 0 2px #2c3247, 0 40px 90px -20px rgba(0, 0, 0, .9); }
.device-frame.android { border-radius: 34px; }
.device-frame iframe, .device-frame .screen { width: 100%; height: 100%; border: 0; border-radius: 40px; background: #fff; overflow: hidden; display: block; }
.device-frame.android iframe, .device-frame.android .screen { border-radius: 24px; }
.device-frame::before { content: ""; position: absolute; top: 24px; left: 50%; transform: translateX(-50%); width: 110px; height: 30px; border-radius: 16px; background: #05060a; z-index: 3; }
.device-frame.android::before { width: 14px; height: 14px; border-radius: 50%; top: 24px; }
.screen-slides { position: relative; height: 100%; }
.screen-slides img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; opacity: 0; transition: opacity .4s; }
.screen-slides img.on { opacity: 1; }
.preview-info h1 { color: #fff; font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.5rem); }
.preview-info p { color: #a5adc4; }
.store-badges { display: flex; gap: 10px; flex-wrap: wrap; }
.store-badge { display: inline-flex; align-items: center; gap: 10px; padding: 9px 16px; border-radius: 12px; background: #fff; color: #0b0d14; text-decoration: none !important; font-size: .78rem; line-height: 1.2; }
.store-badge b { display: block; font-size: 1rem; }
.store-badge .ico { width: 26px; height: 26px; }
.qr-box { display: inline-flex; gap: 14px; align-items: center; padding: 12px; border-radius: 14px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1); }
.qr-box svg { width: 96px; height: 96px; border-radius: 8px; }

/* ---------------------------------------------------------------- forms */
.form { display: grid; gap: 16px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.form-grid .full { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label, .label { font-size: .86rem; font-weight: 620; color: var(--text-2); }
.field .hint { font-size: .78rem; color: var(--faint); }
.input, .textarea, select.input {
  width: 100%; min-height: 44px; border-radius: 11px; border: 1px solid var(--border-2); background: var(--surface); color: var(--text);
  padding: 10px 13px; font: inherit; font-size: .95rem; transition: border-color .15s, box-shadow .15s;
}
.textarea { min-height: 120px; resize: vertical; line-height: 1.55; }
.textarea.code { font-family: var(--mono); font-size: .86rem; }
.input:focus, .textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--ring); }
.input-sm { min-height: 36px; padding: 6px 10px; font-size: .88rem; border-radius: 9px; }
select.input { appearance: none; padding-right: 36px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238a93a8' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 13px center; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; color: var(--text-2); cursor: pointer; }
.check input { margin-top: 4px; accent-color: var(--brand); width: 16px; height: 16px; flex: none; }
.input-group { display: flex; }
.input-group .input { border-radius: 11px 0 0 11px; }
.input-group .btn { border-radius: 0 11px 11px 0; height: auto; }
.pw-wrap { position: relative; }
.pw-wrap .input { padding-right: 44px; }
.pw-wrap button { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--faint); cursor: pointer; width: 34px; height: 34px; display: grid; place-items: center; }
.radio-cards { display: grid; gap: 10px; }
.radio-card { display: flex; gap: 14px; align-items: center; padding: 14px 16px; border: 1.5px solid var(--border); border-radius: 14px; cursor: pointer; background: var(--surface); transition: .15s; }
.radio-card:has(input:checked) { border-color: var(--brand); box-shadow: 0 0 0 3px var(--ring); }
.radio-card input { accent-color: var(--brand); }
.radio-card .rc-ico { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; background: var(--surface-3); color: var(--text); flex: none; }
.radio-card b { display: block; }
.radio-card small { color: var(--muted); }
.file-drop { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 24px; border: 2px dashed var(--border-2); border-radius: 14px; background: var(--surface-2); text-align: center; cursor: pointer; color: var(--muted); }
.file-drop:hover { border-color: var(--brand); color: var(--brand); }
.file-drop input { display: none; }

/* ---------------------------------------------------------------- auth */
.auth-wrap { min-height: calc(100vh - var(--header-h)); display: grid; grid-template-columns: 1fr 1fr; }
.auth-side { background: var(--hero-bg); color: #fff; padding: 60px; display: flex; flex-direction: column; justify-content: center; position: relative; overflow: hidden; }
.auth-side::before { content: ""; position: absolute; inset: 0; background: radial-gradient(60% 60% at 20% 20%, rgba(91, 91, 246, .45), transparent 70%), radial-gradient(50% 50% at 90% 90%, rgba(6, 182, 212, .3), transparent 70%); }
.auth-side > * { position: relative; }
.auth-side h2 { color: #fff; font-size: 2rem; }
.auth-side p, .auth-side li { color: #b9c0d6; }
.auth-side ul { list-style: none; padding: 0; display: grid; gap: 12px; margin: 20px 0 0; }
.auth-side li { display: flex; gap: 10px; }
.auth-side li .ico { color: #34d399; margin-top: 4px; }
.auth-main { display: grid; place-items: center; padding: 40px 20px; }
.auth-card { width: 100%; max-width: 420px; }
.auth-card h1 { font-size: 1.8rem; margin-bottom: 6px; }
.demo-accounts { margin-top: 22px; padding: 14px; border-radius: 12px; background: var(--surface-2); border: 1px dashed var(--border-2); font-size: .84rem; }
.demo-accounts button { font: inherit; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 5px 10px; cursor: pointer; color: var(--text-2); margin: 4px 4px 0 0; }
.demo-accounts button:hover { border-color: var(--brand); color: var(--brand); }

/* ---------------------------------------------------------------- cart / checkout */
.steps { display: flex; gap: 8px; align-items: center; margin: 0 0 24px; font-size: .86rem; color: var(--muted); flex-wrap: wrap; }
.steps span { display: inline-flex; align-items: center; gap: 8px; }
.steps i { width: 24px; height: 24px; border-radius: 50%; display: inline-grid; place-items: center; font-style: normal; font-weight: 700; font-size: .76rem; background: var(--surface-3); color: var(--muted); }
.steps .on { color: var(--text); font-weight: 650; }
.steps .on i { background: var(--brand); color: #fff; }
.steps .done i { background: var(--ok); color: #fff; }
.steps .sep { width: 28px; height: 1px; background: var(--border-2); }
.cart-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 28px; align-items: start; padding: 30px 0 64px; }
.cart-line { display: grid; grid-template-columns: 150px 1fr auto; gap: 18px; padding: 18px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); margin-bottom: 12px; align-items: start; }
.cart-line img { border-radius: 10px; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; }
.cart-line h3 { font-size: 1rem; margin: 0 0 4px; }
.cart-line .opts { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 10px; }
.cart-line .opts select { height: 36px; }
.summary { position: sticky; top: calc(var(--header-h) + 16px); }
.sum-row { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; font-size: .94rem; color: var(--text-2); }
.sum-row.total { border-top: 1px solid var(--border); margin-top: 8px; padding-top: 14px; font-size: 1.05rem; color: var(--text); font-weight: 700; }
.sum-row.total b { font-size: 1.5rem; font-weight: 820; }
.sum-row .neg { color: var(--ok); }
.coupon-form { display: flex; gap: 8px; margin: 12px 0; }
.coupon-form .input { min-height: 40px; text-transform: uppercase; }
.coupon-tag { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; border-radius: 10px; background: var(--ok-soft); color: var(--ok); font-weight: 650; font-size: .88rem; margin: 10px 0; }
.mini-line { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); }
.mini-line img { width: 64px; border-radius: 8px; aspect-ratio: 16 / 10; object-fit: cover; }
.mini-line b { font-size: .88rem; display: block; line-height: 1.35; }
.mini-line small { color: var(--muted); }

.pay-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 28px; padding: 30px 0 64px; align-items: start; }
.qr-card { display: grid; grid-template-columns: 280px 1fr; gap: 26px; align-items: center; }
.qr-frame { background: #fff; border-radius: 18px; padding: 14px; border: 1px solid var(--border); text-align: center; }
.qr-frame .pp-head { background: #113566; color: #fff; border-radius: 10px; padding: 8px; font-weight: 800; letter-spacing: .04em; font-size: .9rem; margin-bottom: 8px; }
.qr-frame svg { margin: 0 auto; width: 240px; height: 240px; }
.qr-frame .amt { color: #0b0d14; font-weight: 800; font-size: 1.3rem; margin-top: 6px; }
.big-check { width: 84px; height: 84px; border-radius: 50%; margin: 0 auto 18px; display: grid; place-items: center; background: var(--ok-soft); color: var(--ok); animation: pop .4s; }
.big-check .ico { width: 44px; height: 44px; stroke-width: 2.4; }
.key-box { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); border: 1px dashed var(--border-2); font-family: var(--mono); font-size: .92rem; font-weight: 650; }

/* ---------------------------------------------------------------- account */
.account-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 28px; padding: 30px 0 64px; align-items: start; }
.side-nav { position: sticky; top: calc(var(--header-h) + 16px); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 10px; }
.side-user { display: flex; gap: 12px; align-items: center; padding: 10px 10px 14px; border-bottom: 1px solid var(--border); margin-bottom: 8px; }
.side-user b { display: block; font-size: .94rem; line-height: 1.3; }
.side-user span { font-size: .78rem; color: var(--muted); word-break: break-all; }
.side-nav a { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 10px; color: var(--text-2); font-size: .92rem; font-weight: 560; text-decoration: none !important; }
.side-nav a:hover { background: var(--surface-3); color: var(--text); }
.side-nav a.on { background: var(--brand-soft); color: var(--brand); font-weight: 650; }
.side-nav a .badge { margin-left: auto; }
.side-nav .sep { height: 1px; background: var(--border); margin: 8px 4px; }
.stat-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.stat { padding: 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.stat span { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: .84rem; font-weight: 600; }
.stat b { display: block; font-size: 1.65rem; font-weight: 800; margin-top: 6px; letter-spacing: -.02em; }
.stat small { color: var(--muted); font-size: .8rem; }
.stat .up { color: var(--ok); font-weight: 650; }
.stat .down { color: var(--danger); font-weight: 650; }
.owned-list { display: grid; gap: 12px; }
.owned { display: grid; grid-template-columns: 140px 1fr auto; gap: 18px; align-items: center; padding: 14px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.owned img { border-radius: 10px; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; }
.owned h3 { font-size: 1rem; margin: 0 0 4px; }
.owned .meta { display: flex; gap: 14px; flex-wrap: wrap; font-size: .82rem; color: var(--muted); }
.versions-menu summary { list-style: none; cursor: pointer; }
.versions-menu summary::-webkit-details-marker { display: none; }
.versions-menu[open] .dropdown-menu { display: block; }

/* tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th { text-align: left; font-size: .76rem; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); font-weight: 700; padding: 12px 14px; border-bottom: 1px solid var(--border); background: var(--surface-2); white-space: nowrap; }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--surface-2); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table .thumb { width: 64px; border-radius: 7px; aspect-ratio: 16 / 10; object-fit: cover; }
.table a.strong { font-weight: 650; color: var(--text); }
.table a.strong:hover { color: var(--brand); }
.kv { display: grid; grid-template-columns: 170px 1fr; gap: 8px 16px; font-size: .92rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 560; }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { position: relative; padding: 0 0 16px 22px; font-size: .9rem; }
.timeline li::before { content: ""; position: absolute; left: 5px; top: 7px; width: 9px; height: 9px; border-radius: 50%; background: var(--brand); }
.timeline li::after { content: ""; position: absolute; left: 9px; top: 18px; bottom: 0; width: 1px; background: var(--border); }
.timeline li:last-child::after { display: none; }

.thread { display: flex; flex-direction: column; gap: 14px; }
.msg { max-width: 82%; padding: 14px 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); }
.msg.staff { align-self: flex-start; border-top-left-radius: 4px; background: var(--brand-soft); border-color: transparent; }
.msg.me { align-self: flex-end; border-top-right-radius: 4px; }
.msg header { display: flex; gap: 10px; align-items: center; font-size: .8rem; color: var(--muted); margin-bottom: 6px; }
.msg header b { color: var(--text); }
.msg p { margin: 0; white-space: pre-line; font-size: .94rem; }
.notif { display: flex; gap: 14px; padding: 14px 16px; border-bottom: 1px solid var(--border); color: var(--text); text-decoration: none !important; }
.notif:hover { background: var(--surface-2); }
.notif.unread { background: color-mix(in srgb, var(--brand-soft) 40%, transparent); }
.notif .ico-wrap { width: 38px; height: 38px; border-radius: 10px; background: var(--surface-3); display: grid; place-items: center; color: var(--brand); flex: none; }
.notif b { display: block; font-size: .92rem; }
.notif span { font-size: .84rem; color: var(--muted); }

/* certificate / invoice (printable) */
.doc { max-width: 860px; margin: 30px auto; background: #fff; color: #0f1424; border-radius: 16px; box-shadow: var(--shadow-lg); padding: 48px; }
.doc h1, .doc h2, .doc h3 { color: #0f1424; }
.doc .muted { color: #5d6680; }
.doc-head { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; border-bottom: 2px solid #0f1424; padding-bottom: 18px; margin-bottom: 22px; }
.doc table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.doc th { text-align: left; border-bottom: 1px solid #cfd4e0; padding: 10px 8px; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: #5d6680; }
.doc td { padding: 10px 8px; border-bottom: 1px solid #eceff5; }
.doc .num { text-align: right; white-space: nowrap; }
.doc-totals { margin-left: auto; width: 340px; margin-top: 14px; }
.doc-totals div { display: flex; justify-content: space-between; padding: 6px 8px; }
.doc-totals .grand { border-top: 2px solid #0f1424; font-weight: 800; font-size: 1.15rem; margin-top: 6px; padding-top: 10px; }
.doc-tools { max-width: 860px; margin: 20px auto 0; display: flex; justify-content: space-between; gap: 10px; }
.cert { text-align: center; border: 10px solid transparent; border-image: linear-gradient(120deg, #5b5bf6, #8b5cf6, #06b6d4) 1; padding: 50px 40px; }
.cert h1 { font-size: 2.2rem; letter-spacing: .02em; }
.cert .key { display: inline-block; font-family: var(--mono); font-size: 1.3rem; font-weight: 800; padding: 10px 18px; border-radius: 10px; background: #f1f3f9; margin: 10px 0 20px; letter-spacing: .04em; }
.paid-stamp { display: inline-block; border: 3px solid #0f9f6e; color: #0f9f6e; padding: 4px 14px; border-radius: 8px; font-weight: 800; letter-spacing: .12em; transform: rotate(-6deg); }

/* ---------------------------------------------------------------- footer */
.site-footer { background: var(--surface); border-top: 1px solid var(--border); padding: 56px 0 26px; margin-top: auto; font-size: .9rem; }
.footer-grid { display: grid; grid-template-columns: 1.5fr repeat(4, 1fr); gap: 30px; }
.footer-grid h4 { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); margin: 0 0 12px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.footer-grid a { color: var(--text-2); }
.footer-grid a:hover { color: var(--brand); }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; padding-top: 24px; margin-top: 36px; border-top: 1px solid var(--border); color: var(--muted); font-size: .84rem; flex-wrap: wrap; }
.socials { display: flex; gap: 6px; margin-top: 14px; }
.socials a { width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--border); display: grid; place-items: center; color: var(--text-2); }
.socials a:hover { border-color: var(--brand); color: var(--brand); }
.pay-logos { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.pay-logos span { display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 9px; border: 1px solid var(--border); border-radius: 7px; font-size: .74rem; font-weight: 700; color: var(--text-2); }

/* accordion */
.acc { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.acc details { border-bottom: 1px solid var(--border); }
.acc details:last-child { border-bottom: 0; }
.acc summary { list-style: none; cursor: pointer; padding: 16px 18px; font-weight: 640; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.acc summary::-webkit-details-marker { display: none; }
.acc summary .ico { transition: transform .2s; color: var(--faint); }
.acc details[open] summary .ico { transform: rotate(180deg); }
.acc .acc-body { padding: 0 18px 16px; color: var(--text-2); }

/* license comparison */
.compare { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.compare .panel h3 { margin-bottom: 4px; }
.compare ul { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 9px; font-size: .9rem; }
.compare li { display: flex; gap: 9px; }
.compare li .ico { color: var(--ok); margin-top: 3px; }
.compare li.no .ico { color: var(--faint); }
.compare li.no { color: var(--faint); }
.compare .panel.featured { border-color: var(--brand); box-shadow: 0 0 0 3px var(--ring); }

/* ---------------------------------------------------------------- admin */
.admin-body { background: var(--bg); }
.admin-shell { display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: 100vh; }
.admin-side { background: #0d101b; color: #c7ccdb; position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 16px 12px; display: flex; flex-direction: column; gap: 2px; }
.admin-side .logo { color: #fff; padding: 4px 8px 16px; font-size: 1.05rem; }
.admin-side .logo small { font-size: .66rem; font-weight: 700; color: #8f97ae; background: #1c2131; padding: 2px 7px; border-radius: 6px; letter-spacing: .04em; }
.admin-side h6 { font-size: .68rem; text-transform: uppercase; letter-spacing: .1em; color: #6c7590; margin: 16px 10px 6px; font-weight: 700; }
.admin-side a { display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: 9px; color: #b9bfd1; font-size: .89rem; font-weight: 540; text-decoration: none !important; }
.admin-side a:hover { background: #171b29; color: #fff; }
.admin-side a.on { background: linear-gradient(90deg, rgba(91, 91, 246, .32), rgba(91, 91, 246, .08)); color: #fff; box-shadow: inset 2px 0 0 #7b7bff; }
.admin-side a .badge { margin-left: auto; background: #e11d74; color: #fff; }
.admin-main { min-width: 0; }
.admin-top { height: 62px; display: flex; align-items: center; gap: 14px; padding: 0 26px; background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 30; }
.admin-top h1 { font-size: 1.12rem; margin: 0; }
.admin-content { padding: 26px; }
.admin-menu-btn { display: none; }
.admin-content .panel + .panel { margin-top: 18px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.panel-head h2, .panel-head h3 { margin: 0; font-size: 1.05rem; }
.admin-filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; align-items: center; }
.admin-filters .input { width: auto; min-width: 240px; min-height: 38px; }
.admin-filters select.input { min-width: 160px; }
.chart { width: 100%; height: auto; }
.chart .bar { fill: url(#barGrad); }
.chart .axis { stroke: var(--border); }
.chart text { fill: var(--faint); font-size: 10px; font-family: var(--font); }
.chart .line { fill: none; stroke: var(--brand); stroke-width: 2.5; }
.chart .area { fill: url(#areaGrad); }
.chart .dot { fill: var(--brand); }
.split { display: grid; grid-template-columns: 2fr 1fr; gap: 18px; }
.split-even { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.edit-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; }
.edit-tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 16px; border-bottom: 1px solid var(--border); }
.edit-tabs a { padding: 10px 14px; font-size: .9rem; font-weight: 620; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; text-decoration: none !important; }
.edit-tabs a.on { color: var(--text); border-bottom-color: var(--brand); }
.lang-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.lang-tag { display: inline-block; font-size: .66rem; font-weight: 800; padding: 1px 6px; border-radius: 5px; background: var(--surface-3); color: var(--muted); margin-left: 6px; letter-spacing: .04em; }
.img-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.img-item { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: var(--surface); }
.img-item img { aspect-ratio: 16 / 10; object-fit: cover; object-position: top; width: 100%; }
.img-item.screen img { aspect-ratio: 9 / 19.5; }
.img-item .row { padding: 8px; justify-content: space-between; }
.slip-img { max-height: 420px; border-radius: 10px; border: 1px solid var(--border); }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1180px) {
  .header-search { max-width: 260px; }
  .main-nav .nav-link.opt { display: none; }
}
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .perks { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr 1fr; }
  .footer-grid > :first-child { grid-column: 1 / -1; }
  .item-layout, .cart-layout, .pay-layout { grid-template-columns: minmax(0, 1fr); }
  .buy-box, .summary { position: static; }
  .platform-band, .wallet-band, .cta-band { grid-template-columns: 1fr; }
  .phones { height: 380px; }
  .review-cards { grid-template-columns: 1fr 1fr; }
  .admin-shell { grid-template-columns: 1fr; }
  .admin-side { position: fixed; left: 0; top: 0; z-index: 120; width: 260px; transform: translateX(-100%); transition: transform .2s; }
  .admin-side.open { transform: none; }
  .admin-menu-btn { display: inline-flex; }
  .split, .edit-layout { grid-template-columns: 1fr; }
  .stat-tiles { grid-template-columns: repeat(2, 1fr); }
  .preview-app { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .main-nav, .header-search, .seg-wrap { display: none; }
  .menu-toggle { display: inline-flex; }
  .browse { grid-template-columns: 1fr; }
  .filters { position: fixed; inset: 0 auto 0 0; width: min(340px, 90vw); z-index: 110; background: var(--bg); padding: 16px; max-height: none; transform: translateX(-105%); transition: transform .2s; box-shadow: var(--shadow-lg); }
  .filters.open { transform: none; }
  .filters-toggle { display: inline-flex; }
  .account-layout { grid-template-columns: 1fr; }
  .side-nav { position: static; display: flex; overflow-x: auto; gap: 4px; padding: 6px; }
  .side-nav .side-user, .side-nav .sep { display: none; }
  .side-nav a { white-space: nowrap; }
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-side { display: none; }
  .compare { grid-template-columns: 1fr; }
  .qr-card { grid-template-columns: 1fr; }
  .version { grid-template-columns: 1fr; gap: 6px; }
  .review-summary { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 14.5px; }
  .container { padding: 0 16px; }
  .grid-4, .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .grid-2 { grid-template-columns: 1fr; }
  .pcard-body { padding: 10px 12px 12px; }
  .pcard-tagline { display: none; }
  .pcard-title { font-size: .9rem; }
  .price { font-size: .95rem; }
  .tiles { grid-template-columns: 1fr; }
  .perks { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero { padding: calc(var(--header-h) + 36px) 0 48px; }
  .hero-search input { padding-right: 16px; height: 54px; }
  .hero-search .btn { display: none; }
  .highlights { grid-template-columns: 1fr; }
  .cart-line { grid-template-columns: 90px 1fr; }
  .cart-line > :last-child { grid-column: 1 / -1; }
  .owned { grid-template-columns: 90px 1fr; }
  .owned > :last-child { grid-column: 1 / -1; }
  .form-grid, .lang-pair { grid-template-columns: 1fr; }
  .deal-card { grid-template-columns: 110px 1fr; }
  .review-cards { grid-template-columns: 1fr; }
  .stat-tiles { grid-template-columns: 1fr 1fr; }
  .phones .phone { width: 150px; }
  .phones { height: 330px; }
  .doc { padding: 24px; border-radius: 0; margin: 0; }
  .doc-totals { width: 100%; }
  .admin-content { padding: 16px; }
  .kv { grid-template-columns: 1fr; gap: 2px 0; }
  .kv dd { margin-bottom: 8px; }
  .device-frame { width: 300px; height: 620px; }
  .preview-bar .preview-title { display: none; }
  .platform-cards { grid-template-columns: 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media print {
  .site-header, .site-footer, .announce, .demo-bar, .doc-tools, .flash-wrap, .no-print { display: none !important; }
  body { background: #fff; }
  .doc { box-shadow: none; margin: 0; padding: 0; max-width: none; }
}

/* ---------------------------------------------------------------- fixes after the first visual review */
.on-hero .btn-ghost { color: #e6e8f2; }
.on-hero .btn-ghost:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.tile .tile-ico, .mega-cat .mc-ico { display: grid; place-items: center; font-size: 1rem; color: var(--brand); line-height: 1; }
.tile .tile-ico .ico { width: 22px; height: 22px; }
.mega-cat .mc-ico .ico { width: 18px; height: 18px; }
.pcard-top { position: relative; }
.pcard-badges { top: auto; bottom: 10px; }
.pcard:hover .pcard-badges, .pcard:focus-within .pcard-badges { opacity: 0; transition: opacity .2s; }
.trust.panel { padding: 16px 20px; margin-top: 14px; }
.table .mono { white-space: nowrap; }
.table .thumb { min-width: 64px; height: 40px; max-width: none; display: block; }
.drawer-auth { display: none; gap: 8px; margin-top: 12px; }
.drawer-auth .btn { flex: 1; }
@media (max-width: 640px) {
  .header-actions .btn-primary, .header-actions .btn-ghost, .header-actions [data-theme-toggle] { display: none; }
  .drawer-auth { display: flex; }
}
@media (max-width: 640px) {
  .phones .phone { width: 124px; }
  .phones .phone:nth-child(1) { left: 2%; }
  .phones .phone:nth-child(2) { left: 50%; margin-left: -62px; }
  .phones .phone:nth-child(3) { left: auto; right: 2%; }
}
