/* ============================================================
   暴躁老哥 PRO · 设计系统
   思路：墨黑是夜，火种是你心里那口没咽下去的气。
   汉字即界面：宋体管结构（Tab/头像/印章），楷体管人情（金句/功德）。
   ============================================================ */

/* ---------- 0. Tokens ---------- */
:root {
  --ink-0: #0A0908;
  --ink-1: #121110;
  --ink-2: #1A1816;
  --ink-3: #242019;
  --line: rgba(242, 237, 228, .07);
  --line-strong: rgba(242, 237, 228, .14);

  --paper: #F2EDE4;
  --paper-2: #A89F92;
  /* #6E675C 在墨黑上只有 3.37:1，达不到 WCAG AA；提到 #8A8276 = 4.97:1，层次仍在 */
  --paper-3: #8A8276;
  --paper-4: #6E675C;            /* 纯装饰性文字（大字号水印/刻度）才用这个 */

  --ember: #FF6A3D;
  --ember-hi: #FF8A5C;
  --ember-lo: #E84E1F;
  --ember-glow: rgba(255, 106, 61, .30);
  --ember-soft: rgba(255, 106, 61, .12);

  --seal: #C2402E;            /* 朱砂印泥红，只给印章和撕页 */
  --sand: #D8B98A;            /* 受气包 */
  --rose: #E08A8A;            /* 闺蜜 */
  --ash:  #908A80;            /* 傻逼 */

  --font-ui: -apple-system, "PingFang SC", "HarmonyOS Sans SC", "MiSans",
             "Microsoft YaHei UI", "Microsoft YaHei", system-ui, sans-serif;
  --font-song: "Songti SC", "STSong", "Noto Serif CJK SC", "Noto Serif SC", "SimSun", serif;
  --font-kai: "Kaiti SC", "STKaiti", "KaiTi", "FangSong", "Noto Serif SC", serif;

  --ease: cubic-bezier(.22, .82, .26, 1);
  --tab-h: calc(60px + env(safe-area-inset-bottom, 0px));
  --sat: env(safe-area-inset-top, 0px);
}

/* ---------- 1. Reset ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; overscroll-behavior: none; }
body {
  background: #070606;
  color: var(--paper);
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.6;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button, input, textarea { font: inherit; color: inherit; background: none; border: none; outline: none; }
button { cursor: pointer; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; touch-action: manipulation; }
[hidden] { display: none !important; }
::selection { background: var(--ember-soft); }

::-webkit-scrollbar { width: 0; height: 0; }

/* ---------- 2. 设备壳 + 纸纹 ---------- */
#app {
  position: relative;
  height: 100dvh;
  max-width: 430px;
  margin: 0 auto;
  background: var(--ink-1);
  overflow: hidden;
}
@media (min-width: 560px) {
  #app { border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
}
/* 纸纹噪点：让黑色有"墨"的肌理，不是手机贴膜的黑 */
#app::after {
  content: "";
  position: absolute; inset: 0;
  pointer-events: none;
  z-index: 90;
  opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
}
/* 顶部一盏暖光，像台灯照着 */
.lamp::before {
  content: "";
  position: absolute; inset: 0;
  pointer-events: none;
  background: radial-gradient(420px 260px at 18% -8%, rgba(255, 106, 61, .055), transparent 70%);
}

/* ---------- 3. 屏幕系统 ---------- */
.screen {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  background: var(--ink-1);
  z-index: 1;
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s var(--ease), transform .32s var(--ease);
}
.screen.tab.active { opacity: 1; pointer-events: auto; }
.screen.push {
  z-index: 20;
  transform: translateX(100%);
  opacity: 1;
}
.screen.push.active { transform: translateX(0); pointer-events: auto; }
.scroll {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(var(--tab-h) + 16px);
}
.push .scroll { padding-bottom: 24px; }

/* ---------- 4. 大标题头 ---------- */
.bighead { padding: calc(var(--sat) + 26px) 22px 14px; }
.bighead .eyebrow {
  font-size: 11px; letter-spacing: .32em; color: var(--paper-3);
  text-transform: uppercase; margin-bottom: 8px;
}
.bighead h1 {
  font-family: var(--font-song);
  font-size: 32px; font-weight: 700;
  letter-spacing: .06em; line-height: 1.2;
}
.bighead .dailyline {
  margin-top: 8px;
  font-family: var(--font-kai);
  font-size: 13.5px; color: var(--paper-3);
  letter-spacing: .05em;
}
.bighead .headrow { display: flex; align-items: flex-end; justify-content: space-between; }

/* 右上角 + */
.addbtn {
  width: 38px; height: 38px; border-radius: 12px;
  border: 1px solid rgba(242, 237, 228, .2);
  background: var(--ink-2);
  color: var(--paper);
  display: grid; place-items: center;
  font-size: 20px; line-height: 1;
  transition: all .2s var(--ease);
}
.addbtn:active { transform: scale(.92); background: var(--ink-2); }

/* ---------- 5. 底部 Tab：汉字即图标 ---------- */
#tabbar {
  position: absolute; left: 0; right: 0; bottom: 0;
  height: var(--tab-h);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  display: flex;
  z-index: 30;
  background: rgba(10, 9, 8, .86);
  backdrop-filter: blur(22px) saturate(1.2);
  -webkit-backdrop-filter: blur(22px) saturate(1.2);
  border-top: 1px solid var(--line);
  transition: transform .3s var(--ease), opacity .2s;
}
#tabbar.hidden-bar { transform: translateY(110%); opacity: 0; pointer-events: none; }
.tab-item {
  flex: 1;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 3px;
  color: #8B8377;
  position: relative;
}
.tab-item .tab-glyph {
  font-family: var(--font-song);
  font-size: 21px; font-weight: 700;
  letter-spacing: 0;
  transition: color .25s, transform .25s var(--ease), text-shadow .25s;
}
.tab-item .tab-dot {
  width: 4px; height: 4px; border-radius: 50%;
  background: transparent;
  transition: all .25s;
}
.tab-item.active .tab-glyph {
  color: var(--paper);
  transform: translateY(-1px);
  text-shadow: 0 0 18px var(--ember-glow);
}
.tab-item.active .tab-dot { background: var(--ember); box-shadow: 0 0 8px var(--ember-glow); }
.tab-item:active .tab-glyph { transform: scale(.88); }
.tab-item .tab-badge {
  position: absolute; top: 7px; right: calc(50% - 18px);
  min-width: 8px; height: 8px; border-radius: 5px;
  background: var(--ember);
  box-shadow: 0 0 8px var(--ember-glow);
}

/* ---------- 6. 通用列表行（聊天列表 / 工具 / 游戏） ---------- */
.rows { padding: 4px 14px; }
.row {
  display: flex; align-items: center; gap: 14px;
  padding: 13px 10px;
  border-radius: 16px;
  position: relative;
  transition: background .15s;
}
.row:active { background: var(--ink-2); }
.row + .row::before {
  content: ""; position: absolute; top: 0; left: 68px; right: 10px;
  height: 1px; background: var(--line);
}
.row:active::before, .row:active + .row::before { opacity: 0; }

.glyphbox {
  width: 46px; height: 46px; flex: none;
  border-radius: 14px;
  display: grid; place-items: center;
  font-family: var(--font-song);
  font-size: 21px; font-weight: 700;
  background: var(--ink-2);
  border: 1px solid var(--line);
  color: #D9D0C2;
  position: relative;
  overflow: hidden;
}
.glyphbox.tone-ember { color: #FFE3D6; background: linear-gradient(145deg, #3A1F12, #241310); border-color: rgba(255, 106, 61, .25); }
.glyphbox.tone-sand  { color: #F2E2C4; background: linear-gradient(145deg, #332A19, #211B11); border-color: rgba(216, 185, 138, .22); }
.glyphbox.tone-rose  { color: #F7DCDC; background: linear-gradient(145deg, #38201F, #221312); border-color: rgba(224, 138, 138, .22); }
.glyphbox.tone-ash   { color: #DDD8CF; background: linear-gradient(145deg, #28251f, #1B1916); border-color: var(--line-strong); }
.glyphbox img { width: 100%; height: 100%; object-fit: cover; }

.row-main { flex: 1; min-width: 0; }
.row-title { font-size: 16px; font-weight: 600; letter-spacing: .02em; display: flex; align-items: center; gap: 8px; }
.row-sub {
  font-size: 12.5px; color: var(--paper-3);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-top: 2px;
}
.row-side { flex: none; text-align: right; color: var(--paper-3); font-size: 11px; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.row-chev { color: var(--paper-3); font-size: 17px; flex: none; font-family: var(--font-ui); }
.dot-unread {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--ember);
  box-shadow: 0 0 10px var(--ember-glow);
}
.list-footer {
  text-align: center;
  font-family: var(--font-kai);
  font-size: 12px; color: var(--paper-3);
  padding: 26px 20px 10px;
  letter-spacing: .08em;
  opacity: .8;
}

/* ---------- 7. 小头（push 页顶栏） ---------- */
.smallhead {
  padding-top: var(--sat);
  min-height: calc(var(--sat) + 52px);
  display: flex; align-items: center;
  padding-left: 6px; padding-right: 12px;
  border-bottom: 1px solid var(--line);
  background: rgba(18, 17, 16, .88);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  position: relative; z-index: 5;
  flex: none;
}
.backbtn {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  color: var(--paper-2);
  font-size: 22px;
}
.backbtn:active { transform: scale(.88); }
.smallhead .sh-center { flex: 1; text-align: center; min-width: 0; }
.smallhead .sh-title {
  font-size: 16.5px; font-weight: 600; letter-spacing: .04em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.smallhead .sh-sub { font-size: 10.5px; color: var(--paper-3); letter-spacing: .14em; margin-top: 1px; }
.smallhead .sh-right { width: 44px; height: 44px; display: grid; place-items: center; color: var(--paper-2); font-size: 18px; }

/* ---------- 8. 聊天 ---------- */
#chat-body {
  flex: 1; overflow-y: auto;
  padding: 18px 16px 12px;
  display: flex; flex-direction: column; gap: 10px;
  overscroll-behavior: contain;
}
.msg { display: flex; gap: 10px; max-width: 86%; animation: msg-in .3s var(--ease) both; }
@keyframes msg-in { from { opacity: 0; transform: translateY(8px) scale(.97); } to { opacity: 1; transform: none; } }
.msg .m-ava {
  width: 34px; height: 34px; flex: none; border-radius: 11px;
  font-size: 15px;
}
.msg .m-bubble {
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 15.5px;
  line-height: 1.65;
  word-break: break-word;
  white-space: pre-wrap;
}
.msg.bot { align-self: flex-start; }
.msg.bot .m-bubble {
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-top-left-radius: 6px;
  color: var(--paper);
}
.msg.user { align-self: flex-end; flex-direction: row-reverse; }
.msg.user .m-bubble {
  background: linear-gradient(135deg, rgba(255, 106, 61, .16), rgba(255, 106, 61, .08));
  border: 1px solid rgba(255, 106, 61, .22);
  border-top-right-radius: 6px;
  color: #FBE9DE;
}

/* 输入中…… */
.typing {
  display: inline-flex; gap: 5px; align-items: center;
  padding: 13px 16px;
}
.typing i {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--paper-3);
  animation: ty 1.1s ease-in-out infinite;
}
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes ty { 0%, 60%, 100% { transform: none; opacity: .4; } 30% { transform: translateY(-4px); opacity: 1; } }

/* 金句破格：聊天里的章节题词 */
.msg-quote {
  align-self: center;
  text-align: center;
  margin: 14px 0 6px;
  padding: 0 24px;
  animation: quote-in .8s var(--ease) both;
}
@keyframes quote-in { from { opacity: 0; transform: translateY(10px); letter-spacing: .3em; } to { opacity: 1; transform: none; letter-spacing: .14em; } }
.msg-quote .q-text {
  font-family: var(--font-kai);
  font-size: 17px;
  letter-spacing: .14em;
  color: #EBE2D3;
  line-height: 1.9;
}
.msg-quote .q-rule {
  width: 28px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--ember), transparent);
  margin: 9px auto 0;
  opacity: .7;
}

/* 时间戳 */
.msg-time {
  align-self: center;
  font-size: 10.5px; color: var(--paper-3);
  letter-spacing: .18em;
  margin: 6px 0 0;
}

/* 记仇卡片 */
.grudge-card {
  align-self: flex-start;
  margin-left: 44px;
  display: flex; align-items: center; gap: 12px;
  background: var(--ink-2);
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  padding: 11px 16px 11px 12px;
  animation: msg-in .3s var(--ease) both;
}
.grudge-card:active { background: var(--ink-3); }
.grudge-seal {
  width: 34px; height: 34px;
  border: 1.5px solid var(--seal);
  border-radius: 7px;
  color: var(--seal);
  font-family: var(--font-song);
  font-weight: 700; font-size: 19px;
  display: grid; place-items: center;
  transform: rotate(-5deg);
  animation: stamp .45s cubic-bezier(.34, 1.56, .64, 1) both;
}
@keyframes stamp { 0% { transform: rotate(-5deg) scale(2.2); opacity: 0; } 60% { opacity: 1; } 100% { transform: rotate(-5deg) scale(1); opacity: 1; } }
.grudge-card .g-title { font-size: 13.5px; font-weight: 600; }
.grudge-card .g-sub { font-size: 11.5px; color: var(--paper-3); margin-top: 1px; }

/* 输入栏 */
#chat-composer {
  flex: none;
  display: flex; gap: 10px; align-items: flex-end;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line);
  background: rgba(14, 13, 12, .9);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
#chat-input {
  flex: 1;
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 21px;
  padding: 9px 16px;
  font-size: 15.5px;
  line-height: 1.5;
  color: var(--paper);
  max-height: 96px;
  resize: none;
}
#chat-input::placeholder { color: var(--paper-3); }
#chat-send {
  width: 42px; height: 42px; flex: none;
  border-radius: 50%;
  font-family: var(--font-song);
  font-size: 17px; font-weight: 700;
  color: var(--paper-3);
  background: var(--ink-2);
  border: 1px solid var(--line);
  transition: all .25s var(--ease);
}
#chat-send.ready {
  color: #2A1009;
  background: linear-gradient(145deg, var(--ember-hi), var(--ember-lo));
  border-color: transparent;
  box-shadow: 0 4px 18px var(--ember-glow);
}
#chat-send:active { transform: scale(.88); }

/* ---------- 9. 全屏工具页（sheet） ---------- */
.sheet {
  position: absolute; inset: 0;
  z-index: 40;
  background: var(--ink-0);
  display: flex; flex-direction: column;
  transform: translateY(100%);
  transition: transform .36s var(--ease);
}
.sheet.active { transform: none; }
.sheet-body {
  flex: 1; position: relative; overflow: hidden;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 20px;
}

/* 通用按钮 */
.btn {
  border-radius: 999px;
  padding: 13px 30px;
  font-size: 15px; font-weight: 600;
  letter-spacing: .1em;
  transition: transform .15s var(--ease), opacity .2s;
}
.btn:active { transform: scale(.94); }
.btn-primary {
  color: #2A1009;
  background: linear-gradient(145deg, var(--ember-hi), var(--ember-lo));
  box-shadow: 0 6px 24px var(--ember-glow);
}
.btn-ghost {
  color: var(--paper-2);
  border: 1px solid var(--line-strong);
}
.btn-text { color: var(--paper-3); font-size: 13px; letter-spacing: .12em; padding: 10px 16px; }

/* ---------- 10. 憋住不笑 ---------- */
#joke-card-wrap { width: 100%; max-width: 330px; perspective: 800px; }
.joke-card {
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 34px 28px 30px;
  min-height: 220px;
  display: flex; flex-direction: column; justify-content: center;
  animation: card-in .4s var(--ease) both;
  position: relative;
}
@keyframes card-in { from { opacity: 0; transform: translateX(40px) rotate(2deg); } to { opacity: 1; transform: none; } }
.joke-card.out { animation: card-out .3s var(--ease) both; }
@keyframes card-out { to { opacity: 0; transform: translateX(-50px) rotate(-3deg); } }
.joke-idx {
  position: absolute; top: 18px; left: 28px;
  font-size: 10.5px; letter-spacing: .3em; color: var(--paper-3);
}
.joke-snow {
  position: absolute; top: 14px; right: 20px;
  font-family: var(--font-song); font-size: 15px; color: var(--paper-3);
  opacity: .6;
}
.joke-text { font-size: 16.5px; line-height: 2; color: var(--paper); }
#joke-react {
  text-align: center; height: 24px; margin-top: 16px;
  font-family: var(--font-kai); font-size: 13.5px; color: var(--ember);
  letter-spacing: .1em;
  transition: opacity .3s;
}
.joke-btns { display: flex; gap: 14px; margin-top: 14px; justify-content: center; }

/* ---------- 11. 深呼吸 ---------- */
#breath-stage { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 34px; }
#breath-circle {
  width: 170px; height: 170px;
  border-radius: 50%;
  border: 1px solid rgba(255, 106, 61, .5);
  background: radial-gradient(circle at 50% 45%, rgba(255, 106, 61, .14), rgba(255, 106, 61, .03) 65%, transparent);
  box-shadow: 0 0 60px rgba(255, 106, 61, .12), inset 0 0 40px rgba(255, 106, 61, .06);
  display: grid; place-items: center;
  transform: scale(.8);
}
#breath-circle .bc-num {
  font-family: var(--font-song);
  font-size: 56px; font-weight: 700;
  color: var(--paper);
  font-variant-numeric: tabular-nums;
}
#breath-phase {
  font-size: 13px; letter-spacing: .5em; color: var(--paper-2);
  text-indent: .5em;
  font-family: var(--font-kai);
}
#breath-rounds { display: flex; gap: 10px; }
#breath-rounds i { width: 5px; height: 5px; border-radius: 50%; background: var(--ink-3); border: 1px solid var(--line-strong); }
#breath-rounds i.on { background: var(--ember); border-color: transparent; box-shadow: 0 0 8px var(--ember-glow); }
#breath-intro { display: flex; flex-direction: column; align-items: center; gap: 18px; }
#breath-intro .bi-line { font-family: var(--font-kai); font-size: 15px; color: var(--paper-2); letter-spacing: .2em; margin-bottom: 10px; }
#ha-flood { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
#ha-flood span {
  position: absolute;
  font-family: var(--font-kai);
  color: var(--paper);
  animation: ha-pop .5s var(--ease) both;
}
@keyframes ha-pop { from { opacity: 0; transform: scale(.3) rotate(-10deg); } to { transform: none; } }
#breath-flash {
  position: absolute; left: 0; right: 0; top: 44%;
  text-align: center;
  font-family: var(--font-kai);
  font-size: 30px; letter-spacing: .2em;
  color: var(--ember);
  text-shadow: 0 0 30px var(--ember-glow);
  animation: flash-bounce .5s ease-in-out infinite alternate;
}
@keyframes flash-bounce { from { transform: scale(.96); } to { transform: scale(1.06); } }

/* ---------- 12. 抽根签 ---------- */
#qian-stage { display: flex; flex-direction: column; align-items: center; gap: 26px; width: 100%; }
#qian-tube-wrap { position: relative; height: 240px; display: grid; place-items: end center; }
#qian-tube {
  width: 120px; height: 170px;
  border-radius: 14px 14px 26px 26px;
  background: linear-gradient(160deg, #2E2418, #1C1610 70%);
  border: 1px solid rgba(216, 185, 138, .25);
  position: relative;
  box-shadow: inset 0 -14px 30px rgba(0, 0, 0, .5), 0 14px 30px rgba(0, 0, 0, .4);
}
#qian-tube::after {
  content: "签";
  position: absolute; left: 50%; top: 52%; transform: translateX(-50%);
  font-family: var(--font-song); font-weight: 700;
  font-size: 30px; color: rgba(216, 185, 138, .8);
  writing-mode: vertical-rl;
  letter-spacing: .3em;
}
#qian-tube::before {
  content: ""; position: absolute; left: 8px; right: 8px; top: 10px; height: 1px;
  background: rgba(216, 185, 138, .25);
}
.qstick {
  position: absolute; bottom: 150px; left: 50%;
  width: 9px; height: 86px;
  border-radius: 5px 5px 3px 3px;
  background: linear-gradient(180deg, #E8CDA0, #B6905C);
  box-shadow: 0 2px 6px rgba(0,0,0,.4);
  transform-origin: bottom center;
}
.qstick:nth-child(1) { transform: translateX(-26px) rotate(-9deg); }
.qstick:nth-child(2) { transform: translateX(-9px) rotate(-2deg); height: 92px; }
.qstick:nth-child(3) { transform: translateX(7px) rotate(4deg); }
.qstick:nth-child(4) { transform: translateX(22px) rotate(10deg); height: 80px; }
#qian-tube-wrap.shaking { animation: tube-shake .14s linear infinite; }
@keyframes tube-shake {
  0% { transform: rotate(-3deg) translateX(-2px); }
  50% { transform: rotate(3deg) translateX(2px); }
  100% { transform: rotate(-3deg) translateX(-2px); }
}
#qian-hint { font-family: var(--font-kai); font-size: 13.5px; color: var(--paper-3); letter-spacing: .2em; }

/* 签纸 */
#qian-paper {
  width: min(330px, 88%);
  background: linear-gradient(170deg, #1E1A14, #171310);
  border: 1px solid rgba(216, 185, 138, .22);
  border-radius: 8px;
  padding: 26px 22px;
  display: flex; gap: 18px;
  justify-content: center;
  animation: paper-in .6s var(--ease) both;
  position: relative;
}
@keyframes paper-in { from { opacity: 0; transform: translateY(30px) rotateX(18deg); } to { opacity: 1; transform: none; } }
#qian-paper .qp-cols {
  display: flex; flex-direction: row-reverse; gap: 16px;
  justify-content: center;
  min-height: 200px;
}
#qian-paper .qp-lv {
  writing-mode: vertical-rl;
  font-family: var(--font-song); font-weight: 700;
  font-size: 17px; letter-spacing: .5em;
  color: var(--seal);
  border: 1.5px solid var(--seal);
  border-radius: 6px;
  padding: 12px 5px;
  height: fit-content;
  transform: rotate(-2deg);
  animation: stamp .5s cubic-bezier(.34, 1.56, .64, 1) .25s both;
}
#qian-paper .qp-poem {
  writing-mode: vertical-rl;
  font-family: var(--font-song);
  font-size: 19px; letter-spacing: .42em;
  color: var(--paper);
  line-height: 2.1;
}
#qian-paper .qp-name {
  writing-mode: vertical-rl;
  font-family: var(--font-kai);
  font-size: 13px; color: var(--sand);
  letter-spacing: .3em;
  opacity: .85;
}
#qian-jie {
  width: min(330px, 88%);
  display: flex; gap: 12px; align-items: flex-start;
  animation: msg-in .5s var(--ease) .35s both;
}
#qian-jie .qj-mark {
  flex: none;
  width: 26px; height: 26px; border-radius: 50%;
  border: 1px solid var(--line-strong);
  color: var(--paper-2);
  font-family: var(--font-song); font-size: 13px;
  display: grid; place-items: center;
  margin-top: 2px;
}
#qian-jie .qj-text { font-size: 14px; color: var(--paper-2); line-height: 1.9; }

/* ---------- 13. 电子情绪烟 ---------- */
#smoke-stage { position: absolute; inset: 0; overflow: hidden; touch-action: none; }
#smoke-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
#smoke-line {
  position: absolute; left: 0; right: 0; top: calc(var(--sat) + 76px);
  text-align: center;
  font-family: var(--font-kai);
  font-size: 15px; letter-spacing: .18em;
  color: var(--paper-2);
  transition: opacity .5s;
  padding: 0 30px;
}
#smoke-line.flash { color: var(--ember); font-size: 22px; animation: flash-bounce .4s ease-in-out infinite alternate; }
#smoke-hint {
  position: absolute; left: 0; right: 0; bottom: 110px;
  text-align: center;
  font-size: 12px; letter-spacing: .26em; color: var(--paper-3);
}
#smoke-done {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  background: rgba(10, 9, 8, .82);
  backdrop-filter: blur(8px);
  animation: msg-in .5s var(--ease) both;
}
#smoke-done .sd-1 { font-family: var(--font-kai); font-size: 19px; letter-spacing: .24em; color: var(--paper); }
#smoke-done .sd-2 { font-family: var(--font-song); font-size: 40px; font-weight: 700; color: var(--ember); letter-spacing: .2em; text-shadow: 0 0 40px var(--ember-glow); }

/* ---------- 14. 做善事 ---------- */
#tea-stage { display: flex; flex-direction: column; align-items: center; gap: 20px; width: 100%; }
#tea-cup { position: relative; }
#tea-count { font-size: 11px; letter-spacing: .3em; color: var(--paper-3); }
.tea-prices { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; padding: 0 14px; }
.tea-chip {
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  color: var(--paper-2);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  transition: all .2s;
}
.tea-chip.on {
  border-color: var(--ember);
  color: var(--ember);
  background: var(--ember-soft);
}
#tea-qr {
  width: 150px; height: 150px;
  border-radius: 14px;
  background: #14110E;
  border: 1px solid var(--line-strong);
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  padding: 12px;
  gap: 3px;
  position: relative;
  animation: msg-in .4s var(--ease) both;
}
#tea-qr i { background: #3A332B; border-radius: 1.5px; }
#tea-qr i.b { background: #D9D0C2; }
#tea-qr .qr-center {
  position: absolute; inset: 0; display: grid; place-items: center;
}
#tea-qr .qr-center span {
  width: 44px; height: 44px;
  background: var(--ink-0);
  border: 1.5px solid var(--seal);
  border-radius: 8px;
  color: var(--seal);
  font-family: var(--font-song); font-weight: 700; font-size: 24px;
  display: grid; place-items: center;
}
#tea-thanks { min-height: 50px; text-align: center; font-family: var(--font-kai); font-size: 15px; color: var(--paper-2); letter-spacing: .1em; line-height: 2; }
.tea-note { font-size: 11px; color: var(--paper-3); letter-spacing: .14em; }

/* 茶杯蒸汽 */
.steam path { animation: steam-rise 2.8s ease-in-out infinite; }
.steam .st2 { animation-delay: .9s; }
.steam .st3 { animation-delay: 1.8s; }
@keyframes steam-rise {
  0% { opacity: 0; transform: translateY(7px); }
  35% { opacity: 1; }
  100% { opacity: 0; transform: translateY(-9px); }
}

/* ---------- 15. 爽 · 游戏 ---------- */
#game-frame-wrap { flex: 1; background: #000; position: relative; }
#game-frame { width: 100%; height: 100%; border: 0; display: block; background: #000; }
#game-loading {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  color: var(--paper-3);
  font-size: 12px; letter-spacing: .3em;
  background: var(--ink-0);
  transition: opacity .4s;
}

/* 自研游戏画布 */
.game-canvas-wrap { flex: 1; position: relative; overflow: hidden; touch-action: none; }
.game-canvas-wrap canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.game-hud-top {
  position: absolute; top: 12px; left: 0; right: 0;
  display: flex; justify-content: center; gap: 8px;
  flex-wrap: wrap;
  padding: 0 16px;
  z-index: 3;
}
.who-chip {
  padding: 7px 15px;
  border-radius: 999px;
  font-size: 13px;
  color: var(--paper-2);
  border: 1px solid var(--line-strong);
  background: rgba(18, 17, 16, .7);
  backdrop-filter: blur(8px);
  transition: all .2s;
}
.who-chip.on { color: var(--ember); border-color: var(--ember); background: var(--ember-soft); }
.game-center-tip {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px;
  z-index: 4;
  background: rgba(10, 9, 8, .66);
  backdrop-filter: blur(6px);
  text-align: center;
  padding: 30px;
}
.game-center-tip .gt-line { font-family: var(--font-kai); font-size: 17px; letter-spacing: .12em; color: var(--paper); line-height: 2; white-space: pre-line; }
#punch-combo {
  position: absolute; top: 18%; left: 0; right: 0;
  text-align: center;
  pointer-events: none;
  z-index: 2;
}
#punch-combo .pc-num {
  font-family: var(--font-song);
  font-size: 64px; font-weight: 700;
  color: var(--paper);
  text-shadow: 0 0 30px var(--ember-glow);
  line-height: 1;
}
#punch-combo .pc-label { font-size: 11px; letter-spacing: .5em; color: var(--paper-3); text-indent: .5em; }
#punch-mile {
  position: absolute; top: 34%; left: 0; right: 0;
  text-align: center;
  font-family: var(--font-kai);
  font-size: 19px; color: var(--ember); letter-spacing: .2em;
  pointer-events: none; z-index: 2;
  text-shadow: 0 0 24px var(--ember-glow);
}
#coax-timer {
  position: absolute; top: 0; left: 0; height: 3px;
  background: linear-gradient(90deg, var(--ember-lo), var(--ember-hi));
  box-shadow: 0 0 12px var(--ember-glow);
  z-index: 3;
  transition: width .1s linear;
}

/* ---------- 16. 记 ---------- */
.seg {
  margin: 4px 20px 12px;
  display: flex;
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px;
  position: relative;
}
.seg button {
  flex: 1;
  padding: 8px 0;
  border-radius: 999px;
  font-size: 13.5px;
  color: var(--paper-3);
  letter-spacing: .1em;
  position: relative; z-index: 1;
  transition: color .25s;
}
.seg button.on { color: var(--paper); }
.seg .seg-thumb {
  position: absolute; top: 3px; bottom: 3px; left: 3px;
  width: calc(50% - 3px);
  border-radius: 999px;
  background: var(--ink-3);
  border: 1px solid var(--line-strong);
  transition: transform .28s var(--ease);
}
.seg.right .seg-thumb { transform: translateX(100%); }

.ji-section { padding: 0 20px; }
.compose-card {
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
  margin-bottom: 14px;
}
#diary-input {
  width: 100%;
  min-height: 64px;
  font-size: 15px; line-height: 1.8;
  color: var(--paper);
  resize: none;
}
#diary-input::placeholder { color: var(--paper-3); }
.compose-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; }
.mood-row { display: flex; gap: 6px; }
.mood-chip {
  width: 38px; height: 38px;
  border-radius: 12px;
  border: 1px solid transparent;
  color: var(--paper-3);
  font-family: var(--font-song);
  font-size: 16px; font-weight: 700;
  display: grid; place-items: center;
  transition: all .2s;
}
.mood-chip.on {
  color: var(--ember);
  border-color: rgba(255, 106, 61, .4);
  background: var(--ember-soft);
  transform: translateY(-2px);
}
#diary-save {
  padding: 9px 22px;
  border-radius: 999px;
  font-size: 13.5px; font-weight: 600; letter-spacing: .14em;
  color: var(--paper-3);
  border: 1px solid var(--line-strong);
  transition: all .25s var(--ease);
}
#diary-save.ready {
  color: #2A1009;
  background: linear-gradient(145deg, var(--ember-hi), var(--ember-lo));
  border-color: transparent;
  box-shadow: 0 4px 18px var(--ember-glow);
}

.entry-card {
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 15px 17px;
  margin-bottom: 10px;
  animation: msg-in .3s var(--ease) both;
}
.entry-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 7px; }
.entry-date { font-size: 10.5px; letter-spacing: .24em; color: var(--paper-3); font-variant-numeric: tabular-nums; }
.entry-mood {
  font-family: var(--font-song); font-weight: 700;
  font-size: 14px; color: var(--sand);
  opacity: .9;
}
.entry-text { font-size: 14.5px; line-height: 1.85; color: #DDD5C8; white-space: pre-wrap; word-break: break-word; }
.fold-btn {
  display: block; margin: 4px auto 8px;
  font-size: 12px; letter-spacing: .2em; color: var(--paper-3);
  padding: 9px 20px;
}
.empty-tip {
  text-align: center;
  font-family: var(--font-kai);
  font-size: 13.5px; color: var(--paper-3);
  line-height: 2.2;
  padding: 28px 0 16px;
  white-space: pre-line;
  letter-spacing: .08em;
}

/* 小本本（记仇） */
.grudge-entry {
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 15px 17px;
  margin-bottom: 10px;
  transition: transform .5s var(--ease), opacity .5s;
}
.grudge-entry.tearing {
  transform: translateX(60%) rotate(8deg) scale(.9);
  opacity: 0;
}
.ge-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 6px; }
.ge-name { font-family: var(--font-song); font-size: 17px; font-weight: 700; letter-spacing: .06em; }
.ge-fire { display: flex; gap: 3px; align-items: center; }
.ge-fire i {
  width: 5px; height: 5px;
  background: var(--ink-3); border: 1px solid var(--line-strong);
  border-radius: 1px;
  transform: rotate(45deg);
}
.ge-fire i.on { background: var(--ember); border-color: transparent; box-shadow: 0 0 6px var(--ember-glow); }
.ge-date { margin-left: auto; font-size: 10.5px; letter-spacing: .18em; color: var(--paper-3); }
.ge-event { font-size: 14px; line-height: 1.8; color: #CFC7BA; }
.ge-foot { display: flex; justify-content: flex-end; margin-top: 8px; }
.ge-tear { font-size: 12px; letter-spacing: .16em; color: var(--seal); padding: 6px 10px; opacity: .85; }

/* 木鱼 */
#muyu-section {
  margin-top: 26px;
  padding: 26px 20px calc(var(--tab-h) + 30px);
  border-top: 1px solid var(--line);
  display: flex; flex-direction: column; align-items: center;
  position: relative;
}
.muyu-label { font-size: 10.5px; letter-spacing: .42em; color: var(--paper-3); text-indent: .42em; }
#muyu-count {
  font-family: var(--font-song);
  font-size: 44px; font-weight: 700;
  margin: 4px 0 2px;
  font-variant-numeric: tabular-nums;
  letter-spacing: .04em;
}
.muyu-sub { font-family: var(--font-kai); font-size: 12.5px; color: var(--paper-3); letter-spacing: .12em; margin-bottom: 18px; }
#muyu-hit {
  position: relative;
  width: 168px; height: 148px;
  display: grid; place-items: center;
  -webkit-user-select: none; user-select: none;
}
#muyu-svg { transition: transform .12s var(--ease); transform-origin: 50% 70%; }
#muyu-hit.knock #muyu-svg { transform: scale(.95) translateY(2px); }
/* 木槌：抬起来，再敲下去 */
#muyu-stick { transform-box: fill-box; transform-origin: 86% 14%; }
#muyu-hit.knock #muyu-stick { animation: stick-hit .2s var(--ease); }
@keyframes stick-hit {
  0% { transform: rotate(0deg); }
  38% { transform: rotate(-17deg); }
  72% { transform: rotate(6deg); }
  100% { transform: rotate(0deg); }
}
.muyu-ring {
  position: absolute; left: 50%; top: 56%;
  width: 30px; height: 30px;
  border: 1.5px solid var(--ember);
  border-radius: 50%;
  pointer-events: none;
  animation: ring-out .7s var(--ease) both;
}
@keyframes ring-out {
  from { transform: translate(-50%, -50%) scale(.6); opacity: .9; }
  to { transform: translate(-50%, -50%) scale(4.2); opacity: 0; }
}
.merit-float {
  position: absolute; left: 50%; top: 8%;
  transform: translateX(-50%);
  font-family: var(--font-kai);
  font-size: 15.5px;
  color: var(--ember);
  letter-spacing: .12em;
  white-space: nowrap;
  pointer-events: none;
  animation: merit-up 1.1s var(--ease) both;
  text-shadow: 0 0 16px var(--ember-glow);
}
@keyframes merit-up {
  0% { opacity: 0; transform: translate(-50%, 14px) ; }
  20% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -52px); }
}
#muyu-mile {
  margin-top: 14px;
  text-align: center;
  font-family: var(--font-kai);
  font-size: 13.5px; color: var(--sand);
  letter-spacing: .1em;
  min-height: 22px;
  transition: opacity .6s;
  line-height: 1.9;
}

/* ---------- 17. 我 ---------- */
.me-card {
  margin: 6px 20px 18px;
  padding: 20px;
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 22px;
  display: flex; align-items: center; gap: 16px;
  position: relative;
  overflow: hidden;
}
.me-card::before {
  content: "";
  position: absolute; right: -30px; top: -30px;
  width: 130px; height: 130px;
  background: radial-gradient(circle, var(--ember-soft), transparent 70%);
  pointer-events: none;
}
.me-ava {
  width: 64px; height: 64px;
  border-radius: 20px;
  font-size: 28px;
  flex: none;
}
.me-name { font-family: var(--font-song); font-size: 22px; font-weight: 700; letter-spacing: .04em; }
.me-sign { font-size: 12.5px; color: var(--paper-3); margin-top: 3px; font-family: var(--font-kai); letter-spacing: .04em; }

.group { margin: 0 20px 16px; background: var(--ink-2); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.g-row {
  width: 100%;
  display: flex; align-items: center;
  padding: 14px 17px;
  gap: 12px;
  text-align: left;
  position: relative;
}
.g-row:active { background: var(--ink-3); }
.g-row + .g-row::before {
  content: ""; position: absolute; top: 0; left: 17px; right: 0; height: 1px;
  background: var(--line);
}
.g-label { font-size: 15px; flex: none; }
.g-value {
  flex: 1; text-align: right;
  font-size: 14px; color: var(--paper-3);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.g-chev { color: var(--paper-3); font-size: 15px; flex: none; }
.g-ava-mini { width: 32px; height: 32px; border-radius: 10px; font-size: 14px; }

/* 暴躁等级 */
.rage-box { padding: 16px 17px 20px; }
.rage-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 4px; }
.rage-head .rh-label { font-size: 15px; }
.rage-head .rh-name {
  font-family: var(--font-kai);
  font-size: 15px; color: var(--ember);
  letter-spacing: .1em;
}
.rage-sub { font-size: 11.5px; color: var(--paper-3); margin-bottom: 14px; }
input[type="range"].rage-slider {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 30px;
  background: transparent;
}
input[type="range"].rage-slider::-webkit-slider-runnable-track {
  height: 4px; border-radius: 2px;
  background: linear-gradient(90deg, var(--ember-lo) var(--fill, 50%), var(--ink-3) var(--fill, 50%));
}
input[type="range"].rage-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--ember-hi), var(--ember-lo));
  box-shadow: 0 0 16px var(--ember-glow), 0 2px 6px rgba(0,0,0,.5);
  margin-top: -10px;
}
.rage-scale { display: flex; justify-content: space-between; font-size: 10px; color: var(--paper-3); margin-top: 2px; font-variant-numeric: tabular-nums; }

/* 开关 */
.switch {
  width: 46px; height: 28px; flex: none;
  border-radius: 999px;
  background: var(--ink-3);
  border: 1px solid var(--line-strong);
  position: relative;
  transition: all .25s var(--ease);
}
.switch::after {
  content: "";
  position: absolute; top: 3px; left: 3px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--paper-2);
  transition: all .25s var(--ease);
}
.switch.on { background: var(--ember-lo); border-color: transparent; box-shadow: 0 0 14px var(--ember-glow); }
.switch.on::after { left: 21px; background: #FFF4EC; }

.about-box {
  margin: 22px 20px 0;
  text-align: center;
  font-family: var(--font-kai);
  font-size: 12px; color: var(--paper-3);
  line-height: 2.1; letter-spacing: .1em;
  white-space: pre-line;
}
.danger-row .g-label { color: var(--seal); }

/* ---------- 18. 添加角色 ---------- */
.addrole-cards { padding: 8px 20px; display: flex; flex-direction: column; gap: 12px; }
.role-card {
  display: flex; align-items: center; gap: 16px;
  padding: 18px;
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 20px;
  text-align: left;
  transition: all .2s var(--ease);
}
.role-card:active { transform: scale(.97); background: var(--ink-3); }
.role-card .glyphbox { width: 54px; height: 54px; font-size: 25px; border-radius: 17px; }
.role-card .rc-name { font-size: 17px; font-weight: 600; letter-spacing: .04em; }
.role-card .rc-desc { font-size: 12.5px; color: var(--paper-3); margin-top: 3px; }
.addrole-note {
  text-align: center; padding: 22px;
  font-family: var(--font-kai); font-size: 12px; color: var(--paper-3);
  letter-spacing: .12em;
}

/* ---------- 19. 弹层 ---------- */
#modal-mask {
  position: absolute; inset: 0;
  z-index: 60;
  background: rgba(5, 4, 3, .66);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: grid; place-items: center;
  opacity: 0; pointer-events: none;
  transition: opacity .25s;
}
#modal-mask.active { opacity: 1; pointer-events: auto; }
#modal-box {
  width: min(320px, 86%);
  background: var(--ink-2);
  border: 1px solid var(--line-strong);
  border-radius: 22px;
  padding: 26px 22px 18px;
  transform: scale(.92) translateY(10px);
  transition: transform .28s var(--ease);
}
#modal-mask.active #modal-box { transform: none; }
#modal-title {
  text-align: center;
  font-family: var(--font-song);
  font-size: 18px; font-weight: 700; letter-spacing: .08em;
}
#modal-sub {
  text-align: center;
  font-size: 12.5px; color: var(--paper-3);
  margin-top: 8px; line-height: 1.9;
  white-space: pre-line;
}
#modal-input-wrap { margin-top: 16px; }
#modal-input {
  width: 100%;
  background: var(--ink-1);
  border: 1px solid var(--line-strong);
  border-radius: 13px;
  padding: 11px 14px;
  font-size: 15px;
  text-align: center;
}
#modal-input:focus { border-color: rgba(255, 106, 61, .5); }
#modal-opts { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.modal-opt {
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  color: var(--paper-2);
  font-size: 13.5px;
}
.modal-opt.on { border-color: var(--ember); color: var(--ember); background: var(--ember-soft); }
#modal-btns { display: flex; gap: 10px; margin-top: 20px; }
#modal-btns .btn { flex: 1; padding: 12px 0; text-align: center; font-size: 14px; }
#modal-btns .btn.danger { color: #FFD9CF; background: linear-gradient(145deg, #B33A28, #8E2B1C); box-shadow: none; }

/* 头像选择 */
.ava-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 16px; }
.ava-opt {
  aspect-ratio: 1;
  border-radius: 16px;
  font-size: 22px;
  border: 1px solid transparent;
  transition: all .15s;
}
.ava-opt.on { border-color: var(--ember); box-shadow: 0 0 14px var(--ember-glow); }
.ava-upload {
  margin-top: 10px; width: 100%;
  padding: 11px 0;
  border-radius: 13px;
  border: 1px dashed var(--line-strong);
  color: var(--paper-3);
  font-size: 13px; letter-spacing: .1em;
}

/* ---------- 20. Toast ---------- */
#toast-wrap {
  position: absolute; left: 0; right: 0;
  bottom: calc(var(--tab-h) + 18px);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  z-index: 70;
  pointer-events: none;
}
.toast {
  max-width: 78%;
  background: rgba(28, 25, 22, .94);
  border: 1px solid var(--line-strong);
  backdrop-filter: blur(12px);
  border-radius: 999px;
  padding: 10px 20px;
  font-size: 13px;
  color: var(--paper);
  text-align: center;
  animation: toast-in .3s var(--ease) both;
  letter-spacing: .04em;
}
.toast.kai { font-family: var(--font-kai); border-radius: 16px; letter-spacing: .1em; line-height: 1.8; white-space: pre-line; }
.toast.out { animation: toast-out .3s var(--ease) both; }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px) scale(.95); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateY(8px) scale(.96); } }

/* ---------- 21. 开屏 ---------- */
#splash {
  position: absolute; inset: 0;
  z-index: 100;
  background: var(--ink-0);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 26px;
  transition: opacity .6s ease, visibility .6s;
}
#splash.gone { opacity: 0; visibility: hidden; pointer-events: none; content-visibility: hidden; }
#splash .sp-glyph {
  font-family: var(--font-song);
  font-size: 88px; font-weight: 700;
  background: linear-gradient(160deg, var(--ember-hi) 10%, var(--ember-lo) 55%, #8E2B1C);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  filter: drop-shadow(0 6px 30px rgba(255, 106, 61, .25));
  animation: sp-breathe 2.4s ease-in-out infinite;
}
@keyframes sp-breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.04); } }
#splash .sp-line {
  font-family: var(--font-kai);
  font-size: 15px; letter-spacing: .42em; text-indent: .42em;
  color: var(--paper-2);
}
#splash .sp-spark {
  position: absolute;
  width: 3px; height: 3px; border-radius: 50%;
  background: var(--ember-hi);
  box-shadow: 0 0 8px var(--ember-glow);
  animation: spark-rise 2.6s ease-in infinite;
}
@keyframes spark-rise {
  0% { opacity: 0; transform: translateY(30px) translateX(0); }
  18% { opacity: 1; }
  100% { opacity: 0; transform: translateY(-130px) translateX(14px); }
}
/* 角标：右下角制造者印 */
#splash .sp-badge {
  position: absolute;
  right: 20px; bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  display: flex; align-items: center; gap: 8px;
  opacity: .8;
}
#splash .spb-seal {
  width: 22px; height: 22px;
  border: 1.2px solid var(--seal);
  border-radius: 5px;
  color: var(--seal);
  font-family: var(--font-song);
  font-weight: 700; font-size: 13px;
  display: grid; place-items: center;
  transform: rotate(-4deg);
}
#splash .spb-text {
  font-size: 9px; letter-spacing: .3em;
  color: var(--paper-3);
}

/* ---------- 22. 角色头像通用 ---------- */
.ava {
  border-radius: 12px;
  display: grid; place-items: center;
  font-family: var(--font-song);
  font-weight: 700;
  border: 1px solid var(--line);
  overflow: hidden;
  flex: none;
}
.ava img { width: 100%; height: 100%; object-fit: cover; }
.ava.tone-ember { color: #FFE3D6; background: linear-gradient(145deg, #3A1F12, #241310); border-color: rgba(255, 106, 61, .25); }
.ava.tone-sand  { color: #F2E2C4; background: linear-gradient(145deg, #332A19, #211B11); border-color: rgba(216, 185, 138, .22); }
.ava.tone-rose  { color: #F7DCDC; background: linear-gradient(145deg, #38201F, #221312); border-color: rgba(224, 138, 138, .22); }
.ava.tone-ash   { color: #DDD8CF; background: linear-gradient(145deg, #28251F, #1B1916); border-color: var(--line-strong); }

/* ---------- 24. 高级化二轮：底字水印 / 呼吸火种 / 编号 / 错落入场 ---------- */
/* 每一屏一个巨型描边底字，像宣纸上的飞白 */
.screen.tab::after, #screen-chat::after {
  content: attr(data-ghost);
  position: absolute;
  right: -38px;
  top: 48px;
  font-family: var(--font-song);
  font-weight: 700;
  font-size: 250px;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(242, 237, 228, .05);
  pointer-events: none;
  z-index: 0;
}
#screen-chat::after {
  top: auto; bottom: 110px; right: -44px;
  -webkit-text-stroke-color: rgba(242, 237, 228, .035);
}
.bighead, .scroll, #chat-body, #chat-composer, .smallhead { position: relative; z-index: 1; }

/* 大标题旁那颗活着的火种 */
.bighead h1 { display: flex; align-items: center; gap: 12px; }
.bighead h1::after {
  content: "";
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--ember);
  box-shadow: 0 0 14px var(--ember-glow);
  animation: ember-breathe 2.6s ease-in-out infinite;
  margin-top: 6px;
}
@keyframes ember-breathe {
  0%, 100% { opacity: .45; transform: scale(.78); }
  50% { opacity: 1; transform: scale(1.12); }
}

/* 列表行：去 settings 化 */
.row { padding: 15px 12px; }
.row-idx {
  font-family: var(--font-song);
  font-size: 11px;
  letter-spacing: .16em;
  color: var(--paper-3);
  flex: none;
  opacity: .8;
  font-variant-numeric: tabular-nums;
}
.row:active { transform: translateX(4px); }
.glyphbox { box-shadow: inset 0 1px 0 rgba(242, 237, 228, .07), 0 8px 18px -10px rgba(0, 0, 0, .65); }
.row:active .glyphbox {
  border-color: rgba(255, 106, 61, .35);
  box-shadow: inset 0 1px 0 rgba(242, 237, 228, .07), 0 0 18px var(--ember-soft);
}

/* 错落入场 */
.rows.animate .row { animation: row-in .46s var(--ease) backwards; }
.rows.animate .row:nth-child(1) { animation-delay: .02s; }
.rows.animate .row:nth-child(2) { animation-delay: .06s; }
.rows.animate .row:nth-child(3) { animation-delay: .10s; }
.rows.animate .row:nth-child(4) { animation-delay: .14s; }
.rows.animate .row:nth-child(5) { animation-delay: .18s; }
.rows.animate .row:nth-child(6) { animation-delay: .22s; }
.rows.animate .row:nth-child(7) { animation-delay: .26s; }
.rows.animate .row:nth-child(8) { animation-delay: .30s; }
@keyframes row-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

/* 未读点会呼吸 */
.dot-unread { animation: ember-breathe 2.2s ease-in-out infinite; }

/* 气泡的内光与坠影 */
.msg.bot .m-bubble { box-shadow: inset 0 1px 0 rgba(242, 237, 228, .05); }
.msg.user .m-bubble { box-shadow: inset 0 1px 0 rgba(255, 138, 92, .12), 0 6px 16px -10px rgba(232, 78, 31, .4); }
#chat-input:focus { border-color: rgba(255, 106, 61, .45); }

/* Tab 栏上沿的光衰 */
#tabbar::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: -26px; height: 26px;
  background: linear-gradient(to top, rgba(7, 6, 6, .5), transparent);
  pointer-events: none;
}

/* 我的资料卡：边沿光 */
.me-card { box-shadow: inset 0 1px 0 rgba(242, 237, 228, .06), 0 16px 36px -20px rgba(0, 0, 0, .75); }

/* ---------- 22.5 截图模式：动画全停，所见即终态 ---------- */
html.shot *, html.shot *::before, html.shot *::after {
  transition-duration: 0s !important;
  animation-duration: 0s !important;
  animation-delay: 0s !important;
}

/* ---------- 23. 可达性 ---------- */
:focus-visible { outline: 2px solid var(--ember); outline-offset: 2px; border-radius: 4px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ============================================================
   25. v2.0 增补：隐私锁 / 动作面板 / 撤销 Toast / 首次引导 / 心情周 / 按人聚合
       我的数据 / 关于 / 备份 / 快捷话 / 摔杯子 / 打傻逼 / 键盘 / 横屏
   ============================================================ */

/* ---- 顶栏右侧按钮（更多 / 重开） ---- */
.sh-btn { font-size: 20px; letter-spacing: .05em; color: var(--paper-2); border-radius: 12px; transition: transform .15s var(--ease), background .15s; }
.sh-btn:active { transform: scale(.88); background: var(--ink-2); }
#game-reload { font-size: 19px; }

/* ---- 隐私锁 ---- */
#lock-screen {
  position: absolute; inset: 0; z-index: 120;
  background: var(--ink-0);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px;
  padding: calc(var(--sat) + 20px) 24px calc(24px + env(safe-area-inset-bottom, 0px));
}
html.locked #app > *:not(#lock-screen):not(#splash):not(#modal-mask):not(#toast-wrap) { filter: blur(14px); pointer-events: none; }
html.locked #modal-mask { z-index: 130; }
html.locked #toast-wrap { z-index: 131; }
#lock-screen .lk-glyph {
  font-family: var(--font-song); font-size: 54px; font-weight: 700;
  background: linear-gradient(160deg, var(--ember-hi), var(--ember-lo));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 4px 20px rgba(255, 106, 61, .25));
}
#lock-screen .lk-title { font-family: var(--font-song); font-size: 19px; font-weight: 700; letter-spacing: .1em; margin-top: 6px; }
#lock-screen .lk-sub { font-family: var(--font-kai); font-size: 12.5px; color: var(--paper-3); letter-spacing: .1em; min-height: 20px; text-align: center; }
.lk-dots { display: flex; gap: 18px; margin: 14px 0 22px; }
.lk-dots i { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid var(--line-strong); transition: all .15s var(--ease); }
.lk-dots i.on { background: var(--ember); border-color: transparent; box-shadow: 0 0 12px var(--ember-glow); transform: scale(1.1); }
.lk-dots.shake { animation: lk-shake .5s var(--ease); }
@keyframes lk-shake { 0%, 100% { transform: none; } 20% { transform: translateX(-12px); } 40% { transform: translateX(10px); } 60% { transform: translateX(-7px); } 80% { transform: translateX(4px); } }
.lk-pad { display: grid; grid-template-columns: repeat(3, 76px); gap: 14px 22px; }
.lk-key {
  width: 76px; height: 76px; border-radius: 50%;
  background: var(--ink-2); border: 1px solid var(--line);
  font-family: var(--font-song); font-size: 26px; font-weight: 700; color: var(--paper);
  display: grid; place-items: center;
  transition: transform .12s var(--ease), background .15s, border-color .15s;
}
.lk-key:active { transform: scale(.9); background: var(--ink-3); border-color: rgba(255, 106, 61, .4); }
.lk-key.blank { visibility: hidden; }
.lk-key.del { font-size: 20px; color: var(--paper-2); background: transparent; border-color: transparent; }
.lk-cancel { margin-top: 18px; font-size: 13px; letter-spacing: .2em; color: var(--paper-3); padding: 10px 22px; }

/* ---- 底部动作面板 ---- */
#action-mask {
  position: absolute; inset: 0; z-index: 62;
  background: rgba(5, 4, 3, .6);
  backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px);
  display: flex; align-items: flex-end;
  opacity: 0; pointer-events: none;
  transition: opacity .22s;
}
#action-mask.active { opacity: 1; pointer-events: auto; }
#action-box {
  width: 100%;
  padding: 10px 12px calc(12px + env(safe-area-inset-bottom, 0px));
  transform: translateY(40px);
  transition: transform .3s var(--ease);
}
#action-mask.active #action-box { transform: none; }
#action-title {
  text-align: center; padding: 10px 16px 12px;
  font-size: 12.5px; color: var(--paper-3); letter-spacing: .06em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#action-btns {
  background: var(--ink-2);
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  overflow: hidden;
}
.action-item {
  display: block; width: 100%;
  padding: 16px;
  font-size: 16px; letter-spacing: .04em;
  color: var(--paper);
  text-align: center;
  position: relative;
}
.action-item + .action-item::before { content: ""; position: absolute; top: 0; left: 16px; right: 16px; height: 1px; background: var(--line); }
.action-item:active { background: var(--ink-3); }
.action-item.danger { color: #FF8A7A; }
.action-cancel {
  display: block; width: 100%; margin-top: 10px;
  padding: 15px;
  border-radius: 18px;
  background: var(--ink-2); border: 1px solid var(--line);
  font-size: 15px; letter-spacing: .1em; color: var(--paper-2);
}
.action-cancel:active { background: var(--ink-3); }

/* ---- Toast 带动作（撤销） ---- */
.toast.has-act { display: flex; align-items: center; gap: 14px; padding-right: 8px; }
.toast-act {
  padding: 6px 14px; border-radius: 999px;
  color: var(--ember); font-size: 13px; font-weight: 600; letter-spacing: .08em;
  border: 1px solid rgba(255, 106, 61, .4);
}
.toast-act:active { background: var(--ember-soft); }
.msg.msg-gone { transition: opacity .25s, transform .25s var(--ease); opacity: 0; transform: scale(.92); }

/* ---- 首次引导卡 ---- */
.onboard-card {
  margin: 4px 20px 14px;
  padding: 18px 18px 14px;
  background: linear-gradient(160deg, rgba(255, 106, 61, .1), rgba(255, 106, 61, .03));
  border: 1px solid rgba(255, 106, 61, .28);
  border-radius: 20px;
  animation: msg-in .4s var(--ease) both;
  transition: opacity .3s, transform .3s var(--ease);
}
.onboard-card.gone { opacity: 0; transform: scale(.96); }
.onboard-card .ob-title { font-family: var(--font-song); font-size: 16px; font-weight: 700; letter-spacing: .08em; margin-bottom: 8px; }
.onboard-card .ob-lines { padding-left: 1.3em; font-size: 13px; line-height: 1.85; color: #DDD5C8; }
.onboard-card .ob-lines li { margin: 2px 0; }
.onboard-card .ob-lines li::marker { color: var(--ember); font-family: var(--font-song); }
.onboard-card .ob-ok {
  margin-top: 10px; padding: 8px 18px; border-radius: 999px;
  color: #2A1009; font-size: 13px; font-weight: 600; letter-spacing: .12em;
  background: linear-gradient(145deg, var(--ember-hi), var(--ember-lo));
}
.onboard-card .ob-ok:active { transform: scale(.95); }

/* ---- 记 · 近七天心情 ---- */
.mood-week { display: flex; gap: 6px; margin: 0 0 12px; }
.mw-day {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 9px 0 7px;
  border-radius: 14px;
  background: var(--ink-2); border: 1px solid var(--line);
  transition: all .2s var(--ease);
}
.mw-day .mw-ch { font-family: var(--font-song); font-size: 17px; font-weight: 700; color: var(--paper-3); line-height: 1.1; }
.mw-day.has .mw-ch { color: var(--sand); }
.mw-day .mw-d { font-size: 10px; letter-spacing: .1em; color: var(--paper-3); }
.mw-day.today { border-color: rgba(255, 106, 61, .35); }
.mw-day.today .mw-d { color: var(--ember); }
.mw-day.on { background: var(--ember-soft); border-color: var(--ember); }
.mw-day.on .mw-ch { color: var(--ember); }
.mw-day:active { transform: translateY(1px) scale(.97); }
.fold-btn.filter-tag { color: var(--ember); }

/* ---- 记 · 小本本按人聚合 ---- */
.people-row { display: flex; gap: 8px; overflow-x: auto; padding: 0 0 12px; margin: 0 -20px 2px; padding-left: 20px; padding-right: 20px; scrollbar-width: none; }
.people-row .who-chip { flex: none; }

/* ---- 我 · 分组标题 / 静态行 / 链接行 ---- */
.group-title { margin: 0 22px 8px; font-size: 11px; letter-spacing: .32em; color: var(--paper-3); text-transform: uppercase; }
.group .g-static {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 13px 17px; position: relative;
}
.group .g-static .g-value { white-space: normal; text-align: right; line-height: 1.6; font-size: 13px; }
.group .g-static + .g-static::before, .group .g-static + .g-row::before, .group .g-row + .g-static::before, .group a.g-row + .g-row::before, .group .g-row + a.g-row::before {
  content: ""; position: absolute; top: 0; left: 17px; right: 0; height: 1px; background: var(--line);
}
.group a.g-row { text-decoration: none; color: inherit; }
.rc-has { font-style: normal; font-size: 10.5px; letter-spacing: .14em; color: var(--ember); border: 1px solid rgba(255, 106, 61, .4); border-radius: 6px; padding: 1px 6px; margin-left: 6px; vertical-align: middle; }

/* ---- 我 · 我的数据 ---- */
.stat-hero { padding: 26px 22px 18px; text-align: center; }
.stat-hero-num { font-family: var(--font-song); font-size: 68px; font-weight: 700; line-height: 1; letter-spacing: .02em; text-shadow: 0 0 40px var(--ember-glow); }
.stat-hero-label { margin-top: 10px; font-family: var(--font-kai); font-size: 14px; color: var(--paper-2); letter-spacing: .12em; }
.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; padding: 0 20px; }
.stat-card {
  background: var(--ink-2); border: 1px solid var(--line);
  border-radius: 18px; padding: 16px 16px 14px;
  animation: row-in .4s var(--ease) both;
}
.stat-card.zero { opacity: .55; }
.stat-card .sc-num { font-family: var(--font-song); font-size: 30px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat-card .sc-label { margin-top: 5px; font-size: 12px; color: var(--paper-3); letter-spacing: .04em; line-height: 1.5; }
.stat-note { margin: 24px 24px 10px; text-align: center; font-family: var(--font-kai); font-size: 12px; color: var(--paper-3); line-height: 2; letter-spacing: .1em; white-space: pre-line; }

/* ---- 我 · 关于 ---- */
.about-hero { padding: 26px 22px 22px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.about-glyph {
  width: 84px; height: 84px; border-radius: 24px;
  background: var(--ink-0); border: 1px solid rgba(255, 106, 61, .25);
  display: grid; place-items: center;
  font-family: var(--font-song); font-size: 46px; font-weight: 700;
  background-image: radial-gradient(60% 60% at 50% 70%, rgba(255, 106, 61, .16), transparent);
  color: transparent; -webkit-text-stroke: 0;
  position: relative; margin-bottom: 8px;
  box-shadow: 0 14px 34px -18px rgba(0, 0, 0, .8);
}
.about-glyph::after {
  content: "躁"; position: absolute; inset: 0; display: grid; place-items: center;
  background: linear-gradient(160deg, var(--ember-hi), var(--ember-lo));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.about-name { font-family: var(--font-song); font-size: 20px; font-weight: 700; letter-spacing: .08em; }
.about-ver { font-size: 11.5px; letter-spacing: .2em; color: var(--paper-3); font-variant-numeric: tabular-nums; }
.about-line { font-family: var(--font-kai); font-size: 13px; color: var(--paper-2); letter-spacing: .3em; margin-top: 4px; }
.about-foot { margin: 22px 24px 10px; text-align: center; font-size: 10.5px; color: var(--paper-3); letter-spacing: .06em; line-height: 1.9; }
.third-list { margin-top: 14px; padding-left: 1.2em; font-size: 12.5px; line-height: 1.8; color: var(--paper-2); text-align: left; }
.third-list li { margin: 4px 0; }
.third-list li::marker { color: var(--ember); }

/* ---- 我 · 备份与恢复 ---- */
.backup-btns { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.backup-btn {
  text-align: left; padding: 14px 16px;
  background: var(--ink-1); border: 1px solid var(--line-strong);
  border-radius: 16px;
  display: flex; flex-direction: column; gap: 3px;
  transition: all .15s var(--ease);
}
.backup-btn:active { transform: scale(.98); border-color: rgba(255, 106, 61, .5); background: var(--ink-3); }
.backup-btn b { font-size: 15px; font-weight: 600; letter-spacing: .04em; }
.backup-btn span { font-size: 12px; color: var(--paper-3); }

/* ---- 聊 · 快捷话 ---- */
#chat-chips {
  flex: none;
  display: flex; gap: 8px;
  padding: 0 14px;
  overflow-x: auto; scrollbar-width: none;
  max-height: 0; opacity: 0;
  transition: max-height .25s var(--ease), opacity .2s, padding .25s;
  position: relative; z-index: 1;
}
#chat-chips.show { max-height: 48px; opacity: 1; padding: 6px 14px 8px; }
#chat-chips .chip {
  flex: none;
  padding: 7px 14px; border-radius: 999px;
  font-size: 13px; letter-spacing: .04em;
  color: var(--paper-2);
  background: rgba(26, 24, 22, .85); border: 1px solid var(--line-strong);
  backdrop-filter: blur(8px);
  transition: all .15s var(--ease);
}
#chat-chips .chip:active { transform: scale(.94); color: var(--ember); border-color: var(--ember); background: var(--ember-soft); }

/* ---- 抽签：两个按钮 ---- */
.qian-btns { display: flex; gap: 10px; }
#qian-save:disabled { opacity: .45; }

/* ---- 摔杯子 ---- */
#smash-line {
  position: absolute; left: 0; right: 0; top: 22px;
  text-align: center; padding: 0 30px;
  font-family: var(--font-kai); font-size: 16px; letter-spacing: .16em;
  color: var(--paper-2);
  transition: opacity .5s; pointer-events: none;
  text-shadow: 0 0 20px rgba(0, 0, 0, .8);
}
#smash-count {
  position: absolute; left: 0; right: 0; bottom: 26px;
  text-align: center;
  font-size: 11px; letter-spacing: .3em; color: var(--paper-3);
  pointer-events: none;
}

/* ---- 键盘弹起 / 横屏 ---- */
html.kb #tabbar { display: none; }
html.kb .screen.tab .scroll { padding-bottom: 20px; }
#rotate-tip {
  position: absolute; left: 50%; top: calc(var(--sat) + 10px); z-index: 130;
  transform: translate(-50%, -140%);
  display: none; align-items: center; gap: 10px;
  padding: 9px 16px; border-radius: 999px;
  background: rgba(28, 25, 22, .94); border: 1px solid var(--line-strong);
  backdrop-filter: blur(12px);
  font-family: var(--font-kai); font-size: 13px; letter-spacing: .14em; color: var(--paper);
  white-space: nowrap; pointer-events: none;
  transition: transform .4s var(--ease), opacity .3s;
}
#rotate-tip span { font-family: var(--font-song); font-size: 18px; font-weight: 700; color: var(--ember); display: inline-block; animation: rot-hint 1.6s ease-in-out infinite; }
#rotate-tip small { font-size: 11px; color: var(--paper-3); letter-spacing: .08em; margin-left: 4px; }
@keyframes rot-hint { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(90deg); } }
html.landscape #rotate-tip { display: flex; }
html.landscape.landscape-tip #rotate-tip { transform: translate(-50%, 0); }
html.landscape-ok #rotate-tip { display: none !important; }

/* ---- 横屏紧凑布局：一屏只有 ~400 css px 高，把大标题压扁、底字水印去掉、App 拉宽 ---- */
@media (orientation: landscape) and (max-height: 520px) {
  #app { max-width: 640px; }
  .bighead { padding-top: calc(var(--sat) + 10px); padding-bottom: 6px; }
  .bighead .eyebrow { display: none; }
  .bighead h1 { font-size: 22px; }
  .bighead .dailyline { display: none; }
  .screen.tab::after, #screen-chat::after { display: none; }
  :root { --tab-h: calc(46px + env(safe-area-inset-bottom, 0px)); }
  .tab-item .tab-glyph { font-size: 17px; }
  .row { padding: 9px 12px; }
  .glyphbox { width: 38px; height: 38px; font-size: 17px; border-radius: 11px; }
  .smallhead { min-height: calc(var(--sat) + 42px); }
  .onboard-card { margin: 4px 20px 8px; padding: 12px 16px 10px; }
  .onboard-card .ob-lines { font-size: 12px; line-height: 1.6; }
  #muyu-section { padding-top: 12px; }
  #muyu-hit { transform: scale(.72); margin: -18px 0; }
  .me-card { margin: 4px 20px 10px; padding: 12px 16px; }
  .rage-box { padding: 10px 17px 12px; }
  #chat-chips.show { max-height: 40px; padding: 4px 14px 6px; }
  .lk-key { width: 56px; height: 56px; font-size: 20px; }
  .lk-pad { gap: 8px 16px; }
  #lock-screen { gap: 6px; }
  #lock-screen .lk-glyph { font-size: 34px; }
  .lk-dots { margin: 6px 0 10px; }
  .stat-hero { padding: 12px 22px 8px; }
  .stat-hero-num { font-size: 44px; }
  .about-hero { padding: 12px 22px 10px; }
  .about-glyph { width: 56px; height: 56px; font-size: 30px; border-radius: 16px; }
}

}

/* ---- Grok2-21：长按气泡/卡片时别弹系统选字菜单 ---- */
.msg .m-bubble, .entry-card, .grudge-entry, #chat-list .row { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.onboard-card .ob-note { margin-top: 8px; font-size: 11.5px; color: var(--paper-3); letter-spacing: .04em; line-height: 1.7; }


/* ============================================================
   26. 优化：低端机降级 / 对比度 / 省电
   ============================================================ */

/* 弱机（deviceMemory<=4 或 <=4 核）：28 处毛玻璃全部换成实色，省掉每帧的模糊合成 */
html.low-end #tabbar,
html.low-end .smallhead,
html.low-end #chat-composer,
html.low-end #modal-mask,
html.low-end #action-mask,
html.low-end .who-chip,
html.low-end #chat-chips .chip,
html.low-end .toast,
html.low-end #smoke-done,
html.low-end .game-center-tip { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
html.low-end #tabbar { background: #0A0908; }
html.low-end .smallhead { background: #121110; }
html.low-end #chat-composer { background: #0E0D0C; }
html.low-end #modal-mask, html.low-end #action-mask { background: rgba(5, 4, 3, .88); }
html.low-end .toast { background: #1C1916; }
html.low-end .who-chip, html.low-end #chat-chips .chip { background: #1A1816; }
/* 弱机上纸纹噪点也去掉：一张全屏 SVG 贴图每次重绘都要合成 */
html.low-end #app::after { display: none; }

/* 系统开了省电/降低动效：呼吸火种、开屏脉动这些无限动画全停，长任务也少一截 */
@media (prefers-reduced-motion: reduce) {
  .bighead h1::after, .dot-unread, #splash .sp-glyph, #splash .sp-spark,
  #rotate-tip span, .steam path { animation: none !important; }
}

/* 装饰性弱化文字（不承载信息）才用更暗的一档 */
.rage-scale, .joke-idx, .muyu-label, #splash .spb-text { color: var(--paper-4); }


/* ============================================================
   27. 优化二轮（Grok 第五轮）：合成层 / 触摸目标 / 横屏 / 读屏
   ============================================================ */

/* 11. 非激活的屏别再占合成层：五层 Tab 各自带一个 250px 描边底字 */
.screen.tab:not(.active) { visibility: hidden; content-visibility: auto; }
.sheet:not(.active) { visibility: hidden; }
.screen.push:not(.active) { visibility: hidden; }
.screen.tab:not(.active)::after, #screen-chat:not(.active)::after { content: none; }

/* 16. 触摸目标一律 ≥44px（拇指点得到） */
.addbtn { width: 44px; height: 44px; }
.mood-chip { width: 44px; height: 44px; }
#chat-send { width: 46px; height: 46px; }
#chat-chips .chip, .who-chip { min-height: 44px; display: inline-flex; align-items: center; }
.tea-chip { min-height: 44px; display: inline-flex; align-items: center; }
.modal-opt { min-height: 44px; display: inline-flex; align-items: center; }
.ge-tear, .fold-btn { min-height: 44px; }
input[type="range"].rage-slider::-webkit-slider-thumb { width: 28px; height: 28px; margin-top: -12px; }
.seg button { min-height: 44px; }
.mw-day { min-height: 48px; }

/* 19(2)(3). 横屏（Seeker 是横着用的）：把高度还给内容 */
@media (orientation: landscape) and (max-height: 520px) {
  #app { max-width: none; }
  .bighead { padding-top: calc(var(--sat) + 10px); padding-bottom: 8px; }
  .bighead h1 { font-size: 24px; }
  .bighead .eyebrow, .bighead .dailyline { display: none; }
  #chat-chips { display: none; }
  .smallhead { min-height: calc(var(--sat) + 40px); }
  #chat-composer { padding-top: 6px; padding-bottom: calc(6px + env(safe-area-inset-bottom, 0px)); }
  #muyu-section { padding-top: 14px; }
  .screen.tab::after, #screen-chat::after { font-size: 150px; }
  :root { --tab-h: calc(48px + env(safe-area-inset-bottom, 0px)); }
}

/* 17. 降低动效时：开屏、火种、粒子类装饰全静止 */
@media (prefers-reduced-motion: reduce) {
  #splash { transition: none; }
  .merit-float, .muyu-ring, #punch-mile { animation: none !important; }
}


/* ---- T75：非中文用户的英文说明层（内容确实是中文，不假装有英文版）---- */
#lang-note {
  position: absolute; inset: 0; z-index: 115;
  background: rgba(5, 4, 3, .88);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  display: grid; place-items: center; padding: 24px;
  transition: opacity .3s;
}
#lang-note.gone { opacity: 0; }
#lang-note .ln-box {
  max-width: 340px;
  background: var(--ink-2); border: 1px solid rgba(255, 106, 61, .3);
  border-radius: 22px; padding: 26px 24px 20px;
}
#lang-note .ln-title { font-size: 19px; font-weight: 700; letter-spacing: .01em; margin-bottom: 12px; }
#lang-note .ln-body { font-size: 13.5px; line-height: 1.75; color: var(--paper-2); }
#lang-note .ln-ok {
  margin-top: 20px; width: 100%; min-height: 46px;
  border-radius: 999px; color: #2A1009; font-size: 14px; font-weight: 600; letter-spacing: .04em;
  background: linear-gradient(145deg, var(--ember-hi), var(--ember-lo));
}
#lang-note .ln-ok:active { transform: scale(.97); }
html.low-end #lang-note { backdrop-filter: none; background: rgba(5, 4, 3, .95); }
