/* DWF Labs Evil Instructor Mode v1.2.5
 * Tool-specific layout and game styles. Shared DWF Labs shell/modal behavior remains Core-owned when Core is available.
 */

.dwf-labs-tool--dwf-evil-instructor {
    --ei-bg: #071821;
    --ei-panel: #0e2632;
    --ei-panel-2: #123342;
    --ei-border: rgba(137, 225, 237, 0.26);
    --ei-text: #eefbff;
    --ei-muted: #bad0d7;
    --ei-accent: #27d0e8;
    --ei-accent-2: #8defff;
    --ei-danger: #ff6b6b;
    --ei-danger-soft: rgba(255, 107, 107, 0.13);
    --ei-good: #6be6a0;
    --ei-warn: #ffd166;
    --ei-shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
    position: relative;
    isolation: isolate;
    width: min(100%, var(--dwf-labs-tool-max-width, 1120px));
    margin-inline: auto;
    color: var(--ei-text);
    background: radial-gradient(circle at 8% 0%, rgba(39, 208, 232, 0.14), transparent 34%), linear-gradient(160deg, #071821, #09222c 48%, #071820);
    border: 1px solid rgba(125, 220, 234, 0.18);
    border-radius: 22px;
    overflow: hidden;
    box-shadow: var(--ei-shadow);
}

.dwf-labs-tool--dwf-evil-instructor.dwf-labs-theme-deep-sea {
    --ei-bg: #050b19;
    --ei-panel: #0a1427;
    --ei-panel-2: #101d35;
    --ei-border: rgba(117, 163, 255, 0.3);
    --ei-text: #f3f7ff;
    --ei-muted: #c0c9dc;
    --ei-accent: #73a7ff;
    --ei-accent-2: #a9c7ff;
    background: radial-gradient(circle at 8% 0%, rgba(89, 125, 255, 0.16), transparent 34%), linear-gradient(160deg, #050b19, #081327 48%, #050b19);
}

.dwf-labs-tool--dwf-evil-instructor.dwf-labs-theme-high-contrast {
    --ei-bg: #000;
    --ei-panel: #080808;
    --ei-panel-2: #111;
    --ei-border: #fff;
    --ei-text: #fff;
    --ei-muted: #fff;
    --ei-accent: #00ffff;
    --ei-accent-2: #fff;
    --ei-danger: #ff7070;
    --ei-good: #8fff8f;
    --ei-warn: #ffe45e;
    background: #000;
    border-color: #fff;
    box-shadow: none;
}

.dwf-labs-tool--dwf-evil-instructor.dwf-labs-text-small { font-size: 0.93rem; }
.dwf-labs-tool--dwf-evil-instructor.dwf-labs-text-standard { font-size: 1rem; }
.dwf-labs-tool--dwf-evil-instructor.dwf-labs-text-large { font-size: 1.1rem; }

.dwf-labs-tool--dwf-evil-instructor *,
.dwf-labs-tool--dwf-evil-instructor *::before,
.dwf-labs-tool--dwf-evil-instructor *::after {
    box-sizing: border-box;
}

.dwf-labs-tool--dwf-evil-instructor button,
.dwf-labs-tool--dwf-evil-instructor select {
    font: inherit;
}

.dwf-labs-tool--dwf-evil-instructor button {
    cursor: pointer;
}

.dwf-labs-tool--dwf-evil-instructor button:focus-visible,
.dwf-labs-tool--dwf-evil-instructor select:focus-visible,
.dwf-labs-tool--dwf-evil-instructor [tabindex="-1"]:focus-visible {
    outline: 3px solid var(--ei-accent-2);
    outline-offset: 3px;
}

.dwf-labs-tool--dwf-evil-instructor .dwf-labs-hero {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    padding: 30px 32px 24px;
    border-bottom: 1px solid var(--ei-border);
}

.dwf-labs-tool--dwf-evil-instructor .dwf-labs-title-row {
    display: flex;
    align-items: center;
    gap: 14px;
}

.dwf-labs-tool--dwf-evil-instructor .dwf-ei-hero-mark {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    flex: 0 0 54px;
    border-radius: 16px;
    background: linear-gradient(145deg, rgba(255, 107, 107, 0.25), rgba(39, 208, 232, 0.15));
    border: 1px solid rgba(255, 255, 255, 0.13);
    font-size: 2rem;
}

.dwf-labs-tool--dwf-evil-instructor .dwf-labs-title {
    margin: 0;
    color: var(--ei-text);
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    line-height: 1.05;
    letter-spacing: -0.025em;
}

.dwf-labs-tool--dwf-evil-instructor .dwf-labs-subtitle {
    margin: 10px 0 0;
    color: var(--ei-muted);
    font-size: 1.08em;
}

.dwf-labs-tool--dwf-evil-instructor .dwf-labs-icon-cluster {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.dwf-labs-tool--dwf-evil-instructor .dwf-labs-icon-button {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 12px;
    color: var(--ei-text);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--ei-border);
    border-radius: 999px;
    font-weight: 700;
}

.dwf-labs-tool--dwf-evil-instructor .dwf-labs-icon-button:hover {
    background: rgba(39, 208, 232, 0.12);
    border-color: var(--ei-accent);
}

/* Keep theme/plugin span styling from stacking the labels over the header icons. */
.dwf-labs-tool--dwf-evil-instructor .dwf-labs-icon-button > span {
    position: static !important;
    display: inline-block;
    margin: 0;
    transform: none !important;
    line-height: 1.2;
}

.dwf-labs-tool--dwf-evil-instructor .dwf-labs-icon-button > span[aria-hidden="true"] {
    flex: 0 0 auto;
    line-height: 1;
}

.dwf-labs-tool--dwf-evil-instructor .dwf-labs-tool-body {
    position: relative;
    z-index: 2;
    padding: 0;
}

.dwf-evil-instructor-app {
    padding: 26px 32px 34px;
    line-height: 1.55;
}

.dwf-evil-instructor-app h3,
.dwf-evil-instructor-app p,
.dwf-evil-instructor-app blockquote {
    color: inherit;
}

.dwf-ei-disclaimer {
    padding: 18px 20px;
    margin-bottom: 16px;
    background: rgba(255, 209, 102, 0.08);
    border: 1px solid rgba(255, 209, 102, 0.52);
    border-radius: 14px;
}

.dwf-ei-disclaimer strong {
    display: block;
    margin-bottom: 5px;
    color: var(--ei-warn);
    font-size: 1.02em;
}

.dwf-ei-disclaimer p,
.dwf-ei-mantra p {
    margin: 0;
}

.dwf-ei-mantra {
    display: flex;
    gap: 13px;
    align-items: center;
    padding: 17px 20px;
    margin-bottom: 22px;
    background: var(--ei-danger-soft);
    border: 1px solid rgba(255, 107, 107, 0.52);
    border-radius: 14px;
}

.dwf-ei-mantra > span {
    font-size: 1.55em;
}

.dwf-ei-mantra strong {
    color: #fff;
}

.dwf-ei-principles {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 28px;
}

.dwf-ei-principles article {
    min-width: 0;
    padding: 16px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid var(--ei-border);
    border-radius: 15px;
}

.dwf-ei-principles article > span {
    display: block;
    margin-bottom: 8px;
    font-size: 1.55em;
}

.dwf-ei-principles h3 {
    margin: 0 0 7px;
    font-size: 1.02em;
}

.dwf-ei-principles p {
    margin: 0;
    color: var(--ei-muted);
    font-size: 0.9em;
}

.dwf-ei-setup,
.dwf-ei-game,
.dwf-ei-summary {
    padding: 22px;
    background: rgba(3, 14, 20, 0.34);
    border: 1px solid var(--ei-border);
    border-radius: 18px;
}

.dwf-ei-section-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 14px;
    margin-bottom: 16px;
}

.dwf-ei-section-head--compact {
    margin-top: 24px;
    margin-bottom: 12px;
}

.dwf-ei-section-head h3,
.dwf-ei-level-panel h3 {
    margin: 2px 0 0;
    font-size: 1.45em;
}

.dwf-ei-kicker {
    color: var(--ei-accent-2);
    font-size: 0.78em;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.dwf-ei-library-count {
    color: var(--ei-muted);
    font-size: 0.88em;
    text-align: right;
}

.dwf-ei-mode-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.dwf-ei-mode-card,
.dwf-ei-level {
    width: 100%;
    min-width: 0;
    color: var(--ei-text);
    background: var(--ei-panel);
    border: 1px solid var(--ei-border);
    border-radius: 15px;
    transition: transform 150ms ease, border-color 150ms ease, background 150ms ease;
}

.dwf-ei-mode-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    min-height: 142px;
    padding: 18px;
    text-align: left;
}

.dwf-ei-mode-card:hover,
.dwf-ei-level:hover {
    border-color: var(--ei-accent);
    transform: translateY(-1px);
}

.dwf-ei-mode-card.is-selected,
.dwf-ei-level.is-selected {
    background: linear-gradient(145deg, rgba(39, 208, 232, 0.17), rgba(39, 208, 232, 0.06));
    border-color: var(--ei-accent);
    box-shadow: inset 0 0 0 1px rgba(39, 208, 232, 0.15);
}

.dwf-ei-mode-icon {
    font-size: 1.8em;
}

.dwf-ei-mode-card strong {
    font-size: 1.08em;
}

.dwf-ei-mode-card small,
.dwf-ei-level small {
    color: var(--ei-muted);
    line-height: 1.4;
}

.dwf-ei-levels {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 8px;
}

.dwf-ei-level {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 92px;
    padding: 10px 8px;
    text-align: center;
}

.dwf-ei-level strong {
    display: block;
    font-size: 1.1em;
}

.dwf-ei-level-description {
    margin: 10px 2px 0;
    color: var(--ei-muted);
    font-size: 0.9em;
}

.dwf-ei-chain-panel {
    margin-top: 22px;
}

.dwf-ei-chain-panel label {
    display: block;
    margin-bottom: 8px;
}

.dwf-ei-chain-panel select {
    width: 100%;
    padding: 11px 12px;
    color: var(--ei-text);
    background: var(--ei-panel);
    border: 1px solid var(--ei-border);
    border-radius: 10px;
}

.dwf-ei-chain-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.dwf-ei-chain-label-row label { margin: 0; color: var(--ei-text); }

.dwf-ei-chain-panel select,
.dwf-ei-chain-panel select option {
    color: #f7fdff;
    background-color: #0e2632;
}

.dwf-labs-theme-deep-sea .dwf-ei-chain-panel select,
.dwf-labs-theme-deep-sea .dwf-ei-chain-panel select option {
    color: #ffffff;
    background-color: #0a1427;
}

.dwf-labs-theme-high-contrast .dwf-ei-chain-panel select,
.dwf-labs-theme-high-contrast .dwf-ei-chain-panel select option {
    color: #ffffff;
    background-color: #000000;
}

.dwf-ei-chain-help {
    margin: 8px 2px 0;
    color: var(--ei-muted);
    font-size: 0.88em;
}

.dwf-ei-mini-action,
.dwf-ei-record-toggle {
    min-height: 38px;
    padding: 8px 11px;
    color: var(--ei-text);
    background: rgba(255,255,255,.055);
    border: 1px solid var(--ei-border);
    border-radius: 10px;
    font-weight: 800;
}

.dwf-ei-mini-action:hover,
.dwf-ei-record-toggle:hover { border-color: var(--ei-accent); background: rgba(39,208,232,.12); }

.dwf-ei-setup-tools { display: flex; justify-content: flex-end; margin-top: 18px; }

.dwf-ei-record {
    margin-top: 14px;
    padding: 18px;
    background: rgba(255,255,255,.035);
    border: 1px solid var(--ei-border);
    border-radius: 14px;
}

.dwf-ei-record-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.dwf-ei-record-head h3 { margin: 2px 0 0; }
.dwf-ei-record-stats { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 9px; margin-top: 15px; }
.dwf-ei-record-stat { padding: 12px; background: var(--ei-panel); border: 1px solid var(--ei-border); border-radius: 10px; text-align: center; }
.dwf-ei-record-stat strong { display: block; color: var(--ei-accent-2); font-size: 1.35em; }
.dwf-ei-record-stat span { color: var(--ei-muted); font-size: .8em; }
.dwf-ei-record-bests { margin-top: 14px; color: var(--ei-muted); }
.dwf-ei-record-badges { margin-top: 16px; text-align: left; }
.dwf-ei-badge-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; margin-top: 9px; }
.dwf-ei-badge { position: relative; padding: 12px; background: var(--ei-panel); border: 1px solid var(--ei-border); border-radius: 11px; }
.dwf-ei-badge.is-locked { opacity: .48; }
.dwf-ei-badge strong { display: block; margin-bottom: 3px; }
.dwf-ei-badge small { color: var(--ei-muted); }
.dwf-ei-badge-share { margin-top: 8px; padding: 6px 9px; border-radius: 8px; color: var(--ei-text); background: transparent; border: 1px solid var(--ei-border); font-weight: 700; }
.dwf-ei-record-note { margin: 14px 0 0; color: var(--ei-muted); font-size: .82em; }
.dwf-ei-shared-challenge { margin-top: 14px; padding: 11px 13px; color: var(--ei-text); background: rgba(39,208,232,.09); border: 1px solid var(--ei-accent); border-radius: 11px; }

.dwf-ei-start,
.dwf-ei-next,
.dwf-ei-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 12px 18px;
    border-radius: 12px;
    font-weight: 800;
}

.dwf-ei-start,
.dwf-ei-next {
    color: #001217;
    background: var(--ei-accent);
    border: 1px solid var(--ei-accent);
}

.dwf-ei-start {
    width: 100%;
    margin-top: 22px;
    font-size: 1.06em;
}

.dwf-ei-start:hover,
.dwf-ei-next:hover {
    filter: brightness(1.08);
}

.dwf-ei-secondary {
    color: var(--ei-text);
    background: transparent;
    border: 1px solid var(--ei-border);
}

.dwf-ei-game {
    padding: 0;
    overflow: hidden;
}

.dwf-ei-gamebar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 15px 18px;
    background: rgba(0, 0, 0, 0.19);
    border-bottom: 1px solid var(--ei-border);
}

.dwf-ei-progress-wrap {
    flex: 1 1 auto;
    min-width: 130px;
    color: var(--ei-muted);
    font-size: 0.86em;
    font-weight: 700;
}

.dwf-ei-progress {
    height: 6px;
    margin-top: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    overflow: hidden;
}

.dwf-ei-progress span {
    display: block;
    width: 0;
    height: 100%;
    background: var(--ei-accent);
    border-radius: inherit;
    transition: width 180ms ease;
}

.dwf-ei-score {
    display: flex;
    gap: 9px;
    align-items: baseline;
    white-space: nowrap;
    color: var(--ei-muted);
    font-size: 0.86em;
}

.dwf-ei-score strong {
    color: var(--ei-accent-2);
    font-size: 1.45em;
}

.dwf-ei-stack {
    padding: 13px 18px;
    background: rgba(255, 209, 102, 0.07);
    border-bottom: 1px solid rgba(255, 209, 102, 0.3);
}

.dwf-ei-stack-label {
    display: block;
    margin-bottom: 7px;
    color: var(--ei-warn);
    font-size: 0.76em;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.dwf-ei-stack-items {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.dwf-ei-stack-items span {
    padding: 4px 8px;
    color: var(--ei-text);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 209, 102, 0.25);
    border-radius: 999px;
    font-size: 0.82em;
}

/* Scenario visualizer ---------------------------------------------------- */
.dwf-ei-simulator {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(290px, 0.75fr);
    gap: 14px;
    padding: 18px;
    background: rgba(0, 0, 0, 0.16);
    border-bottom: 1px solid var(--ei-border);
}

.dwf-ei-scene {
    position: relative;
    min-height: 290px;
    overflow: hidden;
    border: 1px solid rgba(141, 239, 255, 0.22);
    border-radius: 18px;
    background:
        radial-gradient(circle at 50% -20%, rgba(139, 238, 255, 0.32), transparent 45%),
        linear-gradient(180deg, #17627b 0%, #0a4056 42%, #062b3a 72%, #041e29 100%);
    box-shadow: inset 0 -38px 70px rgba(0, 0, 0, 0.2);
}

.dwf-ei-scene::after {
    content: "";
    position: absolute;
    left: -4%;
    right: -4%;
    bottom: -16px;
    height: 62px;
    border-radius: 50% 50% 0 0;
    background: linear-gradient(180deg, rgba(35, 86, 75, 0.95), rgba(17, 50, 48, 0.98));
    opacity: 0.92;
}

.dwf-ei-scene[data-environment="boat"],
.dwf-ei-scene[data-phase="pre-dive"],
.dwf-ei-scene[data-phase="entry"],
.dwf-ei-scene[data-phase="exit"],
.dwf-ei-scene[data-phase="surface"] {
    background:
        radial-gradient(circle at 70% 12%, rgba(255, 237, 170, 0.45), transparent 18%),
        linear-gradient(180deg, #7cc9df 0%, #4294b2 39%, #0e607e 40%, #07405a 100%);
}

.dwf-ei-scene[data-environment="night"] {
    background:
        radial-gradient(circle at 68% 44%, rgba(92, 188, 224, 0.16), transparent 20%),
        linear-gradient(180deg, #061326 0%, #03101f 55%, #020811 100%);
}

.dwf-ei-scene[data-environment="quarry"] {
    background:
        radial-gradient(circle at 50% -20%, rgba(173, 228, 220, 0.2), transparent 42%),
        linear-gradient(180deg, #315f66 0%, #244b53 44%, #17373d 73%, #10292d 100%);
}

.dwf-ei-scene[data-environment="wreck"] {
    background:
        radial-gradient(circle at 40% 10%, rgba(112, 221, 237, 0.18), transparent 34%),
        linear-gradient(180deg, #10516a 0%, #0a3c50 48%, #072b3a 100%);
}

.dwf-ei-surface-line {
    position: absolute;
    z-index: 2;
    left: -8%;
    right: -8%;
    top: 13%;
    height: 8px;
    border-radius: 50%;
    border-top: 2px solid rgba(218, 250, 255, 0.68);
    transform: rotate(-1deg);
    opacity: 0.75;
}

.dwf-ei-scene[data-phase="bottom"] .dwf-ei-surface-line,
.dwf-ei-scene[data-phase="ascent"] .dwf-ei-surface-line,
.dwf-ei-scene[data-phase="descent"] .dwf-ei-surface-line {
    top: 5%;
    opacity: 0.35;
}

.dwf-ei-sunbeam {
    position: absolute;
    z-index: 1;
    top: -15%;
    width: 18%;
    height: 95%;
    background: linear-gradient(180deg, rgba(218, 250, 255, 0.15), rgba(218, 250, 255, 0));
    transform: skewX(-11deg);
    filter: blur(1px);
    opacity: 0.52;
}

.dwf-ei-sunbeam--a { left: 14%; }
.dwf-ei-sunbeam--b { left: 56%; width: 11%; opacity: 0.28; }

.dwf-ei-scene[data-environment="night"] .dwf-ei-sunbeam { display: none; }

.dwf-ei-scene-bubbles {
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
}

.dwf-ei-scene-bubbles i {
    position: absolute;
    bottom: 34%;
    width: 8px;
    height: 8px;
    border: 1px solid rgba(224, 250, 255, 0.62);
    border-radius: 50%;
    animation: dwf-ei-scene-bubble 4.8s linear infinite;
}

.dwf-ei-scene-bubbles i:nth-child(1) { left: 42%; animation-delay: -0.7s; }
.dwf-ei-scene-bubbles i:nth-child(2) { left: 45%; width: 5px; height: 5px; animation-delay: -2.2s; }
.dwf-ei-scene-bubbles i:nth-child(3) { left: 48%; width: 11px; height: 11px; animation-delay: -3.4s; }
.dwf-ei-scene-bubbles i:nth-child(4) { left: 76%; width: 6px; height: 6px; animation-delay: -1.6s; }
.dwf-ei-scene-bubbles i:nth-child(5) { left: 79%; animation-delay: -4.1s; }

@keyframes dwf-ei-scene-bubble {
    from { transform: translateY(0) scale(0.78); opacity: 0; }
    16% { opacity: 0.72; }
    to { transform: translateY(-170px) scale(1.16); opacity: 0; }
}

.dwf-ei-diver-avatar,
.dwf-ei-buddy-avatar {
    position: absolute;
    z-index: 6;
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: rgba(3, 22, 31, 0.38);
    border: 1px solid rgba(222, 251, 255, 0.2);
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.18);
    font-size: 2rem;
    transition: left 250ms ease, right 250ms ease, top 250ms ease, transform 250ms ease, opacity 250ms ease;
}

.dwf-ei-diver-avatar {
    left: 39%;
    top: 54%;
}

.dwf-ei-buddy-avatar {
    right: 24%;
    top: 45%;
    width: 50px;
    height: 50px;
    font-size: 1.7rem;
    opacity: 0.88;
}

.dwf-ei-buddy-avatar[data-buddy="far"],
.dwf-ei-buddy-avatar[data-buddy="falling-behind"] { right: 5%; top: 28%; transform: scale(0.76); opacity: 0.65; }
.dwf-ei-buddy-avatar[data-buddy="separated"],
.dwf-ei-buddy-avatar[data-buddy="lost"] { right: -10%; opacity: 0.18; transform: scale(0.5); }
.dwf-ei-buddy-avatar[data-buddy="close"] { right: 30%; top: 49%; transform: scale(1.02); }
.dwf-ei-buddy-avatar[data-buddy="ready"] { right: 29%; top: 46%; }
.dwf-ei-buddy-avatar[data-buddy="group-descending"] { right: 15%; top: 67%; transform: scale(0.8); }

.dwf-ei-diver-avatar[data-trend="rising"],
.dwf-ei-diver-avatar[data-trend="ascending"] { transform: translateY(-18px) rotate(-7deg); }
.dwf-ei-diver-avatar[data-trend="descending"] { transform: translateY(16px) rotate(5deg); }
.dwf-ei-diver-avatar[data-trend="yo-yo"] { animation: dwf-ei-yo-yo 2.4s ease-in-out infinite; }
.dwf-ei-diver-avatar[data-trend="working-hard"] { transform: rotate(-12deg) scale(1.04); }

@keyframes dwf-ei-yo-yo {
    0%, 100% { transform: translateY(-10px) rotate(-4deg); }
    50% { transform: translateY(17px) rotate(5deg); }
}

.dwf-ei-devil-float {
    position: absolute;
    z-index: 8;
    right: 14px;
    bottom: 58px;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(32, 8, 10, 0.58);
    border: 1px solid rgba(255, 124, 124, 0.32);
    font-size: 1.45rem;
    transform: rotate(7deg);
}

.dwf-ei-scene-object {
    position: absolute;
    z-index: 2;
    pointer-events: none;
    user-select: none;
}

.dwf-ei-scene-object--wreck {
    display: none;
    left: 8%;
    bottom: 27px;
    width: 46%;
    height: 76px;
    color: transparent;
    background: linear-gradient(150deg, #263e40, #12282c);
    border: 2px solid rgba(153, 198, 188, 0.2);
    border-radius: 9px 24px 6px 6px;
    transform: rotate(-6deg);
}

.dwf-ei-scene-object--wreck::before,
.dwf-ei-scene-object--wreck::after {
    content: "";
    position: absolute;
    background: #162d31;
    border: 1px solid rgba(153, 198, 188, 0.18);
}

.dwf-ei-scene-object--wreck::before { left: 25%; top: -28px; width: 38%; height: 32px; border-radius: 6px 6px 0 0; }
.dwf-ei-scene-object--wreck::after { right: 9%; top: 12px; width: 20px; height: 20px; border-radius: 50%; background: #07191e; }
.dwf-ei-scene[data-environment="wreck"] .dwf-ei-scene-object--wreck { display: block; }

.dwf-ei-scene-object--reef {
    left: auto;
    right: 18%;
    bottom: 8px;
    display: none;
    align-items: flex-end;
    gap: 2px;
    font-size: clamp(1.4rem, 3vw, 2.4rem);
    filter: drop-shadow(0 5px 5px rgba(0,0,0,.25));
    transform: rotate(-3deg);
}
.dwf-ei-scene[data-environment="reef"] .dwf-ei-scene-object--reef,
.dwf-ei-scene[data-environment="drift-reef"] .dwf-ei-scene-object--reef,
.dwf-ei-scene[data-environment="boat"] .dwf-ei-scene-object--reef,
.dwf-ei-scene[data-environment="night"] .dwf-ei-scene-object--reef { display: flex; }
.dwf-ei-scene-object--reef span:nth-child(2) { transform: translateY(-18px) translateX(-4px); font-size: .72em; }
.dwf-ei-scene-object--reef span:nth-child(3) { transform: translateY(-6px); font-size: .62em; }
.dwf-ei-scene[data-environment="wreck"] .dwf-ei-scene-object--reef,
.dwf-ei-scene[data-environment="boat"] .dwf-ei-scene-object--reef { opacity: 0.6; }

.dwf-ei-fauna { display: none; font-size: clamp(1.35rem, 3vw, 2.35rem); filter: drop-shadow(0 4px 4px rgba(0,0,0,.2)); }
.dwf-ei-fauna.is-visible { display: block; }
.dwf-ei-fauna--shark { right: 14%; bottom: 35%; }
.dwf-ei-fauna--turtle { left: 19%; bottom: 30%; }
.dwf-ei-fauna--jellyfish { right: 27%; bottom: 52%; }
.dwf-ei-fauna--octopus { left: auto; right: 30%; bottom: 10%; }

.dwf-ei-scene-object--boat {
    display: none;
    top: 22px;
    left: 12%;
    font-size: 3.4rem;
    filter: drop-shadow(0 6px 4px rgba(0, 0, 0, 0.18));
}
.dwf-ei-scene[data-environment="boat"] .dwf-ei-scene-object--boat,
.dwf-ei-scene[data-phase="entry"] .dwf-ei-scene-object--boat,
.dwf-ei-scene[data-phase="exit"] .dwf-ei-scene-object--boat { display: block; }

.dwf-ei-scene-object--line {
    display: none;
    top: 0;
    left: 76%;
    width: 2px;
    height: 76%;
    background: rgba(235, 246, 212, 0.58);
    box-shadow: 1px 0 0 rgba(0, 0, 0, 0.22);
    transform: rotate(2deg);
    transform-origin: top;
}
.dwf-ei-scene[data-environment="wreck"] .dwf-ei-scene-object--line,
.dwf-ei-scene[data-environment="boat"] .dwf-ei-scene-object--line { display: block; }

.dwf-ei-scene-caption {
    position: absolute;
    z-index: 10;
    left: 14px;
    bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: calc(100% - 84px);
    padding: 8px 10px;
    color: #f7feff;
    background: rgba(2, 14, 20, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 10px;
    backdrop-filter: blur(5px);
}

.dwf-ei-scene-phase {
    padding: 3px 7px;
    color: #001217;
    background: var(--ei-accent);
    border-radius: 999px;
    font-size: 0.72em;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.dwf-ei-scene-caption strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.88em;
}

.dwf-ei-hud {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
    align-content: start;
}

.dwf-ei-hud-card {
    min-width: 0;
    min-height: 76px;
    padding: 12px 13px;
    background: linear-gradient(155deg, rgba(12, 48, 62, 0.94), rgba(4, 28, 38, 0.94));
    border: 1px solid var(--ei-border);
    border-radius: 13px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.dwf-ei-hud-card span {
    display: block;
    color: var(--ei-muted);
    font-size: 0.71em;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.dwf-ei-hud-card strong {
    display: block;
    margin-top: 7px;
    overflow-wrap: anywhere;
    color: var(--ei-accent-2);
    font-size: 1.08em;
    line-height: 1.1;
}

.dwf-ei-equipment-strip {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.dwf-ei-equipment-strip[hidden] { display: none !important; }

.dwf-ei-equipment-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 9px;
    color: var(--ei-text);
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid var(--ei-border);
    border-radius: 10px;
    font-size: 0.8em;
}

.dwf-ei-equipment-chip strong { font-size: 0.95em; }
.dwf-ei-equipment-chip small { color: var(--ei-muted); font-size: 0.86em; }
.dwf-ei-equipment-chip.is-good { border-color: rgba(107, 230, 160, 0.52); background: rgba(107, 230, 160, 0.08); }
.dwf-ei-equipment-chip.is-warn { border-color: rgba(255, 209, 102, 0.58); background: rgba(255, 209, 102, 0.08); }
.dwf-ei-equipment-chip.is-alert { border-color: rgba(255, 107, 107, 0.68); background: rgba(255, 107, 107, 0.12); }

.dwf-ei-hud-note {
    grid-column: 1 / -1;
    margin: -2px 2px 0;
    color: var(--ei-muted);
    font-size: 0.76em;
}

.dwf-ei-learning {
    margin-top: 9px;
    padding: 12px 13px;
    background: rgba(39, 208, 232, 0.055);
    border: 1px solid rgba(39, 208, 232, 0.22);
    border-radius: 10px;
}

.dwf-ei-learning > strong { color: var(--ei-accent-2); }
.dwf-ei-learning > small { display: block; margin-top: 8px; color: var(--ei-muted); }
.dwf-ei-learning-items,
.dwf-ei-summary-learning-items {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 8px;
}

.dwf-ei-learning-chip,
.dwf-ei-summary-learning-chip {
    display: inline-flex;
    padding: 5px 8px;
    border-radius: 999px;
    font-size: 0.8em;
    font-weight: 700;
}

.dwf-ei-learning-chip--training { color: #dffbff; background: rgba(39, 208, 232, 0.13); border: 1px solid rgba(39, 208, 232, 0.32); }
.dwf-ei-learning-chip--gear { color: #fff2ce; background: rgba(255, 209, 102, 0.1); border: 1px solid rgba(255, 209, 102, 0.31); }

.dwf-ei-summary-learning {
    max-width: 800px;
    margin: 12px auto 0;
    padding: 14px 16px;
    text-align: left;
    background: rgba(39, 208, 232, 0.045);
    border: 1px solid rgba(39, 208, 232, 0.18);
    border-radius: 12px;
}

.dwf-ei-summary-learning > strong { color: var(--ei-accent-2); }
.dwf-ei-summary-learning-chip { color: var(--ei-text); background: rgba(255, 255, 255, 0.055); border: 1px solid var(--ei-border); }

.dwf-ei-scenario {
    padding: 24px;
}

.dwf-ei-scenario-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 13px;
}

.dwf-ei-pill {
    display: inline-flex;
    align-items: center;
    padding: 5px 9px;
    color: #001217;
    background: var(--ei-accent);
    border-radius: 999px;
    font-size: 0.76em;
    font-weight: 800;
}

.dwf-ei-pill--soft {
    color: var(--ei-text);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--ei-border);
}

.dwf-ei-scenario h3 {
    margin: 0;
    font-size: clamp(1.45rem, 3vw, 2rem);
    line-height: 1.15;
}

.dwf-ei-setting {
    margin: 6px 0 16px;
    color: var(--ei-accent-2);
    font-size: 0.9em;
    font-weight: 700;
}

.dwf-ei-prompt {
    margin: 0 0 18px;
    font-size: 1.08em;
}

.dwf-ei-evil-line {
    display: flex;
    gap: 12px;
    margin: 18px 0 22px;
    padding: 15px 17px;
    background: rgba(255, 107, 107, 0.08);
    border: 1px solid rgba(255, 107, 107, 0.38);
    border-left-width: 4px;
    border-radius: 12px;
    font-style: normal;
}

.dwf-ei-evil-line > span {
    font-size: 1.5em;
}

.dwf-ei-evil-line strong {
    color: #ffb0b0;
}

.dwf-ei-question {
    margin-bottom: 10px;
    font-size: 1.05em;
}

.dwf-ei-choices {
    display: grid;
    gap: 9px;
}

.dwf-ei-choice {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 13px 14px;
    color: var(--ei-text);
    background: var(--ei-panel);
    border: 1px solid var(--ei-border);
    border-radius: 12px;
    text-align: left;
}

.dwf-ei-choice:hover:not(:disabled) {
    border-color: var(--ei-accent);
    background: var(--ei-panel-2);
}

.dwf-ei-choice:disabled {
    cursor: default;
    opacity: 0.58;
}

.dwf-ei-choice.is-chosen {
    opacity: 1;
    border-color: var(--ei-accent);
    background: rgba(39, 208, 232, 0.11);
}

.dwf-ei-choice-letter {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 9px;
    color: var(--ei-accent-2);
    background: rgba(255, 255, 255, 0.06);
    font-weight: 800;
}

.dwf-ei-call-dive {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    margin-top: 13px;
    padding: 14px;
    color: #fff;
    background: rgba(255, 107, 107, 0.13);
    border: 2px solid rgba(255, 107, 107, 0.78);
    border-radius: 12px;
    text-align: left;
}

.dwf-ei-call-dive > span:first-child {
    font-size: 1.5em;
}

.dwf-ei-call-dive span:last-child {
    display: flex;
    flex-direction: column;
}

.dwf-ei-call-dive small {
    color: #ffd1d1;
    font-size: 0.83em;
}

.dwf-ei-call-dive:hover:not(:disabled) {
    background: rgba(255, 107, 107, 0.2);
}

.dwf-ei-call-dive:disabled {
    cursor: default;
    opacity: 0.58;
}

.dwf-ei-call-dive.is-chosen {
    opacity: 1;
    background: rgba(255, 107, 107, 0.24);
}

.dwf-ei-feedback {
    margin: 0 24px 24px;
    padding: 18px;
    background: var(--ei-panel-2);
    border: 1px solid var(--ei-border);
    border-radius: 14px;
}

.dwf-ei-feedback-head {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
}

.dwf-ei-feedback-grade {
    font-weight: 900;
}

.dwf-ei-feedback-grade[data-grade="strong"],
.dwf-ei-feedback-grade[data-grade="call"] { color: var(--ei-good); }
.dwf-ei-feedback-grade[data-grade="reasonable"] { color: var(--ei-accent-2); }
.dwf-ei-feedback-grade[data-grade="weak"] { color: var(--ei-warn); }
.dwf-ei-feedback-grade[data-grade="poor"] { color: #ff9c9c; }

.dwf-ei-feedback-points {
    color: var(--ei-muted);
    font-size: 0.85em;
    font-weight: 700;
}

.dwf-ei-feedback > p {
    margin: 0 0 13px;
}

.dwf-ei-response-review {
    margin: 0 0 12px;
    padding: 13px;
    background: rgba(0, 0, 0, 0.15);
    border: 1px solid var(--ei-border);
    border-radius: 10px;
}

.dwf-ei-response-review > strong {
    color: var(--ei-accent-2);
}

.dwf-ei-response-review-intro {
    margin: 5px 0 10px;
    color: var(--ei-muted);
    font-size: 0.9em;
}

.dwf-ei-response-review-items {
    display: grid;
    gap: 8px;
}

.dwf-ei-response-review-item {
    padding: 10px 11px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--ei-border);
    border-left: 4px solid var(--ei-border);
    border-radius: 9px;
}

.dwf-ei-response-review-item[data-grade="strong"],
.dwf-ei-response-review-item[data-grade="call"] { border-left-color: var(--ei-good); }
.dwf-ei-response-review-item[data-grade="reasonable"] { border-left-color: var(--ei-accent-2); }
.dwf-ei-response-review-item[data-grade="weak"] { border-left-color: var(--ei-warn); }
.dwf-ei-response-review-item[data-grade="poor"] { border-left-color: #ff9c9c; }

.dwf-ei-response-review-item.is-selected {
    background: rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.dwf-ei-response-review-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}

.dwf-ei-response-review-head strong {
    color: var(--ei-text);
}

.dwf-ei-response-review-grade {
    flex: 0 0 auto;
    font-size: 0.78em;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.035em;
    color: var(--ei-muted);
}

.dwf-ei-response-review-why {
    margin: 6px 0 4px;
}

.dwf-ei-response-review-note {
    display: block;
    color: var(--ei-muted);
    line-height: 1.4;
}

.dwf-ei-takeaway,
.dwf-ei-factors,
.dwf-ei-call-note {
    padding: 12px 13px;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 10px;
}

.dwf-ei-takeaway strong,
.dwf-ei-factors strong {
    color: var(--ei-accent-2);
}

.dwf-ei-takeaway p {
    margin: 4px 0 0;
}

.dwf-ei-factors {
    margin-top: 9px;
}

.dwf-ei-factor-items {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.dwf-ei-factor-items span {
    padding: 4px 8px;
    color: var(--ei-text);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--ei-border);
    border-radius: 999px;
    font-size: 0.82em;
}

.dwf-ei-call-note {
    margin-top: 9px;
    color: var(--ei-muted);
    border: 1px solid rgba(255, 107, 107, 0.28);
}

.dwf-ei-next {
    margin-top: 14px;
}

.dwf-ei-summary {
    text-align: center;
}

.dwf-ei-summary-icon {
    font-size: 3rem;
    margin-bottom: 5px;
}

.dwf-ei-summary h3 {
    margin: 5px 0 8px;
    font-size: clamp(1.6rem, 3vw, 2.2rem);
}

.dwf-ei-summary-lead {
    max-width: 760px;
    margin: 0 auto 20px;
    color: var(--ei-muted);
}

.dwf-ei-summary-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    max-width: 760px;
    margin: 0 auto 18px;
}

.dwf-ei-summary-stats div {
    padding: 15px 10px;
    background: var(--ei-panel);
    border: 1px solid var(--ei-border);
    border-radius: 12px;
}

.dwf-ei-summary-stats strong {
    display: block;
    color: var(--ei-accent-2);
    font-size: 1.7em;
}

.dwf-ei-summary-stats span {
    color: var(--ei-muted);
    font-size: 0.82em;
}

.dwf-ei-reflection {
    max-width: 800px;
    margin: 0 auto;
    padding: 14px 16px;
    color: var(--ei-muted);
    background: rgba(255, 255, 255, 0.035);
    border-radius: 12px;
    text-align: left;
}

.dwf-ei-personal-best,
.dwf-ei-new-badges {
    max-width: 800px;
    margin: 12px auto 0;
    padding: 12px 14px;
    border: 1px solid var(--ei-border);
    border-radius: 11px;
    text-align: left;
}
.dwf-ei-personal-best { color: var(--ei-accent-2); background: rgba(39,208,232,.08); font-weight: 800; }
.dwf-ei-new-badges { background: rgba(255,209,102,.08); }
.dwf-ei-new-badge-items { display: grid; gap: 7px; margin-top: 8px; }
.dwf-ei-new-badge-item { display: flex; align-items: center; justify-content: space-between; gap: 9px; padding: 9px 10px; background: var(--ei-panel); border-radius: 9px; }
.dwf-ei-share-status { min-height: 1.3em; margin-top: 12px; color: var(--ei-accent-2); font-size: .86em; }

.dwf-ei-social-share { margin-top: 12px; padding: 12px; border: 1px solid var(--ei-border); border-radius: 12px; background: rgba(255,255,255,.035); }
.dwf-ei-social-share > strong { display: block; margin-bottom: 9px; }
.dwf-ei-social-share-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.dwf-ei-social-share small { display: block; margin-top: 9px; opacity: .82; line-height: 1.45; }
.dwf-ei-social-share[hidden] { display: none !important; }

.dwf-ei-summary-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 18px;
}

.dwf-ei-summary-actions .dwf-ei-start {
    width: auto;
    margin: 0;
}

.dwf-ei-data-error,
.dwf-ei-noscript {
    margin: 16px 0 0;
    padding: 12px;
    color: #fff;
    background: rgba(255, 107, 107, 0.13);
    border: 1px solid rgba(255, 107, 107, 0.5);
    border-radius: 10px;
}

.dwf-labs-tool--dwf-evil-instructor .dwf-labs-footer {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 7px;
    padding: 17px 24px 21px;
    color: var(--ei-muted);
    border-top: 1px solid var(--ei-border);
    font-size: 0.88em;
}

.dwf-labs-tool--dwf-evil-instructor .dwf-labs-footer a {
    color: var(--ei-accent-2);
    font-weight: 800;
    text-decoration: none;
}

/* Decorative local fallback. Core may provide its own shared bubble treatment. */
.dwf-labs-tool--dwf-evil-instructor .dwf-labs-bubble-field {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
    opacity: 0.45;
}

.dwf-labs-tool--dwf-evil-instructor .dwf-labs-bubble-field span {
    position: absolute;
    width: 10px;
    height: 10px;
    border: 1px solid rgba(141, 239, 255, 0.38);
    border-radius: 50%;
    animation: dwf-ei-bubble 9s linear infinite;
}

.dwf-labs-tool--dwf-evil-instructor .dwf-labs-bubble-field span:nth-child(1) { left: 4%; bottom: -20px; animation-delay: -2s; }
.dwf-labs-tool--dwf-evil-instructor .dwf-labs-bubble-field span:nth-child(2) { left: 18%; bottom: -30px; width: 7px; height: 7px; animation-delay: -6s; }
.dwf-labs-tool--dwf-evil-instructor .dwf-labs-bubble-field span:nth-child(3) { right: 9%; bottom: -15px; width: 14px; height: 14px; animation-delay: -4s; }
.dwf-labs-tool--dwf-evil-instructor .dwf-labs-bubble-field span:nth-child(4) { right: 28%; bottom: -25px; animation-delay: -8s; }
.dwf-labs-tool--dwf-evil-instructor .dwf-labs-bubble-field span:nth-child(5) { left: 48%; bottom: -18px; width: 6px; height: 6px; animation-delay: -1s; }
.dwf-labs-tool--dwf-evil-instructor .dwf-labs-bubble-field span:nth-child(6) { left: 70%; bottom: -20px; width: 8px; height: 8px; animation-delay: -5s; }

.dwf-labs-tool--dwf-evil-instructor.dwf-labs-bubbles-hide .dwf-labs-bubble-field,
.dwf-labs-tool--dwf-evil-instructor.dwf-labs-theme-high-contrast .dwf-labs-bubble-field {
    display: none;
}

@keyframes dwf-ei-bubble {
    0% { transform: translateY(0) scale(0.85); opacity: 0; }
    12% { opacity: 0.7; }
    100% { transform: translateY(-850px) scale(1.15); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .dwf-labs-tool--dwf-evil-instructor .dwf-labs-bubble-field { display: none; }
    .dwf-ei-mode-card,
    .dwf-ei-level,
    .dwf-ei-progress span,
    .dwf-ei-diver-avatar,
    .dwf-ei-buddy-avatar { transition: none; }
    .dwf-ei-scene-bubbles,
    .dwf-ei-diver-avatar[data-trend="yo-yo"] { animation: none; }
}

/* Minimal shell/modal fallback for hosts where Core is not registered. */
.dwf-labs-tool--dwf-evil-instructor .dwf-labs-modal[hidden] { display: none !important; }
.dwf-labs-tool--dwf-evil-instructor .dwf-labs-modal:not([hidden]) {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: grid;
    place-items: center;
    padding: 20px;
}

.dwf-labs-tool--dwf-evil-instructor .dwf-labs-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
}

.dwf-labs-tool--dwf-evil-instructor .dwf-labs-modal-panel {
    position: relative;
    z-index: 1;
    width: min(680px, 100%);
    max-height: min(82vh, 760px);
    overflow: auto;
    padding: 24px;
    color: var(--ei-text);
    background: var(--ei-panel);
    border: 1px solid var(--ei-border);
    border-radius: 16px;
    box-shadow: var(--ei-shadow);
}

.dwf-labs-tool--dwf-evil-instructor .dwf-labs-modal-panel h3 {
    margin-top: 0;
}

.dwf-labs-tool--dwf-evil-instructor .dwf-labs-modal-close {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 36px;
    height: 36px;
    color: var(--ei-text);
    background: transparent;
    border: 1px solid var(--ei-border);
    border-radius: 50%;
    font-size: 1.35em;
}

.dwf-labs-tool--dwf-evil-instructor .dwf-labs-setting-group + .dwf-labs-setting-group {
    margin-top: 18px;
}

.dwf-labs-tool--dwf-evil-instructor .dwf-labs-setting-group h4 {
    margin: 0 0 8px;
}

.dwf-labs-tool--dwf-evil-instructor .dwf-labs-segmented {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.dwf-labs-tool--dwf-evil-instructor .dwf-labs-segmented button {
    padding: 8px 11px;
    color: var(--ei-text);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--ei-border);
    border-radius: 9px;
}

.dwf-labs-tool--dwf-evil-instructor .dwf-labs-segmented button.is-active,
.dwf-labs-tool--dwf-evil-instructor .dwf-labs-segmented button[aria-pressed="true"] {
    color: #001217;
    background: var(--ei-accent);
    border-color: var(--ei-accent);
}

@media (max-width: 880px) {
    .dwf-ei-principles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dwf-ei-levels { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .dwf-ei-simulator { grid-template-columns: 1fr; }
    .dwf-ei-hud { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
    .dwf-labs-tool--dwf-evil-instructor .dwf-labs-hero {
        flex-direction: column;
        padding: 24px 20px 19px;
    }
    .dwf-labs-tool--dwf-evil-instructor .dwf-labs-subtitle { margin-left: 0; }
    .dwf-labs-tool--dwf-evil-instructor .dwf-labs-icon-cluster { justify-content: flex-start; }
    .dwf-evil-instructor-app { padding: 20px 18px 26px; }
    .dwf-ei-mode-grid { grid-template-columns: 1fr; }
    .dwf-ei-mode-card { min-height: 0; }
    .dwf-ei-summary-stats { grid-template-columns: 1fr; }
    .dwf-ei-record-stats { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .dwf-ei-badge-grid { grid-template-columns: 1fr; }
    .dwf-ei-simulator { padding: 14px; }
    .dwf-ei-scene { min-height: 245px; }
}

@media (max-width: 520px) {
    .dwf-ei-principles { grid-template-columns: 1fr; }
    .dwf-ei-levels { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dwf-ei-hud { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dwf-ei-scene-caption { max-width: calc(100% - 70px); }
    .dwf-ei-buddy-avatar { right: 15%; }
    .dwf-ei-setup,
    .dwf-ei-summary { padding: 16px; }
    .dwf-ei-scenario { padding: 18px 16px; }
    .dwf-ei-feedback { margin: 0 16px 16px; }
    .dwf-ei-response-review-head { flex-direction: column; gap: 3px; }
    .dwf-ei-response-review-grade { flex: none; }
    .dwf-ei-gamebar { align-items: flex-start; }
    .dwf-ei-score { flex-direction: column; gap: 0; align-items: flex-end; }
    .dwf-ei-summary-actions { flex-direction: column; }
    .dwf-ei-chain-label-row, .dwf-ei-record-head { align-items: stretch; flex-direction: column; }
    .dwf-ei-summary-actions .dwf-ei-start,
    .dwf-ei-summary-actions .dwf-ei-secondary { width: 100%; }
}

/* Simulator accessibility/theme alignment. */
.dwf-labs-tool--dwf-evil-instructor.dwf-labs-bubbles-hide .dwf-ei-scene-bubbles,
.dwf-labs-tool--dwf-evil-instructor.dwf-labs-theme-high-contrast .dwf-ei-scene-bubbles,
.dwf-labs-tool--dwf-evil-instructor.dwf-labs-theme-high-contrast .dwf-ei-sunbeam {
    display: none;
}

.dwf-labs-tool--dwf-evil-instructor.dwf-labs-theme-high-contrast .dwf-ei-scene,
.dwf-labs-tool--dwf-evil-instructor.dwf-labs-theme-high-contrast .dwf-ei-hud-card {
    color: #fff;
    background: #000;
    border-color: #fff;
    box-shadow: none;
}

.dwf-labs-tool--dwf-evil-instructor.dwf-labs-theme-high-contrast .dwf-ei-scene::after {
    background: #111;
    border-top: 1px solid #fff;
}

.dwf-labs-tool--dwf-evil-instructor.dwf-labs-theme-high-contrast .dwf-ei-scene-caption {
    background: #000;
    border-color: #fff;
    backdrop-filter: none;
}

@media (prefers-reduced-motion: reduce) {
    .dwf-ei-scene-bubbles i,
    .dwf-ei-diver-avatar[data-trend="yo-yo"] {
        animation: none !important;
    }
}


/* Facebook copy-first handoff */
.dwf-labs-tool--dwf-evil-instructor .dwf-ei-facebook-handoff { margin-top: 12px; padding: 14px; border: 1px solid var(--ei-border); border-radius: 12px; background: rgba(255,255,255,.045); }
.dwf-labs-tool--dwf-evil-instructor .dwf-ei-facebook-handoff[hidden] { display: none !important; }
.dwf-labs-tool--dwf-evil-instructor .dwf-ei-facebook-handoff > strong { display: block; margin-bottom: 6px; }
.dwf-labs-tool--dwf-evil-instructor .dwf-ei-facebook-handoff p { margin: 0 0 8px; }
.dwf-labs-tool--dwf-evil-instructor .dwf-ei-facebook-handoff textarea { width: 100%; min-height: 7.5em; box-sizing: border-box; resize: vertical; padding: 10px; border: 1px solid var(--ei-border); border-radius: 8px; background: var(--ei-panel); color: var(--ei-text); font: inherit; line-height: 1.4; }
.dwf-labs-tool--dwf-evil-instructor .dwf-ei-facebook-handoff-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.dwf-labs-tool--dwf-evil-instructor .dwf-ei-facebook-handoff small { display: block; margin-top: 8px; opacity: .84; }
