:root{--tile-max: 64px;--tile: clamp(20px, 9vmin, var(--tile-max))}*{box-sizing:border-box}body{margin:0;font-family:system-ui,-apple-system,sans-serif;background:#1e1e28;color:#e8e8f0}.app{display:flex;flex-direction:column;gap:12px;padding:16px;align-items:center}.play-area{display:flex;flex-direction:column;gap:12px;align-items:center;width:100%}.board-col{display:flex;flex-direction:column;gap:12px;align-items:center;width:fit-content;max-width:100%}.mission-failed-banner{padding:10px 16px;border:2px dashed #c9a24a;border-radius:6px;background:#33302a;color:#e8d3a0;font-size:16px;font-weight:400}.action-bar,.ai-mode{width:0;min-width:100%}.side-panel{display:flex;flex-direction:column;gap:10px;width:100%;max-width:512px;min-width:0}@media(orientation:landscape){.board{--tile: clamp(20px, min((100vw - 360px) / var(--cols), (100vh - 330px) / var(--rows)), var(--tile-max))}.play-area{flex-direction:row;align-items:flex-start;justify-content:center}.side-panel{flex:0 0 280px;max-width:280px}}.hud{display:flex;gap:16px;font-size:14px;align-items:baseline}.hud__title{font-weight:700;font-size:16px}.hud-hero{display:flex;flex-wrap:wrap;gap:6px 12px;align-items:center;padding:8px 10px;background:#26263a;border:1px solid #3a3a4a;border-radius:6px}.hud-hero__sprite{width:64px;height:64px;image-rendering:pixelated}.hud-hero__stats{display:flex;flex-direction:column;gap:2px;font-size:13px;min-width:0;flex:1}.hud-hero__name{font-weight:700;font-size:15px}.hud-hero__objective{flex-basis:100%;color:#ffd54a}.hud-hero__next{color:#a8a8c0}.turn-strip{display:flex;gap:6px;margin:0;padding:0;list-style:none;font-size:13px}.turn-strip__hero{padding:3px 10px;border:1px solid #3a3a4a;border-radius:999px;color:#a8a8c0}.turn-strip__hero--active{border-color:#ffd54a;color:#ffe98a}.turn-strip__hero--downed{opacity:.45;text-decoration:line-through}.premise{max-width:480px;padding:8px 12px;border-left:3px solid #ffd54a;background:#26263a;border-radius:0 6px 6px 0}.premise__text{margin:0;font-size:14px;font-style:italic;line-height:1.5;color:#cfcfe4}.premise__how-to{margin:4px 0 0;font-size:13px;color:#a8a8c0}.party-chooser{display:flex;flex-direction:column;gap:12px;max-width:640px;margin:48px auto;padding:24px;background:#26263a;border:1px solid #3a3a4a;border-radius:8px}.party-chooser__title{margin:0;font-size:22px}.party-chooser__hint{margin:0;font-size:13px;color:#a8a8c0}.party-chooser__cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:12px}.hero-card{position:relative;display:flex;flex-direction:column;align-items:center;gap:4px;padding:12px;font:inherit;color:inherit;text-align:center;background:#1e1e2e;border:2px solid #3a3a4a;border-radius:8px;cursor:pointer}.hero-card--selected{border-color:#ffd54a}.hero-card--unavailable{opacity:.5;cursor:not-allowed}.hero-card__order{position:absolute;top:6px;left:8px;font-weight:700;color:#ffd54a}.hero-card__sprite{width:48px;height:48px;image-rendering:pixelated}.hero-card__name{font-weight:700}.hero-card__blurb{font-size:12px;font-style:italic;color:#cfcfe4}.hero-card__attributes,.hero-card__hp,.hero-card__weapon{font-size:13px}.party-chooser__start{align-self:flex-start;padding:8px 20px;font:inherit;font-weight:700;cursor:pointer}.party-chooser__start:disabled{opacity:.5;cursor:not-allowed}.ai-mode{display:flex;flex-direction:column;gap:8px;margin-top:8px;padding:8px 10px;background:#26263a;border:1px solid #3a3a4a;border-radius:8px;font-size:13px;color:#cfcfe4}.ai-mode__options{display:flex;flex-wrap:wrap;gap:4px 16px;margin:0;padding:0;border:0}.ai-mode__legend{padding:0;margin-bottom:4px;font-weight:700;color:#e8e8f0}.ai-mode__option{display:inline-flex;align-items:center;gap:4px;cursor:pointer}.ai-mode__credits,.ai-mode__note,.ai-mode__held-text,.ai-mode__offer-text{margin:0}.ai-mode__credits{color:#ffe98a;font-weight:700}.ai-mode__note{font-style:italic}.ai-mode__offer,.ai-mode__held{display:flex;flex-wrap:wrap;align-items:center;gap:8px}.ai-mode__key,.ai-mode__form{display:flex;flex-direction:column;gap:8px}.ai-mode__warning{margin:0;font-size:12px;font-weight:700;color:#ff8a8a}.ai-mode__field{display:flex;flex-direction:column;gap:4px}.ai-mode__provider,.ai-mode__key-input{padding:6px 8px;border:1px solid #3a3a4a;border-radius:6px;background:#14141c;color:#e8e8f0;font-size:14px}.ai-mode__notice{margin:0;font-size:12px;font-style:italic;color:#ffd54a}.ai-mode__submit,.ai-mode__forget,.ai-mode__offer-btn,.end-screen__again{align-self:flex-start;padding:6px 12px;border:1px solid #ffd54a;border-radius:6px;background:#3d3a2a;color:#ffe98a;font:inherit;font-weight:700;cursor:pointer}.end-screen__again{display:block;margin:8px auto 0}.try-panel__count{font-size:11px;color:#9a9ab0}.try-panel__hint{flex-basis:100%;margin:0;font-size:12px;font-style:italic;color:#9a9ab0}[hidden]{display:none!important}.board{--tile: clamp(20px, min((100vw - 40px) / var(--cols), (100vh - 330px) / var(--rows)), var(--tile-max));display:grid;grid-template-columns:repeat(var(--cols),var(--tile));grid-template-rows:repeat(var(--rows),var(--tile));border:2px solid #000;background:#000}.tile{width:var(--tile);height:var(--tile);background-size:cover;background-position:center;background-repeat:no-repeat}.tile--highlight{outline:3px solid #ffd54a;outline-offset:-3px}.sprite{width:var(--tile);height:var(--tile);object-fit:contain;align-self:center;justify-self:center;pointer-events:none;-webkit-user-select:none;user-select:none;image-rendering:pixelated}.verb-choice{display:inline-flex;gap:6px;margin-left:8px}.verb-choice[hidden]{display:none}.sprite--downed{opacity:.45;filter:grayscale(.8)}.hp-badge{align-self:end;justify-self:end;margin:1px;min-width:14px;padding:0 3px;border-radius:7px;background:#b3261e;color:#fff;font-size:11px;font-weight:700;line-height:14px;text-align:center;pointer-events:none;-webkit-user-select:none;user-select:none}.target-label{align-self:start;justify-self:center;z-index:2;margin-top:2px;padding:1px 4px;border-radius:3px;background:#0a0a14c7;color:#f3e7b0;font-size:10px;line-height:1.2;white-space:nowrap;pointer-events:none;-webkit-user-select:none;user-select:none}.damage-overlay,.reveal-overlay,.active-marker{width:var(--tile);height:var(--tile);object-fit:contain;align-self:center;justify-self:center;pointer-events:none;-webkit-user-select:none;user-select:none;image-rendering:pixelated}.map-area{position:relative;display:inline-block}.board-holder{display:inline-block;line-height:0}.narration{display:flex;flex-direction:column;width:0;min-width:100%;height:7.5rem;padding:4px 10px 6px;background:#14141c;border:1px solid #2a2a38;border-radius:6px;line-height:1.45;text-align:left}.narration[data-expanded=true]{height:40vh}.narration[data-expanded=false] .beat--dismissed{display:none}.narration__toggle{align-self:flex-end;padding:0 6px;border:none;background:none;color:#8a8aa8;font-size:12px;cursor:pointer}.narration:not(:has(.beat+.beat)) .narration__toggle{visibility:hidden}.narration__beats{margin:0;padding:0;list-style:none;flex:1;overflow-y:auto;min-height:0;font-size:14px;overflow-wrap:anywhere}.narration[data-expanded=false] .beat:not(.beat--latest){display:none}.beat{padding:4px 0}.beat+.beat{border-top:1px solid #2a2a38}.beat:not(.beat--latest){opacity:.7}.beat__lines{margin:0;padding:0;list-style:none}.beat .log-entry[data-code=attack_hit]>.log-entry__text,.beat .log-entry[data-code=attack_miss]>.log-entry__text{display:block;font-size:12px;color:#8fb8d8}.narration__status{display:flex;align-items:center;gap:10px;padding:4px 0;font-style:italic;color:#c9b8f0}.narration__status[hidden]{display:none}.narration__status[data-status=ai_unavailable]{color:#8a8a8a}.narration__thinking{flex:0 0 auto;width:40px;height:40px;background-size:600% 100%;background-repeat:no-repeat;image-rendering:pixelated;animation:thinking-strip .9s steps(6) infinite}@keyframes thinking-strip{0%{background-position:0 0}to{background-position:120% 0}}.roll-reveal{--reveal-ease: .5s cubic-bezier(.4, 0, .2, 1);position:absolute;top:0;right:0;bottom:0;left:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;padding:16px;background:#08081057;z-index:5;pointer-events:none;-webkit-user-select:none;user-select:none;text-align:center}.roll-reveal[hidden]{display:none}.roll-reveal__label{color:#ffe98a;font-weight:800;font-size:22px;line-height:1.1;text-shadow:0 2px 4px #000,0 0 8px #000;transition:font-size var(--reveal-ease)}.roll-reveal[data-stage=criteria] .roll-reveal__label{font-size:42px}.roll-reveal__die{position:relative;width:64px;height:64px;transition:width var(--reveal-ease),height var(--reveal-ease)}.roll-reveal[data-stage=rolled] .roll-reveal__die{width:148px;height:148px}.roll-reveal[data-stage=resolved] .roll-reveal__die{width:52px;height:52px}.roll-reveal__die-face{width:100%;height:100%;object-fit:contain;image-rendering:pixelated;filter:drop-shadow(0 3px 5px #000)}.roll-reveal__value{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;align-items:center;justify-content:center;font-weight:800;font-size:22px;color:#fff;text-shadow:0 1px 3px #000,0 0 6px #000;transition:font-size var(--reveal-ease)}.roll-reveal[data-stage=rolled] .roll-reveal__value{font-size:50px}.roll-reveal[data-stage=resolved] .roll-reveal__value{font-size:18px}.roll-reveal__die--rolling{animation:d20-roll .5s linear infinite}@keyframes d20-roll{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.roll-reveal__line{color:#ffe98a;font-weight:700;font-size:16px;text-shadow:0 1px 3px #000,0 0 6px #000;transition:font-size var(--reveal-ease)}.roll-reveal[data-stage=criteria] .roll-reveal__line{font-size:32px}.roll-reveal__badge{overflow:hidden;max-height:0;margin:-6px 0;padding:0 24px;border-radius:999px;font-weight:800;font-size:38px;letter-spacing:1px;text-transform:uppercase;opacity:0;transition:max-height var(--reveal-ease),opacity var(--reveal-ease),margin var(--reveal-ease)}.roll-reveal[data-stage=resolved] .roll-reveal__badge{max-height:88px;margin:0;padding:6px 26px;opacity:1}.roll-reveal__badge[data-result=pass]{background:#1f9d4d;color:#eafff0;box-shadow:0 4px 14px #1f9d4d80}.roll-reveal__badge[data-result=fail]{background:#b23a2e;color:#ffe6e1;box-shadow:0 4px 14px #b23a2e80}.roll-reveal__badge[data-result=partial]{background:#c08a1e;color:#fff6e0;box-shadow:0 4px 14px #c08a1e80}.roll-reveal__note{font-size:16px;font-style:italic;color:#f0d9a8;text-shadow:0 1px 3px #000}.banner-slot:empty{display:none}.win-banner{padding:10px 16px;border:2px solid #ffd54a;border-radius:6px;background:#3d3a2a;color:#ffe98a;font-size:16px;font-weight:700}.defeat-banner{padding:10px 16px;border:2px solid #d8544a;border-radius:6px;background:#3a2a2a;color:#ffb0a8;font-size:16px;font-weight:700}.action-bar{display:flex;flex-wrap:wrap;gap:8px;min-height:40px}.try-panel{display:flex;flex-wrap:wrap;align-items:center;gap:8px;flex-basis:100%}.try-panel[hidden]{display:none}.try-panel__input{flex:1;padding:8px 10px;border:1px solid #3a3a4a;border-radius:6px;background:#1c1c26;color:#e8e8f0;font-size:14px}.action-btn{padding:8px 14px;border:1px solid #3a3a4a;border-radius:6px;background:#2a2a38;color:#e8e8f0;font-size:14px;cursor:pointer}.action-btn:hover:not(:disabled){background:#34344a}.action-btn--active{border-color:#ffd54a;background:#3d3a2a}.action-btn:disabled{opacity:.45;cursor:not-allowed}.log-panel{display:flex;flex-direction:column;width:100%;min-width:0;max-height:40vh;overflow-y:auto;background:#14141c;border-radius:6px;padding:6px 8px}.log-panel__toggle{align-self:flex-end;padding:0 4px;border:none;background:none;color:#8a8aa8;font-size:12px;cursor:pointer}.log-panel[data-expanded=false] .log-panel__entries>li:nth-child(n+5){display:none}.log-panel__entries{list-style:none;margin:0;padding:0;font-size:12px;line-height:1.5;color:#b8b8c8;overflow-wrap:anywhere}.log-entry__narration{color:#b7a1e0;font-style:italic}.log-entry[data-code=try_request]{color:#e6d9a8}.log-entry__roll{display:block;color:#8fb8d8;font-variant-numeric:tabular-nums;font-size:12px}.log-entry__roll--none{color:#8a8a8a;font-style:italic}.log-entry__no-effect,.log-entry__drop-note{color:#e0b24a;font-style:italic}.title-screen{display:flex;flex-direction:column;align-items:center;gap:18px;max-width:640px;margin:0 auto;padding:48px 16px;text-align:center}.title-screen__art{width:min(640px,100%);height:auto;image-rendering:pixelated}.title-screen__premise{margin:0;font-size:17px;line-height:1.5}.title-screen__how-to{margin:0;color:#b7a1e0;font-style:italic}.title-screen__start{padding:10px 36px;border:2px solid #ffd54a;border-radius:8px;background:#3d3a2a;color:#ffe98a;font-size:18px;font-weight:700;cursor:pointer}.log-entry__story{display:flex;gap:10px;align-items:flex-start;margin-top:4px}.log-entry__portrait{flex:0 0 auto;width:48px;height:48px;image-rendering:pixelated}.log-entry__story-body{min-width:0}.log-entry__said{margin:0;color:#e6d9a8}.log-entry__prompt{margin:4px 0 0;color:#ffd54a;font-weight:700}.log-entry[data-code=talk]>.log-entry__text{font-size:12px;color:#8a8aa8}.end-screen__title{display:block;font-size:22px;letter-spacing:2px}.end-screen__line,.end-screen__haul{margin:4px 0 0}.end-screen__haul{color:#ffe98a;font-weight:700}.dialogue__reply{display:block;margin-top:4px;padding:2px 12px;border:1px solid #ffd54a;border-radius:4px;background:transparent;color:#ffe98a;font-size:13px;cursor:pointer}.dialogue__reply:hover{background:#3d3a2a}.log-entry__reply{margin:4px 0 0;color:#e8e8f0}.log-entry__hint{margin:2px 0 0;color:#a8a8c0;font-size:12px}.sprite--tucked{width:calc(var(--tile) * .45);height:calc(var(--tile) * .45);align-self:end;justify-self:start;z-index:3;filter:drop-shadow(0 0 2px #000)}
