/* ============================================================
   星露谷 · 送给你的小站
   Stardew Valley themed love site
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=ZCOOL+KuaiLe&family=Press+Start+2P&display=swap');

/* ---------- 设计变量 ---------- */
:root {
  /* 黄昏农场天空 */
  --sky-top: #2b3a67;
  --sky-mid: #6d4a7d;
  --sky-low: #e8873a;
  --sun: #ffd97a;

  /* 大地与植物 */
  --grass: #6b8f3c;
  --grass-dark: #52742c;
  --grass-light: #86ac52;
  --soil: #7a4f2e;

  /* 木质与像素描边 */
  --wood: #8b5a2b;
  --wood-dark: #5f3d1e;
  --ink: #3d2b1f;          /* 像素描边色 */
  --cream: #fdf6e3;        /* 信纸色 */
  --cream-dark: #efe0bc;

  /* 浪漫色 */
  --heart: #e75a7c;
  --heart-light: #ff8fa8;
  --gold: #f7c94b;

  --font-cn: 'ZCOOL KuaiLe', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-px: 'Press Start 2P', 'Courier New', monospace;
}

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

html {
  height: 100%;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: var(--wood) rgba(30, 40, 70, .55);
}
html, body { height: 100%; }

body {
  font-family: var(--font-cn);
  color: #fff;
  min-height: 100vh;
  max-width: 100%;
  overflow-x: hidden;
  overscroll-behavior-x: none;
  background-color: var(--sky-top);
}

/* 星露谷风像素滚动条 */
::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}
::-webkit-scrollbar-track {
  background: rgba(30, 40, 70, .55);
  border-left: 3px solid var(--ink);
}
::-webkit-scrollbar-thumb {
  background: var(--wood);
  border: 3px solid var(--ink);
  border-radius: 0;
  box-shadow: inset 0 0 0 2px rgba(247, 201, 75, .45);
}
::-webkit-scrollbar-thumb:hover {
  background: #a06a35;
}
::-webkit-scrollbar-corner {
  background: rgba(30, 40, 70, .55);
}

/* 低分辨率天空 canvas，放大后形成马赛克像素 */
#pixel-sky {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

/* 子页像素草地（由 JS 插入，首页不需要） */
#pixel-grass {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  height: 34vh;
  z-index: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(90deg,
      var(--grass) 0 34px, var(--grass-dark) 34px 68px);
  border-top: 6px solid var(--grass-dark);
  filter: url(#mosaic);
}

::selection { background: var(--heart); color: #fff; }

/* 页面淡入（不用 transform，避免破坏顶部导航 fixed 吸顶） */
.page {
  opacity: 0;
  animation: pageIn .6s ease forwards;
}
@keyframes pageIn {
  to { opacity: 1; }
}

/* ---------- 像素风组件 ---------- */
.pixel-box {
  position: relative;
  border: 4px solid var(--ink);
  background: var(--cream);
  color: var(--ink);
  box-shadow:
    0 6px 0 rgba(0,0,0,.35),
    inset 0 0 0 3px rgba(255,255,255,.35);
  border-radius: 6px;
}

/* 像素按钮 */
.px-btn {
  font-family: var(--font-cn);
  font-size: 1.05rem;
  padding: .7em 1.4em;
  border: 4px solid var(--ink);
  border-radius: 6px;
  background: var(--gold);
  color: var(--ink);
  cursor: pointer;
  box-shadow: 0 4px 0 var(--ink);
  transition: transform .08s, box-shadow .08s, filter .2s;
  user-select: none;
}
.px-btn:hover { filter: brightness(1.08); }
.px-btn:active {
  transform: translateY(4px);
  box-shadow: 0 0 0 var(--ink);
}

/* ---------- 漂浮爱心粒子背景 ---------- */
#hearts-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}
#hearts-bg .float-heart {
  position: absolute;
  bottom: -40px;
  font-size: 22px;
  opacity: 0;
  animation: floatUp linear forwards;
}
@keyframes floatUp {
  0%   { transform: translateY(0) rotate(-8deg); opacity: 0; }
  12%  { opacity: .55; }
  100% { transform: translateY(-110vh) rotate(12deg); opacity: 0; }
}

/* ---------- 首页：农场场景 ---------- */
.farm-scene {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
/* 场景世界走马赛克滤镜；小狗/祝尼魔保持原图像素 */
.farm-scene-world {
  position: absolute;
  inset: 0;
  filter: url(#mosaic);
}

/* 山丘 */
.hill {
  position: absolute;
  left: -10%;
  width: 55%;
  height: 34vh;
  background: #4c5d8f;
  border-radius: 50% 50% 0 0 / 70% 70% 0 0;
  bottom: 30vh;
}
.hill.h2 { left: auto; right: -12%; width: 60%; bottom: 34vh; background: #40507c; }

/* 太阳 */
.sun {
  position: absolute;
  top: 12vh;
  right: 12%;
  width: 90px;
  height: 90px;
  background: var(--sun);
  border-radius: 50%;
  box-shadow: 0 0 60px 24px rgba(255, 217, 122, .45);
  animation: sunPulse 6s ease-in-out infinite;
}
@keyframes sunPulse {
  0%, 100% { box-shadow: 0 0 60px 24px rgba(255,217,122,.45); }
  50%      { box-shadow: 0 0 80px 34px rgba(255,217,122,.6); }
}

/* 草地 */
.grass {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 34vh;
  background:
    repeating-linear-gradient(90deg,
      var(--grass) 0 34px, var(--grass-dark) 34px 68px);
  border-top: 6px solid var(--grass-dark);
}
.grass::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(0deg,
      transparent 0 16px, rgba(255,255,255,.05) 16px 18px);
}
.grass::after { content: none; display: none; }

/* 木屋 */
.house {
  position: absolute;
  left: 8%;
  bottom: 28vh;
  width: 210px;
  height: 150px;
}
.house .body {
  position: absolute;
  bottom: 0; left: 20px;
  width: 170px; height: 105px;
  background: var(--wood);
  border: 4px solid var(--ink);
  border-bottom: none;
}
.house .body::after {
  content: '';
  position: absolute;
  bottom: -6px; left: -4px;
  width: calc(100% + 8px);
  height: 12px;
  background: var(--wood-dark);
  border: 4px solid var(--ink);
}
.house .roof {
  position: absolute;
  top: 0; left: 0;
  width: 0; height: 0;
  border-left: 105px solid transparent;
  border-right: 105px solid transparent;
  border-bottom: 70px solid #c94f4f;
  filter: drop-shadow(0 4px 0 rgba(0,0,0,.25));
}
.house .roof::after {
  content: '';
  position: absolute;
  top: 34px; left: -105px;
  width: 210px; height: 8px;
  background: var(--ink);
}
.house .door {
  position: absolute;
  bottom: 0; left: 85px;
  width: 40px; height: 60px;
  background: var(--wood-dark);
  border: 4px solid var(--ink);
  border-bottom: none;
  border-radius: 4px 4px 0 0;
}
.house .window {
  position: absolute;
  bottom: 38px; left: 34px;
  width: 34px; height: 34px;
  background: #ffe9a8;
  border: 4px solid var(--ink);
  border-radius: 4px;
}
.house .chimney {
  position: absolute;
  top: -6px; right: 52px;
  width: 26px; height: 44px;
  background: #9c9c9c;
  border: 4px solid var(--ink);
}
.house .smoke {
  position: absolute;
  top: -30px; right: 58px;
  width: 14px; height: 14px;
  background: rgba(255,255,255,.55);
  border-radius: 50%;
  animation: smoke 4s ease-in-out infinite;
}
@keyframes smoke {
  0%   { transform: translate(0,0) scale(1); opacity: .6; }
  100% { transform: translate(16px,-26px) scale(1.6); opacity: 0; }
}

/* 树 */
.tree {
  position: absolute;
  bottom: 28vh;
  width: 96px; height: 130px;
}
.tree .trunk {
  position: absolute;
  bottom: 0; left: 38px;
  width: 20px; height: 46px;
  background: var(--wood-dark);
  border: 4px solid var(--ink);
  border-bottom: none;
}
.tree .leaf {
  position: absolute;
  bottom: 34px; left: 6px;
  width: 84px; height: 84px;
  background: #3f7d3a;
  border: 4px solid var(--ink);
  border-radius: 8px;
  transform: rotate(45deg);
}
.tree .leaf::after {
  content: '';
  position: absolute;
  inset: 8px;
  background: #4f9a48;
  border-radius: 4px;
}
.tree.t1 { left: 30%; bottom: 26vh; transform: scale(.8); }
.tree.t2 { right: 22%; bottom: 30vh; transform: scale(1.05); }
.tree.t3 { right: 6%; bottom: 24vh; transform: scale(.62); }

/* 场景里的小动物（真实游戏素材） */
.scene-pet,
.scene-junimo {
  position: absolute;
  image-rendering: pixelated;
}
.scene-pet {
  right: 13%;
  bottom: 29.5vh;
  width: 44px;
  filter: drop-shadow(0 3px 0 rgba(0,0,0,.3));
}
.scene-junimo {
  left: 25%;
  bottom: 28.5vh;
  width: 38px;
  filter: drop-shadow(0 3px 0 rgba(0,0,0,.3));
  animation: junimoBob 1.5s ease-in-out infinite;
}
@keyframes junimoBob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-7px); }
}

/* 情书页信纸装饰 */
.letter-deco {
  text-align: center;
  margin-top: 26px;
}
.letter-deco img {
  width: 56px;
  image-rendering: pixelated;
  filter: drop-shadow(0 3px 0 rgba(0,0,0,.15));
}

/* ---------- 首页内容层 ---------- */
.content {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 26px;
  padding: 72px 20px 60px;
  text-align: center;
  overflow-x: clip;
}

/* 宽屏：纪念卡片提到标题左侧，标题仍居中 */
@media (min-width: 981px) {
  .content {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    justify-items: center;
    align-content: center;
    column-gap: 24px;
    row-gap: 26px;
  }
  .anniversary-card {
    grid-column: 1;
    grid-row: 1;
    justify-self: end;
    align-self: center;
    width: 250px;
    max-width: none;
  }
  .hero-main {
    grid-column: 2;
    grid-row: 1;
  }
  .season-bar,
  .big-heart-wrap,
  .daily-card,
  .entry-cards,
  .footnote {
    grid-column: 1 / -1;
  }
}

.hero-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 26px;
  min-width: 0;
}
.hero-logo {
  width: min(300px, 68vw);
  image-rendering: pixelated;
  filter: drop-shadow(0 6px 0 rgba(0,0,0,.25));
}
.hero-title {
  font-size: clamp(2.2rem, 7vw, 3.6rem);
  text-shadow: 0 5px 0 rgba(0,0,0,.25), 0 0 30px rgba(255,217,122,.35);
  letter-spacing: 2px;
}
.hero-sub {
  font-size: clamp(1rem, 3vw, 1.25rem);
  color: #ffe9c9;
  text-shadow: 0 3px 0 rgba(0,0,0,.25);
}

/* 大爱心 */
.big-heart-wrap {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-top: 10px;
}
.big-heart {
  position: relative;
  width: 120px; height: 110px;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  filter: drop-shadow(0 10px 0 rgba(0,0,0,.25));
  transition: transform .12s;
}
.big-heart:active { transform: scale(.92); }
.big-heart svg {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}
.big-heart .heart-path {
  fill: var(--heart);
  stroke: #d94a6b;
  stroke-width: .6;
  transition: fill .2s;
}
.big-heart:hover .heart-path { fill: var(--heart-light); }

/* 点击时迸出的爱心 */
.pop-heart {
  position: fixed;
  z-index: 50;
  font-size: 26px;
  pointer-events: none;
  animation: popHeart .9s ease-out forwards;
}
@keyframes popHeart {
  0%   { transform: translate(0,0) scale(.4); opacity: 1; }
  100% { transform: translate(var(--dx,0), var(--dy,-90px)) scale(1.25); opacity: 0; }
}

/* 爱心计数 */
.heart-count {
  font-family: var(--font-px);
  font-size: .95rem;
  color: var(--sun);
  background: rgba(0,0,0,.35);
  border: 3px solid var(--ink);
  padding: .5em .9em;
  border-radius: 6px;
  min-width: 210px;
}
.heart-count b { color: #fff; }

/* 入口卡片 */
.entry-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  justify-content: center;
  margin-top: 10px;
}
.entry {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 26px 30px;
  width: 230px;
  cursor: pointer;
  text-decoration: none;
  transition: transform .15s, box-shadow .15s;
}
.entry:hover {
  transform: translateY(-6px);
  box-shadow:
    0 12px 0 rgba(0,0,0,.35),
    inset 0 0 0 3px rgba(255,255,255,.35);
}
.entry .icon {
  height: 52px;
  width: auto;
  image-rendering: pixelated;
  filter: drop-shadow(0 3px 0 rgba(0,0,0,.2));
}
.entry .name { font-size: 1.25rem; }
.entry .desc { font-size: .9rem; color: #6d5a3a; }
.entry.letter { background: #ffe9d2; }
.entry.gift   { background: #dff0d2; }

.footnote {
  font-size: .85rem;
  color: rgba(255,255,255,.75);
  text-shadow: 0 2px 0 rgba(0,0,0,.3);
}

/* ---------- 子页面通用 ---------- */
.subpage {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  padding: 40px 20px 80px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: clip;
}
.back-link {
  align-self: flex-start;
  font-size: .95rem;
  color: #ffe9c9;
  text-decoration: none;
  background: rgba(0,0,0,.3);
  border: 3px solid var(--ink);
  padding: .45em .9em;
  border-radius: 6px;
  transition: background .2s, transform .1s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.back-link:hover { background: rgba(0,0,0,.5); }
.back-link:active { transform: translateY(2px); }

/* ---------- 情书页 ---------- */
.envelope-wrap {
  margin-top: 40px;
  display: flex;
  justify-content: center;
}
.envelope {
  position: relative;
  width: min(560px, 90vw);
  cursor: pointer;
  user-select: none;
  filter: drop-shadow(0 12px 0 rgba(0,0,0,.25));
  transition: transform .15s;
}
.envelope:hover { transform: translateY(-6px); }
.envelope.opened { cursor: default; transform: none; }

.env-body {
  background: var(--cream-dark);
  border: 5px solid var(--ink);
  border-radius: 8px;
  height: 300px;
  position: relative;
  overflow: hidden;
}
.env-body::before {           /* 封口三角 */
  content: '';
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  border-left: 130px solid transparent;
  border-right: 130px solid transparent;
  border-top: 110px solid var(--cream);
  z-index: 2;
  transition: transform .5s ease;
}
.envelope.opened .env-body::before {
  transform: translateX(-50%) translateY(-100%);
}
.env-flap {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 40px;
  background: repeating-linear-gradient(90deg,
      var(--cream-dark) 0 26px, #e3d0a8 26px 52px);
  border-bottom: 5px solid var(--ink);
  z-index: 1;
}
.env-seal {
  position: absolute;
  top: 74px; left: 50%;
  transform: translateX(-50%);
  width: 58px; height: 58px;
  background: var(--heart);
  border: 4px solid var(--ink);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  z-index: 3;
  box-shadow: 0 3px 0 var(--ink);
  transition: transform .3s;
}
.envelope.opened .env-seal { transform: translateX(-50%) scale(0); }
.env-addr {
  position: absolute;
  bottom: 24px; left: 0; right: 0;
  text-align: center;
  font-size: 1.1rem;
  color: var(--wood-dark);
  z-index: 0;
}
.env-hint {
  text-align: center;
  margin-top: 16px;
  font-size: .95rem;
  color: #ffe9c9;
  text-shadow: 0 2px 0 rgba(0,0,0,.3);
}

/* 信纸 */
.letter-paper {
  margin-top: 34px;
  display: none;
  padding: 44px 40px 50px;
  line-height: 2;
  font-size: 1.06rem;
  animation: paperUp .5s ease forwards;
}
.letter-paper.show { display: block; }
@keyframes paperUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
.letter-paper .salute {
  font-size: 1.35rem;
  color: var(--heart);
}
.letter-paper p { margin: .9em 0; text-indent: 2em; }
.letter-paper .sign {
  margin-top: 1.6em;
  text-align: right;
  font-size: 1.15rem;
  color: var(--wood-dark);
}
.letter-paper .ps {
  font-size: .9rem;
  color: #8a7350;
  text-indent: 0;
}

/* ---------- 礼物页 ---------- */
.gift-head {
  margin-top: 36px;
  text-align: center;
  color: #fff;
  text-shadow: 0 4px 0 rgba(0,0,0,.25);
}
.gift-head h2 { font-size: clamp(1.6rem, 5vw, 2.3rem); margin-bottom: 8px; }
.gift-head p { color: #ffe9c9; }

.gift-grid {
  margin-top: 34px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 18px;
}
.gift-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 22px 14px 18px;
  cursor: pointer;
  transition: transform .15s, box-shadow .15s;
  text-align: center;
}
.gift-card:hover {
  transform: translateY(-6px) rotate(-1deg);
  box-shadow:
    0 12px 0 rgba(0,0,0,.35),
    inset 0 0 0 3px rgba(255,255,255,.35);
}
.gift-card .g-icon {
  width: 52px;
  height: 52px;
  image-rendering: pixelated;
  filter: drop-shadow(0 3px 0 rgba(0,0,0,.2));
}
.gift-card .g-name { font-size: 1.02rem; }
.gift-card .g-hearts { font-family: var(--font-px); font-size: .72rem; color: var(--heart); letter-spacing: 2px; }
.gift-card .g-reaction {
  font-size: .85rem;
  color: var(--wood-dark);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .25s, transform .25s;
}
.gift-card:hover .g-reaction { opacity: 1; transform: translateY(0); }

/* 每日推荐 */
.today-pick {
  margin-top: 34px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.today-box {
  width: 100%;
  max-width: 460px;
  padding: 18px 24px;
  text-align: center;
  background: #ffe9d2;
}
.today-box .t-label {
  font-family: var(--font-px);
  font-size: .7rem;
  color: var(--heart);
  letter-spacing: 1px;
}
.today-box .t-gift {
  margin-top: 8px;
  font-size: 1.3rem;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.today-box .t-gift img {
  width: 40px;
  height: 40px;
  image-rendering: pixelated;
}

/* 震动小动画 */
@keyframes wiggle {
  0%, 100% { transform: rotate(0); }
  25% { transform: rotate(-3deg); }
  75% { transform: rotate(3deg); }
}
.wiggle { animation: wiggle .3s ease; }

/* ---------- 响应式 ---------- */
@media (max-width: 640px) {
  .house { transform: scale(.72); transform-origin: bottom left; }
  .tree.t1 { left: 20%; }
  .letter-paper { padding: 34px 22px 40px; }
  .entry { width: 200px; }
}

/* ============================================================
   增强版新增样式
   ============================================================ */

/* ---------- 顶部导航 ---------- */
.top-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 14px;
  background: rgba(43, 58, 103, .85);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-bottom: 4px solid var(--ink);
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--heart) transparent;
}
.top-nav::-webkit-scrollbar {
  height: 6px;
  width: 6px;
}
.top-nav::-webkit-scrollbar-track {
  background: transparent;
  border: none;
}
.top-nav::-webkit-scrollbar-thumb {
  background: var(--heart);
  border: 2px solid var(--ink);
  border-radius: 0;
  box-shadow: none;
}
.top-nav .brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-right: 8px;
  color: #fff;
  font-size: .95rem;
  text-decoration: none;
}
.top-nav .brand img {
  width: 34px;
  image-rendering: pixelated;
}
.top-nav a.link {
  color: #ffe9c9;
  text-decoration: none;
  padding: .45em .7em;
  border-radius: 6px;
  font-size: .92rem;
  transition: background .15s;
}
.top-nav a.link img {
  height: 18px;
  width: auto;
  image-rendering: pixelated;
  vertical-align: -3px;
  margin-right: 5px;
}
.top-nav a.link:hover { background: rgba(255,255,255,.15); }
.top-nav a.link.active { background: var(--heart); color: #fff; box-shadow: 0 2px 0 rgba(0,0,0,.3); }

/* 首页导航悬浮在场景上；子页面需要让出导航高度 */
.subpage { padding-top: 96px; }

/* ---------- 首页：四季切换 ---------- */
.season-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}
.season-btn {
  font-family: var(--font-cn);
  font-size: .98rem;
  padding: .5em 1.1em;
  border: 3px solid var(--ink);
  border-radius: 6px;
  background: rgba(253,246,227,.9);
  color: var(--ink);
  cursor: pointer;
  box-shadow: 0 3px 0 var(--ink);
  transition: transform .08s, box-shadow .08s, background .2s;
}
.season-btn:hover { transform: translateY(-2px); }
.season-btn:active { transform: translateY(2px); box-shadow: 0 0 0 var(--ink); }
.season-btn.active {
  background: var(--heart);
  color: #fff;
  box-shadow: 0 3px 0 #b43d5c;
}

/* 下雪粒子（冬天） */
.snowflake {
  position: fixed;
  top: -14px;
  z-index: 1;
  color: #fff;
  pointer-events: none;
  animation: snowfall linear forwards;
  text-shadow: 0 1px 2px rgba(0,0,0,.3);
}
@keyframes snowfall {
  to {
    transform: translateY(108vh) translateX(26px);
    opacity: .85;
  }
}

/* ---------- 首页：每日一句 ---------- */
.daily-card {
  max-width: 480px;
  width: 100%;
  padding: 16px 22px;
  background: rgba(253, 246, 227, .94);
  color: var(--ink);
  text-align: left;
}
.daily-card .d-label {
  font-family: var(--font-px);
  font-size: .62rem;
  color: var(--heart);
  letter-spacing: 1px;
}
.daily-card .d-text {
  margin-top: 8px;
  font-size: 1.08rem;
  line-height: 1.9;
}
.daily-card .d-hint {
  margin-top: 10px;
  font-size: .8rem;
  color: #8a7350;
  cursor: pointer;
  text-align: right;
}
.daily-card .d-hint:hover { color: var(--heart); }

/* ---------- 首页：爱情纪念日 ---------- */
.anniversary-card {
  max-width: 480px;
  width: 100%;
  padding: 18px 20px 20px;
  background: rgba(255, 227, 234, .95);
  color: var(--ink);
  border-color: var(--heart);
  text-align: center;
}
.anniversary-card .a-label {
  font-family: var(--font-px);
  font-size: .62rem;
  color: var(--heart);
  letter-spacing: 1px;
}
.anniversary-card .a-title {
  margin-top: 8px;
  font-size: 1.25rem;
}
.anniversary-card .a-count {
  margin-top: 10px;
  font-family: var(--font-px);
  font-size: 1rem;
  color: var(--heart);
  line-height: 1.6;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
}
.anniversary-card .a-count b {
  font-size: clamp(1.6rem, 6vw, 2.1rem);
  color: #d94a6b;
  text-shadow: 0 2px 0 rgba(0,0,0,.08);
}
.anniversary-card .a-count span {
  display: inline-block;
  min-width: 9em;
}
.anniversary-card .a-count span.a-bump { animation: aBump .35s ease; }
@keyframes aBump {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.14); }
  100% { transform: scale(1); }
}
.anniversary-card .a-date {
  margin-top: 10px;
  font-size: .82rem;
  color: #8a7350;
}
.anniversary-card .a-desc {
  margin-top: 4px;
  font-size: .92rem;
  color: #6d5a3a;
}

/* ---------- 日历页 ---------- */
.season-section { margin-top: 40px; }
.season-head {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.season-head h2 { font-size: clamp(1.5rem, 4.5vw, 1.9rem); text-shadow: 0 3px 0 rgba(0,0,0,.25); }
.season-badge {
  font-size: .78rem;
  padding: .25em .7em;
  border-radius: 4px;
  border: 3px solid var(--ink);
  color: var(--ink);
  background: var(--cream);
}
.festival-grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
}
.festival-card {
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: transform .15s, box-shadow .15s;
}
.festival-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 0 rgba(0,0,0,.35), inset 0 0 0 3px rgba(255,255,255,.35);
}
.festival-card .f-top { display: flex; align-items: center; gap: 10px; }
.festival-card .f-icon { font-size: 2rem; }
.festival-card .f-name { font-size: 1.18rem; }
.festival-card .f-date {
  font-family: var(--font-px);
  font-size: .62rem;
  color: var(--heart);
  letter-spacing: 1px;
}
.festival-card .f-desc { font-size: .9rem; color: #6d5a3a; line-height: 1.75; }
.festival-card .f-us {
  font-size: .88rem;
  background: #ffe9d2;
  padding: .55em .8em;
  border-radius: 5px;
  border: 2px solid var(--ink);
  line-height: 1.6;
}
.festival-card .f-us b { color: var(--heart); }
.festival-card.ours { background: #ffe3ea; }

/* ---------- 钓鱼页 ---------- */
.fish-play {
  margin-top: 36px;
  display: flex;
  gap: 26px;
  align-items: stretch;
  flex-wrap: wrap;
  justify-content: center;
}
.pond {
  width: 130px;
  height: 340px;
  background: linear-gradient(180deg, #8fd3e8 0%, #3a86b8 60%, #1d5c86 100%);
  border: 5px solid var(--ink);
  border-radius: 10px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  user-select: none;
  box-shadow: inset 0 0 30px rgba(0,0,0,.25);
}
.pond .bubble {
  position: absolute;
  width: 8px; height: 8px;
  background: rgba(255,255,255,.5);
  border-radius: 50%;
  animation: bubbleUp 3s ease-in infinite;
}
@keyframes bubbleUp {
  0%   { transform: translateY(0); opacity: 0; }
  20%  { opacity: .7; }
  100% { transform: translateY(-300px); opacity: 0; }
}
.pond .target-line {
  position: absolute;
  left: 6px; right: 6px;
  top: 50%;
  height: 5px;
  background: rgba(255,255,255,.85);
  box-shadow: 0 0 10px rgba(255,255,255,.7);
  border-radius: 3px;
}
.pond .fish {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 46px;
  image-rendering: pixelated;
  filter: drop-shadow(0 3px 0 rgba(0,0,0,.3));
  transition: top .16s ease-out;
}
.pond .ripple {
  position: absolute;
  left: 50%; top: 50%;
  width: 0; height: 0;
  border-radius: 50%;
  border: 3px solid rgba(255,255,255,.8);
  transform: translate(-50%, -50%);
  opacity: 0;
  pointer-events: none;
}
.pond.catch-ok .ripple { animation: ripple 1s ease-out; }
@keyframes ripple {
  0%   { width: 0; height: 0; opacity: .8; }
  100% { width: 260px; height: 260px; opacity: 0; }
}
.fish-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  min-width: 220px;
}
.fish-tip { font-size: .92rem; color: #ffe9c9; text-align: center; line-height: 1.7; }
.fish-result {
  font-size: 1.05rem;
  color: var(--ink);
  background: var(--cream);
  border: 3px solid var(--ink);
  border-radius: 6px;
  padding: .6em 1em;
  text-align: center;
  min-height: 3em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.fish-result img { width: 34px; image-rendering: pixelated; }

/* 鱼图鉴 */
.fish-book { margin-top: 42px; }
.fish-book-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}
.fish-book-head h2 { font-size: clamp(1.4rem, 4vw, 1.8rem); text-shadow: 0 3px 0 rgba(0,0,0,.25); }
.fish-progress {
  font-family: var(--font-px);
  font-size: .72rem;
  color: var(--sun);
  background: rgba(0,0,0,.35);
  border: 3px solid var(--ink);
  padding: .45em .8em;
  border-radius: 6px;
}
/* 图鉴收集进度条 */
.fish-progress-bar {
  margin-top: 14px;
  height: 14px;
  background: rgba(0,0,0,.35);
  border: 3px solid var(--ink);
  border-radius: 7px;
  overflow: hidden;
}
.fish-progress-bar i {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #7ec8e3, #2a6f97);
  transition: width .5s ease;
}
/* 全收集奖励 */
.fish-reward {
  margin-top: 18px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 22px;
  background: rgba(255, 227, 234, .96);
  border-color: var(--gold);
  box-shadow:
    0 0 0 3px rgba(247, 201, 75, .45),
    0 8px 0 rgba(0,0,0,.3),
    inset 0 0 0 3px rgba(255,255,255,.35);
}
.fish-reward img {
  width: 52px;
  image-rendering: pixelated;
  animation: maxGlow 1.6s ease-in-out infinite;
}
.fish-reward .r-text {
  font-size: .98rem;
  line-height: 1.8;
  color: var(--ink);
}
.fish-book-grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(135px, 1fr));
  gap: 14px;
}
.fish-slot {
  padding: 14px 10px 12px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: rgba(253,246,227,.85);
}
.fish-slot .f-img {
  width: 46px; height: 46px;
  image-rendering: pixelated;
  filter: grayscale(1);
  opacity: .45;
  transition: filter .3s, opacity .3s, transform .2s;
}
.fish-slot.caught { background: #dff0d2; box-shadow: inset 0 0 0 3px rgba(107,143,60,.35); }
.fish-slot.caught .f-img { filter: none; opacity: 1; }
.fish-slot.caught:hover .f-img { transform: scale(1.15) rotate(-4deg); }
.fish-slot .f-n { font-size: .9rem; }
.fish-slot .f-s { font-family: var(--font-px); font-size: .58rem; color: var(--heart); }

/* ---------- 农场页 ---------- */
.farm-stats {
  margin-top: 34px;
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}
.stat-chip {
  background: rgba(0,0,0,.38);
  border: 3px solid var(--ink);
  padding: .55em 1.1em;
  border-radius: 6px;
  font-family: var(--font-px);
  font-size: .72rem;
  color: var(--sun);
}
.stat-chip b { color: #fff; }
.farm-grid {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 16px;
}
.plot {
  height: 158px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--soil);
  border: 4px solid var(--ink);
  border-radius: 10px;
  cursor: pointer;
  color: var(--cream);
  user-select: none;
  transition: transform .12s, box-shadow .12s;
  position: relative;
}
.plot:hover { transform: translateY(-4px); box-shadow: 0 8px 0 rgba(0,0,0,.3); }
.plot .crop-img {
  width: 50px; height: 50px;
  image-rendering: pixelated;
  filter: drop-shadow(0 3px 0 rgba(0,0,0,.3));
}
.plot .p-label { font-size: .86rem; text-align: center; line-height: 1.5; }
.plot .p-stage { font-size: .72rem; opacity: .85; }
.plot .p-heart { position: absolute; top: 6px; right: 8px; font-size: .9rem; }
.plot.seed .p-label { color: var(--cream); }
.plot.growing { cursor: default; }
.plot.growing:hover { transform: none; box-shadow: none; }
.plot.ready {
  background: #6b8f3c;
  animation: readyPulse 1.2s ease-in-out infinite;
}
@keyframes readyPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(247,201,75,.55); }
  50%      { box-shadow: 0 0 0 9px rgba(247,201,75,0); }
}
.plot.ready .p-label { font-weight: bold; }

/* 通用小标题 */
.section-head {
  margin-top: 42px;
  text-align: center;
}
.section-head h2 { font-size: clamp(1.5rem, 4.5vw, 2rem); text-shadow: 0 3px 0 rgba(0,0,0,.25); }
.section-head p { margin-top: 6px; color: #ffe9c9; font-size: .98rem; }

/* ---------- 小镇居民 ---------- */
.villager-grid {
  margin-top: 30px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 18px;
}
.villager-card {
  padding: 20px 16px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  cursor: pointer;
  transition: transform .15s, box-shadow .15s;
}
.villager-card:hover {
  transform: translateY(-5px) rotate(-1deg);
  box-shadow: 0 10px 0 rgba(0,0,0,.35), inset 0 0 0 3px rgba(255,255,255,.35);
}
.villager-card img.v-avatar {
  width: 74px; height: 74px;
  image-rendering: pixelated;
  border: 4px solid var(--ink);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 3px 0 rgba(0,0,0,.25);
  transition: transform .2s;
}
.villager-card:hover img.v-avatar { transform: scale(1.08) rotate(2deg); }
.villager-card .v-name { font-size: 1.18rem; }
.villager-card .v-bday {
  font-family: var(--font-px);
  font-size: .58rem;
  color: var(--heart);
  letter-spacing: 1px;
}
.villager-card .v-fav { font-size: .8rem; color: #6d5a3a; }
/* 好感度心形栏 */
.villager-card .v-hearts {
  display: flex;
  gap: 2px;
  font-size: .95rem;
  line-height: 1;
  min-height: 1em;
}
.villager-card .h-heart { color: var(--heart); text-shadow: 0 1px 0 rgba(0,0,0,.12); }
.villager-card .h-heart.empty { color: #d9cdc0; }
.villager-card .h-heart.bump { animation: hBump .35s ease; }
@keyframes hBump {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.5); }
  100% { transform: scale(1); }
}
.villager-card .v-friendship {
  font-family: var(--font-px);
  font-size: .58rem;
  color: #8a7350;
  min-height: 1.4em;
}
/* 好感度满：金色高亮 */
.villager-card.max {
  border-color: var(--gold);
  box-shadow:
    0 0 0 3px rgba(247, 201, 75, .45),
    0 8px 0 rgba(0,0,0,.3),
    inset 0 0 0 3px rgba(255,255,255,.35);
}
.villager-card.max .v-hearts { animation: maxGlow 1.6s ease-in-out infinite; }
.villager-card.max .v-friendship { color: #b8860b; }
@keyframes maxGlow {
  0%, 100% { filter: drop-shadow(0 0 0 rgba(247,201,75,0)); }
  50%      { filter: drop-shadow(0 0 6px rgba(247,201,75,.9)); }
}
.villager-card .v-line {
  margin-top: 4px;
  font-size: .88rem;
  line-height: 1.7;
  background: #ffe9d2;
  border: 2px solid var(--ink);
  border-radius: 5px;
  padding: .55em .7em;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .25s, transform .25s;
}
.villager-card.speaking .v-line { opacity: 1; transform: translateY(0); }
/* 专属卡片：镇上的她 */
.villager-card.her {
  background: #ffe3ea;
  border-color: var(--heart);
}
.villager-card.her .v-line { background: #fff; }

/* 温室田地（冬天） */
body[data-season="winter"] .plot { background: #9db4c4; }
body[data-season="summer"] .plot { background: #8a5a34; }
body[data-season="autumn"] .plot { background: #7d5a2e; }
body[data-season="winter"] .plot.ready { background: #7fa3b5; }

@media (max-width: 640px) {
  .pond { height: 280px; }
  .subpage { padding-top: 84px; }
}

/* ---------- 四季场景主题 ---------- */
body[data-season="summer"] { background-color: #3e6fae; }
body[data-season="autumn"] { background-color: #4a3b66; }
body[data-season="winter"] { background-color: #2c3e63; }

body[data-season="summer"] .grass,
body[data-season="summer"] #pixel-grass {
  background: repeating-linear-gradient(90deg, #7aa244 0 34px, #5f8a33 34px 68px);
  border-top-color: #4f7328;
}
body[data-season="autumn"] .grass,
body[data-season="autumn"] #pixel-grass {
  background: repeating-linear-gradient(90deg, #9a7a3f 0 34px, #7d6331 34px 68px);
  border-top-color: #66512a;
}
body[data-season="winter"] .grass,
body[data-season="winter"] #pixel-grass {
  background: repeating-linear-gradient(90deg, #dfe7ee 0 34px, #c3d0dc 34px 68px);
  border-top-color: #a8bac9;
}
body[data-season="autumn"] .tree .leaf { background: #c07a2e; }
body[data-season="autumn"] .tree .leaf::after { background: #d9923c; }
body[data-season="winter"] .tree .leaf { background: #aebccb; }
body[data-season="winter"] .tree .leaf::after { background: #c6d2de; }
body[data-season="winter"] .sun {
  background: #e8f0f8;
  box-shadow: 0 0 40px 14px rgba(220, 235, 248, .5);
}

/* ---------- 背景音乐：无控件，默认自动播放 ---------- */
