:root {
  --bg: #efe8da;
  --paper: #fbf8f2;
  --ink: #1c1915;
  --muted: #6f675c;
  --line: rgba(28, 25, 21, 0.14);
  --cinnabar: #be3a2b;
  --pine: #1f6b62;
  --bronze: #8c6a3d;
  --gold: #f0d78c;
  --sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --serif: Palatino, "Palatino Linotype", "Times New Roman", serif;
  --mono: Consolas, "Cascadia Mono", "Sarasa Mono SC", ui-monospace, monospace;
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(ellipse at 0% -10%, rgba(190, 58, 43, 0.08), transparent 42%),
    radial-gradient(ellipse at 100% 0%, rgba(31, 107, 98, 0.08), transparent 36%),
    var(--bg);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
}

body::before {
  content: "";
  pointer-events: none;
  position: fixed;
  inset: 0;
  opacity: 0.35;
  background-image: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(28, 25, 21, 0.015) 3px);
  z-index: 0;
}

a { color: inherit; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
img, svg { max-width: 100%; }

:focus-visible {
  outline: 2px solid var(--cinnabar);
  outline-offset: 3px;
}

::selection {
  background: var(--cinnabar);
  color: #fff8f2;
}

.skip {
  position: absolute;
  left: 12px;
  top: -40px;
  background: var(--ink);
  color: var(--paper);
  padding: 8px 12px;
  z-index: 80;
}
.skip:focus { top: 12px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(239, 232, 218, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--ink);
  box-shadow: 0 3px 0 var(--bg), 0 4px 0 var(--ink);
}

.bar {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 68px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex: 0 0 auto;
}
.brand strong { display: block; font-size: 16px; line-height: 1.15; }
.brand small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  letter-spacing: 0.14em;
  font-size: 10px;
}
.mark { width: 34px; height: 34px; color: var(--cinnabar); display: block; }

.nav { display: none; align-items: center; gap: 16px; }
.nav a {
  text-decoration: none;
  font-size: 15px;
}
.nav a[aria-current="page"] {
  text-decoration: underline;
  text-underline-offset: 7px;
  text-decoration-thickness: 2px;
  text-decoration-color: var(--cinnabar);
}

.sync {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
}
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--pine);
  box-shadow: 0 0 0 4px rgba(31, 107, 98, 0.16);
  animation: pulse 1.8s ease-in-out infinite;
}
@keyframes pulse {
  50% { opacity: 0.35; }
}

.nav-toggle {
  margin-left: auto;
  border: 1px solid var(--ink);
  background: transparent;
  padding: 6px 10px;
  letter-spacing: 0.12em;
  font-size: 13px;
}

.demo-strip {
  position: relative;
  z-index: 1;
  background: var(--ink);
  color: #f4efe4;
  font-size: 13px;
}
.demo-strip p {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 8px 0;
}

main {
  position: relative;
  z-index: 1;
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding-bottom: 108px;
}

.board {
  margin-top: 22px;
  border: 1px solid var(--ink);
  background: var(--paper);
}

.hero-layout { display: grid; }
.hero-copy { position: relative; padding: 22px 16px 18px; }

.kicker {
  margin: 0 0 8px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--bronze);
}

h1, h2, h3 {
  font-family: var(--sans);
  font-weight: 700;
  line-height: 1.3;
  margin: 0;
}

h1 { font-size: clamp(1.7rem, 4vw, 2.55rem); max-width: 9em; }
.lede { margin: 10px 0 0; max-width: 38em; color: #3c3832; }

.issue-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin: 18px 0 12px;
  font-family: var(--mono);
  font-size: 13px;
}
.issue-line b { font-weight: 600; }

.seals {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
.seals-lg { gap: 6px; max-width: 460px; }
.seals-sm { gap: 6px; width: min(100%, 250px); }

.seal {
  border: 1px solid var(--ink);
  background: var(--paper);
  display: grid;
  place-items: center;
  aspect-ratio: 1;
}
.seal strong {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.05rem;
  line-height: 1;
}
.seals-lg .seal {
  aspect-ratio: 1 / 1.12;
  color: #fff8f2;
  background: var(--cinnabar);
  border-color: #8e2419;
  box-shadow: inset 0 0 0 4px var(--cinnabar), inset 0 0 0 5px #f3d2c8;
  align-content: center;
}
.seals-lg .seal strong { font-size: clamp(1.35rem, 5vw, 2.35rem); }
.seals-lg .seal span {
  margin-top: 4px;
  font-size: 11px;
  letter-spacing: 0.22em;
  opacity: 0.86;
}

.pills, .tags { display: flex; flex-wrap: wrap; gap: 6px; }
.pills { margin-top: 14px; }
.pill, .tag {
  border: 1px solid var(--line);
  padding: 2px 8px;
  font-size: 13px;
  background: rgba(255, 255, 255, 0.35);
}
.tag.is-hot { color: var(--cinnabar); border-color: rgba(190, 58, 43, 0.35); }
.tag.is-cool { color: var(--pine); border-color: rgba(31, 107, 98, 0.35); }

.compare-label {
  margin: 16px 0 6px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.14em;
}
.compare {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  max-width: 460px;
}
.compare div { text-align: center; }
.compare span { display: block; color: var(--muted); font-size: 12px; }
.compare b {
  display: block;
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 600;
}
.prev-line { margin: 12px 0 0; color: var(--muted); font-size: 14px; }

.side-card {
  border-top: 1px solid var(--ink);
  padding: 20px 16px 22px;
  text-align: center;
}
.timer {
  width: 148px;
  height: 148px;
  margin: 6px auto 8px;
  position: relative;
}
.timer svg { width: 100%; height: 100%; display: block; }
.timer .track { fill: none; stroke: rgba(28, 25, 21, 0.12); stroke-width: 3; }
.timer .prog {
  fill: none;
  stroke: var(--cinnabar);
  stroke-width: 3;
  stroke-linecap: round;
  transform: rotate(-90deg);
  transform-origin: 60px 60px;
}
.timer-read {
  position: absolute;
  inset: 0;
  display: grid;
  align-content: center;
  justify-items: center;
}
.timer-read b {
  font-family: var(--serif);
  font-size: 34px;
  font-weight: 600;
  letter-spacing: 0.03em;
  line-height: 1;
}
.timer-read span {
  margin-top: 4px;
  font-size: 12px;
  letter-spacing: 0.18em;
  color: var(--muted);
}
.live-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  text-decoration: none;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 2px;
}
.live-link i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cinnabar);
}

.stat-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--ink);
}
.stat { padding: 14px 16px; }
.stat:nth-child(odd) { border-right: 1px solid var(--line); }
.stat:nth-child(n + 3) { border-top: 1px solid var(--line); }
.stat span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.08em;
}
.stat b {
  display: block;
  margin-top: 2px;
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1.2;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin: 34px 0 12px;
}
.section-head h2 { font-size: 1.25rem; }
.section-head em {
  font-style: normal;
  font-family: var(--serif);
  color: var(--cinnabar);
  margin-right: 8px;
}
.section-head a { font-size: 14px; }

.panel {
  border: 1px solid var(--ink);
  background: var(--paper);
  padding: 8px 14px 12px;
}

.draw-head { display: none; }
.draw-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.draw-row .seals { grid-column: 1 / -1; }
.draw-row .tags { justify-content: flex-end; }
.draw-issue b { display: block; font-size: 15px; }
.draw-issue time { color: var(--muted); font-family: var(--mono); font-size: 12px; }
.draw-row.is-new .draw-issue b::after {
  content: "最新";
  margin-left: 8px;
  color: var(--cinnabar);
  font-size: 12px;
  letter-spacing: 0.12em;
}

.trend svg { width: 100%; height: auto; display: block; }
.trend-line { fill: none; stroke: var(--ink); stroke-width: 2; }
.trend-area { fill: rgba(190, 58, 43, 0.12); }
.trend-split { stroke: var(--bronze); stroke-dasharray: 4 4; }
.trend-dot { fill: var(--cinnabar); }
.trend-label { fill: var(--muted); font-size: 11px; font-family: Consolas, monospace; }

.guide-grid {
  display: grid;
  gap: 12px;
}
.guide {
  display: flex;
  flex-direction: column;
  min-height: 148px;
  padding: 16px;
  border: 1px solid var(--ink);
  text-decoration: none;
  background: transparent;
}
.guide:hover { background: var(--paper); }
.guide small {
  font-family: var(--mono);
  letter-spacing: 0.14em;
  color: var(--bronze);
}
.guide strong { display: block; margin: 10px 0 6px; font-size: 1.15rem; }
.guide span { color: #3c3832; }

.prose { max-width: 68ch; }
.prose p { margin: 0 0 1em; }
.prose a, .article a { color: #9a2e24; }

.faq { margin-top: 8px; border-bottom: 1px solid var(--line); }
.faq details { border-top: 1px solid var(--line); padding: 10px 0; }
.faq summary { cursor: pointer; font-weight: 700; }
.faq p { margin: 8px 0 0; color: #3c3832; }

.page-intro { padding: 26px 0 8px; }
.page-intro h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); }
.crumb {
  display: flex;
  gap: 8px;
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 13px;
}
.crumb a { text-decoration: none; }

.toolbar {
  display: grid;
  gap: 12px;
  margin: 16px 0;
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1px solid var(--ink);
  background: transparent;
  border-radius: 999px;
  padding: 5px 12px;
}
.chip[aria-pressed="true"] {
  background: var(--ink);
  color: var(--paper);
}
.search {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--ink);
  background: var(--paper);
  padding: 8px 10px;
}
.search span { color: var(--muted); font-size: 13px; white-space: nowrap; flex: none; }
.search input {
  border: 0;
  background: transparent;
  width: 100%;
  outline: none;
}
.muted { color: var(--muted); font-size: 14px; }
.text-btn {
  margin-top: 14px;
  background: transparent;
  border: 1px solid var(--ink);
  padding: 10px 16px;
}
.text-btn:hover { background: var(--ink); color: var(--paper); }

.split-2 { display: grid; gap: 14px; }
.panel h2 { font-size: 1.05rem; margin: 8px 0 12px; }
.legend { display: flex; gap: 14px; color: var(--muted); font-size: 13px; }
.swatch {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 4px;
  vertical-align: -1px;
}
.swatch.hot { background: var(--cinnabar); }
.swatch.cold { background: var(--pine); }

.freq {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 6px;
  align-items: end;
  min-height: 176px;
}
.freq-col { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 176px; }
.freq-col i { display: block; width: 100%; background: var(--ink); }
.freq-col.is-hot i { background: var(--cinnabar); }
.freq-col.is-cold i { background: var(--pine); }
.freq-col b { margin-top: 6px; font-family: var(--serif); }
.freq-col small { color: var(--muted); font-size: 11px; }

.pos-row {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 8px;
  align-items: end;
  margin-bottom: 12px;
}
.pos-bars {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 4px;
  align-items: end;
}
.pos-bars i { display: block; width: 100%; background: var(--ink); }
.pos-bars span { display: block; text-align: center; font-size: 11px; color: var(--muted); }

.meter-block { margin-bottom: 14px; }
.meter-label { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; }
.meter, .stack {
  margin-top: 6px;
  height: 10px;
  background: rgba(28, 25, 21, 0.08);
  display: flex;
  gap: 0;
}
.meter i { display: block; height: 100%; background: var(--cinnabar); }
.stack i { display: block; height: 100%; }
.stack i:nth-child(1) { background: var(--cinnabar); }
.stack i:nth-child(2) { background: #c6b496; }
.stack i:nth-child(3) { background: var(--pine); }

.timer-card {
  border: 1px solid var(--ink);
  border-top: 0;
  background: var(--paper);
  padding: 8px 16px 16px;
  text-align: center;
}
.live-layout { display: grid; gap: 14px; margin-top: 8px; }
.screen {
  position: relative;
  aspect-ratio: 16 / 9;
  background:
    radial-gradient(circle at 50% 40%, rgba(240, 215, 140, 0.16), transparent 42%),
    #14120f;
  color: #f4efe4;
  overflow: hidden;
  border: 1px solid var(--ink);
}
.finder { position: absolute; inset: 12px; width: calc(100% - 24px); height: calc(100% - 24px); }
.screen-top, .lower-third, .screen-center { position: absolute; z-index: 1; }
.screen-top {
  top: 22px;
  left: 24px;
  right: 24px;
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
}
.rec::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 6px;
  border-radius: 50%;
  background: #e15b4c;
  box-shadow: 0 0 0 4px rgba(225, 91, 76, 0.2);
}
.screen-center {
  inset: 22% 20px 34% 20px;
  display: grid;
  place-items: center;
  align-content: center;
  text-align: center;
  margin: 0;
  letter-spacing: 0.14em;
}
.screen-center small {
  letter-spacing: 0.08em;
  color: rgba(244, 239, 228, 0.72);
}
.lower-third {
  left: 20px;
  right: 20px;
  bottom: 18px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
}
.lower-third span { display: block; font-size: 12px; letter-spacing: 0.12em; color: var(--gold); }
.lower-nums { display: flex; gap: 6px; }
.lower-nums b {
  width: 28px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(240, 215, 140, 0.7);
  font-family: var(--serif);
  font-size: 18px;
}
.lower-third b { font-weight: 600; }

.article { max-width: 760px; }
.article h2 { margin: 1.4em 0 0.4em; font-size: 1.2rem; }
.article p { margin: 0 0 0.8em; }
.rule-table, .example-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--paper);
  font-size: 14px;
}
.rule-table th, .rule-table td, .example-table th, .example-table td {
  border-bottom: 1px solid var(--line);
  text-align: left;
  padding: 10px 8px;
  vertical-align: top;
}
.rule-table th, .example-table th { font-weight: 700; }
.table-wrap { overflow-x: auto; border: 1px solid var(--ink); }

.principles { display: grid; gap: 12px; margin: 18px 0; }
.principle {
  border: 1px solid var(--ink);
  background: var(--paper);
  padding: 16px;
}
.principle strong { display: block; margin-bottom: 6px; }

.site-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--ink);
  background: var(--paper);
  padding: 28px 0 32px;
}
.footer-inner { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }
.footer-grid { display: grid; gap: 18px; }
.footer-links { display: grid; gap: 6px; }
.footer-links a { text-decoration: none; }
.footer-links a:hover { text-decoration: underline; text-underline-offset: 3px; }
.copy { margin: 18px 0 0; color: var(--muted); font-size: 13px; }

.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  background: var(--ink);
  color: #f4efe4;
  padding-bottom: env(safe-area-inset-bottom);
}
.bottom-nav a, .bottom-nav button {
  color: inherit;
  text-decoration: none;
  background: none;
  border: 0;
  padding: 11px 0 12px;
  font-size: 12px;
  letter-spacing: 0.08em;
}
.bottom-nav a[aria-current="page"],
.bottom-nav button[aria-current="page"] { color: var(--gold); }

.backdrop {
  position: fixed;
  inset: 0;
  background: rgba(28, 25, 21, 0.38);
  z-index: 30;
}
.sheet {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(62px + env(safe-area-inset-bottom));
  z-index: 35;
  background: var(--paper);
  border: 1px solid var(--ink);
  display: grid;
}
.sheet a {
  text-decoration: none;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}
.sheet a:last-child { border-bottom: 0; }

@media (min-width: 720px) {
  .guide-grid, .principles { grid-template-columns: 1fr 1fr; }
  .toolbar { grid-template-columns: 1fr 240px; align-items: center; }
}

@media (min-width: 800px) {
  .stat-row { grid-template-columns: repeat(4, 1fr); }
  .stat:nth-child(odd) { border-right: 0; }
  .stat:nth-child(n + 3) { border-top: 0; }
  .stat + .stat { border-left: 1px solid var(--line); }
  .draw-head, .draw-row {
    grid-template-columns: 168px minmax(220px, 1fr) auto;
    align-items: center;
  }
  .draw-row .seals { grid-column: auto; }
  .draw-head {
    display: grid;
    padding: 10px 0;
    color: var(--muted);
    font-size: 12px;
    letter-spacing: 0.08em;
    border-bottom: 1px solid var(--ink);
  }
}

@media (min-width: 960px) {
  .nav { display: flex; margin-left: auto; }
  .nav-toggle, .bottom-nav { display: none; }
  main { padding-bottom: 56px; }
  .hero-layout { grid-template-columns: minmax(0, 1fr) 280px; }
  .hero-copy { padding: 32px 28px 26px; }
  .side-card { border-top: 0; border-left: 1px solid var(--ink); padding: 28px 20px; }
  .split-2, .live-layout { grid-template-columns: 1.15fr 0.85fr; align-items: start; }
  .footer-grid { grid-template-columns: 1.2fr 0.8fr 1.5fr; }
  .guide-grid { grid-template-columns: 1fr 1fr 1fr; }
}

@media (max-width: 380px) {
  .sync-label { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .dot, .rec::before { animation: none; }
}

@media print {
  .site-header, .demo-strip, .bottom-nav, .sheet, .backdrop, .side-card, .text-btn { display: none !important; }
  body { background: white; }
  main { width: 100%; padding: 0; }
}
