/* ============================================
   LASUISUI 怪谈 — Base Design System v2.0
   手造纸艺 · 民俗桌游 · 撕裂边 · 印章按钮
   上传作品集为环境图形 · 60%+ 视觉来自插画
   ============================================ */

/* === 字体 === */
@font-face {
  font-family: 'HuTuTi';
  src: url('../assets/e9667cb8__1f420ae8-1fdc-4606-a3d2-a10e4fd71a9e.ttf') format('truetype');
  font-display: swap;
}

/* === 5 身份作品集水印带 (自动注入) === */
.identity-watermark-strip {
  position: fixed; bottom: 0; left: 0; right: 0;
  z-index: -5; pointer-events: none;
  height: 80px;
  display: flex;
  background: linear-gradient(180deg, transparent 0%, rgba(20, 10, 5, 0.35) 100%);
}
.identity-watermark-strip .iw-item {
  flex: 1;
  background-size: cover; background-position: center;
  opacity: 0.16;
  filter: blur(3px) saturate(0.6);
  border-right: 1px solid rgba(0,0,0,0.2);
}

:root {
  /* === 墨水色 · 暗调民俗 === */
  --c-ink: #2a1810;
  --c-ink-deep: #1a0e08;
  --c-ink-light: #5a3a2a;
  --c-ink-faint: #8a6a58;

  /* === 纸张色 · 米黄手作 === */
  --c-paper: #f1ebd9;
  --c-paper-aged: #d4c4a3;
  --c-paper-dark: #b8a380;
  --c-paper-edge: #8a7048;
  --c-paper-warm: #ede0c8;

  /* === 印章色 · 朱砂+金 === */
  --c-seal-red: #a03020;
  --c-seal-red-dark: #7a1a10;
  --c-gold: #c9a040;
  --c-gold-light: #d8b870;
  --c-gold-dim: #8b6820;
  --c-cinnabar: #c84030;

  /* === 身份主色（带点民俗调）=== */
  --c-explorer: #7a9a3a;     /* 探索者 - 苔绿 */
  --c-explorer-deep: #4a6020;
  --c-observer: #8a5a2a;      /* 观察者 - 赭石 */
  --c-observer-deep: #5a3818;
  --c-creator: #c8703a;        /* 创造者 - 陶土橙 */
  --c-creator-deep: #8a4818;
  --c-guardian: #4a7a8a;     /* 守护者 - 水墨蓝 */
  --c-guardian-deep: #2a5060;
  --c-recorder: #6a5a3a;      /* 记录者 - 古卷褐 */
  --c-recorder-deep: #3a2a18;

  /* === 阴影 · 厚纸堆叠 === */
  --shadow-soft: 3px 4px 0 rgba(42, 24, 16, 0.2);
  --shadow-card: 4px 6px 0 rgba(42, 24, 16, 0.35);
  --shadow-paper: 5px 8px 0 rgba(42, 24, 16, 0.4);
  --shadow-stamp: 4px 5px 0 rgba(42, 24, 16, 0.85);
  --shadow-deep: 8px 10px 0 rgba(0, 0, 0, 0.4);

  /* === 字体族 === */
  --font-display: 'HuTuTi', 'Noto Serif CJK SC', 'Songti SC', 'STSong', serif;
  --font-serif: 'Noto Serif CJK SC', 'Songti SC', 'STSong', 'SimSun', serif;
  --font-sans: 'Noto Sans CJK SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-hand: 'HuTuTi', 'Noto Serif CJK SC', serif;
  --font-mono: 'Courier New', monospace;
}

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

html, body {
  width: 100%;
  min-height: 100vh;
  background: var(--c-paper);
  color: var(--c-ink);
  font-family: var(--font-serif);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  text-rendering: optimizeLegibility;
}

/* ============================================
   容器边界防溢出 (手机垂直手札 · 隐藏原生滚动条)
   ============================================ */
html { overflow-x: hidden; }
body {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  width: 100%;
  max-width: 100vw;
  word-wrap: break-word;
  overflow-wrap: anywhere;
}
/* 隐藏手机浏览器原生滚动条，但保持可滚动 */
::-webkit-scrollbar { width: 0; height: 0; background: transparent; }
::-webkit-scrollbar-thumb { background: transparent; }
::-webkit-scrollbar-track { background: transparent; }
* { scrollbar-width: none; -ms-overflow-style: none; }
img, video, svg { max-width: 100%; height: auto; display: block; }
/* 防止任何超出视口的绝对元素造成横向滚动 */
body, html, main, .page, .content, .home, .oracle, section { max-width: 100vw; }

/* ============================================
   左对齐 · 行高 1.75 · 手机单列轴向流规范
   ============================================ */
/* 全站正文内容左对齐，舒适行高，模拟实体书页排印 */
.body-text,
.content p,
.desc-text,
.story-text,
.oracle-msg,
.result-desc,
.archive-body,
.archive-msg,
.form-note,
.step-desc {
  text-align: left;
  line-height: 1.75;
  font-size: 15px;
}
/* 手机端按钮全宽单列，不做双列并排 */
.actions-row,
.btn-stack,
.hero-cta {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}
.actions-row a,
.actions-row button,
.btn-stack a,
.btn-stack button,
.hero-cta a {
  width: 100%;
  justify-content: center;
  text-align: center;
}
/* 手机端答题选项全宽单列 */
.answers-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
}
.answer-card {
  width: 100%;
  text-align: left !important;
}
/* 手机端容器内边距收窄，防止撑爆 */
@media (max-width: 480px) {
  .page { padding: 48px 16px 32px; }
  .question-screen { padding: 60px 16px 32px; }
  .entrance-content { padding: 80px 16px 40px; }
  .result-screen { padding: 60px 16px 40px; }
  .archive-rec { padding: 40px 16px 0; }
  .archive-body { padding: 28px 16px; }
  .form-body { padding: 24px 16px; }
}

/* ============================================
   背景系统 · 6 张上传作品集作为环境图形
   ============================================ */

/* 默认深色底色（所有页面有底） */
.bg-dark {
  position: fixed; inset: 0; z-index: -10;
  background:
    radial-gradient(ellipse 70% 60% at 50% 50%, rgba(60, 30, 20, 0.5) 0%, transparent 70%),
    linear-gradient(180deg, #1a0e08 0%, #0e0805 60%, #050200 100%);
}

/* 6 个作品集背景类 — 大背景 / 环境图形 */
.bg-artwork {
  position: fixed; inset: 0; z-index: -9;
  background-color: #1a0e08;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  pointer-events: none;
}
.bg-artwork::before {
  content: ''; position: absolute; inset: 0;
  background: rgba(20, 10, 5, 0.55);
}
.bg-artwork::after {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse 100% 100% at 50% 50%, transparent 25%, rgba(20,10,5,0.7) 85%);
}

/* 6 个身份对应的背景图 */
.bg-explorer { background-image: url('../attachments/4b5ef3be__82d20028-3593-4413-9b13-4c88b64b4355.png'); }
.bg-observer { background-image: url('../attachments/9d106b41__2eaea121-49ed-4abd-b728-738672ae9791.jpg'); }
.bg-creator  { background-image: url('../attachments/94405b77__b9bf3ae8-7aab-43f7-81ad-3b5e2540bfb4.png'); }
.bg-guardian { background-image: url('../attachments/ad93d2ca__7bac85da-9fb0-4269-8f26-4237c066a906.png'); }
.bg-recorder { background-image: url('../attachments/3dc2199b__f260cb5e-56ea-4718-b0b0-928eb59d37b2.png'); }
.bg-home     { background-image: url('../attachments/f7bc342a__1d30e3df-1cf7-4360-8833-6748c16bada6.png'); }

/* 首页特殊：作品集作右下角环境图形 */
.bg-home-page {
  position: fixed; inset: 0; z-index: -9; pointer-events: none;
  background:
    radial-gradient(ellipse 60% 50% at 75% 65%, rgba(200, 110, 50, 0.15) 0%, transparent 60%),
    linear-gradient(180deg, #2a1810 0%, #1a0e08 60%, #0a0502 100%);
}
.bg-home-page::before {
  content: ''; position: absolute; inset: 0;
  background-image: url('../attachments/f7bc342a__1d30e3df-1cf7-4360-8833-6748c16bada6.png');
  background-size: 55% auto;
  background-position: right bottom;
  background-repeat: no-repeat;
  opacity: 0.7;
  filter: blur(1px) brightness(0.85);
}
.bg-home-page::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(26,14,8,0.6) 0%, rgba(26,14,8,0.3) 40%, transparent 80%);
}

/* 装饰性作品集锚点（页面里某处出现一张大图） */
.artwork-anchor {
  position: relative;
  width: 100%;
  aspect-ratio: 3/4;
  max-width: 480px;
  margin: 0 auto;
  border: 2px solid var(--c-ink);
  background: var(--c-paper);
  box-shadow: var(--shadow-deep);
  overflow: hidden;
}
.artwork-anchor img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
}
.artwork-anchor::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(20,10,5,0.4) 100%);
  pointer-events: none;
}

/* ============================================
   纸张纹理叠加层
   ============================================ */
.paper-texture {
  position: fixed; inset: 0; z-index: -8; pointer-events: none;
  opacity: 0.18;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='0.75' numOctaves='3' seed='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.3 0 0 0 0 0.22 0 0 0 0 0.12 0 0 0 0.4 0'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}
.paper-fibers {
  position: fixed; inset: 0; z-index: -7; pointer-events: none;
  opacity: 0.12;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='0.95' numOctaves='2' seed='9'/%3E%3CfeColorMatrix values='0 0 0 0 0.4 0 0 0 0 0.32 0 0 0 0 0.2 0 0 0 0.3 0'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

/* 暗角 */
.vignette {
  position: fixed; inset: 0; z-index: -6; pointer-events: none;
  background: radial-gradient(ellipse 100% 100% at 50% 50%, transparent 50%, rgba(0,0,0,0.4) 100%);
}

/* ============================================
   浮动粒子 · 灰尘水珠
   ============================================ */
.dust {
  position: fixed; inset: 0; z-index: 100; pointer-events: none; overflow: hidden;
}
.dust span {
  position: absolute;
  width: 2px; height: 2px;
  background: var(--c-gold);
  border-radius: 50%;
  opacity: 0;
  animation: dust-float 12s infinite ease-in-out;
  box-shadow: 0 0 4px var(--c-gold);
}
@keyframes dust-float {
  0%, 100% { transform: translateY(100vh) translateX(0); opacity: 0; }
  10% { opacity: 0.5; }
  50% { transform: translateY(45vh) translateX(30px); opacity: 0.3; }
  90% { opacity: 0.4; }
}

/* ============================================
   导航栏
   ============================================ */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 28px;
  font-family: var(--font-sans);
  font-size: 12px; color: var(--c-paper-warm);
  letter-spacing: 0.15em;
  background: rgba(20, 10, 5, 0.75);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(201, 160, 64, 0.2);
}
.topbar .crumb { display: flex; gap: 16px; align-items: center; }
.topbar .crumb a {
  color: var(--c-paper-warm); text-decoration: none;
  padding: 5px 12px; border: 1px solid rgba(201, 160, 64, 0.4);
  background: rgba(201, 160, 64, 0.06);
  transition: all 0.25s;
}
.topbar .crumb a:hover { color: var(--c-gold-light); border-color: var(--c-gold); background: rgba(201, 160, 64, 0.12); }
.topbar .badge {
  padding: 4px 12px;
  border: 1px solid var(--c-gold-dim);
  color: var(--c-gold);
  font-size: 10px; letter-spacing: 0.25em;
  background: rgba(201, 160, 64, 0.06);
}

.oracle-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 24px;
  background: rgba(20, 10, 5, 0.8);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(201, 160, 64, 0.2);
}
.oracle-nav .exit {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--c-paper-warm);
  text-decoration: none;
  font-family: var(--font-sans); font-size: 12px;
  letter-spacing: 0.15em;
  padding: 6px 14px;
  border: 1px solid rgba(201, 160, 64, 0.4);
  transition: all 0.25s;
  background: rgba(201, 160, 64, 0.06);
}
.oracle-nav .exit:hover { color: var(--c-gold-light); border-color: var(--c-gold); }
.oracle-nav .progress {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--font-hand);
  font-size: 14px; color: var(--c-paper-warm);
  letter-spacing: 0.2em;
}
.oracle-nav .progress .num-current { color: var(--c-gold); font-size: 20px; }

/* ============================================
   页面布局
   ============================================ */
.page {
  width: 100%; max-width: 100vw; min-height: 100vh;
  position: relative;
  padding: 60px 0 40px;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  box-sizing: border-box;
}

.content {
  position: relative; z-index: 10;
  width: 100%; max-width: 1200px; margin: 0 auto;
  padding: 0 32px;
}
.content--narrow { max-width: 760px; }
.content--wide { max-width: 1400px; }

/* ============================================
   工具类
   ============================================ */
.text-gold { color: var(--c-gold); }
.text-paper { color: var(--c-paper-warm); }
.text-dim { color: var(--c-ink-faint); }
.font-hand { font-family: var(--font-hand); }
.font-serif { font-family: var(--font-serif); }
.letter-wide { letter-spacing: 0.25em; }
.center { text-align: center; }
.upper { text-transform: uppercase; }
.deco { user-select: none; pointer-events: none; }
