:root {
  --bg: #eef0e8;
  --paper: #fbfbf6;
  --ink: #28393a;
  --muted: #76827c;
  --line: #d6dcd2;
  --wine: #8e2c45;
  --teal: #3a7a70;
  --gold: #b39a60;
  --violet: #6a5a9e;
  --good: #3a7a70;
  --bad: #a83a3a;
  --shadow: 0 8px 24px rgba(32, 59, 48, 0.06);
  --m0: #dde2d8;
  --m1: #b9524a;
  --m2: #d68c5c;
  --m3: #d9bf6a;
  --m4: #93bb8a;
  --m5: #4d917d;
  --mg: #b6b8b2;
  --serif: Georgia, 'Noto Serif SC', 'Songti SC', 'STSong', 'SimSun', serif;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #1c2726; --paper: #253231; --ink: #e2e8dc; --muted: #a0afa5; --line: #41504a;
    --wine: #dc8da5; --teal: #79b7a7; --gold: #c9b478; --violet: #b3a6e6; --good: #79b7a7; --bad: #e0857d;
    --shadow: 0 8px 24px rgba(0, 0, 0, 0.25); --m0: #33403e; --mg: #4c5753; color-scheme: dark;
  }
}
:root[data-theme='dark'] {
  --bg: #1c2726; --paper: #253231; --ink: #e2e8dc; --muted: #a0afa5; --line: #41504a;
  --wine: #dc8da5; --teal: #79b7a7; --gold: #c9b478; --violet: #b3a6e6; --good: #79b7a7; --bad: #e0857d;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.25); --m0: #33403e; --mg: #4c5753; color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 14px; line-height: 1.7; -webkit-font-smoothing: antialiased; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; transition: background 0.15s, border-color 0.15s, transform 0.1s; }
button:active:not(:disabled) { transform: translateY(1px); }
button:disabled { opacity: 0.45; cursor: default; }
.buy-row span[title] button:disabled { pointer-events: none; }
button:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; }
h1, h2, h3, h4, p { margin: 0; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.tiny { font-size: 11px; line-height: 1.7; color: var(--muted); }
.wrap { width: min(1280px, calc(100% - 64px)); margin: 0 auto; }
.narrow { width: min(760px, calc(100% - 32px)); padding: 36px 0 70px; }
.screen { min-height: 100vh; min-height: 100dvh; }

/* ---------- 通用组件 ---------- */
.plain { border: 0; padding: 0; background: none; color: var(--muted); }
.plain:hover { color: var(--wine); }
.theme { font-size: 20px; line-height: 1; }
.cta { background: var(--wine); color: #fff8f2; border: 0; padding: 14px 22px; font-size: 15px; letter-spacing: 0.5px; }
.cta:hover { filter: brightness(1.08); }
.ghost { background: none; border: 1px solid var(--line); padding: 7px 12px; font-size: 12px; }
.ghost:hover:not(:disabled) { border-color: var(--wine); color: var(--wine); }
.ghost.active { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.paper { background: var(--paper); border: 1px solid var(--line); box-shadow: var(--shadow); }
.eyebrow { font-size: 11px; letter-spacing: 2px; color: var(--muted); display: flex; align-items: center; gap: 10px; }
.eyebrow .dot { width: 5px; height: 5px; background: var(--wine); border-radius: 50%; }
.h2 { font-family: var(--serif); font-weight: 400; font-size: 28px; margin: 12px 0 20px; letter-spacing: -0.5px; }
.label { display: block; font-size: 11px; color: var(--muted); margin-bottom: 8px; }
.seg { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--line); background: var(--paper); max-width: 100%; }
.seg button { font-size: 12px; padding: 8px 12px; border: 0; border-right: 1px solid var(--line); background: none; white-space: nowrap; }
.seg button:last-child { border-right: 0; }
.seg button.active { background: var(--ink); color: var(--paper); }
.actions { display: flex; justify-content: space-between; align-items: center; margin-top: 24px; gap: 10px; flex-wrap: wrap; }

/* ---------- 首页 ---------- */
.site-nav { height: 76px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.wordmark { font: 22px var(--serif); letter-spacing: -0.5px; background: none; border: 0; padding: 0; }
.wordmark em { color: var(--wine); font-style: normal; }
.nav-links { display: flex; align-items: center; gap: 22px; font-size: 12px; }
.hero { display: grid; grid-template-columns: 1.05fr 1fr; gap: 72px; padding: 56px 0 48px; align-items: start; }
.hero-title { font-family: var(--serif); font-weight: 400; font-size: clamp(54px, 6.4vw, 96px); line-height: 1.08; letter-spacing: -4px; margin: 24px 0 22px; }
.hero-title span { display: block; }
.hero-title em { font-style: normal; color: var(--wine); font-size: 0.6em; margin-left: 8px; letter-spacing: 0; }
.lede { font-family: var(--serif); font-size: 17px; line-height: 2; max-width: 470px; color: var(--muted); }
.start-btns { display: flex; gap: 12px; margin: 30px 0 26px; flex-wrap: wrap; }
.settings-row { display: flex; gap: 28px; flex-wrap: wrap; }
.odds { padding: 24px 26px; }
.odds h2 { font-family: var(--serif); font-size: 18px; font-weight: 400; }
.odds .tiny { margin-top: 4px; }
.odds-row { display: grid; grid-template-columns: 112px 1fr 44px; gap: 12px; align-items: center; font-size: 12px; margin: 10px 0; }
.track { height: 5px; background: var(--line); }
.track i { display: block; height: 100%; background: var(--teal); }
.odds-row .pct { text-align: right; font: 11px var(--mono); color: var(--muted); }
.footer { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-top: 1px solid var(--line); padding: 20px 0 40px; font-size: 11px; color: var(--muted); }

/* ---------- 出生 ---------- */
.funnel { padding: 22px 24px; }
.funnel-row { display: grid; grid-template-columns: 150px 1fr 120px; gap: 14px; align-items: center; margin: 9px 0; font-size: 13px; animation: rise 0.35s ease-out; }
.funnel-row .num { text-align: right; font: 12px var(--mono); }
.funnel-row .val { color: var(--ink); }
.funnel-row .k { color: var(--muted); }
.birth-sum { margin-top: 20px; padding: 24px; background: var(--paper); border: 1px solid var(--line); border-left: 3px solid var(--wine); animation: rise 0.4s ease-out; }
.birth-sum .big { font-family: var(--serif); font-size: clamp(30px, 5vw, 46px); color: var(--wine); line-height: 1.2; margin: 6px 0 10px; letter-spacing: -1px; }
.birth-sum p { margin: 6px 0; }
.attr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px 16px; margin-top: 14px; font-size: 13px; }
.attr-grid span { color: var(--muted); }
@keyframes rise { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }

/* ---------- 设定 ---------- */
.steps { display: flex; gap: 6px; flex-wrap: wrap; font-size: 11px; }
.steps span { padding: 3px 9px; border: 1px solid var(--line); color: var(--muted); }
.steps span.on { background: var(--wine); color: #fff8f2; border-color: var(--wine); }
.steps span.done { color: var(--ink); }
.choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; margin-top: 18px; }
.choice { text-align: left; padding: 14px 16px; border: 1px solid var(--line); background: var(--paper); display: flex; flex-direction: column; gap: 3px; }
.choice:hover:not(:disabled) { border-color: var(--wine); }
.choice b { font-weight: 500; font-size: 14px; }
.choice small { color: var(--muted); font-size: 11px; line-height: 1.6; white-space: pre-line; }

/* ---------- 人生面板 ---------- */
.topbar { position: sticky; top: 0; z-index: 10; background: var(--bg); border-bottom: 1px solid var(--line); }
.topbar-in { display: flex; min-height: 72px; align-items: center; gap: 22px; padding: 8px 0; }
.age-display { display: flex; align-items: center; gap: 14px; }
.age-number { font: 36px/1 var(--serif); min-width: 70px; }
.age-number small { font: 12px var(--sans); margin-left: 3px; }
.age-number.turn { animation: rise 0.5s ease-out; color: var(--wine); }
.age-year { color: var(--muted); font-size: 11px; min-width: 128px; }
.year-track { height: 2px; background: var(--line); margin-top: 5px; }
.year-track i { display: block; height: 100%; background: var(--wine); width: 0; transition: width 0.5s; }
.controls { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; flex: 1; }
.speed-group { display: inline-flex; border: 1px solid var(--line); }
.speed-group button { border: 0; border-right: 1px solid var(--line); background: none; padding: 7px 10px; font: 12px var(--mono); }
.speed-group button:last-child { border-right: 0; }
.speed-group button.active { background: var(--ink); color: var(--paper); }
.ctrl-sep { width: 1px; height: 22px; background: var(--line); margin: 0 4px; }
#btn-menu { margin-left: auto; }

.life-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr) 350px; gap: 18px; padding-top: 18px; padding-bottom: 18px; align-items: start; }
.column { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.panel { background: var(--paper); border: 1px solid var(--line); padding: 18px; min-width: 0; }
.panel h3 { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-family: var(--serif); font-size: 15px; font-weight: 400; border-bottom: 1px solid var(--line); padding-bottom: 11px; margin-bottom: 14px; }
.panel h3 small { font: 10px var(--sans); color: var(--muted); }
.small-link { font: 11px var(--sans); }

.identity { padding: 0; overflow: hidden; }
.id-band { background: var(--wine); color: #fff8f2; display: flex; justify-content: space-between; padding: 7px 14px; font-size: 10px; letter-spacing: 1px; }
.id-body { display: flex; gap: 14px; padding: 16px 14px 12px; }
.avatar { width: 64px; height: 76px; flex: none; background: var(--bg); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; font-size: 38px; }
.id-info h2 { font-family: var(--serif); font-weight: 400; font-size: 20px; line-height: 1.3; }
.id-info h2 small { font: 12px var(--sans); color: var(--muted); margin-left: 6px; }
.id-info p { font-size: 12px; line-height: 1.75; }
.id-info .tiny { margin-top: 4px; }
.mrz { font: 9px/1.8 var(--mono); letter-spacing: 1px; color: var(--muted); border-top: 1px solid var(--line); padding: 7px 14px; white-space: nowrap; overflow: hidden; text-overflow: clip; }

.stat-row { display: grid; grid-template-columns: 66px 1fr 34px; align-items: center; gap: 8px; font-size: 12px; margin: 7px 0; }
.stat-row .bar { height: 4px; background: var(--line); }
.stat-row .bar i { display: block; height: 100%; background: var(--teal); transition: width 0.5s; }
.stat-row.warn .bar i { background: var(--bad); }
.stat-row .v { text-align: right; font: 11px var(--mono); }
.money-block { border-top: 1px solid var(--line); margin-top: 14px; padding-top: 12px; }
.balance { font: 26px/1.2 var(--serif); display: block; margin: 2px 0 4px; }
.balance.neg { color: var(--bad); }
.money-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.money-actions .ghost { font-size: 11px; padding: 6px 10px; }

.mini-person { display: grid; grid-template-columns: 26px 1fr; gap: 8px; margin-bottom: 10px; font-size: 12px; }
.mini-person .em { font-size: 18px; line-height: 1.4; }
.mini-person .bar { height: 3px; background: var(--line); margin-top: 3px; }
.mini-person .bar i { display: block; height: 100%; background: var(--wine); }

.result-panel { border-left: 3px solid var(--wine); animation: rise 0.4s ease-out; }
.result-panel .kick { font-size: 10px; letter-spacing: 2px; color: var(--wine); margin-bottom: 6px; }
.result-panel .rt { font: 16px/1.6 var(--serif); }
.result-panel .rr { font-size: 13px; color: var(--muted); margin-top: 4px; white-space: pre-line; }

.focus-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.focus-chip { border: 1px solid var(--line); background: none; padding: 7px 12px; font-size: 12px; }
.focus-chip:hover { border-color: var(--teal); }
.focus-chip.active { border-color: var(--teal); background: rgba(58, 122, 112, 0.1); color: var(--teal); }
#focus-hint { margin-top: 10px; }

.feed-panel { padding-bottom: 4px; }
.feed { list-style: none; margin: 0; padding: 0; }
.feed-item { position: relative; padding: 0 0 18px 22px; border-left: 1px solid var(--line); margin-left: 6px; animation: rise 0.35s ease-out; }
.feed-item:last-child { border-left-color: transparent; }
.feed-item::before { content: ''; position: absolute; left: -3px; top: 6px; width: 5px; height: 5px; background: var(--line); border-radius: 50%; }
.feed-item.choice::before, .feed-item.big::before { background: var(--wine); width: 7px; height: 7px; left: -4px; }
.feed-item.world::before { background: var(--teal); }
.feed-item.era::before { background: var(--violet); }
.feed-item.good::before { background: var(--teal); }
.feed-item.bad::before { background: var(--bad); }
.feed-age { font: 10px var(--mono); color: var(--muted); display: block; margin-bottom: 2px; }
.feed-text { font: 14px/1.75 var(--serif); white-space: pre-line; }
.feed-item.bill .feed-text, .feed-item.sys .feed-text { font: 12px/1.7 var(--sans); color: var(--muted); }
.feed-item.world .feed-text { color: var(--teal); font-size: 13px; }
.feed-item.era .feed-text { color: var(--violet); }
.feed-item.auto .feed-text, .feed-item.log .feed-text { font-size: 14px; }
.feed-item:first-child .feed-text { color: var(--wine); }
.feed-item.bill:first-child .feed-text { color: var(--muted); }

.peer { padding: 10px 0; border-bottom: 1px dashed var(--line); font-size: 12px; }
.peer:last-child { border-bottom: 0; }
.peer b { font-weight: 500; font-size: 13px; }
.peer .st { color: var(--muted); }
.life-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 4px; }
.life-grid span { aspect-ratio: 1; background: var(--m0); }
.life-grid span.now { outline: 1px solid var(--wine); outline-offset: 2px; }
.grid-legend { display: flex; justify-content: space-between; font-size: 10px; color: var(--muted); margin-top: 10px; }
.now-dot { color: var(--wine); font-style: normal; }
.city-dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; font-size: 12px; margin: 0; }
.city-dl dt { color: var(--muted); }
.city-dl dd { margin: 0; text-align: right; }

.life-bottom { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 16px 0 30px; border-top: 1px solid var(--line); font-size: 11px; color: var(--muted); }
.live-dot { display: inline-block; width: 6px; height: 6px; background: var(--teal); border-radius: 50%; margin-right: 6px; box-shadow: 0 0 0 4px rgba(58, 122, 112, 0.12); animation: breathe 2.4s ease-in-out infinite; }
.live-dot.paused { background: var(--muted); animation: none; }
@keyframes breathe { 50% { opacity: 0.35; } }

/* ---------- 弹窗 ---------- */
#overlay { position: fixed; inset: 0; z-index: 30; background: rgba(28, 39, 38, 0.38); display: flex; align-items: center; justify-content: center; padding: 16px; }
.dialog { width: min(560px, 100%); max-height: 88vh; overflow-y: auto; background: var(--paper); border: 1px solid var(--line); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.18); padding: 28px 28px 24px; animation: rise 0.25s ease-out; }
.dialog.wide { width: min(760px, 100%); }
.dialog-kicker { font-size: 10px; letter-spacing: 2px; color: var(--wine); margin-bottom: 12px; }
.dialog h2 { font-family: var(--serif); font-weight: 400; font-size: 24px; line-height: 1.35; margin-bottom: 12px; }
.dialog > p { white-space: pre-line; margin-bottom: 18px; }
.choice-list { display: flex; flex-direction: column; gap: 8px; }
.choice-btn { display: block; width: 100%; text-align: left; background: var(--bg); border: 1px solid var(--line); padding: 13px 16px; }
.choice-btn:hover:not(:disabled) { border-color: var(--wine); }
.choice-btn strong { display: flex; justify-content: space-between; gap: 10px; font-weight: 500; font-size: 14px; }
.choice-btn strong span { color: var(--wine); }
.choice-btn small { display: block; color: var(--muted); font-size: 11px; margin-top: 4px; }
.dialog .foot { margin-top: 16px; }
.dialog h4 { font-size: 12px; font-weight: 500; color: var(--muted); margin: 18px 0 8px; letter-spacing: 1px; }
.dialog h4:first-of-type { margin-top: 4px; }
.ledger { font: 12px var(--mono); background: var(--bg); padding: 10px 12px; border: 1px solid var(--line); }
.ledger div { display: flex; justify-content: space-between; gap: 10px; }
.ledger .net { border-top: 1px dashed var(--line); margin-top: 6px; padding-top: 6px; font-weight: 600; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.input { padding: 8px 10px; border: 1px solid var(--line); background: var(--bg); }
.buy-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 13px; }
.buy-row:last-child { border-bottom: 0; }
.buy-row small { color: var(--muted); display: block; font-size: 11px; }
.dialog-close { display: flex; justify-content: flex-end; margin-top: 20px; }
.people-list { display: flex; flex-direction: column; }
.people-list .person { display: grid; grid-template-columns: 30px 1fr; gap: 10px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.people-list .person .em { font-size: 22px; }
.people-list .bar { height: 3px; background: var(--line); margin-top: 5px; }
.people-list .bar i { display: block; height: 100%; background: var(--wine); }

/* ---------- 毕业 & 结局 ---------- */
.grad-feed .feed-text { font-size: 16px; }
.end-hero { text-align: center; padding: 34px 20px 28px; }
.end-hero .em { font-size: 52px; }
.end-hero .nm { font-family: var(--serif); font-size: clamp(32px, 6vw, 46px); line-height: 1.25; margin: 6px 0; letter-spacing: -1px; }
.end-hero .rar { font-size: 12px; color: var(--muted); }
.end-hero .sub { margin-top: 10px; font-family: var(--serif); color: var(--muted); }
.tagrow { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 16px; }
.tag { font-size: 12px; padding: 4px 10px; border: 1px solid var(--line); }
.tag.new { border-color: var(--wine); color: var(--wine); }
.sec { margin-top: 30px; }
.sec h3 { font-family: var(--serif); font-weight: 400; font-size: 18px; border-bottom: 1px solid var(--line); padding-bottom: 10px; margin-bottom: 12px; }
.sec p { margin: 8px 0; font-family: var(--serif); font-size: 15px; line-height: 1.9; white-space: pre-line; }
.fates { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.fate { padding: 12px 14px; background: var(--paper); border: 1px solid var(--line); font-size: 13px; }
.fate .who { font-weight: 500; margin-bottom: 4px; }
.sumcard { font: 12px/1.85 var(--mono); white-space: pre-wrap; background: var(--paper); border: 1px dashed var(--muted); padding: 16px; overflow-x: auto; }
.minimap { display: grid; grid-template-columns: repeat(12, 1fr); gap: 3px; max-width: 380px; }
.minimap span { aspect-ratio: 1; background: var(--m0); }

/* 图鉴 */
.col-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.col-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; }
.col-item { padding: 12px; border: 1px solid var(--line); background: var(--paper); }
.col-item.locked { opacity: 0.45; }
.col-item .em { font-size: 22px; }
.col-item .nm { font-size: 14px; }
.col-item small { color: var(--muted); font-size: 11px; display: block; line-height: 1.6; }
.life-row { padding: 12px 14px; background: var(--paper); border: 1px solid var(--line); margin-bottom: 8px; font-size: 13px; }

.toast { position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 20px); background: var(--ink); color: var(--paper); padding: 9px 16px; font-size: 12px; z-index: 40; opacity: 0; pointer-events: none; transition: opacity 0.25s, transform 0.25s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }


/* ---------- 这个月做什么 ---------- */
.ap-dots { letter-spacing: 3px; color: var(--wine); font-size: 12px; }
.act-tabs { display: flex; flex-wrap: wrap; gap: 0; border: 1px solid var(--line); width: fit-content; max-width: 100%; margin-bottom: 12px; }
.act-tabs button { border: 0; border-right: 1px solid var(--line); background: none; padding: 7px 12px; font-size: 12px; }
.act-tabs button:last-child { border-right: 0; }
.act-tabs button.active { background: var(--ink); color: var(--paper); }
.act-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.act-btn { text-align: left; background: var(--bg); border: 1px solid var(--line); padding: 10px 12px; display: flex; flex-direction: column; gap: 3px; }
.act-btn:hover:not(:disabled) { border-color: var(--wine); }
.act-btn b { font-weight: 500; font-size: 13px; display: flex; justify-content: space-between; gap: 6px; }
.act-btn b span { font: 11px var(--mono); color: var(--wine); white-space: nowrap; }
.act-btn small { font-size: 11px; color: var(--muted); line-height: 1.55; }
#act-note { margin-top: 10px; }
.feed-title { font: 15px/1.6 var(--serif); margin-bottom: 2px; }
.feed-body { font-size: 13px; line-height: 1.85; color: var(--muted); white-space: pre-line; }
.feed-fx { font: 10px/1.6 var(--mono); color: var(--teal); margin-top: 3px; }
.feed-item:first-child .feed-title { color: var(--wine); }
.feed-item.thread .feed-title, .feed-item.choice .feed-title { color: var(--wine); }
.feed-item.act::before { background: var(--gold); }
.feed-item.social::before, .feed-item.thread::before { background: var(--wine); }
.result-panel .rf { font: 11px var(--mono); color: var(--teal); margin-top: 6px; }
.person-card { padding: 14px 0; border-bottom: 1px dashed var(--line); }
.person-card:last-child { border-bottom: 0; }
.person-head { display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; align-items: start; }
.person-head .em { font-size: 26px; line-height: 1.2; }
.person-head .stage { font-size: 11px; padding: 2px 8px; border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.person-head .stage.close { border-color: var(--wine); color: var(--wine); }
.bondbar { height: 4px; background: var(--line); margin: 6px 0 2px; }
.bondbar i { display: block; height: 100%; background: var(--wine); }
.perks { margin: 8px 0 0 44px; display: flex; flex-direction: column; gap: 3px; font-size: 12px; }
.perks .on { color: var(--teal); }
.perks .off { color: var(--muted); }
.person-acts { margin: 10px 0 0 44px; display: flex; flex-wrap: wrap; gap: 6px; }
.person-acts .ghost { font-size: 11px; padding: 6px 10px; }
.person-acts .ghost small { color: var(--muted); margin-left: 4px; }
.mini-person { cursor: pointer; }
.mini-person:hover b { color: var(--wine); }


.feed-ref, .ref { font-size: 10px; line-height: 1.6; color: var(--muted); opacity: 0.75; margin-top: 4px; }
.dialog .ref { margin: 8px 0 14px; }
.dialog > p + .ref { margin: -10px 0 16px; }

/* ---------- 响应式 ---------- */
@media (max-width: 1180px) {
}
@media (max-width: 860px) {
  .wrap { width: calc(100% - 32px); }
  .hero { grid-template-columns: 1fr; gap: 32px; padding-top: 32px; }
  .hero-title { letter-spacing: -2px; }
  .life-layout { grid-template-columns: 1fr; gap: 14px; padding-top: 14px; }
  .topbar-in { gap: 10px; min-height: 0; }
  .age-number { font-size: 28px; min-width: 56px; }
  .age-year { min-width: 0; }
  .controls { gap: 4px; }
  .controls .ghost { padding: 6px 8px; font-size: 11px; }
  .speed-group button { padding: 6px 7px; }
  .ctrl-sep { display: none; }
  .funnel-row { grid-template-columns: 110px 1fr 90px; gap: 8px; font-size: 12px; }
  .dialog { padding: 22px 18px 18px; }
  .panel { padding: 14px; }
}

/* 我的房间：16:9 的房间图 */
.room-panel { padding: 10px; }
.room-panel canvas { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; margin: 0 auto; background: var(--bg); }
.room-cap { margin: 8px 2px 0; font-size: 11px; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; align-items: baseline; }
.room-cap b { font: 13px var(--serif); font-weight: 400; color: var(--ink); }
/* 右栏：主要操作集中在一起 */
.main-btns { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; }
.main-btns button { padding: 10px 4px; font-size: 13px; background: var(--paper); }
.col-ctrl .act-grid { grid-template-columns: 1fr; gap: 6px; }
.col-ctrl .act-btn { padding: 8px 11px; }
.col-ctrl .act-tabs { width: 100%; display: grid; grid-template-columns: repeat(6, 1fr); }
.col-ctrl .act-tabs button { padding: 7px 2px; font-size: 12px; white-space: nowrap; }
.col-ctrl .focus-chips { gap: 5px; }
/* 往下拉才看到的 */
@media (max-width: 1180px) {
  .life-layout { grid-template-columns: minmax(0, 1fr) 330px; }
  .life-layout > .col-me { grid-column: 1 / -1; order: 3; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
}
@media (max-width: 860px) {
  .life-layout { grid-template-columns: 1fr; }
  .life-layout > .col-story { order: 1; }
  .life-layout > .col-ctrl { order: 2; }
  .life-layout > .col-me { order: 3; display: flex; }
  .room-panel canvas { max-width: 100%; }
}

/* 领养宠物：选中的那一行，和下面的起名字、领养 */
.buy-row.picked { background: var(--bg); box-shadow: inset 3px 0 0 var(--wine); padding-left: 10px; }
.buy-row button.active { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.pet-adopt { display: flex; gap: 8px; margin: 12px 0 4px; }
.pet-adopt .input { flex: 1; max-width: 260px; }
.pet-adopt .cta { padding: 8px 18px; font-size: 13px; }
.pet-adopt .cta:disabled, .pet-adopt .input:disabled { opacity: 0.45; cursor: not-allowed; }

.ap-cut { font-size: 10px; color: var(--wine); margin-right: 4px; }
.topic { margin-top: 14px; padding: 12px 14px; border-left: 3px solid var(--wine); background: var(--paper); font-family: var(--serif); line-height: 1.9; }
.topic b { font-weight: 500; color: var(--wine); margin-right: 6px; }
.care-ref { color: var(--muted); }
#psy-care { margin-top: 10px; line-height: 1.6; }

/* 图鉴配图 */
.pic { display: block; position: relative; aspect-ratio: 1 / 1; background: var(--bg); border: 1px solid var(--line); overflow: hidden; margin-bottom: 8px; }
.pic img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; }
.pic i { display: none; position: absolute; inset: 0; align-items: center; justify-content: center; font-style: normal; font-size: 30px; color: var(--muted); }
.pic.noimg img { display: none; }
.pic.noimg i { display: flex; }
.pic.hero { width: min(300px, 72%); margin: 0 auto 16px; }
.pic.hero i { font-size: 56px; }
.end-cards { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 20px; }
.end-card { width: 120px; text-align: center; }
.end-card .pic { margin-bottom: 6px; }
.end-card .k { font-size: 10px; color: var(--muted); letter-spacing: 0.5px; }
.end-card .n { font-size: 12px; line-height: 1.5; }
.end-card.new .pic { box-shadow: 0 0 0 2px var(--wine); }
.col-item.locked .pic { background: var(--line); }

/* 结局页：按这一局的性格挑的那段文案 */
.end-story { max-width: 560px; margin: 18px auto 6px; font: 15px/2 var(--serif); color: var(--ink); text-align: left; text-indent: 2em; }
