/* Fruit Fly Labs: accounts, game history and Premium Lab.
   Builds on style.css (same tokens, same quiet dark UI). Premium Lab has its own colour, the dopamine violet of the
   brain map: in the fly, dopamine neurons carry the reward signal; here it marks the people who support the lab.
   Cyan stays the colour of everything the fly does and of primary actions. */
:root {
  --lab: #a78bfa;                 /* dopamine neurons (--g-dan) */
  --lab-2: #c4b5fd;
  --lab-ink: #140b2b;
  --lab-soft: rgba(167, 139, 250, 0.12);
  --lab-line: rgba(167, 139, 250, 0.32);
  --win: #34d399; --loss: #f87171; --draw: #9ba1ab;
  --page: 1180px;
}

/* ---------------------------------------------------------------- topbar: account entry points */
.topbar .spacer { margin-left: auto; }
.lab-link { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 14px; font-weight: 500; text-decoration: none; white-space: nowrap; transition: color var(--t-fast) ease; }
.lab-link:hover { color: var(--text); }
.lab-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--lab); box-shadow: 0 0 0 3px var(--lab-soft), 0 0 10px var(--lab); }
.btn.signin { min-height: 34px; padding: 0 14px; font-size: 13px; }
.me { display: inline-flex; align-items: center; gap: 9px; padding: 3px 10px 3px 3px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text); text-decoration: none; font-size: 13px; font-weight: 500; }
.me:hover { border-color: rgba(255, 255, 255, 0.2); }
.initials { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 11.5px; font-weight: 600; letter-spacing: .3px; background: var(--surface-3); color: var(--text); }
.initials.lab { box-shadow: 0 0 0 2px var(--bg), 0 0 0 3.5px var(--lab); }
.initials.xl { width: 64px; height: 64px; font-size: 22px; }

/* ---------------------------------------------------------------- shared page frame */
.page { max-width: var(--page); margin: 0 auto; padding: 36px 28px 64px; }
.eyebrow { font: 500 11px var(--mono); letter-spacing: 1.6px; text-transform: uppercase; color: var(--muted); }
.eyebrow.lab { color: var(--lab-2); }
.page-title { margin: 8px 0 0; font-size: 30px; line-height: 1.15; font-weight: 600; letter-spacing: -0.6px; }
.lede { margin: 10px 0 0; max-width: 620px; color: var(--muted); font-size: 15.5px; line-height: 1.6; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.tag-lab { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px 2px 7px; border-radius: 999px; background: var(--lab-soft); border: 1px solid var(--lab-line); color: var(--lab-2); font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.tag-lab::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--lab); box-shadow: 0 0 8px var(--lab); }
.tag-free { display: inline-flex; padding: 2px 9px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--muted); font-size: 11.5px; font-weight: 500; }
.btn.lab { background: var(--lab); border-color: var(--lab); color: var(--lab-ink); font-weight: 600; }
.btn.lab:hover:not(:disabled) { background: var(--lab-2); border-color: var(--lab-2); }
.btn.big { min-height: 46px; padding: 0 20px; font-size: 14.5px; border-radius: 11px; }
.check { width: 16px; height: 16px; flex: none; color: var(--accent); }
.check.lab { color: var(--lab); }
.lock { width: 14px; height: 14px; flex: none; color: var(--lab-2); }

/* ---------------------------------------------------------------- the connectome constellation (drawn by mock.js) */
.constellation { position: absolute; inset: 0; pointer-events: none; }
.constellation svg { width: 100%; height: 100%; }

/* ---------------------------------------------------------------- sign in */
.auth { width: min(420px, calc(100vw - 32px)); }
.auth .dialog-body { padding: 26px 30px 22px; text-align: center; }
.auth-mark { width: 52px; height: 52px; margin: 2px auto 14px; border-radius: 14px; display: grid; place-items: center; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.auth-mark img { width: 38px; height: 38px; }
.auth h2 { font-size: 20px; letter-spacing: -0.3px; }
.auth .sub { margin: 8px auto 22px; max-width: 300px; color: var(--muted); font-size: 13.5px; line-height: 1.55; }
.btn.block { width: 100%; justify-content: center; min-height: 44px; font-size: 14px; }
.btn.google { background: #fff; border-color: #fff; color: #1f1f1f; font-weight: 600; gap: 10px; }
.btn.google:hover:not(:disabled) { background: #f2f2f2; border-color: #f2f2f2; }
.btn.google svg { width: 18px; height: 18px; }
.or { display: flex; align-items: center; gap: 12px; margin: 18px 0; color: var(--faint); font-size: 12px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line-2); }
.field { text-align: left; margin-bottom: 12px; }
.field label { display: block; margin-bottom: 6px; font-size: 12.5px; font-weight: 500; color: var(--muted); }
.input { width: 100%; height: 44px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--bg); color: var(--text); font-size: 14px; outline: none; transition: border-color var(--t-fast) ease, box-shadow var(--t-fast) ease; }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.15); }
.input::placeholder { color: var(--faint); }
.auth .fine { margin: 16px 0 0; color: var(--faint); font-size: 11.5px; line-height: 1.6; }
.auth .sub { color: var(--muted); }
.auth .fine a { color: var(--muted); }
a.btn { text-decoration: none; color: inherit; }
a.btn.lab { color: var(--lab-ink); }
.badge.pick { white-space: nowrap; }
.auth-foot { display: flex; align-items: center; justify-content: center; gap: 7px; padding: 11px 16px; border-top: 1px solid var(--line); color: var(--faint); font-size: 11px; }
.auth-foot svg { width: 13px; height: 13px; }
.sent-icon { width: 52px; height: 52px; margin: 2px auto 14px; border-radius: 50%; display: grid; place-items: center; background: rgba(34, 211, 238, 0.1); color: var(--accent); box-shadow: inset 0 0 0 1px rgba(34, 211, 238, 0.35); }
.sent-icon svg { width: 24px; height: 24px; }
.mailbox { display: inline-block; margin-top: 4px; padding: 6px 12px; border-radius: 8px; background: var(--surface-2); font: 500 13px var(--mono); color: var(--text); }
.auth [data-code-form] { margin-top: 20px; }
.input.otp { height: 52px; text-align: center; font: 600 22px var(--mono); letter-spacing: 0.32em; padding-left: calc(14px + 0.32em); }
.auth .auth-note { margin: -8px 0 20px; padding: 10px 12px; border-radius: 10px; text-align: left; font-size: 12.5px; line-height: 1.5; color: var(--text); background: rgba(251, 191, 36, 0.08); box-shadow: inset 0 0 0 1px rgba(251, 191, 36, 0.3); }

/* ---------------------------------------------------------------- account */
.profile { display: flex; align-items: center; gap: 18px; }
.profile h1 { margin: 0; font-size: 24px; font-weight: 600; letter-spacing: -0.4px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.profile .meta { margin-top: 4px; color: var(--muted); font-size: 13px; }
.profile .actions { margin-left: auto; display: flex; gap: 8px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 26px 0 8px; }
.stat { padding: 16px 18px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); }
.stat .k { font-size: 12px; color: var(--muted); }
.stat .v { margin-top: 6px; font-size: 26px; font-weight: 600; letter-spacing: -0.5px; font-variant-numeric: tabular-nums; }
.stat .v small { font-size: 13px; color: var(--muted); font-weight: 500; margin-left: 4px; }
.tabs { display: flex; gap: 4px; margin: 26px 0 0; border-bottom: 1px solid var(--line); }
.tab { position: relative; padding: 12px 14px; border: 0; background: none; color: var(--muted); font-size: 14px; font-weight: 500; }
.tab[aria-selected="true"] { color: var(--text); }
.tab[aria-selected="true"]::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--accent); }
.tab .count { margin-left: 6px; font: 500 11px var(--mono); color: var(--faint); }
.acc-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; margin-top: 22px; align-items: start; }
.list-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.list-head .note { color: var(--muted); font-size: 12.5px; }
.games { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); overflow: hidden; }
.game { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto auto; align-items: center; gap: 16px; padding: 12px 16px; border-top: 1px solid var(--line); text-decoration: none; color: inherit; transition: background var(--t-fast) ease; }
.game:first-child { border-top: 0; }
.game:hover { background: var(--surface-2); }
.game .t { font-size: 14px; font-weight: 500; }
.game .s { margin-top: 2px; color: var(--muted); font-size: 12.5px; }
.game .when { color: var(--faint); font-size: 12px; text-align: right; white-space: nowrap; }
.res { display: inline-flex; align-items: center; justify-content: center; min-width: 56px; padding: 3px 9px; border-radius: 6px; font-size: 12px; font-weight: 600; }
.res.win { color: var(--win); background: rgba(52, 211, 153, 0.1); }
.res.loss { color: var(--loss); background: rgba(248, 113, 113, 0.1); }
.res.draw { color: var(--draw); background: var(--surface-3); }
.mini { width: 52px; height: 52px; border-radius: 6px; overflow: hidden; box-shadow: 0 0 0 1px var(--line-2); }
.mini svg, .bigboard svg { width: 100%; height: 100%; }
.upsell { position: relative; overflow: hidden; display: flex; align-items: center; gap: 16px; margin-top: 12px; padding: 16px 18px; border-radius: var(--r-lg); background: linear-gradient(120deg, rgba(167, 139, 250, 0.14), rgba(167, 139, 250, 0.03) 60%); border: 1px solid var(--lab-line); }
.upsell p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.upsell b { color: var(--text); font-weight: 600; }
.upsell .btn { margin-left: auto; flex: none; }
.ghost-rows { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; opacity: .45; -webkit-mask-image: linear-gradient(#000, transparent); mask-image: linear-gradient(#000, transparent); }
.ghost-rows div { height: 52px; border-radius: 10px; border: 1px dashed var(--line-2); }

.side { display: flex; flex-direction: column; gap: 16px; }
.fly-card { position: relative; overflow: hidden; }
.specimen { display: flex; align-items: center; gap: 12px; }
.specimen .av { width: 44px; height: 44px; border-radius: 11px; display: grid; place-items: center; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.specimen .av img { width: 32px; height: 32px; }
.specimen .code { font: 500 11px var(--mono); letter-spacing: 1px; color: var(--accent); }
.specimen .nm { font-size: 15px; font-weight: 600; }
.prefs { display: flex; flex-direction: column; gap: 9px; margin: 16px 0 4px; }
.pref { display: grid; grid-template-columns: 64px 1fr 46px; align-items: center; gap: 10px; font-size: 12.5px; color: var(--muted); }
.pref .bar { position: relative; height: 6px; border-radius: 3px; background: var(--surface-3); }
.pref .bar i { position: absolute; top: 0; bottom: 0; border-radius: 3px; }
.pref .bar .mid { position: absolute; left: 50%; top: -3px; bottom: -3px; width: 1px; background: var(--line-2); }
.pref .n { text-align: right; font: 500 11.5px var(--mono); color: var(--text); }
.slots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 14px; }
.slot { height: 54px; border-radius: 10px; border: 1px dashed var(--lab-line); display: grid; place-items: center; color: var(--lab-2); }
.slot svg { width: 15px; height: 15px; }
.kv { display: flex; justify-content: space-between; padding: 9px 0; border-top: 1px solid var(--line); font-size: 13px; }
.kv:first-of-type { border-top: 0; }
.kv span:first-child { color: var(--muted); }

/* ---------------------------------------------------------------- replay */
.replay { display: grid; grid-template-columns: minmax(0, 560px) minmax(0, 1fr); gap: 28px; margin-top: 24px; align-items: start; }
.bigboard { aspect-ratio: 1; border-radius: 12px; overflow: hidden; box-shadow: 0 0 0 1px var(--line-2), 0 24px 60px rgba(0, 0, 0, 0.45); }
.scrub { display: flex; align-items: center; gap: 10px; margin-top: 14px; }
.scrub .track { position: relative; flex: 1; height: 6px; border-radius: 3px; background: var(--surface-3); }
.scrub .track i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 3px; background: var(--accent); }
.scrub .track b { position: absolute; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.25); }
.scrub .pos { font: 500 12px var(--mono); color: var(--muted); min-width: 64px; text-align: right; }
.movelist { display: grid; grid-template-columns: 34px 1fr 1fr; gap: 2px 6px; max-height: 210px; overflow: auto; font: 500 13px var(--mono); }
.movelist .no { color: var(--faint); padding: 4px 0; }
.movelist .m { padding: 4px 8px; border-radius: 6px; color: var(--muted); }
.movelist .m.cur { background: rgba(34, 211, 238, 0.14); color: var(--text); }
.brainview { position: relative; margin-top: 12px; border-radius: 12px; overflow: hidden; background: #05070b; aspect-ratio: 2 / 1; box-shadow: inset 0 0 0 1px var(--line); }
.brainview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.brainview .cap { position: absolute; left: 14px; bottom: 12px; font: 500 12px var(--mono); color: var(--text); text-shadow: 0 1px 6px #000; }
.brainview .pick { position: absolute; right: 12px; top: 12px; }
.smelled { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.smell { display: grid; grid-template-columns: 52px 1fr 48px; align-items: center; gap: 10px; font: 500 12.5px var(--mono); }
.smell .bar { height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.smell .bar i { display: block; height: 100%; border-radius: 3px; background: var(--muted); }
.smell.top .bar i { background: var(--accent); }
.smell .n { text-align: right; color: var(--muted); }

/* ---------------------------------------------------------------- premium lab */
.hero { position: relative; overflow: hidden; border-radius: 20px; padding: 64px 56px; border: 1px solid var(--line); background:
  radial-gradient(80% 120% at 85% 20%, rgba(167, 139, 250, 0.20), transparent 60%),
  radial-gradient(60% 90% at 70% 90%, rgba(34, 211, 238, 0.08), transparent 60%), var(--surface); }
.hero > * { position: relative; }
.hero > .constellation { position: absolute; inset: 0 0 0 38%; opacity: .9; }
.closing > .constellation { opacity: .45; }
.hero h1 { margin: 14px 0 0; max-width: 560px; font-size: 44px; line-height: 1.06; font-weight: 650; letter-spacing: -1.4px; }
.hero h1 em { font-style: normal; color: var(--lab-2); }
.hero .lede { max-width: 520px; font-size: 16px; }
.hero .cta { display: flex; align-items: center; gap: 14px; margin-top: 28px; flex-wrap: wrap; }
.hero .cta .alt { color: var(--muted); font-size: 13px; }
.toggle { display: inline-flex; padding: 4px; gap: 4px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line-2); }
.toggle button { border: 0; padding: 7px 16px; border-radius: 999px; background: none; color: var(--muted); font-size: 13px; font-weight: 500; display: inline-flex; gap: 8px; align-items: center; }
.toggle button[aria-pressed="true"] { background: var(--surface-3); color: var(--text); }
.save { font-size: 10.5px; font-weight: 700; letter-spacing: .3px; color: var(--lab-ink); background: var(--lab); padding: 1px 6px; border-radius: 4px; }
.plans-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin: 56px 0 18px; flex-wrap: wrap; }
.plans-head h2, .section-title { font-size: 22px; font-weight: 600; letter-spacing: -0.4px; }
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.plan { position: relative; padding: 26px 26px 24px; border-radius: 18px; border: 1px solid var(--line); background: var(--surface); }
.plan.lab { border-color: var(--lab-line); background: linear-gradient(180deg, rgba(167, 139, 250, 0.10), rgba(167, 139, 250, 0.02) 45%), var(--surface); box-shadow: 0 30px 80px rgba(80, 40, 170, 0.18); }
.plan .name { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 600; }
.plan .price { margin-top: 18px; display: flex; align-items: baseline; gap: 6px; }
.plan .price b { font-size: 44px; font-weight: 650; letter-spacing: -1.5px; font-variant-numeric: tabular-nums; }
.plan .price span { color: var(--muted); font-size: 14px; }
.plan .billed { margin-top: 2px; min-height: 18px; color: var(--muted); font-size: 12.5px; }
.plan .desc { margin: 14px 0 20px; color: var(--muted); font-size: 13.5px; line-height: 1.55; }
.plan ul { list-style: none; margin: 22px 0 0; padding: 20px 0 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 11px; }
.plan li { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; line-height: 1.45; }
.plan li span b { font-weight: 600; }
.plan li.off { color: var(--faint); }
.plan .ribbon { position: absolute; top: 18px; right: 18px; }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 18px; }
.feature { padding: 22px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); }
.feature .ic { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--lab-soft); color: var(--lab-2); box-shadow: inset 0 0 0 1px var(--lab-line); }
.feature .ic svg { width: 19px; height: 19px; }
.feature h3 { margin: 16px 0 6px; color: var(--text); font-size: 15px; letter-spacing: -0.1px; text-transform: none; font-weight: 600; }
.feature p { margin: 0; color: var(--muted); font-size: 13.5px; line-height: 1.55; }
.feature.wide { grid-column: span 2; display: grid; grid-template-columns: 1fr 1.1fr; gap: 22px; align-items: center; }
.feature.wide .shot { border-radius: 10px; overflow: hidden; aspect-ratio: 2 / 1; background: #05070b; box-shadow: inset 0 0 0 1px var(--line); }
.feature.wide .shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.where { display: grid; grid-template-columns: 1.1fr 1fr; gap: 36px; margin-top: 64px; padding: 34px; border-radius: 18px; border: 1px solid var(--line); background: var(--surface); }
.where p { color: var(--muted); font-size: 14px; line-height: 1.65; margin: 10px 0 0; }
.alloc { display: flex; flex-direction: column; gap: 0; align-self: center; }
.alloc .item { display: flex; gap: 14px; align-items: flex-start; padding: 14px 0; border-top: 1px solid var(--line); }
.alloc .item:first-child { border-top: 0; }
.alloc .item .dot { width: 10px; height: 10px; margin-top: 5px; border-radius: 50%; flex: none; }
.alloc .item b { display: block; font-size: 14px; font-weight: 600; }
.alloc .item span { display: block; margin-top: 2px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.alloc .row { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; font-size: 13.5px; }
.alloc .row .bar { grid-column: 1 / -1; height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.alloc .row .bar i { display: block; height: 100%; border-radius: 3px; }
.alloc .row span:nth-child(2) { font: 500 12.5px var(--mono); color: var(--muted); }
.faq { display: grid; grid-template-columns: 1fr 1fr; gap: 0 36px; margin-top: 18px; }
.faq details { border-top: 1px solid var(--line); padding: 16px 0; }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 12px; font-size: 14.5px; font-weight: 500; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--muted); font-weight: 400; }
.faq details[open] summary::after { content: "–"; }
.faq p { margin: 10px 0 0; color: var(--muted); font-size: 13.5px; line-height: 1.6; }
.closing { position: relative; overflow: hidden; margin-top: 64px; padding: 44px; border-radius: 20px; text-align: center; border: 1px solid var(--lab-line); background: radial-gradient(70% 140% at 50% 0%, rgba(167, 139, 250, 0.18), transparent 70%), var(--surface); }
.closing h2 { font-size: 26px; letter-spacing: -0.5px; }
.closing p { margin: 10px auto 22px; max-width: 460px; color: var(--muted); font-size: 14.5px; line-height: 1.6; }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 980px) {
  .acc-grid, .replay, .where { grid-template-columns: 1fr; }
  .features { grid-template-columns: 1fr 1fr; }
  .feature.wide { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .page { padding: 24px 16px 48px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .profile { flex-wrap: wrap; }
  .profile .actions { margin-left: 0; width: 100%; }
  .hero { padding: 40px 22px; border-radius: 16px; }
  .hero h1 { font-size: 32px; letter-spacing: -0.9px; }
  .plans, .features, .faq { grid-template-columns: 1fr; }
  .feature.wide { grid-template-columns: 1fr; }
  .game { grid-template-columns: 44px minmax(0, 1fr) auto; gap: 12px; }
  .game .when { display: none; }
  .mini { width: 44px; height: 44px; }
  .upsell { flex-direction: column; align-items: flex-start; }
  .upsell .btn { margin-left: 0; }
  .where { padding: 22px; }
  .topbar .lab-link .long { display: none; }
  .hero > .constellation { inset: 0; opacity: .28; }
  .topbar.site .modes { display: none; }
  .topbar.site { gap: 14px; padding: 0 16px; }
}
.sprite { position: absolute; }

/* ---------------------------------------------------------------- live pieces (account-ui.js) */
.account-slot { display: flex; align-items: center; gap: 18px; margin-left: 4px; }
.auth-head { border: 0 !important; padding: 12px 12px 0 !important; justify-content: flex-end !important; }
.auth .auth-error { margin: -2px 0 10px; color: var(--red); font-size: 12.5px; text-align: left; }
.auth form { margin: 0; }
.me-name { max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 720px) { .me-name { display: none; } .me { padding: 3px; } .account-slot { gap: 10px; } }

/* ---------------------------------------------------------------- live pages: account, premium, game */
.nav-a { display: flex; align-items: center; text-decoration: none; }
.signed-out { position: relative; overflow: hidden; padding: 56px 48px; border-radius: 20px; border: 1px solid var(--line); background: radial-gradient(70% 120% at 85% 20%, rgba(34, 211, 238, 0.10), transparent 60%), var(--surface); }
.signed-out > * { position: relative; }
.signed-out > .constellation { position: absolute; inset: 0 0 0 45%; opacity: .7; }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
.stat .v.small-v { font-size: 20px; padding-top: 6px; }
.empty-games { padding: 34px 24px; border: 1px dashed var(--line-2); border-radius: var(--r-lg); text-align: center; color: var(--muted); }
.empty-games p { margin: 0 0 16px; }
.settings { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 22px; }
.settings .card h2 { margin-bottom: 10px; }
.name-form { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.name-form .field { flex: 1 1 220px; margin: 0; }
.saved { color: var(--muted); font-size: 12.5px; }
.row-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.danger-zone { border-color: rgba(248, 113, 113, 0.25); }
.danger-zone .btn.danger { margin-top: 0; }
.lab-a { color: var(--lab-2); }
.soon { margin-top: 12px; padding: 12px 14px; border-radius: 10px; background: var(--lab-soft); border: 1px solid var(--lab-line); color: var(--text); font-size: 13.5px; }
.locked { position: relative; margin-top: 12px; padding: 28px 22px; border-radius: 12px; text-align: center; border: 1px dashed var(--lab-line); background: linear-gradient(180deg, rgba(167, 139, 250, 0.08), transparent); }
.locked p { margin: 8px auto 16px; max-width: 320px; color: var(--muted); font-size: 13.5px; line-height: 1.55; }
.cheat-tag { margin-left: 6px; font: 600 10.5px var(--font); color: var(--amber); }
@media (max-width: 720px) {
  .signed-out { padding: 36px 22px; }
  .signed-out > .constellation { inset: 0; opacity: .25; }
  .settings { grid-template-columns: 1fr; }
}

.scrub .range { flex: 1; accent-color: var(--accent); height: 4px; }
.movelist button.m { border: 0; background: none; text-align: left; font: inherit; cursor: pointer; }
.movelist button.m:hover { background: var(--surface-2); color: var(--text); }
.brain-note { margin: 4px 0 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.brain-note b { color: var(--text); }
.smell .eng { margin-left: 6px; font: 500 10px var(--font); color: var(--faint); }
.brain-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 12px; font: 500 12px var(--mono); color: var(--muted); }
.locked b { font-size: 14.5px; }

/* ---------------------------------------------------------------- legal pages */
.legal { max-width: 760px; }
.legal-nav { display: flex; gap: 4px; margin-bottom: 28px; }
.legal-nav a { padding: 6px 12px; border-radius: 8px; color: var(--muted); font-size: 13px; font-weight: 500; text-decoration: none; }
.legal-nav a:hover { color: var(--text); background: var(--surface); }
.legal-nav a[aria-current="page"] { color: var(--text); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.legal h1 { margin: 8px 0 0; font-size: 32px; font-weight: 600; letter-spacing: -0.6px; }
.legal .updated { margin: 8px 0 0; color: var(--faint); font: 500 12px var(--mono); }
.legal h2 { margin: 40px 0 10px; font-size: 18px; font-weight: 600; letter-spacing: -0.2px; scroll-margin-top: 80px; }
.legal p, .legal li { color: var(--muted); font-size: 15px; line-height: 1.7; }
.legal p { margin: 0 0 12px; }
.legal ul { margin: 0 0 12px; padding-left: 20px; }
.legal li { margin: 4px 0; }
.legal b { color: var(--text); font-weight: 600; }
.legal a { color: var(--text); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
.legal a:hover { text-decoration-color: var(--text); }
.legal-summary { margin: 28px 0 8px; padding: 18px 22px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); }
.legal-summary > b { display: block; margin-bottom: 6px; font-size: 13px; }
.legal-summary ul { margin: 0; }
.legal-summary li { font-size: 14.5px; }
.table-wrap { overflow-x: auto; margin: 4px 0 14px; border: 1px solid var(--line); border-radius: var(--r-lg); }
.legal-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.legal-table th { padding: 11px 14px; text-align: left; font-size: 12px; font-weight: 500; color: var(--faint); background: var(--surface); border-bottom: 1px solid var(--line); }
.legal-table td { padding: 12px 14px; vertical-align: top; color: var(--muted); line-height: 1.55; border-bottom: 1px solid var(--line); }
.legal-table tr:last-child td { border-bottom: 0; }
.legal-table td:first-child { color: var(--text); min-width: 160px; }
@media (max-width: 640px) { .legal h1 { font-size: 26px; } .legal-table td:first-child { min-width: 120px; } }

/* ---------------------------------------------------------------- trained fly sync */
.sync-note { margin: 14px 0 12px; padding: 9px 12px; border-radius: 9px; font-size: 12.5px; line-height: 1.5; color: var(--muted); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.sync-note.saved::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 8px; border-radius: 50%; background: #34d399; vertical-align: 1px; }
.sync-note.pending::before, .sync-note.saving::before, .sync-note.undecided::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 8px; border-radius: 50%; background: #fbbf24; vertical-align: 1px; }
.sync-note .link-btn { color: var(--text); font-size: inherit; text-decoration: underline; text-underline-offset: 2px; }
.choose .dialog-body { text-align: left; }
.choose .sub { max-width: none; margin: 8px 0 18px; }
.choice { display: flex; flex-direction: column; gap: 3px; width: 100%; margin-top: 10px; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--text); text-align: left; cursor: pointer; transition: border-color var(--t-fast) ease, background var(--t-fast) ease; }
.choice:hover, .choice:focus-visible { border-color: var(--accent); outline: none; }
.choice b { font-size: 14px; font-weight: 600; }
.choice span { font-size: 12.5px; color: var(--muted); }
.mf-list { display: grid; gap: 8px; margin-top: 14px; }
.mf { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); color: var(--text); text-decoration: none; transition: border-color var(--t-fast) ease; }
.mf:hover { border-color: var(--line-2); }
.mf-icon { width: 30px; height: 30px; flex: none; }
.mf .t { font-size: 14px; font-weight: 600; }
.mf .s { margin-top: 2px; color: var(--muted); font-size: 12.5px; }
.mf.empty .mf-icon { opacity: 0.45; filter: grayscale(1); }

/* ---------------------------------------------------------------- Crowd Fly note on the result card */
.result-crowd { margin: 12px 0 0; max-width: 300px; margin-inline: auto; color: var(--faint); font-size: 11.5px; line-height: 1.5; text-align: center; }
.result-crowd .link-btn { color: var(--muted); font-size: inherit; text-decoration: underline; text-underline-offset: 2px; }

/* ---------------------------------------------------------------- full history: filters, record over time */
:root { --fly-innate: #3987e5; --fly-learning: #d95926; --fly-pure: #199e70; }   /* validated: CVD dE >= 9.4 on --surface */
.record { margin-bottom: 18px; }
.record .card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.record .card-sub { margin: 4px 0 12px; }
.small-tag { font-size: 11px; padding: 2px 8px; }
.rec-empty { margin: 4px 0 2px; color: var(--muted); font-size: 13px; }
.rec-legend { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 8px; font-size: 12.5px; color: var(--muted); }
.rec-key { display: inline-flex; align-items: center; gap: 7px; }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; flex: none; }
.sw.innate { background: var(--fly-innate); } .sw.learning { background: var(--fly-learning); } .sw.pure { background: var(--fly-pure); }
.rec-plot { position: relative; width: 100%; }
.rec-plot svg { display: block; max-width: 100%; height: auto; overflow: visible; }
.rec-grid { stroke: var(--line); stroke-width: 1; }
.rec-axis { fill: var(--faint); font: 500 11px var(--mono); }
.rec-line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.rec-line.innate { stroke: var(--fly-innate); } .rec-line.learning { stroke: var(--fly-learning); } .rec-line.pure { stroke: var(--fly-pure); }
.rec-end, .rec-dot { stroke: var(--surface); stroke-width: 2; }
.rec-end.innate, .rec-dot.innate { fill: var(--fly-innate); } .rec-end.learning, .rec-dot.learning { fill: var(--fly-learning); } .rec-end.pure, .rec-dot.pure { fill: var(--fly-pure); }
.rec-label { fill: var(--text); font-size: 12px; font-weight: 500; }
.rec-cross { stroke: var(--line-2); stroke-width: 1; stroke-dasharray: 3 3; }
.rec-tip { position: absolute; width: 190px; padding: 9px 11px; border-radius: 9px; background: var(--surface-3); border: 1px solid var(--line-2); font-size: 12px; line-height: 1.6; color: var(--text); pointer-events: none; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35); }
.rec-tip b { display: block; margin-bottom: 2px; font-size: 12px; }
.rec-tip div { display: flex; align-items: center; gap: 7px; color: var(--muted); }
.rec-table { width: 100%; margin-top: 12px; border-collapse: collapse; font-size: 12.5px; }
.rec-table th { padding: 7px 8px; text-align: left; font-weight: 500; color: var(--faint); border-bottom: 1px solid var(--line); }
.rec-table td { padding: 8px; color: var(--muted); border-bottom: 1px solid var(--line); }
.rec-table tr:last-child td { border-bottom: 0; }
.rec-table td:first-child { color: var(--text); }
.rec-table td:first-child .sw { margin-right: 8px; vertical-align: -1px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.seg-f { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); }
.seg-f button { padding: 6px 12px; border: 0; border-radius: 7px; background: none; color: var(--muted); font-size: 12.5px; font-weight: 500; cursor: pointer; }
.seg-f button[aria-checked="true"] { background: var(--surface-3); color: var(--text); }
.seg-f button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.f-sel, .f-q { width: auto; height: 36px; font-size: 13px; }
.f-q { flex: 1; min-width: 160px; }
.no-match { padding: 24px; text-align: center; color: var(--muted); border: 1px dashed var(--line-2); border-radius: var(--r-lg); }
.more { margin-top: 12px; }
@media (max-width: 640px) { .rec-table th:nth-child(5), .rec-table td:nth-child(5) { display: none; } .seg-f { width: 100%; } .seg-f button { flex: 1; padding: 6px 4px; } }

/* ---------------------------------------------------------------- Premium Lab board themes (cosmetic perk) */
.board[data-theme="connectome"] { --sq-light: #e9e4f8; --sq-dark: #8b78cf; --sq-last: rgba(196, 181, 253, 0.55); }
.board[data-theme="amber"] { --sq-light: #f5e9cc; --sq-dark: #c8964a; --sq-last: rgba(255, 214, 102, 0.55); }
.board[data-theme="midnight"] { --sq-light: #c3ccda; --sq-dark: #56657f; --sq-last: rgba(125, 211, 252, 0.45); }
.board[data-theme="marble"] { --sq-light: #f1f0ec; --sq-dark: #aaa59c; --sq-last: rgba(167, 139, 250, 0.4); }
#you-lab { font-weight: 600; }

/* ---------------------------------------------------------------- five Learning Flies */
.fly-slots { margin: 4px 0 16px; }
.fs-actions { display: inline-flex; gap: 14px; }
.fs-actions .link-btn { font-size: 12.5px; color: var(--muted); }
.fs-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.fs-chip { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 112px; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--text); text-align: left; cursor: pointer; transition: border-color var(--t-fast) ease, background var(--t-fast) ease; }
.fs-chip b { font-size: 13px; font-weight: 600; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fs-chip span { font-size: 11.5px; color: var(--muted); }
.fs-chip:hover { border-color: rgba(255, 255, 255, 0.2); }
.fs-chip[aria-checked="true"] { border-color: var(--fly-learning); box-shadow: inset 0 0 0 1px var(--fly-learning); cursor: default; }
.fs-chip.add { border-style: dashed; background: transparent; }
.fs-chip.lab, .fs-chip.locked { border-color: var(--lab-line); }
.fs-chip.lab span, .fs-chip.locked span { color: var(--lab-2); }
.fs-chip.locked b { color: var(--muted); }
.fs-chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.name-dlg .dialog-body { text-align: left; }
.name-dlg h2 { margin-bottom: 14px; }
.name-dlg .actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.compare-dlg { width: min(860px, calc(100vw - 24px)); }
.compare-dlg .dialog-head { display: flex; align-items: center; justify-content: space-between; }
.cmp-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-lg); }
.cmp { width: 100%; border-collapse: collapse; font-size: 13px; }
.cmp th, .cmp td { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
.cmp th { color: var(--muted); font-weight: 500; }
.cmp td { color: var(--text); font-variant-numeric: tabular-nums; }
.cmp tr:last-child th, .cmp tr:last-child td { border-bottom: 0; }
.cmp-head td { font-weight: 600; background: var(--surface-2); }
.cmp-head small { color: var(--fly-learning); font-weight: 500; }
.cmp-sum td { font-weight: 500; }
.cmp-sec th { padding-top: 16px; font-size: 11.5px; letter-spacing: 0.4px; text-transform: uppercase; color: var(--faint); }
.cmp .up small { color: #34d399; } .cmp .down small { color: #f87171; } .cmp .same { color: var(--muted); }
.cmp-del td { padding-top: 12px; }
.compare-dlg .card-note { margin-top: 12px; }
.slot.used { border-style: solid; border-color: var(--fly-learning); color: var(--text); font: 600 13px var(--mono); }
.slot.free { border-color: var(--line-2); color: var(--muted); font-size: 18px; }
.mf.locked .t { color: var(--muted); } .mf.locked .s { color: var(--lab-2); }

/* ---------------------------------------------------------------- Premium Lab billing */
.welcome { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; padding: 12px 16px; border-radius: 12px; background: var(--lab-soft); border: 1px solid var(--lab-line); color: var(--text); font-size: 14px; }
.welcome .lab-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--lab); box-shadow: 0 0 10px var(--lab); flex: none; }
.billing .row-btns { margin-top: 12px; }
.b-note { margin-top: 10px; }
.refund-form { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.refund-form textarea.input { height: auto; padding: 10px 14px; resize: vertical; font-family: inherit; }
.refund-form .opt { color: var(--faint); font-weight: 400; }
.refund-form .fine { margin: 2px 0 12px; color: var(--faint); font-size: 12px; }
.del-lab { color: #fbbf24; }

/* ---------------------------------------------------------------- one-time support: how much to give */
.tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0 6px; }
.tiers button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; height: 54px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--text); font: 600 15px var(--mono); cursor: pointer; transition: border-color var(--t-fast) ease, background var(--t-fast) ease; }
.tiers button:hover { border-color: var(--lab-line); }
.tiers button[aria-checked="true"] { border-color: var(--lab); background: var(--lab-soft); box-shadow: inset 0 0 0 1px var(--lab); }
.tiers button:focus-visible { outline: 2px solid var(--lab); outline-offset: 2px; }
.tier-note { margin: 0 0 12px; color: var(--muted); font-size: 12.5px; line-height: 1.5; }
.soon-tag { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--muted); font: 500 10.5px var(--mono); letter-spacing: 0.3px; text-transform: uppercase; vertical-align: 2px; white-space: nowrap; }
.tiers button b { font: 600 15px var(--mono); }
.tiers button span { font: 500 10.5px var(--font, inherit); letter-spacing: 0.4px; text-transform: uppercase; color: var(--muted); }
.tiers button[aria-checked="true"] span { color: var(--lab-2); }

/* ---------------------------------------------------------------- Supporters list */
.supporters { margin-top: 64px; }
.sup-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.sup { display: inline-flex; align-items: baseline; gap: 8px; padding: 8px 12px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); font-size: 14px; }
.sup b { font-weight: 600; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sup small { font: 500 10.5px var(--mono); letter-spacing: 0.4px; text-transform: uppercase; color: var(--muted); }
.sup.synapse { border-color: var(--lab-line); } .sup.synapse small { color: var(--lab-2); }
.sup.connectome { border-color: var(--lab); background: var(--lab-soft); } .sup.connectome small { color: var(--lab-2); }
.sup-empty, .sup-note { color: var(--muted); font-size: 13.5px; }
.sup-note { margin-top: 12px; font-size: 12.5px; color: var(--faint); }
.sup-toggle { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; padding: 12px 14px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); cursor: pointer; }
.sup-toggle input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--lab); flex: none; }
.sup-toggle b { display: block; font-size: 13.5px; }
.sup-toggle small { display: block; margin-top: 2px; color: var(--muted); font-size: 12.5px; line-height: 1.5; }
