/* 時の回廊（BL-1554：墨線の UI）。物差しはスタイルボード（finelab2 ui/review/BL-1546-時の回廊-スタイルボード）
   色は役割1つずつ：羊皮紙＝地・会話の窓／墨＝線・本文／セピア＝注／金＝発見と光／朱＝プレイヤーの印／夜＝画面の縁・帯
   字体は明朝だけ（本文 17px・見出しは細い明朝 300・字間 .2em）。ドット字体は使わない */
:root {
    --paper: #efe4cc;
    --paper-2: #e6d7b6;
    --ink: #1f1a16;
    --sepia: #6b5a45;
    --pencil: #7d7064;
    --line: #c9b893;
    --gold: #b8892f;
    --gold-l: #f3e3bd;
    --shu: #8b2614;
    --night: #2a2420;
    --night-2: #15120f;
    /* 既存の部品（trials.js の SVG など）が使う名前は残して、新しい色に寄せる */
    --parch: var(--paper);
    --parch-2: var(--paper-2);
    --ink-2: var(--ink);
    --red: var(--shu);
    --gold-2: var(--gold-l);
    --text: var(--ink);
    --text-light: var(--paper);
    --serif: 'Noto Serif JP', 'Hiragino Mincho ProN', 'ヒラギノ明朝 ProN', 'Yu Mincho', 'YuMincho', serif;
    --hud-h: 48px;
    --msg-h: 38%;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--night-2); color: var(--ink); font-family: var(--serif); -webkit-text-size-adjust: 100%; }
button { font-family: inherit; }

/* 画面いっぱいに使う（PC でも左右を黒い帯にしない） */
#app { position: relative; width: 100%; height: 100vh; height: 100dvh; overflow: hidden; background: var(--night); }

/* ---------- 背景 ---------- */
.scene { position: absolute; inset: 0; overflow: hidden; container-type: size; --fog-tile: 2.2204; --fog-time: .7; } /* BL-1957：--fog-tile＝霧の絵の 横÷縦（tests/make_seamless_fog.py が作る絵に合わせる）。--fog-time＝霧の流れる時間の倍率（1周＝絵の1枚分。流れる速さが前と変わらないように） */
@media (max-width: 700px) { .scene { --fog-time: 2.4; } }
.layer { position: absolute; inset: 0; pointer-events: none; transition: opacity 1.2s ease; opacity: 0; }
.scene .sky { opacity: 1; background: var(--night); }

/* ---------- 背景は絵だけ（BL-1571：CSS の図形の背景〈星・月・町並みの影・廊下の線〉をやめ、絵の層に差し替えた） ----------
   層：sky＝一番奥の絵／skyline＝建物の層（透明の空）／fog＝霧の絵（黒地を screen で重ねて横へ流す）／carriage＝馬車の影（通りを横切る）／lamp＝灯りの色だけ
   絵の元は db/sources/projects/faraday-park/output/assets/timeslip/（WebP だけをここ img/ に写す） */
.scene .sky, .scene .skyline { background-repeat: no-repeat; background-size: cover; background-position: 50% 50%; }
.scene .fog { background: url(img/common/slip_fog.webp) 0 50% / auto 100% repeat-x; mix-blend-mode: screen; }
.scene .lamp { background: radial-gradient(circle at 50% 38%, rgba(243,227,189,.3), rgba(243,227,189,.08) 30%, transparent 55%); }
/* 背景の層の動き：空はほぼ動かさない・建物はゆっくり寄る・霧は横へ流れる（視差） */
@keyframes ts-drift { from { background-position-x: 0; } to { background-position-x: -200vw; } }
/* BL-1957：背景の霧は絵のちょうど1枚分だけ流して繰り返す（-200vw だと絵の幅の倍数にならず、1周ごとに霧が跳んでいた） */
@keyframes ts-fog { from { background-position-x: 0; } to { background-position-x: calc(var(--fog-tile) * -100cqh); } }
@keyframes ts-breathe { from { transform: scale(1.02) translateX(.6%); } to { transform: scale(1.06) translateX(-.6%); } }
@keyframes ts-sky { from { transform: scale(1.01); } to { transform: scale(1.03) translateY(-.5%); } }

/* タイトル・回廊：回廊の墨線の絵（common_hall）に羊皮紙の紗をかける */
.bg-title .sky, .bg-corridor .sky { background-image: linear-gradient(to bottom, rgba(239,228,204,.55), rgba(239,228,204,.82) 55%, rgba(239,228,204,.95)), url(img/common/hall.webp); background-position: 50% 30%; animation: ts-sky 40s ease-in-out infinite alternate; }
.bg-title .lamp { opacity: .8; }
.bg-corridor .lamp { opacity: .5; }
/* 暗転（時越えのあいだ）：夜の地に時越えの霧の絵を流す */
.bg-void .sky { background: var(--night); }
.bg-void .fog { opacity: .55; animation: ts-fog calc(90s * var(--fog-time)) linear infinite; }

/* 1831 ロンドン（S2 王立研究所の前）：空・建物・霧の3層＋馬車の影 */
.bg-london .sky { background-image: url(img/faraday/s2_sky.webp); animation: ts-sky 60s ease-in-out infinite alternate; }
.bg-london .skyline { opacity: 1; background-image: url(img/faraday/s2_buildings.webp); background-position: 50% 100%; animation: ts-breathe 30s ease-in-out infinite alternate; }
.bg-london .fog { opacity: .9; background-image: url(img/faraday/s2_fog.webp); animation: ts-fog calc(70s * var(--fog-time)) linear infinite; }
.bg-london .lamp { opacity: 1; background: radial-gradient(circle at 78% 46%, rgba(243,227,189,.35), rgba(243,227,189,.1) 14%, transparent 30%); }
.bg-london .carriage { opacity: 1; }
.carriage svg { position: absolute; bottom: 4%; left: 0; width: min(60vw, 520px); height: auto; fill: rgba(21,18,15,.5); filter: blur(3px); transform: translateX(-110%); animation: ts-carriage 26s linear infinite; animation-delay: 4s; }
@keyframes ts-carriage { 0% { transform: translateX(-110%) translateY(0); } 2% { transform: translateX(-100%) translateY(1px); } 45% { transform: translateX(190vw) translateY(0); } 100% { transform: translateX(190vw); } }

/* 1831 実験室（S3〜S13）：実験室の全景。灯りが小さく揺れる */
.bg-lab .sky { background-image: url(img/faraday/s3_lab.webp); background-position: 40% 50%; animation: ts-sky 50s ease-in-out infinite alternate; }
.bg-lab .lamp { opacity: 1; background: radial-gradient(circle at 60% 40%, rgba(243,200,120,.28), rgba(243,200,120,.06) 22%, transparent 45%); animation: ts-flame 3.2s ease-in-out infinite alternate; }
.bg-lab .fog { opacity: .18; animation: ts-fog calc(120s * var(--fog-time)) linear infinite; }
@keyframes ts-flame { 0% { opacity: .85; } 40% { opacity: 1; } 70% { opacity: .78; } 100% { opacity: .95; } }

/* 1610 パドヴァ・1948 ベル研究所：回廊専用の絵（BL-1770。前は偉人ページの一枚絵を流用していて、吹き出しの字が背景に出ていた）
   パドヴァ＝空（星の多い夜空）と建物（透明の空・明かりの窓が一つ）の2層。ベル研究所＝人のいない廊下の1枚 */
.bg-padua .sky { background-image: url(img/galileo/s1_sky.webp); animation: ts-sky 60s ease-in-out infinite alternate; }
.bg-padua .skyline { opacity: 1; background-image: url(img/galileo/s1_buildings.webp); background-position: 50% 100%; animation: ts-breathe 30s ease-in-out infinite alternate; }
.bg-padua .fog { opacity: .3; animation: ts-fog calc(110s * var(--fog-time)) linear infinite; }
.bg-bell .sky { background-image: url(img/shannon/s1_hall.webp); background-position: 50% 50%; animation: ts-sky 60s ease-in-out infinite alternate; }

@media (prefers-reduced-motion: reduce) { .scene .layer, .carriage svg { animation: none !important; } }

/* ---------- 墨線の部品（共通） ----------
   紙の地に、墨の線を2本（外 1px・3px あけて内 1px）。角は丸めない */
.ink-box, .panel, .fact, .bag, .ask-box, .guide-line, .corridor-stats, .door, .item-card, .trial-cap {
    background: var(--paper); color: var(--ink); border: 1px solid var(--ink); border-radius: 0;
    box-shadow: inset 0 0 0 3px var(--paper), inset 0 0 0 4px var(--ink);
}

/* ---------- 絵の窓（版画を紙に刷った額） ----------
   枠は絵の縦横比（--ar。engine.js の setArt が読み込んだ絵から入れる。既定 3:2）に合わせ、絵は切らずに収める（BL-1633：
   正方形の立ち絵を 3:2 の枠で cover にしていたため、頭の上が切れていた）。高さは会話の窓の上までに収まるよう幅で抑える */
.art { position: absolute; left: 0; right: 0; margin: 0 auto; top: calc(var(--hud-h) + 10px);
    width: min(calc(100% - 24px), calc((62vh - var(--hud-h) - 32px) * var(--ar, 1.5)));
    width: min(calc(100% - 24px), calc((62dvh - var(--hud-h) - 32px) * var(--ar, 1.5)));
    aspect-ratio: var(--ar, 1.5); overflow: hidden; border-radius: 0;
    background: var(--paper); border: 6px solid var(--paper); box-shadow: 0 0 0 1px var(--ink), inset 0 0 0 1px var(--ink), 0 10px 24px rgba(0,0,0,.35);
    opacity: 0; transform: translateY(8px); transition: opacity .8s ease, transform .8s ease; pointer-events: none; }
.art.show { opacity: 1; transform: none; }
.art img { width: 100%; height: 100%; object-fit: contain; object-position: 50% 0; display: block; filter: sepia(.12) contrast(1.02); }

/* ---------- 舞台（試練・回廊） ---------- */
.stage { position: absolute; left: 0; right: 0; top: var(--hud-h); bottom: 0; overflow: auto; -webkit-overflow-scrolling: touch; display: none; padding: 12px 14px 24px; }
.stage.show { display: block; }
#app:has(.msg.show) .stage { bottom: var(--msg-h); }

/* ---------- HUD（夜の帯。下は墨の線1本だけ） ---------- */
.hud { position: absolute; left: 0; right: 0; top: 0; height: var(--hud-h); display: flex; align-items: center; gap: 0; padding: 0 5px; z-index: 5;
    background: var(--night); color: var(--paper); border-bottom: 1px solid var(--ink); }
.hud-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; flex: none; background: transparent; color: var(--paper); border: 0; border-radius: 0; min-width: 44px; height: 44px; padding: 0 13px; font-size: 14px; letter-spacing: .12em; cursor: pointer; font-family: var(--serif); }
/* 押せるのは 44px 四方、見える枠はその内側の 34px（BL-1949。帯の高さ 48px いっぱいの枠にしない） */
.hud-btn::before { content: ''; position: absolute; inset: 5px; border: 1px solid rgba(239,228,204,.55); pointer-events: none; }
.hud-btn:hover::before, .hud-btn:focus-visible::before { border-color: var(--paper); background: rgba(239,228,204,.08); }
.hud-icon { width: 22px; height: 22px; display: block; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.hud-btn[data-bag], .hud-btn[data-home] { padding: 0; }
.hud-where { flex: 1; min-width: 0; margin: 0 5px; font-size: 13px; letter-spacing: .2em; display: flex; gap: 12px; align-items: baseline; white-space: nowrap; overflow: hidden; }
.hud-where .year { font-size: 18px; font-weight: 300; letter-spacing: .25em; }

/* ---------- 会話の窓（ui_dialog を 9分割：四隅の飾りは固定・辺だけ伸ばす。スマホ下 38%・PC 下 30%） ---------- */
/* BL-1582：高さは「最低」にし、選択肢・長い台詞は窓が上へ伸びて全部見せる（窓の下で選択肢が切れていた）。伸びても HUD の下まで */
.msg { position: absolute; left: 6px; right: 6px; bottom: 6px; min-height: calc(var(--msg-h) - 6px); max-height: calc(100% - var(--hud-h) - 12px); z-index: 6; display: none; overflow-y: auto;
    border: 30px solid transparent; border-image: url(img/common/ui_dialog.webp) 66 fill / 30px stretch; background: transparent;
    color: var(--ink); padding: 8px 4px 0; cursor: pointer; user-select: none; -webkit-user-select: none; box-shadow: none; }
.msg.show { display: block; animation: msg-in .25s ease; }
@keyframes msg-in { from { transform: translateY(6px); opacity: 0; } to { transform: none; opacity: 1; } }
.msg .name { display: inline-block; font-size: 13px; font-weight: 300; letter-spacing: .3em; color: var(--ink); padding: 0 6px 0 2px; margin: 0 0 4px; }
.msg .name:empty { display: none; }
.msg .name:not(:empty)::after { content: ''; display: block; height: 1px; margin-top: 1px; background: var(--ink); width: 100%; }
.msg.sp-narr .name { display: none; }
.msg .portrait { float: left; width: 56px; height: 56px; margin: 4px 12px 4px 0; overflow: hidden; border: 1px solid var(--ink); outline: 1px solid var(--ink); outline-offset: 2px; background: var(--paper-2); display: none; }
.msg .portrait img, .msg .portrait svg { width: 100%; height: 100%; display: block; object-fit: cover; filter: sepia(.15); }
.msg.sp-giant .portrait, .msg.sp-guide .portrait, .msg.sp-you .portrait { display: block; }
.msg .text { font-size: 17px; line-height: 1.8; min-height: 88px; letter-spacing: .03em; }
.msg.sp-narr .text { color: #3d342c; }
.msg.sp-narr .text::before { content: '　'; }
.msg.sp-margin .text { color: var(--shu); font-size: 16px; }
.msg.sp-margin .name { color: var(--shu); }
.msg.sp-margin .name::after { background: var(--shu); }
.msg .text em { font-style: normal; color: var(--shu); font-weight: 600; }
.msg .text small { font-size: 13px; color: var(--pencil); }
.msg .cursor { position: sticky; float: right; bottom: 0; color: var(--shu); font-size: 12px; display: none; animation: blink 1s infinite; }
.msg .cursor.show { display: block; }
@keyframes blink { 0%, 60% { opacity: 1; } 61%, 100% { opacity: 0; } }

/* 選択肢：枠の箱にせず、墨の罫で区切った行。選べる所の印は朱 */
.msg .choices { clear: both; display: flex; flex-direction: column; margin-top: 6px; }
.choice-prompt { font-size: 13px; color: var(--sepia); letter-spacing: .25em; padding-bottom: 4px; }
.choice { text-align: left; background: transparent; border: 0; border-top: 1px solid rgba(31,26,22,.45); border-radius: 0; padding: 10px 8px 10px 38px; font-size: 16px; line-height: 1.6; position: relative; cursor: pointer; color: var(--ink); }
.choice:last-child { border-bottom: 1px solid rgba(31,26,22,.45); }
.choice .mark { position: absolute; left: 8px; top: 12px; width: 21px; height: 21px; border-radius: 50%; background: transparent; border: 1px solid var(--shu); color: var(--shu); font-size: 12px; display: flex; align-items: center; justify-content: center; }
.choice:hover, .choice:focus-visible, .choice:active { background: rgba(139,38,20,.07); color: var(--shu); outline: none; }
.choice:hover .mark, .choice:focus-visible .mark { background: var(--shu); color: var(--paper); }

/* ---------- ボタン（墨の二重線。主は墨の地・副は線だけ） ---------- */
.btn { background: var(--ink); color: var(--paper); border: 1px solid var(--ink); border-radius: 0; padding: 11px 22px; font-size: 15px; cursor: pointer; letter-spacing: .2em;
    box-shadow: inset 0 0 0 3px var(--ink), inset 0 0 0 4px rgba(239,228,204,.6); font-family: var(--serif); }
.btn:hover, .btn:focus-visible { box-shadow: inset 0 0 0 3px var(--ink), inset 0 0 0 4px var(--paper); }
.btn:active { transform: translateY(1px); }
.btn.ghost { background: transparent; color: inherit; border-color: currentColor; box-shadow: none; }
.btn.ghost:hover, .btn.ghost:focus-visible { background: rgba(139,38,20,.06); }
.btn.ghost.danger { color: var(--shu); font-size: 13px; letter-spacing: .1em; }
.btn.wide { width: 100%; margin: 10px 0; }
a.btn { text-decoration: none; display: inline-block; }

/* ---------- タイトル ---------- */
.title-screen { text-align: center; color: var(--ink); padding-top: 64px; }
.title-lantern svg { width: 80px; height: 80px; filter: drop-shadow(0 0 16px rgba(243,227,189,.9)); }
.lantern-svg .flame { transform-origin: 24px 31px; animation: flame .9s infinite alternate ease-in-out; }
.lantern-svg .flame2 { transform-origin: 24px 30px; animation: flame 1.3s infinite alternate-reverse ease-in-out; }
@keyframes flame { from { transform: scaleY(1) scaleX(1); } to { transform: scaleY(1.15) scaleX(.9) translateX(.5px); } }
.title-sub { font-weight: 300; letter-spacing: .5em; font-size: 12px; color: var(--sepia); margin-top: 14px; }
.title-main { font-weight: 300; font-size: 46px; letter-spacing: .32em; margin: 8px 0 4px; padding-left: .32em; color: var(--ink); }
.title-tag { font-weight: 300; font-size: 15px; letter-spacing: .3em; color: var(--sepia); }
.title-tag::before, .title-tag::after { content: ''; display: inline-block; width: 28px; height: 1px; background: var(--ink); vertical-align: middle; margin: 0 12px; }
.title-btns { display: flex; flex-direction: column; gap: 14px; align-items: center; margin-top: 52px; }
.title-btns .btn { min-width: 220px; }
.title-resume { font-size: 13px; color: var(--sepia); margin-top: 12px; letter-spacing: .1em; }
/* 音あり／なし（BL-1555）：墨の罫で囲んだ2つ。選んでいる方を墨で塗る */
.title-sound { display: inline-flex; align-items: stretch; margin-top: 28px; border: 1px solid var(--ink); font-size: 13px; letter-spacing: .2em; }
.title-sound-k { padding: 7px 12px 7px 14px; color: var(--sepia); border-right: 1px solid var(--ink); }
.title-sound .snd { background: transparent; color: var(--ink); border: 0; border-radius: 0; padding: 7px 16px; font: inherit; letter-spacing: inherit; cursor: pointer; min-width: 64px; }
.title-sound .snd + .snd { border-left: 1px solid var(--ink); }
.title-sound .snd.on { background: var(--ink); color: var(--paper); }
.title-sound .snd:focus-visible { outline: 2px solid var(--shu); outline-offset: 2px; }
.title-note { font-size: 12px; color: var(--pencil); margin-top: 40px; letter-spacing: .1em; }

/* ---------- 回廊 ---------- */
.corridor { color: var(--ink); }
.guide-line { display: flex; gap: 12px; align-items: flex-start; padding: 12px; }
.guide-portrait { width: 44px; height: 44px; flex: none; border: 1px solid var(--ink); background: var(--paper-2); overflow: hidden; }
.guide-portrait svg { width: 100%; height: 100%; }
.guide-line b { font-size: 13px; font-weight: 300; color: var(--ink); letter-spacing: .3em; }
.guide-line p { margin: 3px 0 0; font-size: 15px; line-height: 1.75; }
.doors { display: flex; flex-direction: column; gap: 12px; margin: 14px 0 6px; }
.door { display: flex; gap: 14px; text-align: left; width: 100%; padding: 12px; cursor: pointer; position: relative; font-family: var(--serif); }
.door:hover, .door:focus-visible { background: #f4ebd6; outline: none; }
.door.met { background: var(--paper-2); }
.door-frame { flex: none; width: 76px; height: 108px; border: 1px solid var(--ink); outline: 1px solid var(--ink); outline-offset: 2px; border-radius: 38px 38px 0 0; overflow: hidden; background: var(--night); }
.door-frame img { width: 100%; height: 100%; object-fit: cover; display: block; filter: sepia(.2); }
.door-body { flex: 1; min-width: 0; }
.door-year { font-size: 22px; font-weight: 300; color: var(--ink); letter-spacing: .2em; line-height: 1; }
.door-year small { font-size: 12px; color: var(--sepia); margin-left: 6px; letter-spacing: .15em; }
.door-name { font-weight: 600; font-size: 16px; margin-top: 6px; letter-spacing: .05em; }
.door-name small { font-weight: 400; font-size: 12px; color: var(--sepia); margin-left: 6px; }
.door-hook { font-size: 13.5px; line-height: 1.65; color: #3d342c; margin-top: 4px; }
.door-foot { margin-top: 8px; display: flex; gap: 6px; flex-wrap: wrap; }
.door-state { font-size: 12px; letter-spacing: .12em; padding: 1px 8px; border: 1px solid var(--sepia); color: var(--sepia); }
.door-state.met { border-color: var(--shu); color: var(--shu); }
.door-state.mid { border-color: var(--ink); color: var(--ink); }
/* まだ入っていない扉（BL-1789）：押せると分かるよう、墨で塗った札に「扉をひらく ›」。続きから（墨の枠）・会った（朱の枠）とは塗りで分ける */
.door-state.open { background: var(--ink); border-color: var(--ink); color: var(--paper); padding: 3px 12px; }
.door:hover .door-state.open, .door:focus-visible .door-state.open { background: var(--shu); border-color: var(--shu); }
.door-state.log { border-style: dashed; }
.dim-doors { margin-top: 20px; border-top: 1px solid var(--ink); padding-top: 10px; }
.dim-head { font-size: 13px; font-weight: 300; color: var(--ink); letter-spacing: .25em; }
.dim-list { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.dim-list span { font-size: 12px; color: var(--sepia); border-bottom: 1px dotted var(--sepia); padding: 1px 4px; }
.muted { color: var(--sepia); font-size: 13px; line-height: 1.6; }
.corridor-stats { margin-top: 16px; padding: 12px; }
.stat-lv { color: var(--sepia); font-size: 13px; letter-spacing: .25em; }
.stat-lv b { font-size: 20px; font-weight: 300; color: var(--ink); letter-spacing: .1em; }
.stat-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.chip { font-size: 12px; letter-spacing: .08em; padding: 2px 8px; border-radius: 0; background: transparent; color: var(--ink); border: 1px solid var(--sepia); }
.chip.gold { border-color: var(--shu); color: var(--shu); }

/* ---------- 試練の共通部品 ---------- */
.trial { color: var(--paper); }
.trial-head { font-size: 18px; font-weight: 300; color: var(--ink); letter-spacing: .2em; margin-bottom: 8px; display: inline-block; background: var(--paper); padding: 4px 12px; border: 1px solid var(--ink); box-shadow: inset 0 0 0 2px var(--paper), inset 0 0 0 3px var(--ink); }
.trial-cap { font-size: 15px; line-height: 1.75; padding: 10px 12px; margin: 10px 0; min-height: 48px; }
.trial-cap em { font-style: normal; color: var(--shu); font-weight: 600; }
.trial-btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.trial-btns .btn { flex: 1; min-width: 110px; padding: 11px 8px; font-size: 14px; letter-spacing: .15em; }
.trial-btns .btn.ghost { background: var(--paper); color: var(--ink); }
.panel { padding: 12px; }

/* ---------- 書き込み・観察ノート・日記（BL-1556：notes.js） ---------- */
.note-paper, .note-book, .note-page { position: relative; background: var(--paper); color: var(--ink); border: 1px solid var(--ink); box-shadow: inset 0 0 0 3px var(--paper), inset 0 0 0 4px var(--ink); padding: 16px 16px 14px; }
.note-lead { margin: 0 0 12px; font-size: 16px; line-height: 1.85; }
.note-lead em, .note-card em, .note-after em { font-style: normal; color: var(--shu); font-weight: 600; }
.note-carry-row { display: flex; }
.note-input { flex: 1; min-width: 0; font-family: var(--serif); font-size: 17px; color: var(--ink); background: transparent; border: 0; border-bottom: 1px solid var(--ink); border-radius: 0; padding: 8px 2px; outline: none;
    background-image: linear-gradient(transparent calc(100% - 1px), rgba(31,26,22,.18) 0); }
.note-input:focus { border-bottom-color: var(--shu); box-shadow: 0 1px 0 var(--shu); }
.note-input::placeholder { color: var(--pencil); }
.note-count { text-align: right; font-size: 12px; color: var(--sepia); margin-top: 4px; letter-spacing: .08em; }
.note-private { margin: 10px 0 0; font-size: 12px; color: var(--sepia); line-height: 1.7; }
.trial-btns .btn:disabled { opacity: 1; background: #4a4038; color: rgba(239,228,204,.72); box-shadow: none; cursor: default; } /* BL-1582：半透明にすると後ろの絵が透けるので、不透明の地で「まだ押せない」を見せる */

.note-book { display: grid; grid-template-columns: 1fr; gap: 14px; }
.note-col-h { font-size: 14px; font-weight: 300; letter-spacing: .3em; padding-bottom: 4px; margin-bottom: 8px; border-bottom: 1px solid var(--ink); }
.note-think .note-col-h { color: var(--shu); border-color: var(--shu); }
.note-hint { margin: 0 0 8px; font-size: 13px; color: var(--sepia); line-height: 1.7; }
.note-card { display: block; width: 100%; text-align: left; font-family: var(--serif); font-size: 15px; line-height: 1.7; color: var(--ink); background: var(--paper-2); border: 1px solid var(--ink); border-radius: 0; padding: 8px 10px; margin: 0 0 8px; }
.note-card.hidden { text-align: center; color: var(--pencil); background: repeating-linear-gradient(45deg, var(--paper-2) 0 6px, var(--paper) 6px 12px); border-style: dashed; letter-spacing: .3em; }
.note-card.idea { position: relative; padding-left: 38px; background: var(--paper); cursor: pointer; }
.note-idea-no { position: absolute; left: 9px; top: 10px; width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--shu); color: var(--shu); font-size: 11px; display: flex; align-items: center; justify-content: center; }
.note-card.idea:hover, .note-card.idea:focus-visible { background: rgba(139,38,20,.06); outline: none; }
.note-card.idea.on { border-color: var(--shu); box-shadow: inset 0 0 0 1px var(--shu); background: rgba(139,38,20,.08); }
.note-card.idea.on .note-idea-no { background: var(--shu); color: var(--paper); }
.note-stamp { position: absolute; right: 12px; top: -12px; transform: rotate(-8deg); color: var(--shu); border: 2px solid var(--shu); padding: 2px 10px; font-size: 13px; letter-spacing: .2em; background: rgba(239,228,204,.92); }
.note-after { background: var(--paper); color: var(--ink); }
.note-after[hidden] { display: none; }

/* BL-1968：罫線は字の行と間隔が合わず字の中央を通っていたので、引かない（無地の紙に行だけ。折り返しの幅や書いた一行の長さで行の高さが変わるので、罫に合わせ続けられない） */
.note-page { min-height: 220px; padding: 20px 20px 16px; cursor: pointer; background-color: var(--paper); }
.note-page.done { cursor: default; }
.note-line { margin: 0 0 8px; font-size: 16px; line-height: 1.9; letter-spacing: .04em; }
.note-line.carry { color: var(--shu); }
.note-mine { border-bottom: 1px solid var(--shu); }
@media (min-width: 900px) {
    .note-book { grid-template-columns: 1fr 1fr; gap: 24px; padding: 20px 22px 18px; }
    .note-page { padding: 26px 32px 22px; }
    .note-line { font-size: 17px; }
}

/* 望遠鏡の視野 */
.eyepiece { width: 300px; max-width: 100%; aspect-ratio: 1; margin: 0 auto; border-radius: 50%; background: radial-gradient(circle, #050812 0%, #02040a 70%, #000 100%); border: 6px solid var(--ink); box-shadow: 0 0 0 1px var(--paper), 0 0 0 4px var(--ink), 0 0 40px rgba(0,0,0,.6), inset 0 0 50px rgba(0,0,0,.9); position: relative; overflow: hidden; }
.eyepiece::before { content: ''; position: absolute; inset: 0; background: repeating-radial-gradient(circle, rgba(255,255,255,.015) 0 1px, transparent 1px 6px); }
.eyepiece .jup { position: absolute; left: 50%; top: 50%; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%; background: radial-gradient(circle at 40% 40%, #fff3d0, #d9b875 70%, #a8884d); box-shadow: 0 0 14px rgba(255,230,170,.7); }
.eyepiece .sat { position: absolute; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; background: #fff; box-shadow: 0 0 8px #fff; transition: left .9s ease, opacity .6s; }
.eyepiece .ew { position: absolute; bottom: 10px; left: 0; right: 0; display: flex; justify-content: space-between; padding: 0 22px; font-size: 12px; color: #a39880; letter-spacing: .2em; }
.eyepiece .date { position: absolute; top: 14px; left: 0; right: 0; text-align: center; color: var(--gold-l); font-size: 15px; font-weight: 300; letter-spacing: .2em; }
.eyepiece.cloud::after { content: '一面の雲'; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #d6ccb6; background: radial-gradient(circle, rgba(120,115,100,.95), rgba(60,58,50,.98)); letter-spacing: .3em; }
.night-log { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 10px; }
.night-log div { font-size: 12px; text-align: center; padding: 6px 2px; background: var(--paper); border: 1px solid var(--ink); color: var(--pencil); letter-spacing: .1em; }
.night-log div.on { color: var(--ink); border-color: var(--shu); box-shadow: inset 0 0 0 1px var(--shu); }
.night-log div.cloud { color: #9a9488; }


/* ビット */
.numpad { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 10px 0; }
.numpad button { font-size: 24px; font-weight: 300; padding: 12px 0; border-radius: 0; background: var(--paper); border: 1px solid var(--ink); box-shadow: inset 0 0 0 3px var(--paper), inset 0 0 0 4px var(--ink); color: var(--ink); cursor: pointer; }
.numpad button.picked { color: var(--shu); box-shadow: inset 0 0 0 3px var(--paper), inset 0 0 0 4px var(--shu); }
.numpad button:disabled { opacity: .35; }
.bit-tape { font-size: 22px; letter-spacing: .4em; color: var(--ink); text-align: center; background: var(--paper); border: 1px dashed var(--ink); padding: 8px; margin-top: 8px; min-height: 44px; }
.bit-tape span { display: inline-block; animation: pop .3s ease; }
@keyframes pop { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- 重ね窓（時越え・記録・報酬・袋）。後ろの画面が透けないよう不透明の夜の地 ---------- */
.overlay { position: absolute; inset: 0; z-index: 20; display: none; align-items: safe center; justify-content: center; background: linear-gradient(rgba(21,18,15,.84), rgba(21,18,15,.84)), url(img/common/hall.webp) center / cover no-repeat var(--night-2); padding: 16px; overflow: auto; } /* BL-1582：平らな暗がり（PC で左右が黒い）をやめ、回廊の絵を暗くして敷く。後ろの画面は透けない */
.overlay.show { display: flex; }
.slip { text-align: center; color: var(--paper); position: relative; width: 100%; }
.slip-rings { position: absolute; left: 50%; top: 50%; width: 10px; height: 10px; }
.slip-rings i { position: absolute; left: 50%; top: 50%; width: 10px; height: 10px; border: 1px solid var(--gold-l); border-radius: 50%; transform: translate(-50%, -50%); animation: ring 2.2s infinite ease-out; opacity: 0; }
.slip-rings i:nth-child(2) { animation-delay: .7s; } .slip-rings i:nth-child(3) { animation-delay: 1.4s; }
@keyframes ring { from { width: 10px; height: 10px; opacity: .9; } to { width: 420px; height: 420px; opacity: 0; } }
.slip-lantern svg { width: 70px; height: 70px; filter: drop-shadow(0 0 18px rgba(243,227,189,.7)); animation: sway 1.2s infinite alternate ease-in-out; }
@keyframes sway { from { transform: rotate(-6deg); } to { transform: rotate(6deg); } }
.slip-year { font-size: 60px; font-weight: 300; letter-spacing: .25em; padding-left: .25em; color: var(--paper); margin-top: 10px; }
.slip-cap { font-size: 13px; font-weight: 300; letter-spacing: .35em; color: var(--gold-l); }
.slip.hold svg, .slip.hold .flame, .slip.hold .flame2 { animation: none !important; }
.slip.arrive .slip-year { transform: scale(1.06); transition: transform .4s; }
.slip.arrive .slip-cap::after { content: ' 着いた'; color: var(--paper); }

/* 動画（BL-1575）：時越え（S1）・円板のゆくえ（S15）。重ね窓いっぱいに、幅にも高さにも収める（390px でもはみ出さない）。
   読み込み中は字幕と細い光の線だけ動かし、始まったら動画を出す。飛ばすは右下・押しやすい大きさ。角は 0〜2px */
.movie { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: #0d0b09; overflow: hidden; }
.movie video { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; opacity: 0; transition: opacity .3s; }
.movie.playing video { opacity: 1; }
.movie-wait { position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%); text-align: center; font-size: 13px; font-weight: 300; letter-spacing: .35em; color: var(--gold-l); pointer-events: none; }
.movie-wait i { display: block; width: 120px; height: 1px; margin: 14px auto 0; background: linear-gradient(90deg, transparent, var(--gold-l), transparent); background-size: 200% 100%; animation: movie-wait 1.2s infinite linear; }
@keyframes movie-wait { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.movie.playing .movie-wait { display: none; }
.movie-skip { position: absolute; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); min-height: 44px; padding: 0 16px; font: inherit; font-size: 13px; letter-spacing: .15em; color: var(--paper); background: rgba(13,11,9,.6); border: 1px solid rgba(243,227,189,.5); border-radius: 2px; cursor: pointer; z-index: 1; }
.movie-skip:hover, .movie-skip:focus-visible { border-color: var(--gold-l); outline: none; }

.fact { padding: 16px; width: 100%; max-width: 420px; }
.fact-tag { font-size: 12px; letter-spacing: .2em; color: var(--ink); display: inline-block; padding: 2px 10px; border: 1px solid var(--ink); }
.fact h3 { margin: 12px 0 6px; font-size: 18px; font-weight: 300; letter-spacing: .1em; line-height: 1.5; }
.fact ul { padding-left: 18px; margin: 0; font-size: 14.5px; line-height: 1.8; }
.fact-fiction { margin-top: 10px; font-size: 13px; line-height: 1.65; color: var(--pencil); border-left: 2px solid var(--shu); padding: 4px 10px; }
.fact-src { margin-top: 8px; font-size: 12px; color: var(--sepia); line-height: 1.6; }
.fact-btns { display: flex; gap: 8px; margin-top: 14px; justify-content: flex-end; flex-wrap: wrap; }
.fact-btns .btn { padding: 9px 16px; font-size: 13.5px; letter-spacing: .12em; }

/* 報酬の窓：見出しとボタンは固定、間の中身だけ巻き取る。ボタンが中身に重ならない（BL-1955） */
.overlay:has(> .reward) { overflow: hidden; }
.reward { width: 100%; max-width: 420px; max-height: 100%; min-height: 0; display: flex; flex-direction: column; text-align: center; color: var(--paper); }
.reward-head { flex: none; font-weight: 300; letter-spacing: .6em; padding-left: .6em; color: var(--gold-l); font-size: 13px; }
.reward-body { flex: 0 1 auto; min-height: 0; overflow: hidden auto; overscroll-behavior: contain; }
.item-card { margin: 12px auto 0; padding: 18px 16px; transform: scale(.8) rotate(-2deg); opacity: 0; transition: transform .6s cubic-bezier(.2,1.4,.4,1), opacity .4s; }
.reward.in .item-card { transform: none; opacity: 1; }
.item-glyph { width: 96px; height: 96px; margin: 0 auto; }
.item-glyph svg { width: 100%; height: 100%; }
.item-glyph.small { width: 44px; height: 44px; flex: none; }
/* 袋の行：絵の列と文字の列を全部の行で揃える（中央寄せの margin: auto を袋の中では切る・BL-1554 差し戻し） */
.bag-item .item-glyph { margin: 0; }
.bag-item > div:last-child { flex: 1; min-width: 0; }
.item-kind { font-size: 12px; color: var(--shu); letter-spacing: .3em; margin-top: 8px; }
.item-name { font-size: 22px; font-weight: 300; letter-spacing: .15em; }
.item-desc { font-size: 14px; line-height: 1.7; color: #3d342c; margin-top: 4px; }
.item-effect { font-size: 13.5px; line-height: 1.7; margin-top: 10px; border-top: 1px solid var(--ink); padding-top: 8px; }
.item-effect b { color: var(--shu); font-weight: 400; margin-right: 6px; letter-spacing: .1em; }
/* 称号：朱印（common_seal_blank）に「称号」の字を縦書きで押す */
.title-stamp { position: relative; margin: 16px auto 0; display: inline-block; text-align: left; padding: 6px 4px 6px 88px; min-height: 76px; transform: scale(1.3); opacity: 0; transition: transform .45s cubic-bezier(.2,1.4,.4,1) .5s, opacity .3s .5s; }
.title-stamp::before, .title-stamp::after { content: ''; position: absolute; left: 0; top: 50%; width: 76px; height: 76px; margin-top: -38px; }
.title-stamp::before { background: url(img/common/seal_blank.webp) center / contain no-repeat; }
.title-stamp::after { content: '称号'; display: flex; align-items: center; justify-content: center; writing-mode: vertical-rl; color: #fff6ea; font-size: 15px; font-weight: 600; letter-spacing: .15em; }
.reward.in .title-stamp { transform: none; opacity: 1; }
.title-kind { display: none; }
.title-name { font-size: 18px; font-weight: 300; letter-spacing: .12em; color: var(--paper); }
.title-desc { font-size: 13px; color: #cfc3aa; margin-top: 2px; line-height: 1.6; }
.exp-gain { margin: 16px auto 0; max-width: 320px; text-align: left; opacity: 0; transition: opacity .4s 1s; }
.reward.in .exp-gain { opacity: 1; }
.exp-row { display: grid; grid-template-columns: 1fr auto; gap: 0 10px; font-size: 14px; letter-spacing: .1em; align-items: center; margin-bottom: 8px; }
.exp-row b { color: var(--gold-l); font-weight: 400; }
.exp-row i { grid-column: 1 / -1; height: 5px; background: transparent; border: 1px solid rgba(239,228,204,.5); position: relative; overflow: hidden; margin-top: 3px; }
.exp-row i::after { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--paper); transition: width 1.2s ease 1.2s; }
.reward.in .exp-row i::after { width: var(--w); }
.exp-lv { color: var(--paper); text-align: center; margin-top: 8px; font-size: 15px; font-weight: 300; letter-spacing: .25em; }
.exp-again { font-size: 13px; color: #cfc3aa; text-align: center; margin-bottom: 4px; }
.reward .btn { flex: none; align-self: center; margin-top: 18px; background: var(--paper); color: var(--ink); box-shadow: inset 0 0 0 3px var(--paper), inset 0 0 0 4px var(--ink); }

/* 袋：窓の中だけ巻き取り、下の「閉じる」は常に見える（下が切れない） */
.bag { padding: 16px 16px 0; width: 100%; max-width: 440px; max-height: 100%; overflow: auto; overscroll-behavior: contain; }
.bag-head { font-size: 13px; font-weight: 300; letter-spacing: .35em; color: var(--sepia); }
.bag-lv { font-size: 20px; font-weight: 300; letter-spacing: .1em; margin: 4px 0 8px; }
.bag-lv small { font-size: 13px; color: var(--sepia); }
.bag h4 { margin: 14px 0 8px; font-size: 14px; font-weight: 300; letter-spacing: .3em; border-bottom: 1px solid var(--ink); padding-bottom: 3px; }
.bag-items { display: flex; flex-direction: column; gap: 10px; }
.bag-item { display: flex; gap: 12px; align-items: center; font-size: 14px; }
.bag-item b { font-weight: 600; }
.bag-item .muted { font-size: 12.5px; }
.bag-titles { display: flex; flex-wrap: wrap; gap: 6px; }
.bag .chip { border-color: var(--shu); color: var(--shu); }
.powers { display: flex; flex-direction: column; gap: 6px; }
.power { display: grid; grid-template-columns: 1fr auto; gap: 0 8px; font-size: 13px; align-items: center; }
.power.zero { opacity: .45; }
.power i { grid-column: 1 / -1; height: 5px; border: 1px solid rgba(31,26,22,.5); position: relative; margin-top: 2px; }
.power i::after { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: var(--w); background: var(--ink); }
.power b { font-weight: 400; }
.bag-btns { position: sticky; bottom: 0; display: flex; justify-content: space-between; gap: 8px; margin: 14px -12px 0; padding: 12px 12px 16px; flex-wrap: wrap; background: var(--paper); border-top: 1px solid var(--ink); }

/* ---------- 演出 ---------- */
.fx-flicker { animation: flicker .9s steps(1); }
@keyframes flicker { 0% { filter: brightness(1); } 10% { filter: brightness(.3); } 20% { filter: brightness(1.2); } 35% { filter: brightness(.2); } 50% { filter: brightness(1); } 65% { filter: brightness(.5); } 80% { filter: brightness(1.1); } 100% { filter: brightness(1); } }
.fx-shake > * { animation: shake .5s; }
.fx-shake > .msg.show { animation: msg-in .25s ease, shake .5s; }
.fx-shake > .idea-slip.show { animation: msg-in .3s ease, shake .5s; }
.fx-dim { animation: dim 1.4s ease; }
@keyframes dim { 0% { filter: brightness(1); } 25% { filter: brightness(.12); } 70% { filter: brightness(.12); } 100% { filter: brightness(1); } }
/* BL-1953：#app ごと動かすと、演出のあいだ文書の幅が画面幅を超える（393／390）。色（filter）は #app に、ずれ（translate）は直下の子に分ける。子は全部同じ時計で動くので画面全体が一緒にガタつき、はみ出した分は #app の overflow: hidden で切れる。窓の msg-in は名前を残してやり直さない */
.fx-static { animation: statik .8s steps(2); }
.fx-static > * { animation: statik-move .8s steps(2); }
.fx-static > .msg.show { animation: msg-in .25s ease, statik-move .8s steps(2); }
.fx-static > .idea-slip.show { animation: msg-in .3s ease, statik-move .8s steps(2); }
@keyframes statik { 0% { filter: contrast(1); } 20% { filter: contrast(3) grayscale(1); } 40% { filter: contrast(.4) grayscale(1); } 60% { filter: contrast(2.5) grayscale(1); } 80% { filter: contrast(.6) grayscale(1); } 100% { filter: none; } }
@keyframes statik-move { 0% { translate: none; } 20% { translate: 3px -2px; } 40% { translate: -3px 2px; } 60% { translate: 2px 1px; } 80% { translate: -1px -1px; } 100% { translate: none; } }
@keyframes shake { 0%, 100% { translate: none; } 20% { translate: -6px 0; } 40% { translate: 6px 0; } 60% { translate: -4px 0; } 80% { translate: 4px 0; } }
.fx-flash { animation: flash .6s; }
@keyframes flash { 0% { filter: brightness(1); } 15% { filter: brightness(3); } 100% { filter: brightness(1); } }

@media (prefers-reduced-motion: reduce) { * { animation-duration: .01s !important; transition-duration: .01s !important; } }

/* 確かめの小窓 */
.ask-box { padding: 20px 18px 16px; max-width: 340px; width: 100%; }
.ask-box p { margin: 0 0 16px; line-height: 1.8; font-size: 15px; }
.ask-btns { display: flex; gap: 10px; }
.ask-btns button { flex: 1; padding: 10px 0; font-size: 15px; cursor: pointer; }
.ask-btns .btn.ghost { color: var(--ink); }

/* 飛ばすボタン */
.hud-btn[hidden] { display: none; }
.hud-btn[data-skip] { margin-left: auto; }

/* ---------- PC 幅：画面いっぱいの舞台に、絵・会話の窓・中身を真ん中にそろえる ---------- */
@media (min-width: 900px) {
    :root { --hud-h: 56px; --msg-h: 30%; }
    .hud { padding: 0 19px; gap: 4px; }
    .hud-where { font-size: 14px; }
    .hud-where .year { font-size: 20px; }
    .art { left: 0; right: 0; margin: 0 auto; top: calc(var(--hud-h) + 16px); width: min(calc(100% - 64px), calc((70vh - var(--hud-h) - 40px) * var(--ar, 1.5))); border-width: 8px; }
    .msg { left: 0; right: 0; margin: 0 auto; width: min(1040px, calc(100% - 64px)); bottom: 12px; min-height: calc(var(--msg-h) - 12px); max-height: calc(100% - var(--hud-h) - 24px); border-width: 40px; border-image-width: 40px; padding: 4px 12px 0; }
    .msg .name { font-size: 14px; }
    .msg .text { font-size: 18px; line-height: 1.9; min-height: 0; }
    .msg .portrait { width: 64px; height: 64px; }
    .msg .choices { flex-direction: row; flex-wrap: wrap; column-gap: 24px; }
    .choice-prompt { flex-basis: 100%; }
    .choice, .choice:last-child { flex: 1 1 300px; border-bottom: 1px solid rgba(31,26,22,.45); }
    .stage { padding: 20px 32px 32px; }
    .stage > * { max-width: 760px; margin-left: auto; margin-right: auto; }
    .title-screen { padding-top: 12vh; }
    .title-main { font-size: 60px; }
    .doors { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
    .stage > .corridor { max-width: 1100px; }
    .fact, .reward { max-width: 520px; }
    .bag { max-width: 560px; }
}

/* ---------- 試練の共通部品（trialkit.js・BL-1563）：計器・接点・答え合わせ・判 ---------- */
.kit-desk { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 8px auto 0; padding: 10px; background: var(--paper); border: 1px solid var(--ink); box-shadow: inset 0 0 0 3px var(--paper), inset 0 0 0 4px var(--ink); max-width: 420px; }
/* 振れた合図（BL-1579）：針が 8° を越えた瞬間、音の「チッ」と同時に計器の縁を一瞬光らせる。音なしでも分かる */
.kit-opt { display: block; margin: 8px auto 0; max-width: 420px; font-size: 12px; color: var(--paper); opacity: .85; text-shadow: 0 1px 2px rgba(0,0,0,.7); }
.kit-hint { display: block; margin-top: 4px; color: var(--shu); }
.kit-extra:empty { display: none; }
.kit-compare, .kit-log { position: relative; margin: 8px auto 0; max-width: 420px; padding: 10px 12px; background: var(--paper); color: var(--ink); border: 1px solid var(--ink); font-size: 14px; line-height: 1.7; }
.kit-row { display: flex; gap: 10px; } .kit-k { flex: 0 0 6.8em; white-space: nowrap; font-size: 12px; letter-spacing: .05em; color: #6a5f52; padding-top: 2px; }
.kit-v em { font-style: normal; color: var(--shu); font-weight: 600; }
.kit-compare.miss { padding-right: 84px; }
.kit-stamp { position: absolute; right: 10px; top: 50%; width: 64px; height: 64px; margin-top: -32px; border: 2px solid var(--shu); border-radius: 50%; color: var(--shu); font-size: 12px; line-height: 1.25; display: flex; align-items: center; justify-content: center; text-align: center; transform: rotate(-12deg); font-weight: 600; animation: kit-stamp .35s ease-out; }
@keyframes kit-stamp { from { transform: rotate(-12deg) scale(1.6); opacity: 0; } to { transform: rotate(-12deg) scale(1); opacity: 1; } }
.kit-log { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 13px; }
.kit-log .kit-k { flex-basis: 100%; }
.kit-shake { animation: kit-shake .15s linear; }
@keyframes kit-shake { 0% { transform: translate(0, 0); } 25% { transform: translate(2px, 0); } 50% { transform: translate(-2px, 1px); } 75% { transform: translate(1px, -1px); } 100% { transform: translate(0, 0); } }
@media (prefers-reduced-motion: reduce) { .kit-shake { animation: none; } }
@media (min-width: 900px) {
    .kit-desk { max-width: 520px; }
    .kit-compare, .kit-log, .kit-opt { max-width: 520px; }
}

/* ---------- S7 棚・S8 棒磁石（BL-1564） ---------- */

/* ---------- S9 力線・S10 銅の円板（BL-1565） ---------- */
/* 以後の画面に重なる薄い金の力線（engine の syncLines。#lines は絵の上・試練と会話の窓の下） */
.scene .field-lines svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.scene .field-lines.show { opacity: .4; }
.fl-overlay .fl-paths path { fill: none; stroke: #f0cf7a; stroke-width: 1.4; vector-effect: non-scaling-stroke; }
.trial-lines .trial-cap { margin-bottom: 8px; }
.kit-cover { display: flex; align-items: center; gap: 8px; margin: 8px auto 0; max-width: 420px; font-size: 12px; color: var(--paper); text-shadow: 0 1px 2px rgba(0,0,0,.7); }
.kit-cover .kit-k { flex: 0 0 auto; color: var(--paper); padding: 0; }
.kit-cover-bar { flex: 1 1 auto; height: 6px; border: 1px solid var(--gold-l); border-radius: 3px; overflow: hidden; }
.kit-cover-bar i { display: block; height: 100%; width: 0; background: var(--gold-l); transition: width .2s; }
@keyframes kit-cut { from { opacity: 1; } to { opacity: 0; } }
.trial-disk .trial-cap { margin-top: 8px; min-height: 84px; box-sizing: border-box; } /* 字幕の長さが変わっても、下の円を描く所が動かない（指の下で的がずれない） */
.kit-pad { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; margin: 8px auto 0; width: 100%; max-width: 420px; height: 200px; background: #2b2521; border: 1px solid var(--gold); border-radius: 10px; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; cursor: grab; }
.kit-pad:focus-visible { outline: 2px solid var(--shu); outline-offset: 3px; }
.kit-pad-ring { width: 150px; height: 150px; border: 2px dashed rgba(243,227,189,.6); border-radius: 50%; position: relative; }
.kit-pad-dot { position: absolute; inset: 0; transform-origin: 50% 50%; }
.kit-pad-dot::after { content: ''; position: absolute; right: -9px; top: 50%; width: 16px; height: 16px; margin-top: -8px; border-radius: 50%; background: var(--shu); box-shadow: 0 0 0 3px rgba(139,38,20,.3); }
.kit-pad-label { position: absolute; bottom: 8px; left: 0; right: 0; text-align: center; font-size: 12px; color: var(--gold-l); letter-spacing: .1em; pointer-events: none; }
.kit-pad.down { border-color: var(--gold-l); }
.kit-pad.crank .kit-pad-ring { display: none; }
@media (prefers-reduced-motion: reduce) { .kit-disk-art .cut { animation: none; opacity: 0; } }

/* ===================== 絵の取り込み（BL-1571） =====================
   絵の元は db/sources/projects/faraday-park/output/assets/timeslip/。ここ img/faraday・img/common には WebP だけを置く */

/* 立ち絵：表情の切り替えは短いフェード。回想の一枚絵（S12 bindery）は10秒で1.1倍に寄せる */
.art { overflow: hidden; }
.art img { animation: ts-art-in .28s ease-out; }
@keyframes ts-art-in { from { opacity: .25; } to { opacity: 1; } }
.art[data-k="bindery"] img { transform-origin: 45% 45%; animation: ts-art-in .6s ease-out, ts-zoom 10s ease-out forwards; }
@keyframes ts-zoom { from { transform: scale(1); } to { transform: scale(1.1); } }
/* 窓の顔：立ち絵の頭の所を切り出す（司書・ファラデー） */
.msg .portrait img.face, .guide-portrait img.face { width: 100%; height: 100%; object-fit: cover; object-position: 50% 4%; transform: scale(1.9); transform-origin: 50% 8%; filter: none; background: var(--paper-2); display: block; }
.guide-portrait img { width: 100%; height: 100%; }

/* 時越え（S1）：電灯 → ガス灯 → ロウソクの火へ、霧を挟んでさかのぼる */
.slip-pics { position: fixed; inset: 0; z-index: -1; pointer-events: none; }
.slip-pics i { position: absolute; inset: 0; background: center / cover no-repeat; opacity: 0; animation: ts-slip-pic 3.6s ease-in-out forwards; }
.slip-pics .p-electric { background-image: url(img/common/slip_electric.webp); animation-delay: 0s; }
.slip-pics .p-gaslamp { background-image: url(img/common/slip_gaslamp.webp); animation-delay: 1.1s; }
.slip-pics .p-candle { background-image: url(img/common/slip_candle.webp); animation-delay: 2.2s; animation-name: ts-slip-last; }
@keyframes ts-slip-pic { 0% { opacity: 0; transform: scale(1); } 20% { opacity: .55; } 60% { opacity: .55; } 100% { opacity: 0; transform: scale(1.12); } }
@keyframes ts-slip-last { 0% { opacity: 0; transform: scale(1); } 30% { opacity: .55; } 100% { opacity: .5; transform: scale(1.08); } }
.slip-fog { position: fixed; inset: 0; z-index: -1; pointer-events: none; background: url(img/common/slip_fog.webp) 0 50% / auto 100% repeat-x; mix-blend-mode: screen; opacity: .6; animation: ts-drift 20s linear infinite; }
.slip.hold .slip-pics i, .slip.hold .slip-fog { animation: none; opacity: .5; }

/* 回廊の扉：共通の扉の絵 */
.door-frame { background: url(img/common/door_generic.webp) 50% 0 / cover no-repeat; border-radius: 38px 38px 0 0; }
/* 扉は扉の絵だけ。丸い窓の顔（BL-1770）は BL-1789 でやめた（生首が浮かんで見えたため） */

/* 記録の札（S14）・持ち物カード（S16）・観察ノート（S5）・判 */
/* BL-1582：札の絵（罫と2欄の入った帳票）を背景に敷くと線が字に重なるので、絵は縁（破れた紙の端）だけ使い、中は罫のない紙の地（会話の窓の紙から切り出した ui_paper_plain）にする */
.fact { background: var(--paper) url(img/common/ui_paper_plain.webp) 0 0 / 280px auto repeat; background-clip: padding-box; border: 12px solid transparent; border-image: url(img/common/ui_record_slip.webp) 30 / 12px stretch; }
/* BL-1582：カードの絵を丸ごと引き伸ばすと飾り枠に字が重なるので、9分割で枠は同じ太さのまま中だけ伸ばす */
.item-card { background: transparent; box-shadow: none; border: 46px solid transparent; border-width: 46px 42px 46px; border-image: url(img/common/ui_card.webp) 140 130 140 130 fill / 46px 42px 46px 42px stretch; padding: 0 2px; }
/* BL-1582：スマホ（1段）は見開きの絵だと綴じ目と飾りが字に重なるので、罫のない紙の地。PC（2段）は見開きの絵に、飾りと綴じ目を避ける余白をとる */
.note-book { background: var(--paper) url(img/common/ui_paper_plain.webp) 0 0 / 280px auto repeat; }
@media (min-width: 900px) { .note-book { background: var(--paper) url(img/common/ui_notebook.webp) center / 100% 100% no-repeat; box-shadow: none; padding: 52px 76px 48px; gap: 72px; } }
.kit-stamp { background: url(img/common/seal_unexpected.webp) center / contain no-repeat; border-color: transparent; }

/* ---------- 試練の装置の絵（BL-1882）：線の図・CSS のボタンをやめ、絵の部品を重ねる ---------- */
/* 試練の間は立ち絵を出さない（試練の箱が顔・胴に重ならない）。舞台は暗くして装置を前へ。立ち絵は試練が終われば戻る */
#app:has(.stage .trial-img) .art { visibility: hidden; }
.stage:has(.trial-img) { background: linear-gradient(rgba(21,18,15,.62), rgba(21,18,15,.62)), url(img/faraday/s3_lab.webp) center / cover no-repeat; }
.stage:has(.trial-oersted) { background: linear-gradient(rgba(21,18,15,.68), rgba(21,18,15,.68)), url(img/faraday/s5_ring.webp) center / cover no-repeat; }
.trial-img { max-width: 520px; margin: 0 auto; }
.trial-img img { -webkit-user-drag: none; user-select: none; -webkit-user-select: none; pointer-events: none; }
/* 岐路 C の十回の表（BL-1955）：試練の画面と同じ暗い地の上に、紙の表を置く。札は台詞の窓のすぐ上へ退ける（表の見出しと左の列を隠さない） */
#app:has(.stage .trial-tenlog) .art { visibility: hidden; }
/* BL-1968：暗幕を舞台（台詞の窓の上で終わる）に塗ると、窓の左右の明るい背景との間に水平の段差が出るので、画面全体（.scene）に敷いて舞台はその上へ出す */
.scene:has(.stage .trial-tenlog)::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(rgba(21,18,15,.62), rgba(21,18,15,.62)), url(img/faraday/s3_lab.webp) center / cover no-repeat; }
.stage:has(.trial-tenlog) { z-index: 1; }
.stage > .trial-tenlog { max-width: 560px; }
.tenlog-sheet { background: var(--paper); color: var(--ink); border: 1px solid var(--ink); box-shadow: inset 0 0 0 3px var(--paper), inset 0 0 0 4px var(--ink); padding: 8px 10px; }
.tenlog { width: 100%; border-collapse: collapse; font-size: 13px; }
.tenlog th { padding: 2px 6px; font-weight: 400; text-align: center; border-bottom: 1px solid var(--ink); }
.tenlog td { padding: 2px 6px; text-align: center; }
.tenlog th:first-child, .tenlog td:first-child { text-align: left; }
.tenlog td.shu { color: var(--shu); font-weight: 600; }
@media (max-height: 740px) {
    .stage:has(.trial-tenlog) { padding-top: 8px; }
    .tenlog-sheet { padding: 4px 8px; }
    .tenlog { font-size: 12.5px; line-height: 1.35; }
    .tenlog th, .tenlog td { padding: 0 6px; }
}
.trial-img .trial-head { margin-bottom: 8px; }
.trial-img .trial-cap { margin: 8px 0; }

/* 帯：横長に切った装置の絵。.kit-band-img は元の絵（3:2）の全体で、切り方は --x（左の余白）・--y（上の余白）・--w（幅）で渡す */
.kit-band { position: relative; overflow: hidden; width: 100%; background: var(--night-2); border: 1px solid var(--ink); box-shadow: 0 0 0 1px var(--paper); }
.kit-band-img { position: absolute; display: block; height: auto; max-width: none; left: var(--x, 0); top: var(--y, 0); width: var(--w, 100%); }

/* 計器の絵：検流計の軸は文字盤の (50%, 61.3%)。針の画像の中心をそこに。高さ＝文字盤の幅×0.83（幅はその 2/3） */
.kit-meter { position: relative; flex: 0 0 auto; width: 180px; aspect-ratio: 1; border-radius: 50%; transition: box-shadow .22s ease-out; }
.kit-dial { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.kit-needle { position: absolute; display: block; width: 55.33%; left: 22.33%; top: 19.8%; height: auto; transform-origin: 50% 50%; will-change: transform; }
.kit-meter.compass .kit-needle { width: 55%; left: 22.5%; top: 24.5%; }
.kit-meter.kit-ticked { box-shadow: 0 0 0 3px rgba(214, 178, 94, .8), 0 0 16px rgba(214, 178, 94, .6); transition: none; }
.kit-meter.compass.kit-ticked { box-shadow: none; filter: drop-shadow(0 0 7px rgba(214, 178, 94, .9)); }

/* 接点の絵：台の蝶番の穴 (30.4%, 39.6%) にレバーの画像の中心を合わせる。開 −25°・閉 0° */
.kit-switch { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; width: 150px; padding: 0; margin: 0; background: transparent; border: 0; color: var(--ink); cursor: pointer; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; touch-action: none; font-family: inherit; }
.kit-switch:focus-visible { outline: 2px solid var(--shu); outline-offset: 3px; }
.kit-switch-art { position: relative; display: block; width: 100%; aspect-ratio: 3 / 2; margin-top: -22%; }
.kit-switch-base { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.kit-switch-lever { position: absolute; width: 100%; height: 100%; left: -19.6%; top: -10.4%; display: block; transform: rotate(-25deg); transform-origin: 50% 50%; transition: transform .07s; }
.kit-switch.down .kit-switch-lever { transform: rotate(0deg); }
.kit-switch-cap { display: flex; flex-direction: column; align-items: center; gap: 1px; margin-top: -22%; position: relative; padding: 2px 8px; background: var(--paper); border: 1px solid var(--ink); }
.kit-switch-label { font-size: 13px; letter-spacing: .3em; padding-left: .3em; }
.kit-switch-sub { font-size: 10px; line-height: 1.3; white-space: nowrap; }
.kit-switch.down .kit-switch-label { color: var(--shu); }

/* 手元：机の板の上に計器と接点 */
.trial-img .kit-desk { background: var(--paper-2) url(img/faraday/trials/desk_wood.webp) center / cover no-repeat; box-shadow: 0 0 0 1px var(--paper), inset 0 10px 14px -10px rgba(21,18,15,.55); max-width: none; padding: 6px 8px; gap: 8px; }

/* S4：机に 電池・導線の下の方位磁針・接点。幅の割合は 366 を基準に。導線の高さがつながる位置 */
.kit-rig { position: relative; display: block; aspect-ratio: 366 / 208; padding: 0 !important; margin-top: 0; }
.kit-rig-cell { position: absolute; left: 0.5%; top: 18%; width: 20%; height: auto; }
.kit-rig .kit-meter { position: absolute; left: 14.2%; top: 3.8%; width: 51.9%; }
.kit-rig .kit-switch { position: absolute; left: 65.2%; top: 3%; width: 34.4%; }
.kit-rig .kit-switch-art { margin-top: 0; }
.kit-rig .kit-switch-cap { margin-top: 2px; }

/* S5：接点の札は台の下に離して置く（BL-1879 差し戻し）。台の絵の下端はスイッチの幅の 17.3% 分だけ絵の枠より上にあるので、そこから 6px あける。札は文字の幅より狭くならない */
.trial-ring .kit-switch-cap { margin-top: calc(-17.3% + 6px); min-width: max-content; padding: 3px 10px; }

/* S5：鉄の輪の帯（1280×853 の y170〜650）。絵の中の検流計の中心 (1062,530) に小さな針 */
.kit-ring-fig { aspect-ratio: 1280 / 480; --y: -35.42%; }
.kit-ring-fig .coil-glow { opacity: 0; transition: opacity .15s; mix-blend-mode: screen; }
.kit-ring-fig.on .coil-glow { opacity: .9; }
.fig-needle { position: absolute; left: 78.56%; top: 57.3%; width: 8.85%; height: auto; transform-origin: 50% 50%; }
.kit-cells { display: flex; justify-content: center; gap: 2px; min-height: 52px; margin: 6px 0 0; padding: 2px; background: rgba(21,18,15,.45); }
.kit-cells img { width: 52px; height: 52px; display: block; }

/* S7：棚の帯（1280×853 の y150〜650）。品は元の位置・元の大きさ */
.kit-shelf { display: block; aspect-ratio: 1280 / 500; --y: -30%; }
.kit-item { position: absolute; display: block; padding: 0; background: transparent; border: 1px dashed transparent; color: var(--ink); font-family: inherit; cursor: grab; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.kit-item:hover, .kit-item:focus-visible { border-color: var(--shu); outline: none; background: rgba(239,228,204,.12); }
.kit-item.gone { visibility: hidden; }
.kit-shelf.busy .kit-item { cursor: default; filter: brightness(.82); }
.kit-item-ico { display: block; width: 100%; height: 100%; }
.kit-item-ico img { display: block; width: 100%; height: 100%; }
.kit-item-name { position: absolute; left: 50%; bottom: -4px; transform: translateX(-50%); background: var(--paper); border: 1px solid var(--ink); padding: 0 4px; font-size: 11px; letter-spacing: .05em; white-space: nowrap; }
.kit-item-tried { position: absolute; top: 0; right: 0; font-size: 10px; color: var(--shu); border: 1px solid var(--shu); padding: 0 3px; transform: rotate(8deg); background: var(--paper); }
.kit-item[data-item="battery"] { left: 7.81%; top: 30%; width: 27.73%; height: 41%; }
.kit-item[data-item="magnet"] { left: 36.72%; top: 46%; width: 17.19%; height: 24%; }
.kit-item[data-item="disk"] { left: 53.91%; top: 21%; width: 16.02%; height: 49%; }
.kit-item[data-item="wire"] { left: 70.7%; top: 43%; width: 22.66%; height: 29%; }
.kit-ghost { position: fixed; width: 76px; height: 56px; margin: -28px 0 0 -38px; pointer-events: none; z-index: 50; filter: drop-shadow(0 4px 4px rgba(0,0,0,.45)); }
.kit-ghost img { width: 100%; height: 100%; display: block; object-fit: contain; }
/* 置く所：コイルの絵の左の口の前 */
.kit-desk-shelf { align-items: center; }
.kit-slot { position: relative; flex: 1 1 auto; min-width: 0; height: 132px; display: block; }
.kit-slot-coil { position: absolute; right: 0; top: 50%; width: 74%; height: auto; transform: translateY(-50%); filter: drop-shadow(0 3px 3px rgba(21,18,15,.4)); }
.kit-slot-label { position: absolute; left: 0; top: 50%; width: 34%; transform: translateY(-50%); text-align: center; font-size: 11px; line-height: 1.3; color: var(--ink); background: var(--paper); border: 1px dashed var(--ink); padding: 8px 2px; }
.kit-slot.over .kit-slot-label { border-color: var(--shu); color: var(--shu); background: #fff3cf; }
.kit-slot.filled .kit-slot-label { background: transparent; border: 0; padding: 0; }
.kit-slot.filled .kit-slot-label .kit-item-ico { width: 100%; height: 62px; }
.kit-slot.filled .kit-slot-label .kit-item-ico img { object-fit: contain; filter: drop-shadow(0 3px 3px rgba(21,18,15,.45)); }
.kit-desk-shelf .kit-meter { width: 148px; }

/* S8：コイルの帯（1280×853 の x100〜1060・y210〜570）。磁石の位置は trials.js の drawBar。--w・--x・--y はその切り方 */
.kit-track { aspect-ratio: 960 / 360; --w: 133.33%; --x: -10.42%; --y: -58.33%; touch-action: none; cursor: ew-resize; user-select: none; -webkit-user-select: none; }
.kit-track:focus-visible { outline: 2px solid var(--shu); outline-offset: 3px; }
.kit-bar { position: absolute; top: 39.15%; width: 47.92%; height: 21.7%; left: 0.6%; }
.kit-bar img { width: 100%; height: 100%; display: block; object-fit: fill; filter: drop-shadow(0 2px 2px rgba(0,0,0,.35)); }
.kit-track-hint { position: absolute; left: 25%; right: 25%; bottom: 3px; text-align: center; font-size: 11px; color: var(--ink); letter-spacing: .1em; background: rgba(239,228,204,.88); pointer-events: none; }

/* S9：紙の絵（緑の抜き跡なし）。紙の縁＝FIELD の外周。紙の画像の縁どり分だけ外へはみ出す */
.kit-paper { position: relative; margin: 0 auto; width: 100%; max-width: 420px; aspect-ratio: 3 / 2; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; cursor: crosshair; }
.kit-paper:focus-visible { outline: 2px solid var(--shu); outline-offset: 6px; }
.kit-paper-img { position: absolute; left: -3.12%; top: -4.74%; width: 106.4%; height: 110.2%; max-width: none; filter: drop-shadow(0 4px 8px rgba(0,0,0,.5)); }
.kit-filings { position: absolute; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; }
.kit-paper.glow .kit-filings { animation: kit-glow 1.2s ease-out both; }
@keyframes kit-glow { from { filter: brightness(1.8) drop-shadow(0 0 5px #ffd978); } to { filter: drop-shadow(0 0 2px rgba(224,181,78,.75)); } }
.kit-paper-mag { position: absolute; display: block; filter: drop-shadow(0 2px 2px rgba(0,0,0,.4)); }
.kit-brush { position: absolute; display: none; aspect-ratio: 1; transform: translate(-50%, -50%); border: 1px dashed rgba(139,38,20,.55); border-radius: 50%; background: rgba(232,199,107,.16); pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .kit-paper.glow .kit-filings { animation: none; filter: drop-shadow(0 0 2px rgba(224,181,78,.75)); } }

/* S10：装置の絵の上で円板を回す。円板の絵の中心＝(45.75%, 38.87%)・幅 44.82%（描いてある円板をちょうど覆う） */
.kit-disk-top { width: 100%; }
.kit-disk-fig { border: 1px solid var(--ink); box-shadow: 0 0 0 1px var(--paper); }
.kit-disk-art { position: relative; width: 100%; aspect-ratio: 3 / 2; overflow: hidden; }
.disk-base { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.disk-rot { position: absolute; left: 23.34%; top: 5.27%; width: 44.82%; height: auto; display: block; transform-origin: 50% 50%; will-change: transform; }
.kit-disk-art.done .disk-rot { filter: brightness(1.15) drop-shadow(0 0 6px #ffd978); }
.disk-fx { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.disk-fx .disk-lines line { stroke: #f0cf7a; stroke-width: 1.6; opacity: .85; }
.disk-fx .cut { fill: #ffd978; animation: kit-cut .25s ease-out forwards; }
@keyframes kit-cut { from { opacity: 1; } to { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .disk-fx .cut { animation: none; opacity: 0; } }
.kit-disk-mid { display: flex; gap: 8px; align-items: stretch; margin-top: 6px; }
.kit-desk-disk { flex: 0 0 auto; margin: 0; padding: 4px 6px; }
.kit-desk-disk .kit-meter { width: 118px; }
.kit-disk-mid .trial-cap { flex: 1 1 auto; margin: 0; }
.kit-hold-zone { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.kit-hold-ring { position: absolute; inset: 0; --p: 0; pointer-events: none; background: conic-gradient(from -90deg at 50% 61.3%, #e0b54e calc(var(--p) * 180deg), transparent 0);
    -webkit-mask: radial-gradient(circle farthest-side at 50% 61.3%, transparent 60%, #000 61%, #000 66%, transparent 67%); mask: radial-gradient(circle farthest-side at 50% 61.3%, transparent 60%, #000 61%, #000 66%, transparent 67%); }
.kit-pad { height: 170px; max-width: none; padding-bottom: 24px; border-radius: 0; background: linear-gradient(rgba(21,18,15,.74), rgba(21,18,15,.74)), url(img/faraday/trials/desk_wood.webp) center / cover no-repeat; } /* BL-1582：平らな色の板をやめ机の絵に。「ここで、円を描く」が輪に重ならない */
.kit-pad-ring { width: 128px; height: 128px; }
.kit-crank { width: 170px; }
.kit-crank .kit-switch-art { margin-top: 0; }

@media (min-width: 720px) {
    .trial-img .kit-desk .kit-meter { width: 230px; }
    .trial-img .kit-desk .kit-switch { width: 190px; }
    .trial-img .kit-rig .kit-meter { width: 51.9%; }
    .trial-img .kit-rig .kit-switch { width: 34.4%; }
    .kit-cells img { width: 72px; height: 72px; }
    .kit-paper { max-width: 420px; }
    .kit-desk-shelf .kit-meter { width: 200px; }
    .trial-img .kit-desk-disk .kit-meter { width: 150px; }
    .trial-disk { max-width: 460px; }
    .kit-slot { height: 170px; }
    .kit-slot.filled .kit-slot-label .kit-item-ico { height: 84px; }
}

/* ---------- game-designer 役のレビューの直し（BL-1583） ---------- */
/* タイトル：絵の中のランタンがあるので、線の図のランタンを重ねない */
.title-lantern { display: none; }
.title-screen { padding-top: 110px; }
/* S2：建物の絵を会話の窓の上に上げる（スマホでも新聞売り・掲示・階段が画面の中に入る。空の層は下まで） */
.bg-london .skyline { bottom: 38%; }
@media (min-width: 900px) { .bg-london .skyline { bottom: 24%; } }
/* 輪が窓に隠れるときだけ、輪のあいだ建物の絵と輪をいっしょに持ち上げる（--spots-lift は engine.js の showSpots が決める・BL-1947）。transform は建物のゆっくりした動きが使うので translate で動かす */
.scene .skyline { translate: 0 calc(var(--spots-lift, 0px) * -1); transition: opacity 1.2s ease, translate .35s ease; }
/* 調べる所：朱の細い墨輪（直径 44px・線 2px）が2秒周期で脈打つ。下に小さな札 */
.spots { position: absolute; inset: 0; z-index: 4; pointer-events: none; translate: 0 calc(var(--spots-lift, 0px) * -1); transition: translate .35s ease; }
.spot { position: absolute; width: 44px; height: 44px; margin: -22px 0 0 -22px; padding: 0; background: transparent; border: 0; cursor: pointer; pointer-events: auto; font-family: var(--serif); }
.spot i { position: absolute; inset: 0; border: 2px solid #c8341c; border-radius: 50%; box-shadow: 0 0 0 1px rgba(239,228,204,.75), inset 0 0 0 1px rgba(239,228,204,.75); animation: spot-pulse 2s ease-in-out infinite; }
.spot span { position: absolute; left: 50%; top: -20px; transform: translateX(-50%); white-space: nowrap; font-size: 11px; line-height: 1.5; letter-spacing: .08em; padding: 0 5px; color: var(--paper); background: var(--shu); }
.spot:hover i, .spot:focus-visible i { background: rgba(200,52,28,.25); }
.spot:focus-visible { outline: none; }
@keyframes spot-pulse { 0%, 100% { opacity: .6; transform: scale(1); } 50% { opacity: 1; transform: scale(1.06); } }
/* 岐路：歩いた道の印 */
.choice.walked { color: var(--sepia); }
.walked-mark { display: inline-block; margin-left: 8px; padding: 0 5px; font-size: 11px; color: var(--shu); border: 1px solid var(--shu); transform: rotate(-3deg); }
/* 机の端の札：S6〜S8 のあいだ、自分の札が見えている */
.idea-slip { position: absolute; top: calc(var(--hud-h) + 6px); left: 6px; z-index: 5; max-width: min(46%, 300px); display: none; padding: 5px 9px 6px; background: var(--paper); color: var(--ink); border: 1px solid var(--shu); box-shadow: 0 3px 8px rgba(21,18,15,.45); transform: rotate(-1.2deg); }
.idea-slip.show { display: block; animation: msg-in .3s ease; }
.idea-slip-k { display: block; font-size: 10px; letter-spacing: .15em; color: var(--shu); }
.idea-slip-t { display: block; font-size: 12.5px; line-height: 1.5; }
.idea-verdict { display: inline-block; margin-top: 3px; padding: 0 6px; font-size: 12px; letter-spacing: .08em; animation: kit-stamp-flat .35s ease-out; }
.idea-verdict.ok { color: var(--ink); border: 1px solid var(--ink); }
.idea-verdict.miss { color: var(--paper); background: var(--shu); transform: rotate(-3deg); }
@keyframes kit-stamp-flat { from { transform: scale(1.6); opacity: 0; } to { opacity: 1; } }
#app:has(.stage .trial-img) .idea-slip { top: auto; bottom: 10px; left: 10px; right: auto; max-width: min(calc(100% - 20px), 420px); }
#app:has(.stage .trial-tenlog) .idea-slip { top: auto; bottom: calc(var(--msg-h) + 8px); left: 10px; right: auto; max-width: min(calc(100% - 20px), 420px); }
#app:has(.kit-compare) .idea-slip { display: none; }
#app.idea-on .stage { padding-bottom: 76px; }
/* S0 扉 */
.stage:has(.trial-door) { background: linear-gradient(rgba(21,18,15,.72), rgba(21,18,15,.72)), url(img/common/hall.webp) center / cover no-repeat; }
.kit-door { position: relative; display: block; width: 100%; padding: 0; margin: 0; background: var(--night-2); border: 6px solid var(--paper); box-shadow: 0 0 0 1px var(--ink), 0 10px 24px rgba(0,0,0,.45); overflow: hidden; cursor: pointer; --p: 0; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.kit-door img { display: block; width: 100%; height: auto; }
.kit-door-light { position: absolute; left: 50%; top: 0; bottom: 0; width: calc(var(--p) * 70%); transform: translateX(-50%); background: linear-gradient(90deg, transparent, rgba(255,226,150,.95) 45%, #fff6d8 50%, rgba(255,226,150,.95) 55%, transparent); opacity: calc(var(--p) * 1.2); mix-blend-mode: screen; pointer-events: none; }
.kit-door.open .kit-door-light { width: 130%; opacity: 1; transition: width .45s ease-out; }
.kit-door:focus-visible { outline: 2px solid var(--shu); outline-offset: 3px; }
/* S14 札：長くても「閉じる」は常に見える（BL-1581 の札は画面の約2倍） */
.fact-btns { position: sticky; bottom: -12px; margin: 14px -4px -4px; padding: 10px 4px 6px; background: var(--paper) url(img/common/ui_paper_plain.webp) 0 0 / 280px auto repeat; border-top: 1px solid var(--ink); z-index: 1; }
/* S10 山場 */
.kit-climax { position: fixed; left: 0; right: 0; top: var(--hud-h); bottom: 0; z-index: 7; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 14px; overflow: hidden; pointer-events: none; }
.kit-climax-lines { position: absolute; inset: 0; opacity: 0; }
.kit-climax-lines svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.kit-climax-lines .fl-paths path { stroke-width: 2; }
.kit-climax.go .kit-climax-lines { animation: climax-lines .8s .3s ease-in forwards; }
@keyframes climax-lines { from { opacity: 0; transform: scale(1.7); } to { opacity: 1; transform: scale(.55); } }
.kit-climax-white { position: absolute; inset: 0; background: var(--paper); opacity: 0; }
.kit-climax.go .kit-climax-white { animation: climax-white .35s 1.1s ease-out; }
@keyframes climax-white { 0% { opacity: 0; } 45% { opacity: 1; } 100% { opacity: 0; } }
.kit-climax-pic { width: min(100%, 640px, calc((100dvh - var(--hud-h) - 270px) * 1.5)); opacity: 0; transform: translateX(46%); border: 6px solid var(--paper); box-shadow: 0 0 0 1px var(--ink), 0 12px 30px rgba(0,0,0,.6); }
.kit-climax-pic img { display: block; width: 100%; height: auto; filter: sepia(.12) contrast(1.02); }
.kit-climax.pic { background: linear-gradient(rgba(21,18,15,.88), rgba(21,18,15,.88)), url(img/faraday/s3_lab.webp) center / cover no-repeat; }
.kit-climax.pic .kit-climax-lines { display: none; }
.kit-climax.pic .kit-climax-pic { opacity: 1; transform: none; transition: transform .6s cubic-bezier(.2,.9,.3,1), opacity .25s; }
.kit-climax .kit-desk-disk { flex: 0 0 auto; }
.kit-climax .kit-desk-disk .kit-meter { width: 118px !important; }
.kit-climax-word { font-size: clamp(30px, 8.6vw, 52px); font-weight: 300; letter-spacing: .14em; color: var(--gold-l); text-shadow: 0 0 22px rgba(243,227,189,.55); opacity: 0; transform: translateY(6px); white-space: nowrap; }
.kit-climax.word .kit-climax-word { opacity: 1; transform: none; transition: opacity 1s ease, transform 1s ease; }
/* S16 隠し称号の2つ目の朱印（少し遅れて押される） */
/* 朱印が2つのときも左端をそろえる（箱の幅＝長いほうの文。箱ごと中央に置く） */
.title-stamps { display: table; margin: 0 auto; }
.title-stamps .title-stamp { display: block; }
.title-stamp.hidden-stamp { margin-top: 10px; transition-delay: 1.3s, 1.3s; }
.title-stamp.hidden-stamp::after { content: '隠し'; }
/* 空の枠（BL-1935）：60px 角の破線。文字の列は朱印とそろえる。1.3秒後に0.6秒でふわっと（拡大なし・音なし） */
.empty-seal { position: relative; margin-top: 10px; padding: 6px 4px 6px 88px; min-height: 60px; text-align: left; opacity: 0; transition: opacity .6s ease 1.3s; display: flex; flex-direction: column; justify-content: center; }
.empty-seal::before { content: ''; position: absolute; left: 8px; top: 50%; width: 60px; height: 60px; margin-top: -30px; box-sizing: border-box; border: 1px dashed rgba(239,228,204,.4); }
.reward.in .empty-seal { opacity: 1; }
.empty-seal-head { font-size: 15px; font-weight: 300; letter-spacing: .08em; color: #cfc3aa; }
.empty-seal-note { font-size: 13px; color: #cfc3aa; margin-top: 2px; line-height: 1.6; text-wrap: pretty; }
.item-glyph:has(.item-pic) { width: 168px; height: auto; }
/* 報酬の窓の持ち物の絵（BL-1959）：主役の品を飾り枠より強く。今の枠のまま高さの空く分だけ大きくする（スマホ 390×844 は 168→176＝朱印2つでも解像度の行がボタンに重ならない上限・PC は 168→240・PC の2列は 168→300）。背の低い画面は下の 96px のまま。袋の中の絵は変えない。枠の絵を替えると下の余白が 38px 空くので、そのときさらに大きくする（場面表 timeslip-parts の ui_card・db の BL-1959 の記録） */
.reward .item-glyph:has(.item-pic) { width: min(100%, 230px); }
@media (min-width: 900px) { .reward .item-glyph:has(.item-pic) { width: min(100%, 296px); } }
@media (min-width: 900px) and (max-height: 880px) { .reward .item-glyph:has(.item-pic) { width: min(100%, 300px); } }
.item-pic { display: block; width: 100%; height: auto; border: 1px solid var(--ink); }
.bag-item .item-glyph.small:has(.item-pic) { width: 72px; flex: none; }
/* 袋：時代のかけら・課題の紙 */
.bag-pieces { display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.bag-piece b { font-weight: 600; }
.bag-piece .muted { font-size: 12.5px; }
.bag-answer { margin-top: 3px; font-size: 13px; color: var(--shu); border-left: 2px solid var(--shu); padding-left: 8px; overflow-wrap: anywhere; }
/* 回廊：灯りが半分の扉 */
.door.half { cursor: default; background: linear-gradient(100deg, rgba(243,227,189,.95), var(--paper) 55%, #cfc3aa); }
.door.half:hover { background: linear-gradient(100deg, rgba(243,227,189,.95), var(--paper) 55%, #cfc3aa); }
.door.half .door-frame { box-shadow: 0 0 14px 3px rgba(224,181,78,.75); filter: brightness(.82); }
.door-state.half { border-color: var(--gold); color: #7c5a18; }
/* 次に来たとき：司書が課題のことを聞く */
.task-ask { max-width: 420px; }
.task-ask-who { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.task-ask-who b { font-size: 13px; font-weight: 300; letter-spacing: .3em; }
.ask-box p.task-ask-q { font-size: 16px; margin: 0 0 8px; }
.ask-box p.task-ask-lead { font-size: 13.5px; color: var(--sepia); margin: 0 0 8px; }
.ask-box p.task-ask-eg { font-size: 13.5px; line-height: 1.6; color: var(--sepia); margin: 0; }
.task-ask .note-input { width: 100%; }
.ask-box p.note-private { margin: 8px 0 12px; }
.ask-btns .btn:disabled { background: #4a4038; color: rgba(239,228,204,.72); box-shadow: none; cursor: default; }
.kit-climax.calm { background: linear-gradient(rgba(21,18,15,.88), rgba(21,18,15,.88)), url(img/faraday/s3_lab.webp) center / cover no-repeat; }
.kit-climax.frozen, .kit-climax.frozen * { transition: none !important; animation: none !important; }

/* ---------- 試練の部品8つ（parts.js・BL-1591）。線の図を描かず、渡された絵を置く。紙・札の地は共通の絵 ---------- */
.stage:has(.trial-part) { background: linear-gradient(rgba(21,18,15,.62), rgba(21,18,15,.62)), var(--part-bg, url(img/faraday/s3_lab.webp)) center / cover no-repeat; }
.stage:has(.trial-oersted) { background: linear-gradient(rgba(21,18,15,.68), rgba(21,18,15,.68)), url(img/faraday/s5_ring.webp) center / cover no-repeat; }
.part-band { aspect-ratio: 3 / 1; }
.part-band .coil-glow { opacity: 0; transition: opacity .15s; mix-blend-mode: screen; }
.part-band.on .coil-glow { opacity: .9; }
.trial-part .kit-extra { margin-top: 2px; }

/* のぞく：絵の上のレンズ。外は暗く、レンズの中だけ拡大して明るい */
.part-view { position: relative; width: 100%; overflow: hidden; border: 1px solid var(--ink); box-shadow: 0 0 0 1px var(--paper); background: var(--night-2); cursor: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.part-view:focus-visible { outline: 2px solid var(--shu); outline-offset: 3px; }
.part-view-img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; object-fit: cover; }
.part-view-shade { position: absolute; inset: 0; background: rgba(11,9,7,.72); pointer-events: none; }
.part-lens { position: absolute; aspect-ratio: 1; pointer-events: none; filter: drop-shadow(0 4px 8px rgba(0,0,0,.6)); }
.part-lens-in { position: absolute; inset: 7%; border-radius: 50%; overflow: hidden; background: var(--night-2); }
.part-lens-img { position: absolute; display: block; max-width: none; height: auto; }
.part-lens-rim { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.part-lens.near .part-lens-rim { filter: drop-shadow(0 0 6px #ffd978) brightness(1.15); }
.part-found { min-height: 2.2em; }
.part-found span:not(.kit-k) { color: var(--shu); }

/* 仕分ける：品の列と置き場。品は押して選べる */
.part-tray { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 12px 8px; border: 1px solid var(--ink); background: var(--paper-2) url(img/faraday/trials/desk_wood.webp) center / cover no-repeat; box-shadow: 0 0 0 1px var(--paper); }
.part-item { position: relative; display: block; min-height: 76px; padding: 0 0 12px; background: transparent; border: 1px dashed transparent; color: var(--ink); font-family: inherit; cursor: grab; user-select: none; -webkit-user-select: none; }
.part-item:hover, .part-item:focus-visible { border-color: var(--shu); outline: none; background: rgba(239,228,204,.14); }
.part-item .kit-item-ico { height: 58px; }
.part-item .kit-item-ico img { object-fit: contain; filter: drop-shadow(0 3px 3px rgba(21,18,15,.5)); }
.part-item .kit-item-name { white-space: nowrap; }
.part-item.picked { border: 1px solid var(--shu); background: rgba(255,243,207,.35); }
.part-item.gone { visibility: hidden; }
.part-bins { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); grid-auto-flow: column; gap: 8px; margin-top: 8px; }
.part-bin { position: relative; min-height: 112px; padding: 8px 6px; color: var(--ink); font-family: inherit; border: 1px solid var(--ink); background: var(--paper) url(img/common/ui_paper_plain.webp) center / cover no-repeat; box-shadow: 0 0 0 1px var(--paper); cursor: pointer; }
.part-bin-img { display: block; height: 42px; margin: 0 auto 4px; }
.part-bin-name { display: block; font-size: 14px; letter-spacing: .08em; }
.part-bin-got { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; margin-top: 6px; }
.part-got img { display: block; height: 44px; width: auto; max-width: 74px; object-fit: contain; filter: drop-shadow(0 2px 2px rgba(21,18,15,.45)); }
.part-bin.over, .part-picking .part-bin { border-color: var(--shu); box-shadow: 0 0 0 2px var(--shu); }
.part-bin:focus-visible { outline: 2px solid var(--shu); outline-offset: 3px; }

/* 並べる：紙の札の列。数字は朱 */
.part-list { display: flex; flex-direction: column; gap: 6px; }
.part-row { display: flex; align-items: center; gap: 10px; min-height: 64px; width: 100%; padding: 6px 12px 6px 8px; text-align: left; color: var(--ink); font-family: inherit; font-size: 15px; line-height: 1.5; border: 1px solid var(--ink); background: var(--paper) center / cover no-repeat; box-shadow: 0 0 0 1px var(--paper), 0 2px 4px rgba(0,0,0,.35); cursor: grab; user-select: none; -webkit-user-select: none; }
.part-row-n { flex: 0 0 26px; font-size: 18px; text-align: center; color: var(--shu); font-weight: 600; }
.part-row-img { flex: 0 0 auto; width: 62px; height: 50px; object-fit: contain; filter: drop-shadow(0 2px 2px rgba(21,18,15,.4)); }
.part-row-t { flex: 1 1 auto; min-width: 0; }
.part-row.picked, .part-row.dragging { border-color: var(--shu); box-shadow: 0 0 0 2px var(--shu), 0 6px 10px rgba(0,0,0,.45); }
.part-row.wrong .part-row-n { text-decoration: underline wavy var(--shu); }
.part-row.wrong { filter: brightness(.86); }
.part-row:focus-visible { outline: 2px solid var(--shu); outline-offset: 2px; }
.part-naraberu.solved .part-row { cursor: default; box-shadow: 0 0 0 1px #b8892f, 0 0 8px rgba(224,181,78,.55); }

/* はかる：品を並べ、机の計器で測る */
.part-samples { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; }
.part-sample { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; min-height: 92px; padding: 6px 4px; color: var(--ink); font-family: inherit; font-size: 13px; overflow: hidden; border: 1px solid var(--ink); background: var(--paper) url(img/common/ui_paper_plain.webp) center / cover no-repeat; box-shadow: 0 0 0 1px var(--paper); cursor: pointer; }
.part-sample-imgs { display: flex; justify-content: center; align-items: center; min-height: 56px; }
.part-sample img { display: block; height: 62px; width: auto; margin: -4px -15px; filter: drop-shadow(0 2px 2px rgba(21,18,15,.4)); }
.part-sample.picked { border-color: var(--shu); box-shadow: 0 0 0 2px var(--shu); }
.part-sample.tried .part-sample-name { color: var(--shu); }
.part-sample:focus-visible { outline: 2px solid var(--shu); outline-offset: 2px; }
.part-hakaru-desk { justify-content: center; }
.part-hakaru-desk .kit-meter { width: 170px; }

/* 当てる：札を選ぶ */
.part-q { padding: 10px 12px; font-size: 16px; line-height: 1.6; color: var(--ink); border: 1px solid var(--ink); background: var(--paper) url(img/common/ui_paper_plain.webp) center / cover no-repeat; box-shadow: 0 0 0 1px var(--paper); }
.part-cards { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; margin-top: 8px; }
.part-card { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; aspect-ratio: 2 / 3; padding: 14% 9%; color: var(--ink); font-family: inherit; font-size: 13px; line-height: 1.45; word-break: auto-phrase; border: 0; background: var(--paper) center / 100% 100% no-repeat; filter: drop-shadow(0 3px 4px rgba(0,0,0,.45)); cursor: pointer; transition: transform .12s; }
.part-card:hover:not(:disabled) { transform: translateY(-3px); }
.part-card-img { display: block; width: 100%; height: 42%; object-fit: contain; }
.part-card-t { display: block; }
.part-card:disabled { cursor: default; color: var(--ink); }
.part-cards.chosen .part-card:not(.picked) { filter: brightness(.6) drop-shadow(0 3px 4px rgba(0,0,0,.45)); }
.part-card.picked { filter: drop-shadow(0 0 6px #ffd978); transform: translateY(-3px); }
.part-card.miss { filter: drop-shadow(0 0 6px var(--shu)); }
.part-card:focus-visible { outline: 2px solid var(--shu); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .part-card { transition: none; } .part-card:hover:not(:disabled), .part-card.picked { transform: none; } }
@media (min-width: 720px) {
    .part-item { min-height: 104px; }
    .part-item .kit-item-ico { height: 84px; }
    .part-row { min-height: 74px; }
    .trial-img .part-hakaru-desk .kit-meter { width: 200px; }
    .part-card { font-size: 14px; }
}

/* スマホ幅：上下の余白を詰めて 390×844 の朱印2つまで1画面に（BL-1955） */
@media (max-width: 899px) { .overlay:has(> .reward) { padding: 8px 16px; } }
/* 報酬の窓：背の低いスマホ幅（375×667 など）でも「袋にしまう」まで1画面に収める（BL-1935。枠は 60px のまま。PC 幅は下の2列で収める・BL-1955） */
@media (max-width: 899px) and (max-height: 830px), (max-height: 520px) {
    .overlay:has(> .reward) { padding: 8px 16px; }
    .reward-head { font-size: 11px; }
    .reward .item-card { margin-top: 4px; padding: 8px 12px; }
    /* 持ち物は詰めない（svg は 96px のまま＝印と文字が読める大きさ）。絵だけ 168→96px。高さは絵に合わせ、下に空きを作らない（BL-1935 差し戻し） */
    .reward .item-glyph:has(.item-pic) { width: 150px; }
    .reward .item-kind { margin-top: 2px; font-size: 11px; }
    .reward .item-name { font-size: 17px; }
    .reward .item-desc { font-size: 12px; line-height: 1.5; margin-top: 2px; }
    .reward .item-effect { font-size: 12px; line-height: 1.5; margin-top: 4px; padding-top: 4px; }
    .reward .title-stamp { margin-top: 4px; min-height: 60px; padding: 2px 4px 2px 88px; }
    .reward .title-stamp.hidden-stamp { margin-top: 4px; }
    .reward .title-stamp::before, .reward .title-stamp::after { left: 8px; width: 60px; height: 60px; margin-top: -30px; }
    .reward .title-stamp::after { font-size: 13px; }
    .reward .title-name { font-size: 15px; }
    .reward .title-desc { font-size: 12px; line-height: 1.45; }
    .reward .empty-seal { margin-top: 4px; padding: 2px 4px 2px 88px; }
    .reward .empty-seal-note { line-height: 1.4; }
    .reward .exp-gain { margin-top: 6px; }
    .reward .exp-row { font-size: 12px; margin-bottom: 3px; }
    .reward .exp-lv { font-size: 13px; margin-top: 2px; }
    .reward .btn { margin-top: 6px; padding-top: 8px; padding-bottom: 8px; }
}
/* 報酬の窓：PC 幅で背が足りない画面（1280×800・1280×600 など）は、持ち物を左、称号と力を右の2列に並べて字を縮めずに収める（BL-1955） */
@media (min-width: 900px) and (max-height: 880px) {
    .reward { max-width: 880px; }
    .reward-body { display: grid; grid-template-columns: minmax(0, 440px) minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 32px; align-items: center; margin-top: 8px; padding-bottom: 8px; } /* 下の余白：持ち物が飛び出す動きで一瞬だけ巻き取りの棒が出ないように */
    .reward .item-card { grid-column: 1; grid-row: 1 / span 2; margin: 0; }
    .reward .title-stamps { grid-column: 2; grid-row: 1; align-self: end; display: block; margin: 0; }
    .reward .exp-gain { grid-column: 2; grid-row: 2; align-self: start; max-width: none; margin: 14px 0 0; }
}

/* ---------- 回廊の出口（サイトへ戻る。BL-1950） ---------- */
.exit-link { background: var(--paper); color: var(--ink); border: 1px solid var(--ink); border-radius: 0; min-height: 44px; padding: 8px 14px; font: inherit; font-size: 13px; letter-spacing: .12em; cursor: pointer; }
.exit-link:hover, .exit-link:focus-visible { box-shadow: inset 0 0 0 2px var(--ink), inset 0 0 0 3px var(--paper); }
.title-exit { margin-top: 16px; }
.corridor-exit { display: flex; justify-content: flex-end; margin-top: 10px; }
.exit-screen { padding: 16px 16px 0; max-width: 560px; margin: 0 auto; box-shadow: none; } /* 二重の枠は、下に留めた引き返す帯と重なるので一重にする */
.exit-head { margin: 0 0 12px; font-size: 20px; font-weight: 300; letter-spacing: .3em; }
.exit-guide { display: flex; gap: 12px; align-items: flex-start; }
.exit-guide b { font-size: 13px; font-weight: 300; letter-spacing: .3em; }
.exit-guide p { margin: 3px 0 0; font-size: 15px; line-height: 1.75; }
.exit-lead { margin: 0; font-size: 15px; line-height: 1.75; }
.exit-screen .btn.wide { display: block; box-sizing: border-box; margin: 14px 0 0; text-align: center; }
.exit-keep { margin: 8px 0 0; font-size: 13px; line-height: 1.6; color: var(--sepia); text-align: center; }
.exit-logs-head { margin: 16px 0 4px; padding-top: 10px; border-top: 1px solid var(--ink); font-size: 13px; font-weight: 300; letter-spacing: .25em; }
.exit-logs { display: flex; flex-wrap: wrap; gap: 0 14px; }
.exit-log { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink); font-size: 14px; text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 4px; }
.exit-log:hover, .exit-log:focus-visible { color: var(--shu); }
.exit-none { margin: 4px 0 0; font-size: 13px; line-height: 1.6; }
/* 読んだ攻略ログが多くても、引き返すボタンは画面の下に留める */
.exit-btns { position: sticky; bottom: 0; display: flex; justify-content: center; margin: 12px -16px 0; padding: 10px 16px 14px; background: var(--paper); border-top: 1px solid var(--ink); }
