/* Readable controls for choosing a table and playing a match. */
body{font-size:16px}
body:not(.in-game) header{height:76px;max-width:1160px;padding:0 24px}
body:not(.in-game) .brand{font-size:30px}
body:not(.in-game) .brand-sub{font-size:11px;letter-spacing:1.7px}
body:not(.in-game) .wallet-button{font-size:16px;padding:11px 16px}
body:not(.in-game) .icon{width:44px;height:44px;font-size:21px}
body:not(.in-game) .header-actions .secondary{font-size:16px;min-height:44px}
.lobby-home.home{display:grid;grid-template-columns:minmax(0,1.65fr) minmax(310px,1fr);grid-template-areas:'intro intro' 'options play' 'results results';align-items:start;gap:24px;max-width:1120px;margin:24px auto;padding:0 24px}
.home-intro{grid-area:intro}
.home-intro h1{font-size:42px;line-height:1.15;letter-spacing:-1.4px;margin:0 0 8px}
.home-intro p{font-size:18px;line-height:1.5;color:#c9d9cd;margin:0}
.table-options.setup{grid-area:options;padding:28px;background:#f3f0e6;color:#243b2f;border:1px solid #fff8;border-radius:24px;box-shadow:0 12px 36px #07170e24;text-align:left;min-width:0}
.home-field{min-width:0;padding:0;margin:0;border:0}
.home-field legend{padding:0;margin:0 0 12px;font-size:18px;font-weight:700;line-height:1.3;letter-spacing:0}
.home-choices{display:grid;gap:8px}
.choice-modes,.choice-players{grid-template-columns:repeat(3,minmax(0,1fr))}
.choice-stakes{grid-template-columns:repeat(4,minmax(0,1fr))}
.home-choice{position:relative;min-height:64px;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:4px;padding:12px 8px;border:2px solid #d8dfd4;border-radius:12px;background:#fffdf7;color:#354c3d;font-size:18px;font-weight:600;line-height:1.2;box-shadow:0 2px 0 #d3d8cd40}
.home-choice.active{background:#28573e;border-color:#28573e;color:#fff7df;box-shadow:0 3px 0 #183d2b}
.home-choice:focus-visible{outline:3px solid #98671d;outline-offset:3px}
.home-choice.active::after{content:'';position:absolute;left:25%;right:25%;height:3px;bottom:6px;border-radius:3px;background:#edcf85}
.home-choice strong{font-size:26px;line-height:1.1;font-weight:750}
.choice-players .home-choice,.choice-stakes .home-choice{min-height:78px;padding-bottom:16px}
.choice-players .home-choice>span,.choice-stakes .home-choice>span{font-size:15px;font-weight:500}
.choice-stakes .home-choice:first-child>span{font-size:16px;font-weight:600;line-height:1.3}
.mode-explanation{font-size:16px;line-height:1.5;color:#56685b;min-height:48px;margin:14px 0 0}
.home-pair{display:grid;grid-template-columns:1fr;gap:24px;margin-top:22px}
.more-settings{width:100%;display:flex;align-items:center;justify-content:space-between;gap:12px;border-top:1px solid #c7d0c1;margin-top:24px;padding:20px 0 0;text-align:left;font-size:16px;font-weight:600;line-height:1.4;color:#294c37}
.more-settings>span:last-child{display:flex;align-items:center;justify-content:flex-end;gap:8px;font-size:15px;font-weight:500;text-align:right;color:#576c5c}
.more-settings b{font-size:28px;line-height:1;color:#28573e;font-weight:500}
.table-options .resume-button{padding:14px 10px;font-size:16px;line-height:1.4;color:#28573e;background:#e5e9dc;border:1px solid #b6c6b0;margin-top:18px}
.home-play{grid-area:play;padding:28px 24px;border:1px solid #8ba88538;border-radius:24px;background:#1c382bee;box-shadow:0 12px 36px #091e1924;min-width:0}
.play-intro{text-align:center;margin-bottom:24px}
.play-intro h2{font-size:24px;line-height:1.3;letter-spacing:-.5px}
.play-cards{height:143px;display:flex;justify-content:center;align-items:center;margin-bottom:20px}
.play-cards>div{transform:translateY(var(--lift)) rotate(var(--angle));margin-left:-20px}
.play-cards>div:first-child{margin-left:0}
.play-cards .card{width:82px;box-shadow:0 10px 24px #0004}
.home-main{display:flex;align-items:center;justify-content:center;flex-direction:column;gap:6px;width:100%;min-height:82px;padding:16px 8px}
.home-main>span{font-size:23px;font-weight:800;line-height:1.2}
.home-main>small{font-size:16px;font-weight:500;color:#455638}
.home-online{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:14px}
.home-online .secondary{display:flex;align-items:center;justify-content:center;gap:6px;min-height:58px;padding:12px 6px;background:#ffffff0b;font-size:18px;font-weight:600;white-space:nowrap}
.entry-note{font-size:16px;line-height:1.5;text-align:center;color:#c4d6bf;margin:22px 0 0}
.lobby-home .home-bottom{grid-area:results;margin:0;padding:0 4px;font-size:16px;color:#c9d9cb}
.lobby-home .home-bottom .ghost{font-size:16px;min-height:44px;padding:10px 0;color:#d7e4d6}
.lobby-home~footer{display:none}

/* Sheets and secondary screens share the larger type. */
.veil{z-index:100}
.modal{font-size:16px;line-height:1.55}
.modal h2{font-size:25px;line-height:1.2}
.modal p,.modal li{font-size:16px;line-height:1.55}
.modal label{font-size:16px;line-height:1.4;margin-top:20px}
.modal .segmented button{font-size:16px;min-height:46px;padding:10px 6px;white-space:normal}
.modal .rule-description,.modal .micro{font-size:14px;line-height:1.5}
.modal .check{font-size:16px;line-height:1.4}
.modal input{font-size:18px;min-height:48px}
.modal .primary,.modal .secondary{font-size:17px;min-height:48px}
.hand-modes strong{font-size:17px}
.hand-modes small{font-size:14px;line-height:1.45}
.lobby p{font-size:17px;line-height:1.5}
.member{font-size:18px}
#toast{font-size:16px;line-height:1.4}

/* Role, turn and action captions need to be readable beside the cards. */
.game-toolbar strong{font-size:18px}
.game-toolbar>div>span{font-size:14px;line-height:1.4}
.toolbar-button,.toolbar-button span{font-size:15px}
.opponent-info strong{font-size:16px}
.opponent-info div>span{font-size:13px;line-height:1.3}
.status-heading strong{font-size:20px}
.turn-route{font-size:14px;line-height:1.4}
.player-caption,.player-caption>span:nth-child(2){font-size:13px;letter-spacing:0}
.hand-sort-button{font-size:14px;min-height:36px}
.actions .primary,.actions .secondary{font-size:17px;min-height:46px}
.actions .ghost{font-size:15px}
.last-move{font-size:13px}
.target-label{font-size:12px}
.transfer-zone{font-size:16px}
.transfer-zone small{font-size:12px}
.connection-state{font-size:13px}
.empty-table{color:#b6ceb0}
.empty-table p{font-size:18px;color:#dde8d6}
.empty-table small{font-size:14px;color:#c2d5ba}
.deck-zone>span,.discard-zone>span{font-size:11px;color:#bad0ae}
.in-game header{gap:8px}
.in-game .wallet-button{font-size:13px;padding:8px 10px}
.in-game .header-actions .icon{width:34px;height:34px;font-size:17px}

@media(max-width:800px) and (min-width:641px){
  .lobby-home.home{grid-template-columns:minmax(0,1.35fr) minmax(260px,1fr);gap:18px;padding:0 18px}
  .table-options.setup{padding:20px}
  .home-choice{font-size:16px;padding-left:4px;padding-right:4px}
  .home-play{padding:22px 16px}
  .home-main>span{font-size:21px}
  .home-online .secondary{font-size:16px}
}
@media(max-width:640px){
  body:not(.in-game) header{height:62px;padding:0 14px;gap:8px}
  body:not(.in-game) .brand{font-size:26px;gap:8px;letter-spacing:-.7px}
  body:not(.in-game) .brand-icon{font-size:32px}
  body:not(.in-game) .wallet-button{font-size:14px;padding:10px 11px}
  body:not(.in-game) .header-actions{gap:6px}
  body:not(.in-game) .icon{width:38px;height:38px;font-size:19px}
  body:not(.in-game) .header-actions .secondary{min-height:38px;min-width:38px;padding:7px;font-size:19px}
  body:not(.in-game) .header-actions .secondary span{display:none}
  .lobby-home.home{display:grid;grid-template-columns:minmax(0,1fr);grid-template-areas:'intro' 'options' 'results';gap:14px;margin:16px auto 0;padding:0 14px calc(176px + env(safe-area-inset-bottom))}
  .home-intro h1{font-size:30px;letter-spacing:-.7px;margin-bottom:6px}
  .home-intro p{font-size:16px;line-height:1.4}
  .table-options.setup{padding:20px 16px;border-radius:20px}
  .home-field legend{font-size:17px;margin-bottom:10px}
  .home-choices{gap:6px}
  .home-choice{font-size:16px;min-height:54px;padding:10px 3px;border-radius:10px}
  .home-choice.active::after{bottom:5px;height:2px}
  .home-choice strong{font-size:25px}
  .choice-players .home-choice,.choice-stakes .home-choice{min-height:64px;padding:8px 3px 12px;gap:2px}
  .choice-players .home-choice>span,.choice-stakes .home-choice>span{font-size:14px}
  .choice-stakes .home-choice:first-child>span{font-size:15px}
  .mode-explanation{font-size:15px;line-height:1.4;min-height:42px;margin-top:12px}
  .home-pair{margin-top:20px;gap:20px}
  .more-settings{margin-top:20px;padding-top:16px;font-size:16px}
  .more-settings>span:last-child{max-width:55%;font-size:14px}
  .home-play{position:fixed;z-index:25;left:10px;right:10px;bottom:calc(10px + env(safe-area-inset-bottom));padding:10px;border-radius:18px;background:#183729;box-shadow:0 -10px 24px #10261f70,0 8px 20px #0003}
  .play-intro,.entry-note{display:none}
  .home-main{min-height:58px;padding:12px 8px}
  .home-main>span{font-size:21px}
  .home-main>small{display:none}
  .home-online{gap:8px;margin-top:10px}
  .home-online .secondary{font-size:17px;min-height:46px;padding:10px 6px;background:#ffffff0c}
  .lobby-home .home-bottom{font-size:15px;padding:0 4px}
  .lobby-home .home-bottom .ghost{font-size:16px}
  .modal{padding:22px 18px}
  .modal h2{font-size:23px}
  .modal .segmented button{font-size:15px}
  .game-toolbar strong{font-size:15px}
  .game-toolbar>div>span{font-size:11px;line-height:1.35}
  .toolbar-button,.toolbar-button span{font-size:12px}
  .opponent-info strong{font-size:13px;max-width:76px}
  .opponent-info div>span{font-size:11px;max-width:94px;line-height:1.2}
  .opponent-info{padding:7px 4px}
  .card-count{font-size:14px}
  .status-heading strong{font-size:17px}
  .turn-route{font-size:12px;line-height:1.35}
  .player-caption{font-size:12px;gap:5px}
  .hand-sort-button{font-size:12px;padding:7px 9px;min-height:34px}
  .actions .primary,.actions .secondary{font-size:15px;padding:11px 16px;min-height:44px}
  .actions .ghost{font-size:14px}
  .last-move{font-size:11px}
  .target-label{font-size:10px}
  .transfer-zone{font-size:14px}
  .empty-table p{font-size:15px}
  .empty-table small{font-size:12px}
  .deck-zone>span,.discard-zone>span{font-size:9px}
}

@media(max-width:640px) and (max-height:740px){
  .lobby-home.home{margin-top:12px;gap:12px}
  .home-intro h1{font-size:28px;margin:0}
  .home-intro p,.mode-explanation{display:none}
  .table-options.setup{padding:16px}
  .home-field legend{margin-bottom:8px}
  .home-choice{min-height:48px}
  .choice-players .home-choice,.choice-stakes .home-choice{min-height:56px}
  .choice-players .home-choice>span,.choice-stakes .home-choice:not(:first-child)>span{display:none}
  .choice-players .home-choice,.choice-stakes .home-choice{padding:6px 2px 10px;gap:0}
  .choice-stakes .home-choice:first-child>span{line-height:1.15}
  .home-choice strong{font-size:23px}
  .home-pair{margin-top:16px;gap:16px}
  .home-play{bottom:calc(8px + env(safe-area-inset-bottom))}
  .home-main{min-height:54px}
}
@media(max-height:500px) and (min-width:641px){
  body:not(.in-game) header{height:54px}
  .lobby-home.home{margin-top:14px;gap:14px;grid-template-areas:'options play' 'results results'}
  .home-intro,.play-intro,.mode-explanation{display:none}
  .table-options.setup,.home-play{padding:18px}
  .home-field legend{font-size:16px;margin-bottom:8px}
  .home-choice{font-size:16px;min-height:46px}
  .home-pair{grid-template-columns:.8fr 1.4fr;margin-top:16px;gap:14px}
  .home-choice strong{font-size:23px}
  .choice-players .home-choice,.choice-stakes .home-choice{min-height:60px;padding:6px 2px 10px}
  .choice-players .home-choice>span{display:none}
  .more-settings{margin-top:16px;padding-top:12px;font-size:15px}
  .more-settings>span:last-child{font-size:14px}
  .home-main{min-height:68px}
  .home-main>span{font-size:21px}
  .home-main>small,.entry-note{font-size:15px}
  .home-online .secondary{font-size:17px;min-height:48px}
  .entry-note{margin-top:16px}
  .game-toolbar strong{font-size:13px}
  .game-toolbar>div>span{font-size:11px}
  .toolbar-button,.toolbar-button span{font-size:12px}
  .opponent-info strong{font-size:13px}
  .opponent-info div>span{font-size:11px}
  .status-heading strong{font-size:14px}
  .turn-route{font-size:11px}
  .actions .primary,.actions .secondary{font-size:13px;min-height:38px;padding:9px 12px}
  .actions .ghost{font-size:12px}
  .hand-sort-button{font-size:11px;min-height:30px}
  .target-label{font-size:10px}
}

@media(max-width:360px){
  body:not(.in-game) .brand-icon{display:none}
  body:not(.in-game) .header-actions{gap:4px}
  .lobby-home.home{padding-left:10px;padding-right:10px}
  .table-options.setup{padding-left:12px;padding-right:12px}
  .choice-modes{grid-template-columns:.83fr 1fr 1.12fr;gap:4px}
  .choice-modes .home-choice{border-width:1px;padding-left:0;padding-right:0}
}
.move-choices{display:flex;gap:12px;margin:20px 0}
.move-choices button{flex:1;min-height:52px;font-size:18px}
.choice-stakes{grid-template-columns:repeat(5,minmax(0,1fr))}
.choice-stakes .stake-custom strong{font-size:18px}
.stake-available{display:flex;align-items:center;justify-content:space-between;gap:8px}
.stake-available strong{color:var(--gold);overflow-wrap:anywhere}
#stake-amount{font-size:26px;text-align:center;font-weight:700;min-height:54px}
#stake-range{display:block;width:100%;min-height:44px;margin:8px 0 0;padding:0;border:0;accent-color:#28573e;cursor:pointer}
.stake-range-labels{display:flex;justify-content:space-between;gap:16px;font-size:13px;color:#b8c9be}
.stake-presets{display:flex;flex-wrap:wrap;gap:6px;margin:16px 0 8px}
.stake-presets button{flex:1;min-width:60px;min-height:44px;padding:8px;font-size:16px}
.stake-fractions{display:flex;gap:8px}
.stake-fractions button{flex:1;min-width:0;min-height:44px;padding:8px;font-size:16px}
.stake-error{min-height:20px;font-size:14px;color:#f49b8b;margin:8px 0}
.stake-bank{text-align:center;overflow-wrap:anywhere}
@media(max-width:640px){.choice-stakes .home-choice strong{font-size:22px}.choice-stakes .stake-custom strong{font-size:16px}}

@media(max-height:500px) and (min-width:641px){
 .lobby-home.home{grid-template-columns:1.6fr 1fr}
 .home-pair{grid-template-columns:.65fr 1.6fr;gap:10px}
 .choice-stakes .home-choice:not(:first-child):not(.stake-custom)>span{display:none}
}

.stake-fractions button:last-child{flex:2}

.leaderboard-wrap{overflow-x:auto;max-width:100%}
.modal .chip-leaderboard{font-size:16px;table-layout:fixed}
.modal .chip-leaderboard th{font-size:14px;color:#b8c9be}
.modal .chip-leaderboard td,.modal .chip-leaderboard th{padding:12px 4px}
.chip-leaderboard th:nth-child(1){width:8%}
.chip-leaderboard th:nth-child(2){width:26%}
.chip-leaderboard th:nth-child(3){width:26%}
.chip-leaderboard th:nth-child(4),.chip-leaderboard th:nth-child(5){width:20%}
.chip-leaderboard .leader-name{overflow-wrap:anywhere}
.chip-leaderboard .leader-points{color:var(--gold);font-weight:700;white-space:nowrap}
@media(max-width:640px){.leader-modal{padding:20px 12px}.modal .chip-leaderboard{font-size:13px}.modal .chip-leaderboard th{font-size:12px}.modal .chip-leaderboard td,.modal .chip-leaderboard th{padding:10px 2px}}
