/* 天门之上 · 四季禅 —— 界面 */
:root {
  --ink: #12110e;
  --ink-2: #1c1a16;
  --paper: #f4ede1;
  --paper-dim: rgba(244, 237, 225, 0.62);
  --paper-faint: rgba(244, 237, 225, 0.34);
  --seal: #a8352a;
  --gold: #c9a227;
  --serif: "Songti SC", "STSong", "SimSun", "Noto Serif SC", serif;
  --kai: "STKaiti", "KaiTi", "Kaiti SC", "Songti SC", "SimSun", serif;
  --sans: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  width: 100%; height: 100%;
  overflow: hidden;
  background: #0a0b0c;
  color: var(--paper);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  cursor: default;
}

#stage { position: fixed; inset: 0; }
#c { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

/* 纸纹 + 暗角 */
.grain {
  position: absolute; inset: 0; pointer-events: none; z-index: 3;
  opacity: 0.05; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
}
.vignette {
  position: absolute; inset: 0; pointer-events: none; z-index: 2;
  background: radial-gradient(115% 85% at 50% 45%, transparent 42%, rgba(10, 11, 12, 0.42) 100%);
}

/* ---------- 通用 ---------- */
.screen {
  position: absolute; inset: 0; z-index: 5;
  transition: opacity 0.9s ease, visibility 0.9s;
}
.hidden { opacity: 0 !important; visibility: hidden !important; pointer-events: none !important; }

kbd {
  font-family: var(--sans);
  font-size: 0.85em;
  padding: 2px 6px;
  border: 1px solid rgba(244, 237, 225, 0.28);
  border-radius: 3px;
  color: var(--paper-dim);
  letter-spacing: 0.06em;
}

/* ---------- 开始 ---------- */
#screen-start {
  background:
    linear-gradient(90deg, rgba(8, 9, 10, 0.86) 0%, rgba(8, 9, 10, 0.62) 20%, rgba(8, 9, 10, 0.18) 42%, rgba(8, 9, 10, 0) 58%),
    linear-gradient(270deg, rgba(8, 9, 10, 0.9) 0%, rgba(8, 9, 10, 0.72) 22%, rgba(8, 9, 10, 0.3) 44%, rgba(8, 9, 10, 0) 62%),
    linear-gradient(180deg, rgba(8, 9, 10, 0.5) 0%, rgba(8, 9, 10, 0) 22%, rgba(8, 9, 10, 0) 72%, rgba(8, 9, 10, 0.72) 100%);
  pointer-events: none;
}

.start-wrap {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 7vw;
}

.brand { position: relative; animation: riseIn 1.4s cubic-bezier(.2,.7,.2,1) both; }
.seal {
  width: 54px; height: 54px;
  background: var(--seal);
  color: #f7ece0;
  font-family: var(--kai);
  font-size: 20px; line-height: 1.05;
  display: flex; align-items: center; justify-content: center;
  letter-spacing: 0.06em;
  border-radius: 2px;
  transform: rotate(-3deg);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14) inset, 0 6px 24px rgba(0, 0, 0, 0.45);
  position: absolute; top: 2px; left: -92px;
  writing-mode: vertical-rl;
  padding: 6px 0;
}
.seal-lg { width: 72px; height: 72px; font-size: 24px; position: static; margin: 0 auto 26px; }

.vtitle {
  writing-mode: vertical-rl;
  filter: drop-shadow(0 4px 20px rgba(0,0,0,0.55));
  font-family: var(--kai);
  font-weight: 400;
  font-size: clamp(46px, 6.4vw, 88px);
  letter-spacing: 0.16em;
  line-height: 1;
  color: #f7f1e6;
  text-shadow: 0 4px 40px rgba(0, 0, 0, 0.55);
  margin-left: -40px;
  padding-left: 8px;
}
.vsub {
  writing-mode: vertical-rl;
  font-family: var(--serif);
  font-size: 12px;
  letter-spacing: 0.42em;
  color: var(--paper-faint);
  margin-left: 22px;
  margin-top: -120px;
  height: 300px;
}

/* 路线 */
.routes {
  width: min(340px, 34vw);
  pointer-events: auto;
  animation: riseIn 1.4s 0.15s cubic-bezier(.2,.7,.2,1) both;
}
.routes-label {
  font-family: var(--serif);
  font-size: 11px;
  letter-spacing: 0.5em;
  color: rgba(244, 237, 225, 0.55);
  text-shadow: 0 2px 10px rgba(0,0,0,0.7);
  margin-bottom: 14px;
  padding-left: 2px;
}
.route {
  position: relative;
  display: grid;
  grid-template-columns: 30px 1fr;
  column-gap: 12px;
  align-items: center;
  width: 100%;
  text-align: left;
  background: rgba(10, 10, 9, 0.62);
  backdrop-filter: blur(9px) saturate(0.85);
  -webkit-backdrop-filter: blur(9px) saturate(0.85);
  border: 1px solid rgba(244, 237, 225, 0.2);
  border-radius: 2px;
  padding: 13px 16px 13px 14px;
  margin-bottom: 9px;
  color: var(--paper);
  cursor: pointer;
  transition: background 0.4s, border-color 0.4s, transform 0.5s cubic-bezier(.2,.7,.2,1);
  font-family: inherit;
}
.route:hover {
  background: rgba(38, 34, 26, 0.82);
  border-color: rgba(201, 162, 39, 0.75);
  transform: translateX(-7px);
}
.route:active { transform: translateX(-3px) scale(0.995); }
.r-ico {
  width: 26px; height: 26px;
  color: var(--gold);
  opacity: 0.85;
  grid-row: span 2;
}
.r-name {
  font-family: var(--kai);
  font-size: 21px;
  letter-spacing: 0.24em;
  align-self: end;
}
.r-desc {
  font-size: 11px;
  letter-spacing: 0.06em;
  color: rgba(244, 237, 225, 0.6);
  align-self: start;
  margin-top: 2px;
}
.r-idx {
  position: absolute; right: 10px; top: 8px;
  font-family: var(--serif);
  font-size: 10px;
  color: rgba(244, 237, 225, 0.22);
  letter-spacing: 0;
}

.start-foot {
  position: absolute; left: 7vw; bottom: 42px;
  font-family: var(--serif);
  font-size: 11px;
  letter-spacing: 0.28em;
  color: var(--paper-faint);
  display: flex; gap: 10px;
  animation: riseIn 1.4s 0.3s cubic-bezier(.2,.7,.2,1) both;
}
.start-foot .dot { opacity: 0.4; }

/* 公益落款：比地理行略亮一点，但仍是「小字」的量级——
   声明要看得见，不能抢过山门本身 */
.start-public {
  position: absolute; left: 7vw; bottom: 70px;
  display: flex; align-items: center; gap: 9px;
  font-family: var(--serif);
  font-size: 10.5px;
  letter-spacing: 0.2em;
  color: rgba(244, 237, 225, 0.44);
  animation: riseIn 1.4s 0.45s cubic-bezier(.2,.7,.2,1) both;
}
.start-public .sp-mark {
  display: inline-flex; align-items: center; justify-content: center;
  height: 17px; padding: 0 5px;
  border: 1px solid rgba(201, 162, 39, 0.58);
  border-radius: 1px;
  color: rgba(214, 181, 86, 0.98);
  font-size: 9.5px; letter-spacing: 0.1em; line-height: 1;
  flex: 0 0 auto;
}
.start-public .sp-txt { white-space: nowrap; }
.start-tip {
  position: absolute; left: 50%; transform: translateX(-50%); bottom: 42px;
  font-size: 11px; letter-spacing: 0.22em;
  color: rgba(244, 237, 225, 0.3);
  animation: breathe 4.5s ease-in-out infinite;
}

/* ---------- 上山 ---------- */
#screen-journey { pointer-events: none; }
.j-top {
  position: absolute; top: 44px; left: 44px; right: 44px;
  display: flex; align-items: baseline; justify-content: space-between;
}
.j-name { font-family: var(--kai); font-size: 30px; letter-spacing: 0.3em; }
.j-name em {
  font-family: var(--serif); font-style: normal;
  font-size: 12px; letter-spacing: 0.2em;
  color: var(--paper-faint);
  margin-left: 16px;
}
.j-stat {
  font-family: var(--serif);
  font-size: 13px;
  letter-spacing: 0.18em;
  color: rgba(244, 237, 225, 0.72);
  font-variant-numeric: tabular-nums;
}
.j-bottom {
  position: absolute; left: 50%; bottom: 54px; transform: translateX(-50%);
  width: 300px; text-align: center;
}
.j-bar { height: 1px; background: rgba(244, 237, 225, 0.2); overflow: hidden; }
.j-bar-fill { height: 100%; width: 0%; background: var(--gold); transition: width 0.15s linear; }
.j-tip {
  margin-top: 14px; font-size: 11px; letter-spacing: 0.14em;
  color: rgba(244, 237, 225, 0.34);
}
.j-skip {
  pointer-events: auto; cursor: pointer;
  margin-left: 14px; color: rgba(244, 237, 225, 0.55);
  border-bottom: 1px solid rgba(244, 237, 225, 0.2);
}
.j-skip:hover { color: var(--paper); }

/* ---------- HUD ---------- */
#hud { position: absolute; inset: 0; z-index: 4; pointer-events: none; }
.hud-tl { position: absolute; top: 34px; left: 38px; }
.season-chip { display: flex; align-items: flex-end; gap: 12px; }
.sc-name {
  font-family: var(--kai);
  font-size: 32px; line-height: 1;
  color: #f7f1e6;
  letter-spacing: 0.1em;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.6);
}
.sc-sub {
  font-family: var(--serif);
  font-size: 11px; letter-spacing: 0.3em;
  color: var(--paper-faint);
  padding-bottom: 3px;
  border-left: 1px solid rgba(244, 237, 225, 0.2);
  padding-left: 12px;
}
.counter { margin-top: 12px; display: flex; align-items: baseline; gap: 5px; }
.counter b {
  font-family: var(--serif);
  font-size: 30px; font-weight: 400;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}
.counter i { font-style: normal; font-size: 13px; color: var(--paper-faint); }
.c-sep { color: rgba(244, 237, 225, 0.25); font-size: 13px; }
.c-label {
  font-size: 10px; letter-spacing: 0.26em;
  color: rgba(244, 237, 225, 0.3);
  margin-left: 10px;
}
.hud-alt {
  position: absolute; right: 40px; top: 50%; transform: translateY(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  font-family: var(--serif);
  color: rgba(244, 237, 225, 0.5);
  font-size: 11px;
  letter-spacing: 0.16em;
  font-variant-numeric: tabular-nums;
}
.hud-alt i { font-style: normal; font-size: 9px; opacity: 0.5; }
.hud-alt::before {
  content: ''; width: 1px; height: 46px;
  background: linear-gradient(180deg, transparent, rgba(244, 237, 225, 0.28));
}
.hud-alt::after {
  content: ''; width: 1px; height: 46px;
  background: linear-gradient(0deg, transparent, rgba(244, 237, 225, 0.28));
}
.hud-keys {
  position: absolute; left: 38px; bottom: 30px;
  display: flex; gap: 16px; flex-wrap: wrap;
  font-size: 10px; letter-spacing: 0.1em;
  color: rgba(244, 237, 225, 0.26);
}
.hud-keys kbd { font-size: 9px; padding: 1px 4px; border-color: rgba(244, 237, 225, 0.16); color: rgba(244, 237, 225, 0.34); }

.prompt {
  position: absolute; left: 50%; bottom: 21%; transform: translate(-50%, 8px);
  display: flex; align-items: center; gap: 10px;
  padding: 9px 18px 9px 12px;
  background: rgba(14, 14, 12, 0.52);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(244, 237, 225, 0.16);
  border-radius: 2px;
  font-size: 13px; letter-spacing: 0.16em;
  color: var(--paper);
  opacity: 0;
  transition: opacity 0.28s, transform 0.28s;
}
.prompt.show { opacity: 1; transform: translate(-50%, 0); }
.prompt .k {
  font-family: var(--sans); font-size: 10px;
  border: 1px solid rgba(201, 162, 39, 0.55);
  color: var(--gold);
  border-radius: 3px; padding: 2px 6px;
}
.prompt .meta { color: var(--paper-faint); font-size: 10px; letter-spacing: 0.1em; }
/* 蒲团已有人：不显示按键，只给一句说明 */
.prompt.busy {
  border-color: rgba(111, 208, 192, 0.32);
  background: rgba(10, 20, 20, 0.55);
}
.prompt.busy .meta { color: rgba(140, 214, 200, 0.9); font-size: 12px; letter-spacing: 0.14em; }

.toast {
  position: absolute; left: 50%; bottom: 31%; transform: translateX(-50%);
  font-family: var(--kai);
  font-size: 17px;
  letter-spacing: 0.24em;
  color: rgba(247, 241, 230, 0.9);
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.7);
  opacity: 0;
  transition: opacity 0.7s;
  white-space: nowrap;
  text-align: center;
}
.toast.show { opacity: 1; }

.crosshair {
  position: absolute; left: 50%; top: 50%;
  width: 4px; height: 4px; margin: -2px 0 0 -2px;
  border-radius: 50%;
  background: rgba(244, 237, 225, 0.55);
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.6);
  opacity: 0.55;
}

/* ---------- 禅坐 ---------- */
#meditation {
  position: absolute; inset: 0; z-index: 6;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  pointer-events: none;
  background: radial-gradient(60% 50% at 50% 46%, rgba(8, 9, 10, 0) 0%, rgba(8, 9, 10, 0.72) 100%);
  transition: opacity 1s ease;
}
.med-breath { position: relative; width: 200px; height: 200px; margin-bottom: 34px; }
.med-breath svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: rgba(244, 237, 225, 0.12); stroke-width: 1; }
.ring-fg {
  fill: none; stroke: rgba(214, 176, 52, 0.95); stroke-width: 2.6;
  filter: drop-shadow(0 0 6px rgba(201, 162, 39, 0.5));
  stroke-linecap: round;
  stroke-dasharray: 452;
  stroke-dashoffset: 452;
  transform-origin: 100px 100px;
}
.med-hint {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--kai);
  font-size: 15px; letter-spacing: 0.3em;
  color: rgba(244, 237, 225, 0.55);
  animation: breathe 6s ease-in-out infinite;
}
.koan {
  position: absolute; top: 42.5%; left: 0; right: 0;
  padding: 0 8vw;
  font-family: var(--kai);
  font-size: 19px;
  letter-spacing: 0.28em;
  color: rgba(247, 241, 230, 0.94);
  text-align: center;
  min-height: 30px;
  text-shadow:
    0 0 10px rgba(0, 0, 0, 0.92),
    0 2px 30px rgba(0, 0, 0, 0.95),
    0 0 60px rgba(0, 0, 0, 0.7);
  transition: opacity 0.6s;
}
.med-esc {
  position: absolute; bottom: 6.2%; z-index: 3;
  font-size: 10px; letter-spacing: 0.24em;
  color: rgba(244, 237, 225, 0.3);
}

/* ---------- 圆满 ---------- */
#screen-end {
  display: flex; align-items: center; justify-content: center;
  background:
    linear-gradient(180deg, rgba(8, 9, 10, 0) 14%, rgba(8, 9, 10, 0.62) 34%, rgba(8, 9, 10, 0.68) 66%, rgba(8, 9, 10, 0) 86%),
    radial-gradient(72% 62% at 50% 50%, rgba(10, 11, 12, 0.4) 0%, rgba(8, 9, 10, 0.86) 100%);
  pointer-events: none;
}
.end-inner { text-align: center; max-width: 560px; pointer-events: auto; margin-top: -84px; animation: riseIn 1.6s cubic-bezier(.2,.7,.2,1) both; }
.end-inner h2 {
  font-family: var(--kai);
  font-weight: 400;
  font-size: clamp(30px, 3.6vw, 46px);
  letter-spacing: 0.4em;
  margin-bottom: 18px;
  text-indent: 0.4em;
}
.end-lead {
  font-family: var(--serif);
  font-size: 13px; letter-spacing: 0.16em;
  color: var(--paper-dim);
  line-height: 2.2;
  margin-bottom: 40px;
}
.end-stats { display: flex; justify-content: center; gap: 46px; margin-bottom: 40px; }
.end-stats div { display: flex; flex-direction: column; gap: 8px; }
.end-stats i {
  font-style: normal;
  font-family: var(--serif);
  font-size: 22px;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}
.end-stats span { font-size: 10px; letter-spacing: 0.24em; color: var(--paper-faint); }
.end-quote {
  font-family: var(--kai);
  font-size: 15px; letter-spacing: 0.2em;
  color: rgba(244, 237, 225, 0.45);
  margin-bottom: 40px;
}
.ghost-btn {
  font-family: var(--serif);
  font-size: 12px; letter-spacing: 0.3em;
  color: var(--paper);
  background: transparent;
  border: 1px solid rgba(244, 237, 225, 0.28);
  padding: 12px 32px;
  cursor: pointer;
  transition: background 0.4s, border-color 0.4s, letter-spacing 0.4s;
}
.ghost-btn:hover { background: rgba(244, 237, 225, 0.08); border-color: var(--gold); letter-spacing: 0.38em; }

/* ---------- 暂停 ---------- */
#paused {
  position: absolute; inset: 0; z-index: 7;
  display: flex; align-items: center; justify-content: center;
  background: rgba(8, 9, 10, 0.4);
  backdrop-filter: blur(3px);
  pointer-events: none;
}
.pause-card { text-align: center; }
.pause-card p { font-family: var(--kai); font-size: 22px; letter-spacing: 0.4em; margin-bottom: 12px; }
.pause-card span { font-size: 11px; letter-spacing: 0.2em; color: var(--paper-faint); }

/* ---------- 加载 ---------- */
#loading {
  position: absolute; inset: 0; z-index: 20;
  background: #0a0b0c;
  display: flex; align-items: center; justify-content: center;
  transition: opacity 1.1s ease, visibility 1.1s;
}
.load-inner { text-align: center; width: 200px; }
.load-line {
  height: 1px; width: 100%;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  animation: sweep 1.8s ease-in-out infinite;
}
#load-text {
  margin-top: 20px;
  font-family: var(--serif);
  font-size: 11px; letter-spacing: 0.4em;
  color: rgba(244, 237, 225, 0.45);
}

@keyframes sweep {
  0% { transform: scaleX(0.05); opacity: 0.2; }
  50% { transform: scaleX(1); opacity: 1; }
  100% { transform: scaleX(0.05); opacity: 0.2; }
}
@keyframes riseIn {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes breathe {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}

@media (max-width: 860px) {
  .start-wrap { flex-direction: column; justify-content: center; gap: 40px; padding: 0 8vw; }
  .brand { text-align: center; }
  .vtitle { writing-mode: horizontal-tb; margin: 0; font-size: 48px; }
  .vsub { writing-mode: horizontal-tb; margin: 14px 0 0; height: auto; }
  .seal { position: static; margin: 0 auto 20px; }
  .routes { width: 100%; }
  .start-foot, .hud-keys, .hud-alt { display: none; }
  /* 手机底部很挤：公益声明贴最底、语言栏退到它上方，两行不叠 */
  .start-public {
    left: 0; right: 0;
    bottom: calc(7px + env(safe-area-inset-bottom, 0px));
    justify-content: center;
    font-size: 9.5px; letter-spacing: 0.08em;
  }
  .start-public .sp-mark { height: 15px; font-size: 9px; padding: 0 4px; }
  .start-public .sp-txt { white-space: nowrap; }
  .lang-bar { bottom: calc(34px + env(safe-area-inset-bottom, 0px)); }
}

/* ============================================================
   联机 / 修行 / 许愿 —— 新增界面
   ============================================================ */

/* ---------- 身份卡 ---------- */
.hud-tr {
  position: absolute; top: 30px; right: 38px;
  display: flex; flex-direction: column; align-items: flex-end; gap: 10px;
}
.profile {
  pointer-events: auto;
  width: 208px;
  padding: 13px 15px 12px;
  background: linear-gradient(160deg, rgba(18,18,16,0.66), rgba(12,13,12,0.52));
  backdrop-filter: blur(10px) saturate(0.9);
  -webkit-backdrop-filter: blur(10px) saturate(0.9);
  border: 1px solid rgba(201,162,39,0.24);
  border-radius: 3px;
  cursor: pointer;
  transition: border-color 0.4s, transform 0.4s;
}
.profile:hover { border-color: rgba(201,162,39,0.62); transform: translateY(-1px); }
.pf-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.pf-name {
  font-family: var(--kai); font-size: 16px; letter-spacing: 0.12em;
  color: #f7f1e6; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pf-lv {
  font-family: var(--serif); font-size: 10px; letter-spacing: 0.12em;
  color: var(--gold); border: 1px solid rgba(201,162,39,0.42);
  padding: 1px 6px; border-radius: 2px; white-space: nowrap;
}
.pf-title {
  font-family: var(--serif); font-size: 11px; letter-spacing: 0.3em;
  color: rgba(244,237,225,0.5); margin-top: 4px;
}
.pf-bar {
  height: 2px; background: rgba(244,237,225,0.14); margin: 9px 0 8px;
  overflow: hidden;
}
.pf-bar i {
  display: block; height: 100%; width: 0%;
  background: linear-gradient(90deg, #8a6c1c, var(--gold), #f3dd9a);
  box-shadow: 0 0 8px rgba(201,162,39,0.7);
  transition: width 0.9s cubic-bezier(.2,.7,.2,1);
}
.pf-points { display: flex; align-items: baseline; gap: 5px; }
.pf-points b {
  font-family: var(--serif); font-size: 20px; font-weight: 400;
  color: var(--gold); font-variant-numeric: tabular-nums;
  transition: color 0.3s, text-shadow 0.3s;
}
.pf-points b.flash { color: #fff3c9; text-shadow: 0 0 16px rgba(255,220,120,0.95); }
.pf-points span { font-size: 9px; letter-spacing: 0.2em; color: rgba(244,237,225,0.36); }
.pf-points em {
  margin-left: auto; font-style: normal; font-size: 9px;
  letter-spacing: 0.04em; color: rgba(244,237,225,0.3);
}
.online-chip {
  display: flex; align-items: center; gap: 7px;
  font-family: var(--serif); font-size: 10px; letter-spacing: 0.16em;
  color: rgba(244,237,225,0.42);
}
.live-dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: #7fd49a; box-shadow: 0 0 8px rgba(127,212,154,0.9);
  animation: blink 2.6s ease-in-out infinite;
}

/* ---------- 聊天 ---------- */
.chat-log {
  position: absolute; left: 38px; bottom: 62px;
  width: min(400px, 34vw);
  display: flex; flex-direction: column; gap: 5px;
  pointer-events: none;
}
.chat-line {
  font-size: 12px; line-height: 1.5;
  letter-spacing: 0.04em;
  color: rgba(244,237,225,0.82);
  text-shadow: 0 1px 8px rgba(0,0,0,0.9);
  animation: chatIn 0.4s cubic-bezier(.2,.7,.2,1) both;
}
.chat-line b { font-weight: 500; margin-right: 8px; }
.chat-line .em { font-size: 15px; }
.chat-line.sys { color: rgba(201,162,39,0.72); font-family: var(--serif); letter-spacing: 0.14em; }
.chat-line.me b { color: #f0d791; }
@keyframes chatIn {
  from { opacity: 0; transform: translateX(-10px); }
  to { opacity: 1; transform: translateX(0); }
}

.chat-form {
  position: absolute; left: 50%; bottom: 96px; transform: translateX(-50%);
  width: min(560px, 58vw);
  display: flex; align-items: center; gap: 10px;
  padding: 9px 14px;
  background: rgba(12,13,12,0.78);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(201,162,39,0.4);
  border-radius: 3px;
  pointer-events: auto;
  transition: opacity 0.3s, transform 0.3s;
}
.cf-mark {
  font-family: var(--kai); font-size: 13px; color: var(--gold);
  border: 1px solid rgba(201,162,39,0.45); padding: 1px 6px; border-radius: 2px;
}
.chat-form input {
  flex: 1; background: transparent; border: 0; outline: none;
  color: var(--paper); font-family: var(--sans); font-size: 13px;
  letter-spacing: 0.06em;
}
.chat-form input::placeholder { color: rgba(244,237,225,0.28); }
.cf-hint { font-size: 9px; letter-spacing: 0.1em; color: rgba(244,237,225,0.26); white-space: nowrap; }

.emoji-bar {
  position: absolute; left: 50%; bottom: 148px; transform: translateX(-50%);
  display: flex; gap: 4px;
  padding: 8px 10px;
  background: rgba(12,13,12,0.78);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(244,237,225,0.16);
  border-radius: 3px;
  pointer-events: auto;
}
.emoji-bar span {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 6px 10px; cursor: pointer;
  font-size: 20px; line-height: 1;
  border-radius: 2px;
  transition: background 0.25s, transform 0.25s;
}
.emoji-bar span b {
  font-family: var(--serif); font-size: 9px; font-weight: 400;
  color: rgba(244,237,225,0.4); letter-spacing: 0.1em;
}
.emoji-bar span:hover { background: rgba(201,162,39,0.16); transform: translateY(-3px); }
.emoji-bar span:hover b { color: var(--gold); }

/* ---------- 积分飘字 ---------- */
.gain-float {
  position: absolute; left: 50%; bottom: 34%; transform: translate(-50%, 0);
  font-family: var(--serif); font-size: 26px;
  color: #ffe6a8;
  text-shadow: 0 0 22px rgba(255,200,90,0.8), 0 2px 10px rgba(0,0,0,0.6);
  opacity: 0; pointer-events: none;
  letter-spacing: 0.06em;
}
.gain-float.go { animation: floatUp 2.1s cubic-bezier(.2,.7,.2,1) both; }
@keyframes floatUp {
  0% { opacity: 0; transform: translate(-50%, 18px) scale(0.9); }
  22% { opacity: 1; transform: translate(-50%, 0) scale(1); }
  72% { opacity: 1; transform: translate(-50%, -34px) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -62px) scale(0.96); }
}

/* ---------- 禅坐：电影感 ---------- */
.cine {
  position: absolute; left: 0; right: 0; height: 9vh;
  background: #050506; z-index: 2;
  transition: transform 1.4s cubic-bezier(.65,0,.35,1);
}
.cine-top { top: 0; transform: translateY(-100%); }
.cine-bottom { bottom: 0; transform: translateY(100%); }
#meditation.cine-on .cine-top { transform: translateY(0); }
#meditation.cine-on .cine-bottom { transform: translateY(0); }
/* 入定时让 HUD 退场，只留画面与字幕 */
body.cine #hud {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.9s ease;
}
#hud { transition: opacity 0.6s ease; }
#meditation {
  background:
    linear-gradient(to top, rgba(5,6,7,0.95) 0%, rgba(5,6,7,0.7) 11%, rgba(5,6,7,0.22) 28%, rgba(5,6,7,0) 44%),
    radial-gradient(58% 46% at 50% 44%, rgba(8,9,10,0) 0%, rgba(8,9,10,0.55) 72%, rgba(8,9,10,0.9) 100%);
}
.med-top {
  position: absolute; top: 11.5vh; left: 0; right: 0;
  display: flex; align-items: baseline; justify-content: center; gap: 18px;
}
.med-kicker {
  font-family: var(--serif); font-size: 10px; letter-spacing: 0.7em;
  color: rgba(244,237,225,0.4);
}
.med-sit {
  font-family: var(--serif); font-size: 10px; letter-spacing: 0.3em;
  color: rgba(201,162,39,0.7);
}
/* 底部三分栏：左·呼吸盘　中·木鱼　右·息数 */
.med-breath {
  position: absolute; left: 5.2vw; bottom: 13vh;
  width: 108px; height: 108px; margin: 0;
  filter: drop-shadow(0 0 22px rgba(201,162,39,0.24));
}
.med-breath .med-hint { font-size: 11px; letter-spacing: 0.24em; }
.med-gain {
  position: absolute; left: 5.2vw; bottom: 31vh;
  font-family: var(--serif); font-size: 13px; letter-spacing: 0.22em;
  color: #ffe6a8; opacity: 0;
  text-shadow: 0 0 20px rgba(255,200,90,0.85);
  transition: opacity 0.6s;
}
.med-gain.show { opacity: 1; }

/* 坐忘白光 */
#meditation.flash::after {
  content: ''; position: absolute; inset: 0; z-index: 3;
  background: radial-gradient(46% 40% at 50% 46%, rgba(255,246,220,0.92), rgba(255,226,160,0.32) 42%, transparent 76%);
  animation: sitFlash 1.5s ease-out forwards;
  pointer-events: none;
}
@keyframes sitFlash {
  0% { opacity: 0; }
  12% { opacity: 1; }
  100% { opacity: 0; }
}

/* ---------- 弹层通用 ---------- */
.modal {
  position: absolute; inset: 0; z-index: 12;
  display: flex; align-items: center; justify-content: center;
  background: rgba(6,7,8,0.62);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: opacity 0.4s;
}
.modal-x {
  margin-left: auto; align-self: flex-start;
  background: none; border: 0; cursor: pointer;
  font-size: 22px; line-height: 1; color: rgba(244,237,225,0.4);
  padding: 4px 6px; transition: color 0.3s;
}
.modal-x:hover { color: var(--paper); }

.wish-card {
  width: min(500px, 88vw);
  max-height: 86vh; overflow: auto;
  padding: 26px 28px 22px;
  background:
    linear-gradient(170deg, rgba(28,26,21,0.97), rgba(16,16,14,0.98));
  border: 1px solid rgba(201,162,39,0.32);
  border-radius: 3px;
  box-shadow: 0 30px 90px rgba(0,0,0,0.7), 0 0 0 1px rgba(255,255,255,0.03) inset;
  animation: riseIn 0.6s cubic-bezier(.2,.7,.2,1) both;
  pointer-events: auto;
}
.wish-head { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.wish-head h3 {
  font-family: var(--kai); font-size: 21px; font-weight: 400;
  letter-spacing: 0.26em; color: #f7f1e6;
}
.wish-head p {
  font-family: var(--serif); font-size: 10px; letter-spacing: 0.2em;
  color: rgba(244,237,225,0.4); margin-top: 5px;
}
.seal-sm {
  width: 40px; height: 40px; font-size: 16px; position: static;
  flex: 0 0 auto; padding: 4px 0;
}
.wish-presets { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 14px; }
.wish-presets span {
  font-family: var(--serif); font-size: 11px; letter-spacing: 0.12em;
  color: rgba(244,237,225,0.62);
  border: 1px solid rgba(244,237,225,0.16);
  padding: 5px 11px; border-radius: 20px; cursor: pointer;
  transition: all 0.3s;
}
.wish-presets span:hover { border-color: var(--gold); color: var(--gold); background: rgba(201,162,39,0.08); }
#wish-text {
  width: 100%; height: 92px; resize: none;
  background: rgba(8,9,9,0.62);
  border: 1px solid rgba(244,237,225,0.14);
  border-radius: 2px;
  padding: 13px 14px;
  color: var(--paper);
  font-family: var(--kai); font-size: 17px; letter-spacing: 0.16em; line-height: 1.7;
  outline: none;
  transition: border-color 0.3s;
}
#wish-text:focus { border-color: rgba(201,162,39,0.55); }
#wish-text::placeholder { color: rgba(244,237,225,0.24); letter-spacing: 0.1em; font-size: 13px; font-family: var(--sans); }
.wish-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; margin-top: 16px;
}
.wish-cost { font-size: 11px; letter-spacing: 0.1em; color: rgba(244,237,225,0.42); }
.wish-cost b { color: var(--gold); font-family: var(--serif); font-size: 14px; font-weight: 400; }
.wish-cost i { font-style: normal; color: rgba(244,237,225,0.72); font-family: var(--serif); font-size: 13px; }
.wish-actions { display: flex; gap: 8px; }
.ghost-btn.sm { padding: 8px 16px; font-size: 11px; letter-spacing: 0.2em; }
.gold-btn {
  font-family: var(--serif); font-size: 12px; letter-spacing: 0.3em;
  color: #241d0c;
  background: linear-gradient(180deg, #e6c46a, #c9a227);
  border: 0; padding: 11px 26px; border-radius: 2px;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(201,162,39,0.3);
  transition: filter 0.3s, transform 0.3s;
}
.gold-btn:hover { filter: brightness(1.12); transform: translateY(-1px); }
.gold-btn:disabled { filter: grayscale(0.7) brightness(0.62); cursor: not-allowed; transform: none; }
.wish-wall { margin-top: 22px; border-top: 1px solid rgba(244,237,225,0.1); padding-top: 14px; }

/* 一行统计：山中一共挂了多少愿、圆满了多少（看得见数，看不见内容） */
.wall-stat {
  display: flex; align-items: baseline; gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(244,237,225,0.09);
  font-family: var(--serif); font-size: 11px; letter-spacing: 0.2em;
  color: rgba(244,237,225,0.68);
}
.wall-stat i {
  font-style: normal; font-size: 9.5px; letter-spacing: 0.14em;
  color: rgba(201,162,39,0.66); margin-left: auto;
}

/* 随缘圆满：说明占整行，按钮另起一行靠右；二次确认就地展开 */
.wall-give {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-top: 12px; padding-top: 12px;
  border-top: 1px solid rgba(244,237,225,0.07);
}
.wall-give .wall-tip { margin: 0; flex: 1 1 100%; }
.wall-give .hidden { display: none !important; }
.wall-give .w-conf {
  flex: 1 1 100%; display: flex; flex-wrap: wrap;
  align-items: center; justify-content: flex-end; gap: 8px 10px;
}
.wall-give .w-conf span { flex: 1 1 100%; }
#wall-btn {
  margin-left: auto;
  flex: 0 0 auto; padding: 9px 14px 8px;
  font-size: 10px; letter-spacing: 0.16em;
}
#wall-btn b { font-weight: 400; margin-left: 1px; }

#wish-wall {
  list-style: none; display: flex; flex-direction: column; gap: 2px;
  max-height: 262px; overflow: auto;
}
#wish-wall li.w {
  display: flex; flex-direction: column; gap: 5px;
  padding: 9px 10px 9px 12px;
  border-left: 1px solid rgba(244,237,225,0.1);
  transition: background 0.3s, border-color 0.3s;
}
#wish-wall li.w:hover { background: rgba(244,237,225,0.03); border-left-color: rgba(201,162,39,0.42); }
.w-top { display: flex; align-items: center; gap: 8px; }
.w-top b {
  font-family: var(--sans); font-size: 9px; font-weight: 400;
  letter-spacing: 0.06em; color: rgba(201,162,39,0.66);
}
.w-top .w-time {
  font-size: 9px; letter-spacing: 0.06em;
  color: rgba(244,237,225,0.26); margin-left: auto;
}
.w-top .w-tag {
  font-family: var(--serif); font-size: 8.5px; letter-spacing: 0.18em;
  color: rgba(201,162,39,0.6);
  border: 1px solid rgba(201,162,39,0.3); border-radius: 2px;
  padding: 1px 4px 2px;
}
.w-hint { font-size: 9.5px; letter-spacing: 0.12em; color: rgba(244,237,225,0.42); }

/* 列表还有更多时，底部淡出，暗示可以滚 */
#wish-wall.more {
  -webkit-mask-image: linear-gradient(180deg, #000 0, #000 calc(100% - 26px), rgba(0,0,0,0.1) 100%);
  mask-image: linear-gradient(180deg, #000 0, #000 calc(100% - 26px), rgba(0,0,0,0.1) 100%);
}
#wish-wall::-webkit-scrollbar { width: 3px; }
#wish-wall::-webkit-scrollbar-thumb { background: rgba(201,162,39,0.28); border-radius: 2px; }
#wish-wall::-webkit-scrollbar-track { background: transparent; }
.w-body {
  font-family: var(--kai); font-size: 13.5px; letter-spacing: 0.1em;
  line-height: 1.5; color: rgba(244,237,225,0.82);
}
.w-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.w-conf { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.w-conf span { font-size: 10.5px; letter-spacing: 0.08em; color: rgba(244,237,225,0.66); }
.w-conf span b { color: var(--gold); font-weight: 400; }
.w-yes {
  font-family: var(--serif); font-size: 10px; letter-spacing: 0.18em;
  color: #241d0c; background: linear-gradient(180deg, #e6c46a, #c9a227);
  border: 0; border-radius: 2px; padding: 5px 12px 4px; cursor: pointer;
  transition: filter 0.25s;
}
.w-yes:hover { filter: brightness(1.12); }
.w-no {
  font-family: var(--serif); font-size: 10px; letter-spacing: 0.18em;
  color: rgba(244,237,225,0.5); background: none;
  border: 1px solid rgba(244,237,225,0.18); border-radius: 2px;
  padding: 5px 11px 4px; cursor: pointer;
}
.w-no:hover { color: var(--paper); border-color: rgba(244,237,225,0.4); }

.w-seal {
  font-family: var(--serif); font-size: 9.5px; letter-spacing: 0.16em;
  color: rgba(201,162,39,0.88);
}
.w-seal::before { content: '◇ '; font-size: 8px; }
#wish-wall li.done {
  border-left-color: rgba(201,162,39,0.55);
  background: linear-gradient(90deg, rgba(201,162,39,0.07), rgba(201,162,39,0) 68%);
}
#wish-wall li.done .w-body { color: rgba(244,237,225,0.64); }
#wish-wall li.empty {
  padding: 8px 2px; color: rgba(244,237,225,0.42);
  font-size: 12px; letter-spacing: 0.1em; line-height: 1.8;
}
.wall-tip {
  margin-top: 10px; font-size: 10px; letter-spacing: 0.12em;
  color: rgba(244,237,225,0.4); line-height: 1.7;
}

/* ---------- 改名 ---------- */
.rename-card {
  width: min(360px, 86vw); padding: 26px 26px 22px;
  background: linear-gradient(170deg, rgba(28,26,21,0.97), rgba(16,16,14,0.98));
  border: 1px solid rgba(201,162,39,0.32); border-radius: 3px;
  text-align: center; pointer-events: auto;
  animation: riseIn 0.5s cubic-bezier(.2,.7,.2,1) both;
}
.rename-card h3 { font-family: var(--kai); font-size: 19px; font-weight: 400; letter-spacing: 0.28em; }
.rename-card p { font-family: var(--serif); font-size: 10px; letter-spacing: 0.16em; color: rgba(244,237,225,0.4); margin: 8px 0 18px; }
#rename-input {
  width: 100%; padding: 11px 12px; text-align: center;
  background: rgba(8,9,9,0.6); border: 1px solid rgba(244,237,225,0.16);
  color: var(--paper); font-family: var(--kai); font-size: 18px; letter-spacing: 0.2em;
  outline: none; border-radius: 2px;
}
#rename-input:focus { border-color: rgba(201,162,39,0.6); }
.rename-actions { display: flex; gap: 8px; justify-content: center; margin-top: 18px; }

/* ---------- 升级 ---------- */
.levelup {
  position: absolute; inset: 0; z-index: 11;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
  transition: opacity 0.6s;
}
.lu-halo {
  position: absolute; width: 820px; height: 820px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,214,130,0.22) 0%, rgba(255,190,90,0.08) 34%, transparent 66%);
  animation: haloPulse 2.6s ease-out infinite;
}
.lu-body {
  position: relative; text-align: center;
  animation: riseIn 0.9s cubic-bezier(.2,.7,.2,1) both;
}
.lu-kicker {
  font-family: var(--serif); font-size: 10px; letter-spacing: 0.8em;
  color: rgba(255,226,160,0.7);
}
.lu-body h3 {
  font-family: var(--kai); font-weight: 400;
  font-size: clamp(44px, 6vw, 74px);
  letter-spacing: 0.42em; text-indent: 0.42em;
  color: #fff6e0; margin: 14px 0 6px;
  text-shadow: 0 0 46px rgba(255,206,110,0.85), 0 4px 24px rgba(0,0,0,0.6);
}
.lu-lv {
  display: inline-block;
  font-family: var(--serif); font-size: 12px; letter-spacing: 0.3em;
  color: var(--gold); border-top: 1px solid rgba(201,162,39,0.35);
  border-bottom: 1px solid rgba(201,162,39,0.35);
  padding: 6px 18px;
}
.lu-lv b { font-weight: 400; font-size: 15px; }
.lu-body p {
  font-family: var(--serif); font-size: 12px; letter-spacing: 0.24em;
  color: rgba(244,237,225,0.5); margin-top: 14px;
}
@keyframes haloPulse {
  0% { transform: scale(0.7); opacity: 0; }
  30% { opacity: 1; }
  100% { transform: scale(1.25); opacity: 0; }
}

/* ---------- 开始页脚注 ---------- */
.start-enter {
  position: absolute; left: 50%; bottom: 74px; transform: translateX(-50%);
  font-family: var(--serif); font-size: 11px; letter-spacing: 0.3em;
  color: rgba(244,237,225,0.42);
  animation: breathe 4.2s ease-in-out infinite;
  white-space: nowrap;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

@media (max-width: 860px) {
  .hud-tr { top: 18px; right: 16px; }
  .profile { width: 150px; padding: 10px 12px; }
  .chat-log { width: 62vw; left: 16px; }
  .chat-form { width: 84vw; bottom: 120px; }
  .cine { height: 6vh; }
  .start-enter { bottom: 96px; }
}

/* ---------- 游客意见箱 ---------- */
.fb-card {
  width: min(520px, 90vw);
  max-height: 86vh; overflow: auto;
  padding: 26px 28px 22px;
  background: linear-gradient(170deg, rgba(28,26,21,0.97), rgba(16,16,14,0.98));
  border: 1px solid rgba(201,162,39,0.32);
  border-radius: 3px;
  box-shadow: 0 30px 90px rgba(0,0,0,0.7);
  animation: riseIn 0.6s cubic-bezier(.2,.7,.2,1) both;
  pointer-events: auto;
}
.fb-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 14px; }
.fb-tags span {
  font-family: var(--serif); font-size: 11px; letter-spacing: 0.1em;
  color: rgba(244,237,225,0.55);
  border: 1px solid rgba(244,237,225,0.16);
  padding: 5px 12px; border-radius: 20px; cursor: pointer;
  transition: all 0.25s;
}
.fb-tags span:hover { border-color: rgba(201,162,39,0.6); color: var(--gold); }
.fb-tags span.on {
  border-color: var(--gold); color: #241d0c;
  background: linear-gradient(180deg, #e6c46a, #c9a227);
}
#fb-text {
  width: 100%; height: 128px; resize: none;
  background: rgba(8,9,9,0.62);
  border: 1px solid rgba(244,237,225,0.14);
  border-radius: 2px;
  padding: 13px 14px;
  color: var(--paper);
  font-family: var(--sans); font-size: 13px; line-height: 1.8; letter-spacing: 0.05em;
  outline: none;
  transition: border-color 0.3s;
}
#fb-text:focus { border-color: rgba(201,162,39,0.55); }
#fb-text::placeholder { color: rgba(244,237,225,0.24); }

/* 木鱼计数：右下角的主角，一眼看得见「敲了多少、换多少积分」 */
.med-tally {
  position: absolute; right: 4.8vw; bottom: 13.5vh;
  min-width: 180px; padding: 15px 19px 13px;
  text-align: right;
  background: linear-gradient(160deg, rgba(8,8,7,0.05) 0%, rgba(6,7,6,0.6) 100%);
  border-right: 1px solid rgba(201,162,39,0.36);
  opacity: 0; transform: translateY(8px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}
.med-tally.show { opacity: 1; transform: none; }
.tally-label {
  display: block; font-family: var(--serif); font-size: 10px;
  letter-spacing: 0.56em; text-indent: 0.56em;
  color: rgba(226,190,96,0.9); margin-bottom: 4px;
  text-shadow: 0 0 12px rgba(201,162,39,0.35);
}
.tally-num { display: flex; align-items: flex-end; justify-content: flex-end; gap: 5px; line-height: 0.92; }
.tally-num b {
  font-family: var(--serif); font-size: 58px; font-weight: 500;
  font-variant-numeric: tabular-nums; letter-spacing: -0.01em;
  background: linear-gradient(180deg, #fff8e2 6%, #eccf82 58%, #bf9032 100%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 22px rgba(255,206,112,0.55));
  transform-origin: 78% 60%;
}
.tally-num i {
  font-style: normal; font-family: var(--serif); font-size: 12px;
  letter-spacing: 0.18em; color: rgba(244,237,225,0.52); padding-bottom: 8px;
}
@keyframes tallyBeat {
  0% { transform: scale(1); filter: drop-shadow(0 0 18px rgba(255,206,112,0.4)); }
  26% { transform: scale(1.18); filter: drop-shadow(0 0 26px rgba(255,226,150,0.95)); }
  100% { transform: scale(1); filter: drop-shadow(0 0 18px rgba(255,206,112,0.4)); }
}
.med-tally.beat .tally-num b { animation: tallyBeat 0.26s ease-out; }
.tally-track {
  height: 2px; margin: 11px 0 9px;
  background: rgba(201,162,39,0.18); overflow: hidden;
}
.tally-track span {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, rgba(201,162,39,0.4), #f3d585);
  box-shadow: 0 0 10px rgba(243,213,133,0.8);
  transition: width 0.22s ease-out;
}
.tally-foot {
  display: flex; align-items: baseline; justify-content: space-between; gap: 14px;
  font-family: var(--serif); font-size: 10px; letter-spacing: 0.1em;
  color: rgba(244,237,225,0.46);
}
.tally-pts b {
  font-size: 17px; font-weight: 600; letter-spacing: 0.02em;
  color: #ffdd93; margin-left: 2px;
  transition: color 0.3s, text-shadow 0.3s;
}
.tally-pts b.flash { color: #fff6dc; text-shadow: 0 0 16px rgba(255,226,150,0.95); }
.tally-time { font-variant-numeric: tabular-nums; color: rgba(244,237,225,0.34); }
/* 每换 1 积分，从数字上方飘一下 */
.tally-pop {
  position: absolute; right: 18px; top: -15px;
  font-family: var(--serif); font-size: 12px; letter-spacing: 0.12em;
  color: #ffe6a8; opacity: 0; pointer-events: none;
  text-shadow: 0 0 16px rgba(255,206,110,0.9);
}
.tally-pop.go { animation: tallyPop 1.1s cubic-bezier(.2,.7,.3,1) forwards; }
@keyframes tallyPop {
  0% { opacity: 0; transform: translateY(6px) scale(0.9); }
  22% { opacity: 1; transform: translateY(-2px) scale(1.05); }
  70% { opacity: 0.9; transform: translateY(-16px) scale(1); }
  100% { opacity: 0; transform: translateY(-26px) scale(0.98); }
}

/* ---------- 禅坐：窄屏把三分栏收拢 ---------- */
@media (max-width: 720px) {
  .med-breath { width: 84px; height: 84px; left: 4vw; bottom: 15vh; }
  .med-breath .med-hint { font-size: 10px; }
  .med-gain { left: 4vw; bottom: 27vh; font-size: 11px; }
  .med-tally { right: 4vw; bottom: 13.5vh; min-width: 0; padding: 9px 11px 8px; }
  .tally-num b { font-size: 34px; }
  .tally-label { font-size: 8px; letter-spacing: 0.4em; }
  .tally-foot { font-size: 9px; gap: 9px; }
  .tally-pts b { font-size: 12px; }
  .koan { top: 38%; font-size: 15px; letter-spacing: 0.2em; padding: 0 7vw; }
  .med-top { top: 8vh; }
  .med-esc { bottom: 4.5%; font-size: 9px; letter-spacing: 0.16em; }
}

/* ---------- 开始页：山门簿入口（路线栏第四行，虚线表示「不是上山的路」） ---------- */
.start-auth {
  display: flex; align-items: center; gap: 9px;
  width: 100%; margin-top: 12px; padding: 10px 14px;
  background: rgba(10, 10, 9, 0.68);
  backdrop-filter: blur(10px) saturate(0.85);
  -webkit-backdrop-filter: blur(9px) saturate(0.85);
  border: 1px dashed rgba(244, 237, 225, 0.26);
  border-radius: 2px;
  cursor: pointer; pointer-events: auto; text-align: left;
  transition: background 0.4s, border-color 0.4s, transform 0.5s cubic-bezier(.2,.7,.2,1);
  animation: riseIn 1.4s 0.3s cubic-bezier(.2,.7,.2,1) both;
}
.start-auth:hover {
  background: rgba(38, 34, 26, 0.8);
  border-color: rgba(201, 162, 39, 0.62);
  transform: translateX(-6px);
}
.sa-mark {
  flex: 0 0 auto;
  width: 19px; height: 19px; line-height: 18px; text-align: center;
  font-family: var(--kai); font-size: 11px;
  color: rgba(201,162,39,0.85);
  border: 1px solid rgba(201,162,39,0.42); border-radius: 1px;
  transition: background 0.4s, color 0.4s, border-color 0.4s;
}
.start-auth b {
  flex: 0 0 auto;
  font-family: var(--serif); font-size: 11px; font-weight: 400;
  letter-spacing: 0.22em; color: rgba(244,237,225,0.86);
  transition: color 0.4s;
}
.sa-txt {
  flex: 1 1 auto; min-width: 0; text-align: right;
  font-family: var(--serif); font-size: 10px; letter-spacing: 0.06em;
  color: rgba(244,237,225,0.52);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  transition: color 0.4s;
}
.start-auth:hover b { color: var(--gold); }
.start-auth:hover .sa-mark { background: rgba(201,162,39,0.16); color: #f0d68a; border-color: rgba(201,162,39,0.72); }
.start-auth:hover .sa-txt { color: rgba(244,237,225,0.6); }
.start-auth.on { border-style: solid; border-color: rgba(201,162,39,0.3); }
.start-auth.on .sa-mark { background: rgba(201,162,39,0.18); color: #f3dd9a; border-color: rgba(201,162,39,0.62); }
.start-auth.on b { color: rgba(201,162,39,0.88); }
.start-auth.on .sa-txt { color: rgba(201,162,39,0.62); }

/* ---------- 身份卡：邮箱一行 ---------- */
.pf-mail {
  display: flex; align-items: center; gap: 6px;
  width: 100%; margin-top: 10px; padding: 8px 0 0;
  background: none; border: 0; border-top: 1px solid rgba(244,237,225,0.08);
  cursor: pointer; text-align: left;
  font-family: var(--serif); font-size: 9px; letter-spacing: 0.14em;
  color: rgba(244,237,225,0.32);
  transition: color 0.3s;
}
.pf-mail:hover { color: var(--gold); }
.pm-dot {
  flex: 0 0 auto;
  width: 5px; height: 5px; border-radius: 50%;
  background: rgba(244,237,225,0.26);
  box-shadow: 0 0 0 2px rgba(244,237,225,0.05);
  transition: background 0.3s, box-shadow 0.3s;
}
.pf-mail span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-mail.on { color: rgba(201,162,39,0.8); }
.pf-mail.on .pm-dot { background: var(--gold); box-shadow: 0 0 9px rgba(201,162,39,0.9); }

/* ---------- 山门簿 · 邮箱弹层 ---------- */
.auth-card {
  width: min(430px, 90vw);
  max-height: 88vh; overflow: auto;
  padding: 26px 28px 22px;
  background: linear-gradient(170deg, rgba(28,26,21,0.97), rgba(16,16,14,0.98));
  border: 1px solid rgba(201,162,39,0.32);
  border-radius: 3px;
  box-shadow: 0 30px 90px rgba(0,0,0,0.7), 0 0 0 1px rgba(255,255,255,0.03) inset;
  animation: riseIn 0.6s cubic-bezier(.2,.7,.2,1) both;
  pointer-events: auto;
}
#auth .wish-head { margin-bottom: 14px; }
.auth-tabs {
  display: flex; margin-bottom: 20px;
  border-bottom: 1px solid rgba(244,237,225,0.1);
}
.auth-tab {
  flex: 1; padding: 8px 0 11px; margin-bottom: -1px;
  background: none; border: 0; border-bottom: 1px solid transparent;
  cursor: pointer;
  font-family: var(--serif); font-size: 12px; letter-spacing: 0.26em;
  color: rgba(244,237,225,0.46);
  transition: color 0.35s, border-color 0.35s;
}
.auth-tab:hover { color: rgba(244,237,225,0.78); }
.auth-tab.on { color: var(--gold); border-bottom-color: var(--gold); }

.auth-label {
  display: block; margin-bottom: 7px;
  font-family: var(--serif); font-size: 10px; letter-spacing: 0.3em;
  color: rgba(244,237,225,0.42);
}
#auth-email, #auth-code {
  width: 100%; padding: 11px 13px;
  background: rgba(8,9,9,0.62);
  border: 1px solid rgba(244,237,225,0.14);
  border-radius: 2px; outline: none;
  color: var(--paper);
  font-family: var(--sans); font-size: 14px; letter-spacing: 0.04em;
  transition: border-color 0.3s, background 0.3s;
}
#auth-email:focus, #auth-code:focus {
  border-color: rgba(201,162,39,0.55); background: rgba(8,9,9,0.82);
}
#auth-email::placeholder, #auth-code::placeholder {
  color: rgba(244,237,225,0.2); font-size: 12px; letter-spacing: 0.06em;
}
#auth-email { margin-bottom: 16px; }
#auth-code {
  font-family: var(--serif); font-size: 17px;
  letter-spacing: 0.34em; font-variant-numeric: tabular-nums;
}
.auth-code-row { display: flex; gap: 8px; }
.auth-code-row #auth-code { flex: 1; min-width: 0; }
#auth-send {
  flex: 0 0 auto; min-width: 92px; text-align: center;
  white-space: nowrap;
  border-color: rgba(201,162,39,0.32);
  color: rgba(244,237,225,0.76);
}
#auth-send:disabled {
  opacity: 0.4; cursor: default;
  border-color: rgba(244,237,225,0.1);
}

.auth-hint {
  margin-top: 10px;
  font-size: 11px; letter-spacing: 0.08em; line-height: 1.75;
  color: rgba(244,237,225,0.5);
}
.auth-dev {
  margin-top: 10px; padding: 8px 11px;
  border: 1px dashed rgba(201,162,39,0.45);
  background: rgba(201,162,39,0.07);
  font-family: var(--serif); font-size: 11px; line-height: 1.7;
  letter-spacing: 0.06em; color: rgba(240,222,170,0.88);
}
.auth-dev b {
  font-family: var(--serif); font-weight: 400; font-size: 16px;
  letter-spacing: 0.22em; color: #f3dd9a;
}
.auth-err {
  margin-top: 9px; min-height: 15px;
  font-size: 11px; letter-spacing: 0.06em; color: #e0917f;
  opacity: 0; transition: opacity 0.3s;
}
.auth-err.show { opacity: 1; }

#auth .hidden { display: none !important; }

.auth-bound { padding: 2px 0 0; }
.ab-row { display: flex; align-items: center; gap: 10px; }
.ab-mail {
  font-family: var(--serif); font-size: 16px; letter-spacing: 0.04em;
  color: #f0e2c2;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ab-tag {
  flex: 0 0 auto;
  font-family: var(--serif); font-size: 9px; letter-spacing: 0.16em;
  color: var(--gold); border: 1px solid rgba(201,162,39,0.45);
  padding: 2px 7px; border-radius: 2px;
}
.ab-stats {
  display: flex; margin-top: 15px;
  border-top: 1px solid rgba(244,237,225,0.08);
  border-bottom: 1px solid rgba(244,237,225,0.08);
}
.ab-stats > div {
  flex: 1; position: relative;
  padding: 11px 0 10px; text-align: center;
}
.ab-stats > div + div::before {
  content: ''; position: absolute; left: 0; top: 13px; bottom: 12px;
  width: 1px; background: rgba(244,237,225,0.08);
}
.ab-stats b {
  display: block;
  font-family: var(--serif); font-size: 17px; font-weight: 400;
  color: #f0e2c2; font-variant-numeric: tabular-nums;
}
.ab-stats span {
  display: block; margin-top: 4px;
  font-family: var(--serif); font-size: 9.5px; letter-spacing: 0.22em;
  color: rgba(244,237,225,0.36);
}
.ab-tip {
  margin-top: 10px;
  font-size: 10.5px; letter-spacing: 0.08em; line-height: 1.8;
  color: rgba(244,237,225,0.46);
}
.ab-actions { display: flex; gap: 8px; margin-top: 18px; }

@media (max-width: 720px) {
  .auth-card { padding: 22px 20px 18px; }
  .start-auth { margin-top: 16px; padding-top: 12px; }
  .sa-txt { display: none; }
}

/* ================= 触屏操控（平板 / 无键盘） ================= */
/* 入口：键鼠界面右下角「触屏操控」，触屏界面右下角「键鼠」 */
.keys-touch {
  pointer-events: auto;
  font-family: var(--serif); font-size: 9.5px; letter-spacing: 0.18em;
  color: rgba(244, 237, 225, 0.58);
  background: rgba(12, 13, 13, 0.4); border: 1px solid rgba(244, 237, 225, 0.28);
  border-radius: 2px; padding: 3px 10px 3px 8px; cursor: pointer;
  transition: color 0.25s, border-color 0.25s;
}
.keys-touch:hover { color: var(--gold); border-color: rgba(201, 162, 39, 0.5); }

.touch { position: absolute; inset: 0; pointer-events: none; z-index: 8; }
.touch.hidden { display: none !important; }

/* 摇杆 */
.stick {
  position: absolute; left: max(28px, env(safe-area-inset-left)); bottom: max(28px, env(safe-area-inset-bottom));
  width: 132px; height: 132px; touch-action: none;
  pointer-events: auto;
}
.stick-ring {
  position: absolute; inset: 0; border-radius: 50%;
  border: 1px solid rgba(244, 237, 225, 0.14);
  background: radial-gradient(circle at 50% 50%, rgba(244,237,225,0.045) 0%, rgba(10,11,12,0.34) 68%, rgba(10,11,12,0.12) 100%);
  box-shadow: inset 0 0 24px rgba(0,0,0,0.45);
}
.stick-ring::after {
  content: ''; position: absolute; inset: 14px; border-radius: 50%;
  border: 1px dashed rgba(244, 237, 225, 0.07);
}
.stick-knob {
  position: absolute; left: 50%; top: 50%; width: 54px; height: 54px;
  margin: -27px 0 0 -27px; border-radius: 50%;
  background: radial-gradient(circle at 38% 32%, rgba(255,240,205,0.5), rgba(201,162,39,0.32) 46%, rgba(60,50,30,0.5) 100%);
  border: 1px solid rgba(201, 162, 39, 0.5);
  box-shadow: 0 4px 18px rgba(0,0,0,0.5), 0 0 22px rgba(201,162,39,0.18);
  will-change: transform;
  transition: transform 0.12s ease-out;
}
.stick.active .stick-knob { transition: none; }
.stick-label {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-size: 9px; letter-spacing: 0.3em;
  color: rgba(244, 237, 225, 0.3); pointer-events: none;
}
.stick.active .stick-label { opacity: 0; }

/* 右侧动作按钮 */
.tcluster {
  position: absolute; right: max(28px, env(safe-area-inset-right)); bottom: max(28px, env(safe-area-inset-bottom));
  display: grid; grid-template-columns: repeat(2, 62px); grid-template-rows: repeat(2, 62px);
  gap: 12px; pointer-events: none;
}
.tbtn {
  pointer-events: auto; position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  width: 62px; height: 62px; border-radius: 50%;
  background: radial-gradient(circle at 40% 32%, rgba(30,29,24,0.86), rgba(12,13,13,0.88));
  border: 1px solid rgba(244, 237, 225, 0.18);
  color: var(--paper); cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.12s, border-color 0.2s, background 0.2s;
}
.tbtn b { font-family: var(--kai); font-weight: 400; font-size: 17px; line-height: 1; color: rgba(244,237,225,0.9); }
.tbtn i { font-style: normal; font-family: var(--serif); font-size: 8.5px; letter-spacing: 0.16em; color: rgba(244,237,225,0.36); }
.tbtn:active { transform: scale(0.93); border-color: rgba(201,162,39,0.6); }
.tbtn.main {
  grid-column: 2; grid-row: 2; width: 72px; height: 72px; justify-self: end; align-self: end;
  background: radial-gradient(circle at 40% 30%, rgba(62,52,30,0.94), rgba(18,17,14,0.94));
  border-color: rgba(201, 162, 39, 0.5);
  box-shadow: 0 6px 22px rgba(0,0,0,0.5), 0 0 26px rgba(201,162,39,0.12);
}
.tbtn.main b { font-size: 21px; color: #f6e7c2; }
.tbtn.main i { color: rgba(201,162,39,0.72); letter-spacing: 0.2em; }
.tbtn.main.dim { opacity: 0.5; }
#tb-emoji { grid-column: 1; grid-row: 2; }
#tb-view { grid-column: 2; grid-row: 1; justify-self: end; }
#tb-chat { grid-column: 1; grid-row: 1; }
.tbtn.tiny {
  position: absolute; top: -38px; right: 0;
  width: 54px; height: 28px; border-radius: 14px; gap: 0;
  background: rgba(12,13,13,0.62);
}
.tbtn.tiny b { font-size: 12px; color: rgba(244,237,225,0.5); }
.tbtn.tiny i { display: none; }

body.chat-off #tb-chat, body.chat-off #k-chat { display: none !important; }

/* 触屏模式下：键鼠说明、准星、指针锁定提示都让位；提示条可点 */
body.touch-mode .hud-keys { display: none; }
body.touch-mode #crosshair { display: none !important; }
body.touch-mode #paused { display: none !important; }
body.touch-mode .prompt {
  pointer-events: auto; cursor: pointer;
  bottom: 24%; padding: 12px 20px 12px 14px; font-size: 14px;
}
body.touch-mode .prompt .k { min-width: 26px; }

/* 下座：触屏时只有这个钮 */
.med-rise {
  position: absolute; left: 50%; bottom: max(30px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 15;
  padding: 13px 40px;
  font-family: var(--kai); font-size: 17px; letter-spacing: 0.34em;
  color: rgba(246, 231, 194, 0.92);
  background: rgba(14, 14, 12, 0.5);
  border: 1px solid rgba(201, 162, 39, 0.42);
  border-radius: 26px;
  backdrop-filter: blur(8px);
  cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: transform 0.12s, border-color 0.2s;
}
.med-rise:active { transform: translateX(-50%) scale(0.96); border-color: rgba(201,162,39,0.8); }
.med-rise.hidden { display: none !important; }

@media (max-width: 720px) {
  .stick { width: 112px; height: 112px; }
  .stick-knob { width: 46px; height: 46px; margin: -23px 0 0 -23px; }
  .tcluster { grid-template-columns: repeat(2, 54px); grid-template-rows: repeat(2, 54px); gap: 10px; }
  .tbtn { width: 54px; height: 54px; }
  .tbtn b { font-size: 15px; }
  .tbtn i { font-size: 8px; }
  .tbtn.main { width: 62px; height: 62px; }
  .tbtn.main b { font-size: 18px; }
}

/* 触屏：别让拖动画面变成页面滚动 / 缩放 */
body.touch-mode { overscroll-behavior: none; -webkit-user-select: none; user-select: none; }
body.touch-mode canvas#c { touch-action: none; }
body.touch-mode .stick, body.touch-mode .tbtn, body.touch-mode .med-rise { touch-action: none; }

/* 大屏触屏（平板横屏 / Surface）：按钮放大一档，拇指更好按 */
@media (min-width: 900px) and (pointer: coarse) {
  .stick { width: 146px; height: 146px; }
  .stick-knob { width: 60px; height: 60px; margin: -30px 0 0 -30px; }
  .tcluster { grid-template-columns: repeat(2, 68px); grid-template-rows: repeat(2, 68px); gap: 14px; }
  .tbtn { width: 68px; height: 68px; }
  .tbtn b { font-size: 19px; }
  .tbtn i { font-size: 9px; }
  .tbtn.main { width: 80px; height: 80px; }
  .tbtn.main b { font-size: 24px; }
  .tbtn.tiny { width: 58px; height: 30px; top: -40px; }
}

/* 触屏：愿墙上的按钮按得准一点 */
@media (pointer: coarse) {
  #wall-btn { padding: 11px 16px 10px; font-size: 11px; letter-spacing: 0.12em; }
  .wall-stat { font-size: 12px; }
  .w-yes, .w-no { padding: 9px 16px 8px; font-size: 11px; }
  #wish-wall li.w { padding: 11px 10px 11px 12px; }
  .w-body { font-size: 14.5px; }
}

/* ================= 多语言 ================= */
/* 开始页：右下角选择，和左下的地理位置对称 */
.lang-bar {
  position: absolute; right: 7vw; bottom: 38px;
  display: flex; align-items: center; gap: 1px;
  z-index: 6; pointer-events: auto;
  animation: riseIn 1.4s 0.35s cubic-bezier(.2,.7,.2,1) both;
}
.lang-bar button {
  font-family: var(--serif); font-size: 11px; letter-spacing: 0.12em;
  color: rgba(244, 237, 225, 0.32);
  background: none; border: 0; border-bottom: 1px solid transparent;
  padding: 5px 9px 4px; cursor: pointer;
  transition: color 0.3s, border-color 0.3s;
}
.lang-bar button:hover { color: rgba(244, 237, 225, 0.72); }
.lang-bar button.on { color: var(--gold); border-bottom-color: rgba(201, 162, 39, 0.55); }

/* 山中：左上角一枚小签，点一下换语言 */
.lang-pill {
  margin-top: 14px; pointer-events: auto;
  font-family: var(--serif); font-size: 9.5px; letter-spacing: 0.16em;
  color: rgba(244, 237, 225, 0.5);
  background: rgba(10, 10, 9, 0.42); border: 1px solid rgba(244, 237, 225, 0.16);
  border-radius: 2px; padding: 3px 8px; cursor: pointer;
  transition: color 0.25s, border-color 0.25s, background 0.25s;
}
.lang-pill:hover { color: var(--gold); border-color: rgba(201, 162, 39, 0.5); }
body.touch-mode .lang-pill { padding: 7px 12px; font-size: 10.5px; }

/* 意见箱：署名 + 作者联系方式 */
.fb-who { display: flex; align-items: center; gap: 8px; margin: 2px 2px 9px; }
.fb-w-label { font-family: var(--serif); font-size: 9.5px; letter-spacing: 0.22em; color: rgba(244, 237, 225, 0.3); }
.fb-who b { font-family: var(--kai); font-weight: 400; font-size: 13px; letter-spacing: 0.1em; color: rgba(244, 237, 225, 0.82); }
.fb-who i { font-style: normal; font-size: 10px; letter-spacing: 0.06em; color: rgba(244, 237, 225, 0.34); }

.fb-author { margin-top: 13px; padding-top: 12px; border-top: 1px dashed rgba(244, 237, 225, 0.12); }
.fb-a-head { display: flex; align-items: center; gap: 8px; }
.fb-a-seal {
  width: 20px; height: 20px; flex: none;
  display: flex; align-items: center; justify-content: center;
  background: var(--seal); color: #f7ece0;
  font-family: var(--kai); font-size: 12px; line-height: 1;
  border-radius: 1px; transform: rotate(-3deg);
}
.fb-a-head b { font-family: var(--serif); font-weight: 400; font-size: 9.5px; letter-spacing: 0.26em; color: rgba(244, 237, 225, 0.45); }
.fb-a-head em { font-style: normal; font-family: var(--kai); font-size: 12px; letter-spacing: 0.08em; color: rgba(244, 237, 225, 0.62); }
.fb-a-row { display: flex; align-items: center; gap: 10px; margin-top: 7px; }
.fb-a-mail {
  font-family: var(--sans); font-size: 12.5px; letter-spacing: 0.03em;
  color: rgba(226, 194, 96, 0.92); text-decoration: none;
  border-bottom: 1px solid rgba(201, 162, 39, 0.28); padding-bottom: 1px;
}
.fb-a-mail:hover { color: #f2dc9a; }
.fb-a-copy {
  font-family: var(--serif); font-size: 9.5px; letter-spacing: 0.12em;
  color: rgba(244, 237, 225, 0.44);
  background: none; border: 1px solid rgba(244, 237, 225, 0.16);
  border-radius: 2px; padding: 3px 8px; cursor: pointer;
  transition: color 0.25s, border-color 0.25s;
}
.fb-a-copy:hover { color: var(--gold); border-color: rgba(201, 162, 39, 0.45); }
.fb-a-tip { margin-top: 9px; font-size: 10px; letter-spacing: 0.06em; line-height: 1.75; color: rgba(244, 237, 225, 0.3); }

/* 拉丁文 / 韩文：换掉中文衬线，竖排改横排 */
body.lang-en { --serif: Georgia, "Iowan Old Style", "Times New Roman", serif; --kai: Georgia, "Times New Roman", serif; }
body.lang-ko { --serif: "Nanum Myeongjo", Batang, "Songti SC", serif; --kai: "Nanum Myeongjo", Batang, serif; }
body.lang-ja { --serif: "Yu Mincho", "Hiragino Mincho ProN", "Noto Serif JP", "Songti SC", serif; --kai: "Yu Mincho", "Hiragino Mincho ProN", serif; }

body.lang-en .vtitle, body.lang-ko .vtitle {
  writing-mode: horizontal-tb;
  font-family: var(--serif);
  font-size: clamp(28px, 3.4vw, 48px);
  letter-spacing: 0.1em; line-height: 1.16;
  margin-left: 0; max-width: 420px;
}
body.lang-en .vsub, body.lang-ko .vsub {
  writing-mode: horizontal-tb; height: auto;
  margin: 18px 0 0; line-height: 1.85; letter-spacing: 0.12em;
  max-width: 340px;
  color: rgba(244, 237, 225, 0.88);
  text-shadow: 0 0 2px rgba(0, 0, 0, 0.95), 0 0 11px rgba(0, 0, 0, 0.9), 0 1px 2px rgba(0, 0, 0, 1);
}
body.lang-en .seal, body.lang-ko .seal {
  writing-mode: horizontal-tb; font-size: 14px; letter-spacing: 0.02em;
}
body.lang-en .brand, body.lang-ko .brand { max-width: 46vw; }

body.lang-en .med-kicker, body.lang-ko .med-kicker { letter-spacing: 0.22em; font-size: 10px; }
body.lang-en .tally-label { letter-spacing: 0.1em; font-size: 9px; }
body.lang-en .start-enter, body.lang-ko .start-enter { letter-spacing: 0.14em; }

@media (max-width: 720px) {
  .lang-bar { right: 24px; bottom: 20px; }
  .lang-bar button { font-size: 10px; padding: 4px 6px; }
}

/* 英文 / 韩文：按钮不折行，页脚该让行就让行 */
body.lang-en .ghost-btn, body.lang-en .gold-btn,
body.lang-ko .ghost-btn, body.lang-ko .gold-btn { white-space: nowrap; }

body.lang-en .wish-foot, body.lang-ko .wish-foot { flex-wrap: wrap; row-gap: 10px; }
body.lang-en .wish-cost, body.lang-ko .wish-cost { flex: 1 1 100%; }
body.lang-en .wish-actions, body.lang-ko .wish-actions { margin-left: auto; }

/* 山门簿入口：英文一行塞不下，改成两行 */
body.lang-en .start-auth, body.lang-ko .start-auth { flex-wrap: wrap; row-gap: 3px; }
body.lang-en .start-auth b, body.lang-ko .start-auth b { flex: 1 1 0; letter-spacing: 0.12em; }
body.lang-en .sa-txt, body.lang-ko .sa-txt {
  flex: 1 1 100%; margin-left: 28px;
  text-align: left; white-space: normal; line-height: 1.5;
}

/* 英文名字更长，身份卡放宽一档，名字缩一档 */
body.lang-en .profile, body.lang-ko .profile { width: 246px; }
body.lang-en .pf-name, body.lang-ko .pf-name { font-size: 14.5px; letter-spacing: 0.04em; }
body.lang-en .pf-title, body.lang-ko .pf-title { letter-spacing: 0.12em; }
body.lang-en .pf-mail, body.lang-ko .pf-mail { letter-spacing: 0.06em; }

/* HUD 常压在高亮雪雾 / 橙瓦上，给薄字补一层底影，任何背景都立得住 */
.sc-name, .sc-sub, .counter, .c-label, .pf-title, .pf-points em,
.online-chip, .hud-keys, .hud-alt, .wish-title, .wish-sub {
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.8), 0 0 2px rgba(0, 0, 0, 0.55);
}
body.lang-en .sc-sub, body.lang-ko .sc-sub { color: rgba(244, 237, 225, 0.62); }
body.lang-en .online-chip, body.lang-ko .online-chip { color: rgba(244, 237, 225, 0.6); }
/* 拉丁文 / 韩文不要把字距撑成散点 */
body.lang-en .wall-stat, body.lang-ko .wall-stat { letter-spacing: 0.06em; font-size: 11.5px; }
body.lang-en .wall-stat i, body.lang-ko .wall-stat i { letter-spacing: 0.04em; }
body.lang-en #wall-btn, body.lang-ko #wall-btn { letter-spacing: 0.08em; }

body.lang-en .gold-btn, body.lang-ko .gold-btn { letter-spacing: 0.16em; }
body.lang-en .ghost-btn, body.lang-ko .ghost-btn { letter-spacing: 0.18em; }

/* 触屏摇杆上的「走」：英文/韩文放到底部，别压在摇杆头上 */
body.lang-en .stick-label, body.lang-ko .stick-label {
  align-items: flex-end; padding-bottom: 9px; letter-spacing: 0.14em;
}
