:root {
  --ink: #20201e;
  --muted: #66625d;
  --paper: #f6f3ed;
  --surface: #ffffff;
  --line: #ded8cd;
  --gold: #b78a3b;
  --green: #2e6d61;
  --red: #a84634;
  --blue: #365f7c;
  --shadow: 0 18px 50px rgba(36, 32, 26, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(120deg, rgba(46, 109, 97, 0.1), transparent 42%),
    linear-gradient(180deg, #fbfaf7 0%, var(--paper) 100%);
  color: var(--ink);
  font-family: "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", system-ui, sans-serif;
  letter-spacing: 0;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: 22px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 88px;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0;
}

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

h1 {
  margin-bottom: 0;
  font-size: clamp(1.65rem, 2.4vw, 2.35rem);
  line-height: 1.18;
  font-weight: 760;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(1.28rem, 2vw, 1.85rem);
  line-height: 1.28;
}

h3 {
  margin-bottom: 12px;
  font-size: 1rem;
  line-height: 1.45;
}

.status-cluster {
  display: grid;
  grid-template-columns: minmax(120px, auto) minmax(140px, 220px) auto;
  align-items: center;
  gap: 12px;
}

.status-label {
  display: block;
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 0.76rem;
}

.progress-track {
  height: 10px;
  overflow: hidden;
  border-radius: 99px;
  background: #e9e1d4;
}

.progress-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--gold));
  transition: width 0.3s ease;
}

.score-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 54px;
  height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(183, 138, 59, 0.36);
  border-radius: 999px;
  background: #fff8ea;
  color: #6f4c12;
  font-weight: 700;
  white-space: nowrap;
}

.mode-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin: 18px 0;
  padding-bottom: 4px;
}

.mode-tab,
.primary-action,
.secondary-action,
.source-chip {
  min-height: 40px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.75);
  color: var(--ink);
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.mode-tab {
  flex: 0 0 auto;
  padding: 0 16px;
  font-weight: 700;
}

.mode-tab:hover,
.module-button:hover,
.choice-button:hover,
.source-chip:hover,
.primary-action:hover,
.secondary-action:hover {
  transform: translateY(-1px);
  border-color: rgba(46, 109, 97, 0.55);
}

.mode-tab.is-active {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

.workspace {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 18px;
}

body:not([data-view="study"]) .workspace {
  grid-template-columns: 1fr;
}

body:not([data-view="study"]) .sidebar {
  display: none;
}

.sidebar,
.content-surface {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow);
}

.sidebar {
  align-self: start;
  padding: 16px;
  position: sticky;
  top: 16px;
}

.search-wrap {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}

.search-wrap label,
.sidebar-title {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.search-wrap input {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  outline: none;
}

.search-wrap input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(46, 109, 97, 0.14);
}

.module-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.module-button {
  width: 100%;
  min-height: 62px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  text-align: left;
}

.module-button span,
.module-button small {
  display: block;
}

.module-button span {
  margin-bottom: 4px;
  font-weight: 760;
}

.module-button small {
  color: var(--muted);
  font-size: 0.78rem;
}

.module-button.is-active {
  border-color: rgba(46, 109, 97, 0.6);
  background: #eef7f3;
}

.content-surface {
  min-height: 650px;
  padding: clamp(18px, 3vw, 30px);
}

.view-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.primary-action,
.secondary-action,
.source-chip {
  padding: 0 16px;
  font-weight: 760;
}

.primary-action {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

.secondary-action {
  background: #fff;
}

.goal-line {
  margin-bottom: 20px;
  padding: 14px 16px;
  border-left: 4px solid var(--gold);
  border-radius: 0 8px 8px 0;
  background: #fff8ea;
  color: #50463a;
  line-height: 1.75;
}

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

.lesson-block,
.risk-card,
.checklist-group,
.qa-item,
.source-item,
.reference-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 18px;
}

.lesson-block.accent {
  border-color: rgba(46, 109, 97, 0.34);
  background: #f3fbf8;
}

.clean-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 1.15rem;
  color: #373330;
  line-height: 1.7;
}

.clean-list li::marker {
  color: var(--gold);
}

.source-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 12px;
}

.source-chip {
  min-height: 36px;
  color: #4d4033;
}

.inline-note,
.feedback-box {
  border: 1px dashed rgba(102, 98, 93, 0.38);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.68);
  color: #504d49;
  line-height: 1.7;
  padding: 14px 16px;
}

.choice-list {
  display: grid;
  gap: 10px;
  margin: 18px 0;
}

.choice-button {
  min-height: 54px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  line-height: 1.5;
}

.choice-button.is-correct {
  border-color: rgba(46, 109, 97, 0.65);
  background: #eef7f3;
}

.choice-button.is-wrong {
  border-color: rgba(168, 70, 52, 0.6);
  background: #fff1ee;
}

.step-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.risk-card {
  min-height: 280px;
  display: grid;
  align-content: center;
  gap: 16px;
  background:
    linear-gradient(135deg, rgba(46, 109, 97, 0.12), transparent 50%),
    #fff;
}

.risk-label {
  width: max-content;
  padding: 6px 10px;
  border: 1px solid rgba(183, 138, 59, 0.42);
  border-radius: 999px;
  color: #6f4c12;
  font-size: 0.82rem;
  font-weight: 760;
}

.risk-card h3 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(1.35rem, 2vw, 2rem);
  line-height: 1.35;
}

.card-answer {
  margin: 0;
  color: #373330;
  line-height: 1.8;
}

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

.checklist-group {
  align-self: start;
}

.check-row {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 10px;
  align-items: start;
  padding: 10px 0;
  border-top: 1px solid #eee8dd;
  line-height: 1.55;
}

.check-row:first-of-type {
  border-top: 0;
}

.check-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--green);
  margin-top: 2px;
}

.qa-list,
.source-list {
  display: grid;
  gap: 12px;
}

.qa-item p,
.reference-box p {
  margin-bottom: 12px;
  color: #403c38;
  line-height: 1.8;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-row span {
  padding: 4px 9px;
  border-radius: 999px;
  background: #f1ece3;
  color: #5a5147;
  font-size: 0.78rem;
  font-weight: 700;
}

.source-chip.is-selected {
  border-color: var(--green);
  background: #eef7f3;
  color: var(--green);
}

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

.learning-flow div {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 8px 10px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.learning-flow span {
  grid-row: span 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: #ede5d8;
  color: #5b5146;
  font-weight: 800;
}

.learning-flow strong,
.learning-flow small {
  display: block;
}

.learning-flow small {
  color: var(--muted);
}

.learning-flow .is-current {
  border-color: var(--green);
  background: #eef7f3;
}

.learning-flow .is-current span {
  background: var(--green);
  color: #fff;
}

.beginner-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  gap: 16px;
  align-items: start;
}

.beginner-card {
  position: relative;
  overflow: hidden;
  min-height: 440px;
  padding: clamp(22px, 4vw, 42px);
  border: 1px solid rgba(46, 109, 97, 0.24);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(46, 109, 97, 0.11), transparent 42%),
    linear-gradient(180deg, #fff, #fbfaf6);
}

.beginner-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  margin-bottom: 18px;
  border-radius: 999px;
  background: var(--green);
  color: #fff;
  font-size: 1.25rem;
  font-weight: 800;
}

.beginner-simple {
  max-width: 780px;
  margin-bottom: 24px;
  color: #332f2b;
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  font-weight: 760;
  line-height: 1.75;
}

.beginner-section {
  max-width: 760px;
  margin-bottom: 18px;
}

.practice-box {
  max-width: 760px;
  margin: 18px 0;
  padding: 16px 18px;
  border: 1px solid rgba(183, 138, 59, 0.34);
  border-radius: 8px;
  background: #fff8ea;
}

.practice-box p {
  margin-bottom: 0;
  color: #4a4035;
  font-weight: 700;
  line-height: 1.75;
}

.beginner-map {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.route-step {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 10px;
  align-items: center;
  min-height: 54px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfaf7;
  text-align: left;
}

.route-step span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: #ede5d8;
  color: #5b5146;
  font-weight: 800;
}

.route-step strong {
  font-size: 0.9rem;
  line-height: 1.35;
}

.route-step.is-active {
  border-color: var(--green);
  background: #eef7f3;
}

.route-step.is-active span {
  background: var(--green);
  color: #fff;
}

.route-step.is-done strong::after {
  content: " 已學會";
  color: var(--green);
  font-size: 0.76rem;
}

.beginner-primer {
  display: grid;
  grid-template-columns: 1.25fr repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}

.beginner-primer div {
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.beginner-primer strong,
.beginner-primer span {
  display: block;
}

.beginner-primer strong {
  margin-bottom: 5px;
}

.beginner-primer span {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.55;
}

.challenge-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 12px;
  margin-bottom: 14px;
}

.challenge-brief,
.qa-search-panel,
.advanced-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.challenge-brief {
  padding: 16px;
}

.challenge-brief.soft {
  background: #fbfaf7;
}

.challenge-kicker {
  display: block;
  margin-bottom: 5px;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 800;
}

.challenge-brief p {
  margin-bottom: 14px;
  color: #3c3732;
  line-height: 1.72;
}

.challenge-progress {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.challenge-progress button {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-weight: 800;
}

.challenge-progress button.is-active {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

.challenge-progress button.is-done {
  border-color: rgba(46, 109, 97, 0.55);
  box-shadow: inset 0 -4px 0 rgba(46, 109, 97, 0.2);
}

.challenge-result {
  display: grid;
  gap: 5px;
  margin-bottom: 10px;
  padding: 14px 16px;
  border-radius: 8px;
}

.challenge-result.is-pass {
  border: 1px solid rgba(46, 109, 97, 0.45);
  background: #eef7f3;
  color: #204e45;
}

.challenge-result.is-try {
  border: 1px solid rgba(183, 138, 59, 0.45);
  background: #fff8ea;
  color: #5d431c;
}

.check-result-list {
  display: grid;
  gap: 8px;
}

.check-result-list div {
  display: grid;
  gap: 4px;
  padding: 11px 12px;
  border-radius: 8px;
  line-height: 1.5;
}

.check-result-list .is-ok {
  border: 1px solid rgba(46, 109, 97, 0.26);
  background: #f3fbf8;
}

.check-result-list .is-miss {
  border: 1px solid rgba(168, 70, 52, 0.22);
  background: #fff5f2;
}

.simulator-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 16px;
  align-items: start;
}

.sim-preview-panel,
.camera-body-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 16px;
}

.sim-stage {
  position: relative;
  overflow: hidden;
  min-height: 430px;
  border-radius: 8px;
  background: #191613;
  isolation: isolate;
}

.scene-world {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background:
    linear-gradient(180deg, #b9aa94 0%, #8f806b 54%, #4a3d32 55%, #302821 100%);
  filter: brightness(var(--sim-brightness));
}

.scene-world::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.08), transparent 32%, rgba(0, 0, 0, 0.2)),
    repeating-linear-gradient(90deg, rgba(52, 40, 30, 0.34) 0 7px, transparent 7px 16px);
  opacity: 0.7;
}

.scene-projector .projection-screen {
  opacity: 0.92;
  box-shadow: 0 0 80px rgba(229, 240, 255, 0.75);
}

.scene-dim {
  background:
    linear-gradient(180deg, #756751 0%, #584736 54%, #35291f 55%, #211a16 100%);
}

.scene-stage {
  background:
    radial-gradient(circle at 52% 30%, rgba(255, 225, 176, 0.52), transparent 24%),
    linear-gradient(180deg, #463627 0%, #2b2423 54%, #211c1b 55%, #171314 100%);
}

.projection-screen,
.wall-frame,
.plant-shape {
  filter: blur(var(--sim-bg-blur));
}

.projection-screen {
  position: absolute;
  left: 7%;
  top: 16%;
  width: 30%;
  height: 24%;
  border: 8px solid rgba(76, 62, 47, 0.55);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.82), rgba(174, 203, 224, 0.72)),
    linear-gradient(90deg, rgba(255, 255, 255, 0.35), transparent);
  opacity: 0.55;
}

.wall-frame {
  position: absolute;
  right: 9%;
  top: 11%;
  width: 22%;
  height: 32%;
  border: 8px solid rgba(70, 54, 40, 0.4);
  background: rgba(245, 232, 205, 0.25);
}

.plant-shape {
  position: absolute;
  right: 16%;
  top: 5%;
  width: 18%;
  height: 36%;
  border-radius: 50% 44% 48% 42%;
  background:
    radial-gradient(circle at 35% 42%, rgba(68, 120, 71, 0.7) 0 8%, transparent 9%),
    radial-gradient(circle at 54% 30%, rgba(58, 106, 60, 0.72) 0 9%, transparent 10%),
    radial-gradient(circle at 62% 56%, rgba(84, 138, 78, 0.7) 0 10%, transparent 11%),
    linear-gradient(90deg, transparent 48%, rgba(68, 50, 35, 0.7) 49% 52%, transparent 53%);
}

.speaker {
  position: absolute;
  left: 48%;
  top: 30%;
  width: 120px;
  height: 210px;
  transform: translateX(-50%);
  filter: blur(var(--sim-motion));
  transform-origin: 50% 50%;
}

.speaker-head,
.speaker-body,
.speaker-arm {
  position: absolute;
  display: block;
}

.speaker-head {
  left: 39px;
  top: 0;
  width: 42px;
  height: 48px;
  border-radius: 48% 48% 45% 45%;
  background: #d5a988;
  box-shadow: inset -7px -8px 0 rgba(91, 52, 34, 0.08);
}

.speaker-body {
  left: 28px;
  top: 48px;
  width: 64px;
  height: 120px;
  border-radius: 24px 24px 8px 8px;
  background: #1f2427;
}

.speaker-arm {
  top: 66px;
  width: 18px;
  height: 86px;
  border-radius: 99px;
  background: #d2a181;
}

.arm-left {
  left: 13px;
  transform: rotate(20deg);
}

.arm-right {
  right: 13px;
  transform: rotate(-24deg);
}

.desk-shape {
  position: absolute;
  left: 23%;
  right: 12%;
  bottom: 24%;
  height: 10%;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(120, 74, 45, 0.92), rgba(62, 36, 25, 0.96));
  box-shadow: 0 16px 24px rgba(0, 0, 0, 0.24);
}

.audience-row {
  position: absolute;
  left: 2%;
  right: 2%;
  height: 56px;
  border-radius: 50% 50% 0 0;
  background:
    radial-gradient(circle at 8% 46%, #2b2927 0 15px, transparent 16px),
    radial-gradient(circle at 20% 42%, #35302d 0 13px, transparent 14px),
    radial-gradient(circle at 33% 52%, #2d2826 0 16px, transparent 17px),
    radial-gradient(circle at 48% 44%, #38302c 0 14px, transparent 15px),
    radial-gradient(circle at 63% 52%, #292624 0 16px, transparent 17px),
    radial-gradient(circle at 78% 45%, #3b332e 0 14px, transparent 15px),
    radial-gradient(circle at 91% 50%, #2f2a27 0 16px, transparent 17px);
  opacity: 0.85;
  filter: blur(calc(var(--sim-bg-blur) * 0.5));
}

.row-one {
  bottom: 8%;
}

.row-two {
  bottom: 1%;
  opacity: 0.68;
}

.camera-hud {
  position: absolute;
  left: 14px;
  right: 14px;
  top: 14px;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: rgba(255, 255, 255, 0.92);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.78rem;
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.5);
}

.camera-hud span:not(.rec-dot) {
  padding: 4px 7px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.34);
}

.rec-dot {
  width: 10px;
  height: 10px;
  margin-top: 7px;
  border-radius: 999px;
  background: #e34030;
  box-shadow: 0 0 12px #e34030;
}

.focus-box {
  position: absolute;
  left: calc(48% - 46px);
  top: 26%;
  z-index: 6;
  width: 92px;
  height: 94px;
  border: 2px solid rgba(137, 234, 164, 0.88);
  color: rgba(137, 234, 164, 0.96);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.72rem;
  padding: 5px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.sim-noise,
.sim-warm-overlay,
.sim-cool-overlay,
.sim-over-overlay,
.sim-under-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 7;
}

.sim-noise {
  background:
    repeating-radial-gradient(circle at 15% 20%, rgba(255, 255, 255, 0.42) 0 1px, transparent 1px 4px),
    repeating-radial-gradient(circle at 70% 68%, rgba(0, 0, 0, 0.35) 0 1px, transparent 1px 5px);
  mix-blend-mode: overlay;
  opacity: calc(var(--sim-noise) * 0.34);
}

.sim-warm-overlay {
  background: rgba(255, 171, 72, calc(var(--sim-warm) * 0.34));
  mix-blend-mode: soft-light;
}

.sim-cool-overlay {
  background: rgba(74, 144, 255, calc(var(--sim-cool) * 0.38));
  mix-blend-mode: soft-light;
}

.sim-over-overlay {
  background: rgba(255, 255, 255, calc(var(--sim-over) * 0.42));
}

.sim-under-overlay {
  background: rgba(0, 0, 0, calc(var(--sim-under) * 0.46));
}

.meter-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin: 14px 0;
}

.exposure-meter {
  position: relative;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: linear-gradient(90deg, #26313d, #ede4d0 48%, #fff4bf);
}

.exposure-meter span {
  position: absolute;
  top: 5px;
  width: 1px;
  height: 16px;
  background: rgba(32, 32, 30, 0.45);
}

.exposure-meter span:nth-child(1) { left: 10%; }
.exposure-meter span:nth-child(2) { left: 30%; }
.exposure-meter span:nth-child(3) { left: 50%; height: 20px; top: 3px; }
.exposure-meter span:nth-child(4) { left: 70%; }
.exposure-meter span:nth-child(5) { left: 90%; }

.exposure-meter strong {
  position: absolute;
  top: 50%;
  width: 16px;
  height: 16px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.28);
  transform: translate(-50%, -50%);
}

.meter-readout {
  color: #4d4338;
  font-weight: 760;
  white-space: nowrap;
}

.sim-status-grid,
.dial-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.sim-status-grid div {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfaf7;
}

.sim-status-grid strong,
.sim-status-grid span {
  display: block;
}

.sim-status-grid span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.78rem;
}

.sim-preset-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.dial-grid {
  margin: 14px 0;
}

.dial-control {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfaf7;
}

.dial-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.dial-head em {
  color: var(--green);
  font-style: normal;
  font-weight: 780;
}

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

.dial-control small {
  color: var(--muted);
  line-height: 1.55;
}

.camera-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.qa-search-panel {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
  padding: 16px;
}

.qa-search-panel label {
  color: var(--muted);
  font-weight: 800;
}

.qa-search-panel input {
  width: 100%;
  min-height: 46px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
}

.qa-search-panel input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(46, 109, 97, 0.14);
}

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

.advanced-card {
  min-height: 120px;
  padding: 18px;
  text-align: left;
}

.advanced-card span,
.advanced-card strong {
  display: block;
}

.advanced-card span {
  margin-bottom: 10px;
  color: var(--gold);
  font-size: 0.82rem;
  font-weight: 800;
}

.advanced-card strong {
  font-size: 1.05rem;
  line-height: 1.45;
}

@media (max-width: 980px) {
  .topbar {
    display: grid;
  }

  .status-cluster {
    grid-template-columns: minmax(120px, auto) minmax(120px, 1fr) auto;
  }

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

  .sidebar {
    order: 2;
    position: static;
  }

  .content-surface {
    order: 1;
  }

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

  .checklist-grid,
  .advanced-grid,
  .beginner-layout,
  .challenge-layout,
  .simulator-layout,
  .two-column {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 640px) {
  .app-shell {
    padding: 12px;
  }

  .topbar,
  .content-surface,
  .sidebar {
    padding: 16px;
  }

  .status-cluster,
  .view-heading,
  .module-list {
    grid-template-columns: 1fr;
  }

  .view-heading {
    display: grid;
  }

  .primary-action,
  .secondary-action {
    width: 100%;
  }

  .sim-stage {
    min-height: 330px;
  }

  .meter-row,
  .learning-flow,
  .beginner-primer,
  .sim-status-grid,
  .dial-grid {
    grid-template-columns: 1fr;
  }

  .speaker {
    left: 52%;
    transform: translateX(-50%) scale(0.82);
  }
}
