/* generated from styles.html by tools/extract-from-gas.js — 元ファイルを編集して再生成すること */
:root {
  /* プライマリ */
  --utc-primary: #2563EB;
  --utc-primary-hover: #1D4ED8;
  --utc-secondary: #475569;
  --utc-accent: #0EA5E9;

  /* ステータス */
  --utc-success: #16A34A;
  --utc-warning: #EA580C;
  --utc-danger: #DC2626;
  --utc-info: #0284C7;

  /* 背景 */
  --utc-bg-main: #F8FAFC;
  --utc-bg-sidebar: #0F172A;
  --utc-bg-card: #FFFFFF;
  --utc-bg-muted: #F1F5F9;

  /* テキスト */
  --utc-text-primary: #0F172A;
  --utc-text-secondary: #475569;
  --utc-text-muted: #94A3B8;
  --utc-text-inverse: #FFFFFF;

  /* ボーダー */
  --utc-border: #E2E8F0;
  --utc-divider: #CBD5E1;

  /* 角丸 */
  --radius-sm: 10px;
  --radius-md: 12px;
  --radius-lg: 14px;
  --radius-xl: 16px;
  --radius-pill: 999px;

  /* 影 */
  --shadow-sm: 0 1px 2px rgba(15,23,42,0.06);
  --shadow-md: 0 4px 12px rgba(15,23,42,0.08);

  /* フォント */
  --font-base: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', Roboto, 'Helvetica Neue', 'Noto Sans JP', 'Hiragino Sans', 'Yu Gothic UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'SFMono-Regular', 'Menlo', 'Consolas', monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--font-base);
  background: var(--utc-bg-main);
  color: var(--utc-text-primary);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
  font-feature-settings: 'tnum' 1;
}
a { text-decoration: none; color: var(--utc-primary); }
button, input, textarea, select { font: inherit; }
img { max-width: 100%; display: block; }

/* v37 / Phase 10: WCAG 2.2 — フォーカス可視性（全フォーカス可能要素に統一適用） */
:focus { outline: none; }
:focus-visible {
  outline: 3px solid rgba(37,99,235,0.45);
  outline-offset: 2px;
  border-radius: 4px;
}
.btn:focus-visible,
.nav-item:focus-visible,
.pill:focus-visible,
.tab:focus-visible,
.page-btn:focus-visible {
  outline: 3px solid rgba(37,99,235,0.55);
  outline-offset: 2px;
}
/* スクリーンリーダー専用テキスト */
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}
/* キーボードユーザーが Tab で Skip Link を出せるように */
.skip-link {
  position: absolute; left: -9999px; top: 8px;
  background: var(--utc-primary); color: #fff;
  padding: 10px 16px; border-radius: 8px;
  font-weight: 600; z-index: 9999;
}
.skip-link:focus { left: 8px; }

/* v37: モーションを抑える設定への対応 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ===== layout ===== */
.app-shell { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }
.sidebar {
  background: var(--utc-bg-sidebar);
  color: #fff;
  padding: 24px 16px;
  border-right: 1px solid rgba(255,255,255,.08);
}
.brand { font-size: 20px; font-weight: 700; padding: 0 12px 4px; }
.brand-sub { font-size: 12px; color: #94A3B8; padding: 0 12px 20px; }
.nav-item {
  width: 100%; display: flex; align-items: center; gap: 10px;
  min-height: 46px; padding: 0 14px; border: none; background: transparent;
  color: #cbd5e1; border-radius: 10px; position: relative; cursor: pointer;
  text-align: left; font-size: 14px;
}
/* v55: ナビ用アイコン span（タブレット・モバイルでも残す）
   旧実装は <span class="nav-label">📊 ダッシュボード</span> と一体だったため、
   .nav-label を display:none にすると絵文字も消える事故が起きていた。 */
.nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  line-height: 1;
  flex-shrink: 0;
  width: 24px;
  /* 絵文字の縦位置を微調整（OS のフォント差を吸収） */
  text-align: center;
}
.nav-item:hover { color: #fff; background: rgba(255,255,255,.03); }
.nav-item.active { color: #fff; background: rgba(255,255,255,.04); }
.nav-item.active::before {
  content: ''; position: absolute; left: -16px; top: 8px; bottom: 8px; width: 4px;
  background: var(--utc-primary); border-radius: 999px;
}
.sidebar-section-label {
  font-size: 11px; color: #64748b; padding: 16px 14px 6px;
  text-transform: uppercase; letter-spacing: .06em;
}
.sidebar-user {
  border-top: 1px solid rgba(255,255,255,.08);
  margin-top: 24px; padding: 14px;
  font-size: 13px; color: #cbd5e1;
}
.sidebar-user .user-name { color: #fff; font-weight: 600; }
.sidebar-user .user-email { color: #94a3b8; font-size: 12px; margin-top: 2px; }
.sidebar-logout {
  background: transparent; border: 1px solid rgba(255,255,255,.12);
  color: #cbd5e1; padding: 8px 12px; border-radius: 8px; cursor: pointer;
  font-size: 12px; margin-top: 10px; width: 100%;
}
.sidebar-logout:hover { background: rgba(255,255,255,.06); color: #fff; }

.main { padding: 24px; min-width: 0; overflow-x: clip; }
.main > * { max-width: 1080px; margin-left: auto; margin-right: auto; }
.topbar {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 24px; gap: 16px;
}
/* ページヘッダーの内側行コンテナ（v57 step8-header-mobile）
   .topbar の中で「左：見出し、右：ボタン群」を保つ際に使用。
   配信側 7 タブが共通の .topbar 内で template ごとに必要となるため、
   内側ラッパーに専用クラスを与えて responsive 切替できるようにした。
   サンクス側は .topbar 直下に見出しとボタン群を置く構造のため不要。 */
.topbar-row {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.page-title { font-size: 28px; font-weight: 700; }
.page-subtitle { font-size: 14px; color: var(--utc-text-secondary); margin-top: 4px; }

/* ===== grid ===== */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stack-8 > * + * { margin-top: 8px; }
.stack-16 > * + * { margin-top: 16px; }
.stack-24 > * + * { margin-top: 24px; }

/* ===== card ===== */
.card {
  background: #fff; border: 1px solid var(--utc-border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); padding: 24px;
}
.card-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 16px;
}
.card-title { font-size: 16px; font-weight: 600; }
.kpi-card strong { display: block; font-size: 30px; font-weight: 700; margin-top: 8px; font-family: var(--font-mono); letter-spacing: -0.5px; }
.kpi-label { font-size: 14px; color: var(--utc-text-secondary); }
.kpi-delta { font-size: 13px; margin-top: 4px; }
.kpi-delta.up { color: var(--utc-success); }
.kpi-delta.down { color: var(--utc-danger); }

/* ===== button ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: 10px; border: 1px solid transparent;
  font-size: 14px; font-weight: 600; line-height: 1.2; letter-spacing: .01em;
  white-space: nowrap; cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: background .15s ease, border-color .15s ease, box-shadow .15s ease, transform .05s ease;
}
.btn:hover { box-shadow: var(--shadow-sm); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--utc-primary); color: #fff; }
.btn-primary:hover { background: var(--utc-primary-hover); box-shadow: 0 2px 10px rgba(37,99,235,.28); }
.btn-secondary { background: #fff; border-color: var(--utc-border); color: var(--utc-text-primary); }
.btn-secondary:hover { background: var(--utc-bg-muted); box-shadow: none; }
.btn-ghost { background: transparent; color: var(--utc-text-secondary); }
.btn-ghost:hover { background: var(--utc-bg-muted); box-shadow: none; }
.btn-danger { background: var(--utc-danger); color: #fff; }
.btn-danger:hover { box-shadow: 0 2px 10px rgba(220,38,38,.25); }
.btn-success { background: var(--utc-success); color: #fff; }
.btn-success:hover { box-shadow: 0 2px 10px rgba(22,163,74,.22); }
.btn-sm { min-height: 36px; padding: 0 12px; font-size: 13px; }

/* ===== 第2弾 フォント刷新（欧文=システムUI / 和文=ヒラギノ・Noto / 数字=等幅 / 描画クリア） ===== */
:root {
  --font-base: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Noto Sans JP', 'Yu Gothic UI', 'Meiryo', sans-serif;
  --font-mono: 'SFMono-Regular', 'SF Mono', ui-monospace, 'Menlo', 'Consolas', monospace;
}
body {
  font-family: var(--font-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "palt";
  font-variant-numeric: tabular-nums;
}
.page-title, .brand { letter-spacing: -.01em; }
.kpi-card strong { letter-spacing: -.01em; }
.btn:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; transform: none; }

/* ビジュアル編集エリア: 中に流し込まれる600px固定幅のメールHTMLを強制的にエリア内へ収める */
.ve-editor { overflow-x: hidden; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.ve-editor > * { width: 100% !important; max-width: 100% !important; min-width: 0 !important; box-sizing: border-box !important; }
.ve-editor * { max-width: 100% !important; min-width: 0 !important; }
.ve-editor img { height: auto !important; }
.ve-editor table { table-layout: fixed !important; width: 100% !important; }

/* ビジュアル編集ツールバー: 折り返して全ボタン表示（横スクロールなし） */
.ve-toolbar { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.ve-toolbar > .btn { flex: 0 0 auto; }

/* ウィザードのアクション行：PCは右寄せで整列、スマホは2×2グリッドで端正に */
.wizard-actions { flex-wrap: wrap; justify-content: flex-end; align-items: center; }
@media (max-width: 768px) {
  .wizard-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: 100%; }
  .wizard-actions .btn { width: 100%; }
}

/* ===== form ===== */
.form-group { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.label { display: block; font-size: 14px; font-weight: 600; color: var(--utc-text-secondary); }
.form-control {
  width: 100%; min-height: 44px; padding: 12px 14px; background: #fff;
  border: 1px solid var(--utc-border); border-radius: 10px;
  color: var(--utc-text-primary);
}
textarea.form-control { min-height: 140px; resize: vertical; font-family: 'SFMono-Regular', 'Menlo', monospace; font-size: 13px; }
.form-control:focus {
  outline: none; border-color: var(--utc-primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,.14);
}
.form-control:disabled { background: var(--utc-bg-muted); color: var(--utc-text-muted); cursor: not-allowed; }
.form-help { font-size: 12px; color: var(--utc-text-muted); margin-top: 4px; }
.form-error { font-size: 13px; color: var(--utc-danger); margin-top: 4px; }

.checkbox, .radio { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; }
.checkbox input, .radio input { width: 18px; height: 18px; cursor: pointer; }

/* ===== toggle ===== */
.toggle {
  width: 52px; height: 30px; background: #cbd5e1; border-radius: 999px;
  position: relative; cursor: pointer; transition: .2s; border: none;
}
.toggle::after {
  content: ''; position: absolute; width: 22px; height: 22px; background: #fff;
  border-radius: 50%; top: 4px; left: 4px; box-shadow: 0 1px 3px rgba(15,23,42,.18);
  transition: all .2s ease;
}
.toggle.active { background: var(--utc-primary); }
.toggle.active::after { left: 26px; }

/* ===== segmented control ===== */
.segmented {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--utc-bg-muted); padding: 4px; border-radius: 12px;
}
.segmented button {
  border: none; background: transparent; color: var(--utc-text-secondary);
  padding: 10px 14px; min-height: 40px; border-radius: 8px; cursor: pointer;
  font-size: 14px; font-weight: 600; transition: all .18s ease;
}
.segmented button:hover { color: var(--utc-text-primary); }
.segmented button.active {
  background: #fff; color: var(--utc-text-primary); box-shadow: var(--shadow-sm);
}

/* ===== badges / pills ===== */
.badge, .pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 26px; padding: 4px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600; line-height: 1;
}
.badge { background: #eff6ff; color: #1d4ed8; }
.badge-success { background: #f0fdf4; color: #166534; }
.badge-warning { background: #fff7ed; color: #c2410c; }
.badge-danger { background: #fef2f2; color: #b91c1c; }
.badge-muted { background: #f1f5f9; color: #475569; }
.badge-live {
  background: #f0fdf4; color: #166534;
  font-variant-numeric: tabular-nums;
}

.pill {
  background: #ffffff; border: 1px solid var(--utc-border);
  color: var(--utc-text-secondary); cursor: pointer; transition: all .18s ease;
}
.pill:hover { border-color: var(--utc-primary); color: var(--utc-primary); }
.pill.active {
  background: #eff6ff; border-color: var(--utc-primary); color: var(--utc-primary);
}

/* ===== table ===== */
.table-wrap {
  background: #fff; border: 1px solid var(--utc-border);
  border-radius: 14px; overflow: auto;
  -webkit-overflow-scrolling: touch;
}
table { width: 100%; border-collapse: collapse; border-spacing: 0; }
thead { background: #fff; }
th {
  padding: 14px 16px; text-align: left; font-size: 13px; font-weight: 600;
  color: var(--utc-text-secondary); border-bottom: 1px solid var(--utc-border);
  position: sticky; top: 0; background: #fff; z-index: 2;
  white-space: nowrap;
}
td {
  padding: 14px 16px; font-size: 14px;
  border-bottom: 1px solid var(--utc-border);
  color: var(--utc-text-primary);
}
th, td { border-left: none; border-right: none; }
tbody tr { transition: background .15s ease; }
tbody tr:hover { background: #f8fafc; cursor: pointer; }
tbody tr:last-child td { border-bottom: none; }
.table-sort { cursor: pointer; user-select: none; }
.table-sort:hover { color: var(--utc-primary); }

/* 顧客テーブル（PC幅）：列配分を整える（氏名・店舗は折り返さない／メアドは…で省略） */
@media (min-width: 769px) {
  .customer-list-card td[data-label="氏名"] { white-space: nowrap; font-size: 13px; font-weight: 600; }
  /* 店舗（7列目）：縦書き化を防止 */
  .customer-list-card thead th:nth-child(7),
  .customer-list-card tbody td:nth-child(7) { white-space: nowrap; }
  /* メアド（8列目）：長いアドレスは … で省略し、他列の幅を奪わせない */
  .customer-list-card thead th:nth-child(8),
  .customer-list-card tbody td:nth-child(8) {
    max-width: 210px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
}

/* ===== pagination ===== */
.pagination {
  display: flex; align-items: center; justify-content: flex-end;
  gap: 8px; padding: 16px;
}
.page-btn {
  min-width: 36px; height: 36px; border: 1px solid var(--utc-border);
  background: #fff; border-radius: 10px; cursor: pointer;
  font-size: 14px; transition: all .15s ease;
}
.page-btn:hover { border-color: var(--utc-primary); color: var(--utc-primary); }
.page-btn.active {
  background: var(--utc-primary); color: #fff; border-color: var(--utc-primary);
}

/* ===== tabs ===== */
.tabs { display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--utc-border); }
.tab {
  border: none; background: transparent; padding: 14px 16px;
  font-size: 14px; color: var(--utc-text-secondary); cursor: pointer;
  position: relative; transition: color .15s ease;
}
.tab:hover { color: var(--utc-text-primary); }
.tab.active { color: var(--utc-text-primary); font-weight: 600; }
.tab.active::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
  background: var(--utc-primary);
}

/* ===== stepper ===== */
.stepper { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.step {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px;
  border: 1px solid var(--utc-border); background: #fff;
  border-radius: 12px; transition: all .18s ease; cursor: pointer;
}
.step-num {
  width: 24px; height: 24px; border-radius: 50%; background: #e2e8f0;
  color: var(--utc-text-secondary); display: grid; place-items: center;
  font-size: 12px; font-weight: 700;
}
.step-label { font-size: 13px; font-weight: 600; }
.step.active { background: #eff6ff; border-color: var(--utc-primary); }
.step.active .step-num { background: var(--utc-primary); color: #fff; }
.step.done .step-num { background: var(--utc-success); color: #fff; }

/* ===== progress ===== */
.progress {
  width: 100%; height: 10px; background: #e2e8f0;
  border-radius: 999px; overflow: hidden;
}
.progress-bar {
  height: 100%; background: var(--utc-primary); transition: width .3s ease;
}
.progress-bar.warn { background: var(--utc-warning); }
.progress-bar.danger { background: var(--utc-danger); }

/* ===== modal ===== */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(15,23,42,.45);
  display: grid; place-items: center; z-index: 1000;
  padding: 16px;
}
.modal-panel {
  width: min(720px, 100%); max-height: 90vh; overflow: auto;
  background: #fff; border-radius: 16px; padding: 24px; box-shadow: var(--shadow-md);
}
.modal-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 16px;
}
.modal-title { font-size: 20px; font-weight: 700; }
.modal-close {
  background: transparent; border: none; cursor: pointer;
  width: 36px; height: 36px; border-radius: 8px;
  display: grid; place-items: center; color: var(--utc-text-secondary);
  font-size: 20px;
}
.modal-close:hover { background: var(--utc-bg-muted); }

/* ===== drawer ===== */
.drawer-backdrop {
  position: fixed; inset: 0; background: rgba(15,23,42,.35);
  z-index: 999;
}
.drawer-panel {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: min(480px, 100%);
  background: #fff; box-shadow: -8px 0 24px rgba(15,23,42,.12);
  z-index: 1000; overflow: auto;
  padding: 24px;
}

/* ===== toast ===== */
.toast-stack {
  position: fixed; top: 20px; right: 20px; display: flex;
  flex-direction: column; gap: 10px; z-index: 1100;
}
.toast {
  min-width: 280px; max-width: 400px; padding: 14px 16px; border-radius: 12px;
  color: #fff; box-shadow: var(--shadow-md);
  display: flex; align-items: center; gap: 10px;
}
.toast-info { background: #0f172a; }
.toast-success { background: var(--utc-success); }
.toast-warning { background: var(--utc-warning); }
.toast-danger { background: var(--utc-danger); }

/* ===== skeleton ===== */
.skeleton {
  border-radius: 10px;
  background: linear-gradient(90deg, #e2e8f0 25%, #f8fafc 37%, #e2e8f0 63%);
  background-size: 400% 100%; animation: shimmer 1.4s infinite;
}
.skeleton-line { height: 14px; margin: 6px 0; }
.skeleton-card { height: 100px; }
@keyframes shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

/* ===== empty state ===== */
.empty-state {
  display: grid; place-items: center; text-align: center;
  gap: 16px; padding: 64px 24px;
}
.empty-illustration {
  width: 120px; height: 120px; border-radius: 24px; background: #eff6ff;
  display: grid; place-items: center; font-size: 48px;
}
.empty-title { font-size: 20px; font-weight: 700; }
.empty-text { font-size: 14px; color: var(--utc-text-secondary); max-width: 420px; }

/* ===== error state ===== */
.error-state {
  display: grid; place-items: center; text-align: center;
  gap: 16px; padding: 64px 24px;
}
.error-code { font-size: 72px; font-weight: 700; color: var(--utc-danger); }

/* ===== login layout ===== */
.login-shell {
  min-height: 100vh;
  display: grid; place-items: center;
  padding: 24px;
}
.login-card {
  width: 100%; max-width: 480px;
  background: #fff; border: 1px solid var(--utc-border);
  border-radius: var(--radius-xl); box-shadow: var(--shadow-md);
  padding: 40px 36px;
}
.login-logo { text-align: center; margin-bottom: 24px; }
.login-logo img { max-height: 56px; margin: 0 auto; }
.login-title {
  font-size: 22px; font-weight: 700; text-align: center;
  margin-bottom: 8px;
}
.login-subtitle {
  font-size: 14px; color: var(--utc-text-secondary); text-align: center;
  margin-bottom: 28px;
}

/* ===== composer layout (6-step) ===== */
.composer-grid {
  display: grid; grid-template-columns: 1fr; gap: 24px;
}
.composer-preview {
  position: sticky; top: 24px;
  height: calc(100vh - 120px);
  background: #fff; border: 1px solid var(--utc-border);
  border-radius: var(--radius-lg); overflow: hidden;
  display: flex; flex-direction: column;
}
.composer-preview-head {
  padding: 12px 16px; border-bottom: 1px solid var(--utc-border);
  font-size: 13px; color: var(--utc-text-secondary);
}
.composer-preview iframe { width: 100%; height: 100%; border: none; flex: 1; }

/* ===== quota panel ===== */
.quota-panel {
  background: linear-gradient(135deg, #eff6ff 0%, #ffffff 100%);
  border: 1px solid var(--utc-border);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
}
.quota-label { font-size: 13px; color: var(--utc-text-secondary); }
.quota-value { font-size: 22px; font-weight: 700; margin: 4px 0; }

/* ===== funnel SVG ===== */
.funnel-svg { width: 100%; max-width: 380px; margin: 0 auto; }
.funnel-svg polygon { fill: var(--utc-primary); transition: opacity .2s; }
.funnel-svg polygon:nth-child(1) { opacity: 1; }
.funnel-svg polygon:nth-child(2) { opacity: .78; }
.funnel-svg polygon:nth-child(3) { opacity: .55; }
.funnel-svg polygon:nth-child(4) { opacity: .35; }
.funnel-labels {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
  margin-top: 12px; font-size: 13px;
}

/* ===== utilities ===== */
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }
.w-full { width: 100%; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-sm { font-size: 13px; }
.text-secondary { color: var(--utc-text-secondary); }
.text-muted { color: var(--utc-text-muted); }
.font-bold { font-weight: 700; }
.hidden { display: none !important; }
.relative { position: relative; }

/* v50: SS 直接編集の警告チップ（管理者専用エリア用）
   通常運用は UI 完結が前提、SS リンクは管理者誘導のため muted で表示 */
.ss-warning {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px;
  margin-bottom: 8px;
  background: var(--utc-bg-muted);
  border: 1px dashed var(--utc-divider);
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--utc-text-secondary);
}
.ss-warning strong {
  color: var(--utc-text-primary);
  font-weight: 600;
  margin-right: 6px;
}
.ss-warning-icon {
  flex-shrink: 0;
  font-size: 14px;
  line-height: 1.4;
}

/* v37 / Phase 10: 仕上げユーティリティ */
.ellipsis {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.ellipsis-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ellipsis-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* スマホでのテーブル横スクロール最適化 */
.table-wrap {
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}

/* モーダル/ドロワー表示中の body スクロール抑止（JS 側で .no-scroll を付与） */
body.no-scroll { overflow: hidden; }

/* トーストのフェードイン */
.toast { animation: toast-in 0.18s ease-out; }
@keyframes toast-in {
  from { opacity: 0; transform: translateX(8px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* タップターゲット最小サイズ補強（icon ボタン等） */
button:not(.nav-item):not(.btn):not(.tab):not(.modal-close):not(.r-reaction):not(.segmented button):not(.pill):not(.page-btn) {
  cursor: pointer;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   v40 / Phase v40: モード切替バー（一斉配信 ⇔ サンクスメール）
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.mode-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 24px 0;
  margin-bottom: 8px;
}
.mode-switcher {
  display: inline-flex;
  background: var(--utc-bg-muted);
  border: 1px solid var(--utc-border);
  border-radius: 14px;
  padding: 4px;
  gap: 4px;
  box-shadow: var(--shadow-sm);
}
.mode-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 10px 22px;
  border: none;
  background: transparent;
  color: var(--utc-text-secondary);
  font-family: inherit;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.18s ease;
}
.mode-btn:hover { color: var(--utc-text-primary); background: rgba(255,255,255,0.5); }
.mode-btn.active {
  background: #fff;
  color: var(--utc-text-primary);
  box-shadow: var(--shadow-md);
}
.mode-btn .mode-icon { font-size: 22px; line-height: 1; }
.mode-btn .mode-label {
  font-size: 15px; font-weight: 700;
  line-height: 1.2;
  display: block;
}
.mode-btn .mode-sublabel {
  display: block;
  font-size: 11px;
  font-weight: 400;
  color: var(--utc-text-muted);
  margin-top: 2px;
}
.mode-btn.active .mode-sublabel { color: var(--utc-text-secondary); }

/* サンクスモードナビの「v41」等の予告バッジ */
.nav-item-soon {
  opacity: 0.55;
  cursor: not-allowed !important;
}
.nav-item-soon:hover { transform: none !important; }
.nav-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(255,255,255,0.12);
  font-size: 10px;
  font-weight: 700;
  color: rgba(255,255,255,0.7);
  letter-spacing: 0.04em;
}

/* v41 / Phase v41: サンクスダッシュボード 7日チャート */
.thanks-chart {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 140px;
  padding: 16px 8px 0;
  /* v53: 14日以上は粒度が週/月になるが、保険として横スクロール可能に。
     さらに親が min-width:0 を持たないと flex item の中身が押し出す事故を防ぐ */
  overflow-x: auto;
  min-width: 0;
}

/* v53: グリッド配下のカードが中身に押し出されないようにする保険
   （棒グラフが長くなった時、隣接カードを潰さないため） */
.grid-2 > *,
.grid-3 > *,
.grid-4 > * {
  min-width: 0;
}

/* v53: フィルタ再読込み中のカード単位スピナー（ローディング中も既存値は薄く見える） */
.thanks-loading-host {
  position: relative;
}
.thanks-loading-host.is-loading > :not(.thanks-loading-overlay) {
  opacity: 0.45;
  transition: opacity 0.15s ease;
  pointer-events: none;
}
.thanks-loading-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  background: rgba(255, 255, 255, 0.35);
  border-radius: inherit;
  backdrop-filter: blur(1px);
  -webkit-backdrop-filter: blur(1px);
}
.thanks-loading-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(0, 0, 0, 0.1);
  border-top-color: var(--utc-primary);
  border-radius: 50%;
  animation: thanks-spin 0.8s linear infinite;
}
@keyframes thanks-spin {
  to { transform: rotate(360deg); }
}
.thanks-chart-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  height: 100%;
  cursor: default;
}
.thanks-chart-bar-wrap {
  flex: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 0;
}
.thanks-chart-bar {
  width: 100%;
  background: linear-gradient(180deg, var(--utc-primary) 0%, var(--utc-info) 100%);
  border-radius: 6px 6px 0 0;
  min-height: 4px;
  position: relative;
  transition: height 0.3s ease;
}
.thanks-chart-value {
  position: absolute;
  top: -22px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  font-weight: 700;
  color: var(--utc-text-primary);
}
.thanks-chart-label {
  font-size: 11px;
  color: var(--utc-text-muted);
  letter-spacing: 0.04em;
}
.progress-bar.warn { background: var(--utc-warning); }
.progress-bar.danger { background: var(--utc-danger); }

/* v43 / Phase v43: サンクスメールテンプレ編集 2カラムレイアウト */
.template-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px;
  align-items: flex-start;
}
.template-editor { min-width: 0; }
.template-preview { min-width: 0; }
.template-preview-iframe {
  width: 100%;
  height: 600px;
  border: 1px solid var(--utc-border);
  border-radius: 8px;
  background: #fff;
}
@media (max-width: 1200px) {
  .template-grid { grid-template-columns: 1fr; }
  .template-preview .card { position: static !important; }
  .template-preview-iframe { height: 480px; }
}

/* v42 / Phase v42: サンクス履歴タイムライン（顧客ドロワー内） */
.thanks-timeline {
  position: relative;
  padding-left: 8px;
}
.thanks-timeline::before {
  /* 縦のガイドライン */
  content: '';
  position: absolute;
  top: 12px;
  bottom: 12px;
  left: 15px;
  width: 2px;
  background: var(--utc-bg-muted);
  border-radius: 2px;
}
.thanks-timeline-item {
  position: relative;
  padding: 14px 12px 14px 36px;
  margin-bottom: 12px;
  border: 1px solid var(--utc-border);
  border-radius: 12px;
  background: var(--utc-bg-card);
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.thanks-timeline-item:hover {
  border-color: var(--utc-primary);
  transform: translateX(2px);
}
.thanks-timeline-item.is-redeemed {
  background: linear-gradient(90deg, #f0fdf4 0%, #ffffff 24px);
  border-color: #86EFAC;
}
.thanks-timeline-item.is-expired {
  background: linear-gradient(90deg, #fff7ed 0%, #ffffff 24px);
  border-color: #fed7aa;
}
.thanks-timeline-item.is-pending {
  background: linear-gradient(90deg, var(--utc-bg-muted) 0%, #ffffff 24px);
  opacity: 0.85;
}
.thanks-timeline-dot {
  position: absolute;
  top: 16px;
  left: 8px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 3px solid #fff;
  box-shadow: 0 0 0 2px var(--utc-border);
  z-index: 1;
}
.thanks-timeline-item.is-redeemed .thanks-timeline-dot { box-shadow: 0 0 0 2px var(--utc-success); }
.thanks-timeline-item.is-expired .thanks-timeline-dot { box-shadow: 0 0 0 2px var(--utc-warning); }
.thanks-timeline-content { padding-left: 0; }
.thanks-timeline-events {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.thanks-event {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  line-height: 1.5;
  flex-wrap: wrap;
}
.thanks-event-icon {
  font-size: 14px;
  min-width: 18px;
  text-align: center;
  flex-shrink: 0;
}
.thanks-event-text { color: var(--utc-text-primary); }
.thanks-event-meta {
  margin-left: auto;
  font-size: 11px;
  color: var(--utc-text-muted);
  letter-spacing: 0.04em;
}

/* ロードマップアイテムの装飾 */
.roadmap-item {
  padding: 12px 14px;
  border-left: 3px solid var(--utc-border);
  background: var(--utc-bg-muted);
  border-radius: 0 8px 8px 0;
}
.roadmap-item:hover { border-left-color: var(--utc-primary); }

/* ===== responsive ===== */
@media (max-width: 1100px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: 1fr; }
  .composer-grid { grid-template-columns: 1fr; }
  .composer-preview { position: static; height: auto; min-height: 400px; }
  .app-shell { grid-template-columns: 88px 1fr; }
  .nav-item .nav-label { display: none; }
  /* v55: ラベル消失時はアイコンを中央寄せに */
  .nav-item { justify-content: center; padding: 0 8px; }
  .nav-item .nav-icon { font-size: 22px; width: auto; }
  .brand-sub, .sidebar-section-label, .sidebar-user { display: none; }
}

@media (max-width: 768px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; bottom: 0; left: 0; right: 0; top: auto;
    flex-direction: row; padding: 8px; z-index: 100;
    border-right: none; border-top: 1px solid rgba(255,255,255,.08);
    /* iPhone のセーフエリア(ホームバー)対応 */
    padding-bottom: max(8px, env(safe-area-inset-bottom));
  }
  .sidebar .brand, .brand-sub,
  .sidebar-section-label, .sidebar-user { display: none; }
  .sidebar nav { display: flex; gap: 4px; width: 100%; justify-content: space-around; }
  .nav-item {
    flex-direction: column; gap: 4px; min-height: 56px;
    padding: 8px 4px; font-size: 11px;
    /* v55: モバイル時のアイコン中央寄せを 1100px ガードから上書き */
    justify-content: center;
  }
  /* v55: モバイル（ボトムナビ）のアイコン拡大 */
  .nav-item .nav-icon { font-size: 24px; width: auto; }
  .nav-item.active::before { left: 50%; top: 0; right: auto; bottom: auto;
    transform: translateX(-50%); width: 24px; height: 3px; }
  /* セーフエリア込みでメインのボトムパディングを確保 */
  .main { padding: 16px 16px calc(80px + env(safe-area-inset-bottom)); }
  /* v40: モード切替バーをモバイルでも見やすく */
  .mode-bar { padding: 12px 12px 0; }
  .mode-switcher { width: 100%; max-width: none; }
  .mode-btn { flex: 1; padding: 10px 12px; min-height: 56px; }
  .mode-btn .mode-label { font-size: 13px; }
  .mode-btn .mode-sublabel { font-size: 10px; }
  /* スマホ: モードボタンが縮まず横にはみ出すのを防ぐ */
  .mode-btn { min-width: 0; }
  /* スマホ: 「④本文作成」見出し＋segmented(HTML直接/AI生成/ビジュアル編集)の横はみ出し対策 */
  .card-header { flex-wrap: wrap; gap: 8px; }
  .segmented { width: 100%; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .segmented button { flex: 1 1 auto; padding: 8px 10px; font-size: 13px; white-space: nowrap; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .topbar { flex-direction: column; align-items: stretch; gap: 12px; }
  /* 配信側 7 タブの内側ラッパーも同じく縦並び化（PC では .topbar-row 自体が
     flex 横配置、スマホでは見出しを上 → ボタン群を下に縦並びにする） */
  .topbar-row {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .page-title { font-size: 22px; }
  /* v57 step8-header-mobile: スマホでもボタンは自然な幅で横並び折り返し
     （既存 .flex.gap-8 の flex-wrap で並ぶ）。
     旧 .topbar .btn { width: 100% } は配信タブ 4 ボタンが縦積みになる原因のため廃止。
     1 ボタンタブ（サンクスダッシュ等）でも justify-content: flex-end で右端配置に。 */
  .topbar .flex.gap-8,
  .topbar-row .flex.gap-8 {
    justify-content: flex-start;
    flex-wrap: wrap;
  }
  .topbar-row .flex.gap-8 .btn {
    flex: 0 1 auto;
  }

  /* トースト: スマホでは画面上部フル幅、セーフエリア対応 */
  .toast-stack {
    right: 12px; left: 12px;
    top: max(12px, env(safe-area-inset-top));
  }
  .toast { min-width: auto; max-width: none; }

  /* モーダル: スマホではボトムシート風 */
  .modal-backdrop { align-items: flex-end; }
  .modal-panel {
    width: 100%; max-height: 90vh;
    padding: 20px 16px calc(20px + env(safe-area-inset-bottom));
    border-radius: 16px 16px 0 0;
  }

  /* ドロワー: 全幅、上端から表示 */
  .drawer-panel {
    width: 100%; max-width: none;
    padding: 16px 16px calc(80px + env(safe-area-inset-bottom));
  }

  .login-card { padding: 28px 20px; }
  .stepper { gap: 6px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .step { padding: 8px 10px; flex-shrink: 0; }
  .step-label { font-size: 12px; }

  /* テーブル: スマホで横スクロール明示 */
  .table-wrap {
    border-radius: 12px;
    -webkit-overflow-scrolling: touch;
  }
  table { min-width: 560px; }  /* 最低幅で横スクロール発動 */

  /* ボタングループは縦並びに */
  .flex.gap-8, .flex.gap-12, .flex.gap-16 { flex-wrap: wrap; }

  /* テキストエリアは少し小さめでも 16px 維持（iOS auto-zoom 防止） */
  .form-control, input[type="text"], input[type="email"],
  input[type="number"], textarea, select { font-size: 16px; }

  /* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
     レスポンシブ・カードテーブル（v57 step8-mobile-card）
     既存の「テーブルはスマホで横スクロール」スタンスに加えて、
     情報量の少ない小規模リスト UI 専用に「カード化」パターンを提供。
     .responsive-card-table を付けたテーブルだけが対象、既存の
     顧客リスト等のテーブルは無影響（スコープ限定の汎用クラス）。
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

  /* min-width 強制を解除（既存のスマホ用 table { min-width: 560px } を打ち消す） */
  .responsive-card-table table { min-width: 0; }

  /* テーブル系要素を block 化 */
  .responsive-card-table table,
  .responsive-card-table thead,
  .responsive-card-table tbody,
  .responsive-card-table tr,
  .responsive-card-table td {
    display: block;
    width: auto;
  }

  /* thead を画面外に飛ばす（視覚的に隠すがスクリーンリーダーには読み上げられる、
     display:none と違い WCAG 配慮を保持。step3(D) 以降の方針と整合） */
  .responsive-card-table thead {
    position: absolute;
    left: -9999px;
    top: -9999px;
  }

  /* tbody の各 tr をカード化 */
  .responsive-card-table tbody tr {
    background: #fff;
    border: 1px solid var(--utc-border);
    border-radius: var(--radius-lg);
    padding: 16px 16px 12px;
    margin-bottom: 12px;
    position: relative;
    box-shadow: none;
  }
  .responsive-card-table tbody tr:hover {
    background: #fff;  /* PC 時のホバー背景をリセット */
  }
  .responsive-card-table tbody tr:last-child {
    margin-bottom: 0;
  }

  /* td の基本スタイル */
  .responsive-card-table td {
    padding: 4px 0;
    border-bottom: none;
    text-align: left !important;
    font-size: 14px;
  }

  /* td に疑似ラベル（data-label 属性から）*/
  .responsive-card-table td[data-label]::before {
    content: attr(data-label);
    display: block;
    font-size: 11px;
    color: var(--utc-text-secondary);
    font-weight: 600;
    margin-bottom: 2px;
    letter-spacing: 0.04em;
  }

  /* タイトル列は大きく見せ、罫線で他要素と分離 */
  .responsive-card-table td[data-label="タイトル"] {
    font-size: 16px;
    padding-bottom: 12px;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--utc-border);
    padding-right: 48px;  /* 右上の削除ボタンと重ならないよう余白確保 */
  }
  .responsive-card-table td[data-label="タイトル"]::before {
    display: none;  /* タイトル列はラベル不要（自明） */
  }

  /* 削除ボタン列を右上にフロート（親指で押しやすい位置） */
  .responsive-card-table td.draft-delete-cell {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 0;
    width: auto;
  }
  .responsive-card-table td.draft-delete-cell::before {
    display: none;
  }

  /* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
     汎用ユーティリティ: スマホで非表示（v57 step8-mobile-customer）
     .hide-mobile を付けた th / td はスマホ幅で消失。
     .responsive-card-table と組み合わせると、対象列がカード内に出現しない。
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
  .hide-mobile {
    display: none !important;
  }

  /* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
     顧客リスト固有のカード化調整（v57 step8-mobile-customer）
     .responsive-card-table を基盤に、顧客リスト固有の 3 段構造を実現：
       1 段目: 氏名（大、罫線で分離）+ 状態バッジ（右上絶対配置）
       2 段目: 来店回数（中央寄せ、大数字、動的色は inline style 由来でそのまま）
       3 段目: ランクバッジ（左寄せ）
     右下に chevron「›」でタップ可視化、:active で背景フィードバック。
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

  /* 1 段目: 氏名はカードのタイトル扱い（大・太字、罫線で他項目と分離） */
  .customer-list-card td[data-label="氏名"] {
    font-size: 17px;
    font-weight: 700;
    padding-bottom: 12px;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--utc-border);
    padding-right: 80px;  /* 右上の状態バッジと重ならない余白 */
  }
  .customer-list-card td[data-label="氏名"]::before {
    display: none;  /* 氏名はラベル不要（自明） */
  }

  /* 1 段目右上: 状態バッジを絶対配置 */
  .customer-list-card td[data-label="状態"] {
    position: absolute;
    top: 16px;
    right: 16px;
    padding: 0;
    width: auto;
  }
  .customer-list-card td[data-label="状態"]::before {
    display: none;  /* バッジ自体で状態が分かるためラベル不要 */
  }

  /* 2 段目: 来店回数の主役強調（PC の center / 大数字 / 動的色を維持・拡大）
     既存 inline style（font-size:18px / font-weight:700 / 動的色）をそのまま尊重し、
     カード内では中央寄せ + 上下に余白を取って「主役感」を出す。 */
  .customer-list-card td[data-label="来店回数 ★"] {
    text-align: center !important;  /* PC の center 寄せを維持 */
    padding: 12px 0;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--utc-border);
  }
  .customer-list-card td[data-label="来店回数 ★"]::before {
    /* ラベルを中央寄せ + 小さく */
    text-align: center;
    margin-bottom: 4px;
  }

  /* 3 段目: ランクバッジ（既存のバッジサイズそのまま、左寄せ） */
  .customer-list-card td[data-label="ランク"] {
    padding: 4px 0;
  }

  /* カード右下に chevron「›」でタップ可視化（CSS のみ、HTML 不変） */
  .customer-list-card tbody tr::after {
    content: '›';
    position: absolute;
    bottom: 12px;
    right: 16px;
    font-size: 22px;
    color: var(--utc-text-muted);
    line-height: 1;
    pointer-events: none;  /* タップは行（カード）に到達させる */
  }

  /* タップ時の active フィードバック（押した感、誤タップ防止にも寄与） */
  .customer-list-card tbody tr:active {
    background-color: var(--utc-bg-muted, #f1f5f9);
  }

  /* ▼ 顧客カードの引き締め（殺風景の解消・MD作法） */
  /* 「ランク」ラベルは冗長 → 消してバッジを主役に（pill化） */
  .customer-list-card td[data-label="ランク"]::before { display: none; }
  .customer-list-card td[data-label="ランク"] { padding: 0 0 8px; }
  .customer-list-card td[data-label="ランク"] .badge {
    font-size: 13px; padding: 5px 14px; border-radius: 999px; font-weight: 700;
  }
  /* 氏名〜来店回数の間延びを締める（罫線は1本に整理） */
  .customer-list-card td[data-label="氏名"] { padding-bottom: 10px; margin-bottom: 8px; }
  .customer-list-card td[data-label="来店回数 ★"] {
    padding: 10px 0; margin-bottom: 0; border-bottom: none;
  }
  /* 最終来店：ラベルと日付を1行に整列（コンパクト＋上に区切り） */
  .customer-list-card td[data-label="最終来店"] {
    display: flex; align-items: baseline; gap: 8px;
    padding: 8px 28px 0 0; margin-top: 4px;
    border-top: 1px solid var(--utc-border);
  }
  .customer-list-card td[data-label="最終来店"]::before { margin-bottom: 0; }

  /* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
     抽選シミュレーション結果テーブル固有のカード化（v57 step8-mobile-tables）
     5 列: 等級 / 特典内容 / 設計値 / シミュ実測 / 視覚比較（progress bar 2 段）
     カード化により「等級ごとの設計 vs 実測」が縦並びで明確に把握できる。
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

  /* 1 段目: 等級（メダルアイコン + 等級名）を大きく */
  .lottery-sim-card td[data-label="等級"] {
    font-size: 18px;
    font-weight: 700;
    padding-bottom: 8px;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--utc-border);
  }
  .lottery-sim-card td[data-label="等級"]::before {
    display: none;  /* 等級はラベル不要 */
  }

  /* 設計値 / シミュ実測を横並びの 2 カラムに（数値比較のため）*/
  .lottery-sim-card td[data-label="設計値"],
  .lottery-sim-card td[data-label="シミュ実測"] {
    display: inline-block !important;
    width: 48%;
    text-align: center !important;
    padding: 4px 0;
  }
  .lottery-sim-card td[data-label="設計値"] {
    border-right: 1px solid var(--utc-border);
  }
  .lottery-sim-card td[data-label="設計値"]::before,
  .lottery-sim-card td[data-label="シミュ実測"]::before {
    text-align: center;
  }

  /* 視覚比較（progress bar）は幅いっぱいで */
  .lottery-sim-card td[data-label="視覚比較"] {
    padding: 8px 0 0;
  }

  /* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
     実績との照合テーブル: 「コンパクトに横スクロール最小化」型（v57 step8-mobile-tables）
     6 列の数値比較表で、横並び表示が情報構造として最適。
     カード化せず、padding 圧縮 + 列幅最小化で横スクロールを抑える。
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
  .compact-numeric-table table {
    min-width: 0;  /* 既存スマホ用 table { min-width: 560px } を解除 */
    font-size: 13px;
  }
  .compact-numeric-table th,
  .compact-numeric-table td {
    padding: 8px 6px !important;  /* 左右 padding を圧縮（既存 14px 16px → 8px 6px）*/
    white-space: nowrap;  /* 数値・等級名は改行させない */
  }
  .compact-numeric-table .badge {
    font-size: 10px;
    padding: 2px 6px;
    white-space: nowrap;
  }

  /* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
     店舗マスタテーブル固有のカード化（v57 step8-mobile-tables）
     6 列: 短縮名 / 正式名 / 住所 / 電話番号 / クチコミリンク / 操作
     各セルが input フォーム（短縮名既存行と操作除く）。
     カード化により縦並び入力欄で編集体験が大幅向上、🗑️ ボタンは右上絶対配置。
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

  /* 短縮名はカードのタイトル扱い（変更不可表示も含めて目立たせる） */
  .store-master-card td[data-label="短縮名"] {
    font-size: 16px;
    font-weight: 700;
    padding-bottom: 12px;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--utc-border);
    padding-right: 48px;  /* 右上の 🗑️ と重ならない余白 */
  }
  .store-master-card td[data-label="短縮名"]::before {
    display: none;  /* 短縮名はラベル不要 */
  }

  /* 操作列（🗑️）を右上絶対配置 */
  .store-master-card td.store-action-cell {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 0;
    width: auto;
  }
  .store-master-card td.store-action-cell::before {
    display: none;
  }

  /* 入力フォームを幅いっぱいに（既存の form-control の 16px フォント維持で iOS auto-zoom 防止） */
  .store-master-card td input.form-control {
    width: 100%;
    box-sizing: border-box;
  }
}

/* タッチデバイス全般: hover の :hover による誤発火を抑止 */
@media (hover: none) {
  .btn:hover { transform: none; }
  tbody tr:hover { background: transparent; }
}
