:root {
  --ink: #17251d;
  --ink-soft: #263b2c;
  --cream: #f7efcf;
  --cream-dim: #d8d0b0;
  --lime: #b9df58;
  --green: #3e7f47;
  --green-dark: #25583a;
  --gold: #ffd35d;
  --gold-deep: #d98b2c;
  --coral: #f06a50;
  --sky: #b9d9bd;
  --outline: #101c16;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
}

body {
  color: var(--cream);
  background:
    radial-gradient(circle at 16% 18%, rgba(126, 169, 83, 0.2), transparent 30%),
    radial-gradient(circle at 80% 76%, rgba(206, 158, 64, 0.12), transparent 34%),
    #0d1712;
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", sans-serif;
  user-select: none;
}

button {
  color: inherit;
  font: inherit;
}

button:focus-visible {
  outline: 4px solid var(--gold);
  outline-offset: 4px;
}

#viewport {
  position: fixed;
  inset: 0;
  overflow: hidden;
}

#viewport::before {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(247, 239, 207, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(247, 239, 207, 0.025) 1px, transparent 1px);
  background-size: 32px 32px;
  content: "";
}

#stage {
  position: absolute;
  top: 0;
  left: 0;
  width: 1280px;
  height: 720px;
  overflow: hidden;
  background: #7aad55;
  box-shadow:
    0 0 0 5px #0a130e,
    0 28px 80px rgba(0, 0, 0, 0.46);
  transform-origin: top left;
}

#gameCanvas {
  position: absolute;
  inset: 0;
  width: 1280px;
  height: 720px;
  outline: none;
  image-rendering: pixelated;
  cursor: crosshair;
}

.hud {
  position: absolute;
  z-index: 5;
  inset: 0 0 auto;
  height: 120px;
  pointer-events: none;
}

.hud > * {
  pointer-events: auto;
}

.sun-bank {
  position: absolute;
  top: 15px;
  left: 18px;
  display: flex;
  width: 126px;
  height: 78px;
  align-items: center;
  justify-content: center;
  padding: 5px 6px;
  color: var(--ink);
  background: var(--cream);
  border: 4px solid var(--outline);
  border-radius: 7px;
  box-shadow:
    inset 0 -5px 0 #d5c99c,
    5px 5px 0 rgba(16, 28, 22, 0.76);
}

#sunIcon {
  width: 54px;
  height: 54px;
  flex: 0 0 auto;
  image-rendering: pixelated;
}

.sun-bank-copy {
  display: grid;
  min-width: 45px;
  line-height: 1;
}

.sun-bank-copy span {
  margin-bottom: 5px;
  color: #6c714b;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.sun-bank-copy strong {
  font-family: "Cascadia Mono", "Microsoft YaHei", monospace;
  font-size: 27px;
  line-height: 1;
}

.seed-bank {
  position: absolute;
  top: 12px;
  left: 154px;
  display: flex;
  gap: 8px;
  height: 94px;
  padding: 5px;
  background: #725b31;
  border: 4px solid var(--outline);
  border-radius: 6px;
  box-shadow:
    inset 0 4px 0 #9e8148,
    5px 5px 0 rgba(16, 28, 22, 0.7);
}

.plant-card {
  position: relative;
  width: 101px;
  height: 80px;
  padding: 0;
  overflow: hidden;
  color: var(--ink);
  background: #e6dfba;
  border: 3px solid #2b402c;
  border-radius: 3px;
  cursor: pointer;
  transition:
    transform 100ms ease,
    filter 120ms ease,
    box-shadow 120ms ease;
}

.plant-card:hover:not(.is-unaffordable) {
  z-index: 2;
  transform: translateY(-3px);
  box-shadow: 0 5px 0 #2a3f2b;
}

.plant-card.selected {
  z-index: 3;
  border-color: var(--gold);
  box-shadow:
    0 0 0 3px #fff1a3,
    0 0 18px rgba(255, 211, 93, 0.9);
  transform: translateY(-4px);
}

.plant-card.is-unaffordable {
  cursor: not-allowed;
  filter: grayscale(0.85) brightness(0.8);
}

.card-icon {
  position: absolute;
  top: -2px;
  left: 18px;
  width: 64px;
  height: 64px;
  image-rendering: pixelated;
}

.card-name {
  position: absolute;
  right: 1px;
  bottom: 1px;
  left: 1px;
  height: 18px;
  padding-top: 2px;
  overflow: hidden;
  font-size: 11px;
  font-weight: 900;
  line-height: 16px;
  text-align: center;
  white-space: nowrap;
  background: rgba(247, 239, 207, 0.88);
}

.card-cost {
  position: absolute;
  top: 3px;
  right: 3px;
  min-width: 30px;
  padding: 2px 4px;
  color: var(--cream);
  font-family: "Cascadia Mono", "Microsoft YaHei", monospace;
  font-size: 11px;
  font-weight: 900;
  line-height: 14px;
  text-align: center;
  background: #315b39;
  border: 2px solid #18321f;
  border-radius: 2px;
}

.card-hotkey {
  position: absolute;
  z-index: 2;
  top: 2px;
  left: 3px;
  width: 15px;
  height: 15px;
  color: #66714c;
  font-family: "Cascadia Mono", monospace;
  font-size: 10px;
  font-weight: 900;
  line-height: 14px;
  text-align: center;
  background: rgba(247, 239, 207, 0.8);
  border-radius: 2px;
}

.cooldown-cover {
  position: absolute;
  z-index: 4;
  top: 0;
  right: 0;
  left: 0;
  height: 0;
  pointer-events: none;
  background: rgba(18, 32, 25, 0.68);
  border-bottom: 2px solid rgba(255, 255, 255, 0.16);
}

.shovel-button {
  position: absolute;
  top: 16px;
  left: 721px;
  display: grid;
  width: 72px;
  height: 82px;
  place-items: center;
  padding: 0;
  color: var(--ink);
  background: #e6dfba;
  border: 4px solid var(--outline);
  border-radius: 5px;
  box-shadow:
    inset 0 -5px 0 #c7bd94,
    5px 5px 0 rgba(16, 28, 22, 0.7);
  cursor: pointer;
}

.shovel-button canvas {
  width: 43px;
  height: 43px;
  margin-top: 2px;
  image-rendering: pixelated;
}

.shovel-button span {
  margin-top: -9px;
  font-size: 11px;
  font-weight: 900;
}

.shovel-button kbd {
  position: absolute;
  top: 3px;
  right: 4px;
  color: #747b59;
  font-family: "Cascadia Mono", monospace;
  font-size: 9px;
}

.shovel-button.selected {
  border-color: var(--gold);
  box-shadow:
    0 0 0 3px #fff1a3,
    0 0 18px rgba(255, 211, 93, 0.9);
  transform: translateY(-2px);
}

.wave-panel {
  position: absolute;
  top: 15px;
  right: 17px;
  width: 458px;
  height: 84px;
  padding: 10px 12px 8px;
  color: var(--cream);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.045), transparent 60%),
    #213b2a;
  border: 4px solid var(--outline);
  border-radius: 5px;
  box-shadow:
    inset 0 -5px 0 #172d20,
    5px 5px 0 rgba(16, 28, 22, 0.7);
}

.wave-panel-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.wave-panel-top > div:first-child {
  display: grid;
  gap: 2px;
}

.eyebrow-small {
  color: #9cb377;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.22em;
}

.wave-panel strong {
  font-size: 19px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.wave-countdown {
  position: absolute;
  right: 58px;
  bottom: 10px;
  color: #d1d8ad;
  font-size: 11px;
  font-weight: 700;
}

.hud-actions {
  display: flex !important;
  gap: 6px;
}

.icon-button {
  width: 34px;
  height: 34px;
  padding: 0;
  color: var(--cream);
  font-family: "Cascadia Mono", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
  background: #35543a;
  border: 3px solid #101c16;
  border-radius: 4px;
  box-shadow: inset 0 -3px 0 #203b28;
  cursor: pointer;
}

.icon-button:hover {
  color: var(--ink);
  background: var(--gold);
}

.wave-progress {
  display: flex;
  height: 14px;
  align-items: center;
  padding: 0 63px 0 0;
}

#waveDots {
  display: flex;
  width: 100%;
  gap: 4px;
}

.wave-dot {
  width: 100%;
  height: 7px;
  background: #101c16;
  border: 1px solid #49634a;
}

.wave-dot.done {
  background: var(--lime);
  border-color: #d5f394;
}

.wave-dot.current {
  background: var(--coral);
  border-color: #ffac8b;
  animation: dot-blink 700ms steps(2, end) infinite;
}

@keyframes dot-blink {
  50% { opacity: 0.45; }
}

.tooltip {
  position: absolute;
  z-index: 20;
  width: 270px;
  padding: 13px 15px;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.55;
  pointer-events: none;
  background: var(--cream);
  border: 4px solid var(--outline);
  border-radius: 5px;
  box-shadow: 6px 6px 0 rgba(10, 20, 14, 0.55);
}

.tooltip strong {
  display: flex;
  justify-content: space-between;
  margin-bottom: 5px;
  font-size: 15px;
}

.tooltip strong span {
  color: #a76626;
  font-family: "Cascadia Mono", monospace;
  font-size: 12px;
}

.tooltip p {
  margin: 0;
  color: #5e654c;
}

.announcement {
  position: absolute;
  z-index: 8;
  top: 169px;
  left: 50%;
  display: grid;
  width: 380px;
  padding: 13px 20px 15px;
  text-align: center;
  pointer-events: none;
  opacity: 0;
  background: rgba(25, 44, 31, 0.96);
  border: 4px solid var(--outline);
  box-shadow:
    0 0 0 3px #92ac66,
    8px 8px 0 rgba(11, 20, 14, 0.45);
  transform: translate(-50%, -12px) scale(0.96);
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

.announcement.is-visible {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}

.announcement span {
  color: #a8be7e;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.2em;
}

.announcement strong {
  margin: 2px 0;
  color: var(--cream);
  font-size: 28px;
  font-weight: 900;
}

.announcement span:last-child {
  color: var(--cream-dim);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
}

.screen {
  position: absolute;
  z-index: 30;
  inset: 0;
  overflow: hidden;
}

.screen[hidden] {
  display: none;
}

.title-screen {
  display: grid;
  grid-template-columns: 55% 45%;
  padding: 48px 64px 46px 70px;
  background:
    linear-gradient(90deg, rgba(10, 22, 17, 0.97) 0%, rgba(10, 22, 17, 0.91) 48%, rgba(10, 22, 17, 0.42) 74%, rgba(10, 22, 17, 0.2) 100%);
  backdrop-filter: blur(1.5px) saturate(0.78);
}

.title-screen::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 57%;
  width: 2px;
  background: linear-gradient(transparent, rgba(255, 255, 255, 0.16), transparent);
  content: "";
}

.title-copy {
  position: relative;
  z-index: 2;
  align-self: center;
}

.pixel-kicker {
  display: inline-block;
  padding: 5px 9px;
  color: var(--gold);
  font-family: "Cascadia Mono", "Microsoft YaHei", monospace;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.13em;
  background: #253b2a;
  border-left: 4px solid var(--coral);
}

.title-copy h1 {
  margin: 20px 0 17px;
  color: var(--cream);
  font-size: 92px;
  font-weight: 1000;
  letter-spacing: -0.1em;
  line-height: 0.82;
  text-shadow:
    5px 0 0 var(--ink),
    -5px 0 0 var(--ink),
    0 5px 0 var(--ink),
    0 -5px 0 var(--ink),
    10px 11px 0 #4d6b3d;
}

.title-copy h1 span {
  color: var(--gold);
}

.title-lead {
  max-width: 495px;
  margin: 0 0 25px;
  color: #d0d7b8;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.65;
}

.quick-rules {
  display: grid;
  max-width: 560px;
  grid-template-columns: repeat(3, 1fr);
  margin-bottom: 26px;
  border-top: 2px solid #3e5b43;
  border-bottom: 2px solid #3e5b43;
}

.quick-rules > div {
  display: flex;
  min-height: 76px;
  align-items: center;
  padding: 12px 12px 12px 0;
  border-right: 1px solid #3e5b43;
}

.quick-rules > div + div {
  padding-left: 12px;
}

.quick-rules > div:last-child {
  border-right: 0;
}

.quick-rules b {
  margin-right: 9px;
  color: var(--coral);
  font-family: "Cascadia Mono", monospace;
  font-size: 12px;
}

.quick-rules span {
  display: grid;
  color: var(--cream);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
}

.quick-rules small {
  margin-top: 4px;
  color: #849378;
  font-size: 10px;
  font-weight: 600;
}

.primary-button,
.secondary-button {
  min-width: 174px;
  min-height: 50px;
  padding: 12px 20px;
  font-size: 15px;
  font-weight: 900;
  border: 4px solid var(--outline);
  border-radius: 3px;
  cursor: pointer;
  transition:
    transform 90ms ease,
    box-shadow 90ms ease;
}

.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  color: var(--ink);
  background: var(--gold);
  box-shadow:
    inset 0 -6px 0 var(--gold-deep),
    6px 6px 0 rgba(6, 14, 9, 0.72);
}

.primary-button b {
  font-family: "Cascadia Mono", monospace;
  font-size: 22px;
}

.primary-button:hover {
  background: #ffe384;
  transform: translate(-2px, -2px);
  box-shadow:
    inset 0 -6px 0 var(--gold-deep),
    8px 8px 0 rgba(6, 14, 9, 0.72);
}

.primary-button:active,
.secondary-button:active {
  transform: translate(3px, 3px);
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.22);
}

.secondary-button {
  color: var(--cream);
  background: #34533a;
  box-shadow:
    inset 0 -6px 0 #213a29,
    6px 6px 0 rgba(6, 14, 9, 0.5);
}

.secondary-button:hover {
  background: #426a4a;
  transform: translate(-2px, -2px);
}

.control-hint {
  margin: 14px 0 0;
  color: #7e927e;
  font-family: "Cascadia Mono", "Microsoft YaHei", monospace;
  font-size: 10px;
  letter-spacing: 0.06em;
}

.title-diorama {
  position: relative;
  align-self: center;
  width: 490px;
  height: 550px;
  justify-self: end;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(103, 147, 112, 0.24), transparent 35%),
    repeating-linear-gradient(0deg, #6a9e4d 0 42px, #649549 42px 84px);
  border: 5px solid #0c1811;
  box-shadow:
    0 0 0 4px rgba(224, 222, 174, 0.22),
    16px 18px 0 rgba(5, 12, 8, 0.48);
  transform: rotate(1deg);
}

.title-diorama::before {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent 48%, rgba(30, 74, 42, 0.24) 49% 51%, transparent 52%),
    linear-gradient(0deg, transparent 48%, rgba(30, 74, 42, 0.2) 49% 51%, transparent 52%);
  background-size: 118px 104px;
  content: "";
}

.diorama-label {
  position: absolute;
  z-index: 3;
  top: 17px;
  left: 17px;
  padding: 6px 9px;
  color: #16311f;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.15em;
  background: #dce1ad;
  border: 3px solid #1b3323;
}

.title-streak {
  position: absolute;
  z-index: 1;
  top: -130px;
  left: 80px;
  width: 130px;
  height: 800px;
  background: rgba(244, 237, 193, 0.09);
  transform: rotate(23deg);
}

.sprite-plinth {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  color: #314e35;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.18em;
}

.sprite-plinth canvas {
  image-rendering: pixelated;
  filter: drop-shadow(10px 13px 0 rgba(20, 48, 29, 0.3));
}

.sprite-plinth span {
  padding: 5px 8px;
  background: rgba(219, 226, 177, 0.76);
  border: 2px solid rgba(24, 51, 32, 0.52);
}

.sprite-plinth--plant {
  top: 116px;
  left: 28px;
}

.sprite-plinth--plant canvas {
  width: 260px;
  height: 260px;
}

.sprite-plinth--zombie {
  right: -2px;
  bottom: 54px;
}

.sprite-plinth--zombie canvas {
  width: 230px;
  height: 260px;
}

.title-sun-pixel {
  position: absolute;
  z-index: 3;
  top: 88px;
  right: 80px;
  width: 74px;
  height: 74px;
  background: var(--gold);
  border: 5px solid #72541e;
  box-shadow:
    inset 0 0 0 7px #ffea86,
    8px 8px 0 rgba(83, 72, 22, 0.34);
  animation: sun-bob 2.2s steps(6, end) infinite;
}

.title-sun-pixel i {
  position: absolute;
  width: 11px;
  height: 11px;
  background: var(--gold);
}

.title-sun-pixel i:nth-child(1) { top: -17px; left: 27px; }
.title-sun-pixel i:nth-child(2) { right: -17px; top: 27px; }
.title-sun-pixel i:nth-child(3) { bottom: -17px; left: 27px; }
.title-sun-pixel i:nth-child(4) { left: -17px; top: 27px; }

@keyframes sun-bob {
  50% { transform: translateY(-8px); }
}

.pixel-house {
  position: absolute;
  z-index: 2;
  bottom: 45px;
  left: 25px;
  display: flex;
  width: 185px;
  height: 105px;
  align-items: flex-end;
  justify-content: space-evenly;
  padding: 26px 12px 0;
  background: #d4c585;
  border: 5px solid #1a3021;
  box-shadow: inset 0 -12px 0 #aa9566;
}

.pixel-house::before {
  position: absolute;
  top: -39px;
  left: -22px;
  width: 218px;
  height: 44px;
  background: #9d4f39;
  border: 5px solid #1a3021;
  clip-path: polygon(7% 100%, 50% 0, 93% 100%);
  content: "";
}

.pixel-house span {
  width: 32px;
  height: 48px;
  background: #71939a;
  border: 4px solid #273f37;
}

.tutorial-screen,
.pause-screen,
.result-screen {
  display: grid;
  place-items: center;
  padding: 42px;
  background:
    radial-gradient(circle at 50% 35%, rgba(96, 128, 75, 0.25), transparent 48%),
    rgba(7, 17, 12, 0.87);
  backdrop-filter: blur(5px);
}

.tutorial-panel {
  width: 1040px;
  padding: 35px 39px 31px;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.28), transparent 42%),
    #efe8c9;
  border: 5px solid #101c16;
  box-shadow:
    0 0 0 4px #8fa268,
    14px 16px 0 rgba(2, 9, 5, 0.45);
}

.tutorial-panel h2 {
  margin: 11px 0 25px;
  font-size: 33px;
  letter-spacing: -0.04em;
}

.tutorial-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.tutorial-grid article {
  position: relative;
  min-height: 235px;
  padding: 17px 18px 18px;
  background: #f9f3d9;
  border: 3px solid #22392a;
  box-shadow: inset 0 -5px 0 #d8cfaa;
}

.tutorial-number {
  position: absolute;
  top: 11px;
  right: 13px;
  color: #b7a97c;
  font-family: "Cascadia Mono", monospace;
  font-size: 12px;
  font-weight: 900;
}

.tutorial-grid h3 {
  margin: 11px 0 7px;
  font-size: 17px;
}

.tutorial-grid p {
  margin: 0;
  color: #59624c;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.65;
}

.tutorial-art {
  position: relative;
  width: 92px;
  height: 85px;
}

.sun-art i {
  position: absolute;
  top: 11px;
  left: 12px;
  width: 61px;
  height: 61px;
  background: var(--gold);
  border: 4px solid #433d20;
  box-shadow:
    inset 0 0 0 7px #ffea86,
    0 7px 0 rgba(91, 72, 30, 0.18);
}

.sun-art i::before,
.sun-art i::after {
  position: absolute;
  top: 23px;
  left: -14px;
  width: 79px;
  height: 9px;
  background: var(--gold);
  content: "";
}

.sun-art i::after {
  transform: rotate(90deg);
}

.seed-art i {
  position: absolute;
  bottom: 5px;
  width: 38px;
  height: 55px;
  background: #d9c58e;
  border: 3px solid #25472f;
  box-shadow: inset 0 -5px 0 #b99f67;
}

.seed-art i:nth-child(1) { left: 2px; transform: rotate(-7deg); }
.seed-art i:nth-child(2) { left: 28px; bottom: 10px; background: #92bd57; }
.seed-art i:nth-child(3) { left: 55px; transform: rotate(7deg); background: #f0a262; }

.seed-art i::after {
  position: absolute;
  top: 9px;
  left: 9px;
  width: 15px;
  height: 15px;
  background: #355f39;
  box-shadow:
    0 18px 0 -2px #355f39,
    12px 8px 0 -3px #355f39;
  content: "";
}

.mower-art i:first-child {
  position: absolute;
  top: 25px;
  left: 4px;
  width: 78px;
  height: 35px;
  background: #e7684e;
  border: 4px solid #27362c;
  box-shadow: inset 0 -8px 0 #a54337;
}

.mower-art i:first-child::before {
  position: absolute;
  top: -23px;
  left: 48px;
  width: 8px;
  height: 28px;
  background: #92703d;
  border: 3px solid #27362c;
  content: "";
}

.mower-art i:first-child::after {
  position: absolute;
  bottom: -17px;
  left: 8px;
  width: 16px;
  height: 16px;
  background: #1e2a22;
  border: 3px solid #657253;
  box-shadow: 40px 0 0 -3px #1e2a22, 40px 0 0 0 #657253;
  content: "";
}

.mower-art i:last-child {
  position: absolute;
  top: 39px;
  right: -3px;
  width: 9px;
  height: 7px;
  background: #d8e1af;
  box-shadow: 0 0 0 2px #5d7746, 3px 8px 0 1px #b8ce80;
}

.tutorial-tips {
  display: flex;
  gap: 9px;
  margin-top: 15px;
}

.tutorial-tips span {
  padding: 6px 10px;
  color: #547045;
  font-size: 10px;
  font-weight: 900;
  background: #e3dfba;
  border: 2px solid #bac596;
}

.tutorial-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 21px;
}

.text-button {
  padding: 7px 4px;
  color: #687757;
  font-size: 12px;
  font-weight: 800;
  background: transparent;
  border: 0;
  border-bottom: 2px solid currentColor;
  cursor: pointer;
}

.text-button:hover {
  color: var(--ink);
}

.pause-card,
.result-card {
  width: 530px;
  padding: 38px 42px 35px;
  color: var(--ink);
  text-align: center;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.28), transparent 42%),
    #efe8c9;
  border: 5px solid #101c16;
  box-shadow:
    0 0 0 4px #8fa268,
    14px 16px 0 rgba(2, 9, 5, 0.45);
}

.pause-glyph {
  display: grid;
  width: 82px;
  height: 82px;
  place-items: center;
  margin: 0 auto 18px;
  color: var(--gold);
  font-family: "Cascadia Mono", monospace;
  font-size: 45px;
  font-weight: 900;
  background: #284432;
  border: 4px solid #101c16;
  box-shadow: inset 0 -8px 0 #172e20;
}

.pause-card h2,
.result-card h2 {
  margin: 13px 0 8px;
  font-size: 35px;
  letter-spacing: -0.05em;
}

.pause-card p,
.result-card > p {
  margin: 0 auto;
  color: #5f6b52;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.7;
}

.pause-actions,
.result-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 27px 0 17px;
}

.pause-actions button,
.result-actions button {
  min-width: 155px;
}

.result-screen {
  background:
    radial-gradient(circle at 50% 35%, rgba(183, 206, 106, 0.2), transparent 48%),
    rgba(7, 17, 12, 0.9);
}

.result-card {
  width: 620px;
  padding-top: 31px;
}

.result-glyph {
  display: grid;
  width: 86px;
  height: 86px;
  place-items: center;
  margin: 18px auto -2px;
  color: #243925;
  font-size: 53px;
  font-weight: 900;
  background: var(--gold);
  border: 5px solid var(--ink);
  box-shadow:
    inset 0 0 0 8px #ffe98d,
    7px 7px 0 rgba(57, 54, 28, 0.22);
}

.result-card.lost .result-glyph {
  color: #f2d7c0;
  background: var(--coral);
  box-shadow:
    inset 0 0 0 8px #f89879,
    7px 7px 0 rgba(57, 54, 28, 0.22);
}

.result-card.lost .pixel-kicker {
  color: var(--coral);
}

.result-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 25px;
  border-top: 3px solid #bdc49f;
  border-bottom: 3px solid #bdc49f;
}

.result-stats div {
  display: grid;
  gap: 5px;
  padding: 14px 5px;
  border-right: 1px solid #bdc49f;
}

.result-stats div:last-child {
  border-right: 0;
}

.result-stats span {
  color: #72775e;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.result-stats strong {
  font-family: "Cascadia Mono", "Microsoft YaHei", monospace;
  font-size: 21px;
}

.return-mode {
  position: absolute;
  z-index: 40;
  right: 30px;
  bottom: 25px;
  padding: 8px 12px;
  color: var(--ink);
  font-size: 11px;
  font-weight: 900;
  background: var(--gold);
  border: 3px solid var(--outline);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}
