/* ==========================================================
   见己 JIANJI · mobile-first
   夜墨 / 宣纸 / 朱砂
   ========================================================== */

@property --p {
  syntax: '<number>';
  inherits: false;
  initial-value: 0;
}

:root {
  --bg: #0A0B0D;
  --bg-2: #0E1013;
  --surface: #12141A;
  --surface-2: #171A21;
  --line: rgba(232, 224, 208, 0.09);
  --line-strong: rgba(232, 224, 208, 0.16);
  --text: #EDE7DA;
  --text-sub: #BFB8AA;
  --text-faint: #7C776E;
  --accent: #C8472F;
  --accent-2: #E0664A;
  --accent-soft: rgba(200, 71, 47, 0.13);
  --gold: #B99A62;

  --font-serif: "Songti SC", "STSong", "Noto Serif CJK SC", "Source Han Serif SC", serif;
  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --font-mono: "SF Mono", "JetBrains Mono", Menlo, monospace;

  --r-sm: 4px;
  --r-md: 12px;
  --r-lg: 20px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body { height: 100%; }

body {
  margin: 0;
  background: #07080A;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(900px 600px at 75% 0%, rgba(200, 71, 47, 0.10), transparent 60%),
    radial-gradient(800px 600px at 10% 100%, rgba(185, 154, 98, 0.06), transparent 60%);
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  opacity: 0.04;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

::selection { background: rgba(200, 71, 47, 0.35); color: #fff; }
button { font-family: inherit; color: inherit; cursor: pointer; border: none; background: none; }
textarea { font-family: inherit; color: inherit; }
:focus-visible { outline: 1px solid var(--accent-2); outline-offset: 3px; }

/* ---------------- 桌面：手机画框 ---------------- */
.ambient { display: none; }

#app {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background:
    linear-gradient(180deg, #0C0E12 0%, #0A0B0D 60%, #08090B 100%);
}

@media (min-width: 860px) {
  body { display: flex; align-items: center; justify-content: center; }
  #app {
    width: 430px;
    height: min(900px, calc(100dvh - 48px));
    border-radius: 30px;
    border: 1px solid rgba(232, 224, 208, 0.12);
    box-shadow: 0 50px 140px -40px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(0, 0, 0, 0.6);
  }
  .ambient { display: none; }
}

@media (min-width: 1120px) {
  .ambient {
    display: block;
    position: fixed;
    right: calc(50% + 250px);
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    z-index: 0;
    text-align: right;
  }
  .ambient-title {
    display: block;
    font-family: var(--font-serif);
    font-size: 120px;
    line-height: 0.95;
    letter-spacing: 0.2em;
    color: rgba(237, 231, 218, 0.035);
  }
  .ambient-line {
    display: block;
    margin-top: 24px;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.26em;
    color: rgba(124, 119, 110, 0.32);
  }
}

/* ---------------- 顶栏 ---------------- */
.appbar {
  flex: none;
  height: 54px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  background: rgba(10, 11, 13, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 20;
}

.brand { display: flex; align-items: center; gap: 8px; }
.seal {
  width: 24px; height: 24px;
  display: grid; place-items: center;
  border: 1px solid var(--accent);
  border-radius: 3px;
  background: rgba(200, 71, 47, 0.07);
  color: var(--accent);
  font-family: var(--font-serif);
  font-size: 14px;
  line-height: 1;
}
.brand-name {
  font-family: var(--font-serif);
  font-size: 15px;
  letter-spacing: 0.24em;
}

.world-chip {
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  color: var(--text-faint);
  background: rgba(255, 255, 255, 0.015);
}
.world-chip i { width: 2px; height: 2px; border-radius: 50%; background: var(--text-faint); }
.world-chip:active { background: rgba(255, 255, 255, 0.05); }

.me-btn {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  font-family: var(--font-serif);
  font-size: 13px;
  color: var(--text-sub);
}
.me-btn:active { background: rgba(255, 255, 255, 0.06); }

.ticker {
  flex: none;
  height: 26px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 10px;
  color: rgba(124, 119, 110, 0.9);
  border-bottom: 1px solid rgba(232, 224, 208, 0.04);
  white-space: nowrap;
  overflow: hidden;
}
.ticker-dot { width: 4px; height: 4px; border-radius: 50%; background: var(--accent); flex: none; }
#ticker-text { overflow: hidden; text-overflow: ellipsis; }

/* 页级显隐 */
body[data-page="hero"] .appbar,
body[data-page="onboard"] .appbar,
body[data-page="me"] .appbar,
body[data-page="hero"] .ticker,
body[data-page="onboard"] .ticker,
body[data-page="me"] .ticker { display: none; }

/* ---------------- 屏幕 ---------------- */
.screen {
  display: none;
  position: relative;
  flex: 1;
  min-height: 0;
  z-index: 10;
}
.screen.is-active { display: flex; flex-direction: column; animation: screenIn .38s var(--ease) both; }

@keyframes screenIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ---------------- 开场 ---------------- */
#screen-hero { align-items: center; justify-content: center; padding: 24px; }

#starfield { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }

.hero {
  position: relative;
  z-index: 2;
  text-align: center;
  width: 100%;
  max-width: 340px;
  padding-bottom: 10px;
}

.eyebrow {
  margin: 0 0 26px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.26em;
  color: var(--text-faint);
  opacity: 0;
  animation: rise .8s var(--ease) .1s forwards;
}

.hero-title {
  margin: 0;
  display: flex;
  justify-content: center;
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 96px;
  line-height: 0.94;
  letter-spacing: 0.08em;
  text-shadow: 0 0 80px rgba(237, 231, 218, 0.10);
}
.hero-title span { opacity: 0; transform: translateY(18px); animation: rise 1s var(--ease) forwards; }
.hero-title span:nth-child(1) { animation-delay: .18s; }
.hero-title span:nth-child(2) { animation-delay: .32s; color: var(--accent); text-shadow: 0 0 70px rgba(200, 71, 47, .4); }

.hero-sub {
  margin: 26px 0 0;
  font-family: var(--font-serif);
  font-size: 17px;
  letter-spacing: 0.14em;
  color: var(--text-sub);
  opacity: 0;
  animation: rise .9s var(--ease) .5s forwards;
}
.hero-lede {
  margin: 16px auto 0;
  font-size: 12px;
  line-height: 1.9;
  color: var(--text-faint);
  opacity: 0;
  animation: rise .9s var(--ease) .62s forwards;
}
.hero .cta { margin-top: 34px; opacity: 0; animation: rise .9s var(--ease) .76s forwards; }

.hero-stats {
  margin-top: 40px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  opacity: 0;
  animation: rise .9s var(--ease) .9s forwards;
}
.hero-stats div { text-align: left; }
.hero-stats b {
  display: block;
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 16px;
  color: var(--text);
}
.hero-stats span { font-size: 9px; letter-spacing: 0.14em; color: var(--text-faint); }

@keyframes rise { to { opacity: 1; transform: none; } }

/* ---------------- 按钮 ---------------- */
.cta {
  height: 48px;
  padding: 0 30px;
  border: 1px solid rgba(200, 71, 47, 0.55);
  border-radius: var(--r-sm);
  background: rgba(200, 71, 47, 0.11);
  color: #F3D9D0;
  font-size: 13px;
  letter-spacing: 0.14em;
  transition: background .2s, transform .2s, opacity .2s;
}
.cta:active { background: rgba(200, 71, 47, 0.22); transform: scale(0.985); }
.cta.wide { width: 100%; }
.cta:disabled { opacity: 0.32; }

.text-btn {
  padding: 6px 4px;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--text-faint);
}
.text-btn:active { color: var(--text-sub); }
.text-btn:disabled { opacity: 0.3; }
.text-btn.danger { display: block; margin: 24px auto 8px; color: rgba(200, 71, 47, 0.75); }

.round-btn {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  color: var(--text-sub);
  background: rgba(255, 255, 255, 0.02);
}
.round-btn.small { width: 28px; height: 28px; }
.round-btn:active { background: rgba(255, 255, 255, 0.06); }

/* ---------------- 三问 ---------------- */
#screen-onboard { padding: 16px 20px calc(20px + env(safe-area-inset-bottom)); }

.ob-top { flex: none; display: flex; align-items: center; justify-content: space-between; }
.ob-dots { display: flex; gap: 6px; }
.ob-dots i {
  width: 18px; height: 2px;
  background: rgba(232, 224, 208, 0.14);
  transition: background .3s;
}
.ob-dots i.on { background: var(--accent); }

.ob-body {
  flex: 1;
  min-height: 0;
  padding: 18px 0 12px;
  overflow-y: auto;
}
.ob-index {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.24em;
  color: var(--accent-2);
  margin-bottom: 14px;
}
.ob-prompt {
  margin: 0 0 26px;
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 25px;
  line-height: 1.6;
  letter-spacing: 0.02em;
  animation: qIn .45s var(--ease) both;
}
@keyframes qIn {
  from { opacity: 0; transform: translateY(8px); filter: blur(2px); }
  to { opacity: 1; transform: none; filter: none; }
}
.ob-foot { flex: none; }
.ob-note {
  margin: 0 0 12px;
  font-size: 10px;
  line-height: 1.7;
  color: var(--text-faint);
  text-align: center;
}

/* ---------------- 互动卡 ---------------- */
.card-slot { width: 100%; transition: opacity .2s var(--ease); }

.icard {
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  background: linear-gradient(180deg, rgba(23, 26, 33, 0.9), rgba(18, 20, 26, 0.7));
  padding: 16px;
  margin: 0 0 14px;
  animation: cardIn .4s var(--ease) both;
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

.icard-kicker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 9px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.18em;
  color: var(--text-faint);
}
.icard-kicker b { color: var(--accent-2); font-weight: 400; }

.icard-q {
  margin: 0 0 14px;
  font-family: var(--font-serif);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
}

/* 二选一 */
.opt {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 54px;
  padding: 10px 14px;
  margin-bottom: 8px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  text-align: left;
  transition: border-color .18s, background .18s, transform .18s;
}
.opt:last-of-type { margin-bottom: 0; }
.opt .idx {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-faint);
  flex: none;
  width: 14px;
}
.opt .tx { flex: 1; min-width: 0; }
.opt .tx b { display: block; font-size: 14px; font-weight: 400; color: var(--text); }
.opt .tx span { display: block; margin-top: 1px; font-size: 10.5px; color: var(--text-faint); }
.opt:active { background: rgba(255, 255, 255, 0.03); }
.opt.on {
  border-color: rgba(200, 71, 47, 0.6);
  background: var(--accent-soft);
}
.opt.on .idx { color: var(--accent-2); }

/* 四选一 */
.pick-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.pick-cell {
  min-height: 78px;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: border-color .18s, background .18s;
}
.pick-cell .no {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-faint);
}
.pick-cell b { font-size: 13px; font-weight: 400; line-height: 1.4; color: var(--text); }
.pick-cell span { font-size: 9.5px; color: var(--text-faint); line-height: 1.4; }
.pick-cell:active { background: rgba(255, 255, 255, 0.03); }
.pick-cell.on { border-color: rgba(200, 71, 47, 0.6); background: var(--accent-soft); }

/* 滑杆 */
.slider-box { padding: 4px 0 0; }
.slider-value {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--accent-2);
  margin-bottom: 12px;
}
.slider-track { position: relative; padding: 10px 0; }
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, rgba(232,224,208,.14), rgba(232,224,208,.14));
  border-radius: 2px;
  outline: none;
  margin: 0;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--accent);
  border: 4px solid #0F1114;
  box-shadow: 0 0 0 1px rgba(200, 71, 47, 0.6);
  cursor: pointer;
}
input[type="range"]::-moz-range-thumb {
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid #0F1114;
}
.slider-ends {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 2px;
  font-size: 10.5px;
  color: var(--text-faint);
}
.slider-ends span { max-width: 46%; line-height: 1.4; }
.slider-ends span:last-child { text-align: right; }

/* 选词 */
.words-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 7px; }
.word {
  min-height: 42px;
  padding: 6px 4px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  font-size: 12px;
  color: var(--text-sub);
  transition: border-color .18s, background .18s, color .18s;
}
.word:active { background: rgba(255, 255, 255, 0.03); }
.word.on { border-color: rgba(200, 71, 47, 0.6); background: var(--accent-soft); color: #F3D9D0; }
.words-count {
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  color: var(--text-faint);
}

.icard-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
}
.icard-hint { font-size: 9.5px; color: var(--text-faint); flex: 1; }
.icard-go {
  height: 40px;
  min-width: 84px;
  padding: 0 18px;
  border: 1px solid rgba(200, 71, 47, 0.5);
  border-radius: var(--r-sm);
  background: rgba(200, 71, 47, 0.1);
  color: #F3D9D0;
  font-size: 12px;
  letter-spacing: 0.08em;
  transition: opacity .2s, background .2s;
}
.icard-go:disabled { opacity: 0.3; }
.icard-go:active { background: rgba(200, 71, 47, 0.24); }

/* ---------------- 对话 ---------------- */
#screen-chat { overflow: hidden; }

.agent-bar {
  flex: none;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(14, 16, 19, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  text-align: left;
  z-index: 15;
}
.agent-bar:active { background: rgba(20, 23, 29, 0.95); }

.ring {
  width: 40px; height: 40px;
  flex: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  position: relative;
  background: conic-gradient(var(--accent) calc(var(--p) * 1%), rgba(232, 224, 208, 0.10) 0);
  transition: --p .5s;
}
.ring::before {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: #12141A;
}
.ring span {
  position: relative;
  z-index: 1;
  font-family: var(--font-serif);
  font-size: 15px;
  color: var(--text);
}

.agent-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.agent-name {
  font-size: 13px;
  color: var(--text);
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.agent-name i { font-style: normal; color: var(--text-faint); font-size: 10px; margin-left: 6px; }
.agent-state {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.06em;
  color: var(--text-faint);
}
.agent-pct {
  flex: none;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent-2);
}

.feed {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 18px 16px 8px;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.line {
  margin: 16px 0;
  text-align: center;
  font-family: var(--font-serif);
  font-size: 11.5px;
  line-height: 1.9;
  letter-spacing: 0.06em;
  color: var(--text-faint);
  animation: msgIn .4s var(--ease) both;
}
.line b { color: var(--gold); font-weight: 400; }

.bubble {
  max-width: 90%;
  padding: 11px 14px;
  margin-bottom: 10px;
  border: 1px solid var(--line);
  border-radius: 3px 14px 14px 14px;
  background: rgba(237, 231, 218, 0.045);
  font-size: 13.5px;
  line-height: 1.85;
  color: var(--text-sub);
  animation: msgIn .38s var(--ease) both;
}
.bubble p { margin: 0 0 6px; }
.bubble p:last-child { margin-bottom: 0; color: var(--text); }
.bubble.me {
  margin-left: auto;
  border-radius: 14px 3px 14px 14px;
  border-color: rgba(200, 71, 47, 0.28);
  background: rgba(200, 71, 47, 0.08);
  color: #EBD9D2;
  text-align: right;
  max-width: 78%;
}
@keyframes msgIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.typing { display: inline-flex; gap: 4px; padding: 4px 2px; }
.typing i {
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--text-faint);
  animation: blink 1.2s infinite;
}
.typing i:nth-child(2) { animation-delay: .18s; }
.typing i:nth-child(3) { animation-delay: .36s; }
@keyframes blink { 0%, 60%, 100% { opacity: .25; } 30% { opacity: 1; } }

.choice-chip {
  display: inline-block;
  margin: 0 0 10px;
  padding: 5px 11px;
  border: 1px solid rgba(200, 71, 47, 0.3);
  border-radius: 100px;
  background: rgba(200, 71, 47, 0.07);
  font-size: 10.5px;
  color: #E9B4A5;
  margin-left: auto;
  animation: msgIn .3s var(--ease) both;
}
.choice-row { display: flex; justify-content: flex-end; margin-bottom: 10px; }
.choice-row .choice-chip { margin: 0; }

.progress-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 2px 0 14px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  color: var(--text-faint);
  animation: msgIn .35s var(--ease) both;
}
.progress-pill i {
  flex: 1;
  height: 2px;
  background: rgba(232, 224, 208, 0.08);
  position: relative;
  overflow: hidden;
  border-radius: 2px;
}
.progress-pill i::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--w, 0%);
  background: var(--accent);
  transition: width .5s var(--ease);
}

.stamp {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 8px 0 18px;
  padding: 14px;
  border: 1px solid rgba(200, 71, 47, 0.45);
  border-radius: var(--r-md);
  background: linear-gradient(90deg, rgba(200, 71, 47, 0.13), rgba(200, 71, 47, 0.03));
  animation: stampIn .5s var(--ease) both;
}
@keyframes stampIn {
  0% { opacity: 0; transform: scale(.94); }
  60% { opacity: 1; transform: scale(1.01); }
  100% { transform: scale(1); }
}
.stamp .mark {
  width: 42px; height: 42px;
  flex: none;
  display: grid; place-items: center;
  border: 1px solid var(--accent);
  border-radius: 3px;
  color: var(--accent);
  font-family: var(--font-serif);
  font-size: 20px;
  background: rgba(200, 71, 47, 0.06);
}
.stamp .tx b {
  display: block;
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0.05em;
}
.stamp .tx span {
  display: block;
  margin-top: 2px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.06em;
  color: var(--text-faint);
}

.composer {
  flex: none;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 9px 12px calc(9px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: rgba(10, 11, 13, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
#chat-input {
  flex: 1;
  min-height: 40px;
  max-height: 96px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.02);
  font-size: 13px;
  line-height: 1.5;
  resize: none;
  transition: border-color .2s, height .15s;
}
#chat-input:focus { outline: none; border-color: rgba(200, 71, 47, 0.4); }
#chat-input::placeholder { color: rgba(124, 119, 110, 0.9); }

.send {
  width: 40px; height: 40px;
  flex: none;
  display: grid; place-items: center;
  border: 1px solid rgba(200, 71, 47, 0.5);
  border-radius: 50%;
  background: rgba(200, 71, 47, 0.12);
  color: var(--accent-2);
  transition: transform .2s, background .2s;
}
.send:active { background: var(--accent); color: #fff; transform: scale(.94); }
.send:disabled { opacity: .35; }

/* ---------------- 抽屉 ---------------- */
.sheet-backdrop {
  position: absolute;
  inset: 0;
  z-index: 60;
  background: rgba(4, 5, 6, 0.66);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s var(--ease);
}
.sheet-backdrop.on { opacity: 1; pointer-events: auto; }

.sheet {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 70;
  max-height: 88%;
  display: flex;
  flex-direction: column;
  border-radius: 22px 22px 0 0;
  border-top: 1px solid var(--line-strong);
  background: linear-gradient(180deg, #14171D 0%, #0F1114 100%);
  box-shadow: 0 -30px 80px -30px rgba(0, 0, 0, 0.9);
  transform: translateY(101%);
  transition: transform .42s var(--ease), visibility 0s linear .42s;
  visibility: hidden;
}
.sheet.is-open { transform: translateY(0); visibility: visible; transition: transform .42s var(--ease), visibility 0s linear 0s; }

.sheet-handle {
  width: 36px; height: 4px;
  margin: 9px auto 4px;
  border-radius: 2px;
  background: rgba(232, 224, 208, 0.18);
}

.sheet-head {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 20px 12px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--text-sub);
}

.sheet-body {
  overflow-y: auto;
  padding: 14px 20px calc(24px + env(safe-area-inset-bottom));
}

/* ---------------- 画像 ---------------- */
.agent-detail {
  margin: 2px 0 14px;
  padding: 12px;
  border: 1px solid rgba(200, 71, 47, 0.24);
  border-radius: var(--r-md);
  background: rgba(200, 71, 47, 0.05);
}
.ad-top { display: flex; align-items: center; gap: 10px; }
.ad-face {
  width: 34px; height: 34px;
  flex: none;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(200, 71, 47, 0.35);
  background: linear-gradient(135deg, #2A3A38, rgba(200, 71, 47, 0.3));
  font-family: var(--font-serif);
  font-size: 14px;
}
.ad-top div { flex: 1; min-width: 0; }
.ad-top b { display: block; font-size: 12.5px; font-weight: 400; color: var(--text); }
.ad-top span { display: block; font-size: 9.5px; color: var(--text-faint); }
.ad-top em {
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent-2);
}
.ad-bars { margin-top: 11px; display: grid; gap: 6px; }
.bar-row {
  display: grid;
  grid-template-columns: 32px 1fr 22px;
  align-items: center;
  gap: 8px;
  font-size: 9.5px;
  color: var(--text-faint);
}
.bar-row i {
  display: block;
  height: 3px;
  border-radius: 2px;
  background: rgba(232, 224, 208, 0.08);
  overflow: hidden;
}
.bar-row i b { display: block; height: 100%; background: var(--accent); }
.bar-row em {
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 9px;
  text-align: right;
  color: var(--text-sub);
}

.radar-wrap { padding: 6px 10px 0; }
#radar { width: 100%; height: auto; display: block; }

.axis-legend {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 14px;
  padding: 8px 2px 16px;
  border-bottom: 1px solid var(--line);
}
.leg { display: flex; align-items: center; justify-content: space-between; font-size: 10.5px; color: var(--text-faint); }
.leg .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--accent); margin-right: 6px; flex: none; }
.leg b { font-family: var(--font-mono); font-weight: 400; font-size: 10px; color: var(--text-sub); }

.belief { padding: 6px 0; }
.belief-item { padding: 9px 0; border-bottom: 1px solid rgba(232, 224, 208, 0.05); }
.belief-item:last-child { border-bottom: none; }
.belief-item span { font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.2em; color: var(--text-faint); }
.belief-item p {
  margin: 4px 0 0;
  font-family: var(--font-serif);
  font-size: 13px;
  line-height: 1.85;
  color: var(--text-sub);
}
.belief-item p.locked { color: rgba(124, 119, 110, 0.6); }

.done-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 20px 0 10px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.18em;
  color: var(--text-faint);
}
.done-head b { color: var(--text-sub); font-weight: 400; }

.done-list { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; }
.done-empty { font-size: 11px; color: var(--text-faint); }
.done-item {
  flex: none;
  width: 58px;
  text-align: center;
}
.done-item .face {
  width: 46px; height: 46px;
  margin: 0 auto 4px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--font-serif);
  font-size: 17px;
  border: 1px solid rgba(200, 71, 47, 0.35);
  background: linear-gradient(135deg, #2A3A38, rgba(200, 71, 47, 0.25));
}
.done-item span { font-size: 9px; color: var(--text-faint); display: block; }

/* ---------------- 世界 ---------------- */
.world-grid-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin-bottom: 6px;
}
.world-grid-stats div { background: #101216; padding: 12px 14px; }
.world-grid-stats span { display: block; font-size: 9px; letter-spacing: 0.14em; color: var(--text-faint); }
.world-grid-stats b {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 14px;
  color: var(--text-sub);
}

.world-feed { max-height: 42vh; overflow-y: auto; padding: 0; }
.world-feed .feed-item {
  padding: 8px 0;
  border-bottom: 1px dashed rgba(232, 224, 208, 0.06);
  font-size: 10.5px;
  line-height: 1.7;
  color: var(--text-faint);
  animation: msgIn .4s var(--ease) both;
}
.world-feed .feed-item .who { color: var(--text-sub); }
.world-feed .feed-item .dt { color: var(--accent-2); font-family: var(--font-mono); font-size: 9px; }

/* ---------------- 见己 ---------------- */
#screen-me { overflow-y: auto; }

.me-top {
  flex: none;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(10, 11, 13, 0.9);
  position: sticky;
  top: 0;
  z-index: 5;
}
.me-top-title { font-family: var(--font-serif); font-size: 14px; letter-spacing: 0.2em; color: var(--text-sub); }

.me-wrap { padding: 30px 22px 48px; }

.me-eyebrow {
  margin: 0;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.3em;
  color: var(--accent-2);
  opacity: 0;
  animation: rise .7s var(--ease) both;
}
.me-name {
  margin: 12px 0 4px;
  text-align: center;
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 52px;
  letter-spacing: 0.14em;
  opacity: 0;
  animation: rise .8s var(--ease) .08s both;
}
.me-meta {
  margin: 0;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.08em;
  color: var(--text-faint);
  opacity: 0;
  animation: rise .8s var(--ease) .16s both;
}
.me-judge {
  margin: 26px 0 0;
  padding: 16px 18px;
  border-left: 2px solid var(--accent);
  background: linear-gradient(90deg, rgba(200, 71, 47, 0.1), transparent);
  font-family: var(--font-serif);
  font-size: 15px;
  line-height: 1.9;
  color: var(--text);
  opacity: 0;
  animation: rise .8s var(--ease) .24s both;
}
.me-tags {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  opacity: 0;
  animation: rise .8s var(--ease) .3s both;
}
.tag {
  padding: 5px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 100px;
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--text-sub);
}
.tag.hot { border-color: rgba(200, 71, 47, .5); background: rgba(200, 71, 47, .08); color: #E9B4A5; }

.me-three {
  margin-top: 30px;
  border-top: 1px solid var(--line);
  opacity: 0;
  animation: rise .8s var(--ease) .36s both;
}
.me-three-item {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.me-three-item span {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.22em;
  color: var(--text-faint);
}
.me-three-item p {
  margin: 6px 0 0;
  font-family: var(--font-serif);
  font-size: 14.5px;
  line-height: 1.95;
  color: var(--text-sub);
}

.me-stats {
  margin-top: 26px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  opacity: 0;
  animation: rise .8s var(--ease) .42s both;
}
.me-stat { background: #101216; padding: 13px 10px; }
.me-stat b { display: block; font-family: var(--font-mono); font-weight: 400; font-size: 16px; }
.me-stat span { font-size: 9px; letter-spacing: 0.12em; color: var(--text-faint); }

.me-people {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  opacity: 0;
  animation: rise .8s var(--ease) .48s both;
}
.mini {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px 4px 4px;
  border: 1px solid var(--line);
  border-radius: 100px;
  font-size: 10px;
  color: var(--text-faint);
}
.mini .face {
  width: 22px; height: 22px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--font-serif);
  font-size: 10px;
  background: linear-gradient(135deg, #2A3A38, rgba(200, 71, 47, 0.3));
}
.mini b { font-weight: 400; color: var(--text-sub); }

.me-wrap .cta {
  margin-top: 30px;
  opacity: 0;
  animation: rise .8s var(--ease) .54s both;
}
.me-note {
  margin: 16px 0 0;
  text-align: center;
  font-size: 9.5px;
  letter-spacing: 0.06em;
  color: rgba(124, 119, 110, 0.75);
}

/* ---------------- toast ---------------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 34px;
  z-index: 200;
  transform: translate(-50%, 14px);
  padding: 9px 18px;
  border: 1px solid var(--line-strong);
  border-radius: 100px;
  background: rgba(20, 23, 29, 0.96);
  color: var(--text-sub);
  font-size: 11px;
  letter-spacing: 0.04em;
  opacity: 0;
  pointer-events: none;
  transition: opacity .28s, transform .28s;
  max-width: 86vw;
  text-align: center;
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ---------------- 滚动条 ---------------- */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(232, 224, 208, 0.12); border-radius: 2px; }

@media (min-width: 860px) {
  .toast { bottom: 60px; }
}
