/*
  The page's look (window.BoyApp's app at its domain): the family's components (ChefBoy's names, BuckBoy's layout),
  in the colours of theme.css (tokens only; this file has none of its own). Light or dark follows the device.
  Responsive from 320 px. The sections are in ☰ at the left of the top bar (navmenu.css: a drawer on a computer,
  a panel under the bar on a phone); there is no bottom bar. Widgets keep their own files (pickers.css, select.css,
  combo.css, fx.css, celebrate.css, tour.css, onboard.css, help.css, trash.css, and each feature's own…).
*/
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--bg); color: var(--text); font: 15px/1.45 var(--font); -webkit-text-size-adjust: 100%; overflow-x: hidden; }
body.modal-open { overflow: hidden; }
[hidden] { display: none !important; }
a { color: var(--accent-text); }
h1, h2, h3 { line-height: 1.2; margin: 0; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.05rem; }
.muted { color: var(--text-3); }
.small { font-size: .85rem; }
.nowrap { white-space: nowrap; }
.grow { flex: 1 1 auto; min-width: 0; }
.row { display: flex; align-items: center; gap: .5rem; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.stack { display: flex; flex-direction: column; gap: .75rem; }
.sr, .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }


/* ---- top bar --------------------------------------------------------------------- */
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: .85rem; padding: .4rem 1rem; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.brand { display: flex; align-items: center; gap: .5rem; text-decoration: none; color: var(--text); flex: 0 0 auto; }
.brand img { width: 140px; max-width: 32vw; height: auto; image-rendering: auto; }
/* "Beta" next to the wordmark (outside the logo link, so the link's name stays the app's), shown while BoyApp.beta; its colours are theme.css's --beta-* */
.beta-pill { flex: 0 0 auto; align-self: center; margin-left: -.4rem; font-size: .65rem; font-weight: 700; letter-spacing: .02em; line-height: 1.3; padding: .1rem .45rem; border-radius: 999px; border: 1px solid var(--beta-border); background: var(--beta-bg); color: var(--beta-text); white-space: nowrap; cursor: default; user-select: none; }
@media (max-width: 720px) { .beta-pill { margin-left: -.2rem; } }
.top-tools { display: flex; gap: .4rem; align-items: center; flex: 0 0 auto; }
/* (The ☰, the section you're on and its menu: navmenu.css.) */

@media (max-width: 720px) {
  .topbar { padding: .5rem .75rem; gap: .5rem; backdrop-filter: none; background: var(--surface); }
}

.view { max-width: 1100px; margin: 0 auto; padding: 1.25rem 1rem 2rem; }
@media (max-width: 720px) { .view { padding: 1rem .75rem calc(1.5rem + env(safe-area-inset-bottom)); } }


/* ---- buttons, chips, inputs --------------------------------------------------------- */
.btn { appearance: none; display: inline-flex; align-items: center; justify-content: center; gap: .4rem; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font: inherit; font-weight: 600; padding: .55rem .95rem; border-radius: var(--radius); cursor: pointer; text-decoration: none; line-height: 1.2; transition: background .12s, border-color .12s, transform .06s; }
.btn:hover { background: var(--surface-2); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: default; transform: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-contrast); }
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn.ghost { background: none; border-color: transparent; color: var(--text-2); }
.btn.ghost:hover { background: var(--surface-2); color: var(--text); }
.btn.danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, var(--border)); }
.btn.danger.solid { background: var(--bad); color: var(--bad-contrast); border-color: var(--bad); }
.btn.small { padding: .35rem .65rem; font-size: .85rem; border-radius: var(--radius-sm); }
.btn.big { padding: .8rem 1.3rem; font-size: 1.05rem; }
.btn.icon { padding: .35rem .5rem; min-width: 2.1rem; }
.btn.block { width: 100%; }
.btn-row { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.btn-row.right { justify-content: flex-end; }
.chip { display: inline-flex; align-items: center; gap: .3rem; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); border-radius: 999px; padding: .2rem .6rem; font-size: .8rem; font-weight: 600; white-space: nowrap; }
.chip.btn-like { cursor: pointer; font: inherit; font-size: .85rem; font-weight: 600; padding: .35rem .75rem; }
.chip.btn-like:hover { background: var(--surface-2); }
.chip.on, .chip[aria-pressed="true"] { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); color: var(--accent-text); }
.chip.ai { color: var(--info); background: var(--info-soft); border-color: transparent; }
.chip.bad { color: var(--bad-text); background: var(--bad-soft); border-color: transparent; }
.chip.good { color: var(--good); background: var(--good-soft); border-color: transparent; }
.chips { display: flex; gap: .35rem; flex-wrap: wrap; }

label.field { display: flex; flex-direction: column; gap: .3rem; font-weight: 600; font-size: .88rem; color: var(--text-2); }
label.field .hint { font-weight: 400; color: var(--text-3); font-size: .8rem; }
input:not([type]), input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=search], input[type=url], select, textarea {
  font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); padding: .55rem .7rem; width: 100%; min-width: 0;
}
/* 🔍 A search box's ✕ (the browser's own clear button), as in ChoreBoy: a red round button with a white
   ✕, shown as soon as there's anything typed (not only on hover or focus, as Chrome and Safari do by
   default; the browser itself hides it while the box is empty). Firefox has no such button. The same red
   in both themes, so the white ✕ always stands out. Clicking it empties the box and sends input (and
   search), so each box's own input handler updates the page. Settings hides it and has its own ✕
   (.set-q-x, below), which matches it. */
/* (On the left of the box, before what's typed: easier to reach. Jared: "put the X on the left side of the search
   rather than the far right". `order: -1` moves the browser's own button in its flex row; Settings' ✕ too.) */
input[type="search"]::-webkit-search-cancel-button {
  -webkit-appearance: none; appearance: none; width: 1.25rem; height: 1.25rem; order: -1; margin: 0 .45rem 0 0; border-radius: 50%; cursor: pointer;
  opacity: 1; pointer-events: auto; border: 2px solid #b0103f; background-color: #d1173f;
  background-image: linear-gradient(45deg, transparent 44%, #fff 44%, #fff 56%, transparent 56%), linear-gradient(-45deg, transparent 44%, #fff 44%, #fff 56%, transparent 56%);
  background-size: 62% 62%; background-position: center; background-repeat: no-repeat;
}
input[type="search"]::-webkit-search-cancel-button:hover { background-color: #b0103f; }
@media (forced-colors: active) { input[type="search"]::-webkit-search-cancel-button { forced-color-adjust: none; } }
/* (Nothing typed, the placeholder showing: the ✕ is out of the layout. Moved to the left, the browser still kept its
   room while hidden, which squeezed the placeholder to "Sea" and pushed an emoji in it down: Jared, "what's going on
   with this 'Sea' and other 3 letter words in search … it's colliding with the red X".) */
input[type="search"]:placeholder-shown::-webkit-search-cancel-button { display: none; }
textarea { resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus, .btn:focus-visible, .chip:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 1px; }
input.emoji-in { width: 3.4rem; text-align: center; font-size: 1.2rem; padding: .35rem; }
.check { display: flex; align-items: center; gap: .5rem; font-weight: 500; cursor: pointer; }
.check input { width: 1.1rem; height: 1.1rem; accent-color: var(--accent); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
@media (max-width: 520px) { .grid-2 { grid-template-columns: 1fr; } }
.err { color: var(--bad); font-size: .85rem; min-height: 1em; }
/* 🔑 Change password's line under its 📧 button (settings.js): sent, or why not. */
.pw-msg { margin: .35rem 0 0; font-weight: 600; color: var(--good); }
.pw-msg:empty { margin: 0; }
.pw-msg.bad { color: var(--bad); }

/* ---- panels, cards, lists ------------------------------------------------------------- */
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); padding: 1rem; }
.panel.flat { box-shadow: none; }
.panel + .panel { margin-top: 1rem; }
.page-head { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; margin-bottom: 1rem; }
.page-head h2 { flex: 1 1 auto; }
.tabs { display: flex; gap: .25rem; border-bottom: 1px solid var(--border); margin-bottom: 1rem; overflow-x: auto; }
.tab { appearance: none; border: 0; background: none; font: inherit; font-weight: 600; color: var(--text-3); padding: .55rem .8rem; border-bottom: 2px solid transparent; cursor: pointer; white-space: nowrap; }
.tab[aria-selected="true"] { color: var(--accent-text); border-bottom-color: var(--accent); }
.empty { text-align: center; color: var(--text-3); padding: 1.5rem 1rem; }
.empty .big { font-size: 2rem; display: block; margin-bottom: .3rem; }
.list { list-style: none; margin: 0; padding: 0; }
.list > li { display: flex; align-items: center; gap: .6rem; padding: .55rem .25rem; border-top: 1px solid var(--border); }
.list > li:first-child { border-top: 0; }
.emo { font-size: 1.25rem; width: 1.7rem; text-align: center; flex: 0 0 auto; }
.sub { color: var(--text-3); font-size: .82rem; }
.overdue { color: var(--bad); }

/* ---- modal, toast, dialog --------------------------------------------------------------- */
.modal { position: fixed; inset: 0; z-index: 60; background: var(--scrim); display: flex; align-items: flex-start; justify-content: center; padding: 6vh 1rem 2rem; overflow-y: auto; }
.modal.hidden { display: none; }
.modal-box { width: 100%; max-width: 560px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 1.1rem; }
.modal-box.wide { max-width: 760px; }
.modal-head { display: flex; align-items: center; gap: .5rem; margin-bottom: .9rem; }
.modal-head h3 { flex: 1 1 auto; font-size: 1.15rem; }
@media (max-width: 600px) { .modal { padding: 0; align-items: flex-end; } .modal-box { border-radius: var(--radius-lg) var(--radius-lg) 0 0; max-height: 92vh; overflow-y: auto; padding-bottom: calc(1.1rem + env(safe-area-inset-bottom)); } }
.dlg-layer { z-index: 90; align-items: center; }
.dlg-box { max-width: 400px; }
.dlg-text { margin: 0 0 1rem; white-space: pre-line; }
.dlg-field { display: block; margin: 0 0 1rem; } .dlg-field input { width: 100%; margin-top: .3rem; } /* BoyDialog.input */
.toast { position: fixed; left: 50%; bottom: calc(1.25rem + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 80; display: flex; align-items: center; gap: .75rem; background: var(--toast-bg); color: var(--toast-text); padding: .65rem .9rem; border-radius: var(--radius); box-shadow: var(--shadow-lg); max-width: calc(100vw - 2rem); font-weight: 500; }
.toast.hidden { display: none; }
.toast button { appearance: none; border: 0; background: none; color: var(--toast-btn); font: inherit; font-weight: 700; cursor: pointer; padding: .1rem .3rem; }
.menu { position: fixed; z-index: 70; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: .3rem; min-width: 210px; max-height: calc(100vh - 16px); overflow-y: auto; }
.menu button { display: flex; width: 100%; gap: .55rem; align-items: center; appearance: none; border: 0; background: none; font: inherit; color: var(--text); text-align: left; padding: .5rem .65rem; border-radius: var(--radius-sm); cursor: pointer; }
.menu button:hover, .menu button:focus-visible { background: var(--surface-2); outline: none; }
.menu hr { border: 0; border-top: 1px solid var(--border); margin: .25rem 0; }
.menu-label { display: flex; flex-direction: column; min-width: 0; }
.menu-sub { font-size: .78rem; color: var(--text-3); line-height: 1.25; }
/* 🚦 a cross-app item waiting for setup (core.js menu disabled): greyed, the sub-line says why */
.menu button[aria-disabled="true"] { cursor: not-allowed; color: var(--text-3); }
.menu button[aria-disabled="true"] > span:first-child { opacity: .5; filter: grayscale(1); }
.menu button[aria-disabled="true"]:hover { background: none; }
/* 🚦 a greyed cross-app panel's reason line (settings.js linkBox) */
.gate-why { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: 0; }
/* 🚦 a cross-app button waiting for setup: plainly greyed (a primary one would still read as green) */
.btn[aria-disabled="true"]:disabled { filter: grayscale(1); opacity: .5; cursor: not-allowed; }

/* ---- the welcome page (auth.js), like ChoreBoy's and DressBoy's -------------------------
   The logo, headline and line beside the forms (stacked on a phone), then what the app does (a card
   per feature), the plans and the other Boy apps, both columns wide. */
.login-wrap { padding: 2rem 1rem 4rem; }
.auth { max-width: 1040px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(1.5rem, 5vw, 4rem); align-items: center; }
.auth-brand { margin: 0 0 .75rem; }
.auth-logo { display: block; width: min(340px, 72vw); height: auto; image-rendering: auto; }
.auth-hero h1 { font-size: clamp(1.85rem, 4.2vw, 2.9rem); line-height: 1.08; letter-spacing: -.035em; margin: 1.1rem 0 .8rem; }
.auth-lede { font-size: 1.05rem; color: var(--text-2); margin: 0 0 1.3rem; max-width: 34rem; }
.auth-card { min-width: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); padding: 1.5rem; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: .25rem; padding: .25rem; background: var(--sunken); border-radius: var(--radius); margin-bottom: 1rem; }
.auth-tabs button { font: 650 .92rem var(--font); color: var(--text-2); background: transparent; border: 0; border-radius: var(--radius-sm); padding: .55rem; cursor: pointer; }
.auth-tabs button.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.auth-tabs button:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 1px; }
@media (prefers-color-scheme: dark) { .auth-tabs button.active { background: var(--accent-soft); color: var(--accent-text); } }
.auth-features, .auth-plans, .auth-boys { grid-column: 1 / -1; min-width: 0; }
.auth-features-h { font-size: 1.25rem; letter-spacing: -.015em; margin: 0 0 .9rem; }
.auth-points { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); gap: .75rem; }
.auth-point { min-width: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: .3rem .65rem; padding: .85rem .95rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.auth-point h3 { margin: 0; font-size: .98rem; line-height: 1.25; color: var(--text); overflow-wrap: anywhere; }
.auth-point p { grid-column: 1 / -1; margin: 0; font-size: .9rem; line-height: 1.45; color: var(--text-2); overflow-wrap: anywhere; }
.auth-ico { flex-shrink: 0; width: 2rem; height: 2rem; display: grid; place-items: center; border-radius: var(--radius-sm); background: var(--accent-soft); color: var(--accent-text); font-weight: 800; }
.auth-plans-box { padding: 1rem 1.1rem; border-radius: var(--radius-lg); background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--border)); }
.plan-line { margin: .2rem 0 0; font-size: .92rem; } /* the prices (apps.js plansHtml): the welcome page */
.plan-soon { margin: .45rem 0 0; color: var(--text-3); } /* (until plans start: "Plans start soon: everything is free for now.") */
.auth-plans-box .plan-line:first-child { margin-top: 0; }
.boy-apps { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr)); gap: .75rem; }
.boy-app { display: flex; align-items: center; gap: .7rem; min-width: 0; padding: .7rem .85rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); color: var(--text); text-decoration: none; }
.boy-app:hover { border-color: var(--border-strong); box-shadow: var(--shadow-md); }
.boy-app:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.boy-app img { width: 32px; height: 32px; flex: 0 0 auto; border-radius: var(--radius-sm); }
.boy-app > span { display: flex; flex-direction: column; min-width: 0; }
.boy-app .sub { overflow-wrap: anywhere; }
@media (max-width: 760px) {
  .login-wrap { padding: 1.25rem .75rem 3rem; }
  .auth { grid-template-columns: minmax(0, 1fr); gap: 1.25rem; }
  .auth-hero h1 { margin-top: .6rem; }
  .auth-lede { margin-bottom: 0; }
  .auth-card { padding: 1.1rem; }
}

/* ---- 👤 the profile chip and menu, ⚙️ segmented buttons, the confirm bar ------------------------- */
#account { gap: .4rem; padding: .25rem .6rem .25rem .3rem; }
#account .avatar { width: 1.7rem; height: 1.7rem; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: var(--accent-contrast); font-weight: 800; font-size: .85rem; }
/* 🖼️ The profile picture (avatar.js): a ChoreBoy character, a pixel drawing on a transparent tile, kept crisp. */
.avatar.pic { display: block; object-fit: contain; image-rendering: pixelated; background: transparent; border-radius: 0; flex: none; }
#account .avatar.pic { width: 1.7rem; height: 1.7rem; border-radius: 0; background: transparent; }
/* 📷 An uploaded photo (avatar.js): a real photo, so smooth (not pixelated), filling a round frame. */
.avatar.photo { display: block; object-fit: cover; image-rendering: auto; border-radius: 50%; flex: none; }
#account .avatar.photo { width: 1.7rem; height: 1.7rem; border-radius: 50%; }
@media (max-width: 720px) { #account .acct-name { display: none; } }
.menu-head { display: flex; flex-direction: column; padding: .55rem .65rem .5rem; border-bottom: 1px solid var(--border); margin-bottom: .25rem; }
.menu-head:has(.menu-id) { flex-direction: row; align-items: center; gap: .6rem; }
.menu-id { display: flex; flex-direction: column; min-width: 0; }
.menu-pic { width: 2.4rem; height: 2.4rem; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: var(--accent-contrast); font-weight: 800; font-size: 1.05rem; flex: none; }
.menu-pic.pic { border-radius: 0; background: transparent; }
.menu-pic.photo { border-radius: 50%; }
/* 📷 ⚙️ Settings → 👤: the picture as it shows everywhere, beside 📷 Upload a photo / Remove photo (settings.js photoBox). */
.photo-set { display: flex; align-items: center; gap: .8rem; }
.photo-set-body { flex: 1; min-width: 0; gap: .45rem; }
.set-pic { width: 3.5rem; height: 3.5rem; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: var(--accent-contrast); font-weight: 800; font-size: 1.4rem; flex: none; }
.set-pic.pic { border-radius: 0; background: transparent; }
.set-pic.photo { border-radius: 50%; }
.menu-head .sub { overflow: hidden; text-overflow: ellipsis; }
html[data-fx="full"] .menu { animation: menu-in .14s ease-out; transform-origin: top right; }
@keyframes menu-in { from { opacity: 0; transform: scale(.96); } }
.seg { display: inline-flex; border: 1px solid var(--border-strong); border-radius: var(--radius); overflow: hidden; max-width: 100%; }
.seg-btn { appearance: none; border: 0; background: var(--surface); color: var(--text-2); font: inherit; font-weight: 600; padding: .45rem .9rem; cursor: pointer; white-space: nowrap; }
.seg-btn + .seg-btn { border-left: 1px solid var(--border-strong); }
.seg-btn.on { background: var(--brand-tint); color: var(--brand-deep); }
.confirm-bar { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; justify-content: center; margin: .5rem auto 0; padding: .45rem .8rem; max-width: 1100px; background: var(--info-soft); color: var(--info); border: 1px solid var(--border); border-radius: var(--radius); }
/* (the page's own gutter on each side once the window is narrower than the bar: .view's padding) */
@media (max-width: 1132px) { .confirm-bar { margin-inline: 1rem; } }
@media (max-width: 720px) { .confirm-bar { margin-inline: .75rem; } }
body.logged-out .confirm-bar { display: none; }
body.logged-out .topbar { display: none; } /* the home page has no top bar: its logo is in the page (as ChoreBoy's and DressBoy's) */
kbd { font: 600 .8rem ui-monospace, monospace; border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: 5px; padding: .05rem .35rem; background: var(--surface-2); }

/* ---- the wordmark ------------------------------------------------------------------------------------ */
.wordmark { font: 900 1.45rem/1 ui-rounded, 'SF Pro Rounded', 'Nunito', 'Varela Round', system-ui, sans-serif; letter-spacing: -.02em; color: var(--brand); text-shadow: 0 2px 0 color-mix(in srgb, var(--brand-deep) 35%, transparent); }
.wordmark.big { font-size: 2.6rem; }
.btn.tiny { padding: .15rem .45rem; font-size: .78rem; border-radius: 6px; font-weight: 600; }
.btn.danger.ghost { border-color: transparent; }
.in { color: var(--in); }
.over, .sub.over { color: var(--over); }
.move { color: var(--move); }
.field.compact { gap: .15rem; font-size: .78rem; }
.field.compact select, .field.compact .bsel-btn, .field.compact input { padding: .4rem .5rem; }
.num-in { width: 4.5rem !important; }
.sec-h { font-size: 1.05rem; margin: 1.2rem 0 .6rem; }
.sec-row .sec-h { margin: 1.2rem 0 .6rem; }
.totals { margin: .2rem 0 .9rem; color: var(--text-2); }


/* ---- charts and meters -------------------------------------------------------------------------- */
.chart { display: block; max-width: 100%; }
.chart.bars, .chart.line { width: 100%; height: auto; }
.chart-axis { stroke: var(--line); stroke-width: 1; }
.chart-lbl { fill: var(--text-3); font-size: 11px; font-family: var(--font); }
.donut-big, .ring-big { fill: var(--text); font-weight: 800; font-size: 17px; font-family: var(--font); }
.ring-big { font-size: 15px; }
.bar-hit { cursor: pointer; }
.bar-hit:hover { opacity: .85; }
html[data-fx="full"] .ring-arc { transition: stroke-dasharray .6s ease-out; }
.meter { position: relative; height: 8px; border-radius: 999px; background: var(--line); overflow: visible; }
.meter > i { display: block; height: 100%; border-radius: 999px; background: var(--brand); }
.meter.watch > i { background: var(--warn); }
.meter.over > i { background: var(--over); }
.meter .tick { position: absolute; top: -3px; width: 2px; height: 14px; background: var(--text-2); border-radius: 1px; }
.legend { display: flex; gap: .4rem .9rem; align-items: center; flex-wrap: wrap; color: var(--text-3); margin: .4rem 0 0; }
.legend .key { display: inline-block; width: 12px; height: 4px; border-radius: 2px; vertical-align: middle; margin-right: .25rem; }
.key.out { background: var(--out); } .key.brand { background: var(--brand); } .key.move { background: var(--move); } .key.gold { background: var(--gold); } .key.in { background: var(--in); } .key.deep { background: var(--brand-deep); }


/* ---- Settings ----------------------------------------------------------------------------------- */
/* One centred column of sections that fold (ChoreBoy's: its choreboy.css ⚙️ Settings), 👤 Account first. */
.settings-page { max-width: 720px; margin: 0 auto; }
.set-list { display: flex; flex-direction: column; gap: .6rem; }
.set-sec { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); min-width: 0; }
.set-sec > summary { display: flex; align-items: baseline; flex-wrap: wrap; gap: .2rem .8rem; padding: .9rem 1.1rem; cursor: pointer; list-style: none; border-radius: var(--radius-lg); }
.set-sec > summary::-webkit-details-marker { display: none; }
.set-sec > summary::before { content: '▸'; color: var(--text-3); display: inline-block; width: .8rem; transition: transform .15s; }
.set-sec[open] > summary::before { transform: rotate(90deg); }
.set-sec > summary:hover { background: var(--surface-2); }
.set-sec > summary:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: -2px; }
.set-sec[open] > summary { border-bottom: 1px solid var(--border); border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.set-title { font-weight: 700; font-size: 1rem; color: var(--text); }
.set-sub { min-width: 0; overflow-wrap: anywhere; }
.set-body { padding: 1rem 1.1rem 1.1rem; min-width: 0; }
.set-body p { margin: 0; }
.set-body .grid-2 { align-items: start; }
/* (a label over its box, like label.field: Weeks start on) */
.set-body div.field { display: flex; flex-direction: column; gap: .3rem; min-width: 0; font-weight: 600; font-size: .88rem; color: var(--text-2); }
.set-rates { gap: .5rem .75rem; align-items: flex-end; }
.set-foot { text-align: center; margin: 1rem 0 0; }
/* 👤 Account's parts, in the same order in all four apps (ChoreBoy's .acct-h): who you are, 📷 Profile photo,
   💳 Plan & billing, 🔑 Change password, 🪪 Flying Marmot account, 🗑️ Delete. */
.acct-who { display: flex; flex-direction: column; gap: .1rem; min-width: 0; overflow-wrap: anywhere; }
.acct-h { font-size: .98rem; margin: .35rem 0 -.2rem; padding-top: .9rem; border-top: 1px solid var(--border); }
.acct-part { display: flex; flex-direction: column; gap: .75rem; min-width: 0; }
.danger-zone .acct-h { color: var(--bad); }
@media (max-width: 520px) {
  .set-sec > summary { padding: .85rem .9rem; }
  .set-body { padding: .9rem .9rem 1rem; }
  /* (a row of choices across the width; long ones wrap inside their button, never past the screen) */
  .set-body .seg { display: flex; width: 100%; }
  .set-body .seg-btn { flex: 1 1 0; min-width: 0; padding: .45rem .4rem; white-space: normal; }
}
.cats .emo, .list .emo { font-size: 1.15rem; }
/* 🔍 Search settings (settings-search.js): the box, the live line, "Nothing matches", the marks. */
.set-search { position: relative; display: flex; align-items: center; }
.set-search .set-q { width: 100%; padding-left: 2.6rem; }
.set-search .set-q::-webkit-search-cancel-button { display: none; }
.set-search .set-q-x { position: absolute; left: .25rem; top: 50%; transform: translateY(-50%); } /* (on the left, as every ✕) */
/* Settings' own ✕ (shown only while something's typed): the same red round button with a white ✕ as every
   other search box's (above) and ChoreBoy's .set-q-x. */
.btn.set-q-x { flex: none; width: 2rem; height: 2rem; min-width: 0; min-height: 0; padding: 0; border-radius: 50%; border: 2px solid #b0103f; background: #d1173f; color: #fff; font-weight: 700; line-height: 1; }
.btn.set-q-x:hover, .btn.set-q-x:focus-visible { background: #b0103f; color: #fff; }
.set-q-line { margin: .35rem .1rem .6rem; min-height: 1.2em; overflow-wrap: anywhere; }
.set-q-line:empty { margin: 0 0 .75rem; min-height: 0; }
.set-list .list > li[data-q-first] { border-top: 0; }
.set-q-none { display: flex; flex-direction: column; gap: .6rem; margin-bottom: .75rem; }
mark.set-hit { background: color-mix(in srgb, var(--gold) 45%, transparent); color: var(--text); border-radius: 3px; padding: 0 .05em; }
@media (forced-colors: active) { mark.set-hit { background: Mark; color: MarkText; forced-color-adjust: none; } }

/* ---- the welcome page extras ------------------------------------------------------------------------ */
.auth-brand { display: flex; align-items: center; gap: .8rem; }
.auth-logo { width: 96px; height: auto; }
.auth-one { margin: .2rem 0 0; }
.auth-how, .auth-privacy, .auth-foot { grid-column: 1 / -1; min-width: 0; }
.how-steps { list-style: none; padding: 0; margin: 0 0 .9rem; display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; font-size: 1.02rem; }
.how-steps b { color: var(--brand); }
.auth-privacy p { margin: 0; padding: .9rem 1rem; border-radius: var(--radius-lg); background: var(--brand-tint); color: var(--brand-deep); }
.auth-foot { text-align: center; }
.boy-app.here { border-color: color-mix(in srgb, var(--brand) 45%, var(--border)); background: var(--brand-tint); }
/* 🧩 How they work together (auth.js TOGETHER): under the row of apps, one line each. */
.auth-together-h { font-size: 1rem; margin: 1.1rem 0 .55rem; }
.auth-together { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr)); gap: .5rem .9rem; }
.auth-together li { display: grid; grid-template-columns: 1.6rem minmax(0, 1fr); gap: .5rem; align-items: start; font-size: .92rem; line-height: 1.45; color: var(--text-2); overflow-wrap: anywhere; }

/* ⚙️ Settings: a section opened by name (💬 Help, the profile menu) stops clear of the sticky top bar. */
.settings [data-sec] { scroll-margin-top: 76px; }

/* 🏆 Achievements (achievements.js): a wall of badges, earned ones in colour, locked ones greyed */
.ach-hero { display: flex; flex-wrap: wrap; gap: .8rem 1.2rem; align-items: center; margin-bottom: 1.2rem; background: linear-gradient(135deg, color-mix(in srgb, var(--gold) 16%, var(--surface)), var(--surface) 75%); }
.ach-count { display: flex; flex-direction: column; align-items: center; min-width: 4.5rem; }
.ach-count b { font-size: 2.4rem; font-weight: 850; line-height: 1; color: var(--brand-deep); font-variant-numeric: tabular-nums; }
.ach-hero-text { display: flex; flex-direction: column; gap: .35rem; flex: 1 1 16rem; min-width: 0; }
.ach-hero-text .small { overflow-wrap: anywhere; }
.ach-fam { margin: 0 0 1.3rem; }
.ach-fam h3 { display: flex; align-items: baseline; gap: .5rem; margin: 0 .1rem .55rem; }
.ach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); gap: .6rem; }
.ach-badge { display: flex; gap: .7rem; align-items: flex-start; padding: .75rem .8rem; border-radius: var(--radius-lg); border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow-sm); min-width: 0; }
.ach-badge.earned { border-color: color-mix(in srgb, var(--gold) 55%, var(--border)); background: linear-gradient(160deg, color-mix(in srgb, var(--gold) 13%, var(--surface)), var(--surface) 70%); }
.ach-emo { font-size: 1.9rem; line-height: 1; width: 2.6rem; height: 2.6rem; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--surface-2); }
.ach-badge.earned .ach-emo { background: color-mix(in srgb, var(--gold) 28%, var(--surface)); box-shadow: 0 0 0 2px color-mix(in srgb, var(--gold) 60%, transparent); }
.ach-badge.locked { background: var(--surface-2); box-shadow: none; }
.ach-badge.locked .ach-emo { filter: grayscale(1); opacity: .5; }
.ach-badge.locked b { color: var(--text-2); }
.ach-text { display: flex; flex-direction: column; gap: .2rem; min-width: 0; flex: 1 1 auto; }
.ach-text b, .ach-text .sub { overflow-wrap: anywhere; }
.ach-when { font-size: .8rem; font-weight: 650; color: var(--in); }
.ach-prog { font-size: .8rem; color: var(--text-2); font-variant-numeric: tabular-nums; }
.ach-est { font-size: .8rem; color: var(--warn); font-weight: 600; }
.ach-bar { display: block; height: 6px; border-radius: 99px; background: var(--sunken); overflow: hidden; margin-top: .2rem; }
.ach-bar.big { height: 10px; margin: 0; }
.ach-bar i { display: block; height: 100%; border-radius: inherit; background: var(--brand); }
.ach-badge.locked .ach-bar i { background: color-mix(in srgb, var(--brand) 70%, var(--text-3)); }
.ach-foot { text-align: center; max-width: 42rem; margin: .4rem auto 0; }

@media (pointer: coarse) {
  .toast button { min-height: 44px; padding: 0 .55rem; }
}

/* ---- 🫙 empty states and 📄 "Show N more" (core.js emptyState, showMore) ------------------------- */
.empty-state { display: flex; flex-direction: column; align-items: center; gap: .45rem; text-align: center; padding: 1.75rem 1rem; border: 1.5px dashed var(--border-strong); border-radius: var(--radius-lg); background: var(--surface); color: var(--text-2); }
.empty-state b { color: var(--text); font-size: 1.05rem; }
.empty-state p { margin: 0; max-width: 32rem; }
.empty-state .btn { margin-top: .35rem; }
.empty-ico { font-size: 2.2rem; line-height: 1; }
.show-more { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; margin: .9rem 0 .2rem; }

/* ---- the toast's ✕ (core.js toast({ close })) ------------------------------------------------------ */
.toast .toast-x { color: inherit; opacity: .75; font-weight: 600; }
.toast .toast-x:hover { opacity: 1; }

/* (↩ Return to <App>, the band above the top bar: returnbar.css.) */

/* ---- 🐢 reduced motion: nothing here moves by itself (fx.css has the effects' own rules) ---------------- */
@media (prefers-reduced-motion: reduce) {
  .menu { animation: none !important; }
  .set-sec > summary::before { transition: none; }
}
@media print {
  .topbar, .toast, #modal { display: none !important; }
}

/* ---- 💬 OK / Cancel boxes (dialog.js): a title, a choice a big button (ChoreBoy's) ------------------------------ */
.dlg-title { margin: 0 0 .5rem; font-size: 1.05rem; }
.dlg-acts .btn { min-width: 5.5rem; }
.dlg-choices { display: grid; gap: .5rem; margin: 0 0 .9rem; }
.dlg-choice { display: flex; flex-direction: column; align-items: flex-start; gap: .15rem; width: 100%; padding: .7rem .85rem; text-align: left;
  border: 1px solid var(--border, #d1d5db); border-radius: 10px; background: var(--surface-2, #f3f4f6); color: var(--text, inherit); font: inherit; cursor: pointer;
  transition: border-color .15s ease, background .15s ease; }
.dlg-choice:hover, .dlg-choice:focus-visible { border-color: var(--accent); background: var(--surface); }
.dlg-choice-t { font-weight: 700; }
.dlg-choice small { color: var(--text-2); font-size: .82rem; line-height: 1.35; }

/* ---- a button that reads as a link (📝 Things' 🗑️ Trash, the trash's ← Back, Try again) ---- */
.link-btn { appearance: none; border: 0; background: none; padding: 0; font: inherit; color: var(--accent-text); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.link-btn:hover { color: var(--accent); }
.link-btn:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; border-radius: 3px; }
.btn-row.center { justify-content: center; }
