/* Rest — the shell's own styles.
 *
 * Only what stops being per-app once the apps are one app: the tab bar, the
 * placeholder for a domain that has not been ported yet, and the toast.
 * Everything else is inherited from css/still.css, which was lifted verbatim
 * from Still and carries the family tokens, all ten accents and dark mode.
 *
 * TOKEN DIALECT. This family speaks two: Workout Log and Meal Log use
 * --text / --surface / --muted / --hairline, while Mellow, Sleep Log and Still
 * use --ink / --canvas / --edge. The merged app is heading for the first, but
 * renaming 360 lines of working CSS during a port is churn with no safety net
 * behind it. So the canonical names are declared here as ALIASES of what is
 * already there: new code can use them today, the lifted code keeps working
 * untouched, and the rename becomes a separate, checkable step.
 */
:root{
  --text: var(--ink);
  --text-2: var(--ink-muted);
  --plane: var(--canvas);
  --surface-2: var(--surface-quiet);
  --hairline: var(--edge);
  --shadow: var(--shadow-card);
  /* ZERO since the bottom tab bar went (2026-10-06), and kept rather than
     deleted: a dozen rules across the domains, Food's generated stylesheet among
     them, still add it to clear a bar that is no longer there. */
  --tabbar-h: 0px;
  /* The Home button's strip along the top, on every screen but home. */
  --appbar-h: 44px;
  --appbar-total: calc(var(--appbar-h) + env(safe-area-inset-top, 0px));
}

.screen{ padding-bottom: calc(32px + var(--tabbar-h) + env(safe-area-inset-bottom, 0px)) !important; }

/* ---------- the Home button ----------
   The page itself moves down to clear it, rather than every domain's screens:
   the domains were each designed full-page and keep their own spacing. */
html:not(.on-home) body{ padding-top: var(--appbar-total); }
html.on-home .appbar{ display:none; }
.appbar{
  position:fixed; top:0; left:0; right:0; z-index:45;
  height:var(--appbar-total); padding-top:env(safe-area-inset-top, 0px);
  display:flex; align-items:center; padding-left:8px; padding-right:8px;
  background:var(--canvas); border-bottom:1px solid var(--edge);
}
.homebtn{
  display:flex; align-items:center; gap:7px; height:44px; min-width:44px; padding:0 14px 0 8px;
  border:0; border-radius:10px; background:none; cursor:pointer;
  color:var(--accent-text, var(--accent)); font:600 15px/1 var(--font-ui);
  -webkit-tap-highlight-color:transparent;
}
.homebtn:active{ background:var(--surface-quiet); }
.homebtn:focus-visible{ outline:2px solid var(--accent); outline-offset:-2px; }
.homeico{ width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:2.1;
  stroke-linecap:round; stroke-linejoin:round; }
/* Sleep's section switcher still draws its icons with this class. */
.tabico{ width:22px; height:22px; fill:none; stroke:currentColor; stroke-width:1.9;
  stroke-linecap:round; stroke-linejoin:round; }

/* A domain that exists in the tab bar but has not been ported yet. Saying so
   plainly beats an empty screen that reads as a bug. */
.notyet{
  margin:auto; text-align:center; max-width:34ch; color:var(--ink-muted);
  display:flex; flex-direction:column; gap:10px; align-items:center;
}
.notyet .nyico{ font-size:34px; }
.notyet .nyt{ font-weight:700; font-size:17px; color:var(--ink); }

#toast{
  position:fixed; left:50%; transform:translate(-50%, 12px);
  bottom:calc(var(--tabbar-h) + 18px + env(safe-area-inset-bottom, 0px));
  /* Above every sheet (90): a message raised from Settings sat under it, so the tap looked
     dead (deep check 2026-10-24). */
  z-index:100; max-width:calc(88vw / var(--tz, 1));
  background:var(--ink); color:var(--canvas);
  padding:10px 16px; border-radius:10px; font-size:14px;
  opacity:0; pointer-events:none; transition:opacity .18s ease, transform .18s ease;
}
#toast.show{ opacity:1; transform:translate(-50%, 0); }
/* While a sheet is up, its own buttons sit where the toast would: the toast moves to the top
   (panel run 5: "Hidden for three days" covered the AI agreement's Agree). The sheets exist
   in the page only while open. */
body:has(.rv-sheet, .backdrop) #toast{ bottom:auto; top:calc(env(safe-area-inset-top, 0px) + 14px); transform:translate(-50%, -12px); }
body:has(.rv-sheet, .backdrop) #toast.show{ transform:translate(-50%, 0); }
@media (prefers-reduced-motion: reduce){ #toast{ transition:none; } }

/* ---------- a domain's sub-navigation ----------
   Sleep has three sections (Today / Trends / Guide). Those were its bottom tab
   bar when it was its own app; here the bottom bar belongs to the shell and
   switches DOMAIN, so the sections move to the top. Two bars stacked would be
   two different meanings of "tab" on one screen. */
/* FIXED, not sticky. It lives as a sibling AFTER the sleep screens in the
   document, so `position:sticky` parked it at its natural place in flow - the
   bottom of a very tall page, underneath the tab bar, where it silently
   intercepted every click aimed at it. Fixed to the top is what it means. */
.subnav{
  position:fixed; top:var(--appbar-total); left:0; right:0; z-index:30;
  display:flex; gap:2px; padding:6px;
  background:var(--canvas); border-bottom:1px solid var(--edge);
}
html.no-subnav .subnav{ display:none; }
.subnavbtn{
  flex:1; display:flex; align-items:center; justify-content:center; gap:6px;
  padding:9px 6px; border:0; border-radius:9px; background:none; cursor:pointer;
  color:var(--ink-muted); font:600 13.5px/1 var(--font-ui);
  -webkit-tap-highlight-color:transparent;
}
.subnavbtn.active{ background:var(--surface); color:var(--ink); box-shadow:var(--shadow-card); }
.subnavbtn:focus-visible{ outline:2px solid var(--accent); outline-offset:-2px; }
.subnavbtn .tabico{ width:18px; height:18px; }
.subnavbtn .tablbl{ font:inherit; }

/* Sleep's three sections sit under the fixed sub-nav and have to clear it.
   Every other screen must NOT reserve that space, or it carries a gap where no
   sub-nav exists. */
html:not(.no-subnav) #sleep-home,
html:not(.no-subnav) #sleep-trends,
html:not(.no-subnav) #sleep-guide{ padding-top:60px; }

/* The finishing moment (2026-10-10): over everything, for under a second, and
   never in the way of a tap. */
.done-burst{
  position:fixed; left:50%; top:42%; width:0; height:0; z-index:120; pointer-events:none;
}
.done-burst .db-ring{
  position:absolute; left:-60px; top:-60px; width:120px; height:120px; border-radius:50%;
  border:6px solid var(--accent, #f5813a); opacity:0;
  animation:db-ring .8s cubic-bezier(.2,.8,.3,1) forwards;
}
.done-burst .db-check{
  position:absolute; left:-44px; top:-44px; width:88px; height:88px; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  background:var(--accent, #f5813a); color:#fff; font:800 46px/1 system-ui, sans-serif;
  box-shadow:0 10px 30px rgba(0,0,0,.25);
  animation:db-pop .9s cubic-bezier(.2,1.4,.4,1) forwards;
}
@keyframes db-ring{ 0%{ transform:scale(.6); opacity:.9 } 100%{ transform:scale(1.7); opacity:0 } }
@keyframes db-pop{ 0%{ transform:scale(.3); opacity:0 } 25%{ transform:scale(1.08); opacity:1 } 75%{ transform:scale(1); opacity:1 } 100%{ transform:scale(.9); opacity:0 } }
@media (prefers-reduced-motion: reduce){
  .done-burst .db-ring{ display:none; }
  .done-burst .db-check{ animation:db-fade .9s ease forwards; }
  @keyframes db-fade{ 0%,70%{ opacity:1 } 100%{ opacity:0 } }
}

/* The iPhone app (js/native.js sets html.is-native) and the website each show only their own lines. */
html:not(.is-native) .native-only { display: none !important; }
html.is-native .web-only { display: none !important; }
/* The whole-app lock (js/applock.js, decision 0055): over everything, the splash included. */
#app-lock{ position:fixed; inset:0; z-index:10050; width:100%; height:100%; max-width:none; max-height:none;
  margin:0; border:0; box-sizing:border-box; background:var(--plane); color:var(--text);
  align-items:center; justify-content:center; padding:24px; }
#app-lock[open]{ display:flex; }
#app-lock::backdrop{ background:var(--plane); }
#app-lock .al-card{ display:flex; flex-direction:column; align-items:center; gap:14px; text-align:center; }
#app-lock .al-icon{ width:72px; height:72px; border-radius:18px; }
#app-lock h2{ margin:0; font-size:20px; }
#app-lock .btn{ min-width:180px; min-height:48px; }
#app-lock.blank .al-card{ visibility:hidden; }

/* ---------- the opening screen (index.html #splash) ----------
   Since decision 0161 (Wellmir): the morning sky of the app icon; the well's rim draws round,
   the water rises to a day's level, the name rises, the tagline lands word by word, then the
   card fades into Home at 3.3 s. */
#splash{ position:fixed; inset:0; z-index:10000; color:#fff; overflow:hidden;
  background:linear-gradient(180deg,#f6a46e 0%,#d9798a 55%,#6f63c9 100%);
  animation:splash-out .35s ease 3.3s forwards; }
html.no-splash #splash{ display:none; }
#splash .sp-well{ position:absolute; left:50%; top:50%; width:160px; height:160px; margin:-80px 0 0 -80px; overflow:visible; }
#splash .sp-in{ fill:rgba(255,255,255,.2); animation:splash-fade .6s ease both; }
#splash .sp-ring{ fill:none; stroke:#fff; stroke-width:4.5; stroke-dasharray:100; stroke-dashoffset:100; transform:rotate(-90deg); transform-origin:64px 64px;
  animation:sp-ring 1.1s cubic-bezier(.4,.1,.2,1) .1s forwards; }
#splash .sp-water{ fill:#fff; transform:translateY(40px); animation:sp-fill 1.2s cubic-bezier(.2,.8,.2,1) .5s forwards; }
#splash .sp-name{ position:absolute; left:0; right:0; top:calc(50% + 96px); text-align:center; font:800 34px/1 var(--font-ui, system-ui); letter-spacing:-.02em;
  animation:splash-fade .6s ease 1.5s both; }
#splash .sp-tag{ position:absolute; left:0; right:0; top:calc(50% + 142px); text-align:center; font:500 15px/1.3 var(--font-ui, system-ui); color:#fff; }
#splash .sp-tag i{ font-style:normal; display:inline-block; animation:splash-fade .45s ease both; }
/* In order: the well fills (0.1-1.7 s), Wellmir fades in (1.5 s), then the tagline a word at a
   time (2.1, 2.45, 2.8 s); the card leaves at 3.3 s. */
#splash .sp-tag i:nth-child(1){ animation-delay:2.1s; } #splash .sp-tag i:nth-child(2){ animation-delay:2.45s; } #splash .sp-tag i:nth-child(3){ animation-delay:2.8s; }
@keyframes sp-ring{ to{ stroke-dashoffset:0; } }
@keyframes sp-fill{ to{ transform:none; } }
@keyframes splash-fade{ from{ opacity:0; } to{ opacity:1; } }
@keyframes splash-rise{ from{ opacity:0; transform:translateY(10px); } to{ opacity:1; transform:none; } }
@keyframes splash-out{ to{ opacity:0; visibility:hidden; } }
/* Reduced motion: everything lands finished; the card itself still clears. */
@media (prefers-reduced-motion: reduce){ #splash .sp-in, #splash .sp-name, #splash .sp-tag i{ animation:none; } #splash .sp-ring{ animation:none; stroke-dashoffset:0; } #splash .sp-water{ animation:none; transform:none; } }

/* The settings gear, drawn as one clean line icon in every part (ChatGPT review
   2026-10-15: the emoji gear clashed with the tool symbols). The old glyph stays in
   the button for the recorded screens; it is just not painted. */
.iconbtn[data-opens-settings]{ font-size:0 !important; display:inline-grid; place-items:center; min-width:40px; min-height:40px; }
.iconbtn[data-opens-settings]::before{ content:""; width:22px; height:22px; background:currentColor;
  -webkit-mask:url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linejoin='round'><path d='M19.36 9.72 L22.05 10.27 L22.05 13.73 L19.36 14.28 L18.81 15.59 L20.33 17.89 L17.89 20.33 L15.59 18.81 L14.28 19.36 L13.73 22.05 L10.27 22.05 L9.72 19.36 L8.41 18.81 L6.11 20.33 L3.67 17.89 L5.19 15.59 L4.64 14.28 L1.95 13.73 L1.95 10.27 L4.64 9.72 L5.19 8.41 L3.67 6.11 L6.11 3.67 L8.41 5.19 L9.72 4.64 L10.27 1.95 L13.73 1.95 L14.28 4.64 L15.59 5.19 L17.89 3.67 L20.33 6.11 L18.81 8.41 Z'/><circle cx='12' cy='12' r='3.1'/></svg>") center/contain no-repeat; mask:url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linejoin='round'><path d='M19.36 9.72 L22.05 10.27 L22.05 13.73 L19.36 14.28 L18.81 15.59 L20.33 17.89 L17.89 20.33 L15.59 18.81 L14.28 19.36 L13.73 22.05 L10.27 22.05 L9.72 19.36 L8.41 18.81 L6.11 20.33 L3.67 17.89 L5.19 15.59 L4.64 14.28 L1.95 13.73 L1.95 10.27 L4.64 9.72 L5.19 8.41 L3.67 6.11 L6.11 3.67 L8.41 5.19 L9.72 4.64 L10.27 1.95 L13.73 1.95 L14.28 4.64 L15.59 5.19 L17.89 3.67 L20.33 6.11 L18.81 8.41 Z'/><circle cx='12' cy='12' r='3.1'/></svg>") center/contain no-repeat; }

/* The opening screen wears the theme (the pre-paint script sets data-sky before
   it draws): its sky, and the wheel in the theme's own soft set. Dark deepens it.
   Sunrise, the default and so what a first open sees, is Home's morning sky, the same
   sky as the iPhone launch image (tools/make-icons.mjs, decision 0091). */
html[data-sky="sunrise"] #splash{ color:#fff; background:radial-gradient(70% 45% at 50% 44%, rgba(255,240,225,.22), rgba(255,240,225,0) 70%), linear-gradient(180deg,#f0765f 0%,#dd5c80 30%,#8a5fd0 62%,#5344b4 100%); }
html[data-sky="glacier"] #splash{ color:#fff; background:radial-gradient(70% 45% at 50% 44%, rgba(225,240,255,.22), rgba(225,240,255,0) 70%), linear-gradient(180deg,#2fa6dc,#2a72d6 35%,#2a40a6 70%,#0f1a52); }
html[data-sky="sunrise"] #splash .sp-tag, html[data-sky="glacier"] #splash .sp-tag{ color:#fff; }
:root[data-theme="dark"] #splash{ box-shadow:inset 0 0 0 100vmax rgba(8,7,20,.45); }
@media (prefers-color-scheme: dark){ :root:not([data-theme="light"]) #splash{ box-shadow:inset 0 0 0 100vmax rgba(8,7,20,.45); } }
html[data-sky="sunrise"] #spg0 stop:first-child{ stop-color:#9f90d0; } html[data-sky="sunrise"] #spg0 stop:last-child{ stop-color:#c3b6ec; }
html[data-sky="sunrise"] #spg1 stop:first-child{ stop-color:#dc9f6a; } html[data-sky="sunrise"] #spg1 stop:last-child{ stop-color:#f6c08e; }
html[data-sky="sunrise"] #spg2 stop:first-child{ stop-color:#d77f88; } html[data-sky="sunrise"] #spg2 stop:last-child{ stop-color:#f2a1a8; }
html[data-sky="sunrise"] #spg3 stop:first-child{ stop-color:#82bfa6; } html[data-sky="sunrise"] #spg3 stop:last-child{ stop-color:#a9dcc6; }
html[data-sky="sunrise"] #spg4 stop:first-child{ stop-color:#bd8cbc; } html[data-sky="sunrise"] #spg4 stop:last-child{ stop-color:#dcaedb; }
html[data-sky="sunrise"] #spg5 stop:first-child{ stop-color:#87a1d4; } html[data-sky="sunrise"] #spg5 stop:last-child{ stop-color:#a9c2ee; }
html[data-sky="sunrise"] #spg6 stop:first-child{ stop-color:#d8bd74; } html[data-sky="sunrise"] #spg6 stop:last-child{ stop-color:#f5dd9a; }
html[data-sky="glacier"] #spg0 stop:first-child{ stop-color:#8691d4; } html[data-sky="glacier"] #spg0 stop:last-child{ stop-color:#aab4ee; }
html[data-sky="glacier"] #spg1 stop:first-child{ stop-color:#d2ae66; } html[data-sky="glacier"] #spg1 stop:last-child{ stop-color:#f0cf8c; }
html[data-sky="glacier"] #spg2 stop:first-child{ stop-color:#cd818d; } html[data-sky="glacier"] #spg2 stop:last-child{ stop-color:#eba3ae; }
html[data-sky="glacier"] #spg3 stop:first-child{ stop-color:#6fbdb8; } html[data-sky="glacier"] #spg3 stop:last-child{ stop-color:#97dcd8; }
html[data-sky="glacier"] #spg4 stop:first-child{ stop-color:#a68fd0; } html[data-sky="glacier"] #spg4 stop:last-child{ stop-color:#c6b2ec; }
html[data-sky="glacier"] #spg5 stop:first-child{ stop-color:#76aad8; } html[data-sky="glacier"] #spg5 stop:last-child{ stop-color:#9ccbf2; }
html[data-sky="glacier"] #spg6 stop:first-child{ stop-color:#cbc3a6; } html[data-sky="glacier"] #spg6 stop:last-child{ stop-color:#e9e2c8; }

/* The Undo toast (Rest.shell.undoToast): it carries a button, so it takes taps. */
#toast.has-undo{ pointer-events:auto; display:inline-flex; align-items:center; gap:16px; }
#toast .toast-undo{ background:none; border:0; color:inherit; font:inherit; font-weight:700; text-decoration:underline; padding:2px; cursor:pointer; flex:none; }

/* ---------- Settings, after the audit (2026-10-15) ---------- */
/* A33: the title and Done stay at the top while you scroll. */
#settings-overlay .set-head{ position:sticky; top:-18px; z-index:2; display:flex; align-items:center; justify-content:space-between;
  /* Covers the sheet's own 18 px top padding, edge to edge, so nothing shows above it. */
  margin:-4px -20px 8px; padding:14px 20px 8px; background:var(--surface, #fff); }
#settings-overlay .set-head h2{ margin:0; font:800 22px/1.2 var(--font-ui, system-ui); letter-spacing:-.01em; }
#settings-overlay .set-done{ border:0; background:none; color:var(--accent-text, var(--accent)); font:700 16px var(--font-ui, system-ui); padding:10px 4px; min-height:44px; cursor:pointer; }
/* Settings as a menu of pages (decision 0087): grouped rows that open a page each,
   a back button, and the plan at the top. js/setnav.js. */
#settings-overlay .set-head.on-page{ flex-wrap:wrap; row-gap:2px; }
#settings-overlay .set-head.on-page h2{ order:3; flex:1 0 100%; margin:0; font-size:24px; overflow-wrap:anywhere; }
#settings-overlay .set-back{ display:inline-flex; align-items:center; gap:2px; max-width:70%; min-height:44px; padding:0 4px 0 0; border:0; background:none;
  color:var(--accent-text, var(--accent)); font:600 16px var(--font-ui, system-ui); cursor:pointer; }
#settings-overlay .set-back svg{ flex:none; width:20px; height:20px; }
#settings-overlay .set-back span{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
#settings-overlay .set-head.on-page .set-done{ max-width:30%; }
#settings-overlay .set-grp-t{ margin:18px 4px 6px; font:700 12.5px var(--font-ui, system-ui); letter-spacing:.05em; text-transform:uppercase; color:var(--ink-muted); }
#settings-overlay .set-grp{ margin:0 0 10px; border-radius:14px; overflow:hidden; background:var(--surface, #fff); border:1px solid var(--edge, rgba(0,0,0,.1)); }
#settings-overlay .set-row{ display:flex; align-items:center; gap:12px; width:100%; min-height:52px; padding:8px 14px; border:0; border-bottom:1px solid var(--edge, rgba(0,0,0,.1));
  background:transparent; color:var(--ink); font:500 16px/1.25 var(--font-ui, system-ui); text-align:left; cursor:pointer; }
#settings-overlay .set-row:last-child{ border-bottom:0; }
#settings-overlay .set-row::after{ content:''; flex:none; width:8px; height:8px; margin:0 3px 0 2px; border-top:2px solid currentColor; border-right:2px solid currentColor; transform:rotate(45deg); opacity:.4; }
#settings-overlay .set-row:active{ background:var(--accent-wash, rgba(0,0,0,.05)); }
#settings-overlay .set-row:focus-visible, #settings-overlay .set-acct:focus-visible{ outline:2px solid var(--accent); outline-offset:-2px; }
#settings-overlay .set-lbl{ flex:1; min-width:0; }
#settings-overlay .set-val{ flex:none; max-width:45%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--ink-muted); font-size:15px; }
#settings-overlay .set-ico{ flex:none; width:30px; height:30px; border-radius:8px; display:flex; align-items:center; justify-content:center; background:var(--c, #56647c); color:#fff; }
#settings-overlay .set-ico svg{ width:18px; height:18px; }
#settings-overlay .set-acct{ display:flex; align-items:center; gap:14px; width:100%; margin:4px 0 4px; padding:14px; border-radius:16px; border:1px solid var(--edge, rgba(0,0,0,.1));
  background:var(--surface, #fff); color:var(--ink); font:inherit; text-align:left; cursor:pointer; }
#settings-overlay .set-avatar{ flex:none; width:52px; height:52px; border-radius:26px; display:flex; align-items:center; justify-content:center; color:#fff;
  background:linear-gradient(180deg, #e0806a, #8a5fd0); }
#settings-overlay .set-avatar svg{ width:34px; height:34px; }
#settings-overlay .set-acct-t{ flex:1; min-width:0; display:flex; flex-direction:column; gap:2px; }
#settings-overlay .set-acct-t b{ font:700 18px/1.2 var(--font-ui, system-ui); }
#settings-overlay .set-acct-t span{ font-size:14px; color:var(--ink-muted); }
#settings-overlay .set-chev{ flex:none; display:flex; opacity:.45; }
#settings-overlay .set-chev svg{ width:18px; height:18px; }
#settings-overlay .set-page > h3:first-child{ margin-top:4px; }
#settings-overlay dl.ai-sends{ margin:8px 0 14px; }
#settings-overlay dl.ai-sends dt{ margin-top:12px; font:700 15px/1.3 var(--font-ui, system-ui); }
#settings-overlay dl.ai-sends dd{ margin:3px 0 0; font-size:14px; line-height:1.45; color:var(--ink-muted); }
/* A30: the parts as toggles. */
.parts-pick{ display:flex; flex-wrap:wrap; gap:8px; margin:6px 0 4px; }
.part-chip{ display:inline-flex; align-items:center; gap:6px; min-height:40px; padding:8px 14px; border-radius:99px; border:1.5px solid var(--edge, rgba(0,0,0,.15));
  background:transparent; color:var(--ink-muted); font:600 14px var(--font-ui, system-ui); cursor:pointer; }
.part-chip.on{ border-color:var(--accent); background:var(--accent-wash, rgba(0,0,0,.05)); color:var(--accent-text, var(--accent)); }
.part-chip .part-tick{ width:14px; text-align:center; }
/* A36: deletes look like deletes, in an even grid. */
.wipe-grid{ display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.wipe-grid .btn-danger:last-child:nth-child(odd){ grid-column:span 2; }
.wipe-grid .btn-danger{ width:100%; white-space:nowrap; color:#b3261e; border-color:rgba(179,38,30,.35); }
:root[data-theme="dark"] .wipe-grid .btn-danger{ color:#ff8a80; border-color:rgba(255,138,128,.35); }
@media (prefers-color-scheme: dark){ :root:not([data-theme="light"]) .wipe-grid .btn-danger{ color:#ff8a80; border-color:rgba(255,138,128,.35); } }
/* A37: the long privacy notes fold away. */
.privacy-more{ margin:4px 0 10px; }
.privacy-more > summary{ cursor:pointer; font-weight:700; padding:8px 0; color:var(--accent-text, var(--accent)); }
.privacy-more p{ margin:0 0 10px; }

/* Audit A42/A44: Unplug's setup title sits by its back arrow; entry labels may wrap. */
.dom-unplug .topbar h2{ margin:0 auto 0 6px; text-align:left; }
.dom-unplug .up-entry label span{ white-space:normal; overflow-wrap:anywhere; }

/* Audit A38: "Move my data" sits with the other buttons in dark mode. */
:root[data-theme="dark"] #btn-move-app{ background:var(--surface-quiet, rgba(255,255,255,.08)); color:var(--ink); }
@media (prefers-color-scheme: dark){ :root:not([data-theme="light"]) #btn-move-app{ background:var(--surface-quiet, rgba(255,255,255,.08)); color:var(--ink); } }
/* Audit B38: Focus's minutes in the app's own numerals, not a typewriter face. */
.dom-focus{ --font-instrument: var(--font-ui, system-ui); }

/* One tab at a time (js/onetab.js): the sheet a second tab shows. */
#onetab{ position:fixed; inset:0; z-index:10001; display:flex; align-items:center; justify-content:center;
  padding:24px 16px; background:var(--plane, #10201a); color:var(--text, #f4ecd8); }
#onetab .onetab-card{ max-width:420px; text-align:center; }
#onetab h2{ font-size:22px; margin:0 0 10px; }
#onetab p{ margin:0 0 22px; opacity:.85; line-height:1.45; }
#onetab button{ min-height:48px; padding:0 22px; border:0; border-radius:14px; font:inherit; font-weight:700;
  background:linear-gradient(180deg,var(--accent-hi),var(--accent-lo)); color:var(--accent-ink); }

/* Dark mode: the chosen option is LIGHTER than its track (UI review UI-60). It used
   the card colour, which in dark is darker than the track, so it read as unselected. */
:root[data-theme="dark"] .segmented button.active, :root[data-theme="dark"] .dom-food .seg.on{
  background:#34342f; color:#fff; box-shadow:0 0 0 1px rgba(255,255,255,.08), 0 1px 2px rgba(0,0,0,.5); }
@media (prefers-color-scheme: dark){
  :root:not([data-theme="light"]) .segmented button.active, :root:not([data-theme="light"]) .dom-food .seg.on{
    background:#34342f; color:#fff; box-shadow:0 0 0 1px rgba(255,255,255,.08), 0 1px 2px rgba(0,0,0,.5); } }
/* Back from the left edge (js/bare.js): the "‹" that follows the thumb in. */
#edge-cue{ position:fixed; left:-44px; top:0; z-index:130; width:44px; height:44px; border-radius:22px; display:grid; place-items:center;
  background:var(--surface, #fff); color:var(--accent-text, var(--accent)); box-shadow:0 4px 14px rgba(0,0,0,.22); font:700 26px/1 var(--font-ui, system-ui);
  opacity:0; pointer-events:none; }

/* Apple Health, one line per kind (js/native.js, decision 0165). */
#health-host .hk-kinds{ list-style:none; margin:4px 0 12px; padding:0; display:grid; gap:4px; font-size:14px; }
#health-host .hk-kinds li{ display:flex; justify-content:space-between; gap:12px; }
#health-host .hk-kinds li span{ color:var(--muted, #6b6680); text-align:right; }
#health-host .hk-kinds li.hk-failed span{ color:var(--danger, #b3261e); font-weight:600; }
