.room-main { padding-block: 33px 52px; width: min(1050px, calc(100% - 40px)); }
.room-nav { flex-wrap: nowrap; }
.room-main h1 { font-size: clamp(2rem, 5vw, 3.35rem); letter-spacing: -.05em; line-height: 1.08; }
.room-main h1:focus { outline: none; }
.room-hero { display: grid; grid-template-columns: 1.2fr .8fr; align-items: center; gap: 20px; padding: 29px 32px; margin-bottom: 16px; border-radius: 19px; background: var(--deep); color: white; }
.room-hero p { margin: 8px 0 0; color: #e4dcf7; max-width: 46ch; }
.room-orbits { min-height: 124px; position: relative; overflow: hidden; display: grid; place-items: center; }
.room-orbits::before, .room-orbits::after { content: ""; position: absolute; width: 82%; height: 68%; border-radius: 50%; border: 1px solid #9e86ce; transform: rotate(-18deg); }
.room-orbits::after { width: 65%; height: 50%; opacity: .6; }
.room-orbits span { color: var(--lime); font-size: 64px; }
.entry-grid, .report-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 15px; }
.room-box { border: 1px solid var(--line); border-radius: 17px; padding: 22px; background: white; min-width: 0; }
.room-box p { margin: 7px 0 0; }
.room-box hr { border: 0; border-top: 1px solid var(--line); margin: 19px 0; }
.student-entry { max-width: 560px; margin-inline: auto; }
.room-header .room-mode { margin-top: 8px; color: var(--purple); }
.game-reward { display: flex; flex-wrap: wrap; gap: 2px 12px; align-items: center; margin-block: 10px; padding: 10px 12px; border-radius: 10px; }
.game-reward.streak { background: #fff0cd; }
.game-reward.energy { background: #e4f6eb; }
.game-reward progress { flex-basis: 100%; margin: 3px 0; accent-color: #24633f; }
.team-scoreboard { margin: 12px 0; }
.team-scores { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 7px; }
.team-score { display: grid; gap: 3px; padding: 10px; border-radius: 10px; background: #eee7ff; }
.team-score.team-1 { background: #ffedd8; }
.community-title { font-size: 1.25rem; }
.community-search { display: flex; align-items: end; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.community-search label { flex: 1 1 220px; }
.community-detail .button { margin-inline-end: 8px; }
.community-detail .review li { margin-block: 12px; }
.play-stage .question { padding: 15px 14px; border-radius: 12px; background: #f2eaff; }
.play-stage .room-options .answer { min-height: 96px; font-size: clamp(1rem, 2.5vw, 1.25rem); }
.play-stage .room-options li:nth-child(4n + 1) .answer:not(.good):not(.bad) { background: #f0e6ff; }
.play-stage .room-options li:nth-child(4n + 2) .answer:not(.good):not(.bad) { background: #e1f7ef; }
.play-stage .room-options li:nth-child(4n + 3) .answer:not(.good):not(.bad) { background: #fff0d8; }
.play-stage .room-options li:nth-child(4n + 4) .answer:not(.good):not(.bad) { background: #e9efff; }
.signal-board { margin-block: 12px; padding: 14px; border-radius: 13px; background: #25204c; color: white; }
.signal-board > p { color: #eee7ff; }
.signal-board ol { margin: 6px 0 0; padding-left: 22px; }
.signal-stations { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.signal-station { display: grid; gap: 3px; justify-items: center; min-height: 64px; color: #242046; background: #eee7ff; border: 1px solid #fff; border-radius: 12px; font-weight: 700; overflow-wrap: anywhere; }
.signal-station:hover { background: #fff; }
.signal-station span { color: var(--purple); font-size: 23px; }
.room-box form { margin-top: 13px; }
.room-box .button { margin-top: 12px; }
.room-box .button:disabled { opacity: .63; }
.room-box label + label { margin-top: 9px; }
.host-mode-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 135px), 1fr)); gap: 8px; }
.host-mode-card { display: flex; align-items: center; gap: 7px; min-height: 52px; margin: 0 !important; padding: 7px 9px; border: 1px solid var(--line); border-radius: 10px; background: #faf8ff; cursor: pointer; }
.host-mode-card input { flex: none; width: 16px; min-height: 16px; margin: 0; padding: 0; accent-color: var(--purple); }
.host-mode-card:has(input:checked) { background: #efe7ff; border-color: var(--purple); }
.mode-symbol { align-self: center; color: var(--purple); font-size: 19px; }
.room-check { display: flex; align-items: center; gap: 8px; margin-top: 11px; }
.room-check input { width: 20px; min-height: 20px; accent-color: var(--purple); }
.assignment-invitation { margin-bottom: 14px; }
.class-history { list-style: none; padding: 0; }
.class-history li { padding: 12px 0; border-bottom: 1px solid var(--line); }
.class-history li p { margin: 3px 0 0; color: var(--muted); }
.upper-code { text-transform: uppercase; letter-spacing: .13em; font-weight: 750; }
.room-header { display: flex; justify-content: space-between; align-items: center; gap: 15px; margin-bottom: 16px; }
.room-header p { margin: 0 0 5px; color: var(--muted); font-weight: 650; }
.room-header .button { flex-shrink: 0; }
.room-code { display: block; margin: 4px 0; color: var(--purple); font-size: clamp(2rem, 5vw, 3.1rem); font-weight: 850; letter-spacing: .12em; font-variant-numeric: tabular-nums; overflow-wrap: normal; }
.room-box .room-expires { margin-top: 13px; }
.invite-qr { display: block; inline-size: min(100%, 162px); block-size: auto; image-rendering: pixelated; background: white; }
.invite-display { text-align: center; }
.invite-display form { margin: 0; }
.invite-display h2 { padding-inline: 24px; }
.invite-display .room-code { font-size: clamp(2.5rem, 12vw, 5rem); }
.invite-display .invite-qr { inline-size: min(100%, 270px); margin-inline: auto; }
.room-preview { margin-top: 12px; }
.room-preview summary { min-height: 44px; padding-block: 9px; }
.room-preview ol { padding-left: 22px; }
.room-preview li + li { margin-top: 7px; }
.room-roster { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; }
.room-roster li { padding: 5px 10px; background: #f1ebff; border-radius: 8px; overflow-wrap: anywhere; }
.player-badge { color: var(--purple); font-size: 1.1em; margin-right: 6px; }
.badge-options { margin-bottom: 0; }
.badge-options > div { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 9px; }
.badge-options label { display: flex; align-items: center; gap: 5px; min-height: 44px; margin: 0 !important; font-size: 14px; cursor: pointer; }
.badge-options input { width: 16px; min-height: 16px; margin: 0; accent-color: var(--purple); }
.badge-options .player-badge { margin-right: 0; }
.room-stage { max-width: 800px; margin-inline: auto; }
.room-stage progress { display: block; margin: 8px 0 16px; }
.room-stage .question { margin: 12px 0; }
.room-stage .answers { margin-bottom: 12px; }
.room-options { list-style: none; padding: 0; }
.room-options button { width: 100%; }
.room-stage .answer.is-selected { box-shadow: inset 0 0 0 2px var(--purple); }
.room-stage .feedback { margin-bottom: 3px; }
.room-stage .button { margin-top: 10px; }
.room-notice { position: sticky; bottom: 12px; width: fit-content; max-width: 100%; margin: 12px 0 0; padding: 9px 13px; border-radius: 10px; border: 1px solid #d4c6f1; background: #f3edff; color: var(--ink); }
.room-notice[data-error="true"] { border-color: #cc7770; background: #fff0ec; }
.room-box h3 { font-size: 1rem; }
.report-intro { margin-bottom: 15px; }
.report-grid { grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); }
.report-list { display: grid; gap: 8px; margin-top: 14px; }
.report-list details { border: 1px solid var(--line); border-radius: 10px; background: #fbfaff; }
.report-list summary { min-height: 44px; padding: 10px; overflow-wrap: anywhere; }
.report-detail { padding: 0 10px 11px; font-size: 15px; }
.report-detail ol, .report-detail ul { padding-left: 22px; }
.report-detail li + li { margin-top: 6px; }
.report-bad { color: #852c35; }
.score-strip { display: flex; flex-wrap: wrap; gap: 7px 12px; padding: 0; margin: 6px 0 0; list-style: none; font-weight: 650; }
.score-strip li { margin: 0 !important; }
meter { height: 12px; width: 100%; }
@media (max-width: 680px) {
  .room-main { width: calc(100% - 28px); padding-top: 18px; }
  .room-hero { grid-template-columns: 1fr; padding: 20px; }
  .room-orbits { display: none; }
  .entry-grid, .report-grid { grid-template-columns: 1fr; }
  .room-box { padding: 16px; }
  .room-header { align-items: flex-start; flex-direction: column-reverse; }
}
@media (max-width: 400px) {
  .room-stage .answers { grid-template-columns: 1fr; }
}
