    @font-face { font-family: "Barlow"; src: url("./assets/fonts/barlow-latin-400-normal.woff2") format("woff2"); font-style: normal; font-weight: 400; font-display: swap; }
    @font-face { font-family: "Barlow"; src: url("./assets/fonts/barlow-latin-500-normal.woff2") format("woff2"); font-style: normal; font-weight: 500; font-display: swap; }
    @font-face { font-family: "Barlow"; src: url("./assets/fonts/barlow-latin-600-normal.woff2") format("woff2"); font-style: normal; font-weight: 600; font-display: swap; }
    @font-face { font-family: "Barlow Semi Condensed"; src: url("./assets/fonts/barlow-semi-condensed-latin-500-normal.woff2") format("woff2"); font-style: normal; font-weight: 500; font-display: swap; }
    @font-face { font-family: "Barlow Semi Condensed"; src: url("./assets/fonts/barlow-semi-condensed-latin-600-normal.woff2") format("woff2"); font-style: normal; font-weight: 600; font-display: swap; }
    @font-face { font-family: "Barlow Semi Condensed"; src: url("./assets/fonts/barlow-semi-condensed-latin-700-normal.woff2") format("woff2"); font-style: normal; font-weight: 700; font-display: swap; }
    @font-face { font-family: "JetBrains Mono"; src: url("./assets/fonts/jetbrains-mono-latin-400-normal.woff2") format("woff2"); font-style: normal; font-weight: 400; font-display: swap; }
    @font-face { font-family: "JetBrains Mono"; src: url("./assets/fonts/jetbrains-mono-latin-500-normal.woff2") format("woff2"); font-style: normal; font-weight: 500; font-display: swap; }
    :root {
      --world: #0a234f;
      --world-raised: #123a73;
      --paper: #f7f3e8;
      --paper-deep: #ede6d6;
      --surface: #ffffff;
      --ink: #17233d;
      --ink-soft: #58657d;
      --line: #d9d5c9;
      --signal: #ffc93c;
      --action: #3f58d9;
      --circuit: #25c5c0;
      --physical: #f26a4f;
      --success: #137a54;
      --warning: #d98a00;
      --error: #b83d45;
      --lab: #081f4a;
      --lab-raised: #0c2b5c;
      --lab-line: #2a5791;
      --lab-text: #f5f9ff;
      --lab-soft: #b9cde9;
      --shadow: 0 18px 50px rgba(25, 34, 59, .13);
      --radius-xl: 24px;
      --radius-lg: 18px;
      --radius-md: 12px;
      --fast: 120ms;
      --panel: 220ms;
      --travel: 360ms;
      --appbar: 76px;
      --safe-top: env(safe-area-inset-top, 0px);
      --safe-bottom: env(safe-area-inset-bottom, 0px);
      --bottom-ui-gap: var(--safe-bottom);
      --nav-safe-gap: 0px;
      --app-height: 100dvh;
      --font-cond: "Barlow Semi Condensed", "Barlow", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
      --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
    }

    * { box-sizing: border-box; }
    html, body { width: 100%; height: 100%; min-height: 0; }
    html { background: var(--world); }
    html.ios-browser { --bottom-ui-gap: 0px; }
    body {
      position: fixed; inset: 0;
      width: 100%; height: var(--app-height);
      margin: 0;
      color: var(--ink);
      background: var(--world);
      font-family: "Barlow", "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
      font-size: 16px;
      line-height: 1.55;
      overflow: hidden;
      overscroll-behavior: none;
      -webkit-font-smoothing: antialiased;
      text-rendering: optimizeLegibility;
    }
    button, textarea, input { font: inherit; }
    button { cursor: pointer; }
    button:focus-visible, a:focus-visible, textarea:focus-visible {
      outline: 3px solid #fff;
      outline-offset: 3px;
      box-shadow: 0 0 0 6px var(--action);
    }
    button:disabled { cursor: not-allowed; }
    svg { display: block; }
    .sr-only {
      position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
      overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
    }
    .icon { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
    .icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
    .skip-link {
      position: fixed; top: 10px; left: 10px; z-index: 1000; transform: translateY(-150%);
      padding: 12px 18px; background: var(--signal); color: var(--ink); border-radius: 10px; font-weight: 900;
    }
    .skip-link:focus { transform: none; }

    .app-shell {
      width: 100%; height: 100%; min-height: 0; padding-top: calc(var(--safe-top) + var(--nav-safe-gap));
      display: flex; flex-direction: column; overflow: hidden;
      background: var(--world);
    }
    .app-shell[data-screen="map"],
    .app-shell[data-screen="create"] {
      background: var(--world);
    }
    .appbar {
      height: var(--appbar); flex: 0 0 var(--appbar);
      display: grid; grid-template-columns: minmax(220px, 1fr) auto minmax(220px, 1fr);
      align-items: center; gap: 20px; padding: 0 24px;
      position: relative; z-index: 30;
      background: var(--paper);
      border-bottom: 1px solid var(--line);
      transition: color var(--panel), background var(--panel), border-color var(--panel);
    }
    .app-shell[data-screen="map"] .appbar,
    .app-shell[data-screen="create"] .appbar {
      color: #fff; background: #0a234f; border-color: rgba(255, 255, 255, .14);
    }
    .brand {
      display: inline-flex; align-items: center; gap: 12px; justify-self: start;
      color: inherit; text-decoration: none; min-width: 0;
    }
    .brandmark {
      width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center;
      color: var(--ink); background: var(--signal);
      border: 1px solid rgba(23, 35, 61, .18); box-shadow: 0 7px 18px rgba(20, 32, 67, .18);
      transform: rotate(-3deg);
    }
    .brandmark .icon { width: 26px; height: 26px; stroke-width: 2.2; }
    .brand-copy { min-width: 0; }
    .brand-copy b { display: block; font-size: 18px; line-height: 1.2; letter-spacing: .02em; white-space: nowrap; }
    .brand-copy small { display: block; margin-top: 3px; font-size: 10px; font-weight: 800; letter-spacing: .16em; opacity: .62; white-space: nowrap; }
    .main-nav {
      display: flex; align-items: center; gap: 6px; padding: 5px;
      border-radius: 14px; background: rgba(23, 35, 61, .06); border: 1px solid rgba(23, 35, 61, .08);
    }
    .app-shell[data-screen="map"] .main-nav,
    .app-shell[data-screen="create"] .main-nav { background: #143a6a; border-color: rgba(173,210,255,.2); }
    .main-nav button {
      min-width: 44px; min-height: 44px; padding: 0 16px; border: 0; border-radius: 10px;
      display: flex; align-items: center; gap: 8px;
      color: inherit; background: transparent; font-weight: 800; font-size: 14px;
      transition: background var(--fast), color var(--fast), transform var(--fast);
    }
    .main-nav button:hover { background: rgba(255,255,255,.7); color: var(--ink); }
    .app-shell[data-screen="map"] .main-nav button:hover,
    .app-shell[data-screen="create"] .main-nav button:hover { background: rgba(255,255,255,.12); color: #fff; }
    .main-nav button[aria-current="page"] { background: #fff; color: var(--ink); box-shadow: 0 4px 12px rgba(16,26,54,.09); }
    .app-shell[data-screen="map"] .main-nav button[aria-current="page"],
    .app-shell[data-screen="create"] .main-nav button[aria-current="page"] { background: var(--signal); color: var(--ink); }
    .main-nav .icon { width: 20px; height: 20px; }
    .utility-bar { justify-self: end; display: flex; align-items: center; gap: 8px; }
    .icon-button {
      width: 44px; height: 44px; border: 1px solid rgba(23,35,61,.12); border-radius: 12px;
      display: grid; place-items: center; color: inherit; background: rgba(255,255,255,.66);
      transition: background var(--fast), color var(--fast), transform var(--fast);
    }
    .app-shell[data-screen="map"] .icon-button,
    .app-shell[data-screen="create"] .icon-button { background: #143a6a; border-color: rgba(173,210,255,.2); }
    .icon-button:hover { transform: translateY(-1px); background: var(--surface); color: var(--ink); }
    .app-shell[data-screen="map"] .icon-button:hover,
    .app-shell[data-screen="create"] .icon-button:hover { background: rgba(255,255,255,.16); color: #fff; }
    .icon-button[aria-pressed="true"] { background: var(--signal); color: var(--ink); border-color: var(--signal); }
    .profile-chip {
      height: 48px; display: flex; align-items: center; gap: 9px; padding: 4px 12px 4px 5px;
      border: 1px solid rgba(23,35,61,.1); border-radius: 14px; background: rgba(255,255,255,.62); color: inherit;
    }
    .app-shell[data-screen="map"] .profile-chip,
    .app-shell[data-screen="create"] .profile-chip { background: #143a6a; border-color: rgba(173,210,255,.2); }
    .avatar {
      width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px;
      color: var(--world); background: #dff4ef;
    }
    .profile-chip b { display: block; font-size: 13px; line-height: 1.2; }
    .profile-chip small { display: block; margin-top: 2px; font-size: 10px; color: inherit; opacity: .64; }

    .view { flex: 1; min-height: 0; display: none; overflow: hidden; }
    .view.active { display: flex; flex-direction: column; animation: viewIn var(--panel) ease-out both; }
    @keyframes viewIn { from { opacity: .4; transform: translateY(5px); } to { opacity: 1; transform: none; } }

    .eyebrow {
      display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 900;
      letter-spacing: .12em; text-transform: uppercase;
    }
    .eyebrow::before { content: ""; width: 18px; height: 2px; border-radius: 2px; background: currentColor; }
    .primary, .secondary, .quiet {
      min-height: 52px; border-radius: var(--radius-md); padding: 0 20px;
      display: inline-flex; align-items: center; justify-content: center; gap: 10px;
      font-weight: 900; font-size: 17px; border: 1px solid transparent;
      transition: transform var(--fast), box-shadow var(--fast), background var(--fast), color var(--fast);
    }
    .primary { color: var(--ink); background: var(--signal); border-color: #e9b62d; box-shadow: 0 8px 18px rgba(74, 55, 9, .16); }
    .primary:hover { transform: translateY(-2px); box-shadow: 0 12px 25px rgba(74, 55, 9, .2); }
    .primary.action { color: #fff; background: var(--action); border-color: var(--action); }
    .primary:disabled { transform: none; opacity: .42; box-shadow: none; }
    .secondary { color: var(--ink); background: var(--surface); border-color: var(--line); }
    .secondary:hover { border-color: #aeb5c5; transform: translateY(-1px); }
    .quiet { color: var(--ink-soft); background: transparent; border-color: transparent; }
    .quiet:hover { color: var(--ink); background: rgba(23,35,61,.06); }
    .primary .icon, .secondary .icon, .quiet .icon { width: 21px; height: 21px; }

    /* Exploration map */
    .view-map { background: var(--world); color: #fff; }
    .map-grid { flex: 1; min-height: 0; display: grid; grid-template-columns: 340px minmax(0,1fr); }
    .map-brief {
      position: relative; z-index: 4; padding: clamp(22px, 3.4vw, 42px) 18px clamp(20px, 3vw, 34px) clamp(24px, 3.2vw, 42px);
      display: flex; flex-direction: column; gap: 22px; justify-content: center;
      background: linear-gradient(90deg, rgba(10,35,79,.985) 0%, rgba(10,35,79,.94) 72%, rgba(10,35,79,0) 100%);
    }
    .map-kicker { color: var(--signal); }
    .map-brief h1 { margin: 13px 0 10px; max-width: 8.5em; font-size: clamp(36px, 4.4vw, 58px); line-height: 1.08; letter-spacing: -.055em; }
    .map-brief h1 em { font-style: normal; color: var(--signal); }
    .map-lead { margin: 0; max-width: 28em; color: #c8d2e8; font-size: 17px; line-height: 1.75; }
    .chapter-progress { display: flex; align-items: center; gap: 12px; color: #dce5f6; font-size: 14px; font-weight: 750; }
    .chapter-progress .track { width: 118px; height: 8px; overflow: hidden; background: rgba(255,255,255,.13); border-radius: 99px; }
    .chapter-progress .track span { display: block; width: 20%; height: 100%; background: var(--signal); border-radius: inherit; }
    .mission-callout {
      width: min(100%, 330px); padding: 20px; color: var(--ink);
      background: var(--paper); border: 1px solid rgba(255,255,255,.54); border-radius: var(--radius-lg);
      box-shadow: 0 22px 54px rgba(0,0,0,.28); position: relative;
    }
    .mission-callout::before {
      content: ""; position: absolute; width: 7px; inset: 18px auto 18px 0;
      border-radius: 0 6px 6px 0; background: var(--signal);
    }
    .mission-callout::after {
      content: ""; position: absolute; inset: -1px; z-index: -1; border-radius: inherit;
      background: radial-gradient(circle at 88% 12%, rgba(255,201,60,.2), transparent 38%);
      pointer-events: none;
    }
    .map-callout-aura {
      position: absolute; z-index: 1; left: 50%; bottom: 18%; width: 310px; height: 310px;
      border-radius: 50%; pointer-events: none; transform: translateX(-50%);
      background: radial-gradient(circle, color-mix(in srgb, var(--series-accent) 26%, transparent), transparent 68%);
      filter: blur(16px);
      animation: harborStar 4.8s ease-in-out infinite alternate;
    }
    @keyframes harborStar {
      from { opacity: .4; transform: translateX(-50%) scale(.88); }
      to { opacity: .9; transform: translateX(-50%) scale(1.12); }
    }
    .mission-callout .callout-top { display: flex; align-items: center; gap: 8px; color: var(--action); font-size: 12px; font-weight: 900; letter-spacing: .08em; }
    .mission-callout h2 { margin: 9px 0 8px; font-size: 24px; line-height: 1.22; letter-spacing: -.03em; }
    .mission-callout p { margin: 0 0 16px; color: var(--ink-soft); font-size: 16px; line-height: 1.7; }
    .mission-callout .primary { width: 100%; }
    .series-probe-trigger {
      min-height: 44px; margin: 8px auto 0; padding: 0 12px; display: block;
      border: 0; color: var(--action); background: transparent; font-size: 13px; font-weight: 850;
    }
    .series-probe-trigger:hover { text-decoration: underline; }
    #main-content .mission-callout { width: min(100%, 360px); padding: 18px; }
    #main-content .mission-callout .callout-top {
      display: grid; grid-template-columns: 38px minmax(0,1fr) auto; gap: 9px; align-items: center;
      color: var(--ink); letter-spacing: 0;
    }
    #main-content .callout-state-badge {
      width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px;
      color: var(--signal); background: var(--ink); box-shadow: 0 7px 16px rgba(23,35,61,.18);
    }
    #main-content .callout-state-badge .icon { width: 20px; height: 20px; }
    #main-content .callout-state-copy small,
    #main-content .callout-state-copy b { display: block; }
    #main-content .callout-state-copy small { color: var(--action); font-size: 7px; font-weight: 950; letter-spacing: .18em; }
    #main-content .callout-state-copy b { margin-top: 1px; color: var(--ink); font-size: 11px; font-weight: 900; }
    #main-content .callout-level-chip {
      min-width: 38px; height: 30px; padding: 0 8px; display: grid; place-items: center;
      border: 1px solid rgba(23,35,61,.12); border-radius: 9px;
      color: var(--action); background: rgba(63,88,217,.06); font-size: 11px; font-weight: 950;
    }
    #main-content .callout-actions {
      margin-top: 13px; display: grid; grid-template-columns: minmax(0,1fr) 64px; gap: 9px;
    }
    #main-content .mission-launch {
      min-height: 62px; padding: 7px 9px; display: grid;
      grid-template-columns: 42px minmax(0,1fr) 24px; gap: 9px; align-items: center;
      border: 1px solid #e1aa20; border-radius: 20px; color: var(--ink); text-align: left;
      background: linear-gradient(135deg, #ffe27b, var(--signal) 66%, #f2b634);
      box-shadow: 0 9px 18px rgba(84,61,8,.17);
    }
    #main-content .mission-launch:hover { transform: translateY(-1px); box-shadow: 0 12px 22px rgba(84,61,8,.21); }
    #main-content .launch-orbit {
      width: 42px; height: 42px; display: grid; place-items: center; border-radius: 14px;
      color: var(--signal); background: var(--ink); box-shadow: inset 0 1px rgba(255,255,255,.16);
    }
    #main-content .launch-orbit .icon { width: 22px; height: 22px; }
    #main-content .launch-copy { min-width: 0; }
    #main-content .launch-copy b,
    #main-content .launch-copy small { display: block; }
    #main-content .launch-copy b { font-size: 16px; line-height: 1.25; font-weight: 950; white-space: nowrap; }
    #main-content .launch-copy small {
      overflow: hidden; margin-top: 2px; color: rgba(23,35,61,.67); font-size: 8px;
      font-weight: 800; text-overflow: ellipsis; white-space: nowrap;
    }
    #main-content .launch-arrow {
      width: 24px; height: 24px; display: grid; place-items: center; border-radius: 8px;
      color: var(--ink); background: rgba(23,35,61,.09);
    }
    #main-content .launch-arrow .icon { width: 15px; height: 15px; }
    #main-content .mission-callout .series-probe-trigger {
      min-height: 62px; margin: 0; padding: 8px; display: flex; align-items: flex-start;
      flex-direction: column; justify-content: center; gap: 5px;
      border: 1px solid rgba(63,88,217,.17); border-radius: 16px;
      color: var(--action); background: linear-gradient(145deg, #fff, #edf1ff);
      box-shadow: 0 7px 16px rgba(30,42,72,.08); text-align: left;
    }
    #main-content .mission-callout .series-probe-trigger[hidden] { display: none; }
    #main-content .mission-callout .series-probe-trigger:hover { text-decoration: none; transform: translateY(-1px); }
    #main-content .probe-orbit {
      width: 24px; height: 24px; display: grid; place-items: center; border-radius: 8px;
      color: #fff; background: var(--action); box-shadow: 0 4px 10px rgba(63,88,217,.2);
    }
    #main-content .probe-orbit .icon { width: 14px; height: 14px; }
    #main-content .probe-copy small,
    #main-content .probe-copy b { display: block; }
    #main-content .probe-copy b { font-size: 10px; line-height: 1.2; font-weight: 900; }
    #main-content .probe-copy small { margin-top: 1px; color: var(--ink-soft); font-size: 7px; font-weight: 750; }
    .map-safety { display: flex; align-items: center; gap: 8px; color: #aebbd3; font-size: 12px; }
    .map-safety .icon { width: 18px; height: 18px; color: #dce6fa; }
    .map-stage {
      position: relative; min-width: 0; min-height: 0; overflow: hidden;
      --series-accent: var(--signal);
      --series-switcher-bottom: 142px;
      --map-callout-clearance: 0px;
      background:
        radial-gradient(circle at 69% 24%, rgba(70, 117, 186, .25), transparent 26%),
        radial-gradient(circle at 25% 47%, rgba(37,197,192,.12), transparent 32%),
        linear-gradient(145deg, #15396e 0%, #0b285a 55%, #061633 100%);
    }
    .map-stage::before {
      content: ""; position: absolute; inset: 0; pointer-events: none;
      background-image:
        radial-gradient(circle, rgba(255,255,255,.8) 0 1px, transparent 1.4px),
        radial-gradient(circle, rgba(255,255,255,.38) 0 1px, transparent 1.5px);
      background-size: 143px 131px, 217px 187px;
      background-position: 26px 19px, 79px 43px;
      opacity: .65;
      animation: starField 12s ease-in-out infinite alternate;
    }
    .map-stage::after {
      content: ""; position: absolute; inset: auto 0 0; height: 41%;
      background:
        linear-gradient(170deg, transparent 0 30%, #1a3b70 31% 55%, #28518a 56% 58%, #0c2855 59%);
      clip-path: polygon(0 24%, 9% 12%, 19% 26%, 31% 10%, 42% 26%, 55% 12%, 66% 24%, 78% 7%, 91% 22%, 100% 9%, 100% 100%, 0 100%);
      opacity: .92;
    }
    .app-shell[data-screen="map"] {
      background-color: #071b3e;
      background-image:
        radial-gradient(circle at 73% 24%, rgba(70,117,186,.3), transparent 28%),
        radial-gradient(circle at 22% 72%, rgba(37,197,192,.12), transparent 31%),
        radial-gradient(circle, rgba(255,255,255,.7) 0 1px, transparent 1.35px),
        radial-gradient(circle, rgba(255,255,255,.32) 0 1px, transparent 1.5px),
        linear-gradient(145deg, #15396e 0%, #0b285a 55%, #061633 100%);
      background-size: auto, auto, 143px 131px, 217px 187px, auto;
      background-position: center, center, 26px 19px, 79px 43px, center;
    }
    .app-shell[data-screen="map"] .view-map,
    .app-shell[data-screen="map"] .map-stage {
      background: transparent;
    }
    .map-svg { position: absolute; z-index: 1; inset: 5% 3% 5%; width: 94%; height: 90%; overflow: visible; }
    .map-svg-mobile { display: none; }
    .map-path { fill: none; stroke: rgba(255,255,255,.37); stroke-width: 3; stroke-dasharray: 10 12; stroke-linecap: round; }
    .map-path-lit { fill: none; stroke: var(--signal); stroke-width: 4; stroke-linecap: round; opacity: .82; }
    .map-path-spark {
      fill: none; stroke: #fff3b0; stroke-width: 3; stroke-linecap: round;
      stroke-dasharray: 2 20; opacity: .95;
      filter: drop-shadow(0 0 5px rgba(255,225,112,.9));
      animation: routeSpark 2.6s linear infinite;
    }
    .map-fog { position: absolute; inset: 0; z-index: 2; pointer-events: none; background: radial-gradient(ellipse at 77% 23%, transparent 0 17%, rgba(10,18,40,.42) 36%, transparent 56%); }
    .map-node {
      position: absolute; z-index: 5; width: 184px; min-height: 132px; padding: 0; border: 0;
      color: #fff; background: transparent; text-align: center;
      transform: translate(-50%, -50%);
    }
    .map-node .island {
      position: relative; width: 132px; height: 78px; margin: 0 auto 10px;
      display: grid; place-items: center; border-radius: 50%;
      border: 2px solid rgba(255,255,255,.3);
      box-shadow: 0 25px 28px rgba(2,8,23,.38);
    }
    .map-node .island::after {
      content: ""; position: absolute; inset: 15px 5px -13px; border-radius: 50%;
      background: rgba(3,8,24,.36); filter: blur(2px); z-index: -1;
    }
    .map-node.current .island {
      background: linear-gradient(145deg,
        color-mix(in srgb, var(--series-accent) 48%, white),
        var(--series-accent) 58%,
        color-mix(in srgb, var(--series-accent) 72%, #17355f));
      border-color: color-mix(in srgb, var(--series-accent) 44%, white);
    }
    .map-node.next .island { background: linear-gradient(145deg, #4be0cb, #1d9f9a); border-color: rgba(196,255,247,.62); }
    .map-node.far .island { filter: grayscale(.35); opacity: .56; background: linear-gradient(145deg, #737fa9, #46547f); }
    .map-node .node-title { display: block; font-size: 16px; font-weight: 900; text-shadow: 0 2px 8px rgba(0,0,0,.6); }
    .map-node .node-meta { display: block; margin-top: 3px; color: #d3ddf1; font-size: 13px; text-shadow: 0 2px 8px rgba(0,0,0,.65); }
    .map-node.current .node-meta { color: #fff0ae; }
    .map-node:not(:disabled):hover .island { transform: translateY(-4px); box-shadow: 0 30px 34px rgba(2,8,23,.46); }
    .map-node .island, .map-node .node-title { transition: transform var(--panel), box-shadow var(--panel); }
    .map-node[aria-disabled="true"] { cursor: pointer; }
    .map-node.locked-bump .island { animation: lockedBump .32s ease-out; }
    .map-node .island, .map-node .node-title, .map-node .node-meta { position: relative; z-index: 2; }
    .map-node.current::before {
      content: ""; position: absolute; z-index: 0; left: 50%; top: 42px;
      width: 126px; height: 126px; border-radius: 50%; transform: translate(-50%,-50%);
      border: 2px solid color-mix(in srgb, var(--series-accent) 42%, transparent);
      box-shadow: 0 0 26px color-mix(in srgb, var(--series-accent) 20%, transparent);
      animation: currentAura 3.2s ease-out infinite;
      pointer-events: none;
    }
    .node-energy { left: 20%; top: 68%; }
    .node-sense { left: 52%; top: 47%; }
    .node-core { left: 79%; top: 30%; }
    .tower-mini { width: 38px; height: 48px; position: relative; border-radius: 16px 16px 8px 8px; background: #fff8dd; border: 4px solid #d59725; }
    .tower-mini::before { content: ""; position: absolute; width: 3px; height: 19px; left: 15px; top: -19px; background: #3a2e1d; border-radius: 3px; }
    .tower-mini::after { content: ""; position: absolute; width: 11px; height: 11px; left: 9px; top: 14px; border-radius: 50%; background: var(--ink); box-shadow: 0 0 12px 4px rgba(255,201,60,.42); }
    .forest-mini { width: 53px; height: 50px; position: relative; }
    .forest-mini i { position: absolute; bottom: 0; width: 28px; height: 43px; clip-path: polygon(50% 0, 100% 100%, 0 100%); background: #0d5e58; }
    .forest-mini i:nth-child(1) { left: 0; height: 32px; background: #147d6f; }
    .forest-mini i:nth-child(2) { left: 20px; background: #0b655d; }
    .far-mini { width: 45px; height: 45px; display: grid; place-items: center; color: #eef4ff; }
    .far-mini .icon { width: 40px; height: 40px; }
    .current-pin {
      position: absolute; left: 50%; top: -42px; transform: translateX(-50%);
      padding: 8px 11px; border-radius: 10px; color: var(--ink); background: #fff; white-space: nowrap;
      font-size: 13px; font-weight: 900; box-shadow: 0 10px 20px rgba(0,0,0,.22);
    }
    .current-pin::after { content: ""; position: absolute; left: 50%; bottom: -6px; border: 6px solid transparent; border-top-color: #fff; border-bottom: 0; transform: translateX(-50%); }
    .map-notice {
      position: absolute; z-index: 12; left: 50%; top: 72px; width: auto;
      display: flex; align-items: center; justify-content: center; padding: 9px 14px;
      border: 1px solid rgba(255,255,255,.24); border-radius: 12px; color: #fff;
      background: rgba(6,29,70,.94); box-shadow: 0 16px 34px rgba(0,0,0,.24);
      opacity: 0; visibility: hidden; transform: translate(-50%,-7px);
      transition: opacity var(--panel), transform var(--panel), visibility var(--panel);
      pointer-events: none;
    }
    .map-notice-graphic { display: flex; align-items: center; gap: 10px; }
    .notice-step { position: relative; width: 46px; height: 46px; display: grid; place-items: center; }
    .notice-medallion {
      width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px;
      color: #fff; border: 1px solid rgba(255,255,255,.26); background: #164b89;
      transition: transform var(--panel), background var(--panel), box-shadow var(--panel);
    }
    .notice-medallion .icon { width: 21px; height: 21px; }
    .notice-current .notice-medallion { color: var(--ink); background: var(--signal); box-shadow: 0 0 22px rgba(255,201,60,.28); }
    .notice-index {
      position: absolute; right: -1px; bottom: -2px; min-width: 20px; height: 17px; padding: 0 4px;
      display: grid; place-items: center; border-radius: 6px; color: var(--ink); background: #fff5c7;
      font-size: 9px; font-weight: 950; letter-spacing: 0; box-shadow: 0 2px 8px rgba(0,0,0,.22);
    }
    .notice-route { position: relative; width: 36px; height: 22px; }
    .notice-route::before {
      content: ""; position: absolute; left: 1px; right: 8px; top: 10px; border-top: 2px dashed rgba(255,255,255,.5);
    }
    .notice-route::after {
      content: ""; position: absolute; right: 2px; top: 6px; width: 9px; height: 9px;
      border-top: 2px solid var(--signal); border-right: 2px solid var(--signal); transform: rotate(45deg);
    }
    .notice-locked .notice-medallion { color: #b9d9cc; background: #123f50; border-color: rgba(103,229,191,.26); filter: saturate(.72); }
    .notice-lock {
      position: absolute; right: -3px; bottom: -1px; width: 22px; height: 22px; display: grid; place-items: center;
      border-radius: 8px; color: var(--ink); background: var(--signal); border: 2px solid #102c54;
    }
    .notice-lock .icon { width: 13px; height: 13px; }
    .map-notice.show .notice-current .notice-medallion { animation: noticeNudge .46s ease-out; }
    .map-notice.show .notice-route::before { animation: noticeDash .8s linear infinite; }
    @keyframes noticeNudge { 45% { transform: translateY(-3px) scale(1.06); } }
    @keyframes noticeDash { 50% { opacity: .34; } }
    .map-notice.show { opacity: 1; visibility: visible; transform: translate(-50%,0); }
    .map-barrier {
      display: none; position: absolute; z-index: 10; width: 48px; height: 82px;
      left: 32%; top: 39%; transform: translate(-50%,-50%) scale(.76);
      opacity: 0; pointer-events: none; transition: opacity var(--fast), transform var(--panel);
    }
    .map-barrier::before, .map-barrier::after {
      content: ""; position: absolute; left: 50%; top: 50%; width: 6px; height: 76px; border-radius: 6px;
      background: linear-gradient(#fff5b1, var(--signal)); box-shadow: 0 0 15px rgba(255,201,60,.72);
    }
    .map-barrier::before { transform: translate(-50%,-50%) rotate(34deg); }
    .map-barrier::after { transform: translate(-50%,-50%) rotate(-34deg); }
    .map-barrier.active { display: block; opacity: 1; transform: translate(-50%,-50%) scale(1); }
    .map-barrier[data-gate="core"] { left: 65%; top: 26%; }
    .node-gate {
      display: inline-flex; align-items: center; justify-content: center; gap: 5px;
      min-height: 20px; color: #a7bbd9;
    }
    .node-gate-badge {
      min-width: 22px; height: 20px; padding: 0 5px; display: inline-grid; place-items: center;
      border-radius: 6px; color: #c8d8f0; background: rgba(255,255,255,.08); font-size: 9px; font-weight: 900;
    }
    .node-gate .icon { width: 14px; height: 14px; }
    .node-gate-arrow { color: #7087aa; font-size: 13px; line-height: 1; }
    .node-gate-lock { color: var(--signal); }
    .level-route {
      position: absolute; z-index: 3; inset: 126px 5% 38px;
      min-width: 0; min-height: 0;
    }
    .star-region-head {
      position: absolute; z-index: 9; top: 15px; left: 5%; right: 5%;
      display: flex; align-items: center; justify-content: space-between; gap: 14px;
      color: #d8e8ff; font-size: 10px; font-weight: 800;
    }
    .star-region-head > span:first-child { display: flex; align-items: baseline; gap: 9px; }
    .star-region-head b { color: #fff; font-size: 14px; font-weight: 950; letter-spacing: .04em; }
    .star-region-head small { color: #9fb6d7; font-size: 9px; font-weight: 720; }
    .star-region-head > span:last-child {
      padding: 5px 8px; border: 1px solid rgba(172,207,247,.18); border-radius: 7px;
      color: #b9cdec; background: rgba(4,23,54,.5);
    }
    .series-switcher {
      position: absolute; z-index: 9; top: 48px; left: 5%; right: 5%;
      display: flex; gap: 8px; overflow-x: auto; padding: 2px 1px 7px;
      scrollbar-width: none; overscroll-behavior-x: contain;
      scroll-snap-type: x proximity;
    }
    .series-switcher::-webkit-scrollbar { display: none; }
    .series-chip {
      position: relative; flex: 0 0 220px; min-height: 76px; padding: 8px 9px 7px;
      overflow: hidden; border: 1px solid color-mix(in srgb, var(--chip-accent) 26%, rgba(172,207,247,.2));
      border-radius: 16px; display: grid;
      grid-template-columns: 40px minmax(0,1fr) auto; grid-template-areas: "emblem copy progress" "meter meter meter";
      gap: 6px 8px; align-items: center; color: #dceaff;
      background:
        radial-gradient(circle at 12% 10%, color-mix(in srgb, var(--chip-accent) 13%, transparent), transparent 32%),
        rgba(5,28,66,.84);
      text-align: left; scroll-snap-align: center;
      transition: transform var(--fast), border-color var(--panel), background var(--panel), box-shadow var(--panel);
    }
    .series-chip:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--chip-accent) 68%, transparent); }
    .series-emblem {
      position: relative; grid-area: emblem; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 14px;
      color: var(--chip-accent); border: 1px solid color-mix(in srgb, var(--chip-accent) 48%, transparent);
      background:
        radial-gradient(circle at 36% 28%, rgba(255,255,255,.22), transparent 32%),
        color-mix(in srgb, var(--chip-accent) 16%, rgba(255,255,255,.03));
      box-shadow: inset 0 0 14px color-mix(in srgb, var(--chip-accent) 8%, transparent);
    }
    .series-emblem::after {
      content: ""; position: absolute; inset: -4px; border: 1px solid color-mix(in srgb, var(--chip-accent) 16%, transparent);
      border-radius: 17px; pointer-events: none;
    }
    .series-emblem .icon { width: 20px; height: 20px; }
    .series-number {
      position: absolute; z-index: 2; left: -4px; top: -4px; min-width: 17px; height: 14px; padding: 0 3px;
      display: grid; place-items: center; border-radius: 5px; color: #0a234f; background: var(--chip-accent);
      font-size: 6px; font-weight: 950; box-shadow: 0 3px 8px rgba(0,0,0,.24);
    }
    .series-status-mark {
      position: absolute; z-index: 3; top: 8px; right: 8px; width: 7px; height: 7px;
      border: 1px solid rgba(255,255,255,.72); border-radius: 50%; background: #9fb7d9;
      box-shadow: 0 0 0 3px rgba(5,28,66,.72), 0 0 10px currentColor;
    }
    .series-status-mark.is-ready { color: #6ee2f5; background: #6ee2f5; }
    .series-status-mark.is-challenge { color: #8ee9cd; background: #8ee9cd; }
    .series-status-mark.is-partial,
    .series-status-mark.is-standard { color: #ffc38e; background: #ffc38e; }
    .series-status-mark.is-complete { color: #f9e27a; background: #f9e27a; }
    .series-status-mark.is-preview { color: #8ea8c9; background: #8ea8c9; box-shadow: 0 0 0 3px rgba(5,28,66,.72); }
    .series-status-mark.is-planned { color: #b8a4ff; background: #b8a4ff; }
    .series-copy { grid-area: copy; min-width: 0; }
    .series-copy b, .series-copy small, .series-progress b, .series-progress small { display: block; }
    .series-copy b { overflow: hidden; color: #f4f8ff; font-size: 11px; font-weight: 920; text-overflow: ellipsis; white-space: nowrap; }
    .series-copy small {
      overflow: hidden; margin-top: 2px; color: #9fb7d9; font-size: 9px; font-weight: 720;
      text-overflow: ellipsis; white-space: nowrap;
    }
    .series-progress { grid-area: progress; min-width: 38px; display: grid; justify-items: end; gap: 3px; text-align: right; }
    .series-progress-ring {
      --ring-value: var(--series-meter, 0%);
      position: relative; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%;
      background: conic-gradient(var(--chip-accent) var(--ring-value), rgba(255,255,255,.12) 0);
      box-shadow: 0 0 12px color-mix(in srgb, var(--chip-accent) 16%, transparent);
    }
    .series-progress-ring::after {
      content: ""; position: absolute; inset: 4px; border-radius: inherit; background: #071b3e;
    }
    .series-progress-ring b {
      position: relative; z-index: 1; color: var(--chip-accent); font-size: 10px; font-weight: 950;
    }
    .series-progress small { max-width: 72px; color: #a9bfdc; font-size: 8px; font-weight: 760; line-height: 1.25; }
    .series-meter {
      grid-area: meter; height: 2px; overflow: hidden; border-radius: 4px; background: rgba(255,255,255,.1);
    }
    .series-meter i {
      display: block; width: var(--series-meter, 0%); height: 100%; border-radius: inherit;
      background: linear-gradient(90deg, color-mix(in srgb, var(--chip-accent) 54%, transparent), var(--chip-accent));
      box-shadow: 0 0 8px color-mix(in srgb, var(--chip-accent) 52%, transparent);
    }
    .series-chip.is-available { border-color: color-mix(in srgb, var(--chip-accent) 44%, rgba(172,207,247,.18)); }
    .series-chip.is-active {
      border-color: color-mix(in srgb, var(--chip-accent) 76%, white);
      background:
        linear-gradient(125deg, color-mix(in srgb, var(--chip-accent) 30%, rgba(7,27,62,.96)), rgba(7,27,62,.94) 64%),
        rgba(5,28,66,.88);
      box-shadow:
        0 0 0 1px color-mix(in srgb, var(--chip-accent) 18%, transparent),
        0 11px 28px color-mix(in srgb, var(--chip-accent) 18%, transparent);
      transform: translateY(-1px);
    }
    .series-chip.is-active .series-emblem {
      color: #071b3e; border-color: color-mix(in srgb, var(--chip-accent) 62%, white);
      background: var(--chip-accent); box-shadow: 0 0 22px color-mix(in srgb, var(--chip-accent) 38%, transparent);
    }
    .series-chip.is-active .series-number { color: var(--chip-accent); background: #071b3e; }
    .series-chip.is-active .series-copy b { color: #fff; }
    .series-chip.is-active .series-copy small { color: #c5d8f1; }
    .series-chip.is-preview { background: rgba(6,26,58,.8); }
    .series-chip.is-preview .series-progress small { color: #b7c8df; }
    .series-chip.is-snap-focus {
      border-color: color-mix(in srgb, var(--chip-accent) 70%, white);
      box-shadow: 0 0 0 2px color-mix(in srgb, var(--chip-accent) 20%, transparent), 0 12px 24px rgba(2,8,23,.32);
    }
    .level-route-svg {
      position: absolute; z-index: 0; inset: 0; width: 100%; height: 100%;
      overflow: visible; pointer-events: none;
    }
    .level-route-base {
      fill: none; stroke: rgba(159,197,241,.26); stroke-width: 7;
      stroke-linecap: round; stroke-linejoin: round;
    }
    .level-route-light {
      fill: none; stroke: color-mix(in srgb, var(--series-accent) 42%, transparent); stroke-width: 2.4;
      stroke-linecap: round; stroke-linejoin: round;
    }
    .level-route-flow {
      fill: none; stroke: #fff1a7; stroke-width: 3.2; stroke-linecap: round;
      stroke-dasharray: 2 16; opacity: .94;
      filter: drop-shadow(0 0 5px rgba(255,226,112,.9));
      animation: levelRouteFlow 1.8s linear infinite;
    }
    .level-route-comet {
      fill: var(--series-accent); opacity: .95;
      filter: drop-shadow(0 0 7px color-mix(in srgb, var(--series-accent) 82%, transparent));
    }
    .level-route-grid {
      position: absolute; z-index: 2; inset: 0; display: grid;
      grid-template-columns: repeat(var(--route-columns, 5), minmax(0,1fr));
      grid-auto-rows: minmax(0,1fr); gap: 8px 10px; align-items: center;
    }
    .level-node {
      position: relative; width: min(100%, 152px); min-height: 84px;
      justify-self: center; align-self: center; transform: none;
    }
    .level-node .island {
      width: 78px; height: 52px; margin-bottom: 5px;
      border-width: 1.5px; border-color: rgba(178,214,255,.32);
      box-shadow: 0 12px 18px rgba(2,8,23,.3);
    }
    .level-node .island .icon { width: 29px; height: 29px; color: #d5e7ff; }
    .level-node.far .island { filter: grayscale(.16); opacity: .72; background: linear-gradient(145deg, #52658d, #304269); }
    .level-node.next .island { filter: none; opacity: .9; }
    .level-node.current .island {
      width: 84px; height: 56px;
      box-shadow: 0 0 24px color-mix(in srgb, var(--series-accent) 30%, transparent), 0 16px 22px rgba(2,8,23,.34);
    }
    .level-node.is-completed .island {
      border-color: rgba(98,227,187,.74);
      background: linear-gradient(145deg, #236a69, #174d62);
      box-shadow: 0 0 20px rgba(73,217,181,.18), 0 12px 18px rgba(2,8,23,.3);
    }
    .level-node.is-completed .island .icon { color: #c9fff0; }
    .level-node.is-challenge-passed .island {
      border-color: rgba(111,214,255,.8);
      background: linear-gradient(145deg, #235a89, #29477e);
      box-shadow: 0 0 20px rgba(111,214,255,.18), 0 12px 18px rgba(2,8,23,.3);
    }
    .level-node.is-bridge .island {
      border-color: rgba(255,165,101,.82);
      background: linear-gradient(145deg, #7f4b35, #5b3654);
      box-shadow: 0 0 20px rgba(255,165,101,.18), 0 12px 18px rgba(2,8,23,.3);
    }
    .level-node.is-known { cursor: pointer; }
    .level-node .tower-mini { transform: scale(.78); }
    .level-node .forest-mini { transform: scale(.68); }
    .level-node .node-title {
      font-size: 12px; line-height: 1.3; white-space: nowrap;
      text-shadow: 0 2px 7px rgba(0,0,0,.7);
    }
    .level-node .node-meta {
      margin-top: 1px; font-size: 10px; color: #a9bddb;
      white-space: nowrap;
    }
    .level-node .node-state {
      min-height: 17px; margin-top: 3px; padding: 0 5px; display: inline-flex; align-items: center;
      border: 1px solid rgba(168,200,239,.16); border-radius: 5px;
      color: #9fb5d4; background: rgba(3,19,48,.5); font-size: 8px; font-weight: 850; white-space: nowrap;
    }
    .level-node.current .node-state {
      color: var(--ink); border-color: rgba(255,255,255,.58); background: var(--series-accent);
    }
    .level-node.is-completed .node-state { color: #bdf9e8; border-color: rgba(98,227,187,.3); background: rgba(22,88,77,.76); }
    .level-node.is-challenge-passed .node-state { color: #d4f4ff; border-color: rgba(111,214,255,.34); background: rgba(26,77,120,.8); }
    .level-node.is-bridge .node-state { color: #ffe0c2; border-color: rgba(255,165,101,.38); background: rgba(104,56,47,.82); }
    .level-node .level-index {
      position: absolute; z-index: 4; left: calc(50% - 41px); top: -7px;
      min-width: 24px; height: 20px; padding: 0 5px; display: grid; place-items: center;
      border-radius: 7px; color: #dceaff; background: #173b70;
      border: 1px solid rgba(194,222,255,.28); font-size: 9px; font-weight: 950;
      box-shadow: 0 4px 10px rgba(2,8,23,.25);
    }
    .level-node.current .level-index {
      color: var(--ink); background: var(--series-accent); border-color: #fff8d0;
    }
    .level-node.is-completed .level-index { color: #082f31; background: #8ee9cd; border-color: #c3ffe9; }
    .level-node.is-challenge-passed .level-index { color: #062c48; background: #91ddff; border-color: #d9f5ff; }
    .level-node.is-bridge .level-index { color: #4b2115; background: #ffc08b; border-color: #ffe7cf; }
    .level-node .node-lock {
      position: absolute; z-index: 4; right: calc(50% - 40px); top: 31px;
      width: 18px; height: 18px; display: grid; place-items: center;
      border-radius: 6px; color: var(--ink); background: var(--signal);
      border: 1px solid #ffeaa1; box-shadow: 0 2px 7px rgba(2,8,23,.28);
    }
    .level-node .node-lock .icon { width: 12px; height: 12px; color: inherit; }
    .level-node.current::before {
      left: 50%; top: 26px; width: 96px; height: 96px;
      border-color: rgba(255,221,96,.3);
    }
    .level-node.current .current-pin { display: none; }
    .level-route[data-drawn="true"] .level-node { animation: routeNodeIn .46s ease-out both; }
    .level-route[data-drawn="true"] .level-node:nth-child(3n+2) { animation-delay: .04s; }
    .level-route[data-drawn="true"] .level-node:nth-child(3n) { animation-delay: .08s; }
    @keyframes levelRouteFlow { to { stroke-dashoffset: -54; } }
    @keyframes routeNodeIn { from { opacity: 0; transform: translateY(7px) scale(.96); } to { opacity: 1; transform: none; } }
    .aibo-map {
      position: absolute; z-index: 6; left: 38%; top: 51%;
      display: flex; align-items: flex-end; gap: 10px;
    }
    .aibo-map.bubble-to-left { flex-direction: row-reverse; }
    .aibo-map-drag-handle {
      position: relative; flex: 0 0 auto; width: 74px; height: 80px; margin: -8px;
      display: grid; place-items: end center; cursor: grab; touch-action: none;
      border-radius: 24px; outline: none;
    }
    .view-map.active .aibo-map { animation: aiboFindIn .68s cubic-bezier(.2,.9,.3,1) both; }
    .aibo-map-drag-handle::after {
      content: "阿波 · 在线"; position: absolute; left: 50%; bottom: -12px; transform: translateX(-50%);
      min-width: 66px; padding: 4px 7px 3px; border-radius: 999px; color: #10244c;
      background: linear-gradient(180deg, #fff6c9, #ffd447); border: 1px solid #fff1a9;
      box-shadow: 0 5px 13px rgba(0,0,0,.24); font-size: 9px; font-weight: 950;
      letter-spacing: .03em; white-space: nowrap; pointer-events: none;
      animation: aiboNameFloat 3.2s ease-in-out infinite;
    }
    .aibo-map-drag-handle:focus-visible { box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--action); }
    .aibo-map-drag-handle.is-dragging { cursor: grabbing; }
    .aibo-map-drag-handle.is-dragging .aibo {
      filter: drop-shadow(0 18px 12px rgba(5,22,55,.3));
      transform: translateY(-3px) rotateX(0deg) rotateY(-7deg);
    }
    .aibo-map .speech {
      max-width: 220px; padding: 10px 13px; color: var(--ink); background: #fff;
      border-radius: 13px 13px 13px 4px; box-shadow: 0 12px 28px rgba(0,0,0,.23);
      font-size: 14px; line-height: 1.55; font-weight: 700;
    }
    .aibo-map.bubble-to-left .speech { border-radius: 13px 13px 4px 13px; }
    .map-zone-label {
      position: absolute; z-index: 4; right: 22px; bottom: 20px; color: #91a1c2;
      display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 750;
    }
    .map-zone-label::before { content: ""; width: 30px; height: 1px; background: currentColor; }

    /* Aibo */
    .aibo {
      position: relative; width: 58px; height: 64px; flex: 0 0 auto;
      filter: drop-shadow(0 10px 8px rgba(5,22,55,.2)) drop-shadow(0 2px 2px rgba(255,255,255,.18));
      transform-style: preserve-3d;
    }
    .aibo::after {
      content: ""; position: absolute; z-index: -1; left: 5px; right: 4px; bottom: -3px; height: 9px;
      border-radius: 50%; background: radial-gradient(ellipse, rgba(1,12,32,.3), transparent 68%);
      filter: blur(1px); transform: translateZ(-12px);
    }
    .aibo .aibo-head {
      position: absolute; inset: 8px 3px 15px; border-radius: 18px 18px 14px 14px;
      background:
        radial-gradient(circle at 32% 20%, rgba(255,255,255,.96), transparent 28%),
        linear-gradient(145deg, #f8fffc 0%, #d9f1eb 62%, #b9ddd5 100%);
      border: 3px solid #0c8682;
      box-shadow:
        inset 3px 3px 4px rgba(255,255,255,.9),
        inset -4px -5px 7px rgba(9,94,90,.2),
        0 5px 0 rgba(7,91,87,.25),
        0 11px 18px rgba(1,21,42,.16);
      transform-origin: 50% 78%;
      animation: aiboBreathe 3.6s ease-in-out infinite;
    }
    .aibo-eye {
      position: absolute; z-index: 2; top: 9px; width: 12px; height: 12px;
      overflow: hidden; border-radius: 50%; background: radial-gradient(circle at 38% 28%, #fff, #edf8f5 62%, #b7d7d0);
      border: 1px solid rgba(10, 105, 101, .55); box-shadow: inset 0 1px 1px rgba(255,255,255,.9);
      transform-origin: center; animation: aiboEyeBlink 7.6s cubic-bezier(.2,.75,.25,1) infinite;
    }
    .aibo-eye.left { left: 6px; }
    .aibo-eye.right { right: 6px; }
    .aibo-eye::after {
      content: ""; position: absolute; width: 6px; height: 6px; left: 3px; top: 3px;
      border-radius: 50%; background: var(--ink); box-shadow: inset 1px 1px 0 1px rgba(255,255,255,.92);
      animation: aiboEyeGaze 7.6s cubic-bezier(.2,.75,.25,1) infinite;
    }
    .aibo.is-tracking-pointer .aibo-eye::after {
      animation: none;
      transform: translate(var(--pupil-x, 0px), var(--pupil-y, 0px));
      transition: transform 90ms cubic-bezier(.2,.75,.25,1);
    }
    .aibo .aibo-head::after {
      content: ""; position: absolute; z-index: 3; width: 16px; height: 4px; left: 50%; bottom: 3px; transform: translateX(-50%);
      border-radius: 6px; background: var(--signal); transform-origin: center;
      animation: aiboMouthIdle 5.4s ease-in-out infinite;
    }
    .aibo .antenna {
      position: absolute; width: 3px; height: 12px; top: 0; left: 50%; transform: translateX(-50%);
      background: #0c8682; border-radius: 3px;
    }
    .aibo .antenna::after {
      content: ""; position: absolute; left: -4px; top: -6px; width: 11px; height: 11px;
      border-radius: 50%; background: var(--signal); border: 2px solid #fff;
      box-shadow: 0 0 0 0 rgba(255,206,64,.52), 0 0 13px rgba(255,206,64,.42);
      animation: aiboBeaconPulse 2.45s ease-out infinite;
    }
    .aibo .body {
      position: absolute; width: 42px; height: 20px; left: 8px; bottom: 0; border-radius: 8px 8px 11px 11px;
      background:
        radial-gradient(circle at 34% 20%, rgba(96,232,211,.55), transparent 32%),
        linear-gradient(145deg, #12a29a, #086d6b);
      border: 3px solid #096d69;
      box-shadow: inset 2px 3px 3px rgba(255,255,255,.18), inset -4px -4px 6px rgba(1,64,65,.28), 0 5px 0 rgba(4,60,66,.25);
    }
    .aibo .body::after {
      content: ""; position: absolute; left: 17px; top: 4px; width: 7px; height: 7px;
      border-radius: 50%; background: var(--signal);
      animation: aiboChestPulse 2.45s .45s ease-in-out infinite;
    }
    .aibo.state-thinking .aibo-head::after { width: 8px; background: var(--physical); }
    .aibo.is-speaking .aibo-head { animation: aiboTalkHead .44s ease-in-out infinite alternate; }
    .aibo.is-speaking .aibo-head::after { animation: aiboTalkMouth .19s steps(2,end) infinite; background: #ffb52f; }
    .aibo.is-speaking .antenna::after { animation: aiboAntennaTalk .5s ease-in-out infinite alternate; }
    .aibo.is-speaking .body::after { animation: aiboVoiceChest .42s ease-in-out infinite alternate; }

    .aibo-companion {
      position: fixed; z-index: 62; right: 18px; bottom: calc(18px + var(--bottom-ui-gap));
      width: 104px; height: 116px; pointer-events: none; perspective: 260px;
    }
    .app-shell[data-screen="mission"] .aibo-companion { bottom: calc(84px + var(--bottom-ui-gap)); }
    .app-shell[data-screen="map"] .aibo-companion { display: none; }
    .aibo-drag-handle {
      position: absolute; inset: -10px; pointer-events: auto; touch-action: none;
      cursor: grab; border-radius: 30px; outline: none;
    }
    .aibo-drag-handle:focus-visible { box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--action); }
    .aibo-drag-handle.is-dragging { cursor: grabbing; }
    .aibo-companion .aibo {
      position: absolute; left: 50%; bottom: 3px; width: 52px; height: 58px;
      transform: translateX(-50%) scale(2) rotateX(3deg) rotateY(-4deg);
      transform-origin: bottom center;
      transition: filter var(--panel);
    }
    .aibo-drag-handle.is-dragging .aibo {
      filter: drop-shadow(0 18px 12px rgba(5,22,55,.26));
      transform: translateX(-50%) scale(2.06) rotateX(0deg) rotateY(-7deg);
    }
    .aibo-companion-bubble {
      position: absolute; right: calc(100% + 8px); bottom: 14px;
      width: max-content; max-width: min(270px, calc(100vw - 126px)); padding: 10px 13px;
      color: var(--ink); background: #fff; border: 1px solid rgba(23,35,61,.1);
      border-radius: 14px 14px 4px 14px; box-shadow: 0 14px 30px rgba(4,18,45,.25);
      font-size: 13px; line-height: 1.5; font-weight: 750;
      opacity: 0; visibility: hidden; transform: translateY(5px) scale(.96);
      transform-origin: right bottom; pointer-events: none;
      transition: opacity var(--panel), transform var(--panel), visibility var(--panel);
    }
    .aibo-companion.is-speaking .aibo-companion-bubble {
      opacity: 1; visibility: visible; transform: none;
    }
    .aibo-companion.bubble-to-right .aibo-companion-bubble {
      right: auto; left: calc(100% + 8px); border-radius: 14px 14px 14px 4px; transform-origin: left bottom;
    }

    /* Mission shell */
    .view-mission { background: var(--paper); }
    .mission-shell { flex: 1; min-height: 0; display: flex; flex-direction: column; background: var(--paper); }
    .mission-head {
      flex: 0 0 auto; min-height: 88px; display: grid; grid-template-columns: auto minmax(0,1fr) auto;
      align-items: center; gap: 18px; padding: 13px 22px;
      background: var(--paper); border-bottom: 1px solid var(--line);
    }
    .mission-title { min-width: 0; }
    .mission-breadcrumb {
      display: block; margin-bottom: 2px; color: var(--ink-soft);
      font-size: 10px; font-weight: 850; letter-spacing: .08em;
      white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    }
    .mission-title h1 { margin: 2px 0 0; font-size: clamp(24px, 2.4vw, 34px); line-height: 1.16; letter-spacing: -.035em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .mission-goal { display: flex; align-items: center; gap: 10px; color: var(--ink-soft); font-size: 13px; }
    .mission-goal strong { color: var(--ink); font-size: 14px; }
    .goal-badge { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 13px; color: var(--action); background: #eef0ff; }
    .lesson-audio-button {
      position: relative; min-width: 190px; min-height: 56px; padding: 7px 13px 9px;
      display: grid; grid-template-columns: 38px minmax(0,1fr); align-items: center; gap: 9px;
      overflow: hidden; border: 1px solid #cbd6ed; border-radius: 15px;
      color: var(--action); background: linear-gradient(145deg, #fff, #edf2ff); text-align: left;
      box-shadow: 0 7px 18px rgba(34,54,96,.08);
    }
    .lesson-audio-button:hover:not(:disabled) { transform: translateY(-1px); border-color: #9fb0df; }
    .lesson-audio-button[aria-pressed="true"] { color: #fff; border-color: var(--action); background: var(--action); }
    .lesson-audio-button:disabled { opacity: .56; box-shadow: none; }
    .lesson-audio-orbit {
      width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px;
      color: #fff; background: var(--action);
    }
    .lesson-audio-button[aria-pressed="true"] .lesson-audio-orbit { color: var(--action); background: #fff; }
    .lesson-audio-orbit .icon { width: 20px; height: 20px; }
    .lesson-audio-copy { min-width: 0; }
    .lesson-audio-copy b,
    .lesson-audio-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .lesson-audio-copy b { font-size: 13px; line-height: 1.2; font-weight: 950; }
    .lesson-audio-copy small { margin-top: 3px; color: var(--ink-soft); font-size: 9px; font-weight: 800; }
    .lesson-audio-button[aria-pressed="true"] .lesson-audio-copy small { color: #dce4ff; }
    .lesson-audio-progress {
      position: absolute; left: 9px; right: 9px; bottom: 5px; height: 2px;
      overflow: hidden; border-radius: 99px; background: rgba(63,88,217,.13);
    }
    .lesson-audio-progress i { display: block; width: 0; height: 100%; background: currentColor; border-radius: inherit; }
    .lesson-audio-button[aria-pressed="true"] .lesson-audio-progress { background: rgba(255,255,255,.22); }
    .back-button {
      width: 48px; height: 48px; padding: 0; border: 1px solid var(--line); border-radius: 13px;
      display: grid; place-items: center; color: var(--ink); background: var(--surface);
    }
    .back-button .icon { width: 21px; height: 21px; }
    .mission-content { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; }
    .stage-panel { display: none; min-height: 100%; padding: clamp(16px, 2.4vw, 28px) clamp(20px, 3vw, 38px) 22px; }
    .stage-panel.active { display: block; animation: stageIn var(--panel) ease-out both; }
    .stage-panel[data-stage-panel="simulation"] { height: 100%; }
    @keyframes stageIn { from { opacity: .3; transform: translateX(7px); } to { opacity: 1; transform: none; } }
    .stage-rail {
      position: relative; z-index: 8; flex: 0 0 auto; min-height: 128px;
      display: grid; grid-template-columns: 168px minmax(0,1fr) 92px;
      align-items: stretch; gap: 12px; padding: 12px 18px 14px;
      color: var(--ink);
      background:
        linear-gradient(90deg, rgba(255,255,255,.56), transparent 12% 88%, rgba(255,255,255,.46)),
        #f7f3e8;
      border-top: 1px solid #ddd6c7;
      box-shadow: 0 -9px 24px rgba(40,32,17,.04);
    }
    .stage-rail-head {
      min-width: 0; display: flex; flex-direction: column; justify-content: center;
      padding-right: 10px; border-right: 1px solid #ded7c9;
    }
    .stage-rail-head small {
      color: #7b8496; font-family: var(--font-cond); font-size: 10px; font-weight: 700; letter-spacing: .12em;
    }
    .stage-rail-head b {
      overflow: hidden; margin-top: 7px; color: var(--ink);
      font-family: var(--font-cond); font-size: 17px; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap;
    }
    .stage-rail-track {
      min-width: 0; display: flex; gap: 8px; overflow-x: auto; overscroll-behavior-x: contain;
      padding: 1px 1px 5px; scrollbar-width: none; scroll-snap-type: x proximity;
    }
    .stage-rail-track::-webkit-scrollbar { display: none; }
    .stage-tab {
      position: relative; flex: 1 1 0; min-width: 140px; min-height: 96px;
      display: grid; grid-template-columns: 68px minmax(0,1fr); align-items: center; gap: 12px;
      padding: 9px 12px 9px 8px; border: 1px solid #d8d1c2; border-radius: 16px;
      color: var(--ink-soft); background: rgba(255,253,247,.9); text-align: left;
      box-shadow: 0 4px 10px rgba(42,34,20,.04);
      scroll-snap-align: center;
      transition: transform var(--fast), background var(--fast), color var(--fast), border-color var(--fast), box-shadow var(--fast);
    }
    .stage-tab:hover { transform: translateY(-1px); color: var(--ink); border-color: #c2b8a5; background: #fff; }
    .stage-thumb {
      position: relative; width: 68px; height: 78px; display: grid; place-items: center;
      border-radius: 14px; color: #2a4c79; border: 1px solid #e2dacb;
      background:
        radial-gradient(circle at 30% 22%, rgba(255,255,255,.95), transparent 34%),
        linear-gradient(145deg, #f9f5ea, #ece2d0);
      box-shadow: inset 0 1px #fff, 0 4px 9px rgba(45,33,16,.07);
    }
    .stage-thumb .icon { width: 31px; height: 31px; stroke-width: 1.8; }
    .stage-tab i {
      position: absolute; z-index: 2; left: -4px; top: -4px;
      width: 24px; height: 24px; display: grid; place-items: center;
      border-radius: 7px; color: #fff; background: #2b466f;
      border: 2px solid #fffdf7; font-size: 11px; font-style: normal; font-weight: 950;
      box-shadow: 0 3px 7px rgba(31,44,67,.18);
    }
    .stage-copy { min-width: 0; }
    .stage-copy b,
    .stage-copy small {
      display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    }
    .stage-copy b { color: inherit; font-family: var(--font-cond); font-size: 15px; line-height: 1.3; font-weight: 700; }
    .stage-copy small { margin-top: 5px; color: #9299a7; font-size: 9px; line-height: 1.2; font-weight: 600; }
    .stage-tab.active {
      color: var(--ink); border-color: #d7a724; background: #fff9e4;
      box-shadow: 0 0 0 1px rgba(224,174,37,.22), 0 9px 20px rgba(133,99,17,.12);
    }
    .stage-tab.active .stage-thumb {
      color: var(--ink); border-color: #ffe38a;
      background: linear-gradient(145deg, #ffe57b, var(--signal));
    }
    .stage-tab.active i { color: var(--ink); background: var(--signal); border-color: #fff5c8; }
    .stage-tab.done { color: #255f4d; border-color: rgba(52,145,111,.26); background: #f1fbf6; }
    .stage-tab.done .stage-thumb { color: #17614a; border-color: rgba(45,143,104,.24); background: linear-gradient(145deg, #f7fffb, #ddf5ea); }
    .stage-tab.done i { background: var(--success); }
    .stage-tab.done::after {
      content: "✓"; position: absolute; right: 7px; top: 7px;
      width: 16px; height: 16px; display: grid; place-items: center;
      border-radius: 50%; color: #fff; background: var(--success); font-size: 9px; font-weight: 950;
    }
    .stage-tab.locked { opacity: .5; filter: grayscale(.16); }
    .stage-tab.locked .stage-thumb::after {
      content: ""; position: absolute; right: 3px; bottom: 3px; width: 11px; height: 8px;
      border-radius: 2px; background: var(--signal); box-shadow: 0 -5px 0 -2px var(--signal);
    }
    .stage-rail-nav { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
    .stage-rail-arrow {
      width: 42px; height: 90px; padding: 0; display: grid; place-items: center;
      border-radius: 11px; border: 1px solid #d6cfc1; color: var(--ink);
      background: #fffdf7; box-shadow: 0 4px 10px rgba(39,31,19,.05);
    }
    .stage-rail-arrow:hover { color: #fff; border-color: #203b64; background: #203b64; }
    .stage-rail-arrow .icon { width: 17px; height: 17px; }
    .stage-rail-arrow:disabled { opacity: .28; }

    /* Story */
    .story-grid { min-height: 100%; display: grid; grid-template-columns: minmax(0,1.45fr) minmax(300px,.55fr); gap: 20px; align-items: stretch; }
    .story-panel { min-height: 470px; padding: clamp(22px,3vw,38px); position: relative; overflow: hidden; border-radius: var(--radius-xl); background: linear-gradient(145deg, #12356c, #1a4b88 62%, #147b8d); color: #fff; }
    .stage-panel[data-stage-panel="story"].active .story-panel { animation: missionArrive .52s cubic-bezier(.16,.84,.28,1) both; }
    .stage-panel[data-stage-panel="story"].active .repair-crate { animation: companionArrive .6s .14s cubic-bezier(.16,.84,.28,1) both; }
    .story-panel::before { content: ""; position: absolute; width: 320px; height: 320px; border: 62px solid rgba(255,255,255,.055); border-radius: 50%; right: -110px; top: -125px; }
    .story-panel::after { content: ""; position: absolute; inset: auto 0 0; height: 34%; background: linear-gradient(170deg, transparent 0 42%, rgba(7,17,41,.46) 43%); clip-path: polygon(0 44%, 20% 24%, 42% 42%, 61% 13%, 79% 34%, 100% 17%, 100% 100%, 0 100%); }
    .chapter-tag { display: inline-flex; align-items: center; gap: 8px; padding: 8px 11px; border-radius: 9px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.13); font-size: 12px; font-weight: 850; }
    .chapter-tag .icon { width: 17px; height: 17px; color: var(--signal); }
    .story-panel h2 { position: relative; z-index: 2; max-width: 10em; margin: 26px 0 12px; font-size: clamp(34px, 4vw, 52px); line-height: 1.08; letter-spacing: -.05em; }
    .story-panel p { position: relative; z-index: 2; max-width: 32em; margin: 0; color: #dbe5f4; font-size: 17px; line-height: 1.8; }
    .story-cta { position: relative; z-index: 3; margin-top: 28px; }
    .story-brief-trigger { position: absolute; z-index: 4; top: 20px; right: 22px; margin: 0; }
    .lesson-brief-trigger {
      min-height: 48px; margin-top: 9px; padding: 7px 12px 7px 8px;
      display: inline-flex; align-items: center; gap: 9px;
      border: 1px solid rgba(255,255,255,.2); border-radius: 12px;
      color: #e9f2ff; background: rgba(255,255,255,.08);
      text-align: left;
    }
    .lesson-brief-trigger:hover { background: rgba(255,255,255,.14); }
    .lesson-brief-trigger > i {
      width: 32px; height: 32px; flex: none; display: grid; place-items: center;
      border-radius: 9px; color: var(--ink); background: var(--signal);
      font-size: 13px; font-style: normal; font-weight: 950;
    }
    .lesson-brief-trigger b,
    .lesson-brief-trigger small { display: block; }
    .lesson-brief-trigger b { font-size: 12px; }
    .lesson-brief-trigger small { margin-top: 2px; color: #b9cae2; font-size: 9px; }
    .story-scene { position: absolute; z-index: 2; right: 9%; bottom: 8%; width: 300px; height: 250px; }
    .big-tower { position: absolute; width: 100px; height: 145px; right: 56px; bottom: 35px; border-radius: 47px 47px 17px 17px; background: #f1eee3; border: 9px solid #c1cbdf; box-shadow: 0 28px 38px rgba(1,9,28,.32); }
    .big-tower::before { content: ""; position: absolute; width: 5px; height: 65px; left: 39px; top: -67px; background: #c1cbdf; border-radius: 4px; }
    .big-tower::after { content: ""; position: absolute; width: 22px; height: 22px; border-radius: 50%; left: 30px; top: 35px; background: #4a5777; }
    .repair-crate {
      position: absolute; z-index: 2; left: 20px; bottom: 35px; width: 86px; height: 70px;
      display: grid; place-items: center; border: 5px solid #a8622f; border-radius: 18px 18px 14px 14px;
      color: var(--ink); background: linear-gradient(145deg, #ffd66d, #f2a53c);
      box-shadow: 0 16px 24px rgba(1,9,28,.3), inset 0 2px rgba(255,255,255,.45);
      transform: rotate(-3deg);
    }
    .repair-crate::before {
      content: ""; position: absolute; left: 18px; top: -19px; width: 40px; height: 24px;
      border: 5px solid #a8622f; border-bottom: 0; border-radius: 15px 15px 0 0;
    }
    .repair-crate::after {
      content: ""; position: absolute; left: 50%; top: 38px; width: 50px; height: 5px;
      border-radius: 5px; background: #a8622f; transform: translateX(-50%);
    }
    .repair-crate .icon { position: relative; z-index: 1; width: 31px; height: 31px; margin-top: -7px; stroke-width: 2.2; }
    .story-ground { position: absolute; left: 0; right: 0; bottom: 20px; height: 75px; border-radius: 50%; background: rgba(3,15,37,.34); filter: blur(2px); }
    .objective-panel { padding: 22px; border-radius: var(--radius-xl); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); display: flex; flex-direction: column; }
    .objective-panel h3 { margin: 8px 0 15px; font-size: 24px; line-height: 1.2; letter-spacing: -.03em; }
    .objective-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
    .objective-list li { display: grid; grid-template-columns: 34px 1fr; gap: 11px; align-items: start; padding: 11px; border-radius: 13px; background: #f7f6f2; }
    .objective-list i { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; color: var(--action); background: #e8ebff; font-style: normal; font-weight: 900; }
    .objective-list b { display: block; font-size: 16px; }
    .objective-list small { display: block; margin-top: 2px; color: var(--ink-soft); font-size: 14px; line-height: 1.55; }
    .parts-block { margin-top: auto; padding-top: 18px; }
    .parts-block > b { display: block; margin-bottom: 10px; font-size: 14px; }
    .parts-row { display: grid; grid-template-columns: repeat(4,1fr); gap: 7px; }
    .part-chip { min-width: 0; padding: 9px 5px 7px; text-align: center; border-radius: 11px; border: 1px solid var(--line); background: #fff; }
    .part-chip .icon { width: 25px; height: 25px; margin: 0 auto 4px; color: var(--ink); }
    .part-chip span { display: block; color: var(--ink-soft); font-size: 12px; white-space: nowrap; }
    .story-note { display: flex; align-items: flex-start; gap: 10px; margin-top: 16px; padding: 12px 14px; border-radius: 12px; background: #fff6da; border: 1px solid #f1d889; color: #765a16; font-size: 14px; line-height: 1.55; }
    .story-note .icon { width: 20px; height: 20px; flex: none; }
    .clear-button { min-height: 44px; padding: 0 12px; border: 0; border-radius: 9px; color: var(--action); background: transparent; font-weight: 850; }

    /* Concept */
    .concept-grid { min-height: 100%; display: grid; grid-template-columns: minmax(0,1.45fr) minmax(290px,.55fr); gap: 20px; }
    .concept-board { border-radius: var(--radius-xl); border: 1px solid var(--line); background: var(--surface); padding: clamp(20px,2.6vw,32px); box-shadow: var(--shadow); min-width: 0; display: flex; flex-direction: column; }
    .section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
    .section-heading-copy { width: 100%; min-width: 0; }
    .concept-meta-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
    .section-heading h2 { margin: 6px 0 0; font-size: clamp(28px,3vw,38px); line-height: 1.18; letter-spacing: -.04em; white-space: nowrap; }
    .section-heading p { margin: 7px 0 0; color: var(--ink-soft); font-size: 16px; }
    .circuit-story {
      position: relative; min-height: 335px; margin-top: 22px; padding: 18px;
      border-radius: var(--radius-lg); border: 1px solid #dfdccf; background: #fbfaf6;
      overflow: hidden;
    }
    .circuit-grid { position: absolute; inset: 0; opacity: .6; background-image: radial-gradient(#b7b7aa 1.2px, transparent 1.3px); background-size: 22px 22px; }
    .circuit-route { position: absolute; inset: 36px 26px 24px; width: calc(100% - 52px); height: calc(100% - 60px); }
    .wire-base { fill: none; stroke: #c1c2bd; stroke-width: 8; stroke-linecap: round; stroke-linejoin: round; }
    .wire-live { fill: none; stroke: var(--circuit); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 10 10; opacity: 0; transition: opacity var(--fast); }
    .concept-board.live .wire-live { opacity: 1; animation: currentFlow 1.7s linear infinite; }
    @keyframes currentFlow { to { stroke-dashoffset: -40; } }
    .circuit-comp {
      position: absolute; z-index: 2; width: 108px; min-height: 82px; padding: 10px;
      border-radius: 16px; border: 1px solid #cfcfc4; background: #fff;
      box-shadow: 0 12px 22px rgba(23,35,61,.09); text-align: center;
    }
    .circuit-comp b { display: block; margin-top: 4px; font-size: 13px; }
    .circuit-comp small { display: block; color: var(--ink-soft); font-size: 12px; }
    .comp-battery { left: 7%; top: 42%; }
    .comp-lamp { right: 7%; top: 38%; }
    .comp-switch { left: 50%; bottom: 7%; transform: translateX(-50%); width: 118px; }
    .battery-drawing { width: 35px; height: 42px; margin: auto; border-radius: 7px; background: var(--ink); position: relative; }
    .battery-drawing::before { content: "+"; color: #fff; position: absolute; inset: 0; display: grid; place-items: center; font-weight: 900; font-size: 18px; }
    .lamp-drawing { width: 46px; height: 46px; margin: auto; border-radius: 50% 50% 42% 42%; display: grid; place-items: center; color: #4f596c; background: #d9d8d1; border: 4px solid #e8e4d7; transition: background var(--fast), box-shadow var(--fast), color var(--fast); }
    .lamp-drawing .icon { width: 23px; height: 23px; }
    .concept-board.live .lamp-drawing { color: #7d5c00; background: #ffe17a; box-shadow: 0 0 0 8px rgba(255,201,60,.17), 0 0 32px rgba(255,201,60,.6); }
    .toggle-control { width: 68px; height: 44px; margin: auto; padding: 0; border-radius: 99px; border: 0; background: transparent; position: relative; }
    .toggle-control::before { content: ""; position: absolute; left: 0; right: 0; top: 6px; height: 32px; border-radius: 99px; background: #c8ccd4; transition: background var(--fast); }
    .toggle-control span { position: absolute; left: 3px; top: 9px; display: block; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 2px 5px rgba(0,0,0,.18); transition: transform var(--fast), background var(--fast); z-index: 1; }
    .toggle-control[aria-pressed="true"]::before { background: var(--success); }
    .toggle-control[aria-pressed="true"] span { transform: translateX(36px); }
    .circuit-caption {
      position: absolute; left: 14px; top: 14px; max-width: 160px;
      padding: 7px 11px; border-radius: 9px; background: #fff; border: 1px solid #ddd9ce;
      color: var(--ink-soft); font-size: 13px; font-weight: 800; white-space: normal;
    }
    .concept-board.live .circuit-caption { color: var(--success); border-color: #b9decf; background: #effbf6; }
    .physical-circuit { min-height: 0; padding: 0; display: flex; flex-direction: column; background: #0d2f67; }
    .physical-circuit-stage { position: relative; width: min(100%, clamp(600px, 52vw, 820px)); aspect-ratio: 760 / 420; }
    .physical-schematic { position: absolute; inset: 0; width: 100%; height: 100%; }
    .physical-wire { stroke-width: 9; }
    .physical-wire-red { stroke: #f05455; }
    .physical-wire-black { stroke: #1a263d; }
    .physical-wire-flow {
      stroke: rgba(255,238,128,.94); stroke-width: 3.5; stroke-dasharray: 3 18;
      opacity: 0; filter: drop-shadow(0 0 6px rgba(255,224,84,.9));
    }
    .concept-board.live .physical-wire-flow { opacity: 1; animation: currentFlow 1.8s linear infinite; }
    .physical-junctions circle { fill: #23599c; stroke: #b9d5f3; stroke-width: 3; }
    .concept-board.live .physical-junctions circle { fill: #41c993; stroke: #e3fff4; }
    .physical-label { fill: #d8e9ff; font-size: 17px; font-weight: 850; letter-spacing: .02em; }
    .physical-bulb .bulb-glow { fill: #ffe14f; opacity: 0; }
    .concept-board.live .physical-bulb .bulb-glow { opacity: .7; animation: lampConfirm 1.35s ease-out both; }
    .physical-toggle {
      position: absolute; z-index: 4; left: 20.4%; top: 66.7%; width: clamp(44px, 7.5%, 56px);
      aspect-ratio: 1; transform: translate(-50%, -50%);
      border: 3px solid #8eb5de; border-radius: 50%;
      background: radial-gradient(circle at 34% 28%, #f6fbff, #7896b8 58%, #304c70);
      box-shadow: 0 8px 16px rgba(0,15,38,.34), inset 0 2px 3px rgba(255,255,255,.6);
    }
    .physical-toggle span {
      position: absolute; width: 42%; height: 7px; left: 29%; top: 46%; border-radius: 7px;
      background: #f6b62f; transform: rotate(-36deg); transform-origin: left center;
      box-shadow: 0 0 8px rgba(255,201,60,.55); transition: transform var(--fast);
    }
    .physical-toggle[aria-pressed="true"] span { transform: rotate(0deg); background: #6ce0b6; }
    .field-note { background: #fff8e6; border: 1px solid #eedc9f; border-radius: var(--radius-xl); padding: 22px; align-self: start; position: relative; }
    .field-note::before {
      content: ""; position: absolute; left: 50%; top: -10px; width: 78px; height: 20px;
      transform: translateX(-50%) rotate(-2deg); background: rgba(255,201,60,.6); border: 1px solid rgba(170,127,18,.16);
    }
    .field-note .eyebrow { color: #8c6814; }
    .field-note h3 { margin: 15px 0 10px; font-family: "LXGW WenKai", "Kaiti SC", serif; font-size: 27px; line-height: 1.35; }
    .field-note p { margin: 0; color: #5f563f; font-size: 16px; line-height: 1.8; }
    .concept-points { display: grid; gap: 8px; margin: 18px 0 0; padding: 0; list-style: none; }
    .concept-points li { display: flex; gap: 9px; align-items: flex-start; padding: 10px 0; border-top: 1px solid rgba(143,111,30,.16); font-size: 14px; font-weight: 700; }
    .concept-points .icon { width: 18px; height: 18px; flex: none; color: #96701a; }

    /* Shared progress/buttons for concept and later stages */
    .stage-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 18px; }
    .stage-actions .hint { display: flex; align-items: center; gap: 8px; color: var(--ink-soft); font-size: 14px; }
    .stage-actions .hint .icon { width: 18px; height: 18px; }
    .lab-guidance { margin: 12px 0 0; color: #c3cde0; font-size: 13px; }
    .voice-hint, .engineering-data { display: none; }
    body[data-density-mode="support"] .voice-hint { display: flex; }
    body[data-density-mode="engineering"] .engineering-data { display: block; }
    body[data-density-mode="support"] .primary,
    body[data-density-mode="support"] .secondary { min-height: 58px; font-size: 18px; }
    body[data-density-mode="support"] .quick-answer,
    body[data-density-mode="support"] .challenge-option { min-height: 50px; font-size: 16px; }
    body[data-density-mode="support"] .concept-points li,
    body[data-density-mode="support"] .story-note { font-size: 16px; }
    body[data-density-mode="support"] .lab-hint-copy b { font-size: 13px; }
    body[data-density-mode="support"] .lab-hint-copy span,
    body[data-density-mode="support"] .lab-step-guide li { font-size: 11px; }
    .voice-hint { align-items: center; gap: 9px; padding: 9px 11px; border-radius: 10px; background: #edf3ff; color: #395176; font-size: 12px; font-weight: 750; }
    .voice-hint .icon { width: 18px; height: 18px; flex: none; color: var(--action); }
    .engineering-data { padding: 12px; border: 1px solid #d7dce8; border-radius: 10px; background: #f5f7fb; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; line-height: 1.7; color: #33415b; }

    /* Lab */
    .app-shell[data-screen="mission"][data-stage="simulation"] .appbar { display: none; }
    .app-shell[data-screen="mission"][data-stage="simulation"] .view-mission { min-height: 0; }
    .mission-shell[data-stage="simulation"] .mission-head {
      background: #f7f3e8;
      min-height: 64px; padding: 7px 18px;
      color: var(--ink); border-color: var(--line);
    }
    .mission-shell[data-stage="simulation"] .mission-title h1 { font-size: 26px; }
    .mission-shell[data-stage="simulation"] .mission-breadcrumb { color: var(--ink-soft); }
    .mission-shell[data-stage="simulation"] .mission-head .back-button { width: 42px; height: 42px; }
    .mission-shell[data-stage="simulation"] .lesson-audio-button { min-height: 48px; min-width: 172px; }
    .mission-shell[data-stage="simulation"] .lesson-audio-button {
      color: var(--action); border-color: #cbd6ed; background: linear-gradient(145deg, #fff, #edf2ff);
    }
    .mission-shell[data-stage="simulation"] .lesson-audio-copy small { color: var(--ink-soft); }
    .mission-shell[data-stage="simulation"] .mission-title span,
    .mission-shell[data-stage="simulation"] .mission-goal { color: var(--lab-soft); }
    .mission-shell[data-stage="simulation"] .mission-breadcrumb { color: var(--lab-soft); }
    .mission-shell[data-stage="simulation"] .mission-goal strong { color: var(--lab-text); }
    .mission-shell[data-stage="simulation"] .goal-badge { color: var(--circuit); background: rgba(37,197,192,.12); }
    .mission-shell[data-stage="simulation"] .back-button { color: var(--lab-text); background: var(--lab-raised); border-color: var(--lab-line); }
    .mission-shell[data-stage="simulation"] .mission-content {
      background:
        radial-gradient(circle at 82% 4%, rgba(43,119,255,.16), transparent 28%),
        radial-gradient(circle at 15% 82%, rgba(37,197,192,.09), transparent 30%),
        linear-gradient(145deg, #071b40, #0a2759 52%, #061735);
      color: var(--lab-text);
    }
    .mission-shell[data-stage="simulation"] .stage-rail {
      color: var(--ink);
      background:
        linear-gradient(90deg, rgba(255,255,255,.56), transparent 12% 88%, rgba(255,255,255,.46)),
        #f7f3e8;
      border-color: #d9d1c2;
    }
    .mission-shell[data-stage="simulation"] .stage-tab {
      color: var(--ink-soft);
      background: rgba(255,253,247,.92);
    }
    .mission-shell[data-stage="simulation"] .stage-tab:hover { color: var(--ink); background: #fff; }
    .mission-shell[data-stage="simulation"] .stage-tab i { color: #fff; background: #2b466f; }
    .mission-shell[data-stage="simulation"] .stage-tab.active {
      color: var(--ink);
      border-color: #d7a724;
      background: #fff9e4;
    }
    .mission-shell[data-stage="simulation"] .stage-tab.active i { color: var(--ink); background: var(--signal); }
    .mission-shell[data-stage="simulation"] .stage-tab.done {
      color: #255f4d;
      border-color: rgba(52,145,111,.26);
      background: #f1fbf6;
    }
    .mission-shell[data-stage="simulation"] .stage-tab.done i { color: #fff; background: var(--success); }
    .electronics-reference-frame {
      display: none; width: 100%; height: 100%; border: 0;
      background: #f6eddd;
    }
    .mission-shell.reference-lab {
      height: 100%;
      background: #f6eddd;
    }
    .mission-shell.reference-lab .mission-head,
    .mission-shell.reference-lab .stage-rail {
      display: none;
    }
    .mission-shell.reference-lab .mission-content {
      overflow: hidden;
      background: #f6eddd;
    }
    .mission-shell.reference-lab .stage-panel[data-stage-panel="simulation"] {
      width: 100%;
      height: 100%;
      min-height: 0;
      padding: 0 !important;
      overflow: hidden;
      animation: none;
    }
    .mission-shell.reference-lab .lab-layout {
      display: none;
    }
    .mission-shell.reference-lab .electronics-reference-frame {
      display: block;
    }
    body.reference-lab .aibo-companion {
      display: none;
    }
    body.reference-lab .app-shell {
      padding-top: 0;
      background: #f6eddd;
    }
    body.reference-lab .view-mission {
      height: 100%;
      min-height: 0;
      background: #f6eddd;
    }
    .lab-status-pill { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--lab-line); color: var(--lab-soft); background: var(--lab-raised); font-size: 13px; font-weight: 850; }
    .lab-status-pill i { width: 8px; height: 8px; border-radius: 50%; background: var(--warning); }
    .lab-layout { display: grid; grid-template-columns: minmax(0,1fr) clamp(300px, 28.5vw, 410px); gap: 14px; min-height: 0; height: 100%; }
    .lab-workbench { position: relative; min-width: 0; display: flex; flex-direction: column; border-radius: var(--radius-xl); border: 1px solid var(--lab-line); background: linear-gradient(160deg, #0c2d61, #081f49); overflow: hidden; box-shadow: 0 24px 55px rgba(1, 12, 37, .22); }
    .lab-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 15px; border-bottom: 1px solid var(--lab-line); }
    .lab-toolbar h2 { margin: 0; font-size: 16px; letter-spacing: -.02em; }
    .lab-toolbar small { color: var(--lab-soft); font-size: 12px; }
    .lab-toolbar-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
    .lab-render-toggle {
      min-height: 36px; padding: 0 10px; display: inline-flex; align-items: center; gap: 6px;
      border: 1px solid var(--lab-line); border-radius: 9px; color: #d9e9ff; background: #071e46;
      font-size: 11px; font-weight: 850;
    }
    .lab-render-toggle:hover { border-color: #7db2ea; }
    .lab-render-toggle[aria-pressed="true"] { color: var(--ink); background: var(--signal); border-color: #ffe68d; }
    .lab-render-toggle:disabled { opacity: .54; }
    .lab-render-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--circuit); box-shadow: 0 0 8px rgba(37,197,192,.72); }
    .lab-render-toggle[aria-pressed="true"] .lab-render-dot { background: var(--ink); box-shadow: none; }
    .lab-visual-shell { position: relative; flex: 1; min-height: 390px; overflow: hidden; }
    .mission-shell[data-stage="simulation"] .stage-panel[data-stage-panel="simulation"] {
      padding: 10px 14px 12px;
    }
    .lab-3d-view {
      position: absolute; inset: 0; overflow: hidden;
      background:
        radial-gradient(circle at 74% 28%, rgba(57,137,225,.24), transparent 29%),
        radial-gradient(circle at 20% 65%, rgba(37,197,192,.13), transparent 34%),
        linear-gradient(145deg, #071a3d, #0b2b60 58%, #05142f);
    }
    .lab-3d-view::before {
      content: ""; position: absolute; inset: 0; pointer-events: none;
      background-image:
        radial-gradient(circle, rgba(138,183,242,.25) 0 1px, transparent 1.3px),
        linear-gradient(rgba(103,158,223,.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(103,158,223,.08) 1px, transparent 1px);
      background-size: 27px 27px, 36px 36px, 36px 36px;
      mask-image: radial-gradient(circle at 50% 50%, #000 10%, transparent 72%);
    }
    #lab3dCanvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: grab; outline: none; }
    #lab3dCanvas:focus-visible { outline: 3px solid var(--signal); outline-offset: -5px; }
    #lab3dCanvas.is-pointing { cursor: pointer; }
    .lab-3d-labels { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
    .lab-3d-label {
      position: absolute; z-index: 4; transform: translate(-50%,-100%); pointer-events: auto;
      min-height: 28px; padding: 4px 8px 5px; border-radius: 8px;
      color: #e8f3ff; background: rgba(4,24,57,.88); border: 1px solid rgba(122,176,232,.5);
      font-size: 10px; font-weight: 850; white-space: nowrap; box-shadow: 0 8px 18px rgba(0,0,0,.22);
    }
    .lab-3d-label::after {
      content: ""; position: absolute; left: 50%; bottom: -5px; width: 7px; height: 7px;
      border-right: 1px solid rgba(122,176,232,.5); border-bottom: 1px solid rgba(122,176,232,.5);
      background: rgba(4,24,57,.88); transform: translateX(-50%) rotate(45deg);
    }
    .lab-3d-label.is-action { color: var(--ink); background: var(--signal); border-color: #ffe99c; }
    .lab-3d-label.is-action::after { background: var(--signal); border-color: #ffe99c; }
    .lab-3d-label.is-wire { color: #ffd4c8; border-color: rgba(242,106,79,.7); background: rgba(69,20,18,.9); }
    .lab-3d-label.is-wire::after { background: rgba(69,20,18,.9); border-color: rgba(242,106,79,.7); }
    .lab-3d-label.is-wire.is-done { color: #c9ffeb; border-color: rgba(72,208,164,.7); background: rgba(8,65,48,.92); }
    .lab-3d-label.is-wire.is-done::after { background: rgba(8,65,48,.92); border-color: rgba(72,208,164,.7); }
    .lab-3d-label.is-hovered { outline: 2px solid #fff; outline-offset: 2px; }
    .lab-3d-label[hidden] { display: none; }
    .lab-3d-loading {
      position: absolute; z-index: 5; left: 50%; top: 50%; width: min(260px, 78%);
      padding: 17px 18px; transform: translate(-50%,-50%); text-align: center;
      border: 1px solid var(--lab-line); border-radius: 15px; background: rgba(5,24,61,.92);
      color: var(--lab-text); box-shadow: 0 18px 40px rgba(0,0,0,.28);
    }
    .lab-3d-loading > span {
      width: 34px; height: 34px; margin: 0 auto 9px; display: block; border-radius: 50%;
      border: 2px solid rgba(37,197,192,.22); border-top-color: var(--circuit);
      animation: labLoaderSpin .8s linear infinite;
    }
    .lab-3d-loading b,
    .lab-3d-loading small { display: block; }
    .lab-3d-loading b { font-size: 14px; }
    .lab-3d-loading small { margin-top: 3px; color: var(--lab-soft); font-size: 10px; }
    .lab-3d-view.is-ready .lab-3d-loading { opacity: 0; visibility: hidden; transition: opacity 180ms, visibility 180ms; pointer-events: none; }
    @keyframes labLoaderSpin { to { transform: rotate(360deg); } }
    .lab-3d-readout {
      position: absolute; z-index: 4; left: 12px; bottom: 12px;
      display: grid; grid-template-columns: auto auto; gap: 2px 9px; align-items: baseline;
      padding: 9px 11px; border: 1px solid var(--lab-line); border-radius: 10px;
      color: #9cb8db; background: rgba(4,24,57,.86); font-size: 9px; font-weight: 750;
      pointer-events: none;
    }
    .lab-3d-readout b { color: #fff; font-size: 11px; }
    .lab-3d-tip {
      position: absolute; z-index: 3; left: 50%; bottom: 12px; transform: translateX(-50%);
      margin: 0; padding: 6px 10px; border-radius: 8px; color: #c8daf0;
      background: rgba(4,24,57,.72); font-size: 9px; white-space: nowrap; pointer-events: none;
    }
    .lab-view-controls {
      position: absolute; z-index: 5; right: 11px; bottom: 11px;
      display: flex; align-items: center; gap: 5px;
    }
    .lab-view-controls button {
      width: 44px; height: 44px; padding: 0; display: grid; place-items: center;
      border: 1px solid var(--lab-line); border-radius: 10px;
      color: #d9e9ff; background: rgba(4,24,57,.9);
      font-size: 19px; font-weight: 800;
    }
    .lab-view-controls .icon { width: 18px; height: 18px; }
    .lab-view-controls button:hover { border-color: var(--signal); }
    .lab-3d-view.is-running .lab-3d-readout b:last-child { color: var(--signal); }
    .lab-canvas {
      position: absolute; inset: 0; min-height: 0; overflow: hidden;
      background-color: #071a3d;
      background-image:
        radial-gradient(circle at 72% 37%, rgba(46,128,255,.2), transparent 29%),
        radial-gradient(circle at 20% 50%, rgba(37,197,192,.1), transparent 29%),
        radial-gradient(rgba(134,180,240,.5) 1.15px, transparent 1.35px),
        linear-gradient(145deg, #071b40, #0a2a5c 58%, #061735);
      background-size: auto, auto, 26px 26px, auto;
    }
    .lab-canvas[hidden] { display: none; }
    .lab-canvas::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 70% 38%, rgba(255,201,60,.09), transparent 26%); pointer-events: none; }
    .lab-wires { position: absolute; inset: 0; width: 100%; height: 100%; }
    .lab-wire { fill: none; stroke-linecap: round; stroke-linejoin: round; stroke-width: 5; }
    .lab-wire.red { stroke: var(--physical); }
    .lab-wire.blue { stroke: #6076ff; }
    .lab-wire.gap { stroke: #ff8b75; stroke-dasharray: 10 13; opacity: .42; }
    .lab-wire.closed { opacity: 1; }
    #electronRoute { fill: none; stroke: none; pointer-events: none; }
    .lab-electron { fill: var(--signal); opacity: 0; filter: drop-shadow(0 0 5px #ffdb73); }
    .lab-canvas.running .lab-electron { opacity: 1; animation: electronPath 1.9s linear infinite; }
    @keyframes electronPath {
      0% { offset-distance: 0%; }
      100% { offset-distance: 100%; }
    }
    .lab-component {
      position: absolute; z-index: 3; min-width: 122px; padding: 12px;
      border-radius: 16px; border: 1px solid #3d6ea7; background: linear-gradient(145deg, #12396f, #0b2957);
      box-shadow: 0 16px 30px rgba(1,12,35,.28); color: var(--lab-text); text-align: center;
    }
    .lab-component b { display: block; font-size: 13px; }
    .lab-component small { display: block; margin-top: 2px; color: var(--lab-soft); font-size: 12px; }
    .lab-battery { left: 7%; top: 32%; }
    .lab-led { right: 7%; top: 30%; }
    .lab-switch { left: 50%; bottom: 10%; transform: translateX(-50%); }
    .lab-battery .battery-drawing { width: 52px; height: 73px; }
    .lab-battery .battery-drawing::after { content: "3V"; position: absolute; bottom: 5px; left: 7px; color: var(--signal); font-size: 10px; }
    .lab-led .bulb-graphic { width: 58px; height: 58px; margin: auto; border-radius: 50%; background: #3f4859; border: 4px solid #677184; transition: background var(--fast), box-shadow var(--fast); }
    .lab-led.glowing .bulb-graphic { background: #ffe377; border-color: #fff1b5; box-shadow: 0 0 35px 12px rgba(255,201,60,.6); }
    .lab-led.glowing .bulb-graphic { animation: lampConfirm 1.35s ease-out both; }
    .endpoint {
      position: absolute; z-index: 5; width: 44px; height: 44px; border-radius: 50%;
      color: var(--lab-text); background: #123666; border: 2px solid #7ca7d7;
      display: grid; place-items: center; font-size: 10px; font-weight: 900; transition: transform var(--fast), background var(--fast), border-color var(--fast);
    }
    .endpoint:hover { transform: scale(1.06); border-color: var(--signal); }
    .endpoint.selected { color: var(--ink); background: var(--signal); border-color: #fff0ab; }
    .endpoint[data-end="battery-positive"] { left: 27%; top: 35%; }
    .endpoint[data-end="led-positive"] { left: 66%; top: 35%; }
    .endpoint[data-end="battery-negative"] { left: 27%; top: 63%; }
    .endpoint[data-end="led-negative"] { left: 66%; top: 63%; }
    .switch-button { width: 82px; height: 44px; margin: 5px auto 0; padding: 4px; border: 0; border-radius: 99px; background: #36577e; }
    .switch-button span { display: block; width: 35px; height: 35px; border-radius: 50%; background: #fff; transition: transform var(--fast); }
    .switch-button[aria-pressed="true"] { background: var(--success); }
    .switch-button[aria-pressed="true"] span { transform: translateX(39px); }
    .lab-hint-label {
      position: absolute; z-index: 3; left: 50%; top: 13%; transform: translateX(-50%);
      width: min(310px, calc(100% - 32px)); min-height: 56px; display: flex; align-items: center; gap: 10px;
      color: #eef6ff; background: rgba(5,24,61,.9); border: 1px solid var(--lab-line);
      border-radius: 14px; padding: 8px 12px; box-shadow: 0 10px 24px rgba(1,10,30,.22);
    }
    .lab-hint-copy { min-width: 0; }
    .lab-hint-copy b,
    .lab-hint-copy span { display: block; }
    .lab-hint-copy b { font-size: 12px; line-height: 1.25; }
    .lab-hint-copy span { margin-top: 2px; color: var(--lab-soft); font-size: 10px; line-height: 1.35; }
    .lab-hint-graphic { display: flex; align-items: center; gap: 5px; }
    .lab-hint-terminal {
      width: 21px; height: 21px; display: grid; place-items: center; border-radius: 50%;
      border: 2px solid #8bb7e8; background: #123666; box-shadow: 0 0 0 0 rgba(255,201,60,.3);
      animation: labTerminalPulse 1.7s ease-out infinite;
    }
    .lab-hint-terminal:last-child { animation-delay: .42s; }
    .lab-hint-wire { width: 38px; height: 12px; position: relative; }
    .lab-hint-wire::before {
      content: ""; position: absolute; left: 0; right: 0; top: 5px;
      border-top: 2px dashed var(--physical);
    }
    .lab-hint-wire::after {
      content: ""; position: absolute; right: 0; top: 1px; width: 7px; height: 7px;
      border-top: 2px solid var(--signal); border-right: 2px solid var(--signal); transform: rotate(45deg);
    }
    .lab-hint-label[data-state="connected"] .lab-hint-wire::before { border-style: solid; border-color: var(--success); }
    .lab-hint-label[data-state="connected"] .lab-hint-wire::after { border-color: var(--success); }
    .lab-hint-label[data-state="connected"] .lab-hint-terminal { border-color: var(--success); background: rgba(25,157,111,.32); }
    @keyframes labTerminalPulse {
      0%, 35% { box-shadow: 0 0 0 0 rgba(255,201,60,.35); border-color: #8bb7e8; }
      58% { box-shadow: 0 0 0 7px rgba(255,201,60,0); border-color: var(--signal); }
      100% { box-shadow: 0 0 0 0 rgba(255,201,60,0); border-color: #8bb7e8; }
    }
    .parts-tray { display: flex; gap: 8px; align-items: center; padding: 10px 14px; border-top: 1px solid var(--lab-line); overflow-x: auto; }
    .parts-tray > span { flex: none; color: #9eb8d8; font-size: 12px; font-weight: 800; margin-right: 4px; }
    .tray-part { flex: none; min-height: 48px; display: flex; align-items: center; gap: 7px; padding: 5px 10px; border: 1px solid var(--lab-line); border-radius: 10px; color: #d6e7fb; background: #071e46; font-size: 12px; }
    .tray-part .icon { width: 19px; height: 19px; color: var(--circuit); }
    .lab-side { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
    .prediction-card, .coach-card { border: 1px solid var(--lab-line); border-radius: var(--radius-lg); background: var(--lab-raised); padding: 15px; }
    .prediction-card { transition: border-color var(--panel), box-shadow var(--panel); }
    .prediction-card[data-phase="predict"] { border-color: rgba(255,201,60,.48); box-shadow: inset 0 0 0 1px rgba(255,201,60,.06); }
    .prediction-card[data-phase="run"] { border-color: rgba(37,197,192,.62); box-shadow: 0 0 26px rgba(37,197,192,.1); }
    .prediction-card[data-phase="done"] { border-color: rgba(72,208,164,.55); }
    .lab-step-guide {
      display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 5px;
      margin: 0 0 13px; padding: 0; list-style: none;
    }
    .lab-step-guide li {
      min-width: 0; min-height: 34px; display: flex; align-items: center; justify-content: center; gap: 5px;
      padding: 4px 5px; border-radius: 9px; color: #8fa8c8; background: rgba(255,255,255,.045);
      border: 1px solid rgba(148,181,221,.13); font-size: 10px; font-weight: 800;
    }
    .lab-step-guide i {
      width: 18px; height: 18px; flex: 0 0 18px; display: grid; place-items: center;
      border-radius: 6px; background: rgba(255,255,255,.08); color: inherit; font-size: 9px; font-style: normal;
    }
    .lab-step-guide li.current { color: var(--ink); background: var(--signal); border-color: var(--signal); }
    .lab-step-guide li.current i { background: rgba(23,35,61,.12); }
    .lab-step-guide li.done { color: #a9f0d7; background: rgba(19,122,84,.2); border-color: rgba(72,208,164,.3); }
    .lab-step-guide li.done i { color: #fff; background: var(--success); }
    .prediction-card h3, .coach-card h3 { margin: 0 0 10px; font-size: 17px; }
    .prediction-card > p, .coach-card > p { margin: 0 0 12px; color: var(--lab-soft); font-size: 14px; line-height: 1.6; }
    .prediction-choices { display: grid; gap: 8px; }
    .prediction-choice {
      min-height: 46px; padding: 9px 11px; text-align: left; border-radius: 10px; border: 1px solid var(--lab-line);
      color: #dbe9fa; background: #071e46; font-size: 14px;
    }
    .prediction-choice:hover { border-color: #60718e; }
    .prediction-choice[aria-pressed="true"] { color: var(--ink); background: var(--signal); border-color: var(--signal); font-weight: 850; }
    .prediction-choice { display: flex; align-items: center; justify-content: center; gap: 10px; }
    .prediction-icon {
      position: relative; width: 29px; height: 29px; flex: none; display: grid; place-items: center;
      border-radius: 50%; color: #93a0b4; background: rgba(255,255,255,.06);
    }
    .prediction-icon .icon { width: 18px; height: 18px; }
    .prediction-icon.is-on { color: #ffe47e; background: rgba(255,201,60,.12); box-shadow: inset 0 0 0 1px rgba(255,201,60,.28); }
    .prediction-icon.is-on::before,
    .prediction-icon.is-on::after {
      content: ""; position: absolute; width: 4px; height: 4px; border-radius: 50%; background: #ffe47e;
      box-shadow: 0 0 7px #ffc93c; opacity: .8;
    }
    .prediction-icon.is-on::before { left: -3px; top: 8px; }
    .prediction-icon.is-on::after { right: -3px; top: 8px; }
    .prediction-icon.is-off::after {
      content: ""; position: absolute; width: 25px; height: 2px; border-radius: 2px;
      background: #ff8b75; transform: rotate(-44deg); box-shadow: 0 0 0 2px rgba(10,30,65,.5);
    }
    .prediction-word { min-width: 20px; font-weight: 850; }
    .lab-model-strip {
      display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 5px; margin-top: 10px;
    }
    .lab-model-strip span {
      min-width: 0; padding: 7px 5px; border-radius: 8px; text-align: center;
      color: #8fa8c8; background: rgba(255,255,255,.04); border: 1px solid rgba(148,181,221,.12);
      font-size: 8px; font-weight: 750; line-height: 1.2;
    }
    .lab-model-strip b { display: block; margin-bottom: 2px; color: #eaf5ff; font-size: 11px; }
    .lab-actions { display: flex; gap: 8px; margin-top: 12px; }
    .lab-actions .primary, .lab-actions .secondary { min-height: 46px; padding: 0 13px; font-size: 14px; flex: 1; }
    .lab-actions .secondary { color: var(--lab-text); background: #071e46; border-color: var(--lab-line); }
    .prediction-card[data-phase="run"] #runLab { box-shadow: 0 0 0 3px rgba(37,197,192,.12), 0 9px 22px rgba(6,15,37,.28); }
    .lab-rule-note {
      display: none; margin: 10px 0 0; padding: 8px 9px; border-radius: 8px;
      color: #b9d8f5; background: #071e46; border: 1px solid var(--lab-line);
      font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; line-height: 1.5;
    }
    body[data-density-mode="engineering"] .lab-rule-note { display: block; }
    .lab-result { display: none; margin-top: 12px; min-height: 54px; padding: 11px; border-radius: 10px; border: 1px solid var(--lab-line); background: #071e46; color: var(--lab-soft); font-size: 14px; line-height: 1.55; }
    .lab-result.success, .lab-result.error { display: block; }
    .lab-result strong { display: block; margin-bottom: 3px; color: var(--lab-text); font-size: 15px; }
    .lab-result.success { border-color: rgba(72,208,164,.38); background: rgba(19,122,84,.16); color: #bdebd9; }
    .lab-result.success strong { color: #71e0bb; }
    .lab-result.error { border-color: rgba(242,106,79,.38); background: rgba(184,61,69,.12); color: #ffd4cd; }
    .lab-result.error strong { color: #ff9382; }
    .lab-compare {
      margin-top: 8px; padding: 9px 10px; border: 1px solid rgba(255,201,60,.32); border-radius: 10px;
      color: #dbe9fa; background: rgba(255,201,60,.07); font-size: 11px; line-height: 1.5;
    }
    .lab-compare[hidden] { display: none; }
    .lab-compare.is-match { border-color: rgba(72,208,164,.36); background: rgba(19,122,84,.15); }
    .lab-compare.is-different { border-color: rgba(255,177,74,.38); background: rgba(154,101,22,.14); }
    .lab-compare b { display: block; margin-bottom: 2px; color: #fff; font-size: 12px; }
    .lab-model-note { margin: 8px 0 0; color: #829bbd; font-size: 9px; line-height: 1.45; }
    .coach-card { margin-top: auto; }
    .coach-person { display: flex; align-items: center; gap: 9px; margin-bottom: 10px; }
    .coach-person .aibo { width: 42px; height: 47px; }
    .coach-person b { font-size: 14px; }
    .coach-person small { display: block; color: var(--circuit); font-size: 12px; }
    .coach-card p { margin-bottom: 9px; color: #c6d0e1; }
    .lab-next { width: 100%; min-height: 47px; margin-top: 7px; font-size: 14px; display: none; }
    .lab-next.visible { display: inline-flex; }

    /* Original Stellar Engineer bench treatment: warm interior, navy shell kept outside. */
    :root {
      --bench: #f8f1e2;
      --bench-raised: #fffdf6;
      --bench-line: #d7c7ad;
      --bench-text: #17233d;
      --bench-muted: #5f6a80;
      --bench-grid: #d8c9b1;
      --bench-shadow: rgba(28,21,6,.14);
    }
    .lab-workbench {
      color: var(--bench-text);
      border-color: var(--bench-line);
      background: linear-gradient(160deg, #f9f2e4, #f2e7d2 68%, #eee1c8);
      box-shadow: 0 24px 52px rgba(28, 21, 6, .17);
    }
    .lab-toolbar { border-bottom-color: var(--bench-line); }
    .lab-toolbar h2,
    .lab-toolbar small { color: var(--bench-muted); }
    .lab-status-pill {
      color: var(--bench-muted);
      border-color: var(--bench-line);
      background: var(--bench-raised);
    }
    .lab-render-toggle {
      color: var(--bench-text);
      border-color: var(--bench-line);
      background: var(--bench-raised);
      box-shadow: inset 0 1px #fff;
    }
    .lab-render-toggle:hover { border-color: #bda67f; }
    .lab-render-toggle[aria-pressed="true"] { border-color: #ffe68d; }
    .lab-3d-view {
      background:
        radial-gradient(68% 62% at 52% 44%, #fffaf0 0%, #f7eddb 45%, #ecdec6 78%),
        linear-gradient(160deg, #f7efdf, #eaddc4);
    }
    .lab-3d-view::before {
      background-image:
        radial-gradient(circle, rgba(164,144,108,.42) 0 1px, transparent 1.3px),
        linear-gradient(rgba(172,151,114,.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(172,151,114,.1) 1px, transparent 1px);
    }
    .lab-3d-view::after {
      content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none;
      background:
        radial-gradient(ellipse at 50% 47%, transparent 34%, rgba(110,82,42,.08) 78%, rgba(69,48,23,.12) 100%),
        linear-gradient(90deg, rgba(255,255,255,.14), transparent 15% 85%, rgba(255,255,255,.12));
      box-shadow: inset 0 0 0 1px rgba(121,94,53,.1);
      transition: box-shadow 240ms ease, background 240ms ease;
    }
    .lab-3d-view.is-running::after {
      background:
        radial-gradient(ellipse at 66% 42%, rgba(255,217,86,.2), transparent 28%),
        radial-gradient(ellipse at 50% 47%, transparent 38%, rgba(99,72,31,.08) 82%, rgba(69,48,23,.12) 100%);
      box-shadow: inset 0 0 0 2px rgba(222,174,41,.42), inset 0 0 42px rgba(255,200,52,.1);
    }
    .lab-3d-label {
      color: var(--bench-text);
      border-color: var(--bench-line);
      background: var(--bench-raised);
      box-shadow: 0 10px 20px var(--bench-shadow);
    }
    .lab-3d-label::after {
      border-right-color: var(--bench-line);
      border-bottom-color: var(--bench-line);
      background: var(--bench-raised);
    }
    .lab-3d-label.is-action {
      color: #10244c;
      border-color: #ffe68d;
      background: var(--signal);
      box-shadow: 0 10px 22px rgba(255, 199, 56, .26);
    }
    .lab-3d-label.is-action::after {
      border-color: #ffe68d;
      background: var(--signal);
    }
    .lab-3d-label.is-wire {
      color: #7d2a1e;
      border-color: rgba(242,106,79,.52);
      background: #fff1ea;
      box-shadow: 0 10px 20px rgba(213, 96, 66, .14);
    }
    .lab-3d-label.is-wire::after {
      border-color: rgba(242,106,79,.52);
      background: #fff1ea;
    }
    .lab-3d-label.is-wire.is-done {
      color: #17614a;
      border-color: rgba(72,208,164,.46);
      background: #eafaf4;
      box-shadow: 0 10px 20px rgba(19, 122, 84, .13);
    }
    .lab-3d-label.is-wire.is-done::after {
      border-color: rgba(72,208,164,.46);
      background: #eafaf4;
    }
    .lab-3d-readout {
      color: var(--bench-muted);
      border-color: var(--bench-line);
      background: rgba(255,253,246,.94);
      box-shadow: 0 10px 22px var(--bench-shadow);
    }
    .lab-3d-readout b { color: var(--bench-text); }
    .lab-3d-tip {
      color: var(--bench-muted);
      border: 1px solid var(--bench-line);
      background: rgba(255,253,246,.9);
    }
    .lab-3d-view.is-running .lab-3d-tip {
      color: #6d4b0d;
      border-color: rgba(217,154,20,.36);
      background: rgba(255,248,214,.94);
    }
    .lab-3d-view.is-running .lab-3d-readout {
      border-color: rgba(217,154,20,.32);
      box-shadow: 0 10px 22px var(--bench-shadow), inset 0 0 18px rgba(255,204,62,.07);
    }
    .lab-view-controls button {
      color: var(--bench-text);
      border-color: var(--bench-line);
      background: rgba(255,253,246,.94);
      box-shadow: 0 8px 18px var(--bench-shadow);
    }
    .lab-canvas {
      background-color: #f8f1e2;
      background-image:
        radial-gradient(circle at 72% 37%, rgba(255,201,60,.12), transparent 29%),
        radial-gradient(circle at 20% 50%, rgba(37,197,192,.09), transparent 29%),
        radial-gradient(rgba(164,144,108,.36) 1.15px, transparent 1.35px),
        linear-gradient(145deg, #f9f2e4, #f2e7d2 58%, #eee1c8);
    }
    .lab-component {
      color: var(--bench-text);
      border-color: var(--bench-line);
      background: linear-gradient(145deg, #fffdf6, #f6eddc);
      box-shadow: 0 14px 28px var(--bench-shadow);
    }
    .lab-component small { color: var(--bench-muted); }
    .prediction-card,
    .coach-card {
      border-color: var(--bench-line);
      background: linear-gradient(180deg, #fffdf6, #f8f0e0);
      color: var(--bench-text);
      box-shadow: 0 16px 34px var(--bench-shadow);
    }
    .prediction-card h3,
    .coach-card h3 { color: var(--bench-text); }
    .prediction-card > p,
    .coach-card > p,
    .coach-card p { color: var(--bench-muted); }
    .lab-step-guide li {
      color: var(--bench-muted);
      border-color: rgba(148,130,98,.18);
      background: rgba(255,255,255,.52);
    }
    .lab-step-guide li.current {
      color: #10244c;
      border-color: #ffe68d;
      background: var(--signal);
    }
    .lab-step-guide li.done {
      color: #17614a;
      border-color: rgba(19,122,84,.28);
      background: #eaf8f1;
    }
    .lab-step-guide li.done i {
      color: #fff;
      background: var(--success);
    }
    .prediction-choice {
      color: var(--bench-text);
      border-color: var(--bench-line);
      background: var(--bench-raised);
    }
    .prediction-choice:hover { border-color: #bda67f; }
    .lab-model-strip span {
      color: var(--bench-muted);
      border-color: rgba(148,130,98,.18);
      background: rgba(255,255,255,.56);
    }
    .lab-model-strip b { color: var(--bench-text); }
    .lab-actions .secondary {
      color: var(--bench-text);
      border-color: var(--bench-line);
      background: var(--bench-raised);
    }
    .lab-rule-note {
      color: #6f5a35;
      border-color: var(--bench-line);
      background: rgba(255,253,246,.82);
    }
    .lab-result {
      color: var(--bench-muted);
      border-color: var(--bench-line);
      background: rgba(255,253,246,.88);
    }
    .lab-result.success {
      color: #17614a;
      border-color: rgba(19,122,84,.3);
      background: #eaf8f1;
    }
    .lab-result.error {
      color: #8a2e25;
      border-color: rgba(184,61,69,.3);
      background: #fff0ec;
    }
    .lab-result.success strong { color: #17614a; }
    .lab-result.error strong { color: #8a2e25; }
    .lab-compare {
      color: var(--bench-text);
      border-color: rgba(255,201,60,.38);
      background: rgba(255,201,60,.1);
    }
    .lab-compare.is-match {
      color: #17614a;
      border-color: rgba(19,122,84,.3);
      background: #eaf8f1;
    }
    .lab-compare.is-different {
      color: #795817;
      border-color: rgba(217,138,0,.32);
      background: #fff7e3;
    }
    .lab-compare b { color: var(--bench-text); }
    .lab-model-note { color: var(--bench-muted); }
    .lab-next.visible { box-shadow: 0 12px 26px rgba(63, 88, 217, .22); }
    .lab-observation-guide {
      margin-top: 12px; padding: 10px 11px; border: 1px solid #e2d5bd; border-radius: 10px;
      color: var(--bench-text); background: rgba(255,255,255,.58);
    }
    .lab-observation-head { display: flex; align-items: center; gap: 7px; color: #72510b; font-size: 10px; }
    .lab-observation-head .icon { width: 16px; height: 16px; }
    .lab-observation-guide ul { display: grid; gap: 5px; margin: 8px 0 0; padding: 0; list-style: none; }
    .lab-observation-guide li {
      display: flex; align-items: center; gap: 7px; color: var(--bench-muted); font-size: 9px; line-height: 1.35;
    }
    .lab-observation-guide li span {
      width: 16px; height: 16px; flex: none; display: grid; place-items: center;
      border-radius: 5px; color: var(--bench-text); background: #fff1b7; font-size: 8px; font-weight: 900;
    }
    .lab-live-state {
      display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 6px;
      margin-top: auto; padding-top: 12px;
    }
    .lab-live-state span {
      min-width: 0; padding: 8px 5px; border: 1px solid #e3d7c3; border-radius: 9px;
      text-align: center; background: rgba(255,255,255,.62);
    }
    .lab-live-state small,
    .lab-live-state b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .lab-live-state small { color: var(--bench-muted); font-size: 8px; }
    .lab-live-state b { margin-top: 3px; color: var(--bench-text); font-size: 10px; }
    .lab-side {
      height: 100%;
      min-height: 0;
    }
    .lab-info-card {
      height: 100%; min-height: 0; display: flex; flex-direction: column;
      overflow: hidden; border: 1px solid var(--bench-line); border-radius: var(--radius-lg);
      color: var(--bench-text); background: linear-gradient(180deg, #fffdf6, #f8f0e0);
      box-shadow: 0 16px 34px var(--bench-shadow);
    }
    .lab-info-tabs {
      flex: 0 0 auto; display: grid; grid-template-columns: repeat(4, minmax(0,1fr));
      gap: 2px; padding: 8px 10px 0; border-bottom: 1px solid var(--bench-line);
      background: rgba(255, 253, 246, .82);
    }
    .lab-info-tabs button {
      min-height: 40px; padding: 0 4px 2px; border: 0; border-bottom: 2px solid transparent;
      color: var(--bench-muted); background: transparent; font-size: 11px; font-weight: 850;
    }
    .lab-info-tabs button:hover { color: var(--bench-text); background: rgba(23,35,61,.04); }
    .lab-info-tabs button.is-active {
      color: var(--bench-text); border-bottom-color: #d6a51e;
    }
    .lab-info-tabs button:focus-visible { outline: 2px solid var(--action); outline-offset: -2px; }
    .lab-info-panel {
      flex: 1; min-height: 0; display: none; overflow-y: auto; padding: 16px;
      color: var(--bench-text); overscroll-behavior: contain;
    }
    .lab-info-panel.is-active {
      display: flex; flex-direction: column; animation: labInfoIn 180ms ease-out both;
    }
    @keyframes labInfoIn { from { opacity: .45; transform: translateY(3px); } to { opacity: 1; transform: none; } }
    .prediction-card.lab-info-panel {
      border: 0; border-radius: 0; background: transparent; box-shadow: none;
    }
    .lab-info-panel .eyebrow { font-size: 10px; }
    .lab-info-panel h3 {
      margin: 8px 0 7px; color: var(--bench-text); font-size: 21px; line-height: 1.22; letter-spacing: -.025em;
    }
    .lab-info-panel > p { margin: 0 0 13px; color: var(--bench-muted); font-size: 13px; line-height: 1.58; }
    .lab-part-list { display: grid; gap: 7px; }
    .lab-part-row {
      min-height: 58px; display: grid; grid-template-columns: 40px minmax(0,1fr) auto;
      align-items: center; gap: 9px; padding: 7px 9px;
      border: 1px solid #e3d7c3; border-radius: 11px; background: rgba(255,255,255,.62);
    }
    .lab-part-icon {
      width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px;
      color: var(--ink); background: #fff5d9; border: 1px solid #ecdba8;
    }
    .lab-part-icon .icon { width: 20px; height: 20px; }
    .lab-part-row b,
    .lab-part-row small { display: block; }
    .lab-part-row b { color: var(--bench-text); font-size: 12px; }
    .lab-part-row small { margin-top: 2px; color: var(--bench-muted); font-size: 9px; line-height: 1.35; }
    .lab-part-row em {
      padding: 4px 7px; border-radius: 7px; color: #72510b; background: #fff1b7;
      font-family: var(--font-mono); font-size: 9px; font-style: normal; font-weight: 600; white-space: nowrap;
    }
    .lab-info-note {
      display: flex; align-items: flex-start; gap: 8px; margin-top: auto; padding: 10px;
      border: 1px solid #ead99e; border-radius: 10px; color: #715719; background: #fff8dc;
      font-size: 10px; line-height: 1.45;
    }
    .lab-info-note .icon { width: 17px; height: 17px; flex: none; }
    .lab-mini-circuit {
      width: 100%; max-height: 250px; margin: 2px 0 10px; padding: 12px;
      border-radius: 12px; background:
        radial-gradient(circle at 50% 45%, rgba(255,255,255,.9), transparent 66%),
        #f8f1e2;
      border: 1px solid #dfd2bd;
    }
    .schematic-wire,
    .schematic-flow {
      fill: none; stroke-linecap: round; stroke-linejoin: round;
    }
    .schematic-wire { stroke: #253352; stroke-width: 2.2; }
    .schematic-flow {
      fill: #159c99; stroke: none;
      animation: miniCircuitFlow 1.2s linear infinite;
    }
    @keyframes miniCircuitFlow { 50% { opacity: .42; } }
    .schematic-sym { fill: none; stroke: #263656; stroke-width: 2.2; }
    .schematic-sym.thick { stroke-width: 4; }
    .schematic-sym.thin { stroke-width: 1.6; }
    .schematic-lamp { fill: #fffaf0; }
    .schematic-lamp.is-lit { fill: #ffe27a; stroke: #d7a41e; }
    .lab-circuit-panel .schematic-glow { fill: rgba(255,215,90,.22); stroke: none; }
    .schematic-contact { fill: #fffaf0; }
    .schematic-value {
      fill: #5f6879; font-family: var(--font-cond); font-size: 14px; font-weight: 600;
    }
    .schematic-sign {
      fill: #d0412f; font-family: var(--font-cond); font-size: 18px; font-weight: 700;
    }
    .schematic-flow-label {
      fill: #168885; font-family: var(--font-mono); font-size: 11px; font-weight: 600;
    }
    .lab-circuit-facts {
      display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; margin-top: auto;
    }
    .lab-circuit-facts span { padding: 9px; border: 1px solid #e3d7c3; border-radius: 10px; background: #fffdf6; }
    .lab-circuit-facts small,
    .lab-circuit-facts b { display: block; }
    .lab-circuit-facts small { color: var(--bench-muted); font-size: 9px; }
    .lab-circuit-facts b { margin-top: 3px; color: var(--bench-text); font-family: var(--font-mono); font-size: 12px; }
    .lab-theory-formula {
      display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px;
      margin: 8px 0 12px; padding: 15px 10px; border: 1px solid #e2d5bd; border-radius: 11px;
      color: var(--bench-text); background: rgba(255,255,255,.66); font-family: var(--font-mono); font-size: 15px;
    }
    .lab-theory-values {
      display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 6px;
    }
    .lab-theory-values span {
      padding: 9px 4px; border: 1px solid #e4d8c6; border-radius: 9px;
      text-align: center; background: #fffdf6;
    }
    .lab-theory-values b,
    .lab-theory-values small { display: block; }
    .lab-theory-values b { color: var(--bench-text); font-family: var(--font-mono); font-size: 11px; }
    .lab-theory-values small { margin-top: 3px; color: var(--bench-muted); font-size: 8px; }
    .lab-theory-result { margin: 11px 0 0 !important; }
    .lab-theory-result b { color: #8b6411; font-family: var(--font-mono); }
    @media (min-width: 761px) {
      .mission-shell[data-stage="simulation"] .lab-toolbar {
        position: absolute; z-index: 9; inset: 12px 14px auto;
        padding: 0; border: 0; background: transparent; pointer-events: none;
      }
      .mission-shell[data-stage="simulation"] .lab-toolbar h2 {
        padding: 7px 10px; border: 1px solid rgba(217,201,176,.82); border-radius: 9px;
        color: var(--bench-text); background: rgba(255,253,246,.9);
        box-shadow: 0 8px 18px var(--bench-shadow); font-size: 13px;
      }
      .mission-shell[data-stage="simulation"] .lab-toolbar-actions { pointer-events: auto; }
      .mission-shell[data-stage="simulation"] .lab-visual-shell { min-height: 0; }
    }

    /* Build */
    .build-layout { min-height: 100%; display: grid; grid-template-columns: minmax(0,1.25fr) minmax(330px,.75fr); gap: 20px; }
    .build-visual-card { min-height: 500px; border: 1px solid var(--line); border-radius: var(--radius-xl); background: #e8e2d5; overflow: hidden; box-shadow: var(--shadow); position: relative; }
    .build-photo {
      position: absolute; inset: 22px 22px 92px; overflow: hidden; border-radius: 18px;
      background: linear-gradient(150deg, #cbd2d7 0%, #e7e6df 62%, #d5c4ad 100%);
      border: 1px solid #b9c0c6;
    }
    .build-photo::before { content: ""; position: absolute; left: 8%; right: 8%; bottom: 11%; height: 47%; border-radius: 18px; background: #b18459; box-shadow: inset 0 -13px 0 #9d7048; }
    .breadboard { position: absolute; width: 68%; height: 52%; left: 16%; top: 23%; border-radius: 16px; background: #eeeadd; border: 9px solid #607166; box-shadow: 0 24px 34px rgba(56,48,36,.25); }
    .breadboard::after { content: ""; position: absolute; inset: 17px; opacity: .6; background-image: radial-gradient(#76827a 1.2px, transparent 1.4px); background-size: 17px 17px; }
    .build-wiring { position: absolute; z-index: 2; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
    .build-wire { fill: none; stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
    .build-wire-red { stroke: var(--physical); }
    .build-wire-blue { stroke: #526bda; }
    .build-wire-terminal { stroke: #fff; stroke-width: 2; vector-effect: non-scaling-stroke; }
    .build-wire-terminal.red { fill: var(--physical); }
    .build-wire-terminal.blue { fill: #526bda; }
    .build-battery { position: absolute; z-index: 3; left: 24%; top: 32%; width: 74px; height: 102px; border-radius: 13px; background: var(--ink); border: 6px solid #fff; box-shadow: 0 12px 20px rgba(0,0,0,.2); color: #fff; display: grid; place-items: center; font-size: 23px; }
    .build-led { position: absolute; z-index: 3; right: 22%; top: 33%; width: 63px; height: 63px; display: grid; place-items: center; border-radius: 50% 50% 43% 43%; background: #ffe17a; border: 8px solid #fff0ae; box-shadow: 0 0 28px rgba(255,201,60,.64); }
    .build-switch { position: absolute; z-index: 3; left: 46%; bottom: 20%; width: 104px; height: 54px; border: 5px solid #cbd5cc; border-radius: 13px; background: #fff; display: grid; place-items: center; }
    .build-switch::after { content: ""; width: 61px; height: 18px; border-radius: 99px; background: var(--success); }
    .photo-label { position: absolute; z-index: 4; left: 50%; bottom: 14px; transform: translateX(-50%); padding: 7px 10px; border-radius: 8px; color: var(--ink); background: rgba(255,255,255,.9); font-size: 10px; font-weight: 800; white-space: nowrap; }
    .build-legend { position: absolute; left: 20px; right: 20px; bottom: 18px; padding: 14px 16px; border-radius: 15px; background: #fff; border: 1px solid rgba(23,35,61,.12); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
    .build-legend .legend-copy b { display: block; font-size: 15px; }
    .build-legend .legend-copy small { display: block; margin-top: 3px; color: var(--ink-soft); font-size: 11px; }
    .build-steps { display: flex; align-items: center; gap: 6px; }
    .build-steps i { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 9px; color: var(--ink-soft); background: #f1ede3; font-style: normal; font-size: 10px; font-weight: 900; }
    .build-steps i.done { color: #fff; background: var(--success); }
    .build-steps i.active { color: #fff; background: var(--action); }
    .build-instructions { padding: 21px; border-radius: var(--radius-xl); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); display: flex; flex-direction: column; }
    .build-instructions h2 { margin: 6px 0 7px; font-size: 27px; line-height: 1.2; letter-spacing: -.04em; }
    .build-instructions > p { margin: 0; color: var(--ink-soft); font-size: 15px; line-height: 1.65; }
    .safety-card { display: flex; align-items: flex-start; gap: 10px; margin: 16px 0; padding: 12px; border-radius: 12px; border: 1px solid #f1d284; background: #fff8df; color: #705313; font-size: 14px; line-height: 1.55; }
    .safety-card .icon { flex: none; width: 19px; height: 19px; }
    .step-checklist { display: grid; gap: 8px; }
    .check-row { min-height: 54px; display: grid; grid-template-columns: 32px 1fr auto; align-items: center; gap: 9px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; background: #fbfaf6; color: var(--ink); text-align: left; }
    .check-row .number { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 9px; background: #e8ebff; color: var(--action); font-size: 11px; font-weight: 900; }
    .check-row strong { display: block; font-size: 15px; line-height: 1.35; }
    .check-row small { display: block; margin-top: 2px; color: var(--ink-soft); font-size: 12px; }
    .check-row .check-state { width: 26px; height: 26px; border-radius: 8px; border: 1px solid #cbd0dc; display: grid; place-items: center; color: transparent; background: #fff; }
    .check-row[aria-checked="true"] { border-color: #aadaca; background: #effaf5; }
    .check-row[aria-checked="true"] .check-state { color: #fff; background: var(--success); border-color: var(--success); }
    .check-row .check-state .icon { width: 16px; height: 16px; }
    .evidence-row { margin-top: 14px; display: grid; grid-template-columns: 1fr auto; gap: 8px; }
    .evidence-button { min-height: 49px; border: 1px dashed #acb8c9; border-radius: 12px; background: #fbfaf7; color: var(--ink); display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 14px; font-weight: 850; }
    .evidence-button .icon { width: 19px; height: 19px; color: var(--action); }
    .evidence-button.saved { color: var(--success); background: #effaf5; border-color: #98d2be; }
    .evidence-sample { min-height: 49px; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink-soft); font-size: 12px; font-weight: 800; padding: 0 11px; }
    .evidence-preview { display: none; margin-top: 8px; padding: 9px; align-items: center; gap: 9px; border-radius: 10px; background: #effaf5; color: #24664f; font-size: 13px; }
    .evidence-preview.visible { display: flex; }
    .evidence-preview .mini-board { width: 48px; height: 34px; border-radius: 7px; background: #e8e6de; border: 3px solid #778277; position: relative; }
    .evidence-preview img { width: 72px; height: 48px; object-fit: cover; border-radius: 7px; }
    .evidence-preview .mini-board::after { content: ""; position: absolute; width: 13px; height: 20px; left: 8px; top: 3px; background: var(--ink); border-radius: 3px; }
    .build-submit {
      width: 100%; margin-top: 8px; position: sticky; bottom: 0;
      box-shadow: 0 -8px 16px rgba(255,255,255,.9), 0 8px 18px rgba(20,32,67,.16);
    }
    .form-error { min-height: 18px; margin: 8px 0 0; color: var(--error); font-size: 13px; font-weight: 700; }

    /* Reflection */
    .reflect-layout { min-height: 100%; display: grid; grid-template-columns: minmax(0,.9fr) minmax(390px,1.1fr); gap: 20px; }
    .stage-panel[data-stage-panel="reflect"] { height: 100%; }
    .reflect-layout { height: 100%; min-height: 0; }
    .evidence-board { padding: 22px; border-radius: var(--radius-xl); background: #e8e1d3; border: 1px solid #d7cdbb; min-width: 0; }
    .stage-panel[data-stage-panel="reflect"] .evidence-board { height: 100%; overflow: auto; }
    .evidence-board-head { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 15px; }
    .evidence-board h2 { margin: 5px 0 0; font-size: 28px; letter-spacing: -.03em; }
    .evidence-board p { margin: 3px 0 0; color: #6a6358; font-size: 14px; }
    .evidence-stack { display: grid; gap: 10px; }
    .evidence-card { background: #fffdf7; border: 1px solid #d9d0be; border-radius: 14px; padding: 13px; display: grid; grid-template-columns: 75px 1fr; gap: 12px; align-items: center; }
    .evidence-thumb { width: 75px; height: 62px; border-radius: 10px; display: grid; place-items: center; background: #f4efe2; border: 1px solid #ded5c5; overflow: hidden; }
    .evidence-thumb.circuit-thumb { background: #1a273b; }
    .thumb-circuit { width: 48px; height: 36px; position: relative; border: 1px dashed; border-radius: 6px; }
    .evidence-card b { display: block; font-size: 15px; }
    .evidence-card small { display: block; color: #726c60; font-size: 13px; line-height: 1.5; margin-top: 3px; }
    .evidence-tag { display: inline-block; margin-top: 5px; padding: 3px 6px; border-radius: 6px; color: #5d5546; background: #f1eadb; font-size: 11px; font-weight: 850; }
    .challenge-card { margin-top: 12px; padding: 14px; border-radius: 14px; background: #16254b; color: #fff; }
    .challenge-card h3 { margin: 0 0 5px; font-size: 15px; }
    .challenge-card p { color: #c8d3e8; }
    .challenge-options { display: flex; gap: 7px; margin-top: 10px; flex-wrap: wrap; }
    .challenge-option { min-height: 44px; border-radius: 9px; border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.08); color: #fff; padding: 0 12px; font-size: 14px; }
    .challenge-option[data-result="correct"] { border-color: #70dcb7; color: #a7f1d7; }
    .mentor-card { min-width: 0; height: 100%; border-radius: var(--radius-xl); border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; }
    .mentor-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); background: #f7f9ff; }
    .mentor-identity { display: flex; align-items: center; gap: 10px; }
    .mentor-identity .aibo { width: 47px; height: 52px; }
    .mentor-identity b { display: block; font-size: 15px; }
    .mentor-identity small { display: block; color: var(--success); font-size: 10px; font-weight: 800; }
    .mentor-kicker { color: var(--ink-soft); font-size: 10px; font-weight: 800; letter-spacing: .04em; }
    .mentor-body { flex: 1; min-height: 0; padding: 18px; display: flex; flex-direction: column; gap: 14px; overflow: auto; }
    .mentor-question { display: grid; grid-template-columns: 38px 1fr; gap: 10px; align-items: start; }
    .mentor-question .aibo { width: 37px; height: 42px; }
    .mentor-bubble { padding: 12px 13px; border: 1px solid #dfe3eb; border-radius: 4px 14px 14px 14px; background: #f5f7fb; font-size: 16px; line-height: 1.65; }
    .quick-answers { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
    .quick-answer { min-height: 44px; border-radius: 10px; border: 1px solid #d9dee8; background: #fff; color: var(--ink); padding: 0 12px; font-size: 14px; font-weight: 750; }
    .quick-answer:hover { border-color: #aab7cb; }
    .quick-answer[aria-pressed="true"] { color: #fff; background: var(--action); border-color: var(--action); }
    .reflection-field label { display: block; margin-bottom: 6px; font-size: 12px; font-weight: 850; }
    textarea {
      width: 100%; min-height: 94px; resize: vertical; padding: 12px 13px; border-radius: 11px;
      border: 1px solid #cfd5e0; background: #fbfcff; color: var(--ink); font-size: 16px; line-height: 1.6;
    }
    textarea::placeholder { color: #929eb0; }
    .reflection-actions { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
    .reflection-actions .quiet { min-height: 44px; padding: 0 10px; font-size: 12px; }
    .reflection-actions .primary { min-height: 46px; padding: 0 16px; font-size: 13px; }
    .mentor-response { display: none; padding: 12px 13px; border-radius: 11px; border: 1px solid #b9decf; background: #effbf6; color: #255f4c; font-size: 15px; line-height: 1.6; }
    .mentor-response.visible { display: block; }
    .ability-strip { display: grid; grid-template-columns: repeat(3,1fr); gap: 7px; margin-top: auto; padding: 12px 18px 15px; border-top: 1px solid var(--line); background: #fbfaf6; }
    .ability-state { padding: 9px 7px; text-align: center; border-radius: 10px; background: #f0ede5; color: #8d8b83; font-size: 12px; font-weight: 850; }
    .ability-state i { width: 16px; height: 16px; margin: 0 auto 5px; border-radius: 50%; display: block; border: 2px solid currentColor; }
    .ability-state.active { color: var(--success); background: #e8f8f1; }
    .ability-state.active i { border-color: var(--success); background: radial-gradient(circle, var(--success) 0 4px, transparent 5px); }
    .ability-state.needs-help { color: #9a6516; background: #fff5dc; }
    .ability-state.needs-help i { border-color: #d99a2c; background: radial-gradient(circle, #d99a2c 0 4px, transparent 5px); }
    .mentor-footer { padding: 0 18px 15px; background: #fbfaf6; }
    .growth-layout { min-height: 100%; display: grid; grid-template-columns: minmax(0,1.15fr) minmax(280px,.85fr); gap: 18px; }
    .growth-board { height: 100%; overflow: auto; }
    .growth-readiness { margin: 12px 0; padding: 12px 14px; border-radius: 12px; border: 1px solid #d8cfbd; background: #fff8e8; color: #69541f; font-size: 13px; line-height: 1.55; }
    .growth-readiness.ready { border-color: #9fd7c1; background: #eaf9f2; color: #24664f; }
    .growth-fields { display: grid; gap: 10px; }
    .growth-fields label { display: grid; gap: 6px; color: #4f4738; font-size: 13px; }
    .growth-fields input { min-height: 46px; border: 1px solid #cfc5b2; border-radius: 10px; padding: 0 12px; color: var(--ink); background: #fffdf7; font-size: 15px; }
    .path-evidence { margin-top: 12px; padding: 12px; border: 1px solid #d8cfbd; border-radius: 12px; background: #fffdf7; }
    .path-evidence > div:first-child { display: grid; gap: 3px; }
    .path-evidence small { color: #746c5e; font-size: 11px; }
    #pathCanvas { width: 100%; height: 170px; margin-top: 9px; border: 1px dashed #b9ad95; border-radius: 9px; background: linear-gradient(#fffdf8, #f7f1e4); touch-action: none; }
    .path-tools { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; color: #6b6253; font-size: 11px; }
    .growth-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; }
    .growth-ability-card { border-radius: var(--radius-xl); border: 1px solid var(--line); background: var(--surface); padding: 20px; box-shadow: var(--shadow); }
    .growth-ability-card h2 { margin: 6px 0 16px; font-size: 24px; }
    .ability-list { display: grid; gap: 10px; }
    .ability-row { padding: 12px; border-radius: 12px; border: 1px solid #e1dacd; background: #fbf8f0; }
    .ability-top { display: flex; justify-content: space-between; gap: 10px; }
    .ability-top span { color: var(--ink-soft); font-size: 11px; font-weight: 850; }
    .ability-row.current { border-color: #9fd7c1; background: #edf9f4; }
    .ability-row.needs-help { border-color: #e0bd74; background: #fff8e8; }
    .ability-row p { margin: 6px 0 0; color: #6d675d; font-size: 12px; line-height: 1.5; }
    .mentor-footer .primary { width: 100%; }

    /* Level completion */
    .unlock-overlay {
      position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: 24px;
      color: #fff; background:
        radial-gradient(circle at 50% 38%, rgba(53,205,209,.24), transparent 24%),
        radial-gradient(circle at 50% 52%, rgba(63,88,217,.32), transparent 46%),
        linear-gradient(145deg, rgba(5,24,61,.97), rgba(9,43,91,.97));
      opacity: 0; visibility: hidden; transition: opacity var(--panel), visibility var(--panel);
      backdrop-filter: blur(10px);
    }
    .unlock-overlay.visible { opacity: 1; visibility: visible; }
    .unlock-panel {
      position: relative; width: min(430px, 100%); padding: 32px 26px 26px; text-align: center;
      border: 1px solid rgba(255,255,255,.2); border-radius: 26px;
      background: rgba(7,30,70,.88); box-shadow: 0 32px 80px rgba(0,0,0,.34);
    }
    .unlock-close {
      position: absolute; right: 12px; top: 12px; width: 44px; height: 44px; display: grid; place-items: center;
      border: 1px solid rgba(255,255,255,.16); border-radius: 12px; color: #fff; background: rgba(255,255,255,.07);
    }
    .unlock-close .icon { width: 20px; height: 20px; }
    .unlock-orbit { width: 142px; height: 142px; margin: 0 auto 18px; position: relative; display: grid; place-items: center; }
    .unlock-orbit::before, .unlock-orbit::after {
      content: ""; position: absolute; inset: 6px; border: 1px solid rgba(54,221,219,.38); border-radius: 50%;
      animation: unlockOrbit 5s linear infinite;
    }
    .unlock-orbit::after { inset: 23px; border-style: dashed; animation-direction: reverse; animation-duration: 7s; }
    .unlock-core {
      width: 82px; height: 82px; display: grid; place-items: center; border-radius: 50%;
      color: var(--ink); background: radial-gradient(circle at 36% 28%, #fff8c9, var(--signal) 66%);
      box-shadow: 0 0 0 12px rgba(255,201,60,.09), 0 0 46px rgba(255,201,60,.58);
      animation: unlockCore 1.8s ease-in-out infinite alternate;
    }
    .unlock-core .icon { width: 42px; height: 42px; stroke-width: 2.2; }
    .unlock-panel .eyebrow { color: var(--circuit); justify-content: center; }
    .unlock-panel h2 { margin: 8px 0 4px; font-size: 42px; letter-spacing: -.06em; }
    .unlock-panel p { margin: 0 0 20px; color: #c8daf0; font-size: 15px; }
    .unlock-panel .primary { width: 100%; }
    .series-probe-overlay {
      position: fixed; inset: 0; z-index: 125; display: grid; place-items: center; padding: clamp(12px, 2.4vw, 24px);
      color: #fff; background:
        radial-gradient(circle at 50% 38%, rgba(37,197,192,.2), transparent 26%),
        radial-gradient(circle at 70% 20%, rgba(63,88,217,.28), transparent 40%),
        linear-gradient(145deg, rgba(5,24,61,.98), rgba(9,43,91,.98));
      opacity: 0; visibility: hidden; transition: opacity var(--panel), visibility var(--panel);
      backdrop-filter: blur(10px);
    }
    .series-probe-overlay.visible { opacity: 1; visibility: visible; }
    .series-probe-panel {
      position: relative; width: min(920px, 100%); max-height: calc(var(--app-height) - 32px);
      padding: 30px 28px 24px; overflow: hidden; text-align: center;
      display: flex; flex-direction: column; min-height: 0;
      border: 1px solid rgba(255,255,255,.2); border-radius: 26px;
      background: rgba(7,30,70,.94); box-shadow: 0 32px 80px rgba(0,0,0,.36);
    }
    .series-probe-head { flex: none; padding: 0 54px; }
    .series-probe-panel h2 { margin: 10px 0 7px; font-size: clamp(24px, 2.5vw, 32px); line-height: 1.2; }
    .series-probe-head > p { margin: 0 auto 18px; color: #c8daf0; font-size: 14px; }
    .series-probe-body {
      min-height: 0; overflow: auto; padding: 2px 5px 2px 2px; overscroll-behavior: contain;
      scrollbar-width: thin; scrollbar-color: rgba(153,223,247,.52) rgba(255,255,255,.05);
    }
    .series-probe-body::-webkit-scrollbar { width: 6px; }
    .series-probe-body::-webkit-scrollbar-track { background: rgba(255,255,255,.05); border-radius: 99px; }
    .series-probe-body::-webkit-scrollbar-thumb { background: rgba(153,223,247,.52); border-radius: 99px; }
    .series-probe-questions {
      display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 10px; text-align: left;
    }
    .series-probe-question {
      position: relative; padding: 13px; border: 1px solid rgba(146,187,236,.18); border-radius: 13px;
      background: rgba(255,255,255,.055);
    }
    .probe-evidence-name {
      display: inline-flex; margin-bottom: 6px; padding: 3px 7px; border-radius: 6px;
      color: #99dff7; background: rgba(83,191,226,.1); font-size: 9px; font-weight: 900; letter-spacing: .05em;
    }
    .series-probe-question > b { display: block; margin-bottom: 9px; font-size: 15px; }
    .series-probe-question > div { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
    .series-probe-question button {
      min-height: 52px; padding: 8px 9px; border: 1px solid rgba(163,195,235,.22);
      border-radius: 10px; color: #dceaff; background: rgba(255,255,255,.055);
      display: flex; align-items: center; justify-content: center; gap: 6px;
      font-size: 12px; line-height: 1.45; text-align: left;
    }
    .series-probe-question button .icon { width: 17px; height: 17px; flex: none; }
    .series-probe-question button[aria-pressed="true"] {
      color: #082044; background: #aee7f7; border-color: #e3fbff;
      box-shadow: 0 0 0 2px rgba(174,231,247,.13);
    }
    .series-probe-feedback { min-height: 20px; margin-top: 12px; color: #fff0ae; font-size: 13px; }
    .series-probe-result {
      margin-top: 14px; padding: 16px; text-align: left;
      border: 1px solid rgba(255,255,255,.16); border-radius: 15px; background: rgba(255,255,255,.07);
    }
    .series-probe-result[hidden] { display: none; }
    .probe-result-label {
      display: inline-flex; padding: 4px 8px; border-radius: 6px;
      color: #081f3e; background: #aee7f7; font-size: 10px; font-weight: 950;
    }
    .series-probe-result.is-full .probe-result-label { background: #8ee9cd; }
    .series-probe-result.is-partial .probe-result-label { background: #ffc38e; }
    .series-probe-result.is-none .probe-result-label { background: #d2def1; }
    .series-probe-result h3 { margin: 9px 0 6px; color: #fff; font-size: 21px; }
    .series-probe-result p { margin: 0 0 14px; color: #c8daf0; font-size: 13px; line-height: 1.7; }
    .series-probe-result .primary { width: 100%; min-height: 50px; }
    .lesson-brief-overlay {
      position: fixed; inset: 0; z-index: 126; display: grid; place-items: center; padding: clamp(12px, 2.4vw, 24px);
      color: #fff; background:
        radial-gradient(circle at 30% 22%, rgba(255,201,60,.18), transparent 24%),
        radial-gradient(circle at 72% 28%, rgba(63,88,217,.3), transparent 42%),
        linear-gradient(145deg, rgba(5,24,61,.98), rgba(9,43,91,.98));
      opacity: 0; visibility: hidden; transition: opacity var(--panel), visibility var(--panel);
      backdrop-filter: blur(10px);
    }
    .lesson-brief-overlay.visible { opacity: 1; visibility: visible; }
    .lesson-brief-panel {
      position: relative; width: min(980px, 100%); max-height: calc(var(--app-height) - 32px);
      padding: 30px 28px 22px; overflow: hidden; display: flex; flex-direction: column; min-height: 0;
      border: 1px solid rgba(255,255,255,.2); border-radius: 26px;
      background: rgba(7,30,70,.95); box-shadow: 0 32px 80px rgba(0,0,0,.36);
    }
    .lesson-brief-head { flex: none; padding: 0 54px; }
    .lesson-brief-head .eyebrow { color: var(--signal); justify-content: center; }
    .lesson-brief-head h2 { margin: 8px 0 6px; font-size: clamp(28px, 3.4vw, 40px); line-height: 1.1; text-align: center; }
    .lesson-brief-head p { margin: 0 auto 18px; max-width: 610px; color: #c8daf0; font-size: 13px; line-height: 1.65; text-align: center; }
    .lesson-brief-context { display: flex; flex-wrap: wrap; justify-content: center; gap: 7px; margin-top: 10px; }
    .lesson-brief-context span { padding: 5px 9px; border-radius: 999px; color: #dcecff; background: rgba(255,255,255,.1); font-size: 11px; font-weight: 800; }
    .lesson-brief-body {
      min-height: 0; overflow: auto; padding: 2px 5px 2px 2px; overscroll-behavior: contain;
      scrollbar-width: thin; scrollbar-color: rgba(153,223,247,.52) rgba(255,255,255,.05);
    }
    .lesson-brief-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .lesson-brief-grid article,
    .lesson-brief-grid figure {
      margin: 0; min-height: 132px; padding: 15px;
      border: 1px solid rgba(146,187,236,.18); border-radius: 15px;
      background: rgba(255,255,255,.055);
    }
    .lesson-brief-grid article > b,
    .lesson-brief-grid figure figcaption > small {
      width: 28px; height: 24px; display: grid; place-items: center;
      border-radius: 7px; color: var(--ink); background: var(--signal);
      font-size: 9px; font-weight: 950;
    }
    .lesson-brief-grid h3 { margin: 9px 0 5px; color: #fff; font-size: 17px; }
    .lesson-brief-grid p { margin: 0; color: #c6d7ec; font-size: 12px; line-height: 1.65; }
    .lesson-brief-grid figure { padding: 0; overflow: hidden; display: grid; grid-template-columns: 132px minmax(0, 1fr); }
    .lesson-brief-grid figure > div { position: relative; min-height: 132px; overflow: hidden; background: #dfe5ed; }
    .lesson-brief-grid figure img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
    .lesson-brief-grid figure > div > span {
      position: absolute; left: 8px; top: 8px; padding: 4px 6px; border-radius: 6px;
      color: #fff; background: rgba(7,23,52,.82); font-size: 8px; font-weight: 850;
    }
    .lesson-brief-grid figure figcaption { padding: 14px; }
    .lesson-brief-grid figure figcaption > small { display: grid; }
    .lesson-brief-safety {
      margin-top: 12px; padding: 12px 14px; display: flex; align-items: center; gap: 9px;
      border: 1px solid rgba(255,209,82,.28); border-radius: 12px;
      color: #ffedb2; background: rgba(255,201,60,.08); font-size: 12px; font-weight: 750;
    }
    .lesson-brief-safety .icon { width: 20px; height: 20px; flex: none; }
    .lesson-brief-footer { flex: none; padding-top: 14px; }
    .lesson-brief-footer .primary { width: 100%; min-height: 52px; }

    @keyframes starField { from { opacity: .42; transform: scale(1); } to { opacity: .78; transform: scale(1.018); } }
    @keyframes routeSpark { to { stroke-dashoffset: -44; } }
    @keyframes currentAura { 0% { opacity: .85; transform: translate(-50%,-50%) scale(.72); } 78%, 100% { opacity: 0; transform: translate(-50%,-50%) scale(1.35); } }
    @keyframes aiboFindIn {
      0% { opacity: 0; transform: translate(-14px,10px) scale(.72) rotate(-5deg); filter: saturate(.6); }
      62% { opacity: 1; transform: translate(2px,-2px) scale(1.035) rotate(1deg); }
      100% { opacity: 1; transform: none; filter: none; }
    }
    @keyframes aiboNameFloat {
      0%, 100% { transform: translateX(-50%) translateY(0); }
      50% { transform: translateX(-50%) translateY(-2px); }
    }
    @keyframes aiboBreathe { 0%, 100% { transform: translateY(0) rotate(-.55deg) scale(1); } 50% { transform: translateY(-3px) rotate(.85deg) scale(1.018); } }
    @keyframes aiboBeaconPulse {
      0%, 100% { transform: scale(.94); box-shadow: 0 0 0 0 rgba(255,206,64,.5), 0 0 10px rgba(255,206,64,.34); }
      24% { transform: scale(1.2); box-shadow: 0 0 0 7px rgba(255,206,64,0), 0 0 19px rgba(255,206,64,.7); }
    }
    @keyframes aiboChestPulse {
      0%, 100% { transform: scale(.92); box-shadow: 0 0 0 rgba(255,206,64,0); }
      48% { transform: scale(1.12); box-shadow: 0 0 9px rgba(255,206,64,.72); }
    }
    @keyframes aiboVoiceChest {
      0% { transform: scale(.92); box-shadow: 0 0 3px rgba(255,206,64,.3); }
      100% { transform: scale(1.2); box-shadow: 0 0 12px rgba(255,206,64,.82); }
    }
    @keyframes aiboMouthIdle {
      0%, 72%, 100% { transform: translateX(-50%) scaleX(1) scaleY(1); }
      80% { transform: translateX(-50%) scaleX(.76) scaleY(.72); }
      88% { transform: translateX(-50%) scaleX(1.08) scaleY(1.08); }
    }
    @keyframes aiboEyeGaze {
      0%, 8%, 100% { transform: translateX(0); }
      10%, 22% { transform: translateX(-2.2px); }
      25%, 31% { transform: translateX(0); }
      33.5%, 45% { transform: translateX(2.2px); }
      48%, 58% { transform: translateX(0); }
      61%, 69% { transform: translateX(-1.5px); }
      73%, 80% { transform: translateX(1.5px); }
      84%, 100% { transform: translateX(0); }
    }
    @keyframes aiboEyeBlink {
      0%, 8.5%, 100% { transform: scaleY(1); }
      9.5%, 10.6% { transform: scaleY(.08); }
      11.8%, 22.5% { transform: scaleY(1); }
      24.5%, 25.6% { transform: scaleY(.08); }
      26.8%, 38.5% { transform: scaleY(1); }
      40.5%, 41.6% { transform: scaleY(.08); }
      42.8%, 83.5% { transform: scaleY(1); }
      85.5%, 86.6% { transform: scaleY(.08); }
      88%, 100% { transform: scaleY(1); }
    }
    @keyframes aiboTalkHead { from { transform: translateY(0) rotate(-1.6deg); } to { transform: translateY(-1.6px) rotate(1.4deg); } }
    @keyframes aiboTalkMouth {
      0%, 100% { transform: translateX(-50%) scaleX(.82) scaleY(.38); border-radius: 50%; }
      50% { transform: translateX(-50%) scaleX(1.04) scaleY(1.32); border-radius: 4px; }
    }
    @keyframes aiboAntennaTalk { from { transform: translateY(0) scale(.92); } to { transform: translateY(-2px) scale(1.08); } }
    @keyframes missionArrive { from { opacity: 0; transform: scale(.975) translateY(12px); filter: saturate(.72); } to { opacity: 1; transform: none; filter: none; } }
    @keyframes companionArrive { from { opacity: 0; transform: translateX(-28px) scale(.8); } to { opacity: 1; transform: translateX(0) scale(1.45); } }
    @keyframes lampConfirm { 0% { box-shadow: 0 0 0 0 rgba(255,201,60,.6); } 100% { box-shadow: 0 0 35px 12px rgba(255,201,60,.6); } }
    @keyframes unlockOrbit { to { transform: rotate(360deg); } }
    @keyframes unlockCore { from { transform: scale(.94); } to { transform: scale(1.04); } }
    @keyframes lockedBump { 0%,100% { transform: scale(1); } 45% { transform: scale(.92); } 72% { transform: scale(1.04); } }

    /* Portfolio */
    .view-portfolio { background: var(--paper); overflow: auto; }
    .portfolio-page { min-height: 100%; padding: clamp(22px,3vw,36px); }
    .portfolio-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
    .portfolio-head h1 { margin: 7px 0 0; font-size: clamp(34px,4.2vw,48px); line-height: 1.1; letter-spacing: -.05em; }
    .portfolio-head p { margin: 8px 0 0; color: var(--ink-soft); font-size: 15px; }
    .portfolio-layout { display: grid; grid-template-columns: minmax(0,1fr) 310px; gap: 20px; align-items: start; }
    .project-card { border-radius: var(--radius-xl); border: 1px solid var(--line); background: #fff; overflow: hidden; box-shadow: var(--shadow); }
    .project-cover { min-height: 215px; position: relative; overflow: hidden; background: linear-gradient(140deg, #d9e4ee, #edf1e7 55%, #d6d0c2); }
    .project-cover::before { content: ""; position: absolute; left: 8%; right: 8%; bottom: 12%; height: 55%; border-radius: 17px; background: #b9885d; box-shadow: inset 0 -13px 0 #a0724b; }
    .cover-board { position: absolute; width: 53%; height: 54%; left: 23%; top: 20%; border-radius: 15px; background: #e7e6dd; border: 8px solid #647469; box-shadow: 0 18px 26px rgba(45,55,49,.22); }
    .cover-board::after { content: ""; position: absolute; inset: 15px; opacity: .58; background-image: radial-gradient(#7c877d 1.2px, transparent 1.4px); background-size: 17px 17px; }
    .cover-battery { position: absolute; z-index: 2; left: 32%; top: 34%; width: 52px; height: 75px; border-radius: 10px; background: var(--ink); border: 5px solid #fff; color: #fff; display: grid; place-items: center; font-size: 18px; }
    .cover-led { position: absolute; z-index: 2; right: 31%; top: 35%; width: 46px; height: 46px; border-radius: 50% 50% 42% 42%; background: #ffe17a; border: 6px solid #fff0ae; box-shadow: 0 0 25px rgba(255,201,60,.65); }
    .cover-wire { position: absolute; z-index: 2; height: 5px; background: var(--physical); border-radius: 5px; transform-origin: left; }
    .cover-wire.c1 { left: 38%; top: 39%; width: 23%; }
    .cover-wire.c2 { left: 38%; top: 55%; width: 27%; transform: rotate(22deg); background: #546bdc; }
    .project-body { padding: 20px; }
    .project-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
    .project-meta .eyebrow { color: var(--action); }
    .private-tag { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; border-radius: 7px; background: #f2f4f8; color: #69768a; font-size: 10px; font-weight: 800; }
    .private-tag .icon { width: 14px; height: 14px; }
    .project-body h2 { margin: 10px 0 5px; font-size: 26px; letter-spacing: -.03em; }
    .project-body > p { margin: 0; color: var(--ink-soft); font-size: 16px; line-height: 1.7; }
    .evidence-line { display: grid; grid-template-columns: repeat(5,1fr); gap: 8px; margin-top: 18px; }
    .evidence-point { min-width: 0; position: relative; padding: 12px 8px 10px; border-radius: 11px; background: #f7f6f1; text-align: center; }
    .evidence-point::after { content: ""; position: absolute; height: 1px; left: 50%; top: 25px; width: 100%; background: #d9d8cc; z-index: 0; }
    .evidence-point:last-child::after { display: none; }
    .evidence-point i { position: relative; z-index: 1; width: 27px; height: 27px; margin: 0 auto 7px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--success); }
    .evidence-point i .icon { width: 15px; height: 15px; }
    .evidence-point b { display: block; font-size: 12px; }
    .evidence-point small { display: block; margin-top: 2px; color: var(--ink-soft); font-size: 11px; }
    .project-actions { display: flex; gap: 8px; margin-top: 17px; flex-wrap: wrap; }
    .project-actions .secondary, .project-actions .primary { min-height: 46px; font-size: 13px; }
    .growth-panel { border-radius: var(--radius-xl); border: 1px solid var(--line); background: var(--surface); padding: 20px; box-shadow: var(--shadow); }
    .growth-panel h2 { margin: 6px 0 4px; font-size: 24px; letter-spacing: -.03em; }
    .growth-panel > p { margin: 0 0 18px; color: var(--ink-soft); font-size: 14px; line-height: 1.6; }
    .ability-list { display: grid; gap: 9px; }
    .ability-row { padding: 12px; border-radius: 12px; border: 1px solid #dedfda; background: #fbfaf6; }
    .ability-row.current { border-color: #b9dccd; background: #f1fbf6; }
    .ability-row .ability-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
    .ability-row b { font-size: 15px; }
    .ability-row span { font-size: 12px; color: var(--ink-soft); font-weight: 800; }
    .ability-row.current span { color: var(--success); }
    .ability-row p { margin: 5px 0 0; color: var(--ink-soft); font-size: 12px; line-height: 1.5; }
    .growth-next { margin-top: 18px; padding: 14px; border-radius: 13px; background: var(--world); color: #fff; }
    .growth-next small { display: block; color: #aebad3; font-size: 12px; }
    .growth-next b { display: block; margin: 4px 0 9px; font-size: 15px; }
    .growth-next .secondary { width: 100%; min-height: 46px; font-size: 12px; background: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.16); }

    /* Free creation */
    .create-stage { isolation: isolate; }
    .create-sheet-wrap {
      position: absolute; z-index: 4; left: 7%; right: 7%; top: 11%; bottom: 9%;
      display: grid; place-items: center;
    }
    .create-sheet {
      width: min(620px, 94%); padding: 28px; border-radius: 28px;
      color: var(--ink); background: var(--paper); box-shadow: 0 28px 70px rgba(0,0,0,.32);
    }
    .create-sheet .eyebrow { color: var(--physical); }
    .create-sheet h2 { margin: 10px 0 7px; font-size: 34px; line-height: 1.2; letter-spacing: -.04em; }
    .create-sheet > p { margin: 0 0 18px; color: var(--ink-soft); font-size: 15px; line-height: 1.7; }
    .create-preview {
      padding: 15px 16px; border: 1px solid #d8d1c2; border-radius: 14px;
      background: #fff; font-size: 16px; line-height: 1.65;
    }
    .create-preview b { color: var(--action); }
    .create-sheet-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
    .empty-portfolio { display: none; min-height: 410px; place-items: center; border-radius: var(--radius-xl); border: 1px dashed #c4c6c0; background: #fbfaf6; text-align: center; padding: 24px; }
    .empty-portfolio.visible { display: grid; }
    .empty-art { width: 112px; height: 100px; margin: 0 auto 12px; display: grid; place-items: center; border-radius: 22px; color: var(--action); background: #edf0ff; }
    .empty-art .icon { width: 54px; height: 54px; stroke-width: 1.2; }
    .empty-portfolio h2 { margin: 0 0 7px; font-size: 25px; }
    .empty-portfolio p { max-width: 32em; margin: 0 auto 16px; color: var(--ink-soft); font-size: 14px; }

    /* Concept controls */
    .prototype-badge {
      position: fixed; left: 18px; bottom: 14px; z-index: 70;
      padding: 7px 10px; border-radius: 8px; color: #fff; background: rgba(13,20,34,.84); font-size: 10px; font-weight: 800;
      backdrop-filter: blur(8px);
    }
    .concept-tools { position: fixed; right: 16px; bottom: 14px; z-index: 80; font-size: 12px; }
    .concept-tools-toggle {
      min-height: 38px; padding: 0 12px; border: 1px solid rgba(255,255,255,.22);
      border-radius: 10px; color: #fff; background: rgba(13,20,34,.9); font-weight: 850;
      display: flex; align-items: center; gap: 7px; box-shadow: 0 8px 20px rgba(0,0,0,.18);
    }
    .concept-tools-toggle .icon { width: 17px; height: 17px; }
    .concept-tools-panel {
      display: none; width: 266px; margin-bottom: 8px; padding: 14px;
      border-radius: 14px; color: var(--ink); background: #fff; border: 1px solid var(--line); box-shadow: 0 18px 40px rgba(0,0,0,.22);
    }
    .concept-tools-panel.open { display: block; }
    .concept-tools-panel h2 { margin: 0 0 4px; font-size: 14px; }
    .concept-tools-panel p { margin: 0 0 10px; color: var(--ink-soft); font-size: 10px; }
    .mode-switch { display: grid; grid-template-columns: repeat(3,1fr); gap: 4px; padding: 4px; border-radius: 10px; background: #f0ede5; }
    .mode-switch button { min-height: 38px; border: 0; border-radius: 7px; color: var(--ink-soft); background: transparent; font-size: 10px; font-weight: 850; }
    .mode-switch button[aria-pressed="true"] { color: var(--ink); background: #fff; box-shadow: 0 2px 6px rgba(23,35,61,.1); }
    .tools-row { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 9px; }
    .tools-row button { min-height: 38px; border: 1px solid var(--line); border-radius: 8px; background: #fbfaf6; color: var(--ink); font-size: 10px; font-weight: 800; }
    .tools-row button:hover { background: #f3f1e9; }
    body.capture .prototype-badge, body.capture .concept-tools { display: none; }
    body.capture .view.active, body.capture .stage-panel.active { animation: none !important; }
    body.capture .appbar { transition: none !important; }
    body.learning-app .prototype-badge, body.learning-app .concept-tools { display: none; }
    body.learning-app.review-mode .prototype-badge, body.learning-app.review-mode .concept-tools { display: block; }

    @media (min-width: 1800px) {
      .stage-rail { min-height: 156px; padding-top: 12px; padding-bottom: 14px; }
      .stage-tab { min-height: 120px; grid-template-columns: 78px minmax(0,1fr); padding-inline: 8px 12px; }
      .stage-thumb { width: 78px; height: 96px; }
      .stage-thumb .icon { width: 34px; height: 34px; }
      .stage-tab i { width: 26px; height: 26px; font-size: 12px; }
      .stage-copy b { font-size: 16px; }
      .stage-copy small { font-size: 10px; }
      .stage-rail-arrow { height: 90px; }
    }
    @media (max-width: 1120px) {
      .appbar { grid-template-columns: minmax(175px,1fr) auto minmax(175px,1fr); gap: 12px; padding: 0 16px; }
      .brand-copy small { display: none; }
      .main-nav button { padding: 0 11px; font-size: 13px; }
      .map-grid { grid-template-columns: 305px minmax(0,1fr); }
      .map-brief { padding-left: 24px; }
      .map-brief h1 { font-size: 40px; }
      .map-node { width: 155px; }
      .map-node .island { width: 112px; height: 70px; }
      .lab-layout { grid-template-columns: minmax(0,1fr) 268px; }
      .stage-panel { padding: 17px 20px 18px; }
      .story-grid, .concept-grid, .build-layout, .growth-layout { gap: 14px; }
      .story-grid { grid-template-columns: minmax(0,1.35fr) minmax(280px,.65fr); }
      .story-panel h2 { font-size: 40px; }
      .story-panel p { font-size: 15px; }
      .story-scene { transform: scale(.82); transform-origin: right bottom; }
      .build-layout { grid-template-columns: minmax(0,1.1fr) minmax(315px,.9fr); }
      .portfolio-layout { grid-template-columns: minmax(0,1fr) 282px; }
    }
    @media (max-width: 920px) {
      :root { --appbar: 68px; }
      .appbar { grid-template-columns: auto 1fr auto; gap: 8px; }
      .brandmark { width: 40px; height: 40px; }
      .brand-copy b { font-size: 16px; }
      .main-nav { justify-self: center; }
      .main-nav button { padding: 0 10px; }
      .main-nav button span { display: none; }
      .profile-chip { padding-right: 5px; }
      .profile-chip > div:last-child { display: none; }
      .map-grid { grid-template-columns: 280px minmax(0,1fr); }
      .map-brief h1 { font-size: 36px; }
      .map-lead { font-size: 14px; }
      .mission-callout { padding: 16px; }
      .mission-callout h2 { font-size: 21px; }
      .mission-head { grid-template-columns: auto minmax(0,1fr); padding: 11px 16px; min-height: 78px; }
      .mission-goal { display: none; }
      .mission-title h1 { font-size: 24px; }
      .stage-rail { grid-template-columns: 122px minmax(0,1fr) 76px; gap: 7px; padding-inline: 12px; }
      .stage-tab { min-width: 108px; grid-template-columns: 40px minmax(0,1fr); gap: 6px; padding-inline: 6px 8px; }
      .stage-thumb { width: 40px; height: 44px; }
      .stage-thumb .icon { width: 22px; height: 22px; }
      .stage-copy small { display: none; }
      .stage-rail-arrow { width: 32px; height: 50px; }
      .story-grid, .concept-grid, .build-layout, .reflect-layout, .growth-layout { grid-template-columns: minmax(0,1fr); }
      .objective-panel { display: grid; grid-template-columns: minmax(0,1fr) minmax(230px,.8fr); gap: 16px; }
      .objective-panel .eyebrow, .objective-panel h3 { grid-column: 1; }
      .objective-list { grid-column: 1; }
      .parts-block { grid-column: 2; grid-row: 1 / span 3; margin: 0; padding: 0; }
      .story-note { grid-column: 1 / -1; }
      .concept-grid { grid-template-columns: minmax(0,1fr) 250px; }
      .build-visual-card { min-height: 410px; }
      .build-layout { grid-template-columns: 1fr 320px; }
      .reflect-layout, .growth-layout { grid-template-columns: minmax(0,.9fr) minmax(340px,1.1fr); }
      .portfolio-layout { grid-template-columns: minmax(0,1fr) 270px; }
    }
    @media (max-width: 760px) {
      :root { --appbar: 64px; --nav-safe-gap: 10px; }
      body { overflow: hidden; }
      .app-shell { min-height: 0; height: 100%; overflow: hidden; }
      .appbar { position: relative; padding: 0 8px; gap: 4px; grid-template-columns: auto 1fr auto; }
      .brand { gap: 0; }
      .brandmark { width: 40px; height: 40px; border-radius: 12px; }
      .brand-copy { display: none; }
      .main-nav { padding: 3px; gap: 2px; }
      .main-nav .icon { width: 22px; height: 22px; }
      .main-nav button { width: 44px; padding: 0; justify-content: center; }
      .profile-chip { width: 44px; height: 44px; padding: 3px; justify-content: center; }
      .profile-chip .avatar { width: 36px; height: 36px; }
      .profile-chip > div:last-child { display: none; }
      .view { overflow-y: auto; }
      #screen-create.active,
      #screen-portfolio.active {
        display: block;
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior-y: contain;
        touch-action: pan-y;
        -webkit-overflow-scrolling: touch;
      }
      #screen-create { background: var(--world); }
      #screen-create .map-grid {
        display: flex;
        flex-direction: column;
        flex: none;
        width: 100%;
        height: auto;
        min-height: 0;
        overflow: visible;
        padding-bottom: 0;
        background: var(--world);
      }
      #screen-create .map-brief {
        flex: none;
        min-height: 0;
        justify-content: flex-start;
        gap: 18px;
        padding: 26px 18px 20px;
      }
      #screen-create .map-stage {
        flex: none;
        min-height: 0;
        overflow: visible;
        border-radius: 0;
        background: transparent;
      }
      #screen-create .mission-callout { width: 100%; }
      #screen-create .create-sheet-wrap {
        position: relative;
        inset: auto;
        display: block;
        padding: 10px 18px calc(26px + var(--bottom-ui-gap));
      }
      #screen-create .create-sheet {
        width: 100%; padding: 24px 20px; border-radius: 22px;
      }
      #screen-portfolio { background: var(--paper); }
      .map-grid { grid-template-columns: 1fr; }
      #main-content { overflow: hidden; }
      #main-content .map-grid { position: relative; display: block; height: 100%; min-height: 0; overflow: hidden; }
      #main-content .map-stage { position: absolute; inset: 0; min-height: 0; }
      #main-content .map-svg { display: none; }
      #main-content .map-svg-mobile { display: block; inset: 0; width: 100%; height: 100%; }
      #main-content .level-route {
        inset: var(--series-switcher-bottom, 158px) 8px 118px;
      }
      #main-content .star-region-head { top: 52px; left: 12px; right: 12px; }
      #main-content .star-region-head b { font-size: 12px; }
      #main-content .star-region-head small { font-size: 8px; }
      #main-content .star-region-head > span:last-child { font-size: 8px; }
      #main-content .series-switcher { top: 76px; left: 10px; right: 10px; gap: 6px; }
      #main-content .series-chip {
        flex-basis: 96px; min-height: 68px; padding: 7px 6px 6px;
        grid-template-columns: 32px minmax(0,1fr); grid-template-areas: "emblem copy" "meter meter";
        gap: 4px 6px; border-radius: 14px;
      }
      #main-content .series-chip.is-active { flex-basis: 112px; }
      #main-content .series-emblem { width: 31px; height: 31px; border-radius: 10px; }
      #main-content .series-emblem .icon { width: 16px; height: 16px; }
      #main-content .series-number { min-width: 16px; height: 13px; font-size: 6px; }
      #main-content .series-copy b { font-size: 9px; }
      #main-content .series-copy small { font-size: 7px; }
      #main-content .series-progress {
        grid-area: emblem; align-self: start; justify-self: end;
        position: absolute; top: 7px; right: 6px; min-width: 0;
      }
      #main-content .series-progress-ring { width: 20px; height: 20px; }
      #main-content .series-progress-ring::after { inset: 3px; }
      #main-content .series-progress-ring b { font-size: 7px; }
      #main-content .series-progress small { display: none; }
      #main-content .series-status-mark { top: 5px; right: 5px; width: 6px; height: 6px; }
      #main-content .level-route-grid { gap: 10px 3px; }
      #main-content .map-node.level-node { width: 100%; max-width: 132px; min-height: 78px; }
      #main-content .map-node.level-node .island { width: 64px; height: 42px; margin-bottom: 3px; }
      #main-content .map-node.level-node.current .island { width: 68px; height: 45px; }
      #main-content .map-node.level-node .island .icon { width: 26px; height: 26px; }
      #main-content .map-node.level-node .tower-mini { transform: scale(.66); }
      #main-content .map-node.level-node .forest-mini { transform: scale(.56); }
      #main-content .map-node.level-node .node-title { font-size: 12px; line-height: 1.28; }
      #main-content .map-node.level-node .node-meta { display: none; }
      #main-content .map-node.level-node .node-state { min-height: 18px; margin-top: 3px; padding: 0 5px; font-size: 9px; }
      #main-content .map-node.level-node .level-index {
        left: calc(50% - 35px); top: -6px; min-width: 24px; height: 20px;
        padding: 0 5px; font-size: 10px;
      }
      #main-content .map-node.level-node .node-lock {
        right: calc(50% - 35px); top: 27px; width: 18px; height: 18px;
      }
      #main-content .map-node.level-node.current::before { top: 23px; width: 88px; height: 88px; }
      #main-content .map-brief {
        position: absolute; inset: 0; z-index: 7; display: block; padding: 0;
        background: none; pointer-events: none;
      }
      #main-content .map-intro { position: absolute; top: 13px; left: 14px; }
      #main-content .map-kicker {
        padding: 7px 9px; border: 1px solid rgba(255,255,255,.13); border-radius: 9px;
        max-width: 185px; overflow: hidden; background: rgba(5,26,67,.72);
        font-size: 10px; letter-spacing: .04em; text-overflow: ellipsis; white-space: nowrap;
      }
      #main-content .map-kicker::before { width: 12px; }
      #main-content .map-intro h1,
      #main-content .map-intro .map-lead,
      #main-content .map-safety,
      #main-content .aibo-map,
      #main-content .map-zone-label { display: none; }
      .aibo-companion { right: 10px; bottom: calc(10px + var(--bottom-ui-gap)); width: 104px; height: 116px; }
      .app-shell[data-screen="mission"] .aibo-companion { bottom: calc(68px + var(--bottom-ui-gap)); }
      .app-shell[data-screen="map"] .aibo-companion {
        display: block; bottom: calc(152px + var(--bottom-ui-gap));
      }
      .aibo-companion .aibo {
        width: 46px; height: 52px;
        transform: translateX(-50%) scale(2) rotateX(3deg) rotateY(-4deg);
      }
      .aibo-companion-bubble {
        max-width: min(238px, calc(100vw - 118px)); padding: 8px 10px;
        font-size: 11px; border-radius: 12px 12px 4px 12px;
      }
      #main-content .chapter-progress {
        position: absolute; top: 13px; right: 14px; gap: 0; padding: 7px 9px;
        border: 1px solid rgba(255,255,255,.13); border-radius: 9px;
        background: rgba(5,26,67,.72); font-size: 11px;
      }
      #main-content .chapter-progress .track,
      #main-content .chapter-progress .next-ability { display: none; }
      #main-content .mission-callout {
        position: absolute; left: 12px; right: 12px;
        bottom: calc(10px + var(--bottom-ui-gap));
        width: auto; padding: 12px 16px 8px; border-radius: 22px; pointer-events: auto;
        display: grid; grid-template-columns: minmax(0,1fr); grid-template-areas:
          "top" "title" "actions";
        gap: 6px;
      }
      #main-content .mission-callout::before { inset: 12px auto 12px 0; }
      #main-content .mission-callout .callout-top { grid-area: top; font-size: 10px; }
      #main-content .mission-callout h2 { grid-area: title; margin: 0; font-size: 21px; }
      #main-content .mission-callout p { display: none; }
      #main-content .callout-state-badge { width: 34px; height: 34px; border-radius: 10px; }
      #main-content .callout-state-badge .icon { width: 18px; height: 18px; }
      #main-content .callout-level-chip { min-width: 34px; height: 27px; font-size: 10px; }
      #main-content .callout-actions {
        grid-area: actions; margin-top: 1px;
        grid-template-columns: minmax(0,1fr) 92px; gap: 8px;
      }
      #main-content .mission-launch {
        min-height: 58px; padding: 6px 7px; grid-template-columns: 38px minmax(0,1fr) 20px;
        gap: 7px; border-radius: 15px;
      }
      #main-content .launch-orbit { width: 38px; height: 38px; border-radius: 12px; }
      #main-content .launch-orbit .icon { width: 20px; height: 20px; }
      #main-content .launch-copy b { font-size: 15px; }
      #main-content .launch-copy small { font-size: 7px; }
      #main-content .launch-arrow { width: 20px; height: 20px; border-radius: 7px; }
      #main-content .launch-arrow .icon { width: 13px; height: 13px; }
      #main-content .mission-callout[data-probe-visible="false"] .mission-launch { grid-column: 1 / -1; }
      #main-content .mission-callout .series-probe-trigger {
        min-height: 58px; padding: 7px; border-radius: 15px; gap: 4px;
      }
      #main-content .probe-orbit { width: 22px; height: 22px; border-radius: 7px; }
      #main-content .probe-copy b { font-size: 10px; }
      #main-content .probe-copy small { font-size: 7px; }
      #main-content .map-node { width: 126px; min-height: 108px; }
      #main-content .map-node .island { width: 102px; height: 64px; margin-bottom: 8px; }
      #main-content .map-node .node-title { font-size: 14px; }
      #main-content .map-node .node-meta { font-size: 11px; }
      #main-content .node-energy { left: 20%; top: 48%; }
      #main-content .node-sense { left: 52%; top: 33%; }
      #main-content .node-core { left: 79%; top: 18%; }
      #main-content .current-pin { display: none; }
      .mission-shell { height: 100%; min-height: 0; }
      .mission-head { height: 56px; min-height: 56px; padding: 6px 10px; grid-template-columns: 44px minmax(0,1fr); gap: 8px; }
      .back-button { width: 44px; height: 44px; }
      .mission-breadcrumb { font-size: 10px; letter-spacing: .03em; }
      .mission-title h1 { margin: 0; font-size: 21px; }
      .mission-content { min-height: 0; overflow: auto; }
      .mission-content { touch-action: pan-y; -webkit-overflow-scrolling: touch; overscroll-behavior-y: contain; }
      .stage-panel { padding: 8px 10px; }
      .stage-panel[data-stage-panel="simulation"] { height: auto; min-height: 100%; overflow: visible; }
      .stage-rail {
        min-height: calc(76px + var(--bottom-ui-gap));
        display: grid; grid-template-columns: minmax(0,1fr);
        gap: 0; padding: 6px 8px calc(6px + var(--bottom-ui-gap));
      }
      .stage-rail-head,
      .stage-rail-nav { display: none; }
      .stage-rail-track { gap: 6px; padding-bottom: 2px; }
      .stage-tab {
        flex: 0 0 126px; min-width: 126px; min-height: 62px;
        grid-template-columns: 36px minmax(0,1fr); gap: 7px; padding: 5px 8px 5px 5px;
        border-radius: 12px;
      }
      .stage-thumb { width: 36px; height: 42px; border-radius: 10px; }
      .stage-thumb .icon { width: 20px; height: 20px; }
      .stage-tab i { width: 17px; height: 17px; border-radius: 6px; font-size: 8px; }
      .stage-copy b { font-size: 11px; }
      .stage-copy small { display: block; margin-top: 2px; font-size: 7px; }
      .stage-tab.done::after { width: 13px; height: 13px; right: 5px; top: 5px; font-size: 8px; }
      .story-grid, .concept-grid, .build-layout, .reflect-layout, .growth-layout, .portfolio-layout { grid-template-columns: 1fr; }
      .story-panel { min-height: 530px; }
      .story-scene { transform: scale(.68); right: 1%; }
      .objective-panel { display: block; }
      .parts-block { margin-top: 16px; padding-top: 16px; }
      .concept-grid { gap: 14px; }
      .section-heading h2 { font-size: clamp(24px, 8.2vw, 32px); line-height: 1.08; white-space: normal; }
      .section-heading p { margin-top: 5px; font-size: 14px; }
      .concept-meta-row { gap: 8px; }
      .concept-meta-row .lab-status-pill { flex: none; font-size: 10px; }
      .lab-layout { display: flex; flex-direction: column; gap: 8px; height: auto; min-height: 0; }
      .lab-workbench { flex: none; min-height: clamp(320px, 46dvh, 420px); }
      .lab-toolbar { padding: 7px 10px; }
      .lab-toolbar h2 { font-size: 14px; }
      .lab-status-pill { padding: 5px 8px; font-size: 10px; }
      .lab-toolbar-actions { gap: 5px; }
      .lab-render-toggle { min-height: 34px; padding: 0 7px; font-size: 9px; }
      .lab-canvas { flex: 1; min-height: 0; }
      .lab-visual-shell { min-height: 280px; }
      .lab-3d-tip { display: none; }
      .lab-3d-readout { left: 8px; bottom: 8px; padding: 6px 8px; }
      .lab-view-controls { right: 8px; bottom: 8px; gap: 3px; }
      .lab-view-controls button { width: 44px; height: 44px; border-radius: 9px; }
      .lab-side { display: block; flex: 0 0 auto; }
      .lab-info-card { height: auto; min-height: 0; }
      .lab-info-tabs { padding: 5px 7px 0; }
      .lab-info-tabs button { min-height: 36px; font-size: 10px; }
      .lab-info-panel { padding: 10px; overflow: visible; }
      .lab-hint-label {
        left: 10px; right: 10px; top: 8px; width: auto; min-height: 48px;
        transform: none; padding: 6px 9px; gap: 8px; border-radius: 11px;
      }
      .lab-hint-copy b { font-size: 12px; }
      .lab-hint-copy span { font-size: 10px; }
      .lab-component { min-width: 88px; padding: 8px; border-radius: 12px; }
      .lab-component b { font-size: 11px; }
      .lab-component small { font-size: 10px; }
      .lab-battery { left: 3%; top: 30%; }
      .lab-led { right: 3%; top: 30%; }
      .lab-switch { min-width: 102px; width: 102px; bottom: 6%; }
      .lab-battery .battery-drawing { width: 36px; height: 52px; }
      .lab-battery .battery-drawing::after { left: 3px; bottom: 3px; }
      .lab-led .bulb-graphic { width: 44px; height: 44px; }
      .switch-button { width: 72px; height: 44px; }
      .switch-button span { width: 35px; height: 35px; }
      .switch-button[aria-pressed="true"] span { transform: translateX(29px); }
      .endpoint[data-end="battery-positive"] { left: 25%; top: 34%; }
      .endpoint[data-end="led-positive"] { left: 70%; top: 34%; }
      .endpoint[data-end="battery-negative"] { left: 25%; top: 59%; }
      .endpoint[data-end="led-negative"] { left: 70%; top: 59%; }
      .parts-tray { display: none; }
      #predictionCard.lab-info-panel.is-active { display: grid; padding: 9px 10px; }
      .lab-step-guide { margin-bottom: 9px; }
      .lab-step-guide li { min-height: 30px; padding: 3px; font-size: 10px; }
      .prediction-card h3 { margin: 0 0 6px; font-size: 15px; }
      .prediction-choices { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 6px; }
      .prediction-choice { min-height: 44px; padding: 0 7px; text-align: center; font-size: 13px; }
      .lab-actions { gap: 6px; margin-top: 7px; }
      .lab-actions .primary, .lab-actions .secondary { min-height: 44px; padding: 0 8px; font-size: 13px; }
      .lab-result { min-height: 0; margin-top: 7px; padding: 8px 9px; font-size: 12px; }
      .lab-result strong { font-size: 13px; }
      .lab-next { min-height: 44px; margin-top: 7px; font-size: 13px; }
      .lab-observation-guide { display: none; }
      .lab-live-state { display: none; }
      .coach-card { display: none; }
      .build-visual-card { min-height: 470px; }
      .build-layout { gap: 14px; }
      .portfolio-page { min-height: 100%; padding: 24px 16px calc(24px + var(--bottom-ui-gap)); }
      .portfolio-layout { gap: 14px; }
    }
    @media (max-width: 760px) and (max-height: 700px) {
      .app-shell[data-screen="map"] .aibo-companion { bottom: calc(118px + var(--bottom-ui-gap)); }
      #main-content .level-route { inset: 160px 8px 104px; }
      #main-content .mission-callout {
        gap: 5px; padding: 10px 14px 7px;
      }
      #main-content .mission-callout .callout-top { grid-area: top; font-size: 10px; }
      #main-content .mission-callout h2 { grid-area: title; margin: 0; font-size: 19px; }
      #main-content .mission-callout p { display: none; }
      #main-content .mission-launch { min-height: 54px; }
      #main-content .mission-callout .series-probe-trigger { min-height: 54px; }
      #main-content .map-node.level-node { min-height: 60px; }
      #main-content .map-node.level-node .island { width: 52px; height: 32px; margin-bottom: 2px; }
      #main-content .map-node.level-node.current .island { width: 56px; height: 34px; }
      #main-content .map-node.level-node .island .icon { width: 22px; height: 22px; }
      #main-content .map-node.level-node .node-title { font-size: 10px; }
      #main-content .map-node.level-node .node-state {
        min-height: 14px; height: 14px; margin-top: 2px; padding: 0 4px;
        font-size: 8px; line-height: 14px;
      }
      #main-content .map-node.level-node .level-index {
        left: calc(50% - 27px); top: -5px; min-width: 22px; height: 18px; font-size: 9px;
      }
      #main-content .map-node.level-node .node-lock {
        right: calc(50% - 27px); top: 21px; width: 17px; height: 17px;
      }
      #main-content .map-node.level-node.current::before { top: 18px; width: 78px; height: 78px; }
      .stage-panel[data-stage-panel="simulation"] { padding: 4px 8px 6px; }
      .stage-panel[data-stage-panel="simulation"] {
        height: auto; min-height: 100%; overflow: visible;
      }
      .lab-layout { height: auto; min-height: 0; gap: 6px; }
      .lab-workbench { flex: none; min-height: 360px; }
      .lab-toolbar { min-height: 34px; padding: 4px 9px; }
      .lab-canvas { min-height: 260px; }
      .lab-side { overflow: visible; }
      .lab-component { min-width: 76px; padding: 6px; border-radius: 11px; }
      .lab-component b { font-size: 10px; }
      .lab-component small { display: none; }
      .lab-battery { left: 4%; top: 23%; }
      .lab-led { right: 4%; top: 23%; }
      .lab-switch { width: 96px; min-width: 96px; bottom: 4%; }
      .lab-battery .battery-drawing { width: 28px; height: 40px; }
      .lab-led .bulb-graphic { width: 34px; height: 34px; border-width: 3px; }
      .switch-button { width: 64px; height: 36px; }
      .switch-button span { width: 28px; height: 28px; }
      .switch-button[aria-pressed="true"] span { transform: translateX(28px); }
      .endpoint { width: 42px; height: 42px; }
      .endpoint[data-end="battery-positive"] { left: 25%; top: 31%; }
      .endpoint[data-end="led-positive"] { left: 70%; top: 31%; }
      .endpoint[data-end="battery-negative"] { left: 25%; top: 58%; }
      .endpoint[data-end="led-negative"] { left: 70%; top: 58%; }
      #predictionCard.lab-info-panel.is-active {
        display: grid; grid-template-columns: minmax(0,1fr) auto; grid-template-areas:
          "steps steps" "title actions" "choices choices" "model model" "result result" "compare compare" "note note" "next next";
        gap: 4px 6px; padding: 7px 8px;
      }
      .lab-step-guide { grid-area: steps; margin: 0; }
      .lab-step-guide li { min-height: 26px; }
      .prediction-card h3 { grid-area: title; align-self: center; margin: 0; font-size: 13px; }
      .prediction-choices { grid-area: choices; gap: 5px; }
      .lab-model-strip { grid-area: model; margin: 0; }
      .lab-model-strip span { padding: 4px; font-size: 7px; }
      .lab-model-strip b { font-size: 9px; }
      .prediction-choice { min-height: 44px; padding: 0 6px; font-size: 13px; }
      .lab-actions { grid-area: actions; align-self: center; margin: 0; gap: 5px; }
      .lab-actions .secondary { flex: 0 0 44px; width: 44px; min-width: 44px; padding: 0; font-size: 0; }
      .lab-actions .secondary .icon { margin: 0; }
      .lab-actions .primary { min-width: 0; padding: 0 7px; font-size: 12px; }
      .lab-result { grid-area: result; min-height: 44px; margin: 0; padding: 6px 8px; }
      .lab-compare { grid-area: compare; margin: 0; padding: 6px 8px; font-size: 10px; }
      .lab-model-note { grid-area: note; margin: 0; font-size: 8px; }
      .lab-next { grid-area: next; margin: 0; }
      body[data-density-mode="engineering"] .lab-rule-note { display: none; }
    }
    @media (max-width: 920px) and (max-height: 520px) and (orientation: landscape) {
      :root { --appbar: 54px; --nav-safe-gap: 0px; }
      .aibo-companion { display: none; }
      .appbar { padding: 0 8px; gap: 4px; }
      .brand-copy,
      .main-nav button span,
      .profile-chip > div:last-child { display: none; }
      .brandmark,
      .profile-chip { width: 40px; height: 40px; }
      .profile-chip { padding: 2px; justify-content: center; }
      .profile-chip .avatar { width: 34px; height: 34px; }
      .mission-head { height: 48px; min-height: 48px; padding: 3px 10px; gap: 6px; }
      .back-button { width: 40px; height: 40px; }
      .mission-breadcrumb { font-size: 9px; }
      .mission-title h1 { font-size: 18px; }
      .mission-content { overflow: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
      .stage-panel { padding: 6px 8px; }
      .stage-panel[data-stage-panel="simulation"] {
        height: auto; min-height: 260px; overflow: visible;
      }
      .lab-layout {
        display: grid; grid-template-columns: minmax(0,1fr) 290px;
        gap: 8px; height: auto; min-height: 280px;
      }
      .lab-workbench { min-height: 280px; }
      .lab-canvas { min-height: 0; }
      .lab-side { max-height: 280px; overflow-y: auto; }
      .lab-toolbar { padding: 5px 9px; }
      .lab-hint-label { top: 6px; min-height: 42px; padding: 5px 9px; }
      .prediction-card { padding: 8px; }
      .lab-step-guide { margin-bottom: 5px; }
      .lab-step-guide li { min-height: 27px; }
      .prediction-card h3 { margin-bottom: 5px; font-size: 13px; }
      .prediction-choices { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 5px; }
      .prediction-choice { min-height: 38px; padding: 5px 7px; font-size: 12px; }
      .lab-actions { margin-top: 5px; }
      .lab-actions .primary,
      .lab-actions .secondary { min-height: 38px; font-size: 12px; }
      .lab-result { margin-top: 5px; padding: 6px 8px; font-size: 11px; }
      .lab-next { min-height: 38px; font-size: 12px; }
      .stage-rail { min-height: 58px; padding: 4px 7px; }
      .stage-tab {
        flex-basis: 118px; min-width: 118px; min-height: 48px;
        grid-template-columns: 32px minmax(0,1fr); gap: 5px; padding: 3px 6px 3px 4px;
      }
      .stage-thumb { width: 32px; height: 36px; border-radius: 9px; }
      .stage-thumb .icon { width: 18px; height: 18px; }
      .stage-copy b { font-size: 10px; }
      .stage-copy small { display: none; }
      .story-grid, .build-layout { grid-template-columns: minmax(0,1.2fr) minmax(280px,.8fr); }
      .concept-grid { grid-template-columns: minmax(0,1.2fr) minmax(260px,.8fr); }
      .reflect-layout, .growth-layout { grid-template-columns: minmax(0,1fr) minmax(300px,1fr); }
      .story-panel { min-height: 260px; padding: 18px; }
      .story-panel h2 { margin: 8px 0 6px; font-size: 29px; }
      .story-panel p { font-size: 13px; line-height: 1.55; }
      .story-scene { transform: scale(.52); }
      .objective-panel,
      .field-note { max-height: 270px; overflow-y: auto; padding: 13px; }
      .objective-list li { padding: 7px; }
      .parts-block { padding-top: 10px; }
    }
    @media (max-width: 760px) {
      .series-probe-panel {
        width: min(580px, 100%); max-height: calc(var(--app-height) - 24px);
        padding: 22px 16px 16px; border-radius: 22px;
      }
      .series-probe-head { padding: 0 48px; }
      .series-probe-panel h2 { font-size: clamp(22px, 7vw, 28px); }
      .series-probe-head > p { margin-bottom: 14px; font-size: 13px; }
      .series-probe-questions { grid-template-columns: 1fr; }
      .lesson-brief-panel {
        width: min(580px, 100%); max-height: calc(var(--app-height) - 24px);
        padding: 22px 16px 16px; border-radius: 22px;
      }
      .lesson-brief-head { padding: 0 46px; }
      .lesson-brief-head h2 { font-size: clamp(26px, 8vw, 34px); }
      .lesson-brief-head p { margin-bottom: 14px; font-size: 12px; }
      .lesson-brief-grid { grid-template-columns: 1fr; }
      .lesson-brief-grid article { min-height: 0; }
      .lesson-brief-grid figure { grid-template-columns: 112px minmax(0, 1fr); }
      .lesson-brief-grid figure > div { min-height: 142px; }
      .lesson-brief-footer { padding-top: 10px; }
      .story-brief-trigger {
        top: 14px; right: 14px; width: 46px; min-height: 46px; padding: 7px;
        justify-content: center; border-radius: 13px;
      }
      .story-brief-trigger > span { display: none; }
      .story-brief-trigger > i { width: 30px; height: 30px; }
    }
    @media (max-width: 430px) {
      .aibo-companion { display: none; }
    }
    @media (max-width: 360px) and (max-height: 600px) {
      .lab-view-controls { left: 8px; right: auto; bottom: 52px; }
      #main-content .series-chip { flex-basis: 84px; }
      #main-content .series-chip.is-active { flex-basis: 92px; }
      #main-content .map-node.level-node { min-height: 56px; }
      #main-content .map-node.level-node .island { width: 48px; height: 29px; margin-bottom: 1px; }
      #main-content .map-node.level-node.current .island { width: 52px; height: 31px; }
      #main-content .map-node.level-node .node-title { font-size: 9.5px; }
      #main-content .map-node.level-node .tower-mini { transform: scale(.54); }
      #main-content .map-node.level-node .island .icon { width: 20px; height: 20px; }
      #main-content .map-node.level-node .level-index { top: -4px; height: 17px; font-size: 8px; }
      #main-content .map-node.level-node .node-lock { top: 19px; width: 16px; height: 16px; }
      #main-content .map-node.level-node.current::before { top: 17px; width: 72px; height: 72px; }
    }
    @media (max-height: 790px) and (min-width: 900px) {
      :root { --appbar: 68px; }
      .map-brief { gap: 16px; }
      .map-brief h1 { font-size: 42px; margin-top: 8px; }
      .mission-head { min-height: 72px; padding-top: 8px; padding-bottom: 8px; }
      .mission-title h1 { font-size: 25px; }
      .stage-panel { padding-top: 14px; padding-bottom: 14px; }
      .story-panel { min-height: 420px; }
      .story-panel h2 { font-size: 37px; margin-top: 16px; }
      .story-scene { transform: scale(.77); }
      .objective-panel { padding: 17px; }
      .objective-list li { padding: 8px; }
      .lab-canvas { min-height: 330px; }
      .build-visual-card { min-height: 420px; }
      .evidence-board { padding: 17px; }
      .mentor-body { padding: 14px 16px; }
      .mentor-question { gap: 8px; }
      .mentor-bubble { padding: 10px 12px; font-size: 13px; }
      textarea { min-height: 75px; }
    }
    @media (max-height: 860px) and (min-width: 900px) {
      .circuit-story { min-height: 250px; margin-top: 14px; }
      .concept-board { padding-top: 20px; padding-bottom: 20px; }
      .stage-actions { margin-top: 12px; }
      .build-instructions { padding: 16px; }
      .build-instructions h2 { margin-top: 3px; margin-bottom: 5px; font-size: 24px; }
      .build-instructions > p { font-size: 14px; line-height: 1.5; }
      .safety-card { margin: 10px 0; padding: 9px 10px; font-size: 13px; }
      .step-checklist { gap: 6px; }
      .check-row { min-height: 48px; padding: 6px 9px; }
      .check-row small { font-size: 11px; }
      .evidence-row { margin-top: 8px; }
      .evidence-button, .evidence-sample { min-height: 44px; }
      .form-error { min-height: 14px; margin-top: 4px; }
    }
    @media (max-width: 760px) {
      .mission-head { grid-template-columns: 44px minmax(0,1fr) 58px; gap: 8px; }
      .lesson-audio-button {
        width: 58px; min-width: 58px; min-height: 54px; padding: 4px 3px 13px;
        grid-template-columns: 1fr; border-radius: 13px;
      }
      .mission-shell[data-stage="simulation"] .lesson-audio-button {
        width: 58px; min-width: 58px; min-height: 54px;
      }
      .lesson-audio-orbit { width: 32px; height: 32px; margin: auto; border-radius: 10px; }
      .lesson-audio-orbit .icon { width: 18px; height: 18px; }
      .lesson-audio-copy {
        position: absolute; left: 2px; right: 2px; bottom: 4px; display: block; text-align: center;
      }
      .lesson-audio-copy b { font-size: 8px; line-height: 1; }
      .lesson-audio-copy small { display: none; }
      .lesson-audio-progress { left: 5px; right: 5px; bottom: 1px; }
    }
    /* Mission navigation is merged into the single app header. */
    .appbar > .mission-head { display: none; }
    .app-shell[data-screen="mission"] .appbar {
      height: 84px; flex: 0 0 84px;
      grid-template-columns: auto auto minmax(320px, 1fr) auto;
      grid-template-areas: "brand nav mission utility";
      gap: 12px; padding: 0 20px;
      color: var(--ink); background: var(--paper); border-color: var(--line);
    }
    .app-shell[data-screen="mission"] .appbar .brand { grid-area: brand; }
    .app-shell[data-screen="mission"] .appbar .main-nav {
      grid-area: nav; justify-self: start; padding: 4px;
    }
    .app-shell[data-screen="mission"] .appbar .main-nav button {
      min-height: 42px; padding-inline: 12px; font-size: 13px;
    }
    .app-shell[data-screen="mission"] .appbar > .mission-head {
      display: grid; grid-area: mission; width: 100%;
      min-width: 0; min-height: 0;
      grid-template-columns: 44px minmax(0, 1fr) auto;
      gap: 11px; align-items: center;
      padding: 0 0 0 16px;
      border: 0; border-left: 1px solid var(--line); background: transparent;
    }
    .app-shell[data-screen="mission"] .appbar .mission-breadcrumb {
      margin-bottom: 1px; color: #6d778a;
      font-size: 9px; letter-spacing: .065em;
    }
    .app-shell[data-screen="mission"] .appbar .mission-title h1 {
      margin-top: 1px; font-size: clamp(21px, 1.75vw, 28px);
      line-height: 1.12;
    }
    .app-shell[data-screen="mission"] .appbar .back-button {
      width: 44px; height: 44px; border-radius: 12px;
    }
    .app-shell[data-screen="mission"] .appbar .lesson-audio-button {
      min-width: 174px; min-height: 50px; padding: 6px 11px 8px;
      grid-template-columns: 34px minmax(0, 1fr); gap: 8px;
      border-radius: 13px; box-shadow: none;
    }
    .app-shell[data-screen="mission"] .appbar .lesson-audio-orbit {
      width: 34px; height: 34px; border-radius: 10px;
    }
    .app-shell[data-screen="mission"] .appbar .utility-bar {
      grid-area: utility; justify-self: end;
    }

    @media (max-width: 1500px) {
      .app-shell[data-screen="mission"] .appbar {
        grid-template-columns: auto minmax(0, 1fr) auto;
        grid-template-areas: "brand mission utility";
      }
      .app-shell[data-screen="mission"] .appbar .main-nav { display: none; }
    }

    @media (max-width: 1120px) {
      .app-shell[data-screen="mission"] .appbar {
        gap: 10px; padding-inline: 14px;
      }
      .app-shell[data-screen="mission"] .appbar > .mission-head {
        padding-left: 12px;
        grid-template-columns: 44px minmax(0, 1fr) auto;
      }
      .app-shell[data-screen="mission"] .appbar .lesson-audio-button {
        min-width: 154px;
      }
    }

    @media (max-width: 920px) {
      .app-shell[data-screen="mission"] .appbar {
        height: auto; min-height: 116px; flex-basis: auto;
        grid-template-columns: auto minmax(0, 1fr) auto;
        grid-template-areas: "brand brand utility" "mission mission mission";
        gap: 0 8px; padding: 6px 10px 8px;
      }
      .app-shell[data-screen="mission"] .appbar .brand { align-self: center; }
      .app-shell[data-screen="mission"] .appbar .utility-bar { align-self: center; }
      .app-shell[data-screen="mission"] .appbar > .mission-head {
        grid-template-columns: 42px minmax(0, 1fr) auto;
        gap: 8px; padding: 6px 0 0;
        border-top: 1px solid var(--line); border-left: 0;
      }
      .app-shell[data-screen="mission"] .appbar .mission-title h1 {
        font-size: 20px;
      }
      .app-shell[data-screen="mission"] .appbar .mission-breadcrumb {
        max-width: 100%; font-size: 8.5px;
      }
      .app-shell[data-screen="mission"] .appbar .back-button {
        width: 40px; height: 40px;
      }
      .app-shell[data-screen="mission"] .appbar .lesson-audio-button {
        min-width: 148px; min-height: 44px; padding: 5px 9px 7px;
      }
      .app-shell[data-screen="mission"] .appbar .lesson-audio-orbit {
        width: 32px; height: 32px;
      }
    }

    @media (max-width: 430px) {
      .app-shell[data-screen="mission"] .appbar {
        min-height: 108px; padding-inline: 8px;
      }
      .app-shell[data-screen="mission"] .appbar > .mission-head {
        grid-template-columns: 40px minmax(0, 1fr) 44px;
        gap: 7px; padding-top: 5px;
      }
      .app-shell[data-screen="mission"] .appbar .mission-title h1 {
        font-size: 18px;
      }
      .app-shell[data-screen="mission"] .appbar .lesson-audio-button {
        width: 44px; min-width: 44px; min-height: 44px; padding: 4px;
        grid-template-columns: 1fr; place-items: center;
      }
      .app-shell[data-screen="mission"] .appbar .lesson-audio-copy,
      .app-shell[data-screen="mission"] .appbar .lesson-audio-progress {
        display: none;
      }
      .app-shell[data-screen="mission"] .appbar .lesson-audio-orbit {
        width: 34px; height: 34px;
      }
    }

    /* Compact lesson workspace: one-line concept heading and shorter stage rail. */
    .stage-panel[data-stage-panel="concept"].active {
      height: 100%;
      padding: 12px 16px 10px;
    }
    .concept-grid {
      height: 100%;
      min-height: 0;
      gap: 14px;
    }
    .concept-board {
      height: 100%;
      min-height: 0;
      padding: 18px 20px 14px;
    }
    .section-heading {
      display: grid;
      grid-template-columns: auto auto minmax(120px, 1fr) auto;
      align-items: center;
      gap: 12px;
    }
    .section-heading-copy,
    .concept-meta-row {
      display: contents;
    }
    .section-heading .eyebrow {
      grid-column: 1;
      grid-row: 1;
      white-space: nowrap;
      font-size: 11px;
    }
    .section-heading h2 {
      grid-column: 2;
      grid-row: 1;
      margin: 0;
      font-size: clamp(24px, 2.25vw, 32px);
      line-height: 1.12;
    }
    .section-heading p {
      grid-column: 3;
      grid-row: 1;
      min-width: 0;
      margin: 0;
      overflow: hidden;
      font-size: 14px;
      line-height: 1.35;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .section-heading .lab-status-pill {
      grid-column: 4;
      grid-row: 1;
      flex: none;
      padding: 6px 9px;
      font-size: 11px;
      white-space: nowrap;
    }
    .circuit-story {
      flex: 1;
      margin-top: 10px;
    }
    .stage-actions {
      margin-top: 10px;
    }
    .field-note {
      height: 100%;
      min-height: 0;
      align-self: stretch;
    }
    .stage-rail {
      min-height: 92px;
      grid-template-columns: 140px minmax(0, 1fr) 76px;
      gap: 8px;
      padding: 7px 14px 8px;
    }
    .stage-rail-head {
      padding-right: 8px;
    }
    .stage-rail-head small {
      font-size: 9px;
    }
    .stage-rail-head b {
      margin-top: 4px;
      font-size: 15px;
    }
    .stage-rail-track {
      gap: 7px;
      padding-bottom: 2px;
    }
    .stage-tab {
      min-height: 70px;
      grid-template-columns: 48px minmax(0, 1fr);
      gap: 8px;
      padding: 5px 9px 5px 5px;
      border-radius: 12px;
    }
    .stage-thumb {
      width: 48px;
      height: 58px;
      border-radius: 10px;
    }
    .stage-thumb .icon {
      width: 23px;
      height: 23px;
    }
    .stage-tab i {
      width: 19px;
      height: 19px;
      font-size: 9px;
    }
    .stage-copy b {
      font-size: 13.5px;
    }
    .stage-copy small {
      margin-top: 3px;
      font-size: 8.5px;
    }
    .stage-rail-arrow {
      width: 36px;
      height: 70px;
    }

    @media (min-width: 1800px) {
      .stage-rail { min-height: 102px; }
      .stage-tab { min-height: 80px; grid-template-columns: 54px minmax(0, 1fr); }
      .stage-thumb { width: 54px; height: 66px; }
      .stage-rail-arrow { height: 80px; }
    }

    @media (max-width: 920px) {
      .stage-panel[data-stage-panel="concept"].active {
        height: auto;
        padding: 9px 12px 8px;
      }
      .concept-grid {
        height: auto;
        min-height: 100%;
      }
      .concept-board,
      .field-note {
        height: auto;
      }
      .story-grid,
      .concept-grid,
      .build-layout,
      .reflect-layout,
      .growth-layout {
        gap: 10px;
      }
      .concept-board {
        padding: 15px 16px 12px;
      }
      .section-heading {
        grid-template-columns: auto minmax(0, 1fr) auto;
        gap: 9px;
      }
      .section-heading .eyebrow { grid-column: 1; }
      .section-heading h2 {
        grid-column: 2;
        min-width: 0;
        overflow: hidden;
        font-size: 21px;
        text-overflow: ellipsis;
        white-space: nowrap;
      }
      .section-heading p { display: none; }
      .section-heading .lab-status-pill {
        grid-column: 3;
        padding: 5px 8px;
        font-size: 10px;
      }
    }

    @media (max-width: 760px) {
      .stage-panel[data-stage-panel="concept"].active {
        padding: 6px 8px;
      }
      .concept-board {
        padding: 13px 13px 11px;
      }
      .section-heading {
        gap: 7px;
      }
      .section-heading .eyebrow {
        font-size: 9px;
      }
      .section-heading h2 {
        font-size: 17px;
      }
      .section-heading .lab-status-pill {
        padding: 4px 7px;
        font-size: 9px;
      }
      .stage-rail {
        min-height: calc(58px + var(--bottom-ui-gap));
        padding: 4px 7px calc(4px + var(--bottom-ui-gap));
      }
      .stage-tab {
        min-height: 48px;
        grid-template-columns: 32px minmax(0, 1fr);
        gap: 5px;
        padding: 3px 6px 3px 4px;
      }
      .stage-thumb {
        width: 32px;
        height: 38px;
      }
      .stage-thumb .icon {
        width: 18px;
        height: 18px;
      }
      .stage-copy b {
        font-size: 10px;
      }
    }

    @media (max-width: 360px) {
      .section-heading {
        grid-template-columns: minmax(0, 1fr) auto;
      }
      .section-heading .eyebrow {
        display: none;
      }
      .section-heading h2 {
        grid-column: 1;
        font-size: 16px;
      }
      .section-heading .lab-status-pill {
        grid-column: 2;
        width: 34px;
        min-width: 34px;
        min-height: 34px;
        padding: 0;
        font-size: 0;
      }
    }

    .concept-principle-trigger {
      position: relative;
      cursor: pointer;
      transition: transform var(--fast), border-color var(--fast), background var(--fast);
    }
    .concept-principle-trigger::after {
      content: "";
      position: absolute;
      inset: -4px;
      border: 1px solid rgba(63, 88, 217, .32);
      border-radius: 12px;
      pointer-events: none;
      animation: principleButtonPulse 2.8s ease-out infinite;
    }
    .concept-principle-trigger:hover {
      transform: translateY(-1px);
      border-color: #aab9e7 !important;
      background: #edf1ff !important;
    }
    .concept-principle-trigger:active {
      transform: translateY(0) scale(.98);
    }
    .field-note.is-highlighted {
      animation: principleCardReveal 1.05s ease-out;
    }

    .physical-circuit {
      padding: 10px 12px 12px;
      gap: 8px;
    }
    .circuit-notice-bar {
      flex: none;
      min-height: 54px;
      display: grid;
      grid-template-columns: 38px minmax(0, 1fr) auto;
      align-items: center;
      gap: 10px;
      padding: 7px 11px;
      border: 1px solid rgba(163, 202, 246, .28);
      border-radius: 13px;
      color: #f7fbff;
      background:
        linear-gradient(100deg, rgba(255,255,255,.08), transparent 58%),
        rgba(17, 54, 105, .92);
      box-shadow: inset 0 1px rgba(255,255,255,.08);
    }
    .circuit-notice-icon {
      width: 38px;
      height: 38px;
      display: grid;
      place-items: center;
      border-radius: 11px;
      color: var(--ink);
      background: var(--signal);
      box-shadow: 0 0 0 5px rgba(255,201,60,.08);
    }
    .circuit-notice-icon .icon {
      width: 20px;
      height: 20px;
      stroke-width: 2.2;
    }
    .circuit-notice-copy {
      min-width: 0;
    }
    .circuit-notice-copy small,
    .circuit-notice-copy b {
      display: block;
    }
    .circuit-notice-copy small {
      margin-bottom: 1px;
      color: #9fc5ef;
      font-size: 9px;
      font-weight: 850;
      letter-spacing: .08em;
    }
    .circuit-notice-bar .circuit-caption {
      position: static;
      max-width: none;
      padding: 0;
      border: 0;
      border-radius: 0;
      color: #fff;
      background: transparent;
      box-shadow: none;
      font-size: 14px;
      line-height: 1.35;
      white-space: normal;
      transition: color var(--fast);
    }
    .concept-board.live .circuit-notice-bar {
      border-color: rgba(90, 225, 173, .38);
      background:
        linear-gradient(100deg, rgba(72,208,164,.18), transparent 62%),
        rgba(13, 58, 68, .94);
    }
    .concept-board.live .circuit-notice-icon {
      background: #7be0b5;
    }
    .concept-board.live .circuit-notice-bar .circuit-caption {
      color: #c9ffea;
      background: transparent;
    }
    .circuit-click-cue {
      min-height: 32px;
      display: inline-flex;
      align-items: center;
      gap: 7px;
      padding: 5px 9px;
      border: 1px solid rgba(255,224,123,.36);
      border-radius: 9px;
      color: #ffe68e;
      background: rgba(255,201,60,.08);
      font-size: 10px;
      font-weight: 850;
      white-space: nowrap;
    }
    .circuit-click-cue > span {
      display: inline-flex;
      align-items: center;
      gap: 7px;
    }
    .circuit-click-cue i {
      width: 7px;
      height: 7px;
      border-radius: 50%;
      background: var(--signal);
      box-shadow: 0 0 0 0 rgba(255,201,60,.44);
      animation: clickCuePulse 1.7s ease-out infinite;
    }
    .circuit-click-cue > .cue-live,
    .concept-board.live .circuit-click-cue > .cue-open {
      display: none;
    }
    .concept-board.live .circuit-click-cue > .cue-live {
      display: inline-flex;
      color: #b9f8dd;
    }
    .concept-board.live .circuit-click-cue {
      border-color: rgba(123,224,181,.38);
      background: rgba(49,181,131,.1);
    }
    .concept-board.live .circuit-click-cue i {
      background: #76e3b7;
      box-shadow: 0 0 0 0 rgba(118,227,183,.4);
    }
    .physical-circuit-stage {
      min-height: 0;
      margin: auto;
    }
    .physical-toggle {
      transition: transform var(--fast), filter var(--fast);
    }
    .physical-toggle::before {
      content: "";
      position: absolute;
      inset: -9px;
      border: 2px solid rgba(255,201,60,.62);
      border-radius: 50%;
      pointer-events: none;
      animation: switchTargetPulse 1.8s ease-out infinite;
    }
    .physical-toggle:hover {
      filter: brightness(1.07);
      transform: translate(-50%, -50%) scale(1.08);
    }
    .physical-toggle:active {
      transform: translate(-50%, -50%) scale(.96);
    }
    .physical-toggle[aria-pressed="true"]::before {
      border-color: rgba(108,224,182,.72);
    }
    .stage-actions .primary.action {
      position: relative;
      overflow: hidden;
      animation: primaryBreath 3.2s ease-in-out infinite;
    }
    .stage-actions .primary.action::after {
      content: "";
      position: absolute;
      inset: -40% auto -40% -35%;
      width: 26%;
      transform: rotate(18deg);
      background: linear-gradient(90deg, transparent, rgba(255,255,255,.36), transparent);
      animation: actionSheen 3.8s ease-in-out infinite;
      pointer-events: none;
    }
    .stage-actions .primary.action .icon {
      transition: transform var(--fast);
    }
    .stage-actions .primary.action:hover .icon {
      transform: translateX(3px);
    }
    @keyframes principleButtonPulse {
      0%, 58%, 100% { opacity: 0; transform: scale(.96); }
      68% { opacity: .7; transform: scale(1); }
      84% { opacity: 0; transform: scale(1.08); }
    }
    @keyframes principleCardReveal {
      0%, 100% { box-shadow: var(--shadow); }
      35% { box-shadow: 0 0 0 5px rgba(255,201,60,.24), 0 22px 55px rgba(78,60,17,.18); }
    }
    @keyframes clickCuePulse {
      0% { box-shadow: 0 0 0 0 rgba(255,201,60,.44); }
      70%, 100% { box-shadow: 0 0 0 7px rgba(255,201,60,0); }
    }
    @keyframes switchTargetPulse {
      0% { opacity: .72; transform: scale(.9); }
      72%, 100% { opacity: 0; transform: scale(1.3); }
    }
    @keyframes primaryBreath {
      0%, 100% { box-shadow: 0 8px 18px rgba(47,72,190,.18); }
      50% { box-shadow: 0 10px 25px rgba(47,72,190,.3); }
    }
    @keyframes actionSheen {
      0%, 65% { left: -35%; opacity: 0; }
      74% { opacity: 1; }
      90%, 100% { left: 120%; opacity: 0; }
    }

    @media (max-width: 920px) {
      .circuit-notice-bar {
        grid-template-columns: 34px minmax(0, 1fr);
      }
      .circuit-notice-icon {
        width: 34px;
        height: 34px;
      }
      .circuit-click-cue {
        grid-column: 1 / -1;
        min-height: 28px;
        justify-self: end;
      }
    }

    @media (max-width: 430px) {
      .physical-circuit {
        padding: 8px;
      }
      .circuit-notice-bar {
        min-height: 50px;
        gap: 8px;
        padding: 6px 8px;
      }
      .circuit-notice-copy small {
        font-size: 8px;
      }
      .circuit-notice-bar .circuit-caption {
        font-size: 12px;
      }
      .circuit-click-cue {
        font-size: 9px;
      }
    }

    @media (max-width: 760px) {
      .stage-rail {
        min-height: calc(64px + var(--bottom-ui-gap));
        grid-template-columns: minmax(0, 1fr);
        padding: 4px 7px calc(4px + var(--bottom-ui-gap));
      }
      .stage-rail-track {
        display: grid;
        grid-template-columns: repeat(6, minmax(0, 1fr));
        gap: 4px;
        width: 100%;
        overflow: visible;
      }
      .stage-tab {
        width: 100%;
        min-width: 0;
        min-height: 54px;
        display: flex;
        flex: none;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2px;
        padding: 3px 2px;
        text-align: center;
      }
      .stage-thumb {
        width: 30px;
        height: 34px;
        margin: 0 auto;
        border-radius: 8px;
      }
      .stage-thumb .icon {
        width: 17px;
        height: 17px;
      }
      .stage-tab i {
        left: 3px;
        top: 3px;
        width: 15px;
        height: 15px;
        border-width: 1px;
        border-radius: 5px;
        font-size: 7px;
      }
      .stage-copy {
        width: 100%;
      }
      .stage-copy b {
        overflow: visible;
        font-size: 0;
        line-height: 1.2;
        text-overflow: clip;
        white-space: nowrap;
      }
      .stage-copy b::after {
        content: attr(data-short);
        font-size: 8.5px;
      }
      .stage-copy small {
        display: none;
      }
      .stage-tab.done::after {
        width: 11px;
        height: 11px;
        right: 3px;
        top: 3px;
        font-size: 7px;
      }
    }

    @media (min-width: 921px) {
      .stage-panel[data-stage-panel="story"].active {
        height: 100%;
        padding: 12px 16px 10px;
      }
      .story-grid {
        height: 100%;
        min-height: 0;
        gap: 14px;
      }
      .story-panel,
      .objective-panel {
        height: 100%;
        min-height: 0;
      }
      .story-panel {
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
      }
      .story-panel .story-scene {
        bottom: 82px;
      }
      .objective-panel {
        overflow-y: auto;
      }
      .field-note {
        display: flex;
        flex-direction: column;
      }
      .field-note .concept-points {
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: space-evenly;
      }
    }

    .story-heading {
      position: relative;
      z-index: 4;
      display: grid;
      grid-template-columns: auto auto minmax(150px, 1fr) auto;
      align-items: center;
      gap: 12px;
    }
    .story-heading .chapter-tag {
      padding: 6px 9px;
      font-size: 10px;
      white-space: nowrap;
    }
    .story-heading .chapter-tag .icon {
      width: 15px;
      height: 15px;
    }
    .story-panel .story-heading h2 {
      max-width: none;
      margin: 0;
      overflow: hidden;
      font-size: clamp(24px, 2.2vw, 32px);
      line-height: 1.12;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .story-panel .story-heading p {
      min-width: 0;
      max-width: none;
      margin: 0;
      overflow: hidden;
      font-size: 14px;
      line-height: 1.4;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .story-panel .story-brief-trigger {
      position: static;
      min-height: 46px;
      margin: 0;
      padding: 6px 9px 6px 7px;
    }
    .story-panel .story-brief-trigger i {
      width: 30px;
      height: 30px;
    }
    .story-panel .story-cta {
      display: flex;
      justify-content: flex-end;
      align-self: stretch;
      margin-top: auto;
      padding-bottom: 8px;
    }

    @media (max-width: 920px) {
      .story-heading {
        grid-template-columns: auto minmax(0, 1fr) auto;
        gap: 8px;
      }
      .story-heading .chapter-tag {
        grid-column: 1;
      }
      .story-panel .story-heading h2 {
        grid-column: 2;
        font-size: 21px;
      }
      .story-panel .story-heading p {
        display: none;
      }
      .story-panel .story-brief-trigger {
        grid-column: 3;
      }
    }

    @media (max-width: 430px) {
      .story-heading {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 7px;
      }
      .story-heading .chapter-tag {
        display: none;
      }
      .story-panel .story-heading h2 {
        grid-column: 1;
        font-size: 19px;
      }
      .story-panel .story-brief-trigger {
        grid-column: 2;
      }
    }

    /* Knowledge uses the story-task scene shell as the shared lesson layout. */
    .concept-board {
      position: relative;
      overflow: hidden;
      color: #fff;
      border: 0;
      background:
        radial-gradient(circle at 86% 16%, rgba(72,170,202,.24), transparent 34%),
        linear-gradient(145deg, #12356c, #1a4b88 62%, #147b8d);
      box-shadow: 0 28px 60px rgba(8, 24, 58, .22);
    }
    .concept-board::before {
      content: "";
      position: absolute;
      z-index: 0;
      width: 440px;
      height: 440px;
      right: -150px;
      top: -180px;
      border: 72px solid rgba(255,255,255,.05);
      border-radius: 50%;
      pointer-events: none;
    }
    .concept-board > * {
      position: relative;
      z-index: 1;
    }
    .concept-board .section-heading .eyebrow {
      padding: 6px 9px;
      border: 1px solid rgba(255,255,255,.18);
      border-radius: 9px;
      color: #ffe27a !important;
      background: rgba(6, 30, 68, .28);
      font-size: 10px;
      white-space: nowrap;
    }
    .concept-board .section-heading h2 {
      color: #fff;
    }
    .concept-board .section-heading p {
      color: #d9e7f5;
    }
    .concept-board .concept-principle-trigger {
      color: #edf6ff !important;
      border-color: rgba(255,255,255,.24) !important;
      background: rgba(255,255,255,.09) !important;
      box-shadow: inset 0 1px rgba(255,255,255,.08);
    }
    .concept-board .concept-principle-trigger:hover {
      color: #fff !important;
      border-color: rgba(255,226,122,.56) !important;
      background: rgba(255,226,122,.13) !important;
    }
    .concept-board .circuit-story.physical-circuit {
      border-color: rgba(165,206,247,.22);
      background:
        radial-gradient(circle at 72% 30%, rgba(255,255,255,.055), transparent 32%),
        rgba(4, 25, 60, .34);
      box-shadow: inset 0 1px rgba(255,255,255,.06);
    }
    .concept-board .stage-actions {
      gap: 18px;
    }
    .concept-board .stage-actions .primary.action {
      order: 2;
      margin-right: 0;
    }
    .concept-board .stage-actions .primary.action::after {
      background: linear-gradient(90deg, transparent, rgba(255,255,255,.5), transparent);
    }
    .concept-board .stage-actions .hint {
      order: 1;
      max-width: 44%;
      justify-content: flex-start;
      color: #c6d9ed;
      text-align: left;
    }
    .concept-board .stage-actions .hint .icon {
      color: #ffe27a;
    }

    @media (max-width: 920px) {
      .concept-board::before {
        width: 330px;
        height: 330px;
        right: -130px;
        top: -150px;
        border-width: 52px;
      }
      .concept-board .stage-actions .hint {
        max-width: 50%;
      }
    }

    @media (max-width: 430px) {
      .concept-board::before {
        width: 260px;
        height: 260px;
        border-width: 40px;
      }
      .concept-board .section-heading .eyebrow {
        padding: 4px 7px;
        font-size: 9px;
      }
      .concept-board .stage-actions {
        align-items: stretch;
      }
      .concept-board .stage-actions .primary.action {
        min-width: 154px;
      }
      .concept-board .stage-actions .hint {
        max-width: calc(100% - 160px);
        font-size: 12px;
      }
    }

    /* Level polish: one action dock pattern, readable task cards, level-aware copy. */
    .story-panel {
      display: flex;
      flex-direction: column;
    }
    .story-panel .story-cta {
      display: flex;
      align-items: flex-end;
      justify-content: space-between;
      gap: 20px;
      align-self: stretch;
      margin-top: auto;
      padding-top: 22px;
      padding-bottom: 8px;
    }
    .story-panel .story-heading p {
      display: -webkit-box;
      overflow: hidden;
      line-height: 1.4;
      white-space: normal;
      text-overflow: clip;
      -webkit-box-orient: vertical;
      -webkit-line-clamp: 2;
    }
    .story-cta-context {
      display: grid;
      gap: 3px;
      min-width: 0;
      color: #dbe8f7;
    }
    .story-cta-context small {
      color: #aebfd7;
      font-size: 10px;
      font-weight: 800;
      letter-spacing: .04em;
    }
    .story-cta-context b {
      font-size: 13px;
      line-height: 1.35;
    }
    .story-cta .primary {
      flex: none;
      white-space: nowrap;
    }
    .lesson-brief-trigger > i {
      display: grid;
      place-items: center;
    }
    .lesson-brief-trigger > i .icon {
      width: 19px;
      height: 19px;
      color: #153c76;
    }
    .story-panel .story-brief-trigger {
      min-width: 140px;
    }
    .parts-row {
      grid-template-columns: repeat(auto-fit, minmax(54px, 1fr));
    }
    .concept-board .stage-actions .primary.action {
      flex: none;
      white-space: nowrap;
    }
    .engineering-data {
      white-space: pre-wrap;
    }

    @media (min-width: 761px) {
      .objective-panel .story-note {
        padding-right: 118px;
      }
      .field-note {
        padding-bottom: 86px;
      }
      .field-note .concept-points {
        flex: 0 0 auto;
        justify-content: flex-start;
      }
    }

    @media (min-width: 761px) and (max-width: 1120px) {
      .story-heading {
        grid-template-columns: minmax(180px, auto) minmax(0, 1fr) auto;
      }
      .story-heading .chapter-tag {
        display: none;
      }
      .concept-board .section-heading p {
        display: -webkit-box;
        overflow: hidden;
        line-height: 1.4;
        white-space: normal;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
      }
    }

    @media (max-width: 760px) {
      .story-panel {
        min-height: 468px;
      }
      .story-heading {
        grid-template-columns: minmax(0, 1fr) auto;
      }
      .story-heading .chapter-tag {
        display: none;
      }
      .story-panel .story-heading h2 {
        grid-column: 1;
        grid-row: 1;
      }
      .story-panel .story-heading p {
        display: -webkit-box;
        grid-column: 1 / -1;
        grid-row: 2;
        margin-top: 9px;
        color: #dbe5f4;
        font-size: 14px;
        line-height: 1.55;
        white-space: normal;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
      }
      .story-panel .story-brief-trigger {
        grid-column: 2;
        grid-row: 1;
      }
      .story-panel .story-cta {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 10px;
        padding-top: 20px;
        padding-bottom: 2px;
      }
      .story-cta-context {
        gap: 2px;
      }
      .story-cta-context b {
        overflow: hidden;
        font-size: 12px;
        text-overflow: ellipsis;
        white-space: nowrap;
      }
      .story-cta .primary {
        width: 100%;
        min-height: 52px;
        justify-content: center;
      }
      .concept-board .stage-actions {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 9px;
        align-items: stretch;
      }
      .concept-board .stage-actions .hint {
        max-width: none;
        min-height: 18px;
        font-size: 12px;
      }
      .concept-board .stage-actions .primary.action {
        width: 100%;
        min-width: 0;
        min-height: 52px;
        justify-content: center;
      }
    }

    @media (max-width: 520px) {
      .story-panel .story-brief-trigger {
        width: 46px;
        min-width: 46px;
        min-height: 48px;
        flex-direction: column;
        gap: 1px;
        padding: 4px 0 3px;
      }
      .story-panel .story-brief-trigger > span {
        display: none;
      }
      .story-panel .story-brief-trigger > i {
        width: 24px;
        height: 24px;
      }
      .story-panel .story-brief-trigger > i .icon {
        width: 16px;
        height: 16px;
      }
      .story-panel .story-brief-trigger::after {
        content: "任务卡";
        color: #dce9fa;
        font-size: 7px;
        line-height: 1;
      }
    }

    @media (max-width: 430px) {
      .story-panel {
        min-height: 448px;
      }
      .concept-board .stage-actions .primary.action {
        min-width: 0;
      }
    }

    @media (max-width: 760px) and (max-height: 700px) {
      .story-panel {
        min-height: 392px;
      }
      .story-panel .story-heading p {
        display: none;
      }
      .concept-board {
        padding: 12px 12px 8px;
      }
      .concept-board .section-heading h2 {
        font-size: 22px;
      }
      .circuit-story {
        margin-top: 8px;
      }
      .circuit-notice-bar {
        min-height: 48px;
        padding: 6px 8px;
      }
      .circuit-notice-copy b {
        font-size: 12px;
      }
      .concept-board .stage-actions {
        margin-top: 7px;
        gap: 5px;
      }
      .concept-board .stage-actions .hint {
        display: none;
      }
      .concept-board .stage-actions .primary.action {
        min-height: 46px;
      }
    }
