/* ============ Bloom — sage garden storybook: cream + olive + serif italics ============ */
:root {
  --bg: #F4F0E2;
  --card: #FFFDF4;
  --card-2: #F5F1E1;
  --ink: #4A5238;
  --ink-strong: #3A422C;
  --muted: #8F937D;
  --line: rgba(96, 108, 62, 0.16);
  --line-strong: rgba(96, 108, 62, 0.30);
  --olive: #7C8B4F;
  --olive-2: #67753E;
  --olive-soft: #E9ECD3;
  --green: #7FA05C;
  --green-soft: #E4EDD0;
  --coral: #C97F5F;
  --coral-strong: #B4643F;
  --coral-soft: #F4E3D8;
  --mint-soft: #DFECDC;
  --peach-soft: #F6E9CF;
  --rose-soft: #F2E1DC;
  --sun-soft: #F5EDC8;
  --sky-soft: #E0EAF0;
  --track: #EAE5CF;
  --shadow: 0 14px 30px -18px rgba(74, 82, 56, 0.35);
  --shadow-sm: 0 2px 10px -4px rgba(74, 82, 56, 0.09);
  --radius: 20px;
  --hsky1: #F1EEDA;
  --hsky2: #E9E9CD;
  --hsun: #F2E4AC;
  --hcloud: rgba(255, 253, 244, 0.85);
  --hill1: #DCE2C1;
  --htree1: #B2C089;
  --hill2: #C7D2A2;
  --htree2: #9AAB70;
  --hill3: #A6B87A;
  --htree3: #71864B;
  --hflower: #FFFDF4;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Quicksand", "Nunito", system-ui, sans-serif;
}
[data-theme="dark"] {
  /* cozy midnight: warm neutral charcoal — green lives only on plants and buttons */
  --bg: #161513;
  --card: #211F1C;
  --card-2: #2B2824;
  --ink: #EAE6DD;
  --ink-strong: #FAF7F0;
  --muted: #A8A296;
  --line: rgba(234, 230, 221, 0.13);
  --line-strong: rgba(234, 230, 221, 0.30);
  --olive: #A9BE74;
  --olive-2: #C8DC96;
  --olive-soft: #34382A;
  --green: #A3C476;
  --green-soft: #2F3727;
  --coral: #E2A180;
  --coral-strong: #ECB394;
  --coral-soft: #462E22;
  --mint-soft: #26382F;
  --peach-soft: #453322;
  --rose-soft: #432B2E;
  --sun-soft: #423A1F;
  --sky-soft: #233440;
  --track: #35322C;
  --shadow: 0 16px 34px -16px rgba(0, 0, 0, 0.75);
  --shadow-sm: 0 3px 12px -4px rgba(0, 0, 0, 0.5);
  --hsky1: #201E1B;
  --hsky2: #181714;
  --hsun: #E9E3CD;
  --hcloud: rgba(233, 227, 205, 0.07);
  --hill1: #2A2D20;
  --htree1: #3E4530;
  --hill2: #333927;
  --htree2: #4A5535;
  --hill3: #3F482B;
  --htree3: #5A683D;
  --hflower: #EDEAD8;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
}
/* soft garden-light washes — no pattern, just gentle warmth */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(620px 420px at 88% -8%, rgba(226, 181, 79, 0.06), transparent 70%),
    radial-gradient(680px 480px at -10% 30%, rgba(217, 155, 138, 0.05), transparent 70%),
    radial-gradient(600px 440px at 60% 112%, rgba(124, 139, 79, 0.07), transparent 70%);
}
[data-theme="dark"] body::before {
  background:
    radial-gradient(640px 440px at 88% -8%, rgba(233, 227, 205, 0.04), transparent 70%),
    radial-gradient(620px 460px at 55% 114%, rgba(236, 179, 148, 0.04), transparent 70%);
}

h1, h2, h3 { font-family: var(--font-display); color: var(--ink-strong); font-weight: 570; margin: 0; letter-spacing: 0.1px; }
h1 { font-size: 30px; }
h2 { font-size: 20px; }
h3 { font-size: 16.5px; }
h1 em, h2 em, h3 em, .logo em {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 480;
  color: var(--olive-2);
}
p { margin: 0; }
a { color: var(--olive-2); text-decoration: none; }
button { font-family: inherit; cursor: pointer; color: inherit; -webkit-tap-highlight-color: transparent; }
input, select, textarea { font-family: inherit; color: inherit; }
::placeholder { color: var(--muted); opacity: 0.75; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.spacer { flex: 1; }
.row { display: flex; align-items: center; }
.gap { gap: 10px; }
.wrap { flex-wrap: wrap; }

/* ============ layout ============ */
#app { display: grid; grid-template-columns: 216px 1fr; min-height: 100vh; }
#view { padding: 30px 32px 70px; max-width: 1080px; width: 100%; margin: 0 auto; min-width: 0; }

/* ============ sidebar ============ */
#sidebar {
  position: sticky; top: 0; height: 100vh;
  background: var(--card);
  border-right: 1.5px solid var(--line);
  display: flex; flex-direction: column;
  padding: 24px 12px 16px;
  z-index: 40;
}
.logo {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-display); font-size: 25px; font-style: italic; font-weight: 520; color: var(--ink-strong);
  padding: 0 12px 20px;
}
.logo .logo-flower { font-size: 23px; font-style: normal; animation: bob 3.6s ease-in-out infinite; display: inline-block; }
.nav-item {
  display: flex; align-items: center; gap: 11px;
  width: 100%; border: 0; background: transparent; text-align: left;
  padding: 10px 13px; margin: 2px 0; border-radius: 999px;
  font-family: var(--font-body); font-size: 14px; font-weight: 700; color: var(--muted);
  transition: background 0.15s, color 0.15s;
}
.nav-item:hover { background: var(--card-2); color: var(--ink); }
[data-theme="dark"] .nav-item:hover { background: rgba(255,255,255,0.04); }
.nav-item.active { background: var(--olive-soft); color: var(--olive-2); }
.nav-item .nav-emoji { font-size: 16px; width: 22px; text-align: center; }
.nav-timer-chip {
  margin: 10px 8px 0; padding: 8px 10px; border-radius: 999px;
  background: var(--green-soft); color: var(--olive-2);
  font-weight: 700; font-size: 12.5px; text-align: center; cursor: pointer;
  border: 1.5px solid var(--line); width: calc(100% - 16px); font-variant-numeric: tabular-nums;
}
.nav-timer-chip.paused { background: var(--sun-soft); color: #9A7E1E; }
.sidebar-foot { margin-top: auto; display: flex; align-items: center; gap: 6px; padding: 0 4px; }
.sidebar-foot .streak-mini { font-size: 12px; font-weight: 700; color: var(--muted); white-space: nowrap; overflow: hidden; }

/* ============ cards ============ */
.card {
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 20px 22px;
}
.card + .card { margin-top: 16px; }
.card-title { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.card-title h2 { font-size: 18px; }

/* ============ buttons — thin outlined pills ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 8px 18px; border-radius: 999px;
  background: var(--card); color: var(--ink);
  border: 1.5px solid var(--line-strong);
  font-weight: 700; font-size: 13px;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.12s;
  white-space: nowrap;
}
.btn:hover { background: var(--olive-soft); border-color: var(--olive); color: var(--olive-2); transform: translateY(-1px); }
.btn:active { transform: translateY(0.5px); }
.btn-primary, .btn-green {
  background: var(--olive); color: #FFFDF4; border-color: var(--olive);
  box-shadow: 0 6px 14px -8px rgba(103, 117, 62, 0.7);
}
.btn-primary:hover, .btn-green:hover { background: var(--olive-2); border-color: var(--olive-2); color: #FFFDF4; }
[data-theme="dark"] .btn-primary, [data-theme="dark"] .btn-green { color: #232A18; }
[data-theme="dark"] .btn-primary:hover, [data-theme="dark"] .btn-green:hover { color: #232A18; }
.btn-danger { color: var(--coral-strong); border-color: rgba(180, 100, 63, 0.45); background: var(--card); }
.btn-danger:hover { background: var(--coral-soft); border-color: var(--coral-strong); color: var(--coral-strong); }
.btn-big { padding: 12px 28px; font-size: 14.5px; }
.btn:disabled { opacity: 0.45; pointer-events: none; }
.icon-btn {
  border: 0; background: transparent; color: var(--muted);
  width: 32px; height: 32px; border-radius: 999px; font-size: 14px;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background 0.15s, color 0.15s;
}
.icon-btn:hover { background: var(--olive-soft); color: var(--olive-2); }
.link-btn { border: 0; background: none; color: var(--olive-2); font-weight: 700; font-size: 13px; padding: 4px 8px; border-radius: 999px; font-style: italic; font-family: var(--font-display); }
.link-btn:hover { background: var(--olive-soft); }

.input, select.input, textarea.input {
  width: 100%; padding: 10px 15px;
  border-radius: 16px; border: 1.5px solid var(--line-strong);
  background: var(--card); color: var(--ink);
  font-size: 14px; font-weight: 600; outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input:focus { border-color: var(--olive); box-shadow: 0 0 0 3px rgba(124, 139, 79, 0.15); }
.input.invalid, .input.invalid:focus { border-color: var(--coral-strong); box-shadow: 0 0 0 3px rgba(226, 161, 128, 0.18); animation: nudge 0.3s ease; }
@keyframes nudge { 0%, 100% { transform: translateX(0); } 30% { transform: translateX(-3px); } 60% { transform: translateX(3px); } }
.btn.dim { opacity: 0.55; }
textarea.input { resize: vertical; line-height: 1.7; font-weight: 500; }
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 55%, calc(100% - 13px) 55%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 32px; }
input[type="date"].input, input[type="time"].input, input[type="number"].input { width: auto; }

.chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3.5px 10px; border-radius: 999px;
  font-size: 11.5px; font-weight: 700;
  background: var(--olive-soft); color: var(--olive-2);
  white-space: nowrap;
}
.chip.lilac { background: var(--mint-soft); color: var(--olive-2); }
.chip.green { background: var(--green-soft); color: var(--olive-2); }
.chip.coral { background: var(--coral-soft); color: var(--coral-strong); }
.chip.sun { background: var(--sun-soft); color: #9A7E1E; }
[data-theme="dark"] .chip.sun { color: #E3CE7B; }
.chip-btn { cursor: pointer; border: 1.5px solid transparent; transition: transform 0.1s; }
.chip-btn.disabled { opacity: 0.4; pointer-events: none; }
.peek-pot { overflow: hidden; }
.peek-pot svg { display: block; margin: 0 auto; }
.chip-btn:hover { transform: scale(1.05); }
.chip-btn.sel { border-color: var(--olive); background: var(--olive-soft); color: var(--olive-2); }

/* ============ stat tiles ============ */
.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin: 22px 0; }
.stat {
  background: var(--card); border: 1.5px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); padding: 14px 16px;
  display: flex; align-items: center; gap: 13px;
}
.stat-tile { width: 46px; height: 46px; border-radius: 46% 54% 52% 48% / 58% 46% 54% 42%; display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
.stat:nth-child(2n) .stat-tile { border-radius: 58% 42% 46% 54% / 44% 54% 46% 56%; }
.stat-num { font-family: var(--font-display); font-size: 23px; font-weight: 600; color: var(--ink-strong); line-height: 1.1; }
.stat-label { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }

/* ============ header / greeting ============ */
/* day-planner timeline (calendar day panel, "timeline" mode) */
.day-grid-wrap { margin-top: 10px; }
.day-grid-scroll { max-height: 480px; overflow-y: auto; overscroll-behavior: contain; border: 1.5px solid var(--line); border-radius: 14px; background: var(--card); }
.day-grid { position: relative; margin: 12px 0 14px; }
.input.attn { border-color: var(--olive); box-shadow: 0 0 0 3px var(--olive-soft); transition: box-shadow 0.25s; }
.dg-hour { position: absolute; left: 0; right: 0; border-top: 1.5px dashed var(--line); }
.dg-label { position: absolute; top: -8px; left: 0; font-size: 10.5px; font-weight: 700; color: var(--muted); background: var(--card); padding: 0 6px 0 10px; }
.dg-ev {
  position: absolute; text-align: left; overflow: hidden; cursor: pointer;
  background: color-mix(in srgb, var(--ev-c) 22%, var(--card));
  border: 1.5px solid color-mix(in srgb, var(--ev-c) 55%, var(--line));
  border-left: 4px solid var(--ev-c);
  border-radius: 9px; padding: 3px 8px;
  display: flex; flex-direction: column; gap: 0;
}
.dg-ev:hover { background: color-mix(in srgb, var(--ev-c) 34%, var(--card)); }
.dg-ev { touch-action: none; transition: top 0.16s ease; } /* draggable — snaps settle softly */
.dg-ev.dragging { z-index: 4; box-shadow: 0 10px 24px -8px rgba(60, 60, 40, 0.4); opacity: 0.92; cursor: grabbing; transition: none; }
/* the name never gives up its line — if a block is short, the clock is what gets cut */
.dg-ev-t { font-size: 12px; font-weight: 700; color: var(--ink-strong); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-right: 16px; flex: 0 0 auto; }
.dg-ev-time { font-size: 10.5px; font-weight: 600; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* a half-hour block: one row, name first, time alongside */
.dg-ev.tight { flex-direction: row; align-items: baseline; gap: 6px; padding-right: 22px; }
.dg-ev.tight .dg-ev-t { flex: 0 1 auto; padding-right: 0; }
.dg-ev.tight .dg-ev-time { flex: 0 0 auto; }
.dg-x {
  position: absolute; top: 2px; right: 5px; font-size: 11px; font-weight: 700;
  color: var(--muted); padding: 2px 3px; border-radius: 6px; cursor: pointer; line-height: 1;
}
.dg-x:hover { color: var(--coral-strong); background: rgba(0, 0, 0, 0.05); }

.signin-banner {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--card-2); border: 1.5px solid var(--line);
  border-radius: var(--radius); padding: 10px 16px; margin-bottom: 18px;
  font-size: 13.5px; color: var(--muted); font-weight: 600;
}
.signin-banner strong { color: var(--olive-2); }
.signin-banner .btn { padding: 6px 14px; font-size: 13px; }
.view-head { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; margin-bottom: 6px; }
.view-head .sub { color: var(--muted); font-weight: 600; margin-top: 8px; font-size: 13.5px; margin-left: 3px; }
.daily-quote { font-family: var(--font-display); font-style: italic; font-size: 16.5px; color: var(--olive-2); margin-top: 7px; max-width: 620px; line-height: 1.45; margin-left: 3px; }
.daily-quote .quote-by { font-family: var(--font-body, 'Quicksand', sans-serif); font-style: normal; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.squiggle { position: relative; display: inline-block; }
.squiggle::after {
  content: ""; position: absolute; left: 2px; right: 2px; bottom: -8px; height: 8px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 10' preserveAspectRatio='none'%3E%3Cpath d='M0 6 Q 7.5 0, 15 6 T 30 6 T 45 6 T 60 6 T 75 6 T 90 6 T 105 6 T 120 6' fill='none' stroke='%23C99A78' stroke-width='3.2' stroke-linecap='round'/%3E%3C/svg%3E") repeat-x;
  background-size: 96px 8px;
  opacity: 0.9;
}

/* ============ grids ============ */
.grid-2 { display: grid; grid-template-columns: 1.2fr 1fr; gap: 16px; align-items: start; }
.col { display: flex; flex-direction: column; gap: 16px; }
.col > .card + .card { margin-top: 0; }

/* ============ tasks ============ */
.check {
  width: 24px; height: 24px; border-radius: 50%; flex-shrink: 0;
  border: 1.8px solid var(--line-strong); background: var(--card);
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0; transition: background 0.15s, border-color 0.15s;
}
.check .checkmark { color: #FFFDF4; font-size: 12px; font-weight: 800; transform: scale(0); transition: transform 0.18s cubic-bezier(0.6, 1.8, 0.6, 1); }
[data-theme="dark"] .check .checkmark { color: #232A18; }
.check:hover { border-color: var(--olive); }
.check.on { background: var(--olive); border-color: var(--olive); }
.check.on .checkmark { transform: scale(1); }
.task-row {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 10px; border-radius: 16px;
  transition: background 0.12s;
}
.task-row:hover { background: var(--card-2); }
[data-theme="dark"] .task-row:hover { background: rgba(255,255,255,0.03); }
.task-row .task-main { min-width: 0; flex: 1; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.task-title { font-weight: 600; overflow-wrap: anywhere; }
.task-row.done .task-title { text-decoration: line-through; color: var(--muted); }
.task-row .task-actions { display: flex; opacity: 0; transition: opacity 0.15s; }
.task-row:hover .task-actions, .task-row:focus-within .task-actions { opacity: 1; }
.chip.overdue { background: var(--coral-soft); color: var(--coral-strong); }
.chip.due-today { background: var(--sun-soft); color: #9A7E1E; }
[data-theme="dark"] .chip.due-today { color: #E3CE7B; }
.group-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); margin: 16px 0 6px; display: flex; align-items: center; gap: 8px; }
.group-label:first-child { margin-top: 0; }
.add-task-form { display: flex; gap: 9px; flex-wrap: wrap; align-items: center; }
.add-task-form .grow { flex: 1 1 200px; }
details.done-details summary { cursor: pointer; font-weight: 700; color: var(--muted); padding: 6px 4px; border-radius: 999px; list-style: none; }
details.done-details summary::-webkit-details-marker { display: none; }
details.done-details summary:hover { color: var(--ink); }

/* ============ calendar ============ */
.cal-wrap { display: grid; grid-template-columns: 1.7fr 1fr; gap: 16px; align-items: start; }
.cal-wrap > .card { margin-top: 0; } /* .card + .card stacking margin must not offset the day panel */
.cal-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.cal-title { font-family: var(--font-display); font-size: 21px; font-weight: 570; color: var(--ink-strong); min-width: 160px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-dow { text-align: center; font-size: 10px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; padding: 4px 0; }
.cal-cell {
  min-height: 84px; border-radius: 14px; padding: 7px 7px 6px;
  background: var(--card-2); border: 1.5px solid transparent;
  cursor: pointer; text-align: left; display: flex; flex-direction: column;
  justify-content: flex-start; align-items: flex-start; gap: 4px;
  transition: border-color 0.12s, background 0.12s; overflow: hidden; position: relative;
  font-family: inherit; color: inherit;
}
.cal-cell-top { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.cal-evs { display: flex; flex-direction: column; gap: 3px; width: 100%; min-width: 0; overflow: hidden; }
.cal-ev { display: flex; align-items: center; gap: 5px; width: 100%; min-width: 0; font-size: 10.5px; font-weight: 600; line-height: 1.25; color: var(--ink); }
.cal-ev-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.cal-ev-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-more { font-size: 9.5px; font-weight: 700; color: var(--muted); padding-left: 1px; }
.cal-ev-star { font-size: 9px; color: #E0B54F; flex-shrink: 0; line-height: 1; }
.cal-ev.imp .cal-ev-t { font-weight: 800; color: var(--ink-strong); }
.event-star { color: #E0B54F; }
.day-chip { min-width: 30px; padding: 6px 0 !important; text-align: center; justify-content: center; }
[data-theme="dark"] .cal-cell { background: var(--card-2); }
.cal-cell:hover { border-color: var(--line-strong); }
.cal-cell.other { opacity: 0.4; }
.cal-cell.today { background: var(--olive-soft); }
.cal-cell.selected { border-color: var(--olive); }
.cal-num { font-size: 12px; font-weight: 700; color: var(--muted); font-family: var(--font-display); }
.cal-cell.today .cal-num { color: var(--olive-2); }
.cal-chip {
  font-size: 10.5px; font-weight: 700; padding: 2px 7px; border-radius: 999px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%;
}
.cal-chip.task-chip { background: var(--track); }
.cal-chip.task-chip.done { text-decoration: line-through; opacity: 0.6; }
.cal-dots { display: flex; gap: 4px; align-items: center; }
.cal-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.cal-dot.task { background: transparent; border: 1.7px solid var(--muted); }
.cal-dot.focus { background: var(--green); }
.day-panel { position: sticky; top: 24px; }
.day-panel h3 { margin-bottom: 4px; }
.event-row { display: flex; align-items: center; gap: 9px; padding: 8px 9px; border-radius: 14px; }
.event-row:hover { background: var(--card-2); }
[data-theme="dark"] .event-row:hover { background: rgba(255,255,255,0.03); }
.event-bar { width: 4.5px; align-self: stretch; border-radius: 4px; flex-shrink: 0; }
.event-time { font-size: 11.5px; font-weight: 700; color: var(--muted); min-width: 52px; font-variant-numeric: tabular-nums; }
.event-title { font-weight: 600; flex: 1; overflow-wrap: anywhere; }
.event-row .task-actions { display: flex; opacity: 0; transition: opacity 0.15s; }
.event-row:hover .task-actions { opacity: 1; }
.swatches { display: flex; gap: 7px; flex-wrap: wrap; }
.swatch { width: 26px; height: 26px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; padding: 0; transition: transform 0.1s; }
.swatch:hover { transform: scale(1.12); }
.swatch.sel { border-color: var(--ink); box-shadow: 0 0 0 2px var(--card) inset; }

/* ============ notes ============ */
.notes-wrap { display: grid; grid-template-columns: 290px 1fr; gap: 16px; align-items: start; }
/* grid items refuse to shrink below content by default — the editor's inputs would
   otherwise push the whole page wider than a phone screen */
.notes-wrap > *, .grid-2 > *, .cal-wrap > * { min-width: 0; }
.note-card {
  display: block; width: 100%; text-align: left; background: var(--card);
  border: 1.5px solid color-mix(in srgb, var(--note-color, #D89B8A) 45%, var(--line));
  border-radius: 16px; padding: 12px 14px 12px 17px; margin-bottom: 9px; cursor: pointer;
  transition: border-color 0.12s, transform 0.12s, box-shadow 0.12s; position: relative; overflow: hidden;
  font-family: inherit; color: inherit;
}
.note-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--note-color, var(--olive)); opacity: 0.9; }
.note-card:hover { transform: translateY(-1px); border-color: color-mix(in srgb, var(--note-color, #D89B8A) 75%, var(--line)); }
.note-card.sel {
  border-color: var(--note-color, var(--olive));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--note-color, var(--olive)) 20%, transparent);
}
.note-card-title { font-weight: 700; font-size: 14px; color: var(--ink-strong); display: flex; gap: 6px; align-items: center; }
.note-card-snippet { font-size: 12px; color: var(--muted); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.note-card-meta { font-size: 11px; color: var(--muted); margin-top: 6px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.note-editor .title-in { font-family: var(--font-display); font-size: 23px; font-weight: 570; border: 0; background: transparent; width: 100%; outline: none; color: var(--ink-strong); padding: 4px 2px; }
.note-body { min-height: 46vh; width: 100%; outline: none; font-size: 15px; line-height: 1.8; padding: 4px 2px; color: var(--ink); font-weight: 500; overflow-wrap: anywhere; }
.note-body:empty::before { content: attr(data-placeholder); color: var(--muted); opacity: 0.7; pointer-events: none; }
.note-body ul, .note-body ol { padding-left: 24px; margin: 4px 0; }
.note-body li { margin: 2px 0; }
.note-body b, .note-body strong { font-weight: 700; color: var(--ink-strong); }
.note-body mark { border-radius: 5px; padding: 0 3px; color: inherit; }
.note-body mark.hl-sun { background: var(--sun-soft); }
.note-body mark.hl-mint { background: var(--green-soft); }
.note-body mark.hl-rose { background: var(--rose-soft); }
.note-body mark.hl-sky { background: var(--sky-soft); }
.note-body ul.checks { list-style: none; padding-left: 6px; }
.note-body ul.checks li { position: relative; padding-left: 27px; margin: 4px 0; }
.note-body ul.checks li::before {
  content: ''; position: absolute; left: 0; top: 4.5px;
  width: 15px; height: 15px; border: 1.6px solid var(--line-strong);
  border-radius: 5px; background: var(--card); cursor: pointer;
}
.note-body ul.checks li.done { color: var(--muted); text-decoration: line-through; }
.note-body ul.checks li.done::before { background: var(--olive); border-color: var(--olive); }
.note-body ul.checks li.done::after { content: '✓'; position: absolute; left: 3.5px; top: 2.5px; font-size: 10.5px; font-weight: 800; color: #FFFDF4; text-decoration: none; cursor: pointer; }
.note-toolbar { display: flex; gap: 3px; align-items: center; padding: 2px 0 8px; }
.fmt-btn { width: 28px; height: 28px; font-size: 13px; }
.fmt-b { font-family: Georgia, serif; font-weight: 800; }
.fmt-sep { width: 1.5px; height: 18px; background: var(--line-strong); margin: 0 6px; border-radius: 2px; }
.hl-btn { width: 20px; height: 20px; border-radius: 7px; border: 1.6px solid var(--line-strong); }
.hl-btn:hover { transform: scale(1.12); background: inherit; }
.hl-sun.hl-btn { background: var(--sun-soft); }
.hl-mint.hl-btn { background: var(--green-soft); }
.hl-rose.hl-btn { background: var(--rose-soft); }
.hl-sky.hl-btn { background: var(--sky-soft); }
.editor-meta { display: flex; gap: 9px; align-items: center; flex-wrap: wrap; padding: 8px 0 10px; border-bottom: 1.5px dashed var(--line-strong); margin-bottom: 8px; }
.saved-flash { font-size: 12px; font-weight: 700; color: var(--olive-2); opacity: 0; transition: opacity 0.25s; font-style: italic; font-family: var(--font-display); }
.saved-flash.show { opacity: 1; }

/* ============ focus ============ */
.focus-hero { text-align: center; padding: 34px 24px 30px; }
.timer-ring-wrap { position: relative; width: 230px; height: 230px; margin: 16px auto; }
.timer-ring { transform: rotate(-90deg); }
.timer-ring .track { fill: none; stroke: var(--track); stroke-width: 12; }
.timer-ring .prog { fill: none; stroke-width: 12; stroke-linecap: round; transition: stroke-dashoffset 0.4s linear; }
.timer-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.timer-time { font-family: var(--font-body); font-size: 42px; font-weight: 700; color: var(--ink-strong); font-variant-numeric: tabular-nums; line-height: 1; }
.timer-skill { font-weight: 600; color: var(--muted); font-size: 13.5px; font-style: italic; font-family: var(--font-display); }
.dur-chips { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin: 16px 0 6px; }
.dur-chip {
  border: 1.5px solid var(--line-strong); background: var(--card); color: var(--ink);
  font-weight: 700; font-size: 13.5px; padding: 8px 17px; border-radius: 999px; transition: all 0.12s;
}
.dur-chip:hover { border-color: var(--olive); }
.dur-chip.sel { border-color: var(--olive); background: var(--olive-soft); color: var(--olive-2); }
.dur-custom { width: 76px !important; text-align: center; border-radius: 999px !important; }
.focus-tabs {
  display: inline-flex; gap: 4px; padding: 4px; margin-bottom: 12px;
  background: var(--card-2); border: 1.5px solid var(--line); border-radius: 999px;
}
.focus-tab {
  border: none; background: transparent; color: var(--muted); cursor: pointer;
  font-family: inherit; font-size: 13px; font-weight: 700;
  padding: 7px 16px; border-radius: 999px; transition: background 0.12s, color 0.12s;
}
.focus-tab:hover { color: var(--ink); }
.focus-tab.sel { background: var(--olive-soft); color: var(--olive-2); }
[data-theme="light"] .focus-tab.sel, :root:not([data-theme="dark"]) .focus-tab.sel { background: var(--olive); color: #FFFEF8; }
.skill-pick { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin: 14px 0 4px; }
.skill-chip {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1.5px solid var(--line-strong); background: var(--card);
  font-weight: 700; font-size: 13.5px; color: var(--ink);
  padding: 7px 15px; border-radius: 999px; transition: all 0.12s;
}
.skill-chip:hover { transform: translateY(-1px); border-color: var(--olive); }
.skill-chip.sel { border-color: transparent; color: #FFFDF4; }
.session-row { display: flex; align-items: center; gap: 10px; padding: 7px 9px; border-radius: 14px; font-weight: 600; }
.session-row:hover { background: var(--card-2); }
[data-theme="dark"] .session-row:hover { background: rgba(255,255,255,0.03); }
.session-row .del { opacity: 0; }
.session-row:hover .del { opacity: 1; }
.pulse-drop { display: inline-block; animation: drip 1.6s ease-in-out infinite; }

/* ============ garden ============ */
.garden-top { display: flex; gap: 28px; align-items: flex-start; flex-wrap: wrap; }
.garden-top .gt-left { flex: 1 1 260px; min-width: 250px; }
.garden-top .gt-right { flex: 1.2 1 300px; min-width: 260px; }
.garden-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 16px; margin-top: 16px; align-items: stretch; }
.garden-grid > .card { margin-top: 0; } /* the .card + .card stacking margin doesn't belong inside a grid */
.plant-card { text-align: center; display: flex; flex-direction: column; align-items: center; padding: 16px 16px 16px; position: relative; }
/* fixed-height rows inside so every card matches exactly, row after row */
.plant-card .plant-wrap { height: 130px; display: flex; align-items: flex-end; justify-content: center; }
.plant-card .plant { margin: -2px 0 0; }
.plant-name { font-family: var(--font-display); font-size: 17px; font-weight: 570; color: var(--ink-strong); display: flex; align-items: center; gap: 6px; margin-top: 2px; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; height: 24px; }
.lvl-badge { position: absolute; top: 13px; right: 13px; font-family: var(--font-display); font-style: italic; }
.xp-bar { width: 100%; height: 8px; border-radius: 99px; background: var(--track); overflow: hidden; margin: 10px 0 5px; }
.xp-fill { height: 100%; border-radius: 99px; background: linear-gradient(90deg, #7C8B4F, #9DB56A); transition: width 0.5s cubic-bezier(0.5, 1.4, 0.6, 1); }
.plant-stats { font-size: 11.5px; color: var(--muted); font-weight: 600; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; height: 16px; }
.plant-card .row { margin-top: auto; padding-top: 11px; }
.mini-bars { margin-top: 8px; width: 100%; height: 48px; display: flex; justify-content: center; }
.mini-bars svg { height: 48px; width: auto; max-width: 100%; }
.sway { animation: sway 4.5s ease-in-out infinite alternate; transform-origin: 60px 102px; }
.plant-card:hover .sway { animation-duration: 1.7s; }
.new-plant-card {
  border: 1.5px dashed var(--line-strong); background: transparent; box-shadow: none;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  min-height: 230px; cursor: pointer; border-radius: var(--radius); color: var(--muted);
  font-weight: 700; font-family: inherit; font-size: 13.5px; transition: all 0.15s;
}
.new-plant-card:hover { border-color: var(--olive); color: var(--olive-2); background: var(--olive-soft); }
.new-plant-card .plus { font-size: 32px; }
.new-plant-card.full { cursor: default; opacity: 0.75; }
.new-plant-card.full:hover { border-color: var(--line-strong); color: var(--muted); background: transparent; }

/* ============ garden banner + tiers (GOBE-style) ============ */
.garden-banner {
  position: relative; margin-top: 20px;
  border-radius: var(--radius); overflow: hidden;
  border: 1.5px solid var(--line);
}
.garden-banner > div > svg { display: block; width: 100%; height: 212px; }
/* scene mode: the banner IS the garden — your plants stand in the meadow, text stays up top */
.garden-banner.scene > div > svg { height: 256px; }
/* text sits up top in both states — empty (hills) and grown (scene) */
.garden-banner .banner-overlay { justify-content: flex-start; padding: 22px 20px 0; }
.garden-banner.scene .banner-overlay { pointer-events: none; }
.scene-plant { cursor: pointer; }
.scene-tip {
  position: absolute; transform: translate(-50%, -100%);
  background: var(--ink-strong); color: var(--bg);
  font-size: 11.5px; font-weight: 700; padding: 4px 9px; border-radius: 8px;
  pointer-events: none; opacity: 0; transition: opacity 0.12s; white-space: nowrap; z-index: 3;
}
.scene-tip.show { opacity: 1; }
.scene-plant.sel .scene-lift { filter: drop-shadow(0 0 6px var(--olive-2)); }

/* garden scenery: gentle life. Day pieces hide at night and vice versa. */
.scene-cloud { animation: cloud-drift 46s ease-in-out infinite alternate; }
@keyframes cloud-drift { from { transform: translateX(-26px); } to { transform: translateX(26px); } }
.scene-star { animation: twinkle 3.4s ease-in-out infinite; }
@keyframes twinkle { 0%, 100% { opacity: 0.2; } 50% { opacity: 0.95; } }
.scene-fly { animation: firefly 9s ease-in-out infinite alternate; }
@keyframes firefly {
  0% { transform: translate(0, 0); }
  33% { transform: translate(14px, -10px); }
  66% { transform: translate(-10px, -18px); }
  100% { transform: translate(8px, -4px); }
}
.scene-flutter { animation: flutter 13s ease-in-out infinite alternate; }
@keyframes flutter {
  0% { transform: translate(0, 0) rotate(0deg); }
  30% { transform: translate(26px, -14px) rotate(9deg); }
  60% { transform: translate(-10px, -24px) rotate(-7deg); }
  100% { transform: translate(18px, -6px) rotate(5deg); }
}
.scene-night { display: none; }
[data-theme="dark"] .scene-night { display: initial; }
[data-theme="dark"] .scene-day { display: none; }
.plant-card.selected { border-color: var(--olive); box-shadow: 0 0 0 3px rgba(124, 139, 79, 0.15); }
.scene-plant .scene-lift { transition: transform 0.25s ease; }
.scene-plant:hover .scene-lift { transform: translateY(-6px); }
.banner-overlay {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px;
  text-align: center; color: #FFFEF8; padding: 44px 20px 0;
  text-shadow: 0 1px 12px rgba(58, 66, 44, 0.5);
}
[data-theme="dark"] .banner-overlay { color: #F2F4E4; text-shadow: 0 1px 12px rgba(0, 0, 0, 0.55); }
.banner-line1 { font-weight: 700; font-size: 14px; letter-spacing: 0.2em; }
.banner-line2 { font-size: 12px; font-weight: 600; opacity: 0.94; letter-spacing: 0.04em; }
.tier-strip { margin: 20px 6px 24px; }
.tier-bar { height: 4px; border-radius: 99px; background: var(--track); overflow: hidden; }
.tier-fill { height: 100%; border-radius: 99px; background: var(--olive); transition: width 0.6s ease; }
.tier-row { display: flex; align-items: flex-start; gap: 12px; margin-top: 12px; }
.tier-num { font-size: 10.5px; letter-spacing: 0.16em; color: var(--muted); font-weight: 700; }
.tier-name { font-family: var(--font-display); font-size: 18px; font-weight: 570; color: var(--ink-strong); margin-top: 2px; }
.tier-cap { font-size: 11px; font-weight: 600; margin-top: 2px; }
.tier-center { flex: 1; text-align: center; font-family: var(--font-display); font-style: italic; font-size: 14.5px; color: var(--muted); padding-top: 10px; }
.tier-side.right { text-align: right; }

/* ============ charts ============ */
.bars { display: block; }
.bars .bar-label { font-size: 8.5px; font-weight: 700; fill: var(--muted); font-family: var(--font-body); }
.bars .bar-col { cursor: default; }
.bars .bar-rect { transition: opacity 0.12s; }
.bars .bar-col:hover .bar-rect { opacity: 0.78; }
.chart-tip-wrap { position: relative; padding-top: 36px; } /* reserved band the tooltip lives in — it never covers bars or title */
.hm { display: block; overflow: visible; }
.hm rect { rx: 3px; }
.hm .hm-lab { font-size: 9px; font-weight: 700; fill: var(--muted); font-family: var(--font-body); letter-spacing: 0.04em; }
.hm .hm-today { stroke: var(--olive); stroke-width: 1.6; }
[data-theme="dark"] .hm .hm-today { stroke: #C9DB9B; }
.hm rect[data-date]:hover { stroke: var(--olive); stroke-width: 1.4; }
.hm-tip, .chart-tip {
  position: absolute; transform: translate(-50%, -100%);
  background: #3A422C; color: #F7F4E6;
  padding: 5px 11px; border-radius: 9px;
  font-size: 11.5px; font-weight: 700; white-space: nowrap;
  opacity: 0; pointer-events: none; transition: opacity 0.12s;
  box-shadow: 0 3px 10px rgba(58, 66, 44, 0.25); z-index: 5;
}
.hm-tip.show, .chart-tip.show { opacity: 1; }
[data-theme="dark"] .hm-tip, [data-theme="dark"] .chart-tip { background: #E9EDCF; color: #232B15; box-shadow: 0 3px 10px rgba(0, 0, 0, 0.4); }
.hm .h0 { fill: rgba(96, 108, 62, 0.08); }
.hm .h1 { fill: #D6DFAE; }
.hm .h2 { fill: #B3C77E; }
.hm .h3 { fill: #8CA854; }
.hm .h4 { fill: #67833A; }
[data-theme="dark"] .hm .h0 { fill: rgba(230, 232, 212, 0.08); }
[data-theme="dark"] .hm .h1 { fill: #3D4A28; }
[data-theme="dark"] .hm .h2 { fill: #55663A; }
[data-theme="dark"] .hm .h3 { fill: #7A9450; }
[data-theme="dark"] .hm .h4 { fill: #A3C36F; }
.hm-legend { display: flex; align-items: center; gap: 4px; font-size: 11px; color: var(--muted); font-weight: 600; }
.hm-legend .cell { width: 11px; height: 11px; border-radius: 3px; }

/* ============ species picker + keepsake shelf ============ */
.species-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin: 6px 0 2px; }
.species-cell {
  border: 1.5px solid transparent; background: transparent; border-radius: 14px;
  padding: 6px 2px 5px; display: flex; flex-direction: column; align-items: center; gap: 1px;
  transition: all 0.12s; font-family: inherit; cursor: pointer;
}
.species-cell:hover { background: var(--card-2); }
.species-cell.sel { border-color: var(--olive); background: var(--olive-soft); }
.species-name { font-size: 10.5px; font-weight: 700; color: var(--muted); }
.species-cell.sel .species-name { color: var(--olive-2); }
/* plant book: species × stages; unreached stages are silhouettes */
.book-row { display: flex; align-items: center; gap: 14px; padding: 10px 0 6px; border-top: 1px solid var(--line); }
.book-name { width: 88px; flex-shrink: 0; font-weight: 800; font-size: 13.5px; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
/* min-width:0 or the row can't shrink past the art's natural width and the last plant
   gets shoved off the edge of the sheet */
.book-stages { display: flex; gap: 8px; flex: 1; min-width: 0; justify-content: space-between; }
.book-stage { text-align: center; flex: 1; min-width: 0; }
/* the art scales with its column rather than holding a fixed 52px */
.book-art svg { display: block; width: 100%; max-width: 52px; height: auto; margin: 0 auto; }
.book-stage-label { font-size: 10px; font-weight: 700; }
.book-silhouette svg { filter: brightness(0) opacity(0.15); }
[data-theme="dark"] .book-silhouette svg { filter: brightness(0) invert(1) opacity(0.22); }

/* ============ interactive tour: dim everything, spotlight one real section ============ */
.tour { position: fixed; inset: 0; z-index: 300; }
.tour-hole {
  position: fixed; border-radius: 18px; pointer-events: none;
  box-shadow: 0 0 0 200vmax rgba(58, 66, 44, 0.5);
  transition: left 0.35s ease, top 0.35s ease, width 0.35s ease, height 0.35s ease;
}
[data-theme="dark"] .tour-hole { box-shadow: 0 0 0 200vmax rgba(0, 0, 0, 0.62); }
.tour-tip {
  position: fixed; max-width: 300px; z-index: 301;
  background: var(--card); border: 1.5px solid var(--line); border-radius: 16px;
  padding: 14px 16px 12px; box-shadow: var(--shadow);
  opacity: 0; visibility: hidden; transform: translateY(4px);
  transition: opacity 0.22s ease, visibility 0.22s, transform 0.22s ease, left 0.35s ease, top 0.35s ease;
}
.tour-tip.show { opacity: 1; visibility: visible; transform: none; }
.tour-kicker { font-size: 10px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-bottom: 3px; }
.tour-tip h3 { font-size: 17px; margin-bottom: 4px; }
.tour-tip p { font-size: 13px; font-weight: 600; color: var(--muted); line-height: 1.55; }
.tour-foot { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.shelf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.keepsake { border: 1.5px dashed var(--line-strong); border-radius: 14px; padding: 12px 12px 10px; text-align: center; opacity: 0.6; }
.keepsake .keepsake-ic {
  width: 38px; height: 38px; margin: 0 auto 6px;
  display: flex; align-items: center; justify-content: center;
  background: var(--track); color: var(--muted);
  border-radius: 46% 54% 52% 48% / 58% 46% 54% 42%;
}
.keepsake-name { font-family: var(--font-display); font-size: 13.5px; font-weight: 570; color: var(--ink-strong); }
.keepsake.got {
  border-style: solid; opacity: 1;
  border-color: color-mix(in srgb, #E0B54F 55%, var(--line));
  background: color-mix(in srgb, #E0B54F 7%, var(--card));
}
.keepsake.got .keepsake-ic { background: var(--sun-soft); color: #A87E00; }
[data-theme="dark"] .keepsake.got .keepsake-ic { color: #E3CE7B; }

/* ============ toasts / modal ============ */
#toasts { position: fixed; top: 18px; right: 18px; z-index: 1000; display: flex; flex-direction: column; gap: 9px; pointer-events: none; }
.toast {
  display: flex; align-items: center; gap: 9px;
  background: var(--card); color: var(--ink); font-weight: 600; font-size: 13.5px;
  border: 1.5px solid var(--line-strong); border-radius: 999px; padding: 11px 18px;
  box-shadow: var(--shadow); max-width: 360px;
  opacity: 0; transform: translateX(24px); transition: all 0.28s cubic-bezier(0.5, 1.4, 0.6, 1);
}
.toast.in { opacity: 1; transform: translateX(0); }
.toast-emoji { font-size: 16px; }
.modal-overlay {
  position: fixed; inset: 0; z-index: 900;
  background: rgba(58, 66, 44, 0.4); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
  opacity: 0; transition: opacity 0.2s;
  overscroll-behavior: contain; /* a scroll that runs out inside the sheet stays there */
}
/* while a modal is up the page is pinned (ui.js holds the offset and puts it back) */
.modal-open, .modal-open body { overflow: hidden; }
.modal-open body { position: fixed; left: 0; right: 0; width: 100%; }
.modal-overlay.in { opacity: 1; }
.modal { position: relative; width: 100%; max-width: 470px; max-height: 86vh; overflow: auto; padding: 26px 26px 24px; transform: translateY(12px) scale(0.98); transition: transform 0.22s cubic-bezier(0.5, 1.4, 0.6, 1); }
.modal-overlay.in .modal { transform: none; }
.modal-x { position: absolute; top: 12px; right: 12px; }
.confirm-msg { font-weight: 600; font-size: 15px; margin-bottom: 18px; line-height: 1.55; }
.emoji-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 5px; margin: 8px 0; }
.emoji-cell { font-size: 19px; padding: 6px 0; border-radius: 12px; border: 1.5px solid transparent; background: transparent; transition: all 0.1s; }
.emoji-cell:hover { background: var(--card-2); transform: scale(1.15); }
.emoji-cell.sel { border-color: var(--olive); background: var(--olive-soft); }
.field-label { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.13em; color: var(--muted); margin: 15px 0 6px; }
.save-hint { color: var(--olive-2); margin-left: 8px; opacity: 0; transition: opacity 0.3s ease; text-transform: none; letter-spacing: normal; }
.save-hint.show { opacity: 1; }
.field-label:first-child { margin-top: 0; }

/* ============ quicklog ============ */
.quicklog-preview { font-size: 12.5px; font-weight: 600; margin-top: 8px; min-height: 17px; }
.quicklog-preview.ok { color: var(--olive-2); }
.quicklog-row .input { flex: 1; }
.quicklog-plant-row { align-items: center; margin-top: 8px; }
.quicklog-plant-row .muted { flex: 0 0 auto; }
.quicklog-plant { flex: 1; min-width: 0; }

/* ============ empty states ============ */
.empty {
  text-align: center; padding: 28px 16px; color: var(--muted); font-weight: 600;
  border: 1.5px dashed var(--line-strong); border-radius: 18px; font-size: 13.5px;
}
.empty .big { font-size: 30px; display: block; margin-bottom: 8px; }

/* ============ onboarding ============ */
.onboard { text-align: center; padding: 8px 4px; }
.onboard .flower { font-size: 50px; display: inline-block; transform-origin: bottom center; animation: bob 3s ease-in-out infinite; }
.onboard h2 { font-size: 27px; margin: 12px 0 8px; }
.onboard p { color: var(--muted); font-weight: 600; line-height: 1.65; }
.onboard .input { text-align: center; font-size: 16px; margin: 18px 0 14px; }

/* ============ line icons ============ */
.ic { display: inline-flex; align-items: center; justify-content: center; vertical-align: -0.14em; }
.ic svg { display: block; }
.title-ic { color: var(--olive); }
.h1-ic { color: var(--olive); vertical-align: -0.06em; }
.heart-ic { color: var(--coral); vertical-align: -0.18em; }
.chip .ic { margin-right: 1px; }
.btn .ic { margin-right: 1px; }
.nav-emoji.ic { color: inherit; }
.stat-tile .ic { color: var(--olive-2); }
[data-theme="dark"] .stat-tile .ic { color: var(--olive-2); }
.session-meta { display: inline-flex; align-items: center; gap: 3px; }
/* organic blob tiles, GOBE-style */
.stat-tile { border-radius: 46% 54% 52% 48% / 58% 46% 54% 42%; }
.stat:nth-child(2n) .stat-tile { border-radius: 58% 42% 46% 54% / 44% 54% 46% 56%; }
.stat:nth-child(3n) .stat-tile { border-radius: 42% 58% 55% 45% / 52% 44% 56% 48%; }

/* ============ guide ============ */
.guide-head { margin-bottom: 14px; }
.guide-kicker { display: block; font-size: 10px; font-weight: 700; letter-spacing: 0.18em; color: var(--muted); margin-bottom: 6px; }
.guide-head h2 { font-size: 23px; }
.guide-p { font-size: 13.5px; font-weight: 500; line-height: 1.65; color: var(--ink); margin: 10px 0; }
.guide-p b { font-weight: 700; color: var(--ink-strong); }
.guide-plants { display: flex; justify-content: space-around; align-items: flex-end; gap: 6px; margin: 6px 0 4px; }
.guide-plant { text-align: center; }
.guide-plant-label { font-family: var(--font-display); font-style: italic; font-size: 12.5px; color: var(--olive-2); margin-top: 2px; }
.guide-line { display: flex; gap: 11px; align-items: flex-start; padding: 8px 2px; }
.guide-line-ic {
  width: 30px; height: 30px; flex-shrink: 0; margin-top: 1px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--olive-soft); color: var(--olive-2);
  border-radius: 46% 54% 52% 48% / 58% 46% 54% 42%;
}
.guide-line-title { font-weight: 700; font-size: 13.5px; color: var(--ink-strong); }
.guide-line .muted { line-height: 1.55; margin-top: 1px; }
.guide-tiers { display: flex; flex-direction: column; gap: 2px; margin: 8px 0; }
.guide-tier { display: flex; align-items: center; gap: 9px; padding: 4px 6px; border-radius: 10px; color: var(--olive-2); }
.guide-tier:hover { background: var(--card-2); }
.guide-tier-name { font-family: var(--font-display); font-size: 14.5px; color: var(--ink-strong); min-width: 76px; }
.guide-inline-ic { display: inline-flex; vertical-align: -0.15em; color: var(--coral); }
.guide-foot { display: flex; align-items: center; gap: 10px; margin-top: 18px; }
.guide-dots { display: flex; gap: 6px; }
.guide-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--track); cursor: pointer; transition: background 0.15s, transform 0.15s; }
.guide-dot.on { background: var(--olive); transform: scale(1.2); }

/* ============ zen fullscreen ============ */
.zen {
  position: fixed; inset: 0; z-index: 2000;
  background:
    radial-gradient(900px 620px at 50% 118%, rgba(124, 139, 79, 0.10), transparent 70%),
    var(--bg);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; animation: fadeUp 0.3s ease-out both;
}
.zen-stage { position: relative; width: 380px; height: 380px; display: flex; align-items: center; justify-content: center; }
.zen-ring-wrap { position: absolute; inset: 10px; }
.zen-ring { transform: rotate(-90deg); }
.zen-ring .track { fill: none; stroke: var(--track); stroke-width: 9; }
.zen-ring .prog { fill: none; stroke-width: 9; stroke-linecap: round; transition: stroke-dashoffset 0.5s linear; }
/* flex-centered group; JS crops the plant SVG's empty sky (margin-top) so the
   visible plant + time + label truly center as one cluster */
.zen-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.zen-plant { transform: scale(var(--zs, 1)); transform-origin: bottom center; transition: transform 1.2s linear; }
.zen-plant svg { display: block; }
.zen-time { font-family: var(--font-body); font-weight: 700; font-size: 40px; font-variant-numeric: tabular-nums; color: var(--ink-strong); line-height: 1; text-align: center; }
.zen-label { font-family: var(--font-display); font-style: italic; font-size: 15px; color: var(--muted); text-align: center; }
.zen-controls { position: fixed; bottom: 36px; display: flex; gap: 10px; opacity: 0; transition: opacity 0.3s; }
.zen:hover .zen-controls, .zen:focus-within .zen-controls { opacity: 1; }
/* a phone row hasn't room for a name column and four plants side by side — the name
   takes its own line so the plants keep the sheet's full width, centred */
@media (max-width: 560px) {
  .book-row { flex-direction: column; align-items: stretch; gap: 8px; }
  .book-name { width: auto; flex-direction: row; align-items: center; gap: 8px; }
}
@media (max-width: 760px) {
  .zen-stage { width: 300px; height: 300px; }
  .zen-time { font-size: 32px; }
  .zen-controls { opacity: 1; }
}

/* ============ animations ============ */
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-5px) rotate(4deg); } }
@keyframes sway { from { transform: rotate(-1.8deg); } to { transform: rotate(2deg); } }
@keyframes drip { 0%, 100% { transform: translateY(0); opacity: 1; } 55% { transform: translateY(7px); opacity: 0.5; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.view-anim > * { animation: fadeUp 0.35s ease-out both; }
.view-anim > *:nth-child(2) { animation-delay: 0.04s; }
.view-anim > *:nth-child(3) { animation-delay: 0.08s; }
.view-anim > *:nth-child(4) { animation-delay: 0.12s; }
.view-anim > *:nth-child(5) { animation-delay: 0.16s; }

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

/* ============ responsive ============ */
@media (max-width: 1060px) and (min-width: 761px) {
  #view { padding: 26px 24px 70px; }
}
@media (max-width: 1060px) {
  .cal-wrap { grid-template-columns: 1fr; }
  .day-panel { position: static; }
}
/* manual collapse — tablets (761-1060) default to the rail but the arrow pushes it back
   open; phones (≤760) use bottom tabs and have no toggle */
#sidebar-toggle { display: none; margin-left: auto; flex-shrink: 0; }
#sidebar-toggle .ic svg { transition: transform 0.2s ease; }
@media (min-width: 761px) {
  #sidebar-toggle { display: inline-flex; }
  #app.sidebar-collapsed { grid-template-columns: 68px 1fr; }
  #app.sidebar-collapsed #sidebar { padding: 18px 8px 14px; align-items: center; }
  #app.sidebar-collapsed .logo { flex-direction: column; gap: 12px; padding: 0 0 16px; }
  /* in the rail the arrow gets a visible chip so "open me back up" is unmissable */
  #app.sidebar-collapsed #sidebar-toggle { margin-left: 0; background: var(--card-2); border: 1.5px solid var(--line-strong); }
  #app.sidebar-collapsed #sidebar-toggle:hover { background: var(--olive-soft); }
  /* hide only the wordmark — NOT descendant spans (the daisy's and arrow's glyphs are spans) */
  #app.sidebar-collapsed .logo > em { display: none; }
  #app.sidebar-collapsed .nav-item { justify-content: center; padding: 11px 0; }
  #app.sidebar-collapsed .nav-item span:not(.nav-emoji) { display: none; }
  #app.sidebar-collapsed .nav-item .nav-emoji { width: auto; font-size: 18px; }
  #app.sidebar-collapsed .nav-timer-chip { padding: 6px 4px; font-size: 10.5px; margin: 8px 2px 0; width: calc(100% - 4px); }
  #app.sidebar-collapsed .sidebar-foot { flex-direction: column; gap: 2px; }
  #app.sidebar-collapsed .sidebar-foot .streak-mini { display: none; }
}
@media (max-width: 900px) {
  .grid-2, .notes-wrap { grid-template-columns: 1fr; }
  h1 { font-size: 25px; }
}
@media (max-width: 760px) {
  #app { grid-template-columns: 1fr; }
  #view { padding: 20px 16px 110px; }
  #sidebar {
    position: fixed; top: auto; bottom: 0; left: 0; right: 0; height: auto;
    flex-direction: row; align-items: center; padding: 6px 8px;
    border-right: 0; border-top: 1.5px solid var(--line);
    box-shadow: 0 -8px 24px -12px rgba(74, 82, 56, 0.3);
  }
  .logo, .sidebar-foot .streak-mini, .nav-timer-chip { display: none; }
  .nav-item { flex-direction: column; gap: 3px; padding: 7px 2px; font-size: 10px; flex: 1; text-align: center; margin: 0; justify-content: center; border-radius: 14px; }
  .nav-item .nav-emoji { width: auto; }
  .sidebar-foot { margin: 0; flex-direction: row; }
  /* square-ish day boxes — 37 wide by 64 tall read as a column of bars, not a month.
     The floor keeps the number and its dot row comfortable on the narrowest phones. */
  .cal-grid { gap: 4px; }
  .cal-cell { aspect-ratio: 1; height: auto; min-height: 40px; padding: 5px; border-radius: 11px; gap: 3px; }
  .cal-evs { flex-direction: row; gap: 4px; } /* narrow cells: events collapse to a tidy dot row */
  .cal-ev-t, .cal-more { display: none; }
  .timer-ring-wrap { width: 200px; height: 200px; }
  .timer-time { font-size: 36px; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  #toasts { left: 18px; right: 18px; align-items: center; }
  .tier-row { flex-wrap: wrap; }
  .tier-center { flex-basis: 100%; order: 3; padding-top: 4px; font-size: 13px; }
  .tier-side.right { margin-left: auto; }
}
