:root {
  --paper: #f4eee3;
  --card: #fffdf8;
  --ink: #2c2925;
  --muted: #8b8377;
  --line: #e4d9c6;
  --accent: #2f6b66;
  --accent-soft: #dcebe8;
  --sim: #6d4aa8;
  --sim-soft: #ece4f7;
  --local: #b5562f;
  --serif: 'Shippori Mincho', 'Hiragino Mincho ProN', 'Yu Mincho', serif;
  --sans: 'Zen Kaku Gothic New', 'Hiragino Sans', 'Yu Gothic UI', 'Meiryo', sans-serif;
}
body.sim { --accent: var(--sim); --accent-soft: var(--sim-soft); --paper: #f1edf3; }

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.7;
  transition: background .3s;
}
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }

/* ヘッダー */
.top {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 20px; border-bottom: 1px solid var(--line);
  background: rgba(255, 253, 248, .85); backdrop-filter: blur(6px);
  position: sticky; top: 0; z-index: 5;
}
.brand { font-family: var(--serif); font-weight: 800; font-size: 20px; letter-spacing: .08em; }
.who { color: var(--muted); font-size: 13px; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#modeSel { padding: 6px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); max-width: 220px; }
body.sim #modeSel { border-color: var(--sim); color: var(--sim); font-weight: 700; }

/* ボタン */
.primary, .ghost, .navbtn {
  border-radius: 10px; padding: 10px 18px; cursor: pointer; border: 1px solid transparent;
  transition: transform .08s, background .2s;
}
.primary { background: var(--accent); color: #fff; font-weight: 700; }
.primary:hover { filter: brightness(1.08); }
.primary:active, .ghost:active, .navbtn:active { transform: translateY(1px); }
.sim-btn { background: var(--sim); }
.ghost { background: transparent; border-color: var(--line); }
.ghost:hover { background: var(--card); }
.danger { color: #b3261e; }
button:disabled { opacity: .4; cursor: default; }
.link { background: none; border: 0; padding: 0 4px; color: var(--accent); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; font-size: inherit; }

/* はじめの入力 */
#setup { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.setup-card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 36px 32px; width: min(460px, 100%); box-shadow: 0 10px 40px rgba(60, 45, 20, .08); }
.setup-card h1 { font-family: var(--serif); font-size: 32px; margin: 0 0 6px; letter-spacing: .1em; }
.lead { color: var(--muted); margin: 0 0 24px; font-size: 14px; }
form label { display: block; margin: 0 0 14px; font-size: 13px; color: var(--muted); }
form input:not([type=radio]):not([type=checkbox]):not([type=range]), form select {
  display: block; width: 100%; margin-top: 4px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); font-size: 16px;
}
fieldset { border: 0; padding: 0; margin: 0 0 16px; }
legend { font-size: 13px; color: var(--muted); margin-bottom: 6px; padding: 0; }
.radios { display: flex; flex-wrap: wrap; gap: 8px; }
.radios label { margin: 0; display: flex; align-items: center; gap: 4px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); cursor: pointer; }
.radios label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.radios input { accent-color: var(--accent); }
.row-btns { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.fine { font-size: 12px; color: var(--muted); margin: 18px 0 0; }

/* 年表 */
#app { max-width: 1100px; margin: 0 auto; padding: 20px 20px 40px; }
.monthbar { display: flex; align-items: center; gap: 16px; }
.navbtn { width: 56px; height: 56px; padding: 0; font-size: 20px; background: var(--card); border-color: var(--line); flex: none; }
.navbtn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.monthtitle { flex: 1; text-align: center; }
.ym { font-family: var(--serif); font-weight: 800; font-size: 34px; display: flex; justify-content: center; align-items: baseline; gap: 6px; }
#yearSel { font-family: var(--serif); font-weight: 800; font-size: 34px; border: 0; background: transparent; cursor: pointer; padding: 0; appearance: none; text-align: right; }
#yearSel:hover { color: var(--accent); }
.sub { color: var(--accent); font-weight: 700; font-size: 15px; }
.home { font-size: 13px; color: var(--muted); margin-top: 2px; }
.home .k::after { content: '：'; }
.home .v { color: var(--ink); }

.strip { display: grid; grid-template-columns: repeat(12, 1fr); gap: 6px; margin: 18px 0; }
.cell { border: 1px solid var(--line); background: var(--card); border-radius: 8px; padding: 6px 0 10px; font-size: 12px; color: var(--muted); cursor: pointer; position: relative; }
.cell::after { content: ''; position: absolute; left: 50%; bottom: 4px; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: transparent; }
.cell.has::after { background: var(--accent); }
.cell.gen { background: var(--sim-soft); }
.cell.start span::before { content: '★'; color: var(--sim); }
.cell.fork::after { background: #d08a1c; }
.cell.cur { border-color: var(--accent); color: var(--accent); font-weight: 700; box-shadow: 0 0 0 2px var(--accent-soft); }
.cell.out { opacity: .35; cursor: default; }

.grid { display: grid; grid-template-columns: 1.45fr 1fr; gap: 18px; align-items: start; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 20px 22px; }
.card h2 { font-family: var(--serif); font-size: 18px; margin: 0 0 12px; }
.card h3 { font-size: 13px; color: var(--muted); margin: 18px 0 6px; font-weight: 500; }
.note-head { display: flex; justify-content: space-between; align-items: baseline; }
.savestate { font-size: 12px; color: var(--muted); }

textarea {
  width: 100%; min-height: 220px; resize: vertical; padding: 14px 16px;
  border: 1px solid var(--line); border-radius: 12px; background: #fff;
  line-height: 1.9; font-size: 15px;
  background-image: linear-gradient(transparent calc(1.9em - 1px), #f1eadc 1px);
  background-size: 100% 1.9em; background-position: 0 14px; background-attachment: local;
}
textarea:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
textarea.readonly { background-color: #faf7f1; color: var(--muted); }

.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 18px; margin-bottom: 14px; padding: 12px 14px; background: var(--sim-soft); border-radius: 12px; font-size: 12px; }
.stat { display: grid; grid-template-columns: 5.5em 1fr 2em; align-items: center; gap: 8px; }
.stat i { height: 8px; border-radius: 4px; background: linear-gradient(90deg, var(--sim) var(--v), #fff var(--v)); border: 1px solid #d8cdea; }
.stat b { text-align: right; font-weight: 700; }
.money { grid-column: 1 / -1; text-align: right; color: var(--muted); }
.money b { color: var(--ink); font-size: 15px; }

.choice { border: 2px solid #d08a1c; background: #fdf5e6; border-radius: 12px; padding: 14px 16px; margin-bottom: 14px; animation: pop .25s ease-out; }
.choice .q { margin: 0 0 10px; font-weight: 700; }
.choice .q::before { content: '分かれ道　'; color: #b06f0c; font-size: 12px; }
.opts { display: flex; flex-wrap: wrap; gap: 8px; }
.opts button { padding: 9px 14px; border-radius: 10px; border: 1px solid #e0b86d; background: #fff; cursor: pointer; }
.opts button:hover { background: #d08a1c; color: #fff; border-color: #d08a1c; }
@keyframes pop { from { transform: scale(.97); opacity: 0; } to { transform: none; opacity: 1; } }

.lifebar { margin-bottom: 14px; display: flex; flex-direction: column; gap: 8px; }
.lb-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.lb-k { font-size: 12px; color: var(--muted); margin-right: 4px; }
.lb-row.decide { padding: 10px 12px; border-radius: 12px; background: var(--accent-soft); }
.lb-row.decide .lb-k { color: var(--accent); font-weight: 700; flex-basis: 100%; }
.lb { padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line); background: #fff; cursor: pointer; font-size: 14px; }
.lb:hover { border-color: var(--accent); color: var(--accent); }
.decide .lb { border-color: var(--accent); color: var(--accent); font-weight: 700; }
.decide .lb:hover { background: var(--accent); color: #fff; }
.lb.drop, .lb.quit { color: #a14a2a; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 6px 4px 12px; border-radius: 999px; background: #f3e9d6; font-size: 13px; font-weight: 700; }
.chip::before { content: '◇'; color: #b06f0c; margin-right: 2px; }
.chip button { border: 0; background: none; cursor: pointer; color: var(--muted); font-size: 14px; padding: 0 4px; }
.chip button:hover { color: #b3261e; }
.tl .life { color: #b06f0c; font-weight: 700; font-size: 13px; }
.world h3.region { color: var(--ink); font-weight: 700; margin-top: 4px; }
.world h3.region + div { margin-bottom: 10px; }
.rg { display: inline-block; font-size: 10px; padding: 0 6px; margin-right: 6px; border-radius: 4px; background: #eae3d6; color: var(--muted); vertical-align: 1px; }
.rg-w { background: #dfe8f1; color: #3d6181; }

.compare { margin-top: 12px; font-size: 14px; border-left: 3px solid var(--line); padding-left: 12px; }
.compare summary { cursor: pointer; color: var(--muted); }
#realText { white-space: pre-wrap; padding-top: 6px; }

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 16px; }
.hint { flex-basis: 100%; margin: 0; font-size: 12px; color: var(--muted); }
.ended { flex-basis: 100%; font-family: var(--serif); font-size: 18px; margin: 4px 0; }

.world { font-size: 14px; }
.world .now { list-style: none; padding: 0; margin: 0; }
.world .now li { padding: 10px 12px; margin-bottom: 8px; background: var(--paper); border-radius: 10px; font-weight: 500; }
.air { margin: 0; }
.worldyear { list-style: none; padding: 0; margin: 0; font-size: 13px; }
.worldyear li { padding: 4px 0; border-bottom: 1px dashed var(--line); }
.worldyear .link { color: var(--muted); }
.local, .near { font-style: normal; font-size: 11px; padding: 1px 7px; border-radius: 999px; margin-right: 6px; vertical-align: 1px; }
.local { background: var(--local); color: #fff; }
.near { background: #f3dfd3; color: var(--local); }
.fake { display: inline-block; margin-left: 8px; font-size: 11px; color: var(--sim); }
.empty { color: var(--muted); font-size: 13px; }
.keys { text-align: center; color: var(--muted); font-size: 12px; margin-top: 18px; }

/* ダイアログ */
dialog { border: 0; border-radius: 18px; padding: 26px 26px 20px; width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 40px); background: var(--card); color: var(--ink); box-shadow: 0 20px 60px rgba(0, 0, 0, .25); }
dialog.wide { width: min(760px, calc(100vw - 24px)); }
dialog::backdrop { background: rgba(40, 30, 20, .4); }
dialog h2 { font-family: var(--serif); margin: 0 0 4px; }
.dlg-sub { color: var(--sim); font-weight: 700; margin: 0 0 8px; }
.dlg-note { font-size: 13px; color: var(--muted); margin: 0 0 16px; }
.policy { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.policy legend { grid-column: 1 / -1; }
.policy label { margin: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); cursor: pointer; display: grid; grid-template-columns: auto 1fr; column-gap: 8px; }
.policy label small { grid-column: 2; color: var(--muted); font-size: 11px; }
.policy label:has(input:checked) { border-color: var(--sim); background: var(--sim-soft); }
.policy input { accent-color: var(--sim); grid-row: span 2; }
.sliders label { display: grid; grid-template-columns: 7.5em 1fr 2.5em; align-items: center; gap: 8px; margin-bottom: 6px; color: var(--ink); }
.sliders input { accent-color: var(--sim); }
.sliders output { text-align: right; font-weight: 700; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.est-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; margin: 0 0 8px; font-size: 12px; color: var(--muted); }
.est-head .link { color: var(--sim); font-size: 12px; }
.why { display: block; font-size: 11.5px; line-height: 1.5; color: var(--muted); margin-top: 3px; }
.sliders .why { margin: -4px 0 8px calc(7.5em + 8px); }
.why.edited::before { content: '手で直した（目安 ' attr(data-est) '）・'; color: var(--sim); }
.money-in { display: flex; align-items: center; gap: 6px; }
.money-in input { flex: 1; }
.money-in span { color: var(--ink); flex: none; }
.money-quick { display: flex; flex-wrap: wrap; gap: 2px 6px; margin-top: 4px; font-size: 12px; }
.money-quick .link { color: var(--muted); font-size: 12px; padding: 0 2px; }
.est-hits { margin: 0 0 16px; font-size: 13px; border-left: 3px solid var(--sim-soft); padding-left: 12px; }
.est-hits summary { cursor: pointer; color: var(--muted); }
.est-hits-note { font-size: 11.5px; color: var(--muted); margin: 6px 0; }
.est-hits ul { list-style: none; padding: 0; margin: 0; max-height: 220px; overflow: auto; }
.est-hits li { padding: 4px 0; border-bottom: 1px dashed var(--line); }
.est-hits li .w { display: inline-block; margin-right: 8px; }
.est-hits li .fx { color: var(--muted); font-size: 12px; }
.est-hits li .neg { color: var(--local); font-size: 11px; margin-left: 2px; }
.check { display: flex !important; gap: 8px; align-items: center; color: var(--ink) !important; }
.homelist { list-style: none; padding: 0; margin: 0; font-size: 14px; }
.homelist li { display: flex; gap: 10px; align-items: baseline; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.homelist span { color: var(--muted); width: 8.5em; flex: none; }
.homelist b { flex: 1; font-weight: 500; }
dialog h3 { font-size: 13px; color: var(--muted); font-weight: 500; margin: 16px 0 4px; }

.menu { display: flex; flex-direction: column; gap: 8px; }
.menu > button { text-align: left; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; }
.menu > button:hover { border-color: var(--accent); }
.menu-hub { margin: 6px 0 0; font-size: 12px; text-align: center; }
.menu-hub a, .fine.hub a { color: var(--muted); }
.fine.hub { margin-top: 8px; }

.timeline { max-height: 62vh; overflow: auto; padding-right: 6px; }
.timeline h3 { font-family: var(--serif); font-size: 18px; color: var(--ink); margin: 18px 0 6px; position: sticky; top: 0; background: var(--card); padding: 4px 0; }
.timeline h3 small { font-family: var(--sans); font-size: 12px; color: var(--muted); font-weight: 400; }
.tl { display: grid; grid-template-columns: 3.5em 1fr; gap: 8px; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.tl p { margin: 0; }
.tl .w { color: var(--muted); font-size: 12px; margin-top: 4px; }
.tl .moved { color: var(--local); font-size: 12px; }
.tl.gen { background: linear-gradient(90deg, var(--sim-soft), transparent 60%); }
.tl .link { align-self: start; }

@media (max-width: 760px) {
  .top { padding: 8px 12px; gap: 8px; flex-wrap: wrap; }
  .who { order: 3; flex-basis: 100%; }
  #app { padding: 14px 12px 32px; }
  .grid { grid-template-columns: 1fr; }
  .ym, #yearSel { font-size: 26px; }
  .navbtn { width: 46px; height: 46px; }
  .strip { grid-template-columns: repeat(6, 1fr); }
  .policy, .two { grid-template-columns: 1fr; }
  .sliders .why { margin-left: 0; }
  .stats { grid-template-columns: 1fr; }
}

/* ===== 見た目: 天界放送「ちじょうニュース」（2026-11-15 いかり決定・B案） =====
   天使がキャスターになって地上のニュースとあなたの月を伝える番組。
   空 #a9e3f5→#e4f6fb→#fff6fa・ピンク #ff6f91・黄 #ffd84d・墨 #2a2f45
   もしもの年表は「もしもチャンネル」= 藤 #8a63d2・薄藤 #efe7fb
   見出しは M PLUS Rounded 1c。天使の絵は .angel に入れる（.talking の間は話している） */
:root {
  --paper: #e4f6fb;
  --card: #fff;
  --ink: #2a2f45;
  --muted: #6b7390;
  --line: #e3e8f2;
  --accent: #ff6f91;
  --accent-soft: #ffe4ec;
  --accent-deep: #d94f72;
  --yellow: #ffd84d;
  --sim: #8a63d2;
  --sim-soft: #efe7fb;
  --round: 'M PLUS Rounded 1c', 'Zen Kaku Gothic New', sans-serif;
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --ease: cubic-bezier(.2, .8, .2, 1);
}
body {
  background:
    repeating-linear-gradient(135deg, rgba(255,255,255,.35) 0 16px, transparent 16px 32px) fixed,
    linear-gradient(#a9e3f5, #e4f6fb 40%, #fff6fa) fixed;
}
body.sim {
  --accent: var(--sim); --accent-soft: var(--sim-soft); --accent-deep: #6a45b0; --paper: #efe7fb;
  background:
    repeating-linear-gradient(135deg, rgba(255,255,255,.35) 0 16px, transparent 16px 32px) fixed,
    linear-gradient(#cdb8f2, #ece4fb 40%, #fdf3fa) fixed;
}

/* ヘッダー＝番組ロゴ */
.top { background: rgba(255,255,255,.75); border-bottom: 0; box-shadow: 0 2px 0 rgba(42,47,69,.06); }
.brand { font-family: var(--round); font-weight: 800; font-size: 15px; letter-spacing: .08em; color: #fff; background: var(--accent); padding: 3px 6px 3px 14px; border-radius: 999px; box-shadow: 0 3px 0 var(--accent-deep); display: flex; align-items: center; gap: 8px; }
.brand::after { content: 'ON AIR'; font-size: 10px; letter-spacing: .04em; color: var(--accent); background: #fff radial-gradient(circle at 8px 50%, #ff3d6a 0 3.5px, transparent 4px); border-radius: 999px; padding: 0 7px 0 16px; line-height: 18px; }
body.sim .brand::after { content: 'もしも'; background-image: radial-gradient(circle at 8px 50%, var(--sim) 0 3.5px, transparent 4px); }
#modeSel { border-radius: 999px; font-family: var(--round); }

/* ボタン */
.primary { border-radius: 999px; font-family: var(--round); font-weight: 800; background: var(--yellow); color: var(--ink); border: 3px solid var(--ink); box-shadow: 0 4px 0 var(--ink); padding: 9px 22px; }
.primary:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.sim-btn { background: var(--yellow); }
body.sim .sim-btn { background: #fff; color: var(--sim); border-color: var(--sim); box-shadow: 0 4px 0 var(--sim); }
.ghost { border-radius: 999px; background: #fff; border: 2px solid var(--line); font-family: var(--round); font-weight: 700; }
.ghost:hover { border-color: var(--accent); color: var(--accent); background: #fff; }
.link { color: var(--accent-deep); }

/* はじめの入力 */
.setup-card { border: 3px solid #fff; border-radius: 24px; box-shadow: 0 8px 0 rgba(42,47,69,.08); }
.setup-card h1 { font-family: var(--round); font-weight: 800; color: var(--accent); }

/* 月の見出し＝日付パネル */
.monthbar { background: var(--ink); color: #fff; border-radius: 20px; padding: 10px 12px; box-shadow: 0 5px 0 rgba(42,47,69,.15); }
.ym, #yearSel { font-family: var(--round); font-weight: 800; color: #fff; }
#yearSel option { color: var(--ink); }
#yearSel:hover { color: var(--yellow); }
.sub { color: var(--yellow); }
.home { color: #b8bfd6; }
.home .v { color: #fff; }
.home .link { color: var(--yellow); }
.navbtn { border-radius: 50%; background: #fff; color: var(--accent); border: 0; box-shadow: 0 3px 0 rgba(0,0,0,.25); font-size: 16px; }
.navbtn:hover:not(:disabled) { color: var(--accent-deep); }

/* 天使のスタジオとテロップ */
.onair { display: grid; grid-template-columns: 250px 1fr; gap: 0 18px; align-items: center; margin: 16px 0 0; }
.studio { height: 190px; border-radius: 20px; position: relative; overflow: hidden; border: 3px solid #fff;
  background: radial-gradient(circle at 50% 125%, #fff 0 38%, transparent 39%), linear-gradient(#ffe4ef, #fff3c9);
  box-shadow: 0 6px 0 rgba(42,47,69,.08); }
body.sim .studio { background: radial-gradient(circle at 50% 125%, #fff 0 38%, transparent 39%), linear-gradient(#e6dcfb, #fde3f0); }
.angel { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); width: 130px; height: 160px; border-radius: 60px 60px 0 0;
  border: 2px dashed color-mix(in srgb, var(--accent) 55%, #fff); background: rgba(255,255,255,.55); display: grid; place-items: center; }
.angel span { font-family: var(--round); font-size: 11px; color: var(--accent); margin-bottom: 30px; }
.angel::before { content: ''; position: absolute; top: 10px; left: 50%; width: 48px; height: 11px; margin-left: -24px; border: 3px solid var(--yellow); border-radius: 50%; }
.desk { position: absolute; left: 0; right: 0; bottom: 0; height: 34px; background: linear-gradient(#fff, var(--accent-soft)); border-top: 3px solid var(--yellow); text-align: center; }
.desk span { font-family: var(--round); font-weight: 800; font-size: 12px; color: var(--accent); letter-spacing: .2em; line-height: 30px; }
.telop { position: relative; background: #fff; border: 3px solid var(--ink); border-radius: 16px; padding: 14px 18px; box-shadow: 5px 5px 0 var(--ink); }
.telop .tag { position: absolute; top: -13px; left: 14px; background: var(--yellow); border: 2px solid var(--ink); border-radius: 7px; font-family: var(--round); font-weight: 800; font-size: 11px; padding: 0 9px; line-height: 20px; }
body.sim .telop .tag { background: var(--sim); color: #fff; }
#telopText { margin: 0; position: relative; font-family: var(--round); font-weight: 700; font-size: 16px; line-height: 1.75; }
#telopText .ghost { visibility: hidden; }
#telopText .typed { position: absolute; inset: 0; }

/* 月の帯 */
.cell { border: 0; border-radius: 12px; background: rgba(255,255,255,.8); font-family: var(--round); font-weight: 700; box-shadow: 0 2px 0 rgba(42,47,69,.06); }
.cell.cur { background: var(--accent); color: #fff; box-shadow: 0 3px 0 var(--accent-deep); }
.cell.cur.has::after { background: #fff; }
.cell.gen { background: #f3edfd; }
.cell.cur.gen { background: var(--sim); box-shadow: 0 3px 0 #6a45b0; }
.cell.start span::before { color: var(--yellow); }

/* カード */
.card { border: 0; border-radius: 20px; box-shadow: 0 5px 0 rgba(42,47,69,.07); }
.card h2 { font-family: var(--round); font-weight: 800; font-size: 16px; display: flex; align-items: center; gap: 8px; }
.card h2::before { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); flex: none; }
.world h2::before { background: #5ec3e6; }
textarea { border-radius: 14px; border: 2px solid var(--line); background-image: linear-gradient(transparent calc(1.9em - 1px), #edf1f7 1px); }
textarea.readonly { background-color: #f6f8fb; }
.stats { background: var(--sim-soft); border-radius: 14px; }
.stat i { border-color: #ddd0f4; }
.choice { border: 3px solid var(--ink); background: #fff8d9; border-radius: 16px; box-shadow: 4px 4px 0 var(--ink); }
.choice .q::before { color: var(--accent-deep); font-family: var(--round); font-weight: 800; }
.opts button { border-radius: 999px; border: 2px solid var(--ink); font-family: var(--round); font-weight: 700; }
.opts button:hover { background: var(--yellow); color: var(--ink); border-color: var(--ink); }
.lb { border-radius: 999px; font-family: var(--round); font-weight: 700; }
.lb-row.decide { border-radius: 14px; }
.chip { background: #fff3c9; border-radius: 999px; }

/* 世の中では＝ニュースカード */
.world h3.region { display: inline-block; font-family: var(--round); font-weight: 800; font-size: 11px; color: #fff; background: #5ec3e6; border-radius: 999px; padding: 0 10px; margin: 4px 0 6px; }
#worldW { margin-top: 0; }
.world h3.region:nth-of-type(2) { background: var(--accent); }
body.sim .world h3.region:nth-of-type(2) { background: #ff6f91; }
.world .now li { background: #f3fafd; border-radius: 14px; font-family: var(--round); font-weight: 700; border-left: 4px solid #5ec3e6; }
#worldW .now li { background: #fff4f7; border-left-color: #ff6f91; }
.world h3:not(.region) { font-family: var(--round); font-weight: 700; }
.air { display: inline-block; background: #fff3c9; border-radius: 10px; padding: 4px 10px; font-family: var(--round); font-weight: 700; }
.rg { border-radius: 999px; background: #e0f4fb; color: #2f8db0; }
.rg-w { background: #ffe4ec; color: #d94f72; }

/* ダイアログ */
dialog { border-radius: 24px; border: 3px solid var(--ink); box-shadow: 8px 8px 0 var(--ink); }
dialog::backdrop { background: rgba(42,47,69,.45); }
dialog h2 { font-family: var(--round); font-weight: 800; }
.policy label, .menu > button { border-radius: 14px; border-width: 2px; }
.timeline h3 { font-family: var(--round); font-weight: 800; }
.ended { font-family: var(--round); font-weight: 800; }

/* 動き: 月か年表が変わったときだけ。テロップが飛び込み 札がぽよん ニュースが順に出る */
@keyframes rise { from { opacity: 0; transform: translateY(16px) scale(.97); } }
@keyframes telopIn { from { transform: translateX(-60px) rotate(-3deg); opacity: 0; } }
@keyframes tagPop { from { transform: scale(0); } }
@keyframes angelHop { 40% { transform: translateX(-50%) translateY(-8px); } }
#app > * { animation: rise .8s var(--ease) backwards; }
#app > .onair { animation-delay: .08s; }
#app > .strip { animation-delay: .16s; }
#app > .grid { animation-delay: .24s; }
.onair.play .telop { animation: telopIn .55s var(--spring) both; }
.onair.play .telop .tag { animation: tagPop .45s var(--spring) .4s both; }
.onair.play .angel { animation: angelHop .5s var(--spring); }
.world.play .now li { animation: rise .6s var(--spring) both; animation-delay: .45s; }
.world.play #worldW .now li { animation-delay: .58s; }

@media (max-width: 760px) {
  .onair { grid-template-columns: 1fr; }
  .studio { height: 150px; }
  .angel { width: 110px; height: 120px; }
  .telop { margin: 16px 4px 0; }
  #telopText { font-size: 15px; }
  .monthbar { border-radius: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ===== 番組表（好きな年月へ飛ぶ・2026-11-15） =====
   日付パネルを押すと開く。年代のタブ→年（年齢と記録のある月の目盛り）→月（その月の見出し）。 */
.ym { border: 0; background: transparent; cursor: pointer; padding: 2px 14px; margin: 0 auto; border-radius: 14px; position: relative; transition: background .2s; }
.ym:hover { background: rgba(255,255,255,.08); }
.ym:focus-visible { outline: 3px solid var(--yellow); }
.jump-hint { align-self: center; font-family: var(--round); font-size: 11px; font-weight: 800; letter-spacing: .06em; color: var(--ink); background: var(--yellow); border-radius: 999px; padding: 1px 9px 1px 8px; margin-left: 8px; }
.jump-hint::before { content: '▼ '; font-size: 9px; }
.dlg-small { font-family: var(--sans); font-size: 12px; font-weight: 500; color: var(--muted); margin-left: 6px; }
.jump-quick { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 14px; }
.jump-quick .ghost { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.3; padding: 6px 16px; font-size: 13px; }
.jump-quick small { font-size: 11px; color: var(--muted); font-weight: 500; }
.jump-decades { display: flex; gap: 6px; overflow-x: auto; padding: 2px 2px 8px; scrollbar-width: thin; }
.jump-decades button { flex: none; border: 2px solid var(--line); background: #fff; border-radius: 999px; padding: 4px 14px; font-family: var(--round); font-weight: 700; font-size: 13px; cursor: pointer; }
.jump-decades button:hover { border-color: var(--accent); color: var(--accent); }
.jump-decades button.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.jump-years { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-top: 6px; }
.jump-years button { border: 2px solid var(--line); background: #fff; border-radius: 14px; padding: 6px 8px 8px; cursor: pointer; display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 0 4px; text-align: left; }
.jump-years button b { font-family: var(--round); font-weight: 800; font-size: 16px; }
.jump-years button small { font-size: 11px; color: var(--muted); }
.jump-years button:hover:not(:disabled) { border-color: var(--accent); }
.jump-years button.cur { border-color: var(--accent); }
.jump-years button.on { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 3px 0 var(--accent-deep); }
.jump-years button.on small { color: #fff; }
.jump-years button:disabled { opacity: .3; cursor: default; }
.ticks { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(12, 1fr); gap: 2px; margin-top: 4px; }
.ticks i { height: 4px; border-radius: 2px; background: #edf0f6; }
.ticks i.on { background: var(--accent); }
.jump-years button.on .ticks i { background: rgba(255,255,255,.35); }
.jump-years button.on .ticks i.on { background: #fff; }
#jumpYearTitle { font-family: var(--round); font-weight: 800; font-size: 15px; color: var(--ink); margin: 16px 0 8px; }
.jump-months { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.jump-months button { border: 0; background: #f3fafd; border-left: 4px solid #5ec3e6; border-radius: 12px; padding: 7px 10px 8px; text-align: left; cursor: pointer; min-height: 62px; display: flex; flex-direction: column; gap: 2px; position: relative; }
.jump-months button b { font-family: var(--round); font-weight: 800; font-size: 14px; }
.jump-months button small { font-size: 11px; line-height: 1.4; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.jump-months button.has::after { content: ''; position: absolute; right: 9px; top: 11px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.jump-months button.gen { background: #f3edfd; border-left-color: var(--sim); }
.jump-months button.cur { background: var(--accent); border-left-color: var(--accent-deep); color: #fff; }
.jump-months button.cur small { color: #fff; }
.jump-months button.cur.has::after { background: #fff; }
.jump-months button:hover:not(:disabled):not(.cur) { background: #fff4f7; border-left-color: var(--accent); }
.jump-months button:disabled { opacity: .3; cursor: default; }
.jump-air { margin: 12px 0 0; font-family: var(--round); font-weight: 700; font-size: 13px; }
.jump-air:not(:empty) { display: inline-block; background: #fff3c9; border-radius: 10px; padding: 4px 10px; }
#jumpDlg .row-btns { margin-top: 14px; }
.jump-months.play button { animation: rise .45s var(--spring) both; animation-delay: calc(var(--n, 0) * 18ms); }
.jump-months.play button:nth-child(n+5) { --n: 4; } .jump-months.play button:nth-child(n+9) { --n: 8; }
@media (max-width: 760px) {
  .ym { padding: 2px 8px; }
  .jump-hint { font-size: 10px; padding: 0 7px; margin-left: 6px; }
  .jump-years { grid-template-columns: repeat(5, 1fr); gap: 6px; }
  .jump-years button { grid-template-columns: 1fr; padding: 5px 6px 7px; }
  .jump-years button b { font-size: 14px; }
  .jump-years button small { font-size: 10px; }
  .jump-months { grid-template-columns: repeat(3, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .jump-months.play button { animation: none !important; }
}

/* ===== 天使キャスター（2026-11-15・B3案。Animagine XL 4.0 で生成→背景を抜いた3枚） =====
   a-base＝ふだん / a-blink＝目を閉じた顔（数秒おきにまばたき）/ a-talk＝口を開けた顔（.talking の間だけ口パク）
   3枚は顔の所だけ違う同じ絵なので 重ねて出し入れする */
.angel { width: auto; height: calc(100% - 4px); aspect-ratio: 520 / 504; border: 0; background: none; border-radius: 0; display: block; animation: angelFloat 3.6s ease-in-out infinite; }
.angel::before { content: none; }
.angel img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: bottom; }
.angel .a-blink, .angel .a-talk { opacity: 0; }
/* 重ねるのは顔の所だけ（全体を重ねると 半透明の羽の縁が二重になって 口パクのたびに羽が点滅する） */
.angel .a-blink, .angel .a-talk { clip-path: inset(35% 36% 47% 38%); }
.angel .a-blink { animation: blink 4.6s steps(1) infinite 1.2s; }
.angel.talking .a-talk { animation: talk .26s steps(1) infinite; }
.angel.talking .a-blink { animation: none; }
@keyframes angelFloat { 50% { transform: translateX(-50%) translateY(-4px); } 0%, 100% { transform: translateX(-50%); } }
@keyframes blink { 0% { opacity: 0; } 95% { opacity: 1; } 98% { opacity: 0; } }
@keyframes talk { 0% { opacity: 1; } 50% { opacity: 0; } }
.onair.play .angel { animation: angelHop .5s var(--spring), angelFloat 3.6s ease-in-out .5s infinite; }
.studio { height: 200px; }
@media (max-width: 760px) { .studio { height: 170px; } .angel { width: auto; height: calc(100% - 4px); } }
/* 元の絵は翼の先が左右の端で切れているので ふわっと消す */
.angel img { -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 16%, #000 84%, transparent 100%); mask-image: linear-gradient(90deg, transparent 0, #000 16%, #000 84%, transparent 100%); }
