/* MiniBox site. Same Material 3 roles as the app (src/theme/tokens.ts), light and dark by system setting. */

@font-face { font-family: "Inter"; font-weight: 400; font-style: normal; font-display: swap; src: url("/fonts/inter-400.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 500; font-style: normal; font-display: swap; src: url("/fonts/inter-500.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; font-style: normal; font-display: swap; src: url("/fonts/inter-600.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 700; font-style: normal; font-display: swap; src: url("/fonts/inter-700.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 800; font-style: normal; font-display: swap; src: url("/fonts/inter-800.woff2") format("woff2"); }

:root {
  color-scheme: light dark;

  --bg: #fdf8ff;
  --surface-low: #f8f1ff;
  --surface: #f2ebfa;
  --surface-high: #ece5f5;
  --on: #1d1a26;
  --on-var: #49454f;
  --outline: #7a7586;
  --outline-var: #cbc4d6;
  --primary: #6440d0;
  --on-primary: #ffffff;
  --primary-c: #e8deff;
  --on-primary-c: #20005f;
  --tertiary-c: #aaedff;
  --on-tertiary-c: #001f26;
  --glow-a: rgba(100, 64, 208, 0.16);
  --glow-b: rgba(0, 104, 122, 0.12);
  --shadow: 0 24px 60px -24px rgba(60, 30, 140, 0.35);

  --games-bg: #e8deff; --games-fg: #4a2db0;
  --fun-bg: #ffd9e3; --fun-fg: #93244f;
  --luck-bg: #ffe0a6; --luck-fg: #6b4700;
  --utils-bg: #bcf2d1; --utils-fg: #0d5c3a;
  --math-bg: #d8e4ff; --math-fg: #0d4a9c;
  --code-bg: #bcebff; --code-fg: #00505f;

  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --maxw: 1120px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #110d1f;
    --surface-low: #191527;
    --surface: #1e1a2d;
    --surface-high: #282438;
    --on: #e8e0f4;
    --on-var: #cac3da;
    --outline: #948ea4;
    --outline-var: #48445a;
    --primary: #cbbeff;
    --on-primary: #2e1a7a;
    --primary-c: #4b35a9;
    --on-primary-c: #e8deff;
    --tertiary-c: #004e5b;
    --on-tertiary-c: #a8edff;
    --glow-a: rgba(117, 80, 255, 0.28);
    --glow-b: rgba(92, 216, 242, 0.1);
    --shadow: 0 28px 70px -26px rgba(0, 0, 0, 0.85);

    --games-bg: #3b2a86; --games-fg: #d9ccff;
    --fun-bg: #5a1838; --fun-fg: #ffb1cb;
    --luck-bg: #4d3800; --luck-fg: #ffd47a;
    --utils-bg: #0b4a2f; --utils-fg: #92e3b6;
    --math-bg: #0f3a73; --math-fg: #aecbff;
    --code-bg: #004b58; --code-fg: #8be3f5;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--on);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  font-feature-settings: "calt", "kern";
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
figure { margin: 0; }
a { color: var(--primary); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
p { margin: 0 0 1em; }
ul { margin: 0; padding-left: 1.25em; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.i { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.skip { position: absolute; left: 12px; top: -64px; z-index: 100; background: var(--primary); color: var(--on-primary); padding: 10px 16px; border-radius: 999px; font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }

.wrap { width: min(100% - 40px, var(--maxw)); margin-inline: auto; }

/* Header */
.top {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--outline-var);
}
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--on); text-decoration: none; font-weight: 800; font-size: 1.25rem; letter-spacing: -0.02em; }
.brand img { width: 40px; height: 40px; border-radius: 12px; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a { color: var(--on-var); text-decoration: none; font-weight: 600; font-size: 0.95rem; padding: 10px 14px; border-radius: 999px; }
.nav a:hover { background: var(--surface); color: var(--on); }
.nav a[aria-current="page"] { color: var(--on-primary-c); background: var(--primary-c); }

/* Buttons and chips */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 26px; border-radius: 999px; font: inherit; font-weight: 700; text-decoration: none; border: 0; cursor: pointer; }
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-tonal { background: var(--primary-c); color: var(--on-primary-c); }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px; background: var(--tertiary-c); color: var(--on-tertiary-c); font-size: 0.78rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }

/* Hero */
.hero { position: relative; overflow: clip; padding: 72px 0 40px; }
.hero::before {
  content: ""; position: absolute; inset: -20% -10% auto; height: 120%; z-index: -1;
  background:
    radial-gradient(48% 50% at 78% 22%, var(--glow-a), transparent 70%),
    radial-gradient(40% 40% at 12% 8%, var(--glow-b), transparent 70%);
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(2.5rem, 1.5rem + 3.6vw, 4rem); font-weight: 800; letter-spacing: -0.035em; margin: 22px 0 20px; }
.hero h1 em { font-style: normal; color: var(--primary); }
.lead { font-size: clamp(1.1rem, 1rem + 0.5vw, 1.3rem); color: var(--on-var); max-width: 34em; margin-bottom: 30px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.fine { font-size: 0.9rem; color: var(--on-var); margin: 18px 0 0; }

/* Phones */
.phones { display: flex; justify-content: center; align-items: flex-end; gap: 0; min-height: 520px; width: 100%; }
.phone {
  flex: none; width: 33%; padding: 6px; border-radius: 36px;
  background: linear-gradient(160deg, #3a3350, #0d0a18);
  box-shadow: var(--shadow), inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}
.phone img { border-radius: 30px; width: 100%; aspect-ratio: 520 / 1125; object-fit: cover; object-position: top; background: var(--surface); }
.phone-mid { width: 40%; z-index: 2; margin-inline: -6%; margin-bottom: 40px; }
.phone-l { transform: rotate(-5deg) translateY(10px); }
.phone-r { transform: rotate(5deg) translateY(10px); }

/* Sections */
.section { padding: 84px 0; }
.section-tight { padding-top: 24px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; color: var(--primary); font-weight: 800; font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 14px; }
.section h2 { font-size: clamp(1.9rem, 1.3rem + 2.2vw, 2.9rem); font-weight: 800; letter-spacing: -0.03em; margin-bottom: 16px; max-width: 18em; }
.section .sub { color: var(--on-var); font-size: 1.15rem; max-width: 40em; margin-bottom: 40px; }

.cards { display: grid; gap: 18px; grid-template-columns: repeat(3, 1fr); }
.card { background: var(--surface-low); border: 1px solid var(--outline-var); border-radius: var(--radius-xl); padding: 28px; }
.card h3 { font-size: 1.2rem; font-weight: 700; margin: 18px 0 8px; letter-spacing: -0.01em; }
.card p { margin: 0; color: var(--on-var); font-size: 1rem; }
.tile { display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; font-size: 1.5rem; background: var(--primary-c); color: var(--on-primary-c); }
.tile.games { background: var(--games-bg); color: var(--games-fg); }
.tile.fun { background: var(--fun-bg); color: var(--fun-fg); }
.tile.luck { background: var(--luck-bg); color: var(--luck-fg); }
.tile.utils { background: var(--utils-bg); color: var(--utils-fg); }
.tile.math { background: var(--math-bg); color: var(--math-fg); }
.tile.code { background: var(--code-bg); color: var(--code-fg); }

.cat { display: flex; flex-direction: column; gap: 10px; }
.cat .count { margin-left: auto; font-weight: 800; font-size: 1.6rem; letter-spacing: -0.03em; color: var(--on); }
.cat-head { display: flex; align-items: center; gap: 14px; }
.cat-head h3 { margin: 0; }
.cat p { font-size: 0.97rem; }

/* Highlight band */
.band { background: linear-gradient(135deg, var(--primary-c), var(--surface)); border: 1px solid var(--outline-var); border-radius: 36px; padding: clamp(28px, 5vw, 56px); display: grid; grid-template-columns: 1.2fr 1fr; gap: 36px; align-items: center; }
.band h2 { margin-bottom: 12px; }
.band p { color: var(--on-primary-c); opacity: 0.92; }
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.ticks li { display: flex; gap: 12px; align-items: flex-start; font-weight: 600; color: var(--on); }
.ticks .i { margin-top: 3px; color: var(--primary); }

/* Stores */
.stores { display: grid; gap: 18px; grid-template-columns: repeat(2, 1fr); max-width: 760px; }
.store-card { background: var(--surface-low); border: 1px solid var(--outline-var); border-radius: var(--radius-xl); padding: 26px; display: flex; flex-direction: column; gap: 16px; min-height: 168px; }
.store-card h3 { font-size: 1.15rem; font-weight: 700; }
.store-card p { color: var(--on-var); font-size: 0.95rem; margin: 0; }
.store-slot { margin-top: auto; }
.store-slot img { height: 58px; width: auto; }
.soon { display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 22px; border-radius: 999px; border: 1.5px dashed var(--outline); color: var(--on-var); font-weight: 700; }
.soon .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--primary); }

/* FAQ */
.faq { display: grid; gap: 12px; max-width: 820px; }
details { background: var(--surface-low); border: 1px solid var(--outline-var); border-radius: var(--radius-lg); }
summary { cursor: pointer; list-style: none; padding: 20px 24px; font-weight: 700; display: flex; justify-content: space-between; gap: 16px; align-items: center; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-size: 1.5rem; line-height: 1; color: var(--primary); font-weight: 600; }
details[open] summary::after { content: "–"; }
details .answer { padding: 0 24px 22px; color: var(--on-var); }
details .answer p:last-child { margin-bottom: 0; }

/* Footer */
.foot { border-top: 1px solid var(--outline-var); padding: 44px 0 56px; color: var(--on-var); font-size: 0.95rem; }
.foot-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 28px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.foot a { color: var(--on-var); }
.foot a:hover { color: var(--primary); }
.legal { margin-top: 26px; font-size: 0.82rem; opacity: 0.85; max-width: 62em; }

/* Privacy policy */
.doc-hero { padding: 64px 0 20px; position: relative; overflow: clip; }
.doc-hero::before { content: ""; position: absolute; inset: -40% -10% auto; height: 150%; z-index: -1; background: radial-gradient(45% 50% at 80% 20%, var(--glow-a), transparent 70%); }
.doc-hero h1 { font-size: clamp(2.1rem, 1.3rem + 3.6vw, 3.4rem); font-weight: 800; letter-spacing: -0.035em; margin: 18px 0 14px; }
.meta { color: var(--on-var); font-size: 0.95rem; }
.summary { display: grid; gap: 16px; grid-template-columns: repeat(3, 1fr); margin: 34px 0 20px; }
.summary .card { padding: 22px; border-radius: var(--radius-lg); }
.summary h3 { font-size: 1.02rem; margin: 14px 0 6px; }
.summary p { font-size: 0.93rem; }
.doc-grid { display: grid; grid-template-columns: 250px minmax(0, 760px); gap: 56px; align-items: start; padding: 40px 0 90px; }
.toc { position: sticky; top: 92px; font-size: 0.93rem; }
.toc strong { display: block; font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--on-var); margin-bottom: 12px; }
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; counter-reset: toc; }
.toc a { display: block; padding: 7px 12px; border-radius: 10px; color: var(--on-var); text-decoration: none; counter-increment: toc; }
.toc a::before { content: counter(toc) ". "; opacity: 0.6; }
.toc a:hover { background: var(--surface); color: var(--on); }
.doc { counter-reset: sec; }
.doc section { padding-top: 8px; margin-bottom: 44px; counter-increment: sec; }
.doc h2 { font-size: 1.55rem; font-weight: 800; letter-spacing: -0.025em; margin: 0 0 14px; }
.doc h2::before { content: counter(sec) ". "; color: var(--primary); }
.doc h3 { font-size: 1.08rem; font-weight: 700; margin: 24px 0 8px; letter-spacing: -0.01em; }
.doc ul { display: grid; gap: 8px; margin: 0 0 1em; }
.doc li::marker { color: var(--primary); }
.doc strong { font-weight: 700; }
.callout { background: var(--primary-c); color: var(--on-primary-c); border-radius: var(--radius-lg); padding: 18px 22px; margin: 18px 0; font-weight: 500; }
.callout p:last-child { margin-bottom: 0; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; border: 1px solid var(--outline-var); border-radius: var(--radius-lg); overflow: hidden; font-size: 0.97rem; margin: 14px 0 22px; }
.table th, .table td { text-align: left; padding: 14px 18px; vertical-align: top; border-bottom: 1px solid var(--outline-var); }
.table tr:last-child th, .table tr:last-child td { border-bottom: 0; }
.table th { width: 32%; background: var(--surface-low); font-weight: 700; }

/* 404 */
.center { min-height: 70vh; display: grid; place-items: center; text-align: center; padding: 60px 0; }
.center img { margin-inline: auto; width: 96px; height: 96px; border-radius: 28px; }

/* Responsive */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; gap: 24px; }
  .phones { min-height: 0; padding-top: 12px; }
  .phone-l, .phone-r { display: none; }
  .phone-mid { margin: 0; width: min(300px, 78vw); }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .band { grid-template-columns: 1fr; }
  .summary { grid-template-columns: repeat(2, 1fr); }
  .doc-grid { grid-template-columns: 1fr; gap: 12px; }
  .toc { position: static; background: var(--surface-low); border: 1px solid var(--outline-var); border-radius: var(--radius-lg); padding: 16px 18px; margin-bottom: 18px; }
  .toc ol { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .wrap { width: min(100% - 32px, var(--maxw)); }
  .hero { padding-top: 40px; }
  .section { padding: 60px 0; }
  .cards, .summary, .stores { grid-template-columns: 1fr; }
  .nav a:not([aria-current]) { display: none; }
  .nav a.keep { display: inline-block; }
  .toc ol { grid-template-columns: 1fr; }
  .table th { width: auto; }
  .table, .table tbody, .table tr, .table th, .table td { display: block; width: 100%; }
  .table th { border-bottom: 0; padding-bottom: 4px; }
}

@media (prefers-reduced-motion: no-preference) {
  .phone-mid { animation: float 7s ease-in-out infinite; }
  @keyframes float { 50% { transform: translateY(-10px); } }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

@media print {
  .top, .foot nav, .toc, .skip { display: none; }
  body { background: #fff; color: #000; font-size: 11pt; }
  a { color: #000; }
}
