:root {
  --paper: #f7fafc;
  --paper-deep: #edf3f8;
  --ink: #171a22;
  --muted: #566273;
  --line: rgba(23, 26, 34, .11);
  --surface: rgba(255, 255, 255, .84);
  --surface-strong: #ffffff;
  --trust: #16869a;
  --deep: #103f4a;
  --teal: #2fafd0;
  --coral: #d96b63;
  --amber: #c98118;
  --plum: #6a5578;
  --green: #1f8a5b;
  --shadow: 0 18px 46px rgba(24, 31, 45, .12);
  --soft-shadow: 0 10px 28px rgba(24, 31, 45, .08);
  --control-radius: 14px;
  --compact-radius: 12px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  background: #dfe6ee;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    linear-gradient(160deg, rgba(255,255,255,.78), rgba(255,255,255,0) 48%),
    linear-gradient(90deg, rgba(23,26,34,.026) 1px, transparent 1px),
    linear-gradient(180deg, rgba(23,26,34,.018) 1px, transparent 1px),
    #dfe6ee;
  background-size: auto, 34px 34px, 34px 34px, auto;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input,
textarea {
  font: inherit;
}

button {
  color: inherit;
  cursor: pointer;
  line-height: 1.2;
  transition: transform .16s ease, border-color .16s ease, background .16s ease, box-shadow .16s ease;
}

button:active {
  transform: translateY(1px) scale(.99);
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(47, 175, 208, .26);
  outline-offset: 2px;
}

.app-shell {
  width: min(100%, 520px);
  min-height: 100vh;
  margin: 0 auto;
  background:
    linear-gradient(180deg, rgba(255,255,255,.74), rgba(247,250,252,.97) 30%, #edf3f8 100%),
    linear-gradient(90deg, rgba(23,26,34,.018) 1px, transparent 1px),
    linear-gradient(180deg, rgba(23,26,34,.014) 1px, transparent 1px);
  background-size: auto, 26px 26px, 26px 26px;
  box-shadow: 0 0 80px rgba(26, 31, 45, .16);
}

.topbar {
  display: grid;
  grid-template-columns: 52px 1fr 54px;
  align-items: center;
  gap: 12px;
  padding: 22px 20px 12px;
}

.back-link,
.icon-button {
  min-height: 42px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--deep);
  background: rgba(255,255,255,.72);
  font-size: 11px;
  font-weight: 850;
  text-decoration: none;
}

.brand-lockup {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  position: relative;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  overflow: hidden;
  border-radius: 14px;
  background: linear-gradient(145deg, var(--deep), var(--trust) 54%, var(--coral));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.34), 0 12px 24px rgba(16,63,74,.18);
}

.brand-mark span {
  position: absolute;
  inset: 9px;
  border: 2px solid rgba(255,255,255,.66);
  border-radius: 50%;
}

.brand-mark i {
  position: absolute;
  right: 9px;
  bottom: 8px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ffb166;
  box-shadow: 0 0 0 2px rgba(23,26,34,.18);
}

.eyebrow {
  margin: 0;
  color: #5d6678;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.version-badge {
  display: inline-block;
  margin-left: 5px;
  padding: 3px 6px;
  border-radius: 7px;
  color: var(--deep);
  background: rgba(228,244,239,.95);
  font-size: 7px;
  vertical-align: 1px;
}

h1,
h2,
h3,
p {
  letter-spacing: 0;
}

.topbar h1 {
  margin: 2px 0 0;
  font-size: 22px;
  line-height: 1.05;
}

main {
  padding: 0 0 128px;
}

.date-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  padding: 12px 20px 16px;
  text-align: center;
}

.date-center {
  min-width: 176px;
}

.current-date {
  margin: 3px 0 0;
  font-size: 15px;
  font-weight: 750;
}

.round-button {
  width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--deep);
  background: rgba(255,255,255,.66);
  font-size: 15px;
  font-weight: 900;
}

.date-today-button {
  margin-top: 6px;
  padding: 5px 9px;
  border: 1px solid rgba(31,90,73,.14);
  border-radius: 999px;
  color: var(--deep);
  background: rgba(255,255,255,.76);
  font-size: 9px;
  font-weight: 850;
}

.date-banner {
  margin: 0 20px 14px;
  padding: 12px 14px;
  border: 1px solid rgba(201,129,24,.2);
  border-radius: 14px;
  color: #5f461e;
  background: rgba(255, 245, 229, .88);
  font-size: 12px;
  font-weight: 760;
  line-height: 1.35;
}

html[data-date-scope="future"] .date-banner {
  border-color: rgba(47,175,208,.22);
  color: #265466;
  background: rgba(235, 248, 252, .92);
}

.today-command {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 14px;
  margin: 0 16px 14px;
  padding: 20px;
  border: 1px solid rgba(16, 63, 74, .14);
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(255,255,255,.88), rgba(238,247,247,.9));
  box-shadow: var(--soft-shadow);
}

.today-command h2 {
  margin: 5px 0 6px;
  font-size: 25px;
  line-height: 1.05;
}

.today-command p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.quick-add-button {
  min-width: 116px;
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(135deg, var(--deep), var(--trust) 66%, var(--coral));
  box-shadow: 0 12px 28px rgba(16,63,74,.22);
  font-size: 13px;
  font-weight: 900;
}

.quick-add-button span {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 50%;
  background: rgba(255,255,255,.18);
  font-size: 18px;
}

.life-fab {
  position: fixed;
  z-index: 8;
  right: max(calc((100vw - 520px) / 2 + 18px), 18px);
  bottom: 86px;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255,255,255,.46);
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, var(--deep), var(--trust) 64%, var(--coral));
  box-shadow: 0 14px 30px rgba(16,63,74,.24);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px) scale(.96);
}

.life-fab.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.life-fab span {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  color: var(--deep);
  background: #fff;
  font-size: 23px;
  line-height: 1;
}

.life-fab b {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.suite-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 0 16px 16px;
}

.suite-card {
  min-height: 104px;
  display: grid;
  align-content: start;
  gap: 6px;
  padding: 12px 9px;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--ink);
  background: rgba(255,255,255,.72);
  text-align: center;
  text-decoration: none;
  box-shadow: 0 8px 22px rgba(24,31,45,.05);
}

.suite-card:hover {
  border-color: currentColor;
}

.suite-symbol {
  display: grid;
  width: 36px;
  height: 36px;
  margin: 0 auto 2px;
  place-items: center;
  border-radius: 13px;
  color: #fff;
  font-weight: 950;
}

.suite-symbol svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.suite-card strong {
  font-size: 12px;
}

.suite-card small {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.25;
}

.suite-card.home .suite-symbol {
  background: #2857e8;
}

.suite-card.mind .suite-symbol {
  background: #245c8f;
}

.suite-card.body .suite-symbol {
  background: #0f5f72;
}

.suite-card.money .suite-symbol {
  background: #146c43;
}

.schedule-band,
.needs-section,
.summary-section,
.assistant-section,
.profile-section,
.privacy-section,
.memory-section,
.idea-section,
.personal-section,
.context-section {
  margin: 0 16px 16px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.section-heading h2 {
  margin: 3px 0 0;
  font-size: 20px;
  line-height: 1.1;
}

.count-pill,
.text-button {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 9px;
  border: 1px solid rgba(16,63,74,.13);
  border-radius: 999px;
  color: var(--deep);
  background: rgba(255,255,255,.72);
  font-size: 10px;
  font-weight: 850;
}

.text-button {
  justify-content: center;
  min-width: 44px;
  min-height: 40px;
  padding: 8px 12px;
  text-align: center;
}

.schedule-list,
.task-list,
.memory-list,
.personal-list,
.timeline-list {
  display: grid;
  gap: 9px;
}

.schedule-item,
.task-item,
.privacy-control-card,
.memory-intro,
.memory-card,
.feedback-card,
.personal-item,
.timeline-item {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255,255,255,.74);
  box-shadow: 0 8px 22px rgba(24,31,45,.05);
}

.schedule-item {
  grid-template-columns: 70px 1fr;
  align-items: center;
}

.schedule-item time {
  color: var(--deep);
  font-size: 12px;
  font-weight: 900;
}

.schedule-item b,
.task-main b,
.personal-item b,
.timeline-item b {
  display: block;
  font-size: 13px;
}

.schedule-item span,
.task-main span,
.personal-item span,
.timeline-item span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
}

.empty-state {
  padding: 16px;
  border: 1px dashed rgba(16,63,74,.2);
  border-radius: 16px;
  color: var(--muted);
  background: rgba(255,255,255,.52);
  font-size: 12px;
  line-height: 1.45;
}

.task-item {
  grid-template-columns: auto 1fr auto;
  align-items: center;
}

.source-chip {
  display: inline-grid;
  min-width: 46px;
  min-height: 32px;
  place-items: center;
  border-radius: 10px;
  color: #fff;
  font-size: 10.5px;
  font-weight: 900;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.22);
}

.source-chip.Home {
  background: #2857e8;
}

.source-chip.Mind {
  background: #245c8f;
}

.source-chip.Body {
  background: #0b5964;
  color: #fff;
}

.source-chip.Money {
  background: #146c43;
}

.source-chip.Life {
  background: var(--coral);
}

.task-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
  max-width: 204px;
}

.task-actions button,
.task-actions a,
.personal-item button {
  min-width: 44px;
  min-height: 40px;
  padding: 7px 10px;
  border: 1px solid rgba(16,63,74,.13);
  border-radius: 12px;
  color: var(--deep);
  background: rgba(255,255,255,.78);
  font-size: 10px;
  font-weight: 850;
  text-decoration: none;
}

.task-actions .done-button,
.personal-item .done-button {
  color: #fff;
  border-color: var(--green);
  background: var(--green);
}

.task-actions .postpone-button {
  color: #5f461e;
  border-color: rgba(201,129,24,.2);
  background: rgba(255,245,229,.88);
}

.task-actions .decline-button {
  color: #5b4c63;
  border-color: rgba(106,85,120,.18);
  background: rgba(246,241,249,.92);
}

.task-status {
  display: inline-flex;
  width: fit-content;
  margin-top: 7px;
  padding: 4px 7px;
  border-radius: 999px;
  color: var(--deep);
  background: rgba(47,175,208,.12);
  font-size: 9px;
  font-style: normal;
  font-weight: 850;
}

.task-status.done {
  color: #146c43;
  background: rgba(31,138,91,.12);
}

.task-status.postponed {
  color: #5f461e;
  background: rgba(255,245,229,.92);
}

.task-status.notToday {
  color: #5b4c63;
  background: rgba(246,241,249,.95);
}

.task-item.done,
.task-item.postponed,
.task-item.notToday,
.personal-item.complete {
  opacity: .66;
  background: rgba(231, 241, 237, .82);
}

.task-item.postponed {
  background: rgba(255, 250, 242, .84);
}

.task-item.notToday {
  background: rgba(248, 246, 250, .86);
}

.summary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.summary-panel {
  min-height: 140px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: rgba(255,255,255,.72);
  box-shadow: 0 8px 22px rgba(24,31,45,.05);
}

.summary-panel.concern {
  grid-column: 1 / -1;
  min-height: 112px;
  background: linear-gradient(145deg, rgba(255,255,255,.78), rgba(255,245,238,.84));
}

.summary-panel ul {
  display: grid;
  gap: 7px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.summary-panel li {
  color: var(--ink);
  font-size: 11px;
  line-height: 1.35;
}

.summary-panel h3 {
  margin: 9px 0 5px;
  font-size: 15px;
}

.summary-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.assistant-section {
  padding: 16px;
  border-block: 1px solid rgba(16,63,74,.14);
  background: rgba(255,255,255,.54);
}

.ai-scope-control {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
  margin-bottom: 12px;
}

.ai-scope-control button {
  min-width: 44px;
  min-height: 40px;
  padding: 7px 8px;
  border: 1px solid rgba(16,63,74,.14);
  border-radius: var(--compact-radius);
  color: var(--deep);
  background: rgba(255,255,255,.82);
  box-shadow: 0 6px 14px rgba(24,31,45,.035);
  font-size: 10px;
  font-weight: 850;
  line-height: 1.2;
}

.ai-scope-control button.selected {
  color: #fff;
  border-color: var(--deep);
  background: linear-gradient(135deg, var(--deep), #0f5964);
  box-shadow: 0 10px 22px rgba(16,63,74,.16);
}

.ai-messages {
  max-height: 440px;
  display: grid;
  gap: 10px;
  overflow-y: auto;
  padding: 4px 0 12px;
}

.ai-message {
  max-width: 92%;
  padding: 11px 12px;
  border-left: 3px solid var(--trust);
  border-radius: var(--control-radius);
  color: var(--ink);
  background: rgba(235,248,252,.78);
  box-shadow: 0 8px 18px rgba(24,31,45,.045);
  font-size: 12px;
  line-height: 1.5;
}

.ai-message.user {
  justify-self: end;
  border-left: 0;
  border-right: 3px solid var(--coral);
  background: rgba(255,245,238,.86);
}

.ai-message-content {
  margin: 0;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.ai-message-meta {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 850;
  text-transform: uppercase;
}

.ai-feedback-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 9px;
}

.ai-feedback-actions button {
  min-width: 44px;
  min-height: 40px;
  padding: 5px 8px;
  border: 1px solid rgba(16,63,74,.14);
  border-radius: var(--compact-radius);
  color: var(--deep);
  background: rgba(255,255,255,.86);
  font-size: 9px;
  font-weight: 850;
}

.ai-feedback-actions button.saved {
  color: #fff;
  background: var(--green);
}

.ai-correction {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.ai-correction textarea {
  min-height: 70px;
  border-radius: var(--compact-radius);
  font-size: 11px;
}

.ai-correction button,
.ai-form button {
  min-height: 42px;
  padding: 0 12px;
  border: 0;
  border-radius: var(--control-radius);
  color: #fff;
  background: linear-gradient(135deg, var(--deep), #0f5964);
  box-shadow: 0 10px 22px rgba(16,63,74,.14);
  font-size: 10px;
  font-weight: 900;
}

.ai-receipt {
  margin: 0 0 10px;
  padding: 9px 10px;
  border-left: 3px solid var(--green);
  color: var(--muted);
  background: rgba(231,241,237,.72);
  font-size: 10px;
  font-weight: 760;
  line-height: 1.4;
}

.ai-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: end;
}

.ai-form label {
  grid-column: 1 / -1;
}

.ai-form textarea {
  min-height: 80px;
  border-radius: var(--control-radius);
}

.ai-form button {
  min-width: 94px;
  min-height: 44px;
  align-self: end;
}

.profile-section {
  padding: 16px;
  border-block: 1px solid rgba(16,63,74,.14);
  background: rgba(245,187,73,.08);
}

.profile-prompt {
  display: grid;
  gap: 10px;
  min-height: 108px;
  padding: 14px;
  border: 1px solid rgba(201,129,24,.2);
  border-radius: var(--control-radius);
  background: rgba(255,255,255,.78);
}

.profile-prompt strong,
.profile-prompt span {
  display: block;
}

.profile-prompt strong {
  font-size: 13px;
  line-height: 1.3;
}

.profile-prompt span {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

.profile-prompt-actions,
.profile-answer-options {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.profile-prompt button {
  min-width: 44px;
  min-height: 40px;
  padding: 7px 10px;
  border: 1px solid rgba(16,63,74,.16);
  border-radius: var(--compact-radius);
  color: var(--deep);
  background: rgba(255,255,255,.9);
  font-size: 10px;
  font-weight: 850;
}

.profile-prompt button.primary-profile-action,
.profile-answer-options button {
  color: #fff;
  border-color: var(--deep);
  background: linear-gradient(135deg, var(--deep), #0f5964);
}

.memory-intro {
  margin-bottom: 10px;
  border-color: rgba(217,107,99,.18);
  background: linear-gradient(145deg, rgba(255,255,255,.76), rgba(255,245,238,.86));
}

.privacy-control-card {
  gap: 10px;
  border-color: rgba(16,63,74,.14);
  background: linear-gradient(145deg, rgba(255,255,255,.78), rgba(235,248,252,.76));
}

.privacy-copy strong,
.privacy-copy span {
  display: block;
}

.privacy-copy strong {
  font-size: 13px;
}

.privacy-copy span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.toggle-row {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(16,63,74,.1);
  border-radius: 14px;
  color: var(--ink);
  background: rgba(255,255,255,.66);
}

.toggle-row input {
  width: 24px;
  min-height: 24px;
  accent-color: var(--trust);
}

.toggle-row b,
.toggle-row small {
  display: block;
}

.toggle-row b {
  font-size: 12px;
}

.toggle-row small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
}

.screen-rules-panel {
  display: grid;
  gap: 9px;
  padding: 12px;
  border: 1px solid rgba(16,63,74,.12);
  border-radius: 14px;
  background: rgba(255,255,255,.74);
}

.screen-rules-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.screen-rules-heading b,
.screen-rules-heading span {
  display: block;
}

.screen-rules-heading b {
  font-size: 13px;
}

.screen-rules-heading span:not(.count-pill) {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}

.screen-rule-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.screen-rule-options button {
  min-height: 40px;
  min-width: 44px;
  padding: 7px 8px;
  border: 1px solid rgba(16,63,74,.14);
  border-radius: var(--compact-radius);
  color: var(--deep);
  background: rgba(255,255,255,.78);
  font-size: 10px;
  font-weight: 900;
}

.screen-rule-options button.selected {
  color: #fff;
  border-color: var(--deep);
  background: linear-gradient(135deg, var(--deep), #0f5964);
  box-shadow: 0 10px 22px rgba(16,63,74,.14);
}

.screen-rule-summary {
  margin: 0;
  padding: 10px;
  border-left: 3px solid var(--trust);
  border-radius: 10px;
  color: var(--muted);
  background: rgba(235,248,252,.76);
  font-size: 10px;
  font-weight: 760;
  line-height: 1.45;
}

.export-code-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.export-code-row span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.cloud-account-panel {
  display: grid;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid rgba(16,63,74,.1);
}

.cloud-account-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.cloud-backup-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.cloud-account-status b,
.cloud-account-status span,
.cloud-account-panel small {
  display: block;
}

.cloud-account-status b {
  color: var(--ink);
  font-size: 13px;
}

.cloud-account-status span,
.cloud-account-panel small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.4;
}

.cloud-auth-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.cloud-auth-form label {
  align-self: end;
}

.cloud-auth-form input {
  min-width: 0;
}

.cloud-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cloud-actions button:not(.text-button) {
  min-height: 40px;
  min-width: 44px;
  padding: 0 12px;
  border: 0;
  border-radius: 14px;
  color: #fff;
  background: var(--deep);
  font-size: 10px;
  font-weight: 900;
}

.cloud-account-rights {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cloud-account-rights a {
  text-decoration: none;
}

.text-button.danger-text {
  border-color: rgba(152, 42, 42, .28);
  color: #8b2020;
  background: rgba(255, 244, 244, .9);
}

.privacy-page-body {
  min-height: 100vh;
  background: #f4f7f4;
}

.privacy-page {
  width: min(980px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 64px;
  color: var(--ink);
}

.privacy-page-header,
.privacy-page section {
  padding: 20px 0;
  border-bottom: 1px solid rgba(16, 63, 74, .14);
}

.privacy-page h1 {
  margin: 6px 0 10px;
  font-size: 44px;
  letter-spacing: 0;
}

@media (max-width: 600px) {
  .privacy-page h1 { font-size: 32px; }
}

.privacy-page h2 {
  margin: 0 0 10px;
  font-size: 21px;
  letter-spacing: 0;
}

.privacy-page p,
.privacy-page li,
.privacy-page td,
.privacy-page th {
  line-height: 1.55;
}

.privacy-page li + li {
  margin-top: 8px;
}

.privacy-page a {
  color: var(--deep);
  font-weight: 850;
}

.privacy-table-wrap {
  overflow-x: auto;
}

.privacy-page table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  font-size: 13px;
}

.privacy-page th,
.privacy-page td {
  padding: 12px;
  border: 1px solid rgba(16, 63, 74, .14);
  text-align: left;
  vertical-align: top;
}

.privacy-page th {
  background: rgba(16, 63, 74, .07);
}

.memory-intro strong,
.memory-intro span {
  display: block;
}

.memory-intro strong {
  font-size: 13px;
}

.memory-intro span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.inline-form,
.note-form,
.memory-form,
.feedback-form,
.export-code-form {
  display: grid;
  gap: 8px;
  margin-bottom: 11px;
}

label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.inline-form div {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--ink);
  background: rgba(255,255,255,.76);
  font-size: 13px;
}

input,
select {
  min-height: 42px;
  padding: 0 12px;
}

textarea {
  min-height: 104px;
  padding: 12px;
  resize: vertical;
  line-height: 1.45;
}

.inline-form button,
.note-form button,
.memory-form button,
.feedback-form > button {
  min-height: 42px;
  padding: 0 14px;
  border: 0;
  border-radius: 14px;
  color: #fff;
  background: var(--deep);
  font-size: 11px;
  font-weight: 900;
}

.form-row {
  display: grid;
  grid-template-columns: 82px 1fr auto;
  align-items: center;
  gap: 8px;
}

.feedback-options {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.feedback-options button {
  min-height: 40px;
  min-width: 44px;
  padding: 7px 10px;
  border: 1px solid rgba(16,63,74,.13);
  border-radius: 999px;
  color: var(--deep);
  background: rgba(255,255,255,.76);
  font-size: 10px;
  font-weight: 850;
}

.feedback-options button.selected {
  color: #fff;
  border-color: var(--deep);
  background: var(--deep);
}

.memory-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 10px;
}

.memory-card-stack,
.feedback-card-stack {
  display: grid;
  gap: 8px;
}

.memory-card {
  grid-template-columns: 1fr auto;
  align-items: center;
}

.feedback-card {
  background: rgba(255,255,255,.58);
}

.memory-kind {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 5px;
  padding: 4px 7px;
  border-radius: 999px;
  color: #5b4c63;
  background: rgba(246,241,249,.95);
  font-size: 9px;
  font-weight: 900;
}

.idea-section {
  padding-top: 4px;
}

.idea-form,
.idea-link-form {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
  padding: 13px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.idea-field-grid,
.idea-link-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.idea-field-grid label,
.idea-link-grid label {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.idea-options,
.idea-form-actions,
.idea-card-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.idea-options label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
}

.idea-options input {
  width: 22px;
  min-height: 22px;
  margin: 0;
}

.idea-form-actions button,
.idea-link-form > button {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--deep);
  border-radius: var(--compact-radius);
  color: #fff;
  background: linear-gradient(135deg, var(--deep), #0f5964);
  box-shadow: 0 10px 22px rgba(16,63,74,.12);
  font-size: 11px;
  font-weight: 900;
}

.idea-form-actions .quiet-action {
  color: var(--deep);
  background: transparent;
}

.idea-link-form > button:disabled {
  opacity: .48;
  cursor: not-allowed;
  box-shadow: none;
}

.idea-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px;
  gap: 5px 8px;
  margin-bottom: 10px;
}

.idea-toolbar label:last-of-type {
  grid-column: 2;
  grid-row: 1;
}

.idea-list,
.idea-edge-list {
  display: grid;
  gap: 8px;
}

.idea-card {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--trust);
  border-radius: var(--compact-radius);
  background: rgba(255, 255, 255, .78);
  box-shadow: var(--soft-shadow);
}

.idea-card.pinned {
  border-left-color: var(--amber);
}

.idea-card-heading,
.idea-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  color: var(--muted);
  font-size: 10px;
}

.idea-type,
.idea-status,
.idea-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 23px;
  padding: 3px 7px;
  border-radius: 6px;
  color: var(--deep);
  background: rgba(22, 134, 154, .09);
  font-size: 9px;
  font-weight: 850;
  text-transform: capitalize;
}

.idea-status {
  color: #5b3d09;
  background: rgba(201, 129, 24, .12);
}

.idea-card h3 {
  margin: 9px 0 5px;
  overflow-wrap: anywhere;
  font-size: 15px;
  line-height: 1.25;
}

.idea-card > p {
  margin: 0 0 9px;
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.48;
  white-space: pre-wrap;
}

.idea-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 8px 0;
}

.idea-card-meta {
  justify-content: flex-start;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.idea-card-actions {
  justify-content: flex-end;
  margin-top: 9px;
}

.idea-card-actions button {
  min-width: 44px;
  min-height: 40px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: var(--compact-radius);
  color: var(--deep);
  background: rgba(255, 255, 255, .74);
  font-size: 10px;
  font-weight: 850;
}

.idea-card-actions .danger-text {
  color: #8b2c28;
}

.idea-link-form {
  margin-top: 18px;
}

.idea-edge {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: var(--compact-radius);
  background: rgba(255, 255, 255, .6);
}

.idea-edge > div {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 7px;
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 11px;
}

.idea-edge span,
.idea-edge small {
  color: var(--muted);
}

.idea-edge small {
  flex-basis: 100%;
}

.idea-edge button {
  width: 44px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--compact-radius);
  color: #8b2c28;
  background: rgba(255, 255, 255, .76);
  font-weight: 900;
}

.memory-card b,
.feedback-card b {
  display: block;
  font-size: 12px;
  line-height: 1.25;
}

.memory-card small,
.feedback-card small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
}

.memory-card button {
  min-height: 40px;
  min-width: 44px;
  padding: 7px 10px;
  border: 1px solid rgba(106,85,120,.18);
  border-radius: 12px;
  color: #5b4c63;
  background: rgba(246,241,249,.92);
  font-size: 10px;
  font-weight: 850;
}

.personal-item {
  grid-template-columns: 1fr auto;
  align-items: center;
}

.timeline-item {
  grid-template-columns: 54px 1fr;
  align-items: start;
}

.timeline-item time {
  color: var(--deep);
  font-size: 10px;
  font-weight: 900;
}

.privacy-line {
  display: inline-flex;
  width: fit-content;
  margin-top: 6px;
  padding: 4px 7px;
  border-radius: 999px;
  color: #315662;
  background: rgba(47,175,208,.12);
  font-size: 9px;
  font-weight: 850;
}

.sheet-backdrop {
  position: fixed;
  z-index: 30;
  inset: 0;
  display: grid;
  align-items: end;
  justify-items: center;
  padding: 16px;
  background: rgba(17, 24, 39, .38);
}

.sheet {
  width: min(100%, 520px);
  max-height: min(88vh, 780px);
  overflow: auto;
  padding: 20px;
  border: 1px solid rgba(255,255,255,.46);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.96), rgba(247,250,252,.96)),
    #fff;
  box-shadow: var(--shadow);
}

.sheet-heading {
  position: sticky;
  top: -20px;
  z-index: 2;
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  margin: -20px -20px 14px;
  padding: 20px 20px 12px;
  border-bottom: 1px solid rgba(23, 26, 34, .07);
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(14px);
}

.sheet-heading h2 {
  margin: 4px 0 0;
  font-size: 22px;
  line-height: 1.1;
}

.onboarding-sheet {
  max-height: min(92vh, 820px);
}

.onboarding-progress {
  display: grid;
  gap: 6px;
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
}

.onboarding-progress > div {
  height: 5px;
  overflow: hidden;
  border-radius: 3px;
  background: rgba(16,63,74,.1);
}

.onboarding-progress i {
  display: block;
  width: 25%;
  height: 100%;
  background: var(--trust);
  transition: width .18s ease;
}

.onboarding-optional-note {
  margin: -4px 0 14px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

.onboarding-step {
  min-width: 0;
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  border: 0;
}

.onboarding-step legend {
  margin-bottom: 12px;
  color: var(--ink);
  font-size: 18px;
  font-weight: 900;
}

.onboarding-step label small,
.field-label small {
  margin-left: 4px;
  font-weight: 700;
}

.field-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.onboarding-step textarea {
  min-height: 86px;
  border-radius: var(--compact-radius);
}

.onboarding-step input,
.onboarding-step select {
  border-radius: var(--compact-radius);
}

.onboarding-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.onboarding-choice-grid label {
  min-width: 0;
  display: grid;
}

.onboarding-choice-grid input {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 1px;
  opacity: 0;
}

.onboarding-choice-grid span {
  min-height: 42px;
  display: grid;
  place-items: center;
  padding: 7px 8px;
  border: 1px solid rgba(16,63,74,.14);
  border-radius: var(--compact-radius);
  color: var(--deep);
  background: rgba(255,255,255,.82);
  font-size: 10px;
  font-weight: 850;
  line-height: 1.25;
  text-align: center;
}

.onboarding-choice-grid input:checked + span {
  color: #fff;
  border-color: var(--deep);
  background: linear-gradient(135deg, var(--deep), #0f5964);
  box-shadow: 0 10px 22px rgba(16,63,74,.12);
}

.onboarding-choice-grid input:focus-visible + span,
.onboarding-radio-list input:focus-visible + span {
  outline: 3px solid rgba(47,175,208,.26);
  outline-offset: 2px;
}

.onboarding-note {
  margin: 0;
  padding: 11px;
  border-left: 3px solid var(--trust);
  color: var(--muted);
  background: rgba(235,248,252,.72);
  font-size: 10px;
  line-height: 1.5;
}

.onboarding-radio-list {
  display: grid;
  gap: 9px;
}

.onboarding-radio-list label {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 10px;
  padding: 11px;
  border: 1px solid rgba(16,63,74,.14);
  border-radius: var(--compact-radius);
  background: rgba(255,255,255,.8);
}

.onboarding-radio-list input {
  width: 19px;
  min-height: 19px;
  accent-color: var(--trust);
}

.onboarding-radio-list b,
.onboarding-radio-list small {
  display: block;
}

.onboarding-radio-list b {
  color: var(--ink);
  font-size: 12px;
}

.onboarding-radio-list small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.4;
}

.onboarding-actions {
  display: grid;
  grid-template-columns: auto auto 1fr;
}

.onboarding-actions .primary-action {
  grid-column: -2 / -1;
}

.quick-add-wheel {
  position: relative;
  width: min(100%, 292px);
  aspect-ratio: 1;
  margin: 4px auto 14px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, rgba(255,255,255,.95) 0 31%, rgba(255,255,255,0) 32%),
    conic-gradient(from 10deg, rgba(217,107,99,.22), rgba(47,175,208,.2), rgba(31,138,91,.18), rgba(201,129,24,.18), rgba(106,85,120,.18), rgba(217,107,99,.22));
}

.quick-add-wheel::before {
  content: "";
  position: absolute;
  inset: 20px;
  border: 1px solid rgba(16,63,74,.1);
  border-radius: 50%;
}

.wheel-center,
.wheel-option {
  position: absolute;
  display: grid;
  place-items: center;
  border: 1px solid rgba(16,63,74,.12);
  color: var(--ink);
  background: rgba(255,255,255,.9);
  box-shadow: 0 10px 24px rgba(24,31,45,.08);
}

.wheel-center {
  left: 50%;
  top: 50%;
  width: 86px;
  height: 86px;
  padding: 10px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.wheel-option {
  left: calc(50% + (var(--x) * 1px));
  top: calc(50% + (var(--y) * 1px));
  width: 64px;
  height: 64px;
  padding: 7px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.wheel-center b,
.wheel-option b,
.wheel-center small,
.wheel-option small {
  display: block;
  text-align: center;
  line-height: 1.08;
}

.wheel-center b {
  font-size: 12px;
}

.wheel-option b {
  font-size: 10px;
}

.wheel-center small,
.wheel-option small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 850;
}

.wheel-center.selected,
.wheel-option.selected {
  color: #fff;
  border-color: rgba(255,255,255,.7);
  background: linear-gradient(135deg, var(--deep), var(--trust) 66%, var(--coral));
  box-shadow: 0 16px 34px rgba(16,63,74,.22);
}

.wheel-center.selected small,
.wheel-option.selected small {
  color: rgba(255,255,255,.78);
}

.wheel-option.food,
.wheel-option.water,
.wheel-option.med {
  border-color: rgba(22,134,154,.18);
}

.wheel-option.mind {
  border-color: rgba(36,92,143,.18);
}

.wheel-option.money {
  border-color: rgba(20,108,67,.18);
}

.wheel-option.home {
  border-color: rgba(40,87,232,.18);
}

.wheel-option.schedule,
.wheel-option.personal {
  border-color: rgba(217,107,99,.2);
}

.quick-type-summary {
  margin: -2px 0 12px;
  padding: 12px;
  border: 1px solid rgba(47,175,208,.16);
  border-radius: 15px;
  background: rgba(235,248,252,.78);
}

.quick-type-summary strong,
.quick-type-summary span {
  display: block;
}

.quick-type-summary strong {
  font-size: 12px;
}

.quick-type-summary span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.quick-app-panel {
  margin: 0 0 12px;
  padding: 13px;
  border: 1px solid rgba(22,134,154,.16);
  border-radius: 17px;
  background: linear-gradient(145deg, rgba(255,255,255,.78), rgba(235,248,252,.82));
}

.app-panel-heading {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 12px;
  margin-bottom: 10px;
}

.app-panel-heading h3 {
  margin: 4px 0 0;
  font-size: 15px;
  line-height: 1.15;
}

.app-panel-heading > span {
  padding: 6px 8px;
  border-radius: 999px;
  color: #315662;
  background: rgba(255,255,255,.8);
  font-size: 8px;
  font-weight: 900;
  white-space: nowrap;
}

.quick-suggestion-block {
  display: grid;
  gap: 7px;
  margin-bottom: 10px;
}

.quick-panel-label {
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
}

.quick-suggestion-grid,
.consumed-results,
.water-amount-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.quick-suggestion-grid button,
.consumed-results button,
.water-amount-grid button {
  min-height: 40px;
  min-width: 44px;
  padding: 8px 10px;
  border: 1px solid rgba(22,134,154,.14);
  border-radius: 12px;
  color: var(--deep);
  background: rgba(255,255,255,.82);
  font-size: 10px;
  font-weight: 850;
  text-align: left;
}

.quick-suggestion-grid button:first-child,
.water-amount-grid button:first-child {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--deep), var(--trust));
}

.consumed-search {
  display: grid;
  gap: 7px;
  margin: 0 0 10px;
}

.consumed-search input,
.custom-water-row input {
  min-height: 39px;
  border-radius: 12px;
  font-size: 12px;
}

.consumed-results:empty {
  display: none;
}

.custom-water-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-top: 8px;
}

.custom-water-row button {
  min-height: 39px;
  padding: 8px 12px;
  border: 0;
  border-radius: 12px;
  color: #fff;
  background: var(--deep);
  font-size: 10px;
  font-weight: 900;
}

.food-action-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.food-action-grid button,
.food-action-grid a {
  min-height: 62px;
  display: grid;
  align-content: center;
  padding: 11px;
  border: 1px solid rgba(22,134,154,.16);
  border-radius: 14px;
  color: var(--deep);
  background: rgba(255,255,255,.82);
  text-align: left;
  text-decoration: none;
}

.food-action-grid button:first-child {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--deep), var(--trust));
}

.food-action-grid b,
.food-action-grid small {
  display: block;
}

.food-action-grid b {
  font-size: 11px;
}

.food-action-grid small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.35;
}

.food-action-grid button:first-child small {
  color: rgba(255,255,255,.78);
}

.med-choice-list {
  display: grid;
  gap: 8px;
}

.med-choice-list article {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(22,134,154,.14);
  border-radius: 14px;
  background: rgba(255,255,255,.82);
}

.med-choice-list b,
.med-choice-list small {
  display: block;
}

.med-choice-list b {
  font-size: 12px;
}

.med-choice-list small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.35;
}

.med-choice-list button {
  min-height: 40px;
  min-width: 44px;
  padding: 7px 10px;
  border: 0;
  border-radius: 12px;
  color: #fff;
  background: var(--green);
  font-size: 10px;
  font-weight: 900;
}

.quick-activity-shelf {
  display: grid;
  gap: 8px;
  margin-top: 13px;
  padding-top: 12px;
  border-top: 1px solid rgba(22,134,154,.14);
}

.quick-activity-shelf-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 10px;
}

.quick-activity-shelf-heading small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  text-align: right;
}

.quick-activity-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.quick-activity-card {
  min-height: 94px;
  display: grid;
  align-content: start;
  gap: 4px;
  padding: 10px;
  border: 1px solid rgba(22,134,154,.16);
  border-radius: 14px;
  color: var(--ink);
  background: rgba(255,255,255,.84);
  text-align: left;
  box-shadow: 0 8px 18px rgba(24,31,45,.05);
}

.quick-activity-card:hover {
  border-color: rgba(22,134,154,.32);
  box-shadow: 0 12px 26px rgba(24,31,45,.09);
}

.quick-activity-card span,
.quick-activity-card b,
.quick-activity-card small,
.quick-activity-card em {
  display: block;
}

.quick-activity-card span,
.quick-activity-card em {
  width: fit-content;
  padding: 3px 6px;
  border-radius: 999px;
  font-size: 7px;
  font-style: normal;
  font-weight: 950;
  text-transform: uppercase;
}

.quick-activity-card span {
  color: #315662;
  background: rgba(235,248,252,.9);
}

.quick-activity-card b {
  font-size: 11px;
  line-height: 1.15;
}

.quick-activity-card small {
  color: var(--muted);
  font-size: 8px;
  line-height: 1.35;
}

.quick-activity-card em {
  margin-top: auto;
  color: rgba(16,63,74,.78);
  background: rgba(245,187,73,.2);
}

.quick-activity-form {
  display: grid;
  gap: 10px;
}

.activity-field {
  display: grid;
  gap: 6px;
}

.activity-field span {
  color: var(--deep);
  font-size: 10px;
  font-weight: 900;
}

.activity-field small {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.35;
}

.activity-field input,
.activity-field select,
.activity-field textarea {
  width: 100%;
  min-height: 39px;
  border-radius: 12px;
  font-size: 12px;
}

.activity-field textarea {
  resize: vertical;
}

.range-field input {
  min-height: 24px;
  padding: 0;
  accent-color: var(--trust);
}

.route-preview.mini {
  margin: 2px 0 0;
  padding: 10px;
}

.quick-activity-actions {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
  align-items: center;
}

.quick-activity-actions .primary-action,
.quick-activity-actions .quiet-action {
  min-height: 44px;
  white-space: nowrap;
}

.quick-activity-actions .link-action {
  display: grid;
  place-items: center;
  padding: 0 12px;
  text-decoration: none;
}

.app-panel-note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.45;
}

.close-sheet {
  flex: 0 0 auto;
  font-size: 0;
}

.close-sheet::before {
  content: "\00d7";
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
}

.route-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 10px 0;
}

.route-chip {
  min-width: 44px;
  min-height: 40px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--deep);
  background: rgba(255,255,255,.74);
  font-size: 11px;
  font-weight: 850;
}

.route-chip.selected {
  color: #fff;
  border-color: var(--deep);
  background: var(--deep);
}

.privacy-picker {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
  margin: 10px 0;
}

.privacy-chip {
  min-width: 44px;
  min-height: 40px;
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--deep);
  background: rgba(255,255,255,.74);
  font-size: 10px;
  font-weight: 850;
}

.privacy-chip.selected {
  color: #fff;
  border-color: var(--deep);
  background: var(--deep);
}

.privacy-chip[data-privacy-mode="vault"].selected {
  background: #5b4c63;
}

.privacy-chip[data-privacy-mode="sealed"].selected {
  background: #171a22;
}

.route-preview {
  margin: 10px 0;
  padding: 12px;
  border: 1px solid rgba(47,175,208,.18);
  border-radius: 15px;
  background: rgba(235, 248, 252, .8);
}

.route-preview strong,
.route-preview span {
  display: block;
}

.route-preview strong {
  font-size: 12px;
}

.route-preview span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.privacy-preview {
  border-color: rgba(106,85,120,.16);
  background: rgba(246,241,249,.72);
}

.check-row {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 9px;
  margin: 12px 0;
  color: var(--ink);
}

.check-row input {
  width: 22px;
  min-height: 22px;
}

.sheet-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}

.primary-action,
.quiet-action {
  min-height: 44px;
  padding: 0 14px;
  border-radius: 14px;
  font-size: 12px;
  font-weight: 900;
}

.primary-action {
  flex: 1;
  border: 0;
  color: #fff;
  background: var(--deep);
}

.quiet-action {
  border: 1px solid var(--line);
  color: var(--deep);
  background: rgba(255,255,255,.78);
}

.checkin-fields {
  display: grid;
  gap: 8px;
}

input[type="range"] {
  padding: 0;
  accent-color: var(--trust);
}

.toast {
  position: fixed;
  z-index: 40;
  left: 50%;
  bottom: 18px;
  width: min(calc(100% - 32px), 480px);
  transform: translateX(-50%);
  padding: 13px 15px;
  border: 1px solid rgba(255,255,255,.5);
  border-radius: 16px;
  color: #fff;
  background: rgba(16,63,74,.96);
  box-shadow: var(--shadow);
  font-size: 12px;
  font-weight: 760;
  line-height: 1.35;
}

@media (max-width: 430px) {
  .topbar {
    grid-template-columns: 48px 1fr 50px;
    padding-inline: 14px;
  }

  .today-command {
    grid-template-columns: 1fr;
  }

  .quick-add-button {
    width: 100%;
  }

  .suite-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .task-item {
    grid-template-columns: auto 1fr;
  }

  .task-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
    max-width: none;
  }

  .summary-grid {
    grid-template-columns: 1fr;
  }

  .summary-panel.concern {
    grid-column: auto;
  }

  .ai-scope-control {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ai-form {
    grid-template-columns: 1fr;
  }

  .ai-form button {
    min-height: 42px;
  }

  .life-fab {
    right: max(calc((100vw - 520px) / 2 + 14px), 14px);
    bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .memory-form button,
  .feedback-form > button {
    width: 100%;
  }

  .idea-field-grid,
  .idea-link-grid,
  .idea-toolbar {
    grid-template-columns: 1fr;
  }

  .idea-toolbar label:last-of-type {
    grid-column: auto;
    grid-row: auto;
  }

  .food-action-grid,
  .quick-activity-grid,
  .quick-suggestion-grid,
  .consumed-results,
  .water-amount-grid {
    grid-template-columns: 1fr;
  }

  .quick-activity-actions {
    grid-template-columns: 1fr;
  }

  .privacy-picker {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .onboarding-choice-grid {
    grid-template-columns: 1fr;
  }

  .onboarding-actions {
    grid-template-columns: 1fr 1fr;
  }

  .onboarding-actions .primary-action {
    grid-column: 1 / -1;
  }
}

@media (max-width: 360px) {
  .sheet {
    padding-inline: 16px;
  }

  .quick-add-wheel {
    width: min(100%, 248px);
  }

  .wheel-center {
    width: 78px;
    height: 78px;
  }

  .wheel-option {
    width: 58px;
    height: 58px;
  }

  .wheel-option[data-quick-type="food"] { --x: 0 !important; --y: -86 !important; }
  .wheel-option[data-quick-type="water"] { --x: 61 !important; --y: -61 !important; }
  .wheel-option[data-quick-type="med"] { --x: 86 !important; --y: 0 !important; }
  .wheel-option[data-quick-type="mind"] { --x: 61 !important; --y: 61 !important; }
  .wheel-option[data-quick-type="money"] { --x: 0 !important; --y: 86 !important; }
  .wheel-option[data-quick-type="home"] { --x: -61 !important; --y: 61 !important; }
  .wheel-option[data-quick-type="schedule"] { --x: -86 !important; --y: 0 !important; }
  .wheel-option[data-quick-type="personal"] { --x: -61 !important; --y: -61 !important; }
}
