:root {
  --ink: #0b0a0d; --paper: #efe6d6; --hanko: #c8102e; --spot: #3a3f9e;
  --serif: "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif JP", "Noto Serif KR", "Noto Serif Thai", Georgia, serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--ink); color: var(--paper); font-family: var(--serif); }
body { min-height: 100dvh; display: flex; flex-direction: column; }
main { flex: 1; width: 100%; max-width: 520px; margin: 0 auto; padding: 32px 16px 24px; text-align: center; }
section[hidden] { display: none !important; }
h1 { font-size: clamp(24px, 7vw, 32px); font-weight: 600; letter-spacing: .06em; margin: 8px 0 8px; }
h2 { font-size: 22px; font-weight: 600; margin: 8px 0 16px; }
.sub { opacity: .8; margin: 0 0 28px; }

.stamp { width: 128px; height: 128px; margin: 12px auto 22px; border: 6px solid var(--hanko); border-radius: 14px;
  display: grid; place-items: center; color: var(--hanko); font-size: 86px; font-weight: 700; transform: rotate(-6deg); }
.stamp.slam { animation: slam .45s cubic-bezier(.2, 1.6, .4, 1) both; }
@keyframes slam { from { transform: scale(2.6) rotate(-6deg); opacity: 0 } to { transform: scale(1) rotate(-6deg); opacity: 1 } }

.drop { display: block; border: 2px dashed rgba(239,230,214,.45); border-radius: 18px; padding: 34px 18px; cursor: pointer;
  background: radial-gradient(circle at 50% 0, rgba(200,16,46,.14), transparent 70%); transition: border-color .2s; }
.drop:hover, .drop:focus-within { border-color: var(--hanko); }
.drop-title { display: block; font-size: 19px; font-weight: 600; margin-bottom: 10px; }
.drop-note { display: block; font-size: 13px; opacity: .7; line-height: 1.6; }

button { font: inherit; color: inherit; cursor: pointer; min-height: 44px; }
.primary { background: var(--hanko); color: #fff; border: 0; border-radius: 999px; padding: 12px 28px; font-weight: 600; font-size: 17px; }
.link { background: none; border: 0; text-decoration: underline; opacity: .8; margin-top: 18px; }
.actions button:not(.primary):not(.link) { background: none; border: 1px solid rgba(239,230,214,.5); border-radius: 999px; padding: 10px 22px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 18px 0 8px; }

.ink { width: 100%; max-height: 62dvh; aspect-ratio: 9/16; object-fit: cover; border-radius: 16px; background: #000; }
.reading { margin: 18px 0 10px; opacity: .85; }
.bar { height: 3px; background: rgba(239,230,214,.15); border-radius: 3px; overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: var(--hanko); transition: width .3s; }

.picks { display: grid; gap: 10px; margin-bottom: 22px; text-align: left; }
.pick { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px;
  border: 1px solid rgba(239,230,214,.25); border-radius: 12px; }
.pick select { background: var(--ink); color: var(--paper); border: 1px solid rgba(239,230,214,.4); border-radius: 8px; padding: 8px; font: inherit; }
.note { opacity: .8; font-size: 14px; }

.yname { font-size: clamp(26px, 8vw, 36px); margin: 4px 0 0; color: var(--paper); text-shadow: 0 0 24px var(--spot); }
.ate { margin: 4px 0 18px; opacity: .8; }
.tabs { display: flex; gap: 6px; justify-content: center; margin-bottom: 14px; }
.tabs button { background: none; border: 1px solid rgba(239,230,214,.3); border-radius: 999px; padding: 6px 18px; }
.tabs button[aria-selected="true"] { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.frame { display: flex; justify-content: center; }
.card { width: 100%; max-width: 420px; height: auto; border-radius: 10px; box-shadow: 0 20px 60px rgba(0,0,0,.6), 0 0 80px color-mix(in srgb, var(--spot) 35%, transparent); }
.limits { margin-top: 14px; }
.limits p { margin: 0 0 8px; opacity: .85; }
.limits button { width: 64px; margin: 0 4px; background: none; border: 1px solid rgba(239,230,214,.4); border-radius: 12px; }
.limits button[aria-pressed="true"] { border-color: var(--hanko); color: var(--hanko); font-weight: 700; }
.doors { display: grid; gap: 8px; margin-top: 18px; }
.doors a { color: var(--paper); opacity: .85; font-size: 14px; }

footer { max-width: 520px; margin: 0 auto; padding: 18px 16px 28px; text-align: center; font-size: 12px; opacity: .65; line-height: 1.6; }
footer p { margin: 4px 0; }

@media (prefers-reduced-motion: reduce) { .stamp.slam { animation: none } }

/* ── the parade box on the result ───────────────────────────────────────── */
.parade-box { margin: 22px auto 0; padding: 16px; border: 1px solid rgba(239,230,214,.18); border-radius: 16px; display: grid; gap: 10px; }
.parade-box input { font: inherit; padding: 12px 14px; border-radius: 12px; border: 1px solid rgba(239,230,214,.35); background: rgba(255,255,255,.04); color: var(--paper); text-align: center; }
.primary.ghost { background: none; border: 1.5px solid var(--hanko); color: var(--paper); }
.note.small { font-size: 12px; opacity: .6; margin: 0; }
.btn { display: inline-block; color: var(--paper); border: 1px solid rgba(239,230,214,.5); border-radius: 999px; padding: 12px 22px; text-decoration: none; }

/* ── 百鬼夜行 page ─────────────────────────────────────────────────────── */
.parade-page main { max-width: none; padding-left: 0; padding-right: 0; }
.parade-page h1, .parade-page .sub, .parade-page .actions, .parade-page .note { padding: 0 16px; }
.scroll { overflow-x: auto; overflow-y: hidden; width: 100%; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.scroll::-webkit-scrollbar { display: none; }
.road { position: relative; height: min(56dvh, 420px); aspect-ratio: 2106 / 747; background: url(/art/parade.webp?v=1) center / cover no-repeat; }
.walker { position: absolute; bottom: 12%; width: 11.5%; margin: 0; text-align: center; mix-blend-mode: screen; animation: bob 1.1s ease-in-out infinite; animation-delay: calc(var(--i) * -0.17s); }
.walker.empty { mix-blend-mode: normal; }
.walker img { width: 100%; height: auto; display: block; filter: brightness(1.35) contrast(1.15) saturate(1.1); }
.walker figcaption { font-size: 13px; margin-top: -10px; color: #fff; color: var(--paper); text-shadow: 0 1px 6px #000; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.walker.empty .slot { display: grid; place-items: center; width: 62%; aspect-ratio: 1; margin: 0 auto 30%; border-radius: 50%;
  border: 1.5px dashed rgba(239,230,214,.45); color: rgba(239,230,214,.75); font-size: clamp(16px, 4vw, 26px);
  background: radial-gradient(circle, rgba(232,179,58,.22), transparent 70%); }
.walker.empty { animation: none; }
@keyframes bob { 0%, 100% { transform: translateY(0) } 50% { transform: translateY(-4%) } }
@media (prefers-reduced-motion: reduce) { .walker { animation: none } }

/* ── /y/<yokai> share landing ─────────────────────────────────────────── */
.yokai-page .yokai-art { width: min(100%, 420px); height: auto; border-radius: 18px; box-shadow: 0 0 80px color-mix(in srgb, var(--spot) 45%, transparent); }
.yokai-page h1 { font-size: clamp(34px, 10vw, 48px); margin: 18px 0 0; text-shadow: 0 0 24px var(--spot); }
.yokai-page .en-name { margin: 2px 0 14px; opacity: .75; font-family: Georgia, serif; font-style: italic; }
.yokai-page .lore { line-height: 1.8; opacity: .9; max-width: 34em; margin: 8px auto; }
.yokai-page .actions a.primary { text-decoration: none; display: inline-block; }

.parade-page .btn { font-size: 15px; max-width: 92vw; }

.nametag { position: absolute; bottom: 6%; width: 11.5%; text-align: center; font-size: 14px; font-weight: 600; color: #fff;
  text-shadow: 0 0 4px #000, 0 1px 8px #000; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.code-chip { margin: 6px auto 0; padding: 8px 14px; border: 1px dashed rgba(232,179,58,.6); border-radius: 10px; font-size: 13px; color: #e8b33a; letter-spacing: .04em; }
