/* potebo locked palette + components — v1 framework */
:root {
  --paper: #ebe4d6;
  --ink: #26201a;
  --ink-2: #5c5347;
  --ink-3: #877b6b;
  --accent: #e85d2a;
  --sun: #f0c94d;
  --rose: #f0b0c4;
  --sky: #9ec9e8;
  --mint: #a8d49a;
  --card: #f4efe4;
  --p: #f0c94d;
  --t: #9ec9e8;
  --border: 2px solid var(--ink);
  --shadow: 4px 4px 0 var(--ink);
  --shadow-sm: 3px 3px 0 var(--ink);
  --radius: 14px;
  --font: system-ui, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 3px;
  text-decoration-thickness: 2px;
}
a:hover { color: var(--accent); }
.page { max-width: 760px; margin: 0 auto; padding: 0 20px 80px; }

/* top bar / nav */
.top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 22px 0 18px; flex-wrap: wrap;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: inherit;
}
.brand-mark {
  width: 36px; height: 36px; border: var(--border); border-radius: 10px;
  background: var(--accent); color: #fff8f0; box-shadow: var(--shadow-sm);
  display: grid; place-items: center; font-weight: 800; font-size: 14px;
  transform: rotate(-3deg);
}
.brand h1 {
  margin: 0; font-size: 22px; font-weight: 800; letter-spacing: -0.02em; line-height: 1;
}
.brand small {
  display: block; margin-top: 3px; font-family: var(--mono);
  color: var(--ink-3); font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase;
}
.nav {
  display: flex; gap: 6px; flex-wrap: wrap;
}
.nav a {
  text-decoration: none;
  border: var(--border); background: var(--card); border-radius: 999px;
  box-shadow: 2px 2px 0 var(--ink); padding: 6px 12px;
  font-size: 13px; font-weight: 700;
}
.nav a:hover { background: var(--sun); color: var(--ink); transform: translate(-1px,-1px); box-shadow: 3px 3px 0 var(--ink); }
.nav a:active { transform: translate(2px,2px); box-shadow: none; }
.nav a.is-active { background: var(--sun); }

/* duel / who cards */
.duel {
  display: grid; grid-template-columns: 1fr auto 1fr;
  gap: 10px; align-items: stretch; margin: 8px 0 22px;
}
.who {
  border: var(--border); border-radius: var(--radius); background: var(--card);
  box-shadow: var(--shadow-sm); padding: 14px 14px 12px;
}
.who--p { transform: rotate(-0.6deg); }
.who--t { transform: rotate(0.6deg); text-align: right; }
.who-top { display: flex; align-items: center; gap: 10px; }
.who--t .who-top { flex-direction: row-reverse; }
.avatar {
  width: 42px; height: 42px; border-radius: 50%; border: var(--border);
  box-shadow: 2px 2px 0 var(--ink); display: grid; place-items: center;
  font-weight: 800; font-size: 13px; flex: none; object-fit: cover;
  background: var(--card);
}
.who--p .avatar { background: var(--p); }
.who--t .avatar { background: var(--t); }
.who h2 { margin: 0; font-size: 16px; font-weight: 800; line-height: 1.1; }
.who .handle {
  font-family: var(--mono); color: var(--ink-3); font-size: 11px; margin-top: 2px;
}
.vs {
  align-self: center;
  width: 42px; height: 42px; border-radius: 50%;
  border: var(--border); background: var(--accent); color: #fff8f0;
  box-shadow: var(--shadow-sm); display: grid; place-items: center;
  font-weight: 800; font-size: 12px; letter-spacing: 0.04em;
  transform: rotate(-8deg);
}
.lede {
  grid-column: 1 / -1;
  color: var(--ink-2); font-size: 15px; margin: 4px 0 0; max-width: none;
}

/* highlight ticket */
.ticket {
  border: var(--border); border-radius: var(--radius); background: var(--card);
  box-shadow: var(--shadow); overflow: hidden; margin: 0 0 40px;
}
.ticket-bar {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  background: var(--sun); border-bottom: var(--border); padding: 8px 14px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
  font-weight: 700;
}
.ticket-body { padding: 18px 18px 16px; }
.ticket-body h3 {
  margin: 0 0 8px; font-size: clamp(20px, 4vw, 26px); font-weight: 800;
  letter-spacing: -0.015em; line-height: 1.2;
}
.ticket-body p { margin: 0; color: var(--ink-2); font-size: 14px; }
.ticket-foot {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  flex-wrap: wrap; margin-top: 14px;
}
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  border: var(--border); background: var(--accent); color: #fff8f0;
  border-radius: 10px; box-shadow: 2px 2px 0 var(--ink);
  padding: 7px 12px; font-size: 13px; font-weight: 800; text-decoration: none;
}
.btn:hover { color: #fff8f0; background: #d14e20; }
.btn--ghost {
  background: var(--card); color: var(--ink);
}
.btn--ghost:hover { background: var(--sun); color: var(--ink); }
.muted { font-family: var(--mono); color: var(--ink-3); font-size: 11px; }

/* section head */
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 10px; margin-bottom: 18px; flex-wrap: wrap;
}
.section-head h2 { margin: 0; font-size: 22px; font-weight: 800; }
.section-head .muted { margin: 0; }
.page-title {
  margin: 8px 0 6px; font-size: clamp(26px, 5vw, 34px); font-weight: 800;
  letter-spacing: -0.02em; line-height: 1.15;
}
.page-sub { margin: 0 0 28px; color: var(--ink-2); font-size: 15px; }

/* timeline spine */
.spine { list-style: none; margin: 0; padding: 0; position: relative; }
.spine:before {
  content: ""; position: absolute; left: 18px; top: 8px; bottom: 8px;
  width: 2px; background: var(--ink); opacity: 0.25;
}
.entry {
  position: relative; padding-left: 52px; margin-bottom: 22px;
}
.dot {
  position: absolute; left: 8px; top: 18px;
  width: 22px; height: 22px; border-radius: 50%;
  border: var(--border); box-shadow: 2px 2px 0 var(--ink);
  background: var(--card); z-index: 1;
}
.entry--p .dot { background: var(--p); }
.entry--t .dot { background: var(--t); }
.entry--both .dot {
  background: linear-gradient(135deg, var(--p) 50%, var(--t) 50%);
}
.card {
  border: var(--border); border-radius: 16px; background: var(--card);
  box-shadow: var(--shadow-sm); padding: 14px 16px 12px;
}
.meta {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px;
}
.pill {
  border: 1.5px solid var(--ink); border-radius: 999px;
  padding: 1px 9px 2px; font-size: 12px; font-weight: 700;
  background: var(--sun);
}
.pill.type { background: var(--rose); font-size: 11px; }
.pill.type-quote { background: var(--sky); }
.pill.type-reply { background: var(--mint); }
.pill.type-mention { background: var(--rose); }
.when { font-family: var(--mono); color: var(--ink-3); font-size: 11px; }
.card p { margin: 0; font-size: 15px; }
.card .src {
  display: inline-block; margin-top: 10px;
  font-family: var(--mono); font-size: 12px;
}

/* fanart grid — cards with media + creator */
.fan-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 8px;
}
.fan-card {
  border: var(--border); border-radius: 14px; background: var(--card);
  box-shadow: var(--shadow-sm); overflow: hidden;
  display: flex; flex-direction: column; min-width: 0;
}
.fan-card:hover { transform: translate(-1px,-1px); box-shadow: 4px 4px 0 var(--ink); }
.fan-media {
  position: relative; aspect-ratio: 1; background: var(--paper);
  border-bottom: var(--border); overflow: hidden;
}
.fan-media--img img,
.fan-media--video video {
  display: block; width: 100%; height: 100%; object-fit: cover; background: #ddd6c8;
}
.fan-media--video video { object-fit: contain; background: #1a1a1a; }
.fan-media--ph {
  display: flex; align-items: center; justify-content: center;
}
.fan--ph1 { background: #f0d98a; }
.fan--ph2 { background: #efc0cf; }
.fan--ph3 { background: #b7d4ea; }
.fan-badge {
  position: absolute; top: 10px; left: 10px; z-index: 1;
  border: 1.5px solid var(--ink); border-radius: 999px;
  padding: 2px 10px; font-size: 11px; font-weight: 800;
  background: var(--sun); font-family: var(--mono);
}
.fan-media--ph .fan-badge { position: static; }
.fan-body { padding: 12px 12px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.fan-title { margin: 0; font-size: 14px; font-weight: 800; line-height: 1.3; }
.fan-note { margin: 0; font-size: 12px; color: var(--ink-2); line-height: 1.4; }
.fan-creator {
  margin-top: auto; font-family: var(--mono); font-size: 12px; color: var(--ink);
  line-height: 1.4;
}
.fan-creator strong { font-weight: 800; }
.fan-creator-name { color: var(--ink-2); font-weight: 500; }
.fan-sharer {
  font-family: var(--mono); font-size: 11px; color: var(--ink-3);
}
.fan-source {
  display: inline-block; margin-top: 4px;
  font-family: var(--mono); font-size: 12px;
}
.fan-source.muted, .src.muted { color: var(--ink-3); cursor: default; text-decoration: none; }

.note {
  margin-top: 14px; border: var(--border); border-style: dashed;
  border-radius: var(--radius); padding: 12px 14px;
  color: var(--ink-2); font-size: 13px;
}
.note p { margin: 0 0 8px; }
.note p:last-child { margin-bottom: 0; }

.entry-card {
  border: var(--border); border-radius: var(--radius); background: var(--card);
  box-shadow: var(--shadow-sm); padding: 18px 18px 16px; margin-bottom: 14px;
}
.entry-card h3 { margin: 0 0 8px; font-size: 17px; font-weight: 800; }
.entry-card p { margin: 0; color: var(--ink-2); font-size: 14px; }
.entry-card ul { margin: 8px 0 0; padding-left: 1.2em; color: var(--ink-2); font-size: 14px; }
.entry-card li { margin-bottom: 4px; }
.entry-card .contact-pending {
  margin-top: 12px; padding: 10px 12px;
  border: var(--border); border-style: dashed; border-radius: 10px;
  background: rgba(240,217,138,0.35); color: var(--ink); font-size: 13px; font-weight: 650;
}

.submit-placeholder {
  margin-top: 14px; padding: 14px;
  border: var(--border); border-style: dashed; border-radius: 12px;
  background: rgba(183,212,234,0.28);
}
.submit-label { margin: 0 0 6px; font-weight: 800; font-size: 13px; }
.submit-hint { margin: 0 0 12px; font-size: 12px; color: var(--ink-2); line-height: 1.45; }
.submit-fake {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  opacity: 0.72; pointer-events: none; user-select: none;
}
.submit-fake-field {
  flex: 1; min-width: 160px; border: var(--border); border-radius: 10px;
  background: var(--card); padding: 10px 12px; font-family: var(--mono);
  font-size: 12px; color: var(--ink-3);
}
.submit-fake-btn {
  border: var(--border); border-radius: 999px; padding: 8px 14px;
  background: #ddd6c8; font-size: 12px; font-weight: 800; color: var(--ink-2);
}

.entry-card code, .note code {
  font-family: var(--mono); font-size: 0.92em;
  background: rgba(0,0,0,0.05); padding: 1px 5px; border-radius: 4px;
}

.gate {
  display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 36px;
}

footer {
  border-top: var(--border); margin-top: 48px; padding-top: 16px;
  color: var(--ink-2); font-size: 13px;
}
footer p { margin: 0 0 6px; }

.empty {
  border: var(--border); border-style: dashed; border-radius: var(--radius);
  padding: 28px 18px; text-align: center; color: var(--ink-2); font-size: 14px;
}

@media (max-width: 560px) {
  .duel { grid-template-columns: 1fr; }
  .vs { justify-self: center; transform: rotate(0); margin: -2px 0; }
  .who--t { text-align: left; }
  .who--t .who-top { flex-direction: row; }
  .fan-grid { grid-template-columns: 1fr 1fr; }
  .spine:before { left: 14px; }
  .entry { padding-left: 44px; }
  .dot { left: 4px; width: 20px; height: 20px; }
}

/* 制作版：统一节奏、可访问导航与移动布局 */
.brand-name { display: block; font-size: 22px; font-weight: 800; letter-spacing: -.02em; line-height: 1; }
main { display: block; }
.top { margin-bottom: 14px; }
.home-section + .home-section { margin-top: 44px; }
.section-link { font-size: 12px; font-weight: 650; white-space: nowrap; }
.ticket { margin-bottom: 40px; }
.ticket-body { padding: 20px 18px 18px; }
.card { min-height: 112px; }
.entry:last-child { margin-bottom: 0; }
.spine:before { bottom: 12px; }
.page-title { margin-top: 10px; }
.page-sub { max-width: 62ch; }
article.fan-card:hover { transform: none; box-shadow: var(--shadow-sm); }
a:focus-visible { outline: 3px solid var(--accent); outline-offset: 5px; }
.skip-link { position: fixed; top: -80px; left: 16px; z-index: 10; padding: 8px 14px; background: var(--card); border: var(--border); }
.skip-link:focus { top: 12px; }
@media (max-width: 560px) {
  .page { padding: 0 18px 40px; }
  .top { gap: 18px; padding-top: 20px; margin-bottom: 14px; }
  .nav { width: 100%; justify-content: space-between; gap: 7px; }
  .nav a { flex: 1; text-align: center; padding: 8px 9px; }
  .duel { grid-template-columns: minmax(0,1fr) 32px minmax(0,1fr); gap: 6px; margin-bottom: 24px; }
  .who { padding: 12px 9px; }
  .who-top, .who--t .who-top { flex-direction: column; align-items: flex-start; gap: 9px; }
  .who--t .who-top { align-items: flex-end; }
  .who--t { text-align: right; }
  .who h2 { font-size: 15px; }
  .who .handle { font-size: 10px; }
  .vs { width: 32px; height: 32px; font-size: 10px; }
  .lede { margin-top: 12px; font-size: 14px; }
  .ticket-body { padding: 18px 15px; }
  .ticket-bar { font-size: 10px; padding: 8px 12px; }
  .section-head h2 { font-size: 21px; }
  .entry { padding-left: 34px; }
  .dot { left: 0; width: 20px; height: 20px; }
  .spine:before { left: 9px; }
  .card { padding: 13px 12px; }
  .meta { gap: 6px; }
  .when { flex-basis: 100%; }
  .fan-grid { gap: 12px; }
  .fan-card { min-width: 0; }
  .fan-card:last-child { grid-column: 1 / -1; }
  .fan-card:last-child .fan-media { aspect-ratio: 2 / 1; }
  footer { margin-top: 36px; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }

/* --- rich timeline + i18n --- */
.top { flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.lang-switch {
  display: inline-flex; gap: 4px; margin-left: auto;
  border: var(--border); border-radius: 999px; padding: 3px;
  background: rgba(255,255,255,0.45);
}
.lang-btn {
  appearance: none; border: 0; background: transparent; cursor: pointer;
  font: inherit; font-size: 12px; font-weight: 700; color: var(--ink-2);
  padding: 6px 10px; border-radius: 999px;
}
.lang-btn.is-active { background: var(--card); color: var(--ink); box-shadow: var(--shadow-sm); }
.card--rich { min-height: 0; }
.t-caption {
  margin: 0 0 12px; color: var(--ink-2); font-size: 13px; line-height: 1.5;
  border-left: 3px solid rgba(0,0,0,0.12); padding-left: 10px;
}
.t-author { display: flex; gap: 10px; align-items: center; margin: 0 0 10px; }
.t-avatar {
  width: 40px; height: 40px; border-radius: 50%; object-fit: cover;
  border: var(--border); background: #ddd6c8;
}
.t-author-meta { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.t-name { font-weight: 800; font-size: 14px; line-height: 1.2; }
.t-handle { font-size: 12px; color: var(--ink-3); text-decoration: none; }
.t-handle:hover { color: var(--ink); text-decoration: underline; }
.t-body { margin: 0 0 10px; }
.t-text {
  margin: 0; white-space: pre-wrap; word-break: break-word;
  font-size: 15px; line-height: 1.55; color: var(--ink);
}
.t-text-zh {
  margin: 8px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--ink-2);
  white-space: pre-wrap; word-break: break-word;
}
.t-zh-tag {
  display: inline-block; font-size: 10px; font-weight: 800; letter-spacing: .04em;
  text-transform: uppercase; color: var(--ink-3);
  border: var(--border); border-radius: 999px; padding: 1px 7px; margin-right: 6px;
}
.t-expand {
  appearance: none; border: 0; background: none; cursor: pointer;
  color: var(--ink-2); font: inherit; font-size: 12px; font-weight: 700;
  padding: 4px 0; text-decoration: underline;
}
.t-link, .t-mention { color: #3a5a7a; word-break: break-all; }
.t-media-grid {
  display: grid; gap: 6px; margin: 0 0 10px;
  border-radius: 12px; overflow: hidden;
}
.t-media-grid--2 { grid-template-columns: 1fr 1fr; }
.t-media-grid--3, .t-media-grid--4 { grid-template-columns: 1fr 1fr; }
.t-media { margin: 0; background: rgba(0,0,0,0.04); }
.t-media img, .t-media video {
  display: block; width: 100%; max-height: 420px; object-fit: contain; background: #e7dfd0;
}
.t-media-open {
  appearance: none; border: 0; padding: 0; margin: 0; background: none;
  cursor: zoom-in; display: block; width: 100%;
}
.t-metrics {
  display: flex; flex-wrap: wrap; gap: 10px 14px;
  font-family: var(--mono); font-size: 11px; color: var(--ink-3);
  margin: 0 0 10px;
}
.lightbox {
  position: fixed; inset: 0; z-index: 40;
  background: rgba(30, 26, 20, 0.82);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.lightbox[hidden] { display: none !important; }
.lightbox img {
  max-width: min(960px, 100%); max-height: 90vh;
  border-radius: 10px; box-shadow: 0 12px 40px rgba(0,0,0,0.35);
}
.lightbox-close {
  position: absolute; top: 16px; right: 18px;
  appearance: none; border: 0; background: rgba(255,255,255,0.9);
  width: 36px; height: 36px; border-radius: 50%;
  font-size: 22px; line-height: 1; cursor: pointer;
}
@media (max-width: 560px) {
  .lang-switch { margin-left: 0; width: 100%; justify-content: center; }
  .t-media img, .t-media video { max-height: 280px; }
}
