/* Study Helper: shared chat composer, with a distinct landing surface for each tool. */
body.study-chat-ui-active .study-chat-welcome {
    width: min(100%, 800px);
    max-width: 800px;
    flex: 0 0 auto;
    gap: 0;
    margin: 0 auto 12px;
    padding: 0;
}

body.study-chat-ui-active .study-chat-message.assistant {
    align-items: flex-start;
    width: 100%;
    max-width: 820px;
    margin: 0 auto 20px;
    padding: 0 20px;
    box-sizing: border-box;
}

body.study-chat-ui-active .study-chat-message.assistant .study-chat-copy {
    min-width: 0;
    width: 85%;
    max-width: min(78ch, 100%);
}

body.study-chat-ui-active .study-chat-message.assistant:not(.is-generation) .study-chat-bubble {
    width: fit-content;
    max-width: 100%;
    margin: 0;
    padding: 8px 14px !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: var(--text-primary);
    box-shadow: none !important;
    font: inherit;
    font-size: 17px !important;
    line-height: 1.68 !important;
    overflow-wrap: break-word;
    word-break: break-word;
}

body.study-chat-ui-active .study-chat-message.assistant:not(.is-generation) .study-chat-bubble p {
    margin-top: 0;
    margin-bottom: 1.05em;
}

body.study-chat-ui-active .study-chat-message.assistant:not(.is-generation) .study-chat-bubble p + p {
    margin-top: .48em;
}

body.study-chat-ui-active .study-chat-message.assistant:not(.is-generation) .study-chat-bubble h1,
body.study-chat-ui-active .study-chat-message.assistant:not(.is-generation) .study-chat-bubble h2,
body.study-chat-ui-active .study-chat-message.assistant:not(.is-generation) .study-chat-bubble h3,
body.study-chat-ui-active .study-chat-message.assistant:not(.is-generation) .study-chat-bubble h4,
body.study-chat-ui-active .study-chat-message.assistant:not(.is-generation) .study-chat-bubble h5,
body.study-chat-ui-active .study-chat-message.assistant:not(.is-generation) .study-chat-bubble h6 {
    margin-top: 1.5em;
    margin-bottom: .62em;
    font-weight: 700;
    letter-spacing: -.012em;
    line-height: 1.25;
}

body.study-chat-ui-active .study-chat-message.assistant:not(.is-generation) .study-chat-bubble h1 { font-size: 1.64em; }
body.study-chat-ui-active .study-chat-message.assistant:not(.is-generation) .study-chat-bubble h2 { font-size: 1.4em; }
body.study-chat-ui-active .study-chat-message.assistant:not(.is-generation) .study-chat-bubble :is(h3, h4, h5, h6) { font-size: 1.18em; }

body.study-chat-ui-active .study-chat-message.assistant:not(.is-generation) .study-chat-bubble :is(ul, ol) {
    margin: .55em 0 1.25em;
    padding-left: 1.35em;
}

body.study-chat-ui-active .study-chat-message.assistant:not(.is-generation) .study-chat-bubble li { margin: .34em 0; padding-left: .15em; }
body.study-chat-ui-active .study-chat-message.assistant:not(.is-generation) .study-chat-bubble > :is(ul, ol) > li + li { margin-top: .9em; }
body.study-chat-ui-active .study-chat-message.assistant:not(.is-generation) .study-chat-bubble > :is(ul, ol) > li > p { margin: 0 0 .6em; }
body.study-chat-ui-active .study-chat-message.assistant:not(.is-generation) .study-chat-bubble > :is(ul, ol) > li > p:last-child { margin-bottom: 0; }

body.study-chat-ui-active .study-chat-message.user {
    flex-direction: column;
    align-items: flex-end;
    width: 100%;
    max-width: 820px;
    margin: 0 auto 20px;
    padding: 0 20px;
    box-sizing: border-box;
}

body.study-chat-ui-active .study-chat-message.user .study-chat-copy {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    width: fit-content;
    max-width: 85%;
}

body.study-chat-ui-active .study-chat-message.user .study-chat-bubble {
    width: fit-content;
    max-width: min(64ch, 100%);
    padding: 7px 16px !important;
    border: 0;
    border-radius: 24px !important;
    background: var(--accent-color) !important;
    color: #fff !important;
    font: inherit;
    font-size: 16px;
    line-height: 1.6;
    box-shadow: none !important;
    overflow-wrap: break-word;
}

body.study-chat-ui-active .study-chat-message .study-chat-copy {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

body.study-chat-ui-active .study-chat-message.assistant .study-chat-copy {
    align-items: flex-start;
}

body.study-chat-ui-active .study-chat-message .message-actions {
    display: flex;
    gap: 4px;
    margin-top: 8px;
    opacity: 1;
    transition: opacity .2s ease;
}

body.study-chat-ui-active .study-chat-message:hover .message-actions,
body.study-chat-ui-active .study-chat-message:focus-within .message-actions {
    opacity: 1;
}

body.study-chat-ui-active .study-chat-message.user .message-actions {
    justify-content: flex-end;
}

body.study-chat-ui-active .study-chat-message .message-actions-buttons-group {
    display: flex;
    gap: 4px;
    opacity: .35;
    transition: opacity .2s ease;
}

body.study-chat-ui-active .study-chat-message:hover .message-actions-buttons-group,
body.study-chat-ui-active .study-chat-message:focus-within .message-actions-buttons-group {
    opacity: 1;
}

body.study-chat-ui-active .study-chat-message .study-chat-copy-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    margin: 0;
    padding: 6px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: background .2s ease, color .2s ease;
}

body.study-chat-ui-active .study-chat-message .study-chat-copy-btn svg {
    width: 16px;
    height: 16px;
    stroke-width: 2.5;
}

body.study-chat-ui-active .study-chat-message .study-chat-copy-btn:hover,
body.study-chat-ui-active .study-chat-message .study-chat-copy-btn:focus-visible {
    padding: 6px;
    border: 0;
    border-radius: 6px;
    background: var(--bg-hover);
    color: var(--text-primary);
}

body.study-chat-ui-active .study-chat-message .study-chat-copy-btn:focus-visible {
    outline: 2px solid var(--study-accent);
    outline-offset: 2px;
}

body.study-chat-ui-active .study-chat-message.assistant.is-generation .study-chat-copy {
    width: auto;
    max-width: 100%;
}

body.study-chat-ui-active .study-chat-message.assistant.is-generation .study-chat-bubble {
    border-radius: 5px 16px 16px 16px;
    background: var(--study-chat-panel);
}

@media (max-width: 768px) {
    body.study-chat-ui-active .study-chat-message .message-actions {
        min-height: 40px;
        gap: 2px;
    }

    body.study-chat-ui-active .study-chat-message .study-chat-copy-btn {
        flex-basis: 40px;
        width: 40px;
        height: 40px;
        min-width: 40px;
        min-height: 40px;
    }

    body.study-chat-ui-active .study-chat-message.user .study-chat-copy,
    body.study-chat-ui-active .study-chat-message.assistant .study-chat-copy {
        max-width: 95%;
    }

    body.study-chat-ui-active .study-chat-message.assistant .study-chat-copy {
        width: 95%;
    }
}

@media (max-width: 480px) {
    body.study-chat-ui-active .study-chat-message.user .study-chat-copy,
    body.study-chat-ui-active .study-chat-message.assistant .study-chat-copy {
        max-width: 98%;
    }

    body.study-chat-ui-active .study-chat-message.assistant .study-chat-copy {
        width: 98%;
    }
}

.study-module-stage {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 310px);
    align-items: center;
    gap: clamp(20px, 5vw, 72px);
    width: min(100%, 880px);
    min-height: 250px;
    flex: 1 0 220px;
    margin: auto;
    padding: 30px clamp(12px, 3vw, 34px);
    overflow: hidden;
    border: 1px solid var(--study-chat-line-soft);
    border-radius: 22px;
    background: color-mix(in srgb, var(--study-chat-panel) 76%, transparent);
    box-sizing: border-box;
}

.study-module-stage[hidden] { display: none !important; }

.study-module-stage-copy { min-width: 0; }

.study-module-stage-eyebrow {
    display: block;
    margin-bottom: 10px;
    color: var(--study-accent);
    font-size: 10px;
    font-weight: 750;
    letter-spacing: .12em;
}

.study-module-stage-copy h2 {
    max-width: 460px;
    margin: 0;
    color: var(--text-primary);
    font-size: clamp(20px, 2.3vw, 27px);
    font-weight: 650;
    letter-spacing: -.035em;
    line-height: 1.18;
}

.study-module-stage-copy p {
    max-width: 460px;
    margin: 10px 0 0;
    color: var(--study-chat-muted);
    font-size: 13px;
    line-height: 1.6;
}

.study-stage-art { position: relative; justify-self: center; width: 100%; max-width: 290px; }

/* Quiz preview: a compact question card with answer states. */
.study-stage-art--quiz { height: 190px; }
.study-quiz-card {
    position: absolute;
    z-index: 1;
    top: 10px;
    left: 17px;
    width: min(250px, calc(100% - 34px));
    padding: 13px;
    border: 1px solid var(--study-chat-line);
    border-radius: 15px;
    background: var(--study-chat-panel);
    transform: rotate(-2deg);
}
.study-quiz-stack {
    position: absolute;
    top: 24px;
    left: 9px;
    width: min(250px, calc(100% - 34px));
    height: 150px;
    border: 1px solid var(--study-chat-line-soft);
    border-radius: 15px;
    background: color-mix(in srgb, var(--study-accent) 8%, var(--study-chat-panel));
    transform: rotate(4deg);
}
.study-quiz-card-top { display: flex; align-items: center; gap: 4px; margin-bottom: 14px; }
.study-quiz-card-top i { width: 5px; height: 5px; border-radius: 50%; background: var(--study-chat-line); }
.study-quiz-card-top span { margin-left: auto; color: var(--study-chat-muted); font-size: 9px; }
.study-quiz-question { display: grid; gap: 6px; margin-bottom: 12px; }
.study-quiz-question i,
.study-quiz-answer span,
.study-note-sheet > i { display: block; height: 5px; border-radius: 5px; background: color-mix(in srgb, var(--study-chat-muted) 26%, transparent); }
.study-quiz-question i:first-child { width: 83%; height: 7px; background: color-mix(in srgb, var(--text-primary) 58%, transparent); }
.study-quiz-question i:last-child { width: 55%; }
.study-quiz-answer { display: flex; align-items: center; gap: 8px; margin-top: 7px; padding: 6px 7px; border: 1px solid var(--study-chat-line-soft); border-radius: 8px; }
.study-quiz-answer i { width: 8px; height: 8px; flex: 0 0 8px; border: 1px solid var(--study-chat-line); border-radius: 50%; }
.study-quiz-answer:first-of-type i { border-color: var(--study-accent); background: var(--study-accent); }
.study-quiz-answer span { width: 66%; height: 4px; }

/* Notes preview: overlapping pages with a clear title and highlighted line. */
.study-stage-art--notes { height: 195px; max-width: 250px; }
.study-note-sheet {
    position: absolute;
    z-index: 1;
    top: 8px;
    left: 35px;
    display: grid;
    gap: 9px;
    width: 165px;
    height: 174px;
    padding: 20px 17px;
    border: 1px solid var(--study-chat-line);
    border-radius: 11px;
    background: var(--study-chat-panel);
    transform: rotate(2deg);
}
.study-note-sheet-back { z-index: 0; top: 18px; left: 63px; transform: rotate(8deg); opacity: .66; }
.study-note-sheet > i { height: 4px; }
.study-note-sheet .study-note-title-line { width: 75%; height: 7px; margin-bottom: 3px; background: color-mix(in srgb, var(--text-primary) 58%, transparent); }
.study-note-sheet .study-note-highlight { width: 88%; height: 7px; background: color-mix(in srgb, var(--study-accent) 38%, var(--study-chat-panel)); }
.study-note-sheet .study-note-subhead { width: 54%; height: 6px; margin-top: 4px; background: color-mix(in srgb, var(--text-primary) 46%, transparent); }

/* Oral practice uses the same left-copy/right-preview composition as the other
   Study Helper stages, with a compact transcript-card illustration. */
.study-module-stage--interrogation {
    grid-template-columns: minmax(0, 1fr) minmax(190px, .72fr);
    justify-items: stretch;
    gap: min(6vw, 54px);
    text-align: left;
}
.study-stage-art--oral { height: 195px; max-width: 250px; justify-self: center; }
.study-oral-voice-card,
.study-oral-voice-card-back {
    position: absolute;
    width: 165px;
    height: 174px;
    border: 1px solid var(--study-chat-line);
    border-radius: 11px;
    box-sizing: border-box;
}
.study-oral-voice-card {
    z-index: 1;
    top: 8px;
    left: 28px;
    display: grid;
    grid-template-rows: auto 1fr auto;
    gap: 15px;
    padding: 18px 16px;
    background: var(--study-chat-panel);
    transform: rotate(2deg);
}
.study-oral-voice-card-back {
    top: 17px;
    left: 58px;
    background: color-mix(in srgb, var(--study-accent) 6%, var(--study-chat-panel));
    opacity: .68;
    transform: rotate(8deg);
}
.study-oral-voice-heading { display: flex; align-items: center; gap: 7px; }
.study-oral-voice-heading span {
    color: var(--study-chat-muted);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .06em;
}
.study-oral-voice-heading i {
    width: 7px;
    height: 7px;
    margin-left: auto;
    border-radius: 50%;
    background: var(--study-accent);
}
.study-oral-voice-wave { display: flex; align-items: center; justify-content: space-between; gap: 4px; }
.study-oral-voice-wave i {
    width: 5px;
    height: 18px;
    border-radius: 5px;
    background: color-mix(in srgb, var(--study-accent) 45%, var(--study-chat-line));
}
.study-oral-voice-wave i:nth-child(3n + 1) { height: 30px; }
.study-oral-voice-wave i:nth-child(3n + 2) { height: 42px; opacity: .75; }
.study-oral-voice-wave i:nth-child(5n) { height: 24px; opacity: .55; }
.study-oral-voice-lines { display: grid; gap: 8px; }
.study-oral-voice-lines i {
    display: block;
    height: 5px;
    border-radius: 5px;
    background: color-mix(in srgb, var(--study-chat-muted) 26%, transparent);
}
.study-oral-voice-lines i:first-child {
    width: 72%;
    height: 7px;
    background: color-mix(in srgb, var(--text-primary) 58%, transparent);
}
.study-oral-voice-lines i:last-child { width: 82%; }


/* Mind map preview: a quiet branching diagram. */
.study-stage-art--mindmap { width: 250px; height: 190px; }
.study-map-link { position: absolute; top: 91px; left: 85px; width: 80px; height: 1px; background: color-mix(in srgb, var(--study-accent) 46%, var(--study-chat-line)); transform-origin: left center; }
.study-map-link-a { transform: rotate(-36deg); }
.study-map-link-b { width: 90px; }
.study-map-link-c { transform: rotate(36deg); }
.study-map-node { position: absolute; z-index: 1; width: 54px; height: 28px; border: 1px solid var(--study-chat-line); border-radius: 9px; background: var(--study-chat-panel); }
.study-map-node-main { top: 77px; left: 45px; width: 64px; height: 32px; border-color: color-mix(in srgb, var(--study-accent) 45%, var(--study-chat-line)); background: color-mix(in srgb, var(--study-accent) 14%, var(--study-chat-panel)); }
.study-map-node-a { top: 34px; left: 157px; }
.study-map-node-b { top: 78px; left: 184px; width: 46px; }
.study-map-node-c { top: 125px; left: 157px; }
.study-map-node-d { top: 78px; left: 111px; width: 39px; height: 24px; opacity: .55; }

/* Tool specific settings retain the same control family while grouping by task. */
body.study-chat-ui-active .study-chat-options[data-study-tool="quiz"] { padding-top: 2px; }
body.study-chat-ui-active .study-chat-options[data-study-tool="quiz"] .quiz-header-controls {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: flex-start !important;
    text-align: left !important;
    align-self: flex-start !important;
    width: 100% !important;
    margin: 0 !important;
}
body.study-chat-ui-active .study-chat-options[data-study-tool="quiz"] .quiz-controls-row {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: flex-start !important;
    text-align: left !important;
    align-self: flex-start !important;
    flex: 0 1 auto !important;
    width: auto !important;
    max-width: 100% !important;
    white-space: normal !important;
}
body.study-chat-ui-active .study-chat-options[data-study-tool="quiz"] .quiz-size-difficulty-row {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 8px 16px !important;
}
body.study-chat-ui-active .study-chat-options[data-study-tool="quiz"] .quiz-size-difficulty-row > .quiz-setting-control {
    align-self: flex-start;
}
body.study-chat-ui-active .study-chat-options[data-study-tool="quiz"] .clean-segmented-switch { min-height: 38px; }
body.study-chat-ui-active .study-chat-options[data-study-tool="notes"] .study-chat-options-row { gap: 8px 14px !important; }
body.study-chat-ui-active .study-chat-options[data-study-tool="notes"] .study-chat-options-row > div:first-child { flex: 1 1 auto; }
body.study-chat-ui-active .study-chat-options[data-study-tool="notes"] .note-ai-image-option { min-height: 34px; padding-inline: 8px; border: 1px solid var(--study-chat-line); border-radius: 9px; background: var(--study-chat-panel-raised); }
body.study-chat-ui-active .study-chat-options[data-study-tool="notes"] #notePageCountInput { width: 62px !important; }

body.study-chat-ui-active .study-chat-options[data-study-tool="mindmap"] .study-chat-options-row { justify-content: flex-start; }
body.study-chat-ui-active .study-chat-options[data-study-tool="mindmap"] #newMmSizeSelector {
    min-height: 36px;
    padding: 3px;
    border: 1px solid var(--study-chat-line) !important;
    border-radius: 999px;
    background: var(--study-chat-panel-raised) !important;
    box-shadow: none !important;
}
body.study-chat-ui-active .study-chat-options[data-study-tool="mindmap"] #newMmSizeSelector .mm-size-btn {
    min-height: 28px;
    padding: 0 12px;
    border: 0 !important;
    border-radius: 999px;
    background: transparent !important;
    color: var(--study-chat-muted) !important;
    box-shadow: none !important;
}
body.study-chat-ui-active .study-chat-options[data-study-tool="mindmap"] #newMmSizeSelector .mm-size-btn.active {
    background: color-mix(in srgb, var(--study-accent) 15%, var(--study-chat-panel)) !important;
    color: var(--text-primary) !important;
}
body.study-chat-ui-active .study-chat-options[data-study-tool="mindmap"] #newMmSizeSelector .mm-size-btn:hover:not(.active) {
    background: color-mix(in srgb, var(--text-primary) 6%, transparent) !important;
    color: var(--text-primary) !important;
}
body.study-chat-ui-active .study-chat-options[data-study-tool="mindmap"] .new-mm-background-setting { min-height: 34px; padding: 0 9px; border: 1px solid var(--study-chat-line); border-radius: 9px; background: var(--study-chat-panel-raised); }
body.study-chat-ui-active .study-chat-options[data-study-tool="mindmap"] .new-mm-background-setting select {
    min-height: 30px;
    padding-inline: 4px 20px;
    border: 0;
    outline: 0;
    background: transparent;
}
body.study-chat-ui-active .study-chat-options[data-study-tool="mindmap"] .new-mm-background-setting select:focus-visible {
    border-radius: 6px;
    outline: 2px solid color-mix(in srgb, var(--study-accent) 72%, transparent);
    outline-offset: 1px;
}

body.study-chat-ui-active .study-chat-composer {
    border-radius: 22px !important;
    box-shadow: none !important;
}

body.study-chat-ui-active .study-chat-composer:focus-within {
    border-color: color-mix(in srgb, var(--study-accent) 42%, var(--study-chat-line)) !important;
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--study-accent) 10%, transparent) !important;
}

body.study-chat-ui-active .study-chat-composer-wrap { padding-top: 10px; }

/* Mind maps need enough room for a legible hierarchy and controls that read
   like a compact editor toolbar rather than a row of ungrouped links. */
body.study-chat-ui-active[data-study-module="mindmap"] #newMmResultArea .new-mm-canvas-wrap {
    height: clamp(410px, 58vh, 580px) !important;
    border: 1px solid var(--study-chat-line);
    background: #20211f;
}
body.study-chat-ui-active[data-study-module="mindmap"] #newMmResultArea #newMmCanvas {
    background: #20211f;
}
body.study-chat-ui-active[data-study-module="mindmap"] #newMmResultArea #newMmCanvas[data-background="white"] {
    background: #fff !important;
}
body.study-chat-ui-active[data-study-module="mindmap"] #newMmResultArea .new-mm-controls {
    position: static;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--study-chat-line);
    border-radius: 16px;
    background: var(--study-chat-panel);
}
body.study-chat-ui-active[data-study-module="mindmap"] #newMmResultArea .new-mm-control-group,
body.study-chat-ui-active[data-study-module="mindmap"] #newMmResultArea .new-mm-history-controls {
    gap: 8px;
}
body.study-chat-ui-active[data-study-module="mindmap"] #newMmResultArea .new-mm-controls button {
    min-height: 40px;
    padding: 8px 13px;
    border: 1px solid var(--study-chat-line);
    border-radius: 11px;
    background: var(--study-chat-panel-raised);
    color: var(--text-primary);
    box-shadow: none;
}
body.study-chat-ui-active[data-study-module="mindmap"] #newMmResultArea .new-mm-controls button:hover:not(:disabled) {
    border-color: color-mix(in srgb, var(--study-accent) 45%, var(--study-chat-line));
    background: color-mix(in srgb, var(--study-accent) 9%, var(--study-chat-panel-raised));
}
body.study-chat-ui-active[data-study-module="mindmap"] #newMmResultArea .new-mm-history-controls button {
    min-width: 40px;
    font-size: 16px;
}
body.study-chat-ui-active[data-study-module="mindmap"] #newMmResultArea .new-mm-editor-hint {
    margin: 0;
    color: var(--study-chat-muted);
    font-size: 12px;
    line-height: 1.5;
}
body.study-chat-ui-active[data-study-module="mindmap"] #newMmResultArea .new-mm-background-setting {
    min-height: 40px;
    padding-inline: 10px;
    border: 1px solid var(--study-chat-line);
    border-radius: 11px;
    background: var(--study-chat-panel-raised);
}
body.study-chat-ui-active[data-study-module="mindmap"] #newMmResultArea .new-mm-background-setting select {
    min-height: 34px;
    padding-inline: 4px 20px;
    border: 0;
    outline: 0;
    background: transparent;
}

body.study-chat-ui-active[data-study-module="interrogation"] #interrogationView > .study-chat-exam-shell > .study-chat-settings .header-icon-badge { display: none !important; }
body.study-chat-ui-active[data-study-module="interrogation"] #interrogationView > .study-chat-exam-shell > .study-chat-settings .header-left { gap: 0 !important; }
body.study-chat-ui-active[data-study-module="interrogation"] #interrogationView .interrog-audio-stage { border-color: var(--study-chat-line); border-radius: 24px; background: color-mix(in srgb, var(--study-accent) 5%, var(--study-chat-panel)); }
body.study-chat-ui-active[data-study-module="interrogation"] #interrogationView .interrog-mic-btn { width: 78px; height: 78px; border-radius: 50%; background: color-mix(in srgb, var(--study-accent) 18%, var(--study-chat-panel)); color: var(--study-accent); box-shadow: none; }


@media (max-width: 680px) {
    body.study-chat-ui-active[data-study-module="mindmap"] #newMmResultArea .new-mm-canvas-wrap {
        height: clamp(300px, 48vh, 440px) !important;
        min-height: 0 !important;
    }
    body.study-chat-ui-active[data-study-module="mindmap"] #newMmResultArea .new-mm-controls {
        gap: 8px;
        padding: 9px;
    }
    body.study-chat-ui-active[data-study-module="mindmap"] #newMmResultArea .new-mm-control-group,
    body.study-chat-ui-active[data-study-module="mindmap"] #newMmResultArea .new-mm-history-controls {
        gap: 6px;
    }
    body.study-chat-ui-active[data-study-module="mindmap"] #newMmResultArea .new-mm-controls button {
        min-height: 38px;
        padding-inline: 10px;
        font-size: 12px;
    }
    body.study-chat-ui-active .study-chat-scroll { padding-inline: 0; }
    body.study-chat-ui-active .study-module-stage {
        grid-template-columns: minmax(0, 1fr);
        justify-items: center;
        gap: 14px;
        min-height: 0;
        flex-basis: auto;
        margin-block: 12px;
        padding: 20px 16px;
        text-align: center;
    }
    .study-module-stage-copy h2, .study-module-stage-copy p { margin-inline: auto; }
    .study-module-stage-copy p { max-width: 42ch; }
    .study-stage-art--quiz, .study-stage-art--notes { height: 150px; }
    .study-quiz-card { transform: scale(.82) rotate(-2deg); transform-origin: top center; }
    .study-quiz-stack { transform: scale(.82) rotate(4deg); transform-origin: top center; }
    .study-note-sheet { transform: scale(.82) rotate(2deg); transform-origin: top center; }
    .study-note-sheet-back { transform: scale(.82) rotate(8deg); }


    .study-stage-art--mindmap { transform: scale(.85); transform-origin: center; }
    .study-stage-art--oral { height: 150px; transform: scale(.82); transform-origin: top center; }
    body.study-chat-ui-active .study-chat-options[data-study-tool="notes"] .study-chat-options-row { display: flex !important; }
    body.study-chat-ui-active .study-chat-options[data-study-tool="notes"] .study-chat-options-row > div:first-child { flex: 1 1 100%; }
}
