/* Shared game shell. Boards keep their own artwork; controls share one layout. */
:root{--table-ui:#1b302b;--table-ui-2:#29443c;--table-line:#829a88;--table-ink:#f6ecd5;--table-gold:#d4b57b}
@media(min-width:761px){
 body[data-audio-theme] .match-layout{gap:clamp(14px,2vw,28px);align-items:start}
 body[data-audio-theme] .match-panel{position:sticky;top:12px;max-height:calc(100dvh - 24px);overflow:auto;scrollbar-width:thin;gap:10px}
 body[data-audio-theme] .match-panel .panel{padding:14px}
 body[data-audio-theme] .match-panel .history-tools{display:flex;flex-wrap:wrap;gap:6px}
 body[data-audio-theme] .lesson-dock{min-height:0!important;padding:3px 8px!important;margin:4px auto!important;max-width:1120px!important}
 body[data-audio-theme] .lesson-dock button{min-height:38px!important;padding:5px 12px!important;font-size:13px!important}
 body[data-audio-theme] .introduction{display:flex;align-items:center;justify-content:center;padding:8px 0!important;min-height:0!important}
 body[data-audio-theme] .introduction h1{font-size:clamp(24px,2.5vw,34px)!important;margin:0!important;line-height:1.1}
 body[data-audio-theme] .introduction :is(.eyebrow,p:last-child),body[data-audio-theme] .introduction::after{display:none}
 .sds-page .garden-masthead{min-height:0!important;height:auto!important;margin:0!important;padding:5px 10px!important}
 .sds-page .garden-masthead h1{font-size:26px!important;margin:0!important;line-height:1.1}
 .sds-page .garden-masthead :is(.edition-label,.masthead-subtitle,.masthead-ornament){display:none!important}
 .sds-page .game-layout{display:grid!important;grid-template-columns:minmax(0,720px) minmax(275px,340px)!important;gap:16px!important;justify-content:center;align-items:start}
 .sds-page .game-layout>.mobile-board-viewport{display:block!important;grid-column:1;grid-row:1;width:100%}
 .sds-page .game-layout>.game-sidebar{grid-column:2;grid-row:1;width:100%!important;max-height:calc(100dvh - 100px);overflow:auto}
 .sds-page .game-layout>.inventory-sidebar{grid-column:2;grid-row:2;width:100%!important;max-height:240px;overflow:auto}
}
@media(max-width:760px){
 html:has(body.phone-game-shell){height:100dvh;overflow:hidden}
 body.phone-game-shell{height:100dvh;overflow:hidden;color:var(--table-ink)}
 body.phone-game-shell :is(.player-appbar,.site-header,.collection-header,.garden-masthead){display:none!important}
 body.phone-game-shell :is(.lesson-dock,.collection-audio,.mobile-disclosure){display:none}
 body.phone-game-shell .phone-options-list :is(.lesson-dock,.collection-audio,.mobile-disclosure){display:block}
 body.phone-game-shell :is(footer,.site-footer,.piece-guide,.go-summary,.captures){display:none}
 body.phone-game-shell main{height:calc(100dvh - var(--phone-top,44px));min-height:0;overflow:hidden;padding:0 5px!important}
 body.phone-game-shell .introduction{display:none!important}
 body.phone-game-shell .match-layout{display:block!important;height:100%;max-width:none;overflow:hidden;margin:0 auto}
 body.phone-game-shell .play-area{display:flex;flex-direction:column;gap:2px;height:100%;min-width:0;max-width:none;margin:0;overflow:hidden}
 body.phone-game-shell .phone-table-bar{display:flex;align-items:center;gap:4px;box-sizing:border-box;height:44px;min-height:44px;padding:3px 6px;background:var(--table-ui);border-bottom:1px solid var(--table-line);color:var(--table-ink);font:600 12px/1.1 system-ui;z-index:50}
 body.phone-game-shell .phone-game-name{min-width:0;max-width:95px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font:700 12px/1.1 system-ui;color:var(--table-gold)}
 body.phone-game-shell .phone-table-bar button{flex:0 1 auto;min-width:0;height:36px!important;min-height:36px!important;max-height:36px!important;margin:0!important;padding:2px 7px!important;border:1px solid var(--table-line)!important;border-image:none!important;border-radius:5px!important;background:var(--table-ui-2)!important;color:var(--table-ink)!important;box-shadow:none!important;text-shadow:none!important;font:600 12px/1.1 system-ui!important;white-space:nowrap}
 body.phone-game-shell .phone-table-bar button[hidden]{display:none!important}
 body.phone-game-shell .phone-table-bar .phone-options-toggle{margin-left:auto!important;background:#765638!important}
 body.phone-game-shell .play-area>.turn-panel{order:0;flex:0 0 auto;min-height:31px;max-height:44px;overflow:hidden;margin:0!important;padding:3px 8px!important;border:1px solid var(--table-line)!important;border-image:none!important;border-radius:3px!important;background:var(--table-ui)!important;box-shadow:none!important;color:var(--table-ink)!important}
 body.phone-game-shell .play-area>.turn-panel :is(.eyebrow,#connection-status,.fine-print){display:none!important}
 body.phone-game-shell .play-area>.turn-panel h2{margin:0!important;font:600 14px/1.35 system-ui!important;color:var(--table-ink)!important}
 body.phone-game-shell .play-area>.turn-panel #notice:not([hidden]){font:12px/1.2 system-ui;margin:0}
 body.phone-game-shell .play-area>.player-strip{flex:0 0 auto;min-height:32px!important;max-height:37px;padding:2px 7px!important;margin:0!important;gap:5px;border-radius:3px}
 body.phone-game-shell .player-strip :is(.player-mark,.go-mark){width:20px;height:20px;flex:none}
 body.phone-game-shell .player-strip strong{font:600 13px/1.2 system-ui!important}
 body.phone-game-shell .player-strip small{display:none!important}
 body.phone-game-shell .player-strip .army-count{font:11px/1.1 system-ui!important;white-space:nowrap}
 body.phone-game-shell .play-area>.player-strip:has(#court-2),body.phone-game-shell .play-area>#strip-2{order:1}
 body.phone-game-shell .play-area>.player-strip:has(#court-1),body.phone-game-shell .play-area>#strip-1{order:3}
 body.phone-game-shell .mobile-board-viewport{order:2;display:flex;align-items:center;justify-content:center;flex:1 1 0!important;min-height:0!important;width:100%;margin:0!important;overflow:auto;touch-action:pan-y pinch-zoom}
 body.phone-game-shell .mobile-board-viewport.is-detailed{display:block;touch-action:pan-x pan-y pinch-zoom}
 body.phone-game-shell .mobile-board-surface{flex:none;width:var(--phone-fit-width,100%)!important;margin:auto}
 body.phone-game-shell .mobile-board-viewport.is-detailed .mobile-board-surface{width:var(--mobile-board-width)!important}
 body.phone-game-shell .mobile-board-surface>:is(.mini-board-frame,.board-shell,#board-wrapper){width:100%!important;margin:0!important;padding:0!important}
 body.phone-game-shell .board-tools{order:6;flex:0 0 auto;min-height:36px;margin:0!important;padding:0}
 body.phone-game-shell .board-tools>span{display:none}
 body.phone-game-shell .board-tools button{min-height:34px!important;padding:2px 6px!important;font-size:11px!important}
 body.phone-game-shell .play-area>.mobile-selection{order:5;flex:0 0 auto;min-height:0;margin:0!important;padding:3px 7px!important;border:1px solid var(--table-line)!important;border-image:none!important;background:var(--table-ui)!important;color:var(--table-ink)!important}
 body.phone-game-shell .mobile-selection :is(h2,.fine-print){display:none!important}
 body.phone-game-shell .mobile-selection .selection-detail{min-height:0;max-height:26px;overflow:hidden;margin:0;font:12px/1.2 system-ui}
 body.phone-game-shell .mobile-lesson-picker{order:5;flex:0 0 auto;margin:0;padding:2px 4px}
 body.phone-game-shell .play-area>.mobile-go-actions{order:7;position:static;flex:0 0 auto;margin:0;padding:2px 0;background:var(--table-ui)}
 body.phone-game-shell .mobile-go-actions :is(#pass-button,#shield-button){display:none}
 body.phone-game-shell .mobile-go-actions button{min-height:34px!important;font-size:11px!important}
 body.phone-game-shell .mobile-board-tools{display:none}
 body.phone-game-shell .phone-options-drawer{display:none!important;position:fixed;inset:auto 0 0;z-index:100;max-height:min(56dvh,470px);overflow:hidden;padding:0;background:var(--table-ui);border-top:2px solid var(--table-gold);box-shadow:0 -8px 28px #0009}
 body.phone-game-shell.phone-options-open .phone-options-drawer{display:flex!important;flex-direction:column}
 body.phone-game-shell .phone-options-head{display:flex;align-items:center;justify-content:space-between;flex:none;min-height:45px;padding:4px 12px;background:var(--table-ui-2);color:var(--table-ink);font:600 15px system-ui}
 body.phone-game-shell .phone-options-head button{min-height:35px;padding:3px 12px;border:1px solid var(--table-line);background:#765638;color:white;border-radius:5px;font:600 12px system-ui}
 body.phone-game-shell .phone-options-list{overflow:auto;overscroll-behavior:contain;padding:5px 9px calc(10px + env(safe-area-inset-bottom))}
 body.phone-game-shell .phone-options-list .phone-language-control{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:8px 3px;color:var(--table-ink);font:600 12px system-ui}
 body.phone-game-shell .phone-options-list .phone-language-control select{min-height:35px;padding:3px 8px;border:1px solid var(--table-line);border-radius:4px;background:var(--table-ui-2);color:var(--table-ink);font:600 12px system-ui}
 body.phone-game-shell .phone-options-list .mobile-disclosure{margin:3px 0}
 body.phone-game-shell .phone-options-list .mobile-disclosure>summary{min-height:38px;padding:5px 9px;font:600 13px system-ui}
 body.phone-game-shell .phone-options-list .mobile-board-tools{display:flex;flex-wrap:wrap;margin:3px 0}
 body.phone-game-shell .phone-options-list .mobile-board-tools button{flex:1;min-width:75px;min-height:35px}
 body.phone-game-shell .phone-options-list .mobile-board-hint{display:block;flex-basis:100%}
 body.phone-game-shell .phone-options-list :is(.captures,.piece-guide,.go-summary){display:block}
 body.phone-game-shell .phone-options-list :is(button,select){min-height:35px;padding:3px 8px;font-size:12px}
 body.phone-game-shell .phone-options-list .game-sidebar{display:block!important;width:100%!important;max-height:none;overflow:visible}
 body.phone-game-shell .phone-options-list .game-sidebar>div{margin:4px 0;padding:8px!important}
 body.phone-game-shell .phone-options-list .collection-audio{margin:3px 0!important}
 body.phone-game-shell.hikoro-site #hikoro-game-wrapper{display:flex;flex-direction:column;height:calc(100dvh - var(--phone-top,44px));overflow:hidden;padding:0 5px!important;gap:2px}
 body.phone-game-shell.hikoro-site #hikoro-game-wrapper .hikoro-match-heading,
 body.phone-game-shell.hikoro-site #hikoro-game-wrapper>.mobile-hikoro-actions{display:none}
 body.phone-game-shell.hikoro-site #hikoro-game-wrapper>.mobile-hikoro-status{order:0;flex:none;min-height:26px;margin:0;padding:3px 8px;background:var(--table-ui);border:1px solid var(--table-line);border-radius:3px;color:var(--table-ink);font:600 14px/1.2 system-ui}
 body.phone-game-shell.hikoro-site #black-captured-area{order:1}
 body.phone-game-shell.hikoro-site #white-captured-area{order:3}
 body.phone-game-shell.hikoro-site #hikoro-game-wrapper>.mobile-board-viewport{order:2;flex:1 1 0!important;min-height:0}
 body.phone-game-shell.hikoro-site #board-container{--square-size:calc((var(--mobile-board-width) - 10px)/11.5);width:var(--mobile-board-width)}
 body.phone-game-shell.hikoro-site #hikoro-game-wrapper .captured-area{flex:none;width:100%!important;padding:2px 5px!important;margin:0!important;border-width:2px!important;border-image:none!important}
 body.phone-game-shell.hikoro-site #hikoro-game-wrapper .captured-area h3{font:600 11px/1.1 system-ui!important;margin:0!important}
 body.phone-game-shell.hikoro-site .captured-pieces-box{min-height:25px!important;max-height:32px;overflow-x:auto}
 body.phone-game-shell.sds-page .game-layout{display:flex!important;flex-direction:column;height:calc(100dvh - var(--phone-top,44px));overflow:hidden;padding:0 5px!important;gap:2px}
 body.phone-game-shell.sds-page .game-layout>.mobile-garden-status{order:0;flex:none;min-height:32px;max-height:64px;overflow:hidden;padding:2px 5px!important;border:1px solid var(--table-line);background:var(--table-ui)}
 body.phone-game-shell.sds-page .mobile-garden-status #turn-indicator{min-height:0;margin:0;padding:2px;font:600 14px/1.2 system-ui!important;background:var(--table-ui-2)!important;color:var(--table-ink)!important}
 body.phone-game-shell.sds-page .mobile-garden-status #game-message{min-height:0;max-height:26px;margin:1px 0 0;padding:2px 5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font:11px/1.2 system-ui;color:var(--table-ink);background:transparent}
 body.phone-game-shell.sds-page .game-layout>.mobile-garden-actions,
 body.phone-game-shell.sds-page .game-layout>.mobile-board-tools,
 body.phone-game-shell.sds-page .inventory-sidebar,
 body.phone-game-shell.sds-page .game-sidebar{display:none!important}
 body.phone-game-shell.sds-page .game-layout>.mobile-board-viewport{order:2!important;flex:1 1 0!important;align-items:flex-start}
 body.phone-game-shell.sds-page .mobile-board-surface{margin:0 auto}
 body.phone-game-shell.sds-page #board-wrapper .table-roster{display:none}
 body.phone-game-shell.sds-page .game-layout>#hands-container{order:4!important;flex:0 0 auto!important;height:72px!important;max-height:72px!important;width:100%;overflow:hidden!important;padding:0}
 body.phone-game-shell.sds-page #hands-container .reserve-card{padding:2px 5px!important}
 body.phone-game-shell.sds-page #hands-container .reserve-card>div:first-child{display:none}
 body.phone-game-shell.sds-page #hands-container .reserve-card>div:nth-child(2){gap:4px}
 body.phone-game-shell.sds-page #hands-container .reserve-flower{flex:0 0 88px;min-height:61px;max-height:61px;padding:2px!important}
 body.phone-game-shell[data-audio-theme=shavari] .play-area>.mobile-stack-tools{order:7;display:flex;flex:0 0 auto!important;flex-basis:auto!important;height:37px!important;min-height:37px!important;max-height:37px!important;width:100%;margin:0!important;padding:0!important;align-items:stretch}
 body.phone-game-shell[data-audio-theme=shavari] .mobile-stack-tools button{flex:1 1 0!important;height:35px!important;min-height:35px!important;max-height:35px!important;padding:2px 3px!important;border:1px solid var(--table-line)!important;border-image:none!important;box-shadow:none!important;font:600 11px/1.1 system-ui!important}
 body.phone-game-shell[data-audio-theme=shavari] .play-area>.player-strip:has(#court-2){order:1}
 body.phone-game-shell[data-audio-theme=shavari] .play-area>.player-strip:has(#court-1){order:3}
 body.phone-game-shell[data-audio-theme=shavari] .play-area>.board-tools{order:8}
 /* Hikoro: the board owns the available height; reserve hands become compact strips. */
 body.phone-game-shell.hikoro-site.hikoro-dedicated.game-active{overflow:hidden!important}
 body.phone-game-shell.hikoro-site.hikoro-dedicated.game-active #table-companion{display:none!important}
 body.phone-game-shell.hikoro-site.hikoro-dedicated.game-active #hikoro-game-wrapper{box-sizing:border-box!important;width:100%!important;max-width:none!important;margin:0!important;border:0!important;background:none!important;box-shadow:none!important}
 body.phone-game-shell.hikoro-site #hikoro-game-wrapper .captured-area{display:flex!important;flex-direction:row!important;align-items:center!important;gap:6px!important;box-sizing:border-box!important;min-height:36px!important;max-height:48px!important;height:auto!important;overflow:hidden!important;background:var(--table-ui)!important;color:var(--table-ink)!important;border:1px solid var(--table-line)!important;border-radius:3px!important;box-shadow:none!important}
 body.phone-game-shell.hikoro-site #hikoro-game-wrapper .captured-area .table-player{display:none!important}
 body.phone-game-shell.hikoro-site #hikoro-game-wrapper .captured-area h3{flex:none;color:var(--table-ink)!important;font:600 11px/1.15 system-ui!important;white-space:nowrap}
 body.phone-game-shell.hikoro-site #hikoro-game-wrapper .captured-pieces-box{display:flex!important;align-items:center!important;flex:1!important;min-width:0!important;min-height:26px!important;max-height:33px!important;padding:0 2px!important;overflow-x:auto!important;overflow-y:hidden!important;background:transparent!important;border:0!important}
 body.phone-game-shell.hikoro-site #hikoro-game-wrapper .mobile-board-viewport{align-self:stretch!important;min-height:0!important;overflow:auto!important}
 body.phone-game-shell.hikoro-site #hikoro-game-wrapper #board-container{box-sizing:border-box!important;margin:auto!important;padding:0!important;border-width:3px!important}
 body.phone-game-shell.hikoro-site #hikoro-game-wrapper :is(#move-history-container,#turn-indicator-container){display:none!important}

 /* Keep the garden board in the center of the space between status and hand. */
 body.phone-game-shell.sds-page .game-layout>.mobile-board-viewport{align-items:center!important;justify-content:center!important}
 body.phone-game-shell.sds-page .game-layout>.mobile-board-viewport .mobile-board-surface{margin:auto!important}
 /* Academy keeps the turn and both armies visible; lesson controls live in Options. */
 body.phone-game-shell.academy-table .play-area>.turn-panel{height:31px!important;min-height:31px!important;max-height:31px!important;padding:4px 8px!important}
 body.phone-game-shell.academy-table .play-area>.turn-panel #notice{display:none!important}
 body.phone-game-shell.academy-table .play-area>.mobile-board-viewport{min-height:0!important;align-items:center!important;justify-content:center!important}
 body.phone-game-shell.academy-table .mobile-board-surface .mini-board-frame{box-sizing:border-box!important;width:100%!important;max-width:none!important;margin:0!important;padding:4px!important}
 body.phone-game-shell.academy-table .phone-options-list .mobile-lesson-picker{display:flex;align-items:center;gap:8px;padding:5px 0}
 body.phone-game-shell.academy-table .phone-options-list .mobile-lesson-picker label{flex:none;color:var(--table-ink)}
 body.phone-game-shell.academy-table .phone-options-list .mobile-lesson-picker select{flex:1;min-width:0;margin:0}
 body.phone-game-shell.academy-table .phone-options-list .mobile-selection{display:block!important;margin:4px 0!important}

}
@media(max-width:360px){
 body.phone-game-shell .phone-game-name{display:none}
 body.phone-game-shell .phone-table-bar button{padding-inline:5px!important;font-size:11px!important}
}

/* Shared desktop table: board first, secondary controls in the same Options drawer. */
@media(min-width:761px){
 body.phone-game-shell{min-height:100dvh;overflow:hidden}
 body.phone-game-shell .phone-table-bar{display:flex;align-items:center;gap:8px;box-sizing:border-box;width:min(100%,1320px);height:48px;min-height:48px;margin:6px auto;padding:4px 10px;background:var(--table-ui);border:1px solid var(--table-line);border-radius:5px;color:var(--table-ink);font:600 13px/1.1 system-ui;z-index:50}
 body.phone-game-shell .phone-game-name{margin-right:auto;color:var(--table-gold);font:700 14px/1.1 system-ui;white-space:nowrap}
 body.phone-game-shell .phone-table-bar button{min-height:36px!important;padding:4px 12px!important;border:1px solid var(--table-line)!important;border-radius:5px!important;background:var(--table-ui-2)!important;color:var(--table-ink)!important;box-shadow:none!important;font:600 13px/1.1 system-ui!important;white-space:nowrap}
 body.phone-game-shell .phone-table-bar .phone-options-toggle{background:#765638!important;color:#fff2d5!important}
 body.phone-game-shell .phone-options-drawer{display:none!important;position:fixed;top:calc(var(--phone-top,90px) + 8px);right:clamp(16px,3vw,42px);bottom:16px;z-index:100;width:min(430px,calc(100vw - 32px));max-height:calc(100dvh - var(--phone-top,90px) - 24px);overflow:hidden;padding:0;background:var(--table-ui);border:1px solid var(--table-line);border-top:3px solid var(--table-gold);box-shadow:0 14px 42px #0009}
 body.phone-game-shell.phone-options-open .phone-options-drawer{display:flex!important;flex-direction:column}
 body.phone-game-shell .phone-options-head{display:flex;align-items:center;justify-content:space-between;flex:none;min-height:48px;padding:4px 12px;background:var(--table-ui-2);color:var(--table-ink);font:600 15px system-ui}
 body.phone-game-shell .phone-options-head button{min-height:34px;padding:3px 12px;border:1px solid var(--table-line);border-radius:5px;background:#765638;color:white;font:600 12px system-ui}
 body.phone-game-shell .phone-options-list{min-height:0;overflow:auto;overscroll-behavior:contain;padding:8px 10px 14px}
 body.phone-game-shell .phone-options-list :is(.match-panel,.game-sidebar,.inventory-sidebar){position:static!important;display:grid!important;grid-template-columns:1fr!important;gap:8px!important;width:100%!important;height:auto!important;max-height:none!important;overflow:visible!important;padding:0!important;margin:0!important}
 body.phone-game-shell .phone-options-list :is(.panel,.bg-game-panel,.controls-guide){padding:12px!important;border:1px solid var(--table-line)!important;border-radius:5px!important;box-shadow:none!important}
 body.phone-game-shell .phone-options-list .chronicle{max-height:320px;overflow:auto}
 body.phone-game-shell .phone-options-list .mobile-disclosure{display:block!important;margin:4px 0}
 body.phone-game-shell .phone-options-list .mobile-disclosure>summary{display:block!important;min-height:40px;padding:7px 10px;font:600 13px system-ui}
 body.phone-game-shell .phone-options-list :is(.mobile-board-tools,.mobile-stack-tools,.board-tools){display:flex!important;flex-wrap:wrap;gap:6px;margin:4px 0;padding:0}
 body.phone-game-shell .phone-options-list .board-tools>span{display:none!important}
 body.phone-game-shell .phone-options-list :is(.mobile-board-tools,.mobile-stack-tools,.board-tools) button{flex:1;min-width:90px;min-height:36px}
 body.phone-game-shell .phone-options-list :is(.captures,.piece-guide,.go-summary){display:block!important}
 body.phone-game-shell .phone-options-list :is(#main-menu-btn,#lobby-link,#resign-button,#pass-button,#shield-button,#cancel-selection-btn,#pickup-btn,#new-button,#hikoro-new-match){display:none!important}
 body.phone-game-shell .phone-options-list .mobile-hikoro-actions{display:flex!important;gap:8px}
 body.phone-game-shell main{box-sizing:border-box;width:100%;height:calc(100dvh - var(--phone-top,100px));min-height:0;max-width:none;display:flex;flex-direction:column;overflow:hidden;margin:0;padding:0 clamp(18px,3vw,42px) 10px!important}
 body.phone-game-shell main>.introduction{flex:none;width:min(100%,1160px);margin:0 auto!important;padding:4px 0!important;text-align:left}
 body.phone-game-shell main>.introduction h1{font-size:clamp(23px,2vw,30px)!important;margin:0!important}
 body.phone-game-shell main>.match-layout{display:flex!important;flex:1 1 auto;min-height:0;width:min(100%,1160px);max-width:none;height:auto!important;margin:6px auto 0!important;overflow:hidden}
 body.phone-game-shell .match-layout>.play-area{display:flex!important;flex:1 1 auto;flex-direction:column;min-width:0;max-width:920px;width:100%;height:100%;gap:8px;margin:0 auto;overflow:hidden}
 body.phone-game-shell .play-area>.turn-panel{order:0;display:flex;align-items:center;gap:12px;flex:none;min-height:42px;max-height:48px;margin:0!important;padding:5px 10px!important;border:1px solid var(--table-line)!important;border-radius:5px!important;background:var(--table-ui)!important;box-shadow:none!important;color:var(--table-ink)!important}
 body.phone-game-shell .play-area>.turn-panel :is(.eyebrow,.fine-print){display:none!important}
 body.phone-game-shell .play-area>.turn-panel h2{flex:none;margin:0!important;color:var(--table-ink)!important;font:600 15px/1.2 system-ui!important}
 body.phone-game-shell .play-area>.turn-panel :is(#connection-status,#notice){display:block!important;min-width:0;max-height:32px;overflow:hidden;margin:0!important;color:#d8d3c2!important;font:12px/1.25 system-ui!important;text-overflow:ellipsis}
 body.phone-game-shell .play-area>.player-strip{order:1;flex:none;min-height:48px;max-height:54px;padding:5px 12px!important;border:1px solid var(--table-line)!important;border-radius:5px!important}
 body.phone-game-shell .play-area>.player-strip:has(#court-1),body.phone-game-shell .play-area>#strip-1{order:3}
 body.phone-game-shell .play-area>.mobile-board-viewport{order:2;display:flex!important;align-items:center;justify-content:center;flex:1 1 0!important;min-height:0!important;width:100%;overflow:auto;margin:0!important}
 body.phone-game-shell .mobile-board-surface{display:flex!important;align-items:center;justify-content:center;flex:0 1 auto;width:min(100%,calc(100dvh - var(--phone-top,120px) - 210px))!important;max-width:100%;max-height:100%;margin:auto!important}
 body.phone-game-shell .mobile-board-surface>:is(.mini-board-frame,.board-shell,#board-wrapper){box-sizing:border-box;width:100%!important;max-width:100%;max-height:100%;margin:0!important}
 body.phone-game-shell .play-area>.board-tools{order:4;flex:none;display:flex;align-items:center;justify-content:center;gap:8px;margin:0!important;padding:2px 0!important}
 body.phone-game-shell .play-area>.board-tools>span{display:none!important}
 body.phone-game-shell .phone-options-list .mobile-selection{display:block!important}
 body.phone-game-shell.sds-page main.game-layout{display:flex!important;flex-direction:column;align-items:center;justify-content:flex-start;gap:8px;width:100%;height:calc(100dvh - var(--phone-top,100px));padding:8px 18px!important;overflow:hidden}
 body.phone-game-shell.sds-page .game-layout>.bg-game-panel{box-sizing:border-box;flex:none;width:min(100%,1050px);max-height:48px;margin:0;padding:5px 10px!important;overflow:hidden;border:1px solid var(--table-line);border-radius:5px;background:var(--table-ui)}
 body.phone-game-shell.sds-page #turn-indicator{min-height:0;margin:0!important;padding:2px 4px!important;background:none!important;border:0!important;font:600 15px/1.2 system-ui!important;color:var(--table-ink)!important}
 body.phone-game-shell.sds-page #game-message{min-height:0;max-height:22px;margin:0!important;padding:0 4px!important;overflow:hidden;border:0!important;background:none!important;color:#ddd3bd!important;font:12px/1.2 system-ui!important;white-space:nowrap;text-overflow:ellipsis}
 body.phone-game-shell.sds-page .game-layout>.mobile-board-viewport{display:flex!important;align-items:center;justify-content:center;flex:1 1 0!important;min-height:0!important;width:min(100%,calc(100dvh - var(--phone-top,120px) - 235px));margin:0!important;overflow:auto}
 body.phone-game-shell.sds-page #board-wrapper{display:flex!important;align-items:center;justify-content:center;flex:1 1 auto!important;width:100%;height:100%;min-height:0;padding:0!important}
 body.phone-game-shell.sds-page #board-wrapper canvas{display:block;width:min(100%,calc(100dvh - var(--phone-top,120px) - 250px))!important;height:auto!important;max-height:100%;aspect-ratio:1;object-fit:contain}
 body.phone-game-shell.sds-page .game-layout>#hands-container{display:flex!important;flex:0 0 130px!important;flex-direction:row!important;align-items:stretch;gap:8px;width:min(100%,1050px);height:130px!important;max-height:130px!important;margin:0;padding:0;overflow-x:auto!important;overflow-y:hidden!important}
 body.phone-game-shell.sds-page #hands-container>*{flex:0 0 min(25%,260px);min-width:190px;max-height:130px;overflow:auto}
 body.phone-game-shell.hikoro-site.hikoro-dedicated.game-active #hikoro-game-wrapper{height:calc(100dvh - var(--phone-top,100px) - 8px);max-height:none;margin:8px auto!important;padding:12px!important}
 body.phone-game-shell.hikoro-site.hikoro-dedicated.game-active #hikoro-game-wrapper .hikoro-match-heading{display:none}
}
@media(max-width:760px){
 body.phone-game-shell .phone-options-list :is(.match-panel,.game-sidebar,.inventory-sidebar){position:static!important;display:grid!important;grid-template-columns:1fr!important;gap:6px!important;width:100%!important;height:auto!important;max-height:none!important;overflow:visible!important;margin:0!important;padding:0!important}
 body.phone-game-shell .phone-options-list :is(.match-actions,.history-tools){display:flex;flex-wrap:wrap;gap:6px}
 body.phone-game-shell .phone-options-list .mobile-hikoro-actions{display:flex!important;gap:6px}
 body.phone-game-shell .phone-options-list :is(#main-menu-btn,#lobby-link,#resign-button,#pass-button,#shield-button,#cancel-selection-btn,#pickup-btn,#new-button,#hikoro-new-match){display:none!important}
 body.phone-game-shell .phone-options-list :is(.board-tools,.mobile-stack-tools){display:flex!important;flex-wrap:wrap;gap:6px}
 body.phone-game-shell .phone-options-list .board-tools button{min-height:36px!important;padding:3px 8px!important}
 body.phone-game-shell .play-area>.board-tools{display:none!important}
 body.phone-game-shell .sds-page .game-layout>.mobile-board-viewport{align-items:center!important;justify-content:center!important}
 body.phone-game-shell.sds-page .game-layout>#hands-container{display:flex!important;flex-flow:row nowrap!important;gap:6px!important;overflow-x:auto!important;overflow-y:hidden!important;scroll-snap-type:x proximity}
 body.phone-game-shell.sds-page #hands-container>*{flex:0 0 min(78vw,310px);min-width:210px;max-height:72px;overflow:auto;scroll-snap-align:start}
}

@media(max-width:420px){body.phone-game-shell .phone-table-bar{gap:3px}body.phone-game-shell .phone-game-name{max-width:64px!important}}

/* Hikoro desktop uses the same status / player / board / player order as the other tables. */
@media(min-width:761px){
 body.phone-game-shell.hikoro-site.hikoro-dedicated.game-active #hikoro-game-wrapper{grid-template-columns:minmax(0,1fr)!important;grid-template-rows:40px 48px minmax(0,1fr) 48px!important;grid-template-areas:"status" "opponent" "board" "player"!important;align-content:stretch!important;justify-content:stretch!important;gap:6px!important}
 body.phone-game-shell.hikoro-site.hikoro-dedicated.game-active #hikoro-game-wrapper #turn-indicator-container{display:flex!important;align-items:center;gap:10px;box-sizing:border-box;width:100%!important;min-height:0!important;height:40px!important;max-height:40px!important;margin:0!important;padding:4px 10px!important;overflow:hidden;background:var(--table-ui)!important;color:var(--table-ink)!important;border:1px solid var(--table-line)!important;box-shadow:none!important}
 body.phone-game-shell.hikoro-site.hikoro-dedicated.game-active #turn-indicator{margin:0!important;color:var(--table-ink)!important;font:600 14px/1.2 system-ui!important;white-space:nowrap}
 body.phone-game-shell.hikoro-site.hikoro-dedicated.game-active #winnerText{margin:0!important;color:var(--table-ink)!important;font:12px/1.2 system-ui!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 body.phone-game-shell.hikoro-site.hikoro-dedicated.game-active #hikoro-game-wrapper .captured-area{display:flex!important;flex-direction:row!important;align-items:center!important;gap:8px!important;box-sizing:border-box;width:100%!important;min-height:48px!important;height:48px!important;max-height:48px!important;margin:0!important;padding:4px 9px!important;overflow:hidden;background:var(--table-ui)!important;color:var(--table-ink)!important;border:1px solid var(--table-line)!important;border-radius:4px!important;box-shadow:none!important}
 body.phone-game-shell.hikoro-site.hikoro-dedicated.game-active #hikoro-game-wrapper .captured-area .table-player{display:flex!important;align-items:center;gap:5px;flex:0 1 150px;min-width:75px;max-width:180px;min-height:0;overflow:hidden;color:var(--table-ink)!important;font:600 13px/1.2 system-ui!important}
 body.phone-game-shell.hikoro-site.hikoro-dedicated.game-active #hikoro-game-wrapper .captured-area h3{flex:none;margin:0!important;color:var(--table-ink)!important;font:600 11px/1.2 system-ui!important;white-space:nowrap}
 body.phone-game-shell.hikoro-site.hikoro-dedicated.game-active #hikoro-game-wrapper .captured-pieces-box{display:flex!important;align-items:center!important;flex:1 1 auto!important;min-width:0!important;min-height:28px!important;max-height:36px!important;margin:0!important;padding:0 2px!important;overflow-x:auto!important;overflow-y:hidden!important;background:transparent!important;border:0!important}
 body.phone-game-shell.hikoro-site.hikoro-dedicated.game-active #hikoro-game-wrapper{--square-size:clamp(22px,min(3.2vw,calc((100dvh - var(--phone-top,120px) - 182px)/18)),40px)!important;--notation-size:calc(var(--square-size)*.75)!important}
 body.phone-game-shell.hikoro-site.hikoro-dedicated.game-active #hikoro-game-wrapper #board-container{align-self:center!important;justify-self:center!important;margin:auto!important}
 body.phone-game-shell.hikoro-site.hikoro-dedicated.game-active .phone-options-list #table-companion{display:flex!important;flex-wrap:wrap;align-items:center;gap:8px;width:100%;margin:0;padding:8px;background:var(--table-ui);color:var(--table-ink);border:1px solid var(--table-line)}
}
@media(max-width:760px){
 body.phone-game-shell.hikoro-site.hikoro-dedicated.game-active .phone-options-list #table-companion{display:flex!important;flex-wrap:wrap;width:100%;margin:0;padding:8px;background:var(--table-ui);color:var(--table-ink);border:1px solid var(--table-line)}
}
