:root {
    --five-green: #67f09a;
    --five-amber: #ffb45c;
    --five-ink: #07140f;
    --five-panel: rgba(7,24,18,.93);
    --five-line: rgba(103,240,154,.2);
}

body.course-theme-active {
    --five-green: var(--course-accent, #67f09a);
    --five-amber: color-mix(in srgb, var(--course-accent, #ffb45c) 66%, #ffcf5a);
    --five-panel: color-mix(in srgb, var(--course-accent, #67f09a) 13%, #071812);
    --five-line: color-mix(in srgb, var(--course-accent, #67f09a) 30%, transparent);
}

body.five-e-stage-active canvas { cursor: grab; }
body.five-e-stage-active canvas:active { cursor: grabbing; }

.pilot-entry {
    position: fixed;
    z-index: 1000002;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 20px;
    color: #3f352e;
    background: color-mix(in srgb, var(--course-soft, #fff0e8) 68%, #f8f6f0);
    font-family: "Bahnschrift SemiCondensed", "Microsoft YaHei UI", sans-serif;
}

.pilot-entry__card {
    box-sizing: border-box;
    width: min(680px, calc(100vw - 32px));
    padding: 22px 28px;
    border: 1px solid color-mix(in srgb, var(--five-green) 38%, white);
    border-radius: 7px 22px 22px 22px;
    background: #fff;
    box-shadow: 0 18px 44px color-mix(in srgb, var(--five-green) 12%, rgba(70,43,27,.14));
    animation: pilot-entry-in 360ms cubic-bezier(.2,.8,.2,1) both;
}

.pilot-entry__meta { display: flex; justify-content: space-between; gap: 16px; color: var(--five-green); font: 13px Consolas, monospace; letter-spacing: .12em; }
.pilot-entry__signal { display: flex; align-items: center; gap: 9px; margin-top: 18px; color: #665b53; font: 13px Consolas, monospace; }
.pilot-entry__signal i { width: 7px; height: 7px; border-radius: 50%; background: var(--five-green); box-shadow: 0 0 13px rgba(103,240,154,.75); }
.pilot-entry h1 { margin: 13px 0 10px; color: #2f2722; font-size: clamp(28px, 2.4vw, 36px); line-height: 1.18; letter-spacing: -.02em; }
.pilot-entry p { margin: 0; color: #665950; font-size: 16px; line-height: 1.6; }
.pilot-entry__objective { margin-top: 16px; padding: 12px 15px; border-left: 3px solid var(--five-amber); color: #4d423b; background: color-mix(in srgb, var(--five-green) 7%, white); font-size: 15px; line-height: 1.55; }
.pilot-entry__objective strong { display: block; margin-bottom: 5px; color: var(--five-amber); font: 12px Consolas, monospace; letter-spacing: .1em; }
.pilot-entry__route { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin-top: 15px; }
.pilot-entry__route span { padding: 10px 8px; border: 1px solid color-mix(in srgb, var(--five-green) 34%, white); border-radius: 7px; color: color-mix(in srgb, var(--five-green) 72%, #493a31); background: transparent; font-size: 13px; line-height: 1.35; text-align: center; white-space: nowrap; }
.pilot-entry__actions { display: grid; grid-template-columns: .8fr 1.2fr; gap: 8px; margin-top: 18px; }
.pilot-entry button,
.pilot-entry button.is-primary {
    padding: 13px 15px;
    border: 1px solid color-mix(in srgb, var(--five-green) 46%, white);
    border-radius: 8px;
    color: color-mix(in srgb, var(--five-green) 76%, #352a23);
    background: transparent;
    box-shadow: none;
    font-family: inherit;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.35;
    cursor: pointer;
    transition: border-color 160ms ease, color 160ms ease, background-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.pilot-entry button:hover,
.pilot-entry button.is-primary:hover {
    border-color: color-mix(in srgb, var(--five-green) 78%, #241b16);
    color: color-mix(in srgb, var(--five-green) 62%, #241b16);
    background: color-mix(in srgb, var(--five-green) 11%, white);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--five-green) 24%, transparent), 0 7px 16px color-mix(in srgb, var(--five-green) 15%, transparent);
    transform: translateY(-2px);
}

.pilot-entry button.is-primary:hover {
    background: color-mix(in srgb, var(--five-green) 18%, white);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--five-green) 58%, transparent), 0 0 0 2px color-mix(in srgb, var(--five-green) 28%, transparent), 0 8px 18px color-mix(in srgb, var(--five-green) 18%, transparent);
}

.pilot-entry button:active,
.pilot-entry button.is-primary:active {
    background: color-mix(in srgb, var(--five-green) 23%, white);
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--five-green) 35%, transparent);
    transform: translateY(0);
}

.pilot-entry button:focus-visible {
    outline: 2px solid color-mix(in srgb, var(--five-green) 68%, white);
    outline-offset: 3px;
}

@keyframes pilot-entry-in {
    from { opacity: 0; transform: translateY(22px) scale(.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

#fiveECourse.five-e-launch-shell .five-e-launch-status {
    top: 50% !important;
    right: auto !important;
    bottom: auto !important;
    left: 50% !important;
    width: min(430px, calc(100vw - 28px));
    transform: translate(-50%, -50%) !important;
}

.five-e-launch-shell {
    background: color-mix(in srgb, var(--course-soft, #fff0e8) 68%, #f8f6f0);
    pointer-events: auto;
}

.five-e-launch-shell .five-e-launch-status {
    border-color: color-mix(in srgb, var(--five-green) 38%, white);
    color: #3f352e;
    background: #fff;
    box-shadow: 0 18px 44px color-mix(in srgb, var(--five-green) 12%, rgba(70,43,27,.14));
    backdrop-filter: none;
}

.five-e-launch-shell .five-e-task__meta { color: var(--five-green); font-size: 13px; }
.five-e-launch-shell .five-e-task h2 { color: #2f2722; font-size: clamp(28px, 3vw, 38px); }
.five-e-launch-shell .five-e-task p { color: #665950; font-size: 16px; line-height: 1.75; }
.five-e-launch-shell .five-e-task__look { color: #4d423b; background: color-mix(in srgb, var(--five-green) 7%, white); }
.five-e-launch-shell .five-e-task__look strong { color: var(--five-green); }

.five-e-launch-shell .five-e-task button,
.five-e-launch-shell .five-e-task button.is-primary {
    border: 1px solid color-mix(in srgb, var(--five-green) 46%, white);
    color: color-mix(in srgb, var(--five-green) 76%, #352a23);
    background: transparent;
    box-shadow: none;
    font-size: 16px;
    font-weight: 500;
    text-align: center;
    transition: border-color 160ms ease, color 160ms ease;
}

.five-e-launch-shell .five-e-task button:hover,
.five-e-launch-shell .five-e-task button.is-primary:hover {
    border-color: color-mix(in srgb, var(--five-green) 88%, #33261f);
    color: color-mix(in srgb, var(--five-green) 88%, #241b16);
    background: transparent;
}

.five-e-launch-shell .five-e-mounting i { background: var(--five-green); }

.five-e-shell {
    position: fixed;
    z-index: 40;
    inset: 0;
    pointer-events: none;
    color: #e7fff0;
    font-family: "Bahnschrift SemiCondensed", "Microsoft YaHei UI", sans-serif;
}

.five-e-phases {
    position: absolute;
    top: 18px;
    left: 50%;
    display: flex;
    gap: 3px;
    padding: 5px;
    transform: translateX(-50%);
    border: 1px solid var(--five-line);
    border-radius: 999px;
    background: rgba(3,14,10,.82);
    backdrop-filter: blur(14px);
    pointer-events: auto;
}

.five-e-phases button {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    border: 0;
    border-radius: 999px;
    color: #789388;
    background: transparent;
    font-family: inherit;
    font-size: 12px;
    cursor: pointer;
    transition: color 140ms ease, background 140ms ease, transform 140ms ease;
}

.five-e-phases button:hover { color: #dff8e9; background: rgba(103,240,154,.1); transform: translateY(-1px); }
.five-e-phases button:focus-visible { outline: 2px solid var(--five-amber); outline-offset: 2px; }
.five-e-phases button b { font: 9px Consolas, monospace; opacity: .65; }
.five-e-phases .is-current { color: #06160e; background: var(--five-green); }
.five-e-phases .is-current:hover { color: #06160e; background: #87f5ac; }
.five-e-phases .is-complete { color: var(--five-green); }

.five-e-phases {
    transition: opacity .18s ease, transform .22s ease, visibility .18s ease;
}

.five-e-phases.is-auto-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translate(-50%, -140%);
}

.five-e-phase-sensor {
    position: fixed;
    z-index: 38;
    top: 0;
    left: 50%;
    width: min(220px, 42vw);
    height: 12px;
    padding: 0;
    transform: translateX(-50%);
    border: 0;
    border-radius: 0 0 999px 999px;
    background: color-mix(in srgb, var(--course-accent, #e76446) 48%, white);
    box-shadow: 0 4px 14px rgba(49, 39, 34, .12);
    opacity: .56;
    cursor: pointer;
    pointer-events: auto;
    transition: height .16s ease, opacity .16s ease;
}

.five-e-phase-sensor:hover,
.five-e-phase-sensor:focus-visible,
.five-e-phase-sensor.is-active {
    height: 16px;
    opacity: .92;
    outline: none;
}

.five-e-phase-sensor[hidden] {
    display: none !important;
}

.five-e-component-inspector[hidden] {
    display: none !important;
}

.five-e-evidence {
    position: absolute;
    top: 8px;
    left: 174px;
    display: grid;
    gap: 5px;
    width: 220px;
    padding: 10px 12px;
    border-left: 2px solid var(--five-green);
    background: linear-gradient(90deg, rgba(5,22,15,.88), rgba(5,22,15,0));
}

.five-e-evidence strong { color: var(--five-green); font: 10px Consolas, monospace; letter-spacing: .12em; }
.five-e-evidence span { color: #a5bcb0; font-size: 11px; }

.five-e-task,
.five-e-controls,
.five-e-display {
    pointer-events: auto;
    box-sizing: border-box;
    max-height: calc(100vh - 16px);
    overflow-y: auto;
    border: 1px solid var(--five-line);
    background:
        linear-gradient(135deg, var(--five-panel), rgba(4,16,12,.9)),
        radial-gradient(circle at top right, rgba(103,240,154,.1), transparent 42%);
    box-shadow: 0 24px 70px rgba(0,0,0,.42);
    backdrop-filter: blur(16px);
    cursor: default;
}

.five-e-panel { transition: box-shadow 160ms ease, width 160ms ease, padding 160ms ease; }
.five-e-panel.is-dragging {
    transition: none;
    box-shadow: 0 28px 86px rgba(0,0,0,.62), 0 0 0 1px rgba(103,240,154,.2);
    user-select: none;
    will-change: left, top;
}

.five-e-task__meta,
.five-e-controls header,
.five-e-display header {
    cursor: grab;
    touch-action: none;
    user-select: none;
}

.five-e-panel.is-dragging .five-e-task__meta,
.five-e-panel.is-dragging header { cursor: grabbing; }

.five-e-panel__collapse,
.five-e-task .five-e-panel__collapse,
.five-e-controls .five-e-panel__collapse,
.five-e-display .five-e-panel__collapse {
    flex: 0 0 24px;
    width: 24px;
    height: 22px;
    margin: -5px -5px -5px 4px;
    padding: 0;
    border: 1px solid rgba(103,240,154,.25);
    border-radius: 6px;
    color: var(--five-green);
    background: rgba(103,240,154,.06);
    font: 16px/20px Consolas, monospace;
    text-align: center;
    cursor: pointer;
}

.five-e-task.is-collapsed { width: 260px; padding: 13px 15px; }
.five-e-controls.is-collapsed { width: 270px; padding: 13px 15px; }
.five-e-display.is-collapsed { width: 250px; padding: 13px 15px; }
.five-e-task.is-collapsed > :not(.five-e-task__meta),
.five-e-controls.is-collapsed > :not(header),
.five-e-display.is-collapsed > :not(header) { display: none; }

.five-e-task {
    position: absolute;
    left: 174px;
    bottom: 22px;
    width: min(390px, calc(100vw - 196px));
    padding: 18px 20px;
    border-radius: 5px 18px 18px 18px;
}

.five-e-task__meta { display: flex; align-items: center; gap: 10px; color: var(--five-green); font: 10px Consolas, monospace; letter-spacing: .1em; }
.five-e-task__meta b { margin-left: auto; }
.five-e-task h2 { margin: 11px 0 8px; color: #f3fff7; font-size: 22px; line-height: 1.2; }
.five-e-task p { margin: 0; color: #a9beb3; font-size: 13px; line-height: 1.65; }
.five-e-task__look { margin-top: 12px; padding: 9px 11px; border-left: 2px solid var(--five-amber); color: #d7e5de; background: rgba(255,180,92,.06); font-size: 12px; }
.five-e-task__look strong { display: block; margin-bottom: 3px; color: var(--five-amber); font: 9px Consolas, monospace; letter-spacing: .12em; }
.five-e-task__actions { display: grid; gap: 7px; margin-top: 14px; }
.five-e-task__actions button[data-choice-id] { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.five-e-task__actions button[data-choice-id].is-selected { border-color: #fa5a43; background: rgba(250, 90, 67, .12); box-shadow: inset 4px 0 0 #fa5a43; }
.five-e-task__choice-marker { flex: none; padding: 3px 8px; border-radius: 999px; color: #fa5a43; background: rgba(250, 90, 67, .1); font-size: .72em; font-weight: 700; white-space: nowrap; }
.five-e-task button,
.five-e-controls button,
.five-e-display button { padding: 10px 12px; border: 1px solid rgba(103,240,154,.22); border-radius: 8px; color: #dff8e9; background: rgba(103,240,154,.06); text-align: left; cursor: pointer; }
.five-e-task button:hover,
.five-e-controls button:hover,
.five-e-display button:hover { border-color: var(--five-green); background: rgba(103,240,154,.12); }
.five-e-task button.is-primary { color: #062012; background: var(--five-green); text-align: center; font-weight: 700; }
.five-e-task__waiting { color: #7f9b8e; font: 10px Consolas, monospace; letter-spacing: .08em; }
.five-e-mounting { display: flex; gap: 6px; margin-top: 15px; }
.five-e-mounting i { width: 7px; height: 7px; border-radius: 50%; background: var(--five-green); animation: five-e-mounting 900ms ease-in-out infinite alternate; }
.five-e-mounting i:nth-child(2) { animation-delay: 160ms; }
.five-e-mounting i:nth-child(3) { animation-delay: 320ms; }
@keyframes five-e-mounting { to { opacity: .2; transform: translateY(-5px); } }

.five-e-task__progress { position: relative; height: 3px; margin-top: 12px; overflow: visible; border-radius: 999px; background: rgba(103,240,154,.1); }
.five-e-task__progress i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--five-green), var(--five-amber)); box-shadow: 0 0 12px rgba(103,240,154,.28); transition: width 280ms ease; }
.five-e-task__progress span { position: absolute; top: -13px; right: 0; color: #718d81; font: 8px Consolas, monospace; }

.five-e-briefing__signal { display: flex; align-items: center; gap: 8px; margin-top: 15px; color: #8aa598; font: 9px Consolas, monospace; letter-spacing: .08em; }
.five-e-briefing__signal i { width: 7px; height: 7px; border-radius: 50%; background: var(--five-green); box-shadow: 0 0 0 5px rgba(103,240,154,.08), 0 0 13px rgba(103,240,154,.72); animation: five-e-signal 1.6s ease-in-out infinite; }
.five-e-briefing__criteria { display: grid; gap: 7px; margin: 13px 0 0; padding: 0; list-style: none; }
.five-e-briefing__criteria li { color: #a9beb3; font-size: 11px; }
.five-e-briefing__criteria li::before { content: "◇"; margin-right: 8px; color: var(--five-amber); }

#fiveECourse.five-e-shell.is-briefing .five-e-task:not([data-user-positioned="true"]) { top: 50% !important; right: auto !important; bottom: auto !important; left: 50% !important; width: min(440px, calc(100vw - 28px)); transform: translate(-50%, -50%) !important; animation: five-e-brief-enter 420ms cubic-bezier(.2,.8,.2,1) both; }
.five-e-shell.is-briefing .five-e-evidence,
.five-e-shell.is-briefing .five-e-display { opacity: .28; }

.five-e-calibration { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 13px; }
.five-e-calibration span { display: grid; gap: 3px; padding: 8px 5px; border: 1px solid rgba(255,255,255,.09); border-radius: 7px; color: #657e72; background: rgba(255,255,255,.025); text-align: center; }
.five-e-calibration b { font: 9px Consolas, monospace; letter-spacing: .08em; }
.five-e-calibration small { font-size: 8px; }
.five-e-calibration .is-current { color: var(--five-amber); border-color: rgba(255,180,92,.5); background: rgba(255,180,92,.07); }
.five-e-calibration .is-complete { color: #052013; border-color: var(--five-green); background: var(--five-green); }

.five-e-completion__summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 13px; }
.five-e-completion__summary span { display: grid; gap: 2px; padding: 8px 4px; border: 1px solid var(--five-line); border-radius: 7px; color: #789388; font-size: 9px; text-align: center; }
.five-e-completion__summary b { color: var(--five-green); font: 15px Consolas, monospace; }
.five-e-completion__actions { grid-template-columns: 1fr 1fr; }
.five-e-completion__actions .is-primary { grid-column: auto; }
.five-e-completion__replay-note {
    margin: 6px 0 0;
    color: var(--five-muted, #786d66);
    font: 500 11px/1.45 "Microsoft YaHei UI", sans-serif;
    text-align: center;
}
.five-e-shell.is-free-explore .five-e-phases,
.five-e-shell.is-free-explore .five-e-evidence { opacity: .28; }

.five-e-shell.is-replay .five-e-controls,
.five-e-shell.is-replay .five-e-display { pointer-events: none; }
body.five-e-replay-mode > canvas { pointer-events: none !important; }
.five-e-shell.is-replay .five-e-task {
    box-shadow: 0 20px 52px color-mix(in srgb, var(--course-accent, #5e8fe5) 18%, transparent),
        0 0 0 2px color-mix(in srgb, var(--course-accent, #5e8fe5) 20%, transparent);
}
.five-e-task__toolbar > .five-e-replay__status {
    grid-column: 2;
    justify-self: center;
    color: var(--course-accent, var(--five-green));
    font: 700 12px/1.2 "Microsoft YaHei UI", sans-serif;
    letter-spacing: 0;
}
.five-e-task__toolbar > .five-e-replay__counter {
    grid-column: 3;
    justify-self: end;
    margin-left: 0;
    color: var(--course-accent, var(--five-green));
    font: 700 12px/1.2 Consolas, monospace;
    letter-spacing: 0;
}
.five-e-replay__controls {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
    margin-top: 14px;
    pointer-events: auto;
}
.five-e-task .five-e-replay__controls button { text-align: center; }
.five-e-replay__controls label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 38px;
    color: var(--five-muted, #786d66);
    font-size: 12px;
}
.five-e-replay__controls select {
    padding: 5px 7px;
    border: 1px solid color-mix(in srgb, var(--course-accent, #5e8fe5) 36%, white);
    border-radius: 7px;
    color: var(--five-ink, #302b28);
    background: white;
    font: 600 12px/1.2 Consolas, monospace;
}
.five-e-replay__controls [data-replay-action="exit"] { grid-column: span 2; }

@keyframes five-e-signal { 50% { opacity: .45; transform: scale(.82); } }
@keyframes five-e-brief-enter {
    from { opacity: 0; transform: translate(-50%, calc(50% + 24px)) scale(.97); }
    to { opacity: 1; transform: translate(-50%, 50%) scale(1); }
}

.five-e-controls {
    position: absolute;
    right: 22px;
    bottom: 22px;
    display: none;
    width: 320px;
    padding: 16px;
    border-radius: 16px 5px 16px 16px;
}

.five-e-controls.is-visible { display: grid; gap: 13px; }
.five-e-controls header { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--five-green); font: 9px Consolas, monospace; letter-spacing: .08em; }
.five-e-controls header b { margin-left: auto; color: #759287; font-weight: 400; text-align: right; }
.five-e-controls label { display: grid; gap: 7px; }
.five-e-controls label span { display: flex; justify-content: space-between; color: #b9cec3; font-size: 11px; }
.five-e-controls output { color: var(--five-amber); font: 11px Consolas, monospace; }
.five-e-controls input { width: 100%; accent-color: var(--five-green); cursor: ew-resize; }
.five-e-controls__motion { padding: 9px 10px; border: 1px dashed rgba(255,180,92,.35); border-radius: 8px; color: #e0c49e; font-size: 11px; }

.five-e-display {
    position: absolute;
    top: 50%;
    right: 22px;
    display: grid;
    gap: 10px;
    width: 280px;
    padding: 15px 16px;
    border-radius: 16px 5px 16px 16px;
    transform: translateY(-50%);
}
.five-e-display header { display: flex; align-items: center; gap: 10px; color: var(--five-green); font: 9px Consolas, monospace; letter-spacing: .08em; }
.five-e-display header b { margin-left: auto; color: #759287; font-weight: 400; }
.five-e-display__toggle { position: relative; display: flex; align-items: center; gap: 10px; cursor: pointer; }
.five-e-display__toggle input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.five-e-display__toggle span { display: grid; gap: 2px; flex: 1; }
.five-e-display__toggle strong { color: #dff8e9; font-size: 12px; font-weight: 500; }
.five-e-display__toggle small { color: #789388; font-size: 10px; }
.five-e-display__toggle i { position: relative; width: 36px; height: 19px; border: 1px solid rgba(103,240,154,.28); border-radius: 999px; background: rgba(3,14,10,.8); }
.five-e-display__toggle i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 11px; height: 11px; border-radius: 50%; background: #6f887c; transition: 150ms ease; }
.five-e-display__toggle input:checked + span + i { border-color: var(--five-green); background: rgba(103,240,154,.18); }
.five-e-display__toggle input:checked + span + i::after { left: 20px; background: var(--five-green); box-shadow: 0 0 10px rgba(103,240,154,.5); }
.five-e-display__toggle input:focus-visible + span + i { outline: 2px solid var(--five-amber); outline-offset: 2px; }
.five-e-display__toggle input:disabled + span { opacity: .45; }
.five-e-display__toggle:has(input:disabled) { cursor: not-allowed; }
.five-e-display__modes { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.five-e-display__modes button { padding: 8px 7px; font-size: 10px; text-align: center; }
.five-e-display__modes button.is-active { border-color: var(--five-amber); color: #ffe1b8; background: rgba(255,180,92,.12); }
.five-e-display__modes button:disabled { opacity: .4; cursor: not-allowed; }
.five-e-display__vector { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.five-e-display__vector span { display: grid; gap: 3px; padding: 6px; border: 1px solid rgba(103,240,154,.12); border-radius: 6px; color: #789388; font: 9px Consolas, monospace; text-align: center; }
.five-e-display__vector output { color: var(--five-green); font: 10px Consolas, monospace; }
.five-e-display__status { padding-top: 8px; border-top: 1px solid var(--five-line); color: var(--five-amber); font: 10px Consolas, monospace; }

.five-e-focus {
    position: absolute;
    display: none;
    width: 22px;
    height: 22px;
    transform: translate(-50%,-50%);
    border: 2px solid var(--five-green);
    border-radius: 50%;
    box-shadow: 0 0 0 8px rgba(103,240,154,.08), 0 0 24px rgba(103,240,154,.5);
}

.five-e-focus.is-visible { display: block; }
.five-e-focus span { position: absolute; top: -24px; left: 10px; width: max-content; color: var(--five-green); font: 9px Consolas, monospace; }

.five-e-feedback {
    position: fixed;
    z-index: 65;
    top: max(28px, calc(env(safe-area-inset-top) + 28px));
    left: 50%;
    display: grid;
    grid-template-columns: 26px minmax(0, 1fr);
    align-items: start;
    column-gap: 9px;
    width: min(620px, calc(100vw - 32px));
    max-height: min(34vh, 280px);
    padding: 14px 16px 16px;
    overflow-x: hidden;
    overflow-y: auto;
    box-sizing: border-box;
    transform: translate(-50%, calc(-100% - 24px));
    border: 1px solid var(--five-line);
    border-top: 4px solid var(--course-accent, var(--five-green));
    border-radius: 14px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    color: #dff8e9;
    background: rgba(4,18,13,.94);
    box-shadow: 0 18px 48px rgba(53,67,84,.24);
    overscroll-behavior: contain;
    scrollbar-gutter: stable both-edges;
    transition: opacity 180ms ease, transform 220ms ease, visibility 180ms ease;
}

.five-e-feedback header { grid-column: 1; display: block; margin: 0; padding: 1px 0 0; }
.five-e-feedback header strong {
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border: 1px solid color-mix(in srgb,var(--course-accent,var(--five-green)) 42%,white);
    border-radius: 50%;
    color: var(--course-accent, var(--five-green));
    background: color-mix(in srgb,var(--course-accent,var(--five-green)) 8%,white);
    font: 800 14px/1 "Microsoft YaHei UI",sans-serif;
}
.five-e-feedback header button { display: grid; place-items: center; width: 30px; height: 30px; flex: 0 0 30px; padding: 0; border: 1px solid color-mix(in srgb,var(--course-accent,var(--five-green)) 34%,white); border-radius: 50%; color: var(--course-accent,var(--five-green)); background: transparent; font: 600 20px/1 "Microsoft YaHei UI",sans-serif; cursor: pointer; }
.five-e-feedback header button:hover,
.five-e-feedback header button:focus-visible { color: #fff; background: var(--course-accent,var(--five-green)); outline: none; }
.five-e-feedback__message { grid-column: 2; min-width: 0; margin: 0; color: inherit; font-size: 14px; line-height: 1.7; text-align: justify; text-justify: inter-ideograph; }
.five-e-feedback.is-visible { opacity: 1; visibility: visible; pointer-events: auto; transform: translate(-50%,0); }
.five-e-feedback.is-guidance { border-color: rgba(255,180,92,.45); }

.five-e-feedback.is-conclusion {
    width: min(680px, calc(100vw - 32px));
    max-height: min(68vh, 520px);
    padding: 14px 16px 16px;
    border-radius: 16px;
    color: var(--five-ink);
    background: linear-gradient(145deg, rgba(255,255,255,.99), rgba(255,248,244,.98));
    box-shadow: 0 16px 42px rgba(36,42,50,.22);
}
.five-e-feedback.is-conclusion header {
    margin: 0;
    padding: 1px 0 0;
    border: 0;
}
.five-e-feedback.is-conclusion header strong { font-size: 14px; letter-spacing: 0; }
.five-e-feedback.is-conclusion .five-e-feedback__message { font-size: 13px; line-height: 1.65; }
.five-e-feedback__conclusions { display: grid; gap: 8px; margin: 0; }
.five-e-feedback__conclusion {
    display: grid;
    grid-template-columns: 132px minmax(0,1fr);
    gap: 14px;
    align-items: start;
    margin: 0;
    padding: 10px 14px;
    border: 1px solid color-mix(in srgb,var(--course-accent,var(--five-green)) 14%,white);
    border-radius: 10px;
    background: rgba(255,255,255,.72);
}
.five-e-feedback__conclusion dt { min-width: 0; margin: 0; color: var(--course-accent,var(--five-green)); font-weight: 700; line-height: 1.65; white-space: nowrap; }
.five-e-feedback__conclusion dd { min-width: 0; margin: 0; color: #4e5e59; line-height: 1.65; text-align: left; }
.five-e-feedback__summary {
    display: grid;
    grid-template-columns: 132px minmax(0,1fr);
    gap: 14px;
    align-items: start;
    margin-top: 8px;
    padding: 10px 14px;
    border-left: 3px solid var(--course-accent,var(--five-green));
    border-radius: 0 10px 10px 0;
    background: color-mix(in srgb,var(--course-accent,var(--five-green)) 8%,white);
}
.five-e-feedback__summary strong { color: var(--course-accent,var(--five-green)); line-height: 1.65; white-space: nowrap; }
.five-e-feedback__summary p { min-width: 0; margin: 0; color: #3f514b; line-height: 1.65; text-align: left; }
.five-e-feedback-sensor {
    position: fixed;
    z-index: 64;
    top: max(0px, env(safe-area-inset-top));
    left: 50%;
    min-width: 112px;
    height: 22px;
    padding: 2px 18px 4px;
    transform: translateX(-50%);
    border: 1px solid color-mix(in srgb,var(--course-accent,var(--five-green)) 44%,white);
    border-top: 0;
    border-radius: 0 0 12px 12px;
    color: var(--course-accent,var(--five-green));
    background: rgba(255,255,255,.96);
    box-shadow: 0 7px 18px rgba(53,67,84,.16);
    font: 700 11px/1.2 "Microsoft YaHei UI",sans-serif;
    pointer-events: auto;
    cursor: pointer;
    transition: opacity 140ms ease, transform 140ms ease, visibility 140ms ease;
}
.five-e-feedback-sensor[hidden] { display: none; }
.five-e-feedback-sensor.is-feedback-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    color: #fff;
    background: var(--course-accent,var(--five-green));
    transform: translateX(-50%);
}

/* Keep the course-completion task compact; its content scrolls inside the panel. */
.five-e-task.is-completion,
.five-e-task:has(.five-e-completion__actions) {
    box-sizing: border-box;
    min-height: 360px;
    height: min(720px, calc(100dvh - 160px));
    max-height: calc(100dvh - 24px) !important;
    overflow-x: hidden !important;
    overflow-y: scroll !important;
    overscroll-behavior: contain;
    scrollbar-gutter: stable both-edges;
    scrollbar-color: var(--course-accent, #f65a43) #f8ebe6;
    scrollbar-width: auto;
}

.five-e-task.is-completion::-webkit-scrollbar,
.five-e-task:has(.five-e-completion__actions)::-webkit-scrollbar {
    width: 10px;
}

.five-e-task.is-completion::-webkit-scrollbar-track,
.five-e-task:has(.five-e-completion__actions)::-webkit-scrollbar-track {
    background: #f8ebe6;
    border-radius: 999px;
}

.five-e-task.is-completion::-webkit-scrollbar-thumb,
.five-e-task:has(.five-e-completion__actions)::-webkit-scrollbar-thumb {
    min-height: 48px;
    background: var(--course-accent, #f65a43);
    border: 2px solid #f8ebe6;
    border-radius: 999px;
}

.five-e-task.is-completion .five-e-completion__actions,
.five-e-task:has(.five-e-completion__actions) .five-e-completion__actions {
    position: sticky;
    bottom: 12px;
    z-index: 3;
    gap: 8px;
    margin: 6px 0 0 !important;
    padding: 6px 0 4px;
    background: linear-gradient(180deg, rgba(255, 250, 247, 0) 0, #fffaf7 8px) !important;
}

.five-e-task.is-completion .five-e-completion__actions button,
.five-e-task:has(.five-e-completion__actions) .five-e-completion__actions button {
    min-height: 40px;
    padding: 6px 12px;
    color: var(--course-accent, #f65a43) !important;
    background: #fffaf7 !important;
    border-color: var(--course-accent, #f65a43) !important;
    box-shadow: none !important;
}

.five-e-task.is-completion .five-e-completion__actions button.is-primary,
.five-e-task:has(.five-e-completion__actions) .five-e-completion__actions button.is-primary {
    color: #fff !important;
    background: var(--course-accent, #f65a43) !important;
}

@media (max-width: 720px) {
    .five-e-task.is-completion,
    .five-e-task:has(.five-e-completion__actions) {
        min-height: 320px;
        height: 70dvh;
        max-height: calc(100dvh - 20px) !important;
    }
}

/* Keep the hover target stable while the feedback card opens. The sensor must
   never be covered by the card, otherwise pointerenter/pointerleave oscillate. */
.five-e-feedback-sensor,
.five-e-feedback-sensor.is-feedback-open {
    position: fixed;
    top: max(12px, calc(env(safe-area-inset-top) + 12px));
    left: 50%;
    z-index: 3202;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%);
}

.five-e-feedback {
    top: max(64px, calc(env(safe-area-inset-top) + 64px));
    z-index: 3201;
}
.five-e-feedback-sensor.is-guidance { color: #a66a16; border-color: rgba(255,180,92,.55); }
.five-e-feedback-sensor:hover,
.five-e-feedback-sensor:focus-visible { outline: none; transform: translateX(-50%) translateY(2px); }

@media (max-width: 820px) {
    .five-e-feedback { top: max(8px, env(safe-area-inset-top)); width: calc(100vw - 20px); max-height: 40vh; padding: 12px 14px 14px; }
    .five-e-feedback__message { font-size: 13px; }
    .five-e-feedback.is-conclusion { width: calc(100vw - 20px); max-height: 52vh; padding: 10px 12px 12px; }
    .five-e-feedback__conclusion,
    .five-e-feedback__summary { grid-template-columns: 1fr; gap: 2px; }
    .five-e-feedback__conclusion dt,
    .five-e-feedback__summary strong { white-space: normal; }
}

@media (max-width: 820px) and (pointer: fine) {
    .five-e-task__meta {
        cursor: grab;
        touch-action: none;
    }

    .five-e-panel.is-dragging .five-e-task__meta { cursor: grabbing; }
}

@media (max-width: 820px) {
    .pilot-entry__card { padding: 20px; }
    .pilot-entry__meta { font-size: 11px; }
    .pilot-entry__signal { font-size: 12px; }
    .pilot-entry h1 { font-size: 28px; }
    .pilot-entry p { font-size: 15px; }
    .pilot-entry__objective { font-size: 14px; }
    .pilot-entry__route span { font-size: 13px; }
    .pilot-entry button { font-size: 15px; }
    .pilot-entry__actions { grid-template-columns: 1fr; }
    .five-e-phases { top: 8px; width: calc(100vw - 20px); justify-content: center; overflow: hidden; }
    .five-e-phases button { padding: 6px 8px; font-size: 10px; }
    .five-e-phases button b { display: none; }
    .five-e-evidence { display: none; }
    .five-e-task { right: 10px; bottom: 10px; left: 10px; width: auto; max-height: 42vh; overflow-y: auto; }
    .five-e-controls { top: 58px; right: 10px; bottom: auto; width: min(300px, calc(100vw - 20px)); }
    .five-e-display { top: 58px; right: 10px; width: min(280px, calc(100vw - 20px)); transform: none; }
    .five-e-task h2 { font-size: 18px; }
    .five-e-task__meta,
    .five-e-controls header { cursor: default; touch-action: auto; }
    .five-e-task.is-collapsed { right: auto; bottom: 10px; left: 10px; width: min(260px, calc(100vw - 20px)); }
    .five-e-controls.is-collapsed { top: 58px; right: 10px; left: auto; width: min(270px, calc(100vw - 20px)); }
    .five-e-display.is-collapsed { top: 58px; right: 10px; left: auto; width: min(250px, calc(100vw - 20px)); }
    .five-e-shell.is-briefing .five-e-task { right: auto; bottom: 50%; left: 50%; width: calc(100vw - 20px); max-height: calc(100vh - 116px); }
}

/* Course-card visual language: bright surfaces, themed outlines and calm type. */
body.course-theme-active {
    --five-surface: color-mix(in srgb, var(--course-soft, #edf4ff) 42%, white);
    --five-surface-strong: color-mix(in srgb, var(--course-soft, #edf4ff) 18%, white);
    --five-ink: #302b28;
    --five-muted: #6d655f;
    --five-soft-ink: #8a817a;
}

.five-e-shell {
    color: var(--five-ink);
    font-family: "Microsoft YaHei UI", "PingFang SC", "Noto Sans CJK SC", sans-serif;
}

.five-e-task,
.five-e-controls,
.five-e-display {
    border-color: color-mix(in srgb, var(--course-accent, #5e8fe5) 42%, white);
    color: var(--five-ink);
    background: linear-gradient(145deg, rgba(255,255,255,.97), var(--five-surface));
    box-shadow: 0 20px 52px rgba(53, 67, 84, .18), 0 0 0 1px rgba(255,255,255,.7) inset;
    backdrop-filter: none;
}

.five-e-task__meta,
.five-e-controls header,
.five-e-display header {
    color: var(--course-accent, #5e8fe5);
    font-family: "Microsoft YaHei UI", "PingFang SC", sans-serif;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .08em;
}

.five-e-task h2 { color: var(--five-ink); font-size: 24px; font-weight: 700; }
.five-e-task p { color: var(--five-muted); font-size: 15px; line-height: 1.75; }
.five-e-task > p,
.five-e-task__look,
.five-e-task__look p,
.five-e-briefing__criteria li {
    text-align: justify;
    text-justify: inter-ideograph;
}
.five-e-task__look {
    color: var(--five-ink);
    border-left-color: var(--course-accent, #5e8fe5);
    background: color-mix(in srgb, var(--course-soft, #edf4ff) 55%, white);
    font-size: 14px;
    line-height: 1.65;
}
.five-e-task__look strong { color: var(--course-accent, #5e8fe5); font-family: inherit; font-size: 12px; }
.five-e-task__waiting { color: var(--five-muted); font-family: inherit; font-size: 12px; }
.five-e-task__progress { background: color-mix(in srgb, var(--course-accent, #5e8fe5) 13%, white); }
.five-e-task__progress i { background: var(--course-accent, #5e8fe5); box-shadow: none; }
.five-e-task__progress span { color: var(--five-soft-ink); font: 10px/1.2 "Microsoft YaHei UI", sans-serif; }

.five-e-task button,
.five-e-controls button,
.five-e-display button {
    border-color: color-mix(in srgb, var(--course-accent, #5e8fe5) 42%, white);
    color: color-mix(in srgb, var(--course-accent, #5e8fe5) 78%, #322b27);
    background: transparent;
    font-family: inherit;
    font-size: 14px;
}
.five-e-task button:hover,
.five-e-controls button:hover,
.five-e-display button:hover {
    border-color: var(--course-accent, #5e8fe5);
    color: var(--course-accent, #5e8fe5);
    background: color-mix(in srgb, var(--course-soft, #edf4ff) 44%, transparent);
}
.five-e-task button.is-primary {
    border-color: var(--course-accent, #5e8fe5);
    color: var(--course-accent, #5e8fe5);
    background: transparent;
}

.five-e-panel__collapse,
.five-e-task .five-e-panel__collapse,
.five-e-controls .five-e-panel__collapse,
.five-e-display .five-e-panel__collapse {
    border-color: color-mix(in srgb, var(--course-accent, #5e8fe5) 42%, white);
    color: var(--course-accent, #5e8fe5);
    background: transparent;
}

.five-e-phases {
    gap: 5px;
    padding: 6px;
    border-color: color-mix(in srgb, var(--course-accent, #5e8fe5) 38%, white);
    background: rgba(255,255,255,.95);
    box-shadow: 0 12px 34px rgba(53, 67, 84, .15);
    backdrop-filter: none;
}
.five-e-phases button {
    gap: 7px;
    padding: 9px 14px;
    color: var(--five-muted);
    font-family: "Microsoft YaHei UI", "PingFang SC", "Noto Sans CJK SC", sans-serif;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.35;
}
.five-e-phases button b { font: 11px/1.2 "Cascadia Mono", Consolas, monospace; }
.five-e-phases button:hover {
    color: var(--course-accent, #5e8fe5);
    background: var(--five-surface);
}
.five-e-phases .is-current,
.five-e-phases .is-current:hover {
    color: var(--course-accent, #5e8fe5);
    background: var(--five-surface);
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--course-accent, #5e8fe5) 38%, white) inset;
}
.five-e-phases .is-complete { color: var(--course-accent, #5e8fe5); }

.five-e-map-return {
    position: fixed;
    top: 18px;
    right: 76px;
    left: auto;
    z-index: 10049;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 0 15px;
    border: 1px solid color-mix(in srgb, var(--course-accent, #5e8fe5) 42%, white);
    border-radius: 999px;
    color: color-mix(in srgb, var(--course-accent, #5e8fe5) 82%, #322b27);
    background: rgba(255,255,255,.94);
    box-shadow: 0 10px 28px rgba(53,67,84,.14);
    font-family: "Microsoft YaHei UI", "PingFang SC", sans-serif;
    cursor: pointer;
    pointer-events: auto;
}
.five-e-map-return span { font: 19px/1 "Cascadia Mono", Consolas, monospace; }
.five-e-map-return strong { font-size: 14px; font-weight: 650; }
.five-e-map-return:hover,
.five-e-map-return:focus-visible {
    border-color: var(--course-accent, #5e8fe5);
    color: #fff;
    background: var(--course-accent, #5e8fe5);
    outline: none;
}

.five-e-component-inspector {
    position: fixed;
    top: 4px;
    left: 18px;
    z-index: 41;
    width: min(320px, calc(100vw - 44px));
    max-height: min(56vh, 560px);
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--course-accent, #5e8fe5) 34%, white);
    border-radius: 14px;
    color: var(--five-ink);
    background: rgba(255,255,255,.95);
    box-shadow: 0 14px 38px rgba(53,67,84,.16);
    font-family: "Microsoft YaHei UI", "PingFang SC", sans-serif;
    pointer-events: auto;
    transition: width 180ms ease, max-height 220ms ease, box-shadow 180ms ease;
}
.five-e-component-inspector:hover,
.five-e-component-inspector:focus-within {
    box-shadow: 0 18px 46px rgba(53,67,84,.22);
}
.five-e-component-inspector__header {
    display: grid;
    grid-template-columns: 16px minmax(0,1fr) auto 18px;
    align-items: center;
    gap: 8px;
    width: 100%;
    min-height: 42px;
    padding: 0 12px;
    border: 0;
    color: inherit;
    background: transparent;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
}
.five-e-component-inspector__header:focus-visible {
    outline: 2px solid var(--course-accent, #5e8fe5);
    outline-offset: -2px;
}
.five-e-component-inspector__header strong {
    overflow: hidden;
    color: color-mix(in srgb, var(--course-accent, #5e8fe5) 82%, #322b27);
    font-size: 13px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.five-e-component-inspector__header small {
    color: var(--five-muted);
    font: 10px/1.2 "Cascadia Mono", Consolas, monospace;
    white-space: nowrap;
}
.five-e-component-inspector__header i {
    color: var(--course-accent, #5e8fe5);
    font: 16px/1 "Cascadia Mono", Consolas, monospace;
    font-style: normal;
    text-align: center;
}
.five-e-component-inspector__icon {
    width: 12px;
    height: 12px;
    border: 1px solid var(--course-accent, #5e8fe5);
    border-radius: 3px;
    box-shadow: 3px -3px 0 color-mix(in srgb, var(--course-accent, #5e8fe5) 25%, transparent);
}
.five-e-component-inspector__body {
    max-height: calc(min(56vh, 560px) - 43px);
    overflow: auto;
    border-top: 1px solid color-mix(in srgb, var(--course-accent, #5e8fe5) 18%, white);
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: color-mix(in srgb, var(--course-accent, #5e8fe5) 42%, white) transparent;
}
.five-e-component-inspector ol {
    display: grid;
    gap: 2px;
    margin: 0;
    padding: 7px;
    list-style: none;
}
.five-e-component-inspector li {
    display: grid;
    grid-template-columns: 24px minmax(0,1fr);
    align-items: center;
    column-gap: 7px;
    row-gap: 2px;
    min-height: 40px;
    padding: 5px 7px;
    border-radius: 7px;
    cursor: pointer;
}
.five-e-component-inspector li:hover,
.five-e-component-inspector li:focus-visible {
    background: color-mix(in srgb, var(--course-soft, #edf4ff) 78%, white);
    outline: none;
}
.five-e-component-inspector li.is-selected {
    color: color-mix(in srgb, var(--course-accent, #5e8fe5) 84%, #322b27);
    background: color-mix(in srgb, var(--course-soft, #edf4ff) 70%, white);
    box-shadow: inset 3px 0 0 var(--course-accent, #5e8fe5);
}
.five-e-component-inspector li b {
    grid-row: 1 / span 2;
    color: var(--course-accent, #5e8fe5);
    font: 10px/1.2 "Cascadia Mono", Consolas, monospace;
}
.five-e-component-inspector li span {
    overflow: hidden;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.five-e-component-inspector li small {
    grid-column: 2;
    color: var(--five-muted);
    font: 9px/1.2 "Cascadia Mono", Consolas, monospace;
    white-space: nowrap;
}
.five-e-component-inspector li.is-empty {
    display: block;
    padding: 14px 8px;
    color: var(--five-muted);
    font-size: 12px;
    text-align: center;
}
.five-e-component-inspector.is-collapsed {
    width: 188px;
    max-height: 42px;
}
.five-e-component-inspector.is-collapsed .five-e-component-inspector__body {
    display: none;
}

.five-e-map-return,
.five-e-component-inspector.is-collapsed {
    box-sizing: border-box;
    height: 44px;
    min-height: 44px;
    max-height: 44px;
    border-radius: 999px;
}

.five-e-map-return {
    top: 18px;
    padding-top: 0;
    padding-bottom: 0;
}

.five-e-component-inspector.is-collapsed .five-e-component-inspector__header {
    box-sizing: border-box;
    height: 100%;
    min-height: 0;
    padding: 0 14px;
    border-radius: inherit;
}

.five-e-component-tooltip {
    position: fixed;
    z-index: 48;
    display: grid;
    gap: 3px;
    min-width: 120px;
    max-width: 280px;
    padding: 8px 11px;
    border: 1px solid color-mix(in srgb, var(--course-accent, #e8694a) 52%, white);
    border-radius: 9px;
    color: var(--five-ink);
    background: rgba(255,255,255,.97);
    box-shadow: 0 12px 30px rgba(53,67,84,.2);
    font-family: "Microsoft YaHei UI", "PingFang SC", sans-serif;
    pointer-events: none;
    transform: translate(-50%, calc(-100% - 60px));
}
.five-e-component-tooltip[hidden] { display: none; }
.five-e-component-tooltip[data-mode="hover"] {
    z-index: 3200;
    width: max-content;
    min-width: 180px;
    max-width: min(320px, calc(100vw - 20px));
    transform: none;
}
.five-e-component-tooltip[data-mode="hover"]::before,
.five-e-component-tooltip[data-mode="hover"]::after { display: none; }
.five-e-component-tooltip::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 100%;
    width: 1px;
    height: 50px;
    background: color-mix(in srgb, var(--course-accent, #e8694a) 62%, transparent);
    transform: translateX(-50%);
}
.five-e-component-tooltip::after {
    content: "";
    position: absolute;
    left: 50%;
    top: calc(100% + 47px);
    width: 7px;
    height: 7px;
    border: 2px solid rgba(255,255,255,.94);
    border-radius: 50%;
    background: var(--course-accent, #e8694a);
    box-shadow: 0 2px 7px rgba(53,67,84,.22);
    transform: translateX(-50%);
}
.five-e-component-tooltip strong {
    overflow: hidden;
    color: color-mix(in srgb, var(--course-accent, #e8694a) 84%, #322b27);
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.five-e-component-tooltip p {
    margin: 0;
    color: #4e5e59;
    font-size: 11px;
    line-height: 1.5;
    text-align: justify;
    text-justify: inter-ideograph;
}
.five-e-component-tooltip small {
    color: var(--five-muted);
    font: 9px/1.35 "Cascadia Mono", Consolas, monospace;
    white-space: nowrap;
}
.five-e-component-tooltip[data-mode="hover"] small {
    overflow: hidden;
    max-width: 100%;
    text-overflow: ellipsis;
}

.five-e-evidence {
    border-left-color: var(--course-accent, #5e8fe5);
    background: linear-gradient(90deg, rgba(255,255,255,.9), rgba(255,255,255,0));
}
.five-e-evidence strong { color: var(--course-accent, #5e8fe5); }
.five-e-evidence span { color: var(--five-muted); font-size: 12px; }
.five-e-evidence[hidden] { display: none; }

.five-e-task__counter {
    color: var(--five-soft-ink);
    font: 11px/1.2 "Cascadia Mono", Consolas, monospace;
    letter-spacing: .02em;
}
.five-e-task__inline-counter {
    display: inline-block;
    margin-right: .28em;
    color: var(--course-accent, #5e8fe5);
    background: transparent;
    font: 700 .82em/1.35 "Cascadia Mono", Consolas, monospace;
    letter-spacing: .01em;
    white-space: nowrap;
    vertical-align: .06em;
}
.five-e-task__step-nav {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
    letter-spacing: 0;
}
.five-e-task__meta.five-e-task__toolbar {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    width: 100%;
}
.five-e-task__window-actions {
    display: inline-flex;
    grid-column: 1;
    align-items: center;
    justify-self: start;
    gap: 6px;
    letter-spacing: 0;
}
.five-e-task__toolbar > .five-e-task__step-nav {
    grid-column: 3;
    justify-self: end;
}
.five-e-task .five-e-task__step-nav button {
    display: inline-grid;
    place-items: center;
    box-sizing: border-box;
    width: 36px;
    min-width: 36px;
    max-width: 36px;
    height: 36px;
    min-height: 36px;
    max-height: 36px;
    padding: 0;
    border: 1px solid color-mix(in srgb, var(--course-accent, #5e8fe5) 48%, white);
    border-radius: 50%;
    color: var(--course-accent, #5e8fe5);
    background: color-mix(in srgb, var(--course-soft, #eef6ff) 48%, white);
    box-shadow: none;
    cursor: pointer;
    touch-action: manipulation;
}
.five-e-task .five-e-task__step-nav button span {
    font: 700 18px/1 "Cascadia Mono", Consolas, monospace;
    transform: translateY(-1px);
}
.five-e-task .five-e-task__step-nav button:not(:disabled):hover {
    border-color: var(--course-accent, #5e8fe5);
    color: #fff;
    background: var(--course-accent, #5e8fe5);
}
.five-e-task .five-e-task__step-nav button:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--course-accent, #5e8fe5) 30%, transparent);
    outline-offset: 2px;
}
.five-e-task .five-e-task__step-nav button:disabled {
    border-color: rgba(116, 126, 136, .18);
    color: rgba(92, 101, 110, .34);
    background: rgba(245, 247, 249, .46);
    cursor: not-allowed;
}

.five-e-phases button:disabled,
.five-e-phases button:disabled:hover {
    opacity: .42;
    color: var(--five-soft-ink);
    background: transparent;
    transform: none;
    cursor: not-allowed;
}

.five-e-controls header b,
.five-e-display header b { color: var(--five-muted); }
.five-e-controls label span { color: var(--five-ink); font-size: 13px; }
.five-e-controls output { color: var(--course-accent, #5e8fe5); font-size: 12px; }
.five-e-controls__motion { color: var(--five-muted); border-color: color-mix(in srgb, var(--course-accent, #5e8fe5) 35%, white); }
.five-e-display__toggle strong { color: var(--five-ink); font-size: 14px; }
.five-e-display__toggle small { color: var(--five-muted); font-size: 12px; }
.five-e-display__toggle i { border-color: color-mix(in srgb, var(--course-accent, #5e8fe5) 38%, white); background: #f3f5f7; }
.five-e-display__toggle i::after { background: #aab2ba; }
.five-e-display__toggle input:checked + span + i { border-color: var(--course-accent, #5e8fe5); background: var(--five-surface); }
.five-e-display__toggle input:checked + span + i::after { background: var(--course-accent, #5e8fe5); box-shadow: none; }
.five-e-display__modes button.is-active { border-color: var(--course-accent, #5e8fe5); color: var(--course-accent, #5e8fe5); background: transparent; }
.five-e-display__vector span { border-color: color-mix(in srgb, var(--course-accent, #5e8fe5) 25%, white); color: var(--five-muted); font-size: 10px; }
.five-e-display__vector output { color: var(--course-accent, #5e8fe5); font-size: 11px; }
.five-e-transform-editor { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 7px; }
.five-e-transform-editor label {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0,1fr) auto;
    align-items: center;
    gap: 5px;
    min-width: 0;
    padding: 7px 8px;
    border: 1px solid color-mix(in srgb, var(--course-accent, #5e8fe5) 28%, white);
    border-radius: 8px;
    background: rgba(255,255,255,.56);
}
.five-e-transform-editor label:focus-within { border-color: var(--course-accent, #5e8fe5); box-shadow: 0 0 0 2px color-mix(in srgb, var(--course-accent, #5e8fe5) 12%, transparent); }
.five-e-transform-editor label > span { color: var(--five-muted); font: 10px/1.2 "Cascadia Mono", Consolas, monospace; }
.five-e-transform-editor input {
    width: 100%;
    min-width: 0;
    padding: 2px 0;
    border: 0;
    outline: 0;
    color: var(--course-accent, #5e8fe5);
    background: transparent;
    font: 12px/1.3 "Cascadia Mono", Consolas, monospace;
    text-align: right;
}
.five-e-transform-editor input:disabled { opacity: .42; cursor: not-allowed; }
.five-e-transform-editor small { color: var(--five-soft-ink); font-size: 10px; }
.five-e-display__status { border-top-color: color-mix(in srgb, var(--course-accent, #5e8fe5) 25%, white); color: var(--five-muted); font: 11px/1.5 "Microsoft YaHei UI", sans-serif; }
.five-e-feedback { color: var(--five-ink); border-color: color-mix(in srgb, var(--course-accent, #5e8fe5) 38%, white); background: rgba(255,255,255,.96); }

@media (max-width: 820px) {
    .five-e-phases button { padding: 7px 9px; font-size: 12px; }
    .five-e-task h2 { font-size: 21px; }
    .five-e-task p { font-size: 14px; }
}

/* Unified window system --------------------------------------------------- */
.five-e-task {
    left: 22px;
    bottom: 22px;
    width: min(390px, calc(100vw - 420px));
    border-radius: 18px 18px 18px 6px;
}

.five-e-task__evidence {
    margin: 0 0 0 4px;
    padding: 3px 8px !important;
    border-radius: 999px !important;
    font-size: 11px !important;
    line-height: 1.2;
    white-space: nowrap;
}

.five-e-tool-dock {
    position: absolute;
    top: 50%;
    right: 22px;
    display: grid;
    width: 340px;
    max-height: calc(100vh - 150px);
    overflow: hidden;
    transform: translateY(-50%);
    border: 1px solid color-mix(in srgb, var(--course-accent, #5e8fe5) 42%, white);
    border-radius: 18px 6px 18px 18px;
    color: var(--five-ink);
    background: linear-gradient(145deg, rgba(255,255,255,.98), var(--five-surface));
    box-shadow: 0 20px 52px rgba(53,67,84,.18), 0 0 0 1px rgba(255,255,255,.7) inset;
    pointer-events: auto;
    font-family: "Noto Sans SC", "Microsoft YaHei UI", "PingFang SC", sans-serif;
    font-size: 14px;
    line-height: 1.55;
}

.five-e-tool-dock__header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 15px 11px;
    color: var(--course-accent, #5e8fe5);
    cursor: grab;
    touch-action: none;
    user-select: none;
}
.five-e-task__meta > span:first-child,
.five-e-tool-dock__header strong { font-size: 18px; font-weight: 700; line-height: 1.35; letter-spacing: .01em; }
.five-e-tool-dock__header strong.is-observation-focus {
    display: inline-block;
    animation: five-e-observation-title-flash 1.8s ease-in-out 3;
}
@keyframes five-e-observation-title-flash {
    0%, 100% { opacity: 1; text-shadow: 0 0 0 transparent; }
    50% { opacity: .48; text-shadow: 0 0 12px color-mix(in srgb, var(--course-accent, #e76446) 58%, transparent); }
}
@media (prefers-reduced-motion: reduce) {
    .five-e-tool-dock__header strong.is-observation-focus {
        animation: none;
        text-shadow: 0 0 8px color-mix(in srgb, var(--course-accent, #e76446) 42%, transparent);
    }
}
.five-e-task__meta > span:first-child { color: var(--course-accent, #5e8fe5); }
.five-e-task__meta b,
.five-e-task__counter { color: color-mix(in srgb, var(--course-accent, #5e8fe5) 78%, #4b5662); }
.five-e-task__review {
    padding: 3px 8px;
    border: 1px solid rgba(166, 106, 22, .32);
    border-radius: 999px;
    color: #925c12;
    background: rgba(255, 244, 222, .72);
    font-size: 11px;
    font-weight: 650;
}
body.five-e-review-mode > canvas { pointer-events: none !important; }
.five-e-task.is-review,
.five-e-shell.is-review .five-e-task { box-shadow: 0 20px 52px rgba(111, 80, 36, .2), 0 0 0 2px rgba(166, 106, 22, .16); }
.five-e-task h2 { color: #2f2a26; }
.five-e-task > p { color: #67615c; }
.five-e-task__look { color: #424a50; }
.five-e-task__look strong { color: #e65332; }
.five-e-focus[data-kind="operation"] {
    border-color: #d43b2a;
    color: #d43b2a;
    box-shadow: 0 0 0 8px rgba(212, 59, 42, .1), 0 0 24px rgba(212, 59, 42, .58);
}
.five-e-focus[data-kind="operation"] span {
    border-color: rgba(212, 59, 42, .72);
    color: #c63225 !important;
    background: rgba(255, 248, 246, .96);
    box-shadow: 0 7px 22px rgba(164, 42, 31, .2);
    font-weight: 700;
}
.five-e-task__waiting { color: #a66a16; }
.five-e-task__navigation {
    display: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid color-mix(in srgb, var(--course-accent, #5e8fe5) 18%, white);
}
.five-e-task .five-e-task__navigation button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 36px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
}
.five-e-task .five-e-task__navigation button span { font: 17px/1 "Cascadia Mono", Consolas, monospace; }
.five-e-task .five-e-task__navigation button:disabled {
    border-color: rgba(116, 126, 136, .2);
    color: rgba(92, 101, 110, .42);
    background: rgba(245, 247, 249, .5);
    cursor: not-allowed;
}
.five-e-feedback.is-positive { color: #257554; }
.five-e-feedback.is-guidance { color: #a66a16; }
.five-e-tool-dock__header span { margin-left: auto; color: var(--five-soft-ink); font: 9px/1.2 "Cascadia Mono", Consolas, monospace; letter-spacing: .08em; }
.five-e-tool-dock__header .five-e-panel__pin { margin-left: 2px; }
.five-e-tool-dock__header .five-e-panel__visibility { margin-left: auto; }

.five-e-tool-tabs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 42px;
    align-content: start;
    align-items: center;
    gap: 4px;
    padding: 0 12px 10px;
    border-bottom: 1px solid color-mix(in srgb, var(--course-accent, #5e8fe5) 18%, white);
}
.five-e-tool-tabs button {
    width: 100%;
    height: 42px;
    min-height: 42px;
    max-height: 42px;
    padding: 0 8px;
    align-self: center;
    border: 1px solid transparent;
    border-radius: 8px;
    color: var(--five-muted);
    background: transparent;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.35;
    cursor: pointer;
}
.five-e-tool-tabs button:hover { color: var(--course-accent, #5e8fe5); border-color: color-mix(in srgb, var(--course-accent, #5e8fe5) 28%, white); }
.five-e-tool-tabs button.is-active { color: var(--course-accent, #5e8fe5); border-color: color-mix(in srgb, var(--course-accent, #5e8fe5) 42%, white); background: var(--five-surface); }
.five-e-tool-tabs button:disabled { opacity: .35; cursor: not-allowed; }

.five-e-tool-dock__body { min-height: 0; overflow: auto; }
.five-e-tool-dock__body,
.five-e-tool-panel { font-size: 14px; line-height: 1.55; }
.five-e-tool-panel,
.five-e-tool-dock .five-e-display,
.five-e-tool-dock .five-e-controls,
.five-e-tool-dock .five-e-evidence,
.five-e-tool-dock .five-e-data {
    position: static;
    display: none !important;
    width: auto;
    max-height: none;
    overflow: visible;
    box-sizing: border-box;
    padding: 14px 16px 16px;
    transform: none;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}
.five-e-tool-dock .five-e-tool-panel.is-active { display: grid !important; gap: 12px; }

.five-e-tool-panel__intro { display: grid; gap: 3px; }
.five-e-tool-panel__intro h3 { margin: 0; color: var(--five-ink); font-size: 17px; font-weight: 700; line-height: 1.4; }
.five-e-tool-panel__intro span { color: var(--five-muted); font-size: 13px; line-height: 1.6; }

.five-e-control-switcher {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(68px, 1fr));
    grid-auto-flow: row;
    gap: 4px;
    padding: 4px;
    overflow-x: hidden;
    border: 1px solid color-mix(in srgb, var(--course-accent, #5e8fe5) 20%, white);
    border-radius: 11px;
    background: color-mix(in srgb, var(--course-soft, #edf4ff) 58%, white);
}
.five-e-controls .five-e-control-switcher button {
    min-height: 34px;
    padding: 6px 10px;
    border-color: transparent;
    border-radius: 8px;
    color: var(--five-muted);
    min-width: 0;
    white-space: normal;
    overflow-wrap: anywhere;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.35;
}
.five-e-controls .five-e-control-switcher button:hover {
    border-color: color-mix(in srgb, var(--course-accent, #5e8fe5) 38%, white);
    color: var(--course-accent, #5e8fe5);
}
.five-e-controls .five-e-control-switcher button.is-active {
    border-color: color-mix(in srgb, var(--course-accent, #5e8fe5) 48%, white);
    color: var(--course-accent, #5e8fe5);
    background: rgba(255,255,255,.9);
    box-shadow: 0 3px 10px rgba(53,67,84,.09);
}
.five-e-control-group { display: none; gap: 12px; }
.five-e-control-group.is-active { display: grid; }
.five-e-control-range { display: grid; gap: 10px; min-width: 0; }
.five-e-control-range__header { display: flex; align-items: baseline; gap: 12px; min-width: 0; }
.five-e-control-range__header b { flex: 0 1 auto; min-width: 0; font-size: 15px; font-weight: 500; line-height: 1.45; white-space: nowrap; }
.five-e-control-range__header output { color: var(--course-accent, #5e8fe5); font: 600 14px/1.35 "IBM Plex Mono", "Cascadia Mono", monospace; text-align: left; white-space: nowrap; }
.five-e-control-range__current { display: inline-flex; flex: 0 1 auto; align-items: baseline; gap: 3px; min-width: 0; color: var(--five-e-muted, #607976); font-size: 13px; line-height: 1.35; white-space: nowrap; }
.five-e-control-range__current > output { flex: 0 0 auto; }
.five-e-control-range__limits { flex: 0 0 auto; margin-left: auto; color: var(--five-e-muted, #607976); font: 600 13px/1.35 "IBM Plex Mono", "Cascadia Mono", monospace; white-space: nowrap; }
.five-e-control-range__header .five-e-control-number { height: auto; padding: 0; border: 0; border-radius: 0; background: transparent; }
.five-e-control-range__header .five-e-control-number:focus-within { border-color: transparent; box-shadow: none; }
.five-e-control-range__header .five-e-control-number input { width: 5.5em; padding: 0; text-align: left; }
#fiveECourse .five-e-task[data-step-window-mode="unified"] [data-unified-step-operation]
    .five-e-control-range__header output[data-config-number] {
    display: inline;
    width: auto !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0;
}
.five-e-control-range__unit { margin-left: 8px; color: var(--course-accent, #5e8fe5); font: 600 13px/1 "IBM Plex Mono", "Cascadia Mono", monospace; font-style: normal; white-space: nowrap; }
.five-e-control-range__editor { display: grid; grid-template-columns: minmax(0, 1fr); align-items: center; gap: 10px; min-width: 0; }
.five-e-control-range__editor > input[type="range"] { width: 100%; min-width: 0; }
.five-e-control-range__step {
    display: none;
    place-items: center;
    box-sizing: border-box;
    width: 48px;
    min-width: 48px;
    height: 48px;
    padding: 0;
    border: 1px solid color-mix(in srgb, var(--course-accent, #5e8fe5) 42%, white);
    border-radius: 14px;
    color: var(--course-accent, #5e8fe5);
    background: color-mix(in srgb, var(--course-soft, #edf4ff) 56%, white);
    font: 700 24px/1 "Microsoft YaHei UI", sans-serif;
    cursor: pointer;
    touch-action: manipulation;
}
.five-e-control-range__step:active {
    color: #fff;
    background: var(--course-accent, #5e8fe5);
    transform: scale(.96);
}
.five-e-control-range__presets {
    display: none;
    grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
    gap: 8px;
}
.five-e-control-range__presets button {
    min-height: 42px;
    padding: 8px 12px;
    border: 1px solid color-mix(in srgb, var(--course-accent, #5e8fe5) 35%, white);
    border-radius: 11px;
    color: var(--five-ink, #302b28);
    background: rgba(255,255,255,.84);
    font: 600 14px/1.3 "Microsoft YaHei UI", sans-serif;
    touch-action: manipulation;
}
.five-e-control-range__presets button[data-preset-tone="violet"] { border-color: #8b5cf6; color: #6941c6; background: #f4f0ff; }
.five-e-control-range__presets button[data-preset-tone="green"] { border-color: #22a85a; color: #15713c; background: #effaf3; }
.five-e-control-range__presets button[data-preset-tone="red"] { border-color: #e54848; color: #b4232f; background: #fff1f1; }
.five-e-control-range__presets button[data-preset-tone="blue"] { border-color: #3487e8; color: #215fa8; background: #eef6ff; }
.five-e-control-range__presets button[data-preset-tone="amber"] { border-color: #d99416; color: #8d5c0b; background: #fff8e8; }
.five-e-control-range__editor > input[type="range"]:focus { outline: none; box-shadow: none; }
.five-e-control-range__editor > input[type="range"]:focus-visible {
    outline: 2px solid color-mix(in srgb, var(--course-accent, #5e8fe5) 38%, transparent);
    outline-offset: 3px;
}
#fiveECourse input[type="range"]:focus,
#fiveECourse input[type="range"]:focus-visible {
    outline: none !important;
    box-shadow: none !important;
}

/* Tablet interaction profile ------------------------------------------------
   The runtime assigns these data attributes from pointer capabilities and the
   real viewport. This avoids treating a narrow mouse window as an iPad and
   keeps all course manifests on the same interaction contract. */
#fiveECourse[data-input-modality="coarse"] .five-e-control-range__editor,
#fiveECourse[data-input-modality="hybrid"] .five-e-control-range__editor {
    display: grid !important;
    grid-template-columns: 48px minmax(0, 1fr) 48px !important;
    grid-template-rows: minmax(48px, auto);
    align-items: center !important;
    gap: 12px;
}

#fiveECourse[data-input-modality="coarse"] .five-e-control-range__editor > .five-e-control-range__step:first-of-type,
#fiveECourse[data-input-modality="hybrid"] .five-e-control-range__editor > .five-e-control-range__step:first-of-type {
    grid-column: 1 !important;
    grid-row: 1 !important;
}

#fiveECourse[data-input-modality="coarse"] .five-e-control-range__editor > input[type="range"],
#fiveECourse[data-input-modality="hybrid"] .five-e-control-range__editor > input[type="range"] {
    grid-column: 2 !important;
    grid-row: 1 !important;
}

#fiveECourse[data-input-modality="coarse"] .five-e-control-range__editor > .five-e-control-range__step:last-of-type,
#fiveECourse[data-input-modality="hybrid"] .five-e-control-range__editor > .five-e-control-range__step:last-of-type {
    grid-column: 3 !important;
    grid-row: 1 !important;
}

#fiveECourse[data-input-modality="coarse"] .five-e-control-range__step,
#fiveECourse[data-input-modality="hybrid"] .five-e-control-range__step {
    display: grid;
}

#fiveECourse[data-input-modality="coarse"] :is(button, [role="button"], input, select, textarea),
#fiveECourse[data-input-modality="hybrid"] :is(button, [role="button"], input, select, textarea) {
    -webkit-tap-highlight-color: transparent;
}

#fiveECourse[data-input-modality="coarse"] :is(.five-e-task__actions button, .five-e-control-options button, .five-e-tool-tabs button),
#fiveECourse[data-input-modality="hybrid"] :is(.five-e-task__actions button, .five-e-control-options button, .five-e-tool-tabs button) {
    min-height: 48px;
    font-size: max(16px, 1rem);
    touch-action: manipulation;
}

#fiveECourse[data-input-modality="coarse"] .five-e-display__toggle,
#fiveECourse[data-input-modality="hybrid"] .five-e-display__toggle {
    min-height: 52px;
    padding-block: 8px;
    touch-action: manipulation;
}

#fiveECourse[data-input-modality="coarse"] .five-e-control-range__editor > input[type="range"],
#fiveECourse[data-input-modality="hybrid"] .five-e-control-range__editor > input[type="range"] {
    box-sizing: border-box;
    min-height: 48px;
    margin: 0 !important;
    touch-action: none;
}

#fiveECourse[data-input-modality="coarse"] .five-e-control-range__presets button,
#fiveECourse[data-input-modality="hybrid"] .five-e-control-range__presets button {
    min-height: 48px;
    font-size: 16px;
}

#fiveECourse[data-input-modality="coarse"] .five-e-control-range__presets,
#fiveECourse[data-input-modality="hybrid"] .five-e-control-range__presets {
    display: grid;
}

#fiveECourse[data-viewport-class="tablet"] .five-e-task {
    position: fixed !important;
    inset: auto max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left)) !important;
    box-sizing: border-box;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    max-height: min(56dvh, calc(var(--five-e-viewport-height, 100vh) - max(24px, env(safe-area-inset-top)) - 24px)) !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    border-radius: 22px 22px 12px 12px !important;
    transform: none !important;
}

#fiveECourse[data-viewport-class="tablet"] .five-e-task__meta,
#fiveECourse[data-viewport-class="tablet"] .five-e-task__toolbar {
    cursor: default !important;
    touch-action: pan-y !important;
}

#fiveECourse[data-viewport-class="tablet"] .five-e-task .five-e-task__step-nav button,
#fiveECourse[data-viewport-class="tablet"] .five-e-task__window-actions button {
    width: 48px;
    min-width: 48px;
    max-width: 48px;
    height: 48px;
    min-height: 48px;
    max-height: 48px;
}

#fiveECourse[data-viewport-class="tablet"] .five-e-tool-dock {
    box-sizing: border-box;
    max-width: calc(100vw - max(24px, env(safe-area-inset-left)) - max(24px, env(safe-area-inset-right)));
    max-height: min(60dvh, calc(var(--five-e-viewport-height, 100vh) - 32px));
}

#fiveECourse[data-viewport-class="tablet"] :is(input[type="number"], input[type="text"], select, textarea) {
    min-height: 48px;
    font-size: 16px !important;
}

@media (orientation: landscape) {
    #fiveECourse[data-viewport-class="tablet"] .five-e-task {
        right: auto !important;
        width: clamp(430px, 44vw, 620px) !important;
        max-height: calc(var(--five-e-viewport-height, 100vh) - max(24px, env(safe-area-inset-top)) - max(24px, env(safe-area-inset-bottom))) !important;
    }
}

@media (orientation: portrait) {
    #fiveECourse[data-viewport-class="tablet"] .five-e-task {
        width: auto !important;
        max-height: min(58dvh, calc(var(--five-e-viewport-height, 100vh) - max(20px, env(safe-area-inset-top)) - 20px)) !important;
    }

    #fiveECourse[data-viewport-class="tablet"] .five-e-control-range__header {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 4px 12px;
    }

    #fiveECourse[data-viewport-class="tablet"] .five-e-control-range__limits {
        grid-column: 1 / -1;
        margin-left: 0;
    }
}
.five-e-control-number { display: flex; align-items: center; min-width: 0; height: 40px; padding: 0 10px; border: 1px solid color-mix(in srgb, var(--course-accent, #5e8fe5) 40%, transparent); border-radius: 10px; background: color-mix(in srgb, var(--course-accent, #5e8fe5) 4%, white); }
.five-e-control-number:focus-within { border-color: var(--course-accent, #5e8fe5); box-shadow: 0 0 0 2px color-mix(in srgb, var(--course-accent, #5e8fe5) 14%, transparent); }
.five-e-control-number input { width: 78px; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--course-accent, #5e8fe5); font: 600 15px/1.3 "IBM Plex Mono", "Cascadia Mono", monospace; text-align: center; }
.five-e-discovery-cathodes button.is-active {
    border-color: #168553 !important;
    color: #fff !important;
    background: #168553 !important;
    box-shadow: 0 0 0 3px rgba(22, 133, 83, .16);
}
.five-e-control-group.is-task-target {
    position: relative;
}
.five-e-configured-readout { display: grid; gap: 8px; margin: 0; }
.five-e-configured-readout > div { display: block; }
.five-e-configured-readout button {
    display: grid;
    grid-template-columns: minmax(0,1fr) auto 12px;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 52px;
    padding: 10px 12px;
    border: 1px solid color-mix(in srgb, var(--course-accent, #5e8fe5) 20%, white);
    border-radius: 11px;
    color: var(--five-muted);
    background: rgba(255,255,255,.52);
    text-align: left;
    cursor: pointer;
    transition: border-color 150ms ease, background-color 150ms ease, color 150ms ease, transform 150ms ease;
}
.five-e-configured-readout button:hover,
.five-e-configured-readout button:focus-visible {
    border-color: color-mix(in srgb, var(--course-accent, #5e8fe5) 65%, white);
    color: var(--five-ink);
    background: color-mix(in srgb, var(--course-soft, #edf4ff) 62%, white);
    transform: translateX(-2px);
}
.five-e-configured-readout button.is-associated {
    border-color: var(--course-accent, #5e8fe5);
    color: var(--five-ink);
    background: color-mix(in srgb, var(--course-soft, #edf4ff) 76%, white);
}
.five-e-configured-readout button > span { min-width: 0; font-size: 14px; font-weight: 400; line-height: 1.5; }
.five-e-configured-readout button > strong { color: var(--course-accent, #5e8fe5); font: 700 15px/1.35 "IBM Plex Mono", "Cascadia Mono", monospace; white-space: nowrap; }
.five-e-configured-readout button > i {
    width: 7px;
    height: 7px;
    border: 1px solid color-mix(in srgb, var(--course-accent, #5e8fe5) 58%, white);
    border-radius: 50%;
}
.five-e-configured-readout button.is-associated > i { background: var(--course-accent, #5e8fe5); box-shadow: 0 0 0 4px color-mix(in srgb, var(--course-accent, #5e8fe5) 14%, transparent); }

.five-e-observation-keyword {
    display: inline-block;
    white-space: nowrap;
    padding: 0 .08em;
    border: 0;
    border-bottom: 1px solid rgba(218, 69, 48, .42);
    color: #d94730;
    background: transparent;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    outline: none;
    box-shadow: none;
    -webkit-tap-highlight-color: transparent;
}
.five-e-observation-keyword:hover { color: #aa2d1d; background: transparent; }
.five-e-observation-keyword:focus,
.five-e-observation-keyword:focus-visible,
.five-e-observation-keyword:active,
.five-e-task a:focus,
.five-e-task a:focus-visible,
.five-e-task a:active {
    outline: none;
    box-shadow: none;
}
.five-e-observation-keyword.is-emphasis {
    border-bottom-color: transparent;
    cursor: default;
}
.five-e-observation-keyword.is-emphasis:hover { color: #d94730; background: transparent; }
.is-observation-keyword-target {
    outline: 2px solid color-mix(in srgb, var(--course-accent, #5e8fe5) 72%, white) !important;
    outline-offset: 3px;
    border-radius: 10px;
    animation: five-e-observation-keyword-target 1.6s ease-out;
}
@keyframes five-e-observation-keyword-target {
    0%, 35% { background: color-mix(in srgb, var(--course-accent, #5e8fe5) 16%, white); }
    100% { background: transparent; }
}
.five-e-task[data-task-guide-style="far-field-diffraction"] .five-e-observation-keyword,
.five-e-task[data-task-guide-style="far-field-diffraction"] .five-e-observation-keyword:hover {
    background: transparent;
}

.five-e-legend-cloud[hidden] { display: none; }
.five-e-legend-cloud {
    position: fixed;
    inset: 0;
    z-index: 35;
    pointer-events: none;
    font-family: "Noto Sans SC", "Microsoft YaHei", sans-serif;
}
.five-e-legend-cloud__leader {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
}
.five-e-legend-cloud__leader line {
    stroke: var(--course-accent, #e76446);
    stroke-width: 1.75;
    stroke-dasharray: 7 5;
    filter: drop-shadow(0 1px 3px rgba(205,76,46,.32));
}
.five-e-legend-cloud__leader circle {
    fill: #fff9f5;
    stroke: var(--course-accent, #e76446);
    stroke-width: 3;
}
.five-e-legend-cloud__leader [data-legend-line],
.five-e-legend-cloud__leader [data-legend-anchor] {
    opacity: 0;
    transition: opacity .36s ease;
}
.five-e-legend-cloud__leader [data-legend-line] {
    stroke: color-mix(in srgb, var(--course-accent, #e76446) 64%, transparent);
    stroke-width: 1.45;
    stroke-dasharray: 6 8;
    filter: drop-shadow(0 1px 2px rgba(205,76,46,.18));
    vector-effect: non-scaling-stroke;
}
.five-e-legend-cloud__leader [data-legend-anchor] {
    fill: #fffaf6;
    stroke-width: 2;
}
.five-e-legend-cloud.is-connector-active:not(.is-connector-fading) .five-e-legend-cloud__leader [data-legend-line] {
    opacity: .62;
}
.five-e-legend-cloud.is-connector-active:not(.is-connector-fading) .five-e-legend-cloud__leader [data-legend-anchor] {
    opacity: .78;
}
@media (prefers-reduced-motion: reduce) {
    .five-e-legend-cloud__leader [data-legend-line],
    .five-e-legend-cloud__leader [data-legend-anchor] {
        transition: none;
    }
}
.five-e-legend-cloud__measure[hidden] { display: none; }
.five-e-legend-cloud__measure line {
    stroke: color-mix(in srgb, var(--course-accent, #e76446) 78%, #8f3727);
    stroke-width: 2;
    stroke-dasharray: 4 4;
}
.five-e-legend-cloud__measure circle { fill: var(--course-accent, #e76446); stroke: #fff8f4; stroke-width: 3; filter: drop-shadow(0 1px 4px rgba(205,76,46,.42)); }
.five-e-legend-cloud__measure text {
    fill: #b33f2c;
    paint-order: stroke;
    stroke: rgba(255,255,255,.92);
    stroke-width: 4px;
    font-size: 12px;
    font-weight: 700;
}
.five-e-legend-cloud__card {
    position: fixed;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    width: min(344px, calc(100vw - 32px));
    min-width: min(300px, calc(100vw - 16px));
    min-height: var(--legend-card-min-height, 0px);
    max-width: calc(100vw - 16px);
    max-height: calc(100vh - 16px);
    padding: 13px 15px 14px;
    color: #332c29;
    border: 1px solid color-mix(in srgb, var(--course-accent, #e76446) 42%, white);
    border-radius: 20px;
    background: rgba(255,252,249,.94);
    box-shadow: 0 16px 38px rgba(63,45,37,.18), inset 0 1px 0 rgba(255,255,255,.9);
    backdrop-filter: blur(14px) saturate(1.08);
    overflow: hidden;
    pointer-events: auto;
    transition: opacity 180ms ease, visibility 180ms ease, box-shadow 180ms ease;
}
.five-e-legend-cloud__card header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    cursor: grab;
    touch-action: none;
    user-select: none;
}
.five-e-legend-cloud__card.is-dragging { box-shadow: 0 24px 54px rgba(63,45,37,.24), inset 0 1px 0 rgba(255,255,255,.9); }
.five-e-legend-cloud__card.is-dragging header { cursor: grabbing; }
.five-e-legend-cloud__card.is-resizing { transition: none; user-select: none; }
.five-e-legend-cloud__actions {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 6px;
    margin-left: 2px;
}
.five-e-legend-cloud__card strong {
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.five-e-legend-cloud__magnifier {
    position: relative;
    width: 26px;
    height: 26px;
    flex: 0 0 26px;
    border: 2px solid var(--course-accent, #e76446);
    border-radius: 50%;
}
.five-e-legend-cloud__magnifier::after {
    content: "";
    position: absolute;
    right: -6px;
    bottom: -4px;
    width: 10px;
    height: 2px;
    border-radius: 2px;
    background: var(--course-accent, #e76446);
    transform: rotate(45deg);
    transform-origin: left center;
}
.five-e-legend-cloud__hide,
.five-e-legend-cloud__pin {
    display: grid;
    place-items: center;
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    padding: 0;
    border: 1px solid color-mix(in srgb, var(--course-accent, #e76446) 42%, white);
    border-radius: 50%;
    color: var(--course-accent, #e76446);
    background: transparent;
    cursor: pointer;
}
.five-e-legend-cloud__hide:hover,
.five-e-legend-cloud__hide:focus-visible,
.five-e-legend-cloud__pin:hover,
.five-e-legend-cloud__pin:focus-visible,
.five-e-legend-cloud__pin.is-active { color: #fff; border-color: var(--course-accent, #e76446); background: var(--course-accent, #e76446); outline: none; }
.five-e-legend-cloud__hide svg,
.five-e-legend-cloud__pin svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.five-e-legend-cloud__card.is-pinned { box-shadow: 0 22px 52px rgba(63,45,37,.2), 0 0 0 2px color-mix(in srgb, var(--course-accent, #e76446) 15%, transparent); }
.five-e-legend-cloud__sensor[hidden] { display: none; }
.five-e-legend-cloud__sensor {
    position: fixed;
    z-index: 3;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 1px solid color-mix(in srgb, var(--course-accent, #e76446) 48%, white);
    border-radius: 12px;
    color: var(--course-accent, #e76446);
    background: rgba(255,252,249,.94);
    box-shadow: 0 8px 22px rgba(63,45,37,.16);
    pointer-events: auto;
    cursor: pointer;
}
.five-e-legend-cloud__sensor:hover { color: #fff; border-color: var(--course-accent, #e76446); background: var(--course-accent, #e76446); }
.five-e-legend-cloud__sensor svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.five-e-legend-cloud.is-auto-hidden .five-e-legend-cloud__leader,
.five-e-legend-cloud.is-auto-hidden .five-e-legend-cloud__card { opacity: 0; visibility: hidden; }
.five-e-legend-cloud__card output[hidden] { display: none; }
.five-e-legend-cloud__card output {
    display: block;
    flex: 0 0 auto;
    margin: 0 0 0 auto;
    color: var(--course-accent, #e76446);
    font-family: "JetBrains Mono", "Cascadia Mono", monospace;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.15;
}
.five-e-legend-cloud__scale {
    display: inline-flex;
    flex: 0 0 auto;
    margin: 0;
    padding: 4px 9px;
    color: color-mix(in srgb, var(--course-accent, #e76446) 82%, #5c3d32);
    border: 1px solid color-mix(in srgb, var(--course-accent, #e76446) 28%, white);
    border-radius: 999px;
    background: color-mix(in srgb, var(--course-accent, #e76446) 7%, white);
    font-size: 12px;
    white-space: nowrap;
}
.five-e-legend-cloud__summary { display: flex; align-items: center; gap: 9px; min-width: 0; }
.five-e-legend-cloud__visual[hidden] { display: none; }
.five-e-legend-cloud__visual {
    position: relative;
    flex: 1 1 auto;
    height: var(--legend-visual-height, 102px);
    min-height: 102px;
    max-height: min(188px, calc(100vh - 190px));
    margin-top: 9px;
    overflow: hidden;
    border: 1px solid rgba(205,76,46,.2);
    border-radius: 14px;
    background-color: #fffaf7;
    background-image: linear-gradient(rgba(223,110,79,.10) 1px, transparent 1px), linear-gradient(90deg, rgba(223,110,79,.10) 1px, transparent 1px);
    background-size: 16px 16px;
    transition: height 180ms ease;
}
.five-e-legend-cloud__card.is-user-sized .five-e-legend-cloud__visual { height: auto; }
.five-e-legend-cloud__resize {
    position: absolute;
    right: 7px;
    bottom: 7px;
    z-index: 6;
    width: 18px;
    height: 18px;
    color: color-mix(in srgb, var(--course-accent, #e76446) 72%, white);
    cursor: nwse-resize;
    touch-action: none;
}
.five-e-legend-cloud__resize::before,
.five-e-legend-cloud__resize::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    border-right: 1px solid currentColor;
    border-bottom: 1px solid currentColor;
}
.five-e-legend-cloud__resize::before { width: 16px; height: 16px; }
.five-e-legend-cloud__resize::after { width: 9px; height: 9px; }
.five-e-legend-cloud__definition {
    min-width: 0;
    margin: 0;
    color: #786863;
    font-size: 11px;
    line-height: 1.35;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.five-e-legend-cloud__card.is-standard {
    width: min(372px, calc(100vw - 28px));
    max-height: min(560px, calc(100vh - 126px));
}
.five-e-legend-cloud__standard[hidden] { display: none; }
.five-e-legend-cloud__standard {
    display: grid;
    gap: 10px;
    min-height: 0;
    overflow: auto;
    padding: 2px 2px 4px;
    scrollbar-width: thin;
}
.five-e-cloud-standard__meta,
.five-e-cloud-standard__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.five-e-cloud-standard__role,
.five-e-cloud-standard__template,
.five-e-cloud-standard__chip {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 3px 9px;
    border: 1px solid color-mix(in srgb, var(--course-accent) 22%, white);
    border-radius: 999px;
    color: color-mix(in srgb, var(--course-accent) 74%, #503f39);
    background: color-mix(in srgb, var(--course-accent) 7%, white);
    font-size: 11px;
    line-height: 1.2;
}
.five-e-cloud-standard__role { color: #fff; background: var(--course-accent); border-color: var(--course-accent); font-weight: 700; }
.five-e-cloud-standard__current {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 12px;
    border-radius: 12px;
    background: color-mix(in srgb, var(--course-accent) 6%, #fffdfb);
}
.five-e-cloud-standard__current-label,
.five-e-cloud-standard__metric-label,
.five-e-cloud-standard__comparison-label { color: #88766f; font-size: 11px; }
.five-e-cloud-standard__current-value,
.five-e-cloud-standard__metric-value { color: var(--cloud-value-color, #352d2a); font-size: 16px; }
.five-e-cloud-standard__metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.five-e-cloud-standard__metric { display: grid; gap: 5px; min-width: 0; padding: 9px 10px; border: 1px solid rgba(92,73,65,.08); border-radius: 11px; background: rgba(255,255,255,.72); }
.five-e-cloud-standard__metric-value { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.five-e-cloud-standard__comparison { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; }
.five-e-cloud-standard__comparison-item { display: grid; gap: 3px; padding: 8px 10px; border-radius: 10px; background: #f5f0ed; }
.five-e-cloud-standard__comparison-item.is-current { background: color-mix(in srgb, var(--course-accent) 10%, white); }
.five-e-cloud-standard__comparison-value { color: #3f3430; font-size: 13px; }
.five-e-cloud-standard__comparison-arrow { color: var(--course-accent); font-weight: 800; }
.five-e-cloud-standard__conditions,
.five-e-cloud-standard__relationship { display: grid; gap: 6px; }
.five-e-cloud-standard__section-title { color: #5c4b45; font-size: 12px; }
.five-e-cloud-standard__relationship { padding: 9px 11px; border-left: 3px solid var(--course-accent); background: color-mix(in srgb, var(--course-accent) 4%, white); }
.five-e-cloud-standard__relationship-text { margin: 0; color: #6f5e58; font-size: 12px; line-height: 1.65; }
.five-e-cloud-standard__legend { display: grid; gap: 5px; }
.five-e-cloud-standard__legend-row { display: flex; align-items: center; gap: 8px; color: #6f5e58; font-size: 12px; }
.five-e-cloud-standard__swatch { width: 18px; height: 8px; border-radius: 999px; box-shadow: 0 0 10px color-mix(in srgb, currentColor 30%, transparent); }
.five-e-cloud-standard__evidence { display: flex; align-items: center; gap: 7px; padding-top: 8px; border-top: 1px solid rgba(92,73,65,.1); color: #75645e; font-size: 11px; }
.five-e-cloud-standard__evidence-dot { width: 7px; height: 7px; border-radius: 50%; background: #b9aaa4; }
.five-e-cloud-standard__evidence[data-policy="candidate"] { color: color-mix(in srgb, var(--course-accent) 76%, #4d403b); font-weight: 700; }
.five-e-cloud-standard__evidence[data-policy="candidate"] .five-e-cloud-standard__evidence-dot { background: var(--course-accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--course-accent) 13%, transparent); }
.five-e-legend-plane {
    --legend-mask-axis-safe-inline: 30px;
    --legend-mask-axis-safe-block-start: 30px;
    --legend-mask-axis-safe-block-end: 19px;
    position: absolute;
    inset: 12px 58px 24px 46px;
    z-index: 2;
}
.five-e-legend-coordinate-grid { position: absolute; inset: 0; z-index: 1; }
[data-coordinate-standard="true"] {
    --coordinate-axis-color: color-mix(in srgb, var(--course-accent, #e76446) 72%, #7b5549);
    --coordinate-grid-color: color-mix(in srgb, var(--course-accent, #e76446) 10%, #ded6d1);
    --coordinate-label-color: color-mix(in srgb, var(--course-accent, #e76446) 76%, #4d403b);
    --coordinate-tick-color: #6f625d;
    position: relative;
    min-height: 168px !important;
    height: 168px !important;
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--course-accent, #e76446) 22%, #e6ddd8);
    border-radius: 14px;
    background-color: color-mix(in srgb, var(--course-accent, #e76446) 2.5%, #fffdfb);
    background-image:
        linear-gradient(color-mix(in srgb, var(--course-accent, #e76446) 8%, transparent) 1px, transparent 1px),
        linear-gradient(90deg, color-mix(in srgb, var(--course-accent, #e76446) 8%, transparent) 1px, transparent 1px);
    background-size: 24px 24px;
}
[data-coordinate-standard="true"] .five-e-legend-coordinate-grid { inset: 8px 8px 6px; }
[data-coordinate-standard="true"] .five-e-legend-plane { inset: 20px 58px 32px 46px; }
[data-coordinate-standard="true"] .five-e-legend-axis--x { bottom: 30px; }
[data-coordinate-standard="true"] .five-e-legend-axis--y { top: 16px; bottom: 30px; }
[data-coordinate-standard="true"] .five-e-legend-axis-label--x { bottom: 38px; }
[data-coordinate-standard="true"] .five-e-legend-axis-label--y { top: 9px; }
[data-coordinate-standard="true"] .five-e-legend-double-slit-readout { display: none !important; }
.five-e-legend-axis { position: absolute; z-index: 6; display: block; background: #b65a42; }
.five-e-legend-axis { background: var(--coordinate-axis-color, #b65a42); }
.five-e-legend-axis--x { left: 46px; right: 58px; bottom: 24px; height: 1px; }
.five-e-legend-axis--y { left: 46px; top: 12px; bottom: 24px; width: 1px; }
.five-e-legend-axis--x::before,
.five-e-legend-axis--y::before { display: none; }
.five-e-legend-axis--x::before { left: 0; right: 8px; top: -4px; height: 9px; background: repeating-linear-gradient(90deg, transparent 0 15px, #b65a42 15px 16px); }
.five-e-legend-axis--y::before { top: 8px; bottom: 0; left: -4px; width: 9px; background: repeating-linear-gradient(0deg, transparent 0 15px, #b65a42 15px 16px); }
.five-e-legend-tick { position: absolute; display: block; background: #b65a42; font-style: normal; }
.five-e-legend-tick em { position: absolute; color: #7f4435; font: 600 10px/1 "JetBrains Mono", monospace; font-style: normal; white-space: nowrap; }
.five-e-legend-tick--x { top: -5px; width: 1px; height: 10px; }
.five-e-legend-tick--x em { top: 12px; left: 0; transform: translateX(-50%); }
.five-e-legend-tick--y { left: -5px; width: 10px; height: 1px; }
.five-e-legend-tick--y em { right: 13px; top: 0; transform: translateY(-50%); }
.five-e-legend-axis--x::after,
.five-e-legend-axis--y::after { content: ""; position: absolute; width: 7px; height: 7px; border-top: 1px solid #b65a42; border-right: 1px solid #b65a42; }
.five-e-legend-axis--x::after,
.five-e-legend-axis--y::after { display: none; }
.five-e-legend-axis--x::after { right: 0; top: -3px; transform: rotate(45deg); }
.five-e-legend-axis--y::after { left: -3px; top: 0; transform: rotate(-45deg); }
.five-e-legend-axis-label { position: absolute; z-index: 6; color: #934936; font: 800 11px/1 "JetBrains Mono", monospace; white-space: nowrap; }
.five-e-legend-axis-label--x { right: 8px; top: auto; bottom: 32px; }
.five-e-legend-axis-label--y { left: 60px; top: 5px; }
.five-e-legend-cloud__tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
    margin: 10px 0 12px;
    padding: 4px;
    border: 1px solid color-mix(in srgb, var(--course-accent, #e76446) 22%, #eee5df);
    border-radius: 14px;
    background: color-mix(in srgb, var(--course-accent, #e76446) 5%, #fffaf7);
}
.five-e-legend-cloud__tabs button {
    min-width: 0;
    padding: 9px 5px;
    border: 0;
    border-radius: 10px;
    color: #6f625e;
    background: transparent;
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    cursor: pointer;
}
.five-e-legend-cloud__tabs button.is-active {
    color: #fff;
    background: var(--course-accent, #e76446);
    box-shadow: 0 5px 14px color-mix(in srgb, var(--course-accent, #e76446) 22%, transparent);
}
.five-e-legend-cloud__panel[hidden],
.five-e-legend-cloud__visual[hidden],
.five-e-legend-cloud__standard[hidden] { display: none; }
.five-e-legend-cloud__panel.is-active { display: block; }
.five-e-legend-cloud__panel .five-e-legend-cloud__visual,
.five-e-legend-cloud__panel .five-e-legend-cloud__standard { margin-top: 0; }
.five-e-context-adjustment[hidden] { display: none; }
.five-e-context-adjustment {
    display: grid;
    gap: 8px;
    margin-top: 10px;
    padding: 10px 12px;
    border: 1px solid color-mix(in srgb, var(--course-accent, #e76446) 34%, transparent);
    border-radius: 14px;
    background: color-mix(in srgb, var(--course-accent, #e76446) 5%, #fff);
}
.five-e-context-adjustment__row {
    display: grid;
    grid-template-columns: auto minmax(88px, 1fr) auto;
    gap: 10px;
    align-items: center;
}
.five-e-context-adjustment__edge {
    color: color-mix(in srgb, var(--course-accent, #e76446) 74%, #4e4542);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}
.five-e-context-adjustment input[type="range"] {
    width: 100%;
    min-width: 0;
    accent-color: var(--course-accent, #e76446);
    cursor: ew-resize;
}
.five-e-context-adjustment__meta {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
}
.five-e-context-adjustment__meta small {
    min-width: 0;
    color: #756966;
    font-size: 11px;
    line-height: 1.45;
}
.five-e-context-adjustment__meta output {
    flex: 0 0 auto;
    margin: 0;
    color: var(--course-accent, #e76446);
    font-family: "IBM Plex Mono", "Courier New", monospace;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}
.five-e-context-adjustment__presets {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
}
.five-e-context-adjustment__presets.is-choice { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.five-e-context-adjustment__presets button {
    min-height: 34px;
    padding: 7px 8px;
    border: 1px solid color-mix(in srgb, var(--course-accent, #e76446) 28%, white);
    border-radius: 10px;
    color: color-mix(in srgb, var(--course-accent, #e76446) 78%, #4e4542);
    background: rgba(255,255,255,.76);
    font-size: 12px;
    font-weight: 750;
    text-align: center;
}
.five-e-context-adjustment__presets button.is-active {
    border-color: var(--course-accent, #e76446);
    color: #fff;
    background: var(--course-accent, #e76446);
    box-shadow: 0 6px 16px color-mix(in srgb, var(--course-accent, #e76446) 22%, transparent);
}
.five-e-context-adjustment__comparison {
    display: grid;
    gap: 7px;
    padding: 9px 10px;
    border-radius: 11px;
    background: color-mix(in srgb, var(--course-accent, #e76446) 8%, white);
}
.five-e-context-adjustment__comparison[hidden] { display: none; }
.five-e-context-adjustment__comparison span { display: flex; align-items: center; justify-content: center; gap: 8px; color: #665a56; font-size: 12px; }
.five-e-context-adjustment__comparison span i { color: var(--course-accent, #e76446); font-style: normal; font-weight: 800; }
.five-e-context-adjustment__comparison > strong { color: #493f3b; font-size: 12px; line-height: 1.5; text-align: center; }
.five-e-comparison-data {
    display: grid;
    gap: 6px;
    width: 100%;
}
.five-e-comparison-data__row {
    display: grid;
    grid-template-columns: minmax(88px, 1.25fr) repeat(2, minmax(62px, 1fr));
    gap: 8px;
    align-items: center;
    padding: 9px 10px;
    border-radius: 11px;
    background: color-mix(in srgb, var(--course-accent, #e76446) 5%, #fff);
    color: #5f5450;
    font-size: 12px;
}
.five-e-comparison-data__head {
    padding-block: 5px;
    background: transparent;
    color: #8a7d78;
    font-size: 11px;
    font-weight: 700;
}
.five-e-comparison-data__row strong {
    color: #4e4542;
    font-weight: 700;
}
.five-e-comparison-data__row span:not(:first-child) {
    text-align: right;
    font-family: "IBM Plex Mono", "Courier New", monospace;
}
.five-e-context-inspector__mode {
    margin: 0 0 9px;
    color: var(--course-accent, #e76446);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .08em;
}
.five-e-context-inspector__mode[hidden],
.five-e-context-inspector__relation[hidden] { display: none; }
.five-e-context-inspector__relation {
    margin: 10px 0 0;
    padding: 10px 12px;
    border-left: 3px solid var(--course-accent, #e76446);
    border-radius: 0 12px 12px 0;
    background: color-mix(in srgb, var(--course-accent, #e76446) 5%, #fff);
    color: #514744;
    font-size: 13px;
    font-weight: 750;
    line-height: 1.45;
}
.five-e-legend-cloud.is-context-inspector > :not(.five-e-legend-cloud__card) {
    display: none !important;
}
.five-e-legend-cloud.is-context-inspector .five-e-legend-cloud__card {
    position: fixed !important;
    z-index: 72 !important;
    top: 50% !important;
    right: 18px !important;
    bottom: auto !important;
    left: auto !important;
    width: min(430px, calc(100vw - 36px)) !important;
    height: auto !important;
    max-height: calc(100vh - 36px) !important;
    transform: translateY(-50%) !important;
    pointer-events: auto;
}
.five-e-legend-cloud.is-context-inspector .five-e-legend-cloud__tabs {
    display: none !important;
}
.five-e-tool-dock [data-tool-panel="observe"] > .five-e-legend-cloud.is-context-inspector {
    position: static !important;
    display: block;
    width: 100%;
    height: auto;
    min-width: 0;
    margin: 0;
    overflow: visible;
    pointer-events: auto;
}
.five-e-tool-dock [data-tool-panel="observe"] > .five-e-legend-cloud.is-context-inspector .five-e-legend-cloud__card {
    position: static !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;
    width: 100% !important;
    height: auto !important;
    min-width: 0 !important;
    min-height: 0 !important;
    max-width: none !important;
    max-height: none !important;
    padding: 0 12px 12px !important;
    overflow: visible !important;
    transform: none !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}
.five-e-tool-dock [data-tool-panel="observe"] > .five-e-legend-cloud.is-context-inspector .five-e-context-inspector__mode {
    display: none !important;
}
.five-e-tool-dock [data-tool-panel="observe"] > .five-e-legend-cloud.is-context-inspector .five-e-legend-cloud__card > header,
.five-e-tool-dock [data-tool-panel="observe"] > .five-e-legend-cloud.is-context-inspector .five-e-legend-cloud__card > .five-e-legend-cloud__header {
    display: none !important;
}
.five-e-context-inspector__visual-title {
    position: absolute;
    z-index: 8;
    top: 10px;
    right: 12px;
    padding: 4px 9px;
    border-radius: 999px;
    color: var(--course-accent, #e76446);
    background: color-mix(in srgb, var(--course-soft, #f7ded5) 68%, rgba(255,255,255,.94));
    font-size: 13px;
    font-weight: 800;
    line-height: 1.3;
    letter-spacing: .03em;
}
.five-e-tool-dock:has([data-tool-panel="observe"] > .five-e-legend-cloud.is-context-inspector) {
    width: min(340px, calc(100vw - 20px)) !important;
}
.five-e-tool-dock [data-tool-panel="observe"] > .five-e-legend-cloud.is-context-inspector .five-e-legend-cloud__visual {
    height: 190px !important;
    max-height: 210px;
}
.five-e-tool-dock [data-tool-panel="observe"] > .five-e-legend-cloud.is-context-inspector .five-e-context-inspector__relation {
    padding: 11px 14px;
    border: 1px solid color-mix(in srgb, var(--course-accent, #e76446) 34%, white);
    border-radius: 14px;
    background: color-mix(in srgb, var(--course-accent, #e76446) 5%, #fff);
    font-size: 13px;
}
.five-e-tool-dock [data-tool-panel="observe"] > .five-e-legend-cloud.is-context-inspector .five-e-panel__visibility,
.five-e-tool-dock [data-tool-panel="observe"] > .five-e-legend-cloud.is-context-inspector .five-e-panel__pin,
.five-e-tool-dock [data-tool-panel="observe"] > .five-e-legend-cloud.is-context-inspector [data-legend-hide],
.five-e-tool-dock [data-tool-panel="observe"] > .five-e-legend-cloud.is-context-inspector [data-legend-pin],
.five-e-tool-dock [data-tool-panel="observe"] > .five-e-legend-cloud.is-context-inspector .five-e-legend-cloud__resize {
    display: none !important;
}
.five-e-tool-dock [data-tool-panel="observe"] > .five-e-legend-cloud.is-context-inspector + .five-e-configured-readout {
    padding-top: 10px;
    border-top: 1px solid color-mix(in srgb, var(--course-accent, #e76446) 18%, white);
}
.five-e-observation-pulse {
    --pulse-color: #ef4438;
    position: absolute;
    width: 8px;
    height: 8px;
    transform: translate(-50%, -50%);
    border: 1.5px solid rgba(255,255,255,.96);
    border-radius: 50%;
    background: radial-gradient(circle, #fff 0 20%, #ff8b73 26% 48%, rgba(239,68,56,.18) 54%, transparent 66%);
    box-shadow:
        0 0 0 1.5px rgba(239,68,56,.82),
        0 0 9px rgba(239,68,56,.52),
        0 0 18px rgba(239,68,56,.18);
}
.five-e-observation-pulse::before,
.five-e-observation-pulse::after {
    content: "";
    position: absolute;
    inset: -7px;
    border: 1.5px solid rgba(239,68,56,.86);
    border-radius: 50%;
    background: radial-gradient(circle, transparent 48%, rgba(255,255,255,.3) 52%, transparent 59%);
    opacity: 0;
    box-shadow:
        inset 0 0 8px rgba(239,68,56,.16),
        0 0 10px rgba(239,68,56,.24);
    animation: five-e-observation-wave 7.2s cubic-bezier(.16,.68,.28,1) infinite;
    animation-delay: var(--pulse-delay, 0ms);
}
.five-e-observation-pulse::after {
    border-color: rgba(255,139,115,.62);
    animation-delay: calc(var(--pulse-delay, 0ms) + 3.6s);
}
@keyframes five-e-observation-wave {
    0% { opacity: 0; transform: scale(.46); }
    7% { opacity: .9; }
    46% { opacity: .32; }
    72% { opacity: .08; }
    82%, 100% { opacity: 0; transform: scale(2.35); }
}
@media (prefers-reduced-motion: reduce) {
    .five-e-observation-pulse::before,
    .five-e-observation-pulse::after {
        animation: none;
        opacity: .42;
        transform: scale(1.35);
    }
}
@media (max-width: 720px) {
    .five-e-tool-dock:has([data-tool-panel="observe"] > .five-e-legend-cloud.is-context-inspector) {
        width: min(330px, calc(100vw - 20px)) !important;
    }
    .five-e-legend-cloud.is-context-inspector .five-e-legend-cloud__card {
        top: auto !important;
        right: 10px !important;
        bottom: 10px !important;
        left: 10px !important;
        width: auto !important;
        max-height: 58vh !important;
        transform: none !important;
    }
}
.five-e-legend-cloud__relation {
    margin: 10px 0 0;
    padding: 10px 12px;
    border-left: 3px solid var(--course-accent, #e76446);
    color: #5f5450;
    background: color-mix(in srgb, var(--course-accent, #e76446) 5%, #fff);
    font-size: 12px;
    line-height: 1.65;
}
.five-e-tool-dock [data-tool-panel="observe"] :is(
    .five-e-context-inspector__relation,
    .five-e-legend-cloud__relation
) {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 48px;
    margin: 10px 0 0;
    padding: 11px 14px;
    border: 1px solid color-mix(in srgb, var(--course-accent, #e76446) 34%, white);
    border-radius: 14px;
    background: color-mix(in srgb, var(--course-accent, #e76446) 5%, #fff);
    color: color-mix(in srgb, var(--course-accent, #e76446) 24%, #433b38);
    font-size: 13px;
    font-weight: 750;
    line-height: 1.55;
    letter-spacing: .01em;
    overflow-wrap: anywhere;
    box-shadow: inset 3px 0 0 color-mix(in srgb, var(--course-accent, #e76446) 72%, transparent);
}
.five-e-legend-cloud__relation-details {
    display: grid;
    gap: 9px;
    margin-top: 10px;
}
.five-e-legend-cloud__relation-details:empty { display: none; }
.five-e-tool-dock [data-tool-panel="observe"] :is(
    .five-e-context-inspector__relation,
    .five-e-legend-cloud__relation
) {
    display: none !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
}
[data-legend-panel="data"] .five-e-cloud-standard__relationship,
[data-legend-panel="data"] .five-e-cloud-standard__evidence,
[data-legend-panel="data"] .five-e-cloud-standard__meta { display: none; }
.five-e-legend-slit-center { position: absolute; top: 18px; bottom: 27px; display: block; }
.five-e-legend-slit-aperture { position: absolute; top: 7px; bottom: 19px; z-index: 2; width: var(--legend-slit-width); border: 1px solid rgba(255,255,255,.94); border-radius: 1px; background: #fff; box-shadow: 0 0 8px rgba(255,255,255,.72); transform: translateX(-50%); }
.five-e-legend-slit-aperture--left { left: calc(50% - var(--legend-slit-center-offset)); }
.five-e-legend-slit-aperture--right { left: calc(50% + var(--legend-slit-center-offset)); }
.five-e-legend-slit-aperture.is-closed { display: none; }
.five-e-legend-aperture-mask {
    position: absolute;
    inset: var(--legend-mask-axis-safe-block-start) var(--legend-mask-axis-safe-inline) var(--legend-mask-axis-safe-block-end);
    display: block;
    overflow: hidden;
    border: 1px solid #292523;
    border-radius: 3px;
    background: linear-gradient(135deg, #171615, #4d4541);
    box-shadow: 0 2px 7px rgba(28,22,20,.24);
}
.five-e-legend-aperture-opening {
    position: absolute;
    left: 50%;
    top: 50%;
    display: block;
    width: var(--legend-aperture-size);
    background: #fffaf7;
    box-shadow: 0 0 8px color-mix(in srgb, var(--course-accent, #e76446) 34%, transparent);
    transform: translate(-50%,-50%);
}
.five-e-legend-aperture-opening.is-slit { height: 82%; border-radius: 1px; }
.five-e-legend-aperture-opening.is-circle { height: auto; aspect-ratio: 1; border-radius: 50%; }
.five-e-legend-plane--aperture-types {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    padding: 12px 16px 2px;
}
.five-e-legend-aperture-option {
    position: relative;
    display: grid;
    grid-template-rows: minmax(76px, 1fr) auto;
    gap: 7px;
    min-width: 0;
    padding: 7px;
    border: 1px solid color-mix(in srgb, var(--course-accent, #e76446) 22%, #d8cfca);
    border-radius: 10px;
    background: color-mix(in srgb, var(--course-accent, #e76446) 3%, #fffdfb);
}
.five-e-legend-aperture-option.is-active {
    border-color: var(--course-accent, #e76446);
    background: color-mix(in srgb, var(--course-accent, #e76446) 9%, #fffdfb);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--course-accent, #e76446) 13%, transparent);
}
.five-e-legend-aperture-mask--type {
    position: relative;
    inset: auto;
    width: 100%;
    height: 100%;
    min-height: 76px;
}
.five-e-legend-aperture-option .five-e-legend-aperture-opening.is-slit { width: 18%; height: 76%; }
.five-e-legend-aperture-option .five-e-legend-aperture-opening.is-circle { width: 44%; }
.five-e-legend-aperture-option strong {
    color: #655a56;
    font-size: 13px;
    line-height: 1.2;
    text-align: center;
}
.five-e-legend-aperture-option.is-active strong { color: var(--course-accent, #e76446); }
.five-e-legend-slit-center { width: 4px; border-radius: 3px; background: #332e2c; box-shadow: 0 0 0 5px rgba(255,255,255,.92); }
.five-e-legend-slit-center--left { left: calc(50% - var(--legend-center-offset)); }
.five-e-legend-slit-center--right { right: calc(50% - var(--legend-center-offset)); }
.five-e-legend-dimension { position: absolute; top: 49px; z-index: 3; height: 1px; border-top: 1px solid var(--course-accent, #e76446); }
.five-e-legend-dimension::before,
.five-e-legend-dimension::after { content: ""; position: absolute; top: -4px; width: 7px; height: 7px; border-top: 1px solid var(--course-accent, #e76446); border-right: 1px solid var(--course-accent, #e76446); }
.five-e-legend-dimension::before { left: 0; transform: rotate(-135deg); }
.five-e-legend-dimension::after { right: 0; transform: rotate(45deg); }
.five-e-legend-dimension--slit-left,
.five-e-legend-dimension--slit-right { top: 48px; left: auto; right: auto; width: var(--legend-slit-width); transform: translateX(-50%); }
.five-e-legend-dimension--slit-left { left: calc(50% - var(--legend-slit-center-offset)); }
.five-e-legend-dimension--slit-right { left: calc(50% + var(--legend-slit-center-offset)); }
.five-e-legend-dimension--slit-left i,
.five-e-legend-dimension--slit-right i { position: absolute; left: 50%; bottom: 5px; color: var(--course-accent, #e76446); font: 700 10px/1 serif; transform: translateX(-50%); }
.five-e-legend-dimension--centers { left: calc(50% - var(--legend-center-offset)); right: calc(50% - var(--legend-center-offset)); }
.five-e-legend-dimension--centers i { position: absolute; left: 50%; bottom: 5px; color: var(--course-accent, #e76446); font: 700 10px/1 serif; font-style: normal; transform: translateX(-50%); }
.five-e-legend-plane--double-slit { height: auto; min-height: 0; padding-bottom: 0; }
.five-e-legend-plane--double-slit::before {
    content: "";
    position: absolute;
    inset: var(--legend-mask-axis-safe-block-start, 16px) var(--legend-mask-axis-safe-inline, 6%) var(--legend-mask-axis-safe-block-end, 26px);
    z-index: 1;
    border: 1px solid #282321;
    border-radius: 3px;
    background: linear-gradient(135deg, #121110, #3a3431);
    box-shadow: 0 2px 7px rgba(28,22,20,.22);
}
.five-e-legend-plane--double-slit .five-e-legend-slit-aperture {
    top: calc(var(--legend-mask-axis-safe-block-start, 16px) + 10px);
    bottom: calc(var(--legend-mask-axis-safe-block-end, 26px) + 10px);
    max-width: 40%;
    box-sizing: border-box;
}
.five-e-legend-plane--double-slit .five-e-legend-dimension { opacity: .46; }
.five-e-legend-plane--double-slit .five-e-legend-dimension.is-active { opacity: 1; filter: saturate(1.2); }
.five-e-legend-plane--double-slit .five-e-legend-dimension--centers { top: 74px; }
.five-e-legend-local-axis {
    position: absolute;
    left: 10px;
    top: 8px;
    z-index: 4;
    color: #7d6d67;
    font: 600 10px/1.2 "Microsoft YaHei UI", sans-serif;
}
.five-e-legend-double-slit-readout {
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 8px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
}
.five-e-legend-double-slit-readout span {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 5px;
    padding: 7px 9px;
    border: 1px solid color-mix(in srgb, var(--course-accent, #e76446) 20%, #eee5df);
    border-radius: 9px;
    color: #675a56;
    background: rgba(255,255,255,.76);
    font: 700 11px/1.2 "JetBrains Mono", monospace;
}
.five-e-legend-double-slit-readout span.is-active {
    border-color: var(--course-accent, #e76446);
    background: color-mix(in srgb, var(--course-accent, #e76446) 8%, #fff);
}
.five-e-legend-double-slit-readout i { color: var(--course-accent, #e76446); font-style: normal; }
.five-e-legend-double-slit-readout b { color: #675a56; font-family: "Microsoft YaHei UI", sans-serif; font-weight: 600; }
.five-e-legend-double-slit-readout em { color: #3f3835; font-style: normal; white-space: nowrap; }
.five-e-cloud-standard__parameter-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 6px;
}
.five-e-cloud-standard__parameter-row > * {
    padding: 10px 8px;
    border-top: 1px solid #eee4df;
    border-bottom: 1px solid #eee4df;
    background: rgba(255,255,255,.72);
}
.five-e-cloud-standard__parameter-row > :first-child {
    width: 30px;
    border-left: 1px solid #eee4df;
    border-radius: 10px 0 0 10px;
}
.five-e-cloud-standard__parameter-row > :last-child {
    border-right: 1px solid #eee4df;
    border-radius: 0 10px 10px 0;
}
.five-e-cloud-standard__parameter-row.is-active > * {
    border-color: color-mix(in srgb, var(--course-accent, #e76446) 48%, #eee4df);
    background: color-mix(in srgb, var(--course-accent, #e76446) 7%, #fff);
}
.five-e-cloud-standard__parameter-symbol {
    color: var(--course-accent, #e76446);
    font: 700 13px/1 "JetBrains Mono", monospace;
    text-align: center;
}
.five-e-cloud-standard__parameter-label { color: #655a56; font-size: 12px; }
.five-e-cloud-standard__parameter-value { text-align: right; white-space: nowrap; }
.five-e-cloud-standard__parameter-value strong { color: #332d2a; font: 700 13px/1 "JetBrains Mono", monospace; }
.five-e-cloud-standard__parameter-value span { margin-left: 4px; color: #897873; font-size: 10px; }
.five-e-legend-dimension--aperture {
    z-index: 3;
    left: calc(50% - var(--legend-aperture-size) / 2);
    top: 48px;
    width: var(--legend-aperture-size);
}
.five-e-legend-dimension--aperture i { position: absolute; left: 50%; bottom: 5px; color: var(--course-accent, #e76446); font: 700 10px/1 serif; font-style: normal; transform: translateX(-50%); }
.five-e-legend-plane output,
.five-e-legend-distance output,
.five-e-legend-wave output { position: absolute; right: 12px; top: 9px; color: var(--course-accent, #e76446); font: 700 12px/1.2 "JetBrains Mono", monospace; }
[data-legend-type="micro-width"] .five-e-legend-plane > output,
[data-legend-type="micro-distance"] .five-e-legend-plane > output,
[data-legend-type="aperture-size"] .five-e-legend-plane > output,
[data-legend-type="aperture-type"] .five-e-legend-plane > output { display: none; }
.five-e-legend-distance { position: absolute; inset: 0; z-index: 2; }
.five-e-legend-distance__beam { position: absolute; left: 42px; right: 42px; top: 58px; height: 2px; background: var(--course-accent, #e76446); }
.five-e-legend-distance__beam::before,
.five-e-legend-distance__beam::after { content: ""; position: absolute; top: -4px; width: 8px; height: 8px; border-top: 2px solid var(--course-accent, #e76446); border-right: 2px solid var(--course-accent, #e76446); }
.five-e-legend-distance__beam::before { left: 0; transform: rotate(-135deg); }
.five-e-legend-distance__beam::after { right: 0; transform: rotate(45deg); }
.five-e-legend-distance__start,
.five-e-legend-distance__end { position: absolute; top: 31px; width: 8px; height: 54px; border-radius: 3px; background: #4d4440; }
.five-e-legend-distance__start { left: 35px; }
.five-e-legend-distance__end { right: 35px; }
.five-e-legend-distance__start-label,
.five-e-legend-distance__end-label { position: absolute; bottom: 8px; max-width: 112px; color: #786863; font-size: 10px; }
.five-e-legend-distance__start-label { left: 12px; text-align: left; }
.five-e-legend-distance__end-label { right: 12px; text-align: right; }
[data-legend-type="coordinate-distance"] { min-height: 168px; }
.five-e-coordinate-distance { position: absolute; inset: 0; z-index: 2; padding: 0 8px 8px; }
.five-e-coordinate-distance svg { display: block; width: 100%; height: 164px; overflow: visible; }
.five-e-coordinate-distance__grid line { stroke: var(--coordinate-grid-color, #ddd5d0); stroke-width: .7; }
.five-e-coordinate-distance__axis { stroke: var(--coordinate-axis-color, #b65a42); stroke-width: 1.1; }
.five-e-coordinate-distance__tick { stroke: var(--coordinate-axis-color, #b65a42); stroke-width: 1.1; }
.five-e-coordinate-distance__tick-label { fill: var(--coordinate-tick-color, #705f59); font: 600 9px/1 "JetBrains Mono", monospace; }
.five-e-coordinate-distance__tick-label.is-x { text-anchor: middle; }
.five-e-coordinate-distance__tick-label.is-y { text-anchor: end; }
.five-e-coordinate-distance__axis-label,
.five-e-coordinate-distance__point-label { fill: color-mix(in srgb, var(--course-accent, #e76446) 78%, #4d403b); font: 700 9px/1 "JetBrains Mono", monospace; }
.five-e-coordinate-distance__axis-label { fill: var(--coordinate-label-color, #934936); font: 800 11px/1 "JetBrains Mono", monospace; }
.five-e-coordinate-distance__point-label.is-initial { fill: #8d817c; font-weight: 600; }
.five-e-coordinate-distance__point-label.is-current { fill: var(--course-accent, #e76446); }
.five-e-coordinate-distance__initial-line { stroke: #a99d97; stroke-width: 1; stroke-dasharray: 4 4; }
.five-e-coordinate-distance__current-line { stroke: var(--course-accent, #e76446); stroke-width: 2; }
.five-e-coordinate-distance__constraint { stroke: color-mix(in srgb, var(--course-accent, #e76446) 42%, #a99d97); stroke-width: 1; stroke-dasharray: 3 4; }
.five-e-coordinate-distance__arrow-head { fill: var(--course-accent, #e76446); }
.five-e-coordinate-distance__initial-point { fill: #fff; stroke: #a99d97; stroke-width: 2; }
.five-e-coordinate-distance__current-point { fill: #fff; stroke: var(--course-accent, #e76446); stroke-width: 3; }
.five-e-coordinate-distance__screen-point { fill: #4d4440; stroke: #fff; stroke-width: 2; }
.five-e-legend-wave { position: absolute; inset: 0; z-index: 2; }
.five-e-legend-wave svg { position: absolute; left: 46px; right: 58px; top: 18px; bottom: 26px; width: auto; height: auto; }
.five-e-legend-wave path { fill: none; stroke: var(--course-accent, #e76446); stroke-width: 2; }
.five-e-legend-wave line { stroke: #7d6d67; stroke-width: 1; }
.five-e-legend-wave .arrow { stroke: #7d6d67; stroke-width: 1; }
.five-e-legend-wave text { fill: #8f4b39; font: 700 13px/1 serif; text-anchor: middle; }
.five-e-legend-component-point { position: absolute; inset: 0; z-index: 2; }
.five-e-legend-component-point i { position: absolute; left: 50%; top: 50%; width: 12px; height: 12px; border: 3px solid var(--course-accent, #e76446); border-radius: 50%; background: #fff; box-shadow: 0 0 0 6px rgba(231,100,70,.12); transform: translate(-50%,-50%); }
.five-e-legend-component-point__coordinate { position: absolute; left: calc(50% + 10px); color: #776963; font: 600 8px/1 "JetBrains Mono", monospace; white-space: nowrap; }
.five-e-legend-component-point__coordinate.is-initial { top: calc(50% - 20px); color: #91847e; }
.five-e-legend-component-point__coordinate.is-current { top: calc(50% + 13px); color: var(--course-accent, #e76446); font-weight: 800; }
.five-e-mesh-magnifier {
    position: relative;
    min-height: 168px;
    overflow: hidden;
    border: 0;
    border-radius: 0;
    background: transparent;
}
.five-e-mesh-magnifier svg { display: block; width: 100%; height: 164px; }
.five-e-mesh-magnifier__grid line { stroke: var(--coordinate-grid-color, #ddd5d0); stroke-width: .7; }
.five-e-mesh-magnifier__axis,
.five-e-mesh-magnifier__tick { stroke: var(--coordinate-axis-color, #b65a42); stroke-width: 1.1; }
.five-e-mesh-magnifier__tick-label { fill: var(--coordinate-tick-color, #705f59); font: 600 9px/1 "JetBrains Mono", monospace; }
.five-e-mesh-magnifier__tick-label.is-x { text-anchor: middle; }
.five-e-mesh-magnifier__tick-label.is-y { text-anchor: end; }
.five-e-mesh-magnifier__initial-center { fill: #fff; stroke: #9b8f89; stroke-width: 2; }
.five-e-mesh-magnifier__center { fill: #fff; stroke: var(--course-accent, #e76446); stroke-width: 2.5; }
.five-e-mesh-magnifier__axis-label { fill: var(--coordinate-label-color, #934936); font: 800 11px/1 "JetBrains Mono", monospace; }
.five-e-mesh-magnifier__coordinate-label { font: 700 8.5px/1 "JetBrains Mono", monospace; }
.five-e-mesh-magnifier__coordinate-label.is-initial { fill: #8f837d; font-weight: 600; }
.five-e-mesh-magnifier__coordinate-label.is-current { fill: var(--course-accent, #e76446); }
[data-stage-coordinate-projection] { min-height: 168px; }
.five-e-mesh-magnifier__axis { stroke: color-mix(in srgb, var(--course-accent, #e76446) 58%, #7e716c); stroke-width: 1; }
.five-e-mesh-magnifier__shape path {
    fill: color-mix(in srgb, var(--course-accent, #e76446) 18%, rgba(255,255,255,.78));
    stroke: var(--course-accent, #e76446);
    stroke-width: 1.4;
    vector-effect: non-scaling-stroke;
}
.five-e-mesh-magnifier__axis-label { fill: #796b66; font: 700 10px/1 "JetBrains Mono", monospace; }
.five-e-mesh-magnifier__axis-label.is-horizontal { text-anchor: end; }
.five-e-mesh-magnifier__measurements {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    padding: 0 8px 8px;
}
.five-e-mesh-magnifier__measurements span {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: baseline;
    gap: 5px;
    padding: 7px 8px;
    border-radius: 8px;
    color: #554b47;
    background: rgba(255,255,255,.76);
    font-family: "JetBrains Mono", monospace;
}
.five-e-mesh-magnifier__measurements i { color: var(--course-accent, #e76446); font-size: 11px; font-style: normal; font-weight: 700; }
.five-e-mesh-magnifier__measurements b { text-align: right; font-size: 12px; }
.five-e-mesh-magnifier__measurements em { color: #81716b; font-size: 10px; font-style: normal; }
@media (max-width: 700px) {
    .five-e-legend-cloud__card {
        width: min(232px, calc(100vw - 24px));
        padding: 12px;
    }
    .five-e-legend-cloud__card output { font-size: 16px; }
    .five-e-legend-cloud__summary { align-items: flex-start; flex-direction: column; gap: 5px; }
    .five-e-legend-cloud__definition { white-space: normal; }
}
.five-e-shell.is-association-disabled .five-e-configured-readout button { cursor: default; }
.five-e-shell.is-association-disabled .five-e-configured-readout button > i { opacity: .32; }
.five-e-control-options { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 7px; }
.five-e-control-options button { min-height: 38px; border-radius: 9px; }
.five-e-control-options button.is-active { border-color: var(--course-accent, #5e8fe5); color: var(--course-accent, #5e8fe5); background: var(--five-surface); }

.five-e-data__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.five-e-data__grid span { display: grid; gap: 4px; padding: 11px; border: 1px solid color-mix(in srgb, var(--course-accent, #5e8fe5) 22%, white); border-radius: 9px; background: rgba(255,255,255,.52); }
.five-e-data__grid small { color: var(--five-muted); font-size: 11px; }
.five-e-data__grid b { color: var(--course-accent, #5e8fe5); font: 13px/1.2 "Cascadia Mono", Consolas, monospace; }
.five-e-data__vector { display: grid; grid-template-columns: repeat(3,1fr); gap: 6px; }
.five-e-data__vector span { padding: 8px 5px; border-radius: 7px; color: var(--five-muted); background: var(--five-surface); font: 10px/1.3 "Cascadia Mono", Consolas, monospace; text-align: center; }
.five-e-data__vector b { display: block; margin-top: 3px; color: var(--course-accent, #5e8fe5); }

.five-e-panel__action {
    position: relative;
    display: inline-grid;
    flex: 0 0 34px;
    place-items: center;
    box-sizing: border-box;
    min-width: 34px;
    min-height: 28px;
    width: 34px;
    height: 28px;
    padding: 0 !important;
    border: 1px solid color-mix(in srgb, var(--course-accent, #5e8fe5) 38%, white);
    border-radius: 999px !important;
    color: var(--course-accent, #5e8fe5);
    background: transparent;
    cursor: pointer;
}
.five-e-task__meta .five-e-panel__visibility { margin-left: 0; }
.five-e-task__window-actions .five-e-panel__action::after { right: auto; left: 0; }
.five-e-panel__action svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.five-e-panel__action:hover,
.five-e-panel__action:focus-visible,
.five-e-panel__action.is-active { color: #fff; border-color: var(--course-accent, #5e8fe5); background: var(--course-accent, #5e8fe5); outline: none; }
.five-e-panel__action.is-disabled,
.five-e-panel__action.is-disabled:hover {
    color: var(--five-muted);
    border-color: color-mix(in srgb, var(--five-muted) 28%, white);
    background: transparent;
    cursor: not-allowed;
    opacity: .55;
}
.five-e-panel__action::after {
    content: attr(data-tooltip);
    position: absolute;
    top: calc(100% + 7px);
    right: 0;
    z-index: 12;
    width: max-content;
    max-width: 120px;
    padding: 5px 8px;
    border-radius: 6px;
    color: #fff;
    background: rgba(39, 43, 47, .94);
    box-shadow: 0 6px 18px rgba(53,67,84,.18);
    font: 11px/1.35 "Microsoft YaHei UI", sans-serif;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-3px);
    transition: opacity 120ms ease, transform 120ms ease, visibility 120ms ease;
    pointer-events: none;
}
.five-e-panel__action:hover::after,
.five-e-panel__action:focus-visible::after { opacity: 1; visibility: visible; transform: translateY(0); }
.five-e-task.is-pinned,
.five-e-tool-dock.is-pinned { box-shadow: 0 20px 52px rgba(53,67,84,.2), 0 0 0 2px color-mix(in srgb, var(--course-accent, #5e8fe5) 18%, transparent); }

.five-e-task,
.five-e-tool-dock { transition: opacity 180ms ease, visibility 180ms ease, box-shadow 180ms ease; }
.five-e-task.is-auto-hidden,
.five-e-tool-dock.is-auto-hidden { opacity: 0; visibility: hidden; pointer-events: none; }

.five-e-window-sensor {
    position: fixed;
    z-index: 39;
    display: grid;
    place-items: center;
    gap: 5px;
    width: 38px;
    min-height: 126px;
    padding: 12px 6px;
    border: 1px solid color-mix(in srgb, var(--course-accent, #5e8fe5) 46%, white);
    color: var(--course-accent, #5e8fe5);
    background: rgba(255,255,255,.94);
    box-shadow: 0 12px 34px rgba(53,67,84,.17);
    font-family: inherit;
    cursor: pointer;
    pointer-events: auto;
}
.five-e-window-sensor[hidden] { display: none; }
.five-e-window-sensor span,
.five-e-window-sensor small { writing-mode: vertical-rl; letter-spacing: .08em; }
.five-e-window-sensor span { font-size: 12px; font-weight: 700; }
.five-e-window-sensor small {
    color: var(--five-muted);
    font-size: 14px;
    font-weight: 650;
    line-height: 1.35;
}
.five-e-window-sensor:hover { color: #fff; border-color: var(--course-accent, #5e8fe5); background: var(--course-accent, #5e8fe5); }
.five-e-window-sensor:hover small { color: rgba(255,255,255,.78); }
.five-e-window-sensor:disabled,
.five-e-window-sensor.is-disabled {
    color: var(--five-muted);
    border-color: color-mix(in srgb, var(--five-muted) 24%, white);
    background: rgba(255,255,255,.88);
    box-shadow: 0 8px 22px rgba(53,67,84,.1);
    cursor: not-allowed;
    filter: saturate(.25);
    opacity: .68;
}
.five-e-window-sensor:disabled:hover,
.five-e-window-sensor.is-disabled:hover {
    color: var(--five-muted);
    border-color: color-mix(in srgb, var(--five-muted) 24%, white);
    background: rgba(255,255,255,.88);
}
.five-e-window-sensor:disabled small,
.five-e-window-sensor.is-disabled small,
.five-e-window-sensor:disabled:hover small,
.five-e-window-sensor.is-disabled:hover small { color: var(--five-muted); }
#fiveECourse.has-empty-observation .five-e-window-sensor--tools,
#fiveECourse.has-empty-observation .five-e-window-sensor--tools[hidden] {
    display: grid !important;
    visibility: visible;
    pointer-events: none;
}
.five-e-window-sensor--task { left: 0; bottom: 16%; border-left: 0; border-radius: 0 10px 10px 0; }
.five-e-window-sensor--tools { top: 50%; right: 0; border-right: 0; border-radius: 10px 0 0 10px; transform: translateY(-50%); }

.five-e-record-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.five-e-record-summary > span { position: relative; display: grid; gap: 4px; min-width: 0; padding: 10px 8px; border: 1px solid color-mix(in srgb, var(--course-accent, #5e8fe5) 22%, white); border-radius: 9px; background: rgba(255,255,255,.58); }
.five-e-record-summary small { color: var(--five-muted); font-size: 12px; line-height: 1.4; }
.five-e-record-summary b { color: var(--course-accent, #5e8fe5); font: 700 16px/1.25 "IBM Plex Mono", "Cascadia Mono", monospace; }
.five-e-record-summary em { position: absolute; right: 7px; bottom: 10px; color: var(--five-muted); font-size: 11px; font-style: normal; }
.five-e-record-note { color: var(--five-muted); font-size: 12px; line-height: 1.6; }
.five-e-record-table-wrap { max-height: 320px; overflow: auto; border: 1px solid color-mix(in srgb, var(--course-accent, #5e8fe5) 20%, white); border-radius: 9px; background: rgba(255,255,255,.5); }
.five-e-record-table { width: 100%; border-collapse: collapse; table-layout: fixed; color: var(--five-ink); font-size: 12px; line-height: 1.45; }
.five-e-record-table th { position: sticky; z-index: 1; top: 0; padding: 9px 7px; color: var(--five-muted); background: color-mix(in srgb, var(--five-surface) 88%, white); font-size: 12px; font-weight: 600; text-align: left; }
.five-e-record-table td { padding: 9px 7px; overflow-wrap: anywhere; border-top: 1px solid color-mix(in srgb, var(--course-accent, #5e8fe5) 14%, white); font-size: 12px; vertical-align: top; white-space: normal; }
.five-e-record-table th:nth-child(1), .five-e-record-table td:nth-child(1) { width: 34px; }
.five-e-record-table th:nth-child(2), .five-e-record-table td:nth-child(2) { width: 88px; }
.five-e-record-table th:nth-child(4), .five-e-record-table td:nth-child(4) { width: 58px; }
.five-e-record-table td:nth-child(1) { color: var(--course-accent, #5e8fe5); font-family: "Cascadia Mono", Consolas, monospace; }
.five-e-record-table td:nth-child(3) { color: var(--five-muted); }
.five-e-record-table tr.is-current { background: color-mix(in srgb, var(--course-soft, #edf4ff) 72%, white); }
.five-e-record-table tr.is-complete td:nth-child(4) span { color: #2d9b67; }
.five-e-record-table tr.is-current td:nth-child(4) span { color: var(--course-accent, #5e8fe5); }

.five-e-evidence__list { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.five-e-evidence__list li { display: grid; grid-template-columns: 28px 1fr; align-items: center; gap: 8px; padding: 9px 10px; border: 1px solid color-mix(in srgb, var(--course-accent, #5e8fe5) 20%, white); border-radius: 8px; color: var(--five-ink); background: rgba(255,255,255,.5); font-size: 13px; line-height: 1.5; }
.five-e-evidence__list b { color: var(--course-accent, #5e8fe5); font: 600 12px/1.3 "IBM Plex Mono", "Cascadia Mono", monospace; }
.five-e-tool-empty { padding: 18px 10px; color: var(--five-muted); font-size: 13px; line-height: 1.65; text-align: center; }

.five-e-tool-dock.is-collapsed { width: 210px; }
.five-e-tool-dock.is-collapsed > :not(.five-e-tool-dock__header) { display: none; }
.five-e-tool-dock.is-dragging { transition: none; box-shadow: 0 28px 86px rgba(0,0,0,.3); }
.five-e-tool-dock.is-dragging .five-e-tool-dock__header { cursor: grabbing; }

.five-e-task.is-resizing,
.five-e-tool-dock.is-resizing {
    transition: none;
    user-select: none;
}

.five-e-task { min-width: 320px; min-height: 220px; max-width: min(680px, calc(100vw - 20px)); }

.five-e-map-return {
    width: 44px !important;
    min-width: 44px !important;
    height: 44px !important;
    min-height: 44px !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    gap: 0 !important;
    border-radius: 50% !important;
    font-size: 0 !important;
    line-height: 1;
}

.five-e-map-return > span {
    display: block;
    font-size: 23px !important;
    font-weight: 700;
    line-height: 1;
}

.five-e-map-return > strong { display: none !important; }

@media (min-width: 821px) {
    /* Task guidance follows its current step content instead of retaining a
       stale/manual height from a longer step. */
    .five-e-task {
        height: auto !important;
        min-height: 0 !important;
        max-height: calc(100vh - 32px) !important;
        overflow-x: hidden;
        overflow-y: auto;
    }
}
.five-e-task[data-task-guide-style="young-double-slit"] {
    --course-accent: #e76446;
    --course-soft: #fff0e8;
}
.five-e-tool-dock { min-width: 300px; min-height: 280px; max-width: min(620px, calc(100vw - 20px)); }

@media (min-width: 821px) {
    /* Keep observation windows content-sized, including after a prior resize. */
    .five-e-tool-dock:has([data-tool-panel="observe"].is-active) {
        height: auto !important;
        min-height: 0 !important;
        max-height: calc(100vh - 32px) !important;
        grid-template-rows: auto auto;
    }

    .five-e-tool-dock:has([data-tool-panel="observe"].is-active) .five-e-tool-dock__body {
        height: auto !important;
        min-height: 0 !important;
        max-height: calc(100vh - 96px);
        overflow-x: hidden;
        overflow-y: auto;
    }
}

.five-e-panel__resize {
    position: absolute;
    z-index: 8;
    right: 5px;
    bottom: 5px;
    width: 18px;
    height: 18px;
    border-right: 2px solid color-mix(in srgb, var(--course-accent, #5e8fe5) 68%, white);
    border-bottom: 2px solid color-mix(in srgb, var(--course-accent, #5e8fe5) 68%, white);
    border-radius: 0 0 7px 0;
    cursor: nwse-resize;
    touch-action: none;
    opacity: .58;
    transition: opacity 150ms ease, border-color 150ms ease;
}

.five-e-panel__resize::before {
    content: "";
    position: absolute;
    right: 4px;
    bottom: 4px;
    width: 7px;
    height: 7px;
    border-right: 1px solid currentColor;
    border-bottom: 1px solid currentColor;
}

.five-e-panel__resize:hover,
.five-e-panel__resize:active {
    border-color: var(--course-accent, #5e8fe5);
    opacity: 1;
}

.five-e-panel__resize--nw {
    inset: 5px auto auto 5px;
    border: 0;
    border-top: 2px solid color-mix(in srgb, var(--course-accent, #5e8fe5) 68%, white);
    border-left: 2px solid color-mix(in srgb, var(--course-accent, #5e8fe5) 68%, white);
    border-radius: 7px 0 0;
    cursor: nwse-resize;
}

.five-e-panel__resize--ne {
    inset: 5px 5px auto auto;
    border: 0;
    border-top: 2px solid color-mix(in srgb, var(--course-accent, #5e8fe5) 68%, white);
    border-right: 2px solid color-mix(in srgb, var(--course-accent, #5e8fe5) 68%, white);
    border-radius: 0 7px 0 0;
    cursor: nesw-resize;
}

.five-e-panel__resize--sw {
    inset: auto auto 5px 5px;
    border: 0;
    border-bottom: 2px solid color-mix(in srgb, var(--course-accent, #5e8fe5) 68%, white);
    border-left: 2px solid color-mix(in srgb, var(--course-accent, #5e8fe5) 68%, white);
    border-radius: 0 0 0 7px;
    cursor: nesw-resize;
}

.five-e-panel__resize--se {
    inset: auto 5px 5px auto;
}

.five-e-panel__resize--nw::before {
    inset: 4px auto auto 4px;
    border: 0;
    border-top: 1px solid currentColor;
    border-left: 1px solid currentColor;
}

.five-e-panel__resize--ne::before {
    inset: 4px 4px auto auto;
    border: 0;
    border-top: 1px solid currentColor;
    border-right: 1px solid currentColor;
}

.five-e-panel__resize--sw::before {
    inset: auto auto 4px 4px;
    border: 0;
    border-bottom: 1px solid currentColor;
    border-left: 1px solid currentColor;
}

.five-e-panel__resize--se::before {
    inset: auto 4px 4px auto;
}

.five-e-task.is-collapsed .five-e-panel__resize,
.five-e-tool-dock.is-collapsed .five-e-panel__resize { display: none; }

@media (max-width: 820px) {
    .five-e-map-return {
        top: 10px;
        right: 58px;
        left: auto;
        width: 40px !important;
        min-width: 40px !important;
        height: 40px !important;
        min-height: 40px !important;
        padding: 0 !important;
    }
    .five-e-component-inspector { top: 4px; left: 10px; width: min(300px, calc(100vw - 20px)); max-height: 42vh; }
    .five-e-component-inspector.is-collapsed { width: 180px; }
    .five-e-component-inspector__body { max-height: calc(42vh - 43px); }
    .five-e-task { right: 10px; bottom: 10px; left: 10px; width: auto; }
    .five-e-tool-dock { top: 58px; right: 10px; width: min(330px, calc(100vw - 20px)); max-height: 42vh; transform: none; }
    .five-e-tool-dock__header { cursor: default; touch-action: auto; }
    .five-e-task,
    .five-e-tool-dock { min-width: 0; min-height: 0; height: auto !important; }
    .five-e-panel__resize { display: none; }
    .five-e-window-sensor { min-height: 92px; }
}

/* Popular-science shared panel skin -------------------------------------- */
/*
 * Keep course content and device behavior independent while giving every
 * course the same solid window treatment as Cathode Ray Discovery.
 */
:root,
.five-e-shell {
    --course-accent: var(--science-course-accent, #e76446) !important;
    --course-soft: var(--science-course-soft, #fff0e8) !important;
    --five-surface: color-mix(in srgb, var(--course-soft) 22%, #fffaf7);
    --five-surface-strong: color-mix(in srgb, var(--course-soft) 62%, white);
    --five-ink: #302b28;
    --five-muted: #6d655f;
    --five-soft-ink: #8a817a;
}

.five-e-task,
.five-e-tool-dock {
    --course-accent: inherit;
    --course-soft: inherit;
    --five-surface: color-mix(in srgb, var(--course-soft) 22%, #fffaf7);
    --five-surface-strong: color-mix(in srgb, var(--course-soft) 62%, white);
    border-color: color-mix(in srgb, var(--course-accent) 34%, white);
    color: #302b28;
    background: color-mix(in srgb, var(--course-soft) 22%, #fffaf7);
    box-shadow: 0 20px 52px rgba(82, 48, 37, .2), 0 0 0 1px #fff inset;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.five-e-task__look,
.five-e-tool-tabs button.is-active,
.five-e-tool-dock .five-e-configured-readout,
.five-e-tool-dock .five-e-data__grid span,
.five-e-tool-dock .five-e-record-summary > span {
    background-color: color-mix(in srgb, var(--course-soft) 62%, white);
}

.five-e-tool-dock__header,
.five-e-tool-tabs,
.five-e-tool-dock__body,
.five-e-tool-dock .five-e-tool-panel {
    background-color: color-mix(in srgb, var(--course-soft) 22%, #fffaf7);
}

/* Unified observe/control subwindows ------------------------------------ */
.five-e-tool-dock [data-tool-panel="observe"],
.five-e-tool-dock [data-tool-panel="control"] {
    align-content: start;
    gap: 9px !important;
}

.five-e-tool-dock [data-tool-panel="observe"] {
    --five-e-observe-row-height: 60px;
    --five-e-observe-gap: 8px;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-auto-flow: row;
    grid-auto-rows: auto;
    gap: var(--five-e-observe-gap) !important;
    min-width: 0;
}

.five-e-tool-dock [data-tool-panel="observe"].has-context-inspector {
    display: grid;
    grid-template-columns: minmax(0, 1fr) !important;
    align-content: start;
    gap: 0 !important;
}

.five-e-tool-dock [data-tool-panel="observe"].has-context-inspector > :not(.five-e-legend-cloud) {
    display: none !important;
}

.five-e-tool-dock [data-tool-panel="observe"] > .five-e-legend-cloud.is-context-inspector {
    position: static;
    inset: auto;
    width: 100%;
    height: auto;
    min-width: 0;
}

.five-e-tool-dock [data-tool-panel="observe"] > .five-e-legend-cloud.is-context-inspector .five-e-legend-cloud__card {
    position: relative !important;
    inset: auto !important;
    width: 100% !important;
    min-width: 0;
    max-width: none;
    max-height: none;
    transform: none !important;
}

.five-e-tool-dock [data-tool-panel="observe"] > .five-e-legend-cloud.is-context-inspector :is(
    .five-e-legend-cloud__panel,
    .five-e-legend-cloud__visual,
    .five-e-context-adjustment,
    .five-e-context-inspector__relation
) {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
}

.five-e-tool-dock [data-tool-panel="observe"] > form,
.five-e-tool-dock [data-tool-panel="observe"] > fieldset,
.five-e-tool-dock [data-tool-panel="observe"] .five-e-configured-readout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--five-e-observe-gap);
    width: 100%;
    min-width: 0;
    margin: 0;
}

.five-e-tool-dock [data-tool-panel="observe"] > fieldset {
    padding: 0;
    border: 0;
}

.five-e-tool-dock [data-tool-panel="observe"] > .five-e-tool-panel__intro,
.five-e-tool-dock [data-tool-panel="control"] > .five-e-tool-panel__intro {
    display: none !important;
}

.five-e-control-group {
    display: none;
}

.five-e-control-group.is-active {
    display: grid;
    gap: 12px;
    padding: 12px;
    border: 1px solid color-mix(in srgb, var(--course-accent) 24%, white);
    border-radius: 11px;
    background: #fff;
}

.five-e-configured-readout {
    gap: 9px;
}

.five-e-observation-option {
    width: 100%;
    height: var(--five-e-observe-row-height, 60px);
    min-height: var(--five-e-observe-row-height, 60px);
    max-height: var(--five-e-observe-row-height, 60px);
    box-sizing: border-box;
    margin: 0;
    padding: 10px 12px !important;
    border: 1px solid color-mix(in srgb, var(--course-accent) 24%, white) !important;
    border-radius: 11px !important;
    color: #423b37 !important;
    background: #fff !important;
    box-shadow: none !important;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.4;
    overflow: hidden;
}

.five-e-observation-option:hover,
.five-e-observation-option:focus-within,
.five-e-observation-option:focus-visible {
    border-color: var(--course-accent) !important;
    background: color-mix(in srgb, var(--course-soft) 62%, white) !important;
}

.five-e-observation-option--readout {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto 12px;
    align-items: center;
    gap: 12px;
    text-align: left;
}

.five-e-tool-dock [data-tool-panel="observe"] .five-e-configured-readout button {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto 12px;
    align-items: center;
    gap: 12px;
    height: var(--five-e-observe-row-height);
    min-height: var(--five-e-observe-row-height);
    max-height: var(--five-e-observe-row-height);
}

.five-e-tool-dock [data-tool-panel="observe"] .five-e-display__toggle.five-e-observation-option {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 38px;
    align-items: center;
    gap: 12px;
}

.five-e-tool-dock [data-tool-panel="observe"] .five-e-display__toggle > span,
.five-e-tool-dock [data-tool-panel="observe"] .five-e-observation-option--readout > dt,
.five-e-tool-dock [data-tool-panel="observe"] .five-e-configured-readout button > span {
    min-width: 0;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.five-e-tool-dock [data-tool-panel="observe"] .five-e-display__modes {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--five-e-observe-gap);
    width: 100%;
}

.five-e-tool-dock [data-tool-panel="observe"] .five-e-display__modes > button {
    display: flex !important;
    align-items: center;
    justify-content: center;
    height: var(--five-e-observe-row-height);
    min-height: var(--five-e-observe-row-height);
    max-height: var(--five-e-observe-row-height);
    text-align: center;
}

.five-e-observation-option--readout > dt {
    min-width: 0;
    margin: 0;
    color: var(--five-ink);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
}

.five-e-observation-option--readout > dd {
    margin: 0;
    color: var(--course-accent, #e76446);
    font: 700 15px/1.35 "IBM Plex Mono", "Cascadia Mono", monospace;
    white-space: nowrap;
}

.five-e-observation-option--readout::after {
    content: "";
    width: 7px;
    height: 7px;
    border: 1px solid color-mix(in srgb, var(--course-accent, #e76446) 58%, white);
    border-radius: 50%;
}

/* Bragg steps 1 and 3: keep both readout cards on a single row. */
#fiveECourse .five-e-display .five-e-configured-readout[data-bragg-layout="inline-readouts"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

#fiveECourse [data-bragg-layout="inline-readouts"] > .five-e-observation-option--readout {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto;
    align-content: center;
    gap: 1px;
    min-width: 0;
    padding: 6px 9px !important;
}

#fiveECourse [data-bragg-layout="inline-readouts"] > .five-e-observation-option--readout::after {
    display: none;
}

/* Step 1: source status and detector reading belong at the end of their label row. */
#fiveECourse [data-bragg-status-layout="inline"] > .five-e-observation-option--readout {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto;
    gap: 8px;
}

#fiveECourse [data-bragg-status-layout="inline"] > .five-e-observation-option--readout > dt {
    white-space: nowrap;
}

#fiveECourse [data-bragg-status-layout="inline"] > .five-e-observation-option--readout > dd {
    justify-self: end;
    text-align: right;
}

@media (max-width: 620px) {
    .five-e-tool-dock [data-tool-panel="observe"] {
        --five-e-observe-row-height: 56px;
    }
}

.five-e-control-range__unit::before {
    content: " (";
}

.five-e-control-range__unit::after {
    content: ")";
}

/* All course chrome follows the selected learning-map card palette. */
.five-e-task,
.five-e-tool-dock,
.five-e-controls,
.five-e-display,
.five-e-component-inspector,
.five-e-legend-cloud__card,
.five-e-map-return,
.five-e-window-sensor {
    border-color: color-mix(in srgb, var(--course-accent) 36%, white);
    background: linear-gradient(145deg, rgba(255,255,255,.98), color-mix(in srgb, var(--course-soft) 54%, white));
}

.five-e-task__meta,
.five-e-tool-dock__header,
.five-e-controls header,
.five-e-display header,
.five-e-component-inspector__header strong,
.five-e-legend-cloud__card strong {
    color: var(--course-accent);
}

/* Vertical inquiry tool dock ---------------------------------------------- */
.five-e-tool-dock {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    width: min(340px, calc(100vw - 20px));
    overflow: hidden;
    transition: width .22s ease, max-height .22s ease, box-shadow .22s ease;
}

.five-e-tool-dock__header {
    grid-column: 1 / -1;
    grid-row: 1;
}

.five-e-tool-tabs {
    display: none !important;
    grid-column: 1;
    grid-row: 2;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 8px;
    padding: 12px 8px;
    border-right: 1px solid color-mix(in srgb, var(--course-accent) 18%, white);
}

.five-e-tool-tabs button {
    min-width: 48px;
    min-height: 72px;
    height: auto;
    max-height: none;
    padding: 12px 8px;
    writing-mode: horizontal-tb;
    letter-spacing: .12em;
    border-radius: 16px;
}

.five-e-tool-dock__body {
    grid-column: 1;
    grid-row: 2;
    min-width: 0;
    overflow: auto;
}

.five-e-adjustment-panel {
    align-content: start;
    gap: 14px;
}

.five-e-adjustment-panel.is-active {
    display: grid;
}

.five-e-adjustment-panel.is-active > .five-e-controls.is-visible {
    display: grid !important;
}

.five-e-adjustment-panel.is-active > .five-e-display:not([hidden]) {
    display: grid !important;
}

.five-e-adjustment-panel > .five-e-controls,
.five-e-adjustment-panel > .five-e-display {
    position: static;
    inset: auto;
    width: auto;
    min-width: 0;
    max-width: none;
    max-height: none;
    margin: 0;
    padding: 0;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
}

.five-e-response {
    display: grid;
    gap: 10px;
    padding-top: 14px !important;
    border-top: 1px solid color-mix(in srgb, var(--course-accent) 20%, white) !important;
}

.five-e-response[hidden] {
    display: none !important;
}

.five-e-response__heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.five-e-response__heading strong {
    color: var(--course-accent);
    font-size: 17px;
}

.five-e-response__heading small {
    color: #8a7d76;
    font-size: 12px;
}

.five-e-tool-dock.is-collapsed {
    position: fixed !important;
    z-index: 42;
    top: 50% !important;
    right: 0 !important;
    bottom: auto !important;
    left: auto !important;
    width: 54px !important;
    min-width: 54px;
    height: auto !important;
    min-height: 0;
    max-height: none !important;
    overflow: visible;
    transform: translateY(-50%) !important;
    border: 0;
    border-radius: 14px 0 0 14px;
    background: transparent;
    box-shadow: none;
}

.five-e-tool-dock.is-collapsed .five-e-tool-dock__header,
.five-e-tool-dock.is-collapsed .five-e-tool-dock__body,
.five-e-tool-dock.is-collapsed .five-e-panel__resize {
    display: none !important;
}

.five-e-tool-dock.is-collapsed .five-e-tool-tabs {
    display: flex !important;
    grid-column: 1;
    grid-row: 1;
    flex-direction: column;
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    gap: 2px;
    padding: 5px 0 5px 5px;
    border: 1px solid color-mix(in srgb, var(--course-accent) 32%, white);
    border-right: 0;
    border-radius: 14px 0 0 14px;
    background: color-mix(in srgb, var(--course-soft) 28%, #fffaf7);
    box-shadow: -8px 12px 28px rgba(82, 48, 37, .16);
}
.five-e-tool-dock.is-collapsed {
    display: none !important;
}

.five-e-tool-dock.is-collapsed .five-e-tool-tabs button {
    display: block !important;
    width: 100%;
    height: auto;
    min-width: 48px;
    min-height: 74px;
    max-height: none;
    padding: 9px 7px;
    writing-mode: vertical-rl;
    text-orientation: upright;
    letter-spacing: .16em;
    border-radius: 10px 0 0 10px;
    visibility: visible;
    opacity: 1;
}

@media (max-width: 820px) {
    .five-e-tool-dock {
        grid-template-columns: minmax(0, 1fr);
        width: min(340px, calc(100vw - 20px));
    }

    .five-e-tool-dock.is-collapsed {
        right: 0 !important;
        left: auto;
        width: 52px !important;
        min-width: 52px;
    }

    .five-e-tool-tabs button {
        min-width: 42px;
        min-height: 62px;
        padding: 10px 5px;
    }
}

/* Shared guided-start standard: equal rails, a clear first action, and live task feedback. */
#fiveECourse {
    --five-e-collapsed-rail-width: 41px;
}

.five-e-window-sensor--task,
.five-e-window-sensor--tools {
    box-sizing: border-box;
    width: var(--five-e-collapsed-rail-width) !important;
    min-width: var(--five-e-collapsed-rail-width) !important;
    max-width: var(--five-e-collapsed-rail-width) !important;
    padding-inline: 8px;
}

.five-e-window-sensor--task.is-start-cue {
    color: #fff;
    background: var(--course-accent, #e36749);
    border-color: color-mix(in srgb, var(--course-accent, #e36749) 78%, white);
    box-shadow: 0 14px 34px color-mix(in srgb, var(--course-accent, #e36749) 32%, transparent);
    animation: five-e-start-cue 1.8s ease-in-out infinite;
}

.five-e-window-sensor--task.is-start-cue small {
    color: inherit;
}

.five-e-task__live {
    display: block;
    margin-top: 8px;
    color: var(--course-accent, #e36749);
    font-weight: 700;
}

@keyframes five-e-start-cue {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(6px); }
}

@media (max-width: 820px) {
    #fiveECourse {
        --five-e-collapsed-rail-width: 39px;
    }

    #fiveECourse .five-e-window-sensor--tools {
        top: 24%;
    }

    #fiveECourse .five-e-window-sensor--task {
        top: 76%;
        bottom: auto;
        transform: translateY(-50%);
    }
}

@media (prefers-reduced-motion: reduce) {
    .five-e-window-sensor--task.is-start-cue {
        animation: none;
    }
}

#fiveECourse .five-e-window-sensor--task [data-window-sensor-label="task"],
#fiveECourse .five-e-window-sensor--tools [data-window-sensor-label="tools"] {
    font-size: 1.25em;
}

/* Desktop learning flow: keep observation and guidance in one left-side scan path. */
@media (min-width: 821px) {
    #fiveECourse .five-e-tool-dock:not(.is-collapsed) {
        top: 16px;
        right: auto;
        bottom: auto;
        left: 76px;
        width: min(390px, calc(100vw - 496px));
        min-height: 0;
        max-height: calc(50vh - 24px) !important;
        transform: none;
    }

    #fiveECourse .five-e-task {
        top: calc(50vh + 8px);
        right: auto;
        bottom: auto;
        left: 76px;
        width: min(390px, calc(100vw - 496px));
        min-height: 0 !important;
        max-height: calc(50vh - 24px) !important;
    }

    #fiveECourse .five-e-task:has(> [data-assignment-report]) {
        top: 16px;
        height: calc(100vh - 32px) !important;
        max-height: calc(100vh - 32px) !important;
    }

    #fiveECourse .five-e-window-sensor--tools {
        top: 23%;
        right: auto;
        left: 0;
        border-right: 1px solid color-mix(in srgb, var(--course-accent, #5e8fe5) 46%, white);
        border-left: 0;
        border-radius: 0 10px 10px 0;
        transform: translateY(-50%);
    }

    #fiveECourse .five-e-window-sensor--task {
        top: 73%;
        bottom: auto;
        transform: translateY(-50%);
    }
}

/* Single-window courses keep every learner interaction inside the task guide.
   Legacy hosts remain in the DOM for providers that use them as render targets,
   but they must never surface as a second window during any task step.
   The optional component inspector is a separate developer tool: its global
   toggle and [hidden] state control visibility, not the learner layout. */
#fiveECourse.has-unified-step-window > .five-e-tool-dock,
#fiveECourse.has-unified-step-window > [data-window-sensor="tools"],
#fiveECourse.has-unified-step-window > .five-e-feedback,
#fiveECourse.has-unified-step-window > .five-e-feedback-sensor,
#fiveECourse.has-unified-step-window > .five-e-legend-cloud {
    display: none !important;
}

#fiveECourse .five-e-task[data-step-window-mode="unified"] {
    display: block;
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-gutter: stable both-edges;
}

#fiveECourse .five-e-task[data-step-window-mode="unified"] .five-e-task__region {
    position: relative;
    padding: 12px 0 0;
    border-top: 1px solid color-mix(in srgb, var(--course-accent, #5e8fe5) 22%, transparent);
}

#fiveECourse .five-e-task[data-step-window-mode="unified"] .five-e-task__region:first-child {
    padding-top: 0;
    border-top: 0;
}

#fiveECourse .five-e-task[data-step-window-mode="unified"] .five-e-task__region[hidden] {
    display: none !important;
}

#fiveECourse .five-e-task[data-step-window-mode="unified"] .five-e-task__feedback {
    box-sizing: border-box;
    width: 100%;
    margin-top: 12px;
    padding: 12px 14px;
    border: 1px solid color-mix(in srgb, var(--course-accent, #5e8fe5) 38%, white);
    border-radius: 12px;
    color: var(--five-e-text, #17324d);
    background: color-mix(in srgb, var(--course-soft, #f5f9ff) 76%, white);
    font-size: 14px;
    line-height: 1.55;
}

#fiveECourse .five-e-task[data-step-window-mode="unified"] .five-e-task__feedback[hidden] {
    display: none !important;
}

#fiveECourse .five-e-task[data-step-window-mode="unified"] .five-e-task__feedback > strong {
    display: block;
    margin-bottom: 4px;
    color: var(--course-accent, #5e8fe5);
    font-size: 14px;
}

#fiveECourse .five-e-task[data-step-window-mode="unified"] .five-e-task__feedback.is-positive {
    border-color: color-mix(in srgb, #2e9367 42%, white);
    background: color-mix(in srgb, #e8f7f0 78%, white);
}

#fiveECourse .five-e-task[data-step-window-mode="unified"] .five-e-task__feedback.is-positive > strong {
    color: #237653;
}

#fiveECourse .five-e-task[data-step-window-mode="unified"] .five-e-task__feedback :is(p, dl, dd) {
    margin: 0;
}

#fiveECourse .five-e-task[data-step-window-mode="unified"] .five-e-task__feedback .five-e-feedback__conclusion + .five-e-feedback__conclusion,
#fiveECourse .five-e-task[data-step-window-mode="unified"] .five-e-task__feedback .five-e-feedback__summary {
    margin-top: 8px;
}

/* One feedback typography contract for every course and every answer state. */
#fiveECourse {
    --five-e-feedback-text: #3f514d;
    --five-e-feedback-title: var(--course-accent, #5e8fe5);
    --five-e-feedback-font: "Microsoft YaHei UI", "Noto Sans SC", sans-serif;
}

#fiveECourse :is(.five-e-feedback__message, [data-unified-feedback-message]) {
    color: var(--five-e-feedback-text) !important;
    font-family: var(--five-e-feedback-font) !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    line-height: 1.65 !important;
    letter-spacing: 0 !important;
}

#fiveECourse :is(.five-e-feedback__message, [data-unified-feedback-message]) :is(p, span, li, dd) {
    color: inherit !important;
    font: inherit !important;
    letter-spacing: inherit !important;
}

#fiveECourse :is([data-feedback-label], [data-unified-feedback-title], .five-e-feedback__conclusion dt, .five-e-feedback__summary strong) {
    color: var(--five-e-feedback-title) !important;
    font-family: var(--five-e-feedback-font) !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    line-height: 1.65 !important;
    letter-spacing: 0 !important;
}

#fiveECourse .five-e-task__feedback.is-positive {
    --five-e-feedback-title: #237653;
}

#fiveECourse .five-e-task__feedback.is-guidance {
    --five-e-feedback-title: #9b6418;
}

#fiveECourse .five-e-task[data-step-window-mode="unified"] .five-e-task__region--observation,
#fiveECourse .five-e-task[data-step-window-mode="unified"] .five-e-task__region--answer {
    box-sizing: border-box;
    margin-top: 12px;
    padding: 16px !important;
    border: 1px solid color-mix(in srgb, var(--course-accent, #5e8fe5) 38%, white) !important;
    border-radius: 16px;
    background: color-mix(in srgb, var(--course-soft, #f5f9ff) 82%, white);
}

#fiveECourse .five-e-task[data-step-window-mode="unified"] .five-e-task__region--operation {
    box-sizing: border-box;
    margin-top: 16px;
    padding: 16px 0 0 !important;
    border: 0 !important;
    border-top: 1px solid color-mix(in srgb, var(--course-accent, #5e8fe5) 28%, transparent) !important;
    border-radius: 0;
    background: transparent;
}

#fiveECourse .five-e-task[data-step-window-mode="unified"] .five-e-task__region-title {
    position: absolute;
    top: 14px;
    left: -2px;
    z-index: 2;
    display: grid;
    width: 14px;
    height: 14px;
    margin: 0;
    place-items: center;
    border: 1px solid color-mix(in srgb, var(--course-accent, #5e8fe5) 48%, transparent);
    border-radius: 50%;
    color: var(--course-accent, #5e8fe5);
    background: color-mix(in srgb, var(--course-accent, #5e8fe5) 8%, white);
    font-family: "Cambria Math", "STIX Two Math", serif;
    font-size: 9px;
    font-weight: 800;
    line-height: 1;
    transform: translateY(-50%);
}

#fiveECourse .five-e-task[data-step-window-mode="unified"] button.five-e-task__region-title {
    padding: 0;
    cursor: pointer;
    transition: color 140ms ease, border-color 140ms ease, background-color 140ms ease, box-shadow 140ms ease;
}

#fiveECourse .five-e-task[data-step-window-mode="unified"]
    button.five-e-task__region-title[data-unified-observation-toggle][aria-expanded="false"] {
    border-color: color-mix(in srgb, var(--five-e-muted, #607976) 42%, transparent);
    color: var(--five-e-muted, #607976);
    background: color-mix(in srgb, var(--five-e-muted, #607976) 8%, white);
    box-shadow: none;
}

#fiveECourse .five-e-task[data-step-window-mode="unified"]
    button.five-e-task__region-title[data-unified-observation-toggle][aria-expanded="true"] {
    border-color: var(--course-accent, #5e8fe5);
    color: white;
    background: var(--course-accent, #5e8fe5);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--course-accent, #5e8fe5) 14%, transparent);
}

#fiveECourse .five-e-task[data-step-window-mode="unified"]
    button.five-e-task__region-title[data-unified-operation-toggle][aria-expanded="false"] {
    border-color: color-mix(in srgb, var(--five-e-muted, #607976) 42%, transparent);
    color: var(--five-e-muted, #607976);
    background: color-mix(in srgb, var(--five-e-muted, #607976) 8%, white);
    box-shadow: none;
}

#fiveECourse .five-e-task[data-step-window-mode="unified"]
    button.five-e-task__region-title[data-unified-operation-toggle][aria-expanded="true"] {
    border-color: var(--course-accent, #5e8fe5);
    color: white;
    background: var(--course-accent, #5e8fe5);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--course-accent, #5e8fe5) 14%, transparent);
}

#fiveECourse .five-e-task[data-step-window-mode="unified"]
    .five-e-task__region--operation.is-collapsed > :not(.five-e-task__region-title) {
    display: none !important;
}

#fiveECourse .five-e-task[data-step-window-mode="unified"]
    .five-e-task__region--observation.is-collapsed > :not(.five-e-task__region-title) {
    display: none !important;
}

/* Observation copy follows the task prompt size. Course-specific charts keep
   their SVG/canvas typography so axes and plotted labels retain their layout. */
#fiveECourse .five-e-task[data-step-window-mode="unified"]
    .five-e-task__region--observation {
    font-size: 15px;
}

#fiveECourse .five-e-task[data-step-window-mode="unified"]
    .five-e-task__region--observation
    :is(p, span, b, strong, small, label, button, input, select, textarea, output, dt, dd, li, th, td) {
    font-size: 15px !important;
}

#fiveECourse .five-e-task[data-step-window-mode="unified"] .five-e-task__region--operation > .five-e-task__region-title,
#fiveECourse .five-e-task[data-step-window-mode="unified"] .five-e-task__region--observation > .five-e-task__region-title,
#fiveECourse .five-e-task[data-step-window-mode="unified"] .five-e-task__region--answer > .five-e-task__region-title {
    top: 2px;
    left: -2px;
}

#fiveECourse .five-e-task[data-step-window-mode="unified"] .five-e-task__region--operation > .five-e-task__region-title {
    top: 0;
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--course-soft, #f5f9ff) 18%, white);
}

/* The framework owns the operation marker so every operation panel uses the
   same icon, size and border-corner anchor. */
#fiveECourse .five-e-task[data-step-window-mode="unified"] [data-crm-inline-operation-icon] {
    display: none !important;
}

/* Keep operation, observation and answer markers visually identical. Course
   specific operation markers live inside their card, so normalize their
   inline geometry to the same border-corner position used by shared markers. */
#fiveECourse .five-e-task[data-step-window-mode="unified"] [data-crm-inline-operation-icon] {
    top: 2px !important;
    left: -2px !important;
    width: 14px !important;
    height: 14px !important;
    transform: translateY(-50%) !important;
}

#fiveECourse .five-e-task[data-step-window-mode="unified"] [data-crm-inline-operation-icon] svg {
    width: 8px !important;
    height: 8px !important;
}

#fiveECourse .five-e-task[data-step-window-mode="unified"] .five-e-task__region-title svg {
    width: 8px;
    height: 8px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2.4;
}

/* Retain the compact marker, but give touch users a 44px hit area. */
#fiveECourse:is([data-viewport-class="tablet"], [data-input-modality="coarse"], [data-input-modality="hybrid"])
    .five-e-task[data-step-window-mode="unified"] button.five-e-task__region-title::after {
    content: "";
    position: absolute;
    inset: -15px;
    border-radius: 50%;
}

/* Adjacent zoom buttons need separate, non-overlapping touch targets. */
#fiveECourse:is([data-viewport-class="tablet"], [data-input-modality="coarse"], [data-input-modality="hybrid"])
    :is(button[data-compton-waveform-zoom-in], button[data-compton-waveform-zoom-out],
        button[data-rutherford-x-zoom-in], button[data-rutherford-x-zoom-out]) {
    min-width: 44px !important;
    min-height: 44px !important;
    touch-action: manipulation;
}

#fiveECourse .five-e-task[data-step-window-mode="unified"] .five-e-task__region--operation:not(:has(> :not(.five-e-task__region-title):not([hidden])), :has(> [data-unified-step-operation]:not([hidden]))) {
    display: none;
}

#fiveECourse .five-e-task[data-step-window-mode="unified"] .five-e-task__region--answer:not(:has(.five-e-task__actions > *)) {
    display: none;
}

#fiveECourse .five-e-task[data-step-window-mode="unified"] .five-e-task__inline-operation,
#fiveECourse .five-e-task[data-step-window-mode="unified"] .five-e-task__inline-observation.five-e-display {
    position: static !important;
    inset: auto !important;
    display: block;
    width: 100% !important;
    max-width: none !important;
    min-height: 0;
    max-height: none !important;
    margin: 0;
    padding: 0 !important;
    overflow: visible;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    transform: none !important;
}

/* Observation keeps its single-region presentation. Operation grids retain
   their own option cards beneath the icon-and-divider boundary. */
#fiveECourse .five-e-task[data-step-window-mode="unified"] .five-e-task__inline-observation > .five-e-task-observation-grid {
    padding: 0 !important;
}

#fiveECourse .five-e-task[data-step-window-mode="unified"] .five-e-task__inline-observation .five-e-task-observation-item {
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

#fiveECourse .five-e-task[data-step-window-mode="unified"] .five-e-task__inline-operation[hidden],
#fiveECourse .five-e-task[data-step-window-mode="unified"] .five-e-task__inline-observation[hidden] {
    display: none !important;
}

#fiveECourse .five-e-task[data-step-window-mode="unified"] .five-e-task__inline-operation > [data-crm-observation],
#fiveECourse .five-e-task[data-step-window-mode="unified"] .five-e-task__inline-observation > [data-crm-observation] {
    padding: 0 !important;
}

/* Unified operation controls follow the width of their host instead of
   carrying course-specific narrow widths or stacked wrapper padding. */
#fiveECourse .five-e-task[data-step-window-mode="unified"] [data-unified-step-operation] {
    box-sizing: border-box;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: .55rem;
    align-items: stretch;
    width: 100%;
    min-width: 0;
    margin: 0;
}

#fiveECourse .five-e-task[data-step-window-mode="unified"] [data-unified-step-operation] > *,
#fiveECourse .five-e-task[data-step-window-mode="unified"] [data-unified-step-operation] [data-control-group],
#fiveECourse .five-e-task[data-step-window-mode="unified"] [data-unified-step-operation] [data-crm-observation] > article,
#fiveECourse .five-e-task[data-step-window-mode="unified"] [data-unified-step-operation]
    :is(form, fieldset, article, .five-e-controls, .five-e-control-group) {
    box-sizing: border-box;
    width: 100% !important;
    max-width: none !important;
    min-width: 0;
    margin: 0 !important;
    justify-self: stretch;
}

#fiveECourse .five-e-task[data-step-window-mode="unified"] [data-unified-step-operation] [data-control-group],
#fiveECourse .five-e-task[data-step-window-mode="unified"] [data-unified-step-operation] [data-crm-observation] > article {
    gap: .5rem !important;
    padding: .65rem .75rem !important;
}

#fiveECourse .five-e-task[data-step-window-mode="unified"] [data-unified-step-operation]
    :is(input[type="range"], [data-config-range], [data-crm-range]) {
    display: block;
    box-sizing: border-box;
    width: 100% !important;
    min-width: 0;
    margin: .15rem 0 0 !important;
}

#fiveECourse .five-e-task[data-step-window-mode="unified"] [data-unified-step-operation]
    :is(input[type="number"], select, textarea, [data-config-number]) {
    box-sizing: border-box;
    width: 100% !important;
    max-width: none !important;
    min-width: 0;
    margin-inline: 0 !important;
}

#fiveECourse .five-e-task[data-step-window-mode="unified"] [data-unified-step-operation]
    :is([data-config-choice], .five-e-display__toggle) {
    box-sizing: border-box;
    width: 100% !important;
    max-width: none !important;
    min-width: 0;
    margin: 0 !important;
    padding: .6rem .7rem !important;
}

#fiveECourse .five-e-task[data-step-window-mode="unified"] [data-unified-step-operation]
    [data-crm-observation="polarity"] > article {
    padding: 0 !important;
}

#fiveECourse .five-e-task[data-step-window-mode="unified"] [data-unified-step-operation]
    [data-crm-observation="voltage"] [data-control-group="voltage"] {
    width: 100% !important;
    margin-inline: 0 !important;
}

#fiveECourse .five-e-task[data-step-window-mode="unified"] [data-unified-step-operation]
    [data-crm-polarity] {
    width: 100% !important;
    max-width: none !important;
    min-height: 3rem !important;
    margin: 0 !important;
}

/* The section divider and icon already define the operation group. When an
   operation card contains several peer choices, give each choice its own
   boundary instead of drawing a second shared card around the whole group. */
#fiveECourse .five-e-task[data-step-window-mode="unified"]
    :is(.five-e-task__region--operation, .five-e-task__region--observation, .five-e-task__region--answer)
    [data-crm-observation]
    > :is(article, section, div):has(
        > :is(label, button, article, li, [role="button"], [role="option"])
        ~ :is(label, button, article, li, [role="button"], [role="option"])
    ) {
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

#fiveECourse .five-e-task[data-step-window-mode="unified"]
    :is(.five-e-task__region--operation, .five-e-task__region--observation, .five-e-task__region--answer)
    [data-crm-observation]
    > :is(article, section, div):has(
        > :is(label, button, article, li, [role="button"], [role="option"])
        ~ :is(label, button, article, li, [role="button"], [role="option"])
    )
    > :is(label, button, article, li, [role="button"], [role="option"]) {
    box-sizing: border-box;
    min-width: 0;
    padding: .8rem .9rem !important;
    border: 1px solid color-mix(in srgb, var(--course-accent, #4388ea) 32%, transparent) !important;
    border-radius: 1rem !important;
    background: color-mix(in srgb, var(--course-soft, #f5f9ff) 76%, white) !important;
    box-shadow: none !important;
}

#fiveECourse .five-e-task[data-step-window-mode="unified"]
    :is(.five-e-task__region--operation, .five-e-task__region--observation, .five-e-task__region--answer) {
    box-sizing: border-box;
    margin-top: 16px;
    padding: 16px 0 0 !important;
    border: 0 !important;
    border-top: 1px solid color-mix(in srgb, var(--course-accent, #5e8fe5) 40%, transparent) !important;
    border-radius: 0 !important;
    background: transparent !important;
}

#fiveECourse .five-e-task[data-step-window-mode="unified"]
    :is(.five-e-task__region--operation, .five-e-task__region--observation, .five-e-task__region--answer)
    > .five-e-task__region-title {
    top: 0;
    left: -2px;
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--course-soft, #f5f9ff) 18%, white);
}

#fiveECourse .five-e-task[data-step-window-mode="unified"]
    .five-e-task__region--answer > .five-e-task__actions {
    display: grid;
    gap: .7rem;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
}

#fiveECourse .five-e-task[data-step-window-mode="unified"]
    .five-e-task__region--answer > .five-e-task__actions > button {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    padding: .8rem .9rem !important;
    border: 1px solid color-mix(in srgb, var(--course-accent, #4388ea) 32%, transparent) !important;
    border-radius: 1rem !important;
    background: color-mix(in srgb, var(--course-soft, #f5f9ff) 76%, white) !important;
    box-shadow: none !important;
}

/* Every form control owns one visible card boundary. Form, fieldset and
   layout-only wrappers remain borderless so several controls never acquire
   an additional shared outer card. */
#fiveECourse .five-e-task[data-step-window-mode="unified"]
    :is(.five-e-task__region--operation, .five-e-task__region--observation, .five-e-task__region--answer)
    :is(form, fieldset):has(:is(input, select, textarea, button)),
#fiveECourse .five-e-task[data-step-window-mode="unified"]
    :is(.five-e-task__region--operation, .five-e-task__region--observation, .five-e-task__region--answer)
    :is(article, section, div):has(> label:has(> :is(input, select, textarea))) {
    margin-inline: 0;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

#fiveECourse .five-e-task[data-step-window-mode="unified"]
    :is(.five-e-task__region--operation, .five-e-task__region--observation, .five-e-task__region--answer)
    label:has(> :is(input, select, textarea)) {
    box-sizing: border-box;
    width: 100% !important;
    max-width: none !important;
    min-width: 0;
    margin-inline: 0 !important;
    justify-self: stretch;
    padding: .8rem .9rem !important;
    border: 1px solid color-mix(in srgb, var(--course-accent, #4388ea) 32%, transparent) !important;
    border-radius: 1rem !important;
    background: color-mix(in srgb, var(--course-soft, #f5f9ff) 76%, white) !important;
    box-shadow: none !important;
}

/* Source-state and readout choices are semantic cards rather than form
   labels. Give every grid item the same independent boundary while keeping
   the grid itself borderless. */
#fiveECourse .five-e-task[data-step-window-mode="unified"]
    .five-e-task__region--observation .five-e-task-observation-grid {
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

#fiveECourse .five-e-task[data-step-window-mode="unified"]
    .five-e-task__region--observation .five-e-task-observation-grid
    > :is(.five-e-task-observation-item, article, label, button, [role="button"], [role="option"]) {
    box-sizing: border-box;
    min-width: 0;
    border: 1px solid color-mix(in srgb, var(--course-accent, #4388ea) 32%, transparent) !important;
    border-radius: 1rem !important;
    background: color-mix(in srgb, var(--course-soft, #f5f9ff) 76%, white) !important;
    box-shadow: none !important;
}

@media (min-width: 821px) {
    #fiveECourse.has-unified-step-window .five-e-task {
        width: min(var(--five-e-task-content-width, 430px), calc(100vw - 96px)) !important;
        height: auto !important;
        min-height: 0 !important;
        max-height: calc(100vh - 32px) !important;
    }

    #fiveECourse:not(.is-briefing):not(.five-e-launch-shell) .five-e-task:not([data-user-positioned="true"]):not(:has(> [data-assignment-report])) {
        top: auto !important;
        right: auto !important;
        bottom: 22px !important;
        left: 22px !important;
        height: auto !important;
    }
}

/* Keep the runtime's content-driven desktop width from overriding the tablet
   sheet contract. These rules intentionally follow the unified-window rules
   because course observations may update --five-e-task-content-width. */
@media (min-width: 821px) and (orientation: landscape) {
    #fiveECourse.has-unified-step-window[data-viewport-class="tablet"] .five-e-task {
        top: auto !important;
        right: auto !important;
        bottom: max(12px, env(safe-area-inset-bottom)) !important;
        left: max(12px, env(safe-area-inset-left)) !important;
        width: clamp(430px, 44vw, 620px) !important;
        min-width: 0 !important;
        max-width: 620px !important;
        max-height: calc(var(--five-e-viewport-height, 100vh) - max(24px, env(safe-area-inset-top)) - max(24px, env(safe-area-inset-bottom))) !important;
    }
}

@media (min-width: 821px) and (orientation: portrait) {
    #fiveECourse.has-unified-step-window[data-viewport-class="tablet"] .five-e-task {
        top: auto !important;
        right: max(12px, env(safe-area-inset-right)) !important;
        bottom: max(12px, env(safe-area-inset-bottom)) !important;
        left: max(12px, env(safe-area-inset-left)) !important;
        width: auto !important;
        min-width: 0 !important;
        max-width: none !important;
        max-height: min(58dvh, calc(var(--five-e-viewport-height, 100vh) - max(20px, env(safe-area-inset-top)) - 20px)) !important;
    }
}
#fiveECourse .five-e-task[data-step-window-mode="unified"] .five-e-task__region--task {
    padding-top: 0;
    border-top: 0;
}

/* Unified task windows reuse completion-mode four-corner resizing. Each
   control stays invisible until the pointer reaches its own corner. */
#fiveECourse.has-unified-step-window .five-e-task > .five-e-panel__resize {
    opacity: 0 !important;
    transition: opacity 120ms ease;
}

#fiveECourse.has-unified-step-window .five-e-task > .five-e-panel__resize:hover,
#fiveECourse.has-unified-step-window .five-e-task.is-resizing > .five-e-panel__resize {
    opacity: 1 !important;
}

/* The task scrollport reserves an equal scrollbar gutter on both sides.
   Compensate that inline gutter so resize controls remain attached to the
   actual window corners rather than the inner content edges. */
#fiveECourse.has-unified-step-window .five-e-task > .five-e-panel__resize--nw {
    inset: 2px auto auto -10px;
}

#fiveECourse.has-unified-step-window .five-e-task > .five-e-panel__resize--ne {
    inset: 2px -10px auto auto;
}

#fiveECourse.has-unified-step-window .five-e-task > .five-e-panel__resize--sw {
    inset: auto auto 2px -10px;
}

#fiveECourse.has-unified-step-window .five-e-task > .five-e-panel__resize--se {
    position: absolute !important;
    inset: auto -10px 2px auto !important;
    transform: none !important;
}
/* Completion reports scroll inside the task shell. The shell itself remains
   the positioning context for its resize handle and clips all window chrome. */
#fiveECourse .five-e-task:has(> [data-assignment-report]) {
    display: flex;
    flex-direction: column;
    overflow: hidden !important;
    scrollbar-gutter: auto !important;
    isolation: isolate;
}

#fiveECourse .five-e-task:has(> [data-assignment-report]) > [data-assignment-report] {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable both-edges;
}

#fiveECourse .five-e-task.is-completion > .five-e-panel__resize,
#fiveECourse .five-e-task:has(> [data-assignment-report]) > .five-e-panel__resize {
    z-index: 12;
    width: 24px;
    height: 24px;
    opacity: 0;
    background: color-mix(in srgb, var(--course-soft, #fff0e8) 72%, white);
    transition: opacity 120ms ease, border-color 120ms ease;
}

#fiveECourse .five-e-task.is-completion > .five-e-panel__resize:hover,
#fiveECourse .five-e-task.is-completion > .five-e-panel__resize:active,
#fiveECourse .five-e-task.is-resizing > .five-e-panel__resize,
#fiveECourse .five-e-task:has(> [data-assignment-report]) > .five-e-panel__resize:hover,
#fiveECourse .five-e-task:has(> [data-assignment-report]) > .five-e-panel__resize:active {
    opacity: 1;
}

#fiveECourse .five-e-tool-dock.is-collapsed .five-e-tool-tabs {
    padding-left: 3px;
}

#fiveECourse .five-e-tool-dock.is-collapsed .five-e-tool-tabs button {
    width: 100%;
    min-width: 0;
    padding-inline: 3px;
}

/* Global task-copy standard: keep instructional prose aligned on both edges
   without stretching the final line or affecting controls and status labels. */
#fiveECourse .five-e-task > p,
#fiveECourse .five-e-task .five-e-task__region--task > p,
#fiveECourse .five-e-task .five-e-task__look,
#fiveECourse .five-e-task .five-e-task__look > p,
#fiveECourse .five-e-task .five-e-briefing__criteria > li,
#fiveECourse .five-e-task .five-e-feedback__summary > p,
#fiveECourse .five-e-task .five-e-feedback__conclusion > dd {
    text-align: justify !important;
    text-align-last: left;
    text-justify: inter-ideograph;
}

/* Low-pressure glow-discharge region labels follow their world anchors. */
.gas-discharge-region-clouds {
    position: fixed;
    z-index: 44;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.gas-discharge-region-clouds[hidden],
.gas-discharge-region-cloud[hidden] {
    display: none !important;
}

.gas-discharge-region-cloud {
    --region-cloud-lift: 24px;
    position: fixed;
    display: grid;
    justify-items: center;
    color: #253b3a;
    font: 700 11px/1.25 "Microsoft YaHei UI", "Noto Sans SC", sans-serif;
    letter-spacing: 0;
    transform: translate(-50%, -100%);
    filter: drop-shadow(0 4px 8px rgba(35, 55, 54, .16));
}

.gas-discharge-region-cloud[data-tier="1"] { --region-cloud-lift: 44px; }
.gas-discharge-region-cloud[data-tier="2"] { --region-cloud-lift: 64px; }

.gas-discharge-region-cloud > span {
    display: block;
    max-width: 92px;
    padding: 4px 7px;
    border: 1px solid rgba(244, 90, 67, .42);
    border-radius: 999px;
    background: rgba(255, 252, 248, .94);
    white-space: nowrap;
}

.gas-discharge-region-cloud > i {
    position: relative;
    width: 1px;
    height: var(--region-cloud-lift);
    background: linear-gradient(rgba(244, 90, 67, .68), rgba(244, 90, 67, .16));
}

.gas-discharge-region-cloud > i::after {
    content: "";
    position: absolute;
    right: -2px;
    bottom: -2px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #f45a43;
}
