/* Mission 04 only: Design a Functional Work Area content inside the Mission 01 visual system. */
body[data-course="chapter02-mission04"] .intro-scene{background-image:url(./images/intro-hero.png)!important}
body[data-course="chapter02-mission04"] .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-mission04"] .briefing-scene{background:linear-gradient(#07100de8,#030504f5),url(./images/intro-hero.png) 50%/cover fixed!important}
body[data-course="chapter02-mission04"] .complete-scene{background-image:url(./images/intro-hero.png)!important}

/* Vocabulary: exact Mission 01 page rhythm and information order. */
body[data-course="chapter02-mission04"] .learn-scene{padding-left:12px!important;padding-right:12px!important;overflow-x:hidden!important}
body[data-course="chapter02-mission04"] .learn-layout{width:100%!important;max-width:100%!important;grid-template-columns:minmax(0,1fr)!important;gap:12px!important}
body[data-course="chapter02-mission04"] .hotbar{order:1!important;width:100%!important;max-width:100%!important;display:grid!important;grid-template-columns:repeat(6,minmax(42px,54px))!important;justify-content:center!important;gap:7px!important;overflow:visible!important}
body[data-course="chapter02-mission04"] .hotbar button{width:100%!important;min-width:0!important;height:52px!important}
body[data-course="chapter02-mission04"] .hotbar button img{display:block!important;width:34px!important;height:34px!important;margin:auto!important;object-fit:contain!important}
body[data-course="chapter02-mission04"] .item-stage{order:2!important;width:100%!important;max-width:100%!important;height:230px!important;display:flex!important;align-items:center!important;justify-content:center!important;overflow:hidden!important}
body[data-course="chapter02-mission04"] .item-art{position:static!important;display:block!important;width:170px!important;height:170px!important;max-width:65vw!important;max-height:65vw!important;margin:0 auto!important;transform:none!important;object-fit:contain!important;object-position:center!important}
body[data-course="chapter02-mission04"] .language-panel{order:3!important;width:100%!important;max-width:100%!important;border-left:0!important;border-top:1px solid #41573d!important;padding:18px 10px!important;text-align:center!important}
body[data-course="chapter02-mission04"] :is(.mission-use,.speech){text-align:left!important}
body[data-course="chapter02-mission04"] .speech{grid-template-columns:64px minmax(0,1fr)!important;align-items:center!important}
body[data-course="chapter02-mission04"] .speech>.safety-officer{display:block!important;width:60px!important;height:60px!important;object-fit:contain!important;object-position:center bottom!important;align-self:end!important;filter:drop-shadow(0 4px 5px rgba(0,0,0,.45))!important}
body[data-course="chapter02-mission04"] .speech>div>small:before{content:"XM安全员 · ";color:#d7e5d8}

/* Briefing: Design a Functional Work Area content in the Mission 01 information architecture. */
body[data-course="chapter02-mission04"] .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-mission04"] .mission04-en{display:block;min-width:0}
body[data-course="chapter02-mission04"] .prompt-list button{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;text-align:left!important}
body[data-course="chapter02-mission04"] .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 Design a Functional Work Area image proportions. */
body[data-course="chapter02-mission04"] .quiz-item-art,body[data-course="chapter02-mission04"] .build-part img{object-fit:contain!important;object-position:center!important}

@media (width<=760px){
  body[data-course="chapter02-mission04"] .intro-scene{background-position:58% center!important}
  body[data-course="chapter02-mission04"] .hotbar{grid-template-columns:repeat(3,40px)!important;gap:5px!important}
  body[data-course="chapter02-mission04"] .hotbar button{height:46px!important}
  body[data-course="chapter02-mission04"] .hotbar button img{width:30px!important;height:30px!important}
  body[data-course="chapter02-mission04"] .item-stage{height:200px!important}
  body[data-course="chapter02-mission04"] .item-art{width:min(145px,72vw)!important;height:min(145px,72vw)!important}
  body[data-course="chapter02-mission04"] .speech{grid-template-columns:54px minmax(0,1fr)!important}
  body[data-course="chapter02-mission04"] .speech>.safety-officer{width:50px!important;height:50px!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}
/* Keep the Chapter 01 hero and let the parchment take its own space. */
.intro-scene {
  display:grid;grid-template-rows:auto 1fr;
  height:auto;min-height:max(620px,calc(100vh - 68px))
}
.intro-copy {container-type:inline-size;width:72%;padding-bottom:12px}
.intro-copy h1 {font-size:clamp(18px,9cqi,82px);letter-spacing:.015em}
.intro-copy .intro-subtitle {max-width:100%;font-size:clamp(15px,2.9cqi,19px)}
.intro-copy .intro-subtitle span {display:block}
.intro-scene .parchment {
  position:relative;inset:auto;justify-self:end;align-self:end;margin:8px 28px 32px
}
.complete-scene>h2 {overflow-wrap:normal}
.mission-line {flex-wrap:wrap;row-gap:8px}
.mission-line .mission-step {display:flex;flex:none;align-items:center;gap:8px}
.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-board header {grid-template-columns:minmax(0,1fr);align-items:start;padding-bottom:14px}
.briefing-board header h2 {color:#fff}
.briefing-objective {
  margin-top:14px;padding:12px 14px;border-left:3px solid var(--accent);background:#111b15
}
.briefing-objective p {margin:0;color:#e4e8e4;font-size:11px;line-height:1.7;overflow-wrap:anywhere}
.briefing-objective p[lang="zh-CN"] {margin-top:4px;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}
.briefing-board .task-columns article {min-width:0}
.briefing-board .prompt-list .mission04-en {color:inherit;font-size:inherit;line-height:1.55}
.briefing-board .improve-challenge {margin-top:0}
.briefing-board footer {row-gap:14px}
.briefing-board footer p {margin:6px 0 8px}
.briefing-board footer>div>button {min-height:28px}
@media(max-width:760px) {
  .briefing-board .task-columns {grid-template-columns:minmax(0,1fr)}
}

/* Use the shared parchment dimensions and title; group each English line with its translation. */
.parchment :is(h3,.intro-summary,.intro-objectives li)>span {display:block}
.parchment h3>span+span {font-size:.8em;margin-top:3px}
.parchment .intro-summary {margin-block:0 12px}
.parchment :is(.intro-summary,.intro-objectives li)>span+span {margin-top:2px}
.parchment .intro-objectives li>span[lang="en"] {font-weight:800}
.parchment .intro-objectives {margin:5px 0 9px;padding:0;list-style:none;position:relative}
.parchment .intro-objectives li {font-size:10px;line-height:1.45;font-weight:700;padding-left:12px;position:relative}
.parchment .intro-objectives li+li {margin-top:7px}
.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)}
}

/* Keep the title and longer bilingual parchment in normal flow on narrow screens. */
@media(max-width:760px) {
  .intro-scene {min-height:max(630px,calc(100vh - 58px))}
  .intro-copy {width:100%}
  .intro-scene .parchment {position:relative;right:auto!important;bottom:auto;margin:8px 14px 24px;justify-self:end}
}

/* 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 .quiz-option {min-width:0}
.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}
