/* ======== 新界面（2026-11）：出发卡、三栏主界面、抉择卡。在 style.css 之后加载 ======== */
body.wide #app { max-width: 1240px; }
.setup { margin-bottom: 10px; }
.setup-title { font-weight: 700; margin-bottom: 4px; }
.small { font-size: 12px; }
.warn { color: var(--down); }
.neg { color: var(--down); }

/* 出发卡：浅色底 + 细线条背景 */
.depart-card { background-color: #fffdf8;
  background-image: linear-gradient(#efe7d8 1px, transparent 1px), linear-gradient(90deg, #efe7d8 1px, transparent 1px);
  background-size: 18px 18px; }
.dc-head { display: flex; justify-content: space-between; align-items: baseline; }
.dc-title { font-size: 22px; font-weight: 800; letter-spacing: 4px; }
.dc-lead { font-size: 16px; margin: 8px 0 10px; line-height: 1.7; }
.dc-map { background: #f4efe4; border: 1px solid var(--line); border-radius: 10px; padding: 6px; }
.worldmap { width: 100%; height: auto; display: block; }
.worldmap .wd { fill: #cfc4b1; }
.worldmap .warc { fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-dasharray: 4 3; }
.worldmap .wfrom { fill: #d6453d; }
.worldmap .wto { fill: #2f6fdb; }
.dc-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin-top: 10px; }
.dc-cell { background: rgba(255, 253, 248, .96); padding: 8px 10px; font-size: 14px; }
.dc-cell.wide, .dc-cell.full { grid-column: span 2; }
.dc-k { font-size: 11px; color: var(--muted); letter-spacing: 1px; }
.dc-dots { letter-spacing: 2px; color: var(--accent); }
@media (min-width: 720px) {
  .dc-grid { grid-template-columns: repeat(4, 1fr); }
  .dc-cell.wide { grid-column: span 2; }
  .dc-cell.full { grid-column: span 4; }
}

/* 顶栏 */
.topbar { position: sticky; top: 0; z-index: 5; background: var(--bg); display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.tb-age b { font-size: 34px; line-height: 1; font-weight: 800; }
.tb-age span { font-size: 13px; color: var(--muted); margin-left: 2px; }
.tb-mid { flex: 1; min-width: 0; }
.tb-line { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.life-bar { height: 6px; background: #e9e1d2; border-radius: 99px; overflow: hidden; margin-top: 4px; }
.life-bar i { display: block; height: 100%; background: linear-gradient(90deg, #14936b, #c98a0b, #b8432f); transition: width .4s; }

/* 三栏（手机上：中间栏在最上面，左右栏依次在下） */
.game-grid { display: grid; gap: 10px; padding: 10px 0 60px; }
.col-left, .col-right, .col-center { display: grid; gap: 10px; align-content: start; min-width: 0; }
.col-center { order: -1; }
@media (min-width: 980px) {
  .game-grid { grid-template-columns: 270px 1fr 280px; }
  .col-center { order: 0; }
}
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; }
.panel h4 { margin: 0 0 6px; }
.stat-panel { display: grid; gap: 6px; }
.stat-panel .stat { grid-template-columns: 4.6em 1fr 2em; }
.money { display: grid; gap: 2px; font-size: 14px; border-top: 1px dashed var(--line); padding-top: 6px; margin-top: 2px; }

/* 身份卡 */
.id-top { display: flex; gap: 10px; align-items: center; }
#avatar { width: 56px; height: 56px; image-rendering: pixelated; border-radius: 8px; border: 1px solid var(--line); }
.id-name { font-size: 18px; font-weight: 800; }
.id-rows { display: grid; grid-template-columns: 2.6em 1fr; gap: 3px 8px; font-size: 13px; margin: 8px 0; }
.id-rows dt { color: var(--muted); }
.id-rows dd { margin: 0; }
.chip { display: inline-block; font-size: 11px; padding: 1px 6px; border-radius: 99px; background: #efe6d4; margin: 0 4px 2px 0; }
.mrz { font-family: "OCR B", Consolas, "Courier New", monospace; font-size: 9.5px; letter-spacing: .5px; background: #f1ece2; border-radius: 6px; padding: 5px 6px; overflow: hidden; white-space: nowrap; color: #4b4339; }

/* 场景 */
.scene-panel { padding: 8px; }
#scene { width: 100%; height: auto; aspect-ratio: 16 / 9; image-rendering: pixelated; border-radius: 10px; display: block; background: #e3ecf0; }
.scene-desc { font-size: 13px; color: var(--muted); margin-top: 6px; text-align: center; }

/* 今年的重心 */
.focus-head { font-size: 14px; font-weight: 700; margin-bottom: 6px; }
.focus-head .muted { font-weight: 400; font-size: 12px; }
.focus-btns { display: flex; flex-wrap: wrap; gap: 6px; }
.btn.small.focus-btn { min-height: 32px; padding: 4px 10px; font-size: 13px; }
.focus-btn.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* 控制 */
.game .controls { position: static; background: none; border: 0; padding: 0; backdrop-filter: none; justify-content: flex-start; }
.game .controls #btn-step { flex: 0 0 auto; }
.speed { display: flex; gap: 2px; background: var(--paper); border: 1px solid var(--line); border-radius: 99px; padding: 2px; }
.btn.tiny { min-height: 30px; padding: 2px 8px; font-size: 12px; border: 0; background: transparent; }
.btn.tiny.on { background: var(--accent); color: #fff; }
.note-box textarea, .reflect-q textarea { width: 100%; font: inherit; border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; margin: 6px 0; }
.log-head { display: flex; justify-content: space-between; align-items: center; font-weight: 700; font-size: 14px; }

/* 人生纪录流（一行一条，最新在前） */
.game .log { padding: 0; max-height: 70vh; overflow: auto; }
.game .log .entry { margin: 0; border-radius: 0; border-width: 0 0 1px; padding: 7px 4px; font-size: 14px; line-height: 1.55; animation: none; background: transparent; }
.game .log .entry.real { background: #fffaf0; }
.game .log .entry.has-choice { background: #fbf7ef; }
.game .log .entry.kind-crisis { background: #fff6f4; }
.game .log .entry.kind-death { background: #2a2622; color: #f6f1e7; }
.game .log .entry.kind-note .note { color: #5b4a8a; font-style: italic; }
.lm-y { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 12px; margin-right: 4px; }
.lm-a { color: var(--muted); font-size: 12px; margin-right: 4px; }
.game .log .entry-text { font-size: 14px; }
.game .log .entry-choice, .game .log .entry-result { font-size: 13px; }
.game .log .deltas { display: inline-flex; margin: 0 0 0 4px; }
.fav { float: right; border: 0; background: none; color: #c9b98f; cursor: pointer; font-size: 15px; padding: 0 2px; }
.fav.on { color: #c98a0b; }
.info { font-size: 12px; color: #6b6156; margin-top: 2px; }
.info-k { display: inline-block; font-size: 10px; border: 1px solid #d9cdb4; border-radius: 4px; padding: 0 4px; margin-right: 4px; color: #8a7a5c; }
.game .log .phase-div { margin: 10px 0 4px; }

/* 家人 / 同批 / 人生地图 */
.fam, .mates { list-style: none; padding: 0; margin: 0; font-size: 13px; display: grid; gap: 3px; }
.fam li.gone { text-decoration: line-through; color: var(--muted); }
.mates li { border-bottom: 1px dashed var(--line); padding-bottom: 3px; }
.lifemap { display: grid; grid-template-columns: repeat(10, 1fr); gap: 2px; margin-top: 4px; }
.lifemap i { aspect-ratio: 1; background: #f1ece2; border-radius: 2px; border: 1px solid transparent; }
.lifemap i.child { background: #ebe5d9; }
.lifemap i.over { border: 1px dashed #b9ad97; }
.lifemap i.now { outline: 2px solid var(--ink); }

/* 抉择卡 */
.fact-box { background: #f4efe4; border: 1px solid #e6dcc6; border-radius: 10px; padding: 8px 10px; font-size: 13px; margin: 8px 0; }
.btn.choice { display: grid; gap: 2px; }
.c-label { font-weight: 600; }
.c-sub { font-size: 12px; color: var(--muted); }
.c-note, .c-miss { font-size: 12px; color: var(--down); }
.btn.choice.risk { border-color: #e5b5ab; background: #fff7f5; }
.btn.choice:disabled { opacity: .6; }
.modal-foot { display: flex; justify-content: space-between; margin-top: 10px; }
.pending-bar { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 15; border: 0; border-radius: 99px;
  background: var(--accent); color: #fff; padding: 10px 18px; font-size: 15px; box-shadow: var(--shadow); cursor: pointer; font-family: inherit; }
.reflect-q { margin-top: 10px; font-size: 14px; }
/* 时间流：顶栏“1 年 ≈ N 秒”、纪录里的月份 */
.tb-pace { font-size: 12px; color: var(--muted, #888); border: 1px solid var(--line, #ccc); border-radius: 99px; padding: 0 6px; margin-left: 4px; }
.lm-m { margin-left: 2px; font-size: .85em; opacity: .75; }
