:root {
  --ink: #293029;
  --cream: #fff3cf;
  --paper: #f7dfaa;
  --paper-deep: #e7bd72;
  --leaf: #426b3b;
  --leaf-dark: #263d2b;
  --gold: #f4c64f;
  --coral: #d86745;
  --wood: #724225;
  --wood-dark: #3d2318;
  --wood-light: #a86837;
  --water: #5ba6aa;
  --shadow: rgba(25, 20, 12, 0.45);
  --pixel-border: 4px;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--leaf-dark);
  color: var(--ink);
}

body {
  font-family: "Courier New", "Microsoft YaHei", monospace;
  -webkit-font-smoothing: none;
  text-rendering: geometricPrecision;
}

body.loader-open {
  overflow: hidden;
}

.loader[hidden] {
  display: none;
}

.loader {
  position: fixed;
  z-index: 2000;
  inset: 0;
  display: grid;
  place-items: center;
  color: #2f392f;
  background:
    linear-gradient(rgba(70, 86, 66, 0.04) 1px, transparent 1px),
    #fffaf0;
  background-size: 100% 5px;
  transition: opacity 0.4s steps(5), visibility 0.4s steps(5);
}

.loader.is-complete {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.loader-content {
  display: grid;
  width: min(440px, calc(100vw - 48px));
  justify-items: center;
  text-align: center;
}

.loader-brand {
  margin: 0 0 clamp(42px, 9vh, 86px);
  color: #426149;
  font-family: Impact, "Arial Black", sans-serif;
  font-size: clamp(28px, 6vw, 48px);
  letter-spacing: 0.16em;
}

.loader-avatar {
  position: relative;
  width: 72px;
  height: 74px;
  margin-bottom: clamp(38px, 8vh, 76px);
  transform: scale(1.45);
}

.loader-avatar::after {
  position: absolute;
  right: 12px;
  bottom: 1px;
  left: 12px;
  height: 7px;
  content: "";
  border-radius: 50%;
  background: rgba(46, 55, 45, 0.16);
}

.loader-avatar span {
  position: absolute;
  z-index: 1;
  inset: 0;
  background-image: url("./assets/explorer-sprites-personal.png");
  background-position: 0 0;
  background-size: 400% 400%;
  background-repeat: no-repeat;
  image-rendering: pixelated;
  animation: loader-step 0.78s steps(1, end) infinite;
}

.loader-label {
  margin: 0 0 14px;
  color: #56624f;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.16em;
}

.loader-track {
  width: 100%;
  height: 20px;
  border: 4px solid #30372f;
  padding: 3px;
  background: #fff;
  box-shadow: 5px 5px rgba(47, 55, 47, 0.12);
}

.loader-track span {
  display: block;
  width: 0;
  height: 100%;
  background: #6f9662;
  transition: width 0.12s linear;
}

.loader-number {
  margin: 15px 0 0;
  color: #30372f;
  font-family: Impact, "Arial Black", sans-serif;
  font-size: clamp(32px, 8vw, 54px);
  letter-spacing: 0.04em;
}

button,
a {
  font: inherit;
}

button {
  color: inherit;
}

button:focus-visible,
a:focus-visible {
  outline: 4px solid #fff7b2;
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  color: #fff;
  background: var(--ink);
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: none;
}

.app,
.world-wrap {
  position: fixed;
  inset: 0;
}

.world-wrap {
  overflow: hidden;
  background: #173522;
}

.world {
  position: absolute;
  top: 0;
  left: 0;
  width: 1448px;
  height: 1086px;
  background-image: url("./assets/valley-map-v2.png");
  background-position: 0 0;
  background-size: 100% 100%;
  image-rendering: pixelated;
  will-change: transform;
  transition: filter 0.7s ease;
}

.app:not(.is-entered) .world {
  filter: brightness(0.72) saturate(0.82);
}

.world::after {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(24, 55, 31, 0.04), transparent 20%, transparent 78%, rgba(21, 31, 22, 0.1)),
    radial-gradient(circle at center, transparent 63%, rgba(20, 34, 23, 0.08) 100%);
}

.sun-wash {
  position: absolute;
  inset: -20%;
  pointer-events: none;
  background: radial-gradient(circle at 70% 12%, rgba(255, 235, 151, 0.24), transparent 36%);
  mix-blend-mode: screen;
  animation: sun-pulse 7s ease-in-out infinite alternate;
}

.cloud {
  position: absolute;
  width: 18%;
  height: 8%;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0.09;
  filter: blur(14px);
  background: #fffbd8;
}

.cloud-one {
  top: 7%;
  left: -22%;
  animation: cloud-drift 34s linear infinite;
}

.cloud-two {
  top: 62%;
  left: -28%;
  animation: cloud-drift 46s linear -13s infinite;
}

.screen-grain {
  position: fixed;
  z-index: 3;
  inset: 0;
  pointer-events: none;
  opacity: 0.08;
  background-image: repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 3px);
  mix-blend-mode: overlay;
}

.splash {
  position: fixed;
  z-index: 20;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  color: #fff8db;
  text-align: center;
  background: rgba(20, 31, 21, 0.43);
  transition: opacity 0.7s ease, visibility 0.7s ease;
}

.is-entered .splash {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.splash-card {
  width: min(720px, 92vw);
  padding: clamp(28px, 6vw, 60px);
  border: 4px solid rgba(255, 246, 209, 0.62);
  box-shadow:
    0 0 0 8px rgba(33, 51, 35, 0.48),
    0 22px 80px rgba(18, 24, 16, 0.42);
  background: rgba(32, 52, 35, 0.72);
  backdrop-filter: blur(7px);
}

.eyebrow {
  margin: 0 0 14px;
  color: #f7d476;
  font-size: clamp(10px, 1.3vw, 14px);
  font-weight: 700;
  letter-spacing: 0.28em;
}

.sprout {
  position: relative;
  width: 32px;
  height: 28px;
  margin: 0 auto 8px;
}

.sprout::before,
.sprout::after {
  position: absolute;
  top: 4px;
  width: 15px;
  height: 10px;
  content: "";
  background: #a8d86a;
  box-shadow: inset -4px -4px #669748;
}

.sprout::before {
  left: 1px;
  transform: skewY(24deg);
}

.sprout::after {
  right: 1px;
  transform: skewY(-24deg);
}

.sprout span {
  position: absolute;
  bottom: 0;
  left: 14px;
  width: 4px;
  height: 16px;
  background: #78a34f;
}

.splash h1 {
  margin: 0;
  color: #fff8dc;
  font-family: Impact, "Arial Black", sans-serif;
  font-size: clamp(48px, 11vw, 118px);
  font-weight: 900;
  letter-spacing: 0.035em;
  line-height: 0.9;
  text-shadow:
    0 5px 0 #36583b,
    0 9px 0 rgba(18, 28, 18, 0.5);
}

.splash h1 span {
  color: #f2ca58;
}

.splash-subtitle {
  margin: 22px 0 28px;
  color: #fff4cf;
  font-size: clamp(16px, 2.3vw, 23px);
  font-weight: 700;
  letter-spacing: 0.22em;
}

.pixel-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 190px;
  min-height: 55px;
  border: 0;
  padding: 14px 22px;
  cursor: pointer;
  font-weight: 900;
  letter-spacing: 0.12em;
  box-shadow:
    0 0 0 4px var(--wood-dark),
    0 7px 0 4px rgba(40, 28, 18, 0.48);
  transition: transform 0.16s ease, filter 0.16s ease;
}

.pixel-button-primary {
  color: #fff8df;
  background: var(--coral);
  text-shadow: 0 2px #8b3828;
}

.pixel-button i {
  margin-left: 20px;
  font-size: 20px;
  font-style: normal;
}

.pixel-button:hover {
  filter: brightness(1.08);
  transform: translateY(-2px);
}

.pixel-button:active {
  transform: translateY(4px);
}

.splash-note,
.quick-link {
  color: rgba(255, 248, 222, 0.78);
  font-size: 11px;
}

.splash-note {
  margin: 25px 0 0;
}

.quick-link {
  position: absolute;
  bottom: max(20px, env(safe-area-inset-bottom));
  left: 50%;
  margin: 0;
  transform: translateX(-50%);
}

.quick-link button {
  border: 0;
  border-bottom: 1px dashed currentColor;
  padding: 0;
  color: #fff6c7;
  cursor: pointer;
  background: transparent;
}

.hud {
  position: fixed;
  z-index: 10;
  top: 0;
  left: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  width: 100%;
  padding: clamp(18px, 3vw, 38px);
  pointer-events: none;
  opacity: 0;
  transform: translateY(-18px);
  transition: opacity 0.6s ease 0.28s, transform 0.6s ease 0.28s;
}

.is-entered .hud {
  opacity: 1;
  transform: none;
}

.brand,
.hud-button {
  pointer-events: auto;
  border: 0;
  color: #fff8d9;
  cursor: pointer;
  background: rgba(35, 54, 37, 0.86);
  box-shadow:
    0 0 0 3px rgba(255, 239, 185, 0.72),
    0 5px 0 3px rgba(38, 31, 20, 0.38);
  backdrop-filter: blur(5px);
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 11px 15px 10px 11px;
  text-align: left;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: #334d31;
  font-size: 22px;
  background: #eac75d;
  box-shadow: inset -4px -4px #b9863e;
}

.brand b,
.brand small {
  display: block;
}

.brand b {
  font-family: Impact, "Arial Black", sans-serif;
  font-size: 20px;
  letter-spacing: 0.08em;
}

.brand small {
  margin-top: 2px;
  color: #d8d1aa;
  font-size: 8px;
  letter-spacing: 0.18em;
}

.hud-actions {
  display: flex;
  gap: 13px;
}

.hud-button {
  min-width: 82px;
  padding: 12px 14px;
  font-size: 12px;
  font-weight: 800;
}

.hud-button span {
  margin-right: 8px;
  color: #f2cf68;
}

.brand:hover,
.hud-button:hover {
  background: rgba(48, 76, 48, 0.95);
}

.hotspot {
  position: absolute;
  z-index: 5;
  top: var(--y);
  left: var(--x);
  display: grid;
  place-items: center;
  border: 0;
  padding: 0;
  color: var(--cream);
  cursor: pointer;
  background: transparent;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.45s ease;
}

.is-entered .hotspot {
  opacity: 1;
}

.hotspot-ring {
  position: relative;
  display: grid;
  width: clamp(42px, 3.4vw, 56px);
  height: clamp(42px, 3.4vw, 56px);
  place-items: center;
  border: 4px solid #fff4bd;
  border-radius: 50%;
  background: rgba(44, 66, 40, 0.83);
  box-shadow:
    0 0 0 4px rgba(51, 38, 23, 0.66),
    0 0 0 9px rgba(255, 228, 128, 0.12),
    0 8px 15px rgba(32, 24, 14, 0.4);
  animation: marker-bob 2.1s steps(4) infinite;
}

.hotspot-ring::after {
  position: absolute;
  right: 50%;
  bottom: -13px;
  width: 12px;
  height: 12px;
  content: "";
  background: #fff4bd;
  box-shadow: 4px 4px #58432b;
  transform: translateX(50%) rotate(45deg);
}

.hotspot-ring span {
  font-size: clamp(16px, 1.6vw, 24px);
  text-shadow: 2px 2px #60442c;
}

.hotspot-label {
  position: absolute;
  top: calc(100% + 18px);
  left: 50%;
  min-width: max-content;
  border: 2px solid rgba(255, 239, 183, 0.78);
  padding: 6px 9px;
  color: #fff8d7;
  font-size: clamp(9px, 0.9vw, 12px);
  font-weight: 900;
  background: rgba(43, 51, 31, 0.84);
  box-shadow: 3px 3px rgba(52, 35, 21, 0.45);
  transform: translateX(-50%);
  white-space: nowrap;
}

.hotspot:hover .hotspot-ring,
.hotspot:focus-visible .hotspot-ring {
  filter: brightness(1.2);
  animation-play-state: paused;
  transform: translateY(-4px) scale(1.08);
}

.hotspot--notes .hotspot-ring {
  color: #fff1a4;
  background: rgba(91, 111, 54, 0.9);
}

.notes-field-labels {
  position: absolute;
  z-index: 4;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.6s ease 0.2s;
}

.is-entered .notes-field-labels {
  opacity: 1;
}

.notes-field-labels > span {
  position: absolute;
  top: var(--field-y);
  left: var(--field-x);
  border: 3px solid #4f341f;
  padding: 6px 9px 7px;
  color: #fff2bd;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
  background: #765033;
  box-shadow:
    inset 0 0 0 2px #b9824b,
    4px 5px rgba(48, 31, 18, 0.32);
  transform: translate(-50%, -50%);
  white-space: nowrap;
}

.notes-field-labels > span::after {
  position: absolute;
  top: 100%;
  left: 50%;
  width: 6px;
  height: 18px;
  content: "";
  background: #4f341f;
  transform: translateX(-50%);
}

.notes-field-labels i {
  margin-right: 5px;
  color: #f2cf64;
  font-style: normal;
}

.avatar {
  position: absolute;
  z-index: 6;
  width: 72px;
  height: 74px;
  pointer-events: none;
  transform: translate(-50%, -91%);
  opacity: 0;
  transition: opacity 0.3s ease;
  will-change: top, left;
}

.is-entered .avatar {
  opacity: 1;
}

.avatar-shadow {
  position: absolute;
  bottom: 4px;
  left: 50%;
  width: 28px;
  height: 8px;
  border-radius: 50%;
  background: rgba(36, 42, 22, 0.36);
  transform: translateX(-50%);
}

.avatar-sprite {
  position: absolute;
  inset: 0;
  background-image: url("./assets/explorer-sprites-personal.png");
  background-repeat: no-repeat;
  background-position: 0 0;
  background-size: 400% 400%;
  image-rendering: pixelated;
  filter: drop-shadow(2px 3px 0 rgba(45, 31, 18, 0.3));
}

.intro-bubble {
  position: absolute;
  z-index: 8;
  bottom: 76px;
  left: 50%;
  width: min(250px, calc(100vw - 42px));
  border: 3px solid var(--wood-dark);
  padding: 11px 13px 10px;
  color: #493522;
  text-align: left;
  background: #fff1c6;
  box-shadow:
    inset -3px -3px rgba(170, 111, 52, 0.15),
    5px 6px rgba(44, 31, 20, 0.3);
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 8px) scale(0.96);
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease;
}

.intro-bubble::before,
.intro-bubble::after {
  position: absolute;
  left: 50%;
  content: "";
  transform: translateX(-50%);
}

.intro-bubble::before {
  bottom: -14px;
  border: 7px solid transparent;
  border-top-color: var(--wood-dark);
}

.intro-bubble::after {
  bottom: -9px;
  border: 5px solid transparent;
  border-top-color: #fff1c6;
}

.intro-bubble b,
.intro-bubble small {
  display: block;
}

.intro-bubble b {
  color: #3f6142;
  font-size: 13px;
}

.intro-bubble small {
  margin-top: 5px;
  font-family: "Microsoft YaHei", sans-serif;
  font-size: 10px;
  line-height: 1.65;
}

.avatar.is-introducing .intro-bubble {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0) scale(1);
  animation: intro-bubble-bob 1.4s steps(3) 0.25s infinite alternate;
}

.move-target {
  position: absolute;
  z-index: 3;
  width: 26px;
  height: 18px;
  border: 4px solid rgba(255, 248, 197, 0.96);
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.6);
  box-shadow: 0 0 0 3px rgba(64, 93, 47, 0.72);
}

.move-target.is-visible {
  opacity: 1;
  animation: destination-pulse 0.8s steps(3) infinite;
}

.quest-tip {
  position: fixed;
  z-index: 8;
  bottom: 30px;
  left: 32px;
  display: flex;
  gap: 12px;
  align-items: center;
  border: 3px solid #f6e7af;
  padding: 10px 16px 10px 10px;
  color: #fff8db;
  background: rgba(43, 58, 37, 0.88);
  box-shadow: 5px 6px rgba(43, 31, 21, 0.35);
  opacity: 0;
  transform: translateY(15px);
  transition: opacity 0.5s ease 0.6s, transform 0.5s ease 0.6s;
}

.is-entered .quest-tip {
  opacity: 1;
  transform: none;
}

.quest-tip > span {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  color: #5f3a24;
  font-weight: 900;
  background: #f2cd63;
  box-shadow: inset -4px -4px #c99242;
}

.quest-tip p,
.quest-tip b,
.quest-tip small {
  display: block;
  margin: 0;
}

.quest-tip b {
  font-size: 11px;
}

.quest-tip small {
  margin-top: 3px;
  color: #d9d4b6;
  font-size: 9px;
}

.mobile-dock {
  display: none;
}

.dialog[hidden] {
  display: none;
}

.dialog {
  position: fixed;
  z-index: 40;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
}

.dialog-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  cursor: default;
  background: rgba(21, 29, 21, 0.66);
  backdrop-filter: blur(5px);
  animation: fade-in 0.28s ease both;
}

.wood-panel {
  position: relative;
  width: min(820px, calc(100vw - 40px));
  max-height: min(760px, calc(100dvh - 55px));
  border: 12px solid var(--wood);
  padding: 10px;
  background: var(--wood-light);
  box-shadow:
    inset 0 0 0 4px var(--wood-dark),
    0 18px 0 rgba(43, 30, 20, 0.35),
    0 28px 80px rgba(22, 22, 15, 0.44);
  animation: panel-pop 0.34s steps(5) both;
}

.wood-panel::before,
.wood-panel::after {
  position: absolute;
  inset: -8px 18%;
  z-index: -1;
  content: "";
  background: var(--wood-dark);
}

.wood-panel::after {
  inset: 18% -8px;
}

.wood-nail {
  position: absolute;
  z-index: 3;
  width: 9px;
  height: 9px;
  border: 2px solid #4b352a;
  border-radius: 50%;
  background: #c18e55;
}

.wood-nail-a {
  top: 3px;
  left: 3px;
}

.wood-nail-b {
  right: 3px;
  bottom: 3px;
}

.panel-paper {
  max-height: calc(100dvh - 130px);
  overflow: auto;
  border: 4px solid var(--wood-dark);
  padding: clamp(24px, 5vw, 50px);
  background:
    linear-gradient(rgba(112, 78, 39, 0.045) 1px, transparent 1px),
    var(--paper);
  background-size: 100% 24px;
  scrollbar-color: var(--wood) var(--paper-deep);
}

.dialog-close {
  position: absolute;
  z-index: 5;
  top: -22px;
  right: -20px;
  display: grid;
  width: 47px;
  height: 47px;
  place-items: center;
  border: 4px solid var(--wood-dark);
  color: #fff7d5;
  cursor: pointer;
  font-size: 28px;
  font-weight: 900;
  line-height: 1;
  background: var(--coral);
  box-shadow: 5px 5px rgba(44, 31, 20, 0.35);
}

.panel-footer {
  position: absolute;
  right: 20px;
  bottom: -28px;
  color: #efe3b7;
  font-size: 9px;
}

.panel-footer span {
  border: 1px solid currentColor;
  padding: 2px 4px;
}

.panel-kicker {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 0 0 7px;
  color: #8b5f2e;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.18em;
}

.panel-kicker::before {
  width: 11px;
  height: 11px;
  content: "";
  background: #d79546;
  box-shadow: inset -3px -3px #9b6235;
}

.panel-paper h2 {
  margin: 0 0 18px;
  color: #3f5436;
  font-family: Impact, "Arial Black", sans-serif;
  font-size: clamp(32px, 6vw, 56px);
  letter-spacing: 0.05em;
  line-height: 1;
  text-shadow: 2px 2px rgba(255, 247, 207, 0.62);
}

.panel-lead {
  margin: 0 0 24px;
  color: #5f4a30;
  font-size: clamp(14px, 1.7vw, 18px);
  font-weight: 700;
  line-height: 1.8;
}

.panel-copy {
  color: #5c4d36;
  font-family: "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.9;
}

.panel-copy p:last-child {
  margin-bottom: 0;
}

.stats-grid,
.project-grid,
.menu-grid {
  display: grid;
  gap: 14px;
}

.stats-grid {
  grid-template-columns: repeat(3, 1fr);
  margin-top: 28px;
}

.stat {
  border: 3px solid #6d4b2d;
  padding: 15px;
  text-align: center;
  background: rgba(255, 248, 211, 0.45);
  box-shadow: inset -4px -4px rgba(140, 92, 47, 0.13);
}

.stat b,
.stat span {
  display: block;
}

.stat b {
  color: #497047;
  font-family: Impact, sans-serif;
  font-size: 28px;
}

.stat span {
  margin-top: 6px;
  color: #7d6543;
  font-size: 9px;
  font-weight: 900;
}

.project-grid {
  grid-template-columns: repeat(2, 1fr);
  align-items: start;
}

.project-card {
  position: relative;
  min-height: 170px;
  border: 3px solid #6d4b2d;
  padding: 20px;
  background: rgba(255, 249, 218, 0.52);
  box-shadow: 5px 5px rgba(113, 76, 39, 0.13);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.project-card:hover {
  box-shadow: 7px 8px rgba(113, 76, 39, 0.17);
  transform: translateY(-2px);
}

.project-card.is-featured {
  background: #466d4d;
  color: #fff4cd;
}

.project-card .number {
  color: #c98246;
  font-weight: 900;
  letter-spacing: 0.15em;
}

.project-card.is-featured .number {
  color: #f3cf69;
}

.project-card h3 {
  margin: 10px 0 8px;
  font-size: 20px;
}

.project-card p {
  margin: 0 0 16px;
  font-family: "Microsoft YaHei", sans-serif;
  font-size: 12px;
  line-height: 1.7;
  opacity: 0.82;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag {
  border: 2px solid currentColor;
  padding: 4px 7px;
  font-size: 9px;
  font-weight: 900;
  opacity: 0.78;
}

.project-details,
.experience-project {
  margin-top: 16px;
  border-top: 2px dashed currentColor;
  padding-top: 13px;
}

.project-details summary,
.experience-project summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.06em;
  list-style: none;
}

.project-details summary::-webkit-details-marker,
.experience-project summary::-webkit-details-marker {
  display: none;
}

.project-details summary span,
.experience-project summary span {
  font-size: 18px;
  transition: transform 0.2s ease;
}

.project-details[open] summary span,
.experience-project[open] summary span {
  transform: rotate(45deg);
}

.project-details ul,
.experience-body ul {
  margin: 13px 0 0;
  padding-left: 19px;
  font-family: "Microsoft YaHei", sans-serif;
  font-size: 11px;
  line-height: 1.75;
}

.project-details li + li,
.experience-body li + li {
  margin-top: 5px;
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 17px;
}

.card-actions a {
  border: 2px solid currentColor;
  padding: 7px 10px;
  color: inherit;
  font-size: 9px;
  font-weight: 900;
  text-decoration: none;
  background: rgba(255, 248, 216, 0.12);
}

.card-actions a:hover {
  filter: brightness(1.12);
  transform: translateY(-1px);
}

.showcase-slot {
  position: relative;
  display: grid;
  width: 100%;
  aspect-ratio: 16 / 9;
  margin-top: 16px;
  place-content: center;
  overflow: hidden;
  border: 3px solid currentColor;
  color: #fff2c8;
  text-align: center;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 50%, transparent 50%) 0 0 / 12px 12px,
    linear-gradient(rgba(255, 255, 255, 0.035) 50%, transparent 50%) 0 0 / 12px 12px,
    #314f3d;
  box-shadow: inset 0 0 0 4px rgba(255, 242, 198, 0.08);
}

.showcase-slot::before {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 4px);
}

.showcase-slot.has-media {
  display: block;
  background: #172a20;
}

.showcase-slot.has-media::before {
  display: none;
}

.showcase-slot video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.showcase-play {
  display: grid;
  width: 44px;
  height: 38px;
  margin: 0 auto 8px;
  place-items: center;
  border: 3px solid #fff0bb;
  color: #fff0bb;
  font-size: 15px;
  background: rgba(24, 48, 34, 0.75);
  box-shadow: 4px 4px rgba(28, 28, 19, 0.25);
}

.showcase-slot b,
.showcase-slot small {
  position: relative;
  display: block;
}

.showcase-slot b {
  color: #f3cc66;
  font-size: 10px;
  letter-spacing: 0.14em;
}

.showcase-slot small {
  margin-top: 5px;
  font-family: "Microsoft YaHei", sans-serif;
  font-size: 9px;
  opacity: 0.74;
}

.showcase-slot--company {
  max-width: 570px;
  color: #6d4b2d;
  background:
    linear-gradient(90deg, rgba(255, 244, 202, 0.04) 50%, transparent 50%) 0 0 / 12px 12px,
    linear-gradient(rgba(255, 244, 202, 0.04) 50%, transparent 50%) 0 0 / 12px 12px,
    #466d4d;
}

.reserved-link-row {
  display: flex;
  gap: 9px;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  font-size: 9px;
  font-weight: 900;
}

.reserved-link {
  border: 2px dashed currentColor;
  padding: 6px 9px;
  opacity: 0.66;
}

.reserved-link.is-ready {
  color: #fff4ca;
  text-decoration: none;
  background: #517050;
  opacity: 1;
}

.skill-garden {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.skill-bed {
  border-left: 6px solid #699255;
  padding: 15px 17px;
  background: rgba(255, 248, 216, 0.43);
  box-shadow: inset 0 0 0 1px rgba(109, 75, 45, 0.08);
  transition: background 0.2s ease, transform 0.2s ease;
}

.skill-bed:hover {
  background: rgba(255, 250, 224, 0.65);
  transform: translateY(-2px);
}

.skill-bed h3 {
  margin: 0 0 12px;
  color: #496743;
  font-size: 14px;
}

.skill-bed ul {
  margin: 0;
  padding: 0;
  list-style: none;
  color: #6c573b;
  font-size: 11px;
  line-height: 2;
}

.skill-bed li::before {
  margin-right: 7px;
  color: #b3713d;
  content: "✦";
}

.note-intake {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 18px;
  border: 3px dashed #81623e;
  padding: 13px 15px;
  color: #594a33;
  background: rgba(255, 250, 222, 0.58);
}

.note-intake > span {
  display: grid;
  flex: 0 0 48px;
  width: 48px;
  height: 42px;
  place-items: center;
  color: #fff2c3;
  font-size: 11px;
  font-weight: 900;
  background: #557650;
  box-shadow: 4px 4px rgba(75, 50, 29, 0.22);
}

.note-intake b,
.note-intake small {
  display: block;
}

.note-intake small {
  margin-top: 4px;
  color: #746044;
  font-family: "Microsoft YaHei", sans-serif;
  font-size: 10px;
  line-height: 1.6;
}

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

.note-bed {
  position: relative;
  overflow: hidden;
  border: 3px solid #6d4b2d;
  border-top: 7px solid var(--note-accent);
  padding: 16px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.24), transparent 46%),
    rgba(255, 248, 215, 0.58);
  box-shadow: 5px 5px rgba(113, 76, 39, 0.12);
}

.note-bed header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: start;
}

.note-bed h3,
.note-bed p {
  margin: 0;
}

.note-bed h3 {
  color: #465d3e;
  font-size: 16px;
}

.note-bed p {
  margin-top: 4px;
  color: #735d40;
  font-family: "Microsoft YaHei", sans-serif;
  font-size: 10px;
  line-height: 1.55;
}

.note-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: #fff7d1;
  font-size: 16px;
  background: var(--note-accent);
  box-shadow: 3px 3px rgba(75, 50, 29, 0.2);
}

.note-count {
  border: 2px solid #806344;
  padding: 4px 6px;
  color: #775c3b;
  font-size: 9px;
  font-weight: 900;
  white-space: nowrap;
}

.note-empty {
  display: flex;
  gap: 11px;
  align-items: center;
  margin: 15px 0 12px;
  border-top: 2px dashed rgba(109, 75, 45, 0.3);
  border-bottom: 2px dashed rgba(109, 75, 45, 0.3);
  padding: 12px 2px;
}

.note-empty b,
.note-empty small {
  display: block;
}

.note-empty b {
  color: #604a31;
  font-size: 11px;
}

.note-empty small {
  margin-top: 4px;
  color: #846e4f;
  font-family: "Microsoft YaHei", sans-serif;
  font-size: 9px;
  line-height: 1.55;
}

.seed-packet {
  position: relative;
  display: block;
  flex: 0 0 31px;
  width: 31px;
  height: 38px;
  border: 2px solid #69482d;
  background: #dcae5f;
  box-shadow: 3px 3px rgba(75, 50, 29, 0.18);
}

.seed-packet::before,
.seed-packet::after,
.seed-packet i {
  position: absolute;
  border-radius: 50%;
  content: "";
  background: #527044;
}

.seed-packet::before {
  top: 13px;
  left: 8px;
  width: 8px;
  height: 13px;
  transform: rotate(-28deg);
}

.seed-packet::after {
  top: 11px;
  right: 6px;
  width: 7px;
  height: 11px;
  transform: rotate(28deg);
}

.seed-packet i {
  bottom: 6px;
  left: 13px;
  width: 4px;
  height: 12px;
  border-radius: 0;
}

.note-bed code {
  display: block;
  overflow: hidden;
  color: #557050;
  font-size: 9px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.timeline {
  position: relative;
  display: grid;
  gap: 18px;
  padding-left: 26px;
}

.timeline::before {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 6px;
  width: 4px;
  content: "";
  background: #8f6940;
}

.timeline-item {
  position: relative;
  border-bottom: 2px dashed rgba(109, 75, 45, 0.3);
  padding: 0 0 16px;
}

.timeline-item::before {
  position: absolute;
  top: 2px;
  left: -26px;
  width: 14px;
  height: 14px;
  border: 3px solid #fff0be;
  content: "";
  background: #55805a;
  box-shadow: 0 0 0 2px #6d4b2d;
}

.timeline-item time {
  color: #9a6638;
  font-size: 10px;
  font-weight: 900;
}

.timeline-item h3 {
  margin: 5px 0;
  color: #435c3e;
  font-size: 16px;
}

.timeline-item p {
  margin: 0;
  color: #69573e;
  font-family: "Microsoft YaHei", sans-serif;
  font-size: 12px;
  line-height: 1.7;
}

.timeline-item--featured {
  border: 3px solid rgba(109, 75, 45, 0.56);
  padding: 16px;
  background: rgba(255, 249, 218, 0.45);
  box-shadow: 4px 4px rgba(113, 76, 39, 0.1);
}

.timeline-item--featured::before {
  top: 17px;
  left: -29px;
}

.experience-project {
  color: #674b2e;
}

.experience-project summary {
  color: #435c3e;
  font-size: 12px;
}

.experience-body > p {
  margin-top: 12px;
}

.experience-body .tag-row {
  margin-top: 14px;
}

.contact-card {
  display: grid;
  gap: 20px;
  grid-template-columns: 1.3fr 0.7fr;
  align-items: center;
  border: 3px solid #6d4b2d;
  padding: clamp(18px, 4vw, 34px);
  background: rgba(255, 249, 219, 0.55);
}

.contact-address {
  display: block;
  margin: 9px 0 4px;
  color: #3f6748;
  font-family: Impact, sans-serif;
  font-size: clamp(21px, 3vw, 31px);
  letter-spacing: 0.03em;
}

.contact-actions {
  display: grid;
  gap: 10px;
}

.contact-actions a,
.copy-button,
.menu-card,
.map-legend button {
  border: 3px solid #62442d;
  padding: 12px;
  color: #fff5cd;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  background: #517050;
  box-shadow: 4px 4px rgba(84, 55, 31, 0.25);
}

.copy-button {
  color: #614529;
  background: #e4bc68;
}

.menu-grid {
  grid-template-columns: repeat(2, 1fr);
}

.menu-card {
  display: flex;
  gap: 12px;
  align-items: center;
  min-height: 68px;
  text-align: left;
}

.menu-card span {
  display: grid;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  place-items: center;
  color: #4d3a24;
  font-size: 18px;
  background: #f0ca66;
}

.menu-card b,
.menu-card small {
  display: block;
}

.menu-card small {
  margin-top: 3px;
  color: #d7ddbd;
  font-size: 9px;
}

.menu-card:hover,
.map-legend button:hover {
  filter: brightness(1.12);
  transform: translateY(-2px);
}

.menu-card.is-visited,
.map-legend button.is-visited {
  color: #3f4f32;
  background: #e5bd62;
}

.menu-card.is-visited small {
  color: #66502d;
}

.hotspot.is-visited .hotspot-ring {
  color: #3d522f;
  background: #e6bd59;
  box-shadow:
    0 0 0 4px rgba(51, 38, 23, 0.66),
    0 0 0 9px rgba(255, 237, 160, 0.22),
    0 8px 15px rgba(32, 24, 14, 0.4);
}

.hotspot.is-visited .hotspot-label::after {
  color: #f3cf69;
  content: " ✓";
}

.map-layout {
  display: grid;
  grid-template-columns: 1.45fr 0.75fr;
  gap: 18px;
}

.map-preview {
  min-height: 290px;
  border: 5px solid #6c492d;
  background-image: linear-gradient(rgba(43, 55, 34, 0.04), rgba(43, 55, 34, 0.04)), url("./assets/valley-map-v2.png");
  background-position: center;
  background-size: contain;
  background-repeat: no-repeat;
  background-color: #315a37;
  image-rendering: pixelated;
  box-shadow: inset 0 0 0 4px rgba(255, 244, 197, 0.35);
}

.map-legend {
  display: grid;
  gap: 9px;
  align-content: start;
}

.map-legend button {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 52px;
  text-align: left;
  font-size: 10px;
}

.map-legend button > span:first-child {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  color: #4d3a24;
  font-size: 14px;
  background: #f0ca66;
}

.map-legend button > span:last-child,
.map-legend button b,
.map-legend button small {
  display: block;
  min-width: 0;
}

.map-legend button small {
  margin-top: 3px;
  color: #d7ddbd;
  font-size: 8px;
  line-height: 1.4;
}

.map-legend button.is-visited > span:first-child {
  color: #4d3a24;
  background: #f0ca66;
}

.map-legend button.is-visited small {
  color: #66502d;
}

@keyframes marker-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}

@keyframes loader-step {
  0%, 24% { background-position: 0 0; }
  25%, 49% { background-position: 33.3333% 0; }
  50%, 74% { background-position: 66.6667% 0; }
  75%, 100% { background-position: 100% 0; }
}

@keyframes intro-bubble-bob {
  to { transform: translate(-50%, -3px) scale(1); }
}

@keyframes destination-pulse {
  0%, 100% { transform: translate(-50%, -50%) scale(0.72); }
  50% { transform: translate(-50%, -50%) scale(1); }
}

@keyframes cloud-drift {
  to { transform: translateX(140vw); }
}

@keyframes sun-pulse {
  to { opacity: 0.68; }
}

@keyframes fade-in {
  from { opacity: 0; }
}

@keyframes panel-pop {
  from { opacity: 0; transform: translateY(22px) scale(0.94); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 760px) {
  .world {
    background-position: 51% center;
  }

  .hud {
    padding: 13px;
  }

  .brand {
    padding: 8px 10px 8px 8px;
  }

  .brand-mark {
    width: 28px;
    height: 28px;
  }

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

  .brand small,
  .quest-tip,
  .hud-button:first-child {
    display: none;
  }

  .hud-button {
    min-width: auto;
    padding: 10px 12px;
  }

  .hotspot {
    display: none;
  }

  .mobile-dock {
    position: fixed;
    z-index: 12;
    right: 9px;
    bottom: max(9px, env(safe-area-inset-bottom));
    left: 9px;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    border: 3px solid #f1dfa5;
    padding: 5px;
    background: rgba(37, 54, 36, 0.93);
    box-shadow: 0 6px 0 rgba(45, 31, 18, 0.35);
    opacity: 0;
    transform: translateY(120%);
    transition: opacity 0.5s ease 0.35s, transform 0.5s ease 0.35s;
  }

  .is-entered .mobile-dock {
    opacity: 1;
    transform: none;
  }

  .mobile-dock button {
    display: grid;
    gap: 3px;
    border: 0;
    padding: 7px 2px;
    color: #f4e7ba;
    font-size: 8px;
    cursor: pointer;
    background: transparent;
  }

  .mobile-dock button span {
    color: #f1c75d;
    font-size: 15px;
  }

  .mobile-dock button.is-visited {
    color: #fff5cb;
    background: rgba(229, 189, 98, 0.14);
  }

  .mobile-dock button.is-visited span {
    color: #fff2a7;
  }

  .splash-card {
    padding: 32px 18px;
  }

  .splash h1 {
    font-size: clamp(44px, 16vw, 72px);
  }

  .splash-subtitle {
    font-size: 14px;
    letter-spacing: 0.16em;
  }

  .splash-note {
    line-height: 1.6;
  }

  .dialog {
    padding: 12px;
  }

  .wood-panel {
    width: calc(100vw - 24px);
    max-height: calc(100dvh - 30px);
    border-width: 8px;
    padding: 7px;
  }

  .panel-paper {
    max-height: calc(100dvh - 62px);
    padding: 27px 20px 34px;
  }

  .dialog-close {
    top: -10px;
    right: -9px;
    width: 39px;
    height: 39px;
    border-width: 3px;
    font-size: 24px;
  }

  .panel-footer {
    display: none;
  }

  .stats-grid,
  .project-grid,
  .skill-garden,
  .notes-grid,
  .contact-card,
  .menu-grid,
  .map-layout {
    grid-template-columns: 1fr;
  }

  .project-card {
    min-height: auto;
  }

  .map-preview {
    min-height: 190px;
  }
}

@media (max-height: 610px) and (min-width: 761px) {
  .splash-card {
    padding: 24px 42px;
  }

  .splash h1 {
    font-size: 64px;
  }

  .splash-subtitle {
    margin: 12px 0 18px;
  }

  .splash-note {
    margin-top: 15px;
  }

  .quest-tip {
    bottom: 18px;
  }
}

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