/* Avatar Enrollment design system.
   Adapted from the approved Claude Design prototype (heritage theme).
   Layout is mobile first; wider viewports center the app in a device card. */

/* ── Self-hosted fonts ────────────────────────────── */
@font-face {
  font-family: "Roboto";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/roboto-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Noto Kufi Arabic";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/noto-kufi-arabic.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1,
    U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF,
    U+FE70-FE74, U+FE76-FEFC;
}

/* ── Page stage ───────────────────────────────────── */
* , *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  font-family: "Roboto", -apple-system, "Segoe UI", sans-serif;
  background: #ECE8DD;
  overflow: hidden;
}

.stage {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(120% 90% at 50% 0%, #F2EEE3 0%, #E5E0D2 100%);
  transition: background 0.4s ease;
}
.stage.dark {
  background: radial-gradient(120% 90% at 50% 0%, #18241E 0%, #0C1410 100%);
}

.device { width: 100%; height: 100dvh; }
@media (min-width: 720px) and (min-height: 720px) {
  .device {
    width: 402px;
    height: min(874px, calc(100dvh - 64px));
    border-radius: 34px;
    overflow: hidden;
    box-shadow: 0 40px 90px -30px rgba(15, 25, 20, 0.45);
    border: 1px solid rgba(15, 25, 20, 0.10);
  }
  .stage.dark .device { border-color: rgba(255, 255, 255, 0.12); }
}

/* ── App root (heritage theme) ────────────────────── */
.av-app {
  --accent: #BC9B57;
  --accent-deep: #8E7233;
  --radius: 16px;
  --hero1: #0C4434;
  --hero2: #062A1E;
  --bg: #F4EFE3;
  --surface: #FFFFFF;
  --surface2: #FBF8F0;
  --ink: #172620;
  --ink2: #57624F;
  --ink3: #94997F;
  --line: #E2DBC6;
  --primary: #0C4434;
  --on-primary: #F6F3E8;
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: "Roboto", -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
.av-app[dir="rtl"] {
  font-family: "Noto Kufi Arabic", "Roboto", -apple-system, "Segoe UI", sans-serif;
}
.av-app button { font-family: inherit; cursor: pointer; }
.av-app :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* The hidden attribute must beat any display set by component classes. */
.av-app [hidden] { display: none !important; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ── Screens and motion ───────────────────────────── */
.av-screen {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  position: relative;
}
@media (prefers-reduced-motion: no-preference) {
  /* Entrances are deliberately shallow and quick: the screen fades in,
     content blocks rise a few pixels with a small stagger, and chrome
     (header, progress bar) stays still. Motion should read as polish,
     never as a transition the user waits for. */
  .av-screen { animation: avIn 0.2s ease-out both; }

  .av-body > *,
  .av-success-main > *,
  .av-sso-main > * {
    animation: avRise 0.26s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }
  .av-body > :nth-child(2),
  .av-success-main > :nth-child(2),
  .av-sso-main > :nth-child(2) { animation-delay: 35ms; }
  .av-body > :nth-child(3),
  .av-success-main > :nth-child(3),
  .av-sso-main > :nth-child(3) { animation-delay: 70ms; }
  .av-body > :nth-child(4),
  .av-success-main > :nth-child(4),
  .av-sso-main > :nth-child(4) { animation-delay: 105ms; }
  .av-body > :nth-child(5),
  .av-success-main > :nth-child(5),
  .av-sso-main > :nth-child(5) { animation-delay: 140ms; }
  .av-body > :nth-child(n + 6),
  .av-success-main > :nth-child(n + 6),
  .av-sso-main > :nth-child(n + 6) { animation-delay: 175ms; }

  .av-footer,
  .av-sso-foot {
    animation: avRise 0.26s cubic-bezier(0.2, 0.7, 0.2, 1) 105ms both;
  }
}
@keyframes avIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes avRise {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.av-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: none;
}
.av-scroll::-webkit-scrollbar { display: none; }
.av-body { padding: 8px 24px 16px; }

/* ── Header ───────────────────────────────────────── */
.av-header {
  flex: none;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: calc(env(safe-area-inset-top, 0px) + 20px) 20px 10px;
}
.av-iconbtn {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  transition: transform 0.15s ease;
}
.av-iconbtn:active { transform: scale(0.92); }
.av-app[dir="rtl"] .av-chev { transform: scaleX(-1); }
.av-brandrow { display: flex; align-items: center; gap: 9px; min-width: 0; }
.av-brandrow .av-markwrap { color: var(--primary); display: flex; }
.av-hspace { flex: 1; }

/* Language pill */
.av-lang {
  display: flex;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
}
.av-lang button {
  height: 26px;
  padding: 0 10px;
  border: none;
  border-radius: 999px;
  background: transparent;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  color: var(--ink3);
  display: flex;
  align-items: center;
  justify-content: center;
}
/* Optical correction: Noto Kufi Arabic renders low in the line box. */
.av-lang button.arb {
  font-family: "Noto Kufi Arabic", sans-serif;
  font-size: 13px;
  padding-bottom: 3px;
}
.av-lang button.on { background: var(--primary); color: var(--on-primary); }
.av-lang.dark { border-color: rgba(255, 255, 255, 0.28); background: rgba(255, 255, 255, 0.06); }
.av-lang.dark button { color: rgba(244, 241, 230, 0.65); }
.av-lang.dark button.on { background: #F6F3E8; color: #0B3A2C; }

/* ── Progress ─────────────────────────────────────── */
.av-progress { flex: none; padding: 6px 24px 14px; }
.av-progress-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
  font-size: 12px;
}
.av-progress-label .of { color: var(--ink3); font-weight: 500; }
.av-progress-label .nm { color: var(--ink); font-weight: 600; }
.av-progress-segs { display: flex; gap: 6px; }
.av-progress-segs span {
  flex: 1;
  height: 4px;
  border-radius: 999px;
  background: var(--line);
  transition: background 0.3s ease;
}
.av-progress-segs span.done { background: var(--primary); }
.av-progress-segs span.cur { background: var(--accent); }

/* ── Type ─────────────────────────────────────────── */
.av-h1 {
  font-size: 28px;
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: -0.01em;
  margin: 0 0 14px;
  text-wrap: pretty;
}

/* Arabic script is cursive and joined. Any tracking pulls the letters
   apart, so Arabic always keeps the font's natural spacing. */
:lang(ar) .av-h1,
:lang(ar) .av-cardlabel,
:lang(ar) .av-sso-main h1,
:lang(ar) .av-sso-internal {
  letter-spacing: normal;
}
.av-lead {
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--ink2);
  margin: 0 0 20px;
  text-wrap: pretty;
}
.av-goldrule {
  width: 36px;
  height: 3px;
  border-radius: 999px;
  background: var(--accent);
  margin: 0 0 14px;
}

/* ── Cards and rows ───────────────────────────────── */
.av-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 6px);
  padding: 18px;
}
.av-cardlabel {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink3);
  margin: 0 0 14px;
}
.av-steprow { display: flex; gap: 14px; padding: 9px 0; align-items: flex-start; }
.av-steprow .num {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-deep);
  font-variant-numeric: tabular-nums;
  padding-top: 2px;
  flex: none;
}
.av-steprow strong { display: block; font-size: 14.5px; font-weight: 600; }
.av-steprow span.d { display: block; font-size: 12.5px; color: var(--ink2); line-height: 1.5; margin-top: 1px; }
.av-duration {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--ink2);
}
.av-duration svg { color: var(--accent-deep); flex: none; }

.av-idchip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 14px 7px 7px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  margin: 4px 0 18px;
}
.av-app[dir="rtl"] .av-idchip { padding: 7px 7px 7px 14px; }
.av-avatarini {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: var(--primary);
  color: var(--on-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  flex: none;
}
.av-idchip strong { display: block; font-size: 13px; font-weight: 600; line-height: 1.2; }
.av-idchip span.r { display: block; margin-top: 2px; font-size: 11px; color: var(--ink3); line-height: 1.3; }

/* Prep cards */
.av-prepcards { display: flex; flex-direction: column; gap: 10px; }
.av-prepcard {
  display: flex;
  gap: 14px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  padding: 14px 16px;
}
.av-icontile {
  width: 42px;
  height: 42px;
  border-radius: calc(var(--radius) - 3px);
  background: var(--surface2);
  border: 1px solid var(--line);
  color: var(--accent-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.av-prepcard strong { display: block; font-size: 14px; font-weight: 600; }
.av-prepcard span.d { display: block; font-size: 12.5px; color: var(--ink2); line-height: 1.5; margin-top: 1px; }

/* Consent */
.av-consentrow { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; }
.av-consentrow + .av-consentrow { border-top: 1px solid var(--line); }
.av-consentrow svg { color: var(--primary); flex: none; margin-top: 1px; }
.av-consentrow p { margin: 0; font-size: 14px; line-height: 1.5; }
.av-policylink {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin-top: 12px;
  padding: 14px 16px;
  border-radius: calc(var(--radius) + 2px);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 600;
}
.av-policylink .grow { flex: 1; text-align: start; }
.av-policylink svg { color: var(--ink3); }
.av-checkrow {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 14px;
  cursor: pointer;
  user-select: none;
  background: none;
  border: none;
  padding: 0;
  text-align: start;
  width: 100%;
}
.av-checkbox {
  width: 24px;
  height: 24px;
  border-radius: 8px;
  border: 1.5px solid var(--ink3);
  background: var(--surface);
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--on-primary);
  transition: background 0.15s ease, border-color 0.15s ease;
}
.av-checkbox.on { background: var(--primary); border-color: var(--primary); }
.av-checkrow p { margin: 0; font-size: 13px; line-height: 1.5; color: var(--ink2); padding-top: 2px; }

/* ── Buttons ──────────────────────────────────────── */
.av-cta {
  width: 100%;
  min-height: 54px;
  padding: 10px 18px;
  line-height: 1.3;
  border: none;
  border-radius: var(--radius);
  background: var(--primary);
  color: var(--on-primary);
  font-size: 15.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 14px 28px -12px color-mix(in srgb, var(--primary) 60%, transparent);
  transition: transform 0.15s ease, opacity 0.15s ease;
}
.av-cta:active { transform: scale(0.98); }
.av-cta:disabled { opacity: 0.4; box-shadow: none; cursor: default; }
.av-cta-light { background: #F6F3E8; color: #0B3A2C; box-shadow: 0 14px 30px -12px rgba(0, 0, 0, 0.5); }
.av-btn2 {
  height: 54px;
  padding: 0 20px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-size: 14.5px;
  font-weight: 600;
  transition: transform 0.15s ease;
}
.av-btn2:active { transform: scale(0.97); }
.av-footer {
  flex: none;
  padding: 12px 24px calc(env(safe-area-inset-bottom, 0px) + 24px);
}
.av-footnote {
  margin: 0 0 12px;
  font-size: 12px;
  color: var(--ink3);
  text-align: center;
}

/* ── SSO hero ─────────────────────────────────────── */
.av-sso {
  background: linear-gradient(168deg, var(--hero1) 0%, var(--hero2) 88%);
  color: #F4F1E6;
  padding: 0 28px;
  overflow: hidden;
}
.av-sso-wm {
  position: absolute;
  inset-inline-end: -130px;
  top: 90px;
  color: #FFFFFF;
  opacity: 0.07;
  pointer-events: none;
}
.av-sso-top {
  flex: none;
  display: flex;
  justify-content: flex-end;
  padding-top: calc(env(safe-area-inset-top, 0px) + 28px);
  position: relative;
  z-index: 2;
}
.av-sso-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  z-index: 2;
}
.av-sso-main .av-lockup { color: #F6F3E8; margin-bottom: 26px; }
.av-sso-main h1 {
  font-size: 29px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0 0 12px;
  max-width: 300px;
  text-wrap: pretty;
}
.av-sso-main p {
  font-size: 14.5px;
  line-height: 1.65;
  color: rgba(244, 241, 230, 0.72);
  margin: 0;
  max-width: 310px;
  text-wrap: pretty;
}
.av-sso-foot {
  flex: none;
  padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 28px);
  position: relative;
  z-index: 2;
}
.av-sso-hint {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  justify-content: center;
  margin: 14px 2px 0;
  font-size: 12px;
  line-height: 1.55;
  color: rgba(244, 241, 230, 0.6);
  text-align: center;
}
.av-sso-hint svg { flex: none; margin-top: 1px; color: var(--accent); }
.av-sso-internal {
  margin: 18px 0 0;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(244, 241, 230, 0.38);
  text-align: center;
}
.av-sso-error {
  margin: 12px 2px 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: #F2C4B3;
  text-align: center;
}

/* ── Capture ──────────────────────────────────────── */
.av-capbody {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 4px 24px 0;
}
.av-shotchips { display: flex; gap: 8px; margin-bottom: 14px; }
.av-chip {
  flex: 1;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink3);
  transition: border-color 0.25s ease, color 0.25s ease;
}
.av-chip .dot {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: var(--surface2);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9.5px;
  color: var(--ink3);
}
.av-chip.on { border-color: var(--accent); color: var(--ink); box-shadow: 0 0 0 1px var(--accent); }
.av-chip.on .dot { background: var(--accent); border-color: var(--accent); color: #FFFFFF; }
.av-chip.done { color: var(--primary); border-color: color-mix(in srgb, var(--primary) 35%, transparent); }
.av-chip.done .dot { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }

.av-viewfinder {
  flex: 1;
  min-height: 220px;
  position: relative;
  border-radius: calc(var(--radius) + 10px);
  overflow: hidden;
  background: radial-gradient(130% 100% at 50% 0%, #1C2F26 0%, #0A1410 72%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07);
}
.av-vf-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Selfie convention: mirror the live view and the on-screen capture so
     they match what the employee sees. The stored image stays unmirrored,
     so only camera shots get the .mirrored flip, never file uploads. */
  transform: scaleX(-1);
}
.av-vf-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.av-vf-photo.mirrored { transform: scaleX(-1); }
.av-guide { position: absolute; inset: 6% 10%; width: 80%; height: 88%; z-index: 2; }
.av-guide path, .av-guide ellipse {
  fill: none;
  stroke: rgba(255, 255, 255, 0.62);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 0.5 12;
}
.av-guide .arrow { stroke: var(--accent); stroke-dasharray: none; stroke-width: 3.5; opacity: 0.9; }
.av-vfc { position: absolute; width: 22px; height: 22px; color: rgba(255, 255, 255, 0.45); z-index: 2; }
.av-vfc svg { display: block; }
.av-vfc.tl { top: 14px; left: 14px; }
.av-vfc.tr { top: 14px; right: 14px; transform: rotate(90deg); }
.av-vfc.br { bottom: 14px; right: 14px; transform: rotate(180deg); }
.av-vfc.bl { bottom: 14px; left: 14px; transform: rotate(270deg); }
.av-vf-hint {
  position: absolute;
  bottom: 16px;
  inset-inline: 16px;
  padding: 11px 14px;
  border-radius: 13px;
  background: rgba(7, 14, 11, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #F4F1E6;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.45;
  text-align: center;
  z-index: 3;
}
.av-count {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 104px;
  font-weight: 600;
  color: #FFFFFF;
  text-shadow: 0 8px 36px rgba(0, 0, 0, 0.5);
  z-index: 4;
}
@media (prefers-reduced-motion: no-preference) {
  .av-count { animation: avPop 0.65s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
}
@keyframes avPop {
  0% { transform: scale(1.45); }
  100% { transform: scale(1); }
}
.av-flash {
  position: absolute;
  inset: 0;
  background: #FFFFFF;
  z-index: 5;
  animation: avFlash 0.42s ease-out both;
}
@keyframes avFlash {
  0% { opacity: 0.95; }
  100% { opacity: 0; }
}

/* Camera error panel, shown inside the viewfinder */
.av-vf-error {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 6px;
  padding: 24px 28px;
  color: #F4F1E6;
}
.av-vf-error svg { color: var(--accent); margin-bottom: 8px; }
.av-vf-error strong { font-size: 15.5px; font-weight: 600; }
.av-vf-error p { margin: 0; font-size: 13px; line-height: 1.55; color: rgba(244, 241, 230, 0.72); max-width: 260px; }
.av-vf-error .actions { display: flex; gap: 10px; margin-top: 16px; }
.av-vf-error .actions button {
  height: 40px;
  padding: 0 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
}
.av-vf-error .retry { border: none; background: #F6F3E8; color: #0B3A2C; }
.av-vf-error .alt { border: 1px solid rgba(244, 241, 230, 0.4); background: transparent; color: #F4F1E6; }

.av-photorow {
  flex: none;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 12px 2px 0;
}
.av-photorow strong { font-size: 14px; font-weight: 600; }
.av-photorow span {
  font-size: 12px;
  color: var(--ink3);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  flex: none;
  margin-inline-start: 12px;
}

.av-shutterwrap { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.av-shutter {
  width: 74px;
  height: 74px;
  border-radius: 999px;
  border: 3px solid var(--primary);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.12s ease;
}
.av-shutter:active { transform: scale(0.92); }
.av-shutter:disabled { opacity: 0.45; cursor: default; }
.av-shutter span {
  width: 58px;
  height: 58px;
  border-radius: 999px;
  background: var(--primary);
  display: block;
}
.av-holdnote { margin: 0; font-size: 12.5px; color: var(--ink3); }
/* Fixed-height capture footer so the viewfinder never resizes between the
   live (shutter), countdown (shutter + note), and confirm (retake/use) states. */
.av-capture .av-footer {
  height: calc(env(safe-area-inset-bottom, 0px) + 137px);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}
.av-confirmrow { display: flex; gap: 10px; align-items: flex-start; }
.av-confirmrow .av-btn2 { flex: 1; }
.av-confirmrow .av-cta { flex: 1.4; width: auto; }
.av-vf-cap {
  position: absolute;
  top: 16px;
  inset-inline-start: 16px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(7, 14, 11, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #F4F1E6;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  z-index: 3;
}

/* ── Review ───────────────────────────────────────── */
.av-reviewgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.av-thumbcard { display: flex; flex-direction: column; gap: 7px; }
.av-thumbcard img {
  width: 100%;
  aspect-ratio: 3 / 3.9;
  object-fit: cover;
  border-radius: calc(var(--radius) - 2px);
  border: 1px solid var(--line);
  display: block;
  background: #0A1410;
}
.av-thumbcard img.mirrored { transform: scaleX(-1); }
.av-thumbcard .lbl { font-size: 12px; font-weight: 600; text-align: center; }
.av-retakebtn {
  border: none;
  background: transparent;
  color: var(--accent-deep);
  font-size: 12px;
  font-weight: 600;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

/* Upload overlay */
.av-upov {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--bg) 55%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: avFade 0.3s ease both;
}
@keyframes avFade { from { opacity: 0; } to { opacity: 1; } }
.av-upcard {
  width: 270px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 8px);
  padding: 26px 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  box-shadow: 0 24px 60px -20px rgba(10, 20, 15, 0.4);
  text-align: center;
}
.av-upcard strong { font-size: 14.5px; font-weight: 600; }
.av-upcard .body { margin: 0; font-size: 12.5px; line-height: 1.5; color: var(--ink2); }
.av-upbar { width: 100%; height: 5px; border-radius: 999px; background: var(--line); overflow: hidden; }
.av-upbar span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: var(--primary);
  transition: width 0.25s ease;
}
.av-upnote { display: flex; gap: 7px; align-items: center; font-size: 11.5px; color: var(--ink3); }
.av-upnote svg { color: var(--accent-deep); }

/* Spinner */
.av-spin {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 2.5px solid color-mix(in srgb, currentColor 25%, transparent);
  border-top-color: currentColor;
  flex: none;
}
@media (prefers-reduced-motion: no-preference) {
  .av-spin { animation: avSpin 0.8s linear infinite; }
}
@keyframes avSpin { to { transform: rotate(360deg); } }

/* ── Success ──────────────────────────────────────── */
.av-success-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 32px;
}
.av-checkring { margin-bottom: 26px; }
.av-checkring .ringbg { fill: color-mix(in srgb, var(--primary) 9%, transparent); }
.av-checkring .ring {
  fill: none;
  stroke: var(--accent);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 302;
  stroke-dashoffset: 0;
}
.av-checkring .tick {
  fill: none;
  stroke: var(--primary);
  stroke-width: 6;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 64;
  stroke-dashoffset: 0;
}
@media (prefers-reduced-motion: no-preference) {
  .av-checkring .ring { animation: avDraw 0.9s 0.15s cubic-bezier(0.4, 0, 0.2, 1) backwards; }
  .av-checkring .tick { animation: avDraw 0.45s 0.85s cubic-bezier(0.4, 0, 0.2, 1) backwards; }
}
@keyframes avDraw { from { stroke-dashoffset: 302; } }
.av-bellchip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 22px;
  padding: 11px 16px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 12.5px;
  font-weight: 600;
}
.av-bellchip svg { color: var(--accent-deep); flex: none; }
.av-success-hint { margin: 12px 0 0; font-size: 12px; color: var(--ink3); }
