/* 坐忘 ZUOWANG · 样式
   色彩基调：暗金 + 沉木 + 暖褐。文字始终高对比，浅底浅字处做反色处理。 */

:root {
  --ink: #f2e6d2;
  --ink-dim: #c9b795;
  --ink-faint: #8d8069;
  --gold: #d8a94e;
  --gold-soft: #b8893a;
  --gold-bright: #f0c777;
  --panel: rgba(20, 15, 11, 0.9);
  --panel-solid: #16110d;
  --line: rgba(216, 169, 78, 0.2);
  --line-soft: rgba(216, 169, 78, 0.1);
  --danger: #d97b6a;
  --radius: 12px;
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.55);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

::selection { background: rgba(216, 169, 78, 0.32); color: #fff7e6; }

/* 细金滚动条：愿力 / 我的 两张抽屉都是长滚动区，默认滚动条太粗太白 */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(216, 169, 78, 0.22);
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover { background: rgba(216, 169, 78, 0.4); }
* { scrollbar-width: thin; scrollbar-color: rgba(216, 169, 78, 0.25) transparent; }

html, body {
  height: 100%;
  overflow: hidden;
  background: #0a0806;
  color: var(--ink);
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  font-size: 14px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

body { overscroll-behavior: none; }

#scene {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
}

.hidden { display: none !important; }
.muted { color: var(--ink-faint); }

/* ── 无 JS 兜底（noscript）─────────────────────────
   殿堂是 canvas 画的，脚本被禁用时只剩黑屏。这段正文是给访客看的，
   也是给爬虫看的——它同时是一段真正可索引的文字。 */
.nojs {
  position: fixed;
  inset: 0;
  z-index: 9999;
  overflow: auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 9vh 8vw;
  background: radial-gradient(circle at 50% 30%, #1b1410 0%, #0a0806 70%);
  color: var(--ink);
}

.nojs h1 {
  font-size: clamp(26px, 6vw, 34px);
  font-weight: 400;
  letter-spacing: 0.24em;
  color: var(--gold-bright);
  margin-bottom: 18px;
}

.nojs p {
  max-width: 40em;
  font-size: 15px;
  line-height: 2.05;
  color: var(--ink-dim);
}

.nojs p + h1 { margin-top: 44px; }

/* ── 入殿 ─────────────────────────────────────── */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse at 50% 42%, rgba(60, 38, 12, 0.5), transparent 62%),
    rgba(6, 5, 4, 0.9);
  backdrop-filter: blur(6px);
  transition: opacity 0.8s ease, visibility 0.8s;
}
.overlay.hidden { opacity: 0; visibility: hidden; pointer-events: none; display: flex !important; }

.entry-card {
  width: min(92vw, 400px);
  padding: 44px 40px 32px;
  text-align: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.entry-seal {
  width: 64px; height: 64px;
  margin: 0 auto 20px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  box-shadow: 0 8px 26px rgba(216, 169, 78, 0.22);
  font-family: "Songti SC", "SimSun", serif;
}
.entry-seal img { width: 64px; height: 64px; display: block; border-radius: 50%; }

.entry-card h1 {
  font-size: 26px;
  font-weight: 400;
  letter-spacing: 9px;
  text-indent: 9px;
  color: var(--gold-bright);
  margin-bottom: 10px;
  font-family: "Songti SC", "SimSun", "Noto Serif SC", serif;
}

.entry-sub {
  color: var(--ink-dim);
  font-size: 14px;
  letter-spacing: 1.5px;
  margin-bottom: 22px;
}

/* 中缝饰线：细金线夹一枚菱形印，卡片上下两段由此分开 */
.entry-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 6px 26px;
}
.entry-divider::before, .entry-divider::after {
  content: "";
  flex: 1;
  height: 1px;
}
.entry-divider::before { background: linear-gradient(90deg, transparent, rgba(216, 169, 78, 0.42)); }
.entry-divider::after { background: linear-gradient(90deg, rgba(216, 169, 78, 0.42), transparent); }
.entry-divider i {
  width: 5px; height: 5px;
  transform: rotate(45deg);
  background: var(--gold-soft);
  box-shadow: 0 0 8px rgba(216, 169, 78, 0.5);
}

#joinForm { display: flex; flex-direction: column; gap: 12px; }

#nickname, #subEmail, #msgEmail, .r-nick, .r-text-in, textarea {
  width: 100%;
  padding: 12px 14px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.25s, box-shadow 0.25s;
}
#nickname:focus, #subEmail:focus, #msgEmail:focus,
.r-nick:focus, .r-text-in:focus, textarea:focus {
  border-color: var(--gold-soft);
  box-shadow: 0 0 0 3px rgba(216, 169, 78, 0.13);
}
::placeholder { color: rgba(141, 128, 105, 0.65); }

.btn-primary {
  padding: 13px 22px;
  background: linear-gradient(145deg, var(--gold-bright), var(--gold-soft));
  color: #241705;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 3px;
  cursor: pointer;
  transition: transform 0.18s, box-shadow 0.25s, filter 0.2s;
  font-family: inherit;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(216, 169, 78, 0.3); filter: brightness(1.06); }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled {
  opacity: 0.5;
  cursor: progress;
  filter: grayscale(0.3);
  letter-spacing: 1px;
  box-shadow: none;
  transform: none;
}
/* 点下即排队：按钮不灰。用一圈呼吸光＋三个点表示「已记下，正在推门」，
   纯 CSS 符号，三种语言都不必另配文案。 */
.btn-primary.queuing:disabled {
  opacity: 0.94;
  cursor: progress;
  filter: none;
  letter-spacing: 3px;
  animation: queuing-glow 1.8s ease-in-out infinite;
}
.btn-primary.queuing::after {
  content: '···';
  display: inline-block;
  margin-left: 9px;
  letter-spacing: 2px;
  animation: queuing-dots 1.4s ease-in-out infinite;
}
@keyframes queuing-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(216, 169, 78, 0.32); }
  50%      { box-shadow: 0 0 0 8px rgba(216, 169, 78, 0); }
}
@keyframes queuing-dots { 0%, 100% { opacity: 0.3; } 50% { opacity: 1; } }
.btn-primary.sm { padding: 10px 18px; font-size: 13px; letter-spacing: 2px; }

.entry-err { color: var(--danger); font-size: 13px; min-height: 20px; margin-top: 10px; }
.entry-hint { color: var(--ink-faint); font-size: 12px; margin-top: 14px; letter-spacing: 0.5px; }

/* ── 顶栏 ─────────────────────────────────────── */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 40;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  background: linear-gradient(180deg, rgba(8, 6, 5, 0.9), transparent);
  pointer-events: none;
}
.topbar > * { pointer-events: auto; }

.brand { display: flex; align-items: center; gap: 10px; }
.brand-seal {
  width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  font-family: "Songti SC", "SimSun", serif;
}
.brand-seal img { width: 26px; height: 26px; display: block; border-radius: 50%; }
.brand-name {
  font-size: 15px;
  letter-spacing: 6px;
  color: var(--gold-bright);
  font-weight: 500;
  font-family: "Songti SC", "SimSun", "Noto Serif SC", serif;
}

.presence {
  display: flex; align-items: center; gap: 7px;
  padding: 6px 14px;
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  font-size: 13px;
  color: var(--ink-dim);
}
.presence .dot {
  width: 6px; height: 6px;
  background: #7fbf7f;
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(127, 191, 127, 0.8);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
#presenceCount { color: var(--gold-bright); font-weight: 600; }

.top-actions { display: flex; gap: 8px; }

.chip {
  padding: 7px 14px;
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  color: var(--ink-dim);
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.25s;
}
.chip:hover { border-color: var(--line); color: var(--ink); background: rgba(28, 21, 14, 0.95); }
.chip.on {
  color: var(--gold-bright);
  border-color: rgba(216, 169, 78, 0.45);
  background: rgba(216, 169, 78, 0.12);
  box-shadow: 0 0 14px rgba(216, 169, 78, 0.15);
}

/* 图标芯片：佛乐 / 木鱼。描边继承 currentColor，
 * 关态半透明、开态点亮金并带微光，状态一眼可读 */
.icon-chip { display: inline-flex; align-items: center; gap: 7px; }
.icon-chip .ic {
  width: 17px; height: 17px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.55;
  transition: opacity 0.25s, filter 0.25s;
}
.icon-chip .ic .dotf { fill: currentColor; stroke: none; }
/* 木鱼腹上那道口要深，否则读成碗沿 */
.icon-chip .ic .cut { stroke-width: 2.4; }
.icon-chip.on .ic {
  opacity: 1;
  filter: drop-shadow(0 0 5px rgba(240, 199, 119, 0.4));
}

/* ── 侧导航 ───────────────────────────────────── */
.side-nav {
  position: fixed;
  left: 22px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nav-btn {
  position: relative;
  width: 58px;
  padding: 12px 0 9px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  color: var(--ink-faint);
  cursor: pointer;
  transition: all 0.25s;
  font-family: inherit;
}
.nav-btn:hover { color: var(--ink-dim); border-color: var(--line); }
.nav-btn.active {
  color: var(--gold-bright);
  border-color: rgba(216, 169, 78, 0.4);
  background: rgba(216, 169, 78, 0.1);
}
/* 选中态左侧一道金线：比整块描边更安静，像书签 */
.nav-btn.active::before {
  content: "";
  position: absolute;
  left: -1px;
  top: 24%;
  bottom: 24%;
  width: 2px;
  border-radius: 2px;
  background: var(--gold);
  box-shadow: 0 0 10px rgba(216, 169, 78, 0.55);
}
/* 侧导航图标：殿（殿顶）/ 愿（莲）/ 我（禅坐），描边随按钮颜色走 */
.nav-ico {
  font-size: 19px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.nav-ico svg {
  width: 22px; height: 22px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: filter 0.25s;
}
.nav-btn.active .nav-ico svg {
  filter: drop-shadow(0 0 6px rgba(240, 199, 119, 0.45));
}
.nav-txt { font-size: 11px; letter-spacing: 1px; }

.badge {
  position: absolute;
  top: 7px; right: 9px;
  width: 7px; height: 7px;
  background: var(--gold-bright);
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.3s;
}
.badge.flash { opacity: 1; animation: badgeFlash 1.6s ease; }
@keyframes badgeFlash {
  0%, 100% { opacity: 0; transform: scale(0.7); }
  20%, 60% { opacity: 1; transform: scale(1.25); }
}

/* ── 面板 ─────────────────────────────────────── */
.panel {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: none;
  pointer-events: none;
}
.panel.active { display: block; }
.panel[data-view="wishes"].active,
.panel[data-view="me"].active {
  pointer-events: auto;
  background: rgba(6, 5, 4, 0.55);
  backdrop-filter: blur(3px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* 桌面端说明常显，不需要「展开说明」的小钮（移动端才出现） */
.guide-toggle { display: none; }

.hall-guide {
  position: absolute;
  right: 26px;
  bottom: 26px;
  padding: 16px 20px 13px;
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  max-width: 240px;
  animation: guideIn 0.9s cubic-bezier(0.22, 0.8, 0.3, 1) both;
}
@keyframes guideIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
.guide-title {
  font-size: 16px;
  letter-spacing: 4px;
  color: var(--gold-bright);
  margin-bottom: 9px;
  font-weight: 500;
  font-family: "Songti SC", "SimSun", "Noto Serif SC", serif;
}
.guide-rule {
  height: 1px;
  margin-bottom: 10px;
  background: linear-gradient(90deg, rgba(216, 169, 78, 0.45), transparent 82%);
}
.guide-line {
  font-size: 12.5px;
  color: var(--ink-faint);
  line-height: 1.85;
}
.guide-line::before {
  content: "·";
  color: var(--gold-soft);
  margin-right: 8px;
}
.guide-sign {
  margin-top: 9px;
  padding-top: 8px;
  border-top: 1px dashed var(--line-soft);
  font-size: 11px;
  letter-spacing: 3px;
  color: var(--ink-faint);
  text-align: right;
  opacity: 0.75;
  font-family: "Songti SC", "SimSun", serif;
}

/* ── 抽屉表单 ─────────────────────────────────── */
.sheet {
  width: min(94vw, 620px);
  margin: 74px auto 90px;
  padding: 30px 28px 34px;
  background:
    radial-gradient(140% 90% at 50% -10%, #1d1610, transparent 55%),
    var(--panel-solid);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow), inset 0 1px 0 rgba(216, 169, 78, 0.1);
  animation: sheetIn 0.45s cubic-bezier(0.22, 0.8, 0.3, 1) both;
}
@keyframes sheetIn {
  from { opacity: 0; transform: translateY(20px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.sheet-title {
  display: flex;
  align-items: center;
  gap: 13px;
  font-size: 20px;
  letter-spacing: 4px;
  color: var(--gold-bright);
  font-weight: 500;
  margin-bottom: 22px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line-soft);
  font-family: "Songti SC", "SimSun", "Noto Serif SC", serif;
}
/* 标题左侧的方印 + 右侧余白细线：经卷题签的骨架 */
.st-seal {
  width: 34px; height: 34px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  color: var(--gold-bright);
  background: rgba(216, 169, 78, 0.08);
  border: 1px solid rgba(216, 169, 78, 0.42);
  border-radius: 8px;
  text-shadow: 0 0 10px rgba(240, 199, 119, 0.35);
}
.sheet-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--line), transparent 90%);
}
.sheet-foot {
  margin-top: 26px;
  text-align: center;
  font-size: 11.5px;
  letter-spacing: 2.5px;
  color: var(--ink-faint);
  opacity: 0.65;
  font-family: "Songti SC", "SimSun", serif;
}

/* 灯墙：一愿一灯 · 万佛龛 */
.lampwall {
  position: relative;
  margin: 2px 0 9px;
  height: 322px;
  border-radius: 16px;
  overflow: hidden;
  background: #080605;
  border: 1px solid rgba(216, 169, 78, 0.16);
  box-shadow:
    inset 0 0 70px rgba(0, 0, 0, 0.85),
    0 10px 34px rgba(0, 0, 0, 0.45);
  isolation: isolate;
}
.lampwall canvas {
  display: block;
  width: 100%;
  height: 100%;
  /* none：拖动灯墙时不要连带滚页面 */
  touch-action: none;
  cursor: grab;
}
/* 顶压暗、底渐隐，给画布一个有边界的"墙" */
.lampwall::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(7, 5, 4, 0.86), rgba(7, 5, 4, 0) 7%),
    linear-gradient(0deg, rgba(6, 4, 3, 0.8), rgba(6, 4, 3, 0) 9%);
}
.lampwall-bar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 20px;
  padding: 0 3px;
  font-size: 11.5px;
  letter-spacing: 0.8px;
  color: var(--ink-faint);
}
.lampwall-count b {
  color: var(--gold-bright);
  font-weight: 500;
  font-size: 14px;
  font-family: "Songti SC", "SimSun", serif;
  margin-right: 2px;
}
.lampwall-tip { opacity: 0.72; }

/* 抽取：签筒意象——顶部一道金线压边，内里渐沉 */
.draw-box {
  position: relative;
  margin-bottom: 20px;
  padding: 16px 18px;
  background: linear-gradient(180deg, rgba(216, 169, 78, 0.07), rgba(216, 169, 78, 0.03));
  border: 1px solid var(--line-soft);
  border-top: 1px solid rgba(216, 169, 78, 0.38);
  border-radius: var(--radius);
}
.draw-box::before {
  content: "";
  position: absolute;
  top: -1px; left: 50%;
  transform: translateX(-50%);
  width: 34px; height: 2px;
  background: var(--gold);
  border-radius: 2px;
}
.draw-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: 13px;
  color: var(--ink-dim);
  letter-spacing: 0.5px;
}
.btn-ghost {
  padding: 6px 16px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--gold-bright);
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.25s;
}
.btn-ghost:hover { background: rgba(216, 169, 78, 0.12); border-color: rgba(216, 169, 78, 0.5); }

.drawn { min-height: 64px; }
.drawn-inner {
  padding: 14px 16px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 10px;
  border-left: 2px solid var(--gold-soft);
  animation: cardIn 0.5s cubic-bezier(0.22, 0.8, 0.3, 1) both;
}
.d-name {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--gold-bright);
  font-size: 13px;
  letter-spacing: 0.5px;
}
.d-text { color: var(--ink); font-size: 15px; margin: 6px 0 10px; line-height: 1.8; }

/* 刚点亮的那盏：签位上留一点余温，让人确认"确实成了" */
.d-fresh {
  display: inline-block;
  margin-left: 9px;
  padding: 1px 8px 2px;
  border-radius: 999px;
  background: rgba(216, 169, 78, .14);
  border: 1px solid rgba(216, 169, 78, .32);
  color: var(--gold);
  font-size: 10.5px;
  letter-spacing: 1px;
  vertical-align: 2px;
}
#drawnWish.fresh .drawn-inner {
  border-left-color: var(--gold);
  box-shadow: inset 0 0 0 1px rgba(216, 169, 78, .16), 0 0 24px rgba(216, 169, 78, .09);
}

.empty {
  color: var(--ink-faint);
  font-size: 13.5px;
  text-align: center;
  padding: 22px 0;
  letter-spacing: 1px;
}

/* 许愿：计数与按钮分居底行，textarea 占满上一行 */
.wish-form { margin-bottom: 24px; }
.wish-form textarea { resize: vertical; min-height: 76px; }
.wish-form-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
}
.wish-count { font-size: 12px; color: var(--ink-faint); letter-spacing: 1px; }
.wish-count b { color: var(--gold-soft); font-weight: 500; }

/* 愿望卡 */
.wish-list { display: flex; flex-direction: column; gap: 12px; }

@keyframes cardIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.wish-card {
  padding: 15px 17px;
  background: rgba(255, 255, 255, 0.028);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s;
  animation: cardIn 0.5s cubic-bezier(0.22, 0.8, 0.3, 1) both;
}
.wish-card:hover {
  border-color: rgba(216, 169, 78, 0.35);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.wish-card header {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 9px;
}
/* 称呼圆章：昵称首字入印，替代光秃秃的文字昵称 */
.w-avatar {
  flex: none;
  width: 27px; height: 27px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(145deg, #2b2010, #171008);
  border: 1px solid rgba(216, 169, 78, 0.4);
  color: var(--gold-bright);
  font-size: 12.5px;
  font-family: "Songti SC", "SimSun", serif;
}
.w-name { color: var(--gold-bright); font-size: 13px; letter-spacing: 0.5px; }
.w-time {
  margin-left: auto;
  color: var(--ink-faint);
  font-size: 11.5px;
}
.w-text {
  color: var(--ink);
  font-size: 14.5px;
  line-height: 1.8;
  margin-bottom: 10px;
  word-break: break-word;
}

.w-actions { display: flex; gap: 8px; align-items: center; }
.w-like, .w-reply-btn {
  padding: 5px 13px;
  background: transparent;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  color: var(--ink-faint);
  font-size: 12.5px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.22s;
}
.w-like:hover, .w-reply-btn:hover { color: var(--gold-bright); border-color: var(--line); }
.w-like .ico { color: var(--gold-soft); margin-right: 4px; }
.w-like .cnt { color: var(--gold); }

/* 爱心：未点过是空心，点过实心并转朱砂色 —— 一眼能看出"我赞过" */
.w-like .hrt {
  width: 13px;
  height: 13px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linejoin: round;
  margin-right: 5px;
  vertical-align: -2px;
  transition: fill .18s ease, transform .18s ease;
}
.w-like:hover .hrt { transform: scale(1.12); }
.w-like.liked { color: #d0725a; border-color: rgba(208, 114, 90, .45); }
.w-like.liked .hrt { fill: currentColor; }
.w-like.liked .cnt { color: #d0725a; }

.w-replies {
  margin-top: 11px;
  padding-top: 10px;
  border-top: 1px dashed var(--line-soft);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.w-reply { font-size: 13px; color: var(--ink-dim); }
.r-name { color: var(--gold-soft); margin-right: 7px; }
.r-text { color: var(--ink-dim); }

.w-reply-form {
  display: flex;
  gap: 8px;
  margin-top: 11px;
  flex-wrap: wrap;
}
/* hidden 属性会被 display:flex 覆盖，必须显式让位——否则回应框永远展开 */
.w-reply-form[hidden] { display: none; }
.w-reply-form .r-nick { width: 110px; padding: 8px 11px; font-size: 13px; }
.w-reply-form .r-text-in { flex: 1; min-width: 180px; padding: 8px 11px; font-size: 13px; }
.w-reply-form button {
  padding: 8px 16px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--gold-bright);
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
}
.w-reply-form button:hover { background: rgba(216, 169, 78, 0.12); }

/* 我的 */
.me-card {
  margin-bottom: 18px;
  padding: 18px 19px;
  background: rgba(255, 255, 255, 0.028);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  transition: border-color 0.25s;
}
.me-card:hover { border-color: var(--line); }
.me-label {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--gold-bright);
  font-size: 14.5px;
  letter-spacing: 2px;
  margin-bottom: 7px;
}
/* 序号小印：壹 / 贰 / 叁，从 data-seal 取字 */
.me-label::before {
  content: attr(data-seal);
  flex: none;
  width: 25px; height: 25px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12.5px;
  color: var(--gold);
  background: rgba(216, 169, 78, 0.08);
  border: 1px solid rgba(216, 169, 78, 0.35);
  border-radius: 6px;
  font-family: "Songti SC", "SimSun", serif;
}
.me-desc { color: var(--ink-faint); font-size: 13px; margin-bottom: 13px; }
.inline-form { display: flex; gap: 9px; }
.inline-form input { flex: 1; }
.stack-form { display: flex; flex-direction: column; gap: 9px; }
.stack-form textarea { resize: vertical; }
/* 竖排表单里的按钮不拉通栏：靠右收口，视觉上更克制 */
.stack-form .btn-primary { align-self: flex-end; }

/* 帮助文本：条目之间加虚线分隔，条目留呼吸 */
.help-text { font-size: 13.5px; color: var(--ink-dim); line-height: 1.95; }
.help-text p {
  margin-bottom: 9px;
  padding-bottom: 9px;
  border-bottom: 1px dashed var(--line-soft);
}
.help-text p:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.help-text b { color: var(--gold-bright); font-weight: 500; }

/* ── 提示 ─────────────────────────────────────── */
.hover-tip {
  position: fixed;
  z-index: 60;
  padding: 5px 12px;
  background: rgba(12, 9, 6, 0.92);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12.5px;
  color: var(--gold-bright);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
  transform: translate(-50%, -140%);
  white-space: nowrap;
}
.hover-tip.show { opacity: 1; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 46px;
  transform: translate(-50%, 16px);
  z-index: 70;
  padding: 11px 24px;
  background: rgba(16, 12, 8, 0.95);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  font-size: 13.5px;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.woodfish-fx {
  position: fixed;
  z-index: 50;
  color: var(--gold-bright);
  font-size: 26px;
  pointer-events: none;
  animation: wfRise 1.4s ease-out forwards;
  text-shadow: 0 0 18px rgba(240, 199, 119, 0.85);
}
@keyframes wfRise {
  0% { opacity: 0; transform: translateY(0) scale(0.6); }
  25% { opacity: 1; transform: translateY(-18px) scale(1.1); }
  100% { opacity: 0; transform: translateY(-90px) scale(1); }
}

/* ── 移动端 ───────────────────────────────────── */
@media (max-width: 720px) {
  .topbar { height: 52px; padding: 0 13px; }
  .brand-name { font-size: 14px; letter-spacing: 2px; }
  .presence { padding: 5px 11px; font-size: 12px; }
  .presence #presenceHint { display: none; }
  .chip { padding: 6px 11px; font-size: 12px; }
  .icon-chip .ic { width: 15px; height: 15px; }
  .icon-chip { gap: 5px; }

  /* toast 抬到提示条上方，避免两者叠在一起 */
  .toast {
    bottom: 176px;
    font-size: 12.5px;
    padding: 9px 18px;
    max-width: 84vw;
    text-align: center;
    line-height: 1.5;
  }

  .side-nav {
    left: 0; right: 0; top: auto; bottom: 0;
    transform: none;
    flex-direction: row;
    justify-content: center;
    gap: 0;
    /* 渐变更实：面板滚动到底时文字不会透过导航条，看着才干净 */
    background: linear-gradient(0deg, rgba(6, 5, 4, 0.99) 52%, rgba(6, 5, 4, 0.82) 74%, transparent);
    padding-top: 8px;
    /* iPhone 底部横条：不垫高会被系统手势区压住 */
    padding-bottom: max(6px, env(safe-area-inset-bottom));
  }
  .nav-btn {
    width: auto;
    flex: 1 1 0;          /* 三等分铺满，不再挤成中间三条 110px */
    max-width: none;
    flex-direction: row;
    justify-content: center;   /* 图标＋文字在各自格子里居中 */
    gap: 7px;
    padding: 10px 0;
    border-radius: 0;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
  }
  .nav-btn.active { background: transparent; border-bottom-color: transparent; }
  /* 选中态：一小段居中金线，比整格下划线安静，也不会把三组拉得不等宽 */
  .nav-btn.active::after {
    content: "";
    position: absolute;
    left: 50%; bottom: -2px;
    width: 26px; height: 2px;
    transform: translateX(-50%);
    border-radius: 2px;
    background: var(--gold);
    box-shadow: 0 0 10px rgba(216, 169, 78, 0.5);
  }
  /* 桌面版左侧竖标在底部导航里会顶到标签边缘，去掉 */
  .nav-btn.active::before { display: none; }
  .nav-ico svg { width: 19px; height: 19px; }
  .nav-txt { font-size: 12px; }

  /* 手机竖屏屏幕金贵：说明卡不再常驻，收起成左下角一枚「?」。
     首访会自动展开一次，几秒后收起；之后点「?」才展开。
     收起态 visibility:hidden + pointer-events:none，点击完全穿透到蒲团。 */
  .hall-guide {
    left: 12px;
    right: 12px;
    bottom: 112px;        /* 抬到展开钮上方，两者不叠 */
    max-width: none;
    padding: 10px 14px;
    background: rgba(12, 10, 7, 0.82);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-color: rgba(216, 169, 78, 0.12);
    animation: none;      /* 显隐交给下面的 class，避免 fill-mode 压住 opacity */
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    pointer-events: none;
    transition: opacity 0.35s ease, transform 0.35s ease, visibility 0.35s;
  }
  body.guide-open .hall-guide {
    opacity: 1;
    visibility: visible;
    transform: none;
    pointer-events: auto;
  }
  .guide-toggle {
    position: absolute;
    left: 14px;
    bottom: 74px;
    z-index: 2;
    width: 30px; height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid rgba(216, 169, 78, 0.32);
    background: rgba(12, 10, 7, 0.72);
    color: var(--gold-bright);
    font-family: inherit;
    font-size: 14px;
    line-height: 1;
    pointer-events: auto;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  .guide-title { font-size: 13px; margin-bottom: 3px; letter-spacing: 2px; }
  .guide-line { font-size: 11px; line-height: 1.6; opacity: 0.72; }
  .guide-rule { margin-bottom: 5px; }
  .guide-sign { display: none; }

  .sheet {
    margin: 62px 12px 88px;
    padding: 22px 17px 26px;
    border-radius: 14px;
  }
  .lampwall {
    height: 236px;
    margin-bottom: 16px;
    border-radius: 13px;
  }
  .lampwall-hud { padding: 7px 12px 8px; font-size: 10.5px; letter-spacing: 0.4px; }
  .lampwall-count b { font-size: 13px; }
  .sheet-title { font-size: 18px; letter-spacing: 3px; margin-bottom: 18px; gap: 10px; }
  .st-seal { width: 30px; height: 30px; font-size: 15px; border-radius: 7px; }
  .me-label::before { width: 21px; height: 21px; font-size: 11px; }
  .wish-form-foot { margin-top: 8px; }
  .w-avatar { width: 24px; height: 24px; font-size: 11.5px; }

  .entry-card { padding: 34px 26px 26px; }
  .entry-card h1 { font-size: 23px; }
  .entry-divider { margin: 0 4px 20px; }
}

/* 动效降级：偏好减少动效的用户直接看到终态 */
@media (prefers-reduced-motion: reduce) {
  .sheet, .hall-guide, .wish-card, .drawn-inner { animation: none; }
  .entry-divider i { box-shadow: none; }
}

@media (max-width: 380px) {
  .nav-txt { display: none; }
  .nav-btn { gap: 0; }
}

/* ══ 我的愿 ═══════════════════════════════════════════
   一条灯一行字：说了什么、被点了几下、有谁应了声。
   整条可点，点开即跳回愿力大厅读那盏灯。 */
.mine-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-top: 12px;
}
.mine-empty {
  color: var(--ink-faint);
  font-size: 13px;
  line-height: 1.9;
}
.mine-item {
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.024);
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: border-color 0.25s, background 0.25s, transform 0.2s;
}
.mine-item:hover,
.mine-item:focus-visible {
  border-color: rgba(216, 169, 78, 0.34);
  background: rgba(216, 169, 78, 0.05);
  outline: none;
}
.mine-item:active { transform: scale(0.996); }
.mine-text {
  font-size: 13.5px;
  line-height: 1.88;
  color: var(--ink);
}
/* 引用别人的愿：引号用 CSS 补，中英文各一套 */
.mine-quote { color: var(--ink-dim); }
.mine-quote::before { content: "「"; color: var(--gold-soft); }
.mine-quote::after { content: "」"; color: var(--gold-soft); }
html[lang="en"] .mine-quote::before { content: "\201C"; }
html[lang="en"] .mine-quote::after { content: "\201D"; }

.mine-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 7px;
  font-size: 11.5px;
  color: var(--ink-faint);
  letter-spacing: 0.3px;
}
.mine-meta .sep { opacity: 0.45; }
.mine-meta .open {
  margin-left: auto;
  color: var(--gold);
  opacity: 0.68;
  white-space: nowrap;
}
.mine-item:hover .mine-meta .open { opacity: 1; }

.mine-replies {
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px dashed rgba(216, 169, 78, 0.14);
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.mine-reply {
  font-size: 12.5px;
  line-height: 1.75;
  color: var(--ink-dim);
}
.mine-reply .r-name {
  color: var(--gold-bright);
  margin-right: 7px;
  font-size: 11.5px;
  letter-spacing: 0.5px;
}

.mine-sub {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 15px 0 1px;
  font-size: 11.5px;
  letter-spacing: 2px;
  color: var(--gold-soft);
}
.mine-sub::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(216, 169, 78, 0.22), transparent);
}

/* ══ 语言相关的排版微调 ═══════════════════════════════
   中文靠字距呼吸，英文靠衬线立骨。不做调整的话，
   英文标题会落到宋体的拉丁字形上，笔画细而无力。 */
html[lang="en"] body {
  font-family: "Avenir Next", "Segoe UI", "Helvetica Neue", system-ui, -apple-system, sans-serif;
}
html[lang="en"] .sheet-title,
html[lang="en"] .guide-title,
html[lang="en"] .me-label,
html[lang="en"] .entry-sub,
html[lang="en"] .d-name,
html[lang="en"] .lampwall-count,
html[lang="en"] .sheet-foot {
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  letter-spacing: 0.06em;
}
html[lang="en"] .sheet-title { letter-spacing: 0.09em; }
html[lang="en"] .guide-title { letter-spacing: 0.12em; }
html[lang="en"] .entry-sub { letter-spacing: 0.03em; }
/* 品牌字与印章、首字圆章里是汉字，保持宋体 */
html[lang="en"] .brand-name,
html[lang="en"] .entry-card h1,
html[lang="en"] .st-seal,
html[lang="en"] .w-avatar,
html[lang="en"] .me-label::before {
  font-family: "Songti SC", "SimSun", "Noto Serif SC", serif;
}
html[lang="en"] .entry-card h1 { letter-spacing: 9px; }

html[lang="zh-Hant"] body {
  font-family: "PingFang TC", "Hiragino Sans CNS", "Microsoft JhengHei", "Noto Sans TC", sans-serif;
}
html[lang="zh-Hant"] .sheet-title,
html[lang="zh-Hant"] .guide-title,
html[lang="zh-Hant"] .me-label,
html[lang="zh-Hant"] .entry-sub,
html[lang="zh-Hant"] .sheet-foot,
html[lang="zh-Hant"] .brand-name {
  font-family: "Songti TC", "Songti SC", "SimSun", "Noto Serif TC", serif;
}

@media (max-width: 720px) {
  .mine-item { padding: 11px 12px; }
  .mine-text { font-size: 13px; }
  .mine-meta { font-size: 11px; }
  .mine-reply { font-size: 12px; }
}

/* 英文文案比中文长，几处窄容器要单独放宽，否则断行会很难看 */
html[lang="en"] .entry-hint {
  max-width: 252px;
  margin-inline: auto;
  line-height: 1.75;
  text-wrap: balance;   /* 两行时均分，不要出现孤零零的 leave */
}
html[lang="en"] .entry-sub { font-size: 15px; }
@media (min-width: 721px) {
  html[lang="en"] .hall-guide { max-width: 302px; }
}
html[lang="en"] .guide-line { line-height: 1.68; letter-spacing: 0.01em; }
html[lang="en"] .guide-sign { letter-spacing: 0.04em; font-size: 11.5px; opacity: 0.9; }
html[lang="en"] .sheet-foot { letter-spacing: 0.04em; }
