:root {
  color-scheme: dark;
  --bg: #131514;
  --rail: #161817;
  --panel: #1d201e;
  --panel2: #262824;
  --line: #343731;
  --muted: #a39f94;
  --ivory: #f2eee4;
  --accent: #e35c45;
  --gold: #d5af70;
  --serif: 'Noto Serif SC', 'Source Han Serif SC', 'Songti SC', 'STSong', 'SimSun', serif;
  --sans: 'Inter', 'Microsoft YaHei', 'PingFang SC', 'Noto Sans SC', sans-serif;
}
* {
  box-sizing: border-box;
}
html {
  background: var(--bg);
  scroll-behavior: smooth;
}
body {
  margin: 0;
  font: 14px/1.6 var(--sans);
  color: var(--ivory);
  -webkit-font-smoothing: antialiased;
}
button,
input {
  font: inherit;
}
button,
a {
  touch-action: manipulation;
}
button {
  color: inherit;
  cursor: pointer;
  border: 0;
  background: transparent;
}
a {
  color: inherit;
  text-decoration: none;
}
button:disabled {
  cursor: default;
}
button:focus-visible,
a:focus-visible,
input:focus-visible + span {
  outline: 2px solid #edba7e;
  outline-offset: 3px;
}
h1,
h2,
h3,
p {
  margin: 0;
}
button {
  line-height: 1.35;
}
svg.ic {
  flex: none;
  vertical-align: middle;
}
::selection {
  background: #8e3b2c;
  color: white;
}
#app {
  min-height: 100vh;
}
.rail {
  position: fixed;
  inset-block: 0;
  inset-inline-start: 0;
  width: 216px;
  background: var(--rail);
  border-inline-end: 1px solid #30332e;
  display: flex;
  flex-direction: column;
  z-index: 15;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 34px 24px 39px;
}
.brand img {
  width: 40px;
  height: 40px;
  filter: drop-shadow(0 3px 8px #0003);
}
.brand b,
.brand small {
  display: block;
}
.brand b {
  font: 700 22px/1.2 var(--serif);
  letter-spacing: 0.09em;
}
.brand small {
  font:
    9px/1.5 Georgia,
    serif;
  letter-spacing: 0.23em;
  color: #bbb09e;
  margin: 5px 0 0 1px;
}
.rail nav {
  display: grid;
  gap: 5px;
  padding: 0 13px;
}
.nav-link,
.guide {
  height: 45px;
  position: relative;
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  color: #b0b2aa;
  font-size: 14px;
}
.nav-link {
  border-radius: 5px;
}
.nav-link:hover,
.guide:hover {
  background: #ffffff06;
  color: #fff;
}
.nav-link.on {
  background: #392720;
  color: #f19d80;
}
.nav-link.on:before {
  content: '';
  height: 17px;
  width: 3px;
  position: absolute;
  inset-inline-start: 0;
  background: #e97151;
  border-radius: 2px;
}
.rail-foot {
  margin-top: auto;
  padding: 16px 14px 19px;
}
.guide {
  width: 100%;
  padding-inline-start: 13px;
}
.save-state {
  border-top: 1px solid var(--line);
  margin-top: 12px;
  padding: 17px 5px 0;
  display: flex;
  align-items: center;
  gap: 7px;
  color: #8c9187;
  font-size: 11px;
}
.save-state i,
.stage-mode i {
  width: 6px;
  height: 6px;
  border-radius: 100%;
  background: #96a68b;
}
.save-count {
  margin-inline-start: auto;
  color: #a9a89c;
}
.main-shell {
  margin-inline-start: 216px;
  min-height: 100vh;
}
.topbar {
  height: 70px;
  border-bottom: 1px solid #2b2f2a;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(22px, 3.35vw, 64px);
  gap: 10px;
}
.crumb,
.top-tools,
.sound-button,
.hero-actions,
.primary,
.secondary,
.glass-button,
.section-heading,
.card-title,
.card-features,
.eyebrow,
.hero-kicker,
.text-button,
.stage-controls,
.spot-tools,
.play-head,
.role-tag,
.story-top,
.ending-actions,
.record-person {
  display: flex;
  align-items: center;
}
.crumb {
  gap: 12px;
  font-size: 12px;
  color: #a4a69d;
}
.crumb-logo {
  display: none;
}
.crumb em {
  font-style: normal;
  color: #64675c;
}
.crumb strong {
  font-weight: 500;
  color: #dcded3;
}
.top-tools {
  gap: 12px;
}
.sound-button {
  gap: 8px;
  color: #b8b9af;
  font-size: 12px;
}
.sound-button i {
  font-size: 10px;
  font-style: normal;
  padding: 1px 5px;
  background: #2c302a;
  color: #afb0a5;
  border-radius: 3px;
}
.sound-button.enabled {
  color: var(--gold);
}
.tool-separator {
  width: 1px;
  height: 16px;
  background: var(--line);
}
.icon-button {
  display: grid;
  place-items: center;
  width: 33px;
  height: 33px;
  border-radius: 5px;
  color: #bbbeb3;
}
.icon-button:hover,
.sound-button:hover {
  color: var(--ivory);
  background: #ffffff08;
}
#main-content {
  max-width: 1770px;
  margin: 0 auto;
  padding: 26px clamp(22px, 3.35vw, 64px) 48px;
}
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 330px;
  height: clamp(330px, 29vw, 455px);
  border-radius: 8px;
  border: 1px solid #4d4b3f;
  background: #1d2928;
}
.hero-art,
.hero-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}
.hero-art {
  object-fit: cover;
  object-position: 50% 52%;
}
.hero-shade {
  background:
    linear-gradient(
      90deg,
      rgba(12, 19, 18, 0.86) 0%,
      rgba(15, 21, 19, 0.69) 22%,
      rgba(17, 23, 21, 0.18) 54%,
      rgba(17, 20, 19, 0.02) 78%
    ),
    linear-gradient(0deg, #15171358, transparent 35%);
}
.hero-content {
  height: 100%;
  padding: clamp(25px, 3vw, 51px) clamp(26px, 3.4vw, 58px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  flex-direction: column;
}
.hero-kicker {
  font-size: 10px;
  letter-spacing: 0.15em;
  color: #e0c9a0;
  font-weight: 600;
  gap: 8px;
}
.hero-kicker i,
.eyebrow i {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--accent);
  transform: rotate(45deg);
  flex: none;
}
.hero-kicker i {
  background: #ddac70;
}
.hero-kicker span {
  width: 19px;
  height: 1px;
  background: #b6a383;
}
.hero h1 {
  color: #fff5df;
  font: 700 clamp(46px, 4.25vw, 80px) / 1.14 var(--serif);
  letter-spacing: 0.045em;
  margin: 12px 0 11px;
  text-shadow: 0 2px 12px #0002;
}
.hero h1 span {
  font-family: var(--serif);
  margin-inline-end: -0.35em;
}
.hero-content > p {
  color: #ded9c8;
  font-size: 14px;
  letter-spacing: 0.035em;
}
.hero-actions {
  gap: 12px;
  margin-top: 23px;
}
.primary,
.secondary,
.glass-button,
.text-button {
  gap: 9px;
  justify-content: center;
  font-weight: 550;
}
.primary,
.secondary,
.glass-button {
  height: 43px;
  border-radius: 5px;
  padding: 0 18px;
}
.primary {
  background: var(--accent);
  color: #fff8f0;
  box-shadow: inset 0 1px #ffb79754;
}
.primary:hover {
  background: #ed6b52;
}
.primary:active {
  transform: translateY(1px);
}
.glass-button {
  background: #1d2220a8;
  border: 1px solid #aaa59478;
  color: #f0e9dc;
  backdrop-filter: blur(6px);
}
.glass-button:hover {
  background: #303b37c9;
}
.secondary {
  border: 1px solid #53564b;
  background: #272a25;
}
.secondary:hover {
  border-color: #898779;
}
.hero-sig {
  position: absolute;
  inset-inline-end: 19px;
  bottom: 15px;
  padding: 4px 3px;
  border: 2px solid #e9be8e82;
  color: #ebca9fba;
  font: 700 13px/1 var(--serif);
  transform: rotate(3deg);
  user-select: none;
}
.world-section {
  margin-top: 32px;
}
.world-section.standalone {
  margin-top: 8px;
}
.section-heading {
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}
.eyebrow {
  font: 600 10px/1.5 var(--sans);
  letter-spacing: 0.18em;
  color: #b8a78c;
  gap: 9px;
}
.eyebrow i {
  width: 5px;
  height: 5px;
}
.section-heading h2,
.library h1,
.play-head h1,
.section-heading h1,
.ending-panel h1 {
  font-family: var(--serif);
  letter-spacing: 0.045em;
}
.section-heading h2 {
  font-size: 29px;
  line-height: 1.4;
  margin-top: 3px;
}
.filters {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px;
  border: 1px solid #383a34;
  border-radius: 5px;
  background: #1a1d19;
}
.filters button {
  font-size: 12px;
  padding: 5px 13px;
  border-radius: 3px;
  color: #a7ab9e;
}
.filters button.active {
  background: #403f35;
  color: #f3e8d5;
}
.filters button:hover {
  color: white;
}
.world-grid,
.system-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 17px;
}
.world-card {
  text-align: start;
  padding: 0;
  overflow: hidden;
  border: 1px solid #373a32;
  border-radius: 7px;
  background: #1d201d;
  transition:
    transform 0.22s,
    border-color 0.22s,
    background 0.22s;
}
.world-card:hover {
  transform: translateY(-3px);
  border-color: var(--world);
  background: #252722;
}
.world-picture {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1.98;
  background: #28312d;
}
.world-picture:after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, #161c183a, transparent 45%);
}
.world-picture img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 48%;
  transition: transform 0.4s;
}
.world-card:hover img {
  transform: scale(1.04);
}
.era-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #131715ba;
  border: 1px solid #d6c8ad52;
  color: #fff2de;
  font: 500 11px/1.6 var(--sans);
  border-radius: 3px;
  padding: 2px 7px;
  backdrop-filter: blur(6px);
}
.world-picture .era-tag {
  position: absolute;
  inset-inline-start: 12px;
  top: 12px;
  z-index: 1;
}
.era-tag i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--world, #decba9);
}
.world-info {
  padding: 14px 16px 13px;
}
.card-title {
  justify-content: space-between;
}
.card-title h3 {
  font: 650 23px/1.35 var(--serif);
  letter-spacing: 0.065em;
}
.card-open {
  color: #b9b8a9;
}
.world-info p {
  font-size: 12px;
  color: #abaea1;
  line-height: 1.65;
  margin-top: 5px;
}
.card-features {
  gap: 14px;
  color: #9da295;
  margin-top: 12px;
  font-size: 11px;
}
.card-features span {
  display: flex;
  align-items: center;
  gap: 5px;
}
.card-features span + span:before {
  content: '';
  width: 1px;
  height: 10px;
  background: #42463c;
  margin-inline-end: 6px;
}
.library,
.standalone,
.play-page {
  padding-top: 6px;
}
.library h1,
.section-heading h1,
.play-head h1 {
  font-size: clamp(30px, 3vw, 44px);
  line-height: 1.4;
  margin-top: 4px;
}
.lead,
.muted {
  color: #b2b3a8;
  line-height: 1.8;
}
.lead {
  margin: 8px 0 25px;
}
.library > .eyebrow,
.play-head .eyebrow {
  margin-top: 4px;
}
.system-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(160deg, #32332b, #1b201d 65%);
  padding: 25px 22px;
  display: flex;
  align-items: flex-start;
  flex-direction: column;
}
.sys-read {
  background: linear-gradient(160deg, #363039, #20211f 65%);
}
.sys-mall {
  background: linear-gradient(160deg, #3e362a, #21221e 65%);
}
.sys-emblem {
  margin: 12px auto 28px;
  color: #d9bda1;
  background: #ffffff05;
  border: 1px solid #9f8d714a;
  border-radius: 50%;
  width: 80px;
  height: 80px;
  display: grid;
  place-items: center;
}
.system-card h2,
.dialog h2,
.empty h2 {
  font: 650 25px/1.5 var(--serif);
  margin: 5px 0;
}
.system-card p {
  color: var(--muted);
  line-height: 1.8;
  font-size: 13px;
  margin: 4px 0 25px;
}
.text-button {
  color: #e4b28e;
  padding: 0;
  display: inline-flex;
  font-size: 13px;
}
.system-card .text-button {
  margin-top: auto;
}
.empty {
  border: 1px dashed #474a3f;
  border-radius: 8px;
  padding: 55px 22px;
  text-align: center;
  background: radial-gradient(ellipse at center, #292c23, #1a1d19 75%);
}
.empty-icon {
  color: #b0a186;
}
.empty h2 {
  margin-top: 10px;
}
.empty p {
  color: var(--muted);
  margin: 8px 0 20px;
}
.empty .primary {
  margin: auto;
}
.record-list {
  display: grid;
  gap: 12px;
}
.record-item {
  display: flex;
  gap: 20px;
  align-items: center;
  padding: 10px;
  text-align: start;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel);
}
.record-item img {
  width: 105px;
  height: 77px;
  object-fit: cover;
  border-radius: 4px;
}
.record-item > svg {
  margin-inline-start: auto;
  margin-inline-end: 10px;
}
.record-item small,
.record-item p {
  color: var(--muted);
  font-size: 11px;
}
.record-item h3 {
  font: 650 20px/1.5 var(--serif);
}
#overlay:empty {
  display: none;
}
#overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 16px;
  background: #080a08bc;
  backdrop-filter: blur(6px);
}
.dialog {
  position: relative;
  width: min(470px, 100%);
  max-height: min(90dvh, 880px);
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid #545447;
  background: #1e201c;
  box-shadow: 0 20px 90px #0008;
  border-radius: 10px;
  scrollbar-width: thin;
  scrollbar-color: #58594d transparent;
}
.dialog-close {
  position: sticky;
  display: grid;
  place-items: center;
  float: inline-end;
  z-index: 3;
  top: 13px;
  inset-inline-end: 13px;
  margin: 13px 0 -46px;
  margin-inline-end: 13px;
  width: 33px;
  height: 33px;
  border-radius: 50%;
  background: #161915e0;
  color: white;
  border: 1px solid #787b694d;
}
.dialog-pad {
  padding: 26px;
}
.dialog-pad h2 {
  padding-inline-end: 20px;
}
.dialog-pad > .muted {
  margin-bottom: 15px;
}
.cast-banner {
  height: 105px;
  background-size: cover;
  background-position: center 41%;
  position: relative;
}
.cast-banner > .era-tag {
  position: absolute;
  inset-inline-start: 24px;
  bottom: 10px;
}
.cast-content {
  padding-top: 13px;
}
fieldset {
  margin: 17px 0 19px;
  border: 0;
  padding: 0;
}
legend {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #d6d5c6;
  font-weight: 550;
  font-size: 13px;
  margin-bottom: 9px;
  padding: 0;
}
.radio-stack {
  display: grid;
  gap: 6px;
}
.radio-stack label,
.sys-pills label {
  position: relative;
  cursor: pointer;
}
.radio-stack input,
.sys-pills input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.radio-stack label > span,
.sys-pills label > span {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #42463a;
  color: var(--muted);
  background: #252820;
  border-radius: 4px;
}
.radio-stack label > span {
  padding: 8px 11px;
}
.radio-stack b {
  white-space: nowrap;
  font-size: 13px;
  color: #e2dfd1;
}
.radio-stack small {
  font-size: 11px;
  line-height: 1.5;
}
.radio-stack input:checked + span,
.sys-pills input:checked + span {
  border-color: #b97858;
  background: #423026;
  color: #f2d4b2;
}
.sys-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.sys-pills label > span {
  font-size: 12px;
  padding: 7px 11px;
}
.full {
  width: 100%;
}
.dialog-options {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 20px;
}
.pref-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  border-bottom: 1px solid var(--line);
  padding: 15px 0;
  gap: 10px;
  text-align: start;
}
.pref-line b,
.pref-line small {
  display: block;
}
.pref-line small {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}
.switch {
  width: 34px;
  height: 20px;
  border-radius: 20px;
  background: #4d5045;
  position: relative;
  flex: none;
}
.switch:after {
  content: '';
  position: absolute;
  left: 3px;
  top: 3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #e0dfd4;
}
.switch.on {
  background: #b84e36;
}
.switch.on:after {
  left: 17px;
}
.guide-list {
  padding-inline-start: 18px;
  line-height: 1.9;
  color: #dad9cf;
}
.guide-list li {
  margin: 11px 0;
}
.note-bar {
  color: #b4aa98;
  font-size: 12px;
  background: #2b2b24;
  border-inline-start: 2px solid #ad8458;
  padding: 9px 13px;
  margin: 15px 0;
}
.play-head {
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}
.role-tag,
.stage-mode {
  font-size: 12px;
  border: 1px solid #4e5044;
  background: #262920;
  padding: 6px 10px;
  border-radius: 4px;
  gap: 7px;
  color: #d8d2bd;
}
.play-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.23fr) minmax(320px, 0.98fr);
  gap: 16px;
  align-items: start;
}
.stage-panel,
.story-card,
.ending-panel {
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow: hidden;
  background: var(--panel);
}
.stage-viewport {
  position: relative;
  isolation: isolate;
  aspect-ratio: 1.25;
  min-height: 230px;
  background: #1a1d19;
  overflow: hidden;
}
.stage-viewport:before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: linear-gradient(0deg, #1317114a, transparent 45%), var(--backdrop);
  background-size: cover;
  background-position: center;
}
.stage-mode {
  position: absolute;
  inset-inline-start: 12px;
  top: 12px;
  color: #e7ddc9;
  background: #131611b5;
  border-color: #b6ac8c50;
  border-radius: 3px;
  display: flex;
  align-items: center;
  pointer-events: none;
}
.stage-mode i {
  background: #d1ac73;
}
.stage-mode span {
  font-size: 10px;
}
.stage-controls {
  position: absolute;
  bottom: 10px;
  inset-inline-end: 10px;
  gap: 6px;
}
.stage-controls button {
  display: flex;
  align-items: center;
  gap: 5px;
  background: #161914b8;
  border: 1px solid #c6c6a84a;
  color: #ede7d9;
  border-radius: 4px;
  padding: 5px 7px;
  font-size: 11px;
}
#stage-canvas,
#stage-pins {
  position: absolute;
  inset: 0;
}
#stage-canvas canvas {
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
}
#stage-pins {
  pointer-events: none;
}
.stage-pin {
  position: absolute;
  pointer-events: auto;
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  border: 1px solid #f2d29595;
  border-radius: 50%;
  background: #2e271bd9;
  box-shadow: 0 0 0 3px #23251d43;
  transform: translate(-50%, -90%);
  color: #f6d49d;
  font:
    600 13px Georgia,
    serif;
}
.stage-pin:hover {
  background: var(--accent);
  color: white;
  z-index: 2;
}
.pin-0 {
  left: 24%;
  top: 59%;
}
.pin-1 {
  left: 52%;
  top: 51%;
}
.pin-2 {
  left: 76%;
  top: 63%;
}
.still-mode #stage-canvas {
  visibility: hidden;
}
.still-mode #stage-pins {
  display: none;
}
.stage-bottom {
  padding: 12px 13px;
  background: #22251f;
}
.stage-hint {
  font-size: 11px;
  display: flex;
  gap: 6px;
  align-items: center;
  color: #abab9a;
  margin-bottom: 8px;
}
.spot-tools {
  flex-wrap: wrap;
  gap: 6px;
}
.spot-tools button {
  font-size: 11px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #474b3d;
  border-radius: 4px;
  padding: 5px 7px;
  color: #e0dccd;
}
.spot-tools button:hover,
.spot-tools button.seen {
  border-color: #9a875f;
  color: #e7c696;
}
.spot-tools b {
  font: 600 11px Georgia;
  color: #d6b87d;
}
.hub-stage {
  max-width: 1100px;
}
.hub-stage .stage-viewport {
  aspect-ratio: 2.15;
}
.hub-lead {
  margin-top: -8px;
}
.stage-panel.expanded {
  position: fixed;
  z-index: 50;
  inset: 3vh 3vw;
  box-shadow: 0 0 0 10vw #000b;
  display: flex;
  flex-direction: column;
}
.stage-panel.expanded .stage-viewport {
  flex: 1;
  aspect-ratio: auto;
}
.story-card {
  padding: 22px clamp(16px, 1.8vw, 30px);
}
.story-top {
  justify-content: space-between;
  gap: 8px;
}
.log-button {
  color: var(--muted);
  font-size: 11px;
}
.story-card h2 {
  font: 650 clamp(24px, 2vw, 35px) / 1.45 var(--serif);
  margin: 12px 0;
}
.story-text {
  color: #deded1;
  line-height: 1.85;
  font-size: 14px;
}
.story-text p + p {
  margin-top: 10px;
}
.story-choices {
  display: grid;
  gap: 8px;
  margin: 20px 0 13px;
}
.choice {
  display: flex;
  text-align: start;
  align-items: center;
  gap: 9px;
  padding: 10px;
  color: #ebe6d9;
  border: 1px solid #4e5146;
  background: #292d25;
  border-radius: 5px;
}
.choice b {
  flex: none;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  color: #deba87;
  background: #38392d;
  border-radius: 3px;
  font: 600 12px Georgia;
}
.choice > span {
  flex: 1;
  font-size: 13px;
}
.choice small {
  display: block;
  color: #a2a18d;
  font-size: 10px;
  margin-top: 4px;
}
.choice > svg {
  color: #acab99;
}
.choice:hover:not(:disabled) {
  border-color: #c38b66;
  background: #353328;
}
.choice:disabled,
.power:disabled {
  opacity: 0.49;
}
.power {
  border-top: 1px solid var(--line);
  padding: 14px 0 0;
  display: flex;
  align-items: center;
  gap: 7px;
  color: #d9c69f;
  width: 100%;
  font-size: 12px;
}
.power span {
  margin-inline-start: auto;
  color: #aaa992;
}
.record-person {
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  margin: 13px 0;
}
.history {
  list-style: none;
  margin: 18px 0 20px;
  padding: 0;
}
.history li {
  display: flex;
  gap: 14px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.history small {
  color: var(--gold);
  white-space: nowrap;
}
.ending-page {
  position: relative;
  min-height: 75vh;
  padding: clamp(40px, 8vh, 90px) 16px;
  display: grid;
  place-items: center;
  isolation: isolate;
  border-radius: 8px;
  overflow: hidden;
}
.ending-art {
  z-index: -1;
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: brightness(0.58);
}
.ending-panel {
  max-width: 650px;
  padding: clamp(22px, 4vw, 50px);
  background: #171c18e8;
  backdrop-filter: blur(12px);
  border-color: #7d785e;
}
.ending-panel h1 {
  font-size: clamp(25px, 3vw, 40px);
  line-height: 1.45;
  margin: 12px 0;
}
.ending-actions {
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px 0 15px;
}
#toast {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translate(-50%, 8px);
  z-index: 120;
  background: #30352b;
  color: #f2eadb;
  padding: 8px 15px;
  border: 1px solid #656857;
  border-radius: 6px;
  opacity: 0;
  pointer-events: none;
  transition: 0.2s;
}
#toast.on {
  opacity: 1;
  transform: translate(-50%, 0);
}
@media (min-width: 1550px) {
  .rail {
    width: 240px;
  }
  .main-shell {
    margin-inline-start: 240px;
  }
  .brand {
    padding-inline-start: 34px;
  }
  .nav-link {
    padding-inline-start: 23px;
  }
  .world-picture {
    aspect-ratio: 2.2;
  }
  .world-info {
    padding: 18px 21px;
  }
  .world-info p {
    font-size: 14px;
  }
}
@media (max-width: 1150px) {
  .rail {
    width: 178px;
  }
  .main-shell {
    margin-inline-start: 178px;
  }
  .brand {
    gap: 9px;
    padding-inline-start: 18px;
  }
  .brand b {
    font-size: 20px;
  }
  .rail nav {
    padding: 0 10px;
  }
  .world-grid,
  .system-grid {
    gap: 12px;
  }
  .world-info {
    padding: 12px;
  }
  .hero {
    height: 330px;
  }
  .play-grid {
    grid-template-columns: minmax(0, 1fr) minmax(285px, 1fr);
  }
}
@media (max-width: 900px) {
  .rail {
    width: 74px;
  }
  .main-shell {
    margin-inline-start: 74px;
  }
  .brand {
    padding: 24px 16px 34px;
  }
  .brand > span,
  .nav-link > span,
  .guide > span,
  .save-state {
    display: none;
  }
  .rail nav {
    padding: 0 9px;
  }
  .nav-link,
  .guide {
    padding: 0;
    justify-content: center;
  }
  .rail-foot {
    padding: 10px;
  }
  .topbar {
    height: 61px;
  }
  .play-grid {
    grid-template-columns: 1fr 1fr;
  }
  .stage-viewport {
    min-height: 250px;
  }
  .hero {
    height: 315px;
    min-height: 300px;
  }
  .world-section {
    margin-top: 24px;
  }
}
@media (max-width: 680px) {
  body {
    padding-bottom: 65px;
  }
  .rail {
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: calc(56px + env(safe-area-inset-bottom));
    padding: 3px 6px env(safe-area-inset-bottom);
    background: #191c18f7;
    backdrop-filter: blur(12px);
    border: 0;
    border-top: 1px solid var(--line);
  }
  .brand,
  .rail-foot {
    display: none;
  }
  .rail nav {
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 0;
    gap: 2px;
  }
  .nav-link {
    flex: 1;
    height: 48px;
    flex-direction: column;
    gap: 3px;
    font-size: 10px;
  }
  .nav-link > span {
    display: block;
  }
  .nav-link.on {
    background: transparent;
  }
  .nav-link.on:before {
    display: none;
  }
  .main-shell {
    margin: 0;
  }
  .topbar {
    height: 50px;
    padding: 0 16px;
  }
  .crumb-logo {
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    background: #ae4431;
    color: #fff0dc;
    border-radius: 6px;
  }
  .crumb {
    gap: 7px;
    font-size: 11px;
  }
  .top-tools {
    gap: 4px;
  }
  .tool-separator {
    margin: 0 4px;
  }
  .sound-button {
    gap: 4px;
  }
  .sound-button i {
    display: none;
  }
  #main-content {
    padding: 14px 14px 17px;
  }
  .hero {
    height: 317px;
    min-height: 0;
  }
  .hero-art {
    object-position: 62% center;
  }
  .hero-content {
    padding: 25px 19px;
  }
  .hero h1 {
    font-size: 47px;
    margin: 15px 0 11px;
  }
  .hero-shade {
    background:
      linear-gradient(90deg, #101815e6 0%, #12191488 54%, #0d161918),
      linear-gradient(0deg, #0b100f54, transparent 65%);
  }
  .hero-content > p {
    font-size: 12px;
  }
  .hero-actions {
    gap: 8px;
    margin-top: 21px;
  }
  .hero-actions .primary,
  .hero-actions .glass-button {
    padding: 0 11px;
    height: 39px;
    font-size: 13px;
  }
  .hero-sig {
    inset-inline-end: 12px;
    bottom: 12px;
  }
  .section-heading {
    margin-bottom: 13px;
  }
  .section-heading h2 {
    font-size: 24px;
  }
  .eyebrow {
    font-size: 9px;
  }
  .filters button {
    padding: 4px 9px;
  }
  .world-grid {
    grid-template-columns: 1fr;
  }
  .world-card {
    display: grid;
    grid-template-columns: 38% 1fr;
    min-height: 110px;
  }
  .world-picture {
    aspect-ratio: auto;
    height: 100%;
  }
  .world-info {
    padding: 12px;
  }
  .world-picture .era-tag {
    inset-inline-start: 6px;
    top: 6px;
    font-size: 9px;
  }
  .card-title h3 {
    font-size: 21px;
  }
  .card-features {
    margin-top: 8px;
  }
  .system-grid,
  .play-grid {
    grid-template-columns: 1fr;
  }
  .sys-emblem {
    margin: 5px 0 17px;
    width: 58px;
    height: 58px;
  }
  .sys-emblem svg {
    width: 30px;
    height: 30px;
  }
  .system-card {
    padding: 19px;
  }
  .system-card p {
    margin-bottom: 15px;
  }
  .library,
  .standalone,
  .play-page {
    padding-top: 5px;
  }
  .stage-viewport,
  .hub-stage .stage-viewport {
    aspect-ratio: 1.55;
    min-height: 190px;
  }
  .story-card {
    padding: 16px;
  }
  .play-head {
    margin-bottom: 10px;
  }
  .play-head h1 {
    font-size: 29px;
  }
  .stage-bottom {
    padding: 8px 10px;
  }
  .stage-hint {
    margin-bottom: 5px;
    font-size: 10px;
  }
  .role-tag {
    font-size: 10px;
  }
  .dialog {
    max-height: 90dvh;
  }
  .dialog-pad {
    padding: 19px;
  }
  .cast-banner {
    height: 85px;
  }
  .hero-kicker {
    font-size: 9px;
  }
  .ending-actions > .primary,
  .ending-actions > .secondary {
    font-size: 12px;
    padding: 0 12px;
  }
  #toast {
    bottom: 68px;
  }
  .ending-page {
    padding: 20px 10px;
  }
  .record-item {
    gap: 10px;
  }
  .record-item img {
    width: 70px;
    height: 70px;
  }
  .record-item h3 {
    font-size: 17px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}
body.reduce *,
body.reduce *:before,
body.reduce *:after {
  scroll-behavior: auto !important;
  transition: none !important;
  animation: none !important;
}
.dialog-open,
.stage-expanded {
  overflow: hidden;
}
.settings-guide {
  margin-top: 20px;
}
.gl-active .stage-viewport:before {
  background-image: radial-gradient(ellipse at 55% 65%, #4b504b 0%, #343b3b 46%, #20292a 95%);
}
.stage-controls button[hidden],
.stage-pin[hidden] {
  display: none;
}
.story-card h2:focus {
  outline: 0;
}

.locale-control {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #d2c8b5;
}
.language-select {
  font: inherit;
  color: var(--ivory);
  background: #252820;
  border: 1px solid #555849;
  border-radius: 4px;
  padding: 5px 8px;
  cursor: pointer;
}
.locale-control select {
  font-size: 12px;
  max-width: 10.5em;
  border-color: transparent;
  background: var(--bg);
}
.language-select:focus-visible {
  outline: 2px solid #edba7e;
}
html:not(:lang(zh)) {
  --serif: Georgia, 'Yu Mincho', 'Malgun Gothic', 'Nirmala UI', serif;
  --sans: 'Segoe UI', 'Yu Gothic UI', 'Malgun Gothic', 'Nirmala UI', sans-serif;
}
html:lang(zh-TW) {
  --serif: 'Noto Serif TC', 'Songti TC', 'PMingLiU', serif;
  --sans: 'PingFang TC', 'Microsoft JhengHei', sans-serif;
}
html:not(:lang(zh)) .hero {
  height: auto;
}
html:not(:lang(zh)) .hero-content {
  min-height: inherit;
  max-width: 44rem;
}
html:not(:lang(zh)) .hero h1 {
  white-space: normal;
  text-wrap: balance;
  letter-spacing: 0;
}
.world-card, .story-card, .dialog, .ending-panel, .nav-link, .brand, .hero-content {
  overflow-wrap: anywhere;
}
.hero-actions, .card-features, .record-person, .filters, .dialog-options {
  flex-wrap: wrap;
}
.hero-actions > *, .dialog-options > *, .ending-actions > * {
  height: auto;
  min-height: 43px;
  padding-block: 7px;
}
html:not(:lang(zh)) .radio-stack label > span {
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}
.radio-stack b {
  white-space: normal;
}
.world-grid > *, .world-info, .play-grid > *, .history span, .brand > span, .ending-panel {
  min-width: 0;
}
.play-head > div {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.filters {
  max-width: 100%;
}
html[dir=rtl] .hero-shade {
  transform: scaleX(-1);
}
html[dir=rtl] :is(.choice, .card-open, .primary, .text-button, .record-item, .craft-entry)
  :is(.ic-arrow, .ic-back, .ic-chevron, .ic-diagonal) {
  transform: scaleX(-1);
}
html[dir=rtl] .hero-kicker, html[dir=rtl] .eyebrow, html[dir=rtl] h1,
html[dir=rtl] h2, html[dir=rtl] h3, html[dir=rtl] .brand b {
  letter-spacing: normal;
}
@media (max-width: 680px) {
  .play-head {
    flex-wrap: wrap;
    gap: 6px 14px;
  }
  .crumb {
    min-width: 0;
  }
  .crumb > span:not(.crumb-logo), .crumb > em, .sound-button > span, .tool-separator {
    display: none;
  }
  html:not(:lang(zh)) .hero h1 {
    font-size: clamp(34px, 8vw, 47px);
  }
  html:not(:lang(zh)) .hero {
    min-height: 285px;
  }
  .card-features {
    gap: 4px 8px;
  }
  .world-picture .era-tag {
    max-width: calc(100% - 12px);
  }
  .nav-link {
    text-align: center;
    line-height: 1.15;
    min-width: 0;
  }
  .locale-control {
    gap: 0;
  }
}
