/* Bebas Neue and Figtree are self-hosted (see wwwroot/fonts) instead of the @import the design system ships by default. */
@font-face {
  font-family: "Bebas Neue";
  src: url("../fonts/bebas-neue-400-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Figtree";
  src: url("../fonts/figtree-variable-latin.woff2") format("woff2-variations"), url("../fonts/figtree-variable-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
/* The icon font (Material Icons, classic) is loaded with its own <link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons"> in the document head, not with @import here — see README.md "Iconography" and blazor.md step 1. */

/* HEIFIT component styles. Mobile first: base = phone, then min-width 640px (tablet) and 1024px (desktop).
   Every colour, space and radius comes from tokens.css. Prefix: hf- */

.hf-app { background: var(--surface-100); color: var(--ink); font-family: var(--font-sans); font-size: 16px; line-height: 24px; -webkit-text-size-adjust: 100%; }
.hf-app *, .hf-app *::before, .hf-app *::after { box-sizing: border-box; }
.hf-app :focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.hf-display-lg { font-family: var(--font-display); font-size: 40px; line-height: 40px; letter-spacing: .01em; font-weight: 400; text-transform: uppercase; margin: 0; }
.hf-display-md { font-family: var(--font-display); font-size: 28px; line-height: 30px; letter-spacing: .02em; font-weight: 400; text-transform: uppercase; margin: 0; }
.hf-numeral { font-family: var(--font-display); font-size: 44px; line-height: 44px; letter-spacing: .01em; font-weight: 400; }
.hf-title { font-size: 20px; line-height: 26px; font-weight: 700; margin: 0; }
.hf-muted { color: var(--ink-muted); }
.hf-sm { font-size: 14px; line-height: 20px; }
.hf-caption { font-size: 12px; line-height: 16px; font-weight: 500; color: var(--ink-muted); }
.hf-label { font-size: 12px; line-height: 16px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.hf-icon { font-family: var(--font-icons); font-weight: 400; font-style: normal; font-size: 22px; line-height: 1; width: 1em; height: 1em; overflow: hidden; display: inline-block; flex: none; white-space: nowrap; letter-spacing: normal; text-transform: none; direction: ltr; -webkit-font-smoothing: antialiased; font-feature-settings: 'liga'; user-select: none; }
/* Material Icons (classic) is a single filled style with no variable FILL axis, so .hf-icon is always the solid glyph; .hf-icon--fill is kept as a harmless no-op selector for markup that still sets it. */
.hf-icon--fill { }

/* Page and grid */
.hf-page { padding: var(--space-4); max-width: var(--content-max); margin-inline: auto; display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-5); }
.hf-grid { display: grid; gap: var(--space-4); grid-template-columns: minmax(0, 1fr); }
.hf-stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-3); }
.hf-row { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; }
@media (min-width: 640px) { .hf-page { padding: var(--space-5); } .hf-grid--2 { grid-template-columns: repeat(2, 1fr); } .hf-grid--3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .hf-page { padding: var(--space-6); } .hf-grid--3 { grid-template-columns: repeat(3, 1fr); } }

/* Button */
.hf-btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); min-height: var(--size-touch); min-width: var(--size-touch); padding: 0 var(--space-5); border-radius: var(--radius-md); border: 2px solid transparent; font: 600 16px/24px var(--font-sans); cursor: pointer; text-decoration: none; white-space: nowrap; background: var(--action); color: var(--on-action); }
.hf-btn:hover { background: var(--action-pressed); }
.hf-btn:disabled, .hf-btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }

.hf-btn--brand { background: var(--brand); color: var(--on-brand); }
.hf-btn--brand:hover { background: var(--brand-pressed); }
.hf-btn--secondary { background: var(--surface-200); color: var(--ink); border-color: var(--border); }
.hf-btn--secondary:hover { background: var(--surface-300); }
.hf-btn--link { background: transparent; color: var(--brand-ink); min-height: 44px; padding: 0 var(--space-3); }
.hf-btn--link:hover { background: var(--surface-300); }
.hf-btn--ghost { background: transparent; color: var(--ink); }
.hf-btn--ghost:hover { background: var(--surface-300); }
.hf-btn--success { background: var(--success-solid); color: var(--on-success-solid); }
.hf-btn--success:hover { filter: brightness(.92); }
.hf-btn--danger { background: var(--danger-solid); color: var(--on-danger-solid); }
.hf-btn--danger:hover { filter: brightness(.92); }
.hf-btn--danger-outline { background: var(--surface-200); color: var(--danger-ink); border-color: var(--danger-ink); }
.hf-btn--danger-outline:hover { background: var(--danger-bg); }
.hf-btn--block { width: 100%; }
.hf-btn--sm { min-height: var(--size-touch-dense); padding: 0 var(--space-4); font-size: 14px; line-height: 20px; }
@media (min-width: 1024px) and (pointer: fine) { .hf-btn--sm { min-height: var(--size-touch-dense); } }

/* Badge */
.hf-badge { display: inline-flex; align-items: center; gap: var(--space-1); padding: 4px 10px; border-radius: var(--radius-sm); font: 700 12px/16px var(--font-sans); letter-spacing: .08em; text-transform: uppercase; background: var(--surface-300); color: var(--ink); }
.hf-badge .hf-icon { font-size: 16px; }
.hf-badge--success { background: var(--success-bg); color: var(--success-ink); }
.hf-badge--danger { background: var(--danger-bg); color: var(--danger-ink); }
.hf-badge--notice { background: var(--notice-bg); color: var(--notice-ink); }
.hf-badge--solid { background: var(--full); color: var(--on-full); }
.hf-badge--brand { background: var(--brand); color: var(--on-brand); }

/* Chip */
.hf-chip { display: inline-flex; align-items: center; gap: var(--space-1); min-height: 40px; padding: 0 var(--space-4); border-radius: var(--radius-pill); border: 1.5px solid var(--border); background: var(--surface-200); color: var(--ink); font: 600 14px/20px var(--font-sans); cursor: pointer; white-space: nowrap; }
.hf-chip[aria-pressed="true"], .hf-chip[aria-selected="true"], .hf-chip.is-selected { background: var(--brand); color: var(--on-brand); border-color: var(--brand); }
.hf-chips { display: flex; gap: var(--space-2); overflow-x: auto; padding-block: 4px; scrollbar-width: none; }
.hf-chips::-webkit-scrollbar { display: none; }

/* Fields */
.hf-field { display: grid; gap: 6px; }
.hf-field > label { font: 600 14px/20px var(--font-sans); }
.hf-input, .hf-select { width: 100%; min-height: var(--size-touch); padding: 0 var(--space-4); border-radius: var(--radius-md); border: 1.5px solid var(--border); background: var(--surface-200); color: var(--ink); font: 400 16px/24px var(--font-sans); }
.hf-input::placeholder { color: var(--ink-muted); }
.hf-input[aria-invalid="true"] { border-color: var(--danger-ink); }
.hf-search { position: relative; }
.hf-search > .hf-icon { position: absolute; left: var(--space-3); top: 13px; color: var(--ink-muted); pointer-events: none; }
.hf-search .hf-input { padding-left: 44px; border-radius: var(--radius-pill); }
.hf-help { font-size: 14px; line-height: 20px; color: var(--ink-muted); }
.hf-error { font-size: 14px; line-height: 20px; color: var(--danger-ink); font-weight: 600; }

/* Segmented control */
.hf-segmented { display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 4px; gap: 4px; background: var(--surface-300); border-radius: var(--radius-pill); }
.hf-segmented button { min-height: 44px; padding: 0 var(--space-4); border: 0; border-radius: var(--radius-pill); background: transparent; color: var(--ink); font: 600 14px/20px var(--font-sans); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: var(--space-1); }
.hf-segmented button[aria-pressed="true"] { background: var(--brand); color: var(--on-brand); }
.hf-segmented--attendance button[data-value="present"][aria-pressed="true"] { background: var(--success-solid); color: var(--on-success-solid); }
.hf-segmented--attendance button[data-value="absent"][aria-pressed="true"] { background: var(--danger-solid); color: var(--on-danger-solid); }
.hf-segmented--block { display: grid; width: 100%; }
[data-theme="dark"] .hf-segmented { background: var(--surface-100); border: 1px solid var(--divider); }

/* Card and notice */
.hf-card { background: var(--surface-200); border-radius: var(--radius-lg); padding: var(--space-4); box-shadow: var(--shadow-sm); }
.hf-notice { display: flex; gap: var(--space-3); align-items: flex-start; padding: var(--space-3) var(--space-4); border-radius: var(--radius-lg); background: var(--notice-bg); color: var(--notice-ink); border: 2px solid var(--notice-border); }
.hf-notice .hf-icon { margin-top: 2px; }
.hf-notice strong { display: block; font: 700 12px/16px var(--font-sans); letter-spacing: .08em; text-transform: uppercase; margin-bottom: 2px; }
.hf-notice p { margin: 0; font-size: 15px; line-height: 22px; font-weight: 500; }

/* Date strip */
.hf-datestrip { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(48px, 1fr); gap: var(--space-1); overflow-x: auto; padding: var(--space-2); background: var(--ground); border-radius: var(--radius-lg); color: var(--ink); scrollbar-width: none; }
.hf-day { display: grid; justify-items: center; gap: 2px; min-height: 64px; padding: var(--space-2) 0; border: 0; border-radius: var(--radius-pill); background: transparent; color: var(--ink); font: 600 16px/20px var(--font-sans); cursor: pointer; position: relative; }
.hf-day small { font: 700 11px/14px var(--font-sans); letter-spacing: .08em; text-transform: uppercase; }
.hf-day[aria-pressed="true"] { background: var(--brand); color: var(--on-brand); }
.hf-day[data-has="true"]::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* Activity card */
.hf-activity { display: grid; gap: var(--space-3); background: var(--surface-200); border-radius: var(--radius-lg); padding: var(--space-4); box-shadow: var(--shadow-sm); }
.hf-activity__head { display: flex; justify-content: space-between; gap: var(--space-3); align-items: flex-start; }
.hf-activity__time { font-family: var(--font-display); font-size: 28px; line-height: 30px; letter-spacing: .02em; }
.hf-activity__meta { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-4); font-size: 14px; line-height: 20px; color: var(--ink-muted); }
.hf-activity__meta a { color: var(--brand-ink); font-weight: 600; text-underline-offset: 3px; display: inline-flex; align-items: center; gap: var(--space-1); min-height: 24px; }
.hf-activity--full .hf-activity__time { color: var(--ink-muted); }
.hf-meter { height: 8px; border-radius: var(--radius-pill); background: var(--surface-300); overflow: hidden; }
.hf-meter > span { display: block; height: 100%; background: var(--brand); border-radius: var(--radius-pill); }
.hf-meter--full > span { background: var(--full); }
.hf-activity__foot { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); flex-wrap: wrap; }

/* Rows: attendance and payment */
.hf-list { display: grid; gap: var(--space-2); margin: 0; padding: 0; list-style: none; }
.hf-avatar { width: 44px; height: 44px; border-radius: var(--radius-pill); background: var(--ground); color: var(--ink); display: grid; place-items: center; font: 700 15px/1 var(--font-sans); flex: none; }
.hf-att-row, .hf-pay-row { display: grid; grid-template-columns: auto 1fr; gap: var(--space-3); align-items: center; padding: var(--space-3); background: var(--surface-200); border-radius: var(--radius-md); }
.hf-att-row .hf-segmented, .hf-pay-row__actions { grid-column: 1 / -1; }
.hf-pay-row__actions { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-2); }
.hf-pay-row__amt { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); flex-wrap: wrap; }
.hf-row__name { font-weight: 600; }
.hf-row__amount { font-family: var(--font-display); font-size: 28px; line-height: 30px; letter-spacing: .02em; }
@media (min-width: 640px) {
  .hf-att-row { grid-template-columns: auto 1fr auto; }
  .hf-att-row .hf-segmented { grid-column: auto; }
  .hf-pay-row { grid-template-columns: auto 1fr auto; }
  .hf-pay-row__amt { grid-column: auto; justify-content: flex-end; }
  .hf-pay-row__actions { grid-column: 2 / -1; display: flex; justify-content: flex-end; }
}

/* Member list: cards on phones, table at 1024px */
.hf-members { display: grid; gap: var(--space-2); }
.hf-member { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto; gap: var(--space-3); align-items: center; padding: var(--space-3); background: var(--surface-200); border-radius: var(--radius-md); }
.hf-member__status-row { grid-column: 1 / -1; }
.hf-member__edit-cell { grid-column: 2; grid-row: 1; }
.hf-member__who { display: flex; align-items: center; gap: var(--space-3); min-width: 0; }
.hf-member__id { min-width: 0; }
.hf-member__id > div { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hf-member__cell { display: none; font-size: 14px; line-height: 20px; }
/* .hf-btn--sm's min-height is --size-touch-dense (40px), documented as "pointer devices only"
   for the desktop admin table - this button also renders on the mobile card (a touch context),
   so it needs the full --size-touch (48px) minimum, not the dense one. */
.hf-member__edit { padding: 0; min-height: var(--size-touch); min-width: var(--size-touch); }
.hf-member__edit-label { display: none; }
/* Token pack */
.hf-pack { position: relative; display: grid; gap: var(--space-1); justify-items: start; padding: var(--space-4); background: var(--surface-200); border: 2px solid var(--border); border-radius: var(--radius-lg); color: var(--ink); text-align: left; cursor: pointer; width: 100%; font: inherit; }
.hf-pack[aria-pressed="true"] { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand); }
.hf-pack__count { font-family: var(--font-display); font-size: 44px; line-height: 44px; letter-spacing: .01em; }
.hf-pack__price { font-weight: 700; white-space: nowrap; }
.hf-pack .hf-badge { white-space: nowrap; }
.hf-pack .hf-badge { position: absolute; top: var(--space-3); right: var(--space-3); }

/* Navigation: floating bottom bar on phones and tablets, left sidebar with hamburger from 1024px */
.hf-shell { min-height: 100vh; display: block; }
.hf-has-bottomnav { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
.hf-nav-item { display: grid; justify-items: center; align-content: center; gap: 2px; min-height: 56px; padding: 6px 2px; min-width: 0; color: var(--ink-muted); text-decoration: none; font: 600 12px/16px var(--font-sans); border-radius: var(--radius-pill); }
.hf-nav-item[aria-current="page"] { color: var(--on-brand); background: var(--brand); }
.hf-icon-wrap { display: grid; place-items: center; }
.hf-bottomnav { position: fixed; z-index: 40; left: var(--space-4); right: var(--space-4); bottom: calc(var(--space-4) + env(safe-area-inset-bottom)); margin-inline: auto; max-width: 440px; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 2px; padding: 4px; background: var(--surface-200); border: 1px solid var(--divider); border-radius: var(--radius-pill); box-shadow: var(--shadow-md); transition: transform 180ms ease, opacity 180ms ease, visibility 0s; }
.hf-bottomnav[data-hidden="true"] { transform: translateY(calc(100% + var(--space-6))); opacity: 0; visibility: hidden; pointer-events: none; transition: transform 180ms ease, opacity 180ms ease, visibility 0s 180ms; }
@media (prefers-reduced-motion: reduce) { .hf-bottomnav, .hf-bottomnav[data-hidden="true"] { transition: none; } }
.hf-bottomnav--contained { position: absolute; display: grid; }
.hf-sidenav { display: none; }
.hf-topbar { display: none; }
@media (min-width: 1024px) {
  .hf-has-bottomnav { padding-bottom: 0; }
  .hf-shell { display: grid; grid-template-columns: var(--hf-sidebar-w, 264px) minmax(0, 1fr); }
  .hf-shell[data-collapsed="true"] { --hf-sidebar-w: 80px; }
  .hf-bottomnav:not(.hf-bottomnav--contained) { display: none; }
  .hf-sidenav { display: grid; align-content: start; gap: var(--space-1); padding: var(--space-3); background: var(--surface-200); border-right: 1px solid var(--divider); position: sticky; top: 0; height: 100vh; overflow: hidden auto; }
  .hf-sidenav__head { display: flex; align-items: center; gap: var(--space-2); min-height: 56px; margin-bottom: var(--space-3); }
  .hf-sidenav__brand { font-family: var(--font-display); font-size: 28px; line-height: 30px; letter-spacing: .04em; color: var(--ink); text-decoration: none; }
  .hf-sidenav .hf-nav-item { grid-auto-flow: column; justify-content: start; justify-items: start; align-content: center; gap: var(--space-3); min-height: 48px; padding: 0 var(--space-3); font-size: 15px; line-height: 20px; border-radius: var(--radius-md); }
  .hf-sidenav .hf-nav-item:hover:not([aria-current="page"]) { background: var(--surface-300); color: var(--ink); }
  .hf-shell[data-collapsed="true"] .hf-sidenav__brand, .hf-shell[data-collapsed="true"] .hf-nav-label { display: none; }
  .hf-shell[data-collapsed="true"] .hf-sidenav .hf-nav-item { justify-content: center; padding: 0; }
  .hf-shell[data-collapsed="true"] .hf-sidenav__head { justify-content: center; }
}
.hf-sidenav--demo { display: grid; align-content: start; gap: var(--space-1); padding: var(--space-3); background: var(--surface-200); border-right: 1px solid var(--divider); height: 100%; overflow: hidden; }
.hf-shell--demo { display: grid; grid-template-columns: var(--hf-sidebar-w, 264px) minmax(0, 1fr); min-height: 0; height: 400px; border: 1px solid var(--divider); border-radius: var(--radius-lg); overflow: hidden; background: var(--surface-100); }
.hf-shell--demo[data-collapsed="true"] { --hf-sidebar-w: 80px; }
.hf-shell--demo .hf-sidenav__head { display: flex; align-items: center; gap: var(--space-2); min-height: 56px; margin-bottom: var(--space-3); }
.hf-shell--demo .hf-sidenav__brand { font-family: var(--font-display); font-size: 28px; line-height: 30px; letter-spacing: .04em; color: var(--ink); }
.hf-shell--demo .hf-sidenav .hf-nav-item, .hf-shell--demo .hf-nav-item { grid-auto-flow: column; justify-content: start; justify-items: start; gap: var(--space-3); min-height: 48px; padding: 0 var(--space-3); font-size: 15px; border-radius: var(--radius-md); }
.hf-shell--demo[data-collapsed="true"] .hf-sidenav__brand, .hf-shell--demo[data-collapsed="true"] .hf-nav-label { display: none; }
.hf-shell--demo[data-collapsed="true"] .hf-nav-item { justify-content: center; padding: 0; }
.hf-shell--demo[data-collapsed="true"] .hf-sidenav__head { justify-content: center; }
.hf-phone { position: relative; width: 360px; max-width: 100%; height: 420px; border: 1px solid var(--divider); border-radius: 28px; overflow: hidden; background: var(--surface-100); }
.hf-phone__scroll { height: 100%; overflow-y: auto; padding: var(--space-4) var(--space-4) 110px; }

/* Sheet: bottom sheet on phones, centred dialog from 640px */
.hf-scrim { position: fixed; inset: 0; background: rgba(0,0,0,.5); display: grid; align-items: end; }
.hf-sheet { background: var(--surface-200); color: var(--ink); border-radius: var(--radius-lg) var(--radius-lg) 0 0; padding: var(--space-4) var(--space-4) var(--space-5); box-shadow: var(--shadow-sheet); display: grid; gap: var(--space-4); max-height: 90vh; overflow: auto; }
.hf-sheet__grab { width: 40px; height: 4px; border-radius: var(--radius-pill); background: var(--border); justify-self: center; }
@media (min-width: 640px) {
  .hf-scrim { align-items: center; justify-items: center; }
  .hf-sheet { width: 480px; border-radius: var(--radius-lg); }
  .hf-sheet__grab { display: none; }
}

/* Summary line (admin fee, totals) */
.hf-summary { display: grid; gap: var(--space-2); font-size: 15px; line-height: 22px; }
.hf-summary > div { display: flex; justify-content: space-between; gap: var(--space-3); }
.hf-summary .is-total { font-weight: 700; border-top: 1px solid var(--divider); padding-top: var(--space-2); }

.hf-grid--packs { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 1024px) { .hf-grid--packs { grid-template-columns: repeat(4, 1fr); } }

/* Authentication: login and registration. Phone = brand banner above the form; 1024px = split screen */
.hf-auth { min-height: 100vh; display: grid; grid-template-rows: auto 1fr; background: var(--surface-100); color: var(--ink); }
/* The logo files carry their own #cccccc background: keep this panel a fixed light grey in both themes so the image blends in. */
.hf-auth__brand { --hf-brand-h: 168px; display: grid; place-items: center; height: var(--hf-brand-h); overflow: hidden; background: #cccccc; }
.hf-auth__brand img { height: var(--hf-brand-h); width: auto; max-width: 100%; object-fit: contain; display: block; }
.hf-auth__brand .hf-auth__lockup { display: none; }
.hf-auth__main { display: grid; align-content: start; width: 100%; max-width: 440px; margin-inline: auto; padding: var(--space-5) var(--space-4) var(--space-6); gap: var(--space-5); }
.hf-auth__head { display: grid; gap: var(--space-2); }
.hf-auth__head p { margin: 0; color: var(--ink-muted); }
.hf-auth form { display: grid; gap: var(--space-4); }
.hf-auth__foot { display: grid; gap: var(--space-3); justify-items: center; text-align: center; }
.hf-auth__foot .hf-btn { width: 100%; }
@media (min-width: 640px) { .hf-auth__main { padding-top: var(--space-6); } .hf-auth__brand { --hf-brand-h: 208px; } }
@media (min-width: 1024px) {
  .hf-auth { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr; }
  .hf-auth__brand { height: auto; min-height: 100vh; position: sticky; top: 0; }
  .hf-auth__brand img { width: 84%; height: auto; }
  .hf-auth__brand .hf-auth__mark { display: none; }
  .hf-auth__brand .hf-auth__lockup { display: block; }
  .hf-auth__main { align-content: center; padding: var(--space-7) var(--space-6); }
}
/* Forced split layout for previews inside a narrower frame */
.hf-auth--split { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr; min-height: 0; height: 100%; }
.hf-auth--split .hf-auth__brand { height: 100%; min-height: 0; }
.hf-auth--split .hf-auth__brand img { width: 84%; height: auto; }
.hf-auth--split .hf-auth__brand .hf-auth__mark { display: none; }
.hf-auth--split .hf-auth__brand .hf-auth__lockup { display: block; }
.hf-auth--split .hf-auth__main { align-content: start; padding: var(--space-5); overflow: auto; height: 100%; }
/* Forced phone layout for previews inside a wide frame */
.hf-auth--phone { grid-template-columns: 1fr; grid-template-rows: auto 1fr; min-height: 0; height: auto; }
.hf-auth--phone .hf-auth__brand { --hf-brand-h: 168px; height: var(--hf-brand-h); min-height: 0; position: static; }
.hf-auth--phone .hf-auth__brand img { width: auto; height: var(--hf-brand-h); }
.hf-auth--phone .hf-auth__brand .hf-auth__mark { display: block; }
.hf-auth--phone .hf-auth__brand .hf-auth__lockup { display: none; }
.hf-auth--phone .hf-auth__main { align-content: start; padding: var(--space-5) var(--space-4) var(--space-5); }
.hf-frame { width: 100%; max-width: 900px; height: 600px; border: 1px solid var(--divider); border-radius: var(--radius-lg); overflow: hidden; }
.hf-phone--tall { height: 720px; }
.hf-phone--tall .hf-auth { min-height: 0; }
.hf-phone--tall .hf-auth__main { padding-bottom: var(--space-5); }

/* Password field with show / hide, checkbox, link, banner, divider */
.hf-input-wrap { position: relative; }
.hf-input-wrap .hf-input { padding-right: 56px; }
.hf-input-toggle { position: absolute; right: 2px; top: 0; width: 48px; height: 48px; display: grid; place-items: center; border: 0; background: transparent; color: var(--ink-muted); border-radius: var(--radius-md); cursor: pointer; }
.hf-input-toggle:hover { background: var(--surface-300); }
.hf-check { display: flex; align-items: flex-start; gap: var(--space-3); min-height: 48px; padding-block: 12px; cursor: pointer; font-size: 15px; line-height: 24px; }
.hf-check input { appearance: none; -webkit-appearance: none; flex: none; width: 24px; height: 24px; margin: 0; border: 2px solid var(--border); border-radius: 8px; background: var(--surface-200); display: grid; place-items: center; cursor: pointer; }
.hf-check input:checked { background: var(--brand); border-color: var(--brand); }
.hf-check input:checked::after { content: ""; width: 6px; height: 11px; border: solid var(--on-brand); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg) translate(-1px, -1px); }
.hf-link { color: var(--brand-ink); font-weight: 600; text-underline-offset: 3px; }
.hf-form-row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); flex-wrap: wrap; }
.hf-banner { display: flex; gap: var(--space-3); align-items: flex-start; padding: var(--space-3) var(--space-4); border-radius: var(--radius-md); font-size: 15px; line-height: 22px; font-weight: 500; }
.hf-banner .hf-icon { margin-top: 1px; }
.hf-banner--danger { background: var(--danger-bg); color: var(--danger-ink); }
.hf-banner--success { background: var(--success-bg); color: var(--success-ink); }
.hf-or { display: flex; align-items: center; gap: var(--space-3); color: var(--ink-muted); font: 700 12px/16px var(--font-sans); letter-spacing: .08em; text-transform: uppercase; }
.hf-or::before, .hf-or::after { content: ""; flex: 1; height: 1px; background: var(--divider); }
.hf-grid-2 { display: grid; gap: var(--space-4); }
@media (min-width: 640px) { .hf-grid-2 { grid-template-columns: 1fr 1fr; } }

/* Auth extras: status icon, password rules */
.hf-auth__icon { width: 64px; height: 64px; border-radius: 50%; background: var(--surface-300); color: var(--brand-ink); display: grid; place-items: center; }
.hf-auth__icon .hf-icon { font-size: 32px; }
.hf-auth__icon--success { background: var(--success-bg); color: var(--success-ink); }
.hf-rules { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-1); font-size: 14px; line-height: 20px; color: var(--ink-muted); }
.hf-rules li { display: flex; align-items: center; gap: var(--space-2); }
.hf-rules li .hf-icon { font-size: 18px; }
.hf-rules li.is-met { color: var(--success-ink); font-weight: 600; }
.hf-auth__back { display: inline-flex; align-items: center; gap: var(--space-1); min-height: 48px; color: var(--brand-ink); font-weight: 600; text-underline-offset: 3px; }

/* ===== Flows update ===== */
.hf-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hf-badge--info { background: var(--info-bg); color: var(--info-ink); }
.hf-badge--outline { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--border); }
.hf-banner--warning { background: var(--notice-bg); color: var(--notice-ink); border: 2px solid var(--notice-border); }
.hf-banner--info { background: var(--info-bg); color: var(--info-ink); }
.hf-banner a, .hf-banner .hf-link { color: inherit; text-decoration: underline; text-underline-offset: 3px; font-weight: 700; }
.hf-banner__body { display: grid; gap: 2px; min-width: 0; }
.hf-banner__amount { font-family: var(--font-display); font-size: 24px; line-height: 26px; letter-spacing: .02em; }

/* Tabs (chips with counts) */
.hf-tabs { display: flex; gap: var(--space-2); overflow-x: auto; padding-block: 4px; scrollbar-width: none; }
.hf-tabs::-webkit-scrollbar { display: none; }
.hf-chip__count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: var(--radius-pill); background: var(--surface-300); color: var(--ink); font: 700 12px/1 var(--font-sans); }
.hf-chip[aria-selected="true"] .hf-chip__count, .hf-chip[aria-pressed="true"] .hf-chip__count { background: rgba(255,255,255,.24); color: var(--on-brand); }
[data-theme="dark"] .hf-chip[aria-selected="true"] .hf-chip__count, [data-theme="dark"] .hf-chip[aria-pressed="true"] .hf-chip__count { background: rgba(0,0,0,.28); }

/* Search with clear, textarea */
.hf-search--clearable .hf-input { padding-right: 52px; }
.hf-search__clear { position: absolute; right: 2px; top: 0; width: 48px; height: 48px; display: grid; place-items: center; border: 0; background: transparent; color: var(--ink-muted); border-radius: var(--radius-pill); cursor: pointer; }
.hf-search__clear:hover { background: var(--surface-300); }
.hf-textarea { width: 100%; min-height: 128px; padding: var(--space-3) var(--space-4); border-radius: var(--radius-md); border: 1.5px solid var(--border); background: var(--surface-200); color: var(--ink); font: 400 16px/24px var(--font-sans); resize: vertical; }
.hf-input[readonly] { background: var(--surface-300); border-color: var(--divider); color: var(--ink-muted); }
.hf-input--date { font-variant-numeric: tabular-nums; }

/* Switch */
.hf-switch { display: inline-flex; align-items: center; gap: var(--space-3); min-height: 48px; padding: 0; border: 0; background: none; color: var(--ink); cursor: pointer; font: 600 14px/20px var(--font-sans); }
.hf-switch__track { position: relative; flex: none; width: 52px; height: 32px; border-radius: var(--radius-pill); background: var(--border); transition: background 120ms ease; }
.hf-switch__track::after { content: ""; position: absolute; top: 4px; left: 4px; width: 24px; height: 24px; border-radius: 50%; background: var(--surface-200); transition: transform 120ms ease; }
.hf-switch[aria-checked="true"] .hf-switch__track { background: var(--brand); }
.hf-switch[aria-checked="true"] .hf-switch__track::after { transform: translateX(20px); }
@media (prefers-reduced-motion: reduce) { .hf-switch__track, .hf-switch__track::after { transition: none; } }

/* Number stepper */
.hf-stepper { display: inline-grid; grid-template-columns: 48px minmax(64px, auto) 48px; align-items: center; padding: 4px; background: var(--surface-300); border-radius: var(--radius-pill); }
.hf-stepper button { width: 48px; height: 48px; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--surface-200); color: var(--ink); cursor: pointer; }
.hf-stepper button:disabled { opacity: .45; cursor: not-allowed; }
.hf-stepper output { text-align: center; font-family: var(--font-display); font-size: 32px; line-height: 1; }

/* Payment method tile */
.hf-paytiles { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); }
.hf-paytile { position: relative; display: grid; justify-items: center; align-content: center; gap: var(--space-2); min-height: 96px; padding: var(--space-3); border: 2px solid var(--border); border-radius: var(--radius-lg); background: var(--surface-200); color: var(--ink); cursor: pointer; font: 600 15px/20px var(--font-sans); }
.hf-paytile[aria-checked="true"], .hf-paytile[aria-pressed="true"] { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand); }
.hf-paytile__logo { height: 32px; display: grid; place-items: center; }
.hf-paytile__logo .hf-icon { font-size: 32px; }
.hf-paytile__logo img { max-height: 32px; width: auto; }
.hf-paytile__logo--plate img { max-height: 20px; background: #fff; border-radius: var(--radius-sm); padding: 6px 10px; box-sizing: content-box; }
.hf-paytile__check { position: absolute; top: 8px; right: 8px; display: none; color: var(--brand-ink); }
.hf-paytile[aria-checked="true"] .hf-paytile__check, .hf-paytile[aria-pressed="true"] .hf-paytile__check { display: block; }
.hf-hint { display: flex; gap: var(--space-3); align-items: flex-start; padding: var(--space-3) var(--space-4); border-radius: var(--radius-md); background: var(--surface-300); font-size: 14px; line-height: 20px; }
.hf-hint .hf-icon { font-size: 20px; color: var(--brand-ink); margin-top: 0; }
.hf-summary .hf-summary__note { font-size: 13px; line-height: 18px; color: var(--ink-muted); }
.hf-price { font-family: var(--font-display); font-size: 44px; line-height: 44px; letter-spacing: .01em; }
.hf-summary .is-total .hf-price-sm { font-family: var(--font-display); font-size: 28px; line-height: 28px; letter-spacing: .02em; }

/* Page header and floating action */
.hf-pagehead { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--space-3); flex-wrap: wrap; }
.hf-pagehead__count { margin: var(--space-1) 0 0; color: var(--ink-muted); font-size: 14px; line-height: 20px; }
.hf-pagehead__action { display: none; }
.hf-fab { position: fixed; z-index: 35; right: var(--space-4); bottom: calc(96px + var(--space-3) + env(safe-area-inset-bottom)); box-shadow: var(--shadow-md); border-radius: var(--radius-pill); }
.hf-fab--contained { position: absolute; bottom: 96px; }
@media (min-width: 640px) { .hf-pagehead__action { display: inline-flex; } .hf-fab:not(.hf-fab--contained) { display: none; } }
@media (min-width: 1024px) { .hf-fab { bottom: var(--space-5); } }

/* Data table (desktop) with sort and paging; cards on phones */
.hf-show-table { display: none; }
@media (min-width: 1024px) { .hf-show-table { display: block; } .hf-show-cards { display: none; } }
.hf-force-table .hf-show-table { display: block; }
.hf-force-table .hf-show-cards { display: none; }
.hf-table-wrap { overflow-x: auto; background: var(--surface-200); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.hf-table { width: 100%; min-width: 640px; border-collapse: separate; border-spacing: 0; font-size: 15px; line-height: 22px; }
.hf-table th, .hf-table td { padding: var(--space-3) var(--space-4); text-align: left; border-top: 1px solid var(--divider); background: var(--surface-200); white-space: nowrap; vertical-align: middle; }
.hf-table thead th { border-top: 0; background: var(--surface-300); font: 700 12px/16px var(--font-sans); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-muted); padding-block: 0; }
.hf-table .hf-num { text-align: right; font-variant-numeric: tabular-nums; }
.hf-table__actions { display: flex; gap: var(--space-2); justify-content: flex-end; }
.hf-table--sticky th:first-child, .hf-table--sticky td:first-child { position: sticky; left: 0; z-index: 1; box-shadow: 1px 0 0 var(--divider); }
.hf-table--sticky th:last-child, .hf-table--sticky td:last-child { position: sticky; right: 0; z-index: 1; box-shadow: -1px 0 0 var(--divider); }
.hf-sort { display: inline-flex; align-items: center; gap: 2px; min-height: 44px; padding: 0; border: 0; background: none; color: inherit; font: inherit; letter-spacing: inherit; text-transform: inherit; cursor: pointer; }
.hf-sort .hf-icon { font-size: 18px; }
th[aria-sort="ascending"] .hf-sort, th[aria-sort="descending"] .hf-sort { color: var(--ink); }
.hf-pager { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); flex-wrap: wrap; padding: var(--space-3) var(--space-4); border-top: 1px solid var(--divider); background: var(--surface-200); font-size: 14px; line-height: 20px; color: var(--ink-muted); }
.hf-pager__pages { display: flex; align-items: center; gap: 4px; }
.hf-pager__btn { display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-width: 40px; min-height: 40px; padding: 0 var(--space-2); border: 0; border-radius: var(--radius-pill); background: transparent; color: var(--ink); font: 600 14px/20px var(--font-sans); cursor: pointer; }
.hf-pager__btn:hover:not(:disabled) { background: var(--surface-300); }
.hf-pager__btn:disabled { opacity: .45; cursor: not-allowed; }
.hf-pager__btn[aria-current="page"] { background: var(--brand); color: var(--on-brand); }

/* Empty state and skeleton */
.hf-empty { display: grid; justify-items: center; gap: var(--space-3); text-align: center; padding: var(--space-6) var(--space-4); }
.hf-empty__icon { width: 64px; height: 64px; border-radius: 50%; background: var(--surface-300); color: var(--brand-ink); display: grid; place-items: center; }
.hf-empty__icon .hf-icon { font-size: 32px; }
.hf-empty p { margin: 0; max-width: 32ch; color: var(--ink-muted); }
.hf-skel { display: block; background: var(--surface-300); border-radius: var(--radius-sm); animation: hf-pulse 1.4s ease-in-out infinite; }
.hf-skel--line { height: 14px; }
.hf-skel--title { height: 22px; width: 60%; }
.hf-skel--time { height: 28px; width: 72px; }
.hf-skel--pill { height: 24px; width: 96px; border-radius: var(--radius-pill); }
.hf-skel--btn { height: 48px; width: 120px; border-radius: var(--radius-md); }
@keyframes hf-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .5; } }
@media (prefers-reduced-motion: reduce) { .hf-skel { animation: none; } }

/* Toasts */
.hf-toasts { position: fixed; z-index: 60; top: var(--space-3); left: var(--space-3); right: var(--space-3); display: grid; gap: var(--space-2); pointer-events: none; }
@media (min-width: 640px) { .hf-toasts { left: auto; right: var(--space-5); top: var(--space-5); width: 380px; } }
.hf-toasts--contained { position: absolute; }
.hf-toast { pointer-events: auto; display: flex; align-items: flex-start; gap: var(--space-3); padding: 12px 4px 12px 16px; border-radius: var(--radius-md); background: var(--surface-200); color: var(--ink); box-shadow: var(--shadow-md); border-left: 6px solid var(--border); font: 500 15px/22px var(--font-sans); }
.hf-toast > span:nth-child(2) { flex: 1; padding-top: 1px; }
.hf-toast--success { border-left-color: var(--success-solid); } .hf-toast--success > .hf-icon { color: var(--success-ink); }
.hf-toast--warning { border-left-color: var(--notice-border); } .hf-toast--warning > .hf-icon { color: var(--notice-ink); }
.hf-toast--error { border-left-color: var(--danger-solid); } .hf-toast--error > .hf-icon { color: var(--danger-ink); }
.hf-toast__close { flex: none; width: 40px; height: 40px; display: grid; place-items: center; border: 0; border-radius: 50%; background: transparent; color: var(--ink-muted); cursor: pointer; }
.hf-toast__close:hover { background: var(--surface-300); }

/* App header: brand (below 1024px), bell, profile */
.hf-header { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: var(--space-1); min-height: 64px; padding: 0 var(--space-3) 0 var(--space-4); background: var(--surface-200); border-bottom: 1px solid var(--divider); }
.hf-header__brand { display: inline-flex; align-items: center; gap: var(--space-2); margin-right: auto; color: var(--ink); text-decoration: none; font-family: var(--font-display); font-size: 28px; line-height: 30px; letter-spacing: .04em; }
.hf-header__mark { display: inline-block; flex: none; width: 40px; height: 40px; overflow: hidden; }
.hf-header__mark img { display: block; width: 123px; height: 99px; max-width: none; margin: -16px 0 0 -41px; }
@media (min-width: 1024px) { .hf-header { justify-content: flex-end; padding-inline: var(--space-6); } .hf-header__brand { display: none; } .hf-header--demo .hf-header__brand { display: none; } }
.hf-header--desktop { justify-content: flex-end; padding-inline: var(--space-6); }
.hf-header--desktop .hf-header__brand { display: none; }
.hf-iconbtn { position: relative; width: 48px; height: 48px; display: grid; place-items: center; border: 0; border-radius: 50%; background: transparent; color: var(--ink); cursor: pointer; }
.hf-iconbtn:hover { background: var(--surface-300); }
.hf-bell__count { position: absolute; top: 4px; right: 2px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: var(--radius-pill); background: var(--danger-solid); color: var(--on-danger-solid); font: 700 12px/20px var(--font-sans); text-align: center; }
.hf-profile { display: inline-flex; align-items: center; gap: var(--space-2); min-height: 48px; padding: 0 var(--space-2) 0 4px; border: 0; border-radius: var(--radius-pill); background: transparent; color: var(--ink); cursor: pointer; font: 600 14px/20px var(--font-sans); }
.hf-profile:hover { background: var(--surface-300); }
.hf-profile__name { display: none; }
@media (min-width: 640px) { .hf-profile__name { display: inline; } }
.hf-popwrap { position: relative; }
.hf-pop { position: absolute; right: 0; top: calc(100% + 8px); z-index: 50; width: min(360px, calc(100vw - 32px)); overflow: hidden; background: var(--surface-200); color: var(--ink); border: 1px solid var(--divider); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); text-align: left; }
.hf-pop__head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: var(--space-3) var(--space-4); }
.hf-pop__foot { display: grid; padding: var(--space-2); border-top: 1px solid var(--divider); }
.hf-menu { display: grid; padding: var(--space-2); margin: 0; list-style: none; }
.hf-menu__item { display: flex; align-items: center; gap: var(--space-3); min-height: 48px; padding: 0 var(--space-3); border: 0; border-radius: var(--radius-md); background: transparent; color: var(--ink); text-decoration: none; cursor: pointer; font: 600 15px/20px var(--font-sans); width: 100%; text-align: left; }
.hf-menu__item:hover { background: var(--surface-300); }
.hf-menu__who { padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--divider); }
.hf-notif { display: grid; grid-template-columns: 10px 1fr; gap: var(--space-3); width: 100%; padding: var(--space-3) var(--space-4); border: 0; border-top: 1px solid var(--divider); background: transparent; color: var(--ink); text-align: left; cursor: pointer; font: 400 14px/20px var(--font-sans); }
.hf-notif:hover { background: var(--surface-300); }
.hf-notif__dot { width: 10px; height: 10px; margin-top: 6px; border-radius: 50%; background: transparent; }
.hf-notif[data-unread="true"] .hf-notif__dot { background: var(--brand); }
.hf-notif[data-unread="true"] .hf-notif__title { font-weight: 700; }
.hf-notif__title { font-weight: 500; font-size: 15px; }
.hf-notif__date { color: var(--ink-muted); font-size: 12px; line-height: 16px; margin-top: 2px; }

/* Status icon (result pages) */
.hf-statusicon { width: 80px; height: 80px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-300); color: var(--brand-ink); }
.hf-statusicon .hf-icon { font-size: 44px; }
.hf-statusicon--success { background: var(--success-bg); color: var(--success-ink); }
.hf-statusicon--danger { background: var(--danger-bg); color: var(--danger-ink); }
.hf-statusicon--info { background: var(--info-bg); color: var(--info-ink); }
.hf-result { display: grid; justify-items: center; gap: var(--space-4); text-align: center; max-width: 480px; margin-inline: auto; padding: var(--space-5) var(--space-4); }
.hf-result p { margin: 0; }

/* Key-value (account), prose (reglement), stats, balance */
.hf-kv { display: grid; margin: 0; }
.hf-kv > div { display: grid; gap: 2px; padding: var(--space-3) 0; border-top: 1px solid var(--divider); }
.hf-kv > div:first-child { border-top: 0; }
.hf-kv dt { font: 700 12px/16px var(--font-sans); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-muted); }
.hf-kv dd { margin: 0; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
@media (min-width: 640px) { .hf-kv > div { grid-template-columns: 220px 1fr; align-items: center; } }
.hf-prose { display: grid; gap: var(--space-3); max-width: 68ch; }
.hf-prose h2 { margin: 0; font: 700 20px/26px var(--font-sans); }
.hf-prose p, .hf-prose ul { margin: 0; }
.hf-prose ul { padding-left: 20px; display: grid; gap: var(--space-1); }
.hf-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-3); }
.hf-stat { display: grid; gap: 2px; padding: var(--space-3) var(--space-4); background: var(--surface-200); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.hf-stat .hf-numeral { font-size: 36px; line-height: 36px; }
.hf-balance { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); }
.hf-balance .hf-numeral { font-size: 64px; line-height: 64px; }

/* Card lists: registrations, admin activities, payments */
.hf-actions3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-1); }
.hf-actions3 .hf-btn { padding: 0 6px; gap: 4px; min-height: 48px; font-size: 13px; }
.hf-actions3 .hf-icon { font-size: 18px; }
.hf-activity__note { display: flex; align-items: center; gap: var(--space-2); font-size: 14px; line-height: 20px; color: var(--ink-muted); }
.hf-activity__note .hf-icon { font-size: 18px; }
.hf-att-row__lines { display: grid; gap: 2px; min-width: 0; }
.hf-pay-row__meta { display: grid; gap: 2px; min-width: 0; }
.hf-pay-row__meta .hf-sm { overflow-wrap: anywhere; }

/* Template editor and variables */
.hf-tpl { display: grid; gap: var(--space-4); background: var(--surface-200); border-radius: var(--radius-lg); padding: var(--space-4); box-shadow: var(--shadow-sm); }
.hf-tpl__head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }
.hf-var { display: inline-flex; align-items: center; min-height: 32px; padding: 0 var(--space-2); border: 0; border-radius: var(--radius-sm); background: var(--surface-300); color: var(--ink); cursor: pointer; font: 600 13px/20px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.hf-details > summary { display: flex; align-items: center; gap: var(--space-2); min-height: 48px; cursor: pointer; font-weight: 700; color: var(--brand-ink); list-style: none; }
.hf-details > summary::-webkit-details-marker { display: none; }
.hf-details[open] > summary .hf-icon { transform: rotate(180deg); }
.hf-preview { padding: var(--space-3) var(--space-4); border: 1.5px dashed var(--border); border-radius: var(--radius-md); background: var(--surface-100); white-space: pre-wrap; font-size: 15px; line-height: 22px; }
.hf-sheet__head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }
.hf-sheet__actions { display: grid; gap: var(--space-2); }
@media (min-width: 640px) { .hf-sheet__actions--row { display: flex; justify-content: flex-end; } }
.hf-sheet--static { border-radius: var(--radius-lg); box-shadow: var(--shadow-md); }
.hf-btn--icon { padding: 0; width: var(--size-touch); }
.hf-appframe { display: grid; grid-template-columns: 248px minmax(0, 1fr); height: var(--frame-h, 640px); border: 1px solid var(--divider); border-radius: var(--radius-lg); overflow: hidden; background: var(--surface-100); }
.hf-appframe__main { overflow: auto; min-width: 0; }
.hf-appframe .hf-sidenav--demo .hf-nav-item { grid-auto-flow: column; justify-content: start; justify-items: start; gap: var(--space-3); min-height: 48px; padding: 0 var(--space-3); font-size: 14px; white-space: nowrap; line-height: 20px; border-radius: var(--radius-md); }
.hf-appframe .hf-sidenav__head { display: flex; align-items: center; gap: var(--space-2); min-height: 56px; margin-bottom: var(--space-3); }
.hf-appframe .hf-sidenav__brand { font-family: var(--font-display); font-size: 28px; line-height: 30px; letter-spacing: .04em; color: var(--ink); }

.hf-pay-row--plain { grid-template-columns: 1fr; }
@media (min-width: 640px) { .hf-pay-row--plain { grid-template-columns: 1fr auto auto; } }
.hf-member__id .hf-sm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hf-errorbar { position: fixed; z-index: 70; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-4); background: var(--danger-solid); color: var(--on-danger-solid); font-weight: 600; }
.hf-errorbar > span:first-child { flex: 1; }
.hf-errorbar .hf-btn { background: var(--on-danger-solid); color: var(--danger-solid); }
.hf-errorbar--contained { position: absolute; }

.hf-nav-label { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hf-header--phone { justify-content: flex-start; padding: 0 var(--space-3) 0 var(--space-4); }
.hf-header--phone .hf-header__brand { display: inline-flex; }
.hf-table td { line-height: 24px; }
.hf-table td > .hf-badge, .hf-table td .hf-row { vertical-align: middle; }

.hf-bottomnav .hf-nav-label { font-size: 11px; letter-spacing: 0; }
/* Preview support: a .hf-phone frame shows the phone layout even when the preview window is wide */
@media (min-width: 640px) {
  .hf-phone .hf-pay-row { grid-template-columns: auto 1fr; }
  .hf-phone .hf-pay-row--plain { grid-template-columns: 1fr; }
  .hf-phone .hf-pay-row__amt { grid-column: 1 / -1; justify-content: space-between; }
  .hf-phone .hf-pay-row__actions { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr); }
  .hf-phone .hf-att-row { grid-template-columns: auto 1fr; }
  .hf-phone .hf-att-row .hf-segmented { grid-column: 1 / -1; }
  .hf-phone .hf-pagehead__action { display: none; }
  .hf-phone .hf-profile__name { display: none; }
  .hf-phone .hf-kv > div { grid-template-columns: 1fr; }
  .hf-phone .hf-grid--2, .hf-phone .hf-grid--3, .hf-phone .hf-grid-2 { grid-template-columns: minmax(0, 1fr); }
}
@media (min-width: 640px) { .hf-phone .hf-page { padding: var(--space-4); } }
@media (min-width: 1024px) { .hf-phone .hf-page { padding: var(--space-4); } }
.hf-stat .hf-badge { justify-self: start; }
.hf-table .hf-btn--sm { padding: 0 var(--space-3); gap: 6px; }
