/* "Save your account": the ask (panels/saveaccount.js) and the welcome's "Sign in or sign up" link and sheet. iOS twin:
   Views/SaveAccountViews.swift. Same shape as the shop offer's card (.so-wrap). Colours and type are the shared tokens. */

.sa-wrap { position: fixed; inset: 0; z-index: 12; display: grid; place-items: center; padding: 40px 20px; background: rgba(0,0,0,.5); animation: sa-fade .25s ease-out both; }
.sa-wrap.still { animation: none; }
.sa-card { position: relative; width: min(420px, 100%); max-height: calc(100dvh - 48px); display: flex; flex-direction: column; padding: 16px; border-radius: 14px;
  background: var(--paper); border: 1px solid rgba(243,235,216,.28); color: var(--ink); animation: sa-rise .35s cubic-bezier(.2,.9,.3,1) both; }
.sa-wrap.still .sa-card { animation: none; }
.sa-in { display: flex; flex-direction: column; min-height: 0; gap: 12px; }
@keyframes sa-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes sa-rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.sa-worker { position: absolute; right: 20px; top: -64px; width: 56px; z-index: -1; animation: sa-peek .35s .1s ease-out both; }
.sa-wrap.still .sa-worker { animation: none; }
@keyframes sa-peek { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }

/* The title, lead and rows scroll on a short screen; the buttons stay pinned under them. */
.sa-scroll { overflow-y: auto; min-height: 0; display: grid; gap: 10px; align-content: start; }
.sa-card h2 { margin: 0; display: flex; align-items: center; gap: 8px; font-size: 26px; line-height: 1.1; padding-top: 3px; }
.sa-card h2 .sf { color: var(--accent); flex: none; }
.sa-card p, .sa-lead { font: 400 16px/1.35 var(--round); color: rgba(243,235,216,.92); margin: 0; }
.sa-rows { list-style: none; margin: 0; padding: 10px 12px; display: grid; gap: 10px; border-radius: 10px; background: rgba(15,42,73,.55); }
.sa-rows li { display: flex; align-items: flex-start; gap: 10px; font: 400 15px/1.35 var(--round); color: rgba(243,235,216,.92); }
.sa-rows .sf { color: var(--accent); flex: none; margin-top: 1px; }
.sa-foot { display: grid; gap: 8px; }
.sa-sign, .sa-choices, .sa-email { display: grid; gap: 8px; }
.sa-sign .tg-apple { min-height: 48px; margin: 0; }
.sa-sign .tg-mail { background: #1E3556; color: rgba(255,255,255,.92); border: 1px solid rgba(255,255,255,.16); }
.sa-sign .tg-apple:disabled { opacity: .5; }
.sa-sign .bigbtn { min-height: 48px; }
.sa-sign .link { width: auto; padding: 10px 4px; min-height: 44px; }
.sa-back { justify-self: start; display: inline-flex; align-items: center; gap: 4px; }
.sa-problem { padding: 8px 12px; border-radius: 10px; background: var(--stamp); color: #fff !important; font-weight: 600 !important; }
.sa-later { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.sa-link { min-height: 44px; padding: 0 14px; font: 600 16px/1.2 var(--round); color: rgba(243,235,216,.8); }
.sa-link.sa-stop { color: rgba(243,235,216,.7); font-weight: 400; }
.sa-card .sa-note { font-size: 13px; text-align: center; color: rgba(243,235,216,.7); }
.sa-card button:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* Saved: a cream SAVED stamp, the way the profit stamp looks, springing in. */
.sa-done { display: grid; gap: 12px; justify-items: center; text-align: center; }
.sa-stamp { padding: 8px 18px 4px; font-size: 38px; line-height: 1; letter-spacing: 2px; color: var(--stamp); background: var(--ink); border: 3.5px solid var(--stamp); border-radius: 6px;
  transform: rotate(-3deg); animation: sa-stamp .45s cubic-bezier(.3,1.6,.5,1) both; }
.sa-wrap.still .sa-stamp { animation: none; }
@keyframes sa-stamp { from { transform: rotate(-3deg) scale(1.7); opacity: 0; } to { transform: rotate(-3deg) scale(1); opacity: 1; } }
.sa-done .sa-foot { width: 100%; }
.sa-done h2 { justify-content: center; }

/* The welcome's link: under the two class pills, a plain text link in the accent colour. */
.welcome .accountlink { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 44px; margin-top: 4px; padding: 8px 12px;
  color: var(--accent); font: 600 15px/1.2 var(--round); text-align: center; }
.welcome .accountlink[hidden] { display: none; }
.welcome .accountlink:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 10px; }
.welcome .accountlink:active { opacity: .7; }

/* The welcome's sheet. */
.sa-wel { display: grid; gap: 14px; align-content: start; max-width: 560px; margin: 0 auto; padding: 20px; }
.sa-wel .sa-h { margin: 0; font-size: 28px; line-height: 1.1; }
.sa-wel .sa-lead { font: 400 16px/1.35 var(--round); margin: 0; }
.sa-wel .sa-sign .tg-apple { min-height: 48px; }
.sa-wel .bigbtn { min-height: 48px; }

@media (prefers-reduced-motion: reduce) {
  .sa-wrap, .sa-card, .sa-worker, .sa-stamp { animation: none; }
}
