:root {
  --ink: #18312f;
  --muted: #667773;
  --cream: #f7f3e9;
  --paper: #fffdf7;
  --green: #173f3a;
  --green-2: #2f6960;
  --sage: #dce8df;
  --gold: #d6a650;
  --gold-soft: #f2e5c8;
  --line: #d9dfda;
  --danger: #9a3f3f;
  --shadow: 0 14px 36px rgba(23, 63, 58, .10);
  --radius: 22px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--cream); }
body { margin: 0; min-height: 100vh; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--ink); background: radial-gradient(circle at top right, #f4e6c8 0, transparent 32%), var(--cream); }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid rgba(214,166,80,.55); outline-offset: 2px; }
.app-shell { min-height: 100vh; padding-bottom: 92px; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px clamp(16px, 4vw, 40px); background: rgba(247,243,233,.90); border-bottom: 1px solid rgba(23,63,58,.08); backdrop-filter: blur(18px); }
.brand { display: flex; align-items: center; gap: 10px; border: 0; background: transparent; color: var(--ink); text-align: left; padding: 0; }
.brand-mark { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--green); color: var(--gold-soft); font-size: 23px; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 18px; letter-spacing: .02em; }
.brand small { color: var(--muted); font-size: 11px; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.save-state { color: var(--muted); font-size: 12px; }
.icon-button { display: inline-grid; place-items: center; min-width: 42px; min-height: 42px; border: 1px solid var(--line); border-radius: 50%; background: var(--paper); color: var(--green); font-size: 24px; }
main { width: min(1180px, calc(100% - 28px)); margin: 0 auto; }
.view { display: none; padding: 26px 0 40px; }
.view.active { display: block; animation: fade-in .18s ease-out; }
@keyframes fade-in { from { opacity: .4; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
.hero, .page-heading { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin: 10px 0 22px; }
.hero { align-items: center; padding: 18px 2px; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 8px; font-size: clamp(30px, 5vw, 50px); line-height: 1.02; letter-spacing: -.035em; }
h2 { margin-bottom: 8px; font-size: clamp(20px, 3vw, 27px); line-height: 1.15; letter-spacing: -.02em; }
.hero-copy { max-width: 650px; margin-bottom: 0; color: var(--muted); font-size: 16px; }
.eyebrow { margin-bottom: 7px; color: var(--green-2); font-weight: 800; font-size: 12px; letter-spacing: .13em; }
.muted { color: var(--muted); }
.panel { margin-bottom: 18px; padding: clamp(18px, 3vw, 28px); border: 1px solid rgba(23,63,58,.09); border-radius: var(--radius); background: rgba(255,253,247,.92); box-shadow: var(--shadow); }
.now-panel { background: linear-gradient(135deg, var(--green), #24594f); color: white; }
.now-panel .eyebrow, .now-panel .muted { color: #d6e5df; }
.panel-heading { display: flex; align-items: start; justify-content: space-between; gap: 16px; }
.timer { padding: 9px 12px; border-radius: 13px; background: rgba(255,255,255,.12); font-variant-numeric: tabular-nums; font-weight: 800; }
.now-controls, .live-controls, .dialog-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.primary-button, .secondary-button, .danger-button, .text-button, .file-label { min-height: 44px; border-radius: 14px; padding: 11px 16px; font-weight: 750; border: 1px solid transparent; }
.primary-button { background: var(--gold); color: #263221; border-color: #c79640; }
.secondary-button, .file-label { background: var(--paper); color: var(--green); border-color: var(--line); }
.now-panel .secondary-button { background: rgba(255,255,255,.10); color: white; border-color: rgba(255,255,255,.25); }
.danger-button { background: #fff5f3; color: var(--danger); border-color: #e4b9b4; }
.text-button { min-height: auto; padding: 7px 4px; color: var(--green-2); background: transparent; }
.full-width { width: 100%; }
.dashboard-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.stack-list, .stream-list { display: grid; gap: 10px; }
.stack-item, .stream-item, .priority-item { display: flex; gap: 12px; align-items: start; padding: 13px; border: 1px solid var(--line); border-radius: 16px; background: #fffef9; }
.stack-item button, .stream-item button, .priority-item button { flex: 0 0 auto; }
.item-main { min-width: 0; flex: 1; }
.item-title { margin: 0 0 3px; font-weight: 750; overflow-wrap: anywhere; }
.item-meta { color: var(--muted); font-size: 12px; }
.check-button { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; border: 1px solid #9eb2ac; background: white; color: var(--green); }
.completed .item-title { text-decoration: line-through; color: var(--muted); }
.recovery-card { min-height: 96px; padding: 14px; border-radius: 16px; background: var(--sage); }
.form-panel { display: grid; gap: 18px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; }
.field { display: grid; gap: 7px; color: var(--ink); font-weight: 700; font-size: 13px; }
.field input, .field textarea, .field select, .compact-select { width: 100%; border: 1px solid #bdc9c4; border-radius: 14px; padding: 12px 13px; background: white; color: var(--ink); font-weight: 500; }
.field textarea { resize: vertical; min-height: 110px; }
.check-row { display: flex; gap: 10px; align-items: center; font-weight: 650; }
.check-row input { width: 20px; height: 20px; }
.privacy-note { background: var(--sage); }
.status-pill { display: inline-flex; align-items: center; min-height: 34px; padding: 6px 12px; border-radius: 999px; background: #e9ecea; color: var(--green); font-weight: 800; font-size: 12px; }
.status-pill.active { background: #dbefe6; color: #155437; }
.status-pill.paused { background: var(--gold-soft); color: #705113; }
.live-panel { text-align: center; padding-top: 34px; }
.live-indicator { position: relative; width: 90px; height: 90px; margin: 0 auto 18px; border-radius: 50%; background: var(--sage); display: grid; place-items: center; }
.live-indicator span { width: 32px; height: 32px; border-radius: 50%; background: var(--green-2); }
.live-indicator.active::before, .live-indicator.active::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--green-2); animation: pulse 2s infinite; }
.live-indicator.active::after { animation-delay: 1s; }
@keyframes pulse { from { opacity: .65; transform: scale(.9); } to { opacity: 0; transform: scale(1.45); } }
.live-controls { justify-content: center; }
.live-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin-top: 24px; }
.live-stats div { padding: 14px; border-radius: 15px; background: #f5f7f3; }
.live-stats span, .live-stats strong { display: block; }
.live-stats span { color: var(--muted); font-size: 11px; }
.live-stats strong { margin-top: 4px; font-size: 16px; }
.warning-panel { border-color: #ddc68f; background: #fff8e7; }
.mission-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px; }
.mission-card { display: grid; gap: 12px; }
.mission-card .progress-track { height: 8px; background: #e7ebe7; border-radius: 999px; overflow: hidden; }
.mission-card .progress-fill { height: 100%; background: var(--green-2); }
.summary-tabs { display: flex; gap: 8px; margin-bottom: 22px; border-bottom: 1px solid var(--line); }
.tab { padding: 10px 12px; border: 0; border-bottom: 3px solid transparent; background: transparent; color: var(--muted); font-weight: 750; }
.tab.active { border-bottom-color: var(--gold); color: var(--green); }
.summary-section { margin-bottom: 22px; }
.summary-section ul { padding-left: 22px; }
.summary-section li { margin: 8px 0; }
.button-stack { display: grid; gap: 10px; }
.file-label { display: grid; place-items: center; cursor: pointer; }
.file-label input { display: none; }
.instruction-list { padding-left: 22px; color: var(--muted); }
.instruction-list li { margin-bottom: 8px; }
.bottom-nav { position: fixed; left: 50%; bottom: max(10px, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 30; display: grid; grid-template-columns: repeat(6, 1fr); width: min(760px, calc(100% - 20px)); padding: 8px; border: 1px solid rgba(23,63,58,.12); border-radius: 24px; background: rgba(255,253,247,.95); box-shadow: 0 18px 50px rgba(23,63,58,.22); backdrop-filter: blur(16px); }
.nav-button { display: grid; place-items: center; gap: 2px; min-height: 56px; padding: 5px; border: 0; border-radius: 16px; background: transparent; color: var(--muted); }
.nav-button span { font-size: 20px; line-height: 1; }
.nav-button small { font-size: 10px; }
.nav-button.active { background: var(--sage); color: var(--green); }
.nav-button.live-nav span { color: #b64a3d; }
dialog { width: min(520px, calc(100% - 24px)); border: 0; border-radius: 22px; padding: 0; box-shadow: 0 30px 80px rgba(0,0,0,.25); }
dialog::backdrop { background: rgba(13,36,33,.45); backdrop-filter: blur(3px); }

.dialog-card { min-width: 0; width: 100%; }
.dialog-card > * { min-width: 0; }
.dialog-card { display: grid; gap: 16px; padding: 24px; background: var(--paper); }
.dialog-heading { display: flex; justify-content: space-between; align-items: center; }
.dialog-heading h2 { margin: 0; }
.dialog-actions { justify-content: end; }
.toast { position: fixed; left: 50%; bottom: 100px; transform: translate(-50%, 20px); z-index: 100; padding: 12px 16px; border-radius: 14px; background: var(--ink); color: white; opacity: 0; pointer-events: none; transition: .2s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.empty-state { padding: 22px; border: 1px dashed #b8c6c0; border-radius: 16px; color: var(--muted); text-align: center; }
.tag { display: inline-flex; align-items: center; padding: 3px 8px; border-radius: 999px; background: var(--sage); color: var(--green); font-size: 11px; font-weight: 750; }
@media (max-width: 760px) {
  main { width: min(100% - 20px, 1180px); }
  .topbar { padding: 10px 12px; }
  .save-state { display: none; }
  .hero, .page-heading { align-items: stretch; flex-direction: column; }
  .hero .primary-button, .page-heading > button, .page-heading > select { width: 100%; }
  .dashboard-grid, .mission-grid, .form-grid { grid-template-columns: 1fr; }
  .live-stats { grid-template-columns: 1fr; }
  .bottom-nav { width: calc(100% - 12px); bottom: max(5px, env(safe-area-inset-bottom)); border-radius: 20px; padding: 5px; }
  .nav-button { min-height: 52px; }
  .nav-button small { font-size: 9px; }
  .panel { border-radius: 18px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; } }

button:disabled { cursor: default; opacity: .48; }
.day-compass-panel { background: linear-gradient(135deg, rgba(255,253,247,.96), rgba(220,232,223,.82)); }
.day-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 20px 0; }
.day-metrics div { padding: 14px; border-radius: 15px; background: rgba(255,255,255,.72); border: 1px solid rgba(23,63,58,.08); }
.day-metrics span, .day-metrics strong { display: block; }
.day-metrics span { color: var(--muted); font-size: 11px; }
.day-metrics strong { margin-top: 5px; font-size: 16px; }
.resume-note { margin-top: 14px; padding: 12px 14px; border: 1px solid rgba(255,255,255,.22); border-radius: 14px; background: rgba(255,255,255,.10); color: white; }
.resume-note::before { content: "RETURN HERE"; display: block; margin-bottom: 5px; color: #d6e5df; font-size: 10px; font-weight: 800; letter-spacing: .12em; }
.transition-card { min-height: 112px; padding: 15px; border-radius: 16px; background: #f5f7f3; }
.transition-card.warning { background: var(--gold-soft); }
.transition-countdown { margin: 4px 0 10px; font-size: 24px; font-weight: 850; letter-spacing: -.02em; }
.transition-prep { margin: 9px 0; padding: 10px 12px; border-left: 3px solid var(--gold); background: rgba(255,255,255,.62); color: var(--muted); }
.transition-actions, .inline-actions { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; }
.mini-status { display: inline-flex; align-items: center; min-height: 28px; padding: 5px 9px; border-radius: 999px; background: #eef1ee; color: var(--muted); font-size: 11px; font-weight: 750; }
.mini-status.active { background: var(--sage); color: var(--green); }
.shutdown-status { border-color: #b8cdbf; background: var(--sage); }
.shutdown-status h2 { margin-bottom: 6px; }
dialog.dialog-wide { width: min(660px, calc(100vw - 24px)); }
.checkin-dialog-card { text-align: left; }
.checkin-actions { display: grid; gap: 10px; }
.checkin-actions button { width: 100%; }
.fixed-note { margin: 14px 0 0; padding: 12px 14px; border-radius: 14px; background: #fff8e7; color: #705113; white-space: pre-wrap; }
.break-status { margin-top: 12px; padding: 10px 12px; border-radius: 14px; background: var(--gold-soft); color: #705113; font-weight: 700; }
.status-pill.closed { background: var(--sage); color: var(--green); }
.status-pill.planned { background: #dbefe6; color: #155437; }

@media (max-width: 760px) {
  .day-metrics { grid-template-columns: 1fr 1fr; }
  .day-metrics div:last-child { grid-column: 1 / -1; }
  .page-heading .inline-actions { width: 100%; }
  .page-heading .inline-actions button { flex: 1 1 140px; }
  .now-controls button { flex: 1 1 42%; }
  .transition-actions button { flex: 1 1 42%; }
  dialog { max-height: calc(100dvh - 24px); overflow: auto; }
}

.build-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 9px;
  border: 1px solid rgba(23, 63, 58, 0.18);
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--green);
  background: rgba(255, 255, 255, 0.62);
}


/* Mission 003 — Universal Capture and Inbox */
.quick-capture-panel { background: linear-gradient(135deg, #fff8e7, #fffdf7); border-color: #ddc68f; }
.quick-actions, .attachment-actions, .inbox-actions { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; }
.quick-actions { justify-content: flex-end; margin-top: 12px; }
.capture-grid { align-items: start; }
.capture-guide { background: var(--sage); position: sticky; top: 88px; }
.capture-rule-list { display: grid; gap: 10px; margin-top: 18px; }
.capture-rule-list div { display: grid; gap: 3px; padding: 13px; border-radius: 14px; background: rgba(255,255,255,.68); }
.capture-rule-list span { color: var(--muted); font-size: 13px; }
.attachment-picker { display: grid; gap: 12px; padding: 15px; border: 1px dashed #aebeb7; border-radius: 16px; background: #f7f8f4; }
.attachment-picker p { margin: 0; }
.attachment-summary { padding: 12px 14px; border-radius: 14px; background: var(--sage); color: var(--green); font-weight: 700; }
.inbox-panel { margin-top: 18px; }
.inbox-heading { align-items: end; }
.inbox-heading .compact-select { width: auto; min-width: 150px; }
.inbox-list { display: grid; gap: 12px; }
.inbox-item { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 14px; align-items: center; padding: 15px; border: 1px solid var(--line); border-radius: 17px; background: #fffef9; }
.inbox-actions { justify-content: flex-end; }
.inbox-actions .secondary-button { min-height: 38px; padding: 8px 12px; }
.item-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 5px; }
.inbox-tag { background: var(--gold-soft); color: #705113; }
.capture-nav { position: relative; }
.nav-badge { position: absolute; top: 4px; right: 16%; display: grid; place-items: center; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 999px; background: #b64a3d; color: white; font-size: 9px; line-height: 1; }
.nav-badge[hidden] { display: none; }
.quick-dialog-actions { flex-wrap: wrap; }

@media (max-width: 760px) {
  .capture-guide { position: static; }
  .inbox-heading { align-items: stretch; }
  .inbox-heading .inline-actions { width: 100%; }
  .inbox-heading .compact-select, .inbox-heading button { flex: 1 1 140px; width: auto; }
  .inbox-item { grid-template-columns: 1fr; }
  .inbox-actions { justify-content: stretch; }
  .inbox-actions button { flex: 1 1 42%; }
  .attachment-actions label, .attachment-actions button { flex: 1 1 42%; }
  .quick-actions button { flex: 1 1 42%; }
}


/* Mission 004 — Focus Engine and Task Decomposition */
.focus-finish-line { margin-top: 14px; padding: 11px 13px; border-left: 3px solid var(--gold); border-radius: 10px; background: rgba(255,255,255,.10); color: #eef7f3; font-weight: 700; }
.focus-step-card { display: grid; gap: 3px; margin-top: 12px; padding: 13px 14px; border-radius: 14px; background: rgba(255,255,255,.12); }
.focus-step-card span, .focus-step-preview span { color: #d6e5df; font-size: 10px; font-weight: 850; letter-spacing: .12em; }
.focus-step-card strong { font-size: 17px; }
.focus-step-card small { color: #d6e5df; }
.focus-target-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; }
.focus-target-pill { display: inline-flex; padding: 6px 10px; border-radius: 999px; background: rgba(255,255,255,.12); color: #eef7f3; font-size: 12px; font-weight: 800; }
.text-button.on-dark { color: #f2e5c8; }
.focus-progress-track { height: 8px; margin-top: 8px; overflow: hidden; border-radius: 999px; background: rgba(255,255,255,.14); }
.focus-progress-fill { width: 0; height: 100%; border-radius: inherit; background: var(--gold); transition: width .3s linear; }
.focus-step-preview { display: grid; gap: 5px; padding: 13px; border-radius: 14px; background: var(--sage); }
.focus-step-preview span { color: var(--green-2); }
.focus-mode-dialog { width: min(760px, calc(100vw - 20px)); }
.focus-mode-card { min-height: min(720px, calc(100dvh - 20px)); align-content: start; background: radial-gradient(circle at top right, rgba(214,166,80,.20), transparent 35%), var(--green); color: white; }
.focus-mode-card .eyebrow, .focus-mode-card .muted { color: #d6e5df; }
.focus-mode-card .focus-close { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.22); color: white; }
.focus-mode-finish { padding: 13px 15px; border-left: 3px solid var(--gold); border-radius: 12px; background: rgba(255,255,255,.08); color: #eef7f3; }

.focus-current-step { padding: 18px; border: 1px solid rgba(255,255,255,.18); border-radius: 18px; background: rgba(255,255,255,.09); }
.focus-current-step h2 { margin: 0; font-size: clamp(24px, 4vw, 38px); }
.focus-mode-actions { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 10px; }
.focus-mode-card .secondary-button { background: rgba(255,255,255,.10); border-color: rgba(255,255,255,.25); color: white; }
.park-distraction { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 10px; align-items: end; margin-top: 12px; padding: 16px; border-radius: 18px; background: rgba(255,255,255,.08); }
.park-distraction .field { color: white; }
.park-distraction small { grid-column: 1 / -1; }

@media (max-width: 760px) {
  .focus-target-row { align-items: flex-start; flex-direction: column; }
  .focus-mode-dialog { width: calc(100vw - 10px); max-height: calc(100dvh - 10px); }
  .focus-mode-card { min-height: calc(100dvh - 10px); padding: 20px 16px; }
  .focus-mode-actions { grid-template-columns: 1fr; }
  .park-distraction { grid-template-columns: 1fr; }
  .park-distraction small { grid-column: auto; }
  .focus-clock-wrap strong { font-size: 70px; }
}

/* Mission 005 — Voice-First Calm Interface */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
.voice-launch { color: #b64a3d; font-size: 18px; }
.calm-hero { margin-bottom: 12px; padding-bottom: 8px; }
.calm-hero h1 { margin-bottom: 0; }
.hero-plan-button { min-width: 148px; }
.capacity-panel { padding-bottom: 20px; }
.calm-heading-row { display: flex; align-items: start; justify-content: space-between; gap: 16px; }
.capacity-buttons { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 18px; }
.capacity-button {
  display: grid;
  place-items: center;
  gap: 3px;
  min-height: 92px;
  padding: 10px 8px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--paper);
  color: var(--green);
  text-align: center;
}
.capacity-button span { display: grid; place-items: center; min-width: 42px; height: 42px; padding-inline: 8px; border-radius: 999px; background: #edf1ed; font-size: 17px; font-weight: 900; }
.capacity-button strong { font-size: 14px; line-height: 1.15; }
.capacity-button small { color: var(--muted); font-size: 10px; font-weight: 750; text-transform: uppercase; letter-spacing: .05em; }
.capacity-button.active { border-color: #c79640; background: var(--gold-soft); box-shadow: inset 0 0 0 2px rgba(214,166,80,.18); }
.capacity-button.active span { background: var(--gold); }
.capacity-summary { margin: 13px 2px 0; color: var(--muted); font-size: 13px; }

.now-visual-layout { display: grid; grid-template-columns: minmax(210px, 280px) 1fr; align-items: center; gap: clamp(20px, 4vw, 44px); margin-top: 16px; }
.now-visual-details { min-width: 0; }
.visual-timer { --remaining-degrees: 120deg; --timer-red: #b94238; --timer-face: #fbfaf5; --timer-ink: #173f3a; display: grid; place-items: center; width: 100%; }
.visual-timer-face { position: relative; width: 100%; aspect-ratio: 1; overflow: hidden; border: 2px solid rgba(23,63,58,.42); border-radius: 50%; background: conic-gradient(from 0deg, var(--timer-red) 0deg var(--remaining-degrees), var(--timer-face) var(--remaining-degrees) 360deg); box-shadow: inset 0 0 0 8px rgba(255,255,255,.72), 0 10px 24px rgba(10,34,31,.18); transition: background .3s linear; }
.visual-timer-face::before { content: ''; position: absolute; inset: 5px; z-index: 2; border-radius: 50%; background: repeating-conic-gradient(from -0.7deg, rgba(23,63,58,.72) 0deg 1.1deg, transparent 1.1deg 6deg); -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 11px), #000 calc(100% - 10px)); mask: radial-gradient(farthest-side, transparent calc(100% - 11px), #000 calc(100% - 10px)); pointer-events: none; }
.visual-timer-label { position: absolute; z-index: 4; color: var(--timer-ink); font-size: clamp(9px, 2.5vw, 13px); font-weight: 850; line-height: 1; text-shadow: 0 1px rgba(255,255,255,.72); }
.label-0 { top: 7%; left: 50%; transform: translateX(-50%); }
.label-5 { top: 13%; right: 22%; }
.label-10 { top: 27%; right: 8%; }
.label-15 { top: 50%; right: 5%; transform: translateY(-50%); }
.label-20 { right: 9%; bottom: 27%; }
.label-25 { right: 22%; bottom: 12%; }
.label-30 { bottom: 6%; left: 50%; transform: translateX(-50%); }
.label-35 { bottom: 12%; left: 22%; }
.label-40 { bottom: 27%; left: 9%; }
.label-45 { top: 50%; left: 5%; transform: translateY(-50%); }
.label-50 { top: 27%; left: 8%; }
.label-55 { top: 13%; left: 22%; }
.visual-timer-hand { position: absolute; left: calc(50% - 1px); bottom: 50%; z-index: 5; width: 2px; height: 34%; border-radius: 999px; background: rgba(23,63,58,.88); transform: rotate(var(--remaining-degrees)); transform-origin: 50% 100%; transition: transform .3s linear; }
.visual-timer-hub { position: absolute; left: 50%; top: 50%; z-index: 6; width: 12px; height: 12px; border: 3px solid #f8f4e9; border-radius: 50%; background: var(--timer-ink); transform: translate(-50%, -50%); }
.visual-timer-centre { position: absolute; left: 50%; top: 63%; z-index: 7; display: grid; place-items: center; min-width: 92px; padding: 7px 10px; border-radius: 14px; background: rgba(255,253,247,.88); color: var(--green); transform: translate(-50%, -50%); backdrop-filter: blur(2px); }
.visual-timer-centre strong { font-size: clamp(19px, 5vw, 30px); font-variant-numeric: tabular-nums; line-height: 1; letter-spacing: -.04em; }
.visual-timer-centre span { margin-top: 3px; color: var(--muted); font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.visual-timer.timer-running .visual-timer-face { box-shadow: inset 0 0 0 8px rgba(255,255,255,.72), 0 0 0 4px rgba(214,166,80,.22), 0 10px 24px rgba(10,34,31,.20); }
.visual-timer.timer-finished .visual-timer-face { background: var(--timer-face); }
.visual-timer-compact { max-width: 260px; margin-inline: auto; }
.visual-timer-large { max-width: 360px; margin: 8px auto 20px; }
.visual-timer-large .visual-timer-centre { min-width: 130px; padding: 11px 14px; }
.visual-timer-large .visual-timer-centre strong { font-size: clamp(34px, 10vw, 58px); }
.visual-timer-large .visual-timer-centre span { color: #405d57; font-size: 11px; text-transform: none; letter-spacing: 0; }
.focus-mode-card .visual-timer { --timer-face: #f7f3e9; --timer-ink: #173f3a; }

.calm-now-panel { padding: clamp(20px, 3vw, 30px); }
.calm-now-panel h2 { max-width: 850px; font-size: clamp(24px, 3.4vw, 34px); }
.calm-now-reason { margin-bottom: 0; }
.calm-target-row { margin-top: 18px; }
.primary-now-controls { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); }
.calm-action-button { min-height: 56px; font-size: 16px; }
.inline-more-actions { margin-top: 12px; }
.inline-more-actions summary { width: fit-content; color: #d6e5df; cursor: pointer; font-size: 13px; font-weight: 750; }
.inline-more-actions[open] summary { margin-bottom: 10px; }
.secondary-now-controls { margin-top: 0; }
.calm-two-column { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px; }
.compact-heading { align-items: center; }
.large-icon-action { display: grid; place-items: center; min-width: 48px; min-height: 48px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: var(--paper); color: var(--green); font-size: 25px; }
.calm-transition-card { min-height: 132px; }
.voice-capture-card { background: linear-gradient(135deg, #fff8e7, #fffdf7); border-color: #ddc68f; }
.calm-capture-field textarea { min-height: 82px; font-size: 16px; }
.calm-capture-actions { display: grid; grid-template-columns: 1.25fr 1fr; gap: 10px; margin-top: 12px; }
.calm-capture-actions button { min-height: 56px; font-size: 16px; }
.voice-primary-button { position: relative; }
.voice-primary-button.listening, .field-voice-button.listening { animation: voice-pulse 1s ease-in-out infinite alternate; }
@keyframes voice-pulse { from { box-shadow: 0 0 0 0 rgba(182,74,61,.15); } to { box-shadow: 0 0 0 8px rgba(182,74,61,.12); } }
.today-more { margin: 18px 0; }
.more-summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 17px 20px; border: 1px solid rgba(23,63,58,.12); border-radius: 18px; background: rgba(255,253,247,.82); box-shadow: var(--shadow); cursor: pointer; list-style: none; }
.more-summary::-webkit-details-marker { display: none; }
.more-summary span { font-size: 18px; font-weight: 850; }
.more-summary small { color: var(--muted); text-align: right; }
.today-more[open] .more-summary { margin-bottom: 18px; }
.today-detail-stack { display: grid; gap: 0; }
.checkin-compact-panel { max-width: none; }
.speech-support-note { margin-top: 4px; padding: 14px 16px; border-radius: 15px; background: var(--sage); color: var(--green); font-size: 13px; }
.field.voice-enabled { position: relative; }
.field.voice-enabled input[type="text"], .field.voice-enabled textarea { padding-right: 56px; }
.field-voice-button {
  position: absolute;
  right: 8px;
  bottom: 8px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid #c7d1cc;
  border-radius: 50%;
  background: #f7f3e9;
  color: #b64a3d;
  font-size: 15px;
  z-index: 2;
}
.focus-mode-card .field-voice-button { background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.28); color: #f2e5c8; }

@media (max-width: 760px) {
  main { width: min(100% - 14px, 1180px); }
  .view { padding-top: 12px; }
  .topbar { gap: 8px; }
  .brand small { display: none; }
  .brand-mark { width: 38px; height: 38px; }
  .build-badge { display: none; }
  .top-actions { gap: 6px; }
  .icon-button { min-width: 46px; min-height: 46px; }
  .calm-hero { flex-direction: row; align-items: center; gap: 10px; }
  .calm-hero h1 { font-size: clamp(27px, 8vw, 36px); }
  .calm-hero .eyebrow { margin-bottom: 4px; }
  .hero-plan-button { width: auto !important; min-width: 118px; min-height: 50px; padding-inline: 13px; }
  .panel { margin-bottom: 12px; padding: 18px; }
  .capacity-panel { padding: 17px; }
  .calm-heading-row { align-items: center; }
  .capacity-panel h2 { font-size: 23px; }
  .capacity-buttons { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; margin-top: 14px; }
  .capacity-button { min-height: 76px; grid-template-columns: auto 1fr; grid-template-rows: auto auto; justify-items: start; text-align: left; padding: 10px 12px; }
  .capacity-button span { grid-row: 1 / 3; align-self: center; }
  .capacity-button strong { align-self: end; font-size: 15px; }
  .capacity-button small { align-self: start; }
  .capacity-summary { font-size: 12px; }
  .calm-now-panel h2 { font-size: 25px; }
  .now-visual-layout { grid-template-columns: 1fr; gap: 14px; }
  .visual-timer-compact { max-width: 220px; }
  .visual-timer-large { max-width: min(310px, 82vw); }
  .primary-now-controls { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; }
  .calm-action-button { min-height: 56px; }
  .calm-two-column { grid-template-columns: 1fr; gap: 0; }
  .calm-transition-card { min-height: 104px; }
  .calm-capture-actions { grid-template-columns: 1.25fr 1fr; }
  .more-summary { padding: 15px 17px; }
  .more-summary small { max-width: 190px; font-size: 10px; }
  .today-more[open] .more-summary { margin-bottom: 12px; }
  .bottom-nav { grid-template-columns: repeat(6, minmax(0,1fr)); }
  .nav-button { min-height: 58px; }
  .nav-button span { font-size: 21px; }
  dialog .primary-button, dialog .secondary-button, dialog .danger-button { min-height: 50px; }
}

@media (max-width: 390px) {
  .calm-hero { align-items: stretch; flex-direction: column; }
  .hero-plan-button { width: 100% !important; }
  .capacity-button { min-height: 72px; padding-inline: 9px; }
  .capacity-button span { min-width: 38px; height: 38px; font-size: 15px; }
  .visual-timer-compact { max-width: 205px; }
  .calm-capture-actions { grid-template-columns: 1fr; }
  .more-summary small { display: none; }
}

.screen-more { margin: 18px 0; }
.screen-more[open] > .more-summary { margin-bottom: 18px; }
.screen-more-content { display: grid; gap: 0; }
.screen-more-panel { margin-top: 0; }
.compact-privacy-note p { margin-bottom: 0; }
.live-safety-more { margin-top: 4px; }
.calm-page-heading { margin-bottom: 14px; }

@media (max-width: 760px) {
  .calm-page-heading { margin-top: 2px; }
  .calm-page-heading h1 { margin-bottom: 0; font-size: clamp(29px, 8vw, 38px); }
  .quick-capture-panel h2, .inbox-panel h2 { font-size: 24px; }
  .screen-more[open] > .more-summary { margin-bottom: 12px; }
  .screen-more-content .panel { box-shadow: 0 9px 24px rgba(23,63,58,.08); }
}

/* Mission 007 — reminders, transitions and daily rhythm */
.rhythm-panel { padding: 18px 22px; }
.rhythm-card { margin-top: 10px; padding: 14px 16px; border-radius: 16px; background: var(--sage); }
.rhythm-main { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.rhythm-main > div { display: grid; gap: 3px; min-width: 0; }
.rhythm-main span { color: var(--green-2); font-size: 11px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.rhythm-main strong { overflow-wrap: anywhere; font-size: 17px; }
.rhythm-main small { color: var(--muted); }
.rhythm-actions { display: flex; gap: 10px; margin-top: 12px; }
.rhythm-actions button { min-height: 48px; }
.reminder-list { display: grid; gap: 10px; }
.reminder-item { display: flex; align-items: center; gap: 12px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 16px; background: #fffef9; }
.reminder-item-actions { display: flex; flex-wrap: wrap; justify-content: end; gap: 8px; }
.reminder-item-actions .text-button { font-size: 13px; }
.settings-group { display: grid; gap: 14px; margin: 4px 0; padding: 18px; border: 1px solid var(--line); border-radius: 18px; }
.settings-group legend { padding: 0 8px; color: var(--green); font-weight: 850; }
.notification-row { display: flex; align-items: center; gap: 12px; }
.notification-row .muted { font-size: 12px; }
.nudge-dialog-card { text-align: left; }
.nudge-body { padding: 18px; border-radius: 17px; background: var(--sage); }
.nudge-text { margin: 0 0 6px; font-size: 20px; font-weight: 800; line-height: 1.25; }
.nudge-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.nudge-actions button { min-height: 52px; }
.midday-snapshot { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.midday-snapshot div { display: grid; gap: 4px; padding: 14px; border-radius: 15px; background: var(--sage); }
.midday-snapshot span { color: var(--muted); font-size: 11px; }
.midday-snapshot strong { overflow-wrap: anywhere; }
.midday-choice-block { display: grid; gap: 8px; }
.reset-capacity-buttons { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.reset-capacity-buttons button { min-height: 64px; border: 1px solid var(--line); border-radius: 15px; background: var(--paper); color: var(--green); font-weight: 850; }
.reset-capacity-buttons button.active { border-color: #c79640; background: var(--gold-soft); box-shadow: inset 0 0 0 1px var(--gold); }
.reset-capacity-buttons small { font-size: 10px; font-weight: 750; }
.midday-actions { display: grid; grid-template-columns: 1.2fr 1fr; gap: 10px; }
.midday-actions button { min-height: 54px; }

@media (max-width: 760px) {
  .rhythm-panel { padding: 16px; }
  .rhythm-main { align-items: stretch; }
  .rhythm-main button { min-width: 82px; }
  .rhythm-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .reminder-item { align-items: start; flex-direction: column; }
  .reminder-item-actions { width: 100%; justify-content: start; }
  .notification-row { align-items: stretch; flex-direction: column; }
  .notification-row button { width: 100%; }
  .midday-snapshot { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .midday-snapshot div:last-child { grid-column: 1 / -1; }
  .reset-capacity-buttons { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .midday-actions { grid-template-columns: 1fr; }
  .nudge-actions { grid-template-columns: 1fr; }
}


/* Mission 006 — mobile independence, hosted PWA and device lock */
.connection-pill { display: inline-flex; align-items: center; min-height: 30px; padding: 5px 10px; border-radius: 999px; background: var(--sage); color: var(--green); font-size: 11px; font-weight: 850; }
.connection-pill.offline { background: #f5e4dc; color: #9c4238; }
.independence-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.independence-panel, .security-panel, .backup-panel { align-content: start; }
.compact-status-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 8px 0 14px; }
.compact-status-grid div { display: grid; gap: 4px; padding: 13px; border-radius: 14px; background: var(--sage); }
.compact-status-grid span, .compact-status-grid strong { display: block; }
.compact-status-grid span { color: var(--muted); font-size: 11px; }
.compact-status-grid strong { overflow-wrap: anywhere; }
.security-status { padding: 13px 15px; border-radius: 14px; background: var(--sage); color: var(--green); font-weight: 800; }
.migration-note { margin-top: 18px; }
.form-error { min-height: 20px; margin: 0; color: #a43830; font-weight: 750; }
.lock-screen { position: fixed; inset: 0; z-index: 4000; display: grid; place-items: center; padding: max(22px, env(safe-area-inset-top)) 20px max(22px, env(safe-area-inset-bottom)); background: radial-gradient(circle at top right, #f4ddb0, transparent 36%), #f7f3e9; }
.lock-screen[hidden] { display: none; }
.lock-card { width: min(440px, 100%); display: grid; gap: 16px; padding: 32px; border: 1px solid var(--line); border-radius: 28px; background: #fffdf7; box-shadow: 0 24px 65px rgba(23,63,58,.18); text-align: center; }
.lock-card h1 { margin: 0; }
.lock-mark { margin: 0 auto; width: 64px; height: 64px; font-size: 26px; }
.lock-field { text-align: left; }
.lock-field input { min-height: 64px; text-align: center; font-size: 28px; letter-spacing: .25em; }
.lock-unlock-button { min-height: 58px; }
.lock-help { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
body.app-locked .app-shell { filter: blur(12px); pointer-events: none; user-select: none; }
.pin-dialog-card { max-width: 560px; }

@media (max-width: 980px) {
  .independence-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .connection-pill { display: none; }
  .lock-card { padding: 26px 20px; border-radius: 24px; }
  .compact-status-grid { grid-template-columns: 1fr 1fr; }
}


/* Compass Live v0.8.1 reliability and session duration controls */
.live-duration-picker { display: grid; gap: 10px; width: min(760px, 100%); margin: 22px auto 0; text-align: left; }
.live-duration-picker > span { color: var(--muted); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.live-duration-options { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.live-duration-button { min-height: 48px; padding: 10px 8px; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); color: var(--green); font-weight: 800; touch-action: manipulation; }
.live-duration-button.active { border-color: #c79640; background: var(--gold-soft); box-shadow: inset 0 0 0 2px rgba(214,166,80,.18); }
.live-duration-button:disabled { opacity: .7; }
.live-controls button { min-height: 52px; touch-action: manipulation; }
.live-stats { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 760px) {
  .live-duration-options { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .live-duration-button:nth-child(4), .live-duration-button:nth-child(5) { grid-column: span 1; }
  .live-controls { display: grid; grid-template-columns: 1fr 1fr; }
  .live-controls .primary-button { grid-column: 1 / -1; }
  .live-stats { grid-template-columns: 1fr 1fr; }
}

/* Mission 008 — Google Calendar and private Drive backup */
.heading-actions { display: flex; align-items: center; gap: 10px; }
.status-pill.connected { background: #d8efe4; color: #145b3b; }
.google-settings-panel { margin-top: 18px; }
.google-status-grid, .google-last-grid { margin-top: 14px; }
.google-primary-actions { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.google-primary-actions button { width: 100%; }
.google-sync-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 12px 0; }
.google-sync-actions button { min-height: 50px; }
.google-setup-details { margin-bottom: 0; }
.google-setup-form { display: grid; gap: 14px; padding: 16px 0 0; }
.google-session-panel { padding: 20px 22px; }
.calendar-list-panel { padding-top: 22px; }
.calendar-event-list { display: grid; gap: 10px; }
.calendar-event-item { display: grid; grid-template-columns: minmax(145px, .7fr) minmax(0, 1.8fr) auto; align-items: center; gap: 14px; padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: #fffef9; }
.calendar-event-time { color: var(--green-2); font-size: 12px; font-weight: 850; }
.calendar-event-body { display: grid; gap: 4px; min-width: 0; }
.calendar-event-body strong, .calendar-event-body small { overflow-wrap: anywhere; }
.calendar-event-body small { color: var(--muted); }
.calendar-event-actions { display: flex; align-items: center; gap: 8px; }
.calendar-event-actions .secondary-button { min-height: 40px; padding: 8px 12px; }
.calendar-source-row { display: flex; margin-bottom: 5px; }
.calendar-source-pill { display: inline-flex; padding: 4px 8px; border-radius: 999px; background: var(--sage); color: var(--green); font-size: 10px; font-weight: 850; letter-spacing: .04em; }
.calendar-page-heading { align-items: center; }

@media (max-width: 760px) {
  .heading-actions { gap: 6px; }
  .next-change-panel .heading-actions .text-button { padding-inline: 2px; font-size: 12px; }
  .calendar-page-heading { align-items: stretch; flex-direction: column; }
  .calendar-heading-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .calendar-heading-actions [data-nav="today"] { grid-column: 1 / -1; }
  .google-primary-actions, .google-sync-actions { grid-template-columns: 1fr; }
  .calendar-event-item { grid-template-columns: 1fr; gap: 8px; }
  .calendar-event-actions { width: 100%; }
  .calendar-event-actions .secondary-button { flex: 1; }
  .google-session-panel, .calendar-list-panel { padding: 16px; }
}
