/* Fekrkhan design system (DESIGN_SYSTEM.md): Vibrant & Block-based + Persian typography */

@font-face {
  font-family: "Vazirmatn";
  src: url("fonts/vazirmatn.f6d31671339d.woff2") format("woff2-variations"), url("fonts/vazirmatn.f6d31671339d.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Estedad";
  src: url("fonts/estedad.284743ae983a.ttf") format("truetype-variations"), url("fonts/estedad.284743ae983a.ttf") format("truetype");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --primary: #4f46e5;
  --on-primary: #ffffff;
  --primary-deep: #3730a3;
  --accent: #f59e0b;
  --on-accent: #1e1b4b;
  --accent-deep: #b45309;
  --accent-soft: #fef3c7;
  --on-accent-soft: #78350f;
  --hero-start: #4f46e5;
  --hero-end: #7c3aed;
  --bg: #f4f3ff;
  --surface: #ffffff;
  --surface-variant: #edebfb;
  --ink: #1e1b4b;
  --muted: #5b5675;
  --outline: #e4e1f5;
  --success: #047857;
  --success-bg: #d1fae5;
  --miss: #b91c1c;
  --miss-bg: #fee2e2;
  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --font-display: "Estedad", "Vazirmatn", "Noto Sans Arabic", Tahoma, sans-serif;
  --font-body: "Vazirmatn", "Noto Sans Arabic", Tahoma, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --primary: #8b85ff;
    --on-primary: #14112b;
    --primary-deep: #5b54e0;
    --accent: #fbbf24;
    --accent-deep: #d97706;
    --accent-soft: #4a3a0d;
    --on-accent-soft: #fef3c7;
    --hero-start: #3b34b8;
    --hero-end: #6d28d9;
    --bg: #0f0d1f;
    --surface: #1b1832;
    --surface-variant: #26223f;
    --ink: #eeedfc;
    --muted: #a9a5c7;
    --outline: #2e2a4a;
    --success: #34d399;
    --success-bg: #0b3b2c;
    --miss: #fca5a5;
    --miss-bg: #451a1a;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.9; /* Persian body: 1.8–2.0 */
  letter-spacing: 0; /* never letter-spacing on Persian */
  -webkit-tap-highlight-color: transparent;
}
.shell { max-width: 520px; margin-inline: auto; padding: 12px 16px 48px; min-height: 100svh; }

h1, h2, .display { font-family: var(--font-display); line-height: 1.4; margin: 0; }
h1 { font-size: 28px; font-weight: 800; }
h2 { font-size: 20px; font-weight: 700; }
p { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.stack { display: grid; gap: 12px; }
.center { text-align: center; }
.icon { width: 1.25em; height: 1.25em; flex: none; }
[dir="rtl"] .icon-dir { transform: scaleX(-1); } /* directional icons (send) */
:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; border-radius: 8px; }

/* Header */
.topbar { display: flex; align-items: center; gap: 12px; padding: 8px 0 16px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); margin-inline-end: auto; }
.topnav { display: none; gap: 4px; }
.topnav a { color: var(--muted); text-decoration: none; font-weight: 700; font-size: 15px; padding: 8px 12px; border-radius: 10px; }
.topnav a:hover { background: var(--surface-variant); color: var(--ink); }
.nav-cta {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 12px; font-weight: 700; font-size: 14px;
  background: var(--primary); color: var(--on-primary); text-decoration: none; box-shadow: 0 3px 0 var(--primary-deep);
}
.nav-cta .icon { width: 18px; height: 18px; }
.brand-mark { width: 36px; height: 36px; border-radius: 11px; display: block; object-fit: cover; }
.brand-mark .icon { width: 20px; height: 20px; }
.brand-name { font-family: var(--font-display); font-weight: 800; font-size: 20px; }

/* Blocks */
.hero {
  background: linear-gradient(135deg, var(--hero-start), var(--hero-end));
  color: #fff; border-radius: var(--radius-xl); padding: 28px 24px; margin-bottom: 16px;
}
.hero .muted { color: rgba(255, 255, 255, .85); }
.card {
  background: var(--surface); border: 1px solid var(--outline);
  border-radius: var(--radius-lg); padding: 20px; margin-bottom: 14px;
}
.card.soft-accent { background: var(--accent-soft); border-color: transparent; color: var(--on-accent-soft); }
.avatar {
  width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center;
  background: #fff; color: var(--primary); font-family: var(--font-display); font-weight: 800; font-size: 30px;
  margin-bottom: 16px;
}
.avatar.sm { width: 32px; height: 32px; font-size: 15px; margin: 0; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 99px;
  background: rgba(255, 255, 255, .16); font-size: 14px; font-weight: 700;
}
.pill .icon { width: 16px; height: 16px; }
.icon-tile {
  width: 96px; height: 96px; border-radius: var(--radius-xl); display: grid; place-items: center;
  background: color-mix(in srgb, var(--primary) 12%, transparent); color: var(--primary); margin: 8px auto 20px;
}
.icon-tile .icon { width: 48px; height: 48px; }

/* Pressable buttons: face on a darker edge; on press it drops onto the edge (no layout shift) */
.btn {
  --face: var(--primary); --edge: var(--primary-deep); --fg: var(--on-primary);
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; min-height: 56px; padding: 12px 20px; margin-bottom: 4px;
  border: 0; border-radius: var(--radius-md); background: var(--face); color: var(--fg);
  box-shadow: 0 4px 0 var(--edge);
  font: 700 16px/1.5 var(--font-body); letter-spacing: 0; text-decoration: none; cursor: pointer;
  transition: transform 90ms ease-out, box-shadow 90ms ease-out;
}
.btn:active:not([disabled]) { transform: translateY(4px); box-shadow: 0 0 0 var(--edge); }
.btn.accent { --face: var(--accent); --edge: var(--accent-deep); --fg: var(--on-accent); }
.btn.neutral { --face: var(--surface); --edge: var(--outline); --fg: var(--primary); border: 2px solid var(--outline); }
.btn[disabled] { --face: var(--surface-variant); --edge: var(--outline); --fg: var(--muted); cursor: default; }
.btn.link {
  background: none; box-shadow: none; color: var(--muted); min-height: 44px; font-weight: 500; font-size: 14px;
}
.btn.link:active { transform: none; }

/* Form field: visible label (not placeholder-only) */
.field { display: grid; gap: 6px; margin: 4px 0 8px; }
.field label { font-size: 14px; font-weight: 700; color: var(--muted); }
.field input, .field select, .field textarea {
  font: 16px/1.8 var(--font-body); color: var(--ink); background: var(--surface);
  border: 2px solid var(--outline); border-radius: var(--radius-md); padding: 12px 14px; width: 100%;
  text-align: start;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--primary); }

/* Question */
.progress { display: flex; gap: 4px; margin-bottom: 8px; }
.progress span { flex: 1; height: 6px; border-radius: 99px; background: var(--outline); transition: background .2s; }
.progress span.on { background: var(--primary); }
.q-count { font-size: 14px; font-weight: 700; color: var(--muted); margin-bottom: 12px; }
.q-hero { padding: 20px; }
.q-hero .q-who { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 700; }
.q-hero .question-text { font-family: var(--font-display); font-weight: 800; font-size: 22px; line-height: 1.5; margin-top: 14px; overflow-wrap: anywhere; }
.options { display: grid; gap: 10px; margin-top: 4px; }
.option {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 60px; padding: 10px 12px;
  text-align: start; border-radius: var(--radius-md); border: 2px solid var(--outline);
  background: var(--surface); color: var(--ink); font: 16px/1.7 var(--font-body); cursor: pointer;
  overflow-wrap: anywhere; transition: background .16s, border-color .16s, color .16s;
}
.option:hover { border-color: var(--primary); }
.option .badge {
  width: 36px; height: 36px; flex: none; display: grid; place-items: center; border-radius: var(--radius-sm);
  background: var(--surface-variant); color: var(--primary); font-weight: 700; font-size: 14px;
}
.option.selected { background: var(--primary); border-color: var(--primary); color: var(--on-primary); font-weight: 700; }
.option.selected .badge { background: rgba(255, 255, 255, .2); color: var(--on-primary); }
.nav-row { display: flex; justify-content: space-between; margin-top: 12px; gap: 8px; }
.nav-row .btn { width: auto; }

/* Review */
.review { list-style: none; padding: 0; margin: 16px 0; display: grid; gap: 8px; }
.review li {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: var(--radius-md); background: var(--surface); border: 1px solid var(--outline);
}
.review .q { font-size: 13px; color: var(--muted); }
.review .a { font-weight: 700; }
.review button { background: none; border: 0; color: var(--primary); font: 700 14px var(--font-body); cursor: pointer; min-height: 44px; }

/* Result */
.score-ring {
  --size: 168px; width: var(--size); height: var(--size); margin: 12px auto; border-radius: 50%;
  background: conic-gradient(var(--accent) calc(var(--p) * 1%), rgba(255, 255, 255, .22) 0);
  display: grid; place-items: center;
}
.score-ring::before {
  content: ""; grid-area: 1/1; width: 136px; height: 136px; border-radius: 50%;
  background: linear-gradient(135deg, var(--hero-start), var(--hero-end));
}
.score-num { grid-area: 1/1; z-index: 1; font-family: var(--font-display); font-size: 38px; font-weight: 900; }
.breakdown { padding: 0; margin: 12px 0 0; list-style: none; display: grid; gap: 10px; }
.breakdown li { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: var(--radius-lg); }
.breakdown li.ok { background: var(--success-bg); }
.breakdown li.miss { background: var(--miss-bg); }
.breakdown .mark { width: 28px; height: 28px; flex: none; border-radius: 50%; display: grid; place-items: center; color: #fff; }
.breakdown li.ok .mark { background: var(--success); }
.breakdown li.miss .mark { background: var(--miss); }
.breakdown .mark .icon { width: 18px; height: 18px; }
.breakdown .q { font-weight: 700; }
.breakdown li.ok .yours { color: var(--success); }
.breakdown li.miss .yours { color: var(--miss); }
.cta-row { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; }
.cta-row .chip {
  width: 44px; height: 44px; flex: none; border-radius: var(--radius-sm); display: grid; place-items: center;
  background: var(--accent); color: var(--on-accent);
}

.toast {
  position: fixed; inset-inline: 16px; bottom: 20px; margin-inline: auto; max-width: 480px;
  background: var(--ink); color: var(--bg); padding: 12px 16px; border-radius: var(--radius-md);
  text-align: center; font-size: 15px; z-index: 10;
}
dialog {
  border: 0; border-radius: var(--radius-lg); padding: 20px; max-width: 420px; width: calc(100% - 32px);
  background: var(--surface); color: var(--ink);
}
dialog::backdrop { background: rgba(10, 5, 25, .55); }
.story-dialog { max-width: 380px; text-align: center; }
.story-dialog h2 { margin: 0 0 12px; }
.story-frame {
  width: 78%; margin: 0 auto 16px; aspect-ratio: 9 / 16; border-radius: 18px; overflow: hidden;
  background: linear-gradient(135deg, var(--hero-start), var(--hero-end));
}
.story-preview { display: block; width: 100%; height: 100%; object-fit: cover; }
.spinner { width: 22px; height: 22px; border: 3px solid currentColor; border-inline-end-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ============ Landing / get-app ============ */
.shell.wide { max-width: 1120px; }
.landing-hero {
  display: grid; gap: 32px; align-items: center; padding: 16px 0 40px;
}
.eyebrow-pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 99px; font-size: 14px; font-weight: 700;
  background: color-mix(in srgb, var(--primary) 12%, transparent); color: var(--primary);
}
.eyebrow-pill .icon { width: 16px; height: 16px; }
.hero-title { font-size: clamp(36px, 7vw, 60px); font-weight: 900; line-height: 1.35; margin: 16px 0 12px; }
.hero-title .hl {
  background: linear-gradient(135deg, var(--hero-start), var(--hero-end)); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-lead { font-size: 18px; color: var(--muted); max-width: 560px; margin-bottom: 24px; }
.hero-points { list-style: none; padding: 0; margin: 20px 0 0; display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--muted); font-size: 15px; }
.hero-points li { display: inline-flex; align-items: center; gap: 6px; }
.hero-points .icon { color: var(--success); width: 18px; height: 18px; }
.note { display: flex; gap: 8px; align-items: flex-start; color: var(--muted); font-size: 14px; margin-top: 16px; max-width: 560px; }
.note .icon { color: var(--primary); margin-top: 4px; }

.hero-visual { position: relative; display: flex; justify-content: center; align-items: center; min-height: 460px; }
.hero-visual::before {
  content: ""; position: absolute; inset: 8% 6%; border-radius: 48px; z-index: 0;
  background: linear-gradient(135deg, var(--hero-start), var(--hero-end)); opacity: .14;
}
.phone {
  position: relative; z-index: 1; width: 230px; aspect-ratio: 9 / 20; border-radius: 34px; overflow: hidden;
  background: var(--surface); border: 8px solid #14112b; box-shadow: 0 24px 60px rgba(30, 27, 75, .28);
}
.phone img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.phone.tilt-start { transform: rotate(4deg) translateX(18px); }
.phone.tilt-end { transform: rotate(-4deg) translateX(-18px) translateY(36px); }
.float-chip {
  position: absolute; z-index: 2; display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 14px;
  background: var(--surface); color: var(--ink); font-weight: 700; font-size: 14px; box-shadow: 0 10px 30px rgba(30, 27, 75, .18);
}
.float-chip .icon { color: var(--accent-deep); }
.chip-a { inset-block-start: 10%; inset-inline-start: 2%; }
.chip-b { inset-block-end: 8%; inset-inline-end: 0; }

/* Download buttons */
.download-group { display: grid; gap: 10px; max-width: 460px; }
.store-btn {
  position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 16px; min-height: 60px; border-radius: var(--radius-md);
  background: var(--surface); border: 2px solid var(--outline); color: var(--ink); text-decoration: none; box-shadow: 0 4px 0 var(--outline);
  transition: transform 90ms ease-out, box-shadow 90ms ease-out;
}
.store-btn:active:not(.is-soon) { transform: translateY(4px); box-shadow: none; }
.store-btn .icon { width: 28px; height: 28px; flex: none; }
.store-btn span { display: grid; line-height: 1.5; }
.store-btn small { font-size: 12px; color: var(--muted); }
.store-btn strong { font-size: 16px; }
.store-btn.primary { background: var(--primary); border-color: var(--primary); color: var(--on-primary); box-shadow: 0 4px 0 var(--primary-deep); }
.store-btn.primary small { color: color-mix(in srgb, var(--on-primary) 80%, transparent); }
.store-btn .store-meta { margin-inline-start: auto; font-size: 13px; font-weight: 700; opacity: .85; }
.store-btn.is-soon { opacity: .7; cursor: default; box-shadow: none; }
.store-btn.primary.is-soon { background: var(--surface-variant); border-color: var(--outline); color: var(--ink); opacity: 1; }
.store-btn.primary.is-soon small { color: var(--muted); }
.soon-tag {
  position: absolute; inset-block-start: -10px; inset-inline-end: 10px; padding: 0 8px; border-radius: 99px;
  background: var(--accent); color: var(--on-accent); font-size: 11px; font-weight: 800; line-height: 1.8;
}

/* Sections */
.section { padding: 48px 0 8px; }
.section.narrow { max-width: 760px; margin-inline: auto; }
.section-head { text-align: center; margin-bottom: 28px; }
.section-head h2 { font-size: clamp(24px, 4vw, 32px); font-weight: 900; }
.section-head p { margin-top: 6px; }

.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
.step { position: relative; background: var(--surface); border: 1px solid var(--outline); border-radius: var(--radius-lg); padding: 24px; }
.step h3 { font-family: var(--font-display); font-size: 22px; font-weight: 800; margin: 14px 0 6px; }
.step p { color: var(--muted); }
.step-num {
  position: absolute; inset-block-start: 18px; inset-inline-end: 22px; font-family: var(--font-display); font-weight: 900;
  font-size: 44px; line-height: 1; color: var(--outline);
}
.step-icon, .feature-icon { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; color: #fff; }
.step-icon .icon, .feature-icon .icon { width: 26px; height: 26px; }
.c-indigo { background: #4f46e5; } .c-gold { background: #d97706; } .c-green { background: #059669; }
.c-pink { background: #db2777; } .c-sky { background: #0284c7; } .c-violet { background: #7c3aed; }

.shots {
  display: grid; grid-auto-flow: column; grid-auto-columns: min(62%, 230px); gap: 18px; overflow-x: auto; padding: 8px 4px 20px;
  scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
}
.shots figure { margin: 0; scroll-snap-align: start; text-align: center; }
.shots img {
  width: 100%; height: auto; border-radius: 26px; border: 6px solid #14112b; box-shadow: 0 14px 36px rgba(30, 27, 75, .18); background: var(--surface);
}
.shots figcaption { margin-top: 10px; font-weight: 700; font-size: 15px; }

.features { display: grid; gap: 16px; }
.feature { background: var(--surface); border: 1px solid var(--outline); border-radius: var(--radius-lg); padding: 22px; }
.feature h3 { font-family: var(--font-display); font-size: 19px; font-weight: 800; margin: 14px 0 4px; }
.feature p { color: var(--muted); }

.cat-chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.cat-chips li {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 99px; font-weight: 700;
  background: color-mix(in srgb, var(--c, var(--primary)) 12%, var(--surface)); color: var(--ink);
  border: 1px solid color-mix(in srgb, var(--c, var(--primary)) 30%, transparent);
}
.cat-chips li span { font-size: 13px; color: var(--muted); }
.cat-friendship { --c: #e11d48; } .cat-taste { --c: #d97706; } .cat-habits { --c: #0284c7; } .cat-hypothetical { --c: #7c3aed; }
.cat-relationships { --c: #db2777; } .cat-fun { --c: #ea580c; } .cat-entertainment { --c: #059669; } .cat-family { --c: #0d9488; } .cat-memories { --c: #4f46e5; }
.cat-food { --c: #c2410c; } .cat-travel { --c: #0369a1; } .cat-phone { --c: #9333ea; } .cat-work { --c: #475569; }
.cat-money { --c: #15803d; } .cat-personality { --c: #be185d; } .cat-wyr { --c: #0f766e; }
.cat-couples_deep { --c: #b91c1c; } .cat-party { --c: #c026d3; } .cat-coworkers { --c: #1d4ed8; } .cat-deep_talk { --c: #312e81; } .cat-nostalgia { --c: #a16207; }
.cat-chips li.is-premium { border-style: dashed; }
.cat-chips .prem { font-size: 11px; font-weight: 800; padding: 0 8px; border-radius: 99px; background: var(--accent); color: var(--on-accent); }

.faq { display: grid; gap: 10px; }
.faq details, .faq-single { background: var(--surface); border: 1px solid var(--outline); border-radius: var(--radius-md); padding: 4px 18px; }
.faq summary, .faq-single summary {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 52px; cursor: pointer;
  font-weight: 700; list-style: none;
}
.faq summary::-webkit-details-marker, .faq-single summary::-webkit-details-marker { display: none; }
.faq summary .icon, .faq-single summary .icon { transition: transform .2s; color: var(--muted); }
.faq details[open] summary .icon, .faq-single[open] summary .icon { transform: rotate(180deg); }
.faq details p, .faq-single p { color: var(--muted); padding-bottom: 14px; }

.download-panel {
  display: grid; gap: 24px; align-items: center; padding: 32px 28px; border-radius: var(--radius-xl); color: #fff;
  background: linear-gradient(135deg, var(--hero-start), var(--hero-end));
}
.download-panel h2 { font-size: clamp(24px, 4vw, 32px); font-weight: 900; }
.download-panel p { color: rgba(255, 255, 255, .85); margin-top: 6px; }
.download-panel .store-btn { border-color: rgba(255, 255, 255, .25); }
.download-panel .store-btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); box-shadow: 0 4px 0 var(--accent-deep); }
.download-panel .store-btn.primary small { color: color-mix(in srgb, var(--on-accent) 75%, transparent); }

.mini-steps { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 10px; }
.mini-steps li { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--outline); border-radius: var(--radius-md); padding: 12px 16px; }
.mini-steps span {
  width: 32px; height: 32px; flex: none; border-radius: 50%; display: grid; place-items: center;
  background: var(--primary); color: var(--on-primary); font-weight: 800;
}

.footer-links { display: flex; flex-wrap: wrap; gap: 16px; }
.site-footer a { color: inherit; }
.legal h2 { margin: 28px 0 8px; font-size: 20px; }
.legal h3 { margin: 18px 0 6px; font-size: 17px; }
.legal ul { padding-inline-start: 22px; display: grid; gap: 6px; }
.legal p, .legal li { line-height: 1.9; }
.site-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding: 40px 0 8px; border-top: 1px solid var(--outline); margin-top: 48px; font-size: 14px; }

@media (min-width: 860px) {
  .topnav { display: flex; }
  .landing-hero { grid-template-columns: 1.1fr 1fr; padding-top: 32px; }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .features { grid-template-columns: repeat(3, 1fr); }
  .features.three { grid-template-columns: repeat(3, 1fr); }
  .download-panel { grid-template-columns: 1fr auto; padding: 40px; }
  .shots { grid-auto-columns: 230px; justify-content: center; }
}
@media (max-width: 859px) {
  .hero-visual { min-height: 380px; }
  .phone { width: 180px; }
  .hero-visual.single .phone { width: 200px; }
  .chip-b { display: none; }
}

/* ============ Game v2: instant reveal, leaderboard, «فکری» ============ */
.mascot { display: block; filter: drop-shadow(0 8px 16px rgba(76, 29, 149, .25)); }
.mascot-wrap { display: inline-block; }
.bob { animation: bob 2.4s ease-in-out infinite; }
.pop { animation: pop .35s cubic-bezier(.2, 1.4, .4, 1); }
.spin .mascot { animation: wobble 1s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-6px); } }
@keyframes pop { from { transform: scale(.4); opacity: 0; } }
@keyframes wobble { 25% { transform: rotate(-8deg); } 75% { transform: rotate(8deg); } }

.intro-top { display: flex; align-items: center; justify-content: space-between; }
.intro-top .avatar { margin-bottom: 0; }
.rules { display: grid; gap: 8px; margin: 0 0 16px; }
.rule { display: flex; gap: 12px; align-items: center; padding: 10px 14px; border-radius: var(--radius-md); background: var(--surface); border: 1px solid var(--outline); }
.rule-n {
  width: 32px; height: 32px; flex: none; display: grid; place-items: center; border-radius: 10px;
  background: color-mix(in srgb, var(--primary) 12%, transparent); color: var(--primary); font-weight: 800;
}

.game-bar { margin-bottom: 12px; }
.progress span.ok { background: var(--success); }
.progress span.bad { background: var(--miss); }
.game-stats { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 99px;
  background: var(--surface-variant); color: var(--muted); font-size: 13px; font-weight: 700;
}
.chip .icon { width: 15px; height: 15px; }
.chip.gold { background: var(--accent-soft); color: var(--on-accent-soft); }
.chip.fire { background: #ffedd5; color: #9a3412; animation: pop .35s; }
@media (prefers-color-scheme: dark) { .chip.fire { background: #431407; color: #fdba74; } }
.chip.on-hero { background: rgba(255, 255, 255, .16); color: #fff; }
.chip.on-hero.gold { background: var(--accent); color: var(--on-accent); }

.option.is-correct { background: var(--success-bg); border-color: var(--success); color: var(--ink); font-weight: 700; }
.option.is-correct .badge { background: var(--success); color: #fff; }
.option.is-wrong { background: var(--miss-bg); border-color: var(--miss); color: var(--ink); animation: shake .35s; }
.option.is-wrong .badge { background: var(--miss); color: #fff; }
.option.is-dim { opacity: .5; }
.option[disabled] { cursor: default; }
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }

.feedback {
  margin-top: 14px; padding: 16px; border-radius: var(--radius-lg); display: grid; gap: 12px;
  border: 2px solid var(--outline); background: var(--surface); animation: pop .3s ease-out;
}
.feedback.good { border-color: var(--success); background: color-mix(in srgb, var(--success-bg) 70%, var(--surface)); }
.feedback.bad { border-color: var(--miss); background: color-mix(in srgb, var(--miss-bg) 70%, var(--surface)); }
.fb-head { display: flex; align-items: center; gap: 12px; }
.fb-title { font-family: var(--font-display); font-size: 22px; font-weight: 900; }
.note-bubble {
  position: relative; margin: 0; padding: 12px 14px; border-radius: 16px; background: var(--surface);
  border: 1px solid var(--outline); font-size: 15px;
}
.note-who { font-weight: 800; color: var(--primary); }

.finishing { padding: 40px 20px; }
.finishing h1 { margin-top: 12px; }

.result-hero { position: relative; }
.result-mascot { display: flex; justify-content: center; margin: 4px 0 -8px; }
.result-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 12px 0 4px; }
.rank-line { margin-top: 8px; font-size: 17px; }
.rank-line strong { font-family: var(--font-display); font-size: 24px; color: var(--accent); }

.reaction-card { display: flex; gap: 14px; align-items: center; }
.reaction-card .reaction-emoji { font-size: 40px; line-height: 1; }
.reaction-card.is-waiting { border-style: dashed; }
.reaction-card.arrived { animation: pop .4s; border-color: var(--accent); }

.rematch-card .chip-icon {
  width: 44px; height: 44px; flex: none; border-radius: var(--radius-sm); display: grid; place-items: center;
  background: var(--accent); color: var(--on-accent);
}

.lb { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 6px; }
.lb li { display: grid; grid-template-columns: 36px 1fr auto auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 12px; background: var(--bg); }
.lb li.you { background: color-mix(in srgb, var(--primary) 14%, var(--surface)); outline: 2px solid var(--primary); }
.lb-rank { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: var(--surface-variant); color: var(--muted); }
.lb-rank.r1 { background: var(--accent); color: var(--on-accent); }
.lb-rank.r2 { background: #cbd5e1; color: #1e1b4b; }
.lb-rank.r3 { background: #e7a977; color: #1e1b4b; }
.lb-name { font-weight: 700; overflow-wrap: anywhere; }
.lb-name small { color: var(--primary); font-weight: 700; }
.lb-pct { font-weight: 800; color: var(--primary); }
.lb-pts { font-size: 13px; color: var(--muted); min-width: 48px; text-align: end; }
.note-inline { margin-top: 4px; font-size: 14px; color: var(--muted); font-style: normal; }

.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 50; overflow: hidden; }
.confetti i {
  position: absolute; top: -12px; inset-inline-start: var(--x); width: 9px; height: 14px; border-radius: 2px;
  animation: fall var(--d) var(--delay) cubic-bezier(.3, .6, .6, 1) forwards;
}
@keyframes fall { to { transform: translateY(105vh) rotate(var(--r)); opacity: .9; } }

/* Tilted hero phones must not create horizontal scroll (RTL) */
html, body { overflow-x: clip; }
.legal .faq-single { margin-block: 8px; }
