/*
 * BirthdayPartyPal kit: the calm component set (docs/design/PRODUCT-UI-PRINCIPLES.md).
 * Live reference: /brand/components (noindex). Owner: product design.
 *
 * One product everywhere a parent acts: the marketing site, the builder, the reveal, Party HQ.
 * Every class starts with k-, so loading this file never restyles existing markup. It stands alone:
 * the --k-* tokens below carry the brand-2026 values (public/static/ds/brand-2026.css --b26-*;
 * tests/unit/kit.test.mjs keeps them identical), so a shell that doesn't load brand-2026.css (Party HQ)
 * can still use the kit.
 *
 * Rules the kit encodes:
 *   - One filled button per screen (.k-btn). Secondary is .k-btn--ghost or .k-link, never a second fill.
 *   - Picked = Balloon. Neutral = ink and stone. No gradients, glows or shine.
 *   - 44px minimum targets (48px buttons), 16px inputs (no iOS zoom), a visible 2.5px ink focus ring.
 *   - Motion: transform and opacity only. Press 90ms to scale .97; glide 280ms; reduced motion, none.
 *   - AA: ink on paper 17:1, ink-2 9:1, ink-3 6:1, white on Balloon 5.3:1, Balloon on linen 5.0:1.
 */

:root {
  /* color */
  --k-ink: #1b1724; --k-ink-2: #4a4554; --k-ink-3: #625c6b;
  --k-linen: #faf7f2; --k-paper: #ffffff; --k-stone: #f1ece4; --k-line: #e6e0d6; --k-line-2: #d9d2c6;
  --k-night: #14111b; --k-on-dark: #f6f3ee; --k-on-dark-2: #cfc9d6;
  --k-accent: #c8295e; --k-accent-hover: #b02251; --k-accent-press: #9a1d47; --k-accent-soft: #f8dbe4; --k-accent-on-dark: #ff9cb6;
  --k-ok: #157a4f; --k-ok-soft: #e3f4ea; --k-warn: #8a5a00; --k-warn-soft: #fdf1d8; --k-bad: #b42318; --k-bad-soft: #fde7e4;
  /* type */
  --k-f: "Instrument Sans", "Instrument Sans Fallback", system-ui, -apple-system, "Segoe UI", sans-serif;
  --k-f-serif: "Instrument Serif", Georgia, serif;
  --k-fs-xs: .78rem; --k-fs-sm: .875rem; --k-fs-md: 1rem; --k-fs-lg: 1.125rem; --k-fs-xl: 1.375rem; --k-fs-2xl: clamp(1.55rem, 1.2rem + 1.6vw, 2rem);
  /* shape, space, depth */
  --k-r-sm: 10px; --k-r-md: 16px; --k-r-lg: 24px; --k-r-pill: 999px;
  --k-s-1: 4px; --k-s-2: 8px; --k-s-3: 12px; --k-s-4: 16px; --k-s-5: 20px; --k-s-6: 24px; --k-s-8: 32px;
  --k-sh-1: 0 1px 2px rgba(27, 23, 36, .05), 0 2px 8px rgba(27, 23, 36, .05);
  --k-sh-2: 0 1px 3px rgba(27, 23, 36, .06), 0 14px 32px -14px rgba(27, 23, 36, .2);
  --k-sh-3: 0 2px 6px rgba(27, 23, 36, .07), 0 32px 64px -28px rgba(27, 23, 36, .32);
  --k-sh-btn: 0 1px 0 rgba(255, 255, 255, .14) inset, 0 1px 2px rgba(27, 23, 36, .16), 0 6px 16px -8px rgba(27, 23, 36, .3);
  --k-ring: 0 0 0 3px var(--k-accent-soft);
  --k-tap: 44px;
  /* motion: calm and precise; springs belong to themes and earned celebrations only */
  --k-ease: cubic-bezier(.2, .7, .2, 1);
  --k-ease-out: cubic-bezier(.22, 1, .36, 1);
  --k-ease-in: cubic-bezier(.4, 0, 1, .6);
  --k-spring: cubic-bezier(.34, 1.4, .64, 1);
  --k-t-press: 90ms; --k-t-fast: 160ms; --k-t-med: 280ms; --k-t-slow: 560ms;
  --k-press: .97;
}

/* ================= buttons ================= */
.k-btn {
  --_bg: var(--k-accent); --_bg-h: var(--k-accent-hover); --_bg-p: var(--k-accent-press); --_ink: #fff; --_sh: var(--k-sh-btn);
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; min-width: var(--k-tap); padding: 0 22px; border: 0; border-radius: var(--k-r-pill);
  background: var(--_bg); color: var(--_ink); box-shadow: var(--_sh);
  font: 600 var(--k-fs-md)/1.1 var(--k-f); letter-spacing: -.01em; text-decoration: none; white-space: nowrap;
  cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent; touch-action: manipulation;
  transition: transform var(--k-t-fast) var(--k-ease), background-color var(--k-t-fast) var(--k-ease), box-shadow var(--k-t-med) var(--k-ease), opacity var(--k-t-fast);
}
@media (hover: hover) and (pointer: fine) { .k-btn:hover { background: var(--_bg-h); } }
.k-btn:active { transform: scale(var(--k-press)); background: var(--_bg-p); transition-duration: var(--k-t-press); }
.k-btn:focus-visible { outline: 2.5px solid var(--k-ink); outline-offset: 3px; }
.k-btn:disabled, .k-btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.k-btn > svg, .k-btn > .ic { width: 1.15em; height: 1.15em; flex: none; }
.k-btn .k-btn__ar { transition: transform var(--k-t-med) var(--k-ease); }
@media (hover: hover) and (pointer: fine) { .k-btn:hover .k-btn__ar { transform: translateX(3px); } }
/* ink: the primary on a Balloon-heavy screen (the reveal over a pink theme) and dark-on-light marketing moments */
.k-btn--ink { --_bg: var(--k-ink); --_bg-h: #2c2638; --_bg-p: #000; }
/* ghost: the one secondary. A hairline, never a fill. */
.k-btn--ghost { --_bg: transparent; --_bg-h: rgba(27, 23, 36, .05); --_bg-p: rgba(27, 23, 36, .09); --_ink: var(--k-ink); --_sh: inset 0 0 0 1.5px var(--k-line-2); }
@media (hover: hover) and (pointer: fine) { .k-btn--ghost:hover { box-shadow: inset 0 0 0 1.5px var(--k-ink); } }
/* quiet: a tool button in a toolbar (Edit, Copy link): stone, no shadow */
.k-btn--quiet { --_bg: var(--k-stone); --_bg-h: #e9e2d7; --_bg-p: #e1d9cc; --_ink: var(--k-ink); --_sh: none; }
.k-btn--danger { --_bg: var(--k-bad); --_bg-h: #9b1c13; --_bg-p: #84170f; }
.k-btn--on-dark { --_bg: #fff; --_bg-h: var(--k-stone); --_bg-p: #e1d9cc; --_ink: var(--k-ink); }
.k-btn--ghost.k-btn--on-dark { --_bg: transparent; --_bg-h: rgba(255, 255, 255, .08); --_ink: #fff; --_sh: inset 0 0 0 1.5px rgba(255, 255, 255, .32); }
.k-btn--sm { min-height: var(--k-tap); padding: 0 16px; font-size: var(--k-fs-sm); }
.k-btn--lg { min-height: 56px; padding: 0 28px; font-size: var(--k-fs-lg); }
.k-btn--block { display: flex; width: 100%; }
.k-btn--icon { padding: 0; width: var(--k-tap); min-height: var(--k-tap); }
/* busy: the label holds its width, a ring turns (transform only) */
.k-btn[aria-busy="true"] { color: transparent; cursor: progress; }
.k-btn[aria-busy="true"]::after { content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid var(--_ink); border-right-color: transparent; animation: k-spin .7s linear infinite; }
/* a text action: the quiet secondary beside a primary */
.k-link { display: inline-flex; align-items: center; gap: 6px; min-height: var(--k-tap); padding: 0 2px; border: 0; background: none; color: var(--k-ink); font: 600 var(--k-fs-md)/1.2 var(--k-f); text-decoration: underline; text-decoration-color: var(--k-line-2); text-decoration-thickness: 1.5px; text-underline-offset: 4px; cursor: pointer; transition: text-decoration-color var(--k-t-fast) var(--k-ease); }
.k-link:hover { text-decoration-color: currentColor; }
.k-link:focus-visible { outline: 2.5px solid var(--k-ink); outline-offset: 2px; border-radius: 4px; }
/* the pinned bar: the one primary within thumb reach on phones, safe-area aware */
.k-bar { position: sticky; bottom: 0; z-index: 20; display: flex; gap: 10px; align-items: center; padding: 12px var(--k-s-4) calc(12px + env(safe-area-inset-bottom, 0px)); background: rgba(250, 247, 242, .92); -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px); border-top: 1px solid var(--k-line); }
.k-bar > .k-btn:last-child { flex: 1 1 auto; }
.k-fine { margin: 8px 0 0; color: var(--k-ink-3); font: 500 var(--k-fs-sm)/1.45 var(--k-f); text-align: center; }

/* ================= chips (choices) and segmented control ================= */
.k-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.k-chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: var(--k-tap); padding: 0 16px;
  border: 1px solid var(--k-line-2); border-radius: var(--k-r-pill); background: var(--k-paper); color: var(--k-ink);
  font: 600 var(--k-fs-sm)/1 var(--k-f); cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: transform var(--k-t-fast) var(--k-ease), background-color var(--k-t-fast) var(--k-ease), border-color var(--k-t-fast) var(--k-ease), color var(--k-t-fast);
}
@media (hover: hover) and (pointer: fine) { .k-chip:hover { border-color: var(--k-ink); } }
.k-chip:active { transform: scale(.95); transition-duration: var(--k-t-press); }
.k-chip:focus-visible { outline: 2.5px solid var(--k-ink); outline-offset: 2px; }
.k-chip[aria-pressed="true"], .k-chip.is-on { background: var(--k-accent); border-color: var(--k-accent); color: #fff; }
.k-chip small { color: inherit; opacity: .7; font-weight: 500; }
.k-seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: var(--k-r-pill); background: var(--k-stone); }
.k-seg button { min-height: 40px; padding: 0 16px; border: 0; border-radius: var(--k-r-pill); background: transparent; color: var(--k-ink-2); font: 600 var(--k-fs-sm)/1 var(--k-f); cursor: pointer; transition: background-color var(--k-t-med) var(--k-ease), color var(--k-t-fast), box-shadow var(--k-t-med) var(--k-ease); }
.k-seg button[aria-selected="true"], .k-seg button[aria-pressed="true"] { background: var(--k-paper); color: var(--k-ink); box-shadow: var(--k-sh-1); }
.k-seg button:focus-visible { outline: 2.5px solid var(--k-ink); outline-offset: 1px; }

/* ================= cards ================= */
.k-card { position: relative; background: var(--k-paper); color: var(--k-ink); border: 1px solid var(--k-line); border-radius: var(--k-r-md); padding: var(--k-s-5); box-shadow: var(--k-sh-1); }
.k-card > :first-child { margin-top: 0; } .k-card > :last-child { margin-bottom: 0; }
.k-card--flat { box-shadow: none; }
.k-card--tint { background: var(--k-stone); border-color: transparent; box-shadow: none; }
/* a card that is a choice: a whole-card button */
.k-card--pick { display: grid; gap: 4px; width: 100%; text-align: left; font: inherit; cursor: pointer; transition: transform var(--k-t-fast) var(--k-ease), box-shadow var(--k-t-med) var(--k-ease), border-color var(--k-t-fast) var(--k-ease); }
@media (hover: hover) and (pointer: fine) { .k-card--pick:hover { transform: translateY(-2px); box-shadow: var(--k-sh-2); border-color: var(--k-line-2); } }
.k-card--pick:active { transform: scale(var(--k-press)); transition-duration: var(--k-t-press); }
.k-card--pick:focus-visible { outline: 2.5px solid var(--k-ink); outline-offset: 3px; }
.k-card--pick[aria-pressed="true"] { border-color: var(--k-accent); box-shadow: 0 0 0 1px var(--k-accent), var(--k-sh-2); }
.k-card__t { margin: 0; font: 600 var(--k-fs-lg)/1.2 var(--k-f); letter-spacing: -.012em; }
.k-card__d { margin: 0; color: var(--k-ink-3); font: 500 var(--k-fs-sm)/1.4 var(--k-f); }
/* list rows (Party HQ: a guest, a text, a setting) */
.k-rows { margin: 0; padding: 0; list-style: none; background: var(--k-paper); border: 1px solid var(--k-line); border-radius: var(--k-r-md); overflow: hidden; }
.k-row { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 10px var(--k-s-4); color: var(--k-ink); font: 500 var(--k-fs-md)/1.3 var(--k-f); text-decoration: none; }
.k-row + .k-row { border-top: 1px solid var(--k-line); }
a.k-row, button.k-row { width: 100%; border: 0; background: none; text-align: left; cursor: pointer; transition: background-color var(--k-t-fast) var(--k-ease); }
a.k-row:hover, button.k-row:hover { background: var(--k-linen); }
a.k-row:active, button.k-row:active { background: var(--k-stone); }
.k-row__main { flex: 1 1 auto; min-width: 0; }
.k-row__sub { display: block; color: var(--k-ink-3); font-size: var(--k-fs-sm); }
.k-row__end { flex: none; color: var(--k-ink-3); font-size: var(--k-fs-sm); }

/* ================= badges and status ================= */
.k-badge { display: inline-flex; align-items: center; gap: 4px; min-height: 22px; padding: 0 9px; border-radius: var(--k-r-pill); background: var(--k-stone); color: var(--k-ink-2); font: 600 var(--k-fs-xs)/1 var(--k-f); letter-spacing: .01em; white-space: nowrap; }
.k-badge--ok { background: var(--k-ok-soft); color: var(--k-ok); }
.k-badge--warn { background: var(--k-warn-soft); color: var(--k-warn); }
.k-badge--bad { background: var(--k-bad-soft); color: var(--k-bad); }
.k-badge--accent { background: var(--k-accent-soft); color: #8f1a42; }

/* ================= form fields ================= */
.k-field { display: grid; gap: 6px; margin: 0 0 var(--k-s-4); color: var(--k-ink); font: 600 var(--k-fs-sm)/1.3 var(--k-f); }
.k-field__opt { color: var(--k-ink-3); font-weight: 500; }
.k-input, .k-select, .k-textarea {
  width: 100%; box-sizing: border-box; min-height: 52px; padding: 0 16px; border: 1px solid var(--k-line-2); border-radius: 12px;
  background: var(--k-paper); color: var(--k-ink); font: 500 max(16px, 1rem)/1.3 var(--k-f); appearance: none;
  transition: border-color var(--k-t-fast) var(--k-ease), box-shadow var(--k-t-fast) var(--k-ease);
}
.k-textarea { min-height: 112px; padding: 14px 16px; resize: vertical; line-height: 1.5; }
.k-select { padding-right: 44px; background: var(--k-paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231b1724' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") right 14px center / 18px no-repeat; }
.k-input::placeholder, .k-textarea::placeholder { color: #756e80; }
.k-input:hover, .k-select:hover, .k-textarea:hover { border-color: var(--k-ink-3); }
.k-input:focus, .k-select:focus, .k-textarea:focus { outline: none; border-color: var(--k-ink); box-shadow: var(--k-ring); }
.k-input[aria-invalid="true"], .k-textarea[aria-invalid="true"] { border-color: var(--k-bad); box-shadow: 0 0 0 3px var(--k-bad-soft); }
.k-input:disabled, .k-select:disabled, .k-textarea:disabled { background: var(--k-stone); color: var(--k-ink-3); cursor: not-allowed; }
.k-hint { margin: 0; color: var(--k-ink-3); font: 500 var(--k-fs-sm)/1.4 var(--k-f); }
.k-error { margin: 0; color: var(--k-bad); font: 600 var(--k-fs-sm)/1.4 var(--k-f); }
/* checkbox and switch: native inputs, drawn */
.k-check { display: flex; align-items: flex-start; gap: 12px; min-height: var(--k-tap); padding: 10px 0; color: var(--k-ink); font: 500 var(--k-fs-md)/1.4 var(--k-f); cursor: pointer; }
.k-check input { flex: none; appearance: none; width: 24px; height: 24px; margin: 0; border: 1.5px solid var(--k-line-2); border-radius: 7px; background: var(--k-paper) center / 16px no-repeat; cursor: pointer; transition: background-color var(--k-t-fast) var(--k-ease), border-color var(--k-t-fast); }
.k-check input:checked { background-color: var(--k-accent); border-color: var(--k-accent); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E"); }
.k-check input:focus-visible, .k-switch input:focus-visible { outline: 2.5px solid var(--k-ink); outline-offset: 2px; }
.k-switch { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 52px; color: var(--k-ink); font: 500 var(--k-fs-md)/1.35 var(--k-f); cursor: pointer; }
.k-switch input { flex: none; appearance: none; position: relative; width: 50px; height: 30px; margin: 0; border-radius: var(--k-r-pill); background: var(--k-line-2); cursor: pointer; transition: background-color var(--k-t-med) var(--k-ease); }
.k-switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(27, 23, 36, .25); transition: transform var(--k-t-med) var(--k-ease); }
.k-switch input:checked { background: var(--k-accent); }
.k-switch input:checked::after { transform: translateX(20px); }

/* ================= step header ================= */
.k-steps { display: flex; gap: 6px; margin: 0 0 var(--k-s-4); padding: 0; list-style: none; }
.k-steps li { flex: 1 1 0; display: grid; gap: 6px; color: var(--k-ink-3); font: 600 var(--k-fs-xs)/1.2 var(--k-f); }
.k-steps li::before { content: ""; height: 4px; border-radius: 2px; background: var(--k-line); transform-origin: left; transition: background-color var(--k-t-med) var(--k-ease); }
.k-steps li[aria-current="step"] { color: var(--k-ink); }
.k-steps li[aria-current="step"]::before { background: var(--k-accent); }
.k-steps li.is-done::before { background: var(--k-ink); }
.k-steps li.is-opt::before { background: repeating-linear-gradient(90deg, var(--k-line-2) 0 6px, transparent 6px 10px); }
.k-head { margin: 0 0 var(--k-s-5); }
.k-head__kick { margin: 0 0 6px; color: var(--k-ink-3); font: 600 var(--k-fs-xs)/1 var(--k-f); letter-spacing: .12em; text-transform: uppercase; }
.k-head__t { margin: 0; color: var(--k-ink); font: 600 var(--k-fs-2xl)/1.12 var(--k-f); letter-spacing: -.024em; }
.k-head__d { margin: 8px 0 0; color: var(--k-ink-2); font: 400 var(--k-fs-md)/1.5 var(--k-f); }

/* ================= sheets and dialogs ================= */
.k-scrim { position: fixed; inset: 0; z-index: 90; background: rgba(20, 17, 27, .42); opacity: 0; transition: opacity var(--k-t-med) var(--k-ease); }
.k-scrim.is-open { opacity: 1; }
.k-sheet { position: fixed; z-index: 91; left: 0; right: 0; bottom: 0; max-height: min(88vh, 720px); overflow: auto; overscroll-behavior: contain;
  margin: 0 auto; max-width: 560px; padding: 8px var(--k-s-5) calc(var(--k-s-5) + env(safe-area-inset-bottom, 0px));
  background: var(--k-paper); color: var(--k-ink); border-radius: var(--k-r-lg) var(--k-r-lg) 0 0; box-shadow: var(--k-sh-3);
  transform: translateY(104%); transition: transform var(--k-t-med) var(--k-ease-out); }
.k-sheet.is-open { transform: none; }
.k-sheet__grab { display: block; width: 40px; height: 5px; margin: 0 auto 12px; border-radius: 3px; background: var(--k-line-2); }
.k-sheet__t { margin: 0 0 6px; font: 600 var(--k-fs-xl)/1.2 var(--k-f); letter-spacing: -.018em; }
@media (min-width: 720px) { .k-sheet { bottom: auto; top: 50%; border-radius: var(--k-r-lg); transform: translateY(-46%) scale(.98); opacity: 0; transition: transform var(--k-t-med) var(--k-ease-out), opacity var(--k-t-fast); } .k-sheet.is-open { transform: translateY(-50%); opacity: 1; } .k-sheet__grab { display: none; } }

/* ================= toast ================= */
.k-toast { position: fixed; z-index: 100; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); display: inline-flex; align-items: center; gap: 10px; max-width: min(92vw, 440px);
  padding: 12px 18px; border-radius: var(--k-r-pill); background: var(--k-ink); color: #fff; box-shadow: var(--k-sh-3); font: 600 var(--k-fs-sm)/1.35 var(--k-f);
  transform: translate(-50%, 16px); opacity: 0; transition: transform var(--k-t-med) var(--k-ease-out), opacity var(--k-t-fast) var(--k-ease); pointer-events: none; }
.k-toast.is-on { transform: translate(-50%, 0); opacity: 1; pointer-events: auto; }
.k-toast__ic { flex: none; width: 20px; height: 20px; border-radius: 50%; background: var(--k-ok) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4L18 8'/%3E%3C/svg%3E") center / 13px no-repeat; }
.k-toast .k-link { min-height: 0; color: var(--k-accent-on-dark); text-decoration-color: currentColor; }

/* ================= empty state ================= */
.k-empty { display: grid; justify-items: center; gap: 8px; padding: var(--k-s-8) var(--k-s-5); text-align: center; border: 1.5px dashed var(--k-line-2); border-radius: var(--k-r-md); background: var(--k-paper); }
.k-empty__ic { display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 4px; border-radius: 50%; background: var(--k-stone); color: var(--k-accent); }
.k-empty__ic svg { width: 24px; height: 24px; }
.k-empty__t { margin: 0; font: 600 var(--k-fs-lg)/1.25 var(--k-f); color: var(--k-ink); }
.k-empty__d { margin: 0 0 8px; max-width: 34ch; color: var(--k-ink-3); font: 500 var(--k-fs-sm)/1.45 var(--k-f); }

/* ================= skeleton ================= */
.k-skel { position: relative; overflow: hidden; border-radius: 8px; background: var(--k-stone); }
.k-skel--line { height: 14px; margin: 8px 0; }
.k-skel--title { height: 26px; width: 60%; margin: 6px 0 14px; }
.k-skel--card { height: 120px; border-radius: var(--k-r-md); }
.k-skel--circle { width: 44px; height: 44px; border-radius: 50%; }
.k-skel::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .55), transparent); animation: k-shimmer 1.4s var(--k-ease) infinite; }

/* ================= motion ================= */
@keyframes k-spin { to { transform: rotate(1turn); } }
@keyframes k-shimmer { to { transform: translateX(100%); } }
@keyframes k-rise { from { opacity: 0; transform: translateY(8px); } }
@keyframes k-pop { 0% { opacity: 0; transform: scale(.6); } 70% { transform: scale(1.06); } 100% { opacity: 1; transform: none; } }
.k-rise { animation: k-rise var(--k-t-med) var(--k-ease-out) both; animation-delay: calc(var(--i, 0) * 40ms); }
.k-pop { animation: k-pop 420ms var(--k-spring) both; } /* earned moments only: paid, first RSVP */
@media (prefers-reduced-motion: reduce) {
  .k-btn, .k-chip, .k-card--pick, .k-sheet, .k-toast, .k-scrim, .k-switch input, .k-switch input::after, .k-seg button { transition: none !important; }
  .k-rise, .k-pop, .k-skel::after { animation: none !important; }
  .k-btn[aria-busy="true"]::after { animation-duration: 2s; }
}

/* ================= dark surfaces ================= */
.k-dark { background: var(--k-night); color: var(--k-on-dark); }
.k-dark .k-card { background: #1f1b28; border-color: rgba(255, 255, 255, .08); color: var(--k-on-dark); box-shadow: none; }
.k-dark .k-card__d, .k-dark .k-hint { color: var(--k-on-dark-2); }
.k-dark .k-link { color: #fff; text-decoration-color: rgba(255, 255, 255, .35); }
.k-dark :is(.k-btn, .k-chip, .k-link, .k-card--pick):focus-visible { outline-color: var(--k-accent-on-dark); }
