:root{font-family:ui-rounded,'Arial Rounded MT Bold','Trebuchet MS',sans-serif;color:#183e36;background:#f5efdf;font-synthesis:none;--ink:#183e36;--cream:#fffaf0;--orange:#ee693f;--gold:#f0bb4c;--line:#d9d6c4}
*{box-sizing:border-box}body{margin:0;background:radial-gradient(ellipse at 5% 30%,#f6dba855,transparent 50%),#f5efdf}button,input,select{font:inherit}button{cursor:pointer;touch-action:manipulation;min-height:54px;border-radius:12px;border:1px solid var(--line);font-weight:800;padding:12px 18px;color:var(--ink);background:var(--cream)}button:hover:not(:disabled){border-color:var(--ink);transform:translateY(-1px)}button:disabled{opacity:.48;cursor:default}button:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #ee693f;outline-offset:3px}.primary{background:var(--ink);color:var(--cream);border-color:var(--ink);box-shadow:0 4px 0 #0a251e}.accent{background:var(--orange);color:white;border-color:#c14c29;box-shadow:0 4px 0 #c14c29}.secondary{background:transparent}.small{min-height:44px;padding:9px 12px;font-size:13px}a{color:inherit}h1,h2,h3,p{margin-top:0}h1{font-size:clamp(36px,5vw,62px);line-height:1.03;letter-spacing:-2px}h2{font-size:24px;letter-spacing:-.7px}h3{font-size:17px}p{line-height:1.55}small,.muted{color:#697a70}.eyebrow{font-size:11px;font-weight:900;letter-spacing:2px;text-transform:uppercase}.masthead{max-width:1240px;margin:auto;padding:22px 30px;display:flex;gap:24px;align-items:center;justify-content:space-between}.brand{text-decoration:none;display:block;font-size:25px;font-weight:1000;line-height:.85;letter-spacing:-1.5px;transform:rotate(-4deg)}.brand>span{display:block;color:var(--orange)}.paw{color:var(--gold);margin-left:5px}.edition{font-size:10px;letter-spacing:2px;line-height:1.8;font-weight:900;text-align:right;margin-left:auto}.edition span{display:block;font-size:11px;letter-spacing:.2px;font-weight:400}.icon-button{border:2px solid var(--ink);font-size:19px;border-radius:50%;min-width:44px;min-height:44px;padding:5px}.checker{height:9px;background:conic-gradient(var(--ink) 25%,transparent 0 50%,var(--ink) 0 75%,transparent 0) 0 0/18px 18px;opacity:.8}main{max-width:1240px;margin:auto;padding:28px 30px 48px;min-height:75vh}footer{border-top:1px solid var(--line);max-width:1180px;margin:auto;padding:20px;font-size:11px;color:#6d7b70;text-align:center}footer span{margin:0 10px;color:var(--orange)}.panel{border:1px solid var(--line);border-radius:22px;background:var(--cream);padding:24px;box-shadow:0 5px 0 #e5decc}.home{display:grid;grid-template-columns:1.1fr 1fr;gap:60px;align-items:center;min-height:600px}.intro .eyebrow{color:#ab512d;margin-bottom:20px}.intro h1 em{font-style:normal;color:var(--orange)}.intro>p{max-width:460px;color:#647367}.hero-cards{height:250px;position:relative;margin:28px 0}.hero-cards img{width:145px;height:198px;object-fit:cover;border:5px solid var(--cream);border-radius:15px;box-shadow:0 12px 22px #243b3228;position:absolute;top:15px}.hero-cards img:nth-child(1){left:15px;transform:rotate(-13deg)}.hero-cards img:nth-child(2){left:125px;top:0;transform:rotate(2deg)}.hero-cards img:nth-child(3){left:235px;transform:rotate(15deg)}.pill{border-radius:30px;background:#e4ebdc;padding:7px 11px;font-size:11px;display:inline-block;font-weight:800}.form-grid{display:grid;gap:16px}label{display:grid;gap:8px;font-size:12px;font-weight:800}input,select{width:100%;min-height:54px;border:1px solid #c8cebf;background:white;border-radius:10px;padding:12px;color:var(--ink)}input.code{text-transform:uppercase;letter-spacing:4px}.divider{display:flex;gap:14px;align-items:center;color:#7e8579;font-size:11px;margin:24px 0}.divider:before,.divider:after{content:'';height:1px;background:var(--line);flex:1}.row{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.spread{justify-content:space-between}.stack{display:grid;gap:16px}.lobby{max-width:700px;margin:20px auto}.room-code{font-size:40px;font-weight:1000;letter-spacing:6px}.player-list{display:grid;gap:10px;margin:20px 0}.player-line{display:flex;align-items:center;gap:12px;background:#f0f1e6;padding:10px 14px;border-radius:12px}.avatar{height:36px;width:36px;display:inline-grid;place-items:center;border-radius:50%;font-weight:900;background:var(--player-color,#efbb4d);color:#183e36;flex:none}.player-line .status{margin-left:auto;font-size:12px}.dot{width:7px;height:7px;background:#3f9c66;border-radius:50%;display:inline-block;margin-right:5px}.dot.off{background:#b79e83}.invite{word-break:break-all;font-size:13px}.phase-bar{display:flex;gap:16px;align-items:center;margin-bottom:20px}.phase-bar h1{font-size:30px;letter-spacing:-1px;margin:2px 0}.phase-copy{flex:1}.phase-copy p{font-size:13px;margin:4px 0 0;color:#6d7b70}.timer{border:2px solid var(--ink);border-radius:50%;width:58px;height:58px;display:grid;place-items:center;font-weight:900;flex:none;font-variant-numeric:tabular-nums}.timer.urgent{color:#c64729;border-color:#c64729}.game-grid{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(0,1fr);gap:22px;align-items:start}.board-panel{padding:18px;overflow:hidden}.board-meta{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px}.board-meta .eyebrow{font-size:10px}.race-wrap{width:100%;aspect-ratio:2.1;overflow:hidden;border-radius:14px;background:#214b40}.race-wrap canvas{display:block!important;max-width:100%}.scores{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}.score{font-size:11px;display:flex;gap:5px;align-items:center}.score .avatar{height:24px;width:24px;font-size:11px}.cup-block{display:flex;gap:15px;align-items:center;margin-top:18px;padding:15px;background:#f1ecda;border-radius:14px}.cup-block>img{width:78px;border-radius:8px;transform:rotate(-4deg);box-shadow:0 3px 6px #0002}.cup-block h3{margin:5px 0 8px}.stat{display:inline-block;font-size:12px;font-weight:900;border-radius:6px;padding:4px 7px;color:white;background:#17608c}.stat.s1{background:#b95524}.stat.s2{background:#478234}.cup-order{display:flex;gap:5px;flex-wrap:wrap;align-items:center;font-size:11px}.hand-panel{padding:20px}.section-label{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px}.section-label h2{font-size:17px;margin:0}.cards{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px}.card{padding:0;min-height:0;border:3px solid transparent;border-radius:11px;background:transparent;position:relative;box-shadow:none;overflow:hidden;transition:transform .15s,border .15s;line-height:0}.card img{display:block;width:100%;aspect-ratio:1632/2220;object-fit:cover;border-radius:7px}.card.selected{border-color:var(--orange);transform:translateY(-5px);box-shadow:0 5px 0 #d7592b}.card.placed{opacity:.55}.card:disabled{opacity:.6}.selection-info{font-size:12px;line-height:1.5;min-height:43px;margin:12px 0;color:#5d7063}.selection-info strong{color:var(--ink)}.hand-actions{margin-top:20px;padding-top:18px;border-top:1px solid var(--line)}.target-buttons{display:flex;gap:7px;flex-wrap:wrap;margin:10px 0}.target-buttons button{font-size:12px;padding:8px 12px;min-height:48px}.target-buttons button.selected{background:var(--gold);border-color:var(--ink)}.controls{display:grid;gap:10px;margin-top:15px}.controls .row>*{flex:1}.ready-message{padding:14px;background:#e3eddf;border-radius:12px;font-size:13px}.table-actions{display:grid;gap:7px;margin-top:18px}.table-action{padding:10px 12px;border-radius:10px;background:#eee9db;font-size:12px;display:flex;gap:8px;align-items:center}.table-action img{height:56px;border-radius:5px}.table-action.fresh{border-left:4px solid var(--orange)}.result-panel{margin-top:18px}.results{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.result-card{padding:12px;background:#eeeede;border-radius:12px;display:flex;align-items:center;gap:10px}.result-card.winner{background:#f8e4a9;outline:1px solid #d2aa46}.result-card img{width:62px;border-radius:7px}.result-card p{font-size:12px;margin:5px 0}.result-card strong{font-size:13px}.result-card .stat{padding:3px 5px}.badge{font-size:10px;background:#173d35;color:white;padding:3px 5px;border-radius:5px;display:inline-block;margin-top:5px}.network{position:sticky;top:0;z-index:20;background:#f1c24d;color:#173d35;padding:12px;text-align:center;font-size:13px}.network[hidden]{display:none}.network~main.offline{opacity:.65;pointer-events:none}#toast{position:fixed;bottom:24px;left:50%;transform:translateX(-50%);background:#183e36;color:white;padding:15px 24px;border-radius:14px;z-index:50;max-width:90vw;box-shadow:0 6px 30px #0003;font-size:14px}dialog{border:1px solid var(--line);background:var(--cream);color:var(--ink);border-radius:20px;padding:28px;max-width:550px;width:calc(100% - 30px);max-height:90dvh}dialog::backdrop{background:#17382ecc;backdrop-filter:blur(3px)}dialog .close{float:right;min-height:44px;width:44px;padding:0;font-size:28px;margin:-12px -12px 10px 10px}dialog img{max-height:60dvh;max-width:100%;border-radius:12px;display:block;margin:auto}.explanation{font-size:12px;line-height:1.6;color:#627464}.finish{padding:24px;background:#f3dd9c;border-radius:16px;margin-bottom:20px;text-align:center}.finish h2{font-size:30px;margin-bottom:7px}.finish p{margin-bottom:0}.loading{text-align:center;padding:100px 0}.help-list{padding-left:20px;font-size:14px;line-height:1.7}.no-actions{padding:20px;text-align:center;font-size:13px;color:#67776a;background:#f1eee3;border-radius:12px}.history{margin-top:18px;font-size:12px}.history summary{min-height:44px;cursor:pointer;display:flex;align-items:center}.history p{margin:4px 0}.resume{margin-top:18px}.full{width:100%}.busy{opacity:.65;pointer-events:none}.phase-tag{font-size:11px;background:#e5e9dc;border-radius:5px;padding:5px 7px}.preview-link{min-height:44px;padding:5px 10px;font-size:11px;float:right}
@media(max-width:850px){.masthead{padding:18px 20px}.edition{font-size:8px;letter-spacing:1px}.home{gap:25px;min-height:500px}.hero-cards img{width:115px;height:156px}.hero-cards img:nth-child(2){left:90px}.hero-cards img:nth-child(3){left:170px}.hero-cards{height:190px}.game-grid{grid-template-columns:1fr}.board-panel{padding:14px}.race-wrap{aspect-ratio:2.8}.hand-panel{padding:18px}.cards{gap:12px}.card img{max-height:210px;object-fit:cover}.cup-block>img{width:58px}.cup-block{margin-top:12px;padding:10px}.board-meta{margin-bottom:8px}}
@media(max-width:580px){main{padding:22px 14px 32px}.masthead{padding:17px 18px}.brand{font-size:23px}.edition{max-width:175px;font-size:7px}.edition span{font-size:9px}.home{display:block;min-height:0}.intro h1{font-size:43px;max-width:340px}.intro>p{font-size:14px;margin-bottom:0}.intro .eyebrow{margin-bottom:14px;font-size:9px}.hero-cards{height:170px;margin:20px 0 12px}.hero-cards img{width:108px;height:147px}.hero-cards img:nth-child(1){left:24px}.hero-cards img:nth-child(2){left:115px}.hero-cards img:nth-child(3){left:208px}.panel{border-radius:17px;padding:20px}.phase-bar{gap:10px;margin-bottom:15px}.phase-bar h1{font-size:24px}.phase-copy p{font-size:12px}.timer{width:49px;height:49px;font-size:14px}.phase-bar .eyebrow{font-size:9px}.game-grid{gap:16px}.board-panel{padding:12px}.board-meta .eyebrow{font-size:9px}.race-wrap{aspect-ratio:2.05}.hand-panel{padding:15px}.cards{gap:6px}.card{border-width:2px;border-radius:8px}.card img{border-radius:5px}.cup-block h3{font-size:16px}.cup-block .eyebrow{font-size:9px}.cup-order{font-size:10px}.stat{font-size:10px;padding:4px}.selection-info{font-size:11px}.scores{gap:10px}.results{gap:8px}.result-card{display:block;padding:10px}.result-card img{width:56px;float:left;margin:0 8px 8px 0}.result-card p{font-size:11px;clear:both}.result-card strong{font-size:12px}.board-meta button{padding:6px 10px}.room-code{font-size:32px}.phase-tag{font-size:10px}.result-panel h3{font-size:15px}footer{font-size:10px}.row.tight{gap:6px}}
@media(prefers-reduced-motion:reduce){*{transition:none!important;scroll-behavior:auto!important}}
@media(max-width:580px){.race-wrap{aspect-ratio:3.4}.board-panel>.table-actions:not(:has(img)){display:flex;flex-wrap:wrap;gap:6px;margin-top:10px}.board-panel>.table-actions:not(:has(img)) .table-action{padding:6px 8px;font-size:10px;flex:1;display:block}.board-panel>.table-actions:not(:has(img)) .table-action strong{margin-right:5px}.history{margin-top:4px}.history summary{min-height:32px;font-size:10px}.scores{font-size:10px}.score{font-size:10px}.cup-block{gap:10px}.cup-block>img{width:46px}.cup-block h3{margin:3px 0 6px}.cup-order .stat{font-size:9px}.board-meta button{min-height:36px}.phase-bar{margin-bottom:12px}}
/* V2 — an untimed, dedicated screen for each phase. */
.playing{height:100dvh;overflow:hidden}.playing .masthead{height:48px;padding:7px 18px}.playing .brand{font-size:18px}.playing .edition{font-size:8px}.playing .edition span{display:none}.playing .checker{height:5px}.playing footer{display:none}.playing main{height:calc(100dvh - 53px);min-height:0;padding:10px 18px;max-width:1400px}.playing .icon-button{min-width:32px;min-height:32px;font-size:15px}.playing .install-button{display:none}.playing .network:not([hidden]){position:fixed;inset:50px 0 auto;z-index:50}.play-screen{height:100%;display:flex;flex-direction:column;gap:7px}.screen-heading{display:flex;align-items:center;justify-content:space-between;flex:none;min-height:46px}.screen-heading h1{font-size:25px;letter-spacing:-.7px;line-height:1.1;margin:3px 0 0}.screen-heading .eyebrow{font-size:9px}.screen-heading>button{min-height:40px;min-width:44px;font-size:18px}.screen-main{flex:1;min-height:0;display:flex;flex-direction:column;gap:8px}.presence{display:flex;gap:8px;flex-wrap:wrap;justify-content:center;flex:none;min-height:22px;font-size:10px}.presence-player{display:inline-flex;gap:4px;align-items:center}.presence-player>b{display:inline-grid;place-items:center;border-radius:50%;width:18px;height:18px}.phase-controls{flex:none;display:flex;gap:8px;align-items:center;justify-content:center;min-height:54px}.phase-controls>.primary{min-width:220px}.phase-controls button{min-height:50px;padding:10px 16px}.waiting-note{font-size:13px;background:#e0eadb;border-radius:12px;padding:14px;text-align:center;flex:1}.play-layout,.reveal-layout,.battle-layout,.maintenance-layout{flex:1;min-height:0;display:flex;flex-direction:column;gap:8px}.mini-board{flex:none;display:flex;align-items:stretch;gap:8px;background:#dfe7d7;border:1px solid #bccab3;border-radius:12px;padding:5px 7px;min-height:58px}.mini-lanes{flex:1;min-width:0;display:flex;flex-direction:column}.mini-numbers{display:grid;grid-template-columns:repeat(var(--cells),1fr);font-size:9px;font-weight:bold;text-align:center;height:13px;line-height:13px}.mini-lane{height:16px;position:relative;background:#536353}.mini-cells{position:absolute;inset:0;display:grid;grid-template-columns:repeat(var(--cells),1fr)}.mini-cells>span{border:1px solid #e0e7c5;border-right:0}.mini-cells>span:last-child{border-right:1px solid #e0e7c5;background:#2c4036}.mini-cells>.segment{border-left:2px solid #ffedbc}.mini-token{position:absolute;top:1px;transform:translateX(-50%);border-radius:3px;font-size:10px;line-height:14px;height:14px;min-width:14px;text-align:center;font-weight:900;color:#173d35;box-shadow:0 1px 2px #0008}.finish-cup{width:43px;padding:0;border:0;min-height:0;background:transparent;flex:none;display:flex;align-items:center}.finish-cup img{width:100%;border-radius:5px}.criteria{display:flex;align-items:center;justify-content:center;gap:6px;font-size:11px;flex:none;line-height:1.3}.criteria .stat{font-size:11px;padding:4px 7px}.zones{flex:1;min-height:95px;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px}.zones.count-2{grid-template-columns:repeat(2,minmax(0,1fr))}.zones.count-3{grid-template-columns:repeat(3,minmax(0,1fr))}.player-zone{border:2px dashed var(--zone);border-radius:14px;background:#fffaf0;padding:8px;display:flex;flex-direction:column;min-height:0;overflow:hidden;transition:background .15s}.player-zone.mine{border-style:solid}.zone-title{display:flex;gap:6px;align-items:center;font-size:12px;flex:none;min-width:0}.zone-title>b{border-radius:50%;background:var(--zone);width:22px;height:22px;display:grid;place-items:center;flex:none}.zone-title strong{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.zone-title>span{margin-left:auto}.zone-cards{flex:1;min-height:0;display:flex;gap:8px;align-items:center;justify-content:center;padding-top:5px}.zone-cards>img{height:100%;max-height:150px;max-width:55%;object-fit:contain;border-radius:7px}.empty-card{border:1px dashed #bdc9b6;border-radius:6px;width:55px;aspect-ratio:1632/2220;max-height:95%;display:grid;place-items:center;font-size:10px;color:#83917e}.zone-hint{font-size:10px;color:#7d8b78;max-width:70px}.incoming{display:flex;gap:3px;min-height:0;height:90%;max-width:65%;align-items:center;justify-content:center}.incoming>span{position:relative;height:90%;min-width:0;max-width:65px}.incoming img{height:100%;width:100%;object-fit:contain;border-radius:4px}.incoming b{position:absolute;bottom:0;right:0;font-size:10px;border-radius:50%;background:var(--ink);color:white;padding:2px 5px}.hand-section{display:flex;flex-direction:column;flex:1;min-height:110px;gap:5px}.hand-label{display:flex;justify-content:space-between;align-items:center;font-size:13px;flex:none;min-height:26px}.hand-label button{min-height:28px;padding:3px 10px;font-size:10px}.hand-label>span{font-size:11px;color:#677865}.play-hand{display:flex;gap:12px;align-items:center;justify-content:center;min-height:0;flex:1}.play-card{height:100%;max-height:210px;aspect-ratio:1632/2220;max-width:calc((100% - 36px)/4);padding:0;border:3px solid transparent;border-radius:10px;min-height:0;background:transparent;line-height:0;touch-action:none;user-select:none;position:relative;transition:transform .15s,border-color .15s}.play-card img{height:100%;width:100%;object-fit:contain;border-radius:7px;pointer-events:none}.play-card.selected{border-color:var(--orange);transform:translateY(-3px);box-shadow:0 3px 0 #c34e28}.play-card:disabled{opacity:.7}.card-detail{font-size:11px;line-height:1.35;min-height:17px;text-align:center;flex:none}.card-detail .stat{padding:2px 5px;font-size:11px}.empty-hand{font-size:13px;color:#677865}.drop-hover{outline:3px solid #e36a36;background:#ffe5a9!important;outline-offset:2px}.drag-ghost{position:fixed;z-index:1000;width:85px;transform:translate(-50%,-60%) rotate(-5deg);box-shadow:0 12px 35px #0006;border-radius:8px;pointer-events:none}.reveal-caption{text-align:center;font-size:13px;flex:none;color:#677865}.action-summary{display:flex;gap:8px;flex-wrap:wrap;justify-content:center;font-size:11px;flex:none}.action-summary>span{background:#e5e9dc;padding:7px;border-radius:8px}.reveal-layout .zones{max-height:none}.reveal-layout .zone-cards>img{max-height:230px}.reveal-layout .incoming>span{max-width:110px}.winner-banner{text-align:center;background:#f5d683;border-radius:14px;padding:10px;font-size:19px;flex:none}.winner-banner strong{font-weight:1000}.winner-banner small{display:block;font-size:11px;margin-top:5px}.battle-cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-auto-rows:minmax(0,1fr);gap:12px;flex:1;min-height:0}.battle-cards.count-2{grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:minmax(0,1fr)}.battle-pilot{background:#fff9ed;border:1px solid #d3dbc8;border-radius:15px;padding:12px;display:flex;gap:14px;align-items:center;overflow:hidden;min-height:0;animation:cardReveal .45s both;animation-delay:var(--delay)}.battle-pilot.won{background:#f8e9b6;border:2px solid #c9992f}.result-image{padding:0;min-height:0;background:none;border:none;max-width:45%;height:100%;aspect-ratio:1632/2220;flex:none}.result-image img{width:100%;height:100%;object-fit:contain;border-radius:8px}.battle-detail{flex:1;min-width:0}.battle-detail h3{margin:0 0 7px;font-size:17px}.qualified{font-size:11px;font-weight:bold;display:block;margin-bottom:6px}.effective-stats{display:flex;gap:5px;flex-wrap:wrap}.effective{background:#deebf2;color:#155375;border-radius:7px;padding:5px 8px;text-align:center}.effective.s1{background:#f4dbc4;color:#9d461f}.effective.s2{background:#e1ebce;color:#46672c}.effective span{display:block;font-size:9px}.effective strong{font-size:24px}.effective del{font-size:12px;opacity:.65}.battle-verdict{font-size:12px;display:block;margin-top:7px}.subtle{background:transparent;border:0;min-height:28px;flex:none;padding:3px 10px;font-size:11px;align-self:center;text-decoration:underline}.movement-layout{flex:1;min-height:0;display:grid;grid-template-columns:minmax(0,1fr) minmax(140px,.7fr);gap:15px}.track-and-cup{display:flex;flex-direction:column;min-height:0;align-items:center;gap:5px}.movement-cup{display:flex;align-items:center;gap:10px;min-height:0;background:transparent;border:0;padding:0;flex:none;max-width:100%;font-size:11px;font-weight:900}.movement-cup img{height:65px;border-radius:6px}.movement-cup span{max-width:160px}.big-race{flex:1;min-height:0;width:100%;border-radius:14px;background:#234c3d;overflow:hidden}.big-race canvas{display:block}.movement-summary{display:flex;flex-direction:column;justify-content:center;gap:12px;min-height:0}.movement-receipt{background:#fff9ed;border:1px solid #d2d9c5;border-radius:12px;padding:12px;display:grid;grid-template-columns:auto 1fr auto;gap:7px;align-items:center;animation:cardReveal .5s both;animation-delay:var(--delay)}.movement-receipt>strong{font-size:13px}.movement-receipt>b{font-size:27px;color:#b4512a}.movement-receipt small{grid-column:2/4;font-size:11px}.sprint-notice{font-size:12px;line-height:1.5;background:#f3dfa4;border-radius:10px;padding:12px}.draw-area{flex:1;min-height:100px;display:flex;gap:20px;align-items:center;justify-content:center}.deck{height:100%;max-height:210px;min-height:0;display:flex;flex-direction:column;align-items:center;gap:3px;position:relative;min-width:85px}.deck>img{height:calc(100% - 50px);min-height:40px;object-fit:contain;border-radius:8px;filter:drop-shadow(4px 4px 0 #b7ad89)}.deck>strong{font-size:11px;letter-spacing:1.5px}.deck>span{font-size:10px}.draw-receipt{font-size:11px;color:#4b7451;background:#e0ead8;border-radius:6px;padding:4px;white-space:nowrap;animation:drawReceipt 1.2s both}.discard-zone{width:130px;max-width:30%;border:2px dashed #b4bea7;border-radius:12px;text-align:center;padding:12px;flex:none}.discard-zone>span{font-size:32px;display:block;color:#b5572b}.discard-zone strong{font-size:12px;display:block}.discard-zone small{font-size:10px;line-height:1.4;display:block;margin-top:7px}.new-cup{text-align:center;font-size:12px;font-weight:800;background:#f5dfa5;padding:7px;border-radius:8px;flex:none}.drawn{animation:drawCard 1s both}.finish-screen{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:16px;min-height:0;text-align:center}.finish-screen h1{font-size:35px;margin:0}.won-cups{display:flex;gap:15px;min-height:0;max-height:45%;justify-content:center}.won-cups img{max-width:40%;object-fit:contain;border-radius:12px;transform:rotate(-6deg)}.won-cups img+img{transform:rotate(6deg)}.finish-screen p{font-size:14px;margin:0}.pause-banner,.away-banner,.grace-banner{font-size:11px;line-height:1.35;text-align:center;flex:none;border-radius:8px;padding:7px;background:#f2dca6}.away-banner{background:#f4c7ac;display:flex;align-items:center;justify-content:center;gap:8px}.away-banner button{min-height:32px;padding:5px 10px}.grace-banner{padding:4px;font-size:10px;background:#e2e8dc}.install-button{margin-left:0}.phase-enter .zone-cards>img{animation:cardReveal .4s both}
@keyframes cardReveal{from{opacity:0;transform:translateY(10px) rotateY(75deg)}to{opacity:1;transform:none}}@keyframes drawCard{from{opacity:0;transform:translateY(-40px) scale(.7)}to{opacity:1;transform:none}}@keyframes drawReceipt{from{opacity:0;transform:translateY(-12px)}to{opacity:1;transform:none}}
@media(min-width:900px){.play-layout{display:grid;grid-template-columns:1fr 1fr;grid-template-rows:auto auto minmax(0,1fr)}.play-layout>.mini-board{grid-column:1/3}.play-layout>.criteria{grid-column:1/3}.play-layout .zones{grid-column:1;grid-template-columns:repeat(2,minmax(0,1fr));grid-auto-rows:minmax(0,1fr)}.play-layout .hand-section{grid-column:2}.play-hand{max-height:300px}.playing main{padding:12px 30px}.maintenance-layout .draw-area{max-height:220px}.battle-cards.count-3,.battle-cards.count-4{grid-template-columns:repeat(4,minmax(0,1fr));grid-template-rows:minmax(0,1fr)}.battle-cards.count-3{grid-template-columns:repeat(3,minmax(0,1fr))}.battle-cards.count-3 .battle-pilot,.battle-cards.count-4 .battle-pilot{flex-direction:column;gap:10px}.battle-cards.count-3 .result-image,.battle-cards.count-4 .result-image{max-height:60%;max-width:100%}.battle-cards.count-3 .battle-detail,.battle-cards.count-4 .battle-detail{flex:none}}
@media(max-width:580px){.playing main{padding:7px 10px}.playing .masthead{padding:6px 12px;gap:10px}.playing .edition{font-size:7px}.screen-heading h1{font-size:22px}.screen-heading{min-height:42px}.play-screen{gap:5px}.screen-main,.play-layout,.reveal-layout,.battle-layout,.maintenance-layout{gap:6px}.criteria{gap:4px;font-size:9px}.criteria .stat{font-size:9px;padding:3px 5px}.mini-board{gap:4px;min-height:45px;padding:4px}.mini-numbers{font-size:8px;height:11px;line-height:11px}.mini-lane{height:12px}.mini-token{font-size:8px;line-height:10px;height:10px;min-width:10px}.finish-cup{width:33px}.zones{gap:5px;min-height:90px;max-height:40%;grid-template-columns:repeat(2,minmax(0,1fr));grid-auto-rows:minmax(0,1fr)}.zones.count-3{grid-template-columns:repeat(3,minmax(0,1fr))}.zones.count-4{grid-template-columns:repeat(2,minmax(0,1fr))}.zone-title{font-size:10px;gap:4px}.zone-title>b{width:17px;height:17px}.player-zone{border-radius:10px;padding:5px}.zone-cards{gap:4px;padding-top:3px}.zone-hint{font-size:8px;max-width:40px}.incoming>span{max-width:45px}.hand-section{gap:4px;min-height:115px}.hand-label{font-size:12px}.play-hand{gap:7px}.play-card{max-width:calc((100% - 21px)/4);max-height:175px;border-width:2px;border-radius:7px}.play-card img{border-radius:5px}.card-detail{font-size:10px;line-height:1.3}.phase-controls>.primary{min-width:0;width:100%}.phase-controls button{padding:9px 12px;font-size:13px;min-height:50px}.two-controls>button{flex:1}.presence{font-size:9px;gap:4px 8px;min-height:17px}.presence-player>b{width:15px;height:15px;font-size:9px}.reveal-caption{font-size:11px}.reveal-layout .zones{max-height:none;flex:1}.reveal-layout .zone-cards>img{max-height:150px}.reveal-layout .incoming>span{max-width:70px}.action-summary{font-size:10px;gap:4px}.action-summary>span{padding:5px}.winner-banner{font-size:15px;padding:8px}.winner-banner small{font-size:10px;margin-top:3px}.battle-cards{gap:7px}.battle-pilot{padding:7px;gap:7px;flex-direction:column}.result-image{max-width:85%;height:55%;min-height:0;max-height:180px}.battle-detail h3{font-size:12px;margin-bottom:4px}.battle-detail{flex:none;max-width:100%}.effective-stats{gap:3px;justify-content:center}.effective{padding:3px 5px}.effective span{font-size:8px}.effective strong{font-size:19px}.effective del{font-size:9px}.battle-verdict{font-size:10px;margin-top:4px;text-align:center}.qualified{font-size:9px;margin-bottom:3px}.battle-cards.count-3 .battle-pilot,.battle-cards.count-4 .battle-pilot{flex-direction:row}.battle-cards.count-3 .result-image,.battle-cards.count-4 .result-image{width:40%;max-width:40%;height:100%;max-height:none}.battle-cards.count-3 .battle-detail,.battle-cards.count-4 .battle-detail{flex:1}.battle-cards.count-3 .effective,.battle-cards.count-4 .effective{padding:2px 4px}.battle-cards.count-3 .effective strong,.battle-cards.count-4 .effective strong{font-size:17px}.battle-cards.count-3 .effective span,.battle-cards.count-4 .effective span{display:none}.battle-cards.count-3 .battle-detail h3,.battle-cards.count-4 .battle-detail h3{font-size:10px}.movement-layout{gap:8px;grid-template-columns:minmax(0,1fr) 125px}.movement-cup{font-size:9px;gap:6px}.movement-cup img{height:48px}.movement-cup span{max-width:100px}.movement-summary{gap:7px}.movement-receipt{padding:7px;gap:4px;grid-template-columns:22px 1fr}.movement-receipt .avatar{width:22px;height:22px;font-size:10px}.movement-receipt>strong{font-size:10px}.movement-receipt>b{grid-column:1/3;text-align:center;font-size:25px}.movement-receipt small{grid-column:1/3;text-align:center;font-size:10px}.sprint-notice{font-size:10px;padding:7px}.draw-area{gap:10px;min-height:105px;max-height:38%}.deck{min-width:70px}.deck>strong{font-size:10px;letter-spacing:1px}.deck>span{font-size:8px}.draw-receipt{font-size:9px}.discard-zone{width:100px;padding:7px}.discard-zone>span{font-size:24px}.discard-zone strong{font-size:10px}.discard-zone small{font-size:9px}.maintenance-layout .hand-section{flex:1}.new-cup{font-size:10px;padding:5px}.install-button{font-size:10px;padding:5px 8px;min-height:35px}.masthead{gap:12px}.edition{display:none}}
@media(max-height:640px){.playing .masthead{height:36px}.playing main{height:calc(100dvh - 41px);padding-top:4px;padding-bottom:4px}.playing .brand{font-size:15px}.screen-heading{min-height:35px}.screen-heading h1{font-size:19px}.screen-heading .eyebrow{font-size:8px}.play-screen{gap:4px}.phase-controls{min-height:44px}.phase-controls button{min-height:44px;padding:7px 10px}.hand-section{min-height:90px}.zones{min-height:75px}.play-card{max-height:125px}.mini-lane{height:10px}.mini-token{height:8px;line-height:8px;font-size:7px}.mini-board{min-height:38px}.finish-cup{width:28px}.presence{font-size:8px}.presence-player>b{width:13px;height:13px}.winner-banner{font-size:13px;padding:5px}.battle-detail h3{font-size:11px}.effective strong{font-size:17px}.draw-area{min-height:85px}.discard-zone small{display:none}.deck>img{height:calc(100% - 45px)}.draw-receipt{font-size:9px}.movement-cup img{height:35px}.movement-summary{gap:4px}.movement-receipt{padding:5px}.movement-receipt>b{font-size:20px}.reveal-caption{font-size:10px}}
@media(max-height:500px) and (min-width:580px){.play-layout{display:grid;grid-template-columns:1fr 1fr;grid-template-rows:auto auto minmax(0,1fr)}.play-layout .mini-board{grid-column:1/3}.play-layout .criteria{grid-column:1/3}.play-layout .zones{grid-column:1;grid-template-columns:repeat(4,minmax(0,1fr));max-height:none}.play-layout .hand-section{grid-column:2;min-height:70px}.play-hand{min-height:0}.play-card{max-height:105px}.battle-pilot{flex-direction:row!important}.result-image{height:100%!important;max-width:35%!important}.battle-cards{grid-template-columns:repeat(4,minmax(0,1fr))}.battle-cards.count-2{grid-template-columns:repeat(2,minmax(0,1fr))}.battle-detail h3{font-size:11px}.effective{padding:3px}.effective strong{font-size:17px}.effective span{font-size:8px}.draw-area{max-height:95px}.maintenance-layout .hand-section{min-height:65px}.new-cup{font-size:10px}}
.absence-request button{min-height:30px;padding:4px 8px;font-size:10px;margin:2px}
/* V0.3: one view of each fact, two permanent hand rows. */
.playing .masthead,.playing .checker{display:none}
.playing main{height:100dvh;padding: max(8px,env(safe-area-inset-top)) max(10px,env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) max(10px,env(safe-area-inset-left))}
.playing .network:not([hidden]){inset:0 0 auto}
.play-layout{display:flex;flex-direction:column;gap:8px}
.mini-board{display:grid;grid-template-columns:minmax(0,1fr) 48px;gap:5px 8px;padding:6px 8px}
.mini-board .mini-lanes{grid-column:1;grid-row:1}
.mini-board .finish-cup{grid-column:2;grid-row:1/3;width:48px;align-self:center}
.mini-board>.criteria{grid-column:1;grid-row:2;justify-content:flex-start;flex-wrap:wrap;font-size:12px;gap:4px}
.mini-board .criteria .stat{font-size:11px;padding:3px 5px}
.play-layout .zones{flex:1;min-height:110px;max-height:200px;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
.play-layout .zones.count-3{grid-template-columns:repeat(3,minmax(0,1fr))}
.play-layout .zones.count-2{grid-template-columns:repeat(2,minmax(0,1fr))}
.play-layout .zone-title{font-size:12px}
.play-layout .zone-hint{display:none}
.play-layout .zone-cards>img{max-width:48%;max-height:85px}
.play-layout .player-zone{padding:5px}
.whole-hand{display:grid;grid-template-rows:1fr 1fr;gap:8px;flex:2;min-height:240px;max-height:430px}
.hand-row{min-height:0;display:flex;flex-direction:column;gap:3px}
.hand-row .hand-label{font-size:13px;min-height:19px;line-height:19px}
.hand-row .hand-label>span{font-size:12px}
.hand-row .play-hand{gap:6px;justify-content:flex-start}
.hand-row .play-card{max-height:none;max-width:calc((100% - 18px)/4);min-height:0;border-width:2px;flex:none}
.selection-tools{display:flex;align-items:center;gap:8px;min-height:44px;flex:none}
.selection-tools .card-detail{font-size:12px;flex:1;text-align:left;line-height:1.35}
.selection-tools>button{font-size:22px;min-height:44px;min-width:44px;padding:5px}
.compact-draw{flex:none;min-height:72px;height:92px;max-height:none;gap:15px}
.compact-draw .deck{min-width:60px;display:grid;grid-template-columns:auto auto;grid-template-rows:1fr auto;gap:3px 8px}
.compact-draw .deck>img{grid-column:1;grid-row:1/3;height:70px;min-height:0;max-width:55px}
.compact-draw .deck>span{align-self:end;font-size:12px}
.compact-draw .draw-receipt{align-self:start;justify-self:start;font-size:12px}
.compact-draw .discard-zone{width:110px;padding:5px;max-width:32%}
.compact-draw .discard-zone>span{font-size:24px}
.compact-draw .discard-zone strong,.compact-draw .discard-zone small{font-size:11px}
.maintenance-layout .whole-hand{flex:1}
.result-stat-line{display:block;padding:9px 10px;margin:5px 0;border-radius:8px;background:#e0edf6;color:#155375;line-height:1.5}
.result-stat-line.s1{background:#f9e4d0;color:#98411b}
.result-stat-line.s2{background:#e3efd8;color:#386324}
@media(min-width:900px) and (min-height:600px){
 .play-layout{display:grid;grid-template-columns:1fr 1.2fr;grid-template-rows:auto minmax(0,1fr) auto}
 .play-layout>.mini-board{grid-column:1/3}
 .play-layout .zones{grid-column:1;grid-row:2;max-height:none;min-height:0}
 .play-layout .zone-cards>img{max-height:190px}
 .play-layout>.whole-hand,.play-layout>.hand-section{grid-column:2;grid-row:2;max-height:none;min-height:0}
 .play-layout>.selection-tools{grid-column:1/3;grid-row:3}
 .maintenance-layout{max-width:900px;width:100%;align-self:center}
}
@media(max-height:660px){
 .screen-heading{min-height:34px}.screen-heading h1{font-size:20px}.screen-heading .eyebrow{font-size:9px;letter-spacing:1px}
 .play-screen,.play-layout,.maintenance-layout{gap:5px}
 .mini-board{padding:4px 6px;gap:3px 6px;min-height:0}
 .mini-board .finish-cup{width:40px}.mini-board{grid-template-columns:minmax(0,1fr) 40px}
 .mini-board .criteria .stat{font-size:10px}.mini-board>.criteria{font-size:11px}
 .play-layout .zones{min-height:85px;max-height:110px;gap:4px}
 .play-layout .zone-title{font-size:11px}.play-layout .zone-title>b{width:17px;height:17px}
 .play-layout .zone-cards>img{max-height:48px}.play-layout .zone-cards{padding-top:2px}
 .whole-hand{min-height:190px;gap:5px}.hand-row .hand-label{font-size:12px;min-height:17px;line-height:17px}
 .hand-row .hand-label>span{font-size:11px}.selection-tools .card-detail{font-size:11px}
 .phase-controls,.phase-controls button{min-height:48px}
 .compact-draw{height:68px;min-height:68px}.compact-draw .deck>img{height:54px;max-width:40px}
 .compact-draw .deck{gap:3px}.compact-draw .discard-zone strong{font-size:10px}
 .compact-draw .discard-zone small{display:none}.compact-draw .deck>span{font-size:11px}
}
@media(max-height:500px) and (min-width:580px){
 .play-layout{display:grid;grid-template-columns:1fr 1fr;grid-template-rows:auto minmax(0,1fr) auto}
 .play-layout>.mini-board{grid-column:1/3}.play-layout .zones{grid-column:1;grid-row:2;max-height:none;grid-template-columns:repeat(2,minmax(0,1fr))}
 .play-layout>.whole-hand,.play-layout>.hand-section{grid-column:2;grid-row:2;min-height:0}
 .play-layout>.selection-tools{grid-column:1/3;grid-row:3}
 .whole-hand{min-height:140px}.compact-draw{height:55px;min-height:55px}.compact-draw .deck>img{height:44px}
}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation-duration:.01ms!important;transition-duration:.01ms!important}}
.zone-summary{display:none}
.hand-row .play-card{width:calc((100% - 18px)/4);height:auto;aspect-ratio:1632/2220;flex:none}
@media(max-height:660px) and (max-width:580px){
 .play-layout .zones{height:82px;min-height:82px;max-height:82px;flex:none}
 .play-layout .zone-cards{display:none}
 .play-layout .zone-summary{display:flex;align-items:center;gap:4px;font-size:11px;min-height:15px;white-space:nowrap}
 .zone-summary>b{display:inline-grid;place-items:center;border-radius:50%;width:15px;height:15px;font-size:10px}
 .play-layout .player-zone{padding:3px 5px;border-width:1px;border-radius:7px;gap:2px}
 .play-layout .zone-title>b{display:none}
 .whole-hand{min-height:236px}
 .mini-board>.criteria{grid-column:1/3}
 .mini-board .finish-cup{grid-row:1}
 .card-detail .stat{font-size:10px}
}
@media(max-height:660px) and (max-width:580px){
 .phase-pilot .selection-tools,.phase-sprint .selection-tools,.phase-maintenance .selection-tools{min-height:28px;height:28px}
 .phase-pilot .selection-tools>button,.phase-sprint .selection-tools>button,.phase-maintenance .selection-tools>button{position:fixed;right:max(10px,env(safe-area-inset-right));bottom:max(8px,env(safe-area-inset-bottom));height:48px;min-height:48px;z-index:5;background:#fff9ed}
 .phase-pilot .phase-controls,.phase-sprint .phase-controls,.phase-maintenance .phase-controls{padding-right:52px}
}
.phase-pilot .phase-controls,.phase-sprint .phase-controls,.phase-maintenance .phase-controls{padding-right:0}
.phase-controls>#zoom-card{position:static;flex:none;min-width:44px;width:44px;padding:5px;font-size:22px;min-height:48px;background:#fff9ed}
.phase-controls>.primary{flex:1}
.phase-controls.two-controls>button:not(#zoom-card){min-width:0;flex:1}
.drawn{animation:none}.phase-enter .drawn{animation:drawCard 1s both}
.presence-notice{display:flex;align-items:center;justify-content:center;gap:8px;font-size:12px}
.presence-notice>button{min-height:32px;padding:4px 9px;font-size:12px}
@media(max-height:660px) and (max-width:580px){
 .has-presence-notice .selection-tools{display:none}
 .has-presence-notice .compact-draw{height:56px;min-height:56px}
 .has-presence-notice .play-layout .zones{height:70px;min-height:70px;max-height:70px}
 .has-presence-notice .play-layout .player-zone{padding:2px 5px;gap:1px}
 .has-presence-notice .play-layout .zone-title{line-height:12px}
 .has-presence-notice .play-layout .zone-summary{min-height:12px;line-height:12px}
}
/* V0.4: a battle told one step at a time; maintenance never plays/discards cards. */
.heading-tools{display:flex;gap:6px;flex:none}.heading-tools>button{min-width:44px;min-height:44px;font-size:21px;padding:5px}
.screen-heading>div:first-child{min-width:0}.screen-heading h1{font-size:23px}
.battle-story{display:flex;flex-direction:column;flex:1;min-height:0;gap:8px}
.story-heading{flex:none}.story-heading h2{font-size:21px;line-height:1.2;margin:0 0 7px;letter-spacing:-.4px}
.story-criteria{display:flex;gap:8px;font-size:12px;font-weight:800;flex-wrap:wrap}
.story-criteria>span{padding:4px 7px;border-radius:6px;background:#dcecf7;color:#155375}.story-criteria>.s1{background:#fae0ca;color:#98411b}.story-criteria>.s2{background:#e0edce;color:#386324}
.story-focus{height:150px;flex:none;display:flex;align-items:center;justify-content:center;border-radius:14px;background:#fff9ed;border:1px solid #d9d7bb;padding:9px;overflow:hidden}
.stage-explanation{font-size:19px;line-height:1.4;text-align:center;margin:0;max-width:600px}
.focus-pair{display:flex;gap:12px;align-items:center;width:100%;height:100%}.focus-pair>img{height:100%;max-width:23%;object-fit:contain;border-radius:8px;flex:none}
.focus-pair>div{flex:1;min-width:0}.focus-pair strong{font-size:19px}.focus-pair p{font-size:14px;line-height:1.4;margin:5px 0}.focus-pair small{font-size:12px;line-height:1.3;display:block}
.affinity-pair{display:flex;gap:12px;justify-content:center;width:100%;height:100%}.affinity-pair>div{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:5px;min-width:0}.affinity-pair img{height:calc(100% - 22px);max-width:44%;object-fit:contain;border-radius:7px}.affinity-pair b{width:100%;text-align:center;font-size:15px;line-height:17px}
.story-pilots{flex:1;min-height:0;display:grid;grid-auto-rows:minmax(0,1fr);gap:7px}
.story-pilot{min-height:0;display:flex;align-items:center;gap:10px;padding:7px 10px;border:2px solid #d2d9c5;border-radius:12px;background:#fff9ed;position:relative;transition:opacity .3s,border-color .3s}
.story-pilot.dimmed{opacity:.43}.story-pilot.highlighted{border-color:#c88b1f;background:#fff0bb;box-shadow:0 0 0 1px #edcb78}
.story-portrait{padding:0;border:0;background:transparent;min-height:0;max-height:100%;height:100%;width:75px;flex:none}.story-portrait img{width:100%;height:100%;object-fit:contain;border-radius:7px}
.story-pilot-data{flex:1;min-width:0}.story-name{display:flex;align-items:center;gap:6px;min-height:20px;margin-bottom:4px;position:relative}.story-name>strong{font-size:15px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.affinity-label{font-size:13px}
.story-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}
.story-stat{color:#155375;background:#e4eff6;border-radius:9px;text-align:center;padding:3px 5px;min-width:0;border:2px solid transparent;position:relative}
.story-stat.s1{color:#98411b;background:#fae4cf}.story-stat.s2{color:#386324;background:#e1edce}
.story-stat.deciding{border-color:currentColor;box-shadow:0 2px 0 currentColor}
.story-stat>span{font-size:10px;display:block;line-height:13px}.story-stat>strong{font-size:36px;line-height:1.05;display:block;font-weight:1000}.story-stat>small{font-size:12px;line-height:14px;min-height:14px;display:block;white-space:nowrap}
.story-stat.receiving{outline:3px solid #e5a03c;outline-offset:2px}
.winner-parade{height:100%;width:100%;display:flex;gap:12px;justify-content:center}.winner-parade>div{display:grid;grid-template-columns:auto 1fr;gap:0 12px;align-items:center;max-width:330px;min-width:0}
.winner-parade img{grid-column:1;grid-row:1/4;height:122px;max-width:90px;object-fit:contain;border-radius:7px}
.winner-parade strong{font-size:22px;line-height:1.1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.winner-parade .advance-number{font-size:55px;line-height:1;color:#155375}.winner-parade .advance-number.s1{color:#98411b}.winner-parade .advance-number.s2{color:#386324}.winner-parade span{font-size:13px}
.winner-parade:has(>div:nth-child(3))>div{display:flex;flex-direction:column;gap:2px;flex:1}.winner-parade:has(>div:nth-child(3)) img{height:65px;max-width:100%}.winner-parade:has(>div:nth-child(3)) strong{font-size:14px;max-width:100%}.winner-parade:has(>div:nth-child(3)) .advance-number{font-size:30px}
.story-tools{display:flex;justify-content:center;gap:6px;flex:none}.story-tools button{min-height:40px;font-size:12px;padding:7px 11px}.story-progress{font-size:13px;color:#5c705f;text-align:center}
.story-enter .story-focus,.story-enter .story-stat.receiving,.story-enter[data-stage=effective] .story-stat strong,.story-enter[data-stage=compare] .story-stat.deciding{animation:storyPop .45s both}
@keyframes storyPop{from{opacity:.45;transform:scale(.94)}to{opacity:1;transform:none}}
.motion-reduced *{animation:none!important;transition:none!important}
.maintenance-controls{justify-content:stretch}.maintenance-controls>button{min-width:0;flex:1;font-size:13px;padding:8px}
.maintenance-controls>#zoom-card{flex:none}.maintenance-controls>.primary{flex:1.3}
.stand-message{font-size:13px;font-weight:800;text-align:center;max-width:100px}.stand-message small{display:block;font-size:11px;font-weight:400;margin-top:5px}
.phase-maintenance .play-card{touch-action:manipulation}
.emote-bubble{position:absolute;right:3px;top:-23px;display:inline-block;background:#fff;border:1px solid #c8cebf;border-radius:16px 16px 2px 16px;padding:5px 8px;font-size:25px;line-height:1;z-index:4;box-shadow:0 3px 7px #0002;animation:storyPop .2s}
.player-zone,.zone-title>span,.movement-receipt>strong{position:relative}.player-zone{overflow:visible}.zone-title>span .emote-bubble{top:-20px;right:0}.story-name .emote-bubble{top:-15px}
.emote-choices{display:flex;gap:5px;flex-wrap:wrap;margin:20px 0}.emote-choices button{font-size:27px;min-width:54px;min-height:54px;padding:7px}.emote-setting{display:flex;align-items:center;font-size:14px;gap:10px}.emote-setting input{width:22px;min-height:22px;height:22px}
@media(min-width:900px){.battle-story{max-width:1100px;width:100%;align-self:center}.story-pilots{grid-template-columns:repeat(2,minmax(0,1fr))}.story-portrait{width:105px}.story-stat strong{font-size:44px}.story-focus{height:170px}.phase-maintenance .maintenance-layout{max-width:850px}}
@media(max-height:660px){
 .screen-heading h1{font-size:20px}.screen-heading .eyebrow{letter-spacing:1px;font-size:9px}.heading-tools{gap:4px}.heading-tools>button{min-height:40px;min-width:40px}
 .battle-story{gap:5px}.story-heading h2{font-size:16px;margin-bottom:4px;line-height:19px}.story-criteria{font-size:10px;gap:5px}.story-criteria>span{padding:3px 5px}
 .story-focus{height:85px;padding:5px}.focus-pair{gap:6px}.focus-pair>img{border-radius:5px}.focus-pair strong{font-size:14px}.focus-pair p{font-size:11px;line-height:1.25;margin:3px 0}.focus-pair small{font-size:10px}.stage-explanation{font-size:14px;line-height:1.35}
 .story-pilots{gap:4px}.story-pilot{padding:3px 6px;gap:6px;border-radius:8px}.story-portrait{width:48px}.story-name{min-height:15px;margin:0}.story-name>strong{font-size:12px}
 .story-stats{gap:4px}.story-stat{padding:1px 3px;border-width:1px;border-radius:5px}.story-stat>span{display:none}.story-stat>strong{font-size:29px;line-height:31px}.story-stat>small{font-size:10px;min-height:11px;line-height:11px}
 .story-tools button{min-height:36px;font-size:11px;padding:5px 9px}.affinity-pair{gap:6px}.affinity-pair img{height:calc(100% - 16px)}.affinity-pair b{font-size:12px;line-height:13px}
 .winner-parade{gap:6px}.winner-parade>div{gap:0 7px}.winner-parade img{height:73px;max-width:54px}.winner-parade strong{font-size:17px}.winner-parade .advance-number{font-size:36px}.winner-parade span{font-size:11px}
 .winner-parade:has(>div:nth-child(3)) img{height:30px}.winner-parade:has(>div:nth-child(3)) strong{font-size:11px}.winner-parade:has(>div:nth-child(3)) .advance-number{font-size:23px}.winner-parade:has(>div:nth-child(3)) span{font-size:9px}
 .stand-message{font-size:11px;max-width:85px}.stand-message small{font-size:10px}.maintenance-controls>button{font-size:11px;padding:5px}
}
@media(max-height:500px) and (min-width:580px){.story-pilots{grid-template-columns:repeat(2,minmax(0,1fr))}.story-focus{height:65px}.story-portrait{width:40px}.story-heading{display:flex;gap:12px;align-items:center}.story-criteria{flex:none}.story-heading h2{flex:1}.story-tools button{min-height:32px}.winner-parade img{height:55px}}
.winner-parade>.weather-victory{grid-template-columns:auto auto 1fr}.winner-parade>.weather-victory img:nth-child(2){grid-column:2}.winner-parade>.weather-victory strong,.winner-parade>.weather-victory b,.winner-parade>.weather-victory span{grid-column:3}
@media(max-width:580px){.story-tools{gap:4px}.story-tools button{padding:6px 8px;font-size:11px}}
.screen-heading h1:empty{display:none}.presence-player{position:relative}.story-pilot.dimmed{opacity:.62}
.comparison-out{font-size:10px;line-height:12px;margin-left:auto;white-space:nowrap;color:#48584e;font-weight:600}.story-stat small{overflow:hidden;text-overflow:ellipsis}
.maintenance-controls>button{font-size:13px;line-height:1.2}.story-tools button{min-height:44px;font-size:12px}.phase-controls:has(.story-progress){min-height:28px}
/* V0.5 — a paddock rather than a spreadsheet. */
.whole-hand{display:flex;flex-direction:column;flex:0 1 auto;gap:6px;min-height:0;max-height:none;width:100%}
.hand-row{flex:none;gap:2px}.hand-row .hand-label{min-height:17px;line-height:17px;font-size:12px}
.hand-row .play-hand{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));height:auto;flex:none;gap:4px;align-items:start;justify-items:center;max-height:none}
.hand-row:last-child .play-hand{grid-template-columns:repeat(3,minmax(0,1fr))}
.hand-row .play-card{width:100%;max-width:none;height:auto;max-height:160px;aspect-ratio:1632/2220;margin:0;border-width:2px}
.hand-row .play-card img{display:block;width:100%;height:100%}
.play-layout{display:flex;gap:6px}.play-layout>.opponent-table{flex:none;grid-template-columns:repeat(3,minmax(0,1fr));height:75px;min-height:75px;max-height:75px;gap:8px}
.play-layout>.opponent-table.count-1{grid-template-columns:1fr}.play-layout>.opponent-table.count-2{grid-template-columns:repeat(2,minmax(0,1fr))}
.play-layout>.opponent-table .player-zone{padding:4px;overflow:visible;background:#f3e6d8}
.play-layout>.opponent-table .zone-title{font-size:11px;gap:3px}.play-layout>.opponent-table .zone-title>b{width:16px;height:16px;font-size:10px}
.play-layout>.opponent-table .zone-cards{display:flex;padding-top:2px;gap:4px}.play-layout>.opponent-table .zone-cards>img{height:43px;max-width:48%;max-height:43px}.play-layout>.opponent-table .empty-card{height:38px;width:28px}
.play-layout>.own-table{flex:none;display:block;height:64px;min-height:64px;max-height:64px;margin-top:4px;border-radius:14px;box-shadow:0 -3px 0 #173d3520}
.play-layout>.own-table .player-zone{display:grid;grid-template-columns:minmax(0,1fr) minmax(75px,1fr);height:100%;padding:5px 10px;background:#dcecdf;border:3px solid #387e69;gap:8px;overflow:visible}
.play-layout>.own-table .zone-title{font-size:13px;flex-wrap:wrap;align-content:center;gap:5px}.play-layout>.own-table .zone-title strong:after{content:' · chez toi';font-size:11px;color:#387e69}
.play-layout>.own-table .zone-title>b{display:none}.play-layout>.own-table .zone-title>span{margin-left:0}
.play-layout>.own-table .zone-cards{display:flex;padding:0;height:48px;gap:5px;justify-content:flex-end}.play-layout>.own-table .zone-cards>img{height:48px;max-height:48px;max-width:50%}.play-layout>.own-table .empty-card{height:45px;width:33px}
.play-layout .zone-summary{display:none!important}.play-layout .incoming{height:100%;max-width:60%}.play-layout .incoming>span{height:100%;max-width:30px}
.selection-tools{min-height:32px;gap:5px}.selection-tools #zoom-card{position:static;width:auto;min-width:76px;min-height:32px;font-size:12px;padding:5px 8px;background:#fff9ed;flex:none}
.selection-tools #zoom-card:disabled{display:none}.selection-tools .card-detail{font-size:12px}.prepare-screen .compact-draw{gap:45px;justify-content:center}.prepare-screen .whole-hand{flex:0 1 auto;max-height:none}
.quick-emotes{display:flex;justify-content:center;gap:8px;flex:none;min-height:44px;align-items:center}
.quick-emotes button{width:44px;min-width:44px;height:44px;min-height:44px;padding:3px;font-size:26px;border:0;background:#fff9ed;border-radius:50%;box-shadow:0 2px 0 #d8d2bd;transition:transform .15s}
.quick-emotes button:hover{transform:translateY(-3px) rotate(-9deg)}
.story-pilots{grid-template-columns:repeat(2,minmax(0,1fr));grid-auto-rows:minmax(0,1fr);gap:12px;padding:3px}
.story-pilot{display:block;width:100%;max-width:100%;min-width:0;overflow:hidden;padding:0;border:3px solid var(--racer-color,#c9b786);border-radius:19px 13px 20px 13px;background:radial-gradient(ellipse at 20% 20%,#fffdf1,#e6e5d0);box-shadow:0 4px 0 #c6c3ac;isolation:isolate}
.story-pilot.highlighted{background:radial-gradient(ellipse at 25% 30%,#fff9b2,#f8d27a);border-color:#d99818;box-shadow:0 4px 0 #b87c1d}
.story-pilot.highlighted:before{content:'★';position:absolute;left:5px;top:3px;color:#b36b15;background:#ffef9a;border-radius:50%;width:22px;height:22px;font-size:17px;line-height:22px;text-align:center;z-index:3}
.story-pilot-data{position:absolute;inset:0;width:100%;max-width:100%;min-width:0;height:100%;pointer-events:none}
.story-portrait{position:absolute;left:4px;top:4px;bottom:27px;width:calc(100% - 53px);height:calc(100% - 31px);max-height:none;max-width:none;transform:rotate(-4deg);transform-origin:bottom center}
.story-portrait img{height:100%;width:100%;object-fit:contain;filter:drop-shadow(2px 4px 2px #0003)}
.story-name{position:absolute;inset:auto 0 0;margin:0;padding:3px 6px;background:#fff8e7ed;min-height:25px;height:25px;display:flex;gap:3px;width:100%;max-width:100%;overflow:visible;box-sizing:border-box}
.story-name>strong{font-size:13px;flex:1;min-width:0;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:19px}
.story-name .comparison-out{position:absolute;right:3px;bottom:26px;max-width:calc(100% - 6px);margin:0;padding:2px 4px;border-radius:5px;background:#fff7dbe8;font-size:9px;line-height:11px;text-overflow:ellipsis;overflow:hidden}
.story-name .affinity-label{font-size:13px;flex:none}
.story-stats{position:absolute;top:7px;right:6px;width:78px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px;align-items:start;justify-items:center;max-width:calc(100% - 12px)}
.story-stat{width:32px;height:32px;border-radius:50%;padding:0;border:1px solid #fff9;display:grid;place-items:center;box-shadow:0 2px 0 #0002;min-width:0;max-width:100%}
.story-stat>span,.story-stat>small{display:none}.story-stat>strong{font-size:21px;line-height:1;display:block}
.story-stat.featured{grid-column:1/3;order:-1;width:64px;height:64px;border-radius:45% 55% 49% 51%;border-width:2px}.story-stat.featured>strong{font-size:43px;line-height:1}
.story-stat.deciding{box-shadow:0 3px 0 currentColor,0 0 0 3px #fff8}.story-stat.receiving{outline:3px dashed #ea9c22;outline-offset:2px}
.story-heading h2{font-family:Georgia,serif;font-style:italic;font-size:24px;letter-spacing:-.5px}.story-focus{border-radius:19px 11px 20px 13px}
.battle-story[data-stage=winner] .story-focus{background:repeating-conic-gradient(from 15deg at 50% 100%,#fff0bd 0deg 15deg,#ffe5a3 15deg 30deg);border:2px solid #e6b34f;box-shadow:0 3px 0 #e0bf76}
.battle-story[data-stage=winner] .story-heading h2:before{content:'🎉 ';font-style:normal}
.winner-parade strong{max-width:100%;min-width:0}.winner-parade>div{min-width:0;max-width:100%;grid-template-columns:auto minmax(0,1fr)}
.winner-parade>.weather-victory{grid-template-columns:auto auto minmax(0,1fr)}
.victory-confetti{position:fixed;inset:0;z-index:90;pointer-events:none;overflow:hidden}.victory-confetti i{position:absolute;left:var(--x);top:-20px;border-radius:2px;animation:confetti-fall 3.4s var(--delay) ease-in both}
@keyframes confetti-fall{0%{transform:translate(0,-20px) rotate(0);opacity:1}85%{opacity:1}100%{transform:translate(calc(var(--sway)*70px),105dvh) rotate(var(--spin));opacity:0}}
.confetti-still i{animation:none;top:35%;transform:rotate(var(--spin))}
@media(min-width:900px) and (min-height:600px){
 .play-layout{display:grid;grid-template-columns:1fr 1.15fr;grid-template-rows:auto minmax(100px,1fr) 90px auto;gap:12px}
 .play-layout>.mini-board{grid-column:1/3;grid-row:1}.play-layout>.opponent-table{grid-column:1;grid-row:2;height:100%;min-height:0;max-height:none}.play-layout>.opponent-table .player-zone{height:100%}
 .play-layout>.opponent-table .zone-cards>img{height:140px;max-height:90%;max-width:60%}
 .play-layout>.own-table{grid-column:1;grid-row:3;height:90px;min-height:90px;max-height:90px}.play-layout>.own-table .zone-cards{height:70px}.play-layout>.own-table .zone-cards>img{height:70px;max-height:70px}
 .play-layout>.whole-hand,.play-layout>.hand-section{grid-column:2;grid-row:2/4;align-self:center;min-height:0}.play-layout>.selection-tools{grid-column:1/3;grid-row:4}
 .hand-row .play-card{max-height:calc((100dvh - 270px)/2)}
 .story-pilot{border-radius:24px}.story-portrait{width:70%;left:4%;height:calc(100% - 35px);bottom:30px}.story-stats{width:110px;right:15px;top:12px}.story-stat{width:42px;height:42px}.story-stat>strong{font-size:27px}.story-stat.featured{width:88px;height:88px}.story-stat.featured>strong{font-size:57px}.story-name>strong{font-size:16px}
}
@media(max-height:660px) and (max-width:580px){
 .play-layout{gap:4px}.play-layout>.opponent-table{height:48px;min-height:48px;max-height:48px;gap:6px}.play-layout>.opponent-table .player-zone{padding:2px 3px;border-width:1px}
 .play-layout>.opponent-table .zone-title{font-size:10px;line-height:13px}.play-layout>.opponent-table .zone-title>b{display:none}.play-layout>.opponent-table .zone-cards{height:26px;display:flex}.play-layout>.opponent-table .zone-cards>img{height:25px;max-height:25px}.play-layout>.opponent-table .empty-card{height:23px;width:17px}
 .play-layout>.own-table{height:41px;min-height:41px;max-height:41px;margin-top:2px}.play-layout>.own-table .player-zone{padding:2px 7px;grid-template-columns:minmax(0,1fr) minmax(70px,1fr);border-width:2px}.play-layout>.own-table .zone-title{font-size:11px;line-height:13px}.play-layout>.own-table .zone-title strong:after{font-size:10px}
 .play-layout>.own-table .zone-cards{height:33px;display:flex}.play-layout>.own-table .zone-cards>img{height:33px;max-height:33px}.play-layout>.own-table .empty-card{height:30px;width:22px}
 .hand-row .play-card{max-height:calc((100dvh - 340px)/2)}.whole-hand{gap:4px}.hand-row .hand-label{line-height:15px;min-height:15px;font-size:11px}
 .selection-tools{min-height:27px;height:auto}.selection-tools .card-detail{font-size:11px}.selection-tools #zoom-card{min-height:28px;font-size:11px;min-width:66px}
 .story-heading h2{font-size:19px;line-height:22px}.story-pilots{gap:8px;padding:2px}.story-pilot{border-width:2px;border-radius:13px}.story-portrait{left:2px;top:2px;bottom:22px;height:calc(100% - 24px);width:calc(100% - 38px)}
 .story-name{height:21px;min-height:21px;padding:2px 4px}.story-name>strong{font-size:11px;line-height:16px}.story-name .comparison-out{bottom:22px;font-size:8px;padding:1px 3px}
 .story-stats{top:4px;right:4px;width:57px;gap:3px}.story-stat{width:24px;height:24px}.story-stat>strong{font-size:17px;line-height:1}.story-stat.featured{width:44px;height:44px}.story-stat.featured>strong{font-size:32px;line-height:1}
 .quick-emotes{min-height:40px;gap:10px}.quick-emotes button{width:40px;min-width:40px;height:40px;min-height:40px;font-size:24px}
 .prepare-screen .compact-draw{height:56px;min-height:56px}.prepare-screen .compact-draw .deck>img{height:44px}
}
@media(prefers-reduced-motion:reduce){.victory-confetti i{animation:none;top:var(--y);transform:rotate(var(--spin))}}
.confetti-still i{top:var(--y)}
.play-layout>.own-table .zone-title strong:after{content:none}
.winner-parade strong{overflow-wrap:anywhere}
.applied-modifiers{position:absolute;left:5px;right:5px;bottom:29px;height:43px;display:flex;gap:3px;align-items:center;z-index:4}
.applied-modifiers button{padding:0;min-height:0;height:100%;width:auto;max-width:24%;aspect-ratio:1632/2220;background:#fff9ed;border:1px solid #fff;border-radius:4px;box-shadow:0 2px 3px #0003}
.applied-modifiers img{display:block;width:100%;height:100%;object-fit:contain;border-radius:3px}
.story-pilot.with-modifiers .story-portrait{bottom:27px;height:calc(100% - 31px)}
.flying-modifier{position:fixed;object-fit:contain;transform-origin:top left;z-index:80;pointer-events:none;border-radius:7px;box-shadow:0 8px 15px #0004}
.story-stat{position:relative}.story-stat.receiving{outline:none}
.stat-change{position:absolute;z-index:5;left:50%;bottom:-11px;transform:translateX(-50%);white-space:nowrap;font-style:normal;font-size:11px;line-height:16px;border-radius:7px;padding:0 4px;background:#fffdf1;box-shadow:0 1px 3px #0003;color:#183e36}
@media(max-height:660px) and (max-width:580px){.applied-modifiers{height:28px;bottom:24px}.story-pilot.with-modifiers .story-portrait{bottom:22px;height:calc(100% - 24px)}.stat-change{font-size:9px;line-height:13px;bottom:-9px}}
/* Equal hand cards; the played pilot occupies the space beside the Actions. */
.prepare-screen .hand-row:last-child .play-hand{grid-template-columns:repeat(4,minmax(0,1fr))}
.play-layout>.card-table{flex:1 1 0;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));grid-template-rows:calc((100% - 46px)/4 + 17px) minmax(0,1fr);gap:4px;min-height:0;align-self:stretch}
.play-layout>.card-table>.hand-row{min-height:0;display:flex;flex-direction:column;gap:0;flex:none}
.play-layout>.card-table>.hand-row:first-child{grid-column:1/5;grid-row:1}
.play-layout>.card-table>.hand-row:nth-child(2){grid-column:1;grid-row:2}
.play-layout>.card-table .hand-label{height:17px;min-height:17px;line-height:17px}
.play-layout>.card-table .play-hand{flex:1;min-height:0;height:0;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px;align-items:stretch;justify-items:center}
.play-layout>.card-table>.hand-row:nth-child(2) .play-hand{grid-template-columns:1fr;grid-template-rows:repeat(3,minmax(0,1fr))}
.play-layout>.card-table .play-card{height:100%;width:auto;max-height:100%;max-width:100%;aspect-ratio:1632/2220}
.play-layout .card-table>.own-table{grid-column:2/5;grid-row:2;height:100%;min-height:0;max-height:none;margin:17px 0 0;align-self:stretch;padding-bottom:17px;display:flex;box-shadow:none}
.play-layout .card-table>.own-table .player-zone{display:flex;flex-direction:column;width:100%;height:100%;padding:7px;gap:5px;background:#dcecdf;overflow:hidden;border:2px solid #387e69}
.play-layout .card-table>.own-table .zone-title{height:19px;min-height:19px;font-size:12px;flex:none}
.play-layout .card-table>.own-table .zone-title>b{display:none}
.play-layout .card-table>.own-table .zone-cards{display:flex;flex:1;min-height:0;height:0;padding:0;gap:5px;align-items:stretch;justify-content:center}
.play-layout .card-table>.own-table .zone-cards>img{height:100%;max-height:100%;width:auto;max-width:72%;object-fit:contain;min-width:0}
.play-layout .card-table>.own-table .empty-card{height:100%;width:65%;min-height:0;max-height:none;font-size:16px}
.play-layout .card-table>.own-table .incoming{display:flex;flex-direction:column;flex:0 1 28%;height:100%;max-width:28%;gap:4px;justify-content:center}
.play-layout .card-table>.own-table .incoming>span,.play-layout .card-table>.own-table .incoming>button{height:auto;max-height:24%;min-height:0;max-width:100%;aspect-ratio:1632/2220}
.incoming>.placed-action{position:relative;display:inline-block;padding:0;border:0;border-radius:4px;height:100%;min-height:0;max-width:30px;background:transparent;aspect-ratio:1632/2220;touch-action:none}
.incoming>.placed-action img{display:block;width:100%;height:100%;object-fit:contain}
.incoming>.placed-action b{position:absolute;right:0;bottom:0;font-size:10px;border-radius:50%;background:#fff7}
.play-layout .card-table>.own-table .zone-hint{align-self:center;font-size:12px}
@media(min-width:900px) and (min-height:600px){
 .play-layout>.card-table{grid-column:2;grid-row:2/4;align-self:stretch}
}
@media(max-height:660px) and (max-width:580px){
 .play-layout>.whole-hand{flex:1 1 0}
 .play-layout>.whole-hand .hand-row{flex:1 1 0;min-height:0}
 .play-layout>.whole-hand .play-hand{flex:1;min-height:0;height:0;align-items:stretch}
 .play-layout>.whole-hand .play-card{height:100%;width:auto;max-height:100%;max-width:100%}
}
/* Match the stand's four-column card size, using a light overlap for Actions. */
.play-layout>.card-table{container-type:inline-size;--hand-card-height:min(160px,calc((100cqw - 12px)*2220/6528));grid-template-rows:auto minmax(0,1fr)}
.play-layout>.card-table>.hand-row:first-child .play-hand{flex:none;height:var(--hand-card-height)}
.play-layout>.card-table .play-card{height:var(--hand-card-height);max-height:none;position:relative}
.play-layout>.card-table>.hand-row:nth-child(2) .play-hand{grid-template-rows:repeat(2,minmax(0,1fr)) var(--hand-card-height);gap:0}
.play-layout>.card-table>.hand-row:nth-child(2) .play-card{box-shadow:0 -2px 4px #183e3620}
/* Guided play: one decision at a time, with large cards and a fixed next action. */
.screen-heading{order:0}.phase-ribbon{order:1}.turn-instruction{order:2}.guide-note{order:3}.screen-main{order:4}.play-screen>.presence{order:5}
.play-screen>.phase-controls{order:6}
.sound-mute{display:flex;align-items:center;margin:15px 0}.sound-mute input{width:24px;min-height:24px}.sound-mute+label{margin-bottom:15px}
.action-previews{display:flex;gap:8px}.action-previews button{flex:1;min-width:0;padding:4px;font-size:11px}.action-previews img{width:100%;height:auto}.action-previews span{display:block;padding:6px 0}
.focused-hand .hand-label{margin-bottom:6px}.focused-hand .hand-label button{min-height:44px;padding:4px 8px;font-size:11px}
.zone-position{font-size:10px;line-height:12px;flex:none;color:#456252}.own-table .zone-position{font-size:11px}
.maintenance-layout{flex:0 0 auto;min-height:440px}
.maintenance-layout>.whole-hand{flex:none;min-height:270px;height:auto;max-height:none;grid-template-rows:repeat(2,125px)}
.maintenance-layout .play-hand{height:105px;flex:none}.maintenance-layout .play-card{height:105px;max-height:105px}
.screen-heading>div:first-child{min-width:0}.screen-heading .eyebrow{display:block;line-height:1.5}.heading-tools{flex-shrink:0}
.screen-main{overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;scrollbar-width:thin}
.phase-ribbon{flex:none;display:flex;justify-content:space-between;gap:4px;list-style:none;padding:0;margin:0;font-size:10px;color:#5f7167}
.phase-ribbon li{display:flex;gap:4px;align-items:center;border-bottom:2px solid #ddd9cb;padding:4px 2px;flex:1;justify-content:center}
.phase-ribbon li>span{font-weight:900}.phase-ribbon .current{color:#183e36;border-color:#c05a31;font-weight:900}.phase-ribbon .passed{border-color:#729f87}
.turn-instruction{flex:none;background:#183e36;color:#fffaf0;padding:10px 12px;border-radius:12px;font-size:14px;font-weight:800;line-height:1.35}
.guide-note{flex:none;display:flex;align-items:flex-start;gap:6px;background:#f7e8bd;border-radius:10px;padding:8px 10px;font-size:12px;line-height:1.45}
.guide-note b{color:#815223}.guide-note button{min-height:44px;min-width:44px;padding:0;background:transparent;border:0;font-size:24px;flex:none}
.heading-tools{gap:5px}.heading-tools button{min-height:44px;min-width:44px}
.play-layout>.focused-hand{flex:1;min-height:260px;max-height:none;display:flex;flex-direction:column;gap:8px;align-self:stretch;width:100%;grid-column:2;grid-row:2/4}
.focused-hand>.hand-row{flex:none;min-height:0}.focused-hand .play-hand{display:flex;justify-content:center;gap:8px;height:clamp(105px,17dvh,160px);flex:none}
.focused-hand .play-card{height:100%;max-height:100%;max-width:calc((100% - 24px)/4);width:auto;aspect-ratio:1632/2220}
.play-layout .focused-hand>.own-table{flex:1;min-height:100px;max-height:230px;display:flex;margin:0}
.focused-hand>.own-table .player-zone{flex:1;background:#e3eddf;display:flex;flex-direction:column;min-height:0}
.focused-hand>.own-table .zone-cards{flex:1;min-height:0;justify-content:center}
.play-layout .focused-hand>.own-table .zone-cards>img{max-height:170px;max-width:70%;height:100%;object-fit:contain}
.focused-hand>.own-table .zone-hint{display:block;font-size:12px;max-width:100px}
.focused-hand #change-hand{align-self:center;min-height:44px;padding:6px 12px;font-size:12px}
.player-zone.target-available{outline:3px solid #b96a22;outline-offset:-3px;background:#fff0c7;cursor:pointer}
.player-zone.target-available .zone-hint{display:block;color:#815223;font-weight:900}
.play-layout>.mini-board .mini-lanes{display:none}.play-layout>.mini-board{grid-template-columns:48px minmax(0,1fr);min-height:54px}
.play-layout>.mini-board .finish-cup{grid-column:1;grid-row:1;width:40px;height:48px;min-height:44px}.play-layout>.mini-board .finish-cup img{max-height:48px}
.play-layout>.mini-board>.criteria{grid-column:2;grid-row:1;align-self:center}.play-layout>.mini-board>.criteria:before{content:'Coupe · critères à battre';display:block;width:100%;font-size:11px;color:#5f7167}
.battle-story{min-height:320px}.outcome-reason{margin:0;padding:8px 10px;background:#f7e8bd;border-radius:10px;font-size:13px;line-height:1.4;flex:none}
.story-tools{flex-wrap:wrap;justify-content:center;gap:4px}.story-tools button{min-height:44px;font-size:12px;padding:7px 9px}
.phase-controls button{min-height:54px}.waiting-note{line-height:1.4;text-align:center;padding:8px;font-size:13px}
.quick-emotes{display:none}
/* The cup's priority is the main visual cue, not a secondary badge. */
[data-priority="0"],.priority-0{--priority:#17608c;--priority-wash:#dbeefa;--priority-dark:#104465}
[data-priority="1"],.priority-1{--priority:#a94a1d;--priority-wash:#f8e5d6;--priority-dark:#783314}
[data-priority="2"],.priority-2{--priority:#3c732d;--priority-wash:#e3efd9;--priority-dark:#28501e}
.secondary-0{--secondary:#17608c}.secondary-1{--secondary:#a94a1d}.secondary-2{--secondary:#3c732d}
.criteria.priority-card{display:grid;grid-template-columns:1fr 1fr;gap:5px;background:var(--priority);color:#fffaf0;border-radius:13px;padding:5px;font-size:13px;line-height:1.25;flex:none;text-align:left;min-width:0;width:100%;box-shadow:0 3px 0 var(--priority-dark)}
.criteria.priority-card:before{content:none!important}
.priority-primary{grid-column:1/-1;padding:6px 9px 8px;border-right:7px solid var(--secondary);border-radius:8px;min-width:0}
.priority-card small{display:block;font-size:11px;line-height:1.3;letter-spacing:.3px;font-weight:700;color:inherit}
.priority-primary>strong{display:flex;align-items:center;gap:8px;font-size:28px;line-height:1.15;letter-spacing:-.5px;margin:3px 0}
.priority-primary>span{display:block;font-size:13px;font-weight:700}
.criterion-symbol{width:24px;height:24px;flex:none;vertical-align:middle}
.priority-secondary,.priority-movement{padding:7px 9px;border-radius:8px;min-width:0}
.priority-secondary{background:var(--secondary);color:#fffaf0;border:1px solid #ffffff60}
.priority-secondary strong,.priority-movement strong{display:flex;align-items:center;gap:5px;font-size:14px;line-height:1.3;margin-top:2px}
.priority-secondary .criterion-symbol,.priority-movement .criterion-symbol{width:17px;height:17px}
.priority-movement{background:#fffaf0;color:#183e36}.priority-movement small{color:#536458}
.priority-movement.stat-color-0 strong{color:#17608c}.priority-movement.stat-color-1 strong{color:#a94a1d}.priority-movement.stat-color-2 strong{color:#3c732d}
.priority-weather{grid-column:1/-1;background:#fff0b9;color:#62420d;border-radius:7px;padding:6px 9px;font-size:12px;font-weight:900}
.play-layout>.mini-board{background:var(--priority);border-color:var(--priority-dark);grid-template-columns:60px minmax(0,1fr);gap:5px;padding:6px;box-shadow:0 3px 0 var(--priority-dark);align-items:center}
.play-layout>.mini-board>.priority-card{align-self:stretch;box-shadow:none;grid-column:2;grid-row:1}
.play-layout>.mini-board .finish-cup{width:58px;height:80px;min-height:54px;max-height:none;align-self:center}
.play-layout>.mini-board .finish-cup img{max-height:80px;width:58px;filter:drop-shadow(0 3px 3px #0003)}
.phase-pilot .focused-hand{background:linear-gradient(180deg,var(--priority-wash),transparent 85%);border-radius:14px;padding:7px}
.phase-pilot .focused-hand .hand-label>strong{border-left:5px solid var(--priority);padding-left:7px}
.story-heading>.priority-card{margin-top:7px}.story-heading .priority-primary>strong{font-size:23px}
.story-heading .priority-primary{padding:4px 8px}.story-heading .priority-primary>span{font-size:12px}
.story-heading .priority-secondary,.story-heading .priority-movement{padding:5px 8px}
.story-focus{height:110px}.story-pilots{min-height:210px}.battle-story{flex-shrink:0}
.story-enter .priority-weather{animation:priorityReveal .45s ease-out both}
@keyframes priorityReveal{from{transform:translateX(-12px);opacity:.3}to{transform:translateX(0);opacity:1}}
@media(max-width:580px){.priority-primary>strong{font-size:23px}.priority-primary>span{font-size:12px}.priority-card small{font-size:10px}.priority-secondary strong,.priority-movement strong{font-size:12px}.priority-secondary,.priority-movement{padding:6px}.play-layout>.mini-board{grid-template-columns:48px minmax(0,1fr)}.play-layout>.mini-board .finish-cup,.play-layout>.mini-board .finish-cup img{width:46px}.story-heading{display:block}.story-heading .priority-primary>strong{font-size:21px}}
@media(max-width:350px){.priority-primary>strong{font-size:20px}.priority-primary>span{font-size:11px}.priority-secondary strong,.priority-movement strong{font-size:11px}.priority-card .criterion-symbol{width:18px;height:18px}.priority-secondary,.priority-movement{padding:5px}.priority-card{gap:4px}}
@media(max-width:580px){.screen-heading h1{font-size:20px}.screen-heading .eyebrow{letter-spacing:.7px}.guide-note{font-size:11px}.turn-instruction{font-size:13px}.play-layout .focused-hand>.own-table .zone-title{font-size:12px}.play-layout>.focused-hand{min-height:245px}.story-heading h2{font-size:20px}}
@media(max-height:660px){.guide-note{font-size:11px;padding:6px 8px}.phase-ribbon{font-size:9px}.turn-instruction{font-size:12px;padding:8px 10px}.play-layout>.focused-hand{min-height:260px}.battle-story{min-height:350px}}
@media(max-height:660px) and (max-width:580px){
 .play-layout>.mini-board .mini-lane{height:7px}
 .play-layout>.mini-board .mini-numbers{height:10px;line-height:10px}
 .play-layout>.mini-board .finish-cup{max-height:42px;min-height:0}
 .play-layout>.mini-board .finish-cup img{max-height:42px}
}
/* A played pilot stays large while choosing an Action; never shrink it to fit. */
.play-layout>.focused-hand.has-played-pilot{display:grid;grid-template-columns:minmax(80px,1fr) minmax(0,2fr);grid-template-rows:auto auto;gap:8px;flex:0 0 auto;min-height:340px}
.has-played-pilot>.hand-row{grid-column:1;grid-row:1;min-width:0}
.has-played-pilot .hand-label{line-height:1.3;min-height:40px;align-items:start;font-size:11px}
.has-played-pilot .play-hand{display:flex;flex-direction:column;height:270px;justify-content:flex-start;gap:0;align-items:center}
.has-played-pilot .play-hand .play-card{flex:none;height:105px;width:auto;max-width:100%;max-height:none;margin-top:-15px}
.has-played-pilot .play-hand .play-card:first-child{margin-top:0}
.play-layout .focused-hand.has-played-pilot>.own-table{grid-column:2;grid-row:1;min-height:325px;max-height:none;height:325px;align-self:start}
.has-played-pilot>.own-table .zone-cards{position:relative;display:block;height:280px;flex:none;text-align:center;padding:0}
.play-layout .focused-hand.has-played-pilot>.own-table .zone-cards>img{height:280px;max-height:none;max-width:100%;width:auto;object-fit:contain}
.has-played-pilot>.own-table .zone-hint{display:none}
.has-played-pilot>.own-table .incoming{position:absolute;bottom:4px;right:2px;display:flex;flex-direction:column;height:auto;max-height:180px;width:42px;max-width:42px;gap:3px}
.has-played-pilot>.own-table .incoming>span,.has-played-pilot>.own-table .incoming>button{height:54px;min-height:0;width:40px;max-width:40px;flex:none}
.has-played-pilot #change-hand{grid-column:1/-1;grid-row:2;justify-self:center}
/* The stand presents one generous hand, not two inventory rows. */
.maintenance-layout.prepare-screen{min-height:0;flex:1 0 auto;gap:10px;padding:3px 4px}
.stand-cup-banner{display:grid;grid-template-columns:auto minmax(0,1fr);gap:4px;align-items:stretch;padding:6px;background:var(--priority);border-radius:16px;box-shadow:0 3px 0 var(--priority-dark);flex:none}
.stand-cup-banner>.priority-card{box-shadow:none}
.stand-cup-art{padding:0;border:0;background:transparent;min-height:0;min-width:0;height:150px;align-self:stretch;border-radius:9px;overflow:hidden}
.stand-cup-art img{display:block;width:auto;height:100%;object-fit:contain;filter:drop-shadow(0 3px 4px #0004)}
.stand-hand-heading{display:flex;justify-content:space-between;align-items:center;padding:12px 6px 0;gap:8px;flex:none}
.stand-hand-heading strong{font-size:20px}.stand-hand-heading span{font-size:12px;color:#5d7063}
.fan-hand{container-type:inline-size;--fan-card-width:clamp(132px,38cqw,235px);position:relative;isolation:isolate;width:100%;height:clamp(275px,33dvh,385px);min-height:275px;flex:none}
.fan-slot{--fan-edge:clamp(22px,7cqw,34px);position:absolute;top:48px;left:calc(var(--fan-edge) + (100% - 2*var(--fan-edge) - var(--fan-card-width))*var(--fan-position));width:var(--fan-card-width);transform:translateY(var(--fan-drop)) rotate(var(--fan-angle));transform-origin:50% 95%;z-index:var(--fan-order);transition:transform .18s ease,filter .18s ease;filter:drop-shadow(-3px 3px 5px #183e3638)}
.maintenance-layout .fan-slot .play-card{display:block;width:100%;max-width:none;height:auto;max-height:none;aspect-ratio:1632/2220;min-height:0;margin:0;border:3px solid #fffaf0;border-radius:10px;background:#fffaf0;box-shadow:none;touch-action:manipulation;transform:none}
.fan-slot .play-card img{display:block;width:100%;height:100%;object-fit:contain}
.fan-slot:hover,.fan-slot:focus-within,.fan-slot.is-selected{z-index:30;transform:translateY(-28px) rotate(0deg);filter:drop-shadow(0 8px 8px #183e3640)}
.maintenance-layout .fan-slot .play-card.selected{border-color:#c4552d;box-shadow:0 0 0 2px #fffaf0}
.maintenance-layout .selection-tools{margin-top:4px;min-height:44px}
.phase-maintenance .screen-main{padding:0 6px}
@media(min-width:900px){.fan-hand{--fan-card-width:235px;min-height:395px}.stand-cup-art{height:170px}.stand-cup-banner .priority-primary>strong{font-size:30px}}
@media(max-width:350px){.fan-hand{--fan-card-width:132px;min-height:265px}.stand-hand-heading strong{font-size:18px}.stand-hand-heading span{font-size:11px}.stand-cup-art{height:140px}.stand-cup-banner .priority-primary>strong{font-size:18px}.stand-cup-banner .priority-secondary strong,.stand-cup-banner .priority-movement strong{font-size:10px}}
/* One cup component and one geometry in play, reveal, movement and maintenance. */
.cup-banner{--cup-height:160px;display:grid;grid-template-columns:auto minmax(0,1fr);gap:6px;align-items:stretch;width:100%;max-width:850px;align-self:center;flex:none;padding:6px;border-radius:16px;background:var(--priority);box-shadow:0 3px 0 var(--priority-dark);grid-column:1/-1;grid-row:1;min-width:0}
.cup-banner-art{display:block;height:var(--cup-height);min-height:0;min-width:0;padding:0;border:0;border-radius:9px;background:none;overflow:hidden}
.cup-banner-art img{display:block;width:auto;height:100%;object-fit:contain}
.cup-banner>.priority-card{height:var(--cup-height);box-shadow:none;grid-template-rows:20px minmax(0,1fr) auto;gap:4px;padding:4px}
.cup-banner .priority-weather{height:20px;min-height:20px;padding:3px 6px;font-size:10px;line-height:14px;background:#ffffff18;color:#fffaf0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cup-banner .priority-weather.is-inverted{background:#fff0b9;color:#62420d}
.cup-banner .priority-primary{padding:3px 6px;border-right-width:5px}
.cup-banner .priority-primary>strong{font-size:23px;line-height:1.1;margin:2px 0;gap:6px}
.cup-banner .priority-primary>span{font-size:11px}.cup-banner .priority-primary>small{font-size:10px}
.cup-banner .priority-secondary,.cup-banner .priority-movement{padding:4px 6px}
.cup-banner .priority-secondary strong,.cup-banner .priority-movement strong{font-size:12px;gap:3px;margin-top:1px}
.cup-banner .priority-card small{font-size:10px}
.story-heading>.cup-banner{margin-top:7px}
.hand-scroll-hint{margin:0 6px;color:#5d7063;font-size:12px;line-height:1.4;flex:none}
.hand-carousel{display:flex;align-items:flex-start;gap:12px;overflow-x:auto;overflow-y:hidden;scroll-snap-type:none;scroll-padding-inline:12px;overscroll-behavior-x:contain;scrollbar-width:thin;scrollbar-color:var(--priority) #d9d6c4;flex:none;padding:18px 12px 16px;width:100%;min-width:0;touch-action:pan-x pan-y}
.maintenance-layout .hand-carousel .play-card{height:clamp(210px,29dvh,300px);width:auto;aspect-ratio:1632/2220;flex:0 0 auto;max-height:none;max-width:none;margin:0;border:3px solid #fffaf0;background:#fffaf0;box-shadow:0 3px 6px #183e3630;transform:none;scroll-snap-align:start;touch-action:pan-x pan-y}
.maintenance-layout .hand-carousel .play-card.selected{transform:translateY(-8px);border-color:#c4552d;box-shadow:0 0 0 2px #fffaf0,0 5px 8px #183e3630}
.hand-carousel .play-card img{width:100%;height:100%;object-fit:contain}
.sound-examples{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:10px}.sound-examples button{min-height:54px;font-size:13px;padding:8px}
.hand-carousel,.maintenance-layout .hand-carousel .play-card{touch-action:pan-y;user-select:none;-webkit-user-select:none;cursor:grab}
.hand-carousel.hand-swiping{scroll-snap-type:none;cursor:grabbing}
.hand-carousel.hand-swiping .play-card{cursor:grabbing}
/* The same hand, geometry and gestures in play, sprint and preparation. */
.game-hand{min-width:0;width:100%;display:flex;flex-direction:column;gap:8px;flex:none}
.hand-heading{display:flex;align-items:center;justify-content:space-between;gap:6px;padding:10px 6px 0}
.hand-heading strong{font-size:18px}.hand-heading span{font-size:11px;color:#5d7063}
.game-hand .hand-carousel{padding:14px 10px 12px}
.game-hand .hand-carousel .play-card{height:clamp(210px,29dvh,280px);width:auto;aspect-ratio:1632/2220;flex:0 0 auto;min-height:0;max-height:none;max-width:none;margin:0;border:3px solid #fffaf0;border-radius:10px;background:#fffaf0;box-shadow:0 3px 6px #183e3630;transform:none;scroll-snap-align:start;touch-action:pan-y}
.game-hand .hand-carousel .play-card.selected{transform:translateY(-8px);border-color:#c4552d;box-shadow:0 0 0 2px #fffaf0,0 5px 8px #183e3630}
.game-hand .hand-carousel .play-card.draggable-action{touch-action:none;cursor:grab;-webkit-touch-callout:none}
/* Shared card tiles, regrouped into two stable play/selection columns. */
.play-layout.split-play-layout{display:flex;flex-direction:column;gap:8px;width:100%;min-height:0;flex:none}
.play-choices{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px;width:100%;align-items:start}
.choice-column{min-width:0;border:1px solid #bdcbb9;border-radius:12px;padding:7px;background:#e3eddf;display:flex;flex-direction:column;gap:7px}
.action-column{background:#f3ead7;border-color:#d4c5a7}
.choice-column h2{font-size:16px;margin:0;letter-spacing:0;line-height:1.3}.choice-column h2 small{font-size:10px;font-weight:400;display:block}
.choice-heading{display:flex;justify-content:space-between;align-items:center;gap:3px;min-height:44px}.choice-heading>h2{min-width:0}.choice-heading>button{font-size:11px;padding:5px;min-height:44px;flex:none}
.choice-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:5px;align-items:start}
.choice-column .play-card{display:block;width:100%;height:auto;aspect-ratio:1632/2220;max-width:none;max-height:none;min-height:0;margin:0;padding:0;border:0;border-radius:0;background:transparent;overflow:visible;box-shadow:none;touch-action:pan-y;transform:none;-webkit-touch-callout:none}
.choice-column .play-card img{display:block;width:100%;height:100%;object-fit:contain}
.choice-column .play-card .action-card-art{mask:url('/assets/pilot-parts/mask.png') center/100% 100% no-repeat;-webkit-mask:url('/assets/pilot-parts/mask.png') center/100% 100% no-repeat;object-fit:fill}
.choice-column .play-card.selected{filter:drop-shadow(0 0 3px #c4552d);transform:none}
.choice-column .play-card.draggable-action{touch-action:none;cursor:grab;-webkit-touch-callout:none}
.choice-card-info{font-size:11px;line-height:1.4;margin:0;min-height:30px}
.choice-card-info .stat{font-size:12px;padding:2px 5px}
.choice-column>button,.choice-tools>button{font-size:12px;line-height:1.25;padding:9px 5px;min-height:48px;white-space:normal}
.choice-tools{display:grid;gap:6px}.choice-tools>button{min-height:44px}
.chosen-action{width:100%;display:flex;flex-direction:column;align-items:center;gap:5px}
.chosen-action>.play-card{width:100%;max-width:260px}.chosen-action>p{font-size:12px;line-height:1.4;margin:0;text-align:center}
.split-play-layout .pilot-column>.own-table{display:block;width:100%;min-height:0;max-height:none;height:auto;margin:0}
.split-play-layout .pilot-column .player-zone{width:100%;height:auto;min-height:0;padding:4px;display:flex;flex-direction:column;border:0;background:transparent}
.split-play-layout .pilot-column .zone-title{font-size:11px;flex-wrap:wrap;gap:3px}.split-play-layout .pilot-column .zone-title>b{display:none}
.split-play-layout .pilot-column .zone-summary,.split-play-layout .pilot-column .zone-hint{display:none}
.split-play-layout .pilot-column .zone-cards{height:auto;min-height:0;max-height:none;display:block;position:relative;padding:0}
.pilot-face{width:100%;max-width:260px;margin:4px auto 0;position:relative;aspect-ratio:1632/2220}
.pilot-face>img{display:block;width:100%;height:100%;object-fit:contain;border-radius:6px}
/* A single 1632 x 2220 composition, shared by all pilot cards. */
.pilot-card{display:inline-block;position:relative;vertical-align:middle;aspect-ratio:1632/2220;width:auto;height:100%;max-width:100%;flex:none;isolation:isolate;mask:url('/assets/pilot-parts/mask.png') center/100% 100% no-repeat;pointer-events:none}
.pilot-card.pilot-card img{position:absolute;display:block;margin:0;border-radius:0;max-width:none;max-height:none;object-fit:fill;filter:none}
.pilot-card.pilot-card .pilot-illustration{inset:0;width:100%;height:100%}
.pilot-card.pilot-card .pilot-banner{left:15.5637%;top:9.4595%;width:68.8725%;height:10.6757%}
.pilot-gauges,.pilot-card .live-pilot-stats{position:absolute;inset:0;container-type:normal}
.pilot-card[data-winning-stat="0"] .pilot-gauge-0,.pilot-card[data-winning-stat="1"] .pilot-gauge-1,.pilot-card[data-winning-stat="2"] .pilot-gauge-2,.pilot-card.weather-match .pilot-weather-small{animation:pilot-winning-pulse 1.35s cubic-bezier(.22,.7,.3,1) infinite;transform-origin:center}
.pilot-card.weather-match .pilot-weather-large{animation:pilot-weather-pulse 1.35s cubic-bezier(.22,.7,.3,1) infinite;transform-origin:center}
@keyframes pilot-winning-pulse{0%,65%,100%{transform:scale(1)}18%{transform:scale(1.2)}30%{transform:scale(.96)}43%{transform:scale(1.1)}}
@keyframes pilot-weather-pulse{0%,65%,100%{transform:scale(1) rotate(0deg)}18%{transform:scale(1.25) rotate(-5deg)}30%{transform:scale(.95) rotate(3deg)}43%{transform:scale(1.13) rotate(-2deg)}}
@media(prefers-reduced-motion:reduce){.pilot-card[data-winning-stat] .pilot-gauge,.pilot-card.weather-match .pilot-weather{animation:none}}
.pilot-gauge{position:absolute;left:7.2917%;top:8.5586%;width:22.0588%;height:16.2162%;--outline:#43c0ff}
.pilot-gauge-1{left:39.2157%;top:5.3153%;--outline:#fba150}
.pilot-gauge-2{left:71.0784%;--outline:#68e86b}
.pilot-card.pilot-card .pilot-gauge-base,.pilot-card.pilot-card .pilot-gold-frame{inset:0;width:100%;height:100%}
.pilot-gauge-shadow{position:absolute;inset:0;mask:var(--gauge) center/100% 100% no-repeat}
.pilot-gauge-shadow:before{content:'';position:absolute;inset:0;background:conic-gradient(transparent 0 var(--fill),#0009 var(--fill) 100%)}
.pilot-card.pilot-card .pilot-digit{position:absolute;left:19.1667%;top:19.1667%;width:61.6667%;height:61.6667%}
.pilot-outline,.pilot-night-digit{mask:var(--digit) center/100% 100% no-repeat;background:var(--outline)}
.pilot-night-digit{background:#191225}
.pilot-total{display:grid;place-items:center;color:#fffaf0;font:bold italic 2em 'Britannic Bold',serif}
.pilot-card.pilot-card .pilot-weather-small{left:5.1471%;top:3.7838%;width:8.0882%;height:5.9459%}
.pilot-card.pilot-card .pilot-weather-large{left:36.5809%;top:73.8739%;width:26.8382%;height:19.7297%}
.play-card>.pilot-card,.pilot-face>.pilot-card{display:block;width:100%;height:100%}
.hero-cards>.pilot-card{position:absolute;top:15px;width:145px;height:198px;filter:drop-shadow(0 12px 11px #243b3240)}
.hero-cards>.pilot-card:nth-child(1){left:15px;transform:rotate(-13deg)}
.hero-cards>.pilot-card:nth-child(2){left:125px;top:0;transform:rotate(2deg)}
.hero-cards>.pilot-card:nth-child(3){left:235px;transform:rotate(15deg)}
.hero-cards .pilot-card img{border:0;box-shadow:none;transform:none}
@media(max-width:580px){.hero-cards>.pilot-card{width:108px;height:147px}.hero-cards>.pilot-card:nth-child(1){left:24px}.hero-cards>.pilot-card:nth-child(2){left:115px}.hero-cards>.pilot-card:nth-child(3){left:208px}}
.story-portrait>.pilot-card{height:100%;max-width:100%;filter:drop-shadow(2px 4px 2px #0003)}
.focus-pair>.pilot-card{height:100%;max-width:23%;flex:none}
.affinity-pair>div>.pilot-card{height:calc(100% - 22px);max-width:44%}
.winner-parade>div>.pilot-card{grid-column:1;grid-row:1/4;height:122px;max-width:90px}
.winner-parade>.weather-victory>.pilot-card{grid-column:1}
.winner-parade:has(>div:nth-child(3))>div>.pilot-card{height:65px;max-width:100%}
.zone-cards>.pilot-card{height:100%;max-width:72%}
dialog .pilot-card{display:block;width:min(100%,calc(60dvh * 1632 / 2220),calc(620px * 1632 / 2220));height:auto;aspect-ratio:1632/2220;max-width:100%;margin:auto}
.pilot-gauge.affected{animation:own-stat-change .45s ease-out}
@media(max-width:580px){.winner-parade>div>.pilot-card{height:73px;max-width:54px}.winner-parade:has(>div:nth-child(3))>div>.pilot-card{height:30px}.affinity-pair>div>.pilot-card{height:calc(100% - 16px)}}
@media(prefers-reduced-motion:reduce){.pilot-gauge.affected{animation:none}}
.live-pilot-stats.preview-changed .affected{animation:own-stat-change .45s ease-out}
@keyframes own-stat-change{0%{transform:scale(1.35)}100%{transform:scale(1)}}
.pilot-preview-note{font-size:10px;line-height:1.4;margin:6px 0 0;padding:5px;background:#fff4cf;border-radius:5px;text-align:left}
.split-play-layout .pilot-column .incoming{position:static;display:flex;flex-direction:row;flex-wrap:wrap;width:auto;max-width:none;height:auto;max-height:none;margin-top:4px;gap:3px;justify-content:center}
.split-play-layout .pilot-column .incoming>span,.split-play-layout .pilot-column .incoming>button{width:28px;height:38px;min-height:0;max-width:28px;flex:none}
@media(min-width:900px){.split-play-layout .play-choices{max-width:720px;align-self:center}.split-play-layout .choice-column{padding:12px;gap:10px}.split-play-layout .choice-grid{gap:10px}.split-play-layout .choice-grid .play-card{max-width:150px;justify-self:center}.split-play-layout .choice-column h2{font-size:19px}}
@media(prefers-reduced-motion:reduce){.live-pilot-stats.preview-changed .affected{animation:none}}
.game-hand .selection-tools{min-height:44px;flex:none;margin:0;padding:0 6px}
.play-choice-area{display:flex;flex-direction:column;gap:10px;min-width:0;flex:none;grid-column:2;grid-row:2/4}
.play-choice-area>.own-table{display:flex;min-height:110px;max-height:130px;width:100%;flex:none}
.play-choice-area>.own-table .player-zone{width:100%;background:#e3eddf}
.play-choice-area.has-played-pilot{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px;align-items:start}
.play-choice-area.has-played-pilot>.own-table{height:325px;min-height:325px;max-height:none;display:flex}
.play-choice-area.has-played-pilot>.own-table .player-zone{display:flex;flex-direction:column}
.play-choice-area.has-played-pilot>.own-table .zone-cards{position:relative;display:block;height:280px;flex:none;text-align:center;padding:0}
.play-layout .play-choice-area.has-played-pilot>.own-table .zone-cards>img{height:280px;max-height:none;max-width:100%;width:auto;object-fit:contain}
.play-choice-area.has-played-pilot>.own-table .zone-hint{display:none}
.play-choice-area.has-played-pilot>.own-table .incoming{position:absolute;bottom:4px;right:2px;display:flex;flex-direction:column;height:auto;max-height:180px;width:42px;max-width:42px;gap:3px}
.play-choice-area.has-played-pilot>.own-table .incoming>span,.play-choice-area.has-played-pilot>.own-table .incoming>button{height:54px;min-height:0;width:40px;max-width:40px;flex:none}
.play-choice-area.has-played-pilot .hand-heading{flex-wrap:wrap}.play-choice-area.has-played-pilot .hand-scroll-hint{font-size:11px}
@media(max-width:580px){.game-hand .hand-carousel .play-card{height:210px}}
@media(max-width:350px){.play-choice-area.has-played-pilot{display:flex;flex-direction:column}.play-choice-area.has-played-pilot>.own-table{align-self:stretch}}
@media(max-width:350px){.cup-banner{--cup-height:145px;gap:4px}.cup-banner .priority-primary>strong{font-size:18px}.cup-banner .priority-primary>span{font-size:10px}.cup-banner .priority-secondary strong,.cup-banner .priority-movement strong{font-size:10px}.cup-banner .criterion-symbol{width:16px;height:16px}.cup-banner .priority-secondary,.cup-banner .priority-movement{padding:3px}.maintenance-layout .hand-carousel .play-card{height:210px}}

/* Le choix du pilote tient dans l'écran du téléphone : aucun défilement vertical. */
@media(max-width:580px){
 .phase-pilot .screen-main{overflow:hidden}
 .phase-pilot .play-layout.split-play-layout{overflow:hidden;gap:4px}
 .phase-pilot .play-choices{flex:1;min-height:0;align-items:stretch;overflow:hidden}
 .phase-pilot .choice-column{min-height:0;overflow:hidden;padding:5px;gap:5px}
 .phase-pilot .choice-heading{min-height:34px}
 .phase-pilot .choice-grid{flex:1;min-height:0;grid-template-rows:repeat(2,minmax(0,1fr))}
 .phase-pilot .choice-column .play-card{height:100%;max-height:none}
 .phase-pilot .choice-column>button{min-height:44px;padding:7px 4px}
 .phase-pilot .choice-tools{margin-top:auto}
 .phase-pilot .choice-card-info{display:none}
}
@media(max-width:580px) and (max-height:660px){
 .phase-pilot .mini-board{min-height:44px;height:44px}
 .phase-pilot .play-layout.split-play-layout{gap:0}
 .phase-pilot .play-layout>.opponent-table{height:48px;min-height:48px;max-height:48px}
 .phase-pilot .play-choices{gap:5px}
 .phase-pilot .choice-column{padding:4px;gap:3px}
 .phase-pilot .choice-heading{min-height:28px}
 .phase-pilot .choice-heading>button{min-height:32px;padding:3px 7px}
 .phase-pilot .choice-column h2{font-size:14px}
 .phase-pilot .choice-column h2 small{font-size:9px}
 .phase-pilot .choice-column>button{min-height:38px;font-size:11px;padding:5px 3px}
 .phase-pilot .play-layout>.cup-banner{--cup-height:52px;height:60px;padding:3px;gap:3px;overflow:hidden}
 .phase-pilot .play-layout>.cup-banner .priority-weather,.phase-pilot .play-layout>.cup-banner .priority-secondary,.phase-pilot .play-layout>.cup-banner .priority-movement{display:none}
 .phase-pilot .play-layout>.cup-banner .priority-primary{padding:2px 5px;border-right-width:3px}
 .phase-pilot .play-layout>.cup-banner .priority-primary>strong{font-size:16px;margin:0}
 .phase-pilot .play-layout>.cup-banner .priority-primary>span{font-size:9px}
 .phase-pilot .choice-tools{display:none}
 .phase-pilot .turn-instruction{font-size:11px;line-height:1.25;padding:6px 8px}
 .phase-pilot .guide-note{font-size:10px;line-height:1.25;padding:5px 7px}
 .phase-pilot .phase-ribbon li{padding:2px 1px}
}

/* Touch interaction belongs to the game, including stationary holds. */
.playing,.playing *{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
.playing input,.playing textarea{-webkit-user-select:text;user-select:text}
.play-card img{pointer-events:none}
.action-card-art{mask:url('/assets/pilot-parts/mask.png') center/100% 100% no-repeat;border-radius:0!important;object-fit:contain!important}
img[src^="/assets/backs/"]{mask:url('/assets/pilot-parts/mask.png') center/100% 100% no-repeat;-webkit-mask:url('/assets/pilot-parts/mask.png') center/100% 100% no-repeat}
.play-screen .split-play-layout{flex:1 1 0;min-height:0}
.split-play-layout .play-choices{container-type:size;flex:1 1 0;min-height:0;align-items:stretch}
.split-play-layout .choice-column{--choice-card-height:min(calc((100cqw - 42px)*2220/6528),calc((100cqh - 106px)/2));--placed-card-height:min(calc(2*var(--choice-card-height)),calc(100cqh - 106px));min-height:0;gap:5px;padding:5px;overflow:hidden}
.split-play-layout .play-choices:has(#cancel-pilot-change,#cancel-action-change) .choice-column{--choice-card-height:min(calc((100cqw - 42px)*2220/6528),calc((100cqh - 154px)/2))}
.split-play-layout .choice-heading{height:38px;min-height:38px;flex:none}
.split-play-layout .choice-grid{display:grid;flex:none;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(2,var(--choice-card-height));align-items:start;justify-items:center;gap:5px;min-height:0}
.split-play-layout .choice-column .choice-grid .play-card{width:auto;height:var(--choice-card-height);aspect-ratio:1632/2220;max-width:100%;justify-self:center}
.split-play-layout .choice-column .play-card{border:0;background:transparent;box-shadow:none;border-radius:0}
.split-play-layout .choice-column .play-card.selected{filter:drop-shadow(0 0 3px #c4552d)}
.choice-footer{margin-top:auto;display:grid;gap:4px;flex:none;width:100%}
.choice-footer>button{min-height:44px;font-size:12px;line-height:1.2;padding:6px 3px}
.split-play-layout .chosen-action{min-height:0;flex:1;justify-content:center}
.split-play-layout .chosen-action>.play-card{width:auto;height:var(--placed-card-height);aspect-ratio:1632/2220;max-width:100%;flex:none}
.split-play-layout .pilot-column>.own-table{flex:1;display:flex;min-height:0}
.split-play-layout .pilot-column .player-zone{min-height:0;justify-content:center;padding:0}
.split-play-layout .pilot-column .zone-title,.split-play-layout .pilot-column .zone-position{display:none}
.split-play-layout .pilot-column .zone-cards{flex:none;height:var(--placed-card-height);width:100%;min-height:0;position:relative}
.split-play-layout .pilot-face{height:100%;width:auto;max-width:100%;aspect-ratio:1632/2220;margin:0 auto}
.split-play-layout .pilot-column .incoming{position:absolute;bottom:0;right:0;z-index:3;display:flex;align-items:flex-end;justify-content:flex-end;flex-wrap:nowrap;width:auto;max-width:100%;height:44%;max-height:none;margin:0;gap:2px}
.split-play-layout .pilot-column .incoming>span,.split-play-layout .pilot-column .incoming>button{height:100%;width:auto;max-width:none;aspect-ratio:1632/2220;flex:0 1 auto;background:transparent;border:0}
.split-play-layout .pilot-column .incoming img{mask:url('/assets/pilot-parts/mask.png') center/100% 100% no-repeat;border-radius:0}
/* Explicit width prevents grid/max-width constraints from squeezing card artwork. */
.split-play-layout .choice-column .choice-grid .play-card{width:calc(var(--choice-card-height)*1632/2220);min-width:0;max-width:none;justify-self:center}
.gesture-demo{position:fixed;inset:0;z-index:2000;pointer-events:none}
.gesture-finger{position:absolute;filter:drop-shadow(0 3px 3px #173d3560)}
.gesture-label{position:absolute;left:50%;transform:translateX(-50%);width:max-content;max-width:calc(100vw - 24px);background:#173d35;color:#fffaf0;padding:8px 12px;border-radius:12px;font-size:13px;line-height:1.35;text-align:center;box-shadow:0 2px 8px #0003}
/* Result gauges use the same separate artwork as the playing cards. */
.story-stat{background:transparent;border:0;box-shadow:none;padding:0}
.story-stat.deciding{box-shadow:none;filter:drop-shadow(0 0 3px #fff)}
.story-stat>strong.result-gauge{display:block;width:100%;height:100%;font-size:inherit;line-height:1}
.result-gauge .pilot-gauge{position:relative;display:block;inset:auto;width:100%;height:100%}
.result-gauge img{position:absolute;display:block;max-width:none;max-height:none;margin:0;border-radius:0;object-fit:fill;pointer-events:none}
.result-gauge .pilot-gauge-base,.result-gauge .pilot-gold-frame{inset:0;width:100%;height:100%}
.result-gauge .pilot-digit{position:absolute;left:19.1667%;top:19.1667%;width:61.6667%;height:61.6667%}
.result-gauge .pilot-total{font-size:clamp(12px,3vw,25px)}
.story-portrait .result-illustration{width:100%;height:100%;object-fit:contain;transform:none;filter:none;mask:url('/assets/pilot-parts/mask.png') center/100% 100% no-repeat}

/* Preparation uses the same cut-out cards, with a real front and back. */
.maintenance-layout .hand-heading{flex-wrap:wrap;padding-top:0}
.hand-heading #turn-hand{margin-left:auto;min-height:44px;padding:5px 9px;font-size:11px}
.maintenance-layout .game-hand .hand-carousel{perspective:900px;gap:12px;padding:12px 10px 16px;scrollbar-width:none}
.maintenance-layout .game-hand .hand-carousel::-webkit-scrollbar{display:none}
.maintenance-layout .game-hand .hand-carousel .play-card{height:clamp(160px,29dvh,280px);aspect-ratio:1632/2220;width:auto;flex:0 0 auto;border:0;border-radius:0;background:transparent;box-shadow:none;overflow:visible;perspective:900px;filter:drop-shadow(0 3px 3px #183e3628)}
.maintenance-layout .game-hand .hand-carousel .play-card.selected{border:0;box-shadow:none;filter:drop-shadow(0 0 3px #c4552d);transform:translateY(-5px)}
.card-turn{position:relative;display:block;width:100%;height:100%;transform-style:preserve-3d;transition:transform .35s ease}
.show-backs .card-turn{transform:rotateY(180deg)}
.card-front,.card-back{position:absolute;inset:0;display:block;width:100%;height:100%;backface-visibility:hidden;-webkit-backface-visibility:hidden;pointer-events:none}
.card-back{transform:rotateY(180deg)}
.card-front>.pilot-card{display:block;width:100%;height:100%}
.card-front>.action-card-art,.card-back>img{display:block;width:100%;height:100%;max-width:none;max-height:none;border:0;border-radius:0;mask:url('/assets/pilot-parts/mask.png') center/100% 100% no-repeat;object-fit:contain}
.show-backs .card-front{visibility:hidden;transition:visibility 0s .17s}
.game-hand:not(.show-backs) .card-back{visibility:hidden;transition:visibility 0s .17s}
@media(prefers-reduced-motion:reduce){.card-turn{transition:none}}
@media(max-width:580px) and (max-height:660px){
 .phase-maintenance .cup-banner{--cup-height:52px;height:60px;padding:3px;gap:3px;overflow:hidden}
 .phase-maintenance .cup-banner .priority-weather,.phase-maintenance .cup-banner .priority-secondary,.phase-maintenance .cup-banner .priority-movement{display:none}
 .phase-maintenance .cup-banner .priority-primary{padding:2px 5px}
 .phase-maintenance .cup-banner .priority-primary>strong{font-size:16px;margin:0}
 .maintenance-layout .game-hand .hand-carousel .play-card{height:clamp(100px,23dvh,150px)}
 .maintenance-layout .game-hand{gap:4px}
 .maintenance-layout .hand-scroll-hint{font-size:10px}
}

/* Compact choice slots preserve card proportions and maximise the masked art. */
.split-play-layout .choice-column{--choice-card-height:min(calc((100cqw - 12px)*2220/6528),calc((100cqh - 82px)/2));--placed-card-height:min(calc((100cqw - 12px)*2220/3264),calc(100cqh - 82px));padding:1px;gap:2px}
.split-play-layout .play-choices{gap:2px}
.split-play-layout .play-choices:has(#cancel-pilot-change,#cancel-action-change) .choice-column{--choice-card-height:min(calc((100cqw - 12px)*2220/6528),calc((100cqh - 130px)/2))}
.split-play-layout .choice-heading{height:32px;min-height:32px;padding:0 3px}
.split-play-layout .action-column .choice-heading h2{font-size:clamp(11px,3.4vw,16px);white-space:nowrap;letter-spacing:-.3px}
.split-play-layout .choice-grid{gap:0;grid-template-rows:repeat(2,var(--choice-card-height))}
.split-play-layout .choice-footer{padding:2px}
/* The carousel's outer cards have depth; the inner planes handle front/back. */
.maintenance-layout .game-hand .hand-carousel{position:relative;--carousel-card-height:clamp(160px,29dvh,280px);padding-inline:max(20px,calc((100% - var(--carousel-card-height)*1632/2220)/2));gap:0;padding-top:18px;padding-bottom:18px;touch-action:none}
.maintenance-layout .game-hand .hand-carousel .play-card{margin-inline:-10px;touch-action:none;transform-style:preserve-3d;transition:none}
/* Depth owns the outer transform; deal animations must not overwrite it. */
.phase-enter .maintenance-layout .hand-carousel .drawn{animation:none}
.maintenance-layout .game-hand .hand-carousel .play-card,.maintenance-layout .game-hand .hand-carousel .play-card *,.card-turn,.card-front,.card-back{-webkit-touch-callout:none!important;-webkit-user-select:none!important;user-select:none!important}
.maintenance-layout .hand-carousel img,dialog img,dialog .pilot-card{pointer-events:none!important;-webkit-touch-callout:none!important;user-select:none!important;-webkit-user-drag:none}
.battle-story[data-outcome="self"] .story-heading h2{color:#25633e}
.battle-story[data-outcome="opponent"] .story-heading h2{color:#674f45}
.battle-story[data-outcome="opponent"] .story-heading h2:before{content:none}
.battle-story[data-outcome="opponent"] .story-focus{background:#ede6da;border-color:#c8bcaa;box-shadow:none}
@media(max-width:580px) and (max-height:660px){.maintenance-layout .game-hand .hand-carousel{--carousel-card-height:clamp(100px,23dvh,150px)}}
.phase-movement>.quick-emotes{display:flex;order:5;min-height:44px;gap:10px;justify-content:center;flex:none}
.phase-movement>.quick-emotes button{width:44px;height:44px;min-width:44px;min-height:44px;padding:3px}
.phase-movement .screen-main{overflow:hidden}
.phase-movement .movement-layout{grid-template-rows:minmax(0,1fr);min-width:0}
.phase-movement .movement-summary{min-width:0}
/* Four readable receipts fit beside the track, including on short phones. */
@media(max-width:580px){
 .phase-movement .guide-note{font-size:11px;line-height:1.3;padding:6px 8px}
 .phase-movement .movement-summary{gap:4px}
 .phase-movement .movement-receipt{padding:4px;gap:2px;grid-template-columns:22px minmax(0,1fr) auto;flex:none}
 .phase-movement .movement-receipt .player-monogram{width:22px;height:22px;font-size:9px}
 .phase-movement .movement-receipt>strong{font-size:11px;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 .phase-movement .movement-receipt>b{grid-column:3;grid-row:1;font-size:20px;line-height:1;text-align:right}
 .phase-movement .movement-receipt small{grid-column:2/4;grid-row:2;font-size:10px;line-height:1.1;text-align:left}
 .phase-movement .sprint-notice{padding:4px;font-size:10px;line-height:1.2;flex:none}
 .phase-movement .big-race canvas{max-width:100%;max-height:100%}
}
@media(max-width:580px) and (max-height:740px){
 .phase-movement .cup-banner{--cup-height:52px;height:60px;padding:3px;gap:3px;overflow:hidden;flex:none}
 .phase-movement .cup-banner .priority-weather,.phase-movement .cup-banner .priority-secondary,.phase-movement .cup-banner .priority-movement{display:none}
 .phase-movement .cup-banner .priority-primary{padding:2px 5px}
 .phase-movement .cup-banner .priority-primary>strong{font-size:16px;margin:0}
}
@media(max-width:580px) and (max-height:600px){
 .phase-movement .movement-receipt{padding:3px}
 .phase-movement .movement-summary{gap:3px}
 .phase-movement .guide-note{font-size:10px;line-height:1.2;padding:4px 6px}
}
.battle-story .pilot-gauge.affected{animation:none}
.pilot-gauge.affected{animation:none}
.live-pilot-stats.preview-changed .affected{animation:own-stat-change .45s ease-out}
.player-identity{display:inline-flex;align-items:center;gap:4px;min-width:0;vertical-align:middle}
.player-monogram{display:inline-grid;place-items:center;width:25px;height:25px;flex:none;background:var(--identity-color);border:1px solid #183e3640;border-radius:50%;color:#183e36;font-size:10px;line-height:1;font-weight:900}
.player-identity>b{font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.action-route{display:flex;gap:5px;align-items:center;flex-wrap:wrap;margin-bottom:5px}
.action-arrow{font-size:22px;color:#af532b;font-weight:900}
.action-focus>div{min-width:0;flex:1}
.action-focus>img{width:auto;max-width:25%;height:100%;object-fit:contain}
.action-focus p{font-size:11px;line-height:1.25;margin:3px 0}
.action-focus small{font-size:12px}
.story-name>.player-identity .player-monogram{width:19px;height:19px;font-size:8px}
.story-pilot.is-action-source{outline:2px solid #b15c25;outline-offset:-3px}
.story-pilot.is-action-target{outline:3px solid #417b79;outline-offset:-3px}
.modifier-owner{position:absolute;right:-5px;bottom:-3px}
.modifier-owner .player-monogram{width:16px;height:16px;font-size:7px}
.winner-criterion{display:block;font-size:11px;color:#425647;line-height:1.3;margin-top:3px;white-space:normal}
.eliminated-strip{display:flex;align-items:center;justify-content:center;gap:7px;flex:none;min-height:26px;opacity:.6}
.eliminated-strip .player-monogram{width:18px;height:18px;font-size:8px}
.eliminated-strip .player-identity>b,.eliminated-strip>small{font-size:10px}
.battle-story{flex:1;min-height:0;flex-shrink:1}
.battle-story[data-stage="winner"] .story-focus{height:124px}
.winner-parade .advance-number{font-size:40px}
.winner-parade strong{font-size:18px}
.winner-parade span{font-size:11px;line-height:1.2}
.winner-parade img{height:100px;max-height:100%}
.winner-criterion{font-size:10px}
.eliminated-strip .player-identity{max-width:30%}
.zone-title .player-monogram,.presence .player-monogram{width:18px;height:18px;font-size:8px}
.movement-receipt .player-monogram{width:28px;height:28px}
@media(max-width:580px) and (max-height:660px){
 .battle-story .cup-banner{--cup-height:52px;height:60px;padding:3px;gap:3px}
 .battle-story .cup-banner .priority-weather,.battle-story .cup-banner .priority-secondary,.battle-story .cup-banner .priority-movement{display:none}
 .battle-story .cup-banner .priority-primary{padding:2px 4px}
 .battle-story .cup-banner .priority-primary>strong{font-size:16px;margin:0}
 .battle-story .story-focus{height:72px;padding:4px}
 .battle-story .story-pilots{min-height:80px;gap:4px}
 .battle-story .story-heading h2{font-size:17px;margin-bottom:3px}
 .battle-story .action-route{margin:0;gap:3px}
 .battle-story .action-focus p{display:none}
 .battle-story .player-identity>b{font-size:10px}
 .battle-story .player-monogram{width:20px;height:20px;font-size:8px}
 .battle-story .action-arrow{font-size:16px}
 .battle-story .winner-criterion{font-size:10px}
 .battle-story[data-stage="winner"] .story-focus{height:104px}
 .battle-story .winner-parade strong{font-size:15px}
 .battle-story .winner-parade .advance-number{font-size:30px}
 .battle-story .winner-parade span{font-size:10px}
 .phase-pilot .cup-banner>.priority-card,.phase-maintenance .cup-banner>.priority-card,.phase-movement .cup-banner>.priority-card,.battle-story .cup-banner>.priority-card{grid-template-rows:1fr;align-items:center;padding:2px;overflow:hidden}
 .phase-pilot .cup-banner .priority-primary,.phase-maintenance .cup-banner .priority-primary,.phase-movement .cup-banner .priority-primary,.battle-story .cup-banner .priority-primary{padding:2px 4px;min-height:0}
 .battle-story .cup-banner .priority-primary>span{font-size:9px;line-height:1.1}
}
@media(max-width:580px) and (max-height:660px){
 .phase-movement .cup-banner{--cup-height:52px;height:60px;padding:3px;gap:3px;overflow:hidden}
 .phase-movement .cup-banner .priority-weather,.phase-movement .cup-banner .priority-secondary,.phase-movement .cup-banner .priority-movement{display:none}
 .phase-movement .cup-banner .priority-primary{padding:2px 5px}
 .phase-movement .cup-banner .priority-primary>strong{font-size:16px;margin:0}
 .phase-movement .movement-summary{gap:4px}
 .phase-movement .movement-receipt{padding:4px;gap:2px;grid-template-columns:22px minmax(0,1fr) auto}
 .phase-movement .movement-receipt .avatar{width:24px;height:24px;font-size:11px}
 .phase-movement .movement-receipt>strong{font-size:11px}
 .phase-movement .movement-receipt>b{font-size:22px;grid-column:3;grid-row:1}
 .phase-movement .movement-receipt small{font-size:10px;grid-column:2/4;grid-row:2}
}
@media(max-width:580px) and (max-height:600px){
 .phase-movement .turn-instruction{font-size:11px;line-height:1.25;padding:5px 7px}
 .phase-movement .movement-receipt{padding:3px;gap:1px}
 .phase-movement .movement-receipt .player-monogram{width:20px;height:20px}
 .phase-movement .movement-receipt>b{font-size:18px}
 .phase-movement .movement-summary{gap:3px}
}

.criterion-icon{position:relative;display:inline-block;width:32px;height:32px;flex:none;vertical-align:middle}
.criterion-icon>img{display:block;width:100%;height:100%;object-fit:contain}
.criterion-icon>i{position:absolute;inset:23%;background:#fff;mask:url('/assets/pilot-parts/criterion-arrow.png') center/contain no-repeat;-webkit-mask:url('/assets/pilot-parts/criterion-arrow.png') center/contain no-repeat}
.criterion-secondary>i{inset:28.4%;background:var(--criterion-color)}
.movement-symbol{width:28px;height:28px;object-fit:contain;vertical-align:middle;flex:none}
.race-criterion>.criterion-icon{width:29px;height:29px}
.play-cup .criterion-icon>img{width:100%;height:100%}
.brief-row>.criterion-icon,.brief-row>.movement-symbol{width:31px;height:31px}
.priority-primary .criterion-icon{width:30px;height:30px}.priority-secondary .criterion-icon,.priority-movement .movement-symbol{width:24px;height:24px}
.play-cup .movement-criterion .movement-symbol{width:25px;height:25px}
