:root {
  --ink: #17201d;
  --muted: #65736d;
  --paper: #f8f4ec;
  --panel: rgba(255, 252, 245, 0.92);
  --line: rgba(23, 32, 29, 0.13);
  --green: #226f54;
  --rose: #bf4d5d;
  --gold: #d9942b;
  --blue: #386fa4;
  --shadow: 0 20px 60px rgba(35, 42, 37, 0.16);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #ece7dc;
}

button {
  border: 0;
  cursor: pointer;
  font: inherit;
}

.app-shell {
  min-height: 100vh;
  background:
    linear-gradient(90deg, rgba(255, 252, 245, 0.92), rgba(255, 252, 245, 0.62)),
    linear-gradient(135deg, #e9ddc6 0%, #f3f0e9 42%, #dce7df 100%);
}

.hero {
  position: relative;
  min-height: 92vh;
  display: grid;
  align-items: end;
  padding: 28px;
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
}

.hero-media img,
.hero-media canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-media img {
  object-fit: cover;
  filter: saturate(0.92) contrast(1.04);
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(11, 18, 15, 0.76), rgba(11, 18, 15, 0.32) 52%, rgba(11, 18, 15, 0.04)),
    linear-gradient(0deg, rgba(236, 231, 220, 0.98) 0%, rgba(236, 231, 220, 0) 28%);
}

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 760px;
  color: #fffaf1;
  padding: 0 0 12vh;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 12px;
  font-size: clamp(4rem, 13vw, 10rem);
  line-height: 0.82;
  letter-spacing: 0;
}

.hero-copy p:not(.eyebrow) {
  max-width: 640px;
  color: rgba(255, 250, 241, 0.9);
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 1.65;
}

.hero-actions,
.camera-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.primary,
.secondary,
.ghost,
.tab {
  min-height: 44px;
  border-radius: 8px;
  padding: 0 16px;
  font-weight: 800;
}

.primary {
  color: #fffaf1;
  background: var(--green);
  box-shadow: 0 10px 26px rgba(34, 111, 84, 0.28);
}

.secondary {
  color: var(--ink);
  background: #fff8eb;
  border: 1px solid var(--line);
}

.ghost {
  color: #fffaf1;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.34);
}

.dashboard {
  display: grid;
  grid-template-columns: minmax(260px, 330px) minmax(0, 1fr);
  gap: 18px;
  padding: 22px;
}

.score-panel,
.play-panel,
.reg-card,
.breath-lab {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.score-panel {
  position: sticky;
  top: 18px;
  align-self: start;
  padding: 20px;
}

.score-panel h2,
.challenge h2 {
  margin-bottom: 16px;
  font-size: clamp(1.45rem, 2.6vw, 2.35rem);
  line-height: 1.05;
}

.skill-list {
  display: grid;
  gap: 14px;
}

.skill-row {
  display: grid;
  gap: 7px;
}

.skill-row header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.92rem;
  font-weight: 800;
}

.track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(23, 32, 29, 0.1);
}

.track span {
  display: block;
  height: 100%;
  width: var(--value);
  background: var(--color);
}

.total-score {
  margin-top: 18px;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 8px;
  background: #17201d;
  color: #fffaf1;
}

.total-score strong {
  font-size: 2rem;
}

.play-panel {
  min-width: 0;
  overflow: hidden;
}

.tabs {
  display: flex;
  gap: 8px;
  padding: 12px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
}

.tab {
  white-space: nowrap;
  color: var(--ink);
  background: transparent;
}

.tab.active {
  color: #fffaf1;
  background: var(--ink);
}

.challenge {
  display: none;
  padding: 22px;
}

.challenge.active {
  display: block;
}

.challenge-head {
  max-width: 780px;
}

.recognition-grid,
.scenario-stage,
.camera-grid,
.regulation-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(280px, 1.1fr);
  gap: 18px;
  align-items: stretch;
}

.photo-card,
.character-photo,
.camera-frame {
  position: relative;
  min-height: 470px;
  margin: 0;
  overflow: hidden;
  border-radius: 8px;
  background: #d8d0c2;
}

.photo-card img,
.character-photo img,
.camera-frame video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-card figcaption {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  padding: 12px;
  border-radius: 8px;
  color: #fffaf1;
  background: rgba(23, 32, 29, 0.74);
  backdrop-filter: blur(10px);
}

.answer-zone,
.body-coach {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 470px;
}

.answer-zone > p,
.body-coach > p,
#scene-copy,
#reg-copy {
  color: var(--muted);
  line-height: 1.7;
}

.choice-grid,
.strategy-board,
.micro-checks,
.emotion-mix {
  display: grid;
  gap: 10px;
}

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

.choice,
.strategy,
.micro-check,
.mix-pill {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffaf1;
  text-align: left;
}

.choice strong,
.strategy strong {
  display: block;
  margin-bottom: 4px;
}

.choice small,
.strategy small {
  color: var(--muted);
  line-height: 1.45;
}

.choice.correct {
  border-color: rgba(34, 111, 84, 0.55);
  background: rgba(34, 111, 84, 0.12);
}

.choice.wrong {
  border-color: rgba(191, 77, 93, 0.6);
  background: rgba(191, 77, 93, 0.1);
}

.feedback {
  min-height: 54px;
  margin: 12px 0;
  color: var(--ink);
  line-height: 1.6;
}

.scene-label {
  margin-bottom: 8px;
  color: var(--rose);
  font-weight: 900;
  text-transform: uppercase;
  font-size: 0.75rem;
}

.emotion-mix {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 14px 0;
}

.mix-pill {
  background: rgba(56, 111, 164, 0.1);
}

.mix-pill span {
  display: block;
  margin-top: 8px;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(23, 32, 29, 0.11);
}

.mix-pill span::before {
  content: "";
  display: block;
  width: var(--level);
  height: 100%;
  background: var(--blue);
}

.camera-frame video {
  transform: scaleX(-1);
  display: none;
}

.camera-frame.active video {
  display: block;
}

.camera-placeholder {
  position: absolute;
  inset: 16px;
  display: grid;
  place-items: center;
  padding: 24px;
  border: 1px dashed rgba(23, 32, 29, 0.25);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
  line-height: 1.6;
}

.camera-frame.active .camera-placeholder {
  display: none;
}

.micro-check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.micro-check input {
  margin-top: 4px;
  accent-color: var(--green);
}

.reg-card,
.breath-lab {
  padding: 18px;
}

.stress-meter {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  margin-top: 16px;
  color: var(--muted);
  font-weight: 800;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--rose);
}

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

.strategy.selected {
  border-color: rgba(34, 111, 84, 0.58);
  background: rgba(34, 111, 84, 0.12);
}

.breath-lab {
  margin-top: 18px;
  display: grid;
  grid-template-columns: auto 160px 1fr;
  gap: 18px;
  align-items: center;
}

.breath-orb {
  width: 150px;
  height: 150px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fffaf1;
  font-weight: 900;
  text-align: center;
  background:
    radial-gradient(circle at 36% 30%, rgba(255, 255, 255, 0.58), rgba(255, 255, 255, 0) 34%),
    linear-gradient(135deg, var(--green), var(--blue));
  transition: transform 3s ease-in-out;
}

.breath-orb.inhale {
  transform: scale(1.18);
}

.breath-orb.exhale {
  transform: scale(0.82);
}

@media (max-width: 900px) {
  .hero {
    min-height: 86vh;
    padding: 18px;
  }

  .dashboard,
  .recognition-grid,
  .scenario-stage,
  .camera-grid,
  .regulation-grid,
  .breath-lab {
    grid-template-columns: 1fr;
  }

  .score-panel {
    position: static;
  }

  .photo-card,
  .character-photo,
  .camera-frame,
  .answer-zone,
  .body-coach {
    min-height: 340px;
  }

  .choice-grid,
  .strategy-board,
  .emotion-mix {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .dashboard {
    padding: 12px;
  }

  .challenge {
    padding: 14px;
  }

  h1 {
    font-size: 4rem;
  }
}
