/* The prototype app inside the phone. Type scale: 12 / 14 / 16 / 20 / 28, one figure size of 34.
   Radii: 20 (cards) / 14 (fields, bubbles) / pill (buttons, chips). Red is kept for the brand
   mark, the splash, the assistance card and the one thing in progress. Primary buttons are ink. */

.app {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: var(--ground);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.45;
  --bar: var(--ink);
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.app[data-bar="light"] { --bar: #ffffff; }
.app button { cursor: pointer; }
.num { font-variant-numeric: tabular-nums; }

/* iOS-like status bar and home indicator: part of the mock-up, hidden on a real phone */
.statusbar {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 30;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 34px 0 42px;
  color: var(--bar);
  font-size: 16px;
  font-weight: 600;
  pointer-events: none;
  transition: color .25s ease;
}
.statusbar::before {
  content: "";
  position: absolute;
  top: 11px; left: 50%;
  width: 122px; height: 35px;
  margin-left: -61px;
  border-radius: 20px;
  background: #0d0d0e;
}
.statusbar svg { display: block; height: 13px; width: auto; }
.status-icons { display: flex; gap: 6px; align-items: center; }
.homebar {
  position: absolute;
  bottom: 8px; left: 50%;
  z-index: 30;
  width: 138px; height: 5px;
  margin-left: -69px;
  border-radius: 3px;
  background: var(--bar);
  pointer-events: none;
  transition: background-color .25s ease;
}

.view { position: relative; flex: 1; min-height: 0; overflow: hidden; }

.screen {
  --screen-bg: var(--ground);
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: var(--screen-bg);
  will-change: transform, opacity;
}
/* frosted band behind the status bar, shown once the content scrolls under it */
.screen::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 3;
  height: 54px;
  background: color-mix(in srgb, var(--screen-bg) 78%, transparent);
  -webkit-backdrop-filter: blur(20px) saturate(1.8);
  backdrop-filter: blur(20px) saturate(1.8);
  box-shadow: 0 1px 0 rgba(17, 18, 20, .07);
  opacity: 0;
  transition: opacity .18s ease;
  pointer-events: none;
}
.screen.has-topbar::before { height: 110px; }
.screen.scrolled::before { opacity: 1; }
.screen-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 62px 20px 28px;
  scrollbar-width: none;
}
.screen-body::-webkit-scrollbar { display: none; }
.screen-foot {
  flex: none;
  padding: 12px 20px 34px;
  background: var(--ground);
  display: grid;
  gap: 8px;
}
/* room for the floating tab bar: 64 bar + 22 below it + 20 air */
.has-tabbar .screen-body { padding-bottom: 106px; }

/* screen transitions */
.screen.enter-push { animation: push-in .34s cubic-bezier(.22,.8,.24,1) both; }
.screen.leave-push { animation: push-out .34s cubic-bezier(.22,.8,.24,1) both; }
.screen.enter-pop  { animation: pop-in .3s cubic-bezier(.22,.8,.24,1) both; }
.screen.leave-pop  { animation: pop-out .3s cubic-bezier(.22,.8,.24,1) both; z-index: 2; }
.screen.enter-fade { animation: fade-in .2s ease both; }
@keyframes push-in  { from { transform: translateX(100%); } to { transform: none; } }
@keyframes push-out { from { transform: none; } to { transform: translateX(-22%); } }
@keyframes pop-in   { from { transform: translateX(-22%); } to { transform: none; } }
@keyframes pop-out  { from { transform: none; } to { transform: translateX(100%); } }
@keyframes fade-in  { from { opacity: 0; } to { opacity: 1; } }
@keyframes fade-out { from { opacity: 1; } to { opacity: 0; } }
.screen.enter-fade { z-index: 2; }
.overlay.out, .sheet-wrap.out { animation: fade-out .22s ease forwards; pointer-events: none; }
.sheet-wrap.out .sheet { animation: sheet-down .22s ease forwards; }
@keyframes sheet-down { to { transform: translateY(100%); } }

/* top row of a pushed screen */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 44px;
  margin: 0 -8px 12px;
  /* pinned under the status bar, above the frosted band; sticky offsets count from
     the inside of the body's 62px top padding, so 0 keeps it exactly where it sits */
  position: sticky;
  top: 0;
  z-index: 4;
}
.icon-btn {
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  transition: background-color .15s ease, transform .12s ease;
}
.icon-btn:active { background: var(--active); transform: scale(.94); }
.icon-btn svg, .ico { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.topbar-title { font-size: 16px; font-weight: 600; }
.topbar-spacer { width: 44px; }

/* home header */
.home-head { display: flex; align-items: center; justify-content: space-between; height: 44px; margin-bottom: 20px; }
.brand { display: block; width: 136px; color: var(--red); }
.brand svg { display: block; width: 100%; height: auto; }
.avatar {
  display: grid; place-items: center;
  width: 40px; height: 40px;
  border: 0; border-radius: 50%;
  background: var(--active);
  font-size: 14px; font-weight: 600;
  color: var(--ink);
}
.avatar:active { transform: scale(.94); }

.title { margin: 0; font-size: 28px; line-height: 1.12; letter-spacing: -0.025em; font-weight: 600; text-wrap: balance; }
.sub { margin: 8px 0 0; color: var(--muted); text-wrap: pretty; }
.section { margin-top: 28px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin: 0 4px 10px; }
.section-head h2 { margin: 0; font-size: 16px; font-weight: 600; }
.link { background: none; border: 0; padding: 0; font-size: 14px; font-weight: 500; color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: 14px; }

/* cards and rows */
.card { background: var(--surface); border-radius: 20px; padding: 20px; }
.card + .card { margin-top: 12px; }
.card h3 { margin: 0; font-size: 16px; font-weight: 600; }
.card p { margin: 6px 0 0; }
.list { background: var(--surface); border-radius: 20px; padding: 4px 0; }
.row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 64px;
  padding: 10px 16px 10px 20px;
  background: none;
  border: 0;
  text-align: left;
  position: relative;
}
.row + .row::before { content: ""; position: absolute; top: 0; left: 20px; right: 0; height: 1px; background: var(--rule); }
button.row:active { background: #f7f7f6; }
.row-main { flex: 1; min-width: 0; }
.row-name { display: block; font-weight: 500; }
.row-sub { display: block; margin-top: 1px; font-size: 14px; color: var(--muted); }
.row-end { flex: none; text-align: right; }
.row-end .row-sub { font-size: 13px; }
.chev { flex: none; width: 18px; height: 18px; color: #9a9da1; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.row .ico { flex: none; color: var(--muted); }

/* notice: the one thing that needs doing */
.notice { margin-top: 24px; }
.notice h3 { display: flex; align-items: center; gap: 8px; }
.dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--red); }
.notice .btn { margin-top: 16px; }

/* the dark field: one offer per screen */
.offer { margin-top: 12px; background: var(--ink); color: #fff; }
.offer p { color: #c6c8cb; }
.offer .btn { margin-top: 16px; background: #fff; color: var(--ink); }

/* buttons: pills, one height */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 54px;
  padding: 0 24px;
  border: 0;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.005em;
  transition: transform .12s ease, opacity .15s ease, background-color .15s ease;
}
.btn:active { transform: scale(.975); }
.btn-primary { background: var(--ink); color: #fff; }
.btn-light { background: var(--surface); color: var(--ink); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-small { width: auto; height: 42px; padding: 0 20px; font-size: 15px; }
.btn[disabled] { background: var(--active); color: #6a6d71; }
.btn .ico { width: 20px; height: 20px; }
.btn-red { background: var(--red); color: #fff; }
.foot-note { margin: 0; font-size: 13px; color: var(--muted); text-align: center; }

/* pills */
.pill { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 500; white-space: nowrap; flex: none; background: var(--pill-neutral-bg); color: var(--ink); }
.pill-yes { background: var(--pill-positive-bg); color: var(--pill-positive-ink); }
.pill-warn { background: var(--pill-warning-bg); color: var(--pill-warning-ink); }

/* key-value lines */
.kv { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; }
.kv + .kv { border-top: 1px solid var(--rule); }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; text-align: right; font-weight: 500; }
dl { margin: 12px 0 0; }

/* segmented control */
.seg { display: inline-flex; padding: 4px; border-radius: 999px; background: var(--active); }
.seg button { height: 38px; padding: 0 18px; border: 0; border-radius: 999px; background: transparent; font-size: 15px; font-weight: 500; color: var(--muted); transition: background-color .15s ease, color .15s ease; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); }

/* switch */
.switch { position: relative; flex: none; width: 50px; height: 30px; padding: 0; border: 0; border-radius: 999px; background: var(--control); transition: background-color .18s ease; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform .2s cubic-bezier(.3,.9,.3,1); }
.switch[aria-checked="true"] { background: var(--ink); }
.switch[aria-checked="true"]::after { transform: translateX(20px); }
.switch[disabled] { opacity: .55; }

/* ---------- splash / login ---------- */
.splash { --screen-bg: var(--red); background: var(--red); color: #fff; }
.splash .screen-body { display: flex; flex-direction: column; align-items: center; justify-content: center; padding-bottom: 0; }
.splash-logo { width: 148px; color: #fff; }
.splash-logo svg { display: block; width: 100%; height: auto; }
.splash-name { margin: 28px 0 0; font-size: 20px; font-weight: 500; letter-spacing: -0.01em; }
.splash .screen-foot { background: var(--red); padding-bottom: 46px; }
.splash .btn-ghost { color: #fff; }

/* ---------- lock screen ---------- */
.lock { --screen-bg: #101113; background: #101113; color: #fff; }
.lock .screen-body { padding-top: 96px; display: flex; flex-direction: column; }
.lock-date { margin: 0; text-align: center; font-size: 20px; font-weight: 500; color: #d6d7d9; }
.lock-time { margin: 0; text-align: center; font-size: 84px; line-height: 1; font-weight: 600; letter-spacing: -0.03em; }
.push {
  display: flex; gap: 12px; align-items: flex-start;
  width: 100%;
  margin-top: auto;
  margin-bottom: 96px;
  padding: 14px;
  border: 0;
  border-radius: 22px;
  background: #26272a;
  color: #fff;
  text-align: left;
  animation: push-drop .5s cubic-bezier(.2,.9,.25,1) .5s both;
}
.push:active { transform: scale(.98); }
@keyframes push-drop { from { opacity: 0; transform: translateY(-18px) scale(.96); } to { opacity: 1; transform: none; } }
.app-icon { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--red); color: #fff; }
.app-icon svg { width: 28px; height: auto; display: block; }
.push-top { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; color: #a9abae; }
.push-title { display: block; margin-top: 1px; font-size: 15px; font-weight: 600; }
.push-text { display: block; font-size: 15px; line-height: 1.35; color: #e4e5e6; }
.lock-hint { position: absolute; left: 0; right: 0; bottom: 40px; text-align: center; font-size: 13px; color: #9d9fa3; }

/* ---------- Face ID overlay ---------- */
.overlay { position: absolute; inset: 0; z-index: 40; display: grid; place-items: center; background: rgba(13,13,14,.42); animation: fade-in .18s ease both; }
.faceid { display: grid; place-items: center; gap: 12px; width: 156px; height: 156px; border-radius: 28px; background: #1b1c1e; color: #fff; font-size: 14px; }
.faceid svg { width: 64px; height: 64px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.faceid .fx-face { animation: fx-pulse .9s ease-in-out infinite; }
.faceid.ok .fx-face, .faceid.ok .fx-frame { display: none; }
.faceid .fx-check { display: none; stroke-dasharray: 60; stroke-dashoffset: 60; }
.faceid.ok .fx-check { display: block; animation: draw .32s ease-out forwards; }
@keyframes fx-pulse { 50% { opacity: .35; } }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* ---------- verification ---------- */
.steps { display: flex; gap: 6px; flex: 1; max-width: 132px; }
.steps i { flex: 1; height: 4px; border-radius: 2px; background: var(--control); transition: background-color .3s ease; }
.steps i.on { background: var(--ink); }
.cam .steps i { background: #4a4b4f; }
.cam .steps i.on { background: #fff; }

.need { display: grid; gap: 0; margin-top: 24px; }
.need .row { padding-left: 20px; min-height: 68px; }

.consent { display: flex; gap: 14px; align-items: flex-start; margin-top: 12px; }
.consent p { margin: 0; font-size: 14px; }
.consent strong { display: block; font-size: 16px; font-weight: 500; margin-bottom: 2px; }

.cam { --screen-bg: #111214; background: #111214; color: #fff; }
.cam .screen-body { display: flex; flex-direction: column; padding-bottom: 0; }
.cam .screen-foot { background: #111214; }
.cam .icon-btn:active { background: #2a2b2e; }
.cam .seg { background: #26272a; align-self: center; }
.cam .seg button { color: #b5b7ba; }
.cam .seg button[aria-pressed="true"] { background: #fff; color: var(--ink); }
.cam-title { margin: 20px 0 0; font-size: 20px; font-weight: 600; letter-spacing: -0.01em; text-align: center; min-height: 28px; }
.cam-sub { margin: 6px 0 0; text-align: center; font-size: 15px; color: #b5b7ba; min-height: 44px; }
.cam-stage { flex: 1; min-height: 0; display: grid; place-items: center; position: relative; }

/* the document frame: the card slides in, the outline closes around it, then it is captured */
.doc-frame { position: relative; width: 310px; height: 196px; border-radius: 16px; background: #1b1c1f; cursor: pointer; }
.doc-frame svg.trace { position: absolute; inset: -3px; width: calc(100% + 6px); height: calc(100% + 6px); fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-dasharray: 1000; stroke-dashoffset: 1000; }
.doc-frame.scanning svg.trace { animation: trace 1.5s cubic-bezier(.5,0,.3,1) .5s forwards; }
@keyframes trace { to { stroke-dashoffset: 0; } }
.id-card { position: absolute; inset: 10px; border-radius: 10px; background: #e9ebee; opacity: 0; transform: translateY(26px) rotate(-5deg) scale(.94); padding: 14px; display: grid; grid-template-columns: 76px 1fr; gap: 12px; color: #3b3d41; }
.doc-frame.scanning .id-card { animation: card-in .5s cubic-bezier(.2,.8,.25,1) forwards; }
@keyframes card-in { to { opacity: 1; transform: none; } }
.id-photo { border-radius: 6px; background: #c9ccd1; position: relative; overflow: hidden; }
.id-photo::before { content: ""; position: absolute; left: 50%; top: 22%; width: 30px; height: 30px; margin-left: -15px; border-radius: 50%; background: #a9adb3; }
.id-photo::after { content: ""; position: absolute; left: 50%; bottom: -26px; width: 66px; height: 66px; margin-left: -33px; border-radius: 50%; background: #a9adb3; }
.id-lines { display: grid; gap: 8px; align-content: start; }
.id-lines b { display: block; font-size: 10px; font-weight: 600; letter-spacing: .02em; color: #5a5d62; }
.id-lines i { display: block; height: 8px; border-radius: 4px; background: #c9ccd1; }
.id-lines i:nth-child(3) { width: 70%; } .id-lines i:nth-child(4) { width: 52%; } .id-lines i:nth-child(5) { width: 84%; } .id-lines i:nth-child(6) { width: 40%; }
.id-card.back { grid-template-columns: 1fr; }
.id-card.back .mrz { align-self: end; display: grid; gap: 5px; }
.id-card.back .mrz i { display: block; height: 7px; border-radius: 2px; background: #b9bcc2; }
.doc-frame.done::after { content: ""; position: absolute; inset: 0; border-radius: 16px; background: #fff; animation: flash .35s ease-out forwards; }
@keyframes flash { from { opacity: .28; } to { opacity: 0; } }

/* NFC: the phone outline with the card held behind it */
.nfc { position: relative; width: 200px; height: 220px; cursor: pointer; }
.nfc .nfc-card { position: absolute; left: 86px; top: -20px; width: 128px; height: 82px; border-radius: 10px; background: #e9ebee; transform: translate(36px, -30px) rotate(12deg); opacity: 0; }
.nfc.scanning .nfc-card { animation: nfc-card .6s cubic-bezier(.2,.8,.25,1) forwards; }
@keyframes nfc-card { to { transform: rotate(12deg); opacity: 1; } }
.nfc .nfc-phone { position: absolute; left: 46px; top: 0; width: 108px; height: 220px; border-radius: 22px; border: 3px solid #fff; background: #111214; }
/* the contactless symbol: the arcs light up one after another, outward, while the chip is read */
.nfc .nfc-waves { position: absolute; left: 50%; top: 72px; width: 36px; height: 48px; margin-left: -16px; fill: none; stroke: #fff; stroke-width: 2.6; stroke-linecap: round; opacity: .35; transition: opacity .2s ease; }
.nfc.scanning .nfc-waves { opacity: 1; }
.nfc.scanning .nfc-waves .arc { animation: nfc-arc 1.2s ease-in-out infinite; }
.nfc.scanning .nfc-waves .arc-2 { animation-delay: .15s; }
.nfc.scanning .nfc-waves .arc-3 { animation-delay: .3s; }
.nfc.scanning .nfc-waves .arc-4 { animation-delay: .45s; }
@keyframes nfc-arc { 0%, 100% { opacity: .25; } 40% { opacity: 1; } }
.nfc.read .nfc-waves { opacity: 0; }
.nfc.read .nfc-waves .arc { animation: none; }
.nfc .nfc-ok { position: absolute; left: 50%; top: 74px; width: 48px; height: 48px; margin-left: -24px; fill: none; stroke: #fff; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 40; stroke-dashoffset: 40; }
.nfc.read .nfc-ok { animation: draw .35s ease-out forwards; }
.nfc-wrap { display: grid; justify-items: center; gap: 40px; }
.nfc-bar { width: 168px; height: 4px; border-radius: 2px; background: #3a3b3f; overflow: hidden; }
.nfc-bar i { display: block; height: 100%; background: #fff; transform: scaleX(0); transform-origin: left center; }
.nfc-wrap.reading .nfc-bar i { animation: nfc-bar 1.7s cubic-bezier(.4,0,.2,1) forwards; }
@keyframes nfc-bar { to { transform: scaleX(1); } }
@keyframes nfc-wave { 50% { opacity: 1; } }

/* face */
.face { position: relative; width: 236px; height: 300px; }
.face-oval { position: absolute; inset: 0; border-radius: 50%; background: #1b1c1f; overflow: hidden; }
.face-oval::before { content: ""; position: absolute; left: 50%; top: 20%; width: 96px; height: 116px; margin-left: -48px; border-radius: 48px; background: #4a4c51; }
.face-oval::after { content: ""; position: absolute; left: 50%; bottom: -74px; width: 220px; height: 150px; margin-left: -110px; border-radius: 50% 50% 0 0; background: #4a4c51; }
.face svg { position: absolute; inset: -6px; width: calc(100% + 12px); height: calc(100% + 12px); fill: none; stroke: #fff; stroke-width: 4; stroke-linecap: round; }
.face svg path { stroke-dasharray: 870; stroke-dashoffset: 870; }
.face.scanning svg path { animation: ring 2s cubic-bezier(.45,0,.3,1) .3s forwards; }
@keyframes ring { to { stroke-dashoffset: 0; } }

.cam-status { display: flex; align-items: center; justify-content: center; gap: 8px; height: 54px; font-size: 15px; color: #b5b7ba; }
.cam-status .ico { width: 18px; height: 18px; }

/* done */
.done-mark { display: grid; place-items: center; width: 64px; height: 64px; margin-top: 56px; border-radius: 50%; background: var(--pill-positive-bg); color: var(--positive); }
.done-mark svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw .4s ease-out .2s forwards; }
.done-mark + .title { margin-top: 24px; }

/* coverage list */
.cover { display: flex; align-items: center; gap: 12px; padding: 14px 20px; position: relative; }
.cover + .cover::before { content: ""; position: absolute; top: 0; left: 20px; right: 0; height: 1px; background: var(--rule); }
.cover-main { flex: 1; min-width: 0; }
.cover-name { display: block; font-weight: 500; }
.cover-sub { display: block; font-size: 14px; color: var(--muted); }
.cover-sum { flex: none; text-align: right; font-weight: 500; }
.locked-sum { color: #8b8e93; }

/* ---------- travel ---------- */
/* the total sits in the foot, above the button, so it never scrolls away */
.screen-foot.with-sum { border-top: 1px solid var(--border); padding-top: 16px; }
.sum { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; padding: 0 4px 8px; }
.sum-label { display: block; font-weight: 500; }
.sum-parts { display: block; margin-top: 2px; font-size: 13px; line-height: 1.35; color: var(--muted); }
.sum strong { flex: none; font-size: 34px; line-height: 1; font-weight: 600; letter-spacing: -0.025em; white-space: nowrap; }
/* pay: card on the left, Apple Pay on the right */
.pay-split { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pay-split .btn { padding: 0 12px; }
.btn-apple { gap: 2px; background: #000; color: #fff; font-family: -apple-system, "SF Pro Display", var(--font); font-size: 21px; font-weight: 600; letter-spacing: -0.01em; }
.btn-apple:active { background: #222; }
.apple-logo { width: 19px; height: 19px; fill: currentColor; translate: 0 -2px; }

/* the Apple Pay sheet */
.apay { margin-top: -6px; }
.apay-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.apay-mark { display: inline-flex; align-items: center; gap: 2px; font-family: -apple-system, "SF Pro Display", var(--font); font-size: 24px; font-weight: 600; letter-spacing: -0.01em; }
.apay-mark .apple-logo { width: 22px; height: 22px; }
.apay-cancel { border: 0; background: none; padding: 8px 0; font-size: 16px; font-weight: 500; color: #0a6cff; }
.apay-card-row { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-radius: 16px; background: var(--surface); }
.apay-card { flex: none; display: flex; align-items: flex-end; justify-content: flex-end; width: 52px; height: 34px; padding: 4px 6px; border-radius: 5px; background: #1a3a8f; color: #fff; }
.apay-card i { font-size: 10px; font-weight: 800; letter-spacing: .02em; }
.apay-lines { margin: 8px 0 0; padding: 4px 16px; border-radius: 16px; background: var(--surface); }
.apay-lines div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; font-size: 15px; }
.apay-lines div + div { border-top: 1px solid var(--rule); }
.apay-lines dt { color: var(--muted); }
.apay-lines dd { margin: 0; text-align: right; font-weight: 500; }
.apay-total { display: flex; justify-content: space-between; align-items: baseline; padding: 18px 4px 4px; }
.apay-total span { font-weight: 500; }
.apay-total strong { font-size: 28px; font-weight: 600; letter-spacing: -0.02em; }
.apay-confirm { display: grid; justify-items: center; gap: 8px; margin-top: 14px; font-size: 14px; color: var(--muted); }
.apay-confirm svg { width: 48px; height: 48px; fill: none; stroke: #0a6cff; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.apay-confirm .fx-face { animation: fx-pulse .9s ease-in-out infinite; }
.apay-confirm .fx-check { display: none; stroke-dasharray: 60; stroke-dashoffset: 60; }
.apay-confirm.ok .fx-face, .apay-confirm.ok .fx-frame { display: none; }
.apay-confirm.ok .fx-check { display: block; animation: draw .32s ease-out forwards; }
.apay-confirm.ok { color: var(--ink); }

.opt { display: flex; align-items: center; gap: 14px; }
.opt .row-main { min-width: 0; }
.check { flex: none; width: 20px; height: 20px; color: var(--positive); fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* the assistance card: the one red object inside the app */
.assist-card { margin-top: 24px; padding: 20px; border-radius: 20px; background: var(--red); color: #fff; }
.assist-card .brand { color: #fff; width: 118px; }
.assist-card .ac-name { margin: 28px 0 0; font-size: 20px; font-weight: 600; letter-spacing: -0.01em; }
.assist-card .ac-plan { margin: 2px 0 0; color: #f6d5d3; }
.assist-card dl { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 12px; margin: 22px 0 0; }
.assist-card dt { font-size: 13px; color: #f6d5d3; }
.assist-card dd { margin: 1px 0 0; font-weight: 600; }

/* ---------- assistant ---------- */
.chat { background: var(--ground); }
.chat-head { flex: none; display: flex; align-items: center; gap: 4px; padding: 56px 12px 10px; background: var(--ground); border-bottom: 1px solid var(--border); }
.chat-id { flex: 1; min-width: 0; }
.chat-id strong { display: block; font-size: 16px; font-weight: 600; }
.chat-id span { display: block; font-size: 13px; color: var(--muted); }
.chat-body { flex: 1; min-height: 0; overflow-y: auto; padding: 16px 16px 8px; display: flex; flex-direction: column; gap: 8px; scrollbar-width: none; scroll-behavior: smooth; }
.chat-body::-webkit-scrollbar { display: none; }
.chat-note { align-self: center; margin: 0 0 8px; max-width: 30ch; text-align: center; font-size: 13px; color: var(--muted); }
.msg { max-width: 84%; padding: 11px 15px; border-radius: 20px; animation: msg-in .26s cubic-bezier(.2,.8,.25,1) both; }
@keyframes msg-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.msg.still { animation: none; }
.msg.bot { align-self: flex-start; background: var(--surface); border-bottom-left-radius: 6px; }
.msg.me { align-self: flex-end; background: var(--ink); color: #fff; border-bottom-right-radius: 6px; }
.msg.card-msg { max-width: 92%; width: 92%; padding: 16px; }
.msg h4 { margin: 0 0 8px; font-size: 15px; font-weight: 600; }
.msg ol { margin: 0; padding: 0 0 0 20px; display: grid; gap: 8px; }
.msg .btn { margin-top: 12px; height: 48px; }
.msg .kv { padding: 7px 0; font-size: 15px; }
.msg dl { margin: 0; }
.typing { display: flex; gap: 5px; align-items: center; height: 44px; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: #9a9da1; animation: blink 1s ease-in-out infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 80%, 100% { opacity: .3; } 40% { opacity: 1; } }
.photo { display: grid; place-items: center; width: 132px; height: 164px; margin: -3px -7px 6px; border-radius: 14px; background: #f3f3f2; }
.photo div { width: 84px; display: grid; gap: 7px; }
.photo i { display: block; height: 6px; border-radius: 3px; background: #c7c9cd; }
.photo i:nth-child(1) { width: 60%; height: 9px; background: #9da0a5; } .photo i:nth-child(4) { width: 75%; } .photo i:nth-child(6) { width: 45%; }

.track { display: grid; gap: 0; margin: 4px 0 0; padding: 0; list-style: none; }
.track li { position: relative; padding: 0 0 14px 26px; font-size: 15px; }
.track li:last-child { padding-bottom: 0; }
.track li::before { content: ""; position: absolute; left: 2px; top: 5px; width: 11px; height: 11px; border-radius: 50%; border: 2px solid var(--control); background: var(--surface); }
.track li::after { content: ""; position: absolute; left: 7px; top: 20px; bottom: 0; width: 1px; background: var(--control); }
.track li:last-child::after { display: none; }
.track li.on::before { border-color: var(--red); background: var(--red); }
.track li span { display: block; font-size: 14px; color: var(--muted); }

.replies { flex: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 6px 16px 8px; min-height: 12px; }
.chip { height: 42px; padding: 0 16px; border: 1px solid var(--control); border-radius: 999px; background: var(--surface); font-size: 15px; font-weight: 500; color: var(--ink); animation: msg-in .26s cubic-bezier(.2,.8,.25,1) both; transition: transform .12s ease, background-color .15s ease; }
.chip:active { transform: scale(.96); background: var(--active); }
.composer { flex: none; display: flex; align-items: center; gap: 8px; padding: 8px 12px 34px 16px; background: var(--ground); }
.composer input { flex: 1; min-width: 0; height: 46px; padding: 0 18px; border: 1px solid var(--control); border-radius: 999px; background: var(--surface); font: inherit; color: var(--ink); outline: none; user-select: text; }
.composer input::placeholder { color: #6a6d71; }
.composer input:focus { border-color: var(--ink); }
.send { flex: none; display: grid; place-items: center; width: 46px; height: 46px; border: 0; border-radius: 50%; background: var(--ink); color: #fff; transition: transform .12s ease; }
.send:active { transform: scale(.92); }
.send svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- tab bar ---------- */
/* floating glass bar, icons only; the content scrolls underneath it */
.tabbar {
  position: absolute;
  left: 18px; right: 18px; bottom: 22px;
  z-index: 5;
  display: flex;
  align-items: center;
  height: 64px;
  padding: 0 7px;
  border-radius: 32px;
  background: rgba(255, 255, 255, .7);
  -webkit-backdrop-filter: blur(22px) saturate(1.9);
  backdrop-filter: blur(22px) saturate(1.9);
  border: 1px solid rgba(255, 255, 255, .75);
  box-shadow:
    0 12px 32px rgba(17, 18, 20, .13),
    0 2px 6px rgba(17, 18, 20, .06),
    inset 0 1px 0 rgba(255, 255, 255, .95),
    inset 0 -1px 0 rgba(17, 18, 20, .05);
}
.tab {
  flex: 1;
  display: grid;
  place-items: center;
  height: 50px;
  padding: 0;
  border: 0;
  border-radius: 25px;
  background: none;
  color: #6a6d71;
  transition: background-color .2s ease, color .2s ease;
}
.tab svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; transition: transform .14s ease; }
.tab:active svg { transform: scale(.88); }
.tab[aria-current="page"] {
  color: var(--ink);
  background: rgba(255, 255, 255, .85);
  box-shadow: 0 1px 3px rgba(17, 18, 20, .1), inset 0 0 0 1px rgba(17, 18, 20, .04);
}
.tab[aria-current="page"] svg { stroke-width: 2.1; }

/* ---------- bottom sheet ---------- */
.sheet-wrap { position: absolute; inset: 0; z-index: 35; display: flex; align-items: flex-end; background: rgba(13,13,14,.42); animation: fade-in .2s ease both; }
.sheet { width: 100%; padding: 12px 20px 40px; border-radius: 28px 28px 0 0; background: var(--ground); animation: sheet-up .32s cubic-bezier(.2,.85,.25,1) both; }
@keyframes sheet-up { from { transform: translateY(100%); } to { transform: none; } }
.sheet::before { content: ""; display: block; width: 40px; height: 5px; margin: 0 auto 18px; border-radius: 3px; background: var(--control); }
.sheet h3 { margin: 0 0 6px; font-size: 20px; font-weight: 600; letter-spacing: -0.01em; }
.sheet p { margin: 0 0 16px; color: var(--muted); }
.sheet .btn + .btn { margin-top: 8px; }

.code { display: block; margin-top: 14px; padding: 14px; border-radius: 14px; background: var(--ground); text-align: center; font-size: 20px; font-weight: 600; letter-spacing: .08em; user-select: text; }

/* ---------- brand layer: red headers and the wave motif ---------- */

/* waves: thin flowing lines over two soft shapes, coloured by the surface they sit on */
.waves { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; pointer-events: none; color: rgba(255, 255, 255, .15); }
.waves .wl { fill: none; stroke: currentColor; stroke-width: 1.1; }
.waves .wd { fill: rgba(70, 0, 0, .16); }
.waves .wh { fill: rgba(255, 255, 255, .06); }
.screen > .waves { z-index: 0; }
.splash > .screen-body, .splash > .screen-foot, .lock > .screen-body, .lock > .lock-hint { position: relative; z-index: 1; }
.splash .screen-foot { background: transparent; }

/* the red header: runs up under the status bar and the pinned back button */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin: -62px -20px 0;
  padding: 62px 20px 30px;
  background: var(--red);
  color: #fff;
}
.topbar + .hero { margin-top: -118px; padding-top: 118px; }
.hero.lift { padding-bottom: 76px; }
.hero.lift + * { position: relative; margin-top: -48px; }
.hero .title { color: #fff; }
.hero .sub { color: rgba(255, 255, 255, .84); }
.hero .brand { color: #fff; }
.hero .avatar { background: rgba(255, 255, 255, .18); color: #fff; }
.hero .home-head { margin-bottom: 26px; }
.hero-stats { display: flex; gap: 8px; margin-top: 18px; }
.hero-stats span { display: flex; align-items: baseline; gap: 6px; height: 34px; padding: 0 14px; border-radius: 999px; background: rgba(255, 255, 255, .14); font-size: 13px; line-height: 34px; color: rgba(255, 255, 255, .88); }
.hero-stats b { font-size: 15px; font-weight: 600; color: #fff; }
.hero-fig { display: flex; align-items: baseline; gap: 8px; margin: 22px 0 0; }
.hero-fig strong { font-size: 34px; line-height: 1; font-weight: 600; letter-spacing: -0.025em; }
.hero-fig span { color: rgba(255, 255, 255, .84); }
/* profile: the full name leads (two lines if it must), the photo sits in the space on the right */
.hero-id { display: flex; align-items: center; gap: 16px; }
.hero-id-text { flex: 1; min-width: 0; }
.hero-id .title { overflow-wrap: anywhere; }
.hero-avatar { flex: none; display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: #fff; color: var(--red); font-size: 22px; font-weight: 600; letter-spacing: -0.01em; }
.hero-seg { margin-top: 22px; }
.hero .seg { background: rgba(255, 255, 255, .16); }
.hero .seg button { color: rgba(255, 255, 255, .9); }
.hero .seg button[aria-pressed="true"] { background: #fff; color: var(--red); }
.hero .done-mark { margin-top: 18px; background: #fff; color: var(--red); }
.screen.on-hero .topbar { color: #fff; }
/* over the red header the frosted band is red too, so the title slides under it cleanly */
.screen.on-hero::before { background: color-mix(in srgb, var(--red) 88%, transparent); box-shadow: none; }
.screen.on-hero .icon-btn:active { background: rgba(255, 255, 255, .18); }
.topbar { transition: color .2s ease; }

/* the dark offer card carries red waves */
.offer { position: relative; isolation: isolate; overflow: hidden; }
.offer .waves { color: rgba(222, 44, 38, .5); }
.offer .waves .wd { fill: rgba(194, 27, 23, .22); }
.offer .waves .wh { fill: none; }
.offer h3, .offer p { max-width: 80%; }

/* the assistance card: a wallet card */
.assist-card { position: relative; isolation: isolate; overflow: hidden; }

/* the lock screen wallpaper: dark, with the red ribbon */
.lock .waves { color: rgba(214, 40, 34, .42); }
.lock .waves .wd { fill: rgba(194, 27, 23, .2); }
.lock .waves .wh { fill: rgba(194, 27, 23, .07); }
.lock .push { background: rgba(38, 39, 42, .82); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }

/* red where it acts: primary buttons, switches, the current tab, checks, the user's messages */
.btn-primary { background: var(--red); }
.btn-primary:active { background: #a9160f; }
.switch[aria-checked="true"] { background: var(--red); }
.tab[aria-current="page"] { color: var(--red); }
.check { color: var(--red); }
.need .row .ico { color: var(--red); }
.steps i.on, .cam .steps i.on { background: var(--red); }
.nfc-bar i { background: var(--red); }
/* inside a reply the action stays quiet, so the user's red bubbles lead */
.msg .btn-primary { background: var(--ink); }
.msg .btn-primary:active { background: #000; }
.link { color: var(--red); }
.done-mark { background: var(--red); color: #fff; }
.msg.me { background: var(--red); }
.send { background: var(--red); }
.bot-avatar { flex: none; display: grid; place-items: center; width: 38px; height: 38px; margin-right: 8px; border-radius: 50%; background: var(--red); color: #fff; }
.bot-avatar svg { width: 26px; height: auto; display: block; }
.online { display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: #1f9d5c; vertical-align: 1px; }

/* A real phone: no mock status bar, the device's own safe areas instead */
@media (max-width: 720px) {
  .hero { margin-top: -16px; padding-top: 16px; }
  .topbar + .hero { margin-top: -72px; padding-top: 72px; }
  .statusbar, .homebar { display: none; }
  .screen-body { padding-top: 16px; }
  .chat-head { padding-top: 10px; }
  .lock .screen-body { padding-top: 56px; }
  .screen-foot { padding-bottom: max(16px, env(safe-area-inset-bottom)); }
  .composer { padding-bottom: max(12px, env(safe-area-inset-bottom)); }
  .tabbar { bottom: max(14px, env(safe-area-inset-bottom)); }
  .screen::before { display: none; }
  .screen.has-topbar::before { display: block; height: 66px; }
}
