/* The same Kyoto table, composed around one viewport and complete decisions. */
html,body{height:100%;min-width:0}#app{height:100dvh;display:flex;flex-direction:column;min-width:0}
.site-header,main{width:100%;max-width:1600px;padding-inline:24px}.site-header{height:60px;flex:0 0 auto}.brand-title{font-size:22px}.brand-subtitle{font-size:10px}.header-tools{gap:16px}.page-signoff{display:none}
main{flex:1;min-height:0;display:flex;flex-direction:column}.table-round{height:32px;min-height:32px;padding:4px 0;gap:12px}.table-round h1{font-size:20px}.table-round>span{font-size:12px}.last-action-recap{margin-left:auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:55%;color:var(--plum)}
.table-layout{display:grid;grid-template-columns:minmax(0,1fr) 270px;gap:20px;min-height:0;flex:1;align-items:stretch}.table-play-area{min-width:0;min-height:0;display:flex;flex-direction:column}.game-table{flex:0 0 auto}.table-side-label,.opponent-round-heading,.opponent-last-move{display:none}
.opponent-seat{padding:4px 10px;margin:0}.opponent-seat .player-bar{min-height:38px;padding:0}.opponent-seat .player-identity>div>span{font-size:11px;margin:2px 0}.opponent-seat .bot-badge{display:inline-block;margin:0 0 0 4px}.opponent-presence{padding:2px 0;min-height:24px;gap:10px}.opponent-hand{font-size:12px}.opponent-hand .card-backs{display:none}.opponent-status{font-size:12px;line-height:1.3;margin:0;flex:1;min-width:0}.opponent-round-actions{display:none}.opponent-seat .score-block{min-width:130px}.opponent-seat .score-stat strong{font-size:20px}.opponent-seat .score-stat>span{font-size:10px}.opponent-seat .progress-track{display:none}
.board-scroll{overflow:visible;margin:0;padding:0}.geisha-row{min-width:0;gap:8px}.portrait-card{height:clamp(72px,17vh,160px);min-width:44px;border-radius:36px 36px 5px 5px}.portrait-name{font-size:17px}.portrait-item{font-size:10px}.charm-badge{min-width:40px;height:25px;padding:1px 4px}.charm-badge strong{font-size:18px}.charm-badge>.icon{width:13px;height:13px}.held-favor{top:38px;font-size:10px;padding:2px 5px}.offering-count{height:19px}.favor-line{height:17px}.favor-line i{height:15px;width:15px}.favor-line .icon{width:10px;height:10px}.your-bar.player-bar{min-height:30px;padding:2px 0}.your-bar .score-stat strong{font-size:20px}.your-bar .board-legend{font-size:11px;margin:0}
.play-dock{display:flex;flex-direction:column;flex:1;min-height:0;margin:0}.turn-context{flex:0 0 auto;padding:7px 12px;min-height:38px}.turn-context h2,.reviewing-opponent .turn-context h2{font-size:20px;line-height:1.2}.turn-context p{font-size:13px;line-height:1.4;margin:3px 0 0}.dock-content{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);padding:10px 12px;gap:14px;flex:1;min-height:0;align-items:start}.private-cards-row{display:block;min-width:0}.hand-cards{display:grid;grid-template-columns:repeat(var(--hand-count),minmax(0,1fr));gap:4px;overflow:visible;min-width:0;padding:4px 0}.item-card{width:100%;min-width:44px;max-width:none;height:clamp(65px,14vh,125px);aspect-ratio:auto;margin:0}.item-caption strong{font-size:14px}.item-caption>span{font-size:10px}.section-label{font-size:11px;min-height:20px;margin:0 0 4px}.hand-note{font-size:11px;margin-top:4px;min-height:18px}.your-secret-section{display:flex;align-items:center;gap:8px;flex-basis:auto;border:0;border-top:1px solid var(--line);padding:4px 0}.your-secret-section .section-label{margin:0;min-height:0}.your-secret-card{padding:0}.your-secret-card .item-card{width:35px;height:44px;min-width:0}.your-secret-name{font-weight:600;color:var(--plum)}.your-secret-card .item-caption{display:none}.your-secret-card .card-identity-band{height:18px}.your-secret-card .card-rank{font-size:13px}.your-secret-card .card-identity-band .icon{width:12px;height:12px}
.decision-panel{border:0;padding:0;min-height:0;height:100%;display:flex;flex-direction:column}.actions-section{border:0;padding:0}.actions-grid{gap:6px}.action-tile{padding:7px;min-height:58px}.action-icon{width:25px;height:25px}.action-icon>.icon{width:20px;height:20px}.action-copy strong{font-size:15px}.action-copy>span{font-size:11px}.action-footer,.actions-section>.action-footer{min-height:44px;margin-top:6px;gap:8px}.primary-button{min-height:44px;padding:10px 12px;font-size:14px}.action-footer>.primary-button{min-width:135px}.action-footer>span,.action-footer p{font-size:12px}.game-footer{height:23px;min-height:23px;padding:2px 0}.journal-preview{min-width:0;font-size:11px;max-width:75%}.local-note{font-size:10px}.game-footer .journal-link{display:none}
.game-ledger{position:static;align-self:stretch;height:auto;max-height:none;min-height:0;display:flex;flex-direction:column}.ledger-header{padding:10px}.ledger-header h2{font-size:21px}.ledger-header p,.ledger-file-note{display:none}.ledger-scroll{flex:1;min-height:0;max-height:none}.ledger-entry{padding:10px}.ledger-entry p{font-size:13px}.ledger-disk-status{font-size:11px}.ledger-button{display:none}
.offer-zone,.split-zone{padding:0!important}.offer-options,.split-groups{gap:6px;margin:0;display:flex;justify-content:center;align-items:stretch}.offer-choice{padding:5px;flex:1;min-width:0;max-width:50%}.offer-card-group{gap:4px}.offer-card-group .item-card,.split-choice .item-card,.recap-public-cards .item-card{height:90px;width:60px;min-width:0}.offer-choice-label{font-size:12px;padding:5px 0}.offer-or{display:none}.offer-zone>p{font-size:12px;margin:5px 0}.split-pair{flex:1;min-width:0;padding:3px}.split-pair h3{font-size:15px;margin:0 0 5px}.split-options{display:flex;gap:4px}.split-choice{min-width:44px;flex:1;padding:3px}.split-choice>.item-card{width:100%}.split-choice>span{font-size:11px}.split-footer{margin-top:6px}.opponent-recap{padding:0!important;min-height:0;display:flex;flex-direction:column}.recap-action-label{padding:0 0 7px;margin:0 0 7px;gap:7px}.recap-action-label strong{font-size:19px}.recap-action-label>span{font-size:11px}.recap-allocations{display:flex;flex-direction:row;gap:6px}.recap-recipient{flex:1;min-width:0;padding:7px}.recap-recipient h3{font-size:17px;margin:0 0 6px}.recap-recipient h3>span{font-size:12px}.recap-public-cards{gap:4px}.recap-hidden-area{gap:12px;flex-direction:row;text-align:left}.recap-hidden-area h3{font-size:18px}.recap-hidden-area p{font-size:13px;margin:5px 0}.recap-card-back{width:40px;height:60px}.recap-board-note{font-size:12px;margin:5px 0}.recap-footer{flex-direction:row;gap:8px;padding-top:6px;margin-top:6px}.recap-footer>p{display:none}.recap-footer .primary-button{min-height:44px;font-size:14px;width:100%}
.secret-reveal-stage{display:flex;flex-direction:column;flex:1;min-height:0;padding:0!important}.secret-reveal-content{overflow:auto;min-height:0;flex:1;gap:10px}.secret-reveal-cards{gap:20px}.secret-reveal-player h3{font-size:17px;margin:0 0 5px}.secret-flip{width:50px;height:74px}.secret-reveal-player>p{font-size:15px;margin:5px 0}.reveal-totals{padding:7px}.reveal-total-row{font-size:13px;line-height:1.4}.reveal-totals-heading{font-size:10px;margin:0 0 5px}.reveal-effects{gap:6px}.reveal-effect{padding:7px}.reveal-effect-heading strong{font-size:17px}.reveal-count-change{font-size:13px;margin-top:5px}.reveal-effect p{font-size:13px;line-height:1.35;margin:5px 0}.reveal-owner-change{font-size:11px}.reveal-stage-footer{flex:0 0 auto;margin-top:6px;padding-top:5px;gap:8px}.reveal-stage-footer>span{font-size:11px}.round-result{padding:8px;min-height:0}.final-score-label{font-size:20px}.round-result .round-numbers{font-size:13px;gap:10px;margin:10px 0}.result-controls{gap:6px}.round-result .primary-button{min-height:44px}
.dialog-backdrop{padding:12px}.dialog{max-height:calc(100dvh - 24px);overflow:auto;padding:28px 22px}.dialog-close{position:sticky;float:right;top:0;width:44px;height:44px;margin:-14px -10px 0 0;z-index:2;background:var(--paper)}.dialog .game-ledger{max-height:70vh;min-height:200px}.dialog .ledger-header{display:none}
@media(max-width:1100px){.site-header,main{padding-inline:14px}.table-layout{grid-template-columns:minmax(0,1fr)}.table-layout>.game-ledger{display:none}.ledger-button{display:inline-flex}.header-tools{gap:10px}}
@media(max-width:700px) and (min-height:501px){
 .site-header,main{padding-inline:6px}.site-header{height:44px}.brand-title{font-size:17px;letter-spacing:0}.brand-subtitle,.brand-mark{display:none}.header-tools{gap:0}.header-tools>.nav-button,.header-tools>.nav-button:not(.new-game-button){width:44px;min-height:44px;padding:4px}.header-tools>.nav-button>span,.header-tools>.sound-button{display:none}.header-tools .icon{width:18px;height:18px}.table-round{height:22px;min-height:22px;padding:1px 0}.table-round h1{font-size:17px}.table-round>span{font-size:11px}.last-action-recap{display:none}
 .opponent-seat{padding:0 2px}.opponent-seat .player-bar{min-height:30px;gap:4px}.opponent-seat .avatar,.opponent-seat .player-identity>div>span,.bot-badge{display:none!important}.opponent-seat .player-identity{gap:0}.opponent-seat .player-identity strong{font-size:14px}.opponent-details{display:block!important}.action-dots{gap:1px}.mini-action{width:18px;height:18px}.mini-action>.icon{width:13px;height:13px}.opponent-seat .score-block{min-width:100px;gap:5px}.opponent-seat .score-stat{width:40px;display:flex;flex-direction:row;align-items:baseline;gap:2px}.opponent-seat .score-stat strong{font-size:17px}.opponent-seat .score-stat strong span{font-size:10px}.opponent-seat .score-stat>span{font-size:9px}.opponent-seat .score-or{font-size:10px}.opponent-presence{min-height:22px;gap:7px;padding:0}.opponent-hand{font-size:10px;gap:0}.opponent-status{font-size:10px;line-height:1.2;text-align:left}.geisha-row{gap:0}.portrait-card{height:58px;border-radius:15px 15px 3px 3px;border-width:1px}.portrait-name{font-size:12px}.portrait-item{display:none}.portrait-caption{bottom:2px;padding:2px 0;border-width:2px}.charm-badge{height:18px;min-width:29px;top:1px;border-width:1px;padding:0 2px;gap:2px}.charm-badge strong{font-size:14px}.charm-badge>.icon{width:11px;height:11px}.held-favor{top:23px;gap:1px;padding:1px;font-size:9px}.held-favor>.icon{display:none}.offering-count{height:15px;font-size:12px;gap:2px}.count-pips{display:none}.favor-line{height:10px;gap:2px}.favor-line i{height:10px;width:10px}.favor-line>span{width:8px}.favor-line .icon{height:8px;width:8px}.player-bar.your-bar{min-height:25px;gap:4px}.your-bar .player-identity>strong{font-size:14px}.your-bar .score-stat strong{font-size:17px}.your-bar .score-stat>span{font-size:10px}.your-bar .board-legend{font-size:9px;gap:2px}
 .play-dock{border-radius:5px}.turn-context{padding:5px 4px;min-height:30px;gap:5px}.turn-context h2,.reviewing-opponent .turn-context h2{font-size:18px}.turn-context p{font-size:12px;line-height:1.3}.task-split .turn-context p,.reviewing-opponent .turn-context p,.revealing-secrets .turn-context p{display:none}.dock-content{display:flex;flex-direction:column;padding:5px 3px;gap:5px;align-items:stretch}.private-cards-row{flex:0 0 auto}.section-label{min-height:18px;font-size:10px;margin:0}.subtle-button{font-size:10px}.hand-cards{gap:0;padding:3px 0}.item-card{height:72px;border-width:1px;border-radius:4px}.card-identity-band{height:20px;padding:0 3px}.card-rank{font-size:16px}.card-identity-band>.icon{width:14px;height:14px}.item-card .item-caption{bottom:3px;padding:0}.item-card .item-caption strong{font-size:12px}.item-caption>span{display:none}.new-card-label{font-size:8px;padding:1px 2px;top:22px}.selected-check{height:15px;width:15px;right:1px;bottom:18px}.hand-note{font-size:10px;line-height:1;min-height:13px;margin:0}.hand-note button{font-size:10px;padding:0}.your-secret-section{padding:2px 0;border:0}.your-secret-card{display:none}.your-secret-section .section-label{font-size:11px;min-height:14px}.your-secret-name{margin-left:5px}.empty-hand{display:none}
 .decision-panel{flex:1;min-height:0}.actions-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:3px}.action-tile{position:relative;display:flex;flex-direction:column;gap:2px;justify-content:center;padding:4px 1px;min-height:48px}.action-icon{height:18px;width:18px;min-height:0;border:0;background:none}.action-icon>.icon{width:18px;height:18px}.action-copy strong{font-size:13px;line-height:1.2}.action-copy>span{display:none}.action-number{position:absolute;top:1px;right:2px;font-size:10px}.action-number>.icon{height:10px;width:10px}.action-footer,.actions-section>.action-footer{margin-top:4px;min-height:44px;gap:4px;flex-direction:row}.action-footer>.primary-button{min-width:110px;font-size:13px;padding:8px}.action-footer>span{font-size:11px;line-height:1.3}.game-footer{height:17px;min-height:17px}.journal-preview{font-size:10px;max-width:70%}.local-note{font-size:8px}.journal-preview>.icon{height:12px;width:12px}
 .offer-card-group .item-card,.split-choice .item-card,.recap-public-cards .item-card{height:54px;width:44px}.offer-choice{padding:3px}.offer-choice-label{font-size:12px;padding:4px 0}.offer-zone>p{margin:3px 0;font-size:11px}.split-pair h3{font-size:13px;margin:0 0 2px}.split-options{gap:3px}.split-choice{padding:2px}.split-choice>span{display:none}.split-choice>.item-card{width:100%}.recap-action-label{padding:0 0 4px;margin:0 0 4px}.recap-action-label strong{font-size:16px}.recap-action-label>span{display:none}.recap-action-label>.icon{height:18px;width:18px}.recap-recipient{padding:4px}.recap-recipient h3{font-size:14px;margin-bottom:4px}.recap-recipient h3>span{font-size:10px}.recap-public-cards{gap:2px}.recap-board-note{display:none}.recap-hidden-area{gap:8px}.recap-hidden-area h3{font-size:16px;margin:0}.recap-hidden-area p{font-size:12px;margin:3px 0}.recap-hidden-note{font-size:11px!important}.recap-hidden-cards{gap:3px}.recap-card-back{height:44px;width:30px}.recap-footer{margin-top:4px;padding-top:4px}.recap-footer .primary-button{font-size:13px;padding:8px}.secret-flip{width:38px;height:53px}.secret-reveal-content{gap:5px}.secret-reveal-player h3{font-size:14px;margin:0 0 3px}.secret-reveal-player>p{font-size:12px;margin:3px 0}.reveal-total-row{grid-template-columns:40px 1fr auto 1fr;gap:4px;font-size:11px}.reveal-total-row>strong:last-child:not(:first-child){grid-column:auto}.reveal-score-arrow{grid-column:auto}.reveal-effects{grid-template-columns:1fr 1fr}.reveal-effect p{font-size:12px}.reveal-stage-footer{flex-direction:row;gap:5px}.reveal-stage-footer>span{font-size:10px}.reveal-stage-footer .primary-button{font-size:12px;padding:7px;min-width:130px}.revealing-secrets .hand-section:has(.empty-hand){display:none}.round-result .round-numbers{flex-direction:row;font-size:12px}.result-controls{flex-direction:row;justify-content:space-between}.final-score-label{font-size:17px}.round-result{padding:4px}
}
@media(max-height:500px){
 .site-header,main{padding-inline:8px}.site-header{height:38px}.brand-title{font-size:17px}.brand-subtitle,.brand-mark{display:none}.header-tools{gap:4px}.header-tools .nav-button{font-size:11px;min-height:36px}.header-tools .sound-button{display:none}.table-round{height:23px;min-height:23px;padding:1px 0}.table-round h1{font-size:17px}.last-action-recap{display:none}.table-layout{display:block}.table-play-area{height:100%;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);grid-template-rows:minmax(0,1fr) 14px;gap:0 12px}.game-table{grid-column:1;grid-row:1;min-height:0}.play-dock{grid-column:2;grid-row:1;min-height:0}.game-footer{grid-column:1 / -1;grid-row:2;height:14px;min-height:14px}.table-layout>.game-ledger{display:none}.ledger-button{display:inline-flex}.opponent-seat{padding:0}.opponent-seat .player-bar{min-height:30px;gap:3px}.opponent-seat .avatar,.opponent-seat .player-identity>div>span,.opponent-seat .bot-badge,.opponent-details{display:none}.opponent-seat .player-identity strong{font-size:14px}.opponent-seat .score-block{min-width:100px;gap:4px}.opponent-seat .score-stat{display:flex;flex-direction:row;gap:3px;width:auto;align-items:baseline}.opponent-seat .score-stat strong{font-size:16px}.opponent-seat .score-stat>span{font-size:9px}.opponent-seat .score-or{font-size:10px}.opponent-presence{min-height:22px}.opponent-status{font-size:10px}.opponent-hand{font-size:10px}.geisha-row{gap:3px;grid-template-columns:repeat(4,minmax(0,1fr))}.portrait-card{height:57px;border-radius:15px 15px 3px 3px}.portrait-name{font-size:12px}.portrait-item{display:none}.charm-badge{height:18px;min-width:30px;top:1px;padding:0 2px;gap:2px;border-width:1px}.charm-badge strong{font-size:14px}.charm-badge>.icon{height:11px;width:11px}.held-favor{top:25px;font-size:9px;padding:1px 2px}.offering-count{height:13px;font-size:11px}.count-pips{display:none}.favor-line{height:10px}.favor-line i{height:10px;width:10px}.favor-line .icon{height:8px;width:8px}.your-bar.player-bar{min-height:24px}.your-bar .score-stat strong{font-size:16px}.your-bar .board-legend{display:none}.your-bar .player-identity>strong{font-size:13px}
 .turn-context{padding:4px;min-height:25px}.turn-context h2,.reviewing-opponent .turn-context h2{font-size:17px}.turn-context p{display:none}.dock-content{display:flex;flex-direction:column;gap:4px;padding:4px;min-height:0}.private-cards-row{flex:0 0 auto}.section-label{min-height:16px;font-size:10px;margin:0}.subtle-button{font-size:10px}.hand-cards{grid-template-columns:repeat(4,minmax(0,1fr));gap:3px;padding:2px 0}.hand-cards .item-card{height:44px;border-width:1px;border-radius:3px}.item-card .card-identity-band{height:16px;padding:0 3px}.card-rank{font-size:13px}.card-identity-band>.icon{height:12px;width:12px}.item-card .item-caption{bottom:1px}.item-card .item-caption strong{font-size:12px}.item-caption>span,.new-card-label{display:none}.hand-note{font-size:9px;min-height:11px;margin:0}.hand-note button{font-size:10px;padding:0}.your-secret-section{padding:0;border:0}.your-secret-section .section-label{font-size:10px}.your-secret-card{display:none}.empty-hand{display:none}.actions-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:3px}.action-tile{display:flex;flex-direction:column;padding:2px;min-height:44px;position:relative;gap:2px}.action-icon{height:16px;width:16px;background:none;border:0}.action-icon>.icon{height:16px;width:16px}.action-copy strong{font-size:12px}.action-copy>span{display:none}.action-number{position:absolute;right:1px;top:1px;font-size:9px}.action-number>.icon{height:10px;width:10px}.action-footer,.actions-section>.action-footer{min-height:44px;margin:3px 0 0;gap:4px;flex-direction:row}.action-footer>span{font-size:10px}.action-footer .primary-button{min-width:115px;font-size:12px;padding:6px}.offer-card-group .item-card,.split-choice .item-card,.recap-public-cards .item-card{height:44px;width:44px}.offer-choice-label{font-size:11px;padding:2px 0}.offer-zone>p{display:none}.split-pair h3{font-size:12px;margin:0 0 2px}.split-choice{padding:0;min-height:44px}.split-choice>span{display:none}.split-choice>.item-card{width:100%}.split-footer{margin:3px 0 0}.recap-action-label{padding:0 0 3px;margin:0 0 3px}.recap-action-label strong{font-size:15px}.recap-action-label>span,.recap-board-note{display:none}.recap-recipient{padding:3px}.recap-recipient h3{font-size:13px;margin:0 0 3px}.recap-recipient h3>span{font-size:10px}.recap-public-cards{gap:2px}.recap-footer{margin:3px 0 0;padding:2px 0 0}.recap-footer .primary-button{font-size:12px;min-height:44px;padding:6px}.recap-hidden-area{gap:6px}.recap-hidden-area h3{font-size:15px;margin:0}.recap-hidden-area p{font-size:12px;margin:3px 0}.recap-hidden-note{font-size:10px!important}.recap-card-back{height:40px;width:28px}.secret-reveal-stage{height:100%;min-height:0}.secret-reveal-content{min-height:0}.secret-flip{width:32px;height:45px}.secret-reveal-player h3{font-size:13px;margin:0 0 3px}.secret-reveal-player>p{font-size:12px;margin:3px 0}.reveal-stage-footer{margin:3px 0 0;padding:3px 0 0;flex-direction:row}.reveal-stage-footer>span{display:none}.reveal-stage-footer .primary-button{font-size:12px;min-height:44px;width:100%;padding:6px}.revealing-secrets .hand-section:has(.empty-hand){display:none}.round-result{padding:3px}.final-score-label{font-size:16px}.round-result .round-numbers{font-size:11px;gap:6px;margin:6px 0}.result-controls{flex-direction:row;gap:4px}.result-controls .primary-button{min-width:110px;font-size:12px}.result-controls .text-button{font-size:11px}
}
body.large-text #app{height:auto;min-height:100dvh}body.large-text .table-layout,body.large-text .table-play-area{min-height:700px}body.large-text .play-dock{min-height:450px}body.large-text .secret-reveal-content{overflow:visible}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;animation:none!important;transition:none!important}}
/* Replace the old fixed hand widths and header minimums, including their
   more-specific compact-screen rules. */
#app .site-header{min-height:0;padding-block:0;flex-wrap:nowrap}
#app .hand-cards .item-card{width:100%;min-width:44px;max-width:none;min-height:44px;height:clamp(65px,14vh,125px);margin:0;aspect-ratio:auto}
#app .actions-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
#app .score-stat strong{white-space:nowrap}
@media(max-width:700px) and (min-height:501px){
 #app .hand-cards .item-card{height:72px}
 #app .actions-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
 #app .opponent-seat .score-stat{width:auto;min-width:0;gap:2px}
 #app .opponent-seat .score-block{min-width:0;flex-shrink:0}
 #app .opponent-seat .score-stat strong span{font-size:10px}
}
@media(max-height:500px){#app .hand-cards .item-card{height:44px}#app .actions-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}
.game-footer .journal-preview{height:14px;min-height:14px;padding:0;line-height:1}
#app .split-groups{flex-direction:row}
#app .offer-options{flex-wrap:nowrap}
#app .offer-options:has(.offer-card-group .item-card:nth-child(2))>.offer-choice{width:auto;max-width:none}
@media(max-width:700px) and (min-height:501px){#app .turn-context .cancel-selection{min-height:24px;padding:0}#app .split-footer{gap:6px;flex-wrap:nowrap}#app .split-footer .primary-button{padding:8px;font-size:13px}}
.compact-secret{display:none}
@media(max-width:700px) and (min-height:501px){#app .dock-content .section-label{height:18px;min-height:18px;margin:0}#app .your-secret-section{display:none}.compact-secret{display:inline-flex;align-items:center;gap:2px;color:var(--plum);font-size:10px}.compact-secret>.icon{height:11px;width:11px}}
@media(max-width:700px) and (min-height:501px) and (max-height:680px){#app .hand-cards .item-card{height:60px}}
@media(max-height:500px){#app .dock-content .section-label{min-height:16px;height:16px;margin:0}#app .your-secret-section{display:none}.compact-secret{display:inline-flex;font-size:10px;gap:2px}.compact-secret>.icon{width:10px;height:10px}}
#app .game-footer{padding:0;align-items:center}#app .game-footer .journal-preview>.icon{height:12px;width:12px}#app .local-note{line-height:12px}
@media(max-height:500px){#app .portrait-card{height:44px}#app .offering-count{height:11px}#app .favor-line{height:8px}#app .geisha-row{gap:2px}#app .your-bar .player-identity{min-height:0}#app .opponent-presence{flex-wrap:nowrap;gap:5px}#app .opponent-status{flex:1 1 0;max-width:none}#app .hand-cards{padding:0;gap:2px}#app .hand-note{min-height:10px;line-height:10px}#app .dock-content{padding:3px;gap:3px}#app .turn-context .cancel-selection{padding:0;min-height:22px}#app .split-groups{gap:3px}#app .split-footer{gap:3px;flex-wrap:nowrap}#app .split-footer .primary-button{padding:6px;font-size:12px}}
/* On very short landscape screens the selected cards are already fully shown
   in their pairs. Keep the remaining hand beside that arrangement. */
@media(max-height:500px){.task-split .hand-cards .item-card.selected{display:none}.task-split .hand-section .section-label>span:first-child::after{content:' · selected cards below';font-size:9px;text-transform:none;letter-spacing:0}.task-split .hand-cards{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:700px), (max-height:500px){.reviewing-opponent .recap-action-label{display:none}.recap-hidden-note{display:none}.recap-hidden-area{align-items:center}.recap-hidden-area>div:last-child{min-width:0}.recap-hidden-area p{line-height:1.3}}
.round-result{gap:8px;flex-wrap:nowrap;justify-content:flex-start}.result-controls{width:100%}.round-result .round-numbers{min-width:0;margin:6px 0}.round-numbers>span{gap:6px}
@media(max-width:700px), (max-height:500px){.task-end .hand-section:has(.empty-hand){display:none}.round-result{flex-direction:column;align-items:stretch;gap:6px}.result-controls{display:grid;grid-template-columns:1fr 1fr;gap:6px}.result-controls .text-button{min-width:0;font-size:12px;white-space:normal;padding:4px}.result-controls .primary-button{min-width:0;font-size:12px;white-space:normal;padding:7px}.final-score-label>.icon{height:20px;width:20px}}
#app .game-footer{flex-wrap:nowrap;gap:6px}#app .game-footer .journal-preview{flex:1;min-width:0;flex-wrap:nowrap;max-width:none;overflow:hidden}#app .game-footer .journal-preview>span:first-of-type{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#app .game-footer .local-note{flex:0 0 auto;margin:0}
.ledger-review{flex:0 0 auto;min-height:44px;font-size:13px;border-bottom:1px solid var(--line);padding:6px}
#app .hand-cards .item-card.selected{transform:none;outline-offset:-2px}

/* Desktop composition: reserve readable card windows, then size the turn
   panel to its actual contents. Compact phone/landscape layouts stay above. */
@media (min-width: 701px) and (min-height: 700px) {
  .site-header, main { max-width: 1440px; }
  .table-layout {
    grid-template-columns: minmax(0, 1fr) 250px;
    gap: 24px;
    max-height: 850px;
  }
  .game-table { display: flex; flex-direction: column; flex: 1; min-height: 0; }
  .board-scroll { display: flex; flex: 1; min-height: 0; }
  .geisha-row { flex: 1; min-height: 0; gap: 10px; }
  .geisha-column { display: flex; flex-direction: column; min-height: 0; }
  .portrait-card {
    height: auto;
    flex: 1;
    min-height: 140px;
    max-height: 380px;
    border-radius: 48px 48px 6px 6px;
  }
  .portrait-caption { padding: 8px 2px; }
  .portrait-name { font-size: 19px; line-height: 1.2; }
  .portrait-item { font-size: 11px; line-height: 14px; margin-top: 3px; }
  .portrait-item > .icon { width: 14px; height: 14px; }
  .opponent-hand { min-height: 18px; }
  .opponent-presence { flex-wrap: nowrap; }
  .play-dock {
    flex: 0 1 auto;
    max-height: min(308px, calc(100dvh - 425px));
  }
  .dock-content {
    flex: 1;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
    align-items: stretch;
    padding: 14px 16px;
    gap: 24px;
  }
  .dock-content .section-label { min-height: 24px; height: 24px; margin-bottom: 4px; }
  .dock-content .subtle-button { min-height: 24px; }
  .hand-cards {
    grid-template-columns: repeat(var(--hand-count), minmax(44px, 94px));
    gap: 6px;
    padding: 6px 0;
  }
  #app .hand-cards .item-card { height: clamp(120px, 18dvh, 160px); max-width: 94px; }
  .action-tile { min-height: 62px; }
  .actions-grid { gap: 8px; }
  .decision-panel, .secret-reveal-stage { height: 100%; }
  .your-secret-section { display: none; }
  .compact-secret { display: inline-flex; align-items: center; gap: 4px; color: var(--plum); font-size: 12px; }
  .compact-secret > .icon { width: 14px; height: 14px; }
  .offer-card-group .item-card, .recap-public-cards .item-card { width: 64px; height: 110px; }
  .offer-zone { min-height: 0; }
  .reviewing-opponent .recap-action-label, .reviewing-opponent .recap-board-note { display: none; }
  .reviewing-opponent:not(:has(.live-offer)) .private-cards-row { display: none; }
  .reviewing-opponent:not(:has(.live-offer)) .dock-content { grid-template-columns: minmax(0, 1fr); }
  .recap-recipient h3 { line-height: 1.2; margin-bottom: 6px; }
  .recap-recipient h3 > span { display: inline; margin: 0 0 0 6px; }
  .secret-flip { width: 64px; height: 110px; }

  .revealing-secrets .private-cards-row, .task-end .private-cards-row { display: none; }
  .revealing-secrets .dock-content, .task-end .dock-content { grid-template-columns: minmax(0, 1fr); }
  .secret-reveal-content { display: grid; grid-template-columns: 1fr 1fr; align-content: start; gap: 12px; }
  .secret-reveal-content > * { min-width: 0; align-self: start; }
  .secret-reveal-content .reveal-effects { grid-column: 1 / -1; }

  .split-options { justify-content: center; }
  .split-choice { max-width: 88px; }
  .split-choice > span { padding: 2px 0; line-height: 1.2; }
  .split-pair h3 { line-height: 1.2; }
  .split-choice > .item-card { width: 64px; height: 110px; margin-inline: auto; }

}
@media (min-width: 701px) and (max-width: 1100px) and (min-height: 700px) {
  .table-layout { grid-template-columns: minmax(0, 1fr); }
}
@media (min-width: 701px) and (min-height: 700px) and (max-height: 850px) {
  .site-header { height: 48px; }
  .header-tools .nav-button { min-height: 44px; }
  .table-round { height: 26px; min-height: 26px; }
  .opponent-seat { padding: 2px 10px; }
  .opponent-seat .player-bar { min-height: 35px; }
  .opponent-seat .score-stat strong { line-height: 1.1; }
  .opponent-seat .score-stat > span { line-height: 1.2; margin-top: 0; }
  .opponent-presence { min-height: 18px; padding: 0; }
  .your-bar.player-bar { min-height: 28px; height: 28px; padding: 0; }
  .your-bar .player-identity { min-height: 0; }
  .offering-count { height: 16px; }
  .favor-line { height: 14px; }
  .game-footer { height: 20px; min-height: 20px; }

  .dock-content { padding: 8px 12px; gap: 16px; }
  .action-tile { min-height: 52px; }
  .actions-grid { gap: 6px; }
  .turn-context { min-height: 34px; padding: 5px 12px; }
  .portrait-name { font-size: 17px; }
  .portrait-caption { padding: 4px 2px; }
  .opponent-seat .player-identity > div > span { display: none; }
  #app .hand-cards .item-card { height: 120px; }
  .split-choice > .item-card { width: 54px; height: 94px; }
}

@media (min-width: 1000px) and (min-height: 700px) {
  .secret-reveal-content:has(.reveal-effects) {
    grid-template-columns: 240px minmax(280px, 1fr) minmax(0, 1.5fr);
    gap: 14px;
  }
  .secret-reveal-content:has(.reveal-effects) .reveal-effects { grid-column: auto; }
}
