:root {
  --bg: #f5efe4;
  --bg-soft: #ebe3d2;
  --bg-deep: #e0d4ba;
  --board: #d9a65f;
  --board-light: #efc67d;
  --board-deep: #a97032;
  --frame: #4a3220;
  --frame-light: #6b4828;
  --ink: #2a2218;
  --ink-soft: #5a4e3a;
  --ink-mute: #8a7d65;
  --accent: #d96f57;
  --accent-deep: #c45a44;
  --gold: #f5c76a;
  --line: rgba(42, 34, 24, 0.12);
  --header-bg: #2c3e50;
  --check: #e74c3c;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Zen Maru Gothic', 'Hiragino Kaku Gothic ProN', 'メイリオ', sans-serif;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 50% at 50% 0%, rgba(217, 166, 95, 0.20) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 50% 100%, rgba(217, 111, 87, 0.08) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

/* ============ サイトヘッダー（あそぶネット枠） ============ */
.site-header {
  position: relative;
  z-index: 3;
  background-color: var(--header-bg);
  color: white;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.back-link {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: white;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.9rem;
  padding: 6px 8px;
  border-radius: 8px;
  transition: background 0.2s;
}

.back-link:hover, .back-link:focus-visible {
  background: rgba(255,255,255,0.12);
  outline: none;
}

.site-name {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

/* ============ メインステージ ============ */
.stage {
  position: relative;
  z-index: 2;
  max-width: 520px;
  margin: 0 auto;
  padding: 20px 20px 32px;
  display: flex;
  flex-direction: column;
}

.title-row {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}

.title {
  font-size: 32px;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 10px;
}

.title-koma {
  width: 28px;
  height: 32px;
  background: linear-gradient(160deg, #f6d891 0%, #d39a52 100%);
  clip-path: polygon(50% 0%, 92% 25%, 82% 100%, 18% 100%, 8% 25%);
  border: 2px solid rgba(42, 34, 24, 0.35);
  box-shadow: 0 3px 7px rgba(42, 34, 24, 0.18);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 900;
  color: var(--ink);
}

/* ============ モード切替タブ ============ */
.mode-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 18px;
  background: var(--bg-soft);
  border-radius: 16px;
  padding: 6px;
}

.mode-tab {
  padding: 12px 6px;
  background: transparent;
  border: none;
  border-radius: 12px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-mute);
  cursor: pointer;
  transition: all 0.25s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.mode-tab:hover:not(.active) { color: var(--ink-soft); }

.mode-tab.active {
  background: white;
  color: var(--ink);
  box-shadow: 0 2px 8px rgba(42, 34, 24, 0.08);
}

.mode-tab .emoji { font-size: 18px; }

/* ============ 練習モード（れんしゅう） ============ */
.training-panel {
  margin-bottom: 14px;
}

.training-list {
  background: white;
  border-radius: 16px;
  padding: 14px 12px;
  border: 2px solid var(--bg-deep);
}

.training-list-heading {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-soft);
  margin-bottom: 10px;
  text-align: center;
}

.training-filter {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}

.training-filter-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-mute);
}

.training-filter-row select {
  padding: 8px 6px;
  border-radius: 10px;
  border: 2px solid var(--bg-deep);
  background: var(--bg-soft);
  font-family: inherit;
  font-size: 13px;
  color: var(--ink);
  cursor: pointer;
}

.training-cards {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.training-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 10px;
  padding: 12px 14px;
  background: var(--bg-soft);
  border: 2px solid transparent;
  border-radius: 12px;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: all 0.2s;
}

.training-card:hover {
  border-color: var(--accent);
  background: white;
}

.training-card-title {
  grid-column: 1 / -1;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}

.training-card-tags {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 11px;
}

.training-tag {
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--bg-deep);
  color: var(--ink-mute);
  font-weight: 700;
}

.training-tag.style { background: var(--accent); color: white; }
.training-tag.difficulty { background: #dfe9f3; color: #1f3a52; }
.training-tag.length { background: var(--bg-deep); color: var(--ink-mute); }

.training-empty {
  padding: 18px 12px;
  text-align: center;
  color: var(--ink-mute);
  font-size: 13px;
}

.training-current {
  background: white;
  border-radius: 16px;
  padding: 14px 12px;
  border: 2px solid var(--bg-deep);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}

.training-current-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}

.training-back-btn {
  padding: 8px 12px;
  border-radius: 10px;
  border: 2px solid var(--accent);
  background: white;
  color: var(--accent-deep);
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.training-back-btn:hover { background: var(--bg-soft); }

.training-commentary {
  margin-bottom: 10px;
  padding: 10px 14px;
  background: #fff8e8;
  border: 2px solid var(--accent);
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink);
  min-height: 36px;
}

.training-commentary.off {
  background: #fdecec;
  border-color: var(--check);
  color: var(--check);
  font-weight: 700;
}

/* 問題未選択時のカード選択促し（#training-current の下に並ぶ） */
.training-prompt {
  margin-top: 8px;
  padding: 10px 14px;
  background: #fff8e8;
  border: 2px dashed var(--accent);
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-deep);
  animation: trainingPromptFloat 2.4s ease-in-out infinite;
}

.training-prompt-icon {
  font-size: 18px;
  line-height: 1;
}

@keyframes trainingPromptFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(2px); }
}

@media (prefers-reduced-motion: reduce) {
  .training-prompt { animation: none; }
}

/* ============ 難易度選択 ============ */
.difficulty-select {
  background: white;
  border-radius: 16px;
  padding: 14px 12px;
  margin-bottom: 14px;
  border: 2px solid var(--bg-deep);
}

.difficulty-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-soft);
  margin-bottom: 10px;
  text-align: center;
}

.difficulty-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.diff-btn {
  padding: 12px 6px;
  background: var(--bg-soft);
  border: 2px solid transparent;
  border-radius: 12px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-mute);
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.diff-btn .face { font-size: 24px; }

.diff-btn:hover:not(.active) { background: var(--bg-deep); }

.diff-btn.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
  transform: scale(1.03);
}

/* ============ 手番カラー選択 ============ */
.color-select {
  background: white;
  border-radius: 16px;
  padding: 14px 12px;
  margin-bottom: 14px;
  border: 2px solid var(--bg-deep);
}

.color-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-soft);
  margin-bottom: 10px;
  text-align: center;
}

.color-options {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
}

.color-btn {
  padding: 10px 4px;
  background: var(--bg-soft);
  border: 2px solid transparent;
  border-radius: 12px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-mute);
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.color-sample {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 900;
}

.color-btn:hover:not(.active) { background: var(--bg-deep); }

.color-btn.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

/* ============ ターンバナー ============ */
.turn-banner {
  text-align: center;
  margin-bottom: 12px;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink-soft);
  min-height: 24px;
}

.turn-banner .player-color {
  color: var(--ink);
  font-weight: 900;
  font-size: 18px;
}

.turn-banner.in-check {
  color: var(--check);
  animation: checkFlash 1s ease-in-out infinite;
}

@keyframes checkFlash {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* ============ プレイヤーカード ============ */
.vs-area {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.player-card {
  background: white;
  border-radius: 12px;
  padding: 8px 10px;
  text-align: center;
  border: 2px solid var(--bg-deep);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.player-card.active {
  border-color: var(--accent);
  box-shadow: 0 3px 10px rgba(217, 111, 87, 0.18);
}

.player-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.3;
}

.score-label {
  font-size: 11px;
  color: var(--ink-mute);
  font-weight: 700;
  margin-top: 2px;
}

.vs-mark {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 18px;
  color: var(--ink-mute);
  font-weight: 500;
}

/* ============ 持ち駒エリア ============ */
.hand-area {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-bottom: 14px;
}

.hand-card {
  background: rgba(255,255,255,0.92);
  border: 2px solid var(--bg-deep);
  border-radius: 16px;
  padding: 10px 12px;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 10px;
}

.hand-card.enemy { opacity: 0.86; }

.hand-label {
  font-size: 12px;
  font-weight: 900;
  color: var(--ink-soft);
  white-space: nowrap;
}

.captured-pieces {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  min-height: 32px;
}

.mini-piece {
  width: 32px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  cursor: pointer;
  transition: transform 0.15s;
}

.mini-piece img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 2px 2px rgba(42,34,24,0.16));
}

.hand-card.enemy .mini-piece img { transform: rotate(180deg); }

.mini-piece:hover { transform: scale(1.08); }

.mini-piece.selected {
  outline: 3px solid var(--accent);
  outline-offset: -2px;
  border-radius: 6px;
  background: rgba(217, 111, 87, 0.12);
}

.piece-count {
  position: absolute;
  bottom: -2px;
  right: -4px;
  font-size: 11px;
  color: var(--accent);
  font-weight: 900;
  background: white;
  border-radius: 999px;
  padding: 0 4px;
  line-height: 1.4;
  box-shadow: 0 1px 2px rgba(0,0,0,0.15);
}

/* ============ 盤面 ============ */
.board-container {
  position: relative;
  aspect-ratio: 1;
  width: 100%;
  margin-bottom: 18px;
}

.board-frame {
  position: absolute;
  inset: -14px;
  background:
    linear-gradient(135deg, var(--frame-light) 0%, var(--frame) 50%, var(--frame-light) 100%);
  border-radius: 12px;
  box-shadow:
    0 8px 24px rgba(42, 34, 24, 0.25),
    0 2px 6px rgba(42, 34, 24, 0.15);
}

.board-frame::before {
  content: '';
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(255, 230, 180, 0.2);
  border-radius: 6px;
}

.board {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 30% 20%, var(--board-light) 0%, transparent 58%),
    radial-gradient(ellipse at 76% 84%, var(--board-deep) 0%, transparent 60%),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.08) 0 2px, transparent 2px 18px),
    linear-gradient(135deg, var(--board) 0%, #c88b45 100%);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.2);
}

.board-grid {
  position: absolute;
  inset: 0;
  z-index: 2;
}

.board-grid svg { width: 100%; height: 100%; }

.cells {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  grid-template-rows: repeat(9, 1fr);
  z-index: 4;
}

/* ============ 対局開始前オーバーレイ ============ */
.pre-play-overlay {
  position: absolute;
  inset: -14px;
  z-index: 8;
  display: none;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(42, 34, 24, 0.42);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  box-shadow: inset 0 0 24px rgba(255, 230, 180, 0.18);
}

body.is-pre-play .pre-play-overlay {
  display: flex;
}

.pre-play-start {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 32px;
  font-family: inherit;
  font-size: 18px;
  font-weight: 900;
  color: white;
  background: var(--accent);
  border: 3px solid var(--accent-deep);
  border-radius: 999px;
  box-shadow: 0 8px 22px rgba(42, 34, 24, 0.35), 0 0 0 4px rgba(255, 255, 255, 0.18);
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

.pre-play-start:hover:not(:disabled) { background: var(--accent-deep); }
.pre-play-start:active:not(:disabled) { transform: translateY(1px); }
.pre-play-start:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  filter: grayscale(0.4);
  box-shadow: 0 4px 10px rgba(42, 34, 24, 0.25);
}

.pre-play-start .emoji {
  font-size: 20px;
  line-height: 1;
}

.cell {
  position: relative;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cell:hover::before {
  content: '';
  position: absolute;
  inset: 8%;
  border-radius: 10px;
  background: rgba(255,255,255,0.18);
  pointer-events: none;
}

.cell.candidate::after {
  content: '';
  position: absolute;
  inset: 6%;
  border-radius: 10px;
  background: rgba(255,255,255,0.10);
  pointer-events: none;
  z-index: 3;
}

.cell.last-move {
  background: rgba(217, 199, 106, 0.18);
}

/* 練習モード: 期待手の視覚ヒント
   - hint-from: 移動元（駒選択前）に透過赤を緩やかに点滅
   - hint-to:   行き先（駒選択後）に透過緑を恒常表示
   いずれも .cell:hover::before と同範囲（inset:8% / radius:10px）。
   :hover::before と擬似要素が衝突しないよう、専用 ::after ではなく独立クラスで擬似要素を生成。 */
.cell.training-hint-from::before,
.cell.training-hint-to::before {
  content: '';
  position: absolute;
  inset: 8%;
  border-radius: 10px;
  pointer-events: none;
  z-index: 2;
}

.cell.training-hint-from::before {
  background: rgba(217, 87, 87, 0.34);
  animation: trainingHintBlink 1.6s ease-in-out infinite;
}

.cell.training-hint-to::before {
  background: rgba(112, 176, 107, 0.34);
}

/* 持ち駒打ちの場合の移動元ヒント（mini-piece を背景点滅で示す） */
.mini-piece.training-hint-from {
  border-radius: 8px;
  background: rgba(217, 87, 87, 0.34);
  animation: trainingHintBlink 1.6s ease-in-out infinite;
}

@keyframes trainingHintBlink {
  0%, 100% { opacity: 0.40; }
  50%      { opacity: 0.95; }
}

@media (prefers-reduced-motion: reduce) {
  .cell.training-hint-from::before,
  .mini-piece.training-hint-from { animation: none; opacity: 0.7; }
}

.hint {
  position: absolute;
  width: 32%;
  height: 32%;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.36);
  border: 2px dashed rgba(255, 255, 255, 0.78);
  z-index: 5;
  pointer-events: none;
  animation: hintBounce 1.6s ease-in-out infinite;
}

@keyframes hintBounce {
  0%, 100% { transform: scale(1); opacity: 0.85; }
  50% { transform: scale(1.15); opacity: 1; }
}

.piece {
  width: 78%;
  height: 88%;
  position: relative;
  z-index: 5;
  user-select: none;
  filter: drop-shadow(0 3px 3px rgba(42,34,24,0.30));
}

.piece img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  pointer-events: none;
}

.piece.enemy img { transform: rotate(180deg); }

.piece.selected {
  outline: 3px solid var(--accent);
  outline-offset: -2px;
  border-radius: 8px;
  box-shadow: 0 0 0 6px rgba(217,111,87,0.18);
}

.piece.in-check {
  animation: kingFlash 0.8s ease-in-out infinite;
}

@keyframes kingFlash {
  0%, 100% { filter: drop-shadow(0 3px 3px rgba(42,34,24,0.30)); }
  50% { filter: drop-shadow(0 0 8px var(--check)) drop-shadow(0 0 4px var(--check)); }
}

/* ============ アクションボタン ============ */
.actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 24px;
}

.action-btn {
  padding: 16px 8px;
  background: white;
  border: 2px solid var(--bg-deep);
  border-radius: 16px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.action-btn:hover {
  background: var(--bg-soft);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(42, 34, 24, 0.1);
}

.action-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.action-btn .emoji { font-size: 26px; }

.action-btn.primary {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

.action-btn.primary:hover {
  background: var(--accent-deep);
  border-color: var(--accent-deep);
}

/* ============ ゲーム説明 ============ */
.game-info {
  background: white;
  border-radius: 16px;
  padding: 18px 20px;
  border: 2px solid var(--bg-deep);
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.7;
}

.game-info h2 {
  font-size: 18px;
  color: var(--ink);
  margin-bottom: 10px;
}

.game-info h3 {
  font-size: 15px;
  color: var(--ink);
  margin-top: 14px;
  margin-bottom: 6px;
}

.game-info p { margin-bottom: 8px; }

.game-info ul {
  padding-left: 20px;
}

.game-info li { margin-bottom: 4px; }

/* ============ モーダル ============ */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal[hidden] { display: none; }

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(42, 34, 24, 0.55);
  backdrop-filter: blur(2px);
}

.modal-panel {
  position: relative;
  z-index: 1;
  background: white;
  border-radius: 20px;
  padding: 28px 24px 22px;
  max-width: 360px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0,0,0,0.3);
}

.modal-title {
  font-size: 20px;
  font-weight: 900;
  color: var(--ink);
  margin-bottom: 14px;
}

.modal-list {
  text-align: left;
  padding-left: 22px;
  margin-bottom: 18px;
  color: var(--ink-soft);
  line-height: 1.8;
}

.result-emoji {
  font-size: 56px;
  margin: 8px 0;
}

.result-text {
  font-size: 22px;
  font-weight: 900;
  color: var(--ink);
  margin-bottom: 18px;
}

.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 14px;
}

.modal-btn {
  padding: 12px 22px;
  background: white;
  border: 2px solid var(--bg-deep);
  border-radius: 12px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  transition: all 0.2s;
}

.modal-btn:hover { background: var(--bg-soft); }

.modal-btn.primary {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

.modal-btn.primary:hover {
  background: var(--accent-deep);
  border-color: var(--accent-deep);
}

/* ============ サイトフッター ============ */
.site-footer {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 16px;
  font-size: 12px;
  color: var(--ink-mute);
}

/* ============ 開発フィードバックモーダル ============ */
#modal-feedback .modal-panel {
  max-width: 460px;
  width: 92%;
  text-align: left;
}
.feedback-note {
  margin: 0 0 12px;
  font-size: 12px;
  color: var(--ink-mute, #6b5d49);
  line-height: 1.55;
}
.feedback-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
}
#feedback-comment {
  width: 100%;
  box-sizing: border-box;
  min-height: 110px;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.55;
  border: 1px solid var(--ink-mute, #b8a98c);
  border-radius: 8px;
  background: #fff;
  color: var(--ink, #2a2218);
  resize: vertical;
}
#feedback-comment:focus {
  outline: 2px solid var(--accent-mid, #d9a65f);
  outline-offset: 1px;
}
.feedback-counter {
  margin-top: 4px;
  text-align: right;
  font-size: 11px;
  color: var(--ink-mute, #6b5d49);
}
.feedback-status {
  margin: 10px 0 4px;
  min-height: 1.2em;
  font-size: 13px;
  text-align: center;
  color: var(--ink-mute, #6b5d49);
}
.feedback-status.error { color: #b03030; font-weight: 600; }
.feedback-status.success { color: #2f7a3a; font-weight: 600; }

/* ============ レスポンシブ ============ */
@media (max-width: 480px) {
  .stage { padding: 16px 12px 24px; }
  .title { font-size: 26px; }
  .title-koma { width: 24px; height: 29px; font-size: 12px; }
  .player-name { font-size: 14px; }
  .actions { gap: 6px; }
  .action-btn { font-size: 12px; padding: 12px 4px; }
  .action-btn .emoji { font-size: 20px; }
  .diff-btn { font-size: 12px; }
  .diff-btn .face { font-size: 22px; }
  .hand-card { padding: 9px 10px; }
  .mini-piece { width: 28px; height: 32px; }
  .game-info { padding: 14px 16px; font-size: 13px; }
}
