@font-face{font-family:InterTight;src:url(/a/fonts/inter-tight.woff2);font-weight:100 900}
@font-face{font-family:InstrumentSerif;src:url(/a/fonts/instrument-serif-400.woff2)}
@font-face{font-family:Americaine;src:url(/a/fonts/americaine-condensed.woff2)}
html:has(body[data-fit]),body[data-fit]{height:100%;overflow:hidden;box-sizing:border-box}
body[data-fit]{font-family:InterTight,sans-serif}
body[data-fit="tap"] .pill .lbl{font-size:10px;color:#999dab}
body[data-fit="tap"] #hint{color:#a8a9b3;font-size:11px;letter-spacing:.08em}
body[data-fit="tap"] #resultText{font-family:Americaine,sans-serif;font-weight:400}
body[data-fit="calendar"]{min-height:0;padding:16px;gap:12px}
body[data-fit="calendar"] .pad{max-width:100%;transform-origin:center;flex-shrink:0}
body[data-fit="calendar"] .hint{font-family:InterTight;font-size:12px;flex-shrink:0}
body[data-fit="bastion"] .controls{font-family:InterTight;padding-top:12px}
body[data-fit="bastion"] input[type=range]{min-height:32px}
body[data-fit="bastion"] .editor{overflow:hidden}
body[data-fit="line-studies"]{padding:16px;display:flex;flex-direction:column;gap:8px}
body[data-fit="line-studies"] header{display:none}
body[data-fit="line-studies"] main{display:flex;flex:1;min-height:0;position:relative}
body[data-fit="line-studies"] figure{width:100%;height:100%;display:flex;flex-direction:column;min-height:0}
body[data-fit="line-studies"] figure[hidden]{display:none}
body[data-fit="line-studies"] .figure{flex:1;min-height:0;aspect-ratio:auto}
body[data-fit="line-studies"] figcaption{font:30px/1 Americaine;margin:8px 0}
body[data-fit="line-studies"] label{font:11px InterTight;display:flex;align-items:center;gap:12px}
body[data-fit="line-studies"] input{flex:1;min-height:32px;margin:0}
body[data-fit="line-studies"] footer{margin:0;font:10px InterTight}
.fit-pager{display:flex;align-items:center;justify-content:center;gap:12px;flex-shrink:0}
.fit-pager button{font:500 11px InterTight;min-height:44px;min-width:44px;background:transparent;color:inherit;border:1px solid #8886;cursor:pointer;transition:background .18s ease}
.fit-pager button[aria-selected=true]{background:#ffffff66}
.fit-pager button:disabled{opacity:.3}
/* Board, accounts and ledger are separate fitted panels; play controls stay present. */
body[data-fit="long-run"]{padding:10px}
body[data-fit="long-run"] .app{height:100%;gap:6px}
body[data-fit="long-run"] header{display:none}
body[data-fit="long-run"] .stage{flex:1;min-height:0;display:grid;grid-template-columns:1fr;grid-template-rows:minmax(0,1fr) auto;gap:10px;align-items:stretch}
body[data-fit="long-run"] .board-shell{grid-column:1;grid-row:1;width:100%;height:100%;display:grid;place-items:center;min-height:0}
body[data-fit="long-run"] .panel{grid-column:1;grid-row:2;display:flex;align-items:center;justify-content:center;width:100%;gap:14px}
body[data-fit="long-run"] .players-box,body[data-fit="long-run"] .ledger-box,body[data-fit="long-run"] .token-tray{display:none}
body[data-fit="long-run"] .dicebox{min-height:0;padding:6px}
body[data-fit="long-run"] .deckbox{padding:6px;border-width:2px;box-shadow:2px 2px #000}
body[data-fit="long-run"] .deckbox h2,body[data-fit="long-run"] .deck-count,body[data-fit="long-run"] .deck-prompt{display:none}
body[data-fit="long-run"] .deck-card{width:32px}
body[data-fit="long-run"] .deck-slot{padding:3px}.decks{gap:8px}
body[data-fit="long-run"] .side-actions{width:auto;display:grid;gap:6px}
body[data-fit="long-run"] .side-actions button{font-size:12px;min-height:44px;padding:6px 12px}
body[data-fit="long-run"] .game-view{grid-row:1;grid-column:1;align-self:center;width:min(100%,700px);justify-self:center}
body[data-fit="long-run"] .game-view[hidden]{display:none!important}
body[data-fit="long-run"] .players-box.game-view,body[data-fit="long-run"] .ledger-box.game-view,body[data-fit="long-run"] .token-tray.game-view{display:block}
body[data-fit="long-run"] .token-players{grid-template-columns:repeat(2,1fr)}
body[data-fit="long-run"] .log{height:auto;overflow:hidden}
body[data-fit="long-run"] .log div[hidden]{display:none}
body[data-fit="long-run"] .rules{max-height:none;overflow:hidden;padding:16px}
body[data-fit="long-run"] .rule[hidden],body[data-fit="long-run"] .rules-key[hidden]{display:none}
body[data-fit="long-run"] .cardwrap{gap:8px;max-height:100%}
body[data-fit="long-run"] .card.original{width:min(230px,calc((100dvh - 150px)*.696))}
body[data-fit="long-run"] .choices button{min-height:44px;padding:6px 10px;font-size:13px}
body[data-fit="long-run"] .hint{font-size:11px;padding:6px}
body[data-fit="long-run"] .veil{padding:12px}
@media(max-height:400px){body[data-fit="long-run"] .panel{gap:8px}.token-player{padding:4px;min-height:0}.wallet-head{padding-bottom:2px}.token-tray h2{font-size:11px}.credit-holdings{display:none}.resource-token{width:20px;height:20px}}

body[data-fit="long-run"] .stage{grid-template-columns:minmax(0,1fr)}
body[data-fit="long-run"] .game-view,body[data-fit="long-run"] .token-player{min-width:0}
body[data-fit="long-run"] .token-players{grid-template-columns:repeat(2,minmax(0,1fr))}
body[data-fit="long-run"] .deck-card{width:44px}
@media(max-width:500px){body[data-fit="long-run"] .token-tray{padding:8px}.token-tray h2{font-size:12px}.resource-token{width:23px;height:23px}.resource-count b{font-size:11px}.wallet-resources{gap:4px}.token-player{padding:6px}.wallet-head{gap:4px}.credit-holdings{flex-wrap:wrap}.token-name{font-size:12px}}

@media(max-height:400px) and (min-width:600px){
body[data-fit="long-run"] .app{display:grid;grid-template-columns:90px minmax(0,1fr);gap:12px}
body[data-fit="long-run"] .app>.fit-pager{flex-direction:column;gap:4px;height:100%;justify-content:center}
body[data-fit="long-run"] .app>.fit-pager button{width:84px}
body[data-fit="long-run"] .stage{height:100%;gap:6px}
body[data-fit="long-run"] .token-players{grid-template-columns:repeat(4,minmax(0,1fr));gap:5px}
body[data-fit="long-run"] .token-tray{padding:6px}
body[data-fit="long-run"] .panel{height:50px;gap:12px}
body[data-fit="long-run"] .dicebox{padding:0}
body[data-fit="long-run"] .die{width:44px;height:44px;padding:6px;outline-offset:1px}
body[data-fit="long-run"] .deckbox{display:none}
body[data-fit="long-run"] .side-actions{display:flex}
body[data-fit="long-run"] .ledger-head{flex-direction:row;align-items:center;gap:12px}
body[data-fit="long-run"] .ledger-box{padding:6px}
body[data-fit="long-run"] .box h2{margin:0}
body[data-fit="long-run"] .players-box .prow{padding:1px 4px}
body[data-fit="long-run"] .rules .intro{display:none}
body[data-fit="long-run"] .rules h2{font-size:24px}
body[data-fit="long-run"] .rule{padding:6px 0}
body[data-fit="long-run"] .rule p{font-size:11px;line-height:1.3}
body[data-fit="long-run"] #closeRules{margin-top:8px!important;min-height:44px;padding:6px}
}

body[data-fit="long-run"]{--grot:InterTight,sans-serif;--display:InterTight,sans-serif}
body[data-fit="long-run"] button{font-family:InterTight;font-weight:600}
body[data-fit="long-run"] .box h2,body[data-fit="long-run"] .token-tray h2{font-family:InterTight;font-weight:600;letter-spacing:.04em}
body[data-fit="long-run"] .rules h2,body[data-fit="long-run"] .results h2{font-family:Americaine;font-weight:400}

@keyframes fit-enter{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:none}}
.game-view:not([hidden]),body[data-fit="line-studies"] figure:not([hidden]){animation:fit-enter .18s ease both}
@media(prefers-reduced-motion:reduce){.game-view,body[data-fit="line-studies"] figure{animation:none!important}}

body[data-fit="long-run"] .app>.fit-pager{gap:4px;width:100%}
body[data-fit="long-run"] .app>.fit-pager button{padding:8px;letter-spacing:0;flex:1;min-width:0;font-size:11px}
