/* packages/ui-shell/src/shell.css */
:root {
  --z-modal: 50;
  --z-panel: 40;
  --z-popover: 30;
  --z-toast: 20;
  --z-status-bar: 10;
  --z-board: 0;
}
.panel {
  position: absolute;
  z-index: var(--z-panel);
  display: flex;
  flex-direction: column;
  min-width: 12rem;
  box-sizing: border-box;
}
.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: move;
  user-select: none;
  touch-action: none;
}
.panel-title {
  flex: 1;
}
.panel-hotkey-chip {
  flex: 0 0 auto;
}
.panel-close {
  flex: 0 0 auto;
  cursor: pointer;
}
.panel-body {
  flex: 1 1 auto;
  overflow: auto;
}
.modal {
  position: absolute;
  z-index: var(--z-modal);
}
.popover {
  position: absolute;
  z-index: var(--z-popover);
}
.toast {
  position: absolute;
  z-index: var(--z-toast);
}
.status-bar {
  position: relative;
  z-index: var(--z-status-bar);
}
.board {
  position: relative;
  z-index: var(--z-board);
}
:root {
  --ui-scale: 1;
}
html {
  font-size: calc(100% * var(--ui-scale));
}
[data-reduced-motion=true] *,
[data-reduced-motion=true] *::before,
[data-reduced-motion=true] *::after {
  transition: none !important;
  animation: none !important;
  scroll-behavior: auto !important;
}
[data-high-contrast=true] :focus-visible {
  outline: 3px solid currentColor;
  outline-offset: 2px;
}
[data-high-contrast=true] button,
[data-high-contrast=true] input,
[data-high-contrast=true] select,
[data-high-contrast=true] .panel,
[data-high-contrast=true] .modal {
  border: 2px solid currentColor;
}
[data-high-contrast=true] body {
  filter: contrast(1.2);
}

/* ui/style.css */
:root {
  --bg0: #0a0918;
  --bg1: #12112f;
  --bg2: #1b1946;
  --bg3: #26226a;
  --line: #3b3690;
  --text: #f6f3ff;
  --dim: #aaa5d8;
  --yellow: #ffd84a;
  --red: #ff3a4e;
  --cyan: #38d5ff;
  --pink: #ff4fd0;
  --green: #5fe07a;
  --orange: #ff8a2a;
  --ink: #04030c;
  --r: 0.7rem;
  --head:
    Impact,
    Haettenschweiler,
    "Arial Narrow Bold",
    "Helvetica Neue",
    system-ui,
    sans-serif;
  --sans:
    ui-rounded,
    "Nunito",
    "Segoe UI",
    system-ui,
    -apple-system,
    sans-serif;
  --mono:
    ui-monospace,
    "SF Mono",
    Menlo,
    Consolas,
    monospace;
  --sat: env(safe-area-inset-top, 0px);
  --sar: env(safe-area-inset-right, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --sal: env(safe-area-inset-left, 0px);
}
[data-high-contrast=true] {
  --text: #fff;
  --dim: #e4e0ff;
  --line: #9a92ff;
  --bg1: #000;
  --bg2: #0b0a28;
  --bg3: #17135a;
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: var(--bg0);
  color: var(--text);
  font-family: var(--sans);
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
  touch-action: manipulation;
}
body {
  position: fixed;
  inset: 0;
}
button,
a,
input,
[role=button] {
  touch-action: manipulation;
}
button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
}
h1,
h2,
h3,
p {
  margin: 0;
}
small {
  font-size: 0.72rem;
  color: var(--dim);
}
:focus-visible {
  outline: 0.18rem solid var(--cyan);
  outline-offset: 0.12rem;
}
.muted,
.dim {
  color: var(--dim);
}
.ico {
  width: 1.15em;
  height: 1.15em;
  flex: none;
  vertical-align: -0.2em;
}
#app {
  position: fixed;
  inset: 0 auto auto 0;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background:
    radial-gradient(
      120% 90% at 50% -10%,
      #2b1f66 0%,
      var(--bg0) 62%);
}
#stage {
  position: absolute;
  inset: var(--sat) var(--sar) var(--sab) var(--sal);
  will-change: transform;
}
#flash {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background:
    radial-gradient(
      circle,
      #ffffff55,
      #ffd84acc);
  z-index: 60;
}
#fxlayer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 90;
  overflow: hidden;
}
#modals {
  position: relative;
  z-index: 80;
}
#toasts {
  position: fixed;
  top: calc(var(--sat) + 0.6rem);
  left: 50%;
  transform: translateX(-50%);
  z-index: 85;
  display: grid;
  gap: 0.4rem;
  justify-items: center;
  pointer-events: none;
  width: min(92vw, 28rem);
}
#input-kind {
  position: fixed;
  left: calc(var(--sal) + 0.4rem);
  bottom: calc(var(--sab) + 0.2rem);
  z-index: 70;
  font: 700 0.55rem var(--mono);
  color: var(--dim);
  opacity: 0.6;
  pointer-events: none;
}
#build-stamp {
  position: fixed;
  right: calc(var(--sar) + 0.4rem);
  bottom: calc(var(--sab) + 0.15rem);
  z-index: 70;
  font: 0.5rem var(--mono);
  color: var(--dim);
  opacity: 0.5;
  pointer-events: none;
}
.screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
  animation: screen-in 0.25s ease-out;
}
@keyframes screen-in {
  from {
    opacity: 0;
  }
}
.tst {
  background: var(--bg3);
  border: 2px solid var(--yellow);
  color: var(--text);
  padding: 0.45rem 0.8rem;
  border-radius: 0.6rem;
  font-size: 0.85rem;
  box-shadow: 0 3px 0 var(--ink);
  animation: toast-in 0.2s ease-out;
  text-align: center;
}
.tst.bad {
  border-color: var(--red);
}
@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(-0.6rem);
  }
}
.btn {
  background:
    linear-gradient(
      180deg,
      var(--bg3),
      var(--bg2));
  border: 2px solid var(--line);
  border-radius: 0.6rem;
  padding: 0.45rem 0.9rem;
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-weight: 800;
  box-shadow: 0 3px 0 var(--ink);
  transition:
    transform 0.08s,
    box-shadow 0.08s,
    border-color 0.15s;
}
.btn:hover:not(:disabled) {
  border-color: var(--yellow);
}
.btn:active:not(:disabled) {
  transform: translateY(2px);
  box-shadow: 0 1px 0 var(--ink);
}
.btn:disabled {
  opacity: 0.4;
}
.btn.primary {
  background:
    linear-gradient(
      180deg,
      #ffe566,
      #f0a800);
  border-color: #fff2a8;
  color: #231600;
  text-shadow: none;
}
.btn.danger {
  background:
    linear-gradient(
      180deg,
      #ff5a6a,
      #b3122a);
  border-color: #ffb0b8;
  color: #fff;
}
.btn.ghost {
  background: transparent;
  box-shadow: none;
}
.btn.big {
  min-height: 3.4rem;
  font-size: 1.1rem;
  padding: 0.5rem 1.4rem;
  flex-direction: column;
  gap: 0;
  line-height: 1.15;
  font-family: var(--head);
  font-style: italic;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 400;
}
.btn.big small {
  color: inherit;
  opacity: 0.75;
  font: 600 0.7rem var(--sans);
  text-transform: none;
  letter-spacing: 0;
  font-style: normal;
}
.icon-btn {
  min-width: 2.75rem;
  padding: 0.3rem 0.5rem;
}
kbd {
  font: 700 0.6rem var(--mono);
  background: #0005;
  border: 1px solid #fff5;
  border-radius: 0.25rem;
  padding: 0.05rem 0.3rem;
}
.pnl {
  background:
    linear-gradient(
      180deg,
      #1d1a4acc,
      #100f2ccc);
  border: 2px solid var(--line);
  border-radius: var(--r);
  padding: 0.55rem 0.7rem;
  min-height: 0;
  min-width: 0;
  box-shadow: 0 4px 0 var(--ink);
  backdrop-filter: blur(3px);
}
[data-scroll] {
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}
.topbar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.4rem 0.75rem;
  flex: 0 0 auto;
  position: relative;
  z-index: 2;
}
.topbar-title {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font: 400 1.4rem var(--head);
  font-style: italic;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  flex: 1;
  text-shadow: 2px 2px 0 var(--ink);
}
.topbar-right {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.score {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--yellow);
  font-weight: 900;
  padding: 0 0.3rem;
}
.hint {
  font-size: 0.78rem;
  color: var(--dim);
}
.sec-h {
  font: 400 1.05rem var(--head);
  font-style: italic;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--yellow);
  margin: 0.2rem 0 0.4rem;
}
.tag-call {
  display: inline-flex;
  gap: 0.35rem;
  align-items: center;
  font: 800 0.68rem var(--sans);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--yellow);
}
.foot {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.5rem 0.9rem 0.7rem;
  position: relative;
  z-index: 2;
}
.foot .bio,
.foot .hint {
  flex: 1;
}
.backdrop {
  position: fixed;
  inset: 0;
  background: #05030bd0;
  display: grid;
  grid-template: minmax(0, 1fr) / minmax(0, 1fr);
  place-items: center;
  padding: calc(var(--sat) + 0.75rem) calc(var(--sar) + 0.75rem) calc(var(--sab) + 0.75rem) calc(var(--sal) + 0.75rem);
  animation: fade 0.15s;
}
@keyframes fade {
  from {
    opacity: 0;
  }
}
.dlg {
  background:
    linear-gradient(
      180deg,
      #26226a,
      var(--bg1));
  border: 3px solid var(--yellow);
  border-radius: 0.9rem;
  box-shadow: 0 6px 0 var(--ink), 0 1.5rem 3rem #000a;
  padding: 1rem 1.1rem;
  width: min(100%, 30rem);
  max-height: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  animation: pop-in 0.18s ease-out;
  min-height: 0;
}
@keyframes pop-in {
  from {
    transform: scale(0.92);
    opacity: 0;
  }
}
.modal-title {
  font: 400 1.4rem var(--head);
  font-style: italic;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--yellow);
}
.modal-body {
  overflow: auto;
  min-height: 0;
  line-height: 1.45;
  display: grid;
  gap: 0.6rem;
}
.modal-body h3 {
  font: 400 1rem var(--head);
  color: var(--cyan);
  text-transform: uppercase;
  margin: 0.3rem 0 0.2rem;
}
.modal-body ol {
  margin: 0;
  padding-left: 1.2rem;
  display: grid;
  gap: 0.25rem;
}
.modal-actions {
  display: flex;
  gap: 0.6rem;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.portrait,
.backdrop-art {
  position: relative;
}
.portrait {
  width: 100%;
  height: 100%;
}
.portrait .art-svg {
  width: 100%;
  height: 100%;
  display: block;
}
.portrait .art-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: 50% 100%;
  pointer-events: none;
}
.portrait.has-art .art-svg {
  opacity: 0;
}
.backdrop-art {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
}
.backdrop-art .bg-svg {
  width: 100%;
  height: 100%;
  display: block;
}
.backdrop-art .art-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.backdrop-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      180deg,
      #0a091855 0%,
      #0a091800 35%,
      #0a0918aa 100%);
}
.title {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.title-bg {
  position: absolute;
  inset: 0;
}
.title-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      60% 55% at 50% 45%,
      #0a091800 0%,
      #0a0918d0 80%),
    linear-gradient(
      180deg,
      #0a091899,
      #0a0918cc);
}
.title-key {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.9;
}
.title-inner {
  position: relative;
  display: grid;
  gap: 0.8rem;
  justify-items: center;
  padding: 1rem;
  width: min(100%, 30rem);
  max-height: 100%;
  z-index: 2;
}
.logo {
  display: grid;
  justify-items: center;
  gap: 0.1rem;
}
.logo-ico {
  color: var(--red);
  width: 2.6rem;
  height: 2.6rem;
  filter: drop-shadow(0 0 0.8rem var(--red));
  animation: siren 1s infinite alternate;
}
.logo-ico .ico {
  width: 100%;
  height: 100%;
}
@keyframes siren {
  from {
    filter: drop-shadow(0 0 0.2rem var(--red));
  }
  to {
    filter: drop-shadow(0 0 1.1rem var(--red));
    color: #ff8a96;
  }
}
.logo h1 {
  display: grid;
  text-align: center;
  font: 400 clamp(2.6rem, 9vw, 4.8rem)/0.92 var(--head);
  letter-spacing: 0.03em;
  font-style: italic;
  text-transform: uppercase;
  transform: rotate(-3deg);
}
.logo .l1 {
  color: var(--yellow);
  -webkit-text-stroke: 2px var(--ink);
  text-shadow: 4px 4px 0 var(--ink), 0 0 1.2rem #ffd84a66;
}
.logo .l2 {
  color: #fff;
  -webkit-text-stroke: 2px var(--ink);
  text-shadow: 4px 4px 0 var(--red), 7px 7px 0 var(--ink);
  font-size: 0.78em;
}
.tagline {
  color: var(--text);
  text-align: center;
  font-size: 0.95rem;
  max-width: 24rem;
  text-shadow: 0 2px 0 var(--ink);
}
.menu {
  display: grid;
  gap: 0.5rem;
  width: min(100%, 19rem);
}
.menu-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}
.menu-row .btn {
  padding-inline: 0.4rem;
  font-size: 0.85rem;
}
.title-cast {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 24%;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 0.2rem;
  pointer-events: none;
  opacity: 0.85;
  z-index: 1;
}
.cast-fig {
  width: min(16vw, 8rem);
  height: 100%;
}
@media (max-height: 520px) {
  .title-cast {
    display: none;
  }
}
.select,
.roster,
.rewards {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background:
    linear-gradient(
      180deg,
      #1b1946,
      var(--bg0));
}
.pick-count {
  font: 800 0.9rem var(--sans);
  color: var(--yellow);
  white-space: nowrap;
}
.tiles {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr));
  grid-auto-rows: min-content;
  gap: 0.6rem;
  padding: 0.3rem 0.8rem;
  align-content: start;
  overflow: auto;
}
.htile {
  --ec: #aaa;
  position: relative;
  display: grid;
  grid-template-columns: 4.6rem minmax(0, 1fr);
  gap: 0.6rem;
  text-align: left;
  align-items: stretch;
  background:
    linear-gradient(
      160deg,
      #26226a,
      var(--bg1));
  border: 2px solid var(--line);
  border-radius: 0.8rem;
  padding: 0.45rem;
  min-height: 6.2rem;
  box-shadow: 0 3px 0 var(--ink);
}
.htile:hover {
  border-color: var(--ec);
}
.htile.sel {
  border-color: var(--yellow);
  background:
    linear-gradient(
      160deg,
      #4a3f10,
      var(--bg2));
  box-shadow: 0 0 0 3px #ffd84a66, 0 3px 0 var(--ink);
}
.htile.sel::after {
  content: "\2713";
  position: absolute;
  top: 0.2rem;
  right: 0.4rem;
  color: var(--yellow);
  font-weight: 900;
  font-size: 1.2rem;
}
.htile-art {
  width: 4.6rem;
  min-height: 5rem;
  border-radius: 0.5rem;
  background:
    radial-gradient(
      circle at 50% 40%,
      color-mix(in srgb, var(--ec) 35%, transparent),
      transparent 70%);
}
.htile-info {
  display: grid;
  gap: 0.15rem;
  align-content: center;
  min-width: 0;
}
.htile-name {
  font: 400 1.15rem var(--head);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-style: italic;
}
.htile-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.stats {
  display: flex;
  gap: 0.6rem;
  font-size: 0.72rem;
  color: var(--dim);
}
.stats b {
  color: var(--text);
}
.spec-line {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--cyan);
}
.elem {
  --ec: #aaa;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.68rem;
  color: var(--ec);
  width: fit-content;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.elem b {
  font-weight: 800;
}
.elem .ico {
  width: 0.95rem;
  height: 0.95rem;
}
.bio {
  color: var(--dim);
  font-size: 0.82rem;
  line-height: 1.35;
  min-height: 2.2rem;
}
.bar {
  flex: none;
  position: relative;
  height: 0.85rem;
  background: #0007;
  border: 2px solid var(--ink);
  border-radius: 0.5rem;
  overflow: hidden;
  min-width: 0;
}
.bar i {
  position: absolute;
  inset: 0 auto 0 0;
  background:
    linear-gradient(
      180deg,
      #79f08e,
      #2fb350);
  transition: width 0.35s;
}
.bar.foe-hp i {
  background:
    linear-gradient(
      180deg,
      #ff6a78,
      #c01b30);
}
.bar span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font: 800 0.62rem/1 var(--mono);
  color: #fff;
  text-shadow: 0 1px 0 #000, 1px 0 0 #000;
}
.pips {
  flex: none;
  display: flex;
  gap: 0.2rem;
}
.pips i {
  flex: 1;
  height: 0.4rem;
  border-radius: 0.2rem;
  background: #0007;
  border: 1px solid #ffffff22;
}
.pips i.on {
  background:
    linear-gradient(
      180deg,
      #ffe566,
      #ff9d1a);
  border-color: #fff0;
  box-shadow: 0 0 0.4rem #ffd84a99;
}
.map {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background:
    linear-gradient(
      180deg,
      #15133a,
      var(--bg0));
}
.map .lbl {
  display: inline;
}
.citymap {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: auto;
  margin: 0.2rem 0.8rem;
  border: 2px solid var(--line);
  border-radius: 0.9rem;
  background:
    radial-gradient(
      80% 60% at 50% 20%,
      #2c2670aa,
      #0e0d2acc),
    repeating-linear-gradient(
      90deg,
      #ffffff06 0 1px,
      transparent 1px 3rem);
  box-shadow: inset 0 0 3rem #000a;
}
.map[data-district=harbor] .citymap {
  background:
    radial-gradient(
      80% 60% at 50% 20%,
      #1b4a7caa,
      #07152acc),
    repeating-linear-gradient(
      90deg,
      #ffffff06 0 1px,
      transparent 1px 3rem);
}
.map[data-district=old-quarter] .citymap {
  background:
    radial-gradient(
      80% 60% at 50% 20%,
      #6a4a1caa,
      #241508cc),
    repeating-linear-gradient(
      90deg,
      #ffffff06 0 1px,
      transparent 1px 3rem);
}
.map-grid,
.map-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.map-lines path {
  fill: none;
  stroke: #ffd84a55;
  stroke-width: 3;
  stroke-dasharray: 6 6;
}
.map-lines path.done {
  stroke: var(--green);
  stroke-dasharray: none;
}
.node {
  --nc: var(--line);
  position: absolute;
  transform: translate(-50%, -50%);
  width: 3.4rem;
  height: 3.4rem;
  border-radius: 50%;
  border: 3px solid var(--nc);
  background:
    radial-gradient(
      circle at 35% 30%,
      color-mix(in srgb, var(--nc) 40%, #26226a),
      #14123a);
  display: grid;
  place-items: center;
  padding: 0;
  box-shadow: 0 3px 0 var(--ink);
  color: #fff;
}
.node .node-ico {
  width: 1.6rem;
  height: 1.6rem;
}
.node .node-label {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  display: grid;
  justify-items: center;
  width: 8.5rem;
  pointer-events: none;
  margin-top: 0.1rem;
  line-height: 1.1;
  text-shadow:
    0 1px 0 var(--ink),
    0 0 4px var(--ink),
    0 0 6px var(--ink);
}
.node .node-label b {
  font: 800 0.72rem var(--sans);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.node .node-label small {
  font-size: 0.62rem;
  color: #fff;
  opacity: 0.8;
}
.node:disabled {
  opacity: 0.55;
  filter: saturate(0.6);
}
.node.done {
  --nc: var(--green);
  opacity: 0.9;
}
.node.can {
  animation: node-pulse 1.3s infinite alternate;
  opacity: 1;
  filter: none;
}
.node.can:hover {
  transform: translate(-50%, -50%) scale(1.08);
}
@keyframes node-pulse {
  from {
    box-shadow: 0 3px 0 var(--ink), 0 0 0 0 color-mix(in srgb, var(--nc) 70%, transparent);
  }
  to {
    box-shadow: 0 3px 0 var(--ink), 0 0 0 0.6rem transparent;
  }
}
.n-attack {
  --nc: var(--red);
}
.n-crime {
  --nc: var(--orange);
}
.n-aftermath {
  --nc: #8fa6ff;
}
.n-elite {
  --nc: var(--pink);
}
.n-hq {
  --nc: var(--green);
}
.n-boss {
  --nc: #ff2d5e;
}
.node.boss {
  width: 4.8rem;
  height: 4.8rem;
}
.node.boss .node-face {
  position: absolute;
  inset: 0.15rem;
  border-radius: 50%;
  overflow: hidden;
}
.node.boss .node-label {
  top: 100%;
}
.team-strip {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.9rem 0.5rem;
  flex: 0 0 auto;
}
.mini {
  position: relative;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 0.5rem;
  border: 2px solid var(--line);
  background: #0007;
  overflow: hidden;
}
.mini.down {
  filter: grayscale(1);
  opacity: 0.55;
}
.mini-art {
  position: absolute;
  inset: 0 0 0.3rem 0;
}
.mini-hp {
  position: absolute;
  left: 0.15rem;
  right: 0.15rem;
  bottom: 0.15rem;
  height: 0.22rem;
  background: #000a;
  border-radius: 0.2rem;
  overflow: hidden;
}
.mini-hp b {
  display: block;
  height: 100%;
  background: var(--green);
}
.team-strip .hint {
  margin-left: auto;
}
.briefing,
.aftermath,
.hq,
.bossintro,
.results {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
}
.briefing-inner,
.scene-inner,
.res-inner {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 0.7rem;
  padding: 0.8rem;
  max-height: 100%;
  min-height: 0;
  width: min(100%, 52rem);
  margin: 0 auto;
}
.briefing-inner {
  grid-template-columns: minmax(0, 1fr) 9rem;
  align-items: end;
}
.radio {
  display: grid;
  gap: 0.6rem;
  align-content: start;
}
.radio-head {
  display: flex;
  gap: 0.7rem;
  align-items: center;
}
.radio-head h1,
.scene h1,
.res-title {
  font: 400 1.8rem/1 var(--head);
  font-style: italic;
  text-transform: uppercase;
  text-shadow: 2px 2px 0 var(--ink);
}
.dot {
  width: 3.6rem;
  height: 3.6rem;
  flex: none;
}
.radio-text,
.scene-text {
  font-size: 1.02rem;
  line-height: 1.45;
  min-height: 4.4rem;
}
.radio-foot {
  display: flex;
  justify-content: flex-end;
}
.suspect {
  display: grid;
  gap: 0.1rem;
  justify-items: center;
  text-align: center;
  background: #0a0918cc;
  border: 2px solid var(--red);
  border-radius: 0.8rem;
  padding: 0.4rem;
  box-shadow: 0 3px 0 var(--ink);
}
.suspect-art {
  width: 100%;
  height: 8rem;
}
.suspect b {
  font: 400 1rem var(--head);
  text-transform: uppercase;
}
.scene {
  display: grid;
  gap: 0.4rem;
}
.choices {
  display: grid;
  gap: 0.5rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
}
.choice {
  align-items: flex-start;
  text-align: left;
  padding: 0.6rem 0.9rem;
}
.choice span {
  font-size: 1.15rem;
}
.hq-team {
  display: flex;
  gap: 0.4rem;
  justify-content: center;
  flex-wrap: wrap;
}
.hq-hero {
  width: 4.6rem;
  display: grid;
  gap: 0.2rem;
  justify-items: center;
  font-size: 0.7rem;
}
.hq-art {
  width: 100%;
  height: 3.6rem;
}
.hq-hero .bar {
  width: 100%;
  height: 0.7rem;
}
.hq-hero .bar span {
  display: none;
}
.bossintro {
  justify-content: center;
}
.boss-vignette {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(
      70% 70% at 50% 40%,
      transparent 0%,
      #1a0008dd 100%);
  animation: throb 2s infinite alternate;
}
@keyframes throb {
  to {
    opacity: 0.75;
  }
}
.boss-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 1rem;
  align-items: center;
  padding: 1rem 1.5rem;
  max-height: 100%;
  min-height: 0;
}
.boss-art {
  height: min(60vh, 26rem);
  animation: boss-in 0.9s ease-out;
  filter: drop-shadow(0 0 1.6rem #ff2d5e);
}
@keyframes boss-in {
  from {
    transform: scale(1.5) translateY(2rem);
    opacity: 0;
  }
}
.boss-copy {
  display: grid;
  gap: 0.5rem;
  justify-items: start;
}
.boss-kicker {
  color: var(--red);
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.boss-name {
  font: 400 clamp(2.4rem, 7vw, 4.6rem)/0.95 var(--head);
  font-style: italic;
  text-transform: uppercase;
  color: #fff;
  -webkit-text-stroke: 2px var(--ink);
  text-shadow: 4px 4px 0 var(--red), 7px 7px 0 var(--ink);
}
.boss-title {
  font: 400 1.3rem var(--head);
  text-transform: uppercase;
  color: var(--yellow);
  letter-spacing: 0.06em;
}
.boss-line {
  font-size: 1.05rem;
  font-style: italic;
}
.results .res-inner {
  align-self: center;
  margin-block: auto;
  justify-items: center;
  text-align: center;
  background: #12112fe6;
}
.results.won .res-title {
  color: var(--yellow);
}
.results.lost .res-title {
  color: var(--red);
}
.res-team {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  justify-content: center;
}
.res-hero {
  width: 3.6rem;
  display: grid;
  justify-items: center;
}
.res-hero.down {
  filter: grayscale(1);
  opacity: 0.6;
}
.res-art {
  width: 100%;
  height: 3.6rem;
}
.res-stats {
  display: flex;
  gap: 1.2rem;
  flex-wrap: wrap;
  justify-content: center;
}
.res-stat {
  display: grid;
}
.res-stat b {
  font: 400 1.6rem var(--head);
  color: var(--yellow);
}
.res-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  justify-content: center;
}
.reward-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 0.2rem 0.9rem;
  display: grid;
  gap: 0.6rem;
  align-content: start;
}
.reward-cards {
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
  justify-content: center;
}
.reward-recruits {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
  gap: 0.6rem;
}
.swap-list {
  display: grid;
  gap: 0.4rem;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
}
.swap-btn {
  justify-content: flex-start;
  text-align: left;
}
.swap-art {
  width: 2.4rem;
  height: 2.4rem;
  flex: none;
}
.swap-btn span:last-child {
  display: grid;
}
.roster-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 0 0.9rem 0.8rem;
}
.roster-body .tiles {
  padding: 0;
  overflow: visible;
  flex: none;
}
.deck-cards {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.card .count {
  position: absolute;
  right: 0.25rem;
  top: 0.2rem;
  z-index: 2;
  font: 800 0.8rem var(--mono);
  color: var(--yellow);
  font-style: normal;
  text-shadow: 1px 1px 0 var(--ink);
}
.card {
  --cc: var(--cyan);
  position: relative;
  width: 7rem;
  height: 9.2rem;
  flex: none;
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  justify-items: center;
  align-items: center;
  gap: 0.15rem;
  padding: 0.55rem 0.4rem 0.4rem;
  border-radius: 0.7rem;
  border: 3px solid var(--cc);
  background:
    linear-gradient(
      170deg,
      color-mix(in srgb, var(--cc) 30%, #1e1b52),
      #11102e 70%);
  box-shadow: 0 4px 0 var(--ink);
  text-align: center;
}
.card:hover:not(:disabled) {
  transform: translateY(-0.2rem);
}
.card.sel {
  border-color: var(--yellow);
  box-shadow: 0 0 0 3px #ffd84a88, 0 6px 0 var(--ink);
  transform: translateY(-0.45rem);
}
.card-cost {
  position: absolute;
  top: -0.5rem;
  left: -0.5rem;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 50%;
  background:
    radial-gradient(
      circle at 35% 30%,
      #ffe566,
      #e89500);
  color: #2b1a00;
  border: 2px solid var(--ink);
  display: grid;
  place-items: center;
  font: 400 1.05rem var(--head);
}
.card-ico {
  width: 2.4rem;
  height: 2.4rem;
  color: var(--cc);
  filter: drop-shadow(0 2px 0 var(--ink));
}
.card-name {
  font: 400 1rem var(--head);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.card-desc {
  font-size: 0.62rem;
  line-height: 1.15;
  color: var(--text);
  opacity: 0.85;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.t-unleash {
  --cc: var(--orange);
}
.t-combo {
  --cc: var(--pink);
}
.t-strike {
  --cc: var(--red);
}
.t-guard {
  --cc: var(--cyan);
}
.t-heal {
  --cc: var(--green);
}
.t-rally {
  --cc: var(--yellow);
}
.t-cleanse {
  --cc: #b9a3ff;
}
.t-swap {
  --cc: #9fb3c8;
}
.settings {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  background:
    linear-gradient(
      180deg,
      #1b1946,
      var(--bg0));
}
.settings-body {
  flex: 1;
  margin: 0.2rem 0.8rem 0.8rem;
  display: grid;
  gap: 0.2rem;
  align-content: start;
}
.set-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem 0.2rem;
  border-bottom: 1px solid #ffffff14;
  min-height: 3.2rem;
}
.set-row > div:first-child {
  display: grid;
  min-width: 0;
}
.toggle {
  position: relative;
  width: 3.4rem;
  height: 2.75rem;
  flex: none;
  background: none;
  border: 0;
  padding: 0;
}
.toggle::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1.6rem;
  transform: translateY(-50%);
  background: #0008;
  border: 2px solid var(--line);
  border-radius: 1rem;
}
.toggle i {
  position: absolute;
  top: 50%;
  left: 0.25rem;
  width: 1.3rem;
  height: 1.3rem;
  transform: translateY(-50%);
  border-radius: 50%;
  background: var(--dim);
  transition: left 0.15s;
}
.toggle[aria-checked=true]::before {
  background: #1f5a2c;
  border-color: var(--green);
}
.toggle[aria-checked=true] i {
  left: 1.95rem;
  background: var(--green);
}
.range {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.range input {
  width: 9rem;
  min-height: 2.75rem;
  accent-color: var(--yellow);
}
.range output {
  min-width: 2.6rem;
  text-align: right;
  font: 700 0.8rem var(--mono);
}
.battle {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  min-height: 0;
  overflow: clip;
}
.battle > * {
  position: relative;
  z-index: 1;
}
.battle > .backdrop-art {
  position: absolute;
  z-index: 0;
}
.bt-top {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  padding: 0.35rem 0.75rem;
  background:
    linear-gradient(
      180deg,
      #04030ccc,
      #04030c00);
}
.bt-where {
  display: grid;
  line-height: 1.1;
  min-width: 0;
  flex: 1;
}
.bt-where b {
  font: 400 1.25rem var(--head);
  font-style: italic;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-shadow: 2px 2px 0 var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bt-where small {
  color: var(--yellow);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.bt-piles {
  display: grid;
  text-align: right;
  line-height: 1.1;
}
.bt-piles small {
  font-size: 0.62rem;
}
.energy {
  display: flex;
  gap: 0.25rem;
  padding: 0.2rem 0.4rem;
  background: #0009;
  border: 2px solid var(--ink);
  border-radius: 2rem;
}
.energy i {
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #1a1844;
  border: 2px solid #3b3690;
  color: #3b3690;
}
.energy i.on {
  background:
    radial-gradient(
      circle at 35% 30%,
      #fff6a8,
      #ffb400);
  border-color: #fff2a8;
  color: #5a3300;
  box-shadow: 0 0 0.7rem #ffd84acc;
}
.energy .ico {
  width: 1rem;
  height: 1rem;
}
.end-turn {
  flex-direction: row;
}
.end-turn.pulse {
  animation: end-pulse 0.9s infinite alternate;
}
@keyframes end-pulse {
  to {
    box-shadow: 0 3px 0 var(--ink), 0 0 1.2rem #ffd84a;
    transform: scale(1.04);
  }
}
.twist {
  flex: 1 0 100%;
  font-size: 0.78rem;
  color: var(--orange);
  font-weight: 700;
}
.bt-stage {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0.5rem;
  align-items: stretch;
  padding: 0.2rem 0.75rem;
  min-height: 0;
}
.field,
.foes {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  align-items: flex-end;
  min-height: 0;
  min-width: 0;
}
.field {
  order: 1;
}
.foes {
  order: 2;
}
.bt-where small {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.slot-empty {
  flex: 1 1 0;
  max-width: 9.5rem;
  height: 60%;
  min-height: 3rem;
  border: 2px dashed #ffffff33;
  border-radius: 0.8rem;
  display: grid;
  place-items: center;
  align-content: center;
  text-align: center;
  color: var(--dim);
}
.hero-panel,
.foe {
  --ec: #9ab;
  position: relative;
  flex: 1 1 0;
  max-width: 10rem;
  min-width: 0;
  height: 100%;
  max-height: 21rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.hp-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  gap: 0.2rem;
  background:
    linear-gradient(
      180deg,
      #1d1a4acc,
      #0e0d2acc);
  border: 3px solid var(--ec);
  border-radius: 0.8rem;
  padding: 0.3rem;
  text-align: center;
  box-shadow: 0 4px 0 var(--ink);
  position: relative;
}
.hp-art,
.foe-art {
  flex: 1;
  min-height: 0;
}
.hp-name,
.foe-name {
  font: 400 0.95rem var(--head);
  font-style: italic;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hero-panel.targetable .hp-body {
  animation: target-pulse 0.8s infinite alternate;
  border-color: var(--yellow);
  cursor: pointer;
}
@keyframes target-pulse {
  to {
    box-shadow: 0 0 1rem #ffd84acc, 0 4px 0 var(--ink);
  }
}
.hero-panel.first .hp-body {
  border-color: var(--pink);
  box-shadow: 0 0 1rem #ff4fd0aa, 0 4px 0 var(--ink);
  animation: none;
}
.hero-panel.drop-hover .hp-body {
  transform: scale(1.05);
  border-color: #fff;
  box-shadow: 0 0 1.4rem #fff, 0 4px 0 var(--ink);
}
.hero-panel.charged .hp-body::after {
  content: "READY";
  position: absolute;
  top: -0.55rem;
  right: -0.2rem;
  background: var(--yellow);
  color: #2b1a00;
  font: 400 0.7rem var(--head);
  padding: 0.05rem 0.4rem;
  border-radius: 0.3rem;
  border: 2px solid var(--ink);
  transform: rotate(6deg);
}
.shield-chip,
.status-chip {
  position: absolute;
  top: 0.2rem;
  left: 0.2rem;
  display: inline-flex;
  align-items: center;
  gap: 0.1rem;
  background: #0b3a66;
  border: 2px solid var(--cyan);
  color: #fff;
  border-radius: 0.5rem;
  font: 800 0.7rem var(--mono);
  padding: 0 0.3rem;
}
.status-chip {
  left: auto;
  right: 0.2rem;
  background: #4a0f3a;
  border-color: var(--pink);
}
.specials {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(2.75rem, 1fr));
  gap: 0.25rem;
}
.sp-n {
  font: 400 0.8rem var(--head);
  color: var(--yellow);
}
.special.ready .sp-n,
.special.choose .sp-n {
  color: #2b1a00;
}
.special {
  min-height: 2.75rem;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  padding: 0.15rem 0.3rem;
  font: 800 0.66rem/1.05 var(--sans);
  background: #1a1844;
  border: 2px solid var(--line);
  border-radius: 0.5rem;
  box-shadow: 0 3px 0 var(--ink);
  text-align: center;
}
.special span {
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.special:disabled {
  opacity: 0.55;
}
.special .sp-ico {
  width: 0.95rem;
  height: 0.95rem;
}
.special.ready,
.special.choose {
  background:
    linear-gradient(
      180deg,
      #ffe566,
      #f0a800);
  color: #231600;
  border-color: #fff2a8;
  opacity: 1;
  animation: target-pulse 0.7s infinite alternate;
}
.foe-art {
  filter: drop-shadow(0 4px 0 #0008);
}
.foe {
  background:
    linear-gradient(
      180deg,
      #2a0f20cc,
      #14081099);
  border: 3px solid #ff5a3c;
  border-radius: 0.8rem;
  padding: 0.3rem;
  text-align: center;
  box-shadow: 0 4px 0 var(--ink);
  gap: 0.15rem;
}
.foe.boss {
  border-color: #ff2d5e;
  max-width: 14rem;
  box-shadow: 0 0 1.4rem #ff2d5e77, 0 4px 0 var(--ink);
}
.foe.defeated {
  opacity: 0.35;
  filter: grayscale(1);
}
.foe.defeated .foe-art {
  transform: rotate(-8deg) translateY(0.5rem);
}
.foe.charging {
  animation: charge-shake 0.2s infinite alternate;
}
@keyframes charge-shake {
  to {
    transform: translateX(2px);
  }
}
.foe-atk {
  font: 700 0.6rem var(--mono);
}
.intent {
  align-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  min-width: 2.75rem;
  min-height: 2.75rem;
  padding: 0.1rem 0.6rem;
  border-radius: 1.4rem;
  background: #2b0b16;
  border: 3px solid var(--red);
  color: #fff;
  font: 400 1.15rem var(--head);
  box-shadow: 0 3px 0 var(--ink);
}
.intent .intent-ico {
  width: 1.3rem;
  height: 1.3rem;
}
.i-buff,
.i-summon {
  border-color: var(--orange);
}
.i-curse {
  border-color: var(--pink);
}
.i-charge {
  border-color: var(--yellow);
  animation: end-pulse 0.7s infinite alternate;
}
.foe .tip {
  position: absolute;
  z-index: 20;
  left: 50%;
  bottom: 0.4rem;
  transform: translateX(-50%);
  width: 12rem;
  max-width: 90vw;
  display: none;
  gap: 0.15rem;
  text-align: left;
  background: #0b0a1af2;
  border: 2px solid var(--yellow);
  border-radius: 0.6rem;
  padding: 0.4rem 0.55rem;
  font-size: 0.74rem;
  box-shadow: 0 4px 0 var(--ink);
  pointer-events: none;
}
.foe.open .tip,
.foe:hover .tip,
.foe:focus-within .tip {
  display: grid;
}
.foe .tip b {
  color: var(--yellow);
}
.bt-hands {
  display: grid;
  grid-template-columns: minmax(0, 28rem) minmax(0, 1fr);
  gap: 0.7rem;
  padding: 0.35rem 0.75rem 0.5rem;
  align-items: end;
  background:
    linear-gradient(
      0deg,
      #04030ccc 40%,
      #04030c00);
}
.hero-hand {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.3rem;
  align-content: end;
}
.hchip {
  --ec: #aaa;
  position: relative;
  display: grid;
  grid-template-columns: 2.1rem minmax(0, 1fr);
  align-items: center;
  gap: 0.25rem;
  min-height: 3.1rem;
  padding: 0.15rem 0.35rem 0.15rem 0.2rem;
  background:
    linear-gradient(
      180deg,
      #26226a,
      #14123a);
  border: 2px solid var(--ec);
  border-radius: 0.6rem;
  box-shadow: 0 3px 0 var(--ink);
  text-align: left;
}
.hchip-art {
  width: 2.1rem;
  height: 2.4rem;
}
.hchip-name {
  font: 400 0.82rem var(--head);
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.03em;
}
.hchip-cost {
  position: absolute;
  top: -0.45rem;
  right: -0.3rem;
  min-width: 1.35rem;
  height: 1.35rem;
  border-radius: 50%;
  background:
    radial-gradient(
      circle at 35% 30%,
      #ffe566,
      #e89500);
  color: #2b1a00;
  border: 2px solid var(--ink);
  display: grid;
  place-items: center;
  font: 400 0.85rem var(--head);
  font-style: normal;
}
.hchip-cost .ico {
  width: 0.8rem;
  height: 0.8rem;
}
.hchip.can {
  animation: chip-pulse 1.2s infinite alternate;
}
@keyframes chip-pulse {
  to {
    box-shadow: 0 3px 0 var(--ink), 0 0 0.9rem var(--ec);
  }
}
.hchip.onfield {
  opacity: 0.55;
}
.hchip.down {
  opacity: 0.4;
  filter: grayscale(1);
}
.hchip[aria-disabled=true]:not(.onfield):not(.down) {
  opacity: 0.7;
}
.battle-hand .card {
  flex: 0 1 auto;
  min-width: 0;
}
.battle-hand {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  align-items: flex-end;
  min-width: 0;
}
.bcard {
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.bcard.poor {
  opacity: 0.5;
  filter: saturate(0.4);
}
.bcard.lifted {
  opacity: 0.35;
}
.drag-ghost {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 95;
  pointer-events: none;
  margin: 0;
  opacity: 0.95;
  box-shadow: 0 1rem 1.6rem #000a;
}
.bt-hint {
  padding: 0.15rem 0.9rem 0.35rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--yellow);
  text-align: center;
  background: #04030ccc;
  min-height: 1.6rem;
  text-shadow: 0 1px 0 var(--ink);
}
.bubbles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 30 !important;
}
.bubble {
  position: absolute;
  padding: 0.35rem 0.6rem;
  font: 700 0.78rem/1.2 var(--sans);
  background: #fff;
  color: #11102e;
  border: 3px solid var(--ink);
  border-radius: 0.9rem;
  box-shadow: 0 3px 0 var(--ink);
  animation: bubble-in 0.2s ease-out;
  text-align: center;
}
.bubble::after {
  content: "";
  position: absolute;
  top: 100%;
  left: var(--tail, 50%);
  margin-left: -0.5rem;
  border: 0.5rem solid transparent;
  border-top-color: var(--ink);
}
.bubble::before {
  content: "";
  position: absolute;
  top: calc(100% - 3px);
  left: var(--tail, 50%);
  margin-left: -0.35rem;
  border: 0.35rem solid transparent;
  border-top-color: #fff;
  z-index: 1;
}
.bubble.say-foe {
  background: #2a0a1c;
  color: #ffd0d6;
  border-color: #ff3a4e;
}
.bubble.say-foe::before {
  border-top-color: #2a0a1c;
}
@keyframes bubble-in {
  from {
    transform: scale(0.6) translateY(0.5rem);
    opacity: 0;
  }
}
.banners {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 31 !important;
  display: grid;
  place-items: center;
}
.banner {
  grid-area: 1 / 1;
  font: 400 clamp(1.5rem, 6vw, 3.6rem)/1 var(--head);
  font-style: italic;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #fff;
  -webkit-text-stroke: 2px var(--ink);
  text-shadow: 3px 3px 0 var(--ink);
  padding: 0.3rem 1.2rem;
  background:
    linear-gradient(
      90deg,
      transparent,
      #000b 15%,
      #000b 85%,
      transparent);
  animation: banner 1.1s ease-out forwards;
  text-align: center;
  max-width: 100%;
}
.banner.big {
  animation-duration: 1.5s;
  font-size: clamp(2rem, 8vw, 5rem);
}
.banner.combo {
  color: var(--pink);
}
.banner.summon {
  color: var(--cyan);
}
.banner.win {
  color: var(--yellow);
}
.banner.down,
.banner.boss {
  color: var(--red);
}
.banner.turn {
  font-size: 1.4rem;
  color: var(--yellow);
}
.banner.special {
  color: var(--orange);
  font-size: clamp(1.2rem, 4.4vw, 2.4rem);
}
@keyframes banner {
  0% {
    transform: scale(2.2) rotate(-6deg);
    opacity: 0;
  }
  14% {
    transform: scale(1) rotate(-3deg);
    opacity: 1;
  }
  80% {
    transform: scale(1.04) rotate(-3deg);
    opacity: 1;
  }
  100% {
    transform: scale(1) rotate(-3deg) translateY(-1rem);
    opacity: 0;
  }
}
.floater {
  position: absolute;
  left: 0;
  top: 0;
  font: 400 2rem var(--head);
  color: #fff;
  -webkit-text-stroke: 2px var(--ink);
  text-shadow: 2px 2px 0 var(--ink);
  pointer-events: none;
  will-change: transform, opacity;
  margin: -1rem 0 0 -1rem;
}
.floater.dmg {
  color: var(--yellow);
  font-size: 2.3rem;
}
.floater.foe {
  color: #ff6a78;
}
.floater.good {
  color: var(--green);
}
.floater.shield {
  color: var(--cyan);
}
.floater.combo {
  color: var(--pink);
}
.zap-p {
  position: absolute;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
}
.summon-ring {
  position: absolute;
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  border: 0.4rem solid var(--ec);
  transform: translate(-50%, -50%);
  animation: ring 0.8s ease-out forwards;
  box-shadow: 0 0 2rem var(--ec), inset 0 0 2rem var(--ec);
}
@keyframes ring {
  to {
    width: 22rem;
    height: 22rem;
    opacity: 0;
    border-width: 0.05rem;
  }
}
.hero-panel.summon .hp-body {
  animation: summon 0.85s ease-out;
}
@keyframes summon {
  0% {
    transform: translateY(-6rem) scale(1.8);
    opacity: 0;
    filter: brightness(4);
  }
  55% {
    transform: translateY(0) scale(0.92);
    opacity: 1;
    filter: brightness(2);
  }
  75% {
    transform: scale(1.08);
  }
  100% {
    transform: none;
    filter: none;
  }
}
.hit {
  animation: hit-shake 0.36s;
}
@keyframes hit-shake {
  0%, 100% {
    transform: none;
    filter: none;
  }
  20% {
    transform: translateX(-0.4rem) rotate(-2deg);
    filter: brightness(2.2) saturate(0.3);
  }
  50% {
    transform: translateX(0.4rem);
  }
  80% {
    transform: translateX(-0.15rem);
  }
}
.surge .hp-body {
  animation: surge 0.7s;
}
@keyframes surge {
  40% {
    transform: scale(1.1);
    filter: brightness(1.8);
  }
}
.pulse-up .hp-body {
  animation: surge 0.5s;
}
.foe.acting {
  animation: lunge 0.5s;
}
@keyframes lunge {
  40% {
    transform: translateX(-1.2rem) scale(1.06);
  }
}
[data-high-contrast=true] .btn,
[data-high-contrast=true] .card,
[data-high-contrast=true] .hchip,
[data-high-contrast=true] .special,
[data-high-contrast=true] .node {
  border-color: #fff;
}
[data-reduced-motion=true] *,
[data-reduced-motion=true] *::before,
[data-reduced-motion=true] *::after {
  animation-duration: 0.001s !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.001s !important;
}
@media (orientation: portrait) and (max-width: 700px) {
  .topbar-title {
    font-size: 1.15rem;
  }
  .map .lbl {
    display: none;
  }
  .htile {
    grid-template-columns: 3.8rem minmax(0, 1fr);
    min-height: 5.4rem;
  }
  .htile-art {
    width: 3.8rem;
    min-height: 4.4rem;
  }
  .briefing-inner {
    grid-template-columns: 1fr;
  }
  .suspect {
    grid-template-columns: 4.5rem 1fr;
    justify-items: start;
    text-align: left;
    align-items: center;
    gap: 0 0.5rem;
  }
  .suspect-art {
    grid-row: 1 / 4;
    height: 4.6rem;
  }
  .boss-inner {
    grid-template-columns: 1fr;
    padding: 0.6rem;
    gap: 0.3rem;
    justify-items: center;
    text-align: center;
  }
  .boss-copy {
    justify-items: center;
  }
  .boss-art {
    height: 32vh;
  }
  .menu-row .btn span {
    font-size: 0.8rem;
  }
  .node .node-label {
    width: 6.5rem;
  }
  .node .node-label b {
    font-size: 0.66rem;
  }
  .bt-top {
    gap: 0.4rem;
    padding: 0.3rem 0.5rem;
  }
  .bt-piles {
    display: none;
  }
  .bt-where b {
    font-size: 1.05rem;
  }
  .energy i {
    width: 1.45rem;
    height: 1.45rem;
  }
  .end-turn kbd {
    display: none;
  }
  .end-turn {
    padding-inline: 0.7rem;
  }
  .bt-stage {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 0.85fr) minmax(0, 1.15fr);
    padding: 0.1rem 0.4rem;
    gap: 0.3rem;
  }
  .foes {
    order: 1;
  }
  .field {
    order: 2;
  }
  .hero-panel,
  .foe {
    max-height: none;
    min-height: 0;
  }
  .foe-atk {
    display: none;
  }
  .slot-empty {
    height: 100%;
  }
  .hp-name,
  .foe-name {
    font-size: 0.8rem;
  }
  .foe-art,
  .hp-art {
    min-height: 1.6rem;
  }
  .bar {
    height: 0.7rem;
  }
  .bar span {
    font-size: 0.56rem;
  }
  .bt-hands {
    grid-template-columns: 1fr;
    gap: 0.25rem;
    padding: 0.25rem 0.4rem 0.3rem;
  }
  .hchip {
    grid-template-columns: 1.7rem minmax(0, 1fr);
    min-height: 2.75rem;
    padding-right: 0.2rem;
  }
  .hchip-art {
    width: 1.7rem;
    height: 2rem;
  }
  .hchip-name {
    font-size: 0.68rem;
  }
  .card {
    width: 4.5rem;
    height: 6.3rem;
    padding: 0.4rem 0.2rem 0.25rem;
    gap: 0.05rem;
  }
  .battle-hand {
    gap: 0.3rem;
  }
  .card-ico {
    width: 1.7rem;
    height: 1.7rem;
  }
  .card-name {
    font-size: 0.78rem;
  }
  .card-desc {
    display: none;
  }
  .card-cost {
    width: 1.4rem;
    height: 1.4rem;
    font-size: 0.9rem;
    top: -0.4rem;
    left: -0.35rem;
  }
  .bt-hint {
    font-size: 0.7rem;
    min-height: 1.3rem;
    padding: 0.1rem 0.4rem 0.2rem;
  }
  .foe .intent {
    position: absolute;
    top: 0.3rem;
    right: 0.3rem;
    z-index: 2;
  }
  .foe .tip {
    bottom: 0.4rem;
  }
  .battle-hand .card {
    flex: 1 1 0;
    min-width: 0;
    max-width: 4.5rem;
  }
}
@media (orientation: landscape) and (max-height: 520px) {
  .topbar {
    padding: 0.2rem 0.6rem;
  }
  .topbar-title {
    font-size: 1.1rem;
  }
  .logo h1 {
    font-size: clamp(1.8rem, 9vh, 3rem);
  }
  .title-inner {
    gap: 0.35rem;
    padding: 0.4rem;
  }
  .logo-ico {
    display: none;
  }
  .tagline {
    display: none;
  }
  .menu {
    grid-template-columns: 1fr 1fr;
    width: min(100%, 26rem);
  }
  .menu-row {
    grid-column: 1 / -1;
  }
  .menu .btn.big {
    min-height: 2.9rem;
  }
  .tiles {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 14rem), 1fr));
    gap: 0.4rem;
  }
  .htile {
    min-height: 4.6rem;
    grid-template-columns: 3.2rem minmax(0, 1fr);
    padding: 0.3rem;
  }
  .htile-art {
    width: 3.2rem;
    min-height: 3.6rem;
  }
  .htile .stats {
    gap: 0.4rem;
  }
  .foot {
    padding: 0.3rem 0.8rem 0.4rem;
  }
  .bio {
    min-height: 0;
    font-size: 0.74rem;
  }
  .briefing-inner,
  .scene-inner,
  .res-inner {
    padding: 0.4rem;
    gap: 0.4rem;
  }
  .radio-head h1,
  .scene h1,
  .res-title {
    font-size: 1.3rem;
  }
  .radio-text,
  .scene-text {
    min-height: 0;
    font-size: 0.9rem;
    line-height: 1.3;
  }
  .suspect-art {
    height: 4.6rem;
  }
  .briefing-inner {
    grid-template-columns: minmax(0, 1fr) 7rem;
  }
  .dot {
    width: 2.6rem;
    height: 2.6rem;
  }
  .boss-art {
    height: 54vh;
  }
  .boss-inner {
    padding: 0.5rem 1rem;
  }
  .boss-line {
    font-size: 0.9rem;
  }
  .boss-intro {
    display: none;
  }
  .choice span {
    font-size: 1rem;
  }
  .hq-art {
    height: 2.4rem;
  }
  .hq-hero {
    width: 3.6rem;
  }
  .res-art,
  .res-hero {
    height: 2.6rem;
  }
  .res-hero {
    width: 3rem;
  }
  .card {
    width: 5rem;
    height: 5.6rem;
    padding: 0.35rem 0.2rem 0.25rem;
    gap: 0;
  }
  .card-ico {
    width: 1.5rem;
    height: 1.5rem;
  }
  .card-desc {
    display: none;
  }
  .card-name {
    font-size: 0.78rem;
  }
  .map .citymap {
    margin: 0.1rem 0.6rem;
  }
  .node {
    width: 2.9rem;
    height: 2.9rem;
  }
  .node.boss {
    width: 3.6rem;
    height: 3.6rem;
  }
  .node .node-label {
    width: 7rem;
  }
  .team-strip {
    padding: 0.2rem 0.6rem 0.3rem;
  }
  .mini {
    width: 2.2rem;
    height: 2.2rem;
  }
  .battle {
    grid-template-rows: auto minmax(0, 1fr) auto;
  }
  .bt-top {
    gap: 0.4rem;
    padding: 0.2rem 0.5rem;
  }
  .bt-piles {
    display: none;
  }
  .bt-where b {
    font-size: 1rem;
  }
  .energy i {
    width: 1.4rem;
    height: 1.4rem;
  }
  .end-turn {
    padding-inline: 0.7rem;
  }
  .twist {
    display: none;
  }
  .bt-stage {
    padding: 0.1rem 0.5rem;
    gap: 0.4rem;
  }
  .hero-panel,
  .foe {
    max-height: none;
    height: auto;
    align-self: flex-end;
    max-width: 11rem;
  }
  .hero-panel {
    flex-direction: column;
  }
  .hp-body {
    flex-direction: row;
    flex-wrap: wrap;
    align-content: center;
    align-items: center;
    padding: 0.2rem;
    gap: 0.1rem 0.25rem;
  }
  .hp-art {
    flex: 0 0 2.6rem;
    height: 2.6rem;
    min-height: 0;
  }
  .hp-name {
    flex: 1;
    min-width: 0;
    font-size: 0.78rem;
    text-align: left;
  }
  .hp-body .bar,
  .hp-body .pips {
    flex: 1 0 100%;
  }
  .bar {
    height: 0.62rem;
  }
  .bar span {
    font-size: 0.5rem;
  }
  .foe {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    padding: 0.2rem;
    gap: 0.1rem 0.25rem;
  }
  .foe-art {
    flex: 0 0 2.8rem;
    height: 2.8rem;
    min-height: 0;
  }
  .foe-name {
    flex: 1;
    min-width: 0;
    font-size: 0.78rem;
    text-align: left;
  }
  .foe .bar {
    flex: 1 0 100%;
  }
  .foe-atk {
    display: none;
  }
  .intent {
    flex: 1 0 auto;
    min-height: 2.75rem;
  }
  .foe .tip {
    bottom: auto;
    top: 100%;
  }
  .bt-hands {
    grid-template-columns: minmax(0, 17rem) minmax(0, 1fr);
    gap: 0.4rem;
    padding: 0.2rem 0.5rem 0.3rem;
  }
  .hchip {
    grid-template-columns: 1.6rem minmax(0, 1fr);
    min-height: 2.75rem;
    padding: 0.1rem 0.15rem;
  }
  .hchip-art {
    width: 1.6rem;
    height: 1.9rem;
  }
  .hchip-name {
    font-size: 0.62rem;
  }
  .battle-hand {
    gap: 0.3rem;
  }
  .bt-hint {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 2.9rem;
    max-width: 56%;
    padding: 0.15rem 0.6rem;
    border-radius: 1rem;
    font-size: 0.66rem;
    min-height: 0;
    z-index: 3;
    pointer-events: none;
    background: #04030cd9;
  }
  .banner {
    font-size: clamp(1.2rem, 8vh, 2.6rem);
  }
}
@media (max-height: 360px) and (orientation: landscape) {
  .card {
    width: 4.4rem;
    height: 5rem;
  }
  .card-ico {
    width: 1.2rem;
    height: 1.2rem;
  }
  .hp-art {
    flex-basis: 2.2rem;
    height: 2.2rem;
  }
  .foe-art {
    flex-basis: 2.2rem;
    height: 2.2rem;
  }
}
@media (min-width: 701px) and (min-height: 521px) and (max-height: 760px) {
  .card {
    width: 6.2rem;
    height: 8.2rem;
  }
  .card-desc {
    font-size: 0.58rem;
  }
  .hero-panel,
  .foe {
    max-height: 17rem;
  }
}
.card.has-art {
  overflow: hidden;
  background: #0c0b22;
}
.card-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.card.has-art > *:not(.card-art) {
  position: relative;
  z-index: 1;
}
.card.has-art .card-cost {
  position: absolute;
}
.card.has-art .card-ico {
  display: none;
}
.card.has-art .card-name {
  align-self: end;
  background:
    linear-gradient(
      90deg,
      transparent,
      #04030ccc 20%,
      #04030ccc 80%,
      transparent);
  width: 100%;
  text-shadow: 1px 1px 0 var(--ink);
}
.card.has-art .card-desc {
  background: #04030cd0;
  border-radius: 0.3rem;
  padding: 0.1rem 0.2rem;
}
.k-strike,
.k-sweep,
.k-curtain {
  --cc: var(--red);
}
.k-guard,
.k-wall {
  --cc: var(--cyan);
}
.k-heal,
.k-triage,
.k-rescue {
  --cc: var(--green);
}
.k-rally,
.k-inspire,
.k-overload {
  --cc: var(--yellow);
}
.k-cleanse {
  --cc: #b9a3ff;
}
.k-swap,
.k-callup {
  --cc: #9fb3c8;
}
.k-unleash {
  --cc: var(--orange);
}
.k-combo {
  --cc: var(--pink);
}
.k-mark {
  --cc: #ff7ab0;
}
.k-plan {
  --cc: #6ee7d8;
}
.r-rare {
  box-shadow: 0 0 0.8rem #ffd84a88, 0 4px 0 var(--ink);
}
.tags {
  display: inline-flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.sts {
  display: inline-flex;
  gap: 0.2rem;
  flex-wrap: wrap;
  justify-content: center;
}
.st {
  font: 800 0.55rem var(--mono);
  padding: 0 0.25rem;
  border-radius: 0.3rem;
  background: #0009;
  border: 1px solid #ffffff44;
  text-transform: uppercase;
}
.st-burn,
.st-bleed,
.st-weak,
.st-vulnerable {
  border-color: var(--red);
  color: #ffb0b8;
}
.st-strength,
.st-inspire,
.st-taunt {
  border-color: var(--yellow);
  color: var(--yellow);
}
.st-stun {
  border-color: var(--pink);
  color: var(--pink);
}
.hero-panel.threatened .hp-body {
  border-color: var(--red);
  box-shadow: 0 0 1rem #ff3a4eaa, 0 4px 0 var(--ink);
}
.hero-panel.threatened .hp-body::before {
  content: attr(data-threat);
  position: absolute;
  top: -0.6rem;
  left: -0.3rem;
  z-index: 3;
  background: var(--red);
  color: #fff;
  border: 2px solid var(--ink);
  border-radius: 0.5rem;
  font: 400 0.8rem var(--head);
  padding: 0 0.35rem;
}
.hero-panel.targetable.is-ally .hp-body,
.hchip.targetable {
  border-color: var(--yellow);
}
.hchip.targetable {
  animation: chip-pulse 0.6s infinite alternate;
  opacity: 1 !important;
}
.foe.targetable {
  cursor: pointer;
  animation: target-pulse 0.8s infinite alternate;
  border-color: var(--yellow);
}
.twist-bar {
  display: grid;
  gap: 0.1rem;
  min-width: 8rem;
  flex: 1;
  max-width: 16rem;
}
.twist-bar small {
  color: var(--orange);
  font-weight: 800;
}
.deck-list {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.upg {
  display: grid;
  gap: 0.2rem;
  text-align: left;
  padding: 0.5rem 0.7rem;
  height: auto;
  align-items: start;
}
.upg small {
  color: var(--text);
}
.upg b {
  color: var(--yellow);
}
.loot-gear {
  width: 7rem;
  height: 9.2rem;
  justify-content: center;
}
.citymap {
  display: block;
}
.citymap-in {
  position: relative;
  width: 100%;
  height: max(100%, calc(var(--floors) * 6.2rem));
}
@media (min-width: 701px) and (min-height: 521px) {
  .specials {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }
  .special {
    justify-content: flex-start;
    padding-inline: 0.4rem;
    gap: 0.35rem;
  }
  .special .sp-name {
    font-size: 0.7rem;
    -webkit-line-clamp: 1;
  }
}
@media (max-width: 700px), (max-height: 520px) {
  .special .sp-name {
    display: none;
  }
  .special .sp-n {
    font-size: 1rem;
  }
}
