﻿:root {
  --navy-950: #0f0d0b;
  --navy-930: #17140f;
  --navy-900: #1f1a14;
  --navy-800: #2b2319;
  --ink: #1c1917;
  --ink-soft: #5b5349;
  --muted: #8c8276;
  --panel: #faf4ea;
  --card: #ffffff;
  --line: rgba(28, 25, 23, 0.08);
  --teal: #ff6633;
  --teal-strong: #d9481c;
  --teal-dark: #a83913;
  --mustard: #f4b740;
  --green: #2daa67;
  --violet-text: #f3e7d8;
  --white: #ffffff;
  --radius-xl: 30px;
  --radius-lg: 24px;
  --radius-md: 20px;
  --radius-sm: 16px;
  --shadow-teal: 0 0 32px rgba(255, 102, 51, 0.34);
  --shadow-card: 0 18px 46px rgba(28, 25, 23, 0.12);
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  overflow: hidden;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--navy-950);
  color: var(--white);
}

button {
  font-family: inherit;
}

img {
  max-width: 100%;
  display: block;
}

.trainer-app {
  width: 100vw;
  height: 100vh;
  min-height: 640px;
  overflow: hidden;
  background: #03101d;
}

.screen {
  display: none;
  width: 100%;
  height: 100%;
}

.screen.is-active {
  display: block;
}

/* === Screen 1: hero === */

.hero-screen {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -3;
  background-image: url("../assets/hero-main.webp");
  background-size: cover;
  background-position: center center;
  transform: scale(1.01);
  filter: brightness(1.12) saturate(1.06);
}

.hero-shade {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(
      90deg,
      rgba(17, 14, 11, 0.94) 0%,
      rgba(17, 14, 11, 0.80) 24%,
      rgba(17, 14, 11, 0.44) 43%,
      rgba(17, 14, 11, 0.14) 62%,
      rgba(17, 14, 11, 0.04) 100%
    ),
    linear-gradient(
      180deg,
      rgba(17, 14, 11, 0.10) 0%,
      rgba(17, 14, 11, 0.04) 48%,
      rgba(17, 14, 11, 0.28) 100%
    );
}

.hero-content {
  position: relative;
  z-index: 1;
  height: 100%;
  padding-left: clamp(48px, 4.4vw, 78px);
  padding-right: clamp(24px, 4vw, 64px);
  padding-top: clamp(58px, 6.4vh, 82px);
  display: flex;
  flex-direction: column;
}

.brand-mark {
  width: clamp(76px, 5.6vw, 106px);
  height: clamp(76px, 5.6vw, 106px);
  display: grid;
  place-items: center;
  border: 2px solid rgba(255, 153, 112, 0.86);
  border-radius: 24px;
  color: var(--white);
  background: rgba(23, 18, 14, 0.78);
  box-shadow:
    var(--shadow-teal),
    inset 0 0 20px rgba(255, 102, 51, 0.14);
  font-size: clamp(42px, 3.7vw, 64px);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand-word {
  color: var(--white);
  font-size: clamp(20px, 1.7vw, 28px);
  font-weight: 900;
  letter-spacing: -0.01em;
  text-shadow: 0 8px 24px rgba(0, 0, 0, 0.34);
}

.brand-lockup-sidebar {
  gap: 12px;
}

.brand-word-sidebar {
  font-size: 19px;
}

.hero-copy {
  width: min(860px, 56vw);
  margin-top: clamp(76px, 11vh, 126px);
}

.hero-copy h1 {
  margin: 0;
  display: grid;
  gap: clamp(14px, 1.7vh, 22px);
  line-height: 0.96;
  letter-spacing: -0.06em;
}

.hero-copy h1 span {
  display: block;
  white-space: normal;
  font-size: clamp(44px, 4.3vw, 80px);
  font-weight: 900;
  color: var(--white);
  text-shadow: 0 10px 38px rgba(0, 0, 0, 0.36);
}

.hero-copy h1 span::first-letter {
  color: inherit;
  text-shadow: 0 0 28px rgba(255, 102, 51, 0.5);
}

.hero-accent {
  display: inline;
  white-space: nowrap;
  color: var(--teal);
  text-shadow: 0 0 28px rgba(255, 102, 51, 0.5);
}

.hero-rest {
  display: inline;
  white-space: normal;
  color: var(--white);
}

.hero-copy h1 strong {
  display: block;
  white-space: normal;
  color: var(--violet-text);
  font-size: clamp(30px, 2.9vw, 52px);
  font-weight: 500;
  letter-spacing: -0.03em;
  text-shadow: 0 10px 34px rgba(0, 0, 0, 0.32);
}

.hero-description {
  max-width: 580px;
  margin: clamp(34px, 4.2vh, 52px) 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(22px, 1.75vw, 31px);
  line-height: 1.36;
  font-weight: 400;
  text-shadow: 0 8px 28px rgba(0, 0, 0, 0.36);
}

.hero-actions {
  margin-top: clamp(44px, 5.4vh, 68px);
}

.start-button,
.lesson-button {
  min-width: 0;
  min-height: 68px;
  padding: 0 30px 0 36px;
  border: 1px solid rgba(255, 153, 112, 0.72);
  border-radius: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  cursor: pointer;
  color: var(--white);
  background:
    linear-gradient(135deg, rgba(255, 115, 66, 0.94), rgba(199, 70, 20, 0.94));
  box-shadow: none;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.025em;
}

.button-arrow {
  width: auto;
  height: auto;
  border: 0;
  border-radius: 0;
  padding: 0;
  font-size: 30px;
  font-weight: 700;
  line-height: 1;
  transform: translateY(1px);
  opacity: 0.92;
}

/* === Screen 2: situation === */

.situation-screen {
  padding: 18px;
  background:
    radial-gradient(circle at 12% 10%, rgba(255, 102, 51, 0.16), transparent 28%),
    radial-gradient(circle at 84% 18%, rgba(244, 183, 64, 0.12), transparent 32%),
    linear-gradient(135deg, #15110d, #241a12);
  overflow: hidden;
}

.training-sidebar {
  float: left;
  width: 260px;
  height: 100%;
  padding: 28px 20px;
  border-radius: var(--radius-xl);
  background:
    linear-gradient(180deg, rgba(23, 18, 14, 0.98), rgba(15, 12, 9, 0.98)),
    radial-gradient(circle at 20% 12%, rgba(255, 102, 51, 0.16), transparent 28%);
  box-shadow:
    inset 0 0 40px rgba(255, 102, 51, 0.04),
    0 22px 80px rgba(0, 0, 0, 0.24);
}

.sidebar-logo {
  width: 70px;
  height: 70px;
  border-radius: 20px;
  font-size: 40px;
}

.sidebar-section {
  margin-top: 62px;
}

.sidebar-section h2 {
  margin: 0 0 18px;
  font-size: 20px;
  color: rgba(255, 255, 255, 0.95);
}

.step-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.step-item {
  min-height: 54px;
  padding: 0 14px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.step-item.is-current {
  color: #ffffff;
  background: linear-gradient(90deg, rgba(255, 102, 51, 0.44), rgba(199, 70, 20, 0.28));
  border-color: rgba(255, 102, 51, 0.20);
  box-shadow:
    0 0 24px rgba(255, 102, 51, 0.12),
    inset 0 0 18px rgba(255, 102, 51, 0.06);
}

.step-number {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.20);
  color: rgba(255, 255, 255, 0.88);
  font-weight: 800;
  font-size: 14px;
}

.step-item.is-current .step-number {
  border: 0;
  color: #ffffff;
  background: linear-gradient(135deg, #ff8a5c, #e8501f);
  box-shadow: 0 0 18px rgba(255, 102, 51, 0.34);
}

.lesson-panel {
  height: 100%;
  margin-left: 278px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 78% 18%, rgba(255, 102, 51, 0.07), transparent 24%),
    linear-gradient(180deg, #ffffff, #faf6f0);
  box-shadow: 0 24px 90px rgba(0, 0, 0, 0.30);
}

.lesson-header {
  min-height: 110px;
  padding: 26px 40px;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items: start;
}

.lesson-title {
  margin: 0;
  font-size: clamp(28px, 2.1vw, 40px);
  line-height: 1.1;
  font-weight: 900;
  letter-spacing: -0.045em;
}

.lesson-subtitle {
  margin: 8px 0 0;
  color: var(--ink-soft);
  font-size: 18px;
}

.lesson-progress {
  min-width: 260px;
  padding-top: 4px;
}

.progress-label {
  display: block;
  margin-bottom: 12px;
  color: var(--ink);
  font-weight: 800;
  font-size: 16px;
  text-align: right;
}

.progress-steps {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.progress-step {
  width: 44px;
  height: 8px;
  border-radius: 999px;
  background: #e7ddcd;
}

.progress-step.is-active {
  background: linear-gradient(90deg, #ff6633, #d9481c);
  box-shadow: 0 0 10px rgba(255, 102, 51, 0.22);
}

.lesson-body {
  height: calc(100% - 111px);
  padding: 34px 40px 40px;
  display: grid;
  grid-template-columns: minmax(360px, 0.88fr) minmax(420px, 1.12fr);
  gap: 36px;
  align-items: start;
}

.situation-copy h2 {
  margin: 0 0 28px;
  font-size: clamp(50px, 4.2vw, 72px);
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.info-card {
  padding: 22px 24px;
  border: 1px solid rgba(7, 23, 45, 0.06);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-card);
}

.info-card + .info-card {
  margin-top: 16px;
}

.info-card h3 {
  margin: 0 0 10px;
  font-size: 22px;
  line-height: 1.15;
}

.info-card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 17px;
  line-height: 1.55;
}

.info-card ul {
  margin: 0;
  padding-left: 22px;
  color: var(--ink-soft);
  font-size: 17px;
  line-height: 1.55;
}

.info-card li::marker {
  color: var(--teal-strong);
}

.situation-media {
  padding-top: 58px;
}

.employee-card {
  width: 100%;
  margin: 0;
  padding: 18px;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, #eef4fb, #e9f0f9);
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(7, 23, 45, 0.05);
}

.employee-image {
  width: 100%;
  height: 100%;
  max-height: 470px;
  object-fit: contain;
  object-position: center center;
  border-radius: 18px;
}

.lesson-button {
  width: 100%;
  margin-top: 20px;
  min-height: 66px;
  border-radius: 20px;
  font-size: 24px;
}

.lesson-footer {
  display: none;
}

/* === Responsive === */

@media (max-width: 1320px) {
  .lesson-body {
    grid-template-columns: 1fr;
    overflow: auto;
  }

  .situation-media {
    padding-top: 0;
  }

  .employee-image {
    max-height: 520px;
  }
}

@media (max-width: 920px) {
  html,
  body {
    overflow: auto;
  }

  .trainer-app {
    min-height: 100svh;
    height: auto;
  }

  .hero-screen {
    min-height: 100svh;
  }

  .hero-bg {
    background-position: 68% center;
    filter: brightness(1.08) saturate(1.04);
    opacity: 0.74;
  }

  .hero-shade {
    background:
      linear-gradient(
        90deg,
        rgba(3, 16, 29, 0.96) 0%,
        rgba(3, 16, 29, 0.86) 55%,
        rgba(3, 16, 29, 0.42) 100%
      ),
      linear-gradient(
        180deg,
        rgba(3, 16, 29, 0.10),
        rgba(3, 16, 29, 0.58)
      );
  }

  .hero-content {
    min-height: 100svh;
    padding: 34px 28px 42px;
  }

  .hero-copy {
    width: 100%;
    margin-top: 88px;
  }

  .hero-copy h1 span,
  .hero-copy h1 strong {
    white-space: normal;
  }

  .situation-screen {
    min-height: 100svh;
    height: auto;
    overflow: visible;
    padding: 12px;
  }

  .training-sidebar {
    float: none;
    width: 100%;
    height: auto;
    padding: 18px;
    border-radius: 24px;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 18px;
    align-items: start;
  }

  .sidebar-logo {
    width: 68px;
    height: 68px;
    border-radius: 18px;
    font-size: 40px;
  }

  .sidebar-section {
    margin-top: 0;
  }

  .sidebar-section h2 {
    margin-bottom: 12px;
  }

  .step-list {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .step-item {
    min-width: max-content;
    min-height: 46px;
    padding: 0 12px;
    font-size: 15px;
    border-radius: 16px;
  }

  .step-number {
    width: 30px;
    height: 30px;
    flex-basis: 30px;
    font-size: 13px;
  }

  .lesson-panel {
    height: auto;
    margin: 12px 0 0;
    border-radius: 24px;
  }

  .lesson-header {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 22px;
  }

  .lesson-progress {
    min-width: 0;
  }

  .progress-label {
    text-align: left;
  }

  .progress-steps {
    justify-content: flex-start;
  }

  .lesson-body {
    height: auto;
    overflow: visible;
    padding: 24px;
  }

  .situation-copy h2 {
    font-size: 44px;
  }

  .employee-image {
    max-height: 460px;
  }
}

@media (max-width: 560px) {
  .training-sidebar {
    grid-template-columns: 1fr;
  }

  .lesson-title {
    font-size: 26px;
  }

  .lesson-body {
    padding: 20px;
  }

  .situation-copy h2 {
    font-size: 38px;
  }

  .info-card {
    padding: 20px;
    border-radius: 20px;
  }

  .employee-card {
    padding: 12px;
  }

  .employee-image {
    max-height: 360px;
    border-radius: 14px;
  }

  .start-button,
  .lesson-button {
    width: 100%;
    min-height: 64px;
    padding: 0 28px;
    font-size: 22px;
  }
}

/* === Exact alignment: image top/bottom equals cards stack top/bottom === */

.lesson-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(360px, 31vw, 455px);
  grid-template-rows: auto auto auto;
  column-gap: clamp(32px, 3.2vw, 52px);
  row-gap: 0;
  align-items: start;
  min-width: 0;
}

.situation-copy {
  display: contents;
}

.situation-copy h2 {
  grid-column: 1;
  grid-row: 1;
  margin: 0 0 28px;
}

.situation-cards {
  grid-column: 1;
  grid-row: 2;
  display: grid;
  gap: 14px;
  align-self: stretch;
  min-width: 0;
}

.situation-cards .info-card {
  margin: 0;
  padding: 24px 28px;
  border-radius: 24px;
}

.situation-cards .info-card + .info-card {
  margin-top: 0;
}

.situation-cards .info-card h3 {
  margin: 0 0 10px;
  font-size: 26px;
}

.situation-cards .info-card p,
.situation-cards .info-card ul {
  font-size: 19px;
  line-height: 1.5;
}

.situation-cards .info-card ul {
  padding-left: 20px;
}

.situation-media {
  display: contents;
  min-width: 0;
}

.employee-card {
  grid-column: 2;
  grid-row: 2;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 26px;
  overflow: hidden;
  background: transparent;
  box-shadow: none;
  align-self: stretch;
}

.employee-image {
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: cover;
  object-position: center top;
  border-radius: 26px;
  box-shadow: 0 18px 46px rgba(15, 32, 58, 0.14);
}

.lesson-button {
  grid-column: 2;
  grid-row: 3;
  width: 100%;
  max-width: none;
  min-height: 58px;
  margin-top: 18px;
  padding: 0 24px;
  border-radius: 19px;
  font-size: 21px;
}

@media (min-width: 1321px) and (max-height: 900px) {
  .situation-screen .lesson-header {
    min-height: 96px;
    padding: 22px 32px;
  }

  .situation-screen .lesson-title {
    font-size: clamp(28px, 2vw, 34px);
  }

  .situation-screen .lesson-subtitle {
    margin-top: 6px;
    font-size: 16px;
  }

  .situation-screen .lesson-body {
    height: calc(100% - 97px);
    padding: 24px 30px 26px;
    grid-template-columns: minmax(0, 1fr) clamp(330px, 28vw, 400px);
    column-gap: clamp(24px, 2.4vw, 36px);
    overflow-x: hidden;
    overflow-y: auto;
  }

  .situation-screen .situation-copy h2 {
    margin-bottom: 16px;
    font-size: clamp(42px, 3.4vw, 54px);
  }

  .situation-screen .situation-cards {
    gap: 10px;
  }

  .situation-screen .situation-cards .info-card {
    padding: 16px 20px;
    border-radius: 20px;
  }

  .situation-screen .situation-cards .info-card h3 {
    margin-bottom: 8px;
    font-size: 21px;
  }

  .situation-screen .situation-cards .info-card p,
  .situation-screen .situation-cards .info-card ul {
    font-size: 16px;
    line-height: 1.4;
  }

  .situation-screen .lesson-button {
    min-height: 52px;
    margin-top: 12px;
    padding: 0 18px;
    border-radius: 17px;
    font-size: 19px;
  }
}

/* Keep stacked layout on smaller screens */
@media (max-width: 1320px) {
  .lesson-body {
    grid-template-columns: minmax(0, 1fr) clamp(240px, 28vw, 340px);
    grid-template-rows: auto auto auto;
    column-gap: 24px;
    row-gap: 0;
    padding: 24px 28px 28px;
    overflow-x: hidden;
    overflow-y: auto;
  }

  .situation-copy {
    display: contents;
  }

  .situation-copy h2 {
    margin-bottom: 16px;
    font-size: clamp(40px, 4.2vw, 48px);
  }

  .situation-cards {
    display: grid;
    gap: 10px;
  }

  .situation-cards .info-card {
    padding: 16px 18px;
    border-radius: 20px;
  }

  .situation-cards .info-card h3 {
    margin-bottom: 8px;
    font-size: 20px;
  }

  .situation-cards .info-card p,
  .situation-cards .info-card ul {
    font-size: 16px;
    line-height: 1.4;
  }

  .situation-media {
    display: contents;
    width: auto;
    justify-self: auto;
  }

  .employee-card {
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
  }

  .employee-image {
    height: 100%;
    object-fit: cover;
  }

  .lesson-button {
    width: 100%;
    min-height: 52px;
    margin-top: 12px;
    padding: 0 18px;
    border-radius: 17px;
    font-size: 18px;
  }
}

@media (min-width: 921px) and (max-width: 1320px) {
  .situation-screen .lesson-header {
    min-height: 96px;
    padding: 22px 32px;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
  }

  .situation-screen .lesson-title {
    font-size: clamp(28px, 2.8vw, 34px);
  }

  .situation-screen .lesson-subtitle {
    margin-top: 6px;
    font-size: 16px;
  }

  .situation-screen .lesson-body {
    height: calc(100% - 97px);
  }

  .situation-screen .lesson-progress {
    min-width: 180px;
  }

  .situation-screen .progress-label {
    margin-bottom: 8px;
    font-size: 13px;
  }

  .situation-screen .progress-steps {
    gap: 6px;
  }

  .situation-screen .progress-step {
    width: 32px;
  }
}

@media (max-width: 920px) {
  .employee-card {
    aspect-ratio: auto;
  }

  .employee-image {
    height: auto;
    max-height: 480px;
    object-fit: contain;
  }
}

/* === Mobile responsive polish: hero visibility + vertical steps === */

@media (max-width: 920px) {
  html,
  body {
    overflow-x: hidden;
    overflow-y: auto;
    background: #eef4fb;
  }

  .trainer-app {
    width: 100%;
    min-height: 100svh;
    height: auto;
    overflow-x: hidden;
  }

  /* Screen 1 mobile: make characters more visible */
  .hero-screen {
    min-height: 100svh;
  }

  .hero-bg {
    opacity: 1;
    background-size: auto 100%;
    background-position: 61% center;
    filter: brightness(1.22) saturate(1.08);
    transform: scale(1.01);
  }

  .hero-shade {
    background:
      linear-gradient(
        90deg,
        rgba(3, 16, 29, 0.92) 0%,
        rgba(3, 16, 29, 0.78) 42%,
        rgba(3, 16, 29, 0.48) 68%,
        rgba(3, 16, 29, 0.28) 100%
      ),
      linear-gradient(
        180deg,
        rgba(3, 16, 29, 0.10) 0%,
        rgba(3, 16, 29, 0.12) 48%,
        rgba(3, 16, 29, 0.58) 100%
      );
  }

  .hero-content {
    min-height: 100svh;
    padding: 34px 28px 42px;
  }

  .hero-copy {
    width: 100%;
    margin-top: clamp(88px, 13vh, 150px);
  }

  .hero-copy h1 {
    gap: 12px;
  }

  .hero-copy h1 span {
    white-space: normal;
    font-size: clamp(48px, 12.6vw, 68px);
    line-height: 0.98;
  }

  .hero-copy h1 strong {
    white-space: normal;
    font-size: clamp(39px, 10.2vw, 56px);
    line-height: 1.02;
  }

  .hero-description {
    max-width: 92%;
    font-size: clamp(23px, 6vw, 31px);
    line-height: 1.32;
  }

  .start-button {
    width: 100%;
    max-width: 520px;
    min-height: 72px;
  }

  /* Screen 2 mobile: steps must be vertical, not horizontal */
  .situation-screen {
    width: 100%;
    min-height: 100svh;
    height: auto;
    padding: 12px;
    overflow: visible;
  }

  .training-sidebar {
    float: none;
    width: 100%;
    height: auto;
    padding: 22px;
    border-radius: 24px;
    display: block;
  }

  .sidebar-logo {
    width: 74px;
    height: 74px;
    border-radius: 20px;
    font-size: 42px;
  }

  .sidebar-section {
    margin-top: 26px;
  }

  .sidebar-section h2 {
    margin: 0 0 16px;
    font-size: 22px;
  }

  .step-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    overflow: visible;
    padding-bottom: 0;
  }

  .step-item {
    width: 100%;
    min-width: 0;
    min-height: 50px;
    padding: 0 14px;
    border-radius: 17px;
    font-size: 16px;
    white-space: normal;
  }

  .step-number {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    font-size: 14px;
  }

  .lesson-panel {
    width: 100%;
    margin: 12px 0 0;
    border-radius: 24px;
    overflow: hidden;
  }

  .lesson-header {
    padding: 24px;
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .lesson-title {
    font-size: clamp(27px, 7vw, 36px);
    line-height: 1.06;
  }

  .lesson-subtitle {
    font-size: 18px;
  }

  .lesson-progress {
    width: 100%;
    min-width: 0;
  }

  .progress-label {
    text-align: left;
  }

  .progress-steps {
    justify-content: flex-start;
  }

  .progress-step {
    flex: 1;
    max-width: 58px;
  }

  .lesson-body {
    height: auto;
    padding: 24px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    overflow: visible;
  }

  .situation-copy {
    display: block;
  }

  .situation-copy h2 {
    margin: 0 0 26px;
    font-size: clamp(46px, 10vw, 62px);
  }

  .situation-cards {
    display: grid;
    gap: 14px;
  }

  .situation-cards .info-card {
    padding: 24px;
    border-radius: 22px;
  }

  .situation-cards .info-card h3 {
    font-size: 25px;
  }

  .situation-cards .info-card p,
  .situation-cards .info-card ul {
    font-size: 18px;
    line-height: 1.5;
  }

  .situation-media {
    display: block;
    width: 100%;
  }

  .employee-card {
    width: 100%;
    height: auto;
    aspect-ratio: auto;
  }

  .employee-image {
    width: 100%;
    height: auto;
    max-height: none;
    object-fit: contain;
    object-position: center top;
    border-radius: 22px;
  }

  .lesson-button {
    width: 100%;
    min-height: 64px;
    margin-top: 18px;
    font-size: 21px;
  }
}

@media (max-width: 560px) {
  .hero-content {
    padding: 32px 24px 38px;
  }

  .hero-bg {
    background-position: 63% center;
    filter: brightness(1.24) saturate(1.08);
  }

  .hero-copy {
    margin-top: clamp(92px, 13vh, 140px);
  }

  .hero-description {
    max-width: 100%;
  }

  .training-sidebar {
    padding: 20px;
  }

  .lesson-header {
    padding: 22px;
  }

  .lesson-body {
    padding: 20px;
  }

  .situation-cards .info-card {
    padding: 22px;
  }

  .situation-cards .info-card p,
  .situation-cards .info-card ul {
    font-size: 17px;
  }
}

/* === Screen 3: rules === */

.rules-screen {
  padding: 18px;
  background:
    radial-gradient(circle at 12% 10%, rgba(255, 102, 51, 0.16), transparent 28%),
    radial-gradient(circle at 84% 18%, rgba(244, 183, 64, 0.12), transparent 32%),
    linear-gradient(135deg, #020b16, #08253a);
  overflow: hidden;
}

.step-item.is-done {
  color: rgba(255, 255, 255, 0.92);
  background: rgba(255, 102, 51, 0.08);
  border-color: rgba(255, 102, 51, 0.14);
}

.step-item.is-done .step-number {
  border: 0;
  color: #241a12;
  background: rgba(255, 153, 112, 0.92);
}

.step-item[data-target] {
  user-select: none;
}

.step-item.is-available {
  cursor: pointer;
}

.step-item.is-available:hover {
  background: linear-gradient(90deg, rgba(255, 102, 51, 0.22), rgba(199, 70, 20, 0.16));
  border-color: rgba(255, 102, 51, 0.20);
}

.step-item.is-current.is-available:hover {
  background: linear-gradient(90deg, rgba(255, 102, 51, 0.48), rgba(199, 70, 20, 0.30));
}

.step-item:not(.is-available) {
  cursor: default;
  opacity: 0.72;
}

.step-item:not(.is-available):hover {
  background: rgba(255, 255, 255, 0.02);
}

.step-item.is-done.is-available {
  opacity: 0.94;
}

.step-item.is-done.is-available:hover {
  opacity: 1;
}

.rules-panel {
  background:
    radial-gradient(circle at 82% 20%, rgba(255, 102, 51, 0.08), transparent 24%),
    linear-gradient(180deg, #ffffff, #f4f7fc);
}

.rules-content {
  position: static;
  height: calc(100% - 111px);
  padding: 24px 28px 22px;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 18px;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
}

.rules-heading {
  max-width: 840px;
}

.section-kicker {
  width: fit-content;
  margin: 0 0 18px;
  padding: 8px 14px;
  border-radius: 999px;
  color: #b84a1c;
  background: rgba(255, 102, 51, 0.14);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.rules-heading h2 {
  margin: 10px 0 0;
  color: var(--ink);
  font-size: clamp(44px, 3.8vw, 64px);
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.rules-heading p {
  max-width: 840px;
  margin: 16px 0 0;
  color: var(--ink-soft);
  font-size: 19px;
  line-height: 1.42;
}

.rules-body {
  min-height: 0;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(330px, 28vw, 420px);
  grid-template-rows: auto auto auto;
  column-gap: 42px;
  row-gap: 10px;
  align-items: start;
  overflow: visible;
  padding: 0;
  height: auto;
}

.rules-path {
  grid-column: 1;
  grid-row: 1 / span 3;
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 22px;
  align-content: start;
}

.rules-path::before {
  content: none;
}

.rule-step {
  position: relative;
  min-height: 132px;
  padding: 24px 24px 22px 78px;
  border: 1px solid rgba(7, 23, 45, 0.06);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(250, 252, 255, 0.94));
  box-shadow: 0 16px 38px rgba(15, 32, 58, 0.08);
}

.rule-step::after {
  content: "";
  position: absolute;
  inset: auto 24px 0 78px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 102, 51, 0.55), rgba(244, 183, 64, 0.25));
  opacity: 0.75;
}

.rule-number {
  position: absolute;
  left: 24px;
  top: 24px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  background: linear-gradient(135deg, #ff8a5c, #e8501f);
  box-shadow: 0 0 20px rgba(255, 102, 51, 0.28);
  font-weight: 900;
}

.rule-step h3 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 24px;
  line-height: 1.12;
}

.rule-step p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 17px;
  line-height: 1.42;
}

.rules-mentor-card {
  display: contents;
}

.mentor-note {
  grid-column: 2;
  grid-row: 1;
  align-self: start;
  position: relative;
  padding: 0 0 0 16px;
  border: 0;
  border-left: 4px solid rgba(255, 102, 51, 0.82);
  border-radius: 0;
  background: none;
  backdrop-filter: none;
}

.mentor-note::before {
  content: "ВАЖНО";
  display: inline-flex;
  width: fit-content;
  margin-bottom: 10px;
  padding: 5px 10px;
  border-radius: 999px;
  color: #b84a1c;
  background: rgba(255, 102, 51, 0.16);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.mentor-note h3 {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 22px;
  line-height: 1.08;
  font-weight: 900;
}

.mentor-note p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.38;
}

.rules-mentor-image {
  grid-column: 2;
  grid-row: 2;
  align-self: start;
  justify-self: center;
  width: 380px;
  max-width: 100%;
  height: auto;
  margin: 8px 0 0;
  object-fit: contain;
  object-position: center bottom;
  border-radius: 20px;
}

.rules-next-button {
  grid-column: 2;
  grid-row: 3;
  position: static;
  right: auto;
  bottom: auto;
  z-index: auto;
  width: 100%;
  min-height: 52px;
  margin: 0;
  padding: 0 20px;
  border-radius: 20px;
  border-color: rgba(255, 153, 112, 0.96);
  background: linear-gradient(135deg, #ff7340 0%, #c74614 100%);
  font-size: 21px;
  line-height: 1.1;
  white-space: normal;
}

@media (min-width: 1321px) and (max-height: 900px) {
  .rules-screen .lesson-header {
    min-height: 96px;
    padding: 22px 32px;
  }

  .rules-screen .lesson-title {
    font-size: clamp(28px, 2vw, 34px);
  }

  .rules-screen .lesson-subtitle {
    margin-top: 6px;
    font-size: 16px;
  }

  .rules-content {
    height: calc(100% - 97px);
    padding: 18px 24px 18px;
    gap: 12px;
  }

  .rules-heading h2 {
    margin-top: 8px;
    font-size: clamp(40px, 3.2vw, 52px);
  }

  .rules-heading p {
    margin-top: 10px;
    font-size: 16px;
    line-height: 1.34;
  }

  .rules-heading .section-kicker {
    margin-bottom: 10px;
    padding: 6px 12px;
    font-size: 12px;
  }

  .rules-body {
    grid-template-columns: minmax(0, 1fr) clamp(300px, 27vw, 370px);
    grid-template-rows: auto auto auto;
    column-gap: 28px;
    row-gap: 6px;
  }

  .rules-path {
    gap: 10px 14px;
  }

  .rule-step {
    min-height: 0;
    padding: 15px 16px 14px 58px;
    border-radius: 20px;
  }

  .rule-step::after {
    inset: auto 16px 0 58px;
  }

  .rule-number {
    left: 16px;
    top: 16px;
    width: 32px;
    height: 32px;
    font-size: 14px;
  }

  .rule-step h3 {
    margin-bottom: 6px;
    font-size: 18px;
  }

  .rule-step p {
    font-size: 13.5px;
    line-height: 1.3;
  }

  .mentor-note h3 {
    font-size: 18px;
  }

  .mentor-note p {
    font-size: 14px;
    line-height: 1.28;
  }

  .rules-mentor-image {
    width: 235px;
    margin: 6px 0 0;
  }

  .rules-next-button {
    min-height: 48px;
    border-radius: 17px;
    font-size: 18px;
  }
}

@media (max-width: 1320px) {
  .rules-content {
    height: calc(100% - 111px);
    padding: 22px 26px 24px;
    overflow-x: hidden;
    overflow-y: auto;
  }

  .rules-body {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    row-gap: 24px;
    overflow: visible;
    height: auto;
  }

  .rules-path {
    grid-column: auto;
    grid-row: auto;
    grid-template-columns: 1fr;
  }

  .rules-mentor-card {
    display: block;
    width: min(100%, 420px);
    margin: 0 auto;
  }

  .mentor-note,
  .rules-mentor-image,
  .rules-next-button {
    grid-column: auto;
    grid-row: auto;
  }

  .rules-mentor-image {
    width: 180px;
    margin: 12px auto 0;
  }

  .rules-next-button {
    width: min(100%, 420px);
    margin: 16px auto 0;
    min-height: 58px;
    font-size: 18px;
  }
}

@media (min-width: 921px) and (max-width: 1320px) {
  .rules-content {
    grid-template-rows: auto 1fr;
    gap: 14px;
  }

  .rules-heading h2 {
    margin-top: 8px;
    font-size: clamp(38px, 4vw, 50px);
  }

  .rules-heading p {
    margin-top: 10px;
    font-size: 16px;
    line-height: 1.34;
  }

  .rules-heading .section-kicker {
    margin-bottom: 10px;
    padding: 6px 12px;
    font-size: 12px;
  }

  .rules-body {
    grid-template-columns: minmax(0, 1fr) clamp(190px, 24vw, 280px);
    grid-template-rows: auto auto auto;
    column-gap: 18px;
    row-gap: 8px;
    overflow: visible;
  }

  .rules-path {
    grid-column: 1;
    grid-row: 1 / span 3;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 12px;
  }

  .rule-step {
    min-height: 0;
    padding: 14px 14px 13px 52px;
    border-radius: 18px;
  }

  .rule-step::after {
    inset: auto 14px 0 52px;
  }

  .rule-number {
    left: 14px;
    top: 14px;
    width: 30px;
    height: 30px;
    font-size: 13px;
  }

  .rule-step h3 {
    margin-bottom: 5px;
    font-size: 17px;
  }

  .rule-step p {
    font-size: 13px;
    line-height: 1.3;
  }

  .rules-mentor-card {
    display: contents;
    width: auto;
    margin: 0;
  }

  .mentor-note,
  .rules-mentor-image,
  .rules-next-button {
    grid-column: 2;
  }

  .mentor-note {
    grid-row: 1;
    padding-left: 12px;
  }

  .mentor-note::before {
    margin-bottom: 8px;
    padding: 4px 8px;
    font-size: 11px;
  }

  .mentor-note h3 {
    margin-bottom: 8px;
    font-size: 17px;
  }

  .mentor-note p {
    font-size: 13px;
    line-height: 1.3;
  }

  .rules-mentor-image {
    grid-row: 2;
    width: min(100%, 176px);
    margin: 8px auto 0;
  }

  .rules-next-button {
    grid-row: 3;
    width: 100%;
    min-height: 48px;
    margin: 8px 0 0;
    border-radius: 17px;
    font-size: 16px;
  }
}

@media (min-width: 921px) and (max-width: 1100px) {
  .rules-panel {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
  }

  .rules-screen .lesson-header {
    min-height: 96px;
    padding: 22px 32px;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
  }

  .rules-screen .lesson-title {
    font-size: clamp(28px, 3vw, 34px);
  }

  .rules-screen .lesson-subtitle {
    margin-top: 6px;
    font-size: 16px;
  }

  .rules-screen .lesson-progress {
    min-width: 180px;
  }

  .rules-screen .progress-label {
    margin-bottom: 8px;
    font-size: 13px;
  }

  .rules-screen .progress-steps {
    gap: 6px;
  }

  .rules-screen .progress-step {
    width: 32px;
  }

  .rules-content {
    height: auto;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 10px;
    padding: 16px 18px 18px;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
  }

  .rules-heading h2 {
    margin-top: 6px;
    font-size: clamp(34px, 3.8vw, 42px);
  }

  .rules-heading p {
    margin-top: 8px;
    font-size: 15px;
    line-height: 1.3;
  }

  .rules-body {
    min-height: 0;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto;
    row-gap: 10px;
    overflow: visible;
  }

  .rules-path {
    grid-column: 1;
    grid-row: 1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 10px;
  }

  .rule-step {
    padding: 12px 12px 12px 48px;
  }

  .rule-step::after {
    inset: auto 12px 0 48px;
  }

  .rule-number {
    left: 12px;
    top: 12px;
    width: 28px;
    height: 28px;
    font-size: 12px;
  }

  .rule-step h3 {
    font-size: 16px;
  }

  .rule-step p {
    font-size: 12.5px;
    line-height: 1.28;
  }

  .rules-mentor-card {
    grid-column: 1;
    grid-row: 2;
    display: grid;
    width: 100%;
    margin: 0;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    gap: 8px 14px;
    align-items: center;
  }

  .mentor-note {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
    padding-left: 10px;
  }

  .mentor-note::before {
    margin-bottom: 6px;
  }

  .mentor-note h3 {
    margin-bottom: 6px;
    font-size: 16px;
  }

  .mentor-note p {
    font-size: 12.5px;
    line-height: 1.28;
  }

  .rules-mentor-image {
    grid-column: 2;
    grid-row: 1;
    width: 112px;
    margin: 0;
  }

  .rules-next-button {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    min-height: 46px;
    margin: 0;
  }
}

@media (max-width: 920px) {
  .rules-screen {
    min-height: 100svh;
    height: auto;
    overflow: visible;
    padding: 12px;
  }

  .rules-content {
    padding: 24px;
  }

  .rules-heading h2 {
    font-size: clamp(42px, 10vw, 58px);
  }

  .rules-heading p {
    font-size: 18px;
  }

  .rule-step {
    min-height: auto;
    padding: 20px 20px 20px 68px;
    border-radius: 22px;
  }

  .rule-number {
    left: 20px;
    top: 20px;
  }

  .mentor-note {
    padding-left: 16px;
  }

  .mentor-note h3 {
    font-size: 24px;
  }

  .mentor-note p {
    font-size: 16px;
  }
}

@media (max-width: 560px) {
  .rules-content {
    padding: 20px 20px 28px;
  }

  .section-kicker {
    font-size: 12px;
  }

  .rule-step h3 {
    font-size: 20px;
  }

  .rule-step p {
    font-size: 15px;
  }

  .mentor-note h3 {
    font-size: 22px;
  }

  .rules-next-button {
    min-height: 54px;
  }
}

/* === Hero title final override === */

.hero-copy h1 > span {
  display: block;
  white-space: normal;
  color: var(--white);
}

.hero-copy h1 > span .hero-accent {
  display: inline;
  white-space: nowrap;
  color: var(--teal);
}

.hero-copy h1 > span .hero-rest {
  display: inline;
  white-space: normal;
  color: var(--white);
}

@media (max-width: 920px) {
  .hero-copy h1 > span {
    white-space: normal;
  }
}

/* === Screens 4-6 scaffold === */

.mode-screen,
.dialog-screen,
.result-screen {
  padding: 18px;
  background:
    radial-gradient(circle at 12% 10%, rgba(255, 102, 51, 0.16), transparent 28%),
    radial-gradient(circle at 84% 18%, rgba(244, 183, 64, 0.12), transparent 32%),
    linear-gradient(135deg, #020b16, #08253a);
  overflow: hidden;
}

.mode-content,
.dialog-content,
.result-content {
  height: calc(100% - 111px);
  padding: 28px 32px 28px;
  min-height: 0;
  min-width: 0;
  overflow-x: hidden;
  overflow-y: auto;
}

.mode-copy,
.dialog-copy {
  max-width: 860px;
  margin-bottom: 22px;
}

.mode-copy h2,
.dialog-copy h2,
.result-main h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(44px, 3.8vw, 64px);
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.mode-copy p:last-child,
.dialog-copy p:last-child {
  max-width: 860px;
  margin: 16px 0 0;
  color: var(--ink-soft);
  font-size: 19px;
  line-height: 1.42;
}

.mode-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.mode-card,
.dialog-option,
.dialog-quote,
.result-status {
  border: 1px solid rgba(7, 23, 45, 0.06);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(250, 252, 255, 0.94));
  box-shadow: 0 16px 38px rgba(15, 32, 58, 0.08);
}

.mode-card,
.dialog-option {
  padding: 24px;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.mode-card:hover,
.dialog-option:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 102, 51, 0.28);
  box-shadow: 0 18px 42px rgba(15, 32, 58, 0.10);
}

.mode-card:focus-visible,
.dialog-option:focus-visible {
  outline: 2px solid rgba(255, 102, 51, 0.65);
  outline-offset: 2px;
}

.mode-card.is-selected,
.dialog-option.is-selected {
  border-color: rgba(255, 102, 51, 0.34);
  background: linear-gradient(180deg, rgba(255, 246, 238, 0.98), rgba(250, 252, 255, 0.96));
  box-shadow: 0 18px 42px rgba(15, 32, 58, 0.11);
}

.mode-card h3,
.dialog-option h3,
.dialog-quote h3,
.result-status strong {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 24px;
  line-height: 1.08;
}

.mode-card p,
.dialog-option p,
.dialog-quote p,
.result-status p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 17px;
  line-height: 1.5;
}

.mode-footer,
.dialog-footer {
  margin-top: 24px;
  display: flex;
  justify-content: flex-end;
}

.dialog-footer .lesson-button {
  width: min(100%, 380px);
  margin-top: 0;
  border-color: rgba(255, 153, 112, 0.96);
  background: linear-gradient(135deg, #ff7340 0%, #c74614 100%);
}

.dialog-content {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(360px, 1.05fr);
  gap: 28px;
}

.dialog-quote {
  padding: 24px;
}

.dialog-options {
  display: grid;
  gap: 16px;
  align-content: start;
}

.result-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 30px;
}

.result-main {
  min-width: 0;
}

.result-main .section-kicker {
  margin-bottom: 18px;
}

.result-grid {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.result-side {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 18px;
}

.result-employee-card {
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.result-image {
  max-height: 360px;
  object-fit: contain;
  object-position: center bottom;
}

@media (max-width: 1320px) {
  .mode-content,
  .dialog-content,
  .result-content {
    height: calc(100% - 111px);
    overflow-x: hidden;
    overflow-y: auto;
  }

  .mode-grid,
  .dialog-content,
  .result-content,
  .result-grid {
    grid-template-columns: 1fr;
  }

  .result-side,
  .mode-footer,
  .dialog-footer {
    justify-content: flex-start;
  }
}

/* === Mode screen final === */

.mode-panel {
  background:
    radial-gradient(circle at 82% 20%, rgba(255, 102, 51, 0.08), transparent 24%),
    linear-gradient(180deg, #ffffff, #f4f7fc);
}

.mode-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 22px;
}

.mode-copy {
  max-width: none;
  margin: 0;
  text-align: center;
}

.mode-copy h2 {
  font-size: clamp(50px, 4.2vw, 72px);
}

.mode-copy p:last-child {
  margin-top: 14px;
}

.mode-grid {
  gap: 24px;
}

.mode-card {
  position: relative;
  min-height: 400px;
  padding: 26px 26px 22px;
  border: 1.5px solid rgba(7, 23, 45, 0.08);
  border-radius: 30px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(250, 252, 255, 0.94));
}

.mode-card.is-selected {
  border-color: rgba(255, 102, 51, 0.75);
  box-shadow:
    0 18px 42px rgba(15, 32, 58, 0.11),
    0 0 0 1px rgba(255, 102, 51, 0.20) inset;
}

.mode-card-indicators {
  position: absolute;
  inset: 22px 22px auto 22px;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
}

.mode-card-check {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid rgba(116, 129, 149, 0.35);
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(15, 32, 58, 0.06);
}

.mode-card.is-selected .mode-card-check {
  border-color: rgba(255, 102, 51, 0.75);
}

.mode-card.is-selected .mode-card-check-right {
  position: relative;
  background: linear-gradient(135deg, #ff8a5c, #e8501f);
  border-color: rgba(255, 102, 51, 0.85);
}

.mode-card.is-selected .mode-card-check-right::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 8px;
  height: 14px;
  border-right: 3px solid #ffffff;
  border-bottom: 3px solid #ffffff;
  transform: translate(-50%, -58%) rotate(45deg);
}

.mode-card-copy {
  position: relative;
  z-index: 1;
  max-width: 290px;
  margin-top: 24px;
}

.mode-card-copy h3 {
  font-size: 26px;
  margin-bottom: 12px;
}

.mode-card-copy p {
  font-size: 19px;
  line-height: 1.46;
}

.mode-card-media {
  position: absolute;
  inset: auto 0 0;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  min-height: 220px;
  padding: 0 20px 0;
}

.mode-card-media::before {
  content: "";
  position: absolute;
  inset: auto 50% 0;
  width: 280px;
  height: 280px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 102, 51, 0.16), rgba(255, 102, 51, 0.03) 62%, transparent 70%);
}

.mode-card[data-mode="hard"] .mode-card-media::before {
  background: radial-gradient(circle, rgba(244, 183, 64, 0.18), rgba(244, 183, 64, 0.04) 62%, transparent 70%);
}

.mode-card-image {
  position: relative;
  z-index: 1;
  width: min(100%, 250px);
  height: auto;
  object-fit: contain;
  border-radius: 24px;
}

.mentor-toggle-card {
  padding: 20px 22px;
  border: 1px solid rgba(7, 23, 45, 0.06);
  border-radius: 24px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(250, 252, 255, 0.94));
  box-shadow: 0 16px 38px rgba(15, 32, 58, 0.08);
}

.mentor-toggle-copy h3 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 24px;
  line-height: 1.08;
}

.mentor-toggle-copy p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 17px;
  line-height: 1.45;
}

.mentor-toggle {
  width: 72px;
  height: 40px;
  padding: 4px;
  border: 0;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  cursor: pointer;
  background: #d8e2ef;
  transition: background 0.18s ease;
}

.mentor-toggle.is-on {
  background: linear-gradient(135deg, #ff8a5c, #e8501f);
}

.mentor-toggle-thumb {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 6px 16px rgba(15, 32, 58, 0.18);
  transition: transform 0.18s ease;
}

.mentor-toggle.is-on .mentor-toggle-thumb {
  transform: translateX(32px);
}

@media (max-width: 1320px) {
  .mode-content {
    height: calc(100% - 111px);
    overflow-x: hidden;
    overflow-y: auto;
    justify-content: center;
  }

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

  .mode-card {
    min-height: 300px;
  }
}

@media (max-width: 920px) {
  .mode-content,
  .dialog-content,
  .result-content {
    height: auto;
    overflow: visible;
  }

  .mode-copy {
    text-align: left;
  }

  .mode-card {
    min-height: 330px;
    padding: 22px 20px 18px;
  }

  .mode-card-copy {
    max-width: none;
    margin-top: 18px;
  }

  .mode-card-copy p {
    font-size: 17px;
  }

  .mode-card-media {
    min-height: 190px;
  }

  .mode-card-media::before {
    width: 230px;
    height: 230px;
  }

  .mentor-toggle-card {
    grid-template-columns: 1fr;
  }

  .mentor-toggle {
    justify-self: start;
  }

  .mode-footer .lesson-button {
    width: 100%;
  }
}

/* === Mode screen polish === */

.mode-content {
  justify-content: center;
  gap: clamp(16px, 2vh, 24px);
  padding-top: 28px;
  padding-bottom: 28px;
}

.mode-copy {
  margin: 0 auto;
  text-align: center;
}

.mode-copy h2 {
  margin-bottom: 10px;
}

.mode-copy p:last-child {
  max-width: 760px;
  margin: 0 auto;
}

.mode-grid {
  align-items: stretch;
  gap: 22px;
}

.mode-card {
  min-height: clamp(340px, 36vh, 390px);
  padding: 28px 30px 18px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  align-content: start;
}

.mode-card-indicators {
  inset: 22px 22px auto 22px;
  justify-content: flex-end;
}

.mode-card-check-left {
  display: none;
}

.mode-card-copy {
  max-width: 400px;
  margin-top: 0;
  padding-top: 6px;
  padding-left: 8px;
}

.mode-card-copy h3 {
  margin-bottom: 12px;
}

.mode-card-copy p {
  margin: 0;
  white-space: normal;
}

.mode-card-media {
  position: relative;
  inset: auto;
  min-height: clamp(220px, 26vh, 285px);
  margin-top: 0;
  padding: 0;
}

.mode-card-media::before {
  inset: auto auto 0 50%;
  width: clamp(280px, 26vw, 390px);
  height: clamp(280px, 26vw, 390px);
}

.mode-card-image {
  width: min(100%, clamp(280px, 28vw, 430px));
  height: auto;
}

.mentor-toggle-card {
  margin-top: 0;
}

.mode-footer {
  margin-top: 6px;
  padding-top: 0;
  justify-content: center;
}

.mode-footer .lesson-button {
  width: min(100%, 520px);
  margin-top: 0;
}

@media (min-width: 921px) {
  .mode-card-copy {
    padding-left: 2px;
  }

  .mode-card {
    padding-left: 24px;
    padding-right: 24px;
  }

  .mode-card-copy p {
    max-width: none;
    white-space: nowrap;
    font-size: clamp(13px, 1.25vw, 19px);
  }

  .mode-card-media {
    margin-top: 22px;
  }

  .mode-card-image {
    width: min(66%, 620px);
    max-width: 620px;
    height: auto;
    margin: 0 auto;
  }
}

@media (max-width: 1320px) {
  .mode-content {
    justify-content: center;
  }

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

  .mode-card {
    min-height: 300px;
  }
}

@media (min-width: 921px) and (max-width: 1320px) {
  .mode-content {
    padding: 22px 26px 24px;
    gap: 14px;
  }

  .mode-copy h2 {
    font-size: clamp(40px, 4vw, 54px);
  }

  .mode-copy p:last-child {
    font-size: 16px;
    line-height: 1.34;
  }

  .mode-grid {
    gap: 18px;
  }

  .mode-card {
    min-height: 276px;
    padding: 20px 20px 12px;
    border-radius: 24px;
  }

  .mode-card-copy {
    max-width: none;
    padding-top: 2px;
    padding-left: 2px;
  }

  .mode-card-copy h3 {
    margin-bottom: 8px;
    font-size: 21px;
  }

  .mode-card-copy p {
    font-size: 15px;
    line-height: 1.34;
  }

  .mode-card-media {
    min-height: 164px;
  }

  .mode-card-media::before {
    width: 214px;
    height: 214px;
  }

  .mode-card-image {
    width: min(100%, 224px);
    max-height: 176px;
  }

  .mentor-toggle-card {
    padding: 16px 18px;
    gap: 16px;
    border-radius: 20px;
  }

  .mentor-toggle-icon,
  .mentor-toggle-icon-image {
    width: 58px;
    height: 58px;
  }

  .mentor-toggle-copy h3 {
    font-size: 19px;
  }

  .mentor-toggle-copy p {
    font-size: 15px;
    line-height: 1.34;
  }

  .mode-footer {
    margin-top: 4px;
  }

  .mode-footer .lesson-button {
    min-height: 48px;
    font-size: 19px;
  }
}

@media (min-width: 921px) and (max-height: 900px) {
  .mode-screen .lesson-header {
    min-height: 96px;
    padding: 22px 32px;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
  }

  .mode-screen .lesson-title {
    font-size: clamp(28px, 2vw, 34px);
  }

  .mode-screen .lesson-subtitle {
    margin-top: 6px;
    font-size: 16px;
  }

  .mode-screen .lesson-progress {
    min-width: 180px;
  }

  .mode-screen .progress-label {
    margin-bottom: 8px;
    font-size: 13px;
  }

  .mode-screen .progress-steps {
    gap: 6px;
  }

  .mode-screen .progress-step {
    width: 32px;
  }

  .mode-content {
    height: calc(100% - 97px);
    padding-top: 16px;
    padding-bottom: 24px;
    gap: 12px;
  }

  .mode-card {
    min-height: 266px;
  }

  .mode-card-media {
    min-height: 154px;
  }

  .mode-card-image {
    width: auto;
    max-height: 168px;
  }
}

@media (max-width: 920px) {
  .mode-content {
    padding-top: 18px;
  }

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

  .mode-copy {
    margin: 0;
    text-align: center;
  }

  .mode-card {
    min-height: 300px;
    padding: 20px 20px 12px;
  }

  .mode-card-copy {
    max-width: none;
    padding-top: 4px;
    padding-left: 4px;
  }

  .mode-card-copy h3 {
    max-width: calc(100% - 44px);
    padding-right: 0;
    white-space: normal;
  }

  .mode-card-copy p {
    white-space: normal;
  }

  .mode-card-media {
    min-height: 200px;
  }

  .mode-card-media::before {
    width: 250px;
    height: 250px;
  }

  .mode-card-image {
    width: min(100%, 250px);
    max-height: 200px;
  }
}

/* === Mentor hint card final === */

.mentor-toggle-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 22px;
  align-items: center;
}

.mentor-toggle-icon {
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
  background: transparent;
  box-shadow: none;
}

.mentor-toggle-icon-image {
  width: 74px;
  height: 74px;
  object-fit: contain;
  border-radius: 10px;
  transition: filter 0.16s ease;
}

.mentor-toggle-icon.is-enabled .mentor-toggle-icon-image {
  filter: drop-shadow(0 0 12px rgba(255, 102, 51, 0.42));
}

.mentor-toggle-copy {
  min-width: 0;
}

.mentor-toggle-copy h3 {
  margin: 0 0 8px;
}

.mentor-toggle-copy p {
  margin: 0;
}

.mentor-toggle-mobile-note {
  display: none;
}

.mentor-toggle {
  width: 72px;
  height: 40px;
  justify-self: end;
}

.mentor-toggle.is-on {
  height: 40px;
}

@media (max-width: 920px) {
  .mentor-toggle-card {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
  }

  .mentor-toggle-icon {
    width: 66px;
    height: 66px;
  }

  .mentor-toggle-icon-image {
    width: 66px;
    height: 66px;
  }

  .mentor-toggle {
    justify-self: end;
  }
}

/* === Dialogue screen === */

.dialog-panel {
  background:
    radial-gradient(circle at 82% 18%, rgba(255, 102, 51, 0.07), transparent 24%),
    linear-gradient(180deg, #ffffff, #f4f7fc);
}

.dialog-screen .dialog-content {
  display: block;
  padding: 8px 20px 33px;
  height: calc(100% - 111px);
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
}

.dialogue-body {
  height: 100%;
  min-height: 0;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(300px, 24vw, 360px);
  gap: 18px;
  align-items: stretch;
}

.chat-card,
.tension-card,
.mentor-hint-card,
.timer-card {
  border: 1px solid rgba(7, 23, 45, 0.06);
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 251, 255, 0.96));
  box-shadow: 0 18px 42px rgba(15, 32, 58, 0.08);
}

.chat-card {
  min-height: 0;
  height: 100%;
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  gap: 12px;
  padding: 20px 22px 31px;
  overflow: hidden;
}

.chat-card-header h2 {
  margin: 0;
  color: var(--ink);
  font-size: 28px;
  line-height: 1.02;
}

.chat-card-header {
  padding-bottom: 8px;
}

.chat-messages {
  min-height: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-content: start;
  overflow-x: hidden;
  overflow-y: auto;
  padding-right: 14px;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: rgba(113, 128, 149, 0.72) transparent;
}

.chat-messages::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.chat-messages::-webkit-scrollbar-track {
  border-radius: 999px;
  background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(126, 139, 171, 0.9), rgba(95, 109, 139, 0.9));
  background-clip: padding-box;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(110, 124, 154, 0.96), rgba(84, 98, 126, 0.96));
  background-clip: padding-box;
}

.chat-messages::-webkit-scrollbar-button,
.chat-messages::-webkit-scrollbar-corner,
.chat-messages::-webkit-scrollbar-track-piece {
  display: none;
  width: 0;
  height: 0;
  background: transparent;
}

.chat-message {
  display: grid;
  flex: 0 0 auto;
  gap: 10px;
  align-items: start;
  opacity: 0;
  transform: translateY(18px);
  max-height: 0;
  overflow: hidden;
  transition:
    opacity 0.42s ease,
    transform 0.42s ease,
    max-height 0.42s ease,
    margin 0.42s ease;
}

.chat-message.is-visible {
  opacity: 1;
  transform: translateY(0);
  max-height: 1600px;
  overflow: visible;
}

.chat-message-client {
  grid-template-columns: 78px minmax(0, 1fr);
}

.chat-message-user {
  grid-template-columns: minmax(0, 1fr) 78px;
}

.chat-message-system {
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
}

.chat-message-user .chat-message-content {
  justify-self: end;
}

.chat-message-system .chat-message-content {
  max-width: min(100%, 560px);
  justify-self: center;
}

.chat-message-system .chat-bubble {
  padding: 12px 16px;
  border-radius: 18px;
  background: rgba(255, 247, 226, 0.95);
  border-color: rgba(194, 123, 24, 0.22);
}

.chat-message-system .chat-bubble p {
  color: #6d4a12;
  font-size: 15px;
  text-align: center;
}

.chat-avatar {
  width: 78px;
  height: 78px;
  object-fit: cover;
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(222, 227, 255, 0.95), rgba(241, 245, 255, 0.95));
  box-shadow: 0 14px 30px rgba(15, 32, 58, 0.08);
}

.chat-avatar-user {
  background: linear-gradient(180deg, rgba(255, 231, 219, 0.95), rgba(255, 243, 236, 0.95));
}

.chat-message-content {
  max-width: min(100%, 600px);
}

.chat-author {
  margin: 4px 0 8px;
  color: var(--ink-soft);
  font-size: 17px;
  font-weight: 600;
}

.chat-message-user .chat-author {
  text-align: right;
}

.chat-bubble {
  position: relative;
  padding: 18px 22px 14px;
  border-radius: 24px;
  background: #ffffff;
  border: 1px solid rgba(10, 26, 48, 0.07);
  box-shadow: none;
}

.chat-message-client .chat-bubble::before,
.chat-message-user .chat-bubble::after {
  content: "";
  position: absolute;
  top: 20px;
  width: 16px;
  height: 16px;
  background: inherit;
  border: inherit;
  box-shadow: none;
  transform: rotate(45deg);
}

.chat-message-client .chat-bubble::before {
  left: -8px;
  border-right: 0;
  border-top: 0;
}

.chat-message-user .chat-bubble {
  background: #fff3ec;
  border-color: #ffd7c2;
}

.chat-message-user .chat-bubble::after {
  right: -8px;
  border-left: 0;
  border-bottom: 0;
}

.chat-bubble p {
  margin: 0;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.45;
}

.chat-meta {
  margin-top: 10px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  color: #7f8aa7;
  font-size: 13px;
  font-weight: 600;
}

.chat-read {
  color: #ff6633;
  letter-spacing: -0.1em;
}

.chat-typing {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding-left: 0;
  margin-left: 0;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.chat-typing.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.chat-typing-dots {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.chat-typing-dots span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(171, 180, 217, 0.62);
  animation: typingPulse 1.4s infinite ease-in-out;
}

.chat-typing-dots span:nth-child(2) {
  animation-delay: 0.16s;
}

.chat-typing-dots span:nth-child(3) {
  animation-delay: 0.32s;
}

.chat-typing-label {
  color: #8c96b3;
  font-size: 15px;
  font-weight: 600;
}

.chat-input-card {
  display: grid;
  gap: 0;
  padding-top: 14px;
}

.chat-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 70px;
  gap: 12px;
  align-items: center;
}

.chat-input-shell {
  min-height: 74px;
  padding: 12px 18px;
  border-radius: 22px;
  border: 1px solid rgba(7, 23, 45, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(249, 251, 255, 0.95));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  align-items: center;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.chat-input-shell:focus-within {
  border-color: rgba(255, 102, 51, 0.55);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 0 0 3px rgba(255, 102, 51, 0.14);
}

.chat-input {
  width: 100%;
  max-height: 120px;
  resize: none;
  overflow: hidden;
  border: 0;
  outline: 0;
  padding: 0;
  color: var(--ink);
  background: transparent;
  font: inherit;
  font-size: 16px;
  line-height: 1.4;
}

.chat-input::placeholder {
  color: #9aa5c1;
}

.chat-send-button {
  width: 70px;
  height: 70px;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff8a5c, #e8501f);
  color: #ffffff;
  font-size: 24px;
  box-shadow: none;
  transition: box-shadow 0.16s ease, filter 0.16s ease, background 0.16s ease, color 0.16s ease;
}

.dialogue-side {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto auto;
  align-content: start;
  gap: 14px;
}

.tension-card,
.mentor-hint-card,
.timer-card {
  padding: 16px 18px;
}

.dialogue-side-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.dialogue-side-head h3 {
  margin: 0;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.2;
}

.dialogue-info-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid rgba(145, 156, 189, 0.4);
  color: #93a0c2;
  font-size: 16px;
  font-weight: 700;
}

.tension-card {
  min-height: 210px;
  display: grid;
  align-content: start;
  gap: 8px;
}

.tension-gauge {
  position: relative;
  width: 170px;
  height: 96px;
  margin: 2px auto 0;
}

.tension-gauge-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.tension-gauge-track,
.tension-gauge-progress {
  fill: none;
  stroke-width: 18;
  stroke-linecap: round;
}

.tension-gauge-track {
  stroke: #e5eaf5;
}

.tension-gauge-progress {
  stroke: url(#dialogueTensionGradient);
  stroke: #ff6633;
  stroke-dasharray: 72 100;
  transition: stroke-dasharray 0.28s ease;
}

.tension-gauge-value {
  position: absolute;
  left: 50%;
  bottom: 8px;
  transform: translateX(-50%);
  color: var(--ink);
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.tension-status {
  text-align: center;
  color: #e6534e;
  font-size: 16px;
  font-weight: 700;
}

.tension-caption {
  margin: 0;
  text-align: center;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.4;
}

.mentor-hint-card {
  min-height: 150px;
  display: grid;
  gap: 12px;
}

.mentor-hint-card.is-disabled {
  opacity: 0.58;
}

.mentor-hint-body {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.mentor-hint-icon {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: 10px;
}

.mentor-hint-body p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.45;
}



.timer-card {
  min-height: 118px;
  display: grid;
  gap: 10px;
}

.timer-body {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.timer-icon {
  width: 68px;
  height: 68px;
  object-fit: contain;
  display: block;
  border-radius: 10px;
}

.timer-copy {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  color: #7e8bab;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

.timer-copy strong {
  color: var(--ink);
  font-size: 38px;
  line-height: 1;
  letter-spacing: -0.05em;
  min-width: 2.9em;
}

.timer-copy span {
  font-size: 18px;
  font-weight: 600;
}

@keyframes typingPulse {
  0%, 80%, 100% {
    transform: scale(0.8);
    opacity: 0.45;
  }

  40% {
    transform: scale(1);
    opacity: 1;
  }
}

@media (max-width: 1320px) {
  .dialog-screen .dialog-content {
    height: calc(100% - 111px);
    overflow-x: hidden;
    overflow-y: auto;
  }

  .dialogue-body {
    grid-template-columns: 1fr;
  }

  .dialogue-side {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: auto;
  }
}

@media (min-width: 921px) and (max-width: 1320px) {
  .dialog-screen .dialog-content {
    padding: 12px 18px 24px;
  }

  .dialogue-body {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }

  .dialogue-side {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: auto;
    gap: 12px;
  }

  .tension-card,
  .mentor-hint-card,
  .timer-card {
    min-height: 0;
    padding: 14px 16px;
  }

  .tension-gauge {
    width: 148px;
    height: 84px;
  }

  .tension-gauge-value {
    font-size: 30px;
  }

  .timer-icon {
    width: 52px;
    height: 52px;
  }

  .timer-body {
    grid-template-columns: 52px minmax(0, 1fr);
  }

  .timer-copy strong {
    font-size: 30px;
  }
}

@media (min-width: 921px) and (max-width: 1100px) {
  .dialogue-side {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: auto auto;
    gap: 10px;
  }

  .tension-card,
  .mentor-hint-card,
  .timer-card {
    min-width: 0;
    padding: 12px 14px;
  }

  .timer-card {
    grid-column: 1 / -1;
  }

  .timer-body {
    grid-template-columns: 48px minmax(0, max-content);
    justify-content: start;
    gap: 10px;
    min-width: 0;
  }

  .timer-icon {
    width: 48px;
    height: 48px;
  }

  .timer-copy {
    min-width: 0;
    gap: 6px;
    white-space: nowrap;
  }

  .timer-copy strong {
    min-width: 2.65em;
    font-size: 30px;
    letter-spacing: -0.03em;
  }

  .timer-copy span {
    font-size: 15px;
  }
}

@media (min-width: 921px) and (max-height: 700px) {
  .dialog-screen .lesson-header {
    min-height: 96px;
    padding: 22px 32px;
  }

  .dialog-screen .lesson-title {
    font-size: clamp(28px, 2vw, 34px);
  }

  .dialog-screen .lesson-subtitle {
    margin-top: 6px;
    font-size: 16px;
  }

  .dialog-screen .dialog-content {
    height: calc(100% - 97px);
    padding: 8px 18px 18px;
    overflow: hidden;
  }

  .dialogue-body {
    grid-template-columns: minmax(0, 1fr) clamp(280px, 23vw, 330px);
    gap: 14px;
  }

  .chat-card {
    gap: 8px;
    padding: 16px 18px 20px;
  }

  .chat-card-header h2 {
    font-size: 24px;
  }

  .chat-message {
    gap: 14px;
  }

  .chat-bubble {
    padding: 14px 18px 12px;
  }

  .chat-bubble p {
    font-size: 16px;
    line-height: 1.36;
  }

  .chat-input-card {
    padding-top: 10px;
  }

  .chat-input-shell {
    min-height: 62px;
  }

  .chat-send-button {
    width: 62px;
    height: 62px;
  }

  .dialogue-side {
    gap: 10px;
  }

  .tension-card,
  .mentor-hint-card,
  .timer-card {
    min-height: 0;
    padding: 12px 14px;
  }

  .dialogue-side-head h3 {
    font-size: 15px;
  }

  .tension-gauge {
    width: 132px;
    height: 74px;
  }

  .tension-gauge-value {
    font-size: 28px;
  }

  .tension-status {
    font-size: 14px;
  }

  .tension-caption,
  .mentor-hint-body p {
    font-size: 13px;
    line-height: 1.3;
  }

  .mentor-hint-icon {
    width: 40px;
    height: 40px;
  }

  .mentor-hint-body {
    grid-template-columns: 40px minmax(0, 1fr);
  }

  .timer-icon {
    width: 48px;
    height: 48px;
  }

  .timer-body {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .timer-copy strong {
    font-size: 28px;
  }

  .timer-copy span {
    font-size: 15px;
  }
}

@media (max-width: 980px) {
  .dialog-screen .dialog-content {
    padding: 20px 18px 22px;
  }

  .chat-card {
    padding: 22px 18px 18px;
  }

  .chat-message-client,
  .chat-message-user,
  .chat-message-system {
    grid-template-columns: 1fr;
  }

  .chat-message-user .chat-message-content {
    justify-self: stretch;
  }

  .chat-avatar {
    width: 78px;
    height: 78px;
  }

  .chat-message-user .chat-avatar {
    justify-self: end;
    order: -1;
  }

  .chat-author {
    margin-top: 0;
  }

  .chat-message-user .chat-author {
    text-align: left;
  }

  .chat-bubble p {
    font-size: 18px;
  }

  .chat-typing {
    padding-left: 0;
  }

  .dialogue-side {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .mentor-toggle-card {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 14px 16px;
  }

  .mentor-toggle-icon {
    position: relative;
    width: 58px;
    height: 58px;
    border-radius: 18px;
    cursor: pointer;
    transition: box-shadow 0.16s ease, transform 0.16s ease, filter 0.16s ease;
  }

  .mentor-toggle-icon-image {
    width: 58px;
    height: 58px;
  }

  .mentor-toggle-copy h3 {
    font-size: 20px;
    line-height: 1.08;
  }

  .mentor-toggle-copy p {
    font-size: 16px;
    line-height: 1.4;
  }

  .mentor-toggle-mobile-note {
    display: block;
    margin-top: 8px;
    color: #8a96b1;
    font-size: 13px;
    line-height: 1.35;
  }

  .mentor-toggle {
    display: none;
  }

  .chat-card {
    padding: 20px 16px 18px;
  }

  .chat-input-card {
    padding-top: 18px;
  }

  .chat-input-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: end;
  }

  .chat-input-shell {
    min-height: 66px;
    padding: 10px 16px;
  }

  .chat-send-button {
    width: 58px;
    height: 58px;
    min-width: 58px;
    flex-shrink: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    justify-self: end;
    align-self: center;
    background: linear-gradient(135deg, #ff8a5c, #e8501f);
    color: #ffffff;
    box-shadow: 0 6px 16px rgba(255, 102, 51, 0.28);
    font-size: 22px;
    line-height: 1;
  }

  .mentor-hint-body,
  .timer-body {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px;
    align-items: center;
  }

  .mentor-hint-icon,
  .timer-icon {
    justify-self: start;
  }

  .tension-gauge {
    width: 184px;
    height: 108px;
  }

  .tension-gauge-value {
    font-size: 34px;
  }

  .mentor-hint-card,
  .timer-card {
    padding: 18px 16px;
  }

  .mentor-hint-body p {
    font-size: 15px;
    line-height: 1.42;
  }

  .timer-copy {
    align-items: center;
    gap: 8px;
  }

  .timer-copy strong {
    font-size: 34px;
    min-width: 2.8em;
  }

  .timer-copy span {
    font-size: 16px;
  }
}

/* === Result screen === */

.result-panel {
  background:
    radial-gradient(circle at 82% 18%, rgba(255, 102, 51, 0.08), transparent 24%),
    linear-gradient(180deg, #ffffff, #f4f7fc);
}

.result-panel .result-content {
  display: block;
  grid-template-columns: none;
  gap: 0;
  height: calc(100% - 111px);
  padding: 22px 28px 31px;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
}

.result-body {
  display: grid;
  min-width: 0;
  gap: 16px;
}

.result-intro h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(42px, 3.5vw, 60px);
  line-height: 0.96;
  letter-spacing: -0.06em;
}

.result-intro-emoji {
  display: inline-block;
  margin-left: 8px;
  font-size: 0.72em;
  vertical-align: 0.06em;
}

.result-intro p {
  margin: 10px 0 0;
  max-width: 860px;
  color: var(--ink-soft);
  font-size: 17px;
  line-height: 1.42;
}

.result-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(360px, 1.08fr);
  gap: 16px;
  align-items: stretch;
}

.result-score-card,
.result-criteria-card,
.result-note-card {
  border: 1px solid rgba(7, 23, 45, 0.06);
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 251, 255, 0.96));
  box-shadow: 0 18px 42px rgba(15, 32, 58, 0.08);
}

.result-score-card {
  min-height: 232px;
  padding: 22px 24px;
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}

.result-score-ring {
  position: relative;
  width: 160px;
  height: 160px;
  display: grid;
  place-items: center;
}

.result-score-ring-svg {
  width: 160px;
  height: 160px;
  transform: rotate(-90deg);
}

.result-score-ring-track,
.result-score-ring-progress {
  fill: none;
  stroke-width: 12;
  stroke-linecap: round;
}

.result-score-ring-track {
  stroke: #e8edf7;
}

.result-score-ring-progress {
  stroke: url(#resultScoreGradient);
  transition: stroke-dasharray 0.22s ease;
}

.result-score-copy {
  min-width: 0;
}

.result-score-value {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  color: #7484a1;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

.result-score-value strong {
  color: var(--ink);
  font-size: clamp(46px, 4.2vw, 64px);
  line-height: 0.92;
  letter-spacing: -0.06em;
}

.result-score-value span {
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
}

.result-score-copy h3 {
  margin: 8px 0 8px;
  color: #e6534e;
  font-size: 18px;
  line-height: 1.15;
}

.result-score-copy p {
  margin: 0;
  max-width: 260px;
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.42;
}

.result-characters {
  min-height: 0;
  margin: 0;
  padding: 0;
  border-radius: 26px;
  overflow: hidden;
  display: flex;
  align-items: stretch;
  justify-content: center;
  background: transparent;
  box-shadow: none;
}

.result-characters-image {
  width: 100%;
  height: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  object-position: center;
  border-radius: 26px;
  box-shadow: 0 10px 28px rgba(15, 32, 58, 0.12);
}

.result-criteria-card {
  padding: 18px 22px 20px;
}

.result-section-head,
.result-note-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.result-section-head {
  margin-bottom: 14px;
}

.result-section-head h3,
.result-note-head h3 {
  margin: 0;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.2;
}

.result-info-badge {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid rgba(145, 156, 189, 0.36);
  color: #93a0c2;
  font-size: 15px;
  font-weight: 700;
}

.criteria-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.criterion-item {
  min-width: 0;
  padding-right: 12px;
  border-right: 1px solid rgba(7, 23, 45, 0.06);
}

.criterion-item:last-child {
  padding-right: 0;
  border-right: 0;
}

.criterion-item h4 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.22;
}

.criterion-score {
  margin-bottom: 10px;
  display: flex;
  align-items: flex-end;
  gap: 6px;
  color: #7484a1;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

.criterion-score strong {
  color: var(--ink);
  font-size: 16px;
  line-height: 1;
}

.criterion-score span {
  font-size: 13px;
  font-weight: 600;
}

.criterion-bar {
  height: 8px;
  border-radius: 999px;
  background: #e4ebf6;
  overflow: hidden;
}

.criterion-bar-fill {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ff6633, #d9481c);
  transition: width 1.05s cubic-bezier(0.22, 1, 0.36, 1);
}

.result-bottom-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.result-note-card {
  min-height: 0;
  padding: 22px 22px 24px;
}

.result-note-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #ffffff;
  font-size: 20px;
  font-weight: 800;
  flex: 0 0 42px;
}

.result-note-icon.mint {
  background: linear-gradient(135deg, #3fbd7c, #2daa67);
}

.result-note-icon.violet {
  background: linear-gradient(135deg, #ff8a5c, #e8501f);
}

.result-note-icon.amber {
  background: linear-gradient(135deg, #ffd76e, #ffb526);
}

.strengths-card {
  background: linear-gradient(180deg, rgba(236, 250, 242, 0.96), rgba(247, 252, 249, 0.96));
}

.improvements-card {
  background: linear-gradient(180deg, rgba(255, 244, 236, 0.96), rgba(255, 250, 246, 0.96));
}

.strong-answer-card {
  background: linear-gradient(180deg, rgba(255, 250, 238, 0.98), rgba(255, 255, 255, 0.96));
}

.result-note-card ul {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.result-note-card li {
  position: relative;
  padding-left: 32px;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.4;
}

.result-note-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
}

.strengths-card li::before {
  background: linear-gradient(135deg, #3fbd7c, #2daa67);
  box-shadow: inset 0 0 0 4px rgba(255, 255, 255, 0.78);
}

.improvements-card li::before {
  background: linear-gradient(135deg, #ff8a5c, #e8501f);
  box-shadow: inset 0 0 0 4px rgba(255, 255, 255, 0.82);
}

.strong-answer-card blockquote {
  margin: 14px 0 0;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.56;
}

@media (max-width: 1320px) {
  .result-panel .result-content {
    height: calc(100% - 111px);
    overflow-x: hidden;
    overflow-y: auto;
  }

  .result-hero {
    grid-template-columns: 1fr;
  }

  .criteria-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .criterion-item:nth-child(3n) {
    padding-right: 0;
    border-right: 0;
  }

  .result-bottom-grid {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 921px) and (max-width: 1320px) {
  .result-panel .result-content {
    padding: 20px 24px 24px;
  }

  .result-body {
    gap: 14px;
  }

  .result-hero {
    grid-template-columns: 1fr;
  }

  .result-score-card {
    min-height: 0;
  }

  .criteria-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .result-bottom-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 920px) {
  .result-panel .result-content {
    height: auto;
    overflow: visible;
    padding: 22px 18px 24px;
  }

  .result-intro h2 {
    font-size: clamp(38px, 10vw, 56px);
  }

  .result-intro p {
    font-size: 17px;
  }

  .result-score-card {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .result-score-copy p {
    max-width: none;
  }

  .result-score-value {
    justify-content: center;
  }

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

  .criterion-item {
    padding-right: 0;
    border-right: 0;
  }
}

@media (max-width: 640px) {
  .result-panel .result-content {
    padding: 20px 16px 22px;
  }

  .result-body {
    gap: 16px;
  }

  .result-intro p {
    margin-top: 12px;
    font-size: 16px;
  }

  .result-score-card,
  .result-criteria-card,
  .result-note-card {
    border-radius: 24px;
  }

  .result-score-card {
    min-height: 0;
    padding: 22px 18px;
    gap: 14px;
  }

  .result-score-ring,
  .result-score-ring-svg {
    width: 156px;
    height: 156px;
  }

  .result-score-value strong {
    font-size: 48px;
  }

  .result-score-value span {
    font-size: 24px;
  }

  .result-score-copy h3 {
    font-size: 18px;
  }

  .result-characters {
    min-height: 220px;
  }

  .result-criteria-card {
    padding: 20px 18px 22px;
  }

  .criteria-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .criterion-item h4 {
    font-size: 16px;
  }

  .criterion-score strong {
    font-size: 20px;
  }

  .result-note-card {
    min-height: 0;
    padding: 20px 18px 22px;
  }
}

@media (max-height: 1040px) and (min-width: 921px) {
  .result-panel .result-content {
    padding: 20px 24px 24px;
  }

  .result-body {
    gap: 14px;
  }

  .result-intro h2 {
    font-size: clamp(38px, 3.1vw, 52px);
  }

  .result-intro p {
    margin-top: 8px;
    font-size: 16px;
    line-height: 1.36;
  }

  .result-hero {
    gap: 14px;
  }

  .result-score-card {
    min-height: 0;
    padding: 18px 22px;
    grid-template-columns: 172px minmax(0, 1fr);
    gap: 16px;
  }

  .result-score-ring {
    width: 148px;
    height: 148px;
  }

  .result-score-ring-svg {
    width: 148px;
    height: 148px;
  }

  .result-score-value strong {
    font-size: clamp(42px, 3.8vw, 58px);
  }

  .result-score-value span {
    font-size: 22px;
  }

  .result-score-copy h3 {
    margin: 6px 0 6px;
    font-size: 17px;
  }

  .result-score-copy p {
    font-size: 15px;
    line-height: 1.34;
  }

  .result-characters {
    min-height: 0;
    border-radius: 24px;
  }

  .result-characters-image {
    border-radius: 24px;
  }

  .result-criteria-card {
    padding: 18px 22px 20px;
  }

  .result-section-head {
    margin-bottom: 12px;
  }

  .criterion-item h4 {
    margin-bottom: 8px;
    font-size: 14px;
  }

  .criterion-score {
    margin-bottom: 10px;
  }

  .criterion-score strong {
    font-size: 16px;
  }

  .criterion-score span {
    font-size: 13px;
  }

  .result-bottom-grid {
    gap: 14px;
  }

  .result-note-card {
    padding: 22px 22px 24px;
  }

  .result-note-head h3 {
    font-size: 18px;
  }

  .result-note-card ul {
    margin-top: 14px;
    gap: 12px;
  }

  .result-note-card li,
  .strong-answer-card blockquote {
    font-size: 15px;
    line-height: 1.4;
  }
}

/* === Unified buttons === */

.start-button,
.lesson-button,
.chat-send-button,

.start-button:hover,
.lesson-button:hover,
.chat-send-button:hover {
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14), 0 8px 18px rgba(255, 102, 51, 0.24);
  filter: brightness(0.965);
}

.start-button:active,
.lesson-button:active,
.chat-send-button:active {
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.10), 0 5px 12px rgba(255, 102, 51, 0.18);
  filter: brightness(0.995);
}



.mode-footer .lesson-button,
.rules-next-button {
  transition:
    box-shadow 0.16s ease,
    background 0.16s ease,
    color 0.16s ease,
    border-color 0.16s ease;
}

.mode-footer .lesson-button:hover,
.rules-next-button:hover {
  background: linear-gradient(135deg, #ff7a42 0%, #c74614 100%);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14), 0 8px 18px rgba(255, 102, 51, 0.26);
  filter: none;
}

.mode-footer .lesson-button:active,
.rules-next-button:active {
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.10), 0 5px 12px rgba(255, 102, 51, 0.20);
  filter: none;
}

.mode-footer .lesson-button:hover span:last-child,
.rules-next-button:hover span:last-child {
  transform: none;
  background: transparent;
}

/* === Exact CTA buttons === */

#rulesBtn,
#dialogBtn,
#modeBtn {
  box-shadow: none;
  font-size: 21px;
  transition:
    box-shadow 0.16s ease,
    filter 0.16s ease,
    background 0.16s ease,
    color 0.16s ease,
    border-color 0.16s ease;
}

#dialogBtn:hover,
#modeBtn:hover {
  background: linear-gradient(135deg, #ff7a42 0%, #c74614 100%);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14), 0 8px 18px rgba(255, 102, 51, 0.26);
  filter: none;
}

#rulesBtn:hover {
  background: linear-gradient(135deg, #ff7a42 0%, #c74614 100%);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14), 0 8px 18px rgba(255, 102, 51, 0.26);
  filter: none;
}

#dialogBtn:active,
#modeBtn:active {
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.10), 0 5px 12px rgba(255, 102, 51, 0.20);
  filter: none;
}

#rulesBtn:active {
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.10), 0 5px 12px rgba(255, 102, 51, 0.20);
  filter: none;
}

#rulesBtn:hover span:last-child,
#dialogBtn:hover span:last-child,
#modeBtn:hover span:last-child {
  transform: none;
  background: transparent;
}

/* === Light surface CTA contrast === */

#modeBtn,
#dialogBtn {
  border-color: rgba(255, 153, 112, 0.96);
  background: linear-gradient(135deg, #ff7340 0%, #c74614 100%);
}

#rulesBtn {
  border-color: rgba(255, 153, 112, 0.96);
  background: linear-gradient(135deg, #ff7340 0%, #c74614 100%);
}


.dialogue-analysis-overlay {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 50% 20%, rgba(255, 102, 51, 0.14), transparent 42%),
    rgba(253, 247, 242, 0.84);
  backdrop-filter: blur(12px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s ease;
}

.dialogue-analysis-overlay.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.dialogue-analysis-card {
  width: min(440px, 100%);
  padding: 30px;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(255, 102, 51, 0.18);
  box-shadow: 0 24px 70px rgba(8, 45, 64, 0.16);
  text-align: center;
}

.dialogue-analysis-loader {
  width: 42px;
  height: 42px;
  margin: 0 auto 18px;
  border-radius: 999px;
  border: 4px solid rgba(255, 102, 51, 0.18);
  border-top-color: #ff6633;
  animation: dialogueAnalysisSpin 0.9s linear infinite;
}

.dialogue-analysis-card h2 {
  margin: 0 0 8px;
  color: #07182f;
  font-size: 24px;
  line-height: 1.15;
}

.dialogue-analysis-card p {
  margin: 0;
  color: #52627a;
  font-size: 16px;
  line-height: 1.45;
}

@keyframes dialogueAnalysisSpin {
  to {
    transform: rotate(360deg);
  }
}
