:root{--ink: #3b2417;--bg-top: #5b3f8f;--bg-bottom: #2a1d3d;--parchment: #f6e8c3;--parchment-dark: #e3cf9c;--card-edge: #b98a4e;--text: #3b2417;--muted: #8a6a45;--blue: #4aa3e8;--blue-dark: #1f5f9a;--green: #5bd16a;--green-dark: #2b8a3b;--gold: #ffc933;--gold-dark: #c9852f;--red: #e5533d;--red-dark: #a3281a;--font: "Lilita One", "Trebuchet MS", "Segoe UI Rounded", system-ui, sans-serif;color-scheme:light}*{box-sizing:border-box}html{background:var(--bg-bottom)}body{margin:0;color:var(--text);font-family:var(--font);font-size:16px;letter-spacing:.2px;min-height:100vh;background:radial-gradient(circle at 20% 0%,#7a5bb8 0,transparent 55%),radial-gradient(circle at 90% 100%,#3d2a66 0,transparent 50%),linear-gradient(var(--bg-top),var(--bg-bottom));background-attachment:fixed;padding:env(safe-area-inset-top,0) env(safe-area-inset-right,0) env(safe-area-inset-bottom,0) env(safe-area-inset-left,0)}.app{max-width:1040px;margin:0 auto;padding:14px 16px 28px}header{display:flex;align-items:center;gap:14px;margin-bottom:10px}h1{margin:4px 0;font-size:2.1rem;font-weight:400;line-height:1;color:var(--gold);-webkit-text-stroke:5px var(--ink);paint-order:stroke fill;text-shadow:0 4px 0 var(--ink)}h2{margin:0;font-size:1.5rem;font-weight:400}header .muted{color:#fff;background:#0006;border-radius:999px;padding:3px 12px;font-size:.85rem}.muted{color:var(--muted);font-size:.9rem}.layout{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:18px;align-items:start}@media(max-width:800px){.layout{grid-template-columns:1fr}}.board-area{min-width:0}.mobile-only{display:none}.panel,.setup{background:var(--parchment);border:4px solid var(--ink);border-radius:22px;box-shadow:0 6px 0 var(--ink),inset 0 0 0 3px var(--parchment-dark);padding:16px;display:flex;flex-direction:column;gap:12px}.setup{max-width:420px}.setup{box-sizing:border-box;width:100%;min-width:0}.slot{display:flex;gap:10px;align-items:center;min-width:0}.slot>span:first-child{width:78px;flex:none}.slot>select{flex:1 1 0;min-width:0;max-width:100%;text-overflow:ellipsis}.slot>.muted{flex:none;font-size:.85rem}button{font:inherit;color:#fff;cursor:pointer;padding:9px 16px;border-radius:14px;border:3px solid var(--ink);background:var(--blue);box-shadow:0 4px 0 var(--blue-dark),0 4px 0 3px var(--ink);text-shadow:0 2px 0 var(--ink),1px 0 0 var(--ink),-1px 0 0 var(--ink);position:relative;top:0;transition:transform .06s,filter .15s}button:hover:not(:disabled){filter:brightness(1.08)}button:active:not(:disabled){transform:translateY(3px);box-shadow:0 1px 0 var(--blue-dark),0 1px 0 3px var(--ink)}button.active{background:var(--gold);color:#fff;box-shadow:0 4px 0 var(--gold-dark),0 4px 0 3px var(--ink)}button.active:active:not(:disabled){box-shadow:0 1px 0 var(--gold-dark),0 1px 0 3px var(--ink)}button:disabled{background:#b9ad94;box-shadow:0 4px #8f8570,0 4px 0 3px var(--ink);cursor:default;filter:grayscale(.3)}button:focus-visible,select:focus-visible{outline:3px solid var(--gold);outline-offset:3px}.buttons,.modes{display:flex;flex-wrap:wrap;gap:10px;padding-bottom:6px}select{font:inherit;color:var(--ink);padding:8px 10px;border-radius:12px;border:3px solid var(--ink);background:#fffaf0;cursor:pointer}label{display:flex;gap:8px;align-items:center}input[type=checkbox]{width:20px;height:20px;accent-color:var(--green-dark)}.status{display:flex;flex-wrap:wrap;gap:8px;align-items:center}.pill,.stat{display:inline-flex;align-items:center;gap:5px;background:#fffaf0;border:3px solid var(--ink);border-radius:999px;padding:2px 11px 2px 5px;font-size:.95rem;line-height:1.3}.pill{padding-left:11px}.stat strong{font-weight:400}.icon-svg{flex:none;overflow:visible}.message{background:#fff1c2;border:3px solid var(--gold-dark);border-radius:14px;padding:8px 12px;font-size:.95rem}.result{border:3px solid var(--ink);border-radius:16px;padding:10px 14px;display:flex;flex-direction:column;gap:8px}.result.victory{background:#c9f2c4}.result.defeat{background:#ffc9bf}.between{border:3px solid var(--ink);border-radius:16px;padding:10px 14px;display:flex;flex-direction:column;gap:8px;background:#d9ecff}.modes button.end-turn{background:var(--red);box-shadow:0 4px 0 var(--red-dark),0 4px 0 3px var(--ink)}.tag.status-tag{background:#ffe9a3}button.hero.done{opacity:.75}.playtest{border:3px dashed var(--ink);border-radius:16px;padding:10px 14px;display:flex;flex-direction:column;gap:6px;background:#fffaf0}.playtest p{margin:0}.heroes{display:flex;flex-direction:column;gap:10px}button.hero{display:flex;gap:10px;align-items:center;text-align:left;color:var(--ink);text-shadow:none;background:#fffaf0;box-shadow:0 4px 0 var(--card-edge),0 4px 0 3px var(--ink);padding:8px 10px}button.hero.sel{background:#ffe9a3;box-shadow:0 4px 0 var(--gold-dark),0 4px 0 3px var(--ink)}button.hero.dead{opacity:.55}.portrait{flex:none;width:56px;height:56px;border-radius:50%;border:3px solid var(--ink);background:#bfe6ff;display:grid;place-items:center;overflow:hidden}button.hero.sel .portrait{background:#fff3a8}.hero-body{display:flex;flex-direction:column;gap:4px;flex:1;min-width:0}.hero-name{display:flex;justify-content:space-between;align-items:baseline;gap:8px}.hero-name strong{font-weight:400;font-size:1.05rem}.tag{font-size:.75rem;color:var(--muted)}.hpbar{position:relative;height:18px;border:3px solid var(--ink);border-radius:999px;background:var(--ink);overflow:hidden}.hpbar-fill{position:absolute;inset:0 auto 0 0;background:linear-gradient(var(--green),var(--green-dark));border-radius:999px}.hpbar-text{position:absolute;top:0;right:0;bottom:0;left:0;display:grid;place-items:center;color:#fff;font-size:.72rem;text-shadow:0 1px 0 var(--ink)}.stats{display:flex;gap:6px;flex-wrap:wrap}.stats .stat{padding:0 8px 0 3px;border-width:2px;font-size:.85rem}.log summary{cursor:pointer}.log ol{padding-left:22px;font-size:.85rem;max-height:180px;overflow:auto;font-family:system-ui,sans-serif}.board{display:block;width:100%;max-width:860px;height:auto;touch-action:manipulation;filter:drop-shadow(0 6px 0 var(--ink))}.board-frame{fill:#6b4a30;stroke:var(--ink);stroke-width:6}.tile{stroke:#0000}.tile-floor.tile-a{fill:#e6d3a6}.tile-floor.tile-b{fill:#dcc794}.tile-entrance{fill:#a9e0a0}.tile-exit{fill:#ffe08a}.tile-shine{fill:#fff;opacity:.28;pointer-events:none}.floater{pointer-events:none;font-family:var(--font);font-size:26px;text-anchor:middle;paint-order:stroke;stroke:var(--ink);stroke-width:6px;stroke-linejoin:round;opacity:0;animation:float-up 1.3s ease-out both}.floater.hit{fill:#fff3b0;font-size:30px}.floater.hurt{fill:#ff7b6b}.floater.heal{fill:#8fe388}.floater.info{fill:#ffd34d;font-size:20px}.floater.alert{fill:#ff5a4a;font-size:36px}@keyframes float-up{0%{opacity:0;transform:translateY(8px)}12%{opacity:1;transform:translateY(0)}70%{opacity:1}to{opacity:0;transform:translateY(-40px)}}@media(prefers-reduced-motion:reduce){.floater{animation-duration:1.6s}@keyframes float-up{0%{opacity:0}15%,70%{opacity:1}to{opacity:0}}}.inspect{pointer-events:none}.inspect-card rect{fill:#fff8e1;stroke:var(--ink);stroke-width:3}.inspect-title{font-size:17px;fill:var(--ink)}.inspect-line{font-size:12.5px;fill:#3b2a1c;font-family:system-ui,sans-serif}.terrain{pointer-events:none}.terrain-fill{fill:#8a6a3f;opacity:.85}.terrain-dark{fill:#5e4426;opacity:.75}.terrain-light{fill:#c9a56a;opacity:.8}.terrain-rock{fill:#a9a39a;stroke:var(--ink);stroke-width:2.5;stroke-linejoin:round}.terrain-rock.dark{fill:#7d776f}.terrain-side{fill:#a98a5a;stroke:var(--ink);stroke-width:3}.terrain-top{fill:#e9cf94;stroke:var(--ink);stroke-width:3}.wall-base{fill:#3d2a45;stroke:var(--ink);stroke-width:2}.wall-top{fill:#8b6f9c;stroke:var(--ink);stroke-width:3}.wall-seam{fill:none;stroke:#6b5280;stroke-width:3;stroke-linecap:round}.trap{filter:drop-shadow(0 2px 0 #0004)}.trap.disarmed{opacity:.35;filter:grayscale(1)}.unit-shadow{fill:#0004}.unit-ring{stroke-width:3}.unit-party .unit-ring{fill:#4aa3e866;stroke:var(--blue-dark)}.unit-guardian .unit-ring{fill:#e5533d66;stroke:var(--red-dark)}.unit.selected .unit-ring{stroke:var(--gold);stroke-width:5;fill:#ffc93399;animation:pulse 1.1s ease-in-out infinite;transform-box:fill-box;transform-origin:center}.facing{stroke:var(--ink);stroke-width:6;stroke-linecap:round;pointer-events:none}.hp-bg{fill:var(--ink)}.hp{fill:var(--green)}.hp.mid{fill:#f2b632}.hp.low{fill:#e5533d}.hp-text{font-family:var(--font);font-size:11px;fill:#fff;stroke:var(--ink);stroke-width:3px;paint-order:stroke;stroke-linejoin:round;pointer-events:none}.leg-l,.leg-r,.sprite-g,.sprite{transform-box:fill-box;transform-origin:center bottom}.highlight{fill:#ffc93355;stroke:var(--gold-dark);stroke-width:3;stroke-dasharray:8 6;pointer-events:none;animation:dash 1.2s linear infinite}.hit{fill:transparent;cursor:pointer}.target{fill:#e5533d33;stroke:var(--red);stroke-width:4;pointer-events:none;animation:dash 1.2s linear infinite;stroke-dasharray:10 6}.preview rect{fill:#fff8e1;stroke:var(--ink);stroke-width:2.5}.preview.lethal rect{fill:#ffc9bf}.preview text{font-size:15px;fill:var(--ink);pointer-events:none}@keyframes pulse{50%{transform:scale(1.08)}}@keyframes dash{to{stroke-dashoffset:-28}}.geomap{width:100%;height:min(72vh,660px);min-height:380px;border-radius:24px;overflow:hidden;border:5px solid var(--ink);box-shadow:0 6px 0 var(--ink)}.geomap-wrap{position:relative}.map-status{position:absolute;left:50%;top:14px;transform:translate(-50%);z-index:5;pointer-events:none;background:#fff8e1;border:3px solid var(--ink);border-radius:999px;padding:4px 14px;font-size:.9rem;white-space:nowrap;box-shadow:0 3px 0 var(--ink)}.map-status.note{top:auto;bottom:34px;white-space:normal;text-align:center;max-width:90%}.marker{line-height:0;cursor:default;-webkit-user-select:none;user-select:none;filter:drop-shadow(0 3px 0 #0006)}.marker.party svg{animation:bob 1.4s ease-in-out infinite}@keyframes bob{50%{transform:translateY(-5px)}}.maplibregl-ctrl-attrib{font-family:system-ui,sans-serif}@media(prefers-reduced-motion:reduce){.marker.party svg,.unit.selected .unit-ring,.highlight{animation:none}}@media(max-width:800px),(pointer:coarse),(max-height:520px){.app{padding:8px 10px 24px}header{margin-bottom:4px;gap:8px}header .muted{display:none}h1{font-size:1.55rem;-webkit-text-stroke:4px var(--ink);text-shadow:0 3px 0 var(--ink)}.desktop-only{display:none!important}.mobile-only{display:flex}button,select{min-height:44px}input[type=checkbox]{width:24px;height:24px}.setup{max-width:none}.setup .buttons{flex-direction:column}.setup .buttons button{width:100%}.geomap{height:min(58vh,520px);min-height:300px;border-width:4px}}.app.in-raid .desktop-only{display:none!important}.app.in-raid .mobile-only{display:flex}.app.in-raid{padding:0;max-width:none}.app.in-raid header{display:none}.raid-screen{position:fixed;top:0;right:0;bottom:0;left:0;height:100vh;height:100dvh;display:block}.board-area,.board-viewport{position:absolute;top:0;right:0;bottom:0;left:0}.board-wrap{--inset-top: 64;--inset-bottom: 96;--inset-left: 0;--inset-right: 0;position:absolute;top:0;right:0;bottom:0;left:0;display:flex;overflow:hidden;border:0;border-radius:0;background:#3a2a1c;touch-action:none;user-select:none;-webkit-user-select:none;overscroll-behavior:contain;padding:calc(var(--inset-top) * 1px) calc(var(--inset-right) * 1px) calc(var(--inset-bottom) * 1px) calc(var(--inset-left) * 1px)}.board-wrap .board{flex:none;margin:auto;max-width:none;filter:none;width:calc(var(--cols) * var(--cell) + var(--cell) / 4)}.board-frame{stroke-width:4}.hud{position:absolute;top:0;left:0;right:0;z-index:10;flex-direction:column;gap:4px;pointer-events:none;padding:calc(6px + env(safe-area-inset-top,0px)) 8px 0}.hud>*{pointer-events:auto}.hud-row{display:flex;gap:6px;align-items:center}.hud .pill,.hud .stat{font-size:.8rem;padding-top:0;padding-bottom:0;background:#fffaf0ee}.hud .menu-btn{margin-left:auto;min-height:40px;width:44px;padding:0;font-size:1.3rem;line-height:1}.hud-hero{align-self:flex-start;display:flex;align-items:center;gap:6px;background:#fffaf0ee;border:3px solid var(--ink);border-radius:999px;padding:1px 12px 1px 6px;font-size:.85rem}.hud-hero strong{font-weight:400}.hud-state{color:var(--muted);font-size:.75rem}.action-overlay{position:absolute;left:0;right:0;bottom:0;z-index:10;gap:8px;justify-content:flex-end;pointer-events:none;padding:8px 10px calc(10px + env(safe-area-inset-bottom,0px))}.action-overlay button{pointer-events:auto;min-width:84px;min-height:48px}.action-overlay button.end-turn,.modes button.end-turn{background:var(--red);box-shadow:0 4px 0 var(--red-dark),0 4px 0 3px var(--ink)}.toast{position:absolute;left:10px;right:10px;bottom:calc(76px + env(safe-area-inset-bottom,0px));z-index:11;background:#fff1c2;border:3px solid var(--gold-dark);border-radius:14px;padding:6px 10px;font-size:.85rem;box-shadow:0 3px 0 var(--ink);pointer-events:none}.offscreen-layer{position:absolute;top:0;right:0;bottom:0;left:0;z-index:8;pointer-events:none;overflow:hidden}button.offscreen{position:absolute;transform:translate(-50%,-50%);pointer-events:auto;width:42px;height:42px;min-height:42px;padding:0;border-radius:50%;display:grid;place-items:center;color:var(--ink);text-shadow:none}button.offscreen.party{background:#cfe9ff;box-shadow:0 3px 0 var(--blue-dark),0 0 0 3px var(--ink)}button.offscreen.guardian{background:#ffd2c9;box-shadow:0 3px 0 var(--red-dark),0 0 0 3px var(--ink)}button.offscreen:active:not(:disabled){transform:translate(-50%,-50%)}button.offscreen.active{width:56px;height:56px;min-height:56px;z-index:2;background:#fff3b0;box-shadow:0 3px 0 var(--gold-dark),0 0 0 4px var(--ink),0 0 0 8px var(--gold),0 0 18px 8px #ffd23f99;animation:active-pulse 1.1s ease-in-out infinite}button.offscreen.active .arrow{border-left-width:15px;border-top-width:9px;border-bottom-width:9px;margin:-9px 0 0 -5px}@keyframes active-pulse{0%,to{box-shadow:0 3px 0 var(--gold-dark),0 0 0 4px var(--ink),0 0 0 8px var(--gold),0 0 12px 4px #ffd23f66}50%{box-shadow:0 3px 0 var(--gold-dark),0 0 0 4px var(--ink),0 0 0 10px var(--gold),0 0 24px 12px #ffd23fcc}}@media(prefers-reduced-motion:reduce){button.offscreen.active{animation:none}}button.offscreen .count{position:absolute;right:-6px;top:-6px;min-width:20px;height:20px;padding:0 5px;border-radius:999px;background:var(--ink);color:#fff;font-size:.75rem;line-height:20px;text-align:center}button.offscreen .arrow{position:absolute;left:50%;top:50%;width:0;height:0;margin:-7px 0 0 -4px;border-top:7px solid transparent;border-bottom:7px solid transparent;border-left:11px solid var(--gold);filter:drop-shadow(0 0 1px var(--ink)) drop-shadow(0 0 1px var(--ink));pointer-events:none}.raid-panel{display:none}.raid-panel.open{display:flex;position:fixed;top:0;right:0;bottom:0;left:0;z-index:50;overflow-y:auto;border-radius:0;border-width:0;padding:calc(10px + env(safe-area-inset-top,0px)) 12px calc(16px + env(safe-area-inset-bottom,0px))}.sheet-head{justify-content:space-between;align-items:center;position:sticky;top:0;z-index:2;background:var(--parchment);padding:4px 0}.raid-panel .heroes{display:grid;grid-template-columns:1fr 1fr;gap:8px}.raid-panel .raid-status .message{display:none}.heroes button.hero{padding:6px 8px;gap:6px}.heroes .portrait{width:40px;height:40px}.heroes .portrait svg{width:32px;height:32px}.heroes .hero-name{flex-wrap:wrap;gap:0 6px}.heroes .stats{gap:4px}@media(max-height:520px)and (orientation:landscape){.board-wrap{--inset-top: 40;--inset-bottom: 0;--inset-right: 112}.hud{padding:calc(4px + env(safe-area-inset-top,0px)) calc(8px + env(safe-area-inset-right,0px)) 0 calc(8px + env(safe-area-inset-left,0px));flex-direction:row;align-items:center}.hud-hero{align-self:auto;padding:0 10px 0 4px}.hud .menu-btn{min-height:36px;width:40px}.action-overlay{left:auto;top:44px;width:112px;flex-direction:column;justify-content:flex-end;align-items:stretch;gap:6px;padding:4px calc(8px + env(safe-area-inset-right,0px)) calc(8px + env(safe-area-inset-bottom,0px)) 6px}.action-overlay button{min-width:0;min-height:42px;padding:0 6px;font-size:.9rem}.toast{left:calc(10px + env(safe-area-inset-left,0px));right:128px;bottom:calc(8px + env(safe-area-inset-bottom,0px))}}.fit{margin:4px 0;font-size:.95rem}.fit-easy strong{color:#2f7d32}.fit-fit strong{color:#1d6fa5}.fit-hard strong{color:#b36b00}.fit-deadly strong{color:#b3261e}.raid-screen.busy .board-wrap,.raid-screen.busy .action-overlay button{pointer-events:none}.raid-screen.busy .action-overlay button{opacity:.6}.tile-door{fill:#b88a4a}.door-frame{fill:#8a5a2b;stroke:var(--ink);stroke-width:3}.door-planks{fill:none;stroke:#5e3d1c;stroke-width:2.5;stroke-linecap:round}.door-knob{fill:#ffd23f;stroke:var(--ink);stroke-width:1.5}.door{pointer-events:none}svg.asleep{opacity:.72;filter:saturate(.7)}.zzz{font-family:var(--font);font-size:20px;fill:#cfe9ff;stroke:var(--ink);stroke-width:4px;paint-order:stroke;animation:zzz-bob 1.8s ease-in-out infinite;pointer-events:none}@keyframes zzz-bob{0%,to{transform:translateY(0);opacity:.9}50%{transform:translateY(-5px);opacity:1}}@media(prefers-reduced-motion:reduce){.zzz{animation:none}}.fog{fill:#14101c;stroke:#14101c;stroke-width:1;pointer-events:none}.account{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px;margin:4px 0 8px}.account .modes{display:inline-flex;gap:6px}.sync{margin-top:6px;font-size:14px}.sync-ok{color:#1f6b1f;font-weight:700}.sync-error{color:#8a1f12;font-weight:700}.faction{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:4px 0}.faction .modes{display:inline-flex;gap:6px}.territory h3{margin:8px 0 4px;font-size:16px}.hex-info p{margin:4px 0}.manage{max-width:760px;margin:0 auto;padding:8px 12px 24px}.manage-head,.editor-head{display:flex;align-items:center;justify-content:space-between;gap:8px}.manage h3{margin:14px 0 6px;font-size:17px}.heroes-list,.rooms{list-style:none;padding:0;margin:4px 0;display:grid;gap:6px}.heroes-list li,.rooms li{display:flex;flex-wrap:wrap;align-items:center;gap:6px}.heroes-list li>span:first-child{flex:1 1 220px}.rooms li>span:first-child{flex:1 1 100px;font-weight:700}.editor{margin-top:10px;padding:10px;border:3px solid var(--ink);border-radius:12px;background:#fff8e1}.plan-preview{width:100%;max-height:360px;background:#2a1d3d;border-radius:8px;margin:6px 0}.plan-label{font-family:var(--font);font-size:9px;fill:#fff3b0;paint-order:stroke;stroke:#2a1d3d;stroke-width:2px;pointer-events:none}.add-tile,.attach{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin:6px 0}.manage>.muted,.manage>p.muted{color:#f1e6c9}.manage .heroes-list .muted{color:#f1e6c9}.editor .muted{color:#6b5a44}.replay-info{position:absolute;top:0;left:0;right:0;padding:calc(6px + env(safe-area-inset-top,0px)) 8px 0;pointer-events:none;display:grid;grid-template-columns:minmax(0,1fr);gap:6px;z-index:5}.replay-info>*{pointer-events:auto}.replay-head{display:flex;align-items:center;gap:6px;flex-wrap:wrap;min-width:0}.replay-head .menu-btn{margin-left:auto;min-height:40px;width:44px;padding:0;font-size:1.2rem}.replay-head strong:first-child{background:#fffaf0ee;padding:2px 10px;border-radius:10px;border:2px solid var(--ink)}.replay-action,.replay-summary{min-width:0;overflow-wrap:anywhere;background:#fffaf0f2;border:3px solid var(--ink);border-radius:12px;padding:6px 10px;font-size:.9rem;margin:0}.replay-summary{list-style:none;display:grid;gap:2px;background:#ffe0d8f5}.replay-bar{position:absolute;left:0;right:0;bottom:0;display:flex;flex-wrap:wrap;align-items:center;gap:6px;padding:8px 8px calc(8px + env(safe-area-inset-bottom,0px));background:linear-gradient(transparent,#2a1d3dcc 35%);z-index:5}.replay-bar button{min-width:44px;min-height:44px;padding:0 8px}.replay-bar input[type=range]{flex:1 1 140px;min-width:120px;accent-color:#ffd23f}.onboarding{max-width:560px;margin:0 auto;padding:8px 14px 28px}.onboarding h2{margin:6px 0 8px}.onboarding p,.onboarding li{line-height:1.45}.onboarding ul{padding-left:1.1rem;display:grid;gap:6px}.onboarding>section{background:#fff8e1;border:3px solid var(--ink);border-radius:14px;padding:12px 14px 14px}.onboarding .muted{color:#6b5a44}.steps{list-style:none;display:flex;gap:8px;justify-content:center;padding:0;margin:0 0 10px}.steps li{width:28px;height:28px;border-radius:50%;border:3px solid var(--ink);background:#fff8e1;display:grid;place-items:center;font-size:.85rem}.steps li.current{background:#ffd23f}.steps li.done{background:#8fe388}.faction-cards{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:8px 0}.faction-card{display:grid;gap:4px;text-align:left;padding:10px;min-height:120px;align-content:start}.faction-card{-webkit-tap-highlight-color:transparent;background:#fffaf0;color:var(--ink);text-shadow:none;-webkit-text-stroke:0;box-shadow:0 4px 0 var(--ink)}.faction-card .muted{color:#6b5a44}.faction-card.chosen{background:#ffd23f;outline:4px solid var(--ink)}@media(max-width:480px){.faction-cards{grid-template-columns:1fr}.faction-card{min-height:0}}.tutorial-hint{position:absolute;left:8px;right:8px;top:calc(100px + env(safe-area-inset-top,0px));z-index:6;background:#ffd23ff2;border:3px solid var(--ink);border-radius:12px;padding:8px 12px;font-size:.95rem;box-shadow:0 3px 0 var(--ink);pointer-events:none}@media(max-height:520px){.tutorial-hint{top:calc(48px + env(safe-area-inset-top,0px))}}.cell-badge{--owner: #8a8a8a;display:inline-flex;align-items:center;gap:3px;padding:2px 6px 2px 3px;cursor:pointer;background:#fffaf0f2;border:3px solid var(--owner);border-radius:999px;box-shadow:0 2px #0006;font-size:12px;line-height:1;color:var(--ink);white-space:nowrap}.cell-badge.mine{box-shadow:0 0 0 2px #fff,0 2px 0 2px #0006}.cell-badge.prestige{background:#fff3b8;border-color:var(--owner);box-shadow:0 0 0 3px #ffd23f,0 2px 0 3px #0006;padding-left:4px}.cb-logo{display:inline-flex}.cb-n{display:inline-flex;align-items:center;gap:1px}.cb-n b{font-weight:400;font-size:13px}.skulls span{display:inline-flex}.skulls .off{opacity:.22;filter:grayscale(1)}.cb-wait{color:var(--muted);padding:0 2px}.hex-meta{display:flex;align-items:center;flex-wrap:wrap;gap:6px;margin:2px 0}.skulls{display:inline-flex;gap:1px}.prestige-tag{display:inline-flex;align-items:center;gap:3px;padding:1px 8px 1px 4px;background:#ffd23f;border:2px solid var(--ink);border-radius:999px;font-size:.85rem}.hex-info.prestige{border-color:#c9852f;box-shadow:0 0 0 3px #ffd23f66}.prestige-note{background:#fff3b8;border:2px solid #c9852f;border-radius:10px;padding:6px 8px}.dungeon-cards{list-style:none;margin:6px 0 0;padding:0;display:grid;gap:8px}.dungeon-card{border:2px solid var(--card-edge);border-radius:10px;padding:6px 8px;background:#fffaf0}.dungeon-card.mine{border-color:var(--green-dark)}.owner-tag{font-size:.8rem;padding:0 8px;border:3px solid;border-radius:999px;background:#fffaf0}.dungeon-card-head{display:flex;align-items:center;flex-wrap:wrap;gap:6px}.legend{margin-top:8px;font-size:.85rem}.legend summary{cursor:pointer;color:var(--muted)}.legend ul{margin:4px 0 0;padding-left:18px;display:grid;gap:3px}.legend .swatch{display:inline-block;width:12px;height:12px;border:3px solid;border-radius:3px;vertical-align:-2px;background:#fff}.protection{margin:4px 0;padding:4px 8px;background:#dff0ff;border:2px solid var(--blue-dark);border-radius:10px;font-size:.9rem}.address-search{position:relative;margin-top:8px}.address-search input{width:100%;box-sizing:border-box}.address-search .suggestions{position:absolute;z-index:5;left:0;right:0;margin:2px 0 0;padding:0;list-style:none;background:#1d1a17;border:1px solid #5a4a3a;border-radius:6px;max-height:220px;overflow-y:auto}.address-search .suggestions button{display:block;width:100%;text-align:left;background:none;border:0;padding:8px 10px;color:inherit;cursor:pointer}.address-search .suggestions button:hover,.address-search .suggestions button:focus{background:#2e2822}.inside-editor{margin:8px 0}.inside-editor .tools{display:flex;flex-wrap:wrap;gap:4px;margin-bottom:6px}.room-grid-svg{max-width:100%;height:auto;touch-action:manipulation}.turn-banner{position:absolute;left:0;right:0;top:50%;transform:translateY(-50%);z-index:20;text-align:center;font-size:clamp(40px,12vw,120px);font-weight:900;letter-spacing:.06em;line-height:1.1;padding:.15em 0;pointer-events:none;color:#fff7d6;text-shadow:0 4px 0 #3b2a4d,0 0 24px rgba(0,0,0,.6);background:linear-gradient(90deg,transparent,rgba(30,20,45,.78) 15%,rgba(30,20,45,.78) 85%,transparent);animation-name:banner-cut;animation-timing-function:ease-out;animation-fill-mode:both}.turn-banner-enemy{color:#ff8a80}.turn-banner-turn{color:#ffd23f}@keyframes banner-cut{0%{opacity:0;transform:translateY(-50%) scale(1.5)}18%{opacity:1;transform:translateY(-50%) scale(1)}80%{opacity:1;transform:translateY(-50%) scale(1)}to{opacity:0;transform:translateY(-50%) scale(.96)}}@media(prefers-reduced-motion:reduce){@keyframes banner-cut{0%,to{opacity:0}15%,85%{opacity:1}}}.unit-facing{stroke-width:2;stroke-linejoin:round}.unit-party .unit-facing{fill:var(--blue-dark);stroke:#fff}.unit-guardian .unit-facing{fill:var(--red-dark);stroke:#fff}.app.on-map{max-width:none;padding:0}.map-screen{position:fixed;top:0;right:0;bottom:0;left:0;display:flex;flex-direction:column;background:var(--bg-bottom)}.topbar{display:flex;align-items:center;gap:6px;padding:6px 8px;padding-top:calc(6px + env(safe-area-inset-top,0px));background:var(--parchment);border-bottom:4px solid var(--ink);z-index:10;flex-wrap:nowrap;overflow-x:auto}.tb-name,.tb-item{display:inline-flex;align-items:center;gap:5px;background:#fffaf0;border:3px solid var(--ink);border-radius:999px;padding:1px 10px;white-space:nowrap;flex:0 0 auto}.tb-name{max-width:42%;overflow:hidden;text-overflow:ellipsis}.tb-name strong{font-weight:400;overflow:hidden;text-overflow:ellipsis}.tb-button{cursor:pointer;min-height:40px;box-shadow:0 3px 0 var(--ink);font-family:inherit;font-size:1rem}.tb-button:active{transform:translateY(2px);box-shadow:0 1px 0 var(--ink)}.tb-menu{margin-left:auto;font-size:1.3rem;padding:0 12px}.map-body{position:relative;flex:1;min-height:0}.map-screen .geomap-wrap{position:absolute;top:0;right:0;bottom:0;left:0}.map-screen .geomap{height:100%;min-height:0;border:0;border-radius:0;box-shadow:none}.map-toast{position:absolute;top:10px;left:50%;transform:translate(-50%);z-index:9;right:auto;bottom:auto;max-width:90%}.cell-sheet{position:absolute;left:0;right:0;bottom:0;z-index:8;max-height:48%;overflow:auto;display:flex;flex-direction:column;gap:6px;background:var(--parchment);border-top:4px solid var(--ink);border-radius:18px 18px 0 0;box-shadow:0 -4px #0003;padding:10px 12px calc(10px + env(safe-area-inset-bottom,0px))}.cell-sheet.prestige{border-top-color:#ffd23f}.cell-sheet .prestige-note{margin:0;display:flex;gap:6px;align-items:center;font-size:.85rem}.dc-list{list-style:none;margin:0;padding:0 0 4px;display:flex;gap:10px;overflow-x:auto;scroll-snap-type:x proximity}.dc{flex:0 0 min(300px,86%);scroll-snap-align:start;border:4px solid var(--card-edge);border-radius:14px;background:#fffaf0;padding:8px 10px;display:flex;flex-direction:column;gap:6px}.dc.mine{background:#eaf7e6}.dc-head{display:flex;justify-content:space-between;align-items:center;gap:6px}.dc-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:400;font-size:1.05rem}.dc-meta{display:flex;gap:10px;align-items:center}.dc-fit{font-size:.8rem;background:#ffe9a3;border-radius:999px;padding:0 8px}.dc-refusal,.dc .protection{margin:0;font-size:.8rem}.attack-btn{background:var(--red);color:#fff;border-color:var(--red-dark);font-size:1.15rem;letter-spacing:.08em;width:100%}.attack-btn:disabled{background:#c9b99a;border-color:#8a6a45;color:#fff}.menu-sheet{position:fixed;left:0;right:0;bottom:0;z-index:30;max-height:80%;overflow:auto;display:flex;flex-direction:column;gap:10px;background:var(--parchment);border-top:4px solid var(--ink);border-radius:18px 18px 0 0;padding:10px 14px calc(14px + env(safe-area-inset-bottom,0px));box-shadow:0 -6px #0004}.menu-sheet .sheet-head{display:flex}.screen{display:flex;flex-direction:column;gap:10px}.screen-bar{display:flex;align-items:center;gap:10px;position:sticky;top:0;z-index:5;background:var(--parchment);border:4px solid var(--ink);border-radius:14px;padding:4px 10px;box-shadow:0 3px 0 var(--ink)}.back-btn{font-size:1.8rem;line-height:1;min-width:44px;padding:0 8px}.party-screen{display:flex;flex-direction:column;gap:10px}.tabs{display:flex;gap:6px;overflow-x:auto;padding-bottom:2px}.tab{flex:0 0 auto;display:inline-flex;align-items:center;gap:6px;background:#fffaf0;border:3px solid var(--ink);border-radius:999px 999px 0 0;padding:4px 14px;font-family:inherit;font-size:1rem;cursor:pointer}.tab.active{background:var(--gold);box-shadow:0 3px 0 var(--ink)}.hero-tab{background:var(--parchment);border:4px solid var(--ink);border-radius:18px;padding:14px;display:flex;flex-direction:column;gap:10px;box-shadow:0 6px 0 var(--ink),inset 0 0 0 3px var(--parchment-dark)}.hero-top{display:flex;gap:14px;align-items:center}.hero-art{background:radial-gradient(circle at 50% 70%,#fff7d6,#e3cf9c);border:4px solid var(--ink);border-radius:18px;flex:0 0 auto}.hero-id{display:flex;flex-direction:column;gap:4px;min-width:0;flex:1}.hero-name-big{font-size:1.6rem;font-weight:400;line-height:1.1}.level-pill{align-self:flex-start;background:#fffaf0;border:3px solid var(--ink);border-radius:999px;padding:0 10px}.level-bar{display:block;height:10px;border:2px solid var(--ink);border-radius:6px;background:#fffaf0;overflow:hidden}.level-bar span{display:block;height:100%;background:var(--green)}.stat-grid{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.stat-grid li{display:flex;align-items:center;gap:5px;background:#fffaf0;border:2px solid var(--card-edge);border-radius:10px;padding:3px 8px}.stat-grid li .muted{flex:1;font-size:.78rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@media(max-width:520px){.stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}.hero-tab h3{margin:4px 0 0;font-weight:400}.ability-list{list-style:none;margin:0;padding:0;display:grid;gap:6px}.ability-list li{background:#fffaf0;border:2px solid var(--card-edge);border-radius:10px;padding:6px 10px}.ability-list .trait{border-style:dashed}.screen-actions{position:sticky;bottom:0;background:var(--parchment);padding-top:8px}.screen-actions button{flex:1}.recruit-cards{display:flex;gap:10px;flex-wrap:wrap}.recruit-card{display:flex;flex-direction:column;align-items:center;gap:4px;flex:1 1 140px;padding:10px}.dungeons-screen{display:flex;flex-direction:column;gap:10px}.dungeon-sheets{list-style:none;margin:0;padding:0;display:grid;gap:12px}.dsheet{background:var(--parchment);border:4px solid var(--ink);border-radius:16px;padding:12px;display:flex;flex-direction:column;gap:8px;box-shadow:0 5px 0 var(--ink),inset 0 0 0 3px var(--parchment-dark)}.dsheet-head{display:flex;align-items:center;justify-content:space-between;gap:8px}.dsheet-name{font-weight:400;font-size:1.25rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.icon-btn{min-width:40px;padding:0 10px}.dsheet-stats{display:flex;flex-wrap:wrap;gap:8px 14px;align-items:center}.dsheet-stats>span{display:inline-flex;align-items:center;gap:4px;background:#fffaf0;border:2px solid var(--card-edge);border-radius:999px;padding:1px 10px}.dsheet .screen-actions{position:static;padding-top:0}.return-btn{align-self:flex-start;background:#fffaf0}.screen>.muted,.dungeons-screen>.muted,.party-screen>.muted{color:#f3e6c4}.editor-screen{display:flex;flex-direction:column;gap:10px;color:var(--text)}.ed-head{display:flex;align-items:center;gap:10px;background:var(--parchment);border:4px solid var(--ink);border-radius:14px;padding:4px 10px;box-shadow:0 3px 0 var(--ink);position:sticky;top:0;z-index:6;margin-bottom:0}.ed-title{display:flex;flex-direction:column;gap:2px;flex:1;min-width:0}.ed-name{background:none;border:0;box-shadow:none;font-family:inherit;font-size:1.25rem;text-align:left;padding:0;min-height:0;cursor:text;color:var(--text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ed-title input{font-family:inherit;font-size:1.15rem;max-width:100%}.ed-stats{display:flex;gap:12px;align-items:center;font-size:.95rem}.ed-stats>span{display:inline-flex;align-items:center;gap:4px}.ed-upkeep{display:inline-flex;align-items:center;gap:4px;background:#fffaf0;border:3px solid var(--ink);border-radius:999px;padding:1px 10px;white-space:nowrap;flex:0 0 auto}.eb-scroll{overflow:auto;border:4px solid var(--ink);border-radius:14px;background:#2a1d3d;max-height:62vh}.eb-stage{position:relative}.eb-stage .board{max-width:none;width:100%;filter:none;display:block}.eb-overlay{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;height:100%;pointer-events:none}.eb-sel{fill:none;stroke:#fff;stroke-width:5;stroke-dasharray:8 6}.eb-over{fill:#ffd23f55;stroke:#ffd23f;stroke-width:4}.eb-ghost{opacity:.85;filter:drop-shadow(0 4px 0 #0006)}.eb-marker{pointer-events:all;cursor:pointer}.eb-marker circle{fill:var(--parchment);stroke:var(--ink);stroke-width:4}.eb-marker:hover circle{fill:#fff3b8}.eb-marker.full{opacity:.45;cursor:not-allowed}.eb-count{font-size:15px;fill:var(--ink);paint-order:stroke;stroke:var(--parchment);stroke-width:4px;font-family:inherit}.eb-plus{font-size:24px;fill:#2b8a3b;paint-order:stroke;stroke:#fff;stroke-width:5px;font-family:inherit}.ed-panel{background:var(--parchment);border:4px solid var(--ink);border-radius:14px;padding:8px 12px;display:flex;flex-direction:column;gap:8px;box-shadow:0 4px 0 var(--ink)}.ed-h{margin:4px 0 0;font-weight:400;color:#fff}.editor-screen .rooms{list-style:none;margin:0;padding:0;display:grid;gap:6px}.editor-screen .rooms li{display:flex;gap:8px;align-items:center;background:var(--parchment);border:3px solid var(--ink);border-radius:10px;padding:4px 10px}.editor-screen .rooms li>span:first-child{flex:1}.editor-screen .add-tile,.editor-screen .attach{display:flex;flex-wrap:wrap;gap:6px;align-items:center;color:#fff}.ed-bar{position:sticky;bottom:0;display:flex;gap:8px;align-items:center;flex-wrap:wrap;background:var(--parchment);border:4px solid var(--ink);border-radius:14px;padding:6px 10px;box-shadow:0 -3px #0003}.ed-bar>span{flex:1 1 200px;font-size:.9rem}.patrol-glyph{font-size:22px;fill:#fff;paint-order:stroke;stroke:var(--ink);stroke-width:4px;pointer-events:none;font-family:inherit}@media(max-width:520px){.topbar{gap:4px;padding-left:6px;padding-right:6px}.tb-name{max-width:30%;padding:1px 7px}.tb-item{padding:1px 7px;gap:3px;font-size:.92rem}.tb-menu{padding:0 9px}}
