:root {
  color-scheme: dark;
  --ink: #f7f4ec;
  --muted: #9aa7bd;
  --line: rgba(255, 255, 255, 0.1);
  --bg: #030811;
  --panel: rgba(12, 22, 36, 0.94);
  --brand: #eef3ff;
  --brand-2: #111c2c;
  --gold: #d8a242;
  --gold-dark: #9f6f1e;
  --gold-soft: rgba(216, 162, 66, 0.14);
  --soft-blue: rgba(255, 255, 255, 0.04);
  --danger: #b42318;
  --ok: #087443;
  --ok-soft: #e8f7ef;
  --paper: #0d1726;
  --shadow: 0 28px 70px rgba(0, 0, 0, 0.34);
  --soft-shadow: 0 18px 38px rgba(0, 0, 0, 0.2);
  --font-title: "Didot", "Bodoni 72", "Bodoni MT", "Times New Roman", serif;
  --font-body: "Manrope", "Segoe UI", "Arial", "Helvetica", sans-serif;
}

/* Premium capture screen v2 - EAC pre-class identity validation */
.panel.is-capturing {
  width: min(100%, 1500px);
  padding: 0;
  border-radius: 18px;
  border: 1px solid rgba(238, 197, 111, 0.28);
  background:
    linear-gradient(180deg, rgba(14, 25, 43, 0.94), rgba(4, 10, 19, 0.97)),
    rgba(8, 16, 28, 0.96);
  box-shadow: 0 36px 110px rgba(0, 0, 0, 0.52), inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.panel.is-capturing::before {
  height: 3px;
  background: linear-gradient(90deg, transparent, rgba(245, 200, 111, 0.82), transparent);
}

.panel.is-capturing .topbar {
  padding: 26px 32px;
  border-bottom: 1px solid rgba(245, 200, 111, 0.16);
  background: linear-gradient(180deg, rgba(9, 20, 38, 0.82), rgba(7, 14, 25, 0.22));
}

.panel.is-capturing .logo {
  width: 265px;
  filter: brightness(0) invert(1);
}

.panel.is-capturing .pill {
  min-height: 44px;
  padding: 10px 22px;
  border-color: rgba(229, 174, 76, 0.74);
  color: #f6c86c;
  background: rgba(13, 18, 25, 0.58);
  font-size: 14px;
  font-weight: 900;
}

.panel.is-capturing .step {
  margin: 0;
}

.panel.is-capturing .captureLayout {
  grid-template-columns: minmax(0, 1.45fr) minmax(420px, 0.92fr);
  gap: 22px;
  padding: 22px 32px 32px;
}

.panel.is-capturing .captureMedia {
  min-width: 0;
}

.panel.is-capturing .camera {
  min-height: clamp(500px, 62vh, 690px);
  aspect-ratio: 16 / 9.6;
  border-radius: 18px;
  border: 1px solid rgba(245, 200, 111, 0.45);
  background: radial-gradient(circle at 50% 45%, rgba(245, 200, 111, 0.08), transparent 33%), #050b16;
  box-shadow: 0 24px 58px rgba(0, 0, 0, 0.44), inset 0 0 0 8px rgba(255, 255, 255, 0.035);
}

.panel.is-capturing video,
.panel.is-capturing canvas {
  height: 100%;
  min-height: inherit;
  aspect-ratio: auto;
  border-radius: 16px;
  filter: saturate(0.96) contrast(1.03);
}

.panel.is-capturing .camera::before,
.panel.is-capturing .camera::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
}

.panel.is-capturing .camera::before {
  background:
    linear-gradient(90deg, transparent calc(50% - 0.5px), rgba(245, 200, 111, 0.24) 50%, transparent calc(50% + 0.5px)),
    linear-gradient(180deg, transparent calc(50% - 0.5px), rgba(245, 200, 111, 0.22) 50%, transparent calc(50% + 0.5px));
  opacity: 0.78;
}

.panel.is-capturing .camera::after {
  background: radial-gradient(circle at center, transparent 0 28%, rgba(4, 10, 18, 0.16) 59%, rgba(4, 10, 18, 0.34) 100%);
}

.cameraStatus {
  position: absolute;
  z-index: 6;
  top: 30px;
  left: 30px;
  display: grid;
  grid-template-columns: 10px auto;
  column-gap: 12px;
  row-gap: 2px;
  align-items: center;
  padding: 13px 17px;
  min-width: 150px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 10px;
  background: rgba(12, 18, 27, 0.58);
  backdrop-filter: blur(14px);
}

.cameraStatus span {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #f6c86c;
  box-shadow: 0 0 16px rgba(246, 200, 108, 0.78);
}

.cameraStatus strong {
  color: #ffffff;
  font-size: 13px;
  line-height: 1;
  text-transform: uppercase;
}

.cameraStatus small {
  grid-column: 2;
  color: rgba(238, 243, 255, 0.78);
  font-size: 12px;
}

.panel.is-capturing .faceGuide {
  position: absolute;
  z-index: 4;
  width: min(43%, 360px);
  height: min(72%, 520px);
  border: 4px solid rgba(245, 218, 159, 0.92);
  border-radius: 50%;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.38),
    0 0 0 24px rgba(245, 200, 111, 0.08),
    0 0 58px rgba(245, 200, 111, 0.3);
}

.panel.is-capturing .faceGuide::after {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  transform: translate(-50%, -50%);
  color: rgba(246, 200, 108, 0);
  font-family: var(--font-body);
  font-size: clamp(54px, 8vw, 96px);
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 0 0 rgba(246, 200, 108, 0);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease, color 180ms ease;
}

.panel.is-capturing .camera.pose-left .faceGuide::after {
  content: "\2192";
  color: rgba(246, 200, 108, 0.92);
  text-shadow: 0 0 24px rgba(246, 200, 108, 0.5);
  transform: translate(-42%, -50%);
}

.panel.is-capturing .camera.pose-right .faceGuide::after {
  content: "\2190";
  color: rgba(246, 200, 108, 0.92);
  text-shadow: 0 0 24px rgba(246, 200, 108, 0.5);
  transform: translate(-58%, -50%);
}

.cameraReticle {
  position: absolute;
  z-index: 5;
  left: 50%;
  top: 50%;
  width: min(60%, 520px);
  height: min(60%, 520px);
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1px dotted rgba(245, 200, 111, 0.36);
  pointer-events: none;
}

.cameraCorners {
  position: absolute;
  z-index: 6;
  inset: 32px;
  pointer-events: none;
  background:
    linear-gradient(#f5c86f, #f5c86f) left top / 72px 1px no-repeat,
    linear-gradient(#f5c86f, #f5c86f) left top / 1px 72px no-repeat,
    linear-gradient(#f5c86f, #f5c86f) right top / 72px 1px no-repeat,
    linear-gradient(#f5c86f, #f5c86f) right top / 1px 72px no-repeat,
    linear-gradient(#f5c86f, #f5c86f) left bottom / 72px 1px no-repeat,
    linear-gradient(#f5c86f, #f5c86f) left bottom / 1px 72px no-repeat,
    linear-gradient(#f5c86f, #f5c86f) right bottom / 72px 1px no-repeat,
    linear-gradient(#f5c86f, #f5c86f) right bottom / 1px 72px no-repeat;
  opacity: 0.92;
}

.cameraInstruction {
  position: absolute;
  z-index: 7;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  width: min(76%, 650px);
  padding: 18px 22px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(22, 32, 48, 0.78), rgba(14, 20, 31, 0.68));
  color: #f8f4ec;
  text-align: center;
  font-size: 17px;
  font-weight: 700;
  backdrop-filter: blur(18px);
}

.cameraInstruction span::before {
  content: "\25C7";
  margin-right: 12px;
  color: #f6c86c;
}

.panel.is-capturing .capturePanel {
  padding: 28px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  background:
    radial-gradient(circle at 50% 0%, rgba(36, 92, 136, 0.16), transparent 42%),
    linear-gradient(180deg, rgba(10, 23, 43, 0.94), rgba(4, 10, 19, 0.96));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 22px 44px rgba(0, 0, 0, 0.24);
}

.panel.is-capturing .cameraHeader {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 18px;
  align-items: start;
  margin: 0;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(245, 200, 111, 0.34);
}

.cameraHeaderIcon {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 1px solid rgba(245, 200, 111, 0.82);
  background:
    radial-gradient(circle at center, transparent 0 34%, rgba(245, 200, 111, 0.18) 35% 38%, transparent 39%),
    linear-gradient(180deg, rgba(245, 200, 111, 0.13), rgba(255, 255, 255, 0.02));
}

.cameraHeaderIcon::before {
  content: "◎";
  display: grid;
  place-items: center;
  height: 100%;
  color: #f6c86c;
  font-size: 27px;
}

.panel.is-capturing .cameraHeader strong {
  color: #ffffff;
  font-family: var(--font-body);
  font-size: clamp(23px, 1.7vw, 30px);
  font-weight: 900;
  line-height: 1.08;
}

.panel.is-capturing .cameraHeader span {
  display: block;
  margin-top: 8px;
  color: #f4c66d;
  font-size: 16px;
  font-weight: 800;
}

#poseIntro {
  margin: 18px 0 0;
  color: #c7d2e6;
  font-size: 15px;
  line-height: 1.55;
}

.panel.is-capturing .livenessProgress {
  position: relative;
  display: grid;
  gap: 12px;
  margin: 24px 0 16px;
}

.panel.is-capturing .livenessProgress::before {
  content: "";
  position: absolute;
  left: 29px;
  top: 34px;
  bottom: 34px;
  width: 1px;
  background: linear-gradient(180deg, rgba(245, 200, 111, 0.78), rgba(255, 255, 255, 0.18));
}

.panel.is-capturing .livenessProgress button {
  position: relative;
  display: grid;
  grid-template-columns: 58px 1fr auto;
  column-gap: 16px;
  align-items: center;
  min-height: 72px;
  width: 100%;
  padding: 12px 16px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(19, 34, 55, 0.82), rgba(8, 17, 31, 0.9));
  color: #eef3ff;
  text-align: left;
  cursor: pointer;
}

.panel.is-capturing .livenessProgress button span {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 50%;
  background: #07111f;
  color: #ffffff;
  font-weight: 900;
}

.panel.is-capturing .livenessProgress button strong {
  display: block;
  color: #ffffff;
  font-size: 16px;
  font-weight: 900;
}

.panel.is-capturing .livenessProgress button small {
  display: block;
  margin-top: 3px;
  color: #aeb8cc;
  font-size: 13px;
  font-weight: 600;
}

.panel.is-capturing .livenessProgress button em {
  justify-self: end;
  padding: 8px 13px;
  border-radius: 999px;
  color: #aeb8cc;
  background: rgba(255, 255, 255, 0.04);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
  text-transform: uppercase;
}

.panel.is-capturing .livenessProgress button.is-active {
  border-color: rgba(245, 200, 111, 0.78);
  background: linear-gradient(180deg, rgba(245, 200, 111, 0.16), rgba(11, 20, 35, 0.94));
  box-shadow: 0 0 0 1px rgba(245, 200, 111, 0.16), 0 16px 38px rgba(0, 0, 0, 0.22);
}

.panel.is-capturing .livenessProgress button.is-active span,
.panel.is-capturing .livenessProgress button.is-done span {
  border-color: rgba(245, 200, 111, 0.9);
  color: #f6c86c;
}

.panel.is-capturing .livenessProgress button.is-active em {
  color: #f6c86c;
  border: 1px solid rgba(245, 200, 111, 0.25);
  background: rgba(245, 200, 111, 0.12);
}

.panel.is-capturing .livenessProgress button.is-done {
  border-color: rgba(71, 218, 125, 0.24);
}

.panel.is-capturing .livenessProgress button.is-done em {
  color: #47da7d;
}

.panel.is-capturing .quality {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin: 18px 0 22px;
  border: 1px solid rgba(245, 200, 111, 0.42);
  border-radius: 12px;
  overflow: hidden;
  background: rgba(7, 13, 23, 0.58);
}

.panel.is-capturing .qualityToken {
  min-height: 72px;
  padding: 14px 12px;
  border: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0;
  background: transparent;
  text-align: center;
}

.panel.is-capturing .qualityToken:last-child {
  border-right: 0;
}

.qualityToken span {
  display: block;
  width: 10px;
  height: 10px;
  margin: 0 auto 8px;
  border-radius: 50%;
}

.qualityToken.ok span {
  background: #47da7d;
  box-shadow: 0 0 14px rgba(71, 218, 125, 0.56);
}

.qualityToken.bad span {
  background: #ff6a5f;
  box-shadow: 0 0 14px rgba(255, 106, 95, 0.46);
}

.qualityToken strong {
  display: block;
  color: #eef3ff;
  font-size: 12px;
  line-height: 1.18;
}

.qualityToken small {
  display: block;
  margin-top: 7px;
  color: #47da7d;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.qualityToken.bad small {
  color: #ff8f86;
}

.qualityAlert {
  grid-column: 1 / -1;
  padding: 15px 17px;
  border: 1px solid rgba(255, 106, 95, 0.45);
  border-radius: 12px;
  color: #ffaaa2;
  background: rgba(126, 24, 24, 0.2);
  font-weight: 900;
}

.panel.is-capturing .capturePanel .primary {
  min-height: 76px;
  border-radius: 12px;
  border: 1px solid rgba(255, 224, 159, 0.62);
  background: linear-gradient(180deg, #d9aa4c, #a97725);
  color: #ffffff;
  font-size: clamp(19px, 1.6vw, 27px);
  font-weight: 900;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
  box-shadow: 0 20px 45px rgba(161, 111, 33, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.34);
}

.panel.is-capturing .capturePanel .primary::before {
  content: "▣";
  margin-right: 12px;
  font-size: 21px;
}

.panel.is-capturing .capturePanel .primary::after {
  content: " →";
  margin-left: 12px;
}

.panel.is-capturing .poseMessage {
  margin: 16px 0 0;
  border-color: rgba(255, 106, 95, 0.44);
  color: #ffaaa2;
  background: rgba(126, 24, 24, 0.2);
}

.panel.is-capturing .supportBlock {
  margin: 16px 0 20px;
  border-color: rgba(245, 200, 111, 0.44);
  background: rgba(245, 200, 111, 0.09);
}

@media (max-width: 1120px) {
  .panel.is-capturing {
    width: min(100%, 760px);
  }

  .panel.is-capturing .captureLayout {
    grid-template-columns: 1fr;
    padding: 18px;
  }

  .panel.is-capturing .camera {
    min-height: clamp(410px, 58vh, 560px);
  }

  .panel.is-capturing .capturePanel {
    padding: 20px;
  }
}

@media (max-width: 640px) {
  .shell {
    display: block;
    padding: 0;
  }

  .panel.is-capturing {
    min-height: 100vh;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
  }

  .panel.is-capturing .topbar {
    padding: 18px 18px 14px;
  }

  .panel.is-capturing .logo {
    width: 190px;
    max-width: 68%;
  }

  .panel.is-capturing .pill {
    min-height: 34px;
    padding: 7px 10px;
    font-size: 10px;
  }

  .panel.is-capturing .captureLayout {
    padding: 14px;
    gap: 14px;
  }

  .panel.is-capturing .camera {
    min-height: min(64vh, 520px);
    aspect-ratio: 4 / 5;
    border-radius: 16px;
  }

  .panel.is-capturing video,
  .panel.is-capturing canvas {
    border-radius: 15px;
  }

  .cameraStatus {
    top: 16px;
    left: 16px;
    min-width: 118px;
    padding: 10px 12px;
  }

  .cameraStatus strong {
    font-size: 11px;
  }

  .cameraStatus small {
    font-size: 10px;
  }

  .panel.is-capturing .faceGuide {
    width: 64%;
    height: 64%;
  }

  .cameraReticle {
    width: 82%;
    height: 62%;
  }

  .cameraCorners {
    inset: 18px;
  }

  .cameraInstruction {
    bottom: 16px;
    width: calc(100% - 34px);
    padding: 13px 12px;
    font-size: 13px;
  }

  .panel.is-capturing .capturePanel {
    padding: 18px;
    border-radius: 16px;
  }

  .panel.is-capturing .cameraHeader {
    grid-template-columns: 44px 1fr;
    gap: 13px;
    padding-bottom: 18px;
  }

  .cameraHeaderIcon {
    width: 44px;
    height: 44px;
  }

  .panel.is-capturing .cameraHeader strong {
    font-size: 22px;
  }

  .panel.is-capturing .cameraHeader span {
    font-size: 14px;
  }

  #poseIntro {
    margin-top: 12px;
    font-size: 13px;
  }

  .panel.is-capturing .livenessProgress {
    gap: 9px;
    margin-top: 16px;
  }

  .panel.is-capturing .livenessProgress::before {
    display: none;
  }

  .panel.is-capturing .livenessProgress button {
    grid-template-columns: 42px 1fr;
    min-height: 64px;
    padding: 11px 12px;
  }

  .panel.is-capturing .livenessProgress button span {
    width: 34px;
    height: 34px;
  }

  .panel.is-capturing .livenessProgress button em {
    grid-column: 2;
    justify-self: start;
    margin-top: 8px;
    padding: 5px 9px;
  }

  .panel.is-capturing .quality {
    grid-template-columns: repeat(2, 1fr);
  }

  .panel.is-capturing .qualityToken:nth-child(2) {
    border-right: 0;
  }

  .panel.is-capturing .qualityToken:nth-child(-n + 2) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .panel.is-capturing .capturePanel .primary {
    min-height: 62px;
    font-size: 18px;
  }
}

.supportBlock {
  margin: 16px 0;
  padding: 16px;
  border: 1px solid rgba(216, 162, 66, 0.42);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(216, 162, 66, 0.12), rgba(216, 162, 66, 0.05));
}

.supportBlock strong {
  display: block;
  color: #f5c86f;
  margin-bottom: 7px;
  font-weight: 900;
}

.supportBlock p {
  margin: 0;
  color: #d7deea;
  line-height: 1.45;
}

.supportActions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 13px;
}

.supportStatus {
  margin-top: 12px !important;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #f5c86f !important;
  font-weight: 800;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    linear-gradient(135deg, rgba(3, 8, 17, 0.08), rgba(2, 6, 12, 0.18)),
    url("/facial-bg.png") center / cover fixed no-repeat,
    #030811;
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

.shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  position: relative;
}

.shell::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(3, 8, 17, 0.08);
  opacity: 1;
  pointer-events: none;
}

.shell::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(216, 162, 66, 0.04), transparent 36%, rgba(0, 0, 0, 0.22));
  pointer-events: none;
}

.panel {
  position: relative;
  z-index: 1;
  width: min(100%, 620px);
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(18, 31, 49, 0.94), rgba(7, 14, 25, 0.96)),
    var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 28px;
  box-shadow: var(--shadow);
}

.panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: linear-gradient(90deg, rgba(238, 243, 255, 0.18), var(--gold), rgba(238, 243, 255, 0.18));
}

.panel::after {
  content: "";
  position: absolute;
  inset: 5px 0 auto;
  height: 88px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0));
  pointer-events: none;
}

.panel.is-capturing {
  width: min(100%, 980px);
  padding: 22px;
}

.panel.is-flow-step .intro,
.panel.is-flow-step .statusGrid {
  display: none;
}

.panel.is-flow-step .topbar {
  padding-bottom: 14px;
}

.topbar {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.logo {
  width: 210px;
  max-width: 60%;
  height: auto;
  filter: brightness(0) invert(1);
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 8px 12px;
  border: 1px solid rgba(199, 154, 59, 0.55);
  border-radius: 999px;
  color: #f5c86f;
  background: rgba(216, 162, 66, 0.08);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: 0 8px 22px rgba(111, 86, 30, 0.08);
}

.intro {
  position: relative;
  z-index: 1;
  padding-top: 24px;
}

.eyebrow {
  color: #e7ac45;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  margin: 8px 0 12px;
  color: var(--brand);
  font-family: var(--font-title);
  font-size: 36px;
  line-height: 1.1;
  letter-spacing: 0;
}

.lead {
  margin: 0;
  max-width: 720px;
  color: #d7deea;
  font-size: 16px;
  line-height: 1.45;
}

.muted {
  color: var(--muted);
}

.student {
  display: inline-flex;
  margin: 18px 0 0;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: var(--brand);
  background: rgba(255, 255, 255, 0.04);
  font-weight: 700;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.18);
}

.statusGrid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 22px;
}

.statusGrid div {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 50px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(18, 31, 49, 0.86), rgba(8, 16, 28, 0.86));
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.16);
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.statusGrid strong {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border-radius: 50%;
  color: white;
  background: #17254a;
  font-size: 14px;
  transition: background 0.2s ease;
}

.statusGrid span {
  color: var(--brand);
  font-size: 13px;
  font-weight: 700;
}

.statusGrid div.is-active {
  border-color: rgba(216, 162, 66, 0.64);
  background: linear-gradient(180deg, rgba(216, 162, 66, 0.18), rgba(216, 162, 66, 0.08));
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(120, 85, 14, 0.12);
}

.statusGrid div.is-active strong {
  background: var(--gold);
}

.statusGrid div.is-done {
  border-color: rgba(8, 116, 67, 0.32);
  background: linear-gradient(180deg, rgba(8, 116, 67, 0.16), rgba(8, 116, 67, 0.07));
}

.statusGrid div.is-done strong {
  background: var(--ok);
}

.hidden {
  display: none;
}

.step.hidden {
  display: none !important;
}

.step {
  position: relative;
  z-index: 1;
  margin-top: 22px;
}

.mobileQr {
  display: grid;
  grid-template-columns: 1fr 132px;
  gap: 16px;
  align-items: center;
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(18, 31, 49, 0.92), rgba(8, 16, 28, 0.92)),
    var(--paper);
  box-shadow: var(--soft-shadow);
}

.mobileQr.hidden {
  display: none;
}

.qrCopy strong {
  color: var(--brand);
  font-size: 17px;
}

.qrCopy p {
  margin: 7px 0 12px;
  color: #d7deea;
  line-height: 1.4;
}

.linkButton {
  width: auto;
  min-height: 44px;
  padding: 12px 16px;
  color: #fff8e8;
  background: linear-gradient(180deg, #d6ad4c, var(--gold-dark));
  box-shadow: 0 14px 26px rgba(154, 109, 24, 0.22);
  font-size: 14px;
}

.qrFrame {
  display: grid;
  place-items: center;
  width: 132px;
  height: 132px;
  border: 1px solid rgba(216, 162, 66, 0.26);
  border-radius: 8px;
  background: white;
  box-shadow: inset 0 0 0 8px #f8faff, 0 14px 26px rgba(0, 0, 0, 0.22);
}

.qrFrame img {
  display: block;
  width: 112px;
  height: 112px;
}

.notice {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 16px;
  background: linear-gradient(180deg, rgba(18, 31, 49, 0.92), rgba(8, 16, 28, 0.92));
  box-shadow: var(--soft-shadow);
}

.notice strong {
  display: block;
  margin-bottom: 6px;
  color: var(--brand);
  font-size: 16px;
}

.notice p {
  margin-bottom: 0;
  color: #d7deea;
  line-height: 1.45;
}

.check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 18px 0;
  line-height: 1.35;
}

.check input {
  width: 20px;
  height: 20px;
  accent-color: var(--gold);
}

button {
  width: 100%;
  border: 0;
  border-radius: 8px;
  min-height: 48px;
  padding: 14px 16px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.15;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.primary {
  background: linear-gradient(180deg, #d6ad4c, var(--gold-dark));
  color: #fff8e8;
  box-shadow: 0 14px 26px rgba(154, 109, 24, 0.28);
}

.primary:hover:not(:disabled) {
  background: linear-gradient(180deg, #e1bb58, #9d701f);
  transform: translateY(-1px);
  box-shadow: 0 18px 32px rgba(154, 109, 24, 0.32);
}

.secondary {
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(180deg, rgba(22, 34, 54, 0.95), rgba(12, 22, 36, 0.95));
  color: var(--brand);
  box-shadow: 0 14px 26px rgba(0, 0, 0, 0.18);
}

.secondary:hover:not(:disabled),
.linkButton:hover:not(:disabled) {
  transform: translateY(-1px);
}

.cameraHeader {
  display: grid;
  gap: 12px;
  margin-bottom: 12px;
  padding: 2px 0;
}

.cameraHeader strong {
  color: var(--brand);
  font-size: 18px;
}

.cameraHeader span {
  color: var(--muted);
  font-size: 13px;
  text-align: left;
}

.captureLayout {
  display: grid;
  grid-template-columns: minmax(420px, 1.35fr) minmax(300px, 0.65fr);
  gap: 18px;
  align-items: stretch;
}

.captureMedia,
.capturePanel {
  min-width: 0;
}

.capturePanel {
  display: flex;
  flex-direction: column;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(18, 31, 49, 0.92), rgba(8, 16, 28, 0.92));
  box-shadow: var(--soft-shadow);
}

.livenessProgress {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 12px;
}

.mobileLivenessProgress {
  display: none;
}

.poseMessage {
  margin-top: 12px;
  padding: 11px 12px;
  border: 1px solid rgba(255, 114, 103, 0.42);
  border-radius: 8px;
  color: #ffb4a8;
  background: rgba(180, 35, 24, 0.16);
  font-size: 14px;
  line-height: 1.35;
  box-shadow: 0 8px 18px rgba(180, 35, 24, 0.06);
}

.poseMessage.hidden {
  display: none;
}

.livenessProgress div {
  min-height: 38px;
  padding: 9px 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: var(--brand);
  background: rgba(255, 255, 255, 0.04);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.livenessProgress div.is-active {
  border-color: rgba(199, 154, 59, 0.7);
  background: linear-gradient(180deg, rgba(216, 162, 66, 0.18), rgba(216, 162, 66, 0.08));
}

.livenessProgress div.is-done {
  border-color: rgba(8, 116, 67, 0.32);
  color: var(--ok);
  background: rgba(8, 116, 67, 0.14);
}

.camera {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 8px;
  background: #0f1738;
  border: 4px solid #111c2c;
  box-shadow: 0 18px 42px rgba(4, 10, 34, 0.32);
}

video,
canvas {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 8px;
  background: #0f1738;
}

.hiddenCanvas {
  display: none;
}

.previewGrid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.previewItem {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(18, 31, 49, 0.92), rgba(8, 16, 28, 0.92));
  box-shadow: var(--soft-shadow);
}

.previewItem img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: #0f1738;
}

.previewItem span {
  display: block;
  padding: 9px 8px;
  color: var(--brand);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.previewItem small {
  display: block;
  padding: 0 8px 10px;
  color: var(--ok);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.faceGuide {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 36%;
  height: 78%;
  transform: translate(-50%, -50%);
  border: 3px solid rgba(255, 255, 255, 0.92);
  border-radius: 50%;
  box-shadow: 0 0 0 999px rgba(6, 12, 33, 0.3), 0 0 0 6px rgba(199, 154, 59, 0.22), 0 0 36px rgba(255, 255, 255, 0.16);
}

.quality {
  display: grid;
  gap: 8px;
  margin: 14px 0;
}

.capturePanel .quality {
  flex: 1;
}

.quality div {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
  background: rgba(255, 255, 255, 0.04);
}

.quality .ok {
  border-color: rgba(8, 116, 67, 0.25);
  color: var(--ok);
  background: rgba(8, 116, 67, 0.12);
}

.quality .bad {
  border-color: rgba(180, 35, 24, 0.25);
  color: var(--danger);
  background: rgba(180, 35, 24, 0.12);
}

.quality .bad::first-letter {
  text-transform: uppercase;
}

.quality .pending {
  border-color: rgba(199, 154, 59, 0.32);
  color: var(--gold-dark);
  background: rgba(216, 162, 66, 0.12);
}

.actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 14px;
}

.success {
  border-radius: 8px;
  padding: 18px;
  color: var(--ok);
  background: rgba(8, 116, 67, 0.12);
  font-weight: 700;
}

.thanks {
  text-align: center;
  max-width: 680px;
  margin: 0 auto;
  padding: 34px 0 8px;
}

.checkmark {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  margin: 0 auto 18px;
  border-radius: 50%;
  color: white;
  background: linear-gradient(135deg, var(--ok), #0aa35f);
  box-shadow: 0 18px 34px rgba(8, 116, 67, 0.26);
  font-size: 38px;
  font-weight: 800;
}

.successText {
  color: var(--ok);
}

h2 {
  margin: 8px 0 10px;
  color: var(--brand);
  font-family: var(--font-title);
  font-size: 30px;
  line-height: 1.1;
  letter-spacing: 0;
}

.thanks p {
  margin: 0 auto;
  max-width: 460px;
  color: #d7deea;
  font-size: 16px;
  line-height: 1.55;
}

.closePage {
  margin-top: 22px;
}

.closeNote {
  margin-top: 12px !important;
  color: #d7deea;
  font-size: 14px !important;
  line-height: 1.4 !important;
}

.closeHelp {
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
}

.closeHelp.hidden {
  display: none;
}

@media (max-width: 480px) {
  .shell {
    padding: 12px;
  }

  .panel {
    padding: 18px;
  }

  .panel.is-capturing {
    width: min(100%, 620px);
    padding: 18px;
  }

  .panel.is-flow-step .topbar {
    padding-bottom: 22px;
  }

  .topbar {
    align-items: center;
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }

  .logo {
    max-width: 82%;
    margin: 0 auto;
  }

  .pill {
    align-self: center;
    justify-content: center;
  }

  .intro {
    text-align: center;
  }

  .lead {
    margin-right: auto;
    margin-left: auto;
  }

  h1 {
    font-size: 28px;
  }

  h2 {
    font-size: 26px;
  }

  .lead {
    font-size: 15px;
  }

  .statusGrid {
    grid-template-columns: 1fr;
  }

  .captureLayout {
    grid-template-columns: 1fr;
  }

  .camera,
  video,
  canvas {
    aspect-ratio: 1 / 1;
  }

  .mobileLivenessProgress {
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 10px;
    z-index: 3;
    display: grid;
    pointer-events: none;
  }

  .mobileLivenessProgress div {
    min-height: 34px;
    padding: 8px 10px;
    border: 1px solid rgba(255, 255, 255, 0.48);
    border-radius: 8px;
    color: white;
    background: rgba(12, 19, 48, 0.78);
    box-shadow: 0 10px 22px rgba(4, 10, 34, 0.2);
    backdrop-filter: blur(8px);
    font-size: 13px;
    font-weight: 800;
    text-align: center;
  }

  .mobileLivenessProgress div.is-active {
    border-color: rgba(230, 191, 92, 0.92);
    color: #17203f;
    background: linear-gradient(180deg, rgba(255, 250, 240, 0.96), rgba(251, 244, 226, 0.96));
  }

  .mobileLivenessProgress div.is-done {
    border-color: rgba(27, 185, 112, 0.8);
    color: white;
    background: linear-gradient(180deg, rgba(10, 163, 95, 0.95), rgba(8, 116, 67, 0.95));
  }

  .faceGuide {
    width: 62%;
    height: 76%;
  }

  .livenessProgress {
    display: none;
  }

  .quality {
    display: none;
  }

  .poseMessage {
    order: 4;
    margin: 12px 0 14px;
    padding: 13px 14px;
    font-size: 14px;
    font-weight: 700;
  }

  .panel.is-capturing .capturePanel .primary {
    order: 1;
    margin: 0 0 12px;
  }

  .panel.is-capturing .capturePanel .cameraHeader {
    order: 2;
  }

  .panel.is-capturing .capturePanel .poseMessage {
    order: 3;
  }

  .panel.is-capturing .capturePanel .livenessProgress,
  .panel.is-capturing .capturePanel .quality {
    order: 4;
  }

  .mobileQr {
    display: none !important;
  }

  .qrFrame {
    display: none;
  }

  .linkButton {
    width: 100%;
  }

  .cameraHeader {
    align-items: flex-start;
    flex-direction: column;
  }

  .cameraHeader span {
    text-align: left;
  }

  .livenessProgress,
  .previewGrid {
    grid-template-columns: 1fr;
  }

  .actions {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 700px) {
  .shell {
    min-height: 100vh;
    align-items: center;
    padding: 14px;
  }

  .panel {
    width: min(100%, 980px);
    padding: 20px 28px;
  }

  .topbar {
    padding-bottom: 12px;
  }

  .logo {
    width: 190px;
  }

  .intro {
    padding-top: 16px;
  }

  h1 {
    margin: 6px 0 8px;
    font-size: 34px;
  }

  .lead {
    max-width: 760px;
    font-size: 16px;
  }

  .student {
    margin-top: 12px;
  }

  .statusGrid {
    margin-top: 16px;
  }

  #consentStep:not(.hidden) {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    align-items: stretch;
    margin-top: 16px;
  }

  #consentStep .mobileQr,
  #consentStep .notice {
    margin: 0;
    min-height: 164px;
  }

  #consentStep .mobileQr {
    grid-template-columns: 1fr 118px;
    gap: 12px;
    padding: 14px;
  }

  #consentStep .qrFrame {
    width: 118px;
    height: 118px;
  }

  #consentStep .qrFrame img {
    width: 100px;
    height: 100px;
  }

  #consentStep .notice {
    padding: 14px;
  }

  #consentStep .notice p,
  #consentStep .qrCopy p {
    font-size: 14px;
    line-height: 1.35;
  }

  #consentStep .check {
    grid-column: 1 / 2;
    margin: 0;
    align-self: center;
  }

  #consentStep #startBtn {
    grid-column: 2 / 3;
    align-self: center;
  }

  .panel.is-capturing {
    width: min(100%, 1050px);
    padding: 14px 20px;
  }

  .panel.is-capturing .topbar {
    padding-bottom: 10px;
  }

  .panel.is-capturing .step {
    margin-top: 14px;
  }

  .panel.is-capturing .captureLayout {
    gap: 14px;
    grid-template-columns: minmax(420px, 1.25fr) minmax(300px, 0.75fr);
  }

  .panel.is-capturing .capturePanel {
    padding: 14px;
  }

  .panel.is-capturing .cameraHeader {
    gap: 6px;
    margin-bottom: 8px;
  }

  .panel.is-capturing .camera,
  .panel.is-capturing video,
  .panel.is-capturing canvas {
    aspect-ratio: 16 / 8.4;
  }

  .panel.is-capturing .livenessProgress {
    gap: 7px;
    margin-top: 8px;
  }

  .panel.is-capturing .quality {
    gap: 7px;
    margin: 10px 0;
  }

  .panel.is-capturing .quality div,
  .panel.is-capturing .livenessProgress div {
    padding: 8px 10px;
  }

  .panel.is-capturing button {
    padding: 12px 14px;
  }
}

/* Final cascade lock for the premium capture layout. */
.panel.is-capturing {
  width: min(100%, 1500px) !important;
  padding: 0 !important;
  border-radius: 18px;
}

.panel.is-capturing .topbar {
  padding: 26px 32px !important;
}

.panel.is-capturing .step {
  margin: 0 !important;
}

.panel.is-capturing .captureLayout {
  grid-template-columns: minmax(0, 1.45fr) minmax(420px, 0.92fr) !important;
  gap: 22px !important;
  padding: 22px 32px 32px !important;
}

.panel.is-capturing .camera,
.panel.is-capturing video,
.panel.is-capturing canvas {
  aspect-ratio: auto !important;
}

.panel.is-capturing .camera {
  min-height: clamp(500px, 62vh, 690px) !important;
}

.panel.is-capturing .capturePanel {
  padding: 28px !important;
}

.panel.is-capturing .livenessProgress {
  gap: 12px !important;
  margin: 24px 0 16px !important;
}

.panel.is-capturing .livenessProgress div {
  display: none !important;
}

.panel.is-capturing .quality {
  gap: 0 !important;
  margin: 18px 0 22px !important;
}

.panel.is-capturing .quality div {
  padding: 14px 12px !important;
}

@media (max-width: 1120px) {
  .panel.is-capturing {
    width: min(100%, 760px) !important;
  }

  .panel.is-capturing .captureLayout {
    grid-template-columns: 1fr !important;
    padding: 18px !important;
  }

  .panel.is-capturing .camera {
    min-height: clamp(410px, 58vh, 560px) !important;
  }
}

@media (max-width: 640px) {
  .panel.is-capturing {
    width: 100% !important;
    min-height: 100vh;
    border-radius: 0;
  }

  .panel.is-capturing .topbar {
    padding: 18px 18px 14px !important;
  }

  .panel.is-capturing .captureLayout {
    padding: 14px !important;
    gap: 14px !important;
  }

  .panel.is-capturing .camera {
    min-height: min(64vh, 520px) !important;
    aspect-ratio: 4 / 5 !important;
  }

  .panel.is-capturing .capturePanel {
    padding: 18px !important;
  }

  .panel.is-capturing .quality {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

/* Premium review screen v2 */
.panel.is-capturing .cameraHeader > .cameraHeaderIcon {
  grid-column: 1;
  grid-row: 1 / span 3;
}

.panel.is-capturing .cameraHeader > strong,
.panel.is-capturing .cameraHeader > span,
.panel.is-capturing .cameraHeader > p {
  grid-column: 2;
}

.panel.is-reviewing {
  width: min(100%, 1380px);
  padding: 0;
  border-radius: 18px;
  border: 1px solid rgba(238, 197, 111, 0.24);
  background:
    radial-gradient(circle at 50% 0%, rgba(30, 70, 112, 0.18), transparent 34%),
    linear-gradient(180deg, rgba(13, 24, 42, 0.96), rgba(4, 10, 19, 0.98));
}

.panel.is-reviewing .topbar {
  padding: 26px 32px;
  border-bottom: 1px solid rgba(245, 200, 111, 0.16);
}

.panel.is-reviewing .logo {
  width: 265px;
}

.panel.is-reviewing .pill {
  min-height: 44px;
  padding: 10px 22px;
  border-color: rgba(229, 174, 76, 0.74);
  color: #f6c86c;
  background: rgba(13, 18, 25, 0.58);
  font-size: 14px;
  font-weight: 900;
}

.panel.is-reviewing #reviewStep {
  padding: 34px 40px 36px;
  margin: 0;
}

.panel.is-reviewing #reviewStep > .cameraHeader {
  display: grid;
  grid-template-columns: 1fr minmax(340px, 410px);
  gap: 20px;
  align-items: end;
  margin: 0 0 28px;
  padding: 0;
  border: 0;
}

.panel.is-reviewing #reviewStep > .cameraHeader::before {
  content: "REVISÃO";
  grid-column: 1 / -1;
  color: #f6c86c;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.32em;
}

.panel.is-reviewing #reviewStep > .cameraHeader strong {
  color: #ffffff;
  font-family: var(--font-body);
  font-size: clamp(34px, 3.2vw, 50px);
  font-weight: 900;
  line-height: 1.05;
}

.panel.is-reviewing #reviewStep > .cameraHeader span {
  grid-column: 1;
  max-width: 650px;
  color: #c7d2e6;
  font-size: 18px;
  line-height: 1.45;
}

.reviewNotice {
  margin: -112px 0 74px auto;
  width: min(410px, 36%);
  min-height: 96px;
  display: flex;
  align-items: center;
  padding: 22px 24px 22px 78px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(18, 31, 51, 0.84), rgba(8, 16, 28, 0.88));
  color: #dbe4f4;
  font-size: 15px;
  line-height: 1.4;
  position: relative;
}

.reviewNotice::before {
  content: "◇";
  position: absolute;
  left: 28px;
  top: 50%;
  transform: translateY(-50%);
  color: #f6c86c;
  font-size: 34px;
}

.panel.is-reviewing .previewGrid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}

.reviewCard {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(15, 30, 52, 0.92), rgba(6, 13, 24, 0.96));
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.28);
}

.reviewImageWrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: #050b16;
}

.reviewImageWrap img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.reviewSharp {
  position: absolute;
  top: 16px;
  left: 16px;
  padding: 8px 13px;
  border: 1px solid rgba(71, 218, 125, 0.38);
  border-radius: 999px;
  color: #77eba0;
  background: rgba(9, 76, 45, 0.55);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.reviewZoom {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  color: #ffffff;
  background: rgba(8, 13, 22, 0.62);
}

.reviewCardBody {
  padding: 18px 18px 16px;
}

.reviewCardTitle {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 14px;
  align-items: center;
  margin-bottom: 18px;
}

.reviewCardTitle > span {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 2px solid rgba(246, 200, 108, 0.86);
  border-radius: 50%;
  color: #ffffff;
  font-size: 22px;
  font-weight: 900;
  box-shadow: 0 0 18px rgba(246, 200, 108, 0.24);
}

.reviewCardTitle strong {
  display: block;
  color: #f6c86c;
  font-size: 24px;
  font-weight: 900;
  text-transform: uppercase;
}

.reviewCardTitle small {
  display: block;
  margin-top: 4px;
  color: #dbe4f4;
  font-size: 15px;
}

.reviewChecks {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 12px;
  overflow: hidden;
}

.reviewChecks span {
  min-height: 74px;
  display: grid;
  place-items: center;
  gap: 7px;
  padding: 10px 8px;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  color: #dbe4f4;
  font-size: 13px;
  text-align: center;
}

.reviewChecks span:last-child {
  border-right: 0;
}

.reviewChecks b {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1px solid rgba(71, 218, 125, 0.45);
  border-radius: 50%;
  color: #47da7d;
  font-size: 13px;
}

.panel.is-reviewing .actions {
  grid-template-columns: 0.9fr 1.1fr;
  gap: 22px;
  margin: 28px 0 18px;
}

.panel.is-reviewing .actions button {
  min-height: 74px;
  border-radius: 12px;
  font-size: 25px;
  font-weight: 900;
}

.panel.is-reviewing .actions .secondary::before {
  content: "↻";
  margin-right: 14px;
  font-size: 28px;
}

.panel.is-reviewing .actions .primary {
  border-color: rgba(255, 224, 159, 0.62);
  background: linear-gradient(180deg, #d9aa4c, #a97725);
  color: #ffffff;
  box-shadow: 0 20px 45px rgba(161, 111, 33, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.34);
}

.panel.is-reviewing .actions .primary::before {
  content: "◇";
  margin-right: 14px;
}

.panel.is-reviewing #reviewStep::after {
  content: "Seus dados estão protegidos e não serão compartilhados.";
  display: block;
  margin-top: 16px;
  color: #c7d2e6;
  text-align: center;
  font-size: 16px;
}

@media (max-width: 980px) {
  .panel.is-reviewing {
    width: min(100%, 760px);
  }

  .panel.is-reviewing #reviewStep {
    padding: 26px 24px 30px;
  }

  .panel.is-reviewing #reviewStep > .cameraHeader {
    display: block;
  }

  .reviewNotice {
    margin: 22px 0;
    width: 100%;
  }

  .panel.is-reviewing .previewGrid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .reviewCard {
    display: grid;
    grid-template-columns: minmax(220px, 0.75fr) 1fr;
  }

  .reviewImageWrap {
    aspect-ratio: 4 / 3;
  }
}

@media (max-width: 640px) {
  .panel.is-reviewing {
    width: 100%;
    min-height: 100vh;
    border-radius: 0;
  }

  .panel.is-reviewing .topbar {
    padding: 18px;
  }

  .panel.is-reviewing .logo {
    width: 190px;
  }

  .panel.is-reviewing .pill {
    min-height: 34px;
    padding: 7px 10px;
    font-size: 10px;
  }

  .panel.is-reviewing #reviewStep {
    padding: 22px 18px 28px;
  }

  .panel.is-reviewing #reviewStep > .cameraHeader strong {
    font-size: 32px;
  }

  .panel.is-reviewing #reviewStep > .cameraHeader span {
    font-size: 16px;
  }

  .reviewNotice {
    min-height: auto;
    padding: 18px 18px 18px 58px;
    font-size: 14px;
  }

  .reviewNotice::before {
    left: 20px;
    font-size: 25px;
  }

  .reviewCard {
    display: block;
  }

  .reviewCardTitle strong {
    font-size: 22px;
  }

  .reviewChecks {
    grid-template-columns: repeat(2, 1fr);
  }

  .reviewChecks span:nth-child(2) {
    border-right: 0;
  }

  .reviewChecks span:nth-child(-n + 2) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .panel.is-reviewing .actions {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .panel.is-reviewing .actions button {
    min-height: 68px;
    font-size: 22px;
  }
}

/* Viewport-fit correction: desktop review must show actions without long scroll. */
@media (min-width: 981px) {
  .shell {
    padding: 12px;
  }

  .panel.is-reviewing {
    height: calc(100vh - 24px);
    max-height: calc(100vh - 24px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }

  .panel.is-reviewing .topbar {
    flex: 0 0 auto;
    padding: 18px 28px !important;
  }

  .panel.is-reviewing .logo {
    width: 220px;
  }

  .panel.is-reviewing .pill {
    min-height: 38px;
    padding: 8px 18px;
    font-size: 12px;
  }

  .panel.is-reviewing #reviewStep {
    flex: 1 1 auto;
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 410px);
    grid-template-rows: auto minmax(0, 1fr) auto auto;
    column-gap: 24px;
    row-gap: 16px;
    padding: 22px 32px 18px !important;
  }

  .panel.is-reviewing #reviewStep > .cameraHeader {
    grid-column: 1;
    grid-row: 1;
    display: block;
    margin: 0 !important;
    padding: 0;
  }

  .panel.is-reviewing #reviewStep > .cameraHeader::before {
    display: block;
    margin-bottom: 12px;
  }

  .panel.is-reviewing #reviewStep > .cameraHeader strong {
    font-size: clamp(32px, 3vw, 46px);
  }

  .panel.is-reviewing #reviewStep > .cameraHeader span {
    display: block;
    margin-top: 12px;
    font-size: 16px;
  }

  .reviewNotice {
    grid-column: 2;
    grid-row: 1;
    align-self: end;
    width: 100%;
    min-height: 86px;
    margin: 0 !important;
    padding: 18px 20px 18px 62px;
    font-size: 14px;
  }

  .reviewNotice::before {
    left: 22px;
    font-size: 28px;
  }

  .panel.is-reviewing .previewGrid {
    grid-column: 1 / -1;
    grid-row: 2;
    min-height: 0;
    display: grid;
    align-items: stretch;
    gap: 22px;
  }

  .reviewCard {
    min-height: 0;
    display: flex;
    flex-direction: column;
  }

  .reviewImageWrap {
    flex: 0 0 auto;
    height: clamp(220px, 34vh, 330px);
    aspect-ratio: auto;
  }

  .reviewCardBody {
    flex: 1 1 auto;
    min-height: 0;
    padding: 12px 14px 14px;
  }

  .reviewCardTitle {
    grid-template-columns: 42px 1fr;
    gap: 10px;
    margin-bottom: 10px;
  }

  .reviewCardTitle > span {
    width: 38px;
    height: 38px;
    font-size: 18px;
  }

  .reviewCardTitle strong {
    font-size: 20px;
  }

  .reviewCardTitle small {
    font-size: 13px;
  }

  .reviewChecks span {
    min-height: 48px;
    padding: 8px 6px;
    font-size: 11px;
  }

  .reviewChecks b {
    width: 18px;
    height: 18px;
    font-size: 11px;
  }

  .panel.is-reviewing .actions {
    grid-column: 1 / -1;
    grid-row: 3;
    margin: 0 !important;
  }

  .panel.is-reviewing .actions button {
    min-height: 60px;
    font-size: 22px;
  }

  .panel.is-reviewing #reviewStep::after {
    grid-column: 1 / -1;
    grid-row: 4;
    margin: 0;
    font-size: 14px;
  }
}

/* Mobile rebuilt as a compact app flow instead of a squeezed desktop page. */
@media (max-width: 640px) {
  body {
    overflow-x: hidden;
  }

  .shell {
    padding: 0 !important;
  }

  .panel.is-capturing,
  .panel.is-reviewing {
    width: 100% !important;
    min-height: 100svh;
    border-radius: 0 !important;
    overflow: visible;
  }

  .panel.is-capturing .topbar,
  .panel.is-reviewing .topbar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 14px 16px !important;
  }

  .panel.is-capturing .logo,
  .panel.is-reviewing .logo {
    width: 176px !important;
    max-width: 72%;
  }

  .panel.is-capturing .pill,
  .panel.is-reviewing .pill {
    justify-self: start;
    min-height: 30px;
    padding: 6px 10px;
    font-size: 10px;
  }

  .panel.is-capturing .captureLayout {
    display: flex;
    flex-direction: column;
    padding: 12px !important;
    gap: 12px !important;
  }

  .panel.is-capturing .camera {
    min-height: auto !important;
    height: min(58svh, 430px);
    aspect-ratio: auto !important;
    border-radius: 14px;
  }

  .panel.is-capturing .faceGuide {
    width: 58%;
    height: 62%;
  }

  .cameraStatus {
    top: 12px;
    left: 12px;
    min-width: 104px;
    padding: 8px 10px;
  }

  .cameraCorners {
    inset: 14px;
  }

  .cameraInstruction {
    bottom: 12px;
    width: calc(100% - 28px);
    padding: 11px 10px;
    font-size: 12px;
  }

  .panel.is-capturing .capturePanel {
    padding: 14px !important;
    border-radius: 14px;
  }

  .panel.is-capturing .cameraHeader {
    grid-template-columns: 38px 1fr;
    gap: 10px;
    padding-bottom: 14px;
  }

  .cameraHeaderIcon {
    width: 38px;
    height: 38px;
  }

  .panel.is-capturing .cameraHeader strong {
    font-size: 20px;
    line-height: 1.12;
  }

  .panel.is-capturing .cameraHeader span {
    font-size: 13px;
  }

  #poseIntro {
    font-size: 12px;
    line-height: 1.35;
  }

  .panel.is-capturing .livenessProgress button {
    min-height: 58px;
  }

  .panel.is-capturing .qualityToken {
    min-height: 58px;
    padding: 10px 8px !important;
  }

  .panel.is-capturing .capturePanel .primary {
    min-height: 58px;
    font-size: 16px;
  }

  .panel.is-reviewing #reviewStep {
    padding: 18px 14px 24px !important;
  }

  .panel.is-reviewing #reviewStep > .cameraHeader strong {
    font-size: 28px;
    line-height: 1.08;
  }

  .panel.is-reviewing .previewGrid {
    gap: 14px;
  }

  .reviewImageWrap {
    aspect-ratio: 16 / 10;
  }

  .reviewCardBody {
    padding: 12px;
  }

  .reviewChecks span {
    min-height: 52px;
    font-size: 12px;
  }
}

/* Capture compact correction for the current browser/mobile widths. */
@media (max-width: 1120px) {
  .panel.is-capturing {
    min-height: 100svh;
    overflow: visible;
  }

  .panel.is-capturing .topbar {
    padding: 14px 18px !important;
  }

  .panel.is-capturing .captureLayout {
    padding: 12px 14px 18px !important;
    gap: 12px !important;
  }

  .panel.is-capturing .camera {
    height: min(46svh, 420px);
    min-height: 300px !important;
  }

  .panel.is-capturing .capturePanel {
    padding: 14px !important;
    gap: 10px;
  }

  .panel.is-capturing .cameraHeader {
    grid-template-columns: 42px 1fr;
    gap: 10px;
    padding-bottom: 12px;
  }

  .panel.is-capturing .cameraHeader strong {
    font-size: 21px;
  }

  .panel.is-capturing .cameraHeader span {
    margin-top: 4px;
    font-size: 13px;
  }

  #poseIntro {
    margin-top: 8px;
    font-size: 12px;
    line-height: 1.35;
  }

  .panel.is-capturing .livenessProgress {
    gap: 8px !important;
    margin: 10px 0 10px !important;
  }

  .panel.is-capturing .livenessProgress::before {
    left: 21px;
    top: 28px;
    bottom: 28px;
  }

  .panel.is-capturing .livenessProgress button {
    grid-template-columns: 42px 1fr;
    min-height: 58px;
    padding: 9px 72px 9px 10px;
  }

  .panel.is-capturing .livenessProgress button span {
    width: 34px;
    height: 34px;
    font-size: 15px;
  }

  .panel.is-capturing .livenessProgress button strong {
    font-size: 16px;
  }

  .panel.is-capturing .livenessProgress button small {
    margin-top: 2px;
    font-size: 12px;
    line-height: 1.2;
  }

  .panel.is-capturing .livenessProgress button em {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    max-width: 62px;
    padding: 6px 8px;
    font-size: 10px;
    text-align: center;
  }

  .panel.is-capturing .quality {
    margin: 10px 0 12px !important;
  }

  .panel.is-capturing .qualityToken {
    min-height: 54px;
    padding: 9px 6px !important;
  }

  .qualityToken span {
    margin-bottom: 5px;
  }

  .qualityToken strong {
    font-size: 11px;
  }

  .qualityToken small {
    margin-top: 4px;
    font-size: 10px;
  }

  .panel.is-capturing .capturePanel .primary {
    position: sticky;
    bottom: 8px;
    z-index: 20;
    min-height: 58px;
    margin-top: 2px;
    font-size: 18px;
  }
}

@media (max-width: 520px) {
  .panel.is-capturing .camera {
    height: min(50svh, 390px);
    min-height: 280px !important;
  }

  .panel.is-capturing .livenessProgress button {
    padding-right: 10px;
  }

  .panel.is-capturing .livenessProgress button em {
    position: static;
    grid-column: 2;
    justify-self: start;
    transform: none;
    margin-top: 5px;
    max-width: none;
  }

  .panel.is-capturing .quality {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

/* Hard stop for capture step overflow: status chips cannot leave the card. */
@media (max-width: 1320px) {
  .panel.is-capturing .livenessProgress button {
    grid-template-columns: 42px minmax(0, 1fr) !important;
    padding: 10px 12px !important;
    overflow: hidden !important;
  }

  .panel.is-capturing .livenessProgress button strong,
  .panel.is-capturing .livenessProgress button small {
    min-width: 0 !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
  }

  .panel.is-capturing .livenessProgress button em {
    display: none !important;
  }
}

@media (max-width: 1320px) {
  .panel.is-capturing .capturePanel {
    overflow: hidden !important;
  }

  .panel.is-capturing .livenessProgress {
    overflow: hidden !important;
  }

  .panel.is-capturing .livenessProgress::before {
    left: 21px !important;
  }

  .panel.is-capturing .capturePanel .primary {
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
    white-space: normal !important;
    text-align: center !important;
    line-height: 1.15 !important;
  }

  .panel.is-capturing .capturePanel .primary::before,
  .panel.is-capturing .capturePanel .primary::after {
    display: none !important;
  }
}

/* Absolute fix: capture step status labels must never render outside cards. */
.panel.is-capturing .livenessProgress button em {
  display: none !important;
  visibility: hidden !important;
  position: static !important;
  width: 0 !important;
  height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow: hidden !important;
}

.panel.is-capturing .livenessProgress button {
  grid-template-columns: 48px minmax(0, 1fr) !important;
}

/* Review clipping fix: keep cards, indicators and action buttons inside viewport. */
@media (min-width: 981px) {
  .panel.is-reviewing #reviewStep {
    row-gap: 12px;
    padding-bottom: 14px !important;
  }

  .panel.is-reviewing #reviewStep > .cameraHeader::before {
    margin-bottom: 8px;
  }

  .panel.is-reviewing #reviewStep > .cameraHeader strong {
    font-size: clamp(28px, 2.5vw, 40px);
  }

  .panel.is-reviewing #reviewStep > .cameraHeader span {
    margin-top: 8px;
    font-size: 15px;
  }

  .reviewNotice {
    min-height: 74px;
    padding-top: 14px;
    padding-bottom: 14px;
    font-size: 13px;
    line-height: 1.32;
  }

  .panel.is-reviewing .previewGrid {
    gap: 18px;
  }

  .reviewImageWrap {
    height: clamp(150px, 25vh, 245px);
  }

  .reviewCardBody {
    padding: 10px 12px 12px;
  }

  .reviewCardTitle {
    grid-template-columns: 36px 1fr;
    gap: 8px;
    margin-bottom: 8px;
  }

  .reviewCardTitle > span {
    width: 32px;
    height: 32px;
    font-size: 15px;
  }

  .reviewCardTitle strong {
    font-size: 18px;
    line-height: 1.05;
  }

  .reviewCardTitle small {
    margin-top: 2px;
    font-size: 12px;
  }

  .reviewChecks span {
    min-height: 36px;
    padding: 6px 4px;
    font-size: 10px;
    line-height: 1.15;
  }

  .reviewChecks b {
    width: 16px;
    height: 16px;
    font-size: 10px;
  }

  .panel.is-reviewing .actions button {
    min-height: 54px;
    font-size: 20px;
  }
}

@media (min-width: 981px) and (max-height: 780px) {
  .panel.is-reviewing .topbar {
    padding-top: 12px !important;
    padding-bottom: 12px !important;
  }

  .panel.is-reviewing #reviewStep {
    padding-top: 14px !important;
  }

  .reviewImageWrap {
    height: clamp(130px, 22vh, 200px);
  }

  .reviewCardBody {
    padding: 8px 10px 10px;
  }

  .reviewChecks span {
    min-height: 32px;
  }

  .panel.is-reviewing .actions button {
    min-height: 50px;
  }
}

/* Capture viewport fit: remove unnecessary scroll and dead space on desktop/tablet. */
@media (min-width: 721px) {
  .shell {
    padding: 8px !important;
  }

  .panel.is-capturing {
    width: min(100%, 1560px) !important;
    height: calc(100vh - 16px) !important;
    max-height: calc(100vh - 16px) !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
  }

  .panel.is-capturing .topbar {
    flex: 0 0 auto;
    padding: 12px 24px !important;
  }

  .panel.is-capturing .logo {
    width: 210px !important;
  }

  .panel.is-capturing .pill {
    min-height: 34px !important;
    padding: 7px 16px !important;
    font-size: 11px !important;
  }

  .panel.is-capturing #cameraStep {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
  }

  .panel.is-capturing .captureLayout {
    height: 100%;
    min-height: 0;
    grid-template-columns: minmax(0, 1.42fr) minmax(360px, 0.78fr) !important;
    align-items: stretch;
    padding: 14px 22px 18px !important;
    gap: 16px !important;
  }

  .panel.is-capturing .captureMedia,
  .panel.is-capturing .capturePanel {
    min-height: 0;
  }

  .panel.is-capturing .camera {
    height: 100% !important;
    min-height: 0 !important;
    max-height: 100% !important;
  }

  .panel.is-capturing .capturePanel {
    display: grid !important;
    grid-template-rows: auto auto auto auto auto;
    align-content: stretch;
    gap: 10px !important;
    padding: 16px !important;
    overflow: hidden !important;
  }

  .panel.is-capturing .cameraHeader {
    grid-template-columns: 38px 1fr !important;
    gap: 10px !important;
    padding-bottom: 10px !important;
    margin: 0 !important;
  }

  .panel.is-capturing .cameraHeader strong {
    font-size: 20px !important;
    line-height: 1.08 !important;
  }

  .panel.is-capturing .cameraHeader span {
    margin-top: 4px !important;
    font-size: 13px !important;
  }

  #poseIntro {
    margin-top: 7px !important;
    font-size: 12px !important;
    line-height: 1.32 !important;
  }

  .panel.is-capturing .livenessProgress {
    gap: 8px !important;
    margin: 0 !important;
  }

  .panel.is-capturing .livenessProgress::before {
    left: 19px !important;
    top: 24px !important;
    bottom: 24px !important;
  }

  .panel.is-capturing .livenessProgress button {
    grid-template-columns: 38px minmax(0, 1fr) !important;
    min-height: 54px !important;
    padding: 8px 10px !important;
    column-gap: 10px !important;
  }

  .panel.is-capturing .livenessProgress button span {
    width: 30px !important;
    height: 30px !important;
    font-size: 14px !important;
  }

  .panel.is-capturing .livenessProgress button strong {
    font-size: 15px !important;
    line-height: 1.05 !important;
  }

  .panel.is-capturing .livenessProgress button small {
    font-size: 11px !important;
    line-height: 1.15 !important;
  }

  .panel.is-capturing .quality {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    margin: 0 !important;
  }

  .panel.is-capturing .qualityToken {
    min-height: 50px !important;
    padding: 7px 5px !important;
  }

  .qualityToken span {
    width: 8px !important;
    height: 8px !important;
    margin-bottom: 4px !important;
  }

  .qualityToken strong {
    font-size: 10px !important;
    line-height: 1.12 !important;
  }

  .qualityToken small {
    margin-top: 3px !important;
    font-size: 9px !important;
  }

  .panel.is-capturing .capturePanel .primary {
    position: static !important;
    align-self: end;
    min-height: 54px !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 10px 12px !important;
    font-size: clamp(17px, 1.25vw, 22px) !important;
    white-space: normal !important;
    overflow: hidden !important;
  }
}

/* Capture instruction layout repair: keep copy beside the title, not below the number. */
@media (min-width: 721px) {
  .panel.is-capturing .capturePanel {
    grid-template-rows: auto auto auto auto !important;
  }

  .panel.is-capturing .cameraHeader {
    min-height: 0 !important;
  }

  .panel.is-capturing .cameraHeaderIcon {
    width: 34px !important;
    height: 34px !important;
  }

  .panel.is-capturing .cameraHeader strong {
    font-size: 22px !important;
    letter-spacing: 0 !important;
  }

  .panel.is-capturing .cameraHeader span {
    font-size: 13px !important;
  }

  #poseIntro {
    max-width: 100% !important;
    font-size: 12px !important;
    line-height: 1.3 !important;
  }

  .panel.is-capturing .livenessProgress {
    gap: 8px !important;
  }

  .panel.is-capturing .livenessProgress button {
    grid-template-columns: 42px minmax(0, 1fr) !important;
    grid-template-rows: auto auto !important;
    min-height: 50px !important;
    padding: 8px 12px !important;
    column-gap: 12px !important;
    row-gap: 2px !important;
    align-items: center !important;
  }

  .panel.is-capturing .livenessProgress button span {
    grid-column: 1 !important;
    grid-row: 1 / span 2 !important;
    align-self: center !important;
    width: 32px !important;
    height: 32px !important;
  }

  .panel.is-capturing .livenessProgress button strong {
    grid-column: 2 !important;
    grid-row: 1 !important;
    min-width: 0 !important;
    font-size: 17px !important;
    line-height: 1.05 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .panel.is-capturing .livenessProgress button small {
    grid-column: 2 !important;
    grid-row: 2 !important;
    min-width: 0 !important;
    font-size: 12px !important;
    line-height: 1.15 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .panel.is-capturing .quality {
    min-height: 54px !important;
  }

  .panel.is-capturing .qualityToken {
    display: grid !important;
    place-items: center !important;
    min-height: 54px !important;
  }
}

@media (min-width: 721px) and (max-height: 820px) {
  .panel.is-capturing .capturePanel {
    gap: 8px !important;
    padding: 14px !important;
  }

  .panel.is-capturing .cameraHeader {
    padding-bottom: 8px !important;
  }

  .panel.is-capturing .livenessProgress button {
    min-height: 46px !important;
    padding-top: 7px !important;
    padding-bottom: 7px !important;
  }

  .panel.is-capturing .quality,
  .panel.is-capturing .qualityToken {
    min-height: 48px !important;
  }

  .panel.is-capturing .capturePanel .primary {
    min-height: 50px !important;
  }
}

/* Review card image balance: use the card area for the photos, not empty body space. */
@media (min-width: 981px) {
  .reviewCard {
    display: grid !important;
    grid-template-rows: minmax(0, 1fr) auto !important;
  }

  .reviewImageWrap {
    height: auto !important;
    min-height: clamp(250px, 38vh, 430px) !important;
    aspect-ratio: auto !important;
  }

  .reviewImageWrap img {
    object-fit: cover !important;
    object-position: center 42% !important;
  }

  .reviewCardBody {
    padding: 12px 14px 14px !important;
  }

  .reviewCardTitle {
    margin-bottom: 10px !important;
  }

  .reviewChecks span {
    min-height: 42px !important;
  }
}

@media (min-width: 981px) and (max-height: 780px) {
  .reviewImageWrap {
    min-height: clamp(210px, 33vh, 330px) !important;
  }

  .reviewCardBody {
    padding: 10px 12px 12px !important;
  }

  .reviewChecks span {
    min-height: 36px !important;
  }
}

/* Support state in capture: compact alert without collisions. */
.panel.is-capturing .capturePanel.has-support {
  grid-template-rows: auto auto auto auto auto !important;
  gap: 8px !important;
}

.panel.is-capturing .capturePanel.has-support #poseIntro {
  display: none !important;
}

.panel.is-capturing .capturePanel.has-support .cameraHeader {
  padding-bottom: 8px !important;
}

.panel.is-capturing .capturePanel.has-support .cameraHeader strong {
  font-size: 19px !important;
  line-height: 1.08 !important;
}

.panel.is-capturing .capturePanel.has-support .cameraHeader span {
  margin-top: 3px !important;
  font-size: 12px !important;
}

.panel.is-capturing .capturePanel.has-support .livenessProgress {
  gap: 6px !important;
}

.panel.is-capturing .capturePanel.has-support .livenessProgress button {
  min-height: 42px !important;
  padding: 6px 10px !important;
}

.panel.is-capturing .capturePanel.has-support .livenessProgress button span {
  width: 28px !important;
  height: 28px !important;
}

.panel.is-capturing .capturePanel.has-support .livenessProgress button strong {
  font-size: 14px !important;
}

.panel.is-capturing .capturePanel.has-support .livenessProgress button small {
  font-size: 10px !important;
}

.panel.is-capturing .capturePanel.has-support .quality,
.panel.is-capturing .capturePanel.has-support .qualityToken {
  min-height: 42px !important;
}

.panel.is-capturing .capturePanel.has-support .qualityToken {
  padding: 5px 4px !important;
}

.panel.is-capturing .capturePanel.has-support .qualityToken small {
  display: none !important;
}

.panel.is-capturing .capturePanel.has-support .supportBlock {
  margin: 0 !important;
  padding: 12px !important;
  border-radius: 10px !important;
  background: linear-gradient(180deg, rgba(216, 162, 66, 0.13), rgba(255, 255, 255, 0.035)) !important;
}

.panel.is-capturing .capturePanel.has-support .supportBlock strong {
  margin-bottom: 5px !important;
  font-size: 15px !important;
  line-height: 1.15 !important;
}

.panel.is-capturing .capturePanel.has-support .supportBlock p {
  font-size: 12px !important;
  line-height: 1.28 !important;
}

.panel.is-capturing .capturePanel.has-support .supportActions {
  display: grid !important;
  grid-template-columns: 1fr auto !important;
  gap: 8px !important;
  margin-top: 9px !important;
}

.panel.is-capturing .capturePanel.has-support .supportActions button {
  min-height: 38px !important;
  padding: 8px 12px !important;
  border-radius: 8px !important;
  font-size: 13px !important;
}

.panel.is-capturing .capturePanel.has-support .primary {
  min-height: 48px !important;
}

@media (max-width: 720px) {
  .panel.is-capturing .capturePanel.has-support .supportActions {
    grid-template-columns: 1fr !important;
  }
}


.doneReviewNotice {
  margin: 14px auto 0;
  max-width: 460px;
  padding: 15px 17px;
  border: 1px solid rgba(255, 106, 95, 0.45);
  border-radius: 12px;
  color: #ffaaa2;
  background: rgba(126, 24, 24, 0.2);
  font-weight: 900;
}
.supportBlock.is-waiting {
  border-color: rgba(100, 200, 255, 0.42) !important;
  background:
    radial-gradient(circle at 18% 20%, rgba(83, 177, 255, 0.16), transparent 38%),
    linear-gradient(180deg, rgba(18, 31, 49, 0.96), rgba(8, 16, 28, 0.96)) !important;
}

.supportBlock.is-waiting strong::after {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-left: 10px;
  border-radius: 50%;
  background: #75d4ff;
  box-shadow: 0 0 0 0 rgba(117, 212, 255, 0.42);
  animation: supportPulse 1.3s ease-out infinite;
  vertical-align: middle;
}

.supportBlock.is-waiting .supportStatus {
  display: block !important;
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(117, 212, 255, 0.26);
  border-radius: 8px;
  color: #dff5ff;
  background: rgba(45, 122, 170, 0.14);
  font-weight: 700;
  line-height: 1.35;
}

@keyframes supportPulse {
  0% { box-shadow: 0 0 0 0 rgba(117, 212, 255, 0.42); }
  100% { box-shadow: 0 0 0 12px rgba(117, 212, 255, 0); }
}

/* Final quality indicator pattern: compact, aligned, premium. */
.panel.is-capturing .quality {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 0 !important;
  overflow: hidden !important;
}

.panel.is-capturing .qualityToken {
  display: grid !important;
  grid-template-columns: 24px minmax(0, 1fr) 18px !important;
  grid-template-rows: 1fr !important;
  align-items: center !important;
  justify-items: stretch !important;
  gap: 7px !important;
  min-height: 48px !important;
  padding: 8px 10px !important;
  text-align: left !important;
}

.panel.is-capturing .qualityToken .qualityIcon {
  display: grid !important;
  place-items: center !important;
  width: 24px !important;
  height: 24px !important;
  margin: 0 !important;
  border-radius: 50% !important;
  background: rgba(246, 200, 108, 0.12) !important;
  box-shadow: none !important;
  border: 1px solid rgba(246, 200, 108, 0.45) !important;
}

.panel.is-capturing .qualityToken .qualityIcon::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #72e58d;
  box-shadow: 0 0 12px rgba(114, 229, 141, 0.65);
}

.panel.is-capturing .qualityToken.bad .qualityIcon::before {
  background: #ff8f86;
  box-shadow: 0 0 12px rgba(255, 143, 134, 0.55);
}

.panel.is-capturing .qualityToken strong {
  min-width: 0 !important;
  color: #eef3ff !important;
  font-size: 11px !important;
  font-weight: 850 !important;
  line-height: 1.12 !important;
  white-space: normal !important;
  overflow: hidden !important;
}

.panel.is-capturing .qualityToken small {
  display: grid !important;
  place-items: center !important;
  width: 18px !important;
  height: 18px !important;
  margin: 0 !important;
  border: 1px solid rgba(114, 229, 141, 0.48) !important;
  border-radius: 50% !important;
  color: #72e58d !important;
  font-size: 11px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
}

.panel.is-capturing .qualityToken.bad small {
  border-color: rgba(255, 143, 134, 0.5) !important;
  color: #ff8f86 !important;
}

.panel.is-capturing .capturePanel.has-support .qualityToken small {
  display: grid !important;
}

/* Final overflow guard: quality tokens must never crop or overlap text. */
.panel.is-capturing .qualityToken {
  grid-template-columns: 20px minmax(42px, 1fr) 18px !important;
  gap: 6px !important;
  padding: 8px 9px !important;
  min-width: 0 !important;
}

.panel.is-capturing .qualityToken strong {
  white-space: nowrap !important;
  text-overflow: clip !important;
  font-size: 11px !important;
  line-height: 1 !important;
}

.panel.is-capturing .qualityToken .qualityIcon {
  width: 20px !important;
  height: 20px !important;
}

.panel.is-capturing .qualityToken small {
  width: 18px !important;
  height: 18px !important;
  font-size: 10px !important;
}

@media (max-width: 980px) {
  .panel.is-capturing .qualityToken {
    grid-template-columns: 20px minmax(0, 1fr) 16px !important;
    gap: 5px !important;
    padding: 7px 8px !important;
  }

  .panel.is-capturing .qualityToken .qualityIcon {
    width: 20px !important;
    height: 20px !important;
  }

  .panel.is-capturing .qualityToken strong {
    font-size: 10px !important;
  }

  .panel.is-capturing .qualityToken small {
    width: 16px !important;
    height: 16px !important;
    font-size: 10px !important;
  }
}

@media (max-width: 720px) {
  .panel.is-capturing .quality {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    border-radius: 14px !important;
  }

  .panel.is-capturing .qualityToken {
    min-height: 44px !important;
  }
}

/* Final stage framing: reveal the motion background instead of letting the app shell fill the viewport. */
@media (min-width: 1100px) {
  body {
    min-height: 100vh !important;
    overflow: hidden !important;
  }

  .shell {
    min-height: 100vh !important;
    padding: clamp(20px, 2.6vw, 46px) clamp(26px, 3.5vw, 70px) !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .panel.is-capturing {
    width: min(88vw, 1720px) !important;
    height: min(86vh, 840px) !important;
    max-height: min(86vh, 840px) !important;
    border-radius: 22px !important;
    overflow: hidden !important;
    background:
      linear-gradient(180deg, rgba(14, 25, 43, 0.88), rgba(4, 10, 19, 0.9)),
      rgba(8, 16, 28, 0.86) !important;
    border-color: rgba(238, 197, 111, 0.34) !important;
    box-shadow:
      0 34px 96px rgba(0, 0, 0, 0.56),
      0 0 0 1px rgba(255, 255, 255, 0.035),
      inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
    backdrop-filter: blur(10px) saturate(1.08) !important;
  }

  .panel.is-capturing .topbar {
    padding: clamp(14px, 1.5vh, 20px) clamp(24px, 2vw, 34px) !important;
    background: linear-gradient(180deg, rgba(9, 20, 38, 0.72), rgba(7, 14, 25, 0.18)) !important;
  }

  .panel.is-capturing .captureLayout {
    height: calc(100% - 0px) !important;
    grid-template-columns: minmax(0, 1.42fr) minmax(390px, 0.78fr) !important;
    gap: clamp(16px, 1.45vw, 24px) !important;
    padding: clamp(16px, 1.8vh, 22px) clamp(24px, 2vw, 34px) clamp(18px, 2vh, 28px) !important;
  }

  .panel.is-capturing .camera {
    min-height: 0 !important;
    height: 100% !important;
    border-radius: 18px !important;
  }

  .panel.is-capturing .capturePanel {
    background:
      linear-gradient(180deg, rgba(14, 26, 45, 0.78), rgba(4, 10, 18, 0.84)),
      rgba(7, 14, 25, 0.72) !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    box-shadow: 0 20px 54px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.045) !important;
  }
}

@media (min-width: 1100px) and (max-height: 820px) {
  .shell {
    padding: 18px 44px !important;
  }

  .panel.is-capturing {
    width: min(90vw, 1700px) !important;
    height: calc(100vh - 36px) !important;
    max-height: calc(100vh - 36px) !important;
  }

  .panel.is-capturing .topbar {
    padding-top: 12px !important;
    padding-bottom: 12px !important;
  }
}

/* Final quality rail v2: icon-led, compact, no cropped labels. */
.panel.is-capturing .quality {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 8px !important;
  min-height: 78px !important;
  padding: 8px !important;
  overflow: visible !important;
  border: 1px solid rgba(216, 162, 66, 0.42) !important;
  border-radius: 14px !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.012)),
    rgba(4, 10, 18, 0.62) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04) !important;
}

.panel.is-capturing .qualityToken {
  position: relative !important;
  display: grid !important;
  grid-template-columns: 34px minmax(0, 1fr) !important;
  grid-template-rows: auto auto !important;
  align-items: center !important;
  column-gap: 8px !important;
  row-gap: 2px !important;
  min-width: 0 !important;
  min-height: 58px !important;
  padding: 9px 9px !important;
  border: 1px solid rgba(255, 255, 255, 0.085) !important;
  border-radius: 11px !important;
  background:
    radial-gradient(circle at 20% 15%, rgba(114, 229, 141, 0.13), transparent 38%),
    linear-gradient(180deg, rgba(18, 31, 49, 0.9), rgba(7, 14, 25, 0.88)) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
  text-align: left !important;
}

.panel.is-capturing .qualityToken.bad {
  background:
    radial-gradient(circle at 20% 15%, rgba(255, 143, 134, 0.14), transparent 38%),
    linear-gradient(180deg, rgba(35, 20, 27, 0.9), rgba(9, 13, 23, 0.9)) !important;
}

.panel.is-capturing .qualityToken::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: 0 0 18px rgba(114, 229, 141, 0.08) inset;
}

.panel.is-capturing .qualityToken .qualityIcon {
  grid-column: 1 !important;
  grid-row: 1 / span 2 !important;
  display: grid !important;
  place-items: center !important;
  width: 34px !important;
  height: 34px !important;
  margin: 0 !important;
  border-radius: 11px !important;
  border: 1px solid rgba(246, 200, 108, 0.38) !important;
  background:
    linear-gradient(180deg, rgba(246, 200, 108, 0.16), rgba(114, 229, 141, 0.07)),
    rgba(5, 12, 22, 0.8) !important;
  box-shadow: 0 0 16px rgba(216, 162, 66, 0.08) !important;
}

.panel.is-capturing .qualityToken .qualityIcon::before {
  content: none !important;
}

.panel.is-capturing .qualityToken .qualityIcon svg {
  width: 20px !important;
  height: 20px !important;
  fill: none !important;
  stroke: #f6c86c !important;
  stroke-width: 1.8 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
}

.panel.is-capturing .qualityToken.ok .qualityIcon svg {
  stroke: #f7d889 !important;
}

.panel.is-capturing .qualityToken.bad .qualityIcon svg {
  stroke: #ff9b91 !important;
}

.panel.is-capturing .qualityToken strong {
  grid-column: 2 !important;
  grid-row: 1 !important;
  min-width: 0 !important;
  overflow: hidden !important;
  color: #f4f7ff !important;
  font-size: 12px !important;
  font-weight: 900 !important;
  line-height: 1.05 !important;
  white-space: nowrap !important;
  text-overflow: ellipsis !important;
}

.panel.is-capturing .qualityToken small {
  grid-column: 2 !important;
  grid-row: 2 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  width: auto !important;
  height: auto !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  color: #72e58d !important;
  font-size: 9px !important;
  font-weight: 900 !important;
  letter-spacing: 0.08em !important;
  line-height: 1 !important;
  text-transform: uppercase !important;
}

.panel.is-capturing .qualityToken.bad small {
  color: #ff9b91 !important;
}

@media (max-width: 1280px) and (min-width: 721px) {
  .panel.is-capturing .quality {
    gap: 6px !important;
    padding: 7px !important;
  }

  .panel.is-capturing .qualityToken {
    grid-template-columns: 30px minmax(0, 1fr) !important;
    column-gap: 6px !important;
    padding: 8px 7px !important;
  }

  .panel.is-capturing .qualityToken .qualityIcon {
    width: 30px !important;
    height: 30px !important;
  }

  .panel.is-capturing .qualityToken .qualityIcon svg {
    width: 18px !important;
    height: 18px !important;
  }

  .panel.is-capturing .qualityToken strong {
    font-size: 11px !important;
  }
}

@media (max-width: 720px) {
  .panel.is-capturing .quality {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    min-height: 0 !important;
  }
}

/* Final success screen - EAC approval motion hero. */
.panel.is-done {
  width: min(88vw, 1120px) !important;
  min-height: min(88vh, 920px) !important;
  padding: 0 !important;
  border-radius: 24px !important;
  overflow: hidden !important;
  background:
    radial-gradient(circle at 50% 30%, rgba(36, 68, 105, 0.18), transparent 36%),
    linear-gradient(180deg, rgba(15, 28, 47, 0.91), rgba(4, 10, 19, 0.94)),
    rgba(7, 15, 27, 0.88) !important;
  border: 1px solid rgba(216, 224, 240, 0.26) !important;
  box-shadow:
    0 34px 110px rgba(0, 0, 0, 0.54),
    inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
  backdrop-filter: blur(12px) saturate(1.05) !important;
}

.panel.is-done .topbar {
  padding: 38px 48px 30px !important;
  border-bottom: 1px solid rgba(216, 162, 66, 0.2) !important;
  background: transparent !important;
}

.panel.is-done .logo {
  width: 275px !important;
  filter: brightness(0) invert(1) drop-shadow(0 8px 24px rgba(0, 0, 0, 0.34)) !important;
}

.panel.is-done .pill {
  min-height: 52px !important;
  padding: 11px 28px !important;
  border-radius: 999px !important;
  border-color: rgba(216, 162, 66, 0.78) !important;
  color: #f4c86d !important;
  background: rgba(4, 10, 18, 0.36) !important;
  font-size: 14px !important;
  letter-spacing: 0 !important;
}

.panel.is-done #doneStep {
  display: grid !important;
  place-items: center !important;
  padding: 52px 52px 0 !important;
}

.doneExperience {
  width: min(100%, 790px);
  display: grid;
  justify-items: center;
  text-align: center;
}

.approvalHero {
  position: relative;
  width: 150px;
  height: 150px;
  display: grid;
  place-items: center;
  margin: 0 auto 24px;
}

.approvalHalo,
.approvalPulse {
  position: absolute;
  inset: 0;
  border-radius: 50%;
}

.approvalHalo {
  background:
    radial-gradient(circle, rgba(82, 207, 116, 0.22), rgba(82, 207, 116, 0.08) 44%, transparent 68%);
  box-shadow: 0 0 70px rgba(82, 207, 116, 0.22);
  animation: approvalGlow 2.6s ease-in-out infinite;
}

.approvalPulse {
  border: 1px solid rgba(216, 162, 66, 0.72);
  animation: approvalPulse 2.7s ease-out infinite;
}

.approvalCheck {
  position: relative;
  z-index: 2;
  width: 136px;
  height: 136px;
  overflow: visible;
}

.approvalCircle {
  fill: rgba(6, 28, 22, 0.72);
  stroke: rgba(216, 162, 66, 0.86);
  stroke-width: 2;
  filter: drop-shadow(0 0 26px rgba(82, 207, 116, 0.23));
}

.approvalPath {
  fill: none;
  stroke: #65d47c;
  stroke-width: 10;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 82;
  stroke-dashoffset: 82;
  animation: approvalDraw 1s cubic-bezier(0.22, 0.9, 0.25, 1) 0.28s forwards;
  filter: drop-shadow(0 0 18px rgba(101, 212, 124, 0.34));
}

.doneBadge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 28px;
  border-radius: 999px;
  border: 1px solid rgba(82, 207, 116, 0.38);
  color: #72e58d;
  background: rgba(21, 87, 45, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 0 26px rgba(82, 207, 116, 0.08);
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.28em;
}

.panel.is-done h2 {
  margin: 28px 0 22px !important;
  color: #fbfdff !important;
  font-family: var(--font-body) !important;
  font-size: clamp(42px, 4.2vw, 58px) !important;
  font-weight: 500 !important;
  line-height: 1.17 !important;
  letter-spacing: 0 !important;
}

.panel.is-done h2 span {
  color: #f4c86d;
  font-weight: 600;
}

.doneDivider {
  width: min(100%, 620px);
  display: grid;
  grid-template-columns: 1fr 54px 1fr;
  align-items: center;
  gap: 18px;
  margin: 0 auto 30px;
}

.doneDivider span {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(216, 162, 66, 0.78));
}

.doneDivider span:last-child {
  background: linear-gradient(90deg, rgba(216, 162, 66, 0.78), transparent);
}

.doneDivider svg {
  width: 42px;
  height: 42px;
  fill: none;
  stroke: #d8a242;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.doneLead,
.doneCopy {
  margin: 0 auto !important;
  color: rgba(238, 243, 255, 0.82) !important;
  font-size: 21px !important;
  line-height: 1.58 !important;
  font-weight: 500 !important;
}

.doneLead {
  max-width: 620px !important;
}

.doneCopy {
  max-width: 690px !important;
  margin-top: 20px !important;
  font-size: 17px !important;
  color: rgba(238, 243, 255, 0.72) !important;
}

.panel.is-done .closePage {
  width: min(100%, 760px) !important;
  min-height: 78px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 28px !important;
  margin: 44px auto 24px !important;
  border-radius: 12px !important;
  color: #050b16 !important;
  background:
    linear-gradient(180deg, rgba(255, 224, 138, 0.96), rgba(188, 133, 39, 0.98)) !important;
  box-shadow:
    0 18px 42px rgba(216, 162, 66, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.42) !important;
  font-size: 27px !important;
  font-weight: 800 !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
}

.panel.is-done .closePage svg {
  width: 34px;
  height: 34px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.18s ease;
}

.panel.is-done .closePage:hover svg {
  transform: translateX(4px);
}

.doneContinueNote {
  margin: 4px auto 34px !important;
  color: rgba(238, 243, 255, 0.72) !important;
  font-size: 16px !important;
}

.doneContinueNote.hidden {
  display: none !important;
}

.doneSecurity {
  width: calc(100% + 104px);
  min-height: 86px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  margin-top: 10px;
  border-top: 1px solid rgba(216, 224, 240, 0.11);
  color: rgba(238, 243, 255, 0.68);
  font-size: 15px;
}

.doneSecurity span {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.doneSecurity svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: #d8a242;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.doneSecurity > svg:last-child {
  stroke: rgba(238, 243, 255, 0.76);
}

.doneSecurity i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #d8a242;
}

@keyframes approvalDraw {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes approvalPulse {
  0% {
    transform: scale(0.82);
    opacity: 0.9;
  }
  72% {
    transform: scale(1.18);
    opacity: 0;
  }
  100% {
    transform: scale(1.18);
    opacity: 0;
  }
}

@keyframes approvalGlow {
  0%, 100% {
    transform: scale(0.96);
    opacity: 0.78;
  }
  50% {
    transform: scale(1.04);
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .approvalHalo,
  .approvalPulse,
  .approvalPath {
    animation: none !important;
  }

  .approvalPath {
    stroke-dashoffset: 0 !important;
  }
}

@media (max-width: 720px) {
  .panel.is-done {
    width: min(100%, 620px) !important;
    min-height: 100vh !important;
    border-radius: 0 !important;
  }

  .panel.is-done .topbar {
    padding: 24px 22px 20px !important;
    align-items: flex-start !important;
  }

  .panel.is-done .logo {
    width: 220px !important;
  }

  .panel.is-done .pill {
    align-self: stretch !important;
    justify-content: center !important;
    min-height: 42px !important;
    font-size: 12px !important;
  }

  .panel.is-done #doneStep {
    padding: 36px 22px 0 !important;
  }

  .approvalHero {
    width: 118px;
    height: 118px;
    margin-bottom: 20px;
  }

  .approvalCheck {
    width: 108px;
    height: 108px;
  }

  .doneBadge {
    min-height: 36px;
    padding: 0 18px;
    font-size: 11px;
    letter-spacing: 0.22em;
  }

  .panel.is-done h2 {
    margin-top: 22px !important;
    font-size: 35px !important;
  }

  .doneLead,
  .doneCopy {
    font-size: 17px !important;
  }

  .doneCopy {
    font-size: 14px !important;
  }

  .panel.is-done .closePage {
    min-height: 64px !important;
    margin-top: 34px !important;
    font-size: 22px !important;
  }

  .doneSecurity {
    width: calc(100% + 44px);
    flex-wrap: wrap;
    gap: 10px 16px;
    padding: 20px 18px;
    font-size: 12px;
  }
}

/* Final quality title alignment: labels above icons, centered and never truncated. */
.panel.is-capturing .qualityToken {
  grid-template-columns: 1fr !important;
  grid-template-rows: auto 1fr auto !important;
  place-items: center !important;
  row-gap: 4px !important;
  min-height: 62px !important;
  padding: 7px 6px 6px !important;
  text-align: center !important;
}

.panel.is-capturing .qualityToken strong {
  grid-column: 1 !important;
  grid-row: 1 !important;
  width: 100% !important;
  max-width: 100% !important;
  color: #f7faff !important;
  font-size: 12px !important;
  line-height: 1 !important;
  text-align: center !important;
  white-space: nowrap !important;
  overflow: visible !important;
  text-overflow: clip !important;
}

.panel.is-capturing .qualityToken .qualityIcon {
  grid-column: 1 !important;
  grid-row: 2 !important;
  align-self: center !important;
  justify-self: center !important;
  width: 30px !important;
  height: 30px !important;
}

.panel.is-capturing .qualityToken .qualityIcon svg {
  width: 18px !important;
  height: 18px !important;
}

.panel.is-capturing .qualityToken small {
  grid-column: 1 !important;
  grid-row: 3 !important;
  justify-content: center !important;
  width: 100% !important;
  text-align: center !important;
  font-size: 8px !important;
  letter-spacing: 0.1em !important;
}

/* Capture center tolerance: visual oval matches the actual accepted face area. */
.panel.is-capturing .faceGuide {
  width: clamp(310px, 46%, 480px) !important;
  height: clamp(420px, 78%, 640px) !important;
  border-width: 3px !important;
}

@media (max-width: 720px) {
  .panel.is-capturing .faceGuide {
    width: min(74%, 360px) !important;
    height: min(78%, 520px) !important;
  }
}

/* Done screen responsive correction: fit desktop viewport and behave like an app on mobile. */
@media (min-width: 721px) {
  .shell:has(.panel.is-done) {
    min-height: 100vh !important;
    padding: clamp(14px, 2vh, 26px) clamp(28px, 4vw, 72px) !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
  }

  .panel.is-done {
    width: min(82vw, 1400px) !important;
    height: min(calc(100vh - 48px), 820px) !important;
    min-height: 0 !important;
    max-height: calc(100vh - 48px) !important;
    display: grid !important;
    grid-template-rows: auto minmax(0, 1fr) !important;
  }

  .panel.is-done .topbar {
    min-height: 0 !important;
    padding: clamp(16px, 2.2vh, 28px) clamp(34px, 4vw, 58px) !important;
  }

  .panel.is-done .logo {
    width: clamp(210px, 18vw, 270px) !important;
  }

  .panel.is-done .pill {
    min-height: clamp(38px, 5vh, 50px) !important;
    padding: 8px clamp(18px, 2vw, 28px) !important;
    font-size: clamp(11px, 0.95vw, 14px) !important;
  }

  .panel.is-done #doneStep {
    min-height: 0 !important;
    height: 100% !important;
    padding: clamp(18px, 2.4vh, 34px) clamp(38px, 4vw, 64px) 0 !important;
    display: grid !important;
    place-items: stretch center !important;
    overflow: hidden !important;
  }

  .doneExperience {
    width: min(100%, 760px) !important;
    height: 100% !important;
    display: grid !important;
    grid-template-rows: auto auto auto auto auto auto minmax(50px, auto) !important;
    justify-items: center !important;
    align-content: start !important;
  }

  .approvalHero {
    width: clamp(92px, 11vh, 132px) !important;
    height: clamp(92px, 11vh, 132px) !important;
    margin: 0 auto clamp(12px, 1.7vh, 20px) !important;
  }

  .approvalCheck {
    width: clamp(84px, 10vh, 120px) !important;
    height: clamp(84px, 10vh, 120px) !important;
  }

  .doneBadge {
    min-height: clamp(30px, 4vh, 40px) !important;
    padding: 0 clamp(18px, 2vw, 28px) !important;
    font-size: clamp(11px, 0.9vw, 14px) !important;
    letter-spacing: clamp(0.16em, 0.8vw, 0.28em) !important;
  }

  .panel.is-done h2 {
    margin: clamp(14px, 2vh, 24px) 0 clamp(10px, 1.5vh, 18px) !important;
    font-size: clamp(34px, 5.2vh, 54px) !important;
    line-height: 1.12 !important;
  }

  .doneDivider {
    width: min(100%, 560px) !important;
    grid-template-columns: 1fr 42px 1fr !important;
    gap: 14px !important;
    margin: 0 auto clamp(14px, 2vh, 24px) !important;
  }

  .doneDivider svg {
    width: 34px !important;
    height: 34px !important;
  }

  .doneLead,
  .doneCopy {
    max-width: 620px !important;
    font-size: clamp(16px, 2vh, 21px) !important;
    line-height: 1.42 !important;
  }

  .doneCopy {
    max-width: 660px !important;
    margin-top: clamp(8px, 1.4vh, 16px) !important;
    font-size: clamp(13px, 1.55vh, 17px) !important;
  }

  .panel.is-done .closePage {
    width: min(100%, 720px) !important;
    min-height: clamp(54px, 7vh, 72px) !important;
    margin: clamp(18px, 2.8vh, 34px) auto clamp(8px, 1.4vh, 18px) !important;
    font-size: clamp(20px, 2.8vh, 27px) !important;
    gap: clamp(16px, 2vw, 28px) !important;
  }

  .panel.is-done .closePage svg {
    width: clamp(24px, 3.4vh, 34px) !important;
    height: clamp(24px, 3.4vh, 34px) !important;
  }

  .doneSecurity {
    align-self: end !important;
    width: calc(100% + clamp(76px, 8vw, 128px)) !important;
    min-height: clamp(50px, 7vh, 72px) !important;
    margin-top: clamp(6px, 1.2vh, 12px) !important;
    padding: 0 clamp(20px, 3vw, 44px) !important;
    font-size: clamp(12px, 1.45vh, 15px) !important;
  }
}

@media (min-width: 721px) and (max-height: 760px) {
  .panel.is-done {
    width: min(86vw, 1320px) !important;
    height: calc(100vh - 28px) !important;
    max-height: calc(100vh - 28px) !important;
  }

  .panel.is-done .topbar {
    padding-top: 12px !important;
    padding-bottom: 12px !important;
  }

  .approvalHero {
    width: 86px !important;
    height: 86px !important;
    margin-bottom: 10px !important;
  }

  .approvalCheck {
    width: 80px !important;
    height: 80px !important;
  }

  .panel.is-done h2 {
    font-size: clamp(30px, 5vh, 42px) !important;
  }

  .doneDivider {
    margin-bottom: 10px !important;
  }
}

@media (max-width: 720px) {
  .shell:has(.panel.is-done) {
    padding: 0 !important;
    min-height: 100dvh !important;
    align-items: stretch !important;
    overflow: auto !important;
  }

  .panel.is-done {
    width: 100% !important;
    min-height: 100dvh !important;
    height: auto !important;
    max-height: none !important;
    display: grid !important;
    grid-template-rows: auto 1fr !important;
    border-radius: 0 !important;
    overflow: visible !important;
  }

  .panel.is-done .topbar {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 14px !important;
    padding: 22px 18px 18px !important;
    text-align: left !important;
  }

  .panel.is-done .logo {
    width: min(240px, 78vw) !important;
    margin: 0 !important;
  }

  .panel.is-done .pill {
    width: 100% !important;
    min-height: 40px !important;
    justify-content: center !important;
    padding: 8px 12px !important;
    font-size: 11px !important;
  }

  .panel.is-done #doneStep {
    padding: 28px 18px 0 !important;
    overflow: visible !important;
  }

  .doneExperience {
    width: 100% !important;
    min-height: calc(100dvh - 118px) !important;
    display: grid !important;
    grid-template-rows: auto auto auto auto auto auto minmax(64px, auto) !important;
  }

  .approvalHero {
    width: 100px !important;
    height: 100px !important;
    margin-bottom: 16px !important;
  }

  .approvalCheck {
    width: 92px !important;
    height: 92px !important;
  }

  .doneBadge {
    max-width: 100% !important;
    min-height: 34px !important;
    padding: 0 16px !important;
    font-size: 10px !important;
    letter-spacing: 0.18em !important;
    white-space: nowrap !important;
  }

  .panel.is-done h2 {
    margin: 18px 0 14px !important;
    font-size: clamp(30px, 9vw, 38px) !important;
    line-height: 1.12 !important;
  }

  .doneDivider {
    grid-template-columns: 1fr 38px 1fr !important;
    gap: 10px !important;
    margin-bottom: 16px !important;
  }

  .doneDivider svg {
    width: 32px !important;
    height: 32px !important;
  }

  .doneLead {
    font-size: 16px !important;
    line-height: 1.42 !important;
  }

  .doneCopy {
    margin-top: 12px !important;
    font-size: 13px !important;
    line-height: 1.45 !important;
  }

  .panel.is-done .closePage {
    min-height: 60px !important;
    margin: 28px auto 18px !important;
    font-size: 20px !important;
    border-radius: 10px !important;
  }

  .doneSecurity {
    align-self: end !important;
    width: calc(100% + 36px) !important;
    min-height: 76px !important;
    margin-top: 8px !important;
    padding: 16px 18px !important;
    flex-wrap: wrap !important;
    gap: 8px 14px !important;
    font-size: 11px !important;
  }
}

/* Dedicated mobile capture app layout.
   This intentionally overrides the desktop capture composition instead of only scaling it down. */
@media (max-width: 720px) {
  html,
  body {
    width: 100%;
    min-height: 100%;
    overflow-x: hidden !important;
  }

  .shell:has(.panel.is-capturing) {
    min-height: 100svh !important;
    padding: 0 !important;
    align-items: stretch !important;
    background:
      radial-gradient(circle at 18% 0%, rgba(216, 162, 66, 0.18), transparent 34%),
      linear-gradient(180deg, #071221 0%, #030811 100%) !important;
  }

  .panel.is-capturing {
    width: 100% !important;
    min-height: 100svh !important;
    max-width: none !important;
    border: 0 !important;
    border-radius: 0 !important;
    background:
      linear-gradient(180deg, rgba(13, 24, 42, 0.98), rgba(4, 10, 19, 0.98)) !important;
    box-shadow: none !important;
    overflow: visible !important;
  }

  .panel.is-capturing::before {
    height: 2px !important;
  }

  .panel.is-capturing .topbar {
    position: relative !important;
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 12px !important;
    min-height: 0 !important;
    padding: max(14px, env(safe-area-inset-top)) 18px 14px !important;
    border-bottom: 1px solid rgba(245, 200, 111, 0.18) !important;
    background: linear-gradient(180deg, rgba(7, 17, 33, 0.98), rgba(6, 13, 24, 0.94)) !important;
  }

  .panel.is-capturing .logo {
    width: min(230px, 74vw) !important;
    max-height: 62px !important;
    margin: 0 auto !important;
    object-fit: contain !important;
  }

  .panel.is-capturing .pill {
    width: 100% !important;
    min-height: 38px !important;
    justify-content: center !important;
    padding: 8px 12px !important;
    border-radius: 999px !important;
    font-size: 11px !important;
    letter-spacing: 0.02em !important;
    white-space: nowrap !important;
  }

  .panel.is-capturing .intro,
  .panel.is-capturing .statusGrid {
    display: none !important;
  }

  .panel.is-capturing #cameraStep {
    margin: 0 !important;
    padding: 0 !important;
  }

  .panel.is-capturing .captureLayout {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    padding: 14px 14px calc(20px + env(safe-area-inset-bottom)) !important;
  }

  .panel.is-capturing .captureMedia {
    order: 1 !important;
    width: 100% !important;
  }

  .panel.is-capturing .camera {
    width: 100% !important;
    min-height: 0 !important;
    height: clamp(330px, 47svh, 500px) !important;
    aspect-ratio: auto !important;
    border-radius: 18px !important;
    border: 1px solid rgba(245, 200, 111, 0.42) !important;
    overflow: hidden !important;
    background: #050b16 !important;
    box-shadow:
      0 18px 34px rgba(0, 0, 0, 0.42),
      inset 0 0 0 5px rgba(255, 255, 255, 0.03) !important;
  }

  .panel.is-capturing video,
  .panel.is-capturing canvas {
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    object-fit: cover !important;
    object-position: 50% 50% !important;
    border-radius: 16px !important;
  }

  .panel.is-capturing .camera::before {
    opacity: 0.36 !important;
  }

  .panel.is-capturing .camera::after {
    background: radial-gradient(circle at center, transparent 0 34%, rgba(4, 10, 18, 0.12) 58%, rgba(4, 10, 18, 0.26) 100%) !important;
  }

  .panel.is-capturing .cameraStatus {
    top: 14px !important;
    left: 14px !important;
    min-width: 0 !important;
    grid-template-columns: 8px auto !important;
    column-gap: 9px !important;
    padding: 9px 11px !important;
    border-radius: 10px !important;
    background: rgba(16, 23, 34, 0.7) !important;
  }

  .panel.is-capturing .cameraStatus span {
    width: 8px !important;
    height: 8px !important;
  }

  .panel.is-capturing .cameraStatus strong {
    font-size: 11px !important;
    line-height: 1.05 !important;
  }

  .panel.is-capturing .cameraStatus small {
    font-size: 10px !important;
  }

  .panel.is-capturing .faceGuide {
    width: min(64vw, 260px) !important;
    height: min(38svh, 350px) !important;
    max-height: calc(100% - 92px) !important;
    border-width: 3px !important;
    border-color: rgba(245, 218, 159, 0.92) !important;
    box-shadow:
      0 0 0 1px rgba(255, 255, 255, 0.26),
      0 0 0 14px rgba(245, 200, 111, 0.07),
      0 0 36px rgba(245, 200, 111, 0.24) !important;
  }

  .panel.is-capturing .cameraReticle {
    width: min(76vw, 310px) !important;
    height: min(76vw, 310px) !important;
    opacity: 0.5 !important;
  }

  .panel.is-capturing .cameraCorners {
    inset: 22px !important;
    background:
      linear-gradient(#f5c86f, #f5c86f) left top / 50px 1px no-repeat,
      linear-gradient(#f5c86f, #f5c86f) left top / 1px 50px no-repeat,
      linear-gradient(#f5c86f, #f5c86f) right top / 50px 1px no-repeat,
      linear-gradient(#f5c86f, #f5c86f) right top / 1px 50px no-repeat,
      linear-gradient(#f5c86f, #f5c86f) left bottom / 50px 1px no-repeat,
      linear-gradient(#f5c86f, #f5c86f) left bottom / 1px 50px no-repeat,
      linear-gradient(#f5c86f, #f5c86f) right bottom / 50px 1px no-repeat,
      linear-gradient(#f5c86f, #f5c86f) right bottom / 1px 50px no-repeat !important;
    opacity: 0.88 !important;
  }

  .panel.is-capturing .cameraInstruction {
    left: 14px !important;
    right: 14px !important;
    bottom: 12px !important;
    width: auto !important;
    transform: none !important;
    padding: 11px 12px !important;
    border-radius: 12px !important;
    font-size: 13px !important;
    line-height: 1.25 !important;
    text-align: center !important;
  }

  .panel.is-capturing .cameraInstruction span {
    display: block !important;
    white-space: normal !important;
  }

  .panel.is-capturing .cameraInstruction span::before {
    content: "" !important;
    margin: 0 !important;
  }

  .panel.is-capturing .mobileLivenessProgress {
    position: absolute !important;
    z-index: 8 !important;
    left: 14px !important;
    right: 14px !important;
    top: auto !important;
    bottom: 62px !important;
    display: flex !important;
    justify-content: center !important;
    pointer-events: none !important;
  }

  .panel.is-capturing .mobileLivenessProgress div {
    width: auto !important;
    min-height: 30px !important;
    padding: 7px 13px !important;
    border-radius: 999px !important;
    border: 1px solid rgba(245, 200, 111, 0.42) !important;
    background: rgba(9, 15, 26, 0.72) !important;
    color: #f6c86c !important;
    font-size: 11px !important;
    font-weight: 900 !important;
    letter-spacing: 0.05em !important;
    text-transform: uppercase !important;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.32) !important;
  }

  .panel.is-capturing .capturePanel {
    order: 2 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    width: 100% !important;
    min-height: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  .panel.is-capturing .capturePanel .primary {
    order: 1 !important;
    position: sticky !important;
    top: 8px !important;
    z-index: 20 !important;
    width: 100% !important;
    min-height: 58px !important;
    margin: 0 !important;
    border-radius: 14px !important;
    font-size: 16px !important;
    line-height: 1.1 !important;
    letter-spacing: 0 !important;
    box-shadow: 0 14px 28px rgba(190, 132, 38, 0.24) !important;
  }

  .panel.is-capturing .capturePanel .primary::before,
  .panel.is-capturing .capturePanel .primary::after {
    display: none !important;
  }

  .panel.is-capturing .cameraHeader {
    order: 2 !important;
    display: grid !important;
    grid-template-columns: 42px 1fr !important;
    gap: 12px !important;
    align-items: center !important;
    margin: 0 !important;
    padding: 15px !important;
    border: 1px solid rgba(255, 255, 255, 0.11) !important;
    border-radius: 16px !important;
    background:
      radial-gradient(circle at 100% 0%, rgba(245, 200, 111, 0.08), transparent 40%),
      rgba(13, 25, 43, 0.86) !important;
  }

  .panel.is-capturing .cameraHeaderIcon {
    width: 42px !important;
    height: 42px !important;
    grid-row: 1 / span 2 !important;
  }

  .panel.is-capturing .cameraHeaderIcon::before {
    font-size: 20px !important;
  }

  .panel.is-capturing .cameraHeader strong {
    grid-column: 2 !important;
    font-size: 18px !important;
    line-height: 1.08 !important;
    letter-spacing: 0 !important;
    white-space: normal !important;
  }

  .panel.is-capturing .cameraHeader span {
    grid-column: 2 !important;
    display: block !important;
    margin: 0 !important;
    color: #f6c86c !important;
    font-size: 12px !important;
    line-height: 1.2 !important;
    letter-spacing: 0 !important;
    white-space: normal !important;
  }

  .panel.is-capturing .cameraHeader p {
    grid-column: 1 / -1 !important;
    margin: 2px 0 0 !important;
    color: rgba(238, 243, 255, 0.78) !important;
    font-size: 12px !important;
    line-height: 1.45 !important;
    text-align: left !important;
  }

  .panel.is-capturing .poseMessage {
    order: 3 !important;
    margin: 0 !important;
    padding: 11px 12px !important;
    border-radius: 12px !important;
    font-size: 12px !important;
    line-height: 1.35 !important;
  }

  .panel.is-capturing .livenessProgress {
    order: 4 !important;
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 8px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
  }

  .panel.is-capturing .livenessProgress::before {
    display: none !important;
  }

  .panel.is-capturing .livenessProgress button {
    display: grid !important;
    grid-template-columns: 1fr !important;
    justify-items: center !important;
    align-content: center !important;
    gap: 6px !important;
    min-width: 0 !important;
    min-height: 84px !important;
    padding: 11px 8px !important;
    border-radius: 14px !important;
    background: rgba(18, 29, 48, 0.74) !important;
    text-align: center !important;
    overflow: hidden !important;
  }

  .panel.is-capturing .livenessProgress button span {
    position: static !important;
    width: 34px !important;
    height: 34px !important;
    margin: 0 !important;
    transform: none !important;
    font-size: 13px !important;
  }

  .panel.is-capturing .livenessProgress button strong {
    max-width: 100% !important;
    font-size: 14px !important;
    line-height: 1.1 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .panel.is-capturing .livenessProgress button small {
    display: none !important;
  }

  .panel.is-capturing .livenessProgress button em {
    display: none !important;
  }

  .panel.is-capturing .quality {
    order: 5 !important;
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 8px !important;
    width: 100% !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 10px !important;
    border-radius: 16px !important;
    border: 1px solid rgba(245, 200, 111, 0.28) !important;
    background: rgba(5, 11, 20, 0.72) !important;
    overflow: visible !important;
  }

  .panel.is-capturing .qualityToken {
    min-width: 0 !important;
    min-height: 78px !important;
    padding: 9px 5px !important;
    display: grid !important;
    grid-template-rows: auto auto auto !important;
    justify-items: center !important;
    align-content: center !important;
    gap: 5px !important;
    border-radius: 12px !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    background: linear-gradient(180deg, rgba(22, 34, 55, 0.82), rgba(8, 15, 26, 0.8)) !important;
    overflow: hidden !important;
  }

  .panel.is-capturing .qualityToken .qualityIcon {
    width: 30px !important;
    height: 30px !important;
    order: 2 !important;
  }

  .panel.is-capturing .qualityToken .qualityIcon svg {
    width: 17px !important;
    height: 17px !important;
  }

  .panel.is-capturing .qualityToken strong {
    order: 1 !important;
    max-width: 100% !important;
    color: #f7f4ec !important;
    font-size: 11px !important;
    line-height: 1.05 !important;
    text-align: center !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .panel.is-capturing .qualityToken small {
    order: 3 !important;
    min-width: 0 !important;
    color: #72e68e !important;
    font-size: 9px !important;
    line-height: 1 !important;
    letter-spacing: 0.08em !important;
    text-align: center !important;
  }

  .panel.is-capturing .qualityToken.bad {
    background: linear-gradient(180deg, rgba(87, 31, 36, 0.62), rgba(16, 19, 31, 0.82)) !important;
  }

  .panel.is-capturing .qualityToken.bad small {
    color: #ff8f8f !important;
  }

  .panel.is-capturing .supportBlock {
    order: 6 !important;
    margin: 0 !important;
    padding: 14px !important;
    border-radius: 14px !important;
  }
}

@media (max-width: 390px) {
  .panel.is-capturing .camera {
    height: clamp(310px, 45svh, 440px) !important;
  }

  .panel.is-capturing .cameraHeader strong {
    font-size: 16px !important;
  }

  .panel.is-capturing .livenessProgress button {
    min-height: 78px !important;
    padding: 9px 5px !important;
  }

  .panel.is-capturing .livenessProgress button strong {
    font-size: 12px !important;
  }

  .panel.is-capturing .qualityToken strong {
    font-size: 10px !important;
  }
}

/* Dedicated mobile review screen: compact app header and readable review hierarchy. */
@media (max-width: 720px) {
  .shell:has(.panel.is-reviewing) {
    padding: 0 !important;
    align-items: stretch !important;
    min-height: 100svh !important;
    overflow-x: hidden !important;
    background:
      radial-gradient(circle at 20% 0%, rgba(216, 162, 66, 0.16), transparent 34%),
      linear-gradient(180deg, #071221 0%, #030811 100%) !important;
  }

  .panel.is-reviewing {
    width: 100% !important;
    min-height: 100svh !important;
    max-width: none !important;
    border: 0 !important;
    border-radius: 0 !important;
    background:
      linear-gradient(180deg, rgba(13, 24, 42, 0.98), rgba(4, 10, 19, 0.98)) !important;
    overflow-x: hidden !important;
  }

  .panel.is-reviewing .topbar {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    padding: max(12px, env(safe-area-inset-top)) 18px 12px !important;
    border-bottom: 1px solid rgba(245, 200, 111, 0.16) !important;
    text-align: center !important;
  }

  .panel.is-reviewing .logo {
    width: min(210px, 66vw) !important;
    max-height: 54px !important;
    margin: 0 auto !important;
    object-fit: contain !important;
  }

  .panel.is-reviewing .pill {
    width: 100% !important;
    min-height: 34px !important;
    justify-content: center !important;
    padding: 7px 10px !important;
    border-radius: 999px !important;
    font-size: 10px !important;
    line-height: 1.1 !important;
    white-space: nowrap !important;
  }

  .panel.is-reviewing #reviewStep {
    padding: 22px 18px calc(24px + env(safe-area-inset-bottom)) !important;
    margin: 0 !important;
  }

  .panel.is-reviewing #reviewStep > .cameraHeader {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px !important;
    align-items: start !important;
    margin: 0 0 16px !important;
    padding: 0 !important;
    border: 0 !important;
  }

  .panel.is-reviewing #reviewStep > .cameraHeader::before {
    content: "REVIS\u00c3O" !important;
    display: block !important;
    color: #f6c86c !important;
    font-size: 11px !important;
    font-weight: 900 !important;
    letter-spacing: 0.28em !important;
    line-height: 1 !important;
  }

  .panel.is-reviewing #reviewStep > .cameraHeader strong {
    display: block !important;
    max-width: 100% !important;
    color: #ffffff !important;
    font-family: var(--font-body) !important;
    font-size: clamp(29px, 8.3vw, 36px) !important;
    font-weight: 900 !important;
    line-height: 1.05 !important;
    letter-spacing: 0 !important;
    white-space: normal !important;
  }

  .panel.is-reviewing #reviewStep > .cameraHeader span {
    display: block !important;
    max-width: 100% !important;
    color: rgba(219, 228, 244, 0.84) !important;
    font-size: 15px !important;
    line-height: 1.34 !important;
    white-space: normal !important;
  }

  .reviewNotice {
    width: 100% !important;
    min-height: 0 !important;
    margin: 0 0 16px !important;
    padding: 14px 14px 14px 48px !important;
    border-radius: 14px !important;
    font-size: 13px !important;
    line-height: 1.35 !important;
  }

  .reviewNotice::before {
    left: 16px !important;
    font-size: 22px !important;
  }

  .panel.is-reviewing .previewGrid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 14px !important;
    margin: 0 !important;
  }

  .panel.is-reviewing .reviewCard {
    display: block !important;
    border-radius: 16px !important;
    overflow: hidden !important;
  }

  .panel.is-reviewing .reviewImageWrap {
    aspect-ratio: 16 / 10 !important;
  }

  .panel.is-reviewing .reviewSharp {
    top: 12px !important;
    left: 12px !important;
    padding: 6px 10px !important;
    font-size: 11px !important;
  }

  .panel.is-reviewing .reviewZoom {
    top: 12px !important;
    right: 12px !important;
    width: 34px !important;
    height: 34px !important;
  }

  .panel.is-reviewing .reviewCardBody {
    padding: 14px !important;
  }

  .panel.is-reviewing .reviewCardTitle {
    grid-template-columns: 40px 1fr !important;
    gap: 10px !important;
    margin-bottom: 12px !important;
  }

  .panel.is-reviewing .reviewCardTitle > span {
    width: 36px !important;
    height: 36px !important;
    font-size: 16px !important;
  }

  .panel.is-reviewing .reviewCardTitle strong {
    font-size: 18px !important;
    line-height: 1.05 !important;
  }

  .panel.is-reviewing .reviewCardTitle small {
    font-size: 12px !important;
  }

  .panel.is-reviewing .reviewChecks {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    border-radius: 12px !important;
  }

  .panel.is-reviewing .reviewChecks span {
    min-height: 54px !important;
    padding: 8px 4px !important;
    font-size: 10px !important;
    line-height: 1.1 !important;
  }

  .panel.is-reviewing .reviewChecks b {
    width: 18px !important;
    height: 18px !important;
    font-size: 10px !important;
  }

  .panel.is-reviewing .actions {
    position: sticky !important;
    bottom: 0 !important;
    z-index: 30 !important;
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    margin: 16px -18px 0 !important;
    padding: 12px 18px calc(12px + env(safe-area-inset-bottom)) !important;
    background: linear-gradient(180deg, rgba(4, 10, 19, 0), rgba(4, 10, 19, 0.94) 22%) !important;
  }

  .panel.is-reviewing .actions button {
    min-height: 58px !important;
    border-radius: 14px !important;
    font-size: 18px !important;
  }

  .panel.is-reviewing #reviewStep::after {
    display: none !important;
  }
}

/* Mobile capture refinement: keep the first viewport focused on camera + action. */
@media (max-width: 720px) {
  .panel.is-capturing .topbar {
    gap: 9px !important;
    padding: max(10px, env(safe-area-inset-top)) 18px 11px !important;
  }

  .panel.is-capturing .logo {
    width: min(205px, 64vw) !important;
    max-height: 50px !important;
  }

  .panel.is-capturing .pill {
    min-height: 34px !important;
    padding: 7px 10px !important;
    font-size: 10px !important;
  }

  .panel.is-capturing .captureLayout {
    gap: 10px !important;
    padding-top: 12px !important;
  }

  .panel.is-capturing .camera {
    height: clamp(318px, 44svh, 470px) !important;
  }

  .panel.is-capturing .capturePanel {
    gap: 10px !important;
  }

  .panel.is-capturing .cameraHeader {
    grid-template-columns: 34px 1fr !important;
    gap: 10px !important;
    min-height: 0 !important;
    padding: 12px !important;
    align-items: center !important;
  }

  .panel.is-capturing .cameraHeaderIcon {
    width: 34px !important;
    height: 34px !important;
    grid-row: 1 / span 2 !important;
  }

  .panel.is-capturing .cameraHeaderIcon::before {
    font-size: 17px !important;
  }

  .panel.is-capturing .cameraHeader strong {
    font-size: 16px !important;
    line-height: 1.08 !important;
  }

  .panel.is-capturing .cameraHeader span {
    font-size: 11px !important;
    line-height: 1.1 !important;
  }

  .panel.is-capturing .cameraHeader p {
    display: none !important;
  }

  .panel.is-capturing .capturePanel .primary {
    min-height: 56px !important;
  }

  .panel.is-capturing .livenessProgress button {
    min-height: 72px !important;
  }

  .panel.is-capturing .livenessProgress button span {
    width: 30px !important;
    height: 30px !important;
  }

  .panel.is-capturing .livenessProgress button strong {
    font-size: 12px !important;
  }

  .panel.is-capturing .quality {
    padding: 8px !important;
  }

  .panel.is-capturing .qualityToken {
    min-height: 70px !important;
  }
}

/* Final mobile review override: separate app-like review layout from desktop review. */
@media (max-width: 720px) {
  body:has(.panel) {
    background:
      radial-gradient(circle at 20% -10%, rgba(216, 162, 66, 0.14), transparent 35%),
      linear-gradient(180deg, #071221 0%, #030811 100%) !important;
  }

  body:has(.panel) .shell::before {
    display: none !important;
  }

  body:has(.panel.is-reviewing) {
    overflow-x: hidden !important;
    background: #050b14 !important;
  }

  .shell:has(.panel.is-reviewing) {
    padding: 0 !important;
    min-height: 100svh !important;
    align-items: stretch !important;
  }

  .panel.is-reviewing {
    width: 100% !important;
    min-height: 100svh !important;
    max-width: none !important;
    border: 0 !important;
    border-radius: 0 !important;
    overflow-x: hidden !important;
    background:
      radial-gradient(circle at 78% -10%, rgba(217, 164, 74, 0.18), transparent 34%),
      linear-gradient(180deg, #101a2c 0%, #07111f 52%, #030811 100%) !important;
  }

  .panel.is-reviewing .topbar {
    display: grid !important;
    grid-template-columns: 1fr !important;
    justify-items: center !important;
    gap: 11px !important;
    padding: max(14px, env(safe-area-inset-top)) 18px 15px !important;
    border-bottom: 1px solid rgba(246, 200, 108, 0.14) !important;
  }

  .panel.is-reviewing .logo {
    width: min(214px, 68vw) !important;
    max-height: 56px !important;
    object-fit: contain !important;
  }

  .panel.is-reviewing .pill {
    width: auto !important;
    max-width: calc(100vw - 36px) !important;
    min-height: 36px !important;
    padding: 8px 15px !important;
    justify-content: center !important;
    border-radius: 999px !important;
    font-size: 10.5px !important;
    line-height: 1.05 !important;
    white-space: nowrap !important;
  }

  .panel.is-reviewing #reviewStep {
    display: block !important;
    padding: 20px 18px calc(24px + env(safe-area-inset-bottom)) !important;
    margin: 0 !important;
    overflow: visible !important;
  }

  .panel.is-reviewing #reviewStep > .cameraHeader {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px !important;
    margin: 0 0 15px !important;
    padding: 0 !important;
    border: 0 !important;
    min-height: 0 !important;
    text-align: left !important;
  }

  .panel.is-reviewing #reviewStep > .cameraHeader::before {
    content: "REVIS\00C3 O" !important;
    display: block !important;
    color: #f6c86c !important;
    font-size: 11px !important;
    font-weight: 900 !important;
    letter-spacing: 0.26em !important;
    line-height: 1 !important;
  }

  .panel.is-reviewing #reviewStep > .cameraHeader strong {
    display: block !important;
    width: 100% !important;
    max-width: 11ch !important;
    color: #fff !important;
    font-family: var(--font-body) !important;
    font-size: clamp(31px, 8.8vw, 38px) !important;
    font-weight: 900 !important;
    line-height: 1.03 !important;
    letter-spacing: 0 !important;
    white-space: normal !important;
    overflow: visible !important;
  }

  .panel.is-reviewing #reviewStep > .cameraHeader span {
    display: block !important;
    width: 100% !important;
    color: rgba(219, 228, 244, 0.82) !important;
    font-size: 15px !important;
    line-height: 1.35 !important;
    white-space: normal !important;
  }

  .panel.is-reviewing .reviewNotice {
    display: grid !important;
    grid-template-columns: 26px 1fr !important;
    align-items: center !important;
    gap: 12px !important;
    width: 100% !important;
    min-height: 0 !important;
    margin: 0 0 15px !important;
    padding: 14px !important;
    border-radius: 16px !important;
    font-size: 13.5px !important;
    line-height: 1.35 !important;
  }

  .panel.is-reviewing .reviewNotice::before {
    position: static !important;
    transform: none !important;
    font-size: 22px !important;
  }

  .panel.is-reviewing .previewGrid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 14px !important;
    margin: 0 !important;
  }

  .panel.is-reviewing .reviewCard {
    display: block !important;
    min-height: 0 !important;
    border-radius: 18px !important;
    overflow: hidden !important;
  }

  .panel.is-reviewing .reviewImageWrap {
    aspect-ratio: 16 / 10.2 !important;
    min-height: 0 !important;
  }

  .panel.is-reviewing .reviewCardBody {
    padding: 14px !important;
  }

  .panel.is-reviewing .reviewCardTitle {
    grid-template-columns: 40px 1fr !important;
    gap: 10px !important;
    align-items: center !important;
    margin-bottom: 12px !important;
  }

  .panel.is-reviewing .reviewCardTitle > span {
    width: 36px !important;
    height: 36px !important;
    font-size: 16px !important;
  }

  .panel.is-reviewing .reviewCardTitle strong {
    font-size: 19px !important;
    line-height: 1.08 !important;
  }

  .panel.is-reviewing .reviewCardTitle small {
    font-size: 12px !important;
    line-height: 1.2 !important;
  }

  .panel.is-reviewing .reviewChecks {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    border-radius: 13px !important;
    overflow: hidden !important;
  }

  .panel.is-reviewing .reviewChecks span {
    min-height: 54px !important;
    padding: 8px 3px !important;
    font-size: 10px !important;
    line-height: 1.08 !important;
    text-align: center !important;
  }

  .panel.is-reviewing .actions {
    position: sticky !important;
    bottom: 0 !important;
    z-index: 40 !important;
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    margin: 16px -18px 0 !important;
    padding: 12px 18px calc(12px + env(safe-area-inset-bottom)) !important;
    background: linear-gradient(180deg, rgba(3, 8, 17, 0), rgba(3, 8, 17, 0.96) 26%) !important;
  }

  .panel.is-reviewing .actions button {
    min-height: 58px !important;
    border-radius: 15px !important;
    font-size: 18px !important;
  }
}

/* Consent screen premium layout - student/professor entry */
.panel:not(.is-flow-step) {
  width: min(100%, 1480px);
  padding: 38px 46px 34px;
  border-radius: 10px;
  border: 1px solid rgba(216, 162, 66, 0.48);
  background:
    radial-gradient(circle at 91% 43%, rgba(216, 162, 66, 0.18), transparent 19%),
    radial-gradient(circle at 86% 39%, rgba(255, 255, 255, 0.08), transparent 10%),
    linear-gradient(180deg, rgba(12, 22, 38, 0.94), rgba(4, 10, 18, 0.96)),
    var(--panel);
  box-shadow: 0 34px 110px rgba(0, 0, 0, 0.48), inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.panel:not(.is-flow-step)::before {
  height: 3px;
  background: linear-gradient(90deg, transparent, rgba(236, 187, 91, 0.96), transparent);
}

.panel:not(.is-flow-step) .topbar {
  padding-bottom: 28px;
}

.panel:not(.is-flow-step) .logo {
  width: 265px;
}

.panel:not(.is-flow-step) .pill {
  min-height: 42px;
  padding: 10px 20px;
  border-color: rgba(216, 162, 66, 0.9);
  color: #f4bd55;
  background: rgba(3, 8, 17, 0.42);
  font-size: 14px;
  font-weight: 900;
}

.panel:not(.is-flow-step) .intro {
  padding-top: 26px;
}

.panel:not(.is-flow-step) h1 {
  max-width: 1180px;
  margin: 10px 0 8px;
  font-size: clamp(38px, 4vw, 64px);
  line-height: 1.04;
}

.panel:not(.is-flow-step) .lead {
  max-width: 900px;
  color: rgba(247, 244, 236, 0.9);
  font-size: 19px;
}

.panel.is-flow-step .identityCard,
.panel.is-flow-step .statusGridWrap {
  display: none;
}

.identityCard {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 178px minmax(0, 1fr) 230px;
  gap: 24px;
  align-items: center;
  min-height: 170px;
  margin-top: 24px;
  padding: 24px 28px;
  overflow: hidden;
  border: 1px solid rgba(216, 162, 66, 0.68);
  border-radius: 8px;
  background:
    radial-gradient(circle at 94% 50%, rgba(216, 162, 66, 0.18), transparent 20%),
    linear-gradient(135deg, rgba(216, 162, 66, 0.12), rgba(12, 22, 38, 0.78) 28%, rgba(7, 14, 25, 0.78));
  box-shadow: 0 22px 46px rgba(0, 0, 0, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.identityAvatar {
  display: grid;
  place-items: center;
  width: 138px;
  height: 138px;
  border: 1px solid rgba(239, 192, 84, 0.98);
  border-radius: 999px;
  background:
    radial-gradient(circle at 50% 33%, rgba(255, 230, 151, 0.95) 0 15%, transparent 16%),
    radial-gradient(circle at 50% 69%, rgba(216, 162, 66, 0.95) 0 25%, transparent 26%),
    linear-gradient(180deg, rgba(216, 162, 66, 0.22), rgba(216, 162, 66, 0.04));
  box-shadow: inset 0 0 32px rgba(216, 162, 66, 0.22), 0 16px 38px rgba(0, 0, 0, 0.28);
}

.identityAvatar.hasImage {
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  box-shadow:
    inset 0 0 0 3px rgba(5, 10, 18, 0.52),
    0 16px 38px rgba(0, 0, 0, 0.28);
}

.identityAvatar.hasImage span {
  display: none;
}

.identityAvatar span {
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.identityInfo {
  min-width: 0;
}

.identityStatus {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #f6c86c;
  font-size: 14px;
  font-weight: 900;
  text-transform: uppercase;
}

.identityStatus::before {
  content: "\2713";
  display: grid;
  place-items: center;
  width: 21px;
  height: 21px;
  border: 1px solid rgba(246, 200, 108, 0.88);
  border-radius: 999px;
  color: #f6c86c;
  font-size: 13px;
}

.identityCard .student {
  display: block;
  max-width: 720px;
  margin: 10px 0 12px;
  padding: 0 0 14px;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 0;
  color: #fffaf1;
  background: transparent;
  box-shadow: none;
  font-family: var(--font-title);
  font-size: clamp(38px, 3.4vw, 58px);
  font-weight: 700;
  line-height: 1.02;
}

.identityInfo p {
  margin: 0;
  color: rgba(215, 222, 234, 0.82);
  font-size: 16px;
  line-height: 1.45;
}

.identityInfo p span::before {
  content: "\2022";
  margin: 0 12px;
  color: rgba(246, 200, 108, 0.75);
}

.identityWatermark {
  justify-self: end;
  width: 160px;
  height: 160px;
  opacity: 0.11;
  background: url("/eac-logo.svg") center / contain no-repeat;
  filter: brightness(0) invert(1);
}

.statusGridWrap {
  position: relative;
  z-index: 1;
  margin-top: 22px;
}

.panel:not(.is-flow-step) .statusGrid {
  margin-top: 0;
  gap: 20px;
}

.panel:not(.is-flow-step) .statusGrid div {
  min-height: 68px;
  padding: 15px 18px;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(18, 31, 49, 0.8), rgba(8, 16, 28, 0.82));
}

.panel:not(.is-flow-step) .statusGrid strong {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  color: #fff8e8;
  background: linear-gradient(180deg, #d6ad4c, var(--gold-dark));
  font-size: 22px;
  box-shadow: 0 10px 20px rgba(154, 109, 24, 0.24);
}

.panel:not(.is-flow-step) .statusGrid span {
  font-size: 20px;
  font-weight: 800;
}

#consentStep:not(.hidden) {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 22px 24px;
  align-items: stretch;
  margin-top: 22px;
}

#consentStep .mobileQr,
#consentStep .notice {
  margin: 0;
  min-height: 210px;
  border-radius: 8px;
  border-color: rgba(255, 255, 255, 0.13);
  background:
    linear-gradient(135deg, rgba(18, 31, 49, 0.92), rgba(8, 16, 28, 0.94)),
    var(--paper);
}

#consentStep .mobileQr {
  grid-template-columns: minmax(0, 1fr) 150px;
  gap: 22px;
  padding: 24px;
}

#consentStep .qrCopy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
}

#consentStep .qrCopy strong,
#consentStep .notice strong {
  color: #fffaf1;
  font-size: 22px;
  font-weight: 900;
}

#consentStep .qrCopy p,
#consentStep .notice p {
  color: rgba(234, 239, 249, 0.88);
  font-size: 16px;
  line-height: 1.5;
}

#consentStep .linkButton {
  width: fit-content;
  min-width: 300px;
  font-size: 16px;
}

#consentStep .qrFrame {
  align-self: center;
  width: 150px;
  height: 150px;
  border-radius: 8px;
}

#consentStep .qrFrame img {
  width: 128px;
  height: 128px;
}

#consentStep .notice {
  padding: 28px 30px;
}

#consentStep .check {
  grid-column: 1 / 2;
  align-self: center;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

#consentStep .check span {
  color: rgba(247, 244, 236, 0.9);
  font-size: 17px;
  line-height: 1.45;
}

#consentStep #startBtn {
  grid-column: 2 / 3;
  align-self: center;
  min-height: 64px;
  margin: 0;
  font-size: 19px;
}

@media (max-width: 980px) {
  .panel:not(.is-flow-step) {
    width: min(100%, 720px);
    padding: 26px 22px;
  }

  .identityCard {
    grid-template-columns: 96px minmax(0, 1fr);
    min-height: 128px;
    padding: 18px;
  }

  .identityAvatar {
    width: 86px;
    height: 86px;
  }

  .identityWatermark {
    display: none;
  }

  .identityCard .student {
    font-size: clamp(32px, 8vw, 44px);
  }

  #consentStep:not(.hidden) {
    grid-template-columns: 1fr;
  }

  #consentStep .check,
  #consentStep #startBtn {
    grid-column: 1;
  }
}

@media (max-width: 640px) {
  .panel:not(.is-flow-step) {
    width: min(100%, 430px);
    padding: 20px 16px;
    border-radius: 0;
  }

  .panel:not(.is-flow-step) .topbar {
    align-items: center;
    gap: 16px;
    padding-bottom: 20px;
  }

  .panel:not(.is-flow-step) .logo {
    width: min(260px, 78vw);
    max-width: 100%;
  }

  .panel:not(.is-flow-step) .pill {
    width: 100%;
    justify-content: center;
    white-space: normal;
    text-align: center;
  }

  .panel:not(.is-flow-step) .intro {
    padding-top: 20px;
    text-align: left;
  }

  .panel:not(.is-flow-step) h1 {
    font-size: clamp(34px, 10vw, 46px);
  }

  .panel:not(.is-flow-step) .lead {
    font-size: 16px;
  }

  .identityCard {
    grid-template-columns: 1fr;
    gap: 14px;
    margin-top: 18px;
    padding: 18px;
  }

  .identityAvatar {
    width: 74px;
    height: 74px;
  }

  .identityCard .student {
    font-size: clamp(34px, 11vw, 46px);
  }

  .identityInfo p {
    font-size: 14px;
  }

  .panel:not(.is-flow-step) .statusGrid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .panel:not(.is-flow-step) .statusGrid div {
    min-height: 58px;
  }

  #consentStep .mobileQr {
    grid-template-columns: 1fr;
    padding: 18px;
  }

  #consentStep .qrFrame {
    justify-self: center;
  }

  #consentStep .linkButton {
    width: 100%;
    min-width: 0;
  }

  #consentStep .notice {
    padding: 20px;
  }
}

/* Desktop viewport fit and animated hero background lines */
body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

body::before {
  background:
    linear-gradient(115deg, transparent 0 18%, rgba(216, 162, 66, 0.34) 18.08%, transparent 18.22% 100%),
    linear-gradient(115deg, transparent 0 42%, rgba(216, 162, 66, 0.22) 42.08%, transparent 42.22% 100%),
    linear-gradient(295deg, transparent 0 68%, rgba(216, 162, 66, 0.26) 68.08%, transparent 68.2% 100%);
  background-size: 140% 140%, 160% 160%, 150% 150%;
  opacity: 0.72;
  animation: eacGoldLinesDrift 14s linear infinite;
}

body::after {
  background:
    radial-gradient(circle at 3% 12%, rgba(216, 162, 66, 0.24) 0 1px, transparent 2px),
    radial-gradient(circle at 97% 16%, rgba(216, 162, 66, 0.18) 0 1px, transparent 2px),
    radial-gradient(circle at 98% 88%, rgba(216, 162, 66, 0.16) 0 1px, transparent 2px);
  background-size: 22px 22px, 20px 20px, 24px 24px;
  opacity: 0.55;
  animation: eacGoldPointsPulse 6s ease-in-out infinite alternate;
}

@keyframes eacGoldLinesDrift {
  0% {
    background-position: 0% 0%, 100% 0%, 0% 100%;
  }
  100% {
    background-position: 100% 30%, 0% 42%, 100% 72%;
  }
}

@keyframes eacGoldPointsPulse {
  from {
    opacity: 0.36;
    transform: translate3d(0, 0, 0);
  }
  to {
    opacity: 0.68;
    transform: translate3d(0, -8px, 0);
  }
}

@media (min-width: 981px) {
  .shell {
    place-items: center;
    padding: clamp(18px, 2.4vh, 28px) clamp(72px, 5vw, 118px);
  }

  .panel:not(.is-flow-step) {
    width: min(100%, 1480px);
    max-height: calc(100svh - 42px);
    padding: clamp(22px, 2.4vh, 30px) clamp(34px, 3vw, 46px);
    overflow: hidden;
  }

  .panel:not(.is-flow-step) .topbar {
    min-height: 58px;
    padding-bottom: clamp(14px, 1.6vh, 22px);
  }

  .panel:not(.is-flow-step) .logo {
    width: clamp(210px, 15vw, 250px);
  }

  .panel:not(.is-flow-step) .intro {
    padding-top: clamp(14px, 1.8vh, 22px);
  }

  .panel:not(.is-flow-step) h1 {
    margin: 6px 0 7px;
    font-size: clamp(42px, 3.25vw, 56px);
  }

  .panel:not(.is-flow-step) .lead {
    font-size: clamp(16px, 1.05vw, 18px);
    line-height: 1.34;
  }

  .identityCard {
    grid-template-columns: 130px minmax(0, 1fr) 170px;
    min-height: clamp(116px, 15vh, 142px);
    margin-top: clamp(14px, 1.8vh, 20px);
    padding: clamp(16px, 1.8vh, 22px) 26px;
  }

  .identityAvatar {
    width: clamp(92px, 10vh, 112px);
    height: clamp(92px, 10vh, 112px);
  }

  .identityCard .student {
    margin: 7px 0 8px;
    padding-bottom: 9px;
    font-size: clamp(38px, 2.8vw, 52px);
  }

  .identityWatermark {
    width: clamp(100px, 11vh, 136px);
    height: clamp(100px, 11vh, 136px);
  }

  .statusGridWrap {
    margin-top: clamp(14px, 1.6vh, 20px);
  }

  .panel:not(.is-flow-step) .statusGrid {
    gap: 18px;
  }

  .panel:not(.is-flow-step) .statusGrid div {
    min-height: clamp(52px, 6.4vh, 64px);
    padding: 10px 16px;
  }

  .panel:not(.is-flow-step) .statusGrid strong {
    width: clamp(38px, 4.8vh, 44px);
    height: clamp(38px, 4.8vh, 44px);
    flex-basis: clamp(38px, 4.8vh, 44px);
    font-size: 20px;
  }

  .panel:not(.is-flow-step) .statusGrid span {
    font-size: clamp(17px, 1.18vw, 20px);
  }

  #consentStep:not(.hidden) {
    gap: 16px 22px;
    margin-top: clamp(14px, 1.6vh, 20px);
  }

  #consentStep .mobileQr,
  #consentStep .notice {
    min-height: clamp(142px, 18vh, 172px);
  }

  #consentStep .mobileQr {
    grid-template-columns: minmax(0, 1fr) clamp(112px, 13vh, 136px);
    gap: 16px;
    padding: clamp(16px, 1.8vh, 22px);
  }

  #consentStep .qrCopy strong,
  #consentStep .notice strong {
    font-size: clamp(18px, 1.28vw, 22px);
  }

  #consentStep .qrCopy p,
  #consentStep .notice p {
    margin: 7px 0 10px;
    font-size: clamp(14px, 0.95vw, 16px);
    line-height: 1.36;
  }

  #consentStep .qrFrame {
    width: clamp(112px, 13vh, 136px);
    height: clamp(112px, 13vh, 136px);
  }

  #consentStep .qrFrame img {
    width: calc(clamp(112px, 13vh, 136px) - 20px);
    height: calc(clamp(112px, 13vh, 136px) - 20px);
  }

  #consentStep .notice {
    padding: clamp(18px, 2vh, 24px);
  }

  #consentStep .check span {
    font-size: clamp(14px, 0.95vw, 16px);
    line-height: 1.34;
  }

  #consentStep #startBtn {
    min-height: clamp(52px, 6vh, 60px);
  }
}

@media (min-width: 981px) and (max-height: 820px) {
  .panel:not(.is-flow-step) {
    width: min(100%, 1400px);
    padding-top: 18px;
    padding-bottom: 18px;
  }

  .panel:not(.is-flow-step) .topbar {
    min-height: 48px;
  }

  .panel:not(.is-flow-step) .logo {
    width: 205px;
  }

  .panel:not(.is-flow-step) .intro {
    padding-top: 12px;
  }

  .panel:not(.is-flow-step) h1 {
    font-size: clamp(38px, 3vw, 50px);
  }

  .identityCard {
    min-height: 112px;
  }

  .identityCard .student {
    font-size: clamp(34px, 2.65vw, 46px);
  }

  #consentStep .mobileQr,
  #consentStep .notice {
    min-height: 136px;
  }
}

/* Mobile correction: compact first screen */
@media (max-width: 640px) {
  .shell {
    display: block;
    min-height: 100svh;
    padding: 0;
  }

  .panel:not(.is-flow-step) {
    width: 100%;
    min-height: 100svh;
    padding: 18px 16px 24px;
    border-right: 0;
    border-left: 0;
    border-radius: 0;
    overflow: visible;
  }

  .panel:not(.is-flow-step) .topbar {
    flex-direction: column;
    gap: 12px;
    padding-bottom: 16px;
  }

  .panel:not(.is-flow-step) .logo {
    width: min(245px, 72vw);
  }

  .panel:not(.is-flow-step) .pill {
    min-height: 38px;
    padding: 8px 14px;
    font-size: 12px;
  }

  .panel:not(.is-flow-step) .intro {
    padding-top: 16px;
  }

  .panel:not(.is-flow-step) .eyebrow {
    font-size: 12px;
  }

  .panel:not(.is-flow-step) h1 {
    max-width: 330px;
    margin: 8px 0 8px;
    font-size: clamp(34px, 9vw, 40px);
    line-height: 0.98;
  }

  .panel:not(.is-flow-step) .lead {
    max-width: 340px;
    font-size: 15px;
    line-height: 1.38;
  }

  .identityCard {
    grid-template-columns: 66px minmax(0, 1fr);
    gap: 14px;
    min-height: 0;
    margin-top: 16px;
    padding: 14px;
    align-items: center;
  }

  .identityAvatar {
    width: 58px;
    height: 58px;
    align-self: start;
    margin-top: 2px;
  }

  .identityStatus {
    gap: 7px;
    font-size: 11px;
  }

  .identityStatus::before {
    width: 18px;
    height: 18px;
    font-size: 11px;
  }

  .identityCard .student {
    max-width: 100%;
    margin: 6px 0 7px;
    padding-bottom: 7px;
    font-size: clamp(28px, 8vw, 34px);
    line-height: 1;
  }

  .identityInfo p {
    font-size: 12px;
    line-height: 1.28;
  }

  .identityInfo p span::before {
    margin: 0 6px;
  }

  .statusGridWrap {
    margin-top: 12px;
  }

  .panel:not(.is-flow-step) .statusGrid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .panel:not(.is-flow-step) .statusGrid div {
    min-height: 48px;
    padding: 8px 6px;
    gap: 6px;
    justify-content: center;
  }

  .panel:not(.is-flow-step) .statusGrid strong {
    width: 30px;
    height: 30px;
    flex-basis: 30px;
    font-size: 15px;
  }

  .panel:not(.is-flow-step) .statusGrid span {
    font-size: 11px;
    line-height: 1.05;
  }

  #consentStep:not(.hidden) {
    gap: 12px;
    margin-top: 12px;
  }

  #consentStep .mobileQr {
    display: none !important;
  }

  #consentStep .notice {
    min-height: 0;
    padding: 16px;
  }

  #consentStep .notice strong {
    font-size: 18px;
  }

  #consentStep .notice p {
    font-size: 13px;
    line-height: 1.38;
  }

  #consentStep .check {
    gap: 10px;
    padding: 0;
  }

  #consentStep .check span {
    font-size: 13px;
    line-height: 1.34;
  }

  #consentStep #startBtn {
    min-height: 54px;
    font-size: 16px;
  }
}

/* Final consent and identity meta corrections */
.identityInfo p {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  max-width: min(100%, 780px);
}

.identityInfo p span::before {
  content: none;
  margin: 0;
}

.identityMetaSep {
  color: rgba(246, 200, 108, 0.72);
  font-weight: 800;
}

.identityMetaItem {
  white-space: nowrap;
}

#consentStep .mobileQr,
#consentStep .notice {
  box-sizing: border-box;
  height: auto;
  min-height: 0;
  overflow: visible;
}

#consentStep .notice p,
#consentStep .qrCopy p,
#consentStep .check span {
  overflow-wrap: break-word;
}

@media (min-width: 981px) {
  #consentStep .notice {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(18px, 1.7vw, 26px);
  }

  #consentStep .notice p {
    margin-bottom: 0;
    line-height: 1.42;
  }
}

@media (max-width: 640px) {
  .identityInfo p {
    gap: 7px;
  }

  .identityMetaSep {
    display: none;
  }

  .identityMetaItem {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 9px;
    border: 1px solid rgba(246, 200, 108, 0.18);
    border-radius: 999px;
    color: rgba(238, 243, 252, 0.88);
    background: rgba(255, 255, 255, 0.045);
    font-size: 12px;
    line-height: 1.12;
    white-space: normal;
  }

  #consentStep .notice {
    display: block;
    padding: 14px;
    max-height: none;
  }

  #consentStep .notice strong {
    display: block;
    margin-bottom: 8px;
    font-size: 17px;
    line-height: 1.18;
  }

  #consentStep .notice p {
    margin: 0;
    font-size: 12.5px;
    line-height: 1.38;
  }
}

/* Final desktop framing: keep the first screen premium without occupying the full viewport */
@media (min-width: 981px) {
  .shell:has(.panel:not(.is-flow-step)) {
    padding: clamp(22px, 3.2vh, 42px) clamp(96px, 7.2vw, 180px);
  }

  .panel:not(.is-flow-step) {
    width: min(86vw, 1360px) !important;
    max-height: calc(100svh - clamp(44px, 6.4vh, 84px));
    padding: clamp(20px, 2vh, 26px) clamp(30px, 2.5vw, 40px) !important;
  }

  .panel:not(.is-flow-step) .topbar {
    min-height: 50px;
    padding-bottom: clamp(12px, 1.3vh, 16px);
  }

  .panel:not(.is-flow-step) .logo {
    width: clamp(190px, 13vw, 225px);
  }

  .panel:not(.is-flow-step) .pill {
    min-height: 38px;
    padding: 9px 22px;
    font-size: 13px;
  }

  .panel:not(.is-flow-step) .intro {
    padding-top: clamp(12px, 1.4vh, 18px);
  }

  .panel:not(.is-flow-step) h1 {
    margin: 4px 0 6px;
    font-size: clamp(38px, 2.7vw, 50px);
  }

  .panel:not(.is-flow-step) .lead {
    max-width: 820px;
    font-size: clamp(15px, 0.95vw, 17px);
  }

  .identityCard {
    grid-template-columns: 112px minmax(0, 1fr) 132px;
    min-height: clamp(104px, 13vh, 126px);
    margin-top: clamp(12px, 1.45vh, 16px);
    padding: clamp(14px, 1.45vh, 18px) clamp(20px, 2vw, 28px);
  }

  .identityAvatar {
    width: clamp(84px, 9vh, 100px);
    height: clamp(84px, 9vh, 100px);
  }

  .identityStatus {
    font-size: 13px;
  }

  .identityCard .student {
    max-width: 620px;
    margin: 5px 0 7px;
    padding-bottom: 8px;
    font-size: clamp(34px, 2.35vw, 46px);
  }

  .identityInfo p {
    max-width: 720px;
    font-size: 14.5px;
  }

  .identityWatermark {
    width: clamp(88px, 9vh, 116px);
    height: clamp(88px, 9vh, 116px);
  }

  .statusGridWrap {
    margin-top: clamp(12px, 1.35vh, 16px);
  }

  .panel:not(.is-flow-step) .statusGrid {
    gap: clamp(12px, 1.6vw, 18px);
  }

  .panel:not(.is-flow-step) .statusGrid div {
    min-height: clamp(48px, 5.6vh, 58px);
    padding: 9px 15px;
  }

  .panel:not(.is-flow-step) .statusGrid strong {
    width: clamp(34px, 4.2vh, 40px);
    height: clamp(34px, 4.2vh, 40px);
    flex-basis: clamp(34px, 4.2vh, 40px);
    font-size: 18px;
  }

  .panel:not(.is-flow-step) .statusGrid span {
    font-size: clamp(16px, 1vw, 18px);
  }

  #consentStep:not(.hidden) {
    gap: clamp(12px, 1.5vh, 16px) clamp(16px, 1.8vw, 22px);
    margin-top: clamp(12px, 1.35vh, 16px);
  }

  #consentStep .mobileQr,
  #consentStep .notice {
    min-height: clamp(124px, 15.5vh, 154px);
  }

  #consentStep .mobileQr {
    grid-template-columns: minmax(0, 1fr) clamp(104px, 11.5vh, 124px);
    padding: clamp(14px, 1.5vh, 18px);
  }

  #consentStep .qrCopy strong,
  #consentStep .notice strong {
    font-size: clamp(17px, 1.08vw, 20px);
  }

  #consentStep .qrCopy p,
  #consentStep .notice p {
    font-size: clamp(13px, 0.82vw, 15px);
    line-height: 1.34;
  }

  #consentStep .qrFrame {
    width: clamp(104px, 11.5vh, 124px);
    height: clamp(104px, 11.5vh, 124px);
  }

  #consentStep .qrFrame img {
    width: calc(100% - 18px);
    height: calc(100% - 18px);
  }

  #consentStep .check span {
    font-size: 15px;
    line-height: 1.34;
  }

  #consentStep #startBtn {
    min-height: clamp(48px, 5.4vh, 58px);
    font-size: 17px;
  }
}

@media (min-width: 981px) and (max-width: 1500px) {
  .shell:has(.panel:not(.is-flow-step)) {
    padding-inline: clamp(54px, 5vw, 86px);
  }

  .panel:not(.is-flow-step) {
    width: min(90vw, 1240px) !important;
  }
}

@media (min-width: 981px) and (max-height: 780px) {
  .shell:has(.panel:not(.is-flow-step)) {
    padding-block: 16px;
  }

  .panel:not(.is-flow-step) {
    max-height: calc(100svh - 32px);
  }

  .identityWatermark {
    opacity: 0.07;
  }
}

/* Responsive hardening - compact notebooks and external displays.
   Keeps the approved visual language while preventing clipped footers and capture-panel collisions. */
@media (min-width: 721px) {
  .panel.is-capturing .cameraHeader {
    display: grid !important;
    grid-template-columns: clamp(30px, 3.4vw, 44px) minmax(0, 1fr) !important;
    grid-template-areas:
      "icon title"
      "icon hint"
      "intro intro" !important;
    align-items: start !important;
    row-gap: 5px !important;
    column-gap: 12px !important;
  }

  .panel.is-capturing .cameraHeader > .cameraHeaderIcon {
    grid-area: icon !important;
    align-self: start !important;
  }

  .panel.is-capturing .cameraHeader > strong {
    grid-area: title !important;
    min-width: 0 !important;
  }

  .panel.is-capturing .cameraHeader > #poseHint {
    grid-area: hint !important;
    min-width: 0 !important;
    margin: 0 !important;
  }

  .panel.is-capturing .cameraHeader > #poseIntro {
    grid-area: intro !important;
    min-width: 0 !important;
    margin: 5px 0 0 !important;
    padding: 0 !important;
    text-align: left !important;
  }
}

@media (min-width: 981px) {
  .panel:not(.is-flow-step) {
    overflow-y: auto !important;
    overflow-x: hidden !important;
    scrollbar-width: thin;
    scrollbar-color: rgba(216, 162, 66, 0.44) rgba(5, 11, 20, 0.22);
  }

  .panel:not(.is-flow-step)::-webkit-scrollbar {
    width: 8px;
  }

  .panel:not(.is-flow-step)::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(216, 162, 66, 0.42);
  }
}

@media (min-width: 981px) and (max-height: 780px) {
  .shell:has(.panel:not(.is-flow-step)) {
    padding: 12px clamp(58px, 5vw, 96px) !important;
  }

  .panel:not(.is-flow-step) {
    width: min(88vw, 1240px) !important;
    max-height: calc(100dvh - 24px) !important;
    padding: 14px clamp(24px, 2.2vw, 32px) 16px !important;
  }

  .panel:not(.is-flow-step) .topbar {
    min-height: 42px !important;
    padding-bottom: 9px !important;
  }

  .panel:not(.is-flow-step) .logo {
    width: clamp(168px, 12vw, 196px) !important;
  }

  .panel:not(.is-flow-step) .pill {
    min-height: 32px !important;
    padding: 7px 17px !important;
    font-size: 11.5px !important;
  }

  .panel:not(.is-flow-step) .intro {
    padding-top: 8px !important;
  }

  .panel:not(.is-flow-step) h1 {
    margin: 3px 0 4px !important;
    font-size: clamp(32px, 2.55vw, 42px) !important;
    line-height: 1.03 !important;
  }

  .panel:not(.is-flow-step) .lead {
    font-size: 14.5px !important;
    line-height: 1.28 !important;
  }

  .identityCard {
    grid-template-columns: 88px minmax(0, 1fr) 92px !important;
    min-height: 92px !important;
    margin-top: 10px !important;
    padding: 12px 18px !important;
  }

  .identityAvatar {
    width: 72px !important;
    height: 72px !important;
  }

  .identityStatus {
    font-size: 11.5px !important;
  }

  .identityCard .student {
    margin: 3px 0 5px !important;
    padding-bottom: 6px !important;
    font-size: clamp(28px, 2.25vw, 38px) !important;
    line-height: 1 !important;
  }

  .identityInfo p {
    font-size: 13px !important;
    line-height: 1.24 !important;
    gap: 6px !important;
  }

  .identityWatermark {
    width: 78px !important;
    height: 78px !important;
  }

  .statusGridWrap {
    margin-top: 10px !important;
  }

  .panel:not(.is-flow-step) .statusGrid {
    gap: 10px !important;
  }

  .panel:not(.is-flow-step) .statusGrid div {
    min-height: 44px !important;
    padding: 7px 12px !important;
  }

  .panel:not(.is-flow-step) .statusGrid strong {
    width: 32px !important;
    height: 32px !important;
    flex-basis: 32px !important;
    font-size: 16px !important;
  }

  .panel:not(.is-flow-step) .statusGrid span {
    font-size: 15px !important;
  }

  #consentStep:not(.hidden) {
    gap: 10px 14px !important;
    margin-top: 10px !important;
  }

  #consentStep .mobileQr,
  #consentStep .notice {
    min-height: 108px !important;
  }

  #consentStep .mobileQr {
    grid-template-columns: minmax(0, 1fr) 92px !important;
    gap: 12px !important;
    padding: 12px 14px !important;
  }

  #consentStep .qrCopy strong,
  #consentStep .notice strong {
    font-size: 16px !important;
    line-height: 1.16 !important;
  }

  #consentStep .qrCopy p,
  #consentStep .notice p {
    margin: 5px 0 8px !important;
    font-size: 12.5px !important;
    line-height: 1.25 !important;
  }

  #consentStep .qrFrame {
    width: 92px !important;
    height: 92px !important;
  }

  #consentStep .qrFrame img {
    width: 78px !important;
    height: 78px !important;
  }

  #consentStep .linkButton {
    min-height: 38px !important;
    min-width: 0 !important;
    padding: 9px 14px !important;
    font-size: 13.5px !important;
  }

  #consentStep .notice {
    padding: 13px 16px !important;
  }

  #consentStep .check span {
    font-size: 13px !important;
    line-height: 1.24 !important;
  }

  #consentStep #startBtn {
    min-height: 44px !important;
    font-size: 15px !important;
  }
}

@media (min-width: 721px) and (max-height: 820px) {
  .panel.is-capturing {
    width: min(94vw, 1500px) !important;
    height: calc(100dvh - 24px) !important;
    max-height: calc(100dvh - 24px) !important;
  }

  .panel.is-capturing .topbar {
    padding: 8px 22px !important;
  }

  .panel.is-capturing .logo {
    width: clamp(170px, 14vw, 205px) !important;
  }

  .panel.is-capturing .pill {
    min-height: 30px !important;
    padding: 6px 14px !important;
    font-size: 10px !important;
  }

  .panel.is-capturing .captureLayout {
    grid-template-columns: minmax(0, 1.48fr) minmax(330px, 0.72fr) !important;
    gap: 12px !important;
    padding: 10px 18px 12px !important;
  }

  .panel.is-capturing .capturePanel {
    gap: 7px !important;
    padding: 12px !important;
  }

  .panel.is-capturing .cameraHeader {
    padding-bottom: 7px !important;
    border-bottom-color: rgba(245, 200, 111, 0.24) !important;
  }

  .panel.is-capturing .cameraHeader > .cameraHeaderIcon {
    width: 32px !important;
    height: 32px !important;
  }

  .panel.is-capturing .cameraHeader > strong {
    font-size: clamp(18px, 1.55vw, 21px) !important;
    line-height: 1.04 !important;
  }

  .panel.is-capturing .cameraHeader > #poseHint {
    font-size: 11.5px !important;
    line-height: 1.1 !important;
  }

  .panel.is-capturing .cameraHeader > #poseIntro {
    font-size: 11px !important;
    line-height: 1.22 !important;
  }

  .panel.is-capturing .livenessProgress {
    gap: 7px !important;
  }

  .panel.is-capturing .livenessProgress button {
    min-height: 42px !important;
    padding: 6px 10px !important;
    grid-template-columns: 34px minmax(0, 1fr) !important;
    column-gap: 10px !important;
  }

  .panel.is-capturing .livenessProgress button span {
    width: 28px !important;
    height: 28px !important;
    font-size: 13px !important;
  }

  .panel.is-capturing .livenessProgress button strong {
    font-size: 15px !important;
  }

  .panel.is-capturing .livenessProgress button small {
    font-size: 10.5px !important;
  }

  .panel.is-capturing .quality {
    min-height: 58px !important;
    padding: 6px !important;
    gap: 6px !important;
  }

  .panel.is-capturing .qualityToken {
    min-height: 48px !important;
    padding: 6px 4px !important;
  }

  .panel.is-capturing .qualityToken .qualityIcon {
    width: 24px !important;
    height: 24px !important;
  }

  .panel.is-capturing .qualityToken strong {
    font-size: 10px !important;
  }

  .panel.is-capturing .qualityToken small {
    font-size: 8px !important;
  }

  .panel.is-capturing .capturePanel .primary {
    min-height: 48px !important;
    padding: 8px 12px !important;
    font-size: clamp(16px, 1.45vw, 20px) !important;
  }
}

/* Review/done responsive hardening for low desktop viewports. */
@media (min-width: 981px) and (max-height: 820px) {
  .shell:has(.panel.is-reviewing),
  .shell:has(.panel.is-done) {
    padding: 10px clamp(36px, 4vw, 70px) !important;
    align-items: center !important;
    overflow: hidden !important;
  }

  .panel.is-reviewing {
    width: min(92vw, 1380px) !important;
    height: calc(100dvh - 20px) !important;
    max-height: calc(100dvh - 20px) !important;
    display: grid !important;
    grid-template-rows: auto minmax(0, 1fr) !important;
    overflow: hidden !important;
  }

  .panel.is-reviewing .topbar {
    min-height: 42px !important;
    padding: 8px clamp(20px, 2.2vw, 32px) !important;
  }

  .panel.is-reviewing .logo {
    width: clamp(170px, 13vw, 210px) !important;
  }

  .panel.is-reviewing .pill {
    min-height: 30px !important;
    padding: 6px 16px !important;
    font-size: 10px !important;
  }

  .panel.is-reviewing #reviewStep {
    min-height: 0 !important;
    height: 100% !important;
    display: grid !important;
    grid-template-rows: auto minmax(0, 1fr) auto auto !important;
    row-gap: 10px !important;
    padding: 12px clamp(22px, 2.4vw, 34px) 10px !important;
    overflow: hidden !important;
  }

  .panel.is-reviewing #reviewStep > .cameraHeader {
    margin: 0 !important;
    gap: 4px !important;
  }

  .panel.is-reviewing #reviewStep > .cameraHeader::before {
    font-size: 10px !important;
    letter-spacing: 0.24em !important;
  }

  .panel.is-reviewing #reviewStep > .cameraHeader strong {
    font-size: clamp(24px, 2.2vw, 34px) !important;
    line-height: 1.05 !important;
  }

  .panel.is-reviewing #reviewStep > .cameraHeader span {
    font-size: 13px !important;
    line-height: 1.2 !important;
  }

  .panel.is-reviewing .reviewNotice {
    min-height: 0 !important;
    margin: 0 !important;
    padding: 10px 14px 10px 42px !important;
    font-size: 12.5px !important;
    line-height: 1.25 !important;
  }

  .panel.is-reviewing .previewGrid {
    min-height: 0 !important;
    height: 100% !important;
    gap: clamp(10px, 1.2vw, 16px) !important;
  }

  .panel.is-reviewing .reviewCard {
    min-height: 0 !important;
    display: grid !important;
    grid-template-rows: minmax(0, 1fr) auto !important;
    overflow: hidden !important;
  }

  .panel.is-reviewing .reviewImageWrap {
    min-height: 0 !important;
    height: auto !important;
    aspect-ratio: auto !important;
  }

  .panel.is-reviewing .reviewCardBody {
    padding: 9px 12px 10px !important;
  }

  .panel.is-reviewing .reviewCardTitle {
    grid-template-columns: 32px 1fr !important;
    gap: 8px !important;
    margin-bottom: 8px !important;
  }

  .panel.is-reviewing .reviewCardTitle > span {
    width: 30px !important;
    height: 30px !important;
    font-size: 14px !important;
  }

  .panel.is-reviewing .reviewCardTitle strong {
    font-size: 17px !important;
    line-height: 1 !important;
  }

  .panel.is-reviewing .reviewCardTitle small {
    font-size: 11px !important;
    line-height: 1.1 !important;
  }

  .panel.is-reviewing .reviewChecks span {
    min-height: 42px !important;
    padding: 6px 4px !important;
    font-size: 10px !important;
    line-height: 1.05 !important;
  }

  .panel.is-reviewing .actions {
    margin: 0 !important;
    gap: 14px !important;
  }

  .panel.is-reviewing .actions button {
    min-height: 50px !important;
    font-size: clamp(17px, 1.45vw, 22px) !important;
  }

  .panel.is-reviewing #reviewStep::after {
    margin-top: 0 !important;
    font-size: 12px !important;
    line-height: 1.1 !important;
  }

  .panel.is-done {
    width: min(82vw, 1180px) !important;
    height: calc(100dvh - 20px) !important;
    max-height: calc(100dvh - 20px) !important;
    overflow: hidden !important;
  }

  .panel.is-done .topbar {
    padding: 10px clamp(24px, 3vw, 42px) !important;
  }

  .panel.is-done #doneStep {
    padding: 14px clamp(28px, 3vw, 48px) 0 !important;
  }

  .approvalHero {
    width: clamp(72px, 10vh, 96px) !important;
    height: clamp(72px, 10vh, 96px) !important;
    margin-bottom: 8px !important;
  }

  .approvalCheck {
    width: clamp(68px, 9vh, 88px) !important;
    height: clamp(68px, 9vh, 88px) !important;
  }

  .doneBadge {
    min-height: 28px !important;
    font-size: 10px !important;
  }

  .panel.is-done h2 {
    margin: 10px 0 8px !important;
    font-size: clamp(30px, 5vh, 44px) !important;
  }

  .doneDivider {
    margin-bottom: 8px !important;
  }

  .doneLead,
  .doneCopy {
    font-size: clamp(13px, 1.85vh, 17px) !important;
    line-height: 1.3 !important;
  }

  .panel.is-done .closePage {
    min-height: clamp(44px, 6vh, 56px) !important;
    margin: 12px auto 6px !important;
    font-size: clamp(17px, 2.4vh, 22px) !important;
  }

  .doneSecurity {
    min-height: clamp(38px, 5.6vh, 52px) !important;
    font-size: 11px !important;
  }
}

/* Final viewport fixes - prevents notebook/taskbar clipping and right-panel text collisions. */
@media (min-width: 981px) and (max-height: 820px) {
  .shell:has(.panel.is-capturing),
  .shell:has(.panel.is-reviewing),
  .shell:has(.panel.is-done) {
    padding-top: 12px !important;
    padding-bottom: 34px !important;
  }

  .panel.is-capturing,
  .panel.is-reviewing,
  .panel.is-done {
    max-height: calc(100dvh - 46px) !important;
  }

  .panel.is-capturing {
    height: calc(100dvh - 46px) !important;
  }

  .panel.is-capturing .captureLayout {
    grid-template-columns: minmax(0, 1.55fr) minmax(360px, 0.72fr) !important;
    min-height: 0 !important;
  }

  .panel.is-capturing .capturePanel {
    min-height: 0 !important;
    display: grid !important;
    grid-template-rows: auto auto auto auto !important;
    align-content: stretch !important;
    overflow: hidden !important;
  }

  .panel.is-capturing .cameraHeader {
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 0 8px !important;
    row-gap: 4px !important;
  }

  .panel.is-capturing .cameraHeader > strong {
    white-space: normal !important;
  }

  .panel.is-capturing .cameraHeader > #poseHint {
    white-space: normal !important;
  }

  .panel.is-capturing .cameraHeader > #poseIntro {
    max-height: 34px !important;
    overflow: hidden !important;
  }

  .panel.is-capturing .livenessProgress button {
    min-width: 0 !important;
    grid-template-columns: 38px minmax(0, 1fr) !important;
    grid-template-areas:
      "num title"
      "num desc" !important;
    align-items: center !important;
  }

  .panel.is-capturing .livenessProgress button span {
    grid-area: num !important;
  }

  .panel.is-capturing .livenessProgress button strong {
    grid-area: title !important;
    min-width: 0 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .panel.is-capturing .livenessProgress button small {
    grid-area: desc !important;
    min-width: 0 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .panel.is-capturing .livenessProgress button em {
    display: none !important;
  }

  .panel.is-capturing .quality {
    margin: 0 !important;
  }

  .panel.is-capturing .capturePanel .primary {
    align-self: end !important;
  }

  .panel.is-reviewing {
    height: calc(100dvh - 46px) !important;
    width: min(90vw, 1320px) !important;
  }

  .panel.is-reviewing #reviewStep {
    row-gap: 8px !important;
  }

  .panel.is-reviewing .previewGrid {
    align-items: stretch !important;
  }

  .panel.is-reviewing .reviewCard {
    height: 100% !important;
    grid-template-rows: minmax(0, 1fr) auto !important;
  }

  .panel.is-reviewing .reviewImageWrap {
    min-height: 0 !important;
    height: 100% !important;
  }

  .panel.is-reviewing .reviewImageWrap img {
    height: 100% !important;
    object-fit: cover !important;
  }

  .panel.is-reviewing .reviewChecks {
    margin-top: 6px !important;
  }

  .panel.is-done {
    height: calc(100dvh - 46px) !important;
    width: min(78vw, 1080px) !important;
  }

  .panel.is-done #doneStep {
    height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    padding-bottom: 10px !important;
  }

  .panel.is-done h2 {
    font-size: clamp(28px, 4.6vh, 40px) !important;
  }

  .doneSecurity {
    margin-top: 8px !important;
  }
}

@media (min-width: 981px) and (max-height: 720px) {
  .panel.is-capturing .cameraHeader > #poseIntro {
    display: none !important;
  }

  .panel.is-capturing .livenessProgress button {
    min-height: 38px !important;
  }

  .panel.is-capturing .qualityToken {
    min-height: 42px !important;
  }

  .panel.is-reviewing .reviewNotice {
    display: none !important;
  }

  .panel.is-reviewing .reviewChecks span {
    min-height: 34px !important;
  }
}

/* Final mobile polish - compact app-like layout and no overflowing step cards. */
@media (max-width: 720px) {
  body {
    overflow-x: hidden !important;
  }

  .shell {
    align-items: start !important;
    padding: 0 !important;
  }

  .panel {
    width: 100% !important;
    min-height: 100dvh !important;
    border-width: 0 !important;
    border-radius: 0 !important;
  }

  .panel:not(.is-capturing):not(.is-reviewing):not(.is-done) {
    padding: 20px 20px 24px !important;
  }

  .topbar {
    justify-content: center !important;
    text-align: center !important;
  }

  .logo {
    width: min(76vw, 300px) !important;
    margin-inline: auto !important;
  }

  .pill {
    width: 100% !important;
    max-width: 340px !important;
    min-height: 42px !important;
    margin-inline: auto !important;
    padding: 9px 14px !important;
    justify-content: center !important;
    text-align: center !important;
    font-size: 12px !important;
    line-height: 1.15 !important;
  }

  .intro {
    padding-top: 20px !important;
    text-align: left !important;
  }

  .eyebrow {
    font-size: 12px !important;
    letter-spacing: 0.04em !important;
  }

  h1,
  #pageTitle {
    max-width: 14ch !important;
    margin-top: 8px !important;
    font-size: clamp(34px, 9vw, 44px) !important;
    line-height: 1.02 !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
  }

  .lead {
    max-width: 100% !important;
    font-size: 17px !important;
    line-height: 1.35 !important;
  }

  .identityCard {
    display: grid !important;
    grid-template-columns: 82px minmax(0, 1fr) !important;
    gap: 14px !important;
    min-height: 0 !important;
    padding: 18px !important;
  }

  .identityAvatar {
    width: 74px !important;
    height: 74px !important;
    align-self: start !important;
  }

  .identityInfo {
    min-width: 0 !important;
  }

  .identityStatus {
    font-size: 11px !important;
    line-height: 1.1 !important;
  }

  .student {
    margin: 8px 0 8px !important;
    padding-bottom: 8px !important;
    font-size: clamp(34px, 10vw, 44px) !important;
    line-height: 0.95 !important;
  }

  .identityMeta {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    justify-content: center !important;
  }

  .identityMetaSep {
    display: none !important;
  }

  .identityMetaItem {
    display: inline-flex !important;
    min-height: 32px !important;
    align-items: center !important;
    padding: 6px 10px !important;
    border: 1px solid rgba(216, 162, 66, 0.24) !important;
    border-radius: 999px !important;
    color: #d8deea !important;
    background: rgba(255, 255, 255, 0.035) !important;
    font-size: 13px !important;
    line-height: 1.1 !important;
    white-space: nowrap !important;
  }

  .panel.is-flow-step .identityMetaItem {
    font-size: 12px !important;
    padding-inline: 9px !important;
  }

  .identityWatermark {
    display: none !important;
  }

  .statusGrid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  .statusGrid div {
    display: grid !important;
    grid-template-columns: 1fr !important;
    justify-items: center !important;
    align-content: center !important;
    gap: 7px !important;
    min-width: 0 !important;
    min-height: 78px !important;
    padding: 10px 6px !important;
    text-align: center !important;
  }

  .statusGrid strong {
    width: 34px !important;
    height: 34px !important;
    flex: 0 0 34px !important;
    font-size: 15px !important;
  }

  .statusGrid span {
    min-width: 0 !important;
    font-size: clamp(12px, 3.6vw, 15px) !important;
    line-height: 1.08 !important;
    white-space: normal !important;
  }

  .panel.is-capturing .quality {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }

  .panel.is-capturing .qualityToken {
    min-width: 0 !important;
    min-height: 94px !important;
    padding: 12px 8px !important;
    gap: 7px !important;
    overflow: hidden !important;
  }

  .panel.is-capturing .qualityToken strong {
    max-width: 100% !important;
    font-size: 13px !important;
    line-height: 1.05 !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
  }

  .panel.is-capturing .qualityToken small {
    font-size: 10px !important;
    line-height: 1 !important;
  }

  .panel.is-capturing .qualityToken .qualityIcon {
    width: 36px !important;
    height: 36px !important;
  }

  .notice,
  .mobileQr,
  .supportBlock {
    overflow: hidden !important;
  }

  .notice p,
  .mobileQr p,
  .supportBlock p,
  .check span {
    overflow-wrap: anywhere !important;
  }

  .panel.is-reviewing #reviewStep > .cameraHeader strong {
    font-size: clamp(34px, 9.5vw, 44px) !important;
    line-height: 1.02 !important;
  }

  .panel.is-done {
    min-height: 100dvh !important;
  }

  .panel.is-done .identityCard {
    display: none !important;
  }

  .panel.is-done .topbar {
    align-items: center !important;
  }
}

/* Mobile final polish: compact identity chips and animated step numbers */
@media (max-width: 640px) {
  #identityMeta {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 8px !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-top: 8px !important;
    overflow: hidden !important;
  }

  #identityMeta .identityMetaSep {
    display: none !important;
  }

  #identityMeta .identityMetaItem {
    flex: 0 1 auto !important;
    min-width: 0 !important;
    max-width: 50% !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 28px !important;
    padding: 5px 10px !important;
    border: 1px solid rgba(216, 162, 66, 0.24) !important;
    border-radius: 999px !important;
    background: rgba(255, 255, 255, 0.04) !important;
    color: rgba(238, 243, 252, 0.9) !important;
    font-size: clamp(11px, 3.25vw, 13px) !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .statusGrid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  .statusGrid div {
    min-height: 70px !important;
    padding: 9px 5px !important;
  }

  .statusGrid strong {
    position: relative !important;
    width: 34px !important;
    height: 34px !important;
    flex-basis: 34px !important;
    isolation: isolate !important;
    box-shadow: 0 0 0 1px rgba(255, 224, 145, 0.28), 0 8px 22px rgba(216, 162, 66, 0.2) !important;
  }

  .statusGrid strong::after {
    content: "";
    position: absolute;
    inset: -5px;
    z-index: -1;
    border-radius: inherit;
    background: radial-gradient(circle, rgba(246, 200, 108, 0.36), transparent 64%);
    opacity: 0.55;
    animation: eacStepNumberPulse 2.4s ease-in-out infinite;
  }

  .statusGrid div.is-active strong::after {
    opacity: 0.9;
    animation-duration: 1.65s;
  }
}

@keyframes eacStepNumberPulse {
  0%,
  100% {
    transform: scale(0.92);
    opacity: 0.35;
  }
  50% {
    transform: scale(1.16);
    opacity: 0.86;
  }
}

@media (prefers-reduced-motion: reduce) {
  .statusGrid strong::after {
    animation: none !important;
  }
}

/* Mobile capture/review cleanup */
@media (max-width: 640px) {
  .panel.is-capturing .identityCard {
    display: none !important;
  }

  .panel.is-capturing .step {
    padding-top: 0 !important;
  }

  .panel.is-reviewing #reviewStep > .cameraHeader {
    padding-top: 18px !important;
    margin-bottom: 16px !important;
  }

  .panel.is-reviewing #reviewStep > .cameraHeader strong {
    max-width: 100% !important;
    font-size: clamp(30px, 8vw, 38px) !important;
    line-height: 1.04 !important;
    letter-spacing: 0 !important;
  }

  .panel.is-reviewing #reviewStep > .cameraHeader span {
    margin-top: 8px !important;
    font-size: clamp(16px, 4.2vw, 20px) !important;
    line-height: 1.25 !important;
  }
}

/* Mobile identity chips: keep both labels readable side by side */
@media (max-width: 640px) {
  #identityMeta {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    align-items: center !important;
    justify-content: stretch !important;
    gap: 7px !important;
    overflow: visible !important;
  }

  #identityMeta .identityMetaItem {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    padding: 5px 6px !important;
    font-size: clamp(10px, 2.8vw, 12px) !important;
    line-height: 1.05 !important;
    letter-spacing: 0 !important;
    white-space: nowrap !important;
    overflow: visible !important;
    text-overflow: clip !important;
  }
}
