.masthead-tools{justify-self:end;display:flex;align-items:center;gap:8px;min-width:0;max-width:100%}
.theme-button{width:40px;min-height:40px;flex:none;padding:0}
.theme-button svg{width:18px;height:18px}
.masthead .theme-button{background:#1d4034;border-color:#648275;color:#e8f6dc}
.question-tools{display:flex;justify-content:space-between;gap:9px;margin-bottom:14px}
.question-tools button{min-height:38px}
.difficulty-legend{display:flex;gap:6px;flex-wrap:wrap;margin:0 0 12px}
.difficulty-legend span{padding:3px 8px;border-radius:7px;background:#31452f;color:#e6fcbb;font-size:12px}
.difficulty-legend span:nth-child(2){background:#4b4126;color:#ffe7a6}
.difficulty-legend span:nth-child(3){background:#4b332b;color:#ffd1b8}
.difficulty-legend b{font-family:var(--english)}
.question-block h2,.question-en,.answer-copy p{white-space:pre-line}
:root[data-theme="dark"] body:has(#lobby:not([hidden])){background:radial-gradient(ellipse at 72% -10%,#223d30,transparent 47%),#111918}
[data-theme="dark"] #lobby{color:#e8f3e7}
[data-theme="dark"] .catalog-heading p,[data-theme="dark"] .group-heading small,[data-theme="dark"] .progress-label>span{color:#bfd0c6}
[data-theme="dark"] .catalog-heading .limit-note{color:#ffb38b}
[data-theme="dark"] .play-stat,[data-theme="dark"] #lobby .resume-panel,[data-theme="dark"] .group-nav a,[data-theme="dark"] .mix-button{
  background:#21352d;color:#edf7ed;border-color:#536c60;
}
[data-theme="dark"] .play-stat strong,[data-theme="dark"] .play-stat>div span,[data-theme="dark"] #lobby .resume-panel p,
[data-theme="dark"] .group-nav svg,[data-theme="dark"] .mix-button svg{color:#cde4d6}
[data-theme="dark"] #lobby .resume-panel .subtle-button{background:#1c2b25;color:#effdf3;border-color:#587366}
[data-theme="dark"] .catalog-toolbar{border-bottom-color:#395345}
[data-theme="dark"] .category{--tile-wash:color-mix(in srgb,var(--tile-color) 26%,#202e27);color:#f0f6ed;border-color:#4d6357}
[data-theme="dark"] .category[aria-pressed=true]{border-color:#9abe78;box-shadow:inset 0 0 0 2px #8bb76c}
[data-theme="dark"] .category .category-illustration{color:#e2eddd;background:color-mix(in srgb,var(--tile-color) 75%,#253e30)}
[data-theme="dark"] .selection-tray{background:#172822f4;border-color:#496355}
[data-theme="dark"] .progress-label b{color:#c9ebcb}
[data-theme="dark"] .progress-slots i{background:#3d5a4b}
[data-theme="dark"] .progress-slots i.filled{background:#b5df84}
:root[data-theme="light"]{color-scheme:light;--bg:#f8fbf7;--panel:#fff;--line:#b8cbbd;--ink:#192b24;--muted:#4d6257;--right:#23613c;--wrong:#923b48;--peach:#a45b33}
[data-theme="light"] body{background:radial-gradient(ellipse at 75% 0%,#e0f0e0,transparent 53%),var(--bg)}
[data-theme="light"] .masthead{background:#f8fbf7;border-color:#c1d2c4}
[data-theme="light"] .brand{color:#193c33}
[data-theme="light"] .brand-dot{color:#386e40}
[data-theme="light"] .masthead .help-button,[data-theme="light"] .masthead .theme-button{
  background:#e7f3e8;color:#214838;border-color:#bbcfbe;
}
[data-theme="light"] #sync-status{color:#496157}
[data-theme="light"] #sync-status[data-status="saved"]{color:#285b38}
[data-theme="light"] .subtle-button,[data-theme="light"] .icon-button{color:#224737;background:#edf6ec;border-color:#adc6b4}
[data-theme="light"] .subtle-button:hover,[data-theme="light"] .icon-button:hover,[data-theme="light"] .masthead .help-button:hover{background:#dfefdf}
[data-theme="light"] .subtle-button svg,[data-theme="light"] .help-button svg{color:#356342}
[data-theme="light"] .primary:disabled{background:#e0e8df;border-color:#d1ddd1;color:#536659}
[data-theme="light"] .team-score:nth-child(1){--team:#386c25}
[data-theme="light"] .solo-score{--score-wash:#e2f5e5;--score-line:#a7cdb1;background:linear-gradient(145deg,var(--score-wash),#fff)}
[data-theme="light"] .solo-score.wrong{--score-wash:#fbe9ea;--score-line:#d2a8ae}
[data-theme="light"] .solo-score-head span,[data-theme="light"] .solo-score-points span{color:#4c6255}
[data-theme="light"] .solo-score meter,[data-theme="light"] .solo-score meter::-webkit-meter-bar{background:#dce6df}
[data-theme="light"] .point{color:#305525;background:#e7f1df;border-color:#adc3a3}
[data-theme="light"] .point.medium{color:#654709;background:#faf0d6;border-color:#d7c393}
[data-theme="light"] .point.hard{color:#783b24;background:#fbe9df;border-color:#d8b5a2}
[data-theme="light"] .point:disabled{color:#5d695f;background:#e9efea;border-color:#c8d2c9}
[data-theme="light"] .point:disabled[data-result="right"]{color:#226140;background:#e0efe2;border-color:#acd0b4}
[data-theme="light"] .point:disabled[data-result="wrong"]{color:#893d4b;background:#f6e4e8;border-color:#deb8be}
[data-theme="light"] .difficulty-legend span{color:#305525;background:#e7f1df}
[data-theme="light"] .difficulty-legend span:nth-child(2){color:#654709;background:#faf0d6}
[data-theme="light"] .difficulty-legend span:nth-child(3){color:#783b24;background:#fbe9df}
[data-theme="light"] dialog{background:linear-gradient(155deg,#f3fbf0,#fff 67%);border-color:#b3c8b6}
[data-theme="light"] .mode-switch legend,[data-theme="light"] .name-key,[data-theme="light"] .mode-note{color:#435c4e}
[data-theme="light"] .mode-face,[data-theme="light"] .names input{background:#f5f9f4;border-color:#b3c8b6}
[data-theme="light"] .mode input:checked+.mode-face{color:#25462b;background:#e1f1dc;border-color:#82a878}
[data-theme="light"] .mode-face svg,[data-theme="light"] .mode input:checked+.mode-face svg{color:#346648}
[data-theme="light"] .names input::placeholder{color:#586b5f}
[data-theme="light"] .question-meta span{background:#e0eee1;color:#2e513b}
[data-theme="light"] .question-clock{--clock-color:#34673b;color:#20392b;background:#e6f1e5;border-color:#b2cbb2}
[data-theme="light"] .question-clock[data-phase="second"]{--clock-color:#9d4a1c;background:#faece1;border-color:#dcb49c}
[data-theme="light"] .question-clock[data-phase="finished"]{--clock-color:#55705e;background:#edf1ec;border-color:#c2d0c4}
[data-theme="light"] .clock-track{background:#b9cdbf}
[data-theme="light"] .question-en{color:#3a5146;border-color:#bdcec2}
[data-theme="light"] .answer{background:#edf7e5;border-color:#b9d0af}
[data-theme="light"] .answer span,[data-theme="light"] .answer .answer-en{color:#416147}
[data-theme="light"] .answer p{color:#25492e}
[data-theme="light"] .judge{background:#e4f2df;color:#24472c;border-color:#adc7a5}
[data-theme="light"] .judge[data-value="1"]{background:#faeade;color:#753a27;border-color:#d7b4a3}
[data-theme="light"] .judge[data-value="none"]{background:#edf2ed;color:#405549;border-color:#b8cabd}
[data-theme="light"] .judge[data-solo="right"]{background:#dff1e3;color:#255b3d;border-color:#a1c7ad}
[data-theme="light"] .judge[data-solo="wrong"]{background:#f8e4e9;color:#863e48;border-color:#dcaeb8}
[data-theme="light"] .clip-stage>p,[data-theme="light"] .media-credit a{color:#315943}
[data-theme="light"] .clip-stage .clip-error{color:#903e31}
[data-theme="light"] .result-card:not(.victory){background:radial-gradient(ellipse at top,#e4f1df,#fff 74%);border-color:#bfd2c2}
[data-theme="light"] .result-card:not(.victory)>p{color:#4f6254}
@media(max-width:700px){
  .masthead-tools{gap:5px}.masthead-tools .theme-button{width:35px;min-height:35px}#sync-status{font-size:10px}
  .masthead .help-button [data-icon]{display:none}
}
.audio-frame{min-height:132px;display:grid;place-items:center;padding:8px}
.audio-frame audio{width:100%}
.actor-card{display:grid;gap:7px;padding:11px;margin:8px 0;border:1px solid var(--line);border-radius:8px;background:var(--panel);font-weight:700;text-align:center}
#question-actions{margin-top:12px}
.episode-clip{margin:10px 0}
.episode-clip iframe{display:block;border:0;border-radius:10px;width:100%;aspect-ratio:16/9;background:#182b25}
#group-shows .group-heading{--section-color:#76476d;--section-wash:#f1dfed}
@media(max-width:700px){
  body:has(#game:not([hidden])) .masthead{position:sticky;top:0;z-index:4}
}
#sync-sign-in{text-decoration:none;flex:none}
[data-theme="light"] .sync-message{background:#e9f2e8;color:#304c3e;border-color:#adbfaf}

.question-image.show-still{padding:0;background:#14241e}
.question-image.show-still img{width:100%;max-height:min(320px,36dvh);object-fit:contain;filter:none}
.youtube-frame iframe{display:block;border:0;width:100%;height:auto;aspect-ratio:16/9;min-height:200px}
.clip-stage .youtube-options{margin:9px 0 0}

.category-search{display:flex;align-items:center;gap:10px;min-height:48px;margin-block:12px 14px;padding-inline:12px;border:1px solid var(--line);border-radius:12px;background:var(--panel)}
.category-search:focus-within{outline:2px solid #568d60;outline-offset:2px}
.category-search label{display:grid;place-items:center;color:var(--muted)}
.category-search svg{width:19px;height:19px}
.category-search input{width:100%;min-width:0;padding:9px 0;border:0;outline:none;background:transparent;color:inherit;font:inherit}
.category-search input:placeholder-shown{direction:rtl}
.category-search input::placeholder,.search-empty{color:var(--muted)}
.search-empty{padding:24px;text-align:center}
.question-image.show-still img{height:auto;max-height:min(340px,42dvh)}

.finish-celebration{isolation:isolate;animation:result-controls .44s ease-out both}
.finish-celebration>.result-emblem{animation:victory-pop .75s .12s cubic-bezier(.18,.81,.32,1.1) both}
.finish-celebration>h1,.finish-celebration>p{animation:result-controls .4s .28s ease-out both}
.finish-celebration .solo-score,.finish-celebration .team-score{animation:result-controls .5s .46s ease-out both}
.finish-celebration .solo-score:nth-child(2),.finish-celebration .team-score:nth-child(2){animation-delay:.58s}
.finish-celebration .solo-score strong,.finish-celebration .team-score strong{animation:score-pop .6s .78s ease-out both}
.finish-celebration .result-actions{position:relative;z-index:2;animation:result-controls .38s .92s ease-out both}
.finish-celebration .result-actions:focus-within{animation:none}
@media(prefers-reduced-motion:reduce){.finish-celebration,.finish-celebration *{animation:none!important}.finish-celebration .victory-confetti{display:none}}
.clip-navigation{display:flex;flex-wrap:wrap;gap:8px;margin-top:13px}
.replay-media{margin-block:8px 0}

.question-cover{display:grid;place-items:center;margin:0 0 11px}
.question-cover img{display:block;width:100%;height:clamp(92px,20vw,144px);object-fit:contain}
.source-content{margin-top:10px}
.source-meta{font-weight:700;margin:0 0 8px}
.source-meta bdi{font-family:var(--english);white-space:nowrap;margin-inline-start:5px}
.source-fallback{display:grid;place-items:center}
.source-fallback img{display:block;width:100%;max-height:min(340px,42dvh);object-fit:contain}
#source-error{margin-block:8px}
.sound-choices{margin-block:0 12px}
.sound-choices p{color:var(--muted);margin:0 0 6px}
.sound-choices ul{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
.sound-choices li{display:grid;gap:2px;border-radius:9px;border:1px solid var(--line);background:var(--panel);padding:7px 9px;overflow-wrap:anywhere}
.sound-choices li bdi{font-family:var(--english);font-size:.85rem;color:var(--muted)}
[data-theme="dark"] .category-logo[data-logo="rocket-logo"],.board-category .category-logo[data-logo="rocket-logo"]{content:url('./assets/media/rocket-logo-dark.webp')}
[data-theme="dark"] .category-logo[data-logo="overwatch-logo"],.board-category .category-logo[data-logo="overwatch-logo"]{content:url('./assets/media/overwatch-logo-dark.webp')}
:is([data-theme="dark"] .category,.board-category) .category-logo:is(
  [data-logo="valorant-logo"],[data-logo="fortnite-logo"],[data-logo="ea-fc-logo"],
  [data-logo="apple-logo"],[data-logo="playstation-logo"],[data-logo="resident-evil-logo"]
){filter:brightness(0) invert(.97) drop-shadow(0 2px 2px #0008)}

.number-hint{display:flex;justify-content:space-between;align-items:center;gap:8px;margin:0 0 10px;padding:8px 11px;border:1px solid var(--line);border-radius:9px;color:var(--muted);font-size:.88rem}
.number-hint bdi{font:700 .95rem var(--english);color:var(--ink);white-space:nowrap}
.number-tolerance{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px 12px;margin-top:8px;padding:9px 11px;border:1px solid var(--line);border-radius:10px;background:var(--panel);font-weight:700;font-size:.9rem}
.number-range{display:flex;align-items:center;gap:5px;font-family:var(--english)}
.number-range :is(span,strong){min-width:29px;text-align:center;padding:2px 6px;border:1px solid var(--line);border-radius:6px}
.number-range strong{background:#d7fa70;color:#233218;border-color:#d7fa70}
.number-range i{color:var(--muted);font-style:normal}

.masthead-start{display:flex;align-items:center;gap:7px;min-width:0;justify-self:start}
.masthead .owner-button{white-space:nowrap;min-height:40px;padding-inline:11px;background:#203d32;border-color:#648275;color:#eff9eb}
[data-theme="light"] .masthead .owner-button{color:#214838;background:#e7f3e8;border-color:#bbcfbe}
.owner-form{display:grid;gap:10px;margin-top:14px}
.owner-form label{display:grid;gap:5px;font-weight:700}
.owner-form input{width:100%;min-height:44px;padding:8px 10px;border:1px solid var(--line);border-radius:8px;background:var(--panel)}
#owner-link{text-decoration:none;text-align:center}
@media(max-width:640px){
  .masthead-start{gap:4px}
  .masthead .owner-button{min-height:36px;padding-inline:7px}
  .masthead .owner-button [data-icon],.masthead .masthead-help-label{display:none}
  .masthead-start .help-button{width:34px;min-height:36px;padding:0}
  .masthead .masthead-start .help-button [data-icon]{display:inline-grid}
}

#guest-note,.guest-activity #guest-list-status{color:var(--muted)}
.guest-activity{border-block:1px solid var(--line);padding-block:10px}
.guest-activity h3{margin:0 0 6px;text-align:start;font-size:1.06rem}
#more-guests{margin-top:8px}

[data-team="0"]{--team:#a2cdff;--team-edge:#557faa;--team-bg:#20334c}
[data-team="1"]{--team:#ffadb4;--team-edge:#a46067;--team-bg:#482930}
[data-theme="light"] [data-team="0"]{--team:#174d86;--team-edge:#8bb1d8;--team-bg:#e5f0fd}
[data-theme="light"] [data-team="1"]{--team:#8f2937;--team-edge:#d3989e;--team-bg:#fcebed}
.team-turn{display:inline-flex;align-items:center;gap:7px;max-width:100%;padding:4px 10px;border-radius:8px;border:1px solid var(--team-edge);background:var(--team-bg);color:var(--team);font-size:.87rem;line-height:1.55}
.team-turn i{width:8px;height:8px;border-radius:50%;background:currentColor;flex:none}
.team-turn span{white-space:nowrap}
.team-turn strong{overflow-wrap:anywhere}
#question-turn{display:flex;justify-content:flex-start;margin-bottom:5px}
.team-score[data-team]{border-inline-start:3px solid var(--team-edge)}
.team-score.current[data-team]{border-color:var(--team-edge);background:var(--team-bg)}
.team-score[data-team] strong{color:var(--team)}
.question-clock[data-team], [data-theme="light"] .question-clock[data-team]{--clock-color:var(--team);background:var(--team-bg);border-color:var(--team-edge)}
.judge[data-team], [data-theme="light"] .judge[data-team]{background:var(--team-bg);color:var(--team);border-color:var(--team-edge)}
.number-tolerance{margin:0 0 10px;display:grid;gap:6px;border-color:#718651}
.number-tolerance p{display:flex;gap:7px;align-items:center;font-size:.88rem}
.number-tolerance p strong{color:var(--ink);font-family:var(--english)}
.number-range{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}
.number-range :is(span,strong){display:grid;gap:2px;padding:4px}
.number-range small{font-size:.75rem;font-weight:700}
.number-range b{font-size:1rem}
@media(max-width:700px){
  .game-head{gap:8px;margin-bottom:7px}
  .game-head h1{font-size:1.22rem}
  .game-head p{font-size:.82rem}
  .difficulty-legend{margin-bottom:5px;gap:4px}
  .difficulty-legend span{font-size:.68rem;padding:2px 6px}
  .team-score{padding:5px 7px;gap:4px}
  .team-score h2{font-size:.78rem}
  .team-score strong{font-size:1.15rem}
  .team-turn{font-size:.78rem;padding:3px 8px}
  .point{min-height:44px}
  #question-dialog{width:calc(100% - 16px);max-height:calc(100dvh - 16px);border-radius:14px}
  #question-dialog .dialog-inner{padding:11px 11px 13px}
  #question-dialog .dialog-close{width:34px;min-height:34px;top:8px;left:8px}
  .question-meta{margin-bottom:6px;padding-left:37px;gap:4px}
  .question-meta span,.question-meta b{font-size:.72rem;padding:2px 6px}
  .question-tools{margin-bottom:6px}
  .question-tools button{min-height:32px}
  .question-cover{margin-bottom:5px}
  .question-cover img{height:64px}
  .question-clock{margin-bottom:8px;padding:5px 8px}
  .clock-label{font-size:.82rem}
  .question-block{margin-bottom:8px}
  .question-block h2{font-size:clamp(1.05rem,4.6vw,1.23rem);line-height:1.45}
  .question-en{font-size:.95rem;line-height:1.4;margin-top:5px;padding-top:5px}
  .question-image{margin-bottom:8px;padding:4px}
  .question-image img,.question-image.show-still img{min-height:0;max-height:min(155px,27dvh)}
  .question-image.card-image img{max-height:min(125px,22dvh)}
  .answer{margin-bottom:8px;padding:7px 9px}
  .answer p{font-size:1.04rem}
  .answer .answer-en{font-size:.91rem;margin-top:4px}
  .judgment h3{font-size:1rem;margin-bottom:5px}
}
@media(max-width:560px){
  .category{min-height:118px;aspect-ratio:auto}
  .category:has(.category-poster){min-height:134px}
  .category .tile-visual{min-height:52px;padding:3px 0}
  .category .category-art,.category .category-poster{max-height:72px}
}

.player-controls { display: flex; justify-content: flex-end; margin-bottom: 8px; }
.player-list { display: grid; gap: 9px; }
.player-card { display: grid; gap: 4px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; overflow-wrap: anywhere; }
.player-card > span, .player-card > p { color: var(--muted); font-size: .86rem; }
.player-card .dialog-buttons { margin-top: 4px; }
#guest-action-status:empty, #guest-list-status:empty { display: none; }
