:root { --ink: #1d2433; --paper: #f6f2e9; --shade: #ece6d8; --line: #7d8494; --teal: #12a594; --red: #c2382c; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--paper); color: var(--ink);
  font: 15px/1.35 system-ui, -apple-system, "Segoe UI", sans-serif; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; overscroll-behavior: none; }
#c { position: fixed; inset: 0; width: 100%; height: 100%; touch-action: none; display: block; --touch-left:env(safe-area-inset-left,0px); --touch-right:env(safe-area-inset-right,0px); --touch-top:env(safe-area-inset-top,0px); --touch-bottom:env(safe-area-inset-bottom,0px); }
#ui { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center;
  padding: max(8px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left)); }
#ui[hidden] { display: none; }
#pause { position: fixed; top: 54px; left: 50%; transform: translateX(-50%); width: 40px; height: 30px; padding: 0;
  font-weight: 800; letter-spacing: 2px; background: rgba(255,255,255,.6); }

.panel { width: min(680px, 100%); max-height: 100%; overflow-y: auto; background: rgba(246,242,233,.94);
  border: 1.5px solid var(--ink); border-radius: 10px; padding: 12px 16px; }
h1 { margin: 0; font-size: 34px; letter-spacing: 6px; font-weight: 800; }
h2 { margin: 0 0 8px; font-size: 18px; display: flex; align-items: center; gap: 10px; }
h2 span { flex: 1; }
h3 { margin: 12px 0 4px; font-size: 13px; text-transform: uppercase; letter-spacing: 1px; color: var(--line); }
p { margin: 4px 0; }
small, .dim { color: var(--line); font-size: 12px; }
.sub { color: var(--line); margin: 0 0 10px; }

button { font: inherit; font-weight: 700; color: var(--ink); background: #fff; border: 1.5px solid var(--ink);
  border-radius: 8px; padding: 9px 14px; min-height: 40px; cursor: pointer; touch-action: manipulation; }
button:active { background: var(--ink); color: #fff; }
button.primary { background: var(--ink); color: #fff; }
button.small { min-height: 32px; padding: 4px 10px; font-size: 13px; }
button:disabled { opacity: .4; }
button.on { background: var(--teal); border-color: var(--teal); color: #fff; }

.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.grid button small { display: block; font-weight: 500; }
.row { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-top: 1px solid var(--shade); }
.row > div:first-child { flex: 1; min-width: 0; }
.row b { display: block; }
.seg { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 8px; }
.seg button { flex: 1; min-height: 34px; padding: 4px 8px; font-size: 13px; white-space: nowrap; }
.pips { letter-spacing: 2px; color: var(--teal); font-size: 12px; white-space: nowrap; }
.pips i { color: var(--shade); font-style: normal; }
.code { font-size: 30px; font-weight: 800; letter-spacing: 8px; }
input[type=text] { font: inherit; font-weight: 700; padding: 8px 10px; border: 1.5px solid var(--ink); border-radius: 8px;
  background: #fff; width: 120px; user-select: text; -webkit-user-select: text; }
.big { font-size: 30px; font-weight: 800; letter-spacing: 3px; margin: 0; }
.win { color: var(--teal); } .lose { color: var(--red); }
.tot { font-weight: 800; border-top: 1.5px solid var(--ink); margin-top: 4px; padding-top: 4px; }
.split { display: flex; justify-content: space-between; gap: 12px; }
.actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.actions button { flex: 1; }
.keys td { padding: 2px 10px 2px 0; vertical-align: top; }
.keys td:first-child { font-weight: 700; white-space: nowrap; }

#rotate { display: none; position: fixed; inset: 0; background: var(--paper); align-items: center; justify-content: center;
  text-align: center; font-weight: 700; font-size: 18px; padding: 24px; z-index: 10; }
@media (orientation: portrait) and (pointer: coarse) { #rotate { display: flex; } }

/* Menus share the game's paper, ink and headband colours. */
:root { --muted: #626b76; --edge: #d6d0c3; }
#ui { background: rgba(246,242,233,.56); backdrop-filter: blur(5px); }
.panel { width: min(740px, 100%); border-color: var(--edge); border-radius: 18px; padding: 24px; box-shadow: 0 18px 70px #1d243316; }
h2 { font-size: 24px; letter-spacing: -.7px; }
h3, small, .dim, .sub { color: var(--muted); }
button { border-color: var(--edge); transition: background .15s, border-color .15s, transform .15s; }
button:hover:not(:disabled) { background: var(--shade); border-color: var(--ink); }
button.primary:hover { background: #303c4e; color: white; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; }
.panel:focus { outline: none; }
#pause { width: auto; min-width: 62px; font-size: 12px; letter-spacing: 0; z-index: 2; }
kbd { display: inline-flex; align-items: center; justify-content: center; min-width: 25px; min-height: 25px; padding: 2px 6px; border: 1px solid var(--edge); border-bottom-width: 3px; border-radius: 5px; background: #fffcf5; color: var(--ink); font: 700 12px/1.2 system-ui, sans-serif; white-space: nowrap; }
.home-panel { width: min(1060px, 100%); padding: 28px; background: #f6f2e9f5; }
.home-header { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 24px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 900; font-size: 20px; letter-spacing: 2px; }
.brand-mark { background: var(--teal); color: var(--paper); width: 30px; height: 32px; border-radius: 5px; text-align: center; font-size: 28px; line-height: 32px; }
.brand-note { color: var(--muted); font-size: 9px; letter-spacing: 1.2px; border-left: 1px solid var(--edge); padding-left: 12px; margin-left: 5px; }
.profile-button { display: flex; align-items: center; gap: 9px; font-size: 12px; min-height: 36px; padding: 7px 11px; background: transparent; }
.profile-button > span:last-child { font-weight: 500; color: var(--muted); padding-left: 9px; border-left: 1px solid var(--edge); }
.profile-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--teal); }
.home-layout { display: grid; grid-template-columns: 1.15fr 1fr; gap: 30px; }
.fight-card { position: relative; isolation: isolate; display: flex; flex-direction: column; min-height: 420px; padding: 28px; background: var(--ink); color: var(--paper); border-radius: 12px; overflow: hidden; }
.eyebrow { font-size: 10px; letter-spacing: 2px; font-weight: 700; }
.fight-card > .eyebrow { color: #86cfc2; margin: 0 0 19px; }
.fight-card h1 { font-size: clamp(36px, 4.3vw, 56px); line-height: 1.02; letter-spacing: -2.6px; font-weight: 850; }
.fight-card h1 span { color: #20c6b0; }
.fight-copy { font-size: 12px; color: #c9cbd0; max-width: 210px; margin-top: 14px; line-height: 1.6; }
.home-fighters { position: absolute; width: 64%; height: 50%; bottom: 87px; right: 0; z-index: -1; color: #f6f2e9; opacity: .85; transform: rotate(-5deg); transform-origin: center bottom; }
.campaign-entry { margin-top: auto; padding-top: 26px; display: flex; align-items: end; justify-content: space-between; gap: 16px; }
.campaign-entry .eyebrow { color: #9fa8b4; font-size: 9px; }
.campaign-entry b { display: block; font-size: 16px; margin: 5px 0; }
.campaign-entry small { color: #b3bbc7; font-size: 10px; }
.campaign-cta { flex-shrink: 0; border-color: #20c6b0; background: #20c6b0; color: #152d2a; padding: 11px 14px; font-size: 12px; }
.campaign-cta span { margin-left: 8px; }
.campaign-cta:hover:not(:disabled) { background: #6ae0cd; border-color: #6ae0cd; }
.mode-picker { display: flex; flex-direction: column; gap: 11px; }
.section-label { display: flex; align-items: center; justify-content: space-between; margin: 4px 0 9px; }
.section-label h2 { font-size: 17px; margin: 0; letter-spacing: -.3px; }
.section-label > span { color: var(--muted); font-size: 10px; letter-spacing: 2px; }
.mode-card { display: flex; text-align: left; align-items: center; gap: 15px; flex: 1; padding: 17px; border-radius: 9px; background: #fffcf580; }
.mode-number { color: var(--muted); font-size: 10px; font-weight: 500; align-self: start; padding-top: 3px; }
.mode-copy { flex: 1; }
.mode-copy b { display: block; font-size: 17px; letter-spacing: -.4px; }
.mode-copy small { display: block; font-size: 11px; font-weight: 400; margin-top: 5px; }
.mode-icon { font-size: 25px; font-weight: 400; color: var(--teal); width: 28px; text-align: center; }
.home-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 22px; padding-top: 17px; border-top: 1px solid var(--edge); }
.home-tip { display: flex; align-items: center; gap: 5px; font-size: 10px; color: var(--muted); }
.home-tip > span { margin-right: 9px; }
.home-tip kbd { min-height: 23px; min-width: 23px; font-size: 10px; }
.home-footer nav { display: flex; gap: 7px; }
.home-footer nav button { background: transparent; border: none; font-size: 11px; padding: 5px 8px; min-height: 32px; }
.home-footer nav button:first-child { color: #087e70; }
.control-instructions { padding: 12px 15px; border: 1px solid var(--edge); border-radius: 9px; background: #eee9de; font-size: 12px; }
.control-instructions b, .control-instructions span { display: block; }
.control-instructions span { color: var(--muted); margin-top: 4px; }
.binding-status { min-height: 34px; padding: 10px 0; color: #087e70; font-size: 12px; }
.binding-status.listening { font-weight: 700; }
.binding-head, .binding-row { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 16px; align-items: center; }
.binding-head { color: var(--muted); font-size: 10px; letter-spacing: 1px; text-transform: uppercase; padding: 5px 0 9px; border-bottom: 1px solid var(--edge); }
.binding-group { font-size: 10px; letter-spacing: 1.5px; color: #087e70; margin: 14px 0 3px; }
.binding-row { min-height: 43px; padding: 5px 0; border-bottom: 1px solid var(--shade); font-size: 13px; }
.binding-slot { display: flex; gap: 5px; align-items: center; }
.key-bind { min-height: 33px; height: 33px; padding: 2px 10px; flex: 1; background: #fffaf0; font-size: 11px; }
.key-bind kbd { border: 0; background: none; min-height: 0; font-size: 12px; }
.key-bind > span { font-weight: 500; color: var(--muted); }
.key-bind.capturing { background: var(--teal); color: white; border-color: var(--teal); }
.clear-key { min-height: 29px; width: 26px; padding: 0; border: 0; background: transparent; color: var(--muted); font-size: 16px; }
.controls-note { padding: 12px 0 0; font-size: 12px; }
.controls-note p { color: var(--muted); line-height: 1.6; }
.keyboard-summary { display: flex; flex-wrap: wrap; gap: 10px 15px; font-size: 12px; margin: 12px 0; }
.keyboard-summary > span { display: flex; align-items: center; gap: 6px; }
@media (pointer: coarse) { .home-tip { display: none; } .home-footer { justify-content: flex-end; } }
@media (max-width: 760px), (max-height: 570px) {
  .panel { padding: 16px 20px; border-radius: 12px; }
  .home-panel { max-width: 900px; padding: 17px 20px; }
  .home-header { margin-bottom: 14px; }
  .brand { font-size: 17px; }
  .brand-note { display: none; }
  .home-layout { gap: 19px; }
  .fight-card { min-height: 255px; padding: 20px; }
  .fight-card h1 { font-size: 38px; letter-spacing: -1.8px; }
  .fight-card > .eyebrow { margin-bottom: 12px; }
  .fight-copy { margin-top: 8px; font-size: 11px; max-width: 170px; }
  .home-fighters { bottom: 62px; height: 50%; right: -12px; opacity: .6; }
  .campaign-entry { padding-top: 16px; gap: 8px; }
  .campaign-entry b { font-size: 13px; }
  .campaign-entry small { font-size: 9px; }
  .campaign-cta { padding: 8px 10px; font-size: 11px; }
  .section-label { margin: 0; }
  .section-label h2 { font-size: 14px; }
  .mode-picker { gap: 7px; }
  .mode-card { padding: 10px 12px; gap: 9px; }
  .mode-copy b { font-size: 14px; }
  .mode-copy small { font-size: 10px; margin-top: 3px; }
  .mode-icon { font-size: 21px; }
  .home-footer { margin-top: 12px; padding-top: 8px; }
  .home-footer nav button { min-height: 27px; }
}
@media (max-width: 580px) {
  .home-layout { grid-template-columns: 1fr; }
  .fight-card { min-height: 280px; }
  .home-fighters { width: 64%; right: -15px; opacity: .7; }
  .home-tip { display: none; }
  .home-footer { justify-content: center; }
  .binding-head, .binding-row { grid-template-columns: 1.15fr 1fr 1fr; gap: 7px; }
  .binding-row { font-size: 11px; }
  .binding-slot { gap: 0; }
  .key-bind { padding: 2px 3px; }
}
@media (prefers-reduced-motion: reduce) { button { transition: none; } }
@media (max-height: 450px) and (min-width: 581px) {
  .home-panel { padding: 12px 18px; }
  .home-header { margin-bottom: 8px; }
  .fight-card { min-height: 235px; padding: 16px; }
  .fight-card h1 { font-size: 34px; }
  .fight-card > .eyebrow { margin-bottom: 8px; }
  .fight-copy { line-height: 1.4; }
  .campaign-entry { padding-top: 10px; }
  .mode-picker { gap: 6px; }
  .mode-card { padding: 6px 10px; }
  .mode-copy small { margin-top: 2px; }
  .home-footer { margin-top: 8px; padding-top: 7px; }
  .home-footer nav button { min-height: 34px; }
}
.audio-style { display: flex; align-items: center; gap: 15px; padding: 16px; margin: 18px 0; border-radius: 10px; background: #e1ece5; }
.audio-style b { font-size: 14px; }
.audio-style p { color: #446457; font-size: 12px; margin: 4px 0 0; }
.audio-mark { color: #087e70; font-size: 36px; line-height: 1; }
.audio-level { display: grid; grid-template-columns: 1.15fr 1fr 42px; gap: 18px; align-items: center; padding: 15px 0; border-bottom: 1px solid var(--edge); }
.audio-level label b, .audio-level small { display: block; }
.audio-level label b { font-size: 13px; }
.audio-level small { font-size: 11px; margin-top: 4px; }
.audio-level input { width: 100%; min-width: 0; accent-color: var(--teal); cursor: pointer; }
.audio-level output { color: #087e70; font-size: 12px; text-align: right; font-variant-numeric: tabular-nums; }
.sound-check { margin-top: 19px; }
.sound-buttons { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
#sound-status { min-height: 20px; color: #087e70; font-size: 12px; margin-top: 10px; }
@media (max-width: 580px) { .audio-level { grid-template-columns: 1fr 1fr 35px; gap: 10px; } }

.progression-panel { width: min(1060px, 100%); padding: 28px; background: #f6f2e9f5; }
.progression-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.progression-header .eyebrow { color: #087e70; font-size: 9px; margin: 0 0 7px; }
.progression-header h2 { margin: 0; font-size: 30px; letter-spacing: -1px; }
.screen-back { background: transparent; }
.journey-summary { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin: 0 0 24px; padding-bottom: 20px; border-bottom: 1px solid var(--edge); }
.journey-summary > p { margin: 0; font-size: 13px; color: var(--muted); }
.journey-progress { flex-shrink: 0; min-width: 172px; }
.journey-progress > span { font-size: 17px; font-weight: 800; }
.journey-progress small { font-size: 10px; font-weight: 500; }
.journey-progress > div { display: flex; gap: 5px; margin-top: 7px; }
.journey-progress i { display: block; flex: 1; height: 4px; border-radius: 2px; background: var(--edge); }
.journey-progress i.done { background: var(--teal); }
.journey-progress i.next { background: #96baad; }
.journey-layout { display: grid; grid-template-columns: 1.5fr 1fr; gap: 26px; align-items: start; }
.mission-brief { border: 1px solid var(--edge); border-radius: 12px; overflow: hidden; background: #fffaf180; }
.mission-visual { position: relative; background: var(--ink); color: #ece7dc; padding: 18px 20px 13px; }
.mission-location { display: flex; align-items: center; justify-content: space-between; }
.mission-location .eyebrow { color: #90ccbd; font-size: 9px; }
.mission-state { font-size: 8px; letter-spacing: 1.3px; border: 1px solid #819589; color: #d6e6dc; border-radius: 4px; padding: 4px 7px; }
.arena-sketch { display: block; width: 100%; height: auto; margin: 6px 0; }
.arena-sun { fill: #e1dfc4; opacity: .10; }
.arena-lines { color: #b2b8b5; }
.fragile-sketch { color: #71c1ae; }
.arena-actor { color: #f6f2e9; }
.arena-actor.opponent { color: #bd8580; }
.arena-band { stroke: #20c6b0; }
.arena-actor.opponent .arena-band { stroke: #d9c6b3; }
.visual-caption { color: #aeb8b6; font-size: 9px; }
.mission-brief-body { padding: 22px; }
.mission-brief-body > .eyebrow { color: #087e70; font-size: 9px; margin: 0 0 8px; }
.mission-brief h3 { color: var(--ink); font-size: 28px; letter-spacing: -.9px; line-height: 1.15; text-transform: none; margin: 0 0 10px; }
.mission-blurb { font-size: 12px; color: var(--muted); line-height: 1.7; min-height: 41px; }
.mission-rules { display: grid; grid-template-columns: .9fr .9fr 1.3fr; gap: 14px; margin: 18px 0 21px; }
.mission-rules small, .mission-rules b { display: block; }
.mission-rules small { font-size: 9px; margin-bottom: 5px; }
.mission-rules b { font-size: 11px; line-height: 1.5; }
.mission-launch { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid var(--edge); padding-top: 16px; }
.mission-reward small { display: block; font-size: 10px; }
.mission-reward > b { font-size: 27px; letter-spacing: -.7px; line-height: 1.35; }
.mission-reward b span { font-size: 12px; font-weight: 500; color: var(--muted); }
.mission-launch button { font-size: 12px; }
.mission-launch button span { margin-left: 14px; }
.mission-footnote { color: var(--muted); font-size: 9px; margin: 12px 0 0; line-height: 1.6; }
.chapter-list .section-label { margin: 1px 0 12px; }
.chapter-list .section-label h3 { font-size: 13px; color: var(--ink); letter-spacing: 0; text-transform: none; margin: 0; }
.chapter-list .section-label > span { font-size: 8px; letter-spacing: 1.4px; }
.chapter-card { width: 100%; display: flex; text-align: left; align-items: center; gap: 13px; padding: 20px 15px; margin-bottom: 11px; background: #fffaf180; border-radius: 9px; }
.chapter-card.selected { background: #e3ece4; border-color: #8eb5a4; }
.chapter-number { width: 29px; height: 29px; display: flex; align-items: center; justify-content: center; font-size: 11px; background: var(--shade); color: var(--muted); border-radius: 50%; flex-shrink: 0; }
.selected .chapter-number { background: #087e70; color: white; }
.chapter-copy { min-width: 0; flex: 1; }
.chapter-status { display: block; font-size: 8px; font-weight: 650; color: #087e70; margin-bottom: 6px; }
.chapter-copy > b { display: block; font-size: 14px; letter-spacing: -.3px; }
.chapter-copy > small { display: block; font-size: 10px; font-weight: 400; margin-top: 5px; }
.chapter-arrow { color: #087e70; font-size: 18px; }
.chapter-card.locked:not(.selected) { background: transparent; border-style: dashed; }
.chapter-card.locked .chapter-status { color: var(--muted); }
.journey-training { border-top: 1px solid var(--edge); margin-top: 25px; padding-top: 20px; }
.journey-training .eyebrow { color: #087e70; font-size: 8px; }
.journey-training h3 { font-size: 17px; letter-spacing: -.4px; color: var(--ink); text-transform: none; margin: 8px 0; }
.journey-training p { font-size: 11px; color: var(--muted); line-height: 1.7; margin-bottom: 13px; }
.journey-training button { font-size: 11px; }
.avatar-header-actions { display: flex; align-items: center; gap: 20px; }
.points-wallet { font-size: 10px; color: var(--muted); white-space: nowrap; }
.points-wallet b { font-size: 24px; color: #087e70; letter-spacing: -.8px; margin-right: 3px; }
.avatar-layout { display: grid; grid-template-columns: 245px minmax(0, 1fr); gap: 28px; align-items: start; }
.fighter-profile { border: 1px solid var(--edge); border-radius: 11px; overflow: hidden; background: #fffaf180; }
.portrait-panel { background: #e6e9dd; padding: 14px 17px 0; }
.portrait-panel > .eyebrow { font-size: 8px; color: #596b60; }
.avatar-portrait { width: 100%; height: 150px; display: block; color: var(--ink); }
.portrait-wash { fill: #d7ddc9; }
.portrait-band { stroke: var(--teal); }
.portrait-weapon { stroke: #7a5a36; }
.portrait-floor { stroke: #7d8494; stroke-width: 1px; opacity: .45; }
.profile-details { padding: 16px; }
.profile-details > label { display: block; font-size: 9px; color: var(--muted); margin-bottom: 5px; }
.profile-details > input[type=text] { width: 100%; font-size: 14px; padding: 7px 9px; min-height: 35px; border-color: var(--edge); background: #fffaf0; }
.profile-build-stats { display: grid; grid-template-columns: 1fr 1fr; border-block: 1px solid var(--edge); margin-top: 16px; padding: 11px 0; }
.profile-build-stats b { font-size: 17px; letter-spacing: -.5px; }
.profile-build-stats small { display: block; font-size: 9px; margin-top: 3px; }
.loadout-heading { display: flex; align-items: center; justify-content: space-between; margin: 16px 0 7px; }
.loadout-heading h3, .loadout-label { font-size: 9px; letter-spacing: .6px; margin: 0; }
.loadout-heading > span { font-size: 9px; color: var(--muted); }
.equipped-slots { display: flex; flex-direction: column; gap: 5px; }
.equipped-slot { display: flex; align-items: center; gap: 7px; padding: 6px 8px; min-height: 30px; border-style: dashed; background: transparent; font-size: 10px; font-weight: 500; text-align: left; }
.equipped-slot > span:first-child { color: var(--muted); font-size: 8px; }
.equipped-slot > span:last-child { margin-left: auto; color: #087e70; }
.equipped-slot.occupied { border-style: solid; background: #e7eee4; color: #086b5b; }
.profile-details .loadout-label { margin: 18px 0 8px; }
.weapon-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.weapon-choices button { min-width: 0; padding: 9px 4px; background: #fffaf0; }
.weapon-choices button.chosen { background: #e3ece4; border-color: #8eb5a4; }
.weapon-choices b { display: block; font-size: 11px; }
.weapon-choices small { display: block; font-size: 8px; font-weight: 400; margin-top: 3px; }
.profile-note { color: var(--muted); font-size: 9px; line-height: 1.6; margin: 8px 0 12px; }
.profile-campaign { width: 100%; font-size: 10px !important; }
.avatar-workspace { min-width: 0; }
.avatar-tabs { display: flex; border-bottom: 1px solid var(--edge); gap: 22px; }
.avatar-tabs button { border: 0; border-radius: 0; border-bottom: 3px solid transparent; background: transparent; color: var(--muted); font-size: 13px; padding: 10px 0 12px; }
.avatar-tabs button.selected { border-bottom-color: #087e70; color: var(--ink); }
.avatar-notice { font-size: 10px; color: #087e70; min-height: 26px; padding-top: 8px; margin: 0 0 15px; }
.avatar-notice:focus { outline: none; }
.avatar-content:focus { outline: none; }
.avatar-section-heading { margin-bottom: 17px; }
.avatar-section-heading .eyebrow { color: #087e70; font-size: 8px; margin: 0 0 6px; }
.avatar-section-heading h3 { color: var(--ink); text-transform: none; font-size: 24px; letter-spacing: -.7px; margin: 0 0 8px; }
.avatar-section-heading p:last-child { font-size: 11px; color: var(--muted); line-height: 1.7; margin: 0; }
.training-budget { display: flex; align-items: center; gap: 12px; font-size: 10px; margin-bottom: 8px; padding: 11px 0; border-block: 1px solid var(--edge); }
.training-budget > span { white-space: nowrap; color: var(--muted); }
.training-budget > b { font-size: 10px; }
.budget-bar, .mastery-bar { background: #e0ded3; border-radius: 3px; height: 5px; overflow: hidden; }
.budget-bar { flex: 1; }
.budget-bar > i, .mastery-bar > i { display: block; height: 100%; background: var(--teal); border-radius: inherit; }
.attribute-card { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 14px 0; border-bottom: 1px solid var(--edge); }
.attribute-copy { flex: 1; min-width: 0; }
.attribute-copy > div:first-child { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.attribute-copy h4 { margin: 0; font-size: 13px; }
.attribute-copy > div > span { font-size: 12px; font-weight: 750; }
.attribute-copy small { font-size: 9px; font-weight: 400; }
.attribute-copy p { color: var(--muted); font-size: 10px; margin: 4px 0 8px; line-height: 1.5; }
.attribute-ticks { display: flex; gap: 4px; }
.attribute-ticks i { height: 5px; border-radius: 2px; background: #e0ded3; flex: 1; }
.attribute-ticks .filled { background: var(--teal); }
.attribute-action { flex: 0 0 145px; text-align: right; }
.attribute-action button { width: 100%; font-size: 10px; min-height: 33px; }
.attribute-action > small { display: block; font-size: 8px; margin-top: 5px; }
.training-reset, .mastery-next { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-top: 20px; }
.training-reset b, .mastery-next b { font-size: 12px; }
.training-reset p, .mastery-next p { color: var(--muted); font-size: 10px; line-height: 1.7; margin-top: 3px; }
.training-reset button, .mastery-next button { flex-shrink: 0; font-size: 10px; }
.technique-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.technique-card { display: flex; flex-direction: column; border: 1px solid var(--edge); border-radius: 8px; padding: 15px; background: #fffaf180; }
.technique-card.equipped { border-color: #8eb5a4; background: #e6eee4; }
.technique-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.technique-number { font-size: 9px; color: var(--muted); }
.technique-state { font-size: 8px; color: var(--muted); }
.technique-state.active { color: #087e70; font-weight: 750; }
.technique-card h4 { margin: 0 0 7px; font-size: 14px; letter-spacing: -.2px; }
.technique-card > p { color: var(--muted); font-size: 10px; line-height: 1.7; margin: 0 0 12px; }
.technique-meta { margin-top: auto; font-size: 8px; color: var(--muted); line-height: 1.7; }
.technique-meta span { display: block; }
.technique-bottom { display: flex; flex-direction: column; gap: 9px; padding-top: 12px; margin-top: 10px; border-top: 1px solid var(--edge); }
.technique-bottom small { font-size: 8px; }
.technique-bottom button { align-self: start; font-size: 10px; }
.mastery-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mastery-card { border: 1px solid var(--edge); border-radius: 8px; padding: 17px; background: #fffaf180; }
.mastery-card:last-child { grid-column: 1 / -1; }
.mastery-title { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.mastery-title h4 { margin: 0; font-size: 14px; }
.mastery-title > span { font-size: 11px; font-weight: 750; color: #087e70; }
.mastery-title small { font-weight: 400; font-size: 8px; }
.mastery-card > p { margin: 8px 0 16px; font-size: 10px; color: var(--muted); }
.mastery-progress { display: flex; justify-content: space-between; gap: 10px; margin-top: 9px; }
.mastery-progress b { font-size: 9px; }
.mastery-progress > span { font-size: 8px; color: var(--muted); }
.mastery-card > small { display: block; margin-top: 10px; font-size: 9px; line-height: 1.6; }
@media (max-width: 900px), (max-height: 570px) {
  .progression-panel { padding: 18px 20px; }
  .progression-header { margin-bottom: 14px; }
  .progression-header h2 { font-size: 25px; }
  .progression-header .eyebrow { font-size: 8px; }
  .journey-summary { margin-bottom: 15px; padding-bottom: 12px; }
  .journey-summary > p { font-size: 11px; }
  .journey-layout { grid-template-columns: 1.4fr 1fr; gap: 16px; }
  .mission-visual { padding: 12px 16px; }
  .arena-sketch { max-height: 110px; }
  .mission-brief-body { padding: 16px; }
  .mission-brief h3 { font-size: 23px; }
  .mission-blurb { font-size: 11px; min-height: 0; }
  .mission-rules { margin: 12px 0; gap: 10px; }
  .mission-rules b { font-size: 10px; }
  .mission-launch { padding-top: 10px; }
  .mission-launch button { min-height: 36px; font-size: 11px; padding: 8px 10px; }
  .mission-reward > b { font-size: 23px; }
  .chapter-card { padding: 14px 11px; gap: 10px; }
  .chapter-copy > b { font-size: 12px; }
  .chapter-status { font-size: 7px; }
  .journey-training { margin-top: 17px; padding-top: 14px; }
  .journey-training h3 { font-size: 15px; }
  .avatar-layout { grid-template-columns: 200px minmax(0, 1fr); gap: 20px; }
  .avatar-portrait { height: 115px; }
  .profile-details { padding: 13px; }
  .avatar-section-heading h3 { font-size: 22px; }
  .avatar-tabs { gap: 18px; }
  .avatar-tabs button { font-size: 12px; }
  .attribute-action { flex-basis: 125px; }
  .attribute-action button { font-size: 9px; }
  .technique-card { padding: 12px; }
  .training-reset { flex-wrap: wrap; gap: 10px; }
}
@media (max-width: 620px) {
  .journey-layout, .avatar-layout { grid-template-columns: 1fr; }
  .journey-summary { gap: 15px; }
  .journey-progress { min-width: 115px; }
  .chapter-list { grid-row: 1; }
  .chapter-card { padding: 11px; }
  .journey-training { display: none; }
  .mission-rules { grid-template-columns: 1fr 1fr; }
  .mission-rules > span:last-child { grid-column: 1/-1; }
  .fighter-profile { display: grid; grid-template-columns: 100px 1fr; }
  .portrait-panel { padding: 12px 5px 0; }
  .portrait-panel > .eyebrow { font-size: 6px; text-align: center; }
  .avatar-portrait { height: 140px; }
  .profile-build-stats { margin-top: 10px; }
  .avatar-header-actions { gap: 10px; }
  .points-wallet { font-size: 8px; }
  .points-wallet b { font-size: 20px; }
  .progression-header h2 { font-size: 23px; }
  .attribute-card { gap: 12px; }
  .attribute-action { flex-basis: 115px; }
  .technique-grid, .mastery-grid { grid-template-columns: 1fr; }
}
.progression-header { position: sticky; top: -28px; z-index: 4; background: var(--paper); padding: 13px 0; margin-top: -13px; }
.attribute-copy p { font-size: 11px; }
.attribute-action button { font-size: 11px; }
.attribute-action > small, .technique-meta, .technique-bottom small { font-size: 9px; }
.technique-card > p { font-size: 11px; }
.technique-state { font-size: 9px; }
.mastery-card > p { font-size: 11px; }
.mastery-progress b { font-size: 10px; }
@media (min-width: 901px) and (min-height: 850px) {
  .avatar-tabs { position: sticky; top: 64px; z-index: 3; background: var(--paper); }
  .fighter-profile { position: sticky; top: 64px; }
}
@media (max-width: 900px), (max-height: 570px) {
  .progression-header { top: -18px; }
  .attribute-action button { font-size: 10px; }
}
.campaign-header-actions { display: flex; align-items: center; gap: 10px; }
.compact-launch { display: none; }
@media (max-height: 570px) {
  .compact-launch { display: inline-flex; align-items: center; font-size: 11px !important; }
  .progression-header { padding-block: 9px; margin-top: -9px; margin-bottom: 12px; }
  .progression-header .eyebrow { display: none; }
  .avatar-section-heading { margin-bottom: 12px; }
  .avatar-section-heading p:last-child { line-height: 1.5; }
  .avatar-notice { margin-bottom: 10px; }
}
@media (max-height: 570px) { .campaign-panel .arena-sketch { max-height: 75px; } }
#grip-help { position: fixed; top: 60px; left: 14px; width: min(420px, calc(50vw - 60px)); padding: 8px 11px; border: 1px solid #bcc8bc; border-radius: 7px; background: #f8f4eaf2; box-shadow: 0 3px 13px #1d24330a; pointer-events: none; color: var(--ink); }
#grip-help[hidden] { display: none; }
#grip-help > b { display: block; font-size: 9px; letter-spacing: .8px; color: #087e70; line-height: 1.3; }
#grip-help > span { display: block; font-size: 10px; line-height: 1.4; margin-top: 3px; }
#grip-help > .grab-followups { color: #087e70; font-size: 10px; font-weight: 700; }
#grip-help[data-mode=feedback] { border-color: #d4b99d; }
#grip-help[data-mode=feedback] > b, #grip-help[data-mode=held] > b { color: #99552c; }
.grab-time { display: block; height: 3px; background: #d9ded2; margin-top: 7px; border-radius: 2px; overflow: hidden; }
.grab-time > i { display: block; width: 100%; height: 100%; background: var(--teal); transform-origin: left; }
.grab-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 22px 0; }
.grab-steps article { padding: 15px; background: #e7ece1; border-radius: 8px; }
.grab-steps b { font-size: 13px; color: #087e70; }
.grab-steps p { font-size: 12px; line-height: 1.7; margin-top: 8px; color: var(--muted); }
.grab-lesson > p { font-size: 12px; line-height: 1.7; }
.grab-lesson > .sub { font-size: 14px; }
.grab-lesson > .dim { font-size: 11px; }
@media (max-width: 620px) { .grab-steps { grid-template-columns: 1fr; margin-block: 14px; } }
@media (max-height: 340px) { #grip-help { top: 56px; padding: 6px 9px; } #grip-help > span { font-size: 9px; } }

/* Character stories: printed panels, red evidence, quiet ink illustrations. */
.story-hub, .dialogue-panel { width: min(1120px, 100%); background: #f6f2e9; }
.story-header { display:flex; justify-content:space-between; align-items:center; gap:16px; }
.story-header h2 { font-size:clamp(24px, 3.6vw, 42px); letter-spacing:-1.8px; margin:0; display:block; }
.story-header .eyebrow { margin:0 0 5px; }
.story-period { color:var(--red); }
.story-meta { display:flex; flex-wrap:wrap; gap:20px; font:700 10px/1.4 monospace; letter-spacing:1px; padding:15px 0; margin-top:12px; border-top:1px solid var(--edge); }
.story-meta span:last-child { margin-left:auto; color:var(--red); }
.story-hub-layout { display:grid; grid-template-columns:minmax(0,1.4fr) minmax(260px,1fr); gap:28px; }
.story-feature { border:1px solid var(--edge); }
.story-illustration { position:relative; background:#ece6d8; border-bottom:1px solid var(--edge); overflow:hidden; }
.story-art { display:block; width:100%; max-height:290px; }
.story-stamp { position:absolute; top:18px; left:18px; color:var(--red); font:700 10px monospace; letter-spacing:1px; border:1px solid currentColor; padding:5px 8px; transform:rotate(-5deg); }
.story-brief { padding:22px; }
.story-brief h3 { font-size:26px; text-transform:none; letter-spacing:-.8px; margin:3px 0 8px; color:var(--ink); }
.story-brief > p:not(.eyebrow):not(.dim) { max-width:48ch; line-height:1.6; }
.story-objective { margin:18px 0; border-left:3px solid var(--red); padding-left:12px; }
.story-objective small, .story-objective strong { display:block; }
.story-objective small { font:10px monospace; letter-spacing:1px; margin-bottom:5px; }
.story-primary { background:var(--red)!important; border-color:var(--red)!important; color:white!important; }
.story-primary:hover { background:#a72d24!important; }
.story-chapter { display:flex; gap:14px; align-items:center; width:100%; text-align:left; border:0; border-bottom:1px solid var(--edge); border-radius:0; background:transparent; padding:13px 10px; }
.story-chapter > span { font:13px monospace; color:var(--muted); }
.story-chapter b, .story-chapter small { display:block; }
.story-chapter small { font-weight:400; font-size:11px; margin-top:4px; }
.story-chapter.selected { background:#e9e2d6; box-shadow:inset 3px 0 var(--red); }
.story-chapter.selected > span { color:var(--red); }
.story-reward { padding:20px 10px 4px; }
.story-reward > b { display:block; font-size:24px; margin:4px 0; letter-spacing:-.8px; }
.story-reward p { font-size:13px; color:var(--muted); max-width:36ch; margin:0 0 12px; }
.story-footer { display:flex; align-items:center; justify-content:space-between; gap:15px; margin-top:20px; font-size:12px; color:var(--muted); }
.story-pending { border-top:1px solid var(--edge); margin-top:15px; padding-top:12px; font-size:13px; }
.story-pending button { margin-top:8px; }
.future-stories { margin-top:20px; padding-top:16px; border-top:1px solid var(--edge); }
.future-stories summary { cursor:pointer; font-weight:700; padding:5px 0; }
.future-stories > div { display:grid; grid-template-columns:1fr 1fr; gap:20px; margin-top:16px; }
.future-stories article p, .future-stories > p { font-size:13px; color:var(--muted); }
.dialogue-panel { padding:24px; }
.dialogue-layout { display:grid; grid-template-columns:1.15fr 1fr; align-items:center; gap:30px; padding:25px 0 5px; }
.dialogue-art { position:relative; }
.dialogue-art .story-art { max-height:360px; }
.evidence-paper { position:absolute; inset:25% 15% auto; background:#faf7ef; border:1px solid #d6d0c3; box-shadow:4px 5px #1d24331a; padding:18px; transform:rotate(-5deg); text-align:center; }
.evidence-paper span, .evidence-paper strong { display:block; font:11px/1.7 monospace; letter-spacing:1px; }
.evidence-paper strong { font-size:clamp(13px, 1.8vw, 22px); color:var(--red); border-block:1px solid var(--edge); padding:12px 0; margin:8px 0; }
.dialogue-copy h2 { display:block; font-size:30px; margin:7px 0 18px; }
.dialogue-line { font-size:clamp(18px, 2.1vw, 26px); line-height:1.45; min-height:130px; letter-spacing:-.4px; }
.dialogue-line.narration { font-size:clamp(16px, 1.7vw, 21px); }
.dialogue-controls { display:flex; align-items:center; justify-content:space-between; gap:12px; padding-top:18px; border-top:1px solid var(--edge); margin-top:20px; }
.dialogue-controls > div { display:flex; gap:8px; }
.scene-count { font:11px monospace; letter-spacing:2px; color:var(--muted); }
.scene-skip { border:0; background:transparent; font-size:12px; padding:8px 0; min-height:36px; color:var(--muted); margin-top:6px; }
.unlock-panel { text-align:center; max-width:700px; }
.unlock-panel .story-art { max-height:240px; }
.unlock-seal { display:inline-block; font:700 11px monospace; letter-spacing:2px; border:1px solid var(--red); color:var(--red); padding:8px 12px; transform:rotate(-3deg); margin:12px 0; }
.unlock-panel h2 { display:block; font-size:64px; margin:0; }
.unlock-panel p { margin:8px 0; }
.character-panel { width:min(950px, 100%); }
.character-panel > p { margin:16px 0; color:var(--muted); font-size:13px; }
.character-grid { display:grid; grid-template-columns:1fr 1fr; gap:20px; }
.character-card { border:1px solid var(--edge); padding:20px; }
.character-card.selected { border-color:var(--red); }
.character-card h3 { font-size:24px; color:var(--ink); text-transform:none; letter-spacing:-.5px; }
.character-card p { font-size:13px; margin:8px 0 16px; }
.character-card .story-art { max-height:190px; }
@media (max-height:600px) and (min-width:601px) {
  .story-hub, .dialogue-panel { padding:16px 20px; }
  .story-header h2 { font-size:26px; }
  .story-meta { padding:8px 0; margin-top:8px; }
  .story-hub-layout { gap:18px; }
  .story-illustration .story-art { max-height:150px; }
  .story-brief { padding:14px; }
  .story-brief h3 { font-size:21px; }
  .story-chapter { padding:9px; }
  .story-objective { margin:12px 0; }
  .dialogue-layout { padding-top:8px; gap:20px; }
  .dialogue-art .story-art { max-height:240px; }
  .dialogue-copy h2 { font-size:23px; margin:5px 0 10px; }
  .dialogue-line { font-size:20px; min-height:83px; }
  .dialogue-line.narration { font-size:16px; }
  .dialogue-controls { margin-top:10px; padding-top:10px; }
  .evidence-paper { padding:10px; }
  .unlock-panel .story-art { max-height:110px; }
  .unlock-panel h2 { font-size:38px; }
}
@media (max-width:600px) {
  .story-hub-layout, .dialogue-layout, .character-grid { grid-template-columns:1fr; }
  .story-header { align-items:flex-start; }
  .story-header h2 { font-size:28px; }
  .story-meta { gap:10px; }
  .story-meta span:last-child { margin-left:0; }
  .story-illustration .story-art, .dialogue-art .story-art { max-height:180px; }
  .story-brief { padding:16px; }
  .dialogue-line { min-height:70px; }
  .dialogue-layout { gap:15px; }
  .story-footer { align-items:flex-start; flex-direction:column; }
  .future-stories > div { grid-template-columns:1fr; }
}

/* Cinematic revision. Full location staging; only decisive reveals leave the arena. */
.story-illustration .cinematic-art { max-height:none; aspect-ratio:1.85; object-fit:cover; }
.story-stamp { background:#f6f2e9ec; transform:none; color:#883a32; border:0; box-shadow:0 1px 8px #1d24331a; }
.story-hub .story-feature { border-color:#c9c7b8; }
.cinema-panel.dialogue-panel { width:min(1440px,100%); padding:0; border:1px solid #424a49; border-radius:5px; background:#182525; overflow:hidden; box-shadow:0 30px 100px #14202260; }
.cinema-frame { position:relative; isolation:isolate; width:100%; height:min(78vh,780px); min-height:460px; overflow:hidden; color:#f2eee2; background:#a8b1aa; }
.cinema-frame > .cinematic-art { position:absolute; inset:0; height:100%; max-height:none; width:100%; }
.cinema-shade { position:absolute; inset:0; background:linear-gradient(180deg,#172627a6,transparent 24%,transparent 43%,#122023b3 71%,#111c20f5 100%); pointer-events:none; }
.cinema-header { position:absolute; inset:0 0 auto; display:flex; align-items:flex-start; justify-content:space-between; gap:15px; padding:28px 38px; z-index:2; }
.cinema-header .eyebrow { color:#dfd8c4; font:10px monospace; letter-spacing:3px; margin:0 0 8px; }
.cinema-location { margin:0!important; font:600 clamp(16px,2vw,23px)/1.3 system-ui; letter-spacing:4px; }
.cinema-setting { margin:6px 0 0; font:9px monospace; letter-spacing:2px; color:#d4d6c5; }
.cinema-header button,.cinema-controls button { color:#e6e4d8; background:#1c2d2a5e; border-color:#dde4cc45; border-radius:3px; }
.cinema-header button:hover,.cinema-controls button:hover { background:#344b42; }
.cinema-dialogue { position:absolute; bottom:99px; left:7%; right:7%; z-index:2; animation:scene-copy .35s ease-out both; }
.cinema-speaker { display:flex; gap:18px; align-items:center; margin-bottom:10px; }
.cinema-speaker > span { font-size:14px; font-weight:750; letter-spacing:3px; text-transform:uppercase; color:#f2dec0; border-left:3px solid #b84c3d; padding-left:12px; }
.cinema-speaker small { font:9px monospace; color:#b8c6bd; letter-spacing:2px; }
.cinema-line { font:400 clamp(21px,2.4vw,32px)/1.42 Georgia,serif; letter-spacing:.1px; max-width:68ch; margin:0; text-shadow:0 2px 10px #14212480; }
.cinema-line.narration { font:400 clamp(16px,1.65vw,23px)/1.55 system-ui; color:#dce3d6; max-width:75ch; }
.cinema-controls { position:absolute; inset:auto 5% 19px; display:flex; gap:20px; align-items:center; justify-content:space-between; z-index:3; padding-top:14px; border-top:1px solid #bacbbc30; }
.cinema-actions { display:flex; gap:9px; align-items:center; }
.cinema-controls .scene-skip { color:#bcc5bd; border:0; background:transparent; margin:0; padding-inline:12px; }
.cinema-progress { display:flex; gap:16px; align-items:center; font:10px monospace; color:#d2d6c4; letter-spacing:2px; }
.cinema-progress > div { display:flex; gap:4px; }
.cinema-progress i { width:16px; height:2px; background:#a7b9a638; }
.cinema-progress i.read { background:#d6bf91; }
.scene-camera { transform-origin:700px 445px; animation:scene-dolly 9s cubic-bezier(.15,.6,.2,1) both; }
.scene-camera.camera-close { transform-origin:790px 410px; animation:scene-close 8s ease-out both; }
.scene-person { animation:scene-settle .7s ease-out both; }
.scene-person.is-speaking { filter:drop-shadow(0 0 3px #f4e9c330); }
.scene-ribbon { transform-box:fill-box; transform-origin:right center; animation:scene-wind 4s ease-in-out infinite alternate; }
.scene-rain { animation:scene-rain .8s linear infinite; }
@keyframes scene-dolly { from {transform:scale(1.025) translateX(-7px)} to {transform:scale(1.08) translateX(5px)} }
@keyframes scene-close { from {transform:scale(1.08)} to {transform:scale(1.15)} }
@keyframes scene-settle { from {opacity:0;transform:translateX(-8px)} to {opacity:1;transform:translateX(0)} }
@keyframes scene-wind { to {transform:rotate(7deg) translateY(1px)} }
@keyframes scene-rain { to {transform:translate(-13px,38px)} }
@keyframes scene-copy { from {opacity:0;transform:translateY(5px)} to {opacity:1;transform:translateY(0)} }
.manga-sequence { position:absolute; inset:0; background:#e9e4d6; padding:80px 3% 210px; display:grid; grid-template-columns:.85fr .75fr 1.2fr; gap:12px; overflow:hidden; }
.manga-cell { position:relative; overflow:hidden; background:#b7bdb1; border:3px solid #39413f; box-shadow:4px 5px #353d3a21; animation:panel-reveal .45s ease-out both; }
.manga-cell:nth-child(2) { animation-delay:.12s; }
.manga-cell:nth-child(3) { animation-delay:.24s; }
.manga-cell > svg { width:100%;height:100%;display:block; }
.manga-cell > span { position:absolute; bottom:10px; left:10px; right:10px; background:#f7f1e2; color:#343d37; padding:10px; font:italic 14px/1.4 Georgia,serif; box-shadow:2px 3px #34413720; }
.manga-cell.closeup { background:linear-gradient(135deg,#d7d5c5,#a7b0a4); }
.manga-cell.proof { display:flex; align-items:center; justify-content:center; background:repeating-linear-gradient(165deg,#cbc8b8 0px,#cbc8b8 20px,#c5c2b2 21px,#cbc8b8 22px); }
.manga-document { transform:rotate(-6deg); color:#42493d; background:#f6efda; padding:28px 20px; width:82%; box-shadow:4px 10px 18px #313c3940; border:1px solid #a4a18e; }
.manga-document small,.manga-document span { display:block; font:10px/1.5 monospace; letter-spacing:1px; }
.manga-document strong { display:block; font:700 clamp(17px,2vw,27px)/1.15 system-ui; border-block:1px solid #aaa28b; color:#a1352d; padding:18px 0; margin:12px 0; }
.manga-document i { display:block; font:9px monospace; margin-top:20px; color:#a1352d; border:2px solid #a1352d; padding:7px; width:fit-content; transform:rotate(4deg); }
.manga-cell.proof > strong { position:absolute; right:7%; top:20%; font:italic 700 clamp(24px,3.4vw,46px)/1 Georgia,serif; color:#932f28; text-shadow:2px 2px #f7f1df; }
@keyframes panel-reveal { from {opacity:0;transform:translateY(16px)} to {opacity:1;transform:translateY(0)} }
.refined-unlock.unlock-panel { width:min(1100px,100%); max-width:1100px; position:relative; padding:0; text-align:left; overflow:hidden; min-height:520px; background:#203331; border-radius:5px; }
.unlock-landscape { position:absolute; inset:0; }
.unlock-landscape .story-art { height:100%; width:100%; max-height:none; opacity:.5; }
.unlock-landscape:after { content:''; position:absolute; inset:0; background:linear-gradient(90deg,#182827f2,transparent); }
.unlock-content { position:relative; padding:55px 7%; color:#f1ead8; }
.unlock-content .eyebrow,.unlock-content .dim { color:#c7d1c4; }
.unlock-content h2 { color:#f1ead8; font:normal 85px Georgia,serif; }
.unlock-content .unlock-seal { color:#e2be85; border-color:#e2be85; transform:none; }
.unlock-content .actions { justify-content:flex-start; margin-top:30px; }
.roster-portrait { background:radial-gradient(ellipse at 50% 80%,#d9d7c7,transparent 70%); }
@media(max-height:600px) and (min-width:601px) {
 .cinema-panel.dialogue-panel { padding:0; }
 .cinema-frame { height:calc(100dvh - 30px);min-height:290px; }
 .cinema-header { padding:14px 24px; }
 .cinema-header .eyebrow { font-size:8px;margin-bottom:4px; }
 .cinema-location { font-size:15px; }
 .cinema-setting { font-size:8px;margin-top:4px; }
 .cinema-dialogue { bottom:77px;left:5%;right:5%; }
 .cinema-line { font-size:21px;line-height:1.3; }
 .cinema-line.narration { font-size:16px;line-height:1.4; }
 .cinema-speaker { margin-bottom:6px; }
 .cinema-speaker>span { font-size:11px; }
 .cinema-controls { bottom:10px;padding-top:8px; }
 .cinema-controls button { min-height:36px;padding:7px 12px; }
 .cinema-progress i { width:9px; }
 .manga-sequence { padding:55px 3% 142px;gap:8px; }
 .manga-cell { border-width:2px; }
 .manga-cell>span { font-size:10px;padding:5px;left:5px;right:5px;bottom:4px; }
 .manga-document { padding:10px 14px; }
 .manga-document strong { font-size:18px;padding:7px 0;margin:7px 0; }
 .manga-document i { margin-top:8px;font-size:8px;padding:4px; }
 .manga-document small,.manga-document span { font-size:8px; }
 .refined-unlock.unlock-panel { min-height:320px; }
 .unlock-content { padding:24px 6%; }
 .unlock-content h2 { font-size:52px; }
 .unlock-content .actions { margin-top:16px; }
}
@media(max-width:600px) {
 .cinema-frame { min-height:620px;height:calc(100dvh - 40px);max-height:850px; }
 .cinema-header { padding:22px 18px; }
 .cinema-header button { font-size:10px;padding:7px;min-height:36px; }
 .cinema-header .eyebrow { font-size:8px;letter-spacing:1px; }
 .cinema-location { font-size:15px;letter-spacing:2px; }
 .cinema-setting { font-size:8px;letter-spacing:1px; }
 .cinema-dialogue { left:6%;right:6%;bottom:125px; }
 .cinema-speaker { flex-direction:column;align-items:flex-start;gap:6px; }
 .cinema-line { font-size:23px; }
 .cinema-line.narration { font-size:18px; }
 .cinema-controls { flex-wrap:wrap;gap:12px; }
 .cinema-actions { width:100%;justify-content:flex-end;gap:5px; }
 .cinema-actions button { padding:8px 10px;font-size:12px; }
 .cinema-progress>div { display:none; }
 .manga-sequence { grid-template-columns:1fr 1fr;padding:86px 4% 300px;gap:7px; }
 .manga-cell.establishing { display:none; }
 .manga-cell>span { font-size:11px;padding:5px; }
 .manga-document { padding:12px 9px;width:90%; }
 .manga-document strong { font-size:17px; }
 .manga-document small,.manga-document span { font-size:8px; }
 .manga-document i { font-size:7px; }
}
@media(prefers-reduced-motion:reduce) {
 .scene-camera,.scene-person,.scene-ribbon,.scene-rain,.cinema-dialogue,.manga-cell { animation:none!important; }
}

/* A single brief aside, above the action; never blocks input or the objective. */
#story-voice{position:fixed;z-index:5;top:84px;left:50%;transform:translateX(-50%);max-width:min(580px,82vw);padding:8px 15px;border-left:3px solid #b95040;background:#202c32ed;color:#f1e8d4;font:500 14px/1.35 system-ui,sans-serif;text-align:center;pointer-events:none;box-shadow:0 3px 14px #0002}
#story-voice[hidden]{display:none}
@media(max-height:500px){#story-voice{top:76px;font-size:12px;max-width:65vw;padding:6px 12px}}

/* Arena Remix: readable choices before a short run. */
.remix-panel{width:min(1060px,100%);padding:30px}.remix-header{display:flex;justify-content:space-between;align-items:start;gap:20px}.remix-header h2{font-size:42px;letter-spacing:-.045em;margin:0}.remix-header h2 span{color:#b95040}.remix-progress{display:flex;gap:24px;border-block:1px solid #c4c6b7;padding:14px 0;margin:22px 0}.remix-progress span{display:flex;gap:9px;align-items:center;color:#747d7c}.remix-progress b{border:1px solid #a6b1a9;border-radius:50%;width:25px;height:25px;text-align:center;line-height:23px}.remix-progress .current{color:#a34437}.remix-progress .cleared{color:#39756c}.remix-bout{display:flex;justify-content:space-between;gap:20px;margin:14px 0 22px}.remix-bout>div{flex:1}.remix-bout>svg{width:140px;height:150px}.remix-bout h3{font-size:30px;margin:4px 0 8px}.remix-bout h3 small{display:block;font:500 13px system-ui;color:#606d70;margin-top:5px}.remix-bout p{margin:8px 0}.remix-health{display:flex;flex-wrap:wrap;justify-content:space-between;max-width:460px;gap:5px;font-size:13px}.remix-health meter{width:100%;height:12px;accent-color:#5b8586}.remix-recovery{color:#39756c;font-size:13px}.remix-options{display:grid;grid-template-columns:1fr 1fr;gap:16px}.remix-option{padding:0;text-align:left;overflow:hidden;border:2px solid #b7bdb3;background:#efecdf;color:#25343a}.remix-option.selected{border-color:#a74b3d;box-shadow:0 0 0 1px #a74b3d}.remix-option>svg{display:block;width:100%;height:auto}.remix-option>div{padding:18px}.remix-option small{font-size:10px;font-weight:750;letter-spacing:.12em;color:#656f70}.remix-option h3{display:flex;justify-content:space-between;font-size:23px;margin:5px 0 8px}.remix-option p{font-weight:400;font-size:14px;line-height:1.45;margin:6px 0}.remix-launch{display:flex;align-items:center;justify-content:space-between;gap:24px;margin-top:20px}.remix-launch p{font-size:13px;line-height:1.5}.remix-launch button{min-width:180px}.remix-rules{font-size:12px;line-height:1.6;color:#687372;border-top:1px solid #c4c6b7;padding-top:18px;margin-top:20px}.remix-ending{padding:28px 0}.remix-ending h3{font-size:34px;line-height:1.15}.remix-history>div{display:flex;justify-content:space-between;gap:16px;border-top:1px solid #c4c6b7;padding:14px 0;font-size:14px}.remix-history{margin:24px 0}@media(max-width:600px){.remix-panel{padding:20px}.remix-header h2{font-size:34px}.remix-options{grid-template-columns:1fr}.remix-progress{gap:12px;font-size:12px}.remix-bout>svg{width:90px}.remix-launch{align-items:stretch;flex-direction:column;gap:5px}.remix-history>div{flex-wrap:wrap}}@media(max-height:500px) and (min-width:601px){.remix-panel{padding:18px 24px}.remix-bout>svg{height:110px}.remix-header h2{font-size:32px}.remix-progress{margin:12px 0}.remix-option>div{padding:12px}.remix-option p{font-size:12px}}

/* Production touch layout editor; match input is disabled while this dialog is open. */
.touch-editor{position:fixed;inset:0;z-index:20;display:flex;align-items:center;justify-content:center;background:#1b2c2c99;padding:max(8px,env(safe-area-inset-top)) max(10px,env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) max(10px,env(safe-area-inset-left));}
.touch-editor-panel{width:min(1200px,100%);max-height:100%;overflow:auto;background:#f6f2e9;border:1px solid #c2c6b9;border-radius:16px;padding:18px;box-shadow:0 16px 80px #14242944}
.touch-editor header,.touch-editor footer,.touch-editor-options{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.touch-editor header p,.touch-editor footer p,.touch-editor-stage p,.touch-credits{font-size:12px;color:#59675f}.touch-editor header h2{margin:0 0 4px}.touch-editor-options{justify-content:flex-start;margin:14px 0;font-size:13px}.touch-editor-options label{display:flex;gap:8px;align-items:center}.touch-editor select{font:inherit;padding:8px;border:1px solid #bac1b5;border-radius:6px;background:#fffdf6;color:var(--ink)}
.touch-editor-grid{display:grid;grid-template-columns:minmax(0,1fr) 220px;gap:20px}.touch-editor-stage{min-width:0;align-self:start}.touch-editor-stage canvas{display:block;width:100%;height:auto;touch-action:none;border-radius:12px;background:#e2dfd1;border:1px solid #bdc4b7}.touch-editor-stage p{margin:8px 0}
.touch-editor-inspector{display:flex;flex-direction:column;gap:8px;font-size:13px}.touch-field{display:grid;grid-template-columns:1fr auto;gap:3px}.touch-field input{grid-column:1/-1;width:100%;min-height:26px;accent-color:#3b6061}.touch-field output{font-variant-numeric:tabular-nums}.touch-editor-inspector button{font-size:12px;min-height:32px;padding:6px}.touch-editor footer{border-top:1px solid #d6d0c3;padding-top:12px;margin-top:12px}.touch-editor footer p{flex:1 1 220px}.touch-credits{margin-top:10px}.touch-credits summary{cursor:pointer}.touch-credits a{color:#355e5a}
@media(max-width:700px){.touch-editor-panel{padding:12px}.touch-editor-grid{grid-template-columns:1fr}.touch-editor-inspector{display:grid;grid-template-columns:1fr 1fr;gap:10px}.touch-editor-inspector>label:first-child,.touch-editor-inspector>select{grid-column:1/-1}.touch-editor header h2{font-size:20px}}

.story-combat-brief{padding:10px 12px;border-left:3px solid #b7463b;background:#b7463b0b;font-size:13px;line-height:1.5;color:#485148}

/* Keep all five modes and the footer reachable on short landscape screens. */
@media (max-height:450px) and (min-width:581px) {
  .home-panel {padding:10px 16px;}
  .home-panel .fight-card {min-height:210px;padding:13px;}
  .home-panel .mode-copy small {display:none;}
  .home-panel .mode-card {min-height:36px;padding:4px 10px;}
  .home-panel .mode-picker {gap:4px;}
  .home-panel .fight-copy {max-width:185px;}
  .home-panel .home-footer {margin-top:5px;padding-top:4px;}
}
