/* The parent's account area: My parties, Billing, Account, Help (public/static/app/app.js + account.js).
   Built on the design-system tokens (tokens.css: --ds-space-*, --ds-radius-*, --ds-shadow-*, easing and
   durations). Colors are fixed AA pairs on the cream app background (checked in tests/dom-account.mjs).
   Only transform and opacity animate; everything holds still under prefers-reduced-motion. */
.app-page, .acct-scope {
  --a-bg: #fff8f1; --a-card: #ffffff; --a-ink: #2a1f4f; --a-muted: #5b5280; --a-line: #eadff5; --a-soft: #f6f0ff;
  --a-brand: #5b34e0; --a-brand-ink: #ffffff; --a-brand-soft: #efe9ff; --a-link: #4b26c9;
  --a-ok: #0f6b45; --a-ok-bg: #dcf6e9; --a-warn: #6b4a00; --a-warn-bg: #fff0c2; --a-bad: #9c1c33; --a-bad-bg: #ffe3e8;
  --a-info: #134d87; --a-info-bg: #e1efff; --a-party: #7a2a00; --a-party-bg: #ffe2cc;
  --a-radius: var(--ds-radius-lg, 22px); --a-ease: var(--ds-spring, cubic-bezier(.2, .8, .2, 1));
}
.app-page { background: var(--a-bg); color: var(--a-ink); }
.appmain { max-width: 1120px; }
.appmain :where(a:not(.btn):not(.chip)) { color: var(--a-link); text-underline-offset: .18em; }
.appmain :where(h1, h2, h3) { color: var(--a-ink); }
.app-page :focus-visible { outline: 3px solid var(--a-brand); outline-offset: 2px; border-radius: 8px; }

/* ---- header nav: text links on wide screens; the tab bar takes over on phones ---- */
.appnav a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; }
.appnav a svg { width: 18px; height: 18px; }
.appbar .help-link { display: none; }
@media (max-width: 719px) {
  .appnav { display: none; }
  .appbar .help-link { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px; border-radius: 999px; color: var(--a-ink); font-weight: 800; text-decoration: none; background: var(--a-soft); }
  .appbar .help-link svg { width: 20px; height: 20px; }
  body.app-page { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
}
.tabbar { display: none; }
@media (max-width: 719px) {
  .tabbar { position: fixed; z-index: 40; inset: auto 0 0 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
    background: color-mix(in srgb, #ffffff 92%, transparent); border-top: 1px solid var(--a-line); box-shadow: 0 -6px 24px rgb(42 31 79 / .08); }
  @supports (backdrop-filter: blur(1px)) { .tabbar { backdrop-filter: blur(14px) saturate(1.4); } }
  .tabbar a { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 54px; border-radius: 16px;
    color: var(--a-muted); font-weight: 800; font-size: .78rem; text-decoration: none; isolation: isolate; }
  .tabbar a svg { width: 24px; height: 24px; transition: transform var(--ds-dur-spring, .4s) var(--ds-spring-bouncy, ease-out); }
  .tabbar a::before { content: ""; position: absolute; inset: 3px 14%; z-index: -1; border-radius: 16px; background: var(--a-brand-soft); opacity: 0; transform: scale(.6); transition: opacity .16s, transform var(--ds-dur-spring, .4s) var(--a-ease); }
  .tabbar a[aria-current="page"] { color: var(--a-brand); }
  .tabbar a[aria-current="page"]::before { opacity: 1; transform: none; }
  .tabbar a[aria-current="page"] svg { transform: translateY(-2px); }
  .tabbar .dot { position: absolute; top: 6px; left: calc(50% + 8px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--a-bad); color: #fff; font-size: .68rem; line-height: 18px; text-align: center; }
  .ds-kb-open .tabbar { transform: translateY(110%); }
}

/* ---- page head ---- */
.a-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 16px; margin: 6px 0 20px; }
.a-head h1 { font-size: var(--ds-step-4, 2.2rem); margin: 0; letter-spacing: -.01em; }
.a-head p { margin: 4px 0 0; color: var(--a-muted); font-weight: 700; max-width: 60ch; text-wrap: pretty; }
.a-eyebrow { display: block; color: var(--a-muted); font-weight: 800; font-size: .9rem; margin-bottom: 2px; }
.a-section { margin: 30px 0 14px; display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.a-section h2 { font-size: var(--ds-step-2, 1.5rem); margin: 0; }
.a-section p { margin: 0; color: var(--a-muted); font-weight: 700; }
.a-btn { display: inline-flex; align-items: center; justify-content: center; gap: .45em; min-height: 48px; padding: 10px 20px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--a-brand); color: var(--a-brand-ink); font: inherit; font-weight: 800; text-decoration: none; box-shadow: 0 3px 0 rgb(42 31 79 / .22);
  transition: transform .12s var(--ds-ease-out, ease-out), filter .12s; -webkit-tap-highlight-color: transparent; }
.a-btn:hover { filter: brightness(1.08); }
.a-btn:active { transform: translateY(2px) scale(.99); box-shadow: 0 1px 0 rgb(42 31 79 / .22); }
.a-btn:disabled, .a-btn[aria-disabled="true"] { opacity: .55; cursor: default; filter: none; transform: none; }
.a-btn[aria-busy="true"] { cursor: progress; opacity: .8; }
.a-btn[aria-busy="true"]::after { content: ""; width: 1em; height: 1em; border-radius: 50%; border: 2.5px solid currentColor; border-right-color: transparent; animation: a-spin .7s linear infinite; }
.a-btn.quiet { background: var(--a-brand-soft); color: var(--a-brand); box-shadow: none; }
.a-btn.ghost { background: transparent; color: var(--a-ink); box-shadow: inset 0 0 0 2px var(--a-line); }
.a-btn.danger { background: #b4213c; color: #fff; }
.a-btn.block { width: 100%; }
.a-btn.sm { min-height: 44px; padding: 6px 14px; font-size: .95rem; }
.a-btn svg { width: 1.15em; height: 1.15em; flex: none; }
.a-link { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; font-weight: 800; color: var(--a-link); text-decoration: underline; text-underline-offset: .18em; background: none; border: 0; padding: 0 2px; font: inherit; cursor: pointer; }
.a-link svg { width: 1em; height: 1em; }
@keyframes a-spin { to { transform: rotate(1turn); } }

/* ---- cards ---- */
.a-card { background: var(--a-card); color: var(--a-ink); border-radius: var(--a-radius); padding: 20px 18px; box-shadow: var(--ds-shadow-2, 0 8px 20px rgb(42 31 79 / .12)); margin: 0 0 16px; }
.a-card h2 { font-size: 1.3rem; margin: 0 0 6px; display: flex; align-items: center; gap: 8px; }
.a-card h2 svg { width: 22px; height: 22px; color: var(--a-brand); flex: none; }
.a-card > p { color: var(--a-muted); margin: 0 0 10px; text-wrap: pretty; }
.a-card .a-note { font-size: .92rem; color: var(--a-muted); margin: 10px 0 0; }
.a-grid2 { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); align-items: start; }
.a-grid2 > .a-card { margin: 0; }

/* ---- status chips ---- */
.a-chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-weight: 800; font-size: .8rem; line-height: 1.5; white-space: nowrap; background: var(--a-soft); color: var(--a-ink); }
.a-chip svg { width: 14px; height: 14px; }
.a-chip.k-draft { background: var(--a-warn-bg); color: var(--a-warn); }
.a-chip.k-trial { background: var(--a-info-bg); color: var(--a-info); }
.a-chip.k-unlocked, .a-chip.k-paid { background: var(--a-ok-bg); color: var(--a-ok); }
.a-chip.k-partyday { background: var(--a-party-bg); color: var(--a-party); }
.a-chip.k-memories { background: #f3e6ff; color: #5c1f8c; }
.a-chip.k-refunded, .a-chip.k-paused, .a-chip.k-disputed { background: var(--a-bad-bg); color: var(--a-bad); }
.a-chip.k-partially_refunded { background: var(--a-warn-bg); color: var(--a-warn); }
.a-chip.k-comp { background: #f3e6ff; color: #5c1f8c; }
.a-chip.k-cohost { background: var(--a-soft); color: var(--a-ink); }

/* ---- My parties: party cards ---- */
.pgrid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.pcard { position: relative; display: flex; flex-direction: column; border-radius: 26px; overflow: hidden; background: var(--a-card); color: var(--a-ink);
  box-shadow: var(--ds-shadow-2, 0 8px 20px rgb(42 31 79 / .12)); transition: transform var(--ds-dur-base, .24s) var(--ds-ease-out, ease-out), box-shadow var(--ds-dur-base, .24s); container-type: inline-size; }
@media (hover: hover) { .pcard:hover { transform: translateY(-3px); box-shadow: var(--ds-shadow-3, 0 16px 36px rgb(42 31 79 / .16)); } }
.pcard__art { position: relative; display: block; height: 150px; overflow: hidden; background: radial-gradient(120% 90% at 50% 0%, var(--bg2), var(--bg)); }
.pcard__art svg { width: 100%; height: 100%; display: block; transition: transform .8s var(--ds-ease-out, ease-out); }
@media (hover: hover) { .pcard:hover .pcard__art > svg { transform: scale(1.04); } }
.pcard__when { position: absolute; left: 12px; bottom: 12px; display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: rgb(255 255 255 / .94); color: var(--a-ink); font-weight: 800; font-size: .92rem; box-shadow: 0 2px 8px rgb(0 0 0 / .18); }
.pcard__when svg { width: 16px; height: 16px; }
.pcard__when b { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; }
.pcard__body { display: flex; flex-direction: column; gap: 8px; padding: 14px 18px 18px; flex: 1; }
.pcard__top { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pcard__kid { margin: 0; font-size: 1.45rem; line-height: 1.15; overflow-wrap: anywhere; }
.pcard__kid a { color: inherit; text-decoration: none; }
.pcard__kid a::after { content: ""; position: absolute; inset: 0; z-index: 0; } /* the whole card opens Party HQ */
.pcard__kid small { display: block; font-family: var(--font-body); font-size: .95rem; font-weight: 700; color: var(--a-muted); margin-top: 2px; }
.pcard__meta { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0; color: var(--a-muted); font-weight: 700; font-size: .95rem; }
.pcard__meta span { display: inline-flex; align-items: center; gap: 5px; }
.pcard__meta svg { width: 16px; height: 16px; }
.rsvp { margin: 2px 0 0; }
.rsvp__line { display: flex; justify-content: space-between; gap: 8px; font-weight: 800; font-size: .92rem; }
.rsvp__line span:last-child { color: var(--a-muted); }
.rsvp__bar { height: 10px; margin-top: 6px; border-radius: 999px; background: var(--a-soft); overflow: hidden; }
.rsvp__bar i { display: block; height: 100%; width: 100%; border-radius: inherit; background: linear-gradient(90deg, #7b5cff, #ff6fa8); transform-origin: left; transform: scaleX(var(--v, 0)); transition: transform .9s var(--ds-spring, ease-out); }
.pcard__cta { position: relative; z-index: 1; margin-top: auto; padding-top: 6px; display: flex; flex-direction: column; gap: 6px; }
.pcard__cta .hint { margin: 0; text-align: center; font-size: .85rem; font-weight: 700; color: var(--a-muted); }
.pcard__more { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 0 14px; justify-content: center; }
.pcard__more a { min-height: 44px; display: inline-flex; align-items: center; font-weight: 800; font-size: .92rem; }

/* "Plan another birthday" */
.plan { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 280px; padding: 24px 20px; border-radius: 26px; text-align: center;
  border: 3px dashed #cdbff0; background: linear-gradient(160deg, #fff, #f7f1ff); color: var(--a-ink); text-decoration: none; transition: transform .2s var(--ds-ease-out, ease-out), border-color .2s; }
.plan:hover { border-color: var(--a-brand); transform: translateY(-2px); }
.plan__plus { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--a-brand); color: #fff; box-shadow: 0 6px 18px rgb(91 52 224 / .35); }
.plan__plus svg { width: 30px; height: 30px; }
.plan b { font-family: var(--font-display); font-size: 1.35rem; font-weight: 700; }
.plan span { color: var(--a-muted); font-weight: 700; max-width: 30ch; text-wrap: pretty; }

/* Past parties */
.past { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); }
.prow { display: grid; grid-template-columns: 76px 1fr; gap: 12px; align-items: center; padding: 12px; border-radius: 20px; background: var(--a-card); box-shadow: var(--ds-shadow-1, 0 2px 6px rgb(42 31 79 / .08)); }
.prow__art { width: 76px; height: 76px; border-radius: 16px; overflow: hidden; background: radial-gradient(120% 90% at 50% 0%, var(--bg2), var(--bg)); }
.prow__art svg { width: 100%; height: 100%; display: block; }
.prow h3 { margin: 0; font-size: 1.12rem; overflow-wrap: anywhere; }
.prow p { margin: 2px 0 0; color: var(--a-muted); font-weight: 700; font-size: .9rem; }
.prow__links { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 0 14px; align-items: center; }
.prow__links a { min-height: 44px; display: inline-flex; align-items: center; gap: 4px; font-weight: 800; font-size: .92rem; }
.prow__links .a-btn { margin-left: auto; }
@container (max-width: 300px) { .prow__links .a-btn { margin-left: 0; } }

/* Co-host invites, credits, banners */
.a-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 14px 16px; border-radius: 18px; background: var(--a-brand-soft); color: var(--a-ink); margin: 0 0 14px; font-weight: 700; }
.a-banner > svg { width: 26px; height: 26px; color: var(--a-brand); flex: none; }
.a-banner > span { flex: 1 1 220px; min-width: 0; overflow-wrap: anywhere; }
.a-banner.ok { background: var(--a-ok-bg); }
.a-banner.ok > svg { color: var(--a-ok); }
.a-banner .btnrow { margin: 0; }

/* First-time empty state */
.welcome { display: grid; gap: 24px; align-items: center; padding: 28px 22px; border-radius: 30px; background: linear-gradient(150deg, #2b2363, #5b34e0 60%, #ff6fa8); color: #fff; overflow: hidden; position: relative; }
@media (min-width: 860px) { .welcome { grid-template-columns: 1.1fr .9fr; padding: 40px; } }
.welcome h1 { color: #fff; font-size: var(--ds-step-5, 2.6rem); margin: 0 0 8px; }
.welcome p { color: #fff; font-size: 1.1rem; margin: 0 0 18px; max-width: 46ch; text-wrap: pretty; }
.welcome .a-btn { background: #ffe394; color: #2a1f4f; }
.welcome small { display: block; margin-top: 10px; font-weight: 700; opacity: .95; }
.welcome__art { position: relative; height: 210px; }
.welcome__art .critter-row { display: flex; justify-content: center; gap: 4px; }
.welcome__art svg { max-width: 100%; }
.how { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); counter-reset: how; }
.how li { counter-increment: how; position: relative; padding: 18px 18px 18px 64px; border-radius: 20px; background: var(--a-card); box-shadow: var(--ds-shadow-1, 0 2px 6px rgb(42 31 79 / .08)); }
.how li::before { content: counter(how); position: absolute; left: 16px; top: 16px; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--a-brand); color: #fff; font-family: var(--font-display); font-weight: 700; }
.how b { display: block; font-size: 1.05rem; }
.how span { color: var(--a-muted); font-weight: 600; }

/* ---- Billing ---- */
.stats { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); margin: 0 0 16px; }
.stat { padding: 14px 16px; border-radius: 18px; background: var(--a-card); box-shadow: var(--ds-shadow-1, 0 2px 6px rgb(42 31 79 / .08)); }
.stat b { display: block; font-family: var(--font-display); font-size: 1.6rem; font-variant-numeric: tabular-nums; }
.stat span { color: var(--a-muted); font-weight: 700; font-size: .9rem; }
.price-promise { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 10px 0 0; }
.price-promise li { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--a-ok-bg); color: var(--a-ok); font-weight: 800; font-size: .88rem; }
.price-promise svg { width: 15px; height: 15px; }
.pays { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.pay { padding: 16px 18px; border-radius: 22px; background: var(--a-card); box-shadow: var(--ds-shadow-1, 0 2px 6px rgb(42 31 79 / .08)); }
.pay__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; }
.pay__head h3 { margin: 0; font-size: 1.15rem; overflow-wrap: anywhere; }
.pay__head h3 a { color: inherit; }
.pay__total { font-family: var(--font-display); font-weight: 700; font-size: 1.35rem; font-variant-numeric: tabular-nums; }
.pay__sub { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin: 4px 0 10px; color: var(--a-muted); font-weight: 700; font-size: .92rem; }
.lines { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: .95rem; }
.lines td { padding: 5px 0; border-top: 1px solid var(--a-line); vertical-align: top; }
.lines td:last-child { text-align: right; white-space: nowrap; padding-left: 12px; font-weight: 700; }
.lines tr.sum td { font-weight: 800; border-top: 2px solid var(--a-ink); }
.lines tr.minus td:last-child { color: var(--a-ok); }
.lines tr.refund td { color: var(--a-bad); }
.pay__actions { display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: center; margin-top: 10px; }
.pay__actions .why { flex-basis: 100%; margin: 0; font-size: .88rem; color: var(--a-muted); font-weight: 600; }
.unlock-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.unlock-list li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; padding: 10px 0; border-top: 1px solid var(--a-line); }
.unlock-list li:first-child { border-top: 0; }
.unlock-list b { overflow-wrap: anywhere; }

/* ---- Account ---- */
.kv { display: grid; grid-template-columns: minmax(0, 7.5em) minmax(0, 1fr); gap: 8px 12px; margin: 0; }
.kv dt { color: var(--a-muted); font-weight: 800; }
.kv dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.switch { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; border-top: 1px solid var(--a-line); cursor: pointer; }
.switch:first-of-type { border-top: 0; }
.switch input { appearance: none; flex: none; position: relative; width: 52px; height: 32px; margin: 0; border-radius: 999px; background: #cfc6e6; cursor: pointer; transition: background .2s; }
.switch input::after { content: ""; position: absolute; top: 4px; left: 4px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgb(0 0 0 / .25); transition: transform .25s var(--ds-spring-snappy, ease-out); }
.switch input:checked { background: var(--a-ok); }
.switch input:checked::after { transform: translateX(20px); }
.switch input:focus-visible { outline: 3px solid var(--a-brand); outline-offset: 2px; }
.switch b { display: block; }
.switch small { display: block; color: var(--a-muted); font-weight: 600; font-size: .9rem; }
.devices2 { list-style: none; margin: 0; padding: 0; }
.devices2 li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-top: 1px solid var(--a-line); }
.devices2 li:first-child { border-top: 0; }
.devices2 small { display: block; color: var(--a-muted); font-weight: 600; }
.danger-zone { border: 2px solid #f3c2cc; }
.danger-zone h2 svg { color: var(--a-bad); }
.invites2 { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.invites2 li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 0; border-top: 1px solid var(--a-line); overflow-wrap: anywhere; }
.invites2 li:first-child { border-top: 0; }

/* ---- forms ---- */
.a-field { display: block; margin: 0 0 14px; font-weight: 800; }
.a-field > span { display: block; margin-bottom: 6px; }
.a-field small { display: block; font-weight: 600; color: var(--a-muted); margin-top: 4px; }
.a-input { display: block; width: 100%; min-height: 48px; padding: 10px 14px; border: 2px solid #cfc3ea; border-radius: 14px; background: #fff; color: var(--a-ink); font: inherit; font-size: max(16px, 1rem); font-weight: 600; }
textarea.a-input { min-height: 130px; resize: vertical; line-height: 1.45; }
.a-input:focus { border-color: var(--a-brand); outline: none; box-shadow: 0 0 0 3px rgb(91 52 224 / .25); }
.a-input[aria-invalid="true"] { border-color: var(--a-bad); }
.a-err { color: var(--a-bad); font-weight: 800; margin: 6px 0 0; }
.a-ok-msg { color: var(--a-ok); font-weight: 800; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.radio-cards { display: grid; gap: 8px; border: 0; padding: 0; margin: 0 0 14px; }
.radio-cards legend { font-weight: 800; margin-bottom: 6px; padding: 0; }
.radio-cards label { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 8px 14px; border: 2px solid var(--a-line); border-radius: 14px; font-weight: 700; cursor: pointer; }
.radio-cards label:has(input:checked) { border-color: var(--a-brand); background: var(--a-brand-soft); }
.radio-cards input { width: 20px; height: 20px; accent-color: var(--a-brand); flex: none; margin: 0; }

/* ---- sheets (native <dialog>: bottom sheet on phones, centered from 640px) ---- */
.a-sheet { width: min(560px, 100vw); max-width: 100vw; max-height: min(92dvh, 860px); margin: auto auto 0; padding: 0; border: 0; border-radius: 26px 26px 0 0; background: #fff; color: var(--a-ink); box-shadow: var(--ds-shadow-4, 0 28px 64px rgb(42 31 79 / .24)); overflow: auto; }
.a-sheet::backdrop { background: rgb(29 21 51 / .5); }
.a-sheet[open] { animation: a-sheet-in var(--ds-dur-spring, .5s) var(--a-ease) both; }
@media (min-width: 640px) { .a-sheet { margin: auto; border-radius: 26px; } }
.a-sheet__in { padding: 22px 20px calc(20px + env(safe-area-inset-bottom)); }
.a-sheet__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.a-sheet__head h2 { margin: 0; font-size: 1.4rem; }
.a-x { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--a-soft); color: var(--a-ink); cursor: pointer; }
.a-x svg { width: 20px; height: 20px; }
.policy { padding: 12px 14px; border-radius: 16px; background: var(--a-soft); margin: 0 0 14px; font-weight: 600; }
.policy.yes { background: var(--a-ok-bg); color: var(--a-ok); }
.erase-list { margin: 8px 0 14px; padding-left: 1.2em; }
.erase-list li { margin: 4px 0; }
@keyframes a-sheet-in { from { opacity: 0; transform: translateY(40px); } }

/* ---- Help ---- */
.faq details { border-top: 1px solid var(--a-line); }
.faq details:first-of-type { border-top: 0; }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 52px; padding: 8px 0; font-weight: 800; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--a-soft); font-size: 1.2rem; transition: transform .2s var(--ds-ease-out, ease-out); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 14px; color: var(--a-muted); font-weight: 600; text-wrap: pretty; }
.sent { text-align: center; padding: 10px 0; }
.sent svg { width: 56px; height: 56px; color: var(--a-ok); }
.sent h2 { justify-content: center; }
.my-tickets { list-style: none; padding: 0; margin: 0; }
.my-tickets li { display: flex; justify-content: space-between; gap: 8px; padding: 8px 0; border-top: 1px solid var(--a-line); font-weight: 700; flex-wrap: wrap; }
.my-tickets li:first-child { border-top: 0; }

/* ---- Receipt (printable) ---- */
.receipt { max-width: 640px; margin: 0 auto; }
.receipt__head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: flex-start; border-bottom: 2px solid var(--a-ink); padding-bottom: 12px; margin-bottom: 14px; }
.receipt__brand { font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; }
.receipt__head p { margin: 2px 0 0; color: var(--a-muted); font-weight: 700; }
.receipt .kv { margin: 0 0 16px; }
.receipt__foot { margin-top: 18px; color: var(--a-muted); font-size: .92rem; font-weight: 600; }
@media print {
  .appbar, .tabbar, .no-print, #toast { display: none !important; }
  body.app-page { background: #fff; padding: 0; }
  .appmain { padding: 0; max-width: none; }
  .a-card { box-shadow: none; padding: 0; }
  a { color: inherit; text-decoration: none; }
}

/* ---- skeletons ---- */
.skel { display: block; border-radius: 12px; background: #efe8fa; position: relative; overflow: hidden; }
.skel::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgb(255 255 255 / .7), transparent); transform: translateX(-100%); animation: a-shimmer 1.3s infinite; }
.skel-card { border-radius: 26px; background: #fff; overflow: hidden; box-shadow: var(--ds-shadow-1, 0 2px 6px rgb(42 31 79 / .08)); }
.skel-card .skel:first-child { height: 150px; border-radius: 0; }
.skel-card .pad { padding: 16px 18px; display: grid; gap: 10px; }
@keyframes a-shimmer { to { transform: translateX(100%); } }

/* ---- entrance choreography ---- */
.a-in > * { animation: a-rise var(--ds-dur-slow, .4s) var(--a-ease) both; animation-delay: calc(var(--i, 0) * 55ms); }
@keyframes a-rise { from { opacity: 0; transform: translateY(14px); } }

@media (prefers-reduced-motion: reduce) {
  .a-in > *, .a-sheet[open], .skel::after, .a-btn[aria-busy="true"]::after { animation: none; }
  .pcard, .pcard__art svg, .rsvp__bar i, .plan, .switch input::after, .tabbar a svg, .tabbar a::before { transition: none; }
}

/* skip link: visible only when focused from the keyboard */
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 16px; border-radius: 12px; background: var(--a-brand); color: #fff; font-weight: 800; text-decoration: none; }
.skip:focus { top: 10px; }
.appmain:focus { outline: none; }
/* the wizard has its own floating Preview button and Back/Next: no tab bar there */
.is-wizard .tabbar { display: none; }
@media (max-width: 719px) { body.app-page.is-wizard { padding-bottom: 0; } }

/* /support (marketing layout, signed out) */
.support-grid { display: grid; gap: 20px; align-items: start; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .support-grid { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); } }
.acct-scope .a-card { color: var(--a-ink); }
.acct-scope .a-card h2 { font-size: 1.4rem; }

/* polish */
.plan__plus svg { color: #fff; stroke: #fff; }
.pcard__when b { font-family: "Fredoka", var(--ds-font-display); }
.stats { grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); }
@media (max-width: 380px) { .stat b { font-size: 1.3rem; } .stat { padding: 12px; } }
.kv { grid-template-columns: max-content minmax(0, 1fr); }
.danger-zone { margin-top: 16px; }
/* celebration ripples (moments.js) stay inside their banner; nothing ever widens the page */
.a-banner { position: relative; overflow: hidden; isolation: isolate; }
.appmain { overflow-x: clip; }
/* on the marketing pages the form wears the site brand (pink), still AA with white text */
.mk .acct-scope { --a-brand: #c42a5e; --a-brand-soft: #fde7ee; --a-link: #a8204f; }
