:root {
  --bg: #f4f6fb; --card: #fff; --ink: #1d2433; --sub: #5c6578; --line: #dde2ec;
  --brand: #10306b; --accent: #f39700; --blue: #2f7de1; --red: #e0463c; --yellow: #f2c230; --ok: #1a9b55;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font-family: system-ui, -apple-system, "Hiragino Sans", "Yu Gothic UI", "Meiryo", sans-serif; line-height: 1.7; -webkit-text-size-adjust: 100%; }
a { color: #1f5fbf; }
.site-header { background: var(--brand); padding: 8px 16px; }
.logo { color: #fff; text-decoration: none; font-weight: 800; font-size: 18px; display: flex; align-items: center; gap: 8px; }
.logo small { font-weight: 500; font-size: 12px; opacity: .8; }
.logo .mark { background: var(--accent); color: #fff; border-radius: 8px; width: 28px; height: 28px; display: inline-grid; place-items: center; font-size: 16px; }
.wrap { max-width: 720px; margin: 0 auto; padding: 16px 16px 40px; }
h1 { font-size: 22px; line-height: 1.4; margin: 8px 0; }
h2 { font-size: 18px; }
.lead { color: var(--sub); }
.step { font-weight: 700; margin: 20px 0 8px; }
.small { font-size: 12px; color: var(--sub); }
.btn { border: 1px solid var(--line); background: #fff; color: var(--ink); border-radius: 10px; padding: 10px 16px; font-size: 15px; font-weight: 700; cursor: pointer; font-family: inherit; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.big { display: block; width: 100%; padding: 14px; font-size: 17px; margin: 16px 0; }
.btn.small { padding: 4px 10px; font-size: 13px; }
.btn:disabled { opacity: .4; cursor: default; }
.seg { display: flex; gap: 8px; }
.seg button { flex: 1; border: 2px solid var(--line); background: #fff; border-radius: 10px; padding: 8px; font-size: 16px; font-weight: 700; cursor: pointer; font-family: inherit; color: var(--ink); }
.seg button small { display: block; font-size: 11px; color: var(--sub); font-weight: 500; }
.seg button.on { border-color: var(--accent); background: #fff6e8; }
.slots { display: grid; gap: 8px; }
.slot { display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 6px 8px; }
.slot input { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; font-size: 16px; font-family: inherit; }
.slot button { width: 64px; border: 0; border-radius: 8px; padding: 8px 0; font-weight: 700; cursor: pointer; font-family: inherit; }
.slot.you button { background: var(--accent); color: #fff; }
.slot.cpu button { background: #dfe6f3; color: var(--brand); }
.slot.off { opacity: .5; }
.slot.off button { background: #eee; }
.dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; vertical-align: -1px; margin-right: 4px; flex: none; }
.resume { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: #fff6e8; border: 1px solid #f5d39a; border-radius: 12px; padding: 12px; margin: 12px 0; }
.resume span { display: block; font-size: 12px; color: var(--sub); }
.howto { background: #fff; border-radius: 12px; padding: 4px 16px 8px; margin: 16px 0; border: 1px solid var(--line); }
.howto li { margin-bottom: 8px; }
.chip { display: inline-block; padding: 0 6px; border-radius: 6px; font-size: 12px; font-weight: 700; color: #fff; }
.chip.blue { background: var(--blue); } .chip.red { background: var(--red); } .chip.yellow { background: var(--yellow); color: #533; }
.ad-slot:empty { display: none; }
.site-footer { text-align: center; padding: 24px 16px 40px; font-size: 13px; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 16px; }

/* ---------- ゲーム画面 ---------- */
body.in-game { overflow: hidden; }
body.in-game .site-header { display: none; }
.game { position: fixed; inset: 0; display: flex; flex-direction: column; background: #eef1f6; }
.topbar { display: flex; align-items: center; gap: 8px; padding: 6px 8px; background: var(--brand); color: #fff; padding-top: max(6px, env(safe-area-inset-top)); }
.when { font-size: 13px; white-space: nowrap; }
.when b { font-size: 18px; }
.when small { opacity: .7; }
.dest { flex: 1; min-width: 0; background: rgba(255,255,255,.12); border-radius: 8px; padding: 2px 8px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 700; }
.dest small { font-weight: 500; margin-left: 6px; opacity: .85; }
.icon-btn { background: none; border: 0; color: #fff; font-size: 22px; cursor: pointer; padding: 0 6px; }
.map-wrap { position: relative; flex: 1; min-height: 0; }
#map { width: 100%; height: 100%; display: block; touch-action: none; background: #f8f9fb; user-select: none; -webkit-user-select: none; }
.map-tools { position: absolute; right: 8px; top: 8px; display: flex; flex-direction: column; gap: 6px; }
.map-tools button { width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255,255,255,.92); font-size: 18px; font-weight: 700; cursor: pointer; color: var(--brand); }
.walk { stroke: #aab; stroke-width: 3; stroke-dasharray: 3 4; }
.node { cursor: pointer; }
.node .dot { fill: #fff; stroke: #333; stroke-width: 2.5; }
.node.blue .dot { fill: var(--blue); stroke: #1b4f96; }
.node.red .dot { fill: var(--red); stroke: #8c241d; }
.node.yellow .dot { fill: var(--yellow); stroke: #a17d0b; }
.node .label { font-size: 12px; text-anchor: middle; fill: #222; paint-order: stroke; stroke: #fff; stroke-width: 3.5px; stroke-linejoin: round; font-weight: 700; pointer-events: none; }
.node.prop .label { font-size: 13px; }
#map.far .node:not(.major):not(.cand):not(.is-dest) .label { display: none; }
#map.far .node.major .label { font-size: 22px; stroke-width: 5px; }
#map.very-far .node .label { display: none; }
#map.very-far .node.is-dest .label, #map.very-far .node.cand .label { display: block; font-size: 30px; }
.node.cand .dot { stroke: #ff7a00; stroke-width: 5; animation: pulse 0.9s ease-in-out infinite alternate; }
.node.cand .label { fill: #c24f00; }
@keyframes pulse { from { r: 9; } to { r: 14; } }
.destmark circle { fill: none; stroke: #ff3b30; stroke-width: 4; stroke-dasharray: 6 4; }
.flagtxt { font-size: 22px; pointer-events: none; }
.token { pointer-events: none; transition: transform .15s; }
.token circle { stroke: #fff; stroke-width: 3; filter: drop-shadow(0 1px 2px rgba(0,0,0,.4)); }
.token text { fill: #fff; font-size: 12px; font-weight: 800; text-anchor: middle; }
.token.active circle { stroke: #ffde59; stroke-width: 4; }
.token .ghost { font-size: 18px; }
.panel { background: #fff; border-top: 1px solid var(--line); padding: 8px 8px max(10px, env(safe-area-inset-bottom)); max-height: 52vh; overflow-y: auto; }
.players { display: grid; grid-template-columns: repeat(auto-fit, minmax(112px, 1fr)); gap: 6px; }
.pl { border: 1px solid var(--line); border-left: 5px solid var(--c); border-radius: 8px; padding: 3px 8px; font-size: 12px; line-height: 1.45; cursor: pointer; }
.pl.on { background: #fff8e6; border-color: #f5c66b; border-left-color: var(--c); }
.pl .dot { background: var(--c); }
.pl-name { font-weight: 700; display: flex; align-items: center; }
.pl-name small { margin-left: auto; color: var(--sub); }
.pl-money { font-size: 15px; font-weight: 800; }
.pl-money.neg { color: var(--red); }
.pl-sub { color: var(--sub); font-size: 11px; }
.action { margin-bottom: 8px; }
.msg { margin: 4px 0 8px; }
.action .btn.big { margin: 6px 0; }
.cards, .cands { display: flex; flex-wrap: wrap; gap: 6px; }
.card-btn, .cand-btn { border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 6px 10px; font-weight: 700; font-family: inherit; font-size: 14px; cursor: pointer; text-align: left; color: var(--ink); }
.card-btn small, .cand-btn small { display: block; font-weight: 500; font-size: 11px; color: var(--sub); }
.card-btn { background: #fffbe6; border-color: #f0d77a; }
.cand-btn { border-left: 5px solid #ccc; }
.cand-btn.blue { border-left-color: var(--blue); } .cand-btn.red { border-left-color: var(--red); } .cand-btn.yellow { border-left-color: var(--yellow); } .cand-btn.prop { border-left-color: #333; }
.dice { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 54px; line-height: 1; padding: 6px 0; }
.dice b { font-size: 34px; margin-left: 8px; color: var(--accent); }
.dice.rolling span { animation: shake .12s infinite alternate; }
@keyframes shake { from { transform: rotate(-12deg); } to { transform: rotate(12deg); } }

/* ---------- ダイアログ ---------- */
.modal { position: fixed; inset: 0; background: rgba(10,20,40,.45); display: flex; align-items: flex-end; justify-content: center; z-index: 50; }
.modal[hidden] { display: none; }
.sheet { background: #fff; width: 100%; max-width: 520px; max-height: 86vh; overflow-y: auto; border-radius: 16px 16px 0 0; padding: 16px 16px max(16px, env(safe-area-inset-bottom)); }
@media (min-width: 700px) { .modal { align-items: center; } .sheet { border-radius: 16px; } }
.sheet h2 { margin: 0 0 8px; }
.m-btns { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.props { width: 100%; border-collapse: collapse; font-size: 13px; margin: 8px 0; }
.props th, .props td { border-bottom: 1px solid var(--line); padding: 5px 4px; text-align: left; }
.props th { font-size: 11px; color: var(--sub); font-weight: 500; }
.st-lines .ln { display: inline-block; color: #fff; font-weight: 800; font-size: 12px; border-radius: 50%; width: 22px; height: 22px; text-align: center; line-height: 22px; margin: 0 2px 0 6px; }
.st-riders small { color: var(--sub); font-size: 11px; }
.big-num { font-size: 18px; text-align: center; }
.big-num b { color: var(--accent); font-size: 24px; }
.plus { color: var(--ok); } .minus { color: var(--red); }

/* ---------- 結果 ---------- */
.r-head { color: var(--sub); margin: 8px 0 0; }
.ranking { list-style: none; padding: 0; margin: 16px 0; display: grid; gap: 8px; }
.ranking li { background: #fff; border: 1px solid var(--line); border-left: 6px solid var(--c); border-radius: 10px; padding: 8px 12px; display: grid; grid-template-columns: auto 1fr auto; gap: 0 10px; align-items: baseline; }
.ranking .rk { font-weight: 800; }
.ranking .nm { font-weight: 700; }
.ranking .am { font-weight: 800; font-size: 17px; }
.ranking small { grid-column: 1 / -1; color: var(--sub); font-size: 12px; }
.ranking li:first-child { background: #fff8e6; }
.share { display: flex; gap: 8px; flex-wrap: wrap; }
.sh { flex: 1; text-align: center; padding: 10px; border-radius: 10px; font-weight: 700; text-decoration: none; color: #fff; border: 0; font-size: 14px; font-family: inherit; cursor: pointer; }
.sh.x { background: #111; } .sh.line { background: #06c755; } .sh.copy { background: #6b7385; }
.sub { margin-top: 24px; }
.best { padding-left: 0; list-style: none; }
.best li { margin-bottom: 6px; }

/* サイコロのあと：進む駅をえらぶ間 */
.hint { position: absolute; left: 8px; right: 54px; top: 8px; z-index: 2; background: #ff7a00; color: #fff; font-weight: 800; border-radius: 12px; padding: 8px 12px; box-shadow: 0 2px 8px rgba(0,0,0,.25); pointer-events: none; animation: hintIn .3s ease-out; line-height: 1.4; }
.hint b { font-size: 22px; }
.hint span { display: inline-block; }
@keyframes hintIn { from { transform: translateY(-10px); opacity: 0; } to { transform: none; opacity: 1; } }
.game.choosing .players { display: none; }
.game.choosing .action { margin-top: 0; }
.cand-btn { min-height: 44px; }
.msg small { color: var(--sub); }

/* とても狭い画面 */
@media (max-width: 360px) { .logo small { display: none; } }
.wrap { overflow-wrap: anywhere; }

/* 駅のできごと */
.spot { display: inline-block; font-size: 13px; font-weight: 700; color: #6a4b00; background: #fff4d6; border-radius: 6px; padding: 1px 8px; margin-bottom: 4px; }
.spot small { font-weight: 500; color: var(--sub); }

/* 説明ページ */
.doc h2 { font-size: 18px; margin-top: 28px; padding-left: 8px; border-left: 4px solid var(--accent); }
.doc li { margin-bottom: 6px; }

/* 到着の演出（駅名標ふう） */
.arrive { position: absolute; inset: 0; z-index: 3; display: grid; place-items: center; background: rgba(16, 48, 107, .18); overflow: hidden; cursor: pointer; }
.arrive .sign { position: relative; background: #fff; border-radius: 14px; box-shadow: 0 6px 24px rgba(0,0,0,.3); min-width: 230px; max-width: 86%; padding: 18px 20px 14px; text-align: center; animation: signIn .45s cubic-bezier(.2,1.4,.5,1); overflow: hidden; }
.arrive .stripes { position: absolute; left: 0; right: 0; top: 0; height: 8px; display: flex; }
.arrive .stripes i { flex: 1; }
.arrive .who { font-size: 12px; font-weight: 800; }
.arrive .nm { font-size: 34px; font-weight: 900; letter-spacing: .08em; line-height: 1.2; margin: 2px 0 4px; }
.arrive .chips .ln { display: inline-block; color: #fff; font-weight: 800; font-size: 12px; border-radius: 50%; width: 22px; height: 22px; line-height: 22px; margin: 0 2px; }
.arrive .hi { margin-top: 8px; font-weight: 700; color: #c24f00; font-size: 15px; }
.arrive .bit { position: absolute; bottom: -40px; font-size: 30px; animation: bitUp 1.6s ease-out forwards; pointer-events: none; }
@keyframes signIn { from { transform: scale(.6) translateY(20px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes bitUp { 0% { transform: translate(0, 0) rotate(0); opacity: 0; } 15% { opacity: 1; } 100% { transform: translate(var(--dx), -110vh) rotate(25deg); opacity: .2; } }
@media (prefers-reduced-motion: reduce) { .arrive .bit { display: none; } .arrive .sign { animation: none; } }

/* 全国版 */
.bigline { fill: none; stroke-width: 2.5; vector-effect: non-scaling-stroke; stroke-linecap: round; stroke-linejoin: round; }
.bigline.shinkansen { stroke-width: 4.5; }
.bigline.walk { stroke: #9aa3b5; stroke-width: 1.5; stroke-dasharray: 2 3; }
.lndot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: 0; }
.arrive .lnames { display: inline-block; font-size: 12px; color: var(--sub); font-weight: 700; }
.other-ver { display: block; background: #eef4ff; border: 1px solid #c9d8f5; border-radius: 12px; padding: 10px 14px; margin: 12px 0; font-weight: 700; text-decoration: none; color: var(--brand); }
.other-ver b { background: #e53935; color: #fff; border-radius: 6px; padding: 0 6px; font-size: 12px; margin-right: 4px; }
.doc h3 { font-size: 16px; margin-top: 18px; }

/* 音のボタン */
.sound-line { display: flex; align-items: center; gap: 10px; margin: 14px 0 0; font-size: 13px; color: var(--sub); }
.sound-big { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: #fff; font-size: 20px; cursor: pointer; }

/* オンライン対戦 */
.online { background: #fff; border: 2px solid #c9d8f5; border-radius: 14px; padding: 4px 16px 14px; margin: 18px 0; }
.online h2 { margin: 12px 0 4px; }
.ol-label { display: block; font-weight: 700; font-size: 14px; margin: 10px 0; }
.ol-label input, .ol-join input, .ol-invite input { display: block; width: 100%; margin-top: 4px; border: 1px solid var(--line); border-radius: 8px; padding: 8px; font-size: 16px; font-family: inherit; }
.ol-join { display: flex; gap: 8px; margin-top: 10px; }
.ol-join input { margin-top: 0; text-transform: uppercase; letter-spacing: .15em; }
.ol-codebox { font-size: 15px; margin: 12px 0 6px; }
.ol-codebox b { font-size: 30px; letter-spacing: .2em; color: var(--brand); margin-left: 6px; }
.ol-invite { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.ol-invite input { flex: 1 1 100%; font-size: 13px; }
.ol-line { background: #06c755; border-color: #06c755; color: #fff; text-decoration: none; }
.ol-members { list-style: none; padding: 0; margin: 0; }
.ol-members li { padding: 6px 0; border-bottom: 1px solid var(--line); font-weight: 700; }
.ol-members li.cpu { color: var(--sub); font-weight: 500; }
.ol-members .dot { background: #bbb; }
.ol-members .dot.on { background: #1a9b55; }
.ol-cpus { font-size: 16px; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--line); }
.ol-status { background: #fff4d6; border-radius: 8px; padding: 6px 10px; font-size: 13px; }
#ol-leave { margin-top: 10px; }

/* 全国版：遊ぶ範囲 */
.scope { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 2px 14px 14px; margin: 12px 0; }
.scope .step { margin-top: 12px; }
.scope-now { font-weight: 500; font-size: 13px; color: var(--sub); margin-left: 6px; }
.scope-sel { display: block; width: 100%; margin-top: 10px; font-size: 16px; padding: 8px; border-radius: 8px; border: 1px solid var(--line); font-family: inherit; }
#scope-go { margin-top: 10px; width: 100%; }

/* 駅クイズ */
.quiz-q { font-size: 18px; font-weight: 800; line-height: 1.5; margin: 4px 0 8px; }
.m-btns .quiz-c { text-align: left; font-size: 16px; padding: 12px 14px; }

/* ランダム対戦 */
.ol-btns { display: grid; gap: 8px; margin-top: 6px; }
.ol-matching { text-align: center; padding: 8px 0; }
.ol-matching .btn { display: block; width: 100%; margin-top: 8px; }
.ol-spin { font-size: 44px; margin: 6px 0 0; animation: shake .5s infinite alternate; }

/* トップ：遊ぶ範囲を大きく */
.scope-hero { border: 2px solid var(--accent); background: #fffaf2; }
.scope-title { font-weight: 800; font-size: 17px; margin: 12px 0 8px; }
.scope-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.scope-chips button { border: 1px solid #f0c98a; background: #fff; border-radius: 999px; padding: 7px 12px; font-size: 14px; font-weight: 700; cursor: pointer; font-family: inherit; color: var(--ink); }
.scope-chips button.on { background: var(--accent); border-color: var(--accent); color: #fff; }

/* 5人以上：社長の欄を小さく */
.players.many { grid-template-columns: repeat(auto-fit, minmax(84px, 1fr)); gap: 4px; }
.players.many .pl { padding: 2px 6px; font-size: 11px; }
.players.many .pl-money { font-size: 13px; }
.players.many .pl-sub { display: none; }
.players.many .pl-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.players.many .pl-name small { display: none; }

/* 年数の自由入力 */
.years-custom-l { display: block; }
#years-custom, .ol-years-custom { display: block; width: 100%; margin-top: 8px; font-size: 18px; padding: 8px 10px; border: 2px solid var(--accent); border-radius: 10px; font-family: inherit; }
#years-custom[hidden], .ol-years-custom[hidden] { display: none; }

/* オンラインの放置対策 */
.afk { margin: 0 0 6px; font-size: 13px; font-weight: 700; color: #c24f00; background: #fff4d6; border-radius: 8px; padding: 4px 10px; }

/* 今日のチャレンジ・スタンプ帳 */
.extras { display: grid; gap: 8px; margin: 12px 0; }
.daily-card, .stamp-card { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.daily-card { background: #eef7ff; border-color: #bcd8f5; }
.daily-card.hl { box-shadow: 0 0 0 3px var(--accent); }
.daily-card span, .stamp-card span { display: block; font-size: 12px; color: var(--sub); }
.daily-card .btn, .stamp-card .btn { flex: none; }
.stamp-new { position: absolute; left: 50%; top: 10px; transform: translateX(-50%); background: #e53935; color: #fff; font-size: 12px; font-weight: 800; border-radius: 999px; padding: 2px 10px; white-space: nowrap; }
.arrive .sign { padding-top: 34px; }
.st-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.st-chip { background: #f1f4f9; border-radius: 8px; padding: 2px 8px; font-size: 13px; font-weight: 700; }
.st-chip small { font-weight: 500; color: var(--sub); margin-left: 4px; font-size: 11px; }
.stamp-prefs { list-style: none; padding: 0; margin: 0; font-size: 13px; }
.stamp-prefs li { display: grid; grid-template-columns: 5.5em 1fr auto auto; gap: 6px; align-items: center; padding: 2px 0; }
.stamp-prefs .bar { height: 8px; background: #eef0f4; border-radius: 4px; overflow: hidden; }
.stamp-prefs .bar i { display: block; height: 100%; background: var(--accent); }
.stamp-prefs small { color: var(--sub); }
/* 行き先の道すじ・案内 */
.cand-path { fill: none; stroke: #ff7a00; stroke-opacity: .35; stroke-width: 4; stroke-dasharray: 6 5; vector-effect: non-scaling-stroke; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.cand-path.hot { stroke-opacity: .95; stroke-width: 7; stroke-dasharray: none; }
.coach { background: #fff6d6; border: 1px dashed #e0b000; border-radius: 10px; padding: 6px 10px; font-size: 13px; margin: 0 0 8px; }
/* 結果カード */
.r-card { background: #10306b; color: #fff; border-radius: 16px; padding: 18px 16px 14px; text-align: center; margin: 12px 0 8px; border-top: 6px solid var(--accent); }
.rc-area { font-weight: 800; font-size: 18px; }
.rc-head { font-size: 13px; opacity: .85; }
.rc-rank { font-size: 56px; font-weight: 900; color: #ffd36b; line-height: 1.15; margin-top: 6px; }
.rc-assets { font-size: 20px; font-weight: 800; }
.rc-extra { font-size: 13px; opacity: .9; margin-top: 4px; }
.rc-foot { font-size: 12px; opacity: .7; margin-top: 8px; }
.r-img { display: block; width: 100%; margin-bottom: 10px; }

/* 範囲ごとの紹介ページ */
.crumb { font-size: 12px; color: var(--sub); margin: 0; }
.area-play { text-align: center; text-decoration: none; }
.area-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.area-table th, .area-table td { border-bottom: 1px solid var(--line); padding: 6px 4px; text-align: left; }
.area-table th { font-size: 11px; color: var(--sub); font-weight: 500; }
.area-lines { list-style: none; padding: 0; columns: 2; font-size: 13px; }
.area-lines li { break-inside: avoid; padding: 2px 0; }
.area-lines small { color: var(--sub); margin-left: 4px; }
.area-index { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 6px; }
.area-index a { display: block; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; text-decoration: none; font-weight: 700; color: var(--ink); }
.area-index small { display: block; font-weight: 500; color: var(--sub); font-size: 11px; }
.area-table .ops { display: block; font-size: 11px; color: var(--sub); }

/* スタンプ帳：注意・引き継ぎコード */
.stamp-warn { font-size: 12px; background: #fff4d6; border-radius: 8px; padding: 6px 10px; color: #6a4b00; }
.stamp-note { font-size: 11px !important; color: #a06a00 !important; }
.stamp-backup { border-top: 1px solid var(--line); margin-top: 10px; padding-top: 6px; }
.stamp-backup textarea { display: block; width: 100%; margin: 6px 0; font-size: 13px; font-family: monospace; border: 1px solid var(--line); border-radius: 8px; padding: 6px; }
.stamp-backup-btns { display: flex; gap: 6px; }

/* 止まったときの知らせ */
.stall { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; background: #ffe9e6; border: 1px solid #f3b5ad; border-radius: 8px; padding: 6px 10px; font-size: 13px; font-weight: 700; margin-bottom: 6px; }

/* ===== 桃鉄ふうの地図 ===== */
#map.big { background: #7cc2ec; }
.land path { fill: #b9e09a; stroke: #b9e09a; stroke-width: 12; stroke-linejoin: round; }  /* 市区町村の形のすき間を埋める（地図の単位で約1.2km） */
.bigline.casing { stroke: #2d3436; stroke-width: 5; }
.bigline.casing.shinkansen { stroke-width: 7.5; }
.bigline { stroke-width: 3; }
.bigline.shinkansen { stroke-width: 5; }
#map.big .node .dot { stroke-width: 1.8; }
#map.big .node.prop .dot { fill: #fff; stroke: #d23b2a; stroke-width: 2.4; }
#map.big .node.blue .dot { fill: #2f7de1; stroke: #fff; }
#map.big .node.red .dot { fill: #e0463c; stroke: #fff; }
#map.big .node.yellow .dot { fill: #f2c230; stroke: #fff; }
#map.big .node .label { font-size: 12px; stroke-width: 4px; }
#map.big .node.prop .label { font-size: 13px; font-weight: 900; }
#map.big .node.cand .dot { stroke: #ff7a00; stroke-width: 3; animation: pulse2 .8s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: center; }
@keyframes pulse2 { from { transform: scale(1); } to { transform: scale(1.35); } }
.token .tk-train { font-size: 14px; text-anchor: middle; }
.token .tk-name { font-size: 9px; font-weight: 900; text-anchor: middle; fill: #fff; paint-order: stroke; stroke: #2d3436; stroke-width: 3px; }
.token.active .tk { animation: hop .6s ease-in-out infinite alternate; }
@keyframes hop { from { transform: translateY(0); } to { transform: translateY(-5px); } }
/* ===== 演出 ===== */
.fx { position: absolute; inset: 0; pointer-events: none; z-index: 4; overflow: hidden; }
.fx .banner { position: absolute; left: 50%; top: 38%; transform: translate(-50%, -50%); background: rgba(16, 48, 107, .92); color: #fff; border: 3px solid #ffd36b; border-radius: 14px; padding: 10px 22px; font-size: 22px; font-weight: 900; white-space: nowrap; box-shadow: 0 6px 20px rgba(0,0,0,.35); animation: bnIn 1s ease-out forwards; display: flex; align-items: center; gap: 8px; }
.fx .banner .bn-who { color: #fff; border-radius: 8px; padding: 2px 10px; }
.fx .banner.month { flex-direction: column; gap: 0; background: #fff; color: #c62828; border-color: #c62828; padding: 6px 26px; }
.fx .banner.month small { color: #555; font-size: 13px; }
.fx .banner.month b { font-size: 34px; line-height: 1.1; }
.fx .banner.settle { background: #fff8e1; color: #e65100; border-color: #e65100; }
@keyframes bnIn { 0% { transform: translate(-150%, -50%); opacity: 0; } 18% { transform: translate(-50%, -50%); opacity: 1; } 82% { transform: translate(-50%, -50%); opacity: 1; } 100% { transform: translate(60%, -50%); opacity: 0; } }
.fx .bigdice { position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%); font-size: 84px; line-height: 1; display: flex; align-items: center; gap: 6px; filter: drop-shadow(0 4px 8px rgba(0,0,0,.35)); }
.fx .bigdice span { background: #fff; border-radius: 16px; padding: 0 4px; animation: shake .1s infinite alternate; }
.fx .bigdice.done span { animation: none; }
.fx .bigdice b { font-size: 56px; color: #fff; background: #ff7a00; border-radius: 50%; width: 84px; height: 84px; display: grid; place-items: center; animation: popIn .35s ease-out; }
@keyframes popIn { from { transform: scale(.2); } to { transform: scale(1); } }
.fx .money { position: absolute; transform: translateX(-50%); font-weight: 900; font-size: 16px; white-space: nowrap; paint-order: stroke; -webkit-text-stroke: 4px #fff; animation: floatUp 1.5s ease-out forwards; }
.fx .money.plus { color: #1a9b55; }
.fx .money.minus { color: #e0463c; }
@keyframes floatUp { from { transform: translate(-50%, 0); opacity: 1; } to { transform: translate(-50%, -46px); opacity: 0; } }
.fx .stamp { position: absolute; left: 50%; top: 40%; transform: translate(-50%, -50%) rotate(-12deg); font-size: 40px; font-weight: 900; color: #d23b2a; border: 6px solid #d23b2a; border-radius: 12px; padding: 0 16px; background: rgba(255,255,255,.85); animation: stampIn .5s cubic-bezier(.2,1.6,.4,1); }
@keyframes stampIn { from { transform: translate(-50%, -50%) rotate(-12deg) scale(3); opacity: 0; } to { transform: translate(-50%, -50%) rotate(-12deg) scale(1); opacity: 1; } }
.fx .confetti i { position: absolute; top: -12px; width: 9px; height: 14px; border-radius: 2px; animation: fall 1.9s ease-in forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(var(--r)); } }
/* ===== 相手の番を見る ===== */
.spec { background: #eef4ff; border-radius: 10px; padding: 6px 10px; margin: 0 0 6px; font-size: 14px; }
.wait-line small { color: var(--sub); margin-left: 4px; }
.spec-props { font-size: 12px; }
.spec-quiz { margin: 0 0 6px; padding-left: 22px; font-size: 13px; }
/* ===== 駅の写真 ===== */
.st-photo { margin: 0 0 8px; }
.st-photo img { width: 100%; max-height: 220px; object-fit: cover; border-radius: 10px; background: #e8edf3; display: block; }
.st-photo figcaption { font-size: 10px; color: var(--sub); margin-top: 2px; line-height: 1.4; }
.arrive .sign.has-photo { padding-top: 0; }
.arrive .sign-photo { display: block; width: calc(100% + 40px); margin: 0 -20px 6px; height: 120px; object-fit: cover; border-radius: 14px 14px 0 0; background: #e8edf3; }
.arrive .sign-credit { display: block; font-size: 9px; color: var(--sub); margin: -4px 0 4px; }
.arrive .sign.has-photo .stamp-new { top: 8px; }
@media (max-width: 600px) {
  .fx .bigdice { font-size: 52px; }
  .fx .bigdice b { font-size: 34px; width: 54px; height: 54px; }
  .fx .banner { font-size: 17px; padding: 8px 14px; }
  .fx .banner.month b { font-size: 26px; }
  .fx .stamp { font-size: 30px; }
}
.token:not(.active) .tk-name { display: none; }   /* 名前は手番の社長だけ（重なって読めなくなるので） */
