:root{--ml-bg:#f5f7fb;--ml-panel:#fff;--ml-ink:#18344c;--ml-muted:#5c6e80;--ml-line:#dce5ee;--ml-soft:#eef4fa;--ml-link:#225e79;--ml-focus:#bd7918}
.ml-theme-toggle{width:auto;box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;gap:5px;flex:none;min-width:44px;min-height:44px;margin:0 0 0 8px;padding:8px 10px;border:1px solid var(--ml-line);border-radius:12px;background:var(--ml-panel);color:var(--ml-ink);font:650 12px/1.3 system-ui,sans-serif;cursor:pointer;touch-action:manipulation}.ml-theme-toggle svg{display:block;flex:none}.ml-theme-toggle:hover{border-color:#8aa6bd;background:var(--ml-soft)}.ml-theme-toggle:focus-visible{outline:3px solid var(--ml-focus);outline-offset:3px}.ml-theme-host{align-items:center}.ml-theme-host>.ml-theme-toggle{align-self:center}
body:has(.ml-community-page),body:has(.b3-study){background:var(--ml-bg);color:var(--ml-ink)}.ml-community-page{max-width:1000px;margin:0 auto;color:var(--ml-ink)}.ml-talk-heading{display:flex;align-items:center;gap:16px;margin:0 0 24px;padding:4px 0 20px;border-bottom:1px solid var(--ml-line)}.ml-talk-heading>img{width:56px;height:56px;object-fit:contain;flex:none;border-radius:14px}.ml-talk-heading>div{flex:1;min-width:0}.ml-talk-heading h1{font-size:30px;line-height:1.3;letter-spacing:-1px;margin:2px 0 5px;color:var(--ml-ink)}.ml-talk-heading p{margin:0;font-size:14px;line-height:1.5;color:var(--ml-muted)}.ml-talk-heading .eyebrow{font-size:11px;font-weight:700;color:var(--ml-link)}.ml-community-page .button.primary{background:#173e56;border-color:#173e56;color:#fff}.ml-community-page .button.primary:hover{background:#225c79}
.ml-community-tools{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;margin:0 0 18px;padding:16px 18px;border:1px solid var(--ml-line);border-radius:16px;background:var(--ml-panel)}.ml-community-tools .tabs{display:flex;gap:4px;margin:0;padding:4px;border-radius:12px;background:var(--ml-soft);flex:none}.ml-community-tools .tabs a{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:8px 14px;border:0;border-radius:9px;background:transparent;color:var(--ml-muted);font-size:14px}.ml-community-tools .tabs a.active{color:var(--ml-ink);background:var(--ml-panel);box-shadow:0 1px 4px #18344c18;font-weight:750}.ml-community-tools .search-form{display:flex;align-items:flex-end;gap:8px;flex:1;max-width:560px;margin:0}.ml-community-tools .search-form label{flex:1;min-width:0;margin:0}.ml-search-label{display:block;font-size:11px;color:var(--ml-muted);margin:0 0 5px 2px}.ml-community-tools .search-form input:not([type=hidden]){box-sizing:border-box;width:100%;min-height:44px;padding:9px 12px;border:1px solid var(--ml-line);border-radius:10px;background:var(--ml-soft);color:var(--ml-ink);font-size:14px}.ml-community-tools .search-form .button{min-height:44px;background:var(--ml-panel)}
.ml-community-feed{overflow:hidden;border:1px solid var(--ml-line);border-radius:16px;background:var(--ml-panel)}.ml-community-feed .post-row{display:block;padding:20px 22px;border-bottom:1px solid var(--ml-line);color:var(--ml-ink)}.ml-community-feed .post-row:last-child{border-bottom:0}.ml-community-feed .post-row:hover{background:var(--ml-soft)}.ml-community-feed .post-row h3{font-size:17px;line-height:1.55;color:var(--ml-ink);word-break:break-word}.ml-post-excerpt{margin:6px 0 10px;font-size:14px;line-height:1.65;color:var(--ml-muted);overflow-wrap:anywhere}.ml-community-feed .feed-meta{display:flex;gap:10px;margin-top:8px;font-size:12px;color:var(--ml-muted)}.ml-community-feed .post-counts{margin:6px 0 0;font-size:11px;color:var(--ml-muted)}.ml-community-page>.empty{min-height:0;padding:32px 20px;margin:0;border:1px solid var(--ml-line);border-radius:16px;background:var(--ml-panel)}.ml-community-page>.empty h2{font-size:20px}.ml-community-page>.empty p{font-size:14px;margin-top:8px}.ml-empty-action{margin:0 0 18px;text-align:center}.ml-community-page .pagination:empty{display:none}.ml-community-footnote{margin:18px 0 0!important;padding:12px 14px!important;border:1px solid var(--ml-line)!important;background:var(--ml-soft)!important;color:var(--ml-muted)!important;font-size:12px!important}
.b3-study{box-sizing:border-box;max-width:1060px;padding:28px 24px 64px;color:var(--ml-ink)}.b3-study .ml-page-identity--me{gap:14px;margin:0 0 12px;padding:0 0 18px;border:0;border-bottom:1px solid var(--ml-line);border-radius:0;background:transparent}.b3-study .ml-page-identity--me>.ml-page-identity-icon{width:56px!important;height:56px!important;min-width:56px!important;max-width:56px!important;max-height:56px!important}.b3-study .ml-page-identity-copy h1{color:var(--ml-ink);font-size:30px}.b3-study .ml-page-identity-copy p{color:var(--ml-muted);font-size:14px}.b3-study .ml-study-browse{margin:0 0 14px;text-align:right}.b3-study .ml-study-browse a{margin:0;color:var(--ml-link);font-size:13px;text-decoration:none}.b3-study #study-status{margin:12px 0;padding:12px 16px;border:1px solid var(--ml-line);border-radius:12px;background:var(--ml-soft);font-size:14px;color:var(--ml-muted)}.b3-study #study-status p{margin:0;line-height:1.6}.b3-study #study-status>button,.b3-study #study-status>a{margin:10px 8px 0 0}.b3-study h2{margin:0 0 14px;font-size:19px;line-height:1.45;color:var(--ml-ink)}.b3-study #study-subjects{margin:22px 0}.b3-study #study-subjects>ul{display:grid;gap:12px;margin:0;padding:0}.b3-study #study-subjects .ml-subject-record{display:grid;grid-template-columns:56px minmax(0,1fr);column-gap:14px;row-gap:10px;align-items:center;margin:0;padding:18px;border:1px solid var(--ml-line);border-radius:16px;background:var(--ml-panel)}.ml-subject-art{position:relative;display:block;width:48px;height:48px;overflow:hidden;border-radius:10px;grid-row:1;grid-column:1}.ml-subject-art>img{display:block;width:100%;height:100%;object-fit:contain}.ml-subject-record-copy{min-width:0;grid-row:1;grid-column:2}.b3-study .ml-subject-title{display:block;min-height:44px;margin:0;font-size:17px;font-weight:750;line-height:1.5;color:var(--ml-ink);text-decoration:none;overflow-wrap:anywhere}.b3-study .ml-subject-record-copy small{display:block;margin:0;color:var(--ml-muted);font-size:12px}.b3-study .ml-subject-record-copy p{margin:4px 0 0;color:var(--ml-muted);font-size:12px}.ml-subject-actions{grid-column:2;display:flex;gap:7px;flex-wrap:wrap}.b3-study .ml-subject-actions a{display:inline-flex;align-items:center;justify-content:center;min-height:44px;margin:0;padding:8px 12px;border:1px solid var(--ml-line);border-radius:9px;background:var(--ml-soft);color:var(--ml-link);font-size:12px;font-weight:650;text-decoration:none}.b3-study .ml-subject-actions a:first-child{background:#173e56;color:#fff;border-color:#173e56}
.b3-study .ml-record-workspace{margin:22px 0;padding:20px;border:1px solid var(--ml-line);border-radius:16px;background:var(--ml-panel)}.b3-study #study-tabs{gap:6px;margin:0 0 16px}.b3-study #study-tabs a{display:inline-flex;align-items:center;min-height:44px;margin:0;padding:9px 12px;border:0;border-radius:9px;background:var(--ml-soft);color:var(--ml-muted);font-size:13px;text-decoration:none}.b3-study #study-tabs a[aria-current=page]{background:#173e56;color:#fff}.b3-study #study-selection{margin:0 0 18px;padding-top:14px;border-top:1px solid var(--ml-line)}.b3-study #study-selection label{display:flex;align-items:center;gap:12px;flex-wrap:wrap;font-size:12px;color:var(--ml-muted)}.b3-study #study-selection select{box-sizing:border-box;width:min(100%,360px);min-height:44px;padding:9px 12px;border:1px solid var(--ml-line);border-radius:10px;background:var(--ml-panel);color:var(--ml-ink);font-size:14px}.b3-study #study-records,.b3-study #study-mock,.b3-study #study-detail{margin:14px 0}.b3-study #study-records>ul,.b3-study #study-mock>ul{margin:0;padding:0}.b3-study #study-records li,.b3-study #study-mock li{padding:14px 0;border-bottom:1px solid var(--ml-line);overflow-wrap:anywhere}.b3-study #study-records li>a,.b3-study #study-mock li>a{margin:3px 10px 3px 0;color:var(--ml-link);font-size:14px;font-weight:650;text-decoration:none}.b3-study #study-records>p,.b3-study #study-mock>p{font-size:14px;color:var(--ml-muted)}.b3-study #study-account{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:22px 0 0;padding:14px 16px;border:1px solid var(--ml-line);border-radius:12px;background:var(--ml-soft);font-size:14px}.b3-study #study-account a{margin:0;color:var(--ml-link);font-size:13px;text-decoration:none}.b3-study button{background:var(--ml-panel);color:var(--ml-link);border-color:var(--ml-line);font-size:13px}
@media(max-width:650px){.ml-theme-toggle{padding:8px;min-width:44px;width:44px}.ml-theme-toggle>span{display:none}.ml-talk-heading{gap:12px;margin-bottom:16px;padding-bottom:16px}.ml-talk-heading>img{width:44px;height:44px}.ml-talk-heading h1{font-size:25px}.ml-talk-heading p:not(.eyebrow){font-size:12px}.ml-talk-heading .eyebrow{font-size:10px}.ml-talk-heading>.button{padding:9px 12px;min-height:44px;font-size:12px;flex:none}.ml-community-tools{display:grid;grid-template-columns:1fr;gap:12px;padding:14px}.ml-community-tools .tabs{justify-self:start}.ml-community-tools .search-form{width:100%;max-width:none}.ml-community-feed .post-row{padding:16px}.b3-study{padding:22px 16px 52px}.b3-study .ml-page-identity-copy h1{font-size:25px}.b3-study .ml-page-identity-copy p{font-size:13px}.b3-study #study-subjects .ml-subject-record{grid-template-columns:48px minmax(0,1fr);padding:14px;gap:10px}.b3-study .ml-subject-title{font-size:16px}.ml-subject-actions{grid-column:1/-1}.b3-study .ml-subject-actions a{padding:8px 10px;font-size:11px;flex:1 1 auto}.b3-study .ml-record-workspace{padding:14px}.b3-study #study-tabs{gap:5px}.b3-study #study-tabs a{padding:8px 10px;font-size:12px}.b3-study #study-account{padding:12px 14px}.b3-study #study-account a{font-size:12px}}
.b3-study #study-records,.b3-study #study-mock{scroll-margin-top:96px}.b3-study .ml-record-reference{margin:8px 0 0;font-size:11px;line-height:1.5;color:var(--ml-muted);background:transparent;border:0;padding:0}.b3-study .ml-record-reference summary{display:inline-flex;align-items:center;min-height:44px;cursor:pointer;color:var(--ml-muted);font-size:11px}.b3-study .ml-record-reference small{font-size:11px;overflow-wrap:anywhere;color:var(--ml-muted)}
body:has(.b3-study){margin:0;font-family:system-ui,-apple-system,BlinkMacSystemFont,"맑은 고딕",sans-serif}
/* Semantic theme pairs: every changed surface owns its foreground and boundary. */
:root{--dm-bg:#f5f7fb;--dm-surface:#ffffff;--dm-soft:#eef3f8;--dm-raised:#e1e9f2;--dm-text:#18344c;--dm-muted:#4e6378;--dm-link:#1b577f;--dm-line:#cbd6e2;--dm-control:#61758a;--dm-accent-bg:#173e56;--dm-accent-fg:#ffffff;--dm-select-bg:#e4edf7;--dm-select-fg:#173e56;--dm-select-line:#235a7e;--dm-positive-bg:#e5f4ec;--dm-positive-fg:#155b39;--dm-positive-line:#237849;--dm-negative-bg:#fce9ec;--dm-negative-fg:#822a3d;--dm-negative-line:#b33d58;--dm-warning-bg:#fff1cf;--dm-warning-fg:#6c4b13;--dm-warning-line:#9a6a20;--dm-info-bg:#eaf1fa;--dm-info-fg:#204f7c;--dm-info-line:#3c709f;--dm-chip-bg:#e1e9f2;--dm-chip-fg:#18344c;--dm-positive-chip-bg:#cbead9;--dm-positive-chip-fg:#17452e;--dm-negative-chip-bg:#f8d4dc;--dm-negative-chip-fg:#642136;--dm-disabled-bg:#e9eef3;--dm-disabled-fg:#65778a;--dm-focus:#885115;--ml-bg:var(--dm-bg);--ml-panel:var(--dm-surface);--ml-soft:var(--dm-soft);--ml-ink:var(--dm-text);--ml-muted:var(--dm-muted);--ml-line:var(--dm-line);--ml-link:var(--dm-link);--ml-focus:var(--dm-focus);--ink:var(--dm-text);--text:var(--dm-text);--muted:var(--dm-muted);--line:var(--dm-line);--border:var(--dm-line);--paper:var(--dm-bg);--panel:var(--dm-surface);--pale:var(--dm-soft);--soft:var(--dm-soft);--bg:var(--dm-bg);--accent:var(--dm-link);--blue:var(--dm-link)}
html[data-ml-theme=light]{color-scheme:light;background:var(--dm-bg)}
html[data-ml-theme=dark]{color-scheme:dark;background:var(--dm-bg);--dm-bg:#101923;--dm-surface:#192738;--dm-soft:#203247;--dm-raised:#2c4258;--dm-text:#e6eef8;--dm-muted:#b3c4d6;--dm-link:#a7d8f5;--dm-line:#43596f;--dm-control:#8fa6be;--dm-accent-bg:#e4bc65;--dm-accent-fg:#172638;--dm-select-bg:#304c69;--dm-select-fg:#eff6ff;--dm-select-line:#9cc9fa;--dm-positive-bg:#173c2d;--dm-positive-fg:#d9f4e6;--dm-positive-line:#6cc194;--dm-negative-bg:#4a2632;--dm-negative-fg:#ffe2e9;--dm-negative-line:#f298a6;--dm-warning-bg:#3c3220;--dm-warning-fg:#ffe4ab;--dm-warning-line:#dcb56a;--dm-info-bg:#203b54;--dm-info-fg:#d8efff;--dm-info-line:#82b7de;--dm-chip-bg:#c6d7e8;--dm-chip-fg:#1b354d;--dm-positive-chip-bg:#b9e4cd;--dm-positive-chip-fg:#163c29;--dm-negative-chip-bg:#ffe2e9;--dm-negative-chip-fg:#591c2b;--dm-disabled-bg:#1c2a39;--dm-disabled-fg:#8b9aad;--dm-focus:#ffd47d}
html[data-ml-theme] :is(body){background:var(--dm-bg);color:var(--dm-text)}
html[data-ml-theme] :is(header.qt-site-header,.reader-header,.exam-header,.site-header,body>header,.site-footer,footer){background:var(--dm-bg);color:var(--dm-text);border-color:var(--dm-line)}
html[data-ml-theme] :is(main .panel,.card,.question,.question-card,.mock-question,.post-detail,.comment,.empty,.empty-state,.portal-talk,.lesson-card,.unit-card,.chapter-card,.b3-panel,.regular-account-note,.regular-frozen-material,.quiz,.concept-card,.flash-card,.nickname-gate,.question-map,[id="outline"]){background:var(--dm-surface);color:var(--dm-text);border-color:var(--dm-line)}
html[data-ml-theme] :is(.subject-card,.mode-card,.study-entrance){background:var(--dm-surface);color:var(--dm-text);border-color:var(--dm-control)}
html[data-ml-theme] :is(.worked-example,.formula,.practice,.question-context,.cohort-prerequisites,.proposal,.mock-memory-point,.submit-panel,.local-warning,.dsi-incomplete,.dsi-bundle-result,.figure-step,.subject-blocks .figure-step,.subject-blocks .formula,.subject-blocks .worked-example){background:var(--dm-soft);color:var(--dm-text);border-color:var(--dm-line)}
html[data-ml-theme] :is(.worked-example>h3,.worked-example>strong,.practice>strong,.formula-expression,.question-material-label,.related-visual-context>h3){color:var(--dm-text)}
html[data-ml-theme] :is(.notice,.local-notice,.identity-note,.copy-notice,.b3-study-note,.reader-status,.readiness-note,.candidate-boundary,.review-notice,.answer-status,.feedback,.related-visual-context){background:var(--dm-info-bg);color:var(--dm-info-fg);border-color:var(--dm-info-line)}
html[data-ml-theme] :is(.caution,.warning,.condition,.incomplete-notice,.answer-summary.unanswered){background:var(--dm-warning-bg);color:var(--dm-warning-fg);border-color:var(--dm-warning-line)}
html[data-ml-theme] :is(.takeaway,.success,.result-reason,.answer-summary.right){background:var(--dm-positive-bg);color:var(--dm-positive-fg);border-color:var(--dm-positive-line)}
html[data-ml-theme] :is(.error,.conflict,.read-error,.form-error,.answer-summary.incorrect){background:var(--dm-negative-bg);color:var(--dm-negative-fg);border-color:var(--dm-negative-line)}
html[data-ml-theme] :is(.takeaway>strong,.feedback>strong,.caution>strong){color:inherit}
html[data-ml-theme] :is(.scope,.subtle,.page-note,.section-kicker,.question-number,.meta,.eyebrow,.reader-main>.intro,.reader-status p,.lesson-connection,.source-box,.site-footer,.breadcrumbs,.subject-copy p,.subject-card small,.scope-note,.save-status,.review-tag,.badge,.asset-credit,.figure-note,.cohort-pan-hint,.sequence-pan-hint,.regular-reference-label,.option-explanation,.option-explanation>span,.regular-reason-lead,.regular-reason-text,.reason>b,.bottom-bar>span,.exam-clock>span,.exam-position>span,.exam-answer-count>span,.map-heading>span,.run-row>span,.score-grid dt,.review-toolbar span){color:var(--dm-muted)}
html[data-ml-theme] :is(.breadcrumbs a,.source-box a,.figure-original,.lesson-connection a,.memory-links a,.cohort-prerequisites a,.qt-local-nav a,.text-link,.text-button,.post-body a,.regular-related-entry a,.common-info a){color:var(--dm-link)}
html[data-ml-theme] :is(button,.button,.secondary,input,select,textarea){background:var(--dm-surface);color:var(--dm-text);border-color:var(--dm-control)}
html[data-ml-theme] :is(button:hover:not(:disabled),.button:hover,.secondary:hover){background:var(--dm-raised);color:var(--dm-text);border-color:var(--dm-control)}
html[data-ml-theme] :is(.primary,.button.primary,button.primary,.ml-community-page .button.primary,.b3-study .ml-subject-actions a:first-child){background:var(--dm-accent-bg);color:var(--dm-accent-fg);border-color:var(--dm-accent-bg)}
html[data-ml-theme] :is(.primary:hover:not(:disabled),.button.primary:hover,button.primary:hover:not(:disabled)){background:var(--dm-accent-bg);color:var(--dm-accent-fg)}
html[data-ml-theme] input::placeholder,html[data-ml-theme] textarea::placeholder{color:var(--dm-muted);opacity:1}
html[data-ml-theme] :is(button:disabled:not(.choice):not(.answer),input:disabled,select:disabled,textarea:disabled,.result-actions button:disabled){background:var(--dm-disabled-bg);color:var(--dm-disabled-fg);border-color:var(--dm-line)}
html[data-ml-theme] :is(.choice,.answer,.regular-frozen-option,.quiz-options button,.lightning-option>button){background:var(--dm-surface);color:var(--dm-text);border-color:var(--dm-control)}
html[data-ml-theme] :is(.choice:disabled,.answer:disabled){opacity:1;color:var(--dm-text)}
html[data-ml-theme] :is(.choice.chosen,.answer.selected,.regular-frozen-option.is-selected,button[aria-pressed=true]:not([data-ml-theme-toggle]),.regular-review-choices button[aria-pressed=true],.regular-material-states button[aria-pressed=true],.quiz-options [aria-pressed=true],.image-states button[aria-pressed=true],.question-material-steps button[aria-pressed=true],.subject-steps button[aria-pressed=true],[id="card-list"] [aria-current=true],.lesson-switch [aria-pressed=true],.dsi-slots .is-active){background:var(--dm-select-bg);color:var(--dm-select-fg);border-color:var(--dm-select-line)}
html[data-ml-theme] :is(.choice.correct,.answer.correct,.regular-frozen-option.is-correct,.lightning-option>button.correct,.is-submitted .answer.correct){background:var(--dm-positive-bg);color:var(--dm-positive-fg);border-color:var(--dm-positive-line)}
html[data-ml-theme] :is(.choice.wrong,.answer.wrong,.regular-frozen-option.is-wrong,.is-submitted .answer.wrong){background:var(--dm-negative-bg);color:var(--dm-negative-fg);border-color:var(--dm-negative-line)}
html[data-ml-theme] :is(.choice .n,.choice-badge,.regular-answer-badge,.status-chip,.answer b,.map-number){background:var(--dm-chip-bg);color:var(--dm-chip-fg);border-color:var(--dm-control)}
html[data-ml-theme] :is(.answer.selected b,.map-number.current,.map-number.answered,:where(.choice.chosen:not(.correct):not(.wrong)) .choice-badge){background:var(--dm-accent-bg);color:var(--dm-accent-fg);border-color:var(--dm-accent-bg)}
html[data-ml-theme] :is(.choice.correct .n,.choice.correct .choice-badge,.choice-badge.right,.regular-frozen-option.is-correct .regular-answer-badge,.is-submitted .answer.correct b){background:var(--dm-positive-chip-bg);color:var(--dm-positive-chip-fg);border-color:var(--dm-positive-line)}
html[data-ml-theme] :is(.choice.wrong .n,.choice.wrong .choice-badge,.choice-badge.incorrect,.regular-frozen-option.is-wrong .regular-answer-badge,.is-submitted .answer.wrong b){background:var(--dm-negative-chip-bg);color:var(--dm-negative-chip-fg);border-color:var(--dm-negative-line)}
html[data-ml-theme] :is(.choice-explanation,.concept-return,.regular-question-notes,.regular-related-entry,.question-materials){background:var(--dm-soft);color:var(--dm-text);border-color:var(--dm-line)}
html[data-ml-theme] :is(body[data-regular-learning-ui] .choice-explanation.reason){color:var(--dm-muted)}
html[data-ml-theme] :is(details>summary,.concept-return>summary){background:var(--dm-soft);color:var(--dm-text);border-color:var(--dm-control)}
html[data-ml-theme] :is(th,td,.regular-table td,.question-materials th,.question-materials td,.subject-blocks th,.subject-blocks td){color:var(--dm-text);border-color:var(--dm-control)}
html[data-ml-theme] :is(th,caption){background:var(--dm-soft);color:var(--dm-text)}
html[data-ml-theme] .dsi-mock table:has(th:nth-child(6):last-child) td:before{color:var(--dm-text)}
html[data-ml-theme] :is(dialog,.regular-explanation-dialog,.regular-zoom,.mock-visual-dialog,.teaching-dialog,.end-dialog,.lightning-dialog){background:var(--dm-surface);color:var(--dm-text);border-color:var(--dm-control)}
html[data-ml-theme] :is(.regular-explanation-actions,.dialog-top,.lightning-dialog .dialog-top,.exam-toolbar,.review-toolbar,.bottom-bar,.flash-pagination,.outline nav,[id="lesson-list"]){background:var(--dm-surface);color:var(--dm-text);border-color:var(--dm-control)}
html[data-ml-theme] :is(.visual figcaption,.visual .credit,.regular-frozen-material figcaption,.subject-blocks figcaption,.exam-photo figcaption,figcaption,.question-material-hint,.mock-visual-hint){color:var(--dm-muted)}
html[data-ml-theme] :is(.visual .credit a,.visual .figure-original){color:var(--dm-link)}
html[data-ml-theme] :is(.qt-global-nav,.qt-site-menu>.qt-global-nav){background:var(--dm-bg);color:var(--dm-text);border-color:var(--dm-control)}
html[data-ml-theme] :is(.qt-global-nav>a,.qt-site-menu>summary,.header-link){color:var(--dm-text);border-color:var(--dm-control)}
html[data-ml-theme] :is(.qt-global-nav a[aria-current=page],.qt-global-nav a.active,.outline nav a.active,.b3-study [id="study-tabs"] a[aria-current=page]){background:var(--dm-select-bg);color:var(--dm-select-fg);border-color:var(--dm-select-line)}
html[data-ml-theme] :is(.panel>aside){background:var(--dm-soft);color:var(--dm-text);border-color:var(--dm-line)}
html[data-ml-theme] :is(button,a,input,textarea,select,summary):focus-visible{outline:3px solid var(--dm-focus);outline-offset:3px}
html[data-ml-theme] :is(dialog,.regular-explanation-dialog,.teaching-dialog,.end-dialog,.lightning-dialog)::backdrop{background:#07101bbf}
html[data-ml-theme] mark{background:var(--dm-warning-bg);color:var(--dm-warning-fg)}
/* Original media color islands: source bytes and drawing palette stay original; captions and controls use light pairs on the same white host. */
html[data-ml-theme] :is(.visual,.subject-visual,.mock-visual-content,.regular-frozen-material:has(svg,img,iframe,video),.question-material-figure){--dm-bg:#f5f7fb;--dm-surface:#ffffff;--dm-soft:#eef3f8;--dm-raised:#e1e9f2;--dm-text:#18344c;--dm-muted:#4e6378;--dm-link:#1b577f;--dm-line:#cbd6e2;--dm-control:#61758a;--dm-accent-bg:#173e56;--dm-accent-fg:#ffffff;--dm-select-bg:#e4edf7;--dm-select-fg:#173e56;--dm-select-line:#235a7e;--dm-positive-bg:#e5f4ec;--dm-positive-fg:#155b39;--dm-positive-line:#237849;--dm-negative-bg:#fce9ec;--dm-negative-fg:#822a3d;--dm-negative-line:#b33d58;--dm-warning-bg:#fff1cf;--dm-warning-fg:#6c4b13;--dm-warning-line:#9a6a20;--dm-info-bg:#eaf1fa;--dm-info-fg:#204f7c;--dm-info-line:#3c709f;--dm-chip-bg:#e1e9f2;--dm-chip-fg:#18344c;--dm-positive-chip-bg:#cbead9;--dm-positive-chip-fg:#17452e;--dm-negative-chip-bg:#f8d4dc;--dm-negative-chip-fg:#642136;--dm-disabled-bg:#e9eef3;--dm-disabled-fg:#65778a;--dm-focus:#885115;--dm-bg:#fff;--dm-surface:#fff;--ink:#17344b;--muted:#526174;--paper:#fff;--text:#17344b;--blue:#2459e3;background:#fff;color:#17344b;border-color:#94a5b6}
html[data-ml-theme] .mock-visual-stage{background:var(--dm-soft);border-color:var(--dm-control)}

html[data-ml-theme] :is(.skip-link){background:var(--dm-surface);color:var(--dm-text);border-color:var(--dm-control)}
html[data-ml-theme] :is(.home-entry,.course-entry,.home-personal,.home-login,.certificate-card,.featured,.path-card,.source-strip,.study-aside,.sidebar,.sidebar-note,.community-shortcuts a,.feed-more,.lesson-list a,.explanation,.key-point,.engine-part-info,.home-continue,.review-intro,.terms-card){background:var(--dm-surface);color:var(--dm-text);border-color:var(--dm-control)}
html[data-ml-theme] :is(.analytics-choice,.preview-banner,.pill,.badge,.credential-badge,.combination-badge){background:var(--dm-soft);color:var(--dm-text);border-color:var(--dm-control)}
html[data-ml-theme] :is(.prose p,.prose li,.study-text p,.post-body,.nav-label,.talk-title span,.credential-badge small,.combination-badge small,.kicker,.card .answer h3,.exam-toolbar strong,.score-total>strong,.score-grid dd){color:var(--dm-text)}
html[data-ml-theme] :is(.tabs .active,.tabs a[aria-current=page],.exam-pages .active,.part-index .active,.diagram-controls .selected,.study-aside .current,.modes button[aria-pressed=true]){background:var(--dm-select-bg);color:var(--dm-select-fg);border-color:var(--dm-select-line)}
html[data-ml-theme] :is(.danger){color:var(--dm-negative-fg);background:var(--dm-negative-bg);border-color:var(--dm-negative-line)}
html[data-ml-theme] :is(.course-entry strong,.certificate-link,.feed-empty a,.continue-link,.prose a,.source-strip>a,.home-personal-links,.breadcrumb a){color:var(--dm-link)}
html[data-ml-theme] :is(.diagram figcaption,.diagram-step,.diagram-note,.motion-caption,.flow-current){background:var(--dm-soft);color:var(--dm-text);border-color:var(--dm-control)}

html[data-ml-theme] .dsi-table-shared{background:var(--dm-soft);color:var(--dm-text);border-color:var(--dm-control)}
html[data-ml-theme] body[data-dsi-lightning=true] .dsi-table-wrap td:before,html[data-ml-theme] body[data-dsi-lightning=true] .lightning-dialog .table-wrap td:before{color:var(--dm-text)}

html[data-ml-theme] :is(.study-intro.ml-page-identity,.study-availability){background:var(--dm-soft);color:var(--dm-text);border-color:var(--dm-control)}
html[data-ml-theme] :is(.study-intro h1,.study-entrance-heading,.portal-talk .talk-title,.study-availability>strong){color:var(--dm-text)}
html[data-ml-theme] :is(.study-intro>p:last-child,.study-intro .eyebrow,.study-entrance-copy p,.portal-talk .talk-description,.feed-label,.subject-scope){color:var(--dm-muted)}
html[data-ml-theme] :is(.subject-copy strong,.study-availability>a){color:var(--dm-link)}
html[data-ml-theme] :is(.skip-info){background:var(--dm-surface);color:var(--dm-link);border-color:var(--dm-control)}
html[data-ml-theme] :is(.common-info .info-stage,.panel>.tag,.panel>p){color:var(--dm-muted)}
html[data-ml-theme] :is([id=platform-account-link]){color:var(--dm-link)}
html[data-ml-theme] :is(.panel>[id=message]){color:var(--dm-negative-fg)}

html[data-ml-theme] .study-intro .ml-page-identity-copy>p{color:var(--dm-muted)}
@media(max-width:650px){body[data-dsi-lightning=true] .dsi-table-wrap>table>caption,body[data-dsi-lightning=true] .lightning-dialog .table-wrap>table>caption{display:block;width:100%;box-sizing:border-box}}

html[data-ml-theme] :is(.dsi-blank-note,.dsi-table-parent){color:var(--dm-muted)}
html[data-ml-theme] :is(.lightning-dialog a,.lightning-copy-sources a,.subject-blocks a){color:var(--dm-link)}

html[data-ml-theme] .b3-study [id=study-status]>a{background:transparent;color:var(--dm-link);border-color:var(--dm-control)}

/* Approved common account navigation and explicitly unused ad reservations. */
.qt-site-header .ml-account-entry{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:10px 12px;border:1px solid var(--dm-control,#cbd5e1);border-radius:12px;font-size:14px;font-weight:700;line-height:1.3;color:var(--dm-link,#2459bc);text-decoration:none;white-space:nowrap}.qt-site-header .ml-account-entry:focus-visible{outline:3px solid var(--dm-focus,#2563eb);outline-offset:3px}
.ad-reservation[data-ad-state="unused"],.context-ad[data-ad-state="unused"]{display:none}
@media(min-width:1021px){.site-frame{--ad-rail-width:140px;--ad-rail-track:164px;grid-template-columns:var(--ad-left-track,var(--ad-rail-track)) minmax(0,1fr) var(--ad-right-track,var(--ad-rail-track));column-gap:0}.site-frame>main{grid-column:2}.site-frame>.global-left{grid-column:1;width:var(--ad-rail-width);justify-self:start}.site-frame>.global-right{grid-column:3;width:var(--ad-rail-width);justify-self:end}.site-frame:has(>.global-left[data-ad-state="unused"]){--ad-left-track:0px}.site-frame:has(>.global-right[data-ad-state="unused"]){--ad-right-track:0px}}
@media(min-width:1021px) and (max-width:1240px){.site-frame{--ad-rail-width:90px;--ad-rail-track:106px}}
@media(min-width:1500px){body:has(.portal)::before,body:has(.portal)::after{content:none}}
@media(max-width:599px){.qt-site-header .ml-account-entry{padding:8px;font-size:13px}.qt-site-header{gap:8px}}

/* Approved fixed nickname informational paragraphs. */
html[data-ml-theme] #nickname-form>p{color:var(--dm-muted)}

/* Exact unused portal ad decorations remain hidden after late review CSS. */
@media(min-width:1500px){html body:has(.portal)::before,html body:has(.portal)::after{content:none;display:none}}

/* Dark comment body follows its existing normal foreground; metadata/status roles keep their own colors. */
html[data-ml-theme="dark"] .comment>p:not(.meta):not([role]){color:inherit}

/* M01: saved/replayed regular paragraphs are inserted after load; their typed private record host owns this text pair. Light/figure palettes remain unchanged. */
html[data-ml-theme="dark"] .b3-study [data-regular-private]>p:not([class]):not([role]),
html[data-ml-theme="dark"] .b3-study [data-regular-private]>div:not([class]):not([role])>p:not([class]):not([role]){color:var(--dm-text)}

/* M06/M07: community actions retain semantic roles, real links and one current composer. */
.ml-community-shell :is(a.breadcrumb,.text-button,.button){box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:10px 12px;line-height:1.45;touch-action:manipulation}
.ml-community-shell a.breadcrumb{margin:4px 0 12px;border:1px solid var(--dm-control);border-radius:10px;background:var(--dm-surface);color:var(--dm-link);text-decoration:none;font-weight:650}
.ml-community-shell a.breadcrumb:before{content:'←';font-weight:700}
.ml-community-shell .text-button{border:1px solid var(--dm-control);border-radius:10px;background:var(--dm-surface);color:var(--dm-link);text-decoration:none}
.ml-community-shell .text-button.danger{background:var(--dm-negative-bg);color:var(--dm-negative-fg);border-color:var(--dm-negative-line)}
.ml-community-shell :is(a.breadcrumb,.text-button):hover{background:var(--dm-raised);color:var(--dm-text)}
.ml-community-shell .text-button.danger:hover{background:var(--dm-negative-bg);color:var(--dm-negative-fg)}
.ml-community-shell :is(a,button,textarea):focus-visible{outline:3px solid var(--dm-focus);outline-offset:3px}
.ml-community-shell .ml-comment-editor textarea{box-sizing:border-box;min-height:104px;height:auto;max-height:min(60vh,560px);width:100%;resize:vertical;line-height:1.65}
.ml-community-shell .ml-comment-editor .form{padding:16px}
.ml-community-shell :is(.row,.post-tools){flex-wrap:wrap;gap:8px}
/* M08: retain every saved condition/column; a named focusable scroll region avoids one-character columns. */
.b3-study [data-regular-private]{min-width:0;overflow-wrap:anywhere}
.b3-study [data-regular-private] .regular-table{max-width:100%;overflow-x:auto;overscroll-behavior-inline:contain;scroll-margin-top:96px}
.b3-study [data-regular-private] .regular-table table{width:100%;border-collapse:collapse;table-layout:auto}
.b3-study [data-regular-private] .regular-table table:has(tr:first-child>td:nth-child(3)){min-width:36rem}
.b3-study [data-regular-private] .regular-table :is(th,td){padding:10px;vertical-align:top;word-break:keep-all;overflow-wrap:anywhere}
.b3-study [data-regular-private] .regular-table :is(th,td):first-child{min-width:3.5rem}

/* Root actual390 dark: plain form counters/help text needs its muted foreground pair. */
html[data-ml-theme="dark"] .ml-community-shell .form small{color:var(--dm-muted)}

.ml-community-shell .ml-vote-actions{display:inline-flex;gap:8px;flex-wrap:wrap}
.ml-community-shell .ml-vote-button{min-height:44px;padding:10px 14px;display:inline-flex;align-items:center;gap:5px;border:1px solid var(--dm-control);border-radius:12px;background:var(--dm-surface);color:var(--dm-text);font:inherit;cursor:pointer;touch-action:manipulation}
.ml-community-shell .ml-vote-button[aria-pressed="true"]{background:var(--dm-select-bg);color:var(--dm-select-fg);border-color:var(--dm-select-line);font-weight:750}
.ml-community-shell .ml-vote-button:disabled{cursor:default;background:var(--dm-disabled-bg);color:var(--dm-disabled-fg)}
.ml-community-shell .ml-vote-status{display:flex;align-items:center;gap:8px;flex-wrap:wrap;width:100%;font-size:14px;color:var(--dm-muted)}

/* The official Kakao container keeps its brand color above generic theme control states. */
html[data-ml-theme] button.provider.provider-kakao,
html[data-ml-theme] button.provider.provider-kakao:is(:hover,:active,:focus-visible,:disabled){background:#FEE500;border-color:#FEE500;color:rgba(0,0,0,.85);}
