/* =============================================================================
   漫画修仙 UI
   参照暴走英雄坛的视觉语言：宣纸底色、粗墨描边、贴纸式圆角卡片、
   标题用宋体加描边、数值用等宽防跳动。手机优先，桌面居中成竖屏。
   ============================================================================= */

:root {
  --ink: #2b2723;
  --ink-soft: rgba(43, 39, 35, .55);
  --paper: #f7f1e3;
  --paper-2: #fffaf0;
  --card: #fffdf6;
  --line: 3px;
  --radius: 18px;
  --qi: #4a9d7c;
  --zhu: #2f8f6b;
  --gold: #c9a24a;
  --red: #d0563f;
  --blue: #4b7fa8;
  --shadow: 0 4px 0 rgba(43, 39, 35, .18);
  --font: -apple-system, "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --serif: "Songti SC", "STSong", "SimSun", "Noto Serif CJK SC", var(--font);
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", "Roboto Mono", monospace;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
  background-image:
    radial-gradient(circle at 12% 8%, rgba(201, 162, 74, .10), transparent 42%),
    radial-gradient(circle at 88% 92%, rgba(74, 157, 124, .10), transparent 46%),
    repeating-linear-gradient(45deg, rgba(43, 39, 35, .018) 0 3px, transparent 3px 7px);
  overscroll-behavior: none;
  font-size: 15px;
  line-height: 1.5;
}

/* -----------------------------------------------------------------------------
   竖屏容器：手机上占满，桌面上限 480px 居中（联机手游常见做法）
----------------------------------------------------------------------------- */
#app { max-width: 480px; margin: 0 auto; min-height: 100dvh; display: flex; flex-direction: column; position: relative; }

/* ===== 顶栏 ===== */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px;
  background: var(--card);
  border-bottom: var(--line) solid var(--ink);
}
.topbar .who { display: flex; align-items: center; gap: 8px; min-width: 0; }
.topbar .name { font-weight: 800; font-size: 15px; letter-spacing: .5px; }
.topbar .realm-tag {
  font-family: var(--serif); font-weight: 700; font-size: 12px;
  padding: 2px 8px; border: 2px solid var(--ink); border-radius: 999px;
  background: #e9f4ee; white-space: nowrap;
}
.topbar .uid {
  font-family: var(--mono); font-size: 11px; color: var(--ink-soft);
  border: 2px dashed var(--ink-soft); border-radius: 8px; padding: 1px 6px; cursor: pointer;
}
.topbar .uid:active { background: #f0e7d2; }
.topbar .spacer { flex: 1; }
.sync {
  font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px;
  border: 2px solid var(--ink); background: #dff0e6; white-space: nowrap;
}
.sync.saving { background: #fdf0cd; }
.sync.error  { background: #f8d9d2; }

/* ===== 主区 ===== */
main { flex: 1; overflow-y: auto; padding: 12px 12px 92px; }
.panel { display: none; }
.panel.on { display: block; animation: fadeUp .22s ease; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ===== 卡片 ===== */
.card {
  background: var(--card);
  border: var(--line) solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 12px;
  margin-bottom: 12px;
}
.card h3 {
  margin: 0 0 10px; font-family: var(--serif); font-size: 16px; font-weight: 800;
  display: flex; align-items: center; gap: 8px; letter-spacing: 1px;
}
.card h3 .hint { margin-left: auto; font-family: var(--font); font-size: 11px; font-weight: 600; color: var(--ink-soft); letter-spacing: 0; }

/* ===== 洞府 ===== */
.cave { position: relative; border-radius: var(--radius); overflow: hidden; border: var(--line) solid var(--ink); box-shadow: var(--shadow); background: #f5efdf; }
.cave .scene, .cave .scene-slot { display: block; width: 100%; }
.cave .scene { display: block; width: 100%; height: auto; }
.cave .fig-slot { position: absolute; left: 50%; bottom: 13%; transform: translateX(-50%); width: 44%; max-width: 190px; cursor: pointer; }
.cave .fig { display: block; width: 100%; height: auto; }
.cave .tap { position: absolute; left: 50%; bottom: 6%; transform: translateX(-50%); font-size: 11px; font-weight: 700; color: var(--ink-soft); background: rgba(255, 253, 246, .8); border: 2px solid var(--ink); border-radius: 999px; padding: 2px 10px; pointer-events: none; }
/* 洞府角标：取代 SVG 匾额（小人会挡住 svg 文字，穿帮成耳后伸木板） */
.cave .cave-tag {
  position: absolute; left: 10px; top: 10px;
  font-family: var(--serif); font-weight: 800; font-size: 13px; letter-spacing: 3px;
  color: var(--ink); background: rgba(217, 201, 163, .88);
  border: 2px solid var(--ink); border-radius: 8px; padding: 2px 9px; pointer-events: none;
}

.halo { animation: haloPulse 3.4s ease-in-out infinite; transform-origin: center; }
@keyframes haloPulse { 0%,100% { opacity: .55; } 50% { opacity: 1; } }
.breathe { animation: breathe 3.6s ease-in-out infinite; transform-origin: 100px 190px; }
@keyframes breathe { 0%,100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-2.5px) scale(1.012); } }
.fig-break .breathe { animation: shake .5s linear infinite; }
@keyframes shake { 0%,100%{transform:translate(0,0)} 25%{transform:translate(-2px,1px)} 75%{transform:translate(2px,-1px)} }
.swirl path { stroke-dasharray: 6 8; animation: dash 1.2s linear infinite; }
@keyframes dash { to { stroke-dashoffset: -28; } }
.cloud.c1 { animation: drift 26s linear infinite; }
.cloud.c2 { animation: drift 34s linear infinite; animation-delay: -12s; }
@keyframes drift { from { transform: translateX(-40px); } to { transform: translateX(760px); } }
.steam path { stroke-dasharray: 4 6; animation: dash 2.4s linear infinite reverse; }

/* 灵气粒子 */
.motes { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.motes i { position: absolute; bottom: 12%; border-radius: 50%; animation: rise linear infinite; box-shadow: 0 0 6px currentColor; }
@keyframes rise { 0% { transform: translateY(0) scale(.6); opacity: 0; } 15% { opacity: .9; } 100% { transform: translateY(-180px) scale(1.1); opacity: 0; } }

/* 飘字 */
.floaters { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.float {
  position: absolute; font-weight: 900; font-size: 15px; color: var(--qi);
  text-shadow: -1px -1px 0 #fff, 1px -1px 0 #fff, -1px 1px 0 #fff, 1px 1px 0 #fff;
  animation: floatUp 1.1s ease-out forwards; white-space: nowrap;
}
.float.crit { color: var(--red); font-size: 18px; }
@keyframes floatUp { from { transform: translate(-50%, 0); opacity: 1; } to { transform: translate(-50%, -58px); opacity: 0; } }

/* ===== 修为条 ===== */
.exp-block { margin-top: 12px; }
.exp-head { display: flex; align-items: baseline; gap: 8px; font-size: 12px; font-weight: 700; color: var(--ink-soft); }
.exp-head .val { margin-left: auto; font-family: var(--mono); font-size: 13px; color: var(--ink); }
.bar {
  position: relative; height: 22px; margin-top: 6px;
  border: var(--line) solid var(--ink); border-radius: 999px;
  background: #efe6d2; overflow: hidden;
}
.bar > i {
  position: absolute; inset: 0 auto 0 0; width: 0%;
  background: linear-gradient(90deg, #7ec8a5, #4a9d7c);
  transition: width .4s cubic-bezier(.2,.8,.3,1);
}
.bar > i::after { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(115deg, rgba(255,255,255,.28) 0 8px, transparent 8px 16px); }
.bar > span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 800; letter-spacing: .5px; }
.bar.full > i { background: linear-gradient(90deg, #f0cd77, #c9a24a); }

/* ===== 数据网格 ===== */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(88px, 1fr)); gap: 8px; }
.stat {
  background: #fbf6ea; border: 2px solid var(--ink); border-radius: 12px; padding: 7px 8px; text-align: center;
}
.stat b { display: block; font-size: 11px; color: var(--ink-soft); font-weight: 700; }
.stat em { display: block; font-family: var(--mono); font-size: 17px; font-style: normal; font-weight: 800; }
.stat.power em { color: var(--red); }
.stat.rate em { color: var(--qi); }

/* ===== 按钮 ===== */
button {
  font: inherit; font-weight: 800; color: var(--ink); cursor: pointer;
  background: var(--paper-2); border: var(--line) solid var(--ink); border-radius: 14px;
  padding: 9px 14px; box-shadow: var(--shadow); transition: transform .08s, box-shadow .08s, filter .12s;
}
button:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 0 0 rgba(0,0,0,0); }
button:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
button.primary { background: linear-gradient(#8fd6b3, #57ab86); }
button.gold { background: linear-gradient(#f5d98c, #dcbb5f); }
button.danger { background: linear-gradient(#f0a895, #d4674e); color: #fff; }
button.ghost { background: transparent; box-shadow: none; border-style: dashed; border-width: 2px; padding: 6px 10px; font-size: 12px; }
button.big { width: 100%; padding: 13px; font-size: 16px; letter-spacing: 2px; font-family: var(--serif); }
button.mini { padding: 4px 9px; font-size: 12px; border-radius: 10px; border-width: 2px; box-shadow: 0 2px 0 rgba(43,39,35,.18); }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }

/* 突破就绪时呼吸发光 */
.ready-glow { animation: readyPulse 1.6s ease-in-out infinite; }
@keyframes readyPulse {
  0%,100% { box-shadow: 0 4px 0 rgba(43,39,35,.18), 0 0 0 0 rgba(201,162,74,0); }
  50% { box-shadow: 0 4px 0 rgba(43,39,35,.18), 0 0 0 8px rgba(201,162,74,.22); }
}

/* ===== 属性/加点 ===== */
.attr-line { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-bottom: 2px dashed rgba(43,39,35,.14); }
.attr-line:last-child { border-bottom: 0; }
.attr-line .label { width: 46px; font-weight: 800; font-family: var(--serif); }
.attr-line .num { font-family: var(--mono); font-weight: 800; width: 52px; text-align: right; }
.attr-line .desc { font-size: 11px; color: var(--ink-soft); flex: 1; }
.points-note { font-size: 12px; color: var(--red); font-weight: 800; }

/* ===== 排行榜 ===== */
.tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 10px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex: 0 0 auto; font-size: 13px; font-weight: 800; padding: 6px 12px;
  border: 2px solid var(--ink); border-radius: 999px; background: var(--paper-2); box-shadow: none;
}
.tab.on { background: var(--ink); color: var(--paper); }
.tab .lock { font-size: 11px; opacity: .7; }

.rank-list { display: flex; flex-direction: column; gap: 6px; }
.rank-row {
  display: flex; align-items: center; gap: 9px; padding: 7px 9px;
  background: #fbf6ea; border: 2px solid var(--ink); border-radius: 12px;
}
.rank-row.me { background: #e7f4ec; border-color: var(--qi); box-shadow: 0 0 0 2px rgba(74,157,124,.25); }
.rank-no { font-family: var(--mono); font-weight: 800; width: 26px; text-align: center; font-size: 14px; }
.rank-no.top1 { color: #b8860b; } .rank-no.top2 { color: #8a8a8a; } .rank-no.top3 { color: #a8623a; }
.rank-id { flex: 1; min-width: 0; }
.rank-id .n { font-weight: 800; font-size: 14px; }
.rank-id .r { font-size: 11px; color: var(--ink-soft); font-family: var(--serif); }
.rank-val { font-family: var(--mono); font-weight: 800; text-align: right; }
.rank-val small { display: block; font-size: 10px; color: var(--ink-soft); font-family: var(--font); }

.locked-board { text-align: center; padding: 26px 16px; }
.locked-board .padlock { font-size: 38px; }
.locked-board h4 { font-family: var(--serif); margin: 8px 0 4px; font-size: 17px; }
.locked-board p { margin: 0; font-size: 12px; color: var(--ink-soft); }
.soon { display: inline-block; font-size: 11px; font-weight: 800; color: var(--gold); border: 2px solid var(--gold); border-radius: 999px; padding: 1px 8px; }

/* ===== 世界频道 ===== */
.chat { display: flex; flex-direction: column; height: calc(100dvh - 220px); min-height: 320px; }
.chat-log { flex: 1; overflow-y: auto; padding-right: 4px; display: flex; flex-direction: column; gap: 8px; }
.msg { display: flex; gap: 7px; align-items: flex-start; }
.msg .avatar { flex: 0 0 auto; border: 2px solid var(--ink); border-radius: 10px; background: var(--paper-2); }
.msg .body { flex: 1; min-width: 0; }
.msg .meta { font-size: 11px; color: var(--ink-soft); font-weight: 700; display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; }
.msg .meta .r { font-family: var(--serif); color: var(--qi); }
.msg .txt {
  margin-top: 2px; background: var(--paper-2); border: 2px solid var(--ink); border-radius: 4px 12px 12px 12px;
  padding: 6px 9px; font-size: 14px; word-break: break-word; user-select: text;
}
.msg.me .txt { background: #e7f4ec; }
.msg.sys .txt { background: #fdf3d9; border-style: dashed; font-size: 12px; color: #8a6d2f; }
.msg.time-jump { text-align: center; font-size: 11px; color: var(--ink-soft); }
.chat-input { display: flex; gap: 8px; margin-top: 10px; }
.chat-input input {
  flex: 1; min-width: 0; font: inherit; padding: 9px 12px;
  border: var(--line) solid var(--ink); border-radius: 14px; background: var(--paper-2);
}
.chat-input input:focus { outline: none; box-shadow: 0 0 0 3px rgba(74,157,124,.3); }
.chat-note { font-size: 11px; color: var(--ink-soft); margin-top: 6px; }

/* ===== 道友 / 切磋 ===== */
.person { display: flex; align-items: center; gap: 9px; padding: 8px; background: #fbf6ea; border: 2px solid var(--ink); border-radius: 12px; margin-bottom: 8px; }
.person .avatar { border: 2px solid var(--ink); border-radius: 10px; background: var(--paper-2); flex: 0 0 auto; }
.person .info { flex: 1; min-width: 0; }
.person .info .n { font-weight: 800; }
.person .info .d { font-size: 11px; color: var(--ink-soft); font-family: var(--serif); }
.person .acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; max-width: 40%; }
.empty { text-align: center; color: var(--ink-soft); font-size: 13px; padding: 20px 8px; }
.empty .big-emoji { font-size: 34px; display: block; margin-bottom: 6px; }

/* ===== 切磋弹窗 ===== */
.dialog { position: fixed; inset: 0; z-index: 60; display: none; }
.dialog.on { display: block; }
.dialog .veil { position: absolute; inset: 0; background: rgba(43,39,35,.55); animation: fade .2s; }
@keyframes fade { from { opacity: 0 } to { opacity: 1 } }
.dialog .sheet {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%);
  width: min(460px, 94vw); max-height: 88dvh; overflow-y: auto;
  background: var(--card); border: var(--line) solid var(--ink); border-radius: 20px; box-shadow: 0 8px 0 rgba(43,39,35,.3);
  padding: 12px;
}
.stage { position: relative; height: 190px; border: 2px solid var(--ink); border-radius: 16px; overflow: hidden; background: linear-gradient(#eef4ee, #f5efdf); }
.stage .ground { position: absolute; left: 0; right: 0; bottom: 0; height: 34px; background: #dcd0b6; border-top: 2px solid var(--ink); }
.stage .duel-slot { position: absolute; bottom: 22px; width: 33%; }
.stage .duel-slot.left { left: 4%; }
.stage .duel-slot.right { right: 4%; transform: scaleX(-1); }
.stage .duel-slot svg { display: block; width: 100%; height: auto; }
.stage .vs { position: absolute; left: 50%; top: 12%; transform: translateX(-50%); font-family: var(--serif); font-weight: 900; font-size: 22px; color: var(--red); text-shadow: -2px -2px 0 #fff, 2px 2px 0 #fff; }
.hpbar { position: absolute; top: 8px; width: 40%; height: 14px; border: 2px solid var(--ink); border-radius: 999px; background: #efe6d2; overflow: hidden; }
.hpbar.l { left: 8px; } .hpbar.r { right: 8px; }
.hpbar > i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(#e58a72, #cf5340); transition: width .25s; }
.hpbar.r > i { left: auto; right: 0; }
.hpbar span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 800; font-family: var(--mono); }
/* 出手/受击：右方角色由 .duel-slot.right 整体 scaleX(-1)，
   所以同一个 +X 动画在两侧视觉上都是"朝对手冲/被击退"，无需再写 flip 版本。 */
.duel-fig.cast { animation: lunge .34s ease; }
@keyframes lunge { 0%{transform:translateX(0)} 40%{transform:translateX(16px)} 100%{transform:translateX(0)} }
.duel-fig.hurt { animation: hurt .3s ease; }
@keyframes hurt { 0%,100%{transform:translate(0,0)} 30%{transform:translate(-9px,3px)} 60%{transform:translate(5px,-2px)} }

.duel-log { margin-top: 10px; max-height: 168px; overflow-y: auto; font-size: 13px; display: flex; flex-direction: column; gap: 4px; }
.duel-log p { margin: 0; padding: 4px 8px; border-radius: 8px; background: #fbf6ea; border-left: 3px solid var(--ink-soft); }
.duel-log p.crit { border-left-color: var(--red); background: #fdefe9; font-weight: 700; }
.duel-log p.dodge { border-left-color: var(--blue); }
.duel-log p.stun { border-left-color: var(--gold); }
.duel-log p.end { border-left-color: var(--qi); background: #e7f4ec; font-weight: 800; }
.duel-log p.sys { color: var(--ink-soft); font-size: 12px; }

/* ===== 底部导航 ===== */
nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 30;
  max-width: 480px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: var(--card); border-top: var(--line) solid var(--ink);
  padding: 4px 4px calc(4px + env(safe-area-inset-bottom));
}
nav button { border: 0; background: transparent; box-shadow: none; padding: 7px 2px; font-size: 12px; font-weight: 700; color: var(--ink-soft); display: flex; flex-direction: column; align-items: center; gap: 2px; border-radius: 12px; }
nav button .ico { font-size: 19px; line-height: 1; }
nav button.on { color: var(--ink); background: #e9f4ee; }
nav button.on .ico { transform: translateY(-1px); }
nav .dot { position: absolute; margin-left: 20px; margin-top: -2px; width: 8px; height: 8px; border-radius: 50%; background: var(--red); border: 1.5px solid var(--card); }

/* ===== 突破特效 ===== */
.breakfx { position: fixed; inset: 0; z-index: 80; display: none; pointer-events: none; align-items: center; justify-content: center; }
.breakfx.on { display: flex; }
.fx-ring {
  position: absolute; left: 50%; top: 50%; width: 40px; height: 40px; margin: -20px 0 0 -20px;
  border: 6px solid var(--gold); border-radius: 50%;
  animation: fxRing 1.7s cubic-bezier(.2,.7,.3,1) forwards;
}
@keyframes fxRing {
  0%   { transform: scale(.3); opacity: 1; border-width: 14px; }
  60%  { opacity: .85; }
  100% { transform: scale(14); opacity: 0; border-width: 1px; }
}
.fx-word {
  position: relative; font-family: var(--serif); font-weight: 900; font-size: 44px; letter-spacing: 6px;
  color: #fff; text-align: center;
  text-shadow: -3px -3px 0 var(--ink), 3px -3px 0 var(--ink), -3px 3px 0 var(--ink), 3px 3px 0 var(--ink), 0 0 26px var(--gold);
  animation: fxWord 1.7s ease forwards;
}
@keyframes fxWord {
  0%   { transform: scale(.4) translateY(14px); opacity: 0; }
  22%  { transform: scale(1.12); opacity: 1; }
  70%  { transform: scale(1); opacity: 1; }
  100% { transform: scale(1.04); opacity: 0; }
}

/* ===== Toast ===== */
#toasts { position: fixed; left: 50%; top: 14px; transform: translateX(-50%); z-index: 90; display: flex; flex-direction: column; gap: 8px; width: min(420px, 92vw); pointer-events: none; }
.toast {
  background: var(--ink); color: var(--paper); font-size: 13px; font-weight: 700;
  border-radius: 12px; padding: 9px 13px; box-shadow: 0 4px 0 rgba(43,39,35,.25);
  animation: toastIn .22s ease, toastOut .3s ease 2.5s forwards;
}
.toast.ok { background: #2f7d5e; }
.toast.warn { background: #a8761d; }
.toast.bad { background: #a83f2c; }
@keyframes toastIn { from { transform: translateY(-14px); opacity: 0 } }
@keyframes toastOut { to { transform: translateY(-10px); opacity: 0 } }

/* ===== 登录页 ===== */
.boot { min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 22px; text-align: center; }
.boot .logo { font-family: var(--serif); font-size: 34px; font-weight: 900; letter-spacing: 6px; }
.boot .sub { font-size: 12px; color: var(--ink-soft); letter-spacing: 2px; margin-top: -8px; }
.cave .scene-slot { display: block; }
.cave .scene-slot svg { display: block; width: 100%; height: auto; }
.boot .fig-wrap { width: 200px; }
.boot .fig-wrap .fig, .cave .fig-slot .fig { display: block; width: 100%; height: auto; }
.boot input { font: inherit; font-size: 18px; text-align: center; padding: 11px; width: 100%; border: var(--line) solid var(--ink); border-radius: 14px; background: var(--paper-2); }
.boot input:focus { outline: none; box-shadow: 0 0 0 3px rgba(74,157,124,.32); }
.boot .tip { font-size: 12px; color: var(--ink-soft); line-height: 1.7; max-width: 330px; }

/* ===== 认证卡片（登录/注册/找回密码三态） ===== */
.auth-card { width: min(360px, 92vw); display: flex; flex-direction: column; gap: 10px; }
.auth-tabs { display: flex; gap: 6px; }
.atab {
  flex: 1; font-size: 13px; font-weight: 800; padding: 7px 4px;
  border: 2px solid var(--ink); border-radius: 12px; background: var(--paper-2); box-shadow: none;
}
.atab.on { background: var(--ink); color: var(--paper); }
.aform { display: flex; flex-direction: column; gap: 9px; }
.fld {
  font: inherit; font-size: 15px; padding: 11px 13px; width: 100%;
  border: var(--line) solid var(--ink); border-radius: 14px; background: var(--paper-2); color: var(--ink);
}
.fld:focus { outline: none; box-shadow: 0 0 0 3px rgba(74,157,124,.32); }
.fld.num { font-family: var(--mono); letter-spacing: 4px; text-align: center; }
.code-row { display: flex; gap: 8px; }
.code-row .fld { flex: 1; }
.devcode {
  font-size: 13px; font-weight: 800; color: #8a6d2f; background: #fdf3d9;
  border: 2px dashed var(--gold); border-radius: 10px; padding: 7px 10px; text-align: center;
}

/* ===== 更新 / 安装条 ===== */
.updbar {
  position: fixed; left: 50%; bottom: 74px; transform: translateX(-50%); z-index: 70;
  max-width: 440px; width: calc(100vw - 28px);
  display: flex; align-items: center; gap: 10px;
  background: var(--card); border: var(--line) solid var(--ink); border-radius: 14px;
  padding: 8px 12px; box-shadow: var(--shadow); font-size: 13px; font-weight: 700;
}
.updbar span { flex: 1; }

/* ===== 通用 ===== */
.muted { color: var(--ink-soft); font-size: 12px; }
.num { font-family: var(--mono); font-weight: 800; }
.sep { height: 2px; background: repeating-linear-gradient(90deg, var(--ink-soft) 0 6px, transparent 6px 12px); margin: 10px 0; opacity: .5; }
.hidden { display: none !important; }
.tag { font-size: 11px; font-weight: 800; border: 2px solid var(--ink); border-radius: 999px; padding: 1px 7px; background: var(--paper-2); }
.tag.qi { background: #e9f4ee; } .tag.zhu { background: #dff0e6; }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb { background: rgba(43,39,35,.25); border-radius: 3px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001s !important; animation-iteration-count: 1 !important; transition-duration: .001s !important; }
}
