:root {
  --ink: #172033;
  --muted: #64708a;
  --bg: #dff7ff;
  --mint: #45d6a2;
  --mint-dark: #13a875;
  --berry: #ff5da2;
  --sun: #ffd35c;
  --violet: #7d65ff;
  --blue: #48a6ff;
  --card: rgba(255, 255, 255, 0.9);
  --shadow: 0 18px 40px rgba(50, 66, 100, 0.18);
  --font-kids: "Nunito", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-teen: "Manrope", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-ui: var(--font-kids);
  --page-background:
    radial-gradient(circle at 20% 10%, #fff6c7 0 12%, transparent 24%),
    radial-gradient(circle at 80% 20%, #ffc7ea 0 10%, transparent 23%),
    linear-gradient(135deg, #8ad9ff, #c6ffdc 45%, #ffeaa3);
  --phone-background: #f5f8fc;
  --btn-radius: 16px;
  --btn-primary-text: #2a1f0f;
  --btn-primary-border: rgba(255, 236, 198, 0.72);
  --btn-primary-bg: linear-gradient(180deg, #fff8e8 0%, #ecd080 42%, #c9a24a 100%);
  --btn-primary-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.65),
    0 10px 28px rgba(140, 100, 32, 0.22);
  --btn-primary-shadow-hover:
    inset 0 1px 0 rgba(255, 255, 255, 0.75),
    0 14px 34px rgba(140, 100, 32, 0.3);
  --btn-primary-shadow-active:
    inset 0 2px 8px rgba(80, 56, 16, 0.16),
    0 4px 14px rgba(140, 100, 32, 0.16);
  --btn-secondary-text: #3d2e1f;
  --btn-secondary-border: rgba(201, 162, 74, 0.4);
  --btn-secondary-bg: linear-gradient(180deg, #fffcf7 0%, #f3e8d4 100%);
  --btn-secondary-shadow: 0 8px 22px rgba(42, 32, 20, 0.1);
  --btn-secondary-shadow-hover: 0 12px 26px rgba(42, 32, 20, 0.14);
  --btn-secondary-shadow-active: 0 4px 12px rgba(42, 32, 20, 0.1);
  --select-gold: #c9a24a;
  --hero-reaction-width: 128px;
  --select-gold-shadow: rgba(201, 162, 74, 0.28);
  --hud-inset: 6px;
  --hud-bar-height: 32px;
  --hud-header-gap: 8px;
  --hud-top: calc(env(safe-area-inset-top, 0px) + var(--hud-inset));
  --screen-nav-top: calc(var(--hud-top) + var(--hud-bar-height) + var(--hud-header-gap));
  --app-height: 100vh;
  --app-height: 100dvh;
  --app-offset-top: 0px;
}

* {
  box-sizing: border-box;
}

html {
  height: 100%;
  background: var(--phone-background);
}

body {
  min-height: var(--app-height);
  height: var(--app-height);
  margin: 0;
  font-family: var(--font-ui);
  color: var(--ink);
  background: var(--phone-background);
  overflow: hidden;
  transition: background 280ms ease, color 280ms ease, font-family 280ms ease;
}

body[data-age-theme="teen"] {
  --mint: #24c0bc;
  --mint-dark: #0e838d;
  --berry: #ff7b74;
  --sun: #94dcff;
  --violet: #344b78;
  --blue: #58b7ff;
  --card: rgba(255, 255, 255, 0.86);
  --shadow: 0 22px 52px rgba(19, 34, 61, 0.16);
  --font-ui: var(--font-teen);
  --page-background:
    radial-gradient(circle at 18% 14%, rgba(132, 192, 255, 0.28) 0 12%, transparent 26%),
    radial-gradient(circle at 80% 18%, rgba(70, 212, 189, 0.16) 0 10%, transparent 24%),
    linear-gradient(135deg, #edf3fb, #dce7f4 48%, #f3f8ff);
  --phone-background: #f5f8fc;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: grid;
  place-items: stretch;
  width: 100%;
  height: var(--app-height);
  min-height: var(--app-height);
  max-height: var(--app-height);
  padding: 0;
  overflow: hidden;
  background: var(--phone-background);
}

.desktop-qr {
  display: none;
}

/* Presentation frame + QR codes: real desktops only, not phones in landscape */
@media (min-width: 900px) and (hover: hover) {
  body {
    height: auto;
    min-height: 100vh;
    background: var(--page-background);
    overflow-x: hidden;
    overflow-y: auto;
  }

  .app-shell {
    position: static;
    top: auto;
    left: auto;
    right: auto;
    width: auto;
    height: auto;
    min-height: 100vh;
    max-height: none;
    place-items: center;
    padding: 24px;
    overflow: visible;
    background: transparent;
    grid-template-columns: min-content minmax(auto, 420px) min-content;
    align-items: center;
    justify-content: center;
    column-gap: 20px;
  }

  .desktop-qr {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 80px;
    pointer-events: none;
  }

  .desktop-qr-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 14px;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: var(--shadow);
  }

  .desktop-qr-label {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--ink);
    text-align: center;
    line-height: 1.3;
    white-space: nowrap;
  }

  .desktop-qr img {
    display: block;
    width: 200px;
    height: 200px;
    object-fit: contain;
  }

  .desktop-qr--right img {
    filter: contrast(1.4) brightness(1.1);
  }
}

.phone {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 100%;
  max-height: 100%;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: var(--phone-background);
  box-shadow: none;
  transform: translateZ(0);
  transition: background 280ms ease, box-shadow 280ms ease, border-color 280ms ease;
}

@media (min-width: 900px) and (hover: hover) {
  .phone {
    width: min(100%, 420px);
    height: min(860px, calc(100vh - 48px));
    min-height: 760px;
    max-height: none;
    border: 12px solid #10182a;
    border-radius: 42px;
    box-shadow: 0 32px 90px rgba(21, 31, 56, 0.35);
  }

  body[data-age-theme="teen"] .phone {
    border-color: #16233c;
    box-shadow: 0 38px 96px rgba(14, 25, 45, 0.24);
  }
}

.status-bar {
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
  font-size: 0.78rem;
  font-weight: 900;
  color: #21314e;
}

.status-icons {
  letter-spacing: 1px;
}

.top-hud {
  position: absolute;
  z-index: 20;
  top: var(--hud-top);
  left: max(14px, env(safe-area-inset-left));
  right: max(14px, env(safe-area-inset-right));
  display: flex;
  align-items: center;
  gap: 6px;
  height: var(--hud-bar-height);
}

.top-hud.is-hidden {
  display: none;
}

.phone.pre-elevator .screen:not(.start-screen) {
  min-height: 100%;
  background: var(--phone-background);
  padding:
    max(clamp(14px, 3.5svh, 24px), env(safe-area-inset-top))
    clamp(18px, 5vw, 22px)
    max(clamp(14px, 2.5svh, 20px), env(safe-area-inset-bottom));
}

.phone:not(.pre-elevator) .screen {
  padding-top: var(--screen-nav-top);
}

.pill {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 32px;
  padding: 5px 8px;
  border: 2px solid rgba(23, 32, 51, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 8px 18px rgba(37, 53, 88, 0.1);
  backdrop-filter: blur(12px);
  font-size: 0.72rem;
  transition: background 280ms ease, border-color 280ms ease, box-shadow 280ms ease, border-radius 280ms ease;
}

.xp-pill {
  flex: 1 1 0;
  min-width: 0;
}

.streak-pill {
  flex: 0 0 auto;
  min-width: 44px;
}

body[data-age-theme="teen"] .pill {
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 12px 24px rgba(31, 47, 81, 0.1);
}

.account-hud-button {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  min-height: 32px;
  padding: 0;
  border: 2px solid rgba(23, 32, 51, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 8px 18px rgba(37, 53, 88, 0.1);
  backdrop-filter: blur(12px);
  color: #173b63;
  font-size: 0.95rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.account-hud-button:hover {
  transform: translateY(-1px);
  background: #ffffff;
}

.account-hud-button:active {
  transform: translateY(1px);
}

body[data-age-theme="teen"] .account-hud-button {
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 12px 24px rgba(31, 47, 81, 0.1);
}

.screen-header--split {
  justify-content: space-between;
}

.screen-header--split .icon-button[hidden] {
  display: none;
}

.screen-header-copy {
  flex: 1;
  min-width: 0;
}

.account-header-button {
  flex-shrink: 0;
  font-size: 1.1rem;
}

.settings-screen,
.settings-skin-screen,
.settings-mentor-screen {
  inset: 0 !important;
  padding: var(--screen-nav-top) 18px max(24px, env(safe-area-inset-bottom)) !important;
  background: transparent;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
  z-index: 3;
}

.settings-screen.active {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.settings-account-bg {
  position: absolute;
  inset: 0;
  z-index: 2;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  background: url("./assets/settings-account-bg.png") center center / cover no-repeat;
  transition: opacity 220ms ease, visibility 220ms ease;
}

.settings-account-bg-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(12, 18, 30, 0.42) 0%,
    rgba(12, 18, 30, 0.28) 24%,
    rgba(12, 18, 30, 0.48) 62%,
    rgba(12, 18, 30, 0.72) 100%
  );
}

.phone.settings-account-bg-active .settings-account-bg {
  opacity: 1;
  visibility: visible;
}

.settings-screen > *,
.settings-skin-screen > *,
.settings-mentor-screen > * {
  position: relative;
  z-index: 1;
}

.settings-screen .screen-header p,
.settings-skin-screen .screen-header p,
.settings-mentor-screen .screen-header p {
  color: rgba(255, 236, 198, 0.82);
}

.settings-screen .screen-header h1,
.settings-skin-screen .screen-header h1,
.settings-mentor-screen .screen-header h1 {
  color: #fff8e8;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
}

.settings-screen .field-label,
.settings-screen .vision-section-label,
.settings-skin-screen .vision-section-label,
.settings-mentor-screen .vision-section-label,
.settings-mentor-screen .mentor-description {
  color: rgba(255, 244, 224, 0.9);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35);
}

.settings-mentor-screen .settings-mentor-note {
  color: rgba(255, 236, 198, 0.82);
  text-align: center;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35);
}

.settings-gender-section {
  margin-bottom: 4px;
}

.settings-gender-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.settings-gender-option {
  min-height: 48px;
  padding: 12px 10px;
  border: 3px solid rgba(255, 236, 198, 0.18);
  border-radius: 18px;
  color: #fff8e8;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
  font-size: 0.92rem;
  font-weight: 900;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35);
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 220ms ease,
    box-shadow 220ms ease;
}

.settings-gender-option.selected {
  border-color: var(--select-gold);
  color: #1f395b;
  background: linear-gradient(180deg, #fffaf0 0%, #f8edd8 100%);
  box-shadow: 0 12px 24px var(--select-gold-shadow);
  text-shadow: none;
  transform: translateY(-1px);
}

.settings-skin-screen .vision-type-description {
  border-color: rgba(255, 236, 198, 0.18);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(245, 238, 226, 0.94) 100%);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.22);
}

.settings-mentor-screen .mentor-stage {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9) 0%, rgba(245, 238, 226, 0.88) 100%);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.22);
}

.settings-email {
  margin: 0 0 20px;
  color: rgba(255, 236, 198, 0.78);
  font-size: 0.86rem;
  font-weight: 700;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35);
}

.settings-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.settings-section + .settings-section {
  margin-top: 24px;
}

.settings-preview-card {
  margin-top: 4px;
}

.settings-summary-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 18px 16px 16px;
  border: 3px solid rgba(255, 236, 198, 0.18);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(245, 238, 226, 0.94) 100%);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(8px);
}

.settings-summary-media {
  width: min(100%, 220px);
  overflow: hidden;
  border-radius: 20px;
  background: linear-gradient(180deg, #edf4fb, #dbe6f3);
  box-shadow:
    inset 0 0 0 1px rgba(23, 32, 51, 0.08),
    0 14px 28px rgba(22, 39, 69, 0.1);
}

.settings-summary-media--skin {
  aspect-ratio: 2 / 3;
}

.settings-summary-media--mentor {
  width: min(100%, 180px);
  aspect-ratio: 560 / 973;
}

.settings-summary-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.settings-summary-title {
  width: 100%;
  margin: 0;
  color: #1f395b;
  font-size: 1.02rem;
  font-weight: 900;
  line-height: 1.3;
  text-align: center;
}

.settings-edit-icon-button {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 2px solid rgba(201, 162, 74, 0.35);
  border-radius: 14px;
  color: #7a5718;
  background: linear-gradient(180deg, #fffaf0 0%, #f3e4bf 100%);
  box-shadow: 0 8px 18px rgba(140, 100, 32, 0.16);
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.settings-edit-icon-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(140, 100, 32, 0.22);
}

.settings-edit-icon-button:active {
  transform: translateY(0);
}

.settings-edit-icon {
  width: 18px;
  height: 18px;
}

.settings-skin-screen.active,
.settings-mentor-screen.active {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.settings-mentor-edit-grid {
  width: min(100%, 300px);
  margin: 0 auto;
}

.settings-mentor-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.settings-mentor-card {
  min-width: 0;
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
  border-radius: 18px;
  text-align: center;
  transition: transform 160ms ease;
  overflow: visible;
}

.settings-mentor-card .vision-portrait-frame {
  aspect-ratio: 560 / 973;
  min-height: 0;
  border-radius: 18px;
}

.settings-mentor-card.selected {
  border: none;
  box-shadow: none;
}

.settings-mentor-card.selected .vision-portrait-frame {
  outline-color: var(--select-gold);
  transform: translateY(-2px);
  box-shadow: 0 18px 34px var(--select-gold-shadow);
}

.settings-mentor-note,
.settings-save-status {
  margin: 0;
  color: #5f7395;
  font-size: 0.84rem;
  font-weight: 700;
}

.settings-save-status {
  color: #1f7a55;
}

.settings-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: auto;
  padding-top: 28px;
}

.settings-logout-button {
  color: #b83232;
  border-color: rgba(217, 72, 72, 0.28);
  background: linear-gradient(180deg, #fff8f8 0%, #fdeaea 100%);
  box-shadow: 0 8px 22px rgba(184, 50, 50, 0.1);
}

.restart-game-overlay {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(15, 22, 36, 0.72);
  backdrop-filter: blur(4px);
}

.restart-game-overlay.is-open {
  display: flex;
  animation: recallOverlayIn 280ms ease both;
}

.restart-game-dialog {
  width: 100%;
  max-width: 320px;
  margin: 0;
}

.restart-game-dialog h2 {
  margin: 0 0 10px;
  text-align: center;
  font-size: 1.2rem;
}

.restart-game-message {
  margin: 0 0 18px;
  text-align: center;
  color: #465576;
  font-weight: 700;
  line-height: 1.45;
}

.restart-game-dialog .dialog-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#restartGameOverlay[hidden] {
  display: none !important;
}

.settings-screen .name-input {
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}

.settings-screen .name-input.invalid {
  border-color: #ff8b8b;
  background: #fff7f7;
}

.settings-screen .profile-name-error {
  color: #ffd0d0;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.45);
}

.hearts-pill {
  flex: 0 0 auto;
  min-width: 72px;
  gap: 3px;
  padding-inline: 6px;
}

.hud-heart {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  line-height: 0;
}

.hud-heart-icon {
  display: block;
  width: 18px;
  height: 18px;
  transition: transform 180ms ease, filter 180ms ease;
}

.hud-heart.active .hud-heart-icon {
  filter: drop-shadow(0 2px 5px rgba(255, 61, 111, 0.4));
}

.screen {
  position: absolute;
  inset: 0;
  display: none;
  padding: 42px 22px 24px;
  overflow-y: auto;
  animation: screenIn 360ms ease both;
  transition: background 280ms ease;
  box-sizing: border-box;
}

.screen.active {
  display: block;
}

@keyframes screenIn {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.screen-header,
.lesson-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 0;
  margin-bottom: 12px;
}

.phone:not(.pre-elevator) .screen > .screen-header:first-child,
.phone:not(.pre-elevator) .screen > .lesson-header:first-child {
  margin-top: 0;
}

.screen-header p {
  margin: 0 0 2px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

h1,
h2,
p {
  margin-top: 0;
}

.screen-header h1 {
  margin: 0;
  font-size: 1.55rem;
  line-height: 1;
}

body[data-age-theme="teen"] .screen-header p,
body[data-age-theme="teen"] .lesson-step-label,
body[data-age-theme="teen"] .task-type {
  letter-spacing: 0.12em;
}

.icon-button {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 16px;
  color: var(--ink);
  background: #fff;
  box-shadow: 0 8px 18px rgba(37, 53, 88, 0.12);
  font-size: 2rem;
  line-height: 1;
  transition: transform 160ms ease, box-shadow 160ms ease, border-radius 280ms ease, background 280ms ease;
}

.primary-button,
.secondary-button {
  width: 100%;
  min-height: 54px;
  border: 1px solid transparent;
  border-radius: var(--btn-radius);
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: 0.03em;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
}

.primary-button {
  color: var(--btn-primary-text);
  border-color: var(--btn-primary-border);
  background: var(--btn-primary-bg);
  box-shadow: var(--btn-primary-shadow);
}

.secondary-button {
  color: var(--btn-secondary-text);
  border-color: var(--btn-secondary-border);
  background: var(--btn-secondary-bg);
  box-shadow: var(--btn-secondary-shadow);
}

.primary-button:hover {
  transform: translateY(-1px);
  box-shadow: var(--btn-primary-shadow-hover);
}

.secondary-button:hover {
  transform: translateY(-1px);
  border-color: rgba(201, 162, 74, 0.55);
  box-shadow: var(--btn-secondary-shadow-hover);
}

.primary-button:active {
  transform: translateY(1px) scale(0.995);
  box-shadow: var(--btn-primary-shadow-active);
}

.secondary-button:active {
  transform: translateY(1px) scale(0.995);
  box-shadow: var(--btn-secondary-shadow-active);
}

.primary-button.small {
  min-height: 50px;
  font-size: 0.95rem;
}

.primary-button:disabled,
.secondary-button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
  transform: none;
  box-shadow: none;
}

.icon-button:hover,
.choice-card:hover,
.floor-button:hover:not(.locked):not(.broken),
.quiz-option:hover {
  transform: translateY(-2px);
}

.icon-button:active,
.choice-card:active,
.floor-button:active:not(.locked):not(.broken),
.quiz-option:active {
  transform: translateY(4px) scale(0.98);
}

body[data-age-theme="teen"] .icon-button,
body[data-age-theme="teen"] .primary-button,
body[data-age-theme="teen"] .secondary-button {
  border-radius: var(--btn-radius);
}

.start-screen.active {
  inset: 0 !important;
  display: grid !important;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: clamp(8px, 1.5svh, 14px);
  height: 100%;
  max-height: 100%;
  min-height: 0;
  overflow: hidden !important;
  overscroll-behavior: none;
  padding:
    clamp(10px, 2svh, 18px)
    clamp(16px, 5vw, 22px)
    max(clamp(10px, 1.5svh, 16px), env(safe-area-inset-bottom));
  box-sizing: border-box;
}

.start-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(6px, 1.4svh, 12px);
  min-height: 0;
  max-height: 100%;
  overflow: hidden;
  text-align: center;
}

.start-logo {
  display: block;
  width: auto;
  height: auto;
  max-width: min(62vw, 168px);
  max-height: min(20svh, 148px);
  flex: 0 1 auto;
  object-fit: contain;
  animation: logoPulse 2.8s ease-in-out infinite;
  will-change: transform, filter;
}

@keyframes logoPulse {
  0%,
  100% {
    transform: scale(1);
    filter: drop-shadow(0 4px 14px rgba(255, 196, 72, 0.28));
  }

  50% {
    transform: scale(1.045);
    filter: drop-shadow(0 8px 24px rgba(255, 210, 96, 0.62));
  }
}

.start-copy {
  flex-shrink: 1;
  min-height: 0;
  max-width: 20rem;
}

.gender-screen.active,
.mentor-screen.active,
.entrance-screen.active,
.auth-screen.active {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.auth-screen .screen-header {
  flex-shrink: 0;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 4px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 0 0 1px rgba(31, 47, 81, 0.08);
}

.auth-tabs[hidden],
.auth-email-wrap[hidden],
.auth-password-wrap[hidden],
.auth-confirm-wrap[hidden],
.auth-text-button[hidden] {
  display: none !important;
}

.auth-tab {
  border: 0;
  border-radius: 14px;
  padding: 12px 10px;
  background: transparent;
  color: #4f6487;
  font-weight: 800;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.auth-tab.active {
  background: linear-gradient(180deg, #ffffff, #f2f7ff);
  color: #173b63;
  box-shadow: 0 8px 18px rgba(31, 47, 81, 0.12);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.auth-screen .field-label {
  margin-top: 4px;
}

.auth-input.invalid {
  border-color: #ff8b8b;
  background: #fff7f7;
}

.auth-hint {
  margin: 2px 0 0;
  color: #5f7395;
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.4;
}

.auth-error {
  margin: 0;
  color: #d94848;
  font-size: 0.86rem;
  font-weight: 800;
  line-height: 1.35;
}

.auth-error.is-success {
  color: #1f8a4c;
}

.auth-password-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.auth-text-button {
  align-self: flex-start;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: #3d6ea8;
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
}

.auth-text-button:hover {
  color: #173b63;
  text-decoration: underline;
}

.auth-back-login {
  margin-top: 2px;
}

.auth-submit {
  margin-top: auto;
}

.auth-submit:disabled {
  cursor: not-allowed;
  opacity: 0.48;
  transform: none;
  box-shadow: none;
}

.profile-screen.active {
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: hidden;
  height: 100%;
  box-sizing: border-box;
}

.profile-screen .screen-header {
  flex-shrink: 0;
}

.screen-tag {
  margin: 0 0 8px;
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.start-copy h1 {
  margin: 0 0 clamp(4px, 1svh, 8px);
  font-size: clamp(1.05rem, 4.5vw, 1.4rem);
  line-height: 1.1;
}

.start-description {
  margin-bottom: 0;
  color: var(--muted);
  font-size: clamp(0.8rem, 3.3vw, 0.94rem);
  font-weight: 800;
  line-height: 1.3;
}

@media (max-height: 700px) {
  .start-logo {
    max-width: min(52vw, 132px);
    max-height: min(16svh, 118px);
  }

  .start-copy h1 {
    font-size: clamp(0.98rem, 4vw, 1.15rem);
  }

  .start-description {
    font-size: clamp(0.76rem, 3vw, 0.84rem);
  }

  .start-screen .primary-button {
    min-height: 44px;
  }
}

.age-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.age-card {
  min-height: 150px;
  padding: 16px;
  border: 3px solid transparent;
  border-radius: 28px;
  color: #32405f;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
  text-align: left;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 280ms ease,
    border-radius 280ms ease,
    box-shadow 280ms ease;
}

.age-card.selected {
  border-color: var(--select-gold);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(236, 255, 248, 0.95));
}

.age-card-range {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--violet), var(--blue));
  font-size: 0.78rem;
  font-weight: 900;
}

.age-card strong,
.age-card small {
  display: block;
}

.age-card strong {
  margin: 12px 0 8px;
  font-size: 1.05rem;
}

.age-card small {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.4;
}

.start-preview {
  position: relative;
  min-height: 306px;
  padding: 18px;
  overflow: hidden;
  border-radius: 34px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.42));
  box-shadow: var(--shadow);
}

.entrance-scene {
  min-height: 382px;
}

.preview-panel {
  position: absolute;
  inset: 18px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(14px) scale(0.98);
  transition: opacity 220ms ease, transform 220ms ease;
}

.preview-panel.active {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.preview-kids,
.preview-teen {
  overflow: hidden;
}

.preview-caption {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  margin: 0;
  padding: 12px 14px;
  border-radius: 18px;
  color: #33415f;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 22px rgba(28, 44, 78, 0.12);
  font-size: 0.86rem;
  font-weight: 900;
  line-height: 1.38;
}

.preview-teen {
  display: grid;
  place-items: center;
}

.teen-preview-card {
  width: 100%;
  height: calc(100% - 66px);
  padding: 18px;
  border-radius: 28px;
  color: #eef4ff;
  background:
    radial-gradient(circle at 84% 20%, rgba(88, 183, 255, 0.24), transparent 22%),
    linear-gradient(180deg, #152238, #21344f 58%, #1a2a42);
  box-shadow: 0 18px 38px rgba(15, 25, 42, 0.34);
}

.teen-preview-top,
.teen-preview-stats,
.teen-preview-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.teen-preview-top {
  margin-bottom: 18px;
}

.teen-preview-top span {
  color: rgba(238, 244, 255, 0.72);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.teen-preview-top strong {
  font-size: 1.05rem;
}

.teen-preview-stats {
  margin-bottom: 18px;
}

.teen-preview-stats div {
  flex: 1;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
}

.teen-preview-stats span,
.teen-preview-foot p {
  display: block;
  color: rgba(238, 244, 255, 0.72);
  font-size: 0.75rem;
  line-height: 1.35;
}

.teen-preview-stats strong {
  display: block;
  margin-top: 8px;
  font-size: 1rem;
}

.teen-preview-chart {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: end;
  gap: 10px;
  height: 108px;
  margin-bottom: 18px;
}

.teen-preview-chart span {
  border-radius: 16px 16px 6px 6px;
  background: linear-gradient(180deg, #56b9ff, #24c0bc);
  box-shadow: 0 12px 24px rgba(36, 192, 188, 0.2);
  animation: teenBars 2.1s ease-in-out infinite;
}

.teen-preview-chart span:nth-child(1) {
  height: 34%;
}

.teen-preview-chart span:nth-child(2) {
  height: 52%;
  animation-delay: -0.2s;
}

.teen-preview-chart span:nth-child(3) {
  height: 76%;
  animation-delay: -0.4s;
}

.teen-preview-chart span:nth-child(4) {
  height: 58%;
  animation-delay: -0.6s;
}

.teen-preview-chart span:nth-child(5) {
  height: 88%;
  animation-delay: -0.8s;
}

.teen-preview-foot {
  align-items: flex-start;
}

.teen-preview-foot p {
  margin: 0;
}

.age-note {
  margin: 0;
  color: #33415f;
  font-size: 0.82rem;
  font-weight: 900;
  text-align: center;
}

.start-footer {
  display: grid;
  gap: 0;
  width: 100%;
}

.start-screen .primary-button {
  min-height: 48px;
}

.gender-description,
.gender-note,
.mentor-description,
.mentor-note {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
  line-height: 1.45;
}

.gender-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  align-items: stretch;
}

.gender-screen .gender-card {
  min-width: 0;
  padding: 0;
  border: none;
  border-radius: 28px;
  background: transparent;
  box-shadow: none;
  transition: transform 200ms ease;
}

.gender-screen .gender-card.selected {
  border: none;
  box-shadow: none;
}

.gender-screen .gender-portrait-frame {
  min-height: 300px;
  outline: 3px solid rgba(201, 162, 74, 0.28);
  background: linear-gradient(165deg, #b57bff 0%, #8b4dff 38%, #6d28d9 100%);
}

.gender-screen .gender-portrait-frame[data-gender-tone="boy"] {
  background: linear-gradient(165deg, #7c8cff 0%, #6d5bff 40%, #5b21b6 100%);
}

.gender-screen .gender-card.selected .gender-portrait-frame {
  outline: 4px solid var(--select-gold);
  transform: translateY(-4px);
  box-shadow: 0 22px 40px var(--select-gold-shadow);
}

.gender-portrait-image {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  min-height: 300px;
  object-fit: cover;
  object-position: center top;
}

.gender-screen .vision-portrait-name {
  z-index: 3;
  padding-top: 48px;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

.mentor-stage {
  position: relative;
  min-height: 398px;
  padding: 18px;
  overflow: hidden;
  border-radius: 34px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.74), rgba(255, 255, 255, 0.42));
  box-shadow: var(--shadow);
}

.mentor-screen .mentor-stage {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  min-height: 0;
  padding: 12px 14px;
}

.mentor-screen .mentor-grid {
  gap: 10px;
  width: min(100%, 300px);
  margin: 0 auto;
}

.mentor-screen .mentor-card {
  min-width: 0;
  gap: 8px;
}

.mentor-screen .mentor-card .vision-portrait-frame {
  height: auto;
  min-height: 0;
  aspect-ratio: 2 / 3;
  border-radius: 18px;
}

.mentor-screen .mentor-card small {
  font-size: 0.74rem;
  line-height: 1.32;
}

.mentor-screen .vision-portrait-name {
  padding: 24px 8px 10px;
  font-size: 0.86rem;
}

.mentor-screen .mentor-note {
  flex-shrink: 0;
  text-align: center;
  font-size: 0.86rem;
}

.mentor-screen .mentor-description {
  flex-shrink: 0;
  font-size: 0.88rem;
}

.mentor-screen > .primary-button {
  flex-shrink: 0;
  margin-top: auto;
}

.mentor-panel {
  display: flex;
  align-items: stretch;
}

.mentor-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  width: 100%;
}

.mentor-grid-single {
  grid-template-columns: minmax(0, 240px);
  justify-content: center;
}

.mentor-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0;
  border: none;
  border-radius: 26px;
  color: #32405f;
  background: transparent;
  box-shadow: none;
  text-align: left;
  transition:
    transform 160ms ease,
    box-shadow 220ms ease,
    border-radius 220ms ease;
}

.mentor-card.selected {
  border: none;
  box-shadow: none;
}

.mentor-card .vision-portrait-frame {
  height: 280px;
  min-height: 280px;
  border-radius: 22px;
}

.mentor-card.selected .vision-portrait-frame {
  outline-color: var(--select-gold);
  transform: translateY(-4px);
  box-shadow: 0 22px 40px var(--select-gold-shadow);
}

.mentor-card strong,
.mentor-card small,
.mentor-name-image {
  display: block;
}

.mentor-name-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.settings-mentor-card .mentor-name-image,
.mentor-card .mentor-name-image {
  min-height: 100%;
  border-radius: 0;
}

.mentor-screen .mentor-select-video {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 100%;
  object-fit: cover;
  object-position: top center;
  border-radius: 0;
  background: #10141c;
}

.mentor-card small {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.4;
}

.mentor-visual {
  display: grid;
  place-items: stretch;
  height: 280px;
  overflow: hidden;
  border-radius: 22px;
  background: #10141c;
}

.mentor-card[data-mentor="mrs"] .mentor-static {
  transform: scaleX(-1);
}

.mode-chip {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  width: fit-content;
  margin-bottom: 14px;
  padding: 0 14px;
  border-radius: 999px;
  color: #244262;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 8px 18px rgba(37, 53, 88, 0.08);
  font-size: 0.78rem;
  font-weight: 900;
}

.profile-screen .hero-preview-card,
.profile-preview-card {
  display: block;
  flex: 1;
  min-height: 0;
  margin: 0;
}

.profile-content {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
  overflow: hidden;
}

.profile-preview-card .hero-preview-media {
  height: 100%;
  min-height: 0;
  border-radius: 28px;
  box-shadow: 0 18px 36px rgba(31, 47, 81, 0.14);
}

.profile-preview-card .hero-preview-image {
  object-position: center top;
}

.profile-screen .field-label {
  margin-top: 0;
  flex-shrink: 0;
}

.profile-screen .name-input {
  margin-bottom: 0;
  flex-shrink: 0;
}

.profile-name-error {
  margin: 8px 0 0;
  color: #d94848;
  font-size: 0.86rem;
  font-weight: 800;
  line-height: 1.35;
}

.profile-screen .name-input.invalid {
  border-color: #ff8b8b;
  background: #fff7f7;
}

.profile-footer .primary-button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
  transform: none;
  box-shadow: none;
}

.profile-footer {
  flex-shrink: 0;
  padding-top: 12px;
  background: linear-gradient(180deg, rgba(237, 243, 251, 0), #edf3fb 36%);
}

body[data-age-theme="teen"] .screen-tag {
  color: #1b567e;
}

body[data-age-theme="teen"] .age-card {
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.78);
}

.entrance-description {
  margin: -2px 0 0;
  color: var(--muted);
  font-weight: 800;
  line-height: 1.45;
}

body[data-age-theme="teen"] .entrance-description:empty {
  display: none;
}

body[data-age-theme="teen"] .age-card.selected {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(238, 247, 255, 0.96));
  box-shadow: 0 18px 40px rgba(22, 39, 69, 0.14);
}

body[data-age-theme="teen"] .age-card-range {
  background: linear-gradient(135deg, #1b567e, #24c0bc);
}

body[data-age-theme="teen"] .start-preview,
body[data-age-theme="teen"] .mentor-stage,
body[data-age-theme="teen"] .preview-caption,
body[data-age-theme="teen"] .mode-chip {
  border-radius: 22px;
}

body[data-age-theme="teen"] .start-preview {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.76), rgba(236, 244, 252, 0.58));
}

body[data-age-theme="teen"] .mentor-stage {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(236, 244, 252, 0.56));
}

body[data-age-theme="teen"] .mode-chip {
  color: #1f395b;
  background: rgba(255, 255, 255, 0.78);
}

body[data-age-theme="teen"] .mentor-card {
  border-radius: 20px;
}

body[data-age-theme="teen"] .mentor-visual {
  border-radius: 18px;
  background:
    radial-gradient(circle at 50% 14%, rgba(255, 255, 255, 0.28), transparent 24%),
    linear-gradient(180deg, #edf4fb, #dbe6f3);
}

body[data-age-theme="teen"] .gender-screen .gender-portrait-frame {
  border-radius: 26px;
}

.sky-orbs span {
  position: absolute;
  border-radius: 999px;
  opacity: 0.75;
  animation: float 5s ease-in-out infinite;
}

.sky-orbs span:nth-child(1) {
  width: 84px;
  height: 84px;
  top: 82px;
  left: 20px;
  background: #fff7aa;
}

.sky-orbs span:nth-child(2) {
  width: 62px;
  height: 62px;
  top: 120px;
  right: 34px;
  background: #ffc7ea;
  animation-delay: -1s;
}

.sky-orbs span:nth-child(3) {
  width: 48px;
  height: 48px;
  top: 252px;
  left: 48px;
  background: #7decc2;
  animation-delay: -2s;
}

@keyframes float {
  50% {
    transform: translateY(-12px);
  }
}

@keyframes teenBars {
  50% {
    filter: brightness(1.08);
    transform: translateY(-5px);
  }
}

.campus-backdrop {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.campus-backdrop span {
  position: absolute;
  border-radius: 999px;
  animation: float 5s ease-in-out infinite;
}

.kids-backdrop span:nth-child(1) {
  width: 86px;
  height: 86px;
  top: 22px;
  left: 16px;
  background: rgba(255, 244, 134, 0.9);
}

.kids-backdrop span:nth-child(2) {
  width: 62px;
  height: 62px;
  top: 54px;
  right: 24px;
  background: rgba(255, 175, 213, 0.8);
  animation-delay: -1s;
}

.kids-backdrop span:nth-child(3) {
  width: 48px;
  height: 48px;
  top: 172px;
  left: 28px;
  background: rgba(95, 225, 183, 0.8);
  animation-delay: -2s;
}

.teen-backdrop span:nth-child(1) {
  width: 108px;
  height: 108px;
  top: 18px;
  right: 12px;
  background: rgba(88, 183, 255, 0.18);
}

.teen-backdrop span:nth-child(2) {
  width: 72px;
  height: 72px;
  bottom: 42px;
  left: 18px;
  background: rgba(36, 192, 188, 0.16);
  animation-delay: -1.2s;
}

.teen-backdrop span:nth-child(3) {
  width: 34px;
  height: 34px;
  top: 90px;
  left: 38px;
  background: rgba(255, 255, 255, 0.22);
  animation-delay: -2s;
}

.campus-building {
  position: relative;
  width: min(100%, 286px);
  margin: 30px auto 0;
  filter: drop-shadow(0 24px 24px rgba(47, 73, 117, 0.18));
}

.campus-sign {
  position: relative;
  z-index: 3;
  width: fit-content;
  margin: 0 auto -6px;
  padding: 9px 18px;
  border: 4px solid #172033;
  color: #fff;
  font-weight: 900;
  box-shadow: 0 7px 0 #172033;
}

.school-sign {
  border-radius: 18px;
  background: linear-gradient(135deg, #7d65ff, #48a6ff);
}

.school-flag {
  position: absolute;
  z-index: 4;
  top: -8px;
  right: 28px;
  min-width: 58px;
  min-height: 32px;
  padding: 6px 10px;
  border: 4px solid #172033;
  border-radius: 14px 14px 4px 4px;
  color: #172033;
  background: #ffd35c;
  font-size: 0.74rem;
  font-weight: 900;
  text-align: center;
  transform: rotate(6deg);
}

.school-roof {
  width: 246px;
  height: 58px;
  margin: 0 auto;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  border-radius: 20px;
  background: linear-gradient(135deg, #ff7dbb, #ffd35c);
}

.school-body {
  display: grid;
  grid-template-columns: 1fr 92px 1fr;
  gap: 16px;
  align-items: end;
  min-height: 220px;
  padding: 28px 24px 0;
  border: 5px solid #172033;
  border-radius: 28px 28px 18px 18px;
  background: linear-gradient(180deg, #ffffff, #c9f5ff);
}

.school-window,
.academy-window {
  border: 5px solid #172033;
}

.school-window {
  height: 74px;
  border-radius: 20px;
  background: linear-gradient(180deg, #fff2a8, #63ceff);
}

.school-door {
  height: 126px;
  display: grid;
  place-items: center;
  border: 5px solid #172033;
  border-bottom: 0;
  border-radius: 28px 28px 0 0;
  color: #fff;
  background: linear-gradient(180deg, #48a6ff, #7d65ff);
  font-size: 0.84rem;
  font-weight: 900;
}

.school-steps {
  width: 258px;
  height: 24px;
  margin: 0 auto;
  border-radius: 0 0 24px 24px;
  background: #9fb2cf;
}

.academy-campus {
  display: grid;
  place-items: center;
  width: min(100%, 292px);
  margin-top: 4px;
}

.academy-campus > img:first-child {
  display: block;
  width: 100%;
  max-height: 350px;
  object-fit: contain;
}

.academy-student {
  position: absolute;
  z-index: 5;
  left: 46px;
  bottom: 8px;
  width: auto;
  height: 138px;
  filter: drop-shadow(0 12px 10px rgba(23, 32, 51, 0.24));
  pointer-events: none;
}

.academy-plate {
  position: absolute;
  z-index: 4;
  top: 10px;
  left: 18px;
  min-width: 52px;
  min-height: 52px;
  padding: 10px;
  border: 4px solid #172033;
  border-radius: 18px;
  color: #172033;
  background: linear-gradient(135deg, #8fdcff, #d4f3ff);
  font-size: 0.82rem;
  font-weight: 900;
  display: grid;
  place-items: center;
}

.academy-signature {
  border-radius: 16px;
  background: linear-gradient(135deg, #16345a, #2a5882);
}

.academy-crown {
  width: 228px;
  height: 26px;
  margin: 0 auto;
  border-radius: 24px 24px 8px 8px;
  background: linear-gradient(180deg, #dae6f6, #a9b9d3);
  box-shadow: inset 0 -4px 0 rgba(22, 35, 60, 0.12);
}

.academy-front {
  display: grid;
  grid-template-columns: 1fr 96px 1fr;
  gap: 16px;
  align-items: end;
  min-height: 228px;
  padding: 28px 22px 0;
  border: 5px solid #172033;
  border-radius: 24px 24px 18px 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.36), rgba(255, 255, 255, 0.06)),
    linear-gradient(180deg, #d8e2f1, #aebcd3 62%, #dfe7f4);
}

.academy-window.tall {
  height: 118px;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.58), rgba(255, 255, 255, 0.1)),
    linear-gradient(180deg, #6f8eb1, #314b6e);
}

.academy-entry {
  height: 138px;
  display: grid;
  place-items: center;
  border: 5px solid #172033;
  border-bottom: 0;
  border-radius: 28px 28px 0 0;
  color: #fff;
  background: linear-gradient(180deg, #1a3d62, #11253f);
  font-size: 0.84rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.academy-steps.wide {
  width: 270px;
  height: 26px;
  margin-top: 0;
  border-radius: 0 0 26px 26px;
  background: #96a8c3;
}

.academy {
  position: relative;
  width: 310px;
  margin: 42px auto 8px;
  filter: drop-shadow(0 24px 24px rgba(47, 73, 117, 0.18));
}

.academy-sign {
  position: relative;
  z-index: 2;
  width: fit-content;
  margin: 0 auto -5px;
  padding: 9px 18px;
  border: 4px solid #172033;
  border-radius: 18px;
  color: #fff;
  background: linear-gradient(135deg, var(--violet), var(--blue));
  font-weight: 900;
  box-shadow: 0 7px 0 #172033;
}

.academy-roof {
  width: 250px;
  height: 56px;
  margin: 0 auto;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  background: linear-gradient(135deg, #ff7dbb, #ffd35c);
  border-radius: 18px;
}

.academy-body {
  display: grid;
  grid-template-columns: 1fr 88px 1fr;
  align-items: end;
  gap: 16px;
  min-height: 220px;
  padding: 28px 24px 0;
  border: 5px solid #172033;
  border-radius: 28px 28px 18px 18px;
  background: linear-gradient(180deg, #ffffff, #c9f5ff);
}

.window {
  height: 74px;
  border: 5px solid #172033;
  border-radius: 20px;
  background: linear-gradient(180deg, #fff2a8, #63ceff);
}

.door {
  height: 126px;
  display: grid;
  place-items: center;
  border: 5px solid #172033;
  border-bottom: 0;
  border-radius: 28px 28px 0 0;
  color: #fff;
  background: linear-gradient(180deg, #48a6ff, #7d65ff);
  font-size: 0.85rem;
  font-weight: 900;
}

.glow-door {
  animation: glow 1.5s ease-in-out infinite;
}

@keyframes glow {
  50% {
    box-shadow: 0 0 34px rgba(255, 211, 92, 0.95), inset 0 0 22px rgba(255, 255, 255, 0.4);
  }
}

.academy-steps {
  width: 260px;
  height: 24px;
  margin: 0 auto;
  border-radius: 0 0 24px 24px;
  background: #9fb2cf;
}

.hero-row,
.coach-row,
.mr-money-card {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 18px 0;
}

.speech-bubble,
.money-speech {
  position: relative;
  flex: 1;
  padding: 16px;
  border: 3px solid rgba(23, 32, 51, 0.08);
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow);
  font-weight: 800;
}

.speech-bubble::before,
.money-speech::before {
  content: "";
  position: absolute;
  left: -9px;
  bottom: 24px;
  width: 18px;
  height: 18px;
  background: #fff;
  transform: rotate(45deg);
}

.money-speech {
  animation: bubblePop 360ms cubic-bezier(0.22, 1.4, 0.36, 1) 120ms both;
}

@keyframes bubblePop {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.mr-money-anchor {
  position: relative;
}

.welcome-guide {
  margin: 12px 0 22px;
}

.entrance-screen .welcome-guide {
  margin: 0 0 8px;
  flex-shrink: 0;
}

.entrance-screen .welcome-guide .mr-money-card {
  margin: 0;
  gap: 10px;
}

.entrance-screen .welcome-guide .mr-money {
  --money-scale: 0.72;
}

.entrance-screen .welcome-guide .money-speech {
  padding: 12px 14px;
  font-size: 0.82rem;
  line-height: 1.3;
}

.entrance-screen.active {
  gap: clamp(8px, 1.4svh, 12px);
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.entrance-screen .screen-header {
  flex-shrink: 0;
}

.entrance-screen .screen-header h1 {
  font-size: clamp(1rem, 4.2vw, 1.32rem);
  line-height: 1.08;
}

.entrance-screen .entrance-scene {
  flex: 0 1 auto;
  min-height: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  overflow: visible;
}

.entrance-screen .entrance-scene.start-preview {
  min-height: 0;
}

.entrance-screen .academy-campus {
  position: relative;
  width: min(100%, 268px);
  height: auto;
  margin: 0 auto;
}

.entrance-screen .academy-campus > img:first-child {
  display: block;
  width: 100%;
  height: auto;
  max-height: min(46svh, 340px);
  object-fit: contain;
  object-position: center bottom;
}

.entrance-screen .academy-student {
  height: min(128px, 32%);
  left: 14%;
  bottom: 5%;
}

.entrance-screen .entrance-description:empty {
  display: none;
}

.entrance-screen > .primary-button {
  flex-shrink: 0;
  margin-top: auto;
}

.elevator-guide {
  margin: -4px 0 14px;
}

.lesson-guide .mr-money-card,
.quiz-guide .mr-money-card,
.floor-guide .mr-money-card {
  margin: 0;
}

.quiz-guide {
  display: grid;
  place-items: center;
  margin: -86px auto 10px;
}

.mr-money-card {
  align-items: flex-end;
}

.mr-money-card.compact {
  align-items: center;
  margin: 8px 0 14px;
}

.mr-money {
  --money-scale: 1;
  position: relative;
  width: calc(128px * var(--money-scale));
  height: calc(128px * var(--money-scale));
  flex: 0 0 auto;
  animation:
    moneyBounceIn 560ms cubic-bezier(0.2, 1.35, 0.38, 1) both,
    moneyWaveBody 2.2s ease-in-out 620ms infinite;
}

.mr-money.small {
  --money-scale: 0.76;
}

.mr-money.large {
  --money-scale: 1.12;
}

.mr-money-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 12px 10px rgba(23, 32, 51, 0.2));
  transform-origin: 50% 82%;
}

.mr-money:has(.mr-money-image) {
  animation: none;
}

.mr-money-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 12px 10px rgba(23, 32, 51, 0.16));
}

.mr-money.guide-kids.mentor-mrs .mr-money-image {
  transform: scaleX(-1);
}

.mr-money.guide-teen {
  overflow: hidden;
}

.mr-money.guide-teen .mr-money-video,
.mr-money.guide-teen .mr-money-image {
  border-radius: 22px;
}

.mr-money.guide-teen::before,
.mr-money.guide-teen::after {
  display: none;
}

.mr-money::before,
.mr-money::after {
  content: "";
  position: absolute;
  z-index: 2;
  top: 27%;
  width: calc(15px * var(--money-scale));
  height: calc(4px * var(--money-scale));
  border-radius: 999px;
  background: #172033;
  opacity: 0;
  animation: assetBlink 3.8s infinite;
}

.mr-money::before {
  left: 37%;
}

.mr-money::after {
  right: 35%;
}

.money-head {
  position: absolute;
  z-index: 4;
  left: 13%;
  top: 0;
  width: 74%;
  aspect-ratio: 1;
  border: calc(4px * var(--money-scale)) solid #172033;
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 25%, rgba(255, 255, 255, 0.8), transparent 16%),
    linear-gradient(145deg, #ffe883, #ffc33e 72%);
  box-shadow: inset 0 calc(-8px * var(--money-scale)) 0 rgba(217, 146, 21, 0.22);
}

.money-head::before {
  content: "$";
  position: absolute;
  left: 50%;
  top: 10%;
  color: rgba(150, 96, 10, 0.24);
  font-size: calc(2rem * var(--money-scale));
  font-weight: 900;
  transform: translateX(-50%);
}

.money-eye {
  position: absolute;
  z-index: 2;
  top: 44%;
  width: calc(11px * var(--money-scale));
  height: calc(14px * var(--money-scale));
  border-radius: 999px;
  background: #172033;
  animation: moneyBlink 3.8s infinite;
}

.money-eye.left {
  left: 30%;
}

.money-eye.right {
  right: 30%;
}

.money-smile {
  position: absolute;
  left: 50%;
  bottom: 20%;
  width: calc(28px * var(--money-scale));
  height: calc(15px * var(--money-scale));
  border-bottom: calc(4px * var(--money-scale)) solid #172033;
  border-radius: 0 0 999px 999px;
  transform: translateX(-50%);
}

.mr-money[data-mood="excited"] .money-smile {
  height: calc(20px * var(--money-scale));
  background: rgba(255, 255, 255, 0.38);
}

.money-body {
  position: absolute;
  z-index: 2;
  left: 18%;
  top: 47%;
  width: 64%;
  height: 42%;
  border: calc(4px * var(--money-scale)) solid #172033;
  border-radius: calc(20px * var(--money-scale));
  background: linear-gradient(135deg, #263a68 0 48%, #314c85 49%);
}

.money-shirt {
  position: absolute;
  left: 31%;
  top: 0;
  width: 38%;
  height: 78%;
  clip-path: polygon(0 0, 100% 0, 78% 100%, 22% 100%);
  background: #fff;
}

.money-tie {
  position: absolute;
  left: 45%;
  top: 16%;
  width: 10%;
  height: 58%;
  border-radius: 999px;
  background: linear-gradient(180deg, #ff5da2, #ff8a5c);
}

.money-arm {
  position: absolute;
  z-index: 3;
  top: 54%;
  width: 28%;
  height: 14%;
  border: calc(4px * var(--money-scale)) solid #172033;
  border-radius: 999px;
  background: #263a68;
}

.money-arm.left {
  left: 0;
  transform: rotate(24deg);
}

.money-arm.right {
  right: -5%;
  transform-origin: left center;
  animation: moneyWave 1.5s ease-in-out infinite;
}

.money-bill {
  position: absolute;
  z-index: 4;
  right: -13%;
  top: 45%;
  width: 34%;
  height: 16%;
  border: calc(3px * var(--money-scale)) solid #172033;
  border-radius: calc(7px * var(--money-scale));
  background: linear-gradient(135deg, #b9ffce, #45d6a2);
  transform: rotate(-13deg);
}

.money-bill::after {
  content: "";
  position: absolute;
  inset: 25%;
  border: calc(2px * var(--money-scale)) solid rgba(23, 32, 51, 0.35);
  border-radius: 50%;
}

.money-calculator {
  position: absolute;
  z-index: 4;
  left: 7%;
  top: 68%;
  width: 28%;
  height: 26%;
  border: calc(3px * var(--money-scale)) solid #172033;
  border-radius: calc(8px * var(--money-scale));
  background: #f8fbff;
}

.money-calculator::before {
  content: "";
  position: absolute;
  left: 18%;
  right: 18%;
  top: 16%;
  height: 18%;
  border-radius: 4px;
  background: #7decc2;
}

.money-calculator::after {
  content: "";
  position: absolute;
  left: 20%;
  top: 50%;
  width: 12%;
  height: 12%;
  border-radius: 50%;
  background: #172033;
  box-shadow:
    calc(10px * var(--money-scale)) 0 #172033,
    calc(20px * var(--money-scale)) 0 #172033,
    0 calc(10px * var(--money-scale)) #172033,
    calc(10px * var(--money-scale)) calc(10px * var(--money-scale)) #172033,
    calc(20px * var(--money-scale)) calc(10px * var(--money-scale)) #172033;
}

.money-legs {
  position: absolute;
  left: 24%;
  bottom: 0;
  width: 52%;
  height: 15%;
  border-radius: 999px;
  background: #172033;
}

@keyframes moneyBounceIn {
  from {
    opacity: 0;
    transform: translateY(22px) scale(0.72);
  }
  70% {
    opacity: 1;
    transform: translateY(-8px) scale(1.06);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes moneyWaveBody {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-5px) rotate(-2deg);
  }
}

@keyframes assetBlink {
  0%,
  92%,
  100% {
    opacity: 0;
  }
  94%,
  96% {
    opacity: 0.9;
  }
}

@keyframes moneyBlink {
  0%,
  92%,
  100% {
    transform: scaleY(1);
  }
  95% {
    transform: scaleY(0.12);
  }
}

@keyframes moneyWave {
  0%,
  100% {
    transform: rotate(-28deg);
  }
  50% {
    transform: rotate(-52deg) translateY(-2px);
  }
}

.avatar {
  position: relative;
  width: 86px;
  height: 132px;
  flex: 0 0 auto;
  animation: idle 2.4s ease-in-out infinite;
}

.avatar.large {
  width: 126px;
  height: 188px;
}

@keyframes idle {
  50% {
    transform: translateY(-5px);
  }
}

.avatar-face {
  position: absolute;
  z-index: 3;
  left: 16%;
  top: 15%;
  width: 68%;
  height: 43%;
  border: 4px solid #172033;
  border-radius: 42% 42% 48% 48%;
  background: #ffd1a8;
}

.avatar-hair {
  position: absolute;
  z-index: 5;
  left: 12%;
  top: 5%;
  width: 76%;
  height: 30%;
  border: 4px solid #172033;
  border-bottom: 0;
  border-radius: 55% 55% 28% 28%;
  background: #343052;
}

.avatar-hair::before,
.avatar-hair::after {
  content: "";
  position: absolute;
  background: inherit;
}

.avatar-fringe {
  position: absolute;
  z-index: 6;
  left: 25%;
  top: 12%;
  width: 50%;
  height: 18%;
  border-radius: 0 0 50% 50%;
  background: #343052;
  clip-path: polygon(0 0, 24% 100%, 46% 0, 68% 100%, 100% 0);
}

.avatar-user.mint .avatar-hair,
.avatar-user.mint .avatar-fringe {
  background: #343052;
}

.avatar-user.berry .avatar-hair {
  background: #af3eff;
}

.avatar-user.berry .avatar-fringe {
  background: #af3eff;
}

.avatar-user.sun .avatar-hair {
  background: #ff9f1c;
}

.avatar-user.sun .avatar-fringe {
  background: #ff9f1c;
}

.avatar-user.gender-girl .avatar-hair {
  left: 8%;
  top: 3%;
  width: 84%;
  height: 36%;
  border-radius: 58% 58% 38% 38%;
  transform: rotate(0deg);
}

.avatar-user.gender-girl .avatar-hair::before,
.avatar-user.gender-girl .avatar-hair::after {
  border: 4px solid #172033;
}

.avatar-user.gender-girl .avatar-hair::before {
  z-index: -1;
  right: -6%;
  top: 42%;
  width: 30%;
  height: 132%;
  border: 4px solid #172033;
  border-top: 0;
  border-radius: 0 0 999px 999px;
  transform: rotate(-7deg);
}

.avatar-user.gender-girl .avatar-hair::after {
  left: -6%;
  top: 42%;
  width: 30%;
  height: 132%;
  border-top: 0;
  border-radius: 0 0 999px 999px;
  transform: rotate(7deg);
}

.avatar-user.gender-girl .avatar-fringe {
  left: 17%;
  top: 10%;
  width: 66%;
  height: 22%;
  border-radius: 45% 48% 50% 24%;
  clip-path: polygon(0 0, 100% 0, 86% 42%, 62% 78%, 34% 100%, 10% 62%);
  transform: rotate(-5deg);
}

.avatar-user.gender-girl .avatar-face {
  border-radius: 46% 42% 50% 50%;
}

.avatar-user.gender-girl .eye::before,
.avatar-user.gender-girl .eye::after {
  content: "";
  position: absolute;
  top: -4px;
  width: 7px;
  height: 3px;
  border-top: 3px solid #172033;
  border-radius: 999px;
}

.avatar-user.gender-girl .eye.left::before {
  left: -6px;
  transform: rotate(28deg);
}

.avatar-user.gender-girl .eye.left::after {
  left: -2px;
  transform: rotate(8deg);
}

.avatar-user.gender-girl .eye.right::before {
  right: -6px;
  transform: rotate(-28deg);
}

.avatar-user.gender-girl .eye.right::after {
  right: -2px;
  transform: rotate(-8deg);
}

.avatar-user.gender-girl .avatar-body {
  left: 20%;
  top: 53%;
  width: 60%;
  height: 31%;
  border-radius: 26px 26px 22px 22px;
  transform: rotate(-1deg);
}

.avatar-user.gender-girl .avatar-body::before {
  content: "";
  position: absolute;
  left: -12%;
  top: 0;
  width: 45%;
  height: 100%;
  background: rgba(255, 255, 255, 0.18);
  transform: skewX(-18deg);
}

.avatar-user.gender-girl .avatar-badge {
  right: 12%;
  top: 40%;
  background: #fff;
  box-shadow: inset 0 0 0 4px var(--sun);
}

.avatar-user.gender-girl .avatar-arm.left {
  left: 7%;
  top: 60%;
  transform: rotate(38deg);
}

.avatar-user.gender-girl .avatar-arm.right {
  right: 7%;
  top: 55%;
}

.avatar-user.gender-girl .avatar-leg {
  top: 78%;
  height: 18%;
  background: #263a68;
}

.avatar-user.gender-girl .avatar-leg.left {
  left: 30%;
  transform: rotate(3deg);
}

.avatar-user.gender-girl .avatar-leg.right {
  right: 30%;
  transform: rotate(-3deg);
}

.avatar-user.gender-boy .avatar-hair {
  top: 6%;
  height: 23%;
  border-radius: 60% 60% 24% 24%;
}

.avatar-user.gender-boy .avatar-hair::before {
  left: 8%;
  top: -12%;
  width: 24%;
  height: 40%;
  border-radius: 60% 40% 60% 40%;
  transform: rotate(-18deg);
}

.avatar-user.gender-boy .avatar-fringe {
  left: 23%;
  top: 13%;
  width: 55%;
  height: 13%;
  clip-path: polygon(0 0, 30% 85%, 45% 0, 62% 80%, 100% 0);
}

.avatar-user.gender-neutral .avatar-hair {
  top: 5%;
  height: 26%;
  border-radius: 999px 999px 20px 20px;
  background: linear-gradient(135deg, #48a6ff, #7d65ff);
}

.avatar-user.gender-neutral .avatar-fringe {
  top: 14%;
  background: #343052;
}

.avatar-body {
  position: absolute;
  z-index: 2;
  left: 18%;
  top: 52%;
  width: 64%;
  height: 32%;
  border: 4px solid #172033;
  border-radius: 28px 28px 18px 18px;
  background: linear-gradient(135deg, var(--mint), #65ecff);
  overflow: hidden;
}

.avatar-user.berry .avatar-body {
  background: linear-gradient(135deg, #ff5da2, #7d65ff);
}

.avatar-user.sun .avatar-body {
  background: linear-gradient(135deg, #ffd35c, #ff7f50);
}

.avatar-collar {
  position: absolute;
  left: 50%;
  top: 0;
  width: 45%;
  height: 28%;
  background: #fff;
  clip-path: polygon(0 0, 50% 100%, 100% 0);
  transform: translateX(-50%);
}

.avatar-badge {
  position: absolute;
  right: 14%;
  top: 34%;
  width: 18%;
  aspect-ratio: 1;
  border: 3px solid #172033;
  border-radius: 50%;
  background: var(--sun);
}

.avatar-arm {
  position: absolute;
  z-index: 1;
  top: 57%;
  width: 18%;
  height: 30%;
  border: 4px solid #172033;
  border-radius: 999px;
  background: #ffd1a8;
  transform-origin: top center;
}

.avatar-arm.left {
  left: 4%;
  transform: rotate(22deg);
}

.avatar-arm.right {
  right: 4%;
  transform: rotate(-22deg);
}

.avatar-user.gender-girl .avatar-arm.right {
  animation: avatarWave 1.8s ease-in-out infinite;
}

.avatar-user.gender-boy .avatar-arm.left {
  animation: avatarPump 1.8s ease-in-out infinite;
}

.avatar-user.gender-neutral .avatar-arm.right {
  animation: avatarWave 2.2s ease-in-out infinite;
}

.avatar-leg {
  position: absolute;
  z-index: 1;
  top: 79%;
  width: 18%;
  height: 17%;
  border: 4px solid #172033;
  border-radius: 12px;
  background: #32405f;
}

.avatar-leg.left {
  left: 28%;
}

.avatar-leg.right {
  right: 28%;
}

.avatar-shoes {
  position: absolute;
  z-index: 1;
  left: 23%;
  bottom: 0;
  width: 54%;
  height: 11%;
}

.avatar-shoes::before,
.avatar-shoes::after {
  content: "";
  position: absolute;
  bottom: 0;
  width: 44%;
  height: 100%;
  border-radius: 999px 999px 12px 12px;
  background: #172033;
}

.avatar-shoes::before {
  left: 0;
  transform: rotate(-5deg);
}

.avatar-shoes::after {
  right: 0;
  transform: rotate(5deg);
}

@keyframes avatarWave {
  0%,
  100% {
    transform: rotate(-22deg);
  }
  50% {
    transform: rotate(-52deg) translateY(-4px);
  }
}

@keyframes avatarPump {
  0%,
  100% {
    transform: rotate(22deg);
  }
  50% {
    transform: rotate(46deg) translateY(-3px);
  }
}

.eye {
  position: absolute;
  top: 43%;
  width: 8px;
  height: 11px;
  border-radius: 999px;
  background: #172033;
}

.eye.left {
  left: 30%;
}

.eye.right {
  right: 30%;
}

.mouth {
  position: absolute;
  left: 50%;
  bottom: 22%;
  width: 22px;
  height: 12px;
  border-bottom: 4px solid #172033;
  border-radius: 0 0 18px 18px;
  transform: translateX(-50%);
}

.mouth.smirk {
  width: 18px;
  transform: translateX(-50%) rotate(-8deg);
}

.avatar-stage {
  position: relative;
  padding: 18px;
  min-height: 432px;
  margin: 8px 0 20px;
  border-radius: 34px;
  background: linear-gradient(180deg, #dff7ff, #fff7ce);
  box-shadow: var(--shadow);
}

body[data-age-theme="teen"] .avatar-stage {
  border-radius: 28px;
  background:
    radial-gradient(circle at 84% 18%, rgba(88, 183, 255, 0.16), transparent 18%),
    linear-gradient(180deg, #eef5fc, #e5eef8);
}

.hero-preview-card {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  gap: 16px;
  min-height: 100%;
}

.hero-preview-media {
  height: 100%;
  min-height: 364px;
  overflow: hidden;
  border-radius: 28px;
  background:
    radial-gradient(circle at 50% 14%, rgba(255, 255, 255, 0.66), transparent 24%),
    linear-gradient(180deg, #f7fbff, #ebe7ff);
  box-shadow: inset 0 -10px 24px rgba(46, 70, 112, 0.08);
}

.hero-preview-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-preview-copy {
  display: grid;
  gap: 10px;
}

.hero-preview-kicker {
  margin: 0;
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-preview-copy h2 {
  margin: 0;
  font-size: 1.7rem;
  line-height: 1.05;
}

.hero-preview-copy p:last-child {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
  line-height: 1.45;
}

.field-label {
  display: block;
  margin: 18px 0 8px;
  color: #39476a;
  font-weight: 900;
}

.name-input {
  width: 100%;
  min-height: 56px;
  padding: 0 18px;
  border: 3px solid #d8e5f4;
  border-radius: 20px;
  color: var(--ink);
  background: #fff;
  font-weight: 900;
  font-size: 1.2rem;
  outline: none;
  box-shadow: 0 10px 18px rgba(37, 53, 88, 0.08);
}

.name-input:focus {
  border-color: var(--blue);
}

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

.vision-screen.active {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.vision-picker {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 22px;
}

.vision-section-label {
  margin: 0 0 10px;
  color: #5f7394;
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.vision-section--variants,
.vision-section:last-child {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.vision-screen .hero-type-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 0;
  border-radius: 0;
  background: transparent;
}

.vision-screen .hero-type-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 96px;
  padding: 14px 10px 12px;
  border: 3px solid rgba(23, 32, 51, 0.1);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(237, 243, 251, 0.94) 100%);
  box-shadow: 0 10px 24px rgba(22, 39, 69, 0.08);
  text-align: center;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    box-shadow 220ms ease,
    background 220ms ease;
}

.vision-screen .hero-type-card.selected {
  border-color: var(--select-gold);
  background: linear-gradient(180deg, #fffaf0 0%, #f8edd8 100%);
  box-shadow:
    0 14px 28px var(--select-gold-shadow),
    inset 0 1px 0 rgba(255, 255, 255, 0.82);
  transform: translateY(-2px);
}

.vision-screen .hero-type-number {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin: 0;
  border: 2px solid #172033;
  border-radius: 10px;
  color: #f4d37a;
  background: linear-gradient(180deg, #1a3d62 0%, #11253f 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
  font-size: 0.84rem;
  font-weight: 900;
  line-height: 1;
}

.vision-screen .hero-type-card.selected .hero-type-number {
  border-color: #8a6424;
  color: #fff8e8;
  background: linear-gradient(180deg, #d4ad58 0%, #a67c2e 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    0 4px 10px rgba(140, 100, 32, 0.22);
}

.vision-screen .hero-type-label {
  display: block;
  color: #1f395b;
  font-size: 0.8rem;
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: 0.02em;
}

.vision-type-description {
  margin: 12px 0 0;
  padding: 14px 16px;
  border: 3px solid rgba(23, 32, 51, 0.08);
  border-left: 5px solid var(--select-gold);
  border-radius: 18px;
  color: #32486b;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(237, 243, 251, 0.9));
  box-shadow: 0 10px 22px rgba(22, 39, 69, 0.08);
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1.45;
  text-align: left;
}

.vision-screen .hero-variant-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  flex: 0 0 auto;
  align-items: start;
  gap: 14px;
}

.vision-screen .hero-variant-card {
  min-width: 0;
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
  border-radius: 28px;
}

.vision-screen .hero-variant-card.selected {
  background: transparent;
  box-shadow: none;
}

.vision-portrait-frame {
  position: relative;
  width: 100%;
  height: auto;
  min-height: 0;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 28px;
  outline: 3px solid transparent;
  box-shadow: 0 18px 36px rgba(31, 47, 81, 0.14);
  transition:
    outline-color 200ms ease,
    transform 200ms ease,
    box-shadow 200ms ease;
}

.vision-screen .hero-variant-card.selected .vision-portrait-frame {
  outline-color: var(--select-gold);
  transform: translateY(-4px);
  box-shadow: 0 22px 40px var(--select-gold-shadow);
}

.vision-screen .hero-variant-image,
.hero-variant-card .hero-variant-image {
  width: 100%;
  height: 100%;
  min-height: 0;
  margin: 0;
  border-radius: 0;
  object-fit: cover;
  object-position: center top;
}

.vision-portrait-name {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 36px 12px 14px;
  color: #fff;
  background: linear-gradient(180deg, transparent, rgba(15, 25, 42, 0.78));
  font-size: 0.98rem;
  font-weight: 900;
  text-align: center;
}

.vision-continue {
  margin-top: auto;
}

.hero-type-card,
.hero-variant-card {
  border: 3px solid transparent;
  color: #34415f;
  background: #fff;
  box-shadow: 0 8px 18px rgba(37, 53, 88, 0.1);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 220ms ease;
}

.hero-type-card {
  position: relative;
  min-height: 110px;
  padding: 14px;
  border-radius: 22px;
  text-align: left;
}

.hero-type-number {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin-bottom: 10px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--violet), var(--blue));
  font-size: 0.86rem;
  font-weight: 900;
}

.hero-type-card strong,
.hero-type-card small,
.hero-variant-card strong,
.hero-variant-card small {
  display: block;
}

.hero-type-card strong,
.hero-variant-card strong {
  margin-bottom: 6px;
  font-size: 0.98rem;
}

.hero-type-card small,
.hero-variant-card small {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.38;
}

.hero-type-card.selected,
.hero-variant-card.selected {
  border-color: var(--select-gold);
  background: #effff8;
  box-shadow: 0 14px 24px rgba(37, 53, 88, 0.14);
}

.hero-variant-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.hero-variant-card {
  padding: 0;
  border-radius: 24px;
  text-align: left;
}

.hero-variant-image {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  margin: 0;
  border-radius: 0;
  object-fit: cover;
  object-position: center top;
  background:
    radial-gradient(circle at 50% 14%, rgba(255, 255, 255, 0.66), transparent 24%),
    linear-gradient(180deg, #f8fbff, #ebe7ff);
}

.settings-screen .hero-variant-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  align-items: start;
}

.settings-screen .hero-variant-card {
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
}

.settings-screen .hero-variant-card.selected {
  background: transparent;
  box-shadow: none;
}

.settings-screen .hero-variant-card.selected .vision-portrait-frame {
  outline-color: var(--select-gold);
  transform: translateY(-2px);
  box-shadow: 0 18px 34px var(--select-gold-shadow);
}

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

.choice-card,
.segmented button,
.quiz-option {
  border: 3px solid transparent;
  border-radius: 20px;
  color: #34415f;
  background: #fff;
  box-shadow: 0 8px 18px rgba(37, 53, 88, 0.1);
  font-weight: 900;
  transition: transform 160ms ease, border-color 160ms ease;
}

.choice-card {
  min-height: 86px;
}

.choice-card.selected,
.segmented button.selected {
  border-color: var(--select-gold);
  background: #effff8;
}

body[data-age-theme="teen"] .choice-card,
body[data-age-theme="teen"] .segmented button,
body[data-age-theme="teen"] .quiz-option {
  border-radius: 18px;
}

body[data-age-theme="teen"] .hero-preview-media,
body[data-age-theme="teen"] .hero-type-card,
body[data-age-theme="teen"] .hero-variant-card {
  border-radius: 20px;
}

body[data-age-theme="teen"] .hero-preview-media {
  background:
    radial-gradient(circle at 50% 14%, rgba(255, 255, 255, 0.42), transparent 24%),
    linear-gradient(180deg, #f2f7fd, #e1eaf5);
}

body[data-age-theme="teen"] .hero-type-card.selected,
body[data-age-theme="teen"] .hero-variant-card.selected {
  background: #eef9ff;
}

body[data-age-theme="teen"] .vision-screen .hero-type-card {
  border-color: rgba(23, 32, 51, 0.12);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(232, 240, 250, 0.94) 100%);
}

body[data-age-theme="teen"] .vision-screen .hero-type-card.selected {
  background: linear-gradient(180deg, #fffaf0 0%, #f8edd8 100%);
}

body[data-age-theme="teen"] .vision-screen .hero-variant-card.selected {
  background: transparent;
}

body[data-age-theme="teen"] .choice-card.selected,
body[data-age-theme="teen"] .segmented button.selected,
body[data-age-theme="teen"] .quiz-option.correct {
  background: #eef9ff;
}

.mini-avatar {
  display: block;
  width: 34px;
  height: 34px;
  margin: 0 auto 6px;
  border: 3px solid #172033;
  border-radius: 15px;
  background: var(--mint);
}

.mini-avatar.berry {
  background: var(--berry);
}

.mini-avatar.sun {
  background: var(--sun);
}

.segmented button {
  min-height: 44px;
}

.elevator-arrival-screen {
  inset: 0 !important;
  padding: 0 !important;
  overflow: hidden;
}

.elevator-arrival-screen.active {
  display: block;
}

.elevator-arrival-stage {
  position: absolute;
  inset: 0;
  background: #000000;
}

.elevator-arrival-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.elevator-arrival-eyebrow {
  margin: 0 0 6px;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
}

.elevator-arrival-floor {
  margin: 0;
  font-size: 1.8rem;
  font-weight: 800;
  line-height: 1.1;
}

.elevator-arrival-name {
  margin: 6px 0 0;
  font-size: 1rem;
  font-weight: 700;
  color: #98ffcb;
}

.mentor-lobby-bg-still,
.mentor-lobby-bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  pointer-events: none;
}

.mentor-lobby-bg-still {
  z-index: 2;
  opacity: 0;
}

.mentor-lobby-bg-video {
  z-index: 3;
  opacity: 0;
  transition: opacity 220ms ease;
}

.mentor-lobby-bg-video.is-finished {
  opacity: 0 !important;
  visibility: hidden;
  transition: none;
}

.phone.mr-lobby-video-active #mrLobbyBgStill.is-visible,
.phone.mrs-lobby-video-active #mrsLobbyBgStill.is-visible {
  opacity: 1;
}

.phone.mr-lobby-video-active #mrLobbyBgVideo:not(.is-finished),
.phone.mrs-lobby-video-active #mrsLobbyBgVideo:not(.is-finished) {
  opacity: 1;
}

.phone.mr-lobby-video-active .floor-lobby-screen::before,
.phone.mrs-lobby-video-active .floor-lobby-screen::before {
  opacity: 0;
}

.mentor-office-bg-still,
.mentor-office-bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  pointer-events: none;
}

.mentor-office-bg-still {
  z-index: 1;
  opacity: 0;
}

.mentor-office-bg-video {
  z-index: 2;
  opacity: 0;
  transition: opacity 220ms ease;
}

.mentor-office-bg-video.is-finished {
  opacity: 0 !important;
  visibility: hidden;
  transition: none;
}

.phone.mr-situation-office-active #mrSituationOfficeStill.is-visible,
.phone.mrs-situation-office-active #mrsSituationOfficeStill.is-visible {
  opacity: 1;
}

.phone.mr-situation-office-active #mrSituationOfficeVideo:not(.is-finished),
.phone.mrs-situation-office-active #mrsSituationOfficeVideo:not(.is-finished) {
  opacity: 1;
}

.phone.mr-final-exam-mentor-active #mrFinalExamStill.is-visible,
.phone.mrs-final-exam-mentor-active #mrsFinalExamStill.is-visible {
  opacity: 1;
}

.phone.mr-final-exam-mentor-active #mrFinalExamVideo:not(.is-finished),
.phone.mrs-final-exam-mentor-active #mrsFinalExamVideo:not(.is-finished) {
  opacity: 1;
}

.phone.mr-situation-office-active #screenSituations.situation-phase-mentor-office::before,
.phone.mrs-situation-office-active #screenSituations.situation-phase-mentor-office::before,
#screenSituations.situation-phase-mentor-office::before {
  opacity: 0 !important;
  visibility: hidden;
}

.floor-lobby-screen {
  inset: 0 !important;
  padding: var(--screen-nav-top) 18px max(24px, env(safe-area-inset-bottom)) !important;
  background: transparent;
  z-index: 3;
  overflow: hidden !important;
}

.floor-lobby-screen.active {
  display: flex;
  flex-direction: column;
}

.floor-lobby-screen::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  background: url("./assets/elevator-lobby-bg.png") center top / cover no-repeat;
  pointer-events: none;
}

.floor-lobby-screen::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.12) 0%,
    rgba(255, 255, 255, 0.05) 22%,
    rgba(23, 32, 51, 0.1) 58%,
    rgba(23, 32, 51, 0.42) 100%
  );
  pointer-events: none;
}

.floor-lobby-screen > * {
  position: relative;
  z-index: 1;
}

.office-screen {
  inset: 0 !important;
  padding: var(--screen-nav-top) 18px max(24px, env(safe-area-inset-bottom)) !important;
  background: transparent;
  z-index: 3;
  overflow: hidden !important;
}

.office-screen.active {
  display: flex;
  flex-direction: column;
}

.office-screen::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  background: url("./assets/situation-room-bg.png") center center / cover no-repeat;
  pointer-events: none;
}

.office-screen::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.08) 0%,
    rgba(23, 32, 51, 0.1) 30%,
    rgba(23, 32, 51, 0.42) 72%,
    rgba(23, 32, 51, 0.58) 100%
  );
  pointer-events: none;
}

.office-screen > * {
  position: relative;
  z-index: 1;
}

.quiz-office-screen {
  inset: 0 !important;
  padding: var(--screen-nav-top) 18px max(24px, env(safe-area-inset-bottom)) !important;
  background: transparent;
  z-index: 3;
  overflow: hidden !important;
}

.quiz-office-screen.active {
  display: flex;
  flex-direction: column;
}

.quiz-office-screen::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  background: url("./assets/test-cabinet-bg.webp") center center / cover no-repeat;
  pointer-events: none;
}

.quiz-office-screen::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.04) 0%,
    rgba(23, 32, 51, 0.08) 28%,
    rgba(23, 32, 51, 0.36) 72%,
    rgba(23, 32, 51, 0.52) 100%
  );
  pointer-events: none;
}

.quiz-office-screen > * {
  position: relative;
  z-index: 1;
}

.quiz-office-screen.active > .lesson-header {
  flex-shrink: 0;
}

.quiz-office-screen .lesson-header {
  background: transparent;
  backdrop-filter: none;
  padding: 0;
  margin-bottom: 0;
}

body[data-age-theme="teen"] .quiz-office-screen .lesson-header {
  background: transparent;
}

.quiz-office-screen .lesson-header--minimal {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-start;
  padding: 0;
}

.quiz-office-screen .lesson-header .icon-button,
.quiz-office-screen .lesson-step-label {
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, rgba(18, 26, 42, 0.78) 0%, rgba(18, 26, 42, 0.62) 100%);
  box-shadow: 0 10px 28px rgba(12, 18, 30, 0.24);
  backdrop-filter: blur(12px);
}

.quiz-office-screen .lesson-header .icon-button {
  width: 42px;
  height: 42px;
}

.quiz-office-screen .lesson-step-label {
  flex: 1;
  min-width: 0;
  min-height: 42px;
  margin: 0;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.quiz-office-screen .challenge-card .quiz-progress {
  display: none;
}

.quiz-office-screen .challenge-card {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

#screenQuiz.quiz-phase-questions .challenge-card {
  flex: 0 0 auto;
}

#screenQuiz.quiz-phase-questions {
  --situation-hero-feet-bottom: clamp(210px, 33vh, 300px);
  --situation-hero-emotion-lift: 10px;
  --situation-hero-speech-bottom-offset: 218px;
}

#screenQuiz.quiz-phase-questions .quiz-hero-portrait:not([hidden]),
#screenQuiz.quiz-phase-questions .situation-hero-portrait:not([hidden]) {
  position: absolute;
  left: max(12px, env(safe-area-inset-left));
  bottom: var(--situation-hero-feet-bottom);
  z-index: 2;
  width: var(--hero-reaction-width);
  height: auto;
  object-fit: contain;
  object-position: center bottom;
  transform: translateY(calc(18% - var(--situation-hero-emotion-lift)));
  pointer-events: none;
  filter: drop-shadow(0 10px 18px rgba(23, 32, 51, 0.16));
}

#screenQuiz.quiz-phase-questions #quizChallengeCard {
  position: relative;
  z-index: 3;
  flex: 0 0 auto;
  margin-top: auto;
  margin-bottom: 0;
  width: 100%;
  max-height: calc(100dvh - var(--screen-nav-top) - env(safe-area-inset-bottom, 0px) - 72px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  text-align: left;
  padding: 18px 16px 16px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
  box-shadow: 0 18px 40px rgba(23, 32, 51, 0.2);
}

body[data-age-theme="teen"] #screenQuiz.quiz-phase-questions #quizChallengeCard {
  margin-top: auto;
}

#screenQuiz.quiz-phase-questions .situation-hero-speech-layer:not([hidden]) {
  position: absolute;
  left: calc(max(12px, env(safe-area-inset-left)) + var(--hero-reaction-width));
  right: max(14px, env(safe-area-inset-right));
  bottom: calc(var(--situation-hero-feet-bottom) + var(--situation-hero-speech-bottom-offset));
  z-index: 4;
  margin: 0;
  pointer-events: none;
}

#screenQuiz.quiz-phase-questions .situation-hero-speech-layer .hero-answer-feedback-speech {
  max-width: none;
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.38;
}

#screenQuiz.quiz-phase-questions .situation-hero-feedback:not([hidden]) {
  pointer-events: auto;
}

#screenQuiz.quiz-phase-questions .quiz-options {
  margin-top: 0;
}

#quizChallengeCard.wrong {
  animation: shakeCard 420ms ease;
}

#screenQuiz.quiz-phase-mentor-office.situation-room-screen,
#screenQuiz.quiz-phase-mentor-office.quiz-office-screen {
  inset: 0 !important;
  z-index: 3;
  background: transparent !important;
  padding: var(--screen-nav-top) 18px max(24px, env(safe-area-inset-bottom)) !important;
  overflow: hidden !important;
}

#screenQuiz.active.quiz-phase-mentor-office.quiz-office-screen {
  display: flex !important;
  flex-direction: column;
}

.phone.mr-final-exam-mentor-active #screenQuiz.quiz-phase-mentor-office::before,
.phone.mrs-final-exam-mentor-active #screenQuiz.quiz-phase-mentor-office::before,
#screenQuiz.quiz-phase-mentor-office::before {
  opacity: 0 !important;
  visibility: hidden;
}

#screenQuiz.quiz-phase-mentor-office::after {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.12) 0%,
    rgba(255, 255, 255, 0.05) 22%,
    rgba(23, 32, 51, 0.1) 58%,
    rgba(23, 32, 51, 0.42) 100%
  );
}

#screenQuiz.quiz-phase-mentor-office .lesson-header {
  position: relative;
  top: 0;
  z-index: 4;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-start;
  padding: 0;
  margin-bottom: 0;
  background: transparent;
  backdrop-filter: none;
}

#screenQuiz.quiz-phase-mentor-office .lesson-header .icon-button,
#screenQuiz.quiz-phase-mentor-office .lesson-step-label {
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, rgba(18, 26, 42, 0.78) 0%, rgba(18, 26, 42, 0.62) 100%);
  box-shadow: 0 10px 28px rgba(12, 18, 30, 0.24);
  backdrop-filter: blur(12px);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

#screenQuiz.quiz-phase-mentor-office .lesson-header .icon-button {
  width: 42px;
  height: 42px;
}

#screenQuiz.quiz-phase-mentor-office .lesson-step-label {
  flex: 1;
  min-width: 0;
  min-height: 42px;
  margin: 0;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

#screenQuiz.quiz-phase-mentor-office .challenge-card,
#screenQuiz.quiz-phase-mentor-office .feedback {
  display: none !important;
}

#screenQuiz.quiz-phase-mentor-office .situation-hero-speech-layer,
#screenQuiz.quiz-phase-completed .situation-hero-speech-layer {
  display: none !important;
}

#screenQuiz.quiz-phase-mentor-office > .quiz-intro-mentor-bubble {
  position: absolute;
  z-index: 4;
  pointer-events: auto;
}

#screenWin.win-mentor-screen > .win-hero-portrait,
#screenQuiz.quiz-phase-completed > #quizHeroPortrait:not([hidden]) {
  position: absolute;
  right: max(6px, env(safe-area-inset-right));
  left: auto;
  bottom: clamp(92px, 24vh, 132px);
  z-index: 3;
  width: var(--hero-reaction-width);
  height: auto;
  object-fit: contain;
  object-position: center bottom;
  transform: none;
  pointer-events: none;
  filter: drop-shadow(0 10px 18px rgba(23, 32, 51, 0.16));
}

#screenWin.win-mentor-screen > .win-hero-portrait {
  bottom: clamp(118px, 30vh, 158px);
}

#screenQuiz.quiz-phase-mentor-office .quiz-intro-bottom-stack {
  position: relative;
  z-index: 5;
  margin-top: auto;
  flex-shrink: 0;
  width: 100%;
  pointer-events: auto;
}

#screenQuiz.quiz-phase-mentor-office .quiz-intro-dialog-card {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
  box-shadow: 0 18px 40px rgba(23, 32, 51, 0.16);
}

#screenQuiz.quiz-phase-mentor-office .quiz-intro-dialog-card .dialog-actions {
  display: grid;
  grid-template-columns: 1fr;
  margin-top: 12px;
}

#screenQuiz.quiz-phase-mentor-office .quiz-intro-continue,
#screenQuiz.quiz-phase-mentor-office .quiz-completed-restart {
  width: 100%;
}

.quiz-phase-questions .quiz-intro-mentor-bubble,
.quiz-phase-questions .quiz-intro-bottom-stack {
  display: none !important;
}

#screenQuiz.quiz-phase-mentor-office .quiz-intro-mentor-bubble:not([hidden]),
#screenQuiz.quiz-phase-mentor-office .quiz-intro-bottom-stack:not([hidden]) {
  display: flex !important;
  flex-direction: column;
}

.floor-lobby-screen.active > .screen-header,
.office-screen.active > .screen-header,
.office-screen.active > .lesson-header,
.office-screen.active > .coach-row {
  flex-shrink: 0;
}

#screenLesson .lesson-flow {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

#screenLessonChoice .mentor-choice-card {
  flex: 0 1 auto;
  max-height: calc(100% - 8px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

#screenFloor1 .floor1-bottom-stack {
  flex-shrink: 0;
}

#screenFloor2 .dialog-card {
  margin-top: auto;
  flex-shrink: 0;
  max-height: 42vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

#screenFloor2 .observer-room {
  flex-shrink: 0;
}

#screenSituations.situation-room-screen .lesson-header {
  flex-shrink: 0;
}

.office-screen .lesson-header {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0));
  backdrop-filter: blur(10px);
}

#screenLesson .lesson-header {
  position: relative;
  top: auto;
  z-index: 6;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 10px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  backdrop-filter: none;
  box-shadow: none;
}

body[data-age-theme="teen"] #screenLesson .lesson-header {
  background: transparent;
}

#screenLesson .lesson-header--minimal {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-start;
  padding: 0;
  background: transparent;
  backdrop-filter: none;
}

#screenLesson .lesson-header .icon-button {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, rgba(18, 26, 42, 0.78) 0%, rgba(18, 26, 42, 0.62) 100%);
  box-shadow: 0 10px 28px rgba(12, 18, 30, 0.24);
  backdrop-filter: blur(12px);
}

#screenLesson .lesson-step-label {
  flex: 1;
  min-width: 0;
  width: auto;
  min-height: 42px;
  margin: 0;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(18, 26, 42, 0.78) 0%, rgba(18, 26, 42, 0.62) 100%);
  box-shadow: 0 10px 28px rgba(12, 18, 30, 0.24);
  backdrop-filter: blur(12px);
  color: #fff;
  font-size: clamp(1.05rem, 4.2vw, 1.35rem);
  font-weight: 800;
  line-height: 1.15;
  text-align: left;
  text-transform: none;
  letter-spacing: normal;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

body[data-age-theme="teen"] #screenLesson .lesson-header .icon-button,
body[data-age-theme="teen"] #screenLesson .lesson-step-label {
  border-color: rgba(255, 255, 255, 0.22);
  background: linear-gradient(135deg, rgba(18, 26, 42, 0.78) 0%, rgba(18, 26, 42, 0.62) 100%);
  color: #fff;
}

body[data-age-theme="teen"] .office-screen .lesson-header {
  background: linear-gradient(180deg, rgba(248, 251, 255, 0.82), rgba(248, 251, 255, 0));
}

.floor-lobby-screen .screen-header {
  display: flex;
  align-items: center;
  gap: 10px;
  align-self: stretch;
  padding: 0;
  margin: -4px -6px 10px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.floor-lobby-screen .screen-header .screen-header-eyebrow,
.floor-lobby-screen .screen-header .screen-header-title {
  min-height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(18, 26, 42, 0.78) 0%, rgba(18, 26, 42, 0.62) 100%);
  box-shadow: 0 10px 28px rgba(12, 18, 30, 0.24);
  backdrop-filter: blur(12px);
}

.floor-lobby-screen .screen-header .screen-header-eyebrow {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  margin: 0;
  padding: 10px 12px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.74rem;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-shadow: none;
}

.floor-lobby-screen .screen-header .screen-header-title {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  margin: 0;
  padding: 10px 14px;
  color: #fff;
  font-size: clamp(1rem, 4.2vw, 1.32rem);
  line-height: 1.1;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

.floor-lobby-screen .room,
.floor-lobby-screen .observer-room {
  background: rgba(255, 255, 255, 0.38);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: 0 18px 40px rgba(23, 32, 51, 0.14);
}

body[data-age-theme="teen"] .floor-lobby-screen .room,
body[data-age-theme="teen"] .floor-lobby-screen .observer-room {
  background: rgba(255, 255, 255, 0.34);
}

.floor-lobby-screen .dialog-card,
.floor-lobby-screen .mentor-choice-card {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
  box-shadow: 0 18px 40px rgba(23, 32, 51, 0.16);
}

.floor-lobby-screen .screen-header .icon-button {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, rgba(18, 26, 42, 0.78) 0%, rgba(18, 26, 42, 0.62) 100%);
  box-shadow: 0 10px 28px rgba(12, 18, 30, 0.24);
  backdrop-filter: blur(12px);
}

.floor-lobby-screen .learning-option {
  background: rgba(255, 252, 245, 0.94);
  backdrop-filter: blur(12px);
}

.floor-lobby-screen .learning-option small {
  color: #6b5a47;
}

#screenFloor1.active {
  display: flex;
  flex-direction: column;
}

.floor-lobby-screen > .floor1-mentor-bubble {
  position: absolute;
  z-index: 2;
}

.floor1-mentor-bubble {
  left: 50%;
  top: calc(21% - 8px);
  width: min(86%, 290px);
  margin: 0;
  padding: 14px 18px 16px;
  border: 3px solid #172033;
  border-radius: 22px;
  background: #fff;
  box-shadow:
    0 10px 0 rgba(23, 32, 51, 0.08),
    0 16px 28px rgba(23, 32, 51, 0.14);
  transform: translateX(-50%);
  animation: floor1BubblePop 360ms cubic-bezier(0.22, 1.4, 0.36, 1) 180ms both;
}

@keyframes floor1BubblePop {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(10px) scale(0.92);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
  }
}

.floor1-mentor-bubble::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -13px;
  width: 22px;
  height: 22px;
  border-right: 3px solid #172033;
  border-bottom: 3px solid #172033;
  background: #fff;
  transform: translateX(-50%) rotate(45deg);
}

.floor1-mentor-text {
  margin: 0;
  color: #172033;
  font-size: 0.94rem;
  font-weight: 700;
  line-height: 1.42;
  text-align: center;
}

.floor1-mentor-text::before {
  content: "\201E";
}

.floor1-mentor-text::after {
  content: "\201C";
}

.floor1-bottom-stack {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.floor1-dialog-card {
  margin-top: 0;
}

.floor1-dialog-actions.has-heart-countdown {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
}

.heart-regen-countdown[hidden] {
  display: none !important;
}

.heart-regen-countdown:not([hidden]) {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 92px;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid rgba(201, 162, 74, 0.35);
  border-radius: var(--btn-radius);
  background: linear-gradient(180deg, rgba(255, 248, 228, 0.98), rgba(255, 236, 196, 0.92));
  box-shadow: 0 8px 18px rgba(201, 162, 74, 0.14);
  text-align: center;
}

.heart-regen-countdown-label {
  color: #8a6a2d;
  font-size: 0.62rem;
  font-weight: 900;
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.heart-regen-countdown-time {
  color: #172033;
  font-size: clamp(0.92rem, 3.8vw, 1.05rem);
  font-weight: 900;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.elevator-screen {
  inset: 0 !important;
  padding: var(--screen-nav-top) 18px max(24px, env(safe-area-inset-bottom)) !important;
  background: transparent;
  z-index: 3;
}

.elevator-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: url("./assets/elevator-interior-bg.png") center center / cover no-repeat;
  pointer-events: none;
}

.elevator-screen::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(
    180deg,
    rgba(12, 14, 18, 0.55) 0%,
    rgba(12, 14, 18, 0.18) 28%,
    rgba(12, 14, 18, 0.08) 52%,
    rgba(12, 14, 18, 0.35) 100%
  );
  pointer-events: none;
}

.elevator-screen > * {
  position: relative;
  z-index: 1;
  transition:
    opacity 420ms ease,
    transform 420ms ease,
    visibility 420ms ease;
}

.elevator-screen .screen-header p {
  color: rgba(255, 255, 255, 0.72);
}

.elevator-screen .screen-header h1 {
  color: #fff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
}

.elevator-screen .screen-header .icon-button {
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(10px);
}

.elevator-travel-message {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 22px;
  text-align: center;
  color: #ffffff;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transform: none;
  transition:
    opacity 420ms ease 280ms,
    visibility 420ms ease 280ms;
}

.elevator-screen.elevator-traveling .elevator-travel-message {
  opacity: 1;
  visibility: visible;
}

.elevator-travel-message .elevator-arrival-floor {
  text-shadow: 0 4px 28px rgba(0, 0, 0, 0.65);
}

.elevator-travel-message .elevator-arrival-name {
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.55);
}

.elevator-screen.elevator-traveling > *:not(.elevator-travel-message) {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(8px) scale(0.98);
}

.elevator-screen.elevator-traveling::after {
  opacity: 0;
  transition: opacity 420ms ease;
}

.elevator-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: min(100%, 300px);
  max-height: min(68vh, 520px);
  margin: 0 auto;
  padding: 22px 18px 18px;
  box-sizing: border-box;
  aspect-ratio: 622 / 1024;
  border-radius: 0;
  background-color: transparent;
  background-image: url("./assets/elevator-button-panel.png");
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  filter: drop-shadow(0 18px 32px rgba(23, 32, 51, 0.18));
}

body[data-age-theme="teen"] .room,
body[data-age-theme="teen"] .observer-room,
body[data-age-theme="teen"] .lesson-slide,
body[data-age-theme="teen"] .hint-card,
body[data-age-theme="teen"] .dialog-card,
body[data-age-theme="teen"] .task-card,
body[data-age-theme="teen"] .challenge-card {
  border-radius: 28px;
}

.elevator-display {
  flex: 0 0 auto;
  width: min(100%, 138px);
  margin: 0 auto;
  padding: 10px 12px;
  border: 4px solid #172033;
  border-radius: 18px;
  color: #98ffcb;
  background: #172033;
  text-align: center;
}

.elevator-display span {
  display: block;
  color: #7a86a1;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.elevator-display strong {
  font-size: 2.4rem;
  line-height: 1;
}

.button-panel {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: repeat(5, minmax(0, 1fr));
  gap: 10px 14px;
  align-items: center;
  justify-items: center;
}

.elevator-panel .floor-button {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: min(100%, 88px);
  height: 100%;
  max-height: 58px;
  padding: 4px 5px;
  border: none;
  border-radius: 12px;
  color: #aeb6c4;
  background:
    radial-gradient(circle at 50% 30%, #3d495c 0%, #1c2432 52%, #101722 100%);
  box-shadow:
    inset 0 2px 5px rgba(255, 255, 255, 0.14),
    inset 0 -4px 8px rgba(0, 0, 0, 0.5),
    0 0 0 2px #707880,
    0 0 0 3px #1e242c,
    0 0 0 4px #c2c8d0;
  font-size: clamp(0.9rem, 3vw, 1.1rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  transition: box-shadow 180ms ease, color 180ms ease, transform 120ms ease, text-shadow 180ms ease;
}

.elevator-panel .floor-button[data-floor="10"] {
  font-size: clamp(0.78rem, 2.6vw, 0.95rem);
}

.elevator-panel .floor-button span {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: inherit;
  font-size: 0.5rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  line-height: 1.1;
  text-transform: uppercase;
  opacity: 0.88;
  text-shadow: inherit;
}

.elevator-panel .floor-button[data-floor="10"] span,
.elevator-panel .floor-button[data-floor="7"] span,
.elevator-panel .floor-button[data-floor="8"] span,
.elevator-panel .floor-button[data-floor="9"] span {
  font-size: 0.44rem;
  letter-spacing: 0.03em;
}

.elevator-panel .floor-button.active-floor,
.elevator-panel .floor-button.observer-floor {
  color: #f8fbff;
  text-shadow: 0 0 10px rgba(248, 251, 255, 0.75);
  background:
    radial-gradient(circle at 50% 30%, #566274 0%, #2c3544 52%, #181f2a 100%);
  box-shadow:
    inset 0 0 14px rgba(255, 255, 255, 0.14),
    inset 0 2px 4px rgba(255, 255, 255, 0.12),
    0 0 0 2px #a0a8b2,
    0 0 0 3px #242a32,
    0 0 0 4px #e2e8f0,
    0 0 14px rgba(255, 255, 255, 0.28);
}

.elevator-panel .floor-button.active-floor span,
.elevator-panel .floor-button.observer-floor span {
  opacity: 0.96;
  text-shadow: 0 0 6px rgba(248, 251, 255, 0.55);
}

.elevator-panel .floor-button.is-latest {
  animation: elevatorButtonGlow 1.4s ease-in-out infinite;
}

@keyframes elevatorButtonGlow {
  50% {
    box-shadow:
      inset 0 0 18px rgba(255, 255, 255, 0.2),
      inset 0 2px 4px rgba(255, 255, 255, 0.12),
      0 0 0 2px #b0b8c2,
      0 0 0 3px #242a32,
      0 0 0 4px #eef2f8,
      0 0 24px rgba(255, 255, 255, 0.38);
  }
}

.elevator-panel .floor-button.locked,
.elevator-panel .floor-button.broken {
  cursor: not-allowed;
  color: #4f5868;
  text-shadow: none;
  opacity: 0.7;
  filter: none;
  background:
    radial-gradient(circle at 50% 30%, #343b48 0%, #1a1f28 52%, #10141c 100%);
  box-shadow:
    inset 0 2px 4px rgba(255, 255, 255, 0.06),
    inset 0 -3px 6px rgba(0, 0, 0, 0.4),
    0 0 0 2px #5a6068,
    0 0 0 3px #1a1e24,
    0 0 0 4px #8a9098;
}

.elevator-panel .floor-button.locked span,
.elevator-panel .floor-button.broken span {
  opacity: 0.45;
}

.elevator-panel .floor-button.locked::after,
.elevator-panel .floor-button.broken::after {
  content: "🔒";
  position: absolute;
  top: 2px;
  right: 3px;
  font-size: 0.62rem;
  line-height: 1;
  opacity: 0.78;
  pointer-events: none;
  filter: grayscale(1);
}

.elevator-panel .floor-button.locked::before,
.elevator-panel .floor-button.broken::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 12px;
  background: rgba(8, 10, 14, 0.38);
  pointer-events: none;
}

.elevator-panel .floor-button.locked:hover,
.elevator-panel .floor-button.broken:hover,
.elevator-panel .floor-button.locked:active,
.elevator-panel .floor-button.broken:active {
  transform: none;
}

.elevator-panel .floor-button:hover:not(.locked):not(.broken) {
  transform: scale(1.05);
}

.elevator-panel .floor-button:active:not(.locked):not(.broken) {
  transform: scale(0.94);
  box-shadow:
    inset 0 3px 8px rgba(0, 0, 0, 0.55),
    inset 0 -1px 2px rgba(255, 255, 255, 0.06),
    0 0 0 2px #707880,
    0 0 0 3px #1e242c,
    0 0 0 4px #c2c8d0;
}

.elevator-panel .floor-button.shake {
  animation: shake 360ms ease;
}

.hint-card,
.dialog-card,
.task-card,
.challenge-card {
  padding: 18px;
  border: 3px solid rgba(23, 32, 51, 0.08);
  border-radius: 28px;
  background: var(--card);
  box-shadow: var(--shadow);
}

body[data-age-theme="teen"] .hint-card,
body[data-age-theme="teen"] .dialog-card,
body[data-age-theme="teen"] .task-card,
body[data-age-theme="teen"] .challenge-card,
body[data-age-theme="teen"] .lesson-slide {
  border-color: rgba(23, 32, 51, 0.06);
  background:
    radial-gradient(circle at 84% 14%, rgba(88, 183, 255, 0.1), transparent 18%),
    rgba(255, 255, 255, 0.88);
}

.hint-card {
  margin-top: 14px;
  color: #465576;
  font-weight: 800;
}

.room {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 330px;
  border-radius: 34px;
  background:
    radial-gradient(circle at 50% 70%, rgba(255, 211, 92, 0.5), transparent 32%),
    linear-gradient(180deg, #dff7ff, #efe8ff);
  box-shadow: var(--shadow);
}

body[data-age-theme="teen"] .room {
  background:
    radial-gradient(circle at 50% 68%, rgba(88, 183, 255, 0.18), transparent 30%),
    linear-gradient(180deg, #edf4fb, #e3ebf7);
}

.room .floor-guide {
  position: absolute;
  z-index: 3;
  top: 52px;
  left: 14px;
  right: 14px;
}

.room .floor-guide .mr-money-card {
  align-items: center;
  gap: 8px;
}

.room .floor-guide .mr-money {
  --money-scale: 0.58;
}

.room .floor-guide .money-speech {
  padding: 12px;
  font-size: 0.82rem;
  line-height: 1.18;
}

.observer-room {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 350px;
  padding: 22px;
  overflow: hidden;
  border-radius: 34px;
  background:
    radial-gradient(circle at 78% 25%, rgba(255, 211, 92, 0.42), transparent 22%),
    radial-gradient(circle at 24% 78%, rgba(69, 214, 162, 0.32), transparent 28%),
    linear-gradient(180deg, #dff7ff, #efe8ff);
  box-shadow: var(--shadow);
}

body[data-age-theme="teen"] .observer-room {
  background:
    radial-gradient(circle at 78% 25%, rgba(88, 183, 255, 0.22), transparent 22%),
    radial-gradient(circle at 24% 78%, rgba(36, 192, 188, 0.18), transparent 28%),
    linear-gradient(180deg, #edf4fb, #e3ebf7);
}

.observer-guide {
  position: relative;
  z-index: 2;
}

.observer-orbit span {
  position: absolute;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border: 4px solid #172033;
  border-radius: 20px;
  color: #172033;
  background: #fff;
  box-shadow: 0 8px 0 #172033;
  font-weight: 900;
  animation: float 3.6s ease-in-out infinite;
}

.observer-orbit span:nth-child(1) {
  left: 24px;
  top: 62px;
}

.observer-orbit span:nth-child(2) {
  right: 26px;
  top: 94px;
  animation-delay: -1s;
}

.observer-orbit span:nth-child(3) {
  right: 80px;
  bottom: 28px;
  animation-delay: -2s;
}

.door-frame {
  position: absolute;
  left: 28px;
  right: 28px;
  top: 26px;
  bottom: 34px;
  border: 6px solid #172033;
  border-radius: 30px;
  background: linear-gradient(90deg, #9dafca 0 18%, transparent 18% 82%, #9dafca 82%);
}

.door-frame span {
  position: absolute;
  top: 16px;
  left: 50%;
  padding: 6px 14px;
  border-radius: 999px;
  color: #172033;
  background: #ffd35c;
  transform: translateX(-50%);
  font-weight: 900;
  animation: ding 900ms ease infinite;
}

@keyframes ding {
  50% {
    transform: translateX(-50%) scale(1.08) rotate(-2deg);
  }
}

.rookie {
  z-index: 2;
  width: 112px;
  height: 166px;
  margin-top: 104px;
}

.rookie-cap {
  position: absolute;
  z-index: 5;
  left: 12%;
  top: 4%;
  width: 76%;
  height: 24%;
  border: 4px solid #172033;
  border-radius: 26px 26px 10px 10px;
  background: linear-gradient(135deg, #ffd35c, #ff8a5c);
}

.rookie-body {
  position: absolute;
  z-index: 2;
  left: 18%;
  top: 53%;
  width: 64%;
  height: 34%;
  border: 4px solid #172033;
  border-radius: 24px 24px 18px 18px;
  background: linear-gradient(135deg, #7d65ff, #48a6ff);
}

.speaker {
  margin-bottom: 5px;
  color: var(--violet);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

body[data-age-theme="teen"] .speaker {
  color: #1b567e;
}

.dialog-card {
  margin-top: 16px;
}

.dialog-card h2 {
  font-size: 1.55rem;
}

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

.mentor-choice-card,
.video-lesson-card {
  margin-top: 16px;
  padding: 18px;
  border: 3px solid rgba(23, 32, 51, 0.08);
  border-radius: 28px;
  background: var(--card);
  box-shadow: var(--shadow);
}

body[data-age-theme="teen"] .mentor-choice-card,
body[data-age-theme="teen"] .video-lesson-card {
  border-color: rgba(23, 32, 51, 0.06);
  background:
    radial-gradient(circle at 84% 14%, rgba(88, 183, 255, 0.1), transparent 18%),
    rgba(255, 255, 255, 0.88);
}

.choice-guide {
  margin-bottom: 12px;
}

.choice-guide .mr-money-card {
  align-items: center;
  gap: 10px;
}

.choice-guide .mr-money {
  --money-scale: 0.62;
}

.choice-guide .money-speech {
  padding: 12px;
  font-size: 0.84rem;
  line-height: 1.2;
}

.mentor-choice-card h2,
.video-lesson-card h1 {
  font-size: 1.45rem;
}

.learning-options {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.learning-option {
  display: grid;
  grid-template-columns: 52px 1fr;
  align-items: center;
  column-gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--btn-secondary-border);
  border-radius: var(--btn-radius);
  color: var(--btn-secondary-text);
  background: var(--btn-secondary-bg);
  box-shadow: var(--btn-secondary-shadow);
  text-align: left;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease;
}

.learning-option:hover {
  transform: translateY(-1px);
  border-color: rgba(201, 162, 74, 0.55);
  box-shadow: var(--btn-secondary-shadow-hover);
}

.learning-option:active {
  transform: translateY(1px) scale(0.995);
  box-shadow: var(--btn-secondary-shadow-active);
}

.learning-option strong,
.learning-option small {
  grid-column: 2;
}

.learning-option strong {
  font-size: 1rem;
}

.learning-option small {
  margin-top: 4px;
  color: #465576;
  font-weight: 800;
  line-height: 1.25;
}

.learning-option.assessment-continue-option {
  border-color: rgba(201, 162, 74, 0.75);
  background: linear-gradient(135deg, rgba(255, 248, 228, 0.98), rgba(255, 236, 196, 0.92));
  box-shadow: 0 10px 24px rgba(201, 162, 74, 0.18);
}

.learning-option.assessment-continue-option .option-icon {
  color: #9a7428;
}

.option-icon {
  grid-row: 1 / span 2;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  color: var(--btn-primary-text);
  background: linear-gradient(180deg, #fff8e8 0%, #ecd080 100%);
  font-size: 1.35rem;
  font-weight: 900;
}

.video-option .option-icon {
  background: linear-gradient(180deg, #fff8e8 0%, #c9a24a 100%);
}

.rookie-video-frame {
  margin-top: 14px;
  overflow: hidden;
  border: 4px solid #172033;
  border-radius: 24px;
  background: #172033;
  box-shadow: 0 8px 0 #172033;
}

.rookie-video-frame video {
  display: block;
  width: 100%;
  aspect-ratio: 9 / 16;
  max-height: 560px;
  object-fit: contain;
  background: #000;
}

.lesson-video-frame {
  margin: 12px 0 16px;
  overflow: hidden;
  border: 4px solid #172033;
  border-radius: 24px;
  background: #0f1724;
  box-shadow: 0 8px 0 #172033;
}

.lesson-video-frame .lesson-video-player {
  display: block;
  width: 100%;
  max-width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  vertical-align: top;
  background: #0f1724;
}

body[data-age-theme="teen"] .lesson-video-frame {
  border-radius: 22px;
  border-color: rgba(23, 32, 51, 0.12);
  box-shadow: 0 10px 24px rgba(31, 47, 81, 0.12);
}

.video-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 16px;
}

.lesson-header {
  position: sticky;
  z-index: 5;
  top: calc(-1 * (var(--screen-nav-top) - var(--hud-top) - var(--hud-bar-height)));
  padding: 4px 0 12px;
  background: linear-gradient(180deg, #eefbff, rgba(238, 251, 255, 0));
}

#screenLesson .lesson-flow {
  position: relative;
  z-index: 1;
}

body[data-age-theme="teen"] .lesson-header {
  background: linear-gradient(180deg, #f8fbff, rgba(248, 251, 255, 0));
}

.progress-track {
  flex: 1;
  height: 16px;
  overflow: hidden;
  border-radius: 999px;
  background: #d7e5f3;
}

.progress-track span {
  display: block;
  width: 34%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--mint), var(--sun));
  transition: width 260ms ease;
}

.progress-track span.wide {
  width: 75%;
}

.heart {
  font-size: 1.35rem;
}

.lesson-step-label {
  width: 100%;
  padding: 10px 14px;
  border-radius: 999px;
  color: #33415f;
  background: #fff;
  box-shadow: 0 8px 18px rgba(37, 53, 88, 0.1);
  font-size: 0.82rem;
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

body[data-age-theme="teen"] .lesson-step-label {
  border-radius: 16px;
}

.lesson-flow {
  margin-top: 14px;
}

#screenLesson .lesson-flow {
  margin-top: 0;
}

.lesson-slide {
  padding: 18px;
  border: 3px solid rgba(23, 32, 51, 0.08);
  border-radius: 30px;
  background:
    radial-gradient(circle at 88% 12%, rgba(255, 211, 92, 0.35), transparent 26%),
    rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
  animation: screenIn 320ms ease both;
}

.lesson-slide .mr-money-card {
  margin-top: 0;
}

.lesson-visual {
  display: grid;
  place-items: center;
  min-height: 106px;
  margin: 12px 0 16px;
  border: 4px solid #172033;
  border-radius: 28px;
  background: linear-gradient(135deg, #fff7c7, #dff7ff);
  box-shadow: 0 8px 0 #172033;
  font-size: 2.7rem;
  font-weight: 900;
  animation: bounce 850ms ease;
}

body[data-age-theme="teen"] .lesson-visual {
  border-radius: 22px;
  background: linear-gradient(135deg, #f8fbff, #e3eef8);
}

.lesson-visual.graph {
  position: relative;
  overflow: hidden;
}

.lesson-visual.graph::after {
  content: "";
  position: absolute;
  left: 18%;
  right: 18%;
  bottom: 20%;
  height: 42%;
  border-left: 5px solid var(--mint);
  border-bottom: 5px solid var(--mint);
  transform: skew(-24deg) scaleX(0);
  transform-origin: left bottom;
  animation: graphGrow 900ms ease 180ms forwards;
}

.lesson-visual.down::after {
  border-color: var(--berry);
  transform: skew(24deg) scaleX(0) rotateX(180deg);
}

.lesson-visual.count-up {
  animation: bounce 850ms ease, numberPop 1.1s ease infinite;
}

.lesson-visual.formula {
  font-size: 1.35rem;
  text-align: center;
  padding: 10px;
}

.count-up-number {
  position: relative;
  z-index: 1;
  color: var(--mint-dark);
  font-size: 2.15rem;
  text-align: center;
}

@keyframes graphGrow {
  to {
    transform: skew(-24deg) scaleX(1);
  }
}

@keyframes numberPop {
  50% {
    color: var(--mint-dark);
    letter-spacing: 0.03em;
    transform: translateY(-2px) scale(1.03);
  }
}

.lesson-copy h2 {
  margin-bottom: 12px;
  font-size: 1.55rem;
}

.lesson-examples {
  display: grid;
  gap: 10px;
}

.lesson-example {
  display: grid;
  grid-template-columns: 42px 1fr;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: 20px;
  background: #f3fbff;
  color: #32405f;
}

.lesson-example span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 6px 12px rgba(37, 53, 88, 0.1);
  font-size: 1.5rem;
}

.money-reaction,
.lesson-tease {
  margin: 14px 0 0;
  padding: 12px 14px;
  border-radius: 18px;
  color: #244262;
  background: #effff8;
  font-weight: 900;
}

body[data-age-theme="teen"] .money-reaction {
  background: #eef8ff;
}

body[data-age-theme="teen"] .lesson-tease {
  background: #edf8f8;
}

.lesson-tease {
  background: #fff4c7;
  text-align: center;
}

.lesson-nav {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 10px;
  margin-top: 16px;
}

button:disabled {
  cursor: not-allowed;
  filter: grayscale(0.75);
  opacity: 0.55;
}

.task-card {
  margin-top: 20px;
}

.task-type {
  margin-bottom: 8px;
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

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

.answer-card {
  min-height: 116px;
  padding: 14px 10px;
  border: 4px solid #172033;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 8px 0 #172033;
  color: var(--ink);
  font-weight: 900;
  transition: transform 160ms ease, background 160ms ease;
}

.answer-card .icon {
  display: block;
  margin-bottom: 8px;
  font-size: 2rem;
}

.answer-card.correct {
  background: #dfffe9;
  animation: bounce 520ms ease;
}

.answer-card.wrong,
.challenge-card.wrong {
  animation: shake 360ms ease;
}

@keyframes bounce {
  35% {
    transform: translateY(-14px) scale(1.05);
  }
  70% {
    transform: translateY(4px) scale(0.98);
  }
}

@keyframes shake {
  20%,
  60% {
    transform: translateX(-8px);
  }
  40%,
  80% {
    transform: translateX(8px);
  }
}

.feedback {
  display: none;
  min-height: 54px;
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 20px;
  background: transparent;
  color: #32405f;
  font-weight: 900;
  text-align: center;
}

.feedback.show {
  display: block;
  background: #fff;
  box-shadow: var(--shadow);
}

.coin-pop {
  position: absolute;
  z-index: 40;
  top: 58%;
  left: 50%;
  font-size: 2rem;
  pointer-events: none;
  animation: coinFly 820ms ease forwards;
}

@keyframes coinFly {
  to {
    opacity: 0;
    transform: translate(120px, -330px) rotate(420deg) scale(0.4);
  }
}

.challenge-card {
  position: relative;
  margin-top: 54px;
  text-align: center;
}

#screenSituations.situation-room-screen .challenge-card.situation-card {
  margin-top: auto;
}

body[data-age-theme="teen"] .challenge-card {
  margin-top: 48px;
}

.challenge-card h1 {
  font-size: 1.8rem;
}

.quiz-progress {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.situation-door-screen {
  inset: 0 !important;
  padding: 0 !important;
  overflow: hidden;
  background: #1a120d;
}

.situation-door-screen.active {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 100%;
}

.situation-door-screen .situation-door-back.icon-button {
  position: absolute;
  top: max(14px, env(safe-area-inset-top, 0px));
  left: max(16px, env(safe-area-inset-left, 0px));
  z-index: 4;
  border: 1px solid rgba(244, 211, 122, 0.28);
  border-radius: 12px;
  color: #f8ecd4;
  background: rgba(42, 32, 22, 0.62);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(10px);
}

.situation-door-screen .situation-door-back.icon-button:hover {
  border-color: rgba(244, 211, 122, 0.42);
  background: rgba(52, 40, 28, 0.78);
}

.situation-door-stage {
  position: relative;
  flex: 1 1 auto;
  width: 100%;
  height: 100%;
  min-height: 100%;
  overflow: hidden;
}

.situation-door-bg {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  transition: opacity 220ms ease;
}

.situation-door-stage.is-switching .situation-door-bg {
  opacity: 0.72;
}

.situation-door-plate {
  position: absolute;
  left: 50%;
  top: 28%;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: min(34vw, 132px);
  transform: translateX(-50%);
  pointer-events: none;
}

.situation-door-screen.is-completed-door .situation-door-status {
  color: #b8e8b4;
}

.situation-door-screen.is-completed-door .situation-door-number {
  color: #9ed89a;
}

.situation-door-status {
  width: 100%;
  margin: 0 0 4px;
  color: #b8e8b4;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-align: center;
  text-transform: uppercase;
  text-wrap: balance;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.55);
}

.situation-door-eyebrow {
  width: 100%;
  margin: 0 0 2px;
  color: rgba(255, 236, 198, 0.92);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-align: center;
  text-transform: uppercase;
  text-wrap: balance;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.55);
}

.situation-door-number {
  width: 100%;
  margin: 0;
  color: #f4d37a;
  font-size: clamp(2.8rem, 14vw, 4.2rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.04em;
  text-align: center;
  text-shadow:
    0 2px 0 rgba(58, 36, 12, 0.55),
    0 8px 18px rgba(0, 0, 0, 0.45);
}

.situation-door-total {
  width: 100%;
  margin: 4px 0 0;
  color: rgba(255, 236, 198, 0.88);
  font-size: clamp(0.82rem, 3.6vw, 1rem);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-align: center;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.55);
}

.situation-door-countdown {
  width: 100%;
  margin: 8px 0 0;
  padding: 6px 8px;
  border: 1px solid rgba(255, 236, 198, 0.28);
  border-radius: 10px;
  background: rgba(18, 26, 42, 0.72);
  color: #fff4d6;
  font-size: clamp(0.68rem, 3vw, 0.78rem);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-align: center;
  text-wrap: balance;
  box-shadow: 0 8px 18px rgba(12, 18, 30, 0.28);
}

.situation-door-screen.is-door-countdown-active .situation-door-cta {
  margin-top: 4px;
}

.situation-door-screen.is-test-door-view .situation-door-plate {
  top: 34%;
  width: min(48vw, 168px);
}

.situation-door-screen.is-test-door-view .situation-door-eyebrow {
  font-size: clamp(0.78rem, 3.4vw, 0.95rem);
  line-height: 1.25;
  letter-spacing: 0.06em;
}

.situation-door-arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(244, 211, 122, 0.28);
  border-radius: 12px;
  color: #f8ecd4;
  font-size: 1.5rem;
  line-height: 1;
  background: rgba(42, 32, 22, 0.62);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(10px);
  transform: translateY(-50%);
  transition:
    opacity 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

.situation-door-arrow:hover:not(:disabled) {
  border-color: rgba(244, 211, 122, 0.42);
  background: rgba(52, 40, 28, 0.78);
}

.situation-door-arrow:disabled {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.situation-door-arrow--prev {
  left: 12px;
}

.situation-door-arrow--next {
  right: 12px;
}

.situation-door-screen .situation-door-cta.primary-button {
  position: absolute;
  left: 0;
  right: 0;
  bottom: max(28px, env(safe-area-inset-bottom, 0px));
  z-index: 3;
  width: min(78%, 280px);
  margin-inline: auto;
}

.situation-door-screen .situation-door-cta.secondary-button {
  position: absolute;
  left: 0;
  right: 0;
  bottom: max(28px, env(safe-area-inset-bottom, 0px));
  z-index: 3;
  width: min(78%, 280px);
  margin-inline: auto;
}

#screenSituations.situation-room-screen {
  inset: 0 !important;
  padding: var(--screen-nav-top) 16px max(22px, env(safe-area-inset-bottom)) !important;
  background: transparent;
  overflow: hidden !important;
}

#screenSituations.situation-room-screen::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  background: url("./assets/situation-room-bg.png") center center / cover no-repeat;
  pointer-events: none;
}

#screenSituations.situation-room-screen::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.08) 0%,
    rgba(23, 32, 51, 0.12) 34%,
    rgba(23, 32, 51, 0.48) 72%,
    rgba(23, 32, 51, 0.62) 100%
  );
  pointer-events: none;
}

#screenSituations.situation-room-screen > * {
  position: relative;
  z-index: 1;
}

#screenSituations.situation-room-screen .lesson-header {
  top: calc(-1 * (var(--screen-nav-top) - var(--hud-top) - var(--hud-bar-height)));
  background: linear-gradient(180deg, rgba(23, 32, 51, 0.42), rgba(23, 32, 51, 0));
}

#screenSituations.situation-room-screen .situation-card {
  flex: 0 0 auto;
  margin-top: auto;
  width: 100%;
  max-height: calc(100dvh - var(--screen-nav-top) - env(safe-area-inset-bottom, 0px) - 52px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 18px 16px 16px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
  box-shadow: 0 18px 40px rgba(23, 32, 51, 0.2);
}

.situation-question-pagination {
  display: flex;
  flex: 0 0 auto;
  justify-content: center;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin-top: 10px;
  padding: 0 8px 6px;
}

.situation-question-dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(197, 206, 223, 0.72);
  box-shadow: inset 0 1px 2px rgba(23, 32, 51, 0.12);
  transition:
    transform 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
}

.situation-question-dot.is-unlocked {
  background: linear-gradient(135deg, #c9a24a, #f4d37a);
  box-shadow:
    0 0 0 1px rgba(201, 162, 74, 0.35),
    0 2px 8px rgba(201, 162, 74, 0.28);
}

.situation-question-dot.is-current {
  transform: scale(1.22);
  box-shadow:
    0 0 0 2px rgba(244, 211, 122, 0.55),
    0 2px 10px rgba(201, 162, 74, 0.34);
}

.situation-question-dot:disabled {
  cursor: default;
  opacity: 1;
}

.situation-question-dot.is-unlocked:not(:disabled) {
  cursor: pointer;
}

.situation-question-dot.is-unlocked:not(:disabled):hover {
  transform: scale(1.14);
}

#screenSituations.active.situation-room-screen {
  display: flex;
  flex-direction: column;
}

#screenSituations.situation-phase-brief.situation-room-screen {
  overflow: hidden;
  padding: var(--screen-nav-top) 14px max(16px, env(safe-area-inset-bottom)) !important;
}

#screenSituations.situation-phase-brief.situation-room-screen .situation-card-brief {
  padding: 14px 14px 12px;
}

#screenSituations.situation-phase-brief::after {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.02) 0%,
    rgba(23, 32, 51, 0.06) 36%,
    rgba(23, 32, 51, 0.34) 72%,
    rgba(23, 32, 51, 0.52) 100%
  );
}

#screenSituations.situation-phase-questions::after {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.04) 0%,
    rgba(23, 32, 51, 0.1) 30%,
    rgba(23, 32, 51, 0.38) 62%,
    rgba(23, 32, 51, 0.58) 100%
  );
}

#screenSituations.situation-phase-mentor-office.situation-room-screen {
  inset: 0 !important;
  z-index: 3;
  background: transparent !important;
  padding: var(--screen-nav-top) 18px max(24px, env(safe-area-inset-bottom)) !important;
  overflow: hidden !important;
}

#screenSituations.active.situation-phase-mentor-office.situation-room-screen {
  display: flex !important;
  flex-direction: column;
}

#screenSituations.situation-phase-mentor-office::before {
  background: url("./assets/mr-money-office-bg.png") center top / cover no-repeat;
}

#screenSituations.situation-phase-mentor-office.mentor-mrs::before {
  background-image: url("./assets/mrs-money-office-bg.png");
}

#screenSituations.situation-phase-mentor-office::after {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.12) 0%,
    rgba(255, 255, 255, 0.05) 22%,
    rgba(23, 32, 51, 0.1) 58%,
    rgba(23, 32, 51, 0.42) 100%
  );
}

#screenSituations.situation-phase-mentor-office .lesson-header {
  position: relative;
  top: 0;
  z-index: 4;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  margin-bottom: 0;
  background: transparent;
  backdrop-filter: none;
}

#screenSituations.situation-phase-mentor-office .lesson-header .icon-button,
#screenSituations.situation-phase-mentor-office .lesson-step-label,
#screenSituations.situation-phase-mentor-office .progress-track {
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, rgba(18, 26, 42, 0.78) 0%, rgba(18, 26, 42, 0.62) 100%);
  box-shadow: 0 10px 28px rgba(12, 18, 30, 0.24);
  backdrop-filter: blur(12px);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

#screenSituations.situation-phase-mentor-office .lesson-header .icon-button {
  width: 42px;
  height: 42px;
}

#screenSituations.situation-phase-mentor-office .lesson-step-label {
  flex: 1;
  min-width: 0;
  min-height: 42px;
  margin: 0;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

#screenSituations.situation-phase-mentor-office .progress-track,
#screenSituations.situation-phase-mentor-office .heart {
  display: none;
}

#screenSituations.situation-phase-mentor-office .situation-scene,
#screenSituations.situation-phase-mentor-office .situation-question-pagination,
#screenSituations.situation-phase-mentor-office .feedback {
  display: none !important;
}

#screenSituations.situation-phase-mentor-office > .situation-completed-mentor-bubble {
  position: absolute;
  z-index: 4;
  pointer-events: auto;
}

#screenSituations.situation-phase-mentor-office .situation-completed-bottom-stack {
  position: relative;
  z-index: 4;
  margin-top: auto;
  flex-shrink: 0;
  width: 100%;
  pointer-events: auto;
}

#screenSituations.situation-phase-mentor-office .situation-completed-dialog-card {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
  box-shadow: 0 18px 40px rgba(23, 32, 51, 0.16);
}

#screenSituations.situation-phase-mentor-office .situation-completed-dialog-card .dialog-actions {
  display: grid;
  grid-template-columns: 1fr;
  margin-top: 12px;
}

#screenSituations.situation-phase-mentor-office .situation-completed-continue,
#screenSituations.situation-phase-mentor-office .situation-completed-restart {
  width: 100%;
}

.situation-scene {
  flex: 1 1 auto;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  min-height: 24vh;
  padding: 0 10px 6px;
}

.situation-phase-brief .situation-scene {
  flex: 0 0 auto;
  min-height: 0;
  padding: 0;
  pointer-events: none;
}

#screenSituations.situation-phase-questions {
  --situation-hero-feet-bottom: clamp(210px, 33vh, 300px);
  --situation-hero-emotion-lift: 10px;
  --situation-hero-speech-bottom-offset: 218px;
}

#screenSituations.situation-phase-questions .situation-scene {
  display: none;
}

#screenSituations.situation-phase-questions .situation-hero-portrait:not([hidden]) {
  position: absolute;
  left: max(12px, env(safe-area-inset-left));
  bottom: var(--situation-hero-feet-bottom);
  z-index: 2;
  width: var(--hero-reaction-width);
  height: auto;
  object-fit: contain;
  object-position: center bottom;
  transform: translateY(calc(18% - var(--situation-hero-emotion-lift)));
  pointer-events: none;
  filter: drop-shadow(0 10px 18px rgba(23, 32, 51, 0.16));
}

#screenSituations.situation-phase-questions #situationQuestionCard {
  position: relative;
  z-index: 3;
}

#screenSituations.situation-phase-questions .situation-hero-speech-layer:not([hidden]) {
  position: absolute;
  left: calc(max(12px, env(safe-area-inset-left)) + var(--hero-reaction-width));
  right: max(14px, env(safe-area-inset-right));
  bottom: calc(var(--situation-hero-feet-bottom) + var(--situation-hero-speech-bottom-offset));
  z-index: 4;
  margin: 0;
  pointer-events: none;
}

#screenSituations.situation-phase-questions .situation-hero-speech-layer .hero-answer-feedback-speech {
  max-width: none;
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.38;
}

#screenSituations.situation-phase-questions .situation-question-pagination {
  position: relative;
  z-index: 3;
}

#screenSituations.situation-phase-questions .situation-hero-feedback:not([hidden]) {
  pointer-events: auto;
}


.situation-hero-feedback {
  width: 100%;
  margin: 0;
  align-self: flex-end;
}

.situation-hero-speech-layer {
  width: auto;
  align-self: auto;
}

.situation-hero-feedback .hero-answer-feedback-card {
  align-items: flex-start;
  justify-content: flex-start;
  gap: 10px;
  width: 100%;
  max-width: none;
}

.situation-hero-feedback .hero-answer-feedback-image {
  width: var(--hero-reaction-width);
}

.situation-hero-feedback .hero-answer-feedback-speech {
  flex: 1;
  max-width: none;
  margin-top: 10px;
  font-size: 0.86rem;
  line-height: 1.38;
}

.situation-phase-brief .situation-card-brief {
  flex: 0 0 auto;
}

.situation-phase-brief .situation-card h1 {
  margin: 0 0 8px;
  font-size: 1.12rem;
  line-height: 1.22;
}

.situation-phase-brief .quiz-progress {
  margin-bottom: 6px;
  font-size: 0.74rem;
}

.situation-phase-brief .situation-story {
  max-height: none;
  overflow: visible;
  margin-bottom: 12px;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 0.8rem;
  line-height: 1.4;
}

.situation-phase-brief .situation-brief-continue {
  min-height: 44px;
  margin-top: 0;
}

.situation-brief-continue {
  width: 100%;
  margin-top: 14px;
}

#screenSituations.situation-room-screen .lesson-header .icon-button {
  border: 1px solid rgba(92, 74, 50, 0.16);
  border-radius: 12px;
  color: #3d2e1f;
  background: rgba(255, 252, 245, 0.9);
  box-shadow: 0 6px 16px rgba(23, 32, 51, 0.14);
}

#screenSituations.situation-room-screen .progress-track {
  border: 1px solid rgba(92, 74, 50, 0.12);
  background: rgba(255, 252, 245, 0.55);
}

#screenSituations.situation-room-screen .progress-track span {
  background: linear-gradient(90deg, #c9a24a, #f4d37a);
}

#screenSituations.situation-room-screen .quiz-option {
  min-height: 54px;
  padding: 12px 14px;
  border: 1px solid rgba(92, 74, 50, 0.16);
  border-radius: 14px;
  color: #2e2418;
  background: rgba(255, 252, 245, 0.94);
  box-shadow: 0 4px 14px rgba(42, 32, 20, 0.08);
  font-weight: 700;
}

#screenSituations.situation-room-screen .quiz-option:hover {
  transform: translateY(-1px);
  border-color: rgba(201, 162, 74, 0.42);
  background: rgba(255, 248, 230, 0.98);
  box-shadow: 0 6px 18px rgba(42, 32, 20, 0.12);
}

#screenSituations.situation-room-screen .quiz-option:active {
  transform: translateY(1px) scale(0.99);
}

#screenSituations.situation-room-screen .quiz-option.correct {
  border-color: rgba(201, 162, 74, 0.65);
  color: #3d2e1f;
  background: rgba(255, 244, 210, 0.96);
}

#screenSituations.situation-room-screen .quiz-option.wrong-choice {
  border-color: rgba(176, 78, 58, 0.55);
  color: #4a2820;
  background: rgba(255, 240, 236, 0.96);
}

#screenSituations.situation-room-screen .quiz-option.wrong-choice:disabled {
  opacity: 1;
}

#screenSituations.situation-room-screen .situation-recall-btn {
  border: 1px solid rgba(92, 74, 50, 0.14);
  border-radius: 12px;
  color: #5a4834;
  background: rgba(255, 252, 245, 0.92);
  box-shadow: 0 4px 12px rgba(42, 32, 20, 0.08);
}

#screenSituations.situation-room-screen .situation-recall-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(201, 162, 74, 0.38);
  background: rgba(255, 248, 230, 0.98);
  box-shadow: 0 6px 16px rgba(42, 32, 20, 0.12);
}

.situation-question-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.situation-question-top .quiz-progress {
  flex: 1;
  margin: 0;
}

.situation-recall-btn {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  border: 2px solid rgba(23, 32, 51, 0.1);
  border-radius: 14px;
  background: #f4f8ff;
  color: #1b567e;
  box-shadow: 0 8px 16px rgba(23, 32, 51, 0.08);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.situation-recall-btn svg {
  width: 22px;
  height: 22px;
}

.situation-recall-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(23, 32, 51, 0.12);
}

.situation-recall-overlay {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: none;
  background: #0f1624;
}

.situation-recall-overlay.is-open {
  display: flex;
  flex-direction: column;
  animation: recallOverlayIn 280ms ease both;
}

@keyframes recallOverlayIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.situation-phase-brief .situation-card-questions {
  display: none !important;
}

.situation-phase-questions .situation-card-brief {
  display: none !important;
}

.situation-phase-mentor-office .situation-card-brief,
.situation-phase-mentor-office .situation-card-questions {
  display: none !important;
}

.situation-phase-brief .situation-completed-mentor-bubble,
.situation-phase-brief .situation-completed-bottom-stack,
.situation-phase-questions .situation-completed-mentor-bubble,
.situation-phase-questions .situation-completed-bottom-stack {
  display: none !important;
}

#screenSituations.situation-phase-mentor-office .situation-completed-mentor-bubble:not([hidden]),
#screenSituations.situation-phase-mentor-office .situation-completed-bottom-stack:not([hidden]) {
  display: flex !important;
  flex-direction: column;
}

#situationQuestionCard[hidden],
#situationRecallOverlay[hidden] {
  display: none !important;
}

.situation-recall-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1;
  width: 100%;
  min-height: 0;
  padding:
    max(var(--screen-nav-top), calc(env(safe-area-inset-top) + 8px))
    max(16px, env(safe-area-inset-right))
    max(20px, env(safe-area-inset-bottom))
    max(16px, env(safe-area-inset-left));
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background:
    linear-gradient(
      180deg,
      rgba(8, 12, 20, 0.35) 0%,
      rgba(8, 12, 20, 0.12) 28%,
      rgba(8, 12, 20, 0.22) 58%,
      rgba(8, 12, 20, 0.72) 100%
    ),
    url("./assets/situation-room-bg.png") center center / cover no-repeat;
}

.situation-recall-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 82% 12%, rgba(201, 162, 74, 0.18), transparent 28%);
}

.situation-recall-header {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  margin-bottom: 12px;
  padding-right: 52px;
}

.situation-recall-eyebrow {
  margin: 0 0 6px;
  color: #f4d37a;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
}

.situation-recall-panel h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(1.05rem, 4.5vw, 1.35rem);
  line-height: 1.22;
  text-align: left;
  text-shadow: 0 3px 18px rgba(0, 0, 0, 0.55);
}

.situation-recall-close {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 2;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.88);
  color: #3d2e1f;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(10px);
}

.situation-recall-close:hover {
  background: #fff;
}

.situation-recall-card {
  position: relative;
  z-index: 1;
  flex: 0 1 auto;
  margin-top: auto;
  width: 100%;
  min-height: 0;
  max-height: 100%;
  padding: 18px 16px 24px;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scroll-padding-bottom: 12px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
  box-shadow:
    0 22px 48px rgba(8, 12, 20, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
  animation: recallCardUp 360ms cubic-bezier(0.22, 1, 0.36, 1) 60ms both;
}

@keyframes recallCardUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#situationQuestionCard.wrong {
  animation: shakeCard 420ms ease;
}

.situation-card {
  text-align: left;
}

.situation-card h1 {
  font-size: 1.45rem;
  text-align: left;
}

.situation-story {
  margin: 0 0 14px;
  padding: 14px 16px;
  border: 2px solid rgba(23, 32, 51, 0.1);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.88);
  color: #33415f;
  font-size: 0.92rem;
  line-height: 1.55;
  white-space: pre-line;
}

.situation-recall-panel .situation-story {
  margin: 0;
  padding: 0 0 6px;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #2e3648;
  font-size: 0.9rem;
  line-height: 1.58;
  box-shadow: none;
}

body[data-age-theme="teen"] .situation-story {
  border-radius: 14px;
  background: #f8fbff;
}

body[data-age-theme="teen"] .situation-phase-brief .situation-story {
  background: transparent;
}

.situation-question {
  margin: 0 0 10px;
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.4;
  text-align: left;
}

.quiz-options {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.situation-question-forward {
  width: 100%;
  margin-top: 12px;
}

.quiz-option:disabled {
  cursor: default;
  opacity: 0.88;
}

.quiz-option.wrong-choice {
  border-color: #ff8b8b;
  background: #fff1f1;
}

.quiz-option.wrong-choice:disabled {
  opacity: 1;
  cursor: not-allowed;
}

.quiz-option {
  display: block;
  width: 100%;
  min-height: 58px;
  margin-top: 0;
  padding: 12px 14px;
  text-align: left;
}

.quiz-option.correct {
  border-color: var(--mint);
  background: #eafff4;
}

.situation-hero-portrait,
.win-hero-portrait,
.hero-answer-feedback-image {
  width: var(--hero-reaction-width);
  max-width: var(--hero-reaction-width);
}

.hero-answer-feedback {
  margin-top: 18px;
}

.hero-answer-feedback-card {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 12px;
  animation: bubblePop 360ms cubic-bezier(0.22, 1.4, 0.36, 1) both;
}

.hero-answer-feedback-image {
  width: var(--hero-reaction-width);
  height: auto;
  flex-shrink: 0;
  object-fit: contain;
  filter: drop-shadow(0 10px 18px rgba(23, 32, 51, 0.14));
}

.hero-answer-feedback-speech {
  --bubble-border: rgba(23, 32, 51, 0.14);
  --bubble-bg: #fff;
  position: relative;
  max-width: min(52vw, 240px);
  margin: 0;
  padding: 14px 16px;
  border: 2px solid var(--bubble-border);
  border-radius: 20px;
  background: var(--bubble-bg);
  box-shadow: 0 8px 20px rgba(23, 32, 51, 0.1);
  color: #24304b;
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.38;
  text-align: left;
}

.hero-answer-feedback-speech::after {
  content: "";
  position: absolute;
  left: -6px;
  top: 50%;
  width: 12px;
  height: 12px;
  background: var(--bubble-bg);
  border: 2px solid var(--bubble-border);
  border-right: none;
  border-top: none;
  transform: translateY(-50%) rotate(45deg);
}

.hero-answer-feedback.is-correct .hero-answer-feedback-speech {
  --bubble-border: #5ec9a8;
  --bubble-bg: #f0fdf8;
}

.hero-answer-feedback.is-wrong .hero-answer-feedback-speech {
  --bubble-border: #d4a5a5;
  --bubble-bg: #fff6f5;
}

body[data-age-theme="teen"] .hero-answer-feedback-image {
  width: var(--hero-reaction-width);
}

#screenWin.win-mentor-screen {
  inset: 0 !important;
  z-index: 3;
  padding: var(--screen-nav-top) 18px max(24px, env(safe-area-inset-bottom)) !important;
  background: transparent !important;
  overflow: hidden !important;
  text-align: left;
}

#screenWin.win-mentor-screen.active {
  display: flex !important;
  flex-direction: column;
}

#screenWin.win-mentor-screen::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.12) 0%,
    rgba(255, 255, 255, 0.05) 22%,
    rgba(23, 32, 51, 0.1) 58%,
    rgba(23, 32, 51, 0.42) 100%
  );
}

#screenWin.win-mentor-screen > .win-mentor-bubble {
  position: absolute;
  left: 50%;
  top: calc(21% - 8px);
  z-index: 4;
  width: min(86%, 290px);
  margin: 0;
  padding: 14px 18px 16px;
  transform: translateX(-50%);
  pointer-events: auto;
}

#screenWin.win-mentor-screen .win-bottom-stack {
  position: relative;
  z-index: 5;
  margin-top: auto;
  flex-shrink: 0;
  width: 100%;
  pointer-events: auto;
}

#screenWin.win-mentor-screen .win-dialog-card {
  position: relative;
  z-index: 1;
  margin: 0;
  padding: 18px 16px 16px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 24px;
  background: #fff;
  backdrop-filter: blur(14px);
  box-shadow: 0 18px 40px rgba(23, 32, 51, 0.2);
}

#screenWin.win-mentor-screen .win-dialog-card .quiz-progress {
  margin: 0 0 10px;
  color: #6f7d98;
  text-align: left;
}

#screenWin.win-mentor-screen .win-dialog-card .dialog-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 12px;
}

#screenWin.win-mentor-screen .win-dialog-card .primary-button {
  width: 100%;
}

#screenWin {
  display: none;
  text-align: center;
}

#screenWin.active:not(.win-mentor-screen) {
  display: grid;
  place-items: center;
  align-content: center;
}

.victory {
  animation: victory 900ms ease infinite;
}

@keyframes victory {
  50% {
    transform: translateY(-16px) rotate(-3deg);
  }
}

@media (max-width: 390px) {
  .age-selector {
    grid-template-columns: 1fr;
  }

  .age-card {
    min-height: auto;
  }

  .start-preview {
    min-height: 292px;
  }

  .mentor-stage {
    min-height: 624px;
  }

  .mentor-screen .mentor-stage {
    min-height: 0;
    padding: 10px 12px;
  }

  .mentor-screen .mentor-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: min(100%, 280px);
    gap: 8px;
  }

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

  .vision-screen .hero-variant-grid {
    grid-template-columns: 1fr 1fr;
  }


  .teen-preview-stats {
    flex-direction: column;
  }
}

@media (max-width: 440px) {
  .gender-grid,
  .hero-variant-grid,
  .vision-screen .hero-variant-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .gender-screen .gender-portrait-frame,
  .gender-portrait-image {
    min-height: 210px;
  }

  .gender-screen .vision-portrait-name,
  .vision-portrait-name {
    padding: 28px 8px 10px;
    font-size: 0.88rem;
  }

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

  .hero-preview-card {
    grid-template-columns: 1fr;
  }

  .hero-preview-media {
    min-height: 300px;
  }

  .hero-type-grid {
    grid-template-columns: 1fr;
  }

  .vision-screen .hero-type-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .vision-screen .hero-type-card {
    min-height: 88px;
    padding: 12px 6px 10px;
    gap: 6px;
  }

  .vision-screen .hero-type-number {
    width: 26px;
    height: 26px;
    font-size: 0.76rem;
  }

  .vision-screen .hero-type-label {
    font-size: 0.72rem;
  }

  .start-logo {
    max-width: min(56vw, 140px);
    max-height: min(18svh, 128px);
  }

  .start-copy h1 {
    font-size: clamp(1rem, 4vw, 1.22rem);
  }

  .start-description {
    font-size: clamp(0.78rem, 3.1vw, 0.88rem);
    line-height: 1.28;
  }

  .start-screen .primary-button {
    min-height: 46px;
    font-size: 0.95rem;
  }
}

@media (max-height: 760px) {
  .entrance-screen .welcome-guide .mr-money {
    --money-scale: 0.64;
  }

  .entrance-screen .welcome-guide .money-speech {
    padding: 10px 12px;
    font-size: 0.78rem;
  }

  .entrance-screen .academy-campus {
    width: min(100%, 236px);
  }

  .entrance-screen .academy-student {
    height: min(112px, 30%);
  }
}

/* Landscape phones: compact HUD, fit elevator panel to short viewport */
@media (orientation: landscape) and (max-height: 520px) {
  :root {
    --hud-inset: 4px;
    --hud-bar-height: 28px;
    --hud-header-gap: 6px;
  }

  .app-shell {
    height: var(--app-height);
    max-height: var(--app-height);
  }

  .top-hud {
    left: max(10px, env(safe-area-inset-left));
    right: max(10px, env(safe-area-inset-right));
    gap: 4px;
  }

  .pill {
    min-height: 28px;
    padding: 3px 6px;
    font-size: 0.64rem;
  }

  .account-hud-button {
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    min-height: 28px;
    font-size: 0.85rem;
  }

  .elevator-screen.active {
    display: flex !important;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: clamp(8px, 2.5vw, 18px);
    overflow: hidden !important;
    padding:
      var(--screen-nav-top)
      max(10px, env(safe-area-inset-right))
      max(6px, env(safe-area-inset-bottom))
      max(10px, env(safe-area-inset-left)) !important;
  }

  .elevator-screen .screen-header {
    display: none;
  }

  .elevator-screen .elevator-guide {
    display: flex;
    flex: 1 1 0;
    min-width: 0;
    max-width: 46%;
    align-items: flex-end;
    justify-content: center;
    align-self: stretch;
    margin: 0;
    padding-bottom: 2px;
  }

  .elevator-screen .elevator-guide .mr-money-card {
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin: 0;
    max-width: 100%;
  }

  .elevator-screen .elevator-guide .mr-money {
    --money-scale: 0.92;
  }

  .elevator-screen .elevator-guide .money-speech {
    flex: none;
    width: min(100%, 240px);
    padding: 10px 12px;
    font-size: 0.74rem;
    line-height: 1.3;
  }

  .elevator-screen .elevator-guide .money-speech::before {
    left: 50%;
    bottom: auto;
    top: -9px;
    transform: translateX(-50%) rotate(45deg);
  }

  .elevator-panel {
    flex: 0 0 auto;
    width: auto;
    height: calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 36px);
    max-height: calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 36px);
    max-width: min(54vw, 340px);
    margin: 0;
    padding: 14px 12px 12px;
    gap: 8px;
    aspect-ratio: 622 / 1024;
  }

  .elevator-display {
    width: min(100%, 148px);
    padding: 8px 12px;
  }

  .elevator-display strong {
    font-size: 2.1rem;
  }

  .button-panel {
    gap: 6px 10px;
  }

  .elevator-panel .floor-button {
    max-height: 48px;
    width: min(100%, 92px);
    font-size: 0.84rem;
  }

  .elevator-panel .floor-button span {
    font-size: 0.58rem;
  }

  .floor-lobby-screen,
  .office-screen,
  .quiz-office-screen,
  #screenSituations.situation-room-screen {
    padding:
      var(--screen-nav-top)
      max(12px, env(safe-area-inset-right))
      max(10px, env(safe-area-inset-bottom))
      max(12px, env(safe-area-inset-left)) !important;
  }

  .floor1-mentor-bubble {
    top: calc(14% - 8px);
    width: min(72%, 240px);
    padding: 10px 14px 12px;
  }

  .floor1-mentor-text {
    font-size: 0.82rem;
  }

  #screenSituations.situation-phase-questions {
    --situation-hero-feet-bottom: clamp(190px, 31vh, 260px);
    --situation-hero-speech-bottom-offset: 208px;
  }

  #screenSituations.situation-phase-questions .situation-hero-portrait:not([hidden]) {
    transform: translateY(calc(16% - var(--situation-hero-emotion-lift)));
  }

  #screenSituations.situation-phase-questions .situation-hero-speech-layer:not([hidden]) {
    left: calc(max(12px, env(safe-area-inset-left)) + var(--hero-reaction-width));
    bottom: calc(var(--situation-hero-feet-bottom) + var(--situation-hero-speech-bottom-offset));
  }

  #screenQuiz.quiz-phase-questions {
    --situation-hero-feet-bottom: clamp(190px, 31vh, 260px);
    --situation-hero-speech-bottom-offset: 208px;
  }

  #screenQuiz.quiz-phase-questions .situation-hero-portrait:not([hidden]) {
    transform: translateY(calc(16% - var(--situation-hero-emotion-lift)));
  }

  #screenQuiz.quiz-phase-questions .situation-hero-speech-layer:not([hidden]) {
    left: calc(max(12px, env(safe-area-inset-left)) + var(--hero-reaction-width));
    bottom: calc(var(--situation-hero-feet-bottom) + var(--situation-hero-speech-bottom-offset));
  }

  #screenWin.win-mentor-screen > .win-hero-portrait {
    bottom: clamp(108px, 28vh, 148px);
  }

  #screenQuiz.quiz-phase-completed > #quizHeroPortrait:not([hidden]) {
    bottom: clamp(84px, 22vh, 118px);
  }

  #screenWin.win-mentor-screen > .win-mentor-bubble {
    top: calc(14% - 8px);
    width: min(72%, 240px);
    padding: 10px 14px 12px;
  }
}
