@font-face {
  font-family: MossBrush;
  src: url("assets/fonts/title.ttf") format("truetype");
  font-display: swap;
}
:root {
  color-scheme: dark;
  --page: #142d2b;
  --surface: #1d3932;
  --ink: #f0f0d9;
  --muted: #b0c6b5;
  --leaf: #d1e2a1;
  --gold: #f0cc88;
  --line: #456153;
  --danger: #ec9b96;
  --font: "Microsoft YaHei UI", "PingFang SC", "Noto Sans SC", sans-serif;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
button,
input,
a {
  -webkit-tap-highlight-color: transparent;
}
button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}
button:disabled {
  cursor: default;
  opacity: 0.5;
}
button,
a {
  touch-action: manipulation;
}
button:focus-visible,
a:focus-visible,
input:focus-visible + span,
canvas:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 5px;
}
button:focus:not(:focus-visible),
canvas:focus:not(:focus-visible) {
  outline: none;
}
button {
  border: 0;
}
a {
  color: inherit;
  text-decoration: none;
  text-underline-offset: 4px;
}
::selection {
  background: var(--leaf);
  color: var(--page);
}
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--page);
}
::-webkit-scrollbar-thumb {
  background: #587562;
  border-radius: 8px;
}
svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}
.icon-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}
.app-shell {
  max-width: 1480px;
  margin: auto;
  padding: 0 48px;
}
.topbar {
  height: 110px;
  display: flex;
  align-items: center;
  gap: 40px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-mark {
  width: 40px;
  height: 40px;
  color: var(--leaf);
  stroke-width: 1.15;
}
.brand > span {
  font-size: 19px;
  letter-spacing: 0.08em;
  line-height: 1.4;
  font-weight: 600;
}
.brand small {
  display: block;
  font-size: 11px;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0.18em;
}
.header-note {
  font-size: 12px;
  color: var(--muted);
  margin-left: 24px;
}
.tools {
  margin-left: auto;
  display: flex;
  gap: 12px;
  align-items: center;
}
.icon-button,
.text-button {
  height: 40px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--muted);
  border-radius: 50%;
  padding: 10px;
}
.icon-button:hover,
.text-button:hover {
  background: #2c483d;
  color: var(--ink);
}
.text-button {
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12px;
}
.garden {
  position: relative;
  height: min(660px, calc(100svh - 230px));
  min-height: 490px;
  overflow: hidden;
  border-radius: 20px;
  background: #1a342e;
  isolation: isolate;
  box-shadow: 0 18px 65px #00000030;
}
.garden:fullscreen {
  border-radius: 0;
  width: 100%;
  height: 100svh;
  min-height: 0;
}
.garden canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}

.menu-panel {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    #183b32e8 0%,
    #183b32ce 25%,
    #183b3200 64%
  );
}
.menu-copy {
  padding: 0 7%;
  position: relative;
  pointer-events: auto;
  margin-top: 14px;
}
h1 {
  font-family: MossBrush, "KaiTi", serif;
  font-size: clamp(42px, 4.5vw, 67px);
  line-height: 1.28;
  font-weight: 400;
  letter-spacing: 0.02em;
  margin: 0 0 22px;
  color: #edf1d3;
}
h1 + p {
  color: #b7cbb3;
  font-size: 13px;
  line-height: 2;
  margin: 0 0 29px;
}
.mode-picker {
  display: flex;
  margin: 0 0 16px;
  padding: 0;
  border: 0;
  gap: 8px;
  flex-wrap: wrap;
}
.daily-entry {
  min-height: 40px;
  padding: 7px 10px;
  background: transparent;
  color: var(--gold);
  border: 1px solid var(--line);
  border-radius: 7px;
  font-size: 12px;
}
.daily-entry:hover {
  background: #d1e2a119;
}
.daily-note {
  color: var(--muted);
  font-size: 11px;
  margin: -6px 0 12px;
}
.daily-brief {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  text-align: left;
  margin: 28px 0 18px;
}
.daily-brief > svg {
  width: 42px;
  height: 42px;
  color: var(--leaf);
}
.daily-brief h3 {
  font-size: 18px;
  font-weight: 500;
  margin: 0 0 8px;
}
.daily-brief p {
  font-size: 12px;
  color: var(--muted);
  margin: 5px 0;
}
.daily-brief .daily-attributes {
  color: var(--gold);
  line-height: 1.9;
}
.daily-records {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-block: 1px solid var(--line);
  padding: 18px 0;
  gap: 12px;
  margin: 22px 0 0;
}
.daily-records dt {
  font-size: 11px;
  color: var(--muted);
}
.daily-records dd {
  font-size: 18px;
  margin: 6px 0 0;
  font-variant-numeric: tabular-nums;
}
.share-label {
  display: block;
  text-align: left;
  color: var(--muted);
  font-size: 12px;
  margin: 18px 0 8px;
}
.share-text {
  display: block;
  width: 100%;
  resize: vertical;
  min-height: 180px;
  max-height: 50svh;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--page);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.8;
  caret-color: var(--gold);
}
.share-text:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}
.shared-wrap {
  margin-top: 10px;
  max-width: 310px;
}
.shared-wrap .secondary-button {
  margin-top: 0;
  width: 100%;
}
.shared-wrap small {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 6px;
}
@media (max-width: 700px) {
  .mode-picker {
    gap: 6px;
  }
  .mode-picker .daily-entry {
    font-size: 11px;
    padding: 6px 8px;
  }
  .daily-note {
    font-size: 11px;
  }
  .daily-brief {
    gap: 12px;
  }
  .daily-brief > svg {
    width: 32px;
    height: 32px;
  }
  .daily-records dd {
    font-size: 16px;
  }
}
@media (max-height: 520px) and (orientation: landscape) {
  .daily-note {
    margin: -4px 0 8px;
  }
  .shared-wrap {
    position: absolute;
    left: 100%;
    top: 145px;
    width: 235px;
    margin-left: 22px;
  }
  .has-shared-run .continue-wrap {
    top: 225px;
  }
}
@media (max-width: 700px) {
  .has-shared-run .menu-copy {
    padding-top: 24px;
  }
  .has-shared-run .menu-copy > p:not(.daily-note):not(.menu-hint) {
    display: none;
  }
  .has-shared-run h1 {
    font-size: 36px;
    margin-bottom: 12px;
  }
  .has-shared-run .menu-hint {
    display: none;
  }
  .has-shared-run .shared-wrap {
    max-width: 280px;
  }
}
@media (max-height: 650px) and (max-width: 700px) {
  .has-shared-run .menu-copy {
    padding-top: 14px;
  }
  .has-shared-run h1 {
    font-size: 30px;
  }
  .has-shared-run .keeper-button {
    min-height: 46px;
    margin-bottom: 8px;
    padding-block: 5px;
  }
  .has-shared-run .daily-note {
    margin-bottom: 8px;
  }
  .has-shared-run .continue-wrap,
  .has-shared-run .shared-wrap {
    margin-top: 7px;
  }
}
.mode-picker label {
  cursor: pointer;
  position: relative;
}
.mode-picker input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.mode-picker label > span {
  display: block;
  padding: 7px 12px;
  border: 1px solid #59745b;
  border-radius: 7px;
  color: #c4d3b9;
  font-size: 12px;
}
.mode-picker small {
  font-size: 11px;
  margin-left: 5px;
  opacity: 0.8;
}
.mode-picker input:checked + span {
  background: #d1e2a119;
  border-color: var(--leaf);
  color: var(--leaf);
}
.start-button {
  background: var(--leaf);
  color: #263f2a;
  border-radius: 9px;
  min-height: 52px;
  min-width: 224px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 35px;
  padding: 12px 22px;
  font-size: 15px;
  font-weight: 650;
  transition:
    background 0.18s,
    transform 0.18s;
}
.keeper-button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(100%, 300px);
  min-height: 56px;
  background: transparent;
  border-block: 1px solid var(--line);
  color: var(--ink);
  text-align: left;
  padding: 8px 0;
  margin: 0 0 16px;
}
.keeper-button:hover {
  color: var(--leaf);
}
.keeper-button > svg {
  width: 22px;
  height: 22px;
  color: var(--leaf);
}
.keeper-button strong {
  font-size: 13px;
  font-weight: 500;
}
.keeper-button small {
  display: block;
  font-size: 11px;
  color: var(--muted);
}
.keeper-change {
  margin-left: auto;
  font-size: 11px;
  color: var(--leaf);
}
.keeper-options {
  margin: 0;
  padding: 0;
  border: 0;
  text-align: left;
}
.keeper-option {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 108px;
  padding: 18px 12px;
  border-top: 1px solid var(--line);
  cursor: pointer;
}
.keeper-option:last-child {
  border-bottom: 1px solid var(--line);
}
.keeper-option:has(input:checked) {
  background: #d1e2a119;
}
.keeper-option input {
  accent-color: var(--leaf);
  width: 18px;
  height: 18px;
  margin: 0;
  flex: none;
}
.keeper-option > svg {
  width: 28px;
  height: 28px;
  color: var(--leaf);
}
.keeper-option strong {
  display: block;
  font-size: 16px;
  font-weight: 500;
}
.keeper-option small {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin: 3px 0;
}
.keeper-option > span > span {
  font-size: 11px;
  color: var(--gold);
  display: block;
}
.keeper-option > span > .keeper-detail {
  color: var(--muted);
}
.result-details {
  margin: 18px 0 0;
  text-align: left;
  border-block: 1px solid var(--line);
}
.result-details summary {
  min-height: 44px;
  padding: 10px 0;
  cursor: pointer;
  font-size: 12px;
  color: var(--muted);
}
.combat-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 8px 0 16px;
  gap: 14px;
}
.combat-stats dt {
  font-size: 11px;
  color: var(--muted);
}
.combat-stats dd {
  font-size: 14px;
  margin: 3px 0 0;
  font-variant-numeric: tabular-nums;
}
.result-details > p {
  font-size: 11px;
  color: var(--muted);
  margin: 12px 0;
}
@media (max-width: 700px) {
  .keeper-button {
    margin-bottom: 14px;
    max-width: 280px;
  }
  .keeper-option {
    gap: 10px;
    padding: 14px 4px;
  }
  .keeper-option > svg {
    width: 23px;
    height: 23px;
  }
  .keeper-option small {
    font-size: 11px;
  }
  .combat-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-height: 520px) and (orientation: landscape) {
  .keeper-button {
    position: absolute;
    left: 100%;
    top: 54px;
    width: 235px;
    margin-left: 22px;
  }
}
.start-button:hover {
  background: #e1efb9;
  transform: translateY(-2px);
}
.start-button:active {
  transform: translateY(0);
}
.menu-hint {
  font-size: 11px;
  color: #acc3ab;
  margin: 20px 0 0;
  white-space: nowrap;
}
.keyboard-hint {
  display: flex;
  align-items: center;
  gap: 4px;
}
kbd {
  font-family: var(--font);
  font-size: 11px;
  line-height: 20px;
  min-width: 19px;
  text-align: center;
  padding: 0 4px;
  border: 1px solid #668265;
  border-radius: 4px;
  color: #ccd8bd;
}
.hint-divider {
  margin: 0 8px;
}
.touch-hint {
  display: none;
}
.character-note {
  min-width: 145px;
  transform: translateX(-25%);
  position: absolute;
  left: 66.5%;
  top: 64%;
  font-size: 12px;
  color: #dde8bd;
  line-height: 1.8;
  text-align: center;
}
.character-note > span {
  display: block;
  width: 1px;
  height: 35px;
  background: #a8bf8180;
  margin: 0 auto 12px;
}
.character-note small {
  display: block;
  color: #a9c2a6;
  font-size: 11px;
}
.field-notes {
  display: flex;
  align-items: center;
  gap: 36px;
  padding: 30px 10px 25px;
}
.field-title {
  display: flex;
  gap: 12px;
  align-items: center;
  min-width: 225px;
}
.field-title > svg {
  width: 26px;
  height: 26px;
  color: #b6cc9a;
}
.field-title > span {
  font-size: 14px;
}
.field-title small {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 3px;
}
.records {
  display: flex;
  justify-content: space-around;
  flex: 1;
  margin: 0;
  gap: 35px;
}
.records > div {
  min-width: 80px;
}
.records dt {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 3px;
}
.records dd {
  font-size: 23px;
  line-height: 1.4;
  margin: 0;
  font-variant-numeric: tabular-nums;
  color: #e4e9cf;
}
.records dd small {
  font-size: 11px;
}
.local-note {
  font-size: 11px;
  color: var(--muted);
  text-align: right;
  line-height: 1.9;
  margin: 0 0 0 25px;
}
footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid #355144;
  padding: 20px 2px 24px;
  font-size: 11px;
  color: #9ab6a3;
}
.footer-dot {
  padding: 0 8px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
[hidden] {
  display: none !important;
}
.hud {
  position: absolute;
  top: 22px;
  left: 28px;
  right: 28px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: flex-start;
  pointer-events: none;
  gap: 16px;
}
.hud-left {
  min-width: 0;
  width: min(220px, 100%);
  background: #142d2be8;
  padding: 10px 14px;
  border-radius: 10px;
}
.health {
  display: flex;
  align-items: center;
  gap: 10px;
}
.health svg {
  width: 15px;
  height: 15px;
  color: #e7aca0;
  fill: #e7aca026;
}
.health > b {
  font-size: 11px;
  min-width: 24px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.bar {
  height: 5px;
  background: #6f896e40;
  border-radius: 5px;
  overflow: hidden;
  display: block;
}
.bar > i {
  height: 100%;
  display: block;
  transform-origin: left;
  background: var(--leaf);
  width: 100%;
  border-radius: inherit;
}
.health .bar {
  flex: 1;
  min-width: 12px;
}
.health .bar > i {
  background: #e3ab95;
}
.level-line {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  font-size: 11px;
  color: var(--muted);
}
.xp {
  flex: 1;
  height: 3px;
}
.xp > i {
  width: 0;
}
.hud-time {
  display: flex;
  align-items: center;
  flex-direction: column;
  background: #142d2bc9;
  border-radius: 10px;
  padding: 8px 24px;
}
.hud-time strong {
  font-size: 27px;
  line-height: 1.2;
  font-weight: 500;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}
.hud-time > span {
  font-size: 11px;
  color: var(--muted);
  margin-top: 5px;
}
.hud-right {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 18px;
  pointer-events: auto;
  background: #142d2bc9;
  border-radius: 10px;
  padding: 5px 7px 5px 14px;
}
.kill-count {
  display: flex;
  gap: 7px;
  align-items: center;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.kill-count svg {
  color: var(--gold);
  width: 16px;
  height: 16px;
}
.kill-count b {
  min-width: 20px;
}
.bottom-hud {
  position: absolute;
  bottom: 22px;
  left: 28px;
  right: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  pointer-events: none;
}
.equipped {
  display: flex;
  gap: 6px;
}
.equipped > span {
  background: #142d2be8;
  padding: 6px 9px;
  border-radius: 6px;
  font-size: 11px;
  color: #d1dfb4;
}
.dash-status {
  background: #142d2be8;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 12px;
  font-size: 11px;
  color: var(--leaf);
}
.dash-status svg {
  width: 16px;
  height: 16px;
}
.dash-status .bar {
  width: 48px;
  height: 3px;
}
.boss-hud {
  position: absolute;
  top: 108px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  width: min(300px, 60%);
  font-size: 11px;
  color: #ecc2c8;
  text-shadow: 0 1px 3px #142d2b;
}
.boss-hud > .bar {
  margin-top: 6px;
  height: 5px;
  background: #343445;
}
.boss-hud i {
  background: #c88fa9;
}
.overlay {
  position: absolute;
  inset: 0;
  z-index: 10;
  background: #0b2325d9;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow-y: auto;
}
body:not(.in-game) .overlay {
  max-height: calc(100svh - 94px);
}
.garden:fullscreen .overlay {
  max-height: 100%;
}
.dialog {
  background: #213e35;
  border: 1px solid #617558;
  border-radius: 18px;
  padding: 34px;
  max-width: 680px;
  width: 100%;
  text-align: center;
  box-shadow: 0 16px 60px #00000040;
  outline: 0;
  max-height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}
.dialog h2 {
  font-size: 28px;
  font-weight: 500;
  letter-spacing: 0.03em;
  margin: 0 0 10px;
}
.dialog .intro {
  color: var(--muted);
  font-size: 12px;
  margin: 0 0 23px;
}
.dialog .start-button {
  margin: 22px auto 0;
  justify-content: center;
  min-width: 200px;
}
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 1px solid #76906d;
  background: transparent;
  border-radius: 8px;
  font-size: 12px;
  padding: 10px 20px;
  margin-top: 12px;
  color: var(--ink);
}
.secondary-button:hover {
  background: #354e3e;
}
.dialog-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  align-items: center;
  margin-top: 24px;
  flex-wrap: wrap;
}
.dialog-actions > .start-button,
.dialog-actions > .secondary-button {
  margin: 0;
  min-width: 140px;
}
.upgrade-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.upgrade-card {
  background: #304c3c;
  border: 1px solid #66805b;
  border-radius: 12px;
  padding: 22px 14px 17px;
  min-height: 205px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition:
    background 0.15s,
    transform 0.15s;
}
.upgrade-card:hover {
  background: #405d43;
  transform: translateY(-4px);
}
.upgrade-card svg {
  width: 35px;
  height: 35px;
  color: var(--leaf);
  margin-bottom: 18px;
  stroke-width: 1.2;
}
.upgrade-card strong {
  font-size: 16px;
  font-weight: 500;
}
.upgrade-card small {
  font-size: 11px;
  color: var(--gold);
  margin-top: 3px;
}
.upgrade-card p {
  font-size: 11px;
  color: #cad8ba;
  line-height: 1.8;
  margin: 10px 0 0;
}
.upgrade-effect {
  margin-top: 10px;
  color: var(--leaf);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.upgrade-hint {
  font-size: 11px;
  line-height: 1.8;
  color: var(--muted);
  margin-top: 8px;
}
.continue-wrap {
  margin-top: 10px;
  max-width: 310px;
}
.continue-wrap .secondary-button {
  margin-top: 0;
  width: 100%;
}
.continue-wrap small {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 6px;
  line-height: 1.8;
}
@media (max-width: 700px) {
  .upgrade-hint {
    grid-column: 2 / 4;
    grid-row: 4;
    margin-top: 4px;
  }
  .has-checkpoint .menu-copy {
    padding-top: 34px;
  }
  .has-checkpoint .menu-hint {
    margin-top: 10px;
  }
  .continue-wrap {
    max-width: 280px;
  }
}
@media (max-height: 650px) and (max-width: 700px) {
  .has-checkpoint h1 {
    font-size: 36px;
  }
  .has-checkpoint h1 + p {
    display: none;
  }
  .has-checkpoint .menu-copy {
    padding-top: 22px;
  }
  .has-checkpoint .keeper-button {
    margin-bottom: 10px;
  }
}
@media (max-height: 520px) and (orientation: landscape) {
  .continue-wrap {
    position: absolute;
    left: 100%;
    top: 145px;
    width: 235px;
    margin-left: 22px;
    margin-top: 0;
  }
}
.upgrade-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 20px;
  text-align: left;
}
.upgrade-actions .secondary-button {
  margin: 0;
  flex: none;
}
.upgrade-actions > span {
  font-size: 11px;
  color: var(--muted);
}
@media (max-width: 700px) {
  .upgrade-actions {
    gap: 8px;
    margin-top: 14px;
  }
  .upgrade-actions .secondary-button {
    padding: 8px 12px;
    font-size: 11px;
  }
  .upgrade-actions > span {
    max-width: 105px;
  }
}
#xp-text {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.low-health .health > b {
  color: var(--danger);
}
.low-health .health .bar > i {
  background: var(--danger);
}
.card-shortcut {
  font-size: 11px;
  color: var(--muted);
  margin-top: auto;
  padding-top: 15px;
}
.result-symbol {
  width: 46px;
  height: 46px;
  color: var(--gold);
  margin: 0 auto 13px;
}
.result-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  padding: 20px 0;
  border-top: 1px solid #4d654e;
  border-bottom: 1px solid #4d654e;
}
.result-stats b {
  font-size: 24px;
  font-weight: 500;
  display: block;
  font-variant-numeric: tabular-nums;
}
.result-stats span {
  font-size: 11px;
  color: var(--muted);
}
.result-build {
  font-size: 11px;
  color: var(--muted);
  margin: 16px 0 0;
}
.help-content {
  text-align: left;
  max-width: 440px;
  margin: auto;
}
.help-content p {
  font-size: 12px;
  color: #d2ddc3;
  line-height: 1.95;
  margin: 12px 0;
}
.help-content b {
  font-weight: 600;
  color: var(--gold);
}
.help-content .help-warning {
  color: var(--muted);
  font-size: 11px;
}
.toast {
  position: absolute;
  bottom: 85px;
  left: 50%;
  transform: translate(-50%, 8px);
  padding: 9px 19px;
  background: #e4eaca;
  color: #263e2f;
  border-radius: 7px;
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.2s,
    transform 0.2s;
  max-width: 90%;
  text-align: center;
}
.toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}
.touch-controls {
  display: none;
}
.noscript {
  position: fixed;
  inset: 25% 10% auto;
  padding: 30px;
  background: #213e35;
  text-align: center;
}
.touch-hint {
  display: none;
}
@media (min-width: 1600px) {
  .garden {
    height: 700px;
    max-height: none;
  }
  .app-shell {
    max-width: 1510px;
  }
}
@media (max-width: 1100px) {
  .app-shell {
    padding: 0 28px;
  }
  .header-note {
    display: none;
  }
  .topbar {
    height: 88px;
  }
  .garden {
    height: 600px;
    min-height: 490px;
  }
  .menu-copy {
    padding: 0 6%;
  }
  h1 {
    font-size: 52px;
  }
  .field-title {
    min-width: 185px;
  }
  .field-notes {
    gap: 15px;
  }
  .local-note {
    margin-left: 0;
  }
  .records {
    gap: 15px;
  }
}
@media (max-width: 700px) {
  body {
    font-size: 13px;
  }
  .app-shell {
    padding: 0 16px;
  }
  .topbar {
    height: 78px;
    gap: 10px;
  }
  .brand-mark {
    width: 32px;
    height: 32px;
  }
  .brand {
    gap: 9px;
  }
  .brand > span {
    font-size: 16px;
  }
  .brand small {
    font-size: 11px;
  }
  .tools {
    gap: 3px;
  }
  .text-button {
    padding: 8px;
  }
  .text-button span {
    font-size: 11px;
  }
  .desktop-only {
    display: none;
  }
  .garden {
    height: 650px;
    min-height: 540px;
    max-height: calc(100svh - 92px);
    border-radius: 14px;
  }

  .menu-panel {
    align-items: flex-start;
    background: linear-gradient(
      180deg,
      #183b32ef 0%,
      #183b32ba 40%,
      #183b3200 75%
    );
  }
  .menu-copy {
    padding: 66px 27px 0;
    margin: 0;
    width: 100%;
  }
  h1 {
    font-size: 43px;
    line-height: 1.25;
    margin-bottom: 14px;
  }
  h1 + p {
    font-size: 11px;
    line-height: 1.9;
    margin-bottom: 20px;
  }
  .mode-picker {
    margin-bottom: 13px;
  }
  .mode-picker label > span {
    padding: 6px 11px;
    font-size: 11px;
  }
  .start-button {
    min-height: 48px;
    min-width: 206px;
    font-size: 14px;
  }
  .menu-hint {
    font-size: 11px;
    margin-top: 17px;
  }
  .character-note {
    left: 59%;
    top: 75%;
    font-size: 11px;
  }
  .character-note > span {
    height: 22px;
    margin-bottom: 7px;
  }
  .character-note small {
    font-size: 11px;
  }
  .field-notes {
    padding: 23px 5px 20px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .field-title {
    gap: 9px;
  }
  .field-title > svg {
    width: 22px;
    height: 22px;
  }
  .field-title > span {
    font-size: 12px;
  }
  .field-title small {
    display: block;
    margin-left: 0;
    font-size: 11px;
  }
  .records {
    justify-content: space-between;
    padding-left: 31px;
    gap: 10px;
  }
  .records > div {
    min-width: 65px;
  }
  .records dd {
    font-size: 21px;
  }
  .records dt {
    font-size: 11px;
  }
  .local-note {
    display: none;
  }
  footer {
    font-size: 11px;
    padding: 16px 0 22px;
    gap: 15px;
  }
  .hud {
    top: 15px;
    left: 12px;
    right: 12px;
    gap: 8px;
  }
  .hud-left {
    min-width: 0;
    padding: 8px 9px;
  }
  .health {
    gap: 6px;
  }
  .health .bar {
    min-width: 12px;
  }
  .health svg {
    width: 12px;
    height: 12px;
  }
  .health > b {
    font-size: 11px;
    min-width: 20px;
  }
  .level-line {
    gap: 6px;
    font-size: 11px;
  }
  .hud-time {
    padding: 7px 10px;
  }
  .hud-time strong {
    font-size: 21px;
  }
  .hud-time > span {
    font-size: 11px;
  }
  .hud-right {
    gap: 1px;
    padding: 2px 3px 2px 9px;
  }
  .kill-count {
    font-size: 11px;
    gap: 4px;
  }
  .kill-count svg {
    width: 12px;
    height: 12px;
  }
  .hud-right .icon-button {
    padding: 7px;
    width: 44px;
    height: 44px;
  }
  .boss-hud {
    top: 91px;
  }
  .bottom-hud {
    bottom: 15px;
    left: 13px;
    right: 13px;
    align-items: flex-end;
  }
  .equipped {
    max-width: 65%;
    flex-wrap: wrap;
    gap: 4px;
  }
  .equipped > span {
    font-size: 11px;
    padding: 3px 5px;
  }
  .dash-status {
    font-size: 11px;
    padding: 6px;
    gap: 5px;
  }
  .dash-status .bar {
    display: none;
  }
  .overlay {
    padding: 15px;
  }
  .dialog {
    padding: 26px 18px;
    border-radius: 14px;
    max-height: 100%;
    overflow-y: auto;
  }
  .dialog h2 {
    font-size: 24px;
  }
  .dialog .intro {
    font-size: 11px;
    margin-bottom: 18px;
  }
  .upgrade-grid {
    grid-template-columns: 1fr;
    gap: 9px;
  }
  .upgrade-card {
    min-height: 106px;
    padding: 13px 14px;
    display: grid;
    grid-template-columns: 35px 1fr auto;
    grid-template-rows: auto auto auto;
    column-gap: 13px;
    align-items: center;
    text-align: left;
  }
  .upgrade-card svg {
    grid-row: span 3;
    margin: 0;
    width: 29px;
    height: 29px;
  }
  .upgrade-card strong {
    font-size: 15px;
    grid-column: 2;
    grid-row: 1;
  }
  .upgrade-card small {
    grid-column: 3;
    grid-row: 1;
    font-size: 11px;
    margin: 0;
  }
  .upgrade-card p {
    grid-column: 2/4;
    grid-row: 2;
    margin: 4px 0 0;
    font-size: 11px;
  }
  .upgrade-effect {
    grid-column: 2/4;
    grid-row: 3;
    margin-top: 5px;
  }
  .card-shortcut {
    display: none;
  }
  .dialog-actions {
    gap: 9px;
  }
  .dialog-actions > .start-button,
  .dialog-actions > .secondary-button {
    min-width: 115px;
    padding: 10px 14px;
    font-size: 12px;
  }
  .result-stats b {
    font-size: 21px;
  }
  .help-content p {
    font-size: 11px;
  }
  .toast {
    font-size: 11px;
    bottom: 160px;
    padding: 8px 12px;
    white-space: normal;
    min-width: 170px;
  }
}

.touch-device .keyboard-hint {
  display: none;
}
.touch-device .touch-hint {
  display: block;
}
.touch-device .touch-controls:not([hidden]) {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
}
.touch-device .joystick {
  width: 104px;
  height: 104px;
  border: 1px solid #b9cda563;
  border-radius: 50%;
  background: #193c3273;
  position: relative;
  touch-action: none;
  pointer-events: auto;
}
.touch-device .joystick.dragging {
  border-color: var(--leaf);
  background: #193c32b3;
}
.touch-device .joystick > span {
  position: absolute;
  width: 40px;
  height: 40px;
  left: 31px;
  top: 31px;
  border-radius: 50%;
  background: #cbdc9e73;
  border: 1px solid #d4e4b99e;
  pointer-events: none;
}
.touch-device .dash-button {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: #254b3cbd;
  border: 1px solid #cbdc9e80;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  touch-action: none;
  pointer-events: auto;
  color: var(--leaf);
  font-size: 11px;
}
.touch-device .dash-button svg {
  width: 23px;
  height: 23px;
}
.touch-device .dash-status {
  display: none;
}
.touch-device .bottom-hud {
  bottom: 12px;
}
.touch-device .equipped {
  max-width: 100%;
}
.touch-device .help-keyboard {
  display: none;
}
.panel-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2px 14px;
  margin-top: 12px;
}
.panel-links button {
  min-height: 44px;
  padding: 8px 4px;
  color: var(--muted);
  background: transparent;
  font-size: 12px;
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: 5px;
}
.panel-links button:hover {
  color: var(--ink);
}
.build-overview {
  text-align: left;
  margin: 20px 0;
}
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}
.section-heading h3,
.guide-content h3 {
  font-size: 14px;
  font-weight: 500;
  margin: 0;
}
.section-heading span,
.build-list,
.panel-note {
  font-size: 11px;
  color: var(--muted);
}
.build-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px 16px;
  padding: 18px 0;
  margin: 12px 0;
  border-block: 1px solid var(--line);
}
.build-stats dt {
  font-size: 11px;
  color: var(--muted);
}
.build-stats dd {
  font-size: 14px;
  margin: 3px 0 0;
  font-variant-numeric: tabular-nums;
}
.build-list {
  line-height: 1.9;
  margin: 0;
}
.guide-content,
.settings-content,
.run-list {
  text-align: left;
}
.guide-content h3 {
  color: var(--gold);
  margin: 26px 0 10px;
}
.guide-content details {
  border-bottom: 1px solid var(--line);
}
.guide-content summary {
  min-height: 44px;
  padding: 10px 2px;
  cursor: pointer;
  font-size: 13px;
}
.guide-content summary span {
  float: right;
  color: var(--muted);
  font-size: 11px;
}
.guide-content details p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.9;
}
summary:focus-visible,
input:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}
.settings-content {
  max-width: 440px;
  margin: auto;
}
.settings-content input {
  accent-color: var(--leaf);
  cursor: pointer;
}
.setting-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  min-height: 60px;
  cursor: pointer;
}
.setting-row b {
  display: block;
  font-size: 14px;
  font-weight: 500;
}
.setting-row small {
  color: var(--muted);
  font-size: 11px;
}
.setting-row input {
  width: 22px;
  height: 22px;
  flex: none;
}
.volume-setting {
  margin: 14px 0 24px;
}
.volume-setting label {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
}
.volume-setting output {
  color: var(--leaf);
  font-variant-numeric: tabular-nums;
}
.volume-setting input {
  width: 100%;
  min-height: 36px;
  margin: 6px 0 0;
}
.setting-group {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 22px 0 0;
  padding: 12px 0 0;
}
.setting-group legend {
  font-size: 13px;
  padding-right: 12px;
}
.setting-group label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  margin-right: 14px;
  cursor: pointer;
  font-size: 12px;
}
.setting-group input {
  width: 16px;
  height: 16px;
  margin: 0;
}
.setting-group p {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.8;
  margin: 6px 0 0;
}
.run-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.run-list li {
  border-top: 1px solid var(--line);
  padding: 18px 0;
}
.run-heading,
.run-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
.run-heading strong {
  font-size: 13px;
  font-weight: 500;
}
.run-heading time,
.run-list p,
.run-footer span {
  font-size: 11px;
  color: var(--muted);
}
.run-list .run-numbers {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.run-list p {
  margin: 8px 0;
  line-height: 1.9;
}
.run-footer .secondary-button {
  margin: 0;
  padding: 8px 12px;
}
.empty-journal {
  padding: 32px 0;
}
.empty-journal p + p {
  color: var(--muted);
  font-size: 12px;
}
.panel-note {
  line-height: 1.8;
  margin: 16px 0 0;
}
.new-best {
  font-size: 12px;
  color: var(--gold);
  margin: 0 0 18px;
}
.journal-button {
  flex: none;
  gap: 6px;
}
.journal-button svg {
  width: 15px;
  height: 15px;
}
.reduced-effects *,
.reduced-effects *::before,
.reduced-effects *::after {
  animation-duration: 0.01ms !important;
  transition-duration: 0.01ms !important;
  scroll-behavior: auto !important;
}
.reduced-effects .start-button:hover,
.reduced-effects .upgrade-card:hover {
  transform: none;
}
@media (max-width: 700px) {
  .tools .text-button span {
    display: none;
  }
  .tools .text-button,
  .tools .icon-button {
    width: 40px;
    min-width: 40px;
    padding: 10px;
  }
  .field-notes {
    grid-template-columns: 1fr auto;
  }
  .field-notes .records {
    grid-column: 1 / -1;
  }
  .journal-button {
    align-self: start;
  }
  .build-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 18px;
  }
  .section-heading {
    flex-wrap: wrap;
    gap: 4px;
  }
  .build-overview {
    margin: 16px 0;
  }
  .dialog-actions > .secondary-button {
    min-width: 108px;
  }
}
@media (max-width: 380px) {
  .brand-mark {
    width: 26px;
    height: 26px;
  }
  .brand {
    gap: 6px;
  }
  .brand > span {
    font-size: 14px;
  }
  .tools {
    gap: 0;
  }
}
@media (max-width: 900px) {
  body.in-game {
    overflow: hidden;
  }
  .in-game .app-shell {
    height: 100svh;
    display: flex;
    flex-direction: column;
    padding: 0 8px calc(8px + env(safe-area-inset-bottom));
  }
  .in-game .topbar {
    height: 60px;
    flex: none;
  }
  .in-game main {
    flex: 1;
    min-height: 0;
  }
  .in-game .garden {
    height: 100%;
    min-height: 0;
    max-height: none;
    border-radius: 12px;
  }
  .in-game .field-notes,
  .in-game footer {
    display: none;
  }
  .in-game .storage-warning {
    flex: none;
    margin: 0 0 8px;
    padding: 8px 12px;
    font-size: 11px;
  }
  .mode-picker label > span {
    min-height: 40px;
    display: flex;
    align-items: center;
  }
}
@media (max-height: 520px) and (orientation: landscape) {
  .topbar {
    height: 58px;
  }
  .garden {
    height: calc(100svh - 68px);
    min-height: 280px;
    max-height: none;
  }
  .menu-copy {
    padding: 25px 6%;
    margin: 0;
  }
  h1 {
    font-size: 33px;
    margin-bottom: 8px;
  }
  h1 + p {
    display: none;
  }
  .mode-picker {
    margin-top: 8px;
    margin-bottom: 10px;
  }

  .menu-hint {
    margin-top: 10px;
  }
  .character-note {
    top: 57%;
  }
  .field-notes,
  footer {
    display: none;
  }
  .dialog {
    padding: 19px;
    max-width: 650px;
  }
  .dialog h2 {
    font-size: 22px;
  }
  .dialog .intro {
    margin-bottom: 12px;
  }
  .upgrade-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .upgrade-card {
    display: flex;
    min-height: 155px;
    padding: 12px;
  }
  .upgrade-card svg {
    margin-bottom: 8px;
  }
  .upgrade-card strong {
    font-size: 13px;
  }
  .upgrade-card p {
    font-size: 11px;
    text-align: center;
  }
  .upgrade-card small {
    font-size: 11px;
  }
  .touch-controls:not([hidden]) {
    bottom: 18px;
  }
  .joystick {
    width: 84px;
    height: 84px;
  }
  .joystick > span {
    left: 21px;
    top: 21px;
  }
  .result-stats {
    padding: 10px 0;
  }
  .dialog-actions {
    margin-top: 15px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    transition: none !important;
    scroll-behavior: auto !important;
  }
  .upgrade-card:hover,
  .start-button:hover {
    transform: none;
  }
}

.storage-warning {
  margin: 0 0 16px;
  padding: 10px 14px;
  border: 1px solid #817a50;
  border-radius: 8px;
  color: var(--gold);
  font-size: 12px;
  background: #303e30;
}
