/* v1.4: one table, with explanations beside it rather than between the cards. */
.learn-entry{margin-bottom:10px}.learn-entry+.tutorial-entry{margin-top:10px}
body.playing .topbar{padding:4px 16px;min-height:48px}
body.playing .topbar a{font-size:16px}body.playing .topbar a span{display:none}
body.playing main{min-height:0}body.playing footer{display:none}
.game-shell{max-width:1060px;padding:6px 16px 10px;min-height:calc(100svh - 48px);display:flex;flex-direction:column;gap:7px}
.game-top{gap:10px;min-height:42px}.game-top .eyebrow{font-size:11px;letter-spacing:.05em}.game-top h1{font-size:14px;margin:0;line-height:1.4}
.game-menu{display:flex;gap:5px}.game-menu button{font-size:12px;padding:7px 10px;min-height:40px}
.game-shell .phase-track{margin:0;flex-shrink:0}.game-shell .phase-track span{padding:3px;font-size:13px;line-height:1.35}.game-shell .phase-track small{margin:1px 0 0;font-size:10px}
.arena{display:flex;flex-direction:column;gap:6px;flex:1;justify-content:center;min-height:0}
.game-shell .players{display:grid;grid-template-columns:repeat(var(--cpu-count),minmax(0,1fr));gap:6px;overflow:visible;padding:0}
.game-shell .player{padding:6px 8px;min-width:0;border-radius:9px}
.game-shell .player-name{gap:4px;min-height:20px;flex-wrap:wrap;line-height:1.3}.game-shell .player-name strong{font-size:13px;white-space:nowrap}.game-shell .player .parent{margin:0;font-size:9px;padding:1px 4px}
.compact-score{display:inline-flex;align-items:center;gap:3px;margin-left:auto;white-space:nowrap;line-height:1.4}.compact-score i{display:block;width:9px;height:9px;border-radius:50%;background:#f8f4fa;border:1px solid #a491b1}.compact-score i.filled{background:#dfb654;border-color:#98711f}.compact-score b{font-size:11px;color:#715683;margin-left:2px}
.cpu-piles{display:flex;gap:12px;justify-content:space-between}.cpu-piles>div{min-width:0;flex:1}
.game-shell .pile-label{font-size:11px;margin:2px 0 1px;line-height:1.3}.game-shell .pile-label b{font-size:11px}
.game-shell .cpu-hand,.game-shell .cpu-carry{gap:3px;height:30px;margin:0;justify-content:flex-start;align-items:center}
.game-shell .cpu-hand img,.game-shell .cpu-carry .carry-place{width:20px;height:28px;min-width:0;flex-shrink:1;object-fit:contain}
.game-shell .live-action{min-height:24px;padding:2px 7px;font-size:12px;line-height:1.45;margin:0;border-radius:6px}
.game-shell .table{padding:8px 12px;border-radius:12px;display:grid;grid-template-columns:minmax(0,1fr) 70px;gap:14px;align-items:start}
.shared-zone{min-width:0}.game-shell .zone-title{font-size:14px;line-height:1.4;gap:5px;flex-wrap:nowrap}.game-shell .zone-title small{font-size:11px;margin-left:3px}
.game-shell .cards{min-height:0;padding:12px 0 8px;gap:8px;align-items:center}
.game-shell .board .card{width:var(--card-width);max-width:78px;min-width:0;flex:0 1 78px}
.game-shell .deck-zone{padding:0;align-self:start}.game-shell .deck-stack{padding-top:12px}.game-shell .deck-stack .card{width:62px;flex-basis:62px}
.game-shell .hand-zone{padding:6px 12px;background:#fffdf8;border:1px solid #d4c3df;border-radius:12px}
.game-shell .hand-zone.active-hand{border-color:#c9a14f;background:#fffbef}
.game-shell .hand-zone .zone-title>span:first-child{margin-right:auto;white-space:nowrap}.game-shell .hand-zone .parent{margin-left:6px;font-size:10px}
.game-shell .hand-zone .compact-score{margin:0 7px 0 0}.game-shell #hand-tools{min-height:32px;font-size:12px;padding:5px 8px;flex-shrink:0}
.game-shell .hand-slot{flex:0 1 83px;max-width:83px}.game-shell .hand .card{max-width:none}
.game-shell .card.chosen{transform:translateY(-4px)}.game-shell .card:not(:disabled):hover{transform:translateY(-3px)}
.game-shell .hand-status{max-width:none;width:100%;padding:2px 0 0;margin:0;min-height:28px;gap:6px;flex-wrap:nowrap;line-height:1.35}
.game-shell .role-label{font-size:13px;min-width:0}.game-shell .role-label span{display:block;font-size:10px;margin:0}
.game-shell .own-future{padding:3px 6px;flex-direction:row;align-items:center;gap:7px;width:auto;font-size:11px;border-radius:6px;flex-shrink:0}.game-shell .own-future>span{display:block}.game-shell .own-future>span>b{margin:0}
.game-shell .own-carry{margin:0;gap:2px}.game-shell .own-carry .carry-place{width:13px;height:18px;border-width:1px}
.game-shell .command-bar{position:relative;top:auto;width:100%;margin:0;padding:8px 11px;gap:10px;flex-wrap:nowrap;flex-shrink:0;border-radius:10px;box-shadow:none;z-index:2}
.game-shell .command-bar>div{min-width:0;flex:1}.game-shell .command-bar strong{font-size:14px;line-height:1.4}.game-shell .command-bar p{font-size:12px;line-height:1.45;margin-top:3px}
 .game-shell .command-bar .primary{font-size:13px;min-width:110px;max-width:210px;min-height:44px;padding:9px 11px;margin:0}
.game-shell .guide.coach{max-width:none;width:100%;margin:0;padding:8px 12px;border-radius:10px;flex-shrink:0;box-shadow:none;scroll-margin:0}
.coach-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;line-height:1.3;font-size:11px;color:#755185;font-weight:bold}
.coach-heading button{padding:4px 8px;min-height:28px;font-size:11px;color:#674274;text-decoration:underline}
.coach-copy h2{font-size:17px;margin:0 0 4px;line-height:1.45}.coach-copy p{font-size:14px;line-height:1.6;margin:0}
.coach-visual{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:4px;margin-top:7px;font-size:11px;color:#634177;line-height:1.4}.coach-visual b{font-size:12px}.coach-chip{padding:3px 5px;border:1px solid #bfa3ce;background:#fff;border-radius:4px;font-size:12px;color:#954035;font-weight:bold}.coach-chip.board{background:#edf7f1;border-color:#a7c6b2}.coach-chip.lost{text-decoration:line-through;opacity:.5;background:#e3dbe0}.coach-visual .coach-points{font-size:20px;color:#b08a32}.coach-visual img{width:15px;height:21px;border-radius:2px}
.game-shell .result-summary{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:5px 10px;background:#fff1ce;border:1px solid #ceae66;border-radius:9px;font-size:14px}.result-summary button{font-size:12px;min-height:36px;padding:6px 9px}
.game-shell .card-origin-tag{font-size:9px;padding:0;margin-top:2px;line-height:1.5}.game-shell .order-toolbar{margin:5px 0}.game-shell .order-controls{margin-top:4px}
.history-list{padding-left:20px}.history-list li{margin:10px 0}.modal .action-reference summary{font-size:17px}.modal .reference-grid{grid-template-columns:1fr}.modal .reference-grid span{font-size:17px}.modal .reference-grid small{font-size:14px}
@media(min-width:850px){
 .game-shell.is-tutorial{display:grid;grid-template-columns:minmax(0,1fr) 300px;grid-template-rows:auto auto 1fr auto;gap:10px 18px;max-width:1180px}
 .is-tutorial .game-top,.is-tutorial .phase-track{grid-column:1/-1}.is-tutorial .arena{grid-column:1;grid-row:3;align-self:stretch}.is-tutorial .coach{grid-column:2;grid-row:3;align-self:center}.is-tutorial .command-bar{grid-column:1/-1;grid-row:4}.is-tutorial .result-summary{grid-column:2;grid-row:3;align-self:start}.is-tutorial .coach-copy h2{font-size:20px}.is-tutorial .coach-copy p{font-size:16px}.is-tutorial .coach-visual{margin-top:14px}
}
@media(max-width:600px){
 body.playing .topbar{padding:2px 10px;min-height:44px}body.playing .topbar a{font-size:14px}body.playing .header-actions button{min-height:38px;padding:7px 9px}
 .game-shell{padding:4px 8px max(6px,env(safe-area-inset-bottom));min-height:calc(100svh - 44px);gap:5px}
 .game-top{min-height:36px;gap:4px}.game-top .eyebrow{font-size:10px}.game-top h1{font-size:12px}.game-menu{gap:4px}.game-menu button{font-size:11px;padding:5px 7px;min-height:36px}
 .game-shell .phase-track span{font-size:11px;padding:3px 1px}.game-shell .phase-track small{font-size:9px}
 .arena{gap:4px}.game-shell .players{gap:4px}.game-shell .player{padding:4px 5px;border-radius:7px}.game-shell .player-name strong{font-size:11px}.game-shell .player-name{gap:2px;min-height:17px}.game-shell .player .compact-score{width:100%;margin:2px 0;justify-content:flex-start}.game-shell .compact-score b{font-size:10px}.game-shell .compact-score i{width:7px;height:7px}
 .cpu-piles{display:block}.game-shell .pile-label{font-size:10px;margin:1px 0;line-height:1.3}.game-shell .pile-label b{font-size:10px}
 .game-shell .cpu-hand,.game-shell .cpu-carry{height:20px;gap:2px}.game-shell .cpu-hand img,.game-shell .cpu-carry .carry-place{width:12px;height:17px;flex-shrink:1}
 .game-shell .players[data-count="1"] .cpu-piles,.game-shell .players[data-count="2"] .cpu-piles{display:flex;gap:10px}
 .game-shell .players[data-count="1"] .player .compact-score,.game-shell .players[data-count="2"] .player .compact-score{width:auto;margin-left:auto}
 .game-shell .players[data-count="1"] .cpu-hand img,.game-shell .players[data-count="1"] .cpu-carry .carry-place{width:18px;height:25px}.game-shell .players[data-count="1"] .cpu-hand,.game-shell .players[data-count="1"] .cpu-carry{height:28px}
 .game-shell .live-action{min-height:23px;font-size:11px;padding:2px 5px}
 .game-shell .table{padding:5px 8px;grid-template-columns:minmax(0,1fr) 42px;gap:10px;border-width:1px}.game-shell .zone-title{font-size:12px}.game-shell .zone-title small{font-size:10px}.game-shell .shared-zone .zone-title>small{font-size:9px}
 .game-shell .cards{padding:10px 0 7px;gap:5px}.game-shell .board .card{max-width:49px;flex-basis:49px}.game-shell .deck-stack{padding-top:10px}.game-shell .deck-stack .card{width:38px;flex-basis:38px}.game-shell .deck-zone .zone-title{font-size:11px;gap:1px}
 .game-shell .hand-zone{padding:4px 8px}.game-shell .hand-slot{max-width:55px;flex-basis:55px}.game-shell #hand-tools{font-size:10px;min-height:29px;padding:4px 6px}.game-shell .hand-zone .compact-score{margin-right:3px}.game-shell .hand-zone .parent{font-size:9px;margin-left:4px;padding:1px 3px}
 .game-shell .hand-status{gap:4px;padding-top:1px;min-height:25px}.game-shell .role-label{font-size:11px}.game-shell .role-label span{font-size:9px}.game-shell .own-future{padding:3px 5px;gap:4px;font-size:10px}.game-shell .own-carry .carry-place{width:10px;height:14px}.game-shell .check{width:19px;height:19px;top:-7px;right:-5px;font-size:13px}.game-shell .tap-badge{font-size:9px;bottom:-8px;padding:0 4px}.game-shell .card.guide-target{outline-offset:2px}
 .game-shell .guide.coach{padding:6px 9px}.coach-heading{font-size:10px}.coach-heading button{min-height:26px;padding:3px 5px}.coach-copy h2{font-size:14px;margin-bottom:3px;line-height:1.4}.coach-copy p{font-size:12px;line-height:1.55}.coach-visual{font-size:10px;gap:3px;margin-top:5px}.coach-visual b{font-size:11px}.coach-chip{font-size:11px;padding:2px 4px}
 .game-shell .command-bar{padding:7px 9px;gap:7px;border-width:1px}.game-shell .command-bar strong{font-size:12px}.game-shell .command-bar p{font-size:11px;line-height:1.4}.game-shell .command-bar .primary{font-size:12px;min-width:85px;max-width:142px;padding:8px;min-height:44px}
 .game-shell .result-summary{font-size:12px;padding:3px 7px}.result-summary button{font-size:11px;min-height:32px}.game-shell .own-future>span>b{margin:0}
}
@media(max-height:680px) and (max-width:600px){.game-shell{gap:3px}.game-shell .arena{gap:3px}.game-shell .cards{padding:8px 0 6px}.game-shell .hand-slot{max-width:47px;flex-basis:47px}.game-shell .board .card{max-width:43px;flex-basis:43px}.game-shell .deck-stack .card{width:34px;flex-basis:34px}.game-shell .coach-visual{margin-top:3px}.game-shell .guide.coach{padding:4px 8px}.game-shell .coach-copy p{font-size:12px}.game-shell .coach-heading button{min-height:24px}.game-shell .command-bar{padding:5px 8px}}
@media(max-height:500px) and (min-width:601px){.game-shell{max-width:950px;display:grid;grid-template-columns:1fr 1fr;gap:5px 12px}.game-shell .game-top,.game-shell .phase-track,.game-shell .command-bar{grid-column:1/-1}.game-shell .arena{grid-column:1}.game-shell .coach{grid-column:2;align-self:center}.game-shell:not(.is-tutorial) .arena{grid-column:1/-1;display:grid;grid-template-columns:1fr 1fr}.game-shell:not(.is-tutorial) .players,.game-shell:not(.is-tutorial) .live-action{grid-column:1/-1}.game-shell .cards{padding:8px 0 5px}.game-shell .hand-slot{max-width:48px}.game-shell .board .card{max-width:43px}.game-shell .deck-stack .card{width:36px;flex-basis:36px}.game-shell .table{grid-template-columns:1fr 40px;gap:8px}.game-shell .player-name strong{font-size:12px}.game-shell .cpu-hand img,.game-shell .cpu-carry .carry-place{width:14px;height:20px}.game-shell .cpu-hand,.game-shell .cpu-carry{height:22px}.game-shell .cpu-piles{gap:7px}.game-shell .coach-copy p{font-size:13px}}
/* In the guided two-player lesson, give the board the height saved by the CPU summary. */
@media(max-width:600px){
 .game-shell.is-tutorial .players .player{display:grid;grid-template-columns:65px minmax(0,1fr);gap:7px;align-items:center}
 .game-shell.is-tutorial .players .player-name{align-content:center}
 .game-shell.is-tutorial .players .player .compact-score{width:100%;margin:2px 0 0}
 .game-shell.is-tutorial .command-bar strong{display:none}
 .game-shell.is-tutorial .command-bar p{margin:0}
 .game-shell.is-tutorial .players .cpu-hand,.game-shell.is-tutorial .players .cpu-carry{height:24px}
 .game-shell.is-tutorial .players .cpu-hand img,.game-shell.is-tutorial .players .cpu-carry .carry-place{width:16px;height:22px}
 .game-shell.is-tutorial .coach-visual>span:not(.coach-chip){font-size:10px}
}

.coach-chip[data-color="青"]{color:#286191}.coach-chip[data-color="緑"]{color:#2f6e53}.coach-chip[data-color="黄"]{color:#846316}
