/* Emo! official site. One look, the game's own: walnut and brass around, the dialogue panel's parchment frame for text,
   the town square by day or by night (18:00–6:00, like the game). Legal pages (body.legal) are plain paper. */
:root {
  --walnut: #2b2117;
  --walnut-2: #3b2a1a;
  --walnut-3: #1c140d;
  --brass: #c9a14a;
  --brass-hi: #ecd28f;
  --ivory: #f6eedb;
  --ivory-soft: #d9ccb0;
  --ink: #3a2c1c;
  --ink-soft: #6d5c45;
  --leaf: #4f7a3a;
  --leaf-hi: #6c9a4f;
  --c: #55764b;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 94px; }
body {
  margin: 0;
  background: var(--walnut-3);
  color: var(--ivory);
  font: 400 16px/1.85 "Zen Maru Gothic", "Hiragino Maru Gothic ProN", "Yu Gothic", sans-serif;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "palt" 1;
  overflow-x: hidden;
}
img, video { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3 { font-family: "Kaisei Decol", "Hiragino Mincho ProN", serif; font-weight: 700; margin: 0; line-height: 1.4; text-wrap: balance; }
p, dl, dd, ul, figure { margin: 0; }
i { font-family: "Lora", Georgia, serif; font-style: italic; }

/* ── shared parts ───────────────────────────────────────────── */
.round {
  width: 44px; height: 44px; border-radius: 50%; display: inline-grid; place-items: center; cursor: pointer;
  background: radial-gradient(circle at 50% 35%, #6a4529, #3b2414 70%);
  border: 2px solid var(--brass);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.5), 0 4px 10px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 240, 200, 0.25);
  transition: transform 0.15s ease, filter 0.15s ease;
}
.round:hover { filter: brightness(1.15); }
.round:active { transform: scale(0.95); }
.round svg { width: 22px; height: 22px; fill: none; stroke: var(--ivory); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* the dialogue panel of the game, stretched as a nine-slice frame */
.frame {
  position: relative;
  color: var(--ink);
  border-style: solid; border-color: transparent;
  border-width: 12px 50px 58px 48px;
  border-image: url(assets/ui/panel-day.webp) 60 290 330 280 fill / 12px 50px 58px 48px stretch;
  padding: 20px 4px 4px;
  filter: drop-shadow(0 14px 18px rgba(0, 0, 0, 0.45));
}
.frame h3 { color: var(--ink); }

.plaque {
  display: inline-flex; align-items: center; gap: 12px;
  font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); color: var(--ivory); letter-spacing: 0.12em;
  text-shadow: 0 2px 0 #1c120a, 0 0 14px rgba(0, 0, 0, 0.6);
  padding-bottom: 10px; margin-bottom: 28px; position: relative;
}
.plaque::after {
  content: ""; position: absolute; left: 68px; right: -40px; bottom: 0; height: 2px;
  background: linear-gradient(90deg, var(--brass), rgba(201, 161, 74, 0));
}
.plaque img { width: 56px; height: 56px; object-fit: contain; filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.5)); }

.sec { position: relative; z-index: 2; width: min(1200px, 100%); margin-inline: auto; padding: 112px 24px 96px; }
section { position: relative; overflow: hidden; }

/* ── header ─────────────────────────────────────────────────── */
.notice {
  position: fixed; z-index: 31; left: 0; right: 0; top: 0; margin: 0;
  padding: env(safe-area-inset-top, 0px) 16px 0; height: calc(env(safe-area-inset-top, 0px) + 30px);
  display: grid; place-items: center; text-align: center;
  font-size: 0.82rem; letter-spacing: 0.08em; color: var(--walnut-3, #1e140b);
  background: linear-gradient(var(--brass-hi), var(--brass)); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}
.gnav {
  position: fixed; z-index: 30; left: 0; right: 0; top: calc(env(safe-area-inset-top, 0px) + 30px);
  padding: 10px 24px 10px;
  display: flex; align-items: center; gap: 24px;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}
.gnav.solid {
  background: linear-gradient(rgba(30, 20, 11, 0.55), rgba(30, 20, 11, 0.55)), url(assets/ui/town-bar-top.webp) center / auto 100% repeat-x, var(--walnut-2);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
}
[data-time="night"] .gnav.solid { background-image: linear-gradient(rgba(16, 14, 24, 0.5), rgba(16, 14, 24, 0.5)), url(assets/ui/town-bar-top-night.webp); }
.gnav-logo img { height: 58px; width: auto; filter: drop-shadow(0 0 2px #fff8e4) drop-shadow(0 0 1px #fff8e4) drop-shadow(0 3px 6px rgba(0, 0, 0, 0.5)); }
.gnav-links { display: flex; gap: 6px; margin-inline: auto; }
.gnav-links a {
  display: flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; text-decoration: none;
  font: 700 1.02rem "Kaisei Decol", serif; letter-spacing: 0.06em; color: var(--ivory);
  text-shadow: 0 2px 0 #1c120a, 0 0 8px rgba(0, 0, 0, 0.7);
  position: relative;
}
.gnav-links a img { width: 34px; height: 34px; object-fit: contain; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.6)); transition: transform 0.2s ease; }
.gnav-links a:hover img, .gnav-links a.on img { transform: translateY(-3px) rotate(-6deg); }
.gnav-links a.on { color: var(--brass-hi); }
.gnav-links a.on::after { content: ""; position: absolute; left: 52px; right: 14px; bottom: 2px; height: 2px; border-radius: 2px; background: var(--brass-hi); }
.gnav-side { display: flex; gap: 10px; }
.sound .on, [aria-pressed="false"].sound .on { display: none; }
.sound .off { display: block; }
[aria-pressed="true"].sound .on { display: block; }
[aria-pressed="true"].sound .off { display: none; }
.sound path:first-child { fill: var(--ivory); stroke: none; }
.menu { display: none; }
@media (max-width: 980px) {
  .gnav { justify-content: space-between; }
  .menu { display: inline-grid; }
  .gnav-links {
    position: fixed; inset: 0; z-index: -1; margin: 0; padding: 126px 32px 32px;
    flex-direction: column; gap: 4px; align-items: stretch;
    background: url(assets/ui/town-bar-top.webp) top center / auto 66px repeat-x, var(--walnut-2);
    opacity: 0; visibility: hidden; transition: opacity 0.2s ease, visibility 0.2s;
  }
  .gnav.open .gnav-links { opacity: 1; visibility: visible; }
  .gnav-links a { font-size: 1.3rem; padding: 12px 8px; border-bottom: 1px solid rgba(201, 161, 74, 0.25); border-radius: 0; }
  .gnav-links a img { width: 44px; height: 44px; }
  .gnav-links a.on::after { display: none; }
  .gnav-logo img { height: 46px; }
}

/* ── home ───────────────────────────────────────────────────── */
.home { height: 100svh; min-height: 600px; background: #1a1610; }
.home-art { position: absolute; inset: 0; }
.home-art img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 70%;
  transition: opacity 1.2s ease; animation: drift 40s ease-in-out infinite alternate;
}
.home-art .town { position: absolute; inset: 0; opacity: 0; transition: opacity 1.8s ease; }
.home-art .town.on { opacity: 1; }
.home-art .town.aerial img { object-position: 50% 50%; }
.home-art .night { opacity: 0; }
[data-time="night"] .home-art .night { opacity: 1; }
[data-time="night"] .home-art .day { opacity: 0; }
@keyframes drift { from { transform: scale(1.04) translateX(0); } to { transform: scale(1.1) translateX(-1.5%); } }
.home::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 34%; z-index: 3; pointer-events: none;
  background: linear-gradient(to top, rgba(20, 13, 6, 0.72), rgba(20, 13, 6, 0));
}
/* the cast stands on the plaza at the game's dialogue heights (hero 100, Silva 101, Pico 83.3): the two travellers on
   the left, Silva and Pico on the right, the way in between them */
.home { --u: min(48svh, 520px); }
.cast { position: absolute; bottom: 4svh; z-index: 2; display: flex; align-items: flex-end; pointer-events: none; }
.cast.left { left: max(2vw, calc(50% - 900px)); }
.cast.right { right: max(2vw, calc(50% - 900px)); }
/* upright screens wider than a phone (tablets): the cast steps up above the way in */
@media (min-width: 761px) and (max-aspect-ratio: 1/1) {
  .home { --u: min(32svh, 30vw); }
  .cast { bottom: 30svh; }
}
.hero-char { display: block; width: auto; filter: drop-shadow(0 14px 14px rgba(20, 10, 0, 0.45)); animation: rise 1s both cubic-bezier(.2, .8, .2, 1); }
.hero-char.silver { height: var(--u); animation-delay: 0.45s; }
.hero-char.yui { height: var(--u); margin-left: calc(var(--u) * -0.08); animation-delay: 0.55s; }
.hero-char.silva { height: calc(var(--u) * 1.01); animation-delay: 0.35s; }
.hero-char.pico { height: calc(var(--u) * 0.833); margin-left: calc(var(--u) * -0.06); animation-delay: 0.15s; }
@keyframes rise { from { opacity: 0; translate: 0 40px; } }
.motes { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.motes i {
  position: absolute; bottom: -20px; width: 10px; height: 10px; border-radius: 50%;
  background: radial-gradient(circle, #fff 0 18%, var(--m) 40%, transparent 72%);
  box-shadow: 0 0 14px 4px var(--m); opacity: 0.85;
  animation: float var(--t, 16s) linear var(--d, 0s) infinite;
}
@keyframes float {
  0% { transform: translate(0, 0) scale(0.6); opacity: 0; }
  10% { opacity: 0.9; }
  50% { transform: translate(var(--x, 30px), -48vh) scale(1); }
  90% { opacity: 0.8; }
  100% { transform: translate(calc(var(--x, 30px) * -0.6), -96vh) scale(0.7); opacity: 0; }
}
.motes i:nth-child(1) { left: 6%; --m: #7fc06a; --t: 17s; --d: -2s; }
.motes i:nth-child(2) { left: 14%; --m: #6cb6e8; --t: 21s; --d: -9s; --x: -40px; }
.motes i:nth-child(3) { left: 22%; --m: #f08a4b; --t: 15s; --d: -5s; }
.motes i:nth-child(4) { left: 31%; --m: #c9a26b; --t: 23s; --d: -14s; --x: 50px; }
.motes i:nth-child(5) { left: 39%; --m: #a9e2f2; --t: 19s; --d: -1s; --x: -20px; }
.motes i:nth-child(6) { left: 47%; --m: #7fc06a; --t: 24s; --d: -17s; }
.motes i:nth-child(7) { left: 55%; --m: #fff1a8; --t: 18s; --d: -7s; --x: -60px; width: 7px; height: 7px; }
.motes i:nth-child(8) { left: 62%; --m: #f08a4b; --t: 22s; --d: -12s; }
.motes i:nth-child(9) { left: 70%; --m: #6cb6e8; --t: 16s; --d: -4s; --x: 40px; }
.motes i:nth-child(10) { left: 78%; --m: #b58be0; --t: 26s; --d: -19s; width: 7px; height: 7px; }
.motes i:nth-child(11) { left: 85%; --m: #c9a26b; --t: 20s; --d: -10s; --x: -30px; }
.motes i:nth-child(12) { left: 92%; --m: #a9e2f2; --t: 17s; --d: -15s; }
.motes i:nth-child(13) { left: 27%; --m: #fff1a8; --t: 28s; --d: -21s; width: 6px; height: 6px; }
.motes i:nth-child(14) { left: 66%; --m: #7fc06a; --t: 25s; --d: -3s; width: 6px; height: 6px; }

.home-cta {
  position: absolute; z-index: 4; left: 50%; translate: -50% 0; bottom: max(56px, 9svh); justify-items: center; text-align: center;
  display: grid; grid-template-columns: auto auto; align-items: center; gap: 14px 18px;
}
.movie-btn {
  width: 72px; height: 72px; border-radius: 50%; cursor: pointer; display: grid; place-items: center;
  background: rgba(246, 238, 219, 0.92); border: 3px solid var(--brass);
  box-shadow: 0 0 0 6px rgba(246, 238, 219, 0.25), 0 8px 18px rgba(0, 0, 0, 0.45);
  transition: transform 0.2s ease;
}
.movie-btn:hover { transform: scale(1.06); }
.town-name {
  position: absolute; z-index: 4; top: 96px; left: 28px; margin: 0; padding: 6px 16px 6px 14px;
  font: 700 1rem "Kaisei Decol", serif; letter-spacing: 0.12em; color: var(--ivory);
  background: rgba(30, 20, 11, 0.55); border-left: 3px solid var(--brass-hi); border-radius: 0 4px 4px 0;
  text-shadow: 0 1px 2px #000;
}
.town-name.show { animation: townIn 1.2s ease both; }
@keyframes townIn { from { opacity: 0; translate: -8px 0; } to { opacity: 1; translate: 0 0; } }
.home-logo { width: clamp(300px, 34vw, 560px); height: auto; margin-bottom: 4px; filter: drop-shadow(0 0 2px #fff8e4) drop-shadow(0 4px 14px rgba(0, 0, 0, 0.6)); }
.home-logo.top { display: none; }
@media (max-width: 1100px), (max-aspect-ratio: 1/1) {
  .home-cta .home-logo { display: none; }
  .home-logo.top { display: block; position: absolute; z-index: 4; top: 112px; left: 50%; translate: -50% 0; width: min(76vw, 520px); }
}
.gnav:not(.solid):not(.open) .gnav-logo { opacity: 0; pointer-events: none; }
.docked .gnav:not(.solid):not(.open) .gnav-logo, .docked .gnav .gnav-logo { opacity: 1; pointer-events: auto; transition: none; }
.logo-fly { position: fixed; z-index: 40; margin: 0; translate: none; transform-origin: 0 0; pointer-events: none;
  filter: drop-shadow(0 0 2px #fff8e4) drop-shadow(0 4px 14px rgba(0, 0, 0, 0.6)); }
.home-logo.gone { visibility: hidden; }
.home-cta .home-logo.gone { max-height: 0; margin: 0; transition: max-height 0.9s cubic-bezier(0.6, 0, 0.25, 1), margin 0.9s; }
.home-cta .home-logo { max-height: 300px; }
.town-name { transition: top 0.5s ease; }
.docked .town-name, .docking .town-name { top: 118px; }
.gnav-logo { transition: opacity 0.3s ease; }
.movie-btn svg { width: 28px; height: 28px; fill: var(--walnut-2); margin-left: 4px; }
.start {
  position: relative; display: inline-grid; place-items: center; min-width: 320px; height: 84px; padding: 0 44px;
  border-radius: 999px; text-decoration: none; overflow: hidden;
  font: 700 1.7rem "Kaisei Decol", serif; letter-spacing: 0.14em; color: #fffaf0;
  text-shadow: 0 2px 0 #2b4a1e;
  background: linear-gradient(#78a95a, #4f7a3a 55%, #3f6630);
  border: 3px solid var(--brass);
  box-shadow: 0 0 0 2px #2a1d10, inset 0 2px 0 rgba(255, 255, 230, 0.45), inset 0 -4px 0 rgba(0, 0, 0, 0.2), 0 12px 24px rgba(0, 0, 0, 0.5);
  transition: transform 0.15s ease, filter 0.15s ease;
}
.start:hover { filter: brightness(1.08); transform: translateY(-2px); }
.start::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 240, 0.45), transparent);
  animation: glint 4.5s ease-in-out 1.5s infinite;
}
@keyframes glint { 0%, 70% { left: -60%; } 100% { left: 130%; } }
.start-note { grid-column: 2; font-size: 0.84rem; color: var(--ivory); text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8); letter-spacing: 0.06em; padding-left: 12px; }
.scroll-cue { position: absolute; z-index: 4; left: 50%; bottom: 18px; width: 26px; height: 40px; margin-left: -13px; border: 2px solid rgba(246, 238, 219, 0.8); border-radius: 14px; }
.scroll-cue span { position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--ivory); animation: cue 1.8s ease-in-out infinite; }
@keyframes cue { 0% { transform: translateY(0); opacity: 1; } 80% { transform: translateY(12px); opacity: 0; } 100% { opacity: 0; } }
@media (max-width: 760px) {
  .home { --u: min(25svh, 46vw); }
  .cast { bottom: 33svh; }
  .cast.left { left: 0; }
  .cast.right { right: 0; }
  .home-art img { object-position: 42% 70%; }
  .home::after { height: 50%; }
  .home-cta { left: 16px; right: 16px; translate: none; justify-items: stretch; text-align: left; bottom: 64px; grid-template-columns: auto 1fr; gap: 12px; }
  .movie-btn { width: 60px; height: 60px; }
  .town-name { top: 76px; left: 0; font-size: 0.86rem; }
  .docked .town-name, .docking .town-name { top: 104px; }
  .start { min-width: 0; width: 100%; height: 68px; font-size: 1.35rem; padding: 0 16px; }
  .start-note { grid-column: 1 / -1; text-align: center; padding: 0; }
}

/* the genre, over the first screen */
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.genre { grid-column: 1 / -1; display: grid; justify-items: start; gap: 10px; margin-bottom: 6px; font-weight: 400; }
.home-cta .genre { justify-items: center; }
@media (max-width: 760px) { .home-cta .genre { justify-items: start; } }
.genre-tag {
  display: inline-flex; align-items: center; gap: 10px; padding: 6px 18px 6px 14px;
  font: 700 clamp(1.05rem, 0.9rem + 0.6vw, 1.4rem) "Kaisei Decol", serif; letter-spacing: 0.16em; color: var(--brass-hi);
  background: linear-gradient(90deg, rgba(28, 20, 13, 0.82), rgba(28, 20, 13, 0.55) 80%, rgba(28, 20, 13, 0));
  border-left: 3px solid var(--brass);
  text-shadow: 0 1px 0 #000;
}
.genre-tag::before { content: ""; width: 9px; height: 9px; transform: rotate(45deg); background: var(--brass-hi); box-shadow: 0 0 10px var(--brass-hi); }
.genre-line { font: 500 clamp(0.95rem, 0.85rem + 0.4vw, 1.15rem) "Zen Maru Gothic", sans-serif; letter-spacing: 0.08em; color: var(--ivory); text-shadow: 0 1px 2px #000, 0 0 14px rgba(0, 0, 0, 0.8); }

/* ── learn ──────────────────────────────────────────────────── */
.learn-sec { background: radial-gradient(ellipse at 70% 0%, #3b2a1a, transparent 60%), linear-gradient(#20170f, #15100b); }
.learn-sec::before { content: ""; position: absolute; inset: 0; background: url(assets/learn/arena.webp) center 70% / cover; opacity: 0.08; filter: blur(3px) saturate(0.6); }
.flow { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; counter-reset: step; }
.flow li { counter-increment: step; display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 18px; align-items: center; }
.flow .phone { width: 132px; }
.flow p { font-size: 0.86rem; color: var(--ivory-soft); line-height: 1.7; }
.flow b { display: flex; align-items: center; gap: 10px; font: 700 1.15rem "Kaisei Decol", serif; color: var(--ivory); margin-bottom: 6px; }
.flow b::before {
  content: counter(step); flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  font: 600 1rem "Lora", serif; font-style: italic; color: var(--walnut-3);
  background: radial-gradient(circle at 40% 35%, var(--brass-hi), var(--brass) 70%); box-shadow: 0 0 0 2px #2a1d10;
}

.try-row { margin-top: 64px; display: grid; grid-template-columns: minmax(0, 440px) minmax(0, 1fr); gap: 48px; align-items: start; }
.try { position: relative; border: 3px solid var(--brass); border-radius: 18px; overflow: hidden; background: #1b130b;
  box-shadow: 0 0 0 2px #2a1d10, 0 24px 40px rgba(0, 0, 0, 0.55); }
.try-head { position: absolute; z-index: 5; left: 0; right: 0; top: 0; padding: 10px 16px; font: 700 1rem "Kaisei Decol", serif; letter-spacing: 0.12em;
  background: linear-gradient(rgba(20, 13, 6, 0.85), rgba(20, 13, 6, 0)); text-shadow: 0 1px 3px #000; }
.try-head small { font: 500 0.72rem "Zen Maru Gothic", sans-serif; letter-spacing: 0.08em; color: var(--ivory-soft); margin-left: 8px; }
.field { position: relative; aspect-ratio: 440 / 330; overflow: hidden; }
.field-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 78%; }
.pal, .foe { position: absolute; bottom: 9%; height: auto; filter: drop-shadow(0 8px 6px rgba(30, 20, 0, 0.35)); transform-origin: 50% 100%; }
.pal { left: 9%; width: 20%; }
.foe { right: 15%; width: 19%; transition: opacity 0.4s, transform 0.3s; }
.foe.hit { animation: foeHit 0.5s ease; }
.foe.down { opacity: 0; transform: translateY(8px) scale(0.9); filter: brightness(2.2); }
.foe.in { animation: foeIn 0.5s ease both; }
@keyframes foeHit { 0% { filter: brightness(3) drop-shadow(0 0 12px #fff); transform: translateX(0); } 30% { transform: translateX(14px) rotate(4deg); } 100% { filter: none; transform: none; } }
@keyframes foeIn { from { opacity: 0; transform: translateX(60px); } to { opacity: 1; transform: none; } }
.foe-plaque { position: absolute; z-index: 3; right: 10px; top: 44px; display: grid; grid-template-columns: auto auto; align-items: center; gap: 2px 8px; min-width: 150px;
  padding: 6px 12px 8px; border-radius: 8px; background: linear-gradient(#5b3f26, #3b2716); border: 2px solid var(--brass); box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5); }
.foe-name { font: 700 0.9rem "Kaisei Decol", serif; letter-spacing: 0.06em; }
.foe-el { width: 11px; height: 11px; border-radius: 50%; background: #4fcf5c; box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.35); justify-self: end; }
.foe-bar { grid-column: 1 / -1; height: 7px; border-radius: 4px; background: rgba(0, 0, 0, 0.45); overflow: hidden; }
.foe-bar span { display: block; height: 100%; width: 100%; background: linear-gradient(#ffe27a, #e0a92b); transition: width 0.45s ease; }
.effect { position: absolute; z-index: 4; right: 3%; top: 36%; font: 600 italic 1.5rem "Lora", serif; color: #fff2b8; white-space: nowrap; pointer-events: none;
  text-shadow: 0 2px 0 #6a3d0c, 0 0 14px rgba(255, 190, 60, 0.9); opacity: 0; }
.effect.show { animation: effect 1.4s ease both; }
.effect.weak { color: #d6d0c4; font-size: 1.1rem; text-shadow: 0 2px 0 #333, 0 0 8px rgba(0, 0, 0, 0.6); }
.effect.plain { font-size: 1.25rem; }
@keyframes effect { 0% { opacity: 0; transform: translateY(10px) scale(0.6); } 18% { opacity: 1; transform: translateY(0) scale(1.12); } 30% { transform: scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: translateY(-10px); } }
.bolt { position: absolute; z-index: 3; left: 22%; bottom: 30%; width: 22px; height: 22px; border-radius: 50%; opacity: 0; pointer-events: none;
  background: radial-gradient(circle, #fff 0 25%, var(--lc, #ffd23f) 55%, transparent 72%); box-shadow: 0 0 24px 8px var(--lc, #ffd23f); }
.bolt.fly { animation: bolt 0.42s cubic-bezier(.45, 0, .7, 1) both; }
@keyframes bolt { 0% { opacity: 1; transform: translate(0, 0) scale(0.6); } 50% { transform: translate(calc(var(--dx, 240px) * 0.5), -46px) scale(1.1); } 100% { opacity: 1; transform: translate(var(--dx, 240px), 0) scale(1.4); } }

.lights[hidden], .qbox[hidden] { display: none; }
.lights { display: flex; justify-content: center; gap: 26px; padding: 18px 12px 20px; background: linear-gradient(#2a1d10, #1b130b); }
.light { width: 64px; height: 64px; border-radius: 50%; cursor: pointer; border: 0; position: relative;
  background: radial-gradient(circle at 50% 42%, #fff 0 14%, var(--lc) 42%, color-mix(in srgb, var(--lc) 40%, #000) 100%);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.25), 0 0 22px color-mix(in srgb, var(--lc) 80%, transparent);
  animation: breathe 2.6s ease-in-out infinite; animation-delay: var(--d, 0s); transition: transform 0.15s; }
.light:hover, .light:focus-visible { transform: scale(1.1); outline: none; }
.light svg { position: absolute; inset: 0; margin: auto; width: 26px; height: 26px; fill: rgba(255, 255, 255, 0.92); }
.light small { position: absolute; left: 50%; bottom: -16px; transform: translateX(-50%); font-size: 0.66rem; color: var(--ivory-soft); white-space: nowrap; }
@keyframes breathe { 50% { box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.35), 0 0 34px var(--lc); } }

.qbox { position: relative; color: var(--ink); padding: 18px 20px 20px; background: #f6eedb url(assets/ui/panel-day.webp) center / cover; background: linear-gradient(#f8f1df, #efe3c6); border-top: 3px solid var(--brass); }
.q-ask { display: flex; align-items: center; gap: 10px; font-size: 0.85rem; color: var(--ink-soft); }
.q-star { color: #b8862a; letter-spacing: 0.08em; }
.q-text { margin: 8px 0 2px; font: 600 italic 1.25rem "Lora", serif; color: var(--ink); line-height: 1.5; overflow-wrap: anywhere; }
.q-text.word { font-size: 2rem; text-align: center; font-style: normal; font-family: "Kaisei Decol", "Lora", serif; }
.q-ja { font-size: 0.85rem; color: var(--ink-soft); min-height: 0; }
.q-opts { display: grid; gap: 8px; margin-top: 12px; }
.q-opts button { text-align: left; cursor: pointer; padding: 10px 14px; border-radius: 10px; border: 1.5px solid #c9b48a; background: #fffaf0; color: var(--ink);
  font: 500 1rem "Lora", "Zen Maru Gothic", serif; transition: background 0.15s, border-color 0.15s; }
.q-opts button:hover:not(:disabled) { border-color: var(--brass); background: #fff3d6; }
.q-opts button.right { border-color: #4f7a3a; background: #e3f0d6; }
.q-opts button.wrong { border-color: #8a4a3a; background: #f2ddd5; }
.q-opts button:disabled { cursor: default; }
.q-explain { margin-top: 10px; font-size: 0.85rem; line-height: 1.7; color: var(--ink); }
.q-explain button { margin-left: 8px; cursor: pointer; padding: 4px 14px; border-radius: 999px; border: 2px solid var(--brass); background: linear-gradient(#5b3f26, #3b2716); color: var(--ivory); font-size: 0.85rem; }
.judge { position: absolute; right: 18px; top: 10px; font: 700 3rem "Kaisei Decol", serif; line-height: 1; opacity: 0; pointer-events: none; }
.judge.ok { width: 46px; height: 46px; border: 6px solid #c8381f; border-radius: 50%; color: transparent; opacity: 1; animation: stamp 0.35s ease both; }
.judge.ng { color: #2e4a8a; opacity: 1; animation: stamp 0.35s ease both; }
@keyframes stamp { from { transform: scale(1.8); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.facts { display: grid; gap: 28px; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: rgba(201, 161, 74, 0.35); border: 1px solid rgba(201, 161, 74, 0.35); }
.stats div { background: #1d150d; padding: 16px 16px 14px; display: flex; flex-direction: column; }
.stats .n { order: 0; font: 600 clamp(1.45rem, 1.1rem + 1vw, 2rem) "Lora", serif; color: var(--ivory); font-variant-numeric: lining-nums tabular-nums; line-height: 1.2; white-space: nowrap; }
.stats dt { order: 1; font-size: 0.78rem; letter-spacing: 0.12em; color: var(--brass-hi); margin-top: 2px; }
.stats .c { order: 2; font-size: 0.74rem; color: var(--ivory-soft); line-height: 1.55; margin-top: 4px; }
.skills { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.skills li { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto; gap: 2px 12px; align-items: center; padding: 12px 14px;
  border-radius: 10px; background: rgba(246, 238, 219, 0.06); border: 1px solid rgba(246, 238, 219, 0.14); }
.skills b { grid-row: 1 / 3; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; font: 700 1rem "Kaisei Decol", serif; color: #fff;
  background: var(--sc); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.2), 0 0 0 2px rgba(0, 0, 0, 0.35); }
.skills span { font-size: 0.8rem; color: var(--ivory-soft); line-height: 1.55; }
.skills em { font: 600 italic 1rem "Lora", serif; color: var(--brass-hi); }
.sk-read { --sc: #4f7a3a; } .sk-listen { --sc: #3c6f9a; } .sk-pron { --sc: #a5552f; } .sk-write { --sc: #6f4f8a; }
.learn-more h3 { font-size: 1.1rem; margin-bottom: 10px; }
.dots { list-style: none; padding: 0; display: grid; gap: 8px; font-size: 0.92rem; }
.dots li { padding-left: 16px; position: relative; }
.dots li::before { content: ""; position: absolute; left: 2px; top: 0.75em; width: 6px; height: 6px; border-radius: 50%; background: var(--leaf); }
@media (max-width: 1020px) {
  .flow { grid-template-columns: 1fr; gap: 18px; }
  .flow li { grid-template-columns: 96px minmax(0, 1fr); }
  .flow .phone { width: 96px; }
  .try-row { grid-template-columns: 1fr; }
  .try { max-width: 480px; width: 100%; margin-inline: auto; }
}
@media (max-width: 560px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .skills { grid-template-columns: 1fr; }
  .genre-line { font-size: 0.86rem; }
  .effect { font-size: 1.2rem; }
  .effect.weak { font-size: 0.95rem; }
}

/* ── story ──────────────────────────────────────────────────── */
.story { background: #15100b; min-height: 100svh; }
.story-film, .story-map { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.story-film { opacity: 0.5; filter: saturate(0.9) brightness(0.8); transition: opacity 0.6s; }
.story-map { opacity: 0; filter: brightness(0.5) saturate(0.85); transition: opacity 0.6s; }
html:not([data-ch="R1"]) .story-film { opacity: 0; }
html:not([data-ch="R1"]) .story-map { opacity: 0.55; }
.story::before { content: ""; position: absolute; inset: 0; z-index: 1; background: radial-gradient(ellipse at 30% 50%, rgba(18, 12, 6, 0.2), rgba(18, 12, 6, 0.75)); }
.ch-tabs { display: flex; gap: 8px; margin-bottom: 34px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
.ch-tabs button {
  flex: 0 0 auto; cursor: pointer; display: grid; text-align: left; gap: 0; padding: 8px 16px 9px 22px; position: relative;
  border-radius: 6px; border: 1px solid rgba(201, 161, 74, 0.35);
  background: rgba(28, 20, 13, 0.72); font: 700 0.98rem "Kaisei Decol", serif; color: var(--ivory-soft);
}
.ch-tabs button small { font: 500 0.7rem "Zen Maru Gothic", sans-serif; letter-spacing: 0.14em; color: var(--brass); }
.ch-tabs button::before { content: ""; position: absolute; left: 9px; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.3); }
.ch-tabs button[aria-selected="true"] { background: linear-gradient(#5b3f26, #3b2716); color: var(--ivory); border-color: var(--brass); box-shadow: inset 0 1px 0 rgba(255, 240, 200, 0.2), 0 6px 14px rgba(0, 0, 0, 0.35); }
.ch { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 32px; align-items: end; }
.ch.swap .ch-text, .ch.swap .tamer { animation: swapIn 0.45s ease both; }
.ch.swap .tamer { animation-delay: 0.06s; }
@keyframes swapIn { from { opacity: 0; translate: 0 12px; } }
.ch-no { font-size: 0.8rem; letter-spacing: 0.3em; color: var(--c); font-weight: 700; filter: brightness(0.8); }
.ch-text h3 { font-size: clamp(1.7rem, 1.3rem + 1.4vw, 2.4rem); }
.ch-en { font-family: "Lora", serif; font-style: italic; color: var(--ink-soft); margin-bottom: 16px; }
.ch-syn { max-width: 34em; color: var(--ink); }
.ch-meta { display: flex; flex-wrap: wrap; gap: 6px 28px; margin-top: 18px; padding-top: 12px; border-top: 1px dashed rgba(109, 92, 69, 0.45); font-size: 0.9rem; }
.ch-meta div { display: flex; gap: 10px; }
.ch-meta dt { color: var(--ink-soft); }
.tamer { position: relative; display: grid; justify-items: center; }
.tamer img { width: auto; height: min(500px, 56svh); max-width: 100%; object-fit: contain; filter: drop-shadow(0 24px 30px rgba(0, 0, 0, 0.6)); }
.tamer.unknown img { filter: brightness(0) drop-shadow(0 0 22px rgba(201, 161, 74, 0.35)); }
.tamer figcaption { display: grid; justify-items: center; margin-top: -14px; text-shadow: 0 2px 6px rgba(0, 0, 0, 0.9); }
.tamer small { font-size: 0.8rem; letter-spacing: 0.24em; color: var(--brass-hi); }
.tamer b { font: 700 1.8rem "Kaisei Decol", serif; letter-spacing: 0.12em; }
@media (max-width: 860px) { .ch { grid-template-columns: 1fr; } .tamer img { height: 300px; } }

/* ── friends ────────────────────────────────────────────────── */
.friends { background: url(assets/inn.webp) center / cover, #2a1f14; }
[data-time="night"] .friends { background-image: url(assets/inn-night.webp); }
.friends::before { content: ""; position: absolute; inset: 0; z-index: 1; background: rgba(24, 15, 7, 0.62); backdrop-filter: blur(3px); }
.fr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: center; }
.fr-stage { position: relative; display: grid; place-items: center; min-height: min(620px, 70svh); }
.fr-stage::before { content: ""; position: absolute; width: 70%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(255, 226, 150, 0.35), transparent 65%); }
.fr-art { position: relative; height: min(620px, 70svh); width: auto; object-fit: contain; filter: drop-shadow(0 20px 20px rgba(0, 0, 0, 0.5)); }
.fr-face { position: relative; padding: 0; border: 0; background: none; cursor: pointer; display: grid; place-items: center; }
.fr-art.pop { animation: frPop 0.35s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes frPop { 0% { transform: translateY(0) scale(1); } 40% { transform: translateY(-10px) scale(1.02); } 100% { transform: none; } }
.fr-art.in { animation: frIn 0.5s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes frIn { from { opacity: 0; translate: -30px 0; } }
.fr-step { position: absolute; top: 50%; margin-top: -22px; }
.fr-step.prev { left: 0; }
.fr-step.next { right: 0; }
.fr-title { font-size: 0.86rem; letter-spacing: 0.16em; color: var(--leaf); font-weight: 700; }
.fr-card h3 { font-size: clamp(2rem, 1.5rem + 1.8vw, 2.9rem); display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.fr-card h3 i { font-size: 1.1rem; color: var(--ink-soft); font-weight: 500; }
.fr-meta { display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 10px 0 16px; padding-block: 10px; border-block: 1px dashed rgba(109, 92, 69, 0.45); font-size: 0.92rem; }
.fr-meta div { display: flex; align-items: center; gap: 10px; }
.fr-meta dt { color: var(--ink-soft); }
.fr-meta dd { display: flex; align-items: center; gap: 6px; }
.fr-meta img { width: 30px; height: 30px; object-fit: contain; }
.fr-bio { max-width: 30em; }
.fr-skill { margin-top: 16px; padding: 12px 14px; background: rgba(79, 122, 58, 0.1); border-left: 3px solid var(--leaf); font-size: 0.9rem; display: grid; gap: 2px; }
.fr-skill b { color: var(--leaf); }
.fr-skill[hidden] { display: none; }
.faces { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.faces button {
  width: 76px; height: 108px; border-radius: 10px; overflow: hidden; cursor: pointer; padding: 6px 4px 4px;
  border: 2px solid rgba(201, 161, 74, 0.45); background: radial-gradient(ellipse at 50% 35%, #f7eed8, #d9c7a1);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4); transition: transform 0.2s ease, border-color 0.2s;
}
.faces button img { width: 100%; height: 100%; object-fit: contain; object-position: 50% 100%; }
.faces button:hover { transform: translateY(-3px); }
.faces button[aria-selected="true"] { border: 3px solid var(--brass-hi); box-shadow: 0 0 0 3px rgba(236, 210, 143, 0.35), 0 6px 14px rgba(0, 0, 0, 0.5); transform: translateY(-4px); }
@media (max-width: 860px) {
  .fr { grid-template-columns: 1fr; }
  .fr-stage { min-height: 0; }
  .fr-art { height: 46svh; }
  .faces { gap: 8px; }
  .faces button { width: 56px; height: 80px; padding: 4px 3px 3px; }
}

/* ── world ──────────────────────────────────────────────────── */
.world { background: url(assets/ui/wood-grain.webp) center / 600px, #2a1d12; }
.world::before { content: ""; position: absolute; inset: 0; background: rgba(20, 13, 7, 0.55); }
.atlas { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 28px; align-items: start; }
.map { position: relative; border: 3px solid var(--brass); border-radius: 4px; box-shadow: 0 0 0 2px #1a1007, 0 20px 40px rgba(0, 0, 0, 0.55); }
.map img { width: 100%; height: auto; }
.pin { position: absolute; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%; cursor: pointer; padding: 0;
  background: var(--c); border: 3px solid #fff8e8; box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.45), 0 4px 8px rgba(0, 0, 0, 0.5); }
.pin::after { content: ""; position: absolute; inset: -9px; border-radius: 50%; border: 2px solid #fff8e8; opacity: 0; }
.pin.on::after { animation: ping 1.6s ease-out infinite; }
@keyframes ping { from { transform: scale(0.6); opacity: 0.9; } to { transform: scale(1.6); opacity: 0; } }
.pin span {
  position: absolute; left: 50%; bottom: 22px; translate: -50% 0; white-space: nowrap; pointer-events: none;
  font: 700 0.82rem "Kaisei Decol", serif; color: var(--ivory); padding: 3px 10px; border-radius: 4px;
  background: rgba(43, 33, 23, 0.9); border: 1px solid var(--brass); opacity: 0; translate: -50% 4px; transition: opacity 0.2s, translate 0.2s;
}
.pin:hover span, .pin.on span, .pin:focus-visible span { opacity: 1; translate: -50% 0; }
.pin.castle { --c: #5b4a63; }
.rg-ch { font-size: 0.8rem; letter-spacing: 0.2em; color: var(--c); font-weight: 700; filter: brightness(0.75); }
.rg h3 { font-size: 1.6rem; }
.rg-tag { color: var(--ink-soft); margin: 6px 0 14px; text-wrap: pretty; }
.rg-meta { display: grid; gap: 8px; font-size: 0.9rem; padding-top: 12px; border-top: 1px dashed rgba(109, 92, 69, 0.45); }
.rg-meta dt { font-size: 0.74rem; color: var(--ink-soft); letter-spacing: 0.14em; }
@media (max-width: 860px) {
  .atlas { grid-template-columns: 1fr; }
  .pin { width: 16px; height: 16px; margin: -8px 0 0 -8px; border-width: 2px; }
  .pin span { font-size: 0.7rem; bottom: 16px; }
  .pin:not(.on):not(:hover) span { opacity: 0; }
}

/* ── play ───────────────────────────────────────────────────── */
.play { background: url(assets/guild.webp) center / cover, #2a1f14; }
[data-time="night"] .play { background-image: url(assets/guild-night.webp); }
.play::before { content: ""; position: absolute; inset: 0; z-index: 1; background: rgba(24, 15, 7, 0.7); backdrop-filter: blur(4px); }
.shots { display: grid; grid-auto-flow: column; grid-auto-columns: 210px; gap: 22px; overflow-x: auto; padding: 6px 4px 18px; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.shots figure { scroll-snap-align: start; }
.phone { border-radius: 22px; overflow: hidden; border: 5px solid #1a120b; background: #1a120b; aspect-ratio: 600 / 1223; box-shadow: 0 0 0 2px var(--brass), 0 16px 24px rgba(0, 0, 0, 0.5); }
.phone img { width: 100%; height: 100%; object-fit: cover; }
.shots figcaption { margin-top: 12px; font-size: 0.84rem; color: var(--ivory-soft); line-height: 1.65; }
.shots figcaption b { display: block; font: 700 1rem "Kaisei Decol", serif; color: var(--ivory); }
.price { margin-top: 56px; max-width: 640px; }
.price h3 { font-size: 1.2rem; margin-bottom: 10px; }
.plan { display: grid; gap: 12px; font-size: 0.9rem; }
.plan dt { font: 700 1rem "Kaisei Decol", serif; color: var(--leaf); }

/* ── news ───────────────────────────────────────────────────── */
.news { background: var(--walnut); }
.news-list ul { list-style: none; padding: 0; }
.news-list li { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 14px; padding: 12px 0; border-bottom: 1px dashed rgba(109, 92, 69, 0.45); }
.news-list li:last-child { border-bottom: 0; }
.news-list time { font-family: "Lora", serif; font-style: italic; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
@media (max-width: 560px) { .news-list li { grid-template-columns: 1fr; gap: 0; } }

/* ── footer ─────────────────────────────────────────────────── */
.foot { background: var(--walnut-3); border-top: 2px solid var(--brass); }
.foot-in { width: min(1200px, 100%); margin-inline: auto; padding: 48px 24px 32px; display: grid; grid-template-columns: auto 1fr auto; gap: 24px 48px; align-items: start; }
.foot-logo { width: 160px; height: auto; filter: drop-shadow(0 0 1px #fff8e4) drop-shadow(0 0 1px #fff8e4); }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 0.88rem; }
.foot nav a { color: var(--ivory-soft); }
.foot dl { display: grid; gap: 8px; font-size: 0.86rem; }
.foot dt { font-size: 0.7rem; color: var(--ivory-soft); letter-spacing: 0.16em; }
.foot dd { overflow-wrap: anywhere; }
.copy { grid-column: 1 / -1; font-size: 0.74rem; color: var(--ivory-soft); }
@media (max-width: 760px) { .foot-in { grid-template-columns: 1fr; } }

/* ── legal pages ────────────────────────────────────────────── */
body.legal { background: #f4ecdc; color: #2e2820; }
.doc { width: min(760px, 100%); margin-inline: auto; padding: 56px 20px 64px; }
.doc h1 { font-size: clamp(1.7rem, 1.3rem + 1.4vw, 2.3rem); margin-bottom: 8px; }
.doc .updated { color: #6b604f; font-size: 0.85rem; margin-bottom: 40px; }
.doc h2 { font-size: 1.2rem; margin: 44px 0 12px; padding-top: 16px; border-top: 1px solid #cfbf9f; }
.doc p, .doc li { font-size: 0.95rem; }
.doc p + p { margin-top: 12px; }
.doc ul, .doc ol { padding-left: 1.4em; margin: 10px 0; display: grid; gap: 6px; }
.doc table { width: 100%; border-collapse: collapse; font-size: 0.86rem; margin: 12px 0; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 10px 12px; border: 1px solid #cfbf9f; }
.doc th { background: #ebe1cb; font-weight: 500; }
.doc .table { overflow-x: auto; }
.doc .kv th { width: 11em; }
@media (max-width: 560px) {
  .doc .kv th, .doc .kv td { display: block; width: auto; }
  .doc .kv td { border-top: none; }
  .doc .kv tr + tr th { border-top: none; }
}
.doc h3 { font-size: 1rem; margin: 20px 0 6px; }
.doc code { font-size: 0.88em; background: #ebe1cb; padding: 1px 5px; border-radius: 3px; overflow-wrap: anywhere; }
.doc .todo { background: rgba(169, 133, 63, 0.22); padding: 0 4px; }
.doc .back { display: inline-block; margin-bottom: 28px; font-size: 0.88rem; color: #6b604f; }
body.legal .foot { background: #ebe1cb; color: #2e2820; border-top: 1px solid #cfbf9f; }
body.legal .copy { width: min(760px, 100%); margin-inline: auto; padding: 20px; color: #6b604f; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .motes { display: none; }
}
.study { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 40px; }
.st-card { display: grid; grid-template-rows: auto 1fr; justify-items: center; gap: 14px; padding-bottom: 0; }
.st-shot { width: 128px; border-width: 4px; border-radius: 16px; }
.st-body { justify-self: stretch; }
.st-card h3 { font-size: 1.05rem; margin-bottom: 6px; }
.st-card p { font-size: 0.86rem; line-height: 1.75; color: var(--ink); }
.st-card .st-links { margin-top: 8px; font-size: 0.8rem; line-height: 1.7; }
.st-links a { display: block; color: #7a4d1c; }
@media (max-width: 1100px) { .study { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .study { grid-template-columns: 1fr; }
  .st-card { grid-template-rows: none; grid-template-columns: 92px 1fr; justify-items: stretch; align-items: start; }
  .st-shot { width: 92px; }
}
.covers { align-items: start; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 12px; max-width: 420px; }
.covers img { width: 100%; height: auto; border-radius: 4px; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.45); }
@media (max-width: 560px) {
  .covers { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 280px; }
}
.covers a { display: grid; gap: 6px; font-size: 0.72rem; line-height: 1.4; color: var(--ink); text-decoration: none; }
.covers a:hover img { transform: translateY(-3px); }
.covers img { transition: transform 0.2s; }

/* ── Live翻訳 ─────────────────────────────────────────────── */
.live { background: radial-gradient(ellipse at 20% 0%, #24364a, transparent 60%), linear-gradient(#15100b, #121a22); }
.live .plaque { white-space: normal; }
.live-row { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 32px; align-items: start; }
.live-shot { width: 260px; }
.live-cards { display: grid; gap: 12px; }
@media (max-width: 760px) {
  .live-row { grid-template-columns: 1fr; }
  .live-shot { width: min(240px, 70%); margin-inline: auto; }
}

/* ── fairy-tale pages (book-*.html) ────────────────────────── */
.book { width: min(720px, 100%); }
.bk-head { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 20px; align-items: end; margin-bottom: 24px; }
.bk-head img { width: 120px; height: auto; border-radius: 4px; box-shadow: 0 6px 14px rgba(0, 0, 0, 0.3); }
.bk-from { font-size: 0.8rem; color: #6b604f; letter-spacing: 0.1em; }
.bk-en { font: italic 1.05rem "Lora", serif; color: #4a3f31; margin-top: 4px; }
.bk-by { font-size: 0.9rem; margin-top: 6px; }
.bk-meta { font-size: 0.82rem; color: #6b604f; margin-top: 4px; display: flex; gap: 10px; }
.bk-meta span { color: #b58428; }
.bk-how { font-size: 0.88rem; color: #4a3f31; background: #ece0c6; border-radius: 8px; padding: 10px 14px; }
.bk-toc ol { padding-left: 1.6em; display: grid; gap: 4px; }
.bk-toc a, .bk-foot a { color: #6a4a1c; }
.bk-ch h2 { font-family: "Lora", serif; font-size: 1.35rem; }
.bp { position: relative; padding-right: 52px; margin-top: 14px; }
.bp p[lang="en"] { font: 1.05rem/1.85 "Lora", serif; color: #2e2820; }
.bp-tr { position: absolute; right: 0; top: 2px; font: 500 0.75rem "Zen Maru Gothic", sans-serif; padding: 3px 9px; border-radius: 999px; border: 1px solid #c9b48a; background: #fffaf0; color: #6a4a1c; cursor: pointer; }
.bp-tr[aria-expanded="true"] { background: #6a4a1c; color: #fffaf0; border-color: #6a4a1c; }
.doc .bp-ja { margin-top: 6px; font-size: 0.9rem; line-height: 1.8; color: #4a3f31; border-left: 3px solid #d8c49b; padding-left: 10px; }
.bk-top { display: inline-block; margin-top: 18px; font-size: 0.8rem; color: #6b604f; }
.bk-foot { margin-top: 48px; padding-top: 16px; border-top: 1px solid #cfbf9f; font-size: 0.85rem; color: #4a3f31; }
.bk-others { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 20px 0; max-width: 360px; }
.bk-others a { display: grid; gap: 4px; font-size: 0.72rem; text-decoration: none; }
.bk-others img { width: 100%; height: auto; border-radius: 4px; }
.bk-play { display: inline-block; padding: 10px 20px; border-radius: 999px; background: #6a4a1c; color: #fffaf0 !important; text-decoration: none; }
