:root {
  color-scheme: dark;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  background: #122027;
  color: #f2e9cc;
  font-size: 16px;
}
* { box-sizing: border-box; }
html, body { margin: 0; width: 100%; height: 100%; overflow: hidden; overscroll-behavior: none; }
body, #game, #rotate-gate {
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
}
#launch-status { position: fixed; inset: 0; z-index: 200; margin: 0; display: grid; place-items: center; padding: 24px; background: #203239; text-align: center; }
#game {
  position: relative; width: 100%; height: 100vh; height: 100dvh;
  padding: 0; overflow: hidden; touch-action: none;
}
.hud-tools {
  position: absolute; z-index: 8;
  top: max(12px, env(safe-area-inset-top)); right: max(12px, env(safe-area-inset-right));
  display: flex; gap: 6px;
}
.hud-button {
  display: grid; place-items: center; width: 48px; min-height: 48px; padding: 8px;
  border: 2px solid #ddcda09c; border-radius: 2px; background: #19343be0;
  color: #f1dfb5; box-shadow: 0 2px 0 #10282d90;
}
.hud-icon { display: block; width: 24px; height: 24px; fill: currentColor; shape-rendering: crispEdges; pointer-events: none; }
.action-icon { width: 32px; height: 32px; }
.music-muted { fill: #d39865; }
.music-lit { fill: #efc779; }
#music-toggle[data-enabled="true"] .music-muted, #music-toggle[data-enabled="false"] .music-lit { display: none; }
#music-toggle[data-enabled="false"] .music-notes { opacity: .65; }
#music-toggle[data-enabled="true"] { border-color: #efc779; }
.location-hud {
  position: absolute; z-index: 2; top: max(18px, env(safe-area-inset-top));
  left: max(18px, env(safe-area-inset-left)); pointer-events: none;
  font-size: .8rem; color: #fff2cc; text-shadow: 1px 1px #132329, -1px -1px #132329;
}
.in-menu #location, .in-battle #location, .at-ending #location { display: none; }
button, summary { font: inherit; cursor: pointer; }
button {
  font-size: .8rem; min-height: 44px; padding: 8px 12px;
  border: 1px solid #71826c; background: #293e41; color: #fff4d4; border-radius: 5px;
  touch-action: manipulation;
}
button:hover { background: #3c5352; }
button:disabled { opacity: .45; cursor: default; }
button:focus-visible, summary:focus-visible { outline: 3px solid #ffcd72; outline-offset: -3px; }
img, canvas { -webkit-user-drag: none; }
.objective { margin: 0; font-size: .72rem; line-height: 1.4; color: #c6d2b9; padding: 2px 0; }
#stage { position: absolute; inset: 0; background: #253b39; overflow: hidden; }
#world { display: block; width: 100%; height: 100%; object-fit: fill; image-rendering: pixelated; }
#scene:empty { display: none; }
#scene {
  position: absolute; inset: 0; padding: max(22px, env(safe-area-inset-top)) max(22px, calc((100% - 1000px) / 2));
  overflow: auto; overscroll-behavior: contain; touch-action: pan-y;
  background: #203239; scrollbar-gutter: stable;
}
#scene h2 { padding-right: 120px; margin: 0 0 12px; color: #f4ce81; font-size: 1.15rem; }
#scene h3 { font-size: 1rem; color: #f4ce81; margin: 20px 0 6px; }
#scene p { line-height: 1.55; }
#scene > h2 + p { padding-right: 120px; }
.has-scene #world { visibility: hidden; }
#world-labels { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.has-scene #world-labels { visibility: hidden; }
.world-label { position: absolute; top: 0; left: 0; font-size: 13px; line-height: 18px;
  white-space: nowrap; color: #fff0cf; text-shadow: 1px 1px #172b31, -1px -1px #172b31; }
.actor-label { padding: 2px 6px; background: #203239; border: 1px solid #b1ad81; border-radius: 3px; }
.world-label[hidden] { display: none; }
#dialogue {
  position: absolute; z-index: 5;
  left: max(18px, env(safe-area-inset-left)); right: max(18px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  width: min(720px, calc(100% - 36px)); margin: 0 auto;
  max-height: 44dvh; padding: 12px 16px;
  overflow: auto; overscroll-behavior: contain; touch-action: pan-y;
  color: #233334; background: #f0e7c9; border: 2px solid #c9b87f;
  box-shadow: 0 4px 0 #101c2380;
}
#dialogue[hidden] { display: none; }
#message { margin: 0 0 10px; font-size: .83rem; line-height: 1.5; }
#dialogue-close { display: block; margin-left: auto; min-width: 110px; }
.in-dialogue .bottom { display: none; }
.bottom { position: absolute; inset: auto 0 0; pointer-events: none; z-index: 3; }
.bottom > * { pointer-events: auto; }
#joystick {
  position: absolute; bottom: max(18px, env(safe-area-inset-bottom)); left: max(24px, env(safe-area-inset-left));
  width: 112px; height: 112px; border-radius: 50%; border: 2px solid #eddfb477;
  background: #19343b2b; box-shadow: 0 0 0 1px #18363d77; touch-action: none; cursor: grab;
}
#joystick:active { background: #19343b50; }
#joystick[aria-disabled="true"] { opacity: .4; pointer-events: none; }
.stick-ring { position: absolute; inset: 20px; border: 1px solid #eddfb450; border-radius: 50%; }
.stick-knob {
  position: absolute; left: 32px; top: 32px; width: 44px; height: 44px;
  border: 2px solid #f1dfb5bf; border-radius: 50%; background: #385f6680; box-shadow: 0 3px 0 #0e202850;
  transform: translate(var(--thumb-x, 0px), var(--thumb-y, 0px)); pointer-events: none;
}
#interact {
  position: absolute; right: max(24px, env(safe-area-inset-right)); bottom: max(24px, env(safe-area-inset-bottom));
  width: 64px; min-height: 64px;
}
#sprint {
  position: absolute; right: max(100px, calc(env(safe-area-inset-right) + 76px));
  bottom: max(24px, env(safe-area-inset-bottom));
  width: 64px; min-height: 64px; touch-action: none;
}
#sprint[aria-pressed="true"] { background: #526d52; border-color: #f1d598; color: #fff4d4; }
kbd { display: block; font: inherit; font-size: .65rem; margin-top: 5px; color: #bccabb; }
.in-menu .bottom, .in-battle .bottom, .at-ending .bottom,
.in-menu #dialogue, .in-battle #dialogue, .at-ending #dialogue { display: none; }
.starter-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.starter-grid button { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px; }
.starter-grid small { font-size: .72rem; }
.creature-sprite { width: 64px; height: 64px; object-fit: contain; image-rendering: pixelated; flex-shrink: 0; }
.panel-heading {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  position: sticky; top: -22px; z-index: 4; background: #203239; padding: 8px 0; margin: -8px 0 8px;
}
#scene .panel-heading h2 { margin: 0; padding-right: 0; }
#scene .panel-heading { padding-right: 120px; }
.panel-heading button { flex-shrink: 0; }
.team-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.team-row { display: flex; align-items: center; gap: 10px; padding: 8px; border: 1px solid #607467; }
.team-row .creature-sprite { width: 48px; height: 48px; }
.team-details { flex: 1; min-width: 0; display: grid; gap: 4px; font-size: .8rem; }
.team-details small { font-size: .7rem; color: #c6d4c7; }
.team-row button { flex-shrink: 0; }
.journal-count { margin: 0 0 10px; font-size: .75rem; }
.journal-entry { border-top: 1px solid #52645b; }
.journal-row { min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: .8rem; }
.journal-status { font-size: .7rem; color: #c6d4c7; }
.journal-entry p { font-size: .8rem; margin-top: 0; }
summary.journal-row > span:first-child::before { content: '▸ '; color: #efc977; }
details[open] > summary.journal-row > span:first-child::before { content: '▾ '; }
/* A wide screen puts the duel beside commands, keeping both fighters and choices in view. */
.in-battle:not(.in-menu) #scene {
  display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(270px, 1fr);
  grid-template-rows: auto minmax(0, 1fr) auto; gap: 10px 20px;
  padding: 16px; overflow: hidden;
}
.in-battle:not(.in-menu) #scene > h2 { grid-column: 1 / -1; margin: 0; }
.battlefield { position: relative; min-height: 0; grid-column: 1; grid-row: 2; background: #2d4545; border-bottom: 2px solid #607467; }
.fighter.enemy .creature-sprite { transform: scaleX(-1); }
.fighter.enemy .creature-sprite[data-species="daggla"] { transform: none; }
.stats { width: 155px; line-height: 1.4; font-size: .78rem; }
.stats strong { display: block; }
.level { display: inline-block; margin-left: 6px; font-size: .68rem; font-weight: normal; white-space: nowrap; color: #c6d4c7; }
.battle-log { grid-column: 1; grid-row: 3; border-left: 3px solid #d99b58; padding: 8px 10px; background: #172b31; font-size: .75rem; min-height: 78px; }
.battle-log p { margin: 3px 0; }
.turn-label { display: block; font-size: .6rem; text-transform: uppercase; letter-spacing: .09em; color: #efc977; margin-bottom: 4px; }
.actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.command-grid { grid-column: 2; grid-row: 2 / 4; align-content: center; }
.command-grid button { min-height: 64px; text-align: left; padding: 10px; }
.command-grid strong, .command-grid small { display: block; }
.command-grid strong { color: #f5d18a; font-size: .88rem; }
.command-grid small { margin-top: 5px; color: #c6d4c7; font-size: .7rem; line-height: 1.4; }
.command-grid button[data-focus="back"] { min-height: 44px; grid-column: 1 / -1; text-align: center; }
.primary-commands button[data-focus="Run"] { min-height: 44px; grid-column: 1 / -1; text-align: center; }
.primary-commands button:is([data-focus="Catch"], [data-focus="Team"], [data-focus="Run"]):disabled { opacity: 1; background: #203239; border-color: #4c6263; }
.primary-commands button:is([data-focus="Catch"], [data-focus="Team"], [data-focus="Run"]):disabled strong { color: #9faa94; }
.primary-commands button:is([data-focus="Catch"], [data-focus="Team"], [data-focus="Run"]):disabled small { color: #c6d4c7; }
#game-menu { width: min(540px, calc(100% - 32px)); max-height: calc(100dvh - 24px); padding: 16px; border: 2px solid #b6b48b; background: #203239; color: #f2e9cc; overflow: auto; overscroll-behavior: contain; touch-action: pan-y; }
#game-menu::backdrop { background: #08151cbb; }
#game-menu .panel-heading { top: -16px; padding-top: 8px; }
#game-menu h2 { font-size: 1.05rem; color: #f4ce81; }
.menu-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
#display-status:empty { display: none; }
#display-status, .guide { font-size: .8rem; line-height: 1.6; }
.guide summary { min-height: 44px; padding: 12px 0; }
#rotate-gate { position: fixed; inset: 0; z-index: 100; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 30px; text-align: center; background: #172930; }
#rotate-gate[hidden] { display: none; }
#rotate-gate h2 { color: #efc977; font-size: 1.3rem; }
#rotate-gate p { line-height: 1.5; margin: 6px 0; max-width: 280px; }
.rotate-symbol { display: block; font-size: 4rem; color: #c6d3a7; }
@media (min-width: 1100px) and (min-height: 650px) {
  .in-battle:not(.in-menu) #scene { padding: 28px; gap: 18px 28px; }
  .fighter .creature-sprite { width: 160px; height: 160px; }
  .stats { width: 200px; font-size: .9rem; }
  .battle-log { font-size: .9rem; min-height: 105px; }
  .command-grid button { min-height: 100px; }
  .command-grid strong { font-size: 1rem; }
  .command-grid small { font-size: .8rem; }
}
@media (max-height: 450px) {
  #scene { padding: max(14px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-left)); }
  #scene h2 { font-size: 1rem; margin-bottom: 6px; }
  #scene p { font-size: .8rem; margin: 8px 0; }
  .starter-grid .creature-sprite { width: 64px; height: 64px; }
  .starter-grid button { padding: 7px; gap: 4px; }
  .in-battle:not(.in-menu) #scene { padding: 10px; gap: 6px 12px; }
  .battle-log { min-height: 76px; padding: 6px 8px; font-size: .7rem; }
  #scene .battle-log p { font-size: .7rem; margin: 2px 0; line-height: 1.35; }
  .fighter .creature-sprite { width: 72px; height: 72px; }
  .fighter { gap: 6px; }
  .stats { width: 132px; font-size: .7rem; }
  .level { margin-left: 4px; font-size: .62rem; }
  .command-grid button { min-height: 66px; padding: 8px; }
  .command-grid strong { font-size: .8rem; }
  .command-grid small { font-size: .67rem; }
  #message { font-size: .78rem; }
  .panel-heading { top: -12px; }
}
@media (max-width: 720px) {
  #location { font-size: .75rem; }
  .in-battle:not(.in-menu) #scene { grid-template-columns: minmax(0, 1.1fr) minmax(265px, 1fr); }
  .team-row { gap: 6px; padding: 6px; }
  .team-row .creature-sprite { width: 40px; height: 40px; }
  .team-details { font-size: .72rem; }
  .team-row button { padding: 7px; }
  #joystick { left: 18px; }
  #interact { right: max(18px, env(safe-area-inset-right)); }
}
.hp-track {
  height: 10px;
  margin: 5px 0 3px;
  border: 1px solid #afc4a4;
  background: #17262d;
  overflow: hidden;
}
.hp-fill {
  height: 100%;
  background: #bad793;
  transition: width 240ms ease-out;
}
.hp-fill.low {
  background: #ed9b71;
}
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.damage-number {
  position: absolute;
  right: 2px;
  top: -5px;
  font-size: 1rem;
  font-weight: bold;
  padding: 3px 6px;
  background: #17262d;
  color: #ffd59b;
  animation: damage-rise 300ms ease-out;
}
.effect-player-hit,
.effect-enemy-hit {
  animation: hit-recoil 260ms ease-out;
}
.effect-heal,
.effect-guard {
  animation: mend-glow 300ms ease-out;
}
.effect-switch {
  animation: companion-enter 280ms ease-out;
}
.effect-capture .creature-sprite {
  animation: capture-spark 600ms ease-in-out;
}
.effect-capture-miss .creature-sprite {
  animation: escape-spark 300ms ease-out;
}
.effect-faint {
  opacity: 0.35;
}
@keyframes hit-recoil {
  35% {
    translate: 5px 0;
    filter: brightness(1.7);
  }
  65% {
    translate: -2px 0;
  }
}
@keyframes mend-glow {
  50% {
    filter: drop-shadow(0 0 6px #bddd9a);
  }
}
@keyframes companion-enter {
  from {
    translate: -12px 0;
    opacity: 0.2;
  }
  to {
    translate: 0 0;
    opacity: 1;
  }
}
@keyframes capture-spark {
  35% {
    scale: 0.4;
    filter: brightness(2);
  }
  75% {
    scale: 0.6;
    filter: drop-shadow(0 0 10px #ffd58d);
  }
}
@keyframes escape-spark {
  45% {
    translate: 0 -8px;
    filter: brightness(1.6);
  }
}
@keyframes damage-rise {
  from {
    translate: 0 5px;
    opacity: 0.4;
  }
  to {
    translate: 0 -3px;
    opacity: 1;
  }
}
@media (prefers-reduced-motion: reduce) {
  .fighter,
  .fighter .creature-sprite,
  .damage-number {
    animation: none !important;
  }
  .hp-fill {
    transition: none;
  }
}
.effect-victory .creature-sprite {
  opacity: 0.35;
}
.effect-sendout {
  animation: companion-enter 280ms ease-out;
}
.scene-enter { animation: coast-arrival 200ms ease-out; }
@keyframes coast-arrival { from { opacity: .45; } to { opacity: 1; } }
/* One encounter takes the whole viewport, before the familiar duel layout.
   Individual translate preserves each sprite's authored facing transform. */
.encounter-overlay { position: absolute; inset: 0; z-index: 7; overflow: hidden; pointer-events: none; background: #122027; }
.encounter-world { width: 100%; height: 100%; image-rendering: pixelated; animation: encounter-turn var(--takeover-ms) cubic-bezier(.55,.05,.8,.55) both; }
.encounter-overlay::after {
  content: ''; position: absolute; width: 180vmax; height: 180vmax;
  left: calc(50% - 90vmax); top: calc(50% - 90vmax);
  background: repeating-conic-gradient(from 30deg, #122027 0deg 34deg, #b8804438 34deg 38deg, transparent 38deg 60deg, #284744e8 60deg 84deg, transparent 84deg 90deg);
  animation: encounter-spiral var(--takeover-ms) ease-in both;
}
.encounter-overlay[data-phase="entrances"] { animation: encounter-reveal 140ms ease-out both; }
[data-entry="takeover"] #scene { visibility: hidden; }
[data-entry] #scene .actions, [data-entry] #scene .battle-log { visibility: hidden; }
[data-entry="entrances"] .battlefield { overflow: hidden; }
[data-entry="entrances"] .fighter.ally .creature-sprite { animation: encounter-ally var(--entrance-ms) cubic-bezier(.2,.65,.3,1) both; }
[data-entry="entrances"] .fighter.enemy .creature-sprite { animation: encounter-enemy var(--entrance-ms) cubic-bezier(.2,.65,.3,1) both; }
[data-entry="entrances"] .fighter .stats { animation: encounter-stats var(--entrance-ms) linear both; }
[data-entry="entrances"] .fighter-contact { animation: encounter-contact var(--entrance-ms) ease-out both; }
@keyframes encounter-turn {
  from { transform: scale(1) rotate(0); }
  65% { transform: scale(1.45) rotate(35deg); opacity: .8; }
  to { transform: scale(.7) rotate(100deg); opacity: 0; }
}
@keyframes encounter-spiral { from { transform: rotate(0) scale(.15); opacity: .25; } to { transform: rotate(240deg) scale(1.2); opacity: 1; } }
@keyframes encounter-reveal { to { opacity: 0; visibility: hidden; } }
@keyframes encounter-ally { from { translate: -180% 0; } 78% { translate: 3% 0; } to { translate: 0 0; } }
@keyframes encounter-enemy { from { translate: 180% 0; } 78% { translate: -3% 0; } to { translate: 0 0; } }
@keyframes encounter-contact { from { opacity: .15; } to { opacity: 1; } }
@keyframes encounter-stats { 0%, 35% { opacity: 0; } 75%, 100% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .encounter-overlay::after { display: none; }
  .encounter-world { animation: encounter-reveal 140ms ease-out both !important; }
  .encounter-overlay[data-phase="entrances"] { opacity: 0; visibility: hidden; }
  [data-entry="entrances"] .fighter { animation: encounter-fade 140ms ease-out both !important; }
}
@keyframes encounter-fade { from { opacity: 0; } to { opacity: 1; } }
/* Owned experience follows the committed reward, including threshold resets. */
.experience { margin-top: 5px; }
.experience small { display: block; font-size: 11px; line-height: 15px; color: #aedbfa; }
.xp-track { height: 5px; margin-top: 2px; background: #142b3b; border: 1px solid #4b7895; overflow: hidden; }
.xp-fill { height: 100%; background: #63b9f5; transition: width 400ms linear; }
.team-details .experience { max-width: 180px; margin-top: 0; }
@media (prefers-reduced-motion: reduce) { .xp-fill { transition: none; } }
/* Grounded duel: source-image contacts follow the backdrop cover crop.
   Native text stays outside the deliberately coarse environment raster. */
.in-battle:not(.in-menu) #scene { grid-template-columns: minmax(0, 1.45fr) minmax(270px, 1fr); gap: 10px 14px; }
.battlefield { --fighter-size: 96px; isolation: isolate; overflow: hidden; border: 1px solid #6f8f83; }
.battle-backdrop { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; }
.fighter, .fighter.enemy, .fighter.ally { position: absolute; inset: 0; display: block; max-width: none; pointer-events: none; }
.fighter > .creature-sprite { position: absolute; width: var(--fighter-size); height: var(--fighter-size); z-index: 2; }
.fighter.enemy { --contact-x: var(--enemy-x); --contact-y: var(--enemy-y); }
.fighter.ally { --contact-x: var(--ally-x); --contact-y: var(--ally-y); }
.fighter > .creature-sprite { left: calc(var(--contact-x) - var(--fighter-size) / 2); top: calc(var(--contact-y) - var(--fighter-size) * .9375); }
.fighter-contact { position: absolute; width: 78px; height: 16px; image-rendering: pixelated; z-index: 1; }
.fighter-contact { left: calc(var(--contact-x) - 39px); top: calc(var(--contact-y) - 8px); }
.fighter .stats { position: absolute; width: 178px; padding: 8px 10px; background: #172e35f2; border: 1px solid #8ca997; box-shadow: 0 3px 0 #0c1f2580; font-size: 12px; line-height: 1.4; z-index: 3; }
.fighter.enemy .stats { top: 10px; left: 10px; }
.fighter.ally .stats { bottom: 10px; right: 10px; }
.stats strong { font-size: 13px; color: #fff1cf; }
.stats .level { font-size: 11px; }
.battle-log { font-size: 13px; line-height: 1.4; }
.turn-label { font-size: 11px; letter-spacing: .04em; }
.command-grid strong { font-size: 15px; }
.command-grid small { font-size: 12px; }
.effect-player-hit, .effect-enemy-hit, .effect-heal, .effect-guard, .effect-sendout, .effect-switch { animation: none; }
.effect-player-hit > .creature-sprite, .effect-enemy-hit > .creature-sprite { animation: hit-recoil 260ms ease-out; }
.effect-heal > .creature-sprite, .effect-guard > .creature-sprite { animation: mend-glow 300ms ease-out; }
.effect-sendout > .creature-sprite, .effect-switch > .creature-sprite { animation: companion-enter 280ms ease-out; }
.effect-faint { opacity: 1; }
.effect-faint > .creature-sprite { opacity: .35; }
.damage-number { right: auto; bottom: auto; left: var(--contact-x); top: calc(var(--contact-y) - var(--fighter-size)); z-index: 4; }
@media (max-height: 450px) {
  .in-battle:not(.in-menu) #scene { gap: 6px 12px; }
  .battle-log { min-height: 78px; }
  #scene .battle-log p { font-size: 12px; line-height: 1.4; }
  .command-grid button { padding: 8px; }
  .command-grid strong { font-size: 14px; }
  .command-grid small { font-size: 12px; }
  .fighter .stats { width: 168px; padding: 6px 8px; }
  .fighter.enemy .stats { top: 8px; left: 8px; }
  .fighter.ally .stats { bottom: 8px; right: 8px; }
}
@media (max-width: 720px) { .in-battle:not(.in-menu) #scene { grid-template-columns: minmax(0, 1fr) 265px; } }
@media (min-width: 1100px) and (min-height: 650px) {
  .in-battle:not(.in-menu) #scene {
    grid-template-columns: minmax(0, 760px) minmax(270px, 390px);
    grid-template-rows: auto minmax(300px, min(50vh, 420px)) auto;
    align-content: center; justify-content: center;
  }
  .battlefield { --fighter-size: 160px; }
  .command-grid { grid-row: 2; align-self: center; }
  .fighter.enemy .stats { top: max(12px, calc(var(--enemy-y) - 145px)); left: calc(var(--enemy-x) - 310px); }
  .fighter.ally .stats { top: calc(var(--ally-y) - 90px); bottom: auto; left: calc(var(--ally-x) + 95px); right: auto; }
  .fighter .stats { width: 220px; padding: 12px; font-size: 15px; }
  .stats strong { font-size: 16px; }
  .stats .level { font-size: 13px; }
  .experience small { font-size: 13px; }
}
.effect-level-up .stats { animation: level-glow 400ms ease-out; }
.fighter.defeated > .creature-sprite { opacity: .28; }
@keyframes level-glow { 50% { border-color: #9edfff; box-shadow: 0 0 0 3px #63b9f555; } }
.notice-label { min-width: 26px; text-align: center; padding: 2px 5px;
  font-size: 24px; line-height: 26px; font-weight: bold; color: #172b31;
  background: #ffe0a1; border: 2px solid #6e4934; box-shadow: 0 3px 0 #172b3180; }
