/* Calm, one job per screen, big tap targets, light by default with a dark option. No inline styles anywhere (the page forbids them). */
:root { --bg: #f6f1e7; --bg2: #efe8d8; --card: #fffcf5; --fg: #26301f; --muted: #5b6656; --accent: #4d7358; --accent-fg: #ffffff; --apricot: #d9976f; --line: #e3dbc9; --warn: #86581a; --warn-bg: #faeed6; --radius: 18px; --shadow: 0 1px 2px rgba(60,50,30,.06), 0 8px 24px rgba(60,50,30,.06); --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif; }
:root[data-theme="dark"] { --bg: #151a16; --bg2: #1b221d; --card: #1f2721; --fg: #eef0e6; --muted: #aab5a6; --accent: #8fc09b; --accent-fg: #10201a; --apricot: #e6a982; --line: #323f36; --warn: #f0c987; --warn-bg: #3a2f1b; --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25); }
/* the phone's own setting is followed ONLY when the buyer picked "system"; the default is light (DESIGN.md) */
@media (prefers-color-scheme: dark) { :root[data-theme="system"] { --bg: #151a16; --bg2: #1b221d; --card: #1f2721; --fg: #eef0e6; --muted: #aab5a6; --accent: #8fc09b; --accent-fg: #10201a; --apricot: #e6a982; --line: #323f36; --warn: #f0c987; --warn-bg: #3a2f1b; --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25); } }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: linear-gradient(180deg, var(--bg) 0%, var(--bg2) 100%) fixed; color: var(--fg); font: 18px/1.55 system-ui, -apple-system, "Segoe UI", sans-serif; }
.app { max-width: 34rem; margin: 0 auto; padding: 1rem 1rem 6rem; }
h1, h2 { font-family: var(--serif); font-weight: 600; letter-spacing: .005em; }
h1 { font-size: 1.75rem; line-height: 1.2; margin: .4rem 0 1rem; }
h2 { font-size: 1.2rem; margin: 1.4rem 0 .5rem; }
p { margin: .5rem 0 1rem; }
.muted { color: var(--muted); font-size: .95rem; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; margin: 0 0 1rem; box-shadow: var(--shadow); }
.card h2 { margin-top: 0; }
.notice { background: var(--warn-bg); color: var(--warn); border-radius: var(--radius); padding: .8rem 1rem; margin: 0 0 1rem; font-size: .95rem; }
.scope { font-size: .85rem; color: var(--muted); border-top: 1px solid var(--line); margin-top: 2rem; padding-top: .8rem; }
label { display: block; font-weight: 600; margin: 1rem 0 .3rem; }
input[type=text], input[type=email], input[type=password], textarea, select { width: 100%; font: inherit; padding: .75rem .8rem; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--fg); min-height: 48px; }
textarea { min-height: 7rem; }
button, .btn { font: inherit; font-weight: 600; min-height: 48px; padding: .7rem 1.1rem; border-radius: 999px; border: 1px solid var(--accent); background: var(--accent); color: var(--accent-fg); cursor: pointer; display: inline-block; text-decoration: none; text-align: center; }
button.secondary, .btn.secondary { background: transparent; color: var(--accent); }
button.block { display: block; width: 100%; margin: .6rem 0; }
button[disabled] { opacity: .55; cursor: default; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, a:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.row { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }
.choice { display: flex; gap: .7rem; align-items: flex-start; padding: .8rem; border: 1px solid var(--line); border-radius: 12px; margin: 0 0 .6rem; background: var(--card); min-height: 48px; }
.choice input { margin-top: .35rem; width: 1.3rem; height: 1.3rem; }
.yesno { display: flex; gap: .6rem; margin: .4rem 0 .8rem; }
.yesno button { flex: 1; }
.yesno button[aria-pressed="true"] { background: var(--accent); color: var(--accent-fg); }
.yesno button[aria-pressed="false"] { background: transparent; color: var(--accent); }
.nav { position: fixed; left: 0; right: 0; bottom: 0; background: var(--card); border-top: 1px solid var(--line); display: flex; justify-content: center; gap: .3rem; padding: .4rem .5rem calc(.4rem + env(safe-area-inset-bottom)); }
.nav button { flex: 1; max-width: 9rem; background: transparent; color: var(--fg); border-color: transparent; border-radius: 12px; }
.nav button[aria-current="page"] { background: var(--accent); color: var(--accent-fg); }
.lesson p, .lesson li { max-width: 60ch; }
.lesson ul { padding-left: 1.3rem; }
.meta { display: flex; justify-content: space-between; align-items: center; margin-bottom: .5rem; }
.pill { font-size: .8rem; padding: .15rem .6rem; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { text-align: left; padding: .5rem .3rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.link { background: none; border: none; color: var(--accent); text-decoration: underline; padding: 0; min-height: 44px; font-weight: 500; }
.sr { position: absolute; left: -9999px; }

/* ---- the table: brand bar, hero, path, moments ---- */
.brand { display: flex; align-items: center; gap: .6rem; padding: .2rem 0 .6rem; color: var(--muted); font-family: var(--serif); letter-spacing: .06em; text-transform: uppercase; font-size: .8rem; }
.brand svg { width: 28px; height: 28px; color: var(--accent); flex: none; }
.ill { color: var(--accent); }
.ill .warm { color: var(--apricot); }
.hero { position: relative; overflow: hidden; background: var(--card); border: 1px solid var(--line); border-radius: 28px; padding: 1.4rem 1.3rem 1.2rem; margin: 0 0 1.1rem; box-shadow: var(--shadow); }
.hero h1 { margin-top: .2rem; }
.hero .plate { width: 112px; height: 112px; float: right; margin: -.4rem -.3rem .3rem .8rem; }
.hero .hello { color: var(--muted); font-family: var(--serif); font-style: italic; margin: 0; }
.hero::after { content: ""; display: block; clear: both; }
.next { border-left: 5px solid var(--apricot); }
.next h2 { text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; color: var(--muted); font-family: system-ui, sans-serif; font-weight: 600; margin-bottom: .3rem; }
.next .title { font-family: var(--serif); font-size: 1.3rem; line-height: 1.3; margin: .2rem 0 1rem; }
.path { display: flex; gap: 5px; margin: .2rem 0 .3rem; }
.path i { flex: 1; height: 6px; border-radius: 3px; background: var(--line); }
.path i.on { background: var(--accent); }
.path i.now { background: var(--apricot); }
.moment { text-align: center; padding: 2rem 1rem; }
.moment svg { width: 120px; height: 120px; margin: 0 auto 1rem; display: block; }
.moment p { font-family: var(--serif); font-size: 1.3rem; line-height: 1.35; }
.draw path, .draw circle, .draw ellipse { stroke-dasharray: 300; stroke-dashoffset: 300; animation: draw 1.4s ease forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.fade { animation: fade .5s ease both; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
button:not(.link):not(.nav button):hover { filter: brightness(1.05); }
button:active { transform: translateY(1px); }
@media (prefers-reduced-motion: reduce) { .draw path, .draw circle, .draw ellipse { animation: none; stroke-dashoffset: 0; } .fade { animation: none; } button:active { transform: none; } }

img.meal { display: block; max-width: 100%; height: auto; border-radius: 14px; margin: 0 0 .6rem; border: 1px solid var(--line); }
img.meal.big { width: 100%; max-width: 28rem; }
.reply { border-left: 4px solid var(--accent); padding: .1rem 0 .1rem .8rem; margin-top: .6rem; }

/* found in the S6 browser pass: a long address (the webhook URL) ran past its card; the staff bar has six tabs and must not squeeze them on a phone */
code { overflow-wrap: anywhere; word-break: break-all; font-size: .85em; }
@media (max-width: 480px) {
  .nav { overflow-x: auto; justify-content: flex-start; scrollbar-width: none; }
  .nav button { flex: 1 0 auto; padding-inline: .7rem; font-size: .9rem; }
}

/* S8: the header toggle for light, dark and system, always visible */
.brand { display: flex; align-items: center; gap: .5rem; }
.brand-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.theme-toggle { min-height: 40px; padding: .3rem .8rem; font-size: .85rem; background: transparent; color: var(--fg); border: 1px solid var(--line); display: inline-flex; align-items: center; gap: .4rem; }
.theme-toggle svg { width: 1.1rem; height: 1.1rem; stroke: currentColor; fill: none; stroke-width: 2; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.seg button { border: 0; border-radius: 0; background: transparent; color: var(--fg); min-height: 44px; padding: .5rem 1rem; }
.seg button[aria-pressed="true"] { background: var(--accent); color: var(--accent-fg); }
:root { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }
@media (prefers-color-scheme: dark) { :root[data-theme="system"] { color-scheme: light dark; } }

/* S8: the Journey path. Done is filled, today is warm, next is dashed, locked is quiet. Nothing is ever red and nothing counts down. */
.daygrid { display: grid; grid-template-columns: repeat(7, 1fr); gap: .45rem; margin: .6rem 0 1.2rem; }
.day { min-height: 44px; padding: 0; border-radius: 14px; font-weight: 600; background: var(--card); color: var(--fg); border: 1px solid var(--line); }
.day.done { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }
.day.today { border: 2px solid var(--apricot); background: var(--card); box-shadow: 0 0 0 3px color-mix(in srgb, var(--apricot) 25%, transparent); }
.day.past { background: var(--card); color: var(--fg); }
.day.next { border-style: dashed; border-color: var(--accent); color: var(--accent); background: transparent; }
.day.locked { color: var(--muted); background: transparent; border-color: var(--line); }
.unlock { background: var(--bg2); border-radius: 12px; padding: .6rem .9rem; margin: .5rem 0; }
.item { margin: .4rem 0; padding-left: .7rem; border-left: 3px solid var(--line); }
.item.done { border-left-color: var(--accent); }
.item.open { border-left-color: var(--apricot); }
/* S8: a check is three big buttons */
.bigrow { display: grid; grid-template-columns: 1fr; gap: .7rem; margin: .8rem 0; }
.bigrow button { min-height: 64px; font-size: 1.15rem; border-radius: 18px; }
@media (min-width: 560px) { .bigrow { grid-template-columns: repeat(3, 1fr); } }
/* wider screens: a roomier column and a two-column home */
@media (min-width: 900px) { .app { max-width: 46rem; } .daygrid { gap: .6rem; } .day { min-height: 52px; } }

.stats { display: flex; flex-wrap: wrap; gap: .8rem 1.4rem; }
.stat { display: flex; flex-direction: column; min-width: 7rem; }
.stat strong { font-family: var(--serif); font-size: 1.6rem; line-height: 1.1; }

.video { aspect-ratio: 16 / 9; display: flex; align-items: center; justify-content: center; text-align: center; margin: 0 0 1.2rem; padding: 1rem; border: 2px dashed var(--line); border-radius: var(--radius); background: var(--bg2); color: var(--muted); }

.unlock-card, .prompt { border-left: 4px solid var(--apricot); }
.prompt h2 { margin-top: 0; }

/* update banner, update screen, install bar and steps window (no inline style attributes: the page's CSP forbids them) */
.ta-update { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 50; padding: 12px 14px; display: flex; gap: 12px; align-items: center; justify-content: space-between; border-radius: 14px; background: var(--paper, #fffaf1); color: var(--ink, #22291d); border: 1px solid var(--hair, #e6dcc8); box-shadow: 0 4px 18px rgba(0, 0, 0, .12) }
.ta-update-required { position: fixed; inset: 0; z-index: 100; background: var(--linen, var(--bg, #f6f1e7)); color: var(--ink, #22291d); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 24px; text-align: center }
.ta-bar { display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 8px 12px; margin: 0 0 8px }
.ta-hdr { display: flex; gap: 8px; align-items: center }
.ta-steps-win { position: fixed; inset: 0; z-index: 60; background: var(--linen, var(--bg, #f6f1e7)); overflow: auto; padding: 24px 16px }

/* the entrance (16 Nov 2026): her picture behind a calm card. Fonts are the app's own files. */
@font-face { font-family: "EB Garamond"; src: url("/fonts/EBGaramond.ttf") format("truetype"); font-weight: 400 800; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/fonts/Inter.ttf") format("truetype"); font-weight: 100 900; font-display: swap; }
.app:has(.entry) { max-width: none; padding: 0 }
.entry { position: relative; min-height: 100vh; min-height: 100dvh; display: grid; align-content: end; justify-items: center; padding: 0 16px 28px; margin: 0; overflow: hidden; isolation: isolate }
.entry-bg { position: absolute; top: 0; left: 0; width: 100%; height: 56vh; object-fit: cover; object-position: 50% 22%; z-index: -2; -webkit-mask-image: linear-gradient(180deg, #000 45%, transparent 100%); mask-image: linear-gradient(180deg, #000 45%, transparent 100%) }
.entry::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(247, 235, 216, 0) 0%, rgba(251, 246, 236, .35) 45%, var(--bg) 62%) }
:root[data-theme="dark"] .entry::before { background: linear-gradient(180deg, rgba(21, 26, 22, .55) 0%, rgba(21, 26, 22, .86) 60%, rgba(21, 26, 22, .96) 100%) }
.entry.plain { background: linear-gradient(180deg, var(--bg), var(--bg2)) }
.entry-card { position: relative; width: min(420px, 100%); background: var(--card); border: 1px solid var(--line); border-radius: 28px; padding: 54px 22px 22px; box-shadow: 0 18px 38px rgba(80, 55, 25, .14), 0 3px 8px rgba(80, 55, 25, .06) }
.entry.plain .entry-card { padding-top: 22px }
.entry-face { position: absolute; top: -38px; left: 50%; transform: translateX(-50%); width: 80px; height: 80px; border-radius: 50%; object-fit: cover; border: 3px solid var(--card); box-shadow: 0 6px 16px rgba(80, 55, 25, .22) }
.entry-card h1 { font-family: "EB Garamond", "Iowan Old Style", Georgia, serif; font-size: 2.1rem; margin: 0 0 .15rem; text-align: center }
.entry-sub { text-align: center; color: var(--muted); margin: 0 0 1rem; font-family: "Inter", system-ui, sans-serif; font-size: .95rem }
.entry-card label { font-family: "Inter", system-ui, sans-serif; font-weight: 700; font-size: .95rem }
.entry-card input { border-radius: 16px; min-height: 48px }
.entry-card .block { min-height: 54px; border-radius: 28px; font-weight: 800; font-family: "Inter", system-ui, sans-serif }
.entry-card .link { display: block; margin: .9rem auto 0 }
.entry-theme { margin: 1rem 0 0; text-align: center }
html:has(.entry), body:has(.entry) { margin: 0 }
.entry-card { margin-top: 38vh }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden }  /* the icon sheet took a line of height above every screen */
.entry-card { padding-top: 26px }
.entry-face { display: none }
/* wide screens (a laptop): her photo fills the left, the card sits on the right, so the card never covers her face */
@media (min-width: 820px) {
  .entry { align-content: center; justify-items: center; padding: 24px 6vw 24px 52vw }
  .entry-bg { width: 62%; height: 100%; object-position: 50% 28%; -webkit-mask-image: linear-gradient(90deg, #000 62%, transparent 100%); mask-image: linear-gradient(90deg, #000 62%, transparent 100%) }
  .entry::before { background: none }
  .entry-card { margin-top: 0 }
}
