:root {
  --navy: #14293a;
  --navy-2: #1d3a50;
  --ink: #1d2a33;
  --muted: #55636c;
  --paper: #f6eedd;
  --paper-2: #efe3c8;
  --sky: #e6f3f7;
  --sea: #0b7ea3;
  --coin: #2a8fd0;
  --gold: #d9a441;
  --wood: #8a5a32;
  --serif: Georgia, "Songti TC", "Noto Serif TC", "Songti SC", serif;
  --sans:
    -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang TC",
    "Microsoft JhengHei", "PingFang SC", sans-serif;
  --gutter: clamp(16px, 5vw, 80px);
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font: 17px/1.75 var(--sans);
}
a {
  color: inherit;
  text-decoration: none;
}
a:hover {
  color: var(--sea);
}
button {
  font: 600 16px/1.4 var(--sans);
  cursor: pointer;
}
img {
  max-width: 100%;
  height: auto;
  display: block;
}
h1,
h2,
h3,
p,
figure,
blockquote,
dl,
dd {
  margin: 0;
}
h1,
h2,
h3 {
  font-family: var(--serif);
  line-height: 1.2;
  letter-spacing: -0.01em;
}
h1 {
  font-size: clamp(32px, 4.6vw, 64px);
}
h2 {
  font-size: clamp(26px, 3vw, 42px);
}
h3 {
  font-size: 20px;
}
svg {
  flex-shrink: 0;
}
a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}
[hidden] {
  display: none !important;
}
.container {
  width: 100%;
  max-width: 1376px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.narrow {
  max-width: 960px;
}
.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 20;
  padding: 10px 16px;
  background: white;
}
.skip:focus {
  top: 8px;
}
.adult-bar {
  padding: 4px var(--gutter);
  font-size: 13px;
  text-align: center;
  color: #f6eedd;
  background: #0b1721;
}
/* Header */
.site-header {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 72px;
  padding: 6px var(--gutter);
  color: #f6eedd;
  background: var(--navy);
}
.brand img {
  width: 104px;
  height: auto;
}
.site-header nav {
  display: flex;
  gap: 26px;
  margin-left: auto;
}
.site-header nav a {
  position: relative;
  font-weight: 600;
  padding-block: 8px;
}
.site-header nav a[aria-current]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: var(--gold);
}
.site-header a:hover {
  color: var(--gold);
}
.languages {
  display: flex;
  gap: 8px;
  font-size: 15px;
}
.languages [aria-current] {
  color: var(--gold);
  font-weight: 700;
}
.menu-toggle {
  display: none;
}
/* Buttons and links */
.button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 12px 20px;
  border: 2px solid var(--gold);
  border-radius: 6px;
  font-weight: 700;
  color: var(--navy);
  background: var(--gold);
}
.button:hover {
  color: var(--navy);
  background: #e9bb5e;
}
.button.secondary {
  color: inherit;
  background: transparent;
}
.button.secondary:hover {
  color: var(--navy);
  background: var(--gold);
}
.button svg {
  width: 18px;
}
.platform-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}
.platform-patreon {
  background: currentColor;
  -webkit-mask: url("./assets/site/patreon.webp") center/contain no-repeat;
  mask: url("./assets/site/patreon.webp") center/contain no-repeat;
}
.platform-afdian {
  border-radius: 50%;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}
.inline-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: var(--sea);
  border-bottom: 2px solid currentColor;
}
.inline-link svg {
  width: 18px;
}
.back svg,
.previous svg {
  transform: rotate(180deg);
}
.tag {
  display: inline-block;
  padding: 1px 10px;
  border-radius: 999px;
  font: 600 13px/1.7 var(--sans);
  color: #fff;
  background: var(--wood);
}
.definition {
  font-size: 18px;
}
.section-title {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 12px 24px;
}
.section-lead {
  margin-top: 12px;
  max-width: 760px;
}
section > .container,
.page-heading {
  padding-block: clamp(48px, 7vw, 96px);
}
/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  min-height: min(860px, 92vh);
  height: 780px;
  color: #fff;
  background: var(--navy);
  --mx: 0;
  --my: 0;
}
.hero-bg {
  position: absolute;
  inset: -2%;
  width: 104%;
  max-width: none;
  height: 104%;
  object-fit: cover;
  translate: calc(var(--mx) * -10px) calc(var(--my) * -6px);
  transition: translate 0.2s ease-out;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(90deg, #0b1721e6 0%, #0b1721b3 34%, #0b172100 62%),
    linear-gradient(0deg, #0b1721aa 0%, #0b172100 28%);
}
.hero-cast {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  translate: calc(var(--mx) * 16px) calc(var(--my) * 8px);
  transition: translate 0.2s ease-out;
  animation: cast-in 1s ease-out both;
}
@keyframes cast-in {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
}
.portrait {
  position: relative;
  width: 100%;
  isolation: isolate;
  transform-origin: center top;
}
.portrait > img {
  display: block;
  width: 100%;
  height: auto;
}
.portrait > img + img {
  position: absolute;
}
/* Reveal a complete Diced group together; no-JS still gets the static layers. */
.js .portrait:not([data-ready]) {
  visibility: hidden;
}
.hero-cast .portrait {
  position: absolute;
}
.hero-cast .hero-boar {
  left: 31%;
  top: -40px;
  width: 40%;
  z-index: 1;
}
.hero-cast .hero-bear {
  left: 62%;
  top: 10px;
  width: 42%;
  z-index: 1;
  transform: scaleX(-1);
}
.hero-cast .hero-captain {
  left: 45%;
  top: 120px;
  width: 46%;
  z-index: 2;
}
.hero-copy {
  position: relative;
  z-index: 3;
  width: min(44%, 640px);
  padding: 64px 0 56px var(--gutter);
}
.eyebrow {
  display: inline-block;
  margin-bottom: 18px;
  padding: 2px 12px;
  border: 1px solid #f6eedd80;
  border-radius: 999px;
  font-size: 14px;
  letter-spacing: 0.04em;
}
.hero h1 {
  font-size: clamp(30px, 3.4vw, 52px);
  text-shadow: 0 2px 16px #0008;
}
.hero .definition {
  margin-top: 18px;
  font-size: 16px;
  color: #f6eeddee;
}
/* Home sections */
.numbers {
  background: var(--paper);
}
.facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}
.facts li {
  padding: 18px;
  border-top: 4px solid var(--gold);
  font: 700 clamp(20px, 2.2vw, 28px)/1.3 var(--serif);
  background: var(--paper-2);
}
.footnote {
  margin-top: 12px;
  font-size: 13px;
  color: var(--muted);
}
.cg-wall-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 24px;
  align-items: center;
  margin-top: 40px;
}
.cg-wall {
  position: relative;
  padding: 28px 20px 20px;
  border-radius: 14px;
  color: #fff;
  background: #1c6f9c url("./assets/site/gallery.webp") center/cover;
}
.cg-wall-tab {
  position: absolute;
  left: 24px;
  top: -34px;
  width: 80px;
  height: 72px;
  background: url("./assets/site/gallery-tab.webp") top/contain no-repeat;
}
.cg-wall h3 {
  margin: 0 0 14px 96px;
  font-size: clamp(20px, 2.4vw, 28px);
}
.cg-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}
.cg-tile {
  position: relative;
  display: block;
  aspect-ratio: 16/9;
  overflow: hidden;
  border: 3px solid #e3e3e3;
  border-radius: 8px;
  background: #3c4143;
}
.cg-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cg-tile.locked img {
  filter: blur(3px);
  transform: scale(1.08);
}
.cg-tile .cg-lock {
  position: absolute;
  inset: 0;
  background: url("./assets/site/cg-locked.webp") center/cover;
  opacity: 0.82;
}
.cg-more {
  display: grid;
  place-items: center;
  text-align: center;
  font: 700 clamp(14px, 1.6vw, 20px) var(--sans);
  color: #fff;
  background: #0b172188;
}
.cg-coin {
  text-align: center;
}
.cg-coin img {
  width: 64px;
  margin: 0 auto 8px;
}
.cg-coin {
  display: block;
  padding: 16px;
  border: 2px solid var(--gold);
  border-radius: 12px;
  font: 700 20px/1.4 var(--serif);
  background: #fffaf0;
}
.cg-preview {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  border-radius: 6px;
  background: var(--navy);
}
.cg-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cg-preview.locked img {
  filter: blur(3px);
  opacity: 0.35;
  transform: scale(1.08);
}
.cg-lock {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
}
.ranking {
  color: #f6eedd;
  background: var(--navy-2) url("./assets/site/journal.webp") center/cover;
}
.ranking-board > p {
  margin-top: 8px;
}
.ranking ol {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px 24px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: rank;
}
.ranking li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 8px;
  background: #0b172166;
  counter-increment: rank;
}
.ranking li::before {
  content: counter(rank);
  width: 28px;
  font: 700 20px var(--serif);
  color: var(--gold);
}
.ranking li a {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}
.rank-art {
  width: 48px;
  height: 48px;
  overflow: hidden;
  border-radius: 50%;
  background: #f6eedd22;
}
.rank-art .portrait {
  width: calc(var(--z) * 100%);
  margin: calc(var(--mt) * 100%) 0 0 calc(var(--ml) * 100%);
}
.rank-count {
  font-size: 14px;
  white-space: nowrap;
}
.crew {
  background: var(--sky);
}
.cast-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 20px;
  margin-top: 32px;
}
.cast-card {
  display: block;
  text-align: center;
}
.cast-art {
  height: 220px;
  overflow: hidden;
  border-radius: 10px 10px 0 0;
  background: linear-gradient(#fff0, #ffffffa8);
}
.cast-art .portrait {
  width: 150%;
  margin-left: -25%;
  transition: transform 0.25s;
}
.cast-card:hover .cast-art .portrait {
  transform: scale(1.03);
}
.stamp-pick {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  cursor: pointer;
}
.stamp-mark {
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 64px;
  pointer-events: none;
}
.stamp-mark img {
  display: block;
  width: 100%;
}
.stamp-mark.stamped img {
  animation: stamp-slap 0.45s cubic-bezier(0.2, 1.6, 0.4, 1);
}
.stamp-hint {
  position: absolute;
  top: 8px;
  left: 50%;
  translate: -50%;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 13px;
  white-space: nowrap;
  color: white;
  background: var(--wood);
}
.cast-card h3 {
  margin-top: 10px;
  font-size: 18px;
}
.cast-card .tag {
  margin-top: 6px;
}
.cast-card p {
  margin-top: 4px;
  font-size: 14px;
  color: var(--muted);
}
.world-section {
  background: var(--paper);
}
.world-split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 48px;
  align-items: center;
}
.world-split p {
  margin-block: 16px;
}
.ports {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
}
.ports a {
  display: inline-block;
  padding: 4px 12px;
  border: 1px solid var(--wood);
  border-radius: 999px;
  font-size: 15px;
}
.map-link {
  display: block;
  position: relative;
  max-width: 1200px;
  margin-inline: auto;
  cursor: zoom-in;
}
.map-art {
  display: block;
  position: relative;
  width: 100%;
}
.map-art > .world-map {
  width: 100%;
  border-radius: 8px;
}
.map-art > .map-location,
.map-art > .map-ship {
  position: absolute;
  height: auto;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.map-art > .map-ship {
  left: 47%;
  top: 58%;
  width: 7%;
}
.js .map-art > .map-location {
  pointer-events: auto;
  cursor: pointer;
}
.map-art > .map-location.arrived {
  animation: port-pop 0.5s ease-out;
}
@keyframes port-pop {
  40% {
    transform: translate(-50%, -50%) scale(1.3);
  }
}
.sail {
  position: absolute;
  z-index: 1;
  width: 9%;
  aspect-ratio: 256 / 210;
  translate: -50% -60%;
  pointer-events: none;
}
.sail > img {
  position: absolute;
  inset: 0;
  width: 100%;
}
.sail.westward > img {
  scale: -1 1;
}
.sail.sailing > .sail-ship {
  animation: sail-bob 0.9s ease-in-out infinite alternate;
}
.sail.sailing > .sail-back {
  animation: sail-wave 1.4s ease-in-out infinite alternate;
}
.sail.sailing > .sail-front {
  animation: sail-wave 0.9s ease-in-out infinite alternate-reverse;
}
@keyframes sail-bob {
  to {
    transform: translateY(-5%) rotate(-2deg);
  }
}
@keyframes sail-wave {
  from {
    transform: translateX(-6%);
  }
  to {
    transform: translateX(6%);
  }
}
.map-label {
  position: absolute;
  z-index: 2;
  translate: -50% -180%;
  padding: 2px 8px;
  border: 1px solid var(--wood);
  border-radius: 4px;
  color: var(--ink);
  background: #f6eedd;
  font-size: clamp(11px, 1.4vw, 15px);
  font-weight: 700;
  white-space: nowrap;
  pointer-events: none;
}
.map-hint {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 10px;
  font-size: 15px;
  font-weight: 600;
}
.map-dialog {
  width: min(1500px, calc(100vw - 32px));
  max-width: none;
  max-height: calc(100dvh - 32px);
  padding: 0;
  border: 0;
  border-radius: 8px;
  color: var(--ink);
  background: white;
}
.map-dialog::backdrop {
  background: #071f30cc;
}
.map-dialog-content {
  display: flex;
  flex-direction: column;
  max-height: calc(100dvh - 32px);
}
.map-toolbar {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 12px;
  border-bottom: 1px solid #14293a20;
}
.map-toolbar button {
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid var(--navy);
  border-radius: 5px;
  color: var(--navy);
  background: white;
}
.map-viewport {
  overflow: auto;
  min-height: 0;
  overscroll-behavior: contain;
}
.map-viewport.original-size .map-art {
  width: 1400px;
  max-width: none;
}
body:has(.map-dialog[open]) {
  overflow: hidden;
}
.crew-line {
  color: #f6eedd;
  background: var(--navy);
}
.crew-line h2 {
  font-size: 18px;
  font-family: var(--sans);
  color: var(--gold);
}
.crew-line blockquote p {
  margin-top: 16px;
  font: 700 clamp(24px, 3vw, 38px)/1.4 var(--serif);
}
.crew-line figcaption {
  margin-top: 8px;
}
.crew-line figcaption::before {
  content: "— ";
}
.line-more {
  margin-top: 20px;
  min-height: 44px;
  padding: 8px 18px;
  border: 1px solid var(--gold);
  border-radius: 6px;
  color: var(--gold);
  background: transparent;
}
.invitation {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: var(--navy);
}
.invitation-scene {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.55;
}
.invitation-inner {
  position: relative;
  text-align: center;
}
.invitation-inner p {
  max-width: 640px;
  margin: 16px auto 0;
}
.invitation .actions,
.text-links {
  justify-content: center;
}
.text-links {
  display: flex;
  gap: 20px;
  margin-top: 20px;
  font-weight: 600;
}
.text-links a {
  border-bottom: 1px solid currentColor;
}
/* Shared page heading */
.page-heading {
  padding-bottom: 32px;
}
.page-heading .definition {
  margin-top: 20px;
  max-width: 900px;
}
.page-heading .definition + p {
  margin-top: 12px;
}
.catalogue > .container {
  padding-top: 0;
}
.main-cast {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 28px;
}
.main-cast .cast-art {
  height: 300px;
}
.supporting-heading {
  margin-top: 64px;
}
.supporting {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
/* Character profile */
.profile-grid {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: 48px;
  align-items: start;
}
.profile h1 {
  margin-top: 20px;
}
.roman-name {
  display: block;
  margin-top: 4px;
  font: 600 16px var(--sans);
  letter-spacing: 0.08em;
  color: var(--muted);
}
.profile .definition {
  margin-top: 16px;
  font-size: 16px;
  color: var(--muted);
}
.profile-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  margin-top: 16px;
}
.profile-facts div {
  display: flex;
  align-items: center;
  gap: 8px;
}
.profile-facts dt {
  font-size: 14px;
  color: var(--muted);
}
.profile-facts dd {
  font-weight: 700;
}
.bio {
  margin-top: 20px;
  font-size: 18px;
}
.profile-art {
  position: sticky;
  top: 16px;
}
.poke-stage {
  position: relative;
  overflow: hidden;
  padding-top: 0;
  border-radius: 12px;
  background:
    radial-gradient(circle at 50% 40%, #ffffffd0, #fff0 60%), var(--sky);
}
.poke-stage .portrait {
  width: 100%;
}
.pokeable {
  cursor: pointer;
}
.poke-stage {
  display: flex;
  flex-direction: column;
}
.speech {
  order: -1;
  position: relative;
  z-index: 2;
  margin: 12px 12px 0;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 16px;
  line-height: 1.5;
  background: #fffdf6f0;
  box-shadow: 0 4px 12px #0002;
}
.speech.pop {
  animation: pop 0.3s ease-out;
}
@keyframes pop {
  from {
    transform: scale(0.94);
    opacity: 0.4;
  }
}
.poke-hint {
  margin-top: 8px;
  font-size: 14px;
  text-align: center;
  color: var(--muted);
}
.variant-switch {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}
.variant-switch button {
  min-height: 40px;
  padding: 6px 14px;
  border: 1px solid var(--wood);
  border-radius: 999px;
  color: var(--wood);
  background: transparent;
}
.variant-switch [aria-pressed="true"] {
  color: #fff;
  background: var(--wood);
}
.coin {
  margin-top: 32px;
  padding: 24px;
  border: 2px solid var(--gold);
  border-radius: 12px;
  background: #fffaf0;
}
.coin h2 {
  font-size: 24px;
}
.coin > p:first-of-type {
  margin-top: 6px;
}
.coin-button {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-block: 16px 8px;
  min-height: 56px;
  padding: 6px 20px 6px 6px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: var(--coin);
  box-shadow: 0 3px 0 #1b6aa0;
}
.coin-button:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #1b6aa0;
}
.coin-button img {
  width: 44px;
  height: 44px;
}
.coin-crew,
.coin-mine {
  font-weight: 700;
}
.coin-status:empty {
  display: none;
}
.coin-status {
  color: var(--wood);
}
.coin-note {
  margin-top: 8px;
  font-size: 13px;
  color: var(--muted);
}
.battle-clip {
  position: absolute;
  top: 12px;
  left: 50%;
  z-index: 3;
  width: min(72%, 360px);
  translate: -50% 0;
  border-radius: 10px;
  overflow: hidden;
  background: var(--navy);
  box-shadow: 0 8px 24px #0006;
  animation: fade-in 0.3s ease-out;
  transition: opacity 0.4s;
}
.map-art > .battle-clip {
  top: 50%;
  width: auto;
  height: min(92%, 420px);
  translate: -50% -50%;
}
.map-art > .battle-clip video {
  width: auto;
  height: 100%;
}
.battle-clip.out {
  opacity: 0;
}
.battle-clip video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 960 / 830;
}
.battle-close {
  position: absolute;
  top: 6px;
  right: 6px;
  padding: 2px 8px;
  border: 0;
  border-radius: 999px;
  background: #000a;
  color: #fff;
  font-size: 12px;
  cursor: pointer;
}
.coin-canvas {
  position: fixed;
  inset: 0;
  z-index: 30;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.glimpse {
  margin-top: 40px;
}
.glimpse h2 {
  font-size: 24px;
}
.preview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  max-width: 570px;
  margin-top: 14px;
}
.caption {
  margin-top: 10px;
  font-size: 13px;
  color: var(--muted);
}
.ongoing {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--gold);
}
/* Character-page ticket to the theater (src/theater.mjs). */
.ticket {
  position: relative;
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  grid-template-rows: 1fr auto;
  gap: 8px 14px;
  align-items: center;
  max-height: 160px;
  margin-top: 16px;
  padding: 14px;
  overflow: hidden;
  border-radius: 12px;
  color: #fff;
  background: #0b1721;
}
.ticket > * {
  position: relative;
}
.ticket > .ticket-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.35);
}
.ticket-face {
  grid-row: 1 / 3;
  width: 92px;
  height: 92px;
  overflow: hidden;
  border: 2px solid var(--gold);
  border-radius: 50%;
  background: #0006;
}
.ticket-face .portrait {
  width: calc(var(--z) * 100%);
  margin: calc(var(--mt) * 100%) 0 0 calc(var(--ml) * 100%);
}
.ticket-line {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  font: 500 15px/1.5 var(--serif);
  text-shadow: 0 1px 2px #000c;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.ticket-go {
  justify-self: start;
  min-height: 0;
  padding: 6px 14px;
  font-size: 15px;
}
/* Theater page: no scrolling; a one-line bar, then the whole stage (frame,
   screen, board) at the largest size that fits, centred on a dimmed deck. */
html:has(body.bar-page) {
  overflow: hidden;
  overscroll-behavior: none;
}
body.bar-page {
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  background: #07090c;
}
.bar-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: 100%;
  height: 100%;
  touch-action: manipulation;
}
/* Phones and tablets held upright: the whole page turns sideways for
   landscape-primary (device top on the left, the player turns the phone
   anticlockwise; the bar ends up on the device's right) so the 16:9 stage
   fills the long side. */
@media (orientation: portrait) and (pointer: coarse) and (hover: none) {
  .bar-shell {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vh;
    width: 100svh;
    height: 100vw;
    transform-origin: top left;
    transform: rotate(90deg) translateY(-100%);
  }
}
.bar-page main {
  grid-row: 2;
  position: relative;
  min-height: 0;
}
.bar-page main > .definition {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.theater-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 40px;
  padding: 4px 14px;
  font-size: 13px;
  color: #f6eedd;
  background: #0b1721;
}
.theater-bar .brand img {
  width: 60px;
}
.theater-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--gold);
  font-weight: 700;
  text-decoration: none;
}
.theater-back svg {
  width: 16px;
  rotate: 180deg;
}
.theater-adult {
  flex: 1;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
  opacity: 0.75;
}
.playhouse {
  position: relative;
  display: grid;
  place-items: center;
  height: 100%;
  overflow: hidden;
  container-type: size;
}
.playhouse-deck {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.25) saturate(0.6);
}
.playhouse::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(#0000 40%, #000b);
  pointer-events: none;
}
.proscenium {
  --ar: 16 / 9;
  --fw: clamp(8px, 2.2cqmin, 26px);
  --ft: clamp(22px, 6cqh, 60px);
  --fb: clamp(44px, 8.5cqh, 64px);
  --gap: clamp(4px, 2cqmin, 28px);
  --sw: min(
    100cqw - 2 * var(--gap) - 2 * var(--fw),
    (100cqh - 2 * var(--gap) - var(--ft) - var(--fb)) * var(--ar)
  );
  --wood: #8a5a32;
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: var(--fw) var(--sw) var(--fw);
  grid-template-rows: var(--ft) calc(var(--sw) / (var(--ar))) var(--fb);
  filter: drop-shadow(0 10px 30px #000c);
}
/* Wood: a plank colour, two layers of slanted grain, nails at the ends. */
.beam,
.board {
  grid-column: 1 / 4;
  background:
    radial-gradient(
      circle at 14px 50%,
      #e0c08a 0 2px,
      #2e1b0c 2.5px 4px,
      #0000 4.5px
    ),
    radial-gradient(
      circle at calc(100% - 14px) 50%,
      #e0c08a 0 2px,
      #2e1b0c 2.5px 4px,
      #0000 4.5px
    ),
    repeating-linear-gradient(
      176deg,
      #0000 0 5px,
      #00000016 5px 6px,
      #0000 6px 13px
    ),
    repeating-linear-gradient(183deg, #ffffff0b 0 1px, #0000 1px 21px),
    linear-gradient(#9a6838, #7a4c26 45%, #55331a);
}
.beam {
  grid-row: 1;
  border-radius: 6px 6px 0 0;
  box-shadow:
    inset 0 2px 0 #c08a52,
    inset 0 -3px 0 #2e1b0c;
}
.pillar {
  grid-row: 2;
  background:
    repeating-linear-gradient(
      88deg,
      #0000 0 4px,
      #00000018 4px 5px,
      #0000 5px 11px
    ),
    linear-gradient(90deg, #55331a, #8a5a32 50%, #55331a);
}
.pillar-left {
  grid-column: 1;
}
.pillar-right {
  grid-column: 3;
}
.board {
  grid-row: 3;
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: clamp(2px, 1cqw, 18px);
  padding: 0 28px;
  border-radius: 0 0 6px 6px;
  box-shadow:
    inset 0 3px 0 #2e1b0c,
    inset 0 -2px 0 #3a2210;
}
.board > * {
  display: inline-flex;
  align-items: center;
  min-width: 44px;
  padding: 0 clamp(4px, 0.8cqw, 12px);
  border: 0;
  color: #f3e3c3;
  font: 700 clamp(12px, 1.5cqw, 16px) / 1 var(--sans);
  letter-spacing: 0.04em;
  text-decoration: none;
  text-shadow:
    0 1px 0 #2e1b0c,
    0 -1px 0 #c08a5255;
  background: none;
  cursor: pointer;
  white-space: nowrap;
}
.board > [aria-disabled="true"] {
  opacity: 0.4;
  cursor: default;
}
.board > [aria-pressed="true"] {
  color: var(--gold);
  box-shadow: inset 0 -3px 0 var(--gold);
}
.board > :focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: -4px;
}
.knot {
  position: absolute;
  z-index: 3;
  width: clamp(22px, calc(var(--fw) * 2.4), 56px);
  pointer-events: none;
}
.knot .rope {
  fill: none;
  stroke: #c9a66b;
  stroke-width: 4;
  stroke-linecap: round;
}
.knot .rope-knot {
  fill: #b08850;
  stroke: #6d4c26;
  stroke-width: 2;
}
.knot-tl,
.knot-tr {
  top: calc(var(--ft) * 0.4);
}
.knot-bl,
.knot-br {
  bottom: calc(var(--fb) * 0.5);
}
.knot-tl,
.knot-bl {
  left: calc(var(--fw) * -0.4);
}
.knot-tr,
.knot-br {
  right: calc(var(--fw) * -0.4);
  scale: -1 1;
}
/* The name board hangs from the beam on two ropes. */
.nameplate {
  position: absolute;
  z-index: 4;
  top: calc(var(--ft) * 0.55);
  left: 50%;
  translate: -50% 0;
  padding: 0.3em 1.1em;
  border-radius: 4px;
  font-size: clamp(14px, 2.8cqmin, 28px);
  background:
    repeating-linear-gradient(
      178deg,
      #0000 0 4px,
      #6b42231a 4px 5px,
      #0000 5px 10px
    ),
    linear-gradient(#e8cc96, #cfa86c);
  box-shadow:
    0 4px 10px #0009,
    inset 0 0 0 2px #7a4c26;
  transform-origin: 50% -60%;
}
/* Its ropes run up behind the beam. */
.hanger {
  position: absolute;
  z-index: -1;
  bottom: calc(100% - 4px);
  left: 50%;
  width: 140px;
  height: auto;
  translate: -50% 0;
  pointer-events: none;
}
.nameplate h1 {
  margin: 0;
  color: #2a1708;
  font: 700 1em/1.2 var(--serif);
  white-space: nowrap;
}
.nameplate.is-up {
  animation: plate-up 0.7s cubic-bezier(0.3, 1.6, 0.5, 1);
}
@keyframes plate-up {
  from {
    transform: translateY(-40%) rotate(-4deg);
  }
  60% {
    transform: rotate(2deg);
  }
}
/* The screen: backgrounds and portraits at their script x, the dialogue box
   on the bottom; type sizes follow the screen width. */
.theater-stage {
  grid-row: 2;
  grid-column: 2;
  position: relative;
  overflow: clip;
  background: #000;
  cursor: pointer;
  container-type: inline-size;
  -webkit-tap-highlight-color: transparent;
}
html:not(.js) .theater-stage {
  cursor: auto;
}
.theater-stage:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: -3px;
}
.theater-view {
  position: absolute;
  inset: 0;
  transition:
    opacity 0.9s,
    filter 0.6s;
}
html.js:not(.vt-in) .theater-stage:not(.is-lit) :is(.theater-view, .dlg) {
  opacity: 0;
}
.theater-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.5s;
}
.theater-bg.on {
  opacity: 1;
}
.theater-actor {
  position: absolute;
  top: 2%;
  left: calc(var(--x) * 1%);
  width: 48%;
  translate: -50% 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s;
}
.theater-actor.on {
  opacity: 1;
}
.theater-stage .dlg {
  position: absolute;
  right: 4%;
  bottom: 3%;
  left: 4%;
  padding: 3.2cqw 2.2cqw 1.6cqw;
  transition: opacity 0.4s;
}
/* Name tag as in the game: a translucent dark rounded label, no icon, so it
   sits quietly on light backgrounds too. */
.theater-stage .dlg-name {
  top: -1.6cqw;
  min-height: 0;
  padding: 0.25em 0.9em;
  font-size: clamp(12px, 1.6cqw, 20px);
  border-radius: 6px;
  background: #10141aa6;
  box-shadow: 0 1px 3px #0006;
  clip-path: none;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.theater-stage .dlg-icon {
  display: none;
}
.theater-stage .dlg-text {
  font-size: clamp(13px, 1.9cqw, 22px);
}
.theater-stage.ui-hidden .dlg,
.theater-stage.is-over .dlg {
  opacity: 0;
  visibility: hidden;
}
.theater-stage.is-over .theater-view {
  filter: brightness(0.45);
}
/* The finale covers the screen (a sibling of it, so its links are not
   nested in the clickable stage). */
.theater-finale {
  position: relative;
  z-index: 2;
  grid-row: 2;
  grid-column: 2;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 14px;
  opacity: 0;
  visibility: hidden;
  cursor: auto;
  transition: opacity 0.6s;
}
.theater-stage.is-over ~ .theater-finale,
html:not(.js) .theater-finale {
  opacity: 1;
  visibility: visible;
}
.theater-cta {
  font-size: clamp(16px, 2.4cqw, 26px);
}
.theater-finale-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}
.theater-finale .secondary {
  color: #f6eedd;
  border-color: #f6eedd88;
  background: #0008;
}
/* Without JS: the opening and its first line, the call to play on top. */
html:not(.js) .theater-finale {
  place-content: start center;
  padding-top: 14%;
}
html:not(.js) [data-theater-replay] {
  display: none;
}
/* Upright window with a mouse: 3:4 screen, one figure. */
@media (orientation: portrait) and (pointer: fine),
  (orientation: portrait) and (hover: hover) {
  .proscenium {
    --ar: 3 / 4;
  }
  .board > [data-landscape-only] {
    display: none;
  }
  .board > * {
    font-size: clamp(13px, 3.6cqw, 16px);
  }
  .theater-actor,
  .theater-actor.on {
    top: var(--mt);
    left: var(--ml);
    width: var(--mw);
    translate: none;
    opacity: 0;
  }
  .theater-actor.solo {
    opacity: 1;
  }
  .theater-stage .dlg {
    right: 0;
    bottom: 0;
    left: 0;
    padding: 9cqw 4.5cqw 4cqw;
  }
  .theater-stage .dlg-name {
    top: -4cqw;
    font-size: clamp(14px, 4.4cqw, 19px);
  }
  .theater-stage .dlg-text {
    font-size: clamp(14px, 4.4cqw, 20px);
  }
  .theater-cta {
    font-size: clamp(16px, 5cqw, 22px);
  }
  .theater-adult {
    font-size: 11px;
  }
}
/* Phone held sideways: a thin bar (18+ notice and languages; the board's
   TITLE goes back) and a thin frame. */
@media (max-height: 500px) {
  .theater-bar {
    gap: 12px;
    min-height: 28px;
    padding: 2px 12px;
    font-size: 12px;
  }
  .theater-bar :is(.brand, .theater-back) {
    display: none;
  }
  .proscenium {
    --fw: clamp(4px, 1.2cqmin, 10px);
    --ft: clamp(14px, 5cqh, 24px);
    --fb: 42px;
    --gap: 4px;
  }
  .nameplate {
    font-size: 13px;
    top: 2px;
  }
  .hanger {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .theater-bg,
  .theater-actor,
  .theater-view,
  .theater-finale {
    transition: none;
  }
  .nameplate.is-up {
    animation: none;
  }
}
.character-navigation {
  display: flex;
  align-items: center;
  gap: 24px;
  padding-block: 24px;
}
.character-navigation > .inline-link {
  white-space: nowrap;
  border: 0;
}
/* Deck line-up: shoulder to shoulder, the front one lit; only transform/opacity animate. */
.lineup {
  display: flex;
  flex: 1;
  min-width: 0;
  justify-content: center;
  container-type: inline-size;
  padding: 28px 0 30px;
}
.mate {
  --s: var(--slot, calc(100cqi / 12.5));
  --fig: calc(var(--s) * 2.1);
  position: relative;
  flex: none;
  width: var(--s);
  height: calc(var(--fig) * 1.35);
  z-index: calc(20 - var(--d));
  border: 0;
  outline: 0;
}
.mate-fig {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: var(--fig);
  margin-left: calc(var(--fig) / -2);
  pointer-events: none;
  transform-origin: 50% 100%;
  transform: translateY(-3%) scale(0.9);
  transition: transform 0.25s;
}
.mate-fig > img {
  display: block;
  width: 100%;
  height: auto;
  filter: brightness(0.6) saturate(0.5);
}
.mate-fig > .mate-lit {
  position: absolute;
  inset: 0;
  filter: none;
  opacity: 0;
  transition: opacity 0.25s;
}
.mate-name {
  position: absolute;
  left: 50%;
  bottom: -26px;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--navy);
  color: var(--paper);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  transform: translateX(-50%);
  transition: opacity 0.2s;
}
.mate.front {
  z-index: 25;
}
.mate:focus-visible {
  z-index: 30;
}
.mate.front .mate-fig {
  transform: scale(1.06);
}
.mate:not(.front):focus-visible .mate-fig {
  transform: scale(1.02);
}
.mate.front .mate-lit,
.mate:focus-visible .mate-lit,
.mate.front .mate-name,
.mate:focus-visible .mate-name {
  opacity: 1;
}
/* Touch screens would keep :hover after a swipe, so hover is mouse-only. */
@media (hover: hover) {
  .mate:hover {
    z-index: 30;
  }
  .mate:not(.front):hover .mate-fig {
    transform: scale(1.02);
  }
  .mate:hover .mate-lit,
  .mate:hover .mate-name {
    opacity: 1;
  }
}
.mate:focus-visible .mate-name {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}
@media (prefers-reduced-motion: no-preference) {
  .js .lineup:not(.shown) .mate {
    opacity: 0;
  }
  .lineup.shown .mate {
    animation: mate-in 0.45s calc(var(--i) * 35ms) ease-out both;
  }
}
@keyframes mate-in {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
}
.privacy {
  margin-bottom: 24px;
  font-size: 12px;
  color: var(--muted);
}
/* World, play, FAQ */
.world-page > .container,
.play-page > .container,
.faq-page > .container {
  padding-top: 0;
}
.ports-block {
  margin-top: 48px;
}
.ports-block .ports {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px 28px;
  margin-top: 20px;
}
.ports-block li {
  padding-left: 14px;
  border-left: 3px solid var(--gold);
}
.ports-block h3 {
  font-size: 19px;
}
.ports-block p {
  font-size: 16px;
}
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 48px;
  align-items: center;
}
.scene,
.scene-pair img,
.play-scene {
  width: 100%;
  border-radius: 10px;
  aspect-ratio: 16/9;
  object-fit: cover;
}
.scene-pair {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-top: 40px;
}
.adult-note {
  display: inline-block;
  margin-bottom: 24px;
  padding: 4px 14px;
  border-radius: 6px;
  font-weight: 700;
  color: #fff;
  background: #8e2b2b;
}
.play-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 40px;
  align-items: start;
}
.link-list {
  display: grid;
  gap: 12px;
}
.destination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border-radius: 10px;
  background: #fffaf0;
  border: 1px solid #8a5a3240;
}
.destination h2 {
  font-size: 22px;
}
.destination p {
  font-size: 15px;
  color: var(--muted);
}
.fact-table {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}
.fact-table > div {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid #8a5a3230;
}
.fact-table dt {
  font-weight: 700;
}
.not-found {
  padding: 120px var(--gutter);
  text-align: center;
}
.not-found p {
  margin-block: 16px 24px;
}
footer {
  color: #f6eeddcc;
  background: #0b1721;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 28px;
  padding-block: 28px;
  font-size: 14px;
}
.studio {
  font-weight: 800;
  letter-spacing: 0.1em;
  color: #fff;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}
.footer-links a {
  border-bottom: 1px solid #f6eedd55;
}
.screens {
  margin-top: 48px;
}
.screen-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 16px;
}
.screen-grid img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  aspect-ratio: 16/9;
  object-fit: cover;
}
/* FAQ how-to-play: one 16:9 game screen. Each view is laid out at 1280x720
   and scaled to the frame width (tan(atan2()) turns 100cqw / 1280px into a
   number), so phones get the whole view smaller, never cropped or scrolled.
   The view buttons sit on the frame's top-right corner, and above the frame
   when it is narrower than 600px. Without JS every view stacks. */
.howto {
  position: relative;
  container-type: inline-size;
  max-width: 1240px;
  margin-inline: auto;
}
.howto-view {
  display: grid;
  gap: 28px;
}
.howto-screen {
  min-width: 0;
  margin: 0;
  transition:
    opacity 0.4s,
    visibility 0.4s;
}
.js .howto-screen {
  grid-area: 1 / 1;
}
.js .howto-screen:not(.on) {
  visibility: hidden;
  opacity: 0;
}
.howto-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: clip;
  border-radius: 12px;
  background: #0b1721;
  box-shadow: 0 6px 24px #071f3040;
}
.howto-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.7);
}
.howto-stage {
  position: absolute;
  top: 0;
  left: 0;
  width: 1280px;
  height: 720px;
  transform-origin: 0 0;
  scale: tan(atan2(100cqw, 1280px));
  color: #fff;
  font-size: 16px;
  line-height: 1.4;
}
.howto-stage > .shop-ui {
  position: absolute;
  top: 36px;
  left: 36px;
  width: 640px;
}
.howto-stage > .intel {
  position: absolute;
  top: 28px;
  left: 36px;
  width: 896px;
}
.howto-stage > .map-link {
  position: absolute;
  top: 50%;
  left: 36px;
  width: 896px;
  translate: 0 -50%;
  color: #fff;
}
.howto-stage .map-label {
  font-size: 16px;
}
.howto-screen figcaption {
  margin-top: 8px;
  font-size: 14px;
  color: var(--muted);
}
.howto-tip {
  position: absolute;
  right: 32px;
  bottom: 24px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  max-width: 290px;
  margin: 0;
}
.howto-tip span {
  padding: 10px 16px;
  border-radius: 18px 18px 4px 18px;
  color: var(--ink);
  background: #f6eedd;
  box-shadow: 0 3px 10px #00000060;
  font-size: 24px;
  font-weight: 800;
  line-height: 1.3;
}
.howto-tip img {
  width: 120px;
  height: 120px;
}
.howto-tabs {
  display: none;
}
.js .howto-tabs {
  position: absolute;
  z-index: 2;
  top: 2.2cqw;
  right: 2.5cqw;
  display: flex;
  gap: 1cqw;
}
.howto-tabs button {
  display: grid;
  justify-items: center;
  width: 7.2cqw;
  padding: 0.4cqw 0 0.5cqw;
  border: 2px solid #ffffff40;
  border-radius: 1.2cqw;
  color: #fff;
  background: #0b1721b3;
  font: 700 max(11px, 1.25cqw) / 1.2 var(--sans);
  cursor: pointer;
}
.howto-tabs img {
  width: 4.8cqw;
  height: 4.8cqw;
}
.howto-tabs button[aria-pressed="true"] {
  border-color: var(--gold);
  color: var(--gold);
  background: #0b1721e6;
  box-shadow: 0 0 0.8cqw #f2c14e99;
}
.howto-tabs button:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}
@container (max-width: 599px) {
  .js .howto-tabs {
    position: static;
    justify-content: flex-end;
    gap: 8px;
    margin-bottom: 8px;
  }
  .howto-tabs button {
    width: 64px;
    padding: 4px 0;
    border-radius: 10px;
    font-size: 12px;
  }
  .howto-tabs img {
    width: 36px;
    height: 36px;
  }
}
/* FAQ how-to-play mock-ups (sample data, game UI parts) */
.sample-badge {
  position: absolute;
  right: 10px;
  top: 10px;
  z-index: 2;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
  background: var(--gold);
}
.shop-ui {
  position: relative;
  padding: 14px;
  border-radius: 10px;
  color: #fff;
  font-size: 15px;
  line-height: 1.3;
  background:
    linear-gradient(#0b1721aa, #0b1721cc),
    url("./assets/site/journal.webp") center/cover;
  overflow: hidden;
}
.shop-ui img {
  display: inline-block;
  vertical-align: middle;
}
.shop-top {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-right: 64px;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 12px 3px 4px;
  border-radius: 999px;
  background: #000000c0;
}
.pill img {
  width: 26px;
  height: 26px;
}
.pill.rate b {
  font-weight: 500;
  color: #4aa8ff;
}
.shop-plus {
  display: inline-block;
  width: 16px;
  height: 16px;
  background: #5bc236;
  -webkit-mask: url("./assets/site/shop/plus.webp") center/contain no-repeat;
  mask: url("./assets/site/shop/plus.webp") center/contain no-repeat;
}
.pill .shop-plus {
  background: #fff;
}
.shop-panel {
  margin-top: 14px;
  padding: 0 0 10px;
  border-radius: 6px;
  background: #ffffff1a;
}
.shop-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 6px 6px 0 0;
  background: #000;
}
.shop-head span {
  font-size: 13px;
  color: #ddd;
}
.shop-row {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 8px;
  margin: 8px 10px 0;
}
.shop-item {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #1c1c1c;
}
.shop-item img {
  width: 40px;
  height: 40px;
}
.shop-line {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 3px 0 3px 8px;
  background: #000;
}
.shop-line b {
  flex: 1;
  font-weight: 500;
  white-space: nowrap;
}
.shop-line img {
  width: 20px;
  height: 20px;
}
.shop-tags {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}
.shop-demand {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}
.shop-demand i {
  width: 18px;
  height: 18px;
  background: currentColor;
  -webkit-mask: url("./assets/site/shop/arrow.webp") center/contain no-repeat;
  mask: url("./assets/site/shop/arrow.webp") center/contain no-repeat;
}
.shop-demand.down {
  color: #5bd16a;
}
.shop-demand.down i {
  rotate: 45deg;
}
.shop-demand.up {
  color: #ff5050;
}
.shop-demand.up i {
  rotate: -45deg;
}
.shop-stock {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px 6px;
  color: #000;
  background: #fff;
}
.shop-line.prices {
  justify-content: space-between;
  background: #00000080;
}
.shop-line.prices span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.shop-total {
  display: flex;
  gap: 16px;
  align-items: center;
  margin: 12px 10px 0;
  padding: 6px 8px;
  border-bottom: 2px solid #ffffff99;
}
.shop-total b {
  font-weight: 500;
  margin-right: auto;
}
.shop-total img {
  width: 20px;
  height: 20px;
}
.shop-foot {
  display: flex;
  justify-content: space-between;
  margin: 10px 10px 0;
}
.shop-sell {
  padding: 4px 10px;
  background: #000;
}
.shop-confirm {
  padding: 4px 10px;
  color: #5bd16a;
  background: #ffffff1a;
}
.shop-discount {
  margin: 8px 10px 0;
  font-size: 12px;
  text-align: right;
  color: #ccc;
}
/* Siren intel panel: rebuilt from the game's market journal. */
.intel {
  position: relative;
}
.intel > .sample-badge {
  left: 10px;
  right: auto;
}
.intel-frame {
  position: relative;
  min-width: 680px;
  padding-top: 52px;
  color: #fff;
}
.intel-tabs {
  position: absolute;
  top: 4px;
  left: 22%;
  display: flex;
}
.intel-tabs img {
  width: 100px;
  height: 58px;
  object-fit: cover;
  object-position: top;
  border-radius: 10px 10px 0 0;
}
.intel-close {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 36px;
  height: 36px;
}
.intel-panel {
  padding: 14px 12px 8px;
  border-radius: 18px;
  background-color: #1d1f52e6;
  background-size: cover;
  background-position: center;
}
.intel-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(6, 1fr);
  align-items: center;
  gap: 6px 4px;
  text-align: center;
}
.intel-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.intel-toggle img {
  width: 20px;
  height: 20px;
}
.intel-toggle span {
  position: relative;
  width: 30px;
  height: 14px;
  border-radius: 999px;
  background: #fff;
}
.intel-toggle span::after {
  content: "";
  position: absolute;
  right: 2px;
  top: 2px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #555;
}
.intel-port {
  display: grid;
  justify-items: center;
  gap: 2px;
  font-size: 13px;
  font-weight: 700;
  color: var(--c);
  cursor: pointer;
}
.intel-port input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.intel-port img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}
.intel-port:has(input:not(:checked)) {
  opacity: 0.35;
  filter: grayscale(1);
}
.intel-port:has(input:focus-visible) img {
  outline: 2px solid var(--gold);
  border-radius: 50%;
}
.intel-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  text-align: left;
}
.intel-item img {
  width: 34px;
  height: 34px;
}
.intel-item .intel-hint {
  width: 16px;
  height: 16px;
  margin-left: auto;
  opacity: 0.7;
}
.intel-cell {
  display: grid;
  justify-items: center;
  padding: 2px 0;
  border: 2px solid transparent;
  border-radius: 10px;
}
.intel-cell.here {
  border-color: #3d8fd1;
}
.intel-cell b {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 15px;
  font-weight: 500;
}
.intel-cell small {
  font-size: 11px;
  color: #ffffffb3;
}
.intel-cell i {
  width: 16px;
  height: 16px;
  background: currentColor;
  -webkit-mask: url("./assets/site/shop/arrow.webp") center/contain no-repeat;
  mask: url("./assets/site/shop/arrow.webp") center/contain no-repeat;
}
.intel-cell i.up {
  color: #5bd16a;
  rotate: -45deg;
}
.intel-cell i.down {
  color: #ff5050;
  rotate: 45deg;
}
.intel-chart {
  display: block;
  width: 100%;
  height: auto;
  margin-top: 10px;
  border-radius: 8px;
  background: #0e1d3ccc;
  font: 12px var(--sans);
  fill: #ffffffcc;
}
.intel-chart .grid {
  stroke: #ffffff26;
}
.intel-line {
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
}
.intel:has(input[data-port="GoatTown"]:not(:checked))
  .intel-line[data-port="GoatTown"],
.intel:has(input[data-port="Jusei"]:not(:checked))
  .intel-line[data-port="Jusei"],
.intel:has(input[data-port="Kanraku"]:not(:checked))
  .intel-line[data-port="Kanraku"],
.intel:has(input[data-port="Slusland"]:not(:checked))
  .intel-line[data-port="Slusland"],
.intel:has(input[data-port="SweateaLand"]:not(:checked))
  .intel-line[data-port="SweateaLand"],
.intel:has(input[data-port="WhiteDough"]:not(:checked))
  .intel-line[data-port="WhiteDough"] {
  display: none;
}
.cast-card .card-role {
  margin-top: 4px;
  font-size: 13px;
  color: var(--muted);
}
.cast-card .card-line {
  margin-top: 4px;
  font-size: 14px;
  line-height: 1.5;
}
.destination h2 {
  font-size: 22px;
}
.ports-block li {
  display: flex;
  gap: 12px;
  align-items: baseline;
}
.ports-block li b {
  font: 700 19px var(--serif);
}
.ports-block li a {
  border-bottom: 1px solid currentColor;
}
/* Journal: FAQ + facts at the bottom of every page, in the game's journal UI */
.journal {
  background: var(--paper-2);
}
.journal > .container {
  padding-block: 40px;
}
.journal-book {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: start;
  gap: 24px;
}
.journal-page {
  position: relative;
  padding: 36px 24px 24px;
  border-radius: 12px;
  font-size: 15px;
  line-height: 1.6;
  color: #f6eedd;
  background: var(--navy-2) url("./assets/site/journal.webp") center/cover;
}
.journal-page h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 20px;
}
.journal-tag {
  width: 40px;
  height: 36px;
  margin-top: -40px;
  background: url("./assets/site/journal-tag.webp") top/contain no-repeat;
}
.journal.compact .journal-book {
  grid-template-columns: minmax(0, 720px);
  justify-content: center;
}
.journal-page > .inline-link {
  margin-top: 12px;
  color: #9fd6ff;
}
.journal-faq {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}
.journal-faq dt {
  font-weight: 700;
  color: var(--gold);
}
.journal-faq .inline-link {
  color: #9fd6ff;
}
.journal .fact-table > div {
  border-bottom-color: #f6eedd30;
}
.faq-page > .container {
  padding-bottom: 0;
}
/* Tablet */
@media (max-width: 1150px) {
  .cast-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .main-cast {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .supporting {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .hero-copy {
    width: 54%;
  }
  .hero-cast .hero-boar {
    left: 44%;
    width: 38%;
  }
  .hero-cast .hero-captain {
    left: 52%;
    width: 46%;
  }
  .hero-cast .hero-bear {
    left: 70%;
  }
  .faq-list {
    grid-template-columns: 1fr;
  }
}
/* Phone */
@media (max-width: 760px) {
  body {
    font-size: 16px;
  }
  .site-header {
    flex-wrap: wrap;
    gap: 12px;
  }
  .menu-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
    min-height: 44px;
    padding: 6px 12px;
    border: 1px solid #f6eedd66;
    border-radius: 6px;
    color: inherit;
    background: transparent;
  }
  .menu-toggle span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }
  .js .site-header nav {
    display: none;
  }
  .site-header nav,
  .js .site-header nav.open {
    display: flex;
    flex-direction: column;
    order: 3;
    width: 100%;
    gap: 0;
    margin-left: 0;
  }
  .site-header nav a {
    padding: 10px 0;
    border-top: 1px solid #f6eedd22;
  }
  .languages {
    order: 2;
  }
  .hero {
    height: auto;
    min-height: 0;
  }
  .hero-bg,
  .hero-cast {
    height: 108vw;
    bottom: auto;
  }
  .hero-bg {
    inset: 0 0 auto;
    width: 100%;
  }
  .hero::after {
    background: linear-gradient(
      0deg,
      var(--navy) calc(100% - 108vw),
      #14293a00 calc(100% - 70vw)
    );
  }
  /* Phone: captain on the right, cropped at the chest; the bear behind. */
  .hero-cast .hero-boar {
    display: none;
  }
  .hero-cast .hero-bear {
    left: -12%;
    top: 36vw;
    width: 64%;
    transform: none;
  }
  .hero-cast .hero-captain {
    left: 30%;
    top: 4vw;
    width: 92%;
  }
  .hero-copy {
    width: 100%;
    padding: 92vw var(--gutter) 40px;
  }
  .hero h1 {
    font-size: 26px;
  }
  .cg-wall-wrap {
    grid-template-columns: minmax(0, 1fr);
  }
  .cg-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .cg-wall h3 {
    margin-left: 0;
    margin-top: 24px;
  }
  .facts,
  .cast-grid,
  .main-cast {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .supporting {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .cast-art,
  .main-cast .cast-art {
    height: 180px;
  }
  .world-split,
  .profile-grid,
  .split,
  .play-layout,
  .scene-pair {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }
  .profile-art {
    position: static;
    order: -1;
  }
  .poke-stage .portrait {
    width: 80%;
    margin-inline: auto;
  }
  .fact-table > div {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }
  .character-navigation {
    flex-wrap: wrap;
    justify-content: space-between;
  }
  /* Phones: current ±2 in view, the rest show a shoulder; swipe to change. */
  .lineup {
    --slot: calc((100vw - 2 * var(--gutter)) / 5.4);
    order: 3;
    flex-basis: calc(100% + 2 * var(--gutter));
    margin-inline: calc(-1 * var(--gutter));
    justify-content: flex-start;
    padding-inline: calc(50vw - var(--slot) / 2);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    overscroll-behavior-x: contain;
  }
  .lineup::-webkit-scrollbar {
    display: none;
  }
  .mate {
    scroll-snap-align: center;
  }
  .screen-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
.stamp-box {
  position: fixed;
  right: 12px;
  bottom: 12px;
  z-index: 25;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  max-width: calc(100vw - 24px);
}
.stamp-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 4px 10px 4px 4px;
  border: 1px solid var(--wood);
  border-radius: 999px;
  color: var(--ink);
  background: #f6eedd;
  box-shadow: 0 2px 8px #071f3040;
  font-weight: 700;
}
.stamp-toggle img {
  width: 36px;
  height: 36px;
}
.stamp-panel {
  width: 280px;
  max-width: 100%;
  padding: 12px;
  border: 1px solid var(--wood);
  border-radius: 8px;
  background: #f6eedd;
  box-shadow: 0 4px 16px #071f3040;
}
.stamp-panel h2 {
  font-size: 16px;
}
.stamp-panel ul {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 10px 0;
  padding: 0;
  list-style: none;
}
.stamp-panel li {
  aspect-ratio: 1;
  border: 2px dashed #8a5a3260;
  border-radius: 50%;
}
.stamp-panel li:has(img) {
  border-color: transparent;
}
.stamp-panel li img {
  width: 100%;
  height: 100%;
}
.stamp-panel blockquote {
  margin: 0 0 10px;
  font-weight: 700;
}
.stamp-panel blockquote cite {
  display: block;
  font-size: 13px;
  font-style: normal;
  font-weight: 400;
  color: var(--muted);
}
.stamp-join {
  margin: 0 0 6px;
  font-size: 13px;
}
.stamp-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}
.stamp-links a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 4px 12px;
  border-radius: 5px;
  color: white;
  background: var(--navy);
  font-weight: 700;
  text-decoration: none;
}
.stamp-clear {
  min-height: 36px;
  padding: 4px 12px;
  border: 1px solid var(--wood);
  border-radius: 5px;
  color: var(--wood);
  background: white;
}
.stamp-toggle.stamped img,
.stamp-panel li.stamped img {
  animation: stamp-slap 0.45s cubic-bezier(0.2, 1.6, 0.4, 1);
}
@keyframes stamp-slap {
  from {
    transform: scale(2.4) rotate(-12deg);
    opacity: 0;
  }
  60% {
    transform: scale(0.9);
    opacity: 1;
  }
}
/* Motion: keep fades, drop movement (parallax, rise, flying coin). */
@media (max-width: 900px) {
  .journal-book {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .howto-screen {
    transition: none;
  }
  .hero-bg,
  .hero-cast {
    translate: none;
    transition: none;
  }
  .hero-cast {
    animation-name: fade-in;
  }
  .sail > img,
  .stamp-toggle.stamped img,
  .stamp-panel li.stamped img,
  .stamp-mark.stamped img,
  .speech.pop,
  .cast-card:hover .cast-art .portrait {
    animation: none;
    transform: none;
  }
}
@keyframes fade-in {
  from {
    opacity: 0;
  }
}

/* Quiz (/quiz/ and /quiz/{slug}/) and the home entry button */
.quiz-entry {
  margin-top: 28px;
}
.quiz-page {
  padding: 40px 0 72px;
}
.quiz {
  max-width: 880px;
  margin-top: 24px;
}
.quiz-noscript {
  margin: 0 0 16px;
  font-weight: 700;
  color: var(--wood);
}
.js .quiz-noscript {
  display: none;
}
.quiz-progress {
  margin: 0 0 8px;
  font-weight: 700;
  color: var(--muted);
}
.quiz-step + .quiz-step {
  margin-top: 32px;
}
.quiz-live .quiz-step + .quiz-step {
  margin-top: 0;
}
.quiz-step h2 {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 14px;
  margin: 0 0 16px;
  outline: none;
}
.quiz-label {
  font-family: var(--serif);
  font-size: clamp(26px, 4vw, 36px);
}
.quiz-ask {
  font-size: 16px;
  font-weight: 600;
  color: var(--muted);
}
.quiz-options {
  display: grid;
  gap: 12px;
}
.quiz-options button {
  min-height: 56px;
  padding: 14px 18px;
  border: 2px solid var(--paper-2);
  border-radius: 10px;
  text-align: left;
  font: 500 18px/1.55 var(--sans);
  color: var(--ink);
  background: #fffdf6;
  box-shadow: 0 3px 0 var(--paper-2);
  cursor: pointer;
  overflow-wrap: anywhere;
}
.quiz-options button:hover,
.quiz-options button:focus-visible {
  border-color: var(--gold);
}
.quiz-live .quiz-step:not([hidden]),
.quiz-live .quiz-result:not([hidden]) {
  animation: quiz-in 0.35s ease-out;
}
@keyframes quiz-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
}
.quiz-card {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  gap: 24px 40px;
  align-items: center;
}
.quiz-art {
  overflow: hidden;
  border-radius: 12px;
  background:
    radial-gradient(circle at 50% 40%, #ffffffd0, #fff0 60%), var(--sky);
}
.quiz-copy h2 {
  margin: 0 0 8px;
  font-family: var(--serif);
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.3;
  outline: none;
}
.quiz-name {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px;
  font-size: 20px;
}
.quiz-quote {
  margin: 0 0 20px;
  padding: 14px 18px;
  border-left: 4px solid var(--gold);
  border-radius: 0 10px 10px 0;
  background: #fffdf6;
}
.quiz-quote p {
  margin: 0;
  font-size: 19px;
}
.quiz-copy .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.quiz-copy .actions img {
  width: 24px;
  height: 24px;
}
.quiz-again {
  display: inline-flex;
  margin-top: 18px;
}
@media (max-width: 700px) {
  .quiz-card {
    grid-template-columns: minmax(0, 1fr);
  }
  .quiz-art {
    width: min(240px, 70%);
    margin: 0 auto;
  }
  .quiz-copy .actions .button {
    width: 100%;
    justify-content: center;
  }
}
@media (prefers-reduced-motion: reduce) {
  .quiz-live .quiz-step:not([hidden]),
  .quiz-live .quiz-result:not([hidden]) {
    animation: none;
  }
}

/* Hero dialogue box, rebuilt from the game's ui/Dialogue and ui/Choice art.
   Image paths arrive as --dlg-gradient / --dlg-fade from src/hero.mjs. */
#hero-dialogue {
  margin-top: 22px;
}
.dlg {
  position: relative;
  padding: 40px 22px 20px;
  color: #fff;
  cursor: pointer;
  isolation: isolate;
  -webkit-tap-highlight-color: transparent;
}
/* GradientA through the alpha ramp of TransparentGradient, as in game. */
.dlg::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--dlg-gradient, linear-gradient(#143061, #77495c)) center /
    100% 100%;
  -webkit-mask: var(--dlg-fade) center / 100% 100%;
  mask: var(--dlg-fade) center / 100% 100%;
  opacity: 0.95;
}
.dlg:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
}
.dlg-name {
  position: absolute;
  top: -18px;
  left: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  margin: 0;
  padding: 4px 22px 4px 10px;
  font: 600 19px/1.2 var(--serif);
  letter-spacing: 0.02em;
  background: #161a1fe6;
  /* Brush-stroke ends like the in-game name tag. */
  clip-path: polygon(2% 8%, 96% 0, 100% 46%, 97% 100%, 0 94%, 1% 50%);
}
/* Narration and the player's own lines carry no name tag, as in the game. */
.dlg-name.is-nameless {
  display: none;
}
.dlg-icon {
  width: 28px;
  height: 28px;
}
.dlg-text {
  margin: 0;
  font: 500 clamp(17px, 1.5vw, 20px) / 1.6 var(--serif);
  text-shadow:
    0 1px 2px #000c,
    0 0 10px #0008;
}
.dlg[data-who="narration"] .dlg-text {
  color: #f6eeddee;
}
/* Untyped remainder keeps its space so the box never jumps. */
.dlg-rest {
  color: transparent;
  text-shadow: none;
}
.dlg-next {
  position: absolute;
  right: 18px;
  bottom: 12px;
  width: 12px;
  height: 12px;
  border-right: 3px solid #fff;
  border-bottom: 3px solid #fff;
  opacity: 0;
  rotate: 45deg;
  transition: opacity 0.2s;
}
.dlg.is-done .dlg-next {
  opacity: 0.9;
  animation: dlg-next 0.9s ease-in-out infinite alternate;
}
@keyframes dlg-next {
  to {
    transform: translateY(5px);
  }
}
/* @spawn ShakeCamera and a small bob when the captain speaks. */
.is-shaking {
  animation: dlg-shake 0.36s linear;
}
.hero-cast .is-talking {
  animation: dlg-talk 0.4s ease-out;
}
@keyframes dlg-shake {
  20% {
    transform: translate(-6px, 2px);
  }
  40% {
    transform: translate(5px, -2px);
  }
  60% {
    transform: translate(-4px, 1px);
  }
  80% {
    transform: translate(3px, 0);
  }
}
@keyframes dlg-talk {
  40% {
    transform: translateY(-6px);
  }
}
/* Before JS no box is clickable; nothing animates without motion. */
html:not(.js) .dlg {
  cursor: auto;
}
@media (max-width: 760px) {
  .dlg {
    padding: 36px 16px 18px;
  }
  .dlg-name {
    font-size: 17px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .is-shaking,
  .hero-cast .is-talking,
  .dlg.is-done .dlg-next {
    animation: none;
  }
}
