:root {
  --bg: #F0EDE6;
  --bg-subtle: #E8E4DC;
  --surface: rgba(240, 237, 230, 0.92);
  --surface-strong: #F5F1EA;
  --surface-subtle: rgba(232, 228, 220, 0.88);
  --text: #1A1A1A;
  --text-secondary: #2C2A26;
  --muted: #7A7060;
  --border: rgba(26, 26, 26, 0.10);
  --border-strong: rgba(26, 26, 26, 0.18);
  --shadow-sm: 0 1px 3px rgba(26, 26, 26, 0.06), 0 1px 2px rgba(26, 26, 26, 0.04);
  --shadow: 0 4px 16px rgba(26, 26, 26, 0.08), 0 1px 4px rgba(26, 26, 26, 0.04);
  --shadow-lg: 0 16px 48px rgba(26, 26, 26, 0.10), 0 4px 12px rgba(26, 26, 26, 0.05);
  --brand: #E8521A;
  --brand-hover: #C94415;
  --brand-soft: rgba(232, 82, 26, 0.10);
  --brand-soft-hover: rgba(232, 82, 26, 0.16);
  --success: #2D7A4F;
  --success-soft: rgba(45, 122, 79, 0.10);
  --warning: #B85C00;
  --warning-soft: rgba(184, 92, 0, 0.10);
  --danger: #C0392B;
  --danger-soft: rgba(192, 57, 43, 0.10);
  --radius-sm: 6px;
  --radius: 8px;
  --radius-lg: 10px;
  --radius-xl: 12px;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ─── Auth State Modes ─── */
body.is-workspace-mode .guest-home,
body.is-workspace-mode .guest-auth-strip,
body.is-workspace-mode .overview-panel,
body.is-workspace-mode .value-panel { display: none; }
body.is-guest-mode #userHome,
body.is-guest-mode #historyView,
body.is-guest-mode #detailView { display: none; }

[hidden] { display: none !important; }

/* ─── Base Reset ─── */
button, input, textarea { font: inherit; }
button { border: 0; background: none; cursor: pointer; }
button:disabled { opacity: 0.5; cursor: not-allowed; }
textarea { resize: vertical; }

/* ─── Layout Shell ─── */
.shell { display: grid; grid-template-columns: 272px 1fr; min-height: 100vh; }

/* ─── Sidebar ─── */
.sidebar {
  padding: 24px 16px;
  background: #1C1A17;
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.sidebar-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  padding: 4px 4px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  margin-bottom: 8px;
}
.brand { font-size: 22px; font-weight: 800; letter-spacing: -0.03em; color: #fff; }
.brand-sub { margin-top: 4px; font-size: 12px; color: rgba(255, 255, 255, 0.50); line-height: 1.5; letter-spacing: 0.01em; }
.nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.nav-item {
  padding: 11px 14px;
  border-radius: var(--radius);
  color: rgba(255, 255, 255, 0.65);
  text-align: left;
  font-weight: 600;
  font-size: 14px;
  transition: background 0.15s ease, color 0.15s ease;
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav-item:hover { background: rgba(255, 255, 255, 0.08); color: rgba(255,255,255,0.9); }
.nav-item.is-active {
  background: rgba(232, 82, 26, 0.22);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(232, 82, 26, 0.30);
}
.sidebar-card {
  padding: 14px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.06);
  margin-top: 8px;
}
.sidebar-card__title { color: rgba(255, 255, 255, 0.45); font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.sidebar-card__value { margin-top: 6px; font-size: 16px; font-weight: 700; }
.sidebar-card__hint { margin-top: 4px; color: rgba(255, 255, 255, 0.55); font-size: 12px; line-height: 1.5; }
.logout-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 12px;
  width: 100%;
  padding: 9px 12px;
  border-radius: 10px;
  background: rgba(220, 38, 38, 0.14);
  color: #FCA5A5;
  font-size: 13px;
  font-weight: 700;
  border: 1px solid rgba(220, 38, 38, 0.22);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.logout-btn:hover { background: rgba(220, 38, 38, 0.24); color: #FEE2E2; }

/* ─── Main Content ─── */
.main { padding: 28px; overflow: auto; min-width: 0; }

/* ─── Mobile Menu Button ─── */
.mobile-menu-btn {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  background: var(--surface-strong);
  color: var(--text);
  border: 1px solid var(--border-strong);
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s ease;
}
.mobile-menu-btn:hover { background: var(--bg-subtle); }
.sidebar-close-btn {
  display: none;
  width: 34px;
  height: 34px;
  border-radius: var(--radius);
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.70);
  border: 1px solid rgba(255,255,255,0.10);
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s ease, color 0.15s ease;
}
.sidebar-close-btn:hover { background: rgba(255,255,255,0.14); color: #fff; }

/* ─── Hero Header ─── */
.hero { display: flex; justify-content: space-between; gap: 16px; align-items: flex-end; margin-bottom: 20px; }
.hero-left { display: flex; gap: 12px; align-items: flex-start; }
.eyebrow {
  color: var(--brand);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.hero h1 { margin: 6px 0 5px; font-size: 36px; letter-spacing: -0.04em; font-weight: 900; color: var(--text); }
.hero p { margin: 0; color: var(--muted); line-height: 1.65; max-width: 72ch; font-size: 14px; }
.hero-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* ─── Buttons ─── */
.ghost-link, .primary-btn, .secondary-btn, .ghost-btn, .crumb-btn, .auth-tab, .icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 14px;
  transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease, color 0.15s ease;
  cursor: pointer;
}
.ghost-link, .ghost-btn, .secondary-btn, .icon-btn, .auth-tab {
  background: var(--surface-strong);
  color: var(--text-secondary);
  box-shadow: inset 0 0 0 1px var(--border-strong), var(--shadow-sm);
}
.ghost-btn:hover, .ghost-link:hover, .secondary-btn:hover, .icon-btn:hover, .auth-tab:hover {
  background: var(--bg-subtle);
  box-shadow: inset 0 0 0 1px var(--border-strong), var(--shadow);
}
.primary-btn {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 2px 8px rgba(232, 82, 26, 0.28), 0 1px 2px rgba(232, 82, 26, 0.20);
}
.primary-btn:hover:not(:disabled) {
  background: var(--brand-hover);
  box-shadow: 0 4px 16px rgba(232, 82, 26, 0.32), 0 2px 4px rgba(232, 82, 26, 0.20);
  transform: translateY(-1px);
}
.primary-btn:active { transform: translateY(0); }
.secondary-btn { color: var(--brand); }
.secondary-btn:hover { color: var(--brand-hover); }
.crumb-btn {
  background: var(--brand-soft);
  color: var(--brand);
  box-shadow: none;
  min-height: 32px;
  font-size: 13px;
}
.crumb-btn:hover { background: var(--brand-soft-hover); }
.icon-btn { width: 40px; height: 40px; padding: 0; border-radius: var(--radius); flex-shrink: 0; }

/* ─── Voice Hold Button ─── */
.voice-hold-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  background: var(--surface-strong);
  color: var(--brand);
  box-shadow: inset 0 0 0 1.5px var(--brand), var(--shadow-sm);
  transition: background 0.12s ease, box-shadow 0.12s ease, transform 0.12s ease, color 0.12s ease;
}
.voice-hold-btn:hover:not(:disabled) {
  background: var(--brand-soft);
  box-shadow: inset 0 0 0 1.5px var(--brand), var(--shadow);
}
.voice-hold-btn.is-recording {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 0 0 3px rgba(232, 82, 26, 0.25), 0 2px 8px rgba(232, 82, 26, 0.30);
  animation: voice-pulse 1.2s ease-in-out infinite;
}
.voice-hold-btn.is-processing {
  background: var(--surface-strong);
  color: var(--muted);
  box-shadow: inset 0 0 0 1.5px var(--border-strong);
  cursor: not-allowed;
}
@keyframes voice-pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(232, 82, 26, 0.25), 0 2px 8px rgba(232, 82, 26, 0.30); }
  50%       { box-shadow: 0 0 0 7px rgba(232, 82, 26, 0.10), 0 2px 8px rgba(232, 82, 26, 0.30); }
}

/* ─── Panels ─── */
.panel {
  background: var(--surface-strong);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  box-shadow: none;
  padding: 20px;
  margin-bottom: 14px;
}
.panel--hero { padding: 24px; box-shadow: 0 2px 8px rgba(26, 26, 26, 0.06); }
.panel-header { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 16px; }
.panel-header--stacked { flex-direction: column; align-items: stretch; }
.panel-title { font-size: 12px; font-weight: 800; letter-spacing: 0.10em; text-transform: uppercase; color: var(--muted); }
.panel-subtitle { color: var(--muted); margin-top: 3px; font-size: 13px; line-height: 1.5; }

/* ─── Status Pills ─── */
.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  min-height: 26px;
}
.status-pill--success { background: var(--success-soft); color: var(--success); }
.status-pill--warning { background: var(--warning-soft); color: var(--warning); }
.status-pill--info { background: var(--brand-soft); color: var(--brand); }
.status-pill--danger { background: var(--danger-soft); color: var(--danger); }

/* ─── Form Fields ─── */
.auth-grid, .composer-grid { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; }
.field--full { grid-column: 1 / -1; }
.field span { color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: 0.02em; }
textarea,
input[type="search"],
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"] {
  width: 100%;
  border: 1px solid var(--border-strong);
  outline: none;
  background: var(--surface-strong);
  border-radius: var(--radius);
  padding: 11px 14px;
  color: var(--text);
  font-size: 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
textarea:focus,
input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(232, 82, 26, 0.12);
}
textarea { line-height: 1.7; }
input.is-error,
textarea.is-error,
.password-field input.is-error {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.10);
  background: rgba(255, 247, 247, 0.96);
}

/* ─── Search Box ─── */
.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface-strong);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 0 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.search-box:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(232, 82, 26, 0.12);
}
.search-box svg { color: var(--muted); flex-shrink: 0; }
.search-box input {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 11px 0;
  min-height: 0;
}
.search-box input:focus { box-shadow: none; }

/* ─── Views ─── */
.view { display: none; }
.view.is-active { display: block; }

/* ─── Guest Landing ─── */
.guest-home { display: grid; gap: 14px; }
.guest-hidden { display: none; }
.overview-panel { overflow: hidden; position: relative; }
.overview-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.overview-card {
  border-radius: var(--radius-lg);
  padding: 16px;
  background: var(--surface-strong);
  border: 1px solid var(--border-strong);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: default;
}
.overview-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(26, 26, 26, 0.10); }
.overview-card__label {
  display: inline-flex;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.overview-card strong { display: block; font-size: 32px; letter-spacing: -0.04em; margin-bottom: 6px; font-weight: 900; }
.overview-card p { margin: 0; color: var(--muted); line-height: 1.55; font-size: 13px; }
.overview-card--accent {
  background: rgba(232, 82, 26, 0.06);
  border-color: rgba(232, 82, 26, 0.18);
}

/* ─── Hero Panel (Landing) ─── */
.hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.7fr);
  gap: 20px;
  align-items: stretch;
  position: relative;
  overflow: hidden;
}
.hero-copy h2 { margin: 10px 0 12px; font-size: 32px; line-height: 1.15; letter-spacing: -0.03em; font-weight: 800; }
.hero-copy p { color: var(--muted); line-height: 1.75; margin: 0; max-width: 60ch; font-size: 14px; }
.hero-actions--stacked { margin: 18px 0 14px; }
.hero-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.hero-card-stack { display: grid; gap: 10px; }
.feature-card, .value-card, .step-card, .example-doc {
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
}
.feature-card strong, .value-card strong, .step-card strong { display: block; margin-bottom: 8px; font-weight: 700; font-size: 15px; }
.feature-card p, .value-card p, .step-card p, .example-doc p { margin: 0; color: var(--muted); line-height: 1.65; font-size: 13px; }
.feature-card--accent {
  background: rgba(232, 82, 26, 0.06);
  border-color: rgba(232, 82, 26, 0.18);
}
.value-grid, .steps-grid, .example-grid { display: grid; gap: 12px; }
.value-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.steps-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.step-card span {
  display: inline-flex;
  margin-bottom: 10px;
  font-size: 11px;
  font-weight: 800;
  color: var(--brand);
  background: var(--brand-soft);
  padding: 3px 8px;
  border-radius: 999px;
  letter-spacing: 0.04em;
}
.example-doc__head { display: flex; justify-content: space-between; gap: 10px; align-items: center; margin-bottom: 10px; }
.example-doc__head strong { font-size: 14px; font-weight: 700; }
.example-doc__head span { color: var(--brand); font-size: 11px; font-weight: 700; background: var(--brand-soft); padding: 3px 8px; border-radius: 999px; }

/* ─── Value / Trust / Scenario ─── */
.trust-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.scenario-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.trust-card, .scenario-card {
  border-radius: var(--radius-lg);
  padding: 16px;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.trust-card:hover, .scenario-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.trust-card strong, .scenario-card strong { display: block; margin-bottom: 8px; font-size: 15px; font-weight: 700; }
.trust-card p, .scenario-card p { margin: 0; color: var(--muted); line-height: 1.65; font-size: 13px; }

/* ─── FAQ ─── */
.faq-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.faq-item {
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  transition: box-shadow 0.15s ease;
}
.faq-item summary { cursor: pointer; font-weight: 700; font-size: 14px; user-select: none; }
.faq-item p { margin: 10px 0 0; color: var(--muted); line-height: 1.65; font-size: 13px; }
.faq-item[open] { box-shadow: var(--shadow-lg); border-color: rgba(232, 82, 26, 0.14); }

/* ─── Workflow Steps ─── */
.workflow-track { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.workflow-step {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  padding: 16px;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  animation: stepFloat 6s ease-in-out infinite;
  opacity: 0.85;
}
.workflow-step:nth-child(2) { animation-delay: 0.25s; }
.workflow-step:nth-child(3) { animation-delay: 0.5s; }
.workflow-step:nth-child(4) { animation-delay: 0.75s; }
.workflow-step:hover, .workflow-step.is-active { transform: translateY(-3px); box-shadow: var(--shadow-lg); opacity: 1; }
.workflow-step.is-active { border-color: rgba(232, 82, 26, 0.18); background: linear-gradient(135deg, rgba(232,82,26,0.05), var(--surface-strong)); }
.workflow-step span {
  display: inline-flex;
  margin-bottom: 10px;
  font-size: 11px;
  font-weight: 800;
  color: var(--brand);
  background: var(--brand-soft);
  padding: 3px 8px;
  border-radius: 999px;
  letter-spacing: 0.04em;
}
.workflow-step strong { display: block; margin-bottom: 6px; font-size: 15px; font-weight: 700; }
.workflow-step p { margin: 0; color: var(--muted); line-height: 1.65; font-size: 13px; }

/* ─── Auth Panel ─── */
.auth-panel--guest { background: rgba(255, 255, 255, 0.7); border-style: dashed; }

/* ─── Home User ─── */
.entry-list { display: grid; gap: 10px; }
.helper-box, .tip-box, .voice-panel, .empty-state { padding: 14px 16px; border-radius: var(--radius); line-height: 1.7; font-size: 13px; }
.helper-box, .tip-box, .voice-panel { background: rgba(232, 82, 26, 0.07); color: #5C2A0E; border: 1px solid rgba(232,82,26,0.14); }
.empty-state {
  background: var(--surface-subtle);
  border: 1px dashed rgba(232, 82, 26, 0.22);
  color: var(--muted);
}
.empty-state strong { display: block; margin-bottom: 6px; color: var(--text); font-size: 15px; }
.empty-state p, .helper-box p, .tip-box p, .voice-panel p, .auth-hint { margin: 0; }
.auth-actions, .composer-actions, .detail-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-start; }

/* ─── Message Cards ─── */
.message-card-wrap { position: relative; overflow: hidden; border-radius: var(--radius-xl); }
.message-card-actions-backdrop {
  position: absolute; inset: 0; display: flex; justify-content: flex-end; align-items: stretch;
  background: linear-gradient(90deg, rgba(0,0,0,0) 0%, rgba(220,38,38,0.06) 55%, rgba(220,38,38,0.12) 100%);
  pointer-events: none;
}
.message-delete-backdrop {
  width: 112px; display: flex; align-items: center; justify-content: center;
  color: #fff; background: linear-gradient(135deg, #FF5F57, #DC2626);
  font-weight: 800; letter-spacing: 0.04em; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.16);
  font-size: 13px;
}
.message-card {
  position: relative;
  display: block;
  width: 100%;
  margin: 6px 0;
  overflow: visible;
  touch-action: pan-y;
  will-change: transform;
  transition: transform 240ms cubic-bezier(.2,.9,.2,1), box-shadow 200ms ease;
}
.message-card__surface {
  position: relative;
  width: 100%;
  padding: 14px 15px 12px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  background: var(--surface-strong);
  overflow: hidden;
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}
.message-card:hover .message-card__surface { box-shadow: var(--shadow); border-color: var(--border-strong); }
.message-card--user .message-card__surface { background: var(--surface-strong); }
.message-card--system .message-card__surface { background: var(--surface-subtle); }
.message-card__surface::before,
.message-card__surface::after { content: none; }
.message-card__floating-actions {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  gap: 6px;
  z-index: 3;
}
.message-card__icon-btn {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  background: var(--surface-strong);
  color: var(--muted);
  box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--border-strong);
  transition: background 0.15s ease, color 0.15s ease;
}
.message-card__icon-btn:hover { background: var(--bg-subtle); }
.message-card__icon-btn--delete { color: var(--danger); }
.message-card__icon-btn--delete:hover { background: var(--danger-soft); color: var(--danger); }
.message-card__icon-btn--edit { color: var(--brand); }
.message-card__icon-btn--edit:hover { background: var(--brand-soft); color: var(--brand); }
.message-card__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 8px; padding-right: 64px; }
.message-card__title-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.message-card__title-row strong { font-size: 12px; letter-spacing: 0.02em; font-weight: 700; color: var(--text-secondary); }
.message-card__source {
  display: inline-flex; align-items: center; min-height: 22px; padding: 0 8px;
  border-radius: 999px; font-size: 11px; font-weight: 700;
  color: var(--brand); background: var(--brand-soft);
}
.message-card[data-source-kind="voice"] .message-card__source { color: #BE185D; background: rgba(219,39,119,0.10); }
.message-card[data-source-kind="ai"] .message-card__source { color: #6D28D9; background: rgba(109,40,217,0.10); }
.message-card[data-source-kind="system"] .message-card__source { color: var(--muted); background: rgba(100,116,139,0.10); }
.message-card__time { color: var(--muted); font-size: 11px; white-space: nowrap; }
.message-card__body { color: var(--text-secondary); }
.message-card__body p { margin: 0; line-height: 1.75; white-space: pre-wrap; word-break: break-word; font-size: 14px; }
.message-card.is-dragging .message-card__surface { box-shadow: var(--shadow-lg); transform: scale(1.01); }
.message-card[data-drop-before="1"]::before,
.message-card[data-drop-after="1"]::after {
  content: '';
  position: absolute;
  left: 8px; right: 8px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(232,82,26,0), rgba(232,82,26,0.8), rgba(232,82,26,0));
  box-shadow: 0 0 0 4px rgba(232,82,26,0.08);
  z-index: 2;
}
.message-card[data-drop-before="1"]::before { top: -2px; }
.message-card[data-drop-after="1"]::after { bottom: -2px; }
.message-card__title-row { position: relative; z-index: 1; }

/* ─── History Grid ─── */
.history-grid { columns: 2; column-gap: 14px; }
.history-grid > * { break-inside: avoid; margin-bottom: 14px; }
.history-card {
  display: flex; flex-direction: column; gap: 0;
  overflow: hidden; border-radius: var(--radius-lg);
  background: var(--surface-strong);
  border: 1px solid var(--border-strong);
  box-shadow: none;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.history-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(26, 26, 26, 0.10); border-color: rgba(26, 26, 26, 0.26); }
.history-card__header { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 10px; gap: 8px; }
.history-card__date { display: flex; align-items: baseline; gap: 6px; }
.history-card__day { font-size: 32px; font-weight: 900; letter-spacing: -0.05em; color: var(--text); line-height: 1; }
.history-card__month-week { font-size: 12px; font-weight: 600; color: var(--muted); }
.history-card__status {
  display: inline-flex; align-items: center; min-height: 22px; padding: 0 8px;
  border-radius: 999px; font-size: 11px; font-weight: 700;
  background: rgba(100, 116, 139, 0.10); color: #94A3B8;
}
.history-card__status--success { background: var(--success-soft); color: var(--success); }
.history-card__status--pending { background: var(--warning-soft); color: var(--warning); }
.history-card__status--running { background: var(--brand-soft); color: var(--brand); }
.history-card__status--failed { background: var(--danger-soft); color: var(--danger); }
.history-card__status--none { background: rgba(100, 116, 139, 0.08); color: #94A3B8; }
.history-card__overview { padding: 0 16px 12px; color: var(--text-secondary); font-size: 14px; line-height: 1.65; }
.history-card__key-points {
  margin: 0; padding: 0 16px 12px 30px;
  display: flex; flex-direction: column; gap: 4px;
  font-size: 13px; line-height: 1.55; color: var(--text-secondary);
}
.history-card__key-points li::marker { color: var(--brand); }
.history-card__todos { padding: 0 16px 12px; display: flex; flex-direction: column; gap: 4px; }
.history-card__todo-item { font-size: 13px; line-height: 1.5; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.history-card__todo-more { font-size: 12px; color: var(--brand); font-weight: 600; }
.history-card__emotion { padding: 0 16px 12px; font-size: 13px; line-height: 1.55; color: var(--muted); font-style: italic; }
.history-card__footer {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 10px 16px; border-top: 1px solid var(--border);
  flex-wrap: wrap;
}
.history-card__mood-tags { display: flex; gap: 5px; flex-wrap: wrap; min-width: 0; }
.history-card__mood-tag {
  display: inline-flex; align-items: center; min-height: 20px; padding: 0 7px;
  border-radius: 999px; font-size: 11px; font-weight: 700;
  background: rgba(100,116,139,0.10); color: #94A3B8;
  max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.history-card__mood-tag.is-primary { font-weight: 800; }
.history-card__mood-tag--energized { background: rgba(220,38,38,0.10); color: #DC2626; }
.history-card__mood-tag--positive { background: rgba(234,88,12,0.10); color: #EA580C; }
.history-card__mood-tag--calm { background: rgba(232,82,26,0.10); color: var(--brand); }
.history-card__mood-tag--warm { background: rgba(217,119,6,0.10); color: var(--warning); }
.history-card__mood-tag--muted { background: rgba(71,85,105,0.10); color: #475569; }
.history-card__mood-tag--neutral { background: rgba(100,116,139,0.10); color: #94A3B8; }
.history-card__entry-count { flex-shrink: 0; font-size: 12px; color: var(--muted); font-weight: 600; }
.history-card[data-mood-theme="energized"] { border-top: 2px solid rgba(220,38,38,0.35); }
.history-card[data-mood-theme="positive"] { border-top: 2px solid rgba(234,88,12,0.35); }
.history-card[data-mood-theme="calm"] { border-top: 2px solid rgba(232,82,26,0.30); }
.history-card[data-mood-theme="warm"] { border-top: 2px solid rgba(217,119,6,0.30); }
.history-card[data-mood-theme="muted"] { border-top: 2px solid rgba(71,85,105,0.20); }
.history-card[data-mood-theme="neutral"] { border-top: 2px solid rgba(100,116,139,0.16); }

/* ─── History Toolbar ─── */
.history-header { gap: 12px; }
.history-toolbar { display: grid; gap: 10px; width: 100%; }
.history-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.history-chip {
  min-height: 30px; padding: 0 12px;
  border-radius: 999px;
  background: var(--surface-strong);
  color: var(--muted);
  font-weight: 700;
  font-size: 12px;
  border: 1px solid var(--border-strong);
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.history-chip:hover { background: var(--bg-subtle); color: var(--text-secondary); }
.history-chip.is-active { background: var(--brand-soft); color: var(--brand); border-color: rgba(232,82,26,0.22); }
.history-search { width: 100%; }
.pager-row { display: flex; justify-content: center; margin-top: 14px; }

/* ─── Detail View ─── */
.detail-top-metadata { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 2px 0 12px; }
.detail-meta-panel { background: var(--surface-subtle); border: 1px solid var(--border); box-shadow: none; }
.detail-meta-panel .meta-list { gap: 8px; }
.detail-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; align-items: start; }
.detail-summary-panel { order: -1; }
.detail-main { min-width: 0; display: grid; gap: 10px; }
.detail-main > .subpanel { width: 100%; }
.subpanel {
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 15px;
}
.subpanel + .subpanel { margin-top: 10px; }
.subpanel-title {
  font-weight: 700;
  margin-bottom: 10px;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.view-content { display: flex; flex-direction: column; gap: 6px; padding: 2px 0 0; align-items: stretch; }
.view-content > .message-card { width: 100%; }
.message-card__surface { padding-top: 9px; padding-bottom: 7px; border-radius: 14px; }
.message-card__head { margin-bottom: 6px; }
.message-card__body p { line-height: 1.68; }
.view-content p { margin: 0 0 5px; line-height: 1.68; }
.summary-box {
  color: #5C2A0E;
  line-height: 1.75;
  background: rgba(232,82,26,0.04);
  border-left: 3px solid rgba(232,82,26,0.28);
  padding: 2px 0 2px 14px;
  margin-top: 2px;
}
.home-summary-panel { margin-bottom: 14px; }
.detail-side {
  display: grid; gap: 8px; align-self: start;
  position: sticky; top: 12px;
  padding: 10px 0 0 12px;
  border-left: 1px solid var(--border);
}
.detail-side .subpanel { background: transparent; border: none; box-shadow: none; padding: 4px 0; }
.detail-side .subpanel + .subpanel { margin-top: 8px; }
.detail-side .subpanel-title { margin-bottom: 6px; font-size: 11px; letter-spacing: 0.12em; }
.detail-side .meta-list { gap: 10px; }
.detail-side .meta-list div { padding: 0; }
.detail-side .meta-list span { font-size: 12px; }
.detail-side .meta-list strong { font-size: 13px; text-align: right; }
.breadcrumb--detail { gap: 8px; flex-wrap: wrap; align-items: center; }
.detail-mode-btn { min-height: 30px; padding: 0 10px; border-radius: 10px; font-size: 13px; }
.detail-actions--header { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.save-sticky-btn { background: var(--brand); box-shadow: 0 4px 14px rgba(232,82,26,0.22); }
.save-sticky-btn:hover { background: var(--brand-hover); }

/* ─── Home Summary ─── */
.home-summary-box { display: grid; gap: 14px; }
.home-summary-card {
  display: grid; gap: 14px; padding: 18px;
  border-radius: var(--radius-xl);
  background: var(--surface-strong);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.home-summary-card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.home-summary-card__title { font-size: 16px; font-weight: 800; color: var(--text); letter-spacing: -0.01em; }
.home-summary-card__desc { margin-top: 3px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.home-summary-card__badge { flex: 0 0 auto; }
.home-summary-card__body { display: grid; gap: 12px; }
.home-summary-card__section { display: grid; gap: 8px; }
.home-summary-card__label { font-size: 11px; font-weight: 700; color: var(--muted); letter-spacing: 0.06em; text-transform: uppercase; }
.summary-board { display: grid; gap: 10px; }
.summary-board--compact { gap: 8px; }
.summary-board__top { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; flex-wrap: wrap; }
.summary-board__title { font-size: 15px; font-weight: 700; color: var(--text); }
.summary-board__desc { margin-top: 2px; color: var(--muted); font-size: 12px; }
.summary-board__chips { display: flex; gap: 6px; flex-wrap: wrap; }
.summary-chip {
  display: inline-flex; align-items: center; min-height: 22px; padding: 0 8px;
  border-radius: 999px; background: var(--brand-soft); color: var(--brand);
  font-size: 11px; font-weight: 700;
}
.summary-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.summary-grid--compact { grid-template-columns: 1fr; }
.summary-grid--compact-home { margin-bottom: 8px; }
.summary-mini-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.summary-section { padding: 0 0 0 12px; background: transparent; border: none; box-shadow: none; }
.summary-section--compact-card { padding: 0 0 0 12px; }
.summary-section--wide { grid-column: 1 / -1; }
.summary-section--todo { border-left: 3px solid rgba(217,119,6,0.30); }
.summary-section--emotion { border-left: 3px solid rgba(232,82,26,0.28); }
.summary-section--suggestion { border-left: 3px solid rgba(5,150,105,0.28); }
.summary-section__head { display: flex; justify-content: space-between; gap: 8px; align-items: center; margin-bottom: 6px; }
.summary-section__head strong { font-size: 14px; color: var(--text); font-weight: 700; }
.summary-section__badge {
  display: inline-flex; align-items: center; min-height: 20px; padding: 0 8px;
  border-radius: 999px; background: var(--brand-soft); color: var(--brand);
  font-size: 11px; font-weight: 700;
}
.summary-section--todo .summary-section__badge { background: var(--warning-soft); color: var(--warning); }
.summary-section--emotion .summary-section__badge { background: var(--brand-soft); color: var(--brand); }
.summary-section--suggestion .summary-section__badge { background: var(--success-soft); color: var(--success); }
.mood-tag-group { display: flex; gap: 6px; flex-wrap: wrap; }
.mood-tag {
  display: inline-flex; align-items: center; min-height: 28px; padding: 0 10px;
  border-radius: 999px; font-size: 12px; font-weight: 700; border: 1px solid transparent;
}
.mood-tag--primary { box-shadow: var(--shadow-sm); }
.mood-tag--energized { background: rgba(220,38,38,0.12); color: #DC2626; border-color: rgba(220,38,38,0.20); }
.mood-tag--positive { background: rgba(234,88,12,0.12); color: #EA580C; border-color: rgba(234,88,12,0.20); }
.mood-tag--calm { background: rgba(232,82,26,0.10); color: var(--brand); border-color: rgba(232,82,26,0.18); }
.mood-tag--warm { background: rgba(217,119,6,0.10); color: var(--warning); border-color: rgba(217,119,6,0.18); }
.mood-tag--muted { background: rgba(71,85,105,0.10); color: #475569; border-color: rgba(71,85,105,0.16); }
.mood-tag--neutral { background: rgba(100,116,139,0.10); color: #94A3B8; border-color: rgba(100,116,139,0.16); }
.mood-empty { display: inline-flex; min-height: 28px; align-items: center; color: var(--muted); font-size: 13px; }
.summary-section__body { color: var(--text-secondary); }
.summary-section__body p { margin: 0; line-height: 1.75; font-size: 14px; }
.summary-list { margin: 0; padding-left: 18px; display: grid; gap: 8px; }
.summary-list li { line-height: 1.65; font-size: 14px; }
.summary-empty {
  padding: 16px; border-radius: var(--radius);
  background: var(--surface-subtle);
  border: 1px dashed rgba(232,82,26,0.18);
}
.summary-empty strong { display: block; margin-bottom: 6px; font-size: 15px; }
.summary-empty p { margin: 0; color: var(--muted); font-size: 13px; }
.meta-list { display: grid; gap: 12px; }
.meta-list div { display: flex; justify-content: space-between; gap: 10px; }
.meta-list span { color: var(--muted); font-size: 13px; }
.meta-list strong { font-size: 13px; }

/* ─── Auth Overlay ─── */
.auth-overlay {
  position: fixed; inset: 0; display: none; align-items: center; justify-content: center; padding: 24px;
  background: rgba(0, 0, 0, 0.40); backdrop-filter: blur(8px); z-index: 30;
}
.auth-overlay.is-open { display: flex; }
.auth-modal {
  width: min(520px, 100%);
  background: var(--surface-strong);
  border-radius: var(--radius-xl);
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.22), 0 8px 20px rgba(0,0,0,0.10);
  border: 1px solid var(--border);
  padding: 24px;
}
.auth-modal__header { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; margin-bottom: 20px; }
.auth-modal__header h2 { margin: 6px 0 4px; font-size: 26px; font-weight: 800; letter-spacing: -0.03em; }
.auth-modal__header p { margin: 0; color: var(--muted); font-size: 14px; }
.auth-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 18px; }
.auth-tab { width: 100%; font-size: 14px; }
.auth-tab.is-active { background: var(--brand-soft); color: var(--brand); box-shadow: inset 0 0 0 1px rgba(232,82,26,0.22); }
.auth-form { display: none; gap: 14px; }
.auth-form.is-active { display: grid; }
.auth-modal__actions { display: flex; gap: 10px; flex-wrap: wrap; }
.auth-toggle-row { display: flex; gap: 18px; color: var(--muted); font-weight: 700; font-size: 14px; }
.auth-toggle-row label { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.auth-summary,
.auth-hint {
  min-height: 20px;
  font-size: 13px;
  padding: 10px 12px;
  border-radius: var(--radius);
  line-height: 1.6;
}
.auth-summary {
  color: var(--danger);
  background: var(--danger-soft);
  border: 1px solid rgba(220,38,38,0.18);
}
.auth-summary ul { margin: 8px 0 0 18px; padding: 0; }
.auth-summary li + li { margin-top: 4px; }
.auth-hint {
  color: var(--danger);
  background: var(--danger-soft);
  border: 1px solid rgba(220,38,38,0.18);
}
.auth-hint.is-success {
  color: var(--success);
  background: var(--success-soft);
  border-color: rgba(5,150,105,0.18);
}
.auth-hint.is-error { color: var(--danger); }
.auth-busy {
  color: var(--muted);
  font-size: 13px;
  padding: 8px 12px;
  border-radius: var(--radius);
  background: rgba(232,82,26,0.08);
  border: 1px solid rgba(232,82,26,0.14);
}
.password-field { display: flex; gap: 10px; align-items: center; }
.password-field input { flex: 1; }
.password-toggle {
  min-width: 64px;
  min-height: 42px;
  border-radius: var(--radius);
  padding: 0 12px;
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 700;
  font-size: 13px;
  border: 1px solid rgba(232,82,26,0.16);
  transition: background 0.15s ease;
}
.password-toggle:hover { background: var(--brand-soft-hover); }

/* ─── Toast ─── */
.toast-container {
  position: fixed;
  right: 20px;
  top: 20px;
  display: grid;
  gap: 8px;
  z-index: 60;
}
.toast {
  min-width: 240px;
  max-width: 340px;
  padding: 12px 15px;
  border-radius: var(--radius);
  background: var(--text);
  color: #fff;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255,255,255,0.06);
  font-size: 14px;
  font-weight: 500;
}
.toast--success { background: #065F46; }
.toast--error { background: #991B1B; }
.toast--info { background: #3D2010; }

#openTodayBtn,
#heroLoginBtn {
  min-height: 80px;
  padding: 0 32px;
  font-size: 18px;
  border-radius: var(--radius-lg);
}
@keyframes stepFloat {
  0%, 100% { transform: translateY(4px); }
  50% { transform: translateY(0); }
}
@keyframes heroGlow {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); opacity: 0.6; }
  50% { transform: translate3d(4px, -4px, 0) scale(1.04); opacity: 0.9; }
}
.hero-panel::before {
  content: '';
  position: absolute;
  inset: auto -60px -60px auto;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232,82,26,0.12), rgba(232,82,26,0));
  animation: heroGlow 8s ease-in-out infinite;
  pointer-events: none;
}
.auth-modal.is-loading .primary-btn,
.auth-modal.is-loading .ghost-btn,
.auth-modal.is-loading .auth-tab,
.auth-modal.is-loading .icon-btn,
.auth-modal.is-loading .password-toggle {
  pointer-events: none;
  opacity: 0.65;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ─── Responsive: Tablet ─── */
@media (max-width: 1080px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { border-radius: 0 0 24px 24px; position: static; height: auto; }
  .detail-layout { grid-template-columns: 1fr; }
  .history-grid { columns: 2; }
  .hero-panel,
  .value-grid,
  .steps-grid,
  .workflow-track,
  .overview-grid,
  .trust-grid,
  .scenario-grid,
  .faq-list { grid-template-columns: 1fr; }
}

/* ─── Responsive: Mobile ─── */
@media (max-width: 720px) {
  .main { padding: calc(14px + env(safe-area-inset-top, 0px)) 14px calc(14px + env(safe-area-inset-bottom, 0px)); }
  .hero { align-items: flex-start; flex-direction: column; gap: 12px; margin-bottom: 12px; }
  .hero-left { width: 100%; align-items: center; gap: 10px; }
  .hero-actions { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .hero-actions > * { min-width: 0; justify-content: center; }
  .sidebar {
    position: fixed;
    inset: calc(env(safe-area-inset-top, 0px)) auto calc(env(safe-area-inset-bottom, 0px)) 0;
    width: min(84vw, 300px);
    transform: translateX(-100%);
    transition: transform 0.22s ease;
    z-index: 40;
    box-shadow: 24px 0 60px rgba(0,0,0,0.22);
    overflow-y: auto;
    height: 100vh;
  }
  .mobile-menu-btn { display: inline-flex; }
  .sidebar-close-btn { display: inline-flex; }
  body.sidebar-open .sidebar { transform: translateX(0); }
  body.sidebar-open::before {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.38);
    z-index: 35;
  }
  .sidebar-top { align-items: center; }
  .guest-home, .composer-grid, .detail-layout { gap: 12px; }
  .overview-grid, .workflow-track { grid-template-columns: 1fr; }
  .summary-grid--compact-home, .summary-mini-grid, .summary-grid { grid-template-columns: 1fr; }
  .summary-board__top { flex-direction: column; }
  .summary-board__chips { width: 100%; }
  .summary-chip { max-width: 100%; }
  .home-summary-panel, .timeline-panel, .composer-panel, .history-grid, .detail-panel, .auth-modal { width: 100%; }
  .entry-card, .history-card, .summary-section, .subpanel, .overview-card { border-radius: var(--radius); }
  .history-card__top, .history-card__meta, .history-insight-row, .detail-actions, .composer-actions { flex-direction: column; align-items: stretch; }
  .history-card__top { gap: 6px; }
  .history-card__meta { gap: 6px; }
  .history-chips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .history-chips::-webkit-scrollbar { display: none; }
  .history-chip { flex: 0 0 auto; text-align: center; white-space: nowrap; }
  .auth-modal { padding: 16px; width: min(94vw, 520px); max-height: 90vh; overflow-y: auto; }
  .auth-tabs { gap: 8px; }
  .auth-modal__actions { flex-direction: column; }
  .hero-copy h2 { font-size: 26px; }
  .hero h1 { font-size: 26px; }
  .panel { padding: 14px; border-radius: var(--radius-lg); }
  .subpanel { padding: 13px; border-radius: var(--radius); }
  .history-grid { columns: 1; }
  .detail-layout { gap: 10px; }
  .detail-side { top: 12px; }
  .summary-box { padding-left: 10px; }
  .detail-side { padding-left: 8px; }
  .detail-summary-panel { order: -1; }
  .detail-main { gap: 10px; }
  .view-content { gap: 8px; }
  .detail-main { min-width: 0; }
  .detail-panel .panel-header--stacked > div { width: 100%; }
  .detail-panel .detail-actions {
    width: 100%;
    position: sticky;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 8px);
    z-index: 5;
    padding: 8px 10px;
    margin-top: 4px;
    background: rgba(240,237,230,0.88);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
  }
  .detail-top-metadata { grid-template-columns: 1fr; gap: 8px; margin-bottom: 10px; }
  .detail-panel .detail-actions--header { position: static; padding: 0; margin-top: 0; background: transparent; border: 0; box-shadow: none; backdrop-filter: none; }
  .detail-panel .breadcrumb--detail { gap: 6px; }
  .detail-panel .detail-mode-btn { min-height: 30px; padding: 0 10px; }
  .message-card { margin: 6px 0; }
  .message-card__surface { width: 100%; border-radius: var(--radius); padding: 13px 12px 11px; }
  .message-card__floating-actions { top: 10px; right: 10px; gap: 6px; }
  .message-card__icon-btn { width: 26px; height: 26px; font-size: 13px; }
  .message-card__head { gap: 10px; padding-right: 52px; }
  .message-card__body { font-size: 14px; line-height: 1.72; }
  .detail-panel .detail-actions > * { width: 100%; }
  .detail-panel textarea { min-height: 260px; border-radius: var(--radius-lg); font-size: 15px; line-height: 1.75; padding: 15px; }
  .detail-panel textarea:focus { box-shadow: 0 0 0 3px rgba(232,82,26,0.12); border-color: var(--brand); }
  .detail-panel .view-content { font-size: 15px; line-height: 1.75; }
  .message-card__surface { box-shadow: var(--shadow-sm); }
  .detail-panel .summary-box { font-size: 14px; }
  .nav-item, .primary-btn, .secondary-btn, .ghost-btn, .crumb-btn, .auth-tab, .icon-btn { min-height: 44px; }
  .composer-panel .composer-actions {
    position: sticky;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 8px);
    padding-top: 8px;
    background: linear-gradient(180deg, rgba(240,237,230,0), rgba(240,237,230,0.92));
    backdrop-filter: blur(6px);
  }
  .composer-panel .composer-actions > * { width: 100%; }
  .composer-panel .voice-hold-btn { width: 100%; }
  .composer-panel textarea { min-height: 110px; }
  .voice-panel { padding: 12px; }
  .voice-grid { gap: 10px; }
  .faq-list, .scenario-grid { grid-template-columns: 1fr; }
  .value-grid { grid-template-columns: 1fr; }
}
