/* 七州戦記: 和紙の地に墨・藍・朱。肖像と地図の絵柄（水彩と墨の線）に合わせて落ち着いた色に */
:root {
  --ink: #2b2620;
  --ink-soft: #6d6355;
  --bg: #e9e0cc;
  --paper: #f7f1e3;
  --paper-2: #efe6d2;
  --line: #d6c9ad;
  --ai: #2f4a78;
  --ai-dark: #1f3356;
  --shu: #b43c2c;
  --shu-dark: #86291d;
  --kin: #a7832f;
  --matsu: #3f6b4a;
  --font: "Zen Kaku Gothic New", system-ui, sans-serif;
  --min: "Zen Old Mincho", "Hiragino Mincho ProN", "Yu Mincho", serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); background-image: radial-gradient(rgba(120, 96, 60, 0.07) 1px, transparent 1px); background-size: 7px 7px; color: var(--ink); font-family: var(--font); font-weight: 500; line-height: 1.7; line-break: strict; }
[hidden] { display: none !important; }
button { font-family: var(--font); color: inherit; }
.g-head { display: flex; align-items: center; gap: 10px; padding: 10px 16px; max-width: 560px; margin: 0 auto; font-size: 13px; font-weight: 700; }
.g-brand { color: var(--ink-soft); text-decoration: none; white-space: nowrap; }
.g-title { flex: 1; text-align: center; font: 900 17px/1.2 var(--min); letter-spacing: 0.08em; }
.g-head [data-mg-account] a { color: var(--ai); text-decoration: none; }
main { max-width: 560px; margin: 0 auto; padding: 0 10px 24px; }
.play { position: relative; }
.lbl { display: block; font-size: 10px; font-weight: 700; color: var(--ink-soft); line-height: 1.3; }
.keep { display: inline-block; }

.btn { display: block; width: 100%; margin: 8px 0 0; min-height: 48px; padding: 12px 10px; border: 0; border-radius: 10px; font: 700 15px/1.25 var(--font); cursor: pointer; background: var(--ai); color: #fff; }
.btn:disabled { background: #ddd3bf; color: #8c8270; cursor: default; box-shadow: none; }
.btn.primary { background: var(--shu); box-shadow: 0 3px 0 var(--shu-dark); }
.btn.ghost { background: transparent; border: 2px solid var(--line); color: var(--ink); font-size: 14px; }
.btn.small { min-height: 44px; padding: 6px 8px; font-size: 13px; margin: 0; }
.ico-btn { flex: none; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 10px; background: transparent; cursor: pointer; color: var(--ink); }
.ico-btn:hover { background: rgba(0, 0, 0, 0.05); }

/* ---------- タイトル ---------- */
.title { position: relative; border-radius: 14px; overflow: hidden; background: #24324a; min-height: 560px; }
.t-art img { display: block; width: 100%; height: auto; }
.t-in { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; padding: 26px 20px 18px; background: linear-gradient(to bottom, rgba(20, 24, 34, 0.0) 0%, rgba(20, 24, 34, 0) 45%, rgba(24, 22, 18, 0.72) 72%, rgba(24, 22, 18, 0.9) 100%); }
.t-logo { margin: 0; display: flex; gap: 0.06em; white-space: nowrap; font: 900 clamp(46px, 17vw, 64px)/1 var(--min); letter-spacing: 0.04em; color: #fbf6ea; text-shadow: 0 2px 0 rgba(43, 38, 32, 0.6), 0 0 24px rgba(30, 30, 50, 0.55); }
.t-logo span { display: block; flex: none; }
.t-sub { margin: 8px 0 0; font-size: 13px; letter-spacing: 0.4em; color: #fbf6ea; text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6); }
.t-lead { margin: auto 0 10px; font: 700 17px/1.6 var(--min); color: #fbf6ea; text-align: center; text-shadow: 0 1px 6px rgba(0, 0, 0, 0.8); }
.t-lead span { display: inline-block; }
.t-btns { width: 100%; max-width: 300px; }
.t-btns .btn.ghost { color: #fbf6ea; border-color: rgba(251, 246, 234, 0.55); }
.t-btns .btn:not(.primary):not(.ghost) { background: rgba(247, 241, 227, 0.95); color: var(--ink); }
.t-info { margin: 4px 0 0; font-size: 12px; text-align: center; color: #f1e7d0; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8); }
.portal-link { margin-top: 12px; font-size: 12px; color: #f1e7d0; }

/* ---------- 家選び ---------- */
.pick { background: var(--paper); border-radius: 14px; padding: 6px 10px 14px; }
.pk-head { display: flex; align-items: center; gap: 4px; }
.pk-head h2 { margin: 0; font: 900 19px/1.4 var(--min); }
.pk-list { display: grid; gap: 8px; margin-top: 4px; }
.hcard { display: grid; grid-template-columns: 76px 1fr; gap: 10px; width: 100%; padding: 8px; border: 2px solid var(--line); border-radius: 12px; background: #fffaf0; text-align: left; cursor: pointer; }
.hcard[aria-checked="true"] { border-color: var(--shu); box-shadow: 0 0 0 2px rgba(180, 60, 44, 0.18); background: #fff6ea; }
.hcard img { width: 76px; height: 76px; border-radius: 10px; object-fit: cover; display: block; background: var(--paper-2); }
.hc-top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.hc-top b { font: 900 17px/1.3 var(--min); }
.lvl { padding: 0 7px; border-radius: 999px; font-size: 11px; font-weight: 700; color: #fff; line-height: 1.6; white-space: nowrap; }
.lvl.l1 { background: var(--matsu); } .lvl.l2 { background: var(--kin); } .lvl.l3 { background: var(--shu); }
.hc-sub { font-size: 12px; color: var(--ink-soft); line-height: 1.5; }
.hc-good { font-size: 12px; line-height: 1.5; margin-top: 2px; }
.hc-good i { font-style: normal; font-weight: 700; color: var(--matsu); }
.hc-good i.w { color: var(--shu); }
.hc-story { grid-column: 1 / -1; margin: 2px 0 0; font-size: 12.5px; line-height: 1.7; }
.hc-warn { color: var(--shu); font-weight: 700; }
.pk-h { margin: 16px 0 4px; font: 900 15px/1.4 var(--min); }
.pk-note { margin: 4px 0 0; font-size: 12px; color: var(--ink-soft); min-height: 1.6em; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 3px; border-radius: 12px; background: var(--paper-2); }
.seg button { min-height: 44px; padding: 4px 6px; border: 0; border-radius: 9px; background: transparent; font-weight: 700; font-size: 14px; cursor: pointer; line-height: 1.2; }
.seg button[aria-checked="true"] { background: var(--ai); color: #fff; }
.seg.small button { min-height: 40px; font-size: 13px; }

/* ---------- 地図 ---------- */
.bar { display: grid; grid-template-columns: 1.5fr 1fr 1fr 0.7fr; gap: 4px; align-items: stretch; }
.bar > div { background: var(--paper); border-radius: 10px; padding: 4px 8px; min-width: 0; }
.bar b { display: block; font-size: 16px; font-weight: 700; line-height: 1.35; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.b-date { display: flex; align-items: center; gap: 6px; }
.b-date b { font: 900 15px/1.3 var(--min); white-space: nowrap; }
.flag { flex: none; display: block; width: 26px; height: 26px; }
@media (max-width: 359px) { .bar { grid-template-columns: 1.35fr 1fr 1fr 0.55fr; } .b-date .flag { display: none; } .b-date b { font-size: 14px; } .bar b { font-size: 15px; } }
.flag svg { display: block; width: 100%; height: 100%; }
.hint-line { margin: 6px 0 0; padding: 6px 10px; border-radius: 10px; background: #fbf3df; border: 1px solid #e3cf9e; font-size: 13px; line-height: 1.55; min-height: 2.4em; }
.hint-line:empty { display: none; }
.mapbox { position: relative; margin-top: 6px; border-radius: 12px; overflow: hidden; background: #2a4c6e; box-shadow: 0 6px 18px rgba(43, 38, 32, 0.22); }
.mapsvg { display: block; width: 100%; height: auto; aspect-ratio: 780 / 1230; user-select: none; -webkit-user-select: none; touch-action: manipulation; }
.m-season { position: absolute; inset: 0; pointer-events: none; mix-blend-mode: soft-light; }
.m-season.s0 { background: rgba(255, 196, 214, 0.25); }
.m-season.s1 { background: rgba(120, 200, 120, 0.18); }
.m-season.s2 { background: rgba(230, 140, 60, 0.3); }
.m-season.s3 { background: rgba(225, 235, 255, 0.55); mix-blend-mode: screen; opacity: 0.45; }
.road { stroke: rgba(250, 240, 214, 0.75); stroke-width: 5; stroke-linecap: round; }
.road.sea { stroke: rgba(230, 244, 255, 0.85); stroke-dasharray: 2 13; stroke-width: 5; }
.road.closed { stroke: rgba(160, 40, 30, 0.6); }
.pv-name { font: 900 34px var(--min); fill: rgba(43, 38, 32, 0.62); stroke: rgba(250, 244, 228, 0.7); stroke-width: 6; paint-order: stroke; letter-spacing: 6px; pointer-events: none; }
.cs { cursor: pointer; }
.cs .hit { fill: transparent; }
.cs .base { stroke: #f7f1e3; stroke-width: 5; }
.cs .ico { fill: #fffaf0; }
.cs .nm { font: 700 29px var(--font); fill: #2b2620; stroke: rgba(250, 244, 228, 0.92); stroke-width: 9; paint-order: stroke; text-anchor: middle; pointer-events: none; }
.cs.mine .nm { fill: var(--ai-dark); }
.cs .todo { fill: rgba(255, 236, 150, 0.35); stroke: #ffd84a; stroke-width: 7; animation: todo 1.6s ease-in-out infinite; }
@keyframes todo { 50% { opacity: 0.45; } }
@media (prefers-reduced-motion: reduce) { .cs .todo { animation: none; } }
.cs .selr { fill: none; stroke: var(--shu); stroke-width: 7; }
.cs .chk { fill: var(--matsu); stroke: #fffaf0; stroke-width: 3; }
.cs .hp { fill: rgba(43, 38, 32, 0.78); }
.march { stroke: var(--shu); stroke-width: 7; stroke-dasharray: 16 9; fill: none; marker-end: url(#arrow); }
.m-foot { position: sticky; bottom: 0; z-index: 5; margin-top: 6px; padding: 6px 0 calc(6px + env(safe-area-inset-bottom)); }
.m-foot .btn.primary { margin: 0; font-size: 17px; font-family: var(--min); font-weight: 900; letter-spacing: 0.1em; }
.m-tools { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-top: 6px; }
.m-tools .btn { min-height: 40px; }
.m-tools .btn { font-size: 13px; padding: 4px 2px; line-height: 1.25; white-space: nowrap; }

/* ---------- 城の札 ---------- */
.sheet { position: fixed; left: 50%; bottom: 0; transform: translateX(-50%); z-index: 30; width: 100%; max-width: 560px; max-height: 76vh; max-height: 76dvh; display: flex; flex-direction: column; background: var(--paper); border-radius: 18px 18px 0 0; box-shadow: 0 -8px 30px rgba(43, 38, 32, 0.3); border-top: 4px solid var(--ai); }
.sh-head { display: flex; align-items: center; gap: 4px; padding: 4px 6px 0 12px; }
.sh-head b { flex: 1; font: 900 18px/1.3 var(--min); min-width: 0; }
.sh-head small { font: 500 11px var(--font); color: var(--ink-soft); margin-left: 6px; }
.sh-body { overflow-y: auto; padding: 0 12px 12px; overscroll-behavior: contain; }
.sh-foot { padding: 8px 12px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--paper); }
.sh-foot .btn { margin: 0; }
.sh-foot .pv { margin: 0 0 6px; font-size: 13px; line-height: 1.5; }
.owner { display: flex; align-items: center; gap: 6px; margin: 2px 0 6px; font-size: 13px; color: var(--ink-soft); }
.owner .flag { width: 22px; height: 22px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.st { padding: 3px 6px 5px; border-radius: 8px; background: var(--paper-2); min-width: 0; }
.st b { display: block; font-size: 15px; line-height: 1.3; font-variant-numeric: tabular-nums; white-space: nowrap; }
.st b small { font-size: 10px; color: var(--ink-soft); font-weight: 500; }
.gauge { height: 4px; margin-top: 2px; border-radius: 99px; background: #d9ccb0; overflow: hidden; }
.gauge i { display: block; height: 100%; background: var(--ai); }
.gauge i.lo { background: var(--shu); }
.sec-h { margin: 12px 0 4px; font: 900 14px/1.4 var(--min); display: flex; align-items: baseline; gap: 6px; }
.sec-h small { font: 500 11px var(--font); color: var(--ink-soft); }
.faces { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 6px; }
.fc { flex: none; width: 72px; text-align: center; font-size: 11px; white-space: nowrap; letter-spacing: -0.03em; line-height: 1.3; padding: 0; border: 0; background: none; cursor: pointer; }
.fc img, .face { display: block; width: 56px; height: 56px; margin: 0 auto 2px; border-radius: 50%; object-fit: cover; background: var(--paper-2); border: 2px solid #fffaf0; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25); }
.fc.busy img { filter: grayscale(0.85); opacity: 0.6; }
.fc .tag { display: inline-block; padding: 0 4px; border-radius: 4px; background: var(--kin); color: #fff; font-size: 9px; }
.done-box { margin-top: 8px; padding: 8px 10px; border-radius: 10px; background: #e8f0e4; border: 1px solid #b6cfab; font-size: 13px; line-height: 1.55; }
.done-box b { color: var(--matsu); }
.cats { margin-top: 10px; }
.cmds { display: grid; gap: 5px; margin-top: 6px; }
.cmd { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px; width: 100%; min-height: 52px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 10px; background: #fffaf0; text-align: left; cursor: pointer; }
.cmd b { font: 900 16px/1.3 var(--min); }
.cmd small { display: block; font-size: 11.5px; color: var(--ink-soft); line-height: 1.45; }
.cmd .cost { font-size: 12px; font-weight: 700; color: var(--kin); white-space: nowrap; }
.cmd:disabled { opacity: 0.55; cursor: default; background: transparent; }
.cmd:disabled .why { color: var(--shu); }
.note { margin: 8px 0 0; font-size: 12.5px; color: var(--ink-soft); line-height: 1.6; }
.picks { display: grid; gap: 5px; }
.gcard { display: grid; grid-template-columns: 52px 1fr auto; align-items: center; gap: 8px; width: 100%; padding: 6px 8px; border: 2px solid var(--line); border-radius: 12px; background: #fffaf0; text-align: left; cursor: pointer; }
.gcard img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; display: block; background: var(--paper-2); }
.gcard[aria-checked="true"] { border-color: var(--shu); background: #fff3e6; }
.gcard:disabled { opacity: 0.5; cursor: default; }
.gcard .gn { font-weight: 700; font-size: 14px; line-height: 1.35; }
.gcard .gs { font-size: 11px; color: var(--ink-soft); line-height: 1.4; }
.gcard .gs em { font-style: normal; font-weight: 700; color: var(--ink); }
.gcard .ge { text-align: right; font-size: 12px; font-weight: 700; color: var(--matsu); line-height: 1.35; white-space: nowrap; }
.gcard .ge big { display: block; font-size: 20px; color: var(--ink); font-weight: 700; }
.gcard .ge.n { color: var(--ink-soft); }
.tcard { display: grid; grid-template-columns: 30px 1fr auto; align-items: center; gap: 8px; width: 100%; min-height: 54px; padding: 6px 10px; border: 2px solid var(--line); border-radius: 12px; background: #fffaf0; text-align: left; cursor: pointer; }
.tcard[aria-checked="true"] { border-color: var(--shu); background: #fff3e6; }
.tcard:disabled { opacity: 0.5; cursor: default; }
.tcard .flag { width: 28px; height: 28px; }
.tcard b { font: 900 15px/1.3 var(--min); }
.tcard small { display: block; font-size: 11.5px; color: var(--ink-soft); line-height: 1.4; }
.odds { font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: 99px; white-space: nowrap; color: #fff; }
.odds.o0 { background: #7d7466; } .odds.o1 { background: var(--kin); } .odds.o2 { background: var(--matsu); } .odds.o3 { background: var(--ai); }

/* ---------- 重ねて出す画面 ---------- */
.ov { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 12px; background: rgba(30, 26, 20, 0.62); }
.pane { width: 100%; max-width: 520px; max-height: 92vh; max-height: 92dvh; display: flex; flex-direction: column; background: var(--paper); border-radius: 16px; padding: 6px 12px 12px; }
.pane-head { display: flex; align-items: center; justify-content: space-between; }
.pane-head h2 { margin: 0; font: 900 19px/1.4 var(--min); }
.gl-list { overflow-y: auto; margin-top: 8px; display: grid; gap: 5px; overscroll-behavior: contain; }
.grow { display: grid; grid-template-columns: 48px 1fr; gap: 8px; align-items: center; width: 100%; padding: 6px 8px; border: 1px solid var(--line); border-radius: 10px; background: #fffaf0; text-align: left; cursor: pointer; }
.grow img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; display: block; background: var(--paper-2); }
.grow .gn { font-weight: 700; font-size: 14px; line-height: 1.35; }
.grow .gn small { font-weight: 500; font-size: 11px; color: var(--ink-soft); margin-left: 4px; }
.grow .ab { display: grid; grid-template-columns: repeat(6, 1fr); gap: 2px; margin-top: 2px; font-size: 11px; text-align: center; font-variant-numeric: tabular-nums; }
.grow .ab span { background: var(--paper-2); border-radius: 4px; line-height: 1.5; }
.grow .ab span.hi { background: #e6d6a8; font-weight: 700; }
.grow .ab span.lo { color: var(--shu); font-weight: 700; }
.grow .sk { font-size: 11px; color: var(--ink-soft); line-height: 1.4; }
.help { overflow-y: auto; font-size: 14px; line-height: 1.75; }
.help h3 { margin: 12px 0 2px; font: 900 15px/1.4 var(--min); }
.help p { margin: 0; }
.dlg-in { width: 100%; max-width: 400px; max-height: 92vh; max-height: 92dvh; overflow-y: auto; background: var(--paper); border-radius: 16px; padding: 18px 16px 14px; }
.dlg-in h2 { margin: 0 0 8px; font: 900 21px/1.4 var(--min); text-align: center; }
.dlg-in p { margin: 0 0 8px; font-size: 14px; line-height: 1.7; }
.ask-btns .btn { margin-top: 8px; }
.end { text-align: center; }
.end .face { width: 96px; height: 96px; margin: 0 auto 8px; }
.end-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin: 8px 0; text-align: center; }
.end-stats div { background: var(--paper-2); border-radius: 8px; padding: 4px; font-size: 12px; }
.end-stats b { display: block; font-size: 18px; }
.end #mg-share { margin-top: 10px; }

/* 報告 */
.rp { width: 100%; max-width: 440px; }
.rp-top { display: flex; justify-content: space-between; align-items: baseline; color: #fbf6ea; padding: 0 4px 6px; }
.rp-top b { font: 900 18px/1.3 var(--min); }
.rp-top span { font-size: 13px; }
.rp-card { background: var(--paper); border-radius: 14px; padding: 14px 14px 12px; max-height: 64vh; max-height: 64dvh; overflow-y: auto; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35); animation: rpin 0.22s ease-out; }
@keyframes rpin { from { transform: translateY(8px); opacity: 0.4; } }
@media (prefers-reduced-motion: reduce) { .rp-card { animation: none; } }
.rp-card .rp-face { display: flex; align-items: center; gap: 10px; }
.rp-card .rp-face img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; flex: none; background: var(--paper-2); border: 2px solid #fffaf0; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3); }
.rp-card .rp-ico { flex: none; width: 64px; height: 64px; display: grid; place-items: center; border-radius: 50%; background: var(--paper-2); }
.rp-card .rp-ico svg { width: 38px; height: 38px; }
.rp-card h3 { margin: 0; font: 900 18px/1.4 var(--min); }
.rp-card h3 small { display: block; font: 500 12px/1.4 var(--font); color: var(--ink-soft); }
.rp-card p { margin: 8px 0 0; font-size: 14px; line-height: 1.7; }
.rp-card .res { display: inline-block; margin-top: 4px; padding: 1px 10px; border-radius: 99px; color: #fff; font-weight: 700; font-size: 13px; }
.res.good { background: var(--matsu); } .res.bad { background: var(--shu); } .res.mid { background: #7d7466; }
.rounds { margin-top: 8px; display: grid; gap: 3px; }
.rd { display: grid; grid-template-columns: 34px 1fr; gap: 6px; align-items: center; font-size: 11px; color: var(--ink-soft); }
.rd .bars { display: grid; gap: 2px; }
.rd .bars i { display: block; height: 7px; border-radius: 99px; min-width: 2px; }
.rd .bars i.a { background: var(--c-a, var(--ai)); }
.rd .bars i.d { background: var(--c-d, #8a877c); }
.rd em { font-style: normal; color: var(--shu); font-weight: 700; }
.sides { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 8px; font-size: 12px; line-height: 1.5; }
.sides > div { background: var(--paper-2); border-radius: 8px; padding: 4px 8px; }
.sides b { font-size: 15px; }
.list-ev { display: grid; gap: 6px; }
.list-ev > div { padding: 6px 8px; border-radius: 8px; background: var(--paper-2); font-size: 13px; line-height: 1.55; }
.list-ev b { font-family: var(--min); }
.rp-btns { display: grid; grid-template-columns: 1fr; gap: 0; }
.rp-btns .btn.ghost { color: #fbf6ea; border-color: rgba(251, 246, 234, 0.5); }

.toast { position: fixed; left: 50%; top: calc(10px + env(safe-area-inset-top)); transform: translateX(-50%); z-index: 70; width: max-content; max-width: calc(100% - 32px); padding: 10px 18px; border-radius: 12px; background: rgba(43, 38, 32, 0.94); color: #fbf6ea; font-weight: 700; font-size: 14px; line-height: 1.5; text-align: center; pointer-events: none; box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25); }

.mg { margin-top: 14px; display: grid; gap: 10px; }
.mg .mg-box { background: var(--paper); border-color: transparent; }
.guide { margin-top: 28px; background: var(--paper); border-radius: 16px; padding: 22px 20px 12px; font-size: 15px; line-height: 1.85; }
.guide p { margin: 0 0 1em; }
.guide h2 { font: 900 19px/1.4 var(--min); margin: 32px 0 12px; padding-left: 10px; border-left: 5px solid var(--shu); }
.guide h2:first-child { margin-top: 0; }
.guide h3 { font-size: 16px; margin: 22px 0 6px; line-height: 1.5; }
.guide .steps { list-style: none; padding: 0; margin: 0 0 1em; }
.guide .steps li { display: flex; align-items: baseline; gap: 6px; margin: 6px 0; }
.guide .steps .num { flex: none; font-weight: 700; color: var(--shu); }
.guide details { border-top: 1px solid var(--line); padding: 12px 0; }
.guide details p { margin: 8px 0 4px; }
.guide summary { font-weight: 700; cursor: pointer; }
.g-foot { max-width: 560px; margin: 0 auto; padding: 14px 16px 28px; font-size: 12px; text-align: center; }
.g-foot a { color: var(--ink-soft); }

@media (min-width: 900px) {
  main { max-width: 980px; }
  .g-head, .g-foot { max-width: 980px; }
  .scr.map { display: grid; grid-template-columns: minmax(0, 1fr) 380px; grid-template-areas: "bar side" "hint side" "map side" "foot side" "tools side"; column-gap: 14px; align-items: start; }
  .scr.map .bar { grid-area: bar; } .scr.map .hint-line { grid-area: hint; } .scr.map .mapbox { grid-area: map; } .scr.map .m-foot { grid-area: foot; position: static; } .scr.map .m-tools { grid-area: tools; }
  .sheet.side { position: absolute; left: auto; right: 0; top: 0; bottom: auto; transform: none; width: 380px; max-height: none; border-radius: 16px; border-top: 4px solid var(--ai); box-shadow: 0 6px 18px rgba(43, 38, 32, 0.22); }
  .title, .pick { max-width: 560px; margin: 0 auto; }
}

/* ---------- 段階3: 命令の数・報告の絵・天下統一の絵 ---------- */
.cs .chk.part { fill: var(--kin); }
.cs .chkn { font: 900 19px var(--font); fill: #fffaf0; text-anchor: middle; pointer-events: none; }
.done-box .lbl { margin-bottom: 2px; }
.done-box > div + div { margin-top: 3px; padding-top: 3px; border-top: 1px dashed #b6cfab; }
.rp-card .rp-img { display: block; width: calc(100% + 28px); max-width: none; height: auto; aspect-ratio: 3 / 2; margin: -14px -14px 10px; object-fit: cover; border-radius: 14px 14px 0 0; background: var(--paper-2); }
.rp-card .rp-season { margin: 0; font: 900 20px/1.4 var(--min); }
.end .end-art { display: block; width: 100%; max-width: 250px; height: auto; aspect-ratio: 2 / 3; margin: 0 auto 10px; border-radius: 12px; object-fit: cover; background: var(--paper-2); box-shadow: 0 6px 16px rgba(43, 38, 32, 0.25); }
.ab-sides { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 8px 0; }
.ab-side { background: var(--paper-2); border-radius: 10px; padding: 6px 8px; font-size: 13px; line-height: 1.5; min-width: 0; }
.ab-side b { font-family: var(--min); }
.ab-faces { display: flex; flex-wrap: wrap; gap: 2px; margin: 2px 0 4px; min-height: 36px; align-items: center; }
.ab-faces img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; border: 2px solid #fffaf0; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25); }
.ab-w { font-size: 13px !important; text-align: center; line-height: 1.7; }

/* ---------- マスの合戦 ---------- */
.ov.bt-ov { place-items: start center; padding: 0; overflow-y: auto; overscroll-behavior: contain; background: #1f1b16; }
.bt { width: 100%; max-width: 520px; min-height: 100%; background: var(--paper); padding: 0 8px calc(12px + env(safe-area-inset-bottom)); }
.bt-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: calc(8px + env(safe-area-inset-top)) 4px 4px; }
.bt-top b { display: block; font: 900 18px/1.3 var(--min); }
.bt-top small { display: block; font-size: 11.5px; color: var(--ink-soft); line-height: 1.4; }
.bt-turn { flex: none; font-size: 12px; color: var(--ink-soft); white-space: nowrap; }
.bt-turn small { display: inline; }
.bt-turn b { display: inline; font: 900 22px/1 var(--min); color: var(--shu); margin-right: 1px; }
.bt-info { display: grid; grid-template-columns: auto 1fr; gap: 8px; align-items: center; margin-bottom: 6px; }
.bt-w { display: grid; justify-items: center; max-width: 92px; text-align: center; }
.bt-w small { font-size: 10px; line-height: 1.3; color: var(--ink-soft); }
.wx { display: inline-block; min-width: 40px; padding: 1px 8px; border-radius: 99px; font: 900 15px/1.5 var(--min); color: #fff; }
.wx.w-hare { background: #c98a2c; } .wx.w-ame { background: #3f6487; } .wx.w-kiri { background: #7d7891; } .wx.w-yuki { background: #8aa1b5; }
.bt-bars { display: grid; gap: 2px; min-width: 0; }
.bb { position: relative; height: 20px; border-radius: 6px; background: #ddd0b4; overflow: hidden; }
.bb i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--c, var(--ai)); opacity: 0.85; transition: width 0.3s; }
.bb span { position: relative; z-index: 1; display: block; padding: 0 6px; font-size: 11.5px; font-weight: 700; line-height: 20px; color: #fff; text-shadow: 0 0 3px rgba(0, 0, 0, 0.7); white-space: nowrap; }
.bb.gate i { background: #6b5640; }
.bt-field { position: relative; width: min(100%, max(276px, calc((100vh - 330px) * 0.75))); width: min(100%, max(276px, calc((100dvh - 330px) * 0.75))); margin: 0 auto; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); grid-template-rows: repeat(8, auto); border-radius: 10px; overflow: hidden; box-shadow: 0 4px 12px rgba(43, 38, 32, 0.28); user-select: none; -webkit-user-select: none; touch-action: manipulation; background: #6f8a52; }
.bc { position: relative; aspect-ratio: 1; padding: 0; border: 0; border-right: 1px solid rgba(43, 38, 32, 0.12); border-bottom: 1px solid rgba(43, 38, 32, 0.12); background: center / cover no-repeat #8aa565; cursor: pointer; font: inherit; }
.bc.t-p { background-image: url(../img/s/tile-plain.webp); }
.bc.t-r { background-image: url(../img/s/tile-river.webp); }
.bc.t-f { background-image: url(../img/s/tile-forest.webp); }
.bc.t-h { background-image: url(../img/s/tile-hill.webp); }
.bc.t-g { background-image: url(../img/s/tile-gate.webp); }
.bc-hl { position: absolute; inset: 2px; border-radius: 7px; pointer-events: none; }
.bc-gate { position: absolute; left: 50%; bottom: 3px; transform: translateX(-50%); padding: 0 4px; border-radius: 4px; background: rgba(43, 38, 32, 0.72); color: #fbf6ea; font-size: 9.5px; font-weight: 700; line-height: 1.5; white-space: nowrap; pointer-events: none; }
.bc.rc .bc-hl { background: rgba(70, 130, 220, 0.32); box-shadow: inset 0 0 0 2px rgba(110, 170, 255, 0.95); }
.bc.dst .bc-hl { background: rgba(70, 130, 220, 0.5); box-shadow: inset 0 0 0 3px #fff; }
.bc.tg .bc-hl { background: rgba(214, 60, 40, 0.22); box-shadow: inset 0 0 0 3px #e2442e; animation: tgp 1.1s ease-in-out infinite; }
.bc.tgon .bc-hl { background: rgba(214, 60, 40, 0.45); box-shadow: inset 0 0 0 4px #fff, inset 0 0 0 7px #e2442e; animation: none; }
@keyframes tgp { 50% { background: rgba(214, 60, 40, 0.08); } }
.bt-units { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.tk { position: absolute; width: calc(100% / 6); height: calc(100% / 8); display: grid; place-items: center; transition: left 0.24s ease, top 0.24s ease, opacity 0.5s, transform 0.5s; }
.tk-f { display: block; width: 74%; aspect-ratio: 1; border-radius: 50%; overflow: hidden; background: #6d6355; }
.tk-f img, .tk-f svg { display: block; width: 100%; height: 100%; object-fit: cover; }
.tk.me .tk-f { box-shadow: 0 0 0 2px #fffaf0, 0 0 0 4.5px var(--c), 0 2px 6px rgba(0, 0, 0, 0.45); }
.tk.foe .tk-f { box-shadow: 0 0 0 2px #2b2620, 0 0 0 4.5px var(--c), 0 2px 6px rgba(0, 0, 0, 0.45); }
.tk.done .tk-f { filter: grayscale(0.7) brightness(0.82); }
.tk.sel .tk-f { box-shadow: 0 0 0 2px #fffaf0, 0 0 0 5px #ffd84a, 0 0 14px 4px rgba(255, 216, 74, 0.8); }
.tk.look .tk-f { box-shadow: 0 0 0 2px #fffaf0, 0 0 0 5px #e2442e; }
.tk.flash .tk-f { animation: tkf 0.45s ease-out; }
@keyframes tkf { 30% { transform: scale(1.14); } }
.tk.gone { opacity: 0; transform: scale(0.5) rotate(-12deg); }
.tk-ld { position: absolute; left: 3%; top: 3%; width: 19px; height: 19px; border-radius: 50%; background: var(--kin); color: #fff; font: 900 11px/19px var(--min); text-align: center; box-shadow: 0 0 0 1.5px #fffaf0; }
.tk-st { position: absolute; right: 3%; top: 3%; width: 19px; height: 19px; border-radius: 50%; color: #fff; font: 900 11px/19px var(--min); text-align: center; box-shadow: 0 0 0 1.5px #fffaf0; }
.tk-st.kon { background: #7a4a9c; } .tk-st.grd { background: var(--ai); } .tk-st.bst { background: var(--shu); }
.tk-hp { position: absolute; left: 16%; right: 16%; bottom: 3%; height: 4px; border-radius: 99px; background: rgba(43, 38, 32, 0.6); overflow: hidden; }
.tk-hp i { display: block; height: 100%; background: #9fd47a; }
.tk.foe .tk-hp i { background: #f08a6c; }
.tk-n { position: absolute; left: 50%; bottom: 7%; transform: translateX(-50%); padding: 0 4px; border-radius: 6px; background: rgba(43, 38, 32, 0.82); color: #fffaf0; font-size: 10.5px; font-weight: 700; line-height: 1.45; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bfx { position: absolute; z-index: 4; transform: translate(-50%, 0); font: 900 15px/1 var(--font); color: #fff; white-space: nowrap; pointer-events: none; text-shadow: 0 0 3px #000, 0 1px 2px #000; animation: rise 1.05s ease-out forwards; }
.bfx.dmg { color: #ffd2c4; } .bfx.ctr { color: #ffe9a8; font-size: 13px; } .bfx.fire { color: #ffb15c; } .bfx.gate { color: #f5deb0; } .bfx.kei { color: #e6c8ff; } .bfx.miss { color: #ddd; font-size: 12px; } .bfx.grd { color: #bcd7ff; font-size: 12px; } .bfx.out { color: #ff8f7a; font-size: 14px; }
@keyframes rise { from { opacity: 0; margin-top: 8px; } 15% { opacity: 1; } to { opacity: 0; margin-top: -26px; } }
@media (prefers-reduced-motion: reduce) { .tk { transition: none; } .bfx { animation-duration: 1.4s; } .bc.tg .bc-hl { animation: none; } .tk.flash .tk-f { animation: none; } }
.bt-panel { position: sticky; bottom: 0; z-index: 5; margin: 8px -8px 0; padding: 6px 8px calc(8px + env(safe-area-inset-bottom)); min-height: 132px; background: var(--paper); border-top: 1px solid var(--line); box-shadow: 0 -6px 14px rgba(43, 38, 32, 0.12); }
.bp-msg { margin: 6px 0 0; font-size: 13.5px; line-height: 1.55; }
.bp-pv { margin: 6px 0 0; padding: 6px 8px; border-radius: 8px; background: #fff3e0; border: 1px solid #ecd3a6; font-size: 13px; line-height: 1.55; }
.bp-row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; margin-top: 8px; }
.bp-row .btn.small { min-height: 46px; line-height: 1.2; white-space: normal; padding: 4px 6px; }
.bp-row .btn.arm { background: var(--shu); color: #fff; border-color: var(--shu); }
.bp-cmds { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; margin-top: 6px; }
@media (max-width: 380px) { .bp-cmds { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.bcmd { display: grid; align-content: center; justify-items: center; min-height: 50px; padding: 3px 2px; border: 1.5px solid var(--line); border-radius: 10px; background: #fffaf0; cursor: pointer; text-align: center; line-height: 1.25; }
.bcmd b { font: 900 14px/1.25 var(--min); }
.bcmd small { display: block; font-size: 9.5px; color: var(--shu); line-height: 1.3; }
.bcmd .k { color: var(--ink-soft); font-size: 9.5px; }
.bcmd.grd { border-color: #b7c6dd; }
.bcmd:disabled { opacity: 0.55; cursor: default; background: transparent; }
.bu { display: grid; grid-template-columns: 44px 1fr; gap: 8px; align-items: center; }
.bu img, .bu-x { display: block; width: 44px; height: 44px; border-radius: 50%; object-fit: cover; background: #6d6355; }
.bu b { font: 900 15px/1.3 var(--min); }
.bu small { margin-left: 6px; font-size: 11px; color: var(--ink-soft); }
.bu-ab { font-size: 12px; line-height: 1.45; color: var(--ink-soft); }
.bu-ab b { font: 700 13px var(--font); color: var(--ink); margin: 0 3px 0 1px; }
.bp-end { margin-top: 6px; padding: 8px 10px; border-radius: 10px; text-align: center; color: #fff; }
.bp-end.good { background: var(--matsu); } .bp-end.bad { background: var(--shu); }
.bp-end b { display: block; font: 900 20px/1.4 var(--min); }
.bp-end small { display: block; font-size: 12.5px; line-height: 1.5; }
.bt-duel { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; background: rgba(20, 16, 12, 0.72); cursor: pointer; }
.dl-in { width: 100%; max-width: 380px; padding: 14px 12px 10px; border-radius: 16px; background: var(--paper); text-align: center; box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45); }
.dl-h { margin: 0 0 6px; font: 900 22px/1.3 var(--min); letter-spacing: 0.3em; color: var(--shu); }
.dl-row { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 6px; align-items: center; }
.dl-s { display: grid; justify-items: center; gap: 2px; min-width: 0; }
.dl-s img { width: 76px; height: 76px; border-radius: 50%; object-fit: cover; border: 3px solid #fffaf0; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35); }
.dl-s b { font: 900 14px/1.3 var(--min); }
.dl-s small { font-size: 11px; color: var(--ink-soft); }
.dl-hp { display: block; width: 90%; height: 7px; border-radius: 99px; background: #d9ccb0; overflow: hidden; }
.dl-hp i { display: block; height: 100%; background: var(--shu); transition: width 0.3s; }
.dl-s.hit img { animation: dlh 0.4s ease-out; }
@keyframes dlh { 20% { transform: translateX(-6px) rotate(-4deg); filter: brightness(1.6); } 50% { transform: translateX(5px); } }
.dl-s.win img { box-shadow: 0 0 0 3px var(--kin), 0 0 18px 6px rgba(167, 131, 47, 0.7); }
.dl-vs { font: 900 20px var(--min); color: var(--ink-soft); }
.dl-msg { margin: 10px 0 2px; min-height: 3em; font-size: 14px; line-height: 1.55; font-weight: 700; }
.dl-skip { margin: 0; font-size: 11px; color: var(--ink-soft); }
@media (prefers-reduced-motion: reduce) { .dl-s.hit img { animation: none; } }
@media (min-width: 900px) { .ov.bt-ov { padding: 16px 0; } .bt { border-radius: 16px; min-height: 0; } }
/* ---- 段階4: 人と外交 ---- */
.m-tools { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 360px) { .m-tools .btn { font-size: 12px; letter-spacing: -0.04em; } }
.march.siege { stroke: #6b4a2a; stroke-dasharray: 4 7; stroke-width: 9; }
.march.siege.foe { stroke: #3a3836; }
.note.warn { color: var(--shu); font-weight: 700; }
.siege-box { background: #f3ead6; border-color: #d8c49a; }
.siege-box .btn { width: 100%; }
.bp-man { display: block; font-size: 11.5px; color: var(--ink-soft); }
.dip-body { overflow-y: auto; overscroll-behavior: contain; }
.dip-list { display: grid; gap: 6px; }
.dip-h { display: grid; grid-template-columns: 30px 1fr auto; gap: 8px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; background: #fffaf0; }
.dip-h .flag { width: 28px; height: 28px; }
.dip-h b { font: 900 15px/1.3 var(--min); }
.dip-m { min-width: 0; }
.dip-m small { display: block; font-size: 11.5px; color: var(--ink-soft); line-height: 1.45; }
.dip-h .btn.small { width: auto; min-height: 40px; padding: 4px 10px; }
.dip-h .btn.arm, .siege-box .btn.arm { background: var(--shu); color: #fff; border-color: var(--shu); }
.relbar { position: relative; height: 8px; margin: 4px 0 2px; border-radius: 4px; background: var(--paper-2); overflow: hidden; }
.relbar::after { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: var(--ink-soft); opacity: 0.5; }
.relbar i { position: absolute; top: 0; bottom: 0; }
.relbar i.pos { background: var(--matsu); }
.relbar i.neg { background: var(--shu); }
.dip-offer { margin-top: 6px; padding: 10px; border: 2px solid var(--kin); border-radius: 12px; background: #fff7e6; font-size: 13.5px; line-height: 1.6; }
.dip-offer p { margin: 6px 0 0; }
.dip-offer .face { margin: 0; flex: none; }
.bonds { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 4px; }
.bond { flex: none; width: 76px; text-align: center; font-size: 11px; line-height: 1.3; }
.bond img { display: block; width: 44px; height: 44px; margin: 0 auto 2px; border-radius: 50%; object-fit: cover; background: var(--paper-2); }
.bond b { display: block; font-size: 11px; white-space: nowrap; letter-spacing: -0.04em; }
.bond small { display: block; color: var(--ink-soft); font-size: 10px; }
.gcard > img:last-child:not(:first-child) { width: 40px; height: 40px; }
.dlg-in .rp-img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 10px; background: var(--paper-2); }
.nw { white-space: nowrap; }

/* ---- 段階5: 名物・図鑑・記録帳・便り ---- */
.t-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.t-2 .btn { margin-top: 8px; }
.m-tools { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.it-hero { display: block; width: 100%; height: auto; aspect-ratio: 3 / 1.3; object-fit: cover; border-radius: 10px; margin: 4px 0 2px; background: var(--paper-2); }
.it-list { display: grid; gap: 6px; }
.it-card, .it-shop { padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: #fffaf0; }
.it-shop { border: 2px solid var(--kin); margin-top: 8px; }
.it-shop > .lbl { display: inline-block; font-size: 11px; font-weight: 700; color: var(--kin); margin-bottom: 4px; }
.it-shop > .note { display: block; margin-top: 4px; }
.it-row { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 10px; align-items: center; }
.it-row b { font: 900 15px/1.35 var(--min); display: block; }
.it-row small { display: block; font-size: 11.5px; color: var(--ink-soft); line-height: 1.5; }
.it-img { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; display: block; background: var(--paper-2); }
.it-card.unk { background: var(--paper-2); border-style: dashed; }
.zk-q { display: grid; place-items: center; width: 52px; height: 52px; margin: 0 auto 2px; border-radius: 50%; background: #e2d7bf; color: #8a7f6a; font: 900 22px/1 var(--min); }
.it-row .zk-q { border-radius: 10px; width: 56px; height: 56px; }
.zk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 6px; margin-top: 8px; }
.zk-c { display: block; padding: 6px 2px; border: 1px solid var(--line); border-radius: 10px; background: #fffaf0; text-align: center; cursor: pointer; min-width: 0; font: inherit; color: inherit; }
.zk-c img { display: block; width: 52px; height: 52px; margin: 0 auto 2px; border-radius: 50%; object-fit: cover; background: var(--paper-2); }
.zk-c b { display: block; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: -0.03em; }
.zk-c small { display: block; font-size: 9.5px; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.zk-c.unk { background: var(--paper-2); border-style: dashed; cursor: default; }
#zk-tabs { margin-top: 6px; }
.bk-best { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 4px; }
.bk-best > div { display: grid; grid-template-columns: 22px minmax(0, 1fr); column-gap: 4px; align-items: center; padding: 4px 6px; border-radius: 8px; background: var(--paper-2); font-size: 12px; }
.bk-best .flag { width: 22px; height: 22px; grid-row: span 2; }
.bk-best b { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bk-best small { font-size: 11px; color: var(--ink-soft); white-space: nowrap; }
.bk-list { display: grid; gap: 6px; }
.bk-r { border: 1px solid var(--line); border-radius: 10px; background: #fffaf0; }
.bk-r summary { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 8px; align-items: center; padding: 8px; cursor: pointer; list-style: none; font-size: 14px; }
.bk-r summary::-webkit-details-marker { display: none; }
.bk-r summary .flag { width: 28px; height: 28px; }
.bk-r summary small { display: block; font-size: 11.5px; color: var(--ink-soft); }
.bk-r .res-win { color: var(--matsu); font-weight: 700; }
.bk-r .res-lose { color: var(--shu); font-weight: 700; }
.bk-in { padding: 0 8px 8px; font-size: 12.5px; line-height: 1.6; }
.bk-in p { margin: 0 0 6px; }
.list-ev.hist > div { display: grid; grid-template-columns: 5.4em minmax(0, 1fr); gap: 4px; font-size: 12.5px; padding: 4px 8px; }
.list-ev.hist .when { color: var(--ink-soft); font-size: 11.5px; }
.end-note { font-family: var(--min); font-size: 14px; line-height: 1.8; text-align: left; }
.end .list-ev.hist { text-align: left; }
.tayori-d { margin: 8px 0 2px !important; font: 900 16px/1.4 var(--min); color: var(--shu); }
.grow .ab span.up { color: var(--matsu); font-weight: 700; }
.rp-card .rp-img.rp-it { width: 100%; aspect-ratio: 1 / 1; max-width: 220px; margin: 0 auto 10px; border-radius: 12px; }
/* はじめての人への案内（段階6） */
.tut { margin: 6px 0 0; padding: 6px 6px 8px 10px; border-radius: 12px; background: #2b3a55; color: #fffaf0; box-shadow: 0 3px 10px rgba(43, 38, 32, 0.25); }
.tut-top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.tut-top b { flex: 1; min-width: 0; font: 900 15px/1.3 var(--min); letter-spacing: 0.05em; }
.tut-n { flex: none; padding: 1px 7px; border-radius: 99px; background: #ffd84a; color: #2b2620; font-size: 11px; font-weight: 700; white-space: nowrap; }
.tut .ico-btn { width: 36px; height: 36px; color: #fffaf0; }
.tut-t { margin: 2px 4px 6px 0; font-size: 13px; line-height: 1.6; }
.tut-off { padding: 4px 8px; border: 1px solid rgba(255, 250, 240, 0.5); border-radius: 8px; background: transparent; color: #fffaf0; font: inherit; font-size: 12px; cursor: pointer; }
.tut-in { margin: 0 0 10px; padding: 8px 10px; border-radius: 10px; background: #eef2fa; border-left: 4px solid #2b3a55; font-size: 13px; line-height: 1.6; }
.tut-in b { display: inline-block; margin-right: 6px; padding: 0 6px; border-radius: 6px; background: #2b3a55; color: #fffaf0; font-size: 11px; }
.btn.tut-pulse { animation: tutp 1.4s ease-in-out infinite; }
@keyframes tutp { 50% { box-shadow: 0 0 0 4px rgba(255, 216, 74, 0.9), 0 3px 0 var(--shu-dark); } }
@media (prefers-reduced-motion: reduce) { .btn.tut-pulse { animation: none; box-shadow: 0 0 0 3px rgba(255, 216, 74, 0.9); } }
.help #b-tut { margin: 0 0 6px; }
/* ---- 段階6の使い勝手（2026-11-02）: 地図の上のボタンはスマホでは1段（よく使う4つと「ほか」）。便りがまだなら印 ---- */
#b-tools-more { display: none; }
@media (max-width: 899px) {
  .m-tools { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  #b-tools-more { display: block; }
  .m-tools:not(.open) .m-sub { display: none; }
}
.btn.has-new { position: relative; }
.btn.has-new::after { content: ""; position: absolute; top: 4px; right: 4px; width: 8px; height: 8px; border-radius: 50%; background: var(--shu); }
