/* ==========================================================
   超準算命抽籤 foresee8.com — 全站樣式
   主題：宣紙米白 × 朱砂紅 × 描金，支援深色模式
   ========================================================== */
:root {
  --bg: #f7f1e6;
  --bg-2: #f1e8d8;
  --surface: #fffdf8;
  --surface-2: #fbf6ec;
  --ink: #2a211b;
  --ink-2: #4a3d33;
  --muted: #7a6a5c;
  --line: #e6dac6;
  --line-2: #d8c7ab;
  --red: #b3261e;
  --red-d: #8c1c16;
  --red-l: #fbe9e6;
  --gold: #c9a14a;
  --gold-d: #7d5d18;
  --gold-l: #f8efd8;
  --jade: #2f6b5a;
  --jade-l: #e4f1ec;
  --blue: #2c4f7c;
  --shadow: 0 1px 2px rgba(60, 35, 15, .06), 0 6px 20px rgba(60, 35, 15, .07);
  --shadow-lg: 0 10px 40px rgba(60, 30, 10, .14);
  --radius: 16px;
  --radius-sm: 10px;
  --serif: "Noto Serif TC", "Songti TC", "PMingLiU", "MingLiU", serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", "Heiti TC", system-ui, sans-serif;
  --wrap: 1120px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15110e;
    --bg-2: #1c1713;
    --surface: #211a16;
    --surface-2: #29211b;
    --ink: #f3ebe0;
    --ink-2: #ddd0c0;
    --muted: #b3a493;
    --line: #3a2f27;
    --line-2: #4a3c31;
    --red: #e25b4f;
    --red-d: #ff7b6e;
    --red-l: #3a1d19;
    --gold: #dcb766;
    --gold-d: #e8c97e;
    --gold-l: #352b1a;
    --jade: #6fbca5;
    --jade-l: #1d2f29;
    --blue: #8fb2df;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 20px rgba(0, 0, 0, .25);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, .45);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.75;
  color: var(--ink);
  background: var(--bg);
  background-image:
    radial-gradient(circle at 12% 0%, rgba(201, 161, 74, .10), transparent 40%),
    radial-gradient(circle at 100% 30%, rgba(179, 38, 30, .05), transparent 35%);
  background-attachment: fixed;
  overflow-x: hidden;
}
img, svg { max-width: 100%; height: auto; }
a { color: var(--red); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--red-d); }
h1, h2, h3, h4 { font-family: var(--serif); line-height: 1.35; color: var(--ink); margin: 0 0 .6em; letter-spacing: .02em; }
h1 { font-size: clamp(1.7rem, 4.2vw, 2.5rem); font-weight: 900; }
h2 { font-size: clamp(1.3rem, 3vw, 1.65rem); font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; }
button { font: inherit; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 780px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--red); color: #fff; padding: 8px 14px; z-index: 100; }
.skip:focus { left: 8px; top: 8px; }
.ic { width: 1.2em; height: 1.2em; vertical-align: -.22em; flex: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 4px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
@supports not (background: color-mix(in srgb, red 50%, blue)) { .site-header { background: var(--surface); } }
.header-inner { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand-mark { width: 40px; height: 40px; flex: none; filter: drop-shadow(0 2px 4px rgba(140, 28, 22, .25)); }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-family: var(--serif); font-size: 1.15rem; font-weight: 900; letter-spacing: .06em; }
.brand-text small { font-size: .75rem; color: var(--muted); letter-spacing: .08em; }
.site-nav { margin-left: auto; }
.site-nav ul { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; align-items: center; }
.site-nav a {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 999px; text-decoration: none;
  color: var(--ink-2); font-weight: 600; font-size: .95rem; white-space: nowrap;
}
.site-nav a:hover { background: var(--gold-l); color: var(--ink); }
.site-nav a[aria-current="page"] { background: var(--red); color: #fff; }
.nav-toggle {
  display: none; margin-left: auto; width: 44px; height: 44px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer;
  align-items: center; justify-content: center;
}
@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-lg);
    display: none; padding: 8px 16px 16px;
  }
  .site-nav.open { display: block; animation: drop .2s ease-out; }
  .site-nav ul { flex-direction: column; align-items: stretch; }
  .site-nav a { padding: 12px 14px; border-radius: 10px; font-size: 1rem; }
  .brand-text small { display: none; }
}
@keyframes drop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* ---------- Layout blocks ---------- */
.site-main { min-height: 60vh; padding-bottom: 48px; }
.section { padding: 40px 0; }
.section-sm { padding: 24px 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.section-head h2 { margin: 0; }
.section-head p { margin: 4px 0 0; color: var(--muted); }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; color: var(--red); font-weight: 700; font-size: .85rem; letter-spacing: .2em; margin-bottom: 6px; }
.eyebrow::before { content: ""; width: 22px; height: 2px; background: currentColor; border-radius: 2px; }
.more-link { font-weight: 700; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 24px;
}
.card + .card { margin-top: 20px; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .grid-2, .grid-3 { grid-template-columns: minmax(0, 1fr); } }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 10px 22px; border-radius: 999px; border: 1px solid transparent;
  font-weight: 700; font-size: 1rem; letter-spacing: .05em; text-decoration: none; cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn-primary { background: linear-gradient(180deg, #c73a2f, var(--red) 55%, #9d1f18); color: #fff7e8; box-shadow: 0 4px 14px rgba(179, 38, 30, .35), inset 0 1px 0 rgba(255, 255, 255, .25); }
.btn-primary:hover { color: #fff; box-shadow: 0 6px 20px rgba(179, 38, 30, .45), inset 0 1px 0 rgba(255, 255, 255, .25); }
.btn-gold { background: linear-gradient(180deg, #e8c773, var(--gold) 60%, #a9822f); color: #3a2706; box-shadow: 0 4px 14px rgba(201, 161, 74, .35), inset 0 1px 0 rgba(255, 255, 255, .4); }
.btn-gold:hover { color: #2a1b03; }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { background: var(--gold-l); color: var(--ink); }
.btn-lg { min-height: 54px; padding: 12px 30px; font-size: 1.1rem; }
.btn-sm { min-height: 36px; padding: 6px 14px; font-size: .9rem; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

.tag {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 999px;
  font-size: .8rem; font-weight: 700; background: var(--gold-l); color: var(--gold-d); border: 1px solid color-mix(in srgb, var(--gold) 40%, transparent);
}
.tag-red { background: var(--red-l); color: var(--red); border-color: transparent; }
.lv { display: inline-block; padding: 2px 12px; border-radius: 6px; font-weight: 900; font-family: var(--serif); letter-spacing: .1em; font-size: .9rem; }
.lv-best { background: #b3261e; color: #fff4dc; }
.lv-good { background: #b9451c; color: #fff; }
.lv-mid  { background: #c9a14a; color: #2e2105; }
.lv-low  { background: #5f6b73; color: #fff; }
.lv-bad  { background: #3c3c46; color: #eee; }

/* ---------- Breadcrumbs ---------- */
.crumbs { padding: 18px 0 4px; font-size: .88rem; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; margin: 0; padding: 0; color: var(--muted); }
.crumbs li { display: flex; align-items: center; gap: 4px; }
.crumbs li + li::before { content: "›"; color: var(--line-2); margin-right: 2px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--red); }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 48px 0 32px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 32px; align-items: center; }
.hero h1 { font-size: clamp(2rem, 5.4vw, 3.3rem); line-height: 1.2; margin-bottom: 16px; }
.hero h1 em { font-style: normal; color: var(--red); position: relative; }
.hero h1 em::after { content: ""; position: absolute; left: 0; right: 0; bottom: .06em; height: .28em; background: var(--gold); opacity: .28; border-radius: 4px; z-index: -1; }
.hero .lead { font-size: 1.12rem; color: var(--ink-2); max-width: 36em; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 24px 0 16px; }
.hero-stats { display: flex; gap: 24px; flex-wrap: wrap; color: var(--muted); font-size: .92rem; }
.hero-stats b { display: block; font-family: var(--serif); font-size: 1.6rem; color: var(--ink); line-height: 1.2; }
.hero-art { display: flex; justify-content: center; }
.hero-art svg { width: min(340px, 80vw); filter: drop-shadow(0 18px 30px rgba(120, 30, 20, .22)); }
.hero-art .sway { transform-origin: 50% 90%; animation: sway 5s ease-in-out infinite; }
@keyframes sway { 0%, 100% { transform: rotate(-2deg); } 50% { transform: rotate(2deg); } }
@media (max-width: 820px) {
  .hero { padding-top: 28px; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { order: -1; }
  .hero-art svg { width: 200px; }
}

/* ---------- Type cards ---------- */
.type-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.type-card {
  --c: var(--red);
  position: relative; display: flex; flex-direction: column; gap: 6px;
  padding: 18px 18px 16px; border-radius: var(--radius); text-decoration: none; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  overflow: hidden;
}
.type-card::before {
  content: ""; position: absolute; inset: 0 auto 0 0; width: 5px; background: var(--c);
}
.type-card::after {
  content: "籤"; position: absolute; right: -6px; bottom: -22px; font-family: var(--serif); font-weight: 900;
  font-size: 84px; color: var(--c); opacity: .07; line-height: 1;
}
.type-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--c) 45%, var(--line)); color: var(--ink); }
.type-card h3 { margin: 0; font-size: 1.12rem; color: var(--ink); }
.type-card p { margin: 0; font-size: .88rem; color: var(--muted); line-height: 1.6; }
.type-card .meta { margin-top: auto; padding-top: 6px; display: flex; justify-content: space-between; align-items: center; font-size: .8rem; color: var(--muted); }
.type-card .go { color: var(--c); font-weight: 700; display: inline-flex; align-items: center; gap: 4px; }
.type-chip-list { display: flex; flex-wrap: wrap; gap: 8px; }
.type-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink-2); font-weight: 600; font-size: .92rem;
}
.type-chip:hover { border-color: var(--red); color: var(--red); }
.type-chip small { color: var(--muted); font-weight: 400; }

.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; align-items: center; }
.filter-bar button {
  border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2); padding: 7px 14px;
  border-radius: 999px; cursor: pointer; font-weight: 600; font-size: .9rem; display: inline-flex; align-items: center; gap: 6px;
}
.filter-bar button[aria-pressed="true"] { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.filter-input {
  flex: 1 1 200px; min-width: 0; height: 40px; padding: 0 14px 0 38px; border-radius: 999px; border: 1px solid var(--line-2);
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23998877' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E") no-repeat 12px 50% / 18px;
  color: var(--ink); font: inherit; font-size: .95rem;
}

/* ---------- Steps ---------- */
.how-grid { counter-reset: how; }
.how-item { position: relative; padding: 22px 22px 18px; }
.how-item::before {
  counter-increment: how; content: counter(how);
  display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%;
  background: var(--red); color: #fff4dc; font-family: var(--serif); font-weight: 900; font-size: 1.2rem; margin-bottom: 10px;
  box-shadow: 0 0 0 5px var(--red-l);
}
.how-item h3 { margin-bottom: 4px; }
.how-item p { color: var(--muted); margin: 0; font-size: .95rem; }

/* ---------- Draw stage ---------- */
.draw-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: stretch; }
@media (max-width: 860px) { .draw-wrap { grid-template-columns: 1fr; } }
.draw-stage {
  position: relative; border-radius: 22px; padding: 18px 18px 22px; text-align: center; overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(255, 214, 140, .35), transparent 60%),
    linear-gradient(180deg, #7d1912 0%, #5a110c 100%);
  color: #fbecd0; box-shadow: var(--shadow-lg), inset 0 0 0 1px rgba(233, 196, 106, .35);
  min-height: 460px; display: flex; flex-direction: column;
}
.draw-stage::before {
  content: ""; position: absolute; inset: 10px; border: 1px solid rgba(233, 196, 106, .35); border-radius: 16px; pointer-events: none;
}
.draw-top { display: flex; justify-content: space-between; align-items: center; position: relative; z-index: 2; font-size: .85rem; color: #f0d9a8; }
.sound-btn { background: rgba(0, 0, 0, .2); border: 1px solid rgba(233, 196, 106, .4); color: #f6dfa8; border-radius: 999px; padding: 4px 10px; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; font-size: .8rem; }
.draw-steps { display: flex; justify-content: center; gap: 6px; margin: 6px 0 0; padding: 0; list-style: none; position: relative; z-index: 2; font-size: .8rem; }
.draw-steps li { padding: 3px 10px; border-radius: 999px; background: rgba(0, 0, 0, .22); color: #d9bf8c; }
.draw-steps li.on { background: #e9c46a; color: #4a1a07; font-weight: 700; }
.draw-steps li.done { background: rgba(233, 196, 106, .3); color: #fff2cf; }
.stage-area { position: relative; flex: 1; display: flex; align-items: center; justify-content: center; min-height: 300px; }
.stage-msg { position: relative; z-index: 2; min-height: 3.4em; margin: 6px 0 12px; font-family: var(--serif); font-size: 1.15rem; color: #fff1d0; }
.stage-msg small { display: block; font-family: var(--sans); font-size: .85rem; color: #e2c58e; }
.stage-actions { position: relative; z-index: 2; display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* 籤筒 */
.tube { width: 210px; height: 300px; position: relative; transform-origin: 50% 92%; }
.tube svg { width: 100%; height: 100%; overflow: visible; }
.tube .stick { transition: transform .3s ease; }
.tube.shaking { animation: shake .16s ease-in-out infinite alternate; }
.tube.shaking .stick:nth-child(odd) { animation: jig .12s ease-in-out infinite alternate; }
.tube.shaking .stick:nth-child(even) { animation: jig .14s ease-in-out infinite alternate-reverse; }
@keyframes shake {
  0% { transform: rotate(-14deg) translate(-6px, 2px); }
  100% { transform: rotate(14deg) translate(6px, -4px); }
}
@keyframes jig { from { transform: translateY(0); } to { transform: translateY(-9px); } }
.tube.tilt { transition: transform .5s cubic-bezier(.3, .7, .3, 1); transform: rotate(-28deg); }

/* 落出的籤枝 */
.fallen {
  position: absolute; left: 50%; top: 50%; width: 46px; height: 250px; margin: -125px 0 0 -23px; z-index: 3;
  border-radius: 6px 6px 3px 3px; display: none;
  background: linear-gradient(90deg, #d9b98a, #f4e2c2 40%, #e9d0a6 70%, #c9a675);
  box-shadow: 0 10px 25px rgba(0, 0, 0, .35), inset 0 0 0 1px rgba(110, 70, 20, .25);
}
.fallen::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 46px; border-radius: 6px 6px 0 0; background: linear-gradient(180deg, #d63a2c, #a5211a); }
.fallen span {
  position: absolute; left: 0; right: 0; top: 56px; writing-mode: vertical-rl; text-orientation: upright;
  margin: 0 auto; font-family: var(--serif); font-weight: 900; color: #6b1a0f; font-size: 1.25rem; letter-spacing: .1em; line-height: 46px; height: 180px;
  display: flex; align-items: center; justify-content: flex-start;
}
.fallen.show { display: block; animation: popout .9s cubic-bezier(.2, .9, .3, 1.2) forwards; }
@keyframes popout {
  0% { transform: translate(-30px, 40px) rotate(-30deg) scale(.6); opacity: 0; }
  45% { transform: translate(0, -120px) rotate(220deg) scale(1); opacity: 1; }
  100% { transform: translate(0, 0) rotate(360deg) scale(1); opacity: 1; }
}
.fallen.mini { animation: tomini .5s ease forwards; }
@keyframes tomini { to { transform: translate(-120px, -40px) rotate(-8deg) scale(.55); } }
@media (max-width: 480px) { @keyframes tomini { to { transform: translate(-95px, -50px) rotate(-8deg) scale(.45); } } }

/* 筊杯 */
.jiao-area { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; gap: 22px; z-index: 4; perspective: 600px; }
.jiao-area.show { display: flex; }
.jiao { width: 92px; height: 120px; position: relative; transform-style: preserve-3d; }
.jiao .face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.jiao .back { transform: rotateY(180deg); }
.jiao svg { width: 100%; height: 100%; display: block; }
.jiao.toss-l { animation: tossL 1.15s cubic-bezier(.25, .7, .35, 1) forwards; }
.jiao.toss-r { animation: tossR 1.2s cubic-bezier(.25, .7, .35, 1) forwards; }
@keyframes tossL {
  0% { transform: translateY(80px) rotateX(0) rotateY(0) rotateZ(0); }
  40% { transform: translateY(-150px) rotateX(540deg) rotateY(90deg) rotateZ(-40deg); }
  75% { transform: translateY(12px) rotateX(980deg) rotateY(var(--ry)) rotateZ(-14deg); }
  88% { transform: translateY(-14px) rotateX(1080deg) rotateY(var(--ry)) rotateZ(-10deg); }
  100% { transform: translateY(0) rotateX(1080deg) rotateY(var(--ry)) rotateZ(-12deg); }
}
@keyframes tossR {
  0% { transform: translateY(80px) rotateX(0) rotateY(0) rotateZ(0); }
  40% { transform: translateY(-170px) rotateX(-540deg) rotateY(-90deg) rotateZ(50deg); }
  75% { transform: translateY(10px) rotateX(-980deg) rotateY(var(--ry)) rotateZ(18deg); }
  88% { transform: translateY(-10px) rotateX(-1080deg) rotateY(var(--ry)) rotateZ(14deg); }
  100% { transform: translateY(0) rotateX(-1080deg) rotateY(var(--ry)) rotateZ(16deg); }
}
.cups { display: flex; justify-content: center; gap: 10px; margin: 4px 0 10px; position: relative; z-index: 2; }
.cup-dot { width: 30px; height: 30px; border-radius: 50%; border: 2px dashed rgba(233, 196, 106, .55); display: flex; align-items: center; justify-content: center; font-family: var(--serif); font-size: .85rem; color: #e8cf98; }
.cup-dot.ok { border-style: solid; border-color: #e9c46a; background: #e9c46a; color: #5a1a08; font-weight: 900; animation: pop .35s ease; }
@keyframes pop { 0% { transform: scale(.4); } 70% { transform: scale(1.2); } 100% { transform: scale(1); } }
.result-label { display: inline-block; font-family: var(--serif); font-weight: 900; font-size: 1.5rem; padding: 2px 18px; border-radius: 8px; letter-spacing: .2em; }
.result-sheng { background: #e9c46a; color: #5a1a08; }
.result-xiao { background: #f4e6c8; color: #7d1912; }
.result-yin { background: #2b1d18; color: #f0d9a8; border: 1px solid #a07c3c; }
.sparkle { position: absolute; inset: 0; pointer-events: none; z-index: 5; overflow: hidden; }
.sparkle i { position: absolute; width: 8px; height: 8px; border-radius: 2px; background: #f3d27a; opacity: 0; animation: spark 1.6s ease-out forwards; }
@keyframes spark { 0% { opacity: 1; transform: translate(0, 0) rotate(0); } 100% { opacity: 0; transform: translate(var(--dx), var(--dy)) rotate(540deg); } }

.draw-side .card { height: 100%; }
.draw-side h2 { font-size: 1.25rem; }
.draw-side ol { padding-left: 1.3em; margin: 0 0 1em; }
.draw-side li { margin-bottom: .4em; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ---------- Lot list ---------- */
.lot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.lot-grid a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 10px 4px; border-radius: 10px;
  background: var(--surface-2); border: 1px solid var(--line); text-decoration: none; color: var(--ink-2); font-size: .85rem; line-height: 1.3; text-align: center;
}
.lot-grid a b { font-family: var(--serif); font-size: 1.05rem; color: var(--red); }
.lot-grid a:hover { border-color: var(--red); background: var(--red-l); }

/* ---------- Lot detail ---------- */
.lot-hero { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 28px; align-items: start; }
@media (max-width: 820px) { .lot-hero { grid-template-columns: 1fr; } }
.slip {
  position: relative; margin: 0 auto; width: 100%; max-width: 300px; padding: 18px 16px 22px; text-align: center;
  background: linear-gradient(180deg, #fbf3df, #f3e4c3); color: #5b2a14;
  border: 2px solid #b3261e; border-radius: 6px; box-shadow: 0 12px 30px rgba(110, 40, 10, .22), inset 0 0 0 4px #fbf3df, inset 0 0 0 5px #c9a14a;
  font-family: var(--serif);
}
.slip-no { font-size: 1.5rem; font-weight: 900; color: #b3261e; border-bottom: 1px solid #c9a14a; padding-bottom: 8px; letter-spacing: .15em; }
.slip-top { font-size: .95rem; padding: 6px 0; border-bottom: 1px solid #c9a14a; white-space: pre-line; line-height: 1.6; }
.slip-poem { writing-mode: vertical-rl; margin: 18px auto 8px; height: 230px; height: max-content; min-height: 7em; max-height: 360px; font-size: 1.4rem; line-height: 2.1; letter-spacing: .14em; font-weight: 700; text-align: start; }
.slip-poem span { display: block; }
.slip .lv { margin-top: 10px; }
.slip-type { font-size: .82rem; color: #8a5a35; margin-top: 8px; }
.lot-body h1 { margin-bottom: 8px; }
.lot-meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; color: var(--muted); font-size: .9rem; }
.poem-plain { font-family: var(--serif); font-size: 1.18rem; line-height: 2; background: var(--gold-l); border-left: 4px solid var(--gold); padding: 12px 18px; border-radius: 0 10px 10px 0; margin: 0 0 18px; color: var(--ink); }
.lot-sec { margin-bottom: 18px; }
.lot-sec h2 { font-size: 1.12rem; display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.lot-sec h2::before { content: ""; width: 8px; height: 8px; background: var(--red); transform: rotate(45deg); }
.lot-text { color: var(--ink-2); font-size: 1.02rem; }
.lot-text .lbl { color: var(--red); margin-right: .5em; }
.lot-text .lbl::after { content: "："; }
.kv-table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.kv-table th, .kv-table td { padding: 8px 10px; border-bottom: 1px dashed var(--line-2); text-align: left; vertical-align: top; }
.kv-table th { width: 5.5em; color: var(--red); font-weight: 700; white-space: nowrap; }
.kv-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 20px; }
@media (max-width: 560px) { .kv-grid { grid-template-columns: 1fr; } }
.pager { display: flex; justify-content: space-between; gap: 12px; margin-top: 18px; flex-wrap: wrap; }
.pager a { flex: 1 1 200px; display: flex; flex-direction: column; padding: 12px 16px; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; background: var(--surface); color: var(--ink); }
.pager a small { color: var(--muted); }
.pager a.next { text-align: right; }
.pager a:hover { border-color: var(--red); }
.share-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 16px; }
.share-row .btn { min-height: 38px; padding: 6px 14px; font-size: .9rem; }

/* ---------- Comments ---------- */
.comment-list { list-style: none; margin: 0; padding: 0; }
.comment { padding: 14px 0; border-bottom: 1px solid var(--line); }
.comment:last-child { border-bottom: 0; }
.comment-head { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: .85rem; margin-bottom: 4px; }
.comment-head b { color: var(--ink); }
.comment p { margin: 0; white-space: pre-line; overflow-wrap: anywhere; }
.form-row { margin-bottom: 14px; }
.form-row label { display: block; font-weight: 700; margin-bottom: 4px; font-size: .92rem; }
.input, .textarea {
  width: 100%; padding: 11px 14px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface-2);
  color: var(--ink); font: inherit; font-size: 1rem;
}
.textarea { min-height: 120px; resize: vertical; }
.input:focus, .textarea:focus { border-color: var(--red); outline: none; box-shadow: 0 0 0 3px var(--red-l); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .form-grid { grid-template-columns: 1fr; } }
.hp { position: absolute !important; left: -9999px !important; }
.form-note { font-size: .82rem; color: var(--muted); }

/* ---------- Marquee (latest comments) ---------- */
.ticker { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 6px 8px 6px 16px; overflow: hidden; }
.ticker-label { flex: none; font-weight: 700; color: var(--red); display: flex; align-items: center; gap: 6px; font-size: .9rem; }
.ticker-viewport { overflow: hidden; flex: 1; mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }
.ticker-track { display: flex; gap: 36px; width: max-content; animation: ticker 60s linear infinite; }
.ticker-track a { color: var(--ink-2); text-decoration: none; white-space: nowrap; font-size: .92rem; }
.ticker-track a b { color: var(--ink); }
.ticker:hover .ticker-track { animation-play-state: paused; }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- Articles ---------- */
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.post-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); text-decoration: none; color: var(--ink); transition: transform .18s, box-shadow .18s; }
.post-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); color: var(--ink); }
.post-card img { width: 100%; aspect-ratio: 1200 / 630; object-fit: cover; display: block; background: var(--bg-2); }
.post-card .pc-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.post-card h3 { font-size: 1.08rem; margin: 0; line-height: 1.45; }
.post-card p { margin: 0; color: var(--muted); font-size: .9rem; line-height: 1.65; }
.post-card .pc-meta { margin-top: auto; padding-top: 6px; font-size: .8rem; color: var(--muted); display: flex; gap: 10px; align-items: center; }
.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 32px; align-items: start; }
@media (max-width: 960px) { .article-layout { grid-template-columns: 1fr; } }
.article-head { padding: 8px 0 16px; }
.article-head .lead { font-size: 1.1rem; color: var(--ink-2); }
.article-meta { display: flex; gap: 14px; flex-wrap: wrap; color: var(--muted); font-size: .88rem; align-items: center; }
.article-cover { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); margin: 8px 0 24px; }
.article-cover img { display: block; width: 100%; aspect-ratio: 1200 / 630; }
.prose { font-size: 1.04rem; line-height: 1.95; color: var(--ink-2); }
.prose h2 { margin: 1.8em 0 .6em; padding-bottom: .3em; border-bottom: 2px solid var(--line); scroll-margin-top: 80px; }
.prose h3 { margin: 1.4em 0 .4em; color: var(--ink); }
.prose p.lead { font-size: 1.12rem; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--red); padding: 14px 18px; border-radius: 0 12px 12px 0; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li { margin-bottom: .35em; }
.prose blockquote { margin: 1.2em 0; padding: 12px 18px; border-left: 4px solid var(--gold); background: var(--gold-l); border-radius: 0 10px 10px 0; font-family: var(--serif); color: var(--ink); }
.prose table { width: 100%; border-collapse: collapse; margin: 1.2em 0; font-size: .95rem; background: var(--surface); border-radius: 10px; overflow: hidden; display: block; overflow-x: auto; }
.prose table thead { background: var(--red); color: #fff7e8; }
.prose th, .prose td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.prose th { white-space: nowrap; }
.prose tbody tr:nth-child(even) { background: var(--surface-2); }
.prose .callout { background: var(--jade-l); border: 1px solid color-mix(in srgb, var(--jade) 30%, transparent); border-radius: 12px; padding: 14px 18px; margin: 1.2em 0; color: var(--ink); }
.prose .callout.warn { background: var(--red-l); border-color: color-mix(in srgb, var(--red) 30%, transparent); }
.prose .steps ol { list-style: none; counter-reset: st; padding: 0; }
.prose .steps li { counter-increment: st; position: relative; padding: 12px 14px 12px 56px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 10px; }
.prose .steps li::before { content: counter(st); position: absolute; left: 14px; top: 12px; width: 30px; height: 30px; border-radius: 50%; background: var(--red); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 900; font-family: var(--serif); }
.toc { position: sticky; top: 84px; }
.toc h2 { font-size: 1rem; margin-bottom: 8px; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.toc a { display: block; padding: 5px 0 5px 14px; margin-left: -2px; border-left: 2px solid transparent; color: var(--muted); text-decoration: none; font-size: .9rem; line-height: 1.5; }
.toc a:hover, .toc a.active { color: var(--red); border-left-color: var(--red); }
.side-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 18px; }
.side-box h2 { font-size: 1rem; margin-bottom: 10px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 10px; padding: 0 18px; }
.faq summary { cursor: pointer; font-weight: 700; padding: 14px 0; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.3rem; color: var(--red); line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq details p { color: var(--ink-2); margin: 0 0 14px; }
.cat-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 20px; }
.cat-tabs a { padding: 7px 16px; border-radius: 999px; border: 1px solid var(--line-2); text-decoration: none; color: var(--ink-2); font-weight: 600; font-size: .92rem; background: var(--surface); }
.cat-tabs a[aria-current="page"] { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.pagination { display: flex; justify-content: center; gap: 6px; margin-top: 28px; }
.pagination a, .pagination span { min-width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; border: 1px solid var(--line); text-decoration: none; color: var(--ink); background: var(--surface); padding: 0 10px; }
.pagination span[aria-current] { background: var(--red); color: #fff; border-color: var(--red); }

/* ---------- Page header ---------- */
.page-head { padding: 8px 0 20px; }
.page-head p { color: var(--muted); max-width: 46em; margin: 0; font-size: 1.05rem; }
.type-head { display: flex; gap: 18px; align-items: center; }
.type-seal { flex: none; width: 74px; height: 74px; border-radius: 18px; background: var(--c, var(--red)); color: #fff6e0; display: flex; align-items: center; justify-content: center; font-family: var(--serif); font-weight: 900; font-size: 2.2rem; box-shadow: inset 0 0 0 4px rgba(255, 255, 255, .15), var(--shadow); }
@media (max-width: 560px) { .type-seal { width: 56px; height: 56px; font-size: 1.6rem; border-radius: 14px; } }

/* ---------- Search ---------- */
.search-form { display: flex; gap: 10px; }
.search-form .input { flex: 1; }
.result-list { list-style: none; padding: 0; margin: 0; }
.result-list li { padding: 14px 0; border-bottom: 1px solid var(--line); }
.result-list a { font-weight: 700; font-size: 1.05rem; }
.result-list p { margin: 4px 0 0; color: var(--muted); font-size: .92rem; }
mark { background: var(--gold-l); color: var(--red); padding: 0 2px; border-radius: 3px; }

/* ---------- Ads / misc ---------- */
.ad-banner { position: relative; max-width: 760px; margin: 24px auto; border-radius: 12px; overflow: hidden; }
.ad-banner img { display: block; width: 100%; height: auto; }
.ad-label { position: absolute; right: 6px; top: 6px; background: rgba(0, 0, 0, .55); color: #fff; font-size: .7rem; padding: 1px 6px; border-radius: 4px; }
.ad-slot { margin: 20px 0; text-align: center; min-height: 100px; }
.toast { position: fixed; left: 50%; top: 80px; transform: translateX(-50%); z-index: 90; padding: 12px 20px; border-radius: 12px; font-weight: 700; box-shadow: var(--shadow-lg); animation: toastin .3s ease, toastout .4s ease 5s forwards; max-width: calc(100% - 32px); }
.toast-ok { background: var(--jade); color: #fff; }
.toast-warn { background: var(--red); color: #fff; }
@keyframes toastin { from { opacity: 0; transform: translate(-50%, -10px); } }
@keyframes toastout { to { opacity: 0; visibility: hidden; } }
.notice { font-size: .88rem; color: var(--muted); background: var(--surface-2); border: 1px dashed var(--line-2); border-radius: 12px; padding: 12px 16px; }
.center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.muted { color: var(--muted); }
.cta-band {
  margin: 40px 0 0; border-radius: 22px; padding: 32px 24px; text-align: center; color: #fbecd0;
  background: radial-gradient(ellipse at 50% 0%, rgba(255, 214, 140, .3), transparent 60%), linear-gradient(180deg, #8c1c16, #5e120d);
  box-shadow: var(--shadow-lg);
}
.cta-band h2 { color: #fff3d6; }
.cta-band p { color: #f0d9a8; }
.daily-card { text-align: center; }
.big-num { font-family: var(--serif); font-size: 3.4rem; font-weight: 900; color: var(--red); line-height: 1.1; }
.jiao-tool { min-height: 420px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--surface); border-top: 1px solid var(--line); margin-top: 32px; padding-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 28px; }
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }
.footer-brand p { color: var(--muted); font-size: .9rem; margin-top: 12px; }
.foot-h { font-size: .98rem; margin-bottom: 10px; }
.foot-links { list-style: none; margin: 0; padding: 0; }
.foot-links li { margin-bottom: 6px; }
.foot-links a { color: var(--ink-2); text-decoration: none; font-size: .92rem; }
.foot-links a:hover { color: var(--red); }
.footer-bottom { border-top: 1px solid var(--line); margin-top: 28px; padding: 16px 16px 28px; font-size: .82rem; color: var(--muted); }
.footer-bottom p { margin: 0; }

@media print {
  .site-header, .site-footer, .stage-actions, .ad-banner, .ad-slot, .share-row, .comments-box { display: none !important; }
  body { background: #fff; }
}
