:root {
  --bg: #12100e;
  --bg-2: #171411;
  --panel: #1e1a16;
  --panel-2: #262019;
  --line: #332b23;
  --text: #f3ece3;
  --muted: #a2937f;
  --faint: #6f6455;
  --accent: #e7a87c;
  --accent-2: #f3c9a4;
  --accent-ink: #24170f;
  --green: #8fbf9f;
  --red: #e08b7c;
  --radius: 18px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --serif: "Songti SC", "Source Han Serif SC", "Noto Serif SC", STSong, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}

body {
  background:
    radial-gradient(1200px 600px at 70% -10%, rgba(231, 168, 124, 0.08), transparent 60%),
    radial-gradient(900px 500px at 10% 110%, rgba(143, 191, 159, 0.05), transparent 60%),
    var(--bg);
}

button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

.boot {
  position: fixed; inset: 0; display: grid; place-items: center;
  color: var(--muted); letter-spacing: .08em; font-size: 14px;
}

.avatar {
  width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(145deg, #d9a07a, #a86f4f);
  color: #1d120b; font-family: var(--serif); font-weight: 700; font-size: 17px;
  flex: 0 0 auto;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .15);
}
.avatar.large {
  width: 74px; height: 74px; font-size: 30px; margin: 0 auto 14px;
  background: radial-gradient(circle at 35% 30%, #f3c9a4, #c98a60 70%, #8c5738);
  box-shadow: 0 10px 30px rgba(231, 168, 124, .18);
}

/* ---------- login ---------- */
.login { min-height: 100%; display: grid; place-items: center; padding: 24px; }
.login-card {
  width: 100%; max-width: 360px; text-align: center;
  padding: 34px 24px 26px; border-radius: 26px;
  background: linear-gradient(180deg, rgba(38, 32, 25, .9), rgba(24, 21, 18, .96));
  border: 1px solid var(--line);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .45);
}
.login-card h1 { font-family: var(--serif); font-size: 27px; margin: 0 0 8px; letter-spacing: .12em; font-weight: 600; }
.login-card p { margin: 0 0 22px; font-size: 13px; }
.login-card form { display: grid; gap: 10px; }
.login-card input {
  width: 100%; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line);
  background: #141110; outline: none; text-align: center; letter-spacing: .1em;
}
.login-card input:focus { border-color: var(--accent); }
.primary {
  padding: 14px 16px; border-radius: 14px; border: 0;
  background: linear-gradient(180deg, var(--accent-2), var(--accent));
  color: var(--accent-ink); font-weight: 700; letter-spacing: .06em;
}
.primary:disabled { opacity: .55; }
.error { color: var(--red); font-size: 13px; min-height: 18px; margin: 12px 0 0; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }

/* ---------- shell ---------- */
.app {
  height: 100%;
  max-width: 760px; margin: 0 auto;
  display: flex; flex-direction: column;
  padding-top: var(--safe-t);
  position: relative;
}
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px 10px;
  border-bottom: 1px solid rgba(51, 43, 35, .7);
  backdrop-filter: blur(14px);
  background: rgba(18, 16, 14, .72);
  position: sticky; top: 0; z-index: 5;
}
.identity { display: flex; align-items: center; gap: 10px; }
.name { font-family: var(--serif); font-size: 17px; letter-spacing: .08em; }
.presence { font-size: 11px; color: var(--muted); margin-top: 2px; }
.presence.live::before {
  content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: var(--green); margin-right: 6px; vertical-align: 1px;
}
.chip {
  border: 1px solid var(--line); background: var(--panel-2); color: var(--accent-2);
  border-radius: 999px; padding: 6px 12px; font-size: 12px;
}

.views { flex: 1; overflow: hidden; position: relative; }
.view {
  position: absolute; inset: 0; overflow-y: auto;
  padding: 14px 16px calc(84px + var(--safe-b));
  display: none;
  -webkit-overflow-scrolling: touch;
}
.view.active { display: block; }
#view-chat.view { display: none; flex-direction: column; padding: 0 0 calc(66px + var(--safe-b)); overflow: hidden; }
#view-chat.view.active { display: flex; }

/* ---------- chat ---------- */
.messages {
  flex: 1; overflow-y: auto; padding: 16px 14px 86px;
  display: flex; flex-direction: column; gap: 10px;
  scroll-behavior: smooth;
}
.msg { display: flex; gap: 8px; align-items: flex-end; max-width: 100%; width: 100%; animation: rise .18s ease-out; }
.msg.user { flex-direction: row-reverse; }
.bubble {
  max-width: 100%;
  padding: 10px 13px; border-radius: 17px;
  line-height: 1.55; font-size: 15px;
  white-space: pre-wrap; word-break: break-word;
  background: var(--panel-2); border: 1px solid rgba(51, 43, 35, .6);
  border-bottom-left-radius: 6px;
}
.msg.user .bubble {
  background: linear-gradient(180deg, #e9b68d, #d99d6f);
  color: #24160d; border: 0; border-bottom-right-radius: 6px; border-bottom-left-radius: 17px;
}
.msg .meta { font-size: 10px; color: var(--faint); margin: 0 4px 2px; }
.msg-wrap { display: flex; flex-direction: column; max-width: min(76%, 520px); min-width: 0; }
.msg .tag {
  font-size: 10px; color: var(--accent); border: 1px solid rgba(231, 168, 124, .3);
  padding: 1px 6px; border-radius: 999px; margin-bottom: 6px; align-self: flex-start;
}
.msg.proactive .bubble { border-color: rgba(231, 168, 124, .35); }
.msg.user .msg-wrap { align-items: flex-end; }
.typing { display: inline-flex; gap: 4px; padding: 6px 2px; }
.typing i { width: 5px; height: 5px; border-radius: 50%; background: var(--muted); animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .2s; }
.typing i:nth-child(3) { animation-delay: .4s; }

.load-more {
  align-self: center; margin: 4px auto 8px; border: 1px solid var(--line);
  background: transparent; color: var(--muted); border-radius: 999px; padding: 5px 14px; font-size: 12px;
}
.composer {
  position: absolute; left: 0; right: 0; bottom: calc(56px + var(--safe-b));
  display: flex; gap: 8px; align-items: flex-end;
  padding: 8px 12px; background: linear-gradient(180deg, rgba(18,16,14,0), rgba(18,16,14,.94) 30%);
}
.composer textarea {
  flex: 1; resize: none; max-height: 120px;
  padding: 11px 14px; border-radius: 20px;
  border: 1px solid var(--line); background: #1a1714; outline: none;
  line-height: 1.45; font-size: 15px;
}
.composer textarea:focus { border-color: rgba(231, 168, 124, .55); }
.send {
  width: 42px; height: 42px; border-radius: 50%; border: 0; flex: 0 0 auto;
  background: linear-gradient(180deg, var(--accent-2), var(--accent)); color: var(--accent-ink);
  font-size: 20px; font-weight: 700; display: grid; place-items: center;
}
.send:disabled { opacity: .45; }
.chat-hint {
  position: absolute; left: 0; right: 0; bottom: calc(56px + var(--safe-b));
  text-align: center; font-size: 11px; color: var(--faint); margin: 0 0 -18px;
  pointer-events: none;
}

/* ---------- tabs ---------- */
.tabs {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: grid; grid-template-columns: repeat(4, 1fr);
  padding-bottom: var(--safe-b);
  background: rgba(20, 17, 14, .96);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(16px);
  z-index: 6;
}
.tab {
  border: 0; background: transparent; color: var(--muted);
  padding: 8px 0 10px; font-size: 10px; letter-spacing: .06em; position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
}
.tab-icon { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.tab.active .tab-icon { stroke: var(--accent-2); }
.tab.active { color: var(--accent-2); }
.tab.active::after {
  content: ""; position: absolute; left: 50%; bottom: 6px; transform: translateX(-50%);
  width: 16px; height: 2px; border-radius: 2px; background: var(--accent);
}
.dot {
  position: absolute; top: 9px; right: calc(50% - 24px);
  width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
}

/* ---------- generic cards ---------- */
.stack { display: flex; flex-direction: column; gap: 14px; }
.card {
  background: linear-gradient(180deg, rgba(32, 27, 22, .92), rgba(26, 22, 18, .92));
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px;
}
.card h2 { font-family: var(--serif); font-size: 17px; margin: 0 0 10px; letter-spacing: .06em; font-weight: 600; }
.card h3 { font-size: 13px; margin: 14px 0 6px; color: var(--accent-2); font-weight: 600; letter-spacing: .04em; }
.card p { margin: 0 0 8px; line-height: 1.6; font-size: 14px; color: #e6ddd2; }
.card p:last-child { margin-bottom: 0; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.row + .row { margin-top: 10px; }
.list { display: flex; flex-direction: column; gap: 8px; }
.item {
  display: flex; gap: 10px; align-items: flex-start; justify-content: space-between;
  padding: 10px 12px; border-radius: 12px; background: rgba(20, 17, 14, .55);
  border: 1px solid rgba(51, 43, 35, .55);
}
.item .grow { flex: 1; min-width: 0; }
.item .title { font-size: 14px; line-height: 1.45; }
.item .sub { font-size: 11px; color: var(--muted); margin-top: 3px; line-height: 1.4; }
.badge {
  font-size: 10px; padding: 2px 7px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--muted); white-space: nowrap;
}
.badge.done { color: var(--green); border-color: rgba(143, 191, 159, .35); }
.badge.skip { color: var(--red); border-color: rgba(224, 139, 124, .3); }
.badge.fiction { color: var(--accent); border-color: rgba(231, 168, 124, .3); }
.badge.real { color: var(--green); border-color: rgba(143, 191, 159, .3); }
.badge.tool { color: #9db8d9; border-color: rgba(157, 184, 217, .3); }
.empty { color: var(--faint); font-size: 13px; text-align: center; padding: 18px 0; }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.field label { font-size: 12px; color: var(--muted); letter-spacing: .04em; }
.field input, .field select, .field textarea {
  padding: 11px 12px; border-radius: 12px; border: 1px solid var(--line);
  background: #141110; outline: none; font-size: 14px;
}
.field textarea { min-height: 76px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: rgba(231, 168, 124, .5); }
.field .hint { font-size: 11px; color: var(--faint); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.btn {
  border: 1px solid var(--line); background: var(--panel-2); color: var(--text);
  padding: 9px 14px; border-radius: 12px; font-size: 13px;
}
.btn.primary { border: 0; background: linear-gradient(180deg, var(--accent-2), var(--accent)); color: var(--accent-ink); font-weight: 700; }
.btn.ghost { background: transparent; color: var(--muted); }
.btn.danger { color: var(--red); border-color: rgba(224, 139, 124, .3); background: transparent; }
.btn:disabled { opacity: .5; }
.btn.small { padding: 5px 10px; font-size: 11px; border-radius: 9px; }

details { border-top: 1px solid rgba(51, 43, 35, .5); padding-top: 10px; margin-top: 10px; }
details:first-of-type { border-top: 0; margin-top: 0; padding-top: 0; }
summary { cursor: pointer; font-family: var(--serif); letter-spacing: .06em; font-size: 15px; }
details[open] summary { color: var(--accent-2); }
details .body { padding-top: 10px; font-size: 14px; line-height: 1.7; color: #e2d8cc; white-space: pre-wrap; }

.mood { display: flex; gap: 14px; font-size: 12px; color: var(--muted); }
.meter { height: 4px; background: #2a241e; border-radius: 4px; overflow: hidden; margin-top: 5px; }
.meter > i { display: block; height: 100%; background: linear-gradient(90deg, #b9845e, var(--accent-2)); }

.toast {
  position: fixed; left: 50%; bottom: calc(82px + var(--safe-b)); transform: translateX(-50%);
  background: rgba(38, 32, 25, .98); border: 1px solid var(--line);
  color: var(--text); padding: 10px 16px; border-radius: 12px; font-size: 13px;
  z-index: 20; box-shadow: 0 12px 30px rgba(0, 0, 0, .4); max-width: 86vw;
}

@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
@keyframes rise { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

@media (min-width: 900px) {
  .app { border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
}


/* ---------- website v1: media / posts / profile ---------- */
.composer { flex-wrap: wrap; }
.composer-tools { display: flex; gap: 4px; width: 100%; padding: 0 2px 2px; }
.tool-btn {
  border: 1px solid var(--line); background: rgba(30,26,22,.8); color: var(--muted);
  border-radius: 10px; min-width: 34px; height: 28px; font-size: 11px; padding: 0 8px;
}
.tool-btn.recording { color: var(--red); border-color: rgba(224,139,124,.5); }
.media-bubble { padding: 5px; overflow: hidden; }
.media-image { display: block; max-width: min(300px, 68vw); max-height: 320px; border-radius: 12px; cursor: zoom-in; }
.media-sticker { display: block; max-width: 150px; max-height: 150px; border-radius: 8px; }
.media-audio { display: block; width: min(300px, 68vw); margin: 3px; }
.media-song {
  display: flex; gap: 9px; align-items: center; padding: 8px 9px; min-width: 190px;
  color: inherit; text-decoration: none; border-radius: 11px; background: rgba(0,0,0,.16);
}
.media-song .song-icon { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: rgba(255,255,255,.16); }
.media-song .song-title { font-size: 13px; font-weight: 600; }
.media-song .song-sub { font-size: 11px; opacity: .7; margin-top: 2px; }
.media-caption { padding: 5px 7px 3px; font-size: 12px; opacity: .75; }
.lightbox { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.88); display: grid; place-items: center; padding: 18px; }
.lightbox img { max-width: 96vw; max-height: 92vh; border-radius: 10px; }
.post { white-space: pre-wrap; line-height: 1.6; }
.post-media { margin-top: 10px; }
.post-meta { font-size: 11px; color: var(--faint); margin-top: 9px; }
.profile-signature { font-size: 13px; color: var(--muted); margin-top: 6px; }
.profile-actions { display: flex; gap: 8px; margin-top: 12px; }
.profile-actions button { flex: 1; }
/* ---------- v2 layout: space / today / top progress ---------- */
.app { max-width: 920px; }
.top-actions { display: flex; align-items: center; gap: 6px; }
.today-pill { border-color: rgba(231,168,124,.28); color: var(--accent-2); }
.today-pill.all-done { color: var(--green); border-color: rgba(143,191,159,.35); }

/* space */
#posts-content { padding-top: 4px; }
.space-hero { padding: 10px 4px 4px; }
.space-eyebrow { font-size: 10px; letter-spacing: .18em; color: var(--faint); }
.space-hero h1 {
  font-family: var(--serif); font-weight: 600; font-size: clamp(25px, 5vw, 34px);
  letter-spacing: .08em; margin: 8px 0 6px;
}
.space-hero p { max-width: 500px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.space-count { color: var(--faint); font-size: 11px; margin-top: 10px; letter-spacing: .04em; }
.segmented {
  display: flex; gap: 4px; margin: 14px 0 16px; padding: 3px;
  border: 1px solid var(--line); border-radius: 999px; width: fit-content;
  background: rgba(20,17,14,.55);
}
.segmented-btn {
  border: 0; background: transparent; color: var(--muted); border-radius: 999px;
  padding: 6px 13px; font-size: 12px;
}
.segmented-btn.active { background: var(--panel-2); color: var(--accent-2); box-shadow: inset 0 0 0 1px rgba(231,168,124,.18); }
.space-list { display: flex; flex-direction: column; gap: 14px; }
.space-card {
  display: block; overflow: hidden; border-radius: 22px;
  border: 1px solid var(--line);
  background: linear-gradient(155deg, rgba(36,30,24,.96), rgba(24,20,17,.98));
  box-shadow: 0 12px 36px rgba(0,0,0,.16);
}
.space-copy { padding: 20px 20px 16px; min-width: 0; }
.space-kicker {
  display: flex; align-items: center; gap: 7px; color: var(--faint);
  font-size: 10px; letter-spacing: .06em; margin-bottom: 11px;
}
.space-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); display: inline-block; }
.space-sep { color: var(--faint); }
.space-card .post { font-size: 15px; line-height: 1.82; color: #eee5da; }
.space-card .post-meta { margin-top: 15px; color: var(--faint); font-size: 10px; letter-spacing: .1em; }
.space-media { background: #15120f; }
.space-media .media-image {
  width: 100%; max-width: none; max-height: none; aspect-ratio: 1 / 1;
  object-fit: cover; border-radius: 0; display: block;
}
.space-card.has-media { display: flex; flex-direction: column; }
.space-card.has-media .space-media { order: 0; }
.space-card.has-media .space-copy { order: 1; }
@media (min-width: 760px) {
  .space-card.has-media { display: grid; grid-template-columns: minmax(0, 1.18fr) minmax(220px, .82fr); align-items: stretch; }
  .space-card.has-media .space-copy { padding: 24px 24px 20px; order: 1; }
  .space-card.has-media .space-media { min-height: 100%; order: 2; }
  .space-card.has-media .space-media .media-image { height: 100%; aspect-ratio: auto; }
}

/* today */
#today-content { gap: 18px; }
.today-hero {
  position: relative; overflow: hidden; padding: 22px 20px 18px;
  border-radius: 24px; border: 1px solid var(--line);
  background:
    radial-gradient(520px 180px at 90% -20%, rgba(231,168,124,.16), transparent 65%),
    linear-gradient(160deg, rgba(36,29,23,.98), rgba(23,19,16,.98));
}
.today-eyebrow { color: var(--faint); font-size: 11px; letter-spacing: .1em; }
.today-hero h1 {
  font-family: var(--serif); font-weight: 600; font-size: clamp(22px, 4.5vw, 30px);
  line-height: 1.38; letter-spacing: .04em; margin: 10px 0 14px; max-width: 560px;
}
.today-stats { display: flex; gap: 18px; color: var(--muted); font-size: 11px; }
.today-stat { display: inline-flex; align-items: baseline; gap: 5px; }
.today-stat b { font-family: var(--serif); font-size: 18px; color: var(--accent-2); font-weight: 500; }
.today-progress { margin-top: 17px; max-width: 460px; }
.progress-track { height: 5px; border-radius: 99px; background: rgba(255,255,255,.08); overflow: hidden; }
.progress-track i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #b9845e, var(--accent-2)); }
.progress-caption { display: flex; justify-content: space-between; gap: 10px; margin-top: 7px; color: var(--faint); font-size: 10px; }
.today-refresh { position: absolute; top: 18px; right: 16px; padding: 5px 10px; font-size: 10px; }
.today-section { padding: 0 2px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 10px; }
.section-head h2 { font-family: var(--serif); font-weight: 600; font-size: 17px; letter-spacing: .06em; margin: 0; }
.timeline { display: flex; flex-direction: column; }
.timeline-item {
  display: grid; grid-template-columns: 48px 16px minmax(0,1fr);
  gap: 9px; min-height: 74px; position: relative;
}
.timeline-time { color: var(--faint); font-size: 11px; font-variant-numeric: tabular-nums; padding-top: 3px; text-align: right; }
.timeline-rail { position: relative; display: flex; justify-content: center; }
.timeline-rail::before { content: ""; position: absolute; top: 13px; bottom: -1px; width: 1px; background: rgba(51,43,35,.8); }
.timeline-item:last-child .timeline-rail::before { display: none; }
.timeline-rail i {
  width: 9px; height: 9px; border-radius: 50%; margin-top: 4px; position: relative; z-index: 1;
  background: var(--faint); box-shadow: 0 0 0 3px var(--bg);
}
.timeline-item.is-done .timeline-rail i { background: var(--green); }
.timeline-item.is-skip .timeline-rail i { background: var(--red); }
.timeline-content {
  min-width: 0; padding: 0 0 18px; border-bottom: 1px solid rgba(51,43,35,.38);
}
.timeline-item:last-child .timeline-content { border-bottom: 0; padding-bottom: 2px; }
.timeline-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.timeline-title { color: var(--text); font-size: 14px; line-height: 1.5; }
.timeline-sub { color: var(--faint); font-size: 11px; line-height: 1.5; margin-top: 3px; }
.timeline-content .badge { flex: 0 0 auto; margin-top: 1px; }
.action-result { margin-top: 9px; padding-top: 8px; border-top: 0; }
.action-result summary { color: var(--accent); font-family: var(--sans); font-size: 11px; letter-spacing: .02em; }
.action-result .body { max-height: 260px; overflow: auto; padding-top: 7px; font-family: var(--sans); font-size: 12.5px; line-height: 1.75; color: var(--muted); white-space: pre-wrap; }
.day-strip { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 7px; }
.day-chip {
  border: 1px solid var(--line); background: rgba(30,26,22,.55); color: var(--muted);
  border-radius: 14px; padding: 9px 6px 8px; text-align: center; min-width: 0;
}
.day-chip.active { border-color: rgba(231,168,124,.45); background: rgba(231,168,124,.08); color: var(--accent-2); }
.day-chip-week, .day-chip-meta { display: block; font-size: 9px; color: var(--faint); }
.day-chip-num { display: block; font-family: var(--serif); font-size: 17px; margin: 2px 0; color: var(--text); }

@media (max-width: 520px) {
  .view { padding-left: 12px; padding-right: 12px; }
  .space-copy { padding: 17px 16px 14px; }
  .space-hero h1 { font-size: 27px; }
  .space-media .media-image { max-height: 420px; }
  .today-hero { padding: 18px 15px 15px; border-radius: 20px; }
  .today-refresh { top: 14px; right: 12px; }
  .timeline-item { grid-template-columns: 42px 14px minmax(0,1fr); gap: 7px; }
  .timeline-time { font-size: 10px; }
  .day-strip { gap: 5px; }
  .day-chip { padding: 8px 3px; }
}

/* lightbox close affordance */
.lightbox { cursor: zoom-out; }
.lightbox::after { content: "点击关闭"; position: fixed; bottom: calc(18px + env(safe-area-inset-bottom,0px)); color: rgba(255,255,255,.55); font-size: 11px; letter-spacing: .1em; }

@media (max-width: 520px) {
  .composer textarea, .login-card input, .field input, .field select, .field textarea { font-size: 16px; }
}

/* QQ-like bottom nav / media */
.tabs { padding-top: 2px; }
.tab span { line-height: 1.2; }
.tab.active::after { bottom: 2px; width: 18px; }
@media (max-width: 520px) { .tab { padding-bottom: 8px; } .tab-icon { width: 20px; height: 20px; } }
/* ---------- T1: chat list / conversation / wangshu ---------- */
.app.conversation-open .topbar,
.app.conversation-open .tabs { display: none; }
.app.conversation-open #view-chat { padding-bottom: 0; }
#view-chat .composer { bottom: 0; }
#view-chat .chat-hint { bottom: 0; }
#view-chat .messages { padding-bottom: 82px; }

.chat-list-head { padding: 12px 4px 4px; }
.chat-list-head h1 { font-family: var(--serif); font-size: 31px; letter-spacing: .12em; margin: 8px 0 4px; font-weight: 600; }
.chat-list-head p { margin: 0; color: var(--muted); font-size: 12px; }
.chat-search-wrap { margin: 16px 0 14px; }
.chat-search-wrap input {
  width: 100%; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line);
  background: rgba(20,17,14,.7); color: var(--text); outline: none; font-size: 16px;
}
.chat-list { display: flex; flex-direction: column; gap: 3px; }
.chat-row {
  display: grid; grid-template-columns: 52px minmax(0,1fr) 25px; gap: 11px; align-items: center;
  position: relative; padding: 11px 8px; border-radius: 15px; cursor: pointer;
}
.chat-row:hover, .chat-row:focus { background: rgba(255,255,255,.035); outline: none; }
.chat-row.pinned { background: rgba(231,168,124,.06); }
.chat-avatar { width: 48px; height: 48px; font-size: 20px; }
.chat-row-main { min-width: 0; }
.chat-row-top, .chat-row-bottom { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.chat-row-name { font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 6px; min-width: 0; }
.chat-row-time { font-size: 10px; color: var(--faint); flex: 0 0 auto; }
.chat-row-preview { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 5px; }
.chat-mini-tag { font-size: 9px; color: var(--accent); border: 1px solid rgba(231,168,124,.25); border-radius: 4px; padding: 0 4px; font-weight: 400; }
.chat-row-badges { display: flex; align-items: center; gap: 5px; flex: 0 0 auto; }
.chat-muted { font-size: 9px; color: var(--faint); }
.unread-badge { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--red); color: #1b0f0c; font-size: 10px; font-weight: 700; display: grid; place-items: center; }
.chat-row-more { border: 0; background: transparent; color: var(--faint); font-size: 16px; padding: 2px; align-self: start; }
.chat-row-menu {
  position: absolute; right: 10px; top: 48px; z-index: 4; min-width: 122px; padding: 5px;
  background: #29221b; border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
}
.chat-row-menu button { display: block; width: 100%; border: 0; background: transparent; color: var(--text); text-align: left; padding: 8px 10px; border-radius: 7px; font-size: 12px; }
.chat-row-menu button:hover { background: rgba(255,255,255,.06); }

.conversation-head {
  flex: 0 0 auto; display: flex; align-items: center; gap: 10px;
  padding: 10px 10px 10px 4px; border-bottom: 1px solid rgba(51,43,35,.65);
  background: rgba(18,16,14,.82); backdrop-filter: blur(14px); z-index: 3;
}
.conversation-title { flex: 1; }
.conversation-title .name { font-family: var(--serif); font-size: 16px; letter-spacing: .08em; }
.conversation-title .presence { font-size: 10px; color: var(--muted); margin-top: 2px; }
.conversation-title .presence::before { content: ""; display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: var(--green); margin-right: 5px; vertical-align: 1px; }
.icon-btn { width: 36px; height: 36px; border: 0; border-radius: 10px; background: transparent; color: var(--accent-2); font-size: 25px; line-height: 1; display: grid; place-items: center; }
.icon-btn:hover { background: rgba(255,255,255,.05); }
.page-head { display: flex; align-items: center; gap: 6px; padding: 4px 0 12px; }
.page-head h1 { font-family: var(--serif); font-size: 26px; letter-spacing: .1em; margin: 2px 0 0; font-weight: 600; }

.profile-hero {
  position: relative; overflow: hidden; padding: 18px;
  border: 1px solid var(--line); border-radius: 22px;
  background: radial-gradient(400px 180px at 85% 0%, rgba(231,168,124,.14), transparent 65%), linear-gradient(160deg, rgba(36,29,23,.98), rgba(23,19,16,.98));
}
.profile-hero-top { display: flex; align-items: flex-start; gap: 13px; }
.avatar.xl { width: 64px; height: 64px; font-size: 26px; }
.profile-hero-copy { flex: 1; min-width: 0; }
.profile-hero-copy h1 { font-family: var(--serif); font-size: 25px; letter-spacing: .1em; margin: 4px 0 5px; font-weight: 600; }
.settings-entry { flex: 0 0 auto; font-size: 18px; }
.profile-hero-status { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin-top: 16px; color: var(--faint); font-size: 10px; }
.profile-actions { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 14px; }
.now-title { font-family: var(--serif); font-size: 18px; line-height: 1.5; }
.now-meta { color: var(--faint); font-size: 10px; margin-top: 5px; }
.xl .presence { margin-top: 5px; }
.today-actions { display: flex; gap: 6px; position: absolute; top: 18px; right: 16px; }
.today-refresh { position: static; }
@media (max-width: 520px) {
  .chat-list-head h1 { font-size: 27px; }
  .conversation-head { padding-top: 8px; }
  .today-actions { top: 14px; right: 12px; }
  .today-actions .chip { padding: 5px 8px; font-size: 10px; }
}
/* ---------- T2: context / date / activity sheet ---------- */
.chat-context {
  flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 8px 12px; margin: 0 10px 2px; border-radius: 10px;
  background: rgba(231,168,124,.09); border: 1px solid rgba(231,168,124,.22);
  color: var(--accent-2); font-size: 11px;
}
.chat-context span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-context .icon-btn { width: 26px; height: 26px; font-size: 19px; flex: 0 0 auto; }
.date-toolbar { display: flex; align-items: center; gap: 4px; padding: 0 2px 2px; }
.date-toolbar input {
  flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 9px;
  background: rgba(20,17,14,.7); color: var(--muted); padding: 6px 8px; font-size: 12px;
}
.date-toolbar .icon-btn { width: 30px; height: 30px; font-size: 21px; }
.date-toolbar .chip { margin-left: auto; }
.sheet {
  position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.62);
  display: grid; align-items: end; padding: 18px 10px calc(18px + var(--safe-b));
}
.sheet-panel {
  width: 100%; max-width: 620px; margin: 0 auto; max-height: 82vh; overflow: auto;
  background: #211b16; border: 1px solid var(--line); border-radius: 22px;
  padding: 20px 18px 24px; box-shadow: 0 -10px 60px rgba(0,0,0,.45);
}
.sheet-head { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: start; }
.sheet-head h2 { grid-column: 1 / -1; font-family: var(--serif); font-size: 22px; margin: 5px 0 2px; line-height: 1.4; }
.sheet-head .badge { grid-column: 1 / 2; justify-self: start; }
.sheet-close { grid-column: 3; grid-row: 1; width: 32px; height: 32px; font-size: 22px; }
.sheet-body { margin-top: 12px; }
.sheet-body h3 { color: var(--accent-2); font-size: 12px; margin: 18px 0 6px; letter-spacing: .04em; }
body.sheet-open { overflow: hidden; }
/* ---------- T5: message menu / search highlight ---------- */
.msg .bubble { transition: box-shadow .18s ease, border-color .18s ease; }
.msg-highlight .bubble {
  border-color: rgba(231,168,124,.78) !important;
  box-shadow: 0 0 0 2px rgba(231,168,124,.16);
}
.msg-menu {
  position: fixed; left: 50%; bottom: calc(94px + var(--safe-b)); transform: translateX(-50%);
  z-index: 41; min-width: 160px; padding: 6px;
  background: #2a221b; border: 1px solid var(--line); border-radius: 13px;
  box-shadow: 0 16px 45px rgba(0,0,0,.45);
}
.msg-menu button {
  display: block; width: 100%; border: 0; background: transparent; color: var(--text);
  text-align: left; padding: 10px 12px; border-radius: 8px; font-size: 13px;
}
.msg-menu button:hover { background: rgba(255,255,255,.06); }

/* ---------- WeChat-like chat composer / bubbles ---------- */
#view-chat .messages { padding-bottom: 94px; background: #111214; }
#view-chat .composer {
  left: 0; right: 0; bottom: 0;
  display: flex; flex-direction: column; gap: 0;
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom, 0px));
  background: #1b1b1e;
  border-top: 1px solid rgba(255,255,255,.07);
  box-shadow: 0 -8px 30px rgba(0,0,0,.18);
}
#view-chat .composer-bar { display: flex; align-items: flex-end; gap: 8px; width: 100%; }
.composer-more {
  width: 38px; height: 38px; flex: 0 0 auto;
  display: grid; place-items: center;
  border: 0; border-radius: 50%;
  background: #2b2b2e; color: #d7d7da;
  cursor: pointer; transition: background .15s ease, transform .15s ease;
}
.composer-more svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.composer-more:hover { background: #353538; }
.composer-more.open { background: #3a3a3d; }
.composer-more.open svg { transform: rotate(45deg); }
.composer-more svg { transition: transform .15s ease; }
#view-chat .composer textarea {
  flex: 1 1 auto; min-width: 0; min-height: 38px; max-height: 120px;
  padding: 9px 12px; margin: 0;
  border: 0; border-radius: 8px;
  background: #2b2b2e; color: #f2f2f3;
  font-size: 15px; line-height: 1.35;
  resize: none; outline: none;
}
#view-chat .composer textarea:focus { box-shadow: inset 0 0 0 1px rgba(7,193,96,.45); }
#view-chat .composer textarea::placeholder { color: #85858a; }
#view-chat .composer .send {
  width: auto; min-width: 58px; height: 38px; flex: 0 0 auto;
  padding: 0 14px; border: 0; border-radius: 7px;
  background: #07c160; color: #fff;
  font-size: 14px; font-weight: 600; letter-spacing: .02em;
  display: grid; place-items: center;
  transition: background .15s ease, opacity .15s ease;
}
#view-chat .composer .send:disabled, #view-chat .composer .send.is-empty { background: #353538; color: #88888d; opacity: 1; cursor: default; }
#view-chat .composer .send:not(:disabled):active { background: #06ad56; }

.composer-panel {
  position: absolute; left: 10px; right: 10px; bottom: calc(100% + 8px);
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px;
  padding: 12px; z-index: 9;
  background: #242427; border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px; box-shadow: 0 16px 38px rgba(0,0,0,.42);
}
.composer-panel[hidden] { display: none; }
.tool-tile {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 5px; min-height: 64px; padding: 6px 4px;
  border: 0; border-radius: 9px;
  background: transparent; color: #cfcfd3;
  font-size: 11px; line-height: 1.2;
}
.tool-tile svg {
  width: 25px; height: 25px; fill: none; stroke: currentColor;
  stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}
.tool-tile:hover, .tool-tile:focus-visible { background: #303034; outline: none; }
.tool-tile.recording { color: #ff6b6b; background: rgba(255,107,107,.08); }
#view-chat .chat-hint { display: none; }

/* WeChat-like bubbles */
#view-chat .bubble {
  border: 0; border-radius: 9px;
  background: #2b2b2e; color: #ececef;
  padding: 9px 12px; font-size: 15px; line-height: 1.5;
  border-bottom-left-radius: 3px;
  box-shadow: none;
}
#view-chat .msg.user .bubble {
  background: #95ec69; color: #111;
  border-radius: 9px; border-bottom-right-radius: 3px; border-bottom-left-radius: 9px;
}
#view-chat .msg.user .bubble a { color: #0c5c2f; }
#view-chat .msg .meta { color: #77777c; }
#view-chat .msg.proactive .bubble { border: 1px solid rgba(7,193,96,.28); }
#view-chat .bubble.media-bubble { background: #242427; }
#view-chat .msg.user .bubble.media-bubble { background: #95ec69; }
#view-chat .chat-context { background: #242427; border-color: rgba(255,255,255,.08); color: #c9c9cd; }

@media (max-width: 520px) {
  #view-chat .composer { padding-left: 8px; padding-right: 8px; }
  #view-chat .composer .send { min-width: 54px; padding: 0 11px; }
  .composer-panel { left: 8px; right: 8px; }
}

/* ---------- WeChat-like moments interactions ---------- */
.space-card .post-actions {
  display: flex; align-items: center; gap: 12px; margin-top: 12px;
  padding-top: 10px; border-top: 1px solid rgba(255,255,255,.07);
  color: #8e8e93; font-size: 12px;
}
.post-action {
  border: 0; background: transparent; color: inherit; padding: 2px 0;
  font-size: 12px; cursor: pointer; display: inline-flex; align-items: center; gap: 3px;
}
.post-action:hover { color: #e7a87c; }
.post-action.active { color: #ff5c7a; }
.post-liked-by { margin-left: auto; color: #8e8e93; font-size: 11px; }
.post-comments {
  margin-top: 9px; padding: 8px 10px; border-radius: 6px;
  background: #242427; border: 1px solid rgba(255,255,255,.05);
}
.post-comments:empty { display: none; }
.post-comment { font-size: 12px; line-height: 1.65; color: #cfcfd3; padding: 2px 0; }
.post-comment.is-reply { padding-left: 14px; }
.comment-author {
  border: 0; background: transparent; padding: 0; cursor: pointer;
  color: #7fb8e8; font-size: 12px; font-weight: 600;
}
.comment-author:hover { text-decoration: underline; }
.comment-text { white-space: pre-wrap; }
.post-comment-form { display: flex; gap: 6px; margin-top: 8px; }
.post-comment-form[hidden] { display: none; }
.post-comment-form input {
  flex: 1; min-width: 0; height: 32px; border-radius: 5px; border: 0;
  background: #2b2b2e; color: #eee; padding: 0 9px; font-size: 13px; outline: none;
}
.post-comment-form input:focus { box-shadow: inset 0 0 0 1px rgba(7,193,96,.4); }
.comment-send {
  height: 32px; border: 0; border-radius: 5px; padding: 0 11px;
  background: #07c160; color: #fff; font-size: 12px;
}
.comment-send:disabled { opacity: .5; }

/* ---------- WeChat-style multi-image post composer ---------- */
.post-composer {
  position: fixed; inset: 0; z-index: 60;
  display: flex; align-items: flex-end; justify-content: center;
  background: rgba(0,0,0,.58); backdrop-filter: blur(3px);
  padding: 12px;
}
.post-composer[hidden] { display: none; }
.post-composer-panel {
  width: min(560px, 100%); max-height: 88vh; overflow: auto;
  padding: 16px; border-radius: 16px 16px 8px 8px;
  background: #242427; border: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
}
.post-composer-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.post-composer-head strong { font-size: 15px; }
.post-cancel, .post-publish { border: 0; background: transparent; font-size: 14px; padding: 4px 2px; }
.post-cancel { color: #a9a9ae; }
.post-publish { color: #7ee2a8; font-weight: 600; }
.post-publish:disabled { opacity: .45; }
#post-text {
  width: 100%; resize: vertical; min-height: 96px; max-height: 240px;
  border: 0; border-radius: 8px; padding: 10px 12px;
  background: #1d1d20; color: #eee; font-size: 15px; line-height: 1.55; outline: none;
}
#post-text::placeholder { color: #77777d; }
.post-image-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 10px; }
.post-image-preview { position: relative; aspect-ratio: 1; border-radius: 6px; overflow: hidden; background: #151517; }
.post-image-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post-image-remove {
  position: absolute; top: 4px; right: 4px; width: 22px; height: 22px;
  border: 0; border-radius: 50%; background: rgba(0,0,0,.65); color: #fff; font-size: 16px; line-height: 1;
}
.post-add-image {
  width: 100%; margin-top: 10px; height: 38px;
  border: 1px dashed rgba(255,255,255,.16); border-radius: 8px;
  background: transparent; color: #a9a9ae; font-size: 13px;
}
.post-add-image:hover { border-color: rgba(231,168,124,.5); color: #e7a87c; }

/* image grid in a published moment */
.space-media .post-image-grid { grid-template-columns: repeat(3, minmax(0,1fr)); gap: 2px; }
.space-media .post-image-grid.count-1 { grid-template-columns: 1fr; }
.space-media .post-image-grid.count-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.space-media .post-image {
  width: 100%; aspect-ratio: 1; object-fit: cover; display: block;
  cursor: zoom-in; background: #151517;
}
.space-media .post-image-grid.count-1 .post-image { aspect-ratio: auto; max-height: 520px; object-fit: contain; background: #111; }
.post-action.danger { color: #d98b8b; margin-left: auto; }

/* 连续消息分段 */
.msg-wrap .bubble + .bubble { margin-top: 5px; }
.msg-wrap .bubble.segment { max-width: 100%; }
.msg.user .msg-wrap .bubble.segment { align-self: flex-end; }

/* moments cover/comments extras */
.space-cover { position:relative; height:150px; margin:2px 0 14px; border-radius:16px; overflow:hidden; background:linear-gradient(145deg,#4b3a2d,#1f1b18); background-size:cover; background-position:center; }
.space-cover-shade { position:absolute; inset:0; background:linear-gradient(180deg,rgba(0,0,0,.05),rgba(0,0,0,.35)); }
.cover-edit { position:absolute; right:10px; bottom:10px; border:1px solid rgba(255,255,255,.24); background:rgba(0,0,0,.34); color:#fff; border-radius:6px; padding:5px 9px; font-size:11px; backdrop-filter:blur(5px); }
.comment-image { display:block; max-width:160px; max-height:160px; margin-top:5px; border-radius:5px; cursor:zoom-in; }
.comment-ops { border:0; background:transparent; color:#77777d; font-size:12px; padding:0 0 0 6px; vertical-align:middle; }
.comment-ops:hover { color:#e7a87c; }
.comment-image-btn { height:32px; width:32px; flex:0 0 auto; border:0; border-radius:5px; background:#2b2b2e; color:#a9a9ae; font-size:12px; }
.comment-image-btn:hover { color:#7ee2a8; }
#posts-dot { position:absolute; margin-left:4px; }
.tab { position:relative; }

.wechat-browser-notice { position:fixed; left:10px; right:10px; top:calc(8px + env(safe-area-inset-top,0px)); z-index:100; background:#fff7e8; color:#3b2a16; border:1px solid #f0d4a8; border-radius:10px; padding:10px 12px; font-size:12px; line-height:1.5; box-shadow:0 8px 24px rgba(0,0,0,.18); }
.wechat-browser-notice strong { display:block; margin-bottom:3px; }

/* ---------------- App shell polish ---------------- */
html { color-scheme: dark; }
button, a, .tab, .chat-row { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.app, .topbar, .tabs, .composer, .chat-list { -webkit-user-select: none; user-select: none; }
.bubble, .post-text, .comment-text, input, textarea, .memory-text { -webkit-user-select: text; user-select: text; }

.app-splash {
  display: flex; flex-direction: column; gap: 12px;
  background: radial-gradient(800px 500px at 50% 30%, rgba(231,168,124,.13), transparent 65%), var(--bg);
  color: var(--text); letter-spacing: 0;
}
.splash-mark {
  width: 82px; height: 82px; border-radius: 24px; display: grid; place-items: center;
  font-family: var(--serif); font-size: 38px; font-weight: 700; color: #1d120b;
  background: radial-gradient(circle at 35% 25%, #f6d2b2, #d29468 58%, #9b603d);
  box-shadow: 0 14px 40px rgba(0,0,0,.35), inset 0 0 0 1px rgba(255,255,255,.2);
}
.splash-name { font-family: var(--serif); font-size: 24px; letter-spacing: .14em; color: var(--accent-2); }
.splash-status { font-size: 12px; color: var(--muted); letter-spacing: .08em; }
.splash-bar { width: 128px; height: 3px; border-radius: 3px; background: rgba(255,255,255,.09); overflow: hidden; margin-top: 5px; }
.splash-bar i { display: block; width: 42%; height: 100%; background: var(--accent); border-radius: inherit; animation: splash-slide 1.25s ease-in-out infinite; }
@keyframes splash-slide { 0% { transform: translateX(-110%); } 100% { transform: translateX(330%); } }

.net-status {
  position: fixed; left: 50%; top: calc(8px + var(--safe-t)); transform: translateX(-50%);
  z-index: 90; padding: 6px 12px; border-radius: 999px; font-size: 11px; color: #3b2a16;
  background: #f0d4a8; border: 1px solid rgba(0,0,0,.08); box-shadow: 0 6px 20px rgba(0,0,0,.2);
  white-space: nowrap;
}
.install-banner {
  position: fixed; left: 10px; right: 10px; bottom: calc(74px + var(--safe-b));
  z-index: 80; display: flex; align-items: center; gap: 10px;
  padding: 10px; border-radius: 14px; background: #25201a; border: 1px solid #3a3027;
  box-shadow: 0 12px 40px rgba(0,0,0,.38);
}
.install-banner-icon {
  width: 34px; height: 34px; flex: 0 0 auto; border-radius: 9px; display: grid; place-items: center;
  background: linear-gradient(145deg,#d9a07a,#a86f4f); color: #1d120b; font-family: var(--serif); font-weight: 700;
}
.install-banner-copy { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.install-banner-copy strong { font-size: 13px; color: var(--text); }
.install-banner-copy span { font-size: 11px; line-height: 1.35; color: var(--muted); }
.install-banner-go { flex: 0 0 auto; border: 0; border-radius: 8px; padding: 8px 11px; background: var(--accent); color: var(--accent-ink); font-size: 12px; font-weight: 700; }
.install-banner-close { flex: 0 0 auto; border: 0; background: transparent; color: var(--faint); font-size: 18px; padding: 2px 4px; }
.update-banner {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(16px + var(--safe-b));
  z-index: 95; display: flex; align-items: center; gap: 12px;
  padding: 8px 10px 8px 14px; border-radius: 999px; background: #2b241d; border: 1px solid #46392d;
  box-shadow: 0 10px 30px rgba(0,0,0,.4); font-size: 12px; color: var(--text); white-space: nowrap;
}
.update-banner button { border: 0; border-radius: 999px; padding: 5px 9px; background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 700; }

@media (display-mode: standalone) {
  .topbar { padding-top: max(10px, var(--safe-t)); }
}
@media (prefers-reduced-motion: reduce) {
  .splash-bar i { animation: none; width: 100%; }
}

.profile-avatar-source { margin-top:6px; font-size:10px; color:var(--faint); line-height:1.4; }
.profile-avatar-source a { color:var(--faint); text-decoration:underline; text-underline-offset:2px; }


.install-help {
  position: fixed; left: 16px; right: 16px; top: 50%; transform: translateY(-50%);
  z-index: 120; background: #211c17; border: 1px solid #3c3127; border-radius: 16px;
  padding: 16px; box-shadow: 0 24px 80px rgba(0,0,0,.55);
}
.install-help-head { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.install-help-head strong { font-size:15px; color:var(--text); }
.install-help-close { border:0; background:transparent; color:var(--faint); font-size:22px; line-height:1; }
.install-help-steps { margin:12px 0 8px; padding-left:20px; color:var(--muted); font-size:13px; line-height:1.9; }
.install-help-steps li::marker { color:var(--accent); }

.profile-top-actions { display:flex; align-items:center; gap:2px; }
.icon-btn.spinning { animation: af-spin .8s linear infinite; }
@keyframes af-spin { to { transform: rotate(360deg); } }
