:root {
  --bg: #f6f1e7; --card: #fffdf8; --text: #2a2723; --sub: #6f685f; --line: #e2d9c8;
  --inherit: #8a5a14; --inherit-bg: #fbf1e0; --choice: #1f5f8b; --choice-bg: #e8f1f8; --leave: #3d6b3a; --leave-bg: #ecf4ea; --warn: #9b3b2a;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1b1a18; --card: #24221f; --text: #ece7df; --sub: #a59d92; --line: #3a3732;
    --inherit: #e2b670; --inherit-bg: #3a2f1f; --choice: #8cc3ea; --choice-bg: #1f3040; --leave: #9fcf98; --leave-bg: #23331f; --warn: #f0a08f;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: "Hiragino Sans", "Yu Gothic UI", "Meiryo", "Noto Sans JP", "Apple SD Gothic Neo", sans-serif; line-height: 1.8; font-size: 16px; }
main { max-width: 620px; margin: 0 auto; padding: 24px 16px 48px; }
h1 { font-size: 2rem; margin: 24px 0 4px; letter-spacing: .06em; }
h2 { font-size: 1.3rem; margin: 0 0 6px; }
.tagline { font-size: 1.1rem; margin: 0; }
.lead { color: var(--sub); margin: 4px 0 24px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin: 0 0 16px; }
.meta, .who { color: var(--sub); font-size: .92rem; margin: 0 0 6px; }
.tag { border-radius: 8px; padding: 6px 10px; margin: 8px 0 0; font-size: .95rem; }
.tag.in { background: var(--inherit-bg); border-left: 4px solid var(--inherit); }
.tag b { color: var(--inherit); }
button, .button { font: inherit; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--text); padding: 10px 16px; cursor: pointer; min-height: 44px; text-decoration: none; display: inline-block; text-align: center; }
button.primary { background: var(--choice); border-color: var(--choice); color: #fff; }
@media (prefers-color-scheme: dark) { button.primary { color: #10202c; } }
button.big { font-size: 1.15rem; padding: 14px 28px; width: 100%; }
button.link { background: none; border: none; color: var(--choice); text-decoration: underline; padding: 8px 0; }
button:focus-visible, .button:focus-visible, select:focus-visible, input:focus-visible { outline: 3px solid var(--choice); outline-offset: 2px; }
.settings { margin: 18px 0 6px; color: var(--sub); }
.settings label { display: block; margin: 8px 0; }
.settings select { font: inherit; margin-left: 8px; max-width: 60%; }
.incoming { border-left: 4px solid var(--inherit); }
.warn { color: var(--warn); }
.note, .small { color: var(--sub); font-size: .85rem; }
ol.events { list-style: none; padding: 0; margin: 0 0 12px; }
ol.events li { display: grid; grid-template-columns: 3.6em 1fr; gap: 8px; padding: 6px 0; border-bottom: 1px dashed var(--line); animation: fade .35s ease; }
ol.events li .age { color: var(--sub); font-size: .9rem; padding-top: 2px; }
ol.events li.death { border-bottom: none; font-weight: 600; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { ol.events li { animation: none; } }
.fork { background: var(--choice-bg); border-left: 4px solid var(--choice); }
.fork .label, .label { color: var(--choice); font-weight: 700; font-size: .92rem; margin: 0 0 4px; }
.hint { color: var(--sub); font-size: .92rem; }
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choices.col { grid-template-columns: 1fr; }
.choice { background: var(--card); min-height: 52px; }
.choice.on { background: var(--choice); color: #fff; border-color: var(--choice); }
.choice[disabled] { opacity: .55; cursor: default; }
.choice.on[disabled] { opacity: 1; }
.after { margin: 10px 0 0; }
.after small { display: block; color: var(--sub); }
.advance { display: flex; gap: 16px; align-items: center; margin: 8px 0 16px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; margin: 8px 0; }
.entrust { border-left: 4px solid var(--leave); background: var(--leave-bg); }
#enLink { width: 100%; font: inherit; font-size: .8rem; padding: 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); color: var(--text); }
.ok { color: var(--leave); }
canvas { width: 100%; height: auto; border-radius: 8px; border: 1px solid var(--line); display: block; margin: 8px 0; }
.records { padding-left: 1.2em; }
.records li { margin: 8px 0; }
footer { margin-top: 40px; color: var(--sub); font-size: .82rem; border-top: 1px solid var(--line); padding-top: 12px; }
footer a { color: var(--choice); }
.help { margin: 8px 0; }
/* 第3版：選ぶ場面・親の選択・配信 */
.namebox { display: block; margin: 0 0 14px; }
.namebox span { display: block; font-size: .92rem; color: var(--sub); }
.namebox input { font: inherit; width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--text); }
ol.how { padding-left: 1.4em; color: var(--sub); font-size: .95rem; margin: 18px 0 0; }
ol.events li.scene { display: block; border-bottom: none; padding: 8px 0; }
ol.events li.scene .card { margin: 0; }
.why { color: var(--inherit); font-weight: 700; font-size: .92rem; margin: 0 0 4px; }
.lead2 { font-weight: 700; margin: 4px 0; }
.q { margin: 4px 0 10px; }
.choice { text-align: left; display: grid; grid-template-columns: 2em 1fr; align-items: start; column-gap: 6px; }
.choice .num { font-weight: 700; color: var(--choice); }
.choice.on .num { color: inherit; }
.choice small { grid-column: 2; color: var(--inherit); font-size: .82rem; line-height: 1.5; }
.choice.on small { color: inherit; }
.choice.special { border: 2px solid var(--inherit); }
.after p { margin: 6px 0 0; }
.after .effect { color: var(--choice); font-weight: 700; }
.badge { font-style: normal; font-size: .78rem; font-weight: 700; color: var(--inherit); background: var(--inherit-bg); border-radius: 6px; padding: 1px 6px; margin-right: 6px; white-space: nowrap; }
.badge.soft { color: var(--sub); background: none; border: 1px solid var(--line); }
ol.events li.legacy { background: var(--inherit-bg); border-radius: 8px; padding-left: 6px; }
body.stream .choice { font-size: 1.25rem; min-height: 64px; }
body.stream .choice .num { font-size: 1.6rem; }
body.stream .q, body.stream .lead2 { font-size: 1.2rem; }
.after .reveal { color: var(--inherit); font-weight: 700; }
ul.recap { padding-left: 1.2em; margin: 0 0 12px; color: var(--sub); font-size: .92rem; }

/* 家系パスの案内（3代目までは無料） */
.pass { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; margin: 12px 0; color: var(--sub); font-size: .92rem; }
.pass p { margin: 4px 0; }
.pass p:first-child { color: var(--text); }

/* 第27版：隠す印を必ず効かせる・暗い画面の選んだ答え・「次へ」を下に固定・英語の書体 */
[hidden] { display: none !important; }
@media (prefers-color-scheme: dark) { .choice.on { color: #10202c; } }
.advance { position: sticky; bottom: 0; background: var(--bg); padding: 10px 0 14px; z-index: 5; box-shadow: 0 -8px 12px -8px rgba(0,0,0,.15); }
html[lang="en"] body { font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }
.events li.fadein { animation: fadein .5s ease both; }
@keyframes fadein { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.pass details summary { cursor: pointer; color: var(--text); }
.shareline { font-size: .95rem; background: var(--card); border: 1px dashed var(--line); border-radius: 8px; padding: 8px 10px; }

/* 第28版：「次へ」を常に下に固定・言葉の途中で折らない・家訓の欄と一生の区切り */
.advance { position: fixed; left: 0; right: 0; bottom: 0; max-width: 720px; margin: 0 auto; padding: 10px 16px calc(12px + env(safe-area-inset-bottom)); }
#life { padding-bottom: 96px; }
.card .label, .choice span, .choice small, .meta { word-break: keep-all; overflow-wrap: anywhere; }
.events li.rest { min-height: 18vh; border: none; }
.events li.death { font-size: 1.08rem; padding: 18px 0; }
#motto.legacy-card { border: 2px solid var(--leave); background: var(--leave-bg); }
.choice small { display: block; margin-top: 4px; color: var(--inherit); }

/* 第29版：「次へ」を幅いっぱい・見出しの行間・年を折らない */
.advance #btnNext { flex: 1; min-height: 52px; font-size: 1.05rem; }
h1, .tagline { line-height: 1.3; }
.nowrap { white-space: nowrap; }

/* 第30版：絵と家系の糸の画面 */
:root { --gold: #c08a1e; --gold-glow: #ffd36a; --night: #101a33; }
@media (prefers-color-scheme: dark) { :root { --gold: #e2b048; } }
.homeart { margin: 4px -16px 0; }
.homeart .art { border-radius: 0; }
.art { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; image-rendering: pixelated; border-radius: 10px; background: #cfe3ea; }
.art.swap { animation: artin .9s ease both; }
@keyframes artin { from { opacity: .25; filter: saturate(.6); } to { opacity: 1; filter: none; } }
.art .thread { stroke: var(--gold); stroke-width: .6; stroke-dasharray: 1.4 1.2; opacity: .85; }
.art .thread.glow { stroke: var(--gold-glow); stroke-width: .9; stroke-dasharray: none; animation: tglow 1.1s ease-in-out 2; filter: drop-shadow(0 0 1.5px #ffd36a); }
@keyframes tglow { 0%, 100% { opacity: .6; } 50% { opacity: 1; } }
.art .tw { animation: twinkle 2.4s ease-in-out infinite; }
.art .tw:nth-of-type(3n) { animation-delay: .8s; } .art .tw:nth-of-type(4n) { animation-delay: 1.6s; }
@keyframes twinkle { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
.art .soul { animation: soul 3.2s ease-in forwards; filter: drop-shadow(0 0 2px #fff2b0); }
@keyframes soul { 0% { transform: translateY(0); opacity: 1; } 85% { opacity: 1; } 100% { transform: translateY(-58px); opacity: .9; } }
.artwrap { position: relative; }
.artcap { position: absolute; left: 8px; bottom: 8px; font-size: .8rem; line-height: 1.3; color: #fff; background: rgba(20, 18, 16, .55); padding: 3px 8px; border-radius: 6px; max-width: calc(100% - 16px); }
.epitaph { position: absolute; left: 0; right: 0; top: 22%; bottom: 22%; background: linear-gradient(90deg, rgba(10,14,30,0), rgba(10,14,30,.72) 22%, rgba(10,14,30,.72) 78%, rgba(10,14,30,0)); display: flex; flex-direction: column; align-items: center; justify-content: center; color: #f6efd8; text-align: center; animation: epin 1.6s ease both; pointer-events: none; text-shadow: 0 1px 3px #000; }
.epitaph b { font-size: 1.35rem; letter-spacing: .06em; }
.epitaph span { font-size: 1rem; opacity: .9; }
.epitaph small { font-size: .82rem; opacity: .8; margin-top: 4px; }
@keyframes epin { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.artwrap.rite .art { filter: saturate(.85); }
.threadbar { display: block; width: 100%; height: auto; overflow: visible; }
.threadbar .tline { fill: none; stroke: var(--gold); stroke-width: 2; stroke-linecap: round; }
.threadbar .tline.faint { stroke-dasharray: 3 5; opacity: .5; }
.threadbar .tline.pulse { stroke: var(--gold-glow); stroke-width: 3.2; stroke-dasharray: 10 8; animation: flow 1s linear 2; filter: drop-shadow(0 0 3px #ffd36a); }
@keyframes flow { from { stroke-dashoffset: 36; } to { stroke-dashoffset: 0; } }
.tnode .disc { fill: var(--inherit-bg); stroke: var(--gold); stroke-width: 1.5; }
.tnode.me .disc { fill: var(--choice-bg); stroke: var(--choice); stroke-width: 2; }
.tnode.me .ring { fill: none; stroke: var(--choice); stroke-width: 3; stroke-linecap: round; transition: stroke-dasharray .8s ease; }
.tnode.me.done .ring { stroke: var(--gold); }
.tnode.me.done .disc { stroke: var(--gold); }
.tnode.child .disc { fill: var(--card); stroke-dasharray: 3 3; }
.tnode.child.born .disc { fill: var(--leave-bg); stroke: var(--leave); stroke-dasharray: none; }
.tnode .ini { font-size: 11px; font-weight: 700; text-anchor: middle; fill: var(--text); }
.tnode .nm { font-size: 10px; text-anchor: middle; fill: var(--sub); }
.tnode.me .nm { fill: var(--choice); font-weight: 700; }
.ruler { margin: 6px 2px 0; }
.rbar { position: relative; height: 6px; background: var(--line); border-radius: 3px; }
.rbar #rulerFill { position: absolute; left: 0; top: 0; bottom: 0; background: var(--choice); border-radius: 3px; transition: width .8s ease; }
.rbar #rulerMarks b { position: absolute; top: -3px; width: 8px; height: 8px; margin-left: -4px; background: var(--gold); transform: rotate(45deg); border: 1px solid var(--card); }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 8px 0 4px; }
.chips li { font-size: .8rem; line-height: 1.4; padding: 2px 9px; border-radius: 99px; background: var(--card); border: 1px solid var(--line); }
.chips li.far { color: var(--sub); border-style: dashed; }
.chips li.gone { color: var(--sub); text-decoration: none; opacity: .75; }
.advance #btnAuto, .advance #btnSpeed { flex: 0 0 auto; font-size: .92rem; padding: 8px 10px; }
.advance { gap: 8px; }
#btnAuto[aria-pressed="true"] { background: var(--inherit-bg); border-color: var(--gold); }
.lineview .threadbar.big { max-width: 560px; margin: 4px auto; }
/* スマホ：絵を上に残し、文は下で読む */
@media (max-width: 899px) {
  .stage { position: sticky; top: 0; z-index: 4; background: var(--bg); margin: -24px -16px 10px; padding: 8px 12px 4px; box-shadow: 0 8px 12px -10px rgba(0,0,0,.25); }
  .stage .art { max-height: 26vh; width: auto; max-width: 100%; margin: 0 auto; }
  .threadbar { max-height: 50px; }
  .stage .chips { flex-wrap: nowrap; overflow-x: auto; margin: 6px 0 2px; scrollbar-width: none; }
  .stage .chips li { white-space: nowrap; }
  ol.events li, .card { scroll-margin-top: calc(var(--stageH, 280px) + 8px); }
}
/* パソコン：左に絵と家系、右に一生の文 */
@media (min-width: 900px) {
  main:has(#life:not([hidden])) { max-width: 1120px; }
  .lifewrap { display: grid; grid-template-columns: minmax(360px, 460px) 1fr; gap: 28px; align-items: start; }
  .stage { position: sticky; top: 16px; }
  .advance { max-width: 1120px; }
}
@media (prefers-reduced-motion: reduce) { .art.swap, .art .soul, .art .tw, .threadbar .tline.pulse, .art .thread.glow, .epitaph { animation: none !important; } }
.art .clouds { animation: drift 60s linear infinite alternate; }
@keyframes drift { from { transform: translateX(-6px); } to { transform: translateX(10px); } }
.art .smoke { animation: smoke 3.6s ease-out infinite; opacity: 0; }
.art .smoke.s1 { animation-delay: 1.2s; } .art .smoke.s2 { animation-delay: 2.4s; }
@keyframes smoke { 0% { transform: translate(0, 0); opacity: .8; } 100% { transform: translate(5px, -12px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .art .clouds, .art .smoke { animation: none !important; } .art .smoke { opacity: .5; } }
/* 絵が画面より狭い時も、札と名前の帯は絵の上に置く */
.artwrap { width: fit-content; max-width: 100%; margin: 0 auto; }
.artwrap .art { max-width: 100%; }
@media (min-width: 900px) { .artwrap { width: 100%; } }
@media (max-width: 899px) {
  .stage .artwrap { width: min(100%, calc(26vh * 16 / 9)); }
  .stage .art { width: 100%; height: auto; max-height: none; }
}
ol.events li.gap { display: block; text-align: center; color: var(--sub); font-size: .82rem; letter-spacing: .08em; border-bottom: none; padding: 10px 0 4px; }
.artwrap { cursor: pointer; }
.incoming .threadbar { max-width: 360px; margin: 0 auto 6px; }

/* 第31版：札は折り返す・小さい字を読みやすく・配信の説明は配信の時だけ */
.stage .chips { flex-wrap: wrap !important; overflow: visible !important; }
.stage .chips li { white-space: normal !important; }
.streamonly { display: none; }
body.stream .streamonly { display: block; }
@media (prefers-color-scheme: dark) { :root { --sub: #c2baae; } }
:root { --sub: #5f584f; }
@media (prefers-color-scheme: dark) { :root { --sub: #c2baae; } }
footer { font-size: .88rem; }
ol.events li .age { font-size: .95rem; }
.chips li { font-size: .85rem; }

/* 第32版：相談先は畳む・糸と札の見方・パソコンで選ぶ字を大きく */
footer details.help summary { cursor: pointer; color: var(--sub); }
.howto { font-size: .85rem; color: var(--sub); background: var(--card); border: 1px dashed var(--gold); border-radius: 8px; padding: 6px 10px; margin: 6px 0 0; line-height: 1.6; }
@media (min-width: 900px) { .choice { font-size: 1.08rem; } .q, .lead2 { font-size: 1.08rem; } ol.events li { font-size: 1.04rem; } }

/* 第33版：糸の名前を読める大きさに・スマホの絵を少し低く・保存の案内 */
.tnode .nm { font-size: 14px; }
.tnode .ini { font-size: 13px; }
.threadbar { max-height: none !important; }
@media (max-width: 899px) { .stage .artwrap { width: min(100%, calc(22vh * 16 / 9)); } .stage { padding-top: 4px; } }
.artcap { font-size: .88rem; }
.chips li { font-size: .9rem; }
.choice small { font-size: .9rem; }
.incoming .passin { color: var(--sub); font-size: .9rem; margin: 6px 0 0; }

/* 第35版：下の帯の下に文を隠さない・絵の切り替えをやわらかく・受け取った人の案内 */
html { scroll-padding-bottom: 96px; }
ol.events li, .after, .choices { scroll-margin-bottom: 96px; }
.art.swap { animation: artin2 .6s ease both; }
@keyframes artin2 { from { opacity: .7; } to { opacity: 1; } }
.passnote { color: var(--text); background: var(--inherit-bg); border-radius: 8px; padding: 8px 10px; font-size: .92rem; }
.epitaph b, .epitaph span { background: rgba(10,14,30,.55); padding: 0 8px; border-radius: 4px; }

/* 第37版：横向き・小さい画面・配信 */
@media (max-width: 899px) { .artcap { position: static; display: block; margin: 4px 0 0; background: none; color: var(--sub); padding: 0; } }
@media (max-height: 520px) and (orientation: landscape) { .stage { position: static !important; box-shadow: none; } .stage .artwrap { width: min(55%, 40vh * 16 / 9) !important; } }
body.stream .stage .artwrap { width: min(100%, calc(34vh * 16 / 9)) !important; }
.votetxt { margin: 8px 0 2px; font-weight: 700; color: var(--choice); }
.votebar { height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; }
.votebar span { display: block; height: 100%; width: 100%; background: var(--choice); transition: width 1s linear; }
#btnResume { margin-bottom: 10px; width: 100%; }
ul.recap li { word-break: keep-all; overflow-wrap: anywhere; }

/* 第43版：小さい灰色の字を読みやすく・カードは押すと大きく */
.note, .small { font-size: .92rem; }
.hint, .meta, .who { font-size: .95rem; }
.after small, .choice small { font-size: .92rem; line-height: 1.6; }
ol.events li .age { font-size: 1rem; font-weight: 600; }
@media (prefers-color-scheme: dark) { ol.events li .age { color: #d6cec2; } .note, .small, .hint { color: #cfc7bb; } }
.cardbox { overflow-x: auto; -webkit-overflow-scrolling: touch; }
#cardCanvas { cursor: zoom-in; }
#cardCanvas.zoom { width: 1080px; max-width: none; cursor: zoom-out; }
/* 第43版：広い画面では絵を大きく、文を一回り大きく */
@media (min-width: 1100px) {
  main:has(#life:not([hidden])) { max-width: 1240px; }
  .lifewrap { grid-template-columns: minmax(440px, 600px) 1fr; gap: 36px; }
  ol.events li { font-size: 1.1rem; }
  .choice, .q, .lead2 { font-size: 1.12rem; }
}
/* 第45版：下に固定した帯の裏に、注意書きを隠さない */
body:has(#life:not([hidden])) footer { padding-bottom: calc(110px + env(safe-area-inset-bottom)); }

/* 第45版：長いリンクは畳む */
.linkbox { margin: 8px 0 0; }
.linkbox summary { cursor: pointer; color: var(--sub); font-size: .92rem; }
.linkbox #enLink { margin-top: 6px; }

/* 第47版：スマホで名前が帯に隠れない・帯を低く（画面の4割→3割ほど） */
@media (max-width: 899px) {
  .story .card.head { scroll-margin-top: calc(var(--stageH, 260px) + 8px); padding-top: 28px; }
  .stage .artwrap { width: min(100%, calc(18vh * 16 / 9)) !important; }
  .threadbar { height: 52px; }
  .tnode .nm { font-size: 13px; }
  .stage .chips { margin: 4px 0 0; }
  .stage .chips li { font-size: .82rem; padding: 1px 8px; }
}
@media (max-width: 899px) and (max-height: 700px) {
  .stage .ruler { display: none; }
  .stage .artwrap { width: min(100%, calc(15vh * 16 / 9)) !important; }
}
#inName.need { outline: 3px solid var(--warn, #c0392b); }
.mysteryin { margin: 8px 0 0; padding: 8px 10px; border-radius: 8px; background: var(--inherit-bg); border-left: 3px solid var(--gold); }

/* 第49版：スマホの手触り */
@media (max-width: 899px) {
  ol.events li { font-size: 1.06rem; line-height: 1.8; }
  .q, .lead2 { font-size: 1.1rem; line-height: 1.8; }
  .choice { font-size: 1.06rem; line-height: 1.55; min-height: 58px; padding: 12px 14px; }
  /* 選ぶボタンは、画面の下（親指の届く所）に寄せる */
  ol.events li.scene .card.fork:not(.done) .choices { position: sticky; bottom: calc(8px + env(safe-area-inset-bottom)); z-index: 4; background: var(--choice-bg); padding: 10px 0 6px; box-shadow: 0 -10px 14px -10px rgba(0,0,0,.25); }
  ol.events li.scene .card.fork:not(.done) { padding-bottom: 4px; }
}
/* 選んだカードが少し動く・子が生まれると糸が伸びる・亡くなる時に夜へ変わる */
.choice.on { animation: pickpop .38s ease both; }
@keyframes pickpop { 0% { transform: scale(1); } 45% { transform: scale(1.03) translateY(-3px); } 100% { transform: none; } }
.threadbar.grow .tline:last-of-type { stroke-dasharray: 220; animation: tgrow 1.4s ease-out both; }
@keyframes tgrow { from { stroke-dashoffset: 220; } to { stroke-dashoffset: 0; } }
.artwrap { position: relative; }
.artwrap.tonight::after { content: ""; position: absolute; inset: 0; background: #0b1226; pointer-events: none; animation: tonight 1.8s ease both; border-radius: inherit; }
@keyframes tonight { 0% { opacity: 0; } 45% { opacity: .7; } 100% { opacity: 0; } }
/* 人に見せたくなる画像 */
.keepbox { display: grid; gap: 14px; }
.keepone { margin: 0; display: grid; gap: 8px; }
.keepone figcaption { font-weight: 700; color: var(--sub); font-size: .92rem; }
.keepone canvas { width: 100%; height: auto; border-radius: 10px; cursor: zoom-in; }
.keepone canvas.zoom { width: 1080px; max-width: none; }
@media (min-width: 900px) { .keepbox { grid-template-columns: repeat(3, 1fr); } }
@media (prefers-reduced-motion: reduce) { .choice.on, .threadbar.grow .tline, .artwrap.tonight::after { animation: none !important; } .artwrap.tonight::after { display: none; } }
/* 生まれる前の選ぶ所は、並びのまま（下に寄せない） */
ol.events li.scene.first .card.fork .choices { position: static !important; box-shadow: none !important; padding: 0 !important; }
h1.title small { display: block; font-size: .5em; font-weight: 600; color: var(--gold, #d9b25f); margin-top: 4px; letter-spacing: .04em; }
/* 画面の審査（第49版）の直し */
.choice { color: var(--text); }
.card.fork .q { color: var(--text); }
button.wide { flex: 1 1 100%; min-height: 56px; font-size: 1.08rem; }
.entrust .row { flex-wrap: wrap; }
@media (max-width: 899px) {
  .stage .artwrap.rite { width: 100% !important; }
  .epitaph b { font-size: 1.6rem; }
  .epitaph span { font-size: 1.05rem; }
}
.keepfull { margin: 0; line-height: 1.8; }
/* 第51版：好きな国・年から始める案内（閉じられるカード） */
.offer { position: relative; border: 1px solid var(--gold, #d9b25f); border-radius: 12px; padding: 14px 16px 10px; background: var(--card); }
.offer .offerhead { font-weight: 700; margin: 0 28px 6px 0; }
.offer .offerlead { margin: 0 0 8px; line-height: 1.75; }
.offer details p { line-height: 1.75; }
.offerclose { position: absolute; top: 6px; right: 8px; min-height: 0; padding: 4px 10px; font-size: 1.1rem; background: transparent; border: none; }
