/* The app shell's styles. Every colour, font, corner and size is a variable. The config
   tool writes the app's design profile into index.html (<style id="app-theme">, after this
   file) as -l (light) and -d (dark) sources; this file picks the right one for the mode.
   The fallbacks below are the original look, so a page without a profile still looks as
   it always did. Parts use the component classes at the bottom (card, btn, input, list, ...)
   and the colour variables, and may add their own part.css. */

:root {
  color-scheme: light dark;
  /* light mode: the profile's -l sources, else the original look */
  --accent: var(--accent-l, #2563eb);
  --on-accent: var(--on-accent-l, #ffffff);
  --bg-light: #f6f7fb;
  --bg-dark: #0f1115;
  --bg: var(--bg-l, var(--bg-light));
  --surface: var(--surface-l, #ffffff);
  --surface-2: var(--surface-2-l, #eef0f5);
  --text: var(--text-l, #15171c);
  --muted: var(--muted-l, #5f6670);
  --line: var(--line-l, #e2e5eb);
  --field-line: var(--field-line-l, var(--line));
  --edge: var(--edge-l, var(--line));
  --btn: var(--btn-l, var(--accent));
  --on-btn: var(--on-btn-l, var(--on-accent));
  --bar-bg: var(--bar-bg-l, var(--accent));
  --bar-ink: var(--bar-ink-l, var(--on-accent));
  --bar-btn: var(--bar-btn-l, color-mix(in srgb, var(--bar-ink) 18%, transparent));
  --tabbar-bg: var(--tabbar-bg-l, var(--surface));
  --support: var(--support-l, var(--accent));
  --support-soft: var(--support-soft-l, var(--surface-2));
  --danger: var(--danger-l, #c62828);
  --on-danger: var(--on-danger-l, #ffffff);
  --ok: var(--ok-l, #2e7d32);
  --shadow: var(--shadow-l, 0 1px 2px rgba(16, 24, 40, .06), 0 6px 20px rgba(16, 24, 40, .06));
  --accent-soft: color-mix(in srgb, var(--accent) var(--soft-pct, 14%), transparent);

  /* shape, type and density (the profile layer overrides any of these) */
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-head: var(--font);
  --font-display: var(--font-head);
  --font-label: var(--font);
  --label-fs: 11px;
  --label-spacing: .12em;
  --fs: 17px;
  --lh: 1.45;
  --head-weight: 700;
  --head-weight-2: 650;
  --head-case: none;
  --head-spacing: -.02em;
  --radius: 14px;
  --radius-btn: 12px;
  --radius-input: 12px;
  --radius-sheet: 20px;
  --icon-radius: 9px;
  --card-pad: 16px;
  --card-border-w: 0px;
  --card-shadow: var(--shadow);
  --btn-weight: 600;
  --btn-case: none;
  --btn-spacing: 0;
  --btn-fs: 16px;
  --btn-border-w: 0px;
  --field-border-w: 1px;
  --appbar-title-fs: 19px;
  --appbar-title-weight: 650;
  --appbar-title-case: none;
  --appbar-title-spacing: -.01em;
  --bar-rule-w: 0px;
  --bar-rule: var(--line);
  --tab-fs: 11.5px;
  --tab-weight: 600;
  --tab-ico-radius: 15px;
  --tab-on-bg: var(--accent-soft);
  --tab-on-ink: var(--accent);
  --tab-ind: transparent;
  --tab-ind-h: 0px;

  --tap: 48px;
  --appbar: 56px;
  --tabbar: 60px;
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --sal: env(safe-area-inset-left, 0px);
  --sar: env(safe-area-inset-right, 0px);
  --gutter: 16px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --accent: var(--accent-d, #2563eb);
    --on-accent: var(--on-accent-d, #ffffff);
    --bg: var(--bg-d, var(--bg-dark));
    --surface: var(--surface-d, #1a1d24);
    --surface-2: var(--surface-2-d, #252934);
    --text: var(--text-d, #eef0f4);
    --muted: var(--muted-d, #9aa3b2);
    --line: var(--line-d, #2b303a);
    --field-line: var(--field-line-d, var(--line));
    --edge: var(--edge-d, var(--line));
    --btn: var(--btn-d, var(--accent));
    --on-btn: var(--on-btn-d, var(--on-accent));
    --bar-bg: var(--bar-bg-d, var(--accent));
    --bar-ink: var(--bar-ink-d, var(--on-accent));
    --bar-btn: var(--bar-btn-d, color-mix(in srgb, var(--bar-ink) 18%, transparent));
    --tabbar-bg: var(--tabbar-bg-d, var(--surface));
    --support: var(--support-d, var(--accent));
    --support-soft: var(--support-soft-d, var(--surface-2));
    --danger: var(--danger-d, #c62828);
    --on-danger: var(--on-danger-d, #ffffff);
    --ok: var(--ok-d, #2e7d32);
    --shadow: var(--shadow-d, 0 1px 2px rgba(0, 0, 0, .3), 0 6px 20px rgba(0, 0, 0, .25));
  }
}
:root[data-theme="dark"] {
  --accent: var(--accent-d, #2563eb);
  --on-accent: var(--on-accent-d, #ffffff);
  --bg: var(--bg-d, var(--bg-dark));
  --surface: var(--surface-d, #1a1d24);
  --surface-2: var(--surface-2-d, #252934);
  --text: var(--text-d, #eef0f4);
  --muted: var(--muted-d, #9aa3b2);
  --line: var(--line-d, #2b303a);
  --field-line: var(--field-line-d, var(--line));
  --edge: var(--edge-d, var(--line));
  --btn: var(--btn-d, var(--accent));
  --on-btn: var(--on-btn-d, var(--on-accent));
  --bar-bg: var(--bar-bg-d, var(--accent));
  --bar-ink: var(--bar-ink-d, var(--on-accent));
  --bar-btn: var(--bar-btn-d, color-mix(in srgb, var(--bar-ink) 18%, transparent));
  --tabbar-bg: var(--tabbar-bg-d, var(--surface));
  --support: var(--support-d, var(--accent));
  --support-soft: var(--support-soft-d, var(--surface-2));
  --danger: var(--danger-d, #c62828);
  --on-danger: var(--on-danger-d, #ffffff);
  --ok: var(--ok-d, #2e7d32);
  --shadow: var(--shadow-d, 0 1px 2px rgba(0, 0, 0, .3), 0 6px 20px rgba(0, 0, 0, .25));
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-size: var(--fs);
  line-height: var(--lh);
  font-family: var(--font);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
  touch-action: manipulation;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { -webkit-tap-highlight-color: transparent; cursor: pointer; }
a { color: var(--accent); }
img { max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
svg.ico { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---- the frame: app bar, screens, tab bar */
#app {
  position: fixed; inset: 0;
  display: flex; flex-direction: column;
  background: var(--bg);
}
.boot {
  flex: 1; display: grid; place-items: center;
}
.boot-icon { width: 72px; height: 72px; border-radius: 18px; animation: boot-pulse 1.2s ease-in-out infinite; }
@keyframes boot-pulse { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }

.appbar {
  flex: none;
  display: flex; align-items: center; gap: 12px;
  min-height: calc(var(--appbar) + var(--sat));
  padding: var(--sat) max(var(--gutter), var(--sar)) 0 max(var(--gutter), var(--sal));
  background: var(--bar-bg);
  color: var(--bar-ink);
  box-shadow: 0 1px 0 rgba(0, 0, 0, .08);
  border-bottom: var(--bar-rule-w) solid var(--bar-rule);
  z-index: 2;
}
.appbar-icon { width: 32px; height: 32px; border-radius: var(--icon-radius); flex: none; }
/* : the logo as the Settings button (bar.logo_menu): the same 32px logo, a full tap target round it */
.appbar-logo-menu { box-sizing: content-box; padding: 8px; margin: -8px; border: 0; background: none; position: relative; cursor: pointer; border-radius: 12px; -webkit-tap-highlight-color: transparent; }
.appbar-logo-menu img { width: 32px; height: 32px; display: block; border-radius: var(--icon-radius); }
.appbar-logo-menu:active { background: var(--bar-btn); }
.appbar-logo-menu:focus-visible { outline: 2px solid var(--accent); outline-offset: 0; }
.appbar-logo-menu .appbar-dot { top: 4px; right: 4px; }
/* The ONE Back control (, C2): it replaces the app icon while there is somewhere to go
   back to, and its label says where (capped, ellipsised, dropped on the narrowest phones). */
.appbar-back {
  display: inline-flex; align-items: center; gap: 2px; flex: none;
  min-width: 44px; min-height: 44px; max-width: 34%;
  margin-left: -8px; padding: 0 10px 0 4px;
  border: 0; border-radius: 999px; background: transparent; color: inherit;
  font-family: var(--font); font-size: 16px; font-weight: 600; letter-spacing: 0; text-transform: none;
}
.appbar-back:active { background: var(--bar-btn); }
.appbar-back svg.ico { width: 26px; height: 26px; stroke-width: 2.4; }
.appbar-back-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.appbar.has-back .appbar-icon { display: none; }
@media (max-width: 340px) { .appbar-back-label { display: none; } .appbar-back { padding-right: 4px; } }
.appbar-title {
  flex: 1; min-width: 0;
  font-size: var(--appbar-title-fs); font-weight: var(--appbar-title-weight); letter-spacing: var(--appbar-title-spacing);
  text-transform: var(--appbar-title-case);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.appbar-actions { display: flex; align-items: center; gap: 6px; flex: none; }
.appbar-btn {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 40px; padding: 0 14px;
  border: 0; border-radius: 999px;
  background: var(--bar-btn);
  color: inherit; font-weight: 600; font-size: 15px;
}
.appbar-btn:active { filter: brightness(.9); }
.appbar-btn.icon-only { width: 40px; padding: 0; justify-content: center; }
/* Every round top-bar button is the same size, whatever part drew it (28 Oct 2026: "the message
   button is weirdly bigger"), and the page name keeps its room: it never shrinks below about eight
   letters while the buttons give way first. */
.appbar-btn.icon-only { width: 40px; height: 40px; min-width: 40px; min-height: 40px; flex: none; position: relative; }
.appbar-btn.icon-only svg { width: 22px; height: 22px; }
.appbar:not(.has-back) .appbar-title { min-width: 7.5em; }
.appbar-dot { position: absolute; top: 6px; right: 6px; width: 9px; height: 9px; border-radius: 50%; background: var(--danger, #c0392b); box-shadow: 0 0 0 2px var(--bar-bg); }
/* the Settings menu */
.menu-list { display: grid; gap: 8px; }
.menu-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 10px 12px; text-align: left;
  border: 1px solid var(--line); border-radius: var(--radius, 12px); background: var(--surface); color: var(--text); font: inherit; cursor: pointer; }
.menu-row:active { filter: brightness(.96); }
.menu-ico { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); flex: none; }
.menu-ico svg { width: 20px; height: 20px; }
.menu-main { flex: 1; min-width: 0; display: grid; gap: 2px; }
.menu-label { font-weight: 600; }
.menu-note { font-size: 13px; color: var(--muted); }
.menu-badge { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--danger, #c0392b); color: #fff; font-size: 12px; font-weight: 700; line-height: 22px; text-align: center; flex: none; }
.menu-chev { color: var(--muted); font-size: 24px; line-height: 1; flex: none; }
.menu-version { margin: 14px 0 0; font-size: 13px; color: var(--muted); text-align: center; }
.menu-sheet .btn.block { margin-top: 14px; }
/* NUK2: bar.profile_menu. The login badge opens the menu; it carries the menu's dot (.has-dot) when an item is
   badged, and "About <app>" opens this sheet (what the About tab showed). */
.appbar-btn.has-dot { position: relative; }
.appbar-btn.has-dot::after { content: ''; position: absolute; top: 4px; right: 4px; width: 9px; height: 9px; border-radius: 50%;
  background: var(--danger, #c0392b); box-shadow: 0 0 0 2px var(--bar-bg); }
.about-hero { text-align: center; padding: 4px 0 12px; }
.about-hero img { border-radius: 20px; box-shadow: var(--shadow); }
.about-hero .h1 { margin: 10px 0 4px; }
.about-hero p { margin: 0 0 12px; }
.about-text p { margin: 0 0 10px; }
.about-links { margin: 4px 0 8px; }
.about-kv { margin-top: 12px; }
/* : About at the foot of the menu (parts.about.settings.in_menu; with bar.logo_menu, the logo menu) */
.menu-about { margin-top: 4px; }
.menu-about .about-intro p { margin: 0 0 10px; }
.menu-about .about-status:empty { display: none; }
.menu-about .about-text p:last-child { margin-bottom: 0; }
/* Phones: app-bar buttons drop their text labels (tagged .appbar-btn-label) and keep the
   icon, so the title never truncates. Never hide every span: the login avatar is a span. */
@media (max-width: 480px) {
  .appbar-btn .appbar-btn-label { display: none; }
  .appbar-btn { min-width: 40px; padding: 0 10px; justify-content: center; }
}

.screens { flex: 1; min-height: 0; position: relative; }
.screen {
  position: absolute; inset: 0;
  overflow-y: auto; overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: var(--gutter) max(var(--gutter), var(--sar)) 28px max(var(--gutter), var(--sal));
}
.screen-inner { max-width: 720px; margin: 0 auto; }
.screen.fill { overflow: hidden; padding: 0; display: flex; flex-direction: column; }
.screen.fill > .screen-inner { max-width: none; margin: 0; flex: 1; min-height: 0; display: flex; flex-direction: column; }
.screen-error { text-align: center; padding: 40px 16px; color: var(--muted); }

.tabbar {
  flex: none;
  display: flex; align-items: stretch;
  min-height: calc(var(--tabbar) + var(--sab));
  padding: 0 max(0px, var(--sar)) var(--sab) max(0px, var(--sal));
  background: var(--tabbar-bg);
  border-top: 1px solid var(--line);
  z-index: 2;
}
.tab {
  position: relative;
  flex: 1 1 0; min-width: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  min-height: var(--tap);
  padding: 6px 4px 4px;
  border: 0; background: none;
  color: var(--muted); font-size: var(--tab-fs); font-weight: var(--tab-weight); letter-spacing: .01em;
  user-select: none; -webkit-user-select: none;
  transition: color .15s;
}
.tab .tab-ico {
  width: 56px; height: 30px; border-radius: var(--tab-ico-radius);
  display: grid; place-items: center;
  transition: background .15s;
  font-size: 20px; line-height: 1;
}
.tab .tab-label { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tab[aria-selected="true"] { color: var(--accent); }
.tab[aria-selected="true"] .tab-ico { background: var(--tab-on-bg); color: var(--tab-on-ink); }
.tab[aria-selected="true"]::before {
  content: ""; position: absolute; top: 0; left: 22%; right: 22%;
  height: var(--tab-ind-h); border-radius: 0 0 3px 3px; background: var(--tab-ind);
}
.tab:active .tab-ico { background: var(--surface-2); }
.tabbar.single { display: none; }

/* ---- top navigation (, app.json bar.top_nav): on a window 900px wide or more the shell moves the tab bar into the top bar
   (between the title and the buttons) and puts the class nav-top on <html>. Without that option none of this applies. The tabs
   become menu links: text only, the current one on a soft pill. Floating buttons and cards that sit above the bottom bar
   (they read --tabbar and --tabbar-h) drop to the screen's edge, because nothing is at the bottom now. */
html.nav-top { --tabbar: 0px; }
html.nav-top .appbar .tabbar {
  flex: 1 1 auto; min-width: 0; align-self: stretch; min-height: 0;
  margin: 0 0 0 12px; padding: 0; gap: 4px; justify-content: flex-start; align-items: center;
  background: transparent; border: 0;
}
html.nav-top .appbar .tab {
  flex: none; flex-direction: row; min-height: 40px; padding: 0 16px; gap: 0;
  border-radius: 999px; color: var(--bar-ink); opacity: .8; font-size: 15px; letter-spacing: 0;
}
html.nav-top .appbar .tab .tab-ico { display: none; }
html.nav-top .appbar .tab:hover { opacity: 1; background: var(--bar-btn); }
html.nav-top .appbar .tab[aria-selected="true"] { opacity: 1; color: var(--bar-ink); background: var(--bar-btn); }
html.nav-top .appbar .tab[aria-selected="true"]::before { display: none; }
html.nav-top .appbar .tab:focus-visible { outline: 2px solid var(--bar-ink); outline-offset: -2px; }
html.nav-top .appbar-title { flex: 0 1 auto; max-width: 34%; }

/* ---- a switch row in the Settings menu (, app.json bar.dark_switch) */
.menu-switch { position: relative; width: 46px; height: 28px; border-radius: 14px; flex: none; background: var(--surface-2); border: 1px solid var(--line); transition: background .15s; }
.menu-switch .menu-knob { position: absolute; top: 2px; left: 2px; width: 22px; height: 22px; border-radius: 50%; background: var(--muted); transition: transform .15s, background .15s; }
.menu-switch.on { background: var(--accent); border-color: var(--accent); }
.menu-switch.on .menu-knob { transform: translateX(18px); background: var(--on-accent); }

/* ---- two screens on one tab (): the switch at the top ("under" tabs) */
.view-switch { display: inline-grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 2px; padding: 3px; min-height: 44px;
  border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); box-sizing: border-box; margin: 0 0 8px; }
.view-switch-btn { min-width: 0; min-height: 36px; padding: 0 14px; border: 0; border-radius: 999px; background: none; color: var(--muted);
  font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.view-switch-btn.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(0, 0, 0, .12); }
.view-switch-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

/* ---- status bits */
.offline-banner {
  position: absolute; left: 0; right: 0; top: 0;
  z-index: 3;
  text-align: center; font-size: 13px; font-weight: 600;
  padding: 6px 12px;
  background: #b45309; color: #fff;
}
/* Banners stack (app.js layoutBanners sets each card's top) and a scrolling screen gets room above its content, so a
   card never hides the screen's heading (NUK1, 4 Nov 2026). A fill screen (a map) keeps them floating over it. */
.screens.has-banner > .screen:not(.fill) { padding-top: calc(var(--banner-h, 0px) + 8px); }
.screens > .install-card, .screens > .push-card { transition: top .15s ease; }
/* The install card: one line over the top of the screens, existing colours only. */
.install-card {
  position: absolute; left: 10px; right: 10px; top: 10px;
  z-index: 3;
  display: flex; align-items: center; gap: 4px;
  padding: 8px 6px 8px 12px;
  background: var(--surface); color: var(--text);
  border-left: 3px solid var(--accent);
  border-radius: 10px;
  box-shadow: var(--shadow);
  font-size: 14px;
}
.install-card-text { flex: 1; min-width: 0; font-weight: 600; }
.install-card-go {
  border: 0; background: transparent; color: var(--accent);
  font-weight: 700; font-size: 14px; padding: 8px 10px; border-radius: 8px; flex: none;
}
.install-card-go:active { background: var(--accent-soft); }
.install-card-x {
  width: 36px; height: 36px; border: 0; border-radius: 50%;
  background: transparent; color: var(--muted);
  display: inline-grid; place-items: center; flex: none;
}
.install-card-x:active { background: var(--surface-2); }
.install-card-x svg.ico { width: 18px; height: 18px; }
.toast-root {
  position: fixed; left: 0; right: 0;
  bottom: calc(var(--tabbar) + var(--sab) + 12px);
  display: flex; justify-content: center;
  pointer-events: none; z-index: 20;
}
.toast {
  max-width: min(92vw, 420px);
  padding: 12px 18px; border-radius: 12px;
  background: #23262e; color: #fff; font-size: 15px; font-weight: 500;
  box-shadow: var(--shadow);
  opacity: 0; transform: translateY(8px);
  transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: none; }
.toast.error { background: var(--danger); color: var(--on-danger); }
.toast.ok { background: var(--ok); }

/* ---- bottom sheet: the pop-up standard (, C1). One sheet for every pop-up: a grip to
   swipe it down, an X that never scrolls away, a body that is the ONLY scroller (capped at
   --sheet-max), and a footer pinned outside the scroller that carries the home-bar inset.
   DOM (app.js sheet()): .sheet-backdrop (modal only), then .sheet > .sheet-grip > .sheet-handle,
   .sheet-x, .sheet-head > .sheet-title (with a title), .sheet-body, .sheet-foot[hidden]
   (> .sheet-ask while the guard asks). States: show, dragging, no-foot, modeless. */
:root { --sheet-max: 88dvh; }
.sheet-backdrop {
  position: fixed; inset: 0; z-index: 30;
  background: rgba(0, 0, 0, .35);
  opacity: 0; transition: opacity .2s;
}
.sheet-backdrop.show { opacity: 1; }
.sheet-backdrop.dragging { transition: none; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 31;
  max-width: 560px; margin: 0 auto;
  display: flex; flex-direction: column;
  max-height: 88vh;
  background: var(--surface); color: var(--text);
  border-radius: var(--radius-sheet) var(--radius-sheet) 0 0;
  padding: 0;
  box-shadow: 0 -8px 30px rgba(0, 0, 0, .18);
  transform: translateY(100%); transition: transform .25s cubic-bezier(.2, .8, .2, 1);
}
/* var() with dvh must not replace the vh line where dvh is unknown (an invalid var() would
   leave NO max-height), hence the @supports */
@supports (height: 1dvh) { .sheet { max-height: var(--sheet-max); } }
.sheet.show { transform: none; }
.sheet.dragging { transition: none; }
/* A modeless sheet (the map's pin card) lies UNDER every modal sheet's backdrop (30), so a modal
   opened while it is up dims it and blocks it; under toasts (20), so a message is never hidden
   behind it; and under a part's full-screen page (the owner page, 15). Still over the tab bar,
   the app bar and the floating buttons (2 to 5). */
.sheet.modeless { z-index: 14; box-shadow: 0 -6px 24px rgba(0, 0, 0, .24); }
.sheet-grip {
  flex: none; height: 22px; padding-top: 8px;
  display: flex; justify-content: center;
  touch-action: none; user-select: none; -webkit-user-select: none;
}
.sheet-handle {
  width: 36px; height: 5px; border-radius: 3px; margin: 0;
  background: color-mix(in srgb, var(--muted) 45%, transparent);
}
.sheet-x {
  position: absolute; top: 2px; right: max(4px, var(--sar)); z-index: 2;
  width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%;
  background: var(--surface-2); color: var(--text);
  display: grid; place-items: center;
}
.sheet-x:active { filter: brightness(.92); }
.sheet-x svg.ico { width: 20px; height: 20px; }
.sheet-head { flex: none; padding: 2px 56px 8px max(var(--gutter), var(--sal)); touch-action: none; }
.sheet .sheet-title { margin: 0; }
.sheet-body {
  flex: 1 1 auto; min-height: 0;
  overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: none;
  padding: 4px max(var(--gutter), var(--sar)) var(--gutter) max(var(--gutter), var(--sal));
}
/* The body-at-top rule: while the body is scrolled to its top, a downward finger drag is the
   sheet's (swipe to close), never a browser pan. pan-down = only scrolls that START by moving
   the content down (a finger moving UP) are the browser's; a browser that ignores the
   directional value keeps the default and app.js cancels the first downward touchmove. */
.sheet-body.at-top { touch-action: pan-down pinch-zoom; }
.sheet.no-foot .sheet-body { padding-bottom: calc(var(--gutter) + var(--sab)); }
/* a legacy sheet's first heading keeps clear of the X */
.sheet-body > h2:first-child, .sheet-body > form:first-child > h2:first-child { margin-right: 44px; }
.sheet-foot {
  flex: none; display: flex; align-items: center; gap: 10px;
  padding: 10px max(var(--gutter), var(--sar)) calc(10px + var(--sab)) max(var(--gutter), var(--sal));
  background: var(--surface); border-top: 1px solid var(--line); touch-action: none;
}
.sheet-foot > .btn { flex: 1; }
:root .sheet-foot > * { margin-top: 0; margin-bottom: 0; }   /* outranks a part's *-actions margin */
.sheet-ask { display: flex; flex-wrap: wrap; gap: 10px; width: 100%; }
.sheet-ask-text { flex: 1 1 100%; font-weight: 600; }
.sheet-ask .btn { flex: 1; }
/* The map's pin card on a phone is a modeless sheet that stops at the tab bar, so the tabs
   stay tappable under it; it needs no home-bar inset of its own (the tab bar carries it).
   --tabbar-h is the bar's measured height (app.js buildFrame), else the nominal one.
   With no tab bar on show (a one-screen app) it sits on the screen's edge as usual. */
.sheet.modeless.mp-card { bottom: calc(var(--tabbar) + var(--sab)); bottom: var(--tabbar-h, calc(var(--tabbar) + var(--sab))); }
.sheet.modeless.mp-card.no-foot .sheet-body { padding-bottom: var(--gutter); }
.sheet.modeless.mp-card .sheet-foot { padding-bottom: 10px; }
.tabbar-off .sheet.modeless.mp-card { bottom: 0; }
.tabbar-off .sheet.modeless.mp-card.no-foot .sheet-body { padding-bottom: calc(var(--gutter) + var(--sab)); }
.tabbar-off .sheet.modeless.mp-card .sheet-foot { padding-bottom: calc(10px + var(--sab)); }
.sheet h2 { margin: 0 0 6px; font-size: 19px; font-family: var(--font-head); font-weight: var(--head-weight-2); }
.sheet p { margin: 0 0 10px; color: var(--muted); font-size: 15px; }
.sheet .steps { margin: 10px 0 14px; padding: 0; list-style: none; display: grid; gap: 10px; }
.sheet .steps li { display: flex; align-items: center; gap: 12px; font-size: 16px; }
.sheet .steps .step-n {
  width: 28px; height: 28px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  background: var(--btn); color: var(--on-btn); font-weight: 700; font-size: 14px;
}
.sheet .steps svg.ico { color: var(--accent); }
.sheet .sheet-actions { display: flex; gap: 10px; }
.sheet .sheet-actions .btn { flex: 1; }

/* ---- book layout (, B6): the place plate (App.plate, SHELL.md "Book layout") and the
   eyebrow label. The .pd-* classes are drawn only when App.layout is "book" (the Folio
   profile); .eyebrow any part may use. Variables only, so every profile carries them; the
   grip, the X and the credit sit on a photo, so they use fixed white and ink. */
.eyebrow {
  font-family: var(--font-label); font-size: var(--label-fs); font-weight: 500; line-height: 1.35;
  letter-spacing: var(--label-spacing); text-transform: uppercase; color: var(--muted);
}
/* the plate in a sheet: the photo runs to the sheet's top and sides; the grip and the X float on it */
.sheet.pd-sheet > .sheet-grip { position: absolute; top: 8px; left: 0; right: 0; z-index: 2; height: 22px; padding-top: 0; }
.sheet.pd-sheet .sheet-handle { background: rgba(255, 255, 255, .85); box-shadow: 0 0 0 .5px rgba(0, 0, 0, .2); }
.sheet.pd-sheet .sheet-x { background: rgba(255, 255, 255, .85); color: #15171c; }
.sheet.pd-sheet .sheet-body { padding-top: 0; }
.sheet.pd-sheet .pd-hero {
  margin-left: calc(-1 * max(var(--gutter), var(--sal)));
  margin-right: calc(-1 * max(var(--gutter), var(--sar)));
}
/* no photo: the plate starts below the X; the grip and X take the sheet's own colours */
.pd.pd-no-photo, .pd.pd-photo-empty { padding-top: 48px; }
.sheet.pd-sheet:has(.pd-no-photo) .sheet-handle, .sheet.pd-sheet:has(.pd-photo-empty) .sheet-handle {
  background: color-mix(in srgb, var(--muted) 45%, transparent); box-shadow: none;
}
.sheet.pd-sheet:has(.pd-no-photo) .sheet-x, .sheet.pd-sheet:has(.pd-photo-empty) .sheet-x { background: var(--surface-2); color: var(--text); }
/* the photo: a 3:2 frame; a URL photo shows its thumb, then the full photo; a Node photo (the
   capture cover or its drawn card) is the frame's only child and fills it */
.pd-hero {
  position: relative; margin: 0 calc(-1 * var(--gutter)) 20px; aspect-ratio: 3 / 2; max-height: 46vh;
  overflow: hidden; background: var(--surface-2); border-radius: var(--radius-sheet) var(--radius-sheet) 0 0;
}
.pd-hero > * { display: block; width: 100%; height: 100%; margin: 0; border-radius: 0; }
.pd .pd-hero > :not(.pd-credit) { display: block; width: 100%; height: 100%; margin: 0; border-radius: 0; }
.pd-hero .cap-cover-img { width: 100%; height: 100%; object-fit: cover; }
.pd-hero-img { object-fit: cover; transition: opacity .25s; cursor: pointer; }
.pd-hero[data-state="loading"] .pd-hero-img { opacity: 0; }
.pd-hero > .pd-credit {
  position: absolute; right: 10px; bottom: 8px; display: block; width: auto; height: auto; max-width: calc(100% - 20px);
  margin: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; pointer-events: none;
  font-family: var(--font-label); font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase;
  color: #ffffff; text-shadow: 0 1px 3px rgba(0, 0, 0, .7);
}
/* the words: eyebrow, title, gilt rule, byline with stars, the story first */
.pd-eyebrow { margin: 0 0 8px; }
.sheet .pd h2.pd-title, .pd-title {
  font-family: var(--font-display); font-weight: var(--head-weight); font-size: 28px; line-height: 1.12;
  letter-spacing: var(--head-spacing); margin: 0; color: var(--text); overflow-wrap: anywhere;
}
.pd-rule { width: 32px; height: 1px; background: var(--support); margin: 14px 0 12px; }
.pd-byline { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.pd-stars, .pd-score { font-family: var(--font); font-size: 13px; letter-spacing: .08em; text-transform: none; color: var(--text); white-space: nowrap; }
.pd-stars-off { color: var(--muted); }
.pd p.pd-story { margin: 18px 0 0; font-size: 18px; line-height: 1.55; color: var(--text); white-space: pre-line; overflow-wrap: anywhere; }
/* other reviews of the same place, then the small facts */
.pd-reviews { margin: 26px 0 0; }
.pd-reviews-label { margin: 0 0 2px; }
.pd-review { padding: 14px 0; border-top: 1px solid var(--line); }
.pd-review[role="button"] { cursor: pointer; }
.pd-review[role="button"]:active { background: var(--surface-2); }
.pd-review-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
.pd-who { font-family: var(--font-display); font-weight: var(--head-weight); font-size: 19px; line-height: 1.2; }
.pd-date { margin-left: auto; }
.pd p.pd-review-text { margin: 6px 0 0; font-size: 16px; line-height: 1.5; color: var(--text); white-space: pre-line; overflow-wrap: anywhere; }
.pd-facts {
  display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 24px 0 0; padding-top: 16px;
  border-top: 1px solid var(--line); font-size: 15px;
}
.pd-facts dt {
  margin: 0; padding-top: 3px; font-family: var(--font-label); font-size: 10.5px; font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
}
.pd-facts dd { margin: 0; overflow-wrap: anywhere; }
.pd-section { margin-top: 18px; }
.pd-actions { display: flex; gap: 10px; margin-top: 24px; }
.pd-actions .btn { flex: 1; }

/* ---- components for parts */
/* About: Photo credits (, B7; spec C11): the picture beside a column of place, author and licence, Source */
.list-item.ab-credit { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 2px 12px; align-items: center; }
.ab-credit-thumb { grid-row: 1 / span 3; width: 48px; height: 48px; flex: 0 0 48px; object-fit: cover; border-radius: 8px; background: var(--surface-2); }
.ab-credit > strong, .ab-credit > .muted, .ab-credit > a { grid-column: 2; min-width: 0; }
.ab-credit > a { justify-self: start; display: inline-flex; align-items: center; min-height: 40px; color: var(--accent); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.ab-credits-open .grow { flex: 1; min-width: 0; }
.h1 {
  font-family: var(--font-head); font-size: 26px; font-weight: var(--head-weight);
  letter-spacing: var(--head-spacing); text-transform: var(--head-case); margin: 4px 0 12px;
}
.h2 { font-family: var(--font-head); font-size: 18px; font-weight: var(--head-weight-2); margin: 18px 0 8px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.card {
  background: var(--surface); border-radius: var(--radius);
  border: var(--card-border-w) solid var(--edge);
  box-shadow: var(--card-shadow); padding: var(--card-pad); margin: 0 0 12px;
}
.card.plain { box-shadow: none; border: max(1px, var(--card-border-w)) solid var(--line); }
.row { display: flex; align-items: center; gap: 10px; }
.row > .grow { flex: 1; min-width: 0; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--tap); padding: 0 18px;
  border: var(--btn-border-w) solid var(--edge); border-radius: var(--radius-btn);
  background: var(--btn); color: var(--on-btn);
  font-weight: var(--btn-weight); font-size: var(--btn-fs); text-decoration: none;
  text-transform: var(--btn-case); letter-spacing: var(--btn-spacing);
  transition: filter .1s, transform .1s;
}
.btn:active { filter: brightness(.92); transform: scale(.985); }
.btn:disabled { opacity: .5; }
.btn.secondary { background: var(--support-soft); color: var(--text); }
.btn.ghost { background: transparent; color: var(--accent); border-color: transparent; }
.btn.danger { background: var(--danger); color: var(--on-danger); }
.btn.block { display: flex; width: 100%; }
.btn.small { min-height: 40px; padding: 0 14px; font-size: 15px; }
.icon-btn {
  width: var(--tap); height: var(--tap); border: 0; border-radius: 50%;
  background: transparent; color: var(--muted);
  display: inline-grid; place-items: center; flex: none;
}
.icon-btn:active { background: var(--surface-2); }
.input, .textarea, .select {
  width: 100%; min-height: var(--tap);
  padding: 0 14px;
  border: var(--field-border-w) solid var(--field-line); border-radius: var(--radius-input);
  background: var(--surface); color: var(--text);
  outline: none;
}
.textarea { padding: 12px 14px; min-height: 96px; resize: vertical; }
/* iPhone Safari zooms the page when a field under 16px is focused: never let a field drop below 16px there. */
@supports (-webkit-touch-callout: none) { input, select, textarea, .input, .textarea, .select { font-size: max(16px, 1em); } }
.input:focus, .textarea:focus, .select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.list { margin: 0; padding: 0; list-style: none; }
.list-item {
  display: flex; align-items: center; gap: 12px;
  min-height: 56px; padding: 10px 0;
  border-top: 1px solid var(--line);
  overflow-wrap: anywhere;
}
.list-item:first-child { border-top: 0; }
.list-item .grow { flex: 1; min-width: 0; }
.empty { text-align: center; color: var(--muted); padding: 36px 16px; }
.empty svg.ico { width: 40px; height: 40px; stroke-width: 1.5; margin-bottom: 8px; opacity: .6; }
.badge {
  display: inline-block; padding: 2px 9px; border-radius: 999px;
  font-size: 12px; font-weight: 700; letter-spacing: .02em;
  background: var(--accent-soft); color: var(--accent);
}
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 15px; }
.kv dt { color: var(--muted); margin: 0; }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.spinner {
  width: 22px; height: 22px; border-radius: 50%;
  border: 3px solid var(--line); border-top-color: var(--accent);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- the profile carried into the parts. Their stylesheets load after this one, so each
   rule is prefixed with :root to outrank them. Headings take the profile's heading face, and
   white text on the warning colour becomes the colour's own readable ink (in dark mode the
   warning colour is lightened so it reads as text, and white on it would not). */
:root .graph-title, :root .tbl-title, :root .fb-head, :root .qr-title, :root .mp-confirm-title, :root .mp-popup-title {
  font-family: var(--font-head);
}
:root .tbl-badge.warn, :root .fb-mic.on, :root .cap-rec { color: var(--on-danger); }
:root .mp-cluster-inner { color: var(--on-accent); }
:root .tbl-fab { border: var(--btn-border-w) solid var(--edge); }
:root .tbl-card, :root .tbl-table-wrap { border: var(--card-border-w) solid var(--edge); box-shadow: var(--card-shadow); }

/* ---- releases (): the installed app's update screen, and What's new in Settings. The screen covers everything
   (over sheets 30-31 and toasts 20; the rest of the page is inert under it), keeps clear of the notch and the home bar,
   and reads as one of the app's own sheets: the app's surface, type, corners and button. */
.rel-locked, .rel-locked body { overflow: hidden; }
.rel-locked .toast-root { z-index: 20001; bottom: calc(var(--sab) + 96px); }
.rel-screen {
  position: fixed; inset: 0; z-index: 20000;     /* NUK5: above the fingerprint lock (10000): Update is the only way on */
  display: flex; justify-content: center;
  background: var(--bg); color: var(--text);
  overscroll-behavior: none; touch-action: pan-y;
}
.rel-panel {
  width: 100%; max-width: 560px; height: 100%;
  display: flex; flex-direction: column;
  background: var(--surface);
}
.rel-scroll {
  flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
  padding: calc(var(--sat) + 28px) max(var(--gutter), var(--sar)) 16px max(var(--gutter), var(--sal));
}
.rel-head { text-align: center; margin-bottom: 8px; }
.rel-icon { border-radius: 16px; box-shadow: var(--shadow); }
.rel-title {
  font-family: var(--font-head); font-size: 28px; font-weight: var(--head-weight);
  letter-spacing: var(--head-spacing); text-transform: var(--head-case); margin: 14px 0 2px;
}
.rel-sub { margin: 0 0 6px; color: var(--muted); }
.rel-group { margin: 18px 0 0; }
.rel-group-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  border-bottom: 1px solid var(--line); padding-bottom: 6px; margin-bottom: 8px; }
.rel-num { margin: 0; font-family: var(--font-head); font-size: 18px; font-weight: var(--head-weight); }
.rel-date { font-size: 13px; color: var(--muted); }
.rel-lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.rel-line { display: flex; align-items: flex-start; gap: 10px; line-height: 1.35; }
.rel-mark {
  flex: none; width: 24px; height: 24px; margin-top: -1px; border-radius: 50%;
  display: inline-grid; place-items: center; font-weight: 700; font-size: 17px; line-height: 1;
}
.rel-line.plus .rel-mark { background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); }
.rel-line.minus .rel-mark { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); }
.rel-foot {
  flex: none; display: grid; gap: 8px;
  padding: 12px max(var(--gutter), var(--sar)) calc(14px + var(--sab)) max(var(--gutter), var(--sal));
  border-top: 1px solid var(--line); background: var(--surface);
}
.rel-foot .btn { width: 100%; }
.rel-note { margin: 0; font-size: 14px; color: var(--muted); text-align: center; }
.rel-note:empty { display: none; }
.msg-box { text-align: center; }
.msg-link {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 12px;
  border: 0; background: transparent; color: var(--accent-text, var(--accent)); font: inherit; font-size: 15px; font-weight: 600; cursor: pointer;
}
.msg-form { display: grid; gap: 8px; text-align: left; }
.msg-text { width: 100%; min-height: 84px; font-size: 16px; resize: vertical; }
.msg-status { margin: 0; font-size: 14px; color: var(--muted); text-align: center; }
.msg-status:empty { display: none; }
.whatsnew-sheet .rel-group:first-child { margin-top: 4px; }


/* ---- the initial menu, Refresh and the pull-down (Natevatainment v2; bar.initial_menu, bar.refresh, App.pullToRefresh) */
.appbar-btn.appbar-initial { font-weight: 800; font-size: 18px; line-height: 1; letter-spacing: 0; }
.appbar-initial-letter { display: block; }
.appbar-btn.appbar-initial.is-admin { box-shadow: inset 0 0 0 2px var(--bar-ink); }
.appbar-btn.spinning svg { animation: spin .8s linear infinite; }
.ptr { position: fixed; left: 50%; z-index: 6; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface); color: var(--accent); box-shadow: var(--shadow); opacity: 0; pointer-events: none;
  transform: translateX(-50%); transition: opacity .15s; }
.ptr:not(.show) { visibility: hidden; }
.ptr svg.ico { width: 22px; height: 22px; }
.ptr.ready { color: var(--btn, var(--accent)); }
.ptr.spin svg { animation: spin .8s linear infinite; }
.menu-block { border: 1px solid var(--line); border-radius: var(--radius, 12px); background: var(--surface); padding: 12px; }
.menu-block-title { font-weight: 600; margin: 0 0 8px; }
.signout-sheet .sheet-foot .btn { flex: 1; }
/* in the initial-menu frame a tab label that does not fit on one line takes two, never cut short */
html.initial-menu .tab { justify-content: flex-start; }   /* the icons stay in one line when a label takes two */
html.initial-menu .tab .tab-label { white-space: normal; text-align: center; line-height: 1.12; overflow-wrap: break-word;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
/* ==== Layouts and type (, 29 Nov 2026, board task "Design variety", step 4; SHELL.md "Layouts and type").
   Every rule here waits for <html data-layout="feed|dashboard|editorial|list|map"> (app.json theme.layout) or
   <html data-type="..."> (theme.type), so an app with neither looks exactly as it did. The colours stay the design
   profile's; a pattern changes the frame: the top bar, where the tabs sit (--nav-place, read by app.js: top, side or
   float; unset = the bottom), the cards, the spacing, the corners, the empty screens and the sign-in screen.
   Fonts: the shell serves its own files from /fonts/ (Roboto, Roboto Condensed and Roboto Mono under Apache 2.0,
   Bricolage Grotesque under the OFL; licences beside them). Each is declared under a "Hatch ..." name so a phone's own
   Roboto is never replaced, and a browser fetches a file only when a pairing uses it. Nothing comes from a CDN. */

@font-face { font-family: "Hatch Roboto"; src: url("/fonts/Roboto-Regular.ttf") format("truetype"); font-weight: 100 449; font-style: normal; font-display: swap; }
@font-face { font-family: "Hatch Roboto"; src: url("/fonts/Roboto-Medium.ttf") format("truetype"); font-weight: 450 599; font-style: normal; font-display: swap; }
@font-face { font-family: "Hatch Roboto"; src: url("/fonts/Roboto-Bold.ttf") format("truetype"); font-weight: 600 1000; font-style: normal; font-display: swap; }
@font-face { font-family: "Hatch Roboto Condensed"; src: url("/fonts/RobotoCondensed-Bold.ttf") format("truetype"); font-weight: 100 1000; font-style: normal; font-display: swap; }
@font-face { font-family: "Hatch Roboto Mono"; src: url("/fonts/RobotoMono-Regular.ttf") format("truetype"); font-weight: 100 449; font-style: normal; font-display: swap; }
@font-face { font-family: "Hatch Roboto Mono"; src: url("/fonts/RobotoMono-Medium.ttf") format("truetype"); font-weight: 450 1000; font-style: normal; font-display: swap; }
@font-face { font-family: "Hatch Bricolage"; src: url("/fonts/BricolageGrotesque-Variable.ttf") format("truetype"); font-weight: 200 800; font-stretch: 75% 100%; font-style: normal; font-display: swap; }
@font-face { font-family: "Hatch Libre Baskerville"; src: url("/fonts/LibreBaskerville-Variable.ttf") format("truetype"); font-weight: 400 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Hatch Source Sans 3"; src: url("/fonts/SourceSans3-Variable.ttf") format("truetype"); font-weight: 200 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Hatch Nunito"; src: url("/fonts/Nunito-Variable.ttf") format("truetype"); font-weight: 200 1000; font-style: normal; font-display: swap; }

/* ---- the five type pairings (heading face / reading face) */
:root[data-type] {
  --sys-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
/* grotesk: Bricolage Grotesque over Roboto. Modern and friendly: makers, community, food, events */
:root[data-type="grotesk"] {
  --font: "Hatch Roboto", var(--sys-sans); --font-head: "Hatch Bricolage", var(--sys-sans); --font-display: var(--font-head);
  --font-label: "Hatch Roboto", var(--sys-sans);
  --head-weight: 760; --head-weight-2: 680; --head-spacing: -.025em; --head-case: none;
  --appbar-title-weight: 760; --appbar-title-spacing: -.02em; --appbar-title-case: none;
}
/* condensed: Roboto Condensed capitals over Roboto. Loud and compact: sport, news, scores, dashboards */
:root[data-type="condensed"] {
  --font: "Hatch Roboto", var(--sys-sans); --font-head: "Hatch Roboto Condensed", "Roboto Condensed", "Arial Narrow", var(--sys-sans);
  --font-display: var(--font-head); --font-label: var(--font-head);
  --head-weight: 700; --head-weight-2: 700; --head-spacing: .01em; --head-case: uppercase;
  --appbar-title-weight: 700; --appbar-title-spacing: .03em; --appbar-title-case: uppercase;
  --label-spacing: .08em;
}
/* ledger: Roboto Mono over Roboto, every figure the same width. Money, prices, counts, logs */
:root[data-type="ledger"] {
  --font: "Hatch Roboto", var(--sys-sans); --font-head: "Hatch Roboto Mono", ui-monospace, "SF Mono", Consolas, monospace;
  --font-display: var(--font-head); --font-label: var(--font-head);
  --head-weight: 500; --head-weight-2: 500; --head-spacing: -.02em; --head-case: none;
  --appbar-title-weight: 500; --appbar-title-spacing: -.01em; --appbar-title-case: none;
  --label-spacing: .06em;
}
:root[data-type="ledger"] body { font-variant-numeric: tabular-nums lining-nums; }
/* formal: Libre Baskerville over Source Sans 3 (served since , 29 Nov 2026; before that the phone's own Baskerville, Georgia or Noto Serif until those two
   files are added to /fonts/). Law, heritage, reports, anything that should read like a printed page */
:root[data-type="formal"] {
  --font: "Hatch Source Sans 3", "Source Sans 3", "Source Sans Pro", var(--sys-sans);
  --font-head: "Hatch Libre Baskerville", "Libre Baskerville", Baskerville, "Baskerville Old Face", "Iowan Old Style", Georgia, "Noto Serif", serif;
  --font-display: var(--font-head); --font-label: var(--font);
  --head-weight: 700; --head-weight-2: 700; --head-spacing: 0; --head-case: none;
  --appbar-title-weight: 700; --appbar-title-spacing: 0; --appbar-title-case: none;
}
/* rounded: Nunito throughout (Nunito served since , 29 Nov 2026). Families, kids, clubs */
:root[data-type="rounded"] {
  --font: "Hatch Nunito", "Nunito", ui-rounded, var(--sys-sans);
  --font-head: "Hatch Nunito", "Nunito", ui-rounded, "SF Pro Rounded", "Arial Rounded MT Bold", "Varela Round", var(--sys-sans);
  --font-display: var(--font-head); --font-label: var(--font);
  --head-weight: 800; --head-weight-2: 800; --head-spacing: 0; --head-case: none;
  --appbar-title-weight: 800; --appbar-title-spacing: 0; --appbar-title-case: none;
}
/* with a pairing the top bar's title and the tab labels take the heading face too */
:root[data-type] .appbar-title { font-family: var(--font-head); }
:root[data-type] .tab { font-family: var(--font-label); }

/* ---- what every pattern shares: the designed empty screen (app.js dressEmpty / App.emptyState) */
.empty.es {
  text-align: left; color: var(--text); padding: 22px 20px; margin: 6px 0 14px;
  background: var(--surface); border: 1.5px dashed var(--edge); border-radius: var(--radius);
}
.empty.es > svg.ico { width: 30px; height: 30px; margin: 0 0 6px; opacity: 1; color: var(--accent); stroke-width: 1.8; }
.es-kicker { margin: 0 0 6px; }
.es-title { font-family: var(--font-head); font-size: 22px; font-weight: var(--head-weight); letter-spacing: var(--head-spacing);
  text-transform: var(--head-case); line-height: 1.2; color: var(--text); }
.es-text { margin: 8px 0 0; color: var(--muted); }
.es-sample { margin: 16px 0 16px; padding: 12px 14px; background: var(--bg); border: 1px solid var(--line);
  border-radius: calc(var(--radius) * .6); }
.es-sample-label { margin: 0 0 4px; }
.es-sample-text { color: var(--muted); font-style: italic; }
.es-ghost { display: grid; gap: 8px; padding: 4px 0 2px; }
.es-bar { display: block; height: 10px; width: 78%; border-radius: 5px; background: var(--surface-2); }
.es-bar.short { width: 46%; }
.es-action { width: 100%; }
/* the one line about the app over the sign-in screen (app.js showLocked) */
.lock-kicker { max-width: 440px; margin: 0 auto; }

/* ---- feed: posts first. Compact centred bar, icon-only tabs, edge-to-edge cards and pictures, pill buttons */
:root[data-layout="feed"] {
  --appbar: 50px; --gutter: 14px; --tabbar: 54px;
  --radius: 0px; --radius-btn: 999px; --radius-input: 999px; --radius-sheet: 22px; --icon-radius: 50%;
  --card-pad: 14px 16px; --card-shadow: none; --card-border-w: 0px;
  --appbar-title-fs: 21px; --appbar-title-weight: 800;
}
:root[data-layout="feed"] .appbar { box-shadow: none; border-bottom: 1px solid color-mix(in srgb, var(--bar-ink) 14%, transparent); }
:root[data-layout="feed"] .appbar:not(.has-back) .appbar-icon { display: none; }
:root[data-layout="feed"] .appbar-title { text-align: left; font-family: var(--font-display); }
:root[data-layout="feed"] .appbar-btn { background: transparent; }
:root[data-layout="feed"] .tab .tab-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:root[data-layout="feed"] .tab .tab-ico { width: 48px; height: 34px; background: transparent; }
:root[data-layout="feed"] .tab .tab-ico svg.ico { width: 27px; height: 27px; }
:root[data-layout="feed"] .tab[aria-selected="true"] .tab-ico { background: transparent; color: var(--text); }
:root[data-layout="feed"] .tab[aria-selected="true"] .tab-ico svg.ico { stroke-width: 2.6; }
:root[data-layout="feed"] .tab[aria-selected="true"]::before { top: auto; bottom: 5px; left: calc(50% - 3px); right: calc(50% - 3px); height: 6px; border-radius: 50%; background: var(--accent); }
:root[data-layout="feed"] .card, :root[data-layout="feed"] .tbl-card {
  margin-left: calc(-1 * var(--gutter)); margin-right: calc(-1 * var(--gutter)); border-radius: 0; box-shadow: none; border: 0;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
:root[data-layout="feed"] .tbl-list { gap: 8px; }
:root[data-layout="feed"] .tbl-card { padding: 16px 18px; }
:root[data-layout="feed"] .tbl-card .tbl-title { font-family: var(--font-display); font-size: 21px; }
:root[data-layout="feed"] .card > img:first-child, :root[data-layout="feed"] .tbl-card.has-thumb img {
  display: block; max-width: none; border-radius: 0; object-fit: cover;
}
:root[data-layout="feed"] .card > img:first-child { width: calc(100% + 32px); margin: -14px -16px 12px; aspect-ratio: 4 / 3; height: auto; }
:root[data-layout="feed"] .h1 { font-family: var(--font-display); font-size: 30px; line-height: 1.1; }
:root[data-layout="feed"] .empty.es { text-align: center; border-style: solid; border-width: 1px 0; border-radius: 0;
  margin-left: calc(-1 * var(--gutter)); margin-right: calc(-1 * var(--gutter)); padding: 34px 24px; }
:root[data-layout="feed"] .empty.es > svg.ico { width: 44px; height: 44px; }
:root[data-layout="feed"] .es-title { font-size: 26px; }
/* sign-in: the whole screen in the app's colour, the form on a card */
:root[data-layout="feed"] .auth-lock { background: linear-gradient(165deg, var(--accent), color-mix(in srgb, var(--accent) 55%, var(--support))); color: var(--on-accent); }
:root[data-layout="feed"] .auth-lock .lock-kicker { color: color-mix(in srgb, var(--on-accent) 80%, transparent); text-align: center; padding-top: 18px; }
:root[data-layout="feed"] .auth-lock .lg-locked { padding-top: 18px; }
:root[data-layout="feed"] .auth-lock .lg-icon { width: 104px; height: 104px; border-radius: 50%; box-shadow: 0 0 0 4px color-mix(in srgb, var(--on-accent) 70%, transparent), 0 12px 30px rgba(0, 0, 0, .25); }
:root[data-layout="feed"] .auth-lock .lg-title { color: var(--on-accent); font-family: var(--font-display); font-size: 36px; }
:root[data-layout="feed"] .auth-lock .lg-lead { color: color-mix(in srgb, var(--on-accent) 88%, transparent); }
:root[data-layout="feed"] .auth-lock .lg-card { border-radius: 24px; margin-left: 0; margin-right: 0; border: 0; box-shadow: 0 18px 40px rgba(0, 0, 0, .22); color: var(--text); padding: 20px; }

/* ---- dashboard: a large title on the page colour, raised tiles, and a floating tab bar (a side rail when wide) */
:root[data-layout="dashboard"] {
  --nav-place: float; --tabbar: 84px;
  --bar-bg: var(--bg); --bar-ink: var(--text); --bar-btn: var(--surface); --bar-rule-w: 0px;
  --gutter: 18px; --radius: 22px; --radius-btn: 14px; --radius-input: 14px; --radius-sheet: 26px; --icon-radius: 10px;
  --card-pad: 20px; --card-border-w: 0px;
  --card-shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 12px 32px rgba(16, 24, 40, .10);
}
:root[data-layout="dashboard"] .appbar { flex-wrap: wrap; row-gap: 0; padding-bottom: 4px; box-shadow: none; }
:root[data-layout="dashboard"] .appbar-actions { margin-left: auto; }
:root[data-layout="dashboard"] .appbar-btn { box-shadow: 0 1px 2px rgba(16, 24, 40, .08), 0 4px 12px rgba(16, 24, 40, .08); }
:root[data-layout="dashboard"] .appbar-title { order: 3; flex: 1 0 100%; min-width: 0; padding: 2px 0 6px;
  font-family: var(--font-display); font-size: 34px; font-weight: var(--head-weight); line-height: 1.15; letter-spacing: var(--head-spacing); }
:root[data-layout="dashboard"] .appbar.has-back .appbar-title { font-size: 26px; }
:root[data-layout="dashboard"] .card, :root[data-layout="dashboard"] .tbl-card { border-radius: var(--radius); box-shadow: var(--card-shadow); border: 0; }
:root[data-layout="dashboard"] .tbl-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
:root[data-layout="dashboard"] .tbl-card { flex-direction: column; align-items: flex-start; min-height: 128px; padding: 16px; }
:root[data-layout="dashboard"] .tbl-card .tbl-title { font-family: var(--font-display); font-size: 20px; }
:root[data-layout="dashboard"] .h1 { font-family: var(--font-display); font-size: 30px; }
:root[data-layout="dashboard"] .empty.es { border: 0; box-shadow: var(--card-shadow); background: linear-gradient(160deg, var(--surface), color-mix(in srgb, var(--accent) 7%, var(--surface))); }
:root[data-layout="dashboard"] .es-title { font-size: 26px; }
:root[data-layout="dashboard"] .es-action { width: auto; }
/* sign-in: left aligned, a big title, the form on a raised tile */
/* : the sign-in draws the name big, so under any layout the top bar's own name steps aside while signed out */
:root[data-layout="feed"].auth-out .appbar-title, :root[data-layout="dashboard"].auth-out .appbar-title,
:root[data-layout="editorial"].auth-out .appbar-title, :root[data-layout="list"].auth-out .appbar-title,
:root[data-layout="map"].auth-out .appbar-title { display: none; }
:root[data-layout="dashboard"] .auth-lock .lock-kicker { padding-top: 22px; }
:root[data-layout="dashboard"] .auth-lock .lg-locked { text-align: left; padding-top: 10px; }
:root[data-layout="dashboard"] .auth-lock .lg-icon { width: 64px; height: 64px; border-radius: 18px; }
:root[data-layout="dashboard"] .auth-lock .lg-title { font-family: var(--font-display); font-size: 40px; line-height: 1.05; margin-top: 18px; }
:root[data-layout="dashboard"] .auth-lock .lg-lead { margin-left: 0; }
:root[data-layout="dashboard"] .auth-lock .lg-card { padding: 22px; border-radius: 26px; border: 0; box-shadow: var(--card-shadow); }

/* the floating tab bar (dashboard and map, phone width) */
:root[data-layout="dashboard"] .tabbar, :root[data-layout="map"] .tabbar {
  position: absolute; left: max(12px, var(--sal)); right: max(12px, var(--sar)); bottom: calc(10px + var(--sab));
  min-height: 64px; padding: 0 6px; border: 0; border-radius: 22px; z-index: 4;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .08), 0 10px 30px rgba(16, 24, 40, .18);
}
:root[data-layout="dashboard"] .screen:not(.fill), :root[data-layout="map"] .screen:not(.fill) {
  padding-bottom: calc(var(--tabbar) + var(--sab) + 18px);
}
:root[data-layout="dashboard"].tabbar-off .screen:not(.fill), :root[data-layout="map"].tabbar-off .screen:not(.fill) { padding-bottom: 28px; }
/*  (Hatch 1.7.3 round item 15, Horace: "I cant see the type button as an option"): a full screen with a box to type in
   (a chat) stops above the floating tab bar, so the type box, Talk and Send are never hidden behind it. A full screen
   without one (a map) still runs under the bar. */
:root[data-layout="dashboard"] .screen.fill:has(.gc-dock, textarea), :root[data-layout="map"] .screen.fill:has(.gc-dock, textarea) {
  padding-bottom: calc(var(--tabbar) + var(--sab));
}
:root[data-layout="dashboard"].tabbar-off .screen.fill, :root[data-layout="map"].tabbar-off .screen.fill { padding-bottom: 0; }

/* ---- editorial: a masthead, a contents line of tabs under it, ruled pages and large display headings */
:root[data-layout="editorial"] {
  --nav-place: top; --tabbar: 0px;
  --bar-bg: var(--bg); --bar-ink: var(--text); --bar-btn: transparent; --bar-rule-w: 0px;
  --gutter: 22px; --radius: 0px; --radius-btn: 2px; --radius-input: 2px; --radius-sheet: 10px; --icon-radius: 4px;
  --card-pad: 18px 0 8px; --card-shadow: none; --card-border-w: 0px;
  --appbar: 60px; --appbar-title-fs: 24px; --appbar-title-weight: var(--head-weight); --appbar-title-case: uppercase; --appbar-title-spacing: .16em;
  --btn-case: uppercase; --btn-spacing: .1em; --btn-fs: 14px;
}
:root[data-layout="editorial"] .appbar { order: 0; box-shadow: none; }
:root[data-layout="editorial"] .appbar:not(.has-back) .appbar-icon { display: none; }
:root[data-layout="editorial"] .appbar-title { font-family: var(--font-display); }
:root[data-layout="editorial"] .screens { order: 2; }
:root[data-layout="editorial"] .tabbar {
  order: 1; min-height: 0; padding: 0 max(var(--gutter), var(--sar)) 0 max(var(--gutter), var(--sal)); gap: 24px; justify-content: flex-start;
  background: var(--bg); border-top: 3px double var(--text); border-bottom: 1px solid var(--line);
}
:root[data-layout="editorial"] .tab { flex: none; flex-direction: row; min-height: 44px; padding: 0 1px; gap: 0;
  font-family: var(--font-label); font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
:root[data-layout="editorial"] .tab .tab-ico { display: none; }
:root[data-layout="editorial"] .tab[aria-selected="true"] { color: var(--text); }
:root[data-layout="editorial"] .tab[aria-selected="true"]::before { top: auto; bottom: -1px; left: 0; right: 0; height: 2px; border-radius: 0; background: var(--text); }
:root[data-layout="editorial"] .card, :root[data-layout="editorial"] .tbl-card {
  background: transparent; border: 0; border-top: 1px solid var(--line); border-radius: 0; box-shadow: none; margin-bottom: 0;
}
:root[data-layout="editorial"] .tbl-list { gap: 0; }
:root[data-layout="editorial"] .tbl-card { padding: 18px 0; }
:root[data-layout="editorial"] .tbl-card .tbl-title { font-family: var(--font-display); font-size: 24px; line-height: 1.15; }
:root[data-layout="editorial"] .h1 { font-family: var(--font-display); font-size: 38px; line-height: 1.06; margin: 10px 0 18px; }
:root[data-layout="editorial"] .h1::after { content: ""; display: block; width: 44px; height: 3px; margin-top: 14px; background: var(--accent); }
:root[data-layout="editorial"] .screen-inner { max-width: 640px; }
:root[data-layout="editorial"] .empty.es { background: transparent; border: 0; border-top: 3px solid var(--text); border-radius: 0; padding: 18px 0 8px; }
:root[data-layout="editorial"] .empty.es > svg.ico { display: none; }
:root[data-layout="editorial"] .es-title { font-family: var(--font-display); font-size: 30px; line-height: 1.12; }
:root[data-layout="editorial"] .es-sample { background: transparent; border: 0; border-left: 3px solid var(--accent); border-radius: 0; padding: 4px 0 4px 14px; }
:root[data-layout="editorial"] .es-action { width: auto; }
/* sign-in: a magazine cover. The line about the app as the kicker, a huge title, a rule, the form unboxed */
:root[data-layout="editorial"] .auth-lock .lock-kicker { padding-top: 26px; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
:root[data-layout="editorial"] .auth-lock .lg-locked { text-align: left; padding-top: 14px; }
:root[data-layout="editorial"] .auth-lock .lg-icon { display: none; }
:root[data-layout="editorial"] .auth-lock .lg-title { font-family: var(--font-display); font-size: 52px; line-height: 1; letter-spacing: -.02em; margin: 6px 0 16px; }
:root[data-layout="editorial"] .auth-lock .lg-title::after { content: ""; display: block; width: 56px; height: 4px; margin-top: 18px; background: var(--accent); }
:root[data-layout="editorial"] .auth-lock .lg-lead { margin-left: 0; font-size: 19px; font-style: italic; color: var(--text); }
:root[data-layout="editorial"] .auth-lock .lg-card { background: transparent; box-shadow: none; border: 0; border-top: 1px solid var(--text); border-radius: 0; padding: 16px 0 0; }

/* ---- list: a slim bar, a segmented switch of tabs at the top, dense grouped rows */
:root[data-layout="list"] {
  --nav-place: top; --tabbar: 0px;
  --bar-bg: var(--surface); --bar-ink: var(--text); --bar-btn: transparent; --bar-rule-w: 1px; --bar-rule: var(--line);
  --appbar: 48px; --appbar-title-fs: 17px; --appbar-title-weight: 700;
  --gutter: 12px; --radius: 12px; --radius-btn: 10px; --radius-input: 10px; --radius-sheet: 16px; --icon-radius: 7px;
  --card-pad: 10px 12px; --card-shadow: none; --card-border-w: 0px; --fs: 16px; --tap: 44px;
}
:root[data-layout="list"] .appbar { order: 0; box-shadow: none; gap: 8px; }
:root[data-layout="list"] .appbar-icon { width: 26px; height: 26px; }
:root[data-layout="list"] .appbar-btn.icon-only { width: 36px; height: 36px; min-width: 36px; min-height: 36px; }
:root[data-layout="list"] .screens { order: 2; }
:root[data-layout="list"] .tabbar {
  order: 1; min-height: 0; margin: 8px max(var(--gutter), var(--sar)) 0 max(var(--gutter), var(--sal)); padding: 3px; gap: 2px;
  border: 0; border-radius: 11px; background: var(--surface-2);
}
:root[data-layout="list"] .tab { flex-direction: row; min-height: 34px; padding: 0 10px; border-radius: 8px; gap: 6px;
  font-size: 14px; font-weight: 600; letter-spacing: 0; color: var(--muted); }
:root[data-layout="list"] .tab .tab-ico { display: none; }
:root[data-layout="list"] .tab[aria-selected="true"] { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(16, 24, 40, .14); }
:root[data-layout="list"] .tab[aria-selected="true"]::before { display: none; }
:root[data-layout="list"] .screen { padding-top: 10px; }
:root[data-layout="list"] .card { box-shadow: none; border: 1px solid var(--line); margin-bottom: 8px; }
:root[data-layout="list"] .tbl-list { gap: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
:root[data-layout="list"] .tbl-card { border-radius: 0; box-shadow: none; border: 0; border-top: 1px solid var(--line); padding: 9px 12px; min-height: 52px; }
:root[data-layout="list"] .tbl-list > .tbl-card:first-child { border-top: 0; }
:root[data-layout="list"] .tbl-card .tbl-title { font-size: 16px; }
:root[data-layout="list"] .list-item { min-height: 44px; padding: 8px 0; }
:root[data-layout="list"] .h1 { font-size: 22px; margin: 2px 0 10px; }
:root[data-layout="list"] .empty.es { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
:root[data-layout="list"] .empty.es > svg.ico { display: none; }
:root[data-layout="list"] .es-title { font-size: 18px; }
:root[data-layout="list"] .es-sample { margin: 12px 0; padding: 0; border: 0; background: none; }
:root[data-layout="list"] .es-sample-text, :root[data-layout="list"] .es-ghost { padding: 10px 12px; border: 1px dashed var(--edge); border-radius: 10px; }
/* sign-in: compact and to the point. The icon beside the name, the form straight under it */
:root[data-layout="list"] .auth-lock .lock-kicker { padding-top: 10px; }
:root[data-layout="list"] .auth-lock .lg-locked { display: grid; grid-template-columns: 52px minmax(0, 1fr); column-gap: 14px; align-items: center; text-align: left; padding-top: 12px; }
:root[data-layout="list"] .auth-lock .lg-icon { width: 52px; height: 52px; border-radius: 13px; grid-row: 1 / span 2; box-shadow: none; }
:root[data-layout="list"] .auth-lock .lg-title { margin: 0; font-size: 24px; }
:root[data-layout="list"] .auth-lock .lg-lead { margin: 0; font-size: 15px; }
:root[data-layout="list"] .auth-lock .lg-locked > :not(.lg-icon):not(.lg-title):not(.lg-lead) { grid-column: 1 / -1; margin-top: 18px; }
:root[data-layout="list"] .auth-lock .lg-card { border: 1px solid var(--line); box-shadow: none; border-radius: 12px; }

/* ---- map: no bar of its own. The title and buttons float over a full-bleed screen, the tabs float at the foot,
   and cards are sheets. Away from a map the page wears a faint contour pattern. */
:root[data-layout="map"] {
  --nav-place: float; --tabbar: 84px;
  --bar-bg: transparent; --bar-ink: var(--text); --bar-btn: var(--surface); --bar-rule-w: 0px;
  --gutter: 16px; --radius: 22px; --radius-btn: 999px; --radius-input: 14px; --radius-sheet: 28px; --icon-radius: 50%;
  --card-shadow: 0 2px 6px rgba(16, 24, 40, .08), 0 14px 30px rgba(16, 24, 40, .12); --card-border-w: 0px;
  --contour: color-mix(in srgb, var(--accent) 9%, transparent);
}
:root[data-layout="map"] .appbar {
  position: absolute; top: 0; left: 0; right: 0; z-index: 4; box-shadow: none; pointer-events: none; padding-bottom: 14px;
  background: linear-gradient(to bottom, color-mix(in srgb, var(--bg) 92%, transparent) 50%, transparent);
}
:root[data-layout="map"] .appbar > * { pointer-events: auto; }
:root[data-layout="map"] .appbar-title { flex: 0 1 auto; min-width: 0; padding: 8px 18px; border-radius: 999px; background: var(--surface);
  box-shadow: 0 2px 10px rgba(16, 24, 40, .14); font-size: 17px; }
:root[data-layout="map"] .appbar:not(.has-back) .appbar-title { min-width: 6.5em; }
:root[data-layout="map"] .appbar:not(.has-back) .appbar-icon { display: none; }
:root[data-layout="map"] .appbar-actions { margin-left: auto; }
:root[data-layout="map"] .appbar-btn, :root[data-layout="map"] .appbar-back { background: var(--surface); box-shadow: 0 2px 10px rgba(16, 24, 40, .14); }
:root[data-layout="map"] .appbar-icon { box-shadow: 0 2px 10px rgba(16, 24, 40, .14); width: 40px; height: 40px; }
:root[data-layout="map"] .screens {
  background-color: var(--bg);
  background-image: repeating-radial-gradient(circle at 18% 22%, transparent 0 22px, var(--contour) 22px 23px),
                    repeating-radial-gradient(circle at 88% 74%, transparent 0 30px, var(--contour) 30px 31px);
}
:root[data-layout="map"] .screen:not(.fill) { padding-top: calc(var(--appbar) + var(--sat) + 16px); }
:root[data-layout="map"] .card, :root[data-layout="map"] .tbl-card { border-radius: var(--radius); box-shadow: var(--card-shadow); border: 0; }
:root[data-layout="map"] .tbl-card { padding: 16px 16px 16px 18px; }
:root[data-layout="map"] .tbl-card::before { content: ""; flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent); margin-right: 4px; }
:root[data-layout="map"] .empty.es { border: 0; box-shadow: var(--card-shadow); border-radius: var(--radius-sheet); padding-top: 30px; position: relative; }
:root[data-layout="map"] .empty.es::before { content: ""; position: absolute; top: 10px; left: calc(50% - 18px); width: 36px; height: 5px; border-radius: 3px;
  background: color-mix(in srgb, var(--muted) 45%, transparent); }
/* sign-in: the contour page with the form rising from the foot as a sheet */
:root[data-layout="map"] .screen.auth-lock { display: flex; flex-direction: column; padding: 0; }
:root[data-layout="map"] .auth-lock .lock-kicker { order: 0; flex: none; width: 100%; padding: calc(var(--appbar) + var(--sat) + 22px) var(--gutter) 0; text-align: center; }
:root[data-layout="map"] .auth-lock > .screen-inner { order: 1; flex: 1 0 auto; display: flex; flex-direction: column; justify-content: flex-end; width: 100%; max-width: 560px; }
:root[data-layout="map"] .auth-lock .lg-locked { padding: 18px 0 0; }
:root[data-layout="map"] .auth-lock .lg-icon { width: 92px; height: 92px; border-radius: 50%; box-shadow: 0 0 0 6px var(--surface), 0 10px 26px rgba(16, 24, 40, .22); }
:root[data-layout="map"] .auth-lock .lg-title { font-family: var(--font-display); font-size: 34px; margin: 16px 0 8px; }
:root[data-layout="map"] .auth-lock .lg-lead { margin-bottom: 26px; }
:root[data-layout="map"] .auth-lock .lg-card { margin: 0; border-radius: var(--radius-sheet) var(--radius-sheet) 0 0; border: 0; padding: 22px max(var(--gutter), var(--sal)) calc(26px + var(--sab));
  box-shadow: 0 -10px 30px rgba(16, 24, 40, .14); }
:root[data-layout="map"] .auth-lock .lg-card::before { content: ""; display: block; width: 36px; height: 5px; border-radius: 3px; margin: -10px auto 14px;
  background: color-mix(in srgb, var(--muted) 45%, transparent); }

/* ---- wide windows (900px and more): dashboard, map and feed move their tabs into a side rail */
@media (min-width: 900px) {
  :root[data-layout="dashboard"], :root[data-layout="map"], :root[data-layout="feed"] { --nav-place: side; --tabbar: 0px; }
  :root[data-layout="dashboard"] #app:has(> .tabbar:not([hidden]):not(.single)),
  :root[data-layout="map"] #app:has(> .tabbar:not([hidden]):not(.single)),
  :root[data-layout="feed"] #app:has(> .tabbar:not([hidden]):not(.single)) {
    display: grid; grid-template-columns: 240px minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr);
  }
  :root[data-layout="dashboard"] #app > .appbar, :root[data-layout="map"] #app > .appbar, :root[data-layout="feed"] #app > .appbar { grid-column: 1 / -1; grid-row: 1; }
  :root[data-layout="dashboard"] #app > .screens, :root[data-layout="map"] #app > .screens, :root[data-layout="feed"] #app > .screens { grid-column: 2; grid-row: 2; }
  :root[data-layout="dashboard"] #app > .tabbar, :root[data-layout="map"] #app > .tabbar, :root[data-layout="feed"] #app > .tabbar {
    position: static; grid-column: 1; grid-row: 2; flex-direction: column; justify-content: flex-start; align-items: stretch; gap: 4px;
    min-height: 0; padding: 14px 12px; border: 0; border-right: 1px solid var(--line); border-radius: 0; box-shadow: none; background: var(--tabbar-bg);
  }
  :root[data-layout="dashboard"] #app > .tabbar .tab, :root[data-layout="map"] #app > .tabbar .tab, :root[data-layout="feed"] #app > .tabbar .tab {
    flex: none; flex-direction: row; justify-content: flex-start; gap: 12px; min-height: 46px; padding: 0 12px; border-radius: 12px; font-size: 15px;
  }
  :root[data-layout="feed"] #app > .tabbar .tab .tab-label { position: static; width: auto; height: auto; clip: auto; }
  :root[data-layout="dashboard"] #app > .tabbar .tab .tab-ico, :root[data-layout="map"] #app > .tabbar .tab .tab-ico, :root[data-layout="feed"] #app > .tabbar .tab .tab-ico {
    width: 28px; height: 28px; background: transparent;
  }
  :root[data-layout="dashboard"] #app > .tabbar .tab[aria-selected="true"], :root[data-layout="map"] #app > .tabbar .tab[aria-selected="true"],
  :root[data-layout="feed"] #app > .tabbar .tab[aria-selected="true"] { background: var(--accent-soft); }
  :root[data-layout="dashboard"] #app > .tabbar .tab::before, :root[data-layout="map"] #app > .tabbar .tab::before, :root[data-layout="feed"] #app > .tabbar .tab::before { display: none; }
  :root[data-layout="dashboard"] .screen:not(.fill), :root[data-layout="map"] .screen:not(.fill) { padding-bottom: 28px; }
  :root[data-layout="map"] #app > .appbar { position: relative; }
  :root[data-layout="map"] .screen:not(.fill) { padding-top: var(--gutter); }
}

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