/* Skysmind Account. Its own look (a living sky, ink and paper, serif titles),
   with the Nuvira mark kept on its brand gradient wherever it appears. */

:root {
  --ink: #12142a;
  --ink-2: #4a5070;
  --ink-3: #8a90aa;
  --paper: #ffffff;
  --card: rgba(255, 255, 255, 0.72);
  --card-edge: rgba(255, 255, 255, 0.9);
  --line: rgba(20, 24, 60, 0.1);
  --field: rgba(255, 255, 255, 0.78);
  --field-focus: #ffffff;
  --accent: #3f5bff;
  --accent-ink: #ffffff;
  --accent-soft: rgba(63, 91, 255, 0.12);
  --good: #18925b;
  --bad: #d3304a;
  --warn: #c77800;
  --shadow: 0 30px 80px -20px rgba(30, 40, 110, 0.28), 0 2px 6px rgba(30, 40, 110, 0.06);
  --nuvira: linear-gradient(135deg, #660099 0%, #cc3380 38%, #ff8000 72%, #ffbf4d 100%);
  --serif: "New York", ui-serif, "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Inter, Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  color-scheme: light;
  background: #dce6ff;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #eef0ff;
    --ink-2: #b0b5d4;
    --ink-3: #7a80a2;
    --paper: #151935;
    --card: rgba(16, 19, 44, 0.66);
    --card-edge: rgba(255, 255, 255, 0.12);
    --line: rgba(255, 255, 255, 0.1);
    --field: rgba(255, 255, 255, 0.06);
    --field-focus: rgba(255, 255, 255, 0.1);
    --accent: #93a5ff;
    --accent-ink: #0b0e24;
    --accent-soft: rgba(147, 165, 255, 0.14);
    --good: #4fd394;
    --bad: #ff7186;
    --warn: #ffb547;
    --shadow: 0 30px 90px -20px rgba(0, 0, 0, 0.6), 0 2px 8px rgba(0, 0, 0, 0.3);
    color-scheme: dark;
    background: #0c1030;
  }
}
:root[data-theme="dark"] {
  --ink: #eef0ff; --ink-2: #b0b5d4; --ink-3: #7a80a2; --paper: #151935;
  --card: rgba(16, 19, 44, 0.66); --card-edge: rgba(255, 255, 255, 0.12); --line: rgba(255, 255, 255, 0.1);
  --field: rgba(255, 255, 255, 0.06); --field-focus: rgba(255, 255, 255, 0.1);
  --accent: #93a5ff; --accent-ink: #0b0e24; --accent-soft: rgba(147, 165, 255, 0.14);
  --good: #4fd394; --bad: #ff7186; --warn: #ffb547;
  --shadow: 0 30px 90px -20px rgba(0, 0, 0, 0.6), 0 2px 8px rgba(0, 0, 0, 0.3);
  color-scheme: dark; background: #0c1030;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background: transparent;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 3px; border-radius: 10px; }

#sky { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: -1; display: block; }

/* ── Layout ── */

.stage {
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  justify-items: center;
  padding: max(20px, env(safe-area-inset-top)) 16px max(18px, env(safe-area-inset-bottom));
  gap: 18px;
}
.brand {
  width: 100%; max-width: 440px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.wordmark {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--ink); font-family: var(--serif); font-size: 22px; letter-spacing: -0.01em;
}
.wordmark:hover { text-decoration: none; }
.wordmark img { transition: transform 0.8s var(--spring); }
.wordmark:hover img { transform: rotate(-18deg) scale(1.06); }
.provider {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12.5px; font-weight: 600; color: var(--ink-2);
  padding: 7px 11px 7px 9px; border-radius: 999px;
  background: var(--card); border: 1px solid var(--line);
  backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4);
}

.card {
  position: relative;
  width: 100%; max-width: 440px; align-self: center;
  background: var(--card);
  border: 1px solid var(--card-edge);
  border-radius: 30px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(28px) saturate(1.5); -webkit-backdrop-filter: blur(28px) saturate(1.5);
  padding: 30px 28px 26px;
  transform: perspective(1200px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform 0.6s var(--ease), height 0.5s var(--ease);
  overflow: hidden;
}
.card-glare {
  position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: radial-gradient(600px circle at var(--gx, 50%) var(--gy, 0%), rgba(255, 255, 255, 0.35), transparent 40%);
  opacity: 0.55; mix-blend-mode: soft-light;
}
#view { position: relative; }

.foot {
  width: 100%; max-width: 440px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px 14px;
  font-size: 12px; color: var(--ink-2);
}
.foot b { font-weight: 650; background: var(--nuvira); -webkit-background-clip: text; background-clip: text; color: transparent; }
.foot a { color: var(--ink-2); }

/* ── View transitions ── */

.view-in { animation: viewIn 0.55s var(--ease) both; }
.view-in > * { animation: rise 0.6s var(--ease) both; }
.view-in > *:nth-child(2) { animation-delay: 0.04s; }
.view-in > *:nth-child(3) { animation-delay: 0.08s; }
.view-in > *:nth-child(4) { animation-delay: 0.12s; }
.view-in > *:nth-child(5) { animation-delay: 0.16s; }
.view-in > *:nth-child(n+6) { animation-delay: 0.2s; }
@keyframes viewIn { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(10px); filter: blur(4px); } }

.shake { animation: shake 0.42s cubic-bezier(.36, .07, .19, .97); }
@keyframes shake {
  10%, 90% { transform: translateX(-1px); } 20%, 80% { transform: translateX(3px); }
  30%, 50%, 70% { transform: translateX(-6px); } 40%, 60% { transform: translateX(6px); }
}

/* ── Type ── */

h1 {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(28px, 7vw, 34px); line-height: 1.1; letter-spacing: -0.02em;
  margin: 0 0 8px;
}
h1 em { font-style: italic; color: var(--accent); }
.lede { margin: 0 0 22px; color: var(--ink-2); font-size: 15px; line-height: 1.5; }
.small { font-size: 13px; color: var(--ink-2); line-height: 1.5; }
.center { text-align: center; }
.muted { color: var(--ink-3); }
h2 {
  font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700;
  color: var(--ink-3); margin: 26px 0 10px;
}

/* ── Segmented control ── */

.seg {
  position: relative; display: grid; grid-template-columns: 1fr 1fr;
  padding: 4px; border-radius: 16px; margin-bottom: 20px;
  background: var(--accent-soft);
}
.seg button {
  position: relative; z-index: 1; border: 0; background: none; cursor: pointer;
  padding: 10px 8px; border-radius: 12px; font-size: 14px; font-weight: 600; color: var(--ink-2);
  transition: color 0.3s var(--ease);
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  white-space: nowrap;
}
.seg button[aria-selected="true"] { color: var(--ink); }
.seg .pill {
  position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px);
  border-radius: 12px; background: var(--paper);
  box-shadow: 0 2px 10px rgba(20, 30, 90, 0.12);
  transition: transform 0.5s var(--spring);
}
.seg[data-at="1"] .pill { transform: translateX(100%); }

/* ── Fields ── */

.field { position: relative; margin-bottom: 12px; }
.field input, .field textarea {
  width: 100%; border: 1px solid var(--line); background: var(--field);
  border-radius: 16px; padding: 22px 16px 8px; font: inherit; font-size: 16px; color: var(--ink);
  transition: border-color 0.25s, background 0.25s, box-shadow 0.35s var(--ease);
  outline: none;
}
.field textarea { resize: none; min-height: 104px; padding-top: 26px; line-height: 1.45; }
.field label {
  position: absolute; left: 17px; top: 16px; font-size: 16px; color: var(--ink-3);
  pointer-events: none; transform-origin: left top;
  transition: transform 0.3s var(--ease), color 0.3s;
}
.field input:focus, .field textarea:focus {
  background: var(--field-focus); border-color: var(--accent);
  box-shadow: 0 0 0 5px var(--accent-soft);
}
.field input:focus + label, .field input:not(:placeholder-shown) + label,
.field textarea:focus + label, .field textarea:not(:placeholder-shown) + label {
  transform: translateY(-9px) scale(0.74); color: var(--ink-2);
}
.field.prefix input { padding-left: 34px; }
.field.prefix::before {
  content: "@"; position: absolute; left: 17px; top: 22px; font-size: 16px; color: var(--ink-3);
  opacity: 0; transition: opacity 0.2s;
}
.field.prefix:focus-within::before, .field.prefix.filled::before { opacity: 1; }
.field.prefix label { left: 17px; }
.field .tail {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  display: flex; align-items: center; gap: 4px;
}
.field.bad input { border-color: var(--bad); box-shadow: 0 0 0 5px color-mix(in srgb, var(--bad) 14%, transparent); }
.field.good input { border-color: color-mix(in srgb, var(--good) 60%, var(--line)); }

.icon-btn {
  border: 0; background: none; cursor: pointer; color: var(--ink-3);
  width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center;
  transition: background 0.2s, color 0.2s, transform 0.3s var(--spring);
}
.icon-btn:hover { background: var(--accent-soft); color: var(--ink); }
.icon-btn:active { transform: scale(0.88); }

.hint { min-height: 20px; font-size: 13px; margin: -4px 4px 10px; color: var(--ink-3); transition: color 0.2s; }
.hint:empty { min-height: 6px; }
.hint.good { color: var(--good); }
.hint.bad { color: var(--bad); }

/* status dot: idle → spinner → check / cross */
.status { width: 22px; height: 22px; margin-right: 6px; position: relative; }
.status svg { position: absolute; inset: 0; }
.status .spin { opacity: 0; animation: spin 0.8s linear infinite; transition: opacity 0.2s; }
.status[data-s="checking"] .spin { opacity: 1; }
.status .ok, .status .no { opacity: 0; transform: scale(0.4); transition: opacity 0.25s, transform 0.45s var(--spring); }
.status[data-s="ok"] .ok, .status[data-s="no"] .no { opacity: 1; transform: none; }
.status .ok path { stroke-dasharray: 20; stroke-dashoffset: 20; transition: stroke-dashoffset 0.45s var(--ease) 0.08s; }
.status[data-s="ok"] .ok path { stroke-dashoffset: 0; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Buttons ── */

.btn {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  width: 100%; min-height: 54px; padding: 0 22px; border-radius: 999px;
  border: 0; cursor: pointer; font-size: 16px; font-weight: 650; letter-spacing: -0.01em;
  background: var(--ink); color: var(--paper);
  transform: translate(var(--mx, 0), var(--my, 0));
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), opacity 0.2s, background 0.3s;
  box-shadow: 0 10px 26px -10px color-mix(in srgb, var(--ink) 60%, transparent);
}
.btn:hover { box-shadow: 0 16px 34px -12px color-mix(in srgb, var(--ink) 70%, transparent); text-decoration: none; }
.btn:active { transform: translate(var(--mx, 0), var(--my, 0)) scale(0.97); }
.btn.accent { background: var(--accent); color: var(--accent-ink); box-shadow: 0 12px 28px -12px var(--accent); }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn.ghost:hover { box-shadow: inset 0 0 0 1.5px var(--ink-3); }
.btn.danger { background: transparent; color: var(--bad); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--bad) 35%, transparent); }
.btn.nuvira { background: var(--nuvira); color: #fff; box-shadow: 0 14px 30px -12px #cc3380; }
.btn.small { width: auto; min-height: 36px; padding: 0 14px; font-size: 13.5px; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }
.btn .label { transition: opacity 0.2s, transform 0.3s var(--ease); }
.btn .dots { position: absolute; display: flex; gap: 5px; opacity: 0; transition: opacity 0.2s; }
.btn .dots i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: bob 0.9s var(--ease) infinite; }
.btn .dots i:nth-child(2) { animation-delay: 0.12s; }
.btn .dots i:nth-child(3) { animation-delay: 0.24s; }
.btn.busy .label { opacity: 0; transform: translateY(-8px); }
.btn.busy .dots { opacity: 1; }
@keyframes bob { 0%, 100% { transform: translateY(2px); opacity: 0.5; } 50% { transform: translateY(-3px); opacity: 1; } }
.ripple {
  position: absolute; border-radius: 50%; pointer-events: none;
  background: currentColor; opacity: 0.18; transform: scale(0);
  animation: ripple 0.7s var(--ease) forwards;
}
@keyframes ripple { to { transform: scale(1); opacity: 0; } }

.row { display: flex; gap: 10px; align-items: center; }
.row > .btn { flex: 1; }
.stack { display: grid; gap: 10px; }
.between { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.link-btn { border: 0; background: none; padding: 0; cursor: pointer; color: var(--accent); font-weight: 600; font-size: 14px; }
.link-btn:hover { text-decoration: underline; text-underline-offset: 3px; }
.switch-line { text-align: center; margin: 20px 0 0; font-size: 14px; color: var(--ink-2); }

/* ── QR sign-in ── */

.qr-wrap { display: grid; justify-items: center; gap: 16px; }
.qr-tile {
  position: relative; width: 236px; height: 236px; border-radius: 30px;
  background: #fff; display: grid; place-items: center;
  box-shadow: 0 18px 40px -16px rgba(20, 30, 90, 0.35), inset 0 0 0 1px rgba(20, 24, 60, 0.06);
  transition: transform 0.7s var(--spring);
}
.qr-tile:hover { transform: scale(1.02) rotate(-0.6deg); }
.qr-tile canvas { width: 196px; height: 196px; transition: filter 0.6s var(--ease), opacity 0.6s, transform 0.7s var(--ease); }
.qr-ring { position: absolute; inset: -7px; width: calc(100% + 14px); height: calc(100% + 14px); pointer-events: none; overflow: visible; }
.qr-ring rect { fill: none; stroke: var(--accent); stroke-width: 3; stroke-linecap: round; transition: stroke 0.4s; }
.qr-ring .track { stroke: var(--line); }
.qr-tile[data-s="scanned"] canvas, .qr-tile[data-s="approved"] canvas { filter: blur(10px); opacity: 0.25; transform: scale(0.9); }
.qr-tile[data-s="expired"] canvas { filter: grayscale(1) blur(3px); opacity: 0.25; }
.qr-tile[data-s="loading"] canvas { opacity: 0; }
.qr-overlay {
  position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 8px;
  opacity: 0; transform: scale(0.85); transition: opacity 0.45s, transform 0.6s var(--spring);
  color: #12142a; text-align: center; padding: 18px; pointer-events: none;
}
.qr-tile[data-s="scanned"] .qr-overlay.scanned,
.qr-tile[data-s="approved"] .qr-overlay.approved,
.qr-tile[data-s="expired"] .qr-overlay.expired,
.qr-tile[data-s="loading"] .qr-overlay.loading { opacity: 1; transform: none; pointer-events: auto; }
.avatar {
  width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--serif); font-size: 28px; color: #fff; overflow: hidden; flex: none;
  background: linear-gradient(140deg, #9db4ff, #5b74ff 55%, #2b2f7a);
  box-shadow: 0 8px 20px -8px rgba(40, 60, 200, 0.5);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.sm { width: 40px; height: 40px; font-size: 18px; }
.avatar.lg { width: 84px; height: 84px; font-size: 36px; }
.match { display: flex; gap: 6px; justify-content: center; }
.match span {
  display: inline-grid; place-items: center; width: 44px; height: 54px; border-radius: 14px;
  background: #12142a; color: #fff; font-size: 30px; font-weight: 700; font-variant-numeric: tabular-nums;
  animation: flip 0.7s var(--spring) both;
}
.match span:nth-child(2) { animation-delay: 0.12s; }
@keyframes flip { from { transform: rotateX(90deg) translateY(-10px); opacity: 0; } }
.qr-steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; width: 100%; }
.qr-steps li { display: flex; gap: 12px; align-items: center; font-size: 14px; color: var(--ink-2); transition: color 0.3s, opacity 0.3s; }
.qr-steps li b { color: var(--ink); font-weight: 600; }
.qr-steps .n {
  flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  font-size: 12px; font-weight: 700; background: var(--accent-soft); color: var(--accent);
  transition: background 0.4s, color 0.4s, transform 0.5s var(--spring);
}
.qr-steps li.done .n { background: var(--good); color: #fff; transform: scale(1.08); }
.qr-steps li.now .n { background: var(--accent); color: var(--accent-ink); }
.check-draw path { stroke-dasharray: 60; stroke-dashoffset: 60; animation: draw 0.7s var(--ease) 0.15s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* ── App chip (continuing to an app) ── */

.app-chip {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px 10px 10px; border-radius: 18px; margin-bottom: 18px;
  background: var(--accent-soft);
}
.app-chip img { width: 38px; height: 38px; border-radius: 11px; }
.app-chip b { display: block; font-size: 14.5px; }
.app-chip span { font-size: 12.5px; color: var(--ink-2); }

.handshake { display: flex; align-items: center; justify-content: center; gap: 0; margin: 4px 0 20px; }
.handshake img.app { width: 64px; height: 64px; border-radius: 18px; box-shadow: 0 10px 24px -10px rgba(0,0,0,.35); }
.handshake .wire { position: relative; width: 74px; height: 2px; background: var(--line); overflow: hidden; }
.handshake .wire::after {
  content: ""; position: absolute; inset: 0; width: 40%;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  animation: travel 1.6s var(--ease) infinite;
}
@keyframes travel { from { transform: translateX(-100%); } to { transform: translateX(260%); } }
.scopes { list-style: none; padding: 0; margin: 0 0 18px; display: grid; gap: 2px; border-radius: 18px; overflow: hidden; }
.scopes li { display: flex; gap: 12px; align-items: center; padding: 13px 14px; background: var(--field); font-size: 14.5px; }
.scopes svg { flex: none; color: var(--accent); }

/* ── Sign-up stepper ── */

.steps-bar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 22px; }
.steps-bar i { height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; position: relative; }
.steps-bar i::after { content: ""; position: absolute; inset: 0; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform 0.6s var(--ease); }
.steps-bar i.on::after { transform: scaleX(1); }
.slide-next { animation: slideNext 0.5s var(--ease) both; }
.slide-back { animation: slideBack 0.5s var(--ease) both; }
@keyframes slideNext { from { opacity: 0; transform: translateX(28px); } }
@keyframes slideBack { from { opacity: 0; transform: translateX(-28px); } }

.pass {
  position: relative; margin: 6px 0 18px; padding: 18px; border-radius: 22px; overflow: hidden;
  background: linear-gradient(140deg, #1c2160, #3e4bd6 60%, #7f93ff);
  color: #fff; display: flex; gap: 14px; align-items: center;
  transform: perspective(700px) rotateX(var(--prx, 0deg)) rotateY(var(--pry, 0deg));
  transition: transform 0.5s var(--ease);
  box-shadow: 0 18px 40px -18px rgba(40, 60, 200, 0.7);
}
.pass::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(260px circle at var(--pgx, 30%) var(--pgy, 0%), rgba(255,255,255,.35), transparent 60%);
}
.pass .avatar { background: rgba(255,255,255,.18); box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.4); }
.pass .who { position: relative; min-width: 0; }
.pass .who b { display: block; font-size: 19px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pass .who span { font-size: 12.5px; opacity: 0.75; }
.pass .stamp { position: absolute; right: 16px; top: 14px; opacity: 0.85; }

.rules { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 12px; }
.rules span {
  font-size: 12.5px; font-weight: 600; padding: 6px 10px; border-radius: 999px;
  background: var(--field); color: var(--ink-3); border: 1px solid var(--line);
  display: inline-flex; align-items: center; gap: 6px;
  transition: background 0.3s, color 0.3s, border-color 0.3s, transform 0.45s var(--spring);
}
.rules span::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: 0.5; transition: opacity 0.3s; }
.rules span.met { color: var(--good); border-color: color-mix(in srgb, var(--good) 40%, transparent); background: color-mix(in srgb, var(--good) 10%, transparent); transform: translateY(-1px); }
.rules span.met::before { opacity: 1; }
.meter { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; margin: -2px 2px 6px; }
.meter i { height: 5px; border-radius: 5px; background: var(--line); transition: background 0.4s var(--ease), transform 0.4s var(--spring); }
.meter[data-l="1"] i:nth-child(-n+1) { background: var(--bad); }
.meter[data-l="2"] i:nth-child(-n+2) { background: var(--warn); }
.meter[data-l="3"] i:nth-child(-n+3) { background: var(--accent); }
.meter[data-l="4"] i { background: var(--good); }
.meter-label { font-size: 12.5px; color: var(--ink-3); margin: 0 2px 14px; min-height: 18px; }

.counter { position: absolute; right: 12px; bottom: 12px; width: 26px; height: 26px; }
.counter circle { fill: none; stroke-width: 3; }
.counter .track { stroke: var(--line); }
.counter .bar { stroke: var(--accent); stroke-linecap: round; transform: rotate(-90deg); transform-origin: center; transition: stroke-dashoffset 0.3s var(--ease), stroke 0.3s; }

.review { display: grid; gap: 2px; border-radius: 18px; overflow: hidden; margin-bottom: 16px; }
.review button {
  border: 0; text-align: left; cursor: pointer; display: grid; grid-template-columns: 90px 1fr auto; gap: 10px; align-items: center;
  padding: 14px; background: var(--field); font-size: 14.5px; transition: background 0.2s;
}
.review button:hover { background: var(--field-focus); }
.review .k { color: var(--ink-3); font-size: 13px; }
.review .v { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.review .e { color: var(--accent); font-size: 13px; font-weight: 600; opacity: 0; transition: opacity 0.2s; }
.review button:hover .e { opacity: 1; }

.check {
  display: flex; gap: 12px; align-items: flex-start; cursor: pointer; font-size: 14px; color: var(--ink-2); line-height: 1.45;
  margin-bottom: 16px; user-select: none;
}
.check input { position: absolute; opacity: 0; pointer-events: none; }
.check .box {
  flex: none; width: 24px; height: 24px; border-radius: 8px; border: 1.5px solid var(--ink-3);
  display: grid; place-items: center; transition: background 0.25s, border-color 0.25s, transform 0.4s var(--spring);
}
.check .box path { stroke-dasharray: 20; stroke-dashoffset: 20; transition: stroke-dashoffset 0.35s var(--ease); }
.check input:checked + .box { background: var(--accent); border-color: var(--accent); transform: scale(1.06); }
.check input:checked + .box path { stroke-dashoffset: 0; }
.check input:focus-visible + .box { outline: 2.5px solid var(--accent); outline-offset: 3px; }

/* ── Account page ── */

.profile { display: flex; gap: 16px; align-items: center; margin-bottom: 6px; }
.profile .who b { font-family: var(--serif); font-weight: 500; font-size: 26px; letter-spacing: -0.01em; display: block; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px;
  font-size: 12.5px; font-weight: 600; background: var(--accent-soft); color: var(--accent);
  border: 0; cursor: pointer; transition: transform 0.35s var(--spring), background 0.2s;
}
.chip:active { transform: scale(0.93); }
.chip.good { background: color-mix(in srgb, var(--good) 14%, transparent); color: var(--good); cursor: default; }
.chip.warn { background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn); }
.chip.nuvira { background: var(--nuvira); color: #fff; cursor: default; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.list { display: grid; gap: 2px; border-radius: 20px; overflow: hidden; }
.item {
  display: flex; align-items: center; gap: 12px; padding: 13px 14px; background: var(--field);
  transition: background 0.2s, opacity 0.4s, transform 0.5s var(--ease), max-height 0.5s var(--ease);
  max-height: 120px;
}
.item:hover { background: var(--field-focus); }
.item .meta { flex: 1; min-width: 0; }
.item .meta b { display: block; font-size: 14.5px; font-weight: 600; }
.item .meta span { font-size: 12.5px; color: var(--ink-3); }
.item .glyph { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex: none; }
.item img.glyph { padding: 0; }
.item.leaving { opacity: 0; transform: translateX(30px); max-height: 0; padding-top: 0; padding-bottom: 0; }
.tag { font-size: 11px; font-weight: 700; padding: 3px 7px; border-radius: 6px; background: var(--accent); color: var(--accent-ink); margin-left: 6px; vertical-align: 1px; }
.empty { padding: 18px 14px; background: var(--field); font-size: 14px; color: var(--ink-3); text-align: center; }
.callout {
  display: flex; gap: 14px; align-items: center; padding: 14px; border-radius: 20px; margin-top: 16px;
  background: linear-gradient(135deg, color-mix(in srgb, #cc3380 12%, transparent), color-mix(in srgb, #ff8000 10%, transparent));
  border: 1px solid color-mix(in srgb, #cc3380 22%, transparent);
}
.callout img { flex: none; }
.callout b { display: block; font-size: 14.5px; margin-bottom: 2px; }
.callout span { font-size: 13px; color: var(--ink-2); line-height: 1.45; }

/* ── Big result glyph ── */

.result { display: grid; justify-items: center; text-align: center; padding: 6px 0 4px; }
.result .glyph {
  width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 16px;
  background: var(--accent-soft); color: var(--accent);
  animation: pop 0.8s var(--spring) both;
}
.result .glyph.good { background: color-mix(in srgb, var(--good) 15%, transparent); color: var(--good); }
.result .glyph.bad { background: color-mix(in srgb, var(--bad) 14%, transparent); color: var(--bad); }
@keyframes pop { from { transform: scale(0.3); opacity: 0; } }
.envelope { animation: float 3.4s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-6px) rotate(-3deg); } }

.skeleton { height: 18px; border-radius: 8px; margin: 10px 0; background: linear-gradient(90deg, var(--line), var(--field-focus), var(--line)); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ── Toast ── */

#toast {
  position: fixed; left: 50%; bottom: max(24px, env(safe-area-inset-bottom)); z-index: 10;
  transform: translate(-50%, 140%); opacity: 0;
  padding: 12px 18px; border-radius: 999px; max-width: calc(100vw - 32px);
  background: var(--ink); color: var(--paper); font-size: 14px; font-weight: 600;
  box-shadow: 0 16px 40px -14px rgba(0, 0, 0, 0.5);
  transition: transform 0.55s var(--spring), opacity 0.3s;
}
#toast.show { transform: translate(-50%, 0); opacity: 1; }
#toast.bad { background: var(--bad); color: #fff; }

.turnstile { display: flex; justify-content: center; margin: 4px 0 12px; min-height: 0; }

@media (max-width: 420px) {
  .card { padding: 26px 20px 22px; border-radius: 26px; }
  .provider { font-size: 11.5px; }
  .seg button { font-size: 13px; gap: 5px; padding: 10px 4px; }
  .qr-tile { width: 216px; height: 216px; }
  .qr-tile canvas { width: 180px; height: 180px; }
  .review button { grid-template-columns: 76px 1fr auto; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .card, .btn, .pass { transform: none !important; }
}
