/**
 * Hosted Web Prototype - Styles
 */

:root {
  --background: #000;
  --surface: #0a0a0a;
  --text: #f5f5f5;
  --muted: rgba(255, 255, 255, 0.5);
  --success: #a7d9b7;
  --error: #ef9a9a;
  --warning: #ffe082;
  --info: #90caf9;
  --accent: #fff;
  --line: #1f1f1f;
  --capture-dock-reserved-space: 0px;
  --page-column-max-width: 760px;
  --page-column-padding: 16px;
}

/* First update: deliberate entry points and quiet review surfaces. */
.home-shortcuts, .recent-heading, .meaning-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.home-shortcuts { margin-top: 18px; }
.home-shortcuts button, .recent-heading button { width: auto; min-height: 44px; font-size: .88rem; }
.recent-heading { justify-content: space-between; margin-bottom: 12px; }
.recent-heading h3 { margin: 0; }
#captureView #captureReviewRevisit { margin: 4px 0 10px; }
#todayOrientation, #todayCaptureButton { display: none; }
body:is([data-active-view="settings"], [data-active-view="memory"], [data-active-view="privacyData"], [data-active-view="people"], [data-active-view="captureReview"], [data-active-view="captureHistory"], [data-active-view="openLoops"], [data-active-view="reflection"], [data-active-view="weeklyMirr"]) {
  --background: #fff; --surface: #fff; --text: #25302f; --muted: #64726f; --line: #dce3e1;
  --accent: #30594d; --info: #30594d; --success: #285e47; --warning: #7b5c20; --error: #943d3d;
}
body:is([data-active-view="settings"], [data-active-view="memory"], [data-active-view="privacyData"], [data-active-view="people"], [data-active-view="captureReview"], [data-active-view="captureHistory"], [data-active-view="openLoops"], [data-active-view="reflection"], [data-active-view="weeklyMirr"]) .app-shell-bar { background: rgba(255,255,255,.97); }
body:is([data-active-view="settings"], [data-active-view="memory"], [data-active-view="privacyData"], [data-active-view="people"], [data-active-view="captureReview"], [data-active-view="captureHistory"], [data-active-view="openLoops"], [data-active-view="reflection"], [data-active-view="weeklyMirr"]) :is(button, input, textarea, select, .panel, .settings-card, .memory-item-card, .people-source) { background-color: #fff; color: var(--text); border-color: var(--line); }
body[data-active-view="settings"] .settings-card-grid { display: grid; grid-template-columns: 1fr; gap: 18px; }
.meaning-card { padding: 24px 0; border-bottom: 1px solid var(--line); }
.meaning-card h3 { font-size: 1.05rem; }.meaning-card h4 { color: var(--muted); font-size: .82rem; margin-bottom: 8px; }
.meaning-card :is(pre, p), .history-capture pre { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.65; }
.meaning-actions { margin: 16px 0; }.meaning-actions button { width: auto; min-height: 44px; }
.meaning-actions label { min-width: 0; }.meaning-clarify textarea { width: 100%; margin: 12px 0; }
.reflection-day-label { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 18px 0; }
.reflection-day-label input { width: auto; }.reflection-coverage button { width: auto; }
.reflection-coverage p, .reflection-evidence p { color: var(--muted); font-size: .85rem; line-height: 1.55; }
.reflection-evidence pre { font-size: .75rem; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 320px; overflow: auto; }
#aiReflectionContainer, #weeklyMirrGeneratedSurface { background: #fffdf8; color: #293630; border: 1px solid #deddd3; border-radius: 3px; padding: clamp(22px, 4vw, 42px); margin: 28px 0; }
#aiReflectionContent, .weekly-mirr-claim-text { font-family: Georgia, "Times New Roman", serif; font-size: 1.07rem; line-height: 1.85; }
.ai-reflection-summary { font-size: inherit; white-space: pre-line; }
.ai-reflection-summary::first-letter { font-size: 2.5rem; float: left; line-height: 1.1; padding-right: 6px; color: #30594d; }
#aiReflectionContent :is(h3,h4), .weekly-mirr-claim-title { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: .86rem; font-weight: 600; letter-spacing: .02em; margin-top: 28px; }
#aiReflectionContent ul { list-style: none; padding-left: 0; } #aiReflectionContent li { margin: 12px 0; }
.weekly-mirr-claim { background: transparent; border: 0; padding: 4px 0 18px; }
.reflection-narrative-usage, .people-review { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: .86rem; line-height: 1.5; }
button:focus-visible, input:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 3px solid #64978b; outline-offset: 3px; }
@media (max-width: 480px) { .home-shortcuts { gap: 6px; }.home-shortcuts button { flex: 1 1 auto; padding: 10px 8px; }.meaning-card { padding: 18px 0; } #aiReflectionContainer, #weeklyMirrGeneratedSurface { padding: 22px 18px; } }

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.page-content {
  flex: 1;
  min-width: 0;
  max-width: var(--page-column-max-width);
  margin: 0 auto;
  width: 100%;
  padding: 0 var(--page-column-padding) 24px;
}

.capture-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.capture-view {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.app-shell-bar {
  background: rgba(0, 0, 0, 0.92);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: 0 -16px;
  padding: calc(12px + env(safe-area-inset-top)) 16px 12px;
  position: sticky;
  top: 0;
  z-index: 20;
}

.app-brand {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}

.brand-button {
  align-items: baseline;
  background: transparent;
  border: 0;
  border-radius: 0;
  color: var(--text);
  display: inline-flex;
  margin: 0;
  min-height: 0;
  padding: 0;
  width: auto;
}

.app-bar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-left: auto;
}

.icon-button {
  align-items: center;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  display: inline-flex;
  font-size: 17px;
  font-weight: 800;
  justify-content: center;
  min-height: 40px;
  padding: 0;
  width: 40px;
}

.notification-button {
  font-size: 14px;
  position: relative;
}

.notification-button.has-notification::after {
  background: var(--success);
  border: 2px solid #000;
  border-radius: 999px;
  content: "";
  height: 9px;
  position: absolute;
  right: 5px;
  top: 5px;
  width: 9px;
}

.session-indicator {
  color: var(--success);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.shell-popover,
.app-menu.panel {
  margin-top: 10px;
  position: sticky;
  top: calc(62px + env(safe-area-inset-top));
  z-index: 30;
  background: #0d0d0d;
  border: 1px solid #333;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.6) !important;
  animation: popover-appear 0.2s ease-out;
}

@keyframes popover-appear {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.shell-popover {
  border-radius: 12px;
  color: var(--muted);
  padding: 12px 14px;
}

.shell-popover p {
  margin: 0;
}

.help-tour-panel {
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: min(72dvh, 720px);
  overflow-y: auto;
}

.tour-header {
  align-items: flex-start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.tour-header h2,
.tour-step h3,
.tour-about h3,
.tour-questions h3,
.tour-context-setup h3,
.user-context-panel h2 {
  margin: 0;
}

.tour-header h2 {
  font-size: 20px;
  line-height: 1.2;
}

.tour-close-button,
.tour-secondary-button,
.notification-action-button {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--muted);
  font-size: 13px;
  min-height: 44px;
  padding: 8px 12px;
  width: auto;
}

.tour-steps {
  display: grid;
  gap: 10px;
}

.tour-step {
  background: #070707;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
}

.tour-step h3,
.tour-about h3,
.tour-questions h3,
.tour-context-setup h3 {
  font-size: 15px;
  line-height: 1.25;
}

.tour-step p,
.tour-context-setup p {
  color: var(--muted);
  line-height: 1.45;
  margin-top: 6px;
}

.tour-about {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.tour-about ul {
  color: var(--muted);
  display: grid;
  gap: 6px;
  line-height: 1.4;
  margin: 8px 0 0;
  padding-left: 18px;
}

.tour-questions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tour-context-setup {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 8px;
  padding-top: 12px;
}

.tour-questions label,
.tour-choice-group span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.tour-input {
  background: #111;
  border: 1px solid #262626;
  border-radius: 10px;
  color: var(--text);
  font-size: 15px;
  min-height: 40px;
  padding: 9px 10px;
  width: 100%;
}

.tour-input:focus {
  border-color: #4a4a4a;
  outline: none;
}

.tour-choice-group,
.tour-choice-buttons,
.tour-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tour-choice-group {
  flex-direction: column;
}

.tour-choice-button {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  flex: 1 1 80px;
  font-size: 13px;
  min-height: 44px;
  padding: 7px 10px;
  width: auto;
}

.tour-choice-button.selected,
.tour-choice-button[aria-pressed="true"] {
  background: rgba(167, 217, 183, 0.12);
  border-color: rgba(167, 217, 183, 0.42);
  color: var(--success);
}

.user-context-panel {
  display: grid;
  gap: 12px;
}

.user-context-panel h2 {
  font-size: 22px;
  line-height: 1.2;
}

.user-context-intro,
.user-context-note {
  color: var(--muted);
  line-height: 1.45;
  margin: 0;
}

.user-context-note {
  font-size: 13px;
}

.user-context-form {
  display: grid;
  gap: 10px;
}

.user-context-form label,
.user-context-choice-group span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.user-context-form textarea {
  background: #111;
  border: 1px solid #262626;
  border-radius: 8px;
  color: var(--text);
  font-size: 16px;
  line-height: 1.4;
  min-height: 58px;
  resize: vertical;
  width: 100%;
}

.user-context-choice-group {
  display: grid;
  gap: 8px;
}

.user-context-choice-buttons,
.user-context-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.user-context-choice-button {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  flex: 1 1 120px;
  font-size: 13px;
  min-height: 44px;
  padding: 7px 10px;
  width: auto;
}

.user-context-choice-button.selected,
.user-context-choice-button[aria-pressed="true"] {
  background: rgba(167, 217, 183, 0.12);
  border-color: rgba(167, 217, 183, 0.42);
  color: var(--success);
}

.user-context-actions {
  justify-content: flex-end;
}

.user-context-status {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
  margin: 0;
  min-height: 18px;
  overflow-wrap: anywhere;
}

.user-context-status.success {
  color: var(--success);
}

.user-context-status.error {
  color: var(--error);
}

.privacy-data-panel {
  display: grid;
  gap: 14px;
}

.privacy-data-panel h2,
.privacy-data-panel h3 {
  margin: 0;
}

.privacy-data-panel h2 {
  font-size: 22px;
  line-height: 1.2;
}

.privacy-data-intro,
.privacy-data-note,
.privacy-data-card p,
.privacy-data-export p,
.privacy-data-lifecycle p,
.privacy-data-measurement p,
.privacy-data-beta p,
.privacy-data-requests p,
.privacy-data-boundary p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
  margin: 0;
}

.privacy-data-trust {
  background: rgba(167, 217, 183, 0.08);
  border: 1px solid rgba(167, 217, 183, 0.24);
  border-radius: 12px;
  color: var(--text);
  font-size: 14px;
  line-height: 1.45;
  margin: 0;
  padding: 12px;
}

.privacy-data-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr));
}

.privacy-data-card,
.privacy-data-device,
.privacy-data-export,
.privacy-data-lifecycle,
.privacy-data-measurement,
.privacy-data-beta,
.privacy-data-requests,
.privacy-data-boundary {
  background: #070707;
  border: 1px solid var(--line);
  border-radius: 12px;
  display: grid;
  gap: 8px;
  padding: 12px;
}

.privacy-data-card h3,
.privacy-data-device h3,
.privacy-data-export h3,
.privacy-data-lifecycle h3,
.privacy-data-measurement h3,
.privacy-data-beta h3,
.privacy-data-requests h3,
.privacy-data-boundary h3 {
  color: var(--text);
  font-size: 15px;
  line-height: 1.25;
}

.privacy-data-device > p,
.device-data-card p,
.device-data-confirm p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
  margin: 0;
}

.device-data-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
}

.device-data-card {
  align-content: start;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--line);
  border-radius: 10px;
  display: grid;
  gap: 8px;
  padding: 12px;
}

.device-data-card h4,
.device-data-confirm h4 {
  color: var(--text);
  font-size: 14px;
  line-height: 1.3;
  margin: 0;
}

.device-data-card-danger,
.device-data-confirm {
  border-color: rgba(255, 126, 126, 0.38);
}

.device-data-card button {
  justify-self: start;
}

.device-data-confirm {
  background: rgba(255, 126, 126, 0.06);
  border-radius: 10px;
  border-style: solid;
  border-width: 1px;
  display: grid;
  gap: 10px;
  padding: 12px;
}

.device-data-confirm-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.danger-button {
  background: rgba(255, 126, 126, 0.12);
  border-color: rgba(255, 126, 126, 0.55);
  color: #ffd4d4;
}

.danger-button:hover:not(:disabled),
.danger-button:focus-visible:not(:disabled) {
  background: rgba(255, 126, 126, 0.2);
}

.privacy-data-export label,
.privacy-data-lifecycle label {
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
}

.privacy-data-export input,
.privacy-data-lifecycle input {
  max-width: 420px;
}

.privacy-data-export-actions,
.privacy-data-lifecycle-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.privacy-data-measurement-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.privacy-data-beta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.privacy-data-feedback {
  border-top: 1px solid var(--line);
  margin-top: 16px;
  padding-top: 14px;
}

.privacy-data-feedback h4 {
  color: var(--text);
  margin: 0 0 8px;
}

.privacy-data-requests a {
  color: var(--info);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.privacy-request-list {
  color: var(--muted);
  display: grid;
  font-size: 14px;
  gap: 8px;
  line-height: 1.45;
  margin: 0;
  padding-left: 18px;
}

.privacy-request-list strong {
  color: var(--text);
}

.settings-panel,
.memory-panel,
.beta-audit-panel {
  max-width: 860px;
  margin: 0 auto;
}

.settings-panel h2,
.settings-panel h3,
.memory-panel h2,
.memory-panel h3,
.beta-audit-panel h2,
.beta-audit-panel h3,
.beta-audit-panel h4 {
  margin-top: 0;
}

.settings-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 1rem;
  margin-top: 1.25rem;
}

.settings-card,
.memory-item-card,
.memory-consent-card,
.beta-audit-session-form,
.beta-audit-note-form,
.beta-audit-report-section,
.beta-audit-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  padding: 1rem;
}

.settings-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
}

.settings-card p {
  flex: 1;
  margin: 0;
  color: var(--muted);
}

.memory-heading,
.memory-item-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.memory-note {
  color: var(--muted);
  font-size: 0.92rem;
}

.memory-list,
.beta-audit-card-list,
.beta-audit-report {
  display: grid;
  gap: 1rem;
}

.memory-list {
  margin: 1.25rem 0;
}

.memory-item-card {
  background: color-mix(in srgb, var(--surface) 94%, var(--info) 6%);
}

.memory-item-heading h3,
.memory-item-text,
.memory-item-meta,
.memory-consent-card p,
.beta-audit-card p {
  margin-top: 0;
}

.memory-lifecycle {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 0.25rem 0.6rem;
  font-size: 0.78rem;
  background: #111;
  color: var(--muted);
}

.memory-lifecycle.active {
  color: var(--success);
}

.memory-lifecycle.auditor_quarantined {
  color: var(--warning);
}

.memory-item-meta {
  display: grid;
  grid-template-columns: minmax(90px, auto) minmax(0, 1fr);
  gap: 0.35rem 0.75rem;
}

.memory-item-meta dt {
  font-weight: 700;
}

.memory-item-meta dd {
  margin: 0;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.memory-item-actions,
.memory-consent-actions,
.beta-audit-session-tools,
.beta-audit-target-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.memory-action-button,
.memory-heading > button,
.memory-item-actions button,
.memory-consent-actions button,
.beta-audit-session-tools button,
.beta-audit-target-actions button {
  min-height: 44px;
}

.memory-correction-form {
  margin-top: 1rem;
}

.memory-correction-form label,
.beta-audit-session-form label,
.beta-audit-note-form label {
  display: grid;
  gap: 0.45rem;
  font-weight: 700;
}

.memory-correction-form textarea,
.beta-audit-session-form input,
.beta-audit-session-form select,
.beta-audit-note-form textarea {
  width: 100%;
  box-sizing: border-box;
}

.memory-consent-card {
  margin: 1.5rem 0 1rem;
  background: color-mix(in srgb, var(--surface) 92%, var(--warning) 8%);
}

.beta-audit-session-form,
.beta-audit-note-form {
  display: grid;
  gap: 0.9rem;
  margin: 1rem 0;
}

.beta-audit-date-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.beta-audit-session-tools {
  margin: 1rem 0;
}

.beta-audit-report-section {
  background: transparent;
}

.beta-audit-card {
  overflow-wrap: anywhere;
}

.beta-audit-card.warning {
  border-color: var(--warning);
}

.beta-audit-source-text,
.beta-audit-private-note,
.beta-audit-json {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.beta-audit-json {
  max-height: 24rem;
  overflow: auto;
  background: #111;
  border-radius: 10px;
  padding: 0.8rem;
  font-size: 0.82rem;
}

.beta-audit-private-note {
  border-left: 3px solid var(--info);
  padding-left: 0.75rem;
}

.tour-actions {
  justify-content: flex-end;
}

.notification-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.notification-item {
  background: #070707;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  display: flex;
  gap: 8px;
  line-height: 1.4;
  padding: 10px;
}

.notification-item.new {
  border-color: rgba(56, 189, 120, 0.38);
}

.notification-item.seen {
  color: var(--muted);
}

.notification-item-state {
  color: var(--success);
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.notification-item.seen .notification-item-state {
  color: var(--muted);
}

.notification-item.muted {
  color: var(--muted);
}

.app-menu {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.menu-item {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  font-size: 14px;
  min-height: 40px;
  padding: 9px 12px;
  text-align: left;
  width: 100%;
}

.menu-item.active {
  background: var(--line);
}

.protected-menu-item {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.auth-lock-label {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

body.authenticated .auth-lock-label {
  display: none;
}

.menu-item-disabled {
  color: var(--muted);
  opacity: 0.6;
}

h1 { font-size: 24px; font-weight: 800; margin: 0; line-height: 1.1; }

.badge {
  background: var(--line);
  color: var(--muted);
  font-size: 10px;
  padding: 4px 8px;
  border-radius: 4px;
  font-weight: 900;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
}

.section-eyebrow {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}

.capture-area {
  background: transparent;
  border: 0;
  margin-bottom: 0;
  padding: 0;
  position: relative;
}

.capture-dock-spacer {
  height: var(--capture-dock-reserved-space);
}

.capture-dock {
  --capture-dock-collapse-progress: 0;
  --capture-dock-shell-padding: 10px;
  bottom: var(--mirr-viewport-bottom, 0px);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  left: 0;
  padding: 0 var(--page-column-padding) calc(12px + env(safe-area-inset-bottom));
  pointer-events: none;
  position: fixed;
  right: 0;
  z-index: 35;
}

.capture-dock-shell {
  background: rgba(12, 14, 12, 0.9);
  border: 1px solid rgba(245, 241, 230, 0.1);
  border-radius: 22px 22px 0 0;
  box-shadow: 0 -18px 42px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0 auto;
  max-width: calc(var(--page-column-max-width) - (var(--page-column-padding) * 2) + (var(--capture-dock-shell-padding) * 2));
  max-height: max(0px, calc(var(--mirr-viewport-height, 100dvh) - var(--mirr-shell-header-height, 72px) - 24px - env(safe-area-inset-bottom)));
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: var(--capture-dock-shell-padding);
  padding-bottom: 2px;
  pointer-events: auto;
  transform: translateY(calc((100% + 12px) * var(--capture-dock-collapse-progress)));
  transition: transform 90ms ease-out, opacity 90ms ease-out;
  width: 100%;
}

.capture-dock-shell > * {
  flex-shrink: 0;
  min-width: 0;
}

.capture-dock[data-dock-visibility="hidden"] .capture-dock-shell {
  opacity: 0;
}

.capture-dock[data-dock-instant="true"] .capture-dock-shell {
  transition-duration: 0s;
}

.capture-dock[data-dock-expanded="false"] .composer-help {
  display: none;
}

.composer-label {
  color: var(--text);
  display: block;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 8px;
}

.composer-help {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  margin: 8px 0 0;
}

.capture-footer {
  align-items: center;
  column-gap: 8px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
}

.capture-footer > .composer-help {
  margin: 0;
}

.voice-capture-status {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
  margin: 6px 0 0;
}


.voice-capture-status:empty {
  display: none;
}

.capture-input-shell {
  background: #111;
  border: 1px solid #262626;
  border-radius: 14px;
  overflow: hidden;
  position: relative;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.capture-input-shell:focus-within {
  border-color: rgba(211, 245, 219, 0.82);
  box-shadow: 0 0 0 1px rgba(211, 245, 219, 0.3);
}

.capture-field-compose-row {
  position: relative;
}

.capture-input-shell #input {
  background: transparent;
  border: 0;
  border-radius: 0;
  min-width: 0;
  padding-right: 136px;
  padding-top: 34px;
}

.capture-field-actions {
  border-left: 1px solid rgba(211, 245, 219, 0.18);
  bottom: 0;
  display: grid;
  grid-template-columns: 76px 52px;
  position: absolute;
  right: 0;
  top: 0;
  width: 128px;
}

.capture-field-action {
  align-items: center;
  align-self: stretch;
  border: 0;
  border-radius: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 48px;
  padding: 6px 5px;
  width: 100%;
}

.capture-field-action:focus-visible {
  outline-offset: -4px;
  position: relative;
  z-index: 3;
}

.voice-capture-button {
  background: rgba(211, 245, 219, 0.055);
  color: rgba(232, 247, 233, 0.82);
  font-size: 11px;
  font-weight: 700;
  gap: 3px;
}

.voice-capture-button:hover:not(:disabled),
.voice-capture-button[aria-pressed="true"] {
  background: rgba(211, 245, 219, 0.16);
  color: #f1fff2;
}

.voice-capture-button[aria-pressed="true"] {
  box-shadow: inset 0 0 0 2px rgba(211, 245, 219, 0.36);
}

.voice-capture-button:disabled {
  color: rgba(196, 202, 196, 0.42);
  cursor: not-allowed;
}

.voice-capture-microphone {
  fill: none;
  height: 26px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  width: 26px;
}

.capture-save-button {
  background: rgba(144, 202, 249, 0.13);
  border-left: 1px solid rgba(144, 202, 249, 0.24);
  color: #dcefff;
  gap: 7px;
}

.capture-save-button:hover:not(:disabled) {
  background: rgba(144, 202, 249, 0.24);
  color: #f3fbff;
}

.capture-save-icon {
  fill: none;
  height: 27px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  width: 27px;
}

.capture-save-label {
  font-size: 9px;
  font-weight: 750;
  line-height: 1.05;
}

.voice-capture-review {
  align-items: stretch;
  background: rgba(126, 177, 255, 0.09);
  border-top: 1px solid rgba(126, 177, 255, 0.28);
  display: grid;
  gap: 10px;
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 10px 10px 10px 14px;
}

.voice-capture-pending-copy {
  min-width: 0;
}

.voice-capture-pending-label {
  color: rgba(166, 201, 255, 0.82);
  display: block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  margin-bottom: 3px;
  text-transform: uppercase;
}

.voice-capture-transcript {
  color: #d8e8ff;
  font-size: 15px;
  line-height: 1.45;
  margin: 0;
  max-height: 112px;
  overflow: auto;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.voice-capture-review-actions {
  align-items: center;
  display: flex;
  gap: 8px;
}

.voice-capture-review-button {
  align-items: center;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(245, 241, 230, 0.22);
  color: var(--text);
  display: inline-flex;
  font-size: 22px;
  height: 44px;
  justify-content: center;
  padding: 0;
  width: 44px;
}

.voice-capture-accept {
  background: rgba(211, 245, 219, 0.16);
  border-color: rgba(211, 245, 219, 0.44);
  color: #eaffeb;
}

.voice-capture-discard {
  color: rgba(245, 241, 230, 0.78);
}

.context-coach {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  min-width: 0;
}

.context-meter {
  align-items: center;
  display: flex;
  gap: 4px;
  left: 15px;
  position: absolute;
  top: 10px;
  width: auto;
  z-index: 2;
}

.context-meter-segment {
  background: rgba(186, 198, 189, 0.2);
  clip-path: polygon(50% 0%, 62% 34%, 98% 38%, 70% 60%, 79% 96%, 50% 76%, 21% 96%, 30% 60%, 2% 38%, 38% 34%);
  display: block;
  flex: 0 0 13px;
  height: 13px;
  transition: background 140ms ease, filter 140ms ease, transform 140ms ease;
}

.context-meter[data-tier="context-light"] .context-meter-segment.is-filled {
  background: linear-gradient(135deg, #fff3c2, #e6c37a 55%, #fff0a4);
  filter: drop-shadow(0 0 3px rgba(230, 195, 122, 0.48));
}

.context-meter[data-tier="useful-context"] .context-meter-segment.is-filled,
.context-meter[data-tier="clear-context"] .context-meter-segment.is-filled {
  background: linear-gradient(135deg, #e6fbff, #9fd6df 55%, #c4f4fb);
  filter: drop-shadow(0 0 3px rgba(159, 214, 223, 0.48));
}

.context-meter[data-tier="strong-context"] .context-meter-segment.is-filled,
.context-meter[data-tier="rich-context"] .context-meter-segment.is-filled {
  background: linear-gradient(135deg, #e8ffed, #9bddae 55%, #c7f6d2);
  filter: drop-shadow(0 0 4px rgba(155, 221, 174, 0.52));
}

.context-meter[data-tier="full-context"] .context-meter-segment.is-filled {
  background: linear-gradient(135deg, #ffffff, #c4f7cd 55%, #e9ffed);
  filter: drop-shadow(0 0 5px rgba(196, 247, 205, 0.68));
  transform: scale(1.06);
}

.context-coach-message {
  color: #d8d8d2;
  font-size: 12px;
  line-height: 1.4;
  margin: 0;
  overflow-wrap: anywhere;
}

.context-coach-message:empty {
  display: none;
}

.context-coach-prompt {
  align-items: flex-start;
  background: rgba(159, 214, 223, 0.09);
  border: 1px solid rgba(159, 214, 223, 0.36);
  border-radius: 12px;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  padding: 10px 12px;
}

.context-coach-prompt-copy {
  color: #f2f5ef;
  display: grid;
  font-size: 13px;
  gap: 2px;
  line-height: 1.35;
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

.context-coach-prompt-lead {
  color: #b9c2ba;
  font-size: 12px;
}

.context-coach-dismiss {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(245, 241, 230, 0.22);
  color: #f5f5f5;
  flex: 0 0 auto;
  font-size: 12px;
  min-height: 44px;
  padding: 8px 12px;
  width: auto;
}

.context-coach-status {
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

.context-coach + .actions {
  margin-top: 12px;
}

#captureView {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.today-lead {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.today-orientation {
  background:
    radial-gradient(circle at top right, rgba(167, 217, 183, 0.12), transparent 46%),
    linear-gradient(145deg, rgba(18, 24, 20, 0.96), rgba(10, 10, 10, 0.98));
  border-color: rgba(167, 217, 183, 0.24);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
}

.today-orientation .section-eyebrow {
  color: rgba(190, 232, 202, 0.78);
  margin-bottom: 0;
}

.today-date-label {
  font-size: clamp(20px, 5vw, 28px);
  line-height: 1.15;
  margin: 0;
}

.today-prompt {
  color: #f4f8f1;
  font-size: clamp(19px, 5.5vw, 26px);
  font-weight: 750;
  letter-spacing: -0.015em;
  line-height: 1.25;
  margin: 2px 0 0;
  max-width: 30ch;
}

.today-support {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  margin: 0;
  max-width: 58ch;
}

.today-capture-button {
  align-self: flex-start;
  background: rgba(211, 245, 219, 0.14);
  border: 1px solid rgba(211, 245, 219, 0.42);
  color: #e8fbe9;
  margin-top: 4px;
  width: auto;
}

.today-capture-button:hover {
  background: rgba(211, 245, 219, 0.22);
}

.today-return-point {
  background: rgba(211, 245, 219, 0.055);
  border: 1px solid rgba(211, 245, 219, 0.22);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 6px;
  padding: 12px;
}

.today-return-point.hidden,
.today-return-point[hidden] {
  display: none;
}

.today-return-point-label {
  color: rgba(190, 232, 202, 0.76);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.today-return-point-text {
  color: #eff7ed;
  font-size: 15px;
  line-height: 1.45;
  margin: 0;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.today-return-point-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.today-return-point-actions button {
  font-size: 12px;
  min-height: 44px;
  padding: 6px 10px;
  width: auto;
}

.today-return-point-secondary {
  background: transparent;
  border-color: rgba(245, 241, 230, 0.2);
  color: var(--muted);
}

.composer-mode-switch {
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  margin-bottom: 8px;
}

.composer-mode-tab {
  align-items: flex-start;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(245, 241, 230, 0.12);
  border-radius: 12px;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  font-size: 16px;
  gap: 2px;
  max-width: none;
  min-height: 44px;
  min-width: 0;
  padding: 8px 10px;
  text-align: left;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, opacity 0.16s ease;
  width: 100%;
}

.composer-mode-tab:not(.active) {
  opacity: 0.56;
}

.composer-mode-tab.active {
  background: rgba(211, 245, 219, 0.1);
  border-color: rgba(211, 245, 219, 0.48);
  color: #eff9ef;
  opacity: 1;
}

#reentryModeButton {
  align-items: flex-start;
  margin-left: 0;
  text-align: left;
}

.composer-mode-tab:focus-visible {
  outline: 2px solid rgba(211, 245, 219, 0.72);
  outline-offset: 2px;
}

.composer-mode-title {
  color: var(--text);
  font-size: 16px;
  font-weight: 800;
  line-height: 1.2;
}

.composer-mode-hint {
  color: var(--muted);
  font-size: 13px;
  font-weight: 550;
  line-height: 1.25;
  max-width: 100%;
  overflow: hidden;
  overflow-wrap: anywhere;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.composer-mode-tab:not(.active) .composer-mode-hint {
  opacity: 0.7;
}

.reentry-cue-peek {
  align-items: center;
  background: rgba(211, 245, 219, 0.035);
  border: 1px solid rgba(211, 245, 219, 0.18);
  border-radius: 8px;
  color: rgba(223, 232, 223, 0.58);
  display: flex;
  gap: 7px;
  margin: -4px 0 10px;
  min-height: 24px;
  min-width: 0;
  opacity: 0.72;
  overflow: hidden;
  padding: 3px 8px;
  text-align: left;
  width: 100%;
}

.reentry-cue-peek:hover {
  background: rgba(211, 245, 219, 0.07);
  border-color: rgba(211, 245, 219, 0.3);
  opacity: 0.9;
}

.reentry-cue-peek-label,
.reentry-cue-peek-text {
  font-size: 9px;
  line-height: 1.15;
  white-space: nowrap;
}

.reentry-cue-peek-label {
  flex: 0 0 auto;
}

.reentry-cue-peek-text {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.composer-mode-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.reentry-cue-help,
.reentry-cue-status {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  margin: 0;
  overflow-wrap: anywhere;
}

#captureComposer[data-composer-mode="capture"] .capture-input-shell,
#captureComposer[data-composer-mode="return"] .reentry-cue-input-shell {
  border-color: rgba(211, 245, 219, 0.82);
  box-shadow: 0 0 0 1px rgba(211, 245, 219, 0.3);
}

#captureComposer[data-composer-mode="return"] .reentry-cue-form {
  gap: 6px;
  margin-left: 0;
  text-align: left;
  width: 100%;
}

#captureComposer[data-composer-mode="return"] .reentry-cue-form .composer-label {
  margin-bottom: 0;
}

#captureComposer[data-composer-mode="return"] .reentry-cue-status {
  flex: 0 0 auto;
  min-height: 0;
  text-align: left;
}

#captureComposer[data-composer-mode="return"] .reentry-cue-form .composer-label,
#captureComposer[data-composer-mode="return"] .reentry-cue-help,
#captureComposer[data-composer-mode="return"] .reentry-cue-status,
#captureComposer[data-composer-mode="return"] #reentryCueInput {
  text-align: left;
}

.reentry-cue-input-shell #reentryCueInput {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  display: block;
  min-height: 88px;
  padding: 14px;
}

.reentry-cue-field-actions {
  border-top: 1px solid var(--line);
  display: flex;
  min-height: 48px;
}

.reentry-cue-field-secondary {
  align-items: stretch;
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
}

#reentryCueSaveButton {
  flex: 0 0 112px;
  width: 112px;
}

.reentry-cue-secondary {
  background: transparent;
  border: 0;
  border-radius: 0;
  color: var(--muted);
  font-size: 12px;
  min-height: 48px;
  padding: 6px 8px;
  width: auto;
}

.reentry-cue-footer {
  align-items: start;
  column-gap: 8px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
}

.reentry-cue-footer .composer-help {
  margin: 0;
}

.reentry-cue-clear {
  background: transparent;
  border: 0;
  border-radius: 0;
  color: var(--muted);
  font-size: 12px;
  min-height: 48px;
  padding: 6px 8px;
  width: auto;
}

.reentry-cue-clear:hover {
  color: #e7eee7;
}

.reentry-cue-count {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.reentry-cue-status:empty {
  display: none;
}

.capture-drafts {
  display: contents;
}

.capture-drafts-button {
  background: transparent;
  border: 0;
  color: rgba(196, 202, 196, 0.54);
  font-size: 13px;
  font-weight: 650;
  grid-column: 2;
  grid-row: 1;
  min-height: 30px;
  padding: 4px 2px;
  width: auto;
}

.capture-drafts-status:not(:empty),
.capture-drafts-panel {
  grid-column: 1 / -1;
}

.capture-drafts-button:hover,
.capture-drafts-button[aria-expanded="true"] {
  color: rgba(224, 231, 224, 0.82);
}

.capture-drafts-count:not(:empty)::before {
  content: " · ";
}

.capture-drafts-panel {
  background: #111;
  border: 1px solid rgba(245, 241, 230, 0.12);
  border-radius: 12px;
  display: grid;
  gap: 8px;
  padding: 10px;
  width: 100%;
  min-width: 0;
}

.capture-drafts-panel:focus-visible {
  outline: 2px solid rgba(211, 245, 219, 0.72);
  outline-offset: 2px;
}

.capture-drafts-heading {
  align-items: flex-start;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.capture-drafts-heading > div {
  flex: 1 1 auto;
  min-width: 0;
}

.capture-drafts-heading h3 {
  color: var(--text);
  font-size: 13px;
  line-height: 1.3;
  margin: 0 0 2px;
}

.capture-drafts-heading p,
.capture-drafts-empty,
.capture-drafts-status {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
  margin: 0;
}

.capture-drafts-close {
  background: transparent;
  border: 0;
  color: var(--muted);
  flex: 0 0 auto;
  font-size: 11px;
  margin-right: 8px;
  min-height: 44px;
  padding: 8px 5px;
  width: auto;
}

.regain-thread-section {
  border-top: 1px solid rgba(245, 241, 230, 0.1);
  display: grid;
  gap: 8px;
  min-width: 0;
  padding-top: 9px;
}

.regain-thread-section[hidden],
.capture-drafts-empty[hidden] {
  display: none;
}

.regain-thread-section h4,
.regain-thread-section-heading p,
.regain-thread-return-point-text {
  margin: 0;
}

.regain-thread-section h4 {
  color: var(--text);
  font-size: 12px;
  line-height: 1.3;
}

.regain-thread-section-heading {
  display: grid;
  gap: 2px;
}

.regain-thread-section-heading p,
.regain-thread-return-point-text {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.regain-thread-return-point-text {
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.regain-thread-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.regain-thread-actions button {
  min-height: 44px;
  padding: 8px 11px;
  width: auto;
}

.regain-thread-actions .regain-thread-secondary {
  background: transparent;
  border-color: rgba(245, 241, 230, 0.18);
  color: var(--muted);
}

.thread-kit-list {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.thread-kit-item {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(245, 241, 230, 0.1);
  border-radius: 9px;
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 9px;
}

.thread-kit-date,
.thread-kit-preview {
  margin: 0;
  overflow-wrap: anywhere;
}

.thread-kit-date {
  color: rgba(196, 202, 196, 0.58);
  font-size: 10px;
  line-height: 1.3;
}

.thread-kit-preview {
  color: rgba(234, 239, 234, 0.82);
  display: -webkit-box;
  font-size: 12px;
  line-height: 1.4;
  max-height: 5.6em;
  overflow: hidden;
  white-space: pre-wrap;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

.thread-kit-keep-button {
  background: transparent;
  border: 1px solid rgba(245, 241, 230, 0.18);
  color: var(--muted);
  font-size: 13px;
  min-height: 44px;
  padding: 8px 12px;
  width: auto;
}

.thread-kit-keep-button[aria-pressed="true"] {
  border-color: rgba(211, 245, 219, 0.34);
  color: rgba(222, 240, 225, 0.86);
}

.thread-session-reference {
  align-items: flex-start;
  background: rgba(211, 245, 219, 0.04);
  border: 1px solid rgba(211, 245, 219, 0.16);
  border-radius: 9px;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  margin-top: 8px;
  min-width: 0;
  padding: 8px 9px;
}

.thread-session-reference[hidden] {
  display: none;
}

.thread-session-reference-copy {
  flex: 1 1 auto;
  min-width: 0;
}

.thread-session-reference-heading {
  align-items: baseline;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.thread-session-reference-heading strong,
.thread-session-reference-date {
  font-size: 10px;
  line-height: 1.3;
}

.thread-session-reference-heading strong {
  color: rgba(222, 240, 225, 0.82);
}

.thread-session-reference-date {
  color: rgba(196, 202, 196, 0.56);
}

.thread-session-reference-text {
  color: rgba(234, 239, 234, 0.74);
  display: -webkit-box;
  font-size: 11px;
  line-height: 1.35;
  margin: 3px 0 0;
  max-height: 2.7em;
  overflow: hidden;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.thread-session-reference-dismiss {
  background: transparent;
  border: 0;
  color: var(--muted);
  flex: 0 0 auto;
  font-size: 11px;
  min-height: 44px;
  padding: 8px 4px;
  width: auto;
}

.capture-drafts-list {
  display: grid;
  gap: 5px;
}

.capture-draft-item {
  align-items: center;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(245, 241, 230, 0.1);
  border-radius: 9px;
  color: rgba(234, 239, 234, 0.76);
  display: flex;
  font-size: 12px;
  font-weight: 550;
  gap: 10px;
  justify-content: space-between;
  min-height: 44px;
  padding: 7px 9px;
  text-align: left;
  width: 100%;
}

.capture-draft-item:hover {
  background: rgba(211, 245, 219, 0.06);
  border-color: rgba(211, 245, 219, 0.22);
  color: #eff7ed;
}

.capture-draft-preview {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.capture-draft-time {
  color: rgba(196, 202, 196, 0.48);
  flex: 0 0 auto;
  font-size: 10px;
  font-weight: 500;
}

.capture-drafts-status:empty {
  display: none;
}

@media (min-width: 769px) {
  .today-lead {
    align-items: stretch;
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  }

  .today-lead:has(#authSection.logged-in) .today-orientation {
    grid-column: 1 / -1;
  }

  body.auth-surface-active .today-lead {
    display: block;
  }
}

.reflection-toast {
  align-items: flex-start;
  background: rgba(18, 30, 22, 0.92);
  border: 1px solid rgba(190, 232, 202, 0.38);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.32);
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 0;
  padding: 12px 14px;
  position: static;
  transform: none;
  width: 100%;
}

.reflection-toast-title {
  color: #d8f5dc;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
}

.reflection-toast-message {
  color: #f4f8f1;
  font-size: 14px;
  line-height: 1.35;
  margin: 4px 0 0;
}

.reflection-toast-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.reflection-toast-button,
.reflection-toast-dismiss {
  min-height: 44px;
  padding: 8px 12px;
  width: auto;
}

.reflection-toast-button {
  background: rgba(211, 245, 219, 0.18);
  border: 1px solid rgba(211, 245, 219, 0.48);
  color: #e8fbe9;
  font-size: 13px;
}

.reflection-toast-dismiss {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(245, 241, 230, 0.18);
  color: #ece7dd;
  font-size: 13px;
}

#captureComposer {
  border-radius: 16px;
  margin-top: 0;
  padding-bottom: 0;
  position: static;
  width: 100%;
}

textarea {
  width: 100%;
  min-height: 88px;
  max-height: min(38dvh, 320px);
  background: #111;
  border: 1px solid #262626;
  border-radius: 14px;
  padding: 16px;
  color: #fff;
  font-size: 17px;
  line-height: 1.5;
  resize: none;
  margin-bottom: 0;
  outline: none;
  overflow-x: hidden;
  overflow-y: auto;
}

textarea:focus { border-color: #4a4a4a; }

.actions { display: flex; flex-direction: column; gap: 10px; }

button {
  background: #fff;
  color: #000;
  border: none;
  border-radius: 999px;
  padding: 14px 16px;
  font-size: 16px;
  font-weight: 700;
  min-height: 44px;
  cursor: pointer;
}

button:disabled { opacity: 0.5; cursor: not-allowed; }

.status-area {
  min-height: 24px;
  font-size: 14px;
  line-height: 1.4;
  text-align: left;
  transition: color 0.2s ease;
  overflow-wrap: anywhere;
}

#captureComposer .status-area:empty,
#captureComposer .capture-drafts-status:empty {
  display: none;
}
.status-area.success { color: var(--success); }
.status-area.error { color: var(--error); }
.status-area.warning { color: var(--warning); }
.status-area.info { color: var(--info); }

/* Status Badges */
.status-badge { background: #1a1a1a; color: #888; }
.status-badge.success { background: #112211; color: var(--success); }
.status-badge.error { background: #221111; color: var(--error); }
.status-badge.info { background: #111122; color: var(--info); }
.status-badge.warning { background: #221c11; color: var(--warning); }

.center-message {
  color: #666;
  padding: 1.5rem;
  text-align: center;
  overflow-wrap: anywhere;
}

.center-message.error {
  color: var(--error);
}

.auth-container {
  margin-bottom: 0;
}

.auth-container.logged-in {
  display: none;
}

.auth-logged-out,
.auth-logged-in {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-width: none;
}

.auth-form label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.auth-form input,
.search-field {
  width: 100%;
  min-width: 0;
  height: 44px;
  background: #111;
  border: 1px solid #262626;
  color: #fff;
  padding: 0 12px;
  border-radius: 12px;
  font-size: 16px;
}

.auth-form input:focus,
.search-field:focus {
  border-color: #4a4a4a;
  outline: none;
}

.auth-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.auth-explainer,
.auth-trust-copy {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
  margin: 6px 0 0;
}

.auth-trust-copy {
  color: var(--text);
}

.auth-flow {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.auth-flow h3,
.auth-flow p {
  margin: 0;
}

.auth-flow p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.auth-flow-actions {
  display: grid;
  gap: 8px;
}

.auth-login-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.auth-login-actions #loginButton {
  flex: 1 1 auto;
  min-width: 0;
}

.auth-login-actions .auth-text-button {
  flex: 0 0 auto;
  width: auto;
}

.auth-flow-actions button,
.auth-flow > button {
  width: 100%;
}

.auth-text-button {
  min-height: 44px;
  padding: 6px 4px;
  color: var(--muted);
  background: transparent;
  border-color: transparent;
  font-size: 13px;
}

.auth-text-button:hover,
.auth-text-button:focus-visible {
  color: var(--text);
  background: #171717;
  border-color: #303030;
}

.auth-support-link {
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.auth-support-link:hover,
.auth-support-link:focus-visible {
  color: var(--text);
}

.auth-surface-companion {
  display: none;
}

body:not(.auth-surface-active) #backToCaptureFromLoginButton {
  display: none;
}

body.auth-surface-active .app-shell-bar,
body.auth-surface-active #helpPanel,
body.auth-surface-active #notificationPanel,
body.auth-surface-active #appMenu,
body.auth-surface-active #guestClaimDialog,
body.auth-surface-active #installCard,
body.auth-surface-active #captureView,
body.auth-surface-active #todayOrientation,
body.auth-surface-active #reflectionView,
body.auth-surface-active #searchView,
body.auth-surface-active #archetypesView,
body.auth-surface-active #userContextView,
body.auth-surface-active #settingsView,
body.auth-surface-active #memoryView,
body.auth-surface-active #betaAuditView,
body.auth-surface-active #privacyDataView,
body.auth-surface-active #captureDock,
body.auth-surface-active #captureComposer {
  display: none !important;
}

body.auth-surface-active main {
  min-height: calc(100dvh - 49px);
  padding-bottom: 24px;
}

body.auth-surface-active #todayLead.hidden {
  display: block !important;
}

body.auth-surface-active #authSection {
  align-items: stretch;
  background:
    linear-gradient(135deg, rgba(167, 217, 183, 0.08), transparent 34%),
    #060706;
  border-color: rgba(167, 217, 183, 0.18);
  display: grid;
  gap: clamp(18px, 4vw, 34px);
  grid-template-columns: minmax(280px, 420px) minmax(260px, 1fr);
  margin: 16px auto 0;
  min-height: min(560px, calc(100dvh - 90px));
  padding: clamp(16px, 4vw, 32px);
  width: min(100%, 920px);
}

body.auth-surface-active #authSection > .auth-flow,
body.auth-surface-active #loggedOutUI {
  align-self: center;
}

body.auth-surface-active #loggedOutUI,
body.auth-surface-active .auth-flow:not(.hidden) {
  background: rgba(12, 13, 12, 0.84);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.26);
  padding: clamp(16px, 3vw, 22px);
}

body.auth-surface-active #loggedOutUI h3,
body.auth-surface-active .auth-flow h3 {
  font-size: clamp(22px, 4vw, 30px);
  line-height: 1.1;
}

body.auth-surface-active .auth-explainer,
body.auth-surface-active .auth-trust-copy,
body.auth-surface-active .auth-flow p {
  font-size: 14px;
  line-height: 1.5;
}

body.auth-surface-active .auth-surface-companion {
  align-self: stretch;
  background:
    linear-gradient(180deg, rgba(167, 217, 183, 0.12), rgba(255, 255, 255, 0.035)),
    rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(167, 217, 183, 0.2);
  border-radius: 18px;
  color: var(--text);
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100%;
  padding: clamp(18px, 4vw, 28px);
}

body.auth-surface-active .auth-surface-companion h3 {
  font-size: clamp(24px, 4vw, 34px);
  line-height: 1.08;
  margin: 10px 0 0;
}

body.auth-surface-active .auth-surface-companion p {
  color: rgba(255, 255, 255, 0.78);
  font-size: 15px;
  line-height: 1.55;
  margin: 14px 0 0;
  max-width: 36rem;
}

body.auth-surface-active .auth-surface-companion ul {
  display: grid;
  gap: 9px;
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
}

body.auth-surface-active .auth-surface-companion li {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
  line-height: 1.45;
  padding-top: 9px;
}

body.auth-surface-active #authStatus {
  grid-column: 1 / -1;
  margin: 0;
}

@media (max-width: 760px) {
  body.auth-surface-active main {
    min-height: calc(100dvh - 49px);
    padding: 12px 12px 20px;
  }

  body.auth-surface-active #authSection {
    grid-template-columns: 1fr;
    margin-top: 0;
    min-height: auto;
    padding: 14px;
  }

  body.auth-surface-active .auth-surface-companion {
    min-height: auto;
  }
}

@media (max-width: 430px) {
  body.auth-surface-active .auth-login-actions {
    align-items: stretch;
    flex-direction: column;
  }

  body.auth-surface-active .auth-login-actions .auth-text-button {
    width: 100%;
  }
}

.auth-password-hint {
  color: var(--muted) !important;
  font-size: 12px !important;
}

.guest-storage-notice,
.guest-claim-dialog {
  border: 1px solid rgba(167, 217, 183, 0.24);
  color: var(--muted);
}

.guest-storage-notice {
  border-radius: 10px;
  margin: 12px 0;
  padding: 10px 12px;
}

.guest-storage-notice p {
  margin: 0 0 6px;
}

.guest-storage-notice p:last-child {
  margin-bottom: 0;
}

.guest-claim-dialog {
  position: relative;
  z-index: 20;
}

.guest-claim-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.guest-entry-list { margin: 12px 0; }
.guest-entry-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px 44px;
  align-items: start;
  gap: 4px;
  border-bottom: 1px solid var(--line);
}
.guest-entry-row details { min-width: 0; }
.guest-entry-row summary {
  cursor: pointer;
  padding: 12px 4px;
  min-height: 44px;
  box-sizing: border-box;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text);
}
.guest-entry-text { white-space: pre-wrap; overflow-wrap: anywhere; margin: 4px 4px 12px; }
.guest-entry-action { width: 44px; height: 44px; padding: 0; font-size: 16px; background: transparent; color: var(--text); }
.guest-entry-keep { color: var(--muted); border-color: transparent; }
.guest-entry-row summary:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

.auth-account-line {
  align-items: center;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 14px;
  gap: 6px;
  line-height: 1.35;
  min-width: 0;
}

#userEmail {
  color: var(--text);
  overflow-wrap: anywhere;
}

.auth-sync-note {
  color: var(--success);
  white-space: nowrap;
}

.auth-sync-note::before {
  color: var(--muted);
  content: "-";
  margin-right: 6px;
}

.auth-actions button,
.auth-form button,
.actions > button,
.reflection-run-button {
  width: 100%;
}

.auth-actions button {
  flex: 1 1 120px;
}

.auth-container.logged-in .auth-actions {
  margin-left: auto;
}

.auth-container.logged-in .auth-actions button {
  flex: 0 0 auto;
  width: auto;
}

.install-card {
  align-items: flex-start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.install-card-copy {
  display: grid;
  gap: 6px;
  flex: 1 1 auto;
  min-width: 0;
}

.install-card-copy h3 {
  font-size: 18px;
  line-height: 1.2;
  margin: 0;
}

.install-card-copy-text,
.install-card-steps {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
  margin: 0;
  overflow-wrap: anywhere;
}

.install-card-steps {
  color: var(--text);
}

.install-card-actions {
  align-items: flex-start;
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.install-primary-button {
  background: var(--info);
  color: #000;
  width: auto;
}

.logout-button {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 14px;
  min-height: 44px;
  padding: 8px 12px;
}

.entry-item {
  background: #050505;
  border: 1px solid #1a1a1a;
  border-radius: 10px;
  display: grid;
  gap: 10px;
  margin-bottom: 0.5rem;
  overflow: hidden;
  padding: 12px;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.entry-item.synced {
  opacity: 0.86;
}

.entry-item.has-overflow {
  border-color: #242424;
}

.recent-helper,
.reflection-intro {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
  margin: 4px 0;
}

.reflection-intro {
  margin-bottom: 14px;
}

.entry-group-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1;
  margin: 14px 0 8px;
  text-transform: uppercase;
}

.entry-card-meta {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-start;
}

.entry-card-meta .entry-status {
  margin-left: auto;
}

.entry-card-meta .thread-kit-keep-button {
  flex: 0 0 auto;
}

.entry-relative-time {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.entry-kind-title {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  margin: 0;
}

.entry-item.entry-today-answer {
  background: #0c1510;
  border-color: #3c5546;
  border-left-width: 3px;
}

.entry-today-answer .entry-kind-title {
  color: #c3dfcd;
}

.entry-status {
  white-space: nowrap;
}

.entry-preview-body-wrap {
  min-width: 0;
  position: relative;
}

.entry-preview-body {
  color: var(--text);
  font-size: 14px;
  line-height: 1.45;
  margin: 0;
  max-height: calc(1.45em * var(--entry-preview-max-lines, 5));
  overflow: hidden;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.entry-preview-body.is-full {
  max-height: none;
}

.entry-item.has-overflow .entry-preview-body-wrap::after {
  background: linear-gradient(180deg, rgba(5, 5, 5, 0), rgba(5, 5, 5, 1));
  bottom: 0;
  content: "";
  height: 2.8em;
  left: 0;
  pointer-events: none;
  position: absolute;
  right: 0;
}

.entry-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.entry-cleanup-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: -2px;
}

.entry-cleanup-badge {
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1;
  padding: 5px 8px;
}

.entry-original-toggle {
  background: transparent;
  border: 0;
  color: var(--accent);
  cursor: pointer;
  font-size: 12px;
  min-height: 44px;
  padding: 4px 0;
  text-decoration: underline;
  width: auto;
}

.entry-original-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.cleanup-review-card {
  background: #111;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  margin-top: 4px;
  padding: 12px;
}

.cleanup-review-title {
  font-size: 15px;
  line-height: 1.25;
  margin: 0;
}

.cleanup-review-note,
.cleanup-review-reason,
.cleanup-review-status,
.cleanup-review-classification {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
  margin: 0;
}

.cleanup-review-status:not(:empty) {
  color: #ffb86c;
}

.cleanup-review-compare {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cleanup-review-text-block {
  border: 1px solid var(--line);
  border-radius: 6px;
  min-width: 0;
  padding: 10px;
}

.cleanup-review-label {
  color: var(--muted);
  display: block;
  font-size: 12px;
  margin-bottom: 6px;
}

.cleanup-review-text {
  color: var(--text);
  font-size: 13px;
  line-height: 1.4;
  margin: 0;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.cleanup-review-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cleanup-review-action {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 13px;
  min-height: 44px;
  padding: 8px 10px;
  width: auto;
}

.cleanup-correction-editor {
  display: grid;
  gap: 8px;
}

.cleanup-correction-textarea {
  background: #080808;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  font: inherit;
  font-size: 16px;
  line-height: 1.4;
  min-height: 120px;
  padding: 10px;
  resize: vertical;
  white-space: pre-wrap;
  width: 100%;
}

.entry-open-button,
.entry-reader-close-button {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 13px;
  min-height: 44px;
  padding: 8px 12px;
  width: auto;
}

@media (max-width: 560px) {
  .cleanup-review-compare {
    grid-template-columns: 1fr;
  }
}

.entry-detail-line {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
  margin: 0;
  overflow-wrap: anywhere;
}

.entry-saved-line {
  margin-top: -2px;
}

.entry-error {
  background: #221111;
  border: 1px solid #442222;
  border-radius: 6px;
  color: #ff4444;
  font-size: 0.85rem;
  margin: 0;
  padding: 0.5rem 0.6rem;
  overflow-wrap: anywhere;
}

.status-badge {
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 2px 8px;
  text-transform: uppercase;
}

.retry-sync-button {
  background: #333;
  border: 1px solid #444;
  border-radius: 4px;
  color: #fff;
  cursor: pointer;
  font-size: 0.75rem;
  padding: 2px 8px;
  width: auto;
}

@keyframes pulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

.syncing-pulse {
    animation: pulse 1.5s infinite ease-in-out;
}

.response-preview {
  background: #111;
  padding: 20px;
  border-radius: 12px;
  border: 1px solid var(--line);
}

.response-preview h3 {
  font-size: 16px;
  margin: 0 0 10px;
}

.last-saved-content {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.last-saved-body {
  color: var(--text);
  font-size: 16px;
}

.last-saved-meta {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
  margin: 0;
  overflow-wrap: anywhere;
}

.entry-reader-overlay {
  align-items: flex-end;
  background: rgba(0, 0, 0, 0.78);
  display: flex;
  inset: var(--mirr-viewport-offset-top, 0px) 0 var(--mirr-viewport-bottom, 0px);
  justify-content: center;
  padding: max(12px, env(safe-area-inset-top)) 12px max(12px, env(safe-area-inset-bottom));
  position: fixed;
  z-index: 40;
}

.entry-reader-sheet {
  display: flex;
  max-height: max(0px, calc(var(--mirr-viewport-height, 100dvh) - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom)));
  min-width: 0;
  width: min(100%, 760px);
}

.entry-reader-dialog {
  background: #050505;
  border: 1px solid var(--line);
  border-radius: 18px 18px 0 0;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  max-height: inherit;
  min-height: 0;
  overflow: hidden;
}

.entry-reader-header {
  align-items: flex-start;
  border-bottom: 1px solid #171717;
  display: flex;
  flex: 0 0 auto;
  gap: 12px;
  justify-content: space-between;
  padding: 16px;
}

.entry-reader-heading {
  min-width: 0;
}

.entry-reader-title {
  color: var(--text);
  font-size: 18px;
  line-height: 1.2;
  margin: 0;
}

.entry-reader-meta {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
  margin: 6px 0 0;
  overflow-wrap: anywhere;
}

.entry-reader-body {
  color: var(--text);
  flex: 1 1 auto;
  font-size: 15px;
  line-height: 1.55;
  margin: 0;
  min-height: 0;
  overflow-wrap: anywhere;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 16px;
  white-space: pre-wrap;
}

body.entry-reader-open {
  inset: 0;
  overflow: hidden;
  position: fixed;
  width: 100%;
}

button:focus-visible,
textarea:focus-visible,
input:focus-visible {
  outline: 2px solid rgba(144, 202, 249, 0.9);
  outline-offset: 2px;
}

.entry-reader-body:focus-visible {
  outline: 2px solid var(--info);
  outline-offset: -4px;
}

.prototype-nav { display: flex; gap: 8px; margin-left: auto; }
.nav-btn {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 10px 14px;
  font-size: 14px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  min-height: 44px;
}
.nav-btn.active {
  background: var(--line);
  color: #fff;
  border-color: #444;
}

.search-controls,
#reflectionSurface,
#localEntries,
.response-preview {
  margin-bottom: 0;
}

.search-layout {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.search-layout > * {
  min-width: 0;
}

.search-field-wide {
  flex: 2 1 220px;
}

.search-field-narrow {
  flex: 1 1 120px;
}

.search-field-date {
  flex: 1 1 130px;
}

.search-date-field {
  display: grid;
  flex: 1 1 150px;
  gap: 6px;
  min-width: 0;
  color: var(--muted);
  font-size: 14px;
}

.search-date-field .search-field {
  width: 100%;
}

.search-button {
  background: var(--info);
  color: #000;
  flex: 0 1 110px;
}

.search-clear-button {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
  flex: 0 1 96px;
}

.reflection-summary {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  margin-bottom: 16px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  text-align: center;
}

.reflection-state {
  margin-bottom: 14px;
}

.reflection-empty-state,
.reflection-state-row {
  background: #050505;
  border: 1px solid #1a1a1a;
  border-radius: 10px;
  padding: 12px;
}

.reflection-empty-title {
  color: var(--text);
  font-size: 16px;
  font-weight: 800;
  line-height: 1.3;
  margin: 0 0 4px;
}

.reflection-empty-copy {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
  margin: 0;
}

.reflection-state-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.reflection-state-title {
  color: var(--text);
  font-size: 15px;
  font-weight: 800;
}

.reflection-state-pill {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  padding: 5px 8px;
  text-transform: uppercase;
}

.reflection-state-updated {
  color: var(--muted);
  flex: 1 1 180px;
  font-size: 13px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.summary-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: #050505;
  border: 1px solid #1a1a1a;
  border-radius: 12px;
  padding: 12px 10px;
}
.summary-stat .label { font-size: 12px; color: var(--muted); text-transform: uppercase; }
.summary-stat .value { font-size: 18px; font-weight: 800; }

.day-group { margin-bottom: 30px; }
.day-header {
  font-size: 14px;
  color: var(--muted);
  font-weight: 700;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.day-header::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.synced-entry {
  background: #050505;
  border: 1px solid #1a1a1a;
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 8px;
  font-size: 15px;
  line-height: 1.4;
  word-break: break-word;
  overflow-wrap: anywhere;
}
.synced-entry .time { font-size: 11px; color: #444; margin-top: 4px; }

pre {
  margin: 0;
  font-family: monospace;
  font-size: 12px;
  overflow-x: auto;
  color: #ccc;
  white-space: pre-wrap;
  word-break: break-word;
}

#testFixturesPanel pre {
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 12px;
  margin: 12px 0;
  max-height: 22rem;
  overflow: auto;
  line-height: 1.55;
}

.hidden { display: none !important; }

[data-mirr-feature-mode="hidden"] {
  display: none !important;
}

[data-mirr-feature-mode="read_only"] [data-mirr-feature-write],
[data-mirr-feature-mode="read_only"][data-mirr-feature-write] {
  cursor: not-allowed;
  opacity: 0.62;
}

code { background: #222; padding: 2px 4px; border-radius: 3px; }

.reflection-actions {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 12px;
  margin: 16px 0;
}

.reflection-actions > .reflection-narrative-option {
  flex: 1 1 100%;
  min-width: 0;
}

.ai-reflection-header {
  flex-wrap: wrap;
  gap: 8px;
}

.ai-reflection-body {
  min-width: 0;
  overflow-wrap: anywhere;
}

.reflection-narrative-option {
  background: #050505;
  border: 1px solid #1a1a1a;
  border-radius: 12px;
  padding: 12px;
}

.reflection-narrative-label {
  align-items: center;
  color: var(--text);
  cursor: pointer;
  display: flex;
  font-weight: 800;
  gap: 10px;
  min-height: 44px;
}

.reflection-narrative-label input {
  flex: 0 0 auto;
  height: 20px;
  margin: 0;
  width: 20px;
}

.reflection-narrative-option p,
.reflection-narrative-affordance,
.reflection-narrative-provider-disclosure {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  margin: 6px 0 0;
}

.reflection-narrative-usage {
  border-top: 1px solid var(--line);
  margin-top: 18px;
  padding-top: 16px;
}

.reflection-narrative-usage-title {
  font-size: 14px;
  margin: 0 0 8px;
}

.reflection-narrative-day-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.reflection-narrative-day-link {
  background: transparent;
  border: 1px solid var(--info);
  border-radius: 999px;
  color: var(--info);
  cursor: pointer;
  min-height: 44px;
  padding: 8px 12px;
  text-align: left;
}

.reflection-narrative-day-link:focus-visible {
  outline: 2px solid var(--info);
  outline-offset: 2px;
}

.reflection-run-button {
  background: var(--info);
  color: #000;
  border: none;
  font-weight: 800;
  padding: 14px 18px;
  border-radius: 12px;
  cursor: pointer;
}

.archetypes-panel h2,
.archetypes-panel h3 {
  margin: 0;
}

.archetypes-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.archetypes-intro,
.archetype-sample-note,
.archetype-card p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
  margin: 0;
  overflow-wrap: anywhere;
}

.archetype-signals {
  background: #050505;
  border: 1px solid #1a1a1a;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
}

.archetype-section-header {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: space-between;
}

.archetype-section-header h3,
.archetype-card h3 {
  color: var(--text);
  font-size: 16px;
  line-height: 1.25;
}

.archetype-sample-badge {
  background: rgba(144, 202, 249, 0.1);
  border: 1px solid rgba(144, 202, 249, 0.24);
  border-radius: 999px;
  color: var(--info);
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  padding: 5px 8px;
  text-transform: uppercase;
}

.archetype-signal-list {
  display: grid;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.archetype-signal-list li {
  align-items: center;
  border-top: 1px solid #141414;
  color: var(--text);
  display: flex;
  justify-content: space-between;
  min-width: 0;
  padding-top: 8px;
}

.archetype-signal-list strong {
  color: var(--success);
  font-size: 14px;
}

.archetype-card-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.archetype-card {
  background: #050505;
  border: 1px solid #1a1a1a;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  padding: 12px;
}

.archetype-card-title {
  align-items: center;
  display: flex;
  gap: 8px;
  min-width: 0;
}

.archetype-symbol {
  align-items: center;
  background: #0f0f0f;
  border: 1px solid #2a2a2a;
  border-radius: 4px;
  color: var(--text);
  display: inline-flex;
  flex: 0 0 auto;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  font-weight: 800;
  height: 28px;
  justify-content: center;
  line-height: 1;
  width: 36px;
}

.archetype-card strong {
  color: var(--text);
}

.archetype-feedback {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: 4px;
  padding-top: 10px;
}

.archetype-feedback-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.archetype-feedback-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.archetype-feedback-button {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  color: var(--muted);
  flex: 0 1 auto;
  font-size: 12px;
  font-weight: 700;
  min-height: 44px;
  padding: 6px 9px;
  width: auto;
}

.archetype-feedback-button.selected,
.archetype-feedback-button[aria-pressed="true"] {
  background: rgba(144, 202, 249, 0.12);
  border-color: rgba(144, 202, 249, 0.38);
  color: var(--info);
}

.archetype-feedback-status {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  margin: 8px 0 0;
  min-height: 16px;
  overflow-wrap: anywhere;
}

.ai-reflection-container,
.response-preview,
.panel,
.entry-item,
.synced-entry,
.summary-stat {
  box-shadow: none;
}

.pause-card {
  background: rgba(167, 217, 183, 0.06);
  border: 1px solid rgba(167, 217, 183, 0.28);
  border-left: 3px solid rgba(167, 217, 183, 0.82);
  border-radius: 8px;
  margin: 0 0 16px;
  padding: 14px;
}

.pause-card-title {
  color: var(--success);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 12px;
}

.pause-card-field {
  margin-bottom: 12px;
}

.pause-card-field:last-child {
  margin-bottom: 0;
}

.pause-card-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.2;
  margin-bottom: 5px;
  text-transform: uppercase;
}

.pause-card-body {
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
  margin: 0;
  overflow-wrap: anywhere;
}

.pause-card-next-move {
  background: #0f1611;
  border: 1px solid rgba(167, 217, 183, 0.2);
  border-radius: 8px;
  color: #fff;
  font-weight: 700;
  padding: 10px;
}

.pause-card-feedback {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: 14px;
  padding-top: 12px;
}

.pause-card-feedback-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pause-card-feedback-button {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  color: var(--muted);
  flex: 0 1 auto;
  font-size: 12px;
  font-weight: 700;
  min-height: 44px;
  padding: 6px 10px;
  width: auto;
}

.pause-card-feedback-button.selected,
.pause-card-feedback-button[aria-pressed="true"] {
  background: rgba(167, 217, 183, 0.12);
  border-color: rgba(167, 217, 183, 0.42);
  color: var(--success);
}

.pause-card-feedback-status {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  margin: 8px 0 0;
  min-height: 16px;
  overflow-wrap: anywhere;
}

.daily-mirr-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: calc(var(--capture-dock-reserved-space) + 24px);
}

.daily-mirr-heading {
  align-items: flex-start;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
}

.daily-mirr-heading h2 {
  font-size: 24px;
  line-height: 1.15;
  margin: 0;
}

.daily-mirr-status-pill,
.daily-mirr-card-state {
  background: rgba(144, 202, 249, 0.12);
  border: 1px solid rgba(144, 202, 249, 0.32);
  border-radius: 999px;
  color: var(--info);
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  padding: 7px 10px;
}

.daily-mirr-status-pill[data-status="verified"],
.daily-mirr-card-state {
  color: var(--success);
}

.daily-mirr-day-label,
.daily-mirr-intro,
.daily-mirr-sync-note,
.daily-mirr-progress-note,
.daily-mirr-source-note,
.daily-mirr-readonly-note,
.daily-mirr-diagnostic-note {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
  margin: 0;
  overflow-wrap: anywhere;
}

.daily-mirr-intro {
  color: var(--text);
  font-weight: 700;
}

.daily-mirr-day-controls,
.daily-mirr-review-actions,
.daily-mirr-editor-actions,
.daily-mirr-verify-confirm {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.daily-mirr-primary-button,
.daily-mirr-secondary-button {
  flex: 0 1 auto;
  min-width: 0;
  width: auto;
}

.daily-mirr-secondary-button {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: var(--text);
}

.daily-mirr-empty-state,
.daily-mirr-no-entry-state,
.daily-mirr-progress,
.daily-mirr-card,
.daily-mirr-diagnostic-card,
.daily-mirr-day-level-card {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 14px;
}

.daily-mirr-empty-state.hidden {
  display: none;
}

.daily-mirr-content,
.daily-mirr-section-group,
.daily-mirr-entry-card-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.daily-mirr-day-map-counts,
.daily-mirr-assignment-control {
  background: rgba(144, 202, 249, 0.05);
  border: 1px solid rgba(144, 202, 249, 0.18);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 12px;
}

.daily-mirr-day-map-counts p,
.daily-mirr-assignment-state,
.daily-mirr-assignment-title {
  margin: 0;
}

.daily-mirr-day-map-summary.warning,
.timeline-day-map.warning {
  color: var(--warning);
}

.daily-mirr-assignment-title {
  font-size: 14px;
}

.daily-mirr-assignment-label,
.daily-mirr-assignment-target-fields {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.daily-mirr-assignment-label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.daily-mirr-assignment-label input,
.daily-mirr-assignment-label select,
.daily-mirr-assignment-select {
  max-width: 100%;
  min-width: 0;
  min-height: 44px;
  width: 100%;
  padding: 10px;
  font: inherit;
  font-size: 16px;
  color: var(--text);
  background: #111;
  color-scheme: dark;
  border: 1px solid #444;
  border-radius: 8px;
}

.daily-mirr-assignment-target-fields.hidden {
  display: none;
}

.daily-mirr-card,
.daily-mirr-diagnostic-card,
.daily-mirr-day-level-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.daily-mirr-card-heading {
  align-items: flex-start;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
}

.daily-mirr-card-title {
  font-size: 18px;
  line-height: 1.25;
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

.daily-mirr-card-meta,
.daily-mirr-content-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.3;
  margin: 0;
  text-transform: uppercase;
}

.daily-mirr-user-label {
  color: var(--success);
}

.daily-mirr-raw-label {
  color: #ffd28a;
}

.daily-mirr-suggestion-label {
  color: var(--info);
}

.daily-mirr-meaning-label,
.daily-mirr-open-loop-label,
.daily-mirr-next-move-label {
  color: rgba(255, 255, 255, 0.72);
}

.daily-mirr-generated-text,
.daily-mirr-user-text,
.daily-mirr-source-text,
.daily-mirr-raw-text,
.daily-mirr-secondary-text {
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  line-height: 1.55;
  margin: 0;
  overflow-x: auto;
  overflow-wrap: anywhere;
  padding: 12px;
  white-space: pre-wrap;
}

.daily-mirr-raw-text {
  background: rgba(255, 210, 138, 0.08);
  border-color: rgba(255, 210, 138, 0.18);
}

.daily-mirr-raw-text.is-collapsed {
  max-height: 9.5rem;
  overflow: hidden;
}

.daily-mirr-suggestion-text {
  background: rgba(144, 202, 249, 0.08);
  border-color: rgba(144, 202, 249, 0.2);
}

.daily-mirr-secondary-text {
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
}

.daily-mirr-signal-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.daily-mirr-signal-chip {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  padding: 6px 9px;
}

.daily-mirr-user-text {
  border-color: rgba(167, 217, 183, 0.26);
}

.daily-mirr-raw-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.daily-mirr-rejection-note,
.daily-mirr-card-error {
  color: var(--warning);
  font-size: 14px;
  line-height: 1.45;
  margin: 0;
  overflow-wrap: anywhere;
}

.daily-mirr-card-error {
  color: var(--error);
}

.daily-mirr-source-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}

.daily-mirr-source-entry {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.daily-mirr-source-meta {
  color: var(--muted);
  font-size: 12px;
}

.daily-mirr-editor {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.daily-mirr-editor-label {
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
}

.daily-mirr-editor-textarea {
  min-height: 130px;
  resize: vertical;
}

.daily-mirr-progress {
  align-items: flex-start;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.daily-mirr-progress-copy {
  color: var(--text);
  font-size: 15px;
  font-weight: 800;
  margin: 0;
}

.daily-mirr-verify-confirm {
  align-items: center;
  background: rgba(167, 217, 183, 0.06);
  border: 1px solid rgba(167, 217, 183, 0.22);
  border-radius: 12px;
  padding: 12px;
}

.daily-mirr-verify-confirm p {
  flex: 1 1 220px;
  margin: 0;
}

.daily-mirr-narrative {
  background: linear-gradient(145deg, rgba(144, 202, 249, 0.07), rgba(167, 217, 183, 0.035));
  border: 1px solid rgba(144, 202, 249, 0.2);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
}

.daily-mirr-narrative-note,
.daily-mirr-narrative-disclosure,
.daily-mirr-narrative-text {
  line-height: 1.55;
  margin: 0;
}

.daily-mirr-narrative-note,
.daily-mirr-narrative-disclosure {
  color: var(--muted);
  font-size: 14px;
}

.daily-mirr-narrative-part,
.daily-mirr-narrative-standalone,
.daily-mirr-narrative-version {
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 12px;
}

.daily-mirr-narrative-standalone {
  background: rgba(255, 210, 138, 0.055);
  border-color: rgba(255, 210, 138, 0.18);
}

.daily-mirr-narrative-part-title {
  font-size: 14px;
  margin: 0;
}

.daily-mirr-narrative-editor {
  min-height: 110px;
  resize: vertical;
  width: 100%;
}

.daily-mirr-narrative-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.daily-mirr-narrative-history {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 14px;
}

.daily-mirr-narrative-version.is-current {
  border-color: rgba(167, 217, 183, 0.28);
}

.daily-mirr-narrative-version.is-superseded {
  opacity: 0.78;
}

.timeline-runway {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 14px;
  max-width: 100%;
  overflow: hidden;
}

.timeline-heading,
.timeline-day-heading {
  align-items: flex-start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.timeline-heading h2,
.timeline-day-title {
  margin: 0;
}

.timeline-day-map {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  margin: 0;
}

.timeline-heading h2 {
  font-size: 24px;
  line-height: 1.15;
}

.timeline-intro,
.timeline-status,
.timeline-end-state,
.timeline-empty-preview {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
  margin: 0;
  overflow-wrap: anywhere;
}

.timeline-intro {
  color: var(--text);
}

.timeline-status.error {
  color: var(--error);
}

.timeline-controls,
.timeline-list,
.timeline-material-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.timeline-controls {
  align-items: flex-start;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 8px;
}

.timeline-controls .daily-mirr-secondary-button {
  min-height: 44px;
}

.timeline-day-card {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  padding: 14px;
}

.timeline-day-title {
  font-size: 18px;
  line-height: 1.3;
}

.timeline-authority-pill,
.timeline-material-authority {
  border: 1px solid rgba(167, 217, 183, 0.28);
  border-radius: 999px;
  color: var(--success);
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  padding: 7px 9px;
  text-transform: uppercase;
}

.timeline-material {
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 11px;
}

.timeline-material-heading {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 7px;
}

.timeline-material-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.timeline-material-authority {
  border-color: var(--line);
  color: var(--muted);
  padding: 5px 7px;
}

.timeline-material-authority.user-review {
  border-color: rgba(167, 217, 183, 0.28);
  color: var(--success);
}

.timeline-material-text {
  color: var(--text);
  line-height: 1.5;
  margin: 0;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.timeline-open-button {
  align-self: flex-start;
  background: transparent;
  border: 1px solid rgba(144, 202, 249, 0.34);
  color: var(--accent);
  width: auto;
}

@media (min-width: 769px) {
  :root {
    --page-column-padding: 20px;
  }

  .page-content {
    padding-bottom: 28px;
  }

  .app-shell-bar {
    margin: 0 calc(var(--page-column-padding) * -1);
    padding-left: var(--page-column-padding);
    padding-right: var(--page-column-padding);
  }

  .capture-dock {
    padding-left: var(--page-column-padding);
    padding-right: var(--page-column-padding);
  }

  .auth-logged-in {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }

  .auth-form {
    max-width: 320px;
  }

  .actions {
    align-items: center;
    flex-direction: row;
    flex-wrap: wrap;
  }

  .auth-form button,
  .actions > button {
    width: auto;
    align-self: flex-start;
  }

  .actions > button {
    align-self: center;
  }

  .status-area {
    flex: 1 1 220px;
    min-width: 0;
    text-align: right;
  }

  .install-card-actions {
    align-items: center;
  }

  .search-button,
  .search-clear-button {
    width: auto;
  }

  .reflection-run-button {
    width: auto;
  }
}

@media (max-width: 768px) {
  .reflection-summary {
    grid-template-columns: 1fr;
  }

  .auth-actions button,
  .auth-form button,
  .actions > button,
  .reflection-run-button,
  .search-button,
  .search-clear-button,
  .daily-mirr-primary-button,
  .daily-mirr-secondary-button,
  .timeline-open-button {
    width: 100%;
  }

  .reflection-narrative-day-links,
  .reflection-narrative-day-link {
    width: 100%;
  }

  .timeline-controls,
  .timeline-heading,
  .timeline-day-heading,
  .memory-heading,
  .memory-item-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .beta-audit-date-grid {
    grid-template-columns: 1fr;
  }

  .memory-item-actions button,
  .memory-consent-actions button,
  .beta-audit-session-tools button,
  .beta-audit-target-actions button,
  .settings-card button {
    width: 100%;
  }

  .status-area {
    text-align: left;
  }

  .context-coach-prompt {
    align-items: stretch;
    flex-direction: column;
  }

  .context-coach-dismiss {
    align-self: flex-start;
  }

  .pause-card-feedback-button {
    flex: 1 1 calc(50% - 4px);
  }

  .archetype-feedback-button {
    flex: 1 1 calc(50% - 4px);
  }

  .archetype-card-grid {
    grid-template-columns: 1fr;
  }

  .search-layout {
    align-items: stretch;
    flex-direction: column;
  }

  .search-layout > * {
    flex: 0 0 auto;
    width: 100%;
  }

  .entry-meta {
    align-items: flex-start;
  }

  .install-card {
    flex-direction: column;
  }

  .install-card-actions {
    justify-content: flex-start;
  }

  .install-primary-button,
  .install-card .tour-secondary-button {
    width: 100%;
  }
}

@media (min-width: 769px) {
  .entry-reader-overlay {
    align-items: center;
    padding: 24px;
  }

  .entry-reader-sheet {
    max-height: min(840px, calc(var(--mirr-viewport-height, 100dvh) - 48px - env(safe-area-inset-top) - env(safe-area-inset-bottom)));
    width: min(100%, 680px);
  }

  .entry-reader-dialog {
    border-radius: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .capture-dock-shell {
    transition-duration: 0s;
  }

  .context-meter-segment {
    transition-duration: 0s;
  }
}

.entry-reader-actions {
  border-top: 1px solid #171717;
  display: flex;
  flex: 0 0 auto;
  padding: 12px 16px;
}

/* Weekly MIRR is a temporary, account-scoped reading surface. */
.weekly-mirr-panel,
.weekly-mirr-map,
.weekly-mirr-generated,
.weekly-mirr-claims {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.weekly-mirr-heading,
.weekly-mirr-generated-heading,
.weekly-mirr-slot-heading {
  align-items: flex-start;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  min-width: 0;
}

.weekly-mirr-heading h2,
.weekly-mirr-generated-heading h3,
.weekly-mirr-slot-heading h4,
.weekly-mirr-subheading,
.weekly-mirr-claim-title {
  margin: 0;
}

.weekly-mirr-temporary-pill,
.weekly-mirr-slot-status {
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 800;
  padding: 5px 8px;
  text-transform: uppercase;
}

.weekly-mirr-slot-status.status-covered { color: var(--success); }
.weekly-mirr-slot-status.status-limited,
.weekly-mirr-slot-status.status-unreviewed,
.weekly-mirr-slot-status.status-unavailable { color: var(--warning); }

.weekly-mirr-intro,
.weekly-mirr-sync-note,
.weekly-mirr-coverage-copy,
.weekly-mirr-count-row,
.weekly-mirr-disclosures p,
.weekly-mirr-generation-disclosure,
.weekly-mirr-strength-disclosure,
.weekly-mirr-evidence-meta,
.weekly-mirr-evidence-authority,
.weekly-mirr-reload-warning,
.weekly-mirr-note p,
.weekly-mirr-empty-generation {
  color: var(--muted);
  line-height: 1.45;
  margin: 0;
  overflow-wrap: anywhere;
}

.weekly-mirr-sync-note,
.weekly-mirr-disclosures,
.weekly-mirr-generation-disclosure,
.weekly-mirr-strength-disclosure,
.weekly-mirr-evidence-meta,
.weekly-mirr-evidence-authority,
.weekly-mirr-reload-warning,
.weekly-mirr-note p {
  font-size: 13px;
}

.weekly-mirr-range-actions,
.weekly-mirr-output-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.weekly-mirr-primary-button,
.weekly-mirr-secondary-button,
.weekly-mirr-evidence-button,
.weekly-mirr-evidence-close,
.weekly-mirr-daily-link {
  min-height: 44px;
  width: auto;
}

.weekly-mirr-secondary-button,
.weekly-mirr-evidence-close,
.weekly-mirr-daily-link {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
}

.weekly-mirr-primary-button:focus-visible,
.weekly-mirr-secondary-button:focus-visible,
.weekly-mirr-evidence-button:focus-visible,
.weekly-mirr-evidence-close:focus-visible,
.weekly-mirr-daily-link:focus-visible {
  outline: 3px solid var(--info);
  outline-offset: 2px;
}

.weekly-mirr-slot-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr));
  min-width: 0;
}

.weekly-mirr-slot,
.weekly-mirr-totals,
.weekly-mirr-claim,
.weekly-mirr-evidence-panel,
.weekly-mirr-note {
  background: #070707;
  border: 1px solid var(--line);
  border-radius: 12px;
  display: grid;
  gap: 9px;
  min-width: 0;
  padding: 12px;
}

.weekly-mirr-slot-day,
.weekly-mirr-claim-title {
  font-size: 15px;
  line-height: 1.3;
}

.weekly-mirr-count-row,
.weekly-mirr-unavailable-count {
  font-size: 12px;
  margin: 0;
}

.weekly-mirr-unavailable-count { color: var(--warning); }

.weekly-mirr-range {
  font-size: 18px;
  overflow-wrap: anywhere;
}

.weekly-mirr-generated {
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.weekly-mirr-generated-heading > span {
  color: var(--success);
  font-size: 12px;
  font-weight: 800;
}

.weekly-mirr-claim-text,
.weekly-mirr-evidence-text {
  line-height: 1.55;
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.weekly-mirr-source-details {
  min-width: 0;
  color: var(--muted);
}

.weekly-mirr-source-details > summary {
  min-height: 44px;
  padding: 12px 0;
  cursor: pointer;
  line-height: 1.4;
}

.weekly-mirr-source-details[open] > summary {
  margin-bottom: 8px;
}

.weekly-mirr-source-details > .weekly-mirr-slot-grid,
.weekly-mirr-source-details > .weekly-mirr-disclosures {
  margin-bottom: 14px;
}

.weekly-mirr-evidence-text {
  overflow-wrap: anywhere;
}

.weekly-mirr-evidence-button {
  justify-self: start;
}

.weekly-mirr-evidence-panel {
  background: rgba(144, 202, 249, 0.045);
  border-color: rgba(144, 202, 249, 0.28);
}

.weekly-mirr-evidence-close {
  justify-self: end;
}

.weekly-mirr-evidence-item {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 7px;
  min-width: 0;
  padding-top: 10px;
}

.weekly-mirr-daily-link {
  justify-self: start;
}

.weekly-mirr-note label {
  font-size: 14px;
  font-weight: 800;
}

.weekly-mirr-note textarea {
  background: #111;
  border: 1px solid #333;
  border-radius: 10px;
  color: var(--text);
  line-height: 1.5;
  min-height: 110px;
  resize: vertical;
  width: 100%;
}

.people-form, .people-list { display: grid; gap: 1rem; margin: 1rem 0; }
.people-field { display: grid; gap: .4rem; color: var(--text); }
.people-field[hidden] { display: none; }
.people-field input, .people-field textarea, .people-field select {
  box-sizing: border-box; min-width: 0; width: 100%; padding: .65rem; font: inherit;
  border: 1px solid var(--line); border-radius: 8px; background: var(--panel, #17171b); color: var(--text);
}
.people-field input[type="checkbox"] { width: auto; justify-self: start; }
.people-field textarea { min-height: 6rem; resize: vertical; }
.people-actions, .people-filters { display: flex; gap: .75rem; flex-wrap: wrap; align-items: end; }
.people-note { display: block; font-size: .9rem; color: var(--muted); line-height: 1.5; }
.people-report, .people-claim, .people-review { border-top: 1px solid var(--line); margin-top: 1rem; padding-top: 1rem; overflow-wrap: anywhere; }
.people-report button { margin: .5rem .5rem .5rem 0; }
.people-source { margin: .75rem 0; }
.people-source summary { cursor: pointer; color: var(--info); }
.people-source pre { white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; line-height: 1.6; }
.people-review-compact {
  margin-top: 18px;
  padding-top: 14px;
}
.people-reflection-heading h3 {
  color: var(--text);
  font-size: 16px;
  line-height: 1.25;
  margin: 0 0 10px;
}
.people-reflection-posts,
.people-reflection-more {
  display: grid;
  gap: 6px;
}
.people-reflection-more[hidden] { display: none; }
.people-reflection-post.entry-item {
  background: #050505;
  gap: 0;
  margin: 0;
  padding: 0;
}
.people-reflection-post summary {
  cursor: pointer;
  display: grid;
  gap: 4px;
  list-style: none;
  min-height: 58px;
  padding: 10px 12px;
}
.people-reflection-post summary::-webkit-details-marker { display: none; }
.people-reflection-post summary:focus-visible,
.people-reflection-context summary:focus-visible,
.people-reflection-more-button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}
.people-reflection-post-date {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
}
.people-reflection-post-preview {
  color: var(--text);
  display: -webkit-box;
  font-size: 14px;
  line-height: 1.4;
  overflow: hidden;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.people-reflection-post-action,
.people-reflection-more-button,
.people-reflection-context summary {
  color: var(--accent);
  font-size: 12px;
  line-height: 1.35;
}
.people-reflection-post-action { margin-top: 2px; }
.people-reflection-post[open] .people-reflection-post-preview { display: none; }
.people-reflection-post pre {
  border-top: 1px solid var(--line);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  line-height: 1.5;
  margin: 0;
  overflow-wrap: anywhere;
  padding: 10px 12px 12px;
  white-space: pre-wrap;
}
.people-reflection-more { margin-top: 6px; }
.people-reflection-more-button {
  background: transparent;
  border: 0;
  min-height: 44px;
  padding: 6px 0;
  text-align: left;
  width: auto;
}
.people-reflection-context {
  border-top: 1px solid var(--line);
  margin-top: 6px;
  padding-top: 4px;
}
.people-reflection-context summary {
  cursor: pointer;
  list-style: none;
  min-height: 44px;
  padding: 12px 0;
}
.people-reflection-context summary::-webkit-details-marker { display: none; }
.people-reflection-context button {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 12px;
  min-height: 44px;
  padding: 8px 10px;
  width: auto;
}
.people-reflection-context .people-claim { margin-top: 10px; padding-top: 10px; }
#peopleContent button { min-height: 44px; }

.weekly-mirr-copy-fallback {
  height: 1px;
  left: -10000px;
  position: fixed;
  top: 0;
  width: 1px;
}

.entry-labels { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--border-color, #d8dee4); font-size: .9rem; }
.entry-confirmed-labels { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.entry-label-heading { font-weight: 600; margin-right: 4px; }
.entry-confirmed-label { border: 1px solid var(--border-color, #ccd6df); border-radius: 14px; padding: 3px 9px; overflow-wrap: anywhere; }
.category-family-meaning { border-color: #b89bea !important; }
.category-family-creativity { border-color: #78b8ec !important; }
.category-family-care { border-color: #ed9b95 !important; }
.category-family-feelings { border-color: #dfb666 !important; }
.category-family-direction { border-color: #79c5ac !important; }
.entry-label-picker { margin-top: 10px; }
.entry-label-search { box-sizing: border-box; width: 100%; min-height: 44px; margin: 8px 0; }
.entry-label-options { max-height: 300px; overflow-y: auto; padding: 4px; border: 1px solid var(--border-color, #ccd6df); border-radius: 8px; }
.entry-label-group { margin-bottom: 12px; }
.entry-label-group strong { display: block; margin: 6px 0; }
.entry-label-choice { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; min-height: 44px; padding: 6px; border-left: 3px solid var(--border-color, #ccd6df); cursor: pointer; }
.entry-label-choice[hidden] { display: none; }
.entry-label-choice input { min-width: 18px; min-height: 18px; }
.entry-label-choice small, .entry-label-choice blockquote { flex-basis: 100%; margin-left: 25px; }
.entry-label-muted, .entry-label-status { opacity: .8; font-size: .85rem; }
.entry-label-proposal { margin: 10px 0; padding: 10px; background: rgba(110, 140, 165, .08); border-radius: 8px; }
.entry-label-question { margin: 0 0 6px; font-weight: 600; }
.entry-label-evidence { white-space: pre-wrap; overflow-wrap: anywhere; margin: 6px 0; padding-left: 9px; border-left: 2px solid #90a6b6; }
.entry-label-action { margin: 3px 6px 3px 0; min-height: 44px; }
.entry-labels small { display: block; margin-top: 6px; }
.entry-label-manage { margin-top: 8px; }
.entry-label-manage summary { cursor: pointer; }
.entry-label-editor { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.entry-label-editor input { min-width: 0; flex: 1 1 140px; }
.entry-label-editor select, .entry-label-editor input, .entry-label-editor button { max-width: 100%; min-height: 44px; }
.entry-label-manage-row { margin: 8px 0; overflow-wrap: anywhere; }

@media (max-width: 768px) {
  .weekly-mirr-range-actions,
  .weekly-mirr-output-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .weekly-mirr-range-actions button,
  .weekly-mirr-output-actions button,
  .weekly-mirr-primary-button,
  .weekly-mirr-secondary-button {
    width: 100%;
  }

  .weekly-mirr-slot-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
/* Required first-use setup and editable notification preferences. */
.mirr-setup {
  width: min(560px, calc(100vw - 32px));
  max-height: max(0px, calc(var(--mirr-viewport-height, 100dvh) - 32px - env(safe-area-inset-top) - env(safe-area-inset-bottom)));
  inset: var(--mirr-viewport-offset-top, 0px) 0 var(--mirr-viewport-bottom, 0px);
  margin: auto;
  min-width: 0;
  box-sizing: border-box;
  overflow-y: auto;
  overscroll-behavior: contain;
  overflow-wrap: anywhere;
  padding: 28px;
  border: 1px solid #55606b;
  border-radius: 20px;
  color: #f4f1e9;
  background: #171e25;
  box-shadow: 0 24px 80px #0008;
}
.mirr-setup::backdrop { background: #080e16df; backdrop-filter: blur(5px); }
.mirr-setup h2 { font-size: 1.7rem; line-height: 1.15; margin: 12px 0 18px; }
.mirr-setup p { line-height: 1.55; color: #c7d0d7; }
.mirr-setup .setup-eyebrow { color: #adcac0; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; }
.mirr-setup .setup-check { display: flex; align-items: flex-start; gap: 12px; margin: 12px 0; padding: 10px 12px; border: 1px solid #3b4751; border-radius: 10px; line-height: 1.4; }
.mirr-setup input[type=checkbox], .mirr-setup input[type=radio] { width: 18px; height: 18px; flex: 0 0 auto; margin: 2px 0 0; accent-color: #afd6c3; }
.mirr-setup .setup-field { display: grid; gap: 7px; margin: 15px 0; }
.mirr-setup input:not([type=checkbox]):not([type=radio]), .mirr-setup textarea { box-sizing: border-box; width: 100%; min-width: 0; min-height: 44px; padding: 10px; color: #f4f1e9; background: #10171f; border: 1px solid #55606b; border-radius: 8px; font: inherit; font-size: 16px; }
.mirr-setup fieldset { min-width: 0; border: 0; padding: 0; margin: 20px 0; }
.mirr-setup button { margin: 6px 8px 6px 0; padding: 11px 16px; min-height: 44px; border-radius: 10px; border: 1px solid #617569; background: #243d35; color: #f4f1e9; font: inherit; cursor: pointer; }
.mirr-setup .setup-actions { display: flex; flex-wrap: wrap; margin-top: 22px; }
.mirr-setup details { margin: 16px 0; padding: 12px; border: 1px solid #3b4751; border-radius: 10px; }
.mirr-setup summary { cursor: pointer; min-height: 44px; padding: 10px 0; line-height: 1.4; }
.mirr-setup .setup-status { color: #e8d3a8; }
.mirr-setup :focus-visible { outline: 2px solid #bbdfcd; outline-offset: 3px; }
@media (max-width: 500px) { .mirr-setup { padding: 20px; } .mirr-setup h2 { font-size: 1.5rem; } }
/* Daily check-ins use normal document flow; writing never sits behind Capture. */
#dailyCheckInsView { max-width: 760px; margin: 18px auto; padding: 24px; }
#dailyCheckInsView .setup-field { display: grid; gap: 10px; margin: 22px 0; }
#dailyCheckInsView textarea { width: 100%; min-height: 120px; box-sizing: border-box; }
#dailyCheckInsView .checkin-actions { display: flex; flex-wrap: wrap; gap: 12px; }
#dailyCheckInsView button { min-height: 44px; }
#dailyCheckInsView .checkin-card { margin: 18px 0; padding: 18px; }
#dailyCheckInsView .checkin-answer { white-space: pre-wrap; overflow-wrap: anywhere; }

#reflectionSettings { margin-top: 20px; }
#reflectionSettings summary { color: var(--muted); cursor: pointer; padding: 12px 0; min-height: 44px; }
#reflectionSettings[open] summary { margin-bottom: 8px; }

/* Calm navigation: panels overlay the page instead of moving the journal. */
html {
  scroll-padding-top: calc(var(--mirr-shell-header-height, 72px) + 12px);
  scroll-padding-bottom: calc(var(--capture-dock-reserved-space) + 16px);
}
.app-bar-actions .icon-button {
  width: auto;
  min-width: 44px;
  min-height: 44px;
  padding: 0 10px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
}
.shell-popover,
.app-menu.panel {
  position: fixed;
  top: calc(var(--mirr-viewport-offset-top, 0px) + var(--mirr-shell-header-height, 72px) + 8px);
  left: 50%;
  width: min(728px, calc(100% - 32px));
  transform: translateX(-50%);
  margin-top: 0;
  max-height: max(0px, calc(var(--mirr-viewport-height, 100dvh) - var(--mirr-shell-header-height, 72px) - 24px - env(safe-area-inset-bottom)));
  overflow-y: auto;
  overscroll-behavior: contain;
  z-index: 40;
  animation: none;
}
.app-menu.panel { padding: 16px; gap: 18px; }
.menu-group { display: grid; gap: 2px; }
.menu-group-label {
  margin: 0 10px 7px;
  color: #a4b2aa;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.menu-group .menu-item {
  border-color: transparent;
  min-height: 44px;
  font-weight: 500;
}
.menu-group .menu-item:hover { background: #1b221e; }
.menu-group .menu-item.active { background: #233029; color: #d8e9de; }
@media (min-width: 600px) {
  .app-menu.panel { display: grid; grid-template-columns: 1fr 1fr; }
  .app-menu #loggedInUI, .app-menu .menu-group:last-child { grid-column: 1 / -1; }
  .app-menu .menu-group:last-child { grid-template-columns: 1fr 1fr; }
  .app-menu .menu-group:last-child .menu-group-label { grid-column: 1 / -1; }
}

/* Writing gets the full column; tools have their own row below the text. */
.capture-input-shell #input {
  padding: 34px 14px 14px;
  min-height: 60px;
  font-family: inherit;
  font-size: 16px;
  line-height: 1.55;
}
.capture-field-actions {
  position: static;
  width: 100%;
  grid-template-columns: minmax(0, 1fr) 112px;
  border-left: 0;
  border-top: 1px solid var(--line);
}
#status:empty { display: none; }
#captureModePanel > .actions:has(#status:empty) { display: none; }
.voice-capture-button { display: grid; grid-template-columns: 20px auto; justify-content: start; padding: 8px 12px; column-gap: 7px; }
.voice-capture-microphone { width: 20px; height: 20px; }
.voice-capture-button-label { text-align: left; font-size: 14px; }
.capture-save-button { flex-direction: row; gap: 6px; }
.capture-save-icon { width: 20px; height: 20px; }
.capture-save-label { font-size: 14px; line-height: 1.3; }
.capture-dock-shell { border-radius: 18px; }

/* Quiet orientation; the prompt remains time-aware and optional. */
.today-orientation { background: #111813; box-shadow: none; border-color: #29392f; }
.today-date-label { font-size: 16px; font-weight: 500; color: #bac7bf; }
.today-time { font-size: 14px; color: #bac7bf; }
.today-date-time { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 14px; }
.today-answer-dialog {
  width: min(680px, calc(100vw - 24px));
  max-height: max(0px, calc(var(--mirr-viewport-height, 100dvh) - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom)));
  inset: var(--mirr-viewport-offset-top, 0px) 0 var(--mirr-viewport-bottom, 0px);
  margin: auto;
  min-width: 0;
  padding: 16px;
  color: var(--text);
  background: #101612;
  border: 1px solid #455249;
  border-radius: 18px;
  overflow-y: auto;
  overscroll-behavior: contain;
  overflow-wrap: anywhere;
}
.today-answer-dialog::backdrop { background: #000c; }
.today-answer-draft-actions { display: none; }
.today-answer-dialog .today-answer-draft-actions { display: flex; justify-content: flex-end; padding: 0 12px 10px; }
.today-answer-close { margin: 0; width: auto; max-width: 100%; padding: 10px 12px; background: transparent; color: #cad7cf; min-height: 44px; border: 1px solid #455249; border-radius: 10px; }
.today-answer-dialog .capture-dock { position: static; padding: 0; }
.today-answer-dialog .capture-dock-shell { padding: 0; background: transparent; border: 0; box-shadow: none; backdrop-filter: none; max-width: none; max-height: none; overflow: visible; }
.today-answer-dialog .composer-mode-switch, .today-answer-dialog .capture-drafts, .today-answer-dialog #guidedCheckInActions, .today-answer-dialog #reflectionToast, .today-answer-dialog .composer-help { display: none; }
.today-answer-context { padding: 4px 0 16px; }
.today-answer-context h3 { font-size: 22px; line-height: 1.35; margin: 8px 0; }
.today-answer-context p { color: #b9c8bf; font-size: 13px; line-height: 1.5; }
.today-answer-context button { background: transparent; color: #b9c8bf; border: 0; font-size: 12px; min-height: 44px; text-align: left; padding: 0; }
.today-draft-choice { border-top: 1px solid #455249; padding-top: 10px; }
.today-draft-choice button { min-height: 44px; margin: 6px 6px 0 0; }
.intention-review { margin: 18px 0; }
.intention-review blockquote { margin: 12px 0; padding-left: 12px; border-left: 2px solid #526b5c; white-space: pre-wrap; overflow-wrap: anywhere; }
.intention-review button { margin: 4px 8px 4px 0; }
.entry-question-context { color: #bfcec5; font-size: 13px; line-height: 1.5; }
.entry-question-meaning { color: #9eb6a7; font-size: 11px; }
.today-answer-context blockquote { margin: 12px 0; padding-left: 12px; border-left: 2px solid #526b5c; white-space: pre-wrap; overflow-wrap: anywhere; }
.today-prompt { font-size: clamp(21px, 4vw, 26px); font-weight: 600; line-height: 1.35; }

/* Dismissal stays distinct from save, confirm, delete, and other content actions. */
.popup-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.popup-header > :first-child { min-width: 0; margin-top: 0; }
.popup-close-button,
.mirr-setup .popup-close-button {
  display: grid;
  place-items: center;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  margin: 0;
  padding: 0;
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}
.popup-close-button:hover:not(:disabled) { background: #1b221e; color: var(--text); }
.popup-close-button:focus-visible { outline: 2px solid var(--info); outline-offset: 3px; }
.popup-close-button:disabled { opacity: .5; cursor: default; }
.today-answer-dismiss { margin: 0 0 8px auto; }

/* Consistent writing typography and clear primary/secondary check-in actions. */
#dailyCheckInsView { padding: clamp(16px, 4vw, 28px); }
#dailyCheckInsView h1 { font-size: 25px; font-weight: 650; }
#dailyCheckInsView p { line-height: 1.6; }
#dailyCheckInsView textarea { font: inherit; font-size: 16px; line-height: 1.6; padding: 14px; }
#dailyCheckInsView input[type=date] { color-scheme: dark; width: 100%; min-height: 44px; padding: 10px; font: inherit; color: var(--text); background: #111; border: 1px solid #444; border-radius: 8px; }
#dailyCheckInsView .checkin-actions { gap: 10px; }
#dailyCheckInsView .checkin-actions button { border-radius: 10px; padding: 11px 16px; }
#dailyCheckInsView .checkin-actions button:first-child { background: #c6dfcf; color: #142219; }
#dailyCheckInsView .checkin-actions button:not(:first-child) { background: transparent; color: #d7dfda; border: 1px solid #455249; }
#dailyCheckInsView .checkin-actions button:last-child { border-color: transparent; font-weight: 500; }
#reflectionSettings summary { min-height: 44px; }
#guidedCheckInActions { display: flex; flex-wrap: wrap; gap: 8px; }
#guidedCheckInActions button { min-height: 44px; font-size: 13px; background: #233029; color: #d8e9de; border: 1px solid #455249; border-radius: 10px; }

.closing-quote { margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.closing-quote blockquote { margin: 0 0 .65rem; font-size: 1.05rem; line-height: 1.6; }
.closing-quote p, .closing-quote summary { font-size: .85rem; color: var(--muted); }
.closing-quote-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .75rem; }
.closing-quote button { white-space: normal; min-height: 44px; }
#closingQuoteSettings label { display: block; margin: .6rem 0; }
#closingQuoteSettings input:not([type=checkbox]), #closingQuoteSettings select { width: 100%; min-width: 0; }
#closingQuoteSettings fieldset { min-width: 0; margin: 1rem 0; }

/* Today is a date and one entry list; question access lives with Capture. */
.today-date-header { padding: 8px 0; }
.today-date-header .today-date-label { font-size: 16px; color: var(--muted); }
.capture-question-actions { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.capture-question-actions .today-capture-button { margin: 0; padding: 6px 0; min-height: 44px; background: transparent; border: 0; border-radius: 0; color: var(--muted); font-size: 12px; }
.capture-question-actions .today-draft-choice { flex-basis: 100%; }
.today-answer-dialog .capture-question-actions { display: none; }

/* Full-screen, one-idea-at-a-time welcome tour. */
body:has(.help-tour-panel:not(.hidden)) { overflow: hidden; }
.shell-popover.help-tour-panel {
  /* Keep dismissal/navigation outside the scrolling page at every viewport size. */
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  height: var(--mirr-viewport-height, 100dvh);
  inset: var(--mirr-viewport-offset-top, 0px) 0 auto;
  margin: 0;
  max-height: none;
  overflow: hidden;
  padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  transform: none;
  width: auto;
  z-index: 120;
}
.help-tour-panel { gap: clamp(16px, 4vh, 34px); }
.help-tour-panel .tour-header, .help-tour-panel .tour-actions { flex: 0 0 auto; margin: 0 auto; max-width: 900px; width: 100%; }
.help-tour-panel .tour-header { order: 0; }
.help-tour-panel .tour-steps { display: flex; flex-direction: column; margin: 0 auto; max-width: 900px; min-height: 0; min-width: 0; order: 2; overflow-y: auto; overscroll-behavior: contain; width: 100%; }
.help-tour-panel .tour-progress-row { align-items: center; color: var(--muted); display: flex; flex: 0 0 auto; flex-wrap: wrap; gap: 8px; font-size: 13px; justify-content: space-between; margin: 0 auto; max-width: 900px; order: 1; width: 100%; }
.help-tour-panel .tour-actions { justify-content: flex-start; order: 3; }
.help-tour-panel .tour-step { align-items: center; display: grid; flex: 0 0 auto; gap: clamp(24px, 6vw, 72px); grid-template-columns: minmax(0, 1.1fr) minmax(220px, .9fr); margin-block: auto; width: 100%; }
.help-tour-panel .tour-step[hidden] { display: none; }
.help-tour-panel .tour-step-copy { display: grid; gap: 16px; }
.help-tour-panel .tour-step h3 { font-size: clamp(26px, 4vw, 42px); letter-spacing: -.035em; line-height: 1.12; outline: none; }
.help-tour-panel .tour-step p { color: #bac4bd; font-size: clamp(16px, 1.7vw, 19px); line-height: 1.55; margin: 0; max-width: 60ch; }
.help-tour-panel .tour-step .section-eyebrow { color: var(--success); }
.tour-feature-note { border-left: 2px solid var(--success); color: var(--text) !important; font-size: 16px !important; padding-left: 13px; }
.tour-art { background: linear-gradient(145deg, rgba(167,217,183,.05), transparent); border: 1px solid rgba(167,217,183,.16); border-radius: 24px; height: auto; max-height: 290px; padding: 10px; width: 100%; }
.tour-art-card { align-items: center; background: linear-gradient(145deg, rgba(167,217,183,.08), rgba(167,217,183,.015)); border: 1px solid rgba(167,217,183,.2); border-radius: 24px; color: #d6e2da; display: flex; flex-direction: column; gap: 14px; justify-content: center; min-height: 260px; padding: 30px; text-align: center; }
.tour-art-icon, .tour-art-sun { color: var(--success); font-size: 48px; }
.tour-art-arrow, .tour-art-reflection { color: var(--success); font-size: 26px; }
.tour-art-card small { color: var(--muted); line-height: 1.45; }
.tour-art-thread { flex-direction: row; flex-wrap: wrap; }
.tour-art-thread i { background: var(--success); height: 1px; opacity: .55; width: 22px; }
.tour-art-mirror { font-size: 18px; }
.tour-art-welcome { border-color: rgba(167,217,183,.36); }
.tour-legal-links { display: flex; flex-wrap: wrap; gap: 16px; }
.tour-legal-links a { color: var(--info); text-decoration: none; }
.tour-feedback-link { color: var(--success); width: fit-content; }
.tour-action-spacer { flex: 1; }
@media (max-width: 680px) {
  .help-tour-panel { gap: 18px; }
  .help-tour-panel .tour-step { grid-template-columns: 1fr; gap: 20px; }
  .tour-art { max-height: 170px; min-height: 140px; }
  .tour-art-card { flex-direction: row; flex-wrap: wrap; max-height: none; min-height: 140px; }
  .tour-art-welcome { display: none; }
  .tour-art-mirror { display: none; }
  .help-tour-panel .tour-step-copy { gap: 11px; }
  .help-tour-panel .tour-step h3 { font-size: clamp(25px, 8vw, 34px); }
  .help-tour-panel .tour-step p { font-size: 16px; }
}

/* Recent entries expand independently for this visit; text/data stay untouched. */
.entry-item.entry-history-collapsible {
  display: block;
  padding: 0;
}
.entry-summary {
  align-items: center;
  cursor: pointer;
  display: grid;
  gap: 2px 10px;
  grid-template-columns: minmax(70px, auto) minmax(0, 1fr) auto 16px;
  grid-template-areas: "kind preview status chevron" "time preview status chevron";
  list-style: none;
  min-height: 48px;
  padding: 7px 10px;
}
.entry-summary::-webkit-details-marker { display: none; }
.entry-summary:focus-visible { outline: 2px solid var(--accent); outline-offset: -3px; }
.entry-summary .entry-card-meta { display: contents; }
.entry-summary .entry-kind-title { grid-area: kind; font-size: 12px; }
.entry-summary .entry-relative-time { grid-area: time; font-size: 11px; }
.entry-summary-state { grid-area: status; display: flex; align-items: center; gap: 8px; }
.entry-summary .entry-sync-indicator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  width: 20px;
  height: 20px;
  margin: 0;
}
.entry-sync-synced { color: var(--success); }
.entry-sync-local { color: var(--info); }
.entry-sync-syncing { color: var(--warning); animation: entry-sync-spin 1.2s linear infinite; }
.entry-sync-unsynced { color: var(--error); }
@keyframes entry-sync-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .entry-sync-syncing { animation: none; } }
.entry-kept-badge {
  border: 1px solid rgba(245, 241, 230, 0.22);
  border-radius: 999px;
  color: var(--muted);
  font-size: 11px;
  padding: 3px 8px;
  white-space: nowrap;
}
.entry-kept-badge[hidden] { display: none; }
.thread-kit-keep-button[aria-pressed="false"] { background: transparent; border-color: transparent; border-radius: 4px; text-decoration: underline; text-underline-offset: 3px; }
.entry-expanded-content > .thread-kit-keep-button[aria-pressed="true"] { display: none; }
.entry-summary-text {
  font-size: 14px;
  grid-area: preview;
  line-height: 1.4;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.entry-summary-chevron { color: var(--muted); grid-area: chevron; font-size: 18px; text-align: center; }
.entry-summary-cleanup { color: var(--muted); font-size: 11px; grid-column: 2 / 4; }
.entry-summary-review { color: var(--warning); }
.entry-disclosure[open] > .entry-summary { background: rgba(255,255,255,.035); min-height: 44px; padding-block: 4px; }
.entry-disclosure[open] > .entry-summary .entry-summary-text { display: none; }
.entry-disclosure[open] > .entry-summary .entry-summary-chevron { transform: rotate(180deg); }
.entry-expanded-content {
  display: grid;
  gap: 2px 10px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 6px 10px 8px;
}
.entry-expanded-content > * { grid-column: 1 / -1; min-width: 0; }
.entry-expanded-content > .thread-kit-keep-button {
  align-self: start;
  font-size: 12px;
  grid-column: 2;
  grid-row: 1 / span 2;
  min-height: 44px;
  padding: 6px 10px;
}
.entry-expanded-content > .entry-question-context { grid-column: 1; grid-row: 1; margin: 0; }
.entry-expanded-content > .entry-question-meaning { grid-column: 1; grid-row: 2; }
.entry-expanded-content > .entry-preview-body-wrap { margin-top: 2px; }
.entry-history-collapsible:not(.entry-today-answer) .entry-preview-body-wrap { grid-column: 1; grid-row: 1 / span 2; align-self: center; }
.entry-today-answer .entry-preview-body-wrap::after { background: linear-gradient(180deg, rgba(12,21,16,0), #0c1510); }
.entry-expanded-content .entry-error { margin: 4px 0; }
@media (max-width: 480px) {
  .entry-summary {
    gap: 3px 8px;
    grid-template-columns: minmax(0, 1fr) auto auto 14px;
    grid-template-areas: "kind time status chevron" "preview preview preview chevron";
  }
  .entry-summary .entry-relative-time { font-size: 10px; }
  .entry-summary-cleanup { grid-column: 1 / 4; }
  .entry-disclosure[open] > .entry-summary { grid-template-areas: "kind time status chevron"; }
}

body[data-active-view="reflection"] .ai-section-title, body[data-active-view="weeklyMirr"] .ai-section-title { font-family: Georgia, serif; font-size: 1.12rem; font-weight: 600; margin: 1.4em 0 .6em; }
body[data-active-view="reflection"] .reflection-state-row { background: #f4f7f5; color: var(--text); border: 1px solid var(--line); }
body[data-active-view="captureReview"] pre, body[data-active-view="captureHistory"] pre { color: var(--text); font-size: .92rem; line-height: 1.65; }
.meaning-original { background: #f4f7f5; padding: 14px 16px; border: 1px solid var(--line); border-radius: 6px; }
body[data-active-view="captureHistory"] .history-capture { background: #f4f7f5; color: var(--text); border-color: var(--line); }
body[data-active-view="captureHistory"] .history-capture summary { min-height: 44px; cursor: pointer; line-height: 1.5; }
.open-loops-add, .open-loop-snooze { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 12px 0; }
.open-loop-card { border-top: 1px solid var(--line); padding: 18px 0; }
.open-loop-card :is(input, select), .open-loops-add input, .reflection-day-label input, #reviewChosenDay { min-height: 44px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 5px; }
.open-loop-card button, .open-loops-add button { width: auto; min-height: 44px; }
body[data-active-view="weeklyMirr"] :is(.weekly-mirr-slot, .weekly-mirr-totals, .weekly-mirr-note, .weekly-mirr-evidence-panel) { background: #f4f7f5; color: var(--text); border-color: var(--line); }
body[data-active-view="weeklyMirr"] .weekly-mirr-claim { background: transparent; color: var(--text); border: 0; padding: 4px 0 18px; }
body[data-active-view="weeklyMirr"] .weekly-mirr-claim-text { line-height: 1.85; }
.weekly-mirr-source-details pre { color: var(--text); white-space: pre-wrap; overflow-wrap: anywhere; font-size: .75rem; line-height: 1.5; }

/* One Home layout in both palettes. Theme selectors change only color tokens.
   Dark stays the default; preview attributes do not add automatic switching. */
body[data-active-view="capture"]:not(.auth-surface-active) {
  --home-paper: #080b0a; --home-card: #141a17; --home-ink: #edf2ec;
  --home-quiet: #a9b5ab; --home-sage: #1c2b20; --home-blue: #19252b;
  --home-green: #bdd3bd; --home-button-ink: #102017;
  --home-line: #334139; --home-soft-button: rgba(255,255,255,.06);
  --home-icon: rgba(255,255,255,.08); --home-high: #d8c28c;
  --home-focus: #92b9a0; --home-shadow: none;
  --background: var(--home-paper); --surface: var(--home-card);
  --text: var(--home-ink); --muted: var(--home-quiet); --line: var(--home-line);
  --accent: var(--home-green);
  --success: var(--home-green); --info: var(--home-green); --warning: var(--home-high);
  --page-column-max-width: 850px; --page-column-padding: 14px;
}
body[data-active-view="capture"][data-home-theme="light"]:not(.auth-surface-active) {
  --home-paper: #f6f2eb; --home-card: #fcfaf6; --home-ink: #26342d;
  --home-quiet: #61685c; --home-sage: #e5e8dc; --home-blue: #e2e8ec;
  --home-green: #38513c; --home-button-ink: #fcfaf6;
  --home-line: #c8d0c5; --home-soft-button: rgba(255,255,255,.5);
  --home-icon: rgba(255,255,255,.45); --home-high: #79571e;
  --home-focus: #36674b; --home-shadow: 0 5px 15px rgba(80,66,42,.03);
  --error: #943d3d;
}
body[data-active-view="capture"]:not(.auth-surface-active) .app-shell-bar {
  background: var(--home-paper); border: 0; padding-block: 8px; min-height: 56px;
  margin-inline: -14px; padding-inline: 14px;
}
body[data-active-view="capture"]:not(.auth-surface-active) .brand-button h1 {
  font: 32px/1.2 Georgia, serif; letter-spacing: .08em; font-weight: 400;
}
body[data-active-view="capture"]:not(.auth-surface-active) .app-bar-actions { gap: 2px; }
body[data-active-view="capture"]:not(.auth-surface-active) .app-bar-actions button {
  min-width: 44px; min-height: 44px; padding: 8px 6px; border: 0;
  background: transparent; color: var(--home-quiet); font-size: 12px;
}
body[data-active-view="capture"]:not(.auth-surface-active) .session-indicator {
  color: var(--home-quiet); font-size: 10px;
}
body[data-active-view="capture"] .capture-view { gap: 0; }
.home-panels { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 10px; margin: 0 0 19px; }
.home-panel { display: flex; flex-direction: column; min-width: 0; min-height: clamp(260px,34vh,320px); padding: 15px 13px; border-radius: 16px; background: var(--home-blue); color: var(--home-ink); }
.home-prompt { background: var(--home-sage); }
.home-panel h2 { font-size: 14px; font-weight: 500; margin: 0 0 9px; }
.home-icon-space { display: block; width: 29px; height: 29px; border: 1px solid var(--home-line); border-radius: 50%; background: var(--home-icon); margin-bottom: 8px; flex: 0 0 auto; }
.home-prompt-copy { font: 20px/1.5 Georgia,serif; margin: 12px 0 20px; overflow-wrap: anywhere; }
.home-panel > button { margin-top: auto; width: 100%; min-height: 44px; border: 0; border-radius: 18px; background: var(--home-soft-button); color: inherit; font-size: 13px; text-align: left; padding: 8px 10px; }
.home-loop-preview { display: flex; align-items: flex-start; gap: 8px; border-top: 1px solid var(--home-line); padding: 10px 0; }
.home-loop-dot { width: 13px; height: 13px; border: 1px solid var(--home-quiet); border-radius: 50%; margin-top: 5px; flex: none; }
.home-loop-copy { min-width: 0; flex: 1; }
.home-loop-preview button { display: block; background: transparent; border: 0; border-radius: 0; padding: 0; width: 100%; text-align: left; white-space: normal; overflow-wrap: anywhere; font: 15px/1.5 Georgia,serif; color: inherit; min-height: 44px; }
.home-loop-priority { display: block; font-size: 11px; line-height: 1.5; color: var(--home-quiet); margin-top: 5px; text-transform: uppercase; letter-spacing: .04em; }
.home-loop-priority[data-priority="high"] { color: var(--home-high); }
.home-loops-empty { font-size: 14px; line-height: 1.55; color: var(--home-quiet); }
.home-review-route { min-height: 44px; width: auto; background: transparent; border: 0; font-size: 12px; color: var(--home-quiet); padding: 6px 0; }
.recent-routes { display: flex; align-items: center; gap: 8px; }
body[data-active-view="capture"] #localEntries { background: transparent; border: 0; padding: 0; }
body[data-active-view="capture"] .recent-heading { margin: 0 0 10px; }
body[data-active-view="capture"] .recent-heading h3 { font-size: 15px; font-weight: 500; color: var(--home-quiet); }
body[data-active-view="capture"] #openCaptureHistory { background: transparent; border: 0; padding: 8px 0; color: var(--home-green); font-size: 12px; }
body[data-active-view="capture"] .entry-item { background: var(--home-card); color: var(--home-ink); border: 0; border-radius: 14px; margin-bottom: 7px; box-shadow: var(--home-shadow); }
body[data-active-view="capture"] .entry-summary {
  grid-template-columns: 29px minmax(0,1fr) auto 16px;
  grid-template-areas: "icon time status chevron" "icon preview status chevron" "icon kind status chevron";
  gap: 0 9px; padding: 9px 10px; min-height: 44px;
}
body[data-active-view="capture"] .entry-summary::before { content: ""; grid-area: icon; width: 27px; height: 27px; background: var(--home-sage); border: 1px solid var(--home-line); border-radius: 50%; }
body[data-active-view="capture"] .entry-summary .entry-kind-title { font-size: 10px; color: var(--home-quiet); line-height: 1.3; }
body[data-active-view="capture"] .entry-item[data-entry-kind="capture"] .entry-summary { grid-template-areas: "icon time status chevron" "icon preview status chevron"; }
body[data-active-view="capture"] .entry-item[data-entry-kind="capture"] .entry-summary .entry-kind-title { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
body[data-active-view="capture"] #captureReviewRevisit { color: var(--home-quiet); font-size: 12px; margin: 0 0 10px; }
body[data-active-view="capture"] .entry-summary .entry-relative-time { font-size: 11px; color: var(--home-quiet); line-height: 1.3; }
body[data-active-view="capture"] .entry-summary-text { font: 13px/1.4 Georgia,serif; -webkit-line-clamp: 1; }
body[data-active-view="capture"] .entry-summary-cleanup { grid-column: 2 / 5; }
body[data-active-view="capture"] .entry-disclosure[open] > .entry-summary { grid-template-areas: "icon time status chevron" "icon kind status chevron"; background: transparent; }
#captureComposerTitle, body[data-active-view="capture"] #captureComposer :is(.voice-capture-button-label,.capture-save-label) { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
body[data-active-view="capture"] .capture-dock-shell { padding: 0; background: var(--home-paper); border: 0; border-top: 1px solid var(--home-line); box-shadow: none; border-radius: 0; }
body[data-active-view="capture"] #captureComposer { padding: 10px 12px 8px; margin: 0; background: var(--home-paper); border: 0; border-radius: 0; }
body[data-active-view="capture"] #captureComposer :is(.composer-help,#contextMeter) { display: none; }
body[data-active-view="capture"] #captureComposer :is(.context-coach-message,.context-coach-status,.context-coach-prompt-copy) { color: var(--home-quiet); }
body[data-active-view="capture"] #captureComposer .capture-input-shell { background: var(--home-card); border: 1px solid var(--home-line); border-radius: 16px; }
body[data-active-view="capture"] #captureComposer .capture-field-compose-row { display: grid; grid-template-columns: minmax(0,1fr); align-items: stretch; }
body[data-active-view="capture"] #captureComposer #input { min-height: 66px; line-height: 1.5; padding: 9px 12px; color: var(--home-ink); background: transparent; }
body[data-active-view="capture"] #captureComposer #input::placeholder { color: var(--home-quiet); opacity: 1; }
body[data-active-view="capture"] .recent-routes { gap: 5px; flex-wrap: wrap; }
body[data-active-view="capture"] .recent-routes .capture-drafts-button { color: var(--home-quiet); min-width: 44px; min-height: 44px; padding: 4px 2px; font-size: 12px; font-weight: 400; }
body[data-active-view="capture"] #localEntries > .capture-drafts { display: block; }
body[data-active-view="capture"] .capture-drafts-status:not(:empty) { margin: 0 0 8px; color: var(--home-quiet); }
body[data-active-view="capture"] .capture-drafts-panel:not([hidden]) { margin-bottom: 12px; }
body[data-active-view="capture"] #captureComposer .capture-field-actions { position: static; display: flex; align-items: center; justify-content: flex-end; gap: 2px; width: auto; padding: 0 5px 5px; border: 0; background: transparent; }
body[data-active-view="capture"] #captureComposer .capture-field-action { position: relative; display: flex; flex: 0 0 44px; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; width: 44px; height: 44px; padding: 13px; border: 0; border-radius: 12px; background: transparent; color: var(--home-green); }
body[data-active-view="capture"] #captureComposer .capture-field-action::before { content: ""; position: absolute; inset: 6px; border-radius: 11px; background: var(--home-soft-button); }
body[data-active-view="capture"] #captureComposer .capture-save-button { color: var(--home-button-ink); }
body[data-active-view="capture"] #captureComposer .capture-save-button::before { background: var(--home-green); }
body[data-active-view="capture"] #captureComposer .voice-capture-button[aria-pressed="true"]::before { background: var(--home-sage); outline: 2px solid var(--home-green); }
body[data-active-view="capture"] #captureComposer :is(.voice-capture-microphone,.capture-save-icon) { position: relative; width: 18px; height: 18px; flex: none; }
.save-capture-draft-button { min-height: 44px; width: auto; border: 0; background: transparent; color: var(--home-quiet); padding: 6px 8px; font-size: 12px; font-weight: 400; flex: 0 0 auto; }
.capture-input-shell:has(#input:placeholder-shown) #saveCaptureDraftButton, .today-answer-dialog #saveCaptureDraftButton { display: none; }
body[data-active-view="capture"] :is(button,textarea,summary):focus-visible { outline: 3px solid var(--home-focus); outline-offset: 3px; }
body[data-active-view="capture"] .capture-drafts-panel { background: var(--home-card); color: var(--home-ink); border-color: var(--home-line); }
body[data-active-view="capture"] :is(.today-answer-dialog,.entry-reader-dialog,.help-tour-panel,.app-menu.panel,.capture-draft-item,.thread-kit-item) { background: var(--home-card); color: var(--home-ink); border-color: var(--home-line); }
body[data-active-view="capture"] :is(.today-answer-context p,.today-answer-context button,.today-answer-dialog .today-answer-intro,.entry-reader-meta,.capture-draft-time,.capture-drafts-status,.entry-question-context,.entry-question-meaning,.today-answer-close,.tour-secondary-button,.tour-feature-note) { color: var(--home-quiet); }
body[data-active-view="capture"] .help-tour-panel .tour-step p { color: var(--home-quiet); }
body[data-active-view="capture"] .app-menu.panel button { background: transparent; color: var(--home-ink); border-color: var(--home-line); }
body[data-active-view="capture"] .app-menu.panel :is(button:hover,button.active) { background: var(--home-sage); color: var(--home-ink); }
body[data-active-view="capture"] :is(.capture-draft-preview,.thread-kit-preview,.tour-art-card,.voice-capture-transcript) { color: var(--home-ink); }
body[data-active-view="capture"] :is(.thread-kit-date,.voice-capture-pending-label,.capture-drafts-button:hover,.capture-drafts-button[aria-expanded="true"]) { color: var(--home-quiet); }
body[data-active-view="capture"] :is(.voice-capture-review,.voice-capture-review-button,.thread-kit-keep-button[aria-pressed="true"]) { background: var(--home-soft-button); color: var(--home-ink); border-color: var(--home-line); }
body[data-active-view="capture"] .voice-capture-accept { background: var(--home-green); color: var(--home-button-ink); }
body[data-active-view="capture"] .popup-close-button:hover { background: var(--home-sage); color: var(--home-ink); }
body[data-active-view="capture"] .help-tour-panel .tour-step { background: var(--home-card); border-color: var(--home-line); }
body[data-active-view="capture"] :is(.thread-session-reference-heading strong,.thread-session-reference-text) { color: var(--home-ink); }
body[data-active-view="capture"] .thread-session-reference-date { color: var(--home-quiet); }
body[data-active-view="capture"] .app-menu.panel .menu-group-label { color: var(--home-quiet); }
.legacy-saved-note { border-color: var(--line); }
.deployment-banner { display:flex; flex-wrap:wrap; align-items:center; gap:.5rem 1rem; padding:.65rem 1rem; background:#fff0b8; color:#302400; font:600 14px/1.5 system-ui,sans-serif; border-bottom:2px solid #916900; }
.deployment-banner[hidden] { display:none; }
body[data-mirr-test="true"]::after { content:"MIRR TEST"; position:fixed; top:max(2px, env(safe-area-inset-top, 0px)); left:50%; transform:translateX(-50%); z-index:2147483647; pointer-events:none; padding:1px 7px; border-radius:0 0 5px 5px; background:#fff0b8; color:#302400; font:800 10px/1.4 system-ui,sans-serif; }
.deployment-banner a { color:#302400; text-decoration:underline; min-height:44px; display:inline-flex; align-items:center; }
