/* Mission 06 only: Redstone Lamp content inside the Mission 01 visual system. */
body[data-course="chapter02-mission06"] .intro-scene{background-image:url(./images/intro-hero.png)!important}
body[data-course="chapter02-mission06"] .level-scene{background:radial-gradient(circle at 50% 40%,#253427 0,#080d0a 47%,#020403 80%),url(./images/intro-hero.png) 50%/cover fixed!important}
body[data-course="chapter02-mission06"] .briefing-scene{background:linear-gradient(#07100de8,#030504f5),url(./images/intro-hero.png) 50%/cover fixed!important}
body[data-course="chapter02-mission06"] .complete-scene{background-image:url(./images/intro-hero.png)!important}

/* Briefing: Redstone Lamp content in the Mission 01 information architecture. */
body[data-course="chapter02-mission06"] .task-columns li button{display:flex!important;align-items:flex-start!important;gap:7px!important;white-space:normal!important;text-align:left!important}
body[data-course="chapter02-mission06"] .mission04-en{display:block;min-width:0}
body[data-course="chapter02-mission06"] .prompt-list button{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;text-align:left!important}
body[data-course="chapter02-mission06"] .prompt-list button .mission04-play{grid-column:2;grid-row:1/3;align-self:center;color:var(--accent)}

/* Quiz uses the Mission 01 geometry; only protect Redstone Lamp image proportions. */
body[data-course="chapter02-mission06"] .quiz-item-art,body[data-course="chapter02-mission06"] .build-part img{object-fit:contain!important;object-position:center!important}

@media (width<=760px){
  body[data-course="chapter02-mission06"] .intro-scene{background-position:58% center!important}

}

/* Preserve Chapter 01 button geometry; the approved Quiz adds independent option audio. */
.quiz-option {display:grid;grid-template-columns:minmax(0,1fr) auto;min-width:0}
.quiz-option button:first-child {overflow-wrap:anywhere}
.quiz-option button.option-audio {padding-inline:10px;border-left:0}
.audio-alert:not(:empty) {position:fixed;bottom:12px;left:12px;max-width:calc(100% - 24px);z-index:12;background:#161d16;padding:8px}
.complete-scene>h2 {overflow-wrap:normal}
.intro-copy>button:hover {background:#5d9f38}
.intro-copy>button:focus-visible {outline:2px solid #95d552;outline-offset:3px}

/* The shared accent-yellow class supplies Chapter 01 green on both screens. */
.learn-scene .language-panel h3 {color:var(--accent)}
.learn-scene .hotbar button:not(.active):hover,
.learn-scene .listen:hover {border-color:var(--accent);background:#1a241b}
.learn-scene button:focus-visible,
.briefing-scene button:focus-visible {outline:2px solid var(--accent);outline-offset:3px}
.learn-controls .challenge:hover,
.briefing-board .start-quiz:hover {background:color-mix(in srgb,var(--accent) 85%,white)}

/* Retain the shared Briefing board, two columns, improvement card and footer. */
.briefing-scene .briefing-board {margin:28px auto 0;padding:28px;min-width:0}
.briefing-board header {grid-template-columns:minmax(0,1fr);align-items:start;padding-block:8px 20px}
.briefing-board header h2 {color:#fff}
.briefing-objective {
  display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:start;gap:8px 20px;
  margin:12px 0 0;padding:8px 12px;border-left:2px solid var(--accent);background:#0c120e
}
.briefing-objective p {margin:0;color:#e4e8e4;font-size:10px;line-height:1.6;overflow-wrap:anywhere}
.briefing-objective p[lang="zh-CN"] {color:#c4cbc5}
.briefing-objective .objective-audio {
  padding:2px 5px;border:0;background:transparent;color:var(--accent);cursor:pointer;
  font:inherit;vertical-align:baseline
}
.briefing-objective .objective-audio:hover {background:#1a241b}
.briefing-board .task-columns {grid-template-columns:repeat(2,minmax(0,1fr));align-items:stretch;gap:22px;padding:22px 0}
.briefing-board .task-columns article {min-width:0;padding:18px}
.briefing-board .prompt-list .mission04-en {color:inherit;font-size:inherit;line-height:inherit}
.briefing-board .improve-challenge {margin:0;gap:18px;padding:16px 18px}
.briefing-board footer {gap:22px;margin-top:18px;padding-top:18px;min-width:0}
.briefing-board .improve-challenge h3 {color:var(--accent)}
.briefing-board footer p {margin:6px 0 8px}
.briefing-board footer>div>button {min-height:28px}
@media(max-width:760px) {
  .briefing-scene .briefing-board {margin-top:16px;padding:18px 14px}
  .briefing-board header {padding-top:6px}
  .briefing-objective {grid-template-columns:minmax(0,1fr);gap:4px;margin-top:10px;padding:8px 10px}
  .briefing-board .task-columns {grid-template-columns:minmax(0,1fr);gap:12px;padding:14px 0}
  .briefing-board .task-columns article {padding:14px}
  .briefing-board .improve-challenge {padding:14px}
}

/* Use the shared parchment dimensions and title; group each English line with its translation. */
.parchment :is(h3,.intro-summary)>span {display:block}
.parchment h3 {margin:5px 0 8px;padding-bottom:7px;line-height:1.4}
.parchment h3 [lang="en"] {font-weight:800}
.parchment h3 [lang="zh-CN"] {font-size:11px;margin-top:4px}
.parchment label {margin:6px 0 3px}
.parchment .intro-summary {margin-block:0 7px;font-size:11px!important;line-height:1.55!important}
.parchment .intro-summary>span+span {margin-top:2px}
.parchment .intro-objectives {margin:3px 0 5px;padding:0;list-style:none;position:relative}
.parchment .intro-objectives li {font-size:11px;line-height:1.55;font-weight:500;padding-left:12px;position:relative}
.parchment .intro-objectives li+li {margin-top:4px}
.parchment .intro-objectives li::before {content:"□";position:absolute;left:0}
.parchment [lang="en"] {word-break:normal!important}
@media(max-width:760px) {
  .complete-scene>h2 {font-size:clamp(32px,9vw,64px)}
}


/* Chapter 01 Quiz palette with a separate target for each option's audio. */
.quiz-scene .quiz-hud {color:#c4cbc5}
.quiz-scene .quiz-hud b {color:var(--accent)}
.quiz-scene .cinema-options {grid-template-columns:minmax(0,1fr)}
.quiz-scene .quiz-option {min-width:0;min-height:60px}
.quiz-scene .quiz-option > button:first-child {padding:12px;text-align:left;line-height:1.5}
.quiz-scene .quiz-option > .option-audio {min-width:44px}
.quiz-scene .build-progress {display:flex;flex-wrap:wrap;justify-content:center;gap:8px}
.quiz-scene .build-part {
  display:grid;place-items:center;width:clamp(40px,9vw,58px);height:auto;aspect-ratio:1;padding:3px
}
.quiz-scene .build-part img {display:block;width:100%;height:100%;min-width:0;min-height:0}
.quiz-scene > .text-back {display:block;margin:18px auto 0}
.quiz-scene .quiz-hud {grid-template-columns:auto minmax(32px,1fr) auto;gap:10px}
.quiz-scene .option-audio {color:var(--accent)}
.quiz-scene button:focus-visible {outline:2px solid var(--accent);outline-offset:2px;z-index:1}
.quiz-scene .answer-bar {gap:12px;text-align:left}
.quiz-scene .answer-message {min-width:0;font-size:12px;line-height:1.6}
.quiz-scene .answer-message p {margin:4px 0 0;color:#e3e8e4;overflow-wrap:anywhere}
.quiz-scene .answer-correct b {color:#baf18c}
.quiz-scene .answer-bar>button {flex:none;min-height:38px;font-size:10px}
.quiz-scene .answer-bar>button:hover {background:color-mix(in srgb,var(--accent) 85%,white)}
@media(max-width:480px) {
  .quiz-scene .answer-bar {flex-wrap:wrap}
  .quiz-scene .answer-bar>button {margin-left:auto}
}

/* Keep the shared modal frame and give the award name its own bilingual lines. */
.badge-modal .badge-dialog h2 {line-height:1.3;letter-spacing:normal}
.badge-dialog .badge-award-name {margin:8px 0 4px}
.badge-award-name :is(strong,span) {display:block}
.badge-award-name strong {color:#ffe070;font-size:18px}
.badge-dialog .badge-award-note {margin:4px 0 16px}

.intro-copy h1,.complete-scene>h2{text-transform:uppercase}
.mission-step b{word-break:normal}

/* INTRO and LEVEL UP reuse the Chapter 02 Mission 01 header and opening geometry. */
.cinema-header.opening-header > div { min-width: 0; justify-content: flex-end; }
.cinema-header.opening-header img { flex: 0 0 auto; }
.cinema-header.opening-header b { overflow-wrap: anywhere; }

.intro-scene {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 330px);
  grid-template-rows: auto 1fr;
  gap: 0 clamp(12px, 2vw, 28px);
  /* Two standard navigation rows precede the desktop scene. */
  min-height: max(620px, calc(100svh - 6.5rem));
  height: auto;
  padding-inline-end: 28px;
}
.intro-scene .cinema-vignette {
  background: linear-gradient(90deg, #020504ed, #07100da8 40%, #07100d38 62%, #0001),
    linear-gradient(180deg, transparent 55%, #020403bd);
}
.intro-scene .intro-copy {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
  width: auto;
  padding: 68px 0 32px 46px;
  container-type: inline-size;
}
.intro-scene .intro-copy h1 {
  font-size: clamp(42px, 13.5cqi, 82px);
  line-height: .83;
  letter-spacing: 1px;
}
.intro-copy .intro-subtitle { font-size: 17px; line-height: 1.45; }
.intro-subtitle span { display: block; }
.intro-subtitle span[lang="zh-CN"] { margin-top: 4px; font-size: 15px; }
.intro-copy .mission-line {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-block: 28px;
}
.mission-line .mission-step {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  min-width: 0;
  position: relative;
}
.mission-step:has(i) { padding-inline-end: 14px; }
.mission-step b { font-size: 9px; line-height: 1.45; overflow-wrap: anywhere; }
.mission-step i { position: absolute; right: 0; width: 9px; }
.intro-scene .parchment {
  width: 100% !important;
  padding: 14px 16px;
  overflow-wrap: anywhere;
  grid-column: 2;
  grid-row: 1 / -1;
  position: relative;
  inset: auto;
  align-self: end;
  justify-self: end;
  max-width: 100%;
  margin: 28px 0 32px;
}
body[data-course] .level-scene {
  background: radial-gradient(ellipse at 50% 43%, #13231bb5, #070d09e0 68%, #020403f3),
    url(./images/intro-hero.png) 50% / cover fixed !important;
  background-blend-mode: normal;
}
.level-scene .character-path {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
}
.level-scene .character-stage {
  display: grid;
  grid-template-rows: auto auto auto 1fr auto;
  gap: 6px;
  min-width: 0;
}
.level-scene .character-stage.green { --stage: #a7db3b; }
.level-scene .character-stage h3 { line-height: 1.25; overflow-wrap: anywhere; }
.level-scene .character-stage > b { position: static; align-self: end; margin-bottom: 0; }
.level-scene :is(.character-stage,.text-back):focus-visible {
  outline: 2px solid #a7db3b;
  outline-offset: 3px;
}

@media (max-width: 1000px) {
  .intro-copy .mission-line { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 12px; }
  .mission-step:nth-child(even) { padding-inline-end: 0; }
  .mission-step:nth-child(even) i { display: none; }
}
@media (max-width: 760px) {
  .cinema-header.opening-header { min-height: 58px; height: auto; gap: 8px; }
  .cinema-header.opening-header b { font-size: 8px; }
  .intro-scene { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto; padding-inline-end: 0; }
  .intro-scene .cinema-vignette {
    background: linear-gradient(90deg, #020504e8, #07100d9c 68%, #0002),
      linear-gradient(180deg, transparent 42%, #020403c9);
  }
  .intro-scene .intro-copy { padding: 48px 18px 28px; }
  .intro-scene .intro-copy h1 { font-size: clamp(42px,14vw,64px); }
  .intro-copy .intro-subtitle { font-size: 15px; }
  .intro-subtitle span[lang="zh-CN"] { font-size: 14px; }
  .intro-scene .parchment {
    width: min(calc(100% - 28px), 310px) !important;
    grid-column: 1;
    grid-row: 2;
    justify-self: center;
    right: auto !important;
    margin: 10px 14px 24px;
  }
  .level-scene .character-path { grid-template-columns: minmax(0, 1fr); }
  .level-scene .character-stage { grid-template-columns: minmax(70px, 110px) minmax(0, 1fr); }
  .level-scene .character-stage .character { grid-column: 1; grid-row: 1 / span 5; }
  .level-scene .character-stage .character img { width: min(100%,112px); }
  .level-scene .character-stage > :is(small,h3,p,b) { grid-column: 2; }
}

/* Scoped to the three HQA screens. Keep the full white-backed brand below ALL MISSIONS while scrolling. */
.cinema-app.opening-course { overflow: clip; }
.cinema-header.opening-header {
  position: sticky;
  top: var(--course-map-height, 0px);
  z-index: 20;
  background: #050806;
}
.cinema-header.opening-header > span { min-width: 0; }
.cinema-header.opening-header > div { flex: 0 1 auto; }
.cinema-header.opening-header small { white-space: nowrap; }
.intro-copy .mission-line { width: min(100%, 520px); }
.intro-copy .mission-step { min-height: 25px; }
.intro-copy .mission-step b { overflow-wrap: normal; }
.intro-copy .mission-step i { top: 50%; }
.intro-copy .mission-step span { box-sizing: border-box; flex: none; }
.intro-scene .intro-copy { align-self: start; }

.level-scene .character-stage > b { justify-self: center; }
.level-scene .character-stage p { align-self: start; }

/* C01M01 vocabulary: scene controls, centered thumbnail bar, image then language and footer. */
body[data-course] .learn-scene { padding-inline: 12px; overflow-x: clip; }
body[data-course] .learn-layout {
  width: 100%;
  max-width: none;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}
.learn-scene .learn-navigation {
  position: sticky;
  top: calc(var(--course-map-height, 0px) + var(--course-header-height, 0px));
  z-index: 10;
  background: #07100c;
}
.learn-scene .scene-top {
  height: auto;
  min-height: 64px;
  padding-block: 8px;
  gap: 8px;
  grid-template-columns: minmax(90px, 1fr) minmax(0, auto) minmax(46px, 1fr);
}
.learn-scene .scene-top > span { white-space: nowrap; }
.learn-scene .scene-top > button { min-height: 40px; text-align: left; }
.learn-scene .scene-top > div b { overflow-wrap: anywhere; }
.learn-scene .hotbar {
  width: 100%;
  padding-block: 4px 8px;
  max-width: none;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 54px));
  justify-content: center;
  gap: 7px;
  overflow: visible;
}
.learn-scene .hotbar > button { width: 100%; min-width: 0; height: 52px; }
.learn-scene .hotbar img {
  display: block;
  width: 34px;
  height: 34px;
  margin: auto;
  object-fit: contain;
  image-rendering: auto;
}
.learn-scene .item-stage {
  order: 2;
  width: 100%;
  max-width: none;
  min-width: 0;
  height: 230px;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.learn-scene .item-art {
  position: relative;
  display: block;
  width: min(170px, 65vw);
  height: min(170px, 65vw);
  max-width: none;
  max-height: 100%;
  margin: 0;
  transform: none;
  z-index: 1;
  object-fit: contain;
  image-rendering: auto;
}
.learn-scene .language-panel {
  order: 3;
  width: 100%;
  max-width: none;
  min-width: 0;
  border-left: 0;
  border-top: 1px solid #41573d;
  padding: 18px 10px;
  text-align: center;
}
.learn-scene .language-panel h2 { overflow-wrap: anywhere; }
.learn-scene :is(.mission-use,.speech) { text-align: left; }
.learn-scene .speech { grid-template-columns: 64px minmax(0, 1fr); align-items: center; }
.learn-scene .speech > .safety-officer {
  width: 60px;
  height: 60px;
  object-fit: contain;
  object-position: center bottom;
}
.learn-scene :is(.speech button,.mission-use p) { overflow-wrap: anywhere; }
.learn-scene .learn-controls { grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); gap: 8px; }
.learn-scene .learn-controls button { min-height: 36px; }
.learn-scene .learn-controls i { width: clamp(6px,2.2vw,18px); }

@media (max-width:760px) {
  .cinema-header.opening-header {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
  }
  .cinema-header.opening-header img { width: min(105px,30vw); }
  .cinema-header.opening-header > span {
    display: block;
    margin-left: 0;
    font-size: 8px;
    letter-spacing: .7px;
    overflow-wrap: anywhere;
  }
  .cinema-header.opening-header > div {
    display: grid;
    justify-items: end;
    gap: 3px;
    max-width: 130px;
    text-align: right;
  }
  .level-scene .character-stage > b { justify-self: start; }
}
@media (max-width:430px) {
  .learn-scene .item-stage { height: 200px; }
  .learn-scene .item-art { width: min(145px, 72vw); height: min(145px, 72vw); }
  .learn-scene .hotbar { grid-template-columns: repeat(6, minmax(0, 46px)); gap: 5px; }
  .learn-scene .hotbar > button { height: 46px; }
  .learn-scene .hotbar img { width: 30px; height: 30px; }
  .learn-scene .language-panel h2 { font-size: clamp(29px,10vw,42px); }
  .learn-scene .speech { grid-template-columns: 54px minmax(0, 1fr); }
  .learn-scene .speech > .safety-officer { width: 50px; height: 50px; }
}

/* HQA Vocabulary approved-layout bilingual display, translations pending user visual sign-off. */
.learn-scene .mission-use-translation { font-size: clamp(13px, 1.3vw, 16px); line-height: 1.65; color: #f2f5f1; margin: 7px 0 0; }
.learn-scene .example-translation { font-size: clamp(12px, 1.2vw, 15px); line-height: 1.55; color: #c8d6c4; margin: 6px 0 0; }
