body {
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", sans-serif;
}
.note-memo {
  resize: vertical;
}
.hidden {
  display: none;
}
.auth-page {
  max-width: 360px;
  margin: 60px auto;
  padding: 24px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.auth-page h1 {
  font-size: 1.5rem;
  font-weight: bold;
  text-align: center;
}
.auth-page .sub {
  text-align: center;
  color: #6b7280;
  font-size: 0.85rem;
  margin-bottom: 16px;
}
.auth-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}
.auth-tab {
  flex: 1;
  padding: 8px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: white;
}
.auth-tab.active {
  background: #111827;
  color: white;
  border-color: #111827;
}
.field-label {
  display: block;
  font-size: 0.85rem;
  margin-top: 12px;
  margin-bottom: 4px;
  color: #374151;
}
#login-form input, #register-form input {
  width: 100%;
  padding: 8px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
}
.auth-hint {
  font-size: 0.75rem;
  color: #9ca3af;
  margin-top: 2px;
}
.btn-primary {
  width: 100%;
  margin-top: 16px;
  padding: 10px;
  background: #111827;
  color: white;
  border-radius: 8px;
  font-weight: 600;
}
.auth-error {
  color: #dc2626;
  font-size: 0.85rem;
  margin-top: 8px;
  text-align: center;
}

/* 文字サイズ切り替え */
.font-size-btn.active {
  background: #111827;
  color: white;
}
#raceDetail.fs-sm { font-size: 0.8rem; }
#raceDetail.fs-md { font-size: 1rem; }
#raceDetail.fs-lg { font-size: 1.2rem; }
#raceDetail.fs-xl { font-size: 1.45rem; }
#raceDetail.fs-sm .car-num { font-size: 1rem; }
#raceDetail.fs-lg .car-num { font-size: 1.4rem; }
#raceDetail.fs-xl .car-num { font-size: 1.7rem; }

.video-wrap {
  display: flex;
  justify-content: center;
}
.video-wrap video {
  max-width: 640px;
  width: 100%;
}

/* 出走表: em相対サイズ(fs-*と連動するため rem ではなく em を使う) */
.rd-title { font-size: 1.25em; font-weight: 700; margin-bottom: 0.25em; }
.rd-meta-chip { font-size: 0.85em; color: #4b5563; background: #f3f4f6; border-radius: 9999px; padding: 0.2em 0.7em; }
.rd-table-head th { font-size: 0.8em; color: #6b7280; font-weight: 600; text-align: left; }
.rd-row td { padding-top: 0.6em; padding-bottom: 0.6em; }
.rd-name { font-size: 1.05em; font-weight: 600; }
.rd-sub { font-size: 0.85em; color: #9ca3af; }
.rd-time { font-size: 0.9em; color: #0f766e; font-weight: 500; }
.rd-time b { font-size: 1.1em; }
.rd-memo { font-size: 0.95em; resize: vertical; }
.tag-btn { font-size: 0.85em; }

/* 車番バッジ */
.car-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.2em;
  height: 2.2em;
  border-radius: 9999px;
  font-weight: 800;
  font-size: 1em;
}

/* 着順バッジ */
.order-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.4em;
  height: 1.8em;
  border-radius: 9999px;
  font-weight: 700;
  font-size: 0.85em;
  padding: 0 0.4em;
}

/* 動画プレイヤー */
.video-wrap video {
  max-width: 640px;
  width: 100%;
  border-radius: 12px;
}

/* 動画コントロール(シンプル版) */
.video-wrap {
  position: sticky;
  top: 0;
  z-index: 20;
  background: #f3f4f6;
  padding-top: 4px;
  padding-bottom: 8px;
}
.video-inner {
  max-width: 640px;
  width: 100%;
}
.video-inner video {
  width: 100%;
  border-radius: 12px 12px 0 0;
  display: block;
}
.video-controls {
  display: flex;
  justify-content: center;
  background: #111827;
  padding: 6px;
  border-radius: 0 0 12px 12px;
}
.vc-btn {
  color: #e5e7eb;
  background: #1f2937;
  border: 1px solid #374151;
  border-radius: 6px;
  padding: 4px 14px;
  font-size: 0.85rem;
}
.vc-btn:hover { background: #374151; }
.vc-btn.active { background: #2563eb; border-color: #2563eb; color: white; }

/* お気に入り星 */
.fav-star {
  font-size: 1em;
  color: #d1d5db;
  vertical-align: middle;
}
.fav-star.active {
  color: #f59e0b;
}

/* 節内合計バッジ */
.meeting-badge {
  font-size: 0.75em;
  border-radius: 9999px;
  padding: 0.1em 0.5em;
  margin-left: 0.3em;
  vertical-align: middle;
}
.meeting-badge.pos { background: #dbeafe; color: #1d4ed8; }
.meeting-badge.neg { background: #fee2e2; color: #b91c1c; }

/* 評価ボタン(-2〜+2) */
.score-btn {
  font-size: 0.85em;
  min-width: 2.2em;
  padding: 0.15em 0;
  text-align: center;
  border-radius: 6px;
  border: 1px solid #d1d5db;
  background: white;
  color: #6b7280;
}
.score-btn:hover { background: #f3f4f6; }
.score-btn.active {
  background: #111827;
  color: white;
  border-color: #111827;
}
