@charset "UTF-8";
:root {
  color-scheme: light;
  --ink: #171717; --muted: #515151; --yellow: #ffe500; --purple: #3855ff;
  --pink: #ff83cb; --mint: #4ff0ad; --orange: #ff8a43; --line: #171717;
  --white: #fff; --surface: #fffbee; --shadow: 5px 5px 0 var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 16px; color: var(--ink); background: var(--surface);
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background-image: linear-gradient(#17171708 1px, transparent 1px), linear-gradient(90deg, #17171708 1px, transparent 1px); background-size: 28px 28px; }
button, input { font: inherit; }
button, a, input { -webkit-tap-highlight-color: transparent; }
button { color: inherit; cursor: pointer; touch-action: manipulation; transition: transform .12s, box-shadow .12s, background .12s; }
button:disabled { cursor: default; }
button:focus-visible, a:focus-visible { outline: 3px solid var(--purple); outline-offset: 5px; }
input:focus { outline: 2px solid var(--ink); outline-offset: 0; box-shadow: 6px 6px 0 var(--ink); background: var(--yellow); }
input::selection { background: var(--ink); color: var(--yellow); }
button:not(:disabled):active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
h1, h2, p { margin: 0; }
.app-shell { max-width: 1160px; margin: 0 auto; padding: 0 36px; }
.topbar { height: 106px; display: flex; justify-content: space-between; align-items: center; gap: 12px; border-bottom: 3px solid var(--ink); }
.brand { display: flex; align-items: center; gap: 13px; color: var(--ink); text-decoration: none; font-size: 26px; font-weight: 950; letter-spacing: -1px; }
.brand-mark { display: grid; place-items: center; width: 48px; height: 48px; border: 3px solid var(--ink); border-radius: 5px; background: var(--yellow); box-shadow: 3px 3px 0 var(--ink); font-size: 29px; transform: rotate(-7deg); }
.brand-sub { display: block; margin-top: 3px; font-weight: 700; letter-spacing: 2px; font-size: 11px; }
.brand-room { display: flex; align-items: center; gap: 18px; flex-shrink: 0; }
.header-room-code { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; min-height: 44px; padding: 3px 8px; border: 2px solid var(--ink); border-radius: 4px; background: white; box-shadow: 2px 2px 0 var(--ink); }
.header-room-code span { font-size: 9px; font-weight: 800; line-height: 1.3; }
.header-room-code strong { font-size: 16px; font-weight: 950; line-height: 1.3; letter-spacing: 1px; padding-left: 1px; font-variant-numeric: tabular-nums; }
.top-note { font-size: 12px; font-weight: 800; border: 2px solid var(--ink); background: var(--mint); padding: 9px 11px; box-shadow: 3px 3px 0 var(--ink); transform: rotate(2deg); }
.top-actions { display: flex; align-items: center; gap: 13px; }
.room-topbar .top-actions { min-width: 0; }
.self-identity { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 8px 12px; border: 2px solid var(--ink); border-radius: 4px; background: white; box-shadow: 3px 3px 0 var(--ink); }
.self-details { flex: 1; min-width: 0; max-width: 250px; }
.self-name { display: flex; align-items: center; gap: 6px; }
.self-name strong { min-width: 0; overflow-wrap: anywhere; font-size: 15px; font-weight: 900; line-height: 1.4; }
.self-name > span { font-size: 10px; font-weight: 750; flex-shrink: 0; }
.self-record { display: inline-flex; align-items: center; justify-content: center; gap: 4px; flex-shrink: 0; margin-left: auto; min-height: 44px; padding: 4px 6px; border: 2px solid var(--ink); border-radius: 3px; background: var(--mint); box-shadow: 2px 2px 0 var(--ink); }
.self-record > span { font-size: 17px; }
.self-record strong { font-size: 14px; white-space: nowrap; line-height: 1.3; }
.self-record strong span, .self-record small { font-size: 11px; font-weight: 750; }
.self-record[aria-pressed="true"] { background: var(--yellow); }
.self-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 5px; }
.self-role { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; min-width: 48px; min-height: 36px; border: 2px solid var(--ink); border-radius: 3px; padding: 5px 7px; background: var(--mint); box-shadow: 2px 2px 0 var(--ink); font-size: 12px; font-weight: 900; line-height: 1.4; }
.self-role.is-host { background: var(--pink); }
.self-meta .connection { font-size: 10px; }
.self-meta .connection::before { width: 7px; height: 7px; }
.text-button { min-height: 44px; padding: 8px 12px; border: 2px solid var(--ink); border-radius: 3px; background: white; box-shadow: 2px 2px 0 var(--ink); font-size: 13px; font-weight: 750; }
.connection { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; }
.connection::before { content: ''; width: 9px; height: 9px; border: 2px solid var(--ink); background: var(--mint); }
.connection.offline::before { background: var(--orange); }
.section-kicker { display: inline-block; font-size: 11px; letter-spacing: 1.6px; font-weight: 900; color: var(--ink); }
.home-layout { display: grid; grid-template-columns: 1fr 425px; gap: 70px; align-items: center; min-height: calc(100svh - 180px); padding: 55px 0 65px; }
.home-intro { position: relative; padding: 12px 0; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; background: var(--pink); border: 2px solid var(--ink); padding: 5px 11px; box-shadow: 3px 3px 0 var(--ink); transform: rotate(-3deg); font-size: 14px; font-weight: 800; margin-bottom: 30px; }
.little-star { font-size: 23px; }
.home-intro h1 { font-size: clamp(48px, 5.5vw, 72px); letter-spacing: -3px; line-height: 1.27; font-weight: 950; }
.home-intro h1 .hero-title { display: inline-block; color: var(--ink); background: var(--yellow); border: 3px solid var(--ink); box-shadow: 6px 6px 0 var(--ink); padding: 0 13px 5px; margin-top: 9px; transform: rotate(-2deg); }
.home-intro p { margin-top: 27px; font-size: 16px; line-height: 1.85; font-weight: 600; }
.hero-stamp { position: absolute; right: 15px; top: 34px; width: 82px; height: 82px; border: 3px solid var(--ink); border-radius: 50%; background: var(--purple); color: white; display: grid; place-content: center; text-align: center; font-size: 17px; font-weight: 950; line-height: 1.1; box-shadow: 4px 4px 0 var(--ink); transform: rotate(12deg); }
.play-strip { display: flex; gap: 13px; margin-top: 36px; padding-bottom: 5px; }
.play-token { width: 55px; height: 58px; display: grid; place-items: center; border: 3px solid var(--ink); border-radius: 5px; font-size: 30px; box-shadow: 3px 3px 0 var(--ink); transform: rotate(-6deg); }
.play-token:nth-child(even) { transform: rotate(7deg) translateY(4px); }
.violet { background: var(--pink); }.yellow { background: var(--yellow); }.blue { background: #7dc8ff; }.pink { background: #ff6d83; }.mint { background: var(--mint); }.orange { background: var(--orange); }
.home-caption { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 23px; }
.home-caption span { border: 2px solid var(--ink); background: white; padding: 5px 8px; font-size: 11px; font-weight: 800; }
.entry-panel, .lobby-panel, .game-panel { background: white; border: 3px solid var(--ink); border-radius: 7px; padding: 30px; box-shadow: 7px 7px 0 var(--ink); min-width: 0; }
.entry-panel { position: relative; }
.entry-panel::before { content: ''; position: absolute; height: 9px; top: -3px; left: -3px; right: -3px; background: var(--purple); border: 3px solid var(--ink); border-radius: 7px 7px 0 0; }
.panel-title { margin-bottom: 26px; }
.panel-title .section-kicker { color: var(--purple); }
.panel-title h2 { font-size: 27px; margin-top: 8px; font-weight: 900; letter-spacing: -1px; }
.field-label { display: block; font-size: 13px; font-weight: 800; margin-bottom: 10px; }
input { width: 100%; min-height: 56px; border: 2px solid var(--ink); border-radius: 4px; padding: 12px 14px; background: white; color: var(--ink); font-size: 16px; box-shadow: 3px 3px 0 var(--ink); }
input::placeholder { color: #777; }
.entry-panel label[for="room-code"] { margin-top: 24px; }
.entry-tip { display: flex; gap: 13px; padding: 9px 0 12px; min-height: 85px; align-items: center; }
.entry-tip > span { font-size: 32px; color: var(--purple); }
.entry-tip p { font-size: 13px; line-height: 1.75; font-weight: 500; }
.code-input { font-size: 28px; text-align: center; letter-spacing: 12px; font-weight: 900; padding-left: 27px; }
.button { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 58px; border: 3px solid var(--ink); border-radius: 4px; padding: 13px 14px; font-size: 16px; font-weight: 900; line-height: 1.4; box-shadow: 4px 4px 0 var(--ink); }
.primary { background: var(--yellow); color: var(--ink); }.violet-button { background: var(--purple); color: white; }.secondary-button { background: white; color: var(--ink); }
.button[data-do="start"]:not(:disabled) { background: #7dc8ff; color: var(--ink); }
.button:disabled { background: #e4e4e4; color: #575757; box-shadow: 2px 2px 0 var(--ink); border-color: var(--ink); }
.entry-submit { margin-top: 15px; }
.entry-mode-switch { margin-top: 14px; }
.entry-footnote { text-align: center; color: var(--muted); font-size: 12px; margin-top: 19px; line-height: 1.5; }
.home-footer, .room-footer { display: flex; align-items: center; justify-content: space-between; color: var(--ink); font-size: 11px; font-weight: 750; padding: 22px 0 28px; border-top: 3px solid var(--ink); gap: 12px; }
.home-footer > span:last-child { letter-spacing: 2px; }
.room-banner { display: flex; align-items: center; justify-content: space-between; padding: 27px 0; gap: 16px; }
.room-banner h2 { font-size: 25px; font-weight: 900; margin-top: 7px; }
.joined-count { display: flex; flex-direction: column; align-items: center; gap: 2px; flex-shrink: 0; min-width: 88px; border: 3px solid var(--ink); border-radius: 4px; padding: 8px 15px; background: var(--mint); box-shadow: 4px 4px 0 var(--ink); }
.joined-count > span { font-size: 11px; font-weight: 800; }
.joined-count strong { display: flex; align-items: baseline; gap: 5px; font-size: 30px; font-weight: 950; font-variant-numeric: tabular-nums; }
.joined-count small { font-size: 13px; font-weight: 800; }
.room-layout { display: grid; grid-template-columns: minmax(0, 1fr); max-width: 780px; margin: 0 auto; }
.lobby-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 24px; }
.lobby-heading h1 { font-size: 28px; margin-top: 8px; font-weight: 900; }
.small-sticker { display: inline-block; flex-shrink: 0; white-space: nowrap; border: 2px solid var(--ink); border-radius: 3px; padding: 8px; font-size: 16px; font-weight: 900; box-shadow: 2px 2px 0 var(--ink); transform: rotate(5deg); }
.game-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.game-option { --tile: var(--pink); position: relative; display: flex; flex-direction: column; align-items: flex-start; min-height: 169px; width: 100%; border: 3px solid var(--ink); background: var(--tile); border-radius: 5px; padding: 15px; gap: 12px; text-align: left; box-shadow: 4px 4px 0 var(--ink); }
.game-option[data-game="dice"] { --tile: var(--yellow); }.game-option[data-game="reaction"] { --tile: #7dc8ff; }.game-option[data-game="bomb"] { --tile: #ff6d83; }.game-option[data-game="potato"] { --tile: var(--orange); }.game-option[data-game="cards"] { --tile: var(--mint); }
.game-option.active { box-shadow: 0 0 0 2px white, 0 0 0 5px var(--ink), 7px 7px 0 var(--ink); }
.game-option:focus-visible { outline-color: var(--ink); }
.game-option.active::after { content: '✓ 已选'; position: absolute; top: 10px; right: 9px; border: 2px solid var(--ink); background: var(--ink); color: var(--yellow); font-size: 11px; font-weight: 900; padding: 3px 5px; transform: rotate(5deg); }
.game-icon { display: inline-flex; align-items: center; justify-content: center; height: 49px; width: 49px; flex-shrink: 0; border: 2px solid var(--ink); border-radius: 4px; font-size: 29px; box-shadow: 2px 2px 0 var(--ink); }
.game-option .game-icon { background: white; }
.game-label { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.game-label strong { font-size: 18px; font-weight: 900; }
.game-label > span { font-size: 12px; font-weight: 600; }
.game-time { font-size: 11px; font-weight: 800; border-top: 2px solid var(--ink); padding-top: 7px; width: 100%; margin-top: auto; }
.selection-mark { position: absolute; top: 13px; right: 12px; font: 900 15px ui-monospace, monospace; }
.active .selection-mark { display: none; }
.lobby-bottom { padding-top: 23px; }
.one-rule { font-size: 13px; line-height: 1.8; font-weight: 550; }
.lobby-bottom .one-rule { margin-bottom: 18px; border-left: 4px solid var(--ink); padding-left: 12px; }
.avatar { display: inline-flex; justify-content: center; align-items: center; width: 37px; height: 37px; border-radius: 4px; flex-shrink: 0; font-size: 15px; font-weight: 900; border: 2px solid var(--ink); box-shadow: 2px 2px 0 var(--ink); color: var(--ink); }
.avatar-0 { background: var(--pink); }.avatar-1 { background: white; }.avatar-2 { background: #7dc8ff; }.avatar-3 { background: var(--orange); }.avatar-4 { background: var(--mint); }.avatar-5 { background: #c3a3ff; }
.result-name small { font-size: 11px; font-weight: 600; }
.you-label { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; border: 2px solid var(--ink); border-radius: 3px; padding: 2px 7px; margin: 0 3px; background: var(--purple); color: white; box-shadow: 2px 2px 0 var(--ink); font-size: 12px; font-weight: 900; line-height: 1.4; }
.host-label { font-size: 10px; background: var(--pink); color: var(--ink); border: 1px solid var(--ink); padding: 1px 4px; }
.room-footer { margin-top: 30px; }
.waiting-note { padding: 17px; min-height: 55px; text-align: center; border: 2px dashed var(--ink); border-radius: 4px; background: #fff7bb; font-size: 14px; font-weight: 700; line-height: 1.6; }
.game-screen-title { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.game-icon.compact { width: 43px; height: 43px; font-size: 25px; }
.game-screen-title h1 { font-size: 23px; flex: 1; font-weight: 900; }.round-label { font-size: 11px; font-weight: 800; border: 2px solid var(--ink); background: var(--yellow); padding: 5px 7px; white-space: nowrap; }
.game-content { margin-top: 23px; border-top: 3px solid var(--ink); padding-top: 26px; }
.play-instruction { text-align: center; }.round-eyebrow { display: inline-block; font-size: 11px; font-weight: 850; background: var(--pink); border: 2px solid var(--ink); padding: 4px 8px; transform: rotate(-2deg); }
.play-instruction h2 { font-size: 26px; font-weight: 950; margin: 16px 0 10px; line-height: 1.4; overflow-wrap: anywhere; }.play-instruction p { font-size: 13px; line-height: 1.8; color: var(--muted); }
.round-progress { display: flex; flex-direction: column; align-items: center; gap: 13px; margin-top: 25px; font-size: 12px; font-weight: 750; }
.progress-dots { display: flex; gap: 7px; flex-wrap: wrap; justify-content: center; }.progress-dots i { width: 12px; height: 12px; background: white; border: 2px solid var(--ink); }.progress-dots .filled { background: var(--purple); }
.dice-stage { position: relative; display: grid; place-items: center; margin: 25px auto 30px; width: 164px; height: 155px; background: var(--yellow); border: 3px solid var(--ink); border-radius: 7px; box-shadow: 6px 6px 0 var(--ink); transform: rotate(-5deg); }
.dice-stage > span { font-size: 99px; }.dice-stage.rolled > span { opacity: .25; }.dice-stage b { position: absolute; font-size: 65px; }
.reaction-target { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; margin: 26px 0 0; width: 100%; min-height: 250px; border: 3px solid var(--ink); border-radius: 5px; box-shadow: 6px 6px 0 var(--ink); user-select: none; touch-action: manipulation; transition: none; }
.reaction-target.hold { background: var(--yellow); color: var(--ink); }.reaction-target.go { background: var(--mint); color: var(--ink); }.reaction-target.finished { background: #c3a3ff; color: var(--ink); }
.reaction-target strong { font-size: 28px; font-weight: 900; }.reaction-target small { font-size: 14px; font-weight: 750; }.reaction-symbol { font-size: 65px; line-height: 1.1; }
.fine-print { font-size: 12px; color: var(--muted); text-align: center; margin-top: 22px; line-height: 1.7; }
.bomb-stage { display: flex; flex-direction: column; align-items: center; margin-top: 24px; padding: 20px; background: #ff6d83; border: 3px solid var(--ink); box-shadow: 5px 5px 0 var(--ink); border-radius: 5px; }.bomb-emoji { font-size: 65px; }.bomb-count { font-size: 75px; font-weight: 950; line-height: 1.1; font-variant-numeric: tabular-nums; letter-spacing: -3px; margin-top: 5px; }.bomb-stage > span:last-child { font-size: 12px; font-weight: 750; margin-top: 7px; }
.bomb-last { text-align: center; font-size: 13px; font-weight: 650; margin: 23px 0; }
.cards-table { display: grid; grid-template-columns: repeat(auto-fit, minmax(98px, 1fr)); gap: 22px 10px; margin: 28px 0; max-height: 440px; overflow-y: auto; padding: 6px; }
.card-player { display: flex; flex-direction: column; gap: 10px; align-items: center; min-width: 0; }.card-player strong { font-size: 14px; text-align: center; overflow-wrap: anywhere; }.card-player > span:last-child:not(.playing-card) { font-size: 11px; }
.playing-card { display: inline-block; height: 130px; width: 88px; background: white; border: 3px solid var(--ink); border-radius: 4px; box-shadow: 4px 4px 0 var(--ink); position: relative; flex-shrink: 0; }
.card-back { background: var(--purple); display: grid; place-items: center; color: white; font-size: 48px; font-weight: 950; }.card-back > span { display: grid; place-items: center; height: 64px; width: 62px; border: 2px solid white; }
.card-corner { position: absolute; left: 8px; top: 6px; font-weight: 850; font-size: 22px; line-height: 1.1; text-align: center; }.card-corner small { display: block; font-size: 15px; }.card-suit { position: absolute; left: 0; right: 0; top: 47px; text-align: center; font-size: 37px; }.red-card { color: #d32343; }
.card-actions { display: flex; gap: 12px; }.card-actions .button { flex: 1; }
.result-heading { display: flex; flex-direction: column; align-items: center; text-align: center; }.result-heading .section-kicker { background: var(--ink); color: white; padding: 6px 10px; transform: rotate(-3deg); }.result-celebration { display: grid; place-items: center; width: 112px; height: 112px; font-size: 78px; line-height: 1; margin: 20px 0 16px; }.result-heading h2 { font-size: 28px; font-weight: 950; line-height: 1.4; }.result-heading p { font-size: 13px; line-height: 1.8; margin-top: 10px; }
.results-list { padding: 0; list-style: none; margin: 26px 0; display: grid; gap: 12px; }.results-list li { display: flex; align-items: center; min-height: 69px; border: 2px solid var(--ink); border-radius: 4px; padding: 12px; gap: 10px; box-shadow: 3px 3px 0 var(--ink); background: white; }.results-list li[data-outcome="win"] { background: var(--yellow); }.results-list li.my-result { border-width: 3px; }.result-name { flex: 1; font-size: 15px; font-weight: 850; display: flex; gap: 5px; flex-wrap: wrap; min-width: 0; overflow-wrap: anywhere; }.result-value { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 5px; font-size: 12px; font-weight: 650; }.dice-value { font-size: 30px; line-height: 1; }.card-value { font-size: 23px; font-weight: 850; }.time-value { font-size: 20px; font-weight: 850; font-variant-numeric: tabular-nums; }.time-value small { font-size: 11px; }
.outcome { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 46px; min-height: 46px; font-size: 38px; line-height: 1; }
.result-actions { display: grid; grid-template-columns: 1.5fr 1fr; gap: 12px; }
.ranking-panel { max-width: 780px; margin: 28px auto 36px; padding: 28px; border: 3px solid var(--ink); border-radius: 5px; background: white; box-shadow: 5px 5px 0 var(--ink); }
.ranking-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.ranking-heading h1 { font-size: 28px; font-weight: 950; margin-top: 7px; }
.ranking-heading .text-button { flex-shrink: 0; }
.ranking-intro { font-size: 13px; font-weight: 650; line-height: 1.8; margin: 18px 0 24px; }
.ranking-columns { display: flex; justify-content: space-between; font-size: 11px; font-weight: 800; padding: 0 14px; }
.ranking-list { padding: 0; list-style: none; margin: 10px 0 24px; display: grid; gap: 12px; }
.ranking-list li { display: grid; grid-template-columns: 28px 37px minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 78px; padding: 14px; border: 2px solid var(--ink); border-radius: 4px; background: var(--surface); box-shadow: 3px 3px 0 var(--ink); }
.ranking-list .my-ranking { background: var(--yellow); border-width: 3px; }
.ranking-position { font: 900 16px ui-monospace, monospace; text-align: center; }
.ranking-name { min-width: 0; }
.ranking-name-line { display: flex; align-items: center; gap: 7px; min-width: 0; }
.ranking-name-line > strong { min-width: 0; font-size: 15px; font-weight: 900; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 1.6; }
.ranking-badges { display: inline-flex; align-items: center; gap: 4px; flex-shrink: 0; }
.ranking-badges:empty { display: none; }
.ranking-badges .you-label, .ranking-badges .host-label { margin: 0; padding: 2px 4px; border: 1.5px solid var(--ink); border-radius: 3px; box-shadow: 1px 1px 0 var(--ink); font-size: 10px; font-weight: 900; line-height: 1.4; white-space: nowrap; }
.ranking-offline { display: block; margin-top: 4px; font-size: 10px; color: var(--muted); }
.ranking-record { white-space: nowrap; }
.ranking-record strong { font-size: 27px; font-weight: 950; font-variant-numeric: tabular-nums; }
.ranking-record span { font-size: 12px; font-weight: 750; }
.ranking-note { font-size: 11px; line-height: 1.8; font-weight: 650; border-top: 2px solid var(--ink); padding-top: 17px; }
@media (max-width: 640px) {
  .ranking-panel { padding: 20px 14px; margin-top: 23px; }
  .ranking-heading h1 { font-size: 23px; }
  .ranking-list li { grid-template-columns: 23px 32px minmax(0, 1fr) auto; gap: 8px; padding: 10px 8px; }
  .ranking-list .avatar { width: 32px; height: 32px; font-size: 14px; }
  .ranking-name-line { gap: 5px; }
  .ranking-name-line > strong { font-size: 13px; }
  .ranking-record strong { font-size: 23px; }
  .ranking-record span { font-size: 11px; }
}
.reconnect-banner { padding: 12px 16px; background: var(--orange); border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--ink); border-radius: 4px; margin-bottom: 19px; font-size: 14px; line-height: 1.6; }
.toast { position: fixed; bottom: calc(24px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); background: var(--ink); color: white; border: 2px solid white; font-size: 14px; font-weight: 650; padding: 13px 19px; border-radius: 4px; max-width: calc(100% - 32px); width: max-content; z-index: 20; box-shadow: 5px 5px 0 var(--purple); line-height: 1.6; }.toast[hidden] { display: none; }
.modal-backdrop { position: fixed; inset: 0; background: #171717a0; padding: 24px; display: grid; place-items: center; z-index: 15; }.leave-dialog { width: 100%; max-width: 400px; background: var(--surface); border: 3px solid var(--ink); box-shadow: 8px 8px 0 var(--ink); border-radius: 5px; padding: 26px; }.leave-dialog h2 { font-size: 26px; font-weight: 900; }.leave-dialog p { font-size: 14px; line-height: 1.8; margin: 14px 0 24px; }.dialog-actions { display: flex; gap: 12px; }.dialog-actions .button { flex: 1; font-size: 14px; }
.initial-loading { display: grid; place-items: center; min-height: 50svh; padding: 24px; font-weight: 800; }
.number-form { max-width: 360px; margin: 29px auto 0; }.number-form .field-label { text-align: center; }.number-form input { min-height: 110px; text-align: center; font-size: 52px; font-weight: 950; font-variant-numeric: tabular-nums; background: var(--yellow); }.number-form input::placeholder { font-size: 27px; font-weight: 600; color: #5a5000; }.number-form .button { margin-top: 19px; }
.number-locked, .number-reveal { display: flex; flex-direction: column; align-items: center; gap: 11px; padding: 23px; border: 3px solid var(--ink); border-radius: 5px; box-shadow: 5px 5px 0 var(--ink); background: var(--yellow); }.number-locked { margin: 29px auto; background: var(--pink); }.number-locked > span, .number-reveal > span { font-size: 13px; font-weight: 750; }.number-locked strong, .number-reveal strong { font-size: 66px; line-height: 1.15; font-weight: 950; font-variant-numeric: tabular-nums; }.number-locked small { font-size: 13px; font-weight: 750; }.number-reveal { width: 100%; margin-top: 23px; }.number-value { font-size: 26px; font-weight: 950; font-variant-numeric: tabular-nums; }.number-distance { font-size: 11px; white-space: nowrap; }
.potato-stage { display: flex; flex-direction: column; align-items: center; gap: 8px; background: var(--orange); border: 3px solid var(--ink); border-radius: 5px; box-shadow: 5px 5px 0 var(--ink); padding: 19px 22px; margin: 23px 0; color: var(--ink); }.potato-stage.holding { background: var(--yellow); }.potato-emoji { font-size: 44px; line-height: 1.2; }.potato-stage strong { font-size: 69px; font-weight: 950; font-variant-numeric: tabular-nums; line-height: 1.1; }.potato-stage > div { display: flex; align-items: baseline; gap: 8px; }.potato-stage > div span, #potato-clock-label { font-size: 13px; font-weight: 750; }
.potato-stage progress { appearance: none; width: 100%; height: 14px; border: 2px solid var(--ink); border-radius: 0; overflow: hidden; margin-top: 7px; color: var(--ink); background: white; }.potato-stage progress::-webkit-progress-bar { background: white; }.potato-stage progress::-webkit-progress-value { background: var(--ink); }.potato-stage progress::-moz-progress-bar { background: var(--ink); }.potato-stage.urgent { color: var(--ink); background: #ff6d83; }
.potato-targets h3 { font-size: 17px; font-weight: 900; margin: 0 0 14px; }.potato-targets h3 small { display: block; font-size: 12px; font-weight: 650; margin-top: 6px; }.potato-targets > div { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }.potato-recipient { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 7px; min-height: 96px; padding: 12px; border: 3px solid var(--ink); border-radius: 4px; background: var(--mint); box-shadow: 3px 3px 0 var(--ink); }.potato-recipient strong { font-size: 15px; font-weight: 900; min-width: 0; overflow-wrap: anywhere; }.potato-recipient > span:last-child { width: 100%; font-size: 12px; font-weight: 750; }.potato-recipient:disabled { background: #e4e4e4; color: #555; box-shadow: 1px 1px 0 var(--ink); }.potato-history { font-size: 12px; line-height: 1.8; text-align: center; margin: 23px 0 0; }.potato-history > span { display: block; font-size: 11px; font-weight: 750; margin-top: 5px; }
@media (hover: hover) { .button:not(:disabled):not(:active):hover, .game-option:not(:disabled):not(:active):hover, .potato-recipient:not(:disabled):not(:active):hover, .entry-tabs button:not(:disabled):not(:active):hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }.game-option.active:not(:disabled):not(:active):hover { box-shadow: 0 0 0 2px white, 0 0 0 5px var(--ink), 8px 8px 0 var(--ink); } }
@media (max-width: 960px) { .app-shell { max-width: 780px; padding: 0 25px; }.home-layout { grid-template-columns: 1fr 340px; gap: 30px; }.home-intro h1 { font-size: 48px; }.hero-stamp { width: 63px; height: 63px; font-size: 13px; right: -3px; top: -14px; }.play-strip { gap: 8px; }.play-token { width: 43px; height: 48px; font-size: 25px; }.entry-panel { padding: 26px; } }
@media (max-width: 640px) {
  .app-shell { padding: 0 18px; max-width: 500px; }.topbar { height: 85px; }.brand { font-size: 22px; gap: 10px; }.brand-mark { width: 40px; height: 40px; font-size: 25px; }.brand-sub { font-size: 10px; letter-spacing: 1px; }.top-note { font-size: 10px; padding: 7px; box-shadow: 2px 2px 0 var(--ink); }.top-actions { gap: 9px; }.text-button { padding: 7px 10px; }
  .home-layout { display: flex; flex-direction: column; gap: 29px; padding: 27px 0 36px; min-height: auto; align-items: stretch; }.home-intro { padding: 0 5px; }.eyebrow { margin-bottom: 19px; font-size: 12px; padding: 3px 8px; }.little-star { font-size: 20px; }.home-intro h1 { font-size: 49px; letter-spacing: -2px; line-height: 1.2; }.home-intro h1 .hero-title { padding: 3px 10px 6px; margin-top: 8px; box-shadow: 4px 4px 0 var(--ink); }.hero-stamp { right: 15px; top: 51px; width: 65px; height: 65px; font-size: 14px; box-shadow: 3px 3px 0 var(--ink); }.home-intro p { margin-top: 22px; font-size: 13px; line-height: 1.8; }.play-strip { margin-top: 24px; gap: 10px; }.play-token { width: 44px; height: 47px; font-size: 26px; }.home-caption { margin-top: 18px; gap: 7px; }.home-caption span { font-size: 10px; padding: 4px 7px; }.entry-panel { padding: 26px 22px; box-shadow: 5px 5px 0 var(--ink); }.panel-title { margin-bottom: 24px; }.panel-title h2 { font-size: 25px; }.home-footer { justify-content: center; padding: 20px 0 26px; }.home-footer > span:last-child { display: none; }
  .room-banner { padding: 23px 0; gap: 10px; }.room-banner h2 { font-size: 21px; line-height: 1.4; margin-top: 6px; }.joined-count { min-width: 80px; padding: 7px 10px; }.joined-count strong { font-size: 26px; }.room-banner .section-kicker { font-size: 10px; letter-spacing: 1px; }
  .lobby-panel, .game-panel { padding: 24px 17px; box-shadow: 5px 5px 0 var(--ink); }.lobby-heading { margin-bottom: 24px; }.lobby-heading h1 { font-size: 25px; }.small-sticker { font-size: 14px; padding: 6px; }.game-list { gap: 14px; }.game-option { padding: 12px; min-height: 151px; gap: 10px; box-shadow: 3px 3px 0 var(--ink); }.game-option.active { box-shadow: 0 0 0 2px white, 0 0 0 4px var(--ink), 5px 5px 0 var(--ink); }.game-icon { width: 43px; height: 43px; font-size: 26px; }.game-label strong { font-size: 16px; }.game-label > span { font-size: 10px; }.game-time { font-size: 10px; padding-top: 6px; }.game-option.active::after { font-size: 10px; padding: 3px 5px; top: 8px; right: 7px; }.selection-mark { font-size: 12px; right: 9px; top: 11px; }.lobby-bottom { padding-top: 22px; }
  .room-footer { justify-content: center; padding: 21px 0 26px; }.room-footer > span { display: none; }.game-screen-title { gap: 10px; }.game-screen-title h1 { font-size: 21px; }.round-label { font-size: 10px; padding: 4px 5px; }.game-content { margin-top: 22px; padding-top: 24px; }.play-instruction h2 { font-size: 24px; }.button { font-size: 15px; min-height: 56px; }.results-list li { padding: 10px 8px; gap: 7px; }.results-list .avatar { width: 32px; height: 32px; font-size: 14px; }.result-name { font-size: 13px; }.result-value { font-size: 11px; }.outcome { font-size: 34px; width: 40px; min-height: 40px; }.result-heading h2 { font-size: 25px; }.result-actions { gap: 11px; }.result-actions .button { font-size: 14px; }
}
@media (max-width: 360px) { .app-shell { padding: 0 15px; }.home-intro h1 { font-size: 44px; }.hero-stamp { right: 4px; width: 57px; height: 57px; font-size: 12px; }.play-strip { gap: 7px; }.play-token { width: 38px; height: 42px; font-size: 23px; }.top-note { font-size: 9px; padding: 6px; }.entry-panel { padding: 25px 18px; }.game-option { padding: 10px; }.game-icon { width: 38px; height: 38px; font-size: 24px; }.game-label strong { font-size: 14px; }.game-label > span { font-size: 9px; }.small-sticker { font-size: 13px; padding: 5px; }.game-screen-title h1 { font-size: 19px; }.game-icon.compact { width: 36px; height: 36px; font-size: 23px; }.potato-recipient { padding: 10px; }.potato-recipient strong { font-size: 14px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

/* Keep fast-game controls within the first phone screen. */
@media (max-width: 640px) {
  .is-playing .topbar { height: 72px; }
  .is-playing .room-banner { padding: 15px 0; }
  .is-playing .room-banner h2 { font-size: 18px; margin-top: 3px; }
  .is-playing .joined-count { padding: 4px 8px; }
  .is-playing .joined-count strong { font-size: 23px; }
  .is-playing .game-panel { padding-top: 18px; }
  .game-panel[data-game="potato"] .game-screen-title { margin-bottom: 12px; }
  .game-panel[data-game="potato"] .game-content { margin-top: 16px; padding-top: 17px; }
  .game-panel[data-game="potato"] .round-eyebrow { display: none; }
  .game-panel[data-game="potato"] .play-instruction h2 { margin: 0 0 6px; font-size: 22px; }
  .game-panel[data-game="potato"] .play-instruction p { font-size: 12px; }
  .potato-stage { display: grid; grid-template-columns: 45px 1fr; gap: 6px 12px; padding: 13px 17px; margin: 16px 0 20px; }
  .potato-emoji { font-size: 38px; grid-row: 1 / 3; }
  .potato-stage > div { justify-content: center; }
  .potato-stage strong { font-size: 57px; }
  #potato-clock-label { text-align: center; font-size: 12px; }
  .potato-stage progress { grid-column: 1 / -1; margin-top: 5px; }
  .potato-targets h3 { margin-bottom: 11px; font-size: 15px; }
  .potato-targets h3 small { font-size: 11px; margin-top: 4px; }
  .potato-recipient { min-height: 77px; padding: 9px; }
  .potato-recipient .avatar { width: 30px; height: 30px; }
}

/* A compact game header keeps room creation on the first phone screen. */
@media (max-width: 640px) {
  .app-shell:has(.home-layout) .topbar { height: 72px; }
  .home-layout { gap: 18px; padding: 18px 0 26px; }
  .home-intro { padding: 14px; background: var(--yellow); border: 3px solid var(--ink); border-radius: 5px; box-shadow: 4px 4px 0 var(--ink); }
  .home-intro .eyebrow, .home-intro .hero-stamp,
  .home-intro h1 br,
  .home-intro .home-detail,
  .home-intro .home-caption { display: none; }
  .home-intro h1 { display: flex; align-items: center; gap: 8px; font-size: 25px; letter-spacing: -1px; line-height: 1.2; }
  .home-intro .hero-question { display: inline; white-space: nowrap; }
  .home-intro h1 .hero-title { margin-top: 0; padding: 3px 8px; border-width: 2px; background: white; box-shadow: 2px 2px 0 var(--ink); white-space: nowrap; }
  .home-intro p { margin-top: 10px; font-size: 11px; line-height: 1.7; }
  .home-intro .play-strip { display: flex; margin-top: 12px; gap: 10px; padding-bottom: 2px; }
  .home-intro .play-token { width: 30px; height: 30px; border-width: 2px; border-radius: 3px; font-size: 18px; box-shadow: 2px 2px 0 var(--ink); }
  .entry-panel { padding: 18px 20px; }
  .entry-panel .panel-title { margin-bottom: 16px; }
  .entry-panel .panel-title .section-kicker, .entry-panel .entry-tip { display: none; }
  .entry-panel .panel-title h2 { margin-top: 0; font-size: 23px; }
  .entry-submit { margin-top: 14px; }
  .entry-footnote { margin-top: 17px; }
}

@media (max-width: 640px) {
  .room-topbar, .is-playing .room-topbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; height: auto; min-height: 85px; padding: 10px 0; gap: 10px 12px; }
  .room-topbar .brand-room { gap: 12px; grid-column: 1; grid-row: 1; }
  .room-topbar .brand > span:last-child { display: none; }
  .room-topbar .brand { flex-shrink: 0; }
  .room-topbar .top-actions { display: contents; }
  .room-topbar .text-button { grid-column: 2; grid-row: 1; }
  .room-topbar .self-identity { grid-column: 1 / -1; grid-row: 2; max-width: none; }
  .self-identity { flex: 1; max-width: 260px; padding: 6px 8px; gap: 8px; box-shadow: 2px 2px 0 var(--ink); }
  .self-role { min-width: 43px; min-height: 32px; padding: 4px 6px; font-size: 11px; }
  .self-name strong { font-size: 13px; }
  .self-meta { gap: 6px; margin-top: 4px; }
}
