/* AurelyStudio Manifestation & Action Planner — visual shell */
@font-face { font-family: "Cormorant Garamond"; src: url("./assets/fonts/cormorant-garamond-latin-400-normal.woff2") format("woff2"); font-style: normal; font-weight: 400; font-display: swap; }
@font-face { font-family: "Cormorant Garamond"; src: url("./assets/fonts/cormorant-garamond-latin-600-normal.woff2") format("woff2"); font-style: normal; font-weight: 600; font-display: swap; }
@font-face { font-family: "Cormorant Garamond"; src: url("./assets/fonts/cormorant-garamond-latin-700-normal.woff2") format("woff2"); font-style: normal; font-weight: 700; font-display: swap; }
@font-face { font-family: "Nunito Sans"; src: url("./assets/fonts/nunito-sans-latin-400-normal.woff2") format("woff2"); font-style: normal; font-weight: 400; font-display: swap; }
@font-face { font-family: "Nunito Sans"; src: url("./assets/fonts/nunito-sans-latin-600-normal.woff2") format("woff2"); font-style: normal; font-weight: 600; font-display: swap; }
@font-face { font-family: "Nunito Sans"; src: url("./assets/fonts/nunito-sans-latin-700-normal.woff2") format("woff2"); font-style: normal; font-weight: 700; font-display: swap; }
@font-face { font-family: "Inter"; src: url("./assets/fonts/inter-latin-400-normal.woff2") format("woff2"); font-style: normal; font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url("./assets/fonts/inter-latin-600-normal.woff2") format("woff2"); font-style: normal; font-weight: 600; font-display: swap; }
@font-face { font-family: "Inter"; src: url("./assets/fonts/inter-latin-700-normal.woff2") format("woff2"); font-style: normal; font-weight: 700; font-display: swap; }
@font-face { font-family: "Lora"; src: url("./assets/fonts/lora-latin-400-normal.woff2") format("woff2"); font-style: normal; font-weight: 400; font-display: swap; }
@font-face { font-family: "Lora"; src: url("./assets/fonts/lora-latin-600-normal.woff2") format("woff2"); font-style: normal; font-weight: 600; font-display: swap; }
@font-face { font-family: "Lora"; src: url("./assets/fonts/lora-latin-700-normal.woff2") format("woff2"); font-style: normal; font-weight: 700; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible"; src: url("./assets/fonts/atkinson-hyperlegible-latin-400-normal.woff2") format("woff2"); font-style: normal; font-weight: 400; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible"; src: url("./assets/fonts/atkinson-hyperlegible-latin-700-normal.woff2") format("woff2"); font-style: normal; font-weight: 700; font-display: swap; }
@font-face { font-family: "Kalam"; src: url("./assets/fonts/kalam-latin-400-normal.woff2") format("woff2"); font-style: normal; font-weight: 400; font-display: swap; }
@font-face { font-family: "Caveat"; src: url("./assets/fonts/caveat-latin-400-normal.woff2") format("woff2"); font-style: normal; font-weight: 400; font-display: swap; }
@font-face { font-family: "Patrick Hand"; src: url("./assets/fonts/patrick-hand-latin-400-normal.woff2") format("woff2"); font-style: normal; font-weight: 400; font-display: swap; }
@font-face { font-family: "Dancing Script"; src: url("./assets/fonts/dancing-script-latin-400-normal.woff2") format("woff2"); font-style: normal; font-weight: 400; font-display: swap; }
@font-face { font-family: "Sacramento"; src: url("./assets/fonts/sacramento-latin-400-normal.woff2") format("woff2"); font-style: normal; font-weight: 400; font-display: swap; }
:root {
  color-scheme: light;
  --canvas: #fbfaf8;
  --paper: #fffdfb;
  --sidebar: #f5f1ed;
  --ink: #202629;
  --muted: #687077;
  --line: #e9e4e0;
  --sage: #52765e;
  --sage-dark: #3f604a;
  --sage-soft: #ebf0e9;
  --blush: #faf0ee;
  --cream: #faf6f1;
  --peach: #fdf2e9;
  --lavender: #f7f1f8;
  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-body: "Nunito Sans", "Avenir Next", Arial, sans-serif;
  --font-script: "Dancing Script", "Caveat", cursive;
  --shadow-soft: 0 10px 32px rgb(81 63 54 / 4%);
  font-family: var(--font-body);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--canvas); color: var(--ink); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .52; }
img { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, h4, p { margin-top: 0; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 500; }
p { line-height: 1.55; }
::selection { background: #dce9dc; color: #203328; }
:focus-visible { outline: 3px solid #92ad97; outline-offset: 3px; }

.app-shell { min-height: 100dvh; display: grid; grid-template-columns: 260px minmax(0, 1fr); }
.sidebar {
  position: sticky; top: 0; align-self: start; height: 100dvh; min-height: 660px;
  display: flex; flex-direction: column; gap: 0; overflow: auto;
  padding: 28px 14px 14px; background: linear-gradient(120deg, #fffdfb 0%, var(--sidebar) 100%);
  border-right: 1px solid #eee9e5; z-index: 40;
}
.brand { min-height: 140px; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 0 10px 18px; }
.brand img, .brand-logo { width: 68px; height: 54px; object-fit: contain; flex: none; margin: 0 auto 6px; }
.brand strong, .brand-name { display: block; font: 500 27px/1 var(--font-display); letter-spacing: -.025em; }
.brand small, .brand-product, .brand-subtitle { display: block; margin-top: 7px; color: var(--muted); font: 400 12px/1.3 var(--font-body); letter-spacing: .005em; }
.nav-group { display: grid; gap: 1px; margin: 3px 0; }
.nav-group-label, .nav-heading { margin: 12px 16px 5px; color: #8b8c88; font-size: 10px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; }
.nav-link {
  width: 100%; min-height: 44px; display: flex; align-items: center; gap: 16px;
  padding: 8px 18px; border: 0; border-radius: 14px; background: transparent;
  color: var(--ink); text-align: left; text-decoration: none; font-size: 15px;
  transition: background .18s ease, color .18s ease, transform .18s ease;
}
.nav-link svg, .nav-link .icon { width: 22px; height: 22px; flex: none; stroke-width: 1.7; }
.nav-link:hover { background: rgb(89 113 88 / 8%); transform: translateX(2px); }
.nav-link.active, .nav-link[aria-current="page"] { background: #e9ede7; color: #1d2822; }
.nav-link.active svg, .nav-link[aria-current="page"] svg { stroke-width: 2; }
.sidebar-quote, .sidebar-note {
  margin: auto 4px 0; min-height: 180px; display: grid; align-content: center; justify-items: center;
  padding: 21px 16px; border-radius: 17px; background: linear-gradient(135deg, #fcf8f5, #f7f3f0);
  color: #624d45; text-align: center; font: 28px/1.15 var(--font-script);
}
.sidebar-quote small, .sidebar-note small { display: block; margin-top: 13px; font: 12px/1.4 var(--font-body); color: var(--muted); }

.main-area { min-width: 0; background: var(--canvas); }
.topbar { min-height: 73px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 12px 19px 12px 34px; }
.topbar-search, .search-box { width: min(450px, 53%); min-height: 42px; display: flex; align-items: center; gap: 12px; padding: 0 15px; border: 0; border-radius: 14px; background: #f8f5f3; color: #86898a; }
.topbar-search input, .search-box input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 14px; }
.topbar-search input::placeholder, .search-box input::placeholder { color: #929494; opacity: 1; }
.topbar-search svg, .search-box svg { width: 19px; height: 19px; flex: none; }
.topbar-actions { display: flex; align-items: center; gap: 15px; }
.topbar-actions button { border: 0; background: transparent; color: var(--ink); }
.topbar-actions .avatar, .avatar { width: 41px; height: 41px; flex: none; overflow: hidden; display: grid; place-items: center; border-radius: 50%; background: #d7e2d8; color: #2c5139; font-weight: 800; }
.topbar-actions .avatar img, .avatar img { width: 100%; height: 100%; object-fit: cover; }
.greeting { display: grid; gap: 1px; font-size: 13px; line-height: 1.18; }
.greeting small { color: var(--muted); font-size: 12px; }
.mobile-menu { display: none; width: 42px; height: 42px; flex: none; align-items: center; justify-content: center; border: 0; border-radius: 10px; background: var(--sage-soft); color: var(--ink); }
.mobile-brand, .mobile-search-btn { display: none; }
.workspace { width: min(100%, 1630px); margin: 0 auto; padding: 0 18px 28px 26px; }

/* Dashboard arrangement follows the supplied 1536px reference. */
.hero-grid { display: grid; grid-template-columns: minmax(0, 3.9fr) minmax(230px, 1fr); gap: 17px; }
.hero, .quote-card { min-width: 0; min-height: 244px; overflow: hidden; border-radius: 12px; }
.hero {
  position: relative; display: flex; align-items: center; isolation: isolate;
  padding: 25px clamp(25px, 4.2vw, 55px);
  background-image: linear-gradient(90deg, rgb(255 250 247 / 75%) 0%, rgb(255 247 241 / 55%) 38%, transparent 76%), var(--hero-image, url("./assets/hero-sunset.png"));
  background-size: cover; background-position: center;
}
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgb(37 31 25 / 11%), transparent 36%); pointer-events: none; }
.hero-content { position: relative; z-index: 1; max-width: 580px; }
.hero h1 { max-width: 530px; margin: 0 0 5px; font-size: clamp(38px, 3.5vw, 49px); line-height: .91; letter-spacing: -.035em; }
.hero p { margin: 11px 0 20px; font-size: clamp(15px, 1.25vw, 18px); line-height: 1.3; }
.hero-script { position: absolute; top: 29px; right: 58px; transform: rotate(-8deg); color: #594b43; text-align: center; font: 24px/1.22 var(--font-script); }
.quote-card { display: grid; align-content: center; justify-items: center; padding: 19px 22px; background: #f8f5f3; text-align: center; }
.quote-card::before { content: "“"; height: 35px; color: #939391; font: 700 64px/.8 Georgia,serif; }
.quote-card blockquote { margin: 11px 0 17px; font: italic 25px/1.22 var(--font-display); }
.quote-card cite { color: #626567; font-size: 11px; font-style: normal; letter-spacing: .15em; text-transform: uppercase; }

.feature-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 18px; }
.feature-tile { min-width: 0; min-height: 109px; display: flex; align-items: center; gap: 15px; padding: 17px 18px; border: 0; border-radius: 13px; background: var(--blush); color: var(--ink); text-align: left; text-decoration: none; transition: transform .18s ease, box-shadow .18s ease; }
.feature-tile:nth-child(2) { background: #f5f6f2; }
.feature-tile:nth-child(3) { background: #fdf5ef; }
.feature-tile:nth-child(4) { background: #f8f2f9; }
.feature-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-soft); }
.feature-icon { width: 70px; height: 70px; flex: none; display: grid; place-items: center; border-radius: 50%; background: #f3deda; color: #6f463c; }
.feature-tile:nth-child(2) .feature-icon { background: #e7eee5; color: #426b52; }
.feature-tile:nth-child(3) .feature-icon { background: #fae9da; color: #704937; }
.feature-tile:nth-child(4) .feature-icon { background: #f0e6f3; color: #61546a; }
.feature-icon svg { width: 34px; height: 34px; stroke-width: 1.7; }
.feature-copy { display: grid; gap: 2px; min-width: 0; }
.feature-copy strong, .feature-tile h3 { margin: 0; font: 500 23px/1.05 var(--font-display); white-space: nowrap; }
.feature-copy small, .feature-tile p { margin: 0; color: #555d63; font-size: 14px; line-height: 1.3; }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.64fr) minmax(0, 1.17fr) minmax(280px, 1fr); align-items: start; gap: 16px; margin-top: 16px; }
.dashboard-grid .goals-panel, .dashboard-grid .actions-panel { min-height: 324px; }
.dashboard-grid .habit-panel .empty-state { min-height: 210px; padding: 8px; }
.dashboard-grid .photo-quote { margin-top: -42px; }
.panel { min-width: 0; padding: 14px 18px 17px; border: 1px solid var(--line); border-radius: 16px; background: var(--paper); box-shadow: 0 6px 24px rgb(79 67 58 / 2%); }
.panel-head { min-height: 30px; display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.panel-head h2, .panel-head h3 { margin: 0; font: 500 24px/1.08 var(--font-display); }
.panel-head a, .panel-head button { display: inline-flex; align-items: center; gap: 6px; padding: 6px 0; border: 0; background: transparent; color: #3d5c4c; text-decoration: none; font-size: 13px; white-space: nowrap; }
.panel-head a:hover, .panel-head button:hover { text-decoration: underline; }
.panel-head svg { width: 15px; height: 15px; }
.list-row { min-width: 0; min-height: 61px; display: flex; align-items: center; gap: 13px; padding: 3px 0; border-bottom: 1px solid #f0edeb; }
.list-row:last-child { border-bottom: 0; }
.list-row > img, .list-thumb { width: 60px; height: 56px; flex: none; border-radius: 8px; object-fit: cover; background: #e8e3dd; }
.list-row .row-copy, .list-row .item-copy { min-width: 0; flex: 1; }
.list-row strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 500 19px/1.15 var(--font-display); }
.list-row small { display: block; margin-top: 3px; color: var(--muted); font-size: 13px; }
.list-row input[type="checkbox"] { width: 22px; height: 22px; flex: none; margin: 0 4px 0 2px; accent-color: var(--sage); }
.list-row .done, .list-row.done .row-copy { text-decoration: line-through; color: #727a78; }
.progress-track { height: 11px; overflow: hidden; border-radius: 100px; background: #ebedee; }
.progress-track > span, .progress-fill { display: block; width: var(--progress, 0%); height: 100%; border-radius: inherit; background: #9fbea0; }
.list-row .progress-track { width: min(30%, 132px); flex: none; }
.progress-number, .row-percent { width: 31px; text-align: right; font-size: 13px; }
.actions-panel .list-row { min-height: 41px; }
.habit-panel .panel-head { margin-bottom: 14px; }
.habit-table, .habit-grid { width: 100%; border-collapse: collapse; font-size: 13px; }
.habit-table th, .habit-table td { padding: 9px 2px; text-align: center; font-weight: 400; }
.habit-table th:first-child, .habit-table td:first-child { width: 33%; text-align: left; }
.habit-table thead th { color: #6d7274; font-size: 11px; }
.habit-dot { width: 14px; height: 14px; display: inline-grid; place-items: center; border: 1px solid #adb6b4; border-radius: 50%; background: #fff; vertical-align: middle; }
.habit-dot.done, .habit-dot.active { border-color: var(--sage); background: var(--sage); }
.habit-dot button { width: 100%; height: 100%; padding: 0; border: 0; background: transparent; }
.vision-strip { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 7px; margin-top: 11px; }
.vision-strip img, .vision-strip > div { width: 100%; height: 133px; border-radius: 7px; object-fit: cover; background: #f0e8e1; }
.vision-strip .text-tile { display: grid; place-items: center; padding: 6px; font: 18px/1.15 var(--font-script); text-align: center; }
.rings { display: flex; justify-content: space-around; gap: 12px; padding-top: 14px; }
.ring-group { display: grid; justify-items: center; gap: 9px; min-width: 0; font-size: 13px; text-align: center; }
.ring { --ring-color: var(--sage); width: 91px; height: 91px; display: grid; place-items: center; border-radius: 50%; background: conic-gradient(var(--ring-color) var(--progress, 0%), #e5e8e7 0); }
.ring::before { content: ""; grid-area: 1/1; width: 75px; height: 75px; border-radius: 50%; background: var(--paper); }
.ring > span, .ring strong { position: relative; grid-area: 1/1; font-size: 20px; font-weight: 400; }
.photo-quote { min-height: 239px; display: grid; align-content: center; justify-items: end; padding: 30px; border-radius: 15px; background-image: linear-gradient(90deg, transparent 20%, rgb(255 242 228 / 18%) 75%), var(--photo-image, url("./assets/botanical-still.png")); background-position: center; background-size: cover; color: #473b34; text-align: center; font: 29px/1.1 var(--font-script); }

/* Full application views. */
.page-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin: 8px 0 21px; }
.page-head h1 { margin: 0; font-size: clamp(42px, 4vw, 60px); line-height: .95; letter-spacing: -.035em; }
.page-head p { max-width: 690px; margin: 8px 0 0; color: var(--muted); font-size: 15px; }
.eyebrow { display: block; margin-bottom: 7px; color: #757d78; font-size: 10px; font-weight: 800; letter-spacing: .19em; text-transform: uppercase; }
.section-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 16px; }
.section-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.section-grid > .full, .form-grid > .full, .span-all { grid-column: 1 / -1; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.field { min-width: 0; display: grid; align-content: start; gap: 6px; }
.field label, label.field { color: #3f4848; font-size: 12px; font-weight: 800; }
.field small, .field-help { color: var(--muted); font-size: 11px; font-weight: 400; }
input:not([type="checkbox"]):not([type="radio"]):not([type="color"]), select, textarea {
  width: 100%; min-width: 0; min-height: 43px; padding: 10px 12px; border: 1px solid #dddeda;
  border-radius: 9px; outline: 0; background: #fff; color: var(--ink); font-size: 14px;
}
textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { border-color: #7a9b80 !important; box-shadow: 0 0 0 3px rgb(82 118 94 / 13%); }
input::placeholder, textarea::placeholder { color: #949b9c; opacity: 1; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--sage); }
.btn { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 17px; border: 1px solid var(--line); border-radius: 11px; background: var(--paper); color: var(--ink); text-decoration: none; font-size: 13px; font-weight: 700; line-height: 1.2; white-space: nowrap; transition: transform .16s ease, background .16s ease, box-shadow .16s ease; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 5px 13px rgb(58 65 53 / 9%); }
.btn-primary { border-color: var(--sage); background: var(--sage); color: var(--on-main, #fff); }
.btn-primary:hover { background: var(--sage-dark); }
.btn-quiet { border-color: transparent; background: transparent; color: var(--sage-dark); }
.btn-quiet:hover { background: var(--sage-soft); }
.btn-danger { color: #8d3e3e; border-color: #eacccc; background: #fff8f7; }
.btn svg { width: 17px; height: 17px; }
.chip { min-height: 30px; display: inline-flex; align-items: center; justify-content: center; gap: 5px; padding: 5px 10px; border: 1px solid #e1e5dd; border-radius: 100px; background: #f5f8f2; color: #456850; font-size: 11px; font-weight: 700; line-height: 1.1; }
button.chip:hover, .chip.selected { background: var(--sage); border-color: var(--sage); color: var(--on-main, #fff); }
.chip-row, .toolbar, .form-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.form-actions { justify-content: flex-end; margin-top: 18px; }
.toolbar { justify-content: space-between; margin-bottom: 16px; }
.muted { color: var(--muted); }
.handwritten { font-family: var(--font-script); }
.empty-state { min-height: 185px; display: grid; align-content: center; justify-items: center; gap: 8px; padding: 25px; color: var(--muted); text-align: center; }
.empty-state svg { width: 31px; height: 31px; color: #88a28c; }
.empty-state h3 { margin: 0; color: var(--ink); font-size: 24px; }
.empty-state p { max-width: 340px; margin: 0; font-size: 13px; }
.empty-state .btn { margin-top: 9px; }
.modal-backdrop { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; overflow: auto; background: rgb(30 34 32 / 47%); backdrop-filter: blur(4px); }
.modal-card { width: min(630px, 100%); max-height: min(90dvh, 900px); overflow: auto; padding: 23px; border: 1px solid #efe7e0; border-radius: 18px; background: var(--paper); box-shadow: 0 25px 85px rgb(27 29 26 / 24%); }
.modal-card h2 { margin-bottom: 14px; font-size: 34px; }
.modal-head { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.modal-head button { width: 35px; height: 35px; border: 0; border-radius: 9px; background: var(--cream); }
.toast { position: fixed; z-index: 120; right: 22px; bottom: 20px; max-width: min(380px, calc(100vw - 36px)); padding: 12px 17px; border: 1px solid #bed2c0; border-radius: 11px; background: #f5fbf4; color: #30513b; box-shadow: 0 15px 45px rgb(29 40 31 / 13%); font-size: 13px; }
.toast.error { border-color: #e9bcb8; background: #fff2f0; color: #853f3f; }

/* Real app components and content states. */
.icon-btn { width: 35px; height: 35px; flex: none; display: inline-grid; place-items: center; padding: 0; border: 0; border-radius: 9px; background: transparent; color: #596561; }
.icon-btn:hover { background: var(--sage-soft); color: var(--sage-dark); }
.icon-btn svg { width: 18px; height: 18px; }
.profile-button { min-height: 44px; display: flex; align-items: center; gap: 10px; padding: 0; border: 0; background: transparent; color: var(--ink); text-align: left; }
.profile-button > svg { width: 16px; height: 16px; margin-left: 8px; }
.mobile-page-label { display: none; }
.sidebar-scrim[hidden] { display: none !important; }
.hero-button { min-height: 47px; padding: 11px 20px; border-radius: 100px; font-size: 16px; font-weight: 500; }
.goal-thumb { display: grid; place-items: center; color: #5a715d; background: linear-gradient(140deg, #eadfd8, #c9d3c8); }
.goal-thumb.color-1 { color: #547358; background: linear-gradient(140deg, #e2e9de, #c4d5c3); }
.goal-thumb.color-2 { color: #765e53; background: linear-gradient(140deg, #f5e9db, #d4c6b8); }
.goal-thumb.color-3 { color: #5d6e79; background: linear-gradient(140deg, #dfe9ed, #c9d2d8); }
.goal-row { min-height: 66px; }
.action-row .row-copy strong { font: 400 14px/1.3 var(--font-body); }
.action-row .row-copy strong.done { color: #7e8a81; }
.dashboard-grid .empty-state.compact { min-height: 195px; }
.link-add { display: inline-flex; align-items: center; gap: 9px; margin-top: 8px; padding: 8px 2px; border: 0; background: transparent; color: #344a3b; font-size: 13px; }
.link-add:hover { text-decoration: underline; }
.link-add svg { width: 18px; height: 18px; }
.vision-cell { min-width: 0; overflow: hidden; border-radius: 7px; background: #f4ede8; }
.vision-cell img { width: 100%; height: 100%; object-fit: cover; }
.vision-strip.small { grid-template-columns: repeat(auto-fill, minmax(75px, 1fr)); max-width: 500px; min-height: 80px; margin-bottom: 14px; }
.vision-strip.small img { height: 90px; }
.vision-strip .text-tile { width: 100%; height: 100%; color: #463f3b; background: linear-gradient(135deg, #faf5f0, #f0e8e1); }
.today-heading { margin: 38px 0 18px; padding-top: 20px; border-top: 1px solid var(--line); }
.today-heading .page-head { margin: 0; }
.date-picker { width: 155px !important; min-height: 42px !important; padding: 8px 10px !important; }
.small-note { margin: 12px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.daily-grid .panel { min-height: 240px; }
.daily-grid .panel .form-grid { margin-top: 9px; }
.daily-grid .btn-quiet { margin-top: 12px; }
.journey-panel .muted { margin: 0 0 15px; }
.journey-track { display: flex; align-items: center; gap: 15px; margin: 18px 0 14px; }
.journey-track .progress-track { flex: 1; }
.journey-track small { min-width: 36px; color: var(--muted); text-align: right; }
.journey-days { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 19px; }
.journey-day { width: 37px; height: 37px; display: grid; place-items: center; border: 1px solid #e5e2dc; border-radius: 50%; background: #fff; color: #5b6364; font-size: 13px; }
.journey-day.current { border-color: var(--sage); background: var(--sage); color: var(--on-main, #fff); }
.journey-panel > .btn:last-child { margin-top: 18px; }
.manifestation-card { min-height: 276px; display: flex; flex-direction: column; padding: 19px 20px; }
.manifestation-card-top { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.manifestation-card h2 { margin: 17px 0 7px; font-size: 31px; line-height: 1.04; }
.manifestation-card p { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 3; color: var(--muted); font-size: 13px; }
.manifestation-card .progress-track { margin-top: auto; }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 13px; }
.card-foot small { color: var(--muted); font-size: 11px; }
.project-lead > .progress-track { margin: 16px 0 20px; }
.ladder { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 9px; }
.ladder > div { min-width: 0; min-height: 115px; position: relative; padding: 15px 12px; border: 1px solid #e6e8e1; border-radius: 11px; background: #f7f8f4; }
.ladder > div:nth-child(2) { background: #f9f4ee; }
.ladder > div:nth-child(3) { background: #fbf1ec; }
.ladder > div:nth-child(4) { background: #f7f4f8; }
.ladder > div:nth-child(5) { background: #edf3eb; border-color: #d6e2d4; }
.ladder small { display: block; margin-bottom: 9px; color: #657169; font-size: 10px; font-weight: 800; letter-spacing: .1em; }
.ladder strong { display: block; overflow-wrap: anywhere; font: 500 21px/1.1 var(--font-display); }
.detail-list { display: grid; grid-template-columns: minmax(140px, 36%) minmax(0, 1fr); gap: 13px 12px; margin: 10px 0 0; font-size: 13px; }
.detail-list dt { color: var(--muted); }
.detail-list dd { margin: 0; overflow-wrap: anywhere; }
.affirmation-line { margin: 10px 0; padding: 12px 15px; border-left: 3px solid var(--sage); background: #f5f8f3; font: italic 20px/1.25 var(--font-display); }
.vision-board-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; }
.vision-card { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); box-shadow: var(--shadow-soft); }
.vision-card > img, .vision-words { width: 100%; height: 205px; object-fit: cover; }
.vision-words { display: grid; place-items: center; padding: 22px; background: linear-gradient(125deg, #f5ebe6, #ebeee7); color: #4e5b4f; font: 32px/1.13 var(--font-script); text-align: center; overflow-wrap: anywhere; }
.vision-card > div:last-child { min-height: 61px; display: grid; grid-template-columns: minmax(0, 1fr) 35px; align-items: center; gap: 2px 6px; padding: 9px 10px 9px 14px; }
.vision-card strong { grid-column: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 500 18px/1.1 var(--font-display); }
.vision-card small { grid-column: 1; color: var(--muted); font-size: 11px; }
.vision-card .icon-btn { grid-column: 2; grid-row: 1 / 3; }
.sticker-library { margin-top: 18px; padding: 19px 20px 22px; }
.sticker-library .muted { max-width: 560px; margin: 0 0 15px; font-size: 13px; }
.sticker-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.sticker-option { min-width: 0; min-height: 125px; display: grid; align-content: center; justify-items: center; gap: 8px; padding: 10px 7px; border: 1px solid #e9e3dd; border-radius: 11px; background: #fbf8f5; color: #3c4640; text-align: center; transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease; }
.sticker-option:nth-child(3n + 2) { background: #f3f6f0; }
.sticker-option:nth-child(3n) { background: #fbf2ed; }
.sticker-option:hover { transform: translateY(-2px); border-color: #adc3b0; box-shadow: 0 7px 20px rgb(53 68 56 / 8%); }
.sticker-option img { width: 68px; height: 68px; object-fit: contain; }
.sticker-option span { display: block; max-width: 100%; font-size: 12px; font-weight: 700; line-height: 1.15; overflow-wrap: anywhere; }
.category-row { margin: 4px 0 18px; }
.next-step { margin: 0 0 18px; padding: 22px 25px; border-color: #dbe5d8; background: linear-gradient(108deg, #ecf2e9, #faf7f2 68%); }
.next-step h2 { margin: 6px 0 4px; font-size: 33px; }
.next-step p { margin-bottom: 14px; color: #53615a; font-size: 13px; }
.journal-row { position: relative; padding: 16px 0; border-bottom: 1px solid var(--line); }
.journal-row:last-child { border-bottom: 0; }
.journal-row > small { margin-left: 9px; color: var(--muted); font-size: 11px; }
.journal-row h3 { margin: 10px 0 3px; font-size: 24px; }
.journal-row p { margin-bottom: 9px; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.prompt-line { width: 100%; min-height: 43px; display: flex; align-items: center; gap: 10px; padding: 10px 3px; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: #334638; text-align: left; font-size: 13px; }
.prompt-line:hover { background: var(--sage-soft); }
.prompt-line svg { flex: none; }
.metric-card { min-height: 165px; display: grid; place-items: center; gap: 8px; text-align: center; }
.metric-card .ring-group { gap: 6px; }
.metric-card > small { color: var(--muted); font-size: 11px; }
.progress-lower { margin-top: 16px; }
.big-number { margin: 7px 0 16px; font: 500 55px/.9 var(--font-display); }
.big-number small { font: 13px/1.3 var(--font-body); color: var(--muted); }
.win-row { display: flex; align-items: center; gap: 11px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.win-row:last-child { border-bottom: 0; }
.win-row > div { min-width: 0; flex: 1; }
.win-row strong, .win-row small { display: block; }
.win-row strong { font-size: 13px; }
.win-row small { margin-top: 3px; color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
.win-icon { width: 30px; height: 30px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--sage-soft); color: var(--sage); }
.affirmation-card { display: flex; flex-direction: column; min-height: 190px; }
.affirmation-card blockquote { flex: 1; margin: 12px 0 19px; font: italic 27px/1.13 var(--font-display); }
.affirmation-card .card-foot { margin-top: auto; }
.icon-btn.fav { color: #bb806f; }
.ritual-card h2 { margin: 5px 0 12px; font-size: 33px; }
.ritual-card textarea { min-height: 170px; }
.ritual-card .progress-track { margin-top: 15px; }
.review-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.review-stats > div { min-width: 0; padding: 16px 9px; border-radius: 9px; background: #f5f7f2; text-align: center; }
.review-stats strong, .review-stats small { display: block; }
.review-stats strong { font: 500 27px/1 var(--font-display); }
.review-stats small { margin-top: 6px; color: var(--muted); font-size: 10px; }
.preset-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 13px 0 24px; }
.preset-card { min-width: 0; display: grid; gap: 7px; padding: 7px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--ink); text-align: left; }
.preset-card.selected { border: 2px solid var(--sage); padding: 6px; }
.preset-card > span { height: 48px; border-radius: 5px; background: linear-gradient(90deg, var(--preset-main) 0 38%, var(--preset-accent) 38% 66%, var(--preset-bg) 66% 100%); }
.preset-card strong { font-size: 10px; line-height: 1.2; }
.toggle-line { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 17px; font-size: 13px; font-weight: 700; }
.toggle-line input { width: 17px; height: 17px; }
.toggle-line small { flex-basis: 100%; padding-left: 25px; color: var(--muted); font-size: 11px; font-weight: 400; }
.theme-preview { min-height: 190px; display: grid; align-content: center; justify-items: start; gap: 7px; background: linear-gradient(112deg, var(--paper), #eef3eb); }
.theme-preview .theme-preview-title { display: block; margin: 0; font: 500 38px/1.05 var(--font-display); }
.theme-preview .theme-preview-note { display: block; margin: 0; }
.theme-preview .handwritten { color: var(--accent, #b88770); font-size: 24px; }
.theme-preview .btn { margin-top: 8px; }

/* Six complete, ready-to-use looks. Preview colors stay inside each card. */
.themes-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: stretch; gap: 16px; margin: 5px 0 22px; }
.theme-card {
  position: relative; min-width: 0; display: flex; flex-direction: column; gap: 10px;
  padding: 12px; border: 1px solid var(--line); border-radius: 16px;
  background: var(--paper); color: var(--ink); text-align: left;
  box-shadow: var(--shadow-soft); transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.theme-card:hover { transform: translateY(-2px); border-color: var(--sage); box-shadow: 0 12px 26px rgb(55 66 54 / 10%); }
.theme-card.selected, .theme-card[aria-pressed="true"] { border: 2px solid var(--sage); padding: 11px; box-shadow: 0 0 0 3px var(--sage-soft), var(--shadow-soft); }
.theme-card.selected::after, .theme-card[aria-pressed="true"]::after {
  content: "✓"; position: absolute; top: 20px; right: 20px; z-index: 3; width: 27px; height: 27px;
  display: grid; place-items: center; border-radius: 50%; background: var(--sage); color: var(--on-main, #fff);
  font: 800 14px/1 var(--font-body); pointer-events: none;
}
.theme-card > strong, .theme-card > .theme-name { display: block; padding: 0 3px; font: 600 23px/1.04 var(--font-display); }
.theme-card > small, .theme-card > .theme-description { display: block; min-height: 34px; padding: 0 3px; color: var(--muted); font-size: 12px; line-height: 1.4; }
.themes-grid .theme-preview {
  position: relative; min-height: 157px; overflow: hidden; display: block; isolation: isolate;
  border: 1px solid rgb(75 70 59 / 12%); border-radius: 11px;
  background: var(--theme-bg, var(--canvas)); color: var(--theme-ink, #28312c);
}
.themes-grid .theme-preview::before {
  content: ""; position: absolute; inset: 0 auto 0 0; width: 25%;
  background: color-mix(in srgb, var(--theme-main, var(--sage)) 13%, var(--theme-bg, #fff));
  border-right: 1px solid color-mix(in srgb, var(--theme-main, var(--sage)) 21%, transparent);
}
.themes-grid .theme-preview::after {
  content: ""; position: absolute; top: 17%; right: 7%; width: 60%; height: 43%; border-radius: 7px;
  background: linear-gradient(120deg, color-mix(in srgb, var(--theme-accent, #b88770) 21%, var(--theme-bg, #fff)), color-mix(in srgb, var(--theme-main, var(--sage)) 14%, var(--theme-bg, #fff)));
  box-shadow: 0 2px 8px rgb(29 35 29 / 7%);
}
.themes-grid .theme-preview-sidebar, .themes-grid .theme-preview-hero, .themes-grid .theme-preview-tile { position: absolute; z-index: 1; }
.themes-grid .theme-preview-sidebar { top: 18px; left: 9px; width: 17%; height: 7px; border-radius: 8px; background: var(--theme-main, var(--sage)); box-shadow: 0 20px 0 -1px color-mix(in srgb, var(--theme-main, var(--sage)) 45%, transparent), 0 39px 0 -1px color-mix(in srgb, var(--theme-main, var(--sage)) 35%, transparent); }
.themes-grid .theme-preview-hero { top: 27%; right: 19%; width: 37%; height: 9px; border-radius: 10px; background: var(--theme-main, var(--sage)); opacity: .74; }
.themes-grid .theme-preview-tile { bottom: 13%; right: 7%; width: 27%; height: 23%; border-radius: 5px; background: color-mix(in srgb, var(--theme-accent, #b88770) 25%, var(--theme-bg, #fff)); box-shadow: -92px 0 0 color-mix(in srgb, var(--theme-main, var(--sage)) 15%, var(--theme-bg, #fff)); }
.themes-grid .theme-preview .theme-preview-title, .themes-grid .theme-preview .theme-preview-note,
.themes-grid .theme-preview .handwritten { position: relative; z-index: 2; max-width: 63%; margin-left: 30%; color: var(--theme-ink, #28312c); }
.themes-grid .theme-preview .theme-preview-title { padding-top: 30px; font-size: 24px; }
.themes-grid .theme-preview .theme-preview-note { font-size: 11px; }
.theme-swatch { min-height: 21px; display: flex; align-items: center; gap: 6px; padding: 0 3px; background: linear-gradient(90deg, var(--theme-main, var(--sage)) 0 33%, var(--theme-accent, #b88770) 33% 66%, var(--theme-bg, var(--canvas)) 66% 100%); background-size: 0 0; }
.theme-swatch > span, .theme-swatch > i { width: 17px; height: 17px; flex: none; border: 1px solid rgb(65 57 49 / 18%); border-radius: 50%; background: var(--theme-main, var(--sage)); }
.theme-swatch > :nth-child(2) { background: var(--theme-accent, #b88770); }
.theme-swatch > :nth-child(3) { background: var(--theme-bg, var(--canvas)); }
.theme-swatch:empty { height: 18px; border: 1px solid rgb(65 57 49 / 12%); border-radius: 20px; background-size: 100% 100%; }

/* Techniques pair a short explanation with a repeatable dated practice. */
.technique-intro { margin-bottom: 16px; }
.techniques-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 16px; }
.technique-card { position: relative; min-width: 0; display: grid; gap: 14px; padding: 22px; border: 1px solid var(--line); border-radius: 17px; background: var(--paper); box-shadow: var(--shadow-soft); }
.technique-card::before { content: ""; position: absolute; top: 22px; left: 0; width: 3px; height: 38px; border-radius: 0 3px 3px 0; background: var(--sage); }
.technique-card h2, .technique-card h3 { margin: 0; line-height: 1.05; }
.technique-card h2 { font-size: clamp(27px, 2.4vw, 35px); }
.technique-card h3 { font-size: 23px; }
.technique-card > p, .technique-card .muted { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.technique-badge { width: fit-content; min-height: 25px; display: inline-flex; align-items: center; padding: 5px 9px; border: 1px solid color-mix(in srgb, var(--sage) 24%, transparent); border-radius: 100px; background: var(--sage-soft); color: var(--sage-dark); font-size: 10px; font-weight: 800; line-height: 1.2; letter-spacing: .07em; text-transform: uppercase; }
.technique-steps { min-width: 0; display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; counter-reset: technique-step; }
.technique-step { min-width: 0; display: grid; grid-template-columns: 34px minmax(0, 1fr); align-items: start; gap: 10px; padding: 10px 11px; border: 1px solid var(--line); border-radius: 10px; background: var(--cream); font-size: 13px; line-height: 1.45; overflow-wrap: anywhere; }
li.technique-step { counter-increment: technique-step; }
li.technique-step::before { content: counter(technique-step, decimal-leading-zero); width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: var(--sage-soft); color: var(--sage-dark); font-size: 10px; font-weight: 800; }
.technique-step strong { display: block; margin-bottom: 3px; font-size: 12px; }
.technique-practice { min-width: 0; display: grid; gap: 12px; padding: 17px; border: 1px solid color-mix(in srgb, var(--sage) 19%, var(--line)); border-radius: 12px; background: var(--sage-soft); }
.technique-practice h3, .technique-history h3 { margin: 0; font-size: 24px; }
.technique-practice .form-grid { gap: 11px; }
.technique-practice textarea { min-height: 105px; }
.technique-practice .form-actions { margin-top: 1px; }
.technique-history { min-width: 0; display: grid; gap: 8px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.technique-history > p { margin: 0; color: var(--muted); font-size: 12px; }
.technique-history > article, .technique-history > .history-entry { min-width: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--paper); overflow-wrap: anywhere; }
.technique-history small { color: var(--muted); font-size: 11px; }
.technique-method-tabs { max-width: 100%; display: flex; align-items: center; gap: 8px; overflow-x: auto; padding: 2px 2px 10px; margin: 1px 0 14px; scrollbar-width: thin; }
.technique-method-tabs > button, .technique-method-tabs > a { min-height: 37px; flex: none; padding: 8px 13px; border: 1px solid var(--line); border-radius: 100px; background: var(--paper); color: var(--ink); text-decoration: none; font-size: 12px; font-weight: 700; white-space: nowrap; }
.technique-method-tabs > button:hover, .technique-method-tabs > a:hover { border-color: var(--sage); background: var(--sage-soft); }
.technique-method-tabs > .active, .technique-method-tabs > [aria-selected="true"], .technique-method-tabs > [aria-pressed="true"] { border-color: var(--sage); background: var(--sage); color: var(--on-main, #fff); }
input[type="color"] { width: 100%; min-height: 43px; padding: 3px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.print-options { display: flex; flex-wrap: wrap; gap: 9px; }
.upload-label { position: relative; }
.upload-label input[hidden] { display: none !important; }
.focus-title { margin-bottom: 6px; font: 500 31px/1.05 var(--font-display); }
.search-results { display: grid; }
.search-result { display: grid; gap: 4px; padding: 12px 4px; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--ink); text-align: left; }
.search-result:hover { background: var(--sage-soft); }
.search-result strong { font-size: 14px; }
.search-result small { color: var(--muted); font-size: 11px; }
.search-highlight { outline: 3px solid var(--sage); outline-offset: 3px; border-radius: 9px; scroll-margin: 120px; }

/* The print DOM is kept outside the app shell and only shown in print media. */
#print-root { display: none; }
@media print {
  @page { size: auto; margin: 15mm; }
  body { background: #fff !important; color: #222 !important; }
  #app, #modal-root, #toast-root { display: none !important; }
  #print-root { display: block; width: 100%; font: 11pt/1.45 var(--font-body); color: #222; }
  #print-root header { display: flex; align-items: center; gap: 10px; padding-bottom: 12px; border-bottom: 2px solid #b69d6e; }
  #print-root header img { width: 36px; height: 36px; }
  #print-root header strong, #print-root header small { display: block; }
  #print-root header small { font-size: 8pt; color: #555; }
  #print-root h1 { margin: 22px 0 12px; font-size: 28pt; }
  #print-root .print-row { display: grid; grid-template-columns: 31% 69%; gap: 8px; padding: 8px 0; border-bottom: 1px solid #ddd; break-inside: avoid; }
  #print-root .print-row strong { font-size: 9pt; }
  #print-root .print-row span { white-space: pre-wrap; overflow-wrap: anywhere; }
  #print-root footer { margin-top: 30px; padding-top: 8px; border-top: 1px solid #ddd; color: #555; font-size: 8pt; }
}

html[data-handwriting-scope="headings"] h1,
html[data-handwriting-scope="headings"] h2,
html[data-handwriting-scope="headings"] h3,
html[data-handwriting-scope="full"] h1,
html[data-handwriting-scope="full"] h2,
html[data-handwriting-scope="full"] h3 { font-family: var(--font-script); }
html[data-handwriting-scope="full"] .workspace p,
html[data-handwriting-scope="full"] .workspace blockquote,
html[data-handwriting-scope="full"] .feature-copy strong,
html[data-handwriting-scope="full"] .handwritten { font-family: var(--font-script); }
html[data-handwriting-scope="full"] input,
html[data-handwriting-scope="full"] select,
html[data-handwriting-scope="full"] textarea,
html[data-handwriting-scope="full"] .ring,
html[data-handwriting-scope="full"] .big-number,
html[data-handwriting-scope="full"] .review-stats strong { font-family: var(--font-body) !important; }
html[data-calm="true"] *, html[data-calm="true"] *::before, html[data-calm="true"] *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
html[data-night="true"] { --paper: #27312d; --sidebar: #202923; --ink: #f5f2ea; --muted: #b9c1b9; --line: #435047; --sage-soft: #35463a; color-scheme: dark; }
html[data-night="true"] body, html[data-night="true"] .main-area { background: #1f2924; }
html[data-night="true"] .sidebar { background: #222d26; border-color: #3c4a40; }
html[data-night="true"] .nav-link.active, html[data-night="true"] .nav-link[aria-current="page"] { background: #3b513f; color: #fff; }
html[data-night="true"] .sidebar-quote, html[data-night="true"] .quote-card { background: #2c352e; color: #f5f1e9; }
html[data-night="true"] .topbar { background: #1f2924; }
html[data-night="true"] .topbar-search, html[data-night="true"] .search-box,
html[data-night="true"] .feature-tile, html[data-night="true"] .next-step,
html[data-night="true"] .vision-words, html[data-night="true"] .preset-card,
html[data-night="true"] .ladder > div, html[data-night="true"] .review-stats > div { background: #313c33; color: var(--ink); }
html[data-night="true"] input:not([type="checkbox"]):not([type="radio"]):not([type="color"]),
html[data-night="true"] select, html[data-night="true"] textarea { background: #27332b; border-color: #566258; color: var(--ink); }
html[data-night="true"] .journey-day { background: #2d3a30; border-color: #536656; color: var(--ink); }
html[data-night="true"] .journey-day.current { background: var(--sage); color: var(--on-main, #fff); }
html[data-night="true"] .theme-preview { background: #29382d; }
html[data-night="true"] .themes-grid .theme-preview { background: var(--theme-bg, #29382d); }
html[data-night="true"] .theme-card { background: var(--paper); }
html[data-night="true"] .technique-step, html[data-night="true"] .technique-history > article,
html[data-night="true"] .technique-history > .history-entry { background: #303c33; border-color: var(--line); }
html[data-night="true"] .technique-practice { background: #35463a; border-color: #5b705e; }
html[data-night="true"] .technique-badge { color: #dcf0dd; border-color: #64866b; }
html[data-night="true"] .technique-method-tabs > button,
html[data-night="true"] .technique-method-tabs > a { background: var(--paper); color: var(--ink); }
html[data-night="true"] .technique-method-tabs > .active,
html[data-night="true"] .technique-method-tabs > [aria-selected="true"],
html[data-night="true"] .technique-method-tabs > [aria-pressed="true"] { background: var(--sage); color: var(--on-main, #fff); }
html[data-night="true"] .sticker-option { background: #344037; border-color: #526455; color: var(--ink); }
html[data-night="true"] .hero h1, html[data-night="true"] .hero p { color: #202a25; text-shadow: 0 1px 2px rgb(255 255 255 / 35%); }
html[data-night="true"] .feature-copy small,
html[data-night="true"] .feature-tile p,
html[data-night="true"] .next-step p { color: #d1d9d0; }
html[data-night="true"] .panel-head a,
html[data-night="true"] .panel-head button,
html[data-night="true"] .link-add,
html[data-night="true"] .prompt-line { color: #bdd7c1; }
html[data-night="true"] .quote-card cite { color: #b7c2b8; }
html[data-night="true"] .list-row,
html[data-night="true"] .journal-row,
html[data-night="true"] .win-row { border-color: var(--line); }
html[data-night="true"] .progress-track { background: #49574d; }

/* Preset colors travel through the whole shell; Warm Sage keeps the reference artwork. */
html[data-theme]:not([data-theme="warm-sage"]) {
  --paper: color-mix(in srgb, var(--canvas) 28%, #fff);
  --sidebar: color-mix(in srgb, var(--sage) 6%, var(--canvas));
  --line: color-mix(in srgb, var(--sage) 17%, var(--canvas));
  --sage-soft: color-mix(in srgb, var(--sage) 13%, var(--paper));
  --cream: color-mix(in srgb, var(--accent) 11%, var(--paper));
}
html[data-theme]:not([data-theme="warm-sage"]) .sidebar {
  background: linear-gradient(120deg, var(--paper), var(--sidebar)); border-color: var(--line);
}
html[data-theme]:not([data-theme="warm-sage"]) .topbar-search,
html[data-theme]:not([data-theme="warm-sage"]) .search-box,
html[data-theme]:not([data-theme="warm-sage"]) .quote-card { background: var(--cream); }
html[data-theme]:not([data-theme="warm-sage"]) .sidebar-quote { background: linear-gradient(135deg, var(--cream), var(--sage-soft)); color: var(--ink); }
html[data-theme]:not([data-theme="warm-sage"]) .nav-link.active,
html[data-theme]:not([data-theme="warm-sage"]) .nav-link[aria-current="page"] { background: var(--sage-soft); color: var(--ink); }
html[data-theme]:not([data-theme="warm-sage"]) .feature-tile { background: color-mix(in srgb, var(--accent) 13%, var(--paper)); }
html[data-theme]:not([data-theme="warm-sage"]) .feature-tile:nth-child(2) { background: var(--sage-soft); }
html[data-theme]:not([data-theme="warm-sage"]) .feature-tile:nth-child(3) { background: var(--cream); }
html[data-theme]:not([data-theme="warm-sage"]) .feature-tile:nth-child(4) { background: color-mix(in srgb, var(--sage) 7%, var(--paper)); }
html[data-theme]:not([data-theme="warm-sage"]) .feature-icon { background: color-mix(in srgb, var(--accent) 21%, var(--paper)); color: var(--ink); }
html[data-theme]:not([data-theme="warm-sage"]) .feature-tile:nth-child(2) .feature-icon,
html[data-theme]:not([data-theme="warm-sage"]) .feature-tile:nth-child(4) .feature-icon { background: color-mix(in srgb, var(--sage) 21%, var(--paper)); color: var(--ink); }
html[data-theme]:not([data-theme="warm-sage"]) .hero {
  background-image: linear-gradient(90deg, color-mix(in srgb, var(--paper) 82%, transparent) 0%, color-mix(in srgb, var(--paper) 57%, transparent) 38%, transparent 76%), var(--hero-image, url("./assets/hero-sunset.png"));
}
html[data-theme]:not([data-theme="warm-sage"]) .progress-track { background: var(--line); }
html[data-theme]:not([data-theme="warm-sage"]) .progress-track > span,
html[data-theme]:not([data-theme="warm-sage"]) .progress-fill { background: var(--sage); }
html[data-theme]:not([data-theme="warm-sage"]) .chip { background: var(--sage-soft); border-color: var(--line); color: var(--ink); }
html[data-theme]:not([data-theme="warm-sage"]) .chip.selected,
html[data-theme]:not([data-theme="warm-sage"]) button.chip:hover { color: var(--on-main, #fff); }
html[data-theme]:not([data-theme="warm-sage"]) .next-step { background: linear-gradient(110deg, var(--sage-soft), var(--paper)); border-color: var(--line); }
html[data-theme]:not([data-theme="warm-sage"]) .vision-words,
html[data-theme]:not([data-theme="warm-sage"]) .vision-strip .text-tile { background: linear-gradient(135deg, var(--cream), var(--sage-soft)); color: var(--ink); }
html[data-theme]:not([data-theme="warm-sage"]) .sticker-option,
html[data-theme]:not([data-theme="warm-sage"]) .review-stats > div,
html[data-theme]:not([data-theme="warm-sage"]) .ladder > div { background: var(--cream); border-color: var(--line); color: var(--ink); }
html[data-theme]:not([data-theme="warm-sage"]) .sticker-option:nth-child(3n + 2),
html[data-theme]:not([data-theme="warm-sage"]) .ladder > div:nth-child(even) { background: var(--sage-soft); }
html[data-theme]:not([data-theme="warm-sage"]) .topbar { background: var(--canvas); }

@media (max-width: 1280px) {
  .app-shell { grid-template-columns: 230px minmax(0, 1fr); }
  .sidebar { padding-right: 10px; padding-left: 10px; }
  .workspace { padding-right: 16px; padding-left: 16px; }
  .feature-tile { gap: 10px; padding: 13px; }
  .feature-icon { width: 54px; height: 54px; }
  .feature-icon svg { width: 27px; height: 27px; }
  .feature-copy strong, .feature-tile h3 { font-size: 20px; }
  .feature-copy small, .feature-tile p { font-size: 12px; }
  .dashboard-grid { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); }
  .dashboard-grid > :nth-child(3n) { grid-column: auto; }
  .dashboard-grid .photo-quote { margin-top: 0; }
  .vision-board-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sticker-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .ladder { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .preset-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 940px) {
  .app-shell { display: block; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: min(300px, 86vw); height: 100dvh; min-height: 0; transform: translateX(-105%); box-shadow: 12px 0 40px rgb(35 38 34 / 12%); transition: transform .25s ease; }
  .sidebar.open, .sidebar[data-open="true"], .app-shell.menu-open .sidebar { transform: translateX(0); }
  .sidebar-scrim { position: fixed; inset: 0; z-index: 35; border: 0; background: rgb(20 25 21 / 28%); }
  .mobile-menu { display: inline-flex; }
  .topbar { position: sticky; top: 0; z-index: 30; min-height: 66px; padding: 10px 18px; border-bottom: 1px solid var(--line); background: rgb(255 254 253 / 96%); backdrop-filter: blur(12px); }
  .topbar-search, .search-box { width: min(430px, 54%); }
  .workspace { padding: 17px 18px 30px; }
  .mobile-page-label { display: flex; align-items: center; gap: 7px; padding: 10px 18px 0; color: var(--sage-dark); font-size: 12px; font-weight: 800; letter-spacing: .04em; }
  .hero-grid { grid-template-columns: minmax(0, 1fr) minmax(190px, .35fr); }
  .hero, .quote-card { min-height: 225px; }
  .hero h1 { font-size: 42px; }
  .quote-card blockquote { font-size: 22px; }
  .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .section-grid.three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vision-board-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sticker-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .themes-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
  .topbar { gap: 7px; }
  .topbar-search { display: none; }
  .mobile-brand { min-width: 0; flex: 1; display: flex; align-items: center; gap: 7px; }
  .mobile-brand img { width: 32px; height: 32px; flex: none; object-fit: contain; }
  .mobile-brand span { min-width: 0; display: grid; align-content: center; }
  .mobile-brand strong { display: block; color: var(--ink); font: 500 21px/.95 var(--font-display); white-space: nowrap; }
  .mobile-brand small { display: block; max-width: 140px; margin-top: 2px; color: var(--muted); font-size: 9px; line-height: 1.12; }
  .mobile-search-btn { width: 40px; height: 40px; flex: none; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 10px; background: transparent; color: var(--ink); }
  .mobile-search-btn:hover { background: var(--sage-soft); }
  .mobile-search-btn svg { width: 19px; height: 19px; }
  .topbar-actions { gap: 0; }
  .topbar-actions > .icon-btn, .profile-button > svg { display: none; }
  .topbar-actions .avatar { width: 38px; height: 38px; }
  .profile-button { min-height: 40px; }
  .greeting { display: none; }
  .workspace { display: flex; flex-direction: column; padding: 14px 13px 26px; }
  .today-heading { order: 0; margin: 0 0 13px; padding-top: 0; border-top: 0; }
  .daily-grid { order: 1; }
  .hero-grid { order: 2; margin-top: 24px; }
  .feature-grid { order: 3; }
  .dashboard-grid { order: 4; }
  .hero-grid { grid-template-columns: 1fr; gap: 12px; }
  .hero { min-height: 248px; padding: 24px 22px; background-position: 62% center; }
  .hero h1 { max-width: 340px; font-size: clamp(37px, 9vw, 47px); }
  .hero p { max-width: 300px; font-size: 15px; }
  .hero-script { right: 18px; top: 20px; font-size: 19px; }
  .quote-card { min-height: 96px; padding: 8px 17px; }
  .quote-card::before { height: 20px; font-size: 44px; }
  .quote-card blockquote { max-width: 360px; margin: 7px 0; font-size: 21px; }
  .quote-card cite { font-size: 9px; }
  .feature-grid { gap: 10px; margin-top: 12px; }
  .feature-tile { min-height: 90px; padding: 10px; }
  .feature-icon { width: 46px; height: 46px; }
  .feature-icon svg { width: 23px; height: 23px; }
  .feature-copy strong, .feature-tile h3 { font-size: 18px; white-space: normal; }
  .feature-copy small, .feature-tile p { font-size: 11px; }
  .dashboard-grid, .section-grid, .section-grid.three, .form-grid { grid-template-columns: 1fr; gap: 12px; }
  .dashboard-grid { margin-top: 12px; }
  .panel { padding: 14px; }
  .page-head { align-items: start; flex-direction: column; gap: 13px; }
  .page-head h1 { font-size: 47px; }
  .page-head .chip-row { width: 100%; }
  .date-picker { width: 142px !important; }
  .today-heading .chip-row { flex-wrap: nowrap; gap: 5px; }
  .today-heading .chip-row .btn { min-width: 34px; min-height: 38px; padding: 6px 8px; }
  .today-heading .date-picker { width: 122px !important; min-height: 38px !important; padding: 7px 6px !important; font-size: 12px; }
  .daily-intention textarea { min-height: 75px; }
  .ladder { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vision-board-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .vision-card > img, .vision-words { height: 168px; }
  .sticker-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .sticker-option { min-height: 110px; }
  .sticker-option img { width: 57px; height: 57px; }
  .sticker-option span { font-size: 11px; }
  .modal-card { max-height: 92dvh; padding: 18px 15px; }
  .modal-card h2 { font-size: 30px; }
  .journey-days { gap: 7px; }
  .journey-day { width: 34px; height: 34px; }
  .preset-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .themes-grid, .techniques-grid { grid-template-columns: 1fr; gap: 12px; }
  .theme-card { gap: 8px; }
  .themes-grid .theme-preview { min-height: 165px; }
  .technique-card { padding: 18px; }
  .technique-intro { margin-bottom: 12px; }
  .workspace > .btn[data-go="techniques"] { align-self: flex-start; }
  .technique-method-tabs { margin-right: -13px; padding-right: 13px; }
  .review-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .vision-strip img, .vision-strip > div { height: 108px; }
  .photo-quote { min-height: 190px; }
}

@media (max-width: 390px) {
  .topbar { padding-right: 11px; padding-left: 11px; }
  .mobile-brand small { max-width: 112px; font-size: 8px; }
  .mobile-brand strong { font-size: 19px; }
  .mobile-brand img { width: 29px; height: 29px; }
  .mobile-search-btn { width: 36px; height: 36px; }
  .topbar-actions .avatar { width: 35px; height: 35px; }
  .hero-script { display: none; }
  .feature-grid { grid-template-columns: 1fr 1fr; }
  .feature-tile { align-items: flex-start; flex-direction: column; gap: 6px; }
  .feature-icon { width: 39px; height: 39px; }
  .vision-strip { gap: 4px; }
  .vision-strip img, .vision-strip > div { height: 95px; }
  .rings { gap: 5px; }
  .ring { width: 76px; height: 76px; }
  .ring::before { width: 63px; height: 63px; }
  .ladder { grid-template-columns: 1fr; }
  .vision-card > img, .vision-words { height: 145px; }
  .vision-words { font-size: 25px; }
  .sticker-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .review-stats { grid-template-columns: 1fr; }
  .technique-step { grid-template-columns: 30px minmax(0, 1fr); gap: 8px; padding: 9px; }
  .themes-grid .theme-preview { min-height: 145px; }
  .themes-grid .theme-preview .theme-preview-title { font-size: 20px; }
}

@media (max-width: 360px) {
  .topbar { gap: 5px; }
  .mobile-menu { width: 38px; height: 38px; }
  .mobile-brand { gap: 5px; }
  .mobile-brand img { width: 27px; height: 27px; }
  .mobile-brand strong { font-size: 18px; }
  .mobile-brand small { max-width: 100px; font-size: 7.5px; }
  .mobile-search-btn { width: 34px; height: 34px; }
  .topbar-actions .avatar { width: 34px; height: 34px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
  .theme-card:hover { transform: none; }
}

html[data-calm="true"] .theme-card:hover { transform: none; }
@media (prefers-contrast: more) {
  .theme-card, .technique-card, .technique-step, .technique-practice,
  .technique-method-tabs > button, .technique-method-tabs > a { border-width: 2px; }
  .theme-card.selected, .theme-card[aria-pressed="true"] { outline: 2px solid var(--ink); outline-offset: 2px; }
  .technique-badge { border-width: 2px; }
}
@media (forced-colors: active) {
  .theme-card, .technique-card, .technique-step, .technique-practice,
  .technique-method-tabs > button, .technique-method-tabs > a { border: 1px solid CanvasText; background: Canvas; color: CanvasText; }
  .theme-card.selected, .theme-card[aria-pressed="true"],
  .technique-method-tabs > .active, .technique-method-tabs > [aria-selected="true"],
  .technique-method-tabs > [aria-pressed="true"] { outline: 2px solid Highlight; outline-offset: 2px; }
  .themes-grid .theme-preview { border: 1px solid CanvasText; }
  .technique-badge, li.technique-step::before { border: 1px solid CanvasText; background: Canvas; color: CanvasText; }
}

/* Personal writing and navigation preferences. The reference sidebar remains the default. */
html[data-writing-font="nunito"] { --writing-font: "Nunito Sans", "Avenir Next", Arial, sans-serif; --writing-size: 15px; }
html[data-writing-font="lora"] { --writing-font: "Lora", Georgia, serif; --writing-size: 15px; }
html[data-writing-font="caveat"] { --writing-font: "Caveat", cursive; --writing-size: 20px; }
html[data-writing-font="kalam"] { --writing-font: "Kalam", cursive; --writing-size: 17px; }
html[data-writing-font="patrick"] { --writing-font: "Patrick Hand", cursive; --writing-size: 18px; }
html[data-writing-font="dancing"] { --writing-font: "Dancing Script", cursive; --writing-size: 18px; }
html[data-writing-font="sacramento"] { --writing-font: "Sacramento", cursive; --writing-size: 23px; }
[data-entry-font="nunito"] { --entry-writing-font: "Nunito Sans", "Avenir Next", Arial, sans-serif; --entry-writing-size: 15px; }
[data-entry-font="lora"] { --entry-writing-font: "Lora", Georgia, serif; --entry-writing-size: 15px; }
[data-entry-font="caveat"] { --entry-writing-font: "Caveat", cursive; --entry-writing-size: 20px; }
[data-entry-font="kalam"] { --entry-writing-font: "Kalam", cursive; --entry-writing-size: 17px; }
[data-entry-font="patrick"] { --entry-writing-font: "Patrick Hand", cursive; --entry-writing-size: 18px; }
[data-entry-font="dancing"] { --entry-writing-font: "Dancing Script", cursive; --entry-writing-size: 18px; }
[data-entry-font="sacramento"] { --entry-writing-font: "Sacramento", cursive; --entry-writing-size: 23px; }
html[data-writing-font] .writing-input,
html[data-writing-font] .writing-preview,
[data-entry-font].writing-input,
[data-entry-font].writing-preview {
  font-family: var(--entry-writing-font, var(--writing-font, var(--font-body))) !important;
  font-size: var(--entry-writing-size, var(--writing-size, 15px));
  line-height: 1.65;
  letter-spacing: 0;
}
html[data-writing-font] .writing-input::placeholder { font-family: var(--font-body); font-size: 14px; }
.writing-font-control { min-width: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 7px 10px; margin-bottom: 13px; }
.writing-font-control label { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.writing-font-control label span, .writing-font-control > span { color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .01em; }
.writing-font-control select { width: auto; max-width: 100%; min-width: 150px; min-height: 36px; padding: 6px 31px 6px 10px; border-radius: 9px; background: var(--paper); font-size: 12px; font-weight: 700; }
.writing-font-control small { color: var(--muted); font-size: 10px; }
.writing-font-preview { min-width: 210px; min-height: 42px; display: flex; align-items: center; margin: 0; padding: 7px 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--cream); color: var(--ink); font-family: var(--writing-font, var(--font-body)); font-size: var(--writing-size, 15px); line-height: 1.25; }
.writing-font-preview p { margin: 0; }

.menu-style-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: stretch; gap: 12px; margin: 10px 0 16px; }
.appearance-writing, .appearance-menu { scroll-margin-top: 90px; }
.menu-style-option { min-width: 0; display: grid; align-content: start; gap: 6px; padding: 11px; border: 1px solid var(--line); border-radius: 13px; background: var(--paper); color: var(--ink); text-align: left; transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease; }
.menu-style-option:hover { transform: translateY(-2px); border-color: var(--sage); box-shadow: var(--shadow-soft); }
.menu-style-option[aria-pressed="true"], .menu-style-option.selected { border: 2px solid var(--sage); padding: 10px; box-shadow: 0 0 0 3px var(--sage-soft); }
.menu-style-option > strong { font: 600 21px/1.05 var(--font-display); }
.menu-style-option > small { color: var(--muted); font-size: 11px; line-height: 1.35; }
.menu-style-preview { position: relative; min-width: 0; height: 86px; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: var(--canvas); }
.menu-style-preview[data-menu-preview="sidebar"] { background: linear-gradient(90deg, var(--sage-soft) 0 26%, var(--canvas) 26%); }
.menu-style-preview[data-menu-preview="compact"] { background: linear-gradient(90deg, var(--sage-soft) 0 14%, var(--canvas) 14%); }
.menu-style-preview[data-menu-preview="top"] { background: linear-gradient(180deg, var(--sage-soft) 0 24%, var(--canvas) 24%); }
.menu-style-preview::before, .menu-style-preview::after, .menu-style-preview .preview-side, .menu-style-preview .preview-head, .menu-style-preview .preview-card { position: absolute; display: block; border-radius: 4px; }
.menu-style-preview::before { content: ""; top: 15%; left: 5%; width: 15%; height: 6px; background: var(--sage); box-shadow: 0 15px 0 color-mix(in srgb, var(--sage) 40%, transparent), 0 30px 0 color-mix(in srgb, var(--sage) 27%, transparent); }
.menu-style-preview::after { content: ""; top: 17%; right: 8%; width: 57%; height: 9px; background: color-mix(in srgb, var(--sage) 48%, var(--paper)); box-shadow: 0 19px 0 color-mix(in srgb, var(--accent, var(--sage)) 20%, var(--paper)), 0 40px 0 color-mix(in srgb, var(--sage) 16%, var(--paper)); }
.menu-style-preview[data-menu-preview="compact"]::before { left: 3.5%; width: 6%; }
.menu-style-preview[data-menu-preview="compact"]::after { width: 68%; }
.menu-style-preview[data-menu-preview="top"]::before { top: 9%; left: 7%; width: 12%; height: 5px; box-shadow: 24px 0 0 color-mix(in srgb, var(--sage) 65%, transparent), 48px 0 0 color-mix(in srgb, var(--sage) 48%, transparent), 72px 0 0 color-mix(in srgb, var(--sage) 35%, transparent); }
.menu-style-preview[data-menu-preview="top"]::after { top: 37%; right: 8%; width: 84%; }
.menu-style-preview .preview-side, .menu-style-preview .preview-head, .menu-style-preview .preview-card { display: none; }
.mobile-shortcuts { display: none; }

@media (min-width: 941px) {
  html[data-menu-style="compact"] .app-shell { grid-template-columns: 88px minmax(0, 1fr); }
  html[data-menu-style="compact"] .sidebar { min-width: 0; padding: 18px 8px 12px; }
  html[data-menu-style="compact"] .brand { min-height: 124px; padding: 0 1px 14px; }
  html[data-menu-style="compact"] .brand img { width: 49px; height: 44px; margin-bottom: 4px; }
  html[data-menu-style="compact"] .brand strong { max-width: 100%; font-size: 15px; line-height: 1; letter-spacing: -.04em; }
  html[data-menu-style="compact"] .brand small { max-width: 78px; margin-top: 5px; font-size: 8px; line-height: 1.05; }
  html[data-menu-style="compact"] .nav-group { gap: 4px; }
  html[data-menu-style="compact"] .nav-group-label { height: 1px; overflow: hidden; margin: 9px 9px 6px; background: var(--line); color: transparent; font-size: 0; }
  html[data-menu-style="compact"] .nav-link { width: 54px; min-height: 48px; justify-content: center; margin: 0 auto; padding: 9px; border-radius: 12px; }
  html[data-menu-style="compact"] .nav-link svg { width: 23px; height: 23px; }
  html[data-menu-style="compact"] .nav-link span { display: none; }
  html[data-menu-style="compact"] .nav-link:hover { transform: translateY(-1px); }
  html[data-menu-style="compact"] .sidebar-quote { display: none; }

  html[data-menu-style="top"] .app-shell { display: block; }
  html[data-menu-style="top"] .sidebar { position: sticky; top: 0; width: 100%; height: auto; min-height: 0; display: grid; grid-template-columns: 170px minmax(0, 1fr) 145px; grid-template-rows: repeat(2, minmax(35px, auto)); align-items: center; gap: 3px 15px; overflow: visible; padding: 9px 23px; border-right: 0; border-bottom: 1px solid var(--line); box-shadow: 0 4px 18px rgb(70 63 51 / 4%); }
  html[data-menu-style="top"] .brand { grid-column: 1; grid-row: 1 / 3; min-height: 0; display: grid; grid-template-columns: 47px minmax(0, 1fr); grid-template-rows: auto auto; align-items: center; gap: 0 7px; padding: 0; text-align: left; }
  html[data-menu-style="top"] .brand img { grid-column: 1; grid-row: 1 / 3; width: 45px; height: 45px; margin: 0; }
  html[data-menu-style="top"] .brand strong { grid-column: 2; grid-row: 1; align-self: end; font-size: 23px; }
  html[data-menu-style="top"] .brand small { grid-column: 2; grid-row: 2; align-self: start; margin-top: 2px; font-size: 9px; line-height: 1.1; }
  html[data-menu-style="top"] .nav-group { min-width: 0; display: flex; align-items: center; gap: 2px; margin: 0; overflow-x: auto; scrollbar-width: thin; }
  html[data-menu-style="top"] .nav-group[aria-label="Main"] { grid-column: 2; grid-row: 1; }
  html[data-menu-style="top"] .nav-group[aria-label="Tools"] { grid-column: 2; grid-row: 2; }
  html[data-menu-style="top"] .nav-group[aria-label="Settings"] { grid-column: 3; grid-row: 1 / 3; display: grid; gap: 2px; align-content: center; }
  html[data-menu-style="top"] .nav-group-label, html[data-menu-style="top"] .sidebar-quote { display: none; }
  html[data-menu-style="top"] .nav-link { width: auto; min-width: max-content; min-height: 34px; gap: 6px; padding: 5px 8px; border-radius: 8px; font-size: 12px; white-space: nowrap; }
  html[data-menu-style="top"] .nav-link svg { width: 16px; height: 16px; }
  html[data-menu-style="top"] .nav-link:hover { transform: translateY(-1px); }
  html[data-menu-style="top"] .nav-group[aria-label="Settings"] .nav-link { width: 100%; }
  html[data-menu-style="top"] .topbar { padding-left: 23px; }
  html[data-menu-style="top"] .workspace { width: min(100%, 1630px); padding-left: 23px; padding-right: 23px; }
}

@media (min-width: 941px) and (max-width: 1100px) {
  html[data-menu-style="top"] .sidebar { grid-template-columns: 150px minmax(0, 1fr) 122px; gap: 2px 8px; padding: 8px 13px; }
  html[data-menu-style="top"] .brand { grid-template-columns: 39px minmax(0, 1fr); gap: 0 5px; }
  html[data-menu-style="top"] .brand img { width: 38px; height: 39px; }
  html[data-menu-style="top"] .brand strong { font-size: 20px; }
  html[data-menu-style="top"] .brand small { font-size: 8px; }
  html[data-menu-style="top"] .nav-link { gap: 4px; padding: 5px 6px; font-size: 11px; }
  html[data-menu-style="top"] .nav-link svg { width: 15px; height: 15px; }
}

@media (max-width: 940px) {
  html[data-menu-style="compact"] .sidebar { width: min(288px, 86vw); }
  html[data-menu-style="compact"] .sidebar-quote { display: none; }
  html[data-menu-style="top"] .mobile-shortcuts { position: sticky; top: 66px; z-index: 29; display: flex; align-items: center; gap: 5px; max-width: 100vw; min-height: 49px; overflow-x: auto; overscroll-behavior-x: contain; padding: 6px 13px; border-bottom: 1px solid var(--line); background: var(--paper); scrollbar-width: thin; }
  html[data-menu-style="top"] .mobile-shortcuts .nav-link { width: auto; min-width: max-content; min-height: 35px; gap: 6px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 100px; font-size: 12px; white-space: nowrap; }
  html[data-menu-style="top"] .mobile-shortcuts .nav-link svg { width: 16px; height: 16px; }
  html[data-menu-style="top"] .mobile-shortcuts .nav-link.active { border-color: var(--sage); background: var(--sage-soft); }
  html[data-menu-style="top"] .mobile-page-label { padding-top: 13px; }
  html[data-menu-style="top"] .appearance-writing, html[data-menu-style="top"] .appearance-menu { scroll-margin-top: 130px; }
}

@media (max-width: 680px) {
  .menu-style-grid { grid-template-columns: 1fr; gap: 9px; }
  .menu-style-option { grid-template-columns: minmax(0, 120px) minmax(0, 1fr); grid-template-rows: auto auto; align-items: center; gap: 1px 12px; }
  .menu-style-option > .menu-style-preview { grid-row: 1 / 3; height: 67px; }
  .menu-style-option > strong { grid-column: 2; align-self: end; }
  .menu-style-option > small { grid-column: 2; align-self: start; }
  .writing-font-control select { min-width: 140px; }
}

@media (max-width: 390px) {
  .menu-style-option { grid-template-columns: 97px minmax(0, 1fr); gap: 1px 9px; }
  .menu-style-option > strong { font-size: 19px; }
  .menu-style-option > small { font-size: 10px; }
  .writing-font-control { gap: 6px; }
  .writing-font-control select { min-width: 126px; }
}

@media (prefers-reduced-motion: reduce) { .menu-style-option:hover { transform: none; } }
html[data-calm="true"] .menu-style-option:hover { transform: none; }
@media (forced-colors: active) {
  .menu-style-option, .menu-style-preview, .mobile-shortcuts .nav-link { border: 1px solid CanvasText; }
  .menu-style-option[aria-pressed="true"] { outline: 2px solid Highlight; outline-offset: 2px; }
}

/* Live calendar: dated plans and reflections stay available beyond the 30-day journey. */
.calendar-live {
  min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px 24px;
  margin-bottom: 16px; padding: 16px 20px; border: 1px solid var(--line); border-radius: 16px;
  background: linear-gradient(115deg, var(--sage-soft), var(--paper) 74%);
}
.calendar-live > * { min-width: 0; }
.calendar-live > :last-child { text-align: right; }
.calendar-live strong, .calendar-live time { font-variant-numeric: tabular-nums; }
.calendar-live strong { color: var(--ink); font: 500 clamp(23px, 2.5vw, 33px)/1.1 var(--font-display); }
.calendar-live small { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; line-height: 1.35; }
.calendar-live .eyebrow { margin-bottom: 4px; }

.calendar-layout { min-width: 0; display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(270px, .9fr); align-items: start; gap: 16px; }
.calendar-panel, .calendar-day-detail {
  min-width: 0; padding: 19px; border: 1px solid var(--line); border-radius: 16px;
  background: var(--paper); box-shadow: var(--shadow-soft);
}
.calendar-day-detail { align-self: start; }
.calendar-header { min-width: 0; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-bottom: 17px; }
.calendar-header h2, .calendar-day-detail h2 { margin: 0; font: 500 clamp(25px, 2.4vw, 32px)/1.1 var(--font-display); }
.calendar-header .chip-row, .calendar-header .toolbar { min-width: 0; margin: 0; }
.calendar-header .btn { min-height: 37px; }
.calendar-weekdays, .calendar-grid { min-width: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.calendar-weekdays { margin-bottom: 5px; }
.calendar-weekdays > * { min-width: 0; padding: 7px 2px; color: var(--muted); text-align: center; font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.calendar-grid { gap: 5px; }
.calendar-day {
  min-width: 0; min-height: 74px; display: flex; flex-direction: column; align-items: flex-start; gap: 5px;
  padding: 9px; border: 1px solid var(--line); border-radius: 10px;
  background: color-mix(in srgb, var(--paper) 88%, var(--sage-soft)); color: var(--ink);
  text-align: left; transition: border-color .16s ease, background .16s ease, transform .16s ease;
}
.calendar-day:hover { transform: translateY(-1px); border-color: var(--sage); background: var(--sage-soft); }
.calendar-day.outside { border-color: transparent; background: color-mix(in srgb, var(--canvas) 68%, var(--paper)); color: var(--muted); }
.calendar-day.outside:hover { border-color: var(--line); }
.calendar-day.today { border-color: var(--sage); }
.calendar-day.today .calendar-day-number { font-weight: 800; }
.calendar-day.selected, .calendar-day.selected:hover { border-color: var(--sage); background: var(--sage); color: var(--on-main, #fff); }
.calendar-day.selected:focus-visible { outline-color: var(--ink); }
.calendar-day-number { display: inline-grid; place-items: center; min-width: 23px; min-height: 23px; padding: 0 2px; border-radius: 50%; font-size: 12px; line-height: 1; font-variant-numeric: tabular-nums; }
.calendar-day.today:not(.selected) .calendar-day-number { background: var(--sage-soft); color: var(--sage-dark); }
.calendar-day.selected .calendar-day-number { background: color-mix(in srgb, var(--on-main, #fff) 20%, transparent); }
.calendar-day-dots { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; margin-top: auto; }
.calendar-day-dots > * { width: 6px; height: 6px; flex: none; border-radius: 50%; background: var(--accent, var(--sage)); }
.calendar-day.selected .calendar-day-dots > * { background: var(--on-main, #fff); }
.calendar-day:not(.has-events) .calendar-day-dots { display: none; }
.calendar-day small { max-width: 100%; overflow: hidden; color: inherit; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }

.calendar-day-detail .eyebrow { margin-bottom: 6px; }
.calendar-day-detail > p { margin: 8px 0 16px; color: var(--muted); font-size: 12px; }
.calendar-event { min-width: 0; display: flex; align-items: flex-start; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.calendar-event:last-child { border-bottom: 0; }
.calendar-event > :last-child { min-width: 0; flex: 1; }
.calendar-event-time { flex: none; min-width: 47px; padding-top: 2px; color: var(--sage-dark); font-size: 11px; font-weight: 800; font-variant-numeric: tabular-nums; }
.calendar-event strong { display: block; margin-bottom: 2px; font-size: 13px; line-height: 1.35; }
.calendar-event small { color: var(--muted); font-size: 11px; line-height: 1.4; }
.calendar-event .chip-row { align-items: flex-start; flex-wrap: nowrap; gap: 7px; }
.calendar-event .chip-row input { flex: none; margin: 1px 0 0; }
.calendar-event .text-button { display: block; margin-top: 4px; padding: 2px 0; border: 0; background: none; color: var(--sage-dark); font: 700 11px/1.3 var(--font-body); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.calendar-event .text-button:focus-visible { outline: 2px solid var(--sage); outline-offset: 2px; }
.calendar-summary { min-width: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; margin-top: 16px; }
.calendar-summary > * { min-width: 0; padding: 12px 10px; border: 1px solid var(--line); border-radius: 11px; background: var(--cream); }
.calendar-summary strong { display: block; margin-bottom: 2px; font-size: 17px; font-variant-numeric: tabular-nums; }
.calendar-summary small { display: block; color: var(--muted); font-size: 10px; line-height: 1.35; }
.calendar-note { min-width: 0; margin-top: 15px; padding: 12px 14px; border-left: 3px solid var(--sage); border-radius: 0 10px 10px 0; background: var(--sage-soft); color: var(--ink); font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }

@media (max-width: 1100px) {
  .calendar-layout { grid-template-columns: minmax(0, 1fr); }
  .calendar-day { min-height: 68px; }
}
@media (max-width: 680px) {
  .calendar-live { padding: 14px; }
  .calendar-live strong { font-size: 25px; }
  .calendar-panel, .calendar-day-detail { padding: 14px; }
  .calendar-header { align-items: flex-start; margin-bottom: 11px; }
  .calendar-header h2 { width: 100%; }
  .calendar-grid { gap: 3px; }
  .calendar-day { min-height: 57px; gap: 2px; padding: 5px; border-radius: 8px; }
  .calendar-day-number { min-width: 21px; min-height: 21px; font-size: 11px; }
  .calendar-day-dots { gap: 3px; }
  .calendar-day-dots > * { width: 5px; height: 5px; }
  .calendar-day small { display: none; }
}
@media (max-width: 440px) {
  .calendar-live { align-items: flex-start; flex-direction: column; gap: 8px; }
  .calendar-live > :last-child { text-align: left; }
}

@media (max-width: 390px) {
  .calendar-weekdays > * { font-size: 9px; letter-spacing: 0; }
  .calendar-grid { gap: 2px; }
  .calendar-day { min-height: 51px; padding: 4px; }
  .calendar-summary { gap: 5px; }
  .calendar-summary > * { padding: 9px 6px; }
}
@media (prefers-reduced-motion: reduce) { .calendar-day { transition: none; } }
html[data-calm="true"] .calendar-day { transition: none; }
@media (prefers-contrast: more) {
  .calendar-day, .calendar-panel, .calendar-day-detail { border-width: 2px; }
  .calendar-day.selected { outline: 2px solid var(--ink); outline-offset: 2px; }
}
@media (forced-colors: active) {
  .calendar-day, .calendar-day.selected, .calendar-live, .calendar-panel, .calendar-day-detail,
  .calendar-summary > *, .calendar-note { border: 1px solid CanvasText; background: Canvas; color: CanvasText; }
  .calendar-day.selected, .calendar-day.today { outline: 2px solid Highlight; outline-offset: -2px; }
  .calendar-day-dots > *, .calendar-day.selected .calendar-day-dots > * { background: Highlight; }
}
/* Demo-only disclosure. The customer build does not include this banner. */
.demo-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 17px;
  padding: 11px 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 2px 12px rgb(35 38 34 / 4%);
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1.45;
}
.demo-banner strong {
  flex: none;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--sage-dark);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .09em;
  white-space: nowrap;
}
.demo-banner span { min-width: 0; }
@media (max-width: 680px) {
  .demo-banner { align-items: flex-start; flex-direction: column; gap: 8px; }
}
@media print { .demo-banner { display: none !important; } }
