/* PlateStride design system.
   Every page loads this first. It holds the colour tokens (light + dark), type, the base look of
   form controls, shared components (buttons, segmented controls, cards) and the app shell
   (top bar, section toolbar, phone tab bar, account menu). Section stylesheets only add layout. */

/* ---------- Type: Inter, self-hosted (SIL Open Font License, see fonts/LICENSE-Inter.txt) ---------- */
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("/assets/fonts/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("/assets/fonts/inter-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- Tokens ---------- */
:root {
  color-scheme: light;
  --dd-font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --dd-bar-h: 60px;

  --dd-bg: #f5f6f8;
  --dd-glow: rgba(14, 111, 128, 0.07);
  --dd-surface: #ffffff;
  --dd-surface-soft: #f8f9fb;
  --dd-sunken: #f2f4f7;
  --dd-hover: #eff1f5;
  --dd-seg-track: #eceef2;
  --dd-text: #0e1320;
  --dd-text-2: #343b4a;
  --dd-muted: #626a79;
  --dd-faint: #6f7684;
  --dd-line: #e9ebf0;
  --dd-line-strong: #dde1e8;
  --dd-control-border: #d5dae2;
  --dd-input-bg: #ffffff;
  --dd-accent: #0e6f80;
  --dd-accent-hover: #0b5a68;
  --dd-accent-text: #ffffff;
  --dd-accent-soft: #e3f2f4;
  --dd-accent-soft-text: #0b5a68;
  --dd-focus: #a6dbe3;
  --dd-ring: rgba(14, 111, 128, 0.22);
  --dd-pos: #059669;
  --dd-pos-soft: #e6f6ee;
  --dd-neg: #dc3c43;
  --dd-neg-soft: #fdeded;
  --dd-neg-border: #f3c1c3;
  --dd-warn-soft: #fff5e1;
  --dd-warn-text: #8a5300;
  --dd-header-bg: rgba(255, 255, 255, 0.8);
  --dd-shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 2px 8px rgba(16, 24, 40, 0.04);
  --dd-shadow-hover: 0 2px 4px rgba(16, 24, 40, 0.05), 0 12px 28px -6px rgba(16, 24, 40, 0.12);
  --dd-shadow-pop: 0 0 0 1px rgba(16, 24, 40, 0.05), 0 18px 44px -10px rgba(16, 24, 40, 0.22);
  --dd-shadow-seg: 0 1px 2px rgba(16, 24, 40, 0.1), 0 0 0 1px rgba(16, 24, 40, 0.04);
  --dd-radius: 16px;
  --dd-radius-lg: 22px;
  --dd-radius-sm: 10px;
  --dd-radius-xs: 8px;

  /* One colour per section, used for icons and accents. */
  --dd-c-home: #0e6f80;
  --dd-c-finances: #059669;
  --dd-c-travel: #0284c7;
  --dd-c-recipes: #e8701e;
  --dd-c-requests: #7c3aed;
  --dd-c-members: #475569;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --dd-bg: #0b0d12; --dd-glow: rgba(69, 195, 212, 0.08); --dd-surface: #14171d; --dd-surface-soft: #181b22; --dd-sunken: #101318;
    --dd-hover: #1f232c; --dd-seg-track: #1b1f27; --dd-text: #e8eaef; --dd-text-2: #c4c9d3; --dd-muted: #99a1ae; --dd-faint: #7a8292;
    --dd-line: #22262f; --dd-line-strong: #2b303b; --dd-control-border: #353b47; --dd-input-bg: #101318;
    --dd-accent: #45c3d4; --dd-accent-hover: #74d4e1; --dd-accent-text: #071316; --dd-accent-soft: #0f2a2f; --dd-accent-soft-text: #8fdde8;
    --dd-focus: #1f5a63; --dd-ring: rgba(69, 195, 212, 0.32);
    --dd-pos: #34d399; --dd-pos-soft: #0f2a20; --dd-neg: #ff6b6f; --dd-neg-soft: #33181b; --dd-neg-border: #6a2c30;
    --dd-warn-soft: #2b2212; --dd-warn-text: #f3cf8a; --dd-header-bg: rgba(14, 16, 21, 0.78);
    --dd-shadow: 0 0 0 1px rgba(255, 255, 255, 0.015), 0 1px 2px rgba(0, 0, 0, 0.4);
    --dd-shadow-hover: 0 0 0 1px rgba(255, 255, 255, 0.03), 0 14px 32px -8px rgba(0, 0, 0, 0.7);
    --dd-shadow-pop: 0 0 0 1px rgba(255, 255, 255, 0.07), 0 22px 50px -10px rgba(0, 0, 0, 0.75);
    --dd-shadow-seg: 0 1px 2px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.06);
    --dd-c-home: #45c3d4; --dd-c-finances: #34d399; --dd-c-travel: #38bdf8; --dd-c-recipes: #ff9a52; --dd-c-requests: #a78bfa; --dd-c-members: #94a3b8;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --dd-bg: #0b0d12; --dd-glow: rgba(69, 195, 212, 0.08); --dd-surface: #14171d; --dd-surface-soft: #181b22; --dd-sunken: #101318;
  --dd-hover: #1f232c; --dd-seg-track: #1b1f27; --dd-text: #e8eaef; --dd-text-2: #c4c9d3; --dd-muted: #99a1ae; --dd-faint: #7a8292;
  --dd-line: #22262f; --dd-line-strong: #2b303b; --dd-control-border: #353b47; --dd-input-bg: #101318;
  --dd-accent: #45c3d4; --dd-accent-hover: #74d4e1; --dd-accent-text: #071316; --dd-accent-soft: #0f2a2f; --dd-accent-soft-text: #8fdde8;
  --dd-focus: #1f5a63; --dd-ring: rgba(69, 195, 212, 0.32);
  --dd-pos: #34d399; --dd-pos-soft: #0f2a20; --dd-neg: #ff6b6f; --dd-neg-soft: #33181b; --dd-neg-border: #6a2c30;
  --dd-warn-soft: #2b2212; --dd-warn-text: #f3cf8a; --dd-header-bg: rgba(14, 16, 21, 0.78);
  --dd-shadow: 0 0 0 1px rgba(255, 255, 255, 0.015), 0 1px 2px rgba(0, 0, 0, 0.4);
  --dd-shadow-hover: 0 0 0 1px rgba(255, 255, 255, 0.03), 0 14px 32px -8px rgba(0, 0, 0, 0.7);
  --dd-shadow-pop: 0 0 0 1px rgba(255, 255, 255, 0.07), 0 22px 50px -10px rgba(0, 0, 0, 0.75);
  --dd-shadow-seg: 0 1px 2px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.06);
  --dd-c-home: #45c3d4; --dd-c-finances: #34d399; --dd-c-travel: #38bdf8; --dd-c-recipes: #ff9a52; --dd-c-requests: #a78bfa; --dd-c-members: #94a3b8;
}

/* ---------- Base ---------- */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--dd-bar-h) + 64px); }
body {
  margin: 0; min-height: 100vh; color: var(--dd-text); font-family: var(--dd-font);
  font-feature-settings: "cv11", "ss01"; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  background: radial-gradient(1100px 380px at 50% -160px, var(--dd-glow), transparent 70%) no-repeat, var(--dd-bg);
}
:where(h1, h2, h3, h4) { text-wrap: balance; }
::selection { background: color-mix(in srgb, var(--dd-accent) 24%, transparent); }
:where(input, select, textarea, button) { font: inherit; }
:where(table, .num, [class*="value"], [class*="total"]) { font-variant-numeric: tabular-nums; }
:where(input[type="checkbox"], input[type="radio"], input[type="range"], progress) { accent-color: var(--dd-accent); }

/* Text fields and selects: one look everywhere. Sections set sizes and widths only. */
:where(input:not([type="checkbox"], [type="radio"], [type="range"], [type="file"], [type="color"], [type="submit"], [type="button"]), select, textarea) {
  border: 1px solid var(--dd-control-border); border-radius: var(--dd-radius-sm); background-color: var(--dd-input-bg);
  color: var(--dd-text); transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}
:where(input:not([type="checkbox"], [type="radio"], [type="range"], [type="file"], [type="color"]), select, textarea):hover { border-color: color-mix(in srgb, var(--dd-control-border) 60%, var(--dd-muted)); }
input:not([type="checkbox"], [type="radio"], [type="range"], [type="file"], [type="color"]):focus, select:focus, textarea:focus {
  outline: none; border-color: var(--dd-accent); box-shadow: 0 0 0 3px var(--dd-ring);
}
:where(input, textarea)::placeholder { color: var(--dd-faint); opacity: 1; }
select:not([multiple]):not([size]) {
  -webkit-appearance: none; appearance: none; padding-right: 2rem;
  background-image: var(--dd-select-chevron); background-repeat: no-repeat; background-position: right .6rem center; background-size: 14px;
}
:where(input[type="date"], input[type="month"])::-webkit-calendar-picker-indicator { opacity: .55; cursor: pointer; }
:root[data-theme="dark"] :where(input[type="date"], input[type="month"])::-webkit-calendar-picker-indicator { filter: invert(1); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) :where(input[type="date"], input[type="month"])::-webkit-calendar-picker-indicator { filter: invert(1); }
}
input[type="file"] { font-size: .85rem; color: var(--dd-muted); max-width: 100%; }
input[type="file"]::file-selector-button {
  margin-right: .65rem; border: 1px solid var(--dd-control-border); border-radius: 999px; padding: .4rem .9rem;
  background: var(--dd-surface); color: var(--dd-text); font: 600 .82rem var(--dd-font); cursor: pointer; transition: background-color .15s;
}
input[type="file"]::file-selector-button:hover { background: var(--dd-hover); }

/* Disclosure triangles: a clean chevron instead of the browser's black triangle. */
summary { cursor: pointer; }
:where(details) > summary:not(.dd-plain) { list-style: none; }
:where(details) > summary:not(.dd-plain)::-webkit-details-marker { display: none; }
:where(details) > summary:not(.dd-plain, .dd-account-button)::before {
  content: ""; display: inline-block; width: .9em; height: .9em; margin-right: .45em; vertical-align: -.1em; flex: none;
  background: currentColor; opacity: .55; transition: transform .18s ease;
  -webkit-mask: var(--dd-chevron-right) center / contain no-repeat; mask: var(--dd-chevron-right) center / contain no-repeat;
}
:where(details[open]) > summary:not(.dd-plain, .dd-account-button)::before { transform: rotate(90deg); }

:focus-visible { outline: 2px solid var(--dd-accent); outline-offset: 2px; }

/* Thin, quiet scrollbars. */
* { scrollbar-width: thin; scrollbar-color: var(--dd-line-strong) transparent; }

/* ---------- Icons (masks, so they take the current text colour) ---------- */
.dd-i {
  display: inline-block; flex: none; width: 1.15em; height: 1.15em; background: currentColor; vertical-align: -.2em;
  -webkit-mask: var(--dd-icon) center / contain no-repeat; mask: var(--dd-icon) center / contain no-repeat;
}

/* ---------- Shared components ---------- */
/* Buttons for site pages: .dd-button (secondary), .dd-button.primary */
.dd-button {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 40px; padding: 0 1.05rem;
  border-radius: var(--dd-radius-sm); border: 1px solid var(--dd-control-border); background: var(--dd-surface); color: var(--dd-text);
  font: 600 .92rem/1 var(--dd-font); text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .15s, border-color .15s, box-shadow .15s, transform .15s;
}
.dd-button:hover { background: var(--dd-hover); }
.dd-button.primary { background: var(--dd-accent); border-color: var(--dd-accent); color: var(--dd-accent-text); box-shadow: 0 1px 2px rgba(16, 24, 40, .12), inset 0 1px 0 rgba(255, 255, 255, .12); }
.dd-button.primary:hover { background: var(--dd-accent-hover); border-color: var(--dd-accent-hover); }
.dd-button.large { min-height: 48px; padding: 0 1.4rem; font-size: 1rem; border-radius: 12px; }
.dd-button:active { transform: translateY(1px); }

/* Segmented control: a soft track with the chosen option raised.
   Works with .active, .is-active, aria-selected and aria-pressed. */
.dd-seg {
  display: inline-flex; flex-wrap: nowrap; gap: 2px; max-width: 100%; overflow-x: auto; padding: 3px;
  background: var(--dd-seg-track); border: 0; border-radius: 12px; scrollbar-width: none;
}
.dd-seg::-webkit-scrollbar { display: none; }
.dd-seg.dd-seg > button {
  flex: 1 0 auto; min-height: 34px; margin: 0; padding: .35rem .85rem; border: 0; border-radius: 9px; background: transparent;
  color: var(--dd-muted); font: 550 .86rem/1.2 var(--dd-font); white-space: nowrap; cursor: pointer; box-shadow: none;
  transition: background-color .15s, color .15s, box-shadow .15s;
}
.dd-seg.dd-seg > button:hover { color: var(--dd-text); background: transparent; transform: none; }
.dd-seg.dd-seg > button:is(.active, .is-active, [aria-selected="true"], [aria-pressed="true"], [aria-checked="true"]) {
  background: var(--dd-surface); color: var(--dd-text); box-shadow: var(--dd-shadow-seg);
}
:root[data-theme="dark"] .dd-seg.dd-seg > button:is(.active, .is-active, [aria-selected="true"], [aria-pressed="true"], [aria-checked="true"]) { background: var(--dd-hover); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .dd-seg.dd-seg > button:is(.active, .is-active, [aria-selected="true"], [aria-pressed="true"], [aria-checked="true"]) { background: var(--dd-hover); }
}

.dd-card { background: var(--dd-surface); border: 1px solid var(--dd-line); border-radius: var(--dd-radius); box-shadow: var(--dd-shadow); }

/* ---------- App shell: top bar ---------- */
.dd-bar {
  position: sticky; top: 0; z-index: 40; isolation: isolate;
  display: flex; align-items: center; gap: 1rem; height: var(--dd-bar-h); padding: 0 20px;
  border-bottom: 1px solid var(--dd-line); font-family: var(--dd-font); color: var(--dd-text);
}
/* The frosted background sits on a pseudo-element: a backdrop-filter on the bar itself would trap the
   phone tab bar (position: fixed) inside the header. */
.dd-bar::before {
  content: ""; position: absolute; inset: 0; z-index: -1; background: var(--dd-header-bg);
  -webkit-backdrop-filter: saturate(180%) blur(16px); backdrop-filter: saturate(180%) blur(16px);
}
.dd-bar .dd-brand {
  display: inline-flex; align-items: center; gap: .6rem; flex: none; margin: 0; padding: 0; color: var(--dd-text);
  font-weight: 750; font-size: 1.05rem; letter-spacing: -.025em; text-decoration: none; white-space: nowrap;
}
.dd-bar .dd-brand img { width: 30px; height: 30px; border-radius: 9px; box-shadow: 0 2px 6px rgba(14, 94, 111, .3); }
.dd-bar .dd-brand:hover .dd-brand-name { color: var(--dd-accent); }
.dd-bar .dd-crumb { display: none; font-weight: 700; font-size: 1.05rem; letter-spacing: -.02em; white-space: nowrap; }

.dd-bar .dd-nav { margin: 0 0 0 .75rem; padding: 0; }
.dd-bar .dd-sections { display: flex; align-items: center; gap: .2rem; margin: 0; padding: 0; list-style: none; }
.dd-bar .dd-sections li { display: block; margin: 0; padding: 0; border: 0; }
.dd-bar .dd-sections a {
  --dd-c: var(--dd-accent);
  display: inline-flex; align-items: center; gap: .5rem; height: 38px; padding: 0 .85rem; border-radius: 10px;
  color: var(--dd-muted); background: transparent; font-size: .9rem; font-weight: 560; text-decoration: none; white-space: nowrap;
  transition: background-color .15s, color .15s;
}
.dd-bar .dd-sections a .dd-i { width: 18px; height: 18px; }
.dd-bar .dd-sections a:hover { background: var(--dd-hover); color: var(--dd-text); }
.dd-bar .dd-sections a:hover .dd-i, .dd-bar .dd-sections a[aria-current="page"] .dd-i { color: var(--dd-c); }
.dd-bar .dd-sections a[aria-current="page"] { background: var(--dd-hover); color: var(--dd-text); }
.dd-bar .dd-sections .dd-nav-home { display: none; }
.dd-bar a[href="/"] { --dd-c: var(--dd-c-home); }
.dd-bar a[href="/finances/"] { --dd-c: var(--dd-c-finances); }
.dd-bar a[href="/travel/"] { --dd-c: var(--dd-c-travel); }
.dd-bar a[href="/recipes/"] { --dd-c: var(--dd-c-recipes); }

.dd-bar .dd-bar-end { display: flex; align-items: center; gap: .5rem; margin-left: auto; min-width: 0; }
.dd-bar .dd-login { min-height: 38px; }

/* Account menu */
.dd-bar .dd-account { position: relative; margin: 0; padding: 0; border: 0; }
.dd-bar .dd-account-button {
  display: flex; align-items: center; gap: .55rem; height: 42px; margin: 0; padding: 0 .55rem 0 .3rem; border-radius: 999px;
  color: var(--dd-text); background: transparent; list-style: none; cursor: pointer; transition: background-color .15s;
  font-size: .9rem; font-weight: 560;
}
.dd-bar .dd-account-button::-webkit-details-marker { display: none; }
.dd-bar .dd-account-button:hover, .dd-bar .dd-account[open] > .dd-account-button { background: var(--dd-hover); }
.dd-bar .dd-account-button > .dd-i { width: 16px; height: 16px; color: var(--dd-muted); transition: transform .18s; }
.dd-bar .dd-account[open] > .dd-account-button > .dd-i { transform: rotate(180deg); }
.dd-avatar {
  display: inline-grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(140deg, #4f7cff, #8b5cf6); color: #fff; font-size: .85rem; font-weight: 700; letter-spacing: 0;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18);
}
.dd-bar .dd-user { max-width: 12rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: inherit; font-size: inherit; }
.dd-bar .dd-menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 60; display: grid; gap: 2px; width: 268px; padding: 6px;
  background: var(--dd-surface); border: 1px solid var(--dd-line); border-radius: 16px; box-shadow: var(--dd-shadow-pop);
  transform-origin: top right; animation: dd-pop .16s cubic-bezier(.2, .9, .3, 1.2);
}
@keyframes dd-pop { from { opacity: 0; transform: scale(.96) translateY(-4px); } }
.dd-bar .dd-menu-who { display: flex; align-items: center; gap: .7rem; margin: 0 0 4px; padding: .65rem .6rem .8rem; border-bottom: 1px solid var(--dd-line); }
.dd-bar .dd-menu-who .dd-avatar { width: 40px; height: 40px; font-size: 1rem; }
.dd-bar .dd-menu-who > span:last-child { display: grid; min-width: 0; }
.dd-bar .dd-menu-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 650; font-size: .95rem; }
.dd-bar .dd-menu-username { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--dd-muted); font-size: .8rem; }
.dd-bar .dd-menu-label { padding: .55rem .65rem .3rem; color: var(--dd-muted); font-size: .72rem; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; }
[hidden] { display: none !important; }
.dd-bar .dd-menu-item {
  display: flex; align-items: center; gap: .65rem; width: 100%; min-height: 40px; margin: 0; padding: 0 .65rem; border: 0; border-radius: 10px;
  background: transparent; color: var(--dd-text); font: 500 .9rem var(--dd-font); text-align: left; text-decoration: none; cursor: pointer; box-shadow: none;
}
.dd-bar .dd-menu-item:hover { background: var(--dd-hover); color: var(--dd-text); }
.dd-bar .dd-menu-item .dd-i { color: var(--dd-muted); }
.dd-bar .dd-menu-item.danger:hover { background: var(--dd-neg-soft); color: var(--dd-neg); }
.dd-bar .dd-menu-item.danger:hover .dd-i { color: var(--dd-neg); }
.dd-bar .dd-google { min-height: 48px; }
.dd-bar .dd-google-text { display: grid; line-height: 1.2; }
.dd-bar .dd-google-text small { color: var(--dd-muted); font-size: .76rem; font-weight: 500; }
.dd-bar .dd-google.attention .dd-google-text small { color: var(--dd-neg); }
.dd-bar .dd-menu hr { width: 100%; margin: 4px 0; border: 0; border-top: 1px solid var(--dd-line); }
.dd-bar .dd-logout { display: block; margin: 0; padding: 0; }
.dd-bar .dd-theme { display: flex; margin: 0 .35rem .4rem; }
.dd-bar .dd-theme > button { display: inline-flex; align-items: center; justify-content: center; gap: .35rem; font-size: .8rem; padding: .3rem .4rem; }
.dd-bar .dd-theme > button .dd-i { width: 15px; height: 15px; }

/* ---------- Section toolbar (tabs under the top bar) ---------- */
.dd-subbar {
  position: sticky; top: var(--dd-bar-h); z-index: 30; isolation: isolate;
  display: flex; align-items: center; flex-wrap: wrap; gap: .5rem 1.25rem; min-height: 52px; margin: 0; padding: 0 20px;
  border-bottom: 1px solid var(--dd-line); background: none; font-family: var(--dd-font);
}
.dd-subbar::before {
  content: ""; position: absolute; inset: 0; z-index: -1; background: var(--dd-header-bg);
  -webkit-backdrop-filter: saturate(180%) blur(16px); backdrop-filter: saturate(180%) blur(16px);
}
.dd-subbar .dd-tabs {
  display: flex; align-self: stretch; flex-wrap: nowrap; gap: .15rem; min-width: 0; margin: 0; padding: 0;
  overflow-x: auto; overflow-y: hidden; background: none; border: 0; border-radius: 0; scrollbar-width: none;
}
.dd-subbar .dd-tabs::-webkit-scrollbar { display: none; }
.dd-subbar .dd-tabs button {
  position: relative; flex: 0 0 auto; display: inline-flex; align-items: center; min-height: 52px; margin: 0; padding: 0 .8rem;
  border: 0; border-radius: 0; background: transparent; color: var(--dd-muted); box-shadow: none;
  font: 560 .9rem/1 var(--dd-font); white-space: nowrap; cursor: pointer; transition: color .15s;
}
.dd-subbar .dd-tabs button::after {
  content: ""; position: absolute; left: .8rem; right: .8rem; bottom: 0; height: 2px; border-radius: 2px 2px 0 0;
  background: transparent; transition: background-color .15s;
}
.dd-subbar .dd-tabs button:hover { color: var(--dd-text); background: transparent; }
.dd-subbar .dd-tabs button:hover::after { background: var(--dd-line-strong); }
.dd-subbar .dd-tabs button:is(.active, [aria-selected="true"], [aria-current="page"]) { color: var(--dd-text); font-weight: 650; background: transparent; }
.dd-subbar .dd-tabs button:is(.active, [aria-selected="true"], [aria-current="page"])::after { background: var(--dd-accent); }
.dd-subbar .dd-tabs button:focus-visible { outline-offset: -4px; border-radius: 8px; }

/* ---------- Phones: compact top bar, section tabs scroll, sections move to a bottom tab bar ---------- */
@media (max-width: 760px) {
  :root { --dd-bar-h: 56px; }
  .dd-bar { gap: .5rem; padding: 0 10px 0 16px; }
  .dd-bar .dd-brand img { width: 28px; height: 28px; }
  .dd-bar:has(.dd-crumb) .dd-brand-name { display: none; }
  .dd-bar .dd-crumb { display: inline; }
  .dd-bar .dd-user, .dd-bar .dd-account-button > .dd-i { display: none; }
  .dd-bar .dd-account-button { padding: 0 4px; }

  .dd-bar .dd-nav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; margin: 0;
    padding: 6px max(8px, env(safe-area-inset-left)) calc(6px + env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-right));
    background: var(--dd-header-bg); border-top: 1px solid var(--dd-line);
    -webkit-backdrop-filter: saturate(180%) blur(16px); backdrop-filter: saturate(180%) blur(16px);
  }
  .dd-bar .dd-sections { justify-content: space-around; gap: 0; }
  .dd-bar .dd-sections li { flex: 1 1 0; min-width: 0; }
  .dd-bar .dd-sections .dd-nav-home { display: block; }
  .dd-bar .dd-sections a {
    flex-direction: column; justify-content: center; gap: 4px; width: 100%; height: 54px; padding: 0 2px; border-radius: 14px;
    font-size: .68rem; font-weight: 600; letter-spacing: .01em;
  }
  .dd-bar .dd-sections a .dd-i { width: 22px; height: 22px; }
  .dd-bar .dd-sections a:hover { background: transparent; }
  .dd-bar .dd-sections a[aria-current="page"] { background: transparent; color: var(--dd-c); }
  .dd-bar .dd-sections a[aria-current="page"] .dd-i { color: var(--dd-c); }
  body:has(.dd-nav:not([hidden])) { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }

  .dd-subbar { position: relative; top: auto; gap: .25rem .75rem; min-height: 0; padding: .5rem 16px 0; }
  .dd-subbar .dd-tabs {
    order: 99; flex: 1 0 100%; margin: 0 -16px; padding: 0 8px;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 12px, #000 calc(100% - 24px), transparent);
    mask-image: linear-gradient(90deg, transparent, #000 12px, #000 calc(100% - 24px), transparent);
  }
  .dd-subbar .dd-tabs button { min-height: 46px; padding: 0 .7rem; font-size: .88rem; }
  .dd-bar .dd-menu { position: fixed; top: calc(var(--dd-bar-h) + 6px); right: 10px; left: auto; width: min(300px, calc(100vw - 20px)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ---------- Icon shapes (generated; Lucide, ISC licence) ---------- */
:root { --dd-chevron-right: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 18 6-6-6-6'/%3E%3C/svg%3E"); }
.dd-i-home { --dd-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8'/%3E%3Cpath d='M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z'/%3E%3C/svg%3E"); }
.dd-i-wallet { --dd-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 7V4a1 1 0 0 0-1-1H5a2 2 0 0 0 0 4h15a1 1 0 0 1 1 1v4h-3a2 2 0 0 0 0 4h3a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1'/%3E%3Cpath d='M3 5v14a2 2 0 0 0 2 2h15a1 1 0 0 0 1-1v-4'/%3E%3C/svg%3E"); }
.dd-i-plane { --dd-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17.8 19.2 16 11l3.5-3.5C21 6 21.5 4 21 3c-1-.5-3 0-4.5 1.5L13 8 4.8 6.2c-.5-.1-.9.1-1.1.5l-.3.5c-.2.5-.1 1 .3 1.3L9 12l-2 3H4l-1 1 3 2 2 3 1-1v-3l3-2 3.5 5.3c.3.4.8.5 1.3.3l.5-.2c.4-.3.6-.7.5-1.2z'/%3E%3C/svg%3E"); }
.dd-i-utensils { --dd-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 2v7c0 1.1.9 2 2 2h4a2 2 0 0 0 2-2V2'/%3E%3Cpath d='M7 2v20'/%3E%3Cpath d='M21 15V2a5 5 0 0 0-5 5v6c0 1.1.9 2 2 2h3Zm0 0v7'/%3E%3C/svg%3E"); }
.dd-i-film { --dd-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect width='18' height='18' x='3' y='3' rx='2'/%3E%3Cpath d='M7 3v18'/%3E%3Cpath d='M3 7.5h4'/%3E%3Cpath d='M3 12h18'/%3E%3Cpath d='M3 16.5h4'/%3E%3Cpath d='M17 3v18'/%3E%3Cpath d='M17 7.5h4'/%3E%3Cpath d='M17 16.5h4'/%3E%3C/svg%3E"); }
.dd-i-users { --dd-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='9' cy='7' r='4'/%3E%3Cpath d='M22 21v-2a4 4 0 0 0-3-3.87'/%3E%3Cpath d='M16 3.13a4 4 0 0 1 0 7.75'/%3E%3C/svg%3E"); }
.dd-i-sun { --dd-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3Cpath d='M12 2v2M12 20v2M4.93 4.93l1.41 1.41M17.66 17.66l1.41 1.41M2 12h2M20 12h2M6.34 17.66l-1.41 1.41M19.07 4.93l-1.41 1.41'/%3E%3C/svg%3E"); }
.dd-i-moon { --dd-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z'/%3E%3C/svg%3E"); }
.dd-i-monitor { --dd-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect width='20' height='14' x='2' y='3' rx='2'/%3E%3Cpath d='M8 21h8M12 17v4'/%3E%3C/svg%3E"); }
.dd-i-logout { --dd-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4'/%3E%3Cpath d='m16 17 5-5-5-5'/%3E%3Cpath d='M21 12H9'/%3E%3C/svg%3E"); }
.dd-i-arrow-up-right { --dd-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 7h10v10'/%3E%3Cpath d='M7 17 17 7'/%3E%3C/svg%3E"); }
.dd-i-arrow-right { --dd-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14'/%3E%3Cpath d='m12 5 7 7-7 7'/%3E%3C/svg%3E"); }
.dd-i-chevron-down { --dd-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); }
.dd-i-trending-up { --dd-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 7 13.5 15.5 8.5 10.5 2 17'/%3E%3Cpath d='M16 7h6v6'/%3E%3C/svg%3E"); }
.dd-i-fridge { --dd-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 6a4 4 0 0 1 4-4h6a4 4 0 0 1 4 4v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2Z'/%3E%3Cpath d='M5 10h14'/%3E%3Cpath d='M15 7v6'/%3E%3C/svg%3E"); }
.dd-i-calendar { --dd-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect width='18' height='18' x='3' y='4' rx='2'/%3E%3Cpath d='M16 2v4M8 2v4M3 10h18'/%3E%3C/svg%3E"); }
.dd-i-lock { --dd-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect width='18' height='11' x='3' y='11' rx='2'/%3E%3Cpath d='M7 11V7a5 5 0 0 1 10 0v4'/%3E%3C/svg%3E"); }
.dd-i-shield-check { --dd-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z'/%3E%3Cpath d='m9 12 2 2 4-4'/%3E%3C/svg%3E"); }
.dd-i-piggy-bank { --dd-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 5c-1.5 0-2.8 1.4-3 2-3.5-1.5-11-.3-11 5 0 1.8 0 3 2 4.5V20h4v-2h3v2h4v-4c1-.5 1.7-1 2-2h2v-4h-2c0-1-.5-1.5-1-2V5z'/%3E%3Cpath d='M2 9v1c0 1.1.9 2 2 2h1'/%3E%3Cpath d='M16 11h.01'/%3E%3C/svg%3E"); }
.dd-i-sliders { --dd-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 4h-7M10 4H3M21 12h-9M8 12H3M21 20h-5M12 20H3M14 2v4M8 10v4M16 18v4'/%3E%3C/svg%3E"); }
.dd-i-plus { --dd-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14'/%3E%3Cpath d='M12 5v14'/%3E%3C/svg%3E"); }
.dd-i-search { --dd-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E"); }
.dd-i-file { --dd-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z'/%3E%3Cpath d='M14 2v4a2 2 0 0 0 2 2h4'/%3E%3Cpath d='M16 13H8M16 17H8M10 9H8'/%3E%3C/svg%3E"); }
.dd-i-image { --dd-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect width='18' height='18' x='3' y='3' rx='2'/%3E%3Ccircle cx='9' cy='9' r='2'/%3E%3Cpath d='m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21'/%3E%3C/svg%3E"); }
.dd-i-trash { --dd-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 6h18'/%3E%3Cpath d='M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6'/%3E%3Cpath d='M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2'/%3E%3C/svg%3E"); }
.dd-i-x { --dd-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 6 6 18'/%3E%3Cpath d='m6 6 12 12'/%3E%3C/svg%3E"); }
.dd-i-copy { --dd-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect width='14' height='14' x='8' y='8' rx='2'/%3E%3Cpath d='M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2'/%3E%3C/svg%3E"); }
.dd-i-check { --dd-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E"); }
.dd-i-list-checks { --dd-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m3 17 2 2 4-4'/%3E%3Cpath d='m3 7 2 2 4-4'/%3E%3Cpath d='M13 6h8M13 12h8M13 18h8'/%3E%3C/svg%3E"); }
.dd-i-receipt { --dd-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 2v20l2-1 2 1 2-1 2 1 2-1 2 1 2-1 2 1V2l-2 1-2-1-2 1-2-1-2 1-2-1-2 1Z'/%3E%3Cpath d='M16 8h-6a2 2 0 1 0 0 4h4a2 2 0 1 1 0 4H8'/%3E%3Cpath d='M12 17.5v-11'/%3E%3C/svg%3E"); }
.dd-i-chevron-left { --dd-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m15 18-6-6 6-6'/%3E%3C/svg%3E"); }
.dd-i-chevron-right { --dd-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 18 6-6-6-6'/%3E%3C/svg%3E"); }
.dd-i-bell { --dd-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9'/%3E%3Cpath d='M10.3 21a1.94 1.94 0 0 0 3.4 0'/%3E%3C/svg%3E"); }
.dd-i-share { --dd-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8'/%3E%3Cpath d='m16 6-4-4-4 4'/%3E%3Cpath d='M12 2v13'/%3E%3C/svg%3E"); }
.dd-i-star { --dd-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z'/%3E%3C/svg%3E"); }
.dd-i-upload { --dd-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4'/%3E%3Cpath d='m17 8-5-5-5 5'/%3E%3Cpath d='M12 3v12'/%3E%3C/svg%3E"); }
.dd-i-globe { --dd-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20'/%3E%3Cpath d='M2 12h20'/%3E%3C/svg%3E"); }
.dd-i-map-pin { --dd-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0'/%3E%3Ccircle cx='12' cy='10' r='3'/%3E%3C/svg%3E"); }
:root { --dd-select-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238b93a1' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); }

/* ---------- First-visit guides and What's new (guide.js) ---------- */
.dd-guide { width: min(440px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 1.4rem 1.4rem 1.1rem; border: 1px solid var(--dd-line); border-radius: 18px;
  background: var(--dd-surface); color: var(--dd-text); box-shadow: 0 24px 60px rgba(10, 14, 22, .28); }
.dd-guide::backdrop { background: rgba(10, 14, 22, .45); backdrop-filter: blur(2px); }
.dd-guide h2 { margin: 0 0 .9rem; font-size: 1.35rem; letter-spacing: -.02em; }
.dd-guide-eyebrow { margin: 0 0 .2rem; color: var(--dd-accent); font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.dd-guide-step { display: grid; grid-template-columns: auto 1fr; gap: .9rem; align-items: start; min-height: 7.5rem; }
.dd-guide-step h3 { margin: .15rem 0 .3rem; font-size: 1.02rem; }
.dd-guide-step p { margin: 0; color: var(--dd-text-2); line-height: 1.5; }
.dd-guide-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--dd-seg-track); color: var(--dd-accent); font-size: 1.3rem; }
.dd-guide-dots { display: flex; gap: .35rem; justify-content: center; margin: .9rem 0 .2rem; }
.dd-guide-dots span { width: 7px; height: 7px; border-radius: 50%; background: var(--dd-line-strong); }
.dd-guide-dots span.on { background: var(--dd-accent); width: 18px; border-radius: 4px; }
.dd-guide-actions { display: flex; align-items: center; gap: .5rem; margin-top: .8rem; }
.dd-guide-gap { flex: 1; }
.dd-guide-actions button[hidden] { display: none; }
.dd-new-notes { display: grid; gap: .8rem; max-height: 55dvh; overflow: auto; }
.dd-new-notes h3 { margin: 0 0 .25rem; font-size: 1rem; }
.dd-new-notes ul { margin: 0; padding-left: 1.15rem; color: var(--dd-text-2); line-height: 1.5; }
.dd-new-notes li + li { margin-top: .2rem; }
.dd-menu-item.dd-guide-item { width: 100%; background: none; border: 0; text-align: left; font: inherit; cursor: pointer; }
.dd-count { margin-left: auto; padding: .05rem .45rem; border-radius: 999px; background: var(--dd-neg); color: #fff; font-size: .72rem; font-weight: 700; }
.dd-account-button { position: relative; }
.dd-dot { position: absolute; top: 2px; left: 26px; width: 10px; height: 10px; border-radius: 50%; background: var(--dd-neg); border: 2px solid var(--dd-surface); }
.dd-pending-banner { display: flex; align-items: center; gap: .7rem; margin: 0 0 1rem; padding: .8rem 1rem; border-radius: 14px; border: 1px solid var(--dd-line);
  background: var(--dd-surface); color: var(--dd-text); text-decoration: none; box-shadow: var(--dd-shadow); }
.dd-pending-banner strong { margin-left: auto; color: var(--dd-accent); }
.dd-pending-banner .dd-i { color: var(--dd-neg); }
.dd-guide button { font: inherit; font-weight: 600; font-size: .95rem; min-height: 40px; padding: .5rem 1.1rem; border-radius: 10px; border: 0; background: var(--dd-accent); color: #fff; cursor: pointer; }
.dd-guide button.quiet { background: transparent; color: var(--dd-accent); padding: .5rem .7rem; }
.dd-guide button:hover { filter: brightness(1.05); }
.dd-guide button.quiet:hover { background: var(--dd-hover); filter: none; }
.dd-guide button:focus-visible { outline: 2px solid var(--dd-accent); outline-offset: 2px; }

.dd-guide-note { margin: -.4rem 0 .8rem; color: var(--dd-text-2); line-height: 1.5; }
.dd-section-choices { display: grid; gap: .5rem; }
.dd-section-choices label { display: flex; align-items: center; gap: .6rem; padding: .6rem .8rem; border: 1px solid var(--dd-line); border-radius: 10px; font-weight: 600; cursor: pointer; }
.dd-section-choices input { width: 18px; height: 18px; accent-color: var(--dd-accent); }
.dd-guide-problem { margin: .6rem 0 0; color: var(--dd-neg); font-weight: 600; }

.dd-health-list { margin: 0 0 .8rem; padding-left: 1.15rem; color: var(--dd-text-2); line-height: 1.5; }
.dd-health-list li + li { margin-top: .25rem; }
.dd-guide a.dd-button { display: inline-flex; align-items: center; min-height: 40px; padding: .5rem 1.1rem; border-radius: 10px; background: var(--dd-accent); color: #fff; font-weight: 600; text-decoration: none; }

.dd-brand-accent { color: var(--dd-accent); }

/* PlateStride Plus window (beats the guide's own button style) */
.dd-plus-choices { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin: .4rem 0 .8rem; }
.dd-guide .dd-plus-choice { display: grid; gap: .15rem; min-height: 0; padding: .8rem; border: 1px solid var(--dd-line-strong); border-radius: 12px;
  background: var(--dd-surface); color: var(--dd-text); text-align: left; cursor: pointer; font: inherit; box-shadow: none; }
.dd-guide .dd-plus-choice strong { font-size: 1.05rem; }
.dd-guide .dd-plus-choice span { color: var(--dd-muted); font-size: .85rem; }
.dd-guide .dd-plus-choice.best { border: 2px solid var(--dd-accent); }
.dd-guide .dd-plus-choice:hover { border-color: var(--dd-accent); background: var(--dd-surface); color: var(--dd-text); }
.dd-guide .dd-plus-choice:disabled { opacity: .6; cursor: progress; }

/* Agreements: Terms checkbox (Plus), complete-your-profile dialog */
.dd-guide .dd-check { display: grid; grid-template-columns: auto 1fr; gap: .6rem; align-items: start; margin: 0 0 .8rem; line-height: 1.45; font-size: .95rem; color: var(--dd-text); }
.dd-guide .dd-check input { width: 18px; height: 18px; margin: .15rem 0 0; accent-color: var(--dd-accent); }
.dd-guide .dd-check a { color: var(--dd-accent); }
.dd-profile-birth { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin: 0 0 1rem; }
.dd-profile-birth label { display: grid; gap: .3rem; font-size: .88rem; font-weight: 600; color: var(--dd-text-2); }
.dd-profile-birth select { font: inherit; min-height: 42px; padding: .4rem .6rem; border: 1px solid var(--dd-line-strong); border-radius: 10px; background: var(--dd-surface); color: var(--dd-text); }
.dd-guide-actions form { margin: 0; }

/* Footer on every app page: privacy policy, terms, contact */
.dd-foot { max-width: 72rem; margin: 2.5rem auto 0; padding: 1.2rem 16px 1.6rem; border-top: 1px solid var(--dd-line); text-align: center; font-size: .85rem; color: var(--dd-muted); }
.dd-foot nav { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem 1.2rem; }
.dd-foot a { color: var(--dd-text-2); text-decoration: none; }
.dd-foot a:hover { color: var(--dd-accent); text-decoration: underline; }
.dd-foot p { margin: .5rem 0 0; }

/* Plus badge on Plus-only buttons, for free members */
.dd-free [data-plus]::after { content: "Plus"; margin-left: .45em; padding: .05em .45em; border-radius: 999px; font-size: .7em; font-weight: 700;
  letter-spacing: .02em; vertical-align: .1em; background: var(--dd-accent-soft); color: var(--dd-accent-soft-text); }
/* Phones: every tappable thing at least 44 px tall */
@media (max-width: 640px) {
  button, .dd-button, .kitchen-tabs button, .button-link, select { min-height: 44px; }
  button.quiet { min-height: 44px; }
}
