/* Sunny classroom theme. Load after game.css; keep game state and layout semantics. */
:root {
  color-scheme: light;
  color: #224a4a;
  background: #fff9e8;
  --ink: #224a4a;
  --muted: #547167;
  --gold: #eca63d;
  --teal: #128f7c;
  --line: #e4ddc4;
}
body {
  background:
    radial-gradient(ellipse at 49% 17%, #fff0a9 0, #fff6d955 31%, transparent 59%),
    radial-gradient(ellipse at 4% 68%, #c9f4df88, transparent 45%),
    radial-gradient(ellipse at 100% 64%, #ffd3b677, transparent 45%),
    linear-gradient(180deg, #fffdf3 0%, #fff8e7 68%, #fff0cf 100%);
}
button:disabled { opacity: .55; }
button:focus-visible, input:focus-visible, select:focus-visible, [tabindex]:focus-visible {
  outline-color: #c36b28;
}
.arena-bg:before {
  content: "";
  position: absolute;
  width: 700px;
  height: 700px;
  left: calc(50% - 350px);
  top: -365px;
  border-radius: 50%;
  border: 45px solid #ffc76a18;
  box-shadow: 0 0 0 38px #ffdc8b16, 0 0 0 82px #fff1bc55;
}
.arena-bg:after {
  opacity: .8;
  background-image: radial-gradient(#e4a45555 1.25px, transparent 1.75px), radial-gradient(#4bbba744 1.2px, transparent 1.7px);
  background-size: 43px 43px, 67px 67px;
  background-position: 0 0, 19px 21px;
  mask-image: linear-gradient(#000, #0007 35%, transparent 90%);
}
.floor {
  opacity: .8;
  background-image: linear-gradient(#d6b76226 1px, transparent 1px), linear-gradient(90deg, #d6b76226 1px, transparent 1px);
}
.beam { opacity: .14; background: linear-gradient(90deg, transparent, #7be4c7, transparent); }
.beam-right { background: linear-gradient(90deg, transparent, #ffc77f, transparent); }
.floating-letter { -webkit-text-stroke: 2px #e8b26233; color: #ffe3a619; }
.f2 { -webkit-text-stroke-color: #e9956d33; color: #ffccb619; }
.f3 { -webkit-text-stroke-color: #4bbb9f2c; color: #c9efdc20; }
.game-app { padding-top: 18px; }
.topbar { padding-bottom: 14px; border-bottom-color: #e2d5b4; }
.brand { color: #236356; }
.brand-star { color: #12aa8d; text-shadow: 0 3px 0 #fff, 0 5px 14px #58bf8d30; }
.brand div>span { color: #56715f; }
.game-title h1 { color: #167d6d; filter: none; text-shadow: 0 2px 0 #fff, 0 4px 0 #d0e4be; }
.game-title>span { color: #915f29; }
.icon-button {
  color: #446f64;
  background: #fffdf6e6;
  border-color: #ded9bf;
  box-shadow: 0 3px 0 #e9dbbb80;
}
.icon-button[aria-pressed=true] { color: #0c816c; background: #d9f7e9; border-color: #9edcc5; }
.match-strip { padding-top: 14px; padding-bottom: 8px; }
.round-tag { color: #527064; }
.round-markers i { background: #dfdfc6; }
.round-markers i.done { background: #35b59a; }
.round-markers i.current { background: #edac43; box-shadow: 0 0 0 2px #fff9e5; }
.mode-switch { background: #fff8e7; border-color: #e4d4af; box-shadow: 0 3px 0 #ecd9b078; }
.mode-switch button { color: #62664f; }
.mode-switch button[aria-pressed=true] {
  background: linear-gradient(#a6f0d3, #6cddba);
  color: #155d4f;
  box-shadow: 0 2px 0 #48b89a, 0 3px 9px #61946a16;
}
.points-rule { color: #8e692d; }
.points-rule svg { color: #d69127; }
.arena {
  grid-template-columns: minmax(0, 1fr) minmax(360px, 500px) minmax(0, 1fr);
  max-width: 1420px;
  gap: 24px;
}
.player {
  --accent: #159e87;
  --deep: #08745f;
  --tint: #dff6e9;
  --button-top: #89e8c8;
  --button-bottom: #4bd6ad;
  --button-shadow: #20a780;
  border: 2px solid #a9dcc7;
  border-top: 5px solid #3ab596;
  background: linear-gradient(145deg, #fcfff6 0%, #eefbf2 60%, #e0f5e8 100%);
  box-shadow: 0 7px 0 #b4d9b85c, 0 18px 30px #8c976315;
  border-radius: 25px;
}
.player-two {
  --accent: #dc7a45;
  --deep: #ab5327;
  --tint: #fff0da;
  --button-top: #ffcea4;
  --button-bottom: #ffb071;
  --button-shadow: #df8850;
  border-color: #efc09e;
  border-top-color: #ee9b63;
  background: linear-gradient(215deg, #fffdf5 0%, #fff4e9 60%, #ffe6d5 100%);
  box-shadow: 0 7px 0 #e4c7a45c, 0 18px 30px #a2876f15;
}
.player.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px #fffdf0, 0 0 0 7px color-mix(in srgb, var(--accent), transparent 69%), 0 16px 28px #a4824d1c;
}
.player.active:before { background: #ffc44e; box-shadow: 0 0 0 2px #fff9dc; }
.player-number { color: var(--deep); }
.player-state { color: #57705e; background: #ffffffb0; border-color: #c9dfca; }
.active .player-state { color: #fff; background: var(--deep); border-color: var(--deep); }
.player-name { color: #244d45; }
.player-emblem { background: linear-gradient(145deg, var(--accent), var(--deep)); }
.player-emblem svg { fill: #fff5d8; }
.score { color: var(--accent); text-shadow: 0 2px 0 #fff, 0 4px 0 color-mix(in srgb, var(--accent), white 72%); }
.player-two .score { color: #bd642e; }
.score-caption b { color: #405f51; }
.score-caption span { color: #58705a; }
.point-pop { color: #bb7217; text-shadow: 0 2px 0 #fff9e3; }
.attempt-row, .word-shelf { border-color: #9dbd9b45; }
.attempt-row>span { color: #59715d; }
.attempt { background: #ffffff99; border-color: #b7cdbb; color: #60765e; }
.attempt.good { background: var(--deep); border-color: var(--deep); color: #fff; }
.attempt.miss { background: #eeeada; border-color: #c8c4b1; color: #716f57; }
.answer-label { color: #365f50; }
.input-shell input {
  color: #244c42;
  background: #fffef8;
  border: 2px solid #bed7c0;
  box-shadow: inset 0 3px 0 #d6e8c82b;
}
.input-shell input::placeholder { color: #62725a; }
.input-shell input:disabled { opacity: .7; background: #fffdf4b3; }
.active .input-shell input:not(:disabled) { border-color: var(--accent); }
.input-letter { color: var(--deep); opacity: .85; }
.submit-button {
  background: linear-gradient(var(--button-top), var(--button-bottom));
  border-color: #ffffffb3;
  color: #235344;
  box-shadow: 0 4px 0 var(--button-shadow), 0 5px 10px #a18b4012;
}
.player-two .submit-button { color: #713e20; }
.pass-button { color: #786c50; background: #fffaf0; border-color: #dccba8; box-shadow: 0 2px 0 #eadab8; }
.player-error { color: #a24e2c; }
.shelf-label { color: #58715b; }
.shelf-label>span:last-child { color: var(--deep); }
.word-list { scrollbar-color: #a1cfb7 transparent; }
.word-chip { background: #ffffffad; border-color: color-mix(in srgb, var(--accent), white 66%); color: var(--deep); }
.empty-words { color: #61745c; }
.speak-visual { color: var(--deep); background: #ffffff9e; border-color: #b4d3b9; }
.speak-visual>span { color: #55735c; }
.speak-mode .answer-label { color: #58715b; }
.sound-bars i { background: var(--accent); }
.member-line { margin: 5px 0 0; color: #526f59; font-size: 12px; line-height: 1.4; }
.member-line:empty { display: none; }
#competitionBar { color: #5b755e; }
.wheel-kicker { color: #7b6735; }
.az-pill { color: #8a6123; background: #fff8df; border-color: #e6ca8c; box-shadow: 0 2px 0 #f3dfb4; }
.az-pill>span { color: #796535; border-color: #dfc890; }
.wheel-zone { padding-top: 14px; padding-bottom: 20px; }
.wheel-surface {
  width: min(100%, 480px);
  filter: drop-shadow(0 6px 0 #c58f45) drop-shadow(0 10px 0 #eccb8c) drop-shadow(0 18px 22px #a77e3f2e);
}
.wheel-pointer { top: -3px; filter: drop-shadow(0 3px 0 #c0803a); }
.wheel-hub { background: linear-gradient(135deg, #fff9d2, #f6be62 75%); box-shadow: 0 4px 0 #c18c3f, 0 6px 12px #a180442d; }
.hub-inner {
  color: #22796c;
  background: radial-gradient(circle at 35% 20%, #fffef0, #fff0ba 65%, #ffe39f);
  border-color: #deae55;
  box-shadow: inset 0 2px 0 #fff, inset 0 -4px 9px #e3ad4a22;
}
.hub-top { color: #756131; }
.hub-bottom { color: #86551d; }
.hub-top, .hub-bottom { font-size: 9px; letter-spacing: 1.1px; }
.hub-inner strong { font-size: 62px; color: #1e8270; text-shadow: 0 2px 0 #fff; }
.hub-inner strong.idle { font-size: 24px; }
.orbit { width: 100%; border: 2px dashed #e6b95655; }
.orbit-two { width: 94%; border: 1px solid #7dc9aa38; box-shadow: 0 0 55px #ffe6a955; }
.orbit-star { color: #efa329; text-shadow: 0 2px 0 #fff9e8; animation: sunshineTwinkle 3.8s ease-in-out infinite alternate; }
.os2 { color: #35ae90; animation-delay: 1.1s; }
.wheel-plinth { background: #bd924c24; filter: blur(4px); }
.gesture-hint { color: #796938; }
.gesture-hint svg { color: #cb8a28; }
.gesture-hint.inactive { opacity: .5; }
.duel-status { min-height: 56px; margin-top: 10px; margin-bottom: 8px; }
.status-copy h2 { color: #ad6a24; }
.status-copy p { color: #62704f; }
.status-copy h2.active-one { color: #138673; }
.status-copy h2.active-two { color: #c87337; }
.timer { color: #2a675a; }
.timer-track { stroke: #d9e8c9; }
.timer-progress { stroke: #24a88a; }
.timer.urgent .timer-progress { stroke: #db7f37; }
.gold-button {
  color: #7b4b18;
  background: linear-gradient(#ffebaa, #ffc96f);
  border-color: #fff9db;
  box-shadow: 0 4px 0 #d69844, 0 7px 13px #b7a16a20;
}
.outline-button { background: #fffaf0; color: #5f704f; border-color: #d5d4b3; box-shadow: 0 2px 0 #e6dcbc; }
.text-button { color: #5b6f50; }
.text-button:hover { color: #26745e; background: #fff8e9b3; }
.countdown { background: #fff8dce6; color: #dc8438; text-shadow: 0 5px 0 #fffef0, 0 9px 0 #e5bb6355; }
.bottom-bar { margin-top: 10px; }
.feedback { color: #34735a; }
.bottom-rules { color: #786f4b; }
.separator { color: #ca9a42; }
.winner-ribbon { color: #88521d; border-color: #fff6cc; background: linear-gradient(#fff0b8, #ffc45a); box-shadow: 0 4px 0 #d89b40; }
.player.winner { border-color: #e7ac42; box-shadow: 0 0 0 4px #fff6cf, 0 0 0 7px #edc66a4a, 0 12px 30px #d9b45f2b; }
.player.runner .player-state { color: #956039; border-color: #e3bd96; background: #fff7ea; }
.modal {
  color: #355e50;
  background: linear-gradient(140deg, #fffef5, #fff3d9);
  border-color: #e2c68d;
  box-shadow: 0 25px 100px #5d6c4059;
}
.modal::backdrop { background: #456e5c4d; backdrop-filter: blur(7px); }
.modal-head { color: #277765; background: #fff8e4; border-color: #ebdbb7; }
.modal-head h2 { color: #2c7d67; }
.modal-intro { color: #5c715a; }
.fields label { color: #53725e; }
.fields input:not([type=range]), .fields select { color: #315d4d; background-color: #fffefa; border-color: #c5d6b6; }
.fields input[type=range] { accent-color: #2dab88; }
.fields select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24'%3E%3Cpath d='m7 10 5 5 5-5' fill='none' stroke='%236f8864' stroke-width='2'/%3E%3C/svg%3E");
}
.alphabet-preview { color: #267455; background: #edf7df; border-color: #cadbb4; }
.small-note { color: #64734f; }
.rules li::marker { color: #25a481; }
.teacher-note { color: #537251; background: #edf7e5; border-color: #cedebe; }
.result-overlay { background: #647d554f; backdrop-filter: blur(9px); }
.result-card {
  border-color: #e9ba57;
  color: #527653;
  background: radial-gradient(ellipse at top, #fff0af, #fffdf1 58%, #fff4da);
  box-shadow: 0 0 0 7px #fff9d780, 0 25px 80px #6d754b45;
}
.trophy-art { filter: drop-shadow(0 10px 15px #ba85252c); }
.result-kicker { color: #28784f; }
.result-card h2 { color: #ba7628; text-shadow: 0 2px 0 #fff; }
.result-card>p { color: #62714e; }
.result-scores { background: #ffffffc4; border-color: #e9dbb6; box-shadow: 0 3px 0 #eeddb13b; }
.result-scores>span { color: #7c704d; }
.result-scores b { color: #189a80; }
.result-scores>div:last-child b { color: #d97a42; }
.result-scores small { color: #587052; }

@keyframes sunshineTwinkle {
  from { opacity: .72; scale: .92; }
  to { opacity: 1; scale: 1.09; }
}

@media (min-width: 801px) and (min-height: 831px) {
  .wheel-surface { width: min(100%, clamp(355px, calc(100svh - 470px), 480px)); }
}
@media (min-width: 801px) and (max-width: 1150px) {
  .arena { grid-template-columns: minmax(0, 1fr) minmax(270px, 365px) minmax(0, 1fr); gap: 17px; }
  .wheel-surface { width: min(100%, 355px); }
  .hub-inner strong { font-size: 46px; }
  .hub-inner strong.idle { font-size: 18px; }
  .hub-top, .hub-bottom { font-size: 7px; letter-spacing: .8px; }
}
/* Reserve headroom for the round/competition strip on classroom boards. */
@media (min-width: 801px) and (max-height: 830px) {
  .game-app { padding: 10px 24px 8px; }
  .topbar { padding-bottom: 8px; }
  .game-title h1 { font-size: 30px; }
  .game-title>span { display: none; }
  .match-strip { padding: 8px 0 6px; }
  .mode-switch { padding: 3px; }
  .mode-switch button { min-height: 33px; padding: 8px 15px; font-size: 13px; }
  .arena { grid-template-columns: minmax(0, 1fr) minmax(300px, 380px) minmax(0, 1fr); gap: 22px; margin-top: 4px; }
  .wheel-head, .gesture-hint { display: none; }
  .wheel-surface { width: min(100%, 330px); }
  .wheel-zone { padding: 10px 0 14px; }
  .wheel-pointer { width: 34px; height: 45px; top: -8px; }
  .hub-inner strong, .wheel-hub .hub-inner strong { font-size: 43px; }
  .hub-inner strong.idle, .wheel-hub .hub-inner strong.idle { font-size: 17px; }
  .hub-top, .hub-bottom { font-size: 7px; letter-spacing: .7px; }
  .duel-status { min-height: 49px; margin: 7px 0; }
  .status-copy h2 { font-size: 21px; }
  .status-copy p { font-size: 13px; }
  .center-actions { min-height: 45px; }
  .gold-button, .outline-button { min-height: 44px; padding: 10px 17px; }
  .match-tools { margin-top: 6px; }
  .text-button { padding-top: 6px; padding-bottom: 6px; }
  .bottom-bar { margin-top: 8px; }
  .feedback { min-height: 20px; }
  .bottom-rules { margin-top: 4px; }
  .player { padding: 16px 17px 12px; }
  .member-line { font-size: 12px; margin-top: 4px; }
  .player-name { margin-top: 10px; }
}
@media (min-width: 801px) and (max-width: 950px) and (max-height: 830px) {
  .arena { grid-template-columns: minmax(0, 1fr) minmax(260px, 310px) minmax(0, 1fr); gap: 15px; }
  .wheel-surface { width: min(100%, 310px); }
  .player { padding-left: 12px; padding-right: 12px; }
}
@media (min-width: 801px) and (max-height: 680px) {
  .wheel-surface { width: min(100%, 300px); }
  .wheel-zone { padding-top: 7px; padding-bottom: 10px; }
  .bottom-rules { display: none; }
}
@media (max-width: 800px) {
  .game-app { padding: 13px 14px; }
  .topbar { padding-bottom: 12px; }
  .arena { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; max-width: 550px; }
  .player { border-radius: 19px; border-top-width: 4px; padding: 13px 12px 12px; }
  .player-state { font-size: 8px; }
  .player.active { box-shadow: 0 0 0 3px #fffdf0, 0 0 0 5px color-mix(in srgb, var(--accent), transparent 72%), 0 8px 18px #a4824d1a; }
  .player-name { font-size: 18px; }
  .score { font-size: 58px; }
  .wheel-head { display: flex; margin-top: 0; }
  .wheel-zone { padding-top: 16px; padding-bottom: 22px; }
  .wheel-surface { width: min(100%, 340px); max-width: 100%; }
  .wheel-pointer { width: 35px; height: 46px; top: -3px; }
  .wheel-hub { padding: 5px; }
  .hub-inner strong { font-size: 45px; }
  .hub-inner strong.idle { font-size: 18px; }
  .hub-top, .hub-bottom { font-size: 7px; letter-spacing: .7px; }
  .orbit { width: min(100%, 355px); max-width: 100%; }
  .orbit-two { width: min(90%, 325px); }
  .os1 { left: 3%; }
  .os2 { right: 3%; }
  .gesture-hint { display: flex; font-size: 12px; }
  .duel-status { margin-top: 12px; margin-bottom: 9px; }
  .status-copy h2 { font-size: 22px; }
  .member-line { font-size: 11px; line-height: 1.35; }
  .result-card h2 { font-size: 31px; }
  .result-scores b { font-size: 42px; }
  .modal-head h2 { font-size: 22px; }
}
@media (max-width: 380px) {
  .game-app { padding: 10px; }
  .arena { gap: 10px; }
  .player { padding: 11px 10px; }
  .player-name { font-size: 16px; }
  .score { font-size: 52px; }
  .wheel-surface { width: min(100%, 325px); }
  .hub-top, .hub-bottom { font-size: 6.5px; letter-spacing: .6px; }
}
@media (prefers-reduced-motion: reduce) {
  .orbit-star, .floating-letter, .beam { animation: none !important; }
}
