/* ============================================================
   谁是大诗豪 — 首页场景样式
   泛舟入画 + 游历地图 + 诗人列表
   ============================================================ */

/* --- Google Fonts 已在 index.html 引入 --- */
:root {
  --hs-paper: #faf6ee;
  --hs-ink: #2c2c2c;
  --hs-ink-soft: #4a4540;
  --hs-ink-mid: #6b6660;
  --hs-ink-light: #9a9590;
  --hs-cinnabar: #c4413b;
  --hs-azure: #6a96b0;
  --hs-malachite: #5a8a6a;
  --hs-ochre: #b8863a;
  --hs-gold: #c9a84c;
  --hs-gold-light: #e0c870;
  --hs-v-mengxue: #5a8a6a;
  --hs-v-qingjin: #4a8a9a;
  --hs-v-jinshi: #c4413b;
  --hs-v-wanxiang: #7a5a8a;
  --hs-font-poem: 'Noto Serif SC', 'STSong', 'SimSun', 'Songti SC', serif;
  --hs-font-title: 'Ma Shan Zheng', 'STKaiti', 'KaiTi', cursive;
  --hs-font-ui: 'PingFang SC', 'Microsoft YaHei', 'Hiragino Sans GB', sans-serif;
}

/* ============================================================
   持久化山水背景层 — 所有层级共享
   ============================================================ */
.home-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background: linear-gradient(180deg,
    #e8edf4 0%, #e0e8ef 8%, #d8e2ea 16%,
    #e4e0d2 32%, #f0e8d4 50%, #f7eed0 68%,
    #fdf6e6 86%, #fef9ed 100%);
}
.home-bg::after {
  content: '';
  position: absolute; inset: 0;
  opacity: 0.032;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.home-bg-svg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
}

/* ============================================================
   Splash 全屏遮罩 — 泛舟入画
   ============================================================ */
.home-splash {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  overflow: hidden;
  background: linear-gradient(180deg,
    #e8edf4 0%, #e0e8ef 8%, #d8e2ea 16%,
    #e4e0d2 32%, #f0e8d4 50%, #f7eed0 68%,
    #fdf6e6 86%, #fef9ed 100%);
  transition: opacity 1s cubic-bezier(0.4,0,0.2,1), transform 1s cubic-bezier(0.4,0,0.2,1), filter 1s ease;
}
.home-splash.dismissed {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.96);
  filter: blur(6px);
}

/* 宣纸底纹 */
.home-splash::after {
  content: '';
  position: absolute; inset: 0;
  opacity: 0.032;
  pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  z-index: 2;
}

/* SVG 场景 */
.home-splash-svg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  z-index: 1;
}

/* 文字区 */
.home-splash-text {
  position: relative; z-index: 4;
  display: flex; flex-direction: column;
  align-items: center; gap: 16px;
  width: 100%; max-width: 380px;
  padding: 0 16px;
  margin-top: auto;
  padding-bottom: 8vh;
}
.home-splash-text .kicker {
  font-family: var(--hs-font-poem);
  font-size: 10.5px; color: var(--hs-ink-mid);
  letter-spacing: 8px; margin-bottom: 2px;
}
.home-splash-text .main-title {
  font-family: var(--hs-font-title);
  font-size: clamp(34px, 8vw, 48px);
  letter-spacing: 12px; line-height: 1.15;
  background: linear-gradient(180deg, #1f1f1f 0%, #3a3028 80%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0;
}
.home-splash-text .sub-kicker {
  font-family: var(--hs-font-poem);
  font-size: 11px; color: var(--hs-ink-mid);
  letter-spacing: 10px; margin-top: 2px;
}

/* 叙事卷轴卡片 */
.hs-scroll-card {
  position: relative;
  width: 100%;
  background: linear-gradient(160deg, rgba(255,252,244,0.92), rgba(250,245,235,0.94), rgba(248,242,228,0.9));
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(190,160,120,0.3);
  border-radius: 8px;
  padding: 16px 24px;
  box-shadow: 0 2px 24px rgba(0,0,0,0.05), inset 0 1px 0 rgba(255,255,255,0.75);
}
.hs-scroll-card::before, .hs-scroll-card::after {
  content: '';
  position: absolute; left: 18px; right: 18px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(200,168,76,0.5), transparent);
}
.hs-scroll-card::before { top: 0; }
.hs-scroll-card::after  { bottom: 0; }
.hs-scroll-card p {
  font-family: var(--hs-font-poem);
  font-size: 13px; line-height: 2.5;
  color: var(--hs-ink-soft);
  letter-spacing: 0.2px;
  text-align: center;
}
.hs-scroll-card p em {
  font-style: normal;
  color: var(--hs-ink);
  font-weight: 700;
}
.hs-card-sep {
  display: flex; align-items: center; justify-content: center;
  margin: 6px 0;
}
.hs-card-sep span {
  width: 5px; height: 5px;
  background: rgba(200,168,76,0.5);
  transform: rotate(45deg);
}

/* 启程按钮 */
.hs-btn-journey {
  font-family: var(--hs-font-title);
  font-size: 21px; letter-spacing: 10px;
  color: #faf6ee;
  background: linear-gradient(135deg, #2a2218 0%, #181410 100%);
  border: 1px solid rgba(200,168,76,0.45);
  border-radius: 6px;
  padding: 11px 58px;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4,0,0.2,1);
  box-shadow: 0 2px 16px rgba(0,0,0,0.18), inset 0 1px 0 rgba(255,255,255,0.06);
  position: relative; overflow: hidden;
}
.hs-btn-journey::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, transparent 30%, rgba(255,220,150,0.06) 50%, transparent 70%);
}
.hs-btn-journey:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 26px rgba(0,0,0,0.25), inset 0 1px 0 rgba(255,255,255,0.1);
  border-color: rgba(200,168,76,0.7);
}
.hs-btn-journey:active { transform: translateY(0); }
.hs-btn-skip {
  font-size: 10.5px; color: var(--hs-ink-light);
  cursor: pointer; letter-spacing: 3px;
  transition: color 0.3s;
}
.hs-btn-skip:hover { color: var(--hs-ink-mid); }

/* ============================================================
   游历地图 — 版本卡片
   ============================================================ */
.home-map {
  position: relative;
  z-index: 1;
}
.hm-brand {
  text-align: center;
  padding: 8px 0;
}
.hm-brand .act-num {
  font-family: var(--hs-font-poem);
  font-size: 10.5px; color: var(--hs-ink-mid);
  letter-spacing: 6px;
}
.hm-brand .map-title {
  font-family: var(--hs-font-title);
  font-size: clamp(26px, 5.5vw, 36px);
  letter-spacing: 8px; color: var(--hs-ink);
  margin: 2px 0 4px;
}
.hm-brand .map-desc {
  font-family: var(--hs-font-poem);
  font-size: 11.5px; color: var(--hs-ink-soft);
  line-height: 2.1; max-width: 310px;
  margin: 0 auto;
}

/* 毛笔状态条 */
.hm-brush-bar {
  display: inline-flex; align-items: center;
  gap: 3px; padding: 6px 18px;
  background: rgba(255,255,255,0.6);
  border: 1px solid rgba(180,155,120,0.18);
  border-radius: 20px; margin-top: 8px;
  font-size: 10.5px; color: var(--hs-ink-soft);
  letter-spacing: 1px;
}
.hm-brush-img {
  width: 4px; height: 22px; border-radius: 2px 2px 1px 1px;
  background: linear-gradient(180deg, #d8be68 0%, #ac8a28 22%, #2c2c2c 23%, #2c2c2c 50%, #ac8a28 51%, #d8be68 100%);
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.hm-brush-img.lost { opacity: 0.08; filter: grayscale(1); box-shadow: none; }

/* 版本选择 */
.hm-section-head {
  display: flex; align-items: center; gap: 8px;
  padding: 24px 0 8px;
}
.hm-section-head::before, .hm-section-head::after {
  content: ''; flex:1; height:1px;
  background: linear-gradient(90deg, transparent, rgba(180,150,115,0.3), transparent);
}
.hm-section-head span {
  font-family: var(--hs-font-title);
  font-size: 17px; letter-spacing: 6px;
  color: var(--hs-ink); white-space: nowrap;
}

.hm-version-list { display: flex; flex-direction: column; gap: 10px; }
.hm-vcard {
  position: relative;
  background: rgba(255,255,255,0.72);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(180,150,115,0.2);
  border-radius: 10px;
  padding: 16px 24px;
  cursor: pointer;
  display: flex; align-items: center; gap: 16px;
  transition: all 0.35s cubic-bezier(0.4,0,0.2,1);
  box-shadow: 0 1px 5px rgba(0,0,0,0.025);
  overflow: hidden;
}
.hm-vcard:hover, .hm-vcard:active {
  transform: translateX(4px);
  box-shadow: 0 3px 18px rgba(0,0,0,0.06);
  border-color: rgba(180,150,115,0.45);
  background: rgba(255,255,255,0.88);
}
.hm-vcard::before {
  content: '';
  position: absolute; left:0; top:18%; bottom:18%;
  width: 3px; border-radius: 0 2px 2px 0;
  transition: all 0.35s;
}
.hm-vcard.mengxue::before  { background: linear-gradient(180deg, var(--hs-v-mengxue), #8ab89a); }
.hm-vcard.qingjin::before  { background: linear-gradient(180deg, var(--hs-v-qingjin), #6aaaba); }
.hm-vcard.jinshi::before   { background: linear-gradient(180deg, var(--hs-v-jinshi), #d4655e); }
.hm-vcard.wanxiang::before { background: linear-gradient(180deg, var(--hs-v-wanxiang), #9a7aaa); }
.hm-vcard.locked {
  opacity: 0.35; cursor: default;
  filter: grayscale(0.15);
}
.hm-vcard.locked:hover { transform: none; box-shadow: 0 1px 5px rgba(0,0,0,0.025); }
.hm-vcard.locked::before { background: var(--hs-ink-light) !important; }
.hm-vcard-icon {
  width: 46px; height: 46px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0;
  transition: transform 0.35s;
}
.hm-vcard:hover .hm-vcard-icon { transform: scale(1.06); }
.hm-vcard.locked:hover .hm-vcard-icon { transform: none; }
.hm-vcard-icon.mengxue  { background: linear-gradient(135deg, rgba(90,138,106,0.1), rgba(90,138,106,0.03)); }
.hm-vcard-icon.qingjin  { background: linear-gradient(135deg, rgba(74,138,154,0.1), rgba(74,138,154,0.03)); }
.hm-vcard-icon.jinshi   { background: linear-gradient(135deg, rgba(196,65,59,0.09), rgba(196,65,59,0.02)); }
.hm-vcard-icon.wanxiang { background: linear-gradient(135deg, rgba(122,90,138,0.1), rgba(122,90,138,0.03)); }
.hm-vcard-body { flex:1; min-width:0; }
.hm-vcard-name { font-family: var(--hs-font-title); font-size: 19px; letter-spacing: 5px; color: var(--hs-ink); line-height: 1.3; }
.hm-vcard-role { font-size: 10.5px; color: var(--hs-ink-soft); margin-top:1px; }
.hm-vcard-meta { font-size: 10px; color: var(--hs-ink-light); margin-top:1px; }
.hm-vcard-arrow { font-size: 15px; color: var(--hs-ink-light); flex-shrink: 0; transition: transform 0.35s; }
.hm-vcard:hover .hm-vcard-arrow { transform: translateX(3px); }
.hm-vcard.locked .hm-vcard-arrow { display:none; }

/* 底部功能栏 */
.hm-foot {
  display: flex; justify-content: space-between;
  align-items: center;
  padding: 24px 8px 0;
  margin-top: auto;
}
.hm-foot-btn {
  display: flex; flex-direction: column;
  align-items: center; gap: 2px;
  font-size: 10.5px; color: var(--hs-ink-soft);
  cursor: pointer; padding: 6px 14px;
  border-radius: 8px; transition: all 0.25s;
  border: 1px solid transparent;
  background: none;
}
.hm-foot-btn:hover {
  color: var(--hs-ink);
  border-color: rgba(180,150,115,0.18);
  background: rgba(255,255,255,0.45);
}
.hm-foot-score {
  display: flex; align-items: center; gap: 4px;
  font-size: 11px; color: var(--hs-ink-soft);
}
.hm-foot-score b { font-weight: 700; color: var(--hs-ochre); font-size: 20px; font-family: var(--hs-font-poem); }

/* ============================================================
   诗人列表 — 拜访诗人
   ============================================================ */
.home-poets {
  position: relative;
  z-index: 1;
}
.hp-back {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 13px; color: var(--hs-ink-soft);
  cursor: pointer; padding: 4px 0;
  margin-bottom: 8px;
  transition: color 0.25s;
}
.hp-back:hover { color: var(--hs-ink); }
.hp-brand {
  text-align: center; margin-bottom: 12px;
}
.hp-brand .hp-title {
  font-family: var(--hs-font-title);
  font-size: 24px; letter-spacing: 6px;
  color: var(--hs-ink);
}
.hp-brand .hp-sub {
  font-size: 11px; color: var(--hs-ink-mid);
  margin-top: 2px;
}

/* 诗人游历路径 */
.hp-path {
  position: relative;
  padding-left: 28px;
}
.hp-path::before {
  content: '';
  position: absolute; left: 10px; top: 20px; bottom: 20px;
  width: 2px;
  background: linear-gradient(180deg, rgba(180,150,115,0.3), rgba(180,150,115,0.1));
}
.hp-poet-node {
  position: relative;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px;
  margin-bottom: 8px;
  background: rgba(255,255,255,0.7);
  border: 1px solid rgba(180,150,115,0.15);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
  animation: hpFadeIn 0.4s ease both;
}
.hp-poet-node::before {
  content: '';
  position: absolute; left: -22px; top: 50%;
  transform: translateY(-50%);
  width: 12px; height: 12px;
  border-radius: 50%;
  border: 2px solid var(--hs-ink-light);
  background: var(--hs-paper);
  z-index: 2;
}
.hp-poet-node.unlocked::before {
  border-color: var(--hs-v-mengxue);
  background: #fff;
}
.hp-poet-node.current::before {
  border-color: var(--hs-ochre);
  background: var(--hs-gold-light);
  box-shadow: 0 0 8px rgba(200,168,76,0.5);
}
.hp-poet-node.completed::before {
  border-color: var(--hs-cinnabar);
  background: var(--hs-cinnabar);
}
.hp-poet-node:hover {
  transform: translateX(4px);
  border-color: rgba(180,150,115,0.4);
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}
.hp-poet-node.locked {
  opacity: 0.5; cursor: default;
}
.hp-poet-node.locked:hover { transform: none; }
.hp-poet-lock {
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  opacity: 0.7;
}
.hp-poet-avatar {
  width: 42px; height: 42px; border-radius: 50%;
  background: linear-gradient(135deg, rgba(180,150,115,0.15), rgba(180,150,115,0.05));
  display: flex; align-items: center; justify-content: center;
  font-family: var(--hs-font-title); font-size: 18px;
  color: var(--hs-ink); flex-shrink: 0;
  border: 1.5px solid rgba(180,150,115,0.2);
}
.hp-poet-info { flex: 1; min-width: 0; }
.hp-poet-name {
  font-family: var(--hs-font-title);
  font-size: 16px; color: var(--hs-ink);
  letter-spacing: 2px;
}
.hp-poet-meta {
  font-size: 10px; color: var(--hs-ink-light);
  margin-top: 1px;
}
.hp-poet-progress {
  display: flex; align-items: center; gap: 6px;
  flex-shrink: 0;
}
.hp-mini-bar {
  width: 50px; height: 5px;
  background: rgba(180,150,115,0.12);
  border-radius: 3px; overflow: hidden;
}
.hp-mini-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--hs-ochre), var(--hs-cinnabar));
  border-radius: 3px;
}
.hp-poet-text {
  font-size: 10px; color: var(--hs-ink-light);
}
.hp-seal {
  position: absolute; top: 6px; right: 8px;
  width: 28px; height: 28px;
  border-radius: 4px;
  background: var(--hs-cinnabar);
  color: #fdfaf3;
  font-size: 10px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  opacity: 0.85;
  transform: rotate(-8deg);
}

@keyframes hpFadeIn {
  from { opacity: 0; transform: translateX(-12px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 360px) {
  .hm-vcard { padding: 10px 14px; }
  .hm-vcard-name { font-size: 16px; }
  .home-splash-text .main-title { font-size: 28px; }
  .hs-scroll-card p { font-size: 12px; line-height: 2.3; }
  .hs-btn-journey { font-size: 19px; padding: 10px 44px; }
  .home-splash-text { padding-bottom: 6vh; }
}
