/* ============ 从失败里学：夫妻生活 ============ */
:root {
  --bg: #FFF6EC;
  --ink: #2B2340;
  --ink-2: #5E5670;
  --ink-3: #9A92A8;
  --card: #FFFFFF;
  --line: #EFE4D6;
  --me: #FF5C8A;
  --pt: #4C7DFF;
  --done: #16A34A;
  --radius: 20px;
  --shadow: 0 1px 2px rgba(43, 35, 64, .06), 0 6px 20px rgba(43, 35, 64, .06);
  --shadow-up: 0 2px 4px rgba(43, 35, 64, .08), 0 14px 32px rgba(43, 35, 64, .12);
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --c: #FF7A6B;
}
* { box-sizing: border-box; --c-soft: color-mix(in srgb, var(--c) 18%, white); --c-ink: color-mix(in srgb, var(--c) 70%, #1b1530); }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font);
  font-size: 16px; line-height: 1.7; -webkit-font-smoothing: antialiased;
  padding-bottom: calc(72px + env(safe-area-inset-bottom));
}
a { color: inherit; }
button, input, textarea { font: inherit; color: inherit; }
.ic { width: 1.15em; height: 1.15em; flex: none; vertical-align: -0.18em; }
.blob { position: absolute; inset: 0; width: 100%; height: 100%; }
mark { background: linear-gradient(transparent 55%, color-mix(in srgb, var(--c) 35%, transparent) 55%); color: inherit; font-weight: 600; padding: 0 1px; }
.muted { color: var(--ink-3); }
.small { font-size: 13px; }
.center { text-align: center; }
.scroll-x { overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.scroll-x::-webkit-scrollbar { display: none; }

/* ---------- 顶栏 / 底栏 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px; padding-top: calc(10px + env(safe-area-inset-top));
  background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark { position: relative; width: 34px; height: 24px; }
.brand-mark i { position: absolute; top: 0; width: 24px; height: 24px; border-radius: 50%; background: var(--me); }
.brand-mark i + i { left: 10px; background: var(--pt); mix-blend-mode: multiply; opacity: .9; }
.brand-text { font-weight: 800; font-size: 17px; letter-spacing: .5px; line-height: 1.1; }
.brand-text small { display: block; font-size: 11px; font-weight: 600; color: var(--ink-3); letter-spacing: 3px; }
.tabs { display: none; gap: 4px; }
.tabs a, .bottombar a { position: relative; display: flex; align-items: center; gap: 6px; text-decoration: none; color: var(--ink-2); font-weight: 600; }
.tabs a { padding: 8px 14px; border-radius: 999px; font-size: 15px; }
.tabs a.on { background: var(--ink); color: #fff; }
.tabs a:not(.on):hover { background: rgba(43, 35, 64, .06); }
.bottombar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 30; display: grid; grid-template-columns: repeat(4, 1fr);
  background: rgba(255, 255, 255, .94); backdrop-filter: blur(12px); border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.bottombar a { flex-direction: column; gap: 0; padding: 8px 0 6px; font-size: 11px; }
.bottombar a span { max-width: 6em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bottombar a .ic { width: 24px; height: 24px; }
.bottombar a.on { color: var(--ink); }
.bottombar a.on .ic { color: var(--me); }
.badge { position: absolute; top: 2px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--me); color: #fff; font-size: 11px; line-height: 18px; text-align: center; font-weight: 700; }
.tabs .badge { top: -2px; left: auto; right: -4px; }

main { max-width: 1120px; margin: 0 auto; padding: 16px; outline: none; }
.loading { padding: 80px 0; text-align: center; color: var(--ink-3); }
.site-footer { max-width: 1120px; margin: 24px auto 0; padding: 20px 16px 32px; color: var(--ink-3); font-size: 12px; border-top: 1px dashed var(--line); }
.site-footer p { margin: 4px 0; }

/* ---------- 按钮 / 标签 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; cursor: pointer;
  background: var(--ink); color: #fff; padding: 10px 20px; border-radius: 999px; font-weight: 700; text-decoration: none;
  transition: transform .15s, box-shadow .15s;
}
.btn:active { transform: scale(.97); }
.btn.sm { padding: 7px 16px; font-size: 14px; }
.btn.block { display: flex; width: 100%; }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn.danger { color: #D92D20; }
.btn:disabled { opacity: .5; }
.linkbtn { border: 0; background: none; padding: 0; color: var(--ink-2); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; display: inline-flex; align-items: center; gap: 3px; }
.chip {
  flex: none; display: inline-flex; align-items: center; gap: 6px; border: 0; cursor: pointer; white-space: nowrap;
  padding: 6px 14px; border-radius: 999px; background: #fff; color: var(--ink-2); font-size: 14px; font-weight: 600;
  box-shadow: inset 0 0 0 1.5px var(--line); transition: background .15s, color .15s;
}
.chip .cdot { width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
.chip.on { background: var(--ink); color: #fff; box-shadow: none; }
.chip.on[style] { background: var(--c); }
.chip.on .cdot { background: #fff; }
.type { display: inline-block; font-size: 12px; font-weight: 700; padding: 1px 9px; border-radius: 999px; letter-spacing: .5px; }
.type-call { background: #FFE4E0; color: #C2410C; }
.type-talk { background: #E6EEFF; color: #3451B2; }
.type-good { background: #DDF6E6; color: #15803D; }
.tag { font-size: 12px; color: var(--ink-2); background: rgba(255, 255, 255, .7); padding: 1px 8px; border-radius: 999px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 9px 16px; border-radius: 999px; background: var(--c); color: #fff; font-weight: 700; font-size: 14px; text-decoration: none; border: 0; cursor: pointer; }
.pill.ghost { background: #fff; color: var(--c-ink); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--c) 40%, white); }

/* ---------- 首页 Hero ---------- */
.hero {
  position: relative; display: grid; gap: 8px; padding: 22px 20px 18px; border-radius: 28px; overflow: hidden;
  background: linear-gradient(135deg, #FFE9DC 0%, #FFF1F6 45%, #E9F0FF 100%); box-shadow: var(--shadow);
}
.hero h1 { margin: 0; font-size: 26px; line-height: 1.3; letter-spacing: .5px; font-weight: 900; }
.hero p { margin: 8px 0 0; color: var(--ink-2); font-size: 15px; }
.hero-art { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-top: 10px; }
.ha { position: relative; aspect-ratio: 1; display: grid; place-items: center; color: #fff; text-decoration: none; animation: float 6s ease-in-out infinite; animation-delay: calc(var(--i) * -0.45s); }
.ha .ic { position: relative; width: 46%; height: 46%; }
.ha:nth-child(even) { transform: translateY(6px); }
@keyframes float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -4px; } }
@media (prefers-reduced-motion: reduce) { .ha { animation: none; } }

/* ---------- 筛选 ---------- */
.filters { margin: 18px 0 8px; display: grid; gap: 10px; }
.search { display: flex; align-items: center; gap: 8px; background: #fff; border-radius: 999px; padding: 0 16px; box-shadow: inset 0 0 0 1.5px var(--line); }
.search .ic { color: var(--ink-3); }
.search input { flex: 1; border: 0; outline: 0; background: none; padding: 11px 0; font-size: 16px; min-width: 0; }
.chiprow { display: flex; gap: 8px; padding: 2px; }
.chiprow .sep { flex: none; width: 1px; background: var(--line); margin: 4px 2px; }
.count { margin: 0; font-size: 13px; color: var(--ink-3); }

/* ---------- 卡片 ---------- */
.grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
.card {
  position: relative; display: flex; flex-direction: column; gap: 6px; padding: 18px 18px 14px; overflow: hidden;
  background: var(--card); border-radius: var(--radius); text-decoration: none; box-shadow: var(--shadow);
  border-top: 5px solid var(--c); transition: transform .18s, box-shadow .18s;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-up); }
.card:active { transform: scale(.99); }
.card-art { position: absolute; top: -18px; right: -18px; width: 96px; height: 96px; display: grid; place-items: center; color: var(--c); }
.card-art .ic { position: relative; width: 30px; height: 30px; translate: -6px 6px; }
.card-head { display: flex; align-items: center; gap: 8px; position: relative; }
.cid { font-weight: 900; font-size: 15px; color: var(--c-ink); font-variant-numeric: tabular-nums; }
.essence { position: relative; margin: 4px 0 2px; font-size: 19px; line-height: 1.55; font-weight: 800; letter-spacing: .3px; padding-right: 36px; }
.ctitle { margin: 0; font-size: 14px; font-weight: 500; color: var(--ink-2); line-height: 1.55; }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 6px; font-size: 12px; color: var(--ink-3); }
.chname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.status { display: inline-flex; align-items: center; gap: 6px; flex: none; }
.dot { width: 10px; height: 10px; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--a); }
.dot.on { background: var(--a); }
.st { display: inline-flex; align-items: center; gap: 2px; font-weight: 700; }
.st .ic { width: 16px; height: 16px; }
.st-talk { color: var(--me); }
.st-done { color: var(--done); }
.st-cmt { color: var(--ink-2); }
.empty { padding: 40px; text-align: center; color: var(--ink-3); background: #fff; border-radius: var(--radius); }

/* ---------- 章节 ---------- */
.page-head { padding: 12px 4px 4px; }
.page-head h1 { margin: 0; font-size: 26px; font-weight: 900; display: flex; align-items: center; gap: 10px; }
.page-head.center h1 { justify-content: center; }
.page-head p { margin: 6px 0 0; color: var(--ink-2); }
.page-head.center { padding: 28px 8px; max-width: 520px; margin: 0 auto; }
.chgrid { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; }
.chtile {
  position: relative; display: flex; flex-direction: column; overflow: hidden; padding: 16px; min-height: 180px;
  flex: var(--w) 1 30%; min-width: 140px;
  border-radius: 24px; color: #fff; text-decoration: none; box-shadow: var(--shadow); transition: transform .18s;
  background: linear-gradient(160deg, color-mix(in srgb, var(--c) 92%, black) 0%, color-mix(in srgb, var(--c) 68%, #1b1530) 100%);
  text-shadow: 0 1px 2px rgba(0, 0, 0, .18);
}
.chtile:hover { transform: translateY(-2px) rotate(-.3deg); }
.chtile-art { position: absolute; right: -28px; top: -28px; width: 110px; height: 110px; display: grid; place-items: center; opacity: .55; }
.chtile-art .ic { position: relative; width: 34px; height: 34px; translate: -12px 12px; }
.chtile-n { font-size: 30px; font-weight: 900; line-height: 1; opacity: .6; }
.chtile h2 { margin: 6px 0 4px; font-size: 17px; line-height: 1.35; font-weight: 800; position: relative; }
.chtile p { margin: 0; font-size: 13px; line-height: 1.55; position: relative; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.chtile-foot { margin-top: auto; padding-top: 10px; display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; position: relative; flex-wrap: wrap; }
.ring { display: inline-grid; place-items: center; min-width: 40px; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 11px;
  background: linear-gradient(90deg, rgba(255,255,255,.45) calc(var(--p) * 1%), rgba(255,255,255,.18) 0); }
.mini-done { display: inline-flex; align-items: center; gap: 2px; font-size: 11px; background: rgba(255,255,255,.25); padding: 0 8px; border-radius: 999px; }

.banner {
  position: relative; overflow: hidden; padding: 16px 18px 22px; margin-bottom: 16px; border-radius: 28px;
  background: var(--c); color: #fff; box-shadow: var(--shadow);
}
.banner .back { position: relative; display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 600; text-decoration: none; opacity: .92; }
.banner-art { position: absolute; right: -36px; top: -30px; width: 180px; height: 180px; display: grid; place-items: center; }
.banner-art .b2 { transform: scale(.7) translate(-40%, 50%); }
.banner-art .ic { position: relative; width: 56px; height: 56px; translate: -16px 14px; }
.banner .kicker { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 18px; font-size: 13px; font-weight: 700; opacity: .95; }
.banner .kicker .cid { color: #fff; font-size: 18px; }
.banner h1 { position: relative; margin: 6px 0 0; font-size: 24px; line-height: 1.35; font-weight: 900; max-width: 32em; }
.banner .core { position: relative; margin: 10px 0 0; font-size: 15px; opacity: .95; max-width: 40em; }
.banner .meta { position: relative; margin: 8px 0 0; font-size: 13px; opacity: .9; display: flex; flex-wrap: wrap; gap: 4px 14px; }

.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 22px 0 8px; }
.pager a { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-radius: 16px; background: #fff; text-decoration: none; box-shadow: var(--shadow); font-size: 13px; line-height: 1.45; border-left: 4px solid var(--c); }
.pager a.r { justify-content: flex-end; text-align: right; border-left: 0; border-right: 4px solid var(--c); }
.pager a span { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.pager small { display: block; color: var(--c-ink); font-weight: 800; }

/* ---------- 案例详情 ---------- */
.case { max-width: 760px; margin: 0 auto; }
.big-essence {
  position: relative; margin: 0 0 14px; padding: 22px 22px 22px 26px; border-radius: 24px; background: var(--c-soft);
  font-size: 22px; line-height: 1.55; font-weight: 900; color: var(--c-ink); letter-spacing: .3px;
}
.big-essence .q { position: absolute; left: 10px; top: -6px; font-size: 64px; line-height: 1; opacity: .3; font-family: Georgia, serif; }
.partner-line { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 14px; color: var(--ink-2); flex-wrap: wrap; }
.partner-line b { color: var(--pt); }
.actions { display: flex; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; }
.act {
  flex: 1 1 0; min-width: 0; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 8px;
  border: 0; border-radius: 14px; background: #fff; box-shadow: var(--shadow); font-weight: 700; font-size: 14px; cursor: pointer; color: var(--ink-2);
  transition: background .15s, color .15s, transform .1s;
}
.act:active { transform: scale(.97); }
.act span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.act[data-mark=fav].on { background: #FFF4D6; color: #B45309; }
.act[data-mark=talk].on { background: #FFE3EC; color: var(--me); }
.act-done.on { background: #DCFCE7; color: var(--done); }

.dims { display: grid; gap: 10px; }
.dim { background: #fff; border-radius: 18px; box-shadow: var(--shadow); overflow: hidden; }
.dim summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 14px 16px; cursor: pointer; }
.dim summary::-webkit-details-marker { display: none; }
.dim summary::after { content: ""; margin-left: auto; width: 8px; height: 8px; border-right: 2px solid var(--ink-3); border-bottom: 2px solid var(--ink-3); transform: rotate(45deg); transition: transform .2s; }
.dim:not([open]) summary::after { transform: rotate(-45deg); }
.dim-n { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--c); color: #fff; font-weight: 900; font-size: 13px; }
.dim h2 { margin: 0; font-size: 16px; font-weight: 800; }
.dim-body { padding: 0 18px 14px 52px; color: #3A3350; }
.dim-body p { margin: 0 0 8px; }

.media { margin: 18px 0; }
.media-row { display: flex; flex-wrap: wrap; gap: 8px; }
.subpanel { margin-top: 12px; padding: 14px; background: #fff; border-radius: 18px; box-shadow: var(--shadow); }
.subtabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.subtitle-title { margin: 0 0 8px; font-weight: 700; font-size: 14px; color: var(--ink-2); }
.subs { list-style: none; margin: 0; padding: 0; max-height: 60vh; overflow-y: auto; }
.subs li { display: grid; grid-template-columns: auto 1fr; gap: 2px 8px; padding: 8px 0; border-top: 1px solid #F4EEE6; }
.subs .spk { font-size: 12px; font-weight: 800; color: var(--s); }
.subs time { font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.subs p { grid-column: 1 / -1; margin: 0; font-size: 14.5px; white-space: pre-wrap; }

.cta-box { text-align: center; padding: 18px; background: var(--c-soft); border-radius: 16px; }
.cta-box p { margin: 0 0 10px; color: var(--ink-2); font-size: 14px; }

/* ---------- 留言 ---------- */
.comments { margin-top: 24px; }
.comments h2 { display: flex; align-items: center; gap: 8px; font-size: 18px; margin: 0 0 10px; }
.note { display: flex; gap: 6px; align-items: flex-start; font-size: 13px; color: var(--ink-2); background: #FFF8E6; padding: 10px 12px; border-radius: 12px; margin: 0 0 10px; }
.note .ic { margin-top: 3px; }
.cmts, .cmts ul { list-style: none; margin: 0; padding: 0; }
.cmt { display: flex; gap: 10px; margin: 10px 0; }
.cmt.mine { flex-direction: row-reverse; }
.cmt .bubble { max-width: 82%; background: #fff; border-radius: 18px 18px 18px 6px; padding: 8px 14px 6px; box-shadow: var(--shadow); }
.cmt.mine .bubble { background: #FFE9F0; border-radius: 18px 18px 6px 18px; }
.cmt.theirs .bubble { background: #EAF0FF; }
.cmt .bubble p { margin: 0; white-space: pre-wrap; word-break: break-word; }
.cmt-meta { display: flex; gap: 8px; align-items: baseline; font-size: 12px; color: var(--ink-3); }
.cmt-meta b { color: var(--ink-2); }
.cmt-act { display: flex; gap: 12px; margin-top: 2px; font-size: 12px; }
.cmt-act .linkbtn { text-decoration: none; color: var(--ink-3); }
.kids { padding-left: 34px; }
.cmt.reply .bubble { max-width: 90%; }
.cmt.deleted { justify-content: center; }
.empty-cmt { padding: 16px; text-align: center; font-size: 14px; }
.reply-slot:not(:empty) { margin-top: 8px; }
.composer { display: flex; gap: 8px; align-items: flex-end; margin-top: 12px; }
.composer textarea { flex: 1; min-width: 0; resize: vertical; border: 0; border-radius: 16px; padding: 10px 14px; background: #fff; box-shadow: inset 0 0 0 1.5px var(--line); font-size: 16px; line-height: 1.5; }
.composer textarea:focus { outline: none; box-shadow: inset 0 0 0 2px var(--c); }
.composer.reply textarea { background: rgba(255,255,255,.8); }

/* ---------- 头像 ---------- */
.avatar { flex: none; display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--a); color: #fff; font-weight: 800; font-size: 15px; box-shadow: 0 0 0 3px #fff; }
.avatar.sm { width: 26px; height: 26px; font-size: 12px; box-shadow: 0 0 0 2px #fff; }
.avatar.lg { width: 64px; height: 64px; font-size: 26px; }
.avatar.ghost { background: #fff; color: var(--ink-3); box-shadow: inset 0 0 0 2px dashed var(--line), 0 0 0 3px #fff; border: 2px dashed var(--ink-3); }

/* ---------- 我们 ---------- */
.duo-art { position: relative; width: 200px; height: 130px; margin: 0 auto 10px; display: flex; align-items: center; justify-content: center; }
.duo-art .blob { width: 130px; height: 130px; left: 10px; top: 0; }
.duo-art .blob.b2 { left: 60px; }
.duo-art .avatar { position: relative; margin: 0 -6px; }
.pair-cards { display: grid; gap: 12px; max-width: 760px; margin: 0 auto; }
.panel { background: #fff; border-radius: 22px; padding: 18px; box-shadow: var(--shadow); margin-bottom: 14px; }
.panel h2 { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 17px; font-weight: 800; }
.panel h3.sub { font-size: 13px; color: var(--ink-3); margin: 12px 0 6px; font-weight: 700; }
.code { font-size: 36px; font-weight: 900; letter-spacing: 8px; text-align: center; margin: 8px 0 14px; padding: 12px; background: #FFF1F5; border-radius: 16px; color: var(--me); font-variant-numeric: tabular-nums; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row input, .form input { flex: 1; min-width: 0; border: 0; border-radius: 14px; padding: 11px 14px; background: #FBF7F2; box-shadow: inset 0 0 0 1.5px var(--line); font-size: 16px; }
.row input:focus, .form input:focus { outline: none; box-shadow: inset 0 0 0 2px var(--ink); }
#joinForm input { text-transform: uppercase; letter-spacing: 4px; font-weight: 700; }

.duo-head { text-align: center; padding: 18px 8px 8px; }
.duo { display: flex; justify-content: center; }
.duo .avatar + .avatar { margin-left: -14px; }
.duo-head h1 { margin: 10px 0 12px; font-size: 22px; font-weight: 900; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; max-width: 520px; margin: 0 auto 12px; }
.stats div { background: #fff; border-radius: 16px; padding: 10px 4px; box-shadow: var(--shadow); }
.stats b { display: block; font-size: 24px; line-height: 1.2; font-weight: 900; }
.stats span { font-size: 12px; color: var(--ink-3); }
.done-c { color: var(--done); }
.bar { position: relative; height: 10px; max-width: 520px; margin: 0 auto 6px; border-radius: 5px; background: #EEE6DC; overflow: hidden; }
.bar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 5px; }
.b-both { background: color-mix(in srgb, var(--pt) 45%, var(--me) 35%); opacity: .45; }
.b-done { background: var(--done); }

.minis { display: grid; gap: 8px; }
.mini { display: flex; gap: 10px; align-items: baseline; padding: 10px 12px; border-radius: 14px; background: var(--c-soft); text-decoration: none; font-size: 14px; line-height: 1.5; }
.mini b { color: var(--c-ink); flex: none; }

.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--ink-2); margin-bottom: 12px; }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend .cell { --c: #8A84A0; width: 16px; height: 16px; }
.pmap { display: grid; gap: 10px; }
.prow { display: grid; gap: 4px; }
.plabel { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--c-ink); text-decoration: none; }
.cells { display: flex; flex-wrap: wrap; gap: 5px; }
.cell { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--c) 45%, white); background: #fff; color: #fff; text-decoration: none; }
.cell .ic { width: 15px; height: 15px; }
.cell.me { background: linear-gradient(135deg, var(--me) 0 50%, #fff 50%); box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--c) 45%, white); }
.cell.pt { background: linear-gradient(135deg, #fff 0 50%, var(--pt) 50%); }
.cell.both { background: color-mix(in srgb, var(--c) 55%, white); box-shadow: none; }
.cell.done { background: var(--c); box-shadow: none; }
.cell.talk:not(.done) { color: var(--me); }
.cell.talk.both, .cell.talk.me, .cell.talk.pt { color: #fff; }

.feed { list-style: none; margin: 0; padding: 0; }
.feed li a { display: flex; gap: 10px; padding: 10px 4px; border-top: 1px solid #F4EEE6; text-decoration: none; }
.feed li:first-child a { border-top: 0; }
.feed li.fresh a { background: #F2F6FF; border-radius: 12px; padding-left: 8px; }
.fbody { min-width: 0; flex: 1; }
.fmeta { display: flex; gap: 6px; align-items: baseline; font-size: 12px; color: var(--ink-3); flex-wrap: wrap; }
.fmeta b { color: var(--ink-2); }
.fmeta i { font-style: normal; font-weight: 800; color: var(--c-ink); }
.fmeta em { font-style: normal; background: var(--pt); color: #fff; border-radius: 6px; padding: 0 5px; font-size: 11px; }
.fmeta time { margin-left: auto; }
.ftext { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 14px; }

/* ---------- 账号 ---------- */
.auth { max-width: 420px; margin: 20px auto; }
.seg { display: grid; grid-template-columns: 1fr 1fr; background: #fff; border-radius: 999px; padding: 4px; box-shadow: var(--shadow); margin-bottom: 14px; }
.seg a { text-align: center; padding: 8px; border-radius: 999px; text-decoration: none; font-weight: 700; color: var(--ink-2); }
.seg a.on { background: var(--ink); color: #fff; }
.form { display: grid; gap: 12px; }
.form label { display: grid; gap: 4px; font-size: 14px; font-weight: 700; color: var(--ink-2); }
.form label small { font-weight: 400; color: var(--ink-3); }
.form p { margin: 0; }
.settings { max-width: 560px; margin: 14px auto; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(86px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); z-index: 50;
  background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 999px; font-size: 14px; font-weight: 600;
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; max-width: 90vw; text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 桌面 ---------- */
@media (min-width: 720px) {
  body { padding-bottom: 0; }
  .bottombar { display: none; }
  .tabs { display: flex; }
  .topbar { padding: 12px 28px; }
  main { padding: 24px 28px; }
  .toast { bottom: 32px; }
  .hero { grid-template-columns: 1.1fr 1fr; align-items: center; padding: 36px 40px; }
  .hero h1 { font-size: 36px; }
  .hero-art { margin-top: 0; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 18px; }
  .chgrid { gap: 16px; }
  .chtile { flex-basis: 20%; min-width: 200px; min-height: 210px; }
  .banner { padding: 22px 32px 30px; }
  .banner h1 { font-size: 30px; }
  .banner-art { width: 260px; height: 260px; right: -40px; top: -50px; }
  .banner-art .ic { width: 80px; height: 80px; }
  .big-essence { font-size: 26px; padding: 28px 32px; }
  .pair-cards { grid-template-columns: 1fr 1fr; }
  .prow { grid-template-columns: 280px 1fr; align-items: center; }
  .cell { width: 28px; height: 28px; }
}
@media (min-width: 1040px) {
  .grid { grid-template-columns: repeat(3, 1fr); }
}
