/* Viewport-sized shell. Content remains scrollable for zoom, keyboards and expanded rules. */
.online-mode{height:var(--app-height,100dvh);overflow:hidden}
.online-mode .demo-tools{height:40px;min-height:40px;margin:0 auto;padding:2px 10px}
.online-mode .demo-tools select{min-height:32px}
.online-mode .phone{container-type:inline-size;height:calc(var(--app-height,100dvh) - 40px);max-height:940px;min-height:0;margin:0 auto;border-radius:20px;display:flex;flex-direction:column}
.online-mode .prototype-label{display:none}
.online-mode .phone:not(.is-game) .app-header{height:60px;min-height:60px;padding:6px 14px;flex:none}
.online-mode .phone:not(.is-game) #main{min-height:0;flex:1;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#bacbd3 transparent;padding:8px 12px 12px}
.online-mode .phone:not(.is-game) .nav{position:static;min-height:60px;height:60px;flex:none;padding-bottom:env(safe-area-inset-bottom,0px);box-sizing:content-box}
.online-mode .phone .nav.hidden{display:none}
.online-mode .phone:not(.is-game) .nav button{font-size:12px;min-height:54px;gap:3px}
.online-mode .phone:not(.is-game) .nav svg{width:21px;height:21px}
.online-mode .phone:not(.is-game) h1{font-size:22px;line-height:1.2;letter-spacing:-.5px}
.online-mode .phone:not(.is-game) .surface{padding:12px;margin-bottom:10px}
.online-mode .phone:not(.is-game) .primary,.online-mode .phone:not(.is-game) .secondary{min-height:44px;font-size:15px}
.online-mode .phone:not(.is-game) .creation-title{margin:0 0 9px}
.online-mode .phone:not(.is-game) .compact-create{padding:10px 12px}
.online-mode .compact-create .stake-field{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0}
.online-mode .compact-create .stake-field>span{font-size:15px;white-space:nowrap}
.online-mode .compact-create .stake-field small{display:block;font-size:12px;font-weight:400}
.online-mode .compact-create .stake-field input{width:146px;min-height:44px;height:44px;font-size:24px;text-align:right;padding:5px 11px}
.online-mode .compact-create .stake-presets{gap:6px;margin:6px 0 8px}
.online-mode .compact-create .stake-presets button{min-height:40px;font-size:14px}
.online-mode .compact-create .create-error:empty{display:none}
.online-mode .compact-create>fieldset{display:grid;grid-template-columns:64px minmax(0,1fr);align-items:center;padding:0;border:0;margin:0 0 8px;min-width:0}
.online-mode .compact-create>fieldset legend{float:left;width:64px;margin:0;font-size:13px;line-height:1.3}
.online-mode .compact-create .segments{display:flex;min-width:0;width:100%;grid-column:2;border-radius:7px}
.online-mode .compact-create .segments label{flex:1;min-width:0}
.online-mode .compact-create .segments span{padding:0 5px;min-height:44px;font-size:13px;letter-spacing:0}
.online-mode .compact-create .compact-advanced{margin:0 0 8px;padding:0 9px}
.online-mode .compact-advanced summary{min-height:44px;font-size:14px}
.online-mode .compact-advanced summary small{display:flex;gap:5px;align-items:center;font-size:12px}
.online-mode .compact-advanced summary svg{width:14px;height:14px}
.online-mode .compact-advanced[open] summary svg{transform:rotate(90deg)}
.online-mode .compact-advanced fieldset{margin:0 0 10px;padding:0;border:0;min-width:0}
.online-mode .compact-advanced legend{margin-bottom:4px;font-size:13px}
.online-mode .compact-create .create-footer{display:grid;grid-template-columns:minmax(0,1fr) 76px;gap:8px}
.online-mode .compact-create .create-footer>.primary{position:static;min-height:46px;box-shadow:none}
.online-mode .compact-create .cost-link{display:flex;flex-direction:column;align-items:center;justify-content:center;font-size:16px;min-height:46px;line-height:1.15;text-decoration:none;border:1px solid #d3dde3;border-radius:7px}
.online-mode .compact-create .cost-link small{display:block;font-size:11px;color:#64747d;margin-top:3px}
.online-mode .compact-create .creation-note{margin-top:7px;font-size:11px;line-height:1.35}
.online-mode .phone[data-page=home] .account-panel{min-height:72px;margin:0 0 10px;padding:0 0 10px}
.online-mode .phone[data-page=home] .account-panel .avatar{width:50px;height:54px}
.online-mode .phone[data-page=home] .account-record{margin-top:4px}
.online-mode .phone[data-page=home] .menu-grid{margin-top:10px}
.online-mode .phone[data-page=home] .menu-cell{min-height:90px;padding:10px 13px;gap:4px}
.online-mode .phone[data-page=home] .menu-cell>.menu-icon svg{height:23px;width:23px}
.online-mode .phone[data-page=home] .accepted-state-note{margin-top:12px;font-size:12px;line-height:1.5}
.online-mode .phone:not(.is-game) .accepted-invite{padding:10px;margin:0 0 10px;min-height:62px}
.online-mode .phone[data-page=game-result] .result-intro{padding:0 0 8px;grid-template-columns:46px 1fr;gap:3px 10px}
.online-mode .phone[data-page=game-result] .result-intro .club-portrait{height:46px;width:46px}
.online-mode .phone[data-page=game-result] .result-intro h1{font-size:22px}
.online-mode .phone[data-page=game-result] .result-rules{padding:7px 0;font-size:12px}
.online-mode .phone[data-page=game-result] .result-placements{margin:9px 0}
.online-mode .phone[data-page=game-result] .result-player{min-height:52px;padding:7px 10px;gap:8px}
.online-mode .phone[data-page=game-result] .result-player .club-portrait{height:36px;width:33px}
.online-mode .phone[data-page=game-result] .result-player strong{font-size:14px}
.online-mode .phone[data-page=game-result] .result-player small{font-size:11px;margin-top:2px}
.online-mode .phone[data-page=game-result] .online-settlement{padding:10px!important;margin-bottom:9px!important}
.online-mode .phone[data-page=game-result] .online-settlement small{margin-top:5px;font-size:11px}
.online-mode .phone[data-page=game-result] .result-actions{grid-template-columns:1fr 1fr;gap:8px;margin-top:8px}
.online-mode .phone[data-page=game-result] .result-actions>.primary{grid-column:1/-1}
.online-mode .phone[data-page=game-result] .result-actions>.text-action{border:1px solid #ffffff75;border-radius:8px}
.online-mode .phone[data-page=game-result] .result-note{margin-top:8px;font-size:11px}
.online-mode .phone[data-page=waiting] .surface{padding:10px}
.online-mode .phone[data-page=waiting] .surface h2{font-size:21px}
.online-mode .phone[data-page=waiting] .summary{margin:7px 0;gap:6px;font-size:13px}
.online-mode .phone[data-page=waiting] .online-cost{margin-top:7px;padding-top:7px;gap:2px}
.online-mode .phone[data-page=waiting] .online-cost small{display:none}
.online-mode .phone[data-page=waiting] .online-room-id{margin-top:5px;font-size:10px}
.online-mode .phone[data-page=waiting] .block-heading{margin:8px 0 6px}
.online-mode .phone[data-page=waiting] .waiting-person{min-height:50px;padding:6px 10px;gap:9px}
.online-mode .phone[data-page=waiting] .waiting-person .avatar{height:34px;width:34px}
.online-mode .phone[data-page=waiting] .waiting-person small{font-size:11px}
.online-mode .phone[data-page=waiting] .online-wait-actions{grid-template-columns:1fr 1fr;gap:8px;margin:8px 0}
.online-mode .phone[data-page=waiting] .online-wait-actions button{font-size:12px;padding:5px;min-height:44px}
.online-mode .phone[data-page=waiting] .subtle-note{font-size:11px;line-height:1.4;margin:6px 0 0}
.online-mode .phone[data-page=profile] .profile-compact{padding:10px;margin-bottom:10px}
.online-mode .phone[data-page=profile] .profile-compact>.club-portrait{width:48px;height:52px;flex:none}
.online-mode .phone[data-page=profile] .profile-compact h1{overflow-wrap:anywhere}
.online-mode .phone[data-page=profile] .money{font-size:26px;line-height:1.2;margin:5px 0 9px}
.online-mode .phone[data-page=profile] .surface>.detail-label{font-size:12px}
.online-mode .phone[data-page=profile] .profile-menu+.profile-menu{margin-top:8px}
.online-mode .phone[data-page=profile] .profile-menu .route{padding:7px 10px;min-height:54px}
.online-mode .phone[data-page=profile] .profile-menu .route small{margin-top:2px;font-size:11px}
.online-mode .phone[data-page=profile] .profile-menu .route-symbol{height:30px;width:30px}
.online-mode .phone:not(.is-game) .page-heading{margin:0 0 9px}
.online-mode .phone:not(.is-game) .room-filters{margin-bottom:9px;gap:5px;flex-wrap:nowrap}
.online-mode .room-filters button{min-height:44px;padding-inline:9px!important}
.online-mode .phone:not(.is-game) .room-line{min-height:84px;padding:10px;grid-template-columns:62px minmax(0,1fr) 76px;gap:7px}
.online-mode .phone:not(.is-game) .room-speed{margin-top:3px}
.online-mode .phone:not(.is-game) .lobby-finance-note{padding:8px;margin-top:8px;font-size:11px}
.online-mode .phone:not(.is-game) .event-row{padding:9px;min-height:68px}
.online-mode .phone:not(.is-game) .op-row{padding:8px 0;min-height:56px;font-size:13px}
.online-mode .phone:not(.is-game) .op-row small{font-size:11px}
.online-mode .phone:not(.is-game) .op-row{width:100%;text-align:left;justify-content:space-between}
.online-mode .op-row .grow,.online-mode .record-info{min-width:0}
.online-mode .op-row>strong,.online-mode .event-row .outcome{flex-shrink:0;white-space:nowrap;font-size:14px;font-weight:700}
.online-mode .op-row:first-child{border-top:0}
.online-mode .list-pagination{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:8px 0;color:#fff;font-size:12px}
.online-mode .list-pagination button{min-height:44px;min-width:74px;background:#fff;border-radius:7px;color:#b82e49;padding:6px 10px}
.online-mode .list-pagination button:disabled{opacity:.55}
.online-mode .wallet-more{display:block;width:100%;margin:7px 0;min-height:44px}
.online-mode .phone:not(.is-game) .schema-note{font-size:11px;line-height:1.5;margin:8px 0}
@media(max-width:480px){.online-mode .phone,.online-mode .phone.is-game{height:calc(var(--app-height,100dvh) - 40px);max-height:none;border-radius:0}.online-mode .demo-tools{min-height:40px;height:40px}.online-mode .is-game .game-screen{height:100%}}
.telegram-mode .demo-tools{display:none!important}.online-mode.telegram-mode .phone,.online-mode.telegram-mode .phone.is-game{height:var(--app-height,100dvh)}
@container(max-width:350px){.online-mode .compact-create>fieldset:has([name=players]){display:block}.online-mode .compact-create>fieldset:has([name=players]) legend{float:none;width:auto;margin-bottom:3px}}
@media(max-height:690px){.online-mode .phone:not(.is-game) .app-header{height:54px;min-height:54px}.online-mode .phone:not(.is-game) .nav{height:54px;min-height:54px}.online-mode .phone:not(.is-game) .nav button{min-height:50px}.online-mode .phone[data-page=home] .menu-cell{min-height:80px}.online-mode .phone[data-page=profile] .profile-menu .route{min-height:48px}.online-mode .phone[data-page=profile] .profile-menu .route small{display:none}.online-mode .phone[data-page=waiting] .subtle-note{margin-top:4px}}
@media(prefers-reduced-motion:reduce){.online-mode *{scroll-behavior:auto!important}}

.prize-preview{width:100%}.prize-preview summary{cursor:pointer;min-height:32px;display:flex;align-items:center}.prize-preview>div{display:grid;grid-template-columns:1fr;gap:8px}.prize-preview>div>span{display:flex;justify-content:space-between;gap:6px}.prize-preview small{display:block;margin-top:8px}

.balance-ton{display:block;font-size:12px;line-height:1.35;font-weight:400;color:var(--muted);text-align:inherit}

/* Mobile flow audit: one visual system, compact real data, explicit states. */
.online-mode .home-overview{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));border-block:1px solid #ffffff38;padding:12px 0;margin:10px 0 16px;color:#f4f8fa}.home-overview>span+span{border-left:1px solid #ffffff38;padding-left:12px}.home-overview strong{display:block;font-size:22px;line-height:1.2}.home-overview small{display:block;font-size:11px;line-height:1.35;margin-top:4px;color:#e5eff4}.home-section-title{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-bottom:8px;color:#f4f8fa}.home-section-title h2{font-size:17px;margin:0;color:inherit}.home-section-title small{font-size:11px;color:#e5eff4}.home-tools{display:grid;grid-template-columns:1fr 1fr;margin-top:12px;border:1px solid #ffffff38;border-radius:10px;overflow:hidden}.home-tools .menu-cell{min-height:86px}.home-tools .menu-cell+.menu-cell{border-left:1px solid #ffffff38}.online-mode .phone[data-page=home] .account-panel{padding-bottom:8px}.online-mode .home-tools .menu-cell strong{font-size:15px}.online-mode .home-tools .menu-cell small{font-size:12px}.online-mode .room-list-unified .room-line{height:84px;min-height:84px;grid-template-columns:38px minmax(0,1fr) 78px;gap:9px;padding:10px}.online-mode .room-line .seat-pair{display:block;align-self:center}.online-mode .room-line .seat-avatar{width:34px;height:38px}.online-mode .room-line .room-description{min-width:0}.online-mode .room-description>strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.online-mode .room-more{display:inline;font-size:12px;font-weight:400}.online-mode .room-speed{font-size:11px;white-space:nowrap}.online-mode .room-right strong{font-size:16px;white-space:nowrap}.online-mode .room-right>span{font-size:12px}.online-mode .waiting-seats[data-players="4"],.online-mode .waiting-seats[data-players="5"],.online-mode .waiting-seats[data-players="6"]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.online-mode .waiting-seats[data-players="4"] .waiting-person,.online-mode .waiting-seats[data-players="5"] .waiting-person,.online-mode .waiting-seats[data-players="6"] .waiting-person{min-height:64px;display:grid;grid-template-columns:30px minmax(0,1fr);gap:6px;padding:8px}.online-mode .waiting-seats[data-players="4"] .waiting-person>span:last-child,.online-mode .waiting-seats[data-players="5"] .waiting-person>span:last-child,.online-mode .waiting-seats[data-players="6"] .waiting-person>span:last-child{grid-column:1/-1;font-size:11px;padding:0;background:transparent}.online-mode .waiting-seats .club-portrait{width:30px;height:32px}.online-mode .waiting-seats .grow{min-width:0}.online-mode .waiting-seats strong{display:block;font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.online-mode .waiting-seats .empty-seat{display:flex!important;justify-content:center;flex-direction:column;align-items:flex-start;gap:4px}.online-mode .waiting-seats .empty-seat .grow{flex:none}.waiting-ruleline{font-size:12px;margin:8px 0 0;color:#49677a}.stake-unit{font-size:12px;font-weight:400}.form-error{font-size:13px;color:#a3263c;line-height:1.35;margin:6px 0}.form-error:empty{display:none}.online-mode #stakeError:not(:empty){display:block;margin:7px 0}.online-mode [aria-invalid=true]{border-color:#a3263c!important;outline:2px solid #a3263c33;outline-offset:1px}.page-connection{margin:0 0 9px;padding:9px 10px;border-radius:6px;background:#243f50;color:#f4f8fa;font-size:13px}.online-status button{pointer-events:auto;min-height:44px;border:1px solid #ffffff66;border-radius:6px;padding:6px 10px;background:#fff;color:#263744;margin-left:6px}.online-mode .game-guidance{color:#f4f8fa}.online-mode .game-guidance small{color:#e5eff4}.help-rules summary{min-height:44px;padding:10px 0;border-bottom:1px solid #d5dfe3;font-weight:600;cursor:pointer}.help-rules p{margin:10px 0;font-size:14px;line-height:1.5}.help-timer-note{font-size:12px!important;color:#49677a}.online-mode .lobby-finance-note{font-size:12px;color:#e5eff4}.online-mode .room-filters button{font-size:12px!important}.online-mode .room-filters button[aria-pressed=false]{color:#385565}.online-mode .room-filters button[aria-pressed=true]{color:#fff}.online-mode .compact-create input:focus-visible,.online-mode .phone button:focus-visible,.online-mode .phone summary:focus-visible,.online-mode .phone input:focus-visible{outline:3px solid #123042;outline-offset:2px}.online-mode .compact-create .stake-presets button{min-height:44px}.online-mode .compact-create .segment label{min-height:44px}
@media(max-height:720px){.online-mode .home-overview{padding:9px 0;margin:8px 0 12px}.online-mode .home-tools .menu-cell{min-height:72px}.online-mode .home-overview strong{font-size:20px}.online-mode .phone[data-page=home] .account-panel{padding-bottom:4px}.online-mode .home-tables .room-line{height:78px;min-height:78px}.online-mode .waiting-seats .waiting-person{min-height:54px!important}.online-mode .home-tools{margin-top:8px}}

+:root{--blue:#c9344e}.online-mode .phone .primary,#sheet .primary,.online-mode .phone .segments input:checked+span,.online-mode .phone .stake-presets button.selected,.online-mode .phone .room-filters button[aria-pressed=true]{background:#c9344e;color:#fff}.online-mode #main .room-speed,.online-mode #main .room-description>small{color:#49677a;font-size:12px}.online-mode #main .home-overview small,.online-mode #main .home-section-title small,.online-mode #main .account-record,.online-mode #main .accepted-state-note,.online-mode #main .lobby-finance-note,.online-mode .phone .balance small{color:#fff;opacity:1}.online-mode #main .accepted-state-note{font-size:12px}.online-mode .phone .game-guidance,.online-mode .phone .game-guidance small{color:#fff}
+@media(max-width:350px){.online-mode #main .room-speed{white-space:normal;line-height:1.2}.online-mode .room-list-unified .room-line{grid-template-columns:32px minmax(0,1fr) 66px;gap:7px;padding:9px}.online-mode .room-line .room-right strong{font-size:15px}}
+
.online-mode ::selection,#sheet ::selection{background:#f4c9d1;color:#263744}.online-mode input,.online-mode textarea,#sheet input,#sheet textarea{caret-color:#a3263d}

.online-mode .game-screen:has(.hand-clear) .game-guidance{padding-left:12px;padding-right:116px;text-align:left}.online-mode .game-screen .hand-clear{min-height:44px;color:#294454}.online-mode .game-screen:has(.hand-clear) .game-guidance small{line-height:1.3}
