@font-face { font-family: 'Chakra Petch'; font-weight: 600; font-style: normal; font-display: swap; src: url(ChakraPetch-SemiBold.49fbe9af20.woff2) format('woff2'); }
@font-face { font-family: 'Cinzel'; font-weight: 700; font-style: normal; font-display: swap; src: url(Cinzel-Bold.8efa224fe7.woff2) format('woff2'); }

/* ───── ui/style.css ───── */
/* TUMULT v2.0 — styles. Deep-sea ink palette; system fonts only (offline-safe). */
:root {
  color-scheme: dark;
  --ink: #080c16;
  --ink2: #0d1322;
  --panel: #121a2c;
  --panel2: #0f1626;
  --line: #223049;
  --line2: #2f4160;
  --txt: #e3eaf4;
  --dim: #8b98ad;
  --mute: #5f6c80;
  --cyan: #5ec8d8;
  --gold: #f2c14e;
  --rose: #e56a8f;
  --green: #7fd08a;
  --amber: #e0a83a;
  --violet: #a97df0;
  --M: #e0533d;
  --C: #f2c14e;
  --S: #5ec8d8;
  --T: #b07cf0;
  --O: #eef3f8;
  --AP: #97a6ba;
  --hero: #5ec8d8;
  --enemy: #e56a8f;
  --decoy: #a9b4c4;
  --serif: Georgia, 'Times New Roman', serif;
  --sans: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --mono: Consolas, 'Courier New', monospace;
  --r: 10px;
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  padding: 0;
  background:
    radial-gradient(1200px 700px at 80% -10%, #152238, transparent 60%),
    radial-gradient(900px 600px at -10% 110%, #1b1326, transparent 55%), var(--ink);
  color: var(--txt);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.35;
  /* One screen high, measured from the page rather than the viewport (100vh overflows when a host
     pads the page or a phone's bars come and go). #app scrolls inside it. */
  height: 100%;
}
button {
  font-family: inherit;
  font-size: 13px;
  color: var(--txt);
  background: var(--panel);
  border: 1px solid var(--line2);
  border-radius: 8px;
  padding: 7px 12px;
  cursor: pointer;
  transition:
    transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1),
    background 0.2s,
    border-color 0.2s,
    box-shadow 0.2s,
    color 0.2s;
}
button:hover:not(:disabled) {
  background: #16203a;
  border-color: var(--cyan);
  box-shadow: 0 6px 18px -8px rgba(0, 212, 255, 0.55);
  transform: translateY(-1px);
}
button:active:not(:disabled) {
  transform: translateY(0);
}
button:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}
button.primary {
  background: linear-gradient(180deg, #1f7f93, #146273);
  border-color: #2fb9d6;
  color: #fff;
  font-weight: 600;
}
button.primary:hover:not(:disabled) {
  background: linear-gradient(180deg, #26a0b8, #187a8f);
}
button.danger {
  border-color: var(--rose);
}
button.ghost {
  background: transparent;
  border-color: transparent;
  color: var(--dim);
}
button.ghost:hover:not(:disabled) {
  border-color: var(--line2);
  color: var(--txt);
}
button.sm {
  padding: 4px 8px;
  font-size: 12px;
  border-radius: 6px;
}
h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 700;
  margin: 0 0 6px;
}
h1 {
  font-size: 40px;
  line-height: 1;
  letter-spacing: 0.02em;
}
h2 {
  font-size: 22px;
}
h3 {
  font-size: 16px;
}
.kick {
  letter-spacing: 0.35em;
  text-transform: uppercase;
  font-size: 10.5px;
  color: var(--gold);
}
.dim {
  color: var(--dim);
}
.mute {
  color: var(--mute);
}
.small {
  font-size: 12px;
}
.mono {
  font-family: var(--mono);
}
.row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.col {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.grow {
  flex: 1;
}
.right {
  margin-left: auto;
}
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 12px;
}
.panel.tight {
  padding: 8px 10px;
}
.wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 16px;
}
.center {
  text-align: center;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--line2);
  font-size: 11.5px;
  background: var(--panel2);
}
.tag {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.03em;
}
.el-M {
  color: var(--M);
}
.el-C {
  color: var(--C);
}
.el-S {
  color: var(--S);
}
.el-T {
  color: var(--T);
}
.el-O {
  color: var(--O);
}
.bg-M {
  background: rgba(224, 83, 61, 0.18);
  border-color: var(--M);
}
.bg-C {
  background: rgba(242, 193, 78, 0.18);
  border-color: var(--C);
}
.bg-S {
  background: rgba(94, 200, 216, 0.18);
  border-color: var(--S);
}
.bg-T {
  background: rgba(176, 124, 240, 0.18);
  border-color: var(--T);
}
hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 10px 0;
}
#app {
  height: 100%;
  overflow: auto;
}
.toast {
  position: fixed;
  left: 50%;
  top: calc(14px + env(safe-area-inset-top, 0px));
  transform: translateX(-50%);
  background: #1b2742;
  border: 1px solid var(--cyan);
  padding: 8px 14px;
  border-radius: 8px;
  z-index: 50;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
  animation: fadein 0.2s;
}
@keyframes fadein {
  from {
    opacity: 0;
    transform: translate(-50%, -6px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}
.modal-bg {
  position: fixed;
  inset: 0;
  background: rgba(3, 6, 12, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 40;
  padding: 16px;
}
.modal {
  background: var(--panel);
  border: 1px solid var(--line2);
  border-radius: 14px;
  padding: 18px;
  max-width: 720px;
  width: 100%;
  max-height: 92vh;
  overflow: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

/* ---------- Title ---------- */
.title {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 30px 16px;
}
.title h1 {
  font-size: 72px;
  background: linear-gradient(180deg, #eaf6fa, #5ec8d8 70%, #2a93a6);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: none;
}
.title .sub {
  font-family: var(--serif);
  font-style: italic;
  color: var(--dim);
  font-size: 18px;
  max-width: 560px;
  text-align: center;
}
.title .btns {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 10px;
}
.title .btns button {
  padding: 11px 20px;
  font-size: 15px;
}

.title .tide-pick {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  margin-top: 14px;
  max-width: 520px;
}
.title .tide-pick .mute {
  flex-basis: 100%;
  text-align: center;
}

/* ---------- Draft ---------- */
.species-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px;
}
.sp-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  background: var(--panel2);
  cursor: pointer;
  transition:
    border-color 0.15s,
    transform 0.1s;
}
.sp-card:hover {
  border-color: var(--cyan);
  transform: translateY(-2px);
}
.sp-card.sel {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px var(--gold) inset;
}
.sp-card .ic {
  font-size: 26px;
}
.sp-card b {
  display: block;
  margin-top: 4px;
}
.prebuilt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}
.pack {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 10px;
}
/* the Kit view's loadout (2.107): a reserve trait to bring in, and the traits it could replace */
.kit-pick {
  cursor: pointer;
  border-radius: 10px;
  outline: 2px solid transparent;
  transition: outline-color 0.15s;
}
.kit-pick:hover,
.kit-pick:focus-visible {
  outline-color: var(--line2);
}
.kit-pick.on {
  outline-color: var(--gold, #d9b45a);
}
.kit-pick.dim {
  cursor: default;
  opacity: 0.55;
}
.pack.reserve .tcard {
  filter: saturate(0.8);
}

/* ---------- Trait card ---------- */
.tcard {
  border: 1px solid var(--line2);
  border-radius: 12px;
  background: linear-gradient(180deg, #141d31, #0f1626);
  padding: 10px;
  position: relative;
  transition:
    transform 0.12s,
    box-shadow 0.12s,
    border-color 0.12s;
}
.tcard:hover {
  border-color: var(--cyan);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}
.tcard.pickable {
  cursor: pointer;
}
.tcard.sel {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px var(--gold) inset;
}
.tcard {
  min-width: 0;
}
.tcard .head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 6px;
  margin-bottom: 6px;
}
.tcard .name {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 15px;
}
.tcard .sp {
  font-size: 11px;
  color: var(--dim);
  margin-left: auto;
  white-space: nowrap;
}
.tcard .star {
  color: var(--gold);
  font-size: 12px;
}
.face {
  border-radius: 8px;
  padding: 7px 8px;
  margin-top: 6px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}
.face.P {
  border-left: 3px solid var(--AP);
}
.face.E {
  border-left: 3px solid currentColor;
}
.face .fh {
  display: flex;
  flex-wrap: wrap;
  gap: 3px 6px;
  align-items: center;
  font-size: 12.5px;
}
.face .fn {
  font-weight: 700;
  white-space: nowrap;
}
.face .cost {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 11.5px;
  white-space: nowrap;
}
.face .ft {
  font-size: 12px;
  color: #c6d0dd;
  margin-top: 3px;
}
.face.playable {
  cursor: pointer;
  background: rgba(94, 200, 216, 0.07);
}
.face.playable:hover {
  background: rgba(94, 200, 216, 0.16);
  border-color: var(--cyan);
}
.face.locked {
  opacity: 0.5;
}
.face.asleep {
  opacity: 0.6;
  border-style: dashed;
}
.face .asleep-note {
  color: var(--gold);
  margin-top: 2px;
}
.face .why {
  font-size: 10.5px;
  color: var(--rose);
  margin-top: 2px;
}
.upctl {
  display: flex;
  gap: 6px;
  align-items: center;
  font-family: var(--mono);
  font-size: 12px;
  margin-top: 6px;
}
.upctl button {
  padding: 1px 7px;
  font-size: 12px;
  border-radius: 5px;
}
.flavor {
  font-style: italic;
  color: var(--mute);
  font-size: 11px;
  margin-top: 6px;
  font-family: var(--serif);
}

/* ---------- Map ---------- */
.map {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
.route {
  --gut: 20%;
  position: relative;
  margin-top: 10px;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(180deg, #0a1426, #071020);
  box-shadow: inset 0 0 0 1px rgba(127, 227, 240, 0.1);
}
.leg {
  position: absolute;
  left: 0;
  right: 0;
  overflow: hidden;
}
.leg + .leg {
  border-top: 1px solid rgba(232, 200, 120, 0.22);
}
.leg-art {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 40%;
  opacity: 0.62;
  filter: saturate(0.95);
  transition: opacity 0.4s;
}
/* the painting reads, and the road over it reads too: dark at the edges, darker where the stops stand */
.leg::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      180deg,
      rgba(7, 16, 32, 0.85),
      rgba(7, 16, 32, 0.25) 22%,
      rgba(7, 16, 32, 0.3) 78%,
      rgba(7, 16, 32, 0.85)
    ),
    radial-gradient(ellipse at 50% 50%, rgba(7, 16, 32, 0.15), rgba(7, 16, 32, 0.55) 90%);
  pointer-events: none;
}
.leg.passed .leg-art {
  opacity: 0.32;
  filter: saturate(0.4) sepia(0.3);
}
.leg.finale .leg-art {
  opacity: 0.7;
  filter: saturate(1.1) hue-rotate(-12deg) contrast(1.05);
}
.leg.finale::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: radial-gradient(ellipse at 50% 60%, rgba(255, 92, 138, 0.22), transparent 62%);
  animation: finale-breath 5s ease-in-out infinite;
  pointer-events: none;
}
@keyframes finale-breath {
  50% {
    opacity: 0.45;
  }
}
.leg-head {
  position: absolute;
  z-index: 2;
  left: 14px;
  top: 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-width: calc(var(--gut) - 22px);
  pointer-events: none;
}
.leg-kick {
  font-size: 9px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  opacity: 0.9;
}
.leg .actlabel {
  font-family: var(--serif);
  font-size: 17px;
  letter-spacing: 0.06em;
  color: #f3ead2;
  text-shadow: 0 2px 8px #000;
}
.leg-read {
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1.4;
  color: var(--cyan);
  opacity: 0.8;
  text-shadow: 0 1px 4px #000;
}
.leg.finale .leg-read {
  font-family: var(--flavor, var(--serif));
  font-style: italic;
  font-size: 12px;
  color: #ffd0dc;
}
.currents {
  position: absolute;
  z-index: 3;
  top: 0;
  bottom: 0;
  left: var(--gut);
  width: calc(100% - var(--gut));
  height: 100%;
  pointer-events: none;
}
.cur {
  fill: none;
  stroke: rgba(207, 233, 240, 0.28);
  stroke-width: 2;
  stroke-dasharray: 2 6;
  stroke-linecap: round;
}
.cur.gone {
  stroke: rgba(207, 233, 240, 0.1);
}
.cur.taken {
  stroke: var(--gold);
  stroke-width: 3.5;
  stroke-dasharray: none;
  filter: drop-shadow(0 0 4px rgba(224, 168, 58, 0.7));
}
.cur.open {
  stroke: var(--cyan);
  stroke-width: 3;
  stroke-dasharray: 7 6;
  filter: drop-shadow(0 0 5px rgba(127, 227, 240, 0.6));
  animation: current-flow 1.2s linear infinite;
}
@keyframes current-flow {
  to {
    stroke-dashoffset: -26;
  }
}
.mnode {
  position: absolute;
  z-index: 4;
  transform: translate(-50%, -50%);
  width: 132px;
  text-align: center;
  opacity: 0.88;
  transition:
    transform 0.16s,
    opacity 0.2s,
    filter 0.2s;
}
.mnode .medal {
  --ring: rgba(207, 233, 240, 0.45);
  --fill: #0e1a30;
  position: relative;
  width: 58px;
  height: 58px;
  margin: 0 auto;
  display: grid;
  place-items: center;
  background: var(--ring);
  clip-path: polygon(30% 0, 70% 0, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0 70%, 0 30%);
  color: #cfe9f0;
}
.mnode .medal::before {
  content: '';
  position: absolute;
  inset: 3px;
  background: var(--fill);
  clip-path: inherit;
}
.mnode .medal .plate {
  position: absolute;
  inset: 3px;
  clip-path: polygon(30% 0, 70% 0, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0 70%, 0 30%);
  background-size: cover;
  background-position: center;
  filter: saturate(0.9) brightness(0.92);
}
.mnode .medal .mic {
  position: relative;
  display: grid;
  place-items: center;
}
.mnode .medal .icn {
  width: 26px;
  height: 26px;
}
/* on a painted stop the kind of stop is a small seal in the corner of its painting */
.mnode .medal.painted .mic {
  position: absolute;
  right: 4px;
  bottom: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(7, 16, 32, 0.85);
  box-shadow: 0 0 0 1px var(--ring);
}
.mnode .medal.painted .icn {
  width: 13px;
  height: 13px;
}
.mnode .t {
  margin-top: 5px;
  line-height: 1.25;
  text-shadow:
    0 1px 3px #000,
    0 0 8px #000;
}
.mnode .t .nm {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  color: #f2f5fa;
}
.mnode .t .sub {
  display: block;
  font-size: 9.5px;
  color: #b9c7d8;
  letter-spacing: 0.04em;
}
.mnode .tier {
  font-size: 8px;
  letter-spacing: 2px;
  color: var(--gold);
  margin: 0 3px;
}
.mnode .pull {
  font-family: var(--mono);
  font-size: 9px;
  margin-left: 2px;
}
.pull-up {
  color: #ffb48a;
}
.pull-down {
  color: #9fe4ff;
}
.pull-level {
  color: #b9c7d8;
}
.mnode.far {
  opacity: 0.6;
  filter: saturate(0.55);
}
.mnode.missed {
  opacity: 0.32;
  filter: grayscale(0.8);
}
.mnode.avail {
  opacity: 1;
  cursor: pointer;
}
.mnode.avail .medal {
  --fill: #12344a;
  --ring: var(--cyan);
  color: #fff;
  animation: medal-pulse 1.6s ease-in-out infinite;
}
.mnode.avail .medal .plate {
  filter: saturate(1.1) brightness(1.05);
}
@keyframes medal-pulse {
  50% {
    filter: drop-shadow(0 0 10px var(--cyan)) brightness(1.15);
  }
}
.mnode.avail:hover {
  transform: translate(-50%, -50%) scale(1.1);
  z-index: 6;
}
.mnode.done {
  opacity: 0.95;
}
.mnode.done .medal {
  --fill: #2a2410;
  --ring: #b8913a;
  color: var(--gold);
}
.mnode.done .medal .plate {
  filter: sepia(0.55) saturate(0.7) brightness(0.8);
}
.mnode.current .medal {
  --ring: var(--gold);
}
.mnode.k-elite .medal {
  color: #ffc48a;
}
.mnode.k-haven .medal {
  --fill: #10291c;
  color: #9ff0b4;
}
.mnode.k-event .medal {
  --fill: #1d1736;
  color: #c9b8ff;
}
.mnode.boss .medal {
  width: 84px;
  height: 84px;
  color: var(--rose);
  --ring: var(--rose);
  filter: drop-shadow(0 0 14px rgba(255, 92, 138, 0.55));
}
.mnode.boss .medal .plate {
  filter: saturate(1.15) contrast(1.1) hue-rotate(-10deg);
}
.mnode.boss .medal.painted .mic {
  width: 26px;
  height: 26px;
  right: 8px;
  bottom: 8px;
}
.mnode.boss .medal.painted .icn {
  width: 16px;
  height: 16px;
}
.mnode.boss .t .nm {
  font-family: var(--serif);
  font-size: 14px;
  color: #ffd0dc;
}
/* the stops the squad can reach next, as cards side by side above the route (core.js stopCard): what each asks,
   how long it gives and what stands in the way, so two stops can be compared before choosing */
.choices {
  margin-top: 12px;
}
.choices > .row {
  gap: 10px;
  align-items: baseline;
}
.stopcards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
  margin-top: 8px;
}
.stopcard {
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line2);
  border-radius: 12px;
  background: var(--panel);
  overflow: hidden;
  transition:
    border-color 0.15s,
    transform 0.15s,
    box-shadow 0.15s;
}
.stopcard:hover {
  border-color: var(--cyan);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.4);
}
.stopcard .sc-plate {
  position: absolute;
  inset: 0 0 auto 0;
  height: 96px;
  background-size: cover;
  background-position: center 40%;
  opacity: 0.55;
  -webkit-mask-image: linear-gradient(180deg, #000 30%, transparent);
  mask-image: linear-gradient(180deg, #000 30%, transparent);
  pointer-events: none;
}
.sc-head {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px 6px;
  text-shadow: 0 1px 6px #000;
}
.sc-ic {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 50%;
  background: rgba(7, 16, 32, 0.8);
  border: 1px solid var(--cyan);
  color: #fff;
}
.sc-ic .icn {
  width: 20px;
  height: 20px;
}
.sc-nm {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.sc-nm b {
  font-family: var(--serif);
  font-size: 17px;
}
.sc-nm .tier {
  color: var(--gold);
  letter-spacing: 1px;
}
.sc-body {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 4px 14px 10px;
  flex: 1;
}
.sc-goal {
  display: flex;
  gap: 8px;
  align-items: baseline;
  font-size: 13.5px;
  line-height: 1.4;
}
.sc-verb {
  flex: none;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #0a1426;
  background: var(--cyan);
  cursor: help;
}
.sc-verb.fight {
  background: var(--rose);
}
.sc-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.sc-clock {
  font-size: 13px;
  padding: 2px 9px;
  border-radius: 999px;
  border: 1px solid rgba(242, 193, 78, 0.45);
  color: var(--gold);
  cursor: help;
}
.sc-foes {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  font-size: 12.5px;
}
.sc-foe {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #ffc2d2;
  cursor: help;
}
.sc-foe b {
  color: var(--txt);
}
.sc-more {
  font-size: 11.5px;
  color: var(--rose);
}
.sc-flag {
  font-size: 12px;
  color: #ffc48a;
}
.sc-what {
  font-size: 13px;
  color: var(--dim);
  line-height: 1.45;
}
.stopcard .sc-go {
  margin: 0 14px 12px;
  align-self: flex-start;
  font-size: 13px;
  padding: 6px 16px;
}
.stopcard.k-haven .sc-ic {
  border-color: #9ff0b4;
  color: #9ff0b4;
}
.stopcard.k-event .sc-ic {
  border-color: var(--violet);
}
.stopcard.k-elite .sc-ic,
.stopcard.elite-owed .sc-ic {
  border-color: #ffc48a;
  color: #ffc48a;
}
.stopcard.k-boss .sc-ic {
  border-color: var(--rose);
  color: #ffd0dc;
}
/* the roundel of the stop card under the pointer */
.mnode.hl {
  z-index: 6;
  transform: translate(-50%, -50%) scale(1.15);
}
.mnode.hl .medal {
  filter: drop-shadow(0 0 14px var(--cyan)) brightness(1.2);
}
/* the tooltip of a stop shows the place it is played in */
.tip .tip-plate {
  height: 84px;
  margin: -4px -6px 8px;
  border-radius: 6px;
  background-size: cover;
  background-position: center;
}
/* the squad, standing where it last stopped */
.squad-mark {
  position: absolute;
  z-index: 5;
  display: flex;
  align-items: center;
  transform: translate(-50%, -50%) translateX(-62px);
  pointer-events: none;
  animation: squad-bob 2.6s ease-in-out infinite;
}
.squad-mark .pfp {
  box-shadow:
    0 0 0 2px var(--gold),
    0 4px 10px rgba(0, 0, 0, 0.6);
}
.squad-mark .pfp + .pfp {
  margin-left: -7px;
}
.squad-mark.start {
  transform: translate(-50%, -50%);
  gap: 0;
}
.squad-mark .sm-label {
  margin-left: 8px;
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  text-shadow: 0 1px 4px #000;
}
@keyframes squad-bob {
  50% {
    translate: 0 -3px;
  }
}
/* reduced or no motion (src/ui/sea.js U.motion) */
html.calm .cur.open,
html.calm .mnode.avail .medal,
html.calm .squad-mark,
html.calm .leg.finale::before {
  animation: none;
}

.partybar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
@media (max-width: 700px) {
  .partybar {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 520px) {
  .mnode {
    width: 84px;
  }
  .mnode .medal {
    width: 46px;
    height: 46px;
  }
  .mnode .t .nm {
    font-size: 10px;
  }
  .mnode .t .sub .pull {
    display: none;
  }
  .squad-mark {
    transform: translate(-50%, -50%) translateX(-46px);
  }
  .mnode.boss .medal {
    width: 60px;
    height: 60px;
  }
  .leg.finale .leg-kick {
    display: none;
  }
}
@media (max-width: 760px) {
  .route {
    --gut: 0%;
  }
  .leg-head {
    max-width: none;
    flex-direction: row;
    align-items: baseline;
    gap: 8px;
    top: 4px;
    left: 8px;
  }
  .leg .actlabel {
    font-size: 12px;
  }
  .leg-read {
    display: none;
  }
}
.hpbar {
  height: 8px;
  background: #0a1020;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}
.hpbar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #2fb9d6, #7fd08a);
  transition: width 0.35s;
}
.hpbar.enemy i {
  background: linear-gradient(90deg, #e56a8f, #f2c14e);
}

/* ---------- Mission ---------- */
.mission {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 400px;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 10px;
  height: 100%;
  padding: 10px;
}
.mission .top {
  grid-column: 1/3;
}
.mission .boardwrap {
  grid-column: 1;
  grid-row: 2;
  min-height: 260px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
/* the side column is what changes: the foes' intents, the ally, the log. It scrolls on its own. */
.mission .side {
  grid-column: 2;
  grid-row: 2;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  min-height: 0;
}
.mission .side-in {
  flex: 1;
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.mission .bottom {
  position: relative;
  flex: none;
}
/* the dock is what never moves: the pilot being flown, what they have to spend, their hand and their actions */
.mission .dock {
  grid-column: 1/3;
  grid-row: 3;
  min-width: 0;
}
.dock-hero {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr) 330px;
  gap: 12px;
  align-items: start;
  padding: 10px 12px;
  border-width: 2px;
  background: linear-gradient(180deg, rgba(94, 200, 216, 0.06), transparent 60%), var(--panel);
}
.dock-hero .hand {
  margin-top: 0;
  grid-template-columns: none;
  grid-auto-flow: column;
  grid-auto-columns: minmax(118px, 1fr);
  overflow-x: auto;
  padding: 2px 2px 4px;
}
.dock-hero .fbtn {
  padding: 3px 5px;
}
.dock-hero .hcard .hn {
  font-size: 12.5px;
}
/* a short screen gives the board the room: the cards drop their art */
@media (max-height: 820px) and (min-width: 981px) {
  .dock-hero .hart {
    display: none;
  }
  .dock-hero .dicekey {
    display: none;
  }
}
.dock-hero .hart {
  height: 30px;
  margin-bottom: 3px;
}
.dock-hero .actions {
  margin-top: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
}
.dock-hero .actions button {
  text-align: left;
  padding: 4px 6px;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dock-hero .dicekey {
  margin-top: 6px;
  gap: 2px 8px;
}
.dock-hero .dicekey .dk-sz {
  display: none;
}
@media (max-width: 1400px) and (min-width: 981px) {
  .dock-hero {
    grid-template-columns: 230px minmax(0, 1fr) 250px;
  }
  .dock-hero .actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.dock-hero .hh .nm {
  font-size: 18px;
}
.dock-hero .hp {
  font-size: 15px;
  font-weight: 700;
}
.dk-purse {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}
.res-ap {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  padding: 2px 12px 4px;
  border-radius: 10px;
  border: 1px solid var(--gold);
  background: rgba(242, 193, 78, 0.1);
  color: var(--gold);
  cursor: help;
}
.res-ap b {
  font-family: var(--mono);
  font-size: 34px;
  line-height: 1;
}
.res-ap span {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
}
.res-ap.empty {
  border-color: var(--line2);
  background: none;
  color: var(--mute);
}
.res-els {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.res-el {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--c) 60%, transparent);
  color: var(--c);
  cursor: help;
}
.res-el b {
  font-family: var(--mono);
  font-size: 18px;
  line-height: 1;
}
.res-el .icn {
  width: 16px;
  height: 16px;
}
.dk-purse .pool {
  margin-left: auto;
}
.acost {
  font-family: var(--mono);
  font-weight: 700;
  color: var(--gold);
}
button:disabled .acost {
  color: inherit;
}
/* folding: the log to its last lines, the intents to the forecast, the objective to two lines,
   a pilot not selected to its vitality and dice (U.layout, kept in tumult_v2_ui) */
.fold {
  padding: 0 7px;
  font-size: 11px;
  line-height: 18px;
  margin-left: 6px;
  flex: none;
}
.mission .bottom > .fold {
  position: absolute;
  right: 8px;
  top: 5px;
  z-index: 2;
  background: var(--panel2);
}
.log {
  transition: height 0.2s ease;
}
.log.folded {
  height: 50px;
}
.fold-head {
  cursor: pointer;
}
.intents-panel .fold-head > .dim {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.ap-chip {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 14px;
  color: var(--gold);
  margin-left: 8px;
  white-space: nowrap;
}
.intents-panel.folded .forecast {
  margin-top: 4px;
}
.topbar .tpills {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 5px 6px;
  max-width: 270px;
}
.states:empty {
  display: none;
}
.topbar .obj {
  cursor: pointer;
  min-width: 0;
}
@media (min-width: 1100px) {
  .mission .topbar {
    flex-wrap: nowrap;
  }
  .mission .topbar > * {
    flex-shrink: 0;
  }
  .mission .topbar > .obj {
    flex-shrink: 1;
  }
}
.topbar .obj .obj-txt {
  font-size: 14.5px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.topbar .obj.open .obj-txt {
  display: block;
}
.topbar .obj .obj-bonus {
  margin-top: 2px;
}
.topbar .obj:not(.open) .obj-bonus {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.topbar .obj .obj-prog {
  color: var(--txt);
}
.hero.folded {
  padding: 8px 10px;
  cursor: pointer;
}
.hero.folded:hover {
  border-color: var(--cyan);
}
.hero.folded .hh .pfp {
  transform: scale(0.85);
}
.fold-sum {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 6px;
}
.fold-sum .peek {
  padding: 2px 8px;
  font-size: 11px;
}
.hero.peeking {
  border-style: dashed;
}
@media (max-width: 980px) {
  .mission {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto auto;
    height: auto;
    padding: 12px 16px 0;
  }
  .mission .top {
    grid-column: 1;
  }
  .mission .boardwrap {
    grid-column: 1;
    grid-row: 2;
  }
  .mission .side {
    grid-column: 1;
    grid-row: 3;
  }
  .mission .side-in {
    overflow: visible;
  }
  /* on a narrow screen the dock sticks to the foot of the screen; its hand scrolls sideways inside it */
  .mission .dock {
    grid-column: 1;
    grid-row: 4;
    position: sticky;
    bottom: 0;
    z-index: 20;
    margin: 0 -16px;
  }
  .dock-hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
    max-height: 44vh;
    overflow: auto;
    border-radius: 12px 12px 0 0;
    box-shadow: 0 -10px 24px rgba(0, 0, 0, 0.5);
  }
  .dock-hero .hand {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: 150px;
    overflow-x: auto;
    padding-bottom: 4px;
  }
  .dock-hero .actions {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
  }
  .dock-hero .actions button {
    flex: none;
  }
  .dock-hero .hart,
  .dock-hero .tt,
  .dock-hero .dicekey,
  .dock-hero .states:empty {
    display: none;
  }
}
.topbar {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.topbar .obj {
  flex: 1;
  min-width: 200px;
}
.topbar .obj b {
  font-family: var(--serif);
}
.clock {
  font-family: var(--mono);
  font-size: 17px;
  font-weight: 700;
  padding: 3px 12px;
  border: 1px solid var(--amber);
  border-radius: 8px;
  color: var(--amber);
  background: rgba(224, 168, 58, 0.08);
}
.clock.hot {
  border-color: var(--rose);
  color: var(--rose);
  animation: pulse 1s infinite;
}
@keyframes pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(229, 106, 143, 0.4);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(229, 106, 143, 0);
  }
}
.board {
  flex: 1;
  background: radial-gradient(600px 400px at 50% 50%, #101a2e, #0a1120);
  border: 1px solid var(--line);
  border-radius: 12px;
  position: relative;
  overflow: hidden;
  min-height: 280px;
}
.board svg {
  width: 100%;
  height: 100%;
  display: block;
}
.node {
  cursor: default;
}
.node .ring {
  fill: #0f1930;
  stroke: #2a3a58;
  stroke-width: 1.5;
  transition:
    stroke 0.15s,
    fill 0.15s;
}
.node.height .ring {
  stroke-dasharray: 0;
  stroke: #6f7f9c;
  fill: #182238;
}
.node.hazard .ring {
  fill: #2a1b3a;
  stroke: #7a4a9a;
}
.node.spawn .ring {
  stroke: #e56a8f;
}
.node.valid .ring {
  stroke: var(--gold);
  stroke-width: 3;
  fill: #1e2a1a;
  cursor: pointer;
}
.node.valid:hover .ring {
  fill: #2b3b22;
}
.node.sel .ring {
  stroke: #fff;
  stroke-width: 3;
}
.node text.lbl {
  fill: #5f6c80;
  font-size: 9px;
  font-family: var(--mono);
  pointer-events: none;
}
.edge {
  stroke: #243454;
  stroke-width: 4;
  stroke-linecap: round;
}
.edge.climb {
  stroke: #4d5f82;
  stroke-dasharray: 4 6;
  stroke-width: 3;
}
.edge.ramp {
  stroke: #7fd08a;
}
/* pocket vehicles and big maps (2.101): a path for vehicles only, a space's ground, a vehicle token */
.edge.vpath {
  stroke: #2f5f78;
  stroke-dasharray: 2 7;
  stroke-width: 3;
}
.node .terrain {
  opacity: 0.7;
  pointer-events: none;
}
.node .terrain.t-gap {
  opacity: 0.85;
}
.token.vehicle .body {
  fill: #1d2a40;
  stroke: #c9b37a;
}
.token.vehicle.ridden .body {
  stroke-width: 3;
}
.token.vehicle .hpf.hull {
  fill: #c9b37a;
}
.veh-chip {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  padding: 2px 8px;
  border: 1px solid #c9b37a99;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  color: #f3e7c4;
  background: #16233a;
  opacity: 1;
}
.mission.hud .dk-acts .actions > .veh-chip {
  grid-column: 1 / 3;
  min-height: 30px;
  justify-content: center;
  border-radius: 10px;
}
.tag.mounted {
  border: 1px solid #c9b37a88;
  color: #c9b37a;
}
.zone-glow {
  opacity: 0.08;
}
.token {
  cursor: pointer;
  transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.token .body {
  stroke-width: 2;
}
.token.hero .body {
  fill: #0d3b45;
  stroke: var(--hero);
}
.token.hero.active .body {
  stroke: #fff;
  stroke-width: 3;
  filter: drop-shadow(0 0 8px rgba(94, 200, 216, 0.9));
}
.token.hero.downed .body {
  fill: #1a1a1a;
  stroke: #555;
}
.token.enemy .body {
  fill: #3b0f24;
  stroke: var(--enemy);
}
.token.enemy.elite .body {
  stroke: var(--gold);
}
.token.enemy.boss .body {
  stroke: #fff;
  stroke-width: 3;
}
.token.enemy.hidden {
  opacity: 0.45;
}
.token.enemy.hidden .body {
  stroke-dasharray: 3 3;
}
.token.decoy .body {
  fill: #2a2f3a;
  stroke: var(--decoy);
  stroke-dasharray: 2 3;
}
.token.pet .body {
  fill: #23362b;
  stroke: var(--jade, #5fd39a);
  stroke-width: 2;
}
.token.pet.safe .body {
  stroke-dasharray: 4 2;
  opacity: 0.85;
}
.state.pet.dead {
  opacity: 0.55;
  text-decoration: line-through;
}
.petmark {
  font-size: 0.9em;
}
.token.targetable .body {
  stroke: var(--gold);
  stroke-width: 3;
  filter: drop-shadow(0 0 8px rgba(242, 193, 78, 0.8));
}
.token text {
  font-family: var(--sans);
  font-weight: 700;
  pointer-events: none;
  text-anchor: middle;
}
.token .hp {
  font-size: 9px;
  fill: #dfe7f2;
  font-family: var(--mono);
}
.token .glyph {
  font-size: 16px;
}
.token .initial {
  font-size: 14px;
  fill: #eaf6fa;
}
.hpb {
  fill: #0a1020;
}
.hpf {
  fill: #7fd08a;
}
.hpf.enemy {
  fill: #e56a8f;
}
.shieldb {
  fill: #5ec8d8;
}
.intent-line {
  stroke: var(--rose);
  stroke-width: 2;
  stroke-dasharray: 5 4;
  opacity: 0.8;
  marker-end: url(#arrow);
}
.intent-lbl {
  font-size: 9.5px;
  fill: #ffb3c7;
  font-family: var(--mono);
  paint-order: stroke;
  stroke: #0a1120;
  stroke-width: 3px;
  pointer-events: none;
}
.objmark {
  font-size: 14px;
  pointer-events: none;
}
.trapmark {
  font-size: 12px;
  pointer-events: none;
}
.floater {
  position: absolute;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 16px;
  pointer-events: none;
  animation: float 1.1s ease-out forwards;
  text-shadow: 0 2px 4px #000;
}
.floater.dmg {
  color: #ff7a9a;
}
.floater.heal {
  color: #7fd08a;
}
.floater.block {
  color: #5ec8d8;
  font-size: 13px;
}
.floater.miss {
  color: #aab;
  font-size: 12px;
}
@keyframes float {
  0% {
    opacity: 0;
    transform: translate(-50%, 0) scale(0.8);
  }
  15% {
    opacity: 1;
    transform: translate(-50%, -8px) scale(1.1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -44px) scale(1);
  }
}
.banner {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.banner span {
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 700;
  color: #fff;
  background: rgba(10, 17, 32, 0.85);
  padding: 10px 26px;
  border-radius: 12px;
  border: 1px solid var(--cyan);
  animation: bannerin 1.6s ease-out forwards;
  letter-spacing: 0.04em;
}
@keyframes bannerin {
  0% {
    opacity: 0;
    transform: scale(0.9);
  }
  15% {
    opacity: 1;
    transform: scale(1);
  }
  80% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}
.hint {
  font-size: 12px;
  color: var(--gold);
  padding: 6px 10px;
  border: 1px dashed var(--gold);
  border-radius: 8px;
  background: rgba(242, 193, 78, 0.06);
}
.targeting {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid var(--gold);
  border-radius: 10px;
  background: rgba(242, 193, 78, 0.08);
}

/* hero panel */
.hero {
  border: 1px solid var(--line2);
  border-radius: 12px;
  background: var(--panel);
  padding: 10px;
  position: relative;
}
.hero.active {
  border-color: var(--cyan);
  box-shadow: 0 0 0 1px rgba(94, 200, 216, 0.35) inset;
}
.hero.downed {
  opacity: 0.6;
}
.hero .hh {
  display: flex;
  align-items: center;
  gap: 8px;
}
.hero .hh .nm {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 16px;
}
.hero .hh .tt {
  font-size: 11px;
  color: var(--dim);
  font-style: italic;
}
.hero .hp {
  font-family: var(--mono);
  font-size: 12px;
  margin-left: auto;
}
.states {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-top: 6px;
  min-height: 18px;
}
.state {
  font-size: 10.5px;
  padding: 1px 6px;
  border-radius: 5px;
  background: #1b2740;
  border: 1px solid var(--line2);
  cursor: help;
}
.state.bad {
  border-color: var(--rose);
  color: #ffb3c7;
}
/* the dice, drawn as dice (2.41): each in its own shape (feel.js and core.js U.dieSVG), a d20 an icosahedron,
   a d12 a dodecahedron, a d8 an octahedron, with the face it shows in the middle in its etherion's colour */
.dice {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-top: 8px;
}
.dice .dhand {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 3px;
  min-width: 0;
}
.die {
  --c: var(--AP);
  --r: 0deg;
  position: relative;
  flex: none;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-weight: 700;
  color: var(--c);
  transform: rotate(var(--r));
  transition: transform 0.18s ease;
}
.die .dbody {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.55));
}
.die .dbody .o {
  fill: color-mix(in srgb, var(--c) 16%, #121b2e);
  stroke: color-mix(in srgb, var(--c) 80%, #fff);
  stroke-width: 1.6;
  stroke-linejoin: round;
}
.die .dbody .l {
  fill: none;
  stroke: currentColor;
  stroke-width: 0.9;
  opacity: 0.5;
}
.die .face {
  position: relative;
  font-style: normal;
  line-height: 1;
  margin-top: 2px;
}
.die.d8 .face {
  margin-top: 0;
}
.die .face .icn {
  width: 13px;
  height: 13px;
}
.die .face b {
  font-size: 13px;
  color: #eef3f8;
}
.die.M {
  --c: var(--M);
}
.die.C {
  --c: var(--C);
}
.die.S {
  --c: var(--S);
}
.die.T {
  --c: var(--T);
}
.die.O {
  --c: #f4f7fb;
}
.die.O .dbody .o {
  fill: #2c2a4a;
}
.die.AP2 {
  --c: #dfe7f2;
}
.die.AP2 .face b {
  color: #fff;
  text-shadow: 0 0 6px rgba(255, 255, 255, 0.6);
}
.die.kind .dbody .o {
  stroke-width: 2.2;
}
.dicekey {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin-top: 4px;
}
.dicekey .dk-sz {
  flex-basis: 100%;
  opacity: 0.8;
}
.die.temp .dbody .o {
  stroke-dasharray: 3 2;
}
.die.temp {
  opacity: 0.9;
}
.die.rolled {
  animation: rollin 0.5s ease-out;
}
.die:hover {
  z-index: 2;
  transform: rotate(0deg) scale(1.15);
}
.die.pick {
  cursor: pointer;
}
.die.pick:hover .dbody .o {
  stroke: var(--gold);
}
.die.fresh {
  animation: die-deal 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.3) both;
}
@keyframes die-deal {
  0% {
    transform: translateY(-20px) rotate(-200deg) scale(0.5);
    opacity: 0;
  }
  100% {
    transform: rotate(var(--r)) scale(1);
    opacity: 1;
  }
}
@keyframes rollin {
  0% {
    transform: rotate(-90deg) scale(0.4);
    opacity: 0;
  }
  60% {
    transform: rotate(15deg) scale(1.15);
  }
  100% {
    transform: rotate(var(--r)) scale(1);
    opacity: 1;
  }
}
.pool {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--dim);
  margin-left: auto;
  align-self: center;
  white-space: nowrap;
}
.track {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 3px;
  margin-top: 8px;
}
.tcol {
  min-height: 34px;
  border: 1px dashed var(--line);
  border-radius: 6px;
  padding: 2px;
  font-size: 10px;
  position: relative;
}
.tcol .n {
  position: absolute;
  right: 3px;
  top: 1px;
  color: var(--mute);
  font-family: var(--mono);
  font-size: 9px;
}
.tpill {
  display: block;
  border-radius: 4px;
  padding: 2px 4px;
  margin-top: 10px;
  background: #1b2740;
  border: 1px solid var(--line2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tpill.dur {
  border-color: var(--green);
  color: #bfe9c4;
}
.hand {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-top: 8px;
}
@media (max-width: 1180px) and (min-width: 981px), (max-width: 520px) {
  .hand {
    grid-template-columns: minmax(0, 1fr);
  }
}
/* ability cards (2.41): a playing card each, framed in its etherion's colour, with art showing what its two
   faces do (core.js U.cardArt) above its name and its two faces */
.hcard {
  --c: var(--AP);
  position: relative;
  border: 1px solid color-mix(in srgb, var(--c) 45%, var(--line));
  border-radius: 9px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--c) 7%, transparent), transparent 40%), var(--panel2);
  padding: 4px 6px 6px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 3px 10px rgba(0, 0, 0, 0.35);
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease;
}
.hcard:not(.cooling):hover {
  transform: translateY(-2px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 8px 18px rgba(0, 0, 0, 0.45),
    0 0 14px color-mix(in srgb, var(--c) 22%, transparent);
}
.hart {
  position: relative;
  height: 40px;
  margin: 0 -2px 5px;
  border-radius: 6px;
  overflow: hidden;
  background:
    radial-gradient(60% 120% at 80% 50%, color-mix(in srgb, var(--c) 45%, transparent), transparent 70%),
    linear-gradient(
      112deg,
      #2b3548 0 47%,
      rgba(255, 255, 255, 0.35) 47% 48%,
      color-mix(in srgb, var(--c) 38%, #0d1424) 48% 100%
    );
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.hart i {
  position: absolute;
  font-style: normal;
  line-height: 0;
}
.hart .clade {
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  color: #fff;
  opacity: 0.13;
}
.hart .clade:has(.por) {
  opacity: 0.32;
}
.hart .clade .por {
  border-radius: 50%;
  box-shadow: none;
}
.hart .clade .icn,
.hart .clade .ic-fb {
  width: 54px;
  height: 54px;
  font-size: 40px;
}
.hart .vp {
  left: 14%;
  top: 50%;
  transform: translateY(-50%);
  color: #e6edf6;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.6));
}
.hart .ve {
  right: 14%;
  top: 50%;
  transform: translateY(-50%);
  color: color-mix(in srgb, var(--c) 70%, #fff);
  filter: drop-shadow(0 0 6px var(--c));
}
.hart .vp .icn,
.hart .ve .icn {
  width: 24px;
  height: 24px;
}
.hart.asleep .ve {
  opacity: 0.35;
  filter: grayscale(0.6);
}
.hcard .hn {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 13px;
  display: flex;
  gap: 6px;
  align-items: baseline;
}
.hcard .hn .star {
  color: var(--gold);
  font-size: 10px;
}
.hcard .hn .pe {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--dim);
}
.hcard .back {
  margin-top: 2px;
}
/* a card on the track keeps every word readable; the art and the frame say it is away */
.hcard.cooling {
  border-style: dashed;
  border-color: color-mix(in srgb, var(--c) 30%, var(--line));
  background: var(--panel2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}
.hcard.cooling .artwrap {
  position: relative;
}
.hcard.cooling .hart {
  filter: grayscale(0.75) brightness(0.6);
}
.hcard.cooling .cdband {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  max-width: calc(100% - 8px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--txt);
  background: rgba(8, 12, 20, 0.82);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 9px;
}
.fbtn.cool {
  cursor: default;
  border-style: dashed;
}
.fbtn .fic {
  line-height: 0;
}
.fbtn .fic .icn {
  width: 13px;
  height: 13px;
}
.fbtn {
  display: flex;
  align-items: center;
  gap: 5px;
  width: 100%;
  text-align: left;
  margin-top: 4px;
  padding: 4px 6px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
  font-size: 11.5px;
}
.fbtn {
  flex-wrap: wrap;
}
.fbtn .fwhy {
  flex-basis: 100%;
  font-size: 10px;
  color: var(--dim);
  padding-left: 14px;
}
.fbtn .fcost {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.fbtn.ok {
  border-color: #2fb9d6;
  background: rgba(94, 200, 216, 0.08);
}
.fbtn.ok:hover {
  background: rgba(94, 200, 216, 0.2);
}
.fbtn.E.ok {
  border-color: currentColor;
}
.actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.gearrow {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 6px;
}
.gbtn {
  font-size: 11px;
  padding: 3px 7px;
}
.intents {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.intent {
  display: flex;
  gap: 6px;
  align-items: center;
  font-size: 12px;
  padding: 4px 6px;
  border-radius: 6px;
  background: rgba(229, 106, 143, 0.06);
  border: 1px solid rgba(229, 106, 143, 0.25);
}
.intent .g {
  font-size: 14px;
}
.forecast {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px dashed var(--line2);
  font-size: 12px;
  line-height: 1.5;
}
.fc-bad {
  color: #ffb3c7;
}
.fc-good {
  color: var(--green);
}
.log {
  height: 150px;
  overflow: auto;
  font-size: 12px;
  padding: 8px 10px;
  background: var(--panel2);
  border: 1px solid var(--line);
  border-radius: 10px;
  font-family: var(--sans);
}
.log .l {
  padding: 1px 0;
  border-bottom: 1px dotted #1b2740;
}
.log .sys {
  color: var(--gold);
}
.log .enemy {
  color: #ffb3c7;
}
.log .hero {
  color: #c9e8f0;
}
.log .dm {
  color: var(--dim);
  font-style: italic;
  font-family: var(--serif);
}
.tip {
  position: fixed;
  z-index: 60;
  max-width: 320px;
  background: #0e1626;
  border: 1px solid var(--line2);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
  pointer-events: none;
}
.tip b {
  font-family: var(--serif);
}
.kv {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 10px;
  font-size: 12px;
}
.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px;
}
.bonus {
  display: flex;
  gap: 6px;
  align-items: center;
  font-size: 12.5px;
}
.bonus.ok {
  color: var(--green);
}
.bonus.no {
  color: var(--mute);
}
.codex-nav {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.help p {
  margin: 6px 0;
}
.help kbd {
  background: #1b2740;
  border: 1px solid var(--line2);
  border-radius: 4px;
  padding: 0 5px;
  font-family: var(--mono);
  font-size: 11px;
}
.tutorial {
  position: fixed;
  right: calc(14px + env(safe-area-inset-right, 0px));
  bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  max-width: 340px;
  background: #0e1626;
  border: 1px solid var(--gold);
  border-radius: 12px;
  padding: 12px 14px;
  z-index: 45;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
  font-size: 12.5px;
}
.tutorial b {
  color: var(--gold);
}

/* a reward offer: its card fills the column, so every Take button lines up beneath */
.offer {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.offer > .tcard {
  flex: 1;
}

/* ───────────── keywords (src/ui/keywords.js): one look for a word of art, wherever it appears ───────────── */
.kw {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  padding: 0 4px 0 3px;
  border-radius: 4px;
  font-weight: 600;
  white-space: nowrap;
  cursor: help;
  border-bottom: 1px dotted currentColor;
}
.kw .kw-ic,
.state .kw-ic {
  width: 0.95em;
  height: 0.95em;
  align-self: center;
  margin-right: 1px;
}
.kw-good {
  color: #7fd6a6;
  background: rgba(127, 214, 166, 0.08);
}
.kw-bad {
  color: #f08aa8;
  background: rgba(240, 138, 168, 0.08);
}
.kw-neutral {
  color: #8fd3e6;
  background: rgba(143, 211, 230, 0.08);
}
#mlog .kw {
  background: none;
  padding: 0;
  border-bottom: none;
  font-weight: inherit;
}
.kw-gloss {
  margin-top: 6px;
  padding-top: 5px;
  border-top: 1px solid var(--line);
  font-size: 11.5px;
  display: grid;
  gap: 3px;
}
.kw-gloss .kw {
  border-bottom: none;
}

/* the same icons round the tokens */
.badge circle {
  fill: #0b1222;
  stroke: currentColor;
  stroke-width: 1.4;
}
.badge path {
  fill: currentColor;
}
.badge.kw-good,
.badge.kw-bad,
.badge.kw-neutral {
  background: none;
}
.badge-n {
  font: 700 9px var(--mono);
  fill: #fff;
  paint-order: stroke;
  stroke: #0b1222;
  stroke-width: 2.5px;
}
.badge.ghost {
  animation: pv-pulse 0.9s ease-in-out infinite alternate;
}

/* what a play would do, drawn before it is made */
#preview {
  pointer-events: none;
}
.pv-ring {
  fill: none;
  stroke-width: 2.5;
  stroke-dasharray: 5 4;
  animation: pv-spin 6s linear infinite;
  transform-box: fill-box;
  transform-origin: center;
}
.pv-ring.good {
  stroke: #7fd6a6;
}
.pv-ring.bad {
  stroke: #f08aa8;
}
.pv-ring.neutral {
  stroke: #8fd3e6;
}
.pv-num {
  font: 700 15px var(--mono);
  paint-order: stroke;
  stroke: #0b1222;
  stroke-width: 4px;
}
.pv-num.dmg {
  fill: #ff9db8;
}
.pv-num.heal {
  fill: #8ff0b8;
}
.pv-fell {
  font: 700 30px var(--mono);
  fill: rgba(255, 120, 150, 0.85);
}
.pv-move {
  stroke: #8fd3e6;
  stroke-width: 2;
  stroke-dasharray: 3 4;
}
.pv-ghost {
  fill: rgba(143, 211, 230, 0.12);
  stroke: #8fd3e6;
  stroke-dasharray: 3 3;
}
.pv-line {
  margin-top: 4px;
  font-size: 12px;
}
@keyframes pv-pulse {
  from {
    opacity: 0.55;
  }
  to {
    opacity: 1;
  }
}
@keyframes pv-spin {
  to {
    transform: rotate(360deg);
  }
}
#mtarget {
  position: relative;
}
#mtarget .pv-line {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 6;
  padding: 5px 9px;
  border: 1px solid var(--line2);
  border-radius: 8px;
  background: rgba(10, 16, 30, 0.94);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
  pointer-events: none;
}

/* the story box beside End turn: the two stand together */
.endgrp {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 230px;
}
.endgrp > button {
  width: 100%;
}
.turn-note {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  border: 1px dashed var(--line2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
  transition:
    border-color 0.2s,
    background 0.2s;
}
.turn-note:focus-within {
  border-style: solid;
  border-color: var(--gold);
  background: rgba(224, 168, 58, 0.06);
}
.turn-note.noted {
  border-style: solid;
  border-color: rgba(224, 168, 58, 0.55);
}
.turn-note .tn-ic {
  color: var(--gold);
  font-size: 13px;
}
.turn-note input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--txt);
  font-family: var(--flavor, var(--serif));
  font-style: italic;
  font-size: 13px;
  padding: 5px 0;
}
.log .note {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #fbe6b8;
  font-family: var(--flavor, var(--serif));
  font-style: italic;
}
.log .note .pfp {
  flex: none;
}

/* combos: what the world adds to a play (mission.js combosOf) */
.combo-mark {
  margin-left: 4px;
  color: var(--gold);
  font-size: 11px;
  text-shadow: 0 0 6px rgba(242, 193, 78, 0.8);
  animation: combo-glint 2.4s ease-in-out infinite;
}
@keyframes combo-glint {
  50% {
    opacity: 0.55;
  }
}
#mtarget .pv-combos {
  margin-top: 3px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
}
.pv-combo {
  font-size: 12px;
}
.pv-combo.good {
  color: #f6d98a;
}
.pv-combo.bad {
  color: #ffb3c7;
}
/* reduced or no motion (src/ui/sea.js U.motion) */
html.calm .combo-mark {
  animation: none;
}

.tcard .hart {
  height: 56px;
  margin: 6px 0 8px;
}
.tcard .hart .vp .icn,
.tcard .hart .ve .icn {
  width: 30px;
  height: 30px;
}
.tcard .hart .clade .icn {
  width: 70px;
  height: 70px;
}

.double-note {
  color: var(--gold);
  margin-top: 6px;
}

/* ---------- Mission screen, 2.75: forecast strip, undo, touch previews, a layout that fits any screen ---------- */
/* the forecast: what ending the round now would do, a chip a pilot, always in view under the board */
.mfc:empty {
  display: none;
}
.mfc .forecast {
  margin: 0;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel2);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 13px;
}
.mfc .forecast.preview {
  border-color: var(--cyan);
  background: linear-gradient(90deg, rgba(94, 200, 216, 0.1), transparent 70%), var(--panel2);
}
.fc-lab {
  color: var(--mute);
  margin-right: 2px;
}
.fc-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  padding: 2px 9px;
  border-radius: 999px;
  border: 1px solid var(--line2);
  white-space: nowrap;
}
.fc-chip.bad {
  color: #ffb3c7;
  border-color: rgba(229, 106, 143, 0.5);
  background: rgba(229, 106, 143, 0.08);
}
.fc-chip.good {
  color: var(--green);
  border-color: rgba(127, 208, 138, 0.45);
  background: rgba(127, 208, 138, 0.07);
}
.fc-chip.changed {
  box-shadow: 0 0 0 1px var(--cyan);
}
/* End Round with Undo beside it */
.endrow {
  display: flex;
  gap: 5px;
}
.endrow > .primary {
  flex: 1;
  min-width: 0;
}
.endrow > .undo {
  flex: none;
  padding: 7px 10px;
}
/* a touch screen's first tap on a play: previewed, waiting for the second */
.mission .armed {
  border-color: var(--cyan) !important;
  box-shadow:
    0 0 0 2px var(--cyan),
    0 0 14px rgba(94, 200, 216, 0.4);
}
/* the other pilots, beside the one being flown */
.dk-swaps {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}
.dk-swap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 10px 2px 3px;
  border-radius: 999px;
  font-size: 12px;
}
.dk-swap .pfp {
  width: 22px;
  height: 22px;
}
.dk-swap.downed {
  opacity: 0.6;
}

/* tablets and phones: one column that never runs off the side; the dock is a sheet at the foot */
@media (max-width: 980px) {
  .mission {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }
  /* the hand comes straight after the board and its forecast; what changes (intents, ally, log) follows */
  .mission .dock {
    grid-row: 3;
    position: static;
    margin: 0;
  }
  .mission .side {
    grid-row: 4;
    padding-bottom: 12px;
  }
  .dock-hero {
    max-height: none;
    overflow: visible;
    border-radius: 12px;
    box-shadow: none;
  }
  .mission .board {
    flex: none;
    min-height: 240px;
  }
  /* the hand is swiped: cards snap into place, the page does not move with them */
  .dock-hero .hand {
    grid-auto-columns: 148px;
    scroll-snap-type: x mandatory;
    overscroll-behavior-x: contain;
    scroll-padding: 0 4px;
    -webkit-mask-image: linear-gradient(90deg, #000 92%, transparent);
    mask-image: linear-gradient(90deg, #000 92%, transparent);
  }
  .dock-hero .hand > .hcard {
    scroll-snap-align: start;
  }
  .dock-hero .actions {
    scroll-snap-type: x proximity;
    overscroll-behavior-x: contain;
  }
  .dock-hero .dk-res {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 8px;
    align-items: center;
  }
  .dock-hero .dk-res > * {
    grid-column: 1 / -1;
  }
  .dock-hero .dk-res > .hh {
    grid-column: 1;
  }
  .dock-hero .dk-res > .dk-swaps {
    grid-column: 2;
    grid-row: 1;
    margin-top: 0;
  }
  .dock-hero .dk-res > .dk-purse {
    grid-column: 1;
  }
  .dock-hero .dk-res > .dice {
    grid-column: 2;
    margin: 0;
  }
  .dock-hero .dk-purse {
    margin-top: 0;
  }
  /* the board takes the shape of its map, so a wide map leaves no empty band */
  .mission .board {
    height: auto;
    aspect-ratio: var(--ar, 4 / 3);
    max-height: 62vh;
  }
}
@media (max-width: 700px) {
  .mission {
    padding: 8px 10px 0;
  }
  /* the top bar: name and End Round on the first line, the objective on one line, the rest small */
  .mission .top {
    padding: 8px 10px;
  }
  .mission .topbar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 6px;
    align-items: center;
  }
  .mission .topbar > div:first-child {
    flex: 1 1 0;
    min-width: 0;
  }
  .mission .topbar > div:first-child h3 {
    font-size: 16px;
  }
  .mission .topbar .kick {
    font-size: 10px;
  }
  .mission .topbar > .endgrp {
    order: 1;
    width: auto;
    max-width: 52vw;
  }
  .mission .topbar > .endgrp .turn-note {
    display: none;
  }
  .mission .topbar > .obj {
    order: 2;
    flex: 1 1 100%;
    min-width: 0;
  }
  .mission .topbar > .obj:not(.open) .obj-txt {
    -webkit-line-clamp: 1;
    font-size: 13px;
  }
  .mission .topbar > .tpills {
    order: 3;
    flex: 1 1 100%;
    min-width: 0;
    max-width: none;
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
  }
  /* the screen's own buttons (help, sound, title…) stay, small, at the end of the pill row */
  .mission .topbar > button {
    order: 4;
    flex: none;
    padding: 3px 7px;
    font-size: 11px;
  }
  .mission .topbar .pill {
    font-size: 11px;
    padding: 1px 7px;
  }
  .mission .topbar .clock {
    font-size: 14px;
    padding: 1px 8px;
    white-space: nowrap;
  }
  .mission .endrow > .primary {
    white-space: nowrap;
    padding: 8px 12px;
  }
  .mission .board {
    min-height: 200px;
    max-height: 46vh;
  }
  .mission .topbar .pill,
  .fc-lab {
    white-space: nowrap;
  }
  /* the idle hint is the dock's job on a phone; aiming and previews still show here */
  .mission #mtarget .hint {
    display: none;
  }
  .mfc .forecast {
    flex-wrap: nowrap;
    overflow-x: auto;
    font-size: 12px;
    padding: 5px 8px;
  }
  .dock-hero {
    padding: 8px 10px;
  }
  .dock-hero .hh .pfp {
    width: 34px;
    height: 34px;
  }
  .dock-hero .hh .nm {
    font-size: 16px;
  }
  .dock-hero .dk-purse {
    margin-top: 0;
  }
  .res-ap b {
    font-size: 26px;
  }
  .dock-hero .hand {
    grid-auto-columns: 136px;
  }
  .dock-hero .track {
    display: none;
  }
}
/* fingers, not pointers: every play is at least 40 px tall */
@media (pointer: coarse) {
  .dock-hero .fbtn,
  .dock-hero .actions button,
  .dk-swap,
  .endrow > button {
    min-height: 40px;
  }
}

/* the title screen's line about anonymous play data (src/ui/telemetry.js) */
.privacy-line {
  max-width: 520px;
  text-align: center;
  margin-top: 12px;
}
.privacy-line button {
  text-decoration: underline;
}

/* ---------- Mission screen, 2.76: calmer ---------- */
/* one menu, one conditions chip, the story box on request: the top bar keeps the objective, the clock and End Round */
.mission .endgrp {
  width: auto;
  min-width: 230px;
}
.mission .endrow > .primary {
  white-space: nowrap;
}
.endgrp .endrow > .note-btn,
.endgrp .endrow > .mmenu-btn {
  flex: none;
  padding: 7px 10px;
}
.endgrp .endrow > .on {
  border-color: var(--glow);
}
.endgrp:not(.note-open) .turn-note {
  display: none;
}
.mmenu {
  display: none;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: flex-end;
}
.mmenu.open {
  display: flex;
}
.mmenu button {
  padding: 4px 8px;
  font-size: 12px;
  border-color: var(--line2);
}
.conds {
  display: contents;
}
.conds:not(.open) .conds-list {
  display: none;
}
.conds-list {
  display: contents;
}
.conds-btn {
  cursor: pointer;
  font: inherit;
  font-size: 12px;
}
.clock .rnd {
  margin-left: 6px;
  font-size: 11px;
  opacity: 0.7;
}
/* the enemy plans are a heading and a list: each foe also carries its plan on the board */
.intents-panel .fold-head b {
  font-family: var(--serif);
  letter-spacing: 0.06em;
}
/* the ally is a pill: portrait, name, vitality and dice; click it to fly them */
#mside .hero.folded {
  padding: 6px 10px;
}
#mside .hero.folded .hh .tt,
#mside .hero.folded .states,
#mside .hero.folded .fold-sum > span {
  display: none;
}
#mside .hero.folded .hpbar {
  height: 3px;
  margin-top: 2px !important;
}
#mside .hero.folded .dice {
  margin-top: 4px;
  gap: 4px;
}
#mside .hero.folded .dice .die {
  transform: scale(0.8);
  margin: -2px;
}
#mside .hero.folded {
  position: relative;
}
#mside .hero.folded .dice .pool {
  display: none;
}
#mside .hero.folded .fold-sum {
  position: absolute;
  right: 8px;
  bottom: 6px;
}
/* a card with nothing it can do now folds small; hover or focus brings it back */
.dock-hero .hcard.idle {
  opacity: 0.42;
  transition: opacity 0.15s;
}
.dock-hero .hcard.idle .hart {
  display: none;
}
.dock-hero .hcard.idle:hover,
.dock-hero .hcard.idle:focus-within {
  opacity: 1;
}
/* a face shows its name and cost; why it cannot be played waits in its tip (and on a folded card) */
.dock-hero .hcard:not(.idle) .fwhy {
  display: none;
}
/* four basic actions and More */
.actions .more-btn {
  color: var(--dim);
  border: 1px dashed var(--line2);
}
.actions .more-btn .more-el {
  color: var(--gold);
}
.actions:not(.more-open) .more-acts {
  display: none;
}
.actions .more-acts {
  display: contents;
}
/* the map art stays: a soft dark wash lets the nodes and paths read over it, and each node sits on a halo */
.mission .board::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(120% 100% at 50% 50%, rgba(4, 10, 20, 0.08), rgba(4, 10, 20, 0.5));
  z-index: 0;
}
.mission .board > svg {
  position: relative;
  z-index: 1;
}
.mission .board .node > circle:first-child {
  filter: drop-shadow(0 0 7px rgba(3, 8, 16, 0.85));
}
/* a phone: the story box already waits (2.75), so its ✎ goes too; End Round, Undo and the menu share the row */
@media (max-width: 980px) {
  .mission .topbar > .endgrp {
    min-width: 0;
    max-width: 62vw;
  }
  .endgrp .endrow > .note-btn {
    display: none;
  }
  .endgrp .endrow > .undo,
  .endgrp .endrow > .mmenu-btn {
    padding: 6px 7px;
  }
}
/* the next roll's dice, chosen from the pool (2.82) */
.nextroll {
  --c: var(--AP);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 3px 6px;
  margin-top: 6px;
}
.nextroll .rp-adds {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 3px;
}
.nextroll button.rp-add,
.nextroll button.rp-pick {
  --c: var(--AP);
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 5px;
}
.nextroll svg.dbody {
  width: 20px;
  height: 20px;
  overflow: visible;
}
.nextroll svg.dbody .o {
  fill: color-mix(in srgb, var(--c) 16%, #121b2e);
  stroke: color-mix(in srgb, var(--c) 80%, #fff);
  stroke-width: 2;
}
.nextroll svg.dbody .l {
  fill: none;
  stroke: currentColor;
  stroke-width: 1;
  opacity: 0.5;
}
.nextroll button.rp-pick.banked {
  opacity: 0.5;
}

/* the garage (2.101): each pilot picks a vehicle before a Crossing */
.veh-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 8px;
  margin-top: 8px;
}
.veh-pick.on {
  outline: 2px solid #c9b37a;
}


/* ───── ui/theme.css ───── */
/* ============================================================================
   TUMULT — THEME: the Cosmic Shore look (2.11)
   Loaded after style.css and only overrides it: the deep-sea plate, Chakra
   Petch for display type, chamfered HUD panels with hairline light, and the
   pilots' painted portraits and scenes (src/ui/pilots.js, assets/).
   Etherion hues stay spoken for (design/07): nothing here uses them for chrome.
   ========================================================================== */
:root {
  --ink: #050a14;
  --ink2: #08101e;
  --panel: rgba(14, 24, 42, 0.86);
  --panel2: rgba(10, 18, 33, 0.9);
  --line: #1c2c47;
  --line2: #2a4266;
  --glow: #7fe3f0;
  --cyan: #63d3e2;
  --gold: #f0c35a;
  --serif: 'Chakra Petch', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --flavor: Georgia, 'Times New Roman', serif;
  --sans: 'Segoe UI', system-ui, Roboto, Helvetica, Arial, sans-serif;
  --cut: 10px;
}

html,
body {
  background:
    radial-gradient(1400px 800px at 85% -20%, rgba(38, 92, 132, 0.35), transparent 60%),
    radial-gradient(1000px 700px at -15% 120%, rgba(64, 32, 96, 0.28), transparent 55%),
    linear-gradient(180deg, #060c18, #04070f 70%);
}
/* a faint survey grid, like the Ark's charts */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(99, 211, 226, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99, 211, 226, 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at 50% 40%, #000 30%, transparent 85%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 40%, #000 30%, transparent 85%);
  z-index: 0;
}
#app {
  position: relative;
  z-index: 1;
}

/* ---------- type ---------- */
h1,
h2,
h3,
.kick {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: 0.03em;
}
h2,
h3 {
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
h3 {
  font-size: 14px;
  color: #cfe9f0;
}
.kick {
  letter-spacing: 0.4em;
  color: var(--gold);
}
.title .sub,
[style*='font-style:italic'] {
  font-family: var(--flavor);
}

/* ---------- panels: chamfered plates with a lit edge ---------- */
.panel {
  position: relative;
  background: linear-gradient(180deg, rgba(99, 211, 226, 0.05), transparent 40%), var(--panel);
  border: 1px solid var(--line);
  border-radius: 4px;
  clip-path: polygon(
    var(--cut) 0,
    100% 0,
    100% calc(100% - var(--cut)),
    calc(100% - var(--cut)) 100%,
    0 100%,
    0 var(--cut)
  );
  box-shadow: inset 0 1px 0 rgba(127, 227, 240, 0.08);
  backdrop-filter: blur(6px);
}
.panel::before {
  content: '';
  position: absolute;
  left: var(--cut);
  top: 0;
  width: 46px;
  height: 2px;
  background: linear-gradient(90deg, var(--glow), transparent);
  opacity: 0.7;
}

/* ---------- buttons ---------- */
button {
  border-radius: 3px;
  background: rgba(16, 28, 48, 0.9);
  border-color: var(--line2);
  letter-spacing: 0.02em;
}
button:hover:not(:disabled) {
  background: rgba(24, 44, 72, 0.95);
  border-color: var(--glow);
  box-shadow:
    0 0 0 1px rgba(127, 227, 240, 0.15),
    0 0 18px rgba(99, 211, 226, 0.15);
}
button.primary {
  font-family: var(--serif);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  background: linear-gradient(180deg, #1c8ea3, #0f5c6d);
  border-color: var(--glow);
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
button.primary:hover:not(:disabled) {
  background: linear-gradient(180deg, #27b0c7, #137286);
}
button.ghost {
  background: transparent;
  border-color: transparent;
}

/* ---------- title: a pilot in their world ---------- */
.title-scene {
  position: fixed;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: saturate(0.9);
  animation: drift 40s ease-in-out infinite alternate;
  z-index: 0;
}
.title-veil {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 45%, rgba(4, 8, 16, 0.55), rgba(4, 8, 16, 0.92) 75%),
    linear-gradient(180deg, rgba(4, 8, 16, 0.2), rgba(4, 8, 16, 0.85));
  z-index: 0;
}
.title-cap {
  position: fixed;
  right: 18px;
  bottom: 14px;
  z-index: 2;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(220, 236, 244, 0.6);
}
.title-cap b {
  font-family: var(--serif);
  color: rgba(240, 248, 252, 0.85);
}
.title {
  position: relative;
  z-index: 1;
}
.title h1 {
  font-family: var(--serif);
  font-size: 92px;
  letter-spacing: 0.14em;
  background: linear-gradient(180deg, #f2fbfd, #7fe3f0 60%, #2a93a6);
  -webkit-background-clip: text;
  background-clip: text;
  filter: drop-shadow(0 0 24px rgba(99, 211, 226, 0.35));
}
@keyframes drift {
  from {
    transform: scale(1.04) translate(0, 0);
  }
  to {
    transform: scale(1.1) translate(-1.5%, -1%);
  }
}

/* ---------- portraits ---------- */
.pfp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  overflow: hidden;
  border: 1.5px solid var(--glow);
  box-shadow:
    0 0 0 2px rgba(5, 10, 20, 0.9),
    0 0 12px rgba(99, 211, 226, 0.25);
  background: #0b1626;
  vertical-align: middle;
  font-family: var(--serif);
  color: var(--glow);
}
.pfp img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.pfp.xs {
  width: 18px;
  height: 18px;
  border-width: 1px;
  box-shadow: none;
}
.pfp.sm {
  width: 28px;
  height: 28px;
  margin-right: 4px;
}
.pfp.md {
  width: 44px;
  height: 44px;
}
.pfp.lg {
  width: 64px;
  height: 64px;
}

/* the hero panel in a mission leads with its pilot */
.hero .hh {
  align-items: center;
  gap: 8px;
}
.hero.active .pfp {
  border-color: var(--gold);
  box-shadow:
    0 0 0 2px rgba(5, 10, 20, 0.9),
    0 0 16px rgba(240, 195, 90, 0.45);
}
.hero.downed .pfp {
  filter: grayscale(1) brightness(0.6);
}

/* ---------- draft: pre-made pilots and the pilot picker ---------- */
.pilot-card {
  padding: 0 0 10px;
  overflow: hidden;
  border-radius: 4px;
}
.pilot-card > :not(.pc-art) {
  margin-left: 10px;
  margin-right: 10px;
}
.pc-art {
  position: relative;
  height: 112px;
  margin-bottom: 8px;
  background-size: cover;
  background-position: center 35%;
  border-bottom: 1px solid var(--line2);
}
.pc-art::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(10, 18, 33, 0.95));
}
.pc-art .pfp {
  position: absolute;
  left: 10px;
  bottom: -14px;
  z-index: 1;
  width: 56px;
  height: 56px;
}
.pc-call {
  position: absolute;
  right: 10px;
  bottom: 8px;
  z-index: 1;
  font-family: var(--serif);
  font-size: 11px;
  letter-spacing: 0.25em;
  color: var(--glow);
}
.pilot-card {
  position: relative;
}
.pilot-card .made-x {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 2;
  margin: 0 !important;
}
.pilot-card .ic {
  margin-left: 74px !important;
  font-size: 20px;
  min-height: 22px;
}
.pilot-card:hover .pc-art {
  filter: brightness(1.12);
}
.pfp.none {
  font-size: 0.5em;
  letter-spacing: -0.1em;
}
.pfp.lg.none,
.pfp.md.none {
  font-size: 18px;
}

/* ---------- cards: a frame per etherion ---------- */
.card {
  border-radius: 4px !important;
  background: linear-gradient(180deg, rgba(99, 211, 226, 0.04), transparent 50%), var(--panel2) !important;
}

/* ---------- board ---------- */
.board {
  background:
    radial-gradient(ellipse at 50% 30%, rgba(30, 70, 110, 0.25), transparent 70%), rgba(6, 12, 22, 0.85) !important;
  border-radius: 4px !important;
}
.token.hero .ring {
  fill: none;
  stroke: var(--glow);
  stroke-width: 2.5;
}
.token.hero.active .ring {
  stroke: var(--gold);
  filter: drop-shadow(0 0 6px rgba(240, 195, 90, 0.8));
}
.token.hero.downed .face {
  filter: grayscale(1) brightness(0.5);
}

/* reduced or no motion (src/ui/sea.js U.motion) */
html.calm .title-scene {
  animation: none;
}

@media (max-width: 640px) {
  .title h1 {
    font-size: 56px;
  }
}

/* the board's place: the lead pilot's scene, dim and soft, under the nodes */
.board {
  position: relative;
  isolation: isolate;
}
.board::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--scene, none) center / cover no-repeat;
  opacity: 0.16;
  filter: blur(2px) saturate(0.8);
  border-radius: inherit;
}
.zone-glow {
  opacity: 0.11;
}

/* ───── drawn icons (src/ui/icons.js): flat, one colour, the text's own ───── */
.icn {
  width: 1.15em;
  height: 1.15em;
  vertical-align: -0.22em;
  fill: currentColor;
  fill-rule: evenodd;
  flex: none;
}
.icn.por {
  display: inline-block;
  background-repeat: no-repeat;
  background-color: #0d1a33;
  border-radius: 28%;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14);
}
.icn.tiny {
  width: 0.95em;
  height: 0.95em;
}
.token .glyph-ic {
  fill: #ffe3ec;
  fill-rule: evenodd;
  pointer-events: none;
}
.token.boss .glyph-ic {
  fill: #ffd0dc;
}
.ev-ic .icn {
  width: 34px;
  height: 34px;
  color: var(--gold);
}
.sp-card .ic .icn {
  width: 30px;
  height: 30px;
}
.sp-card .ic .por {
  width: 52px;
  height: 52px;
}
.intent .g .icn {
  width: 18px;
  height: 18px;
  color: #ffb3c7;
}
.die .icn {
  width: 16px;
  height: 16px;
  vertical-align: 0;
}
.objmark-ic {
  fill: #ffe9a8;
  fill-rule: evenodd;
  pointer-events: none;
}
/* a survey mark in its element's colour: a die of that element tags it */
.objmark-ic.mk-M {
  fill: var(--M);
}
.objmark-ic.mk-C {
  fill: var(--C);
}
.objmark-ic.mk-S {
  fill: var(--S);
}
.objmark-ic.mk-T {
  fill: var(--T);
}
.hazmark {
  fill: #7fd3ff;
  fill-rule: evenodd;
  opacity: 0.85;
  pointer-events: none;
}

/* ───── story panels: a painting beside the words (events, havens) ───── */
.scene-card {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: 0;
  padding: 0;
  max-width: 980px;
  margin: 12px auto 0;
  overflow: hidden;
}
.scene-card.no-art {
  grid-template-columns: 1fr;
}
.scene-art {
  min-height: 300px;
  background-size: cover;
  background-position: center;
  position: relative;
  animation: scene-drift 24s ease-in-out infinite alternate;
}
.scene-art::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 60%, var(--panel) 100%);
}
@keyframes scene-drift {
  from {
    background-position: 40% 50%;
  }
  to {
    background-position: 60% 50%;
  }
}
.scene-body {
  padding: 16px 18px;
}
.story-text {
  font-family: var(--flavor);
  font-size: 15.5px;
  line-height: 1.55;
  color: #dfe9f3;
}
.story-text.small {
  font-size: 13.5px;
  color: var(--dim);
}
.haven-rest .scene-art {
  min-height: 180px;
}
@media (max-width: 700px) {
  .scene-card {
    grid-template-columns: 1fr;
  }
  .scene-art {
    min-height: 170px;
  }
  .scene-art::after {
    background: linear-gradient(180deg, transparent 55%, var(--panel) 100%);
  }
}
/* reduced or no motion (src/ui/sea.js U.motion) */
html.calm .scene-art {
  animation: none;
}

/* ───── passages between stops ───── */
.passage-card {
  margin-bottom: 12px;
  animation: passage-in 0.5s ease-out;
}
@keyframes passage-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}
.passage .pl {
  margin: 8px 0;
  line-height: 1.5;
}
.passage .pl.term {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--cyan);
  letter-spacing: 0.02em;
}
.passage .pl.term::before {
  content: '> ';
  opacity: 0.6;
}
.passage .pl.say {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-family: var(--flavor);
  font-size: 15px;
  color: #e4edf6;
}
.passage .pl.say .pfp {
  flex: none;
}
.chronicle .entry {
  border-left: 2px solid var(--line2);
  padding: 2px 0 2px 12px;
  margin: 10px 0;
}
.chronicle .entry h4 {
  margin: 0 0 4px;
  font-family: var(--serif);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
}
/* reduced or no motion (src/ui/sea.js U.motion) */
html.calm .passage-card {
  animation: none;
}

/* who sent the expedition: domains are ways of living, tinted, never teams */
.dom-jade {
  color: #5fc79a;
}
.dom-ruby {
  color: #e0606e;
}
.dom-gold {
  color: #e3b649;
}

/* a player's own line of story (the box beside End turn), told again between stops */
.passage .pl.say.own > span {
  font-style: italic;
  color: #fbe6b8;
  border-left: 2px solid var(--gold);
  padding-left: 10px;
}
.passage .pl.say.own .own-tag {
  display: block;
  font-style: normal;
  font-family: var(--sans);
  font-size: 11px;
  color: var(--dim);
  letter-spacing: 0.04em;
}


/* ───── ui/party.css ───── */
/* Players and seats (src/ui/party.js) */
.seat-tag {
  display: inline-block;
  margin: 0 6px;
  padding: 1px 7px;
  border-radius: 9px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  vertical-align: middle;
  border: 1px solid currentColor;
}
.seat-tag.seat-0 {
  color: #7fd4ff;
}
.seat-tag.seat-1 {
  color: #ffb36b;
}

/* each player's own purse of omnicrystals (U.purseHTML) */
.pill.purse + .pill.purse {
  margin-left: 4px;
}
.pill.purse.mine {
  border-color: rgba(242, 193, 78, 0.7);
  box-shadow: 0 0 0 1px rgba(242, 193, 78, 0.2) inset;
}


/* ───── ui/atlas.css ───── */
/* ───── the atlas (src/ui/atlas.js): a contents page and each place as a spread ───── */
.atlas-index {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.atlas-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  text-align: left;
  padding: 0 0 10px;
  overflow: hidden;
  white-space: normal;
}
.atlas-card > :not(.atlas-thumb) {
  padding: 0 10px;
}
.atlas-thumb {
  display: block;
  width: 100%;
  height: 92px;
  background: center / cover no-repeat;
  margin-bottom: 4px;
}
.atlas-spread {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 0;
  border: 1px solid var(--line2);
  border-radius: 12px;
  overflow: hidden;
  background: var(--panel2);
}
@media (max-width: 760px) {
  .atlas-spread {
    grid-template-columns: 1fr;
  }
}
.atlas-leaf {
  position: relative;
  padding: 14px 16px;
  min-width: 0;
}
.atlas-board {
  isolation: isolate;
  border-right: 1px solid var(--line2);
}
.atlas-plate {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: center / cover no-repeat;
  opacity: 0.26;
  filter: saturate(0.85);
}
.atlas-head h3 {
  margin: 2px 0 2px;
}
.atlas-map {
  display: block;
  width: 100%;
  height: auto;
  margin-top: 10px;
}
.atlas-map .an .ring {
  fill: #0f1930;
  stroke: #2a3a58;
  stroke-width: 1.5;
}
.atlas-map .an.high .ring {
  stroke: #9fb4d8;
  stroke-dasharray: 3 3;
}
.atlas-map .an.hz .ring {
  stroke: #e56a6a;
  stroke-width: 2.5;
}
.atlas-map text {
  fill: #c9d6ea;
  font-size: 13px;
  font-family: var(--mono);
}
.atlas-map .zone-glow {
  opacity: 0.16;
}
.atlas-facing h4 {
  margin: 0 0 6px;
  font-family: var(--serif);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 13px;
  color: var(--gold);
}
.atlas-facing ul {
  margin: 0 0 8px;
  padding-left: 18px;
}
.atlas-facing li {
  margin-bottom: 4px;
}
.atlas-notes {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.atlas-notes p {
  font-family: var(--flavor);
  margin: 0 0 8px;
  line-height: 1.45;
}
.atlas-turn {
  margin-top: 10px;
}
.modal:has(.atlas-spread) {
  max-width: 1100px;
}
/* a mission's place link in the top bar */
button.linkish {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: var(--cyan);
  text-decoration: underline dotted;
  cursor: pointer;
}
/* a board on an atlas page shows its plate more clearly than a pilot's world behind a grid */
.board.paged::before {
  opacity: 0.24;
  filter: blur(1px) saturate(0.85);
}


/* ───── ui/canon.css ───── */
/* ───── canon capture (src/ui/canon.js): the ✎ marks, the note, the pilot question ───── */
.cmark {
  display: inline-block;
  padding: 0 4px;
  margin: 0 0 0 2px;
  min-height: 0;
  line-height: 1.2;
  font-size: 11px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  color: var(--mute, #8a94a8);
  opacity: 0.55;
  cursor: pointer;
  vertical-align: baseline;
}
.cmark:hover,
.cmark:focus-visible {
  opacity: 1;
  border-color: var(--line2, #2a3550);
  color: var(--txt, #e6ecf5);
}
.canon-quote {
  margin: 8px 0;
  padding: 8px 12px;
  border-left: 3px solid var(--line2, #2a3550);
  font-family: var(--serif);
  font-style: italic;
  white-space: pre-wrap;
}
.canon-text,
.canon-line {
  width: 100%;
  box-sizing: border-box;
  background: #0b1222;
  border: 1px solid var(--line2, #2a3550);
  color: var(--txt, #e6ecf5);
  padding: 6px 8px;
  border-radius: 6px;
  font: inherit;
}
.canon-ask {
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px dashed var(--line2, #2a3550);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.canon-list {
  max-height: 40vh;
  overflow: auto;
  margin: 8px 0;
}
.canon-row {
  padding: 6px 0;
  border-bottom: 1px solid var(--line, #1c2438);
}
.canon-out {
  height: 90px;
}
.canon-item {
  padding: 8px 0;
  border-bottom: 1px solid var(--line, #1c2438);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.canon-item.st-rejected {
  opacity: 0.6;
}
.canon-inbox {
  max-height: 60vh;
}
.canon-detail {
  font-family: var(--serif);
  font-style: italic;
}
.canon-ask .row .ghost {
  white-space: normal;
  text-align: left;
}


/* ───── ui/feel.css ───── */
/* ───── feel (src/ui/feel.js): the day over the board, its weather, the readout, flashes ───── */

/* the hour: a wash over the ground under the board, eased from one round to the next */
.board > svg {
  position: relative;
  z-index: 1;
}
.board .sky {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  border-radius: inherit;
  transition:
    background 2.4s ease,
    opacity 2.4s ease;
  mix-blend-mode: soft-light;
}
.board .sky-dawn {
  background: linear-gradient(180deg, rgba(255, 150, 120, 0.55), rgba(255, 200, 150, 0.15) 60%, transparent);
}
.board .sky-morning {
  background: linear-gradient(180deg, rgba(255, 240, 200, 0.35), transparent 70%);
}
.board .sky-noon {
  background: radial-gradient(ellipse at 50% 0%, rgba(255, 255, 235, 0.45), transparent 70%);
}
.board .sky-afternoon {
  background: linear-gradient(200deg, rgba(255, 210, 140, 0.4), transparent 70%);
}
.board .sky-dusk {
  mix-blend-mode: multiply;
  background: linear-gradient(180deg, rgba(150, 70, 140, 0.55), rgba(230, 120, 80, 0.4) 70%, rgba(80, 40, 90, 0.5));
}
.board .sky-night {
  mix-blend-mode: multiply;
  background:
    radial-gradient(ellipse at 50% 45%, rgba(70, 90, 170, 0.5), rgba(14, 20, 60, 0.85) 90%),
    linear-gradient(180deg, rgba(30, 40, 100, 0.4), rgba(30, 40, 100, 0.4));
}
.pill.day {
  border-color: rgba(242, 193, 78, 0.45);
}
.pill.day-dusk,
.pill.day-dawn {
  color: #ffc7a8;
}
.pill.day-night {
  color: #b9c7ff;
  border-color: rgba(150, 170, 255, 0.45);
}

/* weather: wind streaks blowing across, toward the edge it blows to; fog drifting low */
.board .wx {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  border-radius: inherit;
}
.board .wx-wind i {
  position: absolute;
  left: 0;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, rgba(225, 240, 255, 0.9) 60%, transparent);
  animation: gust-e linear infinite;
}
.board .wx-wind.to-a i {
  animation-name: gust-a;
  background: linear-gradient(270deg, transparent, rgba(225, 240, 255, 0.9) 60%, transparent);
}
@keyframes gust-e {
  from {
    transform: translateX(-260px);
  }
  to {
    transform: translateX(110vw);
  }
}
@keyframes gust-a {
  from {
    transform: translateX(110vw);
  }
  to {
    transform: translateX(-260px);
  }
}
.board .wx-fog {
  background:
    radial-gradient(ellipse 60% 40% at 30% 70%, rgba(200, 215, 230, 0.22), transparent 70%),
    radial-gradient(ellipse 50% 35% at 75% 40%, rgba(200, 215, 230, 0.18), transparent 70%);
  background-size: 160% 100%;
  animation: fog-drift 18s ease-in-out infinite alternate;
}
@keyframes fog-drift {
  to {
    background-position: 60% 0;
  }
}

/* the Terminal's readout, typed in at the top of the board as a round begins */
.board .readout {
  position: absolute;
  z-index: 3;
  left: 12px;
  top: 10px;
  max-width: calc(100% - 24px);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--cyan);
  background: rgba(7, 16, 32, 0.72);
  border: 1px solid rgba(94, 200, 216, 0.35);
  border-radius: 6px;
  padding: 4px 9px;
  white-space: nowrap;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
}
.board .readout.show {
  animation:
    readout-type 0.9s steps(var(--chars, 30)) both,
    readout-fade 5.5s ease forwards;
}
@keyframes readout-type {
  from {
    clip-path: inset(0 100% 0 0);
  }
  to {
    clip-path: inset(0 0 0 0);
  }
}
@keyframes readout-fade {
  0%,
  80% {
    opacity: 1;
  }
  100% {
    opacity: 0.35;
  }
}

/* the board answers: a ring where a card is played (in its etherion's colour), a hit, a fall, a heal */
#fxlayer .burst {
  fill: none;
  stroke-width: 3;
  transform-box: fill-box;
  transform-origin: center;
  animation: burst 0.8s ease-out forwards;
  pointer-events: none;
}
#fxlayer .burst.play {
  stroke: var(--AP);
}
#fxlayer .burst.el-M {
  stroke: var(--M);
}
#fxlayer .burst.el-C {
  stroke: var(--C);
}
#fxlayer .burst.el-S {
  stroke: var(--S);
}
#fxlayer .burst.el-T {
  stroke: var(--T);
}
#fxlayer .burst.el-O {
  stroke: var(--O);
}
#fxlayer .burst.dmg {
  stroke: #ff7a9a;
  stroke-width: 4;
  animation-duration: 0.5s;
}
#fxlayer .burst.heal {
  stroke: var(--green);
}
#fxlayer .burst.set {
  stroke: var(--violet);
  stroke-dasharray: 4 5;
}
#fxlayer .burst.death {
  stroke: #fff;
  fill: rgba(255, 255, 255, 0.25);
  animation: fall 1s ease-out forwards;
}
@keyframes burst {
  from {
    opacity: 1;
    transform: scale(0.6);
  }
  to {
    opacity: 0;
    transform: scale(2.2);
  }
}
@keyframes fall {
  from {
    opacity: 0.9;
    transform: scale(1);
  }
  to {
    opacity: 0;
    transform: scale(0.2);
  }
}
.token.hit .body {
  animation: tok-hit 0.45s ease-out;
}
.token.blocked .body {
  animation: tok-block 0.5s ease-out;
}
@keyframes tok-hit {
  0% {
    filter: brightness(2.2) drop-shadow(0 0 6px #ff4d6d);
  }
  100% {
    filter: none;
  }
}
@keyframes tok-block {
  0% {
    filter: brightness(1.8) drop-shadow(0 0 8px var(--cyan));
  }
  100% {
    filter: none;
  }
}
.floater.state {
  font-family: var(--sans);
  font-size: 12px;
  color: var(--txt);
}
.floater.state.kw-good {
  color: #9ff0b4;
}
.floater.state.kw-bad {
  color: #ffb3c7;
}

/* the objective answering back (feel.js objectiveCheck): a gold card on the board with a bar that fills from
   where the objective stood to where it stands, gold rings where it happened, and the top bar's pill pulsing */
.board .goal {
  position: absolute;
  z-index: 4;
  left: 50%;
  top: 18%;
  transform: translate(-50%, -8px) scale(0.92);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.35s ease,
    transform 0.35s ease;
}
.board .goal.show {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}
.goal-card {
  min-width: 240px;
  text-align: center;
  padding: 10px 22px 12px;
  border-radius: 12px;
  background: rgba(10, 17, 32, 0.9);
  border: 1px solid rgba(242, 193, 78, 0.75);
  box-shadow:
    0 0 0 1px rgba(242, 193, 78, 0.25),
    0 0 32px rgba(242, 193, 78, 0.35);
}
.goal-kick {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
}
.goal-txt {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 24px;
  color: #fff;
  margin: 2px 0 8px;
  text-shadow: 0 0 14px rgba(242, 193, 78, 0.55);
}
.goal-bar {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(242, 193, 78, 0.35);
  overflow: hidden;
}
.goal-bar i {
  display: block;
  height: 100%;
  width: var(--to);
  background: linear-gradient(90deg, #f2c14e, #fff2c4);
  box-shadow: 0 0 10px rgba(242, 193, 78, 0.8);
}
.board .goal.show .goal-bar i {
  animation: goal-fill 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) 0.15s both;
}
@keyframes goal-fill {
  from {
    width: var(--from);
  }
  to {
    width: var(--to);
  }
}
.goal-pct {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--gold);
  margin-top: 4px;
}
.board .goal.done .goal-card {
  border-color: #9ff0b4;
  box-shadow: 0 0 36px rgba(127, 208, 138, 0.45);
}
#fxlayer .burst.goal {
  stroke: var(--gold);
  stroke-width: 4;
  fill: rgba(242, 193, 78, 0.12);
  animation: burst-goal 1.1s ease-out forwards;
}
#fxlayer .burst.goal-2 {
  fill: none;
  stroke-width: 2;
}
@keyframes burst-goal {
  from {
    opacity: 1;
    transform: scale(0.7);
  }
  to {
    opacity: 0;
    transform: scale(3.2);
  }
}
.floater.goal {
  font-size: 22px;
  color: var(--gold);
  text-shadow: 0 0 10px rgba(242, 193, 78, 0.8);
}
.topbar .obj .obj-prog {
  background: linear-gradient(90deg, rgba(242, 193, 78, 0.26) var(--p, 0%), var(--panel2) var(--p, 0%));
}
.topbar .obj .obj-prog.just {
  border-color: var(--gold);
  animation: prog-pop 1.2s ease-out;
}
@keyframes prog-pop {
  0% {
    transform: scale(1.25);
    box-shadow: 0 0 0 0 rgba(242, 193, 78, 0.7);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 10px rgba(242, 193, 78, 0);
  }
}
/* where the objective can be moved forward now */
.pv-goal {
  color: var(--gold);
  font-weight: 600;
}
.combo-mark.goal-mark {
  color: var(--gold);
}
button.goal-act:not(:disabled) {
  border-color: rgba(242, 193, 78, 0.8);
  color: #ffe6a6;
  box-shadow: 0 0 10px rgba(242, 193, 78, 0.35);
  animation: goal-glow 1.8s ease-in-out infinite;
}
@keyframes goal-glow {
  50% {
    box-shadow: 0 0 16px rgba(242, 193, 78, 0.6);
  }
}

/* reduced or no motion (src/ui/sea.js U.motion) */
html.calm .board .wx-wind i {
  display: none;
}
html.calm .board .wx-fog,
html.calm .board .readout.show {
  animation: none;
  opacity: 1;
}
html.calm .board .sky {
  transition: none;
}
html.calm .board .goal,
html.calm .board .goal.show .goal-bar i,
html.calm .topbar .obj .obj-prog.just,
html.calm button.goal-act:not(:disabled) {
  animation: none;
  transition: none;
}

/* the dice rolling (feel.js rollTray): a tray at the foot of the board where each pilot's new dice tumble in
   their own shapes and land, one after another, on what they rolled */
.board .rolltray {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  width: max-content;
  max-width: 96%;
  pointer-events: none;
}
.rollrow {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px 14px 12px;
  border-radius: 14px;
  background: rgba(8, 12, 22, 0.82);
  border: 1px solid rgba(151, 166, 186, 0.35);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  animation: tray-in 0.25s ease-out both;
  transition:
    opacity 0.4s ease,
    transform 0.4s ease;
}
.rollrow.gone {
  opacity: 0;
  transform: translateY(12px);
}
.rollrow .who {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dim);
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  max-height: 48px;
  overflow: hidden;
}
.rdie {
  --c: #c9d4e3;
  position: relative;
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--c);
  animation: die-tumble 0.62s cubic-bezier(0.25, 0.6, 0.35, 1) calc(var(--j) * 0.14s) both;
}
.rdie .dbody {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.rdie .o {
  fill: #121b2e;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linejoin: miter;
}
.rdie .l {
  fill: none;
  stroke: currentColor;
  stroke-width: 0.8;
  opacity: 0.45;
}
.rdie .rf {
  position: relative;
  font-style: normal;
  margin-top: 4px;
  line-height: 1;
}
.rdie .rf .icn {
  width: 15px;
  height: 15px;
}
.rdie .rf b {
  font-family: var(--mono);
  font-size: 14px;
  color: #eef3f8;
}
.rdie .rs {
  position: absolute;
  bottom: -11px;
  left: 0;
  right: 0;
  text-align: center;
  font-style: normal;
  font-family: var(--mono);
  font-size: 8px;
  color: var(--dim);
}
.rdie.k-M,
.rdie.k-C,
.rdie.k-S,
.rdie.k-T,
.rdie.k-eth {
  --c: #e6ecf5;
}
.rdie.landed {
  animation: die-land 0.35s ease-out both;
}
.rdie.landed.f-M {
  --c: var(--M);
}
.rdie.landed.f-C {
  --c: var(--C);
}
.rdie.landed.f-S {
  --c: var(--S);
}
.rdie.landed.f-T {
  --c: var(--T);
}
.rdie.landed.f-O {
  --c: #fff;
}
.rdie.landed .o {
  fill: color-mix(in srgb, var(--c) 18%, #121b2e);
  filter: drop-shadow(0 0 6px color-mix(in srgb, var(--c) 70%, transparent));
}
@keyframes tray-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}
@keyframes die-tumble {
  0% {
    transform: translate(-90px, -40px) rotate(-320deg) scale(0.7);
    opacity: 0;
  }
  45% {
    transform: translate(-20px, 4px) rotate(-90deg) scale(1);
    opacity: 1;
  }
  70% {
    transform: translate(4px, -8px) rotate(20deg);
  }
  100% {
    transform: none;
  }
}
@keyframes die-land {
  0% {
    transform: scale(1.25);
  }
  100% {
    transform: scale(1);
  }
}
/* reduced or no motion (src/ui/sea.js U.motion) */
html.calm .die.fresh,
html.calm .rdie {
  animation: none;
}

/* ───────────── the motion kit, 2.76 (mission.js walkToken, lunge; sea.js U.motion) ───────────── */
/* a token on Reduced motion fades in where it lands instead of walking there */
.token.arrive {
  animation: tok-arrive 0.35s ease-out;
}
@keyframes tok-arrive {
  from {
    opacity: 0.15;
  }
  to {
    opacity: 1;
  }
}
/* a walking token stays above the others */
.token.walking {
  filter: drop-shadow(0 0 6px rgba(127, 227, 240, 0.6));
}
/* a hit token flashes and shakes */
.token.hit .body {
  animation:
    tok-hit 0.45s ease-out,
    tok-shake 0.32s linear;
}
@keyframes tok-shake {
  0% {
    transform: translateX(0);
  }
  20% {
    transform: translateX(4px);
  }
  45% {
    transform: translateX(-3px);
  }
  70% {
    transform: translateX(2px);
  }
  100% {
    transform: translateX(0);
  }
}
html.calm .token.hit .body {
  animation: tok-hit 0.45s ease-out;
}
/* the forecast answers a move: a chip whose figure changed pulses once */
.fc-chip.bump {
  animation: fc-bump 0.7s ease-out;
}
@keyframes fc-bump {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(127, 227, 240, 0.55);
  }
  30% {
    transform: scale(1.06);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 8px rgba(127, 227, 240, 0);
  }
}
html.calm .fc-chip.bump {
  animation: fc-bump-calm 0.6s ease-out;
}
@keyframes fc-bump-calm {
  from {
    background: rgba(127, 227, 240, 0.22);
  }
}
/* a new round: the cards resting on the track step one column toward Ready together */
.track.slide .tpill {
  animation: track-step 0.45s cubic-bezier(0.5, 0, 0.2, 1);
}
@keyframes track-step {
  from {
    transform: translateX(calc(100% + 4px));
    opacity: 0.4;
  }
}
html.calm .track.slide .tpill {
  animation: none;
}
/* screens slide in the direction of travel; on Reduced they fade */
#app.screen-in > :not(.modal-bg):not(.title-scene):not(.title-veil) {
  animation: screen-in 0.3s ease-out;
}
@keyframes screen-in {
  from {
    opacity: 0;
    transform: translateX(28px);
  }
}
html.calm #app.screen-in > :not(.modal-bg) {
  animation: screen-fade 0.25s ease-out;
}
@keyframes screen-fade {
  from {
    opacity: 0;
  }
}


/* ───── ui/account.css ───── */
/* Accounts (src/ui/account.js): the title line and the account box. Only drawn when there is a server. */
.title .acct-line {
  margin-top: 14px;
  max-width: 560px;
  text-align: center;
  line-height: 1.8;
}
.acct {
  max-width: 520px;
}
.acct p {
  margin: 8px 0;
}
.acct-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin: 10px 0;
}
.acct-row input {
  flex: 1 1 12em;
  min-width: 0;
}
.acct-reason {
  color: var(--gold);
}
.acct-msg {
  color: var(--glow);
}
.acct-end {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

/* ---------- Sign in 5, "Split hero" (Frogma - Tumult, Sign in + Lobby (Nov 22)) ----------
   A wide window: the captain behind Home drifting on the left with a line from the Ark, sign-in on the
   right. HyperSea colours, cut corners; it rises in with a little spring; a row lifts, glows and a shine
   runs across it on hover. */
.si-modal-bg {
  background: rgba(0, 2, 16, 0.62);
  backdrop-filter: blur(4px);
  animation: si-fade 0.35s ease both;
}
@keyframes si-fade {
  from {
    opacity: 0;
  }
}
.modal.si-modal {
  --si-ground: #00041f;
  --si-line: #434c89;
  --si-cyan: #00d4ff;
  --si-lime: #99ff80;
  --si-text: #e6e9ff;
  --si-soft: #c3c8ee;
  --si-mute: #747bad;
  max-width: 980px;
  padding: 0;
  border: 1px solid var(--si-line);
  border-radius: 0;
  clip-path: polygon(16px 0, 100% 0, 100% calc(100% - 16px), calc(100% - 16px) 100%, 0 100%, 0 16px);
  background: rgba(0, 4, 31, 0.97);
  color: var(--si-text);
  max-height: calc(100dvh - 24px);
  overflow: hidden auto;
  animation: si-pop 0.55s cubic-bezier(0.2, 0.9, 0.25, 1.15) both;
}
@keyframes si-pop {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.96);
  }
}
.si {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  min-height: 540px;
  position: relative;
}
.si::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--si-cyan), transparent);
  animation: si-glow 3.2s ease-in-out infinite;
}
@keyframes si-glow {
  50% {
    opacity: 0.35;
  }
}
.si-art {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #0b1450, #2a0a52);
}
.si-paint {
  position: absolute;
  inset: -24px;
  background-size: cover;
  background-position: center 30%;
  animation: si-drift 26s ease-in-out infinite alternate;
}
@keyframes si-drift {
  from {
    transform: scale(1.02);
  }
  to {
    transform: scale(1.1) translate(-20px, -10px);
  }
}
.si-art::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 4, 31, 0) 40%, rgba(0, 4, 31, 1)),
    linear-gradient(0deg, rgba(0, 4, 31, 0.92), transparent 55%);
}
.si-art-txt {
  position: absolute;
  left: 30px;
  right: 60px;
  bottom: 30px;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.si-art-txt p {
  margin: 0;
  font-family: var(--hd, 'Chakra Petch', sans-serif);
  font-size: 22px;
  line-height: 1.35;
  color: #fff;
}
.si-art-txt span,
.si-art-txt em,
.si-eye {
  font-family: var(--hd, 'Chakra Petch', sans-serif);
  font-size: 11px;
  font-style: normal;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--si-cyan);
}
.si-art-txt em {
  color: var(--si-mute);
}
.si-main {
  position: relative;
  padding: 40px 40px 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.modal.si-modal button.si-x {
  position: absolute;
  right: 18px;
  top: 18px;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--si-line);
  border-radius: 0;
  background: rgba(0, 4, 31, 0.6);
  color: var(--si-soft);
  transition:
    transform 0.3s,
    border-color 0.2s,
    color 0.2s;
}
.modal.si-modal button.si-x:hover:not(:disabled) {
  transform: rotate(90deg);
  border-color: var(--si-cyan);
  color: #fff;
  background: rgba(0, 212, 255, 0.1);
  box-shadow: none;
}
.si-title {
  margin: 0;
  font-family: var(--hd, 'Chakra Petch', sans-serif);
  font-size: 38px;
  line-height: 1.02;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
}
.si-lede,
.si-reason {
  margin: 0;
  color: var(--si-soft);
  font-size: 15px;
  line-height: 1.5;
}
.si-reason {
  color: var(--si-lime);
}
.si-bens {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.si-chk {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 14px;
  color: var(--si-soft);
  line-height: 1.45;
}
.si-chk i {
  flex: 0 0 18px;
  height: 18px;
  margin-top: 1px;
  border: 1px solid var(--si-lime);
  color: var(--si-lime);
  display: flex;
  align-items: center;
  justify-content: center;
  font-style: normal;
  font-size: 11px;
  box-shadow: 0 0 8px rgba(153, 255, 128, 0.35);
}
.si-btns {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}
.modal.si-modal button.si-btn {
  position: relative;
  overflow: hidden;
  height: 52px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 20px;
  border: 1px solid var(--si-line);
  border-radius: 0;
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
  background: rgba(0, 4, 31, 0.7);
  color: var(--si-text);
  font-family: var(--hd, 'Chakra Petch', sans-serif);
  font-size: 14px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition:
    border-color 0.2s,
    box-shadow 0.2s,
    transform 0.2s;
}
.si-btn svg {
  width: 20px;
  height: 20px;
  color: var(--si-cyan);
  flex: 0 0 auto;
}
.si-btn i {
  margin-left: auto;
  font-style: normal;
  color: var(--si-mute);
  transition:
    transform 0.2s,
    color 0.2s;
}
.modal.si-modal button.si-btn:hover:not(:disabled),
.modal.si-modal button.si-btn:focus-visible {
  border-color: var(--si-cyan);
  background: rgba(0, 18, 60, 0.85);
  box-shadow:
    inset 0 0 0 1px rgba(0, 212, 255, 0.35),
    0 0 24px rgba(0, 212, 255, 0.3);
  transform: translateY(-2px);
}
.si-btn:hover i {
  transform: translateX(4px);
  color: var(--si-cyan);
}
.si-btn::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 60px;
  left: -80px;
  background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.35), transparent);
  transform: skewX(-20deg);
}
.si-btn:hover::after {
  animation: si-sweep 1.2s ease-in-out;
}
@keyframes si-sweep {
  to {
    left: 120%;
  }
}
.si-fine {
  margin: auto 0 0;
  font-size: 12px;
  color: var(--si-mute);
  line-height: 1.5;
}
.si-main .acct-row input {
  background: rgba(0, 4, 31, 0.7);
  border: 1px solid var(--si-line);
  border-radius: 0;
  color: var(--si-text);
  height: 40px;
  padding: 0 12px;
}
.si-main .acct-end {
  border-top-color: rgba(67, 76, 137, 0.6);
}
@media (max-width: 760px) {
  .si {
    grid-template-columns: 1fr;
    min-height: 0;
  }
  .si-art {
    height: 180px;
  }
  .si-art-txt p {
    font-size: 17px;
  }
  .si-main {
    padding: 26px 22px 24px;
  }
  .si-title {
    font-size: 30px;
  }
}
:root[data-motion='off'] .si-modal-bg,
:root[data-motion='off'] .modal.si-modal,
:root[data-motion='off'] .si-paint,
:root[data-motion='off'] .si::after,
:root[data-motion='off'] .si-btn::after {
  animation: none !important;
}
@media (prefers-reduced-motion: reduce) {
  .si-modal-bg,
  .modal.si-modal,
  .si-paint,
  .si::after,
  .si-btn::after {
    animation: none !important;
  }
}


/* ───── ui/welcome.css ───── */
/* Welcoming new players (src/ui/welcome.js): Play now, the guided first mission, keep your squad, invites. */

.welcome-start {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin: 18px 0 6px;
}
.welcome-start .small {
  max-width: 420px;
  text-align: center;
}
.play-now {
  font-size: 20px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 14px 40px;
  min-height: 52px;
}
.account-line {
  margin-top: 10px;
  text-align: center;
}

/* the guided first mission: the lit part of the screen, and the card beside it */
.guide-spot {
  position: fixed;
  z-index: 60;
  border: 2px solid var(--gold);
  border-radius: 10px;
  box-shadow:
    0 0 0 4000px rgba(2, 5, 12, 0.6),
    0 0 24px rgba(242, 193, 78, 0.45);
  pointer-events: none;
  transition:
    left 0.35s cubic-bezier(0.3, 0.7, 0.2, 1),
    top 0.35s cubic-bezier(0.3, 0.7, 0.2, 1),
    width 0.35s cubic-bezier(0.3, 0.7, 0.2, 1),
    height 0.35s cubic-bezier(0.3, 0.7, 0.2, 1);
}
.guide-coach {
  position: fixed;
  z-index: 61;
  left: 14px;
  bottom: 14px;
  width: 340px;
  max-width: calc(100vw - 16px);
  box-sizing: border-box;
  padding: 14px 16px;
  background: #0d1d31;
  border: 1px solid var(--gold);
  border-radius: 12px;
  box-shadow: 0 0 30px rgba(242, 193, 78, 0.2);
  transition:
    left 0.35s cubic-bezier(0.3, 0.7, 0.2, 1),
    top 0.35s cubic-bezier(0.3, 0.7, 0.2, 1);
}
.guide-coach.floating {
  top: auto !important;
  left: auto !important;
  right: calc(14px + env(safe-area-inset-right, 0px));
  bottom: calc(14px + env(safe-area-inset-bottom, 0px));
}
.guide-coach .kick {
  color: var(--gold);
}
.guide-coach h3 {
  margin: 4px 0 6px;
}
.guide-coach p {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
}
.guide-coach p b {
  color: var(--gold);
}
.guide-dots {
  display: flex;
  gap: 6px;
  margin: 12px 0;
}
.guide-dots span {
  width: 22px;
  height: 4px;
  background: var(--line2);
}
.guide-dots span.on {
  background: var(--gold);
}
.guide-coach .row button {
  min-height: 40px;
}
@media (max-width: 640px) {
  /* on a phone the card spans the screen, at the top or the foot: away from the lit part (welcome.js) */
  .guide-coach {
    left: 8px !important;
    right: 8px;
    width: auto;
  }
}
@media (prefers-reduced-motion: reduce) {
  .guide-spot,
  .guide-coach {
    transition: none;
  }
}

/* keep your squad: after the first won mission, under the report */
.keep-squad {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
  padding: 14px 16px;
  border: 1px solid var(--gold);
  border-radius: 10px;
  background: #0d1d31;
  animation: keepSquadUp 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) 0.35s both;
}
.keep-squad .kick {
  color: var(--gold);
}
.keep-squad p {
  margin: 0;
}
@keyframes keepSquadUp {
  from {
    transform: translateY(24px);
    opacity: 0;
  }
  to {
    transform: none;
    opacity: 1;
  }
}
@media (prefers-reduced-motion: reduce) {
  .keep-squad {
    animation: none;
  }
}

/* invites: arriving by a link, and the lobby that hands one out */
.invite-card {
  max-width: 520px;
  margin: 18px auto 6px;
  padding: 16px 18px;
  border: 1px solid var(--cyan);
  border-radius: 12px;
  background: var(--panel);
  text-align: left;
}
.invite-card .kick {
  color: var(--gold);
}
.invite-card h3 {
  margin: 4px 0 6px;
}
.invite-card input {
  flex: 1;
  min-width: 140px;
}
.invite-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 10px 0 14px;
}
.invite-box input {
  flex: 1;
  min-width: 0;
  font-size: 16px;
}
.invite-box .copied {
  background: #1d6b4a;
}
.seats {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 8px 0;
}
.seat {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid var(--cyan);
  border-radius: 10px;
  background: var(--panel2);
}
.seat.waiting {
  border-style: dashed;
  border-color: var(--line2);
}
.seat-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--green);
}
.seat.waiting .seat-dot {
  background: none;
  border: 2px dashed var(--cyan);
  animation: seatBreathe 1.4s ease-in-out infinite;
}
@keyframes seatBreathe {
  0%,
  100% {
    opacity: 0.35;
  }
  50% {
    opacity: 1;
  }
}
@media (prefers-reduced-motion: reduce) {
  .seat.waiting .seat-dot {
    animation: none;
  }
}


/* ───── ui/sea.css ───── */
/* ============================================================================
   TUMULT — THE SEA AROUND THE BOARD (src/ui/sea.js)
   Four themes re-colour only the blue around the map art: the page behind,
   the top bar, the side panels and the dock. The board's painting stays.
   The data-sea, data-accent and data-motion attributes on the root element are set by U.seaApply.
   ========================================================================== */

/* ---------- the four seas ---------- */
:root,
:root[data-sea='deep'] {
  --sea1: #0a2238;
  --sea2: #030812;
  --sea-line: rgba(99, 211, 226, 0.2);
  --sea-glow: rgba(63, 180, 220, 0.16);
  --sea-ray: rgba(127, 227, 240, 0.05);
  --sea-mote: #7fe3f0;
  --sea-spd: 1;
}
:root[data-sea='deep'] {
  --panel: rgba(8, 18, 32, 0.74);
  --panel2: rgba(8, 16, 30, 0.86);
  --line: rgba(127, 227, 240, 0.16);
  --line2: rgba(127, 227, 240, 0.3);
}
/* the light twin: the water is foam and sand; the panels are sea glass, dark enough for the game's light type */
:root[data-sea='shore'] {
  --sea1: #eef6f4;
  --sea2: #9fc6cb;
  --sea-line: rgba(19, 102, 122, 0.3);
  --sea-glow: rgba(255, 255, 255, 0.55);
  --sea-ray: rgba(255, 255, 255, 0.28);
  --sea-mote: #ffffff;
  --sea-spd: 1.2;
  --panel: rgba(18, 58, 72, 0.84);
  --panel2: rgba(16, 52, 66, 0.9);
  --line: rgba(160, 230, 236, 0.26);
  --line2: rgba(160, 230, 236, 0.42);
  --glow: #9ff0f6;
}
:root[data-sea='glow'] {
  --sea1: #03201a;
  --sea2: #000604;
  --sea-line: rgba(120, 255, 190, 0.16);
  --sea-glow: rgba(60, 255, 170, 0.12);
  --sea-ray: rgba(120, 255, 190, 0.035);
  --sea-mote: #9dffcf;
  --sea-spd: 1.4;
  --panel: rgba(4, 18, 16, 0.8);
  --panel2: rgba(3, 14, 12, 0.88);
  --line: rgba(111, 224, 160, 0.16);
  --line2: rgba(111, 224, 160, 0.3);
  --glow: #8ff5c4;
}
:root[data-sea='storm'] {
  --sea1: #2a1840;
  --sea2: #07040c;
  --sea-line: rgba(181, 140, 255, 0.24);
  --sea-glow: rgba(255, 107, 122, 0.13);
  --sea-ray: rgba(201, 182, 255, 0.04);
  --sea-mote: #c9b6ff;
  --sea-spd: 0.55;
  --panel: rgba(20, 12, 32, 0.8);
  --panel2: rgba(16, 10, 26, 0.88);
  --line: rgba(181, 140, 255, 0.18);
  --line2: rgba(181, 140, 255, 0.34);
  --glow: #c9b6ff;
}

/* ---------- accents: the call to act (End Round, Got it, Take) ---------- */
:root,
:root[data-accent='tide'] {
  --accent: #1f8ea3;
  --accent2: #0f5c6d;
  --on-accent: #ffffff;
}
:root[data-accent='jade'] {
  --accent: #2fbf8a;
  --accent2: #17795a;
  --on-accent: #04140d;
}
:root[data-accent='ruby'] {
  --accent: #e8475e;
  --accent2: #93243a;
  --on-accent: #ffffff;
}
:root[data-accent='gold'] {
  --accent: #f0c35a;
  --accent2: #a77c22;
  --on-accent: #1a1205;
}
:root[data-accent] button.primary {
  background: linear-gradient(180deg, var(--accent), var(--accent2));
  color: var(--on-accent);
  border-color: color-mix(in srgb, var(--accent) 60%, #fff);
}
:root[data-accent] button.primary:hover:not(:disabled) {
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 80%, #fff), var(--accent));
}

/* ---------- the water ---------- */
#sea {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background: radial-gradient(120% 90% at 30% 10%, var(--sea1), var(--sea2));
  transition: background 0.8s;
}
/* the sea replaces the survey grid */
html[data-sea] body::before {
  display: none;
}
#sea .sea-blob {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, var(--sea-glow), transparent 70%);
  animation: seaBlob calc(var(--sea-spd) * 26s) ease-in-out infinite alternate;
}
#sea .b1 {
  left: -14vw;
  top: -18vh;
  width: 50vw;
  height: 50vw;
}
#sea .b2 {
  left: 55vw;
  top: 30vh;
  width: 42vw;
  height: 42vw;
  animation-delay: -9s;
}
#sea .b3 {
  left: 18vw;
  top: 62vh;
  width: 36vw;
  height: 36vw;
  animation-delay: -17s;
}
@keyframes seaBlob {
  from {
    transform: translate(0, 0) scale(1);
  }
  to {
    transform: translate(8vw, 6vh) scale(1.25);
  }
}
/* light coming down through the water */
#sea .sea-ray {
  position: absolute;
  top: -20vh;
  height: 120vh;
  width: 14vw;
  background: linear-gradient(180deg, var(--sea-ray), transparent 75%);
  transform-origin: 50% 0;
  transform: rotate(14deg);
  animation: seaRay calc(var(--sea-spd) * 18s) ease-in-out infinite alternate;
}
#sea .r1 {
  left: 18vw;
}
#sea .r2 {
  left: 46vw;
  width: 8vw;
  animation-delay: -6s;
}
#sea .r3 {
  left: 70vw;
  width: 11vw;
  animation-delay: -12s;
}
@keyframes seaRay {
  from {
    transform: rotate(10deg);
    opacity: 0.6;
  }
  to {
    transform: rotate(18deg);
    opacity: 1;
  }
}
#sea .sea-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
#sea .sea-line {
  stroke: var(--sea-line);
  animation: seaDrift linear infinite;
}
@keyframes seaDrift {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-480px);
  }
}
#sea .sea-mote {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--sea-mote);
  box-shadow: 0 0 8px var(--sea-mote);
  opacity: 0;
  animation: seaMote calc(var(--sea-spd) * 14s) linear infinite;
}
@keyframes seaMote {
  0% {
    transform: translateY(0);
    opacity: 0;
  }
  15% {
    opacity: 0.8;
  }
  85% {
    opacity: 0.5;
  }
  100% {
    transform: translateY(-70vh);
    opacity: 0;
  }
}
/* deeper down the route, darker water (only while the sea follows the route: sea.js sets the depth to 0 otherwise) */
#sea .sea-dark {
  position: absolute;
  inset: 0;
  background: #000;
  opacity: calc(var(--sea-depth, 0) * 0.32);
  transition: opacity 0.8s;
}

/* ---------- motion ---------- */
/* Reduced: the sea drifts three times slower and the motes go; Off: nothing in the sea moves */
html[data-motion='reduced'] #sea {
  --sea-spd: 3;
}
html[data-motion='reduced'] #sea .sea-motes,
html[data-motion='off'] #sea .sea-motes {
  display: none;
}
html[data-motion='off'] #sea * {
  animation-play-state: paused;
}
/* Off: every animation in the game jumps to its end, every transition is instant */
html[data-motion='off'] #app *,
html[data-motion='off'] #app *::before,
html[data-motion='off'] #app *::after {
  animation-duration: 0.001ms !important;
  animation-iteration-count: 1 !important;
  animation-delay: 0s !important;
  transition-duration: 0.001ms !important;
}

/* ---------- the Look panel ---------- */
.look {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: min(440px, 86vw);
}
.look .lk-sec {
  margin-top: 8px;
  font-family: var(--serif);
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--dim);
}
.look .lk-themes {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.look .lk-theme {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  text-align: left;
}
.look .lk-theme > span:last-child {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.look .lk-theme b {
  font-family: var(--serif);
  font-weight: 600;
}
.look .on {
  border-color: var(--glow);
  box-shadow: 0 0 0 1px var(--glow) inset;
}
.look .lk-sw {
  flex: 0 0 36px;
  height: 36px;
  border: 1px solid var(--line2);
}
.look .lk-auto {
  background: linear-gradient(135deg, #cfe3e2 0 25%, #0a2238 25% 50%, #03201a 50% 75%, #2a1840 75%);
}
.look .lk-accents,
.look .lk-motions {
  display: flex;
  gap: 6px;
}
.look .lk-accent {
  flex: 1;
  height: 40px;
  background: var(--c);
  color: #fff;
  font-family: var(--serif);
  letter-spacing: 0.1em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  border: 2px solid transparent;
}
.look .lk-accent.on {
  border-color: #fff;
}
.look .lk-motion {
  flex: 1;
  height: 40px;
  font-family: var(--serif);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.look .lk-motion.on {
  background: var(--gold);
  color: #1a1205;
}


/* ───── ui/hud.css ───── */
/* ============================================================================
   TUMULT — THE MISSION HUD (Frogma "Finalised UI": H-Final, G-HUD5, G-Live, G-Pass)
   HUD 1×2 by default: the board in a frame with the sea around it, the mission across
   the top, the foes' plans, the squad and the log on the right, the pilot being flown
   and its hand along the foot. ⛶ Full screen (HUD 1+): the board fills the screen and
   the plans and the hand become trays that slide away. Phones and small tablets: one
   sheet at the foot with tabs, Hand, Plans, Squad and Log.
   Loaded after style.css, so the old mission layout is kept for anything not named here.
   ========================================================================== */

/* ---------- framed (the default) ---------- */
.mission.hud {
  --hud-r: 16px;
  --hud-side: 350px;
  grid-template-columns: minmax(0, 1fr) var(--hud-side);
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 12px 16px;
  padding: 12px 20px 14px;
  height: 100%;
  box-sizing: border-box;
}
.mission.hud .tray {
  display: contents;
}
.mission.hud .ptabs,
.mission.hud .grab {
  display: none;
}
.mission.hud .panel {
  clip-path: none;
  border-radius: 14px;
  backdrop-filter: blur(8px);
}
.mission.hud .panel::before {
  display: none;
}
.mission.hud .lab {
  font-family: var(--serif);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--dim);
}
.mission.hud .lab.ok {
  color: var(--good, #6fe0a0);
}

/* the mission, across the top, on the sea: no box */
.mission.hud .top {
  grid-column: 1 / 3;
  grid-row: 1;
  background: none;
  border: 0;
  box-shadow: none;
  clip-path: none;
  padding: 0;
}
.mission.hud .top::before {
  display: none;
}
.mission.hud .topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: start;
  gap: 18px;
}
.mission.hud .mhead {
  min-width: 0;
}
.mission.hud .kickrow {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.mission.hud .kickrow .kick {
  margin: 0;
}
.mission.hud .mhead h3 {
  font-family: var(--serif);
  font-size: 20px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 2px 0 2px !important;
}
.mission.hud .obj {
  border: 0;
  background: none;
  padding: 0;
  max-width: 760px;
  cursor: pointer;
}
.mission.hud .obj-txt b {
  display: none;
}
.mission.hud .obj-bonus {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin-top: 4px;
}
.mission.hud .obj-bar {
  width: 140px;
  height: 5px;
  border-radius: 3px;
  background: color-mix(in srgb, var(--line2) 70%, transparent);
  overflow: hidden;
  flex: none;
}
.mission.hud .obj-bar > i {
  display: block;
  height: 100%;
  width: var(--p);
  background: linear-gradient(90deg, var(--cyan), var(--good, #6fe0a0));
  transition: width 0.4s ease;
}
.mission.hud .obj-prog {
  background: none;
  border: 0;
  padding: 0;
}
.mission.hud .tpills {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 4px;
}
.mission.hud .clock {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  line-height: 1;
  background: none;
  border: 0;
  padding: 0 6px;
}
.mission.hud .clock .cv {
  font-family: var(--serif);
  font-size: 22px;
  color: var(--gold);
}
.mission.hud .clock .rnd {
  font-size: 10px;
  color: var(--dim);
  margin-top: 3px;
}
.mission.hud .endgrp {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}
.mission.hud .endrow {
  display: flex;
  align-items: center;
  gap: 8px;
}
.mission.hud .endrow .note-btn,
.mission.hud .endrow .mmenu-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  padding: 0;
}
/* End Round: the one call to act, a pill in the accent */
.mission.hud .endbtn {
  height: 50px;
  padding: 0 28px;
  border-radius: 26px;
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  box-shadow: 0 6px 22px color-mix(in srgb, var(--accent, #1f8ea3) 35%, transparent);
}
.mission.hud .turnline {
  color: var(--gold);
  text-align: right;
  min-height: 1em;
}
.mission.hud .turnline:empty {
  display: none;
}

/* the board, in its frame: the sea shows around it */
.mission.hud .boardwrap {
  grid-column: 1;
  grid-row: 2;
  position: relative;
  gap: 0;
}
.mission.hud .board {
  border-radius: var(--hud-r);
  border-color: var(--line2);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
  box-sizing: border-box;
  padding-bottom: 46px;
}
.mission.hud .fsbtn {
  position: absolute;
  top: -14px;
  right: 18px;
  z-index: 6;
  height: 34px;
  padding: 0 16px;
  border-radius: 18px;
  font-family: var(--serif);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  background: var(--panel2);
}
/* the hint (who is flying, what a click does) and the forecast sit inside the frame, along its foot */
.mission.hud #mtarget {
  position: absolute;
  left: 14px;
  bottom: 10px;
  z-index: 5;
  max-width: 46%;
}
.mission.hud #mtarget .hint,
.mission.hud #mtarget > * {
  border-radius: 16px;
  background: var(--panel2);
  backdrop-filter: blur(6px);
  margin: 0;
}
.mission.hud .mfc {
  position: absolute;
  right: 14px;
  bottom: 10px;
  z-index: 5;
  max-width: 54%;
}
.mission.hud .mfc .forecast {
  justify-content: flex-end;
  border-radius: 18px;
  background: var(--panel2);
  backdrop-filter: blur(6px);
  margin: 0;
}

/* the right column: the foes' plans, the squad, the log; a long list of plans scrolls inside its panel */
.mission.hud .side {
  grid-column: 2;
  grid-row: 2;
  overflow: auto;
  gap: 10px;
}
.mission.hud .side-in {
  flex: 0 1 auto;
  min-height: 170px;
  overflow: auto;
}
.mission.hud .p-squad {
  flex: none;
}

/* on the light sea (Shore) the words on the water are ink, not foam */
:root[data-sea='shore'] .mission.hud:not(.full) .mhead,
:root[data-sea='shore'] .mission.hud:not(.full) .mhead h3,
:root[data-sea='shore'] .mission.hud .turnline,
:root[data-sea='shore'] .mission.hud:not(.full) .clock .rnd {
  color: #0c3440;
  text-shadow: none;
}
:root[data-sea='shore'] .mission.hud:not(.full) .mhead .dim,
:root[data-sea='shore'] .mission.hud:not(.full) .mhead .obj-prog {
  color: #2d5a66;
}
:root[data-sea='shore'] .mission.hud:not(.full) .mhead .kick {
  color: #8a5a00;
}
:root[data-sea='shore'] .mission.hud .clock .cv {
  color: #a46a00;
}
:root[data-sea='shore'] .mission.hud .endrow > .ghost {
  color: #0c3440;
  border-color: rgba(12, 52, 64, 0.35);
}
.mission.hud .intents-panel .fold-head {
  align-items: center;
}
.mission.hud .intent {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 7px 0;
  border-top: 1px solid var(--line);
}
.mission.hud .intent .g {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1.5px solid #ff6b7a;
  display: grid;
  place-items: center;
}
.mission.hud .intent .who {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 6px;
}
.mission.hud .ehp {
  display: block;
  flex-basis: 100%;
  height: 3px;
  max-width: 90px;
  margin-top: 3px;
  background: color-mix(in srgb, #ff6b7a 20%, transparent);
  border-radius: 2px;
}
.mission.hud .ehp > i {
  display: block;
  height: 100%;
  background: #ff6b7a;
  border-radius: 2px;
}
.mission.hud .squad-panel .row {
  margin-bottom: 4px;
}
.mission.hud .sq-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 7px 6px;
  border-top: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
}
.mission.hud .sq-row:hover {
  background: color-mix(in srgb, var(--glow) 6%, transparent);
}
.mission.hud .sq-row.sel {
  background: color-mix(in srgb, var(--glow) 10%, transparent);
}
.mission.hud .sq-row.downed {
  opacity: 0.55;
}
.mission.hud .sq-row .pfp {
  width: 34px;
  height: 34px;
}
.mission.hud .sq-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.mission.hud .sq-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mission.hud .sq-hp {
  display: block;
  height: 4px;
  border-radius: 2px;
  background: color-mix(in srgb, var(--line2) 70%, transparent);
  max-width: 130px;
}
.mission.hud .sq-hp > i {
  display: block;
  height: 100%;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--cyan), var(--good, #6fe0a0));
}
.mission.hud .sq-res {
  display: flex;
  gap: 4px;
  align-items: center;
  font-size: 11px;
}
.mission.hud .sq-res .res-el {
  padding: 0 4px;
  font-size: 11px;
}
.mission.hud .sq-res .ap-chip {
  font-size: 11px;
  padding: 0 6px;
}
.mission.hud .sq-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}
.mission.hud .sq-st {
  font-size: 12px;
  color: var(--dim);
}
.mission.hud .sq-st.turn {
  color: var(--gold);
}
.mission.hud .sq-st.done {
  color: var(--good, #6fe0a0);
}
.mission.hud .sq-st.next,
.mission.hud .sq-st.play {
  color: var(--cyan);
}
.mission.hud .sq-side .peek {
  padding: 1px 8px;
  font-size: 11px;
}
.mission.hud .squad-panel .hero {
  margin-top: 8px;
}
.mission.hud .wait-panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}
.mission.hud .wait-panel button {
  border-radius: 22px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-family: var(--serif);
}
.mission.hud .bottom {
  flex: none;
}

/* the foot: the pilot being flown, the track over its hand, the actions anyone can take */
.mission.hud .dock {
  grid-column: 1 / 3;
  grid-row: 3;
}
.mission.hud .dock-hero {
  grid-template-columns: 280px minmax(0, 1fr) 260px;
  gap: 14px;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
  clip-path: none;
}
.mission.hud .dock-hero::before {
  display: none;
}
.mission.hud .dk-res {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  backdrop-filter: blur(8px);
}
.mission.hud .dk-hand {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.mission.hud .dk-track {
  display: grid;
  grid-template-columns: 1.3fr repeat(6, 1fr);
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel2);
  overflow: hidden;
  min-height: 30px;
}
.mission.hud .dk-track > * {
  border-left: 1px solid var(--line);
  padding: 4px 8px;
  min-width: 0;
}
.mission.hud .dk-track > :first-child {
  border-left: 0;
}
.mission.hud .dk-track .tlab {
  font-family: var(--serif);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dim);
}
.mission.hud .dk-track .tready {
  color: var(--cyan);
  display: flex;
  align-items: center;
}
.mission.hud .dk-track .tcol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 6px;
}
.mission.hud .dk-track .tcol .n {
  display: none;
}
.mission.hud .dk-track .tpill {
  font-size: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.mission.hud .dock-hero .hand {
  grid-auto-columns: minmax(108px, 1fr);
  gap: 8px;
}
.mission.hud .dock-hero .hcard {
  border-radius: 12px;
  border-width: 1.5px;
  padding: 6px 8px 8px;
}
.mission.hud .dk-acts .actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.mission.hud .dk-acts .actions > button {
  border-radius: 10px;
  min-height: 38px;
  text-align: left;
}
.mission.hud .dk-acts .more-btn,
.mission.hud .dk-acts .more-acts {
  grid-column: 1 / 3;
}
.mission.hud .dk-acts .more-btn {
  border-style: dashed;
  text-align: center !important;
}

/* ---------- full screen (HUD 1+): the board fills the screen, the rest floats on it ---------- */
.mission.hud.full .boardwrap {
  position: fixed;
  inset: 0;
  z-index: 0;
}
.mission.hud.full .board {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  height: 100%;
  padding: 150px calc(var(--hud-side) + 40px) 260px 20px;
}
.mission.hud.full .top {
  position: fixed;
  top: 12px;
  left: 20px;
  right: 20px;
  z-index: 8;
  pointer-events: none;
}
.mission.hud.full .top .topbar > * {
  pointer-events: auto;
}
.mission.hud.full .mhead {
  max-width: 470px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 16px;
  backdrop-filter: blur(8px);
}
.mission.hud.full .fsbtn {
  position: fixed;
  top: 128px;
  right: calc(var(--hud-side) + 36px);
}
.mission.hud.full #mtarget {
  position: fixed;
  left: 20px;
  bottom: 262px;
  max-width: 560px;
}
.mission.hud.full.nohand #mtarget {
  bottom: 20px;
}
.mission.hud.full .mfc {
  position: fixed;
  top: 84px;
  right: 20px;
  bottom: auto;
  max-width: 640px;
}
.mission.hud.full .side {
  position: fixed;
  right: 20px;
  top: 176px;
  bottom: 270px;
  width: var(--hud-side);
  z-index: 7;
  overflow: visible;
  transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.mission.hud.full .side-in {
  max-height: 55%;
}
.mission.hud.full .dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 7;
  padding: 14px 20px 14px;
  background: linear-gradient(180deg, transparent, var(--panel2) 22%);
  border-top: 1px solid var(--line);
  transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.mission.hud.full .grab {
  display: block;
  position: absolute;
  z-index: 2;
  font-family: var(--serif);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  background: var(--panel2);
  border-color: var(--line2);
}
.mission.hud.full .grab-hand {
  left: 50%;
  top: -28px;
  transform: translateX(-50%);
  border-radius: 10px 10px 0 0;
  border-bottom: 0;
  padding: 5px 18px;
}
.mission.hud.full .grab-plans {
  left: -34px;
  top: 0;
  writing-mode: vertical-rl;
  border-radius: 10px 0 0 10px;
  border-right: 0;
  padding: 14px 6px;
}
.mission.hud.full.nohand .dock {
  transform: translateY(100%);
}
.mission.hud.full.noplans .side {
  transform: translateX(calc(100% + 24px));
}
.mission.hud.full.nohand .board {
  padding-bottom: 20px;
}
.mission.hud.full.noplans .board {
  padding-right: 20px;
}
.mission.hud.full.nohand .side {
  bottom: 30px;
}

/* ---------- pass the screen ---------- */
.mission.hud .pass {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  background: radial-gradient(60% 60% at 50% 45%, rgba(10, 34, 56, 0.96), rgba(3, 8, 18, 0.99));
  color: #dbe7f5;
  animation: passIn 0.35s ease-out both;
}
.mission.hud .pass[hidden] {
  display: none;
}
@keyframes passIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
.mission.hud .pass-in {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
  max-width: 560px;
  padding: 20px;
}
.mission.hud .pass-in .pfp.xl {
  width: 150px;
  height: 150px;
  border: 3px solid var(--glow);
  box-shadow: 0 0 50px color-mix(in srgb, var(--glow) 40%, transparent);
}
.mission.hud .pass-in h2 {
  font-family: var(--serif);
  font-size: 46px;
  letter-spacing: 0.04em;
  margin: 0;
}
.mission.hud .pass-in p {
  margin: 0;
  color: var(--dim);
  font-size: 15px;
}
.mission.hud .pass-in .primary {
  height: 54px;
  padding: 0 32px;
  border-radius: 28px;
  font-family: var(--serif);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-top: 8px;
}
.mission.hud .pass-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 8px;
}
.mission.hud .pass-who {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 18px;
  border-radius: 16px;
  min-width: 120px;
}
.mission.hud .pass-who .pfp.lg {
  width: 72px;
  height: 72px;
}
.mission.hud .ptabs .endbtn2 {
  display: none;
}

/* ---------- a narrow desktop: a slimmer right column and foot ---------- */
@media (max-width: 1280px) and (min-width: 981px) {
  .mission.hud {
    --hud-side: 310px;
  }
  .mission.hud .dock-hero {
    grid-template-columns: 240px minmax(0, 1fr) 220px;
  }
}

/* ---------- phones and small tablets: the board, then one sheet with tabs ---------- */
@media (max-width: 980px) {
  .mission.hud {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 8px 10px 0;
    gap: 8px;
  }
  .mission.hud .top {
    flex: none;
  }
  .mission.hud .topbar {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px 10px;
  }
  .mission.hud .mhead {
    grid-column: 1;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 8px 12px;
  }
  .mission.hud .mhead h3 {
    font-size: 15px;
  }
  .mission.hud .obj:not(.open) .obj-txt {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .mission.hud .obj-bonus .bonus {
    display: none;
  }
  .mission.hud .obj-bar {
    width: 80px;
  }
  .mission.hud .tpills {
    grid-column: 2;
    grid-row: 1;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
  }
  .mission.hud .mhead {
    grid-row: 1 / 3;
  }
  .mission.hud .endgrp {
    grid-column: 2;
    grid-row: 2;
    flex-direction: row;
    justify-content: flex-end;
  }
  .mission.hud .endrow {
    gap: 4px;
  }
  .mission.hud .endrow .undo-lab {
    display: none;
  }
  .mission.hud .endrow > button {
    width: 34px;
    height: 34px;
    padding: 0;
    border-radius: 50%;
  }
  .mission.hud .endrow .endbtn {
    display: none;
  }
  .mission.hud .endgrp .turnline {
    display: none;
  }
  .mission.hud .boardwrap {
    flex: 1 1 auto;
    min-height: 200px;
  }
  .mission.hud .board {
    flex: 1;
    height: 100%;
    max-height: none;
    aspect-ratio: auto;
    padding-bottom: 40px;
  }
  .mission.hud .fsbtn {
    display: none;
  }
  .mission.hud #mtarget {
    max-width: 50%;
    bottom: 6px;
    left: 6px;
  }
  .mission.hud .mfc {
    max-width: 60%;
    bottom: 6px;
    right: 6px;
  }
  .mission.hud .mfc .forecast {
    flex-wrap: nowrap;
    overflow-x: auto;
  }
  /* the sheet: the pilot, the tabs with End, then the tab's pane */
  .mission.hud .tray {
    display: flex;
    flex-direction: column;
    flex: none;
    max-height: 52%;
    margin: 0 -10px;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
    gap: 8px;
    background: var(--panel2);
    border-top: 1px solid var(--line2);
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.35);
    overflow: hidden;
  }
  .mission.hud .side,
  .mission.hud .dock,
  .mission.hud #mdock,
  .mission.hud .dock-hero {
    display: contents;
  }
  .mission.hud .grab-hand {
    display: block;
    order: 0;
    align-self: center;
    width: 56px;
    height: 6px;
    padding: 0;
    border: 0;
    border-radius: 3px;
    background: color-mix(in srgb, var(--glow) 50%, transparent);
    font-size: 0;
  }
  .mission.hud .dk-res {
    order: 1;
    padding: 0;
    border: 0;
    background: none;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 2px 8px;
  }
  .mission.hud .dk-res > .hh {
    grid-column: 1;
  }
  .mission.hud .dk-res > .dk-purse {
    grid-column: 2;
    grid-row: 1;
    margin: 0;
  }
  .mission.hud .dk-res > .hpbar,
  .mission.hud .dk-res > .dice,
  .mission.hud .dk-res > .dice-key,
  .mission.hud .dk-res > .states:empty {
    display: none;
  }
  .mission.hud .dk-res .pool,
  .mission.hud .dk-res .res-els {
    display: none;
  }
  .mission.hud .ptabs {
    order: 2;
    display: flex;
    align-items: center;
    gap: 4px;
  }
  .mission.hud .ptab {
    padding: 6px 12px;
    border: 0;
    border-radius: 16px;
    background: none;
    color: var(--dim);
  }
  .mission.hud .ptab.on {
    background: color-mix(in srgb, var(--glow) 18%, transparent);
    color: var(--txt);
  }
  .mission.hud .ptabs .endbtn2 {
    display: inline-flex;
    margin-left: auto;
    height: 34px;
    padding: 0 14px;
    border-radius: 18px;
    font-family: var(--serif);
    font-weight: 700;
    font-size: 11px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    white-space: nowrap;
    max-width: 52%;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .mission.hud .pane,
  .mission.hud .dk-hand,
  .mission.hud .dk-acts {
    order: 3;
    min-height: 0;
    overflow: auto;
  }
  .mission.hud .dk-acts {
    order: 4;
  }
  .mission.hud .dk-track {
    display: none;
  }
  .mission.hud .dock-hero .hand {
    grid-auto-columns: 140px;
  }
  .mission.hud .dk-acts .actions {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .mission.hud .dk-acts .more-btn,
  .mission.hud .dk-acts .more-acts {
    grid-column: 1 / -1;
  }
  .mission.hud .dk-acts .actions > button {
    min-height: 34px;
    font-size: 12px;
    padding: 4px 6px;
  }
  .mission.hud:not([data-tab='hand']) .dk-hand,
  .mission.hud:not([data-tab='hand']) .dk-acts,
  .mission.hud:not([data-tab='plans']) .p-plans,
  .mission.hud:not([data-tab='squad']) .p-squad,
  .mission.hud:not([data-tab='log']) .p-log {
    display: none;
  }
  .mission.hud .p-log .log,
  .mission.hud .p-log .log.folded {
    max-height: none;
  }
  .mission.hud .p-log > .fold {
    display: none;
  }
  .mission.hud.nohand .dk-hand,
  .mission.hud.nohand .dk-acts,
  .mission.hud.nohand .pane {
    display: none;
  }
  .mission.hud .pass-in h2 {
    font-size: 36px;
  }
  .mission.hud .pass-in .pfp.xl {
    width: 120px;
    height: 120px;
  }
}

/* motion Off: the trays and the cover appear without sliding */
html[data-motion='off'] .mission.hud .side,
html[data-motion='off'] .mission.hud .dock,
html[data-motion='off'] .mission.hud .pass {
  transition: none;
  animation: none;
}

/* ---------- online: a seat gone quiet, a seat the AI holds (src/ui/net.js) ---------- */
/* on the mission screen the squad and the side column show these, so the strip over other screens steps aside */
body:has(.mission.hud) .net-away {
  display: none;
}
.seat-panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.seat-row {
  border-left: 3px solid var(--gold);
  padding: 2px 0 2px 10px;
}
.seat-row.held {
  border-left-color: var(--glow);
}
.seat-row .seat-acts {
  display: flex;
  gap: 6px;
  margin-top: 6px;
  flex-wrap: wrap;
}
.mission.hud .sq-st.away {
  color: var(--gold);
}
.mission.hud .sq-st.ai,
.mission.hud .sq-st.ai.done {
  color: var(--glow);
}


/* ───── ui/fauna.css ───── */
/* ============================================================================
   TUMULT — FAUNA (browser only): how the foes' creature bodies move (src/ui/fauna.js).
   Idle by default; .atk, .hit and .die on any ancestor play a blow, a hit taken and the wither.
   Reduced motion keeps the bodies still and the wither short.
   ========================================================================== */
.cr {
  overflow: visible;
  display: block;
}
.cr .bd {
  transform-box: view-box;
  animation: crIdle 3.2s ease-in-out infinite;
}
@keyframes crIdle {
  0%,
  100% {
    transform: translate(0, 0) rotate(0);
  }
  30% {
    transform: translate(-2px, -3px) rotate(-2deg);
  }
  65% {
    transform: translate(1px, 2px) rotate(1.5deg);
  }
}
.cr .sp {
  transform-box: view-box;
  transform-origin: 30px 50px;
  animation: crSp 2.4s ease-in-out infinite alternate;
}
.cr .sp-l,
.cr .sp-vl,
.cr .sp-vl2 {
  animation-delay: -1.2s;
}
.cr .sp-tail,
.cr .sp-tail2,
.cr .sp-lash {
  animation-duration: 1.7s;
}
@keyframes crSp {
  from {
    transform: rotate(-3deg);
  }
  to {
    transform: rotate(3deg);
  }
}
.cr .jw {
  transform-box: view-box;
}
.cr .jawU {
  animation: crJu 2.8s ease-in-out infinite;
}
.cr .jawL {
  animation: crJl 2.8s ease-in-out infinite;
}
@keyframes crJu {
  0%,
  70%,
  100% {
    transform: rotate(0);
  }
  80% {
    transform: rotate(-14deg);
  }
  88% {
    transform: rotate(4deg);
  }
}
@keyframes crJl {
  0%,
  70%,
  100% {
    transform: rotate(0);
  }
  80% {
    transform: rotate(14deg);
  }
  88% {
    transform: rotate(-4deg);
  }
}
.cr-kiter .sp-vu,
.cr-kiter .sp-vu2 {
  transform-origin: 52px 50px;
  animation: crVu 1.9s ease-in-out infinite;
}
.cr-kiter .sp-vl,
.cr-kiter .sp-vl2 {
  transform-origin: 52px 50px;
  animation: crVl 1.9s ease-in-out infinite;
}
@keyframes crVu {
  50% {
    transform: scaleY(0.72) rotate(4deg);
  }
}
@keyframes crVl {
  50% {
    transform: scaleY(0.72) rotate(-4deg);
  }
}
.cr .hrt {
  transform-box: view-box;
  animation: crH 1.8s ease-in-out infinite;
}
@keyframes crH {
  50% {
    transform: scale(1.07);
  }
}
.cr .core {
  animation: crC 1.8s ease-in-out infinite;
}
@keyframes crC {
  50% {
    opacity: 0.35;
  }
}
.cr .pr {
  transform-box: view-box;
}
.cr .spk {
  opacity: 0;
  animation: crSpk 1.1s steps(1) infinite;
}
@keyframes crSpk {
  0% {
    opacity: 1;
  }
  30% {
    opacity: 0;
  }
}
.cr .ghost {
  transform-box: view-box;
}
.cr .g1 {
  animation: crG1 3.2s ease-in-out infinite;
}
.cr .g2 {
  animation: crG2 3.2s ease-in-out infinite;
}
@keyframes crG1 {
  0%,
  100% {
    transform: translate(9px, 1px);
  }
  50% {
    transform: translate(13px, -3px);
  }
}
@keyframes crG2 {
  0%,
  100% {
    transform: translate(18px, 2px);
  }
  50% {
    transform: translate(25px, -5px);
  }
}
.cr .proj {
  opacity: 0;
  transform-box: view-box;
}
/* attack */
.atk .cr .bd {
  animation: crLunge 0.7s cubic-bezier(0.3, 0, 0.2, 1);
}
@keyframes crLunge {
  0% {
    transform: translate(0, 0);
  }
  35% {
    transform: translate(10px, 0) scale(0.94);
  }
  55% {
    transform: translate(-22px, 0) scale(1.08);
  }
  100% {
    transform: translate(0, 0);
  }
}
.atk .cr .jawU {
  animation: crJuA 0.7s ease;
}
.atk .cr .jawL {
  animation: crJlA 0.7s ease;
}
@keyframes crJuA {
  0% {
    transform: rotate(0);
  }
  35% {
    transform: rotate(-34deg);
  }
  55% {
    transform: rotate(10deg);
  }
  100% {
    transform: rotate(0);
  }
}
@keyframes crJlA {
  0% {
    transform: rotate(0);
  }
  35% {
    transform: rotate(34deg);
  }
  55% {
    transform: rotate(-10deg);
  }
  100% {
    transform: rotate(0);
  }
}
.atk .cr .sp-tail,
.atk .cr .sp-tail2 {
  animation: crCoil 0.7s ease;
}
@keyframes crCoil {
  40% {
    transform: rotate(-16deg) scale(0.9);
  }
  60% {
    transform: rotate(8deg);
  }
}
.atk .cr-kiter .sp-vu,
.atk .cr-kiter .sp-vu2 {
  animation: crVuA 0.7s ease;
}
.atk .cr-kiter .sp-vl,
.atk .cr-kiter .sp-vl2 {
  animation: crVlA 0.7s ease;
}
@keyframes crVuA {
  40% {
    transform: scaleY(1.25) rotate(-8deg);
  }
}
@keyframes crVlA {
  40% {
    transform: scaleY(1.25) rotate(8deg);
  }
}
.atk .cr .proj {
  animation: crProj 0.7s ease-out;
}
@keyframes crProj {
  0%,
  45% {
    opacity: 0;
    transform: translateX(0);
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateX(-70px);
  }
}
.atk .cr .hrt {
  animation: crHA 0.7s ease;
}
@keyframes crHA {
  40% {
    transform: scale(1.3);
  }
}
/* hit */
.hit .cr .bd {
  animation: crHit 0.5s ease;
}
@keyframes crHit {
  0% {
    transform: translate(0, 0);
  }
  15% {
    transform: translate(12px, -2px) rotate(6deg);
  }
  35% {
    transform: translate(-5px, 1px) rotate(-3deg);
  }
  60% {
    transform: translate(3px, 0);
  }
  100% {
    transform: translate(0, 0);
  }
}
.hit .cr .live {
  animation: crFl 0.5s steps(2);
}
@keyframes crFl {
  0% {
    filter: brightness(3) saturate(0);
  }
  50% {
    filter: none;
  }
}
/* wither: prisms shed outside-in, braids fade, the heart drops as one Etherion */
.die .cr .bd {
  animation: none;
}
.die .cr .pr {
  animation: crShedC 0.55s ease-in forwards;
}
.die .cr .pr.pa {
  animation-name: crShedA;
}
.die .cr .pr.pb {
  animation-name: crShedB;
}
@keyframes crShedA {
  to {
    transform: translate(8px, -26px) rotate(40deg);
    opacity: 0;
  }
}
@keyframes crShedB {
  to {
    transform: translate(8px, 26px) rotate(-40deg);
    opacity: 0;
  }
}
@keyframes crShedC {
  to {
    transform: translate(30px, 4px) rotate(70deg);
    opacity: 0;
  }
}
.die .cr .sp,
.die .cr .jw,
.die .cr .ghost,
.die .cr .spk {
  animation: crWither 1.1s ease-in 0.5s forwards;
}
@keyframes crWither {
  to {
    opacity: 0;
    transform: scale(0.6);
  }
}
.die .cr .hrt {
  animation: crDrop 1.6s ease-in forwards;
}
@keyframes crDrop {
  0%,
  45% {
    transform: none;
  }
  70% {
    transform: translateY(-6px) scale(0.8) rotate(30deg);
  }
  100% {
    transform: translateY(16px) scale(0.62) rotate(90deg);
    opacity: 0.95;
  }
}
.cr .ring {
  transform-box: view-box;
  transform-origin: 70px 50px;
  animation: crRing 14s linear infinite;
}
@keyframes crRing {
  to {
    transform: rotate(360deg);
  }
}
.cr .sp.rad {
  animation-duration: 3.2s;
}
.cr .bud {
  animation: crC 2.2s ease-in-out infinite;
}
.atk .cr-rad .bd {
  animation: crPulse 0.7s ease;
}
@keyframes crPulse {
  35% {
    transform: scale(0.9);
  }
  55% {
    transform: scale(1.18);
  }
}
.die .cr .ring,
.die .cr .bud,
.die .cr .web {
  animation: crWither 1.1s ease-in 0.4s forwards;
}
@media (prefers-reduced-motion: reduce) {
  .cr .bd,
  .cr .sp,
  .cr .jw,
  .cr .hrt,
  .cr .core,
  .cr .ghost,
  .cr .ring,
  .cr .spk,
  .cr .bud {
    animation: none !important;
  }
}
.calm .cr .bd,
.calm .cr .sp,
.calm .cr .jw,
.calm .cr .hrt,
.calm .cr .core,
.calm .cr .ghost,
.calm .cr .ring,
.calm .cr .spk,
.calm .cr .bud {
  animation: none;
}


/* ───── ui/show.css ───── */
/* ============================================================================
   TUMULT — THE SHOW (browser only): blows, banners, toasts, the round's tally, the board's camera and the
   foes' plans as the Stack (src/ui/show.js; Frogma "In-game screen", B, picked 2026-11-22). The overlays are
   always the deep-sea panel, whichever sea theme is worn, so they read over any place's painting.
   ========================================================================== */
.mission {
  --sh-red: #ff3b5c;
  --sh-red-hi: #ff6b85;
  --sh-cyan: #00d4ff;
  --sh-gold: #e8c27a;
  --sh-panel: linear-gradient(180deg, #141b52, #070b2c);
  --sh-serif: 'Cinzel', var(--flavor);
}

/* ── the Stack: each foe's plan as a card, numbered in the order the foes act ── */
.mission.hud .intent.stk {
  position: relative;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 10px;
  padding: 8px 10px 8px 6px;
  margin-top: 6px;
  border: 1px solid color-mix(in srgb, var(--sh-red) 28%, transparent);
  border-top: 1px solid color-mix(in srgb, var(--sh-red) 28%, transparent);
  background: color-mix(in srgb, var(--panel2) 85%, transparent);
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
  transition:
    transform 0.25s,
    border-color 0.25s;
}
.mission.hud .intent.stk:hover {
  transform: translateX(-4px);
  border-color: var(--sh-red-hi);
}
.mission.hud .intent.stk .no {
  position: absolute;
  left: 0;
  top: 0;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  background: var(--sh-red-hi);
  color: #1a0008;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 12px;
}
.mission.hud .intent.stk .g {
  width: 70px;
  height: 50px;
  border: 0;
  border-radius: 0;
  background: radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--sh-red) 22%, transparent), transparent 70%);
}
.mission.hud .intent.stk .who {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.mission.hud .intent.stk .nm {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.mission.hud .intent.stk .what {
  font-family: var(--serif);
  font-size: 15px;
  line-height: 1.2;
  color: #ffd2da;
}
.mission.hud .intent.stk .ehp {
  max-width: none;
  height: 4px;
}

/* ── numbers ── */
.floater.dmg.big {
  font-family: var(--sh-serif);
  font-size: 40px;
  font-weight: 700;
  line-height: 1;
  color: var(--sh-red-hi);
  text-shadow:
    0 0 18px rgba(255, 59, 92, 0.85),
    0 3px 0 #2a0010;
  animation: shNum 1.4s cubic-bezier(0.2, 1.4, 0.4, 1) forwards;
  z-index: 7;
}
.floater.dmg.huge {
  font-size: 56px;
}
@keyframes shNum {
  0% {
    opacity: 0;
    transform: translate(-50%, 20px) scale(0.3);
  }
  22% {
    opacity: 1;
    transform: translate(-50%, -18px) scale(1.3);
  }
  40% {
    transform: translate(-50%, -18px) scale(1);
  }
  80% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50px) scale(1);
  }
}

/* ── on the board: bolts, slashes, impacts, the wither ── */
#showfx {
  pointer-events: none;
}
.sh-beam .ln {
  stroke-width: 5;
  stroke-linecap: round;
  animation: shLn 0.55s ease-out forwards;
}
.sh-beam.foe .ln {
  stroke: var(--sh-red);
  filter: drop-shadow(0 0 6px var(--sh-red));
}
.sh-beam.hero .ln {
  stroke: var(--sh-cyan);
  filter: drop-shadow(0 0 6px var(--sh-cyan));
}
@keyframes shLn {
  40% {
    stroke-dashoffset: 0;
    opacity: 1;
  }
  100% {
    stroke-dashoffset: 0;
    opacity: 0;
  }
}
.sh-beam .bo {
  fill: #fff;
  animation: shFade 0.5s ease-in forwards;
}
.sh-beam.foe .bo {
  filter: drop-shadow(0 0 8px var(--sh-red));
}
.sh-beam.hero .bo {
  filter: drop-shadow(0 0 8px var(--sh-cyan));
}
.sh-beam .sl {
  stroke: #fff;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: 70;
  stroke-dashoffset: 70;
  animation: shSlash 0.42s ease-out forwards;
}
.sh-beam.foe .sl {
  filter: drop-shadow(0 0 5px var(--sh-red));
}
.sh-beam.hero .sl {
  filter: drop-shadow(0 0 5px var(--sh-cyan));
}
.sh-beam .s1 {
  animation-delay: 0.06s;
}
.sh-beam .s2 {
  animation-delay: 0.12s;
}
@keyframes shSlash {
  50% {
    stroke-dashoffset: 0;
    opacity: 1;
  }
  100% {
    stroke-dashoffset: -70;
    opacity: 0;
  }
}
@keyframes shFade {
  to {
    opacity: 0;
  }
}
.sh-imp .fl {
  fill: rgba(255, 255, 255, 0.85);
  transform-box: fill-box;
  transform-origin: center;
  animation: shFl 0.35s ease-out forwards;
}
.sh-imp .rg {
  fill: none;
  stroke-width: 4;
  transform-box: fill-box;
  transform-origin: center;
  animation: shRing 0.6s ease-out forwards;
}
.sh-imp .rg.r2 {
  stroke-width: 2;
  animation-delay: 0.08s;
}
.sh-imp.foe .rg {
  stroke: var(--sh-red);
}
.sh-imp.hero .rg {
  stroke: var(--sh-cyan);
}
@keyframes shFl {
  from {
    transform: scale(0.3);
    opacity: 1;
  }
  to {
    transform: scale(1.2);
    opacity: 0;
  }
}
@keyframes shRing {
  from {
    transform: scale(0.2);
    opacity: 1;
  }
  to {
    transform: scale(1.7);
    opacity: 0;
  }
}
.board.sh-shake > svg {
  animation: shShake 0.42s ease;
}
.board.sh-shake2 > svg {
  animation: shShake2 0.46s ease;
}
@keyframes shShake {
  25% {
    transform: translate(-4px, 2px);
  }
  50% {
    transform: translate(3px, -2px);
  }
  75% {
    transform: translate(-2px, 1px);
  }
}
@keyframes shShake2 {
  15% {
    transform: translate(-9px, 4px);
  }
  30% {
    transform: translate(8px, -5px);
  }
  45% {
    transform: translate(-6px, 3px);
  }
  60% {
    transform: translate(4px, -2px);
  }
  80% {
    transform: translate(-2px, 1px);
  }
}

/* ── over the board: the card being played, banners, toasts, the round's tally ── */
#mshow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 8;
  overflow: hidden;
}
.sh-cast {
  position: absolute;
  top: 40px;
  width: 210px;
  padding: 12px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 7px;
  color: #e6e9ff;
  background: var(--sh-panel);
  border: 1px solid color-mix(in srgb, var(--sh-cyan) 60%, transparent);
  box-shadow:
    0 30px 60px rgba(0, 0, 0, 0.7),
    0 0 40px color-mix(in srgb, var(--sh-cyan) 25%, transparent);
  clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
  animation: shCast 1.3s cubic-bezier(0.2, 1.2, 0.3, 1) forwards;
}
.sh-cast.hero {
  left: 24px;
}
.sh-cast.foe {
  right: 24px;
  border-color: color-mix(in srgb, var(--sh-red) 70%, transparent);
  box-shadow:
    0 30px 60px rgba(0, 0, 0, 0.7),
    0 0 40px color-mix(in srgb, var(--sh-red) 30%, transparent);
  animation-name: shCastF;
}
@keyframes shCast {
  0% {
    opacity: 0;
    transform: translateY(40px) rotate(-6deg) scale(0.7);
  }
  18% {
    opacity: 1;
    transform: translateY(0) rotate(1deg) scale(1.04);
  }
  30% {
    transform: none;
  }
  80% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateY(-16px) scale(0.96);
  }
}
@keyframes shCastF {
  0% {
    opacity: 0;
    transform: translateY(40px) rotate(6deg) scale(0.7);
  }
  18% {
    opacity: 1;
    transform: translateY(0) rotate(-1deg) scale(1.04);
  }
  30% {
    transform: none;
  }
  80% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateY(-16px) scale(0.96);
  }
}
.sh-cast .ck {
  font-family: var(--serif);
  font-size: 10.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--sh-cyan);
}
.sh-cast.foe .ck {
  color: var(--sh-red-hi);
}
.sh-cast .cn {
  font-family: var(--sh-serif);
  font-weight: 700;
  font-size: 22px;
  line-height: 1.05;
  color: #fff;
}
.sh-cast .ca {
  height: 96px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: radial-gradient(circle, color-mix(in srgb, var(--sh-red) 25%, transparent), transparent 70%);
}
.sh-cast .ca .hart {
  width: 100%;
  height: 100%;
}
.sh-cast .ct {
  font-size: 12.5px;
  line-height: 1.45;
  color: #c3c8ee;
}
.sh-band {
  position: absolute;
  left: 0;
  right: 0;
  top: 38%;
  height: 130px;
  margin-top: -65px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(180deg, transparent, rgba(0, 1, 10, 0.8) 30%, rgba(0, 1, 10, 0.8) 70%, transparent);
  animation: shBand 2.7s ease forwards;
}
.sh-band b {
  font-family: var(--sh-serif);
  font-weight: 700;
  font-size: clamp(28px, 4.4vw, 58px);
  letter-spacing: 0.2em;
  text-align: center;
  color: var(--sh-gold);
  text-shadow: 0 0 30px rgba(232, 194, 122, 0.45);
  animation: shBandT 2.7s ease forwards;
}
.sh-band span {
  font-family: var(--serif);
  font-size: 13px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: #c3c8ee;
}
.sh-band.red b {
  color: var(--sh-red-hi);
  text-shadow: 0 0 36px rgba(255, 59, 92, 0.55);
}
.sh-band.cyan b {
  color: #8fefff;
  text-shadow: 0 0 30px rgba(0, 212, 255, 0.5);
}
.sh-band.violet b {
  color: #d8b4ff;
  text-shadow: 0 0 30px rgba(166, 0, 255, 0.5);
  font-size: clamp(24px, 3.4vw, 44px);
}
@keyframes shBand {
  0% {
    opacity: 0;
  }
  15% {
    opacity: 1;
  }
  78% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}
@keyframes shBandT {
  0% {
    letter-spacing: 0.42em;
    filter: blur(6px);
    opacity: 0;
  }
  25% {
    letter-spacing: 0.2em;
    filter: none;
    opacity: 1;
  }
  100% {
    letter-spacing: 0.16em;
  }
}
.sh-toasts {
  position: absolute;
  left: 14px;
  bottom: 58px;
  width: min(280px, 60%);
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.sh-toast {
  display: flex;
  gap: 9px;
  align-items: center;
  padding: 6px 10px 6px 0;
  font-size: 12px;
  line-height: 1.35;
  color: #e6e9ff;
  background: rgba(6, 10, 40, 0.9);
  border: 1px solid rgba(120, 130, 200, 0.25);
  animation: shToast 0.35s cubic-bezier(0.2, 1.3, 0.4, 1);
}
.sh-toast i {
  width: 4px;
  align-self: stretch;
  flex: 0 0 auto;
  background: var(--sh-cyan);
}
.sh-toast b {
  font-family: var(--serif);
  letter-spacing: 0.1em;
}
.sh-toast.rd i {
  background: var(--sh-red);
}
.sh-toast.rd b {
  color: var(--sh-red-hi);
}
.sh-toast.gold i {
  background: #ffc94d;
}
.sh-toast.gold b {
  color: #ffe29a;
}
.sh-toast.cy b {
  color: #7fe9ff;
}
@keyframes shToast {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
}
.sh-sum {
  position: absolute;
  left: 50%;
  top: 34px;
  width: 400px;
  max-width: calc(100% - 32px);
  margin-left: -200px;
  padding: 14px 18px;
  box-sizing: border-box;
  text-align: center;
  color: #e6e9ff;
  background: linear-gradient(180deg, rgba(20, 27, 82, 0.96), rgba(7, 11, 44, 0.96));
  border: 1px solid color-mix(in srgb, var(--sh-gold) 55%, transparent);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
  animation: shSum 3.4s ease forwards;
}
@media (max-width: 460px) {
  .sh-sum {
    left: 16px;
    margin-left: 0;
  }
}
@keyframes shSum {
  0% {
    opacity: 0;
    transform: translateY(-14px) scale(0.95);
  }
  10% {
    opacity: 1;
    transform: none;
  }
  85% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}
.sh-sum .sk {
  font-family: var(--serif);
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--sh-gold);
}
.sh-sum .sn {
  font-family: var(--sh-serif);
  font-weight: 700;
  font-size: 24px;
  margin: 4px 0 10px;
}
.sh-sum .row {
  display: flex;
  justify-content: space-around;
}
.sh-sum .row div {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family: var(--serif);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #8a90c0;
}
.sh-sum .row b {
  font-family: var(--sh-serif);
  font-size: 28px;
  color: #fff;
  letter-spacing: 0;
}
.sh-sum .acc {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid color-mix(in srgb, var(--sh-gold) 30%, transparent);
  font-size: 12.5px;
  color: #c3c8ee;
}

/* ── the camera ── */
.board .camz {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 6;
  display: flex;
  flex-direction: column;
  gap: 4px;
  opacity: 0.75;
  transition: opacity 0.2s;
}
.board .camz:hover {
  opacity: 1;
}
.board .camz button {
  min-width: 32px;
  height: 30px;
  padding: 0 8px;
  font-family: var(--serif);
  font-size: 14px;
  background: var(--panel2);
}
.board .camz .pc {
  font-size: 11px;
  letter-spacing: 0.1em;
}
@media (pointer: fine) {
  .board.zoomed > svg {
    cursor: grab;
  }
  .board.zoomed.dragging > svg {
    cursor: grabbing;
  }
}

/* reduced motion: the numbers and words stay, the motion goes */
.calm .sh-beam,
.calm .sh-imp {
  display: none;
}
.calm .board.sh-shake > svg,
.calm .board.sh-shake2 > svg {
  animation: none;
}
.calm .sh-band,
.calm .sh-band b,
.calm .sh-sum {
  animation-duration: 2s;
}


/* ───── ui/journey.css ───── */
/* ============================================================================
   TUMULT — THE DRAFT AND THE ROUTE (Frogma "Finalised UI": D-Draft-v2, Route 3,
   G-JoinRoute). The draft keeps today's cards and flow in a frosted panel with
   the kit filling up along its foot. The route reads like a climb: the Heart at
   the top, the legs to come as bands, the next stops as big art cards, the stops
   passed below. The chart of the whole route stays, folded, underneath.
   ========================================================================== */

/* ---------- the draft ---------- */
.draft2 {
  clip-path: none;
  border-radius: 16px;
  backdrop-filter: blur(8px);
  padding: 18px 20px;
}
.draft2::before {
  display: none;
}
.draft2 .d2-head {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.draft2 .d2-head h3 {
  margin: 0;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.draft2 .d2-tab {
  padding: 8px 18px;
  font-family: var(--serif);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: 1px solid var(--line2);
}
.draft2 .d2-tab.on {
  background: var(--gold);
  color: #1a1205;
  border-color: var(--gold);
}
.draft2 .pack {
  margin-top: 6px;
}
.draft2 .d2-kit {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.draft2 .d2-kit .lab {
  font-family: var(--serif);
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--dim);
  width: 40px;
}
.kit-slot {
  width: 118px;
  height: 56px;
  box-sizing: border-box;
  padding: 6px 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-family: var(--serif);
  font-size: 12px;
  line-height: 1.2;
  color: var(--dim);
  border: 1px dashed var(--line2);
  border-radius: 8px;
  overflow: hidden;
}
.kit-slot.full {
  --c: var(--glow);
  border: 1px solid color-mix(in srgb, var(--c) 55%, var(--line2));
  background: linear-gradient(180deg, color-mix(in srgb, var(--c) 16%, transparent), transparent), var(--panel2);
  color: var(--txt);
  animation: kitIn 0.35s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.kit-slot.next {
  border-color: var(--glow);
  color: var(--glow);
  box-shadow: 0 0 14px color-mix(in srgb, var(--glow) 25%, transparent);
}
@keyframes kitIn {
  from {
    transform: translateY(10px);
    opacity: 0;
  }
  to {
    transform: none;
    opacity: 1;
  }
}
.draft2 .d2-acts {
  margin-left: auto;
  display: flex;
  gap: 8px;
}

/* ---------- the route: a journey column ---------- */
.route3 {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 20px;
  margin-top: 12px;
  align-items: start;
}
.r3-squad .partybar {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
}
.r3-squad .partybar > .panel {
  clip-path: none;
  border-radius: 14px;
}
.r3-squad .partybar > .panel::before {
  display: none;
}
.r3-line {
  margin-bottom: 8px;
}
.journey {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 900px;
}
.j-heart {
  position: relative;
  height: 84px;
  border: 1px solid #ff6b7a;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background-color: #12050a;
  background-size: cover;
  background-position: center;
  overflow: hidden;
  box-shadow: 0 0 22px rgba(255, 107, 122, 0.45);
  animation: heartGlow 1.8s ease-in-out infinite;
}
.j-heart::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, rgba(90, 13, 26, 0.75), rgba(18, 5, 10, 0.92));
}
.j-heart > * {
  position: relative;
}
.j-heart-t {
  font-family: var(--serif);
  font-size: 22px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: #ffb3bc;
}
.j-heart .small {
  color: #ff8f9b;
}
@keyframes heartGlow {
  0%,
  100% {
    box-shadow: 0 0 18px rgba(255, 107, 122, 0.4);
  }
  50% {
    box-shadow: 0 0 36px rgba(255, 107, 122, 0.8);
  }
}
.j-leg,
.j-past {
  position: relative;
  border: 1px solid var(--line2);
  border-radius: 12px;
  overflow: hidden;
  background-color: var(--panel2);
  background-size: cover;
  background-position: center;
}
.j-leg {
  height: 70px;
  opacity: 0.7;
  filter: grayscale(0.45);
}
.j-past {
  height: 52px;
}
.j-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(5, 10, 20, 0.92), rgba(5, 10, 20, 0.55));
}
.j-leg-t,
.j-past-t {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  right: 16px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.j-leg-t b,
.j-past-t b {
  font-family: var(--serif);
  font-weight: 600;
}
.j-past-t .ok {
  color: var(--gold);
  margin-right: 4px;
}
.j-start {
  border-style: dashed;
  background: none;
}
.j-now {
  padding: 8px 0 0;
}
.j-now .kick {
  margin: 0 10px 0 0;
}
.journey .stopcards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  margin-bottom: 6px;
}
.journey .stopcard {
  border-color: var(--glow);
  box-shadow: 0 0 14px color-mix(in srgb, var(--glow) 35%, transparent);
  animation: stopGlow 2.2s ease-in-out infinite;
}
@keyframes stopGlow {
  0%,
  100% {
    box-shadow: 0 0 12px color-mix(in srgb, var(--glow) 30%, transparent);
  }
  50% {
    box-shadow:
      0 0 0 6px color-mix(in srgb, var(--glow) 10%, transparent),
      0 0 22px color-mix(in srgb, var(--glow) 60%, transparent);
  }
}
.route-panel > summary {
  cursor: pointer;
  list-style: none;
}
.route-panel > summary::-webkit-details-marker {
  display: none;
}
.route-panel > summary::before {
  content: '▸';
  margin-right: 6px;
  color: var(--dim);
}
.route-panel[open] > summary::before {
  content: '▾';
}
.route-panel[open] > summary {
  margin-bottom: 8px;
}

/* ---------- joining on the route ---------- */
.joincard {
  clip-path: none;
  border-radius: 16px;
  margin-top: 10px;
}
.joincard::before {
  display: none;
}
.joincard h3 {
  margin: 4px 0;
}
.j-seats {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.j-seat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.j-seat.waiting .pfp {
  border: 2px dashed var(--gold);
}
.pulse-t {
  color: var(--gold);
  animation: pulseT 1.6s ease-in-out infinite;
}
@keyframes pulseT {
  0%,
  100% {
    opacity: 0.4;
  }
  50% {
    opacity: 1;
  }
}

html[data-motion='reduced'] .j-heart,
html[data-motion='reduced'] .journey .stopcard,
html[data-motion='off'] .j-heart,
html[data-motion='off'] .journey .stopcard,
html[data-motion='off'] .pulse-t,
html[data-motion='off'] .kit-slot.full {
  animation: none;
}

@media (max-width: 900px) {
  .route3 {
    grid-template-columns: minmax(0, 1fr);
  }
  .r3-squad {
    order: 2;
  }
  .j-heart {
    height: 64px;
  }
  .j-heart-t {
    font-size: 17px;
  }
  .draft2 .d2-acts {
    margin-left: 0;
    width: 100%;
  }
  .kit-slot {
    width: calc((100% - 50px) / 3);
  }
}


/* ───── ui/after.css ───── */
/* ============================================================================
   After a mission and the end of an expedition (src/ui/after.js): the
   Frogma board's Finalised UI rows 8 and 9, desktop and phone. Colours come
   from the theme and the sea (theme.css, sea.css); the call to act follows the
   accent the player picked in Look. Motion follows Look's motion setting.
   ========================================================================== */
.am {
  position: relative;
  min-height: 100%;
  box-sizing: border-box;
  padding: 14px clamp(16px, 4vw, 56px) 28px;
  max-width: 1400px;
  margin: 0 auto;
  isolation: isolate;
}
.am-bg,
.am-veil {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}
.am-bg {
  background-size: cover;
  background-position: center 30%;
  opacity: 0.55;
  animation: am-kb 24s ease-in-out infinite alternate;
}
.am-bg.grey {
  filter: grayscale(1) brightness(0.7);
}
.am-bg.side {
  opacity: 0.18;
  filter: blur(6px);
}
.am-veil {
  /* these screens sit on a dark wash whatever the sea, so the words read on the painting (the Shore sea is light) */
  background: linear-gradient(0deg, rgba(4, 9, 18, 0.97) 24%, rgba(4, 9, 18, 0.62));
}
.am-veil.plain {
  background: radial-gradient(120% 90% at 30% 10%, rgba(10, 34, 56, 0.9), rgba(3, 8, 18, 0.97));
}
.am {
  color: #dbe7f5;
}
.am button.ghost,
.am .am-ghost,
.am-sheet .am-ghost,
.am .am-tab,
.am .am-fbtn,
.am-sheet .am-fbtn {
  color: #dbe7f5;
}
.am-veil.grey {
  background:
    radial-gradient(60% 60% at 50% 40%, transparent, rgba(40, 5, 12, 0.55)),
    linear-gradient(0deg, rgba(14, 4, 8, 0.96) 30%, rgba(14, 4, 8, 0.55));
}
.am-veil.heart {
  background:
    radial-gradient(50% 45% at 50% 46%, rgba(240, 195, 90, 0.16), transparent 70%),
    linear-gradient(0deg, rgba(4, 9, 18, 0.97) 25%, rgba(4, 9, 18, 0.6));
}
@keyframes am-kb {
  from {
    transform: scale(1.02);
  }
  to {
    transform: scale(1.1) translate(-20px, -8px);
  }
}

/* ---------- the top strip ---------- */
.am-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.am-top .right {
  margin-left: auto;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* ---------- words ---------- */
.am-eye {
  font-family: var(--serif);
  font-size: 12px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
}
.am-eye.red,
.am-lab.red {
  color: #ff9aa6;
}
.am-big {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: 0.06em;
  line-height: 1;
  text-transform: uppercase;
  font-size: clamp(48px, 8vw, 96px);
  margin: 10px 0 0;
}
.am-big.gold {
  background: linear-gradient(90deg, #f6d78a, #fff6c8, #f6d78a);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: am-shim 4s linear infinite;
}
.am-big.red {
  color: #ffd0d6;
  font-size: clamp(40px, 6.5vw, 80px);
}
@keyframes am-shim {
  from {
    background-position: 200% 0;
  }
  to {
    background-position: -200% 0;
  }
}
.am-h {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: 0.05em;
  font-size: clamp(26px, 3.2vw, 40px);
  line-height: 1.12;
  margin: 6px 0 4px;
}
.am-h.xl {
  font-size: clamp(36px, 5vw, 64px);
}
.am-sub {
  font-size: 16px;
  line-height: 1.55;
  color: #c7d5e6;
  margin: 12px auto 0;
  max-width: 760px;
}
.am-lab {
  font-family: var(--serif);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #8ea3bf;
  margin: 4px 0 2px;
}
.am-lab.gold {
  color: var(--gold);
}
.am-lab.ok {
  color: #6fe0a0;
}
.am .ok {
  color: #6fe0a0;
}
.am-hero {
  text-align: center;
  padding: clamp(16px, 5vh, 56px) 0 clamp(16px, 4vh, 40px);
  animation: am-rise 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.am-head {
  padding: 18px 0 14px;
}
@keyframes am-rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.am .chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border: 1px solid var(--line2);
  border-radius: 12px;
  font-size: 12px;
  color: #b9c9de;
  white-space: nowrap;
}
.am .chip.gold {
  border-color: color-mix(in srgb, var(--gold) 60%, transparent);
  color: var(--gold);
}
.am .check,
.am .xmark {
  display: inline-flex;
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
}
.am .check {
  background: #6fe0a0;
  color: #06210f;
}
.am .xmark {
  background: #ff6b7a;
  color: #2a0508;
}

/* ---------- buttons ---------- */
.am .am-cta {
  min-height: 52px;
  padding: 0 30px;
  border-radius: 26px;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  box-shadow: 0 8px 24px color-mix(in srgb, var(--accent, #1f8ea3) 35%, transparent);
}
.am .am-cta:disabled {
  box-shadow: none;
}
.am .am-ghost,
.am-sheet .am-ghost {
  min-height: 46px;
  padding: 0 22px;
  border-radius: 24px;
  font-family: var(--serif);
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: rgba(8, 16, 30, 0.55);
  border: 1px solid var(--line2);
}
.am .am-ghost.sm,
.am-sheet .am-ghost.sm {
  min-height: 38px;
  font-size: 12px;
}
.am-sheet .am-cta.wide,
.am-sheet .am-ghost.wide {
  width: 100%;
}
.am-foot {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  margin-top: 20px;
}
.am-foot.center {
  justify-content: center;
}
.am-foot.left,
.am-foot.inline {
  justify-content: flex-start;
}

/* ---------- panels and grids ---------- */
.am .panel {
  border-radius: 16px;
  backdrop-filter: blur(10px);
}
.am-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.25fr);
  gap: 24px;
  align-items: start;
}
.am-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
.am-col.narrow {
  flex: 0 0 260px;
}
.am-one {
  display: flex;
  gap: 30px;
  max-width: 860px;
  margin: 0 auto;
  padding: 22px;
}
.am-one > .am-col:first-child {
  flex: 1;
}
.am-redline {
  border-color: rgba(255, 107, 122, 0.4);
}
.am-obj {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
}
.am-said {
  font-family: var(--flavor);
  font-style: italic;
  color: #e6c4c9;
}
.am-hearts {
  display: flex;
  gap: 10px;
}
.am-hearts i {
  font-style: normal;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid #3a2a30;
  color: #3a2a30;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}
.am-hearts i.on {
  border-color: #ff6b7a;
  color: #ff6b7a;
  animation: am-beat 1.8s ease-in-out infinite;
}
@keyframes am-beat {
  0%,
  100% {
    box-shadow: 0 0 10px rgba(255, 107, 122, 0.4);
  }
  50% {
    box-shadow: 0 0 26px rgba(255, 107, 122, 0.85);
  }
}

/* ---------- the squad ---------- */
.am-squad {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.am-squad.tight {
  margin-top: 8px;
}
.am-sq {
  display: flex;
  gap: 12px;
  align-items: center;
}
.am-sqb {
  flex: 1;
  min-width: 0;
}
.am-hp {
  height: 6px;
  border-radius: 3px;
  background: rgba(127, 227, 240, 0.12);
  overflow: hidden;
  margin-top: 4px;
}
.am-hp i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #1f8ea3, #6fe0a0);
  border-radius: 3px;
}
.pfp.am-pf {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
}
.pfp.am-pf-xs {
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
}
.pfp.am-pf-xl {
  width: 140px;
  height: 140px;
  border: 3px solid var(--gold);
  box-shadow: 0 0 30px rgba(240, 195, 90, 0.45);
  animation: am-halo 3s ease-in-out infinite;
}
@keyframes am-halo {
  0%,
  100% {
    box-shadow: 0 0 18px rgba(240, 195, 90, 0.35);
  }
  50% {
    box-shadow: 0 0 40px rgba(240, 195, 90, 0.75);
  }
}

/* ---------- a trait as a tile ---------- */
.am-tile {
  position: relative;
  width: 132px;
  min-height: 176px;
  flex: 0 0 auto;
  box-sizing: border-box;
  padding: 8px 9px 9px;
  border-radius: 10px;
  border: 2px solid #9c7a32;
  background: linear-gradient(180deg, #13233c, #0b1526);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  text-align: left;
  gap: 3px;
  color: #e6eef8;
  font: inherit;
  cursor: default;
  transition:
    transform 0.18s,
    box-shadow 0.18s,
    border-color 0.18s;
}
button.am-tile {
  cursor: pointer;
}
button.am-tile:hover:not(:disabled) {
  transform: translateY(-4px);
  border-color: var(--gold);
}
.am-tile .hart {
  margin: 14px 0 6px;
  height: 46px;
}
.am-tn {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 14px;
  line-height: 1.15;
  margin-top: auto;
}
.am-tc {
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  display: flex;
  align-items: center;
  gap: 4px;
}
.am-tc .icn {
  width: 14px;
  height: 14px;
}
.am-tl {
  font-family: var(--serif);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: #9fb2cb;
}
.am-gem {
  position: absolute;
  right: 9px;
  top: 9px;
  width: 12px;
  height: 12px;
  transform: rotate(45deg);
  background: var(--el);
  box-shadow: 0 0 10px var(--el);
}
.am-tile.sel {
  border-color: var(--gold);
  box-shadow:
    0 0 0 3px rgba(240, 195, 90, 0.25),
    0 10px 28px rgba(0, 0, 0, 0.55),
    0 0 26px rgba(240, 195, 90, 0.35);
  transform: translateY(-4px);
  animation: am-rest 4s ease-in-out infinite;
}
@keyframes am-rest {
  0%,
  100% {
    box-shadow:
      0 0 0 3px rgba(240, 195, 90, 0.25),
      0 10px 28px rgba(0, 0, 0, 0.55),
      0 0 14px rgba(240, 195, 90, 0.2);
  }
  50% {
    box-shadow:
      0 0 0 3px rgba(240, 195, 90, 0.25),
      0 10px 28px rgba(0, 0, 0, 0.55),
      0 0 30px rgba(240, 195, 90, 0.5);
  }
}
.am-tile.swap::before {
  content: '⇄';
  position: absolute;
  left: 8px;
  top: 4px;
  color: var(--glow);
  font-size: 14px;
}
.am-tile.out {
  border-color: #ff6b7a;
  box-shadow: 0 0 0 3px rgba(255, 107, 122, 0.3);
  opacity: 0.85;
}
.am-x {
  position: absolute;
  right: -9px;
  top: -9px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #ff6b7a;
  color: #2a0508;
  font-weight: 700;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.am-tile.dim {
  opacity: 0.45;
}
.am-tile.asleep {
  border-style: dashed;
}
.am-tile.maxed {
  border-color: var(--gold);
}
.am-tile.big {
  width: 170px;
  min-height: 236px;
}
.am-tile.big .hart {
  height: 80px;
  margin-top: 26px;
}
.am-tile.glow {
  border-color: var(--glow);
  animation: am-glow 2.2s ease-in-out infinite;
}
@keyframes am-glow {
  0%,
  100% {
    box-shadow: 0 0 14px color-mix(in srgb, var(--glow) 50%, transparent);
  }
  50% {
    box-shadow:
      0 0 0 8px color-mix(in srgb, var(--glow) 15%, transparent),
      0 0 26px color-mix(in srgb, var(--glow) 80%, transparent);
  }
}
.am-tile.sm {
  width: 96px;
  min-height: 128px;
  padding: 6px;
}
.am-tile.sm .hart {
  height: 30px;
  margin-top: 10px;
}
.am-tile.sm .am-tn {
  font-size: 12px;
}

/* ---------- rewards ---------- */
.am-rewards {
  padding: 18px 20px;
}
.am-chips {
  margin-left: auto;
  gap: 6px;
  flex-wrap: wrap;
}
.am-tabs,
.am-endtabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: 22px;
  background: rgba(8, 16, 30, 0.7);
  border: 1px solid var(--line);
  align-self: flex-start;
  flex-wrap: wrap;
}
.am-endtabs {
  margin: 0 auto 6px;
  width: max-content;
  max-width: 100%;
}
.am-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  border-radius: 18px;
  border: 0;
  background: none;
  font-size: 13px;
  color: #8ea3bf;
  min-height: 36px;
}
.am-tab.on {
  background: color-mix(in srgb, var(--glow) 18%, transparent);
  color: #fff;
}
.am-tab .check-s {
  color: #6fe0a0;
  font-weight: 700;
}
.am-tab .dot-s {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
}
.am-pick {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.am-offer {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  padding: 6px 2px;
}
.am-faces {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.am-face {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(5, 10, 20, 0.45);
  font-size: 12.5px;
  line-height: 1.45;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.am-face.E {
  border-style: dashed;
}
.am-face b {
  font-family: var(--serif);
}
.am-acts {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}
.am-done {
  color: #bfe8cf;
  margin: 4px 0;
}
.am-boons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.am-boon {
  flex: 1 1 200px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 12px 14px;
  text-align: left;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, #b58cff 50%, transparent);
  background: linear-gradient(180deg, rgba(60, 40, 100, 0.35), rgba(10, 14, 30, 0.6));
}
.am-boon:hover {
  border-color: #c9b6ff;
}
.am-bi .icn {
  width: 28px;
  height: 28px;
}
.am-take {
  margin-top: 4px;
  font-family: var(--serif);
  letter-spacing: 0.14em;
  font-size: 11px;
  text-transform: uppercase;
  color: #c9b6ff;
}
.am-grow {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-right: auto;
}

/* ---------- the full kit's exchange ---------- */
.am-swaprow {
  display: flex;
  gap: 26px;
  align-items: center;
}
.am-in {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.am-arrow {
  font-size: 34px;
  color: var(--glow);
}
.am-kit {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  flex: 1;
}
.am-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 12px 16px;
  margin-top: 22px;
}
.am-bartxt {
  flex: 1 1 260px;
  font-size: 14px;
}

/* ---------- grow one card ---------- */
.modal:has(> .am-sheet) {
  max-width: 1180px;
  max-height: 94vh;
  padding: 18px 22px;
  background: rgba(5, 11, 22, 0.96);
  color: #dbe7f5;
}
.am-uphead {
  display: flex;
  align-items: center;
  gap: 4px 14px;
  flex-wrap: wrap;
}
.am-uphead .am-eye {
  flex-basis: 100%;
}
.am-uphead .am-h {
  margin: 0;
}
.am-uptools {
  margin-left: auto;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}
.am-uptools .ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.am-upbody {
  display: grid;
  grid-template-columns: 300px minmax(260px, 340px) minmax(0, 1fr);
  gap: 22px;
  margin-top: 14px;
  align-items: start;
}
.am-upkit {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-height: 64vh;
  overflow: auto;
  padding: 4px;
}
.am-upkit .am-tile {
  width: 88px;
  min-height: 120px;
  padding: 6px;
}
.am-upkit .am-tile .hart {
  height: 28px;
  margin: 10px 0 4px;
}
.am-upkit .am-tn {
  font-size: 11.5px;
}
.am-upkit .am-tc {
  font-size: 9px;
}
.am-upcard {
  position: relative;
  animation: am-lift 3.4s ease-in-out infinite;
}
.am-upcard .tcard {
  border: 2px solid var(--gold);
  box-shadow:
    0 14px 40px rgba(0, 0, 0, 0.6),
    0 0 30px rgba(240, 195, 90, 0.25);
}
@keyframes am-lift {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}
.am-spark {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}
.am-spark i {
  position: absolute;
  bottom: 10%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 10px var(--gold);
  opacity: 0;
  animation: am-spark 3.2s linear infinite;
}
.am-spark i:nth-child(1) {
  left: 12%;
}
.am-spark i:nth-child(2) {
  left: 34%;
  animation-delay: 0.7s;
}
.am-spark i:nth-child(3) {
  left: 58%;
  animation-delay: 1.4s;
}
.am-spark i:nth-child(4) {
  left: 80%;
  animation-delay: 2.1s;
}
.am-spark i:nth-child(5) {
  left: 46%;
  animation-delay: 2.7s;
}
@keyframes am-spark {
  0% {
    transform: translateY(0) scale(1);
    opacity: 0;
  }
  15% {
    opacity: 1;
  }
  100% {
    transform: translateY(-240px) scale(0.3);
    opacity: 0;
  }
}
/* the moment a card grows: a burst of light and a lift */
.am-upcard.am-grown .tcard {
  animation: am-burst 1.1s cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes am-burst {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(240, 195, 90, 0.9);
    filter: brightness(1);
  }
  30% {
    transform: scale(1.05) rotate(-1deg);
    box-shadow: 0 0 0 18px rgba(240, 195, 90, 0.25);
    filter: brightness(1.45);
  }
  100% {
    transform: scale(1);
    box-shadow:
      0 14px 40px rgba(0, 0, 0, 0.6),
      0 0 30px rgba(240, 195, 90, 0.25);
    filter: brightness(1);
  }
}
.am-upcard.am-grown .am-spark i {
  animation-duration: 1.2s;
}
.am-upside {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-radius: 16px;
}
.am-fbtns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.am-fbtn {
  min-height: 44px;
  border-radius: 22px;
  font-family: var(--serif);
  font-size: 13px;
  letter-spacing: 0.08em;
  background: none;
  border: 1px solid var(--line2);
}
.am-fbtn.on {
  background: color-mix(in srgb, var(--gold) 22%, transparent);
  border-color: var(--gold);
  color: #fff;
}
.am-before {
  color: #9fb2cb;
  font-size: 15px;
}
.am-after {
  color: #fff;
  font-size: 15px;
}

/* ---------- haven and events ---------- */
.am-split {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 32px;
  align-items: start;
}
.am-art {
  position: sticky;
  top: 12px;
  height: min(78vh, 720px);
  border-radius: 18px;
  background-size: cover;
  background-position: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  border: 1px solid var(--line);
}
.am-main {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  padding-top: 8px;
}
.am-main .am-sub {
  margin: 0;
}
.am-opts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.am-opt {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--panel);
}
.am-opt b {
  font-family: var(--serif);
  font-size: 17px;
}
.am-opt.done {
  border-color: color-mix(in srgb, #6fe0a0 50%, transparent);
}
.am-opt.quiet {
  opacity: 0.7;
}
.am-oi {
  font-size: 20px;
  width: 26px;
}
.am-oi.heal {
  color: #6fe0a0;
}
.am-oi.gold {
  color: var(--gold);
}
.am-oi.up {
  color: #b58cff;
}
.am-oi.canon {
  color: var(--glow);
}
.am-ob {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-top: auto;
}
.am-row2 {
  margin: 6px 0;
  max-width: 460px;
}
.am-stalls {
  margin-top: 8px;
  scroll-margin-top: 12px;
}
.am-wares {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 10px;
  margin: 6px 0 12px;
}
.am-ware {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--panel2);
}
.am-wi .icn {
  width: 22px;
  height: 22px;
}
.am-buy {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: 4px;
}
.am-story-l,
.am-result {
  font-family: var(--flavor);
  font-size: 16px;
  line-height: 1.6;
  color: #dbe7f5;
}
.am-result {
  border-left: 3px solid var(--gold);
  padding-left: 12px;
}
.am-choices {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.am-choice {
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  padding: 14px 16px;
  min-height: 52px;
  border-radius: 14px;
  border: 1px solid var(--line2);
  background: var(--panel);
  font-size: 15px;
}
.am-choice > span:first-child {
  flex: 1;
}
.am-choice:hover:not(:disabled) {
  border-color: var(--glow);
}
.am-evpick {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* ---------- the end of an expedition ---------- */
.am-crew {
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
  margin: 8px 0 26px;
}
.am-crewm {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
}
.am-crewm b {
  font-family: var(--serif);
  margin-top: 6px;
}
.am-route {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 10px 0;
}
.am-fallmain .am-route {
  justify-content: flex-start;
}
.am-stop {
  position: relative;
  width: 150px;
  height: 86px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line2);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 6px 8px;
  box-sizing: border-box;
}
.am-stopart {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.55;
  z-index: -1;
}
.am-stop::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 30%, rgba(5, 10, 20, 0.92));
  z-index: -1;
}
.am-st {
  align-self: flex-end;
  font-size: 11px;
  color: #6fe0a0;
}
.am-stop.lost .am-st {
  color: #ff6b7a;
}
.am-stop.haven .am-st,
.am-stop.event .am-st {
  color: var(--glow);
}
.am-sn {
  font-size: 12px;
  color: #fff;
}
.am-fallen .am-grid {
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.9fr);
  padding-top: 26px;
}
.am-fallen .am-sub {
  margin: 12px 0 0;
}
.am-fallen .panel {
  padding: 18px 20px;
}
.am-carry {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  font-size: 14px;
}
.am-ci {
  color: var(--gold);
  font-size: 18px;
  width: 22px;
  text-align: center;
}
.am-kept {
  text-align: center;
}

/* the logbook: a page of a printed log */
.am-paper {
  position: relative;
  max-width: 1160px;
  margin: 6px auto 0;
  background: #efe6d2;
  color: #22190e;
  border-radius: 6px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
  padding: clamp(20px, 4vw, 44px) clamp(18px, 4vw, 56px);
  box-sizing: border-box;
  animation: am-rise 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.am-ph {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 16px;
  border-bottom: 2px solid #22190e;
  padding-bottom: 10px;
}
.am-ph h1 {
  font-family: var(--serif);
  font-size: clamp(28px, 4vw, 40px);
  margin: 0;
}
.am-pw {
  font-size: 14px;
  color: #6b5536;
}
.am-po {
  margin-left: auto;
  font-size: 13px;
  color: #7a1f12;
}
.am-pstops {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px 40px;
  margin-top: 22px;
}
.am-pstop {
  display: flex;
  gap: 16px;
}
.am-pthumb {
  flex: 0 0 140px;
  height: 100px;
  background-size: cover;
  background-position: center;
  filter: sepia(0.35);
  border: 2px solid #22190e;
}
.am-pk {
  font-family: var(--serif);
  font-size: 12px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: #7a1f12;
}
.am-pn {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 700;
}
.am-pt {
  font-family: var(--flavor);
  font-size: 15px;
  line-height: 1.5;
  margin-top: 2px;
}
.am-chron {
  margin-top: 26px;
  padding-top: 14px;
  border-top: 1px solid #b9a982;
}
.am-centry h4 {
  font-family: var(--serif);
  margin: 12px 0 4px;
}
.am-paper .pl {
  color: #2e2416;
  font-family: var(--flavor);
}
.am-paper .pl.term {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 13px;
  color: #4a3a22;
}
.am-paper .pl .own-tag {
  color: #8a7356;
}
.am-last {
  margin-top: 24px;
  padding: 14px 16px;
  border: 1.5px dashed #a07a14;
  font-family: var(--flavor);
  font-size: 16px;
  color: #3a2a14;
}
.am-pacts {
  display: flex;
  gap: 12px;
  margin-top: 22px;
  flex-wrap: wrap;
}
.am .am-ghost.ink {
  color: #22190e;
  border-color: #22190e;
  background: none;
}

/* the numbers */
.am-bignums {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.am-bn {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.am-bn b {
  font-family: var(--serif);
  font-size: 36px;
  font-weight: 500;
}
.am-bn b.ok {
  color: #6fe0a0;
}
.am-bn b.cy {
  color: var(--glow);
}
.am-bn b.red {
  color: #ff7b6b;
}
.am-bn b.gold {
  color: var(--gold);
}
.am-bn span {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #8ea3bf;
}
.am-stats .panel.am-col {
  padding: 16px 20px;
}
.am-ps {
  padding: 8px 0;
  border-top: 1px solid var(--line);
}
.am-barrow {
  display: grid;
  grid-template-columns: 48px 1fr 40px;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: #9fb2cb;
  margin-top: 6px;
}
.am-barrow b {
  text-align: right;
  color: #dbe7f5;
}
.am-b {
  display: block;
  height: 10px;
  border-radius: 5px;
  min-width: 2px;
}
.am-b.dealt {
  background: linear-gradient(90deg, #1f8ea3, #7fe3f0);
}
.am-b.took {
  background: linear-gradient(90deg, #93243a, #ff6b7a);
}
.am-kitend {
  padding: 10px 0;
  border-top: 1px solid var(--line);
}
.am-minirow {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 8px 2px 4px;
}

/* ---------- phones and narrow windows ---------- */
@media (max-width: 980px) {
  .am-grid,
  .am-fallen .am-grid,
  .am-split {
    grid-template-columns: minmax(0, 1fr);
  }
  .am-art {
    position: relative;
    top: 0;
    height: 180px;
  }
  .am-upbody {
    grid-template-columns: minmax(0, 1fr);
  }
  .am-upkit {
    flex-wrap: nowrap;
    overflow-x: auto;
    max-height: none;
  }
  .am-upcard {
    max-width: 340px;
    margin: 0 auto;
  }
}
@media (max-width: 700px) {
  .am {
    padding: 10px 14px 0;
  }
  .am-top .kick {
    display: none;
  }
  .am-hero {
    text-align: left;
    padding: 18px 0 14px;
  }
  .am-sub {
    font-size: 15px;
  }
  .am-one {
    flex-direction: column;
    gap: 14px;
    padding: 16px;
  }
  .am-col.narrow {
    flex: none;
  }
  .am-rewards {
    padding: 14px;
  }
  /* the offer scrolls sideways; the call to act stays under the thumb */
  .am-offer,
  .am-kit {
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 6px;
  }
  .am-tile {
    scroll-snap-align: start;
    width: 112px;
    min-height: 150px;
  }
  .am-faces,
  .am-opts {
    grid-template-columns: 1fr;
  }
  .am-swaprow {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .am-in {
    flex-direction: row;
  }
  .am-tile.big {
    width: 112px;
    min-height: 150px;
  }
  .am-arrow {
    display: none;
  }
  .am-swaprow .am-kit {
    flex: none;
  }
  .am-foot,
  .am-bar {
    position: sticky;
    bottom: 0;
    z-index: 5;
    margin: 16px -14px 0;
    padding: 12px 14px calc(12px + env(safe-area-inset-bottom));
    background: linear-gradient(0deg, rgba(4, 9, 18, 0.98) 70%, transparent);
    border: 0;
    border-radius: 0;
    flex-direction: column;
    align-items: stretch;
  }
  .am-foot.inline {
    position: static;
    margin: 12px 0 0;
    padding: 0;
    background: none;
  }
  .am-foot .am-cta,
  .am-foot .am-ghost,
  .am-bar .am-cta,
  .am-bar .am-ghost {
    width: 100%;
  }
  .am-grow {
    margin: 0;
  }
  .am-grow .am-ghost {
    flex: 1;
  }
  .pfp.am-pf-xl {
    width: 104px;
    height: 104px;
  }
  .am-crew {
    gap: 18px;
  }
  .am-stop {
    width: calc(50% - 5px);
  }
  .am-pstops {
    grid-template-columns: 1fr;
  }
  .am-pthumb {
    flex-basis: 96px;
    height: 76px;
  }
  .am-paper {
    border-radius: 0;
    margin: 0 -14px;
  }
  .modal-bg:has(.am-sheet) {
    padding: 0;
  }
  .modal:has(> .am-sheet) {
    max-height: 100vh;
    height: 100%;
    border-radius: 0;
    padding: 14px;
  }
  .am-uptools {
    margin-left: 0;
  }
}

/* ---------- motion (Look: Reduced keeps it calm, Off is handled for the whole app in sea.css) ---------- */
html[data-motion='reduced'] .am-bg,
html[data-motion='reduced'] .am-big.gold,
html[data-motion='reduced'] .am-upcard,
html[data-motion='reduced'] .am-spark,
html[data-motion='reduced'] .am-tile.sel,
html[data-motion='reduced'] .am-tile.glow,
html[data-motion='reduced'] .am-hearts i.on,
html[data-motion='reduced'] .pfp.am-pf-xl {
  animation: none;
}
html[data-motion='reduced'] .am-spark {
  display: none;
}

/* ---------- print: the logbook alone ---------- */
@media print {
  body * {
    visibility: hidden;
  }
  #am-log,
  #am-log * {
    visibility: visible;
  }
  #am-log {
    position: absolute;
    left: 0;
    top: 0;
    box-shadow: none;
    animation: none;
  }
  .am-pacts {
    display: none;
  }
}


/* ───── ui/shell.css ───── */
/* ============================================================================
   TUMULT — THE APP SHELL AND ITS PAGES
   src/ui/shell.js (the bars, empty states, loading), crew.js (Pilots),
   binder.js (Cards), atlas.js (Atlas), canon.js (the wall), settings.js and
   guide.js (How to play, Codex). From the Frogma board's "Finalised UI" and
   "Finalised UI - Phone" pages. Colours come from the sea (src/ui/sea.css):
   the accent is the call to act, gold is a label, the panels are sea glass.
   ========================================================================== */
:root {
  --hd: 'Chakra Petch', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --ink-t: #dbe7f5;
  --ink-d: #8ea3bf;
  --cy: #7fe3f0;
  --gd: #f0c35a;
  --rs: #ff6b7a;
  --gn: #6fe0a0;
  --glass: rgba(8, 16, 30, 0.66);
  --glass-line: rgba(127, 227, 240, 0.16);
  --cta-a: #b8f06a;
  --cta-b: #6fbf2a;
  --bar-h: 64px;
  --dock-h: 72px;
}
:root.contrast {
  --ink-d: #c3d1e3;
  --dim: #b8c4d6;
  --mute: #9aa8bc;
  --glass-line: rgba(127, 227, 240, 0.42);
  --line: rgba(127, 227, 240, 0.4);
  --line2: rgba(127, 227, 240, 0.6);
}
:root[data-text='s'] #app {
  zoom: 0.92;
}
:root[data-text='l'] #app {
  zoom: 1.12;
}
:root[data-text='xl'] #app {
  zoom: 1.25;
}

/* ---------- the bars ---------- */
.shell {
  min-height: 100%;
  display: flex;
  flex-direction: column;
}
.sh-top {
  position: sticky;
  top: 0;
  z-index: 30;
  height: var(--bar-h);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 32px;
  background: linear-gradient(180deg, rgba(5, 10, 20, 0.92), rgba(5, 10, 20, 0.55));
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(127, 227, 240, 0.08);
}
.sh-logo {
  background: none;
  border: 0;
  padding: 0 28px 0 0;
  font-family: var(--hd);
  font-size: 20px;
  letter-spacing: 0.3em;
  color: #bff4fb;
}
.sh-tabs {
  display: flex;
  height: 100%;
}
.sh-tab {
  height: 100%;
  padding: 0 16px;
  background: none;
  border: 0;
  border-radius: 0;
  font-family: var(--hd);
  font-size: 14px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-d);
}
.sh-tab:hover {
  color: #fff;
  background: rgba(127, 227, 240, 0.05);
}
.sh-tab.on {
  color: #fff;
  box-shadow: inset 0 -3px 0 var(--cy);
}
.sh-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 14px;
}
.sh-gear {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  padding: 0;
  font-size: 17px;
  background: rgba(10, 20, 36, 0.6);
  border: 1px solid rgba(127, 227, 240, 0.25);
}
.sh-gear.on {
  border-color: var(--cy);
  background: rgba(127, 227, 240, 0.16);
}
.sh-main {
  flex: 1;
}
.sh-dock {
  display: none;
}
.sh-more h3 {
  margin: 4px 0 10px;
  font-family: var(--hd);
}
.sh-grab {
  width: 42px;
  height: 5px;
  border-radius: 3px;
  background: #2a4266;
  margin: 0 auto 10px;
}
.sh-more-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 6px;
  text-align: left;
  background: none;
  border: 0;
  border-radius: 0;
  border-top: 1px solid rgba(127, 227, 240, 0.1);
}
.sh-more-row i {
  font-style: normal;
  font-size: 20px;
  width: 28px;
  text-align: center;
  color: var(--cy);
}
.sh-more-row > span:nth-child(2) {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.modal-bg.sheet {
  align-items: flex-end;
}
.modal-bg.sheet .modal {
  width: 100%;
  max-width: 560px;
  border-radius: 22px 22px 0 0;
  margin: 0 auto;
}
.modal-bg.side {
  justify-content: flex-end;
  align-items: stretch;
  padding: 0;
}
.modal-bg.side .modal {
  width: 460px;
  max-width: 100%;
  max-height: none;
  height: 100%;
  border-radius: 0;
  border-left: 1px solid rgba(127, 227, 240, 0.25);
  background: rgba(6, 12, 24, 0.94);
  backdrop-filter: blur(14px);
}
@media (max-width: 760px) {
  .sh-top {
    padding: 0 16px;
    height: 56px;
  }
  .sh-tabs {
    display: none;
  }
  .sh-logo {
    font-size: 15px;
  }
  .sh-dock {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 30;
    height: calc(var(--dock-h) + env(safe-area-inset-bottom, 0px));
    padding: 8px 0 env(safe-area-inset-bottom, 0px);
    background: rgba(5, 10, 20, 0.96);
    border-top: 1px solid rgba(127, 227, 240, 0.14);
  }
  .sh-dock button {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    background: none;
    border: 0;
    border-radius: 0;
    font-family: var(--hd);
    font-size: 11px;
    letter-spacing: 0.06em;
    color: #7088a6;
    min-height: 48px;
  }
  .sh-dock button i {
    font-style: normal;
    font-size: 19px;
  }
  .sh-dock button.on {
    color: #bff4fb;
  }
  .sh-dock button.on i {
    color: var(--cy);
  }
  .sh-main {
    padding-bottom: calc(var(--dock-h) + 12px + env(safe-area-inset-bottom, 0px));
  }
}

/* ---------- a page and its parts ---------- */
.page {
  max-width: 1440px;
  margin: 0 auto;
  padding: 28px 60px 40px;
  color: var(--ink-t);
}
.pg-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px 20px;
  margin-bottom: 22px;
}
.pg-head h1,
.page h1 {
  margin: 0;
  font-family: var(--hd);
  font-weight: 600;
  font-size: 32px;
  letter-spacing: 0.02em;
}
.pg-head .right {
  margin-left: auto;
}
.eyebrow {
  font-family: var(--hd);
  font-size: 12px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gd);
}
.lab {
  display: block;
  font-family: var(--hd);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-d);
  margin: 16px 0 8px;
}
.lab.gold {
  color: var(--gd);
  margin-top: 0;
}
.center {
  text-align: center;
  justify-content: center;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  border-radius: 22px;
  background: rgba(10, 20, 36, 0.7);
  border: 1px solid var(--glass-line);
}
.chips button,
.chips > span {
  padding: 7px 16px;
  border-radius: 18px;
  background: none;
  border: 0;
  font-size: 13px;
  color: var(--ink-d);
}
.chips button.on {
  background: rgba(127, 227, 240, 0.18);
  color: #fff;
}
.chips button i {
  font-style: normal;
  color: var(--el);
  margin-right: 5px;
}
.chips.static {
  background: none;
  border: 0;
  padding: 0;
}
.chips.static > span {
  border: 1px solid var(--glass-line);
  font-size: 12px;
  padding: 4px 10px;
}
button.cta,
.cta {
  min-height: 52px;
  padding: 0 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  border-radius: 28px;
  background: linear-gradient(180deg, var(--cta-a), var(--cta-b));
  color: #0d1a05;
  font-family: var(--hd);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  box-shadow: 0 8px 24px rgba(111, 191, 42, 0.3);
}
button.cta:hover:not(:disabled) {
  filter: brightness(1.08);
}
button.cta:disabled {
  opacity: 0.45;
  box-shadow: none;
}
.page button.ghost {
  min-height: 44px;
  padding: 0 20px;
  border-radius: 24px;
  border: 1px solid rgba(127, 227, 240, 0.35);
  background: rgba(8, 16, 30, 0.55);
  font-family: var(--hd);
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.page button.ghost.dashed {
  border-style: dashed;
  border-radius: 4px;
}
.page button.ghost.danger,
.quick button.ghost.danger {
  color: #ffb3bc;
  border-color: #5a1f2a;
}
button.linkish {
  background: none;
  border: 0;
  padding: 4px 0;
  color: var(--cy);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.page button:focus-visible,
.shell button:focus-visible,
.quick button:focus-visible {
  outline: 2px solid var(--cy);
  outline-offset: 3px;
}

/* ---------- empty states and errors ---------- */
.empty-state {
  max-width: 420px;
  margin: 30px auto;
  padding: 26px;
  text-align: center;
  border-radius: 16px;
  background: var(--glass);
  border: 1px solid var(--glass-line);
  --es: var(--cy);
}
.empty-state.es-gold {
  --es: var(--gd);
}
.empty-state.es-rose {
  --es: var(--rs);
}
.empty-state.es-green {
  --es: var(--gn);
}
.es-ring {
  display: inline-flex;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  border: 2px solid var(--es);
  color: var(--es);
}
.empty-state h3 {
  font-family: var(--hd);
  font-weight: 500;
  font-size: 20px;
  margin: 14px 0 8px;
}
.empty-state p {
  color: #b9c9de;
  line-height: 1.55;
  margin: 0 0 18px;
}
.empty-state .es-btn {
  min-height: 44px;
  padding: 0 22px;
  border-radius: 22px;
  font-family: var(--hd);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: none;
}

/* ---------- loading ---------- */
.loading {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 40px 16px;
  text-align: center;
}
.loading.over {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: radial-gradient(circle at 50% 40%, rgba(10, 30, 52, 0.97), rgba(4, 7, 15, 0.99));
}
.ld-ring {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  border: 3px solid rgba(127, 227, 240, 0.15);
  border-right-color: var(--cy);
  animation: ld-spin 1.4s linear infinite;
}
@keyframes ld-spin {
  to {
    transform: rotate(360deg);
  }
}
.loading h2 {
  font-family: var(--hd);
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: #bff4fb;
  margin: 18px 0 0;
}
.ld-tip {
  display: flex;
  gap: 12px;
  align-items: center;
  max-width: 500px;
  padding: 16px 20px;
  border-radius: 14px;
  background: var(--glass);
  border: 1px solid var(--glass-line);
  text-align: left;
  margin-top: 40px;
}
.ld-tip > span:first-child {
  color: var(--gd);
  font-size: 20px;
}
.ld-people {
  display: flex;
  gap: 30px;
  margin-top: 30px;
}
.ld-who {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-d);
}
.ld-who.ready {
  color: var(--ink-t);
}
:root[data-motion='off'] .ld-ring {
  animation: none;
}

/* ---------- the relic: card 1, motion A ---------- */
.relic {
  --mx: 40%;
  --my: 28%;
  position: relative;
  width: 260px;
  aspect-ratio: 5 / 7.4;
  padding: 9px;
  border-radius: 14px;
  background: linear-gradient(135deg, #8a6a2a, #f6d78a 30%, #b88a3a 55%, #f3d488 80%, #8a6a2a);
  box-shadow:
    0 18px 40px rgba(0, 0, 0, 0.55),
    0 0 40px rgba(240, 195, 90, 0.18);
}
.rl-in {
  position: relative;
  height: 100%;
  border-radius: 8px;
  overflow: hidden;
  padding: 14px 14px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: linear-gradient(180deg, #0f1c33, #0a1426);
}
.rl-light {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    circle at var(--mx) var(--my),
    color-mix(in srgb, var(--el) 55%, #fff6c8) 0%,
    rgba(31, 142, 163, 0.25) 22%,
    transparent 48%
  );
  mix-blend-mode: screen;
  opacity: 0.75;
  transition: background-position 0.2s;
}
:root[data-motion='full'] .relic.lit:not(:hover) .rl-light {
  animation: rl-wander 9s ease-in-out infinite alternate;
}
@keyframes rl-wander {
  0% {
    --mx: 30%;
    --my: 25%;
  }
  50% {
    --mx: 70%;
    --my: 40%;
  }
  100% {
    --mx: 45%;
    --my: 60%;
  }
}
@property --mx {
  syntax: '<percentage>';
  inherits: true;
  initial-value: 40%;
}
@property --my {
  syntax: '<percentage>';
  inherits: true;
  initial-value: 28%;
}
.rl-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}
.rl-clade {
  font-family: var(--hd);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #e6d3a3;
  display: flex;
  align-items: center;
  gap: 6px;
}
.rl-gem {
  width: 22px;
  height: 22px;
  transform: rotate(45deg);
  background: linear-gradient(135deg, #fff, var(--el) 60%);
  border: 2px solid #f6d78a;
  box-shadow: 0 0 12px var(--el);
  flex: 0 0 auto;
}
.rl-gem.sm {
  width: 14px;
  height: 14px;
  position: absolute;
  top: 10px;
  right: 10px;
}
.rl-art {
  flex: 1;
  min-height: 60px;
  position: relative;
  opacity: 0.9;
}
.rl-art .hart {
  height: 100%;
  min-height: 70px;
}
.rl-name {
  margin: 0;
  font-family: var(--hd);
  font-size: 22px;
  font-weight: 600;
  color: #fff6e0;
  position: relative;
}
.rl-face {
  position: relative;
  border: 1px solid rgba(246, 215, 138, 0.35);
  background: rgba(5, 10, 20, 0.55);
  padding: 6px 8px;
  font-size: 11.5px;
  line-height: 1.4;
}
.rl-face.eth {
  border-color: rgba(246, 215, 138, 0.7);
  background: rgba(40, 32, 10, 0.5);
}
.rl-face b {
  color: #fff;
}
.rl-face.eth b {
  color: var(--gd);
}
.rl-cost {
  color: #c7b78f;
}
.rl-txt {
  display: block;
  color: #e4ecf6;
}
.rl-foot {
  display: flex;
  justify-content: space-between;
  font-family: var(--hd);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #c7b78f;
  position: relative;
}
.relic-mini {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 2px;
  aspect-ratio: 5 / 7.2;
  padding: 12px;
  text-align: left;
  border-radius: 10px;
  border: 4px solid transparent;
  background:
    linear-gradient(180deg, #13233c, #0b1526) padding-box,
    linear-gradient(135deg, #8a6a2a, #f6d78a 35%, #b88a3a 60%, #f3d488) border-box;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  transition: transform 0.18s;
}
.relic-mini:hover {
  transform: translateY(-3px);
}
.relic-mini.on {
  box-shadow:
    0 0 0 2px var(--cy),
    0 0 26px rgba(127, 227, 240, 0.45);
}
.rm-art {
  position: absolute;
  inset: 8px 8px 46%;
  opacity: 0.55;
}
.rm-art .hart {
  height: 100%;
}
.relic-mini b {
  position: relative;
  font-family: var(--hd);
  font-size: 15px;
  line-height: 1.15;
  color: #fff6e0;
}
.rm-clade,
.rm-lvl {
  position: relative;
  font-family: var(--hd);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #c7b78f;
}
.rm-lvl {
  margin-top: 10px;
  font-size: 9.5px;
}
.relic-mini.down {
  background: rgba(10, 20, 36, 0.35);
  border: 1px dashed rgba(127, 227, 240, 0.25);
  box-shadow: none;
  align-items: center;
  justify-content: center;
}
.relic-mini.down .rm-q {
  font-size: 30px;
  color: #5d728f;
}
.relic-mini.down .rm-clade {
  color: #5d728f;
  letter-spacing: 0.04em;
  text-transform: none;
  font-family: inherit;
  font-size: 12px;
}

/* ---------- Cards: the binder ---------- */
.bd-meter {
  width: 200px;
  height: 4px;
  border-radius: 2px;
  background: #1c2c47;
  overflow: hidden;
}
.bd-meter b {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--gd), #f6d78a);
}
.bd-els {
  margin-left: auto;
}
.bd-q,
.cx-q,
.mk-q {
  min-height: 44px;
  padding: 0 18px;
  border-radius: 22px;
  border: 1px solid var(--glass-line);
  background: rgba(10, 20, 36, 0.7);
  color: var(--ink-t);
  font: inherit;
  min-width: 220px;
}
.bd-cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 30px;
}
.bd.has-open .bd-cols {
  grid-template-columns: minmax(0, 1fr) 480px;
}
.bd-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 22px;
}
.bd-pager {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 26px;
  font-family: var(--hd);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.bd-pager button.ghost {
  min-width: 44px;
  padding: 0;
  border-radius: 4px;
}
.bd-side {
  position: sticky;
  top: calc(var(--bar-h) + 16px);
  align-self: start;
  padding: 24px;
  border-radius: 16px;
  background: var(--glass);
  border: 1px solid var(--glass-line);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.bd-stage .relic {
  width: 270px;
}
.bd-facts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 18px;
  font-size: 15px;
}
.bd-lvl {
  display: flex;
  gap: 6px;
}
.bd-lvl button {
  background: none;
  border-radius: 16px;
  font-family: var(--hd);
  font-size: 12px;
}
.bd-lvl button.on {
  background: rgba(240, 195, 90, 0.2);
  border-color: var(--gd);
}
@media (max-width: 1100px) {
  .bd.has-open .bd-cols {
    grid-template-columns: 1fr;
  }
  .bd-side {
    position: static;
    order: -1;
  }
}

/* ---------- Pilots: the crew ---------- */
.crew-cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 400px;
  gap: 40px;
  align-items: start;
}
.crew-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 16px;
}
.crew-empty {
  grid-column: 1 / -1;
}
.crew-tile {
  position: relative;
  aspect-ratio: 4 / 5;
  padding: 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #2a4266;
  background: #0b1526;
  text-align: left;
  transition:
    transform 0.18s,
    box-shadow 0.18s;
}
.crew-tile:hover {
  transform: translateY(-3px);
}
.crew-tile.on {
  border-color: var(--cy);
  box-shadow: 0 0 22px rgba(127, 227, 240, 0.45);
}
.ct-art {
  position: absolute;
  inset: 0;
  background: center 30% / cover no-repeat;
}
.ct-art.none {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 34px;
  color: #5d728f;
}
.ct-veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(5, 10, 20, 0.95));
}
.ct-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  background: rgba(240, 195, 90, 0.15);
  border: 1px solid rgba(240, 195, 90, 0.5);
  color: var(--gd);
}
.ct-badge.made {
  background: rgba(111, 224, 160, 0.12);
  border-color: rgba(111, 224, 160, 0.45);
  color: var(--gn);
}
.ct-text {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ct-call {
  font-family: var(--hd);
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--gd);
}
.ct-text b {
  font-family: var(--hd);
  font-weight: 500;
  font-size: 16px;
  color: #fff;
}
.ct-pair {
  font-size: 12px;
  color: var(--ink-d);
  text-transform: lowercase;
}
.crew-side {
  position: sticky;
  top: calc(var(--bar-h) + 16px);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--glass-line);
  background: var(--glass);
}
.cs-art {
  height: 220px;
  background: center 30% / cover no-repeat #0b1526;
  mask-image: linear-gradient(180deg, #000 60%, transparent);
}
.cs-body {
  padding: 4px 22px 22px;
}
.cs-body h2 {
  font-family: var(--hd);
  font-weight: 500;
  font-size: 26px;
  margin: 6px 0;
}
.cs-pair {
  font-size: 15px;
  margin-bottom: 10px;
}
.cs-body p {
  color: #c4d3e6;
  line-height: 1.55;
}
.cs-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.cs-cards .relic-mini b {
  font-size: 12.5px;
}
.cs-btns,
.pp-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}
.cs-btns .cta {
  flex: 1;
}
@media (max-width: 1100px) {
  .crew-cols {
    grid-template-columns: 1fr;
  }
  .crew-side {
    display: none;
  }
}

/* ---------- one pilot ---------- */
.pilot-page {
  padding-top: 0;
}
.pp-hero {
  position: relative;
  height: 420px;
  margin: 0 -60px;
  background: center 30% / cover no-repeat #0b1526;
}
:root[data-motion='full'] .pp-hero {
  animation: pp-kb 22s ease-in-out infinite alternate;
}
@keyframes pp-kb {
  from {
    background-size: 104%;
  }
  to {
    background-size: 112%;
  }
}
.pp-veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(5, 10, 20, 0.9) 20%, transparent 70%),
    linear-gradient(0deg, rgba(5, 10, 20, 1), transparent 50%);
}
.pp-title {
  position: absolute;
  left: 60px;
  bottom: 30px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pp-title h1 {
  font-size: 52px;
}
.pp-pair {
  font-size: 16px;
  text-transform: capitalize;
}
.pp-cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 40px;
  margin-top: 24px;
}
.pp-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  color: var(--ink-d);
}
.pp-facts b {
  color: var(--gd);
  font-family: var(--hd);
}
.pp-blurb {
  font-size: 16px;
  line-height: 1.6;
  color: #c4d3e6;
}
.pp-q p {
  font-family: var(--serif);
  font-style: italic;
  font-size: 16px;
  margin: 0;
}
.pp-kit {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 16px;
}
.pp-notes {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pin-note {
  padding: 12px 14px;
  background: #f1e8d0;
  color: #2b2a26;
  font-family: Georgia, serif;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pn-tag {
  align-self: flex-start;
  padding: 1px 8px;
  border: 1px solid #1f6c6e;
  color: #1f6c6e;
  font-family: var(--hd);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.canon .pn-tag,
.pin-note.canon .pn-tag {
  border-color: #2b7a3e;
  color: #2b7a3e;
}
@media (max-width: 900px) {
  .pp-cols {
    grid-template-columns: 1fr;
  }
  .pp-hero {
    height: 300px;
  }
}

/* ---------- make a pilot ---------- */
.mk-steps {
  display: flex;
  gap: 8px;
  padding: 0;
  margin: 0 0 22px;
  list-style: none;
}
.mk-steps button {
  background: none;
  border: 0;
  border-radius: 16px;
  padding: 6px 14px;
  color: var(--ink-d);
}
.mk-steps .done button {
  color: var(--gn);
}
.mk-steps .on button {
  background: rgba(127, 227, 240, 0.16);
  color: #fff;
}
.mk-cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 520px;
  gap: 60px;
  align-items: start;
}
.maker h2 {
  font-family: var(--hd);
  font-weight: 600;
  font-size: 34px;
  letter-spacing: 0.04em;
  margin: 0 0 6px;
}
.mk-branches {
  max-height: 560px;
  overflow: auto;
  margin-top: 14px;
  padding-right: 6px;
}
.mk-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}
.mk-clade {
  min-height: 56px;
  border-radius: 12px;
  background: rgba(10, 20, 36, 0.6);
  border: 1px solid #2a4266;
}
.mk-clade i {
  font-style: normal;
  font-family: var(--hd);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.mk-clade.head {
  border: 2px solid var(--cy);
}
.mk-clade.head i {
  color: var(--cy);
}
.mk-clade.feat {
  border: 2px solid var(--gd);
}
.mk-clade.feat i {
  color: var(--gd);
}
.mk-preview {
  position: sticky;
  top: calc(var(--bar-h) + 16px);
  padding: 26px;
  border-radius: 16px;
  background: var(--glass);
  border: 1px solid var(--glass-line);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
}
.mk-face {
  width: 280px;
  aspect-ratio: 1;
  border-radius: 16px;
  border: 3px solid var(--cy);
  overflow: hidden;
  background: #0b1526;
}
.mk-face img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.mk-preview h3 {
  font-family: var(--hd);
  font-weight: 500;
  font-size: 22px;
  margin: 4px 0 0;
}
.mk-name {
  width: 100%;
  min-height: 56px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid var(--cy);
  background: rgba(10, 20, 36, 0.6);
  color: #fff;
  font-size: 20px;
}
.mk-own {
  min-height: 34px;
  border: 1px dashed var(--glass-line);
  border-radius: 18px;
  background: none;
  color: var(--ink-t);
  padding: 0 14px;
  width: 140px;
  text-transform: uppercase;
}
.mk-doms {
  display: flex;
  gap: 12px;
}
.mk-dom {
  min-width: 120px;
  min-height: 62px;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--dom) 60%, transparent);
  background: rgba(10, 20, 36, 0.6);
  color: var(--dom);
  font-size: 17px;
}
.mk-dom i {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--dom);
  margin-right: 8px;
  vertical-align: -1px;
}
.mk-dom.on {
  border-width: 2px;
  box-shadow: 0 0 18px color-mix(in srgb, var(--dom) 40%, transparent);
}
.maker section > .cta {
  margin-top: 22px;
}
.mk-card {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: 16px;
  overflow: hidden;
  border: 2px solid var(--dom);
  background: #0b1526;
  box-shadow: 0 0 40px color-mix(in srgb, var(--dom) 25%, transparent);
  display: block;
}
.mk-card-art {
  position: absolute;
  inset: 0;
  background: center 30% / cover no-repeat;
}
.mk-card-veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(5, 10, 20, 0.95));
}
.mk-card-text {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.mk-card-text b {
  font-family: var(--hd);
  font-weight: 600;
  font-size: 34px;
  color: #fff;
}
.mk-card-text > span:last-child {
  color: var(--ink-d);
  font-size: 16px;
}
.mk-paper {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 40px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 40px 56px;
  border-radius: 4px;
  background: #ece3cf;
  color: #2b2a26;
}
.mk-paper-kick {
  font-family: var(--hd);
  font-size: 12px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: #8c2b1c;
}
.mk-qa {
  display: block;
  padding: 18px 0;
  border-bottom: 1px solid #b8ab8d;
}
.mk-qa span {
  display: block;
  font-family: Georgia, serif;
  font-size: 20px;
  margin-bottom: 6px;
}
.mk-qa textarea {
  width: 100%;
  border: 0;
  background: none;
  resize: vertical;
  font-family: Georgia, serif;
  font-style: italic;
  font-size: 16px;
  color: #2b2a26;
}
.mk-paper .row {
  margin-top: 26px;
  gap: 16px;
}
.mk-paper button.linkish {
  color: #2b2a26;
}
.mk-sketch {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border: 2px solid #2b2a26;
  filter: grayscale(1) sepia(0.4) contrast(1.1);
  mix-blend-mode: multiply;
  display: block;
}
.mk-tog {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}
.mk-tog input {
  width: 20px;
  height: 20px;
}
.mk-reveal {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
}
.mk-relic {
  width: 400px;
  max-width: 100%;
  padding: 12px;
  border-radius: 18px;
  background: linear-gradient(135deg, #8a6a2a, #f6d78a 30%, #b88a3a 55%, #f3d488 80%, #8a6a2a);
  box-shadow: 0 0 60px rgba(240, 195, 90, 0.25);
}
:root[data-motion='full'] .mk-relic {
  animation: mk-rise 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
@keyframes mk-rise {
  from {
    transform: translateY(24px) scale(0.96);
    opacity: 0;
  }
}
.mk-relic .mk-card {
  border: 0;
  border-radius: 10px;
}
.mk-line {
  font-family: Georgia, serif;
  font-style: italic;
  text-align: center;
  color: #3a2f18;
  margin: 10px 0 0;
}
.mk-reveal .row {
  gap: 14px;
}
@media (max-width: 1000px) {
  .mk-cols,
  .mk-paper {
    grid-template-columns: 1fr;
  }
  .mk-preview {
    position: static;
  }
}

/* ---------- Atlas: land, sea, air ---------- */
.grounds {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 30px;
}
.ground h2 {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 0 0 16px;
  font-family: var(--hd);
  font-weight: 500;
  font-size: 22px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gr);
}
.ground h2::after {
  content: '';
  flex: 1;
  height: 1px;
  background: color-mix(in srgb, var(--gr) 45%, transparent);
}
.place-tile {
  position: relative;
  display: block;
  width: 100%;
  height: 200px;
  margin-bottom: 16px;
  padding: 0;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--gr) 35%, #2a4266);
  background: #0b1526;
  text-align: left;
}
.pt-art {
  position: absolute;
  inset: 0;
  background: center / cover no-repeat;
  transition: transform 0.4s;
}
.place-tile:hover .pt-art {
  transform: scale(1.04);
}
.pt-veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(5, 10, 20, 0.92));
}
.place-tile.unseen .pt-art {
  filter: grayscale(0.8) brightness(0.45);
}
.place-tile.unseen .pt-text {
  opacity: 0.6;
}
.pt-text {
  position: absolute;
  left: 16px;
  bottom: 14px;
  display: flex;
  flex-direction: column;
}
.pt-text b {
  font-family: var(--hd);
  font-weight: 500;
  font-size: 19px;
  color: #fff;
}
.pt-text small {
  color: var(--ink-d);
}
.pt-g {
  position: absolute;
  right: 16px;
  bottom: 14px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid var(--gr);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1;
  background: rgba(5, 10, 20, 0.6);
}
.pt-g b {
  font-family: var(--hd);
  font-weight: 500;
  font-size: 15px;
}
.pt-g small {
  font-size: 9px;
  color: var(--gr);
}
.place-tile.unseen .pt-g {
  border-color: #5d728f;
}

/* ---------- one place: the diorama ---------- */
.place-cols {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 40px;
}
.dio-gauges {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
.gauge {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 12px;
  align-items: center;
  padding: 10px 18px;
  border-radius: 12px;
  background: var(--glass);
  border: 1px solid var(--glass-line);
}
.gauge i {
  grid-row: span 2;
  font-style: normal;
  font-size: 22px;
  color: var(--cy);
}
.gauge b {
  font-weight: 500;
  font-size: 15px;
}
.gauge small {
  font-family: var(--hd);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-d);
}
.diorama {
  perspective: 1600px;
  padding: 40px 0 20px;
}
.dio-table {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  transform: rotateX(38deg) rotateZ(-14deg);
  transform-origin: 50% 60%;
  box-shadow: 0 50px 80px rgba(0, 0, 0, 0.6);
  background: #0b1526;
  transition: transform 0.6s;
}
.diorama:hover .dio-table {
  transform: rotateX(30deg) rotateZ(-10deg);
}
:root[data-motion='off'] .dio-table {
  transition: none;
}
.dio-plate {
  position: absolute;
  inset: 0;
  background: center / cover no-repeat;
  opacity: 0.55;
}
.dio-glass {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(5, 10, 20, 0.35), rgba(5, 10, 20, 0.7));
}
.dio-table .atlas-map {
  position: relative;
  display: block;
  width: 100%;
  height: auto;
}
.place-text h1 {
  font-size: 48px;
  letter-spacing: 0.04em;
  margin: 6px 0 8px;
}
.place-rules {
  margin: 0;
  padding-left: 18px;
  line-height: 1.6;
  font-size: 15px;
}
.place-rules li {
  margin-bottom: 8px;
}
.place-notes p {
  font-family: Georgia, serif;
  font-style: italic;
  font-size: 15px;
  line-height: 1.65;
  color: #e6eef8;
}
.place-turn {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 30px;
  flex-wrap: wrap;
}
@media (max-width: 1000px) {
  .grounds,
  .place-cols {
    grid-template-columns: 1fr;
  }
}

/* ---------- Canon: the story wall ---------- */
.wall {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px;
}
.wall-col h2 {
  color: var(--gd);
  font-size: 13px;
  letter-spacing: 0.3em;
  margin: 0 0 24px;
}
.pin-card {
  position: relative;
  padding: 24px 22px 18px;
  margin-bottom: 34px;
  background: #f1e8d0;
  color: #2b2a26;
  font-family: Georgia, serif;
  transform: rotate(var(--tilt));
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.45);
}
.pin-card p {
  margin: 4px 0 12px;
  font-size: 16px;
  line-height: 1.55;
}
.pin {
  position: absolute;
  top: -8px;
  left: 50%;
  width: 16px;
  height: 16px;
  margin-left: -8px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ff9a8a, #d9483b);
  box-shadow: 0 3px 5px rgba(0, 0, 0, 0.4);
}
.pc-about {
  font-family: var(--hd);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #7a6a4a;
}
.pin-card.canon {
  background: #e6f0dc;
}
@media (max-width: 1000px) {
  .wall {
    grid-template-columns: 1fr;
  }
}

/* ---------- Settings ---------- */
.st-cols {
  display: grid;
  grid-template-columns: 600px minmax(0, 1fr);
  gap: 60px;
  align-items: start;
}
.st-card {
  padding: 20px;
  margin-bottom: 18px;
  border-radius: 16px;
  background: var(--glass);
  border: 1px solid var(--glass-line);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.st-themes {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.st-theme {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  background: none;
  border: 0;
  padding: 0;
  font-size: 13px;
  color: var(--ink-d);
}
.st-sw {
  width: 96px;
  height: 64px;
  border-radius: 10px;
  border: 2px solid #2a4266;
}
.st-theme.on {
  color: #fff;
}
.st-theme.on .st-sw {
  border-color: var(--cy);
  box-shadow: 0 0 16px rgba(127, 227, 240, 0.35);
}
.st-accents {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.st-accents button {
  min-height: 40px;
  padding: 0 16px;
  border-radius: 20px;
  background: none;
  border: 2px solid color-mix(in srgb, var(--c) 50%, transparent);
  color: var(--c);
}
.st-accents button.on {
  background: color-mix(in srgb, var(--c) 22%, transparent);
  border-color: var(--c);
}
.st-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 0;
  border-top: 1px solid rgba(127, 227, 240, 0.1);
}
.st-row:first-of-type {
  border-top: 0;
}
.st-l {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.st-l b {
  font-weight: 500;
  font-size: 15px;
}
.st-l small {
  color: var(--ink-d);
}
.st-row input[type='range'] {
  flex: 1;
  accent-color: var(--cy);
}
.st-num {
  width: 36px;
  text-align: right;
  font-family: var(--hd);
  color: var(--ink-d);
}
.st-row kbd {
  min-width: 64px;
  text-align: center;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--glass-line);
  font-family: var(--hd);
}
.tog {
  position: relative;
  width: 48px;
  height: 28px;
  padding: 0;
  border-radius: 14px;
  background: #1c2c47;
  border: 0;
  flex: 0 0 auto;
}
.tog::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #8ea3bf;
  transition: left 0.15s;
}
.tog.on {
  background: #1f8ea3;
}
.tog.on::after {
  left: 24px;
  background: #fff;
}
.seg {
  display: inline-flex;
  border: 1px solid #2a4266;
  border-radius: 10px;
  overflow: hidden;
}
.seg button {
  min-height: 40px;
  padding: 0 14px;
  border: 0;
  border-radius: 0;
  background: none;
  font-family: var(--hd);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: #b9c9de;
}
.seg button.on {
  background: var(--gd);
  color: #1a1205;
}
.st-preview {
  position: sticky;
  top: calc(var(--bar-h) + 16px);
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.st-board {
  padding: 18px;
  border-radius: 16px;
  background: var(--glass);
  border: 1px solid var(--glass-line);
}
.st-board .atlas-map {
  width: 100%;
  height: auto;
  display: block;
}
.st-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.st-preview .cta {
  align-self: flex-start;
}
@media (max-width: 1100px) {
  .st-cols {
    grid-template-columns: 1fr;
  }
  .st-preview {
    position: static;
  }
}

/* ---------- the quick panel ---------- */
.quick {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 100%;
}
.qk-head {
  display: flex;
  align-items: center;
}
.qk-head h3 {
  font-family: var(--hd);
  font-size: 24px;
  font-weight: 500;
  margin: 0;
}
.qk-head button {
  margin-left: auto;
  background: none;
  border: 0;
  font-size: 20px;
  min-width: 44px;
  min-height: 44px;
}
.qk-themes {
  display: flex;
  gap: 10px;
}
.qk-sw {
  flex: 1;
  height: 44px;
  border-radius: 10px;
  border: 2px solid #2a4266;
  padding: 0;
}
.qk-sw.auto {
  background: linear-gradient(135deg, #cfe3e2, #0a2238 45%, #03201a 70%, #2a1840);
}
.qk-sw.on {
  border-color: var(--cy);
}
.qk-out {
  margin-top: auto;
  padding-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.qk-out button {
  min-height: 46px;
  justify-content: flex-start;
  text-align: left;
  background: none;
  border: 1px solid #2a4266;
  font-family: var(--hd);
  letter-spacing: 0.1em;
}

/* ---------- How to play ---------- */
.howto {
  max-width: 1080px;
}
.howto h1 {
  font-size: 44px;
  letter-spacing: 0.04em;
  margin: 8px 0 26px;
}
.howto .eyebrow {
  display: block;
}
.ht-card {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--glass-line);
  background: var(--glass);
}
.ht-pic {
  padding: 26px;
  background: rgba(3, 8, 18, 0.65);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.ht-text {
  padding: 30px;
  font-size: 17px;
  line-height: 1.65;
  display: flex;
  flex-direction: column;
}
.ht-text p {
  margin: 0 0 14px;
}
.ht-text .rose {
  color: var(--rs);
}
.ht-dots {
  margin-top: auto;
  display: flex;
  gap: 8px;
}
.ht-dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  border-radius: 5px;
  border: 0;
  background: #2a4266;
  min-height: 0;
}
.ht-dots button.on {
  width: 28px;
  background: var(--cy);
}
.ht-btns {
  margin: 26px 0;
  gap: 14px;
}
.ht-full {
  margin-top: 10px;
  color: var(--ink-d);
}
.hz-board {
  width: 100%;
  max-width: 460px;
}
.hz-e {
  stroke: #3b4f6e;
  stroke-width: 2;
}
.hz-intent {
  stroke: var(--rs);
  stroke-width: 2.5;
  stroke-dasharray: 8 8;
}
:root[data-motion='full'] .hz-intent {
  animation: hz-march 1.2s linear infinite;
}
@keyframes hz-march {
  to {
    stroke-dashoffset: -16;
  }
}
.hz-zone {
  fill: rgba(240, 195, 90, 0.12);
  stroke: rgba(240, 195, 90, 0.5);
  stroke-dasharray: 4 6;
}
.hz-n {
  fill: #0a1426;
  stroke: #3b4f6e;
  stroke-width: 2;
}
.hz-n.high {
  stroke: var(--gd);
  stroke-dasharray: 5 5;
}
.hz-hero circle,
.hz-ally circle,
.hz-foe circle {
  stroke-width: 3;
}
.hz-hero circle {
  fill: #0d3440;
  stroke: var(--cy);
}
.hz-ally circle {
  fill: #0d3a26;
  stroke: var(--gn);
}
.hz-foe circle {
  fill: #3a0f18;
  stroke: var(--rs);
}
.hz-board text {
  fill: #fff;
  font-family: var(--hd);
  font-size: 14px;
}
.hz-track {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  width: 100%;
}
.hz-track span {
  min-height: 120px;
  border-radius: 8px;
  border: 1px solid #2a4266;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 4px;
  gap: 10px;
}
.hz-track span.ready {
  border-color: var(--gn);
}
.hz-track small {
  color: var(--ink-d);
}
.hz-track b {
  font-size: 12px;
  padding: 6px 4px;
  border-radius: 6px;
  background: linear-gradient(180deg, #13233c, #0b1526);
  border: 1px solid var(--gd);
}
.hz-dice {
  display: flex;
  gap: 14px;
}
.hz-card .relic {
  width: 240px;
}
@media (max-width: 900px) {
  .ht-card {
    grid-template-columns: 1fr;
  }
  .howto h1 {
    font-size: 30px;
  }
}

/* ---------- Codex ---------- */
.cx-q {
  min-width: 280px;
}
.cx-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}
.cx-card {
  padding: 18px 20px;
  border-radius: 14px;
  background: var(--glass);
  border: 1px solid var(--glass-line);
  border-left: 3px solid var(--cx);
  --cx: var(--cy);
}
.cx-card.cx-rose {
  --cx: var(--rs);
}
.cx-card.cx-gold {
  --cx: var(--gd);
}
.cx-card.cx-green {
  --cx: var(--gn);
}
.cx-card h3 {
  margin: 0 0 8px;
  font-family: var(--hd);
  font-weight: 500;
  font-size: 20px;
  color: var(--cx);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.cx-card h3 small {
  font-family: var(--sans);
  font-size: 12px;
}
.cx-card p {
  margin: 0 0 6px;
  line-height: 1.55;
}
.cx-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 26px;
  padding: 16px 20px;
  border-radius: 14px;
  background: var(--glass);
  border: 1px solid var(--glass-line);
}
.cx-strip .lab {
  margin: 0;
}
.cx-foe {
  background: none;
  border: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ---------- phones ---------- */
@media (max-width: 760px) {
  .page {
    padding: 16px 16px 24px;
  }
  .pg-head {
    gap: 10px;
    margin-bottom: 14px;
  }
  .pg-head h1,
  .page h1 {
    font-size: 24px;
  }
  .pg-head .right,
  .bd-els {
    margin-left: 0;
  }
  .chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    max-width: 100%;
    scrollbar-width: none;
  }
  .chips button {
    white-space: nowrap;
  }
  .bd-q,
  .cx-q,
  .mk-q {
    width: 100%;
    min-width: 0;
  }
  .bd-meter {
    display: none;
  }
  .bd-grid,
  .pp-kit {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
  }
  .relic-mini {
    padding: 8px;
    border-width: 3px;
  }
  .relic-mini b {
    font-size: 12.5px;
  }
  .crew-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .pp-hero {
    margin: 0 -16px;
    height: 360px;
  }
  .pp-title {
    left: 16px;
    right: 16px;
  }
  .pp-title h1 {
    font-size: 32px;
  }
  .maker h2 {
    font-size: 24px;
  }
  .mk-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .mk-branches {
    max-height: none;
  }
  .mk-face {
    width: 200px;
  }
  .mk-doms {
    flex-wrap: wrap;
  }
  .mk-dom {
    flex: 1;
    min-width: 0;
  }
  .mk-paper {
    padding: 24px 18px;
    gap: 20px;
  }
  .mk-steps {
    overflow-x: auto;
  }
  .mk-steps button {
    white-space: nowrap;
  }
  .place-tile {
    height: 150px;
  }
  .place-text h1 {
    font-size: 30px;
  }
  .diorama {
    padding: 10px 0;
  }
  .gauge {
    padding: 8px 12px;
  }
  .wall {
    gap: 0;
  }
  .st-themes {
    gap: 8px;
  }
  .st-sw {
    width: 64px;
    height: 46px;
  }
  .st-row {
    flex-wrap: wrap;
  }
  .st-cards {
    grid-template-columns: repeat(2, 1fr);
  }
  .bd-stage .relic,
  .hz-card .relic {
    width: 240px;
  }
  .cx-grid {
    grid-template-columns: 1fr;
  }
  .howto h1 {
    font-size: 26px;
  }
  .ht-text {
    padding: 20px;
    font-size: 15px;
  }
  .modal-bg.side .modal {
    width: 100%;
  }
}


/* ───── ui/home.css ───── */
/* ============================================================================
   TUMULT — HOME (src/ui/home.js): the landing, Home, the setup, hosting, joining,
   the Lobby panel and the waiting room. Desktop first; under 760px it folds to the
   phone layout of the board's "Finalised UI - Phone" page.
   ========================================================================== */
.home {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  box-sizing: border-box;
  color: var(--txt, #dbe7f5);
  --hm-pad: clamp(16px, 5.5vw, 80px);
}
.hm-eyebrow {
  display: block;
  font-family: var(--serif);
  font-size: 12px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
}
.home .hm-display {
  margin: 10px 0 12px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(40px, 5vw, 76px);
  line-height: 1;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.home .hm-place {
  font-size: clamp(36px, 4.6vw, 64px);
}
.home .hm-lede {
  font-size: 17px;
  line-height: 1.6;
  color: #c4d3e6;
  max-width: 560px;
  margin: 0 0 6px;
}
.home .hm-fine {
  font-size: 13px;
  color: #8ea3bf;
  margin: 10px 0 0;
}
.home .hm-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 18px 0 8px;
}
.home button.hm-cta {
  min-height: 54px;
  padding: 0 34px;
  font-size: 16px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-family: var(--serif);
}
.home button.hm-big {
  min-height: 52px;
  padding: 0 26px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-family: var(--serif);
}

/* ---------- the bar, when the shared shell is not here ---------- */
.hm-bar {
  position: sticky;
  top: 0;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 64px;
  padding: 0 var(--hm-pad);
  background: linear-gradient(180deg, rgba(5, 10, 20, 0.92), rgba(5, 10, 20, 0.35));
}
.hm-brand {
  font-family: var(--serif);
  font-size: 20px;
  letter-spacing: 0.3em;
  color: #bff4fb;
  margin-right: 18px;
}
.hm-nav {
  display: flex;
  gap: 2px;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
}
.hm-link {
  background: none;
  border: 0;
  color: #8ea3bf;
  font-family: var(--serif);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0 12px;
  min-height: 44px;
  cursor: pointer;
  white-space: nowrap;
}
.hm-link:hover {
  color: #fff;
}
.hm-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}
.hm-chip {
  min-height: 34px;
  padding: 0 14px;
  border-radius: 18px;
  border: 1px solid var(--line2);
  background: rgba(8, 16, 30, 0.55);
  color: #b9c9de;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
}
.hm-chip i {
  font-style: normal;
  color: #8ea3bf;
}
.hm-chip.live {
  border-color: rgba(111, 224, 160, 0.5);
  color: #6fe0a0;
}
.hm-chip.live i {
  color: #6fe0a0;
}
.hm-me {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

/* ---------- faces ---------- */
.hm-av {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-sizing: border-box;
  border: 2px solid var(--gold);
  background: #2a2208;
  font-family: var(--serif);
  font-size: 13px;
  color: #fff;
}
.hm-av > * {
  width: 100%;
  height: 100%;
}
.hm-av img {
  object-fit: cover;
}
.hm-av.open {
  border: 2px dashed var(--glow);
  background: transparent;
  animation: hm-pulse 1.6s ease-in-out infinite;
}
@keyframes hm-pulse {
  0%,
  100% {
    opacity: 0.35;
  }
  50% {
    opacity: 1;
  }
}

/* ---------- the scene behind ---------- */
.hm-scene {
  position: fixed;
  inset: 0;
  overflow: hidden;
  z-index: -1;
  pointer-events: none;
}
.hm-scene-img {
  position: absolute;
  inset: -20px;
  background-size: cover;
  background-position: center 30%;
  animation: hm-kb 18s ease-in-out infinite alternate;
}
@keyframes hm-kb {
  from {
    transform: scale(1.02);
  }
  to {
    transform: scale(1.12) translate(-30px, -10px);
  }
}
.hm-veil {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(5, 10, 20, 0.95) 25%, rgba(5, 10, 20, 0.25) 68%),
    linear-gradient(0deg, rgba(5, 10, 20, 0.92), transparent 45%);
}
.home.is-page .hm-veil {
  background: linear-gradient(90deg, rgba(5, 10, 20, 0.97) 40%, rgba(5, 10, 20, 0.6));
}
.home .title-cap {
  z-index: 2;
}

/* ---------- Home and the landing ---------- */
.hm-hero {
  position: relative;
  z-index: 1;
  max-width: 760px;
  padding: clamp(28px, 9vh, 110px) var(--hm-pad) 40px;
}
.hm-tiles {
  position: absolute;
  right: 60px;
  bottom: 60px;
  display: flex;
  gap: 14px;
  z-index: 1;
}
.hm-tile {
  width: 200px;
  padding: 14px;
  border-radius: 16px;
  background: rgba(8, 16, 30, 0.66);
  border: 1px solid var(--line);
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.hm-tile b {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 15px;
}
.hm-tile span {
  font-size: 12px;
  color: #8ea3bf;
}
.hm-acts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}
.hm-act {
  flex: 1 1 160px;
  min-height: 64px;
  padding: 10px 16px;
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  border: 1px solid var(--line2);
  background: rgba(8, 16, 30, 0.6);
  color: #dbe7f5;
  border-radius: 12px;
  cursor: pointer;
}
.hm-act:hover {
  border-color: var(--glow);
}
.hm-act b {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.06em;
}
.hm-act span {
  font-size: 12px;
  color: #8ea3bf;
}
.hm-act.hm-back {
  border-color: var(--gold);
}
.hm-acct,
.hm-stats,
.hm-flavor {
  margin-top: 14px;
}
.hm-flavor {
  font-family: var(--flavor);
  font-style: italic;
  max-width: 520px;
}
.hm-squad {
  position: absolute;
  left: var(--hm-pad);
  bottom: 40px;
  display: none;
  gap: 14px;
}
.hm-pc {
  width: 180px;
  height: 120px;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line2);
  background: #0b1626 center 30% / cover no-repeat;
  border-radius: 10px;
}
.hm-pc::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(5, 10, 20, 0.95));
}
.hm-pc span {
  position: absolute;
  left: 12px;
  bottom: 10px;
  z-index: 1;
  font-family: var(--serif);
  font-size: 16px;
}
@media (min-width: 1200px) and (min-height: 860px) {
  .home.has-run .hm-squad {
    display: flex;
    left: auto;
    right: 60px;
  }
}

/* ---------- the setup ---------- */
.hm-setup {
  margin-top: 16px;
  border-radius: 14px;
  background: rgba(10, 20, 36, 0.74);
  border: 1px solid var(--line);
  backdrop-filter: blur(8px);
}
.hm-setup > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 0 18px;
}
.hm-setup > summary::-webkit-details-marker {
  display: none;
}
.hm-setup > summary::after {
  content: '▾';
  margin-left: auto;
  color: #8ea3bf;
}
.hm-setup[open] > summary::after {
  content: '▴';
}
.hm-setup-h {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.06em;
}
.hm-setup-sum {
  font-size: 12px;
  color: #8ea3bf;
}
.hm-setup[open] .hm-setup-sum {
  display: none;
}
.hm-setup-body {
  padding: 4px 18px 18px;
}
.hs-again {
  background: none;
  border: 1px dashed var(--line2);
  color: #b9c9de;
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 13px;
  cursor: pointer;
  margin-bottom: 10px;
  text-align: left;
}
.hs-row {
  display: grid;
  grid-template-columns: 92px 1fr;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
}
.hs-lab {
  font-family: var(--serif);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #8ea3bf;
}
.hs-seg {
  display: flex;
  border: 1px solid var(--line2);
  border-radius: 10px;
  overflow: hidden;
}
.hs-opt {
  flex: 1;
  min-height: 42px;
  border: 0;
  border-right: 1px solid var(--line);
  background: none;
  color: #b9c9de;
  font-family: var(--serif);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 0 6px;
}
.hs-opt:last-child {
  border-right: 0;
}
.hs-opt.on {
  background: var(--gold);
  color: #1a1205;
}
.hs-opt:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.hs-opt:focus-visible,
.hm-act:focus-visible,
.hm-chip:focus-visible {
  outline: 2px solid var(--glow);
  outline-offset: 2px;
}
.hs-foot {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 10px;
}
.hs-line {
  flex: 1;
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: #9fb2cb;
}
.hs-input {
  min-height: 42px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid var(--line2);
  background: rgba(5, 10, 20, 0.6);
  color: #fff;
  font-size: 15px;
}
.hs-note {
  font-size: 13px;
  line-height: 1.5;
  color: #8ea3bf;
  margin: 10px 0 0;
}

/* ---------- host, join and the table ---------- */
.hm-page {
  position: relative;
  z-index: 1;
  padding: 28px var(--hm-pad) 40px;
}
.hm-head {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 20px;
}
.hm-head h2 {
  margin: 4px 0 0;
  font-family: var(--serif);
  font-size: 30px;
}
.hm-backbtn {
  min-width: 44px;
  min-height: 44px;
  font-size: 22px;
}
.hm-cols {
  display: grid;
  grid-template-columns: minmax(300px, 500px) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
.hm-side {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}
.hs-panel {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.hm-invite {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.hm-code {
  font-family: var(--serif);
  font-size: 26px;
  letter-spacing: 0.3em;
  color: var(--gold);
}
.hm-link-box {
  flex: 1;
  min-width: 160px;
  min-height: 42px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid var(--line2);
  background: rgba(5, 10, 20, 0.6);
  color: #bff4fb;
  font-size: 14px;
}
.hm-seats {
  display: grid;
  grid-template-columns: repeat(var(--seats, 5), minmax(0, 1fr));
  gap: 10px;
}
.hm-seat {
  min-height: 190px;
  padding: 12px 8px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
  border-radius: 14px;
  background: rgba(10, 20, 36, 0.72);
  border: 1px solid var(--line);
  backdrop-filter: blur(8px);
}
.hm-seat .hm-av {
  width: 72px;
  height: 72px;
  font-size: 16px;
}
.hm-seat b {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 600;
}
.hm-seat.mine {
  border-color: var(--glow);
}
.hm-seat.open {
  border-style: dashed;
}
.hm-seat-st {
  font-family: var(--serif);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #6fe0a0;
}
.hm-people > .hs-lab {
  margin-bottom: 6px;
}
.hm-person {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}
.hm-person > div {
  flex: 1;
  min-width: 0;
}
.hm-go {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.hm-go > .mute {
  margin-right: auto;
  flex: 1 1 220px;
}
.hm-signnote p {
  margin: 6px 0 10px;
}
.hm-join {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.hm-join h2 {
  margin: 0 0 6px;
  font-family: var(--serif);
}
.hm-codein {
  min-height: 64px;
  font-family: var(--serif);
  font-size: 34px;
  letter-spacing: 0.6em;
  text-align: center;
  text-transform: uppercase;
  border-radius: 12px;
  border: 1px solid var(--glow);
  background: rgba(5, 10, 20, 0.6);
  color: #fff;
}
.hm-or {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #8ea3bf;
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-top: 8px;
}
.hm-or::before,
.hm-or::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}
.hm-brief h3,
.hm-waiting h3 {
  margin: 6px 0;
  font-family: var(--serif);
  font-size: 26px;
}
.hm-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.hm-wait {
  display: flex;
  flex-direction: column;
}
.hm-wait-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-top: 1px solid var(--line);
}
.hm-wait-row > div {
  flex: 1;
}
.hm-wait-row:not(.ready) .hm-seat-st {
  color: var(--gold);
}

/* ---------- the Lobby panel ---------- */
.hm-lobby-bg {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(2, 6, 12, 0.45);
  display: flex;
  justify-content: flex-end;
}
.hm-lobby {
  width: min(420px, 100%);
  height: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  background: rgba(8, 16, 30, 0.96);
  border-left: 1px solid var(--line2);
  backdrop-filter: blur(12px);
  animation: hm-slide 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes hm-slide {
  from {
    transform: translateX(40px);
    opacity: 0;
  }
}
.hm-lobby-h {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 18px 10px;
}
.hm-lobby-h b {
  font-family: var(--serif);
  font-size: 22px;
}
.hm-lobby-h > button {
  margin-left: auto;
  min-width: 44px;
  min-height: 44px;
}
.hm-tabs {
  display: flex;
  gap: 4px;
  margin: 0 18px;
  padding: 4px;
  border-radius: 22px;
  background: rgba(10, 20, 36, 0.7);
  border: 1px solid var(--line);
}
.hm-tabs button {
  flex: 1;
  min-height: 38px;
  border: 0;
  border-radius: 18px;
  background: none;
  color: #8ea3bf;
  font-size: 13px;
  cursor: pointer;
}
.hm-tabs button.on {
  background: rgba(127, 227, 240, 0.18);
  color: #fff;
}
.hm-lobby-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px 18px;
}
.hm-lobby-foot {
  display: flex;
  gap: 10px;
  padding: 12px 18px 18px;
  border-top: 1px solid var(--line);
}
.hm-lobby-foot button {
  flex: 1;
  min-height: 44px;
}
.home .net-games .net-game,
.hm-lobby .net-game {
  border-radius: 12px;
}

/* ---------- Home 4, "Fog prow" (Frogma - Tumult, Home screen (Nov 22)) ----------
   HyperSea's colours (Cosmic Shore's style guide): deep indigo, cyan for what is chosen, lime for the
   one thing to press. The painting keeps the left of the screen; the command column stands on the
   right; the captain is named on a plate at the bottom left. Corners are cut, never rounded. */
.home {
  --hs-ground: #00041f;
  --hs-line: #434c89;
  --hs-cyan: #00d4ff;
  --hs-lime: #99ff80;
  --hs-violet: #a600ff;
  --hs-text: #e6e9ff;
  --hs-soft: #9aa0cc;
  --hs-cut: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px);
  --hs-cut-s: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}
.home .hm-eyebrow {
  color: var(--hs-cyan);
  letter-spacing: 0.34em;
}
.home .hm-scene-img {
  opacity: 0;
  filter: blur(8px) brightness(0.55) saturate(1.2);
  transition:
    opacity 1.4s ease,
    filter 1.4s ease;
}
.home .hm-scene-img.on {
  opacity: 1;
  filter: none;
}
.home:not(.is-page) .hm-veil {
  background:
    linear-gradient(270deg, rgba(0, 4, 31, 0.95) 0%, rgba(0, 4, 31, 0.72) 32%, rgba(0, 4, 31, 0) 60%),
    linear-gradient(0deg, rgba(0, 4, 31, 0.75), transparent 32%);
}
.home:not(.is-page) .hm-hero {
  margin-left: auto;
  width: min(540px, 46vw);
  max-width: none;
  box-sizing: border-box;
  padding: clamp(20px, 6vh, 72px) var(--hm-pad) 48px 0;
}
/* the panel that leads: a light runs round its border */
@property --hm-a {
  syntax: '<angle>';
  inherits: false;
  initial-value: 0deg;
}
.hm-panel {
  position: relative;
  padding: 28px 30px 26px;
  margin-bottom: 4px;
  clip-path: var(--hs-cut);
  background: rgba(0, 4, 31, 0.8);
  backdrop-filter: blur(12px);
  isolation: isolate;
}
.hm-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -2;
  background: conic-gradient(
    from var(--hm-a),
    rgba(67, 76, 137, 0.9) 0deg,
    rgba(0, 212, 255, 0.95) 40deg,
    rgba(166, 0, 255, 0.85) 80deg,
    rgba(67, 76, 137, 0.9) 130deg,
    rgba(67, 76, 137, 0.9) 360deg
  );
  animation: hm-spin 5s linear infinite;
}
.hm-panel::after {
  content: '';
  position: absolute;
  inset: 1px;
  z-index: -1;
  clip-path: var(--hs-cut);
  background: rgba(0, 4, 31, 0.9);
}
@keyframes hm-spin {
  to {
    --hm-a: 360deg;
  }
}
.home .hm-panel .hm-display {
  margin: 10px 0 14px;
  font-size: clamp(36px, 4vw, 58px);
}
.home .hm-panel .hm-lede {
  color: #c3c8ee;
  font-size: 16px;
}
.hm-pips {
  display: flex;
  gap: 6px;
  margin: 0 0 14px;
}
.hm-pips i {
  width: 26px;
  height: 6px;
  background: #222645;
}
.hm-pips i.done {
  background: var(--hs-cyan);
  box-shadow: 0 0 8px var(--hs-cyan);
}
.hm-pips i.now {
  background: var(--hs-lime);
  box-shadow: 0 0 10px var(--hs-lime);
  animation: hm-blink 1.6s ease-in-out infinite;
}
@keyframes hm-blink {
  0%,
  100% {
    opacity: 0.4;
  }
  50% {
    opacity: 1;
  }
}
/* the one thing to press: lime, a glow that breathes and a shine that sweeps across */
.home button.hm-cta,
.home button.primary.hm-cta {
  position: relative;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  clip-path: var(--hs-cut);
  background: var(--hs-lime);
  color: var(--hs-ground);
  font-weight: 700;
  letter-spacing: 0.22em;
  animation: hm-glow 2.6s ease-in-out infinite;
}
.home .hm-panel .hm-ctas > .hm-cta {
  flex: 1 1 100%;
}
.home button.hm-cta::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 60px;
  left: -80px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.65), transparent);
  transform: skewX(-20deg);
  animation: hm-sweep 3.4s ease-in-out infinite;
  pointer-events: none;
}
.home button.hm-cta:hover {
  filter: brightness(1.08);
}
@keyframes hm-glow {
  0%,
  100% {
    box-shadow: 0 0 16px rgba(153, 255, 128, 0.3);
  }
  50% {
    box-shadow: 0 0 34px rgba(153, 255, 128, 0.7);
  }
}
@keyframes hm-sweep {
  0%,
  55% {
    left: -80px;
  }
  100% {
    left: 120%;
  }
}
/* the setup and the other ways in: bordered, cut, cyan when chosen */
.home .hm-setup {
  border: 1px solid var(--hs-line);
  border-radius: 0;
  clip-path: var(--hs-cut);
  background: rgba(0, 4, 31, 0.66);
  backdrop-filter: blur(10px);
}
.home .hm-setup[open] {
  border-color: var(--hs-cyan);
  box-shadow: 0 0 24px rgba(0, 212, 255, 0.18);
}
.home .hs-seg {
  border-radius: 0;
  border-color: var(--hs-line);
}
.home .hs-opt.on {
  background: var(--hs-cyan);
  color: var(--hs-ground);
}
.home .hm-acts {
  flex-direction: column;
}
.home .hm-act {
  flex: 0 0 auto;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
  min-height: 62px;
  padding: 12px 18px;
  border: 1px solid var(--hs-line);
  border-radius: 0;
  clip-path: var(--hs-cut);
  background: rgba(0, 4, 31, 0.62);
  backdrop-filter: blur(10px);
  color: var(--hs-text);
  transition:
    border-color 0.2s,
    box-shadow 0.2s,
    transform 0.2s;
}
.home .hm-act:hover,
.home .hm-act:focus-visible {
  border-color: var(--hs-cyan);
  box-shadow:
    inset 0 0 0 1px rgba(0, 212, 255, 0.35),
    0 0 24px rgba(0, 212, 255, 0.22);
  transform: translateX(-3px);
}
.home .hm-act.hm-back {
  border-color: var(--hs-lime);
}
.hm-act-t {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.home .hm-act-t > span {
  color: var(--hs-soft);
}
.hm-ic {
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  color: var(--hs-cyan);
}
/* the captain's plate */
.hm-plate {
  position: fixed;
  left: var(--hm-pad);
  bottom: 40px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: 40vw;
  transition:
    opacity 0.7s ease,
    transform 0.7s ease;
}
.hm-plate.out {
  opacity: 0;
  transform: translateY(10px);
}
.hm-plate-face {
  width: 84px;
  height: 84px;
  object-fit: cover;
  clip-path: var(--hs-cut);
  border: 1px solid var(--hs-cyan);
  box-shadow: 0 0 18px rgba(0, 212, 255, 0.35);
}
.hm-plate-txt {
  display: flex;
  flex-direction: column;
  gap: 3px;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.8);
}
.hm-plate-lab {
  font-family: var(--serif);
  font-size: 11px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--hs-cyan);
}
.hm-plate-name {
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #fff;
}
.hm-plate-sub {
  font-size: 13px;
  color: #c3c8ee;
}
/* motes drifting up through the painting */
.hm-motes {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}
.hm-motes i {
  position: absolute;
  bottom: -10px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--hs-text);
  box-shadow: 0 0 8px var(--hs-cyan);
  opacity: 0;
  animation: hm-mote 13s linear infinite;
}
.hm-motes i:nth-child(1) {
  left: 3%;
  animation-delay: 0s;
  animation-duration: 11s;
}
.hm-motes i:nth-child(2) {
  left: 11%;
  animation-delay: 1.1s;
  animation-duration: 12.6s;
}
.hm-motes i:nth-child(3) {
  left: 19%;
  animation-delay: 2.2s;
  animation-duration: 14.2s;
}
.hm-motes i:nth-child(4) {
  left: 27%;
  animation-delay: 3.3s;
  animation-duration: 15.8s;
}
.hm-motes i:nth-child(5) {
  left: 35%;
  animation-delay: 4.4s;
  animation-duration: 17.4s;
}
.hm-motes i:nth-child(6) {
  left: 43%;
  animation-delay: 5.5s;
  animation-duration: 11s;
}
.hm-motes i:nth-child(7) {
  left: 51%;
  animation-delay: 6.6s;
  animation-duration: 12.6s;
}
.hm-motes i:nth-child(8) {
  left: 59%;
  animation-delay: 7.7s;
  animation-duration: 14.2s;
}
.hm-motes i:nth-child(9) {
  left: 67%;
  animation-delay: 8.8s;
  animation-duration: 15.8s;
}
.hm-motes i:nth-child(10) {
  left: 75%;
  animation-delay: 9.9s;
  animation-duration: 17.4s;
}
.hm-motes i:nth-child(11) {
  left: 83%;
  animation-delay: 11s;
  animation-duration: 11s;
}
.hm-motes i:nth-child(12) {
  left: 91%;
  animation-delay: 12.1s;
  animation-duration: 12.6s;
}
@keyframes hm-mote {
  0% {
    transform: translateY(0);
    opacity: 0;
  }
  15% {
    opacity: 0.8;
  }
  85% {
    opacity: 0.4;
  }
  100% {
    transform: translateY(-70vh);
    opacity: 0;
  }
}
.home .title-cap,
.home .hm-squad,
.home.has-run .hm-squad {
  display: none;
}
.home.is-landing .hm-display {
  font-size: clamp(38px, 4.2vw, 62px);
}
.home button.hm-big,
.home .hm-ctas > button.ghost {
  border: 1px solid var(--hs-line);
  border-radius: 0;
  clip-path: var(--hs-cut-s);
  background: rgba(0, 4, 31, 0.6);
  color: var(--hs-text);
  min-height: 54px;
}
.home button.hm-big:hover {
  border-color: var(--hs-cyan);
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.25);
}
.home .hm-tile {
  border-radius: 0;
  clip-path: var(--hs-cut);
  border-color: var(--hs-line);
  background: rgba(0, 4, 31, 0.66);
}
.home .hm-tile b {
  color: var(--hs-text);
}
.home.is-landing .hm-tiles {
  right: auto;
  left: var(--hm-pad);
  bottom: 150px;
  position: fixed;
}
@media (max-width: 1199px) {
  .home.is-landing .hm-tiles {
    display: none;
  }
}

/* ---------- motion: the setup unfolds, and everything you can press answers the pointer ---------- */
.home .hm-setup[open]:not(.hm-quiet) .hm-setup-body {
  animation: hm-unfold 0.42s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.home .hm-setup[open]:not(.hm-quiet) .hs-row,
.home .hm-setup[open]:not(.hm-quiet) .hs-foot,
.home .hm-setup[open]:not(.hm-quiet) .hs-again {
  animation: hm-rise 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.home .hm-setup[open]:not(.hm-quiet) .hs-row:nth-of-type(1) {
  animation-delay: 0.04s;
}
.home .hm-setup[open]:not(.hm-quiet) .hs-row:nth-of-type(2) {
  animation-delay: 0.08s;
}
.home .hm-setup[open]:not(.hm-quiet) .hs-row:nth-of-type(3) {
  animation-delay: 0.12s;
}
.home .hm-setup[open]:not(.hm-quiet) .hs-row:nth-of-type(4) {
  animation-delay: 0.16s;
}
.home .hm-setup[open]:not(.hm-quiet) .hs-foot {
  animation-delay: 0.22s;
}
@keyframes hm-unfold {
  from {
    clip-path: inset(0 0 100% 0);
    opacity: 0;
  }
  to {
    clip-path: inset(0 0 0 0);
    opacity: 1;
  }
}
@keyframes hm-rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.home .hm-setup {
  transition:
    border-color 0.25s,
    box-shadow 0.25s;
}
.home .hm-setup > summary {
  transition: background 0.2s;
}
.home .hm-setup > summary:hover {
  background: rgba(0, 212, 255, 0.07);
}
.home .hm-setup:not([open]):hover {
  --hs-edge: var(--hs-cyan);
  border-color: var(--hs-cyan);
  box-shadow: 0 0 22px rgba(0, 212, 255, 0.2);
}
.home .hm-setup > summary::after {
  transition: transform 0.3s ease;
}
.home .hs-opt {
  position: relative;
  transition:
    background 0.22s,
    color 0.22s,
    box-shadow 0.22s;
}
.home .hs-opt:not(.on):not(:disabled):hover {
  background: rgba(0, 212, 255, 0.12);
  color: #fff;
  box-shadow: inset 0 -2px 0 var(--hs-cyan);
}
.home .hs-opt.on {
  box-shadow: 0 0 16px rgba(0, 212, 255, 0.45);
}
.home .hs-opt:active:not(:disabled),
.home .hm-act:active,
.home button.hm-big:active {
  transform: scale(0.97);
}
.home button.hm-cta {
  transition:
    transform 0.18s ease,
    filter 0.18s;
}
.home button.hm-cta:hover {
  transform: translateY(-2px);
  filter: brightness(1.1) saturate(1.1);
}
.home button.hm-cta:active {
  transform: translateY(0) scale(0.98);
}
.home .hm-act .hm-ic {
  transition:
    transform 0.25s ease,
    filter 0.25s;
}
.home .hm-act:hover .hm-ic {
  transform: scale(1.12);
  filter: drop-shadow(0 0 6px var(--hs-cyan));
}
.home .hs-again {
  transition:
    border-color 0.2s,
    color 0.2s,
    background 0.2s;
}
.home .hs-again:hover {
  border-color: var(--hs-cyan);
  color: #fff;
  background: rgba(0, 212, 255, 0.08);
}
.home button.hm-big,
.home .hm-tile {
  transition:
    border-color 0.2s,
    box-shadow 0.2s,
    transform 0.2s;
}
.home button.hm-big:hover,
.home .hm-tile:hover {
  transform: translateY(-2px);
}
.home .hm-tile:hover {
  --hs-edge: var(--hs-cyan);
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.22);
}
.home .hm-plate-face {
  transition:
    transform 0.3s,
    box-shadow 0.3s;
}
.home .hm-plate:hover .hm-plate-face {
  transform: scale(1.05);
  box-shadow: 0 0 26px rgba(0, 212, 255, 0.6);
}
/* the top bar: a tab's underline grows from its middle, the gear turns. None of them takes the
   plain button's box on hover (style.css): the logo, the tabs and the setup's choices light up instead */
.sh-logo:hover:not(:disabled),
.sh-tab:hover:not(:disabled),
.home .hm-link:hover:not(:disabled) {
  background: none;
  border-color: transparent;
  box-shadow: none;
  transform: none;
}
.sh-tab:hover:not(:disabled) {
  color: #fff;
  background: linear-gradient(0deg, rgba(0, 212, 255, 0.1), transparent 70%);
}
.home .hs-opt:hover:not(:disabled) {
  transform: none;
  border-color: var(--hs-line);
}
.home .hs-opt:last-child:hover {
  border-color: transparent;
}
.sh-top .sh-logo:focus-visible,
.sh-top .sh-tab:focus-visible {
  outline: none;
  color: #fff;
  text-shadow: 0 0 12px rgba(0, 212, 255, 0.8);
}
.sh-tab {
  position: relative;
  transition:
    color 0.2s,
    background 0.2s;
}
.sh-tab::after {
  content: '';
  position: absolute;
  left: 50%;
  right: 50%;
  bottom: 0;
  height: 2px;
  background: var(--cy);
  box-shadow: 0 0 8px var(--cy);
  transition:
    left 0.25s ease,
    right 0.25s ease;
}
.sh-tab:not(.on):hover::after,
.sh-tab:not(.on):focus-visible::after {
  left: 16px;
  right: 16px;
}
.sh-logo {
  transition:
    text-shadow 0.25s,
    color 0.25s;
}
.sh-logo:hover:not(:disabled) {
  color: #fff;
  text-shadow: 0 0 14px rgba(0, 212, 255, 0.7);
}
.sh-gear {
  transition:
    transform 0.4s ease,
    border-color 0.2s,
    box-shadow 0.2s;
}
.sh-gear:hover {
  transform: rotate(60deg);
  border-color: var(--cy);
  box-shadow: 0 0 14px rgba(0, 212, 255, 0.35);
}
.sh-right > button:not(.sh-gear),
.sh-right > a {
  transition:
    transform 0.2s,
    box-shadow 0.2s,
    border-color 0.2s;
}
.sh-right > button:not(.sh-gear):hover,
.sh-right > a:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 14px rgba(0, 212, 255, 0.3);
}
:root[data-motion='off'] .home .hm-setup-body,
:root[data-motion='off'] .home .hs-row,
:root[data-motion='off'] .home .hs-foot,
:root[data-motion='off'] .home .hs-again {
  animation: none !important;
}
:root[data-motion='off'] .home *,
:root[data-motion='off'] .sh-top * {
  transition-duration: 0s !important;
}
@media (prefers-reduced-motion: reduce) {
  .home .hm-setup-body,
  .home .hs-row,
  .home .hs-foot,
  .home .hs-again {
    animation: none !important;
  }
  .home *,
  .sh-top * {
    transition-duration: 0s !important;
  }
}

.hm-keep {
  margin: 12px 0 0;
  font-size: 12.5px;
  color: var(--hs-soft, #9aa0cc);
}
.home button.hm-keep-btn {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: var(--hs-cyan);
  cursor: pointer;
  background-image: linear-gradient(var(--hs-cyan), var(--hs-cyan));
  background-size: 0 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size 0.25s ease;
}
.home button.hm-keep-btn:hover:not(:disabled) {
  background: none;
  background-image: linear-gradient(var(--hs-cyan), var(--hs-cyan));
  background-size: 100% 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  box-shadow: none;
  transform: none;
}

/* ---------- the Lobby, "Drawer plus" (Frogma - Tumult, Sign in + Lobby (Nov 22), Lobby 1) ----------
   A drawer from the right with a glowing cyan edge; Games, People and Requests tabs with a lit underline;
   rows that lift and glow on hover; a player's card flying out beside it. HyperSea colours, cut corners. */
.lb-bg {
  --lb-ground: #00041f;
  --lb-line: #2f3670;
  --lb-line2: #434c89;
  --lb-cyan: #00d4ff;
  --lb-lime: #99ff80;
  --lb-violet: #a600ff;
  --lb-text: #e6e9ff;
  --lb-soft: #9aa0cc;
  --lb-mute: #747bad;
  --lb-cut: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
  background: rgba(0, 2, 16, 0.5);
  backdrop-filter: blur(2px);
  animation: lb-fade 0.3s ease both;
}
@keyframes lb-fade {
  from {
    opacity: 0;
  }
}
.hm-lobby.lb {
  width: min(460px, 100%);
  background: linear-gradient(180deg, rgba(0, 6, 40, 0.97), rgba(0, 2, 18, 0.98));
  border-left: 1px solid var(--lb-cyan);
  box-shadow:
    -1px 0 24px rgba(0, 212, 255, 0.35),
    -30px 0 60px rgba(0, 0, 0, 0.5);
  color: var(--lb-text);
  position: relative;
  animation:
    lb-in 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) both,
    lb-edge 3.2s ease-in-out infinite;
}
.hm-lobby.lb::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--lb-cyan), transparent);
}
@keyframes lb-in {
  from {
    transform: translateX(60px);
    opacity: 0;
  }
}
@keyframes lb-edge {
  0%,
  100% {
    box-shadow:
      -1px 0 16px rgba(0, 212, 255, 0.25),
      -30px 0 60px rgba(0, 0, 0, 0.5);
  }
  50% {
    box-shadow:
      -1px 0 34px rgba(0, 212, 255, 0.55),
      -30px 0 60px rgba(0, 0, 0, 0.5);
  }
}
.lb-still,
.lb-still .hm-lobby.lb {
  animation-name: none, lb-edge;
}
.lb-still {
  animation: none;
}
.lb-h {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 24px 24px 14px;
}
.lb-h > b {
  font-family: var(--hd, 'Chakra Petch', sans-serif);
  font-size: 24px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.lb-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 28px;
  padding: 0 12px;
  border: 1px solid rgba(153, 255, 128, 0.45);
  color: var(--lb-lime);
  font-size: 12px;
}
.lb-pill i,
.lb-dot.on {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--lb-lime);
  box-shadow: 0 0 8px var(--lb-lime);
  animation: lb-blink 1.8s ease-in-out infinite;
}
@keyframes lb-blink {
  50% {
    opacity: 0.4;
  }
}
.lb-bg button.lb-x {
  margin-left: auto;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--lb-line2);
  border-radius: 0;
  clip-path: var(--lb-cut);
  background: rgba(0, 4, 31, 0.6);
  color: var(--lb-soft);
  transition:
    color 0.2s,
    border-color 0.2s,
    transform 0.3s;
}
.lb-bg button.lb-x:hover:not(:disabled) {
  color: #fff;
  border-color: var(--lb-cyan);
  background: rgba(0, 212, 255, 0.1);
  box-shadow: none;
  transform: rotate(90deg);
}
.lb-tabs {
  display: flex;
  margin: 0 24px;
  border-bottom: 1px solid var(--lb-line);
}
.lb-tabs button {
  position: relative;
  flex: 1;
  height: 44px;
  padding: 0 6px;
  border: 0;
  border-radius: 0;
  background: none;
  font-family: var(--hd, 'Chakra Petch', sans-serif);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--lb-mute);
}
.lb-tabs button::after {
  content: '';
  position: absolute;
  left: 50%;
  right: 50%;
  bottom: -1px;
  height: 2px;
  background: var(--lb-cyan);
  box-shadow: 0 0 10px var(--lb-cyan);
  transition:
    left 0.3s ease,
    right 0.3s ease;
}
.lb-tabs button.on {
  color: #fff;
}
.lb-tabs button.on::after,
.lb-tabs button:hover::after {
  left: 14px;
  right: 14px;
}
.lb-tabs button:hover:not(:disabled) {
  background: linear-gradient(0deg, rgba(0, 212, 255, 0.08), transparent);
  color: #fff;
  border: 0;
  box-shadow: none;
  transform: none;
}
.lb-tabs em {
  font-style: normal;
  margin-left: 6px;
  padding: 1px 6px;
  font-size: 10px;
  background: var(--lb-violet);
  color: #fff;
  box-shadow: 0 0 10px rgba(166, 0, 255, 0.7);
  animation: lb-blink 1.8s ease-in-out infinite;
}
.lb-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.lb-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.lb-find {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--lb-line2);
  clip-path: var(--lb-cut);
  background: rgba(0, 4, 31, 0.7);
  color: var(--lb-mute);
  transition: border-color 0.2s;
}
.lb-find:focus-within {
  border-color: var(--lb-cyan);
  box-shadow: inset 0 0 0 1px rgba(0, 212, 255, 0.3);
}
.lb-find input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: none;
  color: var(--lb-text);
  font-size: 14px;
}
.lb-person,
.lb-req,
.lb-game {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--lb-line);
  clip-path: var(--lb-cut);
  background: rgba(0, 4, 31, 0.72);
  cursor: pointer;
  transition:
    border-color 0.2s,
    box-shadow 0.2s,
    transform 0.2s,
    background 0.2s;
  animation: lb-rise 0.45s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.lb-game {
  flex-direction: column;
  align-items: stretch;
  cursor: default;
}
.lb-still .lb-person,
.lb-still .lb-req,
.lb-still .lb-game {
  animation: none;
}
@keyframes lb-rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}
.lb-person:hover,
.lb-person:focus-visible,
.lb-person.on,
.lb-game:hover,
.lb-req:hover {
  border-color: var(--lb-cyan);
  background: rgba(0, 18, 60, 0.8);
  box-shadow:
    inset 0 0 0 1px rgba(0, 212, 255, 0.25),
    0 0 22px rgba(0, 212, 255, 0.22);
  transform: translateX(-3px);
  outline: none;
}
.lb-av {
  position: relative;
  flex: 0 0 auto;
}
.lb-face,
.lb-av .hm-av,
.lb-game-top .hm-av {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 0;
  clip-path: var(--lb-cut);
  border: 1px solid var(--lb-line2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.lb-dot {
  position: absolute;
  right: -3px;
  bottom: -3px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 2px solid var(--lb-ground);
}
.lb-dot.away {
  background: #ffc94d;
  box-shadow: 0 0 8px #ffc94d;
}
.lb-who {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.lb-who b {
  font-family: var(--hd, 'Chakra Petch', sans-serif);
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.lb-who > span {
  font-size: 12px;
  color: var(--lb-mute);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lb-acts {
  display: flex;
  gap: 6px;
  align-items: center;
}
.lb-tag {
  font-family: var(--hd, 'Chakra Petch', sans-serif);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 2px 6px;
  border: 1px solid var(--lb-line2);
  color: var(--lb-soft);
}
.lb-tag.cy {
  border-color: var(--lb-cyan);
  color: var(--lb-cyan);
}
.lb-tag.go {
  border-color: var(--lb-lime);
  color: var(--lb-lime);
}
.lb-tag.pu {
  border-color: var(--lb-violet);
  color: #d9a6ff;
}
.lb-bg button.lb-btn {
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--lb-line2);
  border-radius: 0;
  clip-path: polygon(7px 0, 100% 0, 100% calc(100% - 7px), calc(100% - 7px) 100%, 0 100%, 0 7px);
  background: rgba(0, 4, 31, 0.6);
  color: var(--lb-text);
  font-family: var(--hd, 'Chakra Petch', sans-serif);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  white-space: nowrap;
  transition:
    transform 0.18s,
    box-shadow 0.2s,
    background 0.2s,
    border-color 0.2s;
}
.lb-bg button.lb-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: var(--lb-cyan);
  background: rgba(0, 212, 255, 0.12);
  box-shadow: 0 0 14px rgba(0, 212, 255, 0.35);
}
.lb-bg button.lb-btn.go {
  border: 0;
  background: var(--lb-lime);
  color: var(--lb-ground);
  box-shadow: 0 0 14px rgba(153, 255, 128, 0.4);
}
.lb-bg button.lb-btn.go:hover:not(:disabled) {
  background: #b5ffa3;
  box-shadow: 0 0 24px rgba(153, 255, 128, 0.7);
}
.lb-bg button.lb-btn.cy {
  border-color: var(--lb-cyan);
  color: var(--lb-cyan);
}
.lb-bg button.lb-btn.pu {
  border-color: var(--lb-violet);
  color: #d9a6ff;
}
.lb-bg button.lb-btn.pu:hover:not(:disabled) {
  background: rgba(166, 0, 255, 0.16);
  box-shadow: 0 0 16px rgba(166, 0, 255, 0.45);
}
.lb-bg button.lb-btn.wide {
  flex: 1;
  height: 44px;
}
.lb-game-top {
  display: flex;
  align-items: center;
  gap: 12px;
}
.lb-seats {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 10px;
}
.lb-seat {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--lb-line2);
  font-size: 10px;
  color: var(--lb-soft);
  background: rgba(0, 212, 255, 0.06);
}
.lb-seat.open {
  border: 1px dashed var(--lb-lime);
  color: var(--lb-lime);
  background: none;
  animation: lb-blink 2s ease-in-out infinite;
}
.lb-seatn {
  margin-left: auto;
  font-size: 11.5px;
  color: var(--lb-mute);
}
.lb-note {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--lb-mute);
}
.lb-empty {
  padding: 26px 18px;
  border: 1px dashed var(--lb-line);
  text-align: center;
  color: var(--lb-soft);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.lb-empty p {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
}
.lb-foot {
  display: flex;
  gap: 10px;
  padding: 16px 24px 22px;
  border-top: 1px solid var(--lb-line);
}
.lb-bg button.lb-host {
  position: relative;
  overflow: hidden;
  flex: 1.2;
  height: 44px;
  border: 0;
  border-radius: 0;
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
  background: var(--lb-lime);
  color: var(--lb-ground);
  font-family: var(--hd, 'Chakra Petch', sans-serif);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  animation: hm-glow 2.6s ease-in-out infinite;
}
.lb-bg button.lb-host::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50px;
  left: -70px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
  transform: skewX(-20deg);
  animation: hm-sweep 3.4s ease-in-out infinite;
}
.lb-bg button.lb-host:hover:not(:disabled) {
  background: #b5ffa3;
  transform: translateY(-2px);
}
/* the player's card, beside the drawer */
.lb-card {
  position: relative;
  align-self: flex-start;
  margin: 110px 20px 0 0;
  width: min(360px, calc(100vw - 500px));
  background: rgba(0, 4, 31, 0.97);
  border: 1px solid var(--lb-cyan);
  clip-path: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px);
  animation: lb-edge 3.2s ease-in-out infinite;
  overflow: hidden;
  color: var(--lb-text);
}
.lb-card.fresh {
  animation:
    lb-pop 0.5s cubic-bezier(0.2, 0.9, 0.25, 1.15) both,
    lb-edge 3.2s ease-in-out infinite;
}
@keyframes lb-pop {
  from {
    opacity: 0;
    transform: translateX(30px) scale(0.96);
  }
}
.lb-card .lb-x {
  position: absolute;
  right: 10px;
  top: 10px;
  z-index: 2;
}
.lb-banner {
  height: 110px;
  background: linear-gradient(135deg, #0b1450, #2a0a52) center 30% / cover;
  position: relative;
}
.lb-banner::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 4, 31, 1), rgba(0, 4, 31, 0.1));
}
.lb-card-in {
  position: relative;
  margin-top: -42px;
  padding: 0 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.lb-card-who {
  display: flex;
  align-items: flex-end;
  gap: 12px;
}
.lb-card-who b {
  display: block;
  font-family: var(--hd, 'Chakra Petch', sans-serif);
  font-size: 22px;
}
.lb-card-who span {
  font-size: 12px;
  color: var(--lb-mute);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.lb-card-who .lb-dot {
  position: static;
  border: 0;
}
.lb-face.big,
.lb-card-who .hm-av {
  width: 80px;
  height: 80px;
  border: 2px solid var(--lb-cyan);
  box-shadow: 0 0 18px rgba(0, 212, 255, 0.5);
  font-size: 24px;
  background: var(--lb-ground);
}
.lb-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--lb-line);
}
.lb-stat {
  padding: 10px 12px;
}
.lb-stat b {
  display: block;
  font-family: var(--hd, 'Chakra Petch', sans-serif);
  font-size: 22px;
}
.lb-stat span,
.lb-lab {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--lb-mute);
}
.lb-pilots {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}
.lb-pilots img {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border: 1px solid var(--lb-line2);
  transition:
    transform 0.2s,
    border-color 0.2s;
}
.lb-pilots img:hover {
  transform: translateY(-2px) scale(1.05);
  border-color: var(--lb-cyan);
}
.lb-card-acts {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
/* a toast with a choice in it (a friend request, an ask to join, an invite) */
.toast .so-toast-btns {
  display: inline-flex;
  gap: 6px;
  margin-left: 10px;
  vertical-align: middle;
}
@media (max-width: 860px) {
  .lb-card {
    position: fixed;
    inset: auto 12px 12px 12px;
    width: auto;
    margin: 0;
    z-index: 2;
  }
}
:root[data-motion='off'] .lb-bg,
:root[data-motion='off'] .lb-bg *,
:root[data-motion='off'] .lb-bg *::after {
  animation: none !important;
  transition-duration: 0s !important;
}
@media (prefers-reduced-motion: reduce) {
  .lb-bg,
  .lb-bg *,
  .lb-bg *::after {
    animation: none !important;
    transition-duration: 0s !important;
  }
}

/* ---------- motion settings ---------- */
:root[data-motion='off'] .hm-scene-img,
:root[data-motion='off'] .hm-av.open,
:root[data-motion='off'] .hm-lobby,
:root[data-motion='off'] .hm-panel::before,
:root[data-motion='off'] .home .hm-cta,
:root[data-motion='off'] .home .hm-cta::after,
:root[data-motion='off'] .hm-pips i,
:root[data-motion='off'] .hm-motes {
  animation: none;
}
:root[data-motion='off'] .hm-motes {
  display: none;
}
:root[data-motion='reduced'] .hm-scene-img {
  animation: none;
}
@media (prefers-reduced-motion: reduce) {
  .hm-scene-img,
  .hm-av.open,
  .hm-lobby,
  .hm-panel::before,
  .home .hm-cta,
  .home .hm-cta::after,
  .hm-motes i {
    animation: none;
  }
}

/* ---------- tablets ---------- */
@media (max-width: 1100px) {
  .hm-tiles {
    position: static;
    padding: 0 var(--hm-pad) 40px;
    flex-wrap: wrap;
  }
  .hm-cols {
    grid-template-columns: 1fr;
  }
}

/* ---------- phones ---------- */
@media (max-width: 760px) {
  .home {
    --hm-pad: 16px;
  }
  .hm-bar {
    height: 56px;
    background: rgba(5, 10, 20, 0.94);
  }
  .hm-nav {
    display: none;
  }
  .hm-brand {
    font-size: 18px;
  }
  .hm-veil {
    background: linear-gradient(0deg, rgba(5, 10, 20, 0.97) 35%, rgba(5, 10, 20, 0.35) 80%);
  }
  .hm-hero {
    padding-top: 24vh;
    max-width: none;
  }
  .home.has-run .hm-hero {
    padding-top: 16vh;
  }
  .home .hm-lede {
    font-size: 15px;
  }
  .home .hm-ctas > button {
    flex: 1 1 100%;
  }
  .hm-tiles {
    display: none;
  }
  .hm-act {
    flex: 1 1 100%;
    min-height: 56px;
  }
  .hs-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .hs-foot {
    flex-direction: column;
    align-items: stretch;
  }
  .hs-foot .hm-cta {
    width: 100%;
  }
  .hm-head h2 {
    font-size: 22px;
  }
  .hm-seats {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .hm-seat {
    min-height: 0;
    flex-direction: row;
    justify-content: flex-start;
    text-align: left;
    padding: 10px 12px;
  }
  .hm-seat .hm-av {
    width: 44px;
    height: 44px;
  }
  .hm-seat b {
    flex: 1;
  }
  .hm-go {
    flex-direction: column;
    align-items: stretch;
  }
  .hm-go > button {
    width: 100%;
    min-height: 50px;
  }
  .hm-lobby {
    width: 100%;
  }
  .home .title-cap,
  .hm-plate {
    display: none;
  }
  .home:not(.is-page) .hm-hero {
    width: auto;
    margin-left: 0;
    padding: 24vh var(--hm-pad) 32px;
  }
  .home.has-run:not(.is-page) .hm-hero {
    padding-top: 16vh;
  }
  .home:not(.is-page) .hm-veil {
    background: linear-gradient(0deg, rgba(0, 4, 31, 0.97) 40%, rgba(0, 4, 31, 0.3) 85%);
  }
  .hm-panel {
    padding: 22px 20px;
  }
}

/* the cut corners keep their border: a hairline drawn along each diagonal */
.home .hm-act,
.home .hm-setup,
.home .hm-tile,
.home button.hm-big,
.home .hm-ctas > button.ghost {
  --hs-edge: var(--hs-line);
  background:
    linear-gradient(135deg, transparent 9.3px, var(--hs-edge) 9.3px 10.7px, transparent 10.7px) top left / 14px 14px
      no-repeat,
    linear-gradient(135deg, transparent 9.3px, var(--hs-edge) 9.3px 10.7px, transparent 10.7px) bottom right / 14px 14px
      no-repeat,
    rgba(0, 4, 31, 0.64);
}
.home button.hm-big,
.home .hm-ctas > button.ghost {
  background:
    linear-gradient(135deg, transparent 6.4px, var(--hs-edge) 6.4px 7.8px, transparent 7.8px) top left / 10px 10px
      no-repeat,
    linear-gradient(135deg, transparent 6.4px, var(--hs-edge) 6.4px 7.8px, transparent 7.8px) bottom right / 10px 10px
      no-repeat,
    rgba(0, 4, 31, 0.6);
}
.home .hm-act:hover,
.home .hm-act:focus-visible,
.home .hm-setup[open],
.home button.hm-big:hover {
  --hs-edge: var(--hs-cyan);
}
.home .hm-act.hm-back {
  --hs-edge: var(--hs-lime);
}


/* ───── ui/net.css ───── */
/* Play online (src/ui/net.js; playtest build only) */
.title .net-pick {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  justify-content: center;
  margin-top: 14px;
  max-width: 560px;
}
.title .net-pick .mute {
  flex-basis: 100%;
  text-align: center;
}
.net-pick input {
  background: #0b1222;
  border: 1px solid var(--line2);
  color: var(--txt);
  padding: 5px 8px;
  border-radius: 6px;
}
.net-lobby {
  max-width: 520px;
  margin: 60px auto;
  text-align: center;
}
.net-lobby .row {
  justify-content: center;
}
/* the list of games on the title (2.80) */
.title .net-games {
  flex-basis: 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 6px 0;
  text-align: left;
}
.net-game {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  border: 1px solid var(--line2);
  border-radius: 8px;
  background: #0b1222;
}
.net-game-who {
  flex: 1;
  min-width: 0;
}
.net-game.quiet {
  opacity: 0.6;
}
.net-quiet summary {
  cursor: pointer;
  margin: 2px 0 4px;
}
.net-quiet .net-game {
  margin-bottom: 4px;
}
/* the table's choices in the lobby, and the strip that says a player has dropped (2.84) */
.net-opts {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
  margin: 10px 0;
}
.net-seg {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
}
.net-away {
  position: fixed;
  left: 50%;
  top: 12px;
  transform: translateX(-50%);
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: min(640px, calc(100vw - 32px));
}
.net-away-row {
  background: rgba(10, 20, 36, 0.94);
  border: 1px solid var(--line2);
  border-radius: 8px;
  padding: 8px 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
