:root {
  --ink: #3a2c1f;
  --ink-soft: #6b5744;
  --paper: #fbf6ec;
  --paper-2: #f3ead7;
  --blush: #e7a09a;
  --leaf: #7d9b78;
  --gold: #c9a56a;
  --line: rgba(58, 44, 31, 0.12);
  --shadow: 0 18px 40px rgba(80, 50, 20, 0.08);
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: "Noto Serif SC", "Songti SC", serif;
  color: var(--ink);
  background: #f4ead8;
}
.bg-wash {
  position: fixed; inset: 0; z-index: -1;
  background:
    radial-gradient(900px 400px at 10% -10%, rgba(231,160,154,.28), transparent 60%),
    radial-gradient(700px 360px at 100% 0%, rgba(125,155,120,.18), transparent 55%),
    linear-gradient(180deg, #f7efe0, #efe3cc);
}
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 8vw 8px; gap: 24px;
}
.top-right { display: flex; align-items: center; gap: 16px; margin-left: auto; }
.gear {
  text-decoration: none; color: var(--ink);
  border: 1px solid var(--line); background: rgba(255,255,255,.72);
  padding: 8px 16px; border-radius: 999px;
}
.gear.on, .gear:hover { background: #fff; color: #9a4d47; }
.brand { display: flex; gap: 14px; align-items: center; text-decoration: none; color: inherit; }
.seal {
  width: 52px; height: 52px; border-radius: 12px;
  display: grid; place-items: center;
  font-family: "Ma Shan Zheng", cursive; font-size: 30px;
  color: #fff; background: #b85c54;
  box-shadow: 4px 4px 0 rgba(58,44,31,.12);
}
.brand strong { display: block; font-family: "ZCOOL XiaoWei", serif; font-size: 28px; }
.brand em { font-style: normal; color: var(--ink-soft); font-size: 13px; }
nav { display: flex; gap: 8px; flex-wrap: wrap; }
nav a {
  text-decoration: none; color: var(--ink-soft);
  padding: 8px 14px; border-radius: 999px;
}
nav a.on, nav a:hover { background: rgba(255,255,255,.7); color: var(--ink); }
.wrap { width: min(1120px, 90vw); margin: 18px auto 80px; }
.foot { text-align: center; color: var(--ink-soft); padding: 12px 0 40px; font-size: 13px; }
.paper {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
  padding: 28px;
}
.hero { padding: 48px 42px; }
.eyebrow { letter-spacing: .4em; color: var(--blush); margin: 0 0 8px; }
.source-url {
  margin: 0 0 16px; font-size: 13px; color: var(--ink-soft);
  display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline;
}
.source-url a { color: #9a4d47; word-break: break-all; }
h1 { font-family: "ZCOOL XiaoWei", serif; font-size: 42px; font-weight: 400; margin: 0 0 12px; }
.lead { color: var(--ink-soft); font-size: 18px; }
.hero-stats { display: flex; gap: 28px; margin-top: 28px; }
.hero-stats b { display: block; font-size: 32px; }
.hero-stats span { color: var(--ink-soft); }
.doors { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 22px; }
.doors.two { grid-template-columns: 1fr 1fr; }
.door {
  background: var(--paper); border-radius: 24px; padding: 24px 20px 20px;
  text-decoration: none; color: inherit; border: 1px solid var(--line);
  box-shadow: var(--shadow); min-height: 180px;
}
.door i { font-style: normal; color: var(--gold); }
.door h2 { font-family: "ZCOOL XiaoWei", serif; margin: 8px 0; font-weight: 400; }
.door p { color: var(--ink-soft); margin: 0; }
.page-head h1 { font-size: 36px; }
.page-head p { color: var(--ink-soft); margin-top: 0; }
.grid-2 { display: grid; grid-template-columns: 1.1fr .9fr; gap: 18px; }
.form label { display: block; margin: 10px 0 6px; color: var(--ink-soft); }
.form input:not([type="checkbox"]):not([type="radio"]),
.form select, .form textarea {
  width: 100%; border: 1px solid var(--line); background: #fffdf8;
  border-radius: 14px; padding: 12px 14px; font: inherit; color: inherit;
}
.form textarea { resize: vertical; line-height: 1.7; }
.form textarea.huge { min-height: 62vh; font-size: 16px; }
.row { display: flex; gap: 12px; }
.row > * { flex: 1; }
.row.wrap { flex-wrap: wrap; }
.row.wrap > * { flex: 1 1 160px; }
.btn {
  margin-top: 16px; border: 0; cursor: pointer;
  background: #b85c54; color: #fff; font: inherit;
  padding: 12px 20px; border-radius: 999px;
}
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); margin-top: 0; }
.btn.mini { margin-top: 0; padding: 6px 14px; font-size: 13px; }
.hint { color: var(--ink-soft); min-height: 1.4em; }
.empty { color: var(--ink-soft); text-align: center; }
.list-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; flex-wrap: wrap; gap: 8px; }
.list-head select {
  width: auto; min-width: 72px; margin: 0 0 0 6px; padding: 4px 8px;
  border-radius: 999px; border: 1px solid var(--line); font: inherit;
}
.task-list { display: grid; gap: 12px; }
.task { padding: 14px 16px; border-radius: 18px; background: #fffdf8; border: 1px solid var(--line); cursor: pointer; }
.task:hover { border-color: var(--blush); background: #fff; }
.task header { display: flex; justify-content: space-between; gap: 8px; }
.task.running { border-color: #d7b27a; }
.task.success { border-color: #b7cbb4; }
.task.failed { border-color: #e2b1ad; }
.pill { font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--paper-2); }
.bar { height: 6px; background: var(--paper-2); border-radius: 99px; overflow: hidden; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--blush), var(--gold)); }
.prompt-layout { display: grid; grid-template-columns: 240px 1fr; gap: 18px; }
.prompt-item {
  display: block; width: 100%; text-align: left; margin-bottom: 8px;
  border: 1px solid transparent; background: #fffdf8; border-radius: 16px;
  padding: 12px; cursor: pointer; font: inherit; color: inherit;
}
.prompt-item.on { border-color: var(--blush); background: #fff; }
.prompt-item span, .prompt-item em { display: block; color: var(--ink-soft); font-size: 12px; font-style: normal; }
.sent-list, .name-list { display: grid; gap: 12px; }
.sent {
  display: grid; grid-template-columns: 36px 1fr; gap: 12px;
  padding: 14px 16px; background: #fffdf8; border-radius: 18px;
  border: 1px solid var(--line); cursor: pointer; align-items: start;
}
.sent.on { background: #fff; border-color: var(--blush); box-shadow: 0 0 0 3px rgba(184,92,84,.08); }
.tick-box,
.check input[type="checkbox"],
.tag-pick input[type="checkbox"] {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  min-width: 22px;
  margin: 4px 8px 0 0;
  padding: 0;
  border: 2px solid #9a4d47;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  position: relative;
  flex: none;
}
.tick-box:checked,
.check input[type="checkbox"]:checked,
.tag-pick input[type="checkbox"]:checked {
  background: #b85c54;
  border-color: #b85c54;
}
.tick-box:checked::after,
.check input[type="checkbox"]:checked::after,
.tag-pick input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 1px;
  width: 6px;
  height: 12px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.verse { font-size: 18px; margin: 6px 0; }
.name-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.name-pill {
  display: inline-flex; align-items: center; gap: 6px;
  text-decoration: none; color: #9a4d47;
  font-family: "Ma Shan Zheng", cursive; font-size: 22px;
  line-height: 1.2; padding: 10px 12px 4px;
  background: #fff; border: 1px solid var(--line); border-radius: 999px;
}
.name-pill:hover { border-color: #b85c54; background: #fff8f6; }
.name-pill small { font-family: "Noto Serif SC", serif; font-size: 11px; color: var(--ink-soft); }
.name-none { margin: 8px 0 0; color: #b8a48c; font-size: 13px; }
.yiwen { color: var(--ink-soft); margin: 0; }
.link { background: none; border: 0; color: #9a4d47; font: inherit; cursor: pointer; padding: 0; }
.pager { display: flex; justify-content: center; align-items: center; gap: 16px; margin-top: 16px; }
.pager button { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 14px; font: inherit; cursor: pointer; }
.dock {
  position: sticky; bottom: 16px; margin-top: 16px;
  display: flex; gap: 12px; align-items: center; flex-wrap: wrap;
}
.dock .btn { margin-top: 0; }
.dock select, .dock input { width: auto; min-width: 120px; border-radius: 999px; border: 1px solid var(--line); padding: 10px 12px; font: inherit; }
.name-card { padding: 18px; background: #fffdf8; border-radius: 20px; border: 1px solid var(--line); }
.name-card.has-tick { display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: start; }
.name-card.has-tick.on { border-color: var(--blush); box-shadow: 0 0 0 3px rgba(184,92,84,.08); }
.name-card.has-tick .tick-box { margin-top: 10px; }
.name-card.verdict-like { border-color: #b7cbb4; background: #f6fbf4; }
.name-card.verdict-dislike { border-color: #d7b27a; background: #fff8ee; }
.name-card.verdict-anti { border-color: #e2b1ad; background: #fff4f2; }
.verdict-reason { margin: 8px 0 0; color: #9a4d47; font-size: 13px; }
.name-note {
  width: 100%; margin: 10px 0 0; padding: 8px 12px;
  border: 1px dashed var(--line); border-radius: 12px;
  font: inherit; font-size: 14px; background: #fff; color: var(--ink);
}
.name-note:focus { border-color: #b85c54; outline: none; background: #fffdf8; }
.verdict-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.verdict-bar .btn.on { background: #b85c54; color: #fff; border-color: #b85c54; }
.verdict-bar .btn[data-verdict="like"].on { background: #6f8f6c; border-color: #6f8f6c; }
.verdict-bar .btn[data-verdict="dislike"].on { background: #c49a5a; border-color: #c49a5a; }
.verdict-bar .btn[data-verdict="anti"].on { background: #b85c54; border-color: #b85c54; }
.name-big { font-family: "Ma Shan Zheng", cursive; font-size: 42px; color: #9a4d47; }
.name-big ruby { ruby-position: over; }
.name-ruby { ruby-position: over; ruby-align: center; }
.name-ruby rt {
  font-family: "Noto Serif SC", serif;
  font-size: 11px; font-style: normal; font-weight: 400;
  color: var(--ink-soft); letter-spacing: 0;
}
.name-big .name-ruby rt { font-size: 13px; }
.name-py { margin: 0 0 8px; color: var(--ink-soft); font-size: 14px; letter-spacing: .12em; }
.meta { display: flex; gap: 12px; color: var(--ink-soft); font-size: 13px; margin-bottom: 8px; flex-wrap: wrap; }
.mood-tag {
  color: #9a4d47; background: rgba(184,92,84,.08);
  border-radius: 999px; padding: 1px 8px;
}
.modal { position: fixed; inset: 0; background: rgba(58,44,31,.28); display: grid; place-items: center; padding: 24px; }
.modal[hidden] { display: none; }
.modal-card { width: min(720px, 92vw); max-height: 86vh; overflow: auto; position: relative; }
.close { position: absolute; right: 18px; top: 14px; border: 0; background: none; font: inherit; cursor: pointer; color: var(--ink-soft); }
.verse-block { white-space: pre-wrap; font-family: inherit; font-size: 18px; line-height: 1.9; user-select: text; }
.verse-hit { color: #9a4d47; background: rgba(184,92,84,.08); border-radius: 6px; }
.sent-actions { margin-top: 10px; }
.modal-actions {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line);
}
.modal-actions .btn, .modal-actions select { margin-top: 0; }
.modal-actions select {
  width: auto; min-width: 120px; border-radius: 999px;
  border: 1px solid var(--line); padding: 10px 12px; font: inherit;
}
.feed-box {
  width: 100%; min-height: 180px; margin-top: 8px;
  border: 1px solid var(--line); border-radius: 16px;
  padding: 12px 14px; font: inherit; line-height: 1.7;
  background: #fffdf8; resize: vertical;
}
.check { display: flex; align-items: center; }
.fold-btn {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  width: 100%; margin-top: 14px; padding: 10px 14px;
  border: 1px solid var(--line); border-radius: 14px; background: #fffdf8;
  font: inherit; cursor: pointer; color: inherit; text-align: left;
}
.fold-btn:hover { border-color: #b85c54; background: #fff; }
.fold-body { margin-top: 10px; }
.fold-body.collapsed { display: none; }
.tag-group { margin-top: 10px; }
.tag-group .eyebrow { margin: 0 0 4px; }
.tag-picks { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tag-pick {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 999px; cursor: pointer;
  background: #fffdf8; border: 1px solid var(--line); font-size: 13px;
}
.tag-boards { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; margin-top: 14px; user-select: none; }
.tag-board {
  min-height: 220px; border: 1px solid var(--line); border-radius: 18px;
  padding: 12px; background: #fffdf8;
}
.tag-board.drop { border-color: #b85c54; box-shadow: 0 0 0 3px rgba(184,92,84,.12); background: #fff; }
.tag-board header { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.tag-board header strong { font-size: 16px; }
.tag-board header span { color: var(--ink-soft); font-size: 12px; }
.tag-board .chips { display: flex; flex-wrap: wrap; gap: 6px; min-height: 160px; align-content: flex-start; }
.tag-token {
  margin: 0; padding: 3px 10px; font: inherit; font-size: 13px; line-height: 1.4;
  border-radius: 999px; border: 1px solid var(--line); background: #fff;
  color: var(--ink); cursor: pointer; white-space: nowrap;
}
.tag-token:hover { border-color: #b85c54; color: #9a4d47; }
.tag-token.on { background: #b85c54; color: #fff; border-color: #b85c54; }
.marquee {
  position: fixed; border: 1px solid #b85c54; background: rgba(184,92,84,.12);
  pointer-events: none; z-index: 80;
}
.tag-pick:has(input:checked) { background: #fff; border-color: #b85c54; color: #9a4d47; }
.tag-pick.ex:has(input:checked) { border-color: #8a7a68; color: #6b5744; background: #f3ead7; text-decoration: line-through; }
.tag-pick input[type="checkbox"] { margin: 0; width: 16px; height: 16px; min-width: 16px; }
.chip-picks { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 6px; }
.chip-picks .chip {
  margin: 0; padding: 3px 10px; font: inherit; font-size: 13px; line-height: 1.4;
  border-radius: 999px; border: 1px solid var(--line); background: #fffdf8;
  color: var(--ink); cursor: pointer; white-space: nowrap;
}
.chip-picks .chip:hover { border-color: #b85c54; color: #9a4d47; background: #fff; }
.tag-list { display: grid; gap: 8px; margin-top: 14px; }
.tag-chip {
  display: grid; grid-template-columns: 140px 1fr 80px auto auto auto;
  gap: 8px; align-items: center; background: #fffdf8;
  border: 1px solid var(--line); border-radius: 16px; padding: 8px 10px;
}
.tag-chip.off { opacity: .55; }
.tag-chip input { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; font: inherit; background: #fff; }
.tag-chip .btn { margin-top: 0; padding: 6px 12px; }
@media (max-width: 900px) {
  .doors, .grid-2, .prompt-layout, .tag-boards { grid-template-columns: 1fr; }
  h1 { font-size: 30px; }
  .topbar { flex-direction: column; align-items: flex-start; }
}
