:root {
  /* 基本カラー */
  --color-bg: #020617;            /* ほぼ黒に近いネイビー */
  --color-bg-alt: #020818;        /* 少しだけ明るい差分背景 */
  --color-surface: #0b1120;       /* カードなどの面 */
  --color-surface-soft: #111827;  /* サブカードなど */
  --color-accent: #38bdf8;        /* 落ち着いたシアン */
  --color-accent-soft: rgba(56, 189, 248, 0.15);
  --color-text: #e5e7eb;          /* 文字色（白より少し落ち着き） */
  --color-text-sub: #9ca3af;      /* 補足文字 */
  --color-border: #1f2937;
  --color-positive: #4ade80;
  --color-negative: #fb7185;

  --radius-lg: 16px;
  --radius-md: 10px;
  --radius-sm: 6px;

  --shadow-soft: 0 18px 40px rgba(15, 23, 42, 0.75);
  --shadow-card: 0 12px 30px rgba(15, 23, 42, 0.85);

  --container-width: 1100px;
}

/* RESET / BASE ------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: 1.7;
}

/* スクロールバー（お好みで） */

body::-webkit-scrollbar {
  width: 8px;
}

body::-webkit-scrollbar-track {
  background: #020617;
}

body::-webkit-scrollbar-thumb {
  background: #1e293b;
  border-radius: 999px;
}

/* LINKS -------------------------------------- */

a {
  color: var(--color-accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* TYPOGRAPHY -------------------------------- */

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0 0 12px;
  line-height: 1.3;
  color: #f9fafb;
}

p {
  margin: 0 0 12px;
  color: var(--color-text);
}

.small {
  font-size: 13px;
}

/* LAYOUT UTILITIES --------------------------- */

.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 16px;
}

.section {
  padding: 64px 0;
  background-color: var(--color-bg);
}

.section-alt {
  padding: 64px 0;
  background-color: var(--color-bg-alt);
}

.section-header {
  text-align: center;
  margin-bottom: 40px;
}

.section-header p {
  color: var(--color-text-sub);
}

/* BUTTONS ------------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, #1d4ed8, #38bdf8);
  color: #0b1120;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.35);
  transition: transform 0.15s ease-out, box-shadow 0.15s ease-out, opacity 0.15s ease-out;
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 36px rgba(37, 99, 235, 0.5);
  opacity: 0.96;
}

.btn:active {
  transform: translateY(0);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.8);
  opacity: 0.9;
}

.btn-outline {
  background: transparent;
  border: 1px solid #64748b;
  color: #e5e7eb;
  box-shadow: none;
}

.btn-outline:hover {
  background: rgba(148, 163, 184, 0.12);
  box-shadow: none;
}

.btn.small {
  padding: 6px 14px;
  font-size: 13px;
}

/* HEADER ------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: linear-gradient(to bottom, rgba(15, 23, 42, 0.9), rgba(2, 6, 23, 0.98));
  border-bottom: 1px solid rgba(15, 23, 42, 0.9);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  padding: 0;
  background: transparent; /* 馬ロゴ画像用 */
  border: 1px solid rgba(148, 163, 184, 0.6);
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.9);
  overflow: hidden;
}

.logo-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.logo-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.logo-name {
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.04em;
  color: #f9fafb;
}

.logo-sub {
  font-size: 11px;
  color: #9ca3af;
}

/* NAV ---------------------------------------- */

.nav {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 14px;
}

.nav a {
  color: #e5e7eb;
  text-decoration: none;
  position: relative;
  padding-bottom: 2px;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 1px;
  background: linear-gradient(to right, #38bdf8, #22c1e5);
  transition: width 0.16s ease-out;
}

.nav a:hover::after {
  width: 100%;
}

.nav .btn-outline.small {
  margin-left: 4px;
}

/* HERO --------------------------------------- */

.hero {
  padding: 40px 0 52px;
  background: radial-gradient(circle at top, #082f49 0, #020617 45%, #020617 100%);
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 32px;
  align-items: center;
}

.hero-text h1 {
  font-size: 30px;
  margin-bottom: 18px;
}

.hero-text .accent {
  background: linear-gradient(135deg, #38bdf8, #22c1e5);
  -webkit-background-clip: text;
  color: transparent;
}

.hero-lead {
  font-size: 14px;
  color: var(--color-text-sub);
  max-width: 640px;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0 10px;
}

.hero-note {
  font-size: 12px;
  color: var(--color-text-sub);
}

/* HERO CARD */

.hero-card {
  background: radial-gradient(circle at 30% 0%, #38bdf8, #0b1120 55%, #020617 100%);
  border-radius: 18px;
  padding: 20px 20px 22px;
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(148, 163, 184, 0.7);
  position: relative;
  overflow: hidden;
}

.hero-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top left, #0b1120 0, #020617 65%);
  opacity: 0.65;
  pointer-events: none;
}

.hero-card > * {
  position: relative;
  z-index: 1;
}

.hero-card h2 {
  font-size: 16px;
  margin-bottom: 16px;
}

.hero-card-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.hero-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 16px;
}

.hero-summary .label {
  font-size: 11px;
  color: #cbd5f5;
}

.hero-summary .value {
  font-size: 14px;
  font-weight: 600;
  color: #f9fafb;
}

.hero-card-footnote {
  font-size: 12px;
  color: #dbeafe;
}

/* GRID LAYOUT ------------------------------- */

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.grid-1 {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

/* CARD -------------------------------------- */

.card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: 20px 20px 22px;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--color-border);
}

.card h3 {
  font-size: 16px;
  margin-bottom: 8px;
}

.card p {
  font-size: 13px;
  color: var(--color-text-sub);
}

/* LISTS ------------------------------------- */

.list-check {
  padding-left: 0;
  list-style: none;
  margin: 12px 0;
  font-size: 13px;
  color: var(--color-text-sub);
}

.list-check li {
  position: relative;
  padding-left: 18px;
  margin-bottom: 6px;
}

.list-check li::before {
  content: "✔";
  position: absolute;
  left: 0;
  top: 0;
  font-size: 11px;
  color: var(--color-accent);
}

/* TABLES ------------------------------------ */
/* TABLES ------------------------------------ */

.table-wrapper {
  width: 100%;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

thead {
  background: #020617;
}

thead th {
  padding: 8px 10px;
  text-align: left;
  font-weight: 600;
  color: #e5e7eb;
  border-bottom: 1px solid var(--color-border);
}

tbody td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--color-border);
}

/* ★交互色（ストライプ） */
tbody tr:nth-child(odd) {
  background: rgba(2, 6, 23, 0.55);   /* 既存のbgに馴染む */
}

tbody tr:nth-child(even) {
  background: rgba(15, 23, 42, 0.55); /* 少しだけ明るいネイビー */
}

/* ★ホバーで軽く強調（見やすさUP） */
tbody tr:hover {
  background: rgba(56, 189, 248, 0.10);
}

/* 取消行は少し薄く（既にclass付与してるので活きる） */
tbody tr.is-cancelled {
  opacity: 0.75;
}

tbody tr:last-child td {
  border-bottom: none;
}

.muted {
  color: var(--color-text-sub);
}

/* PLANS ------------------------------------- */

.plan-card {
  position: relative;
}

.plan-price {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
  color: #e5e7eb;
}

.plan-note {
  font-size: 12px;
  color: var(--color-text-sub);
}

.plan-card-highlight {
  border: 1px solid rgba(56, 189, 248, 0.9);
  box-shadow: 0 20px 40px rgba(56, 189, 248, 0.25);
}

.badge {
  position: absolute;
  top: 14px;
  right: 16px;
  background: rgba(56, 189, 248, 0.12);
  color: #e0f2fe;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 11px;
  border: 1px solid rgba(125, 211, 252, 0.6);
}

/* FAQ --------------------------------------- */

.faq-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

/* FOOTER ------------------------------------ */

.site-footer {
  padding: 32px 0 24px;
  background: linear-gradient(to top, #020617, #020617);
  border-top: 1px solid rgba(15, 23, 42, 0.9);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.footer-left {
  max-width: 420px;
}

.footer-logo .logo-mark {
  width: 32px;
  height: 32px;
  border-radius: 50%;
}

.footer-logo .logo-name {
  font-size: 15px;
}

.footer-logo .logo-sub {
  font-size: 11px;
}

.footer-note {
  font-size: 12px;
  color: var(--color-text-sub);
  margin-top: 6px;
}

.footer-right {
  text-align: right;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
  margin-bottom: 6px;
}

.footer-nav a {
  font-size: 12px;
  color: #e5e7eb;
}

.footer-copy {
  font-size: 11px;
  color: #6b7280;
}

/* MISC -------------------------------------- */

.section-note {
  font-size: 12px;
  color: var(--color-text-sub);
  text-align: center;
  margin-top: 16px;
}

/* RESPONSIVE -------------------------------- */

@media (max-width: 960px) {
  .hero-inner {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-card {
    order: 2;
  }

  .hero-text {
    order: 1;
  }

  .grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .faq-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .header-inner {
    flex-wrap: wrap;
    gap: 12px;
  }

  .nav {
    justify-content: flex-end;
    flex-wrap: wrap;
    row-gap: 4px;
  }
}

@media (max-width: 720px) {
  .section,
  .section-alt {
    padding: 46px 0;
  }

  .hero {
    padding: 28px 0 40px;
  }

  .hero-text h1 {
    font-size: 24px;
  }

  .hero-lead {
    font-size: 13px;
  }

  .hero-card {
    padding: 16px 16px 18px;
  }

  .hero-summary {
    grid-template-columns: minmax(0, 1fr);
  }

  .grid-2,
  .grid-3 {
    grid-template-columns: minmax(0, 1fr);
  }

  .header-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav {
    width: 100%;
    justify-content: flex-start;
  }

  .footer-inner {
    flex-direction: column;
  }

  .footer-right {
    text-align: left;
  }

  .footer-nav {
    justify-content: flex-start;
  }
}
/* ==========================
   カード枠色を配信イメージと揃える
   ========================== */

.card,
.plan-card {
  border: 1px solid rgba(148, 163, 184, 0.7);
}
/* ==========================================
   全カードの枠線を「配信イメージ」と完全に統一
   ========================================== */

.card,
.plan-card {
  border: 1px solid rgba(148, 163, 184, 0.7) !important;
}
/* ==========================================
   サイト名のほのかなネオン効果
   ========================================== */

.logo-text .logo-name {
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #f9fafb;
  text-shadow:
    0 0 6px rgba(56, 189, 248, 0.6),
    0 0 18px rgba(56, 189, 248, 0.45);
}

/* サブタイトルは控えめに */
.logo-text .logo-sub {
  color: #9ca3af;
  text-shadow: 0 0 6px rgba(15, 23, 42, 0.8);
}
/* =====================================================
   ヘッダーナビ：文字の後ろが青く発光するラディアルグラデーション
   ===================================================== */

.nav {
  display: flex;
  align-items: center;
  gap: 4px; /* スマホで詰まりすぎない程度に */
  flex-wrap: wrap;
}

/* 通常状態 */
.nav a {
  position: relative;
  padding: 4px 10px;
  margin: 0 2px;
  border-radius: 999px;
  font-size: 13px;
  color: #e5e7eb;
  white-space: nowrap;
  text-decoration: none;

  /* 中心だけ光って外側に向かって暗くなる効果 */
  background: radial-gradient(
    circle at center,
    rgba(56, 189, 248, 0.35) 0%,   /* 中心：明るいシアン */
    rgba(56, 189, 248, 0.15) 40%,  /* 中間：少し暗く */
    rgba(2, 6, 23, 0) 100%         /* 外側：背景に溶け込む */
  );

  transition: background 0.2s ease, color 0.2s ease;
}

/* 下線アニメーションは不要なので消す */
.nav a::after {
  display: none;
}

/* ホバー時：光が少し強くなる */
.nav a:hover {
  background: radial-gradient(
    circle at center,
    rgba(56, 189, 248, 0.55) 0%,
    rgba(56, 189, 248, 0.25) 40%,
    rgba(2, 6, 23, 0) 100%
  );
  color: #f8fafc;
}

/* アクティブ（現在ページ）は常に一段明るく */
.nav a.active {
  background: radial-gradient(
    circle at center,
    rgba(56, 189, 248, 0.75) 0%,
    rgba(56, 189, 248, 0.35) 40%,
    rgba(2, 6, 23, 0) 100%
  );
  color: #e0faff;
  font-weight: 600;
}
/* ==========================================
   ヘッダーナビをシンプルなテキストスタイルに戻す
   （サイト名のネオンはこのまま活かす）
   ========================================== */

.nav {
  display: flex;
  align-items: center;
  gap: 16px;               /* PC時の適度な間隔 */
  font-size: 14px;
  flex-wrap: wrap;
}

.nav a:not(.btn):not(.btn-outline) {
  position: relative;
  padding: 0;
  margin: 0;
  border-radius: 0;
  background: transparent !important;
  color: #e5e7eb;
  white-space: nowrap;
  text-decoration: none;
  transition: color 0.15s ease;
}

/* 下線アニメーションを復活させる */
.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 1px;
  background: linear-gradient(to right, #22d3ee, #38bdf8);
  transition: width 0.16s ease-out;
}

.nav a:hover::after {
  width: 100%;
}

/* アクティブ状態（現在ページ）は文字色だけ強調 */
.nav a.active {
  color: #e0f2fe;
  font-weight: 600;
}
/* ==========================================
   明るめAIブルー × 控えめ発光 × 白文字
   ========================================== */

.hero-btn-primary {
  display: inline-block;
  padding: 13px 32px;
  border-radius: 12px;
  font-size: 1.12rem;
  font-weight: 600;

  /* 明るいブルーの弱発光グラデーション */
  background: radial-gradient(
      circle at 50% 50%,
      rgba(185, 252, 255, 0.85) 0%,
      rgba(135, 236, 255, 0.75) 40%,
      rgba(95, 210, 255, 0.55) 100%
  );

  /* ★ フォントカラーを白に設定！ */
  color: #ffffff;

  /* 透明感のある上品な光 */
  box-shadow:
    0 0 10px rgba(150, 240, 255, 0.35),
    0 0 22px rgba(150, 240, 255, 0.20);

  text-shadow: 0 0 4px rgba(0, 0, 0, 0.25);

  transition: 0.25s ease-out;
}

/* ホバー時：光が少し強くなる */
.hero-btn-primary:hover {
  background: radial-gradient(
      circle at 50% 50%,
      rgba(215, 255, 255, 1) 0%,
      rgba(165, 245, 255, 0.9) 40%,
      rgba(115, 220, 255, 0.6) 100%
  );

  box-shadow:
    0 0 16px rgba(180, 250, 255, 0.45),
    0 0 30px rgba(150, 240, 255, 0.25);

  transform: translateY(-1px) scale(1.02);
}
/* ==========================================
   トップページ主要セクションの色合いを統一
   （K-Valueとは / 特徴 / ロジック / サンプル / 料金 / FAQ）
   ========================================== */

#about,
#features,
#logic,
#sample,
#plans,
#faq {
  background-color: var(--color-bg-alt);  /* ダークネイビー寄りに統一 */
}

/* セクション内のカード類はすべて共通カードデザインを適用 */
#about .card,
#features .card,
#logic .card,
#sample .card,
#plans .card,
#faq .card {
  background: var(--color-surface);
  border: 1px solid rgba(148, 163, 184, 0.7);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.85);
}

/* セクションタイトル周りのテキストトーンも統一 */
#about .section-header p,
#features .section-header p,
#logic .section-header p,
#sample .section-header p,
#plans .section-header p,
#faq .section-header p {
  color: var(--color-text-sub);
}
.center-wrapper {
  display: flex;
  justify-content: center;
}
.center-wrapper .card {
  text-align: center;
}

.btn.btn-outline.small {
  border-radius: 999px !important;
}

/* ================================
   Login / Signup 共通スタイル
   ================================ */

/* ログイン・会員登録ページの背景レイアウト */
body.auth-page {
  min-height: 100vh;
  margin: 0;
  background: radial-gradient(circle at top, #082f49 0, #020617 45%, #020617 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--color-text);
}

/* 中央のカード */
.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: 24px 22px 28px;
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(148, 163, 184, 0.7);
}

/* タイトル・サブタイトル */
.auth-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 6px;
  text-align: center;
  color: #f9fafb;
}

.auth-subtitle {
  font-size: 13px;
  color: var(--color-text-sub);
  text-align: center;
  margin-bottom: 20px;
}

/* フォーム */
.auth-form-group {
  margin-bottom: 16px;
}

.auth-form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--color-text-sub);
}

.auth-input {
  width: 100%;
  padding: 10px 11px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background-color: #020617;
  color: var(--color-text);
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.auth-input::placeholder {
  color: #6b7280;
}

.auth-input:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.5);
  background-color: #020617;
}

/* 送信ボタン（既存 .btn 系とトーンを合わせたフル幅） */
.auth-submit {
  width: 100%;
  margin-top: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 11px 20px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, #1d4ed8, #38bdf8);
  color: #0b1120;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.35);
  transition: transform 0.15s ease-out, box-shadow 0.15s ease-out, opacity 0.15s ease-out;
}

.auth-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 36px rgba(37, 99, 235, 0.5);
  opacity: 0.96;
}

.auth-submit:active {
  transform: translateY(0);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.8);
  opacity: 0.9;
}

/* 下部リンク */
.auth-links {
  margin-top: 18px;
  font-size: 13px;
  text-align: center;
  color: var(--color-text-sub);
}

.auth-links a {
  color: var(--color-accent);
  font-weight: 500;
  text-decoration: none;
}

.auth-links a:hover {
  text-decoration: underline;
}

.auth-links .auth-register-link {
  color: var(--color-accent);
  font-weight: 600;
  margin-left: 4px;
}

.auth-links .auth-register-link:hover {
  text-decoration: underline;
  color: #7dd3fc;
}

/* メール確認ページ用の補足テキスト */
.auth-note {
  margin-top: 16px;
  font-size: 12px;
  color: var(--color-text-sub);
  line-height: 1.6;
  text-align: left;
}

/* 「確認コードを再送信」リンクの見た目 */
.auth-resend-link {
  color: var(--color-accent);
  font-weight: 600;
  text-decoration: none;
}

.auth-resend-link:hover {
  text-decoration: underline;
  color: #7dd3fc;
}

/* ================================
   未加入ユーザー向けロック表示
   ================================ */

.locked-section {
  position: relative;
  overflow: hidden;
}

/* 中身をぼかす */
.locked-section .locked-content {
  filter: blur(4px);
  pointer-events: none;
}

/* 上からかぶせるオーバーレイ */
.locked-section .locked-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: rgba(15, 23, 42, 0.9);  /* 濃いネイビーの半透明 */
  text-align: center;
}

.locked-section .locked-overlay p {
  margin: 0;
  font-size: 14px;
  color: #e5e7eb;
}

/* パスワード表示トグル用 */
.password-field {
  display: flex;
  align-items: center;
  gap: 8px;
}

.password-field .auth-input {
  flex: 1;
}

.password-toggle {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: #020617;
  color: var(--color-text-sub);
  font-size: 11px;
  cursor: pointer;
}

.password-toggle:hover {
  border-color: #38bdf8;
  color: #e5e7eb;
}

/* フォームエラー（確認コードなど） */
.form-error {
  font-size: 12px;
  color: #f87171;
  margin: 4px 0 0;
  text-align: left;
}

.form-info {
  font-size: 12px;
  color: #38bdf8;  /* 水色系: 好きに変えてOK */
  margin: 4px 0 0;
  text-align: left;
}

.plan-join-single {
  max-width: 720px;
  margin: 0 auto;
}

.plan-divider {
  margin: 16px 0;
  border: none;
  border-top: 1px solid var(--color-border-soft, #1e293b);
}

/* 解約ページなどカード縦並びの余白を増やす */
.cancel-section .card {
  margin-bottom: 32px; /* 欲しければ 40px にしても良い */
}

.card h3 { font-size: 18px; }

/* 開催地ごとの列（netkeibaっぽく） */
.race-columns{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(240px, 1fr));
  gap:14px;
}

.venue-col{
  border:1px solid rgba(255,255,255,0.12);
  border-radius:12px;
  padding:12px;
  background:rgba(0,0,0,0.15);
}

.venue-head{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  margin-bottom:10px;
}
.venue-title{
  font-weight:700;
  font-size:16px;
}
.venue-meta{
  opacity:0.75;
  font-size:12px;
}

.race-list{
  display:flex;
  flex-direction:column;
  gap:8px;
}

.race-card{
  display:flex;
  gap:10px;
  align-items:center;
  padding:10px 10px;
  border-radius:10px;
  border:1px solid rgba(255,255,255,0.10);
  background:rgba(0,0,0,0.18);
  cursor:pointer;
  user-select:none;
  transition:transform .05s ease, background .12s ease;
}
.race-card:hover{
  background:rgba(255,255,255,0.06);
}
.race-card:active{
  transform:scale(0.99);
}

.race-badge{
  min-width:40px;
  height:32px;
  border-radius:8px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:800;
  background:rgba(255,255,255,0.10);
}

.race-main{
  flex:1;
  min-width:0;
}
.race-name{
  font-weight:700;
  font-size:13px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.race-sub{
  margin-top:2px;
  font-size:12px;
  opacity:0.80;
  display:flex;
  gap:10px;
}
.race-sub span{
  white-space:nowrap;
}

.date-nav{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  margin: 10px 0 16px;
}
.date-btn{
  padding:8px 10px;
  border-radius:10px;
  border:1px solid rgba(255,255,255,0.14);
  background:rgba(255,255,255,0.06);
  color:#fff;
  cursor:pointer;
  font-size:12px;
}
.date-btn.active{
  background:rgba(255,255,255,0.14);
  border-color:rgba(255,255,255,0.25);
}

.week-arrow{
  width:42px;
  height:38px;
  border-radius:10px;
  border:1px solid rgba(255,255,255,0.14);
  background:rgba(255,255,255,0.06);
  color:#fff;
  cursor:pointer;
  font-size:18px;
  line-height:1;
}
.week-arrow:hover{ background:rgba(255,255,255,0.10); }

.week-tabs{
  display:flex;
  gap:8px;
  overflow-x:auto;               /* ★横スクロールOK */
  -webkit-overflow-scrolling:touch;
  scrollbar-width:none;          /* Firefox */
  border-radius:12px;
  border:1px solid rgba(255,255,255,0.14);
}
.week-tabs::-webkit-scrollbar{ display:none; } /* Chrome/Safari */

.week-btn{
  flex:0 0 auto;                 /* ★縮めない */
  white-space:nowrap;
  min-width:92px;                /* ★スマホでも3つ見やすい */
  padding:10px 12px;             /* 少しコンパクト */
  border:none;
  background:rgba(255,255,255,0.06);
  color:#fff;
  cursor:pointer;
  font-size:13px;
  font-weight:700;
}

.week-btn + .week-btn{
  border-left:1px solid rgba(255,255,255,0.12);
}
.week-btn.active{
  background:rgba(56,189,248,0.25);
}

.race-card { display:flex; align-items:flex-start; gap:12px; }
.race-main { flex:1; }
.race-actions { display:flex; flex-direction:column; gap:8px; align-items:flex-end; }
.race-actions .btn.small { padding:6px 10px; font-size:12px; }

.points-badge{
  display:inline-flex;
  align-items:center;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,0.18);
  background:rgba(56,189,248,0.10);
  font-size:12px;
  font-weight:700;
  color:#e5e7eb;
}




/* ===== plan_join (Phase2) ===== */
.notice-box{
  border:1px solid rgba(0,0,0,.08);
  background: rgba(0,0,0,.03);
  border-radius: 12px;
  padding: 12px 14px;
  margin: 12px 0 16px;
}

.plans-grid{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

@media (max-width: 980px){
  .plans-grid{ grid-template-columns: 1fr; }
}

/* =========================
   home.html クイックメニュー調整
   ========================= */

/* クイックメニュー内の2カードを詰める */
#quick-hub .grid-2{
  gap: 12px !important;
}

/* クイックメニュー内のサブカードの余白を小さく */
#quick-hub .card{
  padding: 14px 14px 16px !important;
}

/* 見出し少し小さく */
#quick-hub .card h3{
  font-size: 15px !important;
  margin-bottom: 6px !important;
}

/* ボタンはカード幅いっぱいにして折り返し事故を防ぐ */
#quick-hub .btn,
#quick-hub .btn.btn-outline{
  width: 100%;
  justify-content: center;
  white-space: nowrap;
}

/* 2ボタン縦積みの間隔を安定させる */
#quick-hub #btn-point-shop{
  margin-bottom: 8px;
}

/* クイックメニュー上部の4項目も少し詰める */
#quick-hub .hero-summary{
  gap: 8px 12px !important;
}

/* =========================
   ヘッダー 表示統一（index.html基準）
   ========================= */

/* ナビ全体 */
.site-header .nav {
  display: flex;
  align-items: center;
  gap: 20px;
}

/* ナビリンク（文字） */
.site-header .nav a {
  font-size: 14px;              /* index.htmlに合わせる */
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1;
  color: var(--color-text-main);
}

/* ホバー時 */
.site-header .nav a:hover {
  opacity: 0.8;
}

/* ヘッダーボタン（ログアウト / ポイントなど） */
.site-header .nav .btn,
.site-header .nav button {
  font-size: 13px;
  font-weight: 500;
  padding: 6px 12px;
  line-height: 1.2;
}

/* 残高バッジ */
.site-header .points-badge {
  font-size: 13px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 999px;
}

/* ロゴ文字 */
.site-header .logo-name {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.site-header .logo-sub {
  font-size: 11px;
  opacity: 0.8;
}

/* ロゴをリンクにしても見た目を変えない */
.logo-link {
  text-decoration: none;
  color: inherit;
  display: inline-flex;
  align-items: center;
}

.logo-link:hover {
  opacity: 0.9; /* ほんのり反応するだけ */
}

/* =========================
   ロゴリンクの下線を完全に無効化
   ========================= */

.logo-link,
.logo-link * {
  text-decoration: none !important;
}

/* hover時も下線を出さない */
.logo-link:hover,
.logo-link:hover * {
  text-decoration: none !important;
}

/* ===== Points Buy ===== */
.page-header { margin: 18px 0 10px; }
.page-title { font-size: 22px; margin: 0; }
.page-subtitle { margin: 6px 0 0; color: var(--color-text-sub); }

.section-title { margin: 0 0 10px; font-size: 16px; }

.kv-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.kv-label { font-size: 12px; color: var(--color-text-sub); margin-bottom: 4px; }
.kv-value { font-size: 18px; font-weight: 700; }

.note-box {
  border: 1px solid var(--color-border);
  background: var(--color-surface-soft);
  border-radius: 12px;
  padding: 10px 12px;
}
.note-text { margin: 0; color: var(--color-text-sub); font-size: 13px; line-height: 1.6; }

.packages { display: grid; gap: 10px; }
.package {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px;
  border: 1px solid var(--color-border);
  border-radius: 14px;
  background: var(--color-surface);
}
.package-price { font-size: 18px; font-weight: 800; }
.package-meta { font-size: 13px; color: var(--color-text-sub); margin-top: 2px; }

.disclaimer-title { margin: 0 0 6px; font-weight: 800; font-size: 13px; }
.disclaimer-text { margin: 0; color: var(--color-text-sub); font-size: 13px; line-height: 1.7; }

@media (max-width: 720px) {
  .kv-row { grid-template-columns: 1fr; }
  .package { flex-direction: column; align-items: stretch; gap: 10px; }
}

.package-pt { font-size: 20px; font-weight: 900; letter-spacing: 0.2px; }
.pt-unit { font-size: 12px; font-weight: 700; margin-left: 4px; color: var(--color-text-sub); }

.btn-buy { min-width: 140px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.buy-sub { font-size: 12px; font-weight: 700; opacity: 0.9; }

/* ===== account page readability ===== */
.card-stack{
  display: grid;
  gap: 14px;            /* ← カード間の余白 */
}

.card{
  padding: 16px;        /* ← 中の余白を少し増やす */
}

.card h2{
  margin: 0 0 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--color-border);
}

.data-list > div{
  padding: 10px 0;
  border-bottom: 1px dashed var(--color-border);
}
.data-list > div:last-child{
  border-bottom: none;
}

.page-lead{
  margin-bottom: 14px;  /* ← タイトル下の余白 */
}

/* mini list for purchases */
.mini-divider { height: 1px; background: var(--color-border); opacity: .8; }
.mini-list { display: grid; gap: 8px; margin-top: 8px; }
.mini-item{
  display: block;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: var(--color-surface);
  text-decoration: none;
  color: inherit;
}
.mini-item:hover{ opacity: .85; }
.mini-link{
  display: inline-block;
  margin-top: 6px;
  font-size: 12px;
  color: var(--color-text-sub);
  text-decoration: none;
}
.mini-link:hover{ opacity: .85; }

.mini-item-rich { padding: 12px 12px; }
.mini-title { font-weight: 800; font-size: 13px; color: #f9fafb; }
.mini-sub { margin-top: 4px; }

.purchase-date-header{
  margin-top: 14px;
  padding-top: 10px;
  font-size: 12px;
  color: var(--color-text-sub);
  letter-spacing: 0.02em;
  border-top: 1px solid rgba(255,255,255,0.10);
}
.purchase-date-header:first-child{
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

/* スマホ用：開催場所タブ */
.venue-tabs {
  margin: 10px 0 12px;
  display: flex;
  gap: 10px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
}

.venue-tab {
  flex: 0 0 auto;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.9);
  font-weight: 700;
  cursor: pointer;
}

.venue-tab.active {
  background: rgba(61, 168, 255, .18); /* 既存のアクセントに寄せたいなら調整 */
  border-color: rgba(61, 168, 255, .45);
}

/* スマホでは縦長になりすぎるので「1列だけ表示」前提で整える */
@media (max-width: 768px) {
  .race-columns {
    display: block; /* gridのままだと余白が気になることが多い */
  }
  .venue-col {
    width: 100%;
  }
}

/* ===============================
   出馬表：スマホ時だけ列を詰める
   =============================== */
@media (max-width: 768px) {

  /* テーブル全体を少し小さく */
  .runners-table {
    font-size: 11px;
  }

  /* ヘッダー・セルの余白を削る */
  .runners-table th,
  .runners-table td {
    padding: 6px 6px;
    white-space: nowrap;
  }

  /* 枠番・馬番は最小幅を固定して詰める */
  .runners-table th:nth-child(1),
  .runners-table td:nth-child(1),
  .runners-table th:nth-child(2),
  .runners-table td:nth-child(2) {
    width: 34px;
    text-align: center;
    padding-left: 4px;
    padding-right: 4px;
  }

  /* 騎手・人気・オッズも少し詰める */
  .runners-table th:nth-child(4),
  .runners-table td:nth-child(4),
  .runners-table th:nth-child(5),
  .runners-table td:nth-child(5),
  .runners-table th:nth-child(6),
  .runners-table td:nth-child(6) {
    padding-left: 6px;
    padding-right: 6px;
    font-size: 11px;
  }

  /* 馬名は省略表示（横スクロール防止） */
  .runners-table th:nth-child(3),
  .runners-table td:nth-child(3) {
    width: 88px;        /* ← ここを調整（80〜95pxくらいで試す） */
    max-width: 88px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

/* =========================
   出走馬テーブル（スマホ調整）
========================= */
@media (max-width: 480px) {
  .runners-table th:nth-child(4),
  .runners-table td:nth-child(4) {
    width: 72px;          /* ← 騎手列を固定 */
    max-width: 75px;
    padding-left: 4px;
    padding-right: 4px;
    font-size: 11px;
    white-space: nowrap; /* 折り返し禁止 */
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

/* レース詳細テーブル 数値列の右寄せ */
.runners-table th:nth-child(5),
.runners-table td:nth-child(5),
.runners-table th:nth-child(6),
.runners-table td:nth-child(6) {
  text-align: right;
}

/* ===============================
   出馬表：5列版（枠番なし） 最終上書き
   列: 1馬番 / 2馬名 / 3騎手 / 4オッズ / 5人気
================================ */

/* 横スクロール禁止方針なら、まず wrapper を止める（必要ならコメントアウト） */
.table-wrapper { overflow-x: hidden !important; }

@media (max-width: 768px) {
  .runners-table { font-size: 11px; }
  .runners-table th, .runners-table td {
    padding: 6px 6px;
    white-space: nowrap;
  }

  /* 馬番：最小固定 */
  .runners-table th:nth-child(1),
  .runners-table td:nth-child(1){
    width: 34px !important;
    text-align: center;
    padding-left: 4px;
    padding-right: 4px;
  }

  /* 馬名：省略OK（ここを詰めて騎手に回す） */
  .runners-table th:nth-child(2),
  .runners-table td:nth-child(2){
    width: 92px !important;        /* 80〜110で好み調整 */
    max-width: 92px !important;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* 騎手：できるだけ全文表示（ellipsisは付けない） */
  .runners-table th:nth-child(3),
  .runners-table td:nth-child(3){
    overflow: visible !important;
    text-overflow: clip !important;
    max-width: none !important;
  }

  /* オッズ・人気：固定幅＋右寄せ */
  .runners-table th:nth-child(4),
  .runners-table td:nth-child(4){
    width: 64px !important;
    text-align: right !important;
  }
  .runners-table th:nth-child(5),
  .runners-table td:nth-child(5){
    width: 44px !important;
    text-align: right !important;
  }
}

/* 480px以下でも騎手に ellipsis をかけない（既存ルールを潰す） */
@media (max-width: 480px) {
  .runners-table th:nth-child(3),
  .runners-table td:nth-child(3){
    white-space: nowrap;
    overflow: visible !important;
    text-overflow: clip !important;
  }
}

@media (max-width: 480px) {

  /* 枠番 */
  .runners-table th:nth-child(1),
  .runners-table td:nth-child(1){
    width: 26px;
    text-align: center;
  }

  /* 馬番 */
  .runners-table th:nth-child(2),
  .runners-table td:nth-child(2){
    width: 30px;
    text-align: center;
  }

  /* 馬名（省略OK） */
  .runners-table th:nth-child(3),
  .runners-table td:nth-child(3){
    max-width: 84px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* 騎手（できるだけ全文） */
  .runners-table th:nth-child(4),
  .runners-table td:nth-child(4){
    overflow: visible;
    text-overflow: clip;
  }

  /* オッズ */
  .runners-table th:nth-child(5),
  .runners-table td:nth-child(5){
    width: 60px;
    text-align: right;
  }

  /* 人気 */
  .runners-table th:nth-child(6),
  .runners-table td:nth-child(6){
    width: 40px;
    text-align: right;
  }
}

/* =====================================
   出走馬テーブル：枠番・馬番をさらに詰める（最終）
   ===================================== */
@media (max-width: 480px) {

  /* 枠番（1列目） */
  .runners-table th:nth-child(1),
  .runners-table td:nth-child(1){
    width: 22px !important;
    min-width: 22px !important;
    max-width: 22px !important;
    padding-left: 2px !important;
    padding-right: 2px !important;
    text-align: center;
  }

  /* 馬番（2列目） */
  .runners-table th:nth-child(2),
  .runners-table td:nth-child(2){
    width: 26px !important;
    min-width: 26px !important;
    max-width: 26px !important;
    padding-left: 3px !important;
    padding-right: 3px !important;
    text-align: center;
  }
}

/* =====================================
   枠番・馬番を確実に中央寄せ（最終上書き）
   ===================================== */
.runners-table th:nth-child(1),
.runners-table td:nth-child(1),
.runners-table th:nth-child(2),
.runners-table td:nth-child(2) {
  text-align: center !important;
}









