:root{font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;color:#153b32;background:#e9f0e5;font-synthesis:none}
*{box-sizing:border-box}body{margin:0;min-height:100vh;background:radial-gradient(circle at 0% 0%,#f8f4e9 0,transparent 32%),radial-gradient(circle at 100% 100%,#d8eee4 0,transparent 33%),#e9f0e5}button{font:inherit;cursor:pointer}button:focus-visible{outline:3px solid #f4b94e;outline-offset:3px}[hidden]{display:none!important}
.app{width:min(1100px,100%);margin:0 auto;padding:22px 24px 18px}.topbar{height:48px;display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:15px}.brand{display:flex;align-items:center;gap:11px;font-size:19px;font-weight:900;letter-spacing:.035em;line-height:.92}.brand small{display:block;font-size:10px;letter-spacing:.26em;margin-top:4px}.brand-mark{display:grid;place-items:center;width:42px;height:42px;border-radius:15px;background:#ff5b4a;color:white;font-size:32px;line-height:1;transform:rotate(-20deg)}.top-note{font-size:11px;font-weight:800;letter-spacing:.16em;color:#648276}.game-shell{background:#f9fbf4;border:2px solid #2c5348;border-radius:24px;padding:12px;box-shadow:0 9px 0 #b5cbbb,0 23px 50px #254a3a20}.scorebar{display:grid;grid-template-columns:1fr 1fr 1fr;align-items:center;min-height:61px;padding:3px 14px 10px}.score-group{display:flex;flex-direction:column;gap:1px}.score-group.center{align-items:center}.eyebrow{font-size:10px;font-weight:900;letter-spacing:.16em;color:#739080}.score-group strong{font-size:27px;line-height:1;font-variant-numeric:tabular-nums}.score-actions{display:flex;justify-content:flex-end;gap:7px}.small-button{border:1px solid #a7c3ad;background:white;color:#214e42;border-radius:10px;padding:8px 13px;font-size:12px;font-weight:800}.small-button:hover{background:#e9f3e9}.small-button.subtle{border-color:transparent;background:transparent}.field{position:relative;width:100%;height:min(74vh,650px);min-height:520px;overflow:hidden;border-radius:15px;background:#b8deb9;border:2px solid #86b490;touch-action:none}canvas{width:100%;height:100%;display:block;touch-action:none}.overlay{position:absolute;inset:0;display:grid;place-items:center;padding:24px;background:#143a30a3;backdrop-filter:blur(5px)}.panel{width:min(100%,484px);background:#fffdf5;padding:36px 38px 27px;border:2px solid #214e42;border-radius:22px;box-shadow:0 11px 0 #1d4a3a,0 24px 55px #09221960;text-align:left}.panel-kicker{color:#e05240}.panel h1{margin:12px 0 13px;font-weight:950;letter-spacing:-.055em;line-height:1.06;font-size:clamp(31px,4.2vw,45px)}.panel h1 em{font-style:normal;color:#ef6352}.panel>p:not(.control-hint){font-size:14px;line-height:1.5;color:#64786b;margin:0 0 23px}.mode-options{display:grid;gap:9px}.mode-button{border:2px solid #245245;background:#ecf5e7;border-radius:13px;padding:13px 14px;display:flex;align-items:center;gap:12px;text-align:left;color:#183f33;transition:transform .15s,box-shadow .15s}.mode-button:hover{transform:translateY(-2px);box-shadow:0 5px 0 #adcdb3}.mode-button.free{background:#fff1df}.mode-icon{width:42px;height:42px;display:grid;place-items:center;border-radius:11px;background:#ff5b4a;color:#fff;font-size:27px;line-height:1}.mode-button.free .mode-icon{background:#f2b64b}.mode-button strong,.mode-button small{display:block}.mode-button strong{font-size:15px}.mode-button small{font-size:11px;color:#617668;margin-top:3px}.mode-arrow{margin-left:auto;font-size:23px}.result-actions{display:flex;align-items:center;gap:14px}.primary-button{background:#ff5b4a;color:white;border:2px solid #a52f2c;border-radius:11px;padding:13px 20px;font-size:14px;font-weight:900;box-shadow:0 4px 0 #a52f2c}.primary-button:hover{filter:brightness(1.05)}.text-button{color:#285345;background:transparent;border:0;text-decoration:underline;font-size:13px;font-weight:800}.control-hint{margin:24px 0 0!important;border-top:1px solid #dbe7d7;padding-top:15px;color:#678272!important;font-size:11px!important;line-height:1.6!important}.control-hint span{color:#335d4e;font-size:10px;letter-spacing:.08em;font-weight:900;margin-left:4px}.control-hint span:first-child{margin-left:0}.toast{position:absolute;top:18px;left:50%;transform:translateX(-50%) translateY(-12px);opacity:0;pointer-events:none;background:#174738;color:#fff;border-radius:20px;padding:9px 17px;font-size:13px;font-weight:900;box-shadow:0 4px 0 #0c3226;transition:opacity .2s,transform .2s;white-space:nowrap}.toast.visible{opacity:1;transform:translateX(-50%) translateY(0)}.footerbar{display:flex;justify-content:space-between;align-items:center;gap:14px;padding:12px 7px 1px;font-size:11px;color:#5c796b;font-weight:650}.footerbar span:first-child{white-space:nowrap}.footerbar b{color:#315f47}.dot{display:inline-block;width:8px;height:8px;border-radius:50%;margin:0 2px 0 10px}.dot:first-child{margin-left:0}.dot.coral{background:#ff5b4a}.dot.mint{background:#24c7ad}.dot.blue{background:#5d82e8}.dot.gold{background:#f4b94e}.page-footnote{text-align:center;margin:24px 0 4px;font-size:11px;letter-spacing:.025em;color:#718b7c}
@media(max-width:640px){.app{padding:10px 10px 14px}.topbar{height:44px;margin-bottom:8px}.brand{font-size:15px}.brand small{font-size:8px}.brand-mark{width:35px;height:35px;font-size:26px;border-radius:11px}.top-note{display:none}.game-shell{border-radius:17px;padding:7px;box-shadow:0 6px 0 #b5cbbb}.scorebar{min-height:55px;padding:4px 5px 8px}.score-group strong{font-size:23px}.eyebrow{font-size:8px}.small-button{padding:7px 8px;font-size:11px}.score-actions{gap:0}.field{height:min(73svh,700px);min-height:440px;border-radius:10px}.overlay{padding:12px}.panel{padding:25px 20px 20px;border-radius:17px}.panel h1{font-size:34px}.panel>p:not(.control-hint){font-size:13px}.footerbar{display:block;font-size:10px;padding:9px 5px 1px;line-height:1.8}.footerbar span{display:block}.page-footnote{margin-top:16px;font-size:10px}.dot{margin-left:7px}}
@media(max-width:380px){.panel{padding:21px 16px 16px}.panel h1{font-size:30px}.mode-button{padding:10px}.mode-icon{width:36px;height:36px}.field{min-height:560px}}
.field{touch-action:auto}
.score-group small{font-size:10px;font-weight:800;color:#6b8875;line-height:1.1}
.app{width:min(1280px,100%)}
.field{height:min(85vh,800px);min-height:600px}
@media(max-width:640px){.field{height:min(78svh,780px);min-height:480px}}
@media(max-width:380px){.field{min-height:560px}}
.item-legend{display:flex;flex-wrap:wrap;gap:8px 12px;margin:-11px 0 18px;color:#496b5a;font-size:11px;font-weight:800}
.item-legend span{display:inline-flex;align-items:center;gap:5px}
.item-dot{width:10px;height:10px;display:inline-block;border-radius:3px;border:1px solid #fff;box-shadow:0 0 0 1px #517367}
.item-dot.growth{background:#ffe879}.item-dot.guard{background:#2d9fc1}.item-dot.dash{background:#8c60cf}
#effects{color:#356fb7;font-size:11px;min-height:12px}
.head-risk[data-phase="grace"]{color:#865319;font-weight:900}.head-risk[data-phase="exposed"]{color:#b8302e;font-weight:900}
@media(max-width:640px){.item-legend{gap:6px 9px;margin:-11px 0 15px;font-size:10px}#effects{font-size:10px}}
.online-scorebar .score-group.center strong{font-size:24px}.online-field{touch-action:none}.online-field canvas{touch-action:none}.online-name-label{display:block;margin:2px 0 6px;color:#547260;font-size:10px;font-weight:900;letter-spacing:.15em}.online-name{width:100%;padding:11px 12px;border:2px solid #9abca5;border-radius:10px;background:#fff;color:#153b32;font:700 15px system-ui,sans-serif}.online-name:focus{outline:3px solid #f4b94e;outline-offset:1px}.online-actions{display:flex;align-items:center;flex-wrap:wrap;gap:12px;margin-top:12px}.online-actions span{font-size:11px;color:#6a8373;font-weight:700}.online-scorebar #online-effects{color:#356fb7;font-size:11px;font-weight:800}.online-scorebar #online-count{font-variant-numeric:tabular-nums}
@media(max-width:640px){.online-scorebar .score-group.center strong{font-size:18px}.online-scorebar #online-effects{font-size:10px}.online-scorebar .score-actions{max-width:75px}.online-name{font-size:14px}}
.head-picker{margin:0 0 15px}.online-name+.head-picker{margin:14px 0 0}.head-choices{display:grid;grid-template-columns:repeat(3,1fr);gap:7px;margin-top:6px}.head-choice{display:flex;align-items:center;justify-content:center;gap:7px;min-height:37px;border:2px solid #bdd2bc;border-radius:10px;background:#f4f8f0;color:#315a49;font-size:12px;font-weight:850}.head-choice[aria-pressed="true"]{border-color:#ef6653;background:#fff0e9;color:#8a332c;box-shadow:0 3px 0 #e4b9a8}.head-choice-icon{width:17px;height:17px;display:inline-block;background:#ff5b4a;flex:none}.head-choice-icon.classic{border-radius:50%}.head-choice-icon.fox{clip-path:polygon(0 0,30% 22%,50% 10%,70% 22%,100% 0,90% 75%,50% 100%,10% 75%)}.head-choice-icon.bolt{clip-path:polygon(100% 50%,35% 0,0 25%,0 75%,35% 100%)}@media(max-width:380px){.head-choice{font-size:11px;gap:4px;padding:0 3px}}
.mode-button.online{background:#e7f0ff;text-decoration:none}.mode-button.online .mode-icon{background:#5d82e8}
.overlay{overflow-y:auto;align-items:safe center}
.field{min-height:660px}
@media(max-width:640px){.field{min-height:620px}}
.standing-line{color:#a94437!important;font-weight:900!important;font-variant-numeric:tabular-nums;line-height:1.25!important;text-align:center}
.result-standings{margin:-7px 0 22px;padding:13px 15px 9px;border:1px solid #cddfcd;border-radius:12px;background:#f1f7ed}
.result-standings ol{list-style:none;margin:8px 0 0;padding:0;display:grid;gap:2px}
.result-standings li{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:6px 8px;border-radius:8px;color:#2e5443;font-size:12px;font-weight:800;font-variant-numeric:tabular-nums}
.result-standings li.is-you{background:#ffebe5;color:#a83d32}
.result-standings li span:last-child{white-space:nowrap}
@media(max-width:640px){.standing-line{font-size:9px!important;max-width:122px}.result-standings{padding:10px 11px 7px;margin-bottom:18px}}
.score-actions{flex-wrap:wrap;max-width:240px}.setting-button{border-color:#95b6a1;background:#f2f7eb;white-space:nowrap}.setting-button[aria-pressed="false"]{opacity:.72}
.map-picker{margin:0 0 15px}.map-choices{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin-top:6px}.map-choice{display:flex;align-items:center;justify-content:center;gap:8px;min-height:39px;border:2px solid #bdd2bc;border-radius:10px;background:#f4f8f0;color:#315a49;font-size:12px;font-weight:850}.map-choice[aria-pressed="true"]{border-color:#ef6653;background:#fff0e9;color:#8a332c;box-shadow:0 3px 0 #e4b9a8}.map-swatch{display:block;width:27px;height:20px;border-radius:5px;border:2px solid #fff;box-shadow:0 0 0 1px #759682}.map-swatch.day{background:linear-gradient(145deg,#d9edb9 48%,#8abc8d 49%)}.map-swatch.night{background:linear-gradient(145deg,#183d46 48%,#e8b05d 49%)}.item-dot.trophy{background:#ffb941;clip-path:polygon(50% 0,61% 34%,98% 35%,68% 57%,79% 94%,50% 72%,21% 94%,32% 57%,2% 35%,39% 34%)}
@media(max-width:640px){.score-actions{max-width:128px;gap:3px}.score-actions .small-button{font-size:10px;padding:5px 6px}.map-choice{font-size:10px;gap:4px}.map-swatch{width:20px;height:16px}}
@media(max-width:640px){.scorebar{grid-template-columns:1fr 1fr;row-gap:7px}.score-actions,.online-scorebar .score-actions{grid-column:1/-1;justify-content:center;max-width:none}.score-actions .small-button{font-size:11px;padding:6px 10px}}
@media(min-width:641px) and (max-height:850px){.panel{padding:19px 34px 16px}.panel h1{font-size:35px;margin:7px 0 8px}.panel>p:not(.control-hint){margin-bottom:12px;line-height:1.35}.head-picker,.map-picker{margin-bottom:9px}.mode-options{gap:5px}.mode-button{padding:8px 12px}.mode-icon{width:36px;height:36px;font-size:24px}.control-hint{margin-top:12px!important;padding-top:10px}}
.special-button{position:fixed;right:18px;bottom:calc(18px + env(safe-area-inset-bottom));z-index:20;min-width:118px;min-height:54px;padding:10px 14px;border:3px solid #fffdf2;border-radius:17px;background:#36bd78;color:#123e2b;font-size:14px;font-weight:950;box-shadow:0 5px 0 #167544,0 8px 20px #183f3350;touch-action:manipulation}.special-button:disabled{background:#d5e8dd;color:#6d8277;box-shadow:none}.special-button:not(:disabled){animation:spring-pulse .42s ease-in-out infinite alternate}@keyframes spring-pulse{to{transform:scale(1.07);box-shadow:0 6px 0 #167544,0 0 25px #49cf85}}.item-dot.special{background:linear-gradient(135deg,#ff7b3d 0 33%,#49cf85 33% 66%,#45bcf2 66%);border-radius:50%}@media(max-width:640px){.special-button{right:12px;bottom:calc(12px + env(safe-area-inset-bottom));min-width:112px;min-height:58px}}
/* Local Quick/Free: keep the first choice and live status visible on small screens. */
.local-game .scorebar{grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto;gap:10px;align-items:center;min-height:70px;padding:7px 12px 10px}
.local-game .score-group{min-width:0}.local-game .score-group.center{align-items:flex-start}
.local-game .score-actions{grid-column:auto;max-width:none;flex-wrap:nowrap;justify-content:flex-end}
.local-game .pause-button{min-width:72px;min-height:44px;border:2px solid #2c6551;background:#e9f5ea;color:#194535;font-size:12px}
.local-game .score-group small{max-width:100%;overflow-wrap:anywhere}
.local-game #effects{min-height:0}
.local-game .head-risk:not(:empty){margin-top:3px;padding:4px 6px;border-radius:6px;background:#fff1d6}
.local-game .head-risk[data-phase="exposed"]{background:#ffe5e0}
@media(max-width:640px){.local-game .footerbar span:first-child{white-space:normal}}
.local-game .panel{width:min(100%,520px);padding:26px 28px 22px}
.local-game .panel h1{margin:8px 0 10px;font-size:clamp(32px,4vw,43px)}
.local-game .panel>p:not(.control-hint){margin-bottom:16px}
.local-game .mode-options{gap:7px}
.local-game .mode-button{min-height:61px;padding:9px 12px}
.local-game .mode-icon{width:38px;height:38px;font-size:24px}
.local-game .control-hint{margin:13px 0 0!important;padding-top:10px}
.menu-details{margin-top:8px;border-top:1px solid #dbe7d7;color:#315a49}
.menu-details summary{display:flex;align-items:center;min-height:44px;cursor:pointer;list-style:none;font-size:12px;font-weight:900}
.menu-details summary::-webkit-details-marker{display:none}
.menu-details summary::after{content:"⌄";margin-left:auto;font-size:20px;line-height:1}
.menu-details[open]>summary::after,.player-drawer[open]>summary::after{transform:rotate(180deg)}
.menu-details summary:focus-visible{outline:3px solid #f4b94e;outline-offset:2px}
.menu-details-content{padding:10px 0 2px}
.menu-details .head-picker,.menu-details .map-picker{margin-bottom:12px}
.menu-details .head-choice,.menu-details .map-choice{min-height:44px}
.menu-details .item-legend{margin:4px 0 0}
.pause-settings{margin-top:18px;padding-top:14px;border-top:1px solid #dbe7d7}
.pause-settings-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-top:8px}
.pause-settings-actions .small-button{min-height:44px;padding:7px 9px}
@media(max-width:640px){
  .local-game .scorebar{grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto;gap:5px;padding:5px 5px 8px;min-height:67px}
  .local-game .score-group strong{font-size:23px}
  .local-game .score-group small{font-size:9px}
  .local-game .standing-line{max-width:110px}
  .local-game .pause-button{min-width:57px;min-height:44px;padding:6px;font-size:11px}
  .local-game .field{min-height:620px}
  .local-game .overlay{padding:10px}
  .local-game .panel{padding:20px 18px 14px}
  .local-game .panel h1{font-size:32px}
  .local-game .panel>p:not(.control-hint){font-size:12px;line-height:1.35;margin-bottom:13px}
  .local-game .mode-button{min-height:56px;padding:7px 9px}
  .local-game .mode-icon{width:35px;height:35px}
  .local-game .mode-button small{font-size:10px}
  .local-game .control-hint{font-size:10px!important;line-height:1.4!important}
}
.head-choice-preview{display:block;width:32px;height:32px;flex:none;pointer-events:none;touch-action:auto}
.head-choice{min-height:49px;gap:4px}
@media(max-width:380px){.head-choice-preview{width:27px;height:27px}.head-choice{font-size:10px;gap:2px}}

.overlay{overflow-x:hidden}

/* Types are independent of head shape; compact ranking leaves the field open. */
.archetype-picker{margin:14px 0 12px}
.archetype-choices{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin-top:6px}
.archetype-choice{display:flex;align-items:center;justify-content:center;gap:6px;min-height:42px;padding:7px 5px;border:2px solid #bdd2bc;border-radius:9px;background:#f4f8f0;color:#315a49;font-size:12px;font-weight:850}
.archetype-choice[aria-pressed="true"]{border-color:#245245;background:#e2eddb;box-shadow:0 2px 0 #abc5af}
.archetype-picker>p{min-height:28px;margin:7px 0 0;color:#557360;font-size:11px;line-height:1.35}
.archetype-badge{display:inline-flex;align-items:center;justify-content:center;flex:none;width:18px;height:18px;border-radius:5px;background:#397550;color:#fff;font-size:10px;font-weight:950;letter-spacing:0;line-height:1;vertical-align:middle}
.archetype-badge[data-archetype="attack"]{background:#bd4137}
.archetype-badge[data-archetype="defense"]{background:#286da6}
.live-standings{position:absolute;top:10px;left:10px;width:166px;padding:7px 8px;border:1px solid #90b29b;border-radius:10px;background:#fffdf3ed;box-shadow:0 2px 7px #16423519;pointer-events:none}
.live-standings>.eyebrow{font-size:8px;color:#4e755e;letter-spacing:.1em}
.live-standings ol{list-style:none;padding:0;margin:3px 0 0;display:grid;gap:1px}
.live-standings li,.result-standings li{display:grid;grid-template-columns:27px minmax(0,1fr) 37px 18px 23px;align-items:center;gap:5px;padding:4px 5px;border-radius:5px;font-size:11px;font-weight:800;line-height:1.1;font-variant-numeric:tabular-nums}
.live-standings li{grid-template-columns:23px minmax(0,1fr) 37px 16px 20px;padding:3px 4px;font-size:10px;gap:4px}
.live-standings .archetype-badge{width:16px;height:16px;font-size:9px}
.live-standings li.is-you{background:#ffebe5;color:#a83d32}
.standing-name{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.standing-leader:not([hidden]){display:inline-flex;align-items:center;justify-content:center;border-radius:5px;border:1px solid #ca9340;background:#593b1c;color:#fff2c3;padding:3px 2px;font-size:9px;letter-spacing:.02em;box-shadow:0 1px 3px #47301b55}
.standing-leader:not([hidden])::before{content:' ';width:12px;height:12px;background:url('./assets/art/ornament-crown.webp') center/contain no-repeat;margin-right:1px}
.is-leader{box-shadow:inset 3px 0 #d69a3d}
.standing-place{font-size:10px;color:#557360}.standing-tail{text-align:right}
.is-out .standing-place{color:#9f4a3e;font-size:8px}.is-out .standing-name{opacity:.7}
.result-standings{margin:0 0 13px;padding:10px 11px 8px}
.result-standings li{padding:6px 5px;font-size:12px}
.result-standings>.eyebrow{font-size:8px;letter-spacing:.1em}
.shared-game .panel{padding:25px 28px 20px;width:min(100%,520px)}
.shared-game .panel h1{margin:8px 0 12px;font-size:clamp(31px,4vw,42px)}
.shared-game .panel>p:not(.control-hint){margin-bottom:16px}
.shared-game .control-hint{margin-top:14px!important;padding-top:11px}
.shared-game .menu-details .head-picker{margin-top:12px}
.shared-game .scorebar{grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto;gap:8px}
.shared-game .score-actions{grid-column:auto;max-width:225px}
@media(max-width:640px){
  .archetype-choice{min-height:44px;font-size:11px;gap:4px}
  .archetype-picker{margin:11px 0 8px}
  .archetype-picker>p{font-size:10px;min-height:27px}
  .live-standings{top:8px;left:8px;width:154px;padding:5px 6px}
  .live-standings:not([hidden])~.toast{top:130px}
  .shared-game .panel{padding:20px 18px 16px}
  .shared-game .panel h1{font-size:31px}
  .shared-game .scorebar{padding:5px 5px 8px;gap:5px;min-height:78px}
  .shared-game .score-group{min-width:0}
  .shared-game .score-group.center{align-items:flex-start}
  .shared-game .score-group small{font-size:9px}
  .shared-game .score-actions{max-width:78px;justify-content:flex-end;gap:3px}
  .shared-game .score-actions .small-button{padding:5px 6px;font-size:10px}
  .shared-game .score-group.center>small:last-child{display:none}
}
.profile-chip{font-size:11px;font-weight:800;color:#315e49;padding:7px 10px;border:1px solid #a7bca6;border-radius:20px;background:#fffdf4;white-space:nowrap}
.player-card{text-align:left;border:1px solid #b5c9b6;border-radius:16px;background:#f1f5e8;padding:13px;margin:14px 0}.player-identity{display:flex;align-items:center;gap:10px}.player-identity canvas{width:76px;height:76px;flex:none;background:#deebd5;border-radius:22px}.player-details{min-width:0;flex:1}.player-details>strong{display:block;font-size:15px;overflow-wrap:anywhere}.player-details label{display:block;margin:3px 0}.player-details .eyebrow{display:block;font-size:8px;margin-bottom:3px}.player-details input{width:100%;box-sizing:border-box;border:1px solid #a8bda6;border-radius:6px;background:#fffdf7;color:#194735;font:inherit;font-size:12px;padding:7px}.player-wallet{display:block;font-size:13px;font-weight:850;color:#8c591b}.player-tier{align-self:flex-start;flex:none;font-size:10px;font-weight:800;background:#1c503e;color:#fff7da;border-radius:14px;padding:7px}.player-card progress{width:100%;height:8px;display:block;accent-color:#cf972d;margin:10px 0 5px}.player-progress-copy{display:grid;gap:4px;font-size:10px;color:#4c6d50}.player-progress-copy span:last-child{font-size:9px}.player-drawer{margin-top:9px;border-top:1px solid #c3d1b8}.player-drawer summary{cursor:pointer;font-weight:750;font-size:12px;padding:11px 0}.player-drawer h3{font-size:11px;margin:14px 0 7px}.player-drawer p{font-size:10px;line-height:1.4;margin:5px 0;color:#5c7158}.shop-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}.shop-choice{min-height:44px;padding:8px;border:1px solid #b1c4a3;border-radius:8px;background:#fffef6;color:#254c36;font:inherit;font-size:11px;cursor:pointer;text-align:left;overflow-wrap:anywhere}.shop-choice:disabled{opacity:.48;cursor:default}.shop-choice[aria-pressed="true"]{border:2px solid #2f6d4d;background:#daecd4}.player-card>p{font-size:9px;line-height:1.45;color:#65765b;margin:9px 0 0}.storage-actions{display:flex;gap:6px;flex-wrap:wrap}.storage-actions button{margin-top:6px;min-height:44px}.player-card .small-button{white-space:normal}
@media(max-width:420px){.player-card{padding:10px}.player-identity{gap:8px}.player-identity canvas{width:58px;height:64px}.player-tier{font-size:9px;padding:6px}.shop-grid{gap:5px}.player-details>strong{font-size:13px}}
.profile-chip[data-title="scout"]{background:#fff2c9;border-color:#dab34d}.profile-chip[data-title="trailblazer"]{background:#def4ed;border-color:#3caa83}.profile-chip[data-title="star"]{background:#e9e3ff;border-color:#9a7dc9}
.difficulty-picker{margin:12px 0}.difficulty-choices{display:flex;gap:6px;margin-top:5px}.difficulty-choices button{flex:1;min-height:38px;border:1px solid #b0c5b1;border-radius:9px;background:#f3f7ee;color:#47614e;font:inherit;font-size:12px;font-weight:800;cursor:pointer}.difficulty-choices button[aria-pressed="true"]{border:2px solid #416e53;background:#e7f0d7;color:#213e2c}.difficulty-picker p{font-size:10px;line-height:1.35;margin:5px 0;color:#54715c}
.progress-panel{border-top:1px solid #ccd5c4;padding-top:13px;margin-top:16px;text-align:left}.progress-heading{display:flex;align-items:center;justify-content:space-between;gap:8px}.progress-heading strong{font-size:13px}.progress-heading span{font-size:8px;letter-spacing:.1em;color:#52735b}.progress-panel progress{display:block;width:100%;height:7px;border:0;border-radius:8px;overflow:hidden;accent-color:#e99a39;margin:8px 0 5px}.progress-panel progress::-webkit-progress-bar{background:#e6eadc}.progress-panel progress::-webkit-progress-value{background:#e99a39}.progress-panel>p:not(.progress-award){font-size:10px;margin:4px 0;color:#52705a}.progress-award{font-size:12px;font-weight:800;color:#74491d;background:#fff0cb;padding:10px;border-radius:9px;line-height:1.5;margin:0 0 12px}.challenge-row{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:8px}.challenge-row>span{font-size:11px;font-weight:700}.challenge-row .text-button{font-size:10px;padding:6px 0;white-space:nowrap}.collection{margin-top:6px}.collection summary{cursor:pointer;font-size:11px;font-weight:700;padding:8px 0}.title-choices{display:flex;gap:5px;flex-wrap:wrap;padding:4px 0 8px}.title-choice{font:inherit;font-size:10px;padding:7px;border-radius:7px;border:1px solid #a8bea9;background:#f0f4e8;cursor:pointer}.title-choice[aria-pressed="true"]{background:#d6e8cb;border:2px solid #426b47}.title-choice:disabled{opacity:.5;cursor:default}.badge-list{list-style:none;padding:0;margin:0;display:grid;grid-template-columns:1fr 1fr;gap:6px}.badge-list li{padding:8px;border:1px solid #d6dfcd;border-radius:8px;min-width:0}.badge-list strong{display:block;font-size:11px}.badge-list span{display:block;font-size:10px;line-height:1.4;margin-top:4px}.badge-locked{color:#7c8777;background:#f4f5ed}.badge-earned{color:#425631;background:#ecf1d9;border-color:#c0cc8b!important}.progress-panel>small{display:block;margin-top:9px;color:#71816b;font-size:9px;line-height:1.4}.challenge-hud{position:absolute;bottom:10px;left:10px;right:10px;max-width:340px;pointer-events:none;background:#fffbedeb;color:#41604b;border:1px solid #a5b59b;border-radius:8px;padding:7px 9px;font-size:10px;font-weight:700;line-height:1.4}.challenge-hud[data-complete="true"]{background:#fff0c8;color:#79511e;border-color:#c9aa5f}
@media(max-width:640px){.profile-chip{font-size:9px;padding:5px 7px}.difficulty-picker{margin:8px 0}.difficulty-choices button{min-height:40px}.progress-panel{margin-top:12px;padding-top:10px}.challenge-hud{max-width:calc(100% - 115px);bottom:8px;left:8px;font-size:9px}.local-game .panel h1{font-size:30px}}
.overlay[data-view="result"] .panel{display:flex;flex-direction:column}.overlay[data-view="result"] .panel>*{order:10}.overlay[data-view="result"] .panel>.panel-kicker{order:0}.overlay[data-view="result"] .panel>h1{order:1}.overlay[data-view="result"] .panel>#panel-description,.overlay[data-view="result"] .panel>#online-description{order:2}.overlay[data-view="result"] .progress-panel{order:3;margin:0 0 14px}.overlay[data-view="result"] .result-actions,.overlay[data-view="result"] .online-actions{order:4;margin-bottom:14px}.overlay[data-view="result"] .result-standings{order:5}.overlay[data-view="result"] .difficulty-picker{order:6}.overlay[data-view="result"] .archetype-picker{order:7}
.tail-growth { min-height: 1.2em; color: #9b4f1c; font-weight: 800; }
/* A single player stays within the existing scrollable guide panel. */
.strategy-guide{min-width:0}
.strategy-content{min-width:0;padding:0 0 12px}
.strategy-content .strategy-note{margin:0 0 10px;color:#6a7d63;font-size:10px;font-weight:700;line-height:1.45}
.strategy-choices{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}
.strategy-choices button{min-width:0;min-height:44px;padding:7px 6px;border:1px solid #b0c5b1;border-radius:9px;background:#f3f7ee;color:#47614e;font-size:11px;font-weight:800;line-height:1.3;overflow-wrap:anywhere}
.strategy-choices button[aria-pressed="true"]{border:2px solid #416e53;background:#e7f0d7;color:#213e2c}
.strategy-content h2{margin:13px 0 5px;font-size:16px;line-height:1.25}
.strategy-content>p:not(.strategy-note){margin:0 0 10px;font-size:11px;line-height:1.5;color:#52705a}
.strategy-content video{display:block;width:100%;max-width:100%;min-width:0;aspect-ratio:4/3;object-fit:contain;background:#173b31;border:1px solid #96b49a;border-radius:10px;touch-action:auto}
.strategy-media-note{display:flex;justify-content:space-between;flex-wrap:wrap;gap:4px 10px;margin-top:6px;font-size:9px;line-height:1.4;color:#69816d}
.strategy-media-note button{min-height:36px;padding:6px 9px;border:1px solid #a8bea9;border-radius:7px;background:#f0f4e8;color:#315a49;font-size:11px;font-weight:750}
.strategy-media-note button[aria-pressed="true"]{background:#dcecd3;border-color:#426b47}
.strategy-caption-box{margin-top:8px;padding:9px 11px;min-height:64px;border:1px solid #c3d3bb;border-radius:8px;background:#f1f6e9;color:#183e30;text-align:left}
.strategy-caption-box p{margin:0;font-size:14px;line-height:1.65;white-space:pre-line;overflow-wrap:anywhere;word-break:keep-all}
.strategy-caption-box #strategy-caption-status{font-size:12px;color:#526847}
.strategy-prompts{display:grid;gap:9px;margin:13px 0 0;font-size:11px;line-height:1.5}
.strategy-prompts>div{padding-left:9px;border-left:3px solid #d4dfc4;min-width:0}
.strategy-prompts dt{font-weight:850;color:#315a49}.strategy-prompts dd{margin:2px 0 0;color:#58705a;overflow-wrap:anywhere}
@media(max-width:390px){.strategy-choices button{font-size:10px;padding:7px 4px}.strategy-content h2{font-size:15px}}

/* Fit phone play to the visible viewport; long menus use the document scroll. */
@media(max-width:640px), (max-height:500px) and (max-width:1000px){
  body.game-active{height:100svh;height:100dvh;min-height:0;overflow:hidden;overscroll-behavior:none}
  body.game-active>.app{display:flex;flex-direction:column;height:100%;min-height:0;padding:max(5px,env(safe-area-inset-top)) max(5px,env(safe-area-inset-right)) max(5px,env(safe-area-inset-bottom)) max(5px,env(safe-area-inset-left))}
  .app:is([data-view="play"],[data-view="pause"],[data-view="spectate"])>.topbar,
  .app:is([data-view="play"],[data-view="pause"],[data-view="spectate"])>.page-footnote,
  .app:is([data-view="play"],[data-view="pause"],[data-view="spectate"])>.webapp-tools,
  .app:is([data-view="play"],[data-view="pause"],[data-view="spectate"]) .footerbar{display:none}
  .app:is([data-view="play"],[data-view="pause"],[data-view="spectate"])>.game-shell{display:flex;flex-direction:column;flex:1;min-height:0;padding:5px;box-shadow:none;border-radius:12px}
  .app:is([data-view="play"],[data-view="pause"],[data-view="spectate"]) .scorebar{flex:none;min-height:67px;padding:4px 5px 7px}
  .app:is([data-view="play"],[data-view="pause"],[data-view="spectate"]) .tail-growth:empty{display:none}
  .app:is([data-view="play"],[data-view="pause"],[data-view="spectate"]) .field{flex:1;min-height:0;height:auto;border-radius:8px}
  .app:is([data-view="play"],[data-view="pause"],[data-view="spectate"]) .special-button{position:absolute;right:10px;bottom:10px;min-height:58px}
  .app:is([data-view="play"],[data-view="pause"],[data-view="spectate"]) .pause-button{min-width:57px;min-height:44px}
  .app:is([data-view="menu"],[data-view="result"],[data-view="storage-error"]) .field{height:auto;min-height:0;overflow:visible;touch-action:auto}
  .app:is([data-view="menu"],[data-view="result"],[data-view="storage-error"]) .field>canvas{position:absolute;inset:0;border-radius:inherit}
  .app:is([data-view="menu"],[data-view="result"],[data-view="storage-error"]) .overlay{position:relative;inset:auto;display:block;overflow:visible;padding:10px;border-radius:inherit;touch-action:auto}
  .app:is([data-view="menu"],[data-view="result"],[data-view="storage-error"]) .panel{margin:0 auto}
}

.item-button{position:absolute;right:10px;bottom:10px;min-height:58px;min-width:130px;z-index:3;padding:12px;border:2px solid #214e42;border-radius:14px;background:#fff1bd;color:#153b32;font-weight:900;touch-action:manipulation}.item-button:disabled{opacity:.65}.local-game .special-button{right:155px!important;min-width:115px}.item-dot.bomb{background:#394555}.overlay[data-view="spectate"]{background:transparent;backdrop-filter:none;pointer-events:none;place-items:end center;padding:12px}.overlay[data-view="spectate"] .panel{pointer-events:auto;padding:14px 18px;box-shadow:0 4px 0 #1d4a3a;width:min(100%,480px)}.overlay[data-view="spectate"] h1{font-size:22px;margin:6px 0}.overlay[data-view="spectate"] .panel>p{font-size:11px;margin-bottom:10px}.overlay[data-view="spectate"] #strategy-guide{display:none}.local-game .standing-tail{min-width:45px;text-align:right}.local-game .player-card canvas{touch-action:auto}

.local-game .live-standings{width:195px}.local-game .live-standings li{grid-template-columns:20px minmax(0,1fr) 37px 16px 45px;gap:3px}.local-game .result-standings li{grid-template-columns:27px minmax(0,1fr) 37px 18px 45px}
@media(min-width:641px) and (min-height:501px){.local-game:is([data-view="play"],[data-view="pause"],[data-view="spectate"]) .field{height:calc(100dvh - 230px);min-height:280px;max-height:750px}}
@media(max-width:640px){.local-game .live-standings{width:180px}.local-game .live-standings li{font-size:9px}}

/* Postgame preparation stays beside rewards and the next-run actions. */
.overlay[data-view="result"] .postgame-panel{order:3}
.postgame-panel{border:1px solid #c1d0b8;border-radius:14px;background:#eef5e6;padding:13px;margin:0 0 14px}
.postgame-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap;margin-bottom:10px}
.postgame-heading h2{font-size:16px;margin:0}.postgame-heading span{font-size:12px;font-weight:750;color:#885819}
.postgame-choices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
.next-run-choice{display:flex;flex-direction:column;min-width:0;padding:10px;border:1px solid #d1dcc7;background:#fffdf5;border-radius:10px}
.next-run-choice strong{font-size:13px}.next-run-choice p{font-size:11px;line-height:1.5;color:#53715c;margin:7px 0}.next-run-choice .recommendation-price{font-weight:800;color:#885819;margin-top:auto}
.next-run-choice .shop-choice{text-align:center}.postgame-panel>#postgame-shop{width:100%;margin-top:10px;min-height:44px}
.shop-choice:focus-visible,.postgame-panel button:focus-visible{outline:3px solid #d78e23;outline-offset:3px}
@media(max-width:360px){.postgame-choices{grid-template-columns:1fr}}

/* Entry: goal, controls, then two immediate ways to play. */
.entry-controls{padding:10px 12px;margin:0 0 14px;border-radius:10px;background:#edf3e8;color:#385c45}
.entry-controls p{display:flex;align-items:baseline;gap:8px;margin:0 0 6px;font-size:12px;line-height:1.5}
.entry-controls strong{flex:none;width:48px;font-size:9px;letter-spacing:.04em}.entry-controls small{display:block;font-size:10px;color:#65745d;line-height:1.4}
.local-game .mode-recommendation{display:block;margin-bottom:4px;color:#976719;font-size:10px;font-weight:850}
.local-game #player-panel{margin:12px 0 0;padding:0 12px}
.local-game #player-panel>summary{min-height:46px;padding:0;font-size:12px}
.local-game #player-panel[open]{padding-bottom:12px}
.local-game #player-panel[open]>summary{margin-bottom:10px;border-bottom:1px solid #c3d1b8}
.local-game #player-panel .player-drawer summary{font-size:11px}
.local-game .entry-settings .difficulty-picker{margin-top:0}
.local-game .entry-settings .archetype-picker{margin-top:14px}
.local-game .entry-settings .mode-button{margin-top:12px;text-decoration:none}
.local-game:not([data-view="menu"]) #entry-status,.local-game:not([data-view="menu"]) #online-link{display:none}
.local-game .entry-status{margin:10px 0!important;padding:10px;background:#fff0d6;border-radius:8px;color:#6f471e!important;font-size:12px!important}
.guide-basics{font-size:12px;line-height:1.6;color:#4e6a54}
@media(max-width:640px){.entry-controls{padding:9px 10px;margin-bottom:12px}.entry-controls p{font-size:11px}.entry-controls strong{width:40px;font-size:9px}.entry-controls small{font-size:10px}}
