/* Goldy's PG design system
   Tokens -> base -> layout -> components -> utilities.
   Phone first. No external fonts: system stack, with ui-rounded for numerals. */

/* ---------- 1. Tokens (light) ---------- */
:root {
  color-scheme: light;

  /* Brand */
  --cream: #FBF8F3;
  --ink: #1F1A17;
  --gold: #B8860B;          /* decorative: monogram, rings, selection */
  --gold-deep: #7A5A0B;
  --sage: #5E7D6A;
  --blush: #E9C9C1;

  /* Surfaces */
  --bg: #FBF8F3;
  --bg-sunken: #F4EEE5;
  --surface: #FFFFFF;
  --surface-2: #FAF6F0;
  --surface-raised: #FFFFFF;
  --chrome: rgba(251, 248, 243, 0.82);
  --scrim: rgba(31, 26, 23, 0.38);

  /* Text */
  --text: #1F1A17;
  --text-2: #5B514A;
  --text-3: #756A61;
  --text-on-accent: #FFFFFF;

  /* Lines */
  --line: rgba(31, 26, 23, 0.09);
  --line-strong: rgba(31, 26, 23, 0.16);

  /* Accent (actionable) */
  --accent: #9C6E0C;        /* 4.5:1 with white */
  --accent-hover: #8C630A;
  --accent-press: #7A5708;
  --accent-tint: #F6EBD3;
  --accent-tint-2: #EFDDB4;
  --accent-text: #7A5A0B;   /* gold text on light surfaces */
  --focus: #B8860B;

  --secondary: #4A6B57;     /* sage, 5.9:1 with white */
  --secondary-tint: #E6EEE8;

  /* Status: solid for icons/dots, ink for text on tint, tint for backgrounds */
  --success: #1BAF7A; --success-ink: #117A54; --success-tint: #E3F4EC;
  --info: #2A78D6;    --info-ink: #1F5FB0;    --info-tint: #E6EFFB;
  --warning: #EDA100; --warning-ink: #8A5D00; --warning-tint: #FFF3D6;
  --danger: #D9483B;  --danger-ink: #B23A2F;  --danger-tint: #FBE7E4;
  --danger-solid: #C2402F;  /* button bg, 5.2:1 with white */

  /* Chart categorical (validated: CVD + contrast, light surface) */
  --c1: #B07A0A; --c2: #C2557A; --c3: #3F6FC4; --c4: #3E8A5E;
  --chart-grid: rgba(31, 26, 23, 0.07);

  /* Bed map */
  --bed-free: #FFFFFF;
  --bed-free-line: #CDBFA9;
  --bed-taken: #E9E3DA;
  --bed-taken-ink: #A79C90;
  --bed-from: #FFF6E2;
  --bed-from-line: #E3B65C;

  /* Type */
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", Inter, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Oriya", "Noto Sans Devanagari", sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", Inter, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  --font-num: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, Inter, "Segoe UI", Roboto, sans-serif;

  --fs-11: 0.6875rem;
  --fs-12: 0.75rem;
  --fs-13: 0.8125rem;
  --fs-15: 0.9375rem;
  --fs-16: 1rem;
  --fs-17: 1.0625rem;
  --fs-20: 1.25rem;
  --fs-24: 1.5rem;
  --fs-28: 1.75rem;
  --fs-34: 2.125rem;
  --fs-44: 2.75rem;

  /* Space (4/8/12/16/24/32 + large) */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px;

  /* Radius */
  --r-xs: 8px; --r-sm: 12px; --r-input: 14px; --r-card: 20px; --r-sheet: 28px; --r-pill: 999px;

  /* Elevation: warm-tinted, layered */
  --sh-1: 0 1px 2px rgba(64, 42, 12, 0.05);
  --sh-2: 0 1px 2px rgba(64, 42, 12, 0.05), 0 6px 18px -6px rgba(64, 42, 12, 0.10);
  --sh-3: 0 2px 6px rgba(64, 42, 12, 0.06), 0 22px 48px -12px rgba(64, 42, 12, 0.22);

  /* Motion */
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-spring: cubic-bezier(0.32, 1.25, 0.5, 1);
  --t-fast: 140ms; --t-med: 240ms; --t-slow: 380ms;

  /* Layout */
  --touch: 44px;
  --topbar-h: 56px;
  --tabbar-h: 64px;
  --sidebar-w: 256px;
  --content-max: 680px;
  --content-wide: 1120px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

/* ---------- 1b. Tokens (dark) ---------- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #16120F;
    --bg-sunken: #100D0B;
    --surface: #211B16;
    --surface-2: #2A231D;
    --surface-raised: #2A231D;
    --chrome: rgba(22, 18, 15, 0.8);
    --scrim: rgba(0, 0, 0, 0.55);
    --text: #F5EFE6;
    --text-2: #C9BEB1;
    --text-3: #A39486;
    --text-on-accent: #1A1511;
    --line: rgba(245, 239, 230, 0.09);
    --line-strong: rgba(245, 239, 230, 0.17);
    --accent: #E0B54A;
    --accent-hover: #EAC362;
    --accent-press: #D1A53A;
    --accent-tint: #3A2E17;
    --accent-tint-2: #4A3A1A;
    --accent-text: #E8C36A;
    --focus: #E8C36A;
    --secondary: #9DBDA8;
    --secondary-tint: #24302A;
    --success: #3CC892; --success-ink: #6FD9AE; --success-tint: #173127;
    --info: #5B9BEA;    --info-ink: #93BDF2;    --info-tint: #182739;
    --warning: #F2B53A; --warning-ink: #F5C76A; --warning-tint: #362A12;
    --danger: #EC6A5E;  --danger-ink: #F39A90;  --danger-tint: #3A1C18;
    --danger-solid: #E0574A;
    --c1: #B88A1C; --c2: #CC6488; --c3: #5F8FE0; --c4: #4FA374;
    --chart-grid: rgba(245, 239, 230, 0.08);
    --bed-free: #2A231D;
    --bed-free-line: #6B5D4E;
    --bed-taken: #1B1612;
    --bed-taken-ink: #5F544A;
    --bed-from: #33280F;
    --bed-from-line: #B98E30;
    --sh-1: 0 1px 2px rgba(0, 0, 0, 0.3);
    --sh-2: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 22px -8px rgba(0, 0, 0, 0.55);
    --sh-3: 0 2px 6px rgba(0, 0, 0, 0.35), 0 24px 56px -12px rgba(0, 0, 0, 0.7);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #16120F;
  --bg-sunken: #100D0B;
  --surface: #211B16;
  --surface-2: #2A231D;
  --surface-raised: #2A231D;
  --chrome: rgba(22, 18, 15, 0.8);
  --scrim: rgba(0, 0, 0, 0.55);
  --text: #F5EFE6;
  --text-2: #C9BEB1;
  --text-3: #A39486;
  --text-on-accent: #1A1511;
  --line: rgba(245, 239, 230, 0.09);
  --line-strong: rgba(245, 239, 230, 0.17);
  --accent: #E0B54A;
  --accent-hover: #EAC362;
  --accent-press: #D1A53A;
  --accent-tint: #3A2E17;
  --accent-tint-2: #4A3A1A;
  --accent-text: #E8C36A;
  --focus: #E8C36A;
  --secondary: #9DBDA8;
  --secondary-tint: #24302A;
  --success: #3CC892; --success-ink: #6FD9AE; --success-tint: #173127;
  --info: #5B9BEA;    --info-ink: #93BDF2;    --info-tint: #182739;
  --warning: #F2B53A; --warning-ink: #F5C76A; --warning-tint: #362A12;
  --danger: #EC6A5E;  --danger-ink: #F39A90;  --danger-tint: #3A1C18;
  --danger-solid: #E0574A;
  --c1: #B88A1C; --c2: #CC6488; --c3: #5F8FE0; --c4: #4FA374;
  --chart-grid: rgba(245, 239, 230, 0.08);
  --bed-free: #2A231D;
  --bed-free-line: #6B5D4E;
  --bed-taken: #1B1612;
  --bed-taken-ink: #5F544A;
  --bed-from: #33280F;
  --bed-from-line: #B98E30;
  --sh-1: 0 1px 2px rgba(0, 0, 0, 0.3);
  --sh-2: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 22px -8px rgba(0, 0, 0, 0.55);
  --sh-3: 0 2px 6px rgba(0, 0, 0, 0.35), 0 24px 56px -12px rgba(0, 0, 0, 0.7);
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--bg);
}
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--fs-16);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}
img, svg, video { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent-text); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
hr { border: 0; border-top: 1px solid var(--line); margin: var(--s5) 0; }
p { margin: 0 0 var(--s3); }
::selection { background: var(--accent-tint-2); }

:focus { outline: none; }
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: var(--r-xs);
}

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; left: var(--s4); top: -60px; z-index: 100;
  background: var(--surface); color: var(--text); padding: var(--s3) var(--s4);
  border-radius: var(--r-sm); box-shadow: var(--sh-3); text-decoration: none;
}
.skip-link:focus { top: calc(var(--safe-t) + var(--s3)); }

/* ---------- 3. Typography ---------- */
.t-large  { font-family: var(--font-display); font-size: var(--fs-34); line-height: 1.12; font-weight: 700; letter-spacing: -0.022em; margin: 0; }
.t-title  { font-family: var(--font-display); font-size: var(--fs-28); line-height: 1.18; font-weight: 700; letter-spacing: -0.018em; margin: 0; }
.t-title2 { font-family: var(--font-display); font-size: var(--fs-24); line-height: 1.22; font-weight: 650; letter-spacing: -0.014em; margin: 0; }
.t-title3 { font-size: var(--fs-20); line-height: 1.3; font-weight: 650; letter-spacing: -0.01em; margin: 0; }
.t-head   { font-size: var(--fs-17); line-height: 1.35; font-weight: 600; letter-spacing: -0.005em; margin: 0; }
.t-body   { font-size: var(--fs-16); line-height: 1.55; }
.t-callout{ font-size: var(--fs-15); line-height: 1.5; }
.t-sub    { font-size: var(--fs-15); line-height: 1.45; color: var(--text-2); }
.t-foot   { font-size: var(--fs-13); line-height: 1.4; color: var(--text-3); }
.t-cap    { font-size: var(--fs-12); line-height: 1.35; color: var(--text-3); }
.t-num    { font-family: var(--font-num); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.t-muted  { color: var(--text-2); }
.t-faint  { color: var(--text-3); }
.t-accent { color: var(--accent-text); }
.t-center { text-align: center; }
.measure  { max-width: 62ch; }
h1, h2, h3, h4 { margin: 0; }

/* ---------- 4. App layout ---------- */
.app {
  min-height: 100vh;
  min-height: 100dvh;
}
.topbar {
  position: sticky; top: 0; z-index: 30;
  height: calc(var(--topbar-h) + var(--safe-t));
  padding: var(--safe-t) var(--s4) 0;
  display: flex; align-items: center; gap: var(--s2);
  background: var(--chrome);
  -webkit-backdrop-filter: saturate(1.6) blur(18px);
  backdrop-filter: saturate(1.6) blur(18px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--t-med) var(--ease);
}
.topbar.is-scrolled { border-bottom-color: var(--line); }
.topbar__brand {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--text);
  min-height: var(--touch); margin-right: auto;
  border-radius: var(--r-sm);
}
.topbar__actions { display: flex; align-items: center; gap: var(--s1); }

.brand-mark { width: 32px; height: 32px; flex: none; border-radius: 9px; box-shadow: 0 0 0 1px var(--line); }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: var(--fs-17); letter-spacing: -0.015em; white-space: nowrap; }
.brand-name small { display: block; font-size: var(--fs-11); font-weight: 500; color: var(--text-3); letter-spacing: 0; margin-top: -2px; }

.main {
  padding: var(--s4) var(--s4) calc(var(--tabbar-h) + var(--safe-b) + var(--s6));
  max-width: var(--content-max);
  margin: 0 auto;
}
.main--wide { max-width: var(--content-wide); }

/* Bottom tab bar (phone) */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  height: calc(var(--tabbar-h) + var(--safe-b));
  padding: 0 var(--s2) var(--safe-b);
  display: flex; align-items: stretch; justify-content: space-around;
  background: var(--chrome);
  -webkit-backdrop-filter: saturate(1.6) blur(18px);
  backdrop-filter: saturate(1.6) blur(18px);
  border-top: 1px solid var(--line);
}
.tab {
  flex: 1 1 0; min-width: 0; max-width: 112px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  min-height: var(--touch);
  color: var(--text-3); text-decoration: none;
  font-size: var(--fs-11); font-weight: 550; letter-spacing: 0.005em;
  background: none; border: 0; padding: 6px 2px 4px;
  border-radius: var(--r-sm);
  transition: color var(--t-fast) var(--ease);
}
.tab .icon { width: 25px; height: 25px; transition: transform var(--t-med) var(--ease-spring); }
.tab__label { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tab[aria-current="page"] { color: var(--accent-text); }
.tab[aria-current="page"] .icon { transform: translateY(-1px) scale(1.04); }
.tab:active .icon { transform: scale(0.9); }

/* Side navigation (>= 900px) */
.sidenav { display: none; }

@media (min-width: 900px) {
  .app { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); }
  .tabbar { display: none; }
  .sidenav {
    display: flex; flex-direction: column; gap: var(--s1);
    position: sticky; top: 0; height: 100vh; height: 100dvh;
    padding: var(--s5) var(--s4);
    background: var(--bg-sunken);
    border-right: 1px solid var(--line);
    overflow-y: auto;
  }
  .sidenav .topbar__brand { margin: 0 0 var(--s5) var(--s2); }
  .sidenav__item {
    display: flex; align-items: center; gap: var(--s3);
    min-height: var(--touch); padding: 0 var(--s3);
    border-radius: var(--r-sm);
    color: var(--text-2); text-decoration: none; font-weight: 550; font-size: var(--fs-15);
    transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
  }
  .sidenav__item .icon { width: 22px; height: 22px; }
  .sidenav__item:hover { background: var(--line); color: var(--text); }
  .sidenav__item[aria-current="page"] { background: var(--surface); color: var(--text); box-shadow: var(--sh-1), 0 0 0 1px var(--line); }
  .sidenav__item[aria-current="page"] .icon { color: var(--accent-text); }
  .sidenav__foot .segmented__opt { padding: 0 6px; display: grid; place-items: center; }
  .sidenav__foot { margin-top: auto; padding-top: var(--s4); display: grid; gap: var(--s2); }
  .topbar { padding: 0 var(--s6); }
  .topbar .topbar__brand { visibility: hidden; }
  .main { padding: var(--s6) var(--s6) var(--s8); }
}

/* Page scaffolding */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s4); margin: var(--s2) 0 var(--s5); flex-wrap: wrap; }
.page-head__text { min-width: 0; }
.page-head__text .t-sub { margin-top: var(--s2); }
.section { margin-top: var(--s6); }
.section__head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s3); margin-bottom: var(--s3); }
.stack { display: grid; gap: var(--s3); grid-template-columns: minmax(0, 1fr); }
.stack-lg { display: grid; gap: var(--s5); grid-template-columns: minmax(0, 1fr); }
.row { display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; }
.row--nowrap { flex-wrap: nowrap; }
.row--between { justify-content: space-between; }
.grid-2 { display: grid; gap: var(--s3); grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-auto { display: grid; gap: var(--s4); grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.spacer { flex: 1; }
.route-enter { animation: route-in var(--t-slow) var(--ease) backwards; }
@keyframes route-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- 5. Icon ---------- */
.icon {
  width: 22px; height: 22px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round;
}
.icon--sm { width: 18px; height: 18px; }
.icon--lg { width: 28px; height: 28px; }

/* ---------- 6. Buttons ---------- */
.btn {
  --btn-h: 50px;
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  min-height: var(--btn-h); min-width: var(--touch);
  padding: 0 22px;
  border: 0; border-radius: var(--r-pill);
  font-size: var(--fs-16); font-weight: 600; letter-spacing: -0.005em; line-height: 1;
  text-decoration: none; white-space: nowrap;
  user-select: none; -webkit-user-select: none;
  transition: background var(--t-fast) var(--ease), transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.btn:active:not(:disabled) { transform: scale(0.97); }
.btn:focus-visible { border-radius: var(--r-pill); }
.btn .icon { width: 20px; height: 20px; }
.btn--sm { --btn-h: 44px; padding: 0 16px; font-size: var(--fs-15); }
.btn--sm .icon { width: 18px; height: 18px; }
.btn--lg { --btn-h: 56px; padding: 0 28px; font-size: var(--fs-17); }
.btn--block { display: flex; width: 100%; }
.btn--icon { padding: 0; width: var(--btn-h); }
.btn--sm.btn--icon { width: 44px; }

.btn--primary { background: var(--accent); color: var(--text-on-accent); box-shadow: 0 1px 0 rgba(255,255,255,0.18) inset, 0 6px 16px -6px rgba(122, 90, 11, 0.55); }
.btn--primary:hover:not(:disabled) { background: var(--accent-hover); }
.btn--primary:active:not(:disabled) { background: var(--accent-press); }
.btn--secondary { background: var(--surface); color: var(--text); box-shadow: 0 0 0 1px var(--line-strong) inset, var(--sh-1); }
.btn--secondary:hover:not(:disabled) { background: var(--surface-2); }
.btn--ghost { background: transparent; color: var(--accent-text); }
.btn--ghost:hover:not(:disabled) { background: var(--accent-tint); }
.btn--plain { background: transparent; color: var(--text-2); }
.btn--plain:hover:not(:disabled) { background: var(--line); color: var(--text); }
.btn--danger { background: var(--danger-solid); color: #fff; }
.btn--danger:hover:not(:disabled) { filter: brightness(0.94); }
.btn--tinted { background: var(--accent-tint); color: var(--accent-text); }
.btn--tinted:hover:not(:disabled) { background: var(--accent-tint-2); }

.btn:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; }
.btn.is-loading { color: transparent !important; pointer-events: none; }
.btn.is-loading .icon { opacity: 0; }
.btn__spinner {
  position: absolute; inset: 0; margin: auto;
  width: 20px; height: 20px; border-radius: 50%;
  border: 2.25px solid currentColor; border-right-color: transparent;
  color: var(--text-on-accent);
  animation: spin 0.7s linear infinite;
}
.btn--secondary .btn__spinner, .btn--ghost .btn__spinner, .btn--plain .btn__spinner, .btn--tinted .btn__spinner { color: var(--accent-text); }
.btn--danger .btn__spinner { color: #fff; }
@keyframes spin { to { transform: rotate(360deg); } }

.icon-btn {
  display: inline-grid; place-items: center;
  width: var(--touch); height: var(--touch);
  border: 0; background: transparent; color: var(--text-2);
  border-radius: var(--r-pill);
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.icon-btn:hover { background: var(--line); color: var(--text); }
.icon-btn:focus-visible { border-radius: var(--r-pill); }
.lang-btn {
  min-width: var(--touch); height: 36px; margin: 4px 0;
  padding: 0 12px; border-radius: var(--r-pill);
  border: 0; background: var(--line); color: var(--text);
  font-size: var(--fs-13); font-weight: 600;
}
.lang-btn:hover { background: var(--line-strong); }

/* ---------- 7. Forms ---------- */
.field { display: grid; gap: 6px; }
.field__label { font-size: var(--fs-15); font-weight: 600; color: var(--text); }
.field__hint { font-size: var(--fs-13); color: var(--text-3); }
.field__error { font-size: var(--fs-13); color: var(--danger-ink); display: flex; gap: 6px; align-items: center; }
.field__error .icon { width: 16px; height: 16px; }

.input, .select, .textarea {
  width: 100%;
  min-height: 52px;
  padding: 0 var(--s4);
  border-radius: var(--r-input);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--text);
  font-size: var(--fs-16); /* >=16px prevents iOS zoom */
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
  appearance: none; -webkit-appearance: none;
}
.textarea { padding: 14px var(--s4); min-height: 112px; resize: vertical; line-height: 1.5; }
.input::placeholder, .textarea::placeholder { color: var(--text-3); opacity: 1; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--text-3); }
.input:focus-visible, .select:focus-visible, .textarea:focus-visible {
  outline: none; border-color: var(--focus); box-shadow: 0 0 0 4px color-mix(in srgb, var(--focus) 22%, transparent);
  border-radius: var(--r-input);
}
.input[aria-invalid="true"], .select[aria-invalid="true"], .textarea[aria-invalid="true"] { border-color: var(--danger); }
.input:disabled, .select:disabled, .textarea:disabled { background: var(--bg-sunken); color: var(--text-3); cursor: not-allowed; }
.select {
  padding-right: 44px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23756A61' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 18px;
}
.input-group { position: relative; display: flex; align-items: center; }
.input-group__prefix { position: absolute; left: var(--s4); color: var(--text-3); pointer-events: none; display: flex; }
.input-group .input { padding-left: 46px; }
.input--otp { text-align: center; letter-spacing: 0.5em; font-family: var(--font-num); font-size: var(--fs-24); font-weight: 600; }

.check { display: flex; gap: var(--s3); align-items: flex-start; min-height: var(--touch); padding: 10px 0; cursor: pointer; }
.check input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--accent); flex: none; }

/* Switch */
.switch { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); min-height: var(--touch); cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch__track { width: 51px; height: 31px; border-radius: var(--r-pill); background: var(--line-strong); position: relative; flex: none; transition: background var(--t-med) var(--ease); }
.switch__track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,0.18); transition: transform var(--t-med) var(--ease-spring); }
.switch input:checked + .switch__track { background: var(--success); }
.switch input:checked + .switch__track::after { transform: translateX(20px); }
.switch input:focus-visible + .switch__track { outline: 3px solid var(--focus); outline-offset: 2px; }

/* Segmented control */
.segmented {
  display: flex; position: relative;
  padding: 3px; gap: 2px;
  background: var(--bg-sunken);
  border-radius: 13px;
  box-shadow: 0 0 0 1px var(--line) inset;
  max-width: 100%;
}
.segmented__opt {
  flex: 1 1 0; min-width: 0;
  min-height: 38px; padding: 0 var(--s3);
  border: 0; background: transparent; border-radius: 10px;
  color: var(--text-2); font-size: var(--fs-15); font-weight: 550;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: color var(--t-fast) var(--ease), background var(--t-med) var(--ease), box-shadow var(--t-med) var(--ease);
}
.segmented__opt[aria-checked="true"] { background: var(--surface); color: var(--text); box-shadow: var(--sh-2), 0 0 0 0.5px var(--line); font-weight: 600; }
.segmented__opt:focus-visible { border-radius: 10px; outline-offset: 0; }
.segmented--lg .segmented__opt { min-height: 44px; }

/* Chips */
.chips { display: flex; gap: var(--s2); overflow-x: auto; scrollbar-width: none; padding: 2px; margin: -2px; scroll-snap-type: x proximity; }
.chips::-webkit-scrollbar { display: none; }
.chips--wrap { flex-wrap: wrap; overflow: visible; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  min-height: 40px; padding: 0 var(--s4);
  border-radius: var(--r-pill);
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--text);
  font-size: var(--fs-15); font-weight: 500; white-space: nowrap;
  scroll-snap-align: start;
  text-decoration: none;
  transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
button.chip { position: relative; }
button.chip::after { content: ""; position: absolute; inset: -3px 0; } /* 46px hit area */
.chip .icon { width: 17px; height: 17px; }
.chip:hover { border-color: var(--text-3); }
.chip[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.chip--static { cursor: default; min-height: 32px; padding: 0 var(--s3); font-size: var(--fs-13); background: var(--surface-2); border-color: var(--line); color: var(--text-2); }
.chip--static:hover { border-color: var(--line); }

/* ---------- 8. Cards & list rows ---------- */
.card {
  background: var(--surface);
  border-radius: var(--r-card);
  box-shadow: 0 0 0 1px var(--line), var(--sh-1);
  padding: var(--s5) var(--s4);
  min-width: 0;
}
.card--flush { padding: 0; overflow: hidden; }
.card--raised { box-shadow: 0 0 0 1px var(--line), var(--sh-2); }
.card--sunken { background: var(--bg-sunken); box-shadow: none; }
.card--accent { background: var(--accent-tint); box-shadow: none; }
.card--interactive { display: block; color: inherit; text-decoration: none; transition: transform var(--t-med) var(--ease), box-shadow var(--t-med) var(--ease); cursor: pointer; }
.card--interactive:hover { box-shadow: 0 0 0 1px var(--line), var(--sh-2); }
.card--interactive:active { transform: scale(0.985); }
.card--interactive:focus-visible { border-radius: var(--r-card); }
.card__head { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); margin-bottom: var(--s3); }
.card__body { padding: var(--s4); }
@media (min-width: 600px) { .card { padding: var(--s5); } .card--flush { padding: 0; } }

/* Listing card (Airbnb-like) */
.listing { display: grid; gap: var(--s3); color: inherit; text-decoration: none; border-radius: var(--r-card); }
.listing__media { position: relative; aspect-ratio: 4 / 3; border-radius: var(--r-card); overflow: hidden; background: var(--bg-sunken); }
.listing__media img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--t-slow) var(--ease); }
.listing:hover .listing__media img { transform: scale(1.03); }
.listing__badge { position: absolute; top: var(--s3); left: var(--s3); }
.listing__fav { position: absolute; top: var(--s2); right: var(--s2); color: #fff; filter: drop-shadow(0 1px 3px rgba(0,0,0,.4)); }
.listing__fav:hover { background: rgba(255,255,255,0.15); color: #fff; }
.listing__meta { display: grid; gap: 2px; padding: 0 2px; }
.listing__title { font-weight: 600; font-size: var(--fs-16); }
.photo-placeholder { width: 100%; height: 100%; display: grid; place-items: center; color: var(--text-3); background: linear-gradient(160deg, var(--accent-tint), var(--bg-sunken) 70%); }
.photo-placeholder .icon { width: 44px; height: 44px; stroke-width: 1.25; opacity: 0.7; }

.list { background: var(--surface); border-radius: var(--r-card); box-shadow: 0 0 0 1px var(--line), var(--sh-1); overflow: hidden; }
.list-row {
  display: flex; align-items: center; gap: var(--s3);
  min-height: 60px; padding: var(--s3) var(--s4);
  color: inherit; text-decoration: none; width: 100%; text-align: left;
  background: transparent; border: 0;
  position: relative;
}
.list-row + .list-row::before { content: ""; position: absolute; top: 0; right: 0; left: var(--list-inset, var(--s4)); border-top: 1px solid var(--line); }
.list--iconed { --list-inset: 64px; }
a.list-row, button.list-row { cursor: pointer; transition: background var(--t-fast) var(--ease); }
a.list-row:hover, button.list-row:hover { background: var(--surface-2); }
a.list-row:active, button.list-row:active { background: var(--bg-sunken); }
.list-row:focus-visible { outline-offset: -3px; border-radius: 0; }
.list-row__lead { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex: none; background: var(--accent-tint); color: var(--accent-text); }
.list-row__lead .icon { width: 20px; height: 20px; }
.list-row__main { flex: 1; min-width: 0; }
.list-row__title { display: block; font-size: var(--fs-16); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-row__sub { display: block; font-size: var(--fs-13); color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-row__trail { display: flex; align-items: center; gap: var(--s2); color: var(--text-3); font-size: var(--fs-15); flex: none; }
.list-row__chev { width: 18px; height: 18px; color: var(--text-3); opacity: 0.7; }

/* ---------- 9. Badges / status pills ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  height: 26px; padding: 0 10px;
  border-radius: var(--r-pill);
  font-size: var(--fs-13); font-weight: 600; line-height: 1; white-space: nowrap;
  background: var(--bg-sunken); color: var(--text-2);
}
.badge .icon { width: 14px; height: 14px; stroke-width: 2.25; }
.badge__dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.badge--success { background: var(--success-tint); color: var(--success-ink); }
.badge--info    { background: var(--info-tint); color: var(--info-ink); }
.badge--warning { background: var(--warning-tint); color: var(--warning-ink); }
.badge--danger  { background: var(--danger-tint); color: var(--danger-ink); }
.badge--accent  { background: var(--accent-tint); color: var(--accent-text); }
.badge--sage    { background: var(--secondary-tint); color: var(--secondary); }
.badge--solid   { background: var(--text); color: var(--bg); }
.badge--on-media { background: rgba(255,255,255,0.92); color: #1F1A17; box-shadow: 0 1px 4px rgba(0,0,0,0.12); }
.count-dot { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--danger-solid); color: #fff; font-size: var(--fs-11); font-weight: 700; display: inline-grid; place-items: center; }

/* ---------- 10. Journey tracker / stepper ---------- */
.journey { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); }
.journey__step { display: grid; grid-template-columns: 32px minmax(0, 1fr); column-gap: var(--s3); position: relative; padding-bottom: var(--s4); }
.journey__step:last-child { padding-bottom: 0; }
.journey__step::before { /* rail */
  content: ""; position: absolute; left: 15px; top: 32px; bottom: 0; width: 2px;
  background: var(--line-strong); border-radius: 1px;
}
.journey__step:last-child::before { display: none; }
.journey__step.is-done::before { background: var(--success); }
.journey__node {
  width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--surface); color: var(--text-3);
  box-shadow: 0 0 0 1.5px var(--line-strong) inset;
  font-family: var(--font-num); font-size: var(--fs-13); font-weight: 650;
  position: relative; z-index: 1;
}
.journey__node .icon { width: 17px; height: 17px; stroke-width: 2.5; }
.is-done > .journey__node { background: var(--success); color: #fff; box-shadow: none; }
.is-current > .journey__node { background: var(--accent); color: var(--text-on-accent); box-shadow: 0 0 0 5px var(--accent-tint); }
.is-locked > .journey__node { background: var(--bg-sunken); }
.journey__body { padding-top: 5px; min-width: 0; }
.journey__title { font-weight: 600; font-size: var(--fs-16); line-height: 1.35; }
.is-locked .journey__title, .is-todo .journey__title { color: var(--text-3); font-weight: 500; }
.journey__meta { font-size: var(--fs-13); color: var(--text-3); margin-top: 2px; }
.journey__action { margin-top: var(--s3); }
.journey--compact .journey__step { padding-bottom: var(--s3); }

/* Horizontal mini stepper */
.stepper { display: flex; align-items: center; gap: 6px; }
.stepper__dot { height: 6px; flex: 1; border-radius: 3px; background: var(--line-strong); transition: background var(--t-med) var(--ease); }
.stepper__dot.is-done { background: var(--success); }
.stepper__dot.is-current { background: var(--accent); }

/* ---------- 11. Progress ---------- */
.ring { position: relative; display: inline-grid; place-items: center; flex: none; }
.ring svg { transform: rotate(-90deg); }
.ring__track { stroke: var(--line-strong); }
.ring__value { stroke: var(--accent); transition: stroke-dashoffset var(--t-slow) var(--ease); }
.ring--success .ring__value { stroke: var(--success); }
.ring--sage .ring__value { stroke: var(--secondary); }
.ring__label { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; font-family: var(--font-num); font-weight: 650; line-height: 1.05; }
.ring__label small { display: block; font-family: var(--font); font-size: var(--fs-11); font-weight: 500; color: var(--text-3); margin-top: 2px; }
.bar { height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; }
.bar__fill { height: 100%; border-radius: 4px; background: var(--accent); transition: width var(--t-slow) var(--ease); }

/* ---------- 12. Overlays: sheet, modal, toast ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 60;
  background: var(--scrim);
  display: flex; align-items: flex-end; justify-content: center;
  animation: fade-in var(--t-med) var(--ease) both;
}
.overlay.is-closing { animation: fade-out var(--t-med) var(--ease) both; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes fade-out { from { opacity: 1; } to { opacity: 0; } }

.sheet {
  width: 100%; max-width: 560px; max-height: 92vh; max-height: 92dvh;
  background: var(--surface-raised);
  border-radius: var(--r-sheet) var(--r-sheet) 0 0;
  box-shadow: var(--sh-3);
  padding: 8px var(--s4) calc(var(--s5) + var(--safe-b));
  display: flex; flex-direction: column;
  animation: sheet-up var(--t-slow) var(--ease) both;
}
.is-closing .sheet { animation: sheet-down var(--t-med) var(--ease) both; }
@keyframes sheet-up { from { transform: translateY(100%); } to { transform: none; } }
@keyframes sheet-down { from { transform: none; } to { transform: translateY(100%); } }
.sheet__grabber { width: 38px; height: 5px; border-radius: 3px; background: var(--line-strong); margin: 0 auto var(--s3); flex: none; }
.sheet__head, .modal__head { display: flex; align-items: center; gap: var(--s2); margin-bottom: var(--s3); }
.sheet__head h2, .modal__head h2 { flex: 1; min-width: 0; }
.sheet__body, .modal__body { overflow-y: auto; overscroll-behavior: contain; min-height: 0; flex: 1; margin: 0 calc(var(--s4) * -1); padding: 2px var(--s4); }
.sheet__foot, .modal__foot { padding-top: var(--s4); display: grid; gap: var(--s2); }
@media (min-width: 600px) {
  .overlay--sheet { align-items: center; padding: var(--s5); }
  .sheet { border-radius: var(--r-sheet); padding-bottom: var(--s5); animation-name: pop-in; }
  .is-closing .sheet { animation-name: pop-out; }
  .sheet__grabber { display: none; }
  .sheet .sheet__head { margin-top: var(--s3); }
}

.overlay--modal { align-items: center; padding: var(--s4); }
.modal {
  width: 100%; max-width: 420px; max-height: 88vh;
  background: var(--surface-raised); border-radius: var(--r-sheet);
  box-shadow: var(--sh-3);
  padding: var(--s5);
  display: flex; flex-direction: column;
  animation: pop-in var(--t-med) var(--ease-spring) both;
}
.is-closing .modal { animation: pop-out var(--t-fast) var(--ease) both; }
.modal--center { text-align: center; }
.modal--center .modal__icon { margin: 0 auto var(--s4); }
.modal__icon { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; background: var(--accent-tint); color: var(--accent-text); }
.modal__icon .icon { width: 28px; height: 28px; }
@keyframes pop-in { from { opacity: 0; transform: scale(0.94) translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes pop-out { from { opacity: 1; transform: none; } to { opacity: 0; transform: scale(0.97); } }

.toasts {
  position: fixed; z-index: 80; left: 0; right: 0;
  bottom: calc(var(--tabbar-h) + var(--safe-b) + var(--s3));
  display: grid; justify-items: center; gap: var(--s2);
  padding: 0 var(--s4); pointer-events: none;
}
@media (min-width: 900px) { .toasts { bottom: var(--s5); left: var(--sidebar-w); } }
.toast {
  pointer-events: auto;
  display: flex; align-items: center; gap: var(--s3);
  max-width: min(440px, 100%); width: max-content; min-height: 52px;
  padding: 10px 10px 10px var(--s4);
  border-radius: 18px;
  background: var(--text); color: var(--bg);
  box-shadow: var(--sh-3);
  font-size: var(--fs-15); font-weight: 500;
  animation: toast-in var(--t-slow) var(--ease-spring) both;
}
.toast.is-leaving { animation: toast-out var(--t-med) var(--ease) both; }
.toast__icon { width: 22px; height: 22px; flex: none; }
.toast--success .toast__icon { color: var(--success); }
.toast--danger .toast__icon { color: var(--danger); }
.toast--warning .toast__icon { color: var(--warning); }
.toast--info .toast__icon { color: var(--info); }
.toast__msg { flex: 1; min-width: 0; padding-right: var(--s2); }
.toast__action { border: 0; background: transparent; color: var(--accent-tint-2); font-weight: 650; min-height: var(--touch); padding: 0 var(--s3); border-radius: var(--r-sm); }
:root[data-theme="dark"] .toast__action { color: var(--gold-deep); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .toast__action { color: var(--gold-deep); } }
@keyframes toast-in { from { opacity: 0; transform: translateY(16px) scale(0.96); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateY(8px) scale(0.98); } }

/* ---------- 13. Skeleton & empty ---------- */
.skel {
  display: block; border-radius: var(--r-xs);
  background: linear-gradient(90deg, var(--bg-sunken) 0%, var(--surface-2) 40%, var(--bg-sunken) 80%);
  background-size: 300% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
}
.skel--text { height: 14px; margin: 6px 0; }
.skel--title { height: 22px; width: 60%; margin: 4px 0 10px; }
.skel--circle { border-radius: 50%; }
.skel--media { aspect-ratio: 4 / 3; border-radius: var(--r-card); }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }

.empty { display: grid; justify-items: center; text-align: center; gap: var(--s2); padding: var(--s7) var(--s4); }
.empty__art { width: 72px; height: 72px; border-radius: 24px; display: grid; place-items: center; background: var(--accent-tint); color: var(--accent-text); margin-bottom: var(--s2); }
.empty__art .icon { width: 34px; height: 34px; stroke-width: 1.5; }
.empty__title { font-size: var(--fs-20); font-weight: 650; letter-spacing: -0.01em; }
.empty__text { color: var(--text-2); max-width: 34ch; margin: 0; }
.empty__action { margin-top: var(--s3); }

/* ---------- 14. Tabs ---------- */
.tabs { display: flex; gap: var(--s5); border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs__tab {
  position: relative; flex: none;
  min-height: var(--touch); padding: 0 2px;
  background: none; border: 0;
  color: var(--text-3); font-size: var(--fs-15); font-weight: 600;
}
.tabs__tab::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; border-radius: 2px; background: transparent; transition: background var(--t-fast) var(--ease); }
.tabs__tab[aria-selected="true"] { color: var(--text); }
.tabs__tab[aria-selected="true"]::after { background: var(--text); }
.tabs__tab:hover { color: var(--text); }
.tabs__panel { padding-top: var(--s4); }

/* ---------- 15. Avatar ---------- */
.avatar {
  --size: 40px;
  width: var(--size); height: var(--size); border-radius: 50%;
  display: inline-grid; place-items: center; flex: none; overflow: hidden;
  background: var(--av-bg, var(--accent-tint)); color: var(--av-fg, var(--accent-text));
  font-weight: 650; font-size: calc(var(--size) * 0.4); letter-spacing: -0.01em;
  box-shadow: 0 0 0 2px var(--surface);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar--emoji { font-size: calc(var(--size) * 0.52); }
.avatar-stack { display: flex; }
.avatar-stack .avatar + .avatar { margin-left: -10px; }

/* ---------- 16. Stat tiles ---------- */
.stat {
  background: var(--surface); border-radius: var(--r-card);
  box-shadow: 0 0 0 1px var(--line), var(--sh-1);
  padding: var(--s4);
  display: grid; gap: 4px; align-content: start; min-width: 0;
}
.stat__label { font-size: var(--fs-13); color: var(--text-2); font-weight: 500; display: flex; align-items: center; gap: 6px; }
.stat__label .icon { width: 16px; height: 16px; color: var(--text-3); }
.stat__value { font-family: var(--font-num); font-size: var(--fs-28); font-weight: 650; letter-spacing: -0.02em; line-height: 1.15; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.stat__delta { font-size: var(--fs-13); font-weight: 600; display: inline-flex; align-items: center; gap: 2px; }
.stat__delta--up { color: var(--success-ink); }
.stat__delta--down { color: var(--danger-ink); }
.stat__delta--flat { color: var(--text-3); }
.stat__foot { font-size: var(--fs-12); color: var(--text-3); }
.stats { display: grid; gap: var(--s3); grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 900px) { .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* ---------- 17. Bed-seat map ---------- */
.bedmap { display: grid; gap: var(--s5); grid-template-columns: minmax(0, 1fr); }
.bedmap__room { display: grid; gap: var(--s3); }
.bedmap__room-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s2); }
.bedmap__room-name { font-weight: 600; font-size: var(--fs-15); }
.bedmap__room-meta { font-size: var(--fs-13); color: var(--text-3); }
.bedmap__floor {
  display: grid; grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); gap: var(--s2);
  padding: var(--s3); border-radius: var(--r-card);
  background: var(--bg-sunken);
  box-shadow: 0 0 0 1px var(--line) inset;
}
.bed {
  position: relative;
  display: grid; justify-items: center; align-content: center; gap: 4px;
  min-height: 76px; padding: 10px 4px 8px;
  border-radius: 14px;
  border: 1.5px solid var(--bed-free-line);
  background: var(--bed-free);
  color: var(--text);
  transition: transform var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), background var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.bed::before { /* pillow */
  content: ""; width: 58%; height: 9px; border-radius: 5px;
  background: currentColor; opacity: 0.14;
}
.bed__label { font-family: var(--font-num); font-weight: 650; font-size: var(--fs-15); line-height: 1; }
.bed__sub { font-size: var(--fs-11); color: var(--text-3); line-height: 1.1; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
button.bed:hover { border-color: var(--accent); }
button.bed:active { transform: scale(0.95); }
.bed:focus-visible { border-radius: 14px; }
.bed--taken {
  background: var(--bed-taken); border-color: transparent; color: var(--bed-taken-ink); cursor: not-allowed;
  background-image: repeating-linear-gradient(135deg, transparent 0 6px, color-mix(in srgb, var(--bed-taken-ink) 14%, transparent) 6px 7px);
}
.bed--taken .bed__sub { color: var(--bed-taken-ink); }
.bed--from { background: var(--bed-from); border-color: var(--bed-from-line); border-style: dashed; }
.bed--selected, .bed--selected:hover { background: var(--accent); border-color: var(--accent); color: var(--text-on-accent); box-shadow: 0 6px 16px -6px rgba(122, 90, 11, 0.55); }
.bed--selected .bed__sub { color: var(--text-on-accent); opacity: 0.85; }
.bed--selected::after {
  content: ""; position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--success) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 13px no-repeat;
  box-shadow: 0 0 0 2px var(--surface);
}
.bedmap__legend { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); font-size: var(--fs-13); color: var(--text-2); }
.bedmap__legend span { display: inline-flex; align-items: center; gap: 6px; }
.bedmap__swatch { width: 18px; height: 14px; border-radius: 4px; border: 1.5px solid var(--bed-free-line); background: var(--bed-free); }
.bedmap__swatch--taken { background: var(--bed-taken); border-color: transparent; background-image: repeating-linear-gradient(135deg, transparent 0 3px, color-mix(in srgb, var(--bed-taken-ink) 30%, transparent) 3px 4px); }
.bedmap__swatch--from { background: var(--bed-from); border-color: var(--bed-from-line); border-style: dashed; }
.bedmap__swatch--selected { background: var(--accent); border-color: var(--accent); }
.bedmap__door { grid-column: 1 / -1; display: flex; align-items: center; gap: var(--s2); font-size: var(--fs-11); color: var(--text-3); }
.bedmap__door::before, .bedmap__door::after { content: ""; height: 1px; flex: 1; background: var(--line-strong); }

/* ---------- 18. Price tag ---------- */
.price { display: inline-flex; align-items: baseline; gap: 4px; flex-wrap: wrap; }
.price__amount { font-family: var(--font-num); font-weight: 650; font-size: var(--fs-20); letter-spacing: -0.015em; font-variant-numeric: tabular-nums; color: var(--text); }
.price__unit { font-size: var(--fs-15); color: var(--text-2); }
.price__was { font-size: var(--fs-15); color: var(--text-3); text-decoration: line-through; font-family: var(--font-num); }
.price--lg .price__amount { font-size: var(--fs-34); letter-spacing: -0.025em; }
.price--sm .price__amount { font-size: var(--fs-16); }
.price__save { font-size: var(--fs-13); color: var(--success-ink); font-weight: 600; }

/* ---------- 19. Countdown banner ---------- */
.countdown {
  display: flex; align-items: center; gap: var(--s4);
  padding: var(--s4); border-radius: var(--r-card);
  background: var(--accent-tint); color: var(--text);
  position: relative; overflow: hidden;
}
.countdown__clock {
  flex: none; width: 64px; height: 64px; border-radius: 18px;
  background: var(--surface); box-shadow: var(--sh-1);
  display: grid; place-content: center; text-align: center;
  font-family: var(--font-num); line-height: 1;
}
.countdown__days { font-size: var(--fs-28); font-weight: 700; letter-spacing: -0.03em; color: var(--accent-text); font-variant-numeric: tabular-nums; }
.countdown__unit { font-family: var(--font); font-size: var(--fs-11); color: var(--text-2); margin-top: 3px; font-weight: 500; }
.countdown__main { flex: 1; min-width: 0; }
.countdown__title { font-weight: 650; font-size: var(--fs-17); letter-spacing: -0.01em; line-height: 1.3; }
.countdown__text { font-size: var(--fs-15); color: var(--text-2); margin-top: 2px; }
.countdown__cta { margin-top: var(--s3); }
.countdown--urgent { background: var(--warning-tint); }
.countdown--urgent .countdown__days { color: var(--warning-ink); }
.countdown--late { background: var(--danger-tint); }
.countdown--late .countdown__days { color: var(--danger-ink); }
.countdown--calm { background: var(--secondary-tint); }
.countdown--calm .countdown__days { color: var(--secondary); }

/* ---------- 20. QR gate pass ---------- */
.pass {
  position: relative;
  max-width: 340px; margin: 0 auto;
  border-radius: 26px;
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--line), var(--sh-3);
  overflow: hidden;
  text-align: center;
}
.pass__top { padding: var(--s5) var(--s5) var(--s4); background: linear-gradient(180deg, var(--accent-tint), var(--surface)); }
.pass__kind { font-size: var(--fs-13); font-weight: 600; color: var(--accent-text); }
.pass__name { font-size: var(--fs-24); font-weight: 700; letter-spacing: -0.02em; margin-top: 2px; }
.pass__when { color: var(--text-2); font-size: var(--fs-15); margin-top: 2px; }
.pass__qr { padding: var(--s4) var(--s5) var(--s3); display: grid; justify-items: center; }
.pass__code { padding: 0 var(--s5); overflow-wrap: anywhere; word-break: break-all; line-height: 1.35; }
.pass__qr .qr { width: 216px; height: 216px; padding: 12px; background: #fff; border-radius: 18px; box-shadow: 0 0 0 1px rgba(31,26,23,0.1); }
.pass__tear { position: relative; height: 1px; margin: var(--s2) var(--s5); border-top: 2px dashed var(--line-strong); }
.pass__tear::before, .pass__tear::after { content: ""; position: absolute; top: -13px; width: 24px; height: 24px; border-radius: 50%; background: var(--bg); box-shadow: inset 0 0 0 1px var(--line); }
.pass__tear::before { left: calc(var(--s5) * -1 - 12px); }
.pass__tear::after { right: calc(var(--s5) * -1 - 12px); }
.pass__foot { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); padding: var(--s4) var(--s5) var(--s5); text-align: left; }
.pass__k { font-size: var(--fs-12); color: var(--text-3); }
.pass__v { font-weight: 600; font-size: var(--fs-15); font-family: var(--font-num); }
.pass--expired .pass__code { padding: 0 var(--s5); overflow-wrap: anywhere; word-break: break-all; line-height: 1.35; }
.pass__qr .qr { opacity: 0.25; filter: grayscale(1); }
.qr { display: block; image-rendering: pixelated; shape-rendering: crispEdges; }

/* ---------- 21. SOS ---------- */
.sos {
  position: relative;
  width: 132px; height: 132px; border-radius: 50%;
  border: 0;
  background: radial-gradient(circle at 50% 35%, #E8604F, #C2402F 70%);
  color: #fff;
  display: grid; place-content: center; justify-items: center; gap: 2px;
  font-size: var(--fs-24); font-weight: 800; letter-spacing: 0.06em;
  box-shadow: 0 0 0 8px var(--danger-tint), 0 14px 30px -10px rgba(194, 64, 47, 0.7);
  transition: transform var(--t-fast) var(--ease);
}
.sos small { font-size: var(--fs-12); font-weight: 600; letter-spacing: 0; opacity: 0.9; }
.sos:active { transform: scale(0.95); }
.sos:focus-visible { border-radius: 50%; outline-offset: 10px; }
.sos.is-arming::before {
  content: ""; position: absolute; inset: -8px; border-radius: 50%;
  border: 4px solid #fff; border-color: #fff transparent transparent transparent;
  animation: spin 1s linear infinite;
}
.sos--sent { background: var(--success); box-shadow: 0 0 0 8px var(--success-tint); }
.sos-wrap { display: grid; justify-items: center; gap: var(--s4); text-align: center; padding: var(--s4) 0; }
.sos-fab {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: var(--touch); padding: 0 16px; border-radius: var(--r-pill); border: 0;
  background: var(--danger-solid); color: #fff; font-weight: 750; letter-spacing: 0.04em;
  text-decoration: none; flex: none;
  box-shadow: 0 6px 16px -6px rgba(194, 64, 47, 0.7);
}
.sos-fab .icon { width: 18px; height: 18px; }
.sos-fab:focus-visible { border-radius: var(--r-pill); }
.topbar--resident .sos-fab { height: 36px; min-height: 36px; padding: 0 12px; position: relative; font-size: var(--fs-13); }
.topbar--resident .sos-fab::after { content: ""; position: absolute; inset: -4px 0; }
@media (max-width: 430px) {
  .topbar--resident .brand-name small { display: none; }
}
.brand-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.topbar__brand { min-width: 0; }

/* ---------- 22. Leaderboard ---------- */
.leader { display: flex; align-items: center; gap: var(--s3); min-height: 60px; padding: var(--s2) var(--s4); position: relative; }
.leader + .leader::before { content: ""; position: absolute; top: 0; left: 56px; right: 0; border-top: 1px solid var(--line); }
.leader__rank { width: 28px; text-align: center; font-family: var(--font-num); font-weight: 700; font-size: var(--fs-17); color: var(--text-3); flex: none; }
.leader__rank--1 { color: #B8860B; }
.leader__rank--2 { color: #8A8F98; }
.leader__rank--3 { color: #A9683A; }
.leader__name { flex: 1; min-width: 0; font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.leader__name small { display: block; font-weight: 400; font-size: var(--fs-13); color: var(--text-3); }
.leader__score { font-family: var(--font-num); font-weight: 650; font-variant-numeric: tabular-nums; }
.leader--me { background: var(--accent-tint); }
.leader__you { margin-left: 6px; font-size: var(--fs-12); color: var(--accent-text); font-weight: 650; }

/* ---------- 23. Games: word puzzle ---------- */
.wordgrid { display: grid; gap: 6px; width: min(100%, 330px); margin: 0 auto; }
.wordgrid__row { display: grid; grid-template-columns: repeat(var(--len, 5), 1fr); gap: 6px; }
.wordgrid__row.is-shake { animation: shake 420ms var(--ease); }
.tile {
  aspect-ratio: 1; display: grid; place-items: center;
  border-radius: 12px;
  border: 2px solid var(--line-strong);
  background: var(--surface);
  font-size: clamp(1.4rem, 7vw, 1.9rem); font-weight: 750; text-transform: uppercase;
  color: var(--text);
  transition: transform var(--t-fast) var(--ease);
}
.tile--filled { border-color: var(--text-3); animation: tile-pop 120ms var(--ease); }
.tile--hit { background: var(--success); border-color: var(--success); color: #fff; }
.tile--present { background: var(--warning); border-color: var(--warning); color: #1F1A17; }
.tile--miss { background: var(--text-3); border-color: var(--text-3); color: var(--bg); }
.tile--reveal { animation: tile-flip 480ms var(--ease) both; animation-delay: calc(var(--i, 0) * 110ms); }
@keyframes tile-pop { 50% { transform: scale(1.08); } }
@keyframes tile-flip { 0% { transform: rotateX(0); } 50% { transform: rotateX(90deg); } 100% { transform: rotateX(0); } }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

.keyboard { display: grid; gap: 7px; width: 100%; max-width: 500px; margin: var(--s5) auto 0; user-select: none; -webkit-user-select: none; }
.keyboard__row { display: flex; gap: 5px; justify-content: center; }
.key {
  flex: 1 1 0; min-width: 0; max-width: 44px; height: 54px;
  border: 0; border-radius: 9px;
  background: var(--bg-sunken); color: var(--text);
  box-shadow: 0 1px 0 var(--line-strong);
  font-size: var(--fs-16); font-weight: 650; text-transform: uppercase;
  display: grid; place-items: center;
}
.key--wide { flex: 1.6 1 0; max-width: 68px; font-size: var(--fs-12); text-transform: none; }
.key:active { transform: translateY(1px); box-shadow: none; }
.key--hit { background: var(--success); color: #fff; }
.key--present { background: var(--warning); color: #1F1A17; }
.key--miss { background: var(--text-3); color: var(--bg); opacity: 0.6; }
.key:focus-visible { border-radius: 9px; }

.game-tile {
  display: grid; gap: var(--s2); align-content: start;
  padding: var(--s4); border-radius: var(--r-card);
  background: var(--surface); box-shadow: 0 0 0 1px var(--line), var(--sh-1);
  color: inherit; text-decoration: none; min-height: 148px;
  transition: transform var(--t-med) var(--ease), box-shadow var(--t-med) var(--ease);
}
.game-tile:hover { box-shadow: 0 0 0 1px var(--line), var(--sh-2); }
.game-tile:active { transform: scale(0.98); }
.game-tile:focus-visible { border-radius: var(--r-card); }
.game-tile__art { width: 48px; height: 48px; border-radius: 15px; display: grid; place-items: center; background: var(--tile-tint, var(--accent-tint)); color: var(--tile-ink, var(--accent-text)); }
.game-tile__art .icon { width: 26px; height: 26px; }
.game-tile__title { font-weight: 650; font-size: var(--fs-16); margin-top: var(--s2); }
.game-tile__sub { font-size: var(--fs-13); color: var(--text-3); }

/* ---------- 24. Day picker ---------- */
.daypicker { width: 100%; max-width: 360px; }
.daypicker__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--s2); }
.daypicker__month { font-weight: 650; font-size: var(--fs-17); }
.daypicker__grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; text-align: center; }
.daypicker__dow { font-size: var(--fs-12); color: var(--text-3); font-weight: 600; padding: 6px 0; }
.day {
  aspect-ratio: 1; min-height: var(--touch); width: 100%;
  border: 0; background: transparent; border-radius: 50%;
  font-family: var(--font-num); font-size: var(--fs-16); font-weight: 500; color: var(--text);
  display: grid; place-items: center; position: relative;
  font-variant-numeric: tabular-nums;
}
.day:hover:not(:disabled) { background: var(--line); }
.day--today { color: var(--accent-text); font-weight: 750; }
.day--today::after { content: ""; position: absolute; bottom: 7px; width: 4px; height: 4px; border-radius: 50%; background: currentColor; }
.day--selected, .day--selected:hover:not(:disabled) { background: var(--text); color: var(--bg); font-weight: 650; }
.day--selected::after { background: var(--bg); }
.day:disabled { color: var(--text-3); opacity: 0.38; cursor: not-allowed; }
.day--outside { visibility: hidden; }
.day:focus-visible { border-radius: 50%; }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(112px, 100%), 1fr)); gap: var(--s2); }
.slots__opt { justify-content: center; min-width: 0; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ---------- 25. Table (admin) ---------- */
.table-wrap { overflow-x: auto; border-radius: var(--r-card); background: var(--surface); box-shadow: 0 0 0 1px var(--line), var(--sh-1); -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: var(--fs-15); }
.table th, .table td { padding: 12px var(--s4); text-align: left; white-space: nowrap; }
.table thead th { font-size: var(--fs-13); font-weight: 600; color: var(--text-3); background: var(--surface-2); position: sticky; top: 0; border-bottom: 1px solid var(--line); }
.table tbody tr + tr td { border-top: 1px solid var(--line); }
.table tbody tr:hover td { background: var(--surface-2); }
.table .num { text-align: right; font-family: var(--font-num); font-variant-numeric: tabular-nums; }
.table th button { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; min-height: 28px; }
.table th button:focus-visible { outline: 3px solid var(--focus); border-radius: 4px; }
.table tr.is-clickable { cursor: pointer; }
/* On narrow phones, rows become stacked cards */
@media (max-width: 599px) {
  .table--stack thead { display: none; }
  .table--stack, .table--stack tbody, .table--stack tr, .table--stack td { display: block; width: 100%; }
  .table--stack tr { padding: var(--s3) var(--s4); }
  .table--stack tbody tr + tr { border-top: 1px solid var(--line); }
  .table--stack tbody tr + tr td { border-top: 0; }
  .table--stack td { padding: 3px 0; display: flex; justify-content: space-between; gap: var(--s3); white-space: normal; text-align: right; }
  .table--stack td::before { content: attr(data-label); color: var(--text-3); font-size: var(--fs-13); text-align: left; }
  .table--stack td:first-child { font-weight: 600; font-size: var(--fs-16); text-align: left; }
  .table--stack td:first-child::before { display: none; }
  .table-wrap:has(.table--stack) { overflow-x: visible; }
}

/* ---------- 26. Charts ---------- */
.chart { position: relative; }
.chart__title { font-weight: 600; font-size: var(--fs-15); }
.chart__sub { font-size: var(--fs-13); color: var(--text-3); margin-bottom: var(--s3); }
.chart svg { width: 100%; height: auto; overflow: visible; }
.chart__grid { stroke: var(--chart-grid); stroke-width: 1; }
.chart__axis { fill: var(--text-3); font-size: 11px; font-family: var(--font); }
.chart__bar { fill: var(--c1); transition: opacity var(--t-fast) var(--ease); }
.chart__bar--muted { opacity: 0.35; }
.chart__hit { fill: transparent; cursor: default; }
.chart__value { fill: var(--text); font-size: 11px; font-weight: 600; font-family: var(--font-num); }
.chart__tip {
  position: absolute; pointer-events: none; z-index: 2;
  transform: translate(-50%, calc(-100% - 8px));
  background: var(--text); color: var(--bg);
  padding: 6px 10px; border-radius: 10px; font-size: var(--fs-13); white-space: nowrap;
  box-shadow: var(--sh-2);
}
.chart__tip b { font-family: var(--font-num); }
.chart__legend { display: grid; gap: var(--s2); font-size: var(--fs-15); }
.chart__legend-item { display: flex; align-items: center; gap: var(--s2); min-height: 28px; }
.chart__legend-item b { margin-left: auto; font-family: var(--font-num); font-variant-numeric: tabular-nums; }
.chart__swatch { width: 12px; height: 12px; border-radius: 4px; flex: none; }
.donut { display: flex; align-items: center; gap: var(--s5); flex-wrap: wrap; }
.donut__svg { width: 148px; flex: none; position: relative; }
.donut__seg { transition: opacity var(--t-fast) var(--ease); }
.donut__center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; pointer-events: none; }
.donut__total { font-family: var(--font-num); font-weight: 700; font-size: var(--fs-24); letter-spacing: -0.02em; line-height: 1.1; }
.donut__cap { font-size: var(--fs-12); color: var(--text-3); }
.donut .chart__legend { flex: 1; min-width: 160px; }
.c1 { --c: var(--c1); } .c2 { --c: var(--c2); } .c3 { --c: var(--c3); } .c4 { --c: var(--c4); }
.bg-c { background: var(--c); }
.stroke-c { stroke: var(--c); }

/* ---------- 27. Misc ---------- */
.divider-label { display: flex; align-items: center; gap: var(--s3); color: var(--text-3); font-size: var(--fs-13); margin: var(--s4) 0; }
.divider-label::before, .divider-label::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.kv { display: grid; grid-template-columns: auto 1fr; row-gap: var(--s2); font-size: var(--fs-15); margin: 0; }
.kv dt { color: var(--text-2); }
.kv dd { margin: 0; padding-left: var(--s4); text-align: right; font-weight: 550; font-family: var(--font-num); font-variant-numeric: tabular-nums; }
.kv .kv__total { border-top: 1px solid var(--line); padding-top: var(--s2); font-weight: 700; color: var(--text); }
.notice { display: flex; gap: var(--s3); padding: var(--s3) var(--s4); border-radius: var(--r-input); background: var(--info-tint); color: var(--text); font-size: var(--fs-15); }
.notice .icon { color: var(--info-ink); margin-top: 1px; }
.notice--warning { background: var(--warning-tint); } .notice--warning .icon { color: var(--warning-ink); }
.notice--success { background: var(--success-tint); } .notice--success .icon { color: var(--success-ink); }
.notice--danger { background: var(--danger-tint); } .notice--danger .icon { color: var(--danger-ink); }
/* Play review demo account (Google Play review) */
.review-bar { margin: 0 0 12px; padding: 8px 12px; border-radius: var(--r-sm); background: var(--warning-tint); color: var(--warning-ink); font-size: var(--fs-13); line-height: 1.4; }
.offline-bar { position: fixed; top: calc(var(--topbar-h) + var(--safe-t) + 8px); left: 50%; transform: translateX(-50%); z-index: 40; background: var(--text); color: var(--bg); padding: 6px 14px; border-radius: var(--r-pill); font-size: var(--fs-13); font-weight: 600; box-shadow: var(--sh-2); }
.boot { min-height: 100vh; display: grid; place-items: center; }
.boot__mark { width: 64px; height: 64px; border-radius: 18px; animation: breathe 1.6s ease-in-out infinite; }
@keyframes breathe { 50% { transform: scale(0.94); opacity: 0.7; } }
.more-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s2); }
.more-grid a { display: grid; justify-items: center; gap: 6px; padding: var(--s3) var(--s2); border-radius: var(--r-input); text-decoration: none; color: var(--text); font-size: var(--fs-13); font-weight: 550; background: var(--bg-sunken); min-height: 76px; align-content: center; text-align: center; }
.more-grid a[aria-current="page"] { background: var(--accent-tint); color: var(--accent-text); }

/* Styleguide only */
.sg-swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: var(--s3); }
.sg-swatch { display: grid; gap: 6px; font-size: var(--fs-12); color: var(--text-2); }
.sg-swatch i { display: block; height: 56px; border-radius: var(--r-sm); box-shadow: 0 0 0 1px var(--line) inset; background: var(--sw); }
.sg-nav { position: sticky; top: calc(var(--topbar-h) + var(--safe-t)); z-index: 5; background: var(--bg); padding: var(--s2) 0; margin: 0 calc(var(--s4) * -1); padding-left: var(--s4); padding-right: var(--s4); }
@media (min-width: 900px) { .sg-nav { margin: 0; padding-left: 0; padding-right: 0; } }

/* ---------- 28. Reduced motion & forced colors ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0ms !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .skel { animation: none; }
  .btn__spinner { animation: spin 1.2s linear infinite !important; animation-iteration-count: infinite !important; animation-duration: 1.2s !important; }
}
@media (forced-colors: active) {
  .btn, .chip, .bed, .segmented__opt[aria-checked="true"], .tile { border: 1px solid CanvasText; }
  .bed--selected { outline: 3px solid Highlight; }
}

/* Card rendered as a button */
button.card { display: block; width: 100%; text-align: left; border: 0; font: inherit; color: inherit; }
.app__col { min-width: 0; }

/* AI features (owner 4-Nov): #/admin/ai */
.ai-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-4, 16px); }
.ai-row { display: grid; gap: var(--s-2, 8px); padding-bottom: var(--s-4, 16px); border-bottom: 1px solid var(--line, rgba(0,0,0,.08)); }
.ai-row:last-child { border-bottom: 0; padding-bottom: 0; }
.ai-row__meta { gap: var(--s-2, 8px); align-items: center; }
/* Admin by voice (all.adminVoice): "Ask Goldy to change something" box on #/admin/ai. */
.adm-cmd__mic { display: flex; justify-content: flex-end; }
.adm-cmd__ex { gap: var(--s-2, 8px); }
.adm-cmd__preview { margin-top: var(--s-3, 12px); gap: var(--s-3, 12px); }

/* AI stream pg-life (owner 4-Nov): "Just tell us", Find my bed, ID photo fill, parent notes, all-apps panel. */
.pl-q { display: grid; gap: var(--s-2, 8px); }
.pl-beds, .pl-notes, .pl-mini { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-2, 8px); }
.pl-bed { display: grid; gap: 2px; padding: var(--s-3, 12px); border: 1px solid var(--line, rgba(0,0,0,.08)); border-radius: var(--r-md, 12px); color: inherit; text-decoration: none; }
.pl-bed:hover, .pl-bed:focus-visible { border-color: var(--accent, currentColor); }
.pl-notes li { padding-bottom: var(--s-2, 8px); border-bottom: 1px solid var(--line, rgba(0,0,0,.08)); }
.pl-notes li:last-child { border-bottom: 0; }
.pl-notes p { margin: 4px 0 0; }
.pl-mini li { font-size: .875rem; }
.pl-sos { align-items: center; }

/* AI pg-ops (owner 4-Nov): screenshot reader, accounts badge, today's brief, meal forecast, price suggestions, welcome guide */
.pgops-read { width: 100%; }
.pgops-check { display: flex; flex-wrap: wrap; gap: var(--s-2, 8px); align-items: center; }
.pgops-brief { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-3, 12px); grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }
.pgops-brief li { display: grid; grid-template-columns: auto 1fr; column-gap: var(--s-2, 8px); align-items: center; }
.pgops-brief__icon { grid-row: span 3; color: var(--accent-deep, #7A5A0B); }
.pgops-brief__label { font-size: .9em; opacity: .85; }
.pgops-fc { display: grid; gap: var(--s-4, 16px); grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); }
.pgops-fc__day { display: grid; gap: var(--s-2, 8px); }
.pgops-fc__date { font-weight: 600; }
.pgops-fc__meal { display: grid; grid-template-columns: 1fr auto; column-gap: var(--s-2, 8px); }
.pgops-fc__meal .t-foot { grid-column: 1 / -1; }
.pgops-fc__meal b { font-size: 1.25em; }
.pgops-share { display: flex; flex-wrap: wrap; gap: var(--s-2, 8px); }
.pgops-adv { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-3, 12px); }
.pgops-adv li { display: grid; gap: 2px; padding-bottom: var(--s-3, 12px); border-bottom: 1px solid var(--line, rgba(0,0,0,.08)); }
.pgops-adv li:last-child { border-bottom: 0; }
.pgops-guide p { margin: 0; }

/* ---------- Growth: profile ring, reward cards (owner approved Nov 2026) ----------
   grey = joined, blue = profile complete, green = ID verified, gold = visit booked / moved in.
   Locked rewards grey with a lock, active rewards gold: one colour language everywhere. */
.pring { --pring-tone: #9A9088; display: inline-flex; flex-direction: column; align-items: center; gap: 6px; flex: none; }
.pring--blue { --pring-tone: var(--info); }
.pring--green { --pring-tone: var(--success); }
.pring--gold { --pring-tone: var(--gold); }
.pring__dial { position: relative; width: var(--pring-size); height: var(--pring-size); display: inline-grid; place-items: center; }
.pring__svg { position: absolute; inset: 0; overflow: visible; }
.pring__track { stroke: var(--line-strong); }
.pring__arc { stroke: var(--pring-tone); transition: stroke-dasharray 700ms cubic-bezier(.2,.8,.2,1); }
.pring--gold .pring__svg { filter: drop-shadow(0 1px 3px rgba(184, 134, 11, 0.35)); }
.pring__face { position: relative; display: inline-grid; place-items: center; }
.pring__face .avatar { box-shadow: none; }
.pring__badge { position: absolute; right: -2px; bottom: -2px; width: var(--pring-badge); height: var(--pring-badge); border-radius: 50%;
  display: grid; place-items: center; background: var(--pring-tone); color: #fff; box-shadow: 0 0 0 2px var(--surface); }
.pring--gold .pring__badge { background: linear-gradient(135deg, #E9C46A, #9C6E0C); }
.pring__badge .icon { width: 62%; height: 62%; }
.pring__label { font-size: var(--fs-12); font-weight: 600; color: var(--text-2); }
@media (prefers-reduced-motion: reduce) { .pring__arc { transition: none; } }

.pring-chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font-size: var(--fs-12); font-weight: 600;
  background: var(--bg-sunken); color: var(--text-2); white-space: nowrap; }
.pring-chip--blue { background: var(--info-tint); color: var(--info-ink); }
.pring-chip--green { background: var(--success-tint); color: var(--success-ink); }
.pring-chip--gold { background: var(--accent-tint); color: var(--accent-text); }

.gw-card { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: var(--r-card, 16px); position: relative; overflow: hidden; }
.gw-card--locked { background: var(--bg-sunken); color: var(--text-2); box-shadow: inset 0 0 0 1px var(--line-strong); }
.gw-card--active { background: linear-gradient(135deg, #FFF6DD 0%, #F6E3B0 60%, #EBCB7E 100%); color: #4A3606; box-shadow: 0 6px 20px rgba(184, 134, 11, 0.22); }
.gw-card__icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.gw-card--locked .gw-card__icon { background: var(--surface); color: var(--text-3); }
.gw-card--active .gw-card__icon { background: rgba(255, 255, 255, 0.7); color: #7A5A0B; }
.gw-card__text { display: grid; gap: 2px; min-width: 0; flex: 1; }
.gw-card__title { font-weight: 650; font-size: var(--fs-15); }
.gw-card__sub { font-size: var(--fs-13); opacity: 0.85; }
.gw-card__pts { display: grid; justify-items: end; line-height: 1; }
.gw-card__pts .t-num { font-family: var(--font-num); font-size: var(--fs-24); font-weight: 700; }
.gw-card__unit { font-size: var(--fs-11); text-transform: uppercase; letter-spacing: .06em; opacity: .75; }
.gw-card--locked .gw-card__pts .t-num { color: var(--text-3); }
.gw-card--celebrate::after { content: ''; position: absolute; inset: -40%; background: radial-gradient(circle at 20% 30%, rgba(255,255,255,.9) 0 2px, transparent 3px),
  radial-gradient(circle at 70% 20%, rgba(255,255,255,.8) 0 2px, transparent 3px), radial-gradient(circle at 40% 80%, rgba(255,255,255,.8) 0 2px, transparent 3px);
  animation: gw-sparkle 2.4s ease-out 1; pointer-events: none; }
@keyframes gw-sparkle { from { transform: translateY(20%); opacity: 1; } to { transform: translateY(-20%); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .gw-card--celebrate::after { animation: none; display: none; } }
:root[data-theme="dark"] .gw-card--active { background: linear-gradient(135deg, #4A3A12, #6B521A); color: #FBEBC0; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .gw-card--active { background: linear-gradient(135deg, #4A3A12, #6B521A); color: #FBEBC0; } }

.gw-head { display: flex; align-items: center; gap: 16px; }
.gw-nudge { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px; background: var(--info-tint); color: var(--info-ink);
  font-weight: 600; font-size: var(--fs-15); text-decoration: none; border: 0; width: 100%; text-align: left; cursor: pointer; }
.gw-nudge .icon { flex: none; }
.gw-missing { margin: 4px 0 0; padding-left: 20px; font-size: var(--fs-13); color: var(--text-2); }
.gw-female { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; border-radius: 12px; background: var(--bg-sunken); }
.gw-female__v { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.gw-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.gw-stat { background: var(--surface); border-radius: 14px; padding: 12px 8px; text-align: center; box-shadow: 0 0 0 1px var(--line); }
.gw-stat b { display: block; font-family: var(--font-num); font-size: var(--fs-24); }
.gw-stat span { font-size: var(--fs-12); color: var(--text-2); }
.gw-code { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 14px; border-radius: 14px; background: var(--surface);
  box-shadow: 0 0 0 1px var(--line-strong); font-family: var(--font-num); font-size: var(--fs-20); letter-spacing: .08em; }
.gw-hero { border-radius: 20px; padding: 20px; background: radial-gradient(120% 120% at 0% 0%, #FFF6DD 0%, #F3DFA8 55%, #E4C273 100%); color: #3E2C05; }
:root[data-theme="dark"] .gw-hero { background: radial-gradient(120% 120% at 0% 0%, #4A3A12, #2B2209); color: #FBEBC0; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .gw-hero { background: radial-gradient(120% 120% at 0% 0%, #4A3A12, #2B2209); color: #FBEBC0; } }
.gw-hero h2 { margin: 0 0 6px; font-size: var(--fs-24); letter-spacing: -0.01em; }
.gw-steps { display: grid; gap: 10px; counter-reset: gw; margin: 0; padding: 0; list-style: none; }
.gw-steps li { display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: start; font-size: var(--fs-15); }
.gw-steps li::before { counter-increment: gw; content: counter(gw); width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent-tint); color: var(--accent-text); font-weight: 700; font-size: var(--fs-13); }
.adm-person--ring { display: inline-flex; align-items: center; gap: 10px; }
