/* ============================================================
   守矢文庫 MORIYA ARCHIVE — 東風谷早苗 Fandom Wiki
   Design system: washi paper × Moriya shrine greens × gold
   ============================================================ */

:root {
  --paper: #f5f0e4;
  --paper-2: #ece5d3;
  --card: #fffdf6;
  --ink: #243129;
  --ink-soft: #5c6b60;
  --ink-faint: #8a977f;
  --emerald: #1d6b52;
  --emerald-deep: #0f4433;
  --emerald-glow: #2f9a77;
  --gold: #b08a3e;
  --gold-soft: #d8bc84;
  --vermilion: #bf4632;
  --indigo: #3a5474;
  --line: #d9d0ba;
  --shadow: 0 1px 2px rgba(36, 49, 41, .06), 0 8px 28px -12px rgba(36, 49, 41, .18);
  --shadow-lift: 0 2px 4px rgba(36, 49, 41, .08), 0 18px 44px -14px rgba(15, 68, 51, .28);
  --serif: "LXGW WenKai", "LXGW WenKai TC", "Zen Old Mincho", "Noto Serif SC", "Noto Serif JP", "Songti SC", "Hiragino Mincho ProN", serif;
  --latin: "Cormorant Garamond", "Times New Roman", serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", Menlo, monospace;
  --washi: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.035 0'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)'/%3E%3C/svg%3E");
  --seigaiha: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='40' viewBox='0 0 80 40'%3E%3Cg fill='none' stroke='%231d6b52' stroke-opacity='0.10' stroke-width='1.1'%3E%3Ccircle cx='40' cy='40' r='36'/%3E%3Ccircle cx='40' cy='40' r='27'/%3E%3Ccircle cx='40' cy='40' r='18'/%3E%3Ccircle cx='40' cy='40' r='9'/%3E%3Ccircle cx='0' cy='40' r='36'/%3E%3Ccircle cx='0' cy='40' r='27'/%3E%3Ccircle cx='0' cy='40' r='18'/%3E%3Ccircle cx='0' cy='40' r='9'/%3E%3Ccircle cx='80' cy='40' r='36'/%3E%3Ccircle cx='80' cy='40' r='27'/%3E%3Ccircle cx='80' cy='40' r='18'/%3E%3Ccircle cx='80' cy='40' r='9'/%3E%3Ccircle cx='20' cy='0' r='36'/%3E%3Ccircle cx='20' cy='0' r='27'/%3E%3Ccircle cx='20' cy='0' r='18'/%3E%3Ccircle cx='20' cy='0' r='9'/%3E%3Ccircle cx='60' cy='0' r='36'/%3E%3Ccircle cx='60' cy='0' r='27'/%3E%3Ccircle cx='60' cy='0' r='18'/%3E%3Ccircle cx='60' cy='0' r='9'/%3E%3C/g%3E%3C/svg%3E");
}

html[data-theme="moon"] {
  --paper: #0f1a16;
  --paper-2: #14211c;
  --card: #17261f;
  --ink: #dde7dc;
  --ink-soft: #a4b3a6;
  --ink-faint: #75857a;
  --emerald: #5ec697;
  --emerald-deep: #0c3a2c;
  --emerald-glow: #7fe0b4;
  --gold: #d4b06a;
  --gold-soft: #9c8250;
  --vermilion: #e0745c;
  --indigo: #8fb0d8;
  --line: #2a3a31;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 10px 30px -12px rgba(0,0,0,.5);
  --shadow-lift: 0 2px 6px rgba(0,0,0,.35), 0 20px 50px -14px rgba(0,0,0,.65);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--serif);
  background: var(--paper);
  background-image: var(--washi);
  color: var(--ink);
  line-height: 1.75;
  font-size: 16.5px;
  transition: background-color .5s ease, color .5s ease;
  overflow-x: hidden;
}
::selection { background: rgba(29,107,82,.22); }
a { color: var(--emerald); text-decoration: none; }
a:hover { color: var(--emerald-deep); }
html[data-theme="moon"] a:hover { color: var(--emerald-glow); }

/* ---------- typography ---------- */
h1,h2,h3,h4 { font-weight: 700; line-height: 1.3; margin: 0 0 .5em; }
.latin { font-family: var(--latin); }
.mono { font-family: var(--mono); font-size: .82em; letter-spacing: .04em; }
.page-title { font-size: clamp(26px, 4vw, 40px); letter-spacing: .06em; }
.page-sub { color: var(--ink-soft); font-size: 15px; }

/* ---------- layout ---------- */
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 clamp(18px, 4vw, 44px); }
main { min-height: 60vh; }
main section { scroll-margin-top: 96px; }
.section { padding: clamp(40px, 7vw, 84px) 0; position: relative; }
.section-head { display: flex; align-items: baseline; gap: 18px; flex-wrap: wrap; margin-bottom: 8px; }
.section-head h2 { font-size: clamp(22px, 3vw, 30px); letter-spacing: .08em; margin: 0; }
.section-head .en { font-family: var(--latin); font-style: italic; color: var(--gold); font-size: 15px; letter-spacing: .18em; }
.section-desc { color: var(--ink-soft); max-width: 720px; margin: 0 0 26px; }
.seigaiha-band {
  background-image: var(--seigaiha);
  height: 46px; margin-top: -24px; pointer-events: none; opacity: .55;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 55%);
  mask-image: linear-gradient(to bottom, transparent, #000 55%);
}

/* ---------- nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: blur(14px) saturate(1.1);
  border-bottom: 1px solid var(--line);
}
.nav::after {
  content: ""; display: block; height: 3px;
  background: repeating-linear-gradient(90deg,
    var(--gold) 0 14px, transparent 14px 20px,
    var(--emerald) 20px 30px, transparent 30px 42px);
  opacity: .5;
}
.nav-inner { display: flex; align-items: center; gap: 20px; max-width: 1180px; margin: 0 auto; padding: 10px clamp(18px, 4vw, 44px); }
.brand { display: flex; align-items: center; gap: 10px; font-size: 19px; letter-spacing: .12em; color: var(--ink); font-weight: 700; }
.brand svg { width: 34px; height: 34px; flex: none; }
.brand small { font-family: var(--latin); font-style: italic; font-size: 11px; letter-spacing: .22em; color: var(--gold); display: block; font-weight: 400; }
.nav-links { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.nav-links a {
  padding: 7px 13px; border-radius: 8px; color: var(--ink-soft);
  font-size: 15.5px; letter-spacing: .1em; transition: all .25s;
}
.nav-links a:hover { color: var(--emerald); background: rgba(29,107,82,.07); }
.nav-links a.active { color: var(--emerald); background: rgba(29,107,82,.1); font-weight: 700; }
.nav-links a .zh { font-size: 17px; }
.nav-links a .en { display: block; font-family: var(--latin); font-style: italic; font-size: 10px; letter-spacing: .14em; color: var(--ink-faint); }
.icon-btn {
  border: 1px solid var(--line); background: var(--card); color: var(--ink-soft);
  width: 38px; height: 38px; border-radius: 50%; cursor: pointer; display: grid;
  place-items: center; font-size: 17px; transition: all .25s; flex: none;
}
.icon-btn:hover { color: var(--gold); border-color: var(--gold); transform: rotate(15deg); }
#menuBtn { display: none; }

/* ---------- hero ---------- */
.hero { position: relative; height: min(100svh, 860px); min-height: 560px; overflow: hidden; display: flex; align-items: center; }
.hero-scene { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-scene svg { width: 100%; height: 100%; display: block; }
.hero-veil { position: absolute; inset: 0; background: linear-gradient(to top, var(--paper) 2%, transparent 30%); pointer-events: none; }
.hero-content { position: relative; z-index: 5; text-align: center; padding: 118px 20px 40px; }
.hero-kicker {
  display: inline-flex; align-items: center; gap: 10px; font-size: 13px;
  letter-spacing: .5em; color: var(--gold); text-transform: uppercase; margin-bottom: 18px;
}
.hero-kicker::before, .hero-kicker::after { content: ""; width: 44px; height: 1px; background: linear-gradient(90deg, transparent, var(--gold)); }
.hero-kicker::after { background: linear-gradient(90deg, var(--gold), transparent); }
.hero-title {
  font-size: clamp(46px, 9vw, 96px); letter-spacing: .18em; margin: 0;
  text-shadow: 0 2px 30px rgba(245,240,228,.5);
}
.hero-title .grove { color: var(--emerald); }
html[data-theme="moon"] .hero-title { text-shadow: 0 2px 30px rgba(10,20,16,.8); }
.hero-latin { font-family: var(--latin); font-style: italic; font-size: clamp(14px, 2vw, 19px); letter-spacing: .32em; color: color-mix(in srgb, var(--ink) 74%, var(--paper)); margin-top: 10px; }
.hero-quote { margin: 26px auto 0; max-width: 560px; color: var(--ink); font-size: 15.5px; }
.hero-quote .jp { color: var(--ink); font-weight: 700; }
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 34px; }
.btn {
  display: inline-flex; align-items: center; gap: 9px; padding: 12px 26px;
  border-radius: 999px; font-size: 16px; letter-spacing: .14em; cursor: pointer;
  border: 1px solid var(--emerald); transition: all .3s;
}
.btn-primary { background: var(--emerald); color: #f7f4e9; box-shadow: 0 10px 26px -10px rgba(15,68,51,.55); }
.btn-primary:hover { background: var(--emerald-deep); color: #fff; transform: translateY(-2px); box-shadow: 0 16px 34px -10px rgba(15,68,51,.6); }
.btn-ghost { background: color-mix(in srgb, var(--card) 65%, transparent); color: var(--ink); border-color: color-mix(in srgb, var(--gold) 75%, var(--ink) 10%); }
.btn-ghost:hover { border-color: var(--emerald); color: var(--emerald); transform: translateY(-2px); }
.hero-stats {
  display: flex; gap: clamp(14px,3.4vw,44px); justify-content: center; margin-top: 44px; flex-wrap: wrap;
  background: color-mix(in srgb, var(--card) 62%, transparent);
  backdrop-filter: blur(6px);
  border: 1px solid color-mix(in srgb, var(--gold-soft) 45%, transparent);
  border-radius: 18px; padding: 16px 28px; max-width: 760px; margin-left: auto; margin-right: auto;
  box-shadow: 0 8px 30px -18px rgba(15,68,51,.35);
}
.stat { text-align: center; }
.stat b { display: block; font-size: clamp(24px, 3.4vw, 34px); color: var(--emerald); font-family: var(--latin); line-height: 1.1; font-variant-numeric: lining-nums; }
.stat span { font-size: 12px; letter-spacing: .22em; color: var(--ink-soft); font-weight: 500; }
.scroll-hint { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); color: var(--ink-soft); font-size: 11px; letter-spacing: .4em; animation: floaty 2.6s ease-in-out infinite; }

@keyframes floaty { 0%,100%{ transform: translate(-50%,0);} 50%{ transform: translate(-50%,8px);} }
@keyframes drift { from { transform: translateX(0);} to { transform: translateX(-140px);} }
@keyframes sway { 0%,100%{ transform: translateY(0) } 50%{ transform: translateY(10px) } }
.cloud { animation: drift 46s linear infinite; }
.cloud.slow { animation-duration: 78s; }
.windline { stroke-dasharray: 6 10; animation: windflow 5.5s linear infinite; }
@keyframes windflow { to { stroke-dashoffset: -64; } }

/* ---------- cards ---------- */
.grid { display: grid; gap: 22px; }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 960px) { .grid.cols-3 { grid-template-columns: repeat(2,1fr);} }
@media (max-width: 680px) { .grid.cols-2, .grid.cols-3 { grid-template-columns: 1fr; } }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 26px 26px 22px; box-shadow: var(--shadow); position: relative;
  transition: transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .35s, border-color .35s;
  overflow: hidden;
}
.card::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 3px;
  background: linear-gradient(90deg, var(--emerald), var(--gold));
  opacity: 0; transition: opacity .35s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); border-color: var(--gold-soft); }
.card:hover::before { opacity: 1; }
.card h3 { margin: 0 0 6px; font-size: 19px; letter-spacing: .04em; }
.card h3 a { color: inherit; }
.card p { margin: 0; color: var(--ink-soft); font-size: 14.5px; }

/* portal cards */
.portal { display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; }
@media (max-width: 1020px) { .portal { grid-template-columns: repeat(3,1fr);} }
@media (max-width: 640px) { .portal { grid-template-columns: repeat(2,1fr);} }
.portal .card { text-align: center; padding: 30px 16px 24px; }
.portal .glyph { display: block; margin-bottom: 12px; }
.portal .glyph svg { display: inline-block; }
.portal .card h3 { font-size: 18px; letter-spacing: .3em; margin-left: .3em; }
.portal .card .en { font-family: var(--latin); font-style: italic; font-size: 11.5px; letter-spacing: .2em; color: var(--gold); }
.portal .card p { margin-top: 8px; font-size: 13px; }

/* ---------- badges / stamps ---------- */
.stamp {
  display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 6px;
  font-size: 13px; color: #fff8ec; transform: rotate(-4deg); flex: none;
  box-shadow: inset 0 0 0 1.5px rgba(255,248,236,.55), 0 1px 3px rgba(0,0,0,.18);
  font-family: var(--serif); font-weight: 700;
}
.stamp.zh { background: var(--vermilion); }
.stamp.ja { background: var(--indigo); }
.badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 2.5px 10px;
  border-radius: 999px; font-size: 12.5px; border: 1px solid var(--line);
  color: var(--ink-soft); background: color-mix(in srgb, var(--card) 60%, transparent);
  letter-spacing: .05em; line-height: 1.6; white-space: nowrap; vertical-align: middle;
}
.badge.role-A { color: var(--emerald); border-color: color-mix(in srgb, var(--emerald) 45%, transparent); background: color-mix(in srgb, var(--emerald) 8%, transparent); }
.badge.role-B { color: var(--indigo); border-color: color-mix(in srgb, var(--indigo) 40%, transparent); }
.badge.role-C { color: var(--gold); border-color: color-mix(in srgb, var(--gold) 45%, transparent); }
.badge.role-V { color: var(--ink-faint); }
.badge.vf-T { color: #9a7b1f; border-color: #cfb46a; background: rgba(207,180,106,.12); }
.badge.vf-S { color: var(--emerald); }
.badge.vf-I { color: var(--indigo); }
.badge.vf-X { color: var(--vermilion); border-color: color-mix(in srgb, var(--vermilion) 40%, transparent); }
.badge.vf-O { color: var(--ink-soft); }
.badge.star { color: var(--gold); border-color: var(--gold); }
.chip {
  display: inline-block; padding: 3px 12px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); color: var(--ink-soft); font-size: 13.5px;
  background: transparent; transition: all .22s; letter-spacing: .06em; line-height: 1.7;
}
.chip:hover { border-color: var(--emerald); color: var(--emerald); }
.chip.on { background: var(--emerald); border-color: var(--emerald); color: #f6f3e8; }

/* ---------- novels catalog ---------- */
.filterbar {
  position: sticky; top: 64px; z-index: 60; margin: 18px 0 26px;
  background: color-mix(in srgb, var(--card) 92%, transparent);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; box-shadow: var(--shadow);
}
.search-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.search-box { position: relative; flex: 1 1 260px; }
.search-box input {
  width: 100%; padding: 10px 42px 10px 16px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--paper); color: var(--ink); font-family: var(--serif); font-size: 15.5px; outline: none;
  transition: border .25s, box-shadow .25s;
}
.search-box input:focus { border-color: var(--emerald); box-shadow: 0 0 0 3px rgba(29,107,82,.14); }
.search-box .s-ico { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--ink-faint); }
.search-box kbd {
  position: absolute; right: 40px; top: 50%; transform: translateY(-50%);
  font-family: var(--mono); font-size: 11px; color: var(--ink-faint); border: 1px solid var(--line);
  border-radius: 5px; padding: 0 5px; background: var(--card);
}
.filter-groups { display: flex; flex-wrap: wrap; gap: 10px 18px; margin-top: 12px; align-items: center; }
.fg { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.fg > label { font-size: 12.5px; letter-spacing: .2em; color: var(--ink-faint); }
select.mini {
  font-family: var(--serif); font-size: 13.5px; color: var(--ink-soft); background: var(--paper);
  border: 1px solid var(--line); border-radius: 8px; padding: 4px 8px; outline: none;
}
.result-meta { display: flex; align-items: center; gap: 14px; margin: 4px 2px 18px; color: var(--ink-faint); font-size: 13.5px; letter-spacing: .08em; }
.result-meta b { color: var(--emerald); font-size: 17px; font-family: var(--latin); }
.linklike { cursor: pointer; text-decoration: underline dotted; text-underline-offset: 3px; }

.novel-list { display: grid; gap: 14px; }
.novel-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 13px;
  padding: 18px 22px 15px; box-shadow: var(--shadow); display: grid;
  grid-template-columns: 52px 1fr auto; gap: 16px; align-items: start;
  transition: transform .3s, box-shadow .3s, border-color .3s;
}
.novel-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); border-color: var(--gold-soft); }
.novel-no {
  font-family: var(--latin); font-size: 21px; color: var(--gold); text-align: center;
  border-right: 1px dashed var(--line); padding-right: 14px; line-height: 1.15; padding-top: 3px;
}
.novel-no small { display: block; font-size: 10px; letter-spacing: .2em; color: var(--ink-faint); }
.novel-main { min-width: 0; }
.novel-title { font-size: 18.5px; margin: 0 0 5px; letter-spacing: .03em; }
.novel-title a { color: var(--ink); }
.novel-title a:hover { color: var(--emerald); }
.novel-badges { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 7px; align-items: center; }
.novel-sum { color: var(--ink-soft); font-size: 14px; margin: 0 0 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.novel-meta { font-size: 12.5px; color: var(--ink-faint); letter-spacing: .05em; }
.novel-meta .sep { margin: 0 7px; opacity: .5; }
.novel-side { display: flex; flex-direction: column; gap: 8px; align-items: stretch; justify-content: center; min-width: 118px; }
.read-btn {
  display: inline-flex; justify-content: center; align-items: center; gap: 6px;
  background: var(--emerald); color: #f7f4ea; border-radius: 8px; padding: 8px 14px;
  font-size: 13.5px; letter-spacing: .1em; transition: all .25s; white-space: nowrap;
}
.read-btn:hover { background: var(--emerald-deep); color: #fff; }
.detail-btn { text-align: center; font-size: 12.5px; color: var(--ink-soft); }
.detail-btn:hover { color: var(--gold); }
@media (max-width: 720px) {
  .novel-card { grid-template-columns: 44px 1fr; }
  .novel-side { grid-column: 1 / -1; flex-direction: row; justify-content: flex-end; }
}

/* ---------- novel detail ---------- */
.detail-wrap { max-width: 860px; margin: 0 auto; }
.crumbs { font-size: 13px; color: var(--ink-faint); letter-spacing: .1em; margin: 26px 0 18px; }
.crumbs a { color: var(--ink-soft); } .crumbs a:hover { color: var(--emerald); }
.detail-head { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.detail-head h1 { font-size: clamp(24px, 4vw, 34px); margin: 0; }
.ofuda {
  background: var(--card); border: 1px solid var(--gold-soft); border-radius: 10px;
  padding: 28px 26px; margin: 24px 0; position: relative;
  box-shadow: var(--shadow);
}
.ofuda::before {
  content: "提 要"; position: absolute; top: -12px; left: 22px; background: var(--vermilion);
  color: #fdf8ec; font-size: 12px; letter-spacing: .4em; padding: 3px 12px 3px 15px; border-radius: 4px;
  writing-mode: horizontal-tb;
}
.ofuda p { margin: 0; font-size: 16.5px; }
.ofuda .note { margin-top: 14px; padding-top: 13px; border-top: 1px dashed var(--line); color: var(--ink-soft); font-size: 14px; }
.meta-table { width: 100%; border-collapse: collapse; margin: 8px 0 26px; font-size: 14.5px; }
.meta-table th { text-align: left; color: var(--ink-faint); font-weight: 400; letter-spacing: .2em; white-space: nowrap; padding: 9px 18px 9px 0; vertical-align: top; }
.meta-table td { padding: 9px 0; border-bottom: 1px dashed var(--line); }
.pn-nav { display: flex; justify-content: space-between; gap: 14px; margin-top: 40px; }
.pn-nav a {
  flex: 1; background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 14px 18px; font-size: 14px; color: var(--ink-soft); transition: all .25s; min-width: 0;
}
.pn-nav a:hover { border-color: var(--emerald); color: var(--emerald); transform: translateY(-2px); }
.pn-nav .dir { display: block; font-size: 11.5px; letter-spacing: .3em; color: var(--gold); margin-bottom: 4px; }
.pn-nav span.t { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pn-nav .next { text-align: right; }

/* ---------- timeline ---------- */
.timeline { position: relative; padding-left: 30px; }
.timeline::before { content: ""; position: absolute; left: 8px; top: 0; bottom: 0; width: 2px; background: linear-gradient(var(--gold), var(--emerald), var(--line)); }
.era { margin: 0 0 44px; position: relative; }
.era-title { display: flex; align-items: baseline; gap: 14px; margin-bottom: 20px; }
.era-title h3 { font-size: 22px; letter-spacing: .14em; margin: 0; color: var(--emerald-deep); }
html[data-theme="moon"] .era-title h3 { color: var(--emerald-glow); }
.era-title .en { font-family: var(--latin); font-style: italic; color: var(--gold); font-size: 13px; letter-spacing: .2em; }
.era-title::before {
  content: ""; position: absolute; left: -30px; top: 6px; width: 18px; height: 18px;
  border-radius: 50%; background: var(--paper); border: 3px solid var(--gold);
  box-shadow: 0 0 0 5px rgba(176,138,62,.15);
}
.event {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 16px 20px 14px; margin-bottom: 13px; box-shadow: var(--shadow);
  transition: transform .3s, border-color .3s;
}
.event:hover { transform: translateX(4px); border-color: var(--gold-soft); }
.event .date { font-family: var(--latin); font-size: 14px; color: var(--gold); letter-spacing: .08em; }
.event h4 { margin: 2px 0 6px; font-size: 16.5px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.event p { margin: 0; color: var(--ink-soft); font-size: 14px; }
.event .src { margin-top: 7px; font-size: 11.5px; color: var(--ink-soft); letter-spacing: .06em; opacity: .85; }
.star { color: var(--gold); }

/* ---------- link cards ---------- */
.linkcard {
  display: flex; gap: 16px; align-items: flex-start; background: var(--card);
  border: 1px solid var(--line); border-radius: 13px; padding: 18px 20px;
  box-shadow: var(--shadow); transition: all .3s; position: relative;
}
.linkcard:hover { transform: translateY(-3px); border-color: var(--gold-soft); box-shadow: var(--shadow-lift); }
.linkcard .lc-ico {
  flex: none; width: 44px; height: 44px; border-radius: 11px; display: grid; place-items: center;
  background: linear-gradient(135deg, rgba(29,107,82,.14), rgba(176,138,62,.14));
  border: 1px solid var(--line); font-size: 20px;
}
.linkcard h3 { font-size: 16.5px; margin: 0 0 3px; }
.linkcard h3 .lang-tag { font-size: 11px; vertical-align: 2px; margin-left: 8px; color: var(--gold); font-family: var(--latin); letter-spacing: .12em; }
.linkcard p { margin: 0; font-size: 13.5px; color: var(--ink-soft); }
.linkcard .go { position: absolute; top: 16px; right: 18px; color: var(--ink-faint); font-size: 13px; transition: all .3s; }
.linkcard:hover .go { color: var(--emerald); transform: translate(2px,-2px); }
.group-block { margin-bottom: 46px; }
.group-head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 6px; }
.group-head h3 { font-size: 21px; margin: 0; letter-spacing: .1em; }
.group-head .en { font-family: var(--latin); font-style: italic; color: var(--gold); font-size: 13px; letter-spacing: .16em; }
.group-desc { color: var(--ink-soft); font-size: 14px; margin: 0 0 18px; max-width: 760px; }

/* ---------- video cards ---------- */
.videocard { position: relative; }
.videocard .cat-tag {
  position: absolute; top: 14px; right: 14px; font-size: 11.5px; letter-spacing: .14em;
  background: rgba(29,107,82,.1); color: var(--emerald); border: 1px solid color-mix(in srgb, var(--emerald) 35%, transparent);
  padding: 2px 10px; border-radius: 999px;
}
.videocard .year { font-family: var(--latin); font-size: 13px; color: var(--gold); letter-spacing: .1em; }
.videocard h3 { font-size: 17px; margin: 4px 0 4px; padding-right: 70px; }
.videocard .circle { font-size: 12.5px; color: var(--ink-faint); margin-bottom: 8px; }
.videocard .vlinks { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.vlinks a {
  font-size: 12.5px; border: 1px solid var(--line); border-radius: 999px; padding: 3.5px 12px;
  color: var(--ink-soft); transition: all .22s;
}
.vlinks a:hover { border-color: var(--emerald); color: var(--emerald); background: rgba(29,107,82,.06); }

/* ---------- gallery ---------- */
.g-platform {
  display: grid; grid-template-columns: 56px 1fr auto; gap: 16px; align-items: center;
}
.g-platform .count { font-family: var(--latin); color: var(--emerald); font-size: 15px; text-align: right; }
.g-note {
  background: color-mix(in srgb, var(--gold) 8%, var(--card)); border: 1px dashed var(--gold-soft);
  border-radius: 12px; padding: 14px 18px; font-size: 13.5px; color: var(--ink-soft); margin: 22px 0;
}
.artists { display: flex; flex-wrap: wrap; gap: 10px; }
.artists a {
  border: 1px solid var(--line); background: var(--card); border-radius: 999px;
  padding: 6px 16px; font-size: 14px; color: var(--ink-soft); transition: all .25s;
}
.artists a:hover { color: var(--emerald); border-color: var(--emerald); transform: translateY(-2px); }

/* ---------- footer ---------- */
footer { margin-top: 60px; border-top: 1px solid var(--line); background: var(--paper-2); }
.foot-inner { max-width: 1180px; margin: 0 auto; padding: 44px clamp(18px,4vw,44px) 30px; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 30px; }
@media (max-width: 800px) { .foot-grid { grid-template-columns: 1fr; } }
.foot-grid h4 { font-size: 14px; letter-spacing: .3em; color: var(--ink-faint); margin-bottom: 12px; }
.foot-grid a { display: block; color: var(--ink-soft); font-size: 14px; padding: 3px 0; }
.foot-grid a:hover { color: var(--emerald); }
.foot-legal { margin-top: 34px; padding-top: 18px; border-top: 1px dashed var(--line); font-size: 12.5px; color: var(--ink-faint); display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; }

/* ---------- omikuji ---------- */
.omikuji-modal {
  position: fixed; inset: 0; z-index: 200; display: none; place-items: center;
  background: rgba(20,30,25,.55); backdrop-filter: blur(6px); padding: 20px;
}
.omikuji-modal.open { display: grid; }
.omikuji-card {
  background: var(--card); border-radius: 16px; border: 1px solid var(--gold-soft);
  max-width: 420px; width: 100%; padding: 38px 34px 30px; text-align: center; position: relative;
  box-shadow: 0 30px 80px -20px rgba(0,0,0,.4); animation: omikuji-in .5s cubic-bezier(.2,.9,.3,1.2);
}
@keyframes omikuji-in { from { transform: translateY(30px) rotate(4deg); opacity: 0; } }
.omikuji-card .no { font-family: var(--latin); color: var(--gold); letter-spacing: .2em; font-size: 13px; }
.omikuji-card .kuji { font-size: 42px; margin: 12px 0 4px; color: var(--vermilion); letter-spacing: .1em; }
.omikuji-card .msg { color: var(--ink-soft); font-size: 15px; margin: 10px 0 18px; }
.omikuji-card .lucky { font-size: 13.5px; color: var(--ink-soft); border-top: 1px dashed var(--line); padding-top: 14px; }
.omikuji-card .lucky b { color: var(--emerald); font-weight: 400; }
.omikuji-card button { margin-top: 20px; }

/* ---------- reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.8,.2,1); }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- misc ---------- */
.hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 3; }
@media (max-width: 900px) {
  .nav-links {
    display: none; position: absolute; top: 66px; right: 14px;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--card); border: 1px solid var(--line); border-radius: 14px;
    padding: 10px; box-shadow: var(--shadow-lift); min-width: 170px;
  }
  .nav-links.open-menu { display: flex; }
  .nav-links a { padding: 10px 14px; border-radius: 9px; }
  .nav-links a .en { display: none; }
  #menuBtn { display: grid !important; margin-left: auto; }
  .brand small { display: none; }
  .hero-stats { gap: 22px; }
}
@media (max-width: 1240px) and (min-width: 901px) {
  .nav-links a { padding: 7px 8px; font-size: 14px; }
  .brand small { display: none; }
}
@media (min-width: 1241px) {
  .brand small { text-transform: uppercase; letter-spacing: .18em; font-size: 10px; }
}
.notice { font-size: 13px; color: var(--ink-faint); }
.hr-flower {
  border: none; height: 26px; margin: 30px 0; position: relative;
}
.hr-flower::before {
  content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px;
  background: linear-gradient(90deg, transparent, var(--line) 20%, var(--line) 80%, transparent);
}
.hr-flower::after {
  content: "❖"; position: absolute; left: 50%; top: 50%; transform: translate(-50%,-54%);
  color: var(--gold); background: var(--paper); padding: 0 14px; font-size: 12px; line-height: 26px;
}
.legend-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (max-width: 700px) { .legend-grid { grid-template-columns: 1fr; } }
.legend-item { display: flex; gap: 12px; align-items: baseline; }
.legend-item b { font-family: var(--latin); color: var(--emerald); font-size: 18px; flex: none; width: 20px; }
.eyebrow { font-size: 12px; letter-spacing: .42em; color: var(--gold); margin-bottom: 10px; }
.lead { font-size: 17px; }
.featured-list { display: grid; gap: 14px; }
.feat { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: baseline; }
.feat .no { font-family: var(--latin); color: var(--gold); font-size: 15px; }
.feat a { color: var(--ink); border-bottom: 1px dotted var(--gold-soft); }
.feat a:hover { color: var(--emerald); }
.feat .why { color: var(--ink-faint); font-size: 13.5px; }
