/* ═══════════════════════════════════════════════════════════
   修仙录 · 样式
   暗色 · 竖版 · 单列
   ═══════════════════════════════════════════════════════════ */

:root {
  --bg: #050708;
  --bg2: #0a0e0f;
  --panel: rgba(255, 255, 255, .035);
  --panel2: #101617;
  --line: rgba(255, 255, 255, .075);
  --ink: #e9e6dc;
  --dim: #7d8a86;
  --dim2: #5c6864;
  --jade: #4ecfa0;
  --jade-d: #2b9a74;
  --gold: #cfa85a;
  --blood: #c9524a;
  --mana: #5b8fd0;
  --serif: "Songti SC", "Noto Serif SC", "STSong", "SimSun", serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0; padding: 0;
  background: #030506;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

body { display: flex; justify-content: center; }

.app {
  width: 100%;
  max-width: 460px;
  min-height: 100vh;
  min-height: 100dvh;                 /* 微信/移动端地址栏收放时不吃掉底部 */
  padding: 22px 16px 82px;
  padding-bottom: calc(82px + env(safe-area-inset-bottom, 0px));   /* 避开全面屏底部横条 */
  position: relative;
  background:
    radial-gradient(ellipse 120% 60% at 50% 6%, rgba(30, 62, 54, .32) 0%, rgba(5, 7, 8, 0) 62%),
    radial-gradient(ellipse 80% 40% at 50% 100%, rgba(24, 40, 46, .30) 0%, rgba(5, 7, 8, 0) 60%),
    #050708;
}

/* ── 顶部 ─────────────────────────────────────── */
.hd { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }

.realm-t {
  font-family: var(--serif);
  font-size: 27px;
  letter-spacing: .08em;
  line-height: 1.1;
  margin: 0;
  font-weight: 500;
  text-shadow: 0 0 22px rgba(120, 220, 190, .18);
}

.realm-s {
  font-size: 11px;
  color: var(--dim);
  margin-top: 7px;
  letter-spacing: .12em;
}

.chips { display: flex; flex-direction: column; gap: 7px; align-items: stretch; flex: 0 0 auto; }

.chip {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: rgba(255, 255, 255, .045);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 5px 10px;
  min-width: 108px;
}

.chip .lab { font-size: 10px; color: var(--dim); letter-spacing: .08em; }
.chip .val {
  font-size: 12.5px; font-weight: 600; letter-spacing: .02em;
  font-variant-numeric: tabular-nums;
}
.chip .val.gold { color: var(--gold); }

/* ── 修为条 ───────────────────────────────────── */
.cult-row {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 11.5px; color: var(--dim);
  margin: 18px 0 7px; letter-spacing: .08em;
}
.cult-row b { color: var(--ink); font-weight: 500; font-variant-numeric: tabular-nums; }

.bar {
  height: 6px; border-radius: 99px;
  background: #263135;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .10), inset 0 1px 2px rgba(0, 0, 0, .45);
  position: relative;
}
.bar > i {
  display: block; height: 100%; width: 0; border-radius: 99px;
  transition: width .25s cubic-bezier(.2, .8, .3, 1);
}
.bar.cult > i {
  background: linear-gradient(90deg, #2b8f6d, #5fdba8);
  box-shadow: 0 0 12px rgba(79, 207, 160, .55);
}
.bar.hp > i { background: linear-gradient(90deg, #8e2e24, #d1584e); }
.bar.mp > i { background: linear-gradient(90deg, #2b5a86, #5b8fd0); }
.bar.thin { height: 7px; }

.cult-hint {
  display: flex; justify-content: space-between;
  font-size: 11px; color: var(--dim2); margin-top: 9px; letter-spacing: .04em;
}

/* ── 立绘 ─────────────────────────────────────── */
.hero {
  position: relative;
  margin: 16px 0 0;
  border-radius: 16px;
  overflow: hidden;
  height: clamp(320px, calc(100vh - 472px), 560px);
  background: #080b0c;
  border: 1px solid rgba(255, 255, 255, .05);
  flex: 0 1 auto;
}
.hero img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 14%;
  display: block;
  filter: saturate(.95) contrast(1.02);
}
.hero::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg,
      rgba(5, 7, 8, .62) 0%, rgba(5, 7, 8, 0) 20%,
      rgba(5, 7, 8, 0) 58%, rgba(5, 7, 8, .55) 82%, rgba(5, 7, 8, .95) 100%);
}
.hero-top {
  position: absolute; top: 12px; left: 14px; right: 14px;
  display: flex; justify-content: space-between; align-items: center;
  z-index: 2;
}
.hero-tag {
  font-size: 10.5px; letter-spacing: .14em; color: rgba(233, 230, 220, .72);
  background: rgba(0, 0, 0, .38); border: 1px solid rgba(255, 255, 255, .1);
  padding: 3px 9px; border-radius: 99px;
  backdrop-filter: blur(4px);
}
.hero-badge {
  position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%);
  z-index: 2;
  font-family: var(--serif);
  font-size: 12.5px; letter-spacing: .22em;
  color: #e6f4ec;
  background: rgba(12, 26, 22, .72);
  border: 1px solid rgba(94, 200, 160, .34);
  padding: 5px 18px 5px 20px;
  border-radius: 99px;
  backdrop-filter: blur(6px);
  box-shadow: 0 0 22px -6px rgba(78, 207, 160, .5);
}

/* ── 属性卡片 ─────────────────────────────────── */
.cards {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 8px; margin-top: 12px;
}
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 10px;
}
.card .k { font-size: 10px; color: var(--dim); letter-spacing: .06em; }
.card .v {
  font-size: 15px; font-weight: 600; margin-top: 5px;
  font-variant-numeric: tabular-nums; letter-spacing: .01em;
}
.card .v.jade { color: var(--jade); }

/* 气血 / 灵力 */
.vitals { margin-top: 12px; display: grid; gap: 9px; }
.vital-row { display: flex; align-items: center; gap: 10px; }
.vital-row .tag {
  font-size: 10px; color: var(--dim); width: 26px; flex: 0 0 26px; letter-spacing: .05em;
}
.vital-row .bar { flex: 1; }
.vital-row .num {
  font-size: 11px; color: var(--dim); width: 92px; text-align: right;
  font-variant-numeric: tabular-nums; flex: 0 0 auto;
}

/* ── 主按钮 ───────────────────────────────────── */
.btn-main {
  width: 100%; height: 56px; margin-top: 18px;
  border-radius: 13px;
  border: 1px solid rgba(80, 190, 150, .34);
  background: linear-gradient(180deg, #1b3a2f 0%, #102019 100%);
  color: #ddf2e7;
  font-family: var(--serif);
  font-size: 19px; letter-spacing: .42em; text-indent: .42em;
  position: relative;
  cursor: pointer;
  box-shadow: 0 10px 30px -16px rgba(78, 207, 160, .85), inset 0 1px 0 rgba(255, 255, 255, .07);
  transition: transform .08s ease, box-shadow .2s;
  user-select: none;
}
.btn-main:active { transform: scale(.985); box-shadow: 0 4px 16px -10px rgba(78, 207, 160, .9); }
.btn-main:disabled { opacity: .45; cursor: default; }
.btn-main .plus {
  position: absolute; right: 15px; top: 50%; transform: translateY(-50%);
  font-size: 12px; color: var(--jade); letter-spacing: 0; text-indent: 0;
  font-family: -apple-system, sans-serif; font-variant-numeric: tabular-nums;
}
.btn-main.break {
  border-color: rgba(207, 168, 90, .42);
  background: linear-gradient(180deg, #3a2f16 0%, #1e180c 100%);
  color: #f4e6c4;
  box-shadow: 0 10px 30px -16px rgba(207, 168, 90, .85), inset 0 1px 0 rgba(255, 255, 255, .07);
}
.btn-main.break .plus { color: var(--gold); }

/* ── 动作行（修炼/突破 + 调息） ─────────────────── */
.act-row { display: flex; gap: 10px; margin-top: 18px; }
.act-row .btn-main { margin-top: 0; flex: 2.4 1 0; min-width: 0; }
.act-row .btn-sub { margin-top: 0; flex: 1 1 0; min-width: 0; height: 56px; }

/* ── 次要按钮（调息疗伤） ───────────────────────── */
.btn-sub {
  width: 100%; height: 42px; margin-top: 9px;
  border-radius: 11px;
  border: 1px solid rgba(120, 168, 200, .26);
  background: linear-gradient(180deg, #15222a 0%, #0c1317 100%);
  color: #bfd8e6;
  font-family: var(--serif);
  font-size: 13.5px; letter-spacing: .3em; text-indent: .3em;
  position: relative;
  cursor: pointer;
  user-select: none;
  transition: transform .08s ease, border-color .2s, color .2s;
}
.btn-sub:active { transform: scale(.99); border-color: rgba(130, 196, 226, .55); color: #e2f2fb; }

/* ── 气血条下方的快捷服药 ───────────────────────── */
.vital-tools {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; min-height: 0; margin-top: 1px;
}
.vital-note { font-size: 10.5px; color: #6d7a76; letter-spacing: .02em; }
.chipbtn {
  border: 1px solid rgba(200, 90, 78, .38);
  background: linear-gradient(180deg, #2a1a17 0%, #170f0d 100%);
  color: #e6b3ab;
  border-radius: 20px;
  padding: 5px 11px;
  font-size: 11px; letter-spacing: .06em;
  font-family: var(--serif);
  cursor: pointer;
  transition: border-color .2s, color .2s;
}
.chipbtn b { font-family: -apple-system, sans-serif; color: #f0d9a6; }
.chipbtn:active { border-color: rgba(226, 120, 106, .7); color: #f7d5cf; }

/* ── 通用按钮 ─────────────────────────────────── */
.btn {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .05);
  color: var(--ink);
  padding: 9px 14px;
  border-radius: 9px;
  font-size: 12.5px;
  letter-spacing: .05em;
  cursor: pointer;
  font-family: inherit;
  transition: background .15s;
}
.btn:active { background: rgba(255, 255, 255, .1); }
.btn:disabled { opacity: .38; cursor: default; }
.btn.jade { border-color: rgba(78, 207, 160, .4); color: #b8ecd6; background: rgba(78, 207, 160, .12); }
.btn.gold { border-color: rgba(207, 168, 90, .4); color: #efdcb2; background: rgba(207, 168, 90, .12); }
.btn.blood { border-color: rgba(201, 82, 74, .4); color: #f0b9b4; background: rgba(201, 82, 74, .12); }
.btn.sm { padding: 6px 10px; font-size: 11.5px; border-radius: 7px; }
.btn.block { width: 100%; }

/* ── 面板 ─────────────────────────────────────── */
.tab { display: none; }
.tab.on { display: block; animation: fade .22s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.page-hd { display: flex; justify-content: space-between; align-items: baseline; margin: 4px 0 14px; }
.page-hd h2 {
  font-family: var(--serif); font-size: 19px; font-weight: 500;
  letter-spacing: .14em; margin: 0;
}
.page-hd .sub { font-size: 11px; color: var(--dim2); letter-spacing: .06em; }

.sect {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 13px;
  margin-bottom: 10px;
}
.sect-hd {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 10px;
}
.sect-hd h3 {
  font-size: 12.5px; font-weight: 600; margin: 0;
  letter-spacing: .14em; color: #cfd8d3;
}
.sect-hd .note { font-size: 10.5px; color: var(--dim2); }

.row {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid rgba(255, 255, 255, .045);
  font-size: 12.5px;
}
.row:last-child { border-bottom: none; padding-bottom: 0; }
.row .l { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.row .t { font-size: 12.5px; letter-spacing: .04em; }
.row .s { font-size: 10.5px; color: var(--dim2); }
.row .r { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }

.empty { text-align: center; color: var(--dim2); font-size: 11.5px; padding: 22px 0; letter-spacing: .06em; }

/* 装备槽 */
.slots { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.slot {
  display: flex; align-items: center; gap: 9px;
  background: rgba(255, 255, 255, .028);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 10px;
  min-height: 52px;
  cursor: pointer;
}
.slot .ic {
  width: 26px; height: 26px; border-radius: 7px;
  display: grid; place-items: center;
  font-family: var(--serif); font-size: 13px;
  background: rgba(255, 255, 255, .05);
  color: var(--dim);
  flex: 0 0 26px;
}
.slot .bd { min-width: 0; flex: 1; }
.slot .nm {
  font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.slot .st { font-size: 10px; color: var(--dim2); margin-top: 2px; }
.slot.empty-slot .nm { color: var(--dim2); }

/* 品阶色 */
.q0 { color: #939c98; } .q1 { color: #5ec27a; } .q2 { color: #5b9bd5; }
.q3 { color: #b07be0; } .q4 { color: #e0b04a; }

/* 秘境卡 */
.depth {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 11px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .028);
  margin-bottom: 8px;
}
.depth.lock { opacity: .45; }
.depth .info { min-width: 0; }
.depth .nm { font-size: 13px; letter-spacing: .05em; }
.depth .meta { font-size: 10.5px; color: var(--dim2); margin-top: 4px; }
.depth .danger { font-size: 10px; color: var(--blood); }

/* ── 底栏 ─────────────────────────────────────── */
.nav {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 460px; height: 62px;
  height: calc(62px + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: rgba(6, 9, 10, .96);
  border-top: 1px solid rgba(255, 255, 255, .07);
  backdrop-filter: blur(14px);
  z-index: 40;
}
.nav button {
  position: relative;
  background: none; border: none; color: #57635f;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; font-size: 10px; letter-spacing: .1em;
  font-family: inherit; cursor: pointer; padding: 0;
  transition: color .18s;
}
.nav button svg { width: 19px; height: 19px; }
.nav button.on { color: var(--jade); }
.nav button.on svg { filter: drop-shadow(0 0 8px rgba(78, 207, 160, .55)); }

/* ── 弹层 ─────────────────────────────────────── */
.sheet {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(2, 4, 5, .76);
  display: flex; align-items: flex-end; justify-content: center;
  backdrop-filter: blur(3px);
}
.sheet.hide { display: none; }
.sheet-box {
  width: 100%; max-width: 460px; max-height: 90vh; overflow-y: auto;
  background: #0a0e0f;
  border-radius: 18px 18px 0 0;
  border-top: 1px solid rgba(255, 255, 255, .1);
  padding: 14px 16px 26px;
  animation: sheetUp .26s cubic-bezier(.2, .8, .3, 1);
}
@keyframes sheetUp { from { transform: translateY(24px); opacity: .4; } to { transform: none; opacity: 1; } }
.sheet-hd {
  display: flex; justify-content: space-between; align-items: center;
  padding-bottom: 11px; margin-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
  position: sticky; top: -14px; background: #0a0e0f; z-index: 2;
  padding-top: 2px;
}
.sheet-hd h3 { margin: 0; font-size: 15px; font-family: var(--serif); letter-spacing: .16em; font-weight: 500; }
.x {
  background: none; border: none; color: var(--dim); font-size: 20px;
  cursor: pointer; line-height: 1; padding: 4px 6px;
}

/* ── 战斗 ─────────────────────────────────────── */
.fight-hero { text-align: center; padding: 8px 0 4px; position: relative; }
.foe-seal {
  width: 82px; height: 82px; margin: 0 auto 10px;
  border: 1.5px solid rgba(201, 82, 74, .55);
  border-radius: 12px;
  display: grid; place-items: center;
  font-family: var(--serif); font-size: 38px;
  color: #d9786e;
  background: rgba(201, 82, 74, .07);
  box-shadow: inset 0 0 0 3px rgba(201, 82, 74, .06), 0 0 30px -10px rgba(201, 82, 74, .5);
}
.foe-name { font-size: 13px; letter-spacing: .12em; }
.foe-meta { font-size: 10.5px; color: var(--dim2); margin-top: 5px; }
.fight .bar { max-width: 300px; margin: 12px auto 0; }

.acts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 16px; }
.acts .btn { padding: 12px 8px; font-size: 12.5px; border-radius: 10px; }
.acts .btn .mp { font-size: 10px; color: var(--dim2); margin-left: 4px; }

.blog {
  margin-top: 14px; max-height: 190px; overflow-y: auto;
  font-size: 11.5px; line-height: 1.75;
  padding: 10px 12px;
  background: rgba(0, 0, 0, .3);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, .05);
}
.blog p { margin: 0 0 3px; color: #a8b3ae; }
.blog p:last-child { margin-bottom: 0; }
.blog .good { color: #6fd0a4; }
.blog .bad { color: #d98a83; }
.blog .crit { color: #e6b45c; }
.blog .skill { color: #7fb0e0; }
.blog .divine { color: #c79ce8; }
.blog .win { color: #6fe0b0; font-weight: 600; }
.blog .loot { color: var(--gold); }
.blog .death { color: #e0705f; }

/* 飘字 */
.float {
  position: absolute; left: 50%; top: 40%;
  transform: translate(-50%, -50%);
  font-size: 18px; font-weight: 600; pointer-events: none;
  animation: floatUp 1s ease forwards;
  text-shadow: 0 0 14px rgba(0, 0, 0, .9), 0 1px 3px rgba(0, 0, 0, .9);
  white-space: nowrap; z-index: 5;
}
.float.hurt { color: #ee8b7f; }
.float.heal { color: #6fe0b0; }
@keyframes floatUp {
  0% { opacity: 0; transform: translate(-50%, 6px) scale(.8); }
  25% { opacity: 1; transform: translate(-50%, -6px) scale(1.06); }
  100% { opacity: 0; transform: translate(-50%, -44px) scale(1); }
}

/* ── 开局选择 ─────────────────────────────────── */
.gate {
  position: fixed; inset: 0; z-index: 90;
  background: #040607;
  background-image:
    radial-gradient(ellipse 100% 52% at 50% 0%, rgba(30, 62, 54, .55), rgba(4, 6, 7, 0) 70%),
    radial-gradient(ellipse 120% 42% at 50% 104%, rgba(22, 52, 52, .55), rgba(4, 6, 7, 0) 72%);
  display: flex; align-items: center; justify-content: center;
  padding: 20px; overflow-y: auto;
}
.gate.hide { display: none; }
.gate-box { width: 100%; max-width: 400px; }
.gate h1 {
  font-family: var(--serif); font-size: 25px; font-weight: 500;
  letter-spacing: .34em; text-align: center; margin: 0 0 8px; text-indent: .34em;
}
.gate .sub {
  text-align: center; font-size: 11px; color: var(--dim);
  letter-spacing: .2em; margin-bottom: 26px;
}
.gate-lab { font-size: 11px; color: var(--dim); letter-spacing: .18em; margin: 18px 0 9px; }
.opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.opts.three { grid-template-columns: repeat(3, 1fr); }
.opt {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .03);
  border-radius: 11px;
  padding: 13px 10px;
  cursor: pointer;
  text-align: center;
  transition: all .16s;
}
.opt .on-n { font-family: var(--serif); font-size: 15px; letter-spacing: .1em; }
.opt .on-d { font-size: 10px; color: var(--dim2); margin-top: 5px; line-height: 1.5; }
.opt.sel {
  border-color: rgba(78, 207, 160, .5);
  background: rgba(78, 207, 160, .1);
  box-shadow: 0 0 26px -12px rgba(78, 207, 160, .9);
}
.gate-name {
  width: 100%; margin-top: 8px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid var(--line);
  border-radius: 10px; padding: 11px 13px;
  color: var(--ink); font-size: 13px; letter-spacing: .1em;
  font-family: inherit; outline: none;
}
.gate-name:focus { border-color: rgba(78, 207, 160, .4); }

/* ── 提示 ─────────────────────────────────────── */
.toast {
  position: fixed; left: 50%; bottom: 140px; transform: translateX(-50%);
  bottom: calc(140px + env(safe-area-inset-bottom, 0px));
  background: rgba(18, 24, 25, .96);
  border: 1px solid rgba(255, 255, 255, .12);
  color: #e9e6dc; font-size: 12px; letter-spacing: .1em;
  padding: 9px 18px; border-radius: 99px; z-index: 120;
  pointer-events: none; white-space: nowrap; max-width: 88vw;
  overflow: hidden; text-overflow: ellipsis;
  animation: toastIn .22s ease;
  box-shadow: 0 12px 30px -14px rgba(0, 0, 0, .9);
}
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }

.tabs {
  display: flex; gap: 6px; margin-bottom: 12px;
}
.tabs button {
  flex: 1; padding: 8px 4px; font-size: 11.5px; letter-spacing: .08em;
  border-radius: 8px; border: 1px solid var(--line);
  background: rgba(255, 255, 255, .03); color: var(--dim);
  font-family: inherit; cursor: pointer;
}
.tabs button.on {
  color: #cfeee0; border-color: rgba(78, 207, 160, .38);
  background: rgba(78, 207, 160, .12);
}

.mini-bar { display: flex; gap: 6px; flex-wrap: wrap; }

.scroll-x { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 10px; }
.scroll-x::-webkit-scrollbar { height: 0; }

.pill-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pill-cell {
  display: flex; justify-content: space-between; align-items: center;
  background: rgba(255, 255, 255, .028);
  border: 1px solid var(--line); border-radius: 9px; padding: 9px 10px;
}
.pill-cell .n { font-size: 11.5px; }
.pill-cell .c { font-size: 10.5px; color: var(--dim2); margin-top: 2px; }

.plot {
  display: flex; align-items: center; justify-content: space-between;
  border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 11px; margin-bottom: 8px;
  background: rgba(255, 255, 255, .026);
}
.plot .pn { font-size: 12px; }
.plot .pt { font-size: 10.5px; color: var(--dim2); margin-top: 3px; }

.hr { height: 1px; background: rgba(255, 255, 255, .06); margin: 12px 0; }

.kv3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.kv3 .c { background: rgba(255, 255, 255, .028); border: 1px solid var(--line); border-radius: 9px; padding: 8px 9px; }
.kv3 .k { font-size: 9.5px; color: var(--dim2); }
.kv3 .v { font-size: 12.5px; margin-top: 4px; font-variant-numeric: tabular-nums; }

/* 洗髓进度 */
.xisui { margin-top: 10px; padding: 9px 10px 10px; border: 1px solid var(--line); border-radius: 9px; background: rgba(176, 123, 224, .05); }
.xisui-hd { display: flex; justify-content: space-between; align-items: baseline; font-size: 11px; color: #cbb6e6; letter-spacing: .16em; }
.xisui-n { font-size: 10.5px; color: var(--dim2); letter-spacing: 0; }
.xisui-bar { height: 4px; border-radius: 3px; margin: 7px 0 6px; background: rgba(255, 255, 255, .07); overflow: hidden; }
.xisui-bar i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, #8a5cc4, #c79df0); transition: width .4s ease; }
.xisui-tip { font-size: 10px; line-height: 1.6; color: #5f6a66; }

/* ── 打坐 ─────────────────────────────────────── */
.fish-sect .fish-txt {
  font-size: 11.5px; color: var(--dim); line-height: 1.8; margin: 2px 0 10px;
  transition: color .25s;
}

/* ── 丹药行：效果 + 何时服 + 卖价 ─────────────── */
.pill-row {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 10px;
  padding: 10px 11px; margin-bottom: 8px;
  border: 1px solid var(--line); border-radius: 10px;
  background: rgba(255, 255, 255, .026);
}
.pill-row .pill-bd { min-width: 0; }
.pill-row .n { font-size: 12px; }
.pill-row .cnt { color: var(--dim2); font-size: 10.5px; }
.pill-row .eff { font-size: 11px; color: #cfd8d4; margin-top: 4px; }
.pill-row .tip { font-size: 10.5px; color: #6f7c78; margin-top: 3px; line-height: 1.6; }
.pill-row .pill-act { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; flex: 0 0 auto; }
.pill-row .price { font-size: 9.5px; color: #5c6864; letter-spacing: .02em; }

/* ── 仙聊 ─────────────────────────────────────── */
.chat-list {
  height: 46vh; min-height: 230px; max-height: 420px;
  overflow-y: auto; padding: 10px 2px 6px;
  display: flex; flex-direction: column; gap: 9px;
  border-top: 1px solid rgba(255, 255, 255, .05);
  border-bottom: 1px solid rgba(255, 255, 255, .05);
}
.chat-item { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.chat-item .who { font-size: 10px; color: #6f7c78; letter-spacing: .04em; }
.chat-item .who .rl { color: #8fa39c; margin-left: 6px; }
.chat-item .who .tm { color: #4e5b57; margin-left: 6px; font-variant-numeric: tabular-nums; }
.chat-item .bubble {
  max-width: 84%; font-size: 12.5px; line-height: 1.65; color: #dfe8e4;
  background: rgba(255, 255, 255, .045); border: 1px solid rgba(255, 255, 255, .06);
  border-radius: 10px; padding: 7px 11px; word-break: break-word; white-space: pre-wrap;
}
.chat-item.me { align-items: flex-end; }
.chat-item.me .bubble {
  background: linear-gradient(180deg, rgba(78, 207, 160, .17), rgba(78, 207, 160, .09));
  border-color: rgba(78, 207, 160, .3); color: #d9f4e7;
}
.chat-input { display: flex; gap: 8px; margin-top: 10px; }
.chat-input input {
  flex: 1; min-width: 0; height: 38px; padding: 0 12px;
  background: rgba(255, 255, 255, .04); border: 1px solid var(--line);
  border-radius: 9px; color: #e6ece9; font-family: inherit; font-size: 12.5px; outline: none;
  transition: border-color .2s;
}
.chat-input input:focus { border-color: rgba(78, 207, 160, .45); }
.chat-input .btn { flex: 0 0 auto; height: 38px; padding: 0 16px; }
.chat-foot { font-size: 9.5px; color: #4e5b57; margin-top: 8px; text-align: center; letter-spacing: .03em; }

/* 气血行下方的打坐小按钮 */
.chipbtn.fish-chip {
  border-color: rgba(120, 168, 200, .34);
  background: linear-gradient(180deg, #15222a 0%, #0c1317 100%);
  color: #bcd6e4;
}
.chipbtn.fish-chip.on {
  border-color: rgba(78, 207, 160, .55);
  color: #d9f4e7;
  background: linear-gradient(180deg, rgba(78, 207, 160, .24), rgba(78, 207, 160, .10));
}
.vital-note { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 秘境警示句 */
.warn-line {
  font-size: 11px; line-height: 1.7; color: #d98a83;
  border-left: 2px solid rgba(217, 138, 131, .45);
  padding: 2px 0 2px 9px; margin: 6px 0 10px;
}

/* 底栏在线人数角标 */
.nav-badge {
  position: absolute; top: 1px; right: 50%; transform: translateX(21px);
  min-width: 15px; height: 15px; padding: 0 4px;
  border-radius: 8px; background: #c25b52; color: #fff;
  font-size: 9px; font-style: normal; font-weight: 500; line-height: 15px;
  text-align: center; letter-spacing: 0;
  box-shadow: 0 0 0 2px #0b0f12;
  font-variant-numeric: tabular-nums;
}

/* 在线道友条 */
#chatFolks { margin: 2px 0 8px; }
#chatFolks .folks-hd {
  display: flex; align-items: baseline; justify-content: space-between; gap: 8px;
  font-size: 10px; color: #6f7c78; letter-spacing: .04em; margin-bottom: 6px;
}
#chatFolks .folks-hd .mine { color: #5d6a66; flex: 0 0 auto; }
#chatFolks .folks-hd .mine::before { content: '◈ '; color: #4e5b57; }
#chatFolks .folks-hd b { color: #9fd6bd; font-weight: 500; }
#chatFolks .folks { display: flex; flex-wrap: wrap; gap: 6px; }
#chatFolks .folk {
  display: inline-flex; align-items: baseline; gap: 4px;
  max-width: 100%; padding: 4px 9px;
  border: 1px solid rgba(255, 255, 255, .1); border-radius: 20px;
  background: rgba(255, 255, 255, .03);
  color: #cfd8d4; font-family: var(--serif); font-size: 11px;
  cursor: pointer; transition: border-color .2s, background .2s, color .2s;
}
#chatFolks .folk i {
  font-style: normal; font-size: 9px; color: #6f7c78; letter-spacing: 0;
}
#chatFolks .folk:hover { border-color: rgba(78, 207, 160, .4); color: #e2f2ea; }
#chatFolks .folk.me {
  border-color: rgba(78, 207, 160, .42);
  background: rgba(78, 207, 160, .12); color: #d9f4e7;
}

/* 传音里的 IP 属地 */
.chat-item .who .loc {
  color: #5f7a72; margin-left: 6px;
  border-left: 1px solid rgba(255, 255, 255, .09); padding-left: 6px;
  font-size: 9.5px; letter-spacing: .02em;
}
.chat-item.me .who .loc { color: #6f9b8a; }

/* 调息中：按钮呼吸高亮 + 底部小字 */
.btn-sub .plus {
  position: absolute; left: 0; right: 0; bottom: 7px;
  font-size: 9px; letter-spacing: .02em; text-indent: 0;
  color: #7fa6bd; font-family: -apple-system, sans-serif;
}
.btn-sub.on {
  border-color: rgba(122, 198, 228, .58);
  color: #e8f7ff;
  background: linear-gradient(180deg, #1b2f3a 0%, #0d1a20 100%);
  animation: restBreath 2.6s ease-in-out infinite;
}
.btn-sub.on .plus { color: #8fb8cc; }
@keyframes restBreath {
  0%, 100% { box-shadow: 0 0 0 rgba(122, 198, 228, 0); }
  50% { box-shadow: 0 0 15px rgba(122, 198, 228, .3); }
}

/* 调息按钮：主文案略上移，给底部小字留位 */
.btn-sub.on { padding-bottom: 10px; }
.btn-sub .plus { bottom: 8px; }

/* ═══════════════════════════════════════════════════════════
   首页 · 开场
   ═══════════════════════════════════════════════════════════ */
.landing {
  position: fixed; inset: 0; z-index: 100;
  overflow: hidden;
  background: #03070a;
  transition: opacity .75s ease, transform .75s ease, filter .75s ease;
}
.landing.hide { display: none; }
.landing.leaving {
  opacity: 0;
  transform: scale(1.1);
  filter: blur(10px);
  pointer-events: none;
}

/* 天光 */
.ld-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 86% 46% at 50% 6%, rgba(48, 104, 94, .50), rgba(3, 7, 10, 0) 64%),
    radial-gradient(ellipse 60% 34% at 50% 54%, rgba(30, 74, 72, .28), rgba(3, 7, 10, 0) 72%),
    radial-gradient(ellipse 90% 40% at 50% 100%, rgba(20, 46, 48, .70), rgba(3, 7, 10, 0) 70%),
    linear-gradient(180deg, #04080b 0%, #061013 46%, #03080a 100%);
}

/* 月光柱 */
.ld-rays {
  position: absolute; left: 50%; top: 6vh;
  width: 980px; height: 820px;
  margin-left: -490px; margin-top: 34px;
  z-index: 1;
  background: repeating-conic-gradient(from 0deg at 50% 0%,
      rgba(198, 238, 220, 0) 0deg,
      rgba(198, 238, 220, .042) 2deg,
      rgba(198, 238, 220, 0) 12deg);
  -webkit-mask-image: radial-gradient(circle at 50% 0%, rgba(0, 0, 0, .9) 0%, rgba(0, 0, 0, .42) 26%, transparent 56%);
  mask-image: radial-gradient(circle at 50% 0%, rgba(0, 0, 0, .9) 0%, rgba(0, 0, 0, .42) 26%, transparent 56%);
  pointer-events: none;
  animation: ldRays 13s ease-in-out infinite;
}
@keyframes ldRays {
  0%, 100% { opacity: .62; transform: scale(1) rotate(0deg); }
  50% { opacity: 1; transform: scale(1.04) rotate(1.5deg); }
}

/* 星点 */
.ld-stars { position: absolute; inset: 0; }
.ld-stars i {
  position: absolute; display: block; border-radius: 50%;
  background: #d8ecdf;
  animation: ldTwinkle 4s ease-in-out infinite;
}
@keyframes ldTwinkle {
  0%, 100% { opacity: .18; transform: scale(.8); }
  50% { opacity: .9; transform: scale(1.15); }
}

/* 月轮 */
.ld-moon {
  position: absolute; left: 50%; top: 6vh;
  width: 92px; height: 92px; margin-left: -46px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 34%, #eeeada 0%, #d2cfb9 42%, #9aa392 70%, #6a756d 100%);
  box-shadow:
    0 0 48px 12px rgba(200, 226, 208, .16),
    0 0 130px 52px rgba(116, 178, 164, .11),
    inset -11px -8px 22px rgba(28, 48, 46, .5);
  animation: ldMoon 10s ease-in-out infinite;
}
@keyframes ldMoon {
  0%, 100% { transform: translateY(0); opacity: .9; }
  50% { transform: translateY(-8px); opacity: 1; }
}

/* 山峦 */
.ld-hill { position: absolute; left: 0; right: 0; bottom: 0; }
.ld-hill svg { display: block; width: 100%; height: 100%; }
.ld-hill svg path {
  stroke: rgba(174, 222, 207, .13); stroke-width: 1; vector-effect: non-scaling-stroke;
}
.ld-hill svg { filter: drop-shadow(0 -1px 5px rgba(150, 220, 200, .22)); }
.ld-hill.far { height: 38vh; }
.ld-hill.mid { height: 25vh; }
.ld-hill.near { height: 15vh; }
.ld-hill.near svg path { stroke: rgba(174, 222, 207, .07); }
.ld-hill.near svg {
  -webkit-mask-image: linear-gradient(180deg, #000 52%, rgba(0, 0, 0, .45) 100%);
  mask-image: linear-gradient(180deg, #000 52%, rgba(0, 0, 0, .45) 100%);
}

/* 云海 */
.ld-cloud {
  position: absolute; left: -25%; right: -25%; height: 120px;
  filter: blur(14px);
  pointer-events: none;
}
.ld-cloud.c1 {
  bottom: 28vh;
  background:
    radial-gradient(ellipse 30% 54% at 22% 56%, rgba(198, 228, 216, .21), rgba(198, 228, 216, 0) 72%),
    radial-gradient(ellipse 24% 46% at 52% 44%, rgba(188, 222, 210, .16), rgba(188, 222, 210, 0) 72%),
    radial-gradient(ellipse 26% 44% at 82% 62%, rgba(178, 216, 202, .14), rgba(178, 216, 202, 0) 72%);
  animation: ldDrift 38s ease-in-out infinite alternate;
}
.ld-cloud.c2 {
  bottom: 12vh; height: 140px;
  background:
    radial-gradient(ellipse 32% 56% at 16% 52%, rgba(206, 234, 222, .19), rgba(206, 234, 222, 0) 72%),
    radial-gradient(ellipse 26% 48% at 58% 62%, rgba(194, 228, 214, .15), rgba(194, 228, 214, 0) 72%),
    radial-gradient(ellipse 30% 44% at 88% 44%, rgba(184, 220, 206, .13), rgba(184, 220, 206, 0) 72%);
  animation: ldDrift 26s ease-in-out infinite alternate-reverse;
}
@keyframes ldDrift {
  from { transform: translateX(-6%); }
  to { transform: translateX(6%); }
}

/* 飞剑光轨 */
.ld-blade {
  position: absolute; z-index: 3;
  width: 160px; height: 1.6px; border-radius: 2px;
  background: linear-gradient(90deg, rgba(180, 250, 225, 0) 0%, rgba(206, 255, 238, .85) 62%, #ffffff 100%);
  filter: drop-shadow(0 0 7px rgba(150, 244, 214, .95));
  opacity: 0;
  transform-origin: right center;
}
.ld-blade.b1 { left: 66%; top: 72%; animation: ldBlade 8s linear infinite; }
.ld-blade.b2 { left: 92%; top: 56%; animation: ldBlade 11s linear 3.6s infinite; }
.ld-blade.b3 { left: 44%; top: 88%; animation: ldBlade 9.5s linear 6.4s infinite; }
@keyframes ldBlade {
  0% { opacity: 0; transform: translate(0, 0) rotate(-26deg) scaleX(.3); }
  10% { opacity: 1; }
  68% { opacity: 1; }
  100% { opacity: 0; transform: translate(-118vw, -58vh) rotate(-26deg) scaleX(1); }
}

/* 光尘 */
.ld-motes { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.ld-motes i {
  position: absolute; display: block; border-radius: 50%;
  background: rgba(204, 246, 228, .95);
  box-shadow: 0 0 6px 1px rgba(160, 232, 210, .55);
  animation: ldMote linear infinite;
}
@keyframes ldMote {
  0% { transform: translateY(0) scale(.55); opacity: 0; }
  14% { opacity: .85; }
  82% { opacity: .55; }
  100% { transform: translateY(-78vh) scale(1.05); opacity: 0; }
}

/* 底部压暗 */
.ld-veil {
  position: absolute; left: 0; right: 0; bottom: 0; height: 20vh; z-index: 4;
  background: linear-gradient(180deg, rgba(3, 7, 10, 0) 0%, rgba(3, 7, 10, .30) 62%, rgba(3, 7, 10, .58) 100%);
  pointer-events: none;
}

/* ── 核心文案 ─────────────────────────────────── */
.ld-core {
  position: relative; z-index: 6;
  height: 100%;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 0 24px 10vh;
  text-align: center;
}
.ld-top {
  font-family: var(--serif);
  font-size: 10px; letter-spacing: .46em; text-indent: .46em;
  color: #6f8b84;
  margin-bottom: 26px;
  animation: ldUp 1.2s cubic-bezier(.2, .7, .3, 1) both;
}
.ld-title {
  writing-mode: vertical-rl; text-orientation: upright;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(42px, 13vw, 62px);
  font-weight: 500;
  letter-spacing: .16em;
  line-height: 1.05;
  background: linear-gradient(180deg, #fbf7e6 0%, #e2d6ab 42%, #b8a878 78%, #8e8258 100%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  animation: ldUp 1.1s cubic-bezier(.2, .7, .3, 1) .12s both, ldGlow 6s ease-in-out 1.4s infinite;
}
@keyframes ldGlow {
  0%, 100% { filter: drop-shadow(0 0 16px rgba(202, 232, 208, .28)); }
  50% { filter: drop-shadow(0 0 36px rgba(214, 244, 218, .52)); }
}
@keyframes ldUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}

.ld-seal {
  margin-top: 16px;
  padding: 9px 7px;
  writing-mode: vertical-rl;
  border: 1px solid rgba(201, 82, 74, .62);
  border-radius: 3px;
  background: rgba(160, 50, 44, .12);
  color: #d96d61;
  font-family: var(--serif);
  font-size: 12px; letter-spacing: .26em;
  box-shadow: 0 0 18px -6px rgba(201, 82, 74, .5);
  animation: ldUp 1s cubic-bezier(.2, .7, .3, 1) .34s both;
}

.ld-sub {
  margin-top: 26px;
  font-family: var(--serif);
  font-size: 12px; letter-spacing: .42em; text-indent: .42em;
  color: #93a8a1;
  animation: ldUp 1s cubic-bezier(.2, .7, .3, 1) .46s both;
}

.ld-go {
  position: relative;
  margin-top: 38px;
  padding: 14px 44px;
  border-radius: 999px;
  border: 1px solid rgba(207, 168, 90, .58);
  background: linear-gradient(180deg, rgba(207, 168, 90, .18), rgba(207, 168, 90, .04));
  color: #f4e8cd;
  font-family: var(--serif);
  font-size: 15px; letter-spacing: .4em; text-indent: .4em;
  cursor: pointer;
  overflow: visible;
  animation: ldUp 1s cubic-bezier(.2, .7, .3, 1) .58s both, ldPulse 3.6s ease-in-out 1.6s infinite;
  transition: border-color .25s, color .25s, transform .1s;
}
.ld-go:active { transform: scale(.97); color: #fff8e6; border-color: rgba(226, 190, 112, .95); }
@keyframes ldPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(207, 168, 90, .34), 0 16px 44px -20px rgba(0, 0, 0, .95); }
  55% { box-shadow: 0 0 0 14px rgba(207, 168, 90, 0), 0 16px 44px -20px rgba(0, 0, 0, .95); }
}

.ld-note {
  margin-top: 18px;
  font-size: 10.5px; letter-spacing: .12em;
  color: #617a74;
  min-height: 14px;
  animation: ldUp 1s cubic-bezier(.2, .7, .3, 1) .7s both;
}

@media (max-height: 720px) {
  .ld-top { margin-bottom: 14px; font-size: 9px; letter-spacing: .34em; text-indent: .34em; }
  .ld-title { font-size: clamp(32px, 9vw, 42px); }
  .ld-seal { margin-top: 12px; padding: 7px 5px; font-size: 11px; }
  .ld-sub { margin-top: 16px; font-size: 11px; letter-spacing: .34em; text-indent: .34em; }
  .ld-go { margin-top: 22px; padding: 12px 34px; font-size: 14px; }
  .ld-note { margin-top: 12px; font-size: 10px; }
  .ld-moon { width: 72px; height: 72px; margin-left: -36px; top: 4vh; }
  .ld-rays { margin-top: 24px; }
  .ld-hill.far { height: 30vh; }
  .ld-hill.mid { height: 20vh; }
  .ld-hill.near { height: 12vh; }
  .ld-cloud.c1 { bottom: 21vh; height: 96px; }
  .ld-cloud.c2 { bottom: 8vh; height: 96px; }
  .ld-veil { height: 18vh; }
}

/* 开局面板浮现 */
.gate-box { animation: fade .5s ease both; }

/* 首页期间锁住背景滚动 */
body.lk { overflow: hidden; }

/* ── 页脚 · 联系作者 ─────────────────────────────── */
.foot {
  margin: 26px 0 6px;
  display: flex; flex-direction: column; align-items: center; gap: 7px;
}
.foot-link {
  background: none; border: none; cursor: pointer;
  color: var(--dim2); font-family: inherit;
  font-size: 11px; letter-spacing: .34em; text-indent: .34em;
  padding: 8px 14px; border-radius: 99px;
  border: 1px solid rgba(255, 255, 255, .06);
  transition: color .2s, border-color .2s, background .2s;
}
.foot-link:hover, .foot-link:active {
  color: var(--jade);
  border-color: rgba(78, 207, 160, .32);
  background: rgba(78, 207, 160, .05);
}
.foot-meta { font-size: 9.5px; color: #47514e; letter-spacing: .12em; }

/* 联系作者弹层 */
.au-p {
  font-size: 11.5px; color: var(--dim); line-height: 1.85;
  margin: 0 0 12px;
}
.au-wx {
  display: flex; align-items: center; gap: 10px;
  background: rgba(78, 207, 160, .06);
  border: 1px solid rgba(78, 207, 160, .18);
  border-radius: 10px; padding: 9px 12px; margin-bottom: 12px;
  font-size: 11.5px; color: var(--dim);
}
.au-wx b {
  flex: 1; color: var(--jade); font-weight: 500;
  letter-spacing: .06em; user-select: all; word-break: break-all;
}
.au-input {
  width: 100%; min-height: 108px; resize: vertical;
  background: rgba(255, 255, 255, .04);
  border: 1px solid var(--line); border-radius: 10px;
  padding: 11px 13px; color: var(--ink);
  font-family: inherit; font-size: 13px; line-height: 1.7;
  letter-spacing: .04em; outline: none;
}
.au-input:focus { border-color: rgba(78, 207, 160, .42); }
.au-input::placeholder { color: #4a5451; }
.au-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 10px; gap: 12px;
}
.au-cnt { font-size: 10.5px; color: var(--dim2); font-variant-numeric: tabular-nums; }
.au-done { padding: 14px 4px 4px; }
.au-ok {
  text-align: center; color: var(--jade); font-size: 15px;
  letter-spacing: .3em; text-indent: .3em; margin-bottom: 12px;
  text-shadow: 0 0 18px rgba(78, 207, 160, .45);
}

/* ── 传道于友 ───────────────────────────────────── */
.foot-row { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.sh-url {
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(78, 207, 160, .22);
  border-radius: 10px;
  padding: 12px 13px;
  margin-bottom: 12px;
  color: var(--jade);
  font-size: 12.5px; line-height: 1.75;
  letter-spacing: .01em;
  word-break: break-all; user-select: all;
}
.au-p strong { color: var(--jade); font-weight: 500; }

.sh-alt {
  margin-top: 16px; padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, .07);
}
.sh-alt-hd { font-size: 10.5px; color: var(--dim2); letter-spacing: .12em; margin-bottom: 7px; }
.sh-alt-url {
  font-size: 11px; line-height: 1.6; color: #7d8b86;
  word-break: break-all; user-select: all;
  background: rgba(255, 255, 255, .02);
  border-radius: 8px; padding: 8px 10px;
  margin-bottom: 9px;
}
.sh-alt-btns { display: flex; gap: 8px; flex-wrap: wrap; }
