/* スマホを基準に書き、広い画面は末尾の @media で調整する */
:root {
  color-scheme: light;
  --bg: #f4f4f2; --surface: #fcfcfb; --line: #dddcd6;
  --text: #0b0b0b; --text2: #52514e; --muted: #7a7972;
  --accent: #2a78d6; --accent-ink: #fff;
  --plus: #2a78d6; --minus: #e34948; --grid: #e6e5df;
  --hot: #eb6834;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #111110; --surface: #1a1a19; --line: #33332f;
    --text: #f0efec; --text2: #c3c2b7; --muted: #8f8e85;
    --accent: #3987e5; --accent-ink: #fff;
    --plus: #3987e5; --minus: #e66767; --grid: #2b2b28;
    --hot: #d95926;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.7 system-ui, -apple-system, "Hiragino Sans", "Noto Sans JP", Meiryo, sans-serif; }
[hidden] { display: none !important; }
canvas { max-width: 100%; }

/* ---- 枠組み ---- */
.wrap { max-width: 880px; margin: 0 auto; padding: 0 12px; }
.site-head { background: var(--surface); border-bottom: 1px solid var(--line); }
.head-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 52px; }
.head-row > div { display: flex; align-items: center; flex-wrap: wrap; gap: 2px 8px; min-width: 0; }
.brand { display: inline-flex; align-items: center; gap: 7px; font-weight: 700; font-size: 17px; letter-spacing: .02em; color: var(--text); text-decoration: none; white-space: nowrap; }
.brand-mark { flex: 0 0 auto; display: block; }
.tag { font-size: 11px; color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 1px 6px; white-space: nowrap; }
#accountBtn { flex: none; max-width: 50%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
h1 { font-size: 20px; line-height: 1.4; margin: 12px 0 6px; }
h2 { font-size: 16px; line-height: 1.5; margin: 0 0 8px; }
.lead { color: var(--text2); margin: 0 0 14px; font-size: 14px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin: 0 0 12px; }
.crumb { display: inline-block; margin-top: 12px; font-size: 13px; color: var(--accent); text-decoration: none; }

/* ---- サイトの特徴 ---- */
/* 箱で囲まず、番号と罫線だけで並べる(雑誌の箇条書きのような見せ方) */
.feats { list-style: none; margin: 0 0 22px; padding: 0; counter-reset: feat; border-top: 2px solid var(--text); }
.feats li { display: grid; grid-template-columns: 2.4em minmax(0, 1fr); column-gap: 10px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.feats li::before { counter-increment: feat; content: counter(feat, decimal-leading-zero); grid-row: 1 / span 3; font-size: 22px; font-weight: 700; line-height: 1.25; letter-spacing: -.02em; font-variant-numeric: tabular-nums; color: var(--muted); }
.feats li > * { grid-column: 2; }
.feats b { display: block; font-size: 16px; line-height: 1.5; }
.feats span { display: block; margin-top: 4px; font-size: 13px; line-height: 1.7; color: var(--text2); }
.feats a, .points a { color: var(--accent); font-weight: 600; }
.list-title { margin: 0 0 10px; }
.points { list-style: none; margin: 0 0 12px; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.points li { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; font-size: 11px; line-height: 1.5; color: var(--text2); }
.points b { display: block; font-size: 12px; color: var(--text); }

/* ---- 機種一覧 ---- */
.filters { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; margin-bottom: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips button { font: inherit; font-size: 14px; font-weight: 600; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; color: var(--text2); padding: 6px 14px; min-height: 40px; cursor: pointer; }
.chips button[aria-pressed=true] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.mlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.mlist a { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; color: var(--text); text-decoration: none; }
.mlist .name { font-size: 16px; font-weight: 700; line-height: 1.4; }
.mlist .meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 4px; font-size: 12px; color: var(--muted); }
.mlist .sum { margin-top: 4px; font-size: 13px; line-height: 1.5; color: var(--text2); }
.badge { font-size: 11px; font-weight: 700; border-radius: 4px; padding: 1px 6px; color: #fff; background: var(--accent); }
.badge.pachinko { background: var(--hot); }
.site-foot { margin: 24px 0 32px; font-size: 12px; color: var(--muted); }
.foot-nav { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-bottom: 8px; }
.foot-nav a { color: var(--text2); padding: 6px 0; }
.prose a { color: var(--accent); }

/* ---- 入力 ---- */
/* 2列に並べ、ラベルが折り返しても入力欄の下端がそろうようにする */
.conds { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 10px; align-items: end; }
label { display: flex; flex-direction: column; justify-content: flex-end; gap: 4px; min-width: 0; font-size: 12px; line-height: 1.4; color: var(--text2); }
select, input:not([type=checkbox]):not([type=file]) {
  width: 100%; min-width: 0; font: inherit; font-size: 16px; /* 16px未満だとiPhoneで入力時に画面が拡大される */
  color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; min-height: 44px;
}
/* 不備のある入力欄(赤枠と薄い赤の地色) */
select.invalid, input.invalid:not([type=checkbox]):not([type=file]) {
  border-color: var(--minus); border-width: 2px; padding: 7px 9px;
  background: color-mix(in srgb, var(--minus) 9%, var(--surface));
}
input::placeholder { color: var(--muted); font-size: 14px; }
input[type=file] { width: 100%; font: inherit; font-size: 14px; }
label.inline { flex-direction: row; align-items: center; justify-content: flex-start; gap: 6px; font-size: 13px; }
label.inline select, label.inline input:not([type=checkbox]) { width: auto; flex: 1 1 auto; }
.check input { width: 20px; height: 20px; flex: none; }
.btn { font: inherit; font-weight: 600; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--text); padding: 8px 16px; min-height: 44px; cursor: pointer; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.small { min-height: 36px; padding: 4px 12px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: default; }
.btn:focus-visible, select:focus-visible, input:focus-visible, [role=tab]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.controls { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 8px; }
.controls .btn.primary { flex: 1 1 100%; min-height: 48px; font-size: 16px; }
.controls label.inline { flex: 1 1 auto; }
progress { width: 100%; height: 8px; }
.err { color: var(--minus); font-size: 13px; font-weight: 600; margin: 0; min-height: 1em; }
.err:not(:empty) { margin-top: 8px; }

/* ---- タブ(折り返して全部見えるようにする) ---- */
.tabs { display: grid; gap: 10px; margin: 0 0 12px; }
.tab-group { display: grid; gap: 4px; }
.tab-label { font-size: 11px; font-weight: 700; letter-spacing: .04em; color: var(--accent); }
.tab-group.real .tab-label { color: var(--hot); }
.tab-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.tabs button { flex: 1 1 auto; font: inherit; font-size: 14px; font-weight: 600; white-space: nowrap; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; color: var(--text2); padding: 8px 12px; min-height: 40px; cursor: pointer; }
.tabs button[aria-selected=true] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.tab-group.real button { border-color: color-mix(in srgb, var(--hot) 45%, var(--line)); }
.tab-group.real button[aria-selected=true] { background: var(--hot); border-color: var(--hot); color: #fff; }

/* ---- 体験モード ---- */
.live-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.phase { display: flex; flex-direction: column; font-weight: 700; font-size: 17px; line-height: 1.35; padding: 2px 10px; border-left: 4px solid var(--line); }
.phase::before { content: 'いまの状態'; font-size: 11px; font-weight: 400; color: var(--muted); }
.phase[data-kind="chance"] { border-left-color: var(--hot); color: var(--hot); }
.phase[data-kind="hot"] { border-left-color: var(--hot); color: var(--hot); background: color-mix(in srgb, var(--hot) 10%, transparent); border-radius: 0 6px 6px 0; }
.day { color: var(--text2); font-variant-numeric: tabular-nums; }
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.tile { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; display: grid; align-content: start; min-width: 0; }
.tile span { font-size: 11px; line-height: 1.4; color: var(--muted); }
.tile b { font-size: 17px; line-height: 1.4; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.tile small { font-size: 11px; line-height: 1.4; color: var(--muted); overflow-wrap: anywhere; }
.plus { color: var(--plus); } .minus { color: var(--minus); }
.log { list-style: none; margin: 0; padding: 0; max-height: 260px; overflow-y: auto; font-size: 13px; font-variant-numeric: tabular-nums; }
.log li { padding: 5px 0; border-bottom: 1px solid var(--grid); display: flex; gap: 8px; line-height: 1.5; }
.log li .g { color: var(--muted); flex: none; width: 96px; }
.log li.big { font-weight: 700; }
.log li.premium { color: #b98900; }
.day-est { margin: 10px 0; }
.day-est .btn { width: 100%; min-height: 46px; border: 2px solid var(--accent); color: var(--accent); }
.day-est .big-line { margin: 12px 0 8px; font-size: 16px; }
.tbl.post tr.truth td { background: color-mix(in srgb, var(--hot) 14%, transparent); }
.tbl.post tr.truth td:first-child { font-weight: 700; padding-left: 6px; }
.log li.complete { color: #0f8f5a; }
.complete-line { margin: 6px 0; font-weight: 700; color: #0f8f5a; }
@media (prefers-color-scheme: dark) { .log li.complete, .complete-line { color: #2fd08a; } }
.premium-line { margin: 6px 0; font-weight: 700; color: #b98900; }
@media (prefers-color-scheme: dark) { .log li.premium, .premium-line { color: #e0a800; } }

/* ---- グラフ・結果 ---- */
.chart-title { margin-top: 12px; font-size: 14px; color: var(--text2); }
.card > .chart-title:first-child { margin-top: 0; }
.chart-box { position: relative; height: 260px; }
.chart-box.short { height: 190px; }
.note { font-size: 13px; line-height: 1.6; color: var(--text2); margin: 8px 0; }
.muted { color: var(--muted); font-size: 13px; }
.notes { margin: 8px 0 0; padding-left: 18px; font-size: 12px; line-height: 1.6; color: var(--text2); }
.notes li { margin-bottom: 4px; }
.result h2 { font-size: 17px; }
.result .big { font-size: 28px; font-weight: 700; font-variant-numeric: tabular-nums; }
.big-line { font-size: 17px; line-height: 1.5; font-weight: 700; margin: 4px 0 12px; }
.share a { display: inline-block; padding: 6px 0; color: var(--accent); font-weight: 600; }
.g-canvas { overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.g-canvas canvas { display: block; width: 100%; height: auto; touch-action: manipulation; cursor: crosshair; }

/* ---- グラフ読み取りの図解 ---- */
.g-guide { margin: 0 0 12px; border: 1px solid var(--line); border-radius: 8px; padding: 4px 12px 8px; }
.g-guide summary { cursor: pointer; padding: 8px 0; font-size: 13px; font-weight: 600; color: var(--accent); }
.g-guide svg { display: block; width: 100%; max-width: 420px; height: auto; margin: 0 auto; }
.g-guide ol { padding-left: 22px; font-size: 13px; }
.gg-frame { fill: var(--bg); stroke: var(--text2); stroke-width: 1.5; }
.gg-grid line { stroke: var(--line); stroke-width: 1; }
.gg-grid line.zero { stroke: var(--muted); }
.gg-scale text { font-size: 11px; fill: var(--text); font-variant-numeric: tabular-nums; }
.gg-line { fill: none; stroke: var(--plus); stroke-width: 2; stroke-linejoin: round; }
.gg-lead { stroke: var(--hot); stroke-width: 1; stroke-dasharray: 4 3; }
.gg-tap circle { fill: var(--hot); stroke: var(--surface); stroke-width: 2; }
.gg-tap text { font-size: 12px; font-weight: 700; fill: #fff; text-anchor: middle; }
.gg-cap { font-size: 11px; fill: var(--text2); }

/* ---- 表(はみ出す表は横にスクロール) ---- */
.tbl-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -14px; padding: 0 14px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.tbl th, .tbl td { padding: 7px 8px; border-bottom: 1px solid var(--grid); text-align: right; white-space: nowrap; }
.tbl th:first-child, .tbl td:first-child { text-align: left; padding-left: 0; }
.tbl th { color: var(--muted); font-weight: 600; font-size: 12px; }
.tbl.left td, .tbl.left th { text-align: left; white-space: normal; }
.tbl.left td:first-child { min-width: 7.5em; padding-right: 10px; }
.tbl .kind { font-size: 11px; color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 0 5px; white-space: nowrap; }
.tbl.post { margin-bottom: 12px; font-size: 15px; }
.tbl.post td:last-child { font-weight: 700; }
.tbl.post tr.top td { color: var(--accent); }

/* ---- 文章 ---- */
.prose h3 { font-size: 14px; margin: 18px 0 6px; }
.prose p { margin: 0 0 10px; font-size: 14px; color: var(--text2); }
.prose ul { margin: 0; padding-left: 18px; font-size: 13px; line-height: 1.7; color: var(--text2); }

/* ---- 公式動画 ---- */
.video-box { position: relative; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; background: #000; }
.video-box iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---- 実戦ノート ---- */
.head-nav { margin-left: auto; display: flex; flex: none; gap: 2px 10px; }
.head-link { flex: none; font-size: 13px; font-weight: 600; color: var(--accent); text-decoration: none; padding: 8px 4px; white-space: nowrap; }
.linkbtn { font: inherit; font-weight: 600; color: var(--accent); background: none; border: 0; padding: 0; text-decoration: underline; cursor: pointer; }
#nForm .conds { margin-bottom: 12px; }
#nForm .seg { margin-bottom: 12px; }
#nForm .seg button { flex: 1 1 0; }
.conds .wide { grid-column: 1 / -1; }
.quick { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: -4px 0 10px; font-size: 12px; color: var(--muted); }
.quick .btn { min-height: 40px; }
.extra { margin: 4px 0 14px; padding: 12px; border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line)); border-left-width: 4px; border-radius: 10px; background: color-mix(in srgb, var(--accent) 7%, var(--surface)); }
.extra-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.extra-badge { font-size: 11px; font-weight: 700; color: var(--accent-ink); background: var(--accent); border-radius: 4px; padding: 1px 7px; white-space: nowrap; }
.extra h3 { margin: 0; font-size: 15px; line-height: 1.5; }
.extra-machine { margin: 2px 0 6px; font-size: 13px; font-weight: 600; color: var(--text2); }
.extra .conds { margin-top: 8px; }
.extra .btn { background: var(--surface); border: 2px solid var(--accent); color: var(--accent); }
.extra[data-kind="pachinko"] { border-color: var(--line); border-left-color: var(--hot); background: var(--surface); }
.extra[data-kind="pachinko"] .extra-badge { background: var(--hot); }
.extra .btn { width: 100%; min-height: 48px; }
.extra .big-line { margin-top: 12px; }
.helper { margin: 0 0 12px; font-size: 13px; color: var(--text2); }
.helper summary { cursor: pointer; padding: 8px 0; color: var(--accent); font-weight: 600; }
.memo { margin-bottom: 4px; }
.filter-on { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 10px 0 0; font-size: 13px; font-weight: 600; }
#nPeriod { margin-bottom: 12px; }
.tbl tr.tap { cursor: pointer; }
.tbl tr.tap.on td { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.tbl tr.tap td:first-child { white-space: normal; min-width: 7em; }
.nlist { list-style: none; margin: 0; padding: 0; }
.nlist li { position: relative; padding: 10px 0; border-bottom: 1px solid var(--grid); }
.nlist li:last-child { border-bottom: 0; }
.nlist .row1 { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.nlist .row1 b { font-size: 15px; line-height: 1.4; min-width: 0; overflow-wrap: anywhere; }
.nlist .no { font-weight: 400; font-size: 12px; color: var(--muted); white-space: nowrap; }
.nlist .amt { flex: none; font-weight: 700; font-size: 16px; font-variant-numeric: tabular-nums; }
.nlist .row2 { font-size: 12px; line-height: 1.6; color: var(--text2); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.nlist .row2.memo { color: var(--muted); }
.nlist .del { font: inherit; font-size: 12px; color: var(--muted); background: none; border: 0; padding: 6px 0 0; text-decoration: underline; cursor: pointer; }

/* ---- ホールで使う道具(回転率カウンター・小役カウンター) ---- */
.tool-links { display: grid; gap: 8px; margin: 0 0 22px; }
.tool-links a { display: block; background: var(--surface); border: 1px solid color-mix(in srgb, var(--hot) 45%, var(--line)); border-radius: 12px; padding: 12px 14px; color: var(--text); text-decoration: none; }
.tool-links b { display: block; font-size: 16px; }
.tool-links b::after { content: ' →'; color: var(--hot); }
.tool-links span { display: block; margin-top: 2px; font-size: 13px; line-height: 1.5; color: var(--text2); }
.tab-link { display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 600; white-space: nowrap; border: 1px dashed var(--hot); border-radius: 999px; color: var(--hot); padding: 8px 12px; min-height: 40px; text-decoration: none; }
.tab-link::after { content: ' →'; }
.tool h2 { font-size: 15px; }
.cash { margin-top: 14px; }
.cash-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--text2); }
.cash-top b { font-size: 24px; font-variant-numeric: tabular-nums; color: var(--text); }
.cash-btns { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; margin-top: 8px; }
.cash-btns .btn { white-space: nowrap; padding-left: 10px; padding-right: 10px; }
.big-btn { min-height: 60px; font-size: 17px; background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.rate-big { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; margin: 0 0 6px; }
.rate-big span { font-size: 13px; color: var(--text2); }
.rate-big b { font-size: 44px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.rate-big small { font-size: 13px; color: var(--muted); }
.counter-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.counter-head h2 { margin: 0; margin-right: auto; }
.how-link { font: inherit; font-size: 14px; color: var(--accent); background: none; border: 0; padding: 8px 4px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.how { margin-top: 10px; padding: 12px 14px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; font-size: 13px; line-height: 1.7; }
.how h3 { margin: 0 0 6px; font-size: 14px; }
.how dl { margin: 0; }
.how dt { margin-top: 8px; font-weight: 700; }
.how dd { margin: 0; color: var(--text2); }
.how ul { margin: 10px 0 0; padding-left: 1.2em; color: var(--text2); }
.how p { margin: 10px 0 0; color: var(--muted); }
.counters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 10px; }
.counter { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface); }
.counter.on { border-color: var(--accent); }
.counter-main { display: grid; width: 100%; gap: 2px; padding: 12px 8px 10px; font: inherit; color: var(--text); background: none; border: 0; cursor: pointer; text-align: center; min-height: 104px; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.counter-main:active { background: color-mix(in srgb, var(--accent) 16%, transparent); }
.counter-name { font-size: 13px; font-weight: 600; line-height: 1.35; color: var(--text2); overflow-wrap: anywhere; }
.counter-num { font-size: 34px; line-height: 1.15; font-variant-numeric: tabular-nums; }
.counter:not(.on) .counter-num { color: var(--muted); }
.counter-rate { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.counter.on .counter-rate { color: var(--accent); }
.counter-sub { display: flex; border-top: 1px solid var(--grid); }
.counter-sub button { flex: 1 1 0; font: inherit; font-size: 12px; color: var(--text2); background: none; border: 0; border-left: 1px solid var(--grid); padding: 9px 4px; min-height: 38px; cursor: pointer; }
.counter-sub button:first-child { border-left: 0; }
.counter-sub button:disabled { opacity: .35; }
.est-card { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); background: color-mix(in srgb, var(--accent) 6%, var(--surface)); }
.est-title { margin: 0; font-size: 15px; }
.est-card .big-line { margin-top: 10px; }
.est-high { color: var(--accent); font-size: 22px; }
.est-bars { display: grid; gap: 6px; margin: 4px 0 8px; }
.est-row { display: grid; grid-template-columns: 3.6em minmax(0, 1fr) 3em; align-items: center; gap: 8px; font-size: 13px; font-variant-numeric: tabular-nums; }
.est-row b { text-align: right; }
.est-bar { height: 14px; background: var(--grid); border-radius: 4px; overflow: hidden; }
.est-bar i { display: block; height: 100%; background: color-mix(in srgb, var(--accent) 55%, var(--grid)); border-radius: 4px; }
.est-row.top .est-bar i { background: var(--accent); }
.est-row.top span, .est-row.top b { font-weight: 700; color: var(--accent); }

/* ---- 候補の台を比べる ---- */
.pick-actions { margin: 4px 0 8px; }
.cand-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 4px; }
.cand-head b { font-size: 15px; }
.cand-stale { margin: 10px 0 0; }
.cand-dup { margin-top: 12px; }
.cand-gap { margin: 10px 0 0; }
.cand-res { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.cand-plan { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 0 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; }
.cand-plan.on { border-color: var(--accent); border-width: 2px; padding: 7px 9px; }
.cand-plan span { font-size: 13px; font-weight: 600; color: var(--text2); }
.cand-plan.on span::after { content: ' ← おすすめ'; color: var(--accent); }
.cand-plan b { font-size: 20px; font-variant-numeric: tabular-nums; }
.cand-plan small { grid-column: 1 / -1; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.cand-stop { margin: -2px 0 2px; padding: 0 2px; font-size: 13px; line-height: 1.7; color: var(--text2); }
.cand-stop b { display: block; font-size: 12px; color: var(--muted); }
.cand .plus, .rank .plus, .est-card .plus { color: var(--plus); }
.cand .minus, .rank .minus { color: var(--minus); }
.cand-go { font-size: 14px; color: var(--accent); }
.rank { list-style: none; counter-reset: rank; margin: 0; padding: 0; }
.rank li { counter-increment: rank; display: grid; grid-template-columns: 1.6em minmax(0, 1fr) auto; align-items: baseline; gap: 6px; padding: 8px 0; border-top: 1px solid var(--line); }
.rank li::before { content: counter(rank); font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.rank span { font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.rank small { display: block; font-size: 12px; color: var(--muted); }
.rank b { font-size: 16px; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---- 使い方 ---- */
.help-toc { display: grid; gap: 2px; }
.help-toc a { padding: 8px 0; color: var(--accent); font-weight: 600; text-decoration: none; border-bottom: 1px solid var(--grid); }
.help-toc a:last-child { border-bottom: 0; }
.help .prose ol { margin: 0 0 10px; padding-left: 22px; font-size: 14px; line-height: 1.8; color: var(--text2); }
.help .prose ul { margin-bottom: 10px; }
.help .prose li { margin-bottom: 4px; }
.help section { scroll-margin-top: 12px; }
.help details { border-top: 1px solid var(--grid); padding: 4px 0; }
.help summary { cursor: pointer; padding: 8px 0; font-size: 14px; font-weight: 600; }
.help details p { margin: 0 0 10px; }

/* ---- ご意見ボックス ---- */
.fb-box { margin-top: 20px; }
.fb-box h2 { font-size: 15px; }
textarea { width: 100%; min-width: 0; font: inherit; font-size: 16px; line-height: 1.6; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; resize: vertical; }
textarea.invalid { border-color: var(--minus); border-width: 2px; background: color-mix(in srgb, var(--minus) 9%, var(--surface)); }
.fb-box .controls { margin-top: 8px; }

/* ---- 実戦記録(ブログ) ---- */
.plist { list-style: none; margin: 0 0 14px; padding: 0; border-top: 1px solid var(--line); }
.plist a { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--line); color: var(--text); text-decoration: none; }
.plist img { flex: 0 0 auto; width: 84px; height: 84px; object-fit: cover; border-radius: 6px; background: var(--grid); }
.plist div { min-width: 0; }
.plist b { display: block; font-size: 15px; line-height: 1.5; }
.plist-meta { display: flex; flex-wrap: wrap; gap: 2px 10px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.plist-meta i, .post-facts dd { font-style: normal; font-weight: 700; }
.plist-meta .plus, .post-facts .plus { color: var(--plus); }
.plist-meta .minus, .post-facts .minus { color: var(--minus); }
.plist-machine { display: block; margin-top: 2px; font-size: 12px; color: var(--text2); }
.card .plist { border-top: 0; margin-bottom: 4px; }
.more-link { margin: -4px 0 22px; font-size: 14px; text-align: right; }
.more-link a { color: var(--accent); }
.card .more-link { margin: 8px 0 0; }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 6px 0 20px; font-size: 13px; color: var(--muted); }
.post-head h1 { font-size: 22px; line-height: 1.45; margin: 10px 0 8px; }
.post-meta { display: flex; flex-wrap: wrap; gap: 2px 12px; margin: 0; font-size: 13px; color: var(--muted); }
.post-meta a { color: var(--accent); }
.post-facts { display: flex; gap: 24px; margin: 14px 0 0; padding: 10px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.post-facts dt { font-size: 12px; color: var(--muted); }
.post-facts dd { margin: 0; font-size: 20px; font-variant-numeric: tabular-nums; }
.post-body { margin: 18px 0 26px; font-size: 16px; line-height: 1.95; overflow-wrap: anywhere; }
.post-body p { margin: 0 0 1.2em; }
.post-body h2 { font-size: 18px; line-height: 1.5; margin: 2em 0 .7em; padding-bottom: 6px; border-bottom: 2px solid var(--text); }
.post-body h3 { font-size: 16px; margin: 1.6em 0 .5em; }
.post-body img { display: block; max-width: 100%; height: auto; margin: 0 auto; border-radius: 6px; }
.post-body a { color: var(--accent); }
.post-body ul, .post-body ol { margin: 0 0 1.2em; padding-left: 1.4em; }
.post-body blockquote { margin: 0 0 1.2em; padding: 2px 0 2px 14px; color: var(--text2); border-left: 3px solid var(--line); }
.post-body table { border-collapse: collapse; font-size: 14px; margin: 0 0 1.2em; }
.post-body th, .post-body td { border: 1px solid var(--line); padding: 5px 10px; }
.post-try h2 { font-size: 15px; margin: 0 0 10px; }
.post-caution { margin: 0 0 26px; }
.saved { margin: 10px 0; padding: 10px 12px; font-size: 14px; border: 1px solid var(--accent); border-radius: 8px; background: color-mix(in srgb, var(--accent) 8%, var(--surface)); }
.saved a { color: var(--accent); margin-left: 6px; }
.post-form { display: grid; gap: 14px; }
.post-form textarea { width: 100%; font: inherit; line-height: 1.7; }
.post-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; position: sticky; top: 0; z-index: 2; padding: 8px 0; background: var(--surface); }
.post-admin { list-style: none; margin: 0; padding: 0; }
.post-admin a { display: block; padding: 10px 0; border-bottom: 1px solid var(--grid); color: var(--text); text-decoration: none; }
.post-admin b { display: block; font-size: 15px; line-height: 1.5; }
.post-admin span { font-size: 12px; color: var(--muted); }
.post-admin i { font-style: normal; font-weight: 700; margin-right: 6px; }
.post-admin .pub { color: var(--accent); }
.post-admin .draft { color: var(--hot); }
.btn.danger { color: var(--minus); border-color: var(--minus); margin-bottom: 24px; }

/* ---- 管理画面 ---- */
.master-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.master .tbl td:first-child { white-space: normal; min-width: 8em; }
.master .tbl a { color: var(--accent); }
.fb-item { padding: 10px 0; border-bottom: 1px solid var(--grid); }
.fb-item:last-child { border-bottom: 0; }
.fb-meta { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.fb-body { margin: 4px 0; font-size: 14px; line-height: 1.7; overflow-wrap: anywhere; }
.fb-item .del { font: inherit; font-size: 12px; color: var(--muted); background: none; border: 0; padding: 4px 0; text-decoration: underline; cursor: pointer; }

/* ---- ダイアログ ---- */
dialog { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--text); padding: 18px; width: min(92vw, 380px); }
dialog::backdrop { background: rgba(0, 0, 0, .5); }
dialog form { display: grid; gap: 12px; }
dialog .controls .btn { flex: 1 1 auto; }

/* ---- 広い画面 ---- */
@media (min-width: 640px) {
  .wrap { padding: 0 16px; }
  h1 { font-size: 22px; }
  .card { padding: 16px; margin-bottom: 14px; }
  .mlist { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tool-links { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .counters { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .cash-btns { max-width: 460px; }
  .feats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 36px; }
  .points li { font-size: 12px; }
  .filters { grid-template-columns: minmax(0, 320px); }
  .conds { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
  .tiles { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
  .tabs { grid-template-columns: auto auto; justify-content: start; column-gap: 28px; }
  .tab-row { display: flex; flex-wrap: wrap; }
  .tabs button { flex: 0 1 auto; padding: 8px 16px; }
  .controls .btn.primary { flex: 0 0 auto; min-height: 44px; font-size: 15px; }
  .controls label.inline { flex: 0 1 auto; }
  .chart-box { height: 300px; }
  .chart-box.short { height: 200px; }
  .tbl-scroll { margin: 0; padding: 0; }
  .tbl.post { max-width: 360px; }
}
