:root {
  color-scheme: dark;
  --bg: #101010;
  --panel: #191919;
  --panel-raised: #202020;
  --line: #30302e;
  --muted: #a09e98;
  --text: #f5f2e9;
  --acid: #d9ff43;
  --pink: #ff5a8a;
  --mono: "DM Mono", monospace;
  --sans: "Space Grotesk", sans-serif;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body { min-height: 100vh; margin: 0; color: var(--text); font-family: var(--sans); background: radial-gradient(ellipse at 22% 2%, #242319 0%, var(--bg) 38rem); }
button, textarea { font: inherit; }
button { color: inherit; }
.page-noise { position: fixed; inset: 0; z-index: -1; opacity: .08; pointer-events: none; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.2'/%3E%3C/svg%3E"); }
.shell { max-width: 1120px; min-height: 100vh; margin: auto; padding: 0 40px; display: flex; flex-direction: column; }
.topbar { height: 76px; border-bottom: 1px solid #ffffff16; display: flex; align-items: center; justify-content: space-between; }
.wordmark { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-size: 16px; font-weight: 700; letter-spacing: -.7px; }
.logo-dot { width: 11px; height: 11px; border-radius: 50%; background: var(--acid); box-shadow: 0 0 18px #d9ff436b; }
.top-note, .eyebrow, .field-heading, .field-foot, .privacy-note, .round-count, .video-caption, .scoreboard-heading, footer { font-family: var(--mono); text-transform: uppercase; letter-spacing: .06em; }
.top-note { font-size: 9px; color: #a7a59e; display: flex; align-items: center; gap: 9px; }
.live-dot { width: 7px; height: 7px; display: inline-block; border-radius: 50%; background: var(--pink); box-shadow: 0 0 11px #ff5a8a80; }
.intro { width: min(100%, 680px); margin: auto; padding: 68px 0 72px; }
.eyebrow { display: flex; align-items: center; gap: 12px; color: var(--acid); font-size: 9px; }
.eyebrow-line { height: 1px; width: 42px; background: #d9ff4366; }
h1, h2 { font-weight: 600; letter-spacing: -.075em; line-height: .91; margin: 26px 0 20px; }
h1 { font-size: clamp(62px, 9vw, 104px); }
h1 span, h2 span { color: var(--acid); }
.lede { max-width: 450px; margin: 0; color: #aaa8a1; font-size: 15px; line-height: 1.65; }
.setup-card { margin-top: 36px; padding: 20px; background: #191919dd; border: 1px solid var(--line); border-radius: 7px; box-shadow: 0 18px 70px #0004; }
.field-heading, .field-foot { display: flex; align-items: center; justify-content: space-between; }
.field-heading { color: #dfddd4; font-size: 10px; }
.field-heading span, .field-foot { color: #818078; }
.field-heading span { font-size: 9px; font-weight: 400; }
textarea { display: block; width: 100%; min-height: 112px; margin-top: 14px; padding: 13px 14px; resize: vertical; color: var(--text); background: #121212; border: 1px solid #343431; border-radius: 4px; outline: none; font-family: var(--mono); font-size: 13px; line-height: 1.7; transition: border .2s; }
textarea:focus { border-color: #a6c938; }
textarea::placeholder { color: #5a5954; }
.field-foot { margin-top: 8px; font-size: 9px; text-transform: none; letter-spacing: 0; }
.primary-button { width: 100%; min-height: 49px; margin-top: 18px; padding: 0 16px; display: flex; align-items: center; justify-content: space-between; background: var(--acid); color: #11120c; border: 0; border-radius: 3px; cursor: pointer; font-size: 13px; font-weight: 700; transition: background .2s, transform .2s; }
.primary-button:hover { background: #e5ff7b; transform: translateY(-1px); }
.primary-button:disabled { opacity: .62; cursor: wait; transform: none; }
.button-arrow { font-size: 19px; font-weight: 400; }
.error-message { margin: 12px 0 0; color: #ff8ca9; font-size: 12px; line-height: 1.5; }
.privacy-note { display: flex; gap: 9px; align-items: center; margin-top: 17px; color: #828078; font-size: 9px; text-transform: none; letter-spacing: 0; }
.sparkle { color: var(--acid); font-size: 13px; }
footer { margin-top: auto; height: 54px; display: flex; align-items: center; justify-content: space-between; border-top: 1px solid #ffffff16; color: #6f6e68; font-size: 8px; }
.hidden { display: none !important; }
.game { padding: 28px 0 54px; }
.game-topline { display: flex; align-items: center; justify-content: space-between; padding-bottom: 24px; border-bottom: 1px solid #ffffff16; }
.text-button { padding: 5px 0; background: none; border: 0; color: #a6a49c; cursor: pointer; font-family: var(--mono); font-size: 10px; }
.text-button:hover { color: var(--acid); }
.round-count { color: var(--acid); font-size: 10px; }
.game-layout { display: grid; grid-template-columns: minmax(280px, .9fr) minmax(360px, 1.1fr); gap: clamp(36px, 7vw, 86px); padding: 38px 0 0; }
.round-copy .eyebrow { font-size: 8px; }
h2 { margin: 23px 0 10px; font-size: clamp(45px, 6vw, 65px); }
.round-hint { margin: 0; color: #9a9891; font-size: 13px; }
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 24px; }
.choice { min-height: 46px; padding: 0 12px; display: flex; align-items: center; justify-content: space-between; gap: 8px; border: 1px solid #383835; border-radius: 3px; background: #191919; color: #e4e1d9; text-align: left; cursor: pointer; transition: .16s; }
.choice span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--mono); font-size: 11px; }
.choice span:last-child { color: #797770; font-size: 15px; }
.choice:hover:not(:disabled) { border-color: var(--acid); color: var(--acid); background: #20221a; }
.choice:disabled { cursor: default; }
.choice.correct { border-color: var(--acid); color: var(--acid); background: #d9ff4310; }
.choice.wrong { border-color: #763c4e; color: #ff83a1; }
.answer { margin-top: 15px; padding: 12px 13px; border-left: 2px solid var(--acid); background: #d9ff430d; color: #c9c7bd; font-size: 12px; line-height: 1.5; }
.answer strong { color: var(--acid); }
.next-button { margin-top: 13px; }
.scoreboard-wrap { margin-top: 34px; padding-top: 14px; border-top: 1px solid #ffffff19; }
.scoreboard-heading { display: flex; justify-content: space-between; color: #8c8a82; font-size: 8px; }
.scoreboard { margin-top: 8px; }
.score-row { display: flex; align-items: center; justify-content: space-between; min-height: 33px; color: #d3d0c8; font-size: 12px; border-bottom: 1px solid #ffffff0c; }
.score-name { display: flex; align-items: center; gap: 9px; }
.score-rank { width: 17px; color: #77756f; font-family: var(--mono); font-size: 9px; }
.score-points { color: var(--acid); font-family: var(--mono); font-size: 11px; }
.video-column { min-width: 0; }
.video-frame { position: relative; width: 100%; max-width: 390px; aspect-ratio: 9 / 14; margin: 0 auto; display: flex; align-items: center; justify-content: center; overflow: hidden; background: #191919; border: 1px solid #373733; border-radius: 5px; box-shadow: 0 22px 80px #0008; }
.video-frame iframe { width: 100%; height: 100%; border: 0; }
.video-loading { display: grid; justify-items: center; gap: 13px; color: #96948c; font-family: var(--mono); font-size: 10px; }
.spinner { width: 23px; height: 23px; border: 1px solid #505046; border-top-color: var(--acid); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.video-caption { width: min(100%, 390px); margin: 13px auto 0; display: flex; align-items: center; justify-content: space-between; color: #8c8a82; font-size: 8px; }
.video-label { display: flex; gap: 7px; align-items: center; }
.video-caption .live-dot { width: 5px; height: 5px; }
.video-caption a { color: #aaa89f; text-decoration: none; }
.video-caption a:hover { color: var(--acid); }
@media (max-width: 760px) {
  .shell { padding: 0 22px; }
  .intro { padding: 54px 0 58px; }
  .game-layout { grid-template-columns: 1fr; gap: 30px; }
  .video-column { grid-row: 1; }
  .video-frame { width: min(100%, 330px); }
  .video-caption { width: min(100%, 330px); }
  .round-copy { max-width: 520px; margin: auto; width: 100%; }
  footer { font-size: 7px; }
}
@media (max-width: 420px) {
  .shell { padding: 0 16px; }
  .top-note { font-size: 7px; }
  .setup-card { padding: 15px; }
  .game-topline .text-button { font-size: 8px; }
  .choices { grid-template-columns: 1fr; }
}

.field-foot a { color: var(--acid); text-decoration: none; }
.field-foot a:hover { text-decoration: underline; }
.library-choices { display: grid; gap: 7px; margin-top: 14px; }
.library-choice { min-height: 48px; padding: 8px 11px; display: grid; grid-template-columns: 18px minmax(100px, 1fr) auto; align-items: center; gap: 9px; border: 1px solid #343431; border-radius: 3px; background: #121212; cursor: pointer; }
.library-choice input { width: 15px; height: 15px; accent-color: var(--acid); }
.library-choice-name { overflow: hidden; color: var(--text); font-family: var(--mono); font-size: 11px; text-overflow: ellipsis; }
.library-choice-detail { color: #88867e; font-family: var(--mono); font-size: 9px; text-align: right; }
.library-choice.unavailable { opacity: .55; cursor: not-allowed; }
.library-empty { margin: 0; color: #99978f; font-size: 12px; line-height: 1.6; }
.library-empty a { color: var(--acid); text-decoration: none; }
.library-shell { max-width: 900px; }
.library-home-link { text-decoration: none; }
.library-page { width: min(100%, 760px); margin: auto; padding: 52px 0 68px; }
.library-page h1 { margin-top: 25px; }
.library-page h1 span { color: var(--acid); }
.library-section { margin-top: 38px; }
.library-section-heading { display: flex; align-items: end; justify-content: space-between; gap: 15px; margin-bottom: 12px; }
.library-subtitle { margin: 7px 0 0; color: #8d8b83; font-size: 11px; }
.secondary-button { min-height: 36px; padding: 0 12px; border: 1px solid #46463f; border-radius: 3px; background: #191919; color: #dddacf; font-family: var(--mono); font-size: 9px; text-transform: uppercase; cursor: pointer; }
.secondary-button:hover { border-color: var(--acid); color: var(--acid); }
.secondary-button:disabled, .primary-button:disabled { opacity: .5; cursor: wait; }
.account-list { display: grid; gap: 7px; }
.account-row { display: grid; grid-template-columns: 18px minmax(100px, .8fr) minmax(150px, 1fr) auto; align-items: center; gap: 11px; min-height: 58px; padding: 8px 12px; border: 1px solid #32322f; border-radius: 3px; background: #171717; }
.account-row input { width: 15px; height: 15px; accent-color: var(--acid); }
.account-name { overflow: hidden; color: var(--text); font-family: var(--mono); font-size: 11px; text-overflow: ellipsis; }
.account-meta { color: #939188; font-size: 10px; line-height: 1.5; }
.account-meta strong { color: #d8d5ca; font-weight: 500; }
.account-state { display: block; color: #7c7a73; font-family: var(--mono); font-size: 8px; text-transform: uppercase; }
.account-state.error { color: #ff8ca9; }
.remove-account { padding: 5px; border: 0; background: none; color: #88867e; font-family: var(--mono); font-size: 9px; cursor: pointer; }
.remove-account:hover { color: #ff8ca9; }
.sync-panel, .endpoint-panel { margin-top: 32px; padding: 16px; border: 1px solid #30302e; border-radius: 4px; background: #171717dd; }
.sync-summary { margin: 10px 0; color: #d4d1c8; font-size: 12px; }
.sync-current { color: #aaa89f; font-family: var(--mono); font-size: 10px; line-height: 1.6; }
.sync-account-progress { display: grid; gap: 5px; margin-top: 10px; }
.sync-account-row { display: flex; justify-content: space-between; gap: 12px; padding-top: 7px; border-top: 1px solid #ffffff0d; color: #9d9b92; font-family: var(--mono); font-size: 9px; }
.sync-account-row .sync-error { color: #ff8ca9; }
.endpoint-panel > p { margin: 9px 0; color: #8f8d85; font-size: 10px; line-height: 1.5; }
.endpoint-links { display: flex; flex-wrap: wrap; gap: 8px; }
.endpoint-links a { padding: 7px 9px; border: 1px solid #383835; border-radius: 3px; color: var(--acid); font-family: var(--mono); font-size: 9px; text-decoration: none; }
.endpoint-links a:hover { border-color: var(--acid); }
.storage-location code { color: #d5d2c8; }
@media (max-width: 600px) {
  .library-page { padding: 38px 0 52px; }
  .account-row { grid-template-columns: 18px minmax(90px, 1fr) auto; }
  .account-meta { grid-column: 2; }
  .remove-account { grid-column: 3; grid-row: 1 / span 2; }
  .library-section-heading { align-items: start; }
}
