/* Set-first quiz workspace and Gold Rush. */
.topbar,body.classroom-mode .topbar,:root[data-theme=dark] .topbar { background:transparent!important; }
.brand-button,.brand-button:hover,.brand-button:active,:root[data-theme=dark] .brand-button {background:transparent!important;border:0!important;box-shadow:none!important;color:var(--text)!important;}
.set-toolbar {display:flex;gap:12px;align-items:center;justify-content:space-between;margin:22px 0 12px;flex-wrap:wrap;}
.set-toolbar input {flex:1;max-width:380px;}
.set-library {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;}
.set-card {background:var(--surface);border:1px solid var(--border);border-radius:12px;overflow:hidden;display:flex;flex-direction:column;}
.set-cover {background:var(--accent-soft);height:100px;display:grid;place-items:center;overflow:hidden;color:var(--accent-2);}
.set-cover img {width:100%;height:100%;object-fit:contain;background:white;}
.set-cover svg {width:52px;height:52px;}
.set-card-body {padding:16px;display:flex;flex-direction:column;gap:12px;flex:1;}
.set-card h3 {margin:0;font-size:17px;}
.set-card small {color:var(--text-soft);}
.set-card-actions {display:flex;gap:8px;flex-wrap:wrap;margin-top:auto;}
.set-preview-list {display:grid;gap:12px;max-height:55vh;overflow:auto;padding:4px;}
.set-preview-question {border-bottom:1px solid var(--border);padding:12px 0;}
.set-preview-question h3 {font-size:16px;margin:0 0 12px;}
.set-preview-question img {max-width:100%;height:160px;object-fit:contain;background:#fff;display:block;margin-bottom:12px;}
.set-preview-answer {color:var(--success);margin-top:8px;}
.mode-picker {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:22px 0;}
.game-mode-choice {text-align:left;border:1px solid var(--border);border-radius:12px;background:var(--surface-2);padding:18px 14px;cursor:pointer;display:grid;gap:10px;transition:transform .16s,border-color .16s;}
.game-mode-choice:hover {transform:translateY(-3px);border-color:var(--accent);}
.game-mode-choice[aria-pressed=true] {border:2px solid var(--accent);background:var(--accent-soft);padding:17px 13px;}
.game-mode-choice svg {width:55px;height:55px;}
.game-mode-choice span {font-size:12px;color:var(--text-soft);}
.host-config-title {margin:0;font-size:20px;}
.host-setup-actions,.lobby-tools {display:flex;gap:10px;flex-wrap:wrap;margin:18px 0;}
.host-setup-actions .big-action {width:auto;margin:0;}
.game-stage.gold-stage {position:relative;padding:24px;border:1px solid #7653a1;background:var(--surface)!important;}
.gold-game-toolbar {display:flex;justify-content:space-between;align-items:center;gap:12px;margin:0 0 18px;color:var(--text-soft);font-size:13px;}
.gold-game-toolbar strong {font-size:20px;color:var(--text);font-variant-numeric:tabular-nums;}
.gold-stage .player-prompt {font-size:clamp(20px,4vw,30px);font-weight:800;text-align:center;padding:24px 12px;line-height:1.3;min-height:100px;}
.gold-stage .player-answer {background:var(--surface-2)!important;color:var(--text)!important;min-height:92px;border:1px solid var(--border)!important;border-left:5px solid var(--answer-color)!important;display:flex;gap:16px;text-align:left;padding:18px;}
.gold-stage .player-answer>span {width:34px;height:34px;flex-basis:34px;font-size:18px;}
.gold-stage .player-answer>strong {font-size:16px;line-height:1.4;font-weight:600;}
.gold-stage .option-0 {--answer-color:#ed5a70;}.gold-stage .option-1 {--answer-color:#5f9ced;}.gold-stage .option-2 {--answer-color:#e2b54e;}.gold-stage .option-3 {--answer-color:#61b989;}
.gold-stage .player-answer:hover:enabled {background:var(--hover)!important;transform:translateY(-2px);}
.gold-stage .chest-grid {gap:16px;margin:14px 0 24px;}
.gold-stage .chest-grid button {background:var(--surface-2)!important;border:2px solid var(--border)!important;border-radius:16px;min-height:185px;padding:20px 10px;cursor:pointer;transition:transform .18s,border-color .18s;}
.gold-stage .chest-grid button:hover:enabled {transform:translateY(-6px) rotate(-2deg);border-color:#e9b94d!important;}
.gold-stage .chest-grid button.is-open {border-color:#e9b94d!important;background:var(--accent-soft)!important;}
.chest-art {width:min(140px,100%);height:110px;display:block;margin:auto;filter:drop-shadow(0 7px 0 rgba(0,0,0,.15));}
.chest-art .chest-lid {transform-origin:30px 45px;transition:transform .3s;}
.is-open .chest-lid {transform:translateY(-13px) rotate(-12deg);}
.gold-result-card {padding:18px;text-align:center;background:var(--accent-soft);border-radius:12px;margin:12px 0;animation:reward-pop .3s ease;}
.reward-emoji {font-size:55px;line-height:1.2;display:block;margin-bottom:8px;}
.gold-result-card strong {display:block;font-size:24px;}
.gold-next {display:block;margin:18px auto 8px;min-width:170px;}
.gold-targets {display:grid;gap:10px;max-height:320px;overflow:auto;}
.gold-targets button {display:flex;justify-content:space-between;gap:12px;background:var(--surface-2);color:var(--text);border:1px solid var(--border);border-radius:10px;padding:16px;cursor:pointer;}
.gold-targets button:hover {background:var(--hover);border-color:var(--accent);}
.gold-standing {margin-top:24px;border-top:1px solid var(--border);padding-top:12px;}
.gold-standing summary {cursor:pointer;color:var(--text-soft);font-size:13px;}
.gold-notice {min-height:24px;margin-top:10px;color:var(--text-soft);font-size:13px;text-align:center;}
.gold-host-heading {display:flex;justify-content:center;align-items:center;gap:18px;margin:22px 0;}
.gold-host-heading strong {font-size:36px;margin:0;color:var(--text);}
.gold-host-heading .chest-art {width:100px;height:90px;margin:0;}
#hostGame.gold-host .host-question-card {background:transparent!important;border:0;padding:0;}
#hostGame.gold-host .leader-row {padding:18px;margin:8px 0;font-size:20px;}
#hostGame.gold-host #hostProgress {font-size:13px;}
#hostGame.gold-host .timer {font-size:30px;min-width:100px;}
.preview-badge {color:var(--accent);font-weight:700;}
@keyframes reward-pop {from {opacity:0;transform:scale(.92);}to {opacity:1;transform:scale(1);}}
@media(max-width:680px){.set-library{grid-template-columns:repeat(2,minmax(0,1fr));}.mode-picker{grid-template-columns:repeat(2,minmax(0,1fr));}.game-stage.gold-stage{padding:16px;}.gold-stage .chest-grid{gap:8px;}.gold-stage .chest-grid button{min-height:145px;padding:14px 4px;}.chest-art{height:85px;}.gold-stage .player-answer{padding:14px;min-height:80px;}.gold-stage .player-answer>strong{font-size:14px;}.gold-host-heading strong{font-size:28px;}}
@media(max-width:380px){.set-library{grid-template-columns:1fr;}}
@media(prefers-reduced-motion:reduce){.chest-art .chest-lid,.game-mode-choice,.gold-stage .chest-grid button{transition:none;}.gold-result-card{animation:none;}}

.quiz-masthead {place-items:start;min-height:0;padding:28px 0 20px!important;}
.quiz-masthead h1 {font-size:36px;letter-spacing:-1px;}
.library-block:has(#setLibrary) {padding:20px;}
.set-toolbar {margin-top:0;}
#setSearch {max-width:380px;}
#hostGameMode {display:none;}
#hostGameModeLabel {font-weight:700;}
label:has(> #hostGameMode) {display:none;}
.set-preview-question h3 label {display:flex;gap:12px;align-items:baseline;}
.set-preview-question input {flex:none;}

.gold-stage .player-answer>span {background:var(--surface-3)!important;color:var(--text)!important;border-radius:6px;}
.game-settings{margin:22px 0;padding:20px;background:var(--surface-2);border-radius:16px;border:1px solid var(--border)}
.game-settings input,.setup-grid input{width:100%;box-sizing:border-box;min-height:44px;padding:10px;border:1px solid var(--border);border-radius:9px;background:var(--surface);color:var(--text);font:inherit}
.game-settings small,.settings-note{font-size:13px;color:var(--muted);line-height:1.6}.settings-note:empty{display:none}
.round-choices{gap:14px}.round-choices button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;min-height:180px;background:var(--surface-2);border:2px solid var(--border);color:var(--text)}
.round-choice-icon{font-size:52px}.round-choices small{font-size:12px;line-height:1.5;color:var(--muted)}
.round-board{padding:15px 18px;border:1px solid var(--border);border-radius:14px;margin:18px 0;background:var(--surface-2)}
.round-board-row+ .round-board-row{margin-top:12px}.round-board-row>div:first-child{display:flex;justify-content:space-between;gap:10px;font-size:12px;margin-bottom:5px}.round-board-row span{color:var(--muted)}
.round-track{height:8px;border-radius:20px;background:var(--surface-3);overflow:hidden}.round-track>span{display:block;height:100%;background:var(--accent,#9b6aff);transition:width .4s ease}
.teacher-table{border-collapse:collapse;width:100%;font-size:14px;line-height:1.5;text-align:left}.teacher-table th,.teacher-table td{border-bottom:1px solid var(--border);padding:12px;vertical-align:top}.teacher-table th{color:var(--muted);font-size:12px}.report-scroll{overflow:auto}.teacher-table td:first-child{min-width:140px}#teacherReportBody h3{margin-top:28px}#teacherReportBody details{margin-top:25px}#teacherReportBody summary{cursor:pointer;font-weight:700}
#viewGameReport{margin-top:22px}.host-setup-actions a{align-self:center}.editor-top-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
@media(max-width:600px){.game-settings{padding:14px}.round-choices{gap:7px}.round-choices button{padding:10px 6px;min-height:140px}.round-choice-icon{font-size:35px}.round-choices strong{font-size:13px}.round-choices small{font-size:10px}.round-board{padding:12px}.mode-picker{grid-template-columns:repeat(2,minmax(0,1fr))}}

.pause-notice{padding:12px;border-radius:10px;background:var(--accent-soft);color:var(--text);text-align:center;font-weight:700}.round-track{position:relative}.round-track::after{content:"";position:absolute;right:2px;top:0;width:5px;height:100%;background:repeating-linear-gradient(0deg,var(--text) 0 2px,var(--surface) 2px 4px)}

@media(min-width:850px){.mode-picker{grid-template-columns:repeat(3,minmax(0,1fr))}}
