/* Proovly — brand styles
   Layout: single phone-width column (max 480px), cards on a warm paper ground, glass tab bar.
   Palette from the Proovly brand board: Primary #8A7769 · Background #F9F7F3 · Accent #D9B8AE · Neutral #EADDD6 · Muted #C4B7AD
   This file is the light look. The themes are in their own files, loaded after it in this order:
   styles-autumn.css (leaves), styles-winter.css (winter colours and decorations), styles-dark.css (dark mode). */
:root {
  --bg: #F9F7F3;
  --bg-2: #F3EAE4;
  --surface: #FFFDFB;
  --surface-2: #F7EEE9;
  --blush: #F1E0D9;
  --blush-2: #E8CFC5;
  --accent: #D9B8AE;
  --neutral: #EADDD6;
  --muted: #C4B7AD;
  --primary: #7F6C5F;
  --primary-2: #75604F;
  --ink: #4B3931;
  --ink-2: #77645B;
  --ink-3: #78675E; /* 4.5:1 or more on every light background */
  --heart: #D1978B;
  --gold: #C49A55;
  /* Perfect days: rose gold, from a pearly light to a deep rose. */
  --perfect: #C98572;
  --perfect-hi: #FBE3D3;
  --moon: #9C8DBA;
  --line: #EEE3DC;
  --on-primary: #FFFBF8;
  --danger: #A8574A;
  --scrim: 58 40 32;
  --shadow: 0 18px 40px -18px rgba(112, 80, 62, .30);
  --shadow-sm: 0 6px 18px -10px rgba(112, 80, 62, .28);
  --ink-filter: none;
  --serif: 'Playfair Display', 'Iowan Old Style', Georgia, serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --soft-spring: cubic-bezier(.2, 1.15, .35, 1);
  --r-lg: 26px;
  --r-md: 20px;
  color-scheme: light;
}
/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
/* No page scroll bar, so both side margins look the same on a computer too. */
html { background: var(--bg); overscroll-behavior-y: none; scrollbar-width: none; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg); color: var(--ink); font-family: var(--sans); font-weight: 300; font-size: 15.5px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; overflow-x: hidden; overscroll-behavior-y: none;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; text-align: inherit; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 2px solid var(--primary-2); outline-offset: 3px; border-radius: 12px; }
svg.i { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.35; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ink { filter: var(--ink-filter); }
.hidden { display: none !important; }
.grow { flex: 1; min-width: 0; }
.center { text-align: center; }
.muted { color: var(--ink-3); }

.app {
  max-width: 480px; margin: 0 auto; min-height: 100dvh; position: relative; overflow-x: clip;
  background:
    radial-gradient(120% 50% at 100% 0%, color-mix(in srgb, var(--blush) 55%, transparent) 0%, transparent 60%),
    radial-gradient(90% 40% at 0% 100%, color-mix(in srgb, var(--neutral) 60%, transparent) 0%, transparent 70%),
    var(--bg);
}
/* The page's side margin. Full-width parts pull out by the same amount. */
.view { --gutter: 27px; padding: calc(env(safe-area-inset-top, 0px) + 18px) var(--gutter) calc(118px + env(safe-area-inset-bottom, 0px)); }

/* ---------- type ---------- */
h1, h2, h3 { font-family: var(--serif); font-weight: 500; margin: 0; letter-spacing: -.01em; text-wrap: balance; color: var(--ink); }
h1 { font-size: 30px; line-height: 1.12; }
h2 { font-size: 23px; line-height: 1.2; }
h3 { font-size: 19px; line-height: 1.3; }
.display { font-size: 42px; line-height: 1.02; }
.lead { font-family: var(--serif); font-size: 21px; line-height: 1.25; color: var(--ink-2); margin: 6px 0 0; }
.caps { font-size: 11.5px; letter-spacing: .22em; text-transform: uppercase; color: var(--ink-3); font-weight: 400; margin: 0; }
.caps.wide { letter-spacing: .38em; padding-left: .38em; }
.caps.center { padding-left: .22em; }
.small { font-size: 13.5px; color: var(--ink-2); margin: 4px 0 0; line-height: 1.5; }
.strong { font-weight: 500; color: var(--ink); }
.link { color: var(--primary); font-size: 14px; text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--accent); padding: 6px 0; font-weight: 400; }
.heart-ic { width: 20px !important; height: 20px !important; color: var(--heart); vertical-align: -2px; stroke-width: 1.5 !important; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; border-radius: 999px;
  padding: 14px 24px; font-size: 15.5px; font-weight: 400; letter-spacing: .01em; font-family: var(--serif);
  transition: transform .35s var(--spring), background-color .3s, opacity .3s, box-shadow .3s;
}
.btn svg.i { width: 19px; height: 19px; }
.btn:active { transform: scale(.965); transition-duration: .08s; }
.btn.primary { background: var(--primary); color: var(--on-primary); box-shadow: 0 12px 24px -12px color-mix(in srgb, var(--primary) 80%, transparent); }
.btn.primary:hover { background: var(--primary-2); }
.btn.outline { background: var(--surface); color: var(--ink); border: 1px solid color-mix(in srgb, var(--ink) 55%, transparent); }
.btn.soft { background: var(--blush); color: var(--ink); }
.btn.danger { background: transparent; color: var(--danger); border: 1px solid color-mix(in srgb, var(--danger) 45%, transparent); }
.btn.block { width: 100%; }
a.btn { text-decoration: none; }
.btn.lg { padding: 12px 22px; font-size: 16px; }
.save-btn.not-ready { opacity: .55; box-shadow: none; } /* still tappable: it says what is missing */
.btn[disabled] { background: var(--neutral); color: var(--ink-3); box-shadow: none; pointer-events: none; }
.pill {
  display: inline-flex; align-items: center; gap: 4px; background: var(--primary); color: var(--on-primary);
  border-radius: 999px; padding: 7px 15px 7px 11px; font-size: 13.5px; font-family: var(--serif);
  transition: transform .35s var(--spring);
}
.pill svg.i { width: 16px; height: 16px; stroke-width: 1.8; }
.pill:active { transform: scale(.94); }
.iconbtn { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; color: var(--ink); transition: background .2s, transform .3s var(--spring); flex: none; }
.iconbtn:active { background: var(--blush); transform: scale(.92); }
.iconbtn.soft { background: var(--blush); }
.iconbtn-space { width: 42px; flex: none; }
.round-btn { width: 36px; height: 36px; border-radius: 50%; background: color-mix(in srgb, var(--surface) 80%, transparent); display: grid; place-items: center; flex: none; color: var(--ink-2); box-shadow: var(--shadow-sm); }
.round-btn svg.i { width: 18px; height: 18px; }

/* ---------- cards ---------- */
.card {
  background: var(--surface); border-radius: var(--r-lg); padding: 18px;
  border: 1px solid color-mix(in srgb, var(--line) 70%, transparent); box-shadow: var(--shadow-sm);
  display: block; width: 100%;
}
button.card { transition: transform .4s var(--spring), box-shadow .3s; }
button.card:active { transform: scale(.982); transition-duration: .1s; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin: 28px 2px 12px; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; min-height: 44px; }
.me .page-head { margin-top: 22px; } /* the title starts as low as the titles on Library and Add */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 -6px 16px; min-height: 44px; }
.topbar h1 { font-size: 24px; text-align: center; flex: 1; }
/* Tab page header: a big title and a line on the left, over a picture that fills the top of the screen
   and fades out under the first controls. Every header, in every theme, is at least as tall
   as the original Library header, so Add and Library are the same size. */
.page-hero {
  position: relative; isolation: isolate; min-height: calc(env(safe-area-inset-top, 0px) + 198px);
  margin: calc(-18px - env(safe-area-inset-top, 0px)) calc(-1 * var(--gutter)) 32px;
  padding: calc(env(safe-area-inset-top, 0px) + 40px) var(--gutter) 0;
}
.page-hero ~ * { isolation: isolate; } /* the controls under the header stay above its picture */
/* The picture shows its full width at its own shape. Only when that is too short to stay under the title
   and the line (a narrow phone, a tall status bar) does it grow taller, and lose a little at the sides. */
.page-hero-pic {
  position: absolute; z-index: -1; top: 0; right: 0; width: 100%; height: auto; min-height: calc(100% + 48px);
  object-fit: cover; object-position: 82% 40%; pointer-events: none;
  -webkit-mask-image: linear-gradient(180deg, #000 calc(100% - 64px), transparent 100%);
  mask-image: linear-gradient(180deg, #000 calc(100% - 64px), transparent 100%);
}
/* The one thing a theme changes in the header: its picture (theme.rs), and where the picture's middle lies. */
.add .page-hero-pic { object-position: var(--add-hero-at, 82% 40%); }
.library .page-hero-pic { object-position: var(--library-hero-at, 82% 40%); }
.page-hero-title { font-size: 36px; line-height: 1.1; max-width: 64%; text-wrap: pretty; }
/* Add: the words are as wide as the title's longest word, so "Add evidence" is on two lines, one word on each.
   The line under it wraps to the same width, but is at least 10.5em wide, so it takes two even lines in every
   language (a short title word, as "Dodaj", would otherwise give it three). */
.add .page-hero-text { width: min-content; }
.add :is(.page-hero-title, .page-hero-sub) { max-width: none; }
.add .page-hero-title { width: min-content; }
.add .page-hero-sub { min-width: 10.5em; text-wrap: balance; }
.page-hero-title .heart-ic { width: 24px !important; height: 24px !important; vertical-align: 0; stroke-width: 1.3 !important; color: inherit; } /* the title's colour, not pink */
.page-hero-sub { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 16.5px; line-height: 1.4; color: var(--ink-3); max-width: 62%; margin: 10px 0 0; white-space: pre-line; }
.page-hero-corner { position: absolute; top: calc(env(safe-area-inset-top, 0px) + 34px); right: calc(var(--gutter) - 6px); }
.page-hero-corner .iconbtn { width: 52px; height: 52px; background: color-mix(in srgb, var(--surface) 82%, transparent); box-shadow: var(--shadow-sm); backdrop-filter: blur(6px); }
.spark-ring { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; color: var(--heart); background: radial-gradient(circle at 35% 30%, var(--surface) 0%, var(--blush) 100%); flex: none; }
.spark-ring.big { width: 64px; height: 64px; margin: 0 auto 14px; }
.spark-ring.big svg.i { width: 28px; height: 28px; }

/* ---------- entrance motion ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes pop { 0% { transform: scale(.6); opacity: 0; } 70% { transform: scale(1.08); } 100% { transform: scale(1); opacity: 1; } }
.stagger > * { animation: rise .6s var(--ease) both; animation-delay: calc(var(--i, 0) * 55ms + 60ms); }
.stagger > .home-hero { animation: fade-in .8s var(--ease) both; }

/* Page transitions: View Transitions API (Chrome, Safari 18+) */
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .46s; animation-timing-function: var(--ease); }
::view-transition-old(root) { animation-name: vt-fade-out; }
::view-transition-new(root) { animation-name: vt-fade-in; }
html[data-nav="forward"]::view-transition-old(root) { animation-name: vt-out-left; }
html[data-nav="forward"]::view-transition-new(root) { animation-name: vt-in-right; }
html[data-nav="back"]::view-transition-old(root) { animation-name: vt-out-right; }
html[data-nav="back"]::view-transition-new(root) { animation-name: vt-in-left; }
/* Switching between tabs (tab bar or swipe): a 3D cube turn. The tab bar stays still.
   Only transform is animated (no filters), so phones can run it on the GPU without stutter. */
/* Only the content column turns: on a wide screen the page around it stays still. Both sides are
   clipped to the column (--col wide, centred) and turn around its edges; behind them, inside the
   column only, a darker tone instead of the page's near-white cream. On a phone the column is the
   whole width. */
:root { --col: min(100vw, 480px); --foot-art: 44px; }
::view-transition {
  background: linear-gradient(to right, var(--bg) calc(50% - var(--col) / 2), var(--neutral) 0 calc(50% + var(--col) / 2), var(--bg) 0);
}
html[data-nav="right"]::view-transition-image-pair(root), html[data-nav="left"]::view-transition-image-pair(root) { perspective: 1200px; }
html[data-nav="right"]::view-transition-old(root), html[data-nav="right"]::view-transition-new(root),
html[data-nav="left"]::view-transition-old(root), html[data-nav="left"]::view-transition-new(root) {
  animation-duration: .5s; animation-timing-function: cubic-bezier(.4, 0, .2, 1); animation-fill-mode: both;
  backface-visibility: hidden; mix-blend-mode: normal; will-change: transform;
  clip-path: inset(0 calc(50% - var(--col) / 2));
}
html[data-nav="right"]::view-transition-old(root) { transform-origin: calc(50% + var(--col) / 2) 50%; animation-name: cube-out-next; }
html[data-nav="right"]::view-transition-new(root) { transform-origin: calc(50% - var(--col) / 2) 50%; animation-name: cube-in-next; }
html[data-nav="left"]::view-transition-old(root) { transform-origin: calc(50% - var(--col) / 2) 50%; animation-name: cube-out-prev; }
html[data-nav="left"]::view-transition-new(root) { transform-origin: calc(50% + var(--col) / 2) 50%; animation-name: cube-in-prev; }
@keyframes cube-out-next { from { transform: translateX(0) rotateY(0); } to { transform: translateX(calc(-1 * var(--col))) rotateY(-90deg); } }
@keyframes cube-in-next  { from { transform: translateX(var(--col)) rotateY(90deg); } to { transform: translateX(0) rotateY(0); } }
@keyframes cube-out-prev { from { transform: translateX(0) rotateY(0); } to { transform: translateX(var(--col)) rotateY(90deg); } }
@keyframes cube-in-prev  { from { transform: translateX(calc(-1 * var(--col))) rotateY(-90deg); } to { transform: translateX(0) rotateY(0); } }
/* A screen arriving by cube turn shows up complete: no entrance animations on top of the turn.
   html[data-nav]/[data-cube] are set by the turn itself before the new screen is drawn; .app.cube
   follows a moment later and keeps it that way afterwards. Without the first, the new face could
   be drawn for a frame with its cards still hidden: a blank, light side. */
:is(.app.cube, html[data-nav="right"], html[data-nav="left"], html[data-cube]) :is(
  .stagger > *:not(.rv-again), .home-hero, .hh-img, .hh-heart, .entry:not(.rv-again), .day-group:not(.rv-again),
  .wdot:not(.rv-again), .stat:not(.rv-again), .dsec:not(.rv-again), .polaroids:not(.rv-again),
  .grat-row, .badge-img:not(.rv-again), .fill
) { animation: none !important; }
/* Entrance animations wait until they come into view (revealOnScroll in interop.js): held at their
   first frame until then, and again once out of view, so they play again each time they come back. */
.rv-wait, .wdot.rv-wait svg { animation-play-state: paused !important; }
.app.cube .hh-text, .app.cube .hh-logo { animation-name: none, hero-away; }
/* The same cube on iPhones, drawn by hand (cubeTurn in interop.js): .cube-old is a copy of the
   old screen turning away, .screen is the new one turning in. Same angles, timing and easing. */
.cube-old { position: fixed; top: 0; bottom: 0; z-index: 15; overflow: hidden; pointer-events: none; background: var(--bg); backface-visibility: hidden; will-change: transform; }
/* Both faces are solid, and what shows around them while they turn, inside the content column only,
   is the same darker tone as the view-transition cube, not the page's near-white cream. */
html[data-cube] .screen { background: var(--bg); }
html[data-cube] .app { background: var(--neutral); }
.cube-old, .cube-old * { animation: none !important; transition: none !important; }
html[data-cube] .cube-old, html[data-cube] .screen { backface-visibility: hidden; will-change: transform; }
html[data-cube="right"] .cube-old { transform-origin: 100% 50%; animation: cube-3d-out-next .5s cubic-bezier(.4, 0, .2, 1) both !important; }
html[data-cube="right"] .screen { transform-origin: 0% var(--cube-y, 50%); animation: cube-3d-in-next .5s cubic-bezier(.4, 0, .2, 1) both; }
html[data-cube="left"] .cube-old { transform-origin: 0% 50%; animation: cube-3d-out-prev .5s cubic-bezier(.4, 0, .2, 1) both !important; }
html[data-cube="left"] .screen { transform-origin: 100% var(--cube-y, 50%); animation: cube-3d-in-prev .5s cubic-bezier(.4, 0, .2, 1) both; }
@keyframes cube-3d-out-next { from { transform: perspective(1200px) translateX(0) rotateY(0); } to { transform: perspective(1200px) translateX(-100%) rotateY(-90deg); } }
@keyframes cube-3d-in-next  { from { transform: perspective(1200px) translateX(100%) rotateY(90deg); } to { transform: perspective(1200px) translateX(0) rotateY(0); } }
@keyframes cube-3d-out-prev { from { transform: perspective(1200px) translateX(0) rotateY(0); } to { transform: perspective(1200px) translateX(100%) rotateY(90deg); } }
@keyframes cube-3d-in-prev  { from { transform: perspective(1200px) translateX(-100%) rotateY(-90deg); } to { transform: perspective(1200px) translateX(0) rotateY(0); } }
.tabbar { view-transition-name: tabbar; }
::view-transition-group(tabbar) { animation: none; }
::view-transition-old(tabbar) { display: none; }
::view-transition-new(tabbar) { animation: none; }
@keyframes vt-fade-out { to { opacity: 0; } }
@keyframes vt-fade-in { from { opacity: 0; } }
@keyframes vt-out-left { to { opacity: 0; transform: translateX(-28px) scale(.99); } }
@keyframes vt-in-right { from { opacity: 0; transform: translateX(44px); } }
@keyframes vt-out-right { to { opacity: 0; transform: translateX(36px) scale(.99); } }
@keyframes vt-in-left { from { opacity: 0; transform: translateX(-36px); } }
/* Fallback when View Transitions aren't available */
.app:not(.has-vt) .screen > .view, .app:not(.has-vt) .onboarding, .app:not(.has-vt) .welcome { animation: fade-in .35s var(--ease); }
html[data-enter="forward"] .app:not(.has-vt) .screen > .view { animation: vt-in-right .42s var(--ease); }
html[data-enter="back"] .app:not(.has-vt) .screen > .view { animation: vt-in-left .42s var(--ease); }

/* ---------- welcome ---------- */
.welcome { position: relative; min-height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
.welcome-photo { position: absolute; inset: 0 0 auto 0; height: 68dvh; overflow: hidden; }
.welcome-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 62%; animation: kenburns 14s var(--ease) both; }
.welcome-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 0%, transparent 55%, var(--bg) 100%); }
@keyframes kenburns { from { transform: scale(1.12); } to { transform: scale(1); } }
.welcome-top { position: relative; z-index: 1; padding: calc(env(safe-area-inset-top, 0px) + 22px) 24px 0; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; animation: rise .9s var(--ease) .15s both; }
/* The photo is bright in both themes, so the logo and tagline keep the logo's brown (#6E463A as it shows on screen)
   (not the theme colours, and not the .ink invert); the logo has a light halo, the tagline has none. */
.welcome-top { --halo: #F9F7F3; }
.welcome-top .wordmark { width: min(40vw, 160px); height: auto; filter: drop-shadow(0 0 5px color-mix(in srgb, var(--halo) 70%, transparent)); }
.welcome-top .caps {
  color: #6E463A; font-weight: 500; letter-spacing: .14em; padding-left: .14em; max-width: 340px; text-wrap: balance;
}
.welcome-panel {
  position: relative; z-index: 1; margin-top: auto; background: color-mix(in srgb, var(--bg) 92%, transparent);
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  border-radius: 30px 30px 0 0; padding: 18px 22px calc(12px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -20px 40px -24px rgba(90, 60, 45, .35); display: flex; flex-direction: column; gap: 8px;
  /* The card is half the screen; on taller phones the extra room is shared out between its parts. */
  min-height: 50dvh; justify-content: space-evenly;
  animation: sheet-in .9s var(--soft-spring) .35s both;
}
/* One line: the size follows the text length (--n characters, about .5em each) so it fits the panel width.
   Never above 42px; below 26px (very long translations) it wraps instead of getting tiny. */
.welcome-panel { container-type: inline-size; }
.welcome-panel .display { text-align: center; font-size: 30px; font-size: clamp(26px, calc(100cqw / (var(--n, 18) * .5)), 42px); }
.welcome-intro { margin: 0 auto; text-align: center; color: var(--ink-2); max-width: 300px; font-size: 14px; line-height: 1.4; }
.ideas { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0; }
.idea { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 3px; animation: rise .7s var(--ease) both; animation-delay: calc(700ms + var(--i) * 90ms); }
.idea svg.i { width: 22px; height: 22px; color: var(--primary); }
.idea b { font-weight: 400; font-size: 12.5px; line-height: 1.25; color: var(--ink); }
.idea span { font-size: 11.5px; color: var(--ink-3); line-height: 1.3; }

/* ---------- onboarding ---------- */
.onboarding { position: relative; min-height: 100dvh; padding-bottom: calc(30px + env(safe-area-inset-bottom, 0px)); overflow: hidden; }
.deco { position: absolute; pointer-events: none; opacity: .55; }
/* A watercolour: shown as painted in both themes (no .ink inversion). */
.deco-tr { top: calc(env(safe-area-inset-top, 0px) + 72px); right: -12px; width: 80px; --r: -12deg; }
.deco-bl { bottom: 14px; left: -14px; width: 88px; --r: 18deg; --f: -1; opacity: .4; }
.ob-head { display: flex; align-items: center; justify-content: space-between; margin: 0 -6px 18px; }
.wordmark-sm { width: 104px; height: auto; }
.progress { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; margin: 0 0 30px; } /* one equal segment per step */
.progress i { height: 4px; border-radius: 4px; background: var(--neutral); position: relative; overflow: hidden; }
.progress i::after { content: ""; position: absolute; inset: 0; background: var(--primary); transform: scaleX(0); transform-origin: left; transition: transform .7s var(--ease); }
.progress i.on::after { transform: scaleX(1); }
.ob-body { position: relative; display: flex; flex-direction: column; gap: 14px; }
.ob-body > * { animation: rise .6s var(--ease) both; }
.ob-body > :nth-child(2) { animation-delay: 60ms; } .ob-body > :nth-child(3) { animation-delay: 120ms; }
.ob-body > :nth-child(4) { animation-delay: 180ms; } .ob-body > :nth-child(5) { animation-delay: 240ms; }
.ob-body > :nth-child(6) { animation-delay: 300ms; } .ob-body > :nth-child(7) { animation-delay: 360ms; }
.ob-title { font-size: 29px; }
.opts { display: flex; flex-direction: column; gap: 9px; margin: 8px 0 12px; }
.opt {
  display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 18px; border-radius: 18px; background: var(--surface);
  border: 1px solid var(--line); font-size: 15.5px; transition: background .3s, border-color .3s, transform .35s var(--spring);
  animation: rise .5s var(--ease) both; animation-delay: calc(150ms + var(--i) * 40ms);
}
.opt:active { transform: scale(.98); }
.opt .dot { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--blush-2); display: grid; place-items: center; flex: none; transition: background .3s, border-color .3s; }
.opt .dot svg.i { width: 13px; height: 13px; stroke-width: 2.4; color: var(--on-primary); transform: scale(0); transition: transform .4s var(--spring); }
.opt.on { background: var(--surface-2); border-color: var(--accent); }
.opt.on .dot { background: var(--primary); border-color: var(--primary); }
.opt.on .dot svg.i { transform: scale(1); }

/* ---------- reminder cards ---------- */
.rem-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 16px; display: flex; flex-direction: column; gap: 12px; margin-bottom: 12px; }
.rem-head { display: flex; align-items: center; gap: 12px; }
.rem-ic, .row-ic { width: 40px; height: 40px; border-radius: 50%; background: var(--blush); color: var(--primary); display: grid; place-items: center; flex: none; }
.rem-ic svg.i, .row-ic svg.i { width: 20px; height: 20px; }
.t { display: block; font-size: 15px; color: var(--ink); font-weight: 400; }
.s { display: block; font-size: 12.5px; color: var(--ink-3); }
.rem-time { display: flex; align-items: center; justify-content: space-between; font-size: 13.5px; color: var(--ink-2); padding-top: 12px; border-top: 1px dashed var(--line); animation: rise .4s var(--ease); }
.time-input { border: 1px solid var(--line); background: var(--surface-2); border-radius: 12px; padding: 7px 12px; font-size: 15px; outline: none; font-variant-numeric: tabular-nums; }
.notif-preview { --np-bg: color-mix(in srgb, var(--blush) 65%, var(--surface)); --np-h: 70px;
  position: relative; overflow: hidden; padding: 10px 12px; border-radius: 16px; background: var(--np-bg); transition: opacity .35s, filter .35s; }
.notif-preview img { width: 30px; height: 30px; border-radius: 8px; flex: none; }
.notif-preview b { display: block; font-size: 12px; font-weight: 500; }
.notif-preview span { font-size: 13px; color: var(--ink-2); }
.notif-preview.dim { opacity: .45; filter: grayscale(.6); }
.notif-preview .np-text span { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.35; }
/* Each new example turns in like a cube, vertically (top to bottom), with the tab switch's easing but a
   little slower. The three cards start 800ms apart (--np-delay), so they turn in a cascade.
   The card keeps room for three lines, so it never jumps. */
.notif-preview .np-cube-wrap { height: var(--np-h); perspective: 1200px; }
.notif-preview .np-cube { position: relative; height: 100%; transform-style: preserve-3d;
  animation: np-turn .8s cubic-bezier(.4, 0, .2, 1) var(--np-delay, 0ms) both; }
.notif-preview .np-cube.first { animation: none; }
.notif-preview .np-face { position: absolute; inset: 0; display: flex; gap: 10px; align-items: center; background: var(--np-bg); backface-visibility: hidden; }
.notif-preview .np-front { transform: rotateX(0deg) translateZ(calc(var(--np-h) / 2)); }
.notif-preview .np-top { transform: rotateX(90deg) translateZ(calc(var(--np-h) / 2)); }
.notif-preview .np-cube.first .np-top { display: none; }
@keyframes np-turn { from { transform: translateZ(calc(var(--np-h) / -2)) rotateX(0deg); } to { transform: translateZ(calc(var(--np-h) / -2)) rotateX(-90deg); } }
.notif-preview .np-cube.first .np-front { transform: none; }
.rem-hint { margin: -4px 0 0; font-size: 12px; line-height: 1.4; color: var(--ink-3); }
.rem-hint.warn { color: var(--ink-2); }
.toggle { width: 50px; height: 30px; border-radius: 30px; background: var(--neutral); position: relative; transition: background .3s; flex: none; border: 1px solid var(--line); }
.toggle .knob { position: absolute; top: 2px; left: 2px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(60, 40, 30, .25); transition: transform .45s var(--spring); }
.toggle.on { background: var(--primary); border-color: var(--primary); }
.toggle.on .knob { transform: translateX(20px); }
.toggle:active .knob { width: 28px; }
.toggle.on:active .knob { transform: translateX(16px); }

/* ---------- home ---------- */
.hero-card { position: relative; border-radius: var(--r-lg); overflow: hidden; min-height: 206px; box-shadow: var(--shadow); isolation: isolate; }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 30% 40%; z-index: -2; animation: kenburns 12s var(--ease) both; }
.hero-shade { position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, transparent 22%, color-mix(in srgb, var(--bg) 70%, transparent) 50%, color-mix(in srgb, var(--bg) 90%, transparent) 72%, color-mix(in srgb, var(--bg) 94%, transparent) 100%); }
.hero-text { margin-left: 44%; padding: 22px 18px 22px 8px; min-height: 206px; display: flex; flex-direction: column; justify-content: center; }
.hero-text h1 { font-size: clamp(20px, 6.2vw, 25px); }
.hero-text .lead { font-size: clamp(15px, 4.5vw, 18.5px); }
.nw { display: block; white-space: nowrap; }
.hero-avatar { position: absolute; top: 12px; left: 12px; width: 40px; height: 40px; border-radius: 50%; overflow: hidden; border: 2px solid color-mix(in srgb, var(--surface) 85%, transparent); box-shadow: var(--shadow-sm); transition: transform .35s var(--spring); }
.hero-avatar:active { transform: scale(.9); }
.hero-avatar img { width: 100%; height: 100%; object-fit: cover; }

.streak-card { margin-top: 14px; background: linear-gradient(135deg, var(--surface-2), var(--blush)); padding: 16px 16px 14px; }
.streak-top { display: flex; align-items: center; gap: 14px; }
/* Streak ring: one piece per day of this week around a flame. The flame has seven stages, one for
   each day of the streak (data-stage 1-7): it grows, warms from rose to amber and glows brighter. */
.flame-ring { --fs: .9; --heat: 0%; --glow: 0px; --halo: 0; --spd: 1;
  position: relative; width: 60px; height: 60px; flex: none; display: grid; place-items: center; }
.flame-ring[data-stage="1"] { --fs: .9;  --heat: 0%;  --glow: 1px;   --halo: .15; --spd: 1.15; }
.flame-ring[data-stage="2"] { --fs: 1;   --heat: 15%; --glow: 1.5px; --halo: .22; --spd: 1.08; }
.flame-ring[data-stage="3"] { --fs: 1.08; --heat: 30%; --glow: 2px;   --halo: .3;  --spd: 1; }
.flame-ring[data-stage="4"] { --fs: 1.16; --heat: 46%; --glow: 3px;   --halo: .4;  --spd: .94; }
.flame-ring[data-stage="5"] { --fs: 1.24; --heat: 62%; --glow: 4px;   --halo: .5;  --spd: .88; }
.flame-ring[data-stage="6"] { --fs: 1.32; --heat: 80%; --glow: 5px;   --halo: .62; --spd: .82; }
.flame-ring[data-stage="7"] { --fs: 1.4; --heat: 100%; --glow: 7px;  --halo: .78; --spd: .75; }
.flame-ring { --fl-outer: color-mix(in srgb, #EE7330 var(--heat), var(--heart));
  --fl-mid: color-mix(in srgb, #FFB443 var(--heat), color-mix(in srgb, var(--heart) 45%, #FFE9DF));
  --fl-core: color-mix(in srgb, #FFF6C9 var(--heat), #FFF4EE); }
.flame-ring::before { content: ""; position: absolute; inset: 9px; border-radius: 50%; opacity: var(--halo);
  background: radial-gradient(circle at 50% 60%, var(--fl-mid), transparent 70%); transition: opacity .6s var(--ease); }
.fr-week { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.fr-seg { fill: none; stroke-width: 3.6; stroke-linecap: round; stroke: color-mix(in srgb, var(--accent) 38%, transparent); transition: stroke .4s var(--ease); }
.fr-seg.today:not(.done) { stroke: var(--accent); animation: seg-wait 2.4s ease-in-out infinite; }
/* A day with something written is a soft rose piece; a perfect day a wider, glowing rose gold
   piece with a diamond; an epic day a glowing gold piece with a star, as in the week row. */
.fr-seg.done { stroke: color-mix(in srgb, var(--heart) 80%, var(--surface)); animation: seg-in .5s var(--spring) both; animation-delay: calc(300ms + var(--i) * 60ms); }
.fr-seg.perfect { stroke: var(--perfect); stroke-width: 4.6; filter: drop-shadow(0 0 2px color-mix(in srgb, var(--perfect) 80%, transparent)); }
.fr-seg.epic { stroke: var(--epic-star); stroke-width: 4.6; filter: drop-shadow(0 0 2.5px var(--epic-glow)); }
.fr-mark { stroke: var(--surface); stroke-width: 1.1; stroke-linejoin: round; paint-order: stroke; transform-box: fill-box; transform-origin: center;
  animation: pop .45s var(--spring) both; animation-delay: calc(450ms + var(--i, 0) * 55ms); }
.fr-mark.perfect { fill: var(--perfect-hi); stroke: var(--perfect); }
.fr-mark.epic { fill: var(--epic-star); filter: drop-shadow(0 0 2px var(--epic-glow)); animation: pop .45s var(--spring) both, epic-pulse 2.6s ease-in-out infinite;
  animation-delay: calc(450ms + var(--i, 0) * 55ms), 1s; }
@keyframes seg-wait { 50% { opacity: .45; } }
@keyframes seg-in { from { opacity: 0; } }
.fr-flame { position: relative; width: 24px; height: 32px; overflow: visible; scale: var(--fs); transform-origin: 50% 62%;
  transition: scale .7s var(--spring); filter: drop-shadow(0 0 var(--glow) color-mix(in srgb, var(--fl-outer) 75%, transparent)); }
.fr-flame path { transform-box: fill-box; transform-origin: 50% 100%; }
.fl-outer { fill: var(--fl-outer); }
.fl-mid { fill: var(--fl-mid); scale: .72; }
.fl-core { fill: var(--fl-core); }
.fl-ember { fill: var(--fl-mid); opacity: 0; transform-box: fill-box; transform-origin: center; }
/* No streak: a quiet, unlit flame. */
.flame-ring:not(.lit) .fl-outer { fill: none; stroke: var(--muted); stroke-width: 1.4; }
.flame-ring:not(.lit) :is(.fl-mid, .fl-core) { display: none; }
.flame-ring.lit .fl-outer { animation: fl-dance calc(1.7s * var(--spd)) ease-in-out infinite; }
.flame-ring.lit .fl-mid { animation: fl-dance calc(1.25s * var(--spd)) ease-in-out infinite reverse; }
.flame-ring.lit .fl-core { animation: fl-core calc(.9s * var(--spd)) ease-in-out infinite; }
.flame-ring[data-stage="3"] .e1, .flame-ring[data-stage="4"] .e1,
.flame-ring[data-stage="5"] :is(.e1, .e2), .flame-ring[data-stage="6"] :is(.e1, .e2),
.flame-ring[data-stage="7"] .fl-ember { animation: fl-ember calc(1.8s * var(--spd)) ease-out infinite; }
.flame-ring .fl-ember.e2 { animation-delay: .6s; }
.flame-ring .fl-ember.e3 { animation-delay: 1.1s; }
@keyframes fl-dance {
  0%, 100% { transform: scale(1, 1) skewX(0); }
  20% { transform: scale(.95, 1.06) skewX(-4deg); }
  45% { transform: scale(1.04, .95) skewX(3deg); }
  70% { transform: scale(.97, 1.04) skewX(-2deg); }
  85% { transform: scale(1.02, .98) skewX(1.5deg); }
}
@keyframes fl-core { 0%, 100% { transform: scale(1, 1) translateX(0); opacity: .95; } 35% { transform: scale(.9, 1.1) translateX(-.4px); opacity: 1; } 65% { transform: scale(1.06, .92) translateX(.4px); opacity: .85; } }
@keyframes fl-ember { 0% { opacity: 0; transform: translate(0, 0) scale(1); } 25% { opacity: 1; } 100% { opacity: 0; transform: translate(1.5px, -11px) scale(.4); } }
@media (prefers-reduced-motion: reduce) { .flame-ring *, .flame-ring .fl-ember { animation: none !important; } }
.lbl { font-size: 13px; color: var(--ink-2); }
.streak-num { font-family: var(--serif); font-size: 27px; line-height: 1.1; color: var(--ink); font-variant-numeric: tabular-nums; }
.streak-soft { font-family: var(--serif); font-size: 17.5px; line-height: 1.25; color: var(--ink); }
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-top: 14px; padding-top: 12px; border-top: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); }
.wd { display: flex; flex-direction: column; align-items: center; gap: 5px; }
.wdot { width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--accent); background: transparent; animation: pop .5s var(--spring) both; animation-delay: calc(300ms + var(--i) * 55ms); }
.wd.done .wdot { background: radial-gradient(circle at 35% 30%, var(--accent), var(--heart)); border-color: var(--heart); }
.wd.today:not(.done) .wdot { border-color: var(--primary); border-style: dashed; }
.wd.future .wdot { opacity: .45; }
.wlbl { font-size: 11px; color: var(--ink-3); }
.wd.today .wlbl { color: var(--ink); font-weight: 500; }

.banner { display: flex; gap: 12px; align-items: flex-start; margin-top: 14px; padding: 14px 16px; border-radius: var(--r-md); background: color-mix(in srgb, var(--blush) 60%, var(--surface)); border: 1px solid var(--line); }
.banner b { font-family: var(--serif); font-weight: 500; font-size: 16.5px; }
.banner p { margin: 3px 0 0; font-size: 13px; color: var(--ink-2); }
.banner-ic { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: var(--heart); background: var(--surface); flex: none; }
.banner-ic svg.i { width: 19px; height: 19px; }

.today { display: flex; flex-direction: column; gap: 4px; }
.quote { display: flex; gap: 12px; align-items: flex-start; width: 100%; padding: 12px 0; transition: transform .35s var(--spring); }
.quote + .quote { border-top: 1px solid var(--line); }
.quote:active { transform: translateX(3px); }
.qmark { font-family: var(--serif); font-size: 46px; line-height: .8; color: var(--accent); margin-top: 6px; flex: none; }
.qbody { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.qtext { font-family: var(--serif); font-size: 19px; line-height: 1.3; color: var(--ink); }
.empty { text-align: center; padding: 26px 22px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.empty .btn { margin-top: 12px; }
.empty-art { width: var(--foot-art); height: auto; margin-bottom: 4px; opacity: .9; }
.empty-ic { width: 34px !important; height: 34px !important; color: var(--accent); margin-bottom: 4px; }

/* ---------- home: time-of-day hero ---------- */
.home-hero {
  position: relative; isolation: isolate; overflow: hidden;
  margin: calc(-1 * (env(safe-area-inset-top, 0px) + 18px)) calc(-1 * var(--gutter)) 0;
  height: calc(env(safe-area-inset-top, 0px) + clamp(300px, 44vh, 370px));
  animation: fade-in .8s var(--ease) both;
}
.hh-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 0% 42%; z-index: -2; animation: kenburns 14s var(--ease) both; }
.hh-scrim {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  /* A short fade at the very bottom, where the streak card overlaps. A theme may also shade the photo
     behind the greeting, where its sky is bright (--hh-shade, 0 to 1, set by HomeHero); the rest stays clear. */
  background: radial-gradient(65% 50% at 78% 22%, rgba(40, 28, 24, var(--hh-shade, 0)), transparent 75%),
    linear-gradient(180deg, transparent 72%, color-mix(in srgb, var(--bg) 55%, transparent) 90%, var(--bg) 100%);
}
.hh-text {
  position: absolute; right: 14px; top: calc(env(safe-area-inset-top, 0px) + 30px); width: 50%;
  /* White text straight on the photo; a soft shadow keeps it readable on bright skies. */
  text-shadow: 0 1px 2px rgba(30, 18, 12, .65), 0 0 10px rgba(30, 18, 12, .45), 0 2px 26px rgba(30, 18, 12, .5);
  animation: rise .9s var(--ease) .2s both;
}
/* White Proovly logo, top-left of the Home photo (before the scroll rules below so those win) */
.hh-logo { position: absolute; left: 16px; top: calc(env(safe-area-inset-top, 0px) + 16px); width: min(17.9%, 66px); height: auto;
  filter: drop-shadow(0 1px 2px rgba(30, 18, 12, .6)) drop-shadow(0 0 10px rgba(30, 18, 12, .35));
  pointer-events: none; animation: rise .9s var(--ease) .1s both; }
.hh-text h1, .hh-text .lead, .hh-text .lead.long { color: #fff; }
.hh-text .lead.long { color: rgba(255, 255, 255, .94); }
.hh-text h1 { font-size: clamp(23px, 6.8vw, 29px); line-height: 1.1; }
.hh-text h1.long { font-size: clamp(19px, 5.2vw, 23px); }
.hh-heart { filter: drop-shadow(0 1px 2px rgba(30, 18, 12, .6)) drop-shadow(0 0 8px rgba(30, 18, 12, .35)); display: inline-block; width: .9em; height: auto; margin-left: .25em; vertical-align: -.1em; animation: pop .7s var(--spring) .7s both; }
.hh-text .lead { font-size: clamp(15.5px, 4.5vw, 18px); line-height: 1.28; margin: 6px 0 0; font-weight: 500; }
.hh-text .lead.long { font-size: clamp(14px, 3.9vw, 15.5px); line-height: 1.34; }
.streak-card.over-hero { position: relative; z-index: 1; box-shadow: var(--shadow); }

/* Parallax: the photo stays put and the page slides up over it on a solid sheet. */
.view.home { padding-bottom: 0; }
.home-hero { position: sticky; top: 0; z-index: 0; }
.home-body {
  position: relative; z-index: 1; margin: -58px calc(-1 * var(--gutter)) 0; padding: 0 var(--gutter) calc(90px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(180deg, transparent 0, transparent 48px, var(--bg) 120px);
}
@supports (animation-timeline: scroll()) {
  .hh-text, .hh-logo { animation: rise .9s var(--ease) .2s both, hero-away linear both; animation-timeline: auto, scroll(root); animation-range: normal, 0 300px; }
  @keyframes hero-away { to { opacity: 0; transform: translateY(-28px); } }
}

/* ---------- home: journal cards ---------- */
.journal { position: relative; z-index: 2; margin-top: 14px; overflow: visible; } /* above the card before it, so the flower overlaps it */
.j-flower { position: absolute; top: -22px; right: -8px; width: 88px; z-index: 0; height: auto; pointer-events: none; transform: rotate(8deg); animation: sway 7s ease-in-out infinite; transform-origin: 80% 90%; }
.reflect .j-flower { width: 90px; top: -14px; right: -20px; transform: rotate(-4deg) scaleX(-1); transform-origin: 50% 90%; animation-name: sway-flip; } /* mirrored in place */
@keyframes sway { 0%, 100% { transform: rotate(8deg); } 50% { transform: rotate(4deg); } }
@keyframes sway-flip { 0%, 100% { transform: rotate(-4deg) scaleX(-1); } 50% { transform: rotate(-8deg) scaleX(-1); } }
.j-head { display: flex; align-items: center; gap: 10px; padding-right: 14px; margin-bottom: 12px; }
/* One line, even in Polish ("Za co dziś czuję wdzięczność?"): the title shrinks a little on narrow phones.
   Below 360px it can't fit beside the moon and the winter sprig, so there it may wrap. */
.j-head h3 { font-size: clamp(13px, 4.2vw, 19px); line-height: 1.2; position: relative; white-space: nowrap; }
@media (max-width: 359px) { .j-head h3 { white-space: normal; text-wrap: balance; } }
.j-head .small { margin: 2px 0 0; font-family: var(--serif); font-size: 14px; }
.j-heart { width: 34px; height: auto; flex: none; filter: var(--ink-filter); margin: 0 2px; }
.j-moon { width: 30px; height: 30px; flex: none; color: var(--primary-2); display: grid; place-items: center; }
.j-moon svg.i { width: 28px; height: 28px; fill: currentColor; stroke: none; }
/* Solid heart drawn in the same colour and size as the moon */
.j-heart-solid::before { content: ""; width: 19px; height: 17px; background: currentColor; -webkit-mask: url(img/heart-solid.svg) center / contain no-repeat; mask: url(img/heart-solid.svg) center / contain no-repeat; }
.grat-list { display: flex; flex-direction: column; gap: 7px; }
.grat-row {
  display: flex; align-items: center; gap: 8px; padding: 3px 2px 3px 6px; border-radius: 12px; background: var(--surface);
  border: 1px solid var(--line); transition: border-color .25s, box-shadow .3s; animation: rise .45s var(--ease) both; cursor: text;
}
.grat-row:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 20%, transparent); }
.grat-row .num { width: 26px; height: 26px; border-radius: 50%; background: var(--blush); color: var(--ink-2); display: grid; place-items: center; font-size: 13px; flex: none; font-variant-numeric: tabular-nums; }
.grat-del { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; color: var(--ink-3); flex: none; position: relative; transition: background .2s, color .2s, transform .3s var(--spring); }
.grat-del::before { content: ""; position: absolute; inset: -8px; } /* a 44px tap area around the small button */
.grat-del svg.i { width: 15px; height: 15px; stroke-width: 1.6; }
.grat-del:hover, .grat-del:focus-visible { color: var(--danger); background: var(--blush); }
.grat-del:active { transform: scale(.85); }
.grat-row .num { cursor: text; }
.grat-row textarea { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; padding: 7px 2px; font-size: 14px; line-height: 1.35; font-weight: 300; resize: none; overflow: hidden; display: block; }
.grat-row textarea::placeholder, .de-grat .field::placeholder { color: var(--ink-3); font-style: italic; }
.grat-add {
  display: flex; align-items: center; gap: 12px; width: 100%; margin-top: 8px; padding: 6px 10px 6px 6px; border-radius: 14px;
  background: color-mix(in srgb, var(--blush) 55%, var(--surface)); font-size: 14.5px; color: var(--ink-2); transition: transform .35s var(--spring), background .25s;
}
.grat-add:active { transform: scale(.98); }
.grat-add .plus { width: 30px; height: 30px; border-radius: 50%; background: var(--primary); color: var(--on-primary); display: grid; place-items: center; flex: none; }
.grat-add .plus svg.i { width: 16px; height: 16px; stroke-width: 2; }
.j-q { display: block; font-family: var(--serif); font-size: 15.5px; line-height: 1.35; color: var(--ink); margin: 14px 2px 8px; }
.j-head + .j-q { margin-top: 4px; padding-right: 56px; }
.j-field { min-height: 56px !important; font-size: 14.5px; padding: 12px 14px; border-radius: 14px; }
.j-saved { margin: 10px 2px 0; font-size: 11.5px; color: var(--ink-3); text-align: right; }

/* ---------- home: your evidence ---------- */
.evidence-card { margin-top: 14px; display: flex; flex-direction: column; gap: 14px; }
.ev-top { display: flex; align-items: center; gap: 14px; }
.ev-top h3 { font-size: 21px; }
.ev-top .small { font-family: var(--serif); font-size: 14.5px; }
.polaroids { width: 108px; height: auto; flex: none; display: block; margin: -6px -2px -6px -6px; filter: drop-shadow(0 8px 12px rgba(110, 78, 60, .16)); animation: tilt-in .9s var(--spring) .45s both; transform-origin: 40% 80%; }
@keyframes tilt-in { from { opacity: 0; transform: rotate(-30deg) translateY(10px); } }
.today-list { display: flex; flex-direction: column; border-top: 1px solid var(--line); padding-top: 12px; }
.echo-card { margin-top: 12px; }
.echo-card .quote:first-of-type { padding-top: 6px; }
.star-mark { width: 14px; height: 14px; margin-right: 5px; vertical-align: -2px; color: var(--primary); }
.actions .star-btn { grid-column: 1 / -1; }
.star-btn.starred { color: var(--primary); border-color: var(--primary); }
.star-btn.starred svg.i { color: var(--primary); }

/* ---------- add evidence ---------- */
.capture { display: flex; gap: 14px; align-items: center; }
.cap-title { font-family: var(--serif); font-size: 20px; color: var(--ink); }
.nudge { font-family: var(--serif); font-style: italic; font-size: 16.5px; color: var(--ink-2); margin: 14px 4px 0; padding-left: 14px; border-left: 2px solid var(--accent); }
.q { margin-top: 20px; }
.q label, .q-label { display: block; font-size: 14.5px; font-weight: 400; color: var(--ink); margin: 0 2px 8px; }
.q-label { margin-top: 18px; }
.add-form { margin-top: 16px; }
.add-form > .q:first-child, .add-form > .q:first-child .q-label { margin-top: 0; }
.field {
  width: 100%; border: 1px solid var(--line); background: var(--surface); border-radius: 18px; padding: 14px 16px;
  font-size: 15.5px; line-height: 1.5; font-weight: 300; resize: none; outline: none; min-height: 52px;
  transition: border-color .25s, box-shadow .35s var(--ease), height .2s var(--ease);
}
textarea.field { min-height: 92px; }
textarea.field.big { min-height: 150px; }
.field:focus { border-color: var(--accent); box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 22%, transparent); }
.field::placeholder { color: var(--ink-3); opacity: 1; white-space: pre-line; font-style: italic; } /* examples, so they don't read as answers */
.select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%), linear-gradient(135deg, var(--ink-3) 50%, transparent 50%); background-position: calc(100% - 22px) 55%, calc(100% - 16px) 55%; background-size: 6px 6px; background-repeat: no-repeat; }
.chips { display: flex; flex-wrap: wrap; gap: 9px; }
/* Under the Library filters: what the chosen one is about. */
.filter-sub { display: flex; align-items: center; gap: 14px; margin: 10px 4px 8px; text-align: left; text-wrap: pretty; font-family: var(--serif); font-size: 19px; line-height: 1.35; color: var(--ink-2); animation: rise .35s var(--ease) both; }
.filter-sub > img { flex: none; width: 60px; height: 60px; object-fit: contain; }
.chip {
  border-radius: 999px; padding: 9px 17px; background: var(--neutral); color: var(--ink); font-size: 14px;
  font-family: var(--serif); transition: background .3s, color .3s, transform .4s var(--spring);
  border: 1px solid transparent;
}
.chip:active { transform: scale(.93); }
.chip.on { background: var(--primary); color: var(--on-primary); animation: pop .45s var(--spring); }
/* A category she hasn't chosen yet (Add evidence): greyed, with a plus to add it. */
.chip.off { display: inline-flex; align-items: center; gap: 5px; background: transparent; color: var(--ink-3); border: 1px dashed color-mix(in srgb, var(--ink-3) 55%, transparent); }
.chip.off .chip-plus { width: 14px; height: 14px; stroke-width: 1.8; }
/* The category pills share out each line, so the rows end evenly. */
.cat-pick .chip, .day-pick .chip { flex: 1 1 auto; display: inline-flex; align-items: center; justify-content: center; }
.hint { font-size: 12.5px; color: var(--ink-3); min-height: 19px; margin: 9px 2px 0; }
.cat-add-hint { display: flex; align-items: center; gap: 6px; min-height: 0; margin-top: 2px; }
.cat-add-hint svg.i { width: 13px; height: 13px; flex: none; }
.draft-note { margin: 0 2px; font-size: 13px; color: var(--ink-2); }
.draft-note .link { padding: 0; font-size: 13px; }
.search-scope { margin: -4px 2px 10px; font-size: 13px; color: var(--ink-2); }
.search-scope .link { padding: 0; font-size: 13px; }
/* A sheet's title takes the focus when it opens; it needs no ring for that. */
.sheet [tabindex="-1"]:focus { outline: none; }
.save-btn { margin-top: 20px; }
.add-foot { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-top: 26px; text-align: center; }
.add-foot img { width: var(--foot-art); opacity: .8; }
.add-foot .caps { line-height: 1.9; }

/* ---------- library ---------- */
.searchbox { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .45s var(--ease), margin .45s var(--ease); margin-bottom: 0; }
.searchbox.open { grid-template-rows: 1fr; margin-bottom: 14px; }
.searchbox-in { overflow: hidden; position: relative; }
.searchbox-in > svg.i { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--ink-3); }
.searchbox input { width: 100%; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 13px 16px 13px 44px; outline: none; font-size: 15px; }
.searchbox input:focus { border-color: var(--accent); }
/* The Library filters wrap onto more lines instead of scrolling sideways, so every chip is in view. */
/* The chips share out each line, so every line ends evenly. */
.chiprow { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 2px 0 6px; }
.chiprow .chip, .range-panel .chip.sm { flex: 1 1 auto; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 8px 16px; font-size: 13.5px; }
.chip-pair { flex: 1 1 auto; display: flex; gap: 8px; }
.chip-count { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; display: grid; place-items: center; font-family: var(--sans); font-size: 11px; font-variant-numeric: tabular-nums; background: var(--surface); color: var(--ink-2); }
.chip.on .chip-count { background: color-mix(in srgb, var(--on-primary) 18%, transparent); color: var(--on-primary); }
@media (hover: hover) and (pointer: fine) { .chiprow { cursor: grab; } .chiprow .chip { cursor: pointer; } }
.chiprow.dragging, .chiprow.dragging .chip { cursor: grabbing; user-select: none; }
.count { font-family: var(--serif); font-style: italic; font-size: 17px; color: var(--ink); margin: 20px 2px 10px; }
.list { display: flex; flex-direction: column; gap: 12px; }
.entry { display: flex; gap: 14px; align-items: flex-start; text-align: left; animation: rise .55s var(--ease) both; animation-delay: calc(var(--i) * 45ms + 120ms); }
.eicon { width: 42px; height: 42px; border-radius: 50%; background: var(--blush); display: grid; place-items: center; color: var(--primary); flex: none; }
.eicon svg.i { width: 20px; height: 20px; }
.eicon.big { width: 52px; height: 52px; }
.eicon.big svg.i { width: 25px; height: 25px; }
.ebody { display: flex; flex-direction: column; flex: 1; min-width: 0; gap: 3px; }
.etitle { font-family: var(--serif); font-size: 18.5px; line-height: 1.3; color: var(--ink); margin-top: 3px; }
.clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 13.5px; color: var(--ink-2); line-height: 1.45; }
.meta { display: flex; align-items: center; justify-content: space-between; margin-top: 9px; }
.card.entry .meta .time { margin-left: auto; }
.tag { display: inline-block; background: var(--blush); color: var(--ink); border-radius: 999px; padding: 3px 12px; font-size: 12px; font-family: var(--serif); }
.time { font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.small-empty { margin-bottom: 12px; }
.grat-card { cursor: default; }
.grat-card-heart { width: 22px; height: auto; }
.grat-items { list-style: none; margin: 6px 0 2px; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.grat-items li { position: relative; padding-left: 16px; font-size: 14px; color: var(--ink-2); line-height: 1.45; }
.grat-items li::before { content: "♡"; position: absolute; left: 0; top: 0; font-size: 11px; color: var(--heart); }

/* ---------- entry detail ---------- */
.detail { padding: 22px; }
.detail-head { display: flex; align-items: center; gap: 12px; }
.dsec { margin-top: 22px; animation: rise .55s var(--ease) both; animation-delay: calc(var(--i) * 60ms + 120ms); }
.dsec .caps { margin-bottom: 7px; }
.dsec p { margin: 0; font-family: var(--serif); font-size: 22px; line-height: 1.35; white-space: pre-wrap; color: var(--ink); }
.dsec p.body { font-family: var(--sans); font-size: 16px; line-height: 1.65; color: var(--ink-2); }
.dmeta { display: flex; justify-content: space-between; gap: 12px; margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 14px; }
.dmeta .right { text-align: right; }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 18px; }

/* ---------- me ---------- */
/* The greeting: "Good morning," over her name in large italics, each on one line, and the photo to the
   right of them. The words keep their size; the photo gets smaller on a narrow screen to make room. */
.me-hello { display: grid; grid-template-columns: auto minmax(56px, 1fr); align-items: center; gap: 0 16px; margin: 4px 0 22px; }
.me-hello .grow { min-width: 0; }
.me-greet, .me-name, .me-glad { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-greet { margin: 0; font-family: var(--serif); font-size: 22px; line-height: 1.2; color: var(--ink); }
.me-name { display: block; max-width: 100%; padding: 0; text-align: left; font-family: var(--serif); font-style: italic; font-weight: 500;
  font-size: 44px; line-height: 1.1; letter-spacing: -.01em; color: color-mix(in srgb, var(--heart) 30%, var(--ink)); cursor: pointer; }
.me-name.empty { font-size: 26px; padding: 4px 0; color: var(--ink-3); }
.me-name:active { opacity: .7; }
.me-glad { margin: 6px 0 0; font-size: 15px; color: var(--ink-2); }
/* Under the greeting and the photo, across the whole width on one line. */
.me-since { grid-column: 1 / -1; margin: 10px 0 0; font-family: var(--serif); font-style: italic; font-size: 14px; color: var(--ink-3);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* The photo: 112px where there is room, down to 56px. It sits in the middle of the room right of the words,
   and is lifted 28px to halfway between the top of the page and the stats card: the header above the
   greeting takes 106px (the page's 18px, the header's 22px + 44px + 18px, the greeting's 4px), the line
   under it 27px and the gap below 22px. The negative margin lifts it without making the row taller. */
.me-hello .avatar-btn { justify-self: center; width: min(112px, 100%); height: auto; min-height: 0; aspect-ratio: 1; margin-top: -56px;
  padding: 4px; background: var(--surface); box-shadow: 0 0 0 1px var(--blush-2), var(--shadow-sm); }
.me-hello .avatar-lg { display: block; width: 100%; height: 100%; } /* a block, so no line height makes the button taller than wide */
/* The button draws the ring here, so the drawn avatar leaves its own out. */
.me-hello .avatar-ring { display: none; }
.me-hello .avatar-cam { right: 0; bottom: 2px; width: clamp(24px, 30%, 34px); height: auto; aspect-ratio: 1; background: var(--surface);
  color: var(--ink-2); box-shadow: 0 0 0 1px var(--blush-2), var(--shadow-sm); }
.me-hello .avatar-cam svg.i { width: 45%; height: 45%; }
/* On a really small screen the photo moves up to the header's line, right of the wordmark, and the words
   get the whole width. The header's middle is 44px above the greeting (its 18px + 44px / 2, the greeting's 4px). */
@media (max-width: 359px) {
  .me-hello { position: relative; grid-template-columns: 1fr; }
  .me-hello .avatar-btn { position: absolute; top: calc(-44px - 56px / 2); right: 0; width: 56px; margin: 0; }
}
.avatar-lg { width: 64px; height: 64px; flex: none; }
.avatar-ring { fill: none; stroke: color-mix(in srgb, var(--heart) 55%, var(--surface)); stroke-width: 2.2; }
.avatar-figure { fill: none; stroke: color-mix(in srgb, var(--heart) 50%, var(--primary)); stroke-width: 2.7; stroke-linecap: round; stroke-linejoin: round; }
/* One card, five columns split by thin lines. */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 12px; padding: 16px 4px; }
.stat { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0; padding: 0 clamp(4px, 1.6vw, 9px); animation: rise .55s var(--ease) both; animation-delay: calc(var(--i) * 60ms + 200ms); }
.stat + .stat { border-left: 1px solid var(--line); }
.stat-ic { width: clamp(28px, 9vw, 34px); height: clamp(28px, 9vw, 34px); border-radius: 50%; display: grid; place-items: center; color: var(--heart); background: var(--blush); margin-bottom: 8px; }
.stat-ic svg.i { width: 16px; height: 16px; }
.stat b { font-family: var(--serif); font-weight: 500; font-size: clamp(19px, 6.2vw, 24px); line-height: 1.1; font-variant-numeric: tabular-nums; color: var(--ink); }
.stat b small { font-size: 12px; color: var(--ink-2); white-space: nowrap; }
/* Narrow phones get slightly smaller labels, so a word never breaks in the middle. */
.stat-lb { font-size: clamp(9.5px, 2.9vw, 11.5px); line-height: 1.25; color: var(--ink-2); }
.int-wrap { position: relative; margin-top: 12px; }
.intention-card { position: relative; overflow: hidden; padding-left: 22px; background: var(--surface); border: 1px solid var(--blush-2); box-shadow: var(--shadow); }
.intention-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: linear-gradient(180deg, var(--heart), var(--accent)); }
.intention-card::after { content: "\201C"; position: absolute; right: 14px; top: -14px; font-family: var(--serif); font-size: 110px; line-height: 1; color: var(--heart); opacity: .18; pointer-events: none; }
.intention-card .caps { color: var(--heart); font-weight: 500; }
/* The (i) after the label opens what an intention is; the tap area is bigger than the icon. */
.intention-head { display: flex; align-items: center; gap: 2px; }
.info-btn { display: grid; place-items: center; width: 32px; height: 32px; margin: -9px 0; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--heart); cursor: pointer; }
.info-btn svg.i { width: 17px; height: 17px; stroke-width: 1.6; }
/* An (i) right after a heading's words, and one in a card's top corner. */
.info-btn.inline { display: inline-grid; vertical-align: middle; width: 28px; height: 28px; margin: -6px 0 -6px 2px; }
.info-btn.corner { position: absolute; top: 6px; right: 6px; margin: 0; z-index: 2; }
.stats { position: relative; }
/* A card opened by a button laid over all of it, so an (i) inside can sit above that button. */
.card-link { position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.streak-card { transition: transform .4s var(--spring); }
.streak-card:has(.card-link:active) { transform: scale(.982); transition-duration: .1s; }
.streak-card .info-btn { position: relative; z-index: 2; }
.cal-legend .info-btn { margin: -8px 0; }
.info-points { list-style: none; margin: 4px 0 8px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.info-points li { display: flex; gap: 10px; font-size: 14px; color: var(--ink); line-height: 1.5; }
.info-points li::before { content: "♡"; color: var(--heart); flex: none; }
.intention-examples { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.intention-examples li { padding: 11px 14px; border-radius: var(--r-md); background: var(--blush); font-family: var(--serif); font-style: italic; color: var(--ink); }
.intention-examples li::before { content: "♡"; margin-right: 8px; color: var(--heart); font-style: normal; }
.intention-text { font-family: var(--serif); font-size: 21px; font-style: italic; line-height: 1.35; margin: 8px 0 4px; color: var(--ink); position: relative; }
/* Today's quote on Me: the picture fills the card edge to edge and the words sit on its light left side,
   with a quote mark above and a short line under. The card grows taller for a long quote; the picture
   stays pinned left so the words keep the light side. The colours stay the same in dark mode. */
.quote-card { position: relative; display: grid; align-items: center; margin: 12px 0 0; padding: 0; overflow: clip; aspect-ratio: 3 / 1; container-type: inline-size;
  border-color: var(--blush-2); box-shadow: var(--shadow); background: #F6E6DC; }
.quote-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: left center; }
.quote-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgb(251 240 232 / .6), rgb(251 240 232 / .45) 48%, transparent 72%); }
.quote-card blockquote { position: relative; z-index: 1; margin: 0; width: 60%; box-sizing: border-box; padding: 4cqi 0 6cqi 6.5cqi;
  font-family: var(--serif); font-weight: 400; font-size: clamp(14px, 4.3cqi, 21px); line-height: 1.3; color: #5E3F34; text-wrap: pretty;
  filter: drop-shadow(0 0 2px #FBF0E8) drop-shadow(0 0 2px #FBF0E8) drop-shadow(0 0 3px #FBF0E8) drop-shadow(0 0 3px #FBF0E8) drop-shadow(0 0 4px #FBF0E8) drop-shadow(0 0 5px #FBF0E8) drop-shadow(0 0 6px #FBF0E8) drop-shadow(0 0 8px #FBF0E8); }
.quote-card blockquote::before { content: ""; display: block; width: 1.5em; height: 1.12em; margin: 0 0 .3em -.08em; background: url("img/quote-mark.webp") left bottom / contain no-repeat; }
/* A long quote gets smaller letters and a little more width, so the card stays close to the picture's shape. */
.quote-card.long blockquote { width: 66%; font-size: clamp(13px, 3.7cqi, 18px); line-height: 1.28; }
.quote-card blockquote::after { content: ""; display: block; width: 46%; height: 3px; margin-top: .55em; background: url("img/quote-line.webp") left center / 100% 100% no-repeat; }
.review-card { text-align: left; margin-bottom: 12px; }
.rv-top { display: flex; align-items: center; gap: 12px; }
.rv-top .t { font-family: var(--serif); font-size: 18px; }
.rv-stats { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); text-align: center; }
.rv-stats > div + div { border-left: 1px solid var(--line); }
.rv-stats b { display: block; font-family: var(--serif); font-weight: 500; font-size: 21px; font-variant-numeric: tabular-nums; }
.rv-stats span { font-size: 11.5px; color: var(--ink-2); }
/* The week's card: the top opens the review; under the stats, the switch for the Sunday email. */
.rv-open { display: block; width: 100%; text-align: left; transition: transform .4s var(--spring); }
.rv-open:active { transform: scale(.982); transition-duration: .1s; }
.rv-email { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
/* The week's card: the stats, then this week's bars under them, across the card. */
.rv-body { display: grid; grid-template-columns: 1fr; gap: 12px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.rv-body .rv-stats { margin: 0; padding: 0; border: 0; align-items: start; }
.rv-body .rv-stats b { font-size: 19px; }
.rv-body .rv-stats span { font-size: 10.5px; line-height: 1.25; display: block; }
.rv-body .rv-stats b { white-space: nowrap; }
.rv-body .pg-bars { min-height: 91px; padding: 12px 0 0; border-left: 0; border-top: 1px solid var(--line); }
.rv-body .pg-track { max-width: 18px; }
.rv-top-cat { margin: 0; padding-top: 12px; border-top: 1px solid var(--line); font-size: 12.5px; line-height: 1.9; color: var(--ink-2); text-align: center; }
/* Each top category as a tag with its icon, in the sentence under the week's bars. */
.rv-cat { display: inline-flex; align-items: center; gap: 4px; padding: 1px 9px 1px 7px; border-radius: 999px; vertical-align: middle;
  background: var(--blush); color: var(--ink); font-family: var(--serif); font-size: 13px; line-height: 1.5; white-space: nowrap; }
.rv-cat svg { width: 13px; height: 13px; color: var(--heart); }
/* Each bar is a track three steps tall; the fill goes up a step for each part done. */
.pg-bars { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; min-height: 64px; padding-left: 12px; border-left: 1px solid var(--line); }
.pg-day { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.pg-track { position: relative; flex: 1; width: 100%; max-width: 16px; border-radius: 999px; background: var(--blush); overflow: visible; }
.pg-fill { position: absolute; left: 0; right: 0; bottom: 0; height: calc(var(--h) / 3 * 100%); border-radius: 999px;
  background: linear-gradient(180deg, var(--heart), color-mix(in srgb, var(--heart) 55%, var(--blush)));
  transform-origin: bottom; animation: pg-grow .7s var(--ease) both; animation-delay: calc(var(--i) * 50ms + 300ms); }
/* A full day uses the perfect-day colours of the Home week's diamond. */
.pg-fill.full { background: linear-gradient(180deg, var(--perfect-hi), color-mix(in srgb, var(--perfect) 70%, var(--perfect-hi)) 55%, var(--perfect));
  box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--perfect) 60%, transparent), 0 0 10px 1px color-mix(in srgb, var(--perfect) 60%, transparent);
  animation: pg-grow .7s var(--ease) both, pg-glow 2.4s ease-in-out infinite alternate; animation-delay: calc(var(--i) * 50ms + 300ms), 1s; }
.pg-day.ahead .pg-track { opacity: .45; }
.pg-lb { font-size: 9.5px; letter-spacing: -.01em; color: var(--ink-3); }
.pg-day.today .pg-lb { color: var(--ink); font-weight: 500; }
@keyframes pg-grow { from { transform: scaleY(0); } }
@keyframes pg-glow { to { box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--perfect) 60%, transparent), 0 0 16px 3px color-mix(in srgb, var(--perfect) 65%, transparent); } }
@media (prefers-reduced-motion: reduce) { .pg-fill, .pg-fill.full { animation: none; } }

/* The week's review: the list of earlier weeks under it. */
.past-weeks { margin: 14px 0 18px; }
.sheet-stats { grid-template-columns: 1fr 1fr; margin: 16px 0 6px; }
.rows { padding: 4px 16px; }
.row-set { display: flex; align-items: center; gap: 14px; width: 100%; padding: 13px 0; text-align: left; cursor: pointer; transition: transform .35s var(--spring); }
.row-set + .row-set { border-top: 1px solid var(--line); }
button.row-set:active, label.row-set:active { transform: translateX(3px); }
.chev { width: 18px !important; height: 18px !important; color: var(--ink-3); }
.me-foot { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-top: 30px; }
.badge-img { width: 120px; opacity: .85; animation: spin-in 1.2s var(--ease) .5s both; }
@keyframes spin-in { from { opacity: 0; transform: rotate(-40deg) scale(.8); } }

/* iPhone Safari zooms the page into any text box under 16px and doesn't zoom back out.
   Only iOS matches this test, so other phones keep the smaller sizes. */
@supports (-webkit-touch-callout: none) {
  input:not([type=checkbox]):not([type=radio]):not([type=file]), textarea, select { font-size: 16px !important; }
}

/* ---------- tab bar ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; margin: 0 auto; bottom: 0; width: 100%; max-width: 480px; z-index: 20;
  display: grid; grid-template-columns: repeat(4, 1fr); padding: 8px 10px calc(10px + env(safe-area-inset-bottom, 0px));
  background: color-mix(in srgb, var(--surface) 84%, transparent); -webkit-backdrop-filter: blur(20px) saturate(1.3); backdrop-filter: blur(20px) saturate(1.3);
  border-top: 1px solid color-mix(in srgb, var(--line) 80%, transparent); border-radius: 26px 26px 0 0;
  box-shadow: 0 -10px 30px -18px rgba(90, 60, 45, .35);
}
html.typing .tabbar { transform: translateY(110%); pointer-events: none; }
.tabbar { transition: transform .3s var(--ease); }
.sheet-body { scroll-padding-bottom: 24px; }
.tab-ind { position: absolute; top: 8px; left: 10px; width: calc((100% - 20px) / 4); height: 54px; transform: translateX(calc(var(--tab) * 100%)); transition: transform .55s var(--spring); pointer-events: none; }
.tab-ind::before { content: ""; position: absolute; left: 50%; top: 0; width: 74px; height: 100%; transform: translateX(-50%); border-radius: 20px; background: var(--blush); }
.tab { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; height: 54px; padding: 0; color: var(--ink-3); font-size: 11px; line-height: 14px; transition: color .3s; }
.tab .tab-ic { display: grid; place-items: center; height: 24px; transition: transform .45s var(--spring); }
.tab.on { color: var(--ink); }
.tab.on .tab-ic { transform: scale(1.06); }
.tab:active .tab-ic { transform: scale(.85); }
.tab-lb { font-weight: 400; }

/* ---------- overlays / sheets ---------- */
.overlay { position: fixed; inset: 0; bottom: var(--kb, 0px); transition: bottom .25s var(--ease); z-index: 50; display: flex; align-items: flex-end; justify-content: center; background: rgb(var(--scrim) / calc(.34 * var(--dim, 1))); animation: fade-in .3s var(--ease); }
.overlay.closing { animation: fade-out .3s var(--ease) forwards; }
@keyframes fade-out { to { opacity: 0; } }
.sheet {
  width: 100%; max-width: 480px; max-height: min(92dvh, calc(100% - 12px)); display: flex; flex-direction: column; background: var(--bg);
  border-radius: 30px 30px 0 0; box-shadow: 0 -20px 50px -20px rgba(40, 25, 18, .45);
  animation: sheet-in .55s var(--soft-spring); transition: transform .35s var(--ease);
}
.overlay.closing .sheet { animation: sheet-out .3s cubic-bezier(.4, 0, .9, .6) forwards; }
@keyframes sheet-in { from { transform: translateY(100%); } }
@keyframes sheet-out { to { transform: translateY(105%); } }
.grab-zone { padding: 12px 0 8px; display: flex; justify-content: center; touch-action: none; cursor: grab; flex: none; }
/* Closing a sheet with unsaved changes asks here, at its foot. */
.discard-bar { flex: none; display: flex; flex-direction: column; gap: 10px; padding: 14px 22px calc(14px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); background: var(--surface); border-radius: 22px 22px 0 0; animation: rise .3s var(--ease) both; }
.discard-bar b { display: block; font-family: var(--serif); font-weight: 500; font-size: 16px; }
.discard-bar span { font-size: 12.5px; color: var(--ink-2); }
.crop-confirm { display: flex; flex-direction: column; gap: 6px; padding: 14px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.crop-confirm b { font-family: var(--serif); font-weight: 500; font-size: 16px; }
.crop-confirm span { font-size: 12.5px; color: var(--ink-2); }
.crop-confirm .discard-btns { margin-top: 6px; }
.discard-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grab { width: 42px; height: 5px; border-radius: 5px; background: var(--blush-2); }
.sheet-body { overflow-y: auto; overscroll-behavior: contain; padding: 6px 22px calc(26px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 12px; }
.sheet-body > * { animation: rise .5s var(--ease) both; }
.sheet-body > :nth-child(2) { animation-delay: 40ms; } .sheet-body > :nth-child(3) { animation-delay: 80ms; }
.sheet-body > :nth-child(4) { animation-delay: 120ms; } .sheet-body > :nth-child(5) { animation-delay: 160ms; }
.sheet-body > :nth-child(n+6) { animation-delay: 200ms; }
.sheet-body .link { align-self: center; }
.sheet-title { font-size: 27px; }
/* A long sheet keeps its Close button in reach at the bottom while it scrolls. */
.sheet-body .btn.sheet-close { position: sticky; bottom: 0; z-index: 2; box-shadow: 0 0 0 12px var(--bg), 0 40px 0 12px var(--bg), 0 -18px 18px var(--bg); }
.rv-nav { display: flex; align-items: center; gap: 10px; }
.rv-nav .caps { text-align: center; }
.sub-h { font-size: 19px; margin-top: 10px; }
.bars { display: flex; flex-direction: column; gap: 9px; margin-top: 4px; }
.bar { display: flex; align-items: center; gap: 10px; font-size: 13.5px; }
.bar-l { width: 104px; flex: none; }
.track { flex: 1; height: 8px; border-radius: 8px; background: var(--neutral); overflow: hidden; }
.fill { display: block; height: 100%; border-radius: 8px; background: linear-gradient(90deg, var(--accent), var(--heart)); transform-origin: left; animation: grow-x .9s var(--ease) both; animation-delay: calc(250ms + var(--i) * 80ms); }
@keyframes grow-x { from { transform: scaleX(0); } }
.bar-n { width: 22px; text-align: right; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.picks { display: flex; flex-direction: column; gap: 10px; }
/* The week's review, day by day, each day as in the Library. */
.rv-days { display: flex; flex-direction: column; gap: 22px; }
.week-counts { grid-template-columns: repeat(3, 1fr); }
.week-answer { margin-top: 18px; }
.week-answer .q { margin-top: 0; }
.week-counts span { display: block; line-height: 1.25; }
.pick { text-align: left; display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; }
.pick-t { font-family: var(--serif); font-size: 17.5px; line-height: 1.3; }
.perm-line { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.confirm { display: flex; flex-direction: column; gap: 12px; }


/* celebration */
.overlay.full { align-items: center; background: color-mix(in srgb, var(--bg) 90%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); animation: fade-in .35s var(--ease); }
.celebrate { width: 100%; max-width: 380px; padding: 26px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.overlay.closing .celebrate { animation: fade-out .3s forwards; }
.burst { position: relative; width: 150px; height: 150px; margin-bottom: 10px; }
.check-ring { position: absolute; inset: 15px; width: 120px; height: 120px; }
.cr-halo { fill: color-mix(in srgb, var(--blush) 80%, transparent); stroke: var(--accent); stroke-width: 1.5; transform-origin: 60px 60px; animation: pop .7s var(--spring) .05s both; }
.cr-fill { fill: var(--primary); transform-origin: 60px 60px; animation: pop .6s var(--spring) .25s both; }
.ck { fill: none; stroke: var(--on-primary); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 60; stroke-dashoffset: 60; animation: draw .5s var(--ease) .6s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.ray { position: absolute; left: 50%; top: 50%; width: 3px; height: 14px; margin: -7px 0 0 -1.5px; border-radius: 3px; background: var(--accent); opacity: 0; transform: rotate(var(--r)) translateY(-66px); animation: ray .8s var(--ease) var(--d) both; }
@keyframes ray { 0% { opacity: 0; transform: rotate(var(--r)) translateY(-44px) scaleY(.3); } 40% { opacity: 1; } 100% { opacity: .9; transform: rotate(var(--r)) translateY(-70px) scaleY(1); } }
.sp { position: absolute; left: 50%; top: 50%; width: 16px; height: 16px; margin: -8px 0 0 -8px; color: var(--heart); opacity: 0; animation: float-out 1.6s var(--ease) var(--d) both; }
.sp svg.i { width: 16px; height: 16px; fill: currentColor; stroke: none; }
@keyframes float-out { 0% { opacity: 0; transform: translate(0, 0) scale(.3); } 30% { opacity: 1; } 100% { opacity: .8; transform: translate(var(--x), var(--y)) scale(1) rotate(35deg); } }
.cel-title { font-size: 32px; animation: rise .6s var(--ease) .7s both; }
.cel-body { font-family: var(--serif); font-size: 18.5px; color: var(--ink-2); margin: 0; line-height: 1.35; animation: rise .6s var(--ease) .82s both; }
.cel-sub { font-size: 14px; color: var(--ink-3); margin: 4px 0 0; animation: rise .6s var(--ease) .95s both; }
.later { display: flex; flex-direction: column; gap: 10px; width: 100%; margin-top: 18px; animation: rise .6s var(--ease) 1.25s both; }

/* toast (board: notification banner) */
.toast {
  position: fixed; left: 50%; top: calc(env(safe-area-inset-top, 0px) + 12px); transform: translateX(-50%); z-index: 70;
  width: calc(100% - 28px); max-width: 440px; display: flex; align-items: center; gap: 12px; padding: 12px 10px 12px 12px;
  background: color-mix(in srgb, var(--surface) 94%, transparent); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); animation: toast-in .55s var(--soft-spring);
}
.toast b { display: block; font-family: var(--serif); font-weight: 500; font-size: 16px; }
.toast span:not(.spark-ring) { font-size: 12.5px; color: var(--ink-2); }
.toast .spark-ring { width: 40px; height: 40px; }
.toast-undo { flex: none; padding: 8px 14px; border-radius: 999px; background: var(--blush); color: var(--ink); font-weight: 500; font-size: 13.5px; }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, -24px) scale(.96); } }

/* ---------- print (Export My Proof) ---------- */
#print { display: none; }
@media print {
  html, body { background: #fff !important; }
  .app, .overlay, .toast, .tabbar, #splash { display: none !important; }
  #print { display: block; color: #3E2E27; font-family: var(--sans); padding: 0 10mm; }
  #print .pcover { text-align: center; padding: 42mm 0 20mm; page-break-after: always; }
  #print .pword { width: 200px; margin: 0 auto 24px; }
  #print h1 { font-family: var(--serif); font-weight: 500; font-size: 40px; color: #3E2E27; }
  #print .pint { font-family: var(--serif); font-style: italic; font-size: 18px; max-width: 420px; margin: 28px auto 0; }
  #print .pe { page-break-inside: avoid; border-bottom: 1px solid #EADDD6; padding: 14px 0; }
  #print .pe h3 { font-family: var(--serif); font-weight: 500; font-size: 20px; margin: 4px 0; color: #3E2E27; }
  #print .pe p { margin: 6px 0; font-size: 12.5px; line-height: 1.55; }
  #print .plab { font-size: 9px; letter-spacing: .2em; text-transform: uppercase; color: #9C8A80; }
  #print .pend { text-align: center; font-family: var(--serif); font-style: italic; margin-top: 30px; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0ms !important; transition-duration: .01ms !important; }
  .welcome-photo img, .hero-img { animation: none !important; }
}

/* ---------- language ---------- */
.lang-pill { position: absolute; z-index: 3; top: calc(env(safe-area-inset-top, 0px) + 14px); right: 14px; display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px 7px 10px; border-radius: 999px; font-size: 12px; font-weight: 500; letter-spacing: .08em; color: var(--ink);
  background: color-mix(in srgb, var(--bg) 72%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--line); cursor: pointer; transition: transform .35s var(--spring); animation: fade-in .6s var(--ease) .4s both; }
.lang-pill:active { transform: scale(.95); }
.lang-pill svg { width: 16px; height: 16px; }
.lang-list { margin-top: 14px; }
.lang-code { width: 38px; height: 38px; flex: none; display: grid; place-items: center; border-radius: 50%; font-size: 12px; font-weight: 500; letter-spacing: .08em;
  background: color-mix(in srgb, var(--ink) 7%, transparent); color: var(--ink-2); transition: background .3s, color .3s; }
.lang-opt.on .lang-code { background: var(--primary); color: var(--on-primary); }
.lang-opt .t { font-size: 16px; }
.lang-code svg { width: 18px; height: 18px; }
.lang-check { width: 20px; height: 20px; color: var(--primary); }
.badge-vec { display: block; opacity: 1; }
.badge-vec svg { display: block; width: 100%; height: auto; }
/* The colours of the original artwork, in both themes: terracotta lines, no fill inside the ring. */
.badge-vec .disc { display: none; }
.badge-vec .lines { fill: #9C4833; }

/* ---------- account & sign-in ---------- */
.have-account { display: block; margin: 2px auto 0; font-size: 14px; }
.signin-form { display: flex; flex-direction: column; gap: 12px; }
.signin-form .q-label { margin-top: 10px; }
.code-input { font-size: 28px; letter-spacing: .5em; text-align: center; font-variant-numeric: tabular-nums; padding-left: .5em; }
.code-input::placeholder { letter-spacing: .3em; color: var(--muted); }
.form-error { margin: 0; color: var(--danger); font-size: 14px; line-height: 1.4; }
.spam-note { display: flex; gap: 10px; align-items: flex-start; margin: 10px 0 2px; padding: 10px 12px; border-radius: 14px; background: var(--blush); }
.spam-note svg.i { width: 20px; height: 20px; flex: none; margin-top: 1px; color: var(--primary); }
.spam-note div { display: flex; flex-direction: column; gap: 3px; text-align: left; }
.spam-note b { font-weight: 500; font-size: 13px; color: var(--ink); }
.spam-note span { font-size: 12px; line-height: 1.38; color: var(--ink-2); }
.signin-links { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 6px; }
.acc-email { overflow-wrap: anywhere; }
.signin-form .btn[disabled], .confirm .btn[disabled] { opacity: .55; pointer-events: none; }
.spin-soft svg { animation: soft-pulse 1.2s ease-in-out infinite; }
@keyframes soft-pulse { 50% { opacity: .35; } }
.signed-as { margin: 0 auto; max-width: 320px; color: var(--ink-2); overflow-wrap: anywhere; }
.count + .card.empty { margin-top: 0; margin-bottom: 12px; }



/* ---------- library: list / calendar switch, calendar, one day ---------- */
/* Solid enough to read over the page header's picture. */
.seg { display: flex; gap: 4px; padding: 4px; border-radius: 999px; background: color-mix(in srgb, var(--surface) 72%, transparent); box-shadow: inset 0 0 0 1px var(--line); backdrop-filter: blur(6px); margin: -4px 0 14px; }
.seg-btn { flex: 1; display: flex; align-items: center; justify-content: center; gap: 7px; padding: 9px 12px; border-radius: 999px; font-size: 14px; color: var(--ink); transition: background .25s, color .25s, box-shadow .25s; }
.seg-btn.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.seg-btn svg { width: 17px; height: 17px; }
.cal { padding: 16px 12px 14px; overflow: hidden; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin: 0 4px 10px; }
.cal-head h3 { font-family: var(--serif); font-weight: 500; font-size: 20px; margin: 0; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-wd span { text-align: center; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); padding: 2px 0 6px; }
.cal-day { aspect-ratio: 1; border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 14px; color: var(--ink); transition: transform .3s var(--spring), background .2s; }
.cal-day.blank { pointer-events: none; }
.cal-day:active { transform: scale(.9); }
.cal-day.has { background: var(--blush); font-weight: 600; }
.cal-day.today { box-shadow: inset 0 0 0 1.5px var(--primary); }
.cal-day.future { opacity: .35; }
.cal-day .dots { display: flex; gap: 3px; height: 6px; }
.dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; flex: none; }
.dot.ev { background: var(--primary); }
.dot.jr { background: var(--heart); }
.cal-legend { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; margin-top: 12px; font-size: 12px; color: var(--ink-2); }
.cal-legend span { display: flex; align-items: center; gap: 6px; }
.cal-count { text-align: center; }
button.round-btn { cursor: pointer; transition: transform .3s var(--spring), opacity .2s; }
button.round-btn:active { transform: scale(.9); }
.round-btn[disabled] { opacity: .3; pointer-events: none; }
.day-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.day-mid { text-align: center; }
.day-title { font-size: 26px; margin: 2px 0 0; }
.day-sec { margin-top: 4px; }
.day-view .list { margin-bottom: 14px; }
.day-card { margin-top: 14px; }
.day-card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.day-card-head h3 { margin: 0; font-family: var(--serif); font-weight: 500; font-size: 19px; }
.day-card-head svg { width: 20px; height: 20px; color: var(--heart); }
.day-card-head .grat-card-heart { width: 20px; height: auto; }
.day-card .q { font-size: 13px; color: var(--ink-2); margin: 12px 0 4px; }
.day-card .a { margin: 0; white-space: pre-wrap; }

/* ---------- create account / log in ---------- */
.auth-btns { display: flex; flex-direction: column; gap: 8px; }
.hidden-btn { visibility: hidden; pointer-events: none; }
.center-links { justify-content: center; }

/* Week row on Home: a tick inside each day with proof */
.wdot { display: grid; place-items: center; }
.wdot svg { width: 13px; height: 13px; color: #fff; stroke-width: 2.6; animation: pop .45s var(--spring) both; animation-delay: calc(450ms + var(--i) * 55ms); }
.app.cube .wdot:not(.rv-again) svg { animation: none; }

/* ---------- completing a day from the calendar ---------- */
.day-edit .sheet-title { margin-bottom: 4px; }
.de-sec { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.de-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.de-head h3 { margin: 0; font-family: var(--serif); font-weight: 500; font-size: 19px; }
.de-head svg.i { width: 20px; height: 20px; color: var(--heart); }
.de-head .grat-card-heart { width: 20px; height: auto; }
.de-grat { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.de-grat .num { width: 24px; height: 24px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: 12px; color: var(--ink-2); background: var(--surface-2); }
.de-grat .field { padding-top: 11px; padding-bottom: 11px; }
.de-q { display: block; font-size: 14px; color: var(--ink); margin: 14px 2px 8px; }
.day-edit .btn.lg { margin-top: 24px; }
.de-see { display: block; margin: 14px auto 0; }
.day-complete { margin-top: 14px; }
.locked-note { color: var(--ink-3); margin: 14px 0 0; }
.cal-hint { margin: 10px 0 0; text-align: center; font-size: 12px; color: var(--ink-3); }
.cal-day.editable:not(.future):not(.has) .n { color: var(--ink); }
.cal-day.editable:not(.future) { cursor: pointer; }
/* The days that can still be changed get a quiet dashed ring (see the legend). */
.cal-day.editable:not(.today):not(.selected):not(.has) { outline: 1.5px dashed color-mix(in srgb, var(--primary) 50%, transparent); outline-offset: -3px; }
.cal-day[disabled]:not(.future) { cursor: default; }
.cal-day[disabled]:not(.future):active { transform: none; }

/* ---------- Library: one day's journal ---------- */
button.grat-card { cursor: pointer; text-align: left; }
.grat-card .refl-title { margin-top: 6px; }
.grat-card .grat-items + .refl-title { margin-top: 10px; }
.refl-q { display: block; font-size: 11.5px; color: var(--ink-3); margin-top: 6px; }
.refl-a { font-size: 13.5px; color: var(--ink-2); }
.refl-a.ev-a { display: block; white-space: pre-wrap; overflow-wrap: anywhere; }
.grat-card .meta { gap: 6px; }
.perfect-tag { color: var(--perfect); letter-spacing: .08em; white-space: nowrap; }
.grat-card.perfect { border-color: color-mix(in srgb, var(--perfect) 45%, var(--line)); }

/* ---------- calendar: three dots, and perfect days ---------- */
.dot.gr { background: var(--heart); }
.dot.rf { background: var(--moon); }
.cal-day { position: relative; }
.cal-day.perfect { background: radial-gradient(circle at 50% 35%, color-mix(in srgb, var(--perfect) 26%, var(--blush)), var(--blush) 70%);
  box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--perfect) 70%, transparent), 0 4px 14px -6px var(--perfect); animation: perfect-glow 3.2s ease-in-out infinite; }
.cal-day.perfect.today { box-shadow: inset 0 0 0 1.5px var(--primary), 0 0 0 1.5px color-mix(in srgb, var(--perfect) 70%, transparent), 0 4px 14px -6px var(--perfect); }
.cal-spark { position: absolute; top: 1px; right: 4px; font-size: 10px; line-height: 1; color: var(--perfect); animation: twinkle 2.4s ease-in-out infinite; }
.legend-perfect { font-style: normal; color: var(--perfect); font-size: 11px; }
.cal-perfect { color: var(--perfect); white-space: nowrap; }
@keyframes perfect-glow { 50% { box-shadow: 0 0 0 1.5px var(--perfect), 0 6px 18px -4px var(--perfect); } }
@keyframes twinkle { 0%, 100% { opacity: .55; transform: scale(.85) rotate(0deg); } 50% { opacity: 1; transform: scale(1.15) rotate(20deg); } }

/* Home week row, as in the calendar's legend: a perfect day is a rose gold diamond,
   an epic day turns into a glowing star. */
.wd.perfect:not(.epic) .wdot { width: 16px; height: 16px; margin: 2px; rotate: 45deg; border-radius: 4px; background: radial-gradient(circle at 35% 30%, var(--perfect-hi), color-mix(in srgb, var(--perfect) 70%, var(--perfect-hi)) 55%, var(--perfect)); border-color: var(--surface); box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--perfect) 60%, transparent), 0 0 10px 1px color-mix(in srgb, var(--perfect) 60%, transparent); }
.wd.perfect:not(.epic) .wdot svg { rotate: -45deg; filter: drop-shadow(0 0 1.2px rgba(110, 60, 45, .7)); }
.wd.epic .wdot { background: none; border-color: transparent; box-shadow: none; }
.wdot .wstar { width: 26px; height: 26px; margin: -3px; overflow: visible; filter: drop-shadow(0 0 2px var(--epic-glow)) drop-shadow(0 0 6px var(--epic-glow));
  animation: pop .45s var(--spring) both, epic-pulse 2.6s ease-in-out 1s infinite; animation-delay: calc(450ms + var(--i) * 55ms), 1s; }
.ws-star { fill: var(--epic-star); stroke: var(--epic-star); stroke-width: 1; stroke-linejoin: round; }
.ws-tick { fill: none; stroke: var(--epic-tick); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
@media (prefers-reduced-motion: reduce) { .wdot .wstar { animation: none; } }

/* Day page */
.perfect-badge { display: flex; align-items: center; gap: 14px; margin-top: 14px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--perfect) 16%, var(--surface)), var(--surface));
  border-color: color-mix(in srgb, var(--perfect) 45%, var(--line)); }
.perfect-badge b { font-family: var(--serif); font-weight: 500; font-size: 18px; }
.perfect-badge .small { margin: 2px 0 0; }
.pb-star { font-size: 26px; color: var(--perfect); animation: twinkle 2.4s ease-in-out infinite; }

/* The "perfect day" toast: gold edge and a burst of sparkles */
.toast.perfect { border-color: color-mix(in srgb, var(--perfect) 55%, var(--line)); overflow: visible; }
.toast.perfect .spark-ring { color: var(--perfect); }
.toast .burst { position: absolute; left: 32px; top: 50%; width: 0; height: 0; pointer-events: none; }
.toast .burst i { position: absolute; font-style: normal; font-size: 13px; color: var(--perfect); opacity: 0;
  animation: burst 1.3s var(--ease) both; animation-delay: calc(var(--k) * 35ms + 150ms); --a: calc(var(--k) * 36deg); }
@keyframes burst {
  0% { opacity: 0; transform: rotate(var(--a)) translateY(0) scale(.4); }
  25% { opacity: 1; }
  100% { opacity: 0; transform: rotate(var(--a)) translateY(-46px) scale(1.1); }
}

@media (prefers-reduced-motion: reduce) {
  .cal-day.perfect, .cal-spark, .pb-star { animation: none !important; }
  .toast .burst { display: none; }
}
.grat-card .meta { justify-content: flex-start; }

/* ---------- Library: grouped by day, with a range of days ---------- */
.list { gap: 22px; }
/* Each day sits on its own tinted panel, every other day in a second tint, so it is clear at a
   glance where a day starts and ends. In the Library and the week's review alike. */
:root {
  --day-a: color-mix(in srgb, var(--blush) 55%, var(--bg)); --day-a-edge: var(--blush);
  --day-b: color-mix(in srgb, var(--primary) 12%, var(--bg)); --day-b-edge: color-mix(in srgb, var(--primary) 24%, var(--line));
}
.day-group { --day-bg: var(--day-a); --day-edge: var(--day-a-edge);
  display: flex; flex-direction: column; gap: 10px; padding: 6px 10px 12px; border-radius: calc(var(--r-lg) + 6px);
  background: var(--day-bg); border: 1px solid var(--day-edge);
  animation: rise .55s var(--ease) both; animation-delay: calc(var(--i) * 45ms + 120ms); }
/* By place in the list, not by index, so it still alternates after a filter or a new day. */
.day-group:nth-child(even) { --day-bg: var(--day-b); --day-edge: var(--day-b-edge); }
/* The calendar shows one day on its own: nothing to tell it apart from, so no panel. */
.cal-selected .day-group { background: none; border: 0; padding: 0; }
.day-group .entry { animation: none; }
/* All of a day's evidence in one card, one piece under another with a thin line between. */
.ev-stack { padding: 6px 18px; display: flex; flex-direction: column; }
.ev-stack .card.entry { background: none; border: 0; box-shadow: none; border-radius: 0; padding: 14px 0; }
.ev-stack .card.entry + .card.entry { border-top: 1px solid var(--line); }
/* One "Evidence" heading for the day; each piece under it shows only its category. */
.ev-stack-head { display: flex; align-items: center; gap: 14px; padding: 12px 0 4px; }
.ev-stack-head .etitle { margin-top: 0; }
.dg-head { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; padding: 8px 6px 10px; border-bottom: 1.5px solid color-mix(in srgb, var(--primary) 26%, var(--day-edge)); text-align: left; cursor: pointer; }
.dg-head .caps { color: var(--ink-2); }
.dg-head .perfect-tag { color: var(--perfect); }
.dg-head .dg-chev { width: 15px; height: 15px; margin-left: auto; color: var(--ink-3); }
.day-group.perfect .dg-head::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--perfect); box-shadow: 0 0 8px var(--perfect); flex: none; }
.refl-card .eicon svg.i { color: var(--moon); }
/* Library: the category and day choices open under their chips. */
.chip svg.chip-chev { width: 13px; height: 13px; transform: rotate(90deg); transition: transform .25s var(--ease); }
.chip[aria-expanded="true"] svg.chip-chev { transform: rotate(-90deg); }
.chip-panel, .range-panel { display: none; }
.chiprow.chip-panel.open { display: flex; margin-top: 2px; animation: rise .35s var(--ease) both; }
.range-panel.open { display: block; animation: rise .35s var(--ease) both; }
/* All the ranges of days in view at once, wrapping onto more lines like the categories. */
.range-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 0; padding: 2px 0 4px; }
.chip.sm { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; font-family: var(--sans); font-size: 12.5px; background: transparent; border: 1px solid var(--line); color: var(--ink-2); }
.chiprow .chip.sm { flex: 1 1 auto; justify-content: center; }
.chip.sm.on { background: var(--blush); border-color: var(--blush-2); color: var(--ink); animation: none; }
.chip.sm svg.i { width: 14px; height: 14px; }
/* The Library's days look and fill their rows like the filter chips above them. */
.range-panel .range-row { gap: 8px; margin: 2px 0 0; padding: 2px 0 6px; }
.range-panel .chip.sm { font-family: var(--serif); background: var(--neutral); border-color: transparent; color: var(--ink); }
.range-panel .chip.sm.on { background: var(--primary); border-color: transparent; color: var(--on-primary); }
.range-custom { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; animation: rise .4s var(--ease) both; }
.range-date { display: flex; flex-direction: column; gap: 4px; font-size: 11.5px; color: var(--ink-3); letter-spacing: .04em; }
.range-date .field { padding: 9px 12px; font-size: 15px; min-height: 0; }

/* ---------- a new version is available ---------- */
.update-banner {
  position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom, 0px) + 92px); transform: translateX(-50%); z-index: 60;
  width: calc(100% - 28px); max-width: 440px; display: flex; align-items: center; gap: 10px; padding: 12px 12px 12px 12px;
  background: color-mix(in srgb, var(--surface) 96%, transparent); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border: 1px solid color-mix(in srgb, var(--primary) 35%, var(--line)); border-radius: 22px; box-shadow: var(--shadow);
  animation: update-in .5s var(--soft-spring) both;
}
.update-banner .spark-ring { width: 38px; height: 38px; flex: none; }
.update-banner b { display: block; font-family: var(--serif); font-weight: 500; font-size: 15.5px; }
.update-banner span:not(.spark-ring) { font-size: 12.5px; color: var(--ink-2); }
.update-banner .btn.sm { padding: 8px 14px; font-size: 13.5px; flex: none; }
.update-banner .link { font-size: 12.5px; flex: none; }
@keyframes update-in { from { opacity: 0; transform: translate(-50%, 24px); } }

/* ---------- Library calendar: the picked day under it ---------- */
.cal-day.selected { background: var(--primary); color: var(--on-primary); font-weight: 600; }
.cal-day.selected .dot { box-shadow: 0 0 0 1px var(--on-primary); }
.cal-day.selected.perfect { background: radial-gradient(circle at 50% 35%, color-mix(in srgb, var(--perfect) 45%, var(--primary)), var(--primary) 70%); }
.cal-selected { display: flex; flex-direction: column; gap: 12px; margin-top: 4px; }
.cal-empty { padding: 18px; }
.cal-empty h3 { margin: 6px 0 0; }
.cal-edit { margin-top: 2px; }

/* ---------- avatar photo ---------- */
.avatar-btn { position: relative; flex: none; width: 64px; height: 64px; padding: 0; border-radius: 50%; cursor: pointer; }
.avatar-btn:active { transform: scale(.96); }
.avatar-photo { display: block; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px var(--blush-2); }
.avatar-cam { position: absolute; right: -2px; bottom: -2px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  background: var(--primary); color: var(--on-primary); box-shadow: 0 0 0 2px var(--surface); }
.avatar-cam svg.i { width: 13px; height: 13px; }
/* The crop stage: a square the photo fills, dimmed outside the round avatar. */
.crop-stage { position: relative; width: min(100%, 280px); aspect-ratio: 1; margin: 16px auto 10px; overflow: hidden; border-radius: 24px;
  background: var(--surface-2); touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; }
.crop-stage:active { cursor: grabbing; }
.crop-img { position: absolute; top: 0; left: 0; max-width: none; transform-origin: 0 0; pointer-events: none; -webkit-user-drag: none; }
.crop-stage.empty .crop-img { display: none; }
.crop-ring { position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
  box-shadow: 0 0 0 999px rgb(0 0 0 / .42); outline: 2px solid rgb(255 255 255 / .85); outline-offset: -2px; }
.crop-stage.empty .crop-ring { box-shadow: none; outline: 2px dashed var(--blush-2); }
.crop-empty { position: absolute; inset: 0; display: none; place-items: center; color: var(--ink-3); pointer-events: none; }
.crop-empty svg.i { width: 36px; height: 36px; }
.crop-stage.empty .crop-empty { display: grid; }
.crop-zoom { display: block; width: min(100%, 280px); margin: 0 auto 14px; accent-color: var(--primary); }
.crop-pick { cursor: pointer; }
.crop-remove { display: block; margin: 12px auto 0; }

/* change log */
.log-card { padding: 14px 16px; }
.log-card.latest { background: var(--surface-2); border-color: var(--accent); box-shadow: var(--shadow-sm), 0 0 0 1px var(--accent); }
.log-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; color: var(--ink); }
.log-badge { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; background: var(--heart); color: var(--surface); }
.log-card ul { margin: 0; padding-left: 18px; color: var(--ink-2); font-size: 14px; line-height: 1.5; }
.log-card li + li { margin-top: 3px; }

/* ---------- epic moments: epic days in the calendar ---------- */
:root { --epic-tick: #fff; --epic-star: #E8890C; --epic-glow: rgba(255, 120, 0, .9); --epic-ring: 2px; --epic-halo-min: 8px 1px; --epic-halo-max: 16px 3px; }
.cal-day.epic .dots { opacity: .7; transform: scale(.8); }
.cal-epic { position: absolute; top: 0; left: 50%; margin-left: -9px; width: 18px; text-align: center; font-size: 17px; line-height: 1; color: var(--epic-star);
  filter: drop-shadow(0 0 2px var(--epic-glow)) drop-shadow(0 0 6px var(--epic-glow)); animation: epic-spin 6s linear infinite, epic-pulse 2.6s ease-in-out infinite; pointer-events: none; }
.cal-day.epic .n { margin-top: 10px; }
.cal-day.epic { background: radial-gradient(circle at 50% 30%, color-mix(in srgb, var(--epic-star) 42%, var(--blush)), color-mix(in srgb, var(--epic-star) 12%, var(--blush)) 80%);
  box-shadow: 0 0 0 var(--epic-ring) var(--epic-star), 0 0 var(--epic-halo-min) var(--epic-glow); animation: epic-glow 3.6s ease-in-out infinite; }
.cal-day.epic.today { box-shadow: inset 0 0 0 1.5px var(--primary), 0 0 0 var(--epic-ring) var(--epic-star), 0 0 var(--epic-halo-min) var(--epic-glow); }
@keyframes epic-glow {
  0%, 100% { box-shadow: 0 0 0 var(--epic-ring) var(--epic-star), 0 0 var(--epic-halo-min) var(--epic-glow); }
  50% { box-shadow: 0 0 0 var(--epic-ring) var(--epic-star), 0 0 var(--epic-halo-max) var(--epic-glow); }
}
.cal-day.both { background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--epic-star) 55%, var(--blush)), color-mix(in srgb, var(--perfect) 20%, var(--blush)) 78%);
  box-shadow: 0 0 0 2px var(--perfect), 0 0 0 4px color-mix(in srgb, var(--epic-star) 55%, transparent), 0 0 var(--epic-halo-min) var(--epic-glow); animation: both-glow 3.6s ease-in-out infinite; }
@keyframes both-glow {
  0%, 100% { box-shadow: 0 0 0 2px var(--perfect), 0 0 0 4px color-mix(in srgb, var(--epic-star) 55%, transparent), 0 0 var(--epic-halo-min) var(--epic-glow); }
  50% { box-shadow: 0 0 0 2px var(--perfect), 0 0 0 4px color-mix(in srgb, var(--epic-star) 55%, transparent), 0 0 var(--epic-halo-max) var(--epic-glow); }
}
.cal-day.both .cal-spark { top: 2px; right: 3px; font-size: 11px; }
.legend-epic { font-style: normal; color: var(--epic-star); font-size: 12px; }
.cal-epic-count { color: var(--gold); white-space: nowrap; }
@keyframes epic-spin { to { rotate: 360deg; } }
@keyframes epic-pulse { 50% { scale: 1.18; } }
@media (prefers-reduced-motion: reduce) {
  .cal-epic, .cal-day.epic, .cal-day.both { animation: none !important; }
}

/* ---------- toasts that stand out ---------- */
.toast { padding: 16px 12px 16px 14px; gap: 14px; background: var(--surface); border: 1px solid color-mix(in srgb, var(--primary) 40%, var(--line));
  box-shadow: 0 18px 40px -12px rgba(60, 35, 25, .45), 0 0 0 4px color-mix(in srgb, var(--primary) 12%, transparent); }
.toast .spark-ring { width: 46px; height: 46px; color: var(--primary); }
.toast b { font-size: 18px; }
.toast span:not(.spark-ring):not(.burst) { font-size: 13.5px; color: var(--ink); opacity: .85; }
.toast.perfect { background: linear-gradient(135deg, color-mix(in srgb, var(--perfect) 26%, var(--surface)), var(--surface) 80%); border: 1.5px solid var(--perfect);
  box-shadow: 0 18px 44px -10px color-mix(in srgb, var(--perfect) 70%, transparent), 0 0 0 5px color-mix(in srgb, var(--perfect) 20%, transparent); }
.toast.perfect b { font-size: 20px; }
.toast.perfect .spark-ring { width: 52px; height: 52px; }
.toast.perfect .burst { left: 40px; }
.epic-pick { display: flex; flex-direction: column; gap: 6px; }
.epic-pick { align-items: flex-start; }
.epic-pick { flex-direction: row; align-items: center; gap: 4px; }
.actions .star-row { grid-column: 1 / -1; display: flex; align-items: center; gap: 6px; }
.star-row .star-btn { flex: 1; }
.epic-pick .star-btn { width: auto; padding: 7px 14px; gap: 6px; font-size: 13.5px; }
.epic-pick .star-btn svg.i { width: 16px; height: 16px; }
.epic-tag { color: var(--epic-star); letter-spacing: .08em; white-space: nowrap; }
.dg-head .epic-tag { color: var(--epic-star); }
.eside { display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; align-self: stretch; flex: none; gap: 6px; }
.card.entry .entry-star { margin: 3px 0 0; width: 18px; height: 18px; }
.eside .time { margin-top: auto; }
.card.entry .star-mark { color: var(--epic-star); filter: drop-shadow(0 0 3px var(--epic-glow)); }

/* ---------- a harder day ----------
   The Home card and the screen it opens: soft watercolour paper with clouds, and a glowing sprig. */
:root { --gentle-paper: url(img/gentle-bg.webp) center / cover, #FBEDE7; }
.gentle-card, .gentle-msg { position: relative; overflow: hidden; background: var(--gentle-paper); border-color: var(--blush-2); box-shadow: var(--shadow); }
.gentle-card { margin-top: 14px; padding: 20px 18px 18px; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
/* The same sizes as the other Home cards (see .ev-top). */
.gentle-card h2 { font-size: 21px; line-height: 1.25; }
.gentle-card p { font-family: var(--serif); font-size: 14.5px; line-height: 1.5; color: var(--ink-2); margin: 0; }
.gentle-card .btn { margin-top: 8px; }
.gentle-flower { position: absolute; right: -6px; bottom: -8px; width: 28%; max-width: 120px; height: auto; pointer-events: none; opacity: .95; }
.gentle .topbar { margin-bottom: 4px; }
.gentle-sprig { width: 52px; height: auto; margin: 0 auto 10px; transform: rotate(-12deg); }
.gentle-title { text-align: center; font-size: 30px; }
.gentle-intro { text-align: center; font-family: var(--serif); font-size: 17px; line-height: 1.45; color: var(--ink-2); margin: 12px 8px 0; }
.gentle-heart { width: 16px; margin: 22px auto 10px; opacity: .8; }
.gentle-ask { text-align: center; font-size: 25px; margin-bottom: 18px; }
.gentle-needs { display: flex; flex-direction: column; gap: 10px; }
.need {
  display: flex; align-items: center; gap: 14px; width: 100%; padding: 12px 16px 12px 12px; border-radius: var(--r-md);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); font-size: 16px; color: var(--ink);
  transition: transform .35s var(--spring), background-color .2s;
}
.need:active { transform: scale(.98); background: var(--blush); }
.need > svg.i { width: 18px; height: 18px; color: var(--ink-3); }
.need-ic { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; flex: none; color: var(--primary); background: var(--blush); }
.need-ic.big { width: 58px; height: 58px; background: var(--surface); box-shadow: var(--shadow-sm); margin-bottom: 14px; }
.need-ic.big svg.i { width: 28px; height: 28px; }
.gentle-msg { padding: 24px 22px 22px; }
.gentle-msg .gentle-flower { top: 12px; bottom: auto; right: 14px; width: 70px; opacity: .8; transform: rotate(16deg); }
.gentle-msg h1 { font-size: 28px; margin-bottom: 12px; position: relative; }
.gentle-msg p { color: var(--ink); line-height: 1.6; margin: 0 0 12px; position: relative; }
.gentle-msg p.held { font-family: var(--serif); font-style: italic; font-size: 18px; color: var(--primary); }
.gentle-lines { list-style: none; padding: 14px 0 0; margin: 4px 0 20px; border-top: 1px solid var(--blush-2); display: flex; flex-direction: column; gap: 10px; position: relative; }
.gentle-lines li { display: flex; gap: 10px; align-items: flex-start; }
.gentle-lines .heart-ic { fill: color-mix(in srgb, var(--heart) 55%, transparent); margin-top: 2px; }
.gentle-msg .btn { position: relative; text-align: center; }
.gentle-proofs { display: flex; flex-direction: column; gap: 12px; margin: 22px 0 16px; }
.gentle-proof { display: flex; flex-direction: column; gap: 8px; text-align: left; padding: 18px 20px; animation: rise .5s var(--ease) both; }
.gentle-proof:nth-child(2) { animation-delay: .08s; }
.gentle-proof:nth-child(3) { animation-delay: .16s; }
.gentle-meaning { font-style: italic; color: var(--ink-2); font-size: 14.5px; }
.gentle-home { display: block; margin: 14px auto 0; }

/* ---------- the new-month intention card ---------- */
/* A card in the middle of the screen (the mockup), instead of a sheet from the bottom. */
.overlay.center { align-items: center; padding: 16px; }
.mcard {
  position: relative; width: 100%; max-width: 420px; max-height: min(92dvh, calc(100% - 8px)); display: flex; flex-direction: column;
  background: linear-gradient(180deg, var(--surface), var(--bg)); border-radius: 30px; overflow: hidden;
  box-shadow: 0 30px 70px -24px rgba(40, 25, 18, .5); animation: mcard-in .5s var(--soft-spring);
}
.overlay.closing .mcard { animation: mcard-out .3s var(--ease) forwards; }
@keyframes mcard-in { from { opacity: 0; transform: translateY(18px) scale(.96); } }
@keyframes mcard-out { to { opacity: 0; transform: translateY(12px) scale(.97); } }
.mcard-x { position: absolute; top: 14px; right: 14px; z-index: 3; }
.mcard-body { position: relative; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; padding: 46px 24px 24px; display: flex; flex-direction: column; gap: 9px; text-align: center; }
.mcard-body > :not(.nm-art) { position: relative; z-index: 1; animation: rise .5s var(--ease) both; }
.mcard .discard-bar { border-radius: 0; }
.nm-art { position: absolute; pointer-events: none; z-index: 0; opacity: .7; filter: var(--leaf-tone, none); }
.nm-art-tl { top: -6px; left: -10px; width: 118px; transform: rotate(-8deg); }
.nm-art-br { bottom: 120px; right: -16px; width: 92px; transform: rotate(14deg) scaleX(-1); opacity: .45; }
.nm-hello { font-size: clamp(32px, 9.5vw, 42px); line-height: 1.1; }
.nm-lead { margin: 0; white-space: pre-line; color: var(--ink-2); font-size: 15.5px; line-height: 1.5; text-wrap: balance; }
.nm-divider { display: flex; align-items: center; gap: 12px; margin: 8px 18px; }
.nm-divider::before, .nm-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.nm-divider img { width: 16px; height: auto; }
.nm-q { font-size: clamp(22px, 6.4vw, 27px); line-height: 1.2; }
.nm-note { margin: 0; color: var(--ink-2); font-size: 14.5px; line-height: 1.5; text-wrap: balance; }
.nm-note b { display: block; color: var(--ink); font-weight: 600; }
.nm-label { text-align: left; margin-top: 12px; }
.mcard .field { text-align: left; }
.mcard .field::placeholder { font-family: var(--serif); font-style: italic; }
.nm-set { margin-top: 6px; }
.nm-keep { margin: 4px 0 0; color: var(--ink-2); }
.nm-current { font-family: var(--serif); font-style: italic; color: var(--ink); }
.nm-keep .link { display: inline; padding: 0 4px; }

/* ---------- intentions on Home, in the Library and in the monthly review ---------- */
.ip-text { font-family: var(--serif); font-style: italic; font-size: 17px; line-height: 1.35; color: var(--ink); overflow-wrap: anywhere; }
.intention-period { display: flex; gap: 14px; align-items: center; text-align: left; animation: rise .55s var(--ease) both; animation-delay: calc(var(--i) * 45ms + 120ms); }
.intention-period .caps, .intention-banner .caps { color: var(--heart); font-weight: 500; }
button.grat-card.intention-day { cursor: pointer; align-items: center; }
.intention-day .ip-text { font-size: 15.5px; }
.intention-banner { display: flex; gap: 14px; align-items: flex-start; margin-top: 12px; border: 1px solid var(--blush-2); animation: rise .45s var(--ease) both; }
.intention-banner .ip-text { margin: 4px 0 2px; }
.intention-banner .small { color: var(--ink-2); }
.rv-intention { display: flex; flex-direction: column; gap: 8px; border: 1px solid var(--blush-2); }
.rv-intention .caps { color: var(--heart); font-weight: 500; }
.ai-ask { margin: 4px 0 14px; gap: 8px; }
.ai-reflection { display: flex; flex-direction: column; gap: 10px; margin: 4px 0 14px; border: 1px solid var(--blush-2); }
.ai-reflection .caps { color: var(--heart); font-weight: 500; }
.ai-reflection .ai-text { font-family: var(--serif); font-size: 17px; line-height: 1.5; }
.ai-reflection .ai-text p { margin: 0 0 10px; white-space: pre-line; }
.ai-reflection .ai-text .ai-title { font-size: 21px; line-height: 1.3; margin-bottom: 14px; }
.ai-reflection .ai-text .ai-heading { margin: 22px 0 10px; font-size: 19px; font-weight: 500; color: var(--heart); }
.ai-reflection .ai-text .ai-point { margin-top: 16px; font-weight: 600; }
.ai-reflection .ai-text .ai-change { padding-left: 12px; border-left: 2px solid var(--blush-2); font-style: italic; }
.ai-reflection .ai-text > :last-child { margin-bottom: 0; }
.ai-wait { margin: 4px 0 14px; text-align: center; }
.rv-int-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; text-align: left; padding: 4px 0; }
.rv-int-row .small { flex: none; color: var(--ink-3); }
@media (prefers-reduced-motion: reduce) { .mcard, .overlay.closing .mcard { animation: none; } }
