/* Shared identities and containment for the existing visual layer. */
.squad-card{display:flex;align-items:center;gap:10px;min-height:64px;width:100%;min-width:0;text-align:left;box-sizing:border-box}
.squad-card .team-mark,.seat .squad-card .team-mark{width:40px;height:48px;flex:0 0 40px;object-fit:contain;object-position:center;margin:0;float:none}
.squad-copy{display:flex;flex-direction:column;justify-content:center;min-width:0;gap:3px;flex:1}
.squad-copy strong{display:block!important;font-size:14px;line-height:20px;margin:0;text-align:left}
.squad-names{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere;font-size:14px;line-height:20px;min-height:40px;text-align:left}
.squad-card--compact{gap:3px;min-height:54px;flex-direction:column}.squad-card--compact .squad-copy{width:100%;text-align:center}.squad-card--compact .squad-copy strong{display:none!important}.squad-card--compact .squad-names{text-align:center;font-size:12px;line-height:16px;min-height:32px}
.seat .squad-card--compact .team-mark{width:24px;height:28px;flex-basis:28px}.gathering-row{min-height:84px}.standing>strong{width:100%}#pairs button{width:100%;min-height:84px}.score-team{display:block}.score-team .squad-card{gap:4px}.score-team .squad-card .team-mark{width:28px;flex-basis:28px;height:36px}
.asset-button{position:relative;overflow:hidden}.asset-button>img{position:absolute;inset:0;width:100%;height:100%;object-fit:fill;pointer-events:none}.accessible-label{position:relative;z-index:1}
.location-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.location-card{min-width:0;display:flex;flex-direction:column;gap:6px}.location-card img{width:100%;height:90px;object-fit:cover}.location-card small{overflow-wrap:anywhere}
.state-image{width:120px;max-height:100px;object-fit:contain}.final-brand img{width:90px}.history-card img{width:80px;height:64px;object-fit:cover}.menu-cards{display:none}.table-hand{position:absolute;bottom:70px;left:50%;transform:translateX(-50%);width:210px}.table-hand .card{min-height:72px;width:45px}.table-hand .cards{gap:5px}.card{position:relative}.card-corner{position:absolute;top:4px;left:5px;font-size:16px;line-height:16px;font-style:normal}.card-corner small{display:block;font-size:13px}.card-corner.bottom{top:auto;left:auto;bottom:4px;right:5px;transform:rotate(180deg)}

/* First secret-signal agreement stage */
.signal-agreement-card{max-width:760px}
.signal-stage-title{display:flex;justify-content:space-between;align-items:flex-start;gap:18px}
.signal-countdown-wrap{min-width:92px;text-align:center;border:1px solid rgba(224,183,88,.5);border-radius:14px;padding:10px 14px;background:rgba(0,0,0,.12)}
.signal-countdown{font-size:32px;line-height:1;color:#e7c465}
.signal-squad-statuses{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0 18px}
.signal-picker{display:grid;gap:10px;margin:16px 0;padding:14px;border:1px solid rgba(224,183,88,.32);border-radius:14px;background:rgba(255,255,255,.025)}
.signal-preview{font-size:20px;font-weight:700;line-height:1.4;padding:12px 14px;border-radius:12px;background:rgba(224,183,88,.10);border:1px solid rgba(224,183,88,.30);overflow-wrap:anywhere}
.signal-confirmed{margin:16px 0;padding:14px;border:1px solid rgba(224,183,88,.45);border-radius:14px}
@media(max-width:600px){.signal-stage-title{align-items:center}.signal-countdown-wrap{min-width:78px}.signal-preview{font-size:18px}}

/* Live game-table exchange proof */
.game-shell{max-width:680px;margin:0 auto}.game-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.game-heading h2{margin:8px 0 2px}.game-heading__mode{margin-top:10px;padding:6px 10px;border:1px solid rgba(233,184,91,.45);border-radius:999px;background:#173e2f;font-size:12px}.network-scores{margin:10px 0}.network-scores .score-team{display:flex;align-items:center;gap:5px}.network-scores .score-team .team-mark{width:24px;height:28px;flex:0 0 24px}.network-arena{position:relative;margin:10px 0 16px;background-image:linear-gradient(#0b2d2266,#0b2d2266),var(--table-image);background-size:cover;background-position:center;overflow:hidden}.network-seat{z-index:4;width:90px;min-height:86px}.network-seat .team-mark{width:30px;height:34px}.network-mini-backs{display:flex;justify-content:center;gap:2px;margin-top:4px}.network-mini-back{display:block;width:11px;height:16px;border:1px solid #eadcad;border-radius:2px;background:url('assets/02_cards/card_back.png') center/cover}.network-center{z-index:5;width:214px;padding:12px}.network-center-title{font-weight:700}.network-center-cards{grid-template-columns:repeat(4,minmax(0,1fr));gap:5px}.network-center-cards .network-face-card{min-height:96px}.network-face-card{position:relative;margin:0!important;width:100%!important;padding:5px!important;min-height:112px;overflow:hidden;touch-action:manipulation}.network-card-corner{position:absolute;left:5px;top:5px;display:flex;flex-direction:column;align-items:center;font-family:Georgia,serif;font-size:17px;line-height:15px}.network-card-corner small{font-size:13px;line-height:13px}.network-card-corner--bottom{left:auto;top:auto;right:5px;bottom:5px;transform:rotate(180deg)}.network-card-suit{font-size:32px!important;line-height:1}.network-hand{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}.network-hand .network-face-card{min-height:118px}.network-self-seat{position:absolute;left:50%;bottom:9px;transform:translateX(-50%);z-index:4;display:flex;align-items:center;gap:6px;max-width:80%;padding:6px 10px;border:1px solid #d2b35d;border-radius:12px;background:#12392ddf;font-size:12px;white-space:nowrap}.network-self-seat .team-mark{width:24px;height:28px}.network-deal-overlay{position:absolute;inset:0;z-index:20;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;background:#0a2b22dc;backdrop-filter:blur(2px)}.network-deal-stack{font-size:48px;letter-spacing:-12px;animation:network-deal 1s ease-in-out infinite alternate}.network-deal-overlay strong{font-size:20px}.network-actions{position:static;margin-top:12px}.network-actions button:disabled{opacity:.55}.network-stage-note{text-align:center;margin:14px 0 4px}@keyframes network-deal{from{transform:translateY(5px) rotate(-4deg)}to{transform:translateY(-8px) rotate(4deg)}}
@media(max-width:520px){.game-shell{padding:0}.network-arena{height:500px;border-radius:24px}.network-seat{width:72px;min-height:76px}.network-seat .name{font-size:11px}.network-seat small{font-size:10px}.network-center{width:176px}.network-center-cards .network-face-card{min-height:78px}.network-card-corner{font-size:14px;line-height:13px}.network-card-corner small{font-size:11px}.network-card-suit{font-size:25px!important}.network-hand{gap:5px}.network-hand .network-face-card{min-height:96px}.network-self-seat{bottom:6px;font-size:11px}.game-heading__mode{font-size:11px}.network-actions{grid-template-columns:repeat(3,minmax(0,1fr))}.network-actions button{font-size:11px}}
@media(prefers-reduced-motion:reduce){.network-deal-stack{animation:none}}

/* KEMP / ANTI-KEMP QA stage */
.anti-target-panel,.qa-panel{margin:12px 0;padding:12px;border:1px solid rgba(233,184,91,.45);border-radius:14px;background:#14392d}.anti-target-panel strong{font-size:18px}.anti-targets,.qa-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:10px}.qa-panel summary{cursor:pointer;font-weight:700}.qa-panel p{margin:8px 0}.qa-actions button{font-size:12px}.round-result-overlay{position:absolute;inset:0;z-index:24;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;padding:20px;text-align:center;background:#0a2b22e8;backdrop-filter:blur(3px)}.round-result-overlay strong{font-size:28px}.round-result-overlay.success strong{color:#f0c86c}.anti-countdown{font-size:20px}.network-actions button:not(:disabled){cursor:pointer}
@media(max-width:520px){.anti-targets,.qa-actions{grid-template-columns:1fr}.round-result-overlay strong{font-size:22px}}

/* Public in-round Signals stage */
.round-signal-panel{margin:12px 0;padding:14px;border:1px solid rgba(233,184,91,.48);border-radius:16px;background:#123a2d;max-height:58vh;overflow:auto;overscroll-behavior:contain}.round-signal-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.round-signal-head h3{margin:0 0 3px}.round-signal-head p{margin:0}.round-signal-head .quiet{width:auto;margin:0}.round-signal-panel h4{margin:14px 0 8px}.round-emoji-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:7px}.round-emoji-button{min-height:50px;padding:4px;font-family:'Apple Color Emoji','Segoe UI Emoji','Noto Color Emoji',sans-serif;font-size:27px}.round-phrase-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}.round-phrase-button{text-align:left;font-size:13px;line-height:1.25;min-height:44px}.round-signal-stack{position:absolute;left:50%;top:-6px;transform:translate(-50%,-100%);z-index:35;display:flex;flex-direction:column;align-items:center;gap:4px;width:max-content;max-width:150px;pointer-events:none}.network-self-seat .round-signal-stack{top:0}.round-signal-bubble{animation:round-signal-pop 3.2s ease-out both;filter:drop-shadow(0 3px 6px #0007)}.round-signal-bubble.emoji{font-family:'Apple Color Emoji','Segoe UI Emoji','Noto Color Emoji',sans-serif;font-size:38px;line-height:1.05}.round-signal-bubble.phrase{max-width:145px;padding:7px 9px;border-radius:12px;background:#f4ead5;color:#17362b;font-size:13px;font-weight:700;line-height:1.25;text-align:center;white-space:normal;overflow-wrap:anywhere}.network-seat,.network-self-seat{overflow:visible}.network-actions #roundSignalButton{font-weight:700}@keyframes round-signal-pop{0%{opacity:0;transform:translateY(7px) scale(.92)}12%{opacity:1;transform:translateY(0) scale(1)}78%{opacity:1}100%{opacity:0;transform:translateY(-8px) scale(.98)}}
@media(max-width:520px){.round-signal-panel{max-height:52vh;padding:11px}.round-emoji-grid{grid-template-columns:repeat(5,minmax(0,1fr));gap:5px}.round-emoji-button{font-size:25px;min-height:46px}.round-phrase-grid{grid-template-columns:1fr}.round-signal-bubble.phrase{max-width:110px;font-size:11px}.round-signal-bubble.emoji{font-size:34px}}
@media(prefers-reduced-motion:reduce){.round-signal-bubble{animation:none}}

/* Round Signals UX + timers + round result refinement */
.anti-target-overlay{position:absolute;inset:0;z-index:45;display:flex;align-items:center;justify-content:center;padding:18px;background:rgba(5,28,22,.72);backdrop-filter:blur(2px)}
.anti-target-overlay .anti-target-panel{width:min(430px,92%);margin:0;padding:18px;border:1px solid rgba(233,184,91,.7);box-shadow:0 14px 34px rgba(0,0,0,.35);background:#123a2d}
.anti-target-overlay .anti-target-panel strong{display:block;font-size:21px;margin-bottom:6px}.anti-target-overlay .anti-targets{grid-template-columns:repeat(2,minmax(0,1fr));margin-top:14px}.anti-target-overlay .anti-countdown{color:#f0c86c;font-size:22px}
.round-result-overlay{gap:12px}.round-result-kicker{font-size:12px;letter-spacing:.12em;font-weight:800;color:#e9cf9c}.round-standings{width:min(360px,92%);display:grid;gap:6px;padding:10px;border:1px solid rgba(233,184,91,.34);border-radius:12px;background:rgba(12,48,37,.82)}.round-standings-title{font-size:12px;font-weight:800;text-transform:uppercase;letter-spacing:.08em;color:#e9cf9c}.round-standing{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:7px 9px;border-radius:9px;background:rgba(255,255,255,.04)}.round-standing.changed{outline:1px solid rgba(240,200,108,.7);background:rgba(240,200,108,.09)}.round-standing b{font-size:19px;color:#f4ead5}
.round-phrase-groups{display:grid;gap:12px}.round-phrase-group{padding:10px;border:1px solid rgba(233,184,91,.24);border-radius:12px;background:rgba(255,255,255,.025)}.round-phrase-group h5{margin:0 0 8px;font-size:12px;letter-spacing:.06em;text-transform:uppercase;color:#e9cf9c}.round-phrase-button[aria-pressed=true],.round-emoji-button[aria-pressed=true]{outline:2px solid #f0c86c;outline-offset:1px;background:#315e40}
.combo-builder{display:grid;gap:11px}.combo-builder>p{margin:0}.combo-slots{display:grid;grid-template-columns:1fr 1fr;gap:8px}.combo-slot{min-height:48px;text-align:left;padding:9px 11px}.combo-slot.active{outline:2px solid #f0c86c;outline-offset:1px}.combo-kind-tabs{display:grid;grid-template-columns:1fr 1fr;gap:8px}.combo-kind-tabs button{margin:0}.combo-emoji-grid{padding-top:2px}
.round-signal-bubble{animation-duration:5.5s}.round-signal-panel{scrollbar-gutter:stable}.round-signal-panel .round-phrase-grid{gap:7px}
@media(max-width:520px){.anti-target-overlay{padding:10px}.anti-target-overlay .anti-target-panel{padding:14px}.anti-target-overlay .anti-targets{grid-template-columns:1fr}.round-standings{width:95%}.combo-slots{grid-template-columns:1fr}.round-phrase-group{padding:8px}}

/* Round Signals UX: category tabs, personal favorites, and top-seat reaction visibility. */
.round-signal-panel{max-height:58vh;overflow:hidden;display:flex;flex-direction:column}
.round-signal-head,.round-signal-tabs{flex:0 0 auto}
.round-signal-tabs{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;margin:10px 0 8px}
.round-signal-tabs button{min-width:0;min-height:42px;padding:6px 4px;font-size:12px;line-height:1.15}
.round-signal-body{min-height:0;overflow:auto;overscroll-behavior:contain;padding-right:2px;scrollbar-gutter:stable}
.round-emoji-tile{display:grid;grid-template-rows:50px 30px;gap:3px;min-width:0}
.round-emoji-tile .round-emoji-button{min-height:50px;margin:0}
.round-favorite-star{min-height:30px!important;margin:0!important;padding:1px!important;font-family:Arial,sans-serif!important;font-size:21px!important;line-height:1!important;background:#173e2f!important;color:#d9c98c!important;border-color:rgba(233,184,91,.4)!important}
.round-favorite-star.active{color:#f3cf68!important;background:#274b38!important;box-shadow:inset 0 0 0 1px rgba(243,207,104,.22)}
.round-phrase-row{display:grid;grid-template-columns:minmax(0,1fr) 40px;gap:5px;align-items:stretch}
.round-phrase-row .round-phrase-button{margin:0;min-width:0}
.round-phrase-row .round-favorite-star{min-height:44px!important}
.round-favorites h4{margin:10px 0 7px}
.favorite-phrase-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.combo-kind-tabs{display:grid;grid-template-columns:1.15fr 1fr 1fr;gap:6px;margin:8px 0}
.combo-kind-tabs button{min-width:0;padding:6px 4px;font-size:11px}
.combo-picker-body{max-height:30vh;overflow:auto;overscroll-behavior:contain;padding-right:2px}
/* The player opposite you sits at the top edge. Put reactions below that seat so the arena does not clip them. */
.network-seat--top .round-signal-stack{top:100%;transform:translate(-50%,8px);flex-direction:column}
.round-delta-line{padding:7px 10px;border-radius:9px;background:rgba(240,200,108,.10);border:1px solid rgba(240,200,108,.42);font-size:13px;font-weight:700;color:#f4ead5}
@media(max-width:520px){
 .round-signal-panel{max-height:54vh}
 .round-signal-tabs{grid-template-columns:repeat(2,minmax(0,1fr))}
 .round-signal-tabs button{font-size:11px;min-height:38px}
 .round-emoji-tile{grid-template-rows:46px 28px}
 .round-emoji-tile .round-emoji-button{min-height:46px}
 .favorite-phrase-grid{grid-template-columns:1fr}
 .combo-kind-tabs{grid-template-columns:1fr 1fr 1fr}
 .combo-kind-tabs button{font-size:10px}
 .combo-picker-body{max-height:27vh}
}

.round-standing__meta{min-width:0;display:grid;gap:2px;text-align:left}.round-standing__team{font-weight:700}.round-standing__players{display:block;max-width:250px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:rgba(244,234,213,.72);font-size:11px}.secret-signal-quick{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:8px 12px;padding:10px 12px;border:1px solid rgba(233,184,91,.34);border-radius:12px;background:rgba(240,200,108,.07);margin:8px 0 10px}.secret-signal-quick__text{font-size:11px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:#e9cf9c}.secret-signal-quick .signal-preview{grid-column:1/2;margin:0}.secret-signal-quick button{grid-column:2;grid-row:1/3;white-space:nowrap}
@media(max-width:520px){.secret-signal-quick{grid-template-columns:1fr}.secret-signal-quick button{grid-column:1;grid-row:auto;width:100%}.round-standing__players{max-width:190px}}

.combo-send-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;position:sticky;top:0;z-index:3;padding:4px 0 6px;background:linear-gradient(to bottom,rgba(10,61,47,.98) 75%,rgba(10,61,47,0))}.combo-send-row button{margin:0;min-height:44px}@media(max-width:520px){.combo-send-row{grid-template-columns:1fr auto}}

/* Center replacement vote + quick-mode auto replacement. */
.center-vote-controls{display:grid;gap:6px;margin-top:9px;padding-top:8px;border-top:1px solid rgba(233,184,91,.28);text-align:left}
.center-vote-controls.open{padding:9px;border:1px solid rgba(240,200,108,.48);border-radius:10px;background:rgba(9,43,33,.72)}
.center-vote-top{display:flex;align-items:center;justify-content:space-between;gap:8px}.center-vote-top strong{font-size:13px}.center-vote-clock{white-space:nowrap;color:#f0c86c;font-size:12px}.center-vote-clock b{font-size:16px}
.center-vote-initiator{margin:0!important;font-size:10px!important;color:rgba(244,234,213,.72)!important}.center-vote-progress{font-size:12px;font-weight:800;color:#e9cf9c}
.center-vote-actions{display:grid;grid-template-columns:1fr 1fr;gap:6px}.center-vote-actions button,.center-vote-start{min-height:36px;margin:0;padding:5px 8px;font-size:11px}.center-vote-mine{padding:5px 7px;border-radius:8px;font-size:11px;font-weight:800;text-align:center}.center-vote-mine.yes{background:rgba(72,154,104,.24)}.center-vote-mine.no{background:rgba(165,73,57,.24)}
.center-vote-result{padding:6px 7px;border-radius:8px;font-size:10px;font-weight:800;text-align:center}.center-vote-result.accepted{background:rgba(72,154,104,.24);color:#dff4d7}.center-vote-result.rejected{background:rgba(165,73,57,.22);color:#f1d6cf}
.center-auto-row{display:flex;align-items:center;justify-content:center;gap:3px;font-size:11px;font-weight:700}.center-auto-row b{color:#f0c86c;font-size:15px}.center-vote-controls>small{margin:0!important;text-align:center;font-size:9px!important}
@media(max-width:520px){.center-vote-controls{margin-top:6px;padding-top:6px;gap:5px}.center-vote-controls.open{padding:6px}.center-vote-top strong{font-size:11px}.center-vote-clock{font-size:10px}.center-vote-clock b{font-size:14px}.center-vote-actions button,.center-vote-start{min-height:32px;font-size:9px;padding:4px}.center-vote-progress{font-size:10px}.center-vote-initiator{font-size:8px!important}.center-vote-mine,.center-vote-result{font-size:9px;padding:4px}.center-auto-row{font-size:9px}.center-auto-row b{font-size:13px}}


/* Inter-round chat + signal change stage. */
.interround-panel{display:grid;gap:12px;margin:14px 0;padding:14px;border:1px solid rgba(233,184,91,.45);border-radius:16px;background:#123a2d}
.interround-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px}.interround-head h3{margin:3px 0 0}.interround-clock{flex:0 0 auto;min-width:72px;padding:8px 10px;border:1px solid rgba(233,184,91,.42);border-radius:12px;text-align:center;font-size:12px;color:#e9cf9c}.interround-clock b{font-size:24px;color:#f0c86c}
.interround-changing-banner,.interround-private-note,.interround-current-signal{padding:8px 10px;border-radius:10px;background:rgba(240,200,108,.08);border:1px solid rgba(240,200,108,.28);font-size:12px}.interround-private-note{background:rgba(66,132,99,.16)}
.interround-chat{display:grid;gap:7px}.interround-chat-title{font-size:12px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:#e9cf9c}.interround-message-list{display:grid;gap:5px;max-height:150px;overflow:auto;padding:7px;border-radius:10px;background:rgba(0,0,0,.11)}.interround-message{display:grid;grid-template-columns:auto minmax(0,1fr);gap:7px;padding:5px 7px;border-radius:8px;background:rgba(255,255,255,.04);font-size:12px}.interround-message.mine{background:rgba(240,200,108,.08)}.interround-message b{white-space:nowrap;color:#e9cf9c}.interround-message span{overflow-wrap:anywhere}.interround-message-list p{margin:3px}
.interround-chat-form{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:7px}.interround-chat-form input{min-width:0}.interround-chat-form button,.interround-change-button{margin:0}.interround-change-button{width:100%;font-weight:800}
.interround-signal-builder{display:grid;gap:9px;padding:10px;border:1px solid rgba(233,184,91,.28);border-radius:12px;background:rgba(0,0,0,.08)}.interround-signal-slots{display:grid;grid-template-columns:1fr 1fr;gap:7px}.interround-signal-slot{min-height:44px;margin:0;text-align:left}.interround-signal-slot.active{outline:2px solid #f0c86c;outline-offset:1px}.interround-signal-pick{max-height:230px;overflow:auto;padding-right:2px;overscroll-behavior:contain}.interround-signal-builder>.round-signal-tabs{grid-template-columns:repeat(3,minmax(0,1fr));margin:0}.interround-signal-builder>.primary{margin:0;position:sticky;bottom:0}
@media(max-width:520px){.interround-panel{padding:11px}.interround-head{align-items:center}.interround-clock{min-width:62px}.interround-clock b{font-size:20px}.interround-chat-form{grid-template-columns:1fr}.interround-signal-slots{grid-template-columns:1fr}.interround-signal-builder>.round-signal-tabs button{font-size:10px}.interround-signal-pick{max-height:210px}}

/* Personal Suspicion marker: private eye toggle shown only on rivals. */
.network-seat{position:absolute}
.suspicion-eye{position:absolute;right:-9px;top:3px;z-index:12;width:30px!important;height:30px!important;min-height:30px!important;margin:0!important;padding:0!important;border:1px solid rgba(244,234,213,.30)!important;border-radius:50%!important;background:rgba(14,52,40,.78)!important;color:rgba(244,234,213,.58)!important;font-size:16px!important;line-height:1!important;display:grid!important;place-items:center;box-shadow:0 2px 7px rgba(0,0,0,.25);transition:transform .12s ease,background .12s ease,color .12s ease,box-shadow .12s ease}
.suspicion-eye:hover:not(:disabled){transform:scale(1.07);color:#f4ead5!important}
.suspicion-eye.active{background:rgba(240,200,108,.96)!important;color:#17362b!important;border-color:#f0c86c!important;box-shadow:0 0 0 3px rgba(240,200,108,.18),0 3px 9px rgba(0,0,0,.32)}
.suspicion-eye:disabled{opacity:.65}
@media(max-width:520px){.suspicion-eye{right:-7px;top:1px;width:27px!important;height:27px!important;min-height:27px!important;font-size:14px!important}}

/* Reconnect QA: make temporary disconnects unmistakable without exposing private state. */
.network-seat--offline{opacity:.62;filter:saturate(.55)}
.network-seat--offline::after{content:'НЕТ СВЯЗИ';position:absolute;left:50%;top:-12px;transform:translateX(-50%);z-index:11;white-space:nowrap;padding:2px 6px;border-radius:999px;border:1px solid rgba(244,234,213,.28);background:rgba(18,33,28,.92);font-size:8px;font-weight:900;letter-spacing:.06em;color:#f4ead5}
.reconnect-banner{margin:8px 0 12px;padding:8px 10px;border:1px solid rgba(233,184,91,.34);border-radius:10px;background:rgba(240,200,108,.07);font-size:11px;font-weight:700;color:#f4ead5}

/* Fixed-score match final screen (Quick / Classic). */
.match-final-screen{max-width:760px;margin:24px auto;padding:24px;border:1px solid rgba(244,234,213,.18);border-radius:22px;background:rgba(14,52,40,.88);box-shadow:0 18px 48px rgba(0,0,0,.25)}
.match-final-hero{text-align:center;padding:8px 8px 20px}
.match-final-winner-mark{display:block;width:76px;height:76px;object-fit:contain;margin:0 auto 8px}
.match-final-kicker{display:block;font-size:11px;font-weight:900;letter-spacing:.14em;opacity:.68;margin-bottom:6px}
.match-final-hero h2{margin:0 0 6px;font-size:clamp(28px,6vw,46px)}
.match-final-standings{display:grid;gap:10px}
.match-final-row{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 16px;border-radius:14px;border:1px solid rgba(244,234,213,.14);background:rgba(244,234,213,.055)}
.match-final-row.winner{border-color:rgba(240,200,108,.72);background:rgba(240,200,108,.12);box-shadow:0 0 0 2px rgba(240,200,108,.07)}
.match-final-row.mine{outline:1px solid rgba(244,234,213,.26)}
.match-final-row-copy{display:grid;gap:3px;min-width:0}
.match-final-row-copy span{font-size:12px;opacity:.72;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.match-final-score{font-size:30px;line-height:1}
.match-final-note{text-align:center;margin:18px 0 2px;font-weight:750}
@media(max-width:560px){.match-final-screen{margin:10px;padding:16px;border-radius:16px}.match-final-row{padding:12px}.match-final-winner-mark{width:62px;height:62px}.match-final-score{font-size:26px}}

/* Voluntary leave QA */
.game-heading__right{display:flex;align-items:flex-end;gap:8px;flex-direction:column}
.game-leave-button{font-size:10px!important;min-height:30px!important;padding:6px 10px!important;opacity:.86}
.match-final-actions{display:flex;justify-content:center;margin-top:14px}
@media(max-width:560px){.game-heading__right{align-items:flex-end}.game-leave-button{font-size:9px!important;padding:5px 8px!important}}

/* Rematch: host returns everyone still in the room to the same Gathering. */
.match-final-actions{display:flex;gap:10px;align-items:center;justify-content:center;flex-wrap:wrap}
.match-final-rematch-note{max-width:280px;text-align:center;font-size:11px}

.match-pause-banner{margin:10px 0 14px;padding:12px 14px;border-radius:16px;border:1px solid rgba(244,234,213,.22);background:rgba(34,49,43,.96);font-weight:900;letter-spacing:.02em;text-align:center;color:#f4ead5;box-shadow:0 10px 28px rgba(0,0,0,.18)}

/* Stage 11 — visual/UI polish after completed gameplay QA. */
@media(min-width:521px){.network-scores{grid-template-columns:repeat(auto-fit,minmax(190px,1fr))!important}.network-scores .score{min-width:0}.network-scores .score-names{font-size:12px}}
.network-scores .score-names{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:center;gap:5px;text-align:center;min-height:18px}
.network-scores .score-name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.score-plus{display:inline-grid;place-items:center;justify-self:center;font-weight:900;color:#f0c86c;line-height:1}
.round-standing__players,.match-final-partners{display:flex!important;align-items:center;gap:5px;min-width:0;flex-wrap:wrap}
.round-standing__players .score-name,.match-final-partners .score-name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

.card-pile-counters{display:flex;align-items:center;justify-content:center;gap:8px;flex-wrap:wrap;margin-top:7px}
.card-pile-counters span{padding:3px 6px;border:1px solid rgba(233,184,91,.30);border-radius:999px;background:rgba(8,38,29,.62);font-size:9px;font-weight:800;letter-spacing:.03em;color:#e9cf9c}

.network-deal-stack{display:flex;align-items:center;justify-content:center;letter-spacing:0;animation:network-deal 1s ease-in-out infinite alternate}
.network-deal-stack img{display:block;width:54px;height:78px;object-fit:cover;border-radius:8px;box-shadow:0 5px 12px rgba(0,0,0,.30)}
.network-deal-stack img+img{margin-left:-21px}

.round-signal-layer{position:absolute;inset:0;z-index:70;pointer-events:none;overflow:visible}
.round-signal-layer .round-signal-stack{position:absolute;display:flex;flex-direction:column;align-items:center;gap:4px;width:max-content;max-width:180px;transform:translate(-50%,-100%);z-index:1}
.round-signal-layer .round-signal-stack--below{transform:translate(-50%,58px)}
.round-signal-layer .round-signal-stack--top-side{transform:translate(-50%,12px)}
.round-signal-layer .round-signal-stack--self{transform:translate(-50%,-100%)}
.round-signal-layer .round-signal-bubble.phrase{max-width:170px;border:1px solid rgba(240,200,108,.78);box-shadow:0 5px 16px rgba(0,0,0,.46);font-size:13px;line-height:1.28}
.round-signal-layer .round-signal-bubble.emoji{padding:2px 7px;border-radius:12px;background:rgba(12,48,37,.82);filter:drop-shadow(0 4px 8px rgba(0,0,0,.6));font-size:40px}

.network-seat.suspected{outline:3px solid rgba(240,200,108,.96);outline-offset:3px;border-color:#f0c86c!important;box-shadow:0 0 0 5px rgba(240,200,108,.15),0 0 24px rgba(240,200,108,.46),0 5px 14px rgba(0,0,0,.42)!important;animation:kemp-suspicion-pulse 1.45s ease-in-out infinite}
.network-seat.suspected .suspicion-eye.active{transform:scale(1.12);box-shadow:0 0 0 4px rgba(240,200,108,.24),0 0 18px rgba(240,200,108,.60)}
@keyframes kemp-suspicion-pulse{0%,100%{filter:brightness(1)}50%{filter:brightness(1.11)}}

.interround-tabs,.match-final-tabs{display:grid;grid-template-columns:1fr 1fr;gap:7px}
.interround-tabs button,.match-final-tabs button{margin:0;min-height:42px;font-size:12px;font-weight:900;letter-spacing:.04em}
.interround-results{display:grid;gap:10px;padding:11px;border:1px solid rgba(233,184,91,.25);border-radius:13px;background:rgba(0,0,0,.08)}
.interround-result-message{font-size:20px;line-height:1.25;color:#f4ead5}
.round-delta-line{padding:7px 9px;border-radius:9px;background:rgba(240,200,108,.10);font-size:12px;font-weight:800;color:#e9cf9c}

.checked-cards{display:grid;gap:8px;padding:10px;border:1px solid rgba(244,234,213,.16);border-radius:12px;background:rgba(244,234,213,.04)}
.checked-cards-title{font-size:11px;font-weight:900;letter-spacing:.08em;text-transform:uppercase;color:#e9cf9c}
.checked-player{display:grid;grid-template-columns:minmax(82px,.8fr) minmax(0,2.2fr);align-items:center;gap:9px}
.checked-player>strong{font-size:11px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.checked-player-cards{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px}
.checked-player-cards .checked-card{min-height:68px!important;height:68px!important;padding:3px!important;opacity:1!important;cursor:default!important}
.checked-player-cards .network-card-corner{font-size:11px;line-height:10px;left:3px;top:3px}.checked-player-cards .network-card-corner small{font-size:9px;line-height:9px}.checked-player-cards .network-card-corner--bottom{left:auto;top:auto;right:3px;bottom:3px}.checked-player-cards .network-card-suit{font-size:20px!important}

.match-final-tabs{margin:-4px 0 16px}
.match-final-tab-panel{min-height:180px}
.match-final-partners{font-size:12px;opacity:.78}

.swap-animation-layer{position:fixed;inset:0;z-index:9999;pointer-events:none}
.swap-ghost-card{position:fixed;display:grid;place-items:center;border:1px solid #d9c69e;border-radius:9px;background:#f4ead5;color:#1b1b18;box-shadow:0 8px 20px rgba(0,0,0,.38);overflow:hidden;font-family:Georgia,serif}
.swap-ghost-card.red{color:#b4473c}
.swap-ghost-rank{position:absolute;left:6px;top:5px;font-size:16px;font-weight:800}.swap-ghost-suit{font-size:32px}


@media(max-width:520px){
 .network-scores .score-names{gap:3px;font-size:10px}.score-plus{font-size:10px}
 .card-pile-counters{gap:4px}.card-pile-counters span{font-size:8px;padding:2px 5px}
 .network-deal-stack img{width:46px;height:67px}.network-deal-stack img+img{margin-left:-18px}
 .round-signal-layer .round-signal-bubble.phrase{max-width:132px;font-size:11px}.round-signal-layer .round-signal-bubble.emoji{font-size:34px}
 .round-signal-layer .round-signal-stack--below{transform:translate(-50%,48px)}
 .checked-player{grid-template-columns:1fr}.checked-player>strong{white-space:normal}.checked-player-cards .checked-card{min-height:62px!important;height:62px!important}
 .interround-result-message{font-size:17px}
 .match-final-tabs{margin-bottom:12px}
}
@media(prefers-reduced-motion:reduce){.network-seat.suspected{animation:none}.swap-animation-layer{display:none}}

/* Stage 11 QA fix: centered inter-round overlay + guaranteed visible 4-card deal transition */
.interround-overlay{position:fixed;inset:0;z-index:120;padding:12px;background:rgba(5,25,19,.88);backdrop-filter:blur(4px);overflow:auto}
.interround-overlay .interround-panel{width:min(660px,calc(100vw - 24px));max-height:calc(100dvh - 24px);overflow:auto;margin:auto;padding:16px;box-shadow:0 18px 54px rgba(0,0,0,.42);background:#123a2d}
.network-deal-overlay{position:fixed;inset:0;z-index:115;background:rgba(5,25,19,.90);backdrop-filter:blur(4px)}
.network-deal-stack{position:relative;width:260px;height:126px;animation:none}
.network-deal-stack img{position:absolute;left:50%;top:50%;width:58px;height:84px;margin:0!important;transform:translate(-50%,-50%);animation:stage11-deal-card 1.25s ease-in-out infinite}
.network-deal-stack img:nth-child(1){--deal-x:-92px;--deal-y:-12px;--deal-r:-12deg;animation-delay:0s}
.network-deal-stack img:nth-child(2){--deal-x:-31px;--deal-y:7px;--deal-r:-4deg;animation-delay:.10s}
.network-deal-stack img:nth-child(3){--deal-x:31px;--deal-y:7px;--deal-r:4deg;animation-delay:.20s}
.network-deal-stack img:nth-child(4){--deal-x:92px;--deal-y:-12px;--deal-r:12deg;animation-delay:.30s}
@keyframes stage11-deal-card{0%,12%{opacity:.20;transform:translate(-50%,-50%) scale(.78) rotate(0)}55%,78%{opacity:1;transform:translate(calc(-50% + var(--deal-x)),calc(-50% + var(--deal-y))) scale(1) rotate(var(--deal-r))}100%{opacity:.35;transform:translate(calc(-50% + var(--deal-x)),calc(-50% + var(--deal-y) + 8px)) scale(.96) rotate(var(--deal-r))}}
@media(max-width:520px){.interround-overlay{padding:8px}.interround-overlay .interround-panel{width:calc(100vw - 16px);max-height:calc(100dvh - 16px);padding:12px}.network-deal-stack{width:220px}.network-deal-stack img{width:50px;height:73px}.network-deal-stack img:nth-child(1){--deal-x:-76px}.network-deal-stack img:nth-child(2){--deal-x:-25px}.network-deal-stack img:nth-child(3){--deal-x:25px}.network-deal-stack img:nth-child(4){--deal-x:76px}}
@media(prefers-reduced-motion:reduce){.network-deal-stack img{animation:none;opacity:1}.network-deal-stack img:nth-child(1){transform:translate(calc(-50% - 92px),-50%) rotate(-12deg)}.network-deal-stack img:nth-child(2){transform:translate(calc(-50% - 31px),-50%) rotate(-4deg)}.network-deal-stack img:nth-child(3){transform:translate(calc(-50% + 31px),-50%) rotate(4deg)}.network-deal-stack img:nth-child(4){transform:translate(calc(-50% + 92px),-50%) rotate(12deg)}}


/* Stage 11 combined inter-round results + chat */
.interround-overlay{
  position:fixed;
  inset:0;
  z-index:120;
  display:grid;
  place-items:center;
  padding:12px;
  overflow:hidden;
  text-align:left;
  background:rgba(4,23,17,.985);
  backdrop-filter:blur(6px);
}
.interround-overlay .interround-panel{
  width:min(660px,calc(100vw - 24px));
  max-height:calc(100dvh - 24px);
  margin:0;
  overflow:auto;
  overscroll-behavior:contain;
  padding:14px;
  text-align:left;
  box-shadow:0 18px 54px rgba(0,0,0,.48);
  background:#123a2d;
}
.interround-overlay .interround-results{gap:7px;padding:9px}
.interround-overlay .checked-cards{gap:6px;padding:8px}
.interround-overlay .checked-player-cards .checked-card{min-height:58px!important;height:58px!important}
.interround-overlay .round-standings{padding:8px;gap:4px}
.interround-overlay .round-standing{padding:5px 8px}
.interround-overlay .interround-chat{padding-top:2px}
.interround-overlay .interround-message-list{max-height:104px}
.interround-overlay .interround-change-button{margin-top:0}
@media(max-height:720px){
  .interround-overlay{padding:8px}
  .interround-overlay .interround-panel{max-height:calc(100dvh - 16px);padding:10px;gap:8px}
  .interround-overlay .checked-player-cards .checked-card{min-height:50px!important;height:50px!important}
  .interround-overlay .interround-message-list{max-height:72px}
}
@media(max-width:520px){
  .interround-overlay{padding:8px}
  .interround-overlay .interround-panel{width:calc(100vw - 16px);max-height:calc(100dvh - 16px);padding:10px}
}

/* Stage 11 final desktop polish */
.agreement-signal-slots{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.agreement-signal-slot{min-height:48px!important;margin:0!important;text-align:left;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.agreement-signal-slot.active{outline:2px solid #f0c86c;outline-offset:1px;background:#315e40}
.agreement-signal-tabs{grid-template-columns:1fr 1fr!important;margin:8px 0}
.agreement-signal-body{max-height:280px;overflow:auto;overscroll-behavior:contain;padding:2px}
.agreement-emoji-button{font-family:'Apple Color Emoji','Segoe UI Emoji','Noto Color Emoji',sans-serif!important;font-size:34px!important;line-height:1!important;font-weight:400!important;font-synthesis:none!important}
.agreement-emoji-button[aria-pressed=true],.setup-reaction[aria-pressed=true]{outline:2px solid #987023;outline-offset:1px;background:#315e40!important}

.card-pile-counters{display:grid;gap:3px;justify-items:center}
.card-pile-counters span{display:block;min-width:112px;text-align:center}

.network-scores .score-team{display:flex;align-items:center;gap:5px;min-width:0;flex-wrap:wrap}
.network-scores .score-team .team-mark{float:none;margin:0}
.score-team-name{white-space:nowrap}
.score-status{margin-left:auto!important;padding:3px 6px;border-radius:999px;border:1px solid rgba(244,234,213,.26);font-size:9px!important;line-height:1.15;white-space:nowrap;font-weight:900}
.score-status.safe-pill{background:rgba(61,113,68,.72);color:#e8f7d9;border-color:rgba(160,209,126,.58)}
.score-status.risk-pill{background:rgba(133,91,28,.76);color:#fff0bf;border-color:rgba(240,200,108,.72)}
.score-status.eliminated-pill{background:rgba(99,59,52,.78);color:#f4ddd8;border-color:rgba(213,137,122,.56)}
.score.risk{box-shadow:inset 0 0 0 1px rgba(240,200,108,.28)}

.checked-player-meta{display:grid;gap:3px;min-width:0}
.checked-player-meta strong{font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.checked-player-combo{font-size:11px;font-weight:800;color:#e9cf9c}

/* Signals always sit above table/player cards and shift away from crowded side seats. */
.round-signal-layer{z-index:90!important}
.round-signal-layer .round-signal-stack{z-index:2!important}
.round-signal-layer .round-signal-bubble{position:relative;z-index:3}

/* Compact inter-round layout: only chat history scrolls on phones, not the whole screen. */
@media(max-width:520px){
 .agreement-signal-slots{grid-template-columns:1fr}.agreement-signal-body{max-height:220px}.agreement-emoji-button{font-size:32px!important}
 .interround-overlay{padding:6px;overflow:hidden}
 .interround-overlay .interround-panel{width:calc(100vw - 12px);max-height:calc(100dvh - 12px);overflow:hidden;padding:8px;gap:6px}
 .interround-overlay .interround-head{gap:6px}.interround-overlay .interround-head h3{font-size:16px;margin:2px 0}.interround-overlay .round-result-kicker{font-size:9px}
 .interround-overlay .interround-clock{min-width:54px;padding:6px 8px}.interround-overlay .interround-clock b{font-size:18px}
 .interround-overlay .interround-results{gap:5px;padding:7px}.interround-overlay .interround-result-message{font-size:15px}.interround-overlay .round-delta-line{padding:5px 7px;font-size:10px}
 .interround-overlay .checked-cards{gap:4px;padding:6px}.interround-overlay .checked-cards-title{font-size:9px}
 .interround-overlay .checked-player{grid-template-columns:86px minmax(0,1fr);gap:5px}.interround-overlay .checked-player-meta strong{font-size:10px}.interround-overlay .checked-player-combo{font-size:9px}
 .interround-overlay .checked-player-cards{gap:3px}.interround-overlay .checked-player-cards .checked-card{min-height:42px!important;height:42px!important}.interround-overlay .checked-player-cards .network-card-suit{font-size:15px!important}
 .interround-overlay .round-standings{padding:6px;gap:3px}.interround-overlay .round-standing{padding:4px 6px}.interround-overlay .round-standing__team{font-size:11px}.interround-overlay .round-standing__players{font-size:9px!important}
 .interround-overlay .interround-chat-title{font-size:10px}.interround-overlay .interround-message-list{height:46px;max-height:46px;overflow:auto}.interround-overlay .interround-message{font-size:10px;padding:3px 5px}
 .interround-overlay .interround-chat-form{grid-template-columns:minmax(0,1fr) auto;gap:5px}.interround-overlay .interround-chat-form input{min-height:36px;padding:6px;font-size:12px}.interround-overlay .interround-chat-form button{width:auto;min-height:36px;padding:6px 9px;font-size:10px;margin:0}
 .interround-overlay .interround-change-button{min-height:38px;margin:0;font-size:11px}
 .score-status{font-size:8px!important;padding:2px 4px}
}
.match-final-title-line,.round-standing-title-line{display:flex;align-items:center;gap:6px;min-width:0;flex-wrap:wrap}
.match-final-title-line .score-status,.round-standing-title-line .score-status{margin-left:0!important}

/* Stage 11 QA fix pack */
.signal-preview{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:8px;text-align:center}
.signal-preview-item{display:inline-flex;align-items:center;justify-content:center;min-height:38px;padding:8px 12px;border-radius:999px;background:rgba(244,234,213,.10);border:1px solid rgba(244,234,213,.18);font-weight:700}
.signal-preview-item.emoji{font-family:'Apple Color Emoji','Segoe UI Emoji','Noto Color Emoji',sans-serif;font-size:30px;line-height:1;min-width:52px;padding:8px 10px;background:rgba(240,200,108,.12);border-color:rgba(240,200,108,.28)}
.signal-preview-item.phrase{font-size:14px;line-height:1.25;white-space:normal}
.secret-signal-quick .signal-preview{justify-content:flex-start}
.network-deal-overlay{position:absolute!important;inset:0!important;z-index:20!important;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px;background:rgba(6,28,22,.42)!important;backdrop-filter:blur(1.5px)}
.network-deal-overlay::before{content:'';position:absolute;inset:0;background:linear-gradient(180deg,rgba(8,28,22,.10),rgba(8,28,22,.30));pointer-events:none}
.network-deal-overlay>*{position:relative;z-index:1}
.network-scores .score.eliminated .score-team{justify-content:center}
.network-scores .score.eliminated .score-status.eliminated-pill{order:3;width:100%;margin-left:0!important;text-align:center;display:block}
.qa-panel{margin:10px 0 14px}
.qa-panel summary{list-style:none}
.qa-panel summary::-webkit-details-marker{display:none}
.qa-panel summary::after{content:'▾';float:right;opacity:.75}
.qa-panel[open] summary::after{transform:rotate(180deg)}
@media(max-width:520px){
  .signal-preview-item.emoji{font-size:26px;min-width:46px}
  .signal-preview-item.phrase{font-size:13px}
}

/* Mobile pass 1 — 4-player critical controls fit without constant page scrolling. */
@media (max-width:520px){
  /* iOS Safari zooms focused fields smaller than 16px. */
  input,
  .network-card input,
  .interround-chat-form input,
  .postgame-chat input,
  form input{font-size:16px!important}

  /* Only compact the active game. Gathering and signal agreement keep their roomier layout. */
  main.game-view{padding:4px 6px max(8px,env(safe-area-inset-bottom))}
  .game-view .network-header{min-height:38px;padding:0 0 2px}
  .game-view .compact-logo{width:48px;height:38px}
  .game-view .game-shell{max-width:none}
  .game-view .game-heading{gap:6px;align-items:center;margin:0}
  .game-view .game-heading h2{font-size:22px;line-height:1.05;margin:2px 0}
  .game-view .game-heading .muted{font-size:12px;line-height:1.2;margin:2px 0}
  .game-view .game-heading__right{display:grid;justify-items:end;gap:4px}
  .game-view .game-heading__mode{font-size:10px;line-height:1.15;margin:0;padding:5px 7px;max-width:190px;text-align:center}
  .game-view .game-leave-button{min-height:34px!important;margin:0!important;padding:4px 8px!important;font-size:10px!important;width:auto!important}

  .game-view .network-scores{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:5px;margin:4px 0 6px}
  .game-view .network-scores .score{padding:4px 5px;gap:2px 4px;min-height:58px}
  .game-view .network-scores .score-team{font-size:11px;gap:4px;flex-wrap:nowrap}
  .game-view .network-scores .score-team .team-mark{width:20px;height:23px;flex-basis:20px}
  .game-view .network-scores .score-names{display:flex;align-items:center;justify-content:center;gap:4px;min-height:14px;font-size:10px;line-height:1.1;white-space:nowrap;overflow:visible}
  .game-view .network-scores .score-name{overflow:visible;text-overflow:clip;white-space:nowrap;min-width:0}
  .game-view .network-scores .score-plus{font-size:10px;flex:0 0 auto}
  .game-view .network-scores .score b{font-size:18px}

  .game-view .network-arena{height:390px;margin:5px 0 6px;border-radius:22px}
  .game-view .network-seat{width:62px;min-height:64px;padding:3px 1px}
  .game-view .network-seat .team-mark{width:22px;height:25px}
  .game-view .network-seat .name{font-size:10px;line-height:1.1}
  .game-view .network-seat small{font-size:9px;line-height:1.1}
  .game-view .network-mini-back{width:8px;height:12px}
  .game-view .suspicion-eye{width:25px!important;height:25px!important;min-height:25px!important;font-size:13px!important;right:-5px!important}

  .game-view .network-center{width:164px;padding:7px}
  .game-view .network-center-title{font-size:12px!important;margin:0 0 5px}
  .game-view .network-center-cards{gap:3px}
  .game-view .network-center-cards .network-face-card{min-height:69px!important;padding:2px!important}
  .game-view .network-center-cards .network-card-corner{font-size:12px;line-height:10px;left:3px;top:3px}
  .game-view .network-center-cards .network-card-corner small{font-size:9px;line-height:8px}
  .game-view .network-center-cards .network-card-corner--bottom{left:auto;top:auto;right:3px;bottom:3px}
  .game-view .network-center-cards .network-card-suit{font-size:20px!important}
  .game-view .card-pile-counters{font-size:9px;line-height:1.1;gap:3px}
  .game-view .network-center>small{font-size:9px!important;line-height:1.15;margin-top:5px}
  .game-view .network-center button{min-height:34px!important;font-size:9px!important;padding:3px!important;margin-top:5px!important}
  .game-view .network-self-seat{bottom:5px;min-height:30px;padding:3px 7px;font-size:10px}
  .game-view .network-self-seat .team-mark{width:18px;height:21px}

  .game-view .hand-title{margin:3px 0;min-height:22px;font-size:11px;line-height:1.15}
  .game-view .network-hand{gap:4px}
  .game-view .network-hand .network-face-card{min-height:84px!important;padding:3px!important}
  .game-view .network-hand .network-card-corner{font-size:14px;line-height:12px}
  .game-view .network-hand .network-card-corner small{font-size:10px;line-height:9px}
  .game-view .network-hand .network-card-suit{font-size:24px!important}
  .game-view .network-actions{margin-top:5px;padding-top:0;gap:4px}
  .game-view .network-actions button{min-height:43px!important;font-size:11px!important;padding:5px 2px!important}

  /* This explanation is useful once, but costs an entire phone row every turn. */
  .game-view .network-stage-note{display:none}
  .game-view details{margin-top:5px}
  .game-view details>summary{font-size:12px;line-height:1.2;padding:5px 0}
  .game-view details .signal-preview{padding:6px 8px}

  /* Round result must be usable without Safari zoom and with minimal outer scrolling. */
  .interround-overlay .interround-chat-form input{font-size:16px!important}
  .interround-overlay .checked-player-meta strong.checked-player-summary{font-size:10px;white-space:normal;line-height:1.15}
}

/* Mobile pass 2 — fixed active-game viewport, full signal sheet, non-overlapping center vote. */
@media (max-width:520px){
  body.game-body{height:100dvh;overflow:hidden;overscroll-behavior:none}
  body.game-body main.game-view{height:100dvh;max-height:100dvh;overflow:hidden;padding:4px 6px max(6px,env(safe-area-inset-bottom));display:flex;flex-direction:column}
  .game-view>.network-header{display:none!important}
  .game-view .game-shell{height:100%;min-height:0;overflow:hidden;display:flex;flex-direction:column;gap:3px}

  .game-view .game-heading{flex:0 0 auto;min-height:38px;gap:5px;align-items:center}
  .game-view .game-heading h2{font-size:18px;line-height:1;margin:0}
  .game-view .game-heading .muted{display:none}
  .game-view .game-heading__right{gap:2px}
  .game-view .game-heading__mode{font-size:9px;line-height:1.05;padding:4px 6px;max-width:160px}
  .game-view .game-leave-button{min-height:28px!important;padding:3px 6px!important;font-size:9px!important}

  .game-view .network-scores{flex:0 0 auto;margin:1px 0 3px;gap:4px}
  .game-view .network-scores .score{min-height:48px;padding:3px 4px}
  .game-view .network-scores .score-team{font-size:10px}
  .game-view .network-scores .score-team .team-mark{width:18px;height:20px;flex-basis:18px}
  .game-view .network-scores .score-names{font-size:9px;min-height:12px}
  .game-view .network-scores .score b{font-size:16px}

  .game-view .network-arena{flex:1 1 auto;min-height:245px;max-height:330px;height:auto!important;margin:2px 0 3px;border-radius:18px;overflow:hidden}
  .game-view .network-seat{width:56px;min-height:58px;padding:2px 1px}
  .game-view .network-seat .team-mark{width:19px;height:22px}
  .game-view .network-seat .name{font-size:9px}
  .game-view .network-seat small{font-size:8px}
  .game-view .network-mini-back{width:7px;height:10px}
  .game-view .suspicion-eye{width:22px!important;height:22px!important;min-height:22px!important;font-size:12px!important;right:-4px!important;top:1px!important}

  .game-view .network-center{width:150px;padding:5px;top:52%}
  .game-view .network-center-title{font-size:10px!important;line-height:1.05;margin:0 0 3px}
  .game-view .network-center-cards{gap:2px}
  .game-view .network-center-cards .network-face-card{min-height:58px!important;height:58px!important;padding:1px!important}
  .game-view .network-center-cards .network-card-corner{font-size:10px;line-height:9px;left:2px;top:2px}
  .game-view .network-center-cards .network-card-corner small{font-size:8px;line-height:7px}
  .game-view .network-center-cards .network-card-corner--bottom{left:auto;top:auto;right:2px;bottom:2px}
  .game-view .network-center-cards .network-card-suit{font-size:17px!important}
  .game-view .card-pile-counters{font-size:8px;line-height:1;gap:2px;margin-top:2px}
  .game-view .card-pile-counters span{min-width:0}
  .game-view .network-center>small{display:none!important}
  .game-view .network-self-seat{bottom:3px;min-height:25px;padding:2px 5px;font-size:9px}
  .game-view .network-self-seat .team-mark{width:16px;height:18px}

  /* The center-change vote is a separate compact overlay, not part of the center-card column. */
  .game-view .center-vote-mobile{position:absolute;left:50%;bottom:32px;transform:translateX(-50%);z-index:55;width:min(210px,72%);margin:0!important;padding:5px!important;border:1px solid rgba(240,200,108,.62)!important;border-radius:10px;background:rgba(8,42,32,.94);box-shadow:0 8px 22px rgba(0,0,0,.35);gap:3px}
  .game-view .center-vote-mobile:not(.open){width:auto;min-width:138px;padding:0!important;border:0!important;background:transparent;box-shadow:none}
  .game-view .center-vote-mobile .center-vote-start{min-height:28px!important;margin:0!important;padding:3px 8px!important;font-size:8px!important;background:rgba(14,61,46,.92)}
  .game-view .center-vote-mobile .center-vote-top strong{font-size:10px}
  .game-view .center-vote-mobile .center-vote-clock,.game-view .center-vote-mobile .center-vote-progress{font-size:9px}
  .game-view .center-vote-mobile .center-vote-clock b{font-size:12px}
  .game-view .center-vote-mobile .center-vote-initiator{font-size:7px!important}
  .game-view .center-vote-mobile .center-vote-actions{gap:4px}
  .game-view .center-vote-mobile .center-vote-actions button{min-height:28px!important;margin:0!important;padding:3px!important;font-size:9px!important}
  .game-view .center-vote-mobile .center-vote-mine,.game-view .center-vote-mobile .center-vote-result{font-size:8px;padding:3px}

  .game-view .hand-title{flex:0 0 auto;min-height:16px;margin:1px 0;font-size:10px;line-height:1}
  .game-view .hand-title .muted{font-size:9px}
  .game-view .network-hand{flex:0 0 auto;gap:3px}
  .game-view .network-hand .network-face-card{min-height:66px!important;height:66px!important;padding:2px!important}
  .game-view .network-hand .network-card-corner{font-size:12px;line-height:10px}
  .game-view .network-hand .network-card-corner small{font-size:9px;line-height:8px}
  .game-view .network-hand .network-card-suit{font-size:20px!important}
  .game-view .network-actions{flex:0 0 auto;position:static!important;margin:2px 0 0;padding:0;gap:3px;background:transparent}
  .game-view .network-actions button{min-height:38px!important;font-size:10px!important;padding:3px 1px!important}

  /* The secret signal is already available inside the Signal sheet; hiding it saves a whole row. */
  .game-view details{display:none!important}
  .game-view .network-stage-note{display:none!important}

  /* Signal picker becomes a real full-screen sheet. Only the list body scrolls. */
  .game-view .round-signal-panel{position:fixed;inset:max(6px,env(safe-area-inset-top)) 6px max(6px,env(safe-area-inset-bottom));z-index:220;margin:0;max-height:none!important;height:auto;padding:10px;border-radius:16px;overflow:hidden;display:flex;flex-direction:column;box-shadow:0 20px 70px rgba(0,0,0,.65)}
  .game-view .round-signal-head{flex:0 0 auto;align-items:center}
  .game-view .round-signal-head h3{font-size:18px;margin:0}
  .game-view .round-signal-head p{font-size:11px;line-height:1.2}
  .game-view .round-signal-head .quiet{min-height:34px!important;padding:4px 8px!important;font-size:10px!important}
  .game-view .secret-signal-quick{flex:0 0 auto;margin:5px 0;padding:6px;gap:5px}
  .game-view .secret-signal-quick__text{font-size:9px}
  .game-view .secret-signal-quick .signal-preview{padding:4px 6px}
  .game-view .secret-signal-quick button{min-height:36px!important;margin:0!important;font-size:10px!important;padding:4px!important}
  .game-view .round-signal-tabs{flex:0 0 auto;margin:5px 0;gap:4px}
  .game-view .round-signal-tabs button{min-height:34px;font-size:10px;padding:3px}
  .game-view .round-signal-body{flex:1 1 auto;min-height:0!important;max-height:none!important;overflow-y:auto!important;-webkit-overflow-scrolling:touch;overscroll-behavior:contain;padding:2px 2px 16px}
  .game-view .round-phrase-groups{display:grid;gap:7px}
  .game-view .round-phrase-group{padding:6px}
  .game-view .round-phrase-group h5{font-size:10px;margin:0 0 5px}
  .game-view .round-phrase-grid{display:grid;grid-template-columns:1fr!important;gap:5px}
  .game-view .round-phrase-row{grid-template-columns:minmax(0,1fr) 36px;gap:4px}
  .game-view .round-phrase-button{min-height:38px;font-size:12px;padding:5px 8px}
  .game-view .round-phrase-row .round-favorite-star{min-height:38px!important;font-size:18px!important}
  .game-view .round-emoji-grid{grid-template-columns:repeat(5,minmax(0,1fr));gap:4px}
  .game-view .round-emoji-tile{grid-template-rows:42px 24px;gap:2px}
  .game-view .round-emoji-tile .round-emoji-button{min-height:42px;font-size:23px}
  .game-view .round-emoji-tile .round-favorite-star{min-height:24px!important;font-size:17px!important}
  .game-view .combo-picker-body{max-height:none!important;overflow:visible}
}

@media (max-width:360px){
  .game-view .network-arena{min-height:225px;max-height:295px}
  .game-view .network-center{width:140px}
  .game-view .network-hand .network-face-card{min-height:60px!important;height:60px!important}
  .game-view .network-actions button{min-height:35px!important;font-size:9px!important}
}

/* Stage 12 mobile fit pass 1 — responsive viewport, stable table geometry, compact home. */
:root{
  --kemp-vh:100dvh;
  --kemp-vw:100vw;
  --kemp-vtop:0px;
  --kemp-vleft:0px;
}
.home-tabs{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:10px 0 4px}
.home-tabs button{margin:0!important;min-height:42px}
.home-panel{display:grid;gap:0}
.home-panel-title{margin-top:12px!important}

@media(max-width:520px){
  /* Home is one task at a time instead of two full forms stacked vertically. */
  main.home-view{width:100%;max-width:520px;padding:8px 8px max(8px,env(safe-area-inset-bottom));}
  .home-view .network-header{padding:3px 0 0}
  .home-view .compact-logo{width:66px;height:auto;max-height:62px;object-fit:contain}
  .home-view .home-card{margin:5px auto;padding:12px 14px;border-radius:16px}
  .home-view .home-card h2{margin:2px 0 4px;font-size:27px}
  .home-view .home-intro{margin:0 0 7px;font-size:13px;line-height:1.3}
  .home-view .home-tabs{gap:5px;margin:7px 0 3px}
  .home-view .home-tabs button{min-height:39px;padding:5px 4px;font-size:11px}
  .home-view .home-panel-title{margin:10px 0 2px!important;font-size:18px}
  .home-view .network-grid{gap:0}
  .home-view .field{gap:4px;margin-top:8px;font-size:12px}
  .home-view .network-card input,.home-view .network-card select{min-height:41px;padding:7px 9px;font-size:16px}
  .home-view .home-panel>.primary{min-height:43px;margin-top:10px!important}
  .home-view .home-card>.quiet{min-height:40px;margin-top:10px!important;font-size:11px}

  /* The active match is a fixed app viewport, not a scrollable web page. */
  html:has(body.game-body),body.game-body{height:var(--kemp-vh,100dvh);min-height:var(--kemp-vh,100dvh);overflow:hidden}
  body.game-body{overscroll-behavior:none;touch-action:manipulation}
  body.game-body main.game-view{
    width:100%;max-width:520px;
    height:var(--kemp-vh,100dvh)!important;
    max-height:var(--kemp-vh,100dvh)!important;
    min-height:0;
    margin:0 auto;
    overflow:hidden!important;
    padding:max(3px,env(safe-area-inset-top)) 6px max(4px,env(safe-area-inset-bottom));
    display:flex;flex-direction:column;
  }
  .game-view .game-shell{
    flex:1 1 auto;
    width:100%;height:auto!important;min-height:0!important;
    overflow:hidden;
    display:flex;flex-direction:column;
    gap:4px;
  }

  /* Keep important UI readable; let the table absorb remaining height. */
  .game-view .game-heading{flex:0 0 auto;min-height:39px}
  .game-view .game-heading h2{font-size:clamp(17px,4.8vw,20px)}
  .game-view .game-heading__mode{font-size:clamp(8px,2.45vw,10px);max-width:44vw}
  .game-view .network-scores{flex:0 0 auto;min-height:50px;margin:0 0 2px}
  .game-view .network-scores .score{min-height:50px}

  .game-view .network-arena{
    flex:1 1 0!important;
    min-height:285px!important;
    max-height:none!important;
    height:auto!important;
    width:100%;
    margin:1px 0 2px;
    border-radius:20px;
    overflow:hidden;
  }

  /* Own hand + center do NOT get smaller when player count grows. */
  .game-view .network-center{
    width:clamp(158px,43vw,184px)!important;
    top:50%!important;
    padding:6px!important;
  }
  .game-view .network-center-title{font-size:11px!important;margin-bottom:4px!important}
  .game-view .network-center-cards .network-face-card{
    min-height:clamp(62px,17vw,72px)!important;
    height:clamp(62px,17vw,72px)!important;
  }
  .game-view .network-center-cards .network-card-corner{font-size:11px;line-height:9px}
  .game-view .network-center-cards .network-card-suit{font-size:19px!important}
  .game-view .card-pile-counters{font-size:8.5px}

  .game-view .hand-title{flex:0 0 auto;min-height:18px;margin:1px 0;font-size:11px}
  .game-view .hand-title .muted{font-size:10px}
  .game-view .network-hand{flex:0 0 auto;gap:4px}
  .game-view .network-hand .network-face-card{
    min-height:clamp(76px,22vw,92px)!important;
    height:clamp(76px,22vw,92px)!important;
  }
  .game-view .network-hand .network-card-corner{font-size:13px;line-height:11px}
  .game-view .network-hand .network-card-suit{font-size:23px!important}
  .game-view .network-actions{flex:0 0 auto;margin:2px 0 0;gap:4px}
  .game-view .network-actions button{min-height:42px!important;font-size:11px!important}

  /* Player count only changes secondary seats, never the user's cards or center. */
  .game-view .network-seat{width:clamp(58px,15.5vw,66px);min-height:61px;padding:2px 1px}
  .game-view .network-seat .team-mark{width:20px;height:23px}
  .game-view .network-seat .name{font-size:9.5px;line-height:1.05}
  .game-view .network-seat small{font-size:7.8px;line-height:1.05}
  .game-view .network-mini-back{width:7px;height:10px}
  .game-view .network-arena[data-player-count="8"] .network-seat{width:53px;min-height:56px}
  .game-view .network-arena[data-player-count="8"] .network-seat .name{font-size:8.5px}
  .game-view .network-arena[data-player-count="10"] .network-seat{width:48px;min-height:51px;padding:1px}
  .game-view .network-arena[data-player-count="10"] .network-seat .team-mark{width:17px;height:19px}
  .game-view .network-arena[data-player-count="10"] .network-seat .name{font-size:8px}
  .game-view .network-arena[data-player-count="10"] .network-seat small{display:none}
  .game-view .network-arena[data-player-count="10"] .network-mini-back{width:6px;height:9px}

  /* Side seats stay inside the table; eye/signal point inward instead of clipping. */
  .game-view .network-seat--right .suspicion-eye{right:auto!important;left:-4px!important}
  .game-view .network-seat--right .round-signal-stack{left:auto;right:2px;transform:translateY(-100%);align-items:flex-end}
  .game-view .network-seat--left .round-signal-stack{left:2px;transform:translateY(-100%);align-items:flex-start}
  .game-view .network-seat--right.network-seat--top .round-signal-stack{transform:translateY(8px)}
  .game-view .network-seat--left.network-seat--top .round-signal-stack{transform:translateY(8px)}

  /* Pause/reconnect status overlays the table instead of adding rows and shrinking the game. */
  .game-view .mobile-arena-notices{
    position:absolute;left:50%;top:8px;transform:translateX(-50%);
    z-index:95;width:min(88%,330px);display:grid;gap:4px;pointer-events:none;
  }
  .game-view .mobile-arena-notice{
    padding:6px 9px;border:1px solid rgba(240,200,108,.66);border-radius:999px;
    background:rgba(8,38,29,.94);box-shadow:0 6px 18px rgba(0,0,0,.35);
    color:#f4ead5;text-align:center;font-size:9px;font-weight:800;line-height:1.2;
  }
  .game-view .mobile-arena-notice.pause{font-size:10px;background:rgba(21,43,35,.96)}
  .game-view .mobile-arena-notice.connection{border-color:rgba(244,234,213,.38)}

  /* Center vote floats inside the table and never changes document height. */
  .game-view .center-vote-mobile{bottom:34px;width:min(224px,70%)}

  /* Overlays use the actual visible Safari/Chrome viewport. */
  .game-view .round-signal-panel{
    top:max(5px,env(safe-area-inset-top));
    right:6px;bottom:max(5px,env(safe-area-inset-bottom));left:6px;
    height:auto;max-height:calc(var(--kemp-vh,100dvh) - 10px)!important;
  }
  .interround-overlay{height:var(--kemp-vh,100dvh);max-height:var(--kemp-vh,100dvh);padding:6px}
  .interround-overlay .interround-panel{max-height:calc(var(--kemp-vh,100dvh) - 12px)!important}
}

@media(max-width:370px){
  .game-view .network-arena{min-height:255px!important}
  .game-view .network-seat{width:53px;min-height:56px}
  .game-view .network-center{width:150px!important}
  .game-view .network-center-cards .network-face-card{min-height:58px!important;height:58px!important}
  .game-view .network-hand .network-face-card{min-height:72px!important;height:72px!important}
  .game-view .network-actions button{min-height:39px!important;font-size:10px!important}
}

@media(min-width:521px) and (max-width:900px){
  /* Tablet/small landscape: preserve card sizes and simply give the table more room. */
  .game-shell{max-width:760px}
  .network-arena{min-height:480px}
}

@media(max-width:520px){
  .home-view .home-panel-create .network-grid{grid-template-columns:repeat(2,minmax(0,1fr));column-gap:7px;row-gap:0}
  .home-view .home-panel-create .network-grid .field:nth-child(5){grid-column:1/-1}
  .game-view .tournament-spectators{display:none!important}
  .game-view .mobile-arena-notice.stage,.game-view .mobile-arena-notice.spectator{font-size:8.5px}
}
@media(max-width:360px){
  .home-view .home-intro{display:none}
  .home-view .compact-logo{width:54px;max-height:48px}
  .home-view .home-card{padding:9px 11px}
  .home-view .home-panel-create .network-grid{column-gap:5px}
}


/* Stage 12 mobile fit pass 2 — iOS keyboard-safe overlays and edge-safe signals. */
@media(max-width:520px){
  /* visualViewport can pan when the iOS keyboard opens. Follow that visible rectangle. */
  .interround-overlay{
    inset:auto!important;
    top:var(--kemp-vtop,0px)!important;
    left:var(--kemp-vleft,0px)!important;
    right:auto!important;
    bottom:auto!important;
    width:var(--kemp-vw,100vw)!important;
    height:var(--kemp-vh,100dvh)!important;
    max-height:var(--kemp-vh,100dvh)!important;
    display:flex;
    align-items:center;
    justify-content:center;
    overflow:hidden!important;
  }
  .interround-overlay .interround-panel{
    width:calc(100% - 12px)!important;
    max-height:calc(100% - 12px)!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    overscroll-behavior:contain;
    -webkit-overflow-scrolling:touch;
  }
  body.kemp-keyboard-open .interround-overlay{
    padding:4px!important;
    align-items:stretch;
  }
  body.kemp-keyboard-open .interround-overlay .interround-panel{
    width:calc(100% - 8px)!important;
    height:calc(100% - 8px)!important;
    max-height:calc(100% - 8px)!important;
    margin:0 auto!important;
    padding:8px!important;
  }
  body.kemp-keyboard-open .interround-overlay .interround-chat-form{
    position:sticky;
    bottom:0;
    z-index:8;
    padding-top:4px;
    background:#123a2d;
  }
  body.kemp-keyboard-open .interround-overlay .interround-message-list{
    max-height:88px!important;
  }

  /* Long public signals from side seats stay by the sender instead of covering center cards. */
  .game-view .round-signal-layer .round-signal-stack--edge-left{
    transform:translateY(-100%)!important;
    align-items:flex-start!important;
    max-width:116px!important;
  }
  .game-view .round-signal-layer .round-signal-stack--edge-right{
    transform:translateY(-100%)!important;
    align-items:flex-end!important;
    max-width:116px!important;
  }
  .game-view .round-signal-layer .round-signal-stack--edge-below{
    transform:translateY(42px)!important;
  }
  .game-view .round-signal-layer .round-signal-stack--edge-left .round-signal-bubble.phrase,
  .game-view .round-signal-layer .round-signal-stack--edge-right .round-signal-bubble.phrase{
    max-width:112px!important;
    font-size:10.5px!important;
  }
  .game-view .round-signal-layer .round-signal-stack--edge-left .round-signal-bubble.emoji,
  .game-view .round-signal-layer .round-signal-stack--edge-right .round-signal-bubble.emoji{
    font-size:31px!important;
  }
}

/* Stage 12 mobile fit pass 3 — compact shell pages, stable iOS keyboard recovery, pure emoji slots. */
@media(max-width:520px){
  /* Non-game screens are app views too: no whole-document drift/scroll on normal phone heights. */
  main.home-view,
  main.gathering-view,
  main.signal-view{
    position:fixed;
    inset:0;
    width:100%;
    height:var(--kemp-vh,100dvh);
    max-height:var(--kemp-vh,100dvh);
    overflow:hidden;
    padding:4px 8px max(5px,env(safe-area-inset-bottom));
    display:flex;
    flex-direction:column;
    overscroll-behavior:none;
  }
  main.home-view .network-header,
  main.gathering-view .network-header,
  main.signal-view .network-header{
    flex:0 0 auto;
    padding:2px 0 1px;
    min-height:38px;
  }
  main.home-view .compact-logo,
  main.gathering-view .compact-logo,
  main.signal-view .compact-logo{
    width:46px!important;
    max-height:38px!important;
    object-fit:contain;
  }

  /* HOME: one task fits in the visible phone viewport. */
  .home-view .home-card{
    flex:1 1 auto;
    min-height:0;
    width:100%;
    margin:2px auto!important;
    padding:8px 10px!important;
    overflow:hidden;
    display:flex;
    flex-direction:column;
  }
  .home-view .home-card h2{font-size:22px!important;margin:0 0 2px!important}
  .home-view .home-intro{font-size:11px!important;line-height:1.2;margin:0 0 4px!important}
  .home-view .home-tabs{margin:4px 0 2px!important;gap:4px!important}
  .home-view .home-tabs button{min-height:34px!important;padding:3px!important;font-size:10px!important}
  .home-view .home-panel-title{font-size:15px!important;margin:5px 0 0!important}
  .home-view .home-panel:not([hidden]){display:flex;flex-direction:column;min-height:0}
  .home-view .home-panel-create .network-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;column-gap:6px!important;row-gap:0!important}
  .home-view .home-panel-create .network-grid .field:nth-child(5){grid-column:1/-1}
  .home-view .field{margin-top:4px!important;gap:2px!important;font-size:10.5px!important;line-height:1.1}
  .home-view .network-card input,.home-view .network-card select{min-height:35px!important;height:35px;padding:4px 7px!important;font-size:16px!important;border-radius:9px}
  .home-view .home-panel>.primary{min-height:37px!important;margin-top:6px!important;padding:4px!important;font-size:11px!important}
  .home-view .home-card>.quiet{min-height:34px!important;margin-top:6px!important;padding:3px!important;font-size:10px!important}
  body.kemp-keyboard-open main.home-view{height:var(--kemp-vh,100dvh)!important}
  body.kemp-keyboard-open .home-view .network-header{display:none}
  body.kemp-keyboard-open .home-view .home-card{overflow-y:auto!important;-webkit-overflow-scrolling:touch;scroll-padding-bottom:10px}
  body.kemp-keyboard-open .home-view .home-intro{display:none}

  /* GATHERING: 4-player room should fit; larger rooms scroll only their lists. */
  .gathering-view .gathering-card{
    flex:1 1 auto;
    min-height:0;
    width:100%;
    margin:2px auto!important;
    padding:7px 9px!important;
    overflow:hidden;
    display:flex;
    flex-direction:column;
  }
  .gathering-view .gathering-title{flex:0 0 auto;align-items:center;gap:6px}
  .gathering-view .gathering-title h2{font-size:20px;margin:0!important}
  .gathering-view .room-code{font-size:17px!important;letter-spacing:2px;margin:1px 0!important}
  .gathering-view .gathering-title .quiet{min-height:31px!important;padding:3px 7px!important;font-size:10px!important;margin:0!important;width:auto!important}
  .gathering-view .gathering-meta{flex:0 0 auto;margin:4px 0!important;gap:3px!important}
  .gathering-view .gathering-meta span{padding:3px 5px!important;font-size:8.5px!important}
  .gathering-view .inline-actions{flex-direction:row!important;gap:4px!important;flex:0 0 auto}
  .gathering-view .inline-actions button{min-height:30px!important;padding:3px 4px!important;font-size:9px!important;margin:0!important}
  .gathering-view .gathering-card>h3{font-size:13px!important;margin:5px 0 3px!important;line-height:1.1}
  .gathering-view .gathering-list{gap:3px!important;max-height:min(190px,27vh);overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
  .gathering-view .gathering-player{min-height:37px!important;padding:3px 6px!important;gap:5px!important;align-items:center!important;flex-wrap:nowrap!important}
  .gathering-view .gathering-player__main{gap:0!important}
  .gathering-view .gathering-player__main strong{font-size:11px!important;line-height:1.05}
  .gathering-view .gathering-player__main small{font-size:9px!important;line-height:1.05}
  .gathering-view .ready-pill{font-size:8px!important;padding:2px 4px!important}
  .gathering-view .gathering-player .mini{width:auto!important;min-height:27px!important;padding:2px 5px!important;font-size:8px!important}
  .gathering-view .squad-list{gap:3px!important;max-height:82px;overflow-y:auto;overscroll-behavior:contain}
  .gathering-view .squad-card{min-height:35px!important;gap:5px!important;padding:2px 5px!important}
  .gathering-view .squad-card .team-mark{width:27px!important;height:31px!important;flex:0 0 27px!important}
  .gathering-view .squad-card__label{font-size:10px!important}
  .gathering-view .gathering-controls{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px!important;margin:5px 0!important;flex:0 0 auto}
  .gathering-view .gathering-controls button{min-height:31px!important;padding:3px!important;font-size:9px!important;margin:0!important}
  .gathering-view .room-settings{flex:0 0 auto;margin:4px 0!important;padding:6px 8px!important}
  .gathering-view .room-settings summary{font-size:10px!important}
  .gathering-view .gathering-chat-title{margin-top:3px!important}
  .gathering-view .gathering-chat{flex:0 0 auto;max-height:32px!important;overflow-y:auto;font-size:9px!important}
  .gathering-view .gathering-chat p{margin:2px 0!important}
  .gathering-view .gathering-chat-form{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:4px;flex:0 0 auto}
  .gathering-view .gathering-chat-form input{min-height:34px!important;height:34px;padding:4px 6px!important;font-size:16px!important}
  .gathering-view .gathering-chat-form button{width:auto!important;min-height:34px!important;margin:0!important;padding:3px 9px!important;font-size:9px!important}
  .gathering-view .gathering-start{flex:0 0 auto;min-height:37px!important;margin-top:5px!important;padding:4px!important;font-size:11px!important}
  .gathering-view .gathering-start-note{display:none!important}
  body.kemp-keyboard-open main.gathering-view{height:var(--kemp-vh,100dvh)!important}
  body.kemp-keyboard-open .gathering-view .network-header{display:none}
  body.kemp-keyboard-open .gathering-view .gathering-card{overflow-y:auto!important;-webkit-overflow-scrolling:touch}

  /* FIRST SIGNAL: core agreement no longer needs whole-page scrolling. */
  .signal-view .signal-agreement-card{
    flex:1 1 auto;
    min-height:0;
    width:100%;
    margin:2px auto!important;
    padding:8px 9px!important;
    overflow:hidden;
    display:flex;
    flex-direction:column;
    gap:4px;
  }
  .signal-view .signal-stage-title{flex:0 0 auto;gap:6px!important;align-items:center}
  .signal-view .signal-stage-title h2{font-size:19px!important;margin:0 0 2px!important}
  .signal-view .signal-stage-title p{font-size:10px!important;line-height:1.15;margin:0!important}
  .signal-view .signal-countdown-wrap{min-width:58px!important;padding:4px 6px!important}
  .signal-view .signal-countdown{font-size:24px!important}
  .signal-view .signal-squad-statuses{flex:0 0 auto;gap:3px!important;margin:2px 0!important}
  .signal-view .signal-squad-statuses .ready-pill{font-size:8px!important;padding:2px 4px!important}
  .signal-view .proposal-box{flex:0 0 auto;margin:3px 0!important;padding:6px!important}
  .signal-view .proposal-box p{font-size:10px!important;margin:0 0 3px!important}
  .signal-view .proposal-box .signal-preview{min-height:42px!important;gap:4px!important;padding:2px!important}
  .signal-view .proposal-box .signal-preview-item.emoji{font-size:28px!important;min-width:42px!important;min-height:38px!important;padding:4px!important}
  .signal-view .setup-picker{flex:1 1 auto;min-height:0;margin:3px 0!important;padding:6px!important;display:flex;flex-direction:column;overflow:hidden}
  .signal-view .setup-picker h3{font-size:12px!important;margin:0 0 4px!important;flex:0 0 auto}
  .signal-view .agreement-signal-slots{grid-template-columns:1fr 1fr!important;gap:4px!important;flex:0 0 auto}
  .signal-view .agreement-signal-slot{min-height:39px!important;padding:3px 6px!important;font-size:10px!important}
  .agreement-slot-emoji{font-family:'Apple Color Emoji','Segoe UI Emoji','Noto Color Emoji',sans-serif!important;font-size:28px!important;line-height:1!important;font-weight:400!important;font-synthesis:none!important;text-shadow:none!important}
  .agreement-slot-phrase{font:inherit;color:inherit}
  .signal-view .agreement-signal-tabs{margin:4px 0!important;gap:4px!important;flex:0 0 auto}
  .signal-view .agreement-signal-tabs button{min-height:33px!important;padding:3px!important;font-size:9.5px!important}
  .signal-view .agreement-signal-body{flex:1 1 auto;min-height:0;max-height:none!important;overflow-y:auto!important;padding:1px!important}
  .signal-view .setup-emoji-grid{grid-template-columns:repeat(6,minmax(0,1fr))!important;gap:3px!important;max-height:none!important;overflow:visible!important;padding:1px!important}
  .signal-view .setup-emoji-grid .setup-reaction{min-height:40px!important;height:40px!important;padding:2px!important;margin:0!important}
  .signal-view .agreement-emoji-button{font-size:27px!important}
  .signal-view .setup-phrase-grid{max-height:none!important;overflow:visible!important;gap:3px!important;padding:1px!important}
  .signal-view .setup-phrase-grid .setup-reaction{min-height:35px!important;padding:4px 6px!important;font-size:10px!important}
  .signal-view .setup-picker>.primary{flex:0 0 auto;min-height:35px!important;margin-top:4px!important;padding:3px!important;font-size:10px!important}
  .signal-view .setup-picker>.quiet{flex:0 0 auto;min-height:31px!important;margin-top:3px!important;font-size:9px!important}
  .signal-view .signal-private-title{flex:0 0 auto;font-size:12px!important;margin:3px 0 1px!important}
  .signal-view .signal-private-messages{flex:0 0 auto;max-height:26px!important;overflow-y:auto;font-size:9px!important}
  .signal-view .signal-private-form{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:4px;flex:0 0 auto}
  .signal-view .signal-private-form input{min-height:34px!important;height:34px;font-size:16px!important;padding:4px 6px!important}
  .signal-view .signal-private-form button{width:auto!important;min-height:34px!important;margin:0!important;padding:3px 8px!important;font-size:9px!important}
  .signal-view .signal-agreement-card>.muted:last-child{flex:0 0 auto;font-size:8.5px!important;line-height:1.1;margin:2px 0 0!important}
  body.kemp-keyboard-open main.signal-view{height:var(--kemp-vh,100dvh)!important}
  body.kemp-keyboard-open .signal-view .network-header{display:none}
  body.kemp-keyboard-open .signal-view .signal-agreement-card{overflow-y:auto!important;-webkit-overflow-scrolling:touch}

  /* Side-player public phrases use an edge lane and never sit across center cards. */
  .game-view .round-signal-layer .round-signal-stack--side-lane{transform:none!important;max-width:98px!important}
  .game-view .round-signal-layer .round-signal-stack--side-lane.round-signal-stack--edge-left{left:7px!important;right:auto!important;align-items:flex-start!important}
  .game-view .round-signal-layer .round-signal-stack--side-lane.round-signal-stack--edge-right{left:auto!important;right:7px!important;align-items:flex-end!important}
  .game-view .round-signal-layer .round-signal-stack--side-lane .round-signal-bubble.phrase{max-width:96px!important;font-size:9.5px!important;padding:5px 6px!important}

  /* Interround overlay never keeps the old half-screen keyboard viewport after Done/blur. */
  .interround-overlay{top:0!important;left:0!important;right:0!important;bottom:auto!important;width:100%!important;height:100dvh!important;max-height:100dvh!important;transform:none!important;transition:none!important}
  body.kemp-keyboard-open .interround-overlay{top:0!important;height:var(--kemp-vh,100dvh)!important;max-height:var(--kemp-vh,100dvh)!important}
  .interround-overlay .interround-panel{transition:none!important}
}

@media(max-width:520px) and (max-height:720px){
  /* Small phones: keep the shell stable and let only designated inner regions scroll. */
  .gathering-view .gathering-list{max-height:135px}
  .gathering-view .squad-list{max-height:66px}
  .signal-view .setup-emoji-grid .setup-reaction{min-height:36px!important;height:36px!important}
  .signal-view .agreement-emoji-button{font-size:24px!important}
  .signal-view .signal-private-messages{display:none}
}


/* === Stage 12 mobile fit pass 4: stable keyboard, compact roster, single signal === */
@media(max-width:520px){
  /* Safari keyboard: never vertically center/shift the home card. */
  body.kemp-keyboard-open main.home-view{
    position:fixed!important;
    left:0!important;
    top:var(--kemp-vtop,0px)!important;
    width:100%!important;
    height:var(--kemp-vh,100dvh)!important;
    min-height:0!important;
    justify-content:flex-start!important;
    align-items:stretch!important;
    overflow:hidden!important;
    padding:4px 8px!important;
  }
  body.kemp-keyboard-open .home-view .home-card{
    margin:0 auto!important;
    max-height:100%!important;
    overflow-y:auto!important;
    overscroll-behavior:contain;
    -webkit-overflow-scrolling:touch;
  }
  .home-view .field{position:relative;gap:5px!important}
  .home-view .field>span{display:block;position:relative;z-index:2;margin-bottom:1px}
  .home-view input:focus,.home-view select:focus{outline-offset:1px}

  /* One compact roster region; 10-player rooms scroll only this region. */
  .gathering-view .gathering-roster{flex:1 1 auto;min-height:0;display:flex;flex-direction:column;margin:3px 0}
  .gathering-view .gathering-roster>h3{font-size:13px!important;margin:2px 0!important}
  .gathering-view .gathering-roster-tabs{display:grid;grid-template-columns:1fr 1fr;gap:4px;flex:0 0 auto;margin-bottom:3px}
  .gathering-view .gathering-roster-tabs button{min-height:30px!important;margin:0!important;padding:3px!important;font-size:9px!important}
  .gathering-view .gathering-roster-body{flex:1 1 auto;min-height:0;max-height:210px;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
  .gathering-view .gathering-roster-body>.gathering-list,
  .gathering-view .gathering-roster-body>.squad-list{max-height:none!important;overflow:visible!important}

  /* Secret signal is exactly ONE choice: emoji OR phrase. */
  .signal-view .agreement-single-choice,
  .interround-single-choice{flex:0 0 auto;min-height:44px;border:1px solid rgba(233,184,91,.48);border-radius:12px;background:rgba(255,255,255,.035);display:flex;align-items:center;justify-content:center;padding:4px 8px;overflow:hidden}
  .signal-view .agreement-single-choice.has-emoji,
  .interround-single-choice.has-emoji{min-height:48px}
  .signal-view .agreement-single-choice .agreement-slot-emoji,
  .interround-single-choice .agreement-slot-emoji{font-size:31px!important}
  .signal-view .agreement-signal-body{max-height:none!important}
  .signal-view .setup-picker{min-height:0!important}
  .signal-view .setup-emoji-grid{grid-template-columns:repeat(6,minmax(0,1fr))!important}

  /* Keep interround attached to the REAL visual viewport while the keyboard is visible. */
  body.kemp-keyboard-open .interround-overlay{
    position:fixed!important;
    top:var(--kemp-vtop,0px)!important;
    left:var(--kemp-vleft,0px)!important;
    width:var(--kemp-vw,100vw)!important;
    height:var(--kemp-vh,100dvh)!important;
    max-height:var(--kemp-vh,100dvh)!important;
    padding:4px!important;
    overflow:hidden!important;
  }
  body.kemp-keyboard-open .interround-overlay .interround-panel{
    width:100%!important;
    height:100%!important;
    max-height:100%!important;
    margin:0!important;
    overflow-y:auto!important;
    overscroll-behavior:contain;
    -webkit-overflow-scrolling:touch;
  }
}

/* === Stage 12 mobile fit pass 5: iOS keyboard lock, unified signal choice, compact signal tabs === */
:root{
  --kemp-visible-h:100dvh;
  --kemp-vbottom:100dvh;
}
@media(max-width:520px){
  html,body{overscroll-behavior:none}
  body.kemp-focus-mode{overflow:hidden!important}

  /* Keep the app shell anchored while iOS pans the visual viewport for a focused field. */
  body.kemp-focus-mode main.auth-view,
  body.kemp-focus-mode main.home-view,
  body.kemp-focus-mode main.gathering-view,
  body.kemp-focus-mode main.signal-view{
    position:fixed!important;
    inset:0!important;
    top:0!important;
    left:0!important;
    width:100%!important;
    height:var(--kemp-vh,100dvh)!important;
    max-height:var(--kemp-vh,100dvh)!important;
    margin:0!important;
    transform:none!important;
    overflow:hidden!important;
  }
  body.kemp-focus-mode .auth-view .network-header,
  body.kemp-focus-mode .home-view .network-header,
  body.kemp-focus-mode .gathering-view .network-header,
  body.kemp-focus-mode .signal-view .network-header{display:none!important}

  /* Login/create/join fields stay in the upper half before Safari opens the keyboard. */
  body.kemp-focus-mode .auth-view{justify-content:flex-start!important;padding:6px 8px!important}
  body.kemp-focus-mode .auth-view .auth-card{margin:0 auto!important;max-height:calc(var(--kemp-vh,100dvh) - 12px)!important;overflow-y:auto!important}
  body.kemp-focus-mode .home-view{justify-content:flex-start!important;padding:4px 8px!important}
  body.kemp-focus-mode .home-view .home-card{margin:0 auto!important;max-height:calc(var(--kemp-vh,100dvh) - 8px)!important;overflow-y:auto!important}
  body.kemp-focus-mode .home-view .home-intro{display:none!important}
  body.kemp-focus-mode .home-view .home-card h2{margin-top:0!important}

  /* The room itself never moves for chat input. Only the composer floats above the keyboard. */
  body.kemp-focus-mode .gathering-view{padding:4px 8px!important}
  body.kemp-focus-mode .gathering-view .gathering-card{margin:0 auto!important;height:100%!important;max-height:100%!important;overflow:hidden!important}
  body.kemp-focus-mode .gathering-view .gathering-chat-form,
  body.kemp-focus-mode .signal-view .signal-private-form,
  body.kemp-focus-mode .interround-overlay .interround-chat-form{
    position:fixed!important;
    left:8px!important;
    right:8px!important;
    top:calc(var(--kemp-vbottom,100dvh) - 8px)!important;
    bottom:auto!important;
    transform:translateY(-100%)!important;
    z-index:1000!important;
    margin:0!important;
    padding:6px!important;
    border:1px solid rgba(240,200,108,.55)!important;
    border-radius:12px!important;
    background:#123a2d!important;
    box-shadow:0 10px 30px rgba(0,0,0,.42)!important;
  }
  body.kemp-focus-mode .gathering-view .gathering-chat-form,
  body.kemp-focus-mode .signal-view .signal-private-form,
  body.kemp-focus-mode .interround-overlay .interround-chat-form{grid-template-columns:minmax(0,1fr) auto!important}
  body.kemp-focus-mode .gathering-view .gathering-chat-form input,
  body.kemp-focus-mode .signal-view .signal-private-form input,
  body.kemp-focus-mode .interround-overlay .interround-chat-form input{min-height:42px!important;height:42px!important;font-size:16px!important}
  body.kemp-focus-mode .gathering-view .gathering-chat-form button,
  body.kemp-focus-mode .signal-view .signal-private-form button,
  body.kemp-focus-mode .interround-overlay .interround-chat-form button{min-height:42px!important;height:42px!important;margin:0!important}

  /* Never resize or pan the round-result overlay when the keyboard appears. */
  .interround-overlay,
  body.kemp-keyboard-open .interround-overlay,
  body.kemp-focus-mode .interround-overlay{
    position:fixed!important;
    inset:0!important;
    top:0!important;
    left:0!important;
    right:0!important;
    bottom:0!important;
    width:100%!important;
    height:var(--kemp-vh,100dvh)!important;
    max-height:var(--kemp-vh,100dvh)!important;
    transform:none!important;
    padding:6px!important;
    align-items:center!important;
    justify-content:center!important;
    overflow:hidden!important;
  }
  .interround-overlay .interround-panel,
  body.kemp-keyboard-open .interround-overlay .interround-panel,
  body.kemp-focus-mode .interround-overlay .interround-panel{
    width:calc(100% - 4px)!important;
    height:auto!important;
    max-height:calc(var(--kemp-vh,100dvh) - 12px)!important;
    margin:0 auto!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    transition:none!important;
  }
  body.kemp-focus-mode .interround-overlay .interround-panel{padding-bottom:72px!important}

  /* First signal: proposal and selection share one compact block instead of two duplicated boxes. */
  .signal-view .agreement-unified-picker{gap:3px!important}
  .signal-view .agreement-unified-picker>h3{margin:0 0 2px!important;font-size:11px!important}
  .signal-view .agreement-current-choice{
    flex:0 0 auto;min-height:44px;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:5px;
    padding:5px 7px;border:1px solid rgba(233,184,91,.48);border-radius:11px;background:rgba(255,255,255,.035);overflow:hidden
  }
  .signal-view .agreement-current-choice.has-emoji{min-height:46px}
  .signal-view .agreement-current-label{grid-column:1/-1;font-size:8.5px;line-height:1.05;opacity:.78}
  .signal-view .agreement-current-choice .agreement-slot-emoji{font-size:28px!important}
  .signal-view .agreement-current-choice .agreement-slot-phrase{font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .signal-view .agreement-current-choice .agreement-confirm{width:auto!important;min-height:31px!important;padding:3px 7px!important;margin:0!important;font-size:8.5px!important}
  .signal-view .agreement-current-choice>.muted{font-size:8.5px!important;margin:0!important}
  .signal-view .setup-picker>.primary{min-height:33px!important}

  /* Public signal sheet: Emoji + Phrases on one row, Favorites centered beneath. */
  .game-view .round-signal-tabs,
  .interround-signal-builder>.round-signal-tabs{
    display:grid!important;
    grid-template-columns:1fr 1fr!important;
    grid-template-areas:'emoji phrase' 'favorite favorite'!important;
    gap:4px!important;
  }
  .game-view .round-signal-tab-emoji,.interround-signal-builder .round-signal-tab-emoji{grid-area:emoji}
  .game-view .round-signal-tab-phrase,.interround-signal-builder .round-signal-tab-phrase{grid-area:phrase}
  .game-view .round-signal-tab-favorites,.interround-signal-builder .round-signal-tab-favorites{grid-area:favorite;width:52%!important;justify-self:center!important}
  .game-view .round-signal-panel{
    inset:max(5px,env(safe-area-inset-top)) 6px max(5px,env(safe-area-inset-bottom))!important;
    top:max(5px,env(safe-area-inset-top))!important;
    transform:none!important;
  }

  /* Do not keep an old document scroll offset after a keyboard or signal sheet closes. */
  body:not(.kemp-focus-mode) main.auth-view,
  body:not(.kemp-focus-mode) main.home-view,
  body:not(.kemp-focus-mode) main.gathering-view,
  body:not(.kemp-focus-mode) main.signal-view{transform:none!important}
}

/* === Stage 12 mobile flow pass 6: V3 keyboard architecture, lobby cleanup, signal-change overlay === */
.room-settings-sheet{position:fixed;inset:0;z-index:460;display:flex;align-items:center;justify-content:center;padding:18px;background:rgba(3,20,15,.82);backdrop-filter:blur(6px)}
.room-settings-sheet__panel{width:min(620px,100%);max-height:min(760px,calc(100dvh - 36px));overflow:auto;padding:18px;border:1px solid rgba(233,184,91,.58);border-radius:20px;background:#123a2d;box-shadow:0 24px 80px rgba(0,0,0,.52)}
.room-settings-sheet__head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:14px}.room-settings-sheet__head h2{margin:3px 0 0}.room-settings-sheet__head .quiet{width:auto;margin:0}.room-settings-sheet__fields{display:grid;grid-template-columns:1fr 1fr;gap:12px}.room-settings-sheet__note{margin:12px 0}.room-settings-sheet__save{margin:0}
.gathering-code-row{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.gathering-code-row .room-code{margin:0}.gathering-share-button{width:auto!important;margin:0!important;min-height:34px!important;padding:5px 12px!important}
.gathering-chat-wrap{position:relative}.chat-new-indicator{width:auto!important;min-height:26px!important;padding:3px 8px!important;margin:3px auto!important;font-size:11px!important}
.interround-signal-line{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:7px 9px;border:1px solid rgba(233,184,91,.38);border-radius:12px;background:rgba(255,255,255,.035)}
.interround-signal-current{min-width:0;display:flex;align-items:center;gap:7px}.interround-signal-current .signal-preview{min-height:0;padding:0;border:0;background:transparent}.interround-signal-current .signal-preview-item{min-height:30px!important;padding:3px 7px!important}.interround-signal-line>button{width:auto!important;min-height:34px!important;margin:0!important;padding:5px 10px!important;font-size:11px!important}
.interround-wait-note{padding:9px 10px;border:1px solid rgba(233,184,91,.35);border-radius:12px;background:rgba(255,255,255,.035)}
.interround-proposal-active{background:#efe1bc!important;color:#17362b!important;border-color:#d8b15b!important}.interround-proposal-active .agreement-current-label,.interround-proposal-active .agreement-wait,.interround-proposal-active .muted{color:#17362b!important;opacity:.82!important}
.signal-view .agreement-current-choice.proposal-active{background:#efe1bc!important;color:#17362b!important;border-color:#d8b15b!important}.signal-view .agreement-current-choice.proposal-active .agreement-current-label,.signal-view .agreement-current-choice.proposal-active .agreement-wait,.signal-view .agreement-current-choice.proposal-active .muted{color:#17362b!important;opacity:.84!important}

@media(max-width:520px){
  html,body{width:100%;height:100%;max-width:100%;overflow:hidden!important}
  body>main{max-width:100vw}

  /* No page-level keyboard panning: the app follows VisualViewport and only internal surfaces scroll. */
  body.kemp-focus-mode main.auth-view,
  body.kemp-focus-mode main.home-view,
  body.kemp-focus-mode main.gathering-view,
  body.kemp-focus-mode main.signal-view{
    position:fixed!important;
    inset:auto!important;
    top:var(--kemp-vtop,0px)!important;
    left:var(--kemp-vleft,0px)!important;
    width:var(--kemp-vw,100vw)!important;
    height:var(--kemp-visible-h,100dvh)!important;
    max-height:var(--kemp-visible-h,100dvh)!important;
    min-height:0!important;
    margin:0!important;
    padding:4px 8px!important;
    transform:none!important;
    overflow:hidden!important;
    justify-content:flex-start!important;
    align-items:stretch!important;
  }
  body.kemp-focus-mode .auth-view .auth-card,
  body.kemp-focus-mode .home-view .home-card,
  body.kemp-focus-mode .gathering-view .gathering-card,
  body.kemp-focus-mode .signal-view .signal-agreement-card{
    width:100%!important;
    height:100%!important;
    max-height:100%!important;
    min-height:0!important;
    margin:0 auto!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    overscroll-behavior:contain!important;
    -webkit-overflow-scrolling:touch;
  }
  body.kemp-focus-mode .gathering-view .gathering-chat-form,
  body.kemp-focus-mode .signal-view .signal-private-form,
  body.kemp-focus-mode .interround-overlay .interround-chat-form{
    position:static!important;
    inset:auto!important;
    left:auto!important;right:auto!important;top:auto!important;bottom:auto!important;
    transform:none!important;
    z-index:auto!important;
    margin:4px 0 0!important;
    padding:0!important;
    border:0!important;
    border-radius:0!important;
    background:transparent!important;
    box-shadow:none!important;
  }

  /* Home/create/join: keyboard moves only the card's own scroller, never the document. */
  .home-view .home-card,.auth-view .auth-card{overscroll-behavior:contain}

  /* Gathering header frees a full button row. */
  .gathering-view .gathering-title{gap:6px!important}
  .gathering-view .gathering-title__main{min-width:0;flex:1}
  .gathering-view .gathering-code-row{gap:6px;flex-wrap:nowrap}
  .gathering-view .room-code{font-size:19px!important;white-space:nowrap}
  .gathering-view .gathering-share-button{min-height:28px!important;padding:3px 7px!important;font-size:8.5px!important;white-space:nowrap}
  .gathering-view .gathering-roster{flex:1 1 auto!important;min-height:122px!important;max-height:none!important}
  .gathering-view .gathering-roster-body{flex:1 1 auto!important;min-height:0!important;max-height:none!important;overflow-y:auto!important}
  .gathering-view .gathering-controls{flex:0 0 auto!important}
  .gathering-view .room-settings-launch{flex:0 0 auto!important;min-height:31px!important;margin:3px 0!important;font-size:9.5px!important}
  .gathering-view .gathering-chat-title{flex:0 0 auto!important;margin:3px 0!important}
  .gathering-view .gathering-chat-wrap{flex:0 0 80px!important;min-height:70px!important;max-height:84px!important;overflow:hidden}
  .gathering-view .gathering-chat{height:100%!important;max-height:none!important;overflow-y:auto!important;padding-right:2px;font-size:9.5px!important;overscroll-behavior:contain}
  .gathering-view .gathering-chat p{margin:2px 0!important;line-height:1.2}
  .gathering-view .chat-new-indicator{position:absolute;right:4px;bottom:3px;z-index:3;background:#e0bc62!important;color:#17362b!important}
  .gathering-view .gathering-chat-form{flex:0 0 auto!important;display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;gap:4px!important}
  .gathering-view .gathering-start{flex:0 0 auto!important}
  .gathering-view .gathering-start-note{display:none!important}

  /* Settings are a separate full-screen surface; no overlap with roster tabs. */
  .room-settings-sheet{padding:0!important;align-items:stretch;justify-content:stretch;background:#0a2b21}
  .room-settings-sheet__panel{width:100%!important;height:100%!important;max-height:100%!important;border-radius:0!important;border-left:0!important;border-right:0!important;padding:max(10px,env(safe-area-inset-top)) 12px max(12px,env(safe-area-inset-bottom))!important;overflow-y:auto!important}
  .room-settings-sheet__fields{grid-template-columns:1fr!important;gap:7px!important}.room-settings-sheet__fields .field{gap:3px!important}.room-settings-sheet__fields input,.room-settings-sheet__fields select{min-height:44px!important}

  /* Signal picker: Emoji/Phrases one row, Favorites centered below. */
  .signal-view .agreement-signal-tabs{
    display:grid!important;
    grid-template-columns:1fr 1fr!important;
    grid-template-areas:'emoji phrase' 'favorite favorite'!important;
    gap:4px!important;
  }
  .signal-view .agreement-signal-tab-emoji{grid-area:emoji}.signal-view .agreement-signal-tab-phrase{grid-area:phrase}.signal-view .agreement-signal-tab-favorites{grid-area:favorite;width:52%!important;justify-self:center!important}
  .signal-view .agreement-current-choice.proposal-active{min-height:48px!important}
  .signal-view .agreement-wait{font-size:8.5px!important;line-height:1.1!important}
  .signal-view .agreement-signal-body{overflow-y:auto!important;overscroll-behavior:contain!important;min-height:0!important}
  .signal-view .setup-phrase-grid{overflow:visible!important}

  /* Public signal sheet keeps all navigation in a compact fixed header. */
  .game-view .round-signal-panel{overflow:hidden!important}
  .game-view .round-signal-body{min-height:0!important;overflow-y:auto!important;overscroll-behavior:contain!important}
  .game-view .round-signal-layer .round-signal-stack--side-lane{max-width:92px!important}
  .game-view .round-signal-layer .round-signal-stack--side-lane .round-signal-bubble.phrase{max-width:90px!important;font-size:9px!important;padding:4px 5px!important;line-height:1.16!important}

  /* Both result and signal-change are true overlays. The next round cannot visually coexist with signal change. */
  .interround-overlay,
  body.kemp-keyboard-open .interround-overlay,
  body.kemp-focus-mode .interround-overlay{
    position:fixed!important;
    inset:auto!important;
    top:var(--kemp-vtop,0px)!important;
    left:var(--kemp-vleft,0px)!important;
    width:var(--kemp-vw,100vw)!important;
    height:var(--kemp-visible-h,100dvh)!important;
    max-height:var(--kemp-visible-h,100dvh)!important;
    padding:6px!important;
    transform:none!important;
    overflow:hidden!important;
    align-items:stretch!important;
    justify-content:stretch!important;
  }
  .interround-overlay .interround-panel,
  body.kemp-keyboard-open .interround-overlay .interround-panel,
  body.kemp-focus-mode .interround-overlay .interround-panel{
    width:100%!important;
    height:100%!important;
    max-height:100%!important;
    min-height:0!important;
    margin:0!important;
    padding:9px!important;
    display:flex!important;
    flex-direction:column!important;
    gap:7px!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    overscroll-behavior:contain!important;
    -webkit-overflow-scrolling:touch;
  }
  .interround-overlay .interround-head{flex:0 0 auto!important}
  .interround-overlay .interround-results{flex:0 0 auto!important}
  .interround-overlay .interround-signal-line{flex:0 0 auto!important;padding:5px 7px!important}
  .interround-overlay .interround-signal-current .signal-preview-item.emoji{font-size:24px!important}
  .interround-overlay .interround-signal-current .signal-preview-item.phrase{font-size:9.5px!important}
  .interround-overlay .interround-chat{flex:1 1 118px!important;min-height:104px!important;display:flex!important;flex-direction:column!important;overflow:hidden!important}
  .interround-overlay .interround-message-list{flex:1 1 auto!important;min-height:54px!important;max-height:none!important;overflow-y:auto!important;overscroll-behavior:contain!important}
  .interround-overlay .interround-chat-form{position:sticky!important;bottom:0!important;flex:0 0 auto!important;display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;gap:4px!important;margin-top:4px!important;padding:4px 0 0!important;background:#123a2d!important;z-index:5!important}
  .interround-overlay .interround-chat-form input{min-height:40px!important;height:40px!important;font-size:16px!important}.interround-overlay .interround-chat-form button{min-height:40px!important;height:40px!important;margin:0!important;padding:4px 8px!important;font-size:9px!important}
  .interround-overlay .chat-new-indicator{flex:0 0 auto!important;align-self:center;background:#e0bc62!important;color:#17362b!important}
  .interround-overlay .interround-signal-builder{flex:1 1 auto!important;min-height:0!important;display:flex!important;flex-direction:column!important;overflow:hidden!important}
  .interround-overlay .interround-signal-pick{flex:1 1 auto!important;min-height:0!important;max-height:none!important;overflow-y:auto!important;overscroll-behavior:contain!important}
  .interround-overlay .interround-private-note,.interround-overlay .interround-current-signal,.interround-overlay .interround-changing-banner,.interround-overlay .interround-wait-note,.interround-overlay .proposal-box{flex:0 0 auto!important}
}


/* === Stage 12 lobby pass 7: compact room header, 2-column players, crown host mark, action rows === */
.gathering-host-crown{display:inline-flex;flex:0 0 auto;align-items:center;justify-content:center;color:#f0c866;filter:drop-shadow(0 1px 2px rgba(0,0,0,.35))}
.gathering-host-crown svg{display:block;width:16px;height:16px}
.gathering-player__name-line{display:flex;align-items:center;gap:5px;min-width:0;width:100%}
.gathering-player__name-line strong{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.gathering-player__name-line .gathering-host-crown{margin-left:auto}
.gathering-copy-button{width:auto!important;margin:0!important;min-height:34px!important;padding:5px 12px!important}
.gathering-room-actions{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:7px;margin:7px 0}
.gathering-room-actions button{margin:0!important}
.gathering-room-actions .gathering-leave-button{min-width:96px}

@media(max-width:520px){
  .gathering-view .gathering-title{display:block!important}
  .gathering-view .gathering-title__main{width:100%!important}
  .gathering-view .gathering-code-row{display:grid!important;grid-template-columns:auto auto auto!important;align-items:center!important;justify-content:start!important;gap:4px!important;width:100%!important}
  .gathering-view .room-code{font-size:17px!important;letter-spacing:1.6px!important;min-width:0!important}
  .gathering-view .gathering-share-button,.gathering-view .gathering-copy-button{width:auto!important;min-width:0!important;min-height:29px!important;padding:3px 4px!important;font-size:8px!important;line-height:1.05!important;white-space:nowrap!important}

  /* Игроки: exactly two columns. No presence or squad duplication inside player cards. */
  .gathering-view .gathering-roster-body--players{overflow:visible!important;max-height:none!important}
  .gathering-view .gathering-roster-body--players>.gathering-list{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:4px!important;max-height:none!important;overflow:visible!important}
  .gathering-view .gathering-player{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;grid-template-rows:auto auto;align-items:center!important;min-width:0!important;min-height:31px!important;padding:4px 5px!important;gap:3px 4px!important;flex-wrap:nowrap!important}
  .gathering-view .gathering-player__main{min-width:0!important;display:block!important}
  .gathering-view .gathering-player__name-line{gap:3px!important}
  .gathering-view .gathering-player__name-line strong{font-size:10px!important;line-height:1.05!important}
  .gathering-view .gathering-host-crown{margin-left:3px!important;color:#f0c866!important}
  .gathering-view .gathering-host-crown svg{width:13px!important;height:13px!important}
  .gathering-view .gathering-player>.ready-pill{justify-self:end!important;font-size:7px!important;padding:2px 3px!important;white-space:nowrap!important}
  .gathering-view .gathering-player>.mini{grid-column:1/-1!important;width:100%!important;min-height:23px!important;padding:2px 3px!important;font-size:7.5px!important}

  /* At 10 players the five rows stay visible instead of adding a second participant scrollbar. */
  .gathering-view .gathering-roster{flex:0 0 auto!important;min-height:0!important;max-height:none!important}
  .gathering-view .gathering-roster-body--players{flex:0 0 auto!important}
  .gathering-view .gathering-roster-body--squads{max-height:178px!important;overflow-y:auto!important;overscroll-behavior:contain!important}

  /* Row 1 = draw / ready. Row 2 = settings / exit. */
  .gathering-view .gathering-controls{grid-template-columns:repeat(2,minmax(0,1fr))!important;margin:4px 0!important}
  .gathering-view .gathering-room-actions{grid-template-columns:minmax(0,1fr) minmax(76px,.36fr)!important;gap:4px!important;margin:3px 0 4px!important;flex:0 0 auto!important}
  .gathering-view .gathering-room-actions button{min-height:31px!important;padding:3px 5px!important;font-size:8.8px!important}
  .gathering-view .gathering-room-actions .gathering-leave-button{min-width:0!important}
  .gathering-view .room-settings-launch{margin:0!important}
}

/* === Stage 12 mobile chat pass 8: readable signal selection + visible private chat + keyboard-docked interround composer === */
@media(max-width:520px){
  /* Unsent selected Signal must be readable on the dark green card. Proposal cards remain light via .proposal-active. */
  .signal-view .agreement-current-choice:not(.proposal-active){
    color:#f4e6c2!important;
    background:rgba(255,255,255,.045)!important;
  }
  .signal-view .agreement-current-choice:not(.proposal-active) .agreement-current-label{
    color:#f0cf82!important;
    opacity:1!important;
    font-weight:800!important;
  }
  .signal-view .agreement-current-choice:not(.proposal-active) .agreement-slot-phrase,
  .signal-view .agreement-current-choice:not(.proposal-active)>.muted{
    color:#f7edd2!important;
    opacity:1!important;
  }

  /* The private squad chat is never hidden on short iPhone visual viewports. Keep a compact 2–3 line window. */
  .signal-view .signal-private-messages,
  body.kemp-focus-mode .signal-view .signal-private-messages,
  body.kemp-keyboard-open .signal-view .signal-private-messages{
    display:block!important;
    flex:0 0 48px!important;
    min-height:38px!important;
    max-height:48px!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    padding:4px 6px!important;
    border-radius:9px!important;
    background:rgba(0,0,0,.12)!important;
    font-size:9px!important;
    line-height:1.18!important;
    overscroll-behavior:contain!important;
  }
  .signal-view .signal-private-messages p{margin:2px 0!important;overflow-wrap:anywhere}

  /* Interround: focusing chat must not scroll the whole results panel to the bottom.
     The composer is anchored to the actual VisualViewport just above the iOS keyboard/browser chrome. */
  body.kemp-focus-mode .interround-overlay,
  body.kemp-keyboard-open .interround-overlay{
    position:fixed!important;
    inset:auto!important;
    top:var(--kemp-vtop,0px)!important;
    left:var(--kemp-vleft,0px)!important;
    width:var(--kemp-vw,100vw)!important;
    height:var(--kemp-visible-h,100dvh)!important;
    max-height:var(--kemp-visible-h,100dvh)!important;
    padding:6px!important;
    overflow:hidden!important;
    transform:none!important;
  }
  body.kemp-focus-mode .interround-overlay .interround-panel,
  body.kemp-keyboard-open .interround-overlay .interround-panel{
    width:100%!important;
    height:100%!important;
    max-height:100%!important;
    min-height:0!important;
    margin:0!important;
    padding:9px 9px 62px!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    overscroll-behavior:contain!important;
  }
  body.kemp-focus-mode .interround-overlay .interround-chat,
  body.kemp-keyboard-open .interround-overlay .interround-chat{
    min-height:92px!important;
    padding-bottom:4px!important;
    overflow:visible!important;
  }
  body.kemp-focus-mode .interround-overlay .interround-chat-form,
  body.kemp-keyboard-open .interround-overlay .interround-chat-form{
    position:fixed!important;
    left:calc(var(--kemp-vleft,0px) + 10px)!important;
    top:calc(var(--kemp-vtop,0px) + var(--kemp-visible-h,100dvh) - 8px)!important;
    right:auto!important;
    bottom:auto!important;
    width:calc(var(--kemp-vw,100vw) - 20px)!important;
    height:48px!important;
    min-height:48px!important;
    display:grid!important;
    grid-template-columns:minmax(0,1fr) auto!important;
    align-items:stretch!important;
    gap:5px!important;
    margin:0!important;
    padding:4px!important;
    transform:translateY(-100%)!important;
    z-index:1500!important;
    border:1px solid rgba(240,200,108,.72)!important;
    border-radius:11px!important;
    background:#123a2d!important;
    box-shadow:0 8px 24px rgba(0,0,0,.38)!important;
  }
  body.kemp-focus-mode .interround-overlay .interround-chat-form input,
  body.kemp-keyboard-open .interround-overlay .interround-chat-form input{
    width:100%!important;
    min-width:0!important;
    min-height:38px!important;
    height:38px!important;
    padding:5px 8px!important;
    font-size:16px!important;
    line-height:1.15!important;
  }
  body.kemp-focus-mode .interround-overlay .interround-chat-form button,
  body.kemp-keyboard-open .interround-overlay .interround-chat-form button{
    width:auto!important;
    min-width:82px!important;
    min-height:38px!important;
    height:38px!important;
    margin:0!important;
    padding:4px 8px!important;
    font-size:9.5px!important;
    line-height:1!important;
  }
}

/* === Stage 12 mobile UI pass 9: native-style sharing, fixed zoom, compact live score, keyboard-safe chats === */
.gathering-share-sheet{position:fixed;inset:0;z-index:520;display:flex;align-items:center;justify-content:center;padding:18px;background:rgba(3,20,15,.84);backdrop-filter:blur(6px)}
.gathering-share-sheet__panel{width:min(520px,100%);padding:18px;border:1px solid rgba(233,184,91,.58);border-radius:20px;background:#123a2d;box-shadow:0 24px 80px rgba(0,0,0,.52)}
.gathering-share-sheet__head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}.gathering-share-sheet__head h3{margin:3px 0 0}.gathering-share-sheet__head .quiet{width:auto;margin:0}.gathering-share-sheet__hint{margin:10px 0 12px}.gathering-share-options{display:grid;grid-template-columns:1fr 1fr;gap:8px}.gathering-share-options .share-app{margin:0;min-height:48px}.gathering-share-options .share-copy-link{grid-column:1/-1}

@media(max-width:520px){
  /* The mobile app is a fixed surface. Double tap/pinch must not zoom or shift the UI. */
  html,body,button,input,select,textarea,a{touch-action:manipulation;-webkit-tap-highlight-color:transparent}
  html{-webkit-text-size-adjust:100%;text-size-adjust:100%}

  /* Lobby: chat absorbs free height; start state stays pinned to the bottom. */
  .gathering-view .gathering-card{height:100%!important;max-height:100%!important;overflow:hidden!important}
  .gathering-view .gathering-chat-wrap{flex:1 1 auto!important;min-height:72px!important;max-height:none!important;overflow:hidden!important}
  .gathering-view .gathering-chat{height:100%!important;max-height:none!important;overflow-y:auto!important}
  .gathering-view .gathering-chat-form{flex:0 0 auto!important}
  .gathering-view .gathering-start{flex:0 0 auto!important;margin-top:5px!important}
  .gathering-view .gathering-start-note{display:none!important}
  .gathering-view .gathering-room-actions:empty{display:none!important}

  /* Share sheet behaves like a small app chooser even on local HTTP where Web Share is unavailable. */
  .gathering-share-sheet{padding:max(10px,env(safe-area-inset-top)) 10px max(10px,env(safe-area-inset-bottom));align-items:flex-end}
  .gathering-share-sheet__panel{width:100%;padding:14px;border-radius:18px}
  .gathering-share-sheet__head h3{font-size:18px}.gathering-share-sheet__hint{font-size:11px;line-height:1.25}
  .gathering-share-options{grid-template-columns:1fr 1fr;gap:6px}.gathering-share-options .share-app{min-height:44px;padding:5px;font-size:10px}

  /* Live match: full standings live in interround. During play keep only a one-line score strip. */
  .game-view .network-scores{display:grid!important;gap:3px!important;margin:0 0 3px!important;min-height:32px!important;height:32px!important;align-items:stretch}
  .game-view .network-scores[data-squad-count="2"]{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .game-view .network-scores[data-squad-count="3"]{grid-template-columns:repeat(3,minmax(0,1fr))!important}
  .game-view .network-scores[data-squad-count="4"]{grid-template-columns:repeat(4,minmax(0,1fr))!important}
  .game-view .network-scores[data-squad-count="5"]{grid-template-columns:repeat(5,minmax(0,1fr))!important}
  .game-view .network-scores .score{min-height:32px!important;height:32px!important;padding:2px 3px!important;display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;align-items:center!important;gap:2px!important;border-radius:8px!important}
  .game-view .network-scores .score-team{min-width:0!important;display:flex!important;align-items:center!important;justify-content:flex-start!important;gap:2px!important;font-size:0!important;overflow:hidden!important}
  .game-view .network-scores .score-team .team-mark{width:15px!important;height:17px!important;flex:0 0 15px!important}
  .game-view .network-scores .score-team-name{font-size:0!important;line-height:1!important}
  .game-view .network-scores .score-team-name::after{content:attr(data-mobile-label);font-size:9px;font-weight:800;color:#f4ead5}
  .game-view .network-scores .score-names,.game-view .network-scores .score-status{display:none!important}
  .game-view .network-scores .score>b{font-size:14px!important;line-height:1!important;justify-self:end}
  .game-view .network-scores .score.mine{box-shadow:inset 0 0 0 1px rgba(240,200,108,.48)}

  /* Header pills are visually aligned and use the canonical capitalized Раунд. */
  .game-view .game-heading__right{width:clamp(122px,34vw,154px)!important;display:grid!important;grid-template-columns:1fr!important;gap:4px!important}
  .game-view .game-heading__mode,.game-view .game-leave-button{width:100%!important;max-width:none!important;min-height:30px!important;height:30px!important;margin:0!important;padding:3px 6px!important;display:flex!important;align-items:center!important;justify-content:center!important;text-align:center!important;line-height:1.05!important}

  /* 10-player ANTI-KEMP gets a 2x2 target grid instead of a clipped vertical modal. */
  .game-view .anti-target-overlay{display:flex!important;align-items:center!important;justify-content:center!important;padding:10px!important;overflow:hidden!important}
  .game-view .anti-target-panel{width:min(92%,360px)!important;max-height:88%!important;overflow-y:auto!important;padding:14px!important}
  .game-view .anti-target-panel>strong{display:block;font-size:20px!important;line-height:1.08!important;margin-bottom:8px!important}
  .game-view .anti-targets[data-count="4"]{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:7px!important}
  .game-view .anti-targets[data-count="4"] button{min-height:48px!important;margin:0!important;padding:5px!important;font-size:11px!important}

  /* Signal agreement: when typing to the partner, the picker collapses instead of being scrolled under the keyboard. */
  body.kemp-keyboard-open .signal-view .signal-agreement-card,
  body.kemp-focus-mode .signal-view .signal-agreement-card{overflow:hidden!important;display:flex!important;flex-direction:column!important}
  body.kemp-keyboard-open .signal-view .agreement-unified-picker,
  body.kemp-focus-mode .signal-view .agreement-unified-picker{flex:0 0 auto!important;min-height:0!important;overflow:hidden!important}
  body.kemp-keyboard-open .signal-view .agreement-signal-tabs,
  body.kemp-keyboard-open .signal-view .agreement-signal-body,
  body.kemp-keyboard-open .signal-view .setup-picker>.primary,
  body.kemp-focus-mode .signal-view .agreement-signal-tabs,
  body.kemp-focus-mode .signal-view .agreement-signal-body,
  body.kemp-focus-mode .signal-view .setup-picker>.primary{display:none!important}
  body.kemp-keyboard-open .signal-view .signal-squad-statuses,
  body.kemp-focus-mode .signal-view .signal-squad-statuses{display:none!important}
  body.kemp-keyboard-open .signal-view .signal-private-title,
  body.kemp-focus-mode .signal-view .signal-private-title{margin-top:5px!important}
  body.kemp-keyboard-open .signal-view .signal-private-messages,
  body.kemp-focus-mode .signal-view .signal-private-messages{display:block!important;flex:1 1 auto!important;min-height:54px!important;max-height:none!important;overflow-y:auto!important}
  body.kemp-keyboard-open .signal-view .signal-private-form,
  body.kemp-focus-mode .signal-view .signal-private-form{position:static!important;inset:auto!important;transform:none!important;display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;flex:0 0 auto!important;margin:4px 0 0!important;padding:0!important;border:0!important;background:transparent!important;box-shadow:none!important}
  body.kemp-keyboard-open .signal-view .signal-agreement-card>.muted:last-child,
  body.kemp-focus-mode .signal-view .signal-agreement-card>.muted:last-child{display:none!important}

  /* Interround keyboard mode: no floating composer over the standings. Results scroll above a docked chat. */
  body.kemp-keyboard-open .interround-overlay .interround-panel,
  body.kemp-focus-mode .interround-overlay .interround-panel{overflow:hidden!important;padding:8px!important;display:flex!important;flex-direction:column!important;gap:5px!important}
  body.kemp-keyboard-open .interround-overlay .interround-head,
  body.kemp-focus-mode .interround-overlay .interround-head{flex:0 0 auto!important}
  body.kemp-keyboard-open .interround-overlay .interround-results,
  body.kemp-focus-mode .interround-overlay .interround-results{flex:1 1 auto!important;min-height:0!important;overflow-y:auto!important;overscroll-behavior:contain!important}
  body.kemp-keyboard-open .interround-overlay .interround-signal-line,
  body.kemp-focus-mode .interround-overlay .interround-signal-line{flex:0 0 auto!important}
  body.kemp-keyboard-open .interround-overlay .interround-chat,
  body.kemp-focus-mode .interround-overlay .interround-chat{flex:0 0 112px!important;min-height:112px!important;max-height:112px!important;overflow:hidden!important;padding:0!important;display:flex!important;flex-direction:column!important}
  body.kemp-keyboard-open .interround-overlay .interround-message-list,
  body.kemp-focus-mode .interround-overlay .interround-message-list{flex:1 1 auto!important;min-height:34px!important;max-height:none!important;overflow-y:auto!important}
  body.kemp-keyboard-open .interround-overlay .interround-chat-form,
  body.kemp-focus-mode .interround-overlay .interround-chat-form{position:static!important;inset:auto!important;width:100%!important;height:auto!important;min-height:44px!important;transform:none!important;display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;gap:5px!important;margin:4px 0 0!important;padding:0!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;z-index:auto!important}
  body.kemp-keyboard-open .interround-overlay .interround-chat-form input,
  body.kemp-focus-mode .interround-overlay .interround-chat-form input{min-height:42px!important;height:42px!important}
  body.kemp-keyboard-open .interround-overlay .interround-chat-form button,
  body.kemp-focus-mode .interround-overlay .interround-chat-form button{min-width:82px!important;min-height:42px!important;height:42px!important;margin:0!important}
}

@media(max-width:520px){
  /* Selected signal label is a real contrast pill, never green-on-green. */
  .signal-view .agreement-current-choice:not(.proposal-active) .agreement-current-label{
    display:inline-flex!important;align-items:center!important;justify-self:start!important;
    width:auto!important;padding:2px 6px!important;border-radius:999px!important;
    background:#f0cf82!important;color:#17362b!important;opacity:1!important;font-weight:900!important;
  }
}


/* === Stage 12 mobile UI pass 14 from PASS9: signal proximity, cleaner inter-round, full squad outlines === */
.network-seat,.network-self-seat,.network-scores .score{--squad-accent:#d8b15b}
.network-seat{
  border:2px solid var(--squad-accent)!important;
  border-radius:14px!important;
  box-shadow:0 0 0 1px rgba(7,28,22,.82),0 6px 12px rgba(0,0,0,.12)!important;
  background:rgba(14,52,40,.90)!important;
}
.network-self-seat{
  border:2px solid var(--squad-accent)!important;
  box-shadow:0 0 0 1px rgba(7,28,22,.82)!important;
}
.network-scores .score{
  border:2px solid var(--squad-accent)!important;
  box-shadow:0 0 0 1px rgba(7,28,22,.82)!important;
}
.network-seat .team-mark,.network-self-seat .team-mark,.network-scores .score-team .team-mark{
  border:2px solid var(--squad-accent)!important;
  border-radius:8px!important;
  background:rgba(8,35,27,.66)!important;
  box-sizing:border-box;
}
.network-seat .name{display:block;text-align:center;line-height:1.05}
.network-seat .network-seat-status{display:block;margin-top:2px;line-height:1.05;text-align:center;opacity:.92}
.network-seat.suspected{
  outline:3px solid #f0c866!important;outline-offset:2px!important;
  box-shadow:0 0 0 2px rgba(9,43,33,.9),0 0 16px rgba(240,200,102,.52)!important;
}
.network-seat--rival{cursor:pointer}
.suspicion-eye{display:none!important}
.suspicion-action{
  position:absolute;left:50%;bottom:calc(100% + 4px);transform:translateX(-50%);
  z-index:85;width:max-content!important;min-width:88px!important;min-height:27px!important;
  margin:0!important;padding:4px 7px!important;border:1px solid rgba(240,200,102,.9)!important;
  border-radius:9px!important;background:#153e31!important;color:#f5ead1!important;
  font-size:8px!important;font-weight:900!important;line-height:1!important;white-space:nowrap!important;
  box-shadow:0 6px 16px rgba(0,0,0,.42)!important;
}
.network-seat--top .suspicion-action{top:calc(100% + 4px);bottom:auto}
.suspicion-action.active{background:#efe1bc!important;color:#17362b!important}
.gathering-chat-empty{margin:4px 0!important;opacity:.72}
.signal-view .signal-confirmed{display:grid;gap:6px}
.signal-view .signal-confirmed .signal-preview{margin:0}
.signal-view .signal-confirmed>p{margin:0}
.anti-target-title{display:grid;gap:1px;margin-bottom:7px;text-align:left}
.anti-target-title strong{margin:0!important;font-size:23px!important;line-height:1!important}
.anti-target-title span{font-size:16px;font-weight:800;line-height:1.1}
.anti-target-button{display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;gap:2px!important}
.anti-target-button .anti-target-squad{font-size:12px!important;line-height:1!important}
.anti-target-button .anti-target-players{display:block!important;color:#f7e8dd!important;font-size:9px!important;line-height:1.1!important;text-align:center!important;white-space:normal!important}

/* Public signals: keep every bubble close to its sender instead of drifting into neighbours. */
.round-signal-layer .round-signal-stack{max-width:132px!important;gap:3px!important}
.round-signal-layer .round-signal-stack--near-right{transform:translate(0,-50%)!important;align-items:flex-start!important}
.round-signal-layer .round-signal-stack--near-left{transform:translate(-100%,-50%)!important;align-items:flex-end!important}
.round-signal-layer .round-signal-stack--below-player{transform:translate(-50%,44px)!important;align-items:center!important}
.round-signal-layer .round-signal-stack--above-player{transform:translate(-50%,-100%)!important;align-items:center!important}
.round-signal-layer .round-signal-stack--self-anchor{transform:translate(-50%,-100%)!important;align-items:center!important}
.round-signal-layer .round-signal-bubble.phrase{max-width:118px!important;font-size:10px!important;line-height:1.18!important;padding:5px 7px!important}
.round-signal-layer .round-signal-bubble.emoji{font-size:31px!important}

/* Header: tighter and visually centered against the right-side controls. */
@media(max-width:520px){
  .game-view .game-heading{
    display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;align-items:start!important;gap:8px!important;
  }
  .game-view .game-heading h2{margin:2px 0 2px!important;font-size:19px!important}
  .game-view .game-heading>div:first-child{padding-top:5px!important}
  .game-view .game-heading__right{display:grid!important;justify-items:stretch!important;gap:6px!important}
  .game-view .game-heading__mode{margin-top:0!important}

  /* Lobby chat keyboard-view immediately clears the screen and shows chat + composer. */
  body.kemp-focus-mode .gathering-view .gathering-card{
    display:flex!important;flex-direction:column!important;gap:5px!important;padding:8px!important;overflow:hidden!important;
  }
  body.kemp-focus-mode .gathering-view .gathering-title,
  body.kemp-focus-mode .gathering-view .gathering-meta,
  body.kemp-focus-mode .gathering-view .readonly-banner,
  body.kemp-focus-mode .gathering-view .gathering-roster,
  body.kemp-focus-mode .gathering-view .proposal-box,
  body.kemp-focus-mode .gathering-view .gathering-controls,
  body.kemp-focus-mode .gathering-view .gathering-room-actions,
  body.kemp-focus-mode .gathering-view .gathering-start,
  body.kemp-focus-mode .gathering-view .gathering-start-note{display:none!important}
  body.kemp-focus-mode .gathering-view .gathering-chat-title{display:block!important;flex:0 0 auto!important;margin:2px 0!important}
  body.kemp-focus-mode .gathering-view .gathering-chat-wrap{display:block!important;flex:1 1 auto!important;min-height:0!important;max-height:none!important;overflow:hidden!important}
  body.kemp-focus-mode .gathering-view .gathering-chat{height:100%!important;max-height:none!important;overflow-y:auto!important}
  body.kemp-focus-mode .gathering-view .gathering-chat-form{display:grid!important;flex:0 0 auto!important;grid-template-columns:minmax(0,1fr) auto!important;gap:5px!important;margin:0!important}
  body.kemp-focus-mode .gathering-view .gathering-chat-form input{min-height:42px!important;height:42px!important;font-size:16px!important}
  body.kemp-focus-mode .gathering-view .gathering-chat-form button{min-height:42px!important;height:42px!important;margin:0!important}

  /* Cards: name above, network state below. */
  .game-view .network-seat .network-seat-status{display:block!important;font-size:7.4px!important;margin-top:1px!important;line-height:1!important}
  .game-view .network-arena[data-player-count="10"] .network-seat .network-seat-status{font-size:6.2px!important}
  .game-view .network-arena[data-player-count="10"] .network-seat .name{font-size:8px!important;line-height:1.02!important}
  .game-view .network-arena[data-player-count="10"] .network-seat{padding:2px 1px!important}
  .game-view .network-arena[data-player-count="10"] .network-seat .network-mini-backs{margin-top:2px!important}

  /* 8/10 players: move center replacement up so it no longer covers lower seats. */
  .game-view .network-arena[data-player-count="8"] .center-vote-mobile,
  .game-view .network-arena[data-player-count="10"] .center-vote-mobile{
    bottom:auto!important;top:58%!important;width:min(190px,60%)!important;padding:4px!important;gap:2px!important;transform:translateX(-50%)!important;
  }
  .game-view .network-arena[data-player-count="8"] .center-vote-mobile:not(.open),
  .game-view .network-arena[data-player-count="10"] .center-vote-mobile:not(.open){top:66%!important;width:auto!important;min-width:116px!important;padding:0!important}
  .game-view .network-arena[data-player-count="8"] .center-vote-mobile .center-vote-initiator,
  .game-view .network-arena[data-player-count="10"] .center-vote-mobile .center-vote-initiator{display:none!important}
  .game-view .network-arena[data-player-count="8"] .center-vote-mobile .center-vote-start,
  .game-view .network-arena[data-player-count="10"] .center-vote-mobile .center-vote-start,
  .game-view .network-arena[data-player-count="8"] .center-vote-mobile .center-vote-actions button,
  .game-view .network-arena[data-player-count="10"] .center-vote-mobile .center-vote-actions button{min-height:25px!important;font-size:8px!important;padding:2px 6px!important}

  /* Inter-round: give checked cards their own clean space so chat no longer covers them. */
  .interround-overlay .interround-panel{gap:5px!important;padding:8px!important;overflow:hidden!important}
  .interround-overlay .interround-results{display:grid!important;gap:4px!important;padding:6px!important;flex:0 0 auto!important}
  .interround-overlay .checked-cards{gap:4px!important;padding:6px!important}
  .interround-overlay .checked-player{display:grid!important;grid-template-columns:1fr!important;gap:4px!important}
  .interround-overlay .checked-player-meta strong{font-size:10px!important;white-space:normal!important;overflow:visible!important;text-overflow:clip!important;line-height:1.15!important}
  .interround-overlay .checked-player-cards{display:flex!important;grid-template-columns:none!important;gap:3px!important;overflow-x:auto!important;padding-bottom:2px!important;scrollbar-width:none}
  .interround-overlay .checked-player-cards::-webkit-scrollbar{display:none}
  .interround-overlay .checked-player-cards .checked-card{flex:0 0 42px!important;min-width:42px!important;min-height:54px!important;height:54px!important}
  .interround-overlay .round-standings{max-height:66px!important;overflow-y:auto!important}
  .interround-overlay .interround-chat{flex:0 0 auto!important;min-height:0!important;padding-top:0!important}
  .interround-overlay .interround-message-list{height:58px!important;max-height:58px!important;overflow-y:auto!important}
  .interround-overlay .interround-chat-form{margin-top:4px!important;padding-top:4px!important;background:#123a2d!important;position:static!important}
  .interround-overlay .interround-chat-form input{min-height:38px!important;height:38px!important;font-size:16px!important}
  .interround-overlay .interround-chat-form button{min-height:38px!important;height:38px!important}

  /* Mobile signal proximity tuning by area. */
  .game-view .round-signal-layer .round-signal-stack{max-width:118px!important}
  .game-view .round-signal-layer .round-signal-stack--near-right{max-width:108px!important}
  .game-view .round-signal-layer .round-signal-stack--near-left{max-width:108px!important}
  .game-view .round-signal-layer .round-signal-stack--below-player{transform:translate(-50%,38px)!important}
  .game-view .round-signal-layer .round-signal-stack--above-player{transform:translate(-50%,-96%)!important}
  .game-view .round-signal-layer .round-signal-bubble.phrase{max-width:104px!important;font-size:9.6px!important;padding:5px 6px!important}
  .game-view .round-signal-layer .round-signal-bubble.emoji{font-size:30px!important}

  /* 10-player ANTI-KEMP stays a 2x2 chooser with names. */
  .game-view .anti-targets[data-count="4"] .anti-target-button{min-height:58px!important}
  .game-view .anti-targets[data-count="4"] .anti-target-players{font-size:8px!important}
}

/* === PASS16 final mobile QA: compact ranked finals, stable interround footer, denser score === */
@media(max-width:520px){
  /* Final ranked screen: always show every squad as a compact row (2-5 squads). */
  .match-final-screen--ranked{margin:4px 6px!important;padding:9px!important;border-radius:14px!important}
  .match-final-screen--ranked .match-final-hero{padding:2px 4px 7px!important}
  .match-final-screen--ranked .match-final-winner-mark{width:42px!important;height:42px!important;margin-bottom:3px!important}
  .match-final-screen--ranked .match-final-kicker{font-size:8px!important;margin-bottom:2px!important}
  .match-final-screen--ranked .match-final-hero h2{font-size:22px!important;line-height:1.05!important;margin:0 0 2px!important}
  .match-final-screen--ranked .match-final-hero p{margin:0!important;font-size:10px!important}
  .match-final-screen--ranked .match-final-tabs{margin:0 0 6px!important;gap:5px!important}
  .match-final-screen--ranked .match-final-tabs button{min-height:34px!important;font-size:10px!important}
  .match-final-screen--ranked .match-final-tab-panel{min-height:0!important}
  .match-final-screen--ranked .match-final-standings{display:grid!important;gap:4px!important}
  .match-final-screen--ranked .match-final-row{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;gap:6px!important;align-items:center!important;padding:6px 8px!important;border-radius:10px!important;min-height:0!important}
  .match-final-screen--ranked .match-final-row-copy{gap:1px!important}
  .match-final-screen--ranked .match-final-title-line strong{font-size:12px!important;line-height:1.05!important}
  .match-final-screen--ranked .match-final-partners{font-size:8.5px!important;line-height:1.05!important;gap:3px!important}
  .match-final-screen--ranked .ranked-player-results{display:grid!important;gap:0!important;margin-top:1px!important}
  .match-final-screen--ranked .ranked-player-result{font-size:8.5px!important;line-height:1.08!important;white-space:normal!important}
  .match-final-screen--ranked .match-final-row-right{display:grid!important;justify-items:end!important;gap:1px!important;min-width:42px!important}
  .match-final-screen--ranked .match-final-score{font-size:20px!important;line-height:1!important}
  .match-final-screen--ranked .ranked-delta{font-size:12px!important;line-height:1!important}
  .match-final-screen--ranked .ranked-my-result{margin-top:5px!important;padding:6px 8px!important;font-size:9px!important}
  .match-final-screen--ranked .match-final-note{margin:6px 0 1px!important;font-size:10px!important}
  .match-final-screen--ranked .match-final-actions{margin-top:6px!important;gap:5px!important}
  .match-final-screen--ranked .match-final-actions button{min-height:36px!important;margin:0!important;padding:5px 8px!important;font-size:10px!important}
  .match-final-screen--ranked[data-squad-count="5"] .match-final-row{padding:5px 7px!important}
  .match-final-screen--ranked[data-squad-count="5"] .ranked-player-result{font-size:8px!important}
  .match-final-screen--ranked[data-squad-count="5"] .match-final-title-line strong{font-size:11px!important}

  /* Interround becomes a true top-content + bottom-chat layout. */
  .interround-overlay .interround-panel{
    height:calc(var(--kemp-visible-h,100dvh) - 12px)!important;
    max-height:calc(var(--kemp-visible-h,100dvh) - 12px)!important;
    display:flex!important;
    flex-direction:column!important;
    overflow:hidden!important;
    gap:5px!important;
    padding:8px!important;
  }
  .interround-overlay .interround-head{flex:0 0 auto!important}
  .interround-overlay .interround-results{flex:0 0 auto!important;display:grid!important;gap:5px!important;padding:6px!important;min-height:0!important}
  .interround-overlay .interround-result-headline{display:flex!important;align-items:flex-end!important;justify-content:space-between!important;gap:8px!important;flex-wrap:wrap!important}
  .interround-overlay .interround-result-headline .round-result-kicker{font-size:8px!important;line-height:1!important}
  .interround-overlay .interround-result-message{font-size:18px!important;line-height:1.05!important;margin:0!important}
  .interround-overlay .interround-results.no-checked .interround-result-message{font-size:22px!important}
  .interround-overlay .round-delta-line{display:none!important}

  /* Checked cards move up; their block never steals unnecessary height. */
  .interround-overlay .checked-cards{gap:4px!important;padding:5px!important}
  .interround-overlay .checked-cards-title{font-size:8px!important}
  .interround-overlay .checked-player{display:grid!important;grid-template-columns:1fr!important;gap:3px!important}
  .interround-overlay .checked-player-meta strong{font-size:9px!important;line-height:1.05!important;white-space:normal!important}
  .interround-overlay .checked-player-cards{display:flex!important;gap:3px!important;overflow:visible!important;padding:0!important}
  .interround-overlay .checked-player-cards .checked-card{flex:1 1 0!important;min-width:0!important;min-height:48px!important;height:48px!important}

  /* Full score after the round: 2-5 squads, no nested scrolling. */
  .interround-overlay .round-standings{
    width:100%!important;
    max-width:none!important;
    max-height:none!important;
    overflow:visible!important;
    display:grid!important;
    gap:2px!important;
    padding:5px!important;
  }
  .interround-overlay .round-standings-title{font-size:9px!important;margin-bottom:1px!important}
  .interround-overlay .round-standing{min-height:0!important;padding:3px 6px!important;gap:6px!important}
  .interround-overlay .round-standing__team{font-size:10px!important;line-height:1!important}
  .interround-overlay .round-standing__players{font-size:8px!important;line-height:1!important}
  .interround-overlay .round-standing b{font-size:16px!important;line-height:1!important}
  .interround-overlay .round-standings[data-squad-count="5"] .round-standing{padding:2px 5px!important}
  .interround-overlay .round-standings[data-squad-count="5"] .round-standing__players{font-size:7.5px!important}

  .interround-overlay .interround-signal-line{flex:0 0 auto!important;padding:5px 7px!important}

  /* Chat sits at the bottom even with little content. */
  .interround-overlay .interround-chat{
    flex:0 0 auto!important;
    margin-top:auto!important;
    display:flex!important;
    flex-direction:column!important;
    min-height:92px!important;
    max-height:142px!important;
    overflow:hidden!important;
    padding-top:0!important;
  }
  .interround-overlay .interround-chat-title{flex:0 0 auto!important;font-size:9px!important}
  .interround-overlay .interround-message-list{flex:1 1 auto!important;min-height:42px!important;height:auto!important;max-height:74px!important;overflow-y:auto!important}
  .interround-overlay .interround-chat-form{
    flex:0 0 auto!important;
    position:static!important;
    display:grid!important;
    grid-template-columns:minmax(0,1fr) auto!important;
    gap:5px!important;
    margin-top:4px!important;
    padding:0!important;
    background:#123a2d!important;
  }
  .interround-overlay .interround-chat-form input{min-height:40px!important;height:40px!important;font-size:16px!important}
  .interround-overlay .interround-chat-form button{min-height:40px!important;height:40px!important;margin:0!important}

  /* Keyboard: composer stays at the visual viewport bottom, never half way up. */
  body.kemp-focus-mode .interround-overlay .interround-panel,
  body.kemp-keyboard-open .interround-overlay .interround-panel{
    padding:8px 8px 58px!important;
    overflow:hidden!important;
  }
  body.kemp-focus-mode .interround-overlay .interround-chat,
  body.kemp-keyboard-open .interround-overlay .interround-chat{margin-top:auto!important;min-height:72px!important;max-height:110px!important}
  body.kemp-focus-mode .interround-overlay .interround-chat-form,
  body.kemp-keyboard-open .interround-overlay .interround-chat-form{
    position:fixed!important;
    left:calc(var(--kemp-vleft,0px) + 8px)!important;
    top:auto!important;
    bottom:8px!important;
    transform:none!important;
    width:calc(var(--kemp-vw,100vw) - 16px)!important;
    height:48px!important;
    min-height:48px!important;
    z-index:1500!important;
    padding:4px!important;
    border:1px solid rgba(240,200,108,.72)!important;
    border-radius:11px!important;
    box-shadow:0 8px 24px rgba(0,0,0,.38)!important;
  }

  /* Signal-change proposal becomes a small status block, not a half-screen card. */
  .interround-overlay .interround-proposal-active{padding:6px 8px!important;display:grid!important;grid-template-columns:auto minmax(0,1fr)!important;align-items:center!important;gap:3px 7px!important}
  .interround-overlay .interround-proposal-active .agreement-current-label{grid-column:1!important;font-size:9px!important}
  .interround-overlay .interround-proposal-active .signal-preview{grid-column:2!important;margin:0!important;min-height:0!important;padding:0!important;border:0!important;background:transparent!important;justify-content:flex-start!important}
  .interround-overlay .interround-proposal-active .signal-preview-item{min-height:34px!important;padding:2px 7px!important}
  .interround-overlay .interround-proposal-active .signal-preview-item.emoji{font-size:28px!important;min-width:40px!important}
  .interround-overlay .interround-proposal-active .agreement-wait{grid-column:1/-1!important;margin:0!important;font-size:10px!important;line-height:1.1!important}
  .interround-overlay .interround-proposal-active>button{grid-column:1/-1!important;min-height:34px!important;margin:2px 0 0!important}
  .interround-overlay .interround-private-note,.interround-overlay .interround-current-signal,.interround-overlay .interround-changing-banner{padding:5px 7px!important;font-size:9px!important;line-height:1.15!important}

  /* Live score labels must say “Отряд”, not just bare numbers; still fit 5 squads. */
  .game-view .network-scores .score-team-name::after{font-size:7.8px!important;white-space:nowrap!important}
  .game-view .network-scores[data-squad-count="5"] .score-team .team-mark{width:12px!important;height:14px!important;flex-basis:12px!important}
  .game-view .network-scores[data-squad-count="5"] .score-team-name::after{font-size:6.8px!important}
  .game-view .network-scores[data-squad-count="5"] .score>b{font-size:12px!important}
}

/* PASS16 fine-tuning after device screenshots. */
@media(max-width:520px){
  .interround-overlay .interround-result-headline{display:grid!important;justify-content:stretch!important;align-items:start!important;gap:3px!important}
  .interround-overlay .interround-results.no-checked .round-standing{padding:5px 7px!important}
  .interround-overlay .interround-results.no-checked .round-standing__team{font-size:12px!important}
  .interround-overlay .interround-results.no-checked .round-standing__players{font-size:9px!important}
  .interround-overlay .interround-results.no-checked .round-standing b{font-size:19px!important}
  body.kemp-focus-mode .interround-overlay .interround-chat-form,
  body.kemp-keyboard-open .interround-overlay .interround-chat-form{
    top:calc(var(--kemp-vtop,0px) + var(--kemp-visible-h,100dvh) - 8px)!important;
    bottom:auto!important;
    transform:translateY(-100%)!important;
  }
}

/* KEMP BETA 0.9 */
.network-header{position:relative}
.beta-badge{position:absolute;right:12px;top:8px;display:inline-flex;align-items:center;justify-content:center;min-height:24px;padding:3px 8px;border:1px solid rgba(224,183,88,.65);border-radius:999px;background:rgba(18,57,43,.92);color:#f1cf78;font-size:10px;font-weight:800;letter-spacing:.12em;white-space:nowrap}
.beta-notice{margin:8px 0 12px;padding:10px 12px;border:1px solid rgba(224,183,88,.55);border-radius:12px;background:rgba(224,183,88,.09);color:#f3dfaa;font-size:13px;line-height:1.35}
.beta-auth-footnote{margin:10px 2px 0;font-size:11px;line-height:1.35;text-align:center}
@media(max-width:520px){.beta-badge{right:8px;top:4px;font-size:9px;min-height:22px;padding:2px 7px}.auth-view .network-header{min-height:78px}.auth-card .beta-notice{font-size:12px}}


/* === BETA 0.9.1 render hotfix: prevent iOS/Safari black flash on fast game actions === */
body.game-body,
body.game-body main.game-view,
body.game-body .game-shell{background:#10241e}
.game-view .network-arena{
  background-color:#123a2d;
  -webkit-backface-visibility:hidden;
  backface-visibility:hidden;
  transform:translateZ(0);
  will-change:transform;
}

/* === BETA 0.9.2 PWA safe-area fix: standalone iPhone keeps the same visual top spacing as Safari. === */
@media (display-mode: standalone) and (max-width:520px){
  main.auth-view,
  main.home-view,
  main.gathering-view,
  main.signal-view{
    padding-top:max(8px,env(safe-area-inset-top))!important;
  }

  /* Keyboard/focus rules later in the cascade previously replaced the top safe-area padding. */
  body.kemp-focus-mode main.auth-view,
  body.kemp-focus-mode main.home-view,
  body.kemp-focus-mode main.gathering-view,
  body.kemp-focus-mode main.signal-view,
  body.kemp-keyboard-open main.home-view,
  body.kemp-keyboard-open main.gathering-view,
  body.kemp-keyboard-open main.signal-view{
    padding-top:max(4px,env(safe-area-inset-top))!important;
  }

  /* The active table already respected safe-area-inset-top; keep an explicit standalone floor. */
  body.game-body main.game-view{
    padding-top:max(4px,env(safe-area-inset-top))!important;
  }
}

