:root {
  --navy: #0b1426; --navy2: #111f35; --gold: #c6a66a; --gold-light: #f0d79a;
  --ivory: #f4eddd; --parch: #f0deb5; --ink: #2a1e0e;
  --serif: "Yu Mincho", "游明朝", "BIZ UDMincho", "Hiragino Mincho ProN", serif;
  --sans: "Meiryo", "Yu Gothic", "游ゴシック", "Hiragino Sans", system-ui, sans-serif;
}
* { box-sizing: border-box; }
body {
  margin: 0; min-height: 100vh; font-family: var(--sans); line-height: 1.85; color: var(--ink);
  background: var(--navy) center / cover fixed no-repeat;
}
body[data-scene="hall"] { background-image: linear-gradient(rgba(11,20,38,.25), rgba(11,20,38,.25)), url(/assets/backgrounds/hall-DRAFT.webp); }
body[data-scene="field"] { background-image: linear-gradient(rgba(11,20,38,.35), rgba(11,20,38,.35)), url(/assets/backgrounds/field-DRAFT.webp); }

header.site { display: flex; justify-content: space-between; align-items: center; max-width: 1200px; margin: 0 auto; padding: 14px 20px; }
.brand { font: 700 28px var(--serif); letter-spacing: .2em; color: var(--gold-light); text-decoration: none; text-shadow: 0 2px 6px rgba(11,20,38,.9); }
header.site nav a { color: var(--ivory); font-size: 18px; text-decoration: none; padding: 8px 12px; border-bottom: 1px solid var(--gold); background: rgba(11,20,38,.6); border-radius: 4px; }
footer.site { text-align: right; padding: 8px 16px 16px; }
.draft { font-size: 12px; color: var(--ivory); background: rgba(11,20,38,.7); padding: 2px 8px; border-radius: 3px; }

main { max-width: 860px; margin: 0 auto; padding: 8px 16px 32px; }
.screen[hidden] { display: none; }
.frame {
  background: linear-gradient(var(--parch), #ebd6a3); border: 3px solid var(--gold); border-radius: 6px;
  box-shadow: 0 0 0 2px var(--navy2), 0 8px 24px rgba(0,0,0,.45), inset 0 0 0 3px rgba(255,255,255,.35);
  padding: 24px clamp(16px, 4vw, 40px); margin: 0 0 20px;
}
.frame.dark { background: linear-gradient(#18205a, #0f1540); color: var(--ivory); }
.frame.dark h3 { color: var(--gold-light); }
h1, h2, h3 { font-family: var(--serif); margin: 0 0 12px; text-align: center; letter-spacing: .08em; }
h1 { font-size: 30px; } h2 { font-size: 28px; } h3 { font-size: 20px; margin-top: 24px; }
.lead { text-align: center; margin: 0 0 16px; }
.small { font-size: 14px; text-align: center; margin: 12px 0 0; opacity: .85; }

form { display: grid; gap: 12px; max-width: 420px; margin: 16px auto; }
label { font-weight: 700; }
input[type=date] { font: inherit; font-size: 18px; padding: 12px; border-radius: 6px; border: 2px solid var(--gold); background: #fffaf0; color: var(--ink); min-height: 52px; }
button { font: inherit; cursor: pointer; border-radius: 6px; min-height: 52px; padding: 10px 20px; }
button.primary { background: var(--navy2); color: var(--gold-light); border: 2px solid var(--gold); font-size: 18px; font-weight: 700; font-family: var(--serif); }
button.ghost { background: rgba(11,20,38,.75); color: var(--ivory); border: 1px solid var(--gold); }
button:disabled { opacity: .5; cursor: default; }
button:focus-visible, input:focus-visible { outline: 3px solid #1b5cff; outline-offset: 2px; }
.error { color: #8b1a1a; font-weight: 700; margin: 0; }
.row { margin-top: 16px; } .row.center { text-align: center; }

.stage { font: 700 16px var(--serif); text-align: center; margin: 0; color: #5a4520; letter-spacing: .1em; }
.scene { font: 700 26px var(--serif); text-align: center; margin: 4px 0 12px; }
.prompt { margin: 0 0 16px; }
.choices { list-style: none; margin: 0; display: grid; gap: 8px; background: var(--navy2); border: 2px solid var(--gold); border-radius: 6px; padding: 10px; }
.choices button { width: 100%; text-align: left; background: transparent; color: #cfc9b8; border: 0; padding: 12px 12px 12px 40px; position: relative; min-height: 52px; font-size: 17px; line-height: 1.6; border-radius: 4px; }
.choices button::before { content: attr(data-label); position: absolute; left: 12px; color: var(--gold); font-weight: 700; }
.choices button:hover, .choices button:focus-visible { color: var(--gold-light); background: rgba(198,166,106,.18); }
.choices button[aria-pressed="true"] { color: var(--gold-light); background: rgba(198,166,106,.28); }
.choices button[aria-pressed="true"]::before { content: "▶"; }

.pair { display: flex; justify-content: center; align-items: flex-end; gap: clamp(0px, 3vw, 32px); }
.pair figure { margin: 0; text-align: center; flex: 1 1 0; min-width: 0; }
.pair img { max-width: 100%; height: auto; max-height: 340px; }
.pair figcaption { font-weight: 700; font-family: var(--serif); }
.code { font: 700 26px var(--serif); text-align: center; margin: 12px 0 4px; letter-spacing: .1em; }
.meta { text-align: center; margin: 0 0 8px; font-size: 15px; }
.title-label { text-align: center; margin: 12px 0 0; font-size: 14px; color: #5a4520; }
.title { font: 700 26px var(--serif); text-align: center; margin: 0 0 8px; }
.text p { margin: 0 0 1em; }
.paid { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 28px; padding: 0; margin: 12px 0; font-size: 18px; color: var(--gold-light); }

.guide h3 { text-align: left; margin-top: 28px; }
.guide ol, .guide ul { padding-left: 1.4em; }

@media (min-width: 1024px) {
  main { max-width: 1000px; padding-top: 16px; }
  .pair img { max-height: 400px; }
}
@media (max-width: 420px) { h1 { font-size: 24px; } .scene { font-size: 22px; } .pair img { max-height: 240px; } }
@media (prefers-reduced-motion: no-preference) { .screen { animation: fade .25s ease; } @keyframes fade { from { opacity: 0; } } }

/* 神話図鑑 */
header.site nav { display: flex; gap: 8px; }
main.zukan { max-width: 1100px; }
.tabs { display: flex; justify-content: center; gap: 8px; margin: 8px 0 16px; }
.tabs button { background: var(--navy2); color: var(--ivory); border: 1px solid var(--gold); min-height: 48px; font-size: 16px; }
.tabs button[aria-selected="true"] { color: var(--gold-light); border-width: 2px; font-weight: 700; background: #1a2c4d; }
.grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.grid a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 4px; min-height: 52px; background: var(--navy2); color: var(--ivory); border: 1px solid var(--gold); border-radius: 6px; text-decoration: none; text-align: center; }
.grid a[aria-current="true"] { border-width: 3px; background: #1a2c4d; }
.grid a:hover, .grid a:focus-visible { background: #1a2c4d; }
.grid img { width: 48px; height: 48px; border-radius: 50%; background: rgba(240,215,154,.15); object-fit: cover; }
.grid .nm { font: 700 15px var(--serif); } .grid .lb { font-size: 13px; color: var(--gold-light); }
#detail { display: grid; gap: 16px; }
#detail[hidden] { display: none; }
.portrait { margin: 0; text-align: center; }
.portrait img { max-width: 100%; max-height: 420px; height: auto; }
.info h2 { text-align: left; margin: 0; } .label { margin: 0 0 12px; color: #5a4520; font-weight: 700; }
#d-fields { margin: 0; } #d-fields dt { font: 700 16px var(--serif); margin-top: 14px; border-left: 4px solid var(--gold); padding-left: 8px; }
#d-fields dd { margin: 2px 0 0 12px; }
@media (min-width: 1024px) { #detail { grid-template-columns: 340px 1fr; } .portrait { position: sticky; top: 16px; align-self: start; } }
header.site nav a, .brand { white-space: nowrap; }
@media (max-width: 480px) { .brand { font-size: 22px; letter-spacing: .1em; } header.site { padding: 10px 12px; } header.site nav a { font-size: 15px; padding: 6px 8px; } }
