/* =========================================================================
 * カタン 盤面シミュレーター
 * ========================================================================= */

:root {
  --bg: #10171d;
  --panel: #1a242c;
  --panel-2: #22303a;
  --line: #33454f;
  --text: #e8eef2;
  --text-dim: #9db0bd;
  --accent: #e0a63c;
  --accent-2: #3f9ad6;
  --radius: 10px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo,
               system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.6;
}

h1, h2 { margin: 0; font-weight: 700; }

/* ------------------------------------------------------------- header */

.app-header {
  padding: 14px 20px 12px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #1b2831, #141d24);
}
.app-header h1 { font-size: 20px; letter-spacing: .04em; }
.subtitle { margin: 3px 0 0; color: var(--text-dim); font-size: 12.5px; }

/* ------------------------------------------------------------- layout */

.layout {
  display: grid;
  grid-template-columns: 276px minmax(0, 1fr) 300px;
  gap: 14px;
  padding: 14px;
  align-items: start;
}

@media (max-width: 1180px) {
  /* 縦積みのときは盤面を先頭に出す */
  .layout { grid-template-columns: 1fr; }
  .board-area { order: -1; }
  .panel { width: 100%; max-width: 620px; margin-inline: auto; }
}

/* --------------------------------------------------------------- seg */

.seg { display: flex; border: 1px solid var(--line); border-radius: 7px; overflow: hidden; }
.seg-btn {
  flex: 1;
  font: inherit;
  font-size: 12px;
  padding: 7px 6px;
  background: var(--panel-2);
  color: var(--text-dim);
  border: 0;
  cursor: pointer;
}
.seg-btn + .seg-btn { border-left: 1px solid var(--line); }
.seg-btn.is-active { background: var(--accent-2); color: #fff; font-weight: 700; }

/* ------------------------------------------------------------ buttons */

.btn {
  font: inherit;
  font-size: 13px;
  padding: 9px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
  cursor: pointer;
  transition: background .12s, opacity .12s;
}
.btn:hover:not(:disabled) { background: #2b3d49; }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn-block { display: block; width: 100%; }
.btn-block + .btn-block { margin-top: 7px; }
.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #201603;
  font-weight: 700;
}
.btn-primary:hover:not(:disabled) { background: #efb851; }
.btn-ghost { background: transparent; }

.check-result:not(:empty) { margin-top: 10px; }
.check-row {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  padding: 6px 9px;
  border-radius: 7px;
}
.check-row.is-ok {
  background: rgba(96, 180, 110, .14);
  border: 1px solid rgba(96, 180, 110, .45);
  color: #bfe6c6;
}
.check-row.is-ng {
  background: rgba(217, 69, 61, .16);
  border: 1px solid rgba(217, 69, 61, .55);
  color: #f3bdb9;
}
.check-mark { font-weight: 800; }

.check {
  display: block;
  font-size: 12.5px;
  color: var(--text);
  margin: 5px 0;
  cursor: pointer;
}
.check input { margin-right: 6px; vertical-align: -1px; }

/* --------------------------------------------------------- order list */

.order-list {
  list-style: none;
  margin: 11px 0 0;
  padding: 0;
  display: grid;
  gap: 3px;
}
.order-item {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 4px 7px;
  border-radius: 6px;
  font-size: 12px;
  color: var(--text-dim);
  background: rgba(255, 255, 255, .03);
}
.order-item.is-done { opacity: .45; }
.order-item.is-current {
  background: rgba(224, 166, 60, .18);
  color: var(--text);
  outline: 1px solid var(--accent);
}
.order-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, .5);
  flex: 0 0 auto;
}
.order-name { flex: 1; }
.order-round { font-size: 10.5px; opacity: .75; }

/* -------------------------------------------------------------- board */

.board-area { display: flex; flex-direction: column; gap: 12px; min-width: 0; }

.status-bar {
  display: flex;
  align-items: center;
  gap: 9px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 14px;
  min-height: 44px;
  font-size: 13.5px;
}
.chip {
  display: inline-block;
  flex: 0 0 auto;
  white-space: nowrap;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid rgba(0, 0, 0, .35);
}
.chip-sm { font-size: 11px; padding: 1px 7px; }

.board-wrap {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px;
}
#board {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  /* 盤面の上ではブラウザのスクロール／ズームを止めて、自前の操作に回す */
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
  cursor: grab;
}
#board:active { cursor: grabbing; }

.board-zoom {
  position: absolute;
  right: 16px;
  bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.zoom-btn {
  width: 40px; height: 40px;
  display: grid;
  place-items: center;
  font: inherit;
  font-size: 17px;
  line-height: 1;
  color: var(--text);
  background: rgba(16, 23, 29, .78);
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 9px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.zoom-btn:hover { background: rgba(16, 23, 29, .95); }

.board-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.btn-undo { flex: 0 0 auto; padding: 9px 18px; }
.board-hint { font-size: 11px; color: var(--text-dim); }

/* SVG 内 */
.placeholder { fill: #9ec6dd; font-size: 18px; }
.coast-line {
  stroke: #f0e0b8;
  stroke-width: 22;
  stroke-linecap: round;
  opacity: .85;
}
.hex-shape { stroke: rgba(0, 0, 0, .45); stroke-width: 1.5; }
.hex-name { font-size: 12px; font-weight: 700; opacity: .85; }
.hex-letter { font-size: 13px; font-weight: 700; opacity: .8; letter-spacing: .06em; }
.order-badge circle { fill: rgba(16, 23, 29, .72); stroke: rgba(255, 255, 255, .35); stroke-width: 1; }
.hex-order { font-size: 11px; font-weight: 700; fill: #ffe9b8; }
.red-adj {
  stroke: #ff4d43;
  stroke-width: 6;
  stroke-linecap: round;
  stroke-dasharray: 8 6;
}

.token-bg { fill: #f6efdc; stroke: rgba(0, 0, 0, .5); stroke-width: 1.5; }
.token-num { font-size: 18px; font-weight: 800; fill: #23252a; }
.token-pips { font-size: 15px; font-weight: 800; fill: #23252a; letter-spacing: 1px; }
.token-red .token-num, .token-red .token-pips { fill: #c02f28; }

.dock { stroke: #9a7c4a; stroke-width: 4; stroke-linecap: round; opacity: .9; }
.port-bg { stroke: rgba(0, 0, 0, .45); stroke-width: 1.5; }
.port-ratio { font-size: 11px; font-weight: 800; }
.port-kind { font-size: 10px; font-weight: 700; }

.road-base { stroke: rgba(0, 0, 0, .55); stroke-width: 13; stroke-linecap: round; }
.road { stroke-width: 8; stroke-linecap: round; }
.settlement-shape { stroke: rgba(0, 0, 0, .65); stroke-width: 2; stroke-linejoin: round; }
.focus-ring {
  fill: none;
  stroke: #ffe08a;
  stroke-width: 2.5;
  stroke-dasharray: 5 4;
  opacity: .9;
}

.legal { cursor: pointer; }
.legal-dot {
  fill: rgba(255, 255, 255, .92);
  stroke-width: 3;
  transition: r .1s;
}
.legal-vertex:hover .legal-dot { fill: #fff; stroke-width: 4.5; }
.legal-road {
  stroke-width: 9;
  stroke-linecap: round;
  opacity: .55;
  stroke-dasharray: 9 6;
}
.legal-edge:hover .legal-road { opacity: 1; stroke-dasharray: none; }
.hit { fill: transparent; pointer-events: all; }
.hit-line { stroke: transparent; stroke-width: 28; pointer-events: all; }

/* --------------------------------------------------------- 配置の評価 */

.ev-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 10px;
}
.ev-card {
  --pc: #888;
  border: 1px solid var(--line);
  border-left: 4px solid var(--pc);
  border-radius: 8px;
  padding: 10px 12px 11px;
  background: var(--panel-2);
  min-width: 0;
}
.ev-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 9px;
}
.ev-head-sub { font-size: 11px; color: var(--text-dim); }

.ev-score + .ev-score { margin-top: 9px; }
.ev-score-head { display: flex; align-items: baseline; gap: 7px; }
.ev-score-label { font-size: 12px; color: var(--text-dim); flex: 1; }
.ev-score-value { font-size: 19px; font-weight: 800; font-variant-numeric: tabular-nums; }
.ev-score-rank {
  font-size: 10.5px;
  color: var(--text-dim);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0 5px;
}
.ev-bar {
  height: 7px;
  border-radius: 4px;
  background: rgba(255, 255, 255, .07);
  overflow: hidden;
  margin: 4px 0 5px;
}
.ev-bar-fill { height: 100%; background: var(--accent-2); border-radius: 4px; }
.ev-bar-fill.is-high { background: #60b46e; }
.ev-bar-fill.is-low { background: #d9694f; }

.ev-parts { display: flex; flex-wrap: wrap; gap: 4px 10px; }
.ev-part { font-size: 10.5px; color: var(--text-dim); white-space: nowrap; }
.ev-part-name { opacity: .8; }
.ev-part-val { margin-left: 3px; color: var(--text); font-variant-numeric: tabular-nums; }

.ev-minis {
  display: flex;
  gap: 6px;
  margin-top: 10px;
}
.ev-mini {
  flex: 1;
  display: flex;
  align-items: baseline;
  gap: 4px;
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, .03);
  min-width: 0;
}
.ev-mini-label { font-size: 10px; color: var(--text-dim); flex: 1; white-space: nowrap; }
.ev-mini-value { font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.ev-mini-value.is-high { color: #7fca8c; }
.ev-mini-value.is-low { color: #e8897a; }
.ev-mini-rank { font-size: 9.5px; color: var(--text-dim); }

.ev-details {
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 3px;
}
.ev-row { display: flex; gap: 8px; font-size: 11.5px; align-items: baseline; }
.ev-row-label { flex: 0 0 84px; color: var(--text-dim); }
.ev-row-value { flex: 1; min-width: 0; }

.ev-flags { list-style: none; margin: 9px 0 0; padding: 0; display: grid; gap: 4px; }
.ev-flag {
  font-size: 11px;
  line-height: 1.45;
  color: #f3c7a9;
  background: rgba(217, 130, 61, .13);
  border: 1px solid rgba(217, 130, 61, .4);
  border-radius: 6px;
  padding: 4px 8px;
}
.ev-flag::before { content: '⚠ '; opacity: .9; }

/* ------------------------------------------------------- 自由配置 */

.seg-wrap { flex-wrap: wrap; }
.seg-wrap .seg-btn { flex: 1 0 40%; }

.build-controls { margin-top: 10px; }
.piece-count {
  display: grid;
  gap: 3px;
  margin: 4px 0 10px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, .03);
}
.piece-row { display: flex; justify-content: space-between; font-size: 11.5px; }
.piece-name { color: var(--text-dim); }
.piece-val { font-variant-numeric: tabular-nums; }
.piece-val.is-full { color: var(--accent); font-weight: 700; }

.legal.is-remove .legal-dot { stroke: #e8897a; fill: rgba(232, 137, 122, .3); }
.legal.is-remove .legal-road { stroke: #e8897a; }
.city .settlement-shape { stroke-width: 2.5; }

/* --------------------------------------------------- 10点構成の設計 */

.plan-vp { display: flex; align-items: baseline; gap: 3px; margin-left: auto; }
.plan-vp-num { font-size: 19px; font-weight: 800; font-variant-numeric: tabular-nums; }
.plan-vp-max { font-size: 10.5px; color: var(--text-dim); }
.plan-vp.is-done .plan-vp-num { color: #7fca8c; }

.plan-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 12px;
  margin: 8px 0 2px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.plan-check {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  color: var(--text);
  cursor: pointer;
}
.plan-check input[type="checkbox"] { margin: 0; }
.plan-num {
  width: 46px;
  font: inherit;
  font-size: 11.5px;
  padding: 2px 4px;
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 5px;
}

.plan-res {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 2px;
}
.plan-res-cell { display: flex; align-items: center; gap: 3px; }
.plan-res-num { font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.plan-res-total {
  margin-left: auto;
  font-size: 11.5px;
  color: var(--text-dim);
}

/* ---------------------------------------------------------------- log */

.log-wrap {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 11px 13px 13px;
}
.log-wrap h2 { font-size: 12px; letter-spacing: .08em; color: var(--accent); margin-bottom: 8px; }
.log {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 170px;
  overflow-y: auto;
  display: grid;
  gap: 3px;
}
.log-item {
  font-size: 12px;
  color: var(--text-dim);
  padding: 3px 8px;
  border-left: 3px solid transparent;
  background: rgba(255, 255, 255, .025);
  border-radius: 0 5px 5px 0;
}
.log-item.has-player { color: var(--text); }

/* ------------------------------------------------------------ players */

.player-card {
  --pc: #888;
  border: 1px solid var(--line);
  border-left: 4px solid var(--pc);
  border-radius: 8px;
  padding: 8px 10px 9px;
  background: var(--panel-2);
}
.player-card + .player-card { margin-top: 8px; }
.player-card.is-current { box-shadow: 0 0 0 2px var(--accent) inset; }

.player-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.player-badge {
  padding: 1px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid rgba(0, 0, 0, .35);
}
.player-meta { font-size: 11px; color: var(--text-dim); }

.res-row { display: flex; gap: 5px; margin-top: 7px; }
.res-cell { display: flex; align-items: center; gap: 3px; flex: 1; }
.res-dot {
  width: 19px; height: 19px;
  border-radius: 5px;
  display: grid;
  place-items: center;
  font-size: 10.5px;
  font-weight: 700;
  color: #fff;
  border: 1px solid rgba(0, 0, 0, .35);
}
.res-num { font-size: 12.5px; font-variant-numeric: tabular-nums; }

.player-foot {
  display: flex;
  justify-content: space-between;
  margin-top: 7px;
  font-size: 11px;
  color: var(--text-dim);
}
.pip-total { color: var(--text); font-weight: 700; }

.port-row { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.port-tag {
  font-size: 10.5px;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(63, 154, 214, .18);
  border: 1px solid rgba(63, 154, 214, .5);
  color: #bfe0f5;
}

/* -------------------------------------------------------------- table */

.table-wrap { overflow-x: auto; }
.stat-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.stat-table th, .stat-table td {
  padding: 4px 6px;
  border-bottom: 1px solid var(--line);
  text-align: center;
}
.st-res { text-align: left; color: var(--text-dim); font-weight: 500; padding-left: 8px; }
.st-player { font-size: 11px; color: var(--text-dim); }
.st-dot {
  display: inline-block;
  width: 9px; height: 9px;
  border-radius: 50%;
  margin-right: 3px;
  border: 1px solid rgba(0, 0, 0, .4);
}
.st-val { font-variant-numeric: tabular-nums; }
.st-val.is-zero { color: #6b7d88; }
.st-val.is-max { color: var(--accent); font-weight: 700; }
.st-total-row th, .st-total-row td { border-top: 1px solid var(--line); font-weight: 700; }

/* --------------------------------------------------------------- dice */

.dice-row { display: grid; gap: 0; }
.dice-result {
  margin-top: 10px;
  font-size: 12px;
  color: var(--text-dim);
  min-height: 22px;
}
.dice-line { display: flex; align-items: center; gap: 6px; }
.die {
  width: 26px; height: 26px;
  display: grid;
  place-items: center;
  background: #f6efdc;
  color: #23252a;
  font-weight: 800;
  border-radius: 6px;
  border: 1px solid rgba(0, 0, 0, .4);
}
.dice-sum { font-size: 15px; font-weight: 700; color: var(--text); }
.dice-sum.is-seven { color: #ef6b62; }
.dice-note { margin: 4px 0 0; font-size: 11.5px; }

.hist { display: flex; align-items: flex-end; gap: 3px; margin-top: 10px; }
.hist-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.hist-bar {
  width: 100%;
  min-height: 2px;
  background: var(--accent-2);
  border-radius: 2px 2px 0 0;
}
.hist-bar.is-seven { background: #ef6b62; }
.hist-count { font-size: 9.5px; color: var(--text-dim); }
.hist-label { font-size: 10px; color: var(--text-dim); }

/* ------------------------------------------------------------- legend */

.legend-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.legend-item { display: flex; align-items: center; gap: 7px; font-size: 12px; }
.legend-swatch {
  width: 16px; height: 16px;
  border-radius: 4px;
  border: 1px solid rgba(0, 0, 0, .45);
  flex: 0 0 auto;
}
.legend-name { flex: 0 0 62px; }
.legend-res { color: var(--text-dim); font-size: 11px; }

/* ------------------------------------------------------ スマホ向け */

@media (max-width: 760px) {
  body { font-size: 15px; }
  .app-header { padding: 10px 14px 9px; }
  .app-header h1 { font-size: 17px; }
  .subtitle { font-size: 11.5px; }
  .layout { padding: 8px; gap: 10px; }

  /* 手番と指示は常に見えるように上に貼り付ける */
  .status-bar {
    position: sticky;
    top: 0;
    z-index: 20;
    font-size: 13px;
    padding: 9px 11px;
  }

  /* 盤面に高さを与えて、指で押せる大きさを確保する。
     ただし盤面の上は touch-action: none でページのスクロールを止めているので、
     左右に余白を残して、そこを指でなぞればスクロールできるようにしておく。 */
  .board-wrap { padding: 5px; }
  #board {
    width: 82%;
    margin-inline: auto;
    /* 高さは幅なりにする。高さを別に決めると、幅で縮尺が決まっているぶん
       上下に何も描かれない余白ができて、そのぶん島が小さくなってしまう。 */
    height: auto;
  }
  .board-zoom { right: 11px; bottom: 11px; }
  .zoom-btn { width: 44px; height: 44px; font-size: 19px; }

  .board-actions {
    position: sticky;
    bottom: 0;
    z-index: 20;
    background: var(--bg);
    padding: 6px 0;
  }
  .btn-undo { min-height: 44px; padding: 10px 22px; font-size: 14px; }
  .board-hint { font-size: 10.5px; }

  /* タップしやすいように操作系を大きめに */
  .btn { min-height: 44px; font-size: 14px; }
  .seg-btn { min-height: 42px; font-size: 13px; }
  .corner-btn { min-height: 44px; font-size: 13px; }
  .corner-center { width: 40px; height: 40px; }
  .check { padding: 5px 0; font-size: 13.5px; }
  .check input { width: 18px; height: 18px; }
  .block-toggle { min-height: 30px; font-size: 13px; }

  .order-item { padding: 6px 8px; font-size: 12.5px; }
  .log { max-height: 140px; }
}

.panel { display: flex; flex-direction: column; gap: 12px; }

.block {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 13px 14px;
}
.block h2 { margin-bottom: 9px; }
.block-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 0;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--accent);
  background: none;
  border: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.block-caret { transition: transform .15s; font-size: 10px; opacity: .8; }
.block.is-collapsed .block-caret { transform: rotate(-90deg); }
.is-collapsed { padding-bottom: 12px; }
.is-collapsed > *:not(h2) { display: none; }
.is-collapsed > h2 { margin-bottom: 0; }

.field { margin-bottom: 12px; }
.field-label {
  display: block;
  font-size: 11.5px;
  color: var(--text-dim);
  margin-bottom: 6px;
}
.hint { margin: 7px 0 0; font-size: 11px; color: var(--text-dim); line-height: 1.5; }

/* ------------------------------------------------------- corner picker */

.corner-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  grid-template-rows: repeat(3, auto);
  gap: 6px;
  align-items: center;
  justify-items: stretch;
}
.corner-center {
  display: grid;
  place-items: center;
  width: 46px; height: 46px;
  color: var(--text-dim);
  font-size: 11px;
  border: 1px dashed var(--line);
  border-radius: 50%;
}
.corner-btn {
  font: inherit;
  font-size: 12px;
  padding: 7px 4px;
  color: var(--text);
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 7px;
  cursor: pointer;
  transition: background .12s, border-color .12s;
}
.corner-btn:hover { background: #2b3d49; }
.corner-btn.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #201603;
  font-weight: 700;
}

/* ------------------------------------------- 盤面のすぐ下の操作列 */

.board-tools { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chip-group {
  display: flex;
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow: hidden;
}
.chip-btn {
  font: inherit;
  font-size: 12.5px;
  padding: 7px 12px;
  min-height: 38px;
  background: var(--panel-2);
  color: var(--text-dim);
  border: 1px solid var(--line);
  border-radius: 7px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.chip-group .chip-btn { border: 0; border-radius: 0; }
.chip-group .chip-btn + .chip-btn { border-left: 1px solid var(--line); }
.chip-btn:hover { background: #2b3d49; }
.chip-btn.is-active { background: var(--accent-2); color: #fff; font-weight: 700; }
.chip-btn.is-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #201603;
  font-weight: 700;
}
.chip-btn.is-remove.is-active { background: #c2564a; }

.board-live:not(:empty) {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px 12px;
}
.live-row { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; }
.live-vp { font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.live-vp.is-done { color: #7fca8c; }
.live-res { display: flex; align-items: center; gap: 3px; }
.live-res.is-traded .res-dot {
  outline: 2px dashed #e0a63c;
  outline-offset: 1px;
}
.live-num { font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.live-rolls {
  margin-left: auto;
  font-size: 12px;
  color: var(--accent);
  font-weight: 700;
  white-space: nowrap;
}

/* ----------------------------------------------------------- 戦術の提案 */

.st-block {
  margin-top: 11px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.st-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.st-title { font-size: 11px; letter-spacing: .06em; color: var(--accent); font-weight: 700; }
.st-rec {
  margin-left: auto;
  font-size: 12px;
  font-weight: 700;
  color: #201603;
  background: var(--accent);
  border-radius: 999px;
  padding: 1px 10px;
}
.st-opt { padding: 5px 0; }
.st-opt + .st-opt { border-top: 1px dashed rgba(255, 255, 255, .08); }
.st-opt.is-rec { background: rgba(224, 166, 60, .07); border-radius: 6px; padding: 5px 7px; }
.st-opt-head { display: flex; align-items: baseline; gap: 7px; }
.st-opt-name { font-size: 12px; flex: 1; }
.st-opt-score { font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.st-opt-sub {
  display: flex;
  gap: 8px;
  font-size: 10.5px;
  color: var(--text-dim);
  margin-bottom: 3px;
}
.st-shape { flex: 1; min-width: 0; }
.st-rolls { white-space: nowrap; }

.st-reasons { list-style: none; margin: 9px 0 0; padding: 0; display: grid; gap: 4px; }
.st-reason {
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--text);
  padding-left: 12px;
  position: relative;
}
.st-reason::before {
  content: '・';
  position: absolute;
  left: 0;
  color: var(--accent);
}
