/* Colorvisto — neutral grey UI so nothing tints your color judgement. */
:root {
  --bg: #1d1d1e;
  --surface: #262627;
  --surface-2: #2f2f30;
  --line: #3a3a3b;
  --text: #ececec;
  --muted: #9a9a9b;
  --faint: #6c6c6d;
  --accent: #f2f2f2;
  --good: #8fd6a3;
  --bad: #f0a0a0;
  --radius: 14px;
  --mat: #7f7f7f; /* mid-grey mat around swatches */
  --accent-ink: #111;
  --hover-line: #555;
  --focus: #8a8a8a;
  --ok-line: #4f7a5c; --ok-bg: #1f2a22;
  --bad-line: #6a3a3a;
  --empty-a: #333; --empty-b: #2a2a2a;
  --shadow: rgba(0,0,0,.4);
  --chip1: #E4572E; --chip2: #F3A712; --chip3: #17BEBB; --chip4: #4A5BA0; /* navy lifted for dark backgrounds */
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: dark;
}
/* Light: paper-like, the logo's navy returns to full depth */
:root[data-theme="light"] {
  --bg: #f3f3f1; --surface: #ffffff; --surface-2: #f0f0ee; --line: #dddddb;
  --text: #1b1b1c; --muted: #5d5d5f; --faint: #8b8b8d; --accent: #1b1b1c; --accent-ink: #fff;
  --good: #2f8a4c; --bad: #c0392b; --hover-line: #b5b5b3; --focus: #6d6d6f;
  --ok-line: #8cc49d; --ok-bg: #eaf5ed; --bad-line: #e2a9a2; --empty-a: #e4e4e2; --empty-b: #ededeb;
  --shadow: rgba(0,0,0,.12);
  --chip4: #29335C;
  color-scheme: light;
}
/* Grey: neutral mid-grey surround (≈ L 50), the classic viewing condition for judging color */
:root[data-theme="grey"] {
  --bg: #767676; --surface: #808080; --surface-2: #8a8a8a; --line: #6b6b6b;
  --text: #111112; --muted: #2b2b2c; --faint: #424243; --accent: #111112; --accent-ink: #f2f2f2;
  --good: #0f5a2a; --bad: #7a1010; --hover-line: #4f4f4f; --focus: #3a3a3a;
  --ok-line: #2f6b42; --ok-bg: #8fa394; --bad-line: #7a3a3a; --empty-a: #727272; --empty-b: #7b7b7b;
  --mat: #808080; --shadow: rgba(0,0,0,.25);
  --chip4: #29335C;
  color-scheme: light;
}
:root[data-theme="grey"] .mat { box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 Inter, system-ui, -apple-system, Segoe UI, sans-serif; -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; color: inherit; }
h1, h2, h3 { font-weight: 600; letter-spacing: -0.01em; margin: 0 0 .5em; }
h1 { font-size: 2.4rem; letter-spacing: -0.03em; }
h2 { font-size: 1.25rem; }
h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.mono { font-family: var(--mono); }

/* Header */
.top { display: flex; align-items: center; justify-content: space-between; padding: 18px 28px; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); }
.brand-chips { display: grid; grid-template-columns: repeat(2, 10px); gap: 3px; }
.brand-chips i { width: 10px; height: 10px; border-radius: 3px; }
.brand-chips i:nth-child(1) { background: var(--chip1); } .brand-chips i:nth-child(2) { background: var(--chip2); } .brand-chips i:nth-child(3) { background: var(--chip3); } .brand-chips i:nth-child(4) { background: var(--chip4); }
.brand-word { font-weight: 700; font-size: 1.2rem; letter-spacing: -0.03em; }
.top-nav { display: flex; align-items: center; gap: 18px; }
#account { display: flex; gap: 14px; align-items: center; }

/* Layout */
main { max-width: 1180px; margin: 0 auto; padding: 32px 28px 64px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.grid2 { display: grid; grid-template-columns: 1.15fr .85fr; gap: 24px; }
.game-layout { display: grid; grid-template-columns: 1fr 320px; gap: 24px; align-items: start; }
.game-layout.solo { grid-template-columns: 1fr 280px; }
.stack > * + * { margin-top: 16px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.spacer { flex: 1; }
@media (max-width: 900px) { .grid2, .game-layout, .game-layout.solo { grid-template-columns: 1fr; } main { padding: 20px 16px 48px; } .top { padding: 14px 16px; } }

/* Controls */
.btn { border: 1px solid var(--line); background: var(--surface-2); padding: 11px 18px; border-radius: 10px; cursor: pointer; font-weight: 500; transition: background .15s, border-color .15s, transform .05s; }
.btn:hover { border-color: var(--hover-line); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; }
.btn.big { padding: 14px 22px; font-size: 1.02rem; }
.btn:disabled { opacity: .45; cursor: default; }
.link { background: none; border: 0; padding: 0; cursor: pointer; color: var(--muted); }
.link:hover { color: var(--text); }
label { display: block; }
label > span { display: block; font-size: .8rem; color: var(--muted); margin-bottom: 6px; }
input, select { width: 100%; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 11px 13px; outline: none; }
input:focus, select:focus { border-color: var(--focus); }
input[type=checkbox] { width: auto; }
.check { display: flex; gap: 10px; align-items: center; color: var(--muted); }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.seg { display: flex; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 3px; gap: 3px; flex-wrap: wrap; }
.seg button { flex: 1; border: 0; background: transparent; padding: 8px 10px; border-radius: 8px; cursor: pointer; color: var(--muted); font-weight: 500; white-space: nowrap; }
.seg button.on { background: var(--surface-2); color: var(--text); box-shadow: 0 0 0 1px var(--line); }
.err { color: var(--bad); min-height: 1.2em; margin: 0; font-size: .9rem; }

/* Home hero */
.hero { padding: 8px 0 28px; }
.hero p { color: var(--muted); font-size: 1.1rem; margin: 0; }
.hero-strip { display: flex; gap: 6px; margin-bottom: 22px; }
.hero-strip i { height: 8px; flex: 1; border-radius: 4px; }
.join-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.join-row input { text-transform: uppercase; letter-spacing: .25em; font-family: var(--mono); }
.room-list { list-style: none; padding: 0; margin: 0; }
.room-list li { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); gap: 10px; }
.room-list li:first-child { border-top: 0; }
.code-tag { font-family: var(--mono); letter-spacing: .15em; font-weight: 600; }

/* Swatches */
.mat { background: var(--mat); padding: 22px; border-radius: var(--radius); }
.swatch { border-radius: 8px; aspect-ratio: 16 / 9; width: 100%; }
.swatch.tall { aspect-ratio: 4 / 3; }
.split { display: grid; grid-template-columns: 1fr 1fr; border-radius: 8px; overflow: hidden; aspect-ratio: 16 / 7; }
.split > div { position: relative; }
.split > div span { position: absolute; left: 10px; bottom: 8px; font-size: .72rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; padding: 2px 7px; border-radius: 6px; background: rgba(0,0,0,.35); color: #fff; }

/* Round */
.round-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; gap: 12px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); font-size: .85rem; font-weight: 500; }
.timer { font-family: var(--mono); font-weight: 600; min-width: 64px; text-align: center; }
.timer.low { color: var(--bad); border-color: var(--bad-line); }
.timebar { height: 3px; background: var(--line); border-radius: 2px; overflow: hidden; margin-top: -8px; margin-bottom: 18px; }
.timebar i { display: block; height: 100%; background: var(--text); transition: width .25s linear; }
.prompt { font-size: 1.15rem; font-weight: 500; margin: 20px 0 14px; }
.inputs { display: grid; grid-template-columns: repeat(var(--n), 1fr); gap: 12px; }
.inputs label > span { font-family: var(--mono); font-size: .9rem; color: var(--text); font-weight: 600; }
.inputs label > span em { font-style: normal; color: var(--faint); font-weight: 400; font-size: .75rem; margin-left: 6px; }
.inputs input { font-family: var(--mono); font-size: 1.25rem; padding: 12px 14px; text-align: center; }
.targetvals { display: flex; gap: 10px; flex-wrap: wrap; }
.targetvals .tv { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px 16px; min-width: 84px; text-align: center; }
.targetvals .tv b { display: block; font-family: var(--mono); font-size: 1.6rem; font-weight: 600; }
.targetvals .tv small { color: var(--muted); font-family: var(--mono); }

/* Picker */
.picker { display: grid; grid-template-columns: 1fr 26px; gap: 12px; user-select: none; touch-action: none; }
.sv { position: relative; aspect-ratio: 4/3; border-radius: 8px; cursor: crosshair; background: linear-gradient(to top, #000, transparent), linear-gradient(to right, #fff, transparent), hsl(var(--h) 100% 50%); }
.hue { position: relative; border-radius: 8px; cursor: ns-resize; background: linear-gradient(to bottom, #f00 0%, #ff0 16.66%, #0f0 33.33%, #0ff 50%, #00f 66.66%, #f0f 83.33%, #f00 100%); }
.knob { position: absolute; width: 18px; height: 18px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.6), 0 2px 6px rgba(0,0,0,.4); transform: translate(-50%, -50%); pointer-events: none; }
.hue .knob { left: 50%; width: 30px; height: 10px; border-radius: 4px; }
.pick-layout { display: grid; grid-template-columns: 1.3fr 1fr; gap: 20px; align-items: stretch; }
.pick-layout .preview { display: flex; flex-direction: column; gap: 10px; }
.pick-layout .preview .swatch { flex: 1; aspect-ratio: auto; min-height: 140px; }
@media (max-width: 640px) { .pick-layout { grid-template-columns: 1fr; } .inputs { grid-template-columns: repeat(2, 1fr); } }

/* Results */
.results { list-style: none; padding: 0; margin: 0; }
.results li { display: grid; grid-template-columns: 30px 64px 1fr auto; gap: 14px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.results li:first-child { border-top: 0; }
.results .chip { width: 64px; height: 40px; border-radius: 6px; position: relative; overflow: hidden; }
.results .chip.empty { background: repeating-linear-gradient(45deg, var(--empty-a), var(--empty-a) 6px, var(--empty-b) 6px, var(--empty-b) 12px); }
.results .pos { color: var(--faint); font-family: var(--mono); }
.results .pts { text-align: right; font-family: var(--mono); font-weight: 600; font-size: 1.05rem; }
.results .pts small { display: block; color: var(--muted); font-weight: 400; font-size: .75rem; }
.verdict { font-size: .75rem; padding: 2px 8px; border-radius: 6px; background: var(--surface-2); color: var(--muted); margin-left: 8px; }
.verdict.perfect, .verdict.excellent { color: var(--good); }
.verdict.off, .verdict.none { color: var(--bad); }
.entry-vals { font-family: var(--mono); font-size: .82rem; color: var(--muted); }
.allvals { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px 18px; font-family: var(--mono); font-size: .82rem; }
.allvals div b { color: var(--muted); font-weight: 600; display: inline-block; width: 44px; }
.allvals .cur { color: var(--text); }
.big-points { font-size: 3rem; font-weight: 700; letter-spacing: -0.03em; font-family: var(--mono); line-height: 1; }

/* Sidebar */
.players { list-style: none; padding: 0; margin: 0; }
.players li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); }
.players li:first-child { border-top: 0; }
.players .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); flex: none; }
.players .dot.ok { background: var(--good); }
.players .dot.off { background: transparent; border: 1px solid var(--faint); }
.players .name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.players .sc { font-family: var(--mono); font-weight: 600; }
.tag { font-size: .7rem; color: var(--muted); border: 1px solid var(--line); border-radius: 5px; padding: 0 5px; margin-left: 6px; }
.chat { display: flex; flex-direction: column; height: 380px; }
.chat .msgs { flex: 1; overflow-y: auto; padding-right: 4px; display: flex; flex-direction: column; gap: 6px; font-size: .92rem; }
.chat .msgs .sys { color: var(--faint); font-size: .82rem; font-style: italic; }
.chat .msgs b { font-weight: 600; margin-right: 6px; }
.chat form { display: flex; gap: 8px; margin-top: 10px; }
.chat form input { padding: 9px 12px; }

/* Tables */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 8px; border-top: 1px solid var(--line); }
th { color: var(--muted); font-weight: 500; font-size: .8rem; border-top: 0; }
td.num, th.num { text-align: right; font-family: var(--mono); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.stats div { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 14px; }
.stats b { display: block; font-size: 1.5rem; font-family: var(--mono); }
.stats span { color: var(--muted); font-size: .8rem; }

/* Dialog + toast */
.dlg { background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; width: min(380px, 92vw); }
.dlg::backdrop { background: rgba(0,0,0,.6); }
.dlg form > * + * { margin-top: 14px; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--accent); color: var(--accent-ink); padding: 10px 18px; border-radius: 10px; font-weight: 500; box-shadow: 0 8px 30px var(--shadow); z-index: 10; }
.fade-in { animation: fade .25s ease-out; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.recap { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 10px; padding: 14px; margin: 18px 0; background: var(--bg); border: 1px solid var(--line); }
.recap-item { text-align: center; }
.recap-item span { font-family: var(--mono); font-size: .78rem; color: var(--muted); font-weight: 600; }
.recap-chip { display: grid; grid-template-rows: 1fr 1fr; height: 56px; border-radius: 6px; overflow: hidden; }
@media (max-width: 640px) {
  .brand-word { display: none; }
  .top-nav { gap: 12px; font-size: .9rem; }
  .top-nav .link, .top-nav .btn { white-space: nowrap; }
  .targetvals .tv { min-width: 0; flex: 1; padding: 8px 6px; }
  .targetvals .tv b { font-size: 1.3rem; }
  h1 { font-size: 2rem; }
}

/* Avatars, profiles, sharing */
.avatar { border-radius: 50%; object-fit: cover; flex: none; background: var(--surface-2); display: inline-flex; align-items: center; justify-content: center; vertical-align: middle; }
.avatar.ph { color: var(--muted); font-weight: 600; border: 1px solid var(--line); }
.acct { display: inline-flex; align-items: center; gap: 8px; }
.who { display: inline-flex; align-items: center; gap: 10px; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
.players a { color: var(--text); }
.profile-head { display: flex; gap: 24px; align-items: flex-start; flex-wrap: wrap; }
.avatar-edit { display: flex; flex-direction: column; align-items: center; }
.small-btn { padding: 7px 12px; font-size: .85rem; display: inline-block; }
.socials { display: flex; gap: 8px; flex-wrap: wrap; }
.social { font-size: .85rem; padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); }
.social:hover { color: var(--text); border-color: var(--hover-line); text-decoration: none; }
.danger { border-color: var(--bad-line); }
label > span em { font-style: normal; }
.target-img { display: block; image-rendering: pixelated; object-fit: cover; user-select: none; -webkit-user-drag: none; }
.share-card { width: 100%; border-radius: 10px; display: block; margin-bottom: 14px; aspect-ratio: 1200 / 630; background: var(--bg); }
.share-btns { margin-bottom: 12px; }
.share-btns a.btn { text-decoration: none; }
.share-links { gap: 16px; font-size: .9rem; }
.share-links a { color: var(--muted); }
.share-links a:hover { color: var(--text); }
.players li .avatar { margin-right: -2px; }

/* Compare table */
.compare { margin: 6px 0 4px; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 6px 14px; overflow-x: auto; }
.compare th { font-family: var(--mono); color: var(--muted); }
.compare th em { font-style: normal; color: var(--faint); }
.compare td { font-family: var(--mono); font-size: 1.05rem; }
.compare td:first-child { font-family: inherit; font-size: .85rem; color: var(--muted); }
.compare .c-correct td { color: var(--text); font-weight: 600; }
.compare .c-diff td.ok { color: var(--good); }
.compare .c-diff td.far { color: var(--bad); }
.compare .c-diff td { font-size: .95rem; color: var(--muted); }
.scroll { max-height: 520px; overflow-y: auto; }
.checks { display: grid; gap: 10px; }
.check span b { color: var(--text); font-weight: 500; }
.screen-note { border: 1px dashed var(--line); border-radius: var(--radius); padding: 48px 20px; text-align: center; font-size: 1.2rem; color: var(--muted); }
.recap-item.clickable { cursor: pointer; border-radius: 8px; padding: 4px; margin: -4px; transition: background .15s; }
.recap-item.clickable:hover { background: var(--surface-2); }
.share-dlg { width: min(720px, 94vw); }
.share-dlg .share h3 { display: none; }
.hide-sm { }
@media (max-width: 640px) { .hide-sm { display: none; } }

/* Achievements */
.ach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.ach { display: flex; gap: 12px; align-items: center; padding: 10px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); }
.ach b { display: block; font-size: .92rem; font-weight: 600; }
.ach small { display: block; color: var(--muted); font-size: .78rem; line-height: 1.35; }
.ach-badge { flex: none; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-weight: 700; font-size: .85rem; color: #fff;
  background: linear-gradient(145deg, color-mix(in srgb, var(--c) 85%, #fff), color-mix(in srgb, var(--c) 80%, #000)); box-shadow: inset 0 0 0 1px rgba(255,255,255,.18); text-shadow: 0 1px 2px rgba(0,0,0,.35); }
.ach.locked { opacity: .45; }
.ach.locked .ach-badge { background: var(--surface-2); color: var(--faint); text-shadow: none; }
.ach-unlocked { margin: 16px 0 6px; }

/* TV mode */
body.tv main { max-width: 1680px; }
.tv-layout { display: grid; grid-template-columns: 1fr 360px; gap: 24px; align-items: start; }
.tv-main { padding: 32px; }
.tv-join { display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: center; }
.tv-url { font-size: 1.6rem; color: var(--muted); }
.tv-url b { color: var(--text); letter-spacing: .1em; }
.tv-code { font-family: var(--mono); font-size: clamp(4rem, 9vw, 8rem); font-weight: 600; letter-spacing: .12em; line-height: 1.05; margin: 8px 0; }
.tv-qr { width: 260px; height: 260px; background: #fff; border-radius: 16px; padding: 12px; }
.tv-settings { margin-top: 26px; border-top: 1px solid var(--line); padding-top: 18px; }
.tv-settings summary { cursor: pointer; color: var(--muted); }
.tv-head .pill { font-size: 1rem; padding: 7px 14px; }
.tv-timer { font-size: 2rem !important; padding: 8px 20px !important; }
.tv-swatch { aspect-ratio: auto; height: min(50vh, 560px); }
.tv-prompt { font-size: 1.5rem; font-weight: 500; margin: 22px 0 0; }
.tv-values .tv { padding: 18px 26px; min-width: 130px; }
.tv-values .tv b { font-size: 3.4rem; }
.tv-values .tv small { font-size: 1rem; }
.tv-reveal { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.tv-answer { font-size: 1.9rem; font-weight: 600; margin-top: 16px; }
.tv-players { display: flex; flex-wrap: wrap; gap: 6px; max-height: 60vh; }
.tvp { display: inline-flex; align-items: center; gap: 7px; padding: 5px 10px 5px 5px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); font-size: .9rem; position: relative; }
.tvp.done { border-color: var(--ok-line); background: var(--ok-bg); }
.tvp.gone { opacity: .4; }
.tvp .sc { font-family: var(--mono); font-weight: 600; color: var(--muted); }
.tvp .kick { border: 0; background: none; color: var(--faint); cursor: pointer; padding: 0 0 0 4px; font-size: .8rem; }
.tvp .kick:hover { color: var(--bad); }
.tv-prog b { font-size: 1.6rem; font-family: var(--mono); }
.podium { display: flex; justify-content: center; align-items: flex-end; gap: 18px; margin: 10px 0 26px; }
.pod { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 180px; }
.pod b { font-size: 1.1rem; text-align: center; }
.pod-step { width: 100%; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px 10px 0 0; display: grid; place-items: center; font-family: var(--mono); font-size: 2rem; font-weight: 700; color: var(--muted); }
.pod1 .pod-step { height: 140px; color: #e8d33f; }
.pod2 .pod-step { height: 100px; }
.pod3 .pod-step { height: 70px; }
@media (max-width: 1000px) { .tv-layout, .tv-reveal, .tv-join { grid-template-columns: 1fr; } .tv-qr { width: 200px; height: 200px; } }

/* Modes guide */
.mode-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.mode-top h2 { margin: 0; font-size: 1.5rem; }
.mode-strips { display: grid; gap: 8px; }
.mode-strips > div { display: grid; grid-template-columns: 120px 1fr; gap: 12px; align-items: center; }
.mode-strips em { font-style: normal; color: var(--faint); }
.mode-strips i { height: 14px; border-radius: 7px; }

/* Theme switch */
.theme-switch { display: inline-flex; gap: 4px; padding: 3px; border: 1px solid var(--line); border-radius: 999px; }
.theme-switch button { width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--line); cursor: pointer; padding: 0; }
.theme-switch button[data-theme="dark"] { background: #1d1d1e; }
.theme-switch button[data-theme="grey"] { background: #808080; }
.theme-switch button[data-theme="light"] { background: #f3f3f1; }
.theme-switch button.on { outline: 2px solid var(--text); outline-offset: 1px; }

/* Daily */
.daily-card { border-color: var(--hover-line); }
.daily-title { font-size: 1.3rem; font-weight: 600; letter-spacing: -0.01em; }
.streak { font-family: var(--mono); font-size: 1.3rem; font-weight: 600; }
.daily-result { margin-top: 12px; }
.star { color: #e8b923; margin-left: 5px; font-size: .9em; }
:root[data-theme="grey"] .star, :root[data-theme="light"] .star { color: #b07d00; }
.support-link { color: var(--muted); }
.perks { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
/* Insights */
.card h4 { margin: 0 0 8px; font-size: .95rem; font-weight: 600; }
.tend { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
.fam { display: grid; grid-template-columns: 14px 110px 1fr 80px; gap: 10px; align-items: center; padding: 3px 0; font-size: .9rem; }
.fam > span { width: 14px; height: 14px; border-radius: 4px; }
.fam b { font-weight: 500; }
.fam em { font-style: normal; text-align: right; color: var(--muted); font-size: .82rem; }
.fbar { height: 8px; background: var(--bg); border-radius: 4px; overflow: hidden; border: 1px solid var(--line); }
.fbar i { display: block; height: 100%; background: var(--text); opacity: .7; }
b.warn { color: var(--bad); }
.spark { width: 100%; height: 90px; color: var(--text); }
.mini-pairs { display: flex; gap: 8px; flex-wrap: wrap; }
.mini-pairs > div { width: 46px; text-align: center; }
.mini-pairs i { display: block; height: 22px; }
.mini-pairs i:first-child { border-radius: 6px 6px 0 0; } .mini-pairs i:nth-child(2) { border-radius: 0 0 6px 6px; }
.mini-pairs span { font-family: var(--mono); font-size: .72rem; color: var(--muted); }
.locked-insights { position: relative; overflow: hidden; min-height: 210px; }
.blur-demo { filter: blur(5px); opacity: .6; pointer-events: none; }
.blur-demo .fam { grid-template-columns: 14px 1fr; }
.locked-cta { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 24px; gap: 6px; }
.locked-cta p { max-width: 460px; margin: 0 0 6px; }
/* Gear */
.gear { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.gear-item { display: flex; flex-direction: column; gap: 6px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); align-items: flex-start; }
.gear-item:hover { text-decoration: none; border-color: var(--hover-line); }
/* Studio */
.studio { display: grid; grid-template-columns: 380px 1fr; gap: 24px; align-items: start; }
.studio-controls { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow-y: auto; }
.studio-stage { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 24px; background: var(--surface-2); border-radius: var(--radius); border: 1px solid var(--line); min-height: 70vh; justify-content: center; }
.studio-paper { width: min(100%, 720px); box-shadow: 0 10px 40px var(--shadow); line-height: 0; }
.studio-paper svg { width: 100%; height: 100%; display: block; }
.studio-paper.transparent { background: repeating-conic-gradient(#ccc 0% 25%, #fff 0% 50%) 50% / 16px 16px; }
.lbl { display: block; font-size: .8rem; color: var(--muted); margin-bottom: 6px; }
.round-picks { display: flex; flex-wrap: wrap; gap: 6px; }
.rp { width: 30px; padding: 0; border: 2px solid transparent; border-radius: 7px; overflow: hidden; cursor: pointer; background: none; opacity: .35; }
.rp.on { opacity: 1; border-color: var(--text); }
.rp i { display: block; height: 15px; }
.logo-colors input[type=color] { width: 38px; height: 32px; padding: 2px; }
input[type=range] { padding: 0; accent-color: var(--text); }
@media (max-width: 900px) { .studio { grid-template-columns: 1fr; } .studio-controls { position: static; max-height: none; } }
