/* ============================================================
   FP Compass v2 - Detail Polish Layer
   - 既存 styles.css の上に被せる「洗練化レイヤー」
   - Inter (英字) + Noto Sans JP + Noto Serif JP (見出し)
   - 紺×白×LINE緑ベースを維持しつつ余白・タイポ・影を磨く
============================================================ */

:root {
  --bg: #f4f5f9;
  --surface: #ffffff;
  --surface-2: #fafbfd;
  --ink: #14171f;
  --ink-2: #2a3142;
  --muted: #6b7280;
  --muted-2: #9aa1ad;
  --line: #e6e8ee;
  --line-2: #d4d8df;
  --accent: #0a2540;
  --accent-2: #1a4480;
  --accent-soft: #eef2f9;
  --line-green: #06c755;
  --line-green-deep: #04a045;
  --line-green-soft: #e6f7ee;
  --gold: #b8893d;
  --gold-soft: #fbf4e6;
  --red: #c0392b;
  --red-soft: #fce8e6;
  --shadow-xs: 0 1px 2px rgba(20, 23, 31, 0.04);
  --shadow-sm: 0 1px 3px rgba(20, 23, 31, 0.06), 0 1px 2px rgba(20, 23, 31, 0.04);
  --shadow-md: 0 4px 12px rgba(20, 23, 31, 0.07), 0 2px 4px rgba(20, 23, 31, 0.04);
  --shadow-lg: 0 12px 32px rgba(20, 23, 31, 0.10), 0 4px 8px rgba(20, 23, 31, 0.05);
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;
}

body {
  font-family: 'Inter', 'Noto Sans JP', -apple-system, BlinkMacSystemFont, 'Hiragino Sans', sans-serif;
  font-size: 14px;
  line-height: 1.6;
  background: var(--bg);
  color: var(--ink);
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ───────── Header ───────── */
.app-header {
  background: linear-gradient(180deg, #ffffff, #fcfcfe);
  border-bottom: 1px solid var(--line);
  padding: 16px 32px;
  box-shadow: var(--shadow-xs);
}
.app-title {
  font-family: 'Noto Serif JP', serif;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  gap: 14px;
}
.app-title .logo {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-radius: 8px;
  color: #fff;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.06em;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(10, 37, 64, 0.22);
}
.app-title .sub {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
  margin-left: 4px;
  border-left: 1px solid var(--line);
  padding-left: 12px;
}
.app-meta {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--muted);
}

/* ───────── Tabs ───────── */
.tabs {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 0 32px;
  display: flex;
  gap: 2px;
}
.tab {
  padding: 14px 18px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  letter-spacing: 0.01em;
  transition: all 0.15s;
}
.tab:hover {
  color: var(--ink);
  background: var(--accent-soft);
}
.tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  font-weight: 700;
}

/* ───────── Container & Section ───────── */
.container {
  max-width: 1320px;
  padding: 32px;
}

.section-title {
  font-family: 'Noto Serif JP', serif;
  font-size: 18px;
  font-weight: 600;
  color: #1f2a3f;
  letter-spacing: 0.02em;
  margin: 32px 0 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e8e2d4;
  position: relative;
}
.section-title::before {
  content: attr(data-eyebrow);
  display: block;
  font-family: 'Inter', sans-serif;
  font-size: 10.5px;
  font-weight: 700;
  color: #8b7d5d;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 3px;
}
.section-sub {
  font-size: 12.5px;
  color: #6b7280;
  margin: -10px 0 18px;
  line-height: 1.65;
  letter-spacing: 0.02em;
}

/* ───────── KPI ───────── */
.kpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.kpi {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow-xs);
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}
.kpi:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}
.kpi::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--gold));
  opacity: 0;
  transition: opacity 0.2s;
}
.kpi:hover::after { opacity: 1; }
.kpi-label {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 6px;
}
.kpi-value {
  font-family: 'Inter', sans-serif;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.kpi-value .unit {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  margin-left: 4px;
}
.kpi-sub {
  font-size: 11px;
  color: var(--muted);
  margin-top: 6px;
  letter-spacing: 0.02em;
}
.kpi.alert .kpi-value { color: var(--red); }
.kpi.warn .kpi-value { color: var(--gold); }
.kpi.good .kpi-value { color: var(--line-green-deep); }

/* ───────── Action List (今週話すべき顧客) ───────── */
.action-list {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
}
.action-item {
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  transition: background 0.12s;
}
.action-item:hover { background: var(--surface-2); }
.action-item:last-child { border-bottom: none; }
.action-priority {
  font-family: 'Inter', sans-serif;
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 4px 10px;
  border-radius: 12px;
  border: 1px solid currentColor;
  background: rgba(255,255,255,0.5);
}
.action-priority.high { color: var(--red); background: var(--red-soft); }
.action-priority.mid { color: var(--gold); background: var(--gold-soft); }
.action-priority.low { color: var(--accent); background: var(--accent-soft); }
.action-client {
  font-weight: 600;
  font-size: 14.5px;
  font-family: 'Noto Sans JP', sans-serif;
}

/* ───────── Tables ───────── */
table.clients {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
  font-size: 13px;
  border-collapse: separate;
  border-spacing: 0;
}
table.clients th {
  background: var(--surface-2);
  font-weight: 700;
  font-size: 10.5px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}
table.clients td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
}
table.clients tr:last-child td { border-bottom: none; }
table.clients tbody tr { cursor: pointer; transition: background 0.1s; }
table.clients tbody tr:hover { background: var(--accent-soft); }

/* ───────── Status pills ───────── */
.status-pill {
  font-family: 'Inter', sans-serif;
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 3px 9px;
  border-radius: 11px;
}
.status-pill.active { background: var(--line-green-soft); color: var(--line-green-deep); }
.status-pill.important {
  background: linear-gradient(135deg, var(--gold-soft), #fff);
  color: var(--gold);
  border: 1px solid var(--gold);
}
.status-pill.new { background: var(--accent-soft); color: var(--accent); }
.status-pill.dormant { background: #f0f0f0; color: var(--muted); }

/* ───────── Buttons ───────── */
button {
  font-family: 'Inter', 'Noto Sans JP', sans-serif;
  font-weight: 500;
  font-size: 12.5px;
  letter-spacing: 0.02em;
  padding: 8px 14px;
  border-radius: 7px;
  border: 1px solid var(--line-2);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  transition: all 0.15s;
}
button:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
}
button.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  border-color: var(--accent);
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(10, 37, 64, 0.18);
}
button.primary:hover {
  background: linear-gradient(135deg, var(--accent-2), #2557a3);
  box-shadow: 0 4px 12px rgba(10, 37, 64, 0.25);
}

/* ───────── Inputs ───────── */
input, select, textarea {
  font-family: inherit;
  font-size: 13px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 8px 12px;
  background: var(--surface);
  transition: all 0.15s;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(10, 37, 64, 0.08);
}

/* ───────── Modal ───────── */
.modal-overlay {
  background: rgba(10, 23, 41, 0.62);
  backdrop-filter: blur(4px);
}
.modal {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--line);
}
.modal-header {
  padding: 22px 28px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #fafbfd, #ffffff);
}
.modal-header h2 {
  font-family: 'Noto Serif JP', serif;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.modal-body { padding: 24px 28px 32px; }

/* ───────── LINE 連携カード ───────── */
.line-hero {
  background: linear-gradient(135deg, #04a045 0%, #06c755 100%);
  border-radius: var(--radius-lg);
  padding: 22px 26px;
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
  box-shadow: 0 8px 24px rgba(6, 199, 85, 0.22);
  position: relative;
  overflow: hidden;
}
.line-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(255,255,255,0.18), transparent 60%);
  pointer-events: none;
}
.line-hero-logo {
  width: 50px;
  height: 50px;
  background: rgba(255,255,255,0.95);
  color: #04a045;
  border-radius: 12px;
  font-weight: 900;
  font-size: 14px;
  letter-spacing: 0.05em;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.line-hero-title {
  font-family: 'Noto Serif JP', serif;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* ───────── LINE Sub Nav ───────── */
.line-subnav {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 4px;
  margin-bottom: 22px;
  display: flex;
  gap: 2px;
  overflow-x: auto;
  box-shadow: var(--shadow-xs);
}
.line-subtab {
  padding: 9px 14px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  border-radius: 6px;
  border-bottom: none;
  letter-spacing: 0.01em;
  white-space: nowrap;
  transition: all 0.12s;
}
.line-subtab:hover {
  background: var(--accent-soft);
  color: var(--ink);
}
.line-subtab.active {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  font-weight: 600;
  border-bottom: none;
  box-shadow: 0 2px 6px rgba(10, 37, 64, 0.18);
}

/* ───────── Segment cards ───────── */
.segment-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  cursor: pointer;
  transition: all 0.18s;
  box-shadow: var(--shadow-xs);
}
.segment-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.seg-icon { font-size: 22px; }
.seg-name {
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 14.5px;
  font-weight: 600;
}
.seg-count {
  background: var(--accent-soft);
  color: var(--accent);
  padding: 3px 11px;
  border-radius: 12px;
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

/* ───────── Schedule table ───────── */
.sched-table {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
}
.sched-table th {
  background: var(--surface-2);
  font-size: 10.5px;
  letter-spacing: 0.08em;
}
.sched-row {
  padding: 14px 18px;
  transition: background 0.1s;
}
.sched-row:hover { background: var(--surface-2); }

/* ───────── Funnel ───────── */
.funnel-step {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 12px;
  text-align: center;
  box-shadow: var(--shadow-xs);
  transition: all 0.18s;
}
.funnel-step:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.funnel-step.highlight {
  background: linear-gradient(135deg, var(--gold-soft), #fff);
  border-color: var(--gold);
}
.funnel-value {
  font-family: 'Inter', sans-serif;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.funnel-label {
  font-family: 'Inter', sans-serif;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.funnel-conv {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 700;
  color: var(--line-green-deep);
  letter-spacing: 0.02em;
  margin-top: 4px;
}
.funnel-arrow {
  font-size: 22px;
  font-weight: 300;
  color: var(--muted-2);
}

/* ───────── Booking / Lead cards (admin系) ───────── */
.booking-row, .bday-row {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 8px;
  padding: 16px 20px;
  display: grid;
  grid-template-columns: 90px 1fr 180px;
  gap: 14px;
  align-items: center;
  transition: all 0.15s;
  box-shadow: var(--shadow-xs);
}
.booking-row:hover, .bday-row:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-sm);
}
.booking-date {
  font-family: 'Inter', sans-serif;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.booking-time {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}
.booking-name {
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 15px;
  font-weight: 600;
}
.booking-meta {
  display: inline-block;
  font-size: 11.5px;
  background: var(--accent-soft);
  color: var(--accent);
  padding: 3px 10px;
  border-radius: 11px;
  font-weight: 500;
  margin-top: 4px;
}
.booking-want {
  font-size: 13px;
  color: var(--muted);
  margin-top: 6px;
  font-style: italic;
  letter-spacing: 0.01em;
}

/* ───────── Live indicator ───────── */
.live-bar {
  background: linear-gradient(135deg, #04a045 0%, #06c755 100%);
  color: #fff;
  border-radius: var(--radius);
  padding: 12px 18px;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  box-shadow: 0 4px 14px rgba(6, 199, 85, 0.20);
  font-family: 'Inter', 'Noto Sans JP', sans-serif;
}
.live-bar .live-dot {
  width: 8px;
  height: 8px;
  background: #fff;
  border-radius: 50%;
  animation: live-pulse 1.5s ease-in-out infinite;
}
@keyframes live-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}
.live-bar-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

/* ───────── Recording status ───────── */
.rec-pill {
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 3px 9px;
  border-radius: 11px;
  border: 1px solid;
  text-transform: uppercase;
}
.rec-pill.recording {
  color: var(--red);
  border-color: var(--red);
  background: var(--red-soft);
  animation: rec-pulse 1.4s ease-in-out infinite;
}
@keyframes rec-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}
.rec-pill.saved {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-soft);
}

.btn-rec-start {
  background: linear-gradient(135deg, #c0392b, #e74c3c);
  color: #fff;
  border: none;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 9px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 12.5px;
  box-shadow: 0 2px 6px rgba(192, 57, 43, 0.25);
}
.btn-rec-start:hover {
  background: linear-gradient(135deg, #a93225, #c0392b);
  box-shadow: 0 4px 10px rgba(192, 57, 43, 0.32);
}
.btn-rec-stop {
  background: #fff;
  color: var(--red);
  border: 2px solid var(--red);
  font-weight: 700;
}
.btn-rec-stop:hover { background: var(--red-soft); }

/* ───────── Misc spacing tweaks ───────── */
.detail-grid { gap: 18px; }
.detail-block {
  padding: 18px 20px;
  border-radius: var(--radius);
  background: var(--surface-2);
}
.detail-block h3 {
  font-size: 10.5px;
  letter-spacing: 0.1em;
  font-weight: 700;
}

/* ───────── Toolbar (検索バー等) ───────── */
.admin-toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.admin-toolbar input,
.admin-toolbar select {
  font-size: 13px;
  padding: 9px 13px;
}
.admin-toolbar input[type="search"] {
  flex: 1;
  min-width: 220px;
}
.admin-toolbar .count {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--muted);
  align-self: center;
  margin-left: auto;
}

/* Booking 録画 ボタン行 */
.booking-rec-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.booking-rec-row .btn-mini {
  font-size: 11.5px;
  padding: 5px 11px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 500;
}
.booking-rec-row .btn-mini:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

@media (max-width: 700px) {
  .container { padding: 20px 14px; }
  .app-header { padding: 12px 16px; }
  .tabs { padding: 0 12px; }
  .tab { padding: 12px 12px; font-size: 12px; }
  .kpi-row { grid-template-columns: 1fr 1fr; }
  .booking-row, .bday-row { grid-template-columns: 70px 1fr; }
  .booking-row > div:nth-child(3), .bday-row > div:nth-child(3) { grid-column: 1 / -1; }
}

/* ============================================================
   v3 仕上げ: アバター・ファネル・KPI mini chart・カードホバー
   ============================================================ */

/* ───────── Avatar (姓1文字円) ───────── */
.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-family: 'Noto Serif JP', serif;
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 0;
  color: #fff;
  background:
    linear-gradient(135deg,
      hsl(var(--avh, 200), 38%, 38%),
      hsl(var(--avh, 200), 42%, 28%));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.15),
    0 2px 6px rgba(20, 23, 31, 0.10);
  flex-shrink: 0;
  user-select: none;
}
.avatar-sm {
  width: 30px;
  height: 30px;
  font-size: 13px;
}
.avatar-lg {
  width: 56px;
  height: 56px;
  font-size: 22px;
}

/* ───────── action-item にアバター対応 ───────── */
.action-item {
  display: grid;
  grid-template-columns: 80px 1.6fr 1.4fr 100px;
  align-items: center;
  gap: 16px;
}
.action-client {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.action-client-body { min-width: 0; }
.action-client-name {
  font-family: 'Noto Sans JP', sans-serif;
  font-weight: 600;
  font-size: 14.5px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.client-meta {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 3px;
  letter-spacing: 0.02em;
}
.action-detail {
  font-size: 13.5px;
}
.action-detail strong {
  font-weight: 600;
  color: var(--ink);
}
.action-detail .reason {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 3px;
  letter-spacing: 0.01em;
}

/* ───────── 顧客テーブルの行: avatar 付き ───────── */
.client-row-name {
  display: flex;
  align-items: center;
  gap: 12px;
}
.client-row-name strong {
  font-family: 'Noto Sans JP', sans-serif;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.01em;
}

table.clients td {
  padding: 14px 18px;
}

/* ───────── KPI 強化: 大きな数字 + sparkline space ───────── */
.kpi-value {
  font-size: 34px;
  letter-spacing: -0.025em;
  font-weight: 700;
}
.kpi-label {
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
}
.kpi-sub {
  font-size: 10.5px;
  letter-spacing: 0.02em;
  color: var(--muted-2);
}

/* ───────── ファネル: 横バー可視化 ───────── */
.funnel-grid {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px 26px;
  box-shadow: var(--shadow-xs);
}
.funnel-step {
  padding: 14px 12px;
  border: none;
  box-shadow: none;
  background: transparent;
}
.funnel-step:hover {
  transform: none;
  box-shadow: none;
}
.funnel-step.highlight {
  background: linear-gradient(135deg, var(--gold-soft), transparent);
  border-radius: var(--radius);
}
.funnel-icon { font-size: 26px; line-height: 1; }

/* ───────── Card hover: より洗練 ───────── */
.line-card {
  transition: all 0.18s;
}
.action-list,
.line-card,
.action-list .action-item {
  transition: all 0.15s;
}
.action-item:hover {
  background: linear-gradient(90deg, var(--accent-soft), var(--surface)) !important;
}

/* ───────── Section title decorations ───────── */
.section-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--ink-2);
  padding-bottom: 10px;
  margin: 32px 0 16px;
}
.section-title::before {
  width: 18px;
  background: linear-gradient(90deg, var(--accent), var(--gold));
  height: 2px;
}

/* ───────── タブのアクティブインジケータ ───────── */
.tab.active {
  position: relative;
  border-bottom-color: transparent;
}
.tab.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 18px;
  right: 18px;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--gold));
  border-radius: 2px 2px 0 0;
}

/* ───────── サブナビのアクティブピル ───────── */
.line-subtab.active {
  box-shadow:
    0 4px 12px rgba(10, 37, 64, 0.25),
    inset 0 1px 0 rgba(255,255,255,0.18);
  background: linear-gradient(135deg, #14336b, var(--accent-2));
}

/* ───────── ボタン: 全体的にもう少し主張 ───────── */
button.primary {
  padding: 9px 18px;
  font-weight: 600;
  letter-spacing: 0.04em;
  font-size: 12.5px;
  box-shadow:
    0 2px 8px rgba(10, 37, 64, 0.22),
    inset 0 1px 0 rgba(255,255,255,0.15);
}
button.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(10, 37, 64, 0.30);
}

/* ───────── Live bar 強化 ───────── */
.live-bar {
  background:
    linear-gradient(135deg, #04a045 0%, #06c755 100%),
    radial-gradient(circle at top right, rgba(255,255,255,0.25), transparent 50%);
  padding: 14px 22px;
  letter-spacing: 0.02em;
}
.live-bar-label {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

/* ───────── Form/Modal の細部 ───────── */
.modal-header {
  background: linear-gradient(180deg, #ffffff, #f7f9fc);
}
.modal {
  border: 1px solid var(--line);
}
.form-section h3 {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--accent);
  border-bottom: 1px solid var(--line);
  padding-bottom: 6px;
}

/* ───────── Detail block の余白 ───────── */
.detail-block {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
}
.detail-block dt {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.05em;
}
.detail-block dd {
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink);
}

/* ───────── Status pill 微調整 ───────── */
.status-pill {
  font-size: 9.5px;
  padding: 3px 10px;
  border-radius: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-family: 'Inter', sans-serif;
  font-weight: 700;
}
.status-pill.important {
  background: linear-gradient(135deg, var(--gold-soft), #fff);
  color: var(--gold);
  border: 1px solid rgba(184, 137, 61, 0.4);
  box-shadow: 0 1px 3px rgba(184, 137, 61, 0.15);
}

/* ───────── レスポンシブ調整 ───────── */
@media (max-width: 900px) {
  .action-item {
    grid-template-columns: 60px 1fr;
    gap: 8px;
  }
  .action-detail, .action-cta {
    grid-column: 1 / -1;
  }
  .avatar { width: 32px; height: 32px; font-size: 14px; }
}

/* ============================================================
   v4: LINE公式関連 8サブタブ全面リフレッシュ
   ============================================================ */

/* ───── LINE ヒーローを更にリッチに ───── */
.line-hero {
  padding: 26px 32px;
  border-radius: 16px;
  box-shadow:
    0 12px 36px rgba(6, 199, 85, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
  position: relative;
  overflow: hidden;
}
.line-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at top right, rgba(255,255,255,0.25), transparent 55%),
    radial-gradient(ellipse at bottom left, rgba(255,255,255,0.10), transparent 45%);
  pointer-events: none;
}
.line-hero-left { gap: 18px; }
.line-hero-logo {
  width: 56px; height: 56px;
  border-radius: 14px;
  font-size: 15px;
}
.line-hero-title {
  font-family: 'Noto Serif JP', serif;
  font-size: 20px;
  letter-spacing: 0.03em;
  font-weight: 600;
}
.line-hero-sub {
  font-size: 12.5px;
  margin-top: 4px;
  opacity: 0.92;
  letter-spacing: 0.03em;
}
.line-hero-right button {
  padding: 11px 20px;
  font-weight: 700;
  border-radius: 8px;
  font-size: 13px;
  letter-spacing: 0.04em;
}

/* ───── サブナビ さらに洗練 ───── */
.line-subnav {
  padding: 5px;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}
.line-subtab {
  padding: 10px 16px;
  font-size: 12.5px;
  letter-spacing: 0.04em;
  font-weight: 500;
}

/* ───── line-card 全般 ───── */
.line-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
  overflow: hidden;
}

/* ───── 配信ダッシュボード: 配信予定行 ───── */
.sched-row {
  display: grid;
  grid-template-columns: 50px 1fr 200px;
  gap: 16px;
  padding: 16px 20px;
  align-items: center;
  border-bottom: 1px solid var(--line);
}
.sched-row:last-child { border-bottom: none; }
.sched-icon {
  font-size: 24px;
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--accent-soft), #fff);
  border: 1px solid var(--line);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sched-name {
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  margin-bottom: 3px;
}
.sched-meta {
  font-size: 11.5px;
  color: var(--muted);
  letter-spacing: 0.02em;
}
.sched-next {
  font-family: 'Inter', sans-serif;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--line-green-deep);
  letter-spacing: 0.02em;
  text-align: right;
  background: linear-gradient(135deg, var(--line-green-soft), transparent);
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid rgba(6, 199, 85, 0.25);
}

/* ───── 誕生日 行 ───── */
.bday-row {
  display: grid;
  grid-template-columns: 90px 1fr 150px;
  gap: 16px;
  padding: 14px 20px;
  align-items: center;
  border-bottom: 1px solid var(--line);
}
.bday-row:last-child { border-bottom: none; }
.bday-date {
  font-family: 'Inter', sans-serif;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.bday-rel {
  font-family: 'Inter', sans-serif;
  font-size: 10.5px;
  color: var(--gold);
  margin-top: 3px;
  font-weight: 600;
  letter-spacing: 0.05em;
}
.bday-main strong {
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 14.5px;
}
.bday-rel-tag {
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-left: 6px;
}
.bday-meta {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 4px;
  letter-spacing: 0.01em;
}
.line-status-pill {
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  background: #f0f0f0;
  color: var(--muted);
  padding: 4px 10px;
  border-radius: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.line-status-pill.on {
  background: var(--line-green-soft);
  color: var(--line-green-deep);
  border: 1px solid rgba(6, 199, 85, 0.3);
}

/* ───── セグメントカード ───── */
.segment-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}
.segment-card {
  padding: 20px 22px;
  border-radius: var(--radius-lg);
}
.seg-head {
  margin-bottom: 8px;
}
.seg-icon { font-size: 24px; }
.seg-name {
  font-size: 15px;
  letter-spacing: 0.02em;
}
.seg-count {
  font-size: 12px;
  padding: 4px 12px;
}
.seg-desc {
  font-size: 12px;
  line-height: 1.6;
  letter-spacing: 0.01em;
  margin-bottom: 14px;
}
.seg-members {
  gap: 5px;
  flex-wrap: wrap;
}
.seg-chip {
  background: var(--accent-soft);
  color: var(--accent);
  padding: 3px 10px;
  border-radius: 11px;
  font-size: 11px;
  letter-spacing: 0.02em;
  font-weight: 500;
}
.seg-chip.more {
  background: linear-gradient(135deg, var(--gold-soft), #fff);
  color: var(--gold);
  border: 1px solid rgba(184, 137, 61, 0.3);
}

/* ───── スケジュール テーブル → カード化 ───── */
.sched-table {
  border-radius: var(--radius-lg);
}
.sched-table th {
  font-size: 10.5px;
  letter-spacing: 0.1em;
  padding: 14px 16px;
}
.sched-table td {
  padding: 14px 16px;
  font-size: 13px;
}
.sched-table tr {
  transition: background 0.1s;
}
.sched-table tr:hover {
  background: var(--surface-2);
}
.sched-table .toggle-switch {
  vertical-align: middle;
}

/* ───── トグル スイッチ強化 ───── */
.toggle-switch {
  width: 44px;
  height: 24px;
}
.toggle-switch span {
  border-radius: 12px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.toggle-switch span::before {
  height: 18px;
  width: 18px;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.toggle-switch input:checked + span {
  background: linear-gradient(135deg, var(--line-green-deep), var(--line-green));
  box-shadow: 0 2px 8px rgba(6, 199, 85, 0.3);
}
.toggle-switch input:checked + span::before {
  transform: translateX(20px);
}

/* ───── テンプレカード ───── */
.tpl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.tpl-card {
  padding: 18px 20px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-xs);
  transition: all 0.18s;
}
.tpl-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: var(--accent);
}
.tpl-head {
  margin-bottom: 8px;
}
.tpl-name {
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.tpl-cat {
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  letter-spacing: 0.08em;
  font-weight: 700;
}
.tpl-target {
  font-size: 12px;
  margin-bottom: 12px;
  letter-spacing: 0.01em;
}
.tpl-body {
  font-size: 12.5px;
  line-height: 1.75;
  padding: 14px 16px;
  background: linear-gradient(135deg, #f0f9f4, #f9fbfa);
  border-left: 3px solid var(--line-green);
  border-radius: 0 8px 8px 0;
  white-space: pre-wrap;
  font-family: 'Noto Sans JP', sans-serif;
  letter-spacing: 0.01em;
  color: var(--ink-2);
}

/* ───── 設定: フォーム洗練 ───── */
.settings-row {
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
}
.settings-row label {
  font-family: 'Inter', sans-serif;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 6px;
}
.settings-row input[type="text"],
.settings-row input[type="password"] {
  font-size: 13.5px;
  padding: 10px 14px;
  border-radius: 7px;
}

/* ───── 送信ログ ───── */
.sched-table.log-table th {
  background: var(--surface-2);
}
.sched-table.log-table tbody tr {
  transition: background 0.12s;
}
.sched-table.log-table tbody tr:hover {
  background: linear-gradient(90deg, var(--accent-soft), transparent);
}

/* ───── ステップシナリオ表示 ───── */
.step-row {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}
.step-no {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-weight: 800;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  margin-right: 14px;
  box-shadow: 0 2px 6px rgba(10, 37, 64, 0.25);
}
.step-day {
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  background: var(--gold-soft);
  color: var(--gold);
  padding: 3px 9px;
  border-radius: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
}
.step-time {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.04em;
  margin-left: 8px;
}
.step-title {
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 13.5px;
  font-weight: 600;
  margin-left: 8px;
}
.step-body {
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.75;
  background: linear-gradient(135deg, #f0f9f4, #f9fbfa);
  border-left: 3px solid var(--line-green);
  padding: 10px 14px;
  border-radius: 0 8px 8px 0;
  white-space: pre-wrap;
  color: var(--ink-2);
  font-family: 'Noto Sans JP', sans-serif;
  letter-spacing: 0.01em;
}

/* ───── アンケート Q表示 ───── */
.q-row {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}
.q-no {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 11px;
  background: var(--accent-soft);
  color: var(--accent);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0.04em;
}
.q-label {
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 13.5px;
  font-weight: 600;
  margin-bottom: 6px;
}
.q-opt {
  font-size: 11.5px;
  padding: 3px 10px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--ink-2);
}

/* ───── KPI を LINE タブで強調 ───── */
[data-line-view] .kpi-value {
  font-size: 32px;
}
[data-line-view] .kpi {
  padding: 20px 22px;
}

@media (max-width: 700px) {
  .line-hero { padding: 18px 20px; flex-direction: column; align-items: flex-start; gap: 12px; }
  .line-hero-right { width: 100%; }
  .line-hero-right button { width: 100%; }
  .sched-row { grid-template-columns: 40px 1fr; gap: 10px; }
  .sched-row .sched-next { grid-column: 1 / -1; text-align: left; }
  .bday-row { grid-template-columns: 70px 1fr; }
  .bday-row > div:nth-child(3) { grid-column: 1 / -1; }
}

/* ============================================================
   v5: 使い方ガイド + ホバーヒント
   ============================================================ */

/* ───── タブ先頭の「使い方ガイド」バナー ───── */
.howto-banner {
  background: linear-gradient(135deg, #f0f7fc, #fff);
  border: 1px solid #c8dde9;
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 18px 22px;
  margin-bottom: 24px;
  position: relative;
}
.howto-banner-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.howto-banner-title {
  font-family: 'Inter', 'Noto Sans JP', sans-serif;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}
.howto-banner-subtitle {
  font-size: 12.5px;
  color: var(--muted);
  font-weight: 500;
  letter-spacing: 0.02em;
}
.howto-steps {
  display: grid;
  gap: 10px;
}
.howto-step {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 12px;
  font-size: 13px;
  line-height: 1.65;
  letter-spacing: 0.01em;
  color: var(--ink-2);
}
.howto-step-no {
  background: var(--accent);
  color: #fff;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 800;
  margin-top: 1px;
}
.howto-step strong {
  color: var(--ink);
  font-weight: 700;
}
.howto-step .btn-hint {
  background: #fff8e1;
  border: 1px solid #f0d36b;
  color: #8a6f1e;
  padding: 1px 7px;
  border-radius: 4px;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  margin: 0 3px;
}
.howto-banner-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: transparent;
  border: none;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
  padding: 4px 8px;
}
.howto-banner-close:hover {
  color: var(--accent);
  background: transparent;
  border: none;
}

/* ───── ボタンに hover で「いつ使う」ヒント (title属性 + 視覚補助) ───── */
button[data-hint], a[data-hint] {
  position: relative;
}
[data-hint]:hover::after {
  content: attr(data-hint);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: #fff;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 8px 12px;
  border-radius: 6px;
  white-space: nowrap;
  z-index: 1000;
  box-shadow: var(--shadow-md);
  pointer-events: none;
}
[data-hint]:hover::before {
  content: '';
  position: absolute;
  bottom: calc(100% + 2px);
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--ink);
  z-index: 1001;
}

/* ───── セクションタイトルの「目的」サブテキスト ───── */
.section-sub {
  font-size: 11.5px;
  color: var(--muted);
  font-weight: 400;
  letter-spacing: 0.02em;
  margin-top: -10px;
  margin-bottom: 14px;
  padding-left: 22px;
}
.section-sub strong { color: var(--accent); }

/* ───── ボタンラベル + 補助テキスト ───── */
button.btn-with-hint {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.3;
  padding: 9px 14px;
}
button.btn-with-hint .btn-main {
  font-size: 12.5px;
  font-weight: 700;
}
button.btn-with-hint .btn-sub {
  font-size: 10px;
  font-weight: 500;
  opacity: 0.75;
  margin-top: 2px;
  letter-spacing: 0.02em;
}

/* ============================================================
   v6: 4サブタブ構造化 - ハブ画面のセクション分け
   ============================================================ */
.hub-section-title {
  font-family: 'Noto Serif JP', serif;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink);
  margin: 0 0 16px;
  padding: 14px 20px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.quick-jump {
  display: inline-block;
  padding: 6px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: all 0.15s;
}
.quick-jump:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  transform: translateY(-1px);
}
.line-subtab {
  font-size: 13.5px !important;
  padding: 12px 20px !important;
  font-weight: 600 !important;
  letter-spacing: 0.01em !important;
}

/* ============================================================
   v7: アクションカード中心UI (タスクボード型)
============================================================ */

/* メインタブのLINE系 識別色 */
.tabs .tab.tab-line {
  color: var(--line-green-deep);
}
.tabs .tab.tab-line.active {
  color: var(--line-green-deep);
}
.tabs .tab.tab-line.active::after {
  background: linear-gradient(90deg, var(--line-green-deep), var(--line-green));
}

/* タスクボード セクション (大カード) */
.task-board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}
.task-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px 22px;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-xs);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.task-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}
.task-card::after {
  content: '→';
  position: absolute;
  bottom: 18px;
  right: 22px;
  font-size: 22px;
  color: var(--muted-2);
  transition: color 0.2s;
}
.task-card:hover::after {
  color: var(--accent);
}
.task-card .task-icon {
  font-size: 32px;
  line-height: 1;
}
.task-card .task-label {
  font-family: 'Inter', sans-serif;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--muted);
  text-transform: uppercase;
  margin-top: 6px;
}
.task-card .task-count {
  font-family: 'Inter', sans-serif;
  font-size: 38px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1;
  display: flex;
  align-items: baseline;
  gap: 5px;
}
.task-card .task-count .unit {
  font-size: 14px;
  color: var(--muted);
  font-weight: 600;
}
.task-card .task-title {
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 14.5px;
  font-weight: 600;
  margin-top: 4px;
  letter-spacing: 0.01em;
  color: var(--ink-2);
  line-height: 1.5;
}
.task-card .task-desc {
  font-size: 11.5px;
  color: var(--muted);
  letter-spacing: 0.01em;
  line-height: 1.55;
  margin-top: 2px;
}
.task-card.urgent {
  background: linear-gradient(135deg, #fff8e1, #fff);
  border-color: #f0d36b;
}
.task-card.urgent .task-count { color: #b87013; }
.task-card.action {
  background: linear-gradient(135deg, var(--line-green-soft), #fff);
  border-color: var(--line-green);
}
.task-card.action .task-count { color: var(--line-green-deep); }
.task-card.muted {
  background: var(--surface-2);
  opacity: 0.85;
}

/* タスクカード 大型バナー版 */
.task-banner {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px 26px;
  align-items: center;
  margin-bottom: 12px;
  cursor: pointer;
  transition: all 0.18s;
  box-shadow: var(--shadow-xs);
  text-decoration: none;
  color: inherit;
}
.task-banner:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
}
.task-banner-icon {
  font-size: 40px;
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--accent-soft), #fff);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
}
.task-banner-body strong {
  display: block;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 15px;
  letter-spacing: 0.01em;
  margin-bottom: 4px;
}
.task-banner-body span {
  font-size: 12.5px;
  color: var(--muted);
  letter-spacing: 0.01em;
}
.task-banner-cta {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.04em;
}

/* セクション境界 (画面を上から下に "概況→詳細" で並べる) */
.board-section {
  margin: 28px 0;
}
.board-section > h2 {
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--ink);
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.board-section > h2::before {
  content: '';
  width: 4px;
  height: 18px;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  border-radius: 2px;
}

/* 詳細を畳むコラプス */
details.collapse {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0;
  margin-bottom: 12px;
}
details.collapse > summary {
  padding: 14px 20px;
  cursor: pointer;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 13.5px;
  font-weight: 600;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
details.collapse > summary::-webkit-details-marker { display: none; }
details.collapse > summary::after {
  content: '＋';
  font-size: 18px;
  color: var(--muted);
  transition: transform 0.2s;
}
details.collapse[open] > summary::after {
  content: '−';
  transform: rotate(0);
}
details.collapse[open] > summary {
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}
details.collapse > .collapse-body {
  padding: 16px 20px;
}

/* ============================================================
   v8: プレミアム化レイヤー — のっぺり感解消・立体感・質感・ディテール
============================================================ */

:root {
  --shadow-card: 
    0 1px 2px rgba(20, 23, 31, 0.04),
    0 4px 12px rgba(20, 23, 31, 0.06),
    0 16px 32px rgba(20, 23, 31, 0.04);
  --shadow-card-hover:
    0 2px 4px rgba(20, 23, 31, 0.06),
    0 8px 20px rgba(20, 23, 31, 0.10),
    0 24px 48px rgba(10, 37, 64, 0.10);
  --shadow-inset: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

body {
  background: 
    radial-gradient(ellipse at top, rgba(10, 37, 64, 0.03), transparent 60%),
    var(--bg) !important;
}

/* ───── ヘッダー: 質感アップ ───── */
.app-header {
  background:
    linear-gradient(180deg, #ffffff, #fcfcfe) !important;
  border-bottom: 1px solid var(--line) !important;
  box-shadow:
    0 1px 2px rgba(20, 23, 31, 0.03),
    0 0 0 1px rgba(184, 137, 61, 0.05) !important;
  position: relative;
}
.app-header::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold) 30%, var(--gold) 70%, transparent);
  opacity: 0.4;
}
.app-title .logo {
  background:
    linear-gradient(135deg, var(--accent), var(--accent-2)) !important;
  box-shadow:
    0 2px 8px rgba(10, 37, 64, 0.30),
    inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
}

/* ───── タブ: 視認性 + 余白アップ ───── */
.tabs {
  padding: 4px 32px 0 !important;
  background:
    linear-gradient(180deg, #fcfcfe, #ffffff) !important;
  border-bottom: 1px solid var(--line) !important;
  position: relative;
}
.tab {
  padding: 16px 22px !important;
  font-size: 13.5px !important;
  font-weight: 600 !important;
  letter-spacing: 0.02em !important;
  border-radius: 6px 6px 0 0 !important;
  border-bottom: 2px solid transparent !important;
  position: relative;
  transition: all 0.18s !important;
}
.tab:hover {
  background: rgba(10, 37, 64, 0.04) !important;
}
.tab.active {
  background: var(--surface) !important;
  border-bottom-color: var(--accent) !important;
  font-weight: 700 !important;
  box-shadow: 0 -2px 8px rgba(10, 37, 64, 0.05) !important;
}
.tab.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 22px;
  right: 22px;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--gold));
  border-radius: 2px 2px 0 0;
}

/* ───── カード全般: 深い影 + ホバー浮き ───── */
.kpi, .action-list, .line-card, .booking-row, .bday-row,
.segment-card, .tpl-card, .sched-table, table.clients,
.tl-card, .funnel-grid, .task-card {
  box-shadow: var(--shadow-card) !important;
  border-radius: var(--radius) !important;
}
.kpi:hover, .segment-card:hover, .tpl-card:hover,
.tl-card:hover, .task-card:hover {
  box-shadow: var(--shadow-card-hover) !important;
  transform: translateY(-2px) !important;
}

/* ───── KPI: 大型数字 + 立体感 ───── */
.kpi {
  padding: 22px 24px !important;
  position: relative !important;
  overflow: hidden !important;
  background:
    linear-gradient(180deg, #ffffff, #fafbfd) !important;
}
.kpi-label {
  font-size: 10.5px !important;
  font-weight: 700 !important;
  letter-spacing: 0.16em !important;
  color: var(--muted) !important;
  margin-bottom: 10px !important;
}
.kpi-value {
  font-family: 'Inter', sans-serif !important;
  font-size: 36px !important;
  font-weight: 800 !important;
  letter-spacing: -0.025em !important;
  line-height: 1.05 !important;
  font-feature-settings: 'tnum';
}
.kpi-sub {
  font-size: 11px !important;
  color: var(--muted-2) !important;
  margin-top: 8px !important;
  letter-spacing: 0.03em !important;
}

/* ───── タスクカード: グラデ + 立体感 ───── */
.task-card {
  padding: 26px 24px !important;
  background:
    linear-gradient(180deg, #ffffff, #fafbfd) !important;
  position: relative;
}
.task-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, var(--accent), transparent);
  opacity: 0.3;
  transition: opacity 0.2s;
}
.task-card:hover::before { opacity: 1; }
.task-card.urgent {
  background:
    linear-gradient(180deg, #fff8e1, #fff) !important;
  border-color: #e6c969 !important;
}
.task-card.urgent::before {
  background: linear-gradient(180deg, var(--gold), transparent);
  opacity: 0.8;
}
.task-card.action {
  background:
    linear-gradient(180deg, var(--line-green-soft), #fff) !important;
  border-color: rgba(6, 199, 85, 0.35) !important;
}
.task-card.action::before {
  background: linear-gradient(180deg, var(--line-green), transparent);
  opacity: 0.8;
}
.task-card .task-icon {
  font-size: 36px !important;
  line-height: 1 !important;
  filter: drop-shadow(0 2px 4px rgba(20, 23, 31, 0.10));
}
.task-card .task-label {
  font-size: 10.5px !important;
  letter-spacing: 0.18em !important;
  margin-top: 10px !important;
  color: var(--muted) !important;
}
.task-card .task-count {
  font-size: 44px !important;
  font-weight: 800 !important;
  letter-spacing: -0.03em !important;
  margin-top: 2px !important;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
}
.task-card .task-title {
  font-size: 15px !important;
  margin-top: 6px !important;
  letter-spacing: 0.01em !important;
  font-weight: 700 !important;
}
.task-card .task-desc {
  font-size: 12px !important;
  line-height: 1.6 !important;
  margin-top: 4px !important;
  letter-spacing: 0.01em !important;
}
.task-card::after {
  font-size: 26px !important;
  bottom: 22px !important;
  right: 24px !important;
  transition: all 0.2s !important;
}
.task-card:hover::after {
  transform: translateX(4px);
}

/* ───── アクションリスト 各行 ───── */
.action-item {
  padding: 18px 22px !important;
  transition: all 0.15s !important;
}
.action-item:hover {
  background: linear-gradient(90deg, var(--accent-soft) 0%, transparent 80%) !important;
}

/* ───── アバター: 質感アップ ───── */
.avatar {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 2px 6px rgba(20, 23, 31, 0.15) !important;
  font-family: 'Noto Serif JP', serif !important;
  letter-spacing: 0 !important;
}

/* ───── プライマリボタン: グラデ + 強い影 ───── */
button.primary {
  background:
    linear-gradient(180deg, #1a4480, var(--accent)) !important;
  border: none !important;
  color: #fff !important;
  font-weight: 700 !important;
  font-size: 12.5px !important;
  letter-spacing: 0.06em !important;
  padding: 10px 20px !important;
  border-radius: 8px !important;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.15) inset,
    0 2px 4px rgba(10, 37, 64, 0.2),
    0 4px 12px rgba(10, 37, 64, 0.15) !important;
  transition: all 0.15s !important;
}
button.primary:hover {
  background:
    linear-gradient(180deg, #2557a3, #1a4480) !important;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.18) inset,
    0 4px 8px rgba(10, 37, 64, 0.25),
    0 8px 20px rgba(10, 37, 64, 0.20) !important;
  transform: translateY(-1px) !important;
}

/* ───── セクションタイトル: 質感アップ ───── */
.section-title {
  font-size: 12px !important;
  letter-spacing: 0.18em !important;
  font-weight: 700 !important;
  color: var(--ink-2) !important;
  padding-bottom: 12px !important;
  margin: 36px 0 18px !important;
  border-bottom: 1px solid var(--line) !important;
  position: relative;
}
.section-title::before {
  width: 24px !important;
  height: 2px !important;
  background: linear-gradient(90deg, var(--accent), var(--gold)) !important;
}

/* ───── テーブル行: 読みやすく ───── */
table.clients td {
  padding: 16px 18px !important;
  font-size: 13.5px !important;
}
table.clients th {
  font-size: 11px !important;
  letter-spacing: 0.14em !important;
  padding: 14px 18px !important;
  border-bottom: 1px solid var(--line-2) !important;
}
table.clients tbody tr {
  transition: all 0.12s !important;
}
table.clients tbody tr:hover {
  background: linear-gradient(90deg, var(--accent-soft) 0%, transparent 90%) !important;
}

/* ───── ステータスピル: 上質に ───── */
.status-pill {
  font-size: 10px !important;
  padding: 4px 11px !important;
  font-weight: 800 !important;
  letter-spacing: 0.1em !important;
  border-radius: 12px !important;
}
.status-pill.important {
  background: linear-gradient(135deg, #fdf4dd, #fff) !important;
  color: #8a6f1e !important;
  border: 1px solid rgba(184, 137, 61, 0.4) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    0 1px 2px rgba(184, 137, 61, 0.15) !important;
}
.status-pill.active {
  background: linear-gradient(135deg, var(--line-green-soft), #fff) !important;
  border: 1px solid rgba(6, 199, 85, 0.30) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    0 1px 2px rgba(6, 199, 85, 0.10) !important;
}

/* ───── モーダル: 文字被り修正 + ディテール ───── */
.modal-overlay {
  background: rgba(10, 23, 41, 0.65) !important;
  backdrop-filter: blur(8px) !important;
}
.modal {
  border: 1px solid var(--line) !important;
  border-radius: var(--radius-lg) !important;
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.35),
    0 4px 12px rgba(0, 0, 0, 0.15) !important;
  overflow: hidden;
}
.modal-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background:
    linear-gradient(180deg, #ffffff, #fafbfd) !important;
  border-bottom: 1px solid var(--line) !important;
  box-shadow: 0 2px 8px rgba(20, 23, 31, 0.04) !important;
  padding: 22px 28px !important;
}
.modal-body {
  padding: 26px 30px 36px !important;
}

/* ▼ モーダル内のセクション間に十分な余白 (文字被り防止) */
.detail-section {
  margin-top: 28px !important;
  padding-top: 4px !important;
}
.detail-section h3 {
  font-family: 'Inter', 'Noto Sans JP', sans-serif !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: 0.16em !important;
  color: var(--accent) !important;
  text-transform: uppercase !important;
  padding-bottom: 10px !important;
  margin-bottom: 14px !important;
  border-bottom: 1px solid var(--line) !important;
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
}
.detail-section h3::before {
  content: '' !important;
  width: 14px !important;
  height: 2px !important;
  background: linear-gradient(90deg, var(--accent), var(--gold)) !important;
}
.detail-section .count-badge {
  background: linear-gradient(135deg, var(--accent-soft), #fff) !important;
  color: var(--accent) !important;
  border: 1px solid rgba(10, 37, 64, 0.15) !important;
  border-radius: 11px !important;
  padding: 3px 10px !important;
  font-size: 10.5px !important;
  font-weight: 700 !important;
  letter-spacing: 0.06em !important;
  font-family: 'Inter', sans-serif !important;
}

.actions-list,
.client-timeline {
  background: linear-gradient(180deg, #fafbfd, #f5f6f8) !important;
  border: 1px solid var(--line) !important;
  border-radius: var(--radius) !important;
  padding: 16px 18px !important;
  margin-top: 6px !important;
  box-shadow: inset 0 1px 2px rgba(20, 23, 31, 0.03) !important;
}

/* ───── ハブセクション見出し: より重厚に ───── */
.board-section {
  margin: 36px 0 !important;
}
.board-section > h2 {
  font-family: 'Noto Sans JP', sans-serif !important;
  font-size: 18px !important;
  font-weight: 700 !important;
  letter-spacing: 0.02em !important;
  margin: 0 0 6px !important;
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  color: var(--ink) !important;
  padding-left: 0 !important;
  background: none !important;
  box-shadow: none !important;
  padding: 0 0 12px 0 !important;
  border-bottom: 2px solid var(--accent) !important;
  position: relative;
}
.board-section > h2::before {
  display: none !important;
}
.board-section > h2::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 60px;
  height: 2px;
  background: var(--gold);
}

/* ───── ホームの notice バナー: もっと印象的に ───── */
#notice-area > a {
  background:
    linear-gradient(135deg, #fff8e1 0%, #fdf4dd 50%, #fff 100%) !important;
  border: 2px solid #e6c969 !important;
  box-shadow:
    0 4px 12px rgba(184, 137, 61, 0.15),
    0 12px 28px rgba(184, 137, 61, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.6) !important;
  transition: all 0.2s !important;
}
#notice-area > a:hover {
  transform: translateY(-2px) !important;
  box-shadow:
    0 8px 24px rgba(184, 137, 61, 0.22),
    0 20px 40px rgba(184, 137, 61, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.7) !important;
}

/* ───── howto-banner ───── */
.howto-banner {
  background:
    linear-gradient(135deg, #f0f7fc 0%, #f7fafd 50%, #fff 100%) !important;
  border: 1px solid #c8dde9 !important;
  border-left: 4px solid var(--accent) !important;
  border-radius: var(--radius) !important;
  box-shadow:
    0 1px 2px rgba(10, 37, 64, 0.04),
    0 4px 12px rgba(10, 37, 64, 0.05) !important;
}

/* ───── ファネル ───── */
.funnel-grid {
  background:
    linear-gradient(180deg, #fff, #fafbfd) !important;
  padding: 24px !important;
}
.funnel-step {
  transition: all 0.18s !important;
}
.funnel-step:hover {
  transform: translateY(-2px) !important;
  box-shadow: var(--shadow-md) !important;
}
.funnel-value {
  font-size: 36px !important;
  font-weight: 800 !important;
  letter-spacing: -0.03em !important;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
}
.funnel-step.highlight {
  background:
    linear-gradient(135deg, #fff8e1, #fff) !important;
  box-shadow:
    0 4px 12px rgba(184, 137, 61, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.6) !important;
}

/* ───── LINE関連: ヒカル先生風 金線アクセント ───── */
.tab.tab-line.active::after {
  background: linear-gradient(90deg, var(--line-green-deep), var(--gold)) !important;
}

/* ───── スクロールバー (上品) ───── */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(10, 37, 64, 0.15);
  border-radius: 5px;
  border: 2px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(10, 37, 64, 0.35);
}

/* ───── フォーカス: 上品な金フォーカス ───── */
input:focus, select:focus, textarea:focus {
  outline: none !important;
  border-color: var(--gold) !important;
  box-shadow: 0 0 0 3px rgba(184, 137, 61, 0.15) !important;
}

/* ───── 候補日確定の各ボタン: 立体感 ───── */
[data-slot-confirm] {
  box-shadow:
    0 1px 2px rgba(20, 23, 31, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.5) !important;
  transition: all 0.15s !important;
}
[data-slot-confirm]:hover {
  border-color: var(--line-green) !important;
  background: linear-gradient(135deg, #fff, var(--line-green-soft)) !important;
  transform: translateX(2px) !important;
  box-shadow:
    0 2px 6px rgba(6, 199, 85, 0.15),
    0 4px 14px rgba(6, 199, 85, 0.10) !important;
}

/* ───── 文字被り防止: 一般的なz-index整理 ───── */
.detail-grid {
  position: relative;
  z-index: 1;
}
.detail-section {
  position: relative;
  z-index: 1;
  clear: both;
}
