:root {
  --bg: #f7f6f2;
  --surface: #ffffff;
  --surface-2: #f2f4f7;
  --surface-3: #e9edf2;
  --ink: #18202b;
  --ink-soft: #344054;
  --muted: #697386;
  --border: #dce1e8;
  --border-soft: #e9ecf0;
  --blue: #315cf5;
  --blue-hover: #2449d8;
  --blue-soft: #eef2ff;
  --green: #238656;
  --green-soft: #edf8f1;
  --coral: #d84c55;
  --coral-hover: #bd3842;
  --coral-soft: #fff1f2;
  --amber: #9b6511;
  --amber-soft: #fff8e8;
  --mint: var(--green);
  --mint-dim: var(--green-soft);
  --berry: var(--coral);
  --berry-dim: var(--coral-soft);
  --danger: var(--coral);
  --focus: #1e50f0;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .05), 0 4px 14px rgba(16, 24, 40, .04);
  --shadow: 0 18px 50px rgba(16, 24, 40, .10);
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 20px;
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { min-width: 320px; min-height: 100%; background: var(--bg); scroll-behavior: smooth; }
body { min-height: 100vh; margin: 0; overflow-x: hidden; background: var(--bg); color: var(--ink); }
button, input { font: inherit; }
button, label[for] { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, label[for]:focus-within { outline: 3px solid rgba(49, 92, 245, .24); outline-offset: 2px; }
a { color: inherit; }
.hidden { display: none !important; }
.visually-hidden { position: fixed !important; left: -10000px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }
.ambient { display: none; }

.site-header {
  position: relative;
  z-index: 10;
  width: min(calc(100% - 40px), 1120px);
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--border-soft);
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-size: 15px; font-weight: 760; letter-spacing: -.02em; }
.coin { width: 30px; height: 30px; display: inline-grid; place-items: center; flex: none; border: 1.5px solid var(--blue); border-radius: 50%; background: var(--surface); color: var(--blue); font-family: Georgia, serif; font-size: 15px; font-weight: 700; }
.header-promise { margin: 0; color: var(--muted); font-size: 12px; }
.header-promise span { margin-right: 5px; color: var(--green); font-weight: 800; }

#app { width: min(calc(100% - 40px), 1120px); margin: 0 auto; }
.view { width: 100%; }
.kicker { margin: 0 0 14px; color: var(--blue); font-size: 11px; font-weight: 780; letter-spacing: .12em; text-transform: uppercase; }

.landing { min-height: calc(100vh - 72px); display: block; padding: 66px 0 46px; }
.hero-copy { width: min(100%, 900px); margin: 0 auto; text-align: center; }
.hero-copy h1 { margin: 0; color: var(--ink); font-family: Georgia, "Times New Roman", serif; font-size: clamp(45px, 6vw, 68px); font-weight: 500; letter-spacing: -.045em; line-height: 1.03; }
.lede { width: min(100%, 690px); margin: 22px auto 30px; color: var(--muted); font-size: 17px; line-height: 1.65; }
.mode-cards { width: min(100%, 730px); margin: 0 auto; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; text-align: left; }
.mode-card { min-height: 250px; padding: 24px; display: flex; flex-direction: column; align-items: flex-start; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); transition: border-color .18s, box-shadow .18s, transform .18s; }
.mode-card:hover { transform: translateY(-2px); border-color: #bec9f8; box-shadow: 0 12px 30px rgba(16, 24, 40, .09); }
.mode-card h2 { margin: 16px 0 7px; font-size: 19px; letter-spacing: -.02em; }
.mode-card p { margin: 0 0 22px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.mode-card .button { margin-top: auto; }
.mode-icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: var(--blue-soft); color: var(--blue); font-size: 18px; font-weight: 800; }
.mode-icon.solo { background: var(--green-soft); color: var(--green); }
.invite-link { margin: 20px auto 0; }
.hero-facts { width: min(100%, 820px); margin: 42px auto 0; padding: 26px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; border-top: 1px solid var(--border); list-style: none; text-align: left; }
.hero-facts li { display: grid; grid-template-columns: 30px 1fr; align-items: start; column-gap: 10px; }
.hero-facts li > span { grid-row: 1 / span 2; width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid var(--border); border-radius: 50%; background: var(--surface); color: var(--blue); font-size: 13px; }
.hero-facts b, .hero-facts small { display: block; }
.hero-facts b { font-size: 12px; }
.hero-facts small { margin-top: 3px; color: var(--muted); font-size: 10px; line-height: 1.45; }
.landing-footnote { margin: 30px 0 0; color: #8a93a2; font-size: 11px; }

.button, .text-button, .icon-button, .source-choice, .control-tester, .menu-row { border: 0; color: inherit; cursor: pointer; }
.button { min-height: 44px; padding: 10px 17px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; border: 1px solid transparent; border-radius: 9px; font-size: 13px; font-weight: 720; line-height: 1.2; text-decoration: none; transition: background .16s, border-color .16s, box-shadow .16s, transform .16s; }
.button:hover:not(:disabled) { transform: translateY(-1px); }
.button.primary { background: var(--blue); color: #fff; box-shadow: 0 2px 5px rgba(49, 92, 245, .18); }
.button.primary:hover:not(:disabled) { background: var(--blue-hover); }
.button.secondary { border-color: var(--border); background: var(--surface); color: var(--ink); }
.button.secondary:hover:not(:disabled) { border-color: #b8c2d0; background: #fafbfc; }
.button.berry { background: var(--coral); color: #fff; }
.button.berry:hover:not(:disabled) { background: var(--coral-hover); }
.button.large { min-height: 50px; padding-inline: 22px; font-size: 14px; }
.button.small { min-height: 38px; padding: 8px 13px; font-size: 12px; }
.button.full { width: 100%; }
.button:disabled { border-color: #e2e5ea; background: #e8ebef; color: #9aa2af; box-shadow: none; cursor: not-allowed; transform: none; }
.text-button { min-height: 40px; padding: 8px 10px; background: transparent; color: var(--blue); font-size: 12px; font-weight: 700; }
.text-button:hover { text-decoration: underline; }
.text-button.danger, .menu-row.danger { color: var(--coral); }
.icon-button { width: 42px; height: 42px; display: inline-grid; place-items: center; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--ink-soft); font-size: 18px; }

.flow-view { width: min(100%, 760px); margin: 0 auto; padding: 24px 0 70px; }
.flow-chrome { min-height: 52px; margin-bottom: 14px; display: grid; grid-template-columns: 52px 1fr 52px; align-items: center; color: var(--muted); font-size: 11px; font-weight: 720; letter-spacing: .07em; text-align: center; }
.flow-chrome .icon-button { width: 40px; height: 40px; }
.flow-chrome .player-token { justify-self: end; }
.flow-card { padding: 38px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-sm); }
.flow-card.join-card { width: min(100%, 620px); margin: 0 auto; }
.flow-heading { margin-bottom: 30px; text-align: center; }
.flow-heading .heading-icon { display: none; }
.flow-heading h1 { margin: 0; font-size: clamp(32px, 5vw, 43px); font-weight: 680; letter-spacing: -.04em; }
.flow-heading p:last-child { margin: 10px auto 0; max-width: 520px; color: var(--muted); font-size: 14px; line-height: 1.55; }
.field { display: block; }
.field > span, .field > small { display: block; }
.field > span { margin-bottom: 5px; font-size: 13px; font-weight: 700; }
.field > small { margin-bottom: 9px; color: var(--muted); font-size: 11px; }
.field input { width: 100%; min-height: 46px; padding: 11px 13px; border: 1px solid #cfd5de; border-radius: 9px; background: #fff; color: var(--ink); outline: none; transition: border-color .15s, box-shadow .15s; }
.field input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(49, 92, 245, .12); }
.field input::placeholder { color: #9ca3af; }
.numbered-step { margin: 0 0 20px; display: grid; grid-template-columns: 30px 1fr; gap: 13px; align-items: start; }
.step-number { width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid var(--border); border-radius: 50%; background: var(--surface-2); color: var(--ink-soft); font-size: 11px; font-weight: 750; }
fieldset.numbered-step { padding: 0; border: 0; }
.source-step legend { width: 100%; margin-bottom: 12px; display: grid; grid-template-columns: 30px 1fr; gap: 13px; }
.source-step legend b, .source-step legend small { display: block; }
.source-step legend b { font-size: 13px; }
.source-step legend small { margin-top: 4px; color: var(--muted); font-size: 11px; line-height: 1.45; }
.source-step > :not(legend) { grid-column: 2; }
.source-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.source-choice { min-height: 92px; padding: 14px; display: grid; grid-template-columns: 38px 1fr auto; gap: 11px; align-items: center; border: 1px solid var(--border); border-radius: 11px; background: var(--surface); text-align: left; transition: border-color .15s, background .15s, box-shadow .15s; }
.source-choice:hover { border-color: #aebcf8; background: #fbfcff; box-shadow: var(--shadow-sm); }
.source-choice > span:nth-child(2) { min-width: 0; }
.source-choice strong, .source-choice small { display: block; }
.source-choice strong { font-size: 12px; }
.source-choice small { margin-top: 4px; color: var(--muted); font-size: 10px; line-height: 1.4; }
.source-choice > b { color: var(--blue); font-size: 11px; }
.source-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 9px; background: var(--blue-soft); color: var(--blue); }
.source-icon.mint { background: var(--green-soft); color: var(--green); }
.source-status { min-height: 34px; margin-top: 8px; display: flex; align-items: center; gap: 8px; color: var(--muted); }
.source-status span { width: 7px; height: 7px; flex: none; border-radius: 50%; background: #a4abb6; }
.source-status p { margin: 0; font-size: 11px; }
.source-status.ready { color: var(--green); }
.source-status.ready span { background: var(--green); }
.privacy-strip { margin: 20px 0; padding: 12px 14px; display: flex; align-items: flex-start; gap: 10px; border: 1px solid #eadfca; border-radius: 10px; background: #fffcf5; color: var(--ink-soft); }
.privacy-strip > span { color: var(--amber); }
.privacy-strip p { margin: 0; font-size: 11px; line-height: 1.5; }
.form-error { min-height: 18px; margin: 9px 0 0; color: var(--coral); font-size: 11px; text-align: center; }
.error-card { margin-top: 13px; padding: 13px; display: flex; gap: 10px; border: 1px solid #f0bdc1; border-radius: 10px; background: var(--coral-soft); color: #8d2931; text-align: left; }
.error-card > span { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: #f8cbd0; font-weight: 800; }
.error-card strong { font-size: 12px; }.error-card p { margin: 3px 0 0; font-size: 11px; line-height: 1.45; }
.mobile-note { margin: 16px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; text-align: center; }
.berry-text { color: var(--blue); }

.player-token { width: 34px; height: 34px; display: inline-grid; place-items: center; flex: none; border-radius: 9px; background: var(--blue); color: #fff; font-size: 10px; font-weight: 800; }
.player-token.p2 { background: var(--green); }
.room-view { width: min(100%, 880px); margin: 0 auto; padding: 24px 0 70px; }
.session-bar { min-height: 58px; display: flex; align-items: center; gap: 16px; border-bottom: 1px solid var(--border); }
.session-bar > div { display: flex; align-items: baseline; gap: 9px; }
.session-bar .pill { margin-left: auto; }
.session-label { color: var(--muted); font-size: 10px; font-weight: 760; letter-spacing: .09em; }
#room-code-display { font-size: 13px; }
.pill { min-height: 29px; padding: 6px 10px; display: inline-flex; align-items: center; border-radius: 999px; background: var(--blue-soft); color: var(--blue); font-size: 10px; font-weight: 750; }
.pill.amber { background: var(--amber-soft); color: var(--amber); }
.pill.green { background: var(--green-soft); color: var(--green); }
.room-heading { margin: 34px 0 20px; }
.room-heading h1 { margin: 0; font-size: clamp(32px, 5vw, 44px); letter-spacing: -.04em; }
.room-heading > p:last-child { margin: 7px 0 0; color: var(--muted); font-size: 13px; }
.invite-strip { margin-bottom: 12px; padding: 13px 14px; display: flex; align-items: center; gap: 13px; border: 1px solid #cfd8fd; border-radius: 12px; background: var(--blue-soft); }
.invite-icon { width: 38px; height: 38px; display: grid; place-items: center; flex: none; border-radius: 50%; background: #fff; color: var(--blue); font-weight: 800; }
.invite-copy { min-width: 0; flex: 1; }
.invite-copy strong, .invite-copy small { display: block; }
.invite-copy strong { font-size: 13px; }
.invite-copy small { margin-top: 3px; color: #4d5ea8; font-size: 11px; line-height: 1.45; }
.invite-strip .button { flex: none; }
.player-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; }
.player-card, .panel { padding: 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow-sm); }
.player-card { display: flex; flex-direction: column; }
.player-card.empty { border-style: dashed; box-shadow: none; }
.player-card.occupied { border-color: #c8d2fb; }
.player-card-head { display: flex; align-items: center; gap: 11px; }
.player-card-head > div { min-width: 0; flex: 1; }
.player-card-head strong, .player-card-head small { display: block; }
.player-card-head small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.seat-status { color: var(--green); font-size: 10px; font-weight: 760; }
.player-card.empty .seat-status { color: var(--muted); }
.player-card #reset-seat { margin-top: 13px; align-self: flex-start; }
.control-tester { width: 100%; min-height: 54px; margin-top: 13px; padding: 10px 11px; display: flex; align-items: center; gap: 10px; border: 1px solid var(--border-soft); border-radius: 10px; background: #fafbfc; text-align: left; transition: border-color .15s, background .15s; }
.control-tester:hover { border-color: #b9c6f5; background: #f6f8ff; }
.control-tester > span:first-child { width: 30px; color: var(--blue); font-size: 19px; }
.control-tester > span:nth-child(2) { min-width: 0; flex: 1; }
.control-tester strong, .control-tester small { display: block; }
.control-tester strong { font-size: 12px; }.control-tester small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.control-tester b { color: var(--blue); font-size: 10px; }
.panel-heading { display: flex; align-items: center; gap: 12px; }
.panel-heading > div { min-width: 0; flex: 1; }
.panel-heading small, .panel-heading strong { display: block; }
.panel-heading small { color: var(--muted); font-size: 9px; font-weight: 760; letter-spacing: .08em; }
.panel-heading strong { margin-top: 3px; font-size: 14px; }
.panel-heading p { margin: 5px 0 0; color: var(--muted); font-size: 10px; line-height: 1.45; }
.panel-heading.simple { margin-bottom: 7px; }
.source-panel { margin-bottom: 12px; display: flex; align-items: center; gap: 13px; }
.source-meta { min-width: 0; flex: 1; }
.source-meta small, .source-meta strong { display: block; }
.source-meta small { color: var(--muted); font-size: 9px; font-weight: 760; letter-spacing: .08em; }
.source-meta strong { margin-top: 3px; font-size: 14px; }
.source-meta p { margin: 4px 0 0; color: var(--muted); font-size: 10px; line-height: 1.45; }
.game-cover { width: 42px; height: 50px; display: grid; place-items: center; flex: none; border: 1px solid #c6d0f8; border-radius: 8px; background: var(--blue-soft); color: var(--blue); font-family: Georgia, serif; font-weight: 700; }
.source-actions.compact { flex: none; display: flex; gap: 8px; margin-top: 0; }.source-actions.compact .button { min-height: 40px; }
.checks > div { min-height: 53px; display: flex; align-items: center; gap: 10px; border-top: 1px solid var(--border-soft); }
.checks i { width: 9px; height: 9px; flex: none; border: 1.5px solid #9ca3af; border-radius: 50%; }
.checks span { min-width: 0; flex: 1; }
.checks strong, .checks small { display: block; }
.checks strong { font-size: 11px; }.checks small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.checks b { color: var(--muted); font-size: 9px; }
.checks .done i { border-color: var(--green); background: var(--green); }
.checks .done b { color: var(--green); }
.readiness-panel .button { margin-top: 10px; }
.room-help { margin: 10px 0 0; color: var(--muted); font-size: 10px; line-height: 1.45; text-align: center; }

.loading-card { width: min(100%, 570px); margin: 7vh auto 0; padding: 42px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-sm); text-align: center; }
.loading-card h1 { margin: 0; font-size: 36px; letter-spacing: -.04em; }
.loading-card > p:not(.kicker) { color: var(--muted); font-size: 13px; }
.orbit { position: relative; width: 64px; height: 64px; margin: 0 auto 24px; display: grid; place-items: center; border: 2px solid #e1e6f3; border-radius: 50%; }
.orbit::after { content: ""; position: absolute; inset: -2px; border: 2px solid transparent; border-top-color: var(--blue); border-radius: 50%; animation: orbit 1.1s linear infinite; }
.orbit .coin { width: 30px; height: 30px; font-size: 14px; }
.orbit.small { width: 58px; height: 58px; }
@keyframes orbit { to { transform: rotate(360deg); } }
.load-stages { width: min(100%, 380px); margin: 26px auto; padding: 0; list-style: none; text-align: left; counter-reset: stage; }
.load-stages li { position: relative; min-height: 43px; padding-left: 38px; display: flex; align-items: center; color: var(--muted); font-size: 12px; }
.load-stages li::before { counter-increment: stage; content: counter(stage); position: absolute; left: 0; width: 24px; height: 24px; display: grid; place-items: center; border: 1px solid #c9ced6; border-radius: 50%; background: #fff; font-size: 10px; }
.load-stages li.done { color: var(--green); }
.load-stages li.done::before { content: "✓"; border-color: #b7dec8; background: var(--green-soft); color: var(--green); }
.sound-gate { margin-top: 20px; padding: 14px; display: flex; align-items: center; gap: 12px; border: 1px solid #cad5fc; border-radius: 11px; background: var(--blue-soft); text-align: left; }
.sound-gate > span { width: 38px; height: 38px; display: grid; place-items: center; flex: none; border-radius: 50%; background: #fff; color: var(--blue); }
.sound-gate > div { min-width: 0; flex: 1; }
.sound-gate strong, .sound-gate small { display: block; }.sound-gate strong { font-size: 12px; }.sound-gate small { margin-top: 3px; color: var(--muted); font-size: 10px; }

.toast { position: fixed; z-index: 200; left: 50%; bottom: max(22px, env(safe-area-inset-bottom)); width: min(calc(100% - 32px), 420px); min-height: 56px; padding: 10px 11px; display: flex; align-items: center; gap: 10px; border: 1px solid #a9d9bc; border-radius: 11px; background: var(--green-soft); color: #175c3a; box-shadow: var(--shadow); opacity: 0; transform: translate(-50%, 18px); pointer-events: none; transition: opacity .18s, transform .18s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.toast > span { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: #ccebd7; font-weight: 800; }
.toast strong { min-width: 0; flex: 1; font-size: 12px; }
.toast button { width: 38px; height: 38px; border: 0; background: transparent; color: #347354; cursor: pointer; font-size: 18px; }

dialog { color: var(--ink); }
.controls-dialog, .confirm-dialog { width: min(calc(100% - 32px), 620px); padding: 0; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow); }
.controls-dialog::backdrop, .confirm-dialog::backdrop { background: rgba(28, 35, 48, .42); backdrop-filter: blur(2px); }
.controls-dialog form, .confirm-dialog form { padding: 25px; }
.sheet-handle { display: none; }
.sheet-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.sheet-header small { display: block; margin-bottom: 4px; color: var(--muted); font-size: 9px; letter-spacing: .08em; }
.sheet-header h2, .confirm-dialog h2 { margin: 0; font-size: 25px; letter-spacing: -.03em; }
.controls-dialog form > p { color: var(--muted); font-size: 12px; line-height: 1.55; }
.device-row { min-height: 64px; margin: 9px 0; padding: 11px; display: flex; align-items: center; gap: 11px; border: 1px solid var(--border-soft); border-radius: 10px; background: #fafbfc; }
.device-row > span { width: 32px; color: var(--blue); font-size: 20px; }.device-row > div { min-width: 0; flex: 1; }
.device-row strong, .device-row small { display: block; }.device-row strong { font-size: 12px; }.device-row small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.device-row > b { color: var(--muted); font-size: 10px; }
.control-map { margin-top: 14px; display: grid; grid-template-columns: repeat(7, 1fr); gap: 7px; }
.control-map span { min-height: 52px; padding: 6px; display: grid; place-items: center; border: 1px solid var(--border); border-radius: 8px; background: #fff; font-weight: 760; }
.control-map small { display: block; color: var(--muted); font-size: 7px; }
.confirm-dialog form { text-align: center; }
.confirm-dialog .heading-icon { width: 46px; height: 46px; margin: 0 auto 15px; display: grid; place-items: center; border-radius: 50%; background: var(--coral-soft); color: var(--coral); font-weight: 800; }
.confirm-dialog p { color: var(--muted); font-size: 12px; line-height: 1.55; }
.modal-actions { margin-top: 19px; display: flex; justify-content: center; gap: 9px; }

code { color: #365bd7; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .92em; }

@media (max-width: 820px) {
  #app, .site-header { width: min(calc(100% - 28px), 1120px); }
  .header-promise { display: none; }
  .landing { padding-top: 46px; }
  .hero-facts { gap: 16px; }
}

@media (max-width: 620px) {
  #app, .site-header { width: min(calc(100% - 24px), 1120px); }
  .site-header { min-height: 62px; }
  .landing { min-height: calc(100vh - 62px); padding: 36px 0 30px; }
  .hero-copy h1 { font-size: clamp(39px, 12vw, 54px); }
  .lede { margin: 18px auto 24px; font-size: 15px; line-height: 1.6; }
  .mode-cards { grid-template-columns: 1fr; }
  .mode-card { min-height: 220px; padding: 20px; }
  .hero-facts { margin-top: 32px; grid-template-columns: 1fr; gap: 13px; }
  .flow-view { padding-top: 12px; }
  .flow-chrome { margin-bottom: 8px; }
  .flow-card { padding: 24px 18px; border-radius: 15px; }
  .flow-heading { margin-bottom: 24px; }.flow-heading h1 { font-size: 34px; }
  .numbered-step { grid-template-columns: 1fr; }.numbered-step > .step-number { display: none; }
  .source-step legend { grid-template-columns: 1fr; }.source-step legend .step-number { display: none; }
  .source-step > :not(legend) { grid-column: 1; }
  .source-actions { grid-template-columns: 1fr; }
  .session-bar { flex-wrap: wrap; }.session-bar .pill { margin-left: 0; }.session-bar .text-button { margin-left: auto; }
  .room-heading { margin-top: 28px; }.room-heading h1 { font-size: 36px; }
  .invite-strip { flex-wrap: wrap; }
  .invite-strip .button { width: 100%; }
  .player-grid { grid-template-columns: 1fr; }
  .source-panel { flex-wrap: wrap; }
  .source-actions.compact { width: 100%; flex-direction: column; }
  .source-actions.compact .button { width: 100%; }
  .loading-card { margin-top: 2vh; padding: 30px 18px; }.loading-card h1 { font-size: 31px; }
  .sound-gate { align-items: stretch; flex-wrap: wrap; }.sound-gate .button { width: 100%; }
  .control-map { grid-template-columns: repeat(4, 1fr); }
  .controls-dialog, .confirm-dialog { width: 100%; max-width: none; margin: auto 0 0; border-radius: 18px 18px 0 0; }
  .controls-dialog form, .confirm-dialog form { padding: 22px 18px max(22px, env(safe-area-inset-bottom)); }
  .sheet-handle { width: 42px; height: 4px; margin: 0 auto 17px; display: block; border-radius: 3px; background: #c9ced6; }
  .modal-actions { flex-direction: column-reverse; }.modal-actions .button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

@media (forced-colors: active) {
  .player-token, .coin, .step-number, .checks i { forced-color-adjust: none; }
}
