/* Legends Planner. Stanley Apps Ltd. */
:root {
  /* Legends Planner brand: midnight navy, brand blue, cyan to green */
  --bg: #F3F6FB; --card: #FFFFFF; --ink: #0B1B3F; --soft: #56647E; --line: #DEE5F0;
  --brand: #1452C8; --brand-ink: #FFFFFF; --brand-soft: #E5EDFC; --navy: #061845;
  --grad: linear-gradient(90deg, #1452C8, #08BDCC 55%, #34D681);
  --warn: #D9622B; --warn-soft: #FCE9DF; --gold: #B98A12; --gold-soft: #FBF1D6; --rose: #C2456B; --rose-soft: #FBE4EB;
  --sky: #2E6DB4; --sky-soft: #E3EDF8; --ok: #2E8B57;
  --radius: 16px; --shadow: 0 1px 2px rgba(6, 24, 69, .06), 0 4px 16px rgba(6, 24, 69, .06);
  --nav-h: 64px; --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #061229; --card: #0E1D3B; --ink: #EEF3FB; --soft: #A2B2CC; --line: #1F3158;
    --brand: #3FC6E0; --brand-ink: #041530; --brand-soft: #12305A; --navy: #EEF3FB; --warn: #F08A5D; --warn-soft: #3A2419;
    --gold: #E2B848; --gold-soft: #3A3018; --rose: #EE7D9F; --rose-soft: #3B1F29; --sky: #7FB0EA; --sky-soft: #1C2C3E; --ok: #6FCF97;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3); color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body { font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--brand); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .4em; }
h1 { font-size: 1.6rem; letter-spacing: -.01em; }
h2 { font-size: 1.15rem; }
h3 { font-size: 1rem; }
p { margin: 0 0 .7em; }
.muted { color: var(--soft); }
.small { font-size: .875rem; }
.big { font-size: 1.9rem; font-weight: 700; letter-spacing: -.02em; }
.hide, [hidden] { display: none !important; }

.splash { min-height: 100vh; display: grid; place-content: center; text-align: center; color: var(--soft); }
.splash img { margin: 0 auto 8px; }

/* layout */
.shell { min-height: 100vh; padding-bottom: calc(var(--nav-h) + var(--safe-b) + 16px); }
.top { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px);
  padding: calc(env(safe-area-inset-top, 0px) + 12px) 16px 10px; display: flex; align-items: center; gap: 10px; }
.top .title { font-weight: 700; font-size: 1.15rem; flex: 1; }
.top img { width: 34px; height: 34px; }
main { max-width: 760px; margin: 0 auto; padding: 4px 16px 24px; }
.nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; background: var(--card); border-top: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(5, 1fr); padding-bottom: var(--safe-b); }
.nav button { border: 0; background: none; padding: 8px 2px 10px; min-height: var(--nav-h); display: flex; flex-direction: column; align-items: center; gap: 2px;
  font-size: .72rem; color: var(--soft); cursor: pointer; }
/* simple line icons that take the theme's colours; the selected tab gets a coloured pill */
.nav button .i { width: 56px; height: 30px; display: grid; place-items: center; border-radius: 99px; transition: background .15s; }
.nav button .i svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.nav button.on { color: var(--brand); font-weight: 700; }
.nav button.on .i { background: var(--brand-soft); }
.nav button.on .i svg { stroke-width: 2.3; }
@media (min-width: 900px) {
  .shell { padding: 0 0 0 220px; }
  .nav { top: 0; right: auto; width: 220px; grid-template-columns: 1fr; align-content: start; border-top: 0; border-right: 1px solid var(--line); padding: 80px 12px 0; gap: 4px; }
  .nav button { flex-direction: row; justify-content: flex-start; gap: 12px; min-height: 46px; font-size: .98rem; padding: 0 14px; border-radius: 12px; }
  .nav button.on { background: var(--brand-soft); }
  .nav button .i { width: 26px; height: 26px; }
  .nav button.on .i { background: none; }
  .top { padding-left: 24px; }
}

/* cards and lists */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; margin: 0 0 14px; }
.card.tint { background: var(--brand-soft); box-shadow: none; }
.card.tint .big { font-size: 1.55rem; }
.card.warm { background: var(--gold-soft); box-shadow: none; }
.row { display: flex; align-items: center; gap: 12px; }
.row.top-a { align-items: flex-start; }
.grow { flex: 1; min-width: 0; }
.between { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.list { list-style: none; margin: 0; padding: 0; }
.item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.item:last-child { border-bottom: 0; }
.item.tap { cursor: pointer; }
.item .ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 1.25rem; background: var(--bg); flex: none; }
.item .name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item .sub { color: var(--soft); font-size: .86rem; }
.item .amt { font-weight: 700; white-space: nowrap; text-align: right; }
.item .amt.in { color: var(--ok); }
.section-h { display: flex; justify-content: space-between; align-items: baseline; margin: 22px 2px 8px; }
.section-h h2 { margin: 0; }
.chip { display: inline-block; font-size: .75rem; font-weight: 600; padding: 2px 8px; border-radius: 99px; background: var(--bg); color: var(--soft); white-space: nowrap; }
.chip.today { background: var(--warn); color: #fff; }
.chip.soon { background: var(--warn-soft); color: var(--warn); }
.chip.bday { background: var(--rose-soft); color: var(--rose); }
.chip.ok { background: var(--brand-soft); color: var(--brand); }
.chip.gold { background: var(--gold-soft); color: var(--gold); }
.empty { text-align: center; color: var(--soft); padding: 26px 12px; }
.empty .e { font-size: 2.2rem; }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 14px; }
.stats .card { margin: 0; }
.stats .lbl { color: var(--soft); font-size: .85rem; }
.bar { height: 8px; border-radius: 99px; background: var(--bg); overflow: hidden; margin-top: 6px; }
.bar i { display: block; height: 100%; background: var(--brand); border-radius: 99px; }
.bar.warn i { background: var(--warn); }
.steps { counter-reset: s; display: grid; gap: 10px; }
.step { display: flex; gap: 12px; align-items: center; background: var(--card); border-radius: 14px; padding: 14px; box-shadow: var(--shadow); cursor: pointer; border: 0; text-align: left; width: 100%; }
.step .n { width: 30px; height: 30px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-weight: 700; flex: none; }
.step.done .n { background: var(--brand); color: var(--brand-ink); }

/* buttons and forms */
.btn { border: 0; border-radius: 12px; padding: 12px 18px; font-weight: 600; cursor: pointer; background: var(--brand); color: var(--brand-ink); min-height: 46px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; }
.btn.block { width: 100%; }
.btn.ghost { background: var(--brand-soft); color: var(--brand); }
.btn.plain { background: transparent; color: var(--brand); padding: 8px 10px; min-height: 36px; }
.btn.danger { background: var(--warn-soft); color: var(--warn); }
.btn.small { padding: 6px 12px; min-height: 34px; font-size: .88rem; border-radius: 10px; }
.btn:disabled { opacity: .55; cursor: default; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }
label.f { display: block; margin: 0 0 14px; }
label.f > span { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 6px; }
label.f > small { display: block; color: var(--soft); margin-top: 4px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=url], input[type=tel], input[type=date], input[type=time], input[type=search], select, textarea {
  width: 100%; border: 1.5px solid var(--line); background: var(--card); border-radius: 12px; padding: 11px 12px; min-height: 46px; outline: none; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); }
textarea { min-height: 80px; resize: vertical; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.check { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 14px; }
.check input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--brand); flex: none; }
.seg { display: flex; background: var(--bg); border-radius: 12px; padding: 4px; gap: 4px; margin-bottom: 16px; }
.seg button { flex: 1; border: 0; background: none; padding: 9px; border-radius: 9px; font-weight: 600; color: var(--soft); cursor: pointer; }
.seg button.on { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.err { background: var(--warn-soft); color: var(--warn); padding: 10px 12px; border-radius: 10px; margin: 0 0 14px; font-size: .92rem; }
.note { background: var(--sky-soft); color: var(--ink); padding: 12px; border-radius: 12px; margin: 0 0 14px; font-size: .92rem; }

/* welcome */
.welcome { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.welcome .box { width: 100%; max-width: 420px; }
.welcome .logo { display: flex; gap: 12px; align-items: center; margin-bottom: 18px; }
.welcome .logo img { width: 54px; height: 54px; }
.welcome .pitch { display: grid; gap: 8px; margin: 0 0 20px; padding: 0; list-style: none; color: var(--soft); }
.foot { text-align: center; color: var(--soft); font-size: .8rem; margin-top: 18px; }

/* bottom sheet */
.sheet { position: fixed; inset: 0; z-index: 30; background: rgba(15, 22, 26, .45); display: flex; align-items: flex-end; justify-content: center; }
.sheet .panel { background: var(--card); width: 100%; max-width: 620px; max-height: 92vh; overflow: auto; border-radius: 22px 22px 0 0; padding: 18px 18px calc(18px + var(--safe-b)); animation: up .18s ease-out; }
.sheet .panel.full { max-width: 760px; }
@media (min-width: 700px) { .sheet { align-items: center; } .sheet .panel { border-radius: 22px; max-height: 88vh; } }
@keyframes up { from { transform: translateY(30px); opacity: .4; } to { transform: none; opacity: 1; } }
.sheet .handle { width: 40px; height: 4px; border-radius: 9px; background: var(--line); margin: -6px auto 12px; }
.sheet .hd { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; gap: 10px; }
.sheet .hd h2 { margin: 0; }
.x { border: 0; background: var(--bg); width: 36px; height: 36px; border-radius: 50%; font-size: 1.1rem; cursor: pointer; flex: none; }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--nav-h) + var(--safe-b) + 14px); z-index: 40; background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 12px; font-weight: 600; max-width: 90vw; box-shadow: var(--shadow); }

/* calendar */
.cal-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal .dow { text-align: center; font-size: .75rem; color: var(--soft); padding: 4px 0; font-weight: 600; }
.cal button { aspect-ratio: 1 / 1.05; border: 0; border-radius: 10px; background: var(--card); padding: 4px 2px; display: flex; flex-direction: column; align-items: center; gap: 3px; cursor: pointer; font-size: .9rem; }
.cal button.out { opacity: .35; }
.cal button.today { outline: 2px solid var(--brand); }
.cal button.sel { background: var(--brand); color: var(--brand-ink); }
.dots { display: flex; gap: 2px; flex-wrap: wrap; justify-content: center; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--warn); }
.dots i.e { background: var(--rose); }
.dots i.o { background: var(--sky); }

/* import review */
.tx-mini { max-height: 260px; overflow: auto; border: 1px solid var(--line); border-radius: 12px; padding: 0 12px; }
.found { display: grid; gap: 10px; }
.found .fb { border: 1.5px solid var(--line); border-radius: 14px; padding: 12px; }
.found .fb.on { border-color: var(--brand); background: color-mix(in srgb, var(--brand-soft) 50%, var(--card)); }
.found .fb .two select, .found .fb .two input { min-height: 40px; padding: 8px 10px; }
.progress { height: 10px; background: var(--bg); border-radius: 99px; overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--brand); transition: width .2s; }
.drop { border: 2px dashed var(--line); border-radius: 16px; padding: 26px 16px; text-align: center; cursor: pointer; display: block; }
.drop:hover, .drop.over { border-color: var(--brand); background: var(--brand-soft); }
.drop input { display: none; }
.tip { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--line); }
.tip:last-child { border-bottom: 0; }
.tip .e { font-size: 1.5rem; line-height: 1; }
.search { margin-bottom: 10px; }

/* couples: side by side */
table.side { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.side th, table.side td { padding: 9px 6px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
table.side th:first-child, table.side td:first-child { text-align: left; white-space: normal; }
table.side th { font-size: .8rem; color: var(--soft); }
table.side tr.tot td { font-weight: 700; }
table.side td.hi { color: var(--warn); font-weight: 700; }
.seg { overflow-x: auto; }
.seg button { white-space: nowrap; }

/* ---------- v2: family planner ---------- */
:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 60%, transparent); outline-offset: 2px; border-radius: 8px; }
.pdot { width: 26px; height: 26px; border-radius: 50%; color: #fff; display: inline-grid; place-items: center; font-size: .78rem; font-weight: 700; flex: none; }
.chip.gold { background: var(--gold-soft); color: var(--gold); }
.offline { background: var(--warn); color: #fff; text-align: center; padding: 6px 12px; font-size: .88rem; font-weight: 600; }
.undo { background: none; border: 0; color: var(--brand-soft); font-weight: 700; text-decoration: underline; margin-left: 8px; cursor: pointer; color: inherit; }
.card.tight { padding: 4px 16px; }
.card.faded { opacity: .75; }
.item.done .name { text-decoration: line-through; color: var(--soft); }
.tick { width: 24px; height: 24px; accent-color: var(--brand); flex: none; margin: 0; cursor: pointer; }
.hidebtn { border: 0; background: none; color: var(--soft); font-size: .95rem; width: 32px; height: 32px; border-radius: 50%; cursor: pointer; flex: none; }
.hidebtn:hover { background: var(--bg); color: var(--ink); }
.tip .hidebtn { margin-left: auto; }

/* home */
.askbar { display: flex; align-items: center; gap: 10px; width: 100%; border: 1.5px solid var(--line); background: var(--card); border-radius: 14px; padding: 12px 14px; margin: 4px 0 6px; cursor: text; font-size: 1rem; color: var(--soft); text-align: left; box-shadow: var(--shadow); }
.askbar span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stat { text-align: left; border: 0; cursor: pointer; width: 100%; font: inherit; color: inherit; }
.quick { display: flex; gap: 8px; margin: 0 0 14px; }
.quick input { flex: 1; }
.quick .btn { min-height: 46px; }
.fab { position: fixed; right: 16px; bottom: calc(var(--nav-h) + var(--safe-b) + 14px); z-index: 12; border: 0; border-radius: 99px; padding: 12px 18px; background: var(--brand); color: var(--brand-ink); font-weight: 700; display: flex; align-items: center; gap: 6px; box-shadow: 0 6px 20px rgba(0, 0, 0, .18); cursor: pointer; font-size: 1rem; }
@media (min-width: 900px) { .fab { bottom: 24px; right: 24px; } }

/* lists */
.lchips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 10px; margin: 0 -2px 4px; scrollbar-width: none; }
.lchips::-webkit-scrollbar { display: none; }
.lchip { border: 1.5px solid var(--line); background: var(--card); border-radius: 99px; padding: 7px 13px; white-space: nowrap; cursor: pointer; font-size: .92rem; font-weight: 600; color: var(--ink); }
.lchip.on { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.lchip.add { border-style: dashed; color: var(--brand); }
.lchip .cnt { background: var(--warn-soft); color: var(--warn); border-radius: 99px; padding: 0 7px; font-size: .78rem; margin-left: 2px; }
.lchip.on .cnt { background: rgba(255, 255, 255, .25); color: inherit; }
.aisle { font-weight: 700; font-size: .85rem; color: var(--soft); margin: 14px 4px 6px; text-transform: uppercase; letter-spacing: .03em; }
.again { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.again .lchip { font-weight: 500; }
.notes { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.note-card { text-align: left; border: 0; cursor: pointer; font: inherit; color: inherit; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.clamp { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-line; }

/* meals */
.mealday { padding: 12px 14px; }
.mealday.is-today { outline: 2px solid var(--brand); }
.mealslot { display: flex; justify-content: space-between; gap: 12px; width: 100%; border: 0; background: var(--bg); border-radius: 10px; padding: 10px 12px; margin-top: 8px; cursor: pointer; font: inherit; color: inherit; text-align: right; }
.mealslot > span:first-child { text-align: left; flex: none; }

/* premium */
.paywall { border: 1.5px solid color-mix(in srgb, var(--gold) 45%, transparent); background: linear-gradient(160deg, var(--gold-soft), var(--card) 60%); }
.pw-badge { display: inline-block; background: var(--gold); color: #fff; font-weight: 700; font-size: .78rem; padding: 3px 10px; border-radius: 99px; margin-bottom: 8px; }
.ticks { list-style: none; padding: 0; margin: 0 0 14px; display: grid; gap: 7px; }
.ticks li { padding-left: 26px; position: relative; }
.ticks li::before { content: '✓'; position: absolute; left: 2px; color: var(--brand); font-weight: 700; }

/* family colours */
.colours { border: 0; padding: 0; margin: 0 0 14px; display: flex; flex-wrap: wrap; gap: 10px; }
.colours legend { font-weight: 600; font-size: .92rem; margin-bottom: 6px; padding: 0; }
.colours label { cursor: pointer; }
.colours input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.colours i { display: block; width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--card); box-shadow: 0 0 0 1.5px var(--line); }
.colours input:checked + i { box-shadow: 0 0 0 3px var(--ink); }
.colours input:focus-visible + i { outline: 3px solid var(--brand); outline-offset: 2px; }

/* assistant */
.sheet .panel.chatpanel { display: flex; flex-direction: column; height: min(88vh, 760px); }
.chat { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding: 4px 2px 10px; }
.msg { max-width: 88%; padding: 10px 13px; border-radius: 16px; line-height: 1.45; }
.msg p { margin: 0 0 .4em; } .msg p:last-child { margin: 0; }
.msg .li { margin: 2px 0; }
.msg.me { align-self: flex-end; background: var(--brand); color: var(--brand-ink); border-bottom-right-radius: 4px; white-space: pre-wrap; }
.msg.ai { align-self: flex-start; background: var(--bg); border-bottom-left-radius: 4px; }
.ideas { display: flex; flex-wrap: wrap; gap: 8px; }
.ideas .lchip { font-weight: 500; white-space: normal; text-align: left; }
.actions { display: grid; gap: 8px; margin-top: 10px; }
.action { background: var(--card); border: 1.5px solid var(--line); border-radius: 12px; padding: 10px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.action.done { border-color: var(--brand); }
.action.no { opacity: .6; }
.action .err { width: 100%; margin: 4px 0 0; }
.typing { display: flex; gap: 5px; padding: 14px; }
.typing span { width: 8px; height: 8px; border-radius: 50%; background: var(--soft); animation: blink 1.2s infinite; }
.typing span:nth-child(2) { animation-delay: .2s; } .typing span:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
.chatbar { display: flex; gap: 8px; align-items: flex-end; border-top: 1px solid var(--line); padding-top: 10px; }
.chatbar textarea { flex: 1; min-height: 46px; max-height: 140px; resize: none; }
.chatbar .btn { min-width: 52px; }
.ai-note { margin: 8px 0 0; font-size: .76rem; }

/* public landing page */
.landing { max-width: 1080px; margin: 0 auto; padding: 0 16px 30px; }
.lhead { display: flex; align-items: center; justify-content: space-between; padding: calc(env(safe-area-inset-top, 0px) + 14px) 0 6px; }
.lhead .logo { display: flex; align-items: center; gap: 10px; font-size: 1.1rem; }
.lhead .logo-img { height: 40px; width: auto; display: block; }
.logo-img.dark { display: none !important; }
@media (prefers-color-scheme: dark) { .logo-img.light { display: none !important; } .logo-img.dark { display: block !important; } }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero { display: grid; gap: 22px; padding: 18px 0 10px; align-items: start; }
.hero h1 { font-size: clamp(1.8rem, 5vw, 2.7rem); letter-spacing: -.02em; margin-bottom: .35em; }
.lead { font-size: 1.1rem; color: var(--soft); }
.hero .pitch { list-style: none; padding: 0; display: grid; gap: 6px; margin: 12px 0 0; }
@media (min-width: 860px) { .hero { grid-template-columns: 1.15fr 1fr; gap: 40px; padding-top: 40px; } }
.feats { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; margin: 26px 0; }
.feat { background: var(--card); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.feat p { color: var(--soft); font-size: .93rem; margin: .4em 0 0; }
.fi { font-size: 1.6rem; margin-bottom: 4px; }
.pricing { background: var(--brand-soft); box-shadow: none; }

/* keep the toast clear of the Ask button, and leave room for it at the bottom */
.toast { bottom: calc(var(--nav-h) + var(--safe-b) + 76px); }
.shell { padding-bottom: calc(var(--nav-h) + var(--safe-b) + 84px); }
@media (min-width: 900px) { .toast { bottom: 90px; } .shell { padding-bottom: 90px; } }

/* app sign-in screen */
.auth { min-height: 100vh; display: grid; place-items: start center; padding: calc(env(safe-area-inset-top, 0px) + 28px) 16px calc(env(safe-area-inset-bottom, 0px) + 24px); background: radial-gradient(120% 60% at 50% 0%, var(--brand-soft), var(--bg) 70%); }
.auth-in { width: 100%; max-width: 440px; }
.auth-logo { display: flex; justify-content: center; margin: 8px 0 10px; }
.auth-logo .logo-img { width: 200px; height: auto; }
.auth-tag { text-align: center; color: var(--soft); margin: 0 auto 18px; max-width: 34ch; }
.auth .card { padding: 20px; }
.auth-foot { text-align: center; font-size: .85rem; color: var(--soft); margin-top: 18px; line-height: 1.8; }
.auth-foot a { color: var(--soft); }

/* What can I cook? */
.tiny { font-size: .75rem; }
.cook-card { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; border: 0; cursor: pointer; color: var(--ink); font: inherit; background: linear-gradient(135deg, var(--brand-soft), var(--card)); }
.cook-i { font-size: 1.5rem; }
.cook-photos { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 6px; }
.cook-ph { position: relative; width: 76px; height: 76px; }
.cook-ph img { width: 100%; height: 100%; object-fit: cover; border-radius: 12px; }
.cook-ph .x { position: absolute; top: -6px; right: -6px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: var(--ink); color: var(--card); font-size: .8rem; cursor: pointer; }
.cook-r h3 { font-size: 1.05rem; }
.cook-r details ul, .cook-r details ol { padding-left: 1.2em; margin: .4em 0; }
.cook-where { margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: var(--bg); }
.cook-shops { margin: 0; padding-left: 1.1em; }
.cook-shops a { color: var(--brand); font-weight: 600; }
.cook-style { display: flex; gap: 6px; flex-wrap: wrap; }
.cook-style label { flex: 1 1 auto; text-align: center; border: 1px solid var(--line); border-radius: 999px; padding: 9px 12px; font-weight: 600; font-size: .92rem; cursor: pointer; background: var(--card); white-space: nowrap; }
.cook-style label.on { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.cook-style input { position: absolute; opacity: 0; pointer-events: none; }
.cook-style label:focus-within { outline: 2px solid var(--brand); outline-offset: 2px; }
fieldset.f { border: 0; padding: 0; margin: 0 0 14px; min-width: 0; }
fieldset.f legend { font-weight: 600; font-size: .92rem; margin-bottom: 6px; padding: 0; }
.cook-map { width: 100%; height: auto; aspect-ratio: 600 / 260; border-radius: 10px; display: block; background: var(--line); object-fit: cover; }
.cook-shops li { margin: 8px 0; }
.cook-shops li a { font-weight: 600; }
.cook-add { margin: 0 0 14px; cursor: pointer; }
.cook-add:focus-within { outline: 2px solid var(--brand); outline-offset: 2px; }
.cook-style { margin: 0 0 12px; }
.cook-style label { padding: 9px 8px; }
.cook-more { margin: 0 0 14px; }
.cook-more summary { cursor: pointer; font-weight: 600; font-size: .92rem; color: var(--soft); padding: 4px 0; }
.cook-more[open] summary { margin-bottom: 8px; }
.cook-buy { background: var(--gold-soft); border-radius: 10px; padding: 8px 10px; margin: .5em 0; }
.cook-buy-btns { display: flex; gap: 4px; flex-wrap: wrap; margin: 4px -8px -4px; }
.cook-buy-btns .btn { color: var(--ink); }
.cook-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.cook-acts .btn { width: 100%; }
.review-row { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.progress i.busy { animation: busy 1.4s ease-in-out infinite; }
@keyframes busy { 0% { margin-left: -60%; } 100% { margin-left: 100%; } }
@media (prefers-reduced-motion: reduce) { .progress i.busy { animation: none; } }
/* birthdays this week */
.bday-card { border-left: 4px solid var(--rose, #C2456B); }
.bday .marks { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.mark { border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 999px; padding: 6px 12px; font: inherit; font-size: .85rem; font-weight: 600; cursor: pointer; min-height: 34px; }
.mark.on { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.bday.skipped .name { opacity: .6; }
.bday.skipped .mark.on { background: var(--line); border-color: var(--line); color: var(--soft); }
/* help and support */
.help-topics { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0 16px; }
.help-topic { display: flex; align-items: center; gap: 8px; text-align: left; border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 12px; padding: 10px 12px; font: inherit; font-weight: 600; font-size: .9rem; cursor: pointer; min-height: 52px; }
.help-topic span { font-size: 1.2rem; }
.help-topic:hover { border-color: var(--brand); }
.help-search { margin-top: 0; }
.help-a p { margin: 0 0 10px; line-height: 1.5; } .help-a ol { padding-left: 1.3em; margin: 0 0 10px; } .help-a li { margin-bottom: 4px; }
.help-rate { display: flex; align-items: center; gap: 4px; margin: 10px 0; }
.help-contact { border-top: 1px solid var(--line); margin-top: 14px; padding-top: 14px; }
.help-wa { background: #1F8F4E !important; border-color: #1F8F4E !important; color: #fff !important; text-decoration: none; text-align: center; }
.help-two { display: flex; gap: 8px; margin-top: 8px; } .help-two > * { flex: 1; text-align: center; text-decoration: none; }
.chat-box { max-height: 46vh; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; margin: 0 0 12px; padding: 4px 2px; }
.bubble { max-width: 85%; padding: 9px 12px; border-radius: 14px; line-height: 1.4; }
.bubble span { display: block; margin-top: 4px; }
.bubble.me { align-self: flex-end; background: var(--brand); color: var(--brand-ink); border-bottom-right-radius: 4px; } .bubble.me span { color: rgba(255,255,255,.8); }
.bubble.them { align-self: flex-start; background: var(--bg); border-bottom-left-radius: 4px; }
@media (max-width: 360px) { .help-topics { grid-template-columns: 1fr; } }
/* "talk to a real person" box */
.sup-box { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px; margin: 4px 0 16px; }
.sup-title { font-weight: 700; font-size: .95rem; margin: 0 0 10px; }
.sup-wa { display: flex; align-items: center; gap: 12px; width: 100%; box-sizing: border-box; background: #1F8F4E; color: #fff; border-radius: 12px; padding: 12px 14px; text-decoration: none; min-height: 56px; }
.sup-wa b { display: block; font-size: 1rem; } .sup-wa small { display: block; font-size: .8rem; opacity: .9; }
.sup-ic { font-size: 1.5rem; line-height: 1; }
.sup-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; margin-top: 8px; }
.sup-btn { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); border-radius: 12px; font: inherit; font-weight: 600; font-size: .95rem; text-decoration: none; cursor: pointer; white-space: nowrap; }
.sup-btn:hover, .sup-wa:hover { filter: brightness(1.05); }
.sup-hours { text-align: center; font-size: .78rem; color: var(--soft); margin: 10px 0 0; }
/* device sweep fixes (23 Nov) */
.top .title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.seg button { flex: 1 1 auto; }
@media (max-width: 400px) { .seg button { padding: 8px 6px; font-size: .86rem; } }
@media (min-width: 700px) { .cal button { aspect-ratio: auto; height: 64px; } .cal button.sel { height: 64px; } }
.tick { width: 28px; height: 28px; }
.f small a { display: inline-block; padding: 6px 0; }
/* voice */
.mic { flex: none; width: 46px; min-height: 46px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--card); font-size: 1.2rem; cursor: pointer; color: var(--ink); }
.mic.rec { background: #D23B3B; border-color: #D23B3B; color: #fff; animation: micpulse 1.2s ease-in-out infinite; }
.mic:disabled { opacity: .6; }
@keyframes micpulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(210, 59, 59, .45); } 50% { box-shadow: 0 0 0 8px rgba(210, 59, 59, 0); } }
@media (prefers-reduced-motion: reduce) { .mic.rec { animation: none; } }
.with-mic { display: flex; gap: 8px; align-items: flex-start; }
.with-mic textarea { flex: 1; min-width: 0; }
.mic-hint { color: #D23B3B; font-weight: 600; margin: -6px 0 10px; }
.chatbar .mic { align-self: flex-end; }
.msg.ai .speak { border: 0; background: none; font-size: .95rem; cursor: pointer; padding: 4px 6px; margin: 2px 0 -4px -6px; opacity: .75; display: block; }
.msg.ai .speak:hover { opacity: 1; }
.speak-toggle { margin: 6px 0 0; font-size: .85rem; }
.speak-toggle input { width: 18px; height: 18px; }
label.f span.with-mic, .f .with-mic { display: flex; gap: 8px; align-items: flex-start; margin: 0; font-weight: inherit; font-size: inherit; color: inherit; }
/* statement upload: bank-by-bank tips and the scrambled safe-copy preview */
details.howto summary { cursor: pointer; padding: 6px 0; color: var(--brand); }
details.howto .list { margin-top: 6px; }
.safe-preview { background: var(--sky-soft); border-radius: 10px; padding: 10px; font: 11px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre; overflow-x: auto; max-height: 220px; margin: 0 0 14px; color: var(--ink); }

/* ---------- themes (Settings → Theme). No data-theme = Automatic (follows the phone, above). ---------- */
/* shared colours for every light theme */
:root[data-theme=classic], :root[data-theme=blossom], :root[data-theme=mint], :root[data-theme=sunshine], :root[data-theme=lavender], :root[data-theme=ocean] {
  --warn: #D9622B; --warn-soft: #FCE9DF; --gold: #B98A12; --gold-soft: #FBF1D6; --rose: #C2456B; --rose-soft: #FBE4EB;
  --sky: #2E6DB4; --sky-soft: #E3EDF8; --ok: #2E8B57; --card: #FFFFFF; --brand-ink: #FFFFFF;
  --shadow: 0 1px 2px rgba(6, 24, 69, .06), 0 4px 16px rgba(6, 24, 69, .06); color-scheme: light;
}
/* shared colours for every dark theme */
:root[data-theme=midnight], :root[data-theme=charcoal], :root[data-theme=forest], :root[data-theme=plum], :root[data-theme=ember], :root[data-theme=black] {
  --warn: #F08A5D; --warn-soft: #3A2419; --gold: #E2B848; --gold-soft: #3A3018; --rose: #EE7D9F; --rose-soft: #3B1F29;
  --sky: #7FB0EA; --sky-soft: #1C2C3E; --ok: #6FCF97; --shadow: 0 1px 2px rgba(0, 0, 0, .3); color-scheme: dark;
}
:root[data-theme=classic] { --bg: #F3F6FB; --ink: #0B1B3F; --soft: #56647E; --line: #DEE5F0; --brand: #1452C8; --brand-soft: #E5EDFC; --navy: #061845; --grad: linear-gradient(90deg, #1452C8, #08BDCC 55%, #34D681); }
:root[data-theme=blossom] { --bg: #FFF4F7; --ink: #3A1027; --soft: #7D5A6B; --line: #F4D8E2; --brand: #D6336C; --brand-soft: #FCE4EE; --navy: #3A1027; --sky-soft: #FCEBF2; --grad: linear-gradient(90deg, #D6336C, #F06595 55%, #FFA94D); }
:root[data-theme=mint] { --bg: #F0FAF5; --ink: #0D2E22; --soft: #55736A; --line: #D3ECE1; --brand: #107A53; --brand-soft: #DDF3EA; --navy: #0D2E22; --sky-soft: #E2F4EC; --grad: linear-gradient(90deg, #138A5E, #20C997 55%, #94D82D); }
:root[data-theme=sunshine] { --bg: #FFF8EC; --ink: #3A2606; --soft: #7A6440; --line: #F2E2C2; --brand: #AE560B; --brand-soft: #FDEBD3; --navy: #3A2606; --sky-soft: #FDF0DC; --grad: linear-gradient(90deg, #D2691E, #F59F00 55%, #FCC419); }
:root[data-theme=lavender] { --bg: #F6F3FE; --ink: #24164A; --soft: #665C86; --line: #E2DCF5; --brand: #6D4AE0; --brand-soft: #ECE6FD; --navy: #24164A; --sky-soft: #EFEBFD; --grad: linear-gradient(90deg, #6D4AE0, #9775FA 55%, #F783AC); }
:root[data-theme=ocean] { --bg: #EEF8FA; --ink: #082E38; --soft: #4F7480; --line: #D2E9EF; --brand: #0E7C90; --brand-soft: #DAF1F5; --navy: #082E38; --sky-soft: #DFF2F6; --grad: linear-gradient(90deg, #0E7C90, #15AABF 55%, #3BC9DB); }
:root[data-theme=midnight] { --bg: #061229; --card: #0E1D3B; --ink: #EEF3FB; --soft: #A2B2CC; --line: #1F3158; --brand: #3FC6E0; --brand-ink: #041530; --brand-soft: #12305A; --navy: #EEF3FB; --grad: linear-gradient(90deg, #1452C8, #08BDCC 55%, #34D681); }
:root[data-theme=charcoal] { --bg: #121417; --card: #1D2025; --ink: #ECEEF1; --soft: #A6ADB8; --line: #2D3239; --brand: #8AB4F8; --brand-ink: #0B1B3F; --brand-soft: #24324A; --navy: #ECEEF1; --grad: linear-gradient(90deg, #5C8DF6, #8AB4F8 55%, #B4CDFB); }
:root[data-theme=forest] { --bg: #0A1913; --card: #12271E; --ink: #E6F4EC; --soft: #9DB8AA; --line: #1F3A2D; --brand: #4FD69C; --brand-ink: #062016; --brand-soft: #18402F; --navy: #E6F4EC; --sky-soft: #15322A; --grad: linear-gradient(90deg, #138A5E, #4FD69C 55%, #C0EB75); }
:root[data-theme=plum] { --bg: #150E24; --card: #221737; --ink: #F1ECFB; --soft: #B3A8CC; --line: #35264F; --brand: #B69CFF; --brand-ink: #1B0F33; --brand-soft: #33245A; --navy: #F1ECFB; --sky-soft: #2A2045; --grad: linear-gradient(90deg, #7950F2, #B69CFF 55%, #F783AC); }
:root[data-theme=ember] { --bg: #19110B; --card: #2A1C12; --ink: #F8EEE4; --soft: #C2AE9A; --line: #3E2B1D; --brand: #FF9F5A; --brand-ink: #2A1405; --brand-soft: #4A2E17; --navy: #F8EEE4; --sky-soft: #33241A; --grad: linear-gradient(90deg, #E8590C, #FF9F5A 55%, #FFD43B); }
:root[data-theme=black] { --bg: #000000; --card: #111214; --ink: #F2F2F2; --soft: #9A9EA6; --line: #26282C; --brand: #3FC6E0; --brand-ink: #00121A; --brand-soft: #0F2A33; --navy: #F2F2F2; --sky-soft: #111C24; --grad: linear-gradient(90deg, #1452C8, #08BDCC 55%, #34D681); }
/* the right logo for a light or dark theme, whatever the phone is set to */
:root.theme-light .logo-img.light { display: block !important; } :root.theme-light .logo-img.dark { display: none !important; }
:root.theme-dark .logo-img.dark { display: block !important; } :root.theme-dark .logo-img.light { display: none !important; }
/* Settings → Theme */
.themes { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; margin: 6px 0 4px; }
.theme-sw { border: 2px solid var(--line); border-radius: 14px; background: var(--card); padding: 8px 6px 7px; cursor: pointer; text-align: center; font-size: .8rem; font-weight: 600; color: var(--ink); line-height: 1.2; }
.theme-sw.on { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-soft); }
.theme-sw .sw { display: block; height: 38px; border-radius: 10px; margin-bottom: 6px; position: relative; border: 1px solid rgba(127, 127, 127, .25); overflow: hidden; }
.theme-sw .sw i { position: absolute; right: 7px; bottom: 7px; width: 16px; height: 16px; border-radius: 50%; }
.theme-sw .sw b { position: absolute; left: 7px; top: 8px; width: 34px; height: 6px; border-radius: 3px; opacity: .55; }
.theme-sw .sw b + b { top: 18px; width: 22px; }
.theme-sw small { display: block; font-weight: 500; color: var(--soft); font-size: .72rem; margin-top: 1px; }
.theme-group { font-size: .8rem; font-weight: 700; color: var(--soft); text-transform: uppercase; letter-spacing: .04em; margin: 12px 0 4px; }
/* recipe ideas: "Ingredients and method" as a clear, full-width button that opens the recipe */
details.recipe-steps { margin: 10px 0; }
details.recipe-steps > summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 46px; padding: 10px 14px;
  border: 1.5px solid var(--brand); border-radius: 12px; color: var(--brand); font-weight: 700; cursor: pointer; background: var(--card); }
details.recipe-steps > summary::-webkit-details-marker { display: none; }
details.recipe-steps > summary .chev { font-size: 1.2rem; line-height: 1; transition: transform .2s; }
details.recipe-steps[open] > summary { background: var(--brand-soft); margin-bottom: 8px; }
details.recipe-steps[open] > summary .chev { transform: rotate(180deg); }
/* Help: "Show support my screen", and support's emoji reaction on your message */
.sup-screen { width: 100%; margin-top: 8px; }
.bubble { position: relative; }
.bubble span.react { position: absolute; display: inline-block; margin: 0; right: -6px; bottom: -10px; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 1px 5px; font-size: .85rem; line-height: 1.3; box-shadow: var(--shadow); }
.chat-box .bubble.me:has(.react) { margin-bottom: 8px; }
