/* The entry view owns the viewport. Other workflow screens only render when active. */
.bk-screen[data-screen="done"]:not(.is-active) {
  display: none !important;
}

/* Desktop handoff: the QR flow remains visibly active until mobile confirmation arrives. */
@media (min-width: 981px) {
  .bk-handoff-status {
    grid-column: 1;
    grid-row: 2;
    align-self: end;
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.35;
  }

  .bk-handoff-status::before {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    margin: 0 8px 1px 0;
    border-radius: 50%;
    background: var(--bright);
    box-shadow: 0 0 0 5px rgba(103, 161, 255, .08), 0 0 14px rgba(103, 161, 255, .72);
    animation: bk-handoff-pulse 1.7s ease-in-out infinite;
  }

  .bk-handoff-status[data-state="confirmed"] { color: var(--good); }
  .bk-handoff-status[data-state="confirmed"]::before {
    background: var(--good);
    box-shadow: 0 0 0 5px rgba(97, 227, 177, .08), 0 0 14px rgba(97, 227, 177, .72);
    animation: none;
  }
}

@keyframes bk-handoff-pulse {
  50% { opacity: .52; transform: scale(.82); }
}

@media (min-width: 981px) {
  .bk-app {
    padding: clamp(18px, 2.2vw, 40px);
  }

  .bk-window {
    height: min(820px, calc(100dvh - clamp(36px, 4.4vw, 80px)));
    min-height: 0;
  }

  .bk-header {
    height: 76px;
    padding: 15px 28px;
  }

  .bk-logo {
    width: 242px;
    height: 44px;
  }

  .bk-access-pill {
    padding: 10px 15px;
    font-size: 11px;
  }

  .bk-screen {
    min-height: calc(min(820px, calc(100dvh - clamp(36px, 4.4vw, 80px))) - 84px);
  }

  .bk-screen[data-screen="entry"] {
    grid-template-columns: 245px minmax(0, 1fr);
  }

  .bk-screen[data-screen="entry"].is-active {
    height: calc(min(820px, calc(100dvh - clamp(36px, 4.4vw, 80px))) - 84px);
    min-height: 0;
    grid-template-rows: minmax(0, 1fr);
    overflow: hidden;
  }

  .bk-journey {
    padding: 26px 22px;
  }

  .bk-journey ol {
    margin-top: 26px;
  }

  .bk-journey li {
    min-height: 84px;
    gap: 14px;
  }

  .bk-journey li i {
    width: 41px;
    height: 41px;
    font-size: 17px;
  }

  .bk-journey b {
    font-size: 17px;
  }

  .bk-journey small {
    margin-top: 6px;
    font-size: 12px;
  }

  .bk-journey-status {
    margin-top: 4px;
    padding: 13px;
  }

  .bk-entry-content {
    height: 100%;
    padding: 21px clamp(24px, 3vw, 44px) 20px;
    grid-template-rows: auto auto minmax(150px, 1fr) auto auto;
    gap: 12px;
  }

  .bk-title-block > p {
    margin-bottom: 6px;
    font-size: 12px;
  }

  .bk-title-block h1 {
    font-size: clamp(32px, 3.1vw, 46px);
    line-height: 1;
  }

  .bk-title-block > span {
    margin-top: 5px;
    font-size: 15px;
  }

  .bk-person-card {
    gap: 17px;
    padding: 14px 22px;
  }

  .bk-avatar {
    width: 68px;
    height: 68px;
  }

  .bk-person-data > p {
    font-size: 12px;
  }

  .bk-person-data h2 {
    margin: 6px 0 7px;
    font-size: clamp(29px, 2.8vw, 41px);
  }

  .bk-person-meta {
    padding-top: 8px;
  }

  .bk-person-meta span {
    font-size: 14px;
  }

  .bk-monogram {
    right: 28px;
    bottom: 18px;
    width: 44px;
    height: 44px;
    font-size: 40px;
  }

  .bk-entry-cards {
    min-height: 0;
  }

  .bk-info-card {
    padding: 20px 22px;
  }

  .bk-card-heading h3 {
    font-size: clamp(20px, 1.9vw, 27px);
  }

  .bk-card-heading p {
    margin-top: 10px;
    font-size: 14px;
  }

  .bk-secondary {
    min-height: 40px;
    padding: 9px 15px;
  }

  .bk-consent-row {
    padding: 11px 15px;
  }

  .bk-primary {
    min-height: 50px;
  }

  /* Keep the desktop-to-mobile handoff copy clear of the QR and its status line. */
  .bk-phone-card {
    grid-template-columns: minmax(0, 1fr) 110px;
    grid-template-rows: minmax(0, 1fr) auto;
    column-gap: 18px;
    row-gap: 8px;
  }

  .bk-phone-card .bk-card-heading {
    align-self: center;
  }

.bk-phone-card .bk-icon {
  transform: translateY(6px);
}

/* Student flow: keep compact desktop screens from overlapping on lower-height browsers. */
@media (min-width: 981px) {
  .bk-screen[data-screen="camera"].is-active .bk-pose-copy {
    display: block !important;
    min-height: 40px !important;
    max-height: 42px !important;
    margin: 6px 0 9px !important;
    padding: 0 0 8px !important;
    line-height: 1.18 !important;
    overflow: hidden !important;
  }

  .bk-screen[data-screen="camera"].is-active .bk-pose-list {
    margin-top: 0 !important;
  }

  .bk-screen[data-screen="done"].is-active {
    display: grid !important;
    place-items: center !important;
  }
}

@media (min-width: 981px) and (max-height: 720px) {
  .bk-screen[data-screen="camera"].is-active .bk-capture-card {
    gap: 6px !important;
  }

  .bk-screen[data-screen="camera"].is-active .bk-pose-copy {
    min-height: 34px !important;
    max-height: 36px !important;
    margin: 4px 0 7px !important;
    padding-bottom: 6px !important;
    font-size: 12.4px !important;
    line-height: 1.14 !important;
  }

  .bk-screen[data-screen="camera"].is-active .bk-pose {
    min-height: 48px !important;
    padding-top: 7px !important;
    padding-bottom: 7px !important;
  }

  .bk-screen[data-screen="done"].is-active {
    padding-top: 14px !important;
    padding-bottom: 14px !important;
  }

  .bk-screen[data-screen="done"].is-active .bk-done {
    padding-top: 28px !important;
    padding-bottom: 22px !important;
  }

  .bk-screen[data-screen="done"].is-active .bk-success-mark {
    width: 76px !important;
    height: 76px !important;
  }

  .bk-screen[data-screen="done"].is-active .bk-done h2 {
    margin-top: 18px !important;
    margin-bottom: 14px !important;
    font-size: clamp(38px, 4.4vw, 54px) !important;
  }

  .bk-screen[data-screen="done"].is-active .bk-done p {
    margin-bottom: 18px !important;
  }

  .bk-screen[data-screen="done"].is-active .bk-primary {
    margin-bottom: 14px !important;
  }
}

  .bk-phone-card .bk-card-heading h3 {
    max-width: 290px;
    font-size: clamp(20px, 1.7vw, 25px);
  }

  .bk-phone-card .bk-card-heading p {
    max-width: 42ch;
    margin-top: 8px;
  }

  /* Review stays inside the premium window: images flex before actions are ever cropped. */
  .bk-screen[data-screen="review"].is-active {
    display: grid;
    height: calc(min(820px, calc(100dvh - clamp(36px, 4.4vw, 80px))) - 84px);
    min-height: 0;
    padding: 24px clamp(26px, 3.6vw, 54px) 22px;
    grid-template-rows: auto minmax(0, 1fr) auto;
    gap: 16px;
    overflow: hidden;
  }

  .bk-review-head {
    min-height: 0;
    align-items: center;
    margin: 0;
  }

  .bk-review-head h2 {
    font-size: clamp(31px, 3.2vw, 45px);
  }

  .bk-review-head span {
    margin-top: 6px;
    font-size: 15px;
  }

  .bk-review-head aside {
    max-width: 335px;
    padding: 13px 15px;
    font-size: 14px;
  }

  .bk-preview-grid {
    min-height: 0;
    height: 100%;
    gap: 16px;
  }

  .bk-preview-card {
    min-height: 0;
    height: 100%;
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
  }

  .bk-preview-image {
    min-height: 0;
    aspect-ratio: auto;
  }

  .bk-preview-meta {
    padding: 11px 14px 12px;
  }

  .bk-preview-meta h3 {
    font-size: 18px;
  }

  .bk-preview-meta p {
    font-size: 12px;
  }

  .bk-review-actions {
    margin: 0;
    gap: 16px;
  }

  .bk-review-actions .bk-secondary,
  .bk-review-actions .bk-primary {
    min-height: 48px;
  }
}

/* Barkeley premium light field: preserve the living hero outside the window. */
.bk-app {
  background:
    radial-gradient(circle at 16% 14%, rgba(60, 120, 255, .23), transparent 30%),
    radial-gradient(circle at 88% 78%, rgba(255, 139, 167, .17), transparent 32%),
    linear-gradient(135deg, #050a18 0%, #07152e 49%, #060b1d 100%);
}

.bk-app::before,
.bk-app::after {
  z-index: 0;
  pointer-events: none;
}

.bk-app::before {
  opacity: .96;
  filter: saturate(1.18) contrast(1.08);
}

.bk-app::after {
  opacity: .62;
  filter: saturate(1.15) contrast(1.06);
}

.bk-window {
  z-index: 1;
  border-color: rgba(142, 181, 255, .30);
  background: linear-gradient(116deg, rgba(13, 33, 67, .95), rgba(6, 17, 38, .92));
  box-shadow:
    0 42px 110px rgba(0, 0, 0, .52),
    0 0 0 1px rgba(255, 255, 255, .035) inset,
    0 0 90px rgba(60, 120, 255, .13);
}

.bk-person-card {
  border-color: rgba(255, 176, 165, .72);
  background:
    radial-gradient(circle at 90% 4%, rgba(255, 139, 167, .22), transparent 35%),
    radial-gradient(circle at 5% 100%, rgba(60, 120, 255, .30), transparent 44%),
    linear-gradient(118deg, rgba(20, 51, 96, .97), rgba(8, 25, 56, .96));
  box-shadow:
    0 20px 46px rgba(0, 0, 0, .22),
    0 0 46px rgba(60, 120, 255, .16),
    0 0 34px rgba(255, 139, 167, .13),
    0 0 0 1px rgba(255, 255, 255, .04) inset;
}

.bk-avatar {
  background: linear-gradient(135deg, #67a1ff, #d8e8ff 44%, #ff8ba7);
  box-shadow:
    0 0 0 7px rgba(60, 120, 255, .10),
    0 0 30px rgba(60, 120, 255, .42),
    0 0 46px rgba(255, 139, 167, .22);
  animation: bk-avatar-breathe 3.8s ease-in-out infinite alternate;
}

.bk-info-card {
  border-color: rgba(103, 161, 255, .48);
  background:
    radial-gradient(circle at 94% 2%, rgba(255, 139, 167, .17), transparent 35%),
    radial-gradient(circle at 5% 0%, rgba(103, 161, 255, .20), transparent 34%),
    linear-gradient(135deg, rgba(17, 43, 85, .94), rgba(7, 21, 46, .95));
  box-shadow:
    0 18px 42px rgba(0, 0, 0, .18),
    0 0 30px rgba(60, 120, 255, .10),
    0 0 22px rgba(255, 139, 167, .08),
    0 0 0 1px rgba(255, 255, 255, .028) inset;
}

.bk-info-card .bk-icon {
  width: 54px;
  height: 54px;
  color: #f8fbff;
  background:
    radial-gradient(circle at 35% 28%, rgba(255, 255, 255, .30), transparent 20%),
    radial-gradient(circle at 50% 55%, rgba(103, 161, 255, .26), rgba(10, 28, 60, .92) 66%);
  border-color: rgba(255, 176, 165, .72);
  box-shadow:
    0 0 0 7px rgba(60, 120, 255, .07),
    0 0 18px rgba(103, 161, 255, .38),
    0 0 26px rgba(255, 139, 167, .16),
    inset 0 1px 0 rgba(255, 255, 255, .22);
}

.bk-info-card .bk-icon svg {
  width: 27px;
  height: 27px;
  stroke-width: 1.75;
  filter: drop-shadow(0 0 5px rgba(216, 232, 255, .46));
}

.bk-phone-card {
  grid-template-rows: minmax(0, 1fr);
  align-items: center;
}

.bk-phone-card .bk-card-heading {
  align-self: center;
}

.bk-qr-box {
  grid-row: 1;
  border-color: rgba(255, 176, 165, .86);
  box-shadow: 0 0 0 1px rgba(255, 139, 167, .32), 0 0 28px rgba(255, 139, 167, .20);
}

@keyframes bk-avatar-breathe {
  from { transform: translateZ(0) scale(1); filter: saturate(1); }
  to { transform: translateZ(0) scale(1.025); filter: saturate(1.12); }
}

@media (max-width: 980px) {
  .bk-app::before { opacity: .62; }
  .bk-app::after { opacity: .36; }
  .bk-phone-card {
    min-height: 172px;
    grid-template-columns: minmax(0, 1fr) 96px;
    gap: 14px;
  }
  .bk-qr-box { width: 96px; height: 96px; padding: 6px; }
}

/* Refined brand scale and a more substantial illuminated identity card. */
@media (min-width: 981px) {
  .bk-header {
    height: 84px;
    padding-inline: 30px;
  }

  .bk-logo {
    width: clamp(270px, 20vw, 320px);
    height: 52px;
  }

  .bk-screen {
    min-height: calc(min(820px, calc(100dvh - clamp(36px, 4.4vw, 80px))) - 84px);
  }

  .bk-screen[data-screen="entry"] {
    grid-template-columns: 270px minmax(0, 1fr);
  }

  .bk-person-card {
    padding-right: 164px;
  }
}

.bk-person-card::after {
  padding: 2px;
  background: linear-gradient(
    135deg,
    rgba(103, 161, 255, .96),
    rgba(103, 161, 255, .18) 42%,
    rgba(255, 176, 165, .92) 72%,
    rgba(255, 139, 167, .84)
  );
  filter: drop-shadow(0 0 10px rgba(103, 161, 255, .24)) drop-shadow(0 0 15px rgba(255, 139, 167, .16));
}

.bk-person-card {
  box-shadow:
    0 20px 46px rgba(0, 0, 0, .22),
    0 0 0 1px rgba(103, 161, 255, .28),
    0 0 38px rgba(60, 120, 255, .20),
    0 0 42px rgba(255, 139, 167, .16),
    0 0 0 1px rgba(255, 255, 255, .05) inset;
}

.bk-monogram {
  right: 30px;
  bottom: 18px;
  width: 132px;
  height: 52px;
  border: 0;
  border-radius: 0;
  color: transparent;
  font-size: 0;
  opacity: .17;
  background: url('/barkeley-logo.svg') center / contain no-repeat;
  filter: drop-shadow(0 0 12px rgba(103, 161, 255, .14));
}

@media (max-width: 980px) {
  .bk-monogram { display: none; }
}

/* Keep the entry hierarchy compact on tablets and mobile without changing card structure. */
@media (max-width: 980px) {
  .bk-entry-content {
    padding: 24px 20px 26px;
    gap: 13px;
  }

  .bk-title-block > p {
    margin-bottom: 6px;
  }

  .bk-title-block h1 {
    font-size: clamp(32px, 9vw, 41px);
    line-height: 1.04;
  }

  .bk-title-block > span {
    margin-top: 7px;
    font-size: 15px;
  }
}

@media (max-width: 480px) {
  .bk-entry-content { padding: 22px 16px 24px; }
  .bk-title-block h1 { font-size: 32px; }
}

/* Capture is a separate working surface. It never inherits the entry-page fit. */
.bk-screen[data-screen="camera"] {
  box-sizing: border-box;
  overflow: hidden;
}

.bk-camera-stage,
.bk-capture-card,
.bk-pose,
.bk-quality {
  box-sizing: border-box;
}

.bk-capture-card {
  border-color: rgba(103, 161, 255, .38);
  background:
    radial-gradient(circle at 100% 0%, rgba(255, 139, 167, .13), transparent 33%),
    radial-gradient(circle at 0% 100%, rgba(60, 120, 255, .15), transparent 36%),
    linear-gradient(145deg, rgba(13, 33, 67, .95), rgba(6, 17, 38, .96));
  box-shadow:
    0 18px 42px rgba(0, 0, 0, .22),
    0 0 34px rgba(60, 120, 255, .10),
    0 0 0 1px rgba(255, 255, 255, .035) inset;
}

.bk-capture-title .bk-icon {
  flex: 0 0 auto;
  width: 54px;
  height: 54px;
  color: #f8fbff;
  border-color: rgba(255, 176, 165, .74);
  background:
    radial-gradient(circle at 34% 25%, rgba(255, 255, 255, .25), transparent 20%),
    radial-gradient(circle at 52% 58%, rgba(103, 161, 255, .25), rgba(10, 28, 60, .94) 66%);
  box-shadow:
    0 0 0 6px rgba(60, 120, 255, .08),
    0 0 20px rgba(103, 161, 255, .30),
    0 0 24px rgba(255, 139, 167, .14);
}

.bk-capture-title .bk-icon svg {
  width: 26px;
  height: 26px;
  stroke-width: 1.75;
  filter: drop-shadow(0 0 5px rgba(216, 232, 255, .4));
}

.bk-pose {
  grid-template-columns: 42px minmax(0, 1fr) auto;
  min-height: 62px;
  border-color: rgba(142, 181, 255, .30);
  background: rgba(5, 15, 34, .50);
}

.bk-pose-number {
  width: 38px;
  height: 38px;
  color: #f8fbff;
  border-color: rgba(170, 185, 209, .58);
  background: rgba(6, 17, 38, .72);
}

.bk-pose-number svg,
.bk-pose-state svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.35;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bk-pose.is-done {
  border-color: rgba(97, 227, 177, .56);
  background: linear-gradient(90deg, rgba(20, 62, 70, .32), rgba(6, 24, 47, .52));
}

.bk-pose.is-done .bk-pose-number {
  color: var(--good);
  border-color: rgba(97, 227, 177, .72);
  background: rgba(17, 67, 62, .42);
  box-shadow: 0 0 18px rgba(97, 227, 177, .22);
}

.bk-pose.is-done .bk-pose-number:after {
  content: none;
}

.bk-pose.is-active {
  border-color: rgba(255, 176, 165, .82);
  background: linear-gradient(112deg, rgba(103, 161, 255, .14), rgba(255, 139, 167, .10));
  box-shadow: 0 0 0 1px rgba(255, 139, 167, .10) inset, 0 0 22px rgba(103, 161, 255, .10);
}

.bk-pose.is-active .bk-pose-number {
  color: #07152e;
  background: linear-gradient(135deg, #a9c8ff, #ffb0a5);
  box-shadow: 0 0 18px rgba(255, 139, 167, .30);
}

.bk-pose-state {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  align-self: center;
  min-width: 76px;
  min-height: 28px;
  padding: 5px 9px;
  border-radius: 999px;
  font: 700 10px/1 Stereo, Arial, sans-serif;
  letter-spacing: .01em;
  white-space: nowrap;
}

.bk-pose-state.is-current {
  color: #ffd0c8;
  border: 1px solid rgba(255, 176, 165, .38);
  background: rgba(255, 139, 167, .11);
}

.bk-pose-state.is-complete {
  color: var(--good);
  border: 1px solid rgba(97, 227, 177, .40);
  background: rgba(97, 227, 177, .09);
}

.bk-pose-state svg {
  width: 13px;
  height: 13px;
}

/* Direction cue: direct, quiet, and readable in the mirrored camera preview. */
.bk-turn-arrow {
  display: none;
  top: 42%;
  left: 50%;
  width: auto;
  height: 42px;
  padding: 0 15px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 176, 165, .72);
  border-radius: 999px;
  background: linear-gradient(110deg, rgba(11, 35, 75, .88), rgba(42, 31, 67, .84));
  box-shadow: 0 0 0 5px rgba(60, 120, 255, .07), 0 0 22px rgba(255, 139, 167, .20);
  transform: translate(-50%, -50%);
}

.bk-turn-arrow:before {
  position: static;
  inset: auto;
  width: auto;
  height: auto;
  border: 0;
  border-radius: 0;
  color: #ffd1c8;
  background: none;
  font: 700 30px/1 Arial, sans-serif;
}

.bk-turn-arrow:after {
  position: static;
  width: auto;
  height: auto;
  margin-left: 8px;
  border: 0;
  color: #f8fbff;
  background: none;
  font: 700 11px/1 Stereo, Arial, sans-serif;
  letter-spacing: .02em;
  text-transform: uppercase;
  transform: none;
}

.bk-turn-arrow.is-visible {
  display: inline-flex;
}

.bk-turn-arrow.is-left {
  transform: translate(-50%, -50%);
}

.bk-turn-arrow.is-left:before { content: "←"; }
.bk-turn-arrow.is-left:after { content: "Sua esquerda"; }
.bk-turn-arrow.is-right:before { content: "→"; }
.bk-turn-arrow.is-right:after { content: "Sua direita"; }

@media (min-width: 981px) {
  .bk-screen[data-screen="camera"].is-active {
    display: grid;
    height: calc(min(820px, calc(100dvh - clamp(36px, 4.4vw, 80px))) - 84px);
    min-height: 0;
    padding: 18px clamp(20px, 2.2vw, 30px);
  }

  .bk-camera-layout {
    width: min(1280px, 100%);
    height: 100%;
    min-height: 0;
    grid-template-columns: minmax(0, 1.3fr) minmax(410px, .82fr);
    align-items: stretch;
    gap: 22px;
  }

  .bk-camera-stage,
  .bk-capture-card {
    min-height: 0;
    height: 100%;
  }

  .bk-camera-stage {
    aspect-ratio: auto;
  }

  .bk-capture-card {
    display: flex;
    flex-direction: column;
    padding: 22px;
    overflow: hidden;
  }

  .bk-capture-title { gap: 12px; }
  .bk-capture-title h2 { font-size: clamp(24px, 2.05vw, 31px); }
  .bk-capture-title p { margin-top: 4px; font-size: 13px; }

  .bk-pose-copy {
    min-height: 0;
    margin: 14px 0 12px;
    padding-bottom: 12px;
    font-size: 15px;
  }

  .bk-pose-list { gap: 8px; }
  .bk-pose { min-height: 60px; padding: 10px 12px; }

  .bk-quality-grid {
    margin: 12px 0;
    gap: 7px;
  }

  .bk-quality { padding: 9px 5px; }
  .bk-quality svg { width: 20px; height: 20px; margin-bottom: 4px; }
.bk-quality b { font-size: 10px; }

.bk-quality.is-waiting {
  border-color: rgba(103, 161, 255, .38);
  background: linear-gradient(145deg, rgba(24, 58, 105, .44), rgba(7, 24, 53, .76));
}

.bk-quality.is-waiting span {
  color: #aab9d1;
}

  .bk-capture-card > .bk-primary {
    min-height: 48px;
    margin-top: auto;
  }
}

@media (min-width: 981px) and (max-height: 820px) {
  .bk-screen[data-screen="camera"].is-active { padding-block: 14px; }
  .bk-capture-card { padding: 18px; }
  .bk-capture-title .bk-icon { width: 46px; height: 46px; }
  .bk-capture-title .bk-icon svg { width: 23px; height: 23px; }
  .bk-pose-copy { margin: 10px 0; padding-bottom: 10px; font-size: 14px; }
  .bk-pose { min-height: 55px; padding-block: 8px; }
  .bk-pose-number { width: 34px; height: 34px; }
  .bk-quality-grid { margin: 9px 0; }
  .bk-quality { padding-block: 7px; }

  .bk-screen[data-screen="review"].is-active {
    padding-block: 16px;
    gap: 11px;
  }

  .bk-review-head aside { padding: 10px 13px; }
  .bk-review-head h2 { font-size: 31px; }
  .bk-review-head span { font-size: 14px; }
  .bk-preview-meta { padding: 9px 12px; }
  .bk-preview-meta h3 { font-size: 17px; }
  .bk-preview-meta p { font-size: 11px; }
  .bk-review-actions .bk-secondary,
  .bk-review-actions .bk-primary { min-height: 44px; }
}

@media (max-width: 980px) {
  .bk-screen[data-screen="camera"] { overflow: visible; }
  .bk-turn-arrow { top: 44%; transform: translate(-50%, -50%) scale(.86); }
  .bk-pose-state { min-width: 68px; padding-inline: 8px; font-size: 9px; }
}

/* Mobile is a focused capture surface: phone users do not need a desktop QR flow. */
@media (max-width: 980px) {
  .bk-phone-card {
    display: none;
  }

  .bk-screen[data-screen="entry"] .bk-entry-cards {
    grid-template-columns: 1fr;
  }

  .bk-screen[data-screen="camera"].is-active {
    display: block;
    height: calc(100dvh - 106px);
    min-height: 0;
    padding: 12px;
    overflow: hidden;
  }

  .bk-camera-layout {
    display: grid;
    height: 100%;
    min-height: 0;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(250px, 1fr) auto auto auto;
    gap: 10px;
  }

  .bk-camera-stage {
    grid-row: 1;
    min-height: 0;
    height: 100%;
    aspect-ratio: auto;
    border-radius: 18px;
  }

  .bk-camera-stage .bk-camera-tip {
    bottom: 12px;
    width: calc(100% - 24px);
    padding: 10px 13px;
    font-size: 14px;
  }

  .bk-camera-stage .bk-camera-live {
    top: 12px;
    left: 12px;
    padding: 9px 11px;
    font-size: 11px;
  }

  .bk-camera-stage .bk-camera-live small {
    font-size: 10px;
  }

  .bk-camera-stage .bk-camera-corners {
    inset: 20px;
  }

  .bk-camera-stage .bk-face-oval {
    width: min(58%, 310px);
    height: min(76%, 430px);
  }

  .bk-capture-card {
    display: contents;
  }

  .bk-capture-title {
    grid-row: 2;
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    min-width: 0;
    padding: 9px 12px;
    border: 1px solid rgba(103, 161, 255, .28);
    border-radius: 13px;
    background: linear-gradient(115deg, rgba(13, 33, 67, .92), rgba(7, 21, 46, .92));
  }

  .bk-capture-title .bk-icon {
    width: 36px;
    height: 36px;
    box-shadow: 0 0 0 4px rgba(60, 120, 255, .08), 0 0 14px rgba(103, 161, 255, .22);
  }

  .bk-capture-title .bk-icon svg {
    width: 19px;
    height: 19px;
  }

  .bk-capture-title h2 {
    display: inline;
    font: 600 18px/1.1 var(--font-display);
  }

  .bk-capture-title p {
    display: inline;
    margin: 0 0 0 7px;
    color: #ffc1ae;
    font-size: 11px;
  }

  .bk-pose-copy {
    grid-row: 3;
    min-height: 0;
    margin: 0;
    padding: 0 4px;
    border: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.3;
  }

  .bk-pose-list,
  .bk-quality-grid {
    display: none;
  }

  .bk-capture-card > .bk-primary {
    grid-row: 4;
    min-height: 52px;
    margin: 0;
    border-radius: 14px;
    box-shadow: 0 12px 28px rgba(233, 95, 136, .26);
  }

  .bk-validation-message:not([hidden]),
  .bk-support-box:not([hidden]) {
    position: absolute;
    z-index: 8;
    right: 18px;
    bottom: 84px;
    left: 18px;
    max-height: 42dvh;
    overflow: auto;
    box-shadow: 0 18px 48px rgba(0, 0, 0, .42);
  }
}

@media (max-width: 480px) {
  .bk-screen[data-screen="camera"].is-active {
    height: calc(100dvh - 100px);
    padding: 10px;
  }

  .bk-camera-layout {
    grid-template-rows: minmax(230px, 1fr) auto auto auto;
    gap: 8px;
  }

  .bk-camera-stage .bk-face-oval {
    width: min(62%, 285px);
    height: min(76%, 385px);
  }

  .bk-camera-stage .bk-camera-tip {
    font-size: 13px;
  }

  .bk-capture-title {
    padding: 8px 10px;
  }

  .bk-capture-title h2 {
    font-size: 17px;
  }

  .bk-pose-copy {
    font-size: 12px;
  }
}

/* Phone-specific flow: the action remains in reach while the face is visible. */
@media (max-width: 640px) {
  html,
  body,
  .bk-app,
  .bk-window {
    max-width: 100%;
    overflow-x: clip;
  }

  .bk-header {
    min-height: 64px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }

  .bk-logo {
    width: min(154px, 43vw);
    height: 34px;
    max-width: none;
    object-position: left center;
  }

  .bk-access-pill {
    max-width: min(196px, 51vw);
    padding: 8px 10px;
    gap: 6px;
    font-size: 9px;
    letter-spacing: .08px;
    text-align: center;
    white-space: normal;
  }

  .bk-access-pill svg {
    width: 15px;
    height: 15px;
    flex: none;
  }

  .bk-entry-content,
  .bk-entry-cards,
  .bk-info-card,
  .bk-card-heading,
  .bk-card-heading > div {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  .bk-consent-card .bk-card-heading h3 {
    font-size: clamp(21px, 6vw, 25px);
    overflow-wrap: anywhere;
  }

  .bk-consent-card .bk-card-heading p {
    overflow-wrap: anywhere;
  }

  .bk-screen[data-screen="camera"].is-active {
    height: calc(100svh - 64px);
    min-height: 0;
    padding: 10px;
    overflow: hidden;
  }

  .bk-camera-layout {
    height: 100%;
    min-height: 0;
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 10px;
  }

  .bk-camera-stage {
    grid-row: 1;
    min-height: 0;
    height: 100%;
  }

  .bk-camera-stage .bk-face-oval {
    width: min(61%, 300px);
    height: min(74%, 410px);
  }

  .bk-capture-title,
  .bk-pose-copy,
  .bk-pose-list,
  .bk-quality-grid {
    display: none;
  }

  .bk-capture-card > .bk-primary {
    grid-row: 2;
    min-height: 54px;
    margin: 0;
    border-radius: 14px;
  }

  .bk-validation-message:not([hidden]),
  .bk-support-box:not([hidden]) {
    right: 16px;
    bottom: 76px;
    left: 16px;
    max-height: 40svh;
  }
}

/* v45: aluno camera fit, support containment and first-page audio polish. */
.bk-journey-kicker {
  max-width: 100% !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  letter-spacing: 1.6px !important;
  font-size: 12px !important;
}

.bk-camera-live {
  overflow: hidden !important;
}

.bk-camera-live i {
  position: relative !important;
  z-index: 2 !important;
}

.bk-camera-live::before,
.bk-camera-live::after {
  content: none !important;
  display: none !important;
}

.bk-quality {
  overflow: hidden !important;
  contain: layout paint !important;
}

.bk-quality span {
  max-width: 100% !important;
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: clip !important;
  white-space: nowrap !important;
  font-size: clamp(7px, .58vw, 9px) !important;
  letter-spacing: 0 !important;
  line-height: 1 !important;
  transform: none !important;
}

.bk-quality.is-waiting span {
  font-size: clamp(6.8px, .54vw, 8.5px) !important;
  letter-spacing: 0 !important;
}

.bk-capture-card {
  overflow: hidden !important;
}

.bk-capture-title {
  min-width: 0 !important;
}

.bk-capture-title > div {
  min-width: 0 !important;
}

.bk-capture-title h2 {
  max-width: 100% !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.bk-capture-title p,
.bk-pose-copy,
.bk-validation-message {
  position: relative !important;
  z-index: 2 !important;
}

.bk-pose-copy {
  max-width: 100% !important;
  margin-top: 12px !important;
  overflow-wrap: break-word !important;
  line-height: 1.28 !important;
}

.bk-pose-list {
  position: relative !important;
  z-index: 1 !important;
}

.bk-support-box:not([hidden]) {
  position: static !important;
  inset: auto !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 10px !important;
  max-width: 100% !important;
  max-height: none !important;
  overflow: hidden !important;
  margin: 10px 0 !important;
  padding: 12px 14px !important;
}

.bk-support-box h3,
.bk-support-box p,
.bk-support-box #supportStatus {
  max-width: 100% !important;
  overflow-wrap: break-word !important;
}

.bk-support-box > div {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 10px !important;
}

.bk-support-box h3 {
  font-size: 16px !important;
  line-height: 1.1 !important;
}

.bk-support-box p {
  margin: 0 !important;
  font-size: 13px !important;
  line-height: 1.3 !important;
}

.bk-support-box #supportStatus {
  margin: 0 !important;
  font-size: 12px !important;
  line-height: 1.25 !important;
}

.bk-support-box .bk-secondary {
  width: 100% !important;
  min-height: 42px !important;
  min-width: 0 !important;
  justify-content: center !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  font-size: 10px !important;
  letter-spacing: .08px !important;
}

.bk-capture-card:has(.bk-support-box:not([hidden])) .bk-pose-list,
.bk-capture-card:has(.bk-support-box:not([hidden])) .bk-quality-grid,
.bk-capture-card:has(.bk-support-box:not([hidden])) .bk-validation-message:not([hidden]) {
  display: none !important;
}

.bk-capture-card:has(.bk-support-box:not([hidden])) .bk-pose-copy {
  border-bottom: 0 !important;
  padding-bottom: 0 !important;
}

@media (min-width: 981px) {
  .bk-screen[data-screen="camera"].is-active {
    overflow: hidden !important;
  }

  .bk-camera-layout {
    align-items: stretch !important;
  }

  .bk-capture-card {
    max-height: calc(100dvh - 190px) !important;
    overflow: hidden auto !important;
  }

  .bk-capture-card:has(.bk-support-box:not([hidden])) {
    display: grid !important;
    align-content: start !important;
    gap: 12px !important;
  }

  .bk-capture-card:has(.bk-support-box:not([hidden])) .bk-support-box:not([hidden]) {
    min-height: 168px !important;
  }

  .bk-quality-grid {
    grid-template-columns: repeat(5, minmax(72px, 1fr)) !important;
    gap: 8px !important;
  }
}

@media (max-width: 980px) {
  .bk-quality-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  }

  .bk-quality {
    min-height: 74px !important;
    padding-inline: 4px !important;
  }

  .bk-quality svg {
    width: 19px !important;
    height: 19px !important;
  }

  .bk-quality b {
    font-size: 9px !important;
  }

  .bk-quality span {
    font-size: 7px !important;
  }

  .bk-support-box:not([hidden]) {
    position: static !important;
    max-height: none !important;
    padding: 12px !important;
    margin: 8px 0 !important;
  }
}

@media (max-width: 640px) {
  .bk-quality-grid {
    display: grid !important;
  }

  .bk-capture-card:has(.bk-support-box:not([hidden])) {
    overflow: hidden !important;
  }

  .bk-support-box > div {
    grid-template-columns: 1fr !important;
  }

  .bk-support-box:not([hidden]) {
    max-height: none !important;
  }

  .bk-support-box .bk-secondary {
    min-height: 40px !important;
  }
}
/* 2026-07-22: orientacao lateral explicita na tela do aluno. */
.bk-turn-arrow.is-visible {
  display: inline-flex !important;
  position: absolute !important;
  top: 42% !important;
}

.bk-turn-arrow.is-left {
  left: 27% !important;
  transform: translate(-50%, -50%) !important;
}

.bk-turn-arrow.is-right {
  left: 73% !important;
  transform: translate(-50%, -50%) !important;
}

.bk-turn-arrow.is-left:before {
  content: "\2190" !important;
}

.bk-turn-arrow.is-left:after {
  content: "Sua esquerda" !important;
}

.bk-turn-arrow.is-right:before {
  content: "\2192" !important;
}

.bk-turn-arrow.is-right:after {
  content: "Sua direita" !important;
}

/* 2026-07-23: desktop low-height fit for Chrome/Edge windows with visible browser chrome/taskbar. */
@media (min-width: 981px) and (max-height: 700px) {
  .bk-app {
    padding: clamp(16px, 2.2vw, 30px) !important;
  }

  .bk-window {
    height: calc(100dvh - clamp(32px, 4.4vw, 60px)) !important;
    min-height: 0 !important;
  }

  .bk-header {
    height: 72px !important;
    padding: 12px 28px !important;
  }

  .bk-logo {
    width: 242px !important;
    height: 42px !important;
  }

  .bk-screen {
    min-height: calc(100dvh - clamp(32px, 4.4vw, 60px) - 72px) !important;
  }

  .bk-screen[data-screen="entry"].is-active {
    height: calc(100dvh - clamp(32px, 4.4vw, 60px) - 72px) !important;
    overflow: hidden !important;
  }

  .bk-journey {
    padding: 22px 22px !important;
  }

  .bk-journey ol {
    margin-top: 24px !important;
  }

  .bk-journey li {
    min-height: 82px !important;
  }

  .bk-entry-content {
    padding: 18px clamp(24px, 3vw, 40px) 18px !important;
    grid-template-rows: auto auto minmax(138px, 1fr) auto auto !important;
    gap: 10px !important;
  }

  .bk-title-block h1 {
    font-size: clamp(31px, 3vw, 40px) !important;
    line-height: .98 !important;
  }

  .bk-title-block > span {
    margin-top: 4px !important;
    font-size: 14px !important;
  }

  .bk-person-card {
    min-height: 78px !important;
    padding: 11px 20px !important;
  }

  .bk-avatar {
    width: 58px !important;
    height: 58px !important;
  }

  .bk-person-data h2 {
    margin: 4px 0 5px !important;
    font-size: clamp(27px, 2.55vw, 36px) !important;
  }

  .bk-person-meta {
    padding-top: 6px !important;
  }

  .bk-entry-cards {
    gap: 14px !important;
  }

  .bk-info-card {
    padding: 15px 18px !important;
  }

  .bk-card-heading {
    gap: 12px !important;
  }

  .bk-card-heading h3 {
    font-size: clamp(18px, 1.7vw, 24px) !important;
  }

  .bk-card-heading p {
    margin-top: 7px !important;
    font-size: 13px !important;
    line-height: 1.25 !important;
  }

  .bk-consent-row {
    padding: 9px 14px !important;
    font-size: 13px !important;
  }

  .bk-entry-content > .bk-primary {
    min-height: 46px !important;
  }

  .bk-screen[data-screen="camera"] {
    padding: 14px 30px !important;
  }

  .bk-screen[data-screen="camera"].is-active {
    height: calc(100dvh - clamp(32px, 4.4vw, 60px) - 72px) !important;
    overflow: hidden !important;
  }

  .bk-camera-layout {
    height: 100% !important;
    max-width: 1280px !important;
    grid-template-columns: minmax(0, 1.18fr) minmax(420px, .78fr) !important;
    gap: 18px !important;
    align-items: stretch !important;
  }

  .bk-camera-stage {
    height: 100% !important;
    min-height: 0 !important;
  }

  .bk-camera-tip {
    bottom: 22px !important;
    padding: 12px 18px !important;
    font-size: 15px !important;
  }

  .bk-capture-card {
    height: 100% !important;
    max-height: 100% !important;
    display: grid !important;
    align-content: start !important;
    grid-template-rows: auto auto auto auto auto auto !important;
    gap: 7px !important;
    padding: 18px !important;
    overflow: hidden !important;
  }

  .bk-capture-title {
    gap: 12px !important;
  }

  .bk-capture-title .bk-icon {
    width: 48px !important;
    height: 48px !important;
  }

  .bk-capture-title h2 {
    font-size: clamp(24px, 2.1vw, 30px) !important;
    line-height: 1.03 !important;
  }

  .bk-capture-title p {
    margin-top: 3px !important;
    font-size: 12px !important;
    line-height: 1.08 !important;
  }

  .bk-pose-copy {
    min-height: 0 !important;
    margin: 7px 0 6px !important;
    padding-bottom: 7px !important;
    font-size: 13px !important;
    line-height: 1.2 !important;
  }

  .bk-pose-list {
    gap: 6px !important;
  }

  .bk-pose {
    min-height: 50px !important;
    padding: 8px 12px !important;
    gap: 10px !important;
  }

  .bk-pose-number {
    width: 32px !important;
    height: 32px !important;
  }

  .bk-pose small {
    margin-top: 2px !important;
    font-size: 11px !important;
  }

  .bk-quality-grid {
    margin: 7px 0 !important;
    gap: 6px !important;
  }

  .bk-quality {
    min-height: 58px !important;
    padding: 7px 4px !important;
  }

  .bk-quality svg {
    width: 18px !important;
    height: 18px !important;
    margin-bottom: 3px !important;
  }

  .bk-quality b {
    font-size: 9px !important;
  }

  .bk-quality span {
    margin-top: 2px !important;
    font-size: 7px !important;
  }

  .bk-validation-message {
    margin: 6px 0 !important;
    padding: 9px 10px !important;
    font-size: 13px !important;
    line-height: 1.2 !important;
  }

  .bk-capture-card > .bk-primary {
    min-height: 42px !important;
    padding: 9px 14px !important;
    font-size: clamp(11px, 1.02vw, 13px) !important;
    line-height: 1 !important;
    white-space: nowrap !important;
  }
}

/* Ultrawide/large-height desktop: keep the first student screen compact.
   The cards should not stretch just because the monitor has spare height. */
@media (min-width: 981px) and (min-height: 760px) {
  .bk-window:has(.bk-screen[data-screen="entry"].is-active) {
    height: auto !important;
    min-height: 0 !important;
  }

  .bk-screen[data-screen="entry"].is-active {
    height: auto !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }

  .bk-entry-content {
    height: auto !important;
    grid-template-rows: auto auto auto auto auto !important;
  }

  .bk-entry-cards {
    height: clamp(224px, 24dvh, 264px) !important;
    align-self: start !important;
  }

  .bk-info-card {
    height: 100% !important;
  }

  .bk-consent-card {
    display: flex !important;
    align-items: center !important;
  }

  .bk-consent-card .bk-card-heading {
    width: 100% !important;
    align-items: flex-start !important;
  }

  .bk-consent-card .bk-card-heading > div {
    max-width: 42ch !important;
  }

  .bk-consent-card .bk-card-heading h3 {
    font-size: clamp(24px, 1.9vw, 30px) !important;
    line-height: 1.02 !important;
  }

  .bk-consent-card .bk-card-heading p {
    max-width: 40ch !important;
    margin-top: 12px !important;
    line-height: 1.35 !important;
  }
}

/* Mobile capture: validation guidance must sit below the status icons, never over them. */
@media (max-width: 980px) {
  .bk-screen[data-screen="camera"].is-active {
    overflow: auto !important;
  }

  .bk-screen[data-screen="camera"].is-active .bk-camera-layout {
    height: auto !important;
    min-height: 100% !important;
  }

  .bk-screen[data-screen="camera"].is-active .bk-capture-card {
    display: contents !important;
  }

  .bk-screen[data-screen="camera"].is-active .bk-quality-grid {
    order: 2 !important;
    margin: 0 !important;
  }

  .bk-screen[data-screen="camera"].is-active .bk-validation-message:not([hidden]) {
    position: static !important;
    inset: auto !important;
    order: 3 !important;
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    max-height: none !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 12px 14px !important;
    box-sizing: border-box !important;
    font-size: clamp(14px, 3.7vw, 17px) !important;
    line-height: 1.25 !important;
  }

  .bk-screen[data-screen="camera"].is-active .bk-capture-card > .bk-primary {
    grid-row: auto !important;
    order: 1 !important;
    min-height: 54px !important;
  }
}
