/* 世界観サイトの器（共通の見た目）
   色と字体は theme.js の look で上書きする。ここにあるのはメビウス号の色（初期値） */
:root {
  --bg-0: #071d35;
  --bg-1: #0b2a4a;
  --bg-2: #12406b;
  --bg-3: #1d5d93;
  --on-bg: #eaf4fb;
  --paper: #fffaf0;
  --paper-2: #f6ecd6;
  --ink: #1a2b40;
  --ink-2: #5a6b80;
  --accent: #ffcf5a;
  --accent-2: #e9a92a;
  --alert: #ff7a59;
  --ok: #5fae3c;
  --line: #d9cdb3;    /* 紙の上の点線 */
  --line-2: #e8dcc0;
  --line-3: #c9b78f;
  --hatch: #efe4cc;   /* まだひらいていない箱のしま模様 */
  --ticket-1: #fff6dc; --ticket-2: #f3e2b8;
  --sheet-ink: #2f3f8f; /* 穴埋めシートの字 */
  --map-bg: radial-gradient(circle at 50% 60%, #cfe9f7, #a9d3ec); /* 地図の丸 */
  --fog-bg: #dfe7ee;
  --radius: 18px;
  --pixel: "DotGothic16", "Hiragino Sans", sans-serif;
  --round: "M PLUS Rounded 1c", "Hiragino Maru Gothic ProN", "Hiragino Sans", "Yu Gothic", sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background:
    radial-gradient(1200px 500px at 50% -200px, color-mix(in srgb, var(--accent) 18%, transparent), transparent 70%),
    linear-gradient(180deg, var(--bg-1) 0%, var(--bg-2) 50%, var(--bg-3) 100%) fixed;
  color: var(--on-bg);
  font-family: var(--round);
  line-height: 1.8;
  min-height: 100vh;
  padding-bottom: 88px;
  overflow-x: clip;
}
a { color: var(--accent); }
img { max-width: 100%; }
.px { image-rendering: pixelated; }
.wrap { max-width: 880px; margin: 0 auto; padding: 8px 16px 32px; }
.center { text-align: center; }
.muted { color: color-mix(in srgb, var(--on-bg) 72%, transparent); font-size: 14px; }
.card .muted { color: var(--ink-2); }

/* 上のバー */
.topbar {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 16px; background: color-mix(in srgb, var(--bg-0) 85%, transparent); backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.brand { display: flex; align-items: center; gap: 8px; color: var(--on-bg); text-decoration: none; font-weight: 800; letter-spacing: .08em; }
.brand img { width: 44px; }
.brand i { color: var(--accent); font-style: normal; }
.proto { font-family: var(--pixel); font-size: 12px; color: var(--bg-1); background: var(--accent); padding: 2px 10px; border-radius: 999px; }

/* 下のタブ */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: color-mix(in srgb, var(--bg-0) 94%, transparent); border-top: 1px solid rgba(255, 255, 255, .1);
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
}
.tabbar[hidden] { display: none; }
.tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; text-decoration: none; color: color-mix(in srgb, var(--on-bg) 70%, transparent); font-size: 11px; padding: 4px 0; border-radius: 12px; }
.tabbar img { width: 30px; height: 30px; object-fit: contain; }
.tabbar a.on { color: var(--accent); background: rgba(255, 255, 255, .06); }

/* 共通の箱 */
.card {
  display: block; background: var(--paper); color: var(--ink);
  border-radius: var(--radius); padding: 18px 16px; margin: 16px 0;
  box-shadow: 0 6px 0 rgba(0, 0, 0, .15);
  text-decoration: none;
}
.ttl { font-family: var(--pixel); font-weight: 400; font-size: 20px; text-align: center; margin: 0 0 12px; letter-spacing: .12em; color: var(--bg-1); }
.page-ttl { display: flex; align-items: center; justify-content: center; gap: 10px; font-size: clamp(20px, 5vw, 28px); margin: 18px 0 4px; text-align: center; }
.page-ttl img { width: 48px; }
.crumb { font-size: 13px; margin: 12px 0 0; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.two .card { margin: 0; }
@media (max-width: 560px) { .two { grid-template-columns: 1fr; } }

.btn {
  display: inline-block; border: 0; cursor: pointer; text-decoration: none;
  font: 700 15px var(--round); color: var(--paper); background: var(--bg-2);
  padding: 10px 20px; border-radius: 999px; box-shadow: 0 4px 0 var(--bg-0);
}
.btn:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--bg-0); }
.btn.gold { background: var(--accent); color: var(--bg-0); box-shadow: 0 4px 0 var(--accent-2); }
.btn.sm { font-size: 13px; padding: 6px 14px; }
.btn.ghost { background: transparent; color: inherit; box-shadow: inset 0 0 0 2px currentColor; }
.pill { display: inline-block; font-family: var(--pixel); font-size: 13px; padding: 2px 12px; border-radius: 999px; background: var(--bg-2); color: var(--paper); }
.pill.gold { background: var(--accent); color: var(--bg-0); }

/* 船長の吹き出し */
.talk-row { display: flex; gap: 12px; align-items: flex-start; margin: 16px 0; }
.captain { flex: 0 0 64px; width: 64px; height: 64px; background: var(--paper); border-radius: 50%; border: 3px solid var(--accent); }
.talk { position: relative; flex: 1; background: var(--paper); color: var(--ink); border-radius: 16px; padding: 10px 16px; }
.talk::before { content: ""; position: absolute; left: -10px; top: 22px; border: 10px solid transparent; border-right-color: var(--paper); border-left: 0; }
.talk b { font-family: var(--pixel); font-weight: 400; font-size: 12px; color: var(--bg-3); }
.talk p { margin: 0; }
.card .talk { background: var(--paper-2); }
.card .talk::before { border-right-color: var(--paper-2); }

/* 港（OPEN） */
/* アイキャッチは画面の横幅いっぱい（中身の幅に関係なく左右の端まで） */
.hero { position: relative; width: 100vw; margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); min-height: 420px; display: grid; place-items: center; overflow: hidden; }
@media (min-width: 900px) { .hero { min-height: 560px; } }
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: saturate(1.1) brightness(.85); }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, color-mix(in srgb, var(--bg-0) 10%, transparent), color-mix(in srgb, var(--bg-0) 65%, transparent)); }
.hero-in { position: relative; z-index: 1; text-align: center; padding: 24px 16px; }
.logo { width: min(560px, 92vw); filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .35)); }
.hero-lead { font-weight: 700; text-shadow: 0 2px 8px rgba(0, 0, 0, .6); margin: 8px 0 18px; }
.mebius svg { width: min(360px, 100%); display: block; margin: 0 auto; color: var(--bg-2); }
.mebius text { font: 700 18px var(--pixel); fill: var(--bg-1); }
.mebius text.filter { fill: var(--accent-2); }
.mebius p { margin: .6em 0; }
.gate { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 640px) { .gate { grid-template-columns: 1fr; } }
.gate-box { background: var(--paper-2); border-radius: 14px; padding: 14px; text-align: center; }
.gate-box h3 { margin: 0 0 8px; font-size: 16px; }
.gate-box input { width: 100%; font: 16px var(--round); padding: 10px 12px; border-radius: 10px; border: 2px solid var(--bg-3); margin-bottom: 10px; }
.msg { min-height: 1.5em; color: var(--alert); font-size: 14px; margin: 8px 0 0; }

/* カウンター */
.counter { text-align: center; margin: 18px 0 0; font-family: var(--pixel); }
.counter b { display: block; font-weight: 400; font-size: 18px; }
.counter em { font-style: normal; font-size: 40px; color: var(--accent); padding: 0 4px; }
.counter span { font-size: 14px; opacity: .85; }

/* 航路の帯 */
.strip { display: flex; gap: 6px; overflow-x: auto; padding: 8px 4px 12px; scroll-snap-type: x proximity; }
.strip-isl { flex: 0 0 96px; display: flex; flex-direction: column; align-items: center; text-decoration: none; color: var(--ink); scroll-snap-align: center; position: relative; }
.strip-isl + .strip-isl::before { content: ""; position: absolute; left: -10px; top: 44px; width: 14px; border-top: 3px dotted var(--accent-2); }
.strip-img { position: relative; width: 88px; height: 88px; display: grid; place-items: center; border-radius: 50%; background: var(--map-bg); }
.strip-img img { width: 80px; height: 80px; object-fit: contain; }
.strip-img .flag { position: absolute; right: -6px; top: -8px; width: 40px; height: 40px; }
.strip-img .ship-mark { position: absolute; left: -12px; bottom: 2px; width: 48px; height: 48px; }
.strip { position: relative; scrollbar-width: none; }
.strip::-webkit-scrollbar { display: none; }
.card p a:not(.btn), .crumb a { color: var(--bg-3); font-weight: 700; }
.crumb a { color: var(--accent); }
.strip-name { font-size: 11px; text-align: center; line-height: 1.4; margin-top: 4px; font-weight: 700; }
.strip-isl.here .strip-img { box-shadow: 0 0 0 4px var(--accent); animation: bob 3s ease-in-out infinite; }
.strip-isl.ahead .strip-img, .strip-isl.fog .strip-img { filter: grayscale(.9) brightness(1.05); opacity: .6; }
.strip-isl.fog .strip-name { color: var(--ink-2); }
/* 地図の形「line」：駅を線路でつなぐ（theme.look.map = "line"） */
.strip.line .strip-isl + .strip-isl::before { left: -12px; top: 40px; width: 18px; border-top: 8px double var(--accent-2); }
.strip.line .strip-img { border-radius: 22px; }
/* 地図の形「shelf」：本棚に本を並べる（theme.look.map = "shelf"） */
.strip.shelf { gap: 10px; padding: 14px 10px 10px; background: var(--shelf-bg, transparent); border-radius: 12px; }
.strip.shelf .strip-isl { flex-basis: 92px; }
.strip.shelf .strip-isl + .strip-isl::before { display: none; }
.strip.shelf .strip-img { width: 84px; height: 96px; border-radius: 4px 10px 10px 4px; background: var(--map-bg); box-shadow: inset 6px 0 0 rgba(0, 0, 0, .18), 0 4px 0 rgba(0, 0, 0, .25); }
.strip.shelf .strip-img img { width: 80px; height: 88px; }
.strip.shelf .strip-isl.here .strip-img { animation: none; transform: translateY(-6px); }
/* 鍵がない本：絵だけ灰色にして、鍵のしるしをのせる */
.strip-isl.locked .strip-img > img { filter: grayscale(1) brightness(.95); opacity: .45; }
/* 錠前：theme の --lock に絵があれば絵、なければ 🔒 */
.strip-isl.locked .strip-img::after { content: var(--lock-emoji, "🔒"); position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%); width: 28px; height: 30px; display: grid; place-items: center; font-size: 18px; line-height: 1; background: var(--paper) var(--lock, none) center / 18px 21px no-repeat; border-radius: 8px; box-shadow: 0 2px 0 rgba(0, 0, 0, .25); image-rendering: pixelated; }
/* 本棚では、しおりを本の上からはさむ */
.strip.shelf .strip-img .ship-mark { left: auto; right: 8px; top: -12px; bottom: auto; width: 22px; height: 30px; }
.strip.shelf .others { right: -6px; bottom: auto; top: -10px; }
.strip.shelf .others img { width: 18px; height: 26px; margin-left: -8px; }
.strip.shelf .strip-name { margin-top: 12px; }
.isl.locked .pill { background: var(--line-3); color: var(--ink); }
/* 鍵束 */
.keyring { list-style: none; padding: 0; margin: 8px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.keyring li { display: grid; grid-template-columns: 36px 1fr; grid-template-rows: auto auto; column-gap: 8px; align-items: center; background: var(--paper-2); border-radius: 12px; padding: 8px 10px; opacity: .5; }
.keyring li.on { opacity: 1; box-shadow: inset 0 0 0 2px var(--accent-2); }
.keyring img { grid-row: span 2; width: 36px; height: 36px; object-fit: contain; }
.keyring b { font-size: 13px; line-height: 1.4; }
.keyring span { font-size: 11px; color: var(--ink-2); }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@media (prefers-reduced-motion: reduce) { .strip-isl.here .strip-img { animation: none; } }

/* 小さいカード */
.card.mini { display: flex; gap: 12px; align-items: center; }
.card.mini img { width: 72px; flex: 0 0 72px; }
.card.mini h3 { margin: 0; font-size: 16px; }
.card.mini p { margin: 2px 0; font-size: 14px; }

/* 船内設備 */
.facs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
@media (max-width: 560px) { .facs { grid-template-columns: repeat(2, 1fr); } }
.fac { display: flex; flex-direction: column; align-items: center; text-decoration: none; color: var(--ink); background: var(--paper-2); border-radius: 14px; padding: 10px 6px; transition: transform .15s; }
.fac:hover { transform: translateY(-3px); }
.fac img { width: 72px; height: 72px; object-fit: contain; }
.fac b { font-size: 14px; }
.fac span { font-size: 11px; color: var(--ink-2); }

/* 島 */
.isl-head { display: flex; align-items: center; gap: 12px; }
.isl-head img { width: 84px; height: 84px; object-fit: contain; }
.isl-head h2 { margin: 0; font-size: 18px; }
.isl-head p { margin: 0; }
.isl-head .pill { margin-left: auto; white-space: nowrap; }
.isl.locked .isl-head img { filter: grayscale(1); opacity: .6; }
.vols { list-style: none; padding: 0; margin: 12px 0 0; }
.vols li { border-top: 1px dashed var(--line); }
.vols li a, .vols li.locked { display: flex; align-items: center; gap: 10px; padding: 10px 4px; color: var(--ink); text-decoration: none; }
.vols li.locked { color: var(--ink-2); }
.vols .no { font-family: var(--pixel); font-size: 12px; background: var(--bg-2); color: var(--paper); border-radius: 6px; padding: 0 6px; min-width: 52px; text-align: center; }
.vols li.locked .no { background: #b9c4cf; }
.grp { font-size: 15px; margin: 18px 0 0; color: var(--bg-2); }
.grp:first-child { margin-top: 0; }
.stamp { margin-left: auto; font-family: var(--pixel); font-size: 12px; color: var(--alert); border: 2px solid var(--alert); border-radius: 6px; padding: 0 6px; transform: rotate(-6deg); }
.stamp.big { display: inline-block; font-size: 22px; padding: 4px 16px; margin: 6px 0; }
.fog-card { background: var(--fog-bg); }
.fog-list { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.fog-list li { display: flex; align-items: center; gap: 4px; font-size: 13px; color: var(--ink-2); }
.fog-list img { width: 40px; filter: grayscale(1); opacity: .6; }

/* ラジオ */
.player { display: flex; gap: 12px; align-items: center; background: var(--paper-2); border-radius: 14px; padding: 12px; }
.player img { width: 72px; }
.player p { margin: 0; }
.work, .answer { margin-top: 14px; }
.work h3, .answer h3 { font-size: 15px; margin: 0; }
.answer { background: repeating-linear-gradient(45deg, var(--hatch), var(--hatch) 8px, var(--paper-2) 8px, var(--paper-2) 16px); border-radius: 12px; padding: 10px 12px; }
.answer.open { background: #e9f6df; }

/* 音声つきの回 */
.onair { background: var(--bg-0); color: var(--on-bg); border: 2px solid color-mix(in srgb, var(--accent) 50%, transparent); }
.onair p { margin: 0 0 .7em; }
.onair-label { font-family: var(--pixel); color: var(--accent); letter-spacing: .15em; font-size: 13px; }
.onair-label::before { content: "●"; color: var(--alert); margin-right: 6px; animation: blink 1.6s steps(2) infinite; }
@keyframes blink { 50% { opacity: .2; } }
@media (prefers-reduced-motion: reduce) { .onair-label::before { animation: none; } }
.onair-mini { margin-left: auto; font-family: var(--pixel); font-size: 11px; color: var(--bg-0); background: var(--accent); border-radius: 6px; padding: 0 6px; }
.player-body { flex: 1; min-width: 0; }
.player audio { width: 100%; margin-top: 6px; }
.small { font-size: 13px; }

/* 画面で書ける穴埋めシート */
.sheet { background: #f4f2ef; border-radius: 12px; padding: 14px 10px; display: grid; gap: 6px; color: var(--sheet-ink); font-size: clamp(16px, 4.4vw, 22px); font-weight: 700; }
.sheet-row { display: flex; align-items: flex-start; justify-content: center; gap: 6px; flex-wrap: nowrap; }
.sheet-row > span { padding-top: 8px; white-space: nowrap; }
.sheet-row.right { justify-content: flex-end; padding-right: 22%; }
.sheet .arrow { font-size: 1.2em; line-height: 1; }
.blank { display: inline-flex; flex-direction: column; align-items: center; }
.blank input { width: min(9em, 30vw); font: 700 1em var(--round); color: var(--alert); text-align: center; background: #fff; border: 2px solid var(--sheet-ink); border-radius: 4px; padding: 6px 4px; }
.blank input:focus { outline: 3px solid var(--accent); outline-offset: 1px; }
.blank .ans { font-size: .7em; color: var(--ok); margin-top: 2px; }
.answer-card.locked { background: repeating-linear-gradient(45deg, var(--hatch), var(--hatch) 10px, var(--paper-2) 10px, var(--paper-2) 20px); }
.answer-img { display: block; width: 100%; border-radius: 10px; margin-top: 8px; }

/* にぎわい：乗船者の気配 */
.counter .pax { display: block; margin-top: 4px; font-size: 13px; color: var(--accent); }
.strip-count { font-family: var(--pixel); font-size: 10px; color: var(--bg-3); min-height: 1.4em; }
.others { position: absolute; right: -18px; bottom: -4px; display: flex; align-items: flex-end; }
.others img { width: 44px; height: 44px; margin-left: -22px; filter: drop-shadow(0 1px 0 rgba(0, 0, 0, .25)); }
.others b { font-family: var(--pixel); font-weight: 400; font-size: 10px; color: var(--bg-1); background: var(--paper); border-radius: 6px; padding: 0 3px; margin-left: 2px; }
.vol-ttl { display: flex; flex-direction: column; min-width: 0; }
.heard-n { font-family: var(--pixel); font-size: 11px; color: var(--ink-2); }
.heard-big { font-family: var(--pixel); color: var(--bg-3); margin: 4px 0 0; }

/* みんなの反応 */
.reacts { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.react { font: 700 14px var(--round); color: var(--ink); background: var(--paper-2); border: 2px solid var(--line); border-radius: 999px; padding: 6px 14px; cursor: pointer; display: inline-flex; gap: 8px; align-items: center; }
.react i { font-style: normal; font-family: var(--pixel); font-size: 12px; color: var(--ink-2); min-width: 1.2em; }
.react.on { border-color: var(--alert); background: #fff0ea; color: var(--alert); }
.react.on i { color: var(--alert); }
.react:focus-visible, .btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.hitokoto { margin-top: 16px; border-top: 1px dashed var(--line); padding-top: 12px; }
.hitokoto-q { margin: 0 0 8px; font-weight: 700; text-align: center; }
.hitokoto-row { display: flex; gap: 6px; flex-wrap: wrap; }
.hitokoto input { font: 15px var(--round); padding: 8px 10px; border-radius: 10px; border: 2px solid var(--line); min-width: 0; }
/* 紙色のカードの中の入力欄は、明るい色で固定（全体が夜の海の色なので、ふつうだと暗くなる） */
.card input, .gate-box input { background: #fff; color: var(--ink); color-scheme: light; }
.card input::placeholder, .gate-box input::placeholder { color: #9aa6b2; }
.hitokoto .nm { flex: 0 1 9em; }
.hitokoto .tx { flex: 1 1 12em; }
.hitokoto .btn { flex: 0 0 auto; }

/* リスナーからのお便り */
.note-track { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; padding: 4px 2px 10px; scrollbar-width: none; }
.note-track::-webkit-scrollbar { display: none; }
.note { position: relative; flex: 0 0 min(260px, 78%); scroll-snap-align: start; margin: 0; background: #fff; border: 2px solid var(--line-2); border-radius: 14px; padding: 14px 14px 10px; box-shadow: 0 3px 0 var(--line-2); }
.note blockquote { margin: 0 0 8px; font-size: 15px; line-height: 1.7; overflow-wrap: anywhere; }
.note figcaption { font-size: 12px; color: var(--ink-2); }
.note.featured { border-color: var(--accent); box-shadow: 0 3px 0 var(--accent-2); }
.on-air-badge { position: absolute; top: -10px; right: 10px; font-family: var(--pixel); font-size: 11px; color: var(--bg-0); background: var(--accent); border-radius: 6px; padding: 0 8px; }

/* 手紙 */
.letter h2 { font-size: 18px; margin: 0 0 6px; }
.letter p { margin: 0 0 4px; }

/* 客室 */
.ticket { display: flex; gap: 14px; align-items: center; background: linear-gradient(135deg, var(--ticket-1), var(--ticket-2)); border: 2px dashed var(--accent-2); border-radius: 14px; padding: 12px; }
.ticket > img { width: 120px; }
.ticket dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 0; flex: 1; }
.ticket dt { font-family: var(--pixel); font-size: 12px; color: var(--ink-2); }
.ticket dd { margin: 0; }
.ticket input { font: 15px var(--round); padding: 4px 8px; border-radius: 8px; border: 1px solid var(--line-3); width: min(180px, 100%); }
@media (max-width: 560px) { .ticket { flex-direction: column; } }
.stamps { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(48px, 1fr)); gap: 8px; margin: 12px 0; }
.stamps li { aspect-ratio: 1; border-radius: 50%; border: 2px dashed var(--line-3); display: grid; place-items: center; font-family: var(--pixel); font-size: 13px; color: #b9a982; }
.stamps li.on { border: 3px solid var(--alert); color: var(--alert); background: #fff0ea; transform: rotate(-8deg); }
.flags { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.flags li { position: relative; text-align: center; font-size: 10px; line-height: 1.3; color: var(--ink-2); }
.flags li img { width: 56px; height: 56px; object-fit: contain; filter: grayscale(1); opacity: .5; }
.flags li.on img { filter: none; opacity: 1; }
.flags li .flag { position: absolute; top: -6px; right: 4px; width: 28px; height: 28px; filter: none; opacity: 1; }
.aiko { font-family: var(--pixel); font-size: clamp(18px, 5vw, 26px); text-align: center; background: var(--bg-1); color: var(--accent); border-radius: 12px; padding: 14px; letter-spacing: .06em; word-break: keep-all; overflow-wrap: anywhere; }
.books { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (max-width: 560px) { .books { grid-template-columns: 1fr 1fr; } }
.book { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; background: var(--paper-2); border-radius: 12px; padding: 10px; color: var(--ink); }
.books.card, section.books .card { margin: 0; }
.book img { width: 96px; }
.book b { font-size: 14px; }
.book span { font-size: 11px; color: var(--ink-2); }
.book.locked img { filter: grayscale(1); opacity: .5; }

/* テレビ */
.ev img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 12px; }
.ev h3 { margin: 8px 0 0; }

/* 救急BOX */
details { border-top: 1px dashed var(--line); padding: 8px 0; }
summary { cursor: pointer; font-weight: 700; }

/* 試作用の操作 */
.demo { margin: 24px 0; border: 2px dashed color-mix(in srgb, var(--accent) 60%, transparent); border-radius: 14px; padding: 12px; font-size: 13px; }
.demo p { margin: 0 0 8px; }
.demo-btns { display: flex; flex-wrap: wrap; gap: 6px; }
.demo .btn { background: rgba(255, 255, 255, .12); box-shadow: none; }
.demo .btn.ghost { color: var(--on-bg); }

.about svg { width: min(360px, 100%); display: block; margin: 0 auto; color: var(--bg-2); }
.about text { font: 700 18px var(--pixel); fill: var(--bg-1); }
.about p { margin: .6em 0; }
.article p { margin: 0 0 .8em; }
.answers { margin: 8px 0 0; padding-left: 1.4em; }
.answers li { margin: 2px 0; }
/* 館内マップ（コーナーの看板） */
.corners { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.corner { display: grid; justify-items: center; text-align: center; gap: 2px; text-decoration: none; color: var(--ink); background: var(--paper-2); border-radius: 14px; padding: 12px 8px; border: 2px solid var(--line-3); transition: transform .15s; }
.corner:hover { transform: translateY(-3px); }
.corner img { width: 64px; height: 64px; }
.corner b { font-family: var(--pixel); font-weight: 400; font-size: 15px; }
.corner span { font-size: 11px; color: var(--ink-2); line-height: 1.5; }
.corner em { font-style: normal; font-family: var(--pixel); font-size: 11px; color: var(--accent-2); }
.corner-sign { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 18px 0 4px; }
.corner-sign img { width: 72px; height: 72px; }
.corner-sign h1 { margin: 0; font-family: var(--pixel); font-weight: 400; font-size: clamp(22px, 6vw, 30px); background: var(--paper); color: var(--ink); padding: 4px 18px; border-radius: 8px; border: 3px solid var(--accent-2); box-shadow: 0 4px 0 var(--bg-0); }
.corner-walk { font-size: 14px; }
.grp-ttl { font-family: var(--pixel); font-weight: 400; font-size: 18px; margin: 26px 0 0; padding-left: 8px; border-left: 6px solid var(--accent); }
.isl-head img.cover { width: 84px; height: 84px; object-fit: contain; }
/* イベントのお知らせ */
.event { display: grid; grid-template-columns: 74px 1fr; gap: 14px; align-items: start; }
.event-date { display: grid; justify-items: center; background: var(--bg-1); color: var(--on-bg); border-radius: 10px; padding: 8px 4px; font-family: var(--pixel); }
.event-date b { font-weight: 400; font-size: 22px; color: var(--accent); }
.event-date span { font-size: 11px; }
.event-body h3 { margin: 2px 0 4px; font-size: 16px; }
.event-body p { margin: 0 0 4px; }
.event-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.event-tags .pill { font-size: 11px; }
.event.big { border: 3px solid var(--accent); }
.event.past { opacity: .6; }
.event-mini img { image-rendering: pixelated; }

/* ---------- 演出（theme.look.fx でつける） ---------- */
@media (prefers-reduced-motion: no-preference) {
  /* lamp：港の絵にランプのゆらぐ明かり */
  body.fx-lamp .hero::before { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: radial-gradient(600px 300px at 50% 35%, color-mix(in srgb, var(--accent) 35%, transparent), transparent 70%); animation: lamp 4s ease-in-out infinite; }
  @keyframes lamp { 0%, 100% { opacity: .55; } 40% { opacity: .9; } 45% { opacity: .7; } 70% { opacity: 1; } }
  body.fx-lamp .hero-bg { animation: kenburns 30s ease-in-out infinite alternate; }
  @keyframes kenburns { from { transform: scale(1); } to { transform: scale(1.08); } }
  /* dust：ほこりが光の中をただよう */
  body.fx-dust .hero::after { background-image: radial-gradient(2px 2px at 20% 30%, #fff8, transparent), radial-gradient(1.5px 1.5px at 70% 20%, #fff7, transparent), radial-gradient(2px 2px at 40% 70%, #fff6, transparent), radial-gradient(1.5px 1.5px at 85% 60%, #fff8, transparent), radial-gradient(1px 1px at 55% 45%, #fff9, transparent), linear-gradient(180deg, color-mix(in srgb, var(--bg-0) 10%, transparent), color-mix(in srgb, var(--bg-0) 65%, transparent)); animation: dust 18s linear infinite; }
  @keyframes dust { from { background-position: 0 0, 0 0, 0 0, 0 0, 0 0, 0 0; } to { background-position: 40px -120px, -30px -90px, 20px -140px, -40px -100px, 10px -160px, 0 0; } }
  /* bob：読みかけの本がふわっと浮く・しおりがゆれる */
  body.fx-bob .strip.shelf .strip-isl.here .strip-img { animation: bookbob 2.6s ease-in-out infinite; }
  @keyframes bookbob { 0%, 100% { transform: translateY(-6px) rotate(-1deg); } 50% { transform: translateY(-11px) rotate(1deg); } }
  body.fx-bob .strip.shelf .ship-mark { transform-origin: 50% 0; animation: sway 3s ease-in-out infinite; }
  @keyframes sway { 0%, 100% { transform: rotate(-6deg); } 50% { transform: rotate(6deg); } }
  /* shake：鍵のない本にさわると、ガタッとゆれる */
  body.fx-shake .strip-isl.locked:hover .strip-img, body.fx-shake .strip-isl.locked:active .strip-img { animation: shake .4s steps(4) 1; }
  @keyframes shake { 25% { transform: translateX(-3px) rotate(-2deg); } 50% { transform: translateX(3px) rotate(2deg); } 75% { transform: translateX(-2px); } }
  /* sparkle：新しい鍵がキラッ、読了スタンプがポン */
  body.fx-sparkle .keyring li.new { animation: newkey 1.6s ease-out 2; }
  @keyframes newkey { 0% { box-shadow: 0 0 0 0 var(--accent); } 60% { box-shadow: 0 0 0 10px transparent; } 100% { box-shadow: inset 0 0 0 2px var(--accent-2); } }
  body.fx-sparkle .keyring li.new img { animation: keyturn 1.2s ease-in-out 2; }
  @keyframes keyturn { 0%, 100% { transform: rotate(0); } 30% { transform: rotate(-25deg) scale(1.2); } 60% { transform: rotate(15deg) scale(1.1); } }
  body.fx-sparkle .strip-img .flag { animation: stamppop .5s cubic-bezier(.3, 1.6, .5, 1) 1; }
  @keyframes stamppop { from { transform: scale(2.2) rotate(-20deg); opacity: 0; } to { transform: scale(1) rotate(0); opacity: 1; } }
  body.fx-sparkle .stamp.big { animation: stamppop .5s cubic-bezier(.3, 1.6, .5, 1) 1; }
  /* pagein：画面がかわるとき、ページをめくるようにそっと出る */
  body.fx-pagein #app.page-in { animation: pagein .35s ease-out 1; }
  @keyframes pagein { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
}

.foot { text-align: center; font-size: 12px; opacity: .6; padding: 8px 0 24px; }
