/* Link 虚拟卡 · components — direction A「墨与纸 Ink & Paper」. Requires tokens.css.
   Class-based, framework-free, CSP-safe: nothing needs a style="" attribute. Dynamic values use
   native <meter>/<progress> values, SVG attributes (countdown rings), data-/aria- attributes
   (data-status, data-state, aria-current, aria-pressed) or el.style.setProperty() from JS.
   Breakpoints: 600 sm · 768 md · 1024 lg (sidebar replaces the tab bar) · 1280 xl. */

/* =========================================================================
   1. Base
   ========================================================================= */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--topbar-h) + var(--space-4));
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-wrap: break-word;
  -webkit-tap-highlight-color: transparent;
}

h1, h2, h3, h4, h5, p, figure, blockquote, dl, dd, ol, ul { margin: 0; }
ol, ul { padding: 0; }
h1, h2, h3, h4 { font-weight: var(--weight-heading); line-height: var(--leading-snug); }
img { display: block; max-width: 100%; height: auto; }
svg { flex: none; }
button, input, select, textarea { margin: 0; font: inherit; color: inherit; letter-spacing: inherit; }
button { padding: 0; border: 0; background: none; cursor: pointer; }
table { border-collapse: collapse; border-spacing: 0; }
hr { margin: 0; border: 0; border-top: 1px solid var(--border); }
code, kbd, samp { font-family: var(--font-mono); font-size: 0.92em; }
[hidden] { display: none !important; }

a {
  color: var(--accent-text);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}
a:hover { color: var(--accent-hover); }

:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
:focus:not(:focus-visible) { outline: none; }
::selection { background: var(--selection); color: var(--text); }

/* =========================================================================
   2. Typography
   ========================================================================= */
.eyebrow {
  display: block;
  font-size: var(--text-xs);
  line-height: 1.5;
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-label);
  color: var(--text-3);
}
.caps {
  font-size: var(--text-2xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
}
.display {
  font-family: var(--font-display);
  font-size: 30px;
  line-height: var(--leading-tight);
  font-weight: var(--weight-heading);
  letter-spacing: var(--tracking-display);
}
@media (min-width: 768px) { .display { font-size: var(--text-3xl); } }
.h2 { font-size: var(--text-xl); line-height: 1.3; font-weight: var(--weight-heading); letter-spacing: var(--tracking-tight); }
.h3 { font-size: var(--text-md); line-height: 1.4; font-weight: var(--weight-heading); }
.lede { max-width: 36em; font-size: var(--text-md); line-height: var(--leading-loose); color: var(--text-2); }
.text-sm { font-size: var(--text-sm); line-height: 1.6; }
.text-xs { font-size: var(--text-xs); line-height: 1.5; }
.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
.strong { font-weight: var(--weight-semibold); color: var(--text); }
.num { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--font-mono); font-variant-ligatures: none; }
.nowrap { white-space: nowrap; }
.truncate { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Money: tabular figures; the hero variant sets the symbol small and raised (private-banking style). */
.money { font-variant-numeric: tabular-nums; white-space: nowrap; }
.money--hero {
  font-family: var(--font-display);
  font-weight: var(--weight-light);
  letter-spacing: var(--tracking-display);
  line-height: 1;
}
.money__sym {
  margin-right: 0.08em;
  font-size: 0.52em;
  font-weight: var(--weight-regular);
  vertical-align: 0.74em;
  letter-spacing: 0;
  color: var(--text-3);
}
.money__minor { color: var(--text-3); }

/* Inline meta line: "uniqlo.com · 14:02 · lsrq_…" */
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 0; min-width: 0; font-size: var(--text-sm); color: var(--text-3); }
.meta > * + *::before { content: "·"; margin: 0 var(--space-2); color: var(--text-disabled); }

/* =========================================================================
   3. Icons — inline SVG, 24×24 viewBox, stroke drawn here (no attributes needed)
   ========================================================================= */
.icon {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: middle;
}
.icon--xs { width: 14px; height: 14px; stroke-width: 1.9; }
.icon--sm { width: 16px; height: 16px; stroke-width: 1.75; }
.icon--lg { width: 24px; height: 24px; stroke-width: 1.5; }
.icon--xl { width: 32px; height: 32px; stroke-width: 1.3; }
.icon .is-fill { fill: currentColor; stroke: none; }

/* =========================================================================
   4. Layout primitives
   ========================================================================= */
.stack { display: flex; flex-direction: column; gap: var(--gap, var(--space-4)); min-width: 0; }
.cluster { display: flex; flex-wrap: wrap; align-items: center; gap: var(--gap, var(--space-3)); min-width: 0; }
/* phones: one swipeable row that bleeds to the screen edge instead of wrapping */
@media (max-width: 599px) {
  .cluster--scroll {
    flex-wrap: nowrap;
    margin: 0 calc(-1 * var(--page-pad-x));
    padding: 2px var(--page-pad-x);
    overflow-x: auto;
    scrollbar-width: none;
    scroll-padding-inline: var(--page-pad-x);
  }
  .cluster--scroll::-webkit-scrollbar { display: none; }
  .cluster--scroll > * { flex: none; }
}
.spread { display: flex; align-items: center; justify-content: space-between; gap: var(--gap, var(--space-4)); min-width: 0; }
.spread--top { align-items: flex-start; }
.spread--base { align-items: baseline; }
.gap-1 { --gap: var(--space-1); }
.gap-2 { --gap: var(--space-2); }
.gap-3 { --gap: var(--space-3); }
.gap-4 { --gap: var(--space-4); }
.gap-5 { --gap: var(--space-5); }
.gap-6 { --gap: var(--space-6); }
.gap-7 { --gap: var(--space-7); }
.gap-8 { --gap: var(--space-8); }
.grow { flex: 1 1 auto; min-width: 0; }

.grid { display: grid; gap: var(--gap, var(--space-6)); min-width: 0; }
.grid > * { min-width: 0; }
@media (min-width: 768px) {
  .grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1180px) {
  .grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
/* main column + 340 px aside */
@media (min-width: 1180px) {
  .grid--aside { grid-template-columns: minmax(0, 1fr) 340px; gap: var(--space-8); }
  .grid--aside-wide { grid-template-columns: minmax(0, 1fr) 400px; gap: var(--space-8); }
}
/* Responsive visibility */
@media (max-width: 767px) { .hide-sm { display: none !important; } }
@media (min-width: 768px) { .show-sm { display: none !important; } }
@media (max-width: 1023px) { .hide-md { display: none !important; } }
@media (min-width: 1024px) { .show-md { display: none !important; } }

.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* =========================================================================
   5. App shell — sidebar ≥ 1024 px, tab bar below
   ========================================================================= */
.app {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-height: 100vh;
  min-height: 100dvh;
}
@media (min-width: 1024px) {
  /* the column is painted on .app so it reaches the bottom of long pages; the sidebar itself stays sticky */
  .app {
    grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
    background: linear-gradient(90deg, var(--sidebar-bg) 0 calc(var(--sidebar-w) - 1px), var(--border) calc(var(--sidebar-w) - 1px) var(--sidebar-w), transparent var(--sidebar-w));
  }
}

.sidebar { display: none; }
@media (min-width: 1024px) {
  .sidebar {
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
    padding: var(--space-6) var(--space-4) var(--space-5);
    overflow-y: auto;
    background: var(--sidebar-bg);
    border-right: 1px solid var(--border);
  }
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-width: 0;
  padding: 0 var(--space-2);
  color: var(--text);
  text-decoration: none;
}
.brand:hover { color: var(--text); }
.brand__text { display: flex; flex-direction: column; min-width: 0; }
.brand__name { font-size: var(--text-base); font-weight: var(--weight-heading); line-height: 1.3; white-space: nowrap; }
.brand__sub { font-size: var(--text-xs); line-height: 1.4; color: var(--text-3); white-space: nowrap; }

/* Product mark: an ink seal with a paper card and a teal chip; inverts in dark mode. */
.seal {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--text);
  color: var(--bg);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
.seal svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.seal .seal__chip { fill: var(--accent-bright); stroke: none; }
.seal--lg { width: 44px; height: 44px; border-radius: 12px; }
.seal--lg svg { width: 30px; height: 30px; stroke-width: 1.3; }

.nav { display: flex; flex-direction: column; gap: 2px; margin-top: var(--space-8); }
.nav__label {
  margin: var(--space-6) 0 var(--space-2);
  padding: 0 var(--space-3);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-label);
  color: var(--text-3);
}
.nav__item {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-height: 40px;
  padding: 0 var(--space-3);
  border-radius: var(--radius-md);
  color: var(--text-2);
  font-size: var(--text-base);
  text-decoration: none;
  transition: background-color var(--dur-fast) var(--ease-standard), color var(--dur-fast) var(--ease-standard);
}
.nav__item:hover { color: var(--text); background: var(--surface-muted); }
.nav__item[aria-current="page"] {
  color: var(--text);
  font-weight: var(--weight-medium);
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--border), var(--shadow-xs);
}
.nav__item[aria-current="page"] .icon { color: var(--accent); }
.nav__badge {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 20px;
  margin-left: auto;
  padding: 0 6px;
  border-radius: var(--radius-pill);
  background: var(--surface-muted);
  color: var(--text-2);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.nav__badge--attention { background: var(--status-pending_approval-bg); color: var(--status-pending_approval-fg); }

.sidebar__foot {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  margin-top: auto;
  padding: var(--space-4) var(--space-3) 0;
  border-top: 1px solid var(--border);
  font-size: var(--text-xs);
  line-height: 1.5;
  color: var(--text-3);
}

.main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px));
}
@media (min-width: 1024px) { .main { padding-bottom: 0; } }

.topbar {
  position: sticky;
  top: 0;
  z-index: var(--z-nav);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-height: var(--topbar-h);
  padding: 0 var(--page-pad-x);
  background: var(--bg-translucent);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--border);
}
.topbar__brand { display: flex; min-width: 0; }
.topbar__brand .brand { padding: 0; }
.topbar__crumbs { display: none; }
@media (min-width: 1024px) {
  .topbar__brand { display: none; }
  .topbar__crumbs {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    min-width: 0;
    font-size: var(--text-sm);
    color: var(--text-3);
  }
}
.topbar__crumbs a { color: var(--text-3); text-decoration: none; }
.topbar__crumbs a:hover { color: var(--text); }
.topbar__crumbs [aria-current="page"] { color: var(--text); font-weight: var(--weight-medium); }
.topbar__crumbs .icon { width: 14px; height: 14px; color: var(--text-disabled); }
.topbar__actions { display: flex; align-items: center; gap: var(--space-2); min-width: 0; margin-left: auto; }
.topbar__divider { width: 1px; height: 20px; background: var(--border); }
@media (max-width: 1023px) { .topbar__desktop { display: none !important; } }

.tabbar {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: var(--z-nav);
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: var(--bg-translucent);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-top: 1px solid var(--border);
}
@media (min-width: 1024px) { .tabbar { display: none; } }
.tabbar__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-width: 0;
  color: var(--text-3);
  font-size: var(--text-xs);
  line-height: 1.2;
  letter-spacing: 0.02em;
  text-decoration: none;
}
.tabbar__item .icon { width: 22px; height: 22px; }
.tabbar__item:hover { color: var(--text); }
.tabbar__item[aria-current="page"] { color: var(--text); font-weight: var(--weight-medium); }
.tabbar__item[aria-current="page"] .icon { color: var(--accent); stroke-width: 1.8; }
.tabbar__fab {
  display: grid;
  place-items: center;
  width: 46px;
  height: 30px;
  border-radius: 10px;
  background: var(--btn-primary-bg);
  color: var(--btn-primary-fg);
}
.tabbar__fab .icon { width: 18px; height: 18px; stroke-width: 2; }
.tabbar__item[aria-current="page"] .tabbar__fab .icon { color: var(--btn-primary-fg); }

/* Page container + masthead */
.page {
  width: 100%;
  max-width: calc(var(--content-max) + 2 * var(--page-pad-x));
  margin: 0 auto;
  padding: var(--space-7) var(--page-pad-x) var(--space-10);
}
@media (min-width: 1024px) { .page { padding-top: var(--space-9); padding-bottom: var(--space-12); } }
.page--narrow { max-width: calc(820px + 2 * var(--page-pad-x)); }

.masthead {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-4) var(--space-6);
  padding-bottom: var(--space-5);
  border-bottom: 1px solid var(--rule-ink);
}
.masthead__text { min-width: 0; }
.masthead__eyebrow { margin-bottom: var(--space-2); }
.masthead__title {
  font-family: var(--font-display);
  font-size: 30px;
  line-height: var(--leading-tight);
  font-weight: var(--weight-heading);
  letter-spacing: var(--tracking-display);
}
@media (min-width: 768px) { .masthead__title { font-size: var(--text-3xl); } }
.masthead__lede { max-width: 40em; margin-top: var(--space-3); color: var(--text-2); }
.masthead__actions { display: flex; flex-wrap: wrap; gap: var(--space-2); }

.section { margin-top: var(--space-9); }
@media (min-width: 1024px) { .section { margin-top: var(--space-10); } }
.section--tight { margin-top: var(--space-7); }
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}
.section-title {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  font-size: var(--text-md);
  font-weight: var(--weight-heading);
  line-height: 1.4;
}
.section-title__count { font-size: var(--text-sm); font-weight: var(--weight-regular); color: var(--text-3); font-variant-numeric: tabular-nums; }
.section-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-sm);
  color: var(--text-2);
  text-decoration: none;
  white-space: nowrap;
}
.section-link:hover { color: var(--accent-text); }
.section-link .icon { width: 15px; height: 15px; }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-sm);
  color: var(--text-3);
  text-decoration: none;
}
.back-link:hover { color: var(--text); }
.back-link .icon { width: 16px; height: 16px; }

/* =========================================================================
   6. Link connection pill · theme toggle · icon button
   ========================================================================= */
.link-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
  max-width: 100%;
  height: 32px;
  padding: 0 var(--space-3) 0 11px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--text);
  font-size: var(--text-sm);
  line-height: 1.3; /* not 1: the clipped email detail would lose its descenders */
  white-space: nowrap;
  text-decoration: none;
}
a.link-pill:hover, button.link-pill:hover { color: var(--text); border-color: var(--border-strong); }
.link-pill__dot { position: relative; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--text-disabled); }
.link-pill__label { font-weight: var(--weight-medium); }
.link-pill__detail { min-width: 0; max-width: 24ch; overflow: hidden; text-overflow: ellipsis; color: var(--text-3); }
.link-pill__detail::before { content: "·"; margin-right: var(--space-2); color: var(--text-disabled); }
@media (max-width: 767px) { .link-pill__detail { display: none; } }
.link-pill[data-state="connected"] .link-pill__dot { background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.link-pill[data-state="disconnected"] { border-color: var(--warning-border); background: var(--warning-soft); }
.link-pill[data-state="disconnected"] .link-pill__dot { background: var(--warning-dot); }
.link-pill[data-state="disconnected"] .link-pill__label { color: var(--warning-text); }
.link-pill[data-state="checking"] .link-pill__dot { background: var(--text-3); animation: blink 1.2s var(--ease-standard) infinite; }

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--surface);
}
.theme-toggle__btn {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-pill);
  color: var(--text-3);
  transition: background-color var(--dur-fast) var(--ease-standard), color var(--dur-fast) var(--ease-standard);
}
.theme-toggle__btn:hover { color: var(--text); }
.theme-toggle__btn[aria-pressed="true"] { background: var(--surface-muted); color: var(--text); box-shadow: inset 0 0 0 1px var(--border); }
.theme-toggle__btn .icon { width: 16px; height: 16px; }

.icon-btn {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 36px;
  height: 36px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  color: var(--text-2);
  text-decoration: none;
  transition: background-color var(--dur-fast) var(--ease-standard), color var(--dur-fast) var(--ease-standard), border-color var(--dur-fast) var(--ease-standard);
}
.icon-btn:hover { color: var(--text); background: var(--surface-muted); }
.icon-btn--outline { border-color: var(--border); background: var(--surface); }
.icon-btn--sm { width: 30px; height: 30px; border-radius: 8px; }
.icon-btn--sm .icon { width: 16px; height: 16px; }
@media (pointer: coarse) { .icon-btn, .icon-btn--sm { width: var(--tap); height: var(--tap); } }

/* =========================================================================
   7. Buttons
   ========================================================================= */
.btn {
  --btn-h: 44px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-width: 0;
  height: var(--btn-h);
  padding: 0 var(--space-5);
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
  line-height: 1;
  letter-spacing: 0.01em;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  user-select: none;
  transition:
    background-color var(--dur-fast) var(--ease-standard),
    border-color var(--dur-fast) var(--ease-standard),
    color var(--dur-fast) var(--ease-standard),
    box-shadow var(--dur-fast) var(--ease-standard),
    transform var(--dur-instant) var(--ease-standard);
}
.btn:active { transform: translateY(1px); }
.btn .icon { width: 18px; height: 18px; }

.btn--primary {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-fg);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 2px rgba(20, 18, 14, 0.16);
}
.btn--primary:hover { background: var(--btn-primary-hover); color: var(--btn-primary-fg); }
.btn--accent { background: var(--accent); color: var(--on-accent); }
.btn--accent:hover { background: var(--accent-hover); color: var(--on-accent); }
.btn--secondary { background: var(--surface); color: var(--text); border-color: var(--border-strong); box-shadow: var(--shadow-xs); }
.btn--secondary:hover { color: var(--text); border-color: var(--input-border); }
.btn--ghost { background: transparent; color: var(--text-2); }
.btn--ghost:hover { background: var(--surface-muted); color: var(--text); }
.btn--danger { background: transparent; color: var(--danger-text); border-color: var(--danger-border); }
.btn--danger:hover { background: var(--danger-soft); color: var(--danger-text); }
.btn--danger-ghost { background: transparent; color: var(--danger-text); }
.btn--danger-ghost:hover { background: var(--danger-soft); color: var(--danger-text); }

.btn--sm { --btn-h: 34px; gap: 6px; padding: 0 var(--space-3); border-radius: 8px; font-size: var(--text-sm); }
.btn--sm .icon { width: 16px; height: 16px; }
.btn--lg { --btn-h: 52px; padding: 0 var(--space-6); border-radius: 12px; font-size: 16px; }
.btn--block { display: flex; width: 100%; }
.btn--square { width: var(--btn-h); padding: 0; }
@media (pointer: coarse) { .btn--sm { --btn-h: 40px; } }

/* Two-line call to action (e.g. the Link verification link) */
.btn--tall {
  height: auto;
  min-height: 68px;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-3) var(--space-5) var(--space-3) var(--space-6);
  border-radius: var(--radius-lg);
  text-align: left;
  white-space: normal;
}
.btn__lines { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.btn__title { font-size: var(--text-md); font-weight: var(--weight-heading); line-height: 1.3; }
.btn__caption { font-family: var(--font-mono); font-size: var(--text-xs); font-weight: var(--weight-regular); line-height: 1.35; opacity: 0.72; overflow-wrap: anywhere; }
.btn--tall .icon { width: 22px; height: 22px; }

.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.45; pointer-events: none; box-shadow: none; }
.btn[aria-busy="true"] { color: transparent !important; pointer-events: none; }
.btn[aria-busy="true"]::after {
  content: "";
  position: absolute;
  inset: 0;
  width: 18px;
  height: 18px;
  margin: auto;
  border: 2px solid var(--btn-primary-fg);
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.btn--secondary[aria-busy="true"]::after, .btn--ghost[aria-busy="true"]::after { border-color: var(--text); border-right-color: transparent; }

/* =========================================================================
   8. Forms
   ========================================================================= */
.field { display: flex; flex-direction: column; gap: var(--space-2); min-width: 0; }
.field__label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  line-height: 1.4;
  color: var(--text-2);
}
.field__optional { font-weight: var(--weight-regular); color: var(--text-3); }
.field__hint { font-size: var(--text-sm); line-height: 1.55; color: var(--text-3); }
.field__error { display: flex; align-items: flex-start; gap: 6px; font-size: var(--text-sm); line-height: 1.5; color: var(--danger-text); }
.field__error .icon { width: 16px; height: 16px; margin-top: 2px; }
.field-row { display: grid; gap: var(--space-5) var(--space-4); }
@media (min-width: 600px) { .field-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.input, .select, .textarea {
  display: block;
  width: 100%;
  min-height: var(--tap);
  padding: 10px 14px;
  border: 1px solid var(--input-border);
  border-radius: var(--radius-md);
  background: var(--input-bg);
  color: var(--text);
  font-size: var(--text-base);
  line-height: 1.45;
  appearance: none;
  transition: border-color var(--dur-fast) var(--ease-standard), box-shadow var(--dur-fast) var(--ease-standard);
}
.input::placeholder, .textarea::placeholder { color: var(--text-3); opacity: 1; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--text-3); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.input[aria-invalid="true"], .select[aria-invalid="true"], .textarea[aria-invalid="true"] { border-color: var(--danger); }
.input[aria-invalid="true"]:focus, .textarea[aria-invalid="true"]:focus { box-shadow: 0 0 0 3px var(--danger-soft); }
.input:disabled, .select:disabled, .textarea:disabled { background: var(--surface-muted); color: var(--text-3); border-color: var(--border-strong); }
.input--mono { font-family: var(--font-mono); letter-spacing: 0.02em; }
.textarea { min-height: 112px; resize: vertical; line-height: var(--leading-body); }
@media (max-width: 1023px) { .input, .select, .textarea { font-size: 16px; } } /* no iOS focus zoom */

.select-wrap { position: relative; display: block; min-width: 0; }
.select-wrap::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 17px;
  width: 7px;
  height: 7px;
  border-right: 1.5px solid var(--text-2);
  border-bottom: 1.5px solid var(--text-2);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}
.select { padding-right: 42px; cursor: pointer; }
.select option { background: var(--surface); color: var(--text); }
.select--pill {
  min-height: 36px;
  height: 36px;
  padding: 0 34px 0 14px;
  border-color: var(--border-strong);
  border-radius: var(--radius-pill);
  background: var(--surface);
  font-size: var(--text-sm);
  font-weight: var(--weight-heading);
  letter-spacing: 0.08em;
}
.select-wrap--pill::after { right: 15px; width: 6px; height: 6px; }

.input-group {
  display: flex;
  align-items: stretch;
  min-width: 0;
  border: 1px solid var(--input-border);
  border-radius: var(--radius-md);
  background: var(--input-bg);
  transition: border-color var(--dur-fast) var(--ease-standard), box-shadow var(--dur-fast) var(--ease-standard);
}
.input-group:hover { border-color: var(--text-3); }
.input-group:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.input-group > .input { flex: 1 1 auto; min-width: 0; border: 0; background: transparent; box-shadow: none; }
.input-group > .input:focus { box-shadow: none; }
.input-group__addon { display: flex; align-items: center; padding-left: 14px; color: var(--text-3); white-space: nowrap; }
.input-group__addon + .input { padding-left: 6px; }
.input-group__end { display: flex; align-items: center; padding-right: 4px; }

.counter { font-size: var(--text-xs); color: var(--text-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.counter[data-state="short"] { color: var(--warning-text); }
.counter[data-state="ok"] { color: var(--success-text); }

/* Big amount input: hairline underline, light display numerals */
.amount { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-1) 0 var(--space-3); border-bottom: 1px solid var(--input-border); transition: border-color var(--dur-fast) var(--ease-standard), box-shadow var(--dur-fast) var(--ease-standard); }
.amount:focus-within { border-bottom-color: var(--text); box-shadow: 0 1px 0 0 var(--text); }
.amount[aria-invalid="true"] { border-bottom-color: var(--danger); box-shadow: 0 1px 0 0 var(--danger); }
.amount__sym {
  align-self: flex-start;
  padding-top: 0.42em;
  font-family: var(--font-display);
  font-size: clamp(24px, 5vw, 32px);
  font-weight: var(--weight-light);
  line-height: 1;
  color: var(--text-3);
}
.amount__input {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font-family: var(--font-display);
  font-size: clamp(48px, 12vw, 76px);
  font-weight: var(--weight-light);
  font-variant-numeric: tabular-nums;
  line-height: 1.08;
  letter-spacing: -0.035em;
  caret-color: var(--accent);
}
.amount__input:focus { outline: none; }
.amount__input::placeholder { color: var(--text-disabled); opacity: 1; }
.amount__currency { flex: none; align-self: center; }
.amount__meta { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-5); margin-top: var(--space-3); font-size: var(--text-sm); color: var(--text-3); }
.amount__meta strong { font-weight: var(--weight-medium); color: var(--text-2); font-variant-numeric: tabular-nums; }

/* Switch: <label class="switch"><input class="switch__input" type="checkbox" role="switch"><span class="switch__track"></span>…</label> */
.switch { position: relative; display: inline-flex; align-items: center; gap: var(--space-3); cursor: pointer; }
.switch__input { position: absolute; top: 0; left: 0; width: 46px; height: 28px; margin: 0; opacity: 0; cursor: pointer; }
.switch__track {
  position: relative;
  flex: none;
  width: 46px;
  height: 28px;
  border-radius: var(--radius-pill);
  background: var(--switch-off);
  box-shadow: inset 0 0 0 1px var(--input-border);
  transition: background-color var(--dur-base) var(--ease-standard), box-shadow var(--dur-base) var(--ease-standard);
}
.switch__track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--switch-knob);
  box-shadow: 0 1px 3px rgba(20, 18, 14, 0.28), 0 0 0 0.5px rgba(20, 18, 14, 0.08);
  transition: transform var(--dur-base) var(--ease-out);
}
.switch__input:checked + .switch__track { background: var(--accent); box-shadow: none; }
.switch__input:checked + .switch__track::after { transform: translateX(18px); }
.switch__input:focus-visible + .switch__track { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.switch__input:disabled + .switch__track { opacity: 0.5; }
.switch--test .switch__input:checked + .switch__track { background: var(--test-bg); }
.switch__label { font-weight: var(--weight-medium); color: var(--text); }

/* A whole row that toggles (prominent TEST switch) */
.toggle-card {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-5);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  background: var(--surface);
  cursor: pointer;
  transition: border-color var(--dur-fast) var(--ease-standard), background-color var(--dur-fast) var(--ease-standard);
}
.toggle-card:hover { border-color: var(--input-border); }
.toggle-card__icon { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: var(--radius-md); background: var(--test-soft); color: var(--test-text); }
.toggle-card__body { flex: 1 1 auto; min-width: 0; }
.toggle-card__title { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); font-weight: var(--weight-heading); }
.toggle-card__desc { margin-top: 2px; font-size: var(--text-sm); line-height: 1.55; color: var(--text-3); }
.toggle-card .switch { flex: none; }
.toggle-card:has(.switch__input:checked) { border-color: var(--test-border); background: var(--test-soft); }

/* Segmented control: radios (no JS) or buttons with aria-pressed */
.segmented {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  max-width: 100%;
  padding: 3px;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-muted);
  scrollbar-width: none;
}
.segmented::-webkit-scrollbar { display: none; }
.segmented__opt { position: relative; display: inline-flex; flex: none; }
.segmented__opt > input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.segmented__opt > span, .segmented__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  height: 34px;
  padding: 0 var(--space-4);
  border-radius: 9px;
  color: var(--text-2);
  font-size: var(--text-sm);
  white-space: nowrap;
  transition: background-color var(--dur-fast) var(--ease-standard), color var(--dur-fast) var(--ease-standard), box-shadow var(--dur-fast) var(--ease-standard);
}
.segmented__opt > input:hover + span, .segmented__btn:hover { color: var(--text); }
.segmented__opt > input:checked + span,
.segmented__btn[aria-pressed="true"],
.segmented__btn[aria-selected="true"] {
  background: var(--surface);
  color: var(--text);
  font-weight: var(--weight-medium);
  box-shadow: 0 0 0 1px var(--border), var(--shadow-sm);
}
.segmented__opt > input:focus-visible + span, .segmented__btn:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 1px; }
.segmented__count { font-size: var(--text-xs); color: var(--text-3); font-variant-numeric: tabular-nums; }
.segmented--block { display: flex; }
.segmented--block .segmented__opt { flex: 1 1 0; }

/* Disclosure (更多选项) */
.disclosure { border-top: 1px solid var(--border); }
.disclosure > summary {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-5) 0;
  list-style: none;
  font-weight: var(--weight-semibold);
  cursor: pointer;
}
.disclosure > summary::-webkit-details-marker { display: none; }
.disclosure > summary::after {
  content: "";
  width: 7px;
  height: 7px;
  margin-left: auto;
  border-right: 1.5px solid var(--text-2);
  border-bottom: 1.5px solid var(--text-2);
  transform: translateY(-2px) rotate(45deg);
  transition: transform var(--dur-base) var(--ease-standard);
}
.disclosure[open] > summary::after { transform: translateY(2px) rotate(225deg); }
.disclosure__hint { font-size: var(--text-sm); font-weight: var(--weight-regular); color: var(--text-3); }
.disclosure__body { display: flex; flex-direction: column; gap: var(--space-6); padding-bottom: var(--space-6); }

/* =========================================================================
   9. Panels, rows, key/value, statement strip
   ========================================================================= */
.panel { position: relative; min-width: 0; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
.panel--raised { box-shadow: var(--shadow-md); }
.panel--muted { border-color: transparent; background: var(--surface-muted); }
.panel--plain { background: transparent; }
.panel__head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: var(--space-5) var(--space-5) 0; }
.panel__head--rule { padding-bottom: var(--space-4); border-bottom: 1px solid var(--border); }
.panel__title { font-size: var(--text-base); font-weight: var(--weight-heading); line-height: 1.4; }
.panel__sub { font-size: var(--text-sm); color: var(--text-3); }
.panel__body { padding: var(--space-5); }
.panel__body--flush { padding: 0; }
.panel__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  border-top: 1px solid var(--border);
}
@media (min-width: 768px) {
  .panel__head { padding: var(--space-6) var(--space-6) 0; }
  .panel__head--rule { padding-bottom: var(--space-4); }
  .panel__body { padding: var(--space-6); }
  .panel__body--flush { padding: 0; }
  .panel__foot { padding: var(--space-4) var(--space-6); }
}
.rows > * + * { border-top: 1px solid var(--border); }

.kv { display: grid; grid-template-columns: minmax(80px, max-content) minmax(0, 1fr); }
.kv > dt, .kv > dd { min-width: 0; margin: 0; padding: var(--space-3) 0; border-top: 1px solid var(--border); }
.kv > dt { padding-right: var(--space-6); }
.kv > dt:first-of-type, .kv > dt:first-of-type + dd { border-top: 0; }
.kv > dt { font-size: var(--text-sm); line-height: 1.7; color: var(--text-3); }
.kv > dd { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); font-size: var(--text-base); line-height: 1.55; }
.kv__value { min-width: 0; overflow-wrap: anywhere; }

/* Statement strip: hairline-separated figures (month totals, limits) */
.statement { container-type: inline-size; border-bottom: 1px solid var(--border); }
.statement__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.statement__cell { display: flex; flex-direction: column; gap: var(--space-2); min-width: 0; padding: var(--space-5) var(--space-4) var(--space-5) 0; }
.statement__cell:nth-child(2n) { padding-left: var(--space-4); padding-right: 0; border-left: 1px solid var(--border); }
.statement__cell:nth-child(n + 3) { border-top: 1px solid var(--border); }
@container (min-width: 760px) {
  .statement__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .statement__cell, .statement__cell:nth-child(2n) { padding: var(--space-6); border-left: 1px solid var(--border); }
  .statement__cell:first-child { padding-left: 0; border-left: 0; }
  .statement__cell:last-child { padding-right: 0; }
  .statement__cell:nth-child(n + 3) { border-top: 0; }
}
.statement__label { display: flex; align-items: center; gap: 6px; font-size: var(--text-xs); line-height: 1.5; letter-spacing: var(--tracking-label); color: var(--text-3); }
.statement__value {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: var(--weight-regular);
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
@container (min-width: 760px) { .statement__value { font-size: 30px; } }
.statement__value .money__sym { font-size: 0.6em; vertical-align: 0.5em; }
.statement__foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px var(--space-2); margin-top: auto; font-size: var(--text-xs); line-height: 1.5; color: var(--text-3); font-variant-numeric: tabular-nums; }
.statement__cell .meter { margin-top: var(--space-2); }
@container (max-width: 759px) { .statement__foot { flex-direction: column; gap: 0; } }

/* =========================================================================
   10. Status badge · TEST · tags · chips · monogram
   ========================================================================= */
/* Any element with data-status="<spend-request status>" gets --st-fg / --st-bg / --st-dot;
   unknown statuses fall back to the neutral set and are rendered verbatim. */
.badge, .dot, .tile, [data-status] { --st-fg: var(--status-unknown-fg); --st-bg: var(--status-unknown-bg); --st-dot: var(--status-unknown-dot); }
[data-status="created"] { --st-fg: var(--status-created-fg); --st-bg: var(--status-created-bg); --st-dot: var(--status-created-dot); }
[data-status="pending_approval"] { --st-fg: var(--status-pending_approval-fg); --st-bg: var(--status-pending_approval-bg); --st-dot: var(--status-pending_approval-dot); }
[data-status="requires_action"] { --st-fg: var(--status-requires_action-fg); --st-bg: var(--status-requires_action-bg); --st-dot: var(--status-requires_action-dot); }
[data-status="approved"] { --st-fg: var(--status-approved-fg); --st-bg: var(--status-approved-bg); --st-dot: var(--status-approved-dot); }
[data-status="submitted"] { --st-fg: var(--status-submitted-fg); --st-bg: var(--status-submitted-bg); --st-dot: var(--status-submitted-dot); }
[data-status="succeeded"] { --st-fg: var(--status-succeeded-fg); --st-bg: var(--status-succeeded-bg); --st-dot: var(--status-succeeded-dot); }
[data-status="failed"] { --st-fg: var(--status-failed-fg); --st-bg: var(--status-failed-bg); --st-dot: var(--status-failed-dot); }
[data-status="denied"] { --st-fg: var(--status-denied-fg); --st-bg: var(--status-denied-bg); --st-dot: var(--status-denied-dot); }
[data-status="expired"] { --st-fg: var(--status-expired-fg); --st-bg: var(--status-expired-bg); --st-dot: var(--status-expired-dot); }
[data-status="cancelled"] { --st-fg: var(--status-cancelled-fg); --st-bg: var(--status-cancelled-bg); --st-dot: var(--status-cancelled-dot); }

.badge {
  --badge-fg: var(--st-fg);
  --badge-bg: var(--st-bg);
  --badge-dot: var(--st-dot);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 10px 0 8px;
  border-radius: var(--radius-pill);
  background: var(--badge-bg);
  color: var(--badge-fg);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  line-height: 1;
  letter-spacing: 0.02em;
  white-space: nowrap;
  vertical-align: middle;
}
.badge::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--badge-dot); }
.badge[data-status="cancelled"] { box-shadow: inset 0 0 0 1px var(--border-strong); }
.badge--lg { gap: 7px; height: 28px; padding: 0 12px 0 10px; font-size: var(--text-sm); }
.badge--lg::before { width: 7px; height: 7px; }

/* Bare status glyph (ledgers, legends): <span class="dot" data-status="failed"></span> */
.dot { display: inline-block; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--st-dot); }

/* Shape cues so status never relies on colour alone:
   dot = settled · breathing dot = in flight · diamond = needs attention · ring = lapsed · dash = withdrawn */
.badge[data-status="pending_approval"]::before, .badge[data-status="submitted"]::before { animation: breathe 2.4s var(--ease-standard) infinite; }
.badge[data-status="expired"]::before, .dot[data-status="expired"] { background: transparent; box-shadow: inset 0 0 0 1.5px var(--st-dot); }
.badge[data-status="cancelled"]::before, .dot[data-status="cancelled"] { width: 8px; height: 1.5px; border-radius: 1px; }
.badge[data-status="requires_action"]::before, .badge[data-status="failed"]::before,
.dot[data-status="requires_action"], .dot[data-status="failed"] { border-radius: 1.5px; transform: rotate(45deg); }

.test-badge {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 5px 0 7px;
  border-radius: 5px;
  background: var(--test-bg);
  color: var(--test-fg);
  font-size: var(--text-2xs);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.16em;
  white-space: nowrap;
  vertical-align: middle;
}
.test-badge--lg { height: 24px; padding: 0 7px 0 9px; font-size: var(--text-xs); }

/* Corner ribbon: put .ribbon as the first child of a positioned, rounded box */
.ribbon { position: absolute; top: 0; right: 0; z-index: 3; width: 104px; height: 104px; overflow: hidden; border-top-right-radius: inherit; pointer-events: none; }
.ribbon__band {
  position: absolute;
  top: 22px;
  right: -34px;
  width: 150px;
  transform: rotate(45deg);
  background: var(--test-bg);
  color: var(--test-fg);
  box-shadow: 0 1px 2px rgba(20, 18, 14, 0.3);
  font-size: var(--text-2xs);
  font-weight: 700;
  line-height: 24px;
  letter-spacing: 0.3em;
  text-align: center;
  text-indent: 0.3em;
}

/* Page-level TEST strip (top of a TEST request) */
.test-strip {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-4);
  border: 1px solid var(--test-border);
  border-radius: var(--radius-md);
  background-color: var(--test-soft);
  background-image: repeating-linear-gradient(135deg, transparent 0 10px, rgba(226, 176, 74, 0.12) 10px 20px);
  color: var(--test-text);
  font-size: var(--text-sm);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  height: 24px;
  padding: 0 var(--space-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-2);
  font-size: var(--text-xs);
  white-space: nowrap;
}
.tag::before { content: "#"; color: var(--text-3); }

.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  max-width: 100%;
  height: 36px;
  padding: 0 14px 0 5px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--text);
  font-size: var(--text-sm);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color var(--dur-fast) var(--ease-standard), background-color var(--dur-fast) var(--ease-standard);
}
.chip:hover { color: var(--text); border-color: var(--input-border); }
.chip[aria-pressed="true"] { border-color: var(--text); box-shadow: inset 0 0 0 0.5px var(--text); }
.chip__name { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.chip__meta { color: var(--text-3); font-size: var(--text-xs); font-variant-numeric: tabular-nums; }
.chip__pin, .chip:not(.chip--add) > .icon { width: 13px; height: 13px; margin-left: -2px; color: var(--accent); }
.chip .monogram { width: 26px; height: 26px; font-size: 10px; }
.chip--add { padding: 0 var(--space-4); border-style: dashed; color: var(--text-2); }

.monogram {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface-muted);
  color: var(--text-2);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  line-height: 1;
  letter-spacing: 0.02em;
}
.monogram--lg { width: 48px; height: 48px; font-size: var(--text-base); }
.monogram--ink { border-color: transparent; background: var(--text); color: var(--bg); }

/* Merchant cell: monogram + name + domain */
.merchant { display: flex; align-items: center; gap: var(--space-3); min-width: 0; }
.merchant__text { display: flex; flex-direction: column; min-width: 0; }
.merchant__name { overflow: hidden; color: var(--text); font-weight: var(--weight-medium); text-overflow: ellipsis; white-space: nowrap; }
.merchant__domain { overflow: hidden; font-size: var(--text-sm); color: var(--text-3); text-overflow: ellipsis; white-space: nowrap; }

/* Copyable id: lsrq_…  */
.id-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  height: 26px;
  padding: 0 4px 0 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-2);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
}
.id-chip__text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.id-chip button { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 4px; color: var(--text-3); }
.id-chip button:hover { background: var(--surface-muted); color: var(--text); }
.id-chip .icon { width: 13px; height: 13px; }

/* =========================================================================
   11. Limit meter — native <meter> (or <progress>) so no inline width is needed
   ========================================================================= */
.meter {
  display: block;
  width: 100%;
  height: 4px;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--meter-track);
  overflow: hidden;
  -webkit-appearance: none;
  appearance: none;
}
.meter::-webkit-meter-inner-element { display: block; }
.meter::-webkit-meter-bar { height: 100%; border: 0; border-radius: var(--radius-pill); background: var(--meter-track); }
.meter::-webkit-meter-optimum-value { border-radius: var(--radius-pill); background: var(--meter-fill); }
.meter::-webkit-meter-suboptimum-value { border-radius: var(--radius-pill); background: var(--warning-dot); }
.meter::-webkit-meter-even-less-good-value { border-radius: var(--radius-pill); background: var(--danger); }
.meter::-moz-meter-bar { border-radius: var(--radius-pill); background: var(--meter-fill); }
.meter:-moz-meter-sub-optimum::-moz-meter-bar { background: var(--warning-dot); }
.meter:-moz-meter-sub-sub-optimum::-moz-meter-bar { background: var(--danger); }
.meter::-webkit-progress-bar { border-radius: var(--radius-pill); background: var(--meter-track); }
.meter::-webkit-progress-value { border-radius: var(--radius-pill); background: var(--meter-fill); transition: width 1s linear; }
.meter::-moz-progress-bar { border-radius: var(--radius-pill); background: var(--meter-fill); }
.meter--thin { height: 2px; }
.meter--thick { height: 6px; }

.limit { display: flex; flex-direction: column; gap: var(--space-2); min-width: 0; }
.limit__head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-2); font-size: var(--text-sm); }
.limit__label { color: var(--text-2); }
.limit__value { font-weight: var(--weight-medium); font-variant-numeric: tabular-nums; }
.limit__foot { display: flex; justify-content: space-between; gap: var(--space-2); font-size: var(--text-xs); color: var(--text-3); font-variant-numeric: tabular-nums; }
.limit--warn .limit__value { color: var(--warning-text); }

/* =========================================================================
   12. Countdown — text, ring (SVG, pathLength="100"), validity bar
   ========================================================================= */
.countdown { font-variant-numeric: tabular-nums; letter-spacing: 0.02em; white-space: nowrap; }
.countdown--warn { color: var(--warning-text); }
.countdown--over { color: var(--danger-text); }

/* <div class="ring"><svg class="ring__svg" viewBox="0 0 40 40"><circle class="ring__track" cx="20" cy="20" r="18"/>
     <circle class="ring__value" cx="20" cy="20" r="18" pathLength="100" stroke-dasharray="81 100"/></svg>
     <div class="ring__center">…</div></div>   — JS updates stroke-dasharray="<pct> 100" */
.ring { --ring-size: 132px; --ring-color: var(--accent); position: relative; display: inline-grid; place-items: center; flex: none; width: var(--ring-size); height: var(--ring-size); }
.ring__svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; transform: rotate(-90deg) scaleY(-1); }
.ring__track { fill: none; stroke: var(--ring-track); stroke-width: 1.2; }
.ring__value { fill: none; stroke: var(--ring-color); stroke-width: 1.2; stroke-linecap: round; transition: stroke-dasharray 1s linear; }
.ring__center { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; line-height: 1.1; }
.ring__time { font-family: var(--font-display); font-size: 30px; font-weight: var(--weight-light); letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.ring__caption { margin-top: 6px; font-size: var(--text-xs); letter-spacing: var(--tracking-label); color: var(--text-3); }
.ring--md { --ring-size: 76px; }
.ring--md .ring__track, .ring--md .ring__value { stroke-width: 2; }
.ring--md .ring__time { font-size: var(--text-md); font-weight: var(--weight-regular); }
.ring--md .ring__caption { margin-top: 2px; font-size: var(--text-xs); letter-spacing: 0; }
.ring--sm { --ring-size: 18px; }
.ring--sm .ring__track, .ring--sm .ring__value { stroke-width: 4.5; }
.ring--warn { --ring-color: var(--warning-dot); }

.validity { display: flex; flex-direction: column; gap: var(--space-2); min-width: 0; }
.validity__row { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--space-1) var(--space-3); font-size: var(--text-sm); color: var(--text-3); }
.validity__time { font-family: var(--font-display); font-size: var(--text-lg); font-weight: var(--weight-regular); color: var(--text); font-variant-numeric: tabular-nums; letter-spacing: 0.01em; }

/* =========================================================================
   13. QR · phrase · steps · waiting pulse
   ========================================================================= */
.qr { --qr-size: 168px; display: inline-flex; flex-direction: column; align-items: center; gap: var(--space-3); }
.qr__frame { padding: 10px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--qr-tile); box-shadow: var(--shadow-sm); line-height: 0; }
.qr__img { display: block; width: var(--qr-size); height: var(--qr-size); }
.qr__caption { max-width: 16em; font-size: var(--text-sm); line-height: 1.5; text-align: center; color: var(--text-3); }
.qr--sm { --qr-size: 88px; gap: var(--space-2); }
.qr--sm .qr__frame { padding: 6px; border-radius: var(--radius-md); }
.qr--lg { --qr-size: 200px; }

.phrase {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  min-width: 0;
  padding: var(--space-4) var(--space-3) var(--space-4) var(--space-5);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  background: var(--input-bg);
}
.phrase__text {
  min-width: 0;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: clamp(20px, 5.2vw, 32px);
  font-variant-ligatures: none;
  line-height: 1.25;
  letter-spacing: 0.01em;
  overflow-wrap: anywhere;
}

.steps { display: flex; flex-direction: column; list-style: none; }
.step { display: grid; grid-template-columns: 28px minmax(0, 1fr); column-gap: var(--space-4); padding: var(--space-6) 0; border-top: 1px solid var(--border); }
.step:first-child { padding-top: 0; border-top: 0; }
.step:last-child { padding-bottom: 0; }
.step__num {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  background: var(--surface);
  color: var(--text-2);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.step__title { font-size: var(--text-md); font-weight: var(--weight-heading); line-height: 28px; }
.step__body { grid-column: 2; margin-top: var(--space-2); font-size: var(--text-sm); color: var(--text-2); }
.step__body > * + * { margin-top: var(--space-4); }
.step--active .step__num { border-color: var(--text); background: var(--text); color: var(--bg); }
.step--done .step__num { border-color: transparent; background: var(--accent-soft); color: var(--accent-text); }

.waiting { display: inline-flex; align-items: center; gap: var(--space-3); color: var(--text-2); font-size: var(--text-sm); }
.waiting strong { color: var(--text); font-weight: var(--weight-medium); }
.pulse { --pulse-color: var(--accent); position: relative; display: inline-block; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--pulse-color); }
.pulse::before, .pulse::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--pulse-color); opacity: 0; animation: ripple var(--dur-pulse) var(--ease-out) infinite; }
.pulse::after { animation-delay: calc(var(--dur-pulse) / 2); }
.pulse--warn { --pulse-color: var(--warning-dot); }

/* =========================================================================
   14. Virtual card — matte graphite metal. Sizes with its width (container units).
       Brand: .vcard--visa (graphite) · .vcard--mastercard (smoked bronze) · .vcard--unknown (slate)
       State: default masked · .vcard--revealed · .vcard--pending (no card yet) · .vcard--inactive
       Size:  default (max 420 px) · .vcard--mini (list thumbnail)
   ========================================================================= */
.vcard {
  --vc-1: var(--vcard-graphite-1);
  --vc-2: var(--vcard-graphite-2);
  --vc-3: var(--vcard-graphite-3);
  --vc-sheen: rgba(255, 255, 255, 0.075);
  position: relative;
  display: block;
  isolation: isolate;
  container-type: inline-size;
  width: 100%;
  max-width: 420px;
  aspect-ratio: 1.586;
  overflow: hidden;
  border-radius: var(--radius-card);
  color: var(--vcard-text);
  background-color: var(--vc-2);
  background-image:
    var(--vcard-grain),
    var(--vcard-brush),
    linear-gradient(112deg, transparent 0 32%, var(--vc-sheen) 45%, rgba(255, 255, 255, 0.015) 52%, transparent 62%),
    radial-gradient(140% 110% at 0% 0%, rgba(255, 255, 255, 0.1) 0%, transparent 52%),
    linear-gradient(158deg, var(--vc-1) 0%, var(--vc-2) 46%, var(--vc-3) 100%);
  background-size: 220px 220px, 100% 100%, 100% 100%, 100% 100%, 100% 100%;
  box-shadow: inset 0 1px 0 var(--vcard-rim), inset 0 0 0 1px var(--vcard-edge), var(--shadow-card);
  filter: var(--shadow-card-drop);
}
.vcard--mastercard { --vc-1: var(--vcard-bronze-1); --vc-2: var(--vcard-bronze-2); --vc-3: var(--vcard-bronze-3); --vc-sheen: rgba(255, 230, 196, 0.085); }
.vcard--unknown { --vc-1: var(--vcard-slate-1); --vc-2: var(--vcard-slate-2); --vc-3: var(--vcard-slate-3); --vc-sheen: rgba(214, 232, 240, 0.075); }

.vcard__face { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between; padding: 6.6cqw 7cqw 6.2cqw; }
.vcard__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 4cqw; }
.vcard__issuer { display: flex; flex-direction: column; gap: 1.2cqw; min-width: 0; }
.vcard__merchant { overflow: hidden; font-size: 4.2cqw; font-weight: var(--weight-semibold); line-height: 1.2; letter-spacing: 0.1em; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.vcard__kind { font-size: 2.9cqw; line-height: 1.2; letter-spacing: 0.16em; text-transform: uppercase; color: var(--vcard-text-2); }
.vcard__amount { font-family: var(--font-display); font-size: 5.4cqw; font-weight: var(--weight-light); font-variant-numeric: tabular-nums; line-height: 1.1; letter-spacing: -0.01em; white-space: nowrap; }
.vcard__mid { display: flex; align-items: center; gap: 3cqw; }
.vcard__number { display: flex; gap: 3.4cqw; color: var(--vcard-text); font-family: var(--font-mono); font-size: 6.2cqw; font-variant-numeric: tabular-nums; line-height: 1; letter-spacing: 0.02em; white-space: nowrap; }
.vcard__number .is-mask { color: var(--vcard-text-2); letter-spacing: 0.06em; }
.vcard__bottom { display: flex; align-items: flex-end; justify-content: space-between; gap: 4cqw; }
.vcard__details { display: flex; flex-direction: column; gap: 3cqw; min-width: 0; }
.vcard__meta { display: flex; gap: 7cqw; margin: 0; }
.vcard__meta dt { margin-bottom: 1.4cqw; font-size: 2.5cqw; line-height: 1; letter-spacing: 0.2em; text-transform: uppercase; color: var(--vcard-text-2); }
.vcard__meta dd { margin: 0; font-family: var(--font-mono); font-size: 4.1cqw; font-variant-numeric: tabular-nums; line-height: 1; }
.vcard__holder { overflow: hidden; font-size: 3.3cqw; line-height: 1.3; letter-spacing: 0.16em; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; color: var(--vcard-text-2); }
.vcard__brand { flex: none; display: block; line-height: 1; color: var(--vcard-text); }
.vcard__brand--visa {
  padding-right: 0.06em;
  background: linear-gradient(180deg, #F7F4EE 0%, #CFCAC0 55%, #A8A398 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-family: var(--font-sans);
  font-size: 7.6cqw;
  font-style: italic;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.vcard__brand--mc { width: 13.5cqw; height: auto; }
.vcard__brand--mc .mc-l { fill: rgba(242, 238, 230, 0.82); }
.vcard__brand--mc .mc-r { fill: rgba(242, 238, 230, 0.4); }
.vcard__brand--generic { padding: 1cqw 1.8cqw; border: 1px solid rgba(255, 255, 255, 0.28); border-radius: 1.2cqw; font-size: 2.8cqw; font-weight: var(--weight-semibold); letter-spacing: 0.22em; text-transform: uppercase; color: var(--vcard-text-2); }
.vcard__copy {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 8.4cqw;
  height: 8.4cqw;
  min-width: 28px;
  min-height: 28px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 2cqw;
  background: rgba(255, 255, 255, 0.07);
  color: var(--vcard-text);
  transition: background-color var(--dur-fast) var(--ease-standard);
}
.vcard__copy:hover { background: rgba(255, 255, 255, 0.16); }
.vcard__copy .icon { width: 52%; height: 52%; }
.vcard--revealed .vcard__number { color: #FFFFFF; text-shadow: 0 1px 0 rgba(0, 0, 0, 0.35); }

.vcard--pending {
  background: var(--surface);
  box-shadow: none;
  filter: none;
  border: 1px dashed var(--vcard-pending-border);
  color: var(--text-3);
}
.vcard--pending .vcard__merchant, .vcard--pending .vcard__amount { color: var(--text-2); }
.vcard--pending .vcard__kind, .vcard--pending .vcard__number, .vcard--pending .vcard__meta dt,
.vcard--pending .vcard__holder { color: var(--text-3); }
.vcard--pending .vcard__brand--generic, .vcard--inactive .vcard__brand--generic { border-color: var(--border-strong); color: var(--text-3); }
.vcard__placeholder { display: flex; align-items: center; gap: 2.4cqw; font-size: 3.6cqw; line-height: 1.4; color: var(--text-3); }
.vcard__placeholder .icon { width: 5cqw; height: 5cqw; }

/* Spent card (used / expired / cancelled / failed): the metal turns into a paper stub */
.vcard--inactive {
  background: var(--surface-muted);
  box-shadow: inset 0 0 0 1px var(--border);
  filter: none;
  color: var(--text-3);
}
.vcard--inactive .vcard__merchant, .vcard--inactive .vcard__amount { color: var(--text-2); }
.vcard--inactive .vcard__kind, .vcard--inactive .vcard__number, .vcard--inactive .vcard__number .is-mask,
.vcard--inactive .vcard__holder, .vcard--inactive .vcard__meta dt, .vcard--inactive .vcard__meta dd { color: var(--text-3); }
.vcard--inactive .vcard__brand--visa { background: none; color: var(--text-3); }
.vcard--inactive .vcard__brand--mc .mc-l, .vcard--inactive .vcard__brand--mc .mc-r { fill: var(--text-3); fill-opacity: 0.5; }

.vcard--mini { max-width: 132px; box-shadow: inset 0 1px 0 var(--vcard-rim), inset 0 0 0 1px var(--vcard-edge), var(--shadow-sm); filter: none; }
.vcard--mini .vcard__face { flex-direction: row; align-items: flex-end; padding: 8cqw 9cqw; }
.vcard--mini .vcard__last4 { font-family: var(--font-mono); font-size: 10cqw; font-variant-numeric: tabular-nums; line-height: 1; letter-spacing: 0.02em; }
.vcard--mini .vcard__last4 .is-mask { color: var(--vcard-text-2); }
.vcard--mini .vcard__brand--visa { font-size: 11.5cqw; }
.vcard--mini .vcard__brand--mc { width: 22cqw; }
.vcard--mini.vcard--pending .vcard__face { align-items: center; justify-content: center; }

/* Revealed card data rows, each with a copy button */
.secrets { display: flex; flex-direction: column; }
.secret {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) auto;
  align-items: center;
  column-gap: var(--space-4);
  min-height: 56px;
  padding: var(--space-2) 0;
  border-top: 1px solid var(--border);
}
.secret:first-child { border-top: 0; }
.secret__label { font-size: var(--text-sm); color: var(--text-3); }
.secret__value { min-width: 0; color: var(--text); font-family: var(--font-mono); font-size: var(--text-md); font-variant-numeric: tabular-nums; line-height: 1.45; letter-spacing: 0.03em; overflow-wrap: anywhere; }
.secret__value--text { font-family: var(--font-sans); font-size: var(--text-base); letter-spacing: 0; }
.secret__value--masked { color: var(--text-3); letter-spacing: 0.18em; }
@media (max-width: 479px) {
  .secret { grid-template-columns: minmax(0, 1fr) auto; row-gap: 2px; padding: var(--space-3) 0; }
  .secret__label { grid-column: 1 / -1; }
}
.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text-2);
  font-size: var(--text-sm);
  white-space: nowrap;
  transition: border-color var(--dur-fast) var(--ease-standard), color var(--dur-fast) var(--ease-standard), background-color var(--dur-fast) var(--ease-standard);
}
.copy-btn:hover { border-color: var(--border-strong); color: var(--text); }
.copy-btn .icon { width: 15px; height: 15px; }
.copy-btn[data-copied] { border-color: var(--success-border); background: var(--success-soft); color: var(--success-text); }
@media (pointer: coarse) { .copy-btn { height: 40px; padding: 0 12px; } }

.autohide {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-3);
  padding: var(--space-2) var(--space-2) var(--space-2) var(--space-4);
  border-radius: var(--radius-md);
  background: var(--surface-muted);
  font-size: var(--text-sm);
  color: var(--text-2);
}
.autohide strong { color: var(--text); font-weight: var(--weight-heading); font-variant-numeric: tabular-nums; }
.autohide .btn { margin-left: auto; }

/* =========================================================================
   15. Timeline
   ========================================================================= */
.timeline { display: flex; flex-direction: column; }
.timeline__item { position: relative; display: grid; grid-template-columns: 30px minmax(0, 1fr); column-gap: var(--space-4); padding-bottom: var(--space-6); }
.timeline__item::before { content: ""; position: absolute; top: 34px; bottom: 4px; left: 14.5px; width: 1px; background: var(--border-strong); }
.timeline__item:last-child { padding-bottom: 0; }
.timeline__item:last-child::before { display: none; }
.timeline__icon { display: grid; place-items: center; width: 30px; height: 30px; border: 1px solid var(--border-strong); border-radius: 50%; background: var(--surface); color: var(--text-2); }
.timeline__icon .icon { width: 15px; height: 15px; }
.timeline__item--accent .timeline__icon { border-color: transparent; background: var(--accent-soft); color: var(--accent-text); }
.timeline__item--ink .timeline__icon { border-color: transparent; background: var(--text); color: var(--bg); }
.timeline__item--current .timeline__icon { border-style: dashed; border-color: var(--status-pending_approval-dot); color: var(--status-pending_approval-fg); }
.timeline__body { min-width: 0; padding-top: 4px; }
.timeline__title { font-size: var(--text-sm); font-weight: var(--weight-heading); line-height: 1.6; color: var(--text); }
.timeline__detail { margin-top: 2px; font-size: var(--text-sm); line-height: 1.6; color: var(--text-2); }
.timeline__time { display: flex; flex-wrap: wrap; gap: 0 var(--space-2); margin-top: 2px; font-size: var(--text-xs); color: var(--text-3); font-variant-numeric: tabular-nums; }

/* =========================================================================
   16. Table (desktop) + record list (mobile)
   ========================================================================= */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; font-size: var(--text-sm); }
.table th {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border-strong);
  color: var(--text-3);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-label);
  text-align: left;
  white-space: nowrap;
}
.table td { padding: 14px var(--space-4); border-bottom: 1px solid var(--border); color: var(--text-2); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background-color var(--dur-fast) var(--ease-standard); }
.table tbody tr:hover { background: var(--row-hover); }
.table th:first-child, .table td:first-child { padding-left: var(--space-6); }
.table th:last-child, .table td:last-child { padding-right: var(--space-6); }
.table .is-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table .is-strong { color: var(--text); font-weight: var(--weight-medium); }
.table .is-time { white-space: nowrap; font-variant-numeric: tabular-nums; }
.table .is-time small { display: block; font-size: var(--text-xs); color: var(--text-3); }
.table__row-link { color: var(--text); text-decoration: none; }
.table__row-link:hover { color: var(--accent-text); }
.table th[aria-sort] { color: var(--text); }
.table th[aria-sort]::after { content: "↓"; margin-left: 4px; color: var(--accent); }
.table th[aria-sort="ascending"]::after { content: "↑"; }
.table--compact td { padding-top: var(--space-3); padding-bottom: var(--space-3); }
.card-ref { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: var(--text-xs); color: var(--text-2); white-space: nowrap; }
.card-ref__brand { font-family: var(--font-sans); font-size: var(--text-2xs); font-weight: 700; letter-spacing: 0.08em; color: var(--text-3); }

.rlist { display: flex; flex-direction: column; }
.rlist__item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 2px var(--space-3);
  padding: 14px var(--space-4);
  border-top: 1px solid var(--border);
  color: inherit;
  text-decoration: none;
}
.rlist__item:first-child { border-top: 0; }
.rlist__item:hover { color: inherit; background: var(--row-hover); }
.rlist__item .monogram { grid-row: span 2; }
.rlist__title { display: flex; align-items: center; gap: 6px; min-width: 0; color: var(--text); font-weight: var(--weight-medium); }
.rlist__title span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rlist__amount { color: var(--text); font-weight: var(--weight-medium); font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.rlist__sub { min-width: 0; overflow: hidden; font-size: var(--text-xs); color: var(--text-3); text-overflow: ellipsis; white-space: nowrap; }
.rlist__status { justify-self: end; }

.pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3); font-size: var(--text-sm); color: var(--text-3); }

/* =========================================================================
   17. Toast — ink label
   ========================================================================= */
.toast-region {
  position: fixed;
  right: var(--space-6);
  bottom: var(--space-6);
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--space-2);
  width: min(400px, calc(100vw - 2 * var(--space-4)));
  pointer-events: none;
}
@media (max-width: 1023px) {
  .toast-region { right: var(--space-4); bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px) + var(--space-3)); left: var(--space-4); width: auto; align-items: stretch; }
}
.toast {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  max-width: 100%;
  padding: 12px 12px 12px 14px;
  border-radius: var(--radius-lg);
  background: var(--toast-bg);
  color: var(--toast-fg);
  box-shadow: var(--shadow-lg);
  font-size: var(--text-sm);
  line-height: 1.5;
  pointer-events: auto;
  animation: toast-in var(--dur-slow) var(--ease-out);
}
.toast__icon { display: grid; place-items: center; flex: none; width: 24px; height: 24px; border-radius: 50%; background: rgba(127, 208, 194, 0.16); color: var(--toast-action); }
.toast__icon .icon { width: 14px; height: 14px; stroke-width: 2.2; }
.toast__body { min-width: 0; }
.toast__title { display: block; font-weight: var(--weight-medium); }
.toast__text { display: block; color: var(--toast-muted); font-size: var(--text-xs); }
.toast__action { flex: none; margin-left: auto; padding: 6px 8px; border-radius: 6px; color: var(--toast-action); font-size: var(--text-sm); font-weight: var(--weight-semibold); }
.toast__action:hover { background: rgba(127, 208, 194, 0.12); }
.toast--error .toast__icon { background: rgba(240, 138, 132, 0.18); color: var(--toast-danger); }

/* =========================================================================
   18. Modal — <dialog class="modal"> + .modal__panel (bottom sheet on phones)
   ========================================================================= */
.modal { width: min(460px, calc(100vw - 2 * var(--space-4))); max-width: none; max-height: calc(100dvh - 2 * var(--space-4)); padding: 0; border: 0; background: transparent; color: var(--text); overflow: visible; }
.modal::backdrop { background: var(--overlay); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.modal[open] { animation: modal-in var(--dur-slow) var(--ease-out); }
.modal__panel { display: flex; flex-direction: column; max-height: inherit; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-xl); background: var(--surface); box-shadow: var(--shadow-lg); }
.modal__head { display: flex; align-items: flex-start; gap: var(--space-4); padding: var(--space-6) var(--space-6) 0; }
.modal__icon { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--surface-muted); color: var(--text); }
.modal__title { font-size: var(--text-lg); font-weight: var(--weight-heading); line-height: 1.35; }
.modal__desc { margin-top: var(--space-1); font-size: var(--text-sm); line-height: 1.6; color: var(--text-2); }
.modal__close { margin: -6px -8px 0 auto; }
.modal__body { display: flex; flex-direction: column; gap: var(--space-4); padding: var(--space-5) var(--space-6); overflow-y: auto; }
.modal__foot { display: flex; justify-content: flex-end; gap: var(--space-3); padding: 0 var(--space-6) var(--space-6); }
@media (max-width: 599px) {
  .modal { width: 100%; max-height: 92dvh; margin: auto 0 0; }
  .modal__panel { border-radius: var(--radius-xl) var(--radius-xl) 0 0; padding-bottom: env(safe-area-inset-bottom, 0px); }
  .modal__foot { flex-direction: column-reverse; }
  .modal__foot .btn { width: 100%; }
}

/* =========================================================================
   19. Banner
   ========================================================================= */
.banner {
  --banner-bg: var(--info-soft);
  --banner-border: var(--info-border);
  --banner-icon: var(--info-text);
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-4);
  border: 1px solid var(--banner-border);
  border-radius: var(--radius-lg);
  background: var(--banner-bg);
  font-size: var(--text-sm);
  line-height: 1.6;
}
.banner__icon { flex: none; margin-top: 2px; color: var(--banner-icon); }
.banner__body { flex: 1 1 260px; min-width: 0; }
.banner__title { font-weight: var(--weight-heading); color: var(--text); }
.banner__text { color: var(--text-2); }
.banner__actions { display: flex; flex-wrap: wrap; gap: var(--space-2); align-self: center; }
.banner--warning { --banner-bg: var(--warning-soft); --banner-border: var(--warning-border); --banner-icon: var(--warning-text); }
.banner--danger { --banner-bg: var(--danger-soft); --banner-border: var(--danger-border); --banner-icon: var(--danger-text); }
.banner--success { --banner-bg: var(--success-soft); --banner-border: var(--success-border); --banner-icon: var(--success-text); }
.banner--offline { --banner-bg: var(--toast-bg); --banner-border: transparent; --banner-icon: var(--toast-muted); color: var(--toast-fg); }
.banner--offline .banner__title { color: var(--toast-fg); }
.banner--offline .banner__text { color: var(--toast-muted); }
.banner--strip { border-width: 0 0 1px; border-radius: 0; padding: var(--space-3) var(--page-pad-x); }

/* =========================================================================
   20. Empty state
   ========================================================================= */
.empty { display: flex; flex-direction: column; align-items: center; gap: var(--space-3); padding: var(--space-10) var(--space-6); text-align: center; }
.empty__art { position: relative; width: 120px; aspect-ratio: 1.586; margin-bottom: var(--space-3); border: 1px dashed var(--vcard-pending-border); border-radius: 6% / 9.5%; }
.empty__art::before { content: ""; position: absolute; right: 14%; bottom: 20%; left: 14%; height: 2px; border-radius: 2px; background: var(--border-strong); box-shadow: 0 -10px 0 var(--border); }
.empty__art::after { content: ""; position: absolute; top: 16%; left: 14%; width: 18%; height: 18%; border-radius: 3px; background: var(--accent-soft); }
.empty__title { font-size: var(--text-md); font-weight: var(--weight-heading); }
.empty__text { max-width: 26em; font-size: var(--text-sm); line-height: 1.65; color: var(--text-2); }
.empty .btn { margin-top: var(--space-3); }

/* =========================================================================
   21. Skeleton
   ========================================================================= */
.skeleton {
  display: block;
  height: 12px;
  border-radius: var(--radius-sm);
  background-color: var(--skeleton-base);
  background-image: linear-gradient(90deg, transparent 0, var(--skeleton-shine) 50%, transparent 100%);
  background-repeat: no-repeat;
  background-size: 50% 100%;
  animation: shimmer var(--dur-shimmer) var(--ease-standard) infinite;
}
.skeleton--title { height: 22px; }
.skeleton--amount { height: 32px; width: 60%; }
.skeleton--circle { width: 36px; height: 36px; border-radius: 50%; }
.skeleton--card { width: 100%; height: auto; aspect-ratio: 1.586; border-radius: var(--radius-card); }
.skeleton--w30 { width: 30%; }
.skeleton--w45 { width: 45%; }
.skeleton--w60 { width: 60%; }
.skeleton--w80 { width: 80%; }

/* =========================================================================
   22. Page compositions shared by several views
   ========================================================================= */
/* Request row (进行中): media (QR or mini card) · text · amount, then actions + timer */
.req {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr) auto;
  grid-template-areas: "media main aside" "media actions actions";
  align-items: start;
  gap: var(--space-4) var(--space-6);
  padding: var(--space-6);
}
.req__media { grid-area: media; }
.req__media .vcard--mini { max-width: 112px; }
.req__main { grid-area: main; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.req__aside { grid-area: aside; text-align: right; }
.req__actions { grid-area: actions; display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.req__line { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); }
.req__name { overflow: hidden; font-size: var(--text-md); font-weight: var(--weight-heading); line-height: 1.4; text-overflow: ellipsis; white-space: nowrap; }
.req__amount { font-family: var(--font-display); font-size: var(--text-xl); font-weight: var(--weight-regular); font-variant-numeric: tabular-nums; line-height: 1.2; letter-spacing: -0.01em; white-space: nowrap; }
.req__timer { display: inline-flex; align-items: center; gap: var(--space-2); margin-left: auto; padding-left: var(--space-2); font-size: var(--text-sm); color: var(--text-3); white-space: nowrap; }
.req__timer .countdown { color: var(--text); font-weight: var(--weight-medium); }
@media (max-width: 599px) {
  /* phones: no QR (you are on the phone) and no thumbnail. The meta line stacks instead of wrapping
     behind a "·"; the timer shares the first action row with the quiet link (取消 / 详情), and the
     main buttons split the second row (a lone primary takes all of it). */
  .req { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "main aside" "actions actions"; gap: var(--space-4) var(--space-3); padding: var(--space-5) var(--space-4); }
  .req__media { display: none; }
  .req .meta { flex-direction: column; align-items: flex-start; gap: 0; }
  .req .meta > * + *::before { content: none; }
  .req__actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: center; gap: var(--space-3) var(--space-2); }
  .req__actions > .btn { grid-row: 2; }
  .req__actions > .btn--ghost { grid-row: 1; grid-column: 2; justify-self: end; margin-right: calc(-1 * var(--space-3)); }
  .req__actions:not(:has(> .btn--secondary)) > .btn--primary { grid-column: 1 / -1; }
  .req__timer { grid-row: 1; grid-column: 1 / -1; justify-self: start; margin: 0; padding: 0; }
}

/* Ledger: label · value rows with hairlines (month totals) */
.ledger { display: flex; flex-direction: column; }
.ledger__row { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-3); padding: 11px 0; border-top: 1px solid var(--border); font-size: var(--text-sm); }
.ledger__row:first-child { padding-top: 0; border-top: 0; }
.ledger__row:last-child { padding-bottom: 0; }
.ledger__label { display: flex; align-items: center; gap: var(--space-2); min-width: 0; color: var(--text-2); }
.ledger__count { color: var(--text-3); font-variant-numeric: tabular-nums; }
.ledger__value { color: var(--text); font-weight: var(--weight-medium); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ledger__row--total { margin-top: var(--space-1); border-top-color: var(--border-strong); }
.ledger__row--total .ledger__label, .ledger__row--total .ledger__value { color: var(--text-3); font-weight: var(--weight-regular); }

/* Link connect panel: steps · QR aside · footer */
.connect { display: grid; grid-template-columns: minmax(0, 1fr); overflow: hidden; }
.connect__main { min-width: 0; padding: var(--space-6) var(--space-5); }
.connect__aside { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--space-6); padding: var(--space-7) var(--space-5); border-top: 1px solid var(--border); background: var(--surface-muted); }
.connect__expiry { display: flex; align-items: center; justify-content: center; gap: var(--space-4); width: 100%; padding-top: var(--space-6); border-top: 1px solid var(--border); }
.connect__foot { grid-column: 1 / -1; }
@media (min-width: 960px) {
  .connect { grid-template-columns: minmax(0, 1fr) 360px; }
  .connect__main { padding: var(--space-8) var(--space-8) var(--space-8); }
  .connect__aside { padding: var(--space-8); border-top: 0; border-left: 1px solid var(--border); }
}
.connect__done { display: flex; flex-direction: column; align-items: center; gap: var(--space-3); padding: var(--space-8) var(--space-5); text-align: center; }
.connect__done-mark { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-text); }

/* Editorial promise row: ink rule over each column */
.promise { display: flex; flex-direction: column; gap: var(--space-2); padding-top: var(--space-5); border-top: 1px solid var(--rule-ink); }
.promise__icon { color: var(--accent); }
.promise__title { margin-top: var(--space-2); font-size: var(--text-base); font-weight: var(--weight-heading); }
.promise__text { font-size: var(--text-sm); line-height: 1.7; color: var(--text-2); }

/* Tags input */
.tag-input { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: var(--tap); padding: 6px 8px; border: 1px solid var(--input-border); border-radius: var(--radius-md); background: var(--input-bg); transition: border-color var(--dur-fast) var(--ease-standard), box-shadow var(--dur-fast) var(--ease-standard); }
.tag-input:hover { border-color: var(--text-3); }
.tag-input:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.tag-input__field { flex: 1 1 120px; min-width: 80px; height: 30px; padding: 0 6px; border: 0; background: transparent; color: var(--text); outline: none; }
.tag-input__field::placeholder { color: var(--text-3); }
.tag__remove { display: grid; place-items: center; width: 16px; height: 16px; margin-right: -3px; border-radius: 3px; color: var(--text-3); }
.tag__remove:hover { background: var(--surface-muted); color: var(--text); }
.tag__remove .icon { width: 11px; height: 11px; stroke-width: 2.2; }

/* Date range: two date inputs in one frame */
.date-range { display: inline-flex; align-items: center; gap: var(--space-1); min-height: 38px; padding: 0 var(--space-3); border: 1px solid var(--input-border); border-radius: var(--radius-md); background: var(--input-bg); color: var(--text-3); font-size: var(--text-sm); }
.date-range:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.date-range input { width: 6.6em; min-height: 36px; padding: 0 2px; border: 0; background: transparent; color: var(--text); font-size: var(--text-sm); font-variant-numeric: tabular-nums; text-align: center; outline: none; }
.date-range .icon { width: 16px; height: 16px; }

/* Detail header */
.detail-head { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-4); padding-bottom: var(--space-6); border-bottom: 1px solid var(--rule-ink); }
@media (min-width: 768px) { .detail-head { grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: var(--space-4) var(--space-8); } }
.detail-head__title { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); margin-top: var(--space-3); }
.detail-head__name { font-family: var(--font-display); font-size: 30px; font-weight: var(--weight-heading); line-height: var(--leading-tight); letter-spacing: var(--tracking-display); }
@media (min-width: 768px) { .detail-head__name { font-size: var(--text-3xl); } }
.detail-head__meta { margin-top: var(--space-3); }
@media (max-width: 599px) {
  .detail-head__meta { flex-direction: column; align-items: flex-start; }
  .detail-head__meta > * + *::before { content: none; }
}
.detail-head__amount { font-size: 44px; }
@media (min-width: 768px) { .detail-head__amount { font-size: var(--text-4xl); text-align: right; } }
.detail-head__amount-note { margin-top: var(--space-2); font-size: var(--text-sm); color: var(--text-3); }
@media (min-width: 768px) { .detail-head__amount-note { text-align: right; } }

/* Status hero */
.hero { display: grid; grid-template-columns: minmax(0, 1fr); overflow: hidden; }
.hero__aside { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--space-6); padding: var(--space-7) var(--space-5); background: var(--surface-muted); border-bottom: 1px solid var(--border); }
.hero__main { display: flex; flex-direction: column; gap: var(--space-5); min-width: 0; padding: var(--space-6) var(--space-5); }
@media (min-width: 900px) {
  .hero { grid-template-columns: 340px minmax(0, 1fr); }
  .hero--card { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
  .hero__aside { padding: var(--space-8); border-right: 1px solid var(--border); border-bottom: 0; }
  .hero__main { padding: var(--space-8); }
}
.hero__title { font-size: var(--text-xl); font-weight: var(--weight-heading); line-height: 1.35; letter-spacing: var(--tracking-tight); }
.hero__text { max-width: 34em; color: var(--text-2); }
.hero__foot { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3); padding: var(--space-4) var(--space-5); border-top: 1px solid var(--border); }
@media (min-width: 900px) { .hero__foot { padding: var(--space-4) var(--space-8); } }
.hero__timer { display: flex; align-items: center; gap: var(--space-4); }
.hero__timer-text { display: flex; flex-direction: column; gap: 2px; font-size: var(--text-sm); color: var(--text-3); }
.hero__timer-text strong { color: var(--text); font-weight: var(--weight-medium); }

/* Action bar: buttons in a row; .action-bar__end (e.g. 取消) is pushed to the far end.
   --stretch: on phones the buttons form an even two-column grid and the end action gets an outline. */
.action-bar { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.action-bar__end { margin-left: auto; }
.hero__foot > .action-bar { flex: 1 1 auto; }
@media (max-width: 479px) {
  .action-bar--stretch > .btn { flex: 1 1 calc(50% - var(--space-2)); }
  .action-bar--stretch > .action-bar__end { margin-left: 0; }
  .action-bar--stretch > .btn--danger-ghost { border-color: var(--danger-border); }
}

.quote { padding: var(--space-4) var(--space-5); border-left: 2px solid var(--accent); border-radius: 0 var(--radius-md) var(--radius-md) 0; background: var(--surface-muted); font-size: var(--text-sm); line-height: 1.7; color: var(--text-2); }
.quote__label { display: block; margin-bottom: var(--space-1); font-size: var(--text-xs); letter-spacing: var(--tracking-label); color: var(--text-3); }

.totals { width: 100%; font-size: var(--text-sm); font-variant-numeric: tabular-nums; }
.totals td { padding: 6px 0; color: var(--text-2); }
.totals td:last-child { text-align: right; white-space: nowrap; }
.totals tr.is-total td { padding-top: var(--space-3); border-top: 1px solid var(--border); color: var(--text); font-weight: var(--weight-semibold); }

/* Filter bar */
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); }
.filters__search { flex: 1 1 180px; min-width: 0; }
.filters__search .input-group__addon .icon { width: 16px; height: 16px; }
.filters .select-wrap { flex: 0 1 auto; }
.filters .select { min-height: 38px; padding-top: 6px; padding-bottom: 6px; font-size: var(--text-sm); }
.filters .input { min-height: 38px; padding-top: 6px; padding-bottom: 6px; font-size: var(--text-sm); }
@media (max-width: 1023px) { .filters .select, .filters .input { font-size: 16px; } }

/* Card gallery */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: var(--space-8) var(--space-6); }
.tile { display: flex; flex-direction: column; gap: var(--space-4); min-width: 0; color: inherit; text-decoration: none; }
.tile:hover { color: inherit; }
.tile .vcard { max-width: none; transition: transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out); }
.tile:hover .vcard:not(.vcard--pending):not(.vcard--inactive) { transform: translateY(-3px); }
.tile__body { display: flex; flex-direction: column; gap: 6px; padding: 0 2px; }
.tile__row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); min-width: 0; }
.tile__name { overflow: hidden; color: var(--text); font-weight: var(--weight-heading); text-overflow: ellipsis; white-space: nowrap; }
.tile__amount { color: var(--text); font-variant-numeric: tabular-nums; font-weight: var(--weight-medium); white-space: nowrap; }
.tile__meta { font-size: var(--text-sm); color: var(--text-3); font-variant-numeric: tabular-nums; }

/* Login */
.auth { display: grid; grid-template-columns: minmax(0, 1fr); min-height: 100vh; min-height: 100dvh; }
@media (min-width: 1024px) { .auth { grid-template-columns: minmax(0, 1.12fr) minmax(460px, 1fr); } }
.auth__showcase { display: none; }
@media (min-width: 1024px) {
  .auth__showcase {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: var(--space-9);
    padding: var(--space-9) var(--space-10);
    overflow: hidden;
    background: var(--sidebar-bg);
    border-right: 1px solid var(--border);
  }
}
.auth__statement { font-family: var(--font-display); font-size: 52px; font-weight: var(--weight-heading); line-height: 1.12; letter-spacing: -0.03em; }
.auth__lede { max-width: 26em; margin-top: var(--space-5); font-size: var(--text-md); line-height: var(--leading-loose); color: var(--text-2); }
.auth__fine { display: flex; flex-wrap: wrap; gap: var(--space-1) 0; font-size: var(--text-xs); color: var(--text-3); }
.auth__fine > * + *::before { content: "·"; margin: 0 var(--space-3); color: var(--text-disabled); }
.auth__main { display: flex; flex-direction: column; justify-content: center; padding: var(--space-9) var(--page-pad-x); }
.auth__form { width: 100%; max-width: 380px; margin: 0 auto; }
.auth__head { margin-bottom: var(--space-7); }
.auth__title { margin-top: var(--space-6); font-family: var(--font-display); font-size: var(--text-2xl); font-weight: var(--weight-heading); line-height: 1.2; letter-spacing: var(--tracking-display); }
.auth__sub { margin-top: var(--space-2); color: var(--text-2); }
.auth__note { display: flex; gap: var(--space-2); margin-top: var(--space-6); padding-top: var(--space-5); border-top: 1px solid var(--border); font-size: var(--text-xs); line-height: 1.6; color: var(--text-3); }
.auth__note .icon { margin-top: 1px; }

.card-stack { position: relative; width: min(100%, 480px); aspect-ratio: 1.5; }
.card-stack .vcard { position: absolute; width: 78%; }
.card-stack__back { top: 2%; right: 0; transform: rotate(6deg); }
.card-stack__front { bottom: 4%; left: 0; transform: rotate(-4deg); }

/* Phone-width login: brand + one card above the form */
.auth__mobile { display: flex; flex-direction: column; gap: var(--space-8); margin-bottom: var(--space-8); }
.auth__mobile .vcard { width: 78%; max-width: 300px; transform: rotate(-4deg); margin: var(--space-2) 0 0 var(--space-2); }
@media (min-width: 1024px) { .auth__mobile { display: none; } }

/* =========================================================================
   23. Utilities — last, so they win over component defaults
   ========================================================================= */
.sticky { position: sticky; top: calc(var(--topbar-h) + var(--space-6)); }
.mt-1 { margin-top: var(--space-1); }
.mt-2 { margin-top: var(--space-2); }
.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }
.mt-5 { margin-top: var(--space-5); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }

/* =========================================================================
   24. Motion
   ========================================================================= */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }
@keyframes breathe { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
@keyframes ripple { 0% { opacity: 0.45; transform: scale(1); } 80%, 100% { opacity: 0; transform: scale(3.4); } }
@keyframes shimmer { from { background-position: -60% 0; } to { background-position: 160% 0; } }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes modal-in { from { opacity: 0; transform: translateY(12px) scale(0.985); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .pulse::before, .pulse::after { display: none; }
  .skeleton { background-image: none; }
  .tile:hover .vcard { transform: none !important; }
}
