/* ===========================================================================
   STARDEW WEDDING · 星露谷视觉系统
   南瓜橙 / 麦穗金 / 羊皮纸 + 深林墨绿底；木牌、羊皮纸对话卡、萤火、像素硬阴影

   配色来源（从素材实测采样，非凭空指定）：
     #f2b647  镇地图最高频色（沙土/麦田金）→ --wheat
     #0b2e29  镇地图深林墨绿              → --night
     #5c382c  镇地图木屋褐                → --wood
     #0344aa  封面星夜蓝                  → --sky
     #44a31a  镇地图草地绿                → --leaf

   中文大字遵循三层 text-shadow 铁律（禁用 -webkit-text-stroke）
   =========================================================================== */

:root {
  /* ── 主色：南瓜橙（行动色：按钮、强调块）── */
  --pumpkin:   #e08b2f;
  --pumpkin-d: #a1531a;
  --pumpkin-x: #6d3310;

  /* ── 辅色：麦穗金（权威色：标题、描边、星级）── */
  --wheat:     #f2b647;
  --wheat-l:   #ffd97a;
  --wheat-d:   #c08a1e;

  /* ── 羊皮纸 ── */
  --cream:     #f7f0dc;
  --parch:     #eadfbd;
  --parch-d:   #d6c69a;

  /* ── 木牌 ── */
  --wood:      #5c382c;
  --wood-l:    #8a5a3c;
  --wood-d:    #3a2118;

  /* ── 深夜底：深林墨绿 + 星夜蓝 ── */
  --night:     #10231f;
  --night-d:   #081512;
  --night-2:   #17302a;
  --night-3:   #22443a;
  --sky:       #0a3a86;
  --sky-l:     #4a86d8;

  /* ── 功能点缀 ── */
  --leaf:      #5fbf2e;   /* 正确 / 完成态（替代通用主题的青色） */
  --leaf-d:    #2f7a1c;
  --river:     #5bb4d8;   /* 信息 / 链接 / 地图控制台 */
  --blossom:   #e9a3c4;   /* 樱花粉（镇地图粉树） */

  --ink:       #2b1a10;   /* 羊皮纸上的墨色 */
  --muted:     #8fa39a;
  --shadow:    0 0 24px #00000066;
}

/* ===== 全局 ===== */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--night-d); }
body {
  margin: 0;
  background:
    repeating-linear-gradient(0deg, #00000000 0 23px, #ffffff05 23px 24px),
    linear-gradient(180deg, var(--night-2) 0%, var(--night) 28%, var(--night-2) 58%, var(--night-d) 100%);
  color: var(--cream);
  font-family: "Arial Narrow", "Microsoft YaHei", sans-serif;
  /* 反常规做法：默认开启抗锯齿保证中文清晰，仅对英文像素 UI 单独关掉 */
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
button, input, select, textarea { font: inherit; color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }

/* 英文像素 UI：关掉抗锯齿换取锯齿感（只作用于纯英文小字） */
.hero-hud, .mission-code, .hero-en, .game-console-top, .game-stats,
.card-top, .game-legend, .coordinate, .board-title, .phone-top,
.app-bar, .footer-logo, .menu-total, .countdown-card, .section-title div p,
.ticket-tag, .hud-order small, .hud-score small, .hud-score b,
.crew-controls output, .menu-item .time, .demo-notice, .game-tip {
  -webkit-font-smoothing: none;
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ===== 手机外壳 ===== */
.phone-shell {
  width: min(100%, 480px);
  margin: auto;
  overflow: hidden;
  background: var(--night);
  box-shadow: var(--shadow);
  position: relative;
}

/* ===== ① 首页 · 星夜树林 ===== */
.hero { position: relative; min-height: 100svh; overflow: hidden; background: #041024; }
.hero-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 42%; }
.hero-shade {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 50% 34%, transparent 0%, #04201c55 58%, #04140f 100%),
    linear-gradient(180deg, #041024aa 0%, transparent 26% 34%, #0b1f1a8c 68%, #061411 100%);
}
.hero-sparkle {
  position: absolute; inset: 0; pointer-events: none; opacity: .6;
  background-image:
    radial-gradient(circle, var(--wheat-l) 0 1.4px, transparent 2.2px),
    radial-gradient(circle, #cdf58a 0 1.1px, transparent 1.8px),
    radial-gradient(circle, var(--blossom) 0 1px, transparent 1.6px);
  background-position: 12% 14%, 76% 22%, 46% 7%;
  background-size: 128px 118px, 172px 142px, 224px 198px;
  animation: spark 3.2s steps(3) infinite;
}
@keyframes spark { 0%,100% { opacity: .42 } 50% { opacity: .88 } }

.hero-hud {
  position: absolute; z-index: 3; top: max(13px, env(safe-area-inset-top));
  left: 14px; right: 14px;
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 11px; gap: 6px;
  border: 2px solid var(--wheat);
  border-radius: 0;
  color: var(--wheat);
  background: #04140fcc;
  font: 900 8px/1 "Courier New", monospace;
  letter-spacing: .1em;
  box-shadow: 0 3px 0 var(--wood-d);
}
.hero-hud b { color: var(--pumpkin); font-size: 10px; }

.hero-brand {
  position: absolute; z-index: 3; top: 12%;
  left: 50%; width: min(calc(100% - 36px), 300px);
  transform: translateX(-50%);
  filter: drop-shadow(0 4px 0 #5a3a0e) drop-shadow(0 9px 16px #000000aa);
}
.hero-brand img { width: 100%; height: auto; }

.hero-copy {
  position: absolute; z-index: 3; top: 40%; left: 18px; right: 18px;
  text-align: center;
}
.mission-code {
  display: inline-block; padding: 7px 13px; margin: 0;
  border: 3px solid var(--wood-d);
  border-radius: 0;
  color: var(--wood-d); background: var(--wheat);
  box-shadow: 4px 5px 0 var(--pumpkin-d);
  font: 900 clamp(9px, 2.6vw, 12px)/1 "Courier New", monospace;
  letter-spacing: .1em;
}
.hero-kicker { margin: 14px 0 4px; color: var(--cream); font-size: 11px; font-weight: 900; letter-spacing: .3em; }
.hero h1 {
  margin: 6px 0 0; color: var(--wheat-l);
  font: 900 clamp(32px, 10.5vw, 50px)/1.06
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
    "Noto Sans SC", "Noto Sans CJK SC", sans-serif;
  letter-spacing: .09em;
  text-wrap: balance;   /* 占位符姓名较长时避免断成「新娘」+「名字」这类残行 */
  /* 三层硬阴影模拟描边：浅麦金下沿 + 深南瓜描边 + 墨绿投影（禁用 text-stroke） */
  text-shadow:
    0 3px 0 var(--pumpkin-d),
    0 6px 0 var(--pumpkin-x),
    0 10px 15px #04140fcc;
  -webkit-font-smoothing: antialiased;
}
.hero-en { margin: 12px 0 0; color: var(--cream); font: 900 12px/1 "Courier New", monospace; letter-spacing: .18em; opacity: .85; }
.mission-ticket {
  display: grid; grid-template-columns: 44px 1fr; gap: 4px 8px;
  width: min(92%, 350px); margin: 18px auto 0;
  padding: 11px 13px;
  border: 2px dashed var(--wheat);
  border-radius: 0;
  background: #04140fcc; color: var(--cream);
  text-align: left;
  box-shadow: 0 4px 14px #00000077;
}
.mission-ticket span { color: var(--wheat); font: 900 8px/1.6 "Courier New", monospace; }
.mission-ticket b { font-size: 12px; line-height: 1.3; }
.hero-venue { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.enter-button {
  position: absolute; z-index: 3;
  left: 50%; bottom: calc(96px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  display: flex; align-items: center; gap: 10px;
  padding: 15px 24px;
  border: 3px solid var(--wheat-l);
  border-radius: 0;
  background: linear-gradient(180deg, var(--pumpkin) 0%, var(--pumpkin-d) 100%);
  color: var(--cream); font: 900 14px/1 sans-serif;
  letter-spacing: .1em;
  white-space: nowrap;   /* 同 quick-nav：只给 left:50% 时可用宽度只剩半屏，不加会折行 */
  box-shadow: 0 5px 0 var(--pumpkin-x), 0 9px 18px #00000099;
  cursor: pointer;
  animation: bounce 1.7s steps(2) infinite;
}
.enter-button:active { transform: translateX(-50%) translateY(3px); box-shadow: 0 2px 0 var(--pumpkin-x), 0 5px 10px #00000077; }
.enter-button b { font-size: 15px; color: var(--wheat-l); }
@keyframes bounce { 0%,100% { transform: translateX(-50%) translateY(0) } 50% { transform: translateX(-50%) translateY(-5px) } }

/* 底部依次让位给快捷导航（约 57px 高） */
.start-note {
  position: absolute; z-index: 3; left: 0; right: 0;
  bottom: calc(66px + env(safe-area-inset-bottom));
  margin: 0; text-align: center; color: var(--muted);
  font-size: 10px; letter-spacing: .14em;
}

/* ===== 滚动 HUD ===== */
/* 隐藏态必须用 visibility，不能只靠 translateY：
   sticky 元素的常规流位置在首屏之下，translateY(-100%) 只抬自身高度，首屏底部仍会露出。 */
.game-hud {
  position: sticky; z-index: 5; top: 0;
  display: flex; justify-content: space-between; align-items: center;
  margin: 0 14px; padding: 9px 12px; gap: 8px;
  background: #04140fee; backdrop-filter: blur(8px);
  border: 2px solid var(--wheat); border-bottom-width: 3px;
  border-radius: 0 0 2px 2px;
  transform: translateY(-100%);
  visibility: hidden;
  transition: transform .35s ease, visibility .35s;
}
.game-hud.visible { transform: translateY(0); visibility: visible; }
.hud-order { display: flex; flex-direction: column; gap: 2px; }
.hud-order small { color: var(--muted); font: 900 8px/1 "Courier New", monospace; letter-spacing: .14em; }
.hud-order b { color: var(--cream); font: 900 11px/1 sans-serif; }
.hud-score { display: flex; align-items: center; gap: 5px; }
.hud-score span { color: var(--wheat); font-size: 14px; }
.hud-score b { color: var(--pumpkin); font: 900 14px/1 "Courier New", monospace; }
.hud-score small { color: var(--muted); font: 900 8px/1 "Courier New", monospace; letter-spacing: .1em; }

/* ===== 通用 section ===== */
.story-section {
  position: relative; padding: 36px 20px 28px;
}
/* 土壤分隔条：深褐土壤 + 麦金短划（用伪元素，避免被各 section 的 background 盖掉） */
.story-section::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 8px; z-index: 2;
  background: repeating-linear-gradient(90deg,
    var(--wood-d) 0 12px,
    var(--wood) 12px 20px,
    var(--wheat-d) 20px 22px,
    var(--wood) 22px 30px);
}
.section-title { display: flex; align-items: center; gap: 13px; margin: 0 0 18px; color: var(--cream); }
.section-title span {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; flex-shrink: 0;
  background: var(--pumpkin); color: var(--wheat-l);
  border: 2px solid var(--wheat);
  border-radius: 0;
  font: 900 15px/1 sans-serif;
  box-shadow: 0 3px 0 var(--pumpkin-x);
  -webkit-font-smoothing: none;
}
.section-title div p { margin: 0 0 3px; color: var(--wheat); font: 900 9px/1 "Courier New", monospace; letter-spacing: .18em; }
.section-title h2 {
  margin: 0;
  font: 900 19px/1.15 "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  letter-spacing: .08em; color: var(--cream);
  -webkit-font-smoothing: antialiased;
}
.section-title.light span { background: var(--wheat); color: var(--wood-d); }

/* 渐入动画 */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.reveal.show { opacity: 1; transform: translateY(0); }

/* ===== ② 接委托 ===== */
.briefing { background: radial-gradient(circle at 50% 0%, #2b4a1c 0%, var(--night) 68%); }
.lantern-glow {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle at 50% 24%, #ffc35a28 0%, transparent 52%);
}
.firefly-field {
  position: absolute; inset: 0; pointer-events: none; opacity: .55;
  background-image:
    radial-gradient(circle, #d9f58a99 0 2px, transparent 3px),
    radial-gradient(circle, #ffe8a377 0 1.5px, transparent 2.5px);
  background-position: 18% 60%, 74% 34%;
  background-size: 74px 88px, 108px 116px;
  animation: firefly 9s linear infinite;
}
@keyframes firefly {
  from { background-position: 18% 100%, 74% 80%; }
  to   { background-position: 18% -20%, 74% -40%; }
}

/* 羊皮纸委托卡 */
.order-card {
  position: relative;
  padding: 17px 15px 15px; margin-bottom: 20px;
  border: 3px solid var(--wood-d);
  border-radius: 0;
  background:
    repeating-linear-gradient(0deg, #00000000 0 25px, #b99a5f33 25px 26px),
    linear-gradient(180deg, var(--cream) 0%, var(--parch) 100%);
  color: var(--ink);
  box-shadow: inset 0 0 0 2px var(--parch-d), 0 7px 0 #00000055;
}
.card-top {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 8px; padding-bottom: 7px;
  border-bottom: 2px dashed var(--wood-l);
  font: 900 10px/1 "Courier New", monospace; letter-spacing: .12em;
}
.card-top span { color: var(--wood); }
.card-top b { color: var(--wood-d); background: var(--wheat); padding: 3px 7px; border-radius: 0; font-size: 9px; border: 2px solid var(--wood-d); }

.order-card h3 {
  margin: 6px 0 8px;
  font: 900 20px/1.25 "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--pumpkin-d); letter-spacing: .06em;
  -webkit-font-smoothing: antialiased;
}
.order-card p { margin: 0 0 12px; font-size: 13px; line-height: 1.7; color: #3a2515; }
.order-card dl { margin: 0 0 15px; padding: 0; }
.order-card dl > div {
  display: grid; grid-template-columns: 62px 1fr; gap: 8px;
  padding: 6px 0; border-bottom: 1px dotted #a8895c;
  font: 900 11px/1.3 "Courier New", monospace;
}
.order-card dl > div:last-child { border-bottom: 0; }
.order-card dt { color: var(--wood); letter-spacing: .12em; }
.order-card dd { margin: 0; color: var(--ink); }

.accept-button {
  display: block; width: 100%;
  padding: 14px;
  border: 3px solid var(--wood-d);
  border-radius: 0;
  background: linear-gradient(180deg, var(--pumpkin) 0%, var(--pumpkin-d) 100%);
  color: var(--cream); font: 900 15px/1 sans-serif; letter-spacing: .12em;
  box-shadow: 0 4px 0 var(--pumpkin-x);
  cursor: pointer;
  user-select: none; -webkit-user-select: none;
  touch-action: none;
}
.hold-progress { height: 6px; margin-top: 8px; border: 1px solid var(--wood-d); border-radius: 0; background: #d6c69a88; overflow: hidden; }
.hold-progress i { display: block; height: 100%; width: 0; background: var(--wheat); transition: width .1s linear; }

.mission-complete {
  display: none; margin: 0 0 16px; padding: 12px;
  border: 3px solid var(--leaf-d);
  border-radius: 0;
  background: #16301a; text-align: center; color: var(--cream);
  box-shadow: 0 0 18px #5fbf2e66;
}
.mission-complete.show { display: block; animation: glowPulse 1.3s steps(2) infinite; }
.mission-complete b { display: block; color: var(--leaf); font: 900 13px/1 "Courier New", monospace; letter-spacing: .16em; margin-bottom: 4px; }
.mission-complete span { font-size: 12px; }
@keyframes glowPulse { 0%,100% { box-shadow: 0 0 14px #5fbf2e55 } 50% { box-shadow: 0 0 26px #5fbf2e99 } }

/* 镇长木牌（证婚人） */
.mayor-stage {
  position: relative; margin: 0 auto 26px; max-width: 360px;
  padding: 14px 14px 14px 106px; min-height: 128px;
  border: 3px solid var(--wood-d);
  border-radius: 0;
  background:
    repeating-linear-gradient(0deg, #00000000 0 21px, #00000018 21px 22px),
    linear-gradient(135deg, var(--wood-l) 0%, var(--wood) 100%);
  box-shadow: inset 0 0 0 3px var(--wheat), 0 7px 0 #00000055, 0 10px 26px #00000088;
}
.mayor-stage img {
  position: absolute; left: -4px; bottom: -8px;
  width: 106px; height: auto;
  image-rendering: pixelated;
  filter: drop-shadow(0 4px 0 #2a1a10);
  animation: sway 3.6s steps(2) infinite;
}
@keyframes sway { 0%,100% { transform: rotate(-2deg) } 50% { transform: rotate(2deg) } }
.mayor-bubble b { display: block; color: var(--wheat-l); font: 900 11px/1 "Courier New", monospace; letter-spacing: .16em; margin-bottom: 6px; -webkit-font-smoothing: none; }
.mayor-bubble span { font-size: 13px; line-height: 1.6; color: var(--cream); }

/* ===== ③ 限时装箱小游戏 ===== */
.bundle-game {
  position: relative;
  margin: 6px -4px 0; padding: 14px 14px 16px;
  border: 3px solid var(--wood-d);
  border-radius: 0;
  background:
    repeating-linear-gradient(45deg, #2e5d16 0 8px, #1e3d10 8px 16px),
    linear-gradient(180deg, #1e3d10 0%, #0c1c08 100%);
  color: var(--cream);
  box-shadow: inset 0 0 0 2px var(--wheat), 0 6px 18px #00000088;
}
.game-console-top {
  display: flex; justify-content: space-between; align-items: flex-end;
  margin-bottom: 10px; padding-bottom: 10px;
  border-bottom: 2px solid var(--wheat);
}
.game-console-top small { display: block; color: var(--wheat); font: 900 9px/1.2 "Courier New", monospace; letter-spacing: .16em; margin-bottom: 3px; }
.game-console-top b { color: var(--cream); font: 900 14px/1.25 sans-serif; letter-spacing: .05em; }
.game-console-top span { color: var(--wheat); font: 900 10px/1 "Courier New", monospace; }
.game-console-top strong { color: var(--cream); font-size: 13px; }

.game-stats {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px 8px;
  margin-bottom: 10px; padding: 8px 10px;
  background: #00000066; border: 1px solid var(--wheat); border-radius: 0;
  font: 900 10px/1.2 "Courier New", monospace;
}
.game-stats span { display: flex; justify-content: space-between; color: var(--cream); }
.game-stats b { color: var(--wheat); }

.order-ticket {
  display: flex; align-items: center; gap: 8px; margin-bottom: 10px;
  padding: 8px 10px;
  background: var(--cream); color: var(--ink);
  border: 2px solid var(--wood-d); border-radius: 0;
  box-shadow: 3px 4px 0 var(--wood-d);
}
.order-ticket.show { display: flex; }
.ticket-tag {
  background: var(--pumpkin); color: var(--cream);
  padding: 3px 7px; border-radius: 0;
  font: 900 9px/1.2 "Courier New", monospace; letter-spacing: .12em;
}
.order-ticket b { font: 900 13px/1 sans-serif; letter-spacing: .05em; }
.order-parts { display: flex; gap: 4px; flex-wrap: wrap; }
.order-parts .part-chip {
  width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center;
  background: #fff3cfcc; border: 1.5px solid var(--wood-d); border-radius: 0;
  font-size: 14px;
}
.order-parts .part-chip.done { background: var(--leaf); border-color: var(--wood-d); }
.order-parts .part-chip.current { outline: 2px solid var(--pumpkin); outline-offset: 1px; }

.game-stage {
  position: relative;
  padding: 12px;
  background:
    radial-gradient(ellipse at 50% 0%, #ffe08a33 0%, transparent 70%),
    linear-gradient(180deg, #0c1c08 0%, #060f04 100%);
  border: 2px solid var(--wheat); border-radius: 0;
  min-height: 240px;
  overflow: hidden;
}
.game-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.game-tile {
  aspect-ratio: 1 / 1;
  display: flex; align-items: center; justify-content: center;
  font-size: 30px;
  background: linear-gradient(180deg, #fff0c4 0%, #d8ac5c 100%);
  border: 2.5px solid var(--wood-d); border-radius: 0;
  box-shadow: 0 4px 0 var(--wood-d), inset 0 -3px 0 #a8895c88;
  cursor: pointer;
  transition: transform .12s ease;
  user-select: none; -webkit-user-select: none;
  touch-action: manipulation;
}
.game-tile:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--wood-d); }
.game-tile.flash-correct { animation: flashGood .35s ease; }
.game-tile.flash-wrong { animation: flashBad .35s ease; }
@keyframes flashGood { 0% { background: linear-gradient(180deg, var(--leaf), var(--leaf-d)); } 100% { background: linear-gradient(180deg, #fff0c4, #d8ac5c); } }
@keyframes flashBad  { 0% { background: linear-gradient(180deg, var(--pumpkin), var(--pumpkin-d)); } 100% { background: linear-gradient(180deg, #fff0c4, #d8ac5c); } }

.game-intro, .game-result {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 8px;
  background: #06120acc; backdrop-filter: blur(4px);
  text-align: center; padding: 20px;
}
.game-crate { font-size: 40px; }
.game-intro h3, .game-result h3 {
  margin: 0; color: var(--wheat-l); font: 900 18px/1.25 "PingFang SC", "Microsoft YaHei", sans-serif;
  letter-spacing: .06em; -webkit-font-smoothing: antialiased;
}
.game-intro p, .game-result span { margin: 0; color: var(--cream); font-size: 12px; line-height: 1.7; }
.game-intro button, .game-result button, .submit-button {
  margin-top: 6px; padding: 11px 20px;
  border: 3px solid var(--wood-d); border-radius: 0;
  background: linear-gradient(180deg, var(--pumpkin), var(--pumpkin-d));
  color: var(--cream); font: 900 13px/1 sans-serif; letter-spacing: .12em;
  box-shadow: 0 4px 0 var(--pumpkin-x);
  cursor: pointer;
}
.game-result strong { display: block; margin: 2px 0; color: var(--wheat); font: 900 28px/1 "Courier New", monospace; letter-spacing: .04em; -webkit-font-smoothing: none; }
.game-result > span { color: var(--cream); font: 900 18px/1 sans-serif; letter-spacing: .1em; margin-bottom: 4px; }
.game-result > b { display: block; padding: 6px 10px; background: var(--leaf); color: #0b2107; border-radius: 0; font-size: 12px; }

.game-legend {
  display: flex; justify-content: space-around;
  margin-top: 10px; padding: 7px 8px;
  background: #00000055; border-radius: 0;
  font: 900 10px/1 "Courier New", monospace;
}
.game-legend span { color: var(--cream); }
.game-tip { margin: 10px 0 0; text-align: center; color: var(--wheat); font-size: 11px; letter-spacing: .04em; }

/* ===== ④ 村民来电 ===== */
.crew-section { background: radial-gradient(circle at 50% 0%, #2a4a2e 0%, var(--night) 68%); }
.crew-phone {
  position: relative; padding: 12px 12px 16px;
  border: 3px solid var(--wood-d); border-radius: 0;
  background:
    repeating-linear-gradient(0deg, #00000000 0 21px, #00000014 21px 22px),
    linear-gradient(180deg, var(--wood-l) 0%, var(--wood) 100%);
  box-shadow: inset 0 0 0 3px var(--wheat), 0 6px 0 #00000055, 0 8px 22px #00000088;
}
.phone-top {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 10px; padding-bottom: 8px;
  border-bottom: 1px dashed var(--wheat); color: var(--wheat-l);
  font: 900 10px/1 "Courier New", monospace; letter-spacing: .16em;
}
.phone-top b { color: var(--leaf); }
.crew-slides { position: relative; min-height: 258px; }
.crew-slide {
  display: none; flex-direction: column; align-items: center; text-align: center;
  padding: 8px 4px 0; gap: 10px;
}
.crew-slide.active { display: flex; animation: fadeIn .35s ease; }
@keyframes fadeIn { from { opacity: 0 } to { opacity: 1 } }
.crew-photo {
  width: 128px; height: 128px;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle, var(--cream) 0%, var(--parch-d) 100%);
  border: 3px solid var(--wheat); border-radius: 0;
  box-shadow: 0 4px 0 var(--wood-d), inset 0 -3px 0 #a8895caa;
  overflow: hidden;
}
.crew-photo img { width: 94%; height: 94%; object-fit: contain; image-rendering: pixelated; }
.crew-name { margin: 0; color: var(--wheat-l); font: 900 14px/1 sans-serif; letter-spacing: .1em; }
.crew-msg {
  margin: 0; padding: 10px 13px;
  background: linear-gradient(180deg, var(--cream) 0%, var(--parch) 100%);
  color: var(--ink); border: 2px solid var(--wood-d); border-radius: 0;
  font-size: 13px; line-height: 1.7; max-width: 92%;
  box-shadow: 0 3px 0 #00000055;
}

.crew-controls {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 12px; padding: 6px 4px;
}
.crew-controls button {
  width: 42px; height: 42px;
  border: 2px solid var(--wheat); border-radius: 0;
  background: transparent; color: var(--wheat-l);
  font: 900 14px/1 sans-serif; cursor: pointer;
  box-shadow: 0 3px 0 var(--wood-d);
}
.crew-controls button:active { background: var(--wheat); color: var(--wood-d); }
.crew-controls output { color: var(--wheat-l); font: 900 11px/1 "Courier New", monospace; letter-spacing: .12em; }

/* ===== ⑤ 婚礼当天日程 ===== */
.schedule-section {
  background: linear-gradient(180deg, #0c1c08 0%, #2e5d16 50%, #0c1c08 100%);
  border-top: 0;
}
.farm-screen {
  position: relative; margin: 0 0 18px;
  border: 3px solid var(--wood-d); border-radius: 0;
  overflow: hidden;
  box-shadow: inset 0 0 0 3px var(--wheat), 0 6px 0 #00000055;
}
.farm-screen img { width: 100%; height: auto; }
.farm-status {
  position: absolute; top: 12px; right: 12px;
  display: flex; align-items: center; gap: 6px;
  padding: 6px 10px; background: var(--wheat); color: var(--wood-d);
  border: 2px solid var(--wood-d); border-radius: 0;
  font: 900 9px/1 "Courier New", monospace; letter-spacing: .1em;
  -webkit-font-smoothing: none;
}
.farm-status i { width: 8px; height: 8px; background: var(--pumpkin-d); border-radius: 0; animation: blink 1.2s steps(2) infinite; }
@keyframes blink { 0%,100% { opacity: 1 } 50% { opacity: .25 } }

.menu-board {
  padding: 14px 12px 12px;
  border: 3px solid var(--wood-d); border-radius: 0;
  background:
    repeating-linear-gradient(0deg, #00000000 0 25px, #ffffff0d 25px 26px),
    linear-gradient(180deg, #241409 0%, #150b04 100%);
  color: var(--cream);
  box-shadow: inset 0 0 0 3px var(--wheat), 0 6px 14px #00000088;
}
.board-title { margin: 0 0 10px; text-align: center; color: var(--wheat); font: 900 11px/1 "Courier New", monospace; letter-spacing: .2em; }
.menu-item {
  display: grid; grid-template-columns: 58px 1fr auto; gap: 10px;
  padding: 9px 8px; border-bottom: 1px dashed #f2b64755;
  font-size: 12px;
}
.menu-item:last-child { border-bottom: 0; }
.menu-item .time { color: var(--wheat); font: 900 14px/1 "Courier New", monospace; }
.menu-item h4 {
  margin: 0 0 3px; color: var(--cream);
  font: 900 13px/1.3 "PingFang SC", "Microsoft YaHei", sans-serif;
  letter-spacing: .06em; -webkit-font-smoothing: antialiased;
}
.menu-item p { margin: 0; color: #cdbb8c; font-size: 11px; line-height: 1.6; }
.menu-item .stars { color: var(--wheat); font: 900 13px/1 sans-serif; letter-spacing: .04em; }
.menu-total {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 8px; padding-top: 8px;
  border-top: 2px solid var(--wheat);
  font: 900 11px/1 "Courier New", monospace; letter-spacing: .16em;
}
.menu-total span { color: var(--wheat); }
.menu-total b { color: var(--leaf); font-size: 16px; }

.countdown-card {
  display: flex; align-items: baseline; justify-content: center; gap: 8px;
  margin: 20px auto 0; padding: 14px 18px;
  border: 3px solid var(--river); border-radius: 0;
  background: #04140f; color: var(--river);
  box-shadow: 0 0 18px #5bb4d855, inset 0 0 0 1px var(--river);
  width: fit-content;
}
.countdown-card span { font: 900 10px/1 "Courier New", monospace; letter-spacing: .18em; color: var(--cream); }
.countdown-card b { font: 900 36px/1 "Courier New", monospace; color: var(--wheat); letter-spacing: .04em; }
.countdown-card small { font: 900 10px/1 "Courier New", monospace; letter-spacing: .18em; color: var(--cream); }

.gift-note {
  margin: 18px 0 0; padding: 10px 14px;
  border-left: 5px solid var(--wheat);
  background: var(--night-2);
  border-radius: 0;
}
.gift-note b { display: block; color: var(--wheat); font: 900 10px/1 "Courier New", monospace; letter-spacing: .18em; margin-bottom: 4px; }
.gift-note span { color: var(--cream); font-size: 12px; line-height: 1.7; }

/* ===== ⑥ 农场导航 ===== */
.arrival { background: radial-gradient(circle at 50% 100%, #1c3a52 0%, var(--night) 70%); }
.map-console {
  position: relative; padding: 22px 18px 18px;
  border: 3px solid var(--river); border-radius: 0;
  background: #04141c;
  box-shadow: 0 0 22px #5bb4d855, inset 0 0 18px #5bb4d822;
  text-align: center;
  overflow: hidden;
}
/* 真实鹈鹕镇地图作底：低透明度铺底，既点题又不抢正文 */
.map-art {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: .18; filter: saturate(.7) brightness(.7);
  z-index: 0;
}
/* 内容层统一抬到地图之上；.map-art / .map-grid 单独保持绝对定位 */
.map-console > * { position: relative; z-index: 1; }
.map-grid {
  position: absolute; inset: 8px; pointer-events: none;
  background-image:
    linear-gradient(var(--river) 1px, transparent 1px),
    linear-gradient(90deg, var(--river) 1px, transparent 1px);
  background-size: 30px 30px;
  opacity: .14; border-radius: 0; z-index: 0;
}
.map-pulse { position: relative; margin: 0 auto 14px; width: 64px; height: 64px; z-index: 1; }
.map-pulse i, .map-pulse b { position: absolute; inset: 0; margin: auto; border-radius: 50%; }
.map-pulse i { width: 100%; height: 100%; background: var(--wheat); opacity: .25; animation: pulseRing 1.6s ease infinite; }
.map-pulse b {
  width: 36px; height: 36px;
  background: var(--pumpkin); color: var(--wheat-l);
  border: 3px solid var(--wheat);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  box-shadow: 0 0 18px var(--pumpkin);
}
@keyframes pulseRing { 0% { transform: scale(.6); opacity: .5 } 100% { transform: scale(1.3); opacity: 0 } }
.coordinate { margin: 0 0 4px; color: var(--river); font: 900 10px/1 "Courier New", monospace; letter-spacing: .2em; }
.map-console h3 {
  margin: 0 0 8px; color: var(--wheat-l);
  font: 900 16px/1.35 "PingFang SC", "Microsoft YaHei", sans-serif;
  letter-spacing: .05em; -webkit-font-smoothing: antialiased;
}
.map-console p { margin: 0 0 14px; color: var(--cream); font-size: 12px; line-height: 1.7; }
.map-console a {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 11px 18px; border: 2px solid var(--river); border-radius: 0;
  background: #04141fcc; color: var(--river);
  font: 900 12px/1 sans-serif; letter-spacing: .12em;
  text-decoration: none;
}
.map-console a:active { background: var(--river); color: #04141c; }

/* ===== ⑦ 村民报到 ===== */
.rsvp-section { background: linear-gradient(180deg, var(--night) 0%, var(--night-2) 100%); }
.rsvp-phone {
  padding: 14px 14px 16px;
  border: 3px solid var(--wood-d); border-radius: 0;
  background:
    repeating-linear-gradient(0deg, #00000000 0 21px, #00000014 21px 22px),
    linear-gradient(180deg, var(--wood-l) 0%, var(--wood) 100%);
  box-shadow: inset 0 0 0 3px var(--wheat), 0 6px 18px #00000066;
}
.app-bar {
  display: flex; align-items: center; gap: 8px; padding-bottom: 8px;
  border-bottom: 1px dashed var(--wheat);
  color: var(--wheat-l); font: 900 10px/1 "Courier New", monospace; letter-spacing: .16em;
}
.app-bar span { color: var(--pumpkin); font-size: 12px; }
.app-bar small { margin-left: auto; color: var(--leaf); font-size: 9px; letter-spacing: .12em; }
.rsvp-phone form { padding-top: 12px; }
.demo-notice {
  margin: 0 0 14px; padding: 8px 10px;
  background: #00000044; border-left: 3px solid var(--wheat);
  color: var(--wheat-l); font-size: 11px; line-height: 1.6;
}
.rsvp-phone label { display: block; margin: 0 0 12px; }
.rsvp-phone label > span { display: block; margin-bottom: 5px; color: var(--cream); font-size: 12px; font-weight: 900; letter-spacing: .06em; }
.rsvp-phone label > span b { color: var(--wheat); }
.rsvp-phone input, .rsvp-phone select, .rsvp-phone textarea {
  width: 100%; padding: 10px 11px;
  border: 2px solid var(--wood-d); border-radius: 0;
  background: var(--cream); color: var(--ink);
  font-size: 13px; line-height: 1.45; letter-spacing: .02em;
  outline: none;
}
.rsvp-phone input::placeholder, .rsvp-phone textarea::placeholder { color: #8a7654; }
.rsvp-phone input:focus, .rsvp-phone select:focus, .rsvp-phone textarea:focus {
  border-color: var(--pumpkin-d);
  box-shadow: 0 0 0 3px #f2b64766;
}
.rsvp-phone fieldset { border: 0; padding: 0; margin: 0 0 12px; }
.rsvp-phone legend { padding: 0 0 6px; color: var(--cream); font-size: 12px; font-weight: 900; letter-spacing: .06em; }
.rsvp-phone legend b { color: var(--wheat); }
.choice-row { display: flex; gap: 8px; }
.choice-row label {
  flex: 1; margin: 0; padding: 10px;
  border: 2px solid var(--wood-d); border-radius: 0;
  background: var(--cream);
  text-align: center; cursor: pointer;
}
.choice-row input { display: none; }
.choice-row span { display: block; color: var(--ink); font: 900 12px/1 sans-serif; letter-spacing: .06em; }
.choice-row label:has(input:checked) { background: var(--leaf); border-color: var(--wood-d); box-shadow: inset 0 0 0 2px var(--wheat); }
.choice-row label:has(input:checked) span { color: #0b2107; }
.rsvp-phone textarea { resize: vertical; min-height: 70px; font-size: 13px; }
.rsvp-phone label small { display: flex; justify-content: flex-end; margin-top: 3px; color: var(--parch-d); font: 900 10px/1 "Courier New", monospace; }
.rsvp-phone label small output { color: var(--wheat-l); }
.form-error {
  margin: 0 0 10px; padding: 8px 10px;
  background: var(--pumpkin-d); color: var(--cream); border-radius: 0;
  font-size: 12px;
}
.submit-button {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 14px;
  border: 3px solid var(--wood-d); border-radius: 0;
  background: linear-gradient(180deg, var(--pumpkin), var(--pumpkin-d));
  color: var(--cream); font: 900 14px/1 sans-serif; letter-spacing: .12em;
  box-shadow: 0 4px 0 var(--pumpkin-x); cursor: pointer;
}
.submit-button:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--pumpkin-x); }
.submit-button b { color: var(--wheat-l); font-size: 14px; }
.rsvp-success, .rsvp-external { margin-top: 14px; padding: 16px; text-align: center; }
.success-radar { position: relative; width: 64px; height: 64px; margin: 0 auto 12px; }
.success-radar i, .success-radar b {
  position: absolute; inset: 0; margin: auto;
  display: flex; align-items: center; justify-content: center;
}
.success-radar i { border-radius: 50%; background: var(--leaf); opacity: .28; animation: pulseRing 1.6s ease infinite; }
.success-radar b {
  width: 38px; height: 38px; border-radius: 0;
  background: var(--wheat); color: var(--wood-d);
  font: 900 18px/1 sans-serif;
}
.rsvp-success h3, .rsvp-external h3 {
  margin: 0 0 8px; color: var(--wheat-l);
  font: 900 16px/1.3 "PingFang SC", "Microsoft YaHei", sans-serif;
  letter-spacing: .06em; -webkit-font-smoothing: antialiased;
}
.rsvp-success p, .rsvp-external p { margin: 0 0 14px; color: var(--cream); font-size: 12px; line-height: 1.7; }
.rsvp-success button {
  padding: 10px 18px; border: 2px solid var(--river); border-radius: 0;
  background: transparent; color: var(--river); font: 900 11px/1 sans-serif;
  letter-spacing: .12em; cursor: pointer;
}
.rsvp-external a {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 11px 18px; border: 2px solid var(--leaf); border-radius: 0;
  color: var(--leaf); text-decoration: none;
  font: 900 12px/1 sans-serif; letter-spacing: .12em;
}

/* ===== ⑧ 结尾 · 农场见 ===== */
.ending { position: relative; min-height: 340px; overflow: hidden; }
.ending img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 62%; }
.ending-copy {
  position: absolute; left: 18px; right: 18px; bottom: 48px; z-index: 2;
  padding: 15px;
  border: 3px solid var(--wood-d); border-radius: 0;
  background: #04140fdd; backdrop-filter: blur(8px);
  box-shadow: inset 0 0 0 3px var(--wheat), 0 6px 18px #000000aa;
  text-align: center; color: var(--cream);
}
.ending-copy p { margin: 0 0 4px; color: var(--wheat); font: 900 10px/1 "Courier New", monospace; letter-spacing: .2em; }
.ending-copy h2 {
  margin: 6px 0 8px; color: var(--wheat-l);
  font: 900 clamp(19px, 5.6vw, 25px)/1.25 "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  letter-spacing: .08em;
  text-shadow: 0 2px 0 var(--pumpkin-d), 0 4px 0 var(--pumpkin-x);
  -webkit-font-smoothing: antialiased;
}
.ending-copy b { display: block; margin: 4px 0; color: var(--cream); font: 900 14px/1.4 "PingFang SC", "Microsoft YaHei", sans-serif; letter-spacing: .06em; -webkit-font-smoothing: antialiased; }
.ending-copy span { color: var(--river); font: 900 11px/1 "Courier New", monospace; letter-spacing: .12em; }

footer { padding: 20px 14px 14px; text-align: center; background: var(--night-d); }
.footer-logo {
  display: inline-block; padding: 6px 14px;
  border: 2px solid var(--wheat); border-radius: 0;
  color: var(--wheat); background: transparent;
  font: 900 13px/1 "Courier New", monospace; letter-spacing: .16em;
}
.footer-logo b { color: var(--pumpkin); }
footer p { margin: 8px 0 0; color: var(--muted); font: 900 9px/1.6 "Courier New", monospace; letter-spacing: .12em; }

/* ===== 底部快捷导航 ===== */
/* 注意：position:fixed 只给 left:50% 时，可用宽度会被砍成半个视口，
   flex 子项被压到 min-content 导致双字标签折行。改用 left/right + margin:auto 居中。 */
.quick-nav {
  position: fixed; z-index: 10;
  left: 0; right: 0; bottom: calc(12px + env(safe-area-inset-bottom));
  width: fit-content;
  max-width: calc(100% - 20px);
  margin-inline: auto;
  display: flex; gap: 4px; padding: 5px;
  border: 2px solid var(--wheat); border-radius: 0;
  background: #04140fee; backdrop-filter: blur(8px);
  box-shadow: 0 4px 0 #00000066, 0 6px 16px #00000099;
}
.quick-nav a {
  padding: 8px 12px; border-radius: 0;
  color: var(--cream); font: 900 11px/1 sans-serif; letter-spacing: .1em;
  text-decoration: none;
  white-space: nowrap;      /* 标签永不折行 */
  flex: none;
}
.quick-nav a:active, .quick-nav a:hover,
.quick-nav a.active { background: var(--pumpkin); color: var(--cream); }

/* ===== 音乐坞 ===== */
/* 默认收起为纯图标：常驻展开会遮住右上角的正文内容（390px 屏上占近四成宽度） */
.music-dock {
  position: fixed; z-index: 11;
  right: calc(12px + env(safe-area-inset-right));
  top: calc(58px + env(safe-area-inset-top));
  display: flex; align-items: center; gap: 6px;
  padding: 5px;
  background: #04140fdd; backdrop-filter: blur(6px);
  border: 2px solid var(--wheat); border-radius: 0;
  box-shadow: 0 3px 0 #00000066;
}
.music-dock p {
  display: none; margin: 0 2px 0 4px;
  color: var(--cream); font: 900 9px/1.3 "Courier New", monospace;
  letter-spacing: .1em; max-width: 96px; -webkit-font-smoothing: none;
}
.music-dock:hover p,
.music-dock:focus-within p,
.music-dock.expanded p { display: block; }
.music-dock button {
  width: 32px; height: 32px;
  border: 2px solid var(--wood-d); border-radius: 0;
  background: var(--pumpkin); color: var(--wheat-l);
  font-size: 14px; cursor: pointer;
  box-shadow: 0 2px 0 var(--pumpkin-x);
  flex: none;
}
.music-dock button[aria-pressed="true"] { background: var(--leaf); color: #0b2107; box-shadow: 0 2px 0 var(--leaf-d); }
.music-dock button:active { transform: translateY(1px); }

/* ===== 极窄屏兜底（375px 及以下）===== */
@media (max-width: 375px) {
  .hero h1 { letter-spacing: .06em; }
  .game-tile { font-size: 26px; }
  .menu-item { grid-template-columns: 52px 1fr auto; gap: 8px; }
  .mayor-stage { padding-left: 96px; }
  .mayor-stage img { width: 96px; }
}
