/*
 * style.css — 民泊ブースター 営業デモ (v2: サイドバーシェル)
 * 仕様: /design/minpaku-demo_claude-code-spec.md §9
 * v2 方針: ヤマサキ風 flex h-100vh シェル + サイドバー + トップバー + メインのみスクロール
 */

/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans",
    "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", sans-serif;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow: hidden;
}
button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 0;
}
input, textarea, select { font: inherit; color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; line-height: 1.3; }
p { margin: 0; }
a { color: inherit; }

/* ===== Design Tokens ===== */
:root {
  /* Accent: 落ち着いた青緑 */
  --accent: #2C8C84;
  --accent-soft: #DDEEEC;
  --accent-strong: #1F6E68;

  /* Sidebar: ニュートラル チャコール */
  --side-bg: #2A3540;
  --side-bg-2: #232C36;
  --side-border: rgba(255,255,255,0.08);
  --side-active-bg: rgba(255,255,255,0.08);
  --side-text: #E7ECF0;
  --side-text-muted: rgba(231,236,240,0.65);

  /* Neutrals */
  --bg: #F4F6F8;
  --surface: #FFFFFF;
  --surface-2: #F8FAFC;
  --text: #1B2024;
  --text-muted: #5C6770;
  --border: #E4E7EA;
  --border-strong: #C9CFD4;

  /* Semantic */
  --ok: #2E8B57;
  --ok-soft: #E0F1E7;
  --warn: #C77700;
  --warn-soft: #FDEFD2;
  --danger: #C53030;
  --danger-soft: #FBE0E0;

  /* Geometry */
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 18px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 28px;

  /* Shell */
  --side-w: 248px;
  --top-h: 56px;
  --tab-h: 56px;

  /* Shadow */
  --shadow-1: 0 1px 2px rgba(20, 26, 30, 0.04), 0 1px 1px rgba(20, 26, 30, 0.03);
  --shadow-2: 0 4px 12px rgba(20, 26, 30, 0.06);

  /* Anim */
  --ease: cubic-bezier(.4, 0, .2, 1);
  --dur: 220ms;
}

/* ===== Shell ===== */
.app {
  display: flex;
  height: 100vh;
  overflow: hidden;
  background: var(--bg);
}

/* ===== Sidebar ===== */
.sidebar {
  width: var(--side-w);
  flex-shrink: 0;
  background: var(--side-bg);
  color: var(--side-text);
  display: flex;
  flex-direction: column;
  border-right: 1px solid #1B2329;
}
.sidebar-brand {
  display: flex; align-items: center; gap: 10px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--side-border);
  user-select: none;
  cursor: pointer;
  min-height: 64px;
}
.brand-mark {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  display: grid; place-items: center;
  flex-shrink: 0;
}
.brand-mark svg { width: 20px; height: 20px; }
.brand-text { min-width: 0; }
.brand-name {
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.01em;
  color: #fff;
}
.brand-sub {
  font-size: 11px;
  color: var(--side-text-muted);
  margin-top: 2px;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 12px 0;
}
.nav-label {
  padding: 8px 18px 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--side-text-muted);
  text-transform: uppercase;
}
.nav-item {
  width: 100%;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px 10px 14px;
  min-height: 44px;
  color: var(--side-text);
  border-left: 4px solid transparent;
  font-size: 14px;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.nav-item:hover { background: rgba(255,255,255,0.04); }
.nav-item.active {
  background: var(--side-active-bg);
  border-left-color: var(--accent);
}
.nav-item svg { width: 18px; height: 18px; flex-shrink: 0; opacity: 0.9; }
.nav-item .nav-text { flex: 1; text-align: left; }
.nav-item .nav-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(255,255,255,0.14);
  color: #fff;
}
.nav-item .nav-badge.danger { background: var(--danger); }
.nav-item .nav-badge.warn { background: var(--warn); color: #fff; }

.sidebar-foot {
  border-top: 1px solid var(--side-border);
  padding: 12px 16px;
}
.sidebar-me {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 8px;
}
.me-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: grid; place-items: center;
  font-weight: 700;
  font-size: 13px;
}
.me-name { font-size: 13px; font-weight: 600; color: #fff; line-height: 1.2; }
.me-sub { font-size: 10px; color: var(--side-text-muted); margin-top: 1px; }
.sidebar-credit {
  font-size: 10px;
  color: var(--side-text-muted);
  padding-top: 6px;
  border-top: 1px solid var(--side-border);
}
.sidebar-credit a { color: #fff; text-decoration: underline; text-underline-offset: 2px; }

/* ===== Main (TopBar + Content) ===== */
.main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

/* ===== TopBar ===== */
.topbar {
  height: var(--top-h);
  flex-shrink: 0;
  background: #fff;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 12px;
}
.topbar-left {
  display: flex; align-items: center; gap: 12px;
  min-width: 0;
  flex: 1;
}
.view-title {
  font-size: 16px;
  font-weight: 700;
  white-space: nowrap;
}
.topbar-sep {
  color: var(--border-strong);
  font-size: 14px;
}
.sync-status {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pulse-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--ok);
  animation: pulse-dot 1.6s var(--ease) infinite;
}
.topbar-right {
  display: flex; align-items: center; gap: 8px;
  flex-shrink: 0;
}
.tour-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: 12.5px;
  min-height: 36px;
  transition: background var(--dur) var(--ease);
}
.tour-btn:hover { background: var(--accent-strong); }
.tour-btn.active { background: var(--danger); }

.bell-btn {
  position: relative;
  width: 36px; height: 36px;
  border-radius: 8px;
  display: grid; place-items: center;
  color: var(--text-muted);
  transition: background var(--dur) var(--ease);
}
.bell-btn:hover { background: var(--surface-2); }
.bell-badge {
  position: absolute;
  top: 4px; right: 4px;
  min-width: 16px; height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: grid; place-items: center;
}

/* ===== Content ===== */
.content {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

/* ===== Bottom Nav (mobile) ===== */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--tab-h);
  background: var(--side-bg);
  border-top: 1px solid #1B2329;
  z-index: 30;
}
.bottom-nav .tab-item {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px;
  color: var(--side-text-muted);
  font-size: 10px;
  position: relative;
  min-width: 0;
}
.bottom-nav .tab-item svg { width: 20px; height: 20px; }
.bottom-nav .tab-item.active { color: #fff; }
.bottom-nav .tab-item.active::before {
  content: '';
  position: absolute;
  top: 0; left: 30%; right: 30%;
  height: 3px;
  background: var(--accent);
  border-radius: 0 0 3px 3px;
}
.bottom-nav .tab-badge {
  position: absolute;
  top: 6px; right: 18%;
  min-width: 14px; height: 14px;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  display: grid; place-items: center;
  padding: 0 3px;
}

/* ===== Card ===== */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow-1);
  transition: box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.card-link { cursor: pointer; }
.card-link:hover { box-shadow: var(--shadow-2); }
.card-link:active { transform: translateY(1px); }
.card-header {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 12px;
}
.card-title {
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.01em;
  display: flex; align-items: center; gap: 8px;
}
.card-title svg { color: var(--accent); }
.card-cta {
  margin-left: auto;
  font-size: 11.5px;
  color: var(--accent);
  display: inline-flex; align-items: center; gap: 2px;
}
.card-cta svg { width: 12px; height: 12px; }

/* ===== KPI Row (新ダッシュボード上段) ===== */
.kpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}
.kpi-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: var(--shadow-1);
  display: flex; flex-direction: column;
  min-width: 0;
}
.kpi-card .kpi-label {
  font-size: 11.5px;
  color: var(--text-muted);
  display: flex; align-items: center; gap: 6px;
}
.kpi-card .kpi-label svg { width: 14px; height: 14px; }
.kpi-card .kpi-value {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-top: 4px;
  line-height: 1.15;
}
.kpi-card .kpi-value.danger { color: var(--danger); }
.kpi-card .kpi-value.warn { color: var(--warn); }
.kpi-card .kpi-value.ok { color: var(--ok); }
.kpi-card .kpi-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ===== Dashboard grid (2列) ===== */
.dash-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  align-items: start;
}
.dash-grid .full {
  grid-column: 1 / -1;
}

/* ===== Badge / Chip ===== */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  white-space: nowrap;
}
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.danger { background: var(--danger-soft); color: var(--danger); }
.badge.neutral { background: #EEF0F2; color: var(--text-muted); }

.chip {
  display: inline-flex; align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 13px;
  min-height: 36px;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.chip:hover { background: var(--accent-soft); border-color: var(--accent); }
.chip.selected {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.chip-row {
  display: flex; flex-wrap: wrap; gap: 8px;
}

/* ===== Button ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 16px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: 13px;
  min-height: 40px;
  transition: background var(--dur) var(--ease), transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
}
.btn:hover { background: var(--accent-strong); }
.btn:active { transform: scale(0.97); }
.btn[disabled] { opacity: 0.45; pointer-events: none; }
.btn.btn-ghost {
  background: var(--surface);
  color: var(--accent-strong);
  border: 1px solid var(--border-strong);
}
.btn.btn-ghost:hover { background: var(--accent-soft); }
.btn.btn-danger { background: var(--danger); }
.btn.btn-danger:hover { background: #A12525; }

/* ===== Meter (180日コンプラ) ===== */
.meter { margin-bottom: 10px; }
.meter:last-child { margin-bottom: 0; }
.meter-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 4px;
}
.meter-name { font-size: 12.5px; font-weight: 600; }
.meter-value { font-size: 11px; color: var(--text-muted); }
.meter-bar {
  height: 8px;
  background: #ECEEF0;
  border-radius: 999px;
  overflow: hidden;
}
.meter-fill {
  height: 100%;
  transition: width 600ms var(--ease);
  border-radius: 999px;
}
.meter-fill.ok { background: var(--ok); }
.meter-fill.warn { background: var(--warn); }
.meter-fill.over { background: var(--danger); }
.meter-foot { margin-top: 4px; font-size: 11px; color: var(--text-muted); }
.meter-foot strong { font-weight: 700; }
.meter-foot.over strong { color: var(--danger); }
.meter-foot.warn strong { color: var(--warn); }
.meter-foot.ok strong { color: var(--ok); }

/* ===== KPI numbers inside cards ===== */
.kpi {
  display: flex; flex-direction: column; gap: 2px;
}
.kpi-label { font-size: 11px; color: var(--text-muted); }
.kpi-value {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.kpi-value.danger { color: var(--danger); }
.kpi-sub { font-size: 11px; color: var(--text-muted); }

/* ===== Inbox list ===== */
.inbox-row {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}
.inbox-row:last-child { border-bottom: 0; }
.inbox-row:hover { background: var(--surface-2); }
.inbox-row .ch-mark {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-strong);
  display: grid; place-items: center;
  font-size: 10px; font-weight: 700;
  flex-shrink: 0;
}
.inbox-row .ch-mark.airbnb { background: #FFE0E5; color: #C73954; }
.inbox-row .ch-mark.booking { background: #DDE6FA; color: #1F3D8E; }
.inbox-row .ch-mark.rakuten { background: #FBD7D7; color: #B71F1F; }
.inbox-row .ch-mark.jalan { background: #FCE6CC; color: #B66F1A; }
.inbox-row .body { flex: 1; min-width: 0; }
.inbox-row .meta { display: flex; align-items: center; gap: 6px; font-size: 10.5px; color: var(--text-muted); margin-bottom: 2px; }
.inbox-row .summary { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inbox-row .tail { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }

/* ===== Timeline ===== */
.timeline { display: flex; flex-direction: column; gap: 6px; }
.timeline-item {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 8px;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
}
.timeline-item .time { font-size: 12px; font-weight: 700; min-width: 48px; }
.timeline-item .label { font-size: 12.5px; flex: 1; min-width: 0; }
.timeline-item .tag {
  font-size: 10.5px; padding: 2px 7px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text-muted);
  white-space: nowrap;
}
.timeline-item .tag.ok { background: var(--ok-soft); border-color: var(--ok-soft); color: var(--ok); }
.timeline-item .tag.warn { background: var(--warn-soft); border-color: var(--warn-soft); color: var(--warn); }

/* ===== Turnover mini kanban ===== */
.turnover-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  margin-bottom: 10px;
  background: var(--surface-2);
}
.turnover-card:last-child { margin-bottom: 0; }
.turnover-card h4 { font-size: 13px; margin-bottom: 6px; }
.lane-row {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 4px; margin: 6px 0;
  align-items: center;
}
.lane-step {
  font-size: 10.5px;
  padding: 5px 4px;
  border-radius: 6px;
  background: var(--surface);
  color: var(--text-muted);
  text-align: center;
  border: 1px solid var(--border);
}
.lane-step.done { background: var(--ok-soft); color: var(--ok); border-color: var(--ok-soft); }
.lane-step.current { background: var(--accent); color: #fff; border-color: var(--accent); animation: pulse 1.4s var(--ease) infinite; }

.verdict-bar {
  margin-top: 8px;
  padding: 7px 10px;
  background: var(--ok-soft);
  color: var(--ok);
  font-size: 12px; font-weight: 600;
  border-radius: var(--radius-sm);
}

/* ===== Risk row ===== */
.risk-row {
  display: flex; gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.risk-row:last-child { border-bottom: 0; }
.risk-row .ico {
  width: 32px; height: 32px;
  border-radius: 8px;
  display: grid; place-items: center;
  flex-shrink: 0;
}
.risk-row .ico.danger { background: var(--danger-soft); color: var(--danger); }
.risk-row .ico.warn { background: var(--warn-soft); color: var(--warn); }
.risk-row .body { flex: 1; min-width: 0; }
.risk-row .meta { font-size: 10.5px; color: var(--text-muted); margin-bottom: 2px; }
.risk-row .body p { font-size: 12.5px; margin-bottom: 4px; }
.risk-row .body .suggestion { font-size: 11.5px; color: var(--accent-strong); }

/* ===== Conversation view (M1) ===== */
.conv-wrap { display: flex; flex-direction: column; gap: 10px; }
.bubble {
  max-width: 88%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 13.5px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}
.bubble.guest {
  align-self: flex-start;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-top-left-radius: 4px;
}
.bubble.ai {
  align-self: flex-end;
  background: var(--accent);
  color: #fff;
  border-top-right-radius: 4px;
}
.bubble.ai.draft {
  background: var(--accent-soft);
  color: var(--accent-strong);
  border: 1px dashed var(--accent);
}
.bubble.note {
  align-self: stretch;
  background: var(--warn-soft);
  border: 1px solid var(--warn);
  color: var(--warn);
  font-size: 12.5px;
  text-align: center;
}
.bubble .ts { display: block; font-size: 10px; opacity: 0.7; margin-top: 4px; }

.typing-dots {
  display: inline-flex; gap: 4px;
  padding: 10px 14px;
  background: var(--accent-soft);
  border-radius: 16px;
  align-self: flex-end;
}
.typing-dots span {
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
  animation: dot 1.2s var(--ease) infinite;
}
.typing-dots span:nth-child(2) { animation-delay: 0.15s; }
.typing-dots span:nth-child(3) { animation-delay: 0.3s; }

.cursor-blink::after {
  content: '▌';
  margin-left: 2px;
  animation: blink 0.9s infinite;
}

.lang-tabs {
  display: flex; gap: 6px;
  margin-top: 6px;
  flex-wrap: wrap;
}

/* ===== Modal ===== */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(20, 26, 30, 0.5);
  z-index: 50;
  display: grid; place-items: center;
  padding: 16px;
  animation: fade-in 200ms var(--ease);
}
.modal {
  background: var(--surface);
  border-radius: var(--radius-lg);
  max-width: 560px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px;
  animation: pop-in 280ms var(--ease);
}
.modal h3 { font-size: 17px; margin-bottom: 12px; }
.modal-actions { display: flex; gap: 8px; margin-top: 16px; justify-content: flex-end; }

/* ===== Toast ===== */
.toast-stack {
  position: fixed; bottom: 24px; left: 0; right: 0;
  display: flex; flex-direction: column; align-items: center;
  gap: 8px; z-index: 60;
  pointer-events: none;
}
.toast {
  background: rgba(27, 32, 36, 0.92);
  color: #fff;
  font-size: 12.5px;
  padding: 10px 18px;
  border-radius: 999px;
  animation: toast-in 240ms var(--ease);
  pointer-events: auto;
}

/* ===== Spinner ===== */
.spinner {
  width: 26px; height: 26px;
  border: 3px solid var(--accent-soft);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

/* ===== Damage photo grid ===== */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 8px;
}
.photo-cell {
  position: relative;
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, #DDE2E6, #C4CCD2);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.photo-cell .label {
  position: absolute; left: 6px; bottom: 6px;
  font-size: 10.5px; color: #fff;
  background: rgba(0,0,0,0.42);
  padding: 2px 6px; border-radius: 4px;
}
.photo-cell .ai-tag {
  position: absolute; top: 6px; left: 6px;
  font-size: 10.5px;
  background: var(--warn);
  color: #fff;
  padding: 3px 8px;
  border-radius: 999px;
  font-weight: 600;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 320ms var(--ease), transform 320ms var(--ease);
}
.photo-cell .ai-tag.show {
  opacity: 1;
  transform: translateY(0);
}
.photo-cell .icon-overlay {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  color: rgba(255,255,255,0.7);
}
.photo-cell .icon-overlay svg { width: 28px; height: 28px; }

/* ===== Tour overlay ===== */
.tour-caption {
  position: fixed;
  left: 50%; bottom: 24px;
  transform: translateX(-50%);
  background: rgba(27, 32, 36, 0.93);
  color: #fff;
  padding: 12px 20px;
  border-radius: var(--radius);
  font-size: 13.5px;
  z-index: 55;
  max-width: 86vw;
  text-align: center;
  animation: slide-up 320ms var(--ease);
}
.tour-highlight {
  position: relative;
  z-index: 25;
  box-shadow: 0 0 0 3px var(--accent-soft), 0 0 0 5px var(--accent);
  border-radius: var(--radius);
  animation: highlight-pulse 1.4s var(--ease) infinite;
}

/* ===== Feedback (反応キャプチャ) ===== */
.feedback-card {
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 16px;
  margin-top: 14px;
}
.feedback-card h3 {
  color: var(--accent-strong);
  font-size: 15px;
  margin-bottom: 10px;
}
.feedback-row {
  display: flex; flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
}
.feedback-row label { font-size: 11.5px; color: var(--text-muted); }
.feedback-card .chip { background: var(--surface); }

/* ===== Chart wrapper ===== */
.chart-wrap {
  position: relative;
  height: 220px;
  margin-top: 12px;
}

/* ===== Animations ===== */
@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes pop-in {
  from { opacity: 0; transform: translateY(8px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes toast-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes dot {
  0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-3px); }
}
@keyframes blink {
  50% { opacity: 0; }
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(44, 140, 132, 0.4); }
  50% { box-shadow: 0 0 0 6px rgba(44, 140, 132, 0); }
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
@keyframes slide-up {
  from { opacity: 0; transform: translate(-50%, 16px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}
@keyframes highlight-pulse {
  0%, 100% { box-shadow: 0 0 0 3px var(--accent-soft), 0 0 0 5px var(--accent); }
  50% { box-shadow: 0 0 0 5px var(--accent-soft), 0 0 0 9px rgba(44, 140, 132, 0.4); }
}

/* ===== View transitions ===== */
.view { animation: view-in 240ms var(--ease); }
@keyframes view-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== Small utilities ===== */
.row { display: flex; align-items: center; gap: 8px; }
.row.between { justify-content: space-between; }
.row.wrap { flex-wrap: wrap; }
.muted { color: var(--text-muted); }
.danger { color: var(--danger); }
.ok { color: var(--ok); }
.warn { color: var(--warn); }
.small { font-size: 11.5px; }
.center { text-align: center; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.spacer { flex: 1; }
.divider { height: 1px; background: var(--border); margin: 12px 0; }

/* ===== Responsive ===== */

/* ノートPCに合わせて少し情報密度を上げる */
@media (min-width: 1280px) {
  .content { padding: 24px 28px; }
  .kpi-card .kpi-value { font-size: 28px; }
  body { font-size: 14.5px; }
}

/* タブレット縦 (≥ 768px ≤ 1023px): 1カラム＋サイドバー細め */
@media (max-width: 1023px) and (min-width: 768px) {
  :root { --side-w: 220px; }
  .dash-grid { grid-template-columns: 1fr; }
  .kpi-row { grid-template-columns: repeat(2, 1fr); }
}

/* モバイル (< 768px): サイドバー消し・下タブ表示 */
@media (max-width: 767px) {
  .sidebar { display: none; }
  .bottom-nav { display: flex; }
  .content {
    padding: 14px;
    padding-bottom: calc(var(--tab-h) + 16px);
  }
  .topbar {
    height: 48px;
    padding: 0 12px;
  }
  .view-title { font-size: 15px; }
  .topbar-sep, .sync-status { display: none; }
  .kpi-row { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .kpi-card { padding: 10px 12px; }
  .kpi-card .kpi-value { font-size: 19px; }
  .dash-grid { grid-template-columns: 1fr; gap: 10px; }
  .toast-stack { bottom: calc(var(--tab-h) + 16px); }
  .tour-caption { bottom: calc(var(--tab-h) + 16px); }
}
