/* =====================================================================
   GymMunshi UI · v1.0
   Components built only from tokens (../tokens/tokens.css).
   Load order: tokens.css → gm-ui.css → your page CSS.
   All classes start with gm- so the kit never collides with a project.
   No framework, no build step. Works with server-rendered HTML + htmx.
   ===================================================================== */

/* ---------- 1. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--gm-bg);
  color: var(--gm-text);
  font: var(--gm-weight-regular) var(--gm-text-base)/var(--gm-leading) var(--gm-font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg, video { max-width: 100%; }
a { color: var(--gm-accent-text); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--gm-accent-hover); }
:focus-visible { outline: 2px solid var(--gm-focus); outline-offset: 2px; border-radius: var(--gm-radius-sm); }
::selection { background: var(--gm-accent-soft); }
hr { border: 0; border-top: 1px solid var(--gm-line); margin: var(--gm-space-6) 0; }
[hidden] { display: none !important; }

.gm-h1, .gm-h2, .gm-h3, .gm-h4 { margin: 0; font-family: var(--gm-font-display); color: var(--gm-text); text-wrap: balance; }
.gm-h1 { font-size: clamp(36px, 6vw, var(--gm-text-6xl)); font-weight: var(--gm-weight-hero); line-height: 1; letter-spacing: -0.035em; }
.gm-h2 { font-size: clamp(28px, 3.8vw, var(--gm-text-4xl)); font-weight: var(--gm-weight-display); line-height: 1.08; letter-spacing: -0.03em; }
.gm-h3 { font-size: var(--gm-text-xl); font-weight: 700; line-height: 1.25; letter-spacing: -0.015em; }
.gm-h4 { font-size: var(--gm-text-lg); font-weight: 700; line-height: 1.3; }
.gm-lede { font-size: var(--gm-text-lg); color: var(--gm-text-2); max-width: 62ch; margin: 0; }
.gm-text-2 { color: var(--gm-text-2); }
.gm-muted { color: var(--gm-muted); }
.gm-small { font-size: var(--gm-text-sm); }
.gm-eyebrow { font: var(--gm-weight-medium) var(--gm-text-xs)/1 var(--gm-font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--gm-accent-text); }
.gm-mono, .gm-money { font-family: var(--gm-font-mono); font-variant-numeric: tabular-nums; }
.gm-money { font-weight: var(--gm-weight-medium); white-space: nowrap; }
.gm-kbd { font: var(--gm-weight-medium) var(--gm-text-xs)/1 var(--gm-font-mono); padding: 3px 6px; border-radius: 5px; border: 1px solid var(--gm-line-strong); border-bottom-width: 2px; background: var(--gm-surface); color: var(--gm-text-2); }
.gm-code { font: var(--gm-text-sm)/1.7 var(--gm-font-mono); background: var(--gm-surface-3); padding: 2px 6px; border-radius: 5px; }
.gm-pre { margin: 0; font: var(--gm-text-sm)/1.7 var(--gm-font-mono); background: var(--gm-elevated); color: #e2e8f0; padding: var(--gm-space-4) var(--gm-space-5); border-radius: var(--gm-radius-lg); overflow-x: auto; }

/* ---------- 2. Layout ---------- */
.gm-container { width: 100%; max-width: var(--gm-container); margin-inline: auto; padding-inline: var(--gm-gutter); }
.gm-stack { display: flex; flex-direction: column; gap: var(--gm-gap, var(--gm-space-4)); }
.gm-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--gm-gap, var(--gm-space-3)); }
.gm-row--between { justify-content: space-between; }
.gm-grid { display: grid; gap: var(--gm-gap, var(--gm-space-4)); grid-template-columns: repeat(auto-fill, minmax(min(var(--gm-min, 240px), 100%), 1fr)); }
/* Fill the row: items stretch to share the width instead of leaving empty columns (marketing pages, short lists) */
.gm-grid--fit { grid-template-columns: repeat(auto-fit, minmax(min(var(--gm-min, 240px), 100%), 1fr)); }
.gm-spacer { flex: 1; }
.gm-divider { height: 1px; background: var(--gm-line); border: 0; margin: 0; }
.gm-section { padding-block: clamp(48px, 7vw, 96px); }
.gm-bg-grid {
  background-image: linear-gradient(var(--gm-grid) 1px, transparent 1px), linear-gradient(90deg, var(--gm-grid) 1px, transparent 1px);
  background-size: 56px 56px;
}

/* ---------- 3. Buttons ---------- */
.gm-btn {
  --_bg: var(--gm-surface); --_fg: var(--gm-text); --_bd: var(--gm-line-strong); --_bg-h: var(--gm-surface-3);
  display: inline-flex; align-items: center; justify-content: center; gap: var(--gm-space-2);
  height: var(--gm-control-h); padding-inline: var(--gm-space-4);
  border: 1px solid var(--_bd); border-radius: var(--gm-radius-md);
  background: var(--_bg); color: var(--_fg);
  font: var(--gm-weight-semibold) var(--gm-text-md)/1 var(--gm-font-body); white-space: nowrap;
  text-decoration: none; cursor: pointer; user-select: none;
  transition: background-color var(--gm-fast) ease, border-color var(--gm-fast) ease, transform var(--gm-fast) ease, box-shadow var(--gm-fast) ease;
}
.gm-btn:hover { background: var(--_bg-h); color: var(--_fg); }
.gm-btn:active { transform: translateY(1px); }
.gm-btn:disabled, .gm-btn[aria-disabled="true"] { opacity: .5; pointer-events: none; }
.gm-btn--primary { --_bg: var(--gm-accent); --_fg: var(--gm-on-accent); --_bd: transparent; --_bg-h: var(--gm-accent-hover); box-shadow: 0 8px 22px -12px var(--gm-accent); }
.gm-btn--dark { --_bg: var(--gm-contrast); --_fg: var(--gm-on-contrast); --_bd: transparent; --_bg-h: var(--gm-contrast-hover); }
.gm-btn--ghost { --_bg: transparent; --_bd: transparent; --_fg: var(--gm-text-2); --_bg-h: var(--gm-surface-3); }
.gm-btn--danger { --_bg: var(--gm-danger-fill); --_fg: #fff; --_bd: transparent; --_bg-h: var(--gm-danger); }
.gm-btn--success { --_bg: var(--gm-success-fill); --_fg: #fff; --_bd: transparent; --_bg-h: var(--gm-success); }
.gm-btn--sm { height: var(--gm-control-h-sm); padding-inline: var(--gm-space-3); font-size: var(--gm-text-sm); border-radius: var(--gm-radius-sm); }
.gm-btn--lg { height: var(--gm-control-h-lg); padding-inline: var(--gm-space-6); font-size: var(--gm-text-base); }
.gm-btn--block { width: 100%; }
.gm-btn--icon { width: var(--gm-control-h); padding: 0; }
.gm-btn[aria-busy="true"] { position: relative; color: transparent !important; pointer-events: none; }
.gm-btn[aria-busy="true"]::after {
  content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid var(--_fg); border-right-color: transparent; animation: gm-spin .7s linear infinite;
}
@keyframes gm-spin { to { transform: rotate(360deg); } }

/* ---------- 4. Forms ---------- */
.gm-field { display: grid; gap: 6px; align-content: start; }
.gm-label { font-size: var(--gm-text-sm); font-weight: var(--gm-weight-semibold); color: var(--gm-text); }
.gm-label .gm-req { color: var(--gm-accent-text); }
.gm-hint { font-size: var(--gm-text-sm); color: var(--gm-muted); }
.gm-error { font-size: var(--gm-text-sm); color: var(--gm-danger); }
.gm-input, .gm-select, .gm-textarea {
  width: 100%; height: var(--gm-control-h); padding: 0 var(--gm-space-3);
  background: var(--gm-surface); color: var(--gm-text);
  border: 1px solid var(--gm-line-strong); border-radius: var(--gm-radius-md);
  font: var(--gm-text-base) var(--gm-font-body);
  transition: border-color var(--gm-fast) ease, box-shadow var(--gm-fast) ease;
}
.gm-textarea { height: auto; min-height: 96px; padding: var(--gm-space-3); resize: vertical; line-height: var(--gm-leading); }
.gm-select { appearance: none; padding-right: 36px;
  background-image: linear-gradient(45deg, transparent 50%, var(--gm-muted) 50%), linear-gradient(135deg, var(--gm-muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.gm-input::placeholder, .gm-textarea::placeholder { color: var(--gm-placeholder); }
.gm-input:hover, .gm-select:hover, .gm-textarea:hover { border-color: var(--gm-muted); }
.gm-input:focus, .gm-select:focus, .gm-textarea:focus { outline: none; border-color: var(--gm-accent); box-shadow: 0 0 0 3px var(--gm-accent-soft); }
.gm-input[aria-invalid="true"], .gm-select[aria-invalid="true"], .gm-textarea[aria-invalid="true"] { border-color: var(--gm-danger-fill); box-shadow: 0 0 0 3px var(--gm-danger-soft); }
.gm-input:disabled, .gm-select:disabled, .gm-textarea:disabled { background: var(--gm-surface-2); color: var(--gm-muted); cursor: not-allowed; }
.gm-input-group { display: flex; align-items: stretch; }
.gm-input-group > .gm-addon {
  display: inline-flex; align-items: center; padding-inline: var(--gm-space-3);
  border: 1px solid var(--gm-line-strong); background: var(--gm-surface-2); color: var(--gm-muted);
  font: var(--gm-weight-medium) var(--gm-text-md) var(--gm-font-mono);
}
.gm-input-group > .gm-addon:first-child { border-right: 0; border-radius: var(--gm-radius-md) 0 0 var(--gm-radius-md); }
.gm-input-group > .gm-addon:last-child { border-left: 0; border-radius: 0 var(--gm-radius-md) var(--gm-radius-md) 0; }
.gm-input-group > .gm-input:not(:first-child) { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.gm-input-group > .gm-input:not(:last-child) { border-top-right-radius: 0; border-bottom-right-radius: 0; }

.gm-check, .gm-radio { display: inline-flex; align-items: center; gap: var(--gm-space-2); font-size: var(--gm-text-md); cursor: pointer; }
/* Tick boxes and radio dots (kit 1.12): drawn by us, not by the browser, so they look the same everywhere and in both
   themes. A soft box that fills with the accent and draws its tick in; the radio grows its dot. */
.gm-check input, .gm-radio input { appearance: none; -webkit-appearance: none; flex: none; width: 20px; height: 20px; margin: 0; cursor: pointer; position: relative;
  background: var(--gm-surface); border: 1.5px solid var(--gm-line-strong); box-shadow: inset 0 1px 2px rgba(0, 0, 0, .06);
  transition: background-color var(--gm-fast) var(--gm-ease), border-color var(--gm-fast) var(--gm-ease), box-shadow var(--gm-fast) var(--gm-ease), transform var(--gm-fast) var(--gm-ease); }
.gm-check input { border-radius: 6px; }
.gm-radio input { border-radius: 50%; }
.gm-check:hover input:not(:disabled), .gm-radio:hover input:not(:disabled) { border-color: var(--gm-accent); box-shadow: 0 0 0 4px var(--gm-accent-soft); }
.gm-check input:active:not(:disabled), .gm-radio input:active:not(:disabled) { transform: scale(.92); }
.gm-check input::after { content: ""; position: absolute; inset: 0; background: #fff; -webkit-mask: var(--gm-icon-check) center / 14px no-repeat; mask: var(--gm-icon-check) center / 14px no-repeat;
  transform: scale(0); transition: transform var(--gm-base) cubic-bezier(.3, 1.6, .5, 1); }
.gm-check input:checked, .gm-check input:indeterminate { background: var(--gm-accent); border-color: var(--gm-accent); box-shadow: 0 1px 2px rgba(225, 29, 72, .35); }
.gm-check input:checked::after { transform: scale(1); }
.gm-check input:indeterminate::after { -webkit-mask: none; mask: none; inset: 8px 4px; border-radius: 2px; transform: scale(1); }
.gm-radio input::after { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: #fff; transform: scale(0); transition: transform var(--gm-base) cubic-bezier(.3, 1.6, .5, 1); }
.gm-radio input:checked { background: var(--gm-accent); border-color: var(--gm-accent); box-shadow: 0 1px 2px rgba(225, 29, 72, .35); }
.gm-radio input:checked::after { transform: scale(1); }
.gm-check input:focus-visible, .gm-radio input:focus-visible { outline: 2px solid var(--gm-focus); outline-offset: 2px; }
.gm-check input:disabled, .gm-radio input:disabled { opacity: .45; cursor: not-allowed; }
.gm-check:has(input:disabled), .gm-radio:has(input:disabled) { cursor: not-allowed; color: var(--gm-text-3); }
.gm-switch { display: inline-flex; align-items: center; gap: var(--gm-space-3); cursor: pointer; font-size: var(--gm-text-md); }
/* The switch (kit 1.12): a wider, softer pill. The knob slides with a little spring, stretches while pressed, and the
   track glows in the accent when on. */
.gm-switch input { appearance: none; -webkit-appearance: none; width: 46px; height: 26px; margin: 0; border-radius: var(--gm-radius-full); position: relative; cursor: pointer; border: 0;
  background: var(--gm-line-strong); box-shadow: inset 0 1px 3px rgba(0, 0, 0, .18);
  transition: background-color var(--gm-base) var(--gm-ease), box-shadow var(--gm-base) var(--gm-ease); }
.gm-switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: var(--gm-radius-full); background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .28), 0 2px 6px rgba(0, 0, 0, .14); transition: transform var(--gm-base) cubic-bezier(.3, 1.4, .5, 1), width var(--gm-fast) var(--gm-ease), left var(--gm-fast) var(--gm-ease); }
.gm-switch:hover input:not(:disabled) { box-shadow: inset 0 1px 3px rgba(0, 0, 0, .18), 0 0 0 4px var(--gm-accent-soft); }
.gm-switch input:active:not(:disabled)::after { width: 25px; }
.gm-switch input:checked { background: var(--gm-accent); box-shadow: inset 0 1px 2px rgba(0, 0, 0, .12), 0 2px 10px rgba(225, 29, 72, .32); }
.gm-switch input:checked::after { transform: translateX(20px); }
.gm-switch input:checked:active:not(:disabled)::after { left: -2px; }
.gm-switch input { flex: none; }
.gm-switch input:focus-visible { outline: 2px solid var(--gm-focus); outline-offset: 2px; border-radius: var(--gm-radius-full); }
.gm-switch input:disabled { opacity: .5; cursor: not-allowed; }
.gm-switch:has(input:disabled) { cursor: not-allowed; }
/* its words: a title, and under it one small line saying what it does */
.gm-switch__text { display: grid; gap: 2px; min-width: 0; }
.gm-switch__text small { font-size: var(--gm-text-xs); color: var(--gm-text-3); font-weight: 400; }
/* in a list of settings: words on the left, the switch at the right end, a line between rows */
.gm-switch--row { display: flex; flex-direction: row-reverse; justify-content: space-between; padding: var(--gm-space-3) 0; border-bottom: 1px solid var(--gm-line); }
.gm-switch--row:last-of-type { border-bottom: 0; }
.gm-switch--row > .gm-switch__text { flex: 1; }
/* Pick many (kit 1.11): a dropdown with a search box and tick boxes, for choosing several of many (gyms, plans, members).
   The list opens in the flow of the form, so it is never cut off inside a dialog. */
.gm-pick { display: block; }
.gm-pick > summary { list-style: none; cursor: pointer; display: flex; align-items: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gm-pick > summary::-webkit-details-marker { display: none; }
.gm-pick > summary.is-empty { color: var(--gm-text-3); }
.gm-pick__panel { margin-top: var(--gm-space-2); padding: var(--gm-space-2); border: 1px solid var(--gm-line); border-radius: var(--gm-radius-lg); background: var(--gm-surface-2); display: grid; gap: var(--gm-space-2); }
.gm-pick__list { max-height: 220px; overflow-y: auto; display: grid; gap: 2px; }
.gm-pick__item { display: flex; padding: var(--gm-space-2); border-radius: var(--gm-radius-sm); align-items: flex-start; }
.gm-pick__item:hover { background: var(--gm-surface-3); }
.gm-pick__item[hidden] { display: none; }
.gm-pick__item > span { display: grid; gap: 1px; min-width: 0; }
.gm-pick__item small { font-size: var(--gm-text-xs); color: var(--gm-text-3); overflow: hidden; text-overflow: ellipsis; }
.gm-pick__foot { display: flex; justify-content: space-between; gap: var(--gm-space-2); font-size: var(--gm-text-sm); }
.gm-pick__foot button { background: none; border: 0; padding: 2px 4px; color: var(--gm-accent-text, var(--gm-accent)); font: inherit; font-size: var(--gm-text-sm); cursor: pointer; }
.gm-pick__none { color: var(--gm-text-3); font-size: var(--gm-text-sm); padding: var(--gm-space-2); }
/* Field chips: words that can be put into a message. A tap adds the field where the cursor is (gm-ui.js). */
.gm-fields { display: flex; flex-wrap: wrap; gap: var(--gm-space-2); align-items: center; }
.gm-fields__label { font-size: var(--gm-text-sm); color: var(--gm-text-3); }
.gm-field-chip { display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 var(--gm-space-3); border-radius: var(--gm-radius-full); border: 1px dashed var(--gm-line-strong);
  background: var(--gm-surface-2); color: var(--gm-text); font: inherit; font-size: var(--gm-text-sm); cursor: pointer; transition: border-color var(--gm-base) var(--gm-ease), background-color var(--gm-base) var(--gm-ease); }
.gm-field-chip::before { content: "+"; color: var(--gm-accent); font-weight: 600; }
.gm-field-chip:hover { border-color: var(--gm-accent); background: var(--gm-surface-3); }
.gm-range { width: 100%; height: 32px; margin: 0; accent-color: var(--gm-accent); cursor: pointer; }
/* Form layout: one column on phones, two from 560 px. Add .gm-span-2 to a field to take the full row. */
.gm-form-grid { display: grid; gap: var(--gm-space-4); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 560px) { .gm-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .gm-form-grid > .gm-span-2 { grid-column: 1 / -1; } }
/* Honeypot for spam bots: keep it in the DOM but out of sight */
.gm-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- 5. Cards & tiles ---------- */
.gm-card { background: var(--gm-surface); border: 1px solid var(--gm-line); border-radius: var(--gm-radius-lg); box-shadow: var(--gm-shadow-sm); }
.gm-card__header { display: flex; align-items: center; justify-content: space-between; gap: var(--gm-space-3); padding: var(--gm-space-4) var(--gm-space-5); border-bottom: 1px solid var(--gm-line); }
.gm-card__title { margin: 0; font: 700 var(--gm-text-lg)/1.3 var(--gm-font-display); letter-spacing: -0.01em; }
.gm-card__body { padding: var(--gm-space-5); }
.gm-card__footer { display: flex; gap: var(--gm-space-2); justify-content: flex-end; padding: var(--gm-space-3) var(--gm-space-5); border-top: 1px solid var(--gm-line); background: var(--gm-surface-2); border-radius: 0 0 var(--gm-radius-lg) var(--gm-radius-lg); }
.gm-card--flat { box-shadow: none; }
.gm-card--raised { box-shadow: var(--gm-shadow-md); }
.gm-card--accent { border-color: var(--gm-accent-line); background: linear-gradient(180deg, var(--gm-accent-soft), transparent 55%), var(--gm-surface); }

.gm-stat { display: grid; gap: 6px; padding: var(--gm-space-5); background: var(--gm-surface); border: 1px solid var(--gm-line); border-radius: var(--gm-radius-lg); }
.gm-stat__label { font-size: var(--gm-text-sm); color: var(--gm-muted); }
.gm-stat__value { font: 800 var(--gm-text-3xl)/1.05 var(--gm-font-display); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.gm-stat__meta { font: var(--gm-text-xs)/1.4 var(--gm-font-mono); color: var(--gm-muted); }
.gm-stat--alert { border-color: var(--gm-accent-line); background: linear-gradient(180deg, var(--gm-accent-soft), transparent 80%), var(--gm-surface); }
.gm-stat--alert .gm-stat__value { color: var(--gm-accent-text); }
.gm-trend-up { color: var(--gm-success); } .gm-trend-down { color: var(--gm-danger); }

/* ---------- 6. Badges & status ---------- */
.gm-badge {
  --_c: var(--gm-text-2); --_bg: var(--gm-surface-3);
  display: inline-flex; align-items: center; gap: 6px; height: 22px; padding-inline: 8px;
  border-radius: var(--gm-radius-sm); background: var(--_bg); color: var(--_c);
  font: 600 11px/1 var(--gm-font-mono); letter-spacing: .04em; text-transform: uppercase; white-space: nowrap;
}
.gm-badge--success { --_c: var(--gm-success); --_bg: var(--gm-success-soft); }
.gm-badge--warning { --_c: var(--gm-warning); --_bg: var(--gm-warning-soft); }
.gm-badge--danger  { --_c: var(--gm-danger);  --_bg: var(--gm-danger-soft); }
.gm-badge--info    { --_c: var(--gm-info);    --_bg: var(--gm-info-soft); }
.gm-badge--accent  { --_c: var(--gm-accent-text); --_bg: var(--gm-accent-soft); }
.gm-badge--solid   { --_c: var(--gm-on-accent); --_bg: var(--gm-accent); }
.gm-pill { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: 28px; padding: 3px 12px; border-radius: var(--gm-radius-full); border: 1px solid var(--gm-line-strong); background: var(--gm-surface); font-size: var(--gm-text-sm); color: var(--gm-text-2); }

/* Membership status: always pair colour with a word, never colour alone */
.gm-status { display: inline-flex; align-items: center; gap: 7px; font-size: var(--gm-text-sm); font-weight: var(--gm-weight-semibold); color: var(--gm-text); }
.gm-status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--_dot, var(--gm-muted)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--_dot, var(--gm-muted)) 20%, transparent); }
.gm-status--active   { --_dot: var(--gm-state-active); }
.gm-status--expiring { --_dot: var(--gm-state-expiring); }
.gm-status--expired  { --_dot: var(--gm-state-expired); }
.gm-status--frozen   { --_dot: var(--gm-state-frozen); }
.gm-status--live::before { animation: gm-pulse 1.8s ease-in-out infinite; }
@keyframes gm-pulse { 50% { box-shadow: 0 0 0 6px transparent; } }

/* ---------- 6b. Line icons as masks, and the tick ----------
   One drawing of each small icon, used by alerts, checklists and gm-tick, so they never differ.
   <span class="gm-tick" aria-label="Done"></span>  (gm-tick--sm for 24px) */
:root {
  --gm-icon-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E");
  --gm-icon-cross: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 6L6 18M6 6l12 12'/%3E%3C/svg%3E");
  --gm-icon-warn: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 6v7M12 17.5v.5'/%3E%3C/svg%3E");
  --gm-icon-info: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 11v6.5M12 6.5v.5'/%3E%3C/svg%3E");
}
.gm-tick { display: inline-grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 10px; color: var(--gm-success); background: var(--gm-success-soft); border: 1px solid color-mix(in srgb, var(--gm-success) 35%, transparent); }
.gm-tick::before { content: ""; width: 16px; height: 16px; background: currentColor; -webkit-mask: var(--gm-icon-check) center / contain no-repeat; mask: var(--gm-icon-check) center / contain no-repeat; }
.gm-tick--sm { width: 24px; height: 24px; border-radius: 8px; }
.gm-tick--sm::before { width: 13px; height: 13px; }

/* ---------- 6c. Scrollbars ----------
   Thin, rounded, in the theme's own grey, on the page and inside every scrolling box. */
* { scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--gm-text) 24%, transparent) transparent; }
@supports not (scrollbar-color: auto) {
  ::-webkit-scrollbar { width: 10px; height: 10px; }
  ::-webkit-scrollbar-track, ::-webkit-scrollbar-corner { background: transparent; }
  ::-webkit-scrollbar-thumb { border-radius: 999px; border: 2px solid transparent; background: color-mix(in srgb, var(--gm-text) 24%, transparent) content-box; }
  ::-webkit-scrollbar-thumb:hover { background: color-mix(in srgb, var(--gm-text) 40%, transparent) content-box; }
}

/* ---------- 7. Alerts & banners ---------- */
/* A tinted card with an icon tile (v1.7; round in v1.1): tick success, ! warning, × danger, i info. Same HTML as before. */
.gm-alert {
  --_c: var(--gm-info-fill); --_icon: var(--gm-icon-info);
  display: grid; grid-template-columns: 26px minmax(0, 1fr); column-gap: var(--gm-space-3); row-gap: 4px; align-items: start;
  padding: 14px var(--gm-space-4); border-radius: var(--gm-radius-lg);
  background: color-mix(in srgb, var(--_c) 7%, var(--gm-surface));
  border: 1px solid color-mix(in srgb, var(--_c) 26%, var(--gm-line));
  box-shadow: var(--gm-shadow-sm); color: var(--gm-text); font-size: var(--gm-text-md); line-height: 1.5;
}
/* the icon is the same soft tile with a line icon as gm-tick (1.7), so a tick looks the same everywhere */
.gm-alert::before, .gm-alert::after { content: ""; grid-column: 1; grid-row: 1; width: 26px; height: 26px; margin-top: -1px; border-radius: 8px; }
.gm-alert::before { background: color-mix(in srgb, var(--_c) 16%, transparent); border: 1px solid color-mix(in srgb, var(--_c) 38%, transparent); }
.gm-alert::after { border-radius: 0; background: var(--_c); -webkit-mask: var(--_icon) center / 15px no-repeat; mask: var(--_icon) center / 15px no-repeat; }
.gm-alert > * { grid-column: 2; min-width: 0; }
.gm-alert__title { font-weight: var(--gm-weight-semibold); color: var(--gm-text); margin: 0 0 2px; }
.gm-alert p { margin: 0; }
.gm-alert--success { --_c: var(--gm-success-fill, var(--gm-success)); --_icon: var(--gm-icon-check); }
.gm-alert--warning { --_c: var(--gm-warning-fill, var(--gm-warning)); --_icon: var(--gm-icon-warn); }
.gm-alert--danger  { --_c: var(--gm-danger-fill, var(--gm-danger));  --_icon: var(--gm-icon-cross); }
.gm-banner { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: var(--gm-space-3); padding: 10px var(--gm-gutter); background: var(--gm-elevated); color: #fff; font-size: var(--gm-text-md); text-align: center; }
.gm-banner--accent { background: var(--gm-accent); }
.gm-banner a { color: inherit; font-weight: var(--gm-weight-semibold); }

/* Check-in result banner: GREEN / AMBER / RED */
.gm-checkin { border-radius: var(--gm-radius-lg); overflow: hidden; border: 1px solid var(--gm-line); background: var(--gm-surface); }
.gm-checkin__head { display: flex; align-items: center; gap: var(--gm-space-3); padding: var(--gm-space-3) var(--gm-space-4); color: #fff; background: var(--_c, var(--gm-state-active)); }
.gm-checkin__head b { font: 800 var(--gm-text-md)/1 var(--gm-font-display); letter-spacing: .04em; text-transform: uppercase; }
.gm-checkin__head span { margin-left: auto; font: var(--gm-text-sm) var(--gm-font-mono); opacity: .92; }
.gm-checkin__body { display: flex; flex-wrap: wrap; align-items: center; gap: var(--gm-space-2); padding: 10px var(--gm-space-4); }
.gm-checkin__body form { margin: 0; }                 /* a form's default bottom margin made the card taller than its buttons */
.gm-checkin__body:empty { display: none; }
.gm-checkin__head { padding-block: 10px; }
.gm-checkin--green { --_c: var(--gm-state-active); }
.gm-checkin--amber { --_c: var(--gm-state-expiring); }
.gm-checkin--red   { --_c: var(--gm-state-expired); }

/* ---------- 8. Tables ---------- */
.gm-table-wrap { overflow-x: auto; border: 1px solid var(--gm-line); border-radius: var(--gm-radius-lg); background: var(--gm-surface); }
.gm-table { width: 100%; border-collapse: collapse; font-size: var(--gm-text-md); color: var(--gm-text); }
/* Tables never squeeze: cells stay on one line and the wrapper scrolls sideways on small screens.
   Add .gm-table--wrap to let long text wrap instead. */
.gm-table th, .gm-table td { white-space: nowrap; }
.gm-table--wrap th, .gm-table--wrap td { white-space: normal; }
.gm-table-wrap { -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
.gm-table th { text-align: left; padding: 10px var(--gm-space-4); font: 600 var(--gm-text-xs)/1.2 var(--gm-font-mono); letter-spacing: .05em; text-transform: uppercase; color: var(--gm-muted); background: var(--gm-surface-2); border-bottom: 1px solid var(--gm-line); white-space: nowrap; }
.gm-table td { padding: 12px var(--gm-space-4); border-bottom: 1px solid var(--gm-line); vertical-align: middle; }
.gm-table tbody tr:last-child td { border-bottom: 0; }
.gm-table tbody tr:hover td { background: var(--gm-surface-2); }
.gm-table .gm-num { text-align: right; font-family: var(--gm-font-mono); font-variant-numeric: tabular-nums; }
.gm-cell-person { display: flex; align-items: center; gap: var(--gm-space-3); min-width: 0; }
.gm-cell-person b { display: block; font-weight: var(--gm-weight-semibold); }
.gm-cell-person small { display: block; color: var(--gm-muted); font-size: var(--gm-text-sm); }

/* ---------- 9. Avatar ---------- */
.gm-avatar { width: 36px; height: 36px; flex: none; border-radius: 50%; display: inline-grid; place-items: center; overflow: hidden; background: var(--gm-surface-3); color: var(--gm-text-2); font: 600 var(--gm-text-sm)/1 var(--gm-font-body); }
.gm-avatar img { width: 100%; height: 100%; object-fit: cover; }
.gm-avatar--sm { width: 28px; height: 28px; font-size: 11px; }
.gm-avatar--lg { width: 56px; height: 56px; font-size: var(--gm-text-lg); }

/* ---------- 10. Tabs & segmented ---------- */
/* the line under the tabs is a shadow, not a border, so the active tab needs no negative margin and the row never gets an up-down scrollbar */
.gm-tabs { display: flex; gap: var(--gm-space-1); box-shadow: inset 0 -1px 0 var(--gm-line); overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; }
.gm-tab { appearance: none; background: none; border: 0; border-bottom: 2px solid transparent; margin-bottom: 0; padding: 10px var(--gm-space-3); font: var(--gm-weight-semibold) var(--gm-text-md) var(--gm-font-body); color: var(--gm-muted); cursor: pointer; white-space: nowrap; }
.gm-tab:hover { color: var(--gm-text); }
.gm-tab[aria-selected="true"] { color: var(--gm-text); border-bottom-color: var(--gm-accent); }
.gm-segmented { display: inline-flex; align-self: flex-start; justify-self: start; padding: 3px; gap: 2px; border-radius: var(--gm-radius-md); background: var(--gm-surface-3); }
.gm-segmented button { appearance: none; border: 0; background: transparent; height: 30px; padding-inline: var(--gm-space-3); border-radius: 7px; font: var(--gm-weight-semibold) var(--gm-text-sm) var(--gm-font-body); color: var(--gm-muted); cursor: pointer; }
.gm-segmented button[aria-pressed="true"] { background: var(--gm-surface); color: var(--gm-text); box-shadow: var(--gm-shadow-sm); }

/* ---------- 11. Breadcrumb & pagination ---------- */
.gm-breadcrumb { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; font-size: var(--gm-text-sm); color: var(--gm-muted); }
.gm-breadcrumb li + li::before { content: "/"; margin-right: 6px; opacity: .6; }
.gm-breadcrumb a { color: var(--gm-text-2); text-decoration: none; }
.gm-pagination { display: flex; gap: var(--gm-space-1); align-items: center; }
.gm-pagination a, .gm-pagination span { min-width: 34px; height: 34px; display: inline-grid; place-items: center; padding-inline: 8px; border-radius: var(--gm-radius-sm); font: var(--gm-weight-medium) var(--gm-text-sm) var(--gm-font-mono); color: var(--gm-text-2); text-decoration: none; }
.gm-pagination a:hover { background: var(--gm-surface-3); }
.gm-pagination [aria-current="page"] { background: var(--gm-contrast); color: var(--gm-on-contrast); }

/* ---------- 12. Progress, skeleton, empty state ---------- */
.gm-progress { height: 8px; border-radius: var(--gm-radius-full); background: var(--gm-surface-3); overflow: hidden; }
.gm-progress > i { display: block; height: 100%; width: var(--gm-value, 0%); background: var(--gm-accent); border-radius: inherit; transition: width var(--gm-slow) var(--gm-ease); }
.gm-skeleton { border-radius: var(--gm-radius-sm); background: linear-gradient(90deg, var(--gm-surface-3) 25%, var(--gm-surface-2) 50%, var(--gm-surface-3) 75%); background-size: 200% 100%; animation: gm-shimmer 1.4s linear infinite; min-height: 12px; }
@keyframes gm-shimmer { to { background-position: -200% 0; } }
.gm-empty { display: grid; justify-items: center; gap: var(--gm-space-3); text-align: center; padding: var(--gm-space-12) var(--gm-space-6); border: 1px dashed var(--gm-line-strong); border-radius: var(--gm-radius-lg); color: var(--gm-text-2); }
.gm-empty__icon { width: 48px; height: 48px; border-radius: var(--gm-radius-lg); display: grid; place-items: center; background: var(--gm-accent-soft); color: var(--gm-accent-text); }
.gm-empty h3 { margin: 0; font: 700 var(--gm-text-lg) var(--gm-font-display); color: var(--gm-text); }

/* ---------- 13. Dialog (native <dialog>) ---------- */
.gm-dialog { width: min(560px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); overflow: hidden; padding: 0; border: 1px solid var(--gm-line); border-radius: var(--gm-radius-xl); background: var(--gm-surface); color: var(--gm-text); box-shadow: var(--gm-shadow-lg); }
.gm-dialog::backdrop { background: var(--gm-overlay); backdrop-filter: blur(2px); }
.gm-dialog__header { display: flex; align-items: center; justify-content: space-between; gap: var(--gm-space-3); padding: var(--gm-space-5) var(--gm-space-6) 0; }
.gm-dialog__title { margin: 0; font: 800 var(--gm-text-xl)/1.2 var(--gm-font-display); letter-spacing: -0.02em; }
.gm-dialog__body { padding: var(--gm-space-4) var(--gm-space-6); color: var(--gm-text-2); }
/* 1.9: the title and the buttons always stay in view; only the middle scrolls, and only when it must. A form with many
   fields takes gm-dialog--wide: a wider box whose form grid has three columns on a desktop. */
.gm-dialog[open] { display: flex; flex-direction: column; }
.gm-dialog > form { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.gm-dialog__header, .gm-dialog__footer { flex: none; }
.gm-dialog__body { overflow-y: auto; min-height: 0; flex: 1 1 auto; overscroll-behavior: contain; }
.gm-dialog--wide { width: min(880px, calc(100vw - 32px)); }
@media (min-width: 860px) { .gm-dialog--wide .gm-form-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.gm-dialog__footer { display: flex; justify-content: flex-end; gap: var(--gm-space-2); padding: var(--gm-space-4) var(--gm-space-6) var(--gm-space-5); }
.gm-dialog[open] { animation: gm-pop var(--gm-base) var(--gm-ease); }
@keyframes gm-pop { from { opacity: 0; transform: translateY(8px) scale(.98); } }

/* ---------- 14. Toast ---------- */
.gm-toasts { position: fixed; z-index: var(--gm-z-toast); right: var(--gm-space-4); bottom: calc(var(--gm-space-4) + env(safe-area-inset-bottom, 0px)); display: grid; gap: var(--gm-space-2); width: min(360px, calc(100vw - 32px)); }
.gm-toast { display: flex; gap: var(--gm-space-3); align-items: center; padding: 12px var(--gm-space-4); border-radius: var(--gm-radius-lg); background: var(--gm-elevated); color: #fff; box-shadow: var(--gm-shadow-lg); font-size: var(--gm-text-md); animation: gm-pop var(--gm-base) var(--gm-ease); }
.gm-toast::before { content: ""; flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--_c, var(--gm-accent)); box-shadow: 0 0 0 4px color-mix(in srgb, var(--_c, var(--gm-accent)) 25%, transparent); }
.gm-toast--success { --_c: #10b981; } .gm-toast--warning { --_c: #f59e0b; } .gm-toast--danger { --_c: #ef4444; }

/* ---------- 15. Tooltip (CSS only: data-tip) ---------- */
[data-gm-tip] { position: relative; }
[data-gm-tip]:hover::after, [data-gm-tip]:focus-visible::after {
  content: attr(data-gm-tip); position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%);
  padding: 6px 9px; border-radius: var(--gm-radius-sm); background: var(--gm-elevated); color: #fff; font: var(--gm-weight-medium) var(--gm-text-xs)/1.3 var(--gm-font-body);
  width: max-content; max-width: min(260px, 80vw); white-space: normal; text-align: center; letter-spacing: 0; text-transform: none; pointer-events: none; z-index: var(--gm-z-dropdown);
}
/* Page loader (kit 1.4): <div class="gm-loader" data-gm-loader hidden role="status">…animated mark…</div>.
   The mark is drawn twice: the base in the text colour (white on dark, ink on light) and a red copy clipped to a band
   as wide as the M, which slides from the G to the M. gm-ui.js shows it when a page takes a moment to open. */
.gm-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.gm-loader { position: fixed; inset: 0; z-index: 9999; display: grid; place-items: center; background: color-mix(in srgb, var(--gm-bg) 78%, transparent); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); animation: gm-loader-in 180ms var(--gm-ease) both; }
.gm-loader[hidden] { display: none; }
.gm-loader__mark { width: 88px; height: auto; overflow: visible; }
.gm-loader__base { fill: var(--gm-text); }
.gm-loader__red { fill: #e11d48; }
@keyframes gm-loader-in { from { opacity: 0; } }

/* Tooltips near a screen edge (gm-ui.js sets these on hover/focus): stay inside the window */
[data-gm-tip].gm-tip--start:hover::after, [data-gm-tip].gm-tip--start:focus-visible::after { left: 0; transform: none; text-align: left; }
[data-gm-tip].gm-tip--end:hover::after, [data-gm-tip].gm-tip--end:focus-visible::after { left: auto; right: 0; transform: none; text-align: left; }
[data-gm-tip].gm-tip--below:hover::after, [data-gm-tip].gm-tip--below:focus-visible::after { bottom: auto; top: calc(100% + 8px); }
/* Inside a scrolling box (table wrap): placed on the window, so the box never scrolls because of a tip (kit 1.5) */
[data-gm-tip].gm-tip--fixed:hover::after, [data-gm-tip].gm-tip--fixed:focus-visible::after { position: fixed; left: var(--gm-tip-x); right: auto; top: auto; bottom: var(--gm-tip-b); transform: translateX(-50%); }
[data-gm-tip].gm-tip--fixed.gm-tip--below:hover::after, [data-gm-tip].gm-tip--fixed.gm-tip--below:focus-visible::after { top: var(--gm-tip-y); bottom: auto; }
/* Info dot next to a label: <span class="gm-info" tabindex="0" data-gm-tip="What this number means">i</span> */
.gm-info { display: inline-grid; place-items: center; width: 15px; height: 15px; margin-left: 4px; border-radius: 50%; border: 1px solid currentColor; font: 600 10px/1 var(--gm-font-body); color: var(--gm-muted); cursor: help; vertical-align: 1px; opacity: .8; }
.gm-info:hover, .gm-info:focus-visible { opacity: 1; color: var(--gm-text); }
.gm-info[data-gm-tip]:hover::after, .gm-info[data-gm-tip]:focus-visible::after { text-align: left; font-size: var(--gm-text-xs); }

/* Popover menu (kit 1.3): <details class="gm-popover" data-gm-popover><summary>…</summary><div class="gm-popover__panel">…</div></details>.
   Esc or a click outside closes it (gm-ui.js). Add .gm-popover--end to align the panel to the right edge. */
.gm-popover { position: relative; }
.gm-popover > summary { list-style: none; cursor: pointer; }
.gm-popover > summary::-webkit-details-marker { display: none; }
.gm-popover__panel { position: absolute; top: calc(100% + 8px); left: 0; z-index: var(--gm-z-dropdown); min-width: 240px; max-width: min(360px, calc(100vw - 24px)); padding: 6px; border-radius: var(--gm-radius-lg); background: var(--gm-surface); border: 1px solid var(--gm-line); box-shadow: var(--gm-shadow-lg); animation: gm-pop-in 140ms var(--gm-ease); }
.gm-popover--end .gm-popover__panel { left: auto; right: 0; }
.gm-popover__head { padding: 10px 10px 8px; border-bottom: 1px solid var(--gm-line); margin-bottom: 4px; }
.gm-popover__head b { display: block; color: var(--gm-text); }
.gm-popover__item { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 38px; padding: 0 10px; border: 0; border-radius: var(--gm-radius-md); background: none; color: var(--gm-text-2); font: var(--gm-weight-medium) var(--gm-text-md)/1.2 var(--gm-font-body); text-align: left; text-decoration: none; cursor: pointer; }
.gm-popover__item:hover, .gm-popover__item:focus-visible { background: var(--gm-surface-3); color: var(--gm-text); outline: none; }
.gm-popover__item svg { width: 17px; height: 17px; flex: none; }
.gm-popover__item .gm-badge { margin-left: auto; }
.gm-popover__sep { height: 1px; margin: 4px 0; background: var(--gm-line); }
@keyframes gm-pop-in { from { opacity: 0; transform: translateY(-4px); } }

/* ---------- 16. Top bar (marketing & app) ---------- */
.gm-topbar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: var(--gm-z-sticky); background: color-mix(in srgb, var(--gm-surface) 86%, transparent); backdrop-filter: saturate(160%) blur(16px); -webkit-backdrop-filter: saturate(160%) blur(16px); border-bottom: 1px solid var(--gm-line); }
.gm-topbar__row { display: flex; align-items: center; gap: var(--gm-space-5); height: var(--gm-topbar-h); }
.gm-topbar__logo { display: inline-flex; align-items: center; height: 30px; }
.gm-topbar__logo img { height: 100%; width: auto; display: block; }
.gm-topbar__links { display: flex; gap: var(--gm-space-5); }
.gm-topbar__links a { color: var(--gm-text-2); font-size: var(--gm-text-md); font-weight: var(--gm-weight-medium); text-decoration: none; }
.gm-topbar__links a:hover, .gm-topbar__links a[aria-current="page"] { color: var(--gm-text); }
@media (max-width: 820px) { .gm-topbar__links { display: none; } }
/* Mobile menu: <button class="gm-topbar__toggle" data-gm-menu> + <div class="gm-topbar__drawer"><nav>…links…</nav></div> inside .gm-topbar */
.gm-topbar__toggle { display: none; flex: none; }
.gm-topbar__drawer { display: none; border-top: 1px solid var(--gm-line); background: var(--gm-surface); max-height: calc(100dvh - var(--gm-topbar-h)); overflow-y: auto; }
.gm-topbar__drawer nav { display: grid; padding: var(--gm-space-2) var(--gm-gutter) var(--gm-space-4); }
.gm-topbar__drawer a { display: flex; align-items: center; min-height: 48px; font-size: var(--gm-text-lg); font-weight: var(--gm-weight-semibold); color: var(--gm-text); text-decoration: none; border-bottom: 1px solid var(--gm-line); }
.gm-topbar__drawer a:last-child { border-bottom: 0; }
@media (max-width: 820px) {
  .gm-topbar__toggle { display: inline-flex; }
  .gm-topbar[data-open="true"] .gm-topbar__drawer { display: block; }
  .gm-topbar__row { gap: var(--gm-space-3); }
}

/* ---------- 17. App shell: sidebar + main ---------- */
.gm-app { display: grid; grid-template-columns: var(--gm-sidebar-w) minmax(0, 1fr); min-height: 100vh; min-height: 100dvh; }
.gm-sidebar { position: sticky; top: 0; height: 100vh; height: 100dvh; overflow-y: auto; scrollbar-width: none; display: flex; flex-direction: column; gap: var(--gm-space-4); padding: var(--gm-space-4) var(--gm-space-3); background: var(--gm-surface); border-right: 1px solid var(--gm-line); }
/* a short window: the menu still scrolls (wheel, touch, keys) but no bar is drawn over it */
.gm-sidebar::-webkit-scrollbar { display: none; }
.gm-sidebar__logo { display: flex; align-items: center; height: 40px; padding-inline: var(--gm-space-2); }
.gm-sidebar__logo img { height: 28px; width: auto; }
.gm-sidebar__section { font: 600 11px/1 var(--gm-font-mono); letter-spacing: .07em; text-transform: uppercase; color: var(--gm-muted); padding: var(--gm-space-3) var(--gm-space-3) var(--gm-space-1); }
.gm-menu { display: grid; gap: 2px; list-style: none; margin: 0; padding: 0; }
.gm-menu a { display: flex; align-items: center; gap: var(--gm-space-3); height: 38px; padding-inline: var(--gm-space-3); border-radius: var(--gm-radius-md); color: var(--gm-text-2); text-decoration: none; font-size: var(--gm-text-md); font-weight: var(--gm-weight-medium); }
.gm-menu a:hover { background: var(--gm-surface-3); color: var(--gm-text); }
.gm-menu a[aria-current="page"] { background: var(--gm-accent-soft); color: var(--gm-accent-text); font-weight: var(--gm-weight-semibold); }
.gm-menu svg { width: 18px; height: 18px; flex: none; }
.gm-menu .gm-count { margin-left: auto; font: 600 11px/1 var(--gm-font-mono); padding: 4px 6px; border-radius: 6px; background: var(--gm-accent); color: #fff; }
/* Collapsible sidebar (kit 1.2, desktop only). :root[data-sidebar="collapsed"] shows an icon rail; hovering or
   focusing it opens it over the page; the pin button ([data-gm-sidebar-pin]) switches it and gm-ui.js remembers
   the choice. Wrap menu text in .gm-menu__label; anything else to hide goes in .gm-sidebar__wide, and a
   compact logo in .gm-sidebar__narrow. */
.gm-sidebar__head { display: flex; align-items: center; justify-content: space-between; gap: var(--gm-space-2); }
.gm-sidebar__pin svg { transition: transform var(--gm-base) var(--gm-ease); }
.gm-sidebar__narrow { display: none; }
@keyframes gm-sidebar-fade { from { opacity: 0; transform: translateX(-4px); } }
@media (min-width: 961px) {
  .gm-app { transition: grid-template-columns 240ms var(--gm-ease); }
  .gm-sidebar { width: var(--gm-sidebar-w); overflow-x: hidden; transition: width 240ms var(--gm-ease), box-shadow 240ms var(--gm-ease); }
  .gm-menu__label, .gm-sidebar .gm-btn--block { white-space: nowrap; }
  :root[data-sidebar="collapsed"] .gm-app { grid-template-columns: 72px minmax(0, 1fr); }
  /* collapsed: the rail floats over the page (fixed), so opening it on hover never widens the page (no sideways
     scroll); while it opens, its content is laid out at full width and only revealed, so long names don't wrap
     into many lines for a moment (no up-down scroll) */
  :root[data-sidebar="collapsed"] .gm-sidebar { position: fixed; top: 0; left: 0; width: 72px; z-index: var(--gm-z-overlay); overflow-y: hidden; }
  :root[data-sidebar="collapsed"] .gm-main { grid-column: 2; grid-row: 1; }
  :root[data-sidebar="collapsed"] .gm-sidebar:is(:hover, :focus-within) > * { min-width: calc(var(--gm-sidebar-w) - 2 * var(--gm-space-3) - 1px); }
  :root[data-sidebar="collapsed"] .gm-sidebar:is(:hover, :focus-within) { overflow-y: auto; }
  :root[data-sidebar="collapsed"] .gm-sidebar:is(:hover, :focus-within) :is(.gm-menu__label, .gm-sidebar__wide, .gm-sidebar__section, .gm-sidebar__pin) { animation: gm-sidebar-fade 240ms var(--gm-ease) both; }
  :root[data-sidebar="collapsed"] .gm-sidebar:not(:hover):not(:focus-within) .gm-menu__label,
  :root[data-sidebar="collapsed"] .gm-sidebar:not(:hover):not(:focus-within) .gm-sidebar__wide,
  :root[data-sidebar="collapsed"] .gm-sidebar:not(:hover):not(:focus-within) .gm-sidebar__section,
  :root[data-sidebar="collapsed"] .gm-sidebar:not(:hover):not(:focus-within) .gm-sidebar__pin { display: none; }
  :root[data-sidebar="collapsed"] .gm-sidebar:not(:hover):not(:focus-within) .gm-sidebar__wide { display: none !important; }   /* beats the logo theme rules */
  :root[data-sidebar="collapsed"] .gm-sidebar:not(:hover):not(:focus-within) .gm-sidebar__narrow { display: block; height: 30px; width: auto; }
  :root[data-sidebar="collapsed"] .gm-sidebar:not(:hover):not(:focus-within) .gm-sidebar__head { justify-content: center; }
  /* compact logo: .gm-sidebar__narrow (light) + .gm-sidebar__narrow.gm-sidebar__narrow--dark (dark backgrounds) */
  :root[data-sidebar="collapsed"] .gm-sidebar:not(:hover):not(:focus-within) .gm-sidebar__narrow--dark { display: none; }
  :root[data-theme="dark"][data-sidebar="collapsed"] .gm-sidebar:not(:hover):not(:focus-within) .gm-sidebar__narrow:not(.gm-sidebar__narrow--dark) { display: none; }
  :root[data-theme="dark"][data-sidebar="collapsed"] .gm-sidebar:not(:hover):not(:focus-within) .gm-sidebar__narrow--dark { display: block; }
  :root[data-sidebar="collapsed"] .gm-sidebar:not(:hover):not(:focus-within) .gm-menu a,
  :root[data-sidebar="collapsed"] .gm-sidebar:not(:hover):not(:focus-within) .gm-btn--block { justify-content: center; padding-inline: 0; }
  :root[data-sidebar="collapsed"] .gm-sidebar:hover, :root[data-sidebar="collapsed"] .gm-sidebar:focus-within { width: var(--gm-sidebar-w); box-shadow: var(--gm-shadow-lg); }
  :root[data-sidebar="collapsed"] .gm-sidebar__pin svg { transform: rotate(180deg); }
  /* counts (e.g. alerts) become a small number on the icon's corner instead of disappearing */
  :root[data-sidebar="collapsed"] .gm-sidebar:not(:hover):not(:focus-within) .gm-menu a { position: relative; }
  :root[data-sidebar="collapsed"] .gm-sidebar:not(:hover):not(:focus-within) .gm-menu .gm-count { position: absolute; top: 3px; right: 6px; margin: 0; min-width: 16px; padding: 3px 4px; font-size: 9.5px; line-height: 1; text-align: center; border-radius: 999px; box-shadow: 0 0 0 2px var(--gm-surface); }
}
@media (max-width: 960px) { .gm-sidebar__pin { display: none; } }
@media (prefers-reduced-motion: reduce) { .gm-app, .gm-sidebar { transition: none !important; } .gm-sidebar * { animation: none !important; } }
@media (min-width: 961px) and (prefers-color-scheme: dark) {
  :root:not([data-theme])[data-sidebar="collapsed"] .gm-sidebar:not(:hover):not(:focus-within) .gm-sidebar__narrow:not(.gm-sidebar__narrow--dark) { display: none; }
  :root:not([data-theme])[data-sidebar="collapsed"] .gm-sidebar:not(:hover):not(:focus-within) .gm-sidebar__narrow--dark { display: block; }
}
/* Phone drawer: a dim backdrop; tapping it (or Esc) closes the menu */
@media (max-width: 960px) { .gm-app[data-nav="open"]::after { content: ""; position: fixed; inset: 0; z-index: calc(var(--gm-z-overlay) - 1); background: var(--gm-overlay); } }
.gm-main { min-width: 0; display: flex; flex-direction: column; }
.gm-main__bar { position: sticky; top: 0; z-index: var(--gm-z-sticky); display: flex; align-items: center; gap: var(--gm-space-3); height: var(--gm-topbar-h); padding-inline: var(--gm-space-6); background: color-mix(in srgb, var(--gm-bg) 88%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--gm-line); }
.gm-main__content { padding: var(--gm-space-6); display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--gm-space-6); align-content: start; }
.gm-page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--gm-space-4); }
.gm-page-head h1 { margin: 0; font: 800 var(--gm-text-2xl)/1.15 var(--gm-font-display); letter-spacing: -0.02em; }
.gm-menu-toggle { display: none; }
@media (max-width: 960px) {
  .gm-app { grid-template-columns: minmax(0, 1fr); }
  .gm-sidebar { position: fixed; inset: 0 auto 0 0; width: min(var(--gm-sidebar-w), 86vw); z-index: var(--gm-z-overlay); transform: translateX(-100%); transition: transform var(--gm-base) var(--gm-ease); box-shadow: var(--gm-shadow-lg); }
  .gm-app[data-nav="open"] .gm-sidebar { transform: none; }
  .gm-menu-toggle { display: inline-flex; }
  .gm-main__bar, .gm-main__content { padding-inline: var(--gm-space-4); }
}

/* ---------- 18. Theme-aware logo & theme toggle ---------- */
/* <img class="gm-logo-light" src=".../logo-horizontal-color.svg"> + <img class="gm-logo-dark" src=".../logo-horizontal-reverse.svg"> */
.gm-logo-dark { display: none !important; }
:root[data-theme="dark"] .gm-logo-light { display: none !important; }
:root[data-theme="dark"] .gm-logo-dark { display: block !important; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .gm-logo-light { display: none !important; }
  :root:not([data-theme]) .gm-logo-dark { display: block !important; }
}
.gm-theme-toggle .gm-icon-sun { display: none; }
:root[data-theme="dark"] .gm-theme-toggle .gm-icon-sun { display: block; }
:root[data-theme="dark"] .gm-theme-toggle .gm-icon-moon { display: none; }

/* ---------- 19. Choice cards & segmented radios (settings, plan pickers) ---------- */
/* <label class="gm-choice"><input type="radio" name="x" value="a"> …content… </label> */
.gm-choice { position: relative; display: grid; gap: var(--gm-space-2); padding: var(--gm-space-3); background: var(--gm-surface); border: 1px solid var(--gm-line-strong); border-radius: var(--gm-radius-lg); cursor: pointer; transition: border-color var(--gm-fast) ease, box-shadow var(--gm-fast) ease; }
.gm-choice:hover { border-color: var(--gm-muted); }
.gm-choice > input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.gm-choice:has(> input:checked) { border-color: var(--gm-accent); box-shadow: 0 0 0 3px var(--gm-accent-soft); }
.gm-choice:has(> input:focus-visible) { outline: 2px solid var(--gm-focus); outline-offset: 2px; }
.gm-choice__title { display: flex; align-items: center; justify-content: space-between; gap: var(--gm-space-2); font-weight: var(--gm-weight-semibold); font-size: var(--gm-text-md); }
.gm-choice__title::after { content: ""; width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid var(--gm-line-strong); flex: none; }
.gm-choice:has(> input:checked) .gm-choice__title::after { border: 5px solid var(--gm-accent); }
.gm-choice__desc { font-size: var(--gm-text-sm); color: var(--gm-muted); }
.gm-choices { display: grid; gap: var(--gm-space-3); grid-template-columns: repeat(auto-fill, minmax(var(--gm-min, 150px), 1fr)); }

/* Segmented radios: <div class="gm-segmented" role="radiogroup"><label><input type="radio" name="gm-theme" value="light">Light</label>… */
.gm-segmented label { position: relative; display: inline-flex; align-items: center; gap: 6px; height: 30px; padding-inline: var(--gm-space-3); border-radius: 7px; font: var(--gm-weight-semibold) var(--gm-text-sm) var(--gm-font-body); color: var(--gm-muted); cursor: pointer; }
.gm-segmented label > input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.gm-segmented label:has(> input:checked) { background: var(--gm-surface); color: var(--gm-text); box-shadow: var(--gm-shadow-sm); }
.gm-segmented label:has(> input:focus-visible) { outline: 2px solid var(--gm-focus); outline-offset: 1px; }

/* Theme preview tile: <span class="gm-style-preview" data-style="onyx"><i></i><i></i><i></i></span> */
.gm-style-preview { --_bg: var(--gm-style-ink-bg); --_line: rgba(255, 255, 255, .72); --_line-2: rgba(255, 255, 255, .32);
  display: grid; align-content: center; gap: 6px; height: 72px; padding: 12px 14px; border-radius: var(--gm-radius-md); background: var(--_bg); border: 1px solid rgba(127, 127, 127, .2); }
.gm-style-preview i { display: block; height: 7px; border-radius: 4px; background: var(--_line-2); }
.gm-style-preview i:first-child { width: 55%; background: var(--_line); }
.gm-style-preview i:nth-child(2) { width: 80%; }
.gm-style-preview i:last-child { width: 32%; height: 12px; background: var(--gm-rose); }
.gm-style-preview[data-style="light"]    { --_bg: var(--gm-style-light-bg);    --_line: rgba(15, 23, 42, .75); --_line-2: rgba(15, 23, 42, .22); }
.gm-style-preview[data-style="ink"]      { --_bg: var(--gm-style-ink-bg); }
.gm-style-preview[data-style="onyx"]     { --_bg: var(--gm-style-onyx-bg); }
.gm-style-preview[data-style="amoled"]   { --_bg: var(--gm-style-amoled-bg); }
.gm-style-preview[data-style="graphite"] { --_bg: var(--gm-style-graphite-bg); }
.gm-style-preview[data-style="system"]   { background: linear-gradient(135deg, var(--gm-style-light-bg) 0 50%, var(--gm-style-ink-bg) 50% 100%); --_line: rgba(127, 127, 127, .8); --_line-2: rgba(127, 127, 127, .4); }

/* ---------- 20. Mobile-first helpers & content blocks ---------- */
/* Horizontal scroll row (chips, steps, small cards) instead of squeezing: <div class="gm-scroll-x">…</div> */
.gm-scroll-x { display: flex; gap: var(--gm-gap, var(--gm-space-2)); overflow-x: auto; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; padding-bottom: 4px; scrollbar-width: thin; }
.gm-scroll-x > * { flex: 0 0 auto; scroll-snap-align: start; }

/* Action row: buttons stack full-width on phones */
.gm-actions { display: flex; flex-wrap: wrap; gap: var(--gm-space-3); align-items: center; }
@media (max-width: 560px) { .gm-actions > .gm-btn { flex: 1 1 100%; } }

/* Section heading block */
.gm-section-head { display: grid; gap: var(--gm-space-3); max-width: 760px; margin-bottom: clamp(24px, 5vw, 48px); }
.gm-section-head > p { margin: 0; color: var(--gm-text-2); font-size: var(--gm-text-lg); }
.gm-section-head--center { margin-inline: auto; text-align: center; justify-items: center; }

/* Offer flag: bright yellow "FREE" sticker that pulls the eye. Use sparingly (offers only).
   Inline: <span class="gm-flag">Free</span>
   On a button corner: <a class="gm-btn gm-has-flag">…<span class="gm-flag gm-flag--corner">Free</span></a>
   Gentle wiggle every few seconds: add gm-flag--pop (stops for reduced motion). */
.gm-flag { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 6px; background: var(--gm-highlight); color: var(--gm-on-highlight);
  font: 800 11px/1.2 var(--gm-font-mono); letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; vertical-align: middle;
  transform: rotate(-3deg); box-shadow: 0 2px 0 rgba(15, 23, 42, .18), 0 6px 16px -6px var(--gm-highlight); }
.gm-flag--lg { padding: 5px 11px; font-size: 13px; border-radius: 8px; }
.gm-has-flag { position: relative; }
.gm-flag--corner { position: absolute; top: -14px; right: -8px; z-index: 1; pointer-events: none; }
.gm-flag--pop { animation: gm-flag-pop 4s var(--gm-ease) infinite; }
@keyframes gm-flag-pop { 0%, 82%, 100% { transform: rotate(-3deg) scale(1); } 86% { transform: rotate(4deg) scale(1.12); } 90% { transform: rotate(-6deg) scale(1.12); } 94% { transform: rotate(-3deg) scale(1); } }
/* Yellow announcement strip above the top bar */
.gm-banner--highlight { background: var(--gm-highlight); color: var(--gm-on-highlight); text-decoration: none; font-weight: var(--gm-weight-semibold); }
.gm-banner--highlight:hover { color: var(--gm-on-highlight); }
.gm-banner--highlight .gm-flag { background: var(--gm-on-highlight); color: var(--gm-highlight); box-shadow: none; }

/* Small animated sparkle for "new" / "launching soon" labels: <span class="gm-spark" aria-hidden="true">✦</span> */
.gm-spark { display: inline-block; color: var(--gm-accent); line-height: 1; animation: gm-spark 2.4s var(--gm-ease) infinite; }
@keyframes gm-spark { 0%, 100% { transform: rotate(0) scale(1); opacity: 1; } 50% { transform: rotate(90deg) scale(.72); opacity: .6; } }

/* Icon tile */
.gm-icon-tile { width: 44px; height: 44px; flex: none; border-radius: 12px; display: grid; place-items: center; background: var(--gm-accent-soft); color: var(--gm-accent-text); }
.gm-icon-tile svg { width: 22px; height: 22px; }
.gm-icon-tile--success { background: var(--gm-success-soft); color: var(--gm-success); }
.gm-icon-tile--warning { background: var(--gm-warning-soft); color: var(--gm-warning); }
.gm-icon-tile--info { background: var(--gm-info-soft); color: var(--gm-info); }

/* Check list */
.gm-checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--gm-space-3); }
.gm-checklist--inline { display: flex; flex-wrap: wrap; gap: var(--gm-space-2) var(--gm-space-5); }
.gm-checklist li { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: var(--gm-space-3); align-items: start; color: var(--gm-text-2); }
.gm-checklist li::before { content: ""; width: 18px; height: 18px; margin-top: 3px; background: var(--gm-accent);
  -webkit-mask: var(--gm-icon-check) center / contain no-repeat; mask: var(--gm-icon-check) center / contain no-repeat; }

/* Accordion (FAQ): <div class="gm-accordion"><details><summary>Q</summary><p>A</p></details></div> */
.gm-accordion { border-top: 1px solid var(--gm-line); }
.gm-accordion details { border-bottom: 1px solid var(--gm-line); }
.gm-accordion summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: var(--gm-space-4); min-height: 56px; padding: var(--gm-space-3) 2px; font: var(--gm-weight-semibold) var(--gm-text-lg)/1.4 var(--gm-font-body); color: var(--gm-text); }
.gm-accordion summary::-webkit-details-marker { display: none; }
.gm-accordion summary::after { content: "+"; flex: none; color: var(--gm-accent-text); font: 500 22px/1 var(--gm-font-mono); }
.gm-accordion details[open] summary::after { content: "\2212"; }
.gm-accordion details > :not(summary) { margin: 0; padding: 0 2px var(--gm-space-5); color: var(--gm-text-2); max-width: 70ch; }

/* ---------- 21. Editor (Markdown + HTML, with a live preview) ----------
   <div class="gm-editor" data-gm-editor> bar (tools + Write/Preview) and panes (textarea + preview).
   gm-editor--split: on a wide screen both panes show side by side and the Write/Preview switch hides. */
.gm-editor { border: 1px solid var(--gm-line-strong); border-radius: var(--gm-radius-md); background: var(--gm-surface); overflow: hidden; }
.gm-editor:focus-within { border-color: var(--gm-accent); }
.gm-editor__bar { display: flex; align-items: center; justify-content: space-between; gap: var(--gm-space-2); padding: 6px 8px; border-bottom: 1px solid var(--gm-line); background: var(--gm-surface-2); flex-wrap: wrap; }
.gm-editor__tools { display: flex; gap: 2px; flex-wrap: wrap; }
.gm-editor__tools button { appearance: none; border: 0; background: none; color: var(--gm-text-2); min-width: 32px; height: 32px; padding: 0 8px; border-radius: var(--gm-radius-sm); font: var(--gm-weight-medium) var(--gm-text-sm) var(--gm-font-body); cursor: pointer; }
.gm-editor__tools button:hover { background: var(--gm-surface); color: var(--gm-text); }
.gm-editor__tools button:focus-visible { outline: 2px solid var(--gm-accent); outline-offset: -2px; }
.gm-editor__panes { display: grid; }
.gm-editor__input { display: block; width: 100%; min-height: 260px; border: 0; padding: 12px 14px; resize: vertical; background: transparent; color: var(--gm-text); font: var(--gm-text-sm)/1.6 var(--gm-font-mono); outline: none; }
.gm-editor__preview { min-height: 260px; padding: 12px 14px; overflow: auto; }
.gm-editor__frame { display: block; width: 100%; height: 420px; border: 0; border-radius: var(--gm-radius-sm); background: var(--gm-white, white); }
.gm-editor:not([data-view="preview"]) .gm-editor__preview { display: none; }
.gm-editor[data-view="preview"] .gm-editor__input { display: none; }
.gm-editor[data-view="preview"] .gm-editor__tools { visibility: hidden; }
@media (min-width: 1000px) {
  .gm-editor--split .gm-editor__panes { grid-template-columns: 1fr 1fr; }
  .gm-editor--split .gm-editor__input, .gm-editor--split .gm-editor__preview { display: block !important; min-height: 440px; }
  .gm-editor--split .gm-editor__preview { border-left: 1px solid var(--gm-line); background: var(--gm-surface-2); }
  .gm-editor--split .gm-editor__tabs { display: none; }
  .gm-editor--split .gm-editor__tools { visibility: visible !important; }
}

/* ---------- 22. Rows that open, with a peek card ----------
   A list row is the link to its page: <tr data-gm-href="/plans/1" tabindex="0">. No "Edit" / "View" button at the
   end. Resting the mouse on the row shows a small card with a little more: put
   <template data-gm-peek> … </template> inside the row's first cell (gm-peek__title, gm-peek__list of dt/dd pairs). */
[data-gm-href] { cursor: pointer; }
.gm-table tbody tr[data-gm-href] td { transition: background var(--gm-fast) var(--gm-ease); }
.gm-table tbody tr[data-gm-href]:hover td { background: var(--gm-surface-2); }
[data-gm-href]:focus-visible { outline: 2px solid var(--gm-accent); outline-offset: -2px; }
.gm-peek-card { position: fixed; z-index: var(--gm-z-toast); width: max-content; max-width: min(320px, calc(100vw - 16px)); padding: 12px 14px; border-radius: var(--gm-radius-lg); background: var(--gm-surface); border: 1px solid var(--gm-line-strong); box-shadow: var(--gm-shadow-lg); color: var(--gm-text); font-size: var(--gm-text-sm); line-height: 1.45; pointer-events: none; animation: gm-pop-in 120ms var(--gm-ease); }
.gm-peek__title { display: block; margin-bottom: 8px; font-size: var(--gm-text-md); }
.gm-peek__list { display: grid; gap: 4px; margin: 0; }
.gm-peek__list > div { display: grid; grid-template-columns: minmax(84px, auto) minmax(0, 1fr); gap: 12px; }
.gm-peek__list dt { color: var(--gm-muted); }
.gm-peek__list dd { margin: 0; text-align: right; overflow-wrap: anywhere; }
.gm-peek__note { margin: 8px 0 0; color: var(--gm-text-2); }
.gm-peek__hint { display: block; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--gm-line); color: var(--gm-muted); font-size: var(--gm-text-xs); }

/* ---------- 22b. Camera (kit 1.13) ----------
   The live picture with a face outline to stand in, for "Take photo" and the face scan. The outline turns green
   (is-good) when the face is where it should be; a round button changes between the front and the back camera;
   dots count the pictures taken; a line under the picture says what is wrong. The words on the picture
   (gm-camera__ask) say what to do next. Used inside a dialog: gm-dialog--camera. Behaviour: js/gm-camera.js.
   The picture is always shown on a dark stage, in both themes. */
.gm-dialog--camera { width: min(520px, calc(100vw - 16px)); }
.gm-camera { position: relative; overflow: hidden; aspect-ratio: 4 / 3; border-radius: var(--gm-radius-md); background: var(--gm-ink); }
.gm-camera[hidden] { display: none; }
.gm-camera__video { display: block; width: 100%; height: 100%; object-fit: cover; }
.gm-camera__video.is-mirrored { transform: scaleX(-1); }
.gm-camera__outline { position: absolute; left: 50%; top: 48%; height: 78%; aspect-ratio: 3 / 4; transform: translate(-50%, -50%); border-radius: 50%; pointer-events: none;
  border: 2px dashed rgba(255, 255, 255, .9); box-shadow: 0 0 0 999px color-mix(in srgb, var(--gm-ink) 45%, transparent); transition: border-color var(--gm-fast, 120ms); }
.gm-camera__outline.is-good { border: 3px solid var(--gm-state-active); box-shadow: 0 0 0 999px color-mix(in srgb, var(--gm-ink) 45%, transparent), 0 0 22px 2px color-mix(in srgb, var(--gm-state-active) 55%, transparent); }
.gm-camera__flip { position: absolute; top: 10px; right: 10px; color: #fff; background: color-mix(in srgb, var(--gm-ink) 60%, transparent); border-color: rgba(255, 255, 255, .28); }
.gm-camera__flip:hover { color: #fff; background: color-mix(in srgb, var(--gm-ink) 82%, transparent); }
.gm-camera__flip[hidden] { display: none; }
.gm-camera__dots { position: absolute; top: 12px; left: 12px; display: flex; gap: 6px; }
.gm-camera__dots i { width: 10px; height: 10px; border-radius: 50%; background: rgba(255, 255, 255, .35); transition: background-color var(--gm-fast, 120ms); }
.gm-camera__dots i.is-on { background: var(--gm-state-active); }
.gm-camera__ask { position: absolute; left: 0; right: 0; bottom: 0; margin: 0; padding: 22px 12px 10px; text-align: center; color: #fff; font-weight: 600; background: linear-gradient(transparent, color-mix(in srgb, var(--gm-ink) 80%, transparent)); }
.gm-camera__ask:empty { display: none; }
.gm-camera__note { margin: 10px 0 0; min-height: 1.5em; text-align: center; font-size: var(--gm-text-sm); color: var(--gm-text-2); }
.gm-camera__note.is-bad { color: var(--gm-danger-text, var(--gm-accent-text)); }
@media (max-width: 599px) { .gm-camera { aspect-ratio: 3 / 4; } .gm-camera__outline { height: auto; width: 62%; } }

/* ---------- 23. Motion preference ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
