/* 星読みの館 — midnight indigo, antique gold rules, serif type; stages turn the stars into lenses and the gold toward rust */
:root {
  --night: #060a1c;
  --indigo: #0c1435;
  --indigo-2: #121c48;
  --indigo-3: #1a2660;
  --gold: #c9a961;
  --gold-hi: #ecd9a4;
  --gold-dim: #7f6b42;
  --ink: #e8e1cc;
  --muted: #a39d8b;
  --line: rgba(201, 169, 97, .38);
  --line-soft: rgba(201, 169, 97, .18);
  --rust: #c4553b;
  --rust-soft: rgba(196, 85, 59, .14);
  --f-ja: "Zen Old Mincho", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --f-head: "Shippori Antique", "Zen Old Mincho", serif;
  --f-en: "Cinzel", "Times New Roman", serif;
  --f-it: "Cormorant Garamond", "Times New Roman", serif;
  --f-hand: "Yomogi", cursive;
  color-scheme: dark;
}
html[data-stage="2"], html[data-stage="3"], html[data-stage="4"] { --gold: #c39a5c; --line: rgba(195, 150, 92, .4); }
html[data-stage="3"], html[data-stage="4"] { --gold: #c08a58; --gold-hi: #e9cfa2; --night: #070818; }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; overflow-x: hidden; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }
body {
  margin: 0; min-height: 100vh; overflow-x: hidden;
  background: radial-gradient(1200px 700px at 80% -10%, #1b2a6b55, transparent 60%), radial-gradient(900px 600px at 0% 30%, #2a1d5233, transparent 60%), var(--night);
  color: var(--ink); font-family: var(--f-ja); font-size: 16px; line-height: 1.95; letter-spacing: .02em;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold-hi); text-decoration-color: var(--gold-dim); text-underline-offset: 3px; }
a:hover { color: #fff; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 1px solid var(--gold-hi); outline-offset: 3px; }
.container { max-width: 1120px; margin: 0 auto; padding-left: max(18px, env(safe-area-inset-left, 0px)); padding-right: max(18px, env(safe-area-inset-right, 0px)); position: relative; }
.nb { white-space: nowrap; }
.en { font-family: var(--f-en); letter-spacing: .12em; }
.it { font-family: var(--f-it); font-style: italic; }
.rust { color: var(--rust); }
main { position: relative; z-index: 1; }

/* stage visibility helpers */
html[data-stage="0"] :is(.from-1, .from-2, .from-3, .from-4),
html[data-stage="1"] :is(.from-2, .from-3, .from-4),
html[data-stage="2"] :is(.from-3, .from-4),
html[data-stage="3"] .from-4,
html:is([data-stage="1"], [data-stage="2"], [data-stage="3"], [data-stage="4"]) .until-1,
html:is([data-stage="2"], [data-stage="3"], [data-stage="4"]) .until-2,
html:is([data-stage="3"], [data-stage="4"]) .until-3 { display: none !important; }

/* ---------- star field ---------- */
.sky { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.sky svg { width: 100%; height: 100%; }
.sky .st { animation: twinkle var(--d, 6s) ease-in-out var(--dl, 0s) infinite; transform-box: fill-box; transform-origin: center; }
.sky .st .lens { display: none; }
.sky .st.lens .spark { display: none; }
.sky .st.lens .lens { display: inline; }
.sky .st.lens { animation: none; opacity: .75; }
@keyframes twinkle { 0%, 100% { opacity: .9; } 50% { opacity: .18; } }

/* ---------- top bar & header ---------- */
.topbar { position: relative; z-index: 2; border-bottom: 1px solid var(--line-soft); font-size: 12.5px; color: var(--muted); }
.topbar .container { display: flex; gap: 16px; align-items: center; min-height: 34px; flex-wrap: wrap; }
.topbar .moon { display: inline-flex; gap: 8px; align-items: center; }
.topbar .moon svg { width: 14px; height: 14px; }
.topbar .ticker { margin-left: auto; color: var(--rust); letter-spacing: .08em; animation: flick 4s steps(1) infinite; }
@keyframes flick { 0%, 90%, 100% { opacity: 1; } 91% { opacity: .2; } 93% { opacity: .9; } 95% { opacity: .1; } }

.site-header { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--night) 82%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.site-header::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 1px; background: var(--line-soft); }
.site-header .container { display: flex; align-items: center; gap: 22px; min-height: 72px; }
.logo { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.logo svg { width: 40px; height: 40px; flex: none; }
.logo .word { display: grid; line-height: 1.35; gap: 2px; }
.logo .word b { font-family: var(--f-head); font-weight: 400; font-size: 22px; letter-spacing: .14em; color: var(--gold-hi); }
.logo .word small { font-family: var(--f-en); font-size: 9.5px; letter-spacing: .32em; color: var(--muted); }
.nav { display: flex; gap: 20px; margin-left: auto; font-size: 14px; }
.nav a { text-decoration: none; color: var(--ink); padding: 6px 0; position: relative; white-space: nowrap; }
.nav a::after { content: ""; position: absolute; left: 50%; right: 50%; bottom: 0; height: 1px; background: var(--gold); transition: left .3s, right .3s; }
.nav a:hover::after, .nav a[aria-current="page"]::after { left: 0; right: 0; }
.menu-btn { display: none; background: none; border: 1px solid var(--line); width: 44px; height: 40px; cursor: pointer; padding: 0; }
.menu-btn span { display: block; width: 18px; height: 1px; background: var(--gold-hi); margin: 5px auto; }

/* ---------- ornaments ---------- */
.frame { position: relative; border: 1px solid var(--line); background: linear-gradient(180deg, rgba(18, 28, 72, .72), rgba(10, 16, 44, .78)); padding: 30px; }
.frame::before { content: ""; position: absolute; inset: 6px; border: 1px solid var(--line-soft); pointer-events: none; }
.frame > .c { position: absolute; width: 22px; height: 22px; pointer-events: none; background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 22' fill='none' stroke='%23c9a961' stroke-width='1'%3E%3Cpath d='M1 21V7Q1 1 7 1h14'/%3E%3Cpath d='M5 21V9q0-4 4-4h12'/%3E%3Ccircle cx='9' cy='9' r='1.6' fill='%23c9a961'/%3E%3C/svg%3E"); }
.frame > .c.tl { left: -1px; top: -1px; }
.frame > .c.tr { right: -1px; top: -1px; transform: scaleX(-1); }
.frame > .c.bl { left: -1px; bottom: -1px; transform: scaleY(-1); }
.frame > .c.br { right: -1px; bottom: -1px; transform: scale(-1); }

.divider { display: flex; align-items: center; gap: 14px; color: var(--gold); margin: 0 auto; max-width: 360px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--gold)); }
.divider::after { background: linear-gradient(90deg, var(--gold), transparent); }
.divider svg { width: 18px; height: 18px; flex: none; }

.sec { padding: 96px 0; position: relative; }
.sec-head { text-align: center; margin-bottom: 48px; }
.eyebrow { font-family: var(--f-en); font-size: 12px; letter-spacing: .4em; color: var(--gold); display: block; margin-bottom: 10px; }
.sec-head h2 { font-family: var(--f-head); font-weight: 400; font-size: clamp(26px, 3.6vw, 38px); letter-spacing: .16em; margin: 0 0 16px; color: #f4ecd6; }
.sec-head p { max-width: 38em; margin: 18px auto 0; color: var(--muted); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 50px; padding: 0 30px; border: 1px solid var(--gold); background: transparent; color: var(--gold-hi); text-decoration: none; font-family: var(--f-head); letter-spacing: .2em; font-size: 15px; cursor: pointer; position: relative; transition: background .3s, color .3s; }
.btn::before { content: ""; position: absolute; inset: 3px; border: 1px solid var(--line-soft); pointer-events: none; }
.btn:hover { background: rgba(201, 169, 97, .12); color: #fff; }
.btn.solid { background: linear-gradient(180deg, #d8bc79, #a8864a); color: #12122a; border-color: #e7d29b; }
.btn.solid::before { border-color: rgba(18, 18, 42, .25); }
.btn.solid:hover { background: linear-gradient(180deg, #e8cf90, #b8955a); color: #000; }
.btn.rust { border-color: var(--rust); color: #f1b9a8; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }

/* ---------- hero ---------- */
.hero { padding: 64px 0 40px; }
.hero .hero-grid { display: grid; grid-template-columns: 1fr 1.08fr; gap: 56px; align-items: center; }
.hero h1 { font-family: var(--f-head); font-weight: 400; font-size: clamp(40px, 6vw, 72px); letter-spacing: .2em; line-height: 1.25; margin: 10px 0 6px; color: #f6eedb; text-shadow: 0 0 30px rgba(236, 217, 164, .25); }
.hero .roman { font-family: var(--f-en); letter-spacing: .5em; font-size: 12px; color: var(--gold); }
.hero .tag { font-family: var(--f-head); font-size: clamp(18px, 2.2vw, 24px); letter-spacing: .18em; color: var(--gold-hi); margin: 18px 0 14px; }
.hero .lead { color: var(--muted); max-width: 30em; }
.hero .cta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 28px; }
.hero-photo { position: relative; padding: 10px; border: 1px solid var(--line); }
.hero-photo::after { content: ""; position: absolute; inset: 4px; border: 1px solid var(--line-soft); pointer-events: none; }
.hero-photo img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; filter: saturate(.92); }
.hero-photo .rec { position: absolute; right: 22px; top: 20px; font-family: var(--f-en); font-size: 11px; letter-spacing: .2em; color: #fff; background: rgba(0, 0, 0, .55); padding: 3px 10px; display: flex; gap: 8px; align-items: center; }
.hero-photo .rec::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #e3372b; animation: flick 1.4s steps(1) infinite; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 56px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stat { padding: 20px 10px; text-align: center; position: relative; }
.stat + .stat::before { content: "✦"; position: absolute; left: -7px; top: 50%; transform: translateY(-50%); color: var(--gold); font-size: 11px; }
.stat .k { font-size: 12.5px; color: var(--muted); letter-spacing: .14em; }
.stat .v { font-family: var(--f-en); font-size: 30px; color: var(--gold-hi); letter-spacing: .06em; line-height: 1.4; }
.stat .v small { font-family: var(--f-ja); font-size: 13px; margin-left: 4px; color: var(--ink); }

/* ---------- news ---------- */
.news { list-style: none; margin: 0 auto; padding: 0; max-width: 820px; border-top: 1px solid var(--line-soft); }
.news li { display: grid; grid-template-columns: 110px 96px 1fr; gap: 14px; padding: 16px 6px; border-bottom: 1px solid var(--line-soft); align-items: baseline; font-size: 15px; }
.news time { font-family: var(--f-en); font-size: 13px; color: var(--muted); letter-spacing: .08em; }
.news .tagk { font-size: 11.5px; border: 1px solid var(--line); text-align: center; color: var(--gold); padding: 0 6px; }
.news li.new .tagk { border-color: var(--rust); color: var(--rust); }

/* ---------- fortune ---------- */
.fortune-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: start; }
.f-form h3, .history h3 { font-family: var(--f-head); font-weight: 400; letter-spacing: .14em; margin: 0 0 6px; font-size: 21px; color: var(--gold-hi); }
.f-form .sub { color: var(--muted); font-size: 14px; margin: 0 0 22px; }
.field { display: grid; gap: 8px; margin-bottom: 18px; }
.field > label, .field > .lb { font-size: 13.5px; letter-spacing: .14em; color: var(--gold); }
.inp, select.inp, textarea.inp { width: 100%; min-height: 48px; background: rgba(6, 10, 28, .6); border: 1px solid var(--line); border-radius: 0; padding: 10px 14px; color: var(--ink); font-size: 16px; }
select.inp { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--gold) 50%), linear-gradient(135deg, var(--gold) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 30px; }
select.inp option { background: var(--indigo); }
.inp:focus { outline: none; border-color: var(--gold-hi); box-shadow: 0 0 0 3px rgba(201, 169, 97, .15); }
.dob { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 10px; }
.err { color: #f0a08c; font-size: 14px; min-height: 1.6em; margin: 4px 0 10px; }
.f-note { font-size: 13px; color: var(--muted); margin: 14px 0 0; }
.f-note.red { color: #eaa08b; }

.result { margin-top: 28px; }
.result .r-head { display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: center; border-bottom: 1px solid var(--line-soft); padding-bottom: 20px; margin-bottom: 20px; }
.rank { width: 128px; aspect-ratio: 7 / 12; display: grid; place-items: center; border: 1px solid var(--gold); position: relative; background: radial-gradient(circle at 50% 35%, #26357a, #0b1236 70%); }
.rank::before { content: ""; position: absolute; inset: 5px; border: 1px solid var(--line-soft); }
.rank b { font-family: var(--f-head); font-weight: 400; font-size: 34px; writing-mode: vertical-rl; letter-spacing: .3em; color: var(--gold-hi); text-shadow: 0 0 18px rgba(236, 217, 164, .5); }
.rank.bad { background: radial-gradient(circle at 50% 35%, #3a1f3b, #120a20 70%); border-color: #a5654c; }
.rank.bad b { color: #f0b39c; text-shadow: 0 0 18px rgba(196, 85, 59, .6); }
.rank.born b { font-size: 28px; letter-spacing: .2em; }
.r-meta { display: grid; gap: 4px; }
.r-meta .who { font-family: var(--f-head); font-size: 22px; letter-spacing: .12em; color: #f4ecd6; }
.r-meta .z { font-variant-emoji: text;  color: var(--gold); font-size: 14px; letter-spacing: .1em; }
.r-meta .date { color: var(--muted); font-size: 13px; }
.score { height: 4px; background: rgba(201, 169, 97, .15); margin-top: 8px; position: relative; max-width: 280px; }
.score i { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(90deg, var(--gold-dim), var(--gold-hi)); }
.result .txt p { margin: 0 0 12px; }
.result .event { border-left: 2px solid var(--gold); padding: 6px 0 6px 16px; margin: 16px 0; color: #f3ead2; }
.result .event.bad { border-color: var(--rust); }
.cats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line-soft); border: 1px solid var(--line-soft); margin: 20px 0; }
.cats > div { background: rgba(9, 14, 40, .9); padding: 12px 16px; font-size: 14px; }
.cats .k { display: flex; justify-content: space-between; color: var(--gold); letter-spacing: .12em; font-size: 13px; }
.cats .stars { letter-spacing: .1em; color: var(--gold-hi); }
.cats .stars .off { color: #3d4570; }
.lucky { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.lucky > div { border: 1px solid var(--line-soft); padding: 10px 8px; text-align: center; }
.lucky .k { font-size: 11.5px; color: var(--muted); letter-spacing: .12em; }
.lucky .v { font-family: var(--f-head); color: var(--gold-hi); font-size: 15px; line-height: 1.5; margin-top: 2px; }
.obs { margin-top: 16px; font-size: 13px; color: #e39a86; border-top: 1px dashed rgba(196, 85, 59, .45); padding-top: 10px; }
.avert { margin-top: 18px; padding: 14px 18px; border: 1px solid rgba(196, 85, 59, .55); background: var(--rust-soft); font-size: 14.5px; }
.avert .btn { margin-top: 12px; }

.history { position: sticky; top: 96px; }
.history .sub { color: var(--muted); font-size: 13px; margin: 0 0 16px; }
.history ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.history li { display: grid; grid-template-columns: 52px 1fr; gap: 12px; align-items: center; border-bottom: 1px solid var(--line-soft); padding-bottom: 10px; }
.history .cap { font-family: var(--f-head); font-size: 40px; line-height: 1; color: var(--gold-hi); text-align: center; border: 1px solid var(--line); aspect-ratio: 1; display: grid; place-items: center; text-shadow: 0 0 14px rgba(236, 217, 164, .35); }
.history .it2 { font-size: 14px; line-height: 1.6; }
.history .it2 b { font-weight: 400; color: var(--gold-hi); font-family: var(--f-head); font-size: 16px; }
.history .it2 small { display: block; color: var(--muted); font-size: 12px; }
.history li.empty .cap { color: #2f3766; text-shadow: none; }
.history .done { font-size: 13px; color: var(--muted); margin: 14px 0 0; }
.chart { position: relative; height: 92px; margin: -8px -8px 10px; }
.chart svg { width: 100%; height: 100%; overflow: visible; }
.watcher { cursor: default; }
.watcher .iris, .watcher .lid { display: none; }
.watcher .core { animation: twinkle 5s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.watcher.awake { cursor: pointer; }
.watcher.awake .core { animation: none; }
.watcher.awake .iris, .watcher.awake .lid { display: inline; }
.watcher.awake .glow { animation: pulse 2.6s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: .25; } 50% { opacity: .85; } }

/* ---------- readers (cards in tarot proportion) ---------- */
.readers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.tcard { text-decoration: none; color: var(--ink); display: block; }
.tcard .ph { position: relative; aspect-ratio: 7 / 12; border: 1px solid var(--gold); padding: 8px; background: var(--indigo); }
.tcard .ph::before { content: ""; position: absolute; inset: 4px; border: 1px solid var(--line-soft); z-index: 1; pointer-events: none; }
.tcard .ph img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.9) contrast(1.02); }
.tcard .num { position: absolute; top: 18px; left: 50%; transform: translateX(-50%); z-index: 2; font-family: var(--f-en); color: var(--gold-hi); font-size: 14px; letter-spacing: .2em; background: rgba(6, 10, 28, .72); padding: 2px 12px; border: 1px solid var(--line); }
.tcard .ban { position: absolute; left: 18px; right: 18px; bottom: 18px; z-index: 2; text-align: center; background: rgba(6, 10, 28, .82); border: 1px solid var(--line); padding: 8px 6px; }
.tcard .ban b { display: block; font-family: var(--f-head); font-weight: 400; letter-spacing: .2em; font-size: 20px; color: #f4ecd6; }
.tcard .ban small { font-size: 12px; color: var(--gold); letter-spacing: .12em; }
.tcard p { font-size: 14px; color: var(--muted); margin: 14px 4px 0; }

.menu { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.menu .m { aspect-ratio: 7 / 12; display: flex; flex-direction: column; text-align: center; padding: 26px 18px; }
.menu .m .rn { font-family: var(--f-en); color: var(--gold); letter-spacing: .3em; font-size: 13px; }
.menu .m h3 { font-family: var(--f-head); font-weight: 400; letter-spacing: .2em; font-size: 20px; margin: 12px 0 6px; color: #f4ecd6; }
.menu .m svg { width: 64px; height: 64px; margin: 14px auto; }
.menu .m p { font-size: 13.5px; color: var(--muted); margin: 0; }
.menu .m ul { list-style: none; margin: 14px 0 0; padding: 12px 0 0; border-top: 1px dashed var(--line-soft); font-size: 12.5px; color: #bdb59f; flex: 1; display: grid; align-content: start; gap: 4px; }
.menu .m ul li::before { content: "✦ "; color: var(--gold-dim); }
.menu .m .price { font-family: var(--f-head); color: var(--gold-hi); font-size: 18px; letter-spacing: .08em; border-top: 1px solid var(--line-soft); padding-top: 12px; margin-top: 12px; }
.menu .m .price small { font-size: 12px; color: var(--muted); }

/* ---------- voices ---------- */
.voices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.voice { padding: 24px 24px 20px; }
.voice .stars { color: var(--gold-hi); letter-spacing: .2em; font-size: 13px; }
.voice p { margin: 8px 0 14px; font-size: 15px; }
.voice .who { font-size: 12.5px; color: var(--muted); border-top: 1px solid var(--line-soft); padding-top: 10px; display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.voice.dark { border-color: rgba(196, 85, 59, .5); }

/* ---------- FAQ ---------- */
.faq { max-width: 820px; margin: 0 auto; }
.faq details { border-bottom: 1px solid var(--line-soft); }
.faq summary { list-style: none; cursor: pointer; padding: 18px 40px 18px 4px; position: relative; font-size: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: "Q."; font-family: var(--f-en); color: var(--gold); margin-right: 12px; }
.faq summary::after { content: "+"; position: absolute; right: 10px; top: 14px; font-family: var(--f-en); font-size: 22px; color: var(--gold); transition: transform .3s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .a { padding: 0 4px 20px 34px; color: #cfc8b4; font-size: 15px; }
.faq details.new summary { color: #f0c3b4; }

/* ---------- about ---------- */
.about { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.about .ph { border: 1px solid var(--line); padding: 8px; }
.about .ph img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.about h3 { font-family: var(--f-head); font-weight: 400; letter-spacing: .16em; font-size: 24px; margin: 0 0 18px; color: #f4ecd6; line-height: 1.6; }
.about .sign { text-align: right; font-family: var(--f-head); color: var(--gold); letter-spacing: .2em; margin-top: 18px; }

/* ---------- access map ---------- */
.access { display: grid; grid-template-columns: 2fr 1fr; gap: 30px; align-items: start; }
.access > div { min-width: 0; }
.map-hint { display: none; margin: 8px 0 0; text-align: center; font-size: 12px; color: var(--muted); letter-spacing: .1em; }
@media (max-width: 600px) { .map-hint { display: block; } }
.map-box { padding: 10px; }
.map-scroll { overflow-x: auto; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; }
.map { position: relative; aspect-ratio: 3 / 2; min-width: 560px; background: #0a1030; overflow: hidden; }
.map svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.map .aerial { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.map .road { fill: none; stroke: #d9c48f; stroke-linecap: round; stroke-linejoin: round; opacity: .55; }
.map .road.rail { stroke: #8b8fa8; stroke-dasharray: 14 8; opacity: .7; }
.map .road.avenue { opacity: .75; }
.map .lbl { font-family: "Zen Old Mincho", serif; font-size: 30px; fill: #e8dcb7; paint-order: stroke; stroke: #0a1030; stroke-width: 5px; }
.map .lbl.sm { font-size: 24px; fill: #cfc5a6; }
.pin { cursor: pointer; }
.pin circle.hit { fill: transparent; }
.pin .dot { fill: #0a1030; stroke: var(--gold-hi); stroke-width: 2.5; }
.pin:hover .dot, .pin:focus .dot, .pin.on .dot { fill: var(--gold); }
.pin:focus { outline: none; }
.pin.home .dot { fill: var(--gold); }
.map .const line { stroke: #ffc04a; stroke-width: 7; opacity: .8; filter: drop-shadow(0 0 6px rgba(255, 170, 60, .8)); }
.map .const .s { fill: #fff6d6; }
.map .const .s.red { fill: #ff5a43; }
html[data-stage="2"] .map .road, html[data-stage="3"] .map .road, html[data-stage="4"] .map .road { opacity: .12; }
.pin-info { margin-top: 14px; min-height: 92px; font-size: 14.5px; padding: 16px 18px; }
.pin-info b { font-family: var(--f-head); font-weight: 400; color: var(--gold-hi); letter-spacing: .1em; font-size: 17px; }
.addr dl { display: grid; grid-template-columns: 7.5em 1fr; gap: 10px 14px; margin: 0 0 20px; font-size: 14.5px; }
.addr dt { color: var(--gold); letter-spacing: .1em; }
.addr dd { margin: 0; }
.addr .ph { border: 1px solid var(--line); padding: 6px; }
.addr .ph img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }

/* ---------- CCTV modal ---------- */
.cctv { position: fixed; inset: 0; z-index: 90; background: rgba(0, 0, 0, .88); display: grid; place-items: center; padding: 16px; }
.cctv-box { position: relative; width: min(980px, 100%); aspect-ratio: 4 / 3; max-height: 86vh; overflow: hidden; border: 1px solid #333; background: #000; }
.cctv-box img { width: 100%; height: 100%; object-fit: cover; filter: contrast(1.05) saturate(.6); }
.cctv-box::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(0deg, rgba(0, 0, 0, .18) 0 1px, transparent 1px 3px); }
.osd { position: absolute; left: 0; right: 0; top: 0; display: flex; justify-content: space-between; gap: 10px; padding: 12px 16px; font-family: ui-monospace, Consolas, monospace; font-size: 13px; color: #f5f5f5; text-shadow: 0 1px 2px #000; z-index: 2; flex-wrap: wrap; }
.osd .rec { color: #ff4a3d; }
.osd-tgt { position: absolute; left: 16px; bottom: 60px; z-index: 2; font-family: ui-monospace, Consolas, "Zen Old Mincho", monospace; font-size: 14px; color: #fff; background: rgba(0, 0, 0, .58); border-left: 3px solid #ff4a3d; padding: 10px 14px; line-height: 1.7; max-width: calc(100% - 32px); }
.osd-tgt .hl { color: #ffb3a6; }
.reticle { position: absolute; z-index: 2; border: 2px solid rgba(255, 74, 61, .8); width: 4.6%; aspect-ratio: 1 / 2.2; animation: flick 2.4s steps(1) infinite; }
.cctv-close { position: absolute; right: 14px; bottom: 12px; z-index: 3; background: rgba(0, 0, 0, .7); color: #fff; border: 1px solid #777; padding: 8px 16px; cursor: pointer; font-size: 14px; }

/* ---------- page heads ---------- */
.page-head { padding: 72px 0 24px; text-align: center; }
.page-head h1 { font-family: var(--f-head); font-weight: 400; letter-spacing: .2em; font-size: clamp(30px, 4.6vw, 46px); margin: 6px 0 16px; color: #f6eedb; }
.page-head p { color: var(--muted); max-width: 36em; margin: 16px auto 0; }
.crumb { font-size: 12.5px; color: var(--muted); display: flex; justify-content: center; gap: 8px; margin-bottom: 18px; }
.crumb a { color: var(--muted); }

/* ---------- reader profiles ---------- */
.profile { display: grid; grid-template-columns: 300px 1fr; gap: 44px; margin-bottom: 56px; scroll-margin-top: 100px; }
.profile h2 { font-family: var(--f-head); font-weight: 400; font-size: 32px; letter-spacing: .2em; margin: 0; color: #f6eedb; }
.profile .kana { font-family: var(--f-en); color: var(--gold); letter-spacing: .3em; font-size: 12px; }
.profile .spec { color: var(--gold-hi); margin: 6px 0 18px; letter-spacing: .1em; }
.profile dl { display: grid; grid-template-columns: 7em 1fr; gap: 8px 14px; font-size: 14.5px; margin: 18px 0 0; }
.profile dt { color: var(--gold); letter-spacing: .1em; }
.profile dd { margin: 0; }
.guard { display: grid; grid-template-columns: 220px 1fr; gap: 22px; align-items: center; margin-top: 22px; padding: 18px; }
.guard .sky-card { aspect-ratio: 1; position: relative; background: radial-gradient(circle at 50% 40%, #1a2766, #070c25 75%); border: 1px solid var(--line); overflow: hidden; }
.guard .sky-card svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.guard .sky-card line { stroke: var(--gold-hi); stroke-width: 1.2; opacity: .75; }
.guard .sky-card .s { fill: #fff8e0; }
.guard .sky-card .s.red { fill: #ff5a43; }
.guard h4 { margin: 0 0 6px; font-family: var(--f-head); font-weight: 400; letter-spacing: .14em; color: var(--gold-hi); font-size: 18px; }
.guard p { margin: 0 0 8px; font-size: 14px; color: #cfc8b4; }
.note-card { margin-top: 18px; border: 1px solid var(--line-soft); padding: 6px; max-width: 460px; }
.note-card img { width: 100%; }

/* ---------- tarot ---------- */
.draw { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; perspective: 1400px; }
.tc { width: 128px; aspect-ratio: 7 / 12; position: relative; cursor: pointer; border: 0; padding: 0; background: none; transition: transform .45s; transform-style: preserve-3d; }
.tc:hover { transform: translateY(-8px); }
.tc .face, .tc .back { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; overflow: hidden; box-shadow: 0 12px 30px rgba(0, 0, 0, .5); }
.tc img { width: 100%; height: 100%; object-fit: cover; }
.tc .face { transform: rotateY(180deg); }
.tc.flip { transform: rotateY(180deg); cursor: default; }
.tc.flip.rev .face img { transform: rotate(180deg); }
.tc.dim { opacity: .3; pointer-events: none; }
.reading { max-width: 760px; margin: 36px auto 0; display: grid; grid-template-columns: 200px 1fr; gap: 28px; align-items: start; }
.reading .big { aspect-ratio: 7 / 12; overflow: hidden; border: 1px solid var(--line); }
.reading .big img { width: 100%; height: 100%; object-fit: cover; }
.reading .big.rev img { transform: rotate(180deg); }
.reading h3 { font-family: var(--f-head); font-weight: 400; letter-spacing: .14em; color: var(--gold-hi); font-size: 24px; margin: 0 0 4px; }
.reading .pos { font-size: 13px; color: var(--gold); letter-spacing: .14em; }
.deck { display: grid; grid-template-columns: repeat(7, 1fr); gap: 14px; }
.deck figure { margin: 0; }
.deck img { aspect-ratio: 7 / 12; object-fit: cover; width: 100%; border: 1px solid var(--line-soft); }
.deck figcaption { font-size: 12.5px; text-align: center; color: var(--muted); margin-top: 6px; }
.aisho { display: grid; grid-template-columns: 1fr auto 1fr; gap: 20px; align-items: end; }
.aisho .and { font-family: var(--f-en); color: var(--gold); font-size: 28px; padding-bottom: 24px; }
.aisho-res { text-align: center; margin-top: 20px; }
.aisho-res .pct { font-family: var(--f-en); font-size: 64px; color: var(--gold-hi); line-height: 1.1; }

/* ---------- reserve & ritual ---------- */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; }
.radio-row { display: grid; gap: 8px; }
.radio-row label { display: flex; gap: 12px; align-items: center; border: 1px solid var(--line-soft); padding: 10px 14px; cursor: pointer; font-size: 15px; }
.radio-row label:has(input:checked) { border-color: var(--gold); background: rgba(201, 169, 97, .08); }
.radio-row input { accent-color: var(--gold); }
.radio-row small { margin-left: auto; color: var(--gold-hi); font-family: var(--f-head); }
.okbox { border: 1px solid var(--gold); padding: 18px; margin-top: 14px; background: rgba(201, 169, 97, .08); }
.ritual-ph { border: 1px solid var(--line); padding: 8px; }
.ritual-ph img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.tbl th, .tbl td { border-bottom: 1px solid var(--line-soft); padding: 10px 8px; text-align: left; }
.tbl th { color: var(--gold); font-weight: 400; letter-spacing: .1em; font-size: 13px; }
.yen { position: relative; }
.yen .inp { padding-left: 34px; font-size: 20px; font-family: var(--f-head); letter-spacing: .08em; }
.yen::before { content: "¥"; position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--gold); font-size: 18px; }
.need { font-family: var(--f-head); font-size: 26px; color: #f2b8a5; letter-spacing: .08em; }
.ritual-go { position: fixed; inset: 0; z-index: 92; display: grid; place-items: center; background: radial-gradient(circle, #1a0c12, #000 70%); text-align: center; cursor: pointer; padding: 20px; }
.ritual-go p { font-family: var(--f-head); font-size: clamp(20px, 3vw, 30px); letter-spacing: .2em; color: #f2c9b8; margin: 0; }
.ritual-go small { display: block; margin-top: 16px; font-size: 13px; color: #9a8f86; letter-spacing: .2em; }

/* ---------- footer ---------- */
.site-footer { position: relative; z-index: 1; border-top: 1px solid var(--line); margin-top: 40px; padding: 56px 0 28px; font-size: 14px; background: rgba(4, 7, 20, .7); }
.site-footer .container { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 36px; }
.site-footer h4 { font-family: var(--f-en); font-weight: 400; color: var(--gold); letter-spacing: .3em; font-size: 12px; margin: 0 0 14px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; color: var(--muted); }
.site-footer a { color: var(--ink); text-decoration: none; }
.site-footer a:hover { color: var(--gold-hi); }
.site-footer .legal { grid-column: 1 / -1; border-top: 1px solid var(--line-soft); padding-top: 20px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.site-footer .legal button { background: none; border: 1px solid var(--line); color: var(--muted); padding: 4px 14px; cursor: pointer; font-size: 12px; }
.site-footer .obs-line { color: var(--rust); font-size: 13px; margin-top: 10px; }

/* ---------- alteration ---------- */
.alter { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; cursor: pointer; background: #000; }
.alter canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .5; }
.alter .msg { position: relative; text-align: center; color: #fff; font-family: var(--f-head); font-size: clamp(22px, 4vw, 40px); letter-spacing: .14em; text-shadow: 3px 0 #ff3b2a, -3px 0 #3ad6ff; animation: jit .18s steps(2) infinite; padding: 0 16px; }
.alter .msg small { display: block; margin-top: 18px; font-family: var(--f-en); font-size: 12px; letter-spacing: .4em; text-shadow: none; color: #bbb; animation: none; }
@keyframes jit { 0% { transform: translate(0, 0); } 50% { transform: translate(-2px, 1px); } 100% { transform: translate(2px, -1px); } }
html.glitching body { animation: gl .45s steps(3); }
@keyframes gl { 0% { filter: hue-rotate(0) contrast(1); transform: translateX(0); } 33% { filter: hue-rotate(40deg) contrast(1.5); transform: translateX(-6px); } 66% { filter: invert(.1) contrast(1.3); transform: translateX(5px); } 100% { filter: none; transform: none; } }

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; gap: 0; background: var(--night); border-bottom: 1px solid var(--line); padding: 8px 18px 16px; }
  .nav.open { display: flex; }
  .nav a { padding: 12px 4px; border-bottom: 1px solid var(--line-soft); }
  .menu-btn { display: block; margin-left: auto; }
  .hero .hero-grid, .about, .access, .two-col { grid-template-columns: 1fr; }
  .fortune-wrap { grid-template-columns: 1fr; }
  .history { position: static; }
  .menu { grid-template-columns: repeat(2, 1fr); }
  .voices { grid-template-columns: 1fr 1fr; }
  .deck { grid-template-columns: repeat(4, 1fr); }
  .profile { grid-template-columns: 1fr; }
  .profile .tcard { max-width: 300px; }
}
@media (max-width: 640px) {
  body { font-size: 15px; }
  .sec { padding: 68px 0; }
  .frame { padding: 22px 18px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(3)::before { display: none; }
  .readers, .voices { grid-template-columns: 1fr; }
  .readers .tcard { max-width: 320px; margin: 0 auto; width: 100%; }
  .menu { gap: 12px; }
  .menu .m { aspect-ratio: auto; min-height: 330px; padding: 22px 12px; }
  .menu .m h3 { font-size: 17px; letter-spacing: .1em; }
  .news li { grid-template-columns: 1fr auto; gap: 2px 10px; }
  .news li span:last-child { grid-column: 1 / -1; }
  .cats { grid-template-columns: 1fr; }
  .lucky { grid-template-columns: 1fr 1fr; }
  .result .r-head { grid-template-columns: 96px 1fr; gap: 16px; }
  .rank { width: 96px; }
  .rank b { font-size: 26px; }
  .guard { grid-template-columns: 1fr; }
  .guard .sky-card { max-width: 260px; }
  .tc { width: calc((100% - 28px) / 3); max-width: 110px; }
  .reading { grid-template-columns: 1fr; }
  .reading .big { max-width: 180px; }
  .deck { grid-template-columns: repeat(3, 1fr); }
  .aisho { grid-template-columns: 1fr; }
  .aisho .and { padding: 0; text-align: center; }
  .site-footer .container { grid-template-columns: 1fr; }
  .logo .word b { font-size: 19px; }
  .site-header .container { gap: 12px; }
  .osd { font-size: 11px; }
  .osd-tgt { font-size: 12px; bottom: 54px; }
}
