:root { color-scheme: light; --paper: #f8f5ec; --ink: #243831; --muted: #6a746a; --line: #dedfd2; --green: #275b49; --yellow: #f9d66b; --pink: #f1c7c2; --white: #fffef9; --radius: 22px; font-family: 'Avenir Next', Avenir, 'Trebuchet MS', system-ui, sans-serif; font-synthesis: none; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); line-height: 1.5; }
button, input, select { font: inherit; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; color: inherit; }
button:disabled { cursor: default; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid #bf6841; outline-offset: 4px; }
h1:focus { outline: none; }
button, input, select { min-height: 44px; }
a { color: var(--green); text-underline-offset: 4px; }
input:not([type='radio']):not([type='checkbox']), select { display: block; width: 100%; border: 1.5px solid var(--line); background: var(--white); border-radius: 11px; padding: 12px 15px; color: var(--ink); font-size: 16px; }
input:not([type='radio']):not([type='checkbox']):focus { border-color: var(--green); }
input:disabled, select:disabled { opacity: .75; background: #f1f1e9; }
input[type='checkbox'] { accent-color: var(--green); width: 25px; height: 25px; min-height: 25px; flex-shrink: 0; }
label, legend { font-weight: 650; font-size: 14px; }
label[for] { display: block; margin: 24px 0 8px; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(30px, 4.7vw, 48px); line-height: 1.12; letter-spacing: -1.8px; font-weight: 800; }
h2 { font-size: 21px; line-height: 1.3; letter-spacing: -.6px; }
p + p { margin-top: 12px; }
.masthead { max-width: 1240px; margin: auto; padding: 30px 44px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 850; letter-spacing: -.3px; text-decoration: none; color: var(--ink); }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--green); color: var(--yellow); font-size: 28px; line-height: 1; }
.masthead-note { font-size: 12px; font-weight: 600; color: var(--muted); }
main { min-height: calc(100dvh - 184px); max-width: 1200px; margin: auto; padding: 26px 44px 56px; }
footer { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 26px 20px; font-size: 11px; color: var(--muted); border-top: 1px solid var(--line); text-align: center; }
footer span { color: var(--green); font-size: 21px; }
.welcome { display: grid; grid-template-columns: 1.2fr 1fr; gap: 76px; align-items: center; padding: 20px 0 35px; }
.welcome-copy { position: relative; }
.eyebrow { display: block; font-size: 11px; letter-spacing: 1.5px; font-weight: 800; line-height: 1.7; color: var(--green); }
.tiny-star { font-size: 20px; margin-right: 5px; vertical-align: -2px; }
.welcome h1 { font-size: clamp(46px, 5.6vw, 72px); line-height: 1.03; letter-spacing: -3.5px; margin: 20px 0 24px; }
.welcome h1 em { font-family: Georgia, serif; font-weight: 500; color: var(--green); font-size: .9em; letter-spacing: -3px; }
.lead { font-size: 16px; color: var(--muted); line-height: 1.7; margin-top: 14px; }
.lead strong { color: var(--ink); font-weight: 650; }
.how-it-works { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 24px; font-size: 11px; font-weight: 650; }
.how-it-works b { font-size: 10px; color: var(--green); margin-right: 3px; }
.welcome-art { position: relative; width: 340px; height: 200px; margin: 24px 0 0 15px; }
.art-answer { position: absolute; top: 20px; left: 0; width: 210px; height: 132px; background: var(--yellow); border: 1.5px solid var(--ink); border-radius: 17px; transform: rotate(-7deg); padding: 17px; font-size: 11px; box-shadow: 3px 4px 0 var(--ink); }
.art-answer strong { display: block; max-width: 140px; margin-top: 7px; font-size: 19px; line-height: 1.2; letter-spacing: -.5px; }
.art-answer > span { position: absolute; right: 12px; bottom: 10px; font-size: 42px; }
.art-person { position: absolute; top: 68px; right: 0; width: 160px; background: var(--pink); border: 1.5px solid var(--ink); border-radius: 17px; padding: 11px 16px; transform: rotate(8deg); box-shadow: 3px 4px 0 var(--ink); font-size: 38px; line-height: 1.3; }
.art-person strong, .art-person > span { display: block; font-size: 12px; }
.art-person > span { font-size: 10px; margin-top: 5px; }
.art-spark { position: absolute; right: 5px; top: 0; font-size: 60px; line-height: 1; color: var(--green); transform: rotate(10deg); }
.panel { border: 1px solid var(--line); background: var(--white); border-radius: var(--radius); }
.entry { padding: 22px 30px 26px; box-shadow: 0 7px 0 #e9eadf; }
.entry-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; border-radius: 12px; background: #eeefe6; padding: 5px; margin-bottom: 27px; }
.tab { border: none; border-radius: 9px; background: transparent; color: var(--muted); font-size: 13px; font-weight: 750; }
.tab.active { background: var(--white); color: var(--ink); box-shadow: 0 2px 5px #24383112; }
.entry h2 { font-size: 24px; }
.entry h2 + p { margin-top: 7px; font-size: 12px; }
.muted { color: var(--muted); }
.small { font-size: 12px; font-weight: 500; }
.emoji-picker { border: none; padding: 0; margin: 22px 0 26px; display: grid; grid-template-columns: repeat(8, 1fr); gap: 5px; }
.emoji-picker legend { margin-bottom: 12px; }
.emoji-option { position: relative; cursor: pointer; display: block; min-width: 0; }
.emoji-option input { position: absolute; width: 100%; height: 100%; opacity: 0; margin: 0; cursor: pointer; }
.emoji-option span { display: grid; place-items: center; min-height: 40px; border-radius: 10px; border: 1.5px solid transparent; font-size: 25px; }
.emoji-option input:checked + span { background: #fce8a7; border-color: #be9226; }
.emoji-option input:focus-visible + span { outline: 3px solid #bf6841; outline-offset: 2px; }
.button { border-radius: 12px; padding: 13px 22px; border: 1px solid transparent; font-weight: 750; font-size: 14px; display: inline-flex; gap: 16px; align-items: center; justify-content: center; transition: background .15s, transform .15s; }
.primary { background: var(--green); color: #fffef6; box-shadow: 0 3px 0 #193c30; }
.primary:hover:not(:disabled) { background: #1b4939; transform: translateY(-1px); }
.button:disabled { background: #d6dbce; color: #6e7867; box-shadow: none; }
.wide { width: 100%; }
.entry-note { text-align: center; font-size: 10px; color: var(--muted); margin-top: 18px; }
.code-input { text-transform: uppercase; letter-spacing: 5px; font-weight: 800; }
.notice, .connection { position: sticky; top: 10px; z-index: 20; max-width: 700px; margin: 8px auto; padding: 12px 20px; background: var(--yellow); border: 1px solid #d6b350; border-radius: 12px; font-size: 14px; box-shadow: 0 4px 10px #24383115; }
.connection { background: #f8dfc1; }
.confirm-dialog { border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); color: var(--ink); padding: 28px; max-width: min(440px, calc(100% - 32px)); box-shadow: 0 20px 70px #142d3240; }
.confirm-dialog::backdrop { background: #1b332b70; }
.confirm-dialog > p { margin-top: 14px; font-size: 14px; color: var(--muted); }
.modal-actions { display: flex; justify-content: end; flex-wrap: wrap; gap: 12px; margin-top: 25px; }
.modal-actions .cancel { background: #efefe6; }
[hidden] { display: none !important; }
.game-shell { max-width: 1020px; margin: auto; }
.room-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); padding-bottom: 20px; margin-bottom: 32px; font-size: 12px; }
.room-pill { background: #e8ecdf; border: 1px solid #d8ddcd; border-radius: 10px; font-size: 10px; letter-spacing: 1px; padding-left: 12px; white-space: nowrap; }
.room-pill button { border: none; background: none; font-weight: 800; letter-spacing: 2px; padding: 4px 12px; color: var(--green); font-size: 17px; }
.room-person { margin-left: auto; display: flex; gap: 7px; align-items: center; }
.tag, .count-badge { font-size: 10px; font-weight: 750; border: 1px solid var(--line); border-radius: 7px; padding: 3px 7px; background: #f0f0e7; }
.text-button { background: transparent; border: none; color: var(--green); text-decoration: underline; text-underline-offset: 4px; padding: 5px 8px; font-size: 12px; font-weight: 650; }
.text-button:hover { color: #133b2b; }
.text-button:disabled { opacity: .5; }
.leave { color: var(--muted); }
.section-heading { margin: 12px 0 32px; }
.section-heading h1 { margin-top: 12px; }
.section-heading .lead { max-width: 660px; font-size: 15px; }
.lobby-layout { display: grid; grid-template-columns: 1.2fr 1fr; align-items: start; gap: 24px; }
.lobby-players, .settings { padding: 26px; }
.panel-title { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.player-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 24px; }
.player-tile { min-width: 0; display: flex; align-items: center; text-align: center; flex-direction: column; background: #f3f3e9; border: 1px solid transparent; border-radius: 14px; padding: 16px 6px 12px; font-size: 12px; gap: 4px; }
.player-tile strong { overflow-wrap: anywhere; }
.player-tile .small { font-size: 10px; }
.player-tile .text-button { min-height: 32px; }
.player-tile.is-me { background: #fff2c5; border-color: #e2c66c; }
.player-tile.empty { border: 1px dashed #d8dbcc; background: transparent; color: var(--muted); justify-content: center; font-size: 10px; }
.avatar { font-size: 34px; display: inline-block; line-height: 1.4; flex-shrink: 0; }
.lobby-bottom { margin-top: 25px; text-align: center; }
.lobby-bottom > p { margin-top: 12px; }
.settings > p { font-size: 12px; margin: 8px 0 22px; }
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 14px; }
.settings-grid label { font-size: 11px; }
.settings-grid select { margin-top: 7px; font-size: 14px; padding: 10px; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 15px; border-top: 1px solid var(--line); margin-top: 24px; padding-top: 20px; font-size: 13px; }
.toggle-row .small { display: block; font-size: 10px; margin-top: 3px; }
.shared-screen { font-size: 12px; color: var(--muted); text-align: center; margin-top: 26px; }
.shared-screen a { display: inline-block; padding: 10px; font-weight: 650; }
.stage-meta { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 20px 0; }
.dot { padding: 0 8px; }
.timer { display: inline-flex; align-items: center; gap: 7px; border-radius: 9px; padding: 7px 12px; background: #e9ecde; white-space: nowrap; font-size: 14px; font-weight: 750; font-variant-numeric: tabular-nums; }
.timer.urgent { background: #f4d8c9; color: #7c3c22; }
.theme-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.theme-card { text-align: left; padding: 30px 24px; transition: transform .2s, box-shadow .2s; }
.theme-card:nth-child(1) { background: #fae8b1; }
.theme-card:nth-child(2) { background: #dce7ce; }
.theme-card:nth-child(3) { background: #eed8d3; }
.theme-card:hover:not(:disabled) { transform: translateY(-5px) rotate(-1deg); box-shadow: 0 7px 0 #24383118; }
.theme-card:disabled { opacity: .85; }
.theme-emoji { display: block; font-size: 60px; margin-bottom: 35px; }
.theme-card h2 { font-size: 25px; margin-bottom: 10px; }
.theme-card > span:last-child { font-size: 12px; }
.centered { text-align: center; margin-top: 18px; }
.host-controls { display: flex; gap: 10px; align-items: center; justify-content: center; flex-wrap: wrap; margin-top: 35px; border-top: 1px dashed var(--line); padding-top: 12px; font-size: 10px; color: var(--muted); }
.question-list { display: grid; gap: 18px; }
.question-card { padding: 25px 30px; }
.question-number { color: var(--green); font-size: 10px; letter-spacing: 1.4px; font-weight: 800; margin-bottom: 10px; }
.question-card h2 { margin-bottom: 20px; font-size: 22px; }
.question-foot { margin-top: 8px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.question-foot .small { font-size: 11px; }
.yesno { display: flex; gap: 10px; border: none; padding: 0; margin: 0; }
.yesno label { position: relative; flex: 1; cursor: pointer; }
.yesno input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.yesno span { display: block; text-align: center; border: 1.5px solid var(--line); border-radius: 10px; padding: 12px 18px; }
.yesno input:checked + span { border-color: var(--green); background: #e6ecdc; }
.yesno input:focus-visible + span { outline: 3px solid #bf6841; outline-offset: 3px; }
.yesno input:disabled + span { opacity: .65; }
.submit-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 26px; }
.waiting { display: flex; gap: 8px; justify-content: center; align-items: center; margin-top: 24px; color: var(--muted); font-size: 12px; }
.waiting-dot { width: 7px; height: 7px; background: #8eaa78; border-radius: 50%; }
.waiting-names { font-size: 19px; letter-spacing: 2px; margin-left: 8px; }
.submitted-banner { padding: 16px; margin-top: 22px; background: #e7eddd; color: var(--green); border-radius: 12px; text-align: center; font-weight: 650; font-size: 14px; }
.matching-layout { display: grid; grid-template-columns: .85fr 1.3fr; gap: 25px; align-items: start; }
.answer-bank { padding: 22px; position: sticky; top: 16px; }
.answer-bank h2 { font-size: 18px; }
.answer-bank > p { margin-top: 7px; font-size: 11px; }
.answer-cards { display: grid; gap: 12px; margin-top: 22px; }
.answer-card { background: #f9dfa0; border: 1.5px solid #d3b65e; box-shadow: 0 3px 0 #e2cf94; border-radius: 11px; display: flex; align-items: center; text-align: left; gap: 10px; padding: 14px; font-weight: 650; font-size: 15px; overflow-wrap: anywhere; touch-action: none; user-select: none; }
.answer-card > span { color: #8f783c; font-size: 20px; }
.answer-card.is-selected { outline: 3px solid var(--green); outline-offset: 3px; background: #fff0bf; }
.answer-card.dragging { opacity: .4; }
.answer-card:disabled { opacity: .75; }
.selection-hint { font-size: 11px; color: var(--muted); margin-top: 20px; }
.all-placed { color: var(--green); text-align: center; font-size: 40px; padding: 20px; }
.all-placed p { font-size: 12px; }
.match-slots { display: grid; gap: 12px; }
.match-slot { border: 1.5px dashed #bbc9ad; border-radius: 15px; background: #fffef9; text-align: left; padding: 15px 18px; transition: border .15s, background .15s; min-height: 102px; }
.match-slot.fixed { border-style: solid; border-color: var(--line); background: #eeefe6; }
.match-slot.filled { border-style: solid; border-color: #a8b995; background: #edf2e4; }
.match-slot.drag-over { outline: 3px solid var(--green); background: #dce8c9; }
.slot-person { display: flex; align-items: center; gap: 12px; }
.slot-person .avatar { font-size: 26px; }
.slot-person strong { font-size: 14px; overflow-wrap: anywhere; }
.slot-answer { display: block; padding-left: 44px; font-size: 15px; font-weight: 650; overflow-wrap: anywhere; }
.drop-hint { color: #73806b; font-size: 12px; font-weight: 500; }
.slot-note { display: block; padding-left: 44px; color: var(--muted); font-size: 10px; margin-top: 4px; }
.drag-ghost { position: fixed; left: 0; top: 0; z-index: 100; max-width: 260px; background: var(--yellow); padding: 16px 20px; border: 2px solid var(--green); border-radius: 12px; pointer-events: none; box-shadow: 0 8px 25px #24383130; font-weight: 700; overflow-wrap: anywhere; }
.reveal-list { display: grid; gap: 18px; }
.reveal-card { padding: 24px 28px; animation: arrive .25s ease-out; }
.reveal-author { display: flex; align-items: center; gap: 18px; }
.reveal-author .avatar { font-size: 46px; }
.reveal-author h2 { font-size: 26px; margin-top: 3px; overflow-wrap: anywhere; }
.guess-results { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.guess-result { display: inline-grid; grid-template-columns: 1fr auto; gap: 3px 14px; border-radius: 10px; background: #f0f0e8; padding: 9px 13px; font-size: 12px; }
.guess-result .small { grid-column: 1 / -1; font-size: 10px; color: var(--muted); }
.guess-result.correct { background: #e5edda; }
.guess-result.correct strong { color: var(--green); }
.reveal-ready { padding: 45px 25px; text-align: center; }
.reveal-ready h2 { margin: 15px 0 8px; }
.big-emoji { font-size: 64px; display: block; }
.reveal-actions { display: flex; align-items: center; flex-direction: column; gap: 14px; margin-top: 30px; position: sticky; bottom: 12px; z-index: 5; background: var(--paper); padding: 14px 0; border-radius: 15px; }
.leaderboard { max-width: 640px; margin: auto; padding: 22px 26px; }
.leader-row { display: flex; align-items: center; gap: 18px; padding: 15px 12px; border-bottom: 1px solid var(--line); }
.leader-row:last-child { border-bottom: 0; }
.leader-row.winner { background: #fff0bc; border-radius: 12px; }
.rank { color: var(--muted); font-size: 15px; font-weight: 750; width: 15px; }
.leader-row strong { font-size: 16px; overflow-wrap: anywhere; }
.score { margin-left: auto; font-size: 27px; font-weight: 850; text-align: center; }
.score > span { display: block; font-size: 9px; letter-spacing: .5px; font-weight: 500; color: var(--muted); }
.trophy { text-align: center; font-size: 68px; padding: 8px 0 20px; }
.loading { text-align: center; padding: 90px 20px; }
.loading h1 { font-size: 26px; margin-top: 25px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@keyframes arrive { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@media (min-width: 1400px) { .welcome { padding-top: 55px; } }
@media (max-width: 950px) { .welcome { gap: 35px; } main, .masthead { padding-left: 28px; padding-right: 28px; } .welcome h1 { font-size: 58px; } .entry { padding: 22px; } .welcome-art { transform: scale(.85); transform-origin: left top; margin-bottom: -25px; } .lobby-layout { grid-template-columns: 1fr 1fr; } .player-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) {
  .masthead { padding: 20px; } .masthead-note { display: none; } .brand { font-size: 16px; } main { padding: 10px 20px 40px; } footer { padding: 20px 12px; font-size: 9px; gap: 8px; }
  .welcome { grid-template-columns: 1fr; gap: 30px; padding: 15px 0; } .welcome h1 { font-size: 58px; line-height: 1.02; margin: 16px 0 20px; } .welcome h1 br:nth-of-type(2) { display: none; } .welcome h1 em { display: block; font-size: .71em; letter-spacing: -2px; margin-top: 10px; } .welcome .eyebrow { font-size: 9px; letter-spacing: 1px; } .welcome .lead { font-size: 14px; } .welcome-art { display: none; } .how-it-works { gap: 5px 12px; font-size: 10px; margin-top: 20px; }
  .entry { padding: 20px; } .entry-tabs { margin-bottom: 24px; } .entry h2 { font-size: 23px; } .emoji-option span { min-height: 40px; font-size: 25px; } .entry-note { font-size: 10px; }
  .room-header { gap: 8px; flex-wrap: wrap; margin-bottom: 22px; padding-bottom: 14px; } .room-person { font-size: 11px; gap: 5px; } .room-header .leave { width: 100%; text-align: right; min-height: 25px; padding: 0; font-size: 10px; margin-top: -3px; } .room-pill { font-size: 9px; } .room-pill button { font-size: 16px; } .tag { font-size: 8px; }
  .section-heading { margin-bottom: 24px; } .section-heading h1 { font-size: 33px; letter-spacing: -1.3px; } .section-heading .lead { font-size: 13px; line-height: 1.6; } .eyebrow { font-size: 9px; letter-spacing: 1.2px; }
  .lobby-layout { grid-template-columns: 1fr; gap: 20px; } .lobby-players, .settings { padding: 22px; } .player-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; } .player-tile { padding: 12px 4px; font-size: 11px; } .player-tile .avatar { font-size: 30px; } .settings-grid { gap: 18px; }
  .stage-meta { margin-top: 15px; } .timer { font-size: 12px; padding: 7px 9px; } .dot { padding: 0 3px; }
  .theme-grid { grid-template-columns: 1fr; gap: 12px; } .theme-card { display: grid; grid-template-columns: 55px 1fr; gap: 3px 20px; align-items: center; padding: 22px; } .theme-emoji { font-size: 44px; margin: 0; grid-row: 1 / 3; } .theme-card h2 { font-size: 23px; margin: 0; } .theme-card > span:last-child { font-size: 11px; }
  .question-card { padding: 22px; } .question-card h2 { font-size: 21px; } .question-foot { align-items: start; } .question-foot .small { font-size: 10px; } .question-foot button { white-space: nowrap; padding-right: 0; } .question-card input:not([type='radio']) { padding: 12px; }
  .submit-row { flex-direction: column; gap: 14px; align-items: stretch; } .submit-row > span { text-align: center; font-size: 11px; } .submit-row .button { width: 100%; } .waiting-names { letter-spacing: 0; }
  .matching-layout { grid-template-columns: 1fr; gap: 18px; } .answer-bank { position: static; padding: 20px; } .answer-cards { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; } .answer-card { padding: 11px 13px; font-size: 14px; max-width: 100%; flex-grow: 1; } .selection-hint { margin-top: 14px; } .all-placed { padding: 4px; width: 100%; font-size: 26px; } .all-placed p { display: inline; margin-left: 10px; }
  .match-slot { padding: 12px 16px; min-height: 95px; } .slot-person .avatar { font-size: 25px; } .slot-answer { font-size: 14px; } .match-slots { gap: 10px; }
  .reveal-card { padding: 20px; } .reveal-author { gap: 13px; } .reveal-author .avatar { font-size: 36px; } .reveal-author h2 { font-size: 22px; } .guess-results { gap: 7px; } .guess-result { padding: 9px; font-size: 11px; }
  .leaderboard { padding: 15px; } .leader-row { gap: 12px; padding: 13px 8px; } .leader-row .avatar { font-size: 28px; } .leader-row strong { font-size: 14px; } .rank { width: 12px; font-size: 13px; } .score { font-size: 24px; }
  .notice, .connection { margin: 8px 12px; padding: 10px 15px; font-size: 12px; }
}
@media (max-width: 360px) { main { padding-left: 14px; padding-right: 14px; } .welcome h1 { font-size: 49px; } .emoji-picker { grid-template-columns: repeat(4, 1fr); } .player-grid { grid-template-columns: repeat(2, 1fr); } .room-person { font-size: 10px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
