/* 外观借自 dwell-on-something（PolyForm Noncommercial 1.0.0）：配色、液态玻璃、顶栏、悬浮输入框 */
:root {
  --bg: #faf9f5;
  --card: #ffffff;
  --panel: #f0eee6;
  --line: #e8e5dc;
  --text: #2b2a27;
  --dim: #8a867c;
  --accent: #c96442;
  --accent-soft: #d97757;
  --user-bubble: #f0eee6;
  --red: #c0392b;
  --overlay: rgba(40, 38, 34, .4);
  --serif: "Songti SC", "Noto Serif SC", Georgia, serif;
  --glass: color-mix(in srgb, var(--card) 70%, transparent);
  --glass-shadow:
    0 10px 34px rgba(0,0,0,.09),
    0 1px 3px rgba(0,0,0,.05),
    inset 0 1px 0 rgba(255,255,255,.92),
    inset 0 -7px 18px rgba(255,255,255,.34),
    inset 0 0 0 1px rgba(255,255,255,.44);
  --glass-top: 76%;
  --glass-bottom: 58%;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #262624; --card: #30302e; --panel: #383836; --line: #3d3d3a;
    --text: #f5f4ef; --dim: #a3a099; --user-bubble: #353532;
    --red: #e07a6a; --overlay: rgba(0, 0, 0, .55);
    --glass-shadow:
      0 12px 38px rgba(0,0,0,.42),
      0 1px 3px rgba(0,0,0,.3),
      inset 0 1px 0 rgba(255,255,255,.16),
      inset 0 -7px 18px rgba(255,255,255,.045),
      inset 0 0 0 1px rgba(255,255,255,.09);
    --glass-top: 74%;
    --glass-bottom: 56%;
  }
}
:root[data-theme="dark"] {
    --bg: #262624; --card: #30302e; --panel: #383836; --line: #3d3d3a;
    --text: #f5f4ef; --dim: #a3a099; --user-bubble: #353532;
    --red: #e07a6a; --overlay: rgba(0, 0, 0, .55);
    --glass-shadow:
      0 12px 38px rgba(0,0,0,.42),
      0 1px 3px rgba(0,0,0,.3),
      inset 0 1px 0 rgba(255,255,255,.16),
      inset 0 -7px 18px rgba(255,255,255,.045),
      inset 0 0 0 1px rgba(255,255,255,.09);
    --glass-top: 74%;
    --glass-bottom: 56%;
  }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0; height: 100%; overflow: hidden; max-width: 100vw;
  background: var(--bg); color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Noto Sans SC", "Segoe UI", sans-serif;
  font-size: 16px; line-height: 1.7;
  -webkit-font-smoothing: antialiased; overscroll-behavior: none;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
[hidden] { display: none !important; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; display: block; }
.dim { color: var(--dim); font-size: 14px; }

/* 液态玻璃：半透明 + 模糊 + 四道内阴影 */
.glass, .composer {
  background: var(--glass);
  background: linear-gradient(180deg,
    color-mix(in srgb, var(--card) var(--glass-top), transparent),
    color-mix(in srgb, var(--card) var(--glass-bottom), transparent));
  -webkit-backdrop-filter: blur(24px) saturate(1.9) brightness(1.04);
  backdrop-filter: blur(24px) saturate(1.9) brightness(1.04);
  box-shadow: var(--glass-shadow);
}

/* ============ 顶栏：悬浮，消息从底下滑过去 ============ */
#top {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20;
  padding: 8px 12px 20px; padding-top: calc(8px + env(safe-area-inset-top));
  display: flex; align-items: center; gap: 8px;
  background: linear-gradient(to bottom,
    color-mix(in srgb, var(--bg) 88%, transparent) 0%,
    color-mix(in srgb, var(--bg) 55%, transparent) 55%,
    transparent 100%);
  -webkit-backdrop-filter: blur(18px) saturate(1.6);
  backdrop-filter: blur(18px) saturate(1.6);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 52%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 52%, transparent 100%);
}
.iconbtn { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex: none; }
.iconbtn:active { background: rgba(128,128,128,.12); }
.title { flex: 1; text-align: center; min-width: 0; }
.title h1 { margin: 0; font-size: 17px; font-weight: 600; line-height: 1.3; }
.title .sub { font-size: 12px; color: var(--dim); line-height: 1.2; }
.title .sub.typing { color: var(--accent); }

.menuCard {
  position: fixed; z-index: 40; border-radius: 18px; padding: 6px; min-width: 170px;
  display: flex; flex-direction: column;
}
#menu { right: 12px; top: calc(54px + env(safe-area-inset-top)); }
.menuCard button { text-align: left; padding: 10px 14px; border-radius: 12px; font-size: 15px; }
.menuCard button:active { background: rgba(128,128,128,.14); }

/* ============ 消息流 ============ */
#list {
  position: fixed; inset: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain;
  padding: calc(76px + env(safe-area-inset-top) + var(--dock-h, 0px)) 18px var(--foot-h, 150px);
}
#msgs { max-width: 720px; margin: 0 auto; }
.older { text-align: center; color: var(--dim); font-size: 13px; padding: 6px; }
.day { text-align: center; font-size: 12px; color: var(--dim); margin: 22px 0 10px; }
.row { display: flex; margin-top: 8px; transition: transform .15s; }
.row.gap { margin-top: 20px; }
.row.her { justify-content: flex-end; }
.him .content { max-width: 100%; min-width: 0; }
.her .content { max-width: 85%; min-width: 0; display: flex; flex-direction: column; align-items: flex-end; }

/* 他：不套气泡，直接铺开；她：灰色圆角气泡 */
.gu { white-space: pre-wrap; overflow-wrap: anywhere; }
.bubble {
  background: var(--user-bubble); border-radius: 18px; padding: 9px 15px;
  white-space: pre-wrap; overflow-wrap: anywhere; max-width: 100%;
}
.gu a, .bubble a { color: var(--accent); }
.time { font-size: 11.5px; color: var(--dim); margin-top: 3px; line-height: 1.2; user-select: none; }
.her .time { text-align: right; }
.time .fail { color: var(--red); font-weight: 600; }
.flash { animation: flash 1.3s; }
@keyframes flash { 0%, 55% { background: color-mix(in srgb, var(--accent) 14%, transparent); border-radius: 12px; } }

.quote {
  display: block; width: 100%; text-align: left; border-left: 2.5px solid var(--accent-soft);
  padding: 1px 10px; margin: 2px 0 6px; font-size: 14px; color: var(--dim); line-height: 1.5;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.quote { border-left-color: var(--accent); }
.quote.mine { border-left-color: #7d9cc0; }

.media { display: block; max-width: min(240px, 70vw); max-height: 320px; border-radius: 14px; margin: 4px 0; }
.sticker { display: block; width: 132px; height: 132px; object-fit: contain; margin: 2px 0; }
.file { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; padding: 10px 12px; border-radius: 16px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); margin: 4px 0; }
.file .fi { width: 36px; height: 36px; border-radius: 10px; background: var(--panel); display: grid; place-items: center; flex: none; color: var(--dim); }
.file .dim { font-size: 12.5px; }

/* 语音 */
.voiceWrap { display: inline-flex; flex-direction: column; align-items: flex-start; max-width: 100%; margin: 2px 0; }
.voice { display: flex; align-items: center; gap: 12px; width: 236px; max-width: 100%; padding: 8px 16px 8px 8px; border-radius: 22px; background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); }
.voice .play { width: 38px; height: 38px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; flex: none; transition: transform .15s; }
.voice .play:active { transform: scale(.92); }
.voice .play svg { width: 14px; height: 14px; fill: currentColor; stroke: none; }
.voice .wave { flex: 1; height: 28px; display: flex; align-items: center; gap: 2px; cursor: pointer; }
.voice .wave i { flex: 1; min-height: 3px; border-radius: 2px; background: var(--dim); opacity: .32; transition: opacity .2s, background .2s; }
.voice .wave i.on { background: var(--accent); opacity: 1; }
.voice.playing .wave i:not(.on) { opacity: .45; }
.voice .dur { font-size: 12.5px; color: var(--dim); min-width: 30px; text-align: right; font-variant-numeric: tabular-nums; }
.voiceTxtBtn { font-size: 12.5px; color: var(--dim); padding: 6px 10px 0; }
.voiceTxt { font-size: 14.5px; line-height: 1.6; color: var(--text); padding: 6px 12px 2px; max-width: 236px; }
.voiceTxt[hidden] { display: none; }

/* 思考 / 工具：一行「›」，点开才看 */
.toolline {
  color: var(--dim); font-size: 14.5px; cursor: pointer; user-select: none;
  display: flex; align-items: center; gap: 6px; min-height: 26px; max-width: 100%; text-align: left;
}
.toolline:active { opacity: .6; }
.toolline svg { width: 15px; height: 15px; flex: none; stroke-width: 1.8; }
.toolline .lbl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.toolline .chev { flex: none; transition: transform .2s; width: 13px; height: 13px; }
.toolline.open .chev { transform: rotate(90deg); }
.fold {
  margin: 4px 0 6px 21px; padding: 2px 0 2px 12px; border-left: 2px solid var(--line);
  font-size: 14.5px; color: var(--dim); line-height: 1.75; white-space: pre-wrap; overflow-wrap: anywhere;
  max-height: 55vh; overflow-y: auto;
}
.fold.think { line-height: 1.6; }
.fold.think p { margin: 0 0 6px; }
.fold.think p:last-child { margin-bottom: 0; }
.fold.tools { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }
.inner { font-family: var(--serif); font-style: italic; color: var(--dim); white-space: pre-wrap; }

.buttons { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.buttons button { padding: 7px 16px; border-radius: 999px; background: var(--panel); font-size: 14px; }
.buttons button:disabled { opacity: .45; }

/* ============ 底部：悬浮输入卡 ============ */
#foot {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  padding: 6px 12px calc(10px + env(safe-area-inset-bottom));
  pointer-events: none;
}
#foot > * { pointer-events: auto; }
.composer { max-width: 720px; margin: 0 auto; border-radius: 24px; padding: 12px 14px 10px; }
#input {
  width: 100%; border: 0; outline: 0; resize: none; background: transparent; color: var(--text);
  font: inherit; line-height: 1.6; max-height: 160px; padding: 2px 2px 8px; display: block;
}
#input::placeholder { color: var(--dim); }
.ctlrow { display: flex; align-items: center; gap: 8px; }
.ctlrow .gap { flex: 1; }
.round { width: 36px; height: 36px; border-radius: 50%; background: var(--panel); display: flex; align-items: center; justify-content: center; flex: none; }
.round svg { width: 17px; height: 17px; }
.round.on { background: var(--text); color: var(--bg); }
.send { width: 38px; height: 38px; border-radius: 50%; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; flex: none; }
.send svg { width: 17px; height: 17px; }
.send:disabled { opacity: .35; }
.mini { width: 26px; height: 26px; display: grid; place-items: center; color: var(--dim); flex: none; }
.mini svg { width: 15px; height: 15px; }

.reply-bar { display: flex; align-items: center; gap: 6px; padding: 0 0 8px; }
.reply-line { flex: 1; min-width: 0; border-left: 2.5px solid var(--accent-soft); padding-left: 10px; font-size: 14px; line-height: 1.45; }
.reply-line b { display: block; color: var(--accent); font-size: 12.5px; font-weight: 600; }
.reply-line span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--dim); }
.tray { display: flex; gap: 8px; padding-bottom: 8px; flex-wrap: wrap; }
.tray .item { position: relative; width: 54px; height: 54px; border-radius: 10px; overflow: hidden; background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); }
.tray img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tray .doc { font-size: 10.5px; color: var(--dim); padding: 4px; line-height: 1.3; overflow: hidden; height: 100%; }
.tray .x { position: absolute; top: 2px; right: 2px; width: 18px; height: 18px; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; font-size: 11px; display: grid; place-items: center; }
.tray .up { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0,0,0,.35); color: #fff; font-size: 11px; }
.stickers { display: grid; grid-template-columns: repeat(auto-fill, minmax(68px, 1fr)); gap: 6px; max-height: 36vh; overflow-y: auto; padding-top: 10px; margin-top: 8px; border-top: 1px solid var(--line); }
.stickers button { aspect-ratio: 1; border-radius: 12px; }
.stickers button:active { background: rgba(128,128,128,.12); }
.stickers img { width: 100%; height: 100%; object-fit: contain; }
.stickers .add { box-shadow: inset 0 0 0 1.5px var(--line); color: var(--dim); font-size: 13px; }

.doing {
  width: max-content; max-width: 100%; margin: 0 auto 8px; padding: 6px 14px; border-radius: 999px;
  font-size: 13.5px; color: var(--dim); display: flex; align-items: center; gap: 8px;
}
.doing .dots { display: inline-flex; gap: 3px; }
.doing .dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--accent-soft); animation: blink 1.2s infinite; }
.doing .dots i:nth-child(2) { animation-delay: .2s; }
.doing .dots i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }

.to-bottom {
  position: absolute; right: 16px; top: -46px; width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center; color: var(--text);
}

/* ============ 长按菜单、看大图、登录页、提示 ============ */
.ctx { min-width: 150px; }
.viewer { position: fixed; inset: 0; background: rgba(0,0,0,.92); z-index: 60; display: grid; place-items: center; }
.viewer img { max-width: 100vw; max-height: 100dvh; object-fit: contain; }
.login { position: fixed; inset: 0; background: var(--bg); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 6px; z-index: 70; padding: 16px; }
.login .mark { font-family: var(--serif); font-size: 44px; font-weight: 700; color: var(--accent); }
.toast {
  position: fixed; left: 50%; top: calc(64px + env(safe-area-inset-top)); transform: translateX(-50%); z-index: 80;
  padding: 9px 16px; border-radius: 16px; font-size: 14px; max-width: calc(100vw - 32px);
}

/* ============ 侧边栏 ============ */
#drawerWrap { position: fixed; inset: 0; z-index: 45; display: none; }
#drawerWrap.open { display: block; }
#drawerWrap .shade { position: absolute; inset: 0; background: var(--overlay); opacity: 0; transition: opacity .22s; }
#drawerWrap.show .shade { opacity: 1; }
#drawer {
  position: absolute; top: 0; bottom: 0; left: 0; width: min(58vw, 224px);
  background: var(--bg); display: flex; flex-direction: column;
  padding: calc(16px + env(safe-area-inset-top)) 0 calc(14px + env(safe-area-inset-bottom));
  transform: translateX(-102%); transition: transform .24s ease; box-shadow: 4px 0 24px rgba(0,0,0,.12);
}
#drawerWrap.show #drawer { transform: none; }
.brand { font-family: var(--serif); font-size: 26px; font-weight: 700; padding: 6px 22px 14px; letter-spacing: .01em; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.together { display: inline-flex; align-items: baseline; gap: 4px; padding: 4px 12px 5px; border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); font-family: var(--serif); white-space: nowrap; }
.together b { font-size: 22px; font-weight: 700; letter-spacing: .02em; }
.together .tlabel { font-size: 12.5px; font-weight: 400; opacity: .85; }
.together.special { background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 22%, transparent), color-mix(in srgb, #e9b44c 26%, transparent)); }
.together.special::after { content: "✨"; font-size: 13px; margin-left: 2px; }
.nav { flex: 1; overflow-y: auto; padding: 0 10px; }
.nav .sep { height: 1px; background: var(--line); margin: 8px 12px; }
.item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 12px; border-radius: 12px; font-size: 16px; text-align: left; }
.item svg { width: 20px; height: 20px; stroke-width: 1.8; }
.item.on { background: var(--panel); }
.item:active { background: var(--panel); }
.drawer-foot { flex: none; padding: 8px 12px 0; border-top: 1px solid var(--line); margin-top: 8px; }

/* ============ 页面（从侧边栏打开，盖在聊天上面） ============ */
.page {
  position: fixed; inset: 0; z-index: 50; background: var(--bg); display: flex; flex-direction: column;
  padding-top: env(safe-area-inset-top); animation: rise .22s ease;
}
@keyframes rise { from { transform: translateY(24px); opacity: .6; } }
.phead { flex: none; display: flex; align-items: center; padding: 8px 10px 6px; }
.phead .pt { flex: 1; text-align: center; font-size: 17px; font-weight: 600; }
.pbody { flex: 1; overflow-y: auto; padding: 6px 18px calc(24px + env(safe-area-inset-bottom)); }
.pbody.frame-body { padding: 0; overflow: hidden; }
.pbody.frame-body iframe { width: 100%; height: 100%; border: 0; display: block; background: var(--bg); }
.seg { flex: none; display: flex; gap: 4px; margin: 2px 18px 10px; padding: 4px; border-radius: 999px; background: var(--panel); }
.seg button { flex: 1; padding: 6px 0; border-radius: 999px; font-size: 14px; color: var(--dim); }
.seg button.on { background: var(--card); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.08); font-weight: 600; }
.empty { text-align: center; color: var(--dim); padding: 40px 0; font-size: 14px; }
.err-line { color: var(--red); font-size: 13px; padding: 8px 0; }
.card { background: var(--card); border-radius: 18px; padding: 14px 16px; margin-bottom: 12px; box-shadow: inset 0 0 0 1px var(--line); }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; font-size: 14.5px; }
.kv span:first-child { color: var(--dim); }
.bar { height: 5px; border-radius: 3px; background: var(--panel); overflow: hidden; margin: 6px 0 4px; }
.bar i { display: block; height: 100%; background: var(--accent-soft); border-radius: 3px; }
.rings { display: flex; gap: 12px; }
.ring { flex: 1; text-align: center; background: var(--card); border-radius: 18px; padding: 14px 8px 12px; box-shadow: inset 0 0 0 1px var(--line); }
.ring svg { width: 96px; height: 96px; margin: 0 auto; }
.ring .lb { font-size: 14px; font-weight: 600; margin-top: 4px; }
.ring .dim { font-size: 12px; }
.note-line { font-size: 13px; color: var(--dim); margin: 10px 2px 14px; }
.daynav { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.daynav select { flex: 1; font: inherit; font-size: 14.5px; color: var(--text); background: var(--panel); border: 0; border-radius: 12px; padding: 8px 10px; }
.daynav button { width: 36px; height: 36px; border-radius: 50%; background: var(--panel); display: grid; place-items: center; }
.daynav button:disabled { opacity: .35; }
.diary h3 { font-family: var(--serif); font-size: 19px; margin: 18px 0 6px; }
.diary p { margin: 0 0 12px; white-space: pre-wrap; line-height: 1.85; }
.ev { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.ev .stripe { width: 4px; border-radius: 2px; flex: none; }
.ev .when { font-size: 12.5px; color: var(--dim); }
.ev .tag { font-size: 11px; color: #fff; padding: 1px 7px; border-radius: 999px; margin-left: 6px; }
.ev details { font-size: 13.5px; color: var(--dim); margin-top: 4px; }
.rem { padding: 12px 0; border-bottom: 1px solid var(--line); }
.rem .when { font-size: 12.5px; color: var(--dim); }

/* 相册 */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.grid button { aspect-ratio: 1; border-radius: 6px; overflow: hidden; background: var(--panel); }
.grid img { width: 100%; height: 100%; object-fit: cover; display: block; }
.grid .st img { object-fit: contain; padding: 6px; }
.more { display: block; margin: 16px auto; padding: 8px 18px; border-radius: 999px; background: var(--panel); font-size: 14px; color: var(--dim); }
.viewer-go { position: absolute; left: 50%; bottom: calc(28px + env(safe-area-inset-bottom)); transform: translateX(-50%); padding: 10px 20px; border-radius: 999px; font-size: 15px; color: var(--text); }

/* 搜索 */
.searchbar { flex: none; display: flex; align-items: center; gap: 8px; margin: 2px 18px 10px; padding: 9px 14px; border-radius: 999px; background: var(--panel); color: var(--dim); }
.searchbar input { flex: 1; border: 0; outline: 0; background: transparent; font: inherit; color: var(--text); }
.hit { display: block; width: 100%; text-align: left; padding: 12px 0; border-bottom: 1px solid var(--line); }
.hit .who { font-size: 12.5px; color: var(--dim); }
.hit .tx { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; font-size: 15px; line-height: 1.6; }
.hit mark { background: color-mix(in srgb, var(--accent) 22%, transparent); color: inherit; border-radius: 3px; padding: 0 1px; }

/* 设置 */
.group-label { font-size: 13px; color: var(--dim); margin: 18px 4px 6px; }
.group { background: var(--card); border-radius: 18px; box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.grow { display: flex; align-items: center; gap: 12px; padding: 13px 16px; min-height: 52px; }
.grow + .grow { border-top: 1px solid var(--line); }
.grow .lbl { flex: 1; min-width: 0; }
.grow .lbl small { display: block; font-size: 12.5px; color: var(--dim); line-height: 1.4; }
.toggle { position: relative; width: 48px; height: 28px; border-radius: 999px; background: var(--line); flex: none; transition: background .2s; }
.toggle::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s; }
.toggle.on { background: var(--accent); }
.toggle.on::after { transform: translateX(20px); }
.grow .seg { margin: 0; flex: none; }
.grow .seg button { padding: 4px 12px; flex: none; }
.num { width: 58px; font: inherit; text-align: center; color: var(--text); background: var(--panel); border: 0; border-radius: 10px; padding: 6px 4px; }
.grow select { font: inherit; color: var(--text); background: var(--panel); border: 0; border-radius: 10px; padding: 6px 8px; }
.saveBtn { padding: 6px 14px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 14px; flex: none; }

/* 正在输入：在他那一侧，像一条消息 */
.typing-row .typing { display: inline-flex; align-items: center; gap: 8px; color: var(--dim); font-size: 14px; padding: 4px 0; }
.typing-row .dots { display: inline-flex; gap: 4px; }
.typing-row .dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent-soft); animation: blink 1.2s infinite; }
.typing-row .dots i:nth-child(2) { animation-delay: .2s; }
.typing-row .dots i:nth-child(3) { animation-delay: .4s; }

/* 输入框左下角：模型（照 dwell-on-something 的 pill + 底部面板） */
.modelChip { display: flex; align-items: center; height: 36px; padding: 0 14px; border-radius: 999px; background: var(--panel); font-size: 14px; color: var(--text); white-space: nowrap; flex: none; }
.modelChip:active { opacity: .7; }
.modelChip:empty { display: none; }
.msheetWrap { position: fixed; inset: 0; z-index: 55; display: none; }
.msheetWrap.open { display: flex; align-items: flex-end; justify-content: center; }
.msheetWrap .shade { position: absolute; inset: 0; background: var(--overlay); }
.msheet {
  position: relative; width: 100%; max-width: 640px; max-height: 86vh; min-height: 300px;
  background: var(--bg); border-radius: 24px 24px 0 0; display: flex; flex-direction: column;
  animation: rise .22s ease;
}
.msheet .head { flex: none; display: flex; align-items: center; padding: 16px 16px 12px; }
.msheet .hbtn { width: 40px; height: 40px; flex: none; display: flex; align-items: center; justify-content: center; }
.msheet .hbtn svg { width: 19px; height: 19px; }
.msheet .ht { flex: 1; text-align: center; font-size: 18px; font-weight: 700; padding: 0 8px; }
.msheet .hspace { width: 40px; flex: none; }
.msheet .body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 6px 20px calc(20px + env(safe-area-inset-bottom)); }
.msheet .mgroup { background: var(--panel); border-radius: 18px; overflow: hidden; }
.msheet .mgap { height: 14px; }
.msheet .mrow { display: block; width: 100%; text-align: left; padding: 15px 18px; }
.msheet .mrow + .mrow, .msheet .mlink + .mlink { border-top: 1px solid var(--line); }
.msheet .mrow .mn { font-size: 16.5px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.msheet .mrow .ck { margin-left: auto; color: var(--accent); width: 18px; height: 18px; }
.msheet .mrow .md { font-size: 13.5px; color: var(--dim); margin-top: 2px; }
.msheet .mlink { display: flex; align-items: center; width: 100%; padding: 15px 18px; font-size: 16px; text-align: left; }
.msheet .mlink .val { margin-left: auto; color: var(--dim); font-size: 15px; }
.msheet .mlink .chev { color: var(--dim); font-size: 14px; margin-left: 6px; }
.msheet .mrow:active, .msheet .mlink:active { background: rgba(128,128,128,.08); }
.msheet .gnote { font-size: 13.5px; color: var(--dim); padding: 12px 6px 0; line-height: 1.6; }

/* 右上角上下文小圈 + 上下文面板 + 压缩确认 */
.ctxSpacer { visibility: hidden; }
.ctxRing svg { width: 22px; height: 22px; }
.ctxRing .trk { stroke: var(--line); stroke-width: 3; }
.ctxRing .val { stroke: var(--dim); stroke-width: 3; stroke-linecap: round; transition: stroke-dasharray .4s; }
.ctxRing.warn .val, .ubar.warn i { stroke: #d4a017; background: #d4a017; }
.ctxRing.hot .val, .ubar.hot i { stroke: var(--red); background: var(--red); }
.ucard { background: var(--panel); border-radius: 18px; padding: 16px 18px; }
.ucard + .ucard { margin-top: 10px; }
.ucard .utop { display: flex; align-items: baseline; justify-content: space-between; font-size: 15.5px; font-weight: 600; }
.ucard .utop .up { font-size: 14px; color: var(--dim); font-weight: 400; }
.ubar { height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; margin: 10px 0 8px; }
.ubar i { display: block; height: 100%; border-radius: 999px; background: var(--dim); }
.ucard .ufoot { font-size: 13.5px; color: var(--dim); }
.ucard hr { border: 0; border-top: 1px solid var(--line); margin: 14px 0; }
.msheet .glabel { font-size: 13.5px; color: var(--dim); padding: 18px 4px 8px; }
.compactBtn { display: block; width: 100%; margin-top: 18px; padding: 14px; border-radius: 16px; background: var(--panel); font-size: 16px; color: var(--text); }
.compactBtn:disabled { opacity: .4; }
.confirmWrap { position: fixed; inset: 0; z-index: 65; display: flex; align-items: center; justify-content: center; padding: 24px; }
.confirmWrap[hidden] { display: none; }
.confirmWrap .shade { position: absolute; inset: 0; background: var(--overlay); }
.confirmBox { position: relative; width: 100%; max-width: 320px; background: var(--card); border-radius: 22px; padding: 22px 20px 16px; animation: rise .18s ease; }
.confirmBox .ct { font-size: 17px; font-weight: 700; text-align: center; }
.confirmBox .cd { font-size: 14px; color: var(--dim); line-height: 1.65; margin-top: 10px; white-space: pre-line; }
.confirmBox .cbtns { display: flex; gap: 10px; margin-top: 18px; }
.confirmBox .cbtns button { flex: 1; padding: 12px 0; border-radius: 14px; background: var(--panel); font-size: 15.5px; }
.confirmBox .cbtns .danger { background: var(--accent); color: #fff; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--dim); font-size: 12.5px; margin: 26px 8px 14px; letter-spacing: .1em; }
.divider::before, .divider::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.compactBtn + .compactBtn { margin-top: 10px; }
.compactBtn.primary { background: var(--text); color: var(--bg); }
.undoLink { display: block; margin: 14px auto 0; font-size: 14px; color: var(--dim); text-decoration: underline; text-underline-offset: 3px; }
.confirmBox .cbtns button:disabled { opacity: .4; }

/* 看板选日期：月历 */
.dayPick { flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; height: 36px; border-radius: 12px; background: var(--panel); font-size: 15px; color: var(--text); }
.dayPick svg { width: 16px; height: 16px; color: var(--dim); }
.msheet.cal { min-height: 0; }
.calHead { display: flex; align-items: center; justify-content: space-between; padding: 0 2px 10px; }
.calHead b { font-size: 16.5px; }
.calHead button { width: 38px; height: 38px; border-radius: 50%; background: var(--panel); display: grid; place-items: center; }
.calHead button:disabled { opacity: .3; }
.calWeek, .calGrid { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; }
.calWeek span { font-size: 12.5px; color: var(--dim); padding: 6px 0; }
.calGrid { gap: 4px 0; }
.calGrid button { height: 42px; margin: 0 auto; width: 42px; border-radius: 50%; font-size: 15.5px; color: var(--dim); opacity: .45; position: relative; }
.calGrid button.has { color: var(--text); opacity: 1; font-weight: 600; }
.calGrid button.has::after { content: ""; position: absolute; left: 50%; bottom: 6px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--accent); }
.calGrid button.today { box-shadow: inset 0 0 0 1.5px var(--line); }
.calGrid button.on { background: var(--accent); color: #fff; }
.calGrid button.on::after { background: #fff; }
.calLatest { display: block; width: 100%; margin-top: 16px; padding: 13px; border-radius: 16px; background: var(--panel); font-size: 15.5px; }
.daynav .dayPick { flex: 1; width: auto; height: 36px; border-radius: 12px; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 0 12px; white-space: nowrap; }
.setNote { font-size: 13px; color: var(--dim); padding: 8px 6px 0; line-height: 1.6; }

/* 开屏图：打开 App 时先铺满，一秒多后淡出（设置页可换） */
#splash { position: fixed; inset: 0; z-index: 95; background: var(--bg); transition: opacity .45s ease; }
#splash img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .25s; }
#splash.ready img { opacity: 1; }
#splash.out { opacity: 0; pointer-events: none; }
/* 设置页：图标、开屏图预览 */
.brandPrev { width: 44px; height: 44px; border-radius: 11px; object-fit: cover; background: var(--panel); flex: none; }
.brandPrev.tall { width: 34px; height: 60px; border-radius: 8px; }
.brandBtns { display: flex; gap: 6px; flex: none; }
.brandBtns .ghost { padding: 6px 12px; border-radius: 999px; background: var(--panel); font-size: 14px; }
.brandBtns { align-items: center; } .brandBtns .ghost { height: 32px; padding: 0 12px; white-space: nowrap; }

/* 他的表情包 */
.xkList { display: flex; flex-direction: column; gap: 8px; }
.xkItem { display: flex; gap: 12px; align-items: center; width: 100%; text-align: left; padding: 10px; border-radius: 16px; background: var(--panel); }
.xkItem img { width: 64px; height: 64px; object-fit: contain; flex: none; border-radius: 10px; background: var(--card); }
.xkTxt { flex: 1; min-width: 0; }
.xkTags { display: flex; flex-wrap: wrap; gap: 4px; }
.xkTags span { font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--card); color: var(--dim); }
.xkDesc { font-size: 14.5px; line-height: 1.5; margin-top: 5px; color: var(--text); }
.xkDesc i { color: var(--dim); }
.xkBig { display: block; width: 140px; height: 140px; object-fit: contain; margin: 0 auto 4px; border-radius: 14px; background: var(--panel); }
.xkChosen, .xkPool { display: flex; flex-wrap: wrap; gap: 6px; }
.xkPool { margin-top: 10px; max-height: 132px; overflow-y: auto; }
.xkChip { padding: 6px 12px; border-radius: 999px; background: var(--panel); font-size: 14px; color: var(--text); }
.xkChip.on { background: var(--accent); color: #fff; }
.xkHint { font-size: 13.5px; color: var(--dim); padding: 4px 2px; }
.xkInput { display: block; width: 100%; margin-top: 10px; padding: 11px 14px; border-radius: 14px; border: 0; background: var(--panel); color: var(--text); font: inherit; font-size: 15px; outline: none; resize: none; }
.xkChosen + .xkInput { margin-top: 12px; }
.xkDel { color: var(--red); }

/* 一起听 */
.mcard { display: flex; align-items: center; gap: 12px; width: 260px; max-width: 100%; padding: 10px 12px 10px 10px; border-radius: 18px; background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); margin: 2px 0; cursor: pointer; }
.mcard img, .mcard .mcover { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; flex: none; background: var(--card); display: grid; place-items: center; color: var(--dim); }
.mcard .mcover svg { width: 22px; height: 22px; }
.mcard.on { box-shadow: inset 0 0 0 1.5px var(--accent); }
.minfo { flex: 1; min-width: 0; text-align: left; }
.mname { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.martist { font-size: 12.5px; color: var(--dim); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mvip { font-size: 10.5px; color: var(--accent); border: 1px solid var(--accent); border-radius: 4px; padding: 0 3px; margin-left: 6px; vertical-align: 1px; }
.mplay { width: 36px; height: 36px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; flex: none; }
.mplay svg, .mbBtn svg, .mpBig svg { width: 14px; height: 14px; fill: currentColor; stroke: none; }
.mbar { position: fixed; z-index: 21; left: 50%; transform: translateX(-50%); top: calc(62px + env(safe-area-inset-top)); width: min(92vw, 420px); display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 6px; border-radius: 999px; cursor: pointer; }
.mbar[hidden] { display: none; }
.mbar img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; flex: none; }
.mbTxt { flex: 1; min-width: 0; }
.mbName { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mbLine { font-size: 12px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mbBtn { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex: none; color: var(--text); }
.mbBtn:first-of-type { background: var(--accent); color: #fff; }
.mbX svg { width: 16px; height: 16px; fill: none; stroke: var(--dim); }
body.hasMbar #msgs { padding-top: 56px; }
.mpSheet { height: 86vh; }
.mpTop { display: flex; gap: 14px; align-items: center; }
.mpCover { width: 84px; height: 84px; border-radius: 14px; object-fit: cover; background: var(--panel); flex: none; }
.mpMeta { min-width: 0; }
.mpName { font-size: 18px; font-weight: 700; }
.mpArtist { font-size: 13.5px; color: var(--dim); margin-top: 4px; }
.mpRange { width: 100%; margin: 18px 0 2px; accent-color: var(--accent); }
.mpTimes { display: flex; justify-content: space-between; font-size: 12px; color: var(--dim); font-variant-numeric: tabular-nums; }
.mpCtl { display: flex; justify-content: center; margin: 6px 0 10px; }
.mpBig { width: 58px; height: 58px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; }
.mpBig svg { width: 20px; height: 20px; }
.mpLyrics { height: calc(86vh - 330px); min-height: 160px; overflow-y: auto; position: relative; text-align: center; padding: 30% 0; -webkit-mask-image: linear-gradient(transparent, #000 18%, #000 82%, transparent); mask-image: linear-gradient(transparent, #000 18%, #000 82%, transparent); }
.mpL { font-size: 15.5px; line-height: 1.5; color: var(--dim); padding: 7px 8px; transition: color .25s, transform .25s; cursor: pointer; }
.mpL small { display: block; font-size: 12.5px; opacity: .8; }
.mpL.on { color: var(--text); font-weight: 600; transform: scale(1.04); }
.mpNoLyric { color: var(--dim); padding-top: 20px; }
.mAcct { padding: 4px 0; }
.mAcct .grow { gap: 12px; }
.mAva { width: 40px; height: 40px; border-radius: 50%; flex: none; }
.mLink { color: var(--accent); font-size: 14.5px; padding: 8px 4px; flex: none; }
.mLink:disabled { color: var(--dim); }
.mLogin { padding: 14px 16px 16px; }
.mTip { font-size: 13.5px; color: var(--dim); line-height: 1.6; }
.mRowIn { display: flex; gap: 10px; align-items: center; }
.mRowIn .xkInput { flex: 1; }
.mRowIn .mLink { margin-top: 10px; }
.mQrBtn { display: block; margin: 12px auto 0; }
.mQr { text-align: center; margin-top: 10px; }
.mQr img { width: 180px; height: 180px; display: block; margin: 0 auto 10px; border-radius: 10px; }
.mQr a.compactBtn { text-decoration: none; text-align: center; margin: 0 0 10px; }
.mSearch { margin: 0 0 10px; }
.msResults { display: flex; flex-direction: column; gap: 6px; }
.msRow { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px; border-radius: 14px; }
.msRow img { width: 46px; height: 46px; border-radius: 8px; object-fit: cover; flex: none; background: var(--panel); }
.msRow:active, .msRow.on { background: var(--panel); }
.msRow.on .mname { color: var(--accent); }
.mSteps { text-align: left; display: inline-block; margin: 2px 0 6px; }
.mState { margin-top: 8px; color: var(--accent); }
.mSms { margin-top: 6px; }
.mLogin > .compactBtn { margin-top: 14px; }

/* 歌单 + 一起听时长 */
.mpCtl { align-items: center; gap: 28px; }
.mpSide { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: var(--text); }
.mpSide svg { width: 20px; height: 20px; fill: currentColor; }
.mpSide:active { background: var(--panel); }
.mpAdd { display: block; margin: 0 auto 6px; font-size: 13.5px; color: var(--accent); padding: 6px 14px; border-radius: 999px; background: var(--panel); }
.mpAdd.on { color: var(--dim); }
.mStat { text-align: center; padding: 6px 0 16px; }
.mStatBig { font-size: 30px; font-weight: 700; color: var(--accent); letter-spacing: .02em; }
.mStatSub { font-size: 13px; color: var(--dim); margin-top: 4px; }
.mPlHead { display: flex; align-items: center; justify-content: space-between; }
.mPlHead .mLink { font-size: 13.5px; padding: 0 4px; }
.msRow { cursor: pointer; }
.mBy { font-size: 11.5px; color: var(--dim); background: var(--panel); border-radius: 999px; padding: 2px 8px; flex: none; }
.mBy.him { color: var(--accent); }
.mRm, .mAddBtn { width: 34px; height: 34px; display: grid; place-items: center; flex: none; color: var(--dim); font-size: 15px; border-radius: 50%; }
.mAddBtn { color: var(--accent); font-size: 20px; }
.mRm:active, .mAddBtn:active { background: var(--panel); }

/* 工具调用：一行一个工具，点开看详情 */
.tlist { margin: 4px 0 2px 4px; padding-left: 10px; border-left: 2px solid var(--line); display: flex; flex-direction: column; gap: 2px; max-width: 100%; }
.trow, .tres { display: flex; align-items: baseline; gap: 10px; width: 100%; text-align: left; padding: 4px 6px; border-radius: 8px; min-width: 0; }
.trow:active, .tres:active { background: rgba(128,128,128,.1); }
.tname { color: var(--accent); font-size: 14px; flex: none; }
.targ, .ttxt { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 1; }
.tres { padding-left: 16px; }
.tarrow { color: var(--dim); flex: none; font-size: 13px; }
.tmark { flex: none; font-size: 13px; }
.tres.ok .tmark, .tmark.ok { color: #3f9a5a; }
.tres.err .tmark, .tmark.err { color: var(--red, #c0392b); }
.tres.run .ttxt { font-family: inherit; }
.tsheetWrap { position: fixed; inset: 0; z-index: 70; display: flex; align-items: center; justify-content: center; padding: 20px; }
.tsheetWrap[hidden] { display: none; }
.tsheetWrap .shade { position: absolute; inset: 0; background: rgba(0,0,0,.35); }
.tsheet { position: relative; width: 100%; max-width: 520px; max-height: 80vh; background: var(--card); border-radius: 22px; padding: 18px 18px 14px; display: flex; flex-direction: column; box-shadow: 0 10px 40px rgba(0,0,0,.2); }
.thead { display: flex; align-items: center; gap: 10px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.ttitle { flex: 1; font-size: 16.5px; min-width: 0; word-break: break-all; line-height: 1.4; }
.ttitle .tmark { margin-right: 6px; font-size: 16px; }
.tcopy { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; color: var(--accent); flex: none; }
.tcopy svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.tbody { overflow-y: auto; padding-top: 6px; flex: 1; }
.tlabel { font-size: 12.5px; color: var(--dim); margin: 10px 2px 6px; }
.tpre { margin: 0; padding: 12px; border-radius: 12px; background: var(--panel); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; line-height: 1.55; white-space: pre-wrap; word-break: break-all; color: var(--text); }
.tclose { align-self: flex-end; margin-top: 12px; padding: 10px 26px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 15px; }

/* 一起听页（重排） */
#musicBody { padding-top: 0; }
.mpgTop { position: sticky; top: 0; z-index: 2; background: var(--bg); padding: 4px 0 8px; }
.mpgSearch { margin: 0; position: relative; }
.mpgClear { width: 26px; height: 26px; border-radius: 50%; color: var(--dim); font-size: 13px; flex: none; }
.mpgStat { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--dim); padding: 6px 4px 14px; }
.mpgStat svg { width: 15px; height: 15px; color: var(--accent); flex: none; }
.mpgStat b { color: var(--accent); font-weight: 600; }
.mpgHead { display: flex; align-items: center; justify-content: space-between; padding: 0 4px 6px; }
.mpgTitle { font-size: 15.5px; font-weight: 600; }
.mpgTitle em { font-style: normal; font-weight: 400; font-size: 13px; color: var(--dim); margin-left: 4px; }
.mpgAct { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: var(--accent); padding: 6px 12px; border-radius: 999px; background: var(--panel); }
.mpgAct svg { width: 11px; height: 11px; fill: currentColor; stroke: none; }
.mpgRnd { margin-left: auto; margin-right: 6px; }
.mpgAct.mpgRnd svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.mpSide.mpMode svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; width: 19px; height: 19px; }
.mpSide.mpMode { color: var(--dim); }
.mpSide.mpMode.on { color: var(--accent); }
.mpGhost { visibility: hidden; }
.mpgList { gap: 0; }
.mpgList .msRow { padding: 7px 4px; border-radius: 12px; gap: 12px; }
.mpgList .msRow img { width: 46px; height: 46px; border-radius: 10px; }
.mpgList .mname { font-size: 15px; font-weight: 500; display: flex; align-items: center; gap: 6px; }
.mnameTxt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mpgList .martist { font-size: 12.5px; margin-top: 3px; }
.mpgList .mvip { font-size: 9.5px; padding: 0 3px; margin-left: 6px; opacity: .7; border-width: 1px; vertical-align: 1px; }
.mByHim { color: var(--accent); margin-right: 6px; }
.mpgList .msRow.on { background: var(--panel); }
.mpgList .msRow.on .mname { color: var(--accent); }
.mEq { display: none; align-items: flex-end; gap: 2px; height: 11px; flex: none; }
.msRow.on .mEq { display: inline-flex; }
.mEq b { width: 2.5px; background: var(--accent); border-radius: 1px; animation: mEq 1s ease-in-out infinite; }
.mEq b:nth-child(2) { animation-delay: .2s; } .mEq b:nth-child(3) { animation-delay: .4s; }
@keyframes mEq { 0%, 100% { height: 30%; } 50% { height: 100%; } }
.mMore { width: 34px; height: 34px; border-radius: 50%; color: var(--dim); opacity: .6; font-size: 18px; letter-spacing: 1px; flex: none; }
.mMore:active { background: var(--line); }
.mAddBtn.done { color: var(--dim); font-size: 16px; }
.mpgAcct { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 10px; font-size: 12.5px; color: var(--dim); padding: 26px 4px 8px; text-align: center; }
.mpgAcct .mLink { font-size: 12.5px; padding: 4px; }
.mpgAcct .mLogin { width: 100%; text-align: left; padding: 0; margin-top: 6px; }

/* 选项卡片 */
.choice { width: min(300px, 78vw); background: var(--card); border-radius: 18px; padding: 12px; box-shadow: inset 0 0 0 1px var(--line); }
.choice .chq { font-size: 15px; font-weight: 600; margin: 2px 4px 10px; line-height: 1.45; }
.choice .cho { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 10px 12px; margin-top: 6px; border-radius: 12px; background: var(--bg); box-shadow: inset 0 0 0 1px var(--line); color: var(--text); transition: all .2s; }
.choice .cho:first-of-type { margin-top: 0; }
.choice .chl { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.choice .chl b { font-weight: 500; font-size: 14.5px; line-height: 1.35; }
.choice .chl small { color: var(--dim); font-size: 12.5px; line-height: 1.35; margin-top: 2px; }
.choice .chk { width: 20px; height: 20px; border-radius: 50%; flex: none; display: grid; place-items: center; font-size: 12px; box-shadow: inset 0 0 0 1.5px var(--line); }
.choice .cho:not(:disabled):active { transform: scale(.98); }
.choice .cho.on { background: var(--accent); color: #fff; box-shadow: none; }
.choice .cho.on small { color: rgba(255,255,255,.8); }
.choice .cho.on .chk { background: #fff; color: var(--accent); box-shadow: none; }
.choice.done .cho:not(.on) { opacity: .45; }

/* 关于我 */
#page-about { z-index: 51; }
#page-board.over { z-index: 51; }
.aboutSave { width: auto; padding: 0 14px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 14px; height: 32px; }
.afield { display: flex; align-items: flex-start; gap: 12px; padding: 11px 14px; border-top: 1px solid var(--line); }
.afield:first-child { border-top: 0; }
.afield span { flex: none; width: 72px; font-size: 14px; color: var(--dim); padding-top: 2px; }
.afield input, .afield textarea, .aday input, .aother { flex: 1; min-width: 0; border: 0; background: none; font: inherit; font-size: 15px; color: var(--text); outline: none; resize: none; padding: 0; line-height: 1.5; }
.aother { display: block; width: 100%; padding: 12px 14px; box-sizing: border-box; min-height: 80px; }
.adays { padding: 6px 14px 10px; }
.aday { display: flex; gap: 8px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.aday input:first-child { flex: 0 0 30%; }
.adel { flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--panel); color: var(--dim); font-size: 16px; line-height: 1; }
.aadd { margin-top: 8px; padding: 6px 2px; color: var(--accent); font-size: 14px; background: none; }

/* 收藏：挑消息 */
/* 挑选收藏：像微信多选，每段话左边一个圆圈，选中变成打勾；一段话（连着的几条）只在第一条前面画一个 */
body.picking .row[data-id] { position: relative; padding-left: 38px; cursor: pointer; }
body.picking .row.pickhead::before { content: ""; position: absolute; left: 6px; top: 4px; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--dim); box-sizing: border-box; display: grid; place-items: center; font-size: 13px; font-weight: 700; color: #fff; }
body.picking .row.picked.pickhead::before { content: "✓"; background: var(--accent); border-color: var(--accent); }
body.picking .row[data-id] { cursor: pointer; }
body.picking #input, body.picking .ctlrow, body.picking #replyBar, body.picking #tray { display: none !important; }
.pickbar { display: flex; flex-direction: column; gap: 8px; padding: 2px 2px 4px; }
.pickTop { display: flex; align-items: baseline; gap: 10px; font-size: 15px; }
.pickTop .dim { font-size: 12.5px; color: var(--dim); }
#pickNote { border: 0; outline: none; background: var(--panel); border-radius: 12px; padding: 10px 12px; font: inherit; font-size: 15px; color: var(--text); }
.pickBtns { display: flex; gap: 8px; }
.pickBtns button { flex: 1; padding: 10px 0; border-radius: 999px; font-size: 15px; }
.pickNo { background: var(--panel); color: var(--text); }
.pickYes { background: var(--accent); color: #fff; font-weight: 600; }
.pickYes:disabled { opacity: .45; }
.favchip { align-self: flex-end; font-size: 12.5px; color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); padding: 4px 10px; border-radius: 999px; margin-bottom: 4px; }

/* 收藏夹页 */
.favcard { background: var(--card); border-radius: 18px; box-shadow: inset 0 0 0 1px var(--line); padding: 12px 14px; margin: 0 2px 12px; }
.favhead { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.favhead b { font-size: 15px; font-weight: 600; }
.favhead span { flex: none; font-size: 12px; color: var(--dim); }
.favmsgs { display: flex; flex-direction: column; gap: 6px; }
.favline { max-width: 85%; font-size: 14px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; display: flex; flex-direction: column; gap: 4px; }
.favline.her { align-self: flex-end; background: var(--user-bubble); padding: 6px 11px; border-radius: 14px; }
.favline.him { align-self: flex-start; color: var(--text); padding: 2px 2px; }
.favline img { max-width: 140px; max-height: 160px; border-radius: 10px; object-fit: cover; }
.favbtns { display: flex; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.favbtns button { flex: 1; padding: 7px 0; border-radius: 999px; background: var(--panel); font-size: 13.5px; color: var(--text); }
.favbtns button.accent { background: var(--accent); color: #fff; }
.favbtns button.danger { flex: 0 0 64px; color: var(--red); }

/* 学习窗：不用表情包 */
body.study #stickerBtn { display: none; }

/* ---------- 五子棋：聊天窗顶上的棋盘 ---------- */
#docks {
  position: fixed; z-index: 19; left: 50%; transform: translateX(-50%);
  top: calc(58px + env(safe-area-inset-top)); width: min(calc(100% - 20px), 440px);
  display: flex; flex-direction: column; gap: 6px;
}
.gameDock, .slotDock {
  border-radius: 20px; padding: 6px 8px 8px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--card) 86%, transparent), color-mix(in srgb, var(--card) 74%, transparent));
  -webkit-backdrop-filter: blur(18px) saturate(1.5); backdrop-filter: blur(18px) saturate(1.5);
  box-shadow: var(--glass-shadow);
}
.gameDock.collapsed, .slotDock.collapsed { padding-bottom: 6px; }
.gbtn:disabled { opacity: .55; }
.sreels { display: grid; grid-template-columns: repeat(var(--n), 1fr); gap: 6px; margin-top: 6px; }
.scol { display: flex; flex-direction: column; align-items: stretch; gap: 3px; min-width: 0; padding: 5px 5px 6px; border-radius: 14px;
  background: linear-gradient(160deg, #d77a55, #b4532f); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25); }
.scol .sname { font-size: 10.5px; color: #ffe9dc; text-align: center; letter-spacing: .1em; }
.scol .swin { display: block; height: 46px; overflow: hidden; border-radius: 9px; background: #fffaf3;
  box-shadow: inset 0 5px 6px -4px rgba(0, 0, 0, .25), inset 0 -5px 6px -4px rgba(0, 0, 0, .25); }
.scol .strip { display: block; will-change: transform; }
.scol .cell { height: 46px; display: grid; place-items: center; padding: 0 3px; text-align: center; font-size: 13.5px; font-weight: 600; color: #3a2a20; line-height: 1.15; word-break: break-all; }
.scol.toy .swin { background: #fff1f3; }
.scol.toy .cell { color: #b0405a; }
.scol.changed { box-shadow: 0 0 0 2px #f2bf55, inset 0 1px 0 rgba(255, 255, 255, .25); }
.scol:active { transform: scale(.97); }
.gbar { display: flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 2px 0 6px; }
.gdot { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.gdot.black { background: radial-gradient(circle at 35% 30%, #6b6b6b, #141414); }
.gdot.white { background: radial-gradient(circle at 35% 30%, #fff, #d9d4ca); box-shadow: inset 0 0 0 .5px #bdb5a6; }
.gtitle { flex: 1; min-width: 0; font-weight: 600; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gtitle small { font-weight: 400; color: var(--dim); font-size: 13px; }
.gbtn { flex: none; height: 30px; padding: 0 12px; border-radius: 999px; background: var(--panel); font-size: 13.5px; color: var(--text); }
.gbtn.icon { width: 30px; padding: 0; font-size: 15px; color: var(--dim); }
.gbtn.primary { background: var(--accent); color: #fff; font-weight: 600; }
.gwrap { margin-top: 6px; border-radius: 14px; overflow: hidden; background: #e6c48e;
  background: linear-gradient(135deg, #ebcd9a, #ddb77c); box-shadow: inset 0 0 0 1px rgba(122, 90, 46, .25); }
.gboard { display: block; width: 100%; height: auto; max-height: min(52vh, 420px); margin: 0 auto; touch-action: manipulation; }
.gboard line { stroke: #8a6a3a; stroke-width: .8; }
.gboard .star { fill: #7a5a2e; }
.gboard .lbl { fill: #7a5a2e; font-size: 8.5px; text-anchor: middle; font-family: system-ui, sans-serif; opacity: .85; }
.gboard .stone { filter: drop-shadow(0 1px 1.2px rgba(0, 0, 0, .35)); }
.gboard .stone.white { stroke: #b9b0a0; stroke-width: .5; }
.gboard .stone.win { stroke: var(--accent); stroke-width: 2.4; }
.gboard .stone.preview { opacity: .5; }
.gboard .lastdot { fill: var(--accent); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .gwrap { filter: brightness(.82) saturate(.9); } }
:root[data-theme="dark"] .gwrap { filter: brightness(.82) saturate(.9); }

.gamechip { text-align: center; font-size: 12.5px; color: var(--dim); margin: 10px 0; }
.gamechip::before { content: "♟ "; }
.gamechip.him { color: color-mix(in srgb, var(--accent) 75%, var(--dim)); }

.gcard { display: flex; gap: 14px; align-items: center; padding: 16px; border-radius: 18px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.gcicon svg { width: 52px; height: 52px; display: block; }
.gctext { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.gctext b { font-size: 16px; }
.gctext span { font-size: 13px; color: var(--dim); }
.gcbtns { margin-top: 14px; }

/* ---------- 摇摇机 ---------- */
.gcardBtn { width: 100%; text-align: left; margin-top: 18px; }
.gcardBtn .chev { margin-left: auto; color: var(--dim); font-size: 20px; }
.slotEditBtn { font-size: 14px; width: auto; padding: 0 10px; color: var(--accent); }
.slotMachine {
  position: relative; margin: 6px 0 16px; padding: 18px 12px 22px; border-radius: 26px;
  background: linear-gradient(160deg, #d77a55, #b4532f 70%, #9c4527);
  box-shadow: 0 10px 24px rgba(150, 70, 40, .28), inset 0 1px 0 rgba(255, 255, 255, .3), inset 0 -3px 0 rgba(0, 0, 0, .12);
}
.slotLights { display: flex; justify-content: space-between; padding: 0 10px 12px; }
.slotLights i { width: 8px; height: 8px; border-radius: 50%; background: #ffe2a8; box-shadow: 0 0 8px #ffd27a; animation: slotBlink 1.6s infinite; }
.slotLights i:nth-child(even) { animation-delay: .8s; }
@keyframes slotBlink { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
.slotReels { display: grid; grid-template-columns: repeat(var(--n), 1fr); gap: 8px; }
.slotCol { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.slotName { font-size: 12px; color: #ffe9dc; letter-spacing: .1em; }
.slotWin {
  width: 100%; height: 58px; overflow: hidden; border-radius: 12px; background: #fffaf3;
  box-shadow: inset 0 6px 8px -4px rgba(0, 0, 0, .25), inset 0 -6px 8px -4px rgba(0, 0, 0, .25);
}
.slotWin .strip { will-change: transform; }
.slotWin .cell { height: 58px; display: grid; place-items: center; padding: 0 4px; text-align: center; font-size: 14.5px; font-weight: 600; color: #3a2a20; line-height: 1.2; word-break: break-all; }
.slotCol.toy .slotWin { background: #fff1f3; }
.slotCol.toy .cell { color: #b0405a; }
.slotCol.landed .slotWin { animation: slotLand .45s; }
@keyframes slotLand { 0% { transform: translateY(0); } 35% { transform: translateY(3px); } 100% { transform: translateY(0); } }
.slotLock { font-size: 11.5px; color: #ffe9dc; padding: 3px 8px; border-radius: 999px; background: rgba(0, 0, 0, .12); }
.slotLock.on { background: #ffe2a8; color: #7a3b1f; font-weight: 600; }
.slotSpin {
  display: block; margin: 18px auto 0; width: 132px; height: 48px; border-radius: 999px;
  background: linear-gradient(180deg, #ffe7a3, #f2bf55); color: #6b3416; font-size: 17px; font-weight: 700; letter-spacing: .15em;
  box-shadow: 0 4px 0 #c98f2a, 0 8px 16px rgba(0, 0, 0, .2);
}
.slotSpin:active { transform: translateY(3px); box-shadow: 0 1px 0 #c98f2a, 0 4px 10px rgba(0, 0, 0, .2); }
.slotSend { margin-bottom: 6px; }
.slotChips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 8px; }
.slotToyRow { margin: 12px 0; padding: 12px; border-radius: 14px; background: var(--panel); }

.slotCard { min-width: 220px; max-width: 300px; padding: 12px 14px; border-radius: 18px; background: linear-gradient(160deg, #fbeee6, #f6dfd2); color: #3a2a20; box-shadow: inset 0 0 0 1px rgba(201, 100, 66, .18); margin: 2px 0; }
.slotCard .sch { font-size: 12.5px; color: #a0583a; margin-bottom: 8px; font-weight: 600; }
.slotCard .scv { display: flex; flex-wrap: wrap; gap: 6px; }
.slotCard .sci { display: inline-flex; flex-direction: column; padding: 5px 10px; border-radius: 10px; background: rgba(255, 255, 255, .75); font-size: 14.5px; font-weight: 600; }
.slotCard .sci small { font-size: 10.5px; font-weight: 400; color: #a07a66; }
.slotCard .sci.toy { background: #fff0f3; color: #b0405a; }
.slotCard .sct { margin-top: 8px; font-size: 12px; color: #a07a66; }
.slotCard .sci.new { box-shadow: 0 0 0 1.5px #e9a640; }

.gtiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.gtile { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 16px; border-radius: 20px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); text-align: left; }
.gtile:active { transform: scale(.98); }
.gticon svg { width: 48px; height: 48px; display: block; margin-bottom: 8px; }
.gtile b { font-size: 16px; }
.gtsub { font-size: 13px; color: var(--dim); display: flex; align-items: center; gap: 5px; }
.gtdot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex: none; }

/* 她传的字体（设置 → 外观 → 字体） */
@font-face { font-family: "XKCustom"; src: url("/font/custom.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "XKWenKai"; src: url("/font/wenkai.woff2") format("woff2"); font-display: swap; }
:root { --xkface: "XKCustom"; }
:root[data-face="wenkai"] { --xkface: "XKWenKai"; }
:root[data-font="all"] body, :root[data-font="all"] button, :root[data-font="all"] input, :root[data-font="all"] textarea {
  font-family: var(--xkface), -apple-system, BlinkMacSystemFont, "PingFang SC", "Noto Sans SC", sans-serif;
}
:root[data-font="him"] .gu, :root[data-font="him"] .diary, :root[data-font="him"] .diary h3 {
  font-family: var(--xkface), -apple-system, BlinkMacSystemFont, "PingFang SC", "Noto Sans SC", sans-serif;
}
.brand .bname { flex: none; white-space: nowrap; }
.together { padding: 3px 11px 4px; }
.together b { font-size: 19px; }
.together .tlabel { font-size: 12px; }

/* ---------- 侧边栏顶上：在一起的天数（杂志页眉，不要框不要底色） ---------- */
.tmag { padding: 10px 24px 22px; }
.tmag-n { font-family: Georgia, var(--serif); font-size: 58px; line-height: 1; font-weight: 400; letter-spacing: -.01em; color: var(--text); font-variant-numeric: lining-nums; }
.tmag-rule { display: block; width: 28px; height: 1.5px; margin: 14px 0 10px; background: var(--accent); border-radius: 1px; }
.tmag-k { font-size: 12px; color: var(--text); opacity: .75; letter-spacing: .32em; }
.tmag-since { margin-top: 4px; font-size: 10.5px; color: var(--dim); letter-spacing: .24em; font-variant-numeric: tabular-nums; }
.tmag.special .tmag-n { color: var(--accent); }
.tmag.special .tmag-n::after { content: "✨"; font-size: 20px; margin-left: 6px; vertical-align: top; }
.tmag-k { font-family: var(--serif); font-size: 13.5px; letter-spacing: .28em; opacity: .8; }
.tmag-k em { font-style: normal; color: var(--accent); margin: 0 .35em 0 .1em; letter-spacing: 0; }
/* 4:10 她说：数字太大、名字太扁 → 数字小一号；名字用雅宋（屏显字体，不扁），字距收一点 */
.tmag { padding: 8px 24px 18px; }
.tmag-n { font-size: 44px; }
.tmag-rule { margin: 11px 0 9px; width: 24px; }
.tmag-k { font-family: "XKCustom", -apple-system, "PingFang SC", "Noto Sans SC", sans-serif; font-size: 15px; letter-spacing: .14em; opacity: .78; }
.tmag-k em { margin: 0 .3em 0 .16em; font-family: -apple-system, sans-serif; font-size: 13px; }
/* 4:20 只留「134 DAYS」+ 橙线 */
.tmag { padding: 8px 24px 22px; }
.tmag-n { display: flex; align-items: baseline; gap: 8px; }
.tmag-n b { font-weight: 400; }
.tmag-d { font-family: -apple-system, "Segoe UI", sans-serif; font-size: 11px; letter-spacing: .32em; color: var(--dim); }
.tmag-rule { margin: 12px 0 0; }
.tmag.special .tmag-n b { color: var(--accent); }
.tmag.special .tmag-n::after { content: none; }
.tmag.special .tmag-d::after { content: " ✨"; letter-spacing: 0; }
/* 4:17 DAYS 太细太散 → 换成和数字同一套衬线的小写斜体 days，贴近数字 */
.tmag-n { gap: 5px; }
.tmag-d { font-family: Georgia, "Noto Serif", "Times New Roman", serif; font-style: italic; font-size: 19px; letter-spacing: .01em; color: var(--dim); text-transform: none; }
/* 4:2x 她想看整块斜体 */
.tmag-n b { font-family: Georgia, "Noto Serif", "Times New Roman", serif; font-style: italic; letter-spacing: -.02em; }
.tmag-d { font-family: Georgia, "Noto Serif", "Times New Roman", serif; font-style: italic; }
/* 数字换回正体，只有 days 斜 */
.tmag-n b { font-style: normal; letter-spacing: -.01em; font-family: Georgia, var(--serif); }
.tmag-d { font-family: Georgia, "Noto Serif", serif; font-style: italic; font-synthesis: style; }
/* 4:23 days 换成 Instrument Serif 斜体（OFL 开源字体，只截了英文字母，15KB），和数字之间留出空 */
@font-face { font-family: "XKSerifItalic"; src: url("/font/is-italic.woff2") format("woff2"); font-style: italic; font-display: swap; }
.tmag-n { gap: 10px; }
.tmag-d { font-family: "XKSerifItalic", Georgia, serif; font-style: italic; font-size: 22px; letter-spacing: .01em; color: var(--dim); }
/* 4:25 数字也换 Instrument Serif（瘦高），比之前的大一号才压得住 */
@font-face { font-family: "XKSerif"; src: url("/font/is-regular.woff2") format("woff2"); font-style: normal; font-display: swap; }
.tmag-n b { font-family: "XKSerif", Georgia, serif; font-size: 58px; letter-spacing: 0; }
.tmag-n { gap: 8px; }
/* 4:26 数字换回之前那个（手机自带衬线体） */
.tmag-n b { font-family: Georgia, var(--serif); font-size: 44px; letter-spacing: -.01em; }
.tmag-n { gap: 10px; }
/* 4:3x days 换 Lora 斜体（OFL，只截英文字母） */
@font-face { font-family: "XKLoraItalic"; src: url("/font/lora-italic.woff2") format("woff2"); font-style: italic; font-display: swap; }
.tmag-d { font-family: "XKLoraItalic", Georgia, serif; font-style: italic; font-size: 21px; }

/* ---------- 本子 · 天气日历 ---------- */
.wxcal { --his: var(--accent); --her: #7d9cc0; padding: 4px 2px 24px; }
.wxhead { display: flex; align-items: center; justify-content: space-between; margin: 2px 0 2px; }
.wxnav { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: var(--dim); }
.wxnav svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.wxnav:disabled { opacity: .25; }
.wxmonth { text-align: center; line-height: 1.1; }
.wxmonth b { display: block; font: italic 500 27px XKLoraItalic, Georgia, var(--serif); letter-spacing: .2px; }
.wxmonth span { font: italic 12.5px XKLoraItalic, Georgia, var(--serif); color: var(--dim); letter-spacing: 2px; }
.wxstats { display: flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--dim); margin: 10px 4px 12px; }
.wxstats b { color: var(--text); font: italic 600 14px XKLoraItalic, Georgia, var(--serif); padding: 0 1px; }
.wxkey { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.wxkey i { width: 7px; height: 7px; border-radius: 50%; display: inline-block; margin-left: 6px; }
.wxkey i.his { background: var(--his); } .wxkey i.her { background: var(--her); }
.wxweek, .wxgrid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.wxweek span { text-align: center; font-size: 11.5px; color: var(--dim); padding-bottom: 4px; }
.wxday { position: relative; aspect-ratio: 1 / 1.18; border-radius: 11px; border: 1px solid var(--line);
  background: color-mix(in srgb, var(--accent) calc(var(--h, 0) * 100%), var(--card)); padding: 0; transition: transform .12s; }
.wxday:active { transform: scale(.95); }
.wxday .n { position: absolute; top: 4px; left: 6px; font: italic 12px XKLoraItalic, Georgia, var(--serif); color: color-mix(in srgb, var(--text) 70%, transparent); }
.wxday.today { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.wxday.on { outline: 2px solid var(--text); outline-offset: 1px; }
.wxday.future { opacity: .4; }
.wxday .ics { position: absolute; left: 0; right: 0; bottom: 4px; display: flex; justify-content: center; gap: 0; }
.wx { width: 19px; height: 19px; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.wx.his { stroke: var(--his); } .wx.her { stroke: var(--her); }
.wx.guess { opacity: .55; }
.wx.none { stroke: var(--line); stroke-dasharray: 2 3; }
.wxhint { text-align: center; color: var(--dim); font-size: 13px; padding: 22px 0; }
.wxcard { margin-top: 16px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px 14px; }
.wxdate { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.wxdate b { font-family: var(--serif); font-size: 18px; }
.wxdate span { font-size: 12.5px; color: var(--dim); }
.wxrows { display: flex; align-items: center; gap: 18px; }
.wxrow { display: flex; align-items: center; gap: 8px; }
.wxrow .wx { width: 30px; height: 30px; }
.wxrow .wx.guess { opacity: 1; }
.wxwho { font-size: 11.5px; color: var(--dim); display: flex; align-items: center; gap: 5px; }
.wxname { font-size: 14.5px; }
.wxtag { font-size: 10.5px; padding: 0 6px; border-radius: 999px; background: color-mix(in srgb, var(--her) 16%, transparent); color: var(--her); }
.wxedit { margin-left: auto; font-size: 12.5px; color: var(--her); padding: 5px 10px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--her) 45%, transparent); }
.wxpick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 12px; }
.wxpick button { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 0 6px; border-radius: 12px; border: 1px solid var(--line); font-size: 12px; color: var(--dim); }
.wxpick button .wx { width: 26px; height: 26px; }
.wxpick button.on { border-color: var(--her); background: color-mix(in srgb, var(--her) 10%, transparent); color: var(--text); }
.wxpick .wxclear { grid-column: 1 / -1; padding: 7px 0; }
.wxnote { margin-top: 12px; font-family: var(--serif); font-size: 15px; line-height: 1.6; }
.wxdiary { display: block; width: 100%; text-align: left; margin-top: 12px; padding: 10px 12px; border-radius: 12px; background: var(--panel); font-size: 13px; line-height: 1.65; color: var(--dim); }
.wxdiary em { display: block; font-style: normal; color: var(--accent); margin-top: 4px; font-size: 12.5px; }
.wxrows { gap: 12px; }
.wxrow { flex: 1 1 0; min-width: 0; }
.wxrow .wx { flex: none; }
.wxname, .wxwho, .wxtag, .wxedit { white-space: nowrap; }
.wxedit { flex: none; }
/* 选中的那天：不要黑框，轻轻浮起来 + 橙色细边；今天只把日期数字染成橙色 */
.wxday { -webkit-tap-highlight-color: transparent; transition: transform .15s, box-shadow .15s; }
.wxday.today { border-color: var(--line); box-shadow: none; }
.wxday.today .n { color: var(--accent); font-weight: 700; }
.wxday.on { outline: none; border-color: var(--accent); transform: translateY(-2px);
  box-shadow: 0 0 0 1px var(--accent), 0 6px 14px color-mix(in srgb, var(--accent) 28%, transparent); }

/* ---------- 天气日历 · 作息 ---------- */
.lfi { width: 17px; height: 17px; fill: none; stroke: var(--her, #7d9cc0); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.lftl { position: relative; display: flex; justify-content: space-around; gap: 2px; margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line); overflow-x: auto; }
.lftl::before { content: ""; position: absolute; left: 22px; right: 22px; top: 25px; height: 1px; background: var(--line); }
.lfe { position: relative; flex: 0 0 52px; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 0; color: var(--text); }
.lfe:disabled { opacity: 1; }
.lfdot { width: 30px; height: 30px; border-radius: 50%; background: var(--card); border: 1px solid var(--line); display: grid; place-items: center; }
.lfe.mine .lfdot { border-style: dashed; border-color: color-mix(in srgb, var(--her) 60%, transparent); }
.lft { font: italic 13px XKLoraItalic, Georgia, var(--serif); }
.lfl { font-size: 11px; color: var(--dim); }
.lfnone { font-size: 12.5px; color: var(--dim); padding: 4px 0; }
.lfmore { display: block; margin: 10px auto 0; font-size: 12.5px; color: var(--dim); padding: 4px 12px; border-radius: 999px; border: 1px dashed var(--line); }
.lfadd { margin-top: 12px; }
.lftypes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.lftypes button { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 0 6px; border-radius: 12px; border: 1px solid var(--line); font-size: 12px; color: var(--dim); }
.lftypes button .lfi { width: 22px; height: 22px; }
.lftypes button.on { border-color: var(--her); background: color-mix(in srgb, var(--her) 10%, transparent); color: var(--text); }
.lfrow { display: flex; gap: 8px; margin-top: 8px; align-items: center; }
.lftime { flex: 1; min-width: 0; padding: 7px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--text); font: inherit; }
.lfok, .lfcancel { flex: none; padding: 7px 14px; border-radius: 999px; font-size: 13px; }
.lfok { background: var(--her); color: #fff; }
.lfcancel { color: var(--dim); }
.lfwhead { display: flex; align-items: baseline; justify-content: space-between; margin: 22px 4px 0; }
.lfwhead b { font-family: var(--serif); font-size: 16px; }
.lfwhead span { font-size: 12px; color: var(--dim); }
.lfwcard { margin-top: 8px; padding: 12px 14px; }
.lfwr { display: flex; align-items: center; gap: 8px; margin: 7px 0; }
.lfwd { width: 14px; font-size: 12px; color: var(--dim); }
.lfwr.on .lfwd { color: var(--text); font-weight: 700; }
.lfwt { flex: 1; height: 10px; border-radius: 5px; background: var(--panel); position: relative; }
.lfbar { position: absolute; top: 0; bottom: 0; border-radius: 5px; background: linear-gradient(90deg, var(--her), color-mix(in srgb, var(--her) 55%, var(--card))); }
.lfpin { position: absolute; top: 1px; width: 8px; height: 8px; margin-left: -4px; border-radius: 50%; background: var(--her); }
.lfwx { width: 80px; text-align: right; font: italic 11.5px XKLoraItalic, Georgia, var(--serif); color: var(--dim); }
.lfaxis { display: flex; justify-content: space-between; margin: 2px 88px 0 22px; font: italic 10.5px XKLoraItalic, Georgia, var(--serif); color: var(--dim); }
.lfavg { margin-top: 10px; font-size: 12px; color: var(--dim); }
.lfavg b { font: italic 600 14px XKLoraItalic, Georgia, var(--serif); color: var(--text); padding: 0 1px; }
/* ---------- 作息页 ---------- */
.lfpage { --her: #7d9cc0; padding: 4px 2px 24px; }
.lfnav { display: flex; align-items: center; justify-content: space-between; margin: 2px 0 12px; }
.lfdate { text-align: center; line-height: 1.25; }
.lfdate b { display: block; font-family: var(--serif); font-size: 20px; }
.lfdate span { font-size: 12px; color: var(--dim); }
.lfday { padding: 14px 14px 12px; }
.lfday .lftl { margin-top: 0; padding-top: 4px; border-top: 0; }
.lfday .lftl::before { top: 19px; }
.lfwr { width: 100%; padding: 0; background: none; border: 0; color: inherit; text-align: left; }
.lfwr:disabled { opacity: .5; }

/* ---------- 劳务市场 ---------- */
.mk { padding: 0 2px 26px; }
.mktitle { font: italic 500 26px XKLoraItalic, Georgia, var(--serif); margin: 4px 2px 0; }
.mksub { font-size: 12.5px; color: var(--dim); margin: 0 2px 12px; }
.mkb[data-type] { cursor: pointer; transition: box-shadow .15s, opacity .15s; }
.mkbadges:has(.sel) .mkb:not(.sel) { opacity: .6; }
.mkbadges .mkb.sel { box-shadow: 0 0 0 2px var(--accent); opacity: 1; }
.mkbadges { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.mkb { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 12px 9px 9px; position: relative; overflow: hidden; min-width: 0; }
.mkb::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: repeating-linear-gradient(90deg, var(--line) 0 6px, transparent 6px 10px); }
.mkb.on { border-color: var(--accent); box-shadow: 0 4px 14px color-mix(in srgb, var(--accent) 16%, transparent); }
.mkb.on::after { background: var(--accent); }
.mkbh { display: flex; gap: 7px; align-items: center; }
.mkbh b { display: block; font-size: 15px; }
.mkbh i { font-style: normal; font-size: 11px; color: var(--dim); white-space: nowrap; }
.mkb.on .mkbh i { color: var(--accent); }
.mkb.on .mkbh i::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); margin-right: 4px; vertical-align: 1px; animation: mkpulse 1.4s ease-in-out infinite; }
@keyframes mkpulse { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 45%, transparent); } 50% { box-shadow: 0 0 0 4px transparent; } }
.mkav { width: 32px; height: 32px; border-radius: 10px; background: color-mix(in srgb, var(--accent) 9%, transparent); display: grid; place-items: center; flex: none; }
.mkav svg { width: 19px; height: 19px; fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.mkb.on .mkav { background: var(--accent); } .mkb.on .mkav svg { stroke: #fff; }
.mkbs { display: flex; justify-content: space-between; gap: 4px; margin: 9px 1px 5px; font-size: 10.5px; color: var(--dim); white-space: nowrap; }
.mkbs em { font: italic 600 14px XKLoraItalic, Georgia, var(--serif); color: var(--text); margin-right: 2px; }
.mkbl { font-size: 11px; color: var(--dim); line-height: 1.4; height: 31px; overflow: hidden; }
.mkh { display: flex; justify-content: space-between; font-size: 14px; color: var(--dim); margin: 20px 2px 8px; }
.mko { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; margin-bottom: 10px; }
.mkoh { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--dim); }
.mkoh b { color: var(--text); font-size: 13px; }
.mkst { margin-left: auto; font-size: 11.5px; padding: 1px 8px; border-radius: 999px; background: var(--panel); color: var(--dim); white-space: nowrap; }
.mkst.run { background: color-mix(in srgb, var(--accent) 10%, transparent); color: var(--accent); }
.mkdesc { margin: 7px 0 6px; font-size: 14.5px; line-height: 1.55; }
.mkdesc::before { content: "“"; color: var(--accent); } .mkdesc::after { content: "”"; color: var(--accent); }
.mksteps { border-left: 2px solid var(--line); margin: 6px 0 0 3px; padding-left: 10px; font-size: 12.5px; color: var(--dim); line-height: 1.85; }
.mksteps .now { color: var(--accent); }
.mksteps .now::before { content: "● "; font-size: 9px; vertical-align: 1px; }
.mkmore-steps { font-size: 11.5px; opacity: .7; }
.mkask { margin-top: 9px; padding: 10px; border-radius: 12px; background: var(--panel); border: 1px dashed var(--line, rgba(0,0,0,.15)); }
.mkaskh { font-size: 13px; font-weight: 600; }
.mkask code { display: block; margin-top: 6px; font-size: 11.5px; line-height: 1.45; opacity: .75; word-break: break-all; white-space: pre-wrap; }
.mkaskb { display: flex; gap: 8px; margin-top: 9px; }
.mkaskb button { flex: 1; padding: 7px 0; border-radius: 10px; border: 1px solid var(--line, rgba(0,0,0,.15)); background: transparent; color: inherit; font: inherit; font-size: 13px; }
.mkaskb .mkyes { background: var(--accent, #333); border-color: transparent; color: #fff; }
.mkaskb button:disabled { opacity: .5; }
.mkres { margin-top: 9px; padding: 8px; border-radius: 12px; background: var(--panel); }
.mkres img { display: block; max-width: 100%; max-height: 260px; border-radius: 9px; margin-bottom: 6px; cursor: zoom-in; }
.mkres video { display: block; width: 100%; border-radius: 9px; margin-bottom: 6px; }
.mkres audio { display: block; width: 100%; margin-bottom: 6px; }
.mkres p { margin: 0; font-size: 12.5px; line-height: 1.6; color: var(--text); white-space: pre-wrap; }
.mkmeta { display: flex; gap: 12px; margin-top: 8px; font-size: 11.5px; color: var(--dim); }
.mkmeta em { font: italic 12.5px XKLoraItalic, Georgia, var(--serif); color: var(--text); }
.mkopen, .mkback { margin-top: 8px; font-size: 12px; color: var(--accent); padding: 0; }
.mktask { margin-top: 10px; font-size: 12.5px; color: var(--dim); }
.mktask div { white-space: pre-wrap; margin-top: 6px; line-height: 1.6; color: var(--text); }
.mkbh > div { line-height: 1.3; min-width: 0; }
.fontScope { margin-top: 6px; }
.fontRow { flex-wrap: wrap; }
.fontRow .lbl { flex: 1 0 100%; }
.fontRow .seg { flex: 1 0 100%; margin: 8px 0 0; }
.fontRow .seg button { flex: 1; }
