:root { color-scheme: dark; font-family: "Segoe UI", sans-serif; background: #0c0d19; color: #f7f5ff; font-synthesis: none; }
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: radial-gradient(ellipse at 12% 0%, #272044 0, transparent 38%), radial-gradient(ellipse at 95% 35%, #171a39 0, transparent 40%), #0c0d19; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; border: 0; border-radius: 12px; background: #c6f36b; color: #171d0c; padding: 13px 20px; font-weight: 800; transition: transform .15s, background .15s; }
button:hover:not(:disabled) { transform: translateY(-2px); background: #dcff98; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid #c6f36b; outline-offset: 3px; }
button:disabled { cursor: default; }
input, select, textarea { width: 100%; min-width: 0; background: #10111f; color: #fff; border: 1px solid #39394e; border-radius: 10px; padding: 12px 14px; }
textarea { min-height: 100px; resize: vertical; margin: 8px 0 12px; }
label { display: block; color: #bebbd0; font-size: .82rem; font-weight: 700; }
label input { display: block; margin-top: 8px; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-family: "Segoe UI", sans-serif; }
h1 { font-size: clamp(1.05rem, 3vw, 1.45rem); letter-spacing: -.05em; margin: 4px 0 0; }
h1 span { color: #c6f36b; }
h2 { letter-spacing: -.04em; font-size: clamp(1.3rem, 3vw, 2rem); margin-bottom: 14px; }
h3 { font-size: 1rem; margin-top: 28px; }
.shell { max-width: 1510px; margin: auto; padding: 0 32px; }
header { min-height: 106px; display: flex; justify-content: space-between; align-items: center; gap: 20px; border-bottom: 1px solid #ffffff12; }
.eyebrow { color: #aca7c8; font-size: .65rem; font-weight: 800; letter-spacing: .18em; margin-bottom: 10px; }
.connection { color: #f6aa9d; font-size: .78rem; font-weight: 700; text-align: right; }
.connection.online { color: #c6f36b; }
.header-controls { display: flex; align-items: center; gap: 18px; }
.sound-toggle { padding: 9px 12px; background: #ffffff0d; color: #d7d2e8; font-size: .72rem; white-space: nowrap; }
.sound-toggle:hover:not(:disabled) { background: #ffffff19; }
main { padding: 42px 0; min-height: calc(100vh - 175px); }
footer { color: #77738d; border-top: 1px solid #ffffff12; padding: 23px 0; font-size: .75rem; }
.card { background: linear-gradient(145deg, #212137, #171827); border: 1px solid #ffffff12; box-shadow: 0 20px 60px #00000024; border-radius: 20px; }
.login { max-width: 550px; margin: 8vh auto 0; padding: clamp(25px, 5vw, 45px); }
.login h2 { font-size: clamp(1.5rem, 4vw, 2.4rem); }
.login form { margin-top: 26px; }
.login form label { margin-bottom: 9px; }
details { border-top: 1px solid #ffffff17; margin-top: 30px; padding-top: 18px; color: #b6b2cb; font-size: .9rem; }
summary { cursor: pointer; }
.inline { display: flex; gap: 10px; align-items: end; }
.inline button { white-space: nowrap; }
.muted { color: #aaa7bd; line-height: 1.6; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; align-items: start; gap: 22px; }
.sidebar { padding: 24px; }
.sidebar-head, .section-title, .question-top { display: flex; justify-content: space-between; align-items: start; gap: 15px; }
.sidebar h2 { font-size: 1.2rem; }
.pill, .tag { display: inline-block; border-radius: 100px; background: #ffffff0d; color: #cbc6df; padding: 8px 11px; font-size: .6rem; font-weight: 800; letter-spacing: .1em; white-space: nowrap; }
.player { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 17px 0; border-bottom: 1px solid #ffffff0f; font-size: .9rem; overflow-wrap: anywhere; }
.player b { color: #c6f36b; font-size: 1rem; }
.player small, .final-list small { color: #88859c; }
.dot { display: inline-block; border-radius: 50%; width: 7px; height: 7px; background: #736f80; margin-right: 9px; vertical-align: middle; }
.dot.active { background: #c6f36b; box-shadow: 0 0 8px #c6f36b80; }
.adjust-form { margin-top: 26px; }
.adjust-form select { margin: 8px 0; }
.adjust-form .inline { align-items: stretch; }
.adjust-form button { padding: 8px; font-size: .75rem; }
.hero { padding: clamp(30px, 6vw, 65px); min-height: 480px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; }
.hero h2 { font-size: clamp(2rem, 4vw, 3.5rem); line-height: 1.2; }
.hero h2 em { color: #c6f36b; font-style: normal; }
.hero .muted { max-width: 470px; }
.settings { display: flex; align-items: end; gap: 12px; flex-wrap: wrap; margin: 24px 0; }
.settings label { width: 150px; }
.large { padding: 16px 25px; }
.secondary { background: #35354c; color: #f4f2ff; }
.secondary:hover:not(:disabled) { background: #484861; }
.ghost { background: transparent; color: #aaa7bd; border: 1px solid #4b495f; }
.ghost:hover:not(:disabled) { background: #35354c; }
.success { background: #c6f36b; }
.danger { background: #fa9b93; color: #311412; }
.selected { box-shadow: 0 0 0 3px #ffffff; }
.waiting { color: #c6f36b; font-weight: 700; margin: 24px 0 0; }
.section-title { margin: 4px 0 24px; }
.board { display: grid; gap: 9px; }
.board-row { display: grid; grid-template-columns: minmax(140px, 1.7fr) repeat(5, minmax(60px, 1fr)); gap: 9px; }
.category { background: #2a293f; border: 1px solid #ffffff0a; border-radius: 12px; padding: 15px; display: flex; align-items: center; overflow-wrap: anywhere; font-weight: 800; font-size: clamp(.72rem, 1.2vw, .95rem); }
.tile { border: 1px solid #7770bf55; background: linear-gradient(145deg, #52468d, #302a63); border-radius: 12px; min-height: 88px; color: #f4ecb1; font-family: "Segoe UI", sans-serif; font-size: clamp(.9rem, 1.6vw, 1.35rem); }
.tile:hover:not(:disabled) { background: #6a5ca5; }
.tile.used { background: #232337; color: #68677b; }
.question { padding: clamp(24px, 5vw, 48px); }
.question-top h2 span { color: #aaa7bd; font: 600 .85rem "Segoe UI", sans-serif; letter-spacing: 0; }
.timer { text-align: right; color: #c6f36b; }
.timer span { display: block; font-size: .6rem; letter-spacing: .15em; font-weight: 800; }
.timer strong { font-family: "Segoe UI", sans-serif; font-size: 1.5rem; }
.tag { color: #e7d5ff; background: #7562b350; margin: 12px 0; }
.prompt { font-size: clamp(1.15rem, 2.7vw, 1.8rem); line-height: 1.4; font-weight: 800; margin: 30px 0; }
.revealed-answer { font-size: clamp(1.35rem, 3.2vw, 2.2rem); line-height: 1.4; font-weight: 800; color: #c6f36b; margin: 30px 0; }
.question-image { display: block; max-width: 100%; max-height: 62vh; object-fit: contain; border-radius: 12px; margin: 20px auto; }
.status { color: #c9c4df; font-weight: 700; margin: 25px 0 15px; }
.buzzer { background: #c6f36b; width: min(100%, 380px); min-height: 90px; font: 700 1.4rem "Segoe UI", sans-serif; letter-spacing: .08em; box-shadow: 0 7px 0 #709533, 0 18px 30px #0004; margin: 8px 0 16px; }
.controls { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
.answer-box { border-left: 3px solid #c6f36b; background: #c6f36b0c; padding: 20px; border-radius: 0 12px 12px 0; margin-top: 25px; }
.answer-box p:last-child { margin-bottom: 0; }
.final-list { margin-top: 20px; }
.final-list > div { display: flex; justify-content: space-between; gap: 15px; align-items: center; border-bottom: 1px solid #ffffff15; padding: 16px 0; }
.final-list b { color: #c6f36b; }
.final-entry p { margin: 5px 0 0; color: #aaa7bd; overflow-wrap: anywhere; }
.final-entry .controls { margin: 0; }
#notice { padding: 15px 20px; margin-bottom: 20px; border: 1px solid #fa9b93; background: #6c3130; border-radius: 12px; }
[hidden] { display: none !important; }
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { order: 2; }
  .board-row { grid-template-columns: minmax(110px, 1.4fr) repeat(5, minmax(44px, 1fr)); gap: 5px; }
  .board { gap: 5px; }
  .tile { min-height: 70px; padding: 8px 2px; }
  .category { padding: 9px; }
}
@media (max-width: 520px) {
  .shell { padding: 0 15px; }
  header { min-height: 85px; }
  .header-controls { gap: 8px; }
  .sound-toggle { padding: 8px; font-size: .65rem; }
  main { padding: 24px 0; }
  .board-row { grid-template-columns: minmax(78px, 1.3fr) repeat(5, minmax(35px, 1fr)); }
  .category { font-size: .62rem; }
  .tile { font-size: .73rem; min-height: 58px; }
  .inline { flex-wrap: wrap; }
  .inline button { flex-grow: 1; }
  .final-entry { flex-wrap: wrap; }
  .timer strong { font-size: 1.1rem; }
}
