/* 村人Aの七日間　見た目
   見た目の決まり：平らな色の面と細い線だけ。影・角丸・グラデーション・光沢は使わない。
   横長（16:9）の枠 #app を1つ置き、画面の大きさに合わせて縮めます。
   枠の中の大きさは、1280×720 を基準にした数字です（js/ui.js の STAGE_W / STAGE_H と合わせる）。 */
:root {
  --stage-w: 1280px;
  --stage-h: 720px;
  /* 色は5つだけ。薄い色は、この5色を透かして作る */
  --indigo: #1b1a38;                 /* 藍 */
  --purple: #4a3d66;                 /* くすんだ紫 */
  --orange: #dc8a4e;                 /* 夕焼けの橙 */
  --cream: #f2e9d5;                  /* クリーム */
  --red: #b5402c;                    /* 差し色の赤 */
  --cream-soft: rgba(242, 233, 213, .72);
  --cream-faint: rgba(242, 233, 213, .4);
  --indigo-soft: rgba(27, 26, 56, .62);
  --bg: var(--indigo);
  --bg-night: var(--indigo);
  --ink: var(--indigo);
  --paper: var(--cream);
  --paper-2: var(--cream);
  --line: var(--orange);
  --line-soft: var(--cream-faint);
  --accent: var(--red);
  --dim: var(--cream-soft);
  --light: var(--cream);
  --serif: "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", "Noto Serif JP", "BIZ UDPMincho", serif;
  --sans: "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Meiryo", "Noto Sans JP", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #0f0e22; }
body { -webkit-text-size-adjust: 100%; }

/* ---------- 枠 ---------- */
#app {
  --s: 1;
  position: fixed; left: 50%; top: 50%;
  width: var(--stage-w); height: var(--stage-h);
  transform: translate(-50%, -50%) scale(var(--s));
  overflow: hidden;
  background: var(--bg);
  color: var(--light);
  font-family: var(--serif);
  font-size: 26px;
  line-height: 1.7;
  text-wrap: pretty;          /* 行の終わりに1〜2文字だけ残らないように折り返す（対応するブラウザで） */
  word-break: auto-phrase;    /* 言葉の途中で折り返さない（対応するブラウザで） */
}
#app.night { background: var(--bg-night); }
#app.black { background: var(--indigo); }

button { font: inherit; color: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
button:focus-visible { outline: 3px solid var(--line); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
[hidden] { display: none !important; }

/* ---------- ボタン ---------- */
.btn {
  display: block; width: 100%; min-height: 60px; padding: 8px 24px;
  background: var(--indigo);
  border: 1.5px solid var(--cream);
  color: var(--light);
  font-weight: 700; letter-spacing: .08em; text-align: center; line-height: 1.4;
}
.btn:hover { background: var(--purple); }
.btn.main { background: var(--accent); border-color: var(--accent); color: var(--paper-2); }
.btn.main:hover { background: var(--red); border-color: var(--cream); }
.btn.quiet { background: none; border-color: transparent; color: var(--dim); font-weight: 500; min-height: 52px; font-size: 22px; }
.btn.dark { background: none; border-color: var(--ink); color: var(--ink); }
.btn.dark:hover { background: var(--indigo); color: var(--cream); }
.btn:disabled { opacity: .38; cursor: default; text-decoration: line-through; }
.btn:disabled:hover { background: var(--indigo); }
.btn.later:disabled { opacity: .62; text-decoration: none; border-style: dashed; }
.stack { display: flex; flex-direction: column; gap: 14px; }

/* ---------- 確認の枠・メニュー ---------- */
.ask-back { position: absolute; inset: 0; z-index: 50; background: rgba(27, 26, 56, .86); display: flex; align-items: center; justify-content: center; }
.ask { width: 620px; padding: 38px 44px 32px; background: var(--indigo); border: none; border-top: 3px solid var(--orange); }
.ask p { margin: 0 0 12px; line-height: 1.8; }
.ask .stack { margin-top: 24px; }

/* ---------- 上の帯 ---------- */
.hud {
  position: absolute; left: 0; right: 0; top: 0; z-index: 10; height: 76px; padding: 0 28px;
  display: flex; align-items: center; justify-content: space-between;
  pointer-events: none;
}
.hud > * { pointer-events: auto; }
.hud-left, .hud-right { display: flex; align-items: center; gap: 16px; }
.hud .day {
  padding: 2px 22px 4px; background: var(--cream); color: var(--indigo);
  font-size: 30px; font-weight: 700; letter-spacing: .12em; line-height: 1.5;
}
.hud .slots { display: flex; gap: 6px; font-weight: 700; font-size: 22px; }
.hud .slots span { width: 48px; height: 40px; display: flex; align-items: center; justify-content: center; background: var(--indigo); border: 1.5px solid var(--cream); color: var(--cream); }
.hud .slots .on { background: var(--light); border-color: var(--light); color: var(--ink); }
.hud-title { font-size: 22px; letter-spacing: .2em; color: var(--dim); }
.hud-btn { width: auto; min-height: 48px; padding: 2px 22px; font-size: 22px; }

/* ---------- 縦に長くなる画面を入れる場所 ---------- */
.page { position: absolute; inset: 0; overflow-y: auto; padding: 44px 0; }
.page.withhud { top: 76px; padding-top: 16px; }
.page { scrollbar-width: thin; scrollbar-color: var(--cream-faint) transparent; }
.page.center { display: flex; }
.page-in { width: 860px; margin: 0 auto; }
.page.center .page-in { margin: auto; }

/* ---------- タイトル ---------- */
.ttl { position: absolute; inset: 0; }
.ttl-bg { position: absolute; inset: 0; animation: fadein 1.6s both; }
.ttl-sky { position: absolute; inset: 0; overflow: hidden; background: var(--indigo); }
.ttl-sky::before { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 300px; background: var(--purple); }       /* 空の下のほう（平らな帯） */
.ttl-sky .moon { position: absolute; left: 400px; top: 150px; width: 320px; height: 320px; border-radius: 50%; background: var(--cream); }
.ttl-sky .star { position: absolute; width: 7px; height: 7px; transform: rotate(45deg); background: var(--cream); }
.ttl-sky .star:nth-child(odd) { width: 5px; height: 5px; background: var(--orange); }
/* 村の影（角ばった簡単な形）。手前の地面と、屋根の並び */
.ttl-sky .hill {
  position: absolute; left: 0; right: 0; bottom: 0; height: 230px; background: #121128;
  clip-path: polygon(0 100%, 0 62%, 6% 62%, 6% 44%, 11% 30%, 16% 44%, 16% 62%, 20% 62%, 20% 38%, 27% 20%, 34% 38%, 34% 62%,
    52% 62%, 54% 8%, 57% 8%, 59% 62%, 66% 62%, 66% 46%, 71% 32%, 76% 46%, 76% 62%, 80% 62%, 80% 36%, 87% 16%, 94% 36%, 94% 62%, 100% 62%, 100% 100%);
}

.ttl-head { position: absolute; right: 104px; top: 62px; display: flex; flex-direction: row-reverse; align-items: flex-start; gap: 30px; animation: ttl-rise 1.8s .5s both; }
.ttl-head h1 {
  margin: 0; writing-mode: vertical-rl; text-orientation: upright; white-space: nowrap;
  font-size: 72px; font-weight: 700; line-height: 1.1; letter-spacing: .06em;
}
.ttl-tag {
  margin: 16px 0 0; writing-mode: vertical-rl; white-space: nowrap; font-size: 22px; font-weight: 500; line-height: 1.9; letter-spacing: .26em;
  color: var(--cream);
}
.dia { display: inline-block; flex: none; width: 12px; height: 12px; transform: rotate(45deg); background: var(--accent); }
.ttl-head .dia { margin-top: 20px; }

.ttl-nav { position: absolute; z-index: 2; left: 44px; top: 150px; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; animation: ttl-rise 1.4s 1.3s both; }
.ttl-item {
  min-height: 56px; display: flex; align-items: center; gap: 14px; padding: 0 14px 0 8px;
  background: none; border: none; border-bottom: 1px solid transparent;
  font-size: 25px; font-weight: 500; letter-spacing: .06em; color: var(--light); white-space: nowrap;
}
/* メニューは、背景の月（x≈372から）に重ならない幅に収める。いちばん長い「シマちゃんのひみつきち」でも届かないように */
.ttl-item .dia { width: 10px; height: 10px; background: none; border: 1.5px solid var(--light); }
.ttl-item.main { font-weight: 700; }
.ttl-item.main .dia { background: var(--accent); border: none; outline: 2px solid var(--light); }
.ttl-item small { font-family: var(--sans); font-size: 17px; font-weight: 700; letter-spacing: .12em; }
.ttl-item:hover { border-bottom-color: var(--cream); }
.ttl-item:hover .dia { background: var(--light); }
.ttl-item.main:hover .dia { background: var(--accent); }

.ttl-foot { position: absolute; left: 94px; right: 40px; bottom: 26px; display: flex; align-items: center; justify-content: space-between; animation: fadein 1.4s 2s both; }
.ttl-reset { min-height: 44px; padding: 0 6px; background: none; border: none; font-family: var(--sans); font-size: 17px; letter-spacing: .08em; color: var(--cream-faint); }
.ttl-reset:hover { color: var(--light); text-decoration: underline; }
.ttl-note { margin-left: auto; font-family: var(--sans); font-size: 16px; letter-spacing: .08em; color: var(--cream-faint); }
@keyframes ttl-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .ttl-bg, .ttl-head, .ttl-nav, .ttl-foot { animation: none; } }

/* ---------- 文字だけの画面（はじまりの語り・エピローグ・おわり） ---------- */
.tell { position: absolute; inset: 0; }
.tell-scroll { position: absolute; left: 0; right: 0; top: 76px; bottom: 0; overflow-y: auto; display: flex; scrollbar-width: thin; scrollbar-color: var(--cream-faint) transparent; }
.tell-in { width: 860px; margin: 0 auto; padding: 96px 20px 56px; font-size: 27px; line-height: 1.85; align-self: flex-start; }
.tell-in.cont { padding-top: 60px; }        /* ページを変えたあと（2ページ目から） */
.tell-in p { margin: 0; min-height: 1.85em; word-break: auto-phrase; }   /* 対応するブラウザでは、言葉の途中で改行しない */
.tell-gap { height: 1.1em; }
.tell-head { margin-bottom: 22px; }
.tell-head h2 { font-size: 46px; letter-spacing: .16em; margin: 0; line-height: 1.4; }
.tell-head h1 { font-size: 76px; letter-spacing: .16em; margin: 0 0 10px; line-height: 1.3; }
.tell-in .ending-no { color: var(--dim); font-size: 21px; letter-spacing: .2em; }
.tell-in .hint { color: var(--orange); }
.tell-in .owari { font-size: 34px; letter-spacing: .4em; }
.tell-after { margin-top: 30px; animation: fadein .8s; }
.tell-after .note { color: var(--dim); font-size: 21px; margin-bottom: 12px; }
.tell-after .btn { width: 460px; }
.tell.center .tell-in { text-align: center; margin: auto; padding-top: 24px; }
.tell.center .tell-after .btn { margin: 0 auto; }
.tell-next { position: absolute; right: 120px; bottom: 30px; font-size: 22px; color: var(--line); opacity: 0; z-index: 3; }
.tell-next.on { opacity: 1; animation: bob 1.1s ease-in-out infinite; }
.tell .tapper { z-index: 4; }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }

/* ---------- 日付の札 ---------- */
.daycard { position: absolute; inset: 0; width: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 34px; background: none; border: none; }
.daycard .big { font-size: 76px; letter-spacing: .3em; font-weight: 700; }
.daycard .tap { color: var(--dim); font-size: 21px; font-family: var(--sans); }

/* ---------- 絵（背景・立ち絵）と、仮の絵 ---------- */
.bg { position: absolute; inset: 0; }
.bg-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bg.veil::after { content: ""; position: absolute; inset: 0; background: rgba(27, 26, 56, .62); }   /* 夜：暗い青を重ねる */
.ph-bg { position: absolute; inset: 0; --c: #55606a; background: var(--c); }
.ph-bg::before { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 300px; background: rgba(27, 26, 56, .22); }   /* 地面（平らな帯） */
.ph-bg .ph-name { position: absolute; left: 0; right: 0; top: 196px; text-align: center; font-size: 44px; letter-spacing: .3em; color: rgba(255, 255, 255, .5); }
.ph-bg .ph-kari { position: absolute; left: 0; right: 0; top: 268px; text-align: center; font-family: var(--sans); font-size: 19px; letter-spacing: .3em; color: rgba(255, 255, 255, .38); }
.village .ph-bg .ph-name { top: 392px; font-size: 26px; color: rgba(255, 255, 255, .34); }
.village .ph-bg .ph-kari { top: 436px; font-size: 17px; color: rgba(255, 255, 255, .28); }

.chara { position: absolute; bottom: 0; height: var(--h, 80%); display: flex; align-items: flex-end; transition: filter .25s; z-index: 1; }
.chara.left { left: 70px; }
.chara.right { right: 70px; }
.chara.on-window { bottom: 214px; }                 /* 文の枠の上に乗せる */
.chara.right.on-window { right: 150px; }
.chara.left.on-window { left: 150px; }
/* 画像の立ち絵（横480×縦720）：縮めずに、下端をそろえ、左右のはしから40px（素材役の合成と同じ置き方） */
.chara.has-img { height: 100%; bottom: 0; }
.chara.left.has-img { left: 40px; }
.chara.right.has-img { right: 40px; }
.chara.dim { filter: brightness(.5) saturate(.7); }
.chara.rest { filter: brightness(.82); }
.chara-img { height: 100%; width: auto; display: block; }
.ph-chara {
  --c: #8a8a96;
  height: 100%; aspect-ratio: 0.7; padding-top: 50%;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  clip-path: polygon(30% 0, 70% 0, 82% 14%, 82% 30%, 70% 40%, 100% 52%, 100% 100%, 0 100%, 0 52%, 30% 40%, 18% 30%, 18% 14%);   /* 頭と肩の、角ばった影 */
  background: var(--c);
  color: var(--indigo);
}
.ph-chara.small { aspect-ratio: 1.05; padding-top: 0; justify-content: center; clip-path: polygon(28% 0, 72% 0, 100% 34%, 100% 78%, 78% 100%, 22% 100%, 0 78%, 0 34%); }
.ph-chara .ph-name { font-size: 30px; font-weight: 700; letter-spacing: .12em; }
.ph-chara .ph-kari { font-family: var(--sans); font-size: 17px; letter-spacing: .2em; opacity: .65; }

/* ---------- 会話画面 ---------- */
.talk, .village { position: absolute; inset: 0; }
.msg {
  position: absolute; left: 0; right: 0; bottom: 0; height: 216px; z-index: 2;
  padding: 50px 170px 0;
  /* 藍の面。濃さ（透け具合）は data/01-basics.js の「文の枠の濃さ」で変えます */
  background: rgba(27, 26, 56, var(--msg-alpha, .85));
  border-top: 2px solid var(--cream);
}
.plate {
  position: absolute; left: 120px; top: -27px; min-width: 220px; padding: 3px 34px 5px; text-align: center;
  background: var(--paper); color: var(--ink);
  font-size: 27px; font-weight: 700; letter-spacing: .14em; line-height: 1.5;
}
/* 文字のまわりに、枠と同じ藍をごく薄くにじませる（枠が透けていても、後ろの絵の線と文字がまざらないように。影には見えない） */
.msg-text { margin: 0; font-size: 31px; line-height: 1.7; letter-spacing: .05em; min-height: 3.4em; text-shadow: 0 0 5px var(--indigo), 0 0 2px var(--indigo); }
.msg-text.narration { color: var(--cream-soft); }
.msg-next { position: absolute; right: 120px; bottom: 26px; font-size: 22px; color: var(--orange); opacity: 0; }
.msg-next.on { opacity: 1; animation: bob 1.1s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(6px); opacity: .5; } }
.tapper { position: absolute; inset: 0; width: 100%; z-index: 4; background: none; border: none; padding: 0; }
.tapper:focus-visible { outline: none; }
.talk-over { position: absolute; left: 0; right: 0; top: 76px; bottom: 216px; z-index: 3; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.talk-over.front { z-index: 5; background: rgba(27, 26, 56, .5); pointer-events: auto; padding: 10px 0; }
.got-box { display: flex; flex-direction: column; gap: 14px; width: 820px; }
.got {
  padding: 18px 34px 22px; text-align: center;
  background: var(--paper); color: var(--ink);
  border-left: 10px solid var(--red);
  opacity: 0; animation: rise .5s forwards;
}
.got small { display: block; font-family: var(--sans); font-size: 19px; letter-spacing: .3em; color: var(--accent); margin-bottom: 4px; }
.got span { font-size: 29px; font-weight: 700; line-height: 1.6; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.choice-box { width: 480px; }

/* ---------- 村の全景 ---------- */
.signs { position: absolute; left: 0; right: 0; top: 76px; bottom: 216px; z-index: 1; }
.tag {
  position: absolute; transform: translate(-50%, -50%);
  min-width: 132px; padding: 5px 14px 7px;
  display: flex; flex-direction: column; align-items: center; gap: 0;
  background: var(--cream); color: var(--indigo); border: none;
  line-height: 1.35; white-space: nowrap;
}
.tag::after { content: ""; position: absolute; left: 50%; top: 100%; width: 2px; height: 26px; margin-left: -1px; background: var(--cream); }
.tag.nopos { position: static; transform: none; display: inline-flex; margin: 8px; }
.tag b { font-size: 23px; letter-spacing: .06em; }
.tag small { font-family: var(--sans); font-size: 16px; color: var(--purple); }
.tag:hover { background: var(--orange); }
.tag[aria-pressed="true"] { background: var(--red); color: var(--cream); }
.tag[aria-pressed="true"] small { color: var(--cream); }
.tag[aria-pressed="true"]::after { background: var(--red); }
.msg.choose { padding: 34px 380px 0 120px; }
.msg.choose .place-note { margin: 0 0 10px; font-size: 22px; line-height: 1.5; color: var(--cream-soft); }
.msg.choose .place-note:empty { display: none; }
.acts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
.acts .btn { min-height: 54px; padding: 4px 14px; font-size: 22px; letter-spacing: .04em; }
.msg.choose .wait { position: absolute; right: 60px; bottom: 30px; width: 290px; min-height: 54px; font-size: 21px; font-weight: 500; color: var(--cream-soft); border-color: var(--cream-faint); background: none; }
.msg.choose .wait:hover { background: var(--purple); color: var(--cream); }
/* ---------- 村の全景（行き先を選ぶ画面）----------
   枠で囲まず、細い線と小さな文字だけ。画面の案は reference/ui/map-ui-day.png / map-ui-night.png */
.map { --map-ink: var(--cream); --map-soft: rgba(242, 233, 213, .78); --map-line: rgba(242, 233, 213, .55); }
/* 村の全景の文字とボタンの共通 */
.map { --map-ink: var(--cream); --map-soft: rgba(242, 233, 213, .8); --map-line: rgba(242, 233, 213, .55); }
.route-dia { width: 17px; height: 17px; display: block; overflow: visible; }
.route-dia .line { fill: none; stroke: var(--cream); stroke-width: 1.3; }
.route-dia .fill { fill: var(--cream); }
.route-dia .fill.line { stroke: var(--cream); }
.map .map-link { display: inline-block; width: auto; min-height: 0; background: none; border: none; padding: 6px 2px; color: var(--map-ink); font-family: var(--sans); font-size: 21px; font-weight: 400; letter-spacing: .06em; line-height: 1.4; white-space: nowrap; }
.map .map-link:hover { color: var(--orange); background: none; }
.map .menu-icon { display: flex; flex-direction: column; gap: 5px; padding: 12px 20px; }
.menu-icon i { display: block; width: 22px; height: 2px; background: currentColor; }
.map-foot { position: absolute; right: 38px; bottom: 26px; z-index: 3; display: flex; gap: 30px; padding: 12px 10px 0; border-top: 1px solid var(--map-line); }
.map .map-foot .map-link { font-size: 19px; color: var(--map-soft); }
.map .map-foot .map-link:hover { color: var(--map-ink); }
.map-note { position: absolute; left: 40px; bottom: 34px; z-index: 3; max-width: 640px; margin: 0; font-size: 18px; color: var(--map-soft); }

/* 左上と右上の札：少し透けた藍の細長い札（画面の案 reference/ui/map-hud-day.png / map-hud-night.png） */
.map { --map-accent: var(--orange); --hud-fill: rgba(27, 26, 56, .72); }
.map-head { position: absolute; left: 24px; top: 24px; z-index: 3; max-width: 900px;
  display: flex; align-items: stretch; background: var(--hud-fill); border-left: 3px solid var(--orange); padding: 10px 22px 12px 14px; }
.map-day { flex: none; display: flex; align-items: baseline; gap: 14px; padding-right: 20px; margin-right: 20px; border-right: 1px solid rgba(220, 138, 78, .8); color: var(--cream); }
.map-day .d { font-size: 28px; letter-spacing: .04em; line-height: 1.3; }
.map-day .t { font-size: 20px; color: var(--orange); font-family: var(--serif); }
.map-info { display: grid; grid-template-columns: auto 1fr; column-gap: 16px; row-gap: 6px; align-items: baseline; margin: 2px 0 0; min-width: 0; }
.map-info dt { font-family: var(--sans); font-size: 13px; color: var(--orange); white-space: nowrap; }
.map-info dd { margin: 0; color: var(--cream); line-height: 1.45; word-break: auto-phrase; }
.map-info dd.goal { font-size: 17px; font-family: var(--sans); }
.map-info dd.worry { font-size: 14px; font-family: var(--sans); color: rgba(242, 233, 213, .9); }
.map-nav { position: absolute; right: 23px; top: 24px; z-index: 3; display: flex; align-items: center; gap: 0;
  background: var(--hud-fill); padding: 6px 10px; }
.map .map-nav .map-link { padding: 8px 20px; font-family: var(--serif); font-size: 21px; }
.map .map-nav .map-link + .map-link { border-left: 1px solid rgba(220, 138, 78, .8); }
.map .map-foot, .map .map-note { text-shadow: 0 0 2px rgba(27, 26, 56, .8), 0 0 6px rgba(27, 26, 56, .5); }
/* スマホ横向きなど：札の文字を大きく */
#app.tiny .map-head { max-width: 960px; padding: 10px 20px 12px 14px; }
#app.tiny .map-day .d { font-size: 34px; }
#app.tiny .map-day .t { font-size: 25px; }
#app.tiny .map-info dt { font-size: 21px; }
#app.tiny .map-info dd.goal { font-size: 23px; }
#app.tiny .map-info dd.worry { font-size: 21px; }
#app.tiny .map .map-nav .map-link { font-size: 26px; }
#app.tiny .map .map-foot .map-link { font-size: 25px; }
#app.tiny .map-tip b { font-size: 30px; }
#app.tiny .map-tip span { font-size: 22px; }

/* 行き先の印：小さなひし形。押せる範囲は見た目より広い（84×84。スマホ横向きで指の大きさくらい） */
.map-marks { position: absolute; inset: 0; z-index: 2; }
.map-mark { position: absolute; width: 84px; height: 84px; margin: -42px 0 0 -42px; padding: 0; background: none; border: none; border-radius: 50%; }
.map-mark .dia { position: absolute; left: 50%; top: 50%; width: 12px; height: 12px; margin: -6px 0 0 -6px; transform: rotate(45deg); background: var(--cream); outline: 1.5px solid rgba(27, 26, 56, .35); }
.map-mark:hover .dia, .map-mark:focus-visible .dia { width: 15px; height: 15px; margin: -7.5px 0 0 -7.5px; }
.map-mark:focus-visible { outline: none; }
/* 気づきの印：橙色になり、まわりに輪が静かに広がる */
.map-mark.notice .dia { background: var(--orange); outline-color: var(--cream); }
.map-mark .ring { position: absolute; left: 50%; top: 50%; width: 44px; height: 44px; margin: -22px 0 0 -22px; border: 1.5px solid var(--orange); border-radius: 50%; opacity: 0; animation: map-ring 2.6s ease-out infinite; }
.map-mark .ring.r2 { animation-delay: 1.3s; }
@keyframes map-ring { 0% { transform: scale(.3); opacity: .9; } 100% { transform: scale(1.15); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .map-mark .ring { animation: none; opacity: .7; transform: scale(.8); } .map-mark .ring.r2 { display: none; } }
/* 名前と一言の小さな札 */
.map-tip { position: absolute; z-index: 4; transform: translateY(-50%); min-width: 170px; padding: 7px 18px 8px 14px; background: rgba(27, 26, 56, .9); border-left: 3px solid var(--orange); color: var(--cream); pointer-events: none; white-space: nowrap; }
.map-tip.to-left { transform: translate(-100%, -50%); }
.map-tip b { display: block; font-size: 25px; font-weight: 500; letter-spacing: .06em; line-height: 1.4; }
.map-tip span { display: block; font-family: var(--sans); font-size: 18px; color: var(--cream-soft); line-height: 1.5; }

/* ---------- 言葉帳（上に3つのタブ。枠で囲まず、細い線と余白で区切る）----------
   画面の案：reference/ui/notebook-*.png（寸法と色は notebook-mock.py）。
   文字は明朝（見出しと言葉）とゴシック（補足）だけ。色は藍・クリーム・橙・赤。 */
.nb { --nb-mut: #8c806e; --nb-line: #d6cab2; --nb-paper: #f7f0e1;
  position: absolute; inset: 0; background: var(--cream); color: var(--indigo);
  display: flex; flex-direction: column; padding: 0 64px; }
.nb button { font: inherit; color: inherit; background: none; border: none; padding: 0; text-align: left; }
.nb p { margin: 0; }
.nb-head { flex: none; position: relative; height: 104px; display: flex; align-items: flex-end; border-bottom: 1px solid var(--nb-line); }
.nb-head h2 { position: absolute; left: 0; top: 40px; margin: 0; font-size: 38px; font-weight: 400; letter-spacing: .04em; line-height: 1.2; }
.nb-tabs { display: flex; gap: 52px; margin-left: 236px; }
.nb .nb-tab { position: relative; display: flex; align-items: baseline; gap: 8px; padding: 0 0 12px; font-family: var(--sans); font-size: 20px; color: var(--nb-mut); white-space: nowrap; }
.nb .nb-tab[aria-selected="true"] { color: var(--indigo); font-weight: 700; }
.nb .nb-tab[aria-selected="true"]::after { content: ""; position: absolute; left: 0; bottom: -1px; width: calc(100% - var(--tab-tail, 0px)); height: 3px; background: var(--orange); }
.nb .nb-tab:hover { color: var(--indigo); }
.nb-tab .nb-count { font-size: 15px; font-weight: 400; color: var(--nb-mut); }
.nb-tab .nb-dot { position: absolute; right: -12px; top: -2px; }
.nb-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--red); margin-left: 6px; vertical-align: 6px; }
.nb .nb-x { position: absolute; right: -6px; top: 36px; width: 44px; height: 44px; }
.nb .nb-x::before, .nb .nb-x::after { content: ""; position: absolute; left: 10px; top: 21px; width: 25px; height: 2px; background: var(--indigo); transform: rotate(45deg); }
.nb .nb-x::after { transform: rotate(-45deg); }
.nb .nb-x:hover::before, .nb .nb-x:hover::after { background: var(--orange); }
.nb-body { flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(27, 26, 56, .25) transparent; }
.nb-new { display: inline-block; margin-left: 12px; font-style: normal; font-family: var(--sans); font-size: 15px; font-weight: 700; color: var(--red); vertical-align: 3px; }
.nb-empty { padding: 36px 0; font-size: 22px; color: var(--nb-mut); }

/* 勇者の道：左に細い縦の道、右に選んだ関所 */
.nb-route { display: grid; grid-template-columns: 236px 1fr; column-gap: 40px; min-height: 100%; padding-top: 22px; }
.nb-road { position: relative; align-self: start; list-style: none; margin: 0; padding: 0; }
.nb-road::before { content: ""; position: absolute; left: 22px; top: 30px; bottom: 50px; width: 2px; background: var(--nb-line); }
.nb .nb-stop { position: relative; width: 100%; min-height: 72px; display: flex; align-items: flex-start; gap: 16px; padding: 10px 10px 10px 13px; margin-bottom: 6px; }
.nb .nb-stop:hover { background: rgba(247, 240, 225, .7); }
.nb .nb-stop.on { background: var(--nb-paper); }
.nb .nb-stop.on::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--orange); }
.nb-stop .route-dia { position: relative; flex: none; width: 20px; height: 20px; margin-top: 5px; background: var(--cream); }
.nb-stop.on .route-dia { background: var(--nb-paper); }
.nb-stop .route-dia .line { stroke: var(--nb-mut); stroke-width: 1.6; }
.nb-stop.known .route-dia .line, .nb-stop .route-dia .fill.line { stroke: var(--orange); }
.nb-stop .route-dia .fill { fill: var(--orange); }
.nb-stop-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.nb-stop-name { font-size: 22px; line-height: 1.35; }
.nb-stop-note { font-family: var(--sans); font-size: 15px; line-height: 1.4; color: var(--nb-mut); }
.nb-stop-note.done { color: var(--indigo); }

.nb-detail { position: relative; display: flex; flex-direction: column; padding: 12px 0 64px; min-width: 0; }
.nb-kicker { font-family: var(--sans); font-size: 17px; color: var(--nb-mut); letter-spacing: .04em; }
.nb-big { margin-top: 16px !important; font-size: 36px; line-height: 1.45; letter-spacing: .02em; text-indent: -.5em; word-break: auto-phrase; }
.nb-big.empty { text-indent: 0; font-size: 28px; color: var(--nb-mut); }
.nb-steps { display: flex; align-items: center; gap: 24px; margin-top: 22px; }
.nb-step-dias { display: flex; gap: 8px; }
.nb-step-dias .route-dia { width: 20px; height: 20px; }
.nb-step-dias .route-dia .line { stroke: var(--orange); stroke-width: 1.6; }
.nb-step-dias .route-dia .fill { fill: var(--orange); }
.nb-step-word { font-family: var(--sans); font-size: 18px; }
.nb-from { margin-top: 22px !important; font-family: var(--sans); font-size: 17px; color: var(--nb-mut); }
.nb-detail hr { width: 100%; margin: 30px 0 20px; border: none; border-top: 1px solid var(--nb-line); }
.nb-label { font-family: var(--sans); font-size: 16px; font-weight: 700; color: var(--orange); letter-spacing: .06em; }
.nb-next { margin-top: 8px !important; font-size: 23px; line-height: 1.6; word-break: auto-phrase; }
.nb-foot { position: absolute; left: 0; bottom: 28px; font-family: var(--sans); font-size: 15px; color: var(--nb-mut); }

/* 手がかり */
.nb-list { padding: 24px 0 40px; }
.nb-clue { display: grid; grid-template-columns: 36px 1fr; }
.nb-new-col { padding-top: 7px; font-family: var(--sans); font-size: 15px; font-weight: 700; color: var(--red); }
.nb-clue > div { padding: 4px 0 20px; margin-bottom: 20px; border-bottom: 1px solid var(--nb-line); }
.nb-clue-text { font-size: 24px; line-height: 1.6; white-space: pre-line; word-break: auto-phrase; }
.nb-src { margin-top: 6px !important; font-family: var(--sans); font-size: 16px; color: var(--nb-mut); }

/* そのほかの話（だれから聞いたかで分ける） */
.nb-group { padding: 6px 0 22px; margin-bottom: 20px; border-bottom: 1px solid var(--nb-line); }
.nb-group:last-child { border-bottom: none; }
.nb-group h3 { display: flex; align-items: baseline; gap: 30px; margin: 0 0 10px; font-family: var(--sans); font-size: 17px; font-weight: 700; }
.nb-group h3 small { font-size: 15px; font-weight: 400; color: var(--red); }
.nb-group .nb-word { margin: 0 0 6px 16px !important; font-size: 23px; line-height: 1.75; text-indent: -.5em; }

/* スマホ横向きなど、画面が小さいとき：小さな文字を大きく。左の道は一言を隠して細くする */
#app.tiny .nb { padding: 0 40px; }
#app.tiny .nb .nb-tab { font-size: 26px; }
#app.tiny .nb-tab .nb-count { font-size: 20px; }
#app.tiny .nb-tabs { margin-left: 200px; gap: 44px; }
#app.tiny .nb-route { grid-template-columns: 210px 1fr; column-gap: 34px; }
#app.tiny .nb-stop-name { font-size: 26px; }
#app.tiny .nb-stop-note { display: none; }
#app.tiny .nb .nb-stop { min-height: 64px; align-items: center; }
#app.tiny .nb-stop .route-dia { margin-top: 0; }
#app.tiny .nb-road::before { top: 26px; width: 3px; left: 21px; }
#app.tiny .nb-kicker, #app.tiny .nb-from, #app.tiny .nb-src, #app.tiny .nb-group h3 { font-size: 22px; }
#app.tiny .nb-step-word { font-size: 23px; }
#app.tiny .nb-label { font-size: 21px; }
#app.tiny .nb-next { font-size: 27px; }
#app.tiny .nb-big { font-size: 38px; }
#app.tiny .nb-foot { font-size: 20px; }
#app.tiny .nb-new, #app.tiny .nb-new-col, #app.tiny .nb-group h3 small { font-size: 20px; }
#app.tiny .nb-clue-text, #app.tiny .nb-group .nb-word { font-size: 27px; }
#app.tiny .nb-clue { grid-template-columns: 44px 1fr; }

/* 結末の記録（言葉帳と同じ見た目） */
.rec .rec-count { margin: 0 0 18px 300px; font-family: var(--sans); font-size: 18px; color: var(--nb-mut); }
.rec-list { list-style: none; margin: 0; padding: 18px 0 40px; }
.rec-list li { display: grid; grid-template-columns: 100px 1fr; align-items: baseline; padding: 12px 0 14px; border-bottom: 1px solid var(--nb-line); }
.rec-no { font-family: var(--sans); font-size: 16px; color: var(--nb-mut); letter-spacing: .08em; }
.rec-title { font-size: 26px; line-height: 1.5; }
.rec-line { margin-top: 2px !important; font-family: var(--sans); font-size: 16px; color: var(--nb-mut); }
.rec-list li.unseen .rec-title { color: var(--nb-mut); font-size: 22px; }
#app.tiny .rec-no, #app.tiny .rec-line, #app.tiny .rec .rec-count { font-size: 21px; }
#app.tiny .rec-title { font-size: 29px; }
#app.tiny .rec-list li { grid-template-columns: 120px 1fr; }

/* 言葉帳の、勇者の道（前の形。いまは使っていない） */
.route-list { margin: 4px 0 6px; }
.route-row { display: flex; gap: 18px; padding: 8px 0; border-bottom: 1px solid rgba(27, 26, 56, .18); }
.route-name { flex: none; width: 210px; display: flex; align-items: center; gap: 12px; font-size: 22px; }
.sheet .route-dia .line { stroke: var(--indigo); }
.sheet .route-dia .fill { fill: var(--orange); }
.sheet .route-dia .fill.line { stroke: var(--orange); }
.route-info { display: flex; flex-direction: column; font-size: 22px; line-height: 1.5; }
.route-info .empty { font-size: 20px; margin: 0; }
.tell-after .note.got-note { color: var(--orange); }

/* ---------- 7日目：言葉の選択肢と、文字を打つ欄 ---------- */
.choice-box.two { width: 1180px; max-height: 100%; overflow-y: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; padding: 4px; }
.choice-box.two .btn { min-height: 52px; padding: 4px 16px; font-size: 21px; letter-spacing: .03em; }
.choice-box.two .btn.quiet { grid-column: 1 / -1; width: 420px; margin: 2px auto 0; color: var(--cream-soft); border-color: var(--cream-faint); }
.say-box { width: 760px; }
.inputrow { display: flex; gap: 12px; margin-bottom: 14px; }
.inputrow input {
  flex: 1; min-width: 0; min-height: 60px; padding: 8px 16px; font: inherit;
  background: var(--cream); color: var(--indigo); border: none;
}
.inputrow .btn { width: auto; flex: none; }

/* ---------- メニューとログ ---------- */
.ask h2 { margin: 0 0 18px; font-size: 32px; font-weight: 400; letter-spacing: .08em; }
.ask.menu { width: 680px; }
/* メニュー：言葉帳と同じく、枠の付いたボタンにせず、細い線で区切った文字の行 */
.ask.menu .stack { margin-top: 8px; gap: 0; }
.ask.menu .btn { min-height: 58px; padding: 10px 4px; background: none; border: none; border-bottom: 1px solid rgba(242, 233, 213, .22);
  font-family: var(--sans); font-size: 21px; font-weight: 400; letter-spacing: .04em; text-align: left; color: var(--cream); }
.ask.menu .btn:hover { background: none; color: var(--orange); }
.ask.menu .btn.on { background: none; color: var(--orange); }
.ask.menu .btn.quiet { border-bottom: none; color: var(--cream-soft); text-align: right; }
.ask.menu .speed { padding: 10px 4px; border-bottom: 1px solid rgba(242, 233, 213, .22); gap: 18px; }
.ask.menu .speed span { font-family: var(--sans); font-size: 21px; color: var(--cream); width: 170px; }
.ask.menu .speed .btn { width: auto; min-height: 40px; padding: 2px 6px; border-bottom: 2px solid transparent; text-align: center; color: var(--cream-soft); }
.ask.menu .speed .btn.on { color: var(--cream); border-bottom-color: var(--orange); font-weight: 700; }
#app.tiny .ask.menu .btn, #app.tiny .ask.menu .speed span { font-size: 25px; }
.ask .btn.on { background: var(--light); border-color: var(--light); color: var(--ink); }
.speed { display: flex; align-items: center; gap: 10px; font-size: 22px; }
.speed span { flex: none; width: 150px; color: var(--dim); }
.ask.logview { width: 980px; height: 620px; display: flex; flex-direction: column; }
.log-list { flex: 1; overflow-y: auto; margin-bottom: 18px; padding-right: 12px; scrollbar-width: thin; scrollbar-color: var(--cream-faint) transparent; }
.log-row { padding: 8px 0; border-bottom: 1px solid rgba(242, 233, 213, .18); font-size: 23px; line-height: 1.6; }
.log-row small { display: block; font-family: var(--sans); font-size: 17px; letter-spacing: .1em; color: var(--line); }
.log-row small:empty { display: none; }
.log-row.narration { color: var(--cream-soft); }
.log-list .empty { color: var(--dim); }
.hud-modes { display: flex; gap: 8px; }
.mode-chip { padding: 2px 14px; min-height: 40px; font-family: var(--sans); font-size: 18px; letter-spacing: .08em; background: var(--accent); border: 1px solid var(--accent); color: var(--paper-2); }

/* ---------- 言葉帳・結末の記録 ---------- */
.sheet { background: var(--cream); color: var(--indigo); padding: 34px 48px 36px; }
.sheet h2 { margin: 0 0 4px; font-size: 36px; letter-spacing: .16em; }
.sheet h3 { margin: 26px 0 8px; font-size: 21px; font-family: var(--sans); letter-spacing: .16em; color: var(--red); border-bottom: 1.5px solid var(--indigo); }
.sheet .item { padding: 10px 0; border-bottom: 1px solid rgba(27, 26, 56, .18); }
.sheet .item small { display: block; font-family: var(--sans); font-size: 18px; color: var(--purple); }
.sheet .pips { letter-spacing: .2em; color: var(--accent); margin-left: 8px; font-size: 16px; }
.sheet .empty { color: var(--purple); font-size: 22px; margin: 6px 0; }
.sheet .clue { white-space: pre-line; }
.sheet .count { font-family: var(--sans); font-size: 20px; color: var(--purple); margin: 0 0 8px; }
.sheet .unseen { color: rgba(27, 26, 56, .45); }
.sheet .foot { margin-top: 26px; }

/* ---------- 書きまちがいの知らせ ---------- */
#error { position: fixed; left: 0; right: 0; top: 0; z-index: 100; max-height: 60vh; overflow: auto;
  background: #fff3c4; color: #3a2a00; padding: 12px 16px; font-family: var(--sans); font-size: 14px; line-height: 1.6; border-bottom: 3px solid #b8402c; }
#error p { margin: 0 0 8px; }

/* ============================================================
   7日目（見下ろしのドット絵）と、最後の結末の場面
   ノベル画面とは別の、ゲームらしい見た目。文字はドットの字（DotGothic16、fonts/OFL.txt）
   ============================================================ */
@font-face {
  font-family: "DotGothic16";
  src: url("../fonts/DotGothic16-Regular.ttf") format("truetype");
  font-display: block;
}
.rpg {
  --win-fill: rgba(14, 20, 52, .9);
  --win-line: #efe6cc;
  --win-dark: #080a18;
  --win-inner: #4a63a8;
  --win-text: #fbf7ea;
  --win-gray: #7f829a;
  --win-cursor: #f2c84b;
  position: absolute; inset: 0; background: #0d0c1a;
  font-family: "DotGothic16", var(--sans);
  -webkit-font-smoothing: none; font-smooth: never;
}
.rpg-canvas { position: absolute; left: 0; top: 0; width: 100%; height: 100%; image-rendering: pixelated; image-rendering: crisp-edges; }
.rpg-tap { position: absolute; inset: 0; z-index: 1; background: none; border: none; padding: 0; }
.rpg-tap:focus-visible { outline: none; }
.rpg-ui { position: absolute; top: 0; bottom: 0; left: 0; width: 1280px; z-index: 2; pointer-events: none; }
.rpg-ui > * { pointer-events: auto; }

/* ウィンドウ：濃い紺の面に、明るい枠と、内側の細い線。角は四角 */
.rpg-win {
  position: absolute;
  background: var(--win-fill);
  border: 4px solid var(--win-line);
  box-shadow: 0 0 0 3px var(--win-dark), inset 0 0 0 3px var(--win-dark), inset 0 0 0 5px var(--win-inner);
  color: var(--win-text);
  text-shadow: 3px 3px 0 var(--win-dark);
}
.rpg-msg { left: 24px; right: 24px; bottom: 22px; height: 196px; padding: 26px 40px 0; cursor: pointer; }
.rpg-text { margin: 0; font-size: 32px; line-height: 1.6; letter-spacing: .04em; white-space: pre-wrap; }
.rpg-text.narration { color: #cfd3e6; }
.rpg-name { left: 24px; bottom: 228px; padding: 2px 26px 4px; font-size: 28px; letter-spacing: .08em; }
/* 次へのしるし（ドットの下向き三角が、点滅する） */
.rpg-next { position: absolute; right: 30px; bottom: 22px; width: 0; height: 0; border-left: 10px solid transparent; border-right: 10px solid transparent; border-top: 12px solid var(--win-cursor); opacity: 0; filter: drop-shadow(3px 3px 0 var(--win-dark)); }
.rpg-next.on { opacity: 1; animation: rpg-blink .8s steps(2, jump-none) infinite; }
@keyframes rpg-blink { 0% { transform: translateY(0); } 100% { transform: translateY(6px); } }

/* 選択肢・文字を打つ欄（会話のウィンドウの上、右寄せ） */
.rpg-over { position: absolute; left: 24px; right: 24px; bottom: 236px; top: 76px;   /* 上は、メニューのボタンに重ならないように */ pointer-events: none; display: flex; align-items: flex-end; justify-content: flex-end; }
.rpg-over > * { pointer-events: auto; position: relative; }
.rpg-choices { max-width: 100%; max-height: 100%; display: flex; flex-direction: column; padding: 12px 16px; }
.rpg-list { min-height: 0; flex: 1 1 auto; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--win-line) transparent; }
/* 勇者の道の言葉と、噂などの間の細い区切り線 */
.rpg-sep { height: 0; margin: 8px 16px 8px 44px; border: none; border-top: 2px dashed var(--win-inner); }
/* 中にまだ選択肢があるときの ▼（下の端で点滅） */
.rpg-more { display: block; height: 0; align-self: center; opacity: 0; border-left: 9px solid transparent; border-right: 9px solid transparent; border-top: 10px solid var(--win-cursor); margin: 2px 0 4px; }
.rpg-more.on { opacity: 1; animation: rpg-blink .8s steps(2, jump-none) infinite; }
.rpg .rpg-item.main { color: var(--win-cursor); }
.rpg-said { margin-left: 10px; font-size: .8em; color: var(--win-gray); }
.rpg .rpg-item {
  display: block; width: 100%; min-height: 34px; padding: 0 16px 0 44px; position: relative;
  background: none; border: none; text-align: left;
  font-family: inherit; font-size: 25px; font-weight: 400; letter-spacing: 0; line-height: 1.36; color: var(--win-text); text-shadow: inherit;
}
.rpg .rpg-item::before { content: ""; position: absolute; left: 14px; top: 50%; margin-top: -9px; border-top: 9px solid transparent; border-bottom: 9px solid transparent; border-left: 12px solid var(--win-cursor); opacity: 0; }
.rpg .rpg-item:not(:disabled):focus { background: rgba(74, 99, 168, .45); outline: none; }
.rpg .rpg-item:not(:disabled):focus::before { opacity: 1; animation: rpg-poke .8s steps(2, jump-none) infinite; }
@keyframes rpg-poke { 0% { transform: translateX(0); } 100% { transform: translateX(4px); } }
.rpg .rpg-item:disabled { color: #a9acc2; cursor: default; opacity: .85; text-decoration: none; }   /* 言った言葉も、何を言ったか読める濃さで */
.rpg .rpg-item.quiet { margin-top: 6px; color: #cfd3e6; }
.rpg-over.in-msg { top: auto; bottom: 46px; left: 64px; right: 64px; justify-content: flex-start; }
.rpg-input { width: 100%; display: flex; gap: 12px; align-items: center; }
.rpg-input-row { flex: 1; display: flex; gap: 12px; }
.rpg-input input {
  flex: 1; min-width: 0; height: 56px; padding: 0 14px;
  font-family: inherit; font-size: 28px; color: var(--win-text);
  background: var(--win-dark); border: 3px solid var(--win-inner); border-radius: 0; outline: none;
}
.rpg-input input:focus { border-color: var(--win-cursor); }
.rpg .rpg-input .rpg-item { width: auto; }
.rpg .rpg-input-row .rpg-item { flex: none; border: 3px solid var(--win-line); padding-left: 44px; }

/* 7日目の上の帯：メニューだけを、ゲームのウィンドウの形で */
#app.rpg-on .hud .hud-btn {
  font-family: "DotGothic16", var(--sans); font-size: 22px; min-height: 44px; padding: 0 18px;
  background: rgba(14, 20, 52, .9); border: 3px solid #efe6cc; box-shadow: 0 0 0 3px #080a18; color: #fbf7ea;
}

/* ---------- スマホ横向きなど、画面が小さいとき（#app.tiny）：小さな文字を読める大きさに ---------- */
#app.tiny .log-row { font-size: 27px; }
#app.tiny .log-row small { font-size: 21px; }
#app.tiny .got small { font-size: 22px; }
#app.tiny .hud .slots { font-size: 24px; }
#app.tiny .hud-title { font-size: 24px; }
#app.tiny .tell-after .note { font-size: 23px; }
#app.tiny .tell-in .ending-no { font-size: 23px; }
#app.tiny .daycard .tap { font-size: 24px; }
#app.tiny .ask p { font-size: 28px; }

#app.tiny .ttl-item small, #app.tiny .ttl-reset, #app.tiny .ttl-note { font-size: 21px; }

/* ---------- 最後の結末：旅立ち（ノベルの画面）と、夜明けのタイトル・スタッフロール ---------- */
.talk.fade-in { animation: fadein 1.2s both; }
.talk.fade-out { animation: fadeout 1.2s both; }
@keyframes fadeout { from { opacity: 1; } to { opacity: 0; } }
/* 夜明けの空（仮の絵。bg/title_dawn.png が置かれると差し替わる）：平らな色の面だけ */
.ttl-sky.dawn { background: #2d2a5a; }
.ttl-sky.dawn::before { background: #ebcdb1; height: 250px; }
.ttl-sky.dawn .moon { left: 370px; top: 320px; width: 300px; height: 300px; background: #d8c2c8; }
.ttl-sky.dawn .hill { background: #4a3d66; }
.roll { position: absolute; left: 0; top: 220px; height: 130px; width: 760px; display: flex; align-items: center; justify-content: center; pointer-events: none; }   /* 夜明けの絵の、紫の帯の高さ（y≈220〜350。ばら色の帯の上だと読みにくい） */
.roll-item { margin: 0; font-size: 34px; letter-spacing: .2em; color: var(--cream); animation: roll-in-out 3.2s ease-in-out both; }
.roll-item.stay { font-size: 40px; letter-spacing: .5em; animation: fadein 1.6s both; }
@keyframes roll-in-out { 0% { opacity: 0; transform: translateY(14px); } 25%, 70% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateY(-10px); } }
@media (prefers-reduced-motion: reduce) { .roll-item { animation: fadein 1s both; } }

/* シマエナガの部屋：見た話題の印、エピローグのあとの知らせ */
.choice-box .btn .seen-mark { margin-left: 12px; font-family: var(--sans); font-size: 16px; font-weight: 400; color: var(--cream-soft); letter-spacing: .1em; }
.tell-after .note.room-note { color: var(--cream); }
#app.tiny .choice-box .btn .seen-mark { font-size: 21px; }

/* 1文字ずつ出る文の、まだ出ていない部分（場所だけ取っておく） */
.typing-rest { visibility: hidden; }

/* 場所の画面で、行動を選ぶ前（会話が始まるまで、文の枠を出さない） */
.talk.idle .msg { display: none; }
.talk.idle .talk-over { bottom: 60px; }

/* 会話の途中で背景を切り替えるときの重ね（ゆっくり） */
.bg-layer { position: absolute; inset: 0; }
.bg-layer.fade-in { animation: fadein 1.6s both; }
.chara.fade-in { animation: fadein 1.2s both; }

/* 最後の場面：主人公の肩のシマちゃん */
.chara img.shoulder { position: absolute; height: auto; max-width: none; z-index: 1; }

/* タイトルの空の切り替え（合言葉「夜明け」のあと） */
.ttl-sky-pick { display: flex; align-items: center; gap: 14px; margin-left: 40px; font-family: var(--sans); font-size: 16px; color: var(--cream-faint); }
.ttl-sky-btn { background: none; border: none; padding: 2px 4px; font-family: var(--sans); font-size: 16px; color: var(--cream-faint); border-bottom: 1.5px solid transparent; }
.ttl-sky-btn.on { color: var(--cream); border-bottom-color: var(--orange); }
.ttl-sky-btn:hover { color: var(--cream); }
#app.tiny .ttl-sky-pick, #app.tiny .ttl-sky-btn { font-size: 21px; }

/* ---------- エピローグの一枚絵（文字の後ろに薄く）と、冒頭の一場面 ---------- */
.ep-art { position: absolute; inset: 0; z-index: 0; overflow: hidden; animation: fadein 2.4s ease-out both; }
.ep-art .bg-img { position: absolute; inset: 0; width: 100%; height: 100%; }
.ep-hero { position: absolute; display: block; }
.ep-veil { position: absolute; inset: 0; background: rgba(27, 26, 56, var(--ep-veil, .62)); }
/* 絵の上の文字：明るい所に重なっても読めるように、藍の薄いにじみ */
#app.ep-on .tell-in, #app.ep-on .op-words p { text-shadow: 0 0 3px rgba(27, 26, 56, .95), 0 0 10px rgba(27, 26, 56, .7); }
#app.ep-on .tell-after .btn { background: rgba(27, 26, 56, .85); }
.op-words { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; animation: fadein 1.2s both; }
.op-words p { margin: 0; font-size: 30px; letter-spacing: .08em; color: var(--cream); }
.op-rewind { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.op-day { font-size: 64px; letter-spacing: .3em; font-weight: 700; color: var(--cream); animation: op-day .45s both; }
@keyframes op-day { 0% { opacity: 0; filter: blur(4px); transform: translateY(-8px); } 40%, 70% { opacity: 1; filter: none; transform: none; } 100% { opacity: .2; filter: blur(2px); } }


/* ---------- 操作のガイド（はじめての場面だけ。指す所を明るく残し、細い橙の線で札とつなぐ） ---------- */
.guide { position: absolute; inset: 0; z-index: 60; cursor: pointer; animation: fadein .35s; }
.guide.plain { background: rgba(15, 14, 34, .5); }
.guide-hole { position: absolute; border: 1px solid var(--orange); box-shadow: 0 0 0 2000px rgba(15, 14, 34, .58); pointer-events: none; }
.guide-line { position: absolute; width: 2px; margin-left: -1px; background: var(--orange); pointer-events: none; }
.guide-card { position: absolute; padding: 20px 26px 14px; background: var(--indigo); color: var(--cream); border-top: 3px solid var(--orange); }
.guide-text { margin: 0; font-size: 23px; line-height: 1.75; }
.guide-foot { display: flex; align-items: center; gap: 16px; margin-top: 10px; font-family: var(--sans); font-size: 16px; color: var(--cream-soft); }
.guide-count { letter-spacing: .08em; }
.guide-next { margin-left: auto; color: var(--orange); font-size: 14px; }
.guide-skip { padding: 6px 4px 6px 14px; border: none; background: none; color: var(--cream-soft); font-family: var(--sans); font-size: 17px; text-decoration: underline; text-underline-offset: 4px; }
.guide-skip:hover { color: var(--cream); }
#app.tiny .guide-text { font-size: 29px; }
#app.tiny .guide-foot { font-size: 21px; }
#app.tiny .guide-skip { font-size: 23px; }
.ask.logview.howto { height: auto; max-height: 680px; }


/* ---------- 点検のあとの直し（2026-11-12） ---------- */
/* 絵を読みこむあいだは、仮の絵を見せない（読めなかったときだけ出る） */
.ph-wait { visibility: hidden; }
/* ひらがなを空白で区切って書いた台詞は、言葉の途中で折り返さない */
.spaced { word-break: keep-all; overflow-wrap: anywhere; }
/* 村の全景の「気になる」：押すと言葉帳の「勇者の道」が開く */
.map-info dd.worry { cursor: pointer; }
.map-info dd.worry:hover { color: var(--cream); text-decoration: underline; text-decoration-color: var(--orange); text-underline-offset: 3px; }
.map-info dd.worry:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
.worry-go { margin-left: 8px; font-style: normal; color: var(--orange); }
/* 印の札が、ほかの印に重なるときは、印の下に出す */
.map-tip.below { transform: none; }      /* 印の下に出すとき：位置は main.js で、画面の中に収まるように決める */
/* 夜明けのタイトルの字：明るい空の上でも読めるように、細い藍の縁取りと、薄い影 */
.ttl-head.dawn h1, .ttl-head.dawn .ttl-tag {
  text-shadow: 1px 1px 0 var(--indigo), -1px 1px 0 var(--indigo), 1px -1px 0 var(--indigo), -1px -1px 0 var(--indigo),
               0 0 8px rgba(27, 26, 56, .55);
}
.dawn-ttl .roll-item { text-shadow: 0 0 6px rgba(27, 26, 56, .6); }

/* ---------- スマホ横向きなど（#app.tiny）：指で押せる大きさに ---------- */
/* 7日目の選択肢：1行を高く（区切り線の下は、選択肢の中を動かして見る） */
#app.tiny .rpg .rpg-item { min-height: 66px; font-size: 30px; line-height: 1.3; padding-top: 6px; padding-bottom: 6px; }
#app.tiny .rpg .rpg-item.quiet { margin-top: 4px; }
#app.tiny .rpg-over { top: 92px; }
#app.tiny .rpg-input input { height: 72px; font-size: 32px; }
#app.tiny .rpg .rpg-input .rpg-item { min-height: 72px; }
#app.rpg-on.tiny .hud .hud-btn { min-height: 70px; padding: 0 28px; font-size: 28px; }
/* 右上の「言葉帳」「≡」と、右下の「時間を進める」「七日目まで待つ」 */
#app.tiny .map .map-nav { padding: 4px 8px; }
#app.tiny .map .map-nav .map-link { padding: 20px 28px; }
#app.tiny .map .map-nav .menu-icon { gap: 8px; padding: 27px 34px; }
#app.tiny .menu-icon i { width: 32px; height: 3px; }
#app.tiny .map-foot { bottom: 12px; gap: 12px; padding: 4px 0 0; }
#app.tiny .map .map-foot .map-link { padding: 20px 18px; }
#app.tiny .map-info dd.worry { padding: 6px 0; }
/* メニューの各行 */
#app.tiny .ask.menu { padding-top: 22px; padding-bottom: 18px; }
#app.tiny .ask.menu h2 { margin-bottom: 6px; }
#app.tiny .ask.menu .btn { min-height: 76px; }
#app.tiny .ask.menu .speed .btn { min-height: 70px; padding: 2px 14px; }
#app.tiny .hud-btn { min-height: 66px; padding: 2px 28px; font-size: 26px; }
