/* ===========================================================
   端午节主题网页 · 全局样式
   说明：采用 CSS 变量统一配色；弹窗/游戏/装修遮罩
   均通过独立类名管理，便于后续扩展。
   =========================================================== */

:root {
  --green-1: #2f6b3e;
  --green-2: #4a8f55;
  --green-3: #8fbe7a;
  --rice-1: #fff6e0;
  --rice-2: #f3dfa7;
  --brown-1: #7a4a1f;
  --brown-2: #5a3612;
  --ink: #2b1e10;
  --shadow-soft: 0 4px 14px rgba(47, 107, 62, .1);
  --shadow-md: 0 12px 28px rgba(47, 107, 62, .22);
  --shadow-hard: 0 20px 50px rgba(0, 0, 0, .28);

  /* 装修蓝 */
  --blue-1: #0a1a3a;
  --blue-2: #1e3a8a;
  --blue-3: #3b5bbd;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  font-family: "PingFang SC", "Microsoft YaHei", "Songti SC", serif;
  color: var(--ink);
  background: linear-gradient(180deg, #fff8e1 0%, #e9f5e1 100%);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* ============================================================
   测试入口（左下角） + 密码面板
   ============================================================ */
.test-entry {
  position: absolute;
  left: 16px;
  bottom: 16px;
  z-index: 10;
  padding: 8px 18px;
  font-size: 13px;
  letter-spacing: 3px;
  color: #e4ecff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 24px;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: transform .15s ease, background .2s ease, border-color .2s ease;
  font-family: inherit;
}
.test-entry:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.45);
  transform: translateY(-1px);
}
.test-entry:active { transform: translateY(0); }

.test-panel {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(5, 10, 30, 0.55);
  backdrop-filter: blur(4px);
}
.test-panel.show { display: flex; }

.test-panel-box {
  width: min(92vw, 320px);
  padding: 22px 22px 18px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  color: #1b2640;
  animation: test-pop .22s ease-out;
}
@keyframes test-pop {
  from { transform: translateY(8px) scale(.96); opacity: 0; }
  to   { transform: translateY(0) scale(1);     opacity: 1; }
}
.test-title {
  font-size: 16px;
  letter-spacing: 3px;
  color: #1b2640;
  margin-bottom: 14px;
  text-align: center;
}
.test-input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  font-size: 14px;
  letter-spacing: 2px;
  border: 1px solid #c8d3f0;
  border-radius: 8px;
  outline: none;
  color: #1b2640;
  background: #f5f8ff;
  transition: border-color .15s ease, box-shadow .15s ease;
  font-family: inherit;
}
.test-input:focus {
  border-color: #3b5bbd;
  box-shadow: 0 0 0 3px rgba(59, 91, 189, 0.18);
  background: #fff;
}
.test-row {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}
.test-btn {
  flex: 1;
  padding: 9px 0;
  font-size: 14px;
  letter-spacing: 2px;
  color: #fff;
  background: #3b5bbd;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: transform .12s ease, background .2s ease, box-shadow .2s ease;
  font-family: inherit;
}
.test-btn:hover { background: #2e4aa0; }
.test-btn:active { transform: translateY(1px); }
.test-btn-cancel {
  background: #eef1f8;
  color: #5a6785;
}
.test-btn-cancel:hover { background: #e2e6f2; }

.test-error {
  min-height: 18px;
  margin-top: 10px;
  text-align: center;
  font-size: 12px;
  letter-spacing: 1px;
  color: #c0392b;
}

/* 密码输入阶段的布局 */
.password-stage {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 6px 0 4px;
}

/* ============================================================
   滑块拼图验证码
   ============================================================ */
.captcha-stage {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.captcha-canvas-wrap {
  position: relative;
  width: 100%;
  max-width: 320px;
  aspect-ratio: 2 / 1;
  margin: 0 auto;
  border-radius: 10px;
  overflow: hidden;
  background: #e8efff;
  border: 1px solid #c8d3f0;
  user-select: none;
}
#captcha-bg, #captcha-piece {
  position: absolute;
  inset: 0;
  display: block;
}
#captcha-piece { pointer-events: none; }

.captcha-refresh {
  position: absolute;
  right: 6px;
  top: 6px;
  padding: 4px 8px;
  font-size: 11px;
  letter-spacing: 2px;
  color: #3b5bbd;
  background: rgba(255,255,255,0.85);
  border-radius: 6px;
  cursor: pointer;
  opacity: 0.85;
  transition: opacity .15s ease, transform .15s ease;
}
.captcha-refresh:hover { opacity: 1; transform: translateY(-1px); }

.captcha-tip {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 6px 0;
  font-size: 12px;
  letter-spacing: 2px;
  text-align: center;
  color: #fff;
  background: rgba(27, 38, 64, 0.55);
  transform: translateY(0);
  transition: background .25s ease, opacity .25s ease;
}
.captcha-tip-wait { opacity: 0.9; }
.captcha-canvas-wrap:hover .captcha-tip-wait {
  opacity: 1;
}
.captcha-tip-success { background: rgba(47, 107, 62, 0.85); }
.captcha-tip-fail    { background: rgba(192, 57, 43, 0.85); }

.captcha-slider-wrap {
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
}

.captcha-track {
  position: relative;
  width: 100%;
  height: 40px;
  background: #eef2fb;
  border: 1px solid #c8d3f0;
  border-radius: 8px;
  overflow: hidden;
}
.captcha-progress {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  background: linear-gradient(90deg, #d4e0ff, #b2c6f5);
  border-radius: 8px 0 0 8px;
  transition: background .25s ease;
}
.captcha-slider {
  position: absolute;
  left: 0;
  top: 0;
  width: 40px;
  height: 40px;
  background: #fff;
  border: 1px solid #c8d3f0;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(27, 38, 64, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  transition: box-shadow .2s ease;
}
.captcha-slider:hover { box-shadow: 0 4px 10px rgba(27, 38, 64, 0.22); }
.captcha-slider.dragging { cursor: grabbing; box-shadow: 0 6px 14px rgba(27, 38, 64, 0.28); }

.captcha-track.is-success .captcha-progress { background: linear-gradient(90deg, #cdeed3, #89c79a); }
.captcha-track.is-fail .captcha-progress { background: linear-gradient(90deg, #f6d3cd, #e5958a); }

.captcha-status {
  min-height: 16px;
  text-align: center;
  font-size: 12px;
  letter-spacing: 1px;
  color: #6b7a9c;
}
.captcha-status.is-success { color: #2f6b3e; }
.captcha-status.is-fail    { color: #c0392b; }

.password-stage { animation: test-pop .22s ease-out; }

/* ============================================================
   装修中 · 全屏蓝色遮罩（不可关闭）
   ============================================================ */
.construction-mask {
  position: fixed !important;
  inset: 0 !important;
  z-index: 99999 !important;         /* 置顶，盖住一切 */
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: hidden !important;
  color: #fff !important;
  visibility: visible !important;
  opacity: 1;
  transition: opacity .8s ease;
}

/* 兜底：若被其他脚本强制 display:none 或 visibility:hidden，
   此规则以属性选择器提高优先级作为第二道防线。
   （真正生效依赖 inline !important，见 main.js 的 checkConstructionIntegrity） */
#construction-mask[aria-hidden="true"] {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.construction-mask .construction-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 30% 20%, #3b5bbd 0%, transparent 55%),
    radial-gradient(ellipse at 80% 80%, #1e3a8a 0%, transparent 60%),
    linear-gradient(135deg, #0a1a3a 0%, #1e3a8a 55%, #0a1a3a 100%);
}

/* 警告斜纹（低透明度，不抢戏） */
.construction-mask .construction-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    45deg,
    rgba(255, 255, 255, .04) 0 10px,
    transparent 10px 22px
  );
  pointer-events: none;
}

/* 星点装饰（纯 CSS，通过伪元素 + box-shadow 批量） */
.construction-stars {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.construction-stars::before,
.construction-stars::after {
  content: "";
  position: absolute;
  width: 3px; height: 3px;
  background: #fff;
  border-radius: 50%;
  top: 20%; left: 15%;
  box-shadow:
    120px 40px 0 -1px #fff,
    260px -30px 0 0 #a8c0ff,
    420px 90px 0 -1px #fff,
    600px -10px 0 0 #a8c0ff,
    780px 60px 0 -1px #fff,
    90px 180px 0 0 #a8c0ff,
    300px 220px 0 -1px #fff,
    520px 260px 0 0 #a8c0ff,
    720px 200px 0 -1px #fff,
    150px -80px 0 0 #a8c0ff,
    380px 380px 0 -1px #fff,
    620px 420px 0 0 #a8c0ff,
    820px 360px 0 -1px #fff,
    -100px 120px 0 0 #a8c0ff,
    -200px 300px 0 -1px #fff;
  opacity: .7;
  animation: twinkle 3s ease-in-out infinite;
}
.construction-stars::after {
  top: 65%; left: 70%;
  animation-delay: 1.5s;
  box-shadow:
    140px 20px 0 -1px #fff,
    280px -50px 0 0 #a8c0ff,
    440px 70px 0 -1px #fff,
    620px -30px 0 0 #a8c0ff,
    800px 40px 0 -1px #fff,
    120px 200px 0 0 #a8c0ff,
    340px 240px 0 -1px #fff,
    560px 280px 0 0 #a8c0ff,
    760px 220px 0 -1px #fff;
}
@keyframes twinkle {
  0%, 100% { opacity: .3; transform: scale(1); }
  50% { opacity: .9; transform: scale(1.2); }
}

/* mzj 图标：从顶部随机掉落（JS 动态生成） */
.construction-mzj {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.mzj-icon {
  position: absolute;
  top: -40px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 2px;
  color: #fff;
  text-shadow:
    0 0 10px rgba(120, 160, 255, .8),
    0 0 18px rgba(80, 130, 255, .55);
  opacity: 0;
  animation-name: mzj-fall;
  animation-timing-function: cubic-bezier(.22, .61, .36, 1);
  animation-iteration-count: 1;
  animation-fill-mode: forwards;
}
@keyframes mzj-fall {
  0% {
    transform: translateY(0) translateX(0) rotate(0deg);
    opacity: 0;
  }
  8% { opacity: .95; }
  100% {
    transform: translateY(110vh) translateX(var(--drift, 0)) rotate(720deg);
    opacity: .15;
  }
}

/* 内容区 */
.construction-content {
  position: relative;
  text-align: center;
  padding: 20px;
  z-index: 2;
}

/* 锤子：上下浮动 + 轻微敲击 */
.hammer {
  display: inline-block;
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, .45));
  animation: hammer-float 2.4s ease-in-out infinite,
             hammer-knock 1.2s ease-in-out infinite;
  transform-origin: 60% 80%;
}
@keyframes hammer-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-14px); }
}
@keyframes hammer-knock {
  0%, 70%, 100% { rotate: 0deg; }
  80%           { rotate: -22deg; }
  85%           { rotate: 14deg; }
  90%           { rotate: -6deg; }
}

/* 锤子交互：点击反馈 */
.hammer.hammer-tap {
  animation: hammer-tap-bounce .3s ease-out,
             hammer-knock 1.2s ease-in-out infinite;
}
@keyframes hammer-tap-bounce {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.18) translateY(-6px); }
  100% { transform: scale(1); }
}

/* 锤子交互：准备好上滑（发出发光/呼吸效果） */
.hammer.hammer-ready {
  cursor: grab;
  animation: hammer-ready-glow .9s ease-in-out infinite,
             hammer-knock 1.2s ease-in-out infinite;
  filter:
    drop-shadow(0 10px 20px rgba(0, 0, 0, .45))
    drop-shadow(0 0 24px rgba(120, 180, 255, .85));
}
@keyframes hammer-ready-glow {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.06); }
}

.construction-title {
  font-size: clamp(34px, 6vw, 64px);
  letter-spacing: 14px;
  margin: 26px 0 8px;
  font-weight: 700;
  text-shadow: 0 4px 20px rgba(100, 160, 255, .45);
}
.construction-sub {
  font-size: 14px;
  letter-spacing: 6px;
  color: #b8c9ff;
  text-transform: uppercase;
  margin-bottom: 24px;
}
.construction-divider {
  width: 120px;
  height: 2px;
  margin: 0 auto 22px;
  background: linear-gradient(90deg, transparent, #8fa8ff, transparent);
}
.construction-text {
  font-size: 16px;
  line-height: 2;
  color: #dde5ff;
  letter-spacing: 2px;
}
.construction-dots {
  margin-top: 28px;
  display: inline-flex;
  gap: 10px;
}
.construction-dots span {
  width: 10px; height: 10px;
  background: #8fa8ff;
  border-radius: 50%;
  animation: dot-pulse 1.2s infinite ease-in-out;
}
.construction-dots span:nth-child(2) { animation-delay: .2s; background: #bcd0ff; }
.construction-dots span:nth-child(3) { animation-delay: .4s; background: #e4ecff; }
@keyframes dot-pulse {
  0%, 80%, 100% { opacity: .3; transform: scale(.9); }
  40%           { opacity: 1;  transform: scale(1.15); }
}

/* ============================================================
   弹窗（端午祝福）
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100000;        /* 高于装修罩（99999），确保始终在最上层 */
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity .45s ease, visibility .45s ease;
}
.modal-overlay.show {
  opacity: 1;
  visibility: visible;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(74, 143, 85, .55), transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(122, 74, 31, .45), transparent 45%),
    linear-gradient(135deg, rgba(47, 107, 62, .85), rgba(90, 54, 18, .85));
  backdrop-filter: blur(6px);
}

/* 弹窗内粒子（粽叶 + 小圆点） */
.modal-particles {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}
.modal-particles .leaf-p,
.modal-particles .dot-p {
  position: absolute;
  top: -10%;
  will-change: transform, opacity;
  animation: fall linear forwards;
}
.modal-particles .leaf-p {
  width: 22px;
  height: 22px;
  background: radial-gradient(ellipse at 30% 30%, #9ecd72, #2f6b3e);
  border-radius: 80% 10% 80% 10%;
  opacity: .8;
  box-shadow: 0 2px 4px rgba(0,0,0,.15);
}
.modal-particles .dot-p {
  width: 6px;
  height: 6px;
  background: #fff6e0;
  border-radius: 50%;
  opacity: .85;
  box-shadow: 0 0 6px #fff;
}
@keyframes fall {
  0%   { transform: translateY(-10vh) rotate(0deg); opacity: 0; }
  10%  { opacity: .9; }
  100% { transform: translateY(110vh) rotate(720deg); opacity: 0; }
}

.modal-box {
  position: relative;
  width: min(92vw, 460px);
  background:
    radial-gradient(circle at top, #fff6e0 0%, #f3dfa7 60%, #e0c786 100%);
  border-radius: 22px;
  padding: 28px 26px 24px;
  text-align: center;
  box-shadow: var(--shadow-hard);
  border: 2px solid var(--green-1);
  z-index: 2;
  transform: translateY(30px) scale(.95);
  opacity: 0;
  transition: transform .55s cubic-bezier(.2,.8,.2,1), opacity .45s ease;
}
.modal-overlay.show .modal-box {
  transform: translateY(0) scale(1);
  opacity: 1;
}
.modal-close {
  position: absolute;
  top: 8px; right: 12px;
  font-size: 28px;
  line-height: 1;
  color: var(--green-1);
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  transition: background .2s, transform .2s;
}
.modal-close:hover { background: rgba(47, 107, 62, .12); transform: rotate(90deg); }

.modal-banner {
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
}
.zong-svg {
  width: 150px;
  height: 150px;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, .2));
  animation: zong-bob 3.2s ease-in-out infinite;
}
@keyframes zong-bob {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50%      { transform: translateY(-6px) rotate(2deg); }
}

.modal-title {
  font-size: 34px;
  letter-spacing: 8px;
  color: var(--green-1);
  margin-top: 4px;
  font-weight: 700;
}
.modal-subtitle {
  font-size: 13px;
  letter-spacing: 3px;
  color: var(--brown-1);
  margin-top: 4px;
  text-transform: uppercase;
}
.modal-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 14px 0 12px;
}
.modal-divider .line {
  display: block;
  width: 80px; height: 1px;
  background: var(--green-2);
  opacity: .5;
}
.modal-divider .dot {
  width: 6px; height: 6px;
  background: var(--green-2);
  border-radius: 50%;
}
.modal-message {
  font-size: 15px;
  line-height: 1.9;
  color: var(--ink);
  margin-bottom: 18px;
}
.modal-btn {
  display: inline-block;
  background: linear-gradient(135deg, var(--green-1), var(--green-2));
  color: #fff;
  padding: 12px 36px;
  font-size: 16px;
  letter-spacing: 2px;
  border-radius: 999px;
  box-shadow: 0 8px 20px rgba(47, 107, 62, .35);
  transition: transform .2s, box-shadow .2s;
}
.modal-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(47, 107, 62, .45);
}
.modal-btn:active { transform: translateY(0); }
.modal-foot {
  margin-top: 14px;
  font-size: 12px;
  color: var(--brown-1);
  letter-spacing: 2px;
}

/* ============================================================
   主页 · 顶部
   ============================================================ */
.hero {
  min-height: 70vh;
  background:
    radial-gradient(ellipse at top, rgba(143, 190, 122, .3), transparent 60%),
    linear-gradient(180deg, #fff8e1, #e9f5e1);
  position: relative;
}
.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 40px;
  flex-wrap: wrap;
  gap: 14px;
}
.logo {
  font-size: 20px;
  letter-spacing: 4px;
  color: var(--green-1);
  font-weight: 700;
}
.menu {
  list-style: none;
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
}
.menu a {
  font-size: 14px;
  letter-spacing: 2px;
  color: var(--brown-1);
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: border-color .2s, color .2s;
}
.menu a:hover { color: var(--green-1); border-bottom-color: var(--green-1); }

.hero-inner {
  text-align: center;
  padding: 60px 20px 80px;
}
.hero-title {
  font-size: clamp(40px, 8vw, 80px);
  letter-spacing: 18px;
  color: var(--green-1);
  text-shadow: 2px 4px 0 rgba(122, 74, 31, .15);
}
.hero-sub {
  margin-top: 18px;
  font-size: 18px;
  letter-spacing: 6px;
  color: var(--brown-1);
}
.hero-leaves { margin-top: 30px; }
.leaf-float {
  display: inline-block;
  font-size: 28px;
  margin: 0 10px;
  opacity: .7;
  animation: sway 4s ease-in-out infinite;
}
.f1 { animation-delay: 0s; }
.f2 { animation-delay: 1.2s; font-size: 34px; }
.f3 { animation-delay: 2.4s; }
@keyframes sway {
  0%, 100% { transform: translateY(0) rotate(-10deg); }
  50%      { transform: translateY(-10px) rotate(10deg); }
}

/* ============================================================
   通用 Section
   ============================================================ */
.section {
  padding: 70px 40px;
  max-width: 960px;
  margin: 0 auto;
  text-align: center;
}
.section-dark {
  background: linear-gradient(180deg, #e9f5e1, #d7ecc5);
  max-width: none;
}
.section-title {
  font-size: 26px;
  letter-spacing: 10px;
  color: var(--green-1);
  margin-bottom: 24px;
  position: relative;
  display: inline-block;
}
.section-title::after {
  content: "";
  display: block;
  width: 40px; height: 2px;
  background: var(--brown-1);
  margin: 10px auto 0;
}
.section-text {
  font-size: 16px;
  line-height: 2;
  color: var(--ink);
  max-width: 680px;
  margin: 0 auto;
}

/* ============================================================
   古诗卡片（扩展版，8 首诗词网格）
   ============================================================ */
.section-poem {
  background: linear-gradient(180deg, #fbf3dd, #f2e6c4);
  max-width: none;
}
.poem-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 22px;
  max-width: 1000px;
  margin: 16px auto 0;
}
.poem-card {
  padding: 28px 24px;
  background: linear-gradient(180deg, #fff8e1, #f3dfa7);
  border: 1px solid rgba(122, 74, 31, .25);
  border-radius: 14px;
  box-shadow: var(--shadow-soft);
  position: relative;
  text-align: left;
}
.poem-card::before,
.poem-card::after {
  content: "";
  position: absolute;
  width: 22px; height: 22px;
  border: 2px solid var(--brown-1);
  opacity: .35;
}
.poem-card::before { top: 8px; left: 8px; border-right: none; border-bottom: none; }
.poem-card::after  { bottom: 8px; right: 8px; border-left: none; border-top: none; }

.poem-alt { background: linear-gradient(180deg, #fff, #f5ead0); }
.poem-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-bottom: 12px;
  margin-bottom: 14px;
  border-bottom: 1px dashed rgba(122, 74, 31, .3);
}
.poem-title {
  font-size: 18px;
  letter-spacing: 4px;
  color: var(--green-1);
  font-weight: 700;
}
.poem-author {
  font-size: 12px;
  letter-spacing: 2px;
  color: var(--brown-1);
}
.poem-body {
  font-size: 15px;
  line-height: 2;
  color: var(--ink);
  letter-spacing: 1px;
  font-family: "Songti SC", "STSong", "KaiTi", serif;
}

/* ============================================================
   粽子口味（横向滑动大卡片）
   ============================================================ */
.flavor-viewport {
  max-width: 1100px;
  margin: 10px auto 0;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 20px 8px 28px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.flavor-viewport::-webkit-scrollbar { height: 8px; }
.flavor-viewport::-webkit-scrollbar-track { background: transparent; }
.flavor-viewport::-webkit-scrollbar-thumb {
  background: rgba(47, 107, 62, .3);
  border-radius: 4px;
}
.flavor-scroll {
  display: flex;
  gap: 20px;
  width: max-content;
}
.flavor-card-lg {
  width: 260px;
  flex: 0 0 auto;
  background: linear-gradient(180deg, #fff8e1, #ffeec4);
  border: 1px solid rgba(122, 74, 31, .25);
  border-radius: 18px;
  padding: 18px 16px 20px;
  box-shadow: var(--shadow-soft);
  transition: transform .25s ease, box-shadow .25s ease;
  text-align: left;
  display: flex;
  flex-direction: column;
}
.flavor-card-lg:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}
.flavor-img-wrap {
  width: 100%;
  height: 160px;
  margin-bottom: 14px;
  border-radius: 12px;
  overflow: hidden;
  background: #f5e9c8;
  box-shadow: inset 0 2px 8px rgba(0,0,0,.06);
}
.flavor-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .4s ease;
}
.flavor-card-lg:hover .flavor-img { transform: scale(1.06); }
.flavor-card-lg h3 {
  font-size: 18px;
  color: var(--green-1);
  letter-spacing: 3px;
  margin-bottom: 6px;
}
.flavor-tag {
  display: inline-block;
  padding: 3px 10px;
  background: rgba(47, 107, 62, .1);
  color: var(--green-1);
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: 2px;
  margin-bottom: 10px;
}
.flavor-desc {
  font-size: 14px;
  line-height: 1.9;
  color: var(--ink);
  margin-bottom: 14px;
  min-height: 54px;
  flex: 1;
}
.flavor-meta {
  display: flex;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px dashed rgba(122, 74, 31, .3);
}
.flavor-meta > div { text-align: center; flex: 1; }
.flavor-meta span {
  display: block;
  font-size: 11px;
  color: var(--brown-1);
  letter-spacing: 2px;
  margin-bottom: 3px;
}
.flavor-meta b {
  font-size: 13px;
  color: var(--green-1);
  letter-spacing: 1px;
  font-weight: 700;
}
.flavor-hint {
  margin-top: 4px;
  text-align: center;
  font-size: 12px;
  letter-spacing: 3px;
  color: var(--brown-1);
  opacity: .75;
}

/* ============================================================
   点粽子小游戏
   ============================================================ */
.section-game {
  background: linear-gradient(180deg, #f3f8ea, #e1efd3);
  max-width: none;
}
.game-panel {
  max-width: 720px;
  margin: 16px auto 0;
  background: #fff8e1;
  border-radius: 18px;
  padding: 22px;
  border: 1px solid rgba(47, 107, 62, .25);
  box-shadow: var(--shadow-soft);
}
.game-info {
  display: flex;
  justify-content: space-around;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px dashed rgba(122, 74, 31, .3);
}
.game-stat { text-align: center; }
.stat-label {
  display: block;
  font-size: 12px;
  color: var(--brown-1);
  letter-spacing: 2px;
  margin-bottom: 4px;
}
.stat-value {
  font-size: 26px;
  color: var(--green-1);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.game-arena {
  position: relative;
  width: 100%;
  height: 340px;
  background:
    radial-gradient(circle at 50% 50%, #fff, #f3dfa7);
  border-radius: 14px;
  overflow: hidden;
  border: 1px dashed rgba(122, 74, 31, .3);
  display: flex;
  align-items: center;
  justify-content: center;
}

.game-btn {
  padding: 14px 40px;
  font-size: 17px;
  letter-spacing: 4px;
  color: #fff;
  background: linear-gradient(135deg, var(--green-1), var(--green-2));
  border-radius: 999px;
  box-shadow: 0 8px 18px rgba(47, 107, 62, .3);
  transition: transform .2s, box-shadow .2s;
}
.game-btn:hover { transform: translateY(-2px); box-shadow: 0 12px 24px rgba(47, 107, 62, .4); }
.game-btn:active { transform: translateY(0); }

/* 可点击的小粽子 */
.zong-target {
  position: absolute;
  width: 64px; height: 64px;
  cursor: pointer;
  user-select: none;
  animation: zong-pop .25s ease-out;
  transition: transform .12s ease;
}
.zong-target:hover { transform: scale(1.08); }
.zong-target:active { transform: scale(.9); }
.zong-target svg { width: 100%; height: 100%; filter: drop-shadow(0 4px 6px rgba(0,0,0,.18)); }

@keyframes zong-pop {
  0%   { transform: scale(.3); opacity: 0; }
  70%  { transform: scale(1.1); opacity: 1; }
  100% { transform: scale(1); }
}

/* 被点中后的 "+1" 飘字 */
.score-float {
  position: absolute;
  color: var(--green-1);
  font-weight: 700;
  font-size: 18px;
  pointer-events: none;
  animation: score-up .6s ease-out forwards;
}
@keyframes score-up {
  0%   { transform: translateY(0); opacity: 1; }
  100% { transform: translateY(-40px); opacity: 0; }
}

.game-tip {
  margin-top: 14px;
  color: var(--brown-1);
  font-size: 13px;
  letter-spacing: 2px;
  text-align: center;
}

/* ============================================================
   抽一粽（随机粽子动画）
   ============================================================ */
.section-lucky {
  background: linear-gradient(180deg, #f3f8ea, #e1efd3);
  max-width: none;
}
.lucky-panel {
  max-width: 720px;
  margin: 16px auto 0;
  background: linear-gradient(180deg, #fff8e1, #ffeec4);
  border-radius: 24px;
  padding: 30px 24px 26px;
  border: 1px solid rgba(122, 74, 31, .22);
  box-shadow: var(--shadow-md);
}
.lucky-visual {
  position: relative;
  width: 220px;
  height: 220px;
  margin: 0 auto 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lucky-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 28px;
  display: block;
  box-shadow: 0 14px 30px rgba(47, 107, 62, .25);
}
.lucky-shine {
  position: absolute;
  inset: -10px;
  pointer-events: none;
  border-radius: 28px;
  background: radial-gradient(circle, rgba(244, 196, 48, .45) 0%, transparent 65%);
  opacity: 0;
  transition: opacity .3s ease;
}
.lucky-panel.rolling .lucky-img { animation: lucky-spin 1s cubic-bezier(.4,.0,.2,1); }
.lucky-panel.rolling .lucky-shine { opacity: 1; animation: lucky-pulse 1s ease-in-out; }

@keyframes lucky-spin {
  0%   { transform: rotate(0deg) scale(1); }
  30%  { transform: rotate(-20deg) scale(.95); }
  55%  { transform: rotate(20deg) scale(1.05); }
  75%  { transform: rotate(-10deg) scale(1.02); }
  100% { transform: rotate(0deg) scale(1); }
}
@keyframes lucky-pulse {
  0%   { opacity: 0; transform: scale(.8); }
  60%  { opacity: 1; transform: scale(1.1); }
  100% { opacity: 0; transform: scale(1); }
}

.lucky-result {
  min-height: 70px;
  text-align: center;
  margin-bottom: 14px;
}
.lucky-flavor {
  font-size: 22px;
  letter-spacing: 6px;
  color: var(--green-1);
  font-weight: 700;
  margin-bottom: 8px;
}
.lucky-blessing {
  font-size: 14px;
  letter-spacing: 2px;
  color: var(--brown-1);
  line-height: 1.9;
  max-width: 480px;
  margin: 0 auto;
}
.lucky-btn {
  display: block;
  margin: 0 auto;
  padding: 14px 50px;
  font-size: 16px;
  letter-spacing: 6px;
  color: #fff;
  background: linear-gradient(135deg, var(--green-1), var(--green-2));
  border-radius: 999px;
  box-shadow: 0 8px 18px rgba(47, 107, 62, .3);
  transition: transform .2s ease, box-shadow .2s ease;
}
.lucky-btn:hover { transform: translateY(-2px); box-shadow: 0 12px 24px rgba(47, 107, 62, .4); }
.lucky-btn:active { transform: translateY(0); }
.lucky-btn:disabled { background: #c5d5a5; cursor: not-allowed; transform: none; box-shadow: none; }

.lucky-history {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px dashed rgba(122, 74, 31, .25);
  text-align: center;
  font-size: 12px;
  letter-spacing: 2px;
  color: var(--brown-1);
  opacity: .85;
  min-height: 22px;
}

/* ============================================================
   传统习俗（图文卡片网格）
   ============================================================ */
.section-customs {
  background: linear-gradient(180deg, #fff8e1, #fbe9c4);
  max-width: none;
}
.customs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  max-width: 1040px;
  margin: 16px auto 0;
}
.custom-card {
  background: #fff;
  border-radius: 18px;
  padding: 20px 18px;
  border: 1px solid rgba(122, 74, 31, .22);
  box-shadow: var(--shadow-soft);
  transition: transform .25s ease, box-shadow .25s ease;
}
.custom-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.custom-icon {
  width: 100%;
  height: 150px;
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  overflow: hidden;
  background: #f5e9c8;
}
.custom-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .35s ease;
}
.custom-card:hover .custom-img { transform: scale(1.06); }
.custom-card h3 {
  font-size: 17px;
  letter-spacing: 4px;
  color: var(--green-1);
  margin-bottom: 8px;
}
.custom-card p {
  font-size: 13px;
  color: var(--ink);
  line-height: 1.8;
  letter-spacing: 1px;
}

/* ============================================================
   页脚
   ============================================================ */
.footer {
  text-align: center;
  padding: 24px;
  font-size: 13px;
  color: var(--brown-1);
  letter-spacing: 2px;
  border-top: 1px dashed rgba(122, 74, 31, .3);
  margin-top: 30px;
}

/* ============================================================
   响应式 — 多档断点
   ============================================================ */

/* ---------- 768px 以下（平板 / 大手机） ---------- */
@media (max-width: 768px) {
  .nav {
    padding: 14px 18px;
    flex-wrap: nowrap;
    justify-content: space-between;
  }
  .logo { font-size: 18px; letter-spacing: 3px; }

  /* 汉堡按钮 */
  .hamburger {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 22px;
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
    flex-shrink: 0;
    z-index: 10;
    position: relative;
  }
  .hamburger span {
    display: block;
    width: 100%;
    height: 2.5px;
    background: var(--green-1);
    border-radius: 2px;
    transition: transform .3s ease, opacity .3s ease, width .3s ease;
    transform-origin: center;
  }
  .hamburger.open span:nth-child(1) { transform: translateY(10px) rotate(45deg); }
  .hamburger.open span:nth-child(2) { opacity: 0; width: 0; }
  .hamburger.open span:nth-child(3) { transform: translateY(-10px) rotate(-45deg); }

  /* 菜单默认隐藏 */
  .menu {
    position: fixed;
    top: 0; right: -100%;
    width: 65vw;
    max-width: 320px;
    height: 100vh;
    background: linear-gradient(180deg, #fff8e1, #f3dfa7);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 28px;
    padding: 40px 20px;
    box-shadow: -8px 0 30px rgba(0,0,0,.18);
    transition: right .4s cubic-bezier(.2,.8,.2,1);
    z-index: 9;
    margin: 0;
  }
  .menu.open { right: 0; }
  .menu a {
    font-size: 17px;
    letter-spacing: 4px;
    color: var(--green-1);
    border: none;
    padding: 8px 0;
  }

  /* 遮罩层（菜单打开时） */
  .menu-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.35);
    z-index: 8;
    backdrop-filter: blur(2px);
  }
  .menu-overlay.show { display: block; }

  .hero-title { letter-spacing: 12px; font-size: clamp(32px, 8vw, 56px); }
  .hero-sub { letter-spacing: 4px; font-size: 15px; }

  .section { padding: 50px 18px; }

  .modal-box { width: 94vw; padding: 22px 18px 20px; }
  .modal-title { font-size: 28px; letter-spacing: 6px; }
  .zong-svg { width: 120px; height: 120px; }
  .modal-banner { height: 110px; }

  .construction-title { letter-spacing: 10px; font-size: clamp(28px, 7vw, 50px); }
  .construction-text { font-size: 14px; line-height: 1.9; }

  .poem-card { padding: 22px 18px; margin: 18px 0; }
  .poem-body { font-size: 15px; }
  .poem-head { flex-direction: column; gap: 4px; align-items: flex-start; }

  .flavor-viewport { max-width: 100%; padding: 16px 8px 24px; }
  .flavor-card-lg { width: 230px; padding: 18px 16px; }
  .flavor-img-wrap { height: 130px; }
  .flavor-card-lg h3 { font-size: 16px; }

  .lucky-panel { padding: 24px 20px 20px; }
  .lucky-visual { width: 180px; height: 180px; }
  .lucky-flavor { font-size: 20px; letter-spacing: 5px; }

  .customs-grid { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
  .custom-card { padding: 18px 14px; }
  .custom-icon { height: 120px; }

  .game-arena { height: 320px; }
  .game-panel { padding: 16px; }
  .game-stat { text-align: center; }
  .stat-value { font-size: 22px; }
}

/* ---------- 480px 以下（中小手机） ---------- */
@media (max-width: 480px) {
  .nav { padding: 12px 14px; }
  .logo { font-size: 16px; }
  .hero-title { letter-spacing: 10px; font-size: clamp(28px, 9vw, 44px); }
  .hero-sub { font-size: 14px; letter-spacing: 3px; }
  .leaf-float { font-size: 22px; }

  .section { padding: 40px 14px; }
  .section-title { font-size: 20px; letter-spacing: 7px; }

  .modal-box { width: 96vw; padding: 18px 14px 16px; }
  .modal-title { font-size: 24px; letter-spacing: 5px; }
  .modal-message { font-size: 14px; }
  .modal-btn { padding: 10px 28px; font-size: 15px; }
  .zong-svg { width: 100px; height: 100px; }
  .modal-banner { height: 95px; }

  .construction-title { font-size: clamp(24px, 7vw, 36px); letter-spacing: 8px; }
  .construction-sub { font-size: 11px; letter-spacing: 4px; }
  .construction-text { font-size: 13px; }
  .hammer { width: 90px; height: 90px; }

  .poem-card { padding: 18px 14px; }
  .poem-body { font-size: 14px; line-height: 2; }
  .poem-title { font-size: 17px; }

  .flavor-card-lg { width: 210px; padding: 16px 14px; }
  .flavor-img-wrap { height: 120px; }
  .flavor-card-lg h3 { font-size: 15px; }
  .flavor-desc { font-size: 13px; min-height: 48px; }
  .flavor-meta { flex-wrap: wrap; gap: 6px; }

  .lucky-panel { padding: 20px 16px 18px; }
  .lucky-visual { width: 160px; height: 160px; }
  .lucky-flavor { font-size: 18px; letter-spacing: 4px; }
  .lucky-blessing { font-size: 13px; }
  .lucky-btn { padding: 12px 40px; font-size: 14px; letter-spacing: 4px; }

  .custom-card { padding: 16px 12px; }
  .custom-icon { height: 100px; }
  .custom-card h3 { font-size: 16px; letter-spacing: 3px; }
  .custom-card p { font-size: 12px; }

  .game-arena { height: 280px; }
  .game-info { gap: 8px; }
  .stat-label { font-size: 11px; }
  .stat-value { font-size: 20px; }
  .game-btn { padding: 12px 28px; font-size: 15px; }

  .footer { font-size: 12px; padding: 18px 14px; }
}

/* ---------- 375px 以下（iPhone SE / 小屏手机） ---------- */
@media (max-width: 375px) {
  .hero-title { letter-spacing: 8px; font-size: 26px; }
  .modal-title { font-size: 20px; letter-spacing: 4px; }
  .construction-title { font-size: 22px; letter-spacing: 6px; }
  .flavor-card-lg { width: 190px; padding: 14px 12px; }
  .lucky-visual { width: 140px; height: 140px; }
  .lucky-flavor { font-size: 16px; letter-spacing: 3px; }
  .game-arena { height: 250px; }
}

/* ---------- 横屏适配 ---------- */
@media (max-height: 500px) and (orientation: landscape) {
  .construction-title { font-size: 28px; margin: 14px 0 6px; }
  .hammer { width: 80px; height: 80px; }
  .construction-text { font-size: 13px; line-height: 1.6; }
  .hero { min-height: 50vh; }
}

/* ---------- 汉堡菜单隐藏/显示逻辑（桌面端不需要） ---------- */
@media (min-width: 769px) {
  .hamburger { display: none; }
  .menu { position: static; flex-direction: row; width: auto; height: auto; background: none; box-shadow: none; padding: 0; }
  .menu-overlay { display: none !important; }
}

/* 辅助：focus 可见性，避免纯键盘用户迷路 */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--green-1);
  outline-offset: 3px;
  border-radius: 6px;
}
