@font-face{font-family:PlayMono;src:url('/vendor/jetbrains-mono/jetbrains-mono-700.woff2') format('woff2');font-display:swap;font-weight:700}*{box-sizing:border-box}html{height:100%;background:#10151b;color:#e9eeeb}body{margin:0;min-height:100%;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;background:radial-gradient(ellipse at 85% 0%,#1b2b30 0,transparent 55%),#10151b;color:#e9eeeb;-webkit-tap-highlight-color:transparent}button,a,input{touch-action:manipulation}button,.button{font:inherit;border:1px solid #37444b;background:#202b31;color:#ecf1ed;border-radius:10px;min-height:48px;padding:12px 18px;cursor:pointer;text-decoration:none;display:inline-flex;align-items:center;justify-content:center;gap:8px;font-weight:600}button:active,.button:active{transform:translateY(1px)}button:disabled{opacity:.35;cursor:default}button:focus-visible,a:focus-visible{outline:3px solid #e4c578;outline-offset:3px}a{color:inherit}.primary{background:#e3be77;border-color:#e3be77;color:#171c20;font-weight:750}.quiet{background:transparent;border-color:#37444b}.eyebrow{font:700 10px/1.4 ui-monospace,monospace;letter-spacing:2px;color:#a4b3b7;display:block}h1,h2,h3,p{margin:0}p{line-height:1.6}small{line-height:1.5}#app{max-width:1440px;margin:auto;padding:0 max(28px,env(safe-area-inset-right)) 0 max(28px,env(safe-area-inset-left))}.play-header{height:86px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #2b373e}.wordmark{font:900 21px/1 ui-monospace,monospace;letter-spacing:-1px;text-decoration:none;display:flex;gap:5px}.wordmark em{color:#e3be77;font-style:normal}.head-actions{display:flex;align-items:center;gap:22px}.head-actions button{font-size:13px}.hero{display:flex;justify-content:space-between;align-items:center;min-height:280px;gap:30px;padding:42px 0}.hero h1{font-size:clamp(38px,5.4vw,70px);line-height:1.04;letter-spacing:-2px;font-weight:760;margin:18px 0}.hero h1 span{color:#e3be77}.hero p{color:#aab8bd;max-width:440px;font-size:15px}.hero-lanes{display:flex;gap:14px;transform:rotate(-9deg);padding-right:25px}.hero-lane{width:76px;height:170px;border:1px solid var(--lc);border-top:5px solid var(--lc);display:flex;flex-direction:column;justify-content:space-between;padding:15px 10px;background:linear-gradient(160deg,color-mix(in srgb,var(--lc) 15%,#172127),#172127);border-radius:9px;box-shadow:0 18px 30px #0004}.hero-lane b{font:700 36px ui-monospace,monospace;color:var(--lc)}.hero-lane span{font:700 10px ui-monospace,monospace;white-space:nowrap}.l0{--lc:#ed7665}.l1{--lc:#e9bc65}.l2{--lc:#73b9de}.setup-section{padding-bottom:24px}.setup-heading,.team-heading,.launch-row{display:flex;align-items:center;justify-content:space-between;gap:20px}.setup-heading{border-top:1px solid #2c393e;padding-top:24px}.segmented{display:flex;gap:4px;background:#0d1217;border:1px solid #2b373e;padding:4px;border-radius:12px;margin-top:10px}.segmented button{border-color:transparent;background:transparent;min-height:42px;padding:10px 18px;font-size:14px}.segmented .active{background:#2c3940;color:#f1d293;box-shadow:0 3px 8px #0003}.team-heading{margin:30px 0 16px}.team-heading h2{font-size:23px;letter-spacing:-.5px}.selection-count{color:#e3be77;font:12px ui-monospace,monospace}.faction-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.setup-faction-tile{padding:12px;justify-content:flex-start;position:relative;text-align:left;min-width:0;overflow:hidden;background:#19232a;border-color:#2e3b43;min-height:118px}.setup-faction-tile strong{display:block;font:750 19px ui-monospace,monospace;margin:7px 0;color:#e6ece8}.setup-faction-tile small{font-size:11px;color:#a7b4b9;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.setup-faction-tile .eyebrow{font-size:8px}.faction-art{width:64px;height:98px;flex-shrink:0;overflow:hidden;transform:rotate(-8deg) translate(-8px,9px);opacity:.85}.faction-art .cf{transform:scale(.85);transform-origin:top left}.checkmark{display:none;position:absolute;top:8px;right:10px;color:#e3be77}.picked{border-color:#e3be77!important;background:#2e302a!important}.picked .checkmark{display:block}.launch-row{margin-top:24px;padding-top:24px;border-top:1px solid #2c393e}.launch-row p{font-size:13px}.launch-row small{font-size:11px;color:#99a9af;display:block;max-width:460px;margin-top:5px}.start{min-width:210px;min-height:58px;font-size:17px}footer{display:flex;justify-content:space-between;padding:22px 0 28px;font:10px ui-monospace,monospace;color:#82949b;gap:15px}footer a{color:inherit}.resume-banner{display:flex;justify-content:space-between;align-items:center;gap:20px;padding:18px 20px;background:#24312e;border:1px solid #4c6556;border-radius:12px;margin:0 0 22px}.resume-banner p,.resume-banner span{font-size:13px}.resume-banner span{color:#adbbb7}.boot,.handoff{min-height:90dvh;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:25px;text-align:center}.handoff h1{font-size:40px}.boot h1{font-size:32px}.playing{background:#10171d;overflow:hidden}.playing #app{max-width:1600px;height:100dvh;display:flex;flex-direction:column;gap:0;padding:env(safe-area-inset-top) max(12px,env(safe-area-inset-right)) env(safe-area-inset-bottom) max(12px,env(safe-area-inset-left))}.game-header{display:flex;align-items:center;gap:14px;min-height:62px;flex-shrink:0;border-bottom:1px solid #2d3941}.square{width:46px;padding:0;min-height:44px;background:#1d2931;font-size:21px}.game-title strong{font:700 13px ui-monospace,monospace;letter-spacing:1px}.game-title .eyebrow{font-size:9px;margin-top:4px;color:#d4b77c}.turn-status{margin-left:auto;font-size:13px;color:#e7c581;display:flex;align-items:center;gap:8px}.turn-status:before{content:'';width:7px;height:7px;border-radius:50%;background:#e3be77}.player-bar{display:flex;align-items:center;gap:20px;min-height:59px;flex-shrink:0;padding:9px 8px;font-size:12px}.player-bar strong{display:block;font-size:14px}.player-bar small{display:block;color:#91a4ad;font-size:10px;max-width:290px}.player-bar>span{margin-left:auto;color:#9babaf}.disk-display{display:flex;gap:6px;margin-left:auto}.disk{font:700 14px ui-monospace,monospace;padding:7px 9px;border-radius:6px;border:1px solid color-mix(in srgb,var(--lc) 35%,transparent);color:var(--lc);background:color-mix(in srgb,var(--lc) 8%,transparent)}.tablet-board{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;flex:1;min-height:0;padding:1px 0}.tablet-lane{border:1px solid #34414a;border-top:3px solid var(--lc);background:linear-gradient(180deg,color-mix(in srgb,var(--lc) 5%,#18222a),#172129);border-radius:10px;display:flex;flex-direction:column;min-height:0;overflow:hidden}.tablet-lane-head{display:flex;align-items:center;justify-content:space-between;padding:8px 10px;color:var(--lc);font:700 10px ui-monospace,monospace;letter-spacing:1px}.tablet-lane-head span{font-size:9px;letter-spacing:0;color:#b0bdc3}.tablet-slots{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;flex:1;min-height:0;padding:5px 7px;align-items:stretch}.tablet-slot{position:relative;min-height:0;padding:3px;border-radius:6px;border:1px dashed #3d4d57;background:#10192175;overflow:hidden;display:flex;align-items:center;justify-content:center;isolation:isolate}.tablet-slot.occupied{border-style:solid;border-color:#42535d;background:#202d35}.tablet-slot .cf,.tablet-slot .back{flex-shrink:0}.slot-placeholder{font:500 21px ui-monospace,monospace;color:#3c4c56}.tablet-slot.target{border:2px solid #f1cf87;background:#e3be7720;box-shadow:inset 0 0 20px #e3be7715}.target .slot-placeholder{color:#f1cf87;font-size:30px}.lane-meter{height:33px;flex-shrink:0;display:flex;align-items:center;justify-content:space-around;gap:4px;border-top:1px solid #33414a;border-bottom:1px solid #33414a;background:#101920;font:700 10px ui-monospace,monospace;color:#9faeb6;margin:2px 0}.lane-meter b{font-size:17px;color:#c8d2d6}.lane-meter .leading{color:var(--lc)}.lane-meter span{font-size:8px;letter-spacing:.4px}.power-badge{position:absolute;bottom:4px;right:3px;border-radius:5px;padding:2px 6px;background:#0e151b;color:#f6da99;font:700 16px ui-monospace,monospace;box-shadow:0 1px 5px #0008}.tokens{position:absolute;left:2px;top:2px;background:#10151bee;color:#f0d7a4;border-radius:3px;font-size:8px;padding:2px;max-width:90%;white-space:normal}.under-label{position:absolute;left:0;right:0;bottom:0;background:#17232cf0;font-size:7px;padding:4px;color:#d8c49c;z-index:2}.mine{border-bottom:1px solid #2b3942;min-height:54px}.mine .quiet{min-height:40px;padding:7px 12px;font-size:11px}.tablet-dock{flex-shrink:0;padding:10px 0 9px}.dock-label{display:flex;justify-content:space-between;gap:8px;align-items:center;margin-bottom:8px;min-height:18px}.dock-label>.eyebrow{color:#d5c08e;font-size:9px}.dock-label>span:not(.eyebrow){font-size:10px;color:#8fa1ab}.dock-label .quiet{min-height:25px;padding:4px 9px;font-size:10px}.dock-content{display:flex;gap:14px;align-items:stretch}.hand-strip{display:flex;gap:10px;overflow-x:auto;overflow-y:hidden;padding:2px 3px 8px;flex:1;min-width:0;overscroll-behavior-x:contain;scroll-snap-type:x proximity;-webkit-overflow-scrolling:touch;scrollbar-width:thin;scrollbar-color:#42525b transparent}.hand-card{flex-shrink:0;display:block;padding:0;background:transparent;border:0;border-radius:6px;scroll-snap-align:start;text-align:left}.hand-card>div{border:1px solid #3c4b56;border-radius:7px;padding:3px;background:#1b2730}.hand-card.playable>div{border-color:#8d815e}.hand-card .cf{pointer-events:none}.hand-caption{display:block;padding:5px 3px;width:104px}.hand-caption strong{font-size:9px;display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.hand-caption small{font:8px ui-monospace,monospace;color:#afbbc1}.dock-buttons{width:120px;display:flex;flex-direction:column;gap:9px;justify-content:flex-end;padding-bottom:8px}.dock-buttons button{min-height:50px;font-size:13px}.market-button{background:#25323c}.pass-button{background:#e3be77;border-color:#e3be77;color:#151b20}.cf{position:relative;overflow:hidden}.cf .card{margin:0!important}.back{border-radius:5px;border:2px solid #65727b;background:repeating-linear-gradient(45deg,#192a35,#192a35 5px,#223845 5px,#223845 6px);position:relative;display:flex;align-items:center;justify-content:center;color:#c6baa0;font:700 9px ui-monospace,monospace}.back:after{content:'CTRL + ALT + DEL';font-size:7px;position:absolute;top:45%;left:4px;right:4px;text-align:center}.back>*{visibility:hidden}dialog{color:#edf0eb;background:#18242c;border:1px solid #52616a;border-radius:18px;padding:30px;width:min(750px,calc(100vw - 36px));max-height:calc(100dvh - 36px);overflow:auto;box-shadow:0 30px 120px #0008;overscroll-behavior:contain}dialog::backdrop{background:#070e15d9;backdrop-filter:blur(5px)}dialog .close{position:absolute;right:12px;top:12px;min-width:44px;min-height:44px;padding:0;background:#2c3b45;border-color:#52616a;z-index:3}dialog>.eyebrow{margin-bottom:12px}dialog>h1,dialog>h2{padding-right:35px;margin-bottom:18px;line-height:1.2}dialog>p{margin:15px 0;color:#b7c4c9}dialog>button:not(.close){margin:12px 8px 0 0}.inspection{display:grid;grid-template-columns:220px minmax(0,1fr);gap:30px;padding-top:16px;align-items:start}.inspection h2{font-size:30px;line-height:1.15;margin:12px 0 15px}.large-card{border-radius:12px;overflow:hidden;box-shadow:0 18px 35px #0006}.card-stats{font:12px ui-monospace,monospace;color:#e0c58b;margin-bottom:20px}.effect-text{font-size:16px;line-height:1.75;color:#e1e9e8}.inspect-actions{display:flex;flex-direction:column;gap:10px;margin-top:24px}.muted{color:#9fb0b9;font-size:12px;margin-top:15px}.choice-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:15px 0}.choice{justify-content:flex-start;text-align:left;min-height:66px}.choice .cf{flex-shrink:0}.choice>span{font-size:13px;line-height:1.45}.gear-list{display:flex;gap:16px;overflow-x:auto;padding:15px 0}.gear-item{display:block;flex-shrink:0;text-align:left;padding:8px}.gear-item>div>strong,.gear-item>div>span{display:block;font-size:11px;max-width:132px;margin-top:8px}.help-list{line-height:1.7;padding-left:22px;color:#c2cfd2}.help-list li{margin-bottom:16px}.game-log{line-height:1.6;font-size:13px;padding-left:24px}.game-log li{margin-bottom:8px}.result-score{display:flex;align-items:center;gap:30px;padding:20px;background:#101a21;border-radius:10px}.result-score .disk-display{margin:0}.result-score>span{color:#8a9ca5;font-size:12px}.rival-picks,.charge-list{display:flex;gap:10px;flex-wrap:wrap}#toast{position:fixed;bottom:max(22px,env(safe-area-inset-bottom));left:50%;transform:translate(-50%,20px);background:#e6c787;color:#162028;padding:14px 22px;box-shadow:0 10px 40px #0008;border-radius:10px;max-width:90vw;font-size:13px;text-align:center;pointer-events:none;opacity:0;z-index:100;transition:opacity .2s,transform .2s}#toast.show{opacity:1;transform:translate(-50%,0)}
@media(orientation:landscape) and (max-height:800px){.game-header{min-height:50px}.player-bar{min-height:44px;padding:5px}.game-title strong{font-size:11px}.tablet-dock{padding-top:7px;padding-bottom:4px}.hand-caption{width:82px;padding:4px 1px}.hand-caption strong{font-size:8px}.hand-caption small{font-size:7px}.hand-strip{gap:9px;padding-bottom:3px}.dock-label{margin-bottom:5px}.dock-buttons{width:110px;padding-bottom:3px}.tablet-lane-head{padding:6px 8px}.tablet-board{gap:10px}.lane-meter{height:28px}.mine .quiet{min-height:34px}.inspection .large-card{max-height:370px}.faction-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.hero{min-height:240px;padding:30px 0}.hero h1{font-size:50px}.setup-faction-tile{min-height:105px}.faction-art{width:48px}.setup-faction-tile strong{font-size:16px}}
@media(max-width:800px){#app{padding-left:22px;padding-right:22px}.hero{gap:16px;min-height:300px}.hero-lanes{gap:8px;padding-right:4px}.hero-lane{width:45px;height:150px;padding:12px 6px}.hero-lane b{font-size:25px}.hero-lane span{font-size:8px}.hero h1{font-size:43px}.hero p{font-size:13px}.faction-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}.setup-faction-tile{padding:10px}.faction-art{width:43px;opacity:.65}.setup-faction-tile strong{font-size:16px}.launch-row{align-items:flex-start}.start{min-width:175px}.launch-row small{max-width:340px}.tablet-board{gap:7px}.tablet-slots{padding:4px;gap:4px}.player-bar{gap:8px}.player-bar small{max-width:240px;font-size:9px}.disk{font-size:12px;padding:6px}.dock-content{gap:10px}.dock-buttons{width:108px}.turn-status{font-size:11px}.lane-meter span{font-size:7px}.tablet-lane-head{font-size:9px}.tablet-lane-head span{font-size:8px}}
@media(max-width:580px){.hero-lanes{display:none}.hero{min-height:270px}.hero h1{font-size:44px}.faction-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.setup-heading{align-items:flex-start;flex-wrap:wrap;gap:12px}.launch-row{flex-direction:column}.start{width:100%}.head-actions .eyebrow{display:none}.wordmark{font-size:17px}.inspection{grid-template-columns:1fr;gap:20px}.large-card{max-width:220px;margin:auto}.choice-list{grid-template-columns:1fr}.tablet-slots{gap:2px;padding:3px}.game-title strong{font-size:9px}.player-bar small{max-width:150px}.tablet-lane-head{padding:5px 4px}.tablet-lane-head span{font-size:7px}.tablet-board{gap:4px}.dock-buttons{width:80px}.dock-buttons button{font-size:11px;padding:8px}.disk{padding:4px;font-size:10px}.turn-status{font-size:10px}.lane-meter span{font-size:6px}.result-score{gap:12px}footer{font-size:8px}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important;animation:none!important}}
[hidden]{display:none!important}
.login-panel{max-width:580px;margin:56px auto 48px;padding:30px;border:1px solid #34454d;border-radius:16px;background:#18242c}.login-panel h1{font-size:34px;letter-spacing:-1px;margin:14px 0 18px}.login-panel p{color:#aebfc5;font-size:14px;margin-bottom:20px}.login-panel form{margin-top:28px;padding-top:22px;border-top:1px solid #34454d}.login-panel h2{font-size:18px;margin-bottom:18px}.login-panel label{display:block;color:#c3ced2;font-size:13px;margin:18px 0}.login-panel input{display:block;width:100%;margin-top:8px;padding:14px;min-height:50px;border:1px solid #4c606b;border-radius:8px;background:#101a21;color:#f0f1ec;font:16px -apple-system,BlinkMacSystemFont,sans-serif}.login-panel button,.login-panel>.button{width:100%;margin-top:6px}.login-panel .login-message{margin:20px 0 0;color:#eac77e}@media(max-width:580px){.login-panel{padding:22px;margin-top:30px}.login-panel h1{font-size:28px}}

/* Each lane contains two player columns with three portrait card positions. */
.tablet-lane{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:auto auto minmax(0,1fr) auto;column-gap:4px;padding:0 4px}
.tablet-lane-head{grid-column:1 / -1;grid-row:1;padding:8px 5px}
.lane-seat-labels{grid-column:1 / -1;grid-row:2;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));padding:3px 0 6px;text-align:center;font:8px ui-monospace,monospace;letter-spacing:1px;color:#8fa5ae}
.lane-seat-labels span:last-child{color:#e3c68a}
.tablet-slots{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:repeat(3,minmax(0,1fr));gap:5px;padding:3px 0;justify-items:center;align-items:center;min-height:0}
.opponent-slots{grid-column:1;grid-row:3}
.own-slots{grid-column:2;grid-row:3;border-left:1px solid #34444d;padding-left:4px}
.tablet-lane .lane-meter{grid-column:1 / -1;grid-row:4;margin-top:6px}
.tablet-slot{width:auto;height:calc((100% - 8px));max-width:calc(100% - 4px);aspect-ratio:128.72 / 193.92;padding:0;min-width:0;min-height:0;justify-content:center;align-items:center;gap:0;overflow:hidden;border-radius:6px}
.tablet-slot .cf{flex:none;pointer-events:none;max-width:100%;max-height:100%}
.field-info,.empty-slot-label{display:none}
.tablet-slot .slot-placeholder{width:auto;flex:none;text-align:center;font-size:18px}
.tablet-slot .power-badge{top:auto;bottom:3px;right:3px;transform:none;min-width:20px;font-size:16px;line-height:1.1;padding:3px;border:1px solid #5c6556}
.tablet-slot .tokens{top:3px;bottom:auto;left:2px;right:2px;font-size:8px;max-width:100%;white-space:normal;padding:2px}
.tablet-slot .under-label{left:0;right:0;bottom:0;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:7px;padding:3px}
@media(orientation:landscape) and (max-height:800px){.tablet-lane-head{padding:5px}.lane-seat-labels{padding:1px 0 3px;font-size:7px}.tablet-slots{gap:4px}.tablet-slot{height:calc(100% - 4px)}}
@media(max-width:580px){.tablet-lane{column-gap:2px;padding:0 2px}.own-slots{padding-left:2px}.tablet-lane-head{font-size:8px;padding:5px 2px}.tablet-lane-head span{font-size:6px}.lane-seat-labels{font-size:6px;letter-spacing:0}.tablet-slot .power-badge{font-size:12px;min-width:16px;padding:2px}.tablet-slot .tokens{font-size:6px}.tablet-slot .slot-placeholder{font-size:14px}}

/* Portrait play: rival above, own cards below, all slots remain portrait. */
.tablet-lane{grid-template-columns:minmax(0,1fr);grid-template-rows:auto auto minmax(0,1fr) auto auto minmax(0,1fr);column-gap:0;padding:0 5px}
.tablet-lane-head{grid-column:1;grid-row:1}
.lane-seat-labels{display:contents}
.lane-seat-labels span{grid-column:1;text-align:center;font:8px ui-monospace,monospace;letter-spacing:1px;color:#8fa5ae;padding:3px 0}
.lane-seat-labels span:first-child{grid-row:2}
.lane-seat-labels span:last-child{grid-row:5;color:#e3c68a}
.opponent-slots{grid-column:1;grid-row:3}
.own-slots{grid-column:1;grid-row:6;border-left:0;padding-left:0}
.tablet-lane .lane-meter{grid-column:1;grid-row:4;margin:4px -5px}
.tablet-slots{gap:4px;padding:2px 0}
.tablet-slot{height:calc(100% - 3px);max-width:calc(100% - 8px)}
@media(orientation:portrait){.tablet-dock{padding:7px 0 5px}.hand-caption{width:86px}.hand-card .cf{max-width:none}.hand-caption strong{font-size:8px}.hand-caption small{font-size:7px}}

/* Persistent market beside the lanes, without reducing their vertical space. */
.play-area{display:grid;grid-template-columns:minmax(0,1fr) 108px;gap:9px;flex:1;min-height:0}
.play-area .tablet-board{min-width:0;min-height:0}
.visible-market{display:grid;grid-template-rows:auto repeat(3,minmax(0,1fr));gap:6px;min-height:0;padding:6px;background:#18232b;border:1px solid #3c4d56;border-radius:10px;overflow:hidden}
.visible-market-head{text-align:center;padding:2px 0 4px}
.visible-market-head .eyebrow{font-size:8px;letter-spacing:1px;color:#d9c18e}
.visible-market-head>span:last-child{display:block;font:10px ui-monospace,monospace;color:#b4c2c7;margin-top:5px}
.visible-gear{display:flex;flex-direction:column;justify-content:center;gap:3px;padding:4px 2px;min-width:0;min-height:0;background:#111c23;border:1px solid #384a55;border-radius:6px;overflow:hidden}
.visible-gear .cf{flex-shrink:0;pointer-events:none}
.visible-gear>strong{display:block;width:100%;font-size:8px;line-height:1.2;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:center}
.gear-price{font:700 10px ui-monospace,monospace;color:#e3c58b;white-space:nowrap}
.visible-gear.buyable{border-color:#d4b76f;box-shadow:inset 0 0 0 1px #d4b76f44}
.empty-gear{color:#8599a3;font-size:10px}
@media(orientation:landscape) and (max-height:800px){.play-area{grid-template-columns:minmax(0,1fr) 84px;gap:7px}.visible-market{padding:4px;gap:4px}.visible-market-head .eyebrow{font-size:7px}.visible-market-head>span:last-child{font-size:9px;margin-top:2px}.visible-gear>strong{font-size:7px}.gear-price{font-size:9px}}
@media(max-width:580px){.play-area{grid-template-columns:minmax(0,1fr) 76px;gap:5px}.visible-market{padding:3px;gap:4px}.visible-market-head .eyebrow{font-size:6px;letter-spacing:0}.visible-gear>strong{font-size:7px}}

/* Card text keeps its renderer alignment inside centered app buttons. */
.cf{text-align:left}

/* Tablet start screen: selection scrolls only if necessary; play stays in view. */
.home-screen{overflow:hidden}
.home-screen #app{height:100dvh;display:flex;flex-direction:column;padding:env(safe-area-inset-top) max(20px,env(safe-area-inset-right)) env(safe-area-inset-bottom) max(20px,env(safe-area-inset-left));max-width:1440px}
.home-screen .play-header{height:58px;min-height:58px;flex-shrink:0}
.home-screen .play-header button{min-height:42px;padding:8px 14px}
.home-screen .wordmark{font-size:19px}
.home-screen .hero{min-height:0;flex-shrink:0;padding:16px 0 14px;display:block}
.home-screen .hero .eyebrow{font-size:8px;letter-spacing:1.5px}
.home-screen .hero h1{font-size:30px;line-height:1.1;letter-spacing:-1px;margin:7px 0 5px}
.home-screen .hero p{font-size:12px;max-width:none}
.home-screen .resume-banner{flex-shrink:0;min-height:52px;margin:0 0 12px;padding:10px 14px;gap:12px}
.home-screen .resume-banner strong{font-size:13px}
.home-screen .resume-banner p,.home-screen .resume-banner span{font-size:11px;line-height:1.45}
.home-screen .resume-banner button,.home-screen .resume-banner .button{min-height:42px;font-size:12px;padding:8px 14px;flex-shrink:0}
.home-screen .setup-section{display:flex;flex-direction:column;flex:1;min-height:0;padding-bottom:0}
.home-screen .setup-heading{padding-top:12px;gap:12px;flex-shrink:0;flex-wrap:nowrap}
.home-screen .setup-heading .eyebrow{font-size:8px;letter-spacing:1px}
.home-screen .segmented{margin-top:5px;padding:3px}
.home-screen .segmented button{min-height:40px;font-size:12px;padding:8px 15px}
.home-screen .setup-heading>.quiet{font-size:11px;min-height:44px;padding:9px 12px}
.home-screen .team-heading{margin:14px 0 10px;flex-shrink:0}
.home-screen .team-heading h2{font-size:19px}
.home-screen .selection-count{font-size:11px}
.home-screen .faction-grid{grid-template-columns:repeat(3,minmax(0,1fr));grid-auto-rows:minmax(76px,1fr);gap:8px;flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;align-content:stretch;padding:2px;scrollbar-width:thin}
.home-screen .setup-faction-tile{min-height:76px;height:100%;padding:8px;gap:6px;align-items:center}
.home-screen .setup-faction-tile>div:not(.faction-art){min-width:0}
.home-screen .faction-art{width:39px;height:65px;transform:rotate(-6deg) translate(-5px,5px);opacity:.85}
.home-screen .faction-art .cf{transform:scale(.55)}
.home-screen .setup-faction-tile .eyebrow{display:none}
.home-screen .setup-faction-tile strong{font-size:17px;margin:0 0 5px}
.home-screen .setup-faction-tile small{font-size:10px;line-height:1.4;-webkit-line-clamp:2}
.home-screen .checkmark{font-size:12px;top:5px;right:6px}
.home-screen .launch-row{flex-shrink:0;margin-top:10px;padding:10px 2px 0;gap:15px;align-items:center;flex-direction:row;background:#10171de8}
.home-screen .launch-row p{font-size:11px}
.home-screen .launch-row small{font-size:10px;line-height:1.45;max-width:440px;margin-top:3px}
.home-screen .start{min-height:50px;min-width:185px;width:auto;font-size:15px}
.home-screen footer{flex-shrink:0;padding:12px 0;font-size:9px;gap:12px}
@media(orientation:landscape) and (max-height:850px){.home-screen .play-header{height:50px;min-height:50px}.home-screen .hero{padding:10px 0}.home-screen .hero h1{font-size:25px;margin:4px 0}.home-screen .hero p{display:none}.home-screen .resume-banner{margin-bottom:8px;min-height:48px;padding:6px 12px}.home-screen .setup-heading{padding-top:8px}.home-screen .team-heading{margin:9px 0 7px}.home-screen .faction-grid{grid-template-columns:repeat(5,minmax(0,1fr));grid-auto-rows:minmax(72px,1fr);gap:7px}.home-screen .setup-faction-tile{min-height:72px}.home-screen .setup-faction-tile strong{font-size:15px}.home-screen .setup-faction-tile small{font-size:9px}.home-screen .faction-art{width:30px;height:57px}.home-screen .faction-art .cf{transform:scale(.46)}.home-screen .launch-row{margin-top:8px;padding-top:8px}.home-screen .start{min-height:46px}.home-screen footer{padding:8px 0}}
@media(max-width:580px){.home-screen #app{padding-left:12px;padding-right:12px}.home-screen .faction-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.home-screen .hero h1{font-size:26px}.home-screen .head-actions{gap:8px}.home-screen .setup-heading{gap:7px}.home-screen .segmented button{font-size:10px;padding:8px}.home-screen .setup-heading>.quiet{font-size:9px;padding:7px}.home-screen .resume-banner{padding:8px;gap:8px}.home-screen .resume-banner p{font-size:10px}.home-screen .resume-banner span{display:block}.home-screen .resume-banner .button,.home-screen .resume-banner button{font-size:10px;padding:7px 9px}.home-screen .launch-row{gap:9px}.home-screen .launch-row p{display:none}.home-screen .launch-row small{font-size:8px}.home-screen .start{min-width:140px;font-size:12px}.home-screen .wordmark{font-size:16px}}

/* Select the actual faction card; tapping its face flips front/back. */
.home-screen .faction-grid{grid-template-columns:repeat(4,minmax(0,1fr));grid-auto-rows:minmax(90px,1fr);gap:10px;padding:3px}
.faction-choice{position:relative;min-width:0;min-height:0;display:flex;align-items:center;justify-content:center;border-radius:10px}
.faction-choice.picked{background:transparent!important;outline:2px solid #e3be77;outline-offset:1px}
.faction-turn{position:relative;width:100%;height:100%;min-height:0;padding:0;border:0;background:transparent;border-radius:9px;overflow:hidden;text-align:left;isolation:isolate}
.faction-face-native{position:absolute;left:50%;top:50%;width:253.23px;height:166.3px;transform:translate(-50%,-50%) scale(var(--face-scale,0));transform-origin:center}
.faction-face-native>.faction-card{position:absolute;inset:0;width:253.23px;height:166.3px;font-family:var(--font);font-weight:400;letter-spacing:normal;text-transform:none}
.faction-select{position:absolute;right:0;top:0;z-index:8;width:44px;height:44px;min-height:44px;border:1px solid #6c7e88;background:#101b23ed;border-radius:50%;padding:0;font-size:24px;line-height:1;box-shadow:0 2px 8px #0006}
.faction-select[aria-pressed=true]{background:#e3be77;color:#141c21;border-color:#e3be77}
.faction-select:disabled{opacity:.25}
.faction-flip-icon{position:absolute;left:3px;bottom:3px;z-index:7;background:#101b23e8;border:1px solid #71818c;border-radius:50%;width:30px;height:30px;display:flex;align-items:center;justify-content:center;font:23px -apple-system,sans-serif;color:#edf3ef;pointer-events:none}
@media(orientation:landscape) and (max-height:850px){.home-screen .faction-grid{grid-template-columns:repeat(5,minmax(0,1fr));grid-auto-rows:minmax(82px,1fr);gap:9px}}
@media(max-width:580px){.home-screen .faction-grid{grid-template-columns:repeat(2,minmax(0,1fr));grid-auto-rows:minmax(100px,1fr);gap:9px}}

.faction-select{left:0;right:auto}
/* Draft and selectable local/server AI profiles. */
.home-screen .hero{display:flex;align-items:center;justify-content:space-between;gap:15px}
.home-utils{display:flex;flex-direction:column;align-items:flex-end;gap:5px;max-width:245px}
.home-screen .offline-button{min-height:40px;padding:8px 12px;font-size:11px}
.offline-status{font-size:9px;line-height:1.3;color:#a8c9b4;text-align:right}
.ai-picker{display:flex;flex-direction:column;gap:5px;min-width:0;flex:1;max-width:250px}
.ai-picker select{width:100%;min-height:46px;border:1px solid #52616c;border-radius:9px;background:#1b2a33;color:#f3e4c5;padding:9px 28px 9px 10px;font:12px -apple-system,BlinkMacSystemFont,sans-serif}
.ai-summary{flex-shrink:0;min-height:13px;margin:6px 0 0;font-size:10px;line-height:1.35;color:#9fb2bc}
.draft-buttons{display:flex;gap:6px;align-self:flex-end}
.home-screen .draft-buttons button{min-height:44px;min-width:44px;padding:8px;font-size:12px}
.home-screen .team-heading{margin:9px 0 6px}
.home-screen .team-heading h2{font-size:16px}
.draft-strip{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;flex-shrink:0;margin:0 0 7px;font:10px ui-monospace,monospace}
.draft-strip>div{border:1px solid #3f515b;border-radius:6px;padding:7px 8px;display:flex;align-items:center;gap:9px;min-height:34px;min-width:0}
.draft-strip b{color:#e4c17c;flex:none;font-size:9px}
.draft-strip span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#dae4e6}
.draft-rival b{color:#8ebdd6}
.faction-choice.rival-picked{outline:2px solid #74add2;outline-offset:1px}
.faction-choice.rival-picked .faction-select{background:#76b2d6;border-color:#76b2d6;color:#101c24;opacity:1}
.faction-choice.picked .faction-select:disabled{opacity:1}
@media(orientation:landscape) and (max-height:850px){.home-screen .faction-grid{grid-auto-rows:minmax(76px,1fr)}.ai-summary{font-size:9px;margin-top:4px}.draft-strip{margin-bottom:5px}.draft-strip>div{min-height:30px;padding:5px 7px}.home-screen .hero{padding:7px 0}.home-screen .team-heading{margin:7px 0 5px}}
@media(max-width:580px){.ai-picker{max-width:170px}.ai-picker select{font-size:10px;padding:8px 20px 8px 6px}.home-screen .setup-heading{flex-wrap:wrap}.home-screen .setup-heading>div:first-child{flex:1}.draft-buttons{gap:3px}.home-screen .draft-buttons button{min-width:36px;min-height:40px;font-size:10px}.home-screen .hero h1{font-size:23px}.home-screen .offline-button{font-size:9px;padding:6px 8px}.home-utils{max-width:145px}.draft-strip{font-size:8px}.draft-strip>div{gap:5px;padding:6px}.draft-strip b{font-size:7px}.ai-summary{font-size:9px}.home-screen .selection-count{font-size:9px}}
/* Optional, keyboard-free end-of-game review. */
button.danger{border-color:#ba6b65;color:#ffc5bd;background:#482c2c}
.choice-resign{display:block;margin-top:18px;font-size:12px}
.result-actions,.replay-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:16px}
.result-actions>button{flex:1;min-width:170px;min-height:50px}
.replay-actions>button{min-height:46px;font-size:12px;flex:1}
dialog[open].touch-review-dialog{display:flex;flex-direction:column;width:min(800px,calc(100vw - 30px));height:min(760px,calc(100dvh - 30px));padding:24px;overflow:hidden;gap:14px}
.touch-review-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding-right:38px;flex-shrink:0}
.touch-review-head h2{font-size:20px;line-height:1.25;margin-top:6px}
.touch-review-head .eyebrow{font-size:8px;letter-spacing:1px}
.touch-review-head>button{font-size:12px;min-height:46px;padding:10px 12px}
.touch-tabs{display:flex;gap:7px;flex-shrink:0}
.touch-tabs>button{flex:1;min-height:46px;font-size:14px}
.touch-review-body{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;padding:2px}
.touch-scale{display:flex;gap:7px;flex-wrap:wrap;margin:0 0 18px}
.touch-label{flex-basis:100%;font-size:13px;color:#bdccd1;margin-bottom:2px}
.touch-scale>button{flex:1;min-height:48px;min-width:74px;font-size:13px;padding:10px 8px}
.touch-review-dialog button.on{border-color:#e3be77;background:#e3be77;color:#152029}
.touch-review-foot{display:flex;align-items:center;justify-content:space-between;gap:18px;padding-top:12px;border-top:1px solid #3e515c;flex-shrink:0}
.touch-review-foot>small{color:#9aafb9;font-size:11px;max-width:350px}
.touch-review-foot>button{min-height:50px;min-width:165px;font-size:13px}
.touch-entity-nav{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:16px}
.touch-entity-nav>button{min-width:48px;font-size:24px;padding:5px}
.touch-entity-nav>strong{font:700 24px ui-monospace,monospace}
.touch-faction-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-bottom:20px}
.touch-faction-grid>button{min-height:46px;font:700 13px ui-monospace,monospace}
.touch-entity-effect{padding:14px;background:#111d25;border:1px solid #394d59;border-radius:8px;font-size:13px;line-height:1.65;color:#c6d6dc;margin-bottom:20px}
.touch-filter{display:flex;gap:8px;margin-bottom:18px}
.touch-filter>button{min-height:44px;font-size:12px}
.touch-card-focus{display:grid;grid-template-columns:44px 112px minmax(0,1fr) 44px;gap:12px;align-items:center;margin-bottom:18px}
.touch-card-focus>button{font-size:24px;min-width:44px;padding:5px}
.touch-card-ratings h3{font-size:18px;overflow-wrap:anywhere;margin-bottom:8px}
.touch-card-ratings .muted{font-size:10px;margin:0 0 14px}
.touch-card-ratings .touch-scale{margin-bottom:12px}
.touch-card-ratings .touch-scale>button{font-size:11px;min-width:62px;min-height:44px;padding:8px 5px}
.touch-card-strip{display:flex;gap:8px;overflow-x:auto;padding:6px;overscroll-behavior-x:contain;scroll-snap-type:x proximity}
.touch-card-strip>button{padding:4px;background:transparent;flex-shrink:0;scroll-snap-align:start}
.touch-card-strip .cf{pointer-events:none}
@media(max-width:580px){dialog[open].touch-review-dialog{padding:18px;gap:10px}.touch-review-head h2{font-size:16px}.touch-review-head>button{font-size:10px;padding:8px}.touch-tabs>button{font-size:12px}.touch-review-foot{gap:10px}.touch-review-foot>button{min-width:140px;font-size:11px}.touch-review-foot>small{font-size:9px}.touch-card-focus{grid-template-columns:36px 85px minmax(0,1fr) 36px;gap:6px}.touch-card-focus>.cf,.touch-card-focus>div>.cf{transform:scale(.75);transform-origin:left center}.touch-card-focus>button{min-width:36px}.touch-card-ratings h3{font-size:14px}.touch-card-ratings .touch-scale>button{font-size:10px;min-width:50px}.touch-scale>button{font-size:11px}.replay-actions>button{font-size:10px}}
