:root {
  color-scheme: light;
  --page: #f7f0df;
  --surface: #fffaf0;
  --surface-soft: rgba(246, 232, 200, 0.76);
  --ink: #24170e;
  --muted: #8b6c4d;
  --quiet: #b59872;
  --line: rgba(181, 141, 94, 0.34);
  --line-strong: rgba(136, 93, 55, 0.54);
  --accent: #8f5635;
  --accent-soft: rgba(241, 222, 186, 0.76);
  --accent-ink: #fffaf0;
  --gold: #c19a45;
  --brown: #4a2e1d;
  --paper-grain: rgba(117, 80, 42, 0.045);
  --island: transparent;
  --island-text: #8f7254;
  --green: #4f9d79;
  --red: #d76f4d;
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Serif SC", "Songti SC", "Segoe UI", sans-serif;
}

@font-face {
  font-family: "TianyBrushTitle";
  src: url("./assets/fonts/MaShanZheng-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

body[data-theme="ink"] {
  color-scheme: light;
  --page: #f0e6d1;
  --surface: #fff5e5;
  --surface-soft: rgba(236, 215, 174, 0.72);
  --ink: #1f130a;
  --muted: #76563d;
  --quiet: #9d7b56;
  --line: rgba(151, 107, 66, 0.38);
  --line-strong: rgba(118, 76, 43, 0.58);
  --accent: #74452c;
  --accent-soft: rgba(226, 202, 160, 0.72);
  --accent-ink: #fff8e8;
  --gold: #ae8434;
  --brown: #351f13;
  --paper-grain: rgba(78, 49, 22, 0.052);
  --island-text: #7f6044;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  width: 100%;
  height: 100%;
  min-width: 100vw;
  min-height: 100vh;
  margin: 0;
  overflow: hidden;
  background: var(--page);
  color: var(--ink);
}

button,
input,
select {
  font: inherit;
}

button {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
}

button:disabled {
  cursor: wait;
  opacity: 0.58;
}

input,
select {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--ink);
  padding: 0 11px;
  outline: none;
}

input::placeholder {
  color: var(--quiet);
}

input:focus,
select:focus {
  border-color: var(--line-strong);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}

.entry {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 92px clamp(18px, 5vw, 72px) 48px;
  background: var(--page);
}

.dynamic-island {
  position: fixed;
  top: 18px;
  left: 50%;
  z-index: 20;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px;
  border: 1px solid color-mix(in srgb, var(--island-text) 10%, transparent);
  border-radius: 999px;
  background: var(--island);
  color: var(--island-text);
  box-shadow: 0 18px 44px rgba(24, 21, 14, 0.18);
  transform: translateX(-50%);
}

.island-home,
.island-link,
.island-icon {
  min-height: 34px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  text-decoration: none;
  transition: background 180ms ease, transform 180ms ease, opacity 180ms ease;
}

.island-home,
.island-link {
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.island-icon {
  width: 34px;
  display: inline-grid;
  place-items: center;
  padding: 0;
}

.island-icon svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.island-home:hover,
.island-link:hover,
.island-icon:hover {
  background: color-mix(in srgb, var(--island-text) 12%, transparent);
}

.island-home:active,
.island-link:active,
.island-icon:active,
.home-login-button:active,
.home-guest-button:active,
.primary-button:active,
.ghost-button:active {
  transform: scale(0.96);
}

.entry-shell {
  width: min(820px, 100%);
  display: grid;
  place-items: center;
}

.entry-hero {
  display: grid;
  justify-items: center;
  gap: 18px;
  text-align: center;
}

.eyebrow,
.form-heading p {
  margin: 0;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

.entry-hero h1 {
  margin: 0;
  max-width: 720px;
  color: var(--ink);
  font-size: clamp(54px, 9vw, 104px);
  font-weight: 850;
  line-height: 0.94;
  letter-spacing: 0;
}

.hero-copy {
  width: min(620px, 100%);
  margin: 0;
  color: var(--muted);
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.75;
}

.home-actions {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(132px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.home-login-button,
.home-guest-button {
  min-height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 850;
  white-space: nowrap;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.home-login-button {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--surface);
  box-shadow: 0 16px 34px rgba(22, 19, 12, 0.14);
}

.home-guest-button {
  border-color: var(--line);
  background: var(--surface);
  color: var(--ink);
}

.home-login-button:hover,
.home-guest-button:hover {
  box-shadow: 0 16px 38px rgba(22, 19, 12, 0.16);
}

.principles {
  width: min(660px, 100%);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 4px;
}

.principles span {
  min-height: 86px;
  display: grid;
  align-content: center;
  gap: 7px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.principles b {
  font-size: 15px;
}

.principles em {
  color: var(--quiet);
  font-size: 12px;
  font-style: normal;
  line-height: 1.45;
}

.entry-card {
  position: relative;
  width: min(430px, 100%);
  display: grid;
  gap: 18px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 34px 90px rgba(20, 18, 13, 0.18);
}

.form-heading {
  display: grid;
  gap: 6px;
}

.form-heading h2 {
  margin: 0;
  color: var(--ink);
  font-size: 25px;
  line-height: 1.18;
  letter-spacing: 0;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.entry-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.86fr);
  gap: 10px;
}

.primary-button,
.ghost-button {
  min-height: 42px;
  padding: 0 14px;
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.primary-button {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--surface);
  box-shadow: 0 10px 24px rgba(22, 19, 12, 0.12);
}

.ghost-button {
  border-color: var(--accent-soft);
  background: var(--accent-soft);
  color: var(--accent-ink);
}

.primary-button:hover,
.ghost-button:hover {
  box-shadow: 0 12px 28px rgba(22, 19, 12, 0.16);
}

.entry-status {
  position: relative;
  width: min(420px, 100%);
  min-height: 46px;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  grid-template-rows: auto 2px;
  align-items: center;
  column-gap: 9px;
  row-gap: 6px;
  margin: 0;
  padding: 8px 12px 10px;
  border: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 94%, var(--page) 6%);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  box-shadow: 0 14px 34px rgba(48, 42, 27, 0.1);
  overflow: hidden;
  transform: translateZ(0);
  animation: statusFloat 3.4s ease-in-out infinite;
}

.entry-status::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 0 36%, color-mix(in srgb, var(--accent) 14%, transparent) 48%, transparent 60% 100%);
  opacity: 0.55;
  transform: translateX(-95%);
  animation: statusGlow 2.8s ease-in-out infinite;
  pointer-events: none;
}

.status-icon {
  position: relative;
  z-index: 1;
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent);
  animation: statusPulse 1.25s ease-in-out infinite;
}

.status-icon::before {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--accent) 34%, transparent);
  opacity: 0;
  animation: statusRipple 1.8s ease-out infinite;
}

.status-icon::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 999px;
  background: var(--surface);
  opacity: 0.7;
}

.status-copy {
  position: relative;
  z-index: 1;
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 7px;
  text-align: left;
}

.status-text {
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 850;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-detail {
  color: var(--quiet);
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-detail::before {
  content: "/";
  margin-right: 7px;
  color: var(--line-strong);
}

.status-percent {
  position: relative;
  z-index: 1;
  color: var(--accent);
  min-width: 43px;
  padding: 2px 7px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent-soft) 70%, transparent);
  font-size: 12px;
  font-weight: 900;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.status-track {
  position: relative;
  grid-column: 1 / -1;
  z-index: 1;
  height: 2px;
  border-radius: 999px;
  background: var(--surface-soft);
  overflow: hidden;
}

.status-track span {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--ink));
  transition: width 260ms ease;
}

.status-track span::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.56), transparent);
  animation: statusSweep 1.05s linear infinite;
}

.entry-status[data-ready="true"] .status-icon::before,
.entry-status[data-ready="true"] .status-track span {
  background: var(--accent);
}

.entry-status[data-ready="true"] {
  grid-template-columns: 18px minmax(0, 1fr);
  grid-template-rows: auto;
  padding-right: 14px;
  border-color: color-mix(in srgb, var(--accent) 42%, var(--line));
  background: color-mix(in srgb, var(--accent-soft) 32%, var(--surface) 68%);
  box-shadow: 0 16px 34px rgba(48, 42, 27, 0.12);
}

.entry-status[data-ready="true"]::before {
  opacity: 0;
  animation: none;
}

.entry-status[data-ready="true"] .status-icon {
  animation: completePop 520ms cubic-bezier(0.2, 1.35, 0.34, 1) both;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 12%, transparent);
}

.entry-status[data-ready="true"] .status-icon::before {
  animation: none;
  opacity: 0;
}

.entry-status[data-ready="true"] .status-icon::after {
  content: "";
  inset: 3px;
  width: 6px;
  height: 3px;
  border-radius: 0;
  border-left: 2px solid var(--surface);
  border-bottom: 2px solid var(--surface);
  background: transparent;
  opacity: 1;
  transform: rotate(-45deg) translate(1px, -1px);
}

.entry-status[data-ready="true"] .status-copy {
  display: flex;
  justify-content: center;
}

.entry-status[data-ready="true"] .status-detail,
.entry-status[data-ready="true"] .status-percent,
.entry-status[data-ready="true"] .status-track {
  display: none;
}

.entry-status[data-ready="true"] .status-text {
  color: var(--ink);
  animation: completeText 420ms ease both;
}

.home-entry-status {
  width: min(430px, 100%);
  margin-top: 2px;
}

@keyframes statusPulse {
  0%,
  100% {
    transform: scale(0.9);
    opacity: 0.78;
  }

  50% {
    transform: scale(1.08);
    opacity: 1;
  }
}

@keyframes statusRipple {
  0% {
    transform: scale(0.62);
    opacity: 0.62;
  }

  100% {
    transform: scale(1.65);
    opacity: 0;
  }
}

@keyframes statusFloat {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-2px);
  }
}

@keyframes statusGlow {
  0%,
  38% {
    transform: translateX(-95%);
  }

  100% {
    transform: translateX(95%);
  }
}

@keyframes statusSweep {
  from {
    transform: translateX(-100%);
  }

  to {
    transform: translateX(100%);
  }
}

@keyframes completePop {
  0% {
    transform: scale(0.72);
  }

  62% {
    transform: scale(1.18);
  }

  100% {
    transform: scale(1);
  }
}

@keyframes completeText {
  from {
    opacity: 0;
    transform: translateY(3px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth-panel,
.about-panel {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(17, 15, 11, 0.28);
}

.about-sheet {
  position: relative;
  width: min(520px, 100%);
  display: grid;
  gap: 14px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 34px 90px rgba(20, 18, 13, 0.22);
}

.about-sheet h2 {
  margin: 0;
  font-size: 27px;
  letter-spacing: 0;
}

.about-sheet p {
  margin: 0;
  color: var(--muted);
  line-height: 1.72;
}

.panel-close,
.about-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--ink);
  font-size: 20px;
  line-height: 1;
}

.game {
  position: fixed;
  inset: 0;
  width: 100vw;
  width: 100dvw;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: #050706;
}

#sceneCanvas,
#gameCanvas,
#maskCanvas {
  position: absolute;
  inset: 0;
  width: 100vw;
  width: 100dvw;
  height: 100vh;
  height: 100dvh;
  display: block;
  transform-origin: 0 0;
  contain: strict;
}

#sceneCanvas {
  z-index: 1;
  background: #050706;
  pointer-events: none;
  will-change: transform;
}

#gameCanvas {
  z-index: 2;
  cursor: crosshair;
  touch-action: none;
}

#maskCanvas {
  z-index: 3;
  pointer-events: none;
  will-change: transform;
}

.effect-layer {
  position: absolute;
  inset: 0;
  z-index: 34;
  overflow: hidden;
  pointer-events: none;
}

.fx-toast {
  position: absolute;
  left: 50%;
  top: 18%;
  max-width: min(360px, calc(100vw - 40px));
  padding: 10px 16px;
  border: 1px solid rgba(240, 205, 122, 0.42);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(58, 38, 20, 0.9), rgba(22, 17, 12, 0.86)),
    repeating-linear-gradient(90deg, rgba(255, 230, 170, 0.05) 0 1px, transparent 1px 7px);
  color: #fff2cf;
  font-size: 13px;
  font-weight: 850;
  text-align: center;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.3);
  transform: translate(-50%, 0);
  animation: fxToast 2000ms ease forwards;
}

.fx-toast.is-buy,
.fx-toast.is-order,
.fx-toast.is-stall {
  border-color: rgba(155, 216, 191, 0.46);
  color: #e2fff0;
}

.fx-toast.is-sell,
.fx-toast.is-auction {
  border-color: rgba(240, 205, 122, 0.58);
  color: #fff1c1;
}

.fx-toast.is-fortune,
.fx-toast.is-music {
  border-color: rgba(174, 216, 255, 0.46);
  color: #e7f4ff;
}

.manual-panel {
  position: absolute;
  left: 14px;
  bottom: 14px;
  z-index: 8;
  pointer-events: auto;
}

.map-controls {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 9;
  width: min(278px, calc(100vw - 28px));
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 9px;
  padding: 10px;
  border: 1px solid rgba(255, 226, 158, 0.3);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(36, 24, 14, 0.84), rgba(11, 15, 13, 0.84)),
    repeating-linear-gradient(90deg, rgba(255, 230, 170, 0.045) 0 1px, transparent 1px 7px);
  color: #fff2cf;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(12px);
  pointer-events: auto;
}

.map-zoom-controls {
  display: grid;
  grid-template-columns: repeat(3, 34px);
  gap: 6px;
}

.map-nudge-controls {
  justify-self: end;
  display: grid;
  grid-template-columns: repeat(3, 32px);
  grid-template-rows: repeat(2, 32px);
  gap: 5px;
  grid-template-areas:
    ". up ."
    "left down right";
}

.map-controls button {
  min-width: 0;
  min-height: 32px;
  padding: 0;
  border: 1px solid rgba(255, 226, 158, 0.28);
  border-radius: 7px;
  background: rgba(255, 247, 218, 0.09);
  color: #ffe7a1;
  font-size: 17px;
  font-weight: 900;
  line-height: 1;
}

.map-controls button:hover {
  border-color: rgba(255, 226, 158, 0.58);
  background: rgba(240, 205, 122, 0.16);
  color: #fff5d6;
}

.map-pan-up {
  grid-area: up;
}

.map-pan-left {
  grid-area: left;
}

.map-pan-right {
  grid-area: right;
}

.map-pan-down {
  grid-area: down;
}

.map-control-hints {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
}

.map-control-hints span {
  min-width: 0;
  padding: 5px 6px;
  border: 1px solid rgba(255, 226, 158, 0.14);
  border-radius: 6px;
  background: rgba(255, 247, 218, 0.055);
  color: rgba(255, 242, 207, 0.76);
  font-size: 11px;
  font-weight: 760;
  text-align: center;
  white-space: nowrap;
}

.market-hud {
  position: absolute;
  left: 14px;
  top: 14px;
  z-index: 8;
  width: min(300px, calc(100vw - 28px));
  display: grid;
  gap: 9px;
  padding: 12px;
  border: 1px solid rgba(255, 226, 158, 0.35);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(65, 37, 18, 0.86), rgba(24, 15, 10, 0.82)),
    repeating-linear-gradient(90deg, rgba(255, 230, 170, 0.05) 0 1px, transparent 1px 7px);
  color: #fff2cf;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(12px);
  pointer-events: auto;
}

.market-brand,
.market-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.market-brand span {
  color: #ffe7a1;
  font-size: 15px;
  font-weight: 900;
}

.market-brand strong {
  color: #aef5ca;
  font-size: 13px;
  font-weight: 850;
}

.market-goal {
  color: rgba(255, 242, 207, 0.78);
  font-size: 12px;
  line-height: 1.45;
}

.market-actions button,
.market-panel button {
  border-color: rgba(232, 198, 111, 0.35);
  background: rgba(23, 29, 24, 0.95);
  color: #fff2cf;
}

.market-actions button {
  flex: 1;
  min-height: 32px;
  padding: 0 9px;
  font-size: 12px;
  font-weight: 800;
}

.newbie-guide {
  position: absolute;
  right: 18px;
  top: 88px;
  z-index: 18;
  width: min(360px, calc(100vw - 36px));
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 13px;
  padding: 14px;
  border: 1px solid rgba(235, 199, 128, 0.4);
  border-radius: 8px;
  background:
    repeating-linear-gradient(0deg, rgba(255, 235, 172, 0.04) 0 1px, transparent 1px 8px),
    linear-gradient(135deg, rgba(68, 40, 18, 0.9), rgba(20, 14, 10, 0.84));
  color: #fff2cf;
  box-shadow: 0 20px 58px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(10px);
  pointer-events: auto;
  animation: newbieIn 260ms ease-out;
}

.newbie-guide-visual {
  position: relative;
  min-height: 132px;
  border: 1px solid rgba(238, 195, 116, 0.24);
  border-radius: 7px;
  overflow: hidden;
  background:
    radial-gradient(circle at 68% 34%, rgba(255, 214, 128, 0.18), transparent 20%),
    linear-gradient(145deg, rgba(116, 78, 39, 0.45), rgba(11, 23, 20, 0.5));
}

.guide-path {
  position: absolute;
  left: 18px;
  top: 72px;
  width: 70px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, #ffe6a3, transparent);
  transform: rotate(-22deg);
  animation: guidePath 1500ms ease-in-out infinite;
}

.guide-pin,
.guide-hand,
.guide-lantern {
  position: absolute;
  display: block;
}

.guide-pin {
  width: 14px;
  height: 14px;
  border: 2px solid #ffe6a3;
  border-radius: 999px;
  box-shadow: 0 0 0 0 rgba(255, 230, 163, 0.36);
  animation: guidePulse 1400ms ease-out infinite;
}

.guide-pin-start {
  left: 18px;
  top: 78px;
}

.guide-pin-end {
  right: 18px;
  top: 45px;
  animation-delay: 420ms;
}

.guide-hand {
  left: 38px;
  top: 68px;
  width: 24px;
  height: 24px;
  border: 2px solid rgba(255, 242, 207, 0.82);
  border-radius: 12px 12px 12px 4px;
  transform: rotate(-18deg);
  animation: guideDrag 1800ms ease-in-out infinite;
}

.guide-lantern {
  width: 12px;
  height: 17px;
  border-radius: 7px 7px 9px 9px;
  background: rgba(212, 133, 62, 0.72);
  box-shadow: 0 0 18px rgba(255, 183, 89, 0.38);
}

.guide-lantern-one {
  left: 16px;
  top: 18px;
}

.guide-lantern-two {
  right: 20px;
  bottom: 18px;
}

.newbie-guide-copy {
  display: grid;
  gap: 8px;
}

.newbie-kicker {
  color: #ffe6a3;
  font-size: 12px;
  font-weight: 850;
}

.newbie-guide h2 {
  margin: 0;
  color: #fff2cf;
  font-size: 18px;
  line-height: 1.25;
}

.newbie-guide p {
  margin: 0;
  color: rgba(255, 242, 207, 0.78);
  font-size: 12px;
  line-height: 1.65;
}

.newbie-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.newbie-steps span {
  padding: 3px 7px;
  border: 1px solid rgba(255, 230, 163, 0.25);
  border-radius: 999px;
  color: rgba(255, 242, 207, 0.82);
  font-size: 11px;
}

.newbie-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 7px;
}

.newbie-actions button {
  min-height: 32px;
  border-color: rgba(238, 195, 116, 0.34);
  border-radius: 7px;
  background: #8a5734;
  color: #fffaf0;
  font-size: 12px;
  font-weight: 800;
}

.newbie-actions button:last-child {
  background: transparent;
  color: rgba(255, 242, 207, 0.76);
}

.market-panel {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 36;
  width: min(560px, calc(100vw - 32px));
  max-height: min(680px, calc(100dvh - 48px));
  overflow: auto;
  padding: 22px;
  border: 1px solid rgba(149, 111, 76, 0.42);
  border-radius: 7px;
  background:
    repeating-linear-gradient(0deg, rgba(108, 78, 46, 0.028) 0 1px, transparent 1px 8px),
    repeating-linear-gradient(90deg, rgba(108, 78, 46, 0.018) 0 1px, transparent 1px 11px),
    rgba(238, 220, 183, 0.88);
  color: #28180d;
  box-shadow: 0 24px 72px rgba(46, 29, 15, 0.28);
  transform: translate(-50%, -50%) scale(1);
  animation: guidePanelIn 160ms ease-out;
  backdrop-filter: blur(5px);
  pointer-events: auto;
}

.market-panel[data-panel="guide"] {
  width: min(520px, calc(100vw - 32px));
  padding: 24px;
}

.market-close {
  position: absolute;
  top: 11px;
  right: 12px;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(112, 78, 50, 0.72);
  font-size: 19px;
  font-weight: 300;
  transition: color 140ms ease;
}

.market-close:hover {
  color: rgba(67, 42, 23, 0.96);
}

.market-panel-body {
  display: grid;
  gap: 15px;
}

.market-panel h2,
.market-panel h3,
.market-panel p {
  margin: 0;
}

.market-panel h2 {
  padding-right: 30px;
  color: #4f3826;
  font-size: 22px;
  font-weight: 760;
  letter-spacing: 0;
  line-height: 1.2;
}

.market-panel h3 {
  color: #5b3216;
  font-size: 14px;
}

.market-panel p,
.market-muted {
  color: rgba(116, 85, 58, 0.78);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.85;
}

.market-tags,
.market-row,
.market-trades {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.market-panel[data-panel="guide"] .market-row {
  justify-content: center;
}

.guide-actions {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.guide-actions button:nth-child(1),
.guide-actions button:nth-child(2),
.guide-actions button:nth-child(3) {
  grid-column: span 2;
}

.guide-actions button:nth-child(4),
.guide-actions button:nth-child(5),
.guide-actions button:nth-child(6) {
  grid-column: span 3;
}

.intent-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.intent-card {
  min-height: 76px;
  display: grid;
  place-items: center;
  padding: 12px;
  border: 1px solid rgba(124, 88, 58, 0.22);
  border-radius: 7px;
  background: rgba(255, 249, 232, 0.58);
  color: #5b3d28;
  text-align: center;
}

.intent-card strong {
  color: #4f3826;
  font-size: 21px;
  font-weight: 780;
  font-family: "STFangsong", "FangSong", "Songti SC", "SimSun", serif;
}

.intent-card span {
  color: rgba(86, 62, 42, 0.78);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.65;
}

.intent-card small {
  color: rgba(116, 85, 58, 0.62);
  font-size: 11px;
  line-height: 1.5;
}

.intent-card:hover {
  border-color: rgba(128, 85, 52, 0.42);
  background: rgba(255, 249, 232, 0.62);
}

.custom-intent {
  display: grid;
  gap: 9px;
  padding: 12px;
  border: 1px solid rgba(124, 88, 58, 0.14);
  border-radius: 7px;
  background: rgba(255, 249, 232, 0.34);
}

.custom-intent label {
  color: rgba(91, 61, 40, 0.78);
  font-size: 12px;
  font-weight: 650;
}

.custom-intent > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.custom-intent input {
  min-height: 36px;
  background: rgba(255, 253, 244, 0.72);
}

.reward-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.reward-card {
  min-height: 116px;
  display: grid;
  align-content: start;
  gap: 7px;
  padding: 12px;
  border: 1px solid rgba(124, 88, 58, 0.16);
  border-radius: 7px;
  background: rgba(255, 249, 232, 0.44);
}

.reward-card span {
  color: rgba(116, 85, 58, 0.64);
  font-size: 11px;
}

.reward-card strong {
  color: #4f3826;
  font-size: 17px;
  font-weight: 760;
}

.reward-card small,
.trade-primer small {
  color: rgba(88, 64, 43, 0.72);
  font-size: 12px;
  line-height: 1.65;
}

.trade-primer {
  display: grid;
  gap: 7px;
  padding: 12px 14px;
  border: 1px solid rgba(161, 111, 60, 0.26);
  border-radius: 7px;
  background: rgba(161, 111, 60, 0.09);
}

.trade-primer strong {
  color: #6f4126;
  font-size: 14px;
  font-weight: 820;
}

.market-tag {
  padding: 3px 8px;
  border: 1px solid rgba(86, 50, 23, 0.25);
  border-radius: 999px;
  color: #5b3216;
  font-size: 12px;
}

.title-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.title-card {
  display: grid;
  gap: 5px;
  padding: 10px 12px;
  border: 1px solid rgba(128, 85, 52, 0.22);
  border-radius: 7px;
  background: rgba(255, 249, 232, 0.42);
}

.title-card strong {
  color: #5b3216;
  font-size: 14px;
}

.title-card small {
  color: rgba(91, 61, 40, 0.68);
  line-height: 1.55;
}

.market-card {
  display: grid;
  gap: 7px;
  padding: 10px;
  border: 1px solid rgba(86, 50, 23, 0.18);
  border-radius: 7px;
  background: rgba(255, 249, 225, 0.38);
}

.guide-status-card {
  display: grid;
  gap: 5px;
  padding: 10px 12px;
  border: 1px solid rgba(124, 88, 58, 0.12);
  border-radius: 6px;
  background: rgba(137, 101, 68, 0.075);
}

.guide-status-card strong {
  color: #513927;
  font-size: 14px;
  font-weight: 720;
}

.guide-status-card small {
  color: rgba(116, 85, 58, 0.72);
  font-size: 12px;
  line-height: 1.6;
}

.market-card.is-unlocked,
.market-scene-card {
  border-color: rgba(174, 245, 202, 0.36);
  background: rgba(174, 245, 202, 0.07);
}

.market-card strong {
  color: #27170b;
}

.market-card small {
  color: rgba(48, 29, 14, 0.62);
  line-height: 1.5;
}

.market-panel button {
  min-height: 34px;
  padding: 0 11px;
  border-color: rgba(128, 85, 52, 0.36);
  background: #8a5734;
  color: #fffaf0;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 760;
  transition: transform 140ms ease, background 140ms ease, border-color 140ms ease;
}

.market-panel button:hover {
  background: #75482b;
  transform: translateY(-1px);
}

.market-panel button.guide-secondary {
  background: transparent;
  color: #785336;
  border-color: rgba(120, 83, 54, 0.38);
}

.market-panel button.guide-secondary:hover {
  background: rgba(120, 83, 54, 0.06);
  color: #5d3d26;
}

.market-panel button[data-kind="buy"] {
  color: #aef5ca;
}

.market-panel button[data-kind="sell"] {
  color: #ffdf88;
}

.market-list {
  display: grid;
  gap: 8px;
  max-height: 320px;
  overflow: auto;
}

.codex-list {
  max-height: min(520px, calc(100dvh - 220px));
  gap: 12px;
}

.codex-card {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 13px;
  padding: 12px;
  border: 1px solid rgba(124, 88, 58, 0.18);
  border-radius: 7px;
  background: rgba(255, 249, 232, 0.44);
}

.codex-portrait {
  min-height: 124px;
  display: grid;
  place-items: end center;
  overflow: hidden;
  border: 1px solid rgba(124, 88, 58, 0.14);
  border-radius: 6px;
  background:
    radial-gradient(circle at 50% 20%, rgba(141, 97, 58, 0.08), transparent 58%),
    rgba(244, 228, 195, 0.36);
}

.codex-portrait img {
  max-width: 88px;
  max-height: 124px;
  image-rendering: pixelated;
  object-fit: contain;
}

.codex-portrait span {
  align-self: center;
  color: rgba(87, 60, 39, 0.42);
  font-size: 48px;
  font-weight: 800;
}

.codex-copy {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.codex-copy h3,
.codex-copy p {
  margin: 0;
}

.codex-copy h3 {
  color: #4f3826;
  font-size: 18px;
  font-weight: 760;
}

.codex-copy p,
.codex-copy small {
  color: rgba(86, 62, 42, 0.72);
  font-size: 12px;
  line-height: 1.65;
}

.codex-copy b {
  display: inline-block;
  min-width: 36px;
  color: #5f4028;
  font-weight: 760;
}

.codex-meta {
  color: rgba(116, 85, 58, 0.58) !important;
}

.codex-line {
  color: rgba(93, 63, 39, 0.86) !important;
}

@keyframes guidePanelIn {
  from {
    opacity: 0;
    transform: translate(-50%, -48%) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

.manual-open {
  min-height: 38px;
  padding: 0 15px;
  border: 1px solid rgba(255, 231, 161, 0.34);
  border-radius: 999px;
  background: rgba(8, 10, 9, 0.72);
  color: #ffe7a1;
  font-size: 13px;
  font-weight: 850;
  backdrop-filter: blur(12px);
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.28);
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.manual-open:hover {
  border-color: rgba(255, 231, 161, 0.68);
  background: rgba(8, 10, 9, 0.86);
}

.manual-open:active {
  transform: scale(0.96);
}

.game-manual-panel {
  position: absolute;
  inset: 0;
  z-index: 35;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(5, 7, 6, 0.36);
  backdrop-filter: blur(2px);
}

.game-manual-sheet {
  position: relative;
  width: min(430px, calc(100vw - 32px));
  display: grid;
  gap: 14px;
  padding: 24px;
  border: 1px solid rgba(232, 198, 111, 0.34);
  border-radius: 8px;
  background: rgba(8, 10, 9, 0.94);
  color: #fff2cf;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
}

.game-manual-sheet h2 {
  margin: 0;
  font-size: 26px;
  letter-spacing: 0;
}

.game-manual-grid {
  display: grid;
  grid-template-columns: minmax(104px, auto) 1fr;
  gap: 10px 14px;
  align-items: center;
  color: rgba(255, 242, 207, 0.66);
  line-height: 1.38;
}

.game-manual-grid strong {
  color: #fff2cf;
  font-weight: 800;
}

.dialog {
  position: absolute;
  z-index: 32;
  left: 50%;
  bottom: 20px;
  width: min(920px, calc(100vw - 32px));
  transform: translateX(-50%);
  min-height: 176px;
  display: grid;
  grid-template-columns: 142px 1fr;
  gap: 14px;
  padding: 14px;
  border: 2px solid rgba(124, 75, 35, 0.82);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(74, 43, 22, 0.9), rgba(25, 16, 11, 0.9)),
    repeating-linear-gradient(90deg, rgba(255, 218, 147, 0.06) 0 1px, transparent 1px 8px);
  color: #fff1d4;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
  pointer-events: auto;
}

.npc-portrait {
  position: relative;
  min-height: 148px;
  display: grid;
  place-items: end center;
  overflow: hidden;
  border: 1px solid rgba(239, 199, 126, 0.28);
  border-radius: 7px;
  background:
    radial-gradient(circle at 50% 20%, rgba(255, 214, 128, 0.16), transparent 58%),
    linear-gradient(180deg, rgba(33, 23, 15, 0.35), rgba(5, 7, 6, 0.24));
}

.npc-portrait img {
  max-width: 124px;
  max-height: 164px;
  image-rendering: pixelated;
  object-fit: contain;
  transform-origin: bottom center;
}

.dialog[data-speaking="true"] .npc-portrait img,
.dialog[data-speaking="true"] .npc-portrait span {
  animation: npcSpeak 1300ms ease-in-out infinite;
}

.npc-portrait span {
  color: rgba(255, 226, 158, 0.78);
  font-size: 64px;
  font-weight: 900;
  align-self: center;
}

.npc-dialog-main {
  min-width: 0;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 8px;
}

.npc-dialog-header {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding-right: 36px;
}

.dialog strong {
  color: #ffe6a3;
  font-size: 20px;
}

#dialogSubtitle {
  color: rgba(255, 241, 212, 0.58);
  font-size: 12px;
}

.npc-dialog-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(238, 195, 116, 0.24);
  border-radius: 999px;
  background: rgba(15, 9, 6, 0.36);
  color: #ffe6a3;
}

.dialog p {
  min-height: 62px;
  margin: 0;
  color: rgba(255, 241, 212, 0.88);
  line-height: 1.72;
  white-space: pre-line;
}

#dialogOptions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

#dialogOptions button {
  min-height: 36px;
  padding: 0 16px;
  border-color: rgba(238, 195, 116, 0.4);
  border-radius: 6px;
  background:
    linear-gradient(180deg, rgba(96, 58, 29, 0.96), rgba(48, 28, 15, 0.98));
  color: #fff2cf;
  box-shadow: inset 0 1px 0 rgba(255, 234, 180, 0.12), 0 8px 18px rgba(0, 0, 0, 0.18);
}

#dialogOptions button:hover {
  border-color: rgba(255, 226, 158, 0.72);
}

@keyframes npcSpeak {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-3px) scale(1.018);
  }
}

@keyframes fxToast {
  0% {
    opacity: 0;
    transform: translate(-50%, 12px) scale(0.96);
  }
  14%,
  76% {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -22px) scale(0.98);
  }
}

@keyframes newbieIn {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes guidePulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 230, 163, 0.34);
    transform: scale(0.92);
  }
  80% {
    box-shadow: 0 0 0 18px rgba(255, 230, 163, 0);
    transform: scale(1.06);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 230, 163, 0);
    transform: scale(0.92);
  }
}

@keyframes guideDrag {
  0%,
  100% {
    transform: translate(0, 0) rotate(-18deg);
  }
  50% {
    transform: translate(38px, -22px) rotate(-18deg);
  }
}

@keyframes guidePath {
  0%,
  100% {
    opacity: 0.35;
    transform: rotate(-22deg) scaleX(0.72);
  }
  50% {
    opacity: 0.95;
    transform: rotate(-22deg) scaleX(1);
  }
}

.entry {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 84px clamp(24px, 6vw, 82px) 42px;
  background:
    radial-gradient(ellipse at 50% 44%, rgba(255, 251, 239, 0.88), rgba(250, 241, 221, 0.45) 44%, rgba(238, 222, 190, 0.36) 78%),
    linear-gradient(180deg, rgba(252, 247, 235, 0.94), rgba(239, 224, 195, 0.9)),
    #f4ead6;
  overflow: hidden;
}

.entry::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image:
    radial-gradient(rgba(119, 87, 54, 0.035) 0.55px, transparent 0.8px),
    repeating-linear-gradient(90deg, rgba(132, 97, 61, 0.018) 0 1px, transparent 1px 18px),
    linear-gradient(0deg, rgba(255, 255, 255, 0.24), transparent 34% 70%, rgba(255, 255, 255, 0.18));
  background-size: 17px 17px, 100% 100%, 100% 100%;
  opacity: 0.52;
  pointer-events: none;
}

.entry::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(180deg, rgba(248, 240, 221, 0.28) 0%, rgba(248, 240, 221, 0.06) 38%, rgba(248, 240, 221, 0.52) 88%),
    url("./assets/home/changan-silhouette.svg?v=20260501g") center bottom / cover no-repeat;
  filter: blur(0.6px);
  opacity: 0.96;
  pointer-events: none;
}

.entry-ambient {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.entry-ambient::before {
  content: "";
  position: absolute;
  inset: 12% -10% 0;
  background:
    radial-gradient(ellipse at 50% 38%, rgba(255, 252, 242, 0.72), transparent 42%),
    linear-gradient(180deg, rgba(246, 238, 222, 0.1), rgba(246, 238, 222, 0.9) 72%);
  filter: blur(24px);
}

.ambient-glow {
  position: absolute;
  width: 72px;
  height: 72px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(186, 126, 57, 0.11), rgba(186, 126, 57, 0.035) 34%, transparent 70%);
  filter: blur(15px);
  opacity: 0.38;
  animation: lanternFloat 14s ease-in-out infinite;
}

.glow-one {
  left: 17%;
  top: 38%;
}

.glow-two {
  right: 19%;
  top: 43%;
  width: 58px;
  height: 58px;
  animation-duration: 17s;
  animation-delay: -5s;
}

.ambient-petal {
  display: none;
}

.petal-one {
  left: 28%;
  top: -24px;
}

.petal-two {
  left: 68%;
  top: -38px;
  width: 8px;
  height: 12px;
  background: rgba(255, 249, 240, 0.62);
  animation-duration: 29s;
  animation-delay: -12s;
}

.dynamic-island {
  position: fixed;
  top: 26px;
  left: 50%;
  z-index: 20;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 22px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  box-shadow: none;
  transform: translateX(-50%);
}

.island-home,
.island-link,
.island-icon {
  min-height: 32px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0;
  white-space: nowrap;
  transition: color 180ms ease;
}

.island-home {
  color: var(--brown);
  font-weight: 800;
}

.island-link:hover,
.island-home:hover {
  background: transparent;
  color: var(--brown);
}

.island-icon {
  width: 32px;
  display: inline-grid;
  place-items: center;
}

.island-icon:hover {
  background: transparent;
  color: var(--brown);
}

.island-icon svg {
  grid-area: 1 / 1;
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.theme-sun {
  display: none;
}

body[data-theme="ink"] .theme-moon {
  display: none;
}

body[data-theme="ink"] .theme-sun {
  display: block;
}

.entry-shell {
  position: relative;
  z-index: 1;
  width: min(980px, 100%);
  display: grid;
  place-items: center;
}

.entry-shell::before {
  content: "";
  position: absolute;
  inset: -42px max(-42px, -4vw) -34px;
  z-index: -1;
  background:
    radial-gradient(ellipse at 50% 42%, rgba(255, 249, 234, 0.84), rgba(255, 249, 234, 0.46) 45%, transparent 72%);
  filter: blur(4px);
  pointer-events: none;
}

.entry-hero {
  width: 100%;
  display: grid;
  justify-items: center;
  gap: 0;
  text-align: center;
}

.eyebrow,
.form-heading p {
  margin: 0;
  color: #b0784b;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0;
}

.entry-hero h1 {
  position: relative;
  isolation: isolate;
  margin: 38px 0 0;
  color: #24150e;
  font-size: clamp(72px, 10.5vw, 128px);
  font-weight: 400;
  font-family: "TianyBrushTitle", "KaiTi", "STKaiti", "Kaiti SC", "STFangsong", "FangSong", serif;
  font-synthesis: none;
  line-height: 0.9;
  letter-spacing: 0;
  -webkit-text-fill-color: currentColor;
  text-shadow:
    0 1px 0 rgba(255, 248, 226, 0.22),
    0 18px 54px rgba(55, 28, 14, 0.18);
}

.entry-hero h1::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 48%;
  z-index: -1;
  width: min(650px, 118%);
  height: 1.05em;
  background:
    radial-gradient(ellipse at 22% 50%, rgba(34, 22, 13, 0.12), transparent 30%),
    radial-gradient(ellipse at 58% 48%, rgba(91, 54, 25, 0.1), transparent 38%),
    radial-gradient(ellipse at 84% 54%, rgba(31, 20, 12, 0.08), transparent 30%);
  filter: blur(18px);
  opacity: 0.46;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.entry-hero h1::after {
  content: none;
}

.hero-copy {
  width: min(700px, 100%);
  margin: 36px 0 0;
  color: var(--muted);
  font-size: clamp(15px, 1.7vw, 18px);
  font-weight: 300;
  font-family: "STFangsong", "FangSong", "Songti SC", "SimSun", serif;
  line-height: 2.05;
}

.feature-cards {
  width: min(840px, 100%);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 48px;
}

.feature-card {
  min-height: 128px;
  display: grid;
  align-content: start;
  gap: 13px;
  padding: 22px 20px 20px;
  border: 1px solid rgba(170, 128, 79, 0.34);
  border-radius: 7px;
  background: color-mix(in srgb, var(--surface-soft) 78%, rgba(255, 250, 238, 0.28));
  backdrop-filter: blur(2px);
  text-align: left;
  transition: transform 180ms ease, border-color 180ms ease;
}

.feature-card:hover {
  border-color: rgba(136, 91, 49, 0.52);
  transform: translateY(-3px);
}

.feature-card h2 {
  margin: 0;
  color: var(--brown);
  font-size: 17px;
  font-weight: 650;
  font-family: "STFangsong", "FangSong", "Songti SC", "SimSun", serif;
  line-height: 1.35;
}

.feature-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 300;
  font-family: "STFangsong", "FangSong", "Songti SC", "SimSun", serif;
  line-height: 1.82;
}

.home-actions {
  display: inline-grid;
  grid-template-columns: repeat(2, auto);
  gap: 12px;
  margin-top: 34px;
}

.home-login-button,
.home-guest-button {
  min-width: 116px;
  min-height: 38px;
  padding: 0 20px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0;
  white-space: nowrap;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.home-login-button {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: none;
}

.home-guest-button {
  border-color: rgba(143, 114, 84, 0.42);
  background: transparent;
  color: var(--muted);
}

.home-login-button:hover,
.home-guest-button:hover {
  box-shadow: none;
  transform: translateY(-1px);
}

.home-login-button:active,
.home-guest-button:active,
.primary-button:active,
.ghost-button:active {
  transform: translateY(0);
}

.entry-hint {
  margin: 13px 0 0;
  color: rgba(143, 114, 84, 0.56);
  font-size: 12px;
  font-weight: 300;
  line-height: 1.8;
}

.entry-status {
  position: relative;
  width: min(420px, 100%);
  min-height: auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto 4px;
  align-items: center;
  column-gap: 16px;
  row-gap: 9px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  box-shadow: none;
  overflow: visible;
  transform: none;
  animation: none;
}

.entry-status::before,
.status-icon,
.status-detail,
.status-detail::before,
.status-track span::after {
  display: none;
}

.status-copy {
  position: relative;
  z-index: 1;
  min-width: 0;
  display: block;
  text-align: left;
}

.status-text {
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-percent {
  position: relative;
  z-index: 1;
  min-width: 42px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: var(--gold);
  font-size: 12px;
  font-weight: 500;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.status-track {
  position: relative;
  grid-column: 1 / -1;
  z-index: 1;
  height: 4px;
  border-radius: 999px;
  background: #f1e4c6;
  overflow: hidden;
}

.status-track span {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  border-radius: inherit;
  background: var(--gold);
  transition: width 260ms ease;
}

.entry-status[data-ready="true"] {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.entry-status[data-ready="true"] .status-copy {
  display: block;
  text-align: center;
}

.entry-status[data-ready="true"] .status-text {
  color: var(--muted);
  animation: none;
}

.entry-status[data-ready="true"] .status-percent,
.entry-status[data-ready="true"] .status-track {
  display: none;
}

.home-entry-status {
  width: min(420px, 100%);
  margin-top: 22px;
}

.entry-card {
  position: relative;
  width: min(430px, 100%);
  display: grid;
  gap: 18px;
  padding: 28px;
  border: 1px solid rgba(170, 128, 79, 0.32);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 28px 80px rgba(69, 44, 24, 0.16);
}

.form-heading {
  display: grid;
  gap: 8px;
}

.form-heading h2 {
  margin: 0;
  color: var(--ink);
  font-size: 25px;
  line-height: 1.18;
  letter-spacing: 0;
}

.primary-button,
.ghost-button {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 650;
  white-space: nowrap;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.primary-button {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: none;
}

.ghost-button {
  border-color: rgba(143, 114, 84, 0.42);
  background: transparent;
  color: var(--muted);
}

.primary-button:hover,
.ghost-button:hover {
  box-shadow: none;
}

.auth-panel,
.about-panel {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(48, 35, 23, 0.16);
}

.about-sheet {
  position: relative;
  width: min(560px, 100%);
  display: grid;
  gap: 16px;
  padding: 30px;
  border: 1px solid rgba(170, 128, 79, 0.32);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 28px 80px rgba(69, 44, 24, 0.16);
}

.about-sheet h2 {
  margin: 0;
  font-size: 27px;
  font-weight: 800;
  letter-spacing: 0;
}

.about-sheet p {
  margin: 0;
  color: var(--muted);
  font-weight: 300;
  line-height: 1.9;
}

.panel-close,
.about-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--quiet);
  font-size: 18px;
  line-height: 1;
}

.entry-ambient::after {
  content: "";
  position: absolute;
  inset: -8% -12% -4%;
  background:
    radial-gradient(ellipse at 8% 22%, rgba(48, 50, 39, 0.14) 0 10%, transparent 28%),
    radial-gradient(ellipse at 88% 18%, rgba(66, 57, 42, 0.12) 0 8%, transparent 25%),
    linear-gradient(112deg, transparent 0 18%, rgba(39, 46, 41, 0.08) 19% 21%, transparent 24% 100%),
    linear-gradient(22deg, transparent 0 63%, rgba(36, 42, 37, 0.09) 64% 66%, transparent 70% 100%);
  filter: blur(20px);
  mix-blend-mode: multiply;
  opacity: 0.5;
}

.feature-card,
.entry-card,
.about-sheet {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.42), 0 22px 70px rgba(61, 45, 26, 0.1);
}

.feature-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    linear-gradient(120deg, rgba(30, 38, 34, 0.08), transparent 38%),
    radial-gradient(ellipse at 98% 12%, rgba(89, 71, 46, 0.12), transparent 38%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.feature-card {
  position: relative;
  overflow: hidden;
}

.feature-card:hover::before {
  opacity: 1;
}

.island-icon {
  width: 46px;
  height: 34px;
  border-radius: 999px;
  transition: color 180ms ease, background 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.island-icon svg {
  width: 22px;
  height: 22px;
  stroke-width: 1.9;
}

body[data-theme="light"] .island-icon {
  background:
    radial-gradient(circle at 68% 34%, rgba(255, 255, 255, 0.72) 0 8%, transparent 9%),
    linear-gradient(135deg, rgba(28, 37, 45, 0.92), rgba(62, 75, 83, 0.86));
  color: #f5f8ff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 10px 28px rgba(28, 34, 40, 0.18);
}

body[data-theme="ink"] .island-icon {
  background:
    radial-gradient(circle at 66% 34%, rgba(255, 239, 174, 0.95) 0 12%, transparent 13%),
    linear-gradient(135deg, #f5c66c, #fff1bd);
  color: #8a4c18;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.44), 0 10px 28px rgba(181, 113, 35, 0.22);
}

.island-music {
  min-height: 30px;
  padding: 0 13px;
  border: 1px solid rgba(145, 108, 69, 0.2);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 250, 231, 0.52), rgba(230, 211, 176, 0.24)),
    radial-gradient(ellipse at 50% 0%, rgba(187, 136, 72, 0.12), transparent 62%);
  color: rgba(100, 72, 48, 0.82);
  font-family: "STFangsong", "FangSong", "Songti SC", "SimSun", serif;
  font-weight: 850;
  letter-spacing: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.34);
}

.island-music:hover {
  border-color: rgba(145, 108, 69, 0.34);
  background:
    linear-gradient(180deg, rgba(255, 250, 231, 0.66), rgba(230, 211, 176, 0.34)),
    radial-gradient(ellipse at 50% 0%, rgba(187, 136, 72, 0.16), transparent 62%);
  color: var(--brown);
}

.island-music.is-home-audio-on {
  border-color: rgba(152, 114, 67, 0.4);
  background:
    linear-gradient(180deg, rgba(239, 219, 177, 0.62), rgba(197, 162, 106, 0.32)),
    radial-gradient(ellipse at 50% 0%, rgba(255, 246, 208, 0.36), transparent 64%);
  color: #7b4e26;
}

.island-music.is-home-audio-blocked {
  border-color: rgba(152, 114, 67, 0.28);
  color: rgba(100, 72, 48, 0.68);
}

body[data-theme="ink"] .entry {
  background:
    radial-gradient(ellipse at 50% 34%, rgba(69, 75, 72, 0.52), transparent 45%),
    linear-gradient(180deg, #17211f 0%, #2f332a 56%, #d8c7a4 100%);
}

body[data-theme="ink"] .entry::before {
  background-image:
    radial-gradient(rgba(238, 225, 190, 0.06) 0.6px, transparent 0.9px),
    repeating-linear-gradient(90deg, rgba(238, 225, 190, 0.035) 0 1px, transparent 1px 18px),
    linear-gradient(0deg, rgba(255, 244, 212, 0.08), transparent 28% 74%, rgba(255, 244, 212, 0.06));
  opacity: 0.78;
}

body[data-theme="ink"] .entry::after {
  background:
    linear-gradient(180deg, rgba(12, 18, 18, 0.24) 0%, rgba(20, 27, 25, 0.08) 36%, rgba(232, 208, 161, 0.3) 88%),
    url("./assets/home/changan-silhouette.svg") center bottom / cover no-repeat;
  filter: blur(1.2px) saturate(0.82) contrast(1.06);
  opacity: 0.9;
}

body[data-theme="ink"] .entry-shell::before {
  background: radial-gradient(ellipse at 50% 42%, rgba(22, 29, 27, 0.72), rgba(22, 29, 27, 0.36) 48%, transparent 74%);
}

body[data-theme="ink"] .entry-hero h1 {
  color: #efd89d;
  -webkit-text-fill-color: currentColor;
  text-shadow:
    0 24px 72px rgba(0, 0, 0, 0.34),
    0 1px 0 rgba(255, 247, 220, 0.18);
}

body[data-theme="ink"] .entry-hero h1::before {
  background:
    radial-gradient(ellipse at 18% 48%, rgba(255, 226, 156, 0.14), transparent 28%),
    radial-gradient(ellipse at 54% 50%, rgba(255, 214, 128, 0.12), transparent 36%),
    radial-gradient(ellipse at 84% 54%, rgba(255, 244, 210, 0.1), transparent 28%);
  opacity: 0.86;
}

body[data-theme="ink"] .eyebrow,
body[data-theme="ink"] .hero-copy,
body[data-theme="ink"] .entry-hint,
body[data-theme="ink"] .status-text,
body[data-theme="ink"] .status-percent {
  color: rgba(250, 238, 205, 0.82);
}

body[data-theme="ink"] .feature-card {
  border-color: rgba(229, 202, 140, 0.2);
  background: rgba(21, 29, 27, 0.58);
  backdrop-filter: blur(8px);
}

body[data-theme="ink"] .feature-card h2 {
  color: #f0d9a0;
}

body[data-theme="ink"] .feature-card p {
  color: rgba(244, 231, 199, 0.72);
}

.game {
  --game-paper: rgba(248, 240, 218, 0.96);
  --game-paper-soft: rgba(253, 247, 229, 0.7);
  --game-ink: #15231f;
  --game-ink-deep: #09100f;
  --game-text: #f8eed8;
  --game-muted: rgba(228, 213, 181, 0.74);
  --game-faint: rgba(228, 213, 181, 0.54);
  --game-line: rgba(220, 188, 118, 0.32);
  --game-accent: #d5ad61;
  --game-accent-strong: #f0cd7a;
  --game-jade: #9bd8bf;
  background: #07100e;
}

.game::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 4;
  background:
    radial-gradient(ellipse at 18% 18%, rgba(236, 218, 168, 0.07), transparent 32%),
    radial-gradient(ellipse at 82% 8%, rgba(139, 187, 170, 0.06), transparent 30%),
    linear-gradient(180deg, rgba(5, 10, 9, 0.08), transparent 24%, rgba(5, 10, 9, 0.18));
  pointer-events: none;
}

.market-hud {
  width: min(368px, calc(100vw - 28px));
  gap: 11px;
  padding: 14px;
  border: 1px solid var(--game-line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(26, 38, 34, 0.9), rgba(9, 16, 15, 0.88)),
    repeating-linear-gradient(120deg, rgba(238, 216, 158, 0.055) 0 1px, transparent 1px 10px);
  color: var(--game-text);
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255, 244, 214, 0.08);
  backdrop-filter: blur(14px) saturate(1.08);
}

.market-brand span {
  color: var(--game-accent-strong);
  font-family: "STFangsong", "FangSong", "Songti SC", "SimSun", serif;
  font-size: 17px;
  font-weight: 800;
}

.market-brand strong {
  padding: 3px 8px;
  border: 1px solid rgba(155, 216, 191, 0.22);
  border-radius: 999px;
  background: rgba(155, 216, 191, 0.1);
  color: var(--game-jade);
  font-size: 12px;
  font-weight: 760;
}

.market-goal {
  color: var(--game-muted);
  font-size: 12px;
  line-height: 1.65;
}

.mood-meter {
  display: grid;
  gap: 7px;
  padding: 8px;
  border: 1px solid rgba(230, 199, 119, 0.18);
  border-radius: 7px;
  background: rgba(255, 248, 224, 0.055);
}

.mood-meter-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--game-faint);
  font-size: 11px;
  font-weight: 760;
}

.mood-meter-head strong {
  color: #c5f1df;
  font-size: 12px;
  white-space: nowrap;
}

.mood-track {
  position: relative;
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.28);
}

.mood-track span {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, #8c5937, #d6ab5d 55%, #9bd8bf);
  box-shadow: 0 0 18px rgba(155, 216, 191, 0.28);
  transition: width 420ms ease;
}

.market-progress {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.market-progress span {
  min-width: 0;
  padding: 5px 6px;
  border: 1px solid rgba(230, 199, 119, 0.18);
  border-radius: 6px;
  background: rgba(255, 248, 224, 0.06);
  color: var(--game-faint);
  font-size: 11px;
  font-weight: 760;
  text-align: center;
  white-space: nowrap;
}

.market-progress span.is-complete {
  border-color: rgba(155, 216, 191, 0.42);
  background: rgba(155, 216, 191, 0.16);
  color: #c5f1df;
}

.director-panel {
  min-width: 0;
}

.director-open {
  width: 100%;
  min-height: 44px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
  padding: 8px 9px;
  border: 1px solid rgba(240, 205, 122, 0.26);
  border-radius: 6px;
  background:
    linear-gradient(180deg, rgba(255, 248, 224, 0.075), rgba(255, 248, 224, 0.035)),
    repeating-linear-gradient(120deg, rgba(255, 230, 170, 0.04) 0 1px, transparent 1px 8px);
  color: #fff2cf;
  text-align: left;
}

.director-open:hover {
  border-color: rgba(240, 205, 122, 0.54);
  background:
    linear-gradient(180deg, rgba(255, 248, 224, 0.12), rgba(255, 248, 224, 0.055)),
    repeating-linear-gradient(120deg, rgba(255, 230, 170, 0.055) 0 1px, transparent 1px 8px);
}

.director-open span {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.director-open b {
  color: #ffe7a1;
  font-size: 12px;
  font-weight: 900;
}

.director-open small {
  min-width: 0;
  overflow: hidden;
  color: rgba(255, 242, 207, 0.7);
  font-size: 11px;
  font-weight: 760;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.director-open i,
.director-route-hero i {
  position: relative;
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.24);
}

.director-open em,
.director-route-hero b {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, #d7a85e, #aee8d4);
  box-shadow: 0 0 16px rgba(174, 232, 212, 0.28);
  transition: width 360ms ease;
}

.director-route-hero {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(240, 205, 122, 0.22);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(48, 78, 65, 0.16), rgba(129, 82, 39, 0.12)),
    repeating-linear-gradient(120deg, rgba(99, 72, 34, 0.06) 0 1px, transparent 1px 9px);
}

.director-route-hero div {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.director-route-hero span {
  color: #9b7b3d;
  font-size: 11px;
  font-weight: 850;
}

.director-route-hero strong {
  color: #20352f;
  font-size: 16px;
  line-height: 1.35;
}

.director-route-hero small {
  color: rgba(35, 49, 43, 0.72);
  font-size: 12px;
  line-height: 1.55;
}

.director-route-list {
  display: grid;
  gap: 8px;
}

.director-route-card {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(43, 74, 63, 0.12);
  border-radius: 8px;
  background: rgba(255, 253, 244, 0.48);
}

.director-route-card > span {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(43, 74, 63, 0.18);
  border-radius: 999px;
  background: rgba(43, 74, 63, 0.06);
  color: #35534a;
  font-size: 12px;
  font-weight: 900;
}

.director-route-card > div {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.director-route-card strong {
  color: #20352f;
  font-size: 14px;
}

.director-route-card small {
  color: rgba(35, 49, 43, 0.68);
  line-height: 1.55;
}

.director-route-card > em {
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(43, 74, 63, 0.07);
  color: rgba(35, 49, 43, 0.6);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
  white-space: nowrap;
}

.director-route-card.is-current {
  border-color: rgba(143, 94, 50, 0.28);
  background:
    linear-gradient(180deg, rgba(255, 249, 229, 0.86), rgba(239, 221, 185, 0.54));
}

.director-route-card.is-current > span,
.director-route-card.is-current > em {
  background: rgba(151, 84, 42, 0.13);
  color: #8d5c31;
}

.director-route-card.is-complete {
  border-color: rgba(75, 132, 98, 0.22);
}

.director-route-card.is-complete > span,
.director-route-card.is-complete > em {
  background: rgba(75, 132, 98, 0.13);
  color: #3f765a;
}

.market-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.market-actions button {
  min-height: 32px;
  padding: 0 7px;
  border-color: rgba(230, 199, 119, 0.2);
  border-radius: 6px;
  background: rgba(255, 247, 218, 0.08);
  color: rgba(250, 238, 205, 0.88);
  font-size: 12px;
  font-weight: 760;
}

.market-actions button:hover {
  border-color: rgba(240, 205, 122, 0.48);
  background: rgba(240, 205, 122, 0.14);
  color: #fff5d6;
}

.manual-open {
  border-color: rgba(230, 199, 119, 0.28);
  background: rgba(14, 22, 20, 0.78);
  color: var(--game-accent-strong);
}

.map-controls {
  border-color: rgba(230, 199, 119, 0.28);
  background:
    linear-gradient(135deg, rgba(38, 30, 20, 0.9), rgba(11, 18, 16, 0.88)),
    repeating-linear-gradient(120deg, rgba(238, 216, 158, 0.05) 0 1px, transparent 1px 9px);
  color: var(--game-text);
}

.map-controls button {
  border-color: rgba(230, 199, 119, 0.22);
  background: rgba(255, 248, 224, 0.08);
  color: var(--game-accent-strong);
}

.map-controls button:hover {
  border-color: rgba(240, 205, 122, 0.52);
  background: rgba(240, 205, 122, 0.16);
}

.map-control-hints span {
  border-color: rgba(230, 199, 119, 0.14);
  background: rgba(255, 248, 224, 0.055);
  color: var(--game-faint);
}

.market-panel {
  isolation: isolate;
  padding: 24px;
  border: 1px solid rgba(126, 105, 65, 0.3);
  background:
    linear-gradient(180deg, rgba(255, 250, 233, 0.992), rgba(240, 228, 201, 0.982)),
    repeating-linear-gradient(0deg, rgba(35, 45, 39, 0.032) 0 1px, transparent 1px 8px);
  color: #1f2d29;
  box-shadow: 0 26px 86px rgba(12, 18, 16, 0.32);
  backdrop-filter: blur(4px);
}

.market-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  background:
    radial-gradient(ellipse at 8% 0%, rgba(31, 45, 41, 0.12), transparent 36%),
    radial-gradient(ellipse at 96% 18%, rgba(133, 90, 44, 0.1), transparent 32%),
    linear-gradient(110deg, transparent 0 68%, rgba(28, 42, 38, 0.06) 70% 72%, transparent 76% 100%);
  pointer-events: none;
}

.market-panel-body {
  position: relative;
  z-index: 1;
}

.market-close {
  position: absolute;
  z-index: 2;
}

.market-panel h2 {
  color: #20352f;
  font-family: "STFangsong", "FangSong", "Songti SC", "SimSun", serif;
  font-size: 25px;
  font-weight: 850;
}

.market-panel h3 {
  color: #385448;
  font-size: 14px;
  font-weight: 850;
}

.market-panel p,
.market-muted {
  color: rgba(42, 54, 47, 0.72);
  font-size: 12.5px;
  line-height: 1.9;
}

.market-notice {
  padding: 9px 11px;
  border: 1px solid rgba(158, 86, 54, 0.18);
  border-radius: 7px;
  background: rgba(158, 86, 54, 0.07);
  color: #7e3d2f !important;
}

.intent-card,
.custom-intent,
.reward-card,
.trade-primer,
.market-card,
.guide-status-card,
.codex-card {
  border-color: rgba(35, 54, 47, 0.14);
  background:
    linear-gradient(180deg, rgba(255, 253, 244, 0.68), rgba(246, 237, 212, 0.52)),
    radial-gradient(ellipse at 100% 0%, rgba(37, 55, 49, 0.08), transparent 36%);
}

.intent-card strong,
.reward-card strong,
.guide-status-card strong,
.market-card strong,
.codex-copy h3 {
  color: #20352f;
}

.intent-card span,
.intent-card small,
.reward-card small,
.trade-primer small,
.market-card small,
.guide-status-card small,
.codex-copy p,
.codex-copy small {
  color: rgba(43, 55, 48, 0.68);
}

.market-tag {
  border-color: rgba(43, 74, 63, 0.2);
  background: rgba(43, 74, 63, 0.06);
  color: #375d50;
}

.market-card.is-unlocked,
.market-scene-card {
  border-color: rgba(49, 128, 95, 0.28);
  background: rgba(81, 151, 112, 0.1);
}

.market-panel button {
  border-color: rgba(36, 59, 51, 0.24);
  background: #25483e;
  color: #fff7df;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.market-panel button:hover {
  background: #1c3c34;
}

.market-panel button.guide-secondary {
  border-color: rgba(36, 59, 51, 0.22);
  background: rgba(255, 255, 255, 0.18);
  color: #31584c;
}

.market-panel button.guide-secondary:hover {
  background: rgba(49, 88, 76, 0.08);
  color: #1e4037;
}

.market-panel button[data-kind="buy"] {
  border-color: rgba(49, 128, 95, 0.28);
  background: #2c6756;
  color: #e8fff3;
}

.market-panel button[data-kind="sell"] {
  border-color: rgba(160, 104, 44, 0.3);
  background: #8d5c31;
  color: #fff1cc;
}

.market-panel button.intent-card {
  border-color: rgba(35, 54, 47, 0.16);
  background:
    linear-gradient(180deg, rgba(255, 253, 244, 0.76), rgba(238, 226, 197, 0.58)),
    radial-gradient(ellipse at 100% 0%, rgba(37, 55, 49, 0.08), transparent 36%);
  color: #20352f;
  box-shadow: none;
}

.market-panel button.intent-card:hover {
  border-color: rgba(37, 72, 61, 0.34);
  background:
    linear-gradient(180deg, rgba(255, 253, 244, 0.92), rgba(235, 223, 193, 0.72)),
    radial-gradient(ellipse at 100% 0%, rgba(37, 55, 49, 0.12), transparent 36%);
}

.market-panel button.intent-card strong {
  color: #20352f;
}

.market-panel button.is-selected {
  border-color: rgba(49, 128, 95, 0.38);
  background: rgba(49, 88, 76, 0.14);
  color: #20352f;
}

.market-panel button:disabled {
  cursor: default;
  opacity: 0.58;
  transform: none;
}

.market-actions button.is-open {
  border-color: rgba(155, 216, 191, 0.36);
  background: rgba(155, 216, 191, 0.12);
  color: #d8f7e9;
}

.market-actions button.is-alert {
  border-color: rgba(240, 205, 122, 0.62);
  background: rgba(240, 205, 122, 0.2);
  color: #fff4cf;
  box-shadow: 0 0 0 3px rgba(240, 205, 122, 0.08);
}

.market-actions button.is-audio-on {
  border-color: rgba(174, 216, 255, 0.52);
  background: rgba(75, 121, 132, 0.2);
  color: #e7f4ff;
}

.market-actions #audioToggleButton {
  position: relative;
  overflow: hidden;
  border-color: rgba(219, 172, 82, 0.68);
  background:
    radial-gradient(ellipse at 50% 0%, rgba(255, 232, 160, 0.28), transparent 58%),
    linear-gradient(180deg, rgba(116, 54, 34, 0.95), rgba(73, 37, 28, 0.96));
  color: #ffe7ae;
  font-family: "STFangsong", "FangSong", "Songti SC", "SimSun", serif;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
  box-shadow:
    inset 0 1px 0 rgba(255, 245, 203, 0.2),
    0 0 0 1px rgba(58, 32, 22, 0.32),
    0 8px 18px rgba(28, 16, 10, 0.2);
}

.market-actions #audioToggleButton::before {
  content: "";
  position: absolute;
  inset: 4px 5px;
  border: 1px solid rgba(255, 225, 148, 0.22);
  border-radius: 4px;
  pointer-events: none;
}

.market-actions #audioToggleButton:hover {
  border-color: rgba(255, 217, 129, 0.86);
  background:
    radial-gradient(ellipse at 50% 0%, rgba(255, 235, 169, 0.36), transparent 58%),
    linear-gradient(180deg, rgba(136, 66, 39, 0.98), rgba(82, 43, 31, 0.98));
  color: #fff2c9;
  transform: translateY(-1px);
}

.market-actions #audioToggleButton.is-audio-on {
  border-color: rgba(255, 220, 134, 0.92);
  background:
    radial-gradient(ellipse at 50% 0%, rgba(255, 236, 168, 0.42), transparent 60%),
    linear-gradient(180deg, rgba(139, 84, 36, 0.96), rgba(92, 50, 28, 0.98));
  color: #fff5cb;
  box-shadow:
    inset 0 1px 0 rgba(255, 245, 203, 0.24),
    0 0 0 1px rgba(255, 215, 128, 0.18),
    0 0 18px rgba(240, 190, 91, 0.2);
}

.market-actions #audioToggleButton.is-dialogue-music {
  border-color: rgba(206, 180, 134, 0.82);
  background:
    radial-gradient(ellipse at 50% 0%, rgba(255, 245, 210, 0.36), transparent 62%),
    linear-gradient(180deg, rgba(92, 84, 64, 0.96), rgba(58, 50, 39, 0.98));
  color: #fff0c5;
}

.market-actions #audioToggleButton.is-audio-on::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: 6px;
  border: 1px solid rgba(255, 222, 141, 0.24);
  opacity: 0.7;
  animation: musicSealPulse 1.8s ease-in-out infinite;
  pointer-events: none;
}

.market-actions #audioToggleButton.is-audio-blocked {
  border-color: rgba(235, 188, 93, 0.72);
  color: #ffe7ae;
  box-shadow:
    inset 0 1px 0 rgba(255, 245, 203, 0.18),
    0 0 0 3px rgba(235, 188, 93, 0.08);
}

@keyframes musicSealPulse {
  0%,
  100% {
    opacity: 0.35;
    transform: scale(0.96);
  }
  50% {
    opacity: 0.82;
    transform: scale(1);
  }
}

.stall-status-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.stall-badge {
  width: fit-content;
  padding: 2px 7px;
  border: 1px solid rgba(43, 74, 63, 0.18);
  border-radius: 999px;
  background: rgba(43, 74, 63, 0.06);
  color: #426b5d;
  font-size: 11px;
  font-weight: 800;
}

.stall-visitor {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(160, 104, 44, 0.22);
  border-radius: 7px;
  background:
    linear-gradient(180deg, rgba(255, 251, 235, 0.72), rgba(239, 226, 197, 0.54)),
    radial-gradient(ellipse at 100% 0%, rgba(160, 104, 44, 0.1), transparent 34%);
}

.stall-visitor h3,
.stall-visitor p {
  margin: 0;
}

.stall-visitor h3 {
  color: #20352f;
  font-size: 18px;
  font-weight: 850;
}

.stall-visitor p {
  color: rgba(42, 54, 47, 0.74);
  line-height: 1.8;
}

.commission-card,
.market-route-card,
.stall-response-box,
.exchange-card,
.order-card,
.auction-card {
  display: grid;
  gap: 9px;
  padding: 13px;
  border: 1px solid rgba(143, 94, 50, 0.2);
  border-radius: 7px;
  background:
    linear-gradient(180deg, rgba(255, 250, 233, 0.76), rgba(237, 221, 190, 0.52)),
    radial-gradient(ellipse at 96% 0%, rgba(159, 97, 48, 0.1), transparent 38%);
}

.commission-card > span,
.market-route-card > span,
.exchange-card > span,
.order-card > span,
.auction-card > span {
  width: fit-content;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(143, 94, 50, 0.1);
  color: #7a4e2d;
  font-size: 11px;
  font-weight: 900;
}

.commission-card h3,
.commission-card p,
.auction-card h3,
.auction-card p {
  margin: 0;
}

.commission-card small,
.stall-response-box small,
.exchange-card small,
.order-card small,
.auction-card small {
  color: rgba(88, 64, 42, 0.66);
  font-size: 11px;
  line-height: 1.65;
}

.exchange-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.exchange-card {
  align-content: start;
}

.exchange-card strong,
.order-card strong,
.auction-card h3 {
  color: #20352f;
}

.mini-kline {
  height: 92px;
  overflow: hidden;
  border: 1px solid rgba(43, 74, 63, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 253, 244, 0.76), rgba(238, 226, 194, 0.42)),
    radial-gradient(ellipse at 18% 0%, rgba(75, 132, 98, 0.12), transparent 48%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.mood-kline-wrap {
  padding: 12px;
  border: 1px solid rgba(43, 74, 63, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 253, 244, 0.8), rgba(238, 226, 194, 0.46)),
    radial-gradient(ellipse at 100% 0%, rgba(175, 116, 52, 0.13), transparent 42%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.56),
    0 12px 26px rgba(28, 35, 29, 0.08);
}

.mood-kline-chart {
  width: 100%;
  height: auto;
  display: block;
  color: #253a33;
}

.mood-kline-chart .chart-frame {
  fill: rgba(255, 253, 244, 0.48);
  stroke: rgba(43, 74, 63, 0.14);
  stroke-width: 1;
}

.mood-kline-chart .grid line {
  stroke: rgba(43, 74, 63, 0.13);
  stroke-width: 1;
  stroke-dasharray: 3 5;
}

.mood-kline-chart .grid text,
.mood-kline-chart .chart-caption,
.mood-kline-chart .chart-summary,
.mood-kline-chart .time-axis text {
  fill: rgba(43, 74, 63, 0.58);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0;
}

.mood-kline-chart .chart-summary {
  text-anchor: end;
  fill: rgba(143, 94, 50, 0.74);
}

.mood-kline-chart .mood-area {
  opacity: 0.9;
}

.mood-kline-chart .mood-line {
  fill: none;
  stroke: rgba(47, 119, 87, 0.88);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mood-kline-chart .wick {
  stroke-width: 1.6;
  stroke-linecap: round;
}

.mood-kline-chart .candle rect {
  stroke-width: 1.1;
}

.mood-kline-chart .is-up .wick,
.mood-kline-chart .is-up rect {
  stroke: #2f7658;
  fill: rgba(62, 129, 93, 0.82);
}

.mood-kline-chart .is-down .wick,
.mood-kline-chart .is-down rect {
  stroke: #9b5639;
  fill: rgba(156, 83, 52, 0.74);
}

.mood-kline-chart .last-marker line {
  stroke: rgba(143, 94, 50, 0.24);
  stroke-width: 1;
  stroke-dasharray: 2 4;
}

.mood-kline-chart .last-marker circle {
  fill: #fff9e6;
  stroke: #3e815d;
  stroke-width: 2.2;
}

.mood-kline-chart .last-marker text {
  fill: #20352f;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
}

.order-card {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
}

.order-card.is-hot > span {
  background: rgba(151, 84, 42, 0.14);
  color: #8d5c31;
}

.order-card.is-complete {
  opacity: 0.78;
}

.order-card.is-complete > span {
  background: rgba(75, 132, 98, 0.13);
  color: #3f765a;
}

.auction-card {
  border-color: rgba(143, 94, 50, 0.26);
  background:
    linear-gradient(180deg, rgba(255, 249, 229, 0.82), rgba(239, 221, 185, 0.58)),
    radial-gradient(ellipse at 100% 0%, rgba(168, 103, 46, 0.16), transparent 42%);
}

.auction-card.is-closed {
  border-color: rgba(75, 132, 98, 0.28);
}

.auction-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.auction-stats div {
  display: grid;
  gap: 2px;
  padding: 10px;
  border: 1px solid rgba(43, 74, 63, 0.12);
  border-radius: 7px;
  background: rgba(255, 253, 244, 0.46);
  text-align: center;
}

.auction-stats strong {
  color: #20352f;
  font-size: 18px;
}

.market-route-list {
  display: grid;
  gap: 9px;
}

.market-route-card {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
}

.market-route-card.is-profit > span {
  background: rgba(75, 132, 98, 0.13);
  color: #3f765a;
}

.market-route-card.is-risk > span {
  background: rgba(157, 88, 58, 0.12);
  color: #8e4f34;
}

.market-route-card strong {
  display: block;
  color: #20352f;
  font-size: 13px;
}

.market-route-card small {
  display: block;
  margin-top: 4px;
  color: rgba(43, 55, 48, 0.68);
  font-size: 11px;
  line-height: 1.7;
}

.market-route-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 9px;
}

.contest-hero {
  position: relative;
  display: grid;
  gap: 8px;
  padding: 16px;
  overflow: hidden;
  border: 1px solid rgba(92, 67, 42, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 252, 239, 0.78), rgba(237, 222, 192, 0.55)),
    radial-gradient(ellipse at 92% 0%, rgba(46, 82, 70, 0.13), transparent 38%);
}

.contest-hero span {
  width: fit-content;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(46, 82, 70, 0.1);
  color: #31584c;
  font-size: 11px;
  font-weight: 900;
}

.contest-hero h3,
.contest-hero p {
  margin: 0;
}

.contest-hero h3 {
  color: #20352f;
  font-size: 20px;
}

.contest-score {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 74px;
  height: 74px;
  border: 1px solid rgba(49, 128, 95, 0.22);
  border-radius: 999px;
  background: rgba(49, 128, 95, 0.1);
}

.contest-score strong {
  color: #20352f;
  font-size: 25px;
  line-height: 1;
}

.contest-score small {
  color: #426b5d;
  font-size: 10px;
  font-weight: 850;
}

.contest-metric-grid,
.contest-route-list {
  display: grid;
  gap: 9px;
}

.contest-metric-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.contest-metric,
.contest-route-card {
  display: grid;
  gap: 7px;
  padding: 11px;
  border: 1px solid rgba(35, 54, 47, 0.13);
  border-radius: 7px;
  background:
    linear-gradient(180deg, rgba(255, 253, 244, 0.72), rgba(246, 237, 212, 0.54)),
    radial-gradient(ellipse at 100% 0%, rgba(37, 55, 49, 0.08), transparent 36%);
}

.contest-metric div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.contest-metric strong,
.contest-route-card strong {
  color: #20352f;
}

.contest-metric span {
  color: #8d5c31;
  font-weight: 900;
}

.contest-metric i {
  position: relative;
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(31, 45, 41, 0.14);
}

.contest-metric b {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #8d5c31, #d6ab5d 58%, #4e9479);
}

.contest-metric small,
.contest-route-card small {
  color: rgba(43, 55, 48, 0.68);
  font-size: 11px;
  line-height: 1.65;
}

.contest-route-card {
  grid-template-columns: auto minmax(0, 1fr);
}

.contest-route-card > span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(143, 94, 50, 0.11);
  color: #7a4e2d;
  font-weight: 900;
}

.contest-route-card button {
  width: fit-content;
  margin-top: 8px;
}

.stall-response-box label {
  color: #4f3826;
  font-size: 12px;
  font-weight: 850;
}

.stall-response-box textarea {
  min-height: 72px;
  resize: vertical;
  border-color: rgba(124, 88, 58, 0.18);
  background: rgba(255, 253, 244, 0.78);
  color: #2b1c12;
}

.daily-market-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.market-rate {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 8px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(35, 54, 47, 0.13);
  border-radius: 7px;
  background:
    linear-gradient(180deg, rgba(255, 253, 244, 0.68), rgba(246, 237, 212, 0.52)),
    radial-gradient(ellipse at 100% 0%, rgba(37, 55, 49, 0.08), transparent 36%);
}

.market-rate span {
  grid-row: span 2;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(43, 74, 63, 0.08);
  color: #31584c;
  font-size: 11px;
  font-weight: 900;
}

.market-rate strong {
  min-width: 0;
  color: #20352f;
  font-size: 13px;
}

.market-rate small {
  color: rgba(43, 55, 48, 0.66);
  font-size: 11px;
}

.market-rate.is-surge span,
.market-rate.is-warm span {
  background: rgba(160, 104, 44, 0.14);
  color: #8d5c31;
}

.market-rate.is-cool span,
.market-rate.is-slump span {
  background: rgba(51, 93, 86, 0.12);
  color: #31584c;
}

.stall-score {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(49, 128, 95, 0.2);
  border-radius: 7px;
  background: rgba(49, 128, 95, 0.08);
}

.stall-score strong {
  color: #20352f;
}

.stall-score small {
  color: rgba(43, 55, 48, 0.68);
}

.match-meter {
  position: relative;
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(31, 45, 41, 0.16);
}

.match-meter i {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #8d5c31, #d6ab5d 54%, #4e9479);
}

.codex-portrait {
  border-color: rgba(35, 54, 47, 0.12);
  background:
    radial-gradient(circle at 50% 18%, rgba(45, 78, 65, 0.12), transparent 58%),
    rgba(239, 229, 202, 0.56);
}

.codex-meta {
  color: rgba(54, 76, 66, 0.58) !important;
}

.codex-line {
  color: rgba(32, 53, 47, 0.88) !important;
}

.game-manual-panel {
  background: rgba(5, 10, 9, 0.44);
}

.game-manual-sheet,
.dialog {
  border-color: rgba(230, 199, 119, 0.38);
  background:
    linear-gradient(180deg, rgba(24, 36, 32, 0.94), rgba(8, 14, 13, 0.96)),
    repeating-linear-gradient(120deg, rgba(238, 216, 158, 0.05) 0 1px, transparent 1px 9px);
  color: var(--game-text);
  box-shadow: 0 26px 86px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 244, 214, 0.08);
}

.dialog {
  border-width: 1px;
}

.dialog::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    radial-gradient(ellipse at 14% 0%, rgba(230, 199, 119, 0.12), transparent 34%),
    radial-gradient(ellipse at 88% 18%, rgba(151, 207, 184, 0.08), transparent 28%);
  pointer-events: none;
}

.dialog > * {
  position: relative;
  z-index: 1;
}

.npc-portrait {
  border-color: rgba(230, 199, 119, 0.24);
  background:
    radial-gradient(circle at 50% 20%, rgba(230, 199, 119, 0.16), transparent 58%),
    linear-gradient(180deg, rgba(255, 244, 214, 0.08), rgba(5, 9, 8, 0.22));
}

.dialog strong,
.game-manual-grid strong {
  color: var(--game-accent-strong);
}

#dialogSubtitle,
.game-manual-grid {
  color: var(--game-faint);
}

.dialog p {
  color: rgba(248, 238, 216, 0.9);
}

.npc-dialog-close,
#dialogOptions button {
  border-color: rgba(230, 199, 119, 0.28);
}

#dialogOptions button {
  background:
    linear-gradient(180deg, rgba(44, 72, 62, 0.98), rgba(24, 45, 39, 0.98));
  color: #fff2d2;
}

#dialogOptions button:hover {
  border-color: rgba(240, 205, 122, 0.68);
  background:
    linear-gradient(180deg, rgba(60, 90, 78, 0.98), rgba(29, 54, 47, 0.98));
}

#dialogOptions button[data-kind="buy"] {
  border-color: rgba(174, 245, 202, 0.42);
  background:
    linear-gradient(180deg, rgba(38, 96, 72, 0.98), rgba(24, 61, 50, 0.98));
  color: #dfffea;
}

#dialogOptions button[data-kind="sell"] {
  border-color: rgba(255, 218, 135, 0.48);
  background:
    linear-gradient(180deg, rgba(139, 82, 36, 0.98), rgba(91, 50, 25, 0.98));
  color: #fff0bd;
}

.npc-say-box {
  width: 100%;
  display: grid;
  gap: 8px;
}

.npc-say-box textarea {
  width: 100%;
  min-height: 72px;
  resize: vertical;
  padding: 10px 12px;
  border: 1px solid rgba(230, 199, 119, 0.34);
  border-radius: 7px;
  background: rgba(255, 245, 214, 0.12);
  color: #fff2d2;
  outline: none;
  line-height: 1.6;
}

.npc-say-box textarea::placeholder {
  color: rgba(255, 242, 207, 0.5);
}

.npc-say-box textarea:focus {
  border-color: rgba(255, 226, 158, 0.72);
  box-shadow: 0 0 0 3px rgba(255, 226, 158, 0.12);
}

.npc-say-box > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

@media (max-width: 640px) {
  .newbie-guide {
    left: 12px;
    right: 12px;
    top: 72px;
    width: auto;
    grid-template-columns: 78px minmax(0, 1fr);
  }

  .newbie-guide-visual {
    min-height: 118px;
  }

  .newbie-actions {
    grid-template-columns: 1fr;
  }

  .market-progress {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .market-actions {
    grid-template-columns: repeat(3, minmax(54px, 1fr));
  }

  .reward-grid {
    grid-template-columns: 1fr;
  }

  .daily-market-grid {
    grid-template-columns: 1fr;
  }

  .exchange-grid,
  .auction-stats {
    grid-template-columns: 1fr;
  }

  .contest-metric-grid {
    grid-template-columns: 1fr;
  }

  .contest-score {
    position: static;
    width: auto;
    height: auto;
    grid-template-columns: auto 1fr;
    justify-content: start;
    padding: 8px 10px;
    border-radius: 7px;
  }

  .stall-status-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 880px) {
  html,
  body {
    overflow: auto;
  }

  .entry {
    position: relative;
    min-height: 100vh;
    place-items: start center;
    padding-top: 92px;
  }

  .entry-shell {
    gap: 28px;
  }
}

@media (max-width: 640px) {
  .entry {
    padding-inline: 14px;
  }

  .dynamic-island {
    width: auto;
    justify-content: center;
  }

  .island-home,
  .island-link {
    padding: 0;
  }

  .home-actions,
  .feature-cards,
  .field-grid,
  .entry-actions {
    grid-template-columns: 1fr;
  }

  .home-actions {
    width: min(260px, 100%);
  }

  .entry-hero h1 {
    font-size: clamp(48px, 16vw, 68px);
  }

  .hero-copy {
    margin-top: 28px;
  }

  .feature-cards {
    margin-top: 34px;
  }

  .entry-card {
    padding: 18px;
  }

  .market-hud {
    top: 10px;
    left: 10px;
    width: calc(100vw - 20px);
  }

  .map-controls {
    right: 10px;
    bottom: 58px;
    width: min(270px, calc(100vw - 20px));
  }

  .market-panel {
    left: 10px;
    right: 10px;
    top: 50%;
    width: auto;
    transform: translateY(-50%);
  }

  .dialog {
    grid-template-columns: 92px 1fr;
    gap: 10px;
    bottom: 10px;
    min-height: 166px;
    padding: 10px;
  }

  .npc-portrait {
    min-height: 136px;
  }

  .npc-portrait img {
    max-width: 84px;
    max-height: 142px;
  }
}
