/* theme.css — クルマ道 共通ポリッシュ層
   各ページのインライン<style>の後に読み込むこと（同一詳細度なら後勝ち） */

/* ===== ベース ===== */
html { scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
* { -webkit-tap-highlight-color: transparent; }
::selection { background: rgba(37,99,235,.18); }

/* ===== フォーム：フォーカスリング統一 ===== */
input[type="number"]:focus,
input[type="text"]:focus,
input[type="tel"]:focus,
select:focus,
textarea:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37,99,235,.13);
  outline: none;
}
select { cursor: pointer; }

/* キーボード操作時のみボタン・リンクにリング表示 */
button:focus-visible,
a:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
  border-radius: 6px;
}
button:focus:not(:focus-visible) { outline: none; }

/* ===== カード：立体感の統一 ===== */
.card {
  border: 1px solid #e9edf4;
  box-shadow: 0 1px 2px rgba(15,23,42,.04), 0 6px 20px rgba(15,23,42,.05);
  transition: box-shadow .25s ease;
}

/* ===== ボタン：押下フィードバック統一 ===== */
button {
  touch-action: manipulation;
  transition: background .15s, transform .1s, box-shadow .15s;
}
button:active { transform: scale(.975); }

/* ===== テーブル：数字の桁揃え・行の視認性 ===== */
table { font-variant-numeric: tabular-nums; }
tbody tr { transition: background .12s; }

/* ===== リンク ===== */
a { transition: color .15s, background .15s, opacity .15s; }

/* ===== スクロールバー（PC） ===== */
@media (min-width: 768px) {
  ::-webkit-scrollbar { width: 10px; height: 10px; }
  ::-webkit-scrollbar-track { background: transparent; }
  ::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 5px; }
  ::-webkit-scrollbar-thumb:hover { background: #94a3b8; }
}

/* ===== アクセシビリティ：動きを減らす設定を尊重 ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  html { scroll-behavior: auto; }
}
