* {
  box-sizing: border-box;
}
:root {
  color-scheme: dark;
  --bg: #101217;
  --panel: #15171d;
  --ink: #090b0e;
  --text: #f2f3f6;
  --muted: #a5aabb;
  --accent: #8aeb99;
  --deep: #57bb76;
  --line: #2a2e39;
  --paper: #fcfcfa;
  --paperText: #171920;
}
body {
  margin: 0;
  min-width: 740px;
  min-height: 100vh;
  padding: 30px 18px 48px;
  background:
    radial-gradient(circle, #1c2025 1px, transparent 1.2px) 0 0/6px 6px,
    #0b0d11;
  color: var(--text);
  font:
    15px/1.45 "PingFang SC",
    "Microsoft YaHei",
    system-ui,
    sans-serif;
  font-weight: 450;
}
button,
a {
  font: inherit;
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
  color: inherit;
}
button:disabled {
  cursor: default;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid #69baff;
  outline-offset: 2px;
}
button:active:not(:disabled),
a.action:active {
  transform: translateY(1px);
}
#game {
  width: 444px;
  min-height: min(868px, calc(100dvh - 60px));
  margin: 0 auto;
  border: 2px solid #282c37;
  border-radius: 27px;
  overflow: clip;
  background: var(--panel);
  box-shadow: 0 16px 42px #0006;
  outline: none;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1,
h2,
h3,
strong,
b,
button,
.action,
.date,
.money,
.label {
  font-weight: 900;
}
.pad {
  padding: 10px 12px;
}
.top,
.hud {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.top {
  height: 56px;
}
.top .brand {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.5px;
}
.brand img {
  width: 18px;
  height: 18px;
  image-rendering: pixelated;
}
.tools,
.lang,
.inline {
  display: flex;
  align-items: center;
  gap: 6px;
}
.lang {
  gap: 0;
  border: 2px solid var(--ink);
}
.lang button,
.sound {
  border: 0;
  background: #222533;
  color: var(--muted);
  font-size: 12px;
  padding: 5px 9px;
  line-height: 20px;
  font-weight: 900;
}
.lang button[aria-pressed="true"],
.speed button[aria-pressed="true"] {
  background: var(--accent);
  color: var(--ink);
}
.sound {
  border: 2px solid var(--ink);
  padding: 3px 6px;
  color: var(--accent);
  line-height: 14px;
}
.sound svg {
  display: block;
  width: 15px;
  height: 15px;
}
.cover {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: calc(min(868px, 100dvh - 60px) - 60px);
  padding: 16px 12px 30px;
}
.cover h1 {
  font-size: 49px;
  color: var(--accent);
  letter-spacing: -2.8px;
  line-height: 1.16;
  -webkit-text-stroke: 1px currentColor;
  text-shadow:
    2px 2px #57935d,
    4px 4px #365d3f,
    6px 6px #080b09;
  white-space: nowrap;
}
.cover h1:lang(en) {
  font-size: 47px;
  letter-spacing: -2px;
}
.ribbon {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 0 15px;
}
.ribbon b {
  border: 3px solid var(--ink);
  background: var(--accent);
  color: var(--ink);
  box-shadow: 2px 2px #050705;
  padding: 2px 8px;
  font:
    900 15px/20px ui-monospace,
    Menlo,
    monospace;
  letter-spacing: 3px;
}
.ribbon span {
  font-size: 12px;
  font-weight: 900;
  color: var(--muted);
}
.scene {
  display: block;
  width: 100%;
  height: auto;
  image-rendering: pixelated;
  aspect-ratio: 180/112;
  background: #273237;
}
.cover .scene {
  border: 3px solid var(--ink);
  aspect-ratio: auto;
}
.intro {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.55;
  margin: 15px 0;
}
.steps {
  display: grid;
  gap: 5px;
  margin: 2px 0 17px;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 14px;
}
.steps li {
  display: flex;
  gap: 8px;
  align-items: baseline;
}
.steps b {
  display: grid;
  place-items: center;
  min-width: 22px;
  background: var(--accent);
  color: var(--ink);
  font:
    900 13px/20px ui-monospace,
    monospace;
}
.action {
  display: block;
  text-decoration: none;
  text-align: center;
  width: 100%;
  border: 3px solid var(--ink);
  background: var(--accent);
  color: var(--ink);
  box-shadow:
    inset 0 2px #d3f8d1,
    inset 0 -3px var(--deep);
  padding: 9px 8px;
  font-size: 15px;
  line-height: 21px;
}
.action:hover:not(:disabled) {
  filter: brightness(1.07);
}
.action.secondary {
  background: var(--paper);
  box-shadow: inset 0 -3px #d8dce4;
}
.action:disabled {
  background: #50565c;
  color: #aaafb3;
  box-shadow: inset 0 -3px #41464e;
}
.fine {
  font-size: 11.5px;
  color: #9298aa;
  text-align: center;
  line-height: 1.45;
  margin-top: 17px;
}
.hud {
  min-height: 58px;
  background: #0c0e13;
  padding: 9px 12px;
}
.hud small,
.muted {
  color: var(--muted);
}
.date {
  font-size: 20px;
  color: var(--accent);
  letter-spacing: -0.5px;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}
.hud small {
  display: block;
  font-size: 12px;
  margin-top: 2px;
}
.market,
.evo {
  white-space: nowrap;
  font-size: 11px;
  font-weight: 850;
  color: #17191f;
  background: #c5ccd6;
  padding: 2px 5px;
  border: 2px solid var(--ink);
}
.market.cold {
  background: #8ac6fa;
}
.market.hot {
  background: #ffb28a;
}
.evo {
  background: #a9e8a4;
}
.stage {
  position: relative;
}
.stage.shade:after {
  content: "";
  position: absolute;
  inset: 0;
  background: #1518216b;
  pointer-events: none;
}
.stamp {
  position: absolute;
  z-index: 1;
  right: 8px;
  bottom: 12px;
  border: 3px solid var(--ink);
  background: var(--accent);
  color: var(--ink);
  font-weight: 900;
  font-size: 20px;
  transform: rotate(-5deg);
  padding: 2px 10px;
  box-shadow: 3px 3px #0008;
}
.stamp.fail {
  background: #ffa297;
}
.progress {
  height: 5px;
  background: #272b35;
}
.progress > i {
  display: block;
  height: 100%;
  background: var(--accent);
  transition: width 0.2s;
}
.paper,
.darkbox,
.talk,
.option {
  border: 3px solid var(--ink);
  padding: 10px;
  background: var(--paper);
  color: var(--paperText);
  box-shadow: inset 0 -3px #d9dce5;
}
.paper h2 {
  font-size: 22px;
  line-height: 1.25;
}
.darkbox {
  background: #202331;
  color: var(--text);
  box-shadow: inset 0 -3px #14151d;
}
.stack {
  display: grid;
  gap: 10px;
}
.center {
  text-align: center;
}
.slots,
.cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
}
.slots {
  margin: 10px 0;
}
.slots div {
  border: 2px solid #090b0e;
  background: var(--panel);
  color: var(--accent);
  padding: 7px 1px;
  font-size: 15px;
  font-weight: 900;
}
.slots small {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 2px;
}
.micro {
  font-size: 12px;
  color: #606879;
}
.draw-body .action {
  margin-top: 22px;
}
.profile-name {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.profile-name img {
  width: 45px;
  height: 45px;
}
.sub {
  font-size: 13px;
  color: #414a59;
  font-weight: 650;
}
.fields {
  display: grid;
  grid-template-columns: 65px 1fr;
  gap: 4px 10px;
  font-size: 14px;
}
.fields > span {
  color: #5c6473;
}
.token,
.tip-button {
  background: #def1db;
  color: var(--ink);
  border: 2px solid var(--ink);
  padding: 1px 5px;
  font-size: 12px;
}
.token + .token {
  margin-left: 4px;
}
.traits,
.stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px 12px;
  margin: 9px 0;
}
.meter {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: space-between;
  padding: 0;
  background: none;
  border: 0;
  width: 100%;
  color: inherit;
  font-size: 13px;
  text-align: left;
}
.ticks {
  display: flex;
  gap: 2px;
}
.ticks i {
  display: block;
  width: 9px;
  height: 7px;
  background: #d9dce5;
}
.ticks i.on {
  background: var(--tone, #161a1e);
}
.quote {
  font-size: 14px;
  border-left: 3px solid var(--deep);
  padding-left: 8px;
  margin-top: 8px;
}
.pair {
  display: flex;
  gap: 7px;
}
.pair > * {
  flex: 1;
}
.profile-footer {
  text-align: center;
  font-size: 13px;
  color: #bac1c8;
  padding: 11px 0 8px;
}
.prologue {
  padding: 13px 12px;
}
.prologue h2 {
  font-size: 21px;
  color: var(--accent);
  margin-bottom: 9px;
}
.small-btn {
  width: auto;
  display: inline-block;
  font-size: 13px;
  padding: 3px 11px;
}
.align-right {
  text-align: right;
  margin-top: 14px;
}
.stats {
  margin: 0;
}
.stats .ticks {
  flex: 1;
  max-width: 116px;
}
.stats .ticks i {
  flex: 1;
  height: 9px;
  background: #343849;
}
.stats .ticks i.on {
  background: var(--tone);
}
.stats + .micro {
  color: #959cac;
  margin-top: 8px;
}
.readout {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.small,
.ledger {
  font-size: 12px;
}
.assetbar {
  display: flex;
  border: 2px solid var(--ink);
  height: 12px;
  margin: 6px 0;
}
.ledger {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px 13px;
}
.ledger div {
  display: flex;
  align-items: center;
  gap: 5px;
}
.ledger i,
.breakdown i {
  display: inline-block;
  width: 9px;
  height: 9px;
  flex: none;
}
.ledger b {
  margin-left: auto;
}
.ledger em,
.breakdown em {
  font-style: normal;
  color: var(--muted);
  width: 31px;
  text-align: right;
}
.delta {
  font-size: 12px;
  color: var(--muted);
}
.up {
  color: #248350;
}
.down {
  color: #c05054;
}
.feed {
  height: 168px;
  overflow-y: auto;
  font-size: 14px;
}
.feed article {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 7px;
  padding: 0 0 7px;
}
.feed b {
  font-size: 12px;
  color: #387649;
}
.speed {
  display: flex;
  justify-content: center;
  gap: 5px;
}
.speed button {
  width: auto;
  min-width: 54px;
  padding: 5px;
}
.play .fine {
  margin: 0;
}
.play {
  padding-bottom: 16px;
}
.play .meter {
  font-size: 14px;
}
.event-area {
  display: flex;
  flex-direction: column;
  min-height: calc(min(868px, 100dvh - 60px) - 345px);
}
.talk {
  width: 100%;
  text-align: left;
  min-height: 98px;
}
.talk .speaker {
  display: block;
  color: #31764d;
  font-size: 12px;
}
.talk p {
  margin: 4px 0;
  min-height: 32px;
  font-size: 16px;
}
.next {
  display: block;
  text-align: right;
  color: #687382;
  font-size: 12px;
}
.card-open {
  text-align: center;
  padding: 22px 12px;
}
.card-open button {
  min-height: 102px;
}
.card-open b {
  display: block;
  font-size: 22px;
}
.card-open small {
  display: block;
  font-size: 12px;
}
.sheet {
  margin-top: auto;
  background: #242834;
  border-top: 3px solid var(--ink);
  padding: 8px 12px 14px;
}
.grab {
  display: block;
  width: 34px;
  height: 4px;
  margin: 0 auto 11px;
  background: #626b77;
}
.question {
  font-size: 17px;
  font-weight: 850;
  margin-bottom: 10px;
}
.option {
  display: block;
  width: 100%;
  text-align: left;
  margin-bottom: 7px;
  font-size: 14px;
}
.option[aria-expanded="true"] {
  background: #e8f7df;
  border-color: var(--deep);
}
.preview {
  display: block;
  font-size: 12px;
  color: #415443;
  margin-top: 5px;
}
.result-label {
  font-size: 16px;
  font-weight: 900;
  margin-bottom: 4px;
}
.tag {
  display: inline-block;
  margin: 6px 3px 0 0;
  background: #d8efd8;
  color: #245431;
  font-size: 12px;
  padding: 2px 5px;
}
.tag.loss {
  background: #f6dbd5;
  color: #873d36;
}
.distribution {
  display: grid;
  grid-template-columns: minmax(90px, 1fr) 75px 36px;
  gap: 4px;
  align-items: center;
  margin-top: 4px;
  font-size: 12px;
}
.distribution i {
  background: #e4e8e8;
  height: 5px;
}
.distribution i b {
  display: block;
  height: 100%;
  background: var(--deep);
}
.rolling {
  text-align: center;
  padding: 32px;
  font-weight: 900;
}
.die {
  display: block;
  font-size: 38px;
  color: var(--accent);
  animation: roll 0.2s steps(2) infinite;
}
@keyframes roll {
  to {
    transform: rotate(20deg);
  }
}
.modal {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  background: #0009;
}
.modal .paper {
  width: 360px;
  box-shadow: 5px 5px #0008;
}
.modal .action {
  margin-top: 14px;
}
.modal h2 {
  margin: 4px 0;
}
.modal .label {
  font-size: 12px;
  color: #34824e;
}
.archive .money {
  font-size: 25px;
  color: var(--accent);
}
.archive h2 {
  font-size: 21px;
}
.breakdown {
  display: grid;
  gap: 4px;
  margin-top: 6px;
}
.breakdown > div {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
}
.breakdown b {
  margin-left: auto;
}
.archive .darkbox h3,
.archive .paper h3 {
  font-size: 15px;
  margin-bottom: 4px;
}
.ruler {
  position: relative;
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 3px solid var(--deep);
  font-size: 11px;
}
.milestone-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.milestone-list li {
  display: flex;
  gap: 9px;
  font-size: 14px;
  padding: 4px 0;
}
.milestone-list b {
  color: #387649;
}
.feedback {
  font-size: 12px;
  color: var(--accent);
  text-align: center;
}
.compact {
  margin-top: 5px;
}
.cover + .fine {
  padding: 10px;
}
.flash {
  animation: appear 0.18s ease-out;
}
@keyframes appear {
  from {
    opacity: 0.55;
    transform: translateY(2px);
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation: none !important;
    transition: none !important;
  }
}

.markers {
  position: absolute;
  top: -4px;
  left: 2px;
  right: 4px;
  height: 5px;
}
.markers i {
  position: absolute;
  width: 5px;
  height: 5px;
  border: 1px solid var(--ink);
  background: var(--accent);
}
.question {
  color: var(--accent);
}
#game {
  overflow-anchor: none;
}
.talk .speaker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.speaker-portrait {
  width: 28px;
  height: 28px;
}
