/* Layout adapters only: the original learning artwork, scores and quiz styles stay intact. */
body.education-shell{--ink:#20362f;--accent:#27654f}
/* The original map renderers run unchanged; their research-only controls do
   not replace or cover the educational navigation. */
.education-shell #korea-program-areas,.education-shell #korea-primary-info,
.education-shell #korea-primary-chronology,.education-shell #gojoseon-periods-panel{display:none!important}
.education-shell .learning-ui{display:block}
.education-shell .atlas-guide{display:flex}
.education-shell .floating-panel{left:78px;right:auto}
#education-brand{position:fixed;top:18px;left:84px;width:172px;height:92px;z-index:3;pointer-events:none}
#education-brand .atlas-brand-art{right:0;bottom:0}
.education-shell .learning-heading{flex-wrap:wrap}
#education-lesson-open{margin-left:auto;padding:6px 9px;border:1px solid #b9dcd4;border-radius:8px;background:#edf8f3;color:#126e65;font-size:11px;white-space:nowrap}
#education-lesson-open[aria-pressed=true]{background:#126e65;color:#fff}
.education-shell .learning-toc{top:var(--education-panel-bottom,325px);max-height:calc(100dvh - var(--education-panel-bottom,325px) - var(--education-toc-bottom,24px));overflow-y:auto}
.education-shell .learning-toc{width:310px;max-width:calc(100vw - 90px);padding:16px}
.education-shell .learning-toc-header{position:sticky;top:0;background:#fff;z-index:2;padding-bottom:6px}
.curriculum-toc-home{margin-left:auto;margin-right:6px;padding:4px 6px;border:1px solid #c6d9d1;border-radius:6px;background:#fff;color:#397b71;font-size:10px;white-space:nowrap;cursor:pointer}
.curriculum-section{margin:8px 10px 4px;color:#67786e;font-size:11px;line-height:1.5;font-weight:600}
.curriculum-basis{display:block;font-size:10px;color:#5d746d;margin:0 0 8px}
.curriculum-search{width:100%;box-sizing:border-box;padding:8px 10px;border:1px solid #c6d9d1;border-radius:8px;font:inherit;font-size:12px;background:#fff;color:#20362f;margin-bottom:10px}
.education-shell .learning-era-list{display:block}
.curriculum-era{margin:0 0 6px;border:1px solid #d7e6df;border-radius:10px;background:#fff;overflow:hidden}
.curriculum-era summary{cursor:pointer;display:flex;align-items:center;gap:7px;padding:10px 9px;list-style:none;color:#233b32;font-size:13px}
.curriculum-era summary::-webkit-details-marker{display:none}
.curriculum-era summary::after{content:'›';margin-left:auto;transform:rotate(0deg);font-size:18px;color:#397b71}
.curriculum-era[open]>summary::after{transform:rotate(90deg)}
.curriculum-era[open]>summary{background:#f0f8f3}
.curriculum-era summary small{font-size:10px;color:#6a8178;font-weight:400}
.curriculum-topic-wrap{padding:0 7px 5px}
.curriculum-topic{display:block;width:100%;text-align:left;font-size:12px;line-height:1.5;padding:8px;border:0;border-radius:7px;background:#fff;color:#294137;cursor:pointer}
.curriculum-topic::after{content:'›';float:right;color:#397b71;font-size:16px;line-height:1.2;transition:transform .15s ease}
.curriculum-topic[aria-expanded=true]::after{transform:rotate(90deg)}
.curriculum-topic.active{font-weight:700;background:#e5f4ee;color:#0d6a59}
.curriculum-scenes{list-style:none;margin:4px 0 5px 7px;padding:0 0 0 7px;border-left:2px solid #b9dfd0}
.curriculum-scenes li{margin:2px 0}
.curriculum-scenes button{display:block;width:100%;padding:7px 6px;text-align:left;border:0;border-radius:6px;background:transparent;color:#426153;font-size:11px;line-height:1.5;cursor:pointer}
.curriculum-scenes button[aria-current=step]{background:#126e65;color:#fff;font-weight:700}
.education-shell .curriculum-scenes button[aria-current=step]:hover{background:#0b5a51}
.curriculum-era summary:focus-visible,.curriculum-topic:focus-visible,.curriculum-scenes button:focus-visible{outline:3px solid #e3b838;outline-offset:-3px}
.curriculum-kind{display:inline-block;margin:0 0 8px;padding:3px 7px;border-radius:6px;background:#fff4d6;color:#77560d;font-size:10px}
.curriculum-active .mvp-bubble-text{font-size:14px;line-height:1.85;max-height:none;word-break:keep-all;overflow-wrap:break-word}
.curriculum-active .mvp-bubble-place{line-height:1.6}
.education-shell .learning-quiz-launch:disabled{opacity:.55;cursor:default}
.education-shell #learning-scene-quiz[hidden],.education-shell .curriculum-scenes[hidden],.curriculum-topic-wrap[hidden],.curriculum-era[hidden],.curriculum-empty[hidden]{display:none!important}
.education-shell .learning-quiz-launch{padding:0;flex-shrink:0}
.education-shell .learning-quiz-launch span{white-space:nowrap}
.education-shell .learning-close{padding:0;display:grid;place-items:center;line-height:1}
.education-shell .learning-toc-toggle{bottom:156px}
.education-shell .maplibregl-ctrl-top-right{top:12px;right:10px}
.education-shell .time-panel{top:auto;left:max(14px,env(safe-area-inset-left));bottom:max(16px,env(safe-area-inset-bottom),var(--education-date-clearance,0px));width:285px;padding:15px 16px;border-radius:15px;max-width:calc(100% - 28px)}
.education-shell:not(.date-open):not(.compare-mode) .time-panel{display:none}
.education-shell.date-open .time-panel{display:block}
.education-shell #date-open[aria-expanded=true]:hover{background:#205840;color:white}
.education-shell #mvp-story-nav{bottom:max(153px,var(--education-nav-clearance,0px));max-width:calc(100vw - 100px);flex-wrap:wrap;justify-content:center;z-index:6}
.education-shell #mvp-photo{display:none}
.education-shell #learning-scene-quiz{display:inline-flex;align-items:center;background:#fff2cc;color:#075a61;border:1px solid #c8a552;font-weight:800}
.education-shell .mvp-bubble{max-height:calc(100dvh - 290px);overflow-y:auto}
.education-shell #timeline{display:none}
.education-name-note{display:block;margin-top:7px;font-size:10px;line-height:1.5;color:#67786e}
.education-card-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:8px;font-size:10px}
.education-card-actions button{font-size:10px;padding:5px 8px;border:1px solid #d3e0d7;border-radius:7px;background:#f6faf6;color:#27654f}
.education-shell .learning-panel{max-height:calc(100dvh - 190px);overflow-y:auto}
.education-shell .learning-ui button:hover:not(:disabled){background:#edf9f6}
.education-shell .learning-quiz-launch:hover:not(:disabled){background:linear-gradient(125deg,#008797,#13a3a5)}
.education-shell .learning-ui .curriculum-scenes button[aria-current=step]:hover:not(:disabled){background:#0b5a51;color:#fff}
.education-shell.compare-mode #learning-atlas,.education-shell.compare-mode #education-brand,.education-shell.compare-mode #mvp-stage,.education-shell.compare-mode #mvp-story-nav{display:none!important}
.education-shell.is-comparing #mvp-stage,.education-shell.is-comparing #mvp-story-nav{display:none!important}
.education-shell.compare-mode .atlas-decoration,.education-shell.is-comparing .atlas-decoration{display:none!important}
.education-shell.compare-mode .time-panel{display:block;top:auto;bottom:190px;left:14px;max-width:calc(100% - 68px)}
.curriculum-material-controls{display:flex;flex-wrap:wrap;gap:6px;margin:12px 0}
.curriculum-material-controls button{max-width:100%;padding:7px 9px;border:1px solid #c5ddd2;border-radius:8px;background:#edf8f2;color:#176554;font-size:11px;line-height:1.5;text-align:left;cursor:pointer}
.curriculum-material-controls button:hover{background:#dcefe5}
.curriculum-origin{display:block;margin-top:7px;color:#68786f;font-size:10px}
dialog.curriculum-material-dialog{box-sizing:border-box;width:min(760px,calc(100vw - 32px));max-width:none;max-height:calc(100dvh - 40px);padding:0;border:1px solid #c4d9cd;border-radius:18px;background:#fff;color:#20362f;box-shadow:0 20px 70px #12372b44;overflow:hidden}
.curriculum-material-dialog::backdrop{background:#163e3880}
.curriculum-material-header{display:flex;gap:12px;align-items:center;padding:18px 22px;border-bottom:1px solid #dce8df;background:#f1f8f3}
.curriculum-material-header h2{margin:0;flex:1;font-size:19px;line-height:1.4}
.curriculum-material-header button{flex:none;border:1px solid #bdd3c5;border-radius:8px;background:#fff;color:#285c49;padding:7px 11px;cursor:pointer}
.curriculum-material-body{padding:20px 22px;max-height:calc(100dvh - 130px);overflow:auto;line-height:1.8;font-size:15px;word-break:keep-all;overflow-wrap:break-word}
.curriculum-data-table-wrap{overflow-x:auto}
.curriculum-data-table{border-collapse:collapse;width:100%;font-size:14px}
.curriculum-data-table caption{text-align:left;padding:0 0 8px;color:#5f776a;font-size:12px}
.curriculum-data-table th,.curriculum-data-table td{padding:10px 12px;border:1px solid #dce8df;text-align:left;vertical-align:top}
.curriculum-data-table thead th{background:#edf6f0}
.curriculum-data-table tbody th{font-weight:600;min-width:70px}
.curriculum-data-bar{display:block;height:7px;border-radius:5px;margin-top:6px;background:#23a297}
.curriculum-material-summary{margin:18px 0 8px}
.curriculum-material-note{padding:10px 12px;border-radius:9px;background:#f4f7f3;color:#5f6e63;font-size:12px;line-height:1.7}
.curriculum-material-sources{display:flex;flex-wrap:wrap;gap:8px;font-size:12px;margin:16px 0 0}
.curriculum-material-sources a,.curriculum-photo-credit a{color:#116954;text-underline-offset:3px}
.curriculum-material-photo{margin:0}
.curriculum-material-photo img{display:block;width:100%;height:auto;max-height:55dvh;object-fit:contain;background:#f5f7f3;border-radius:10px}
.curriculum-material-photo figcaption{margin-top:12px;line-height:1.7;font-size:14px}
.curriculum-photo-credit{font-size:11px;color:#5f7468;line-height:1.7}
.curriculum-material-controls button:focus-visible,.curriculum-material-dialog button:focus-visible{outline:3px solid #dda82b;outline-offset:2px}
@media(max-width:740px){
  dialog.curriculum-material-dialog{width:calc(100vw - 20px);max-height:calc(100dvh - 24px);border-radius:14px}
  .curriculum-material-header{padding:13px 15px;gap:8px}
  .curriculum-material-header h2{font-size:16px}
  .curriculum-material-body{padding:14px 15px;max-height:calc(100dvh - 110px);font-size:14px}
  .curriculum-data-table{font-size:12px}
  .curriculum-data-table th,.curriculum-data-table td{padding:8px}
}
@media(max-width:999px){
  .education-shell .learning-toc{top:auto;bottom:205px;max-height:46vh}
  .education-shell #education-brand{width:120px}
}
@media(min-width:1024px) and (max-width:1279px){
  .education-shell:not(.is-comparing):not(.compare-mode) .time-panel{width:clamp(160px,calc((100vw - 650px)/2 - 24px),285px);padding:10px}
}
@media(min-width:1024px) and (max-width:1119px){
  .education-shell:not(.is-comparing):not(.compare-mode) .time-fields{grid-template-columns:1fr 1fr}
}
@media(max-width:740px){
  .education-shell .learning-toc{width:290px;font-size:12px}
  .curriculum-active .mvp-bubble-text{font-size:13px;line-height:1.75}
  .education-shell .floating-panel{left:62px;max-width:calc(100vw - 76px)}
  .education-shell .maplibregl-ctrl-top-right{top:7px;right:3px}
  .education-shell:not(.is-comparing):not(.compare-mode) .time-panel{left:max(8px,env(safe-area-inset-left));width:min(250px,calc(100% - 140px));padding:10px}
  .education-shell .time-panel .time-fields{margin-top:5px;gap:4px}
  .education-shell .time-panel .time-slider{margin:5px 0 2px}
  .education-shell #mvp-story-nav{max-width:calc(100vw - 24px);width:max-content;gap:4px;bottom:max(155px,var(--education-nav-clearance,0px))}
  .education-shell #mvp-story-nav button{height:30px;font-size:10px;padding:0 7px}
  .education-shell #mvp-story-position{font-size:11px;min-width:61px}
  .education-shell .learning-toc-toggle{bottom:220px}
  .education-shell .learning-toc{bottom:255px;max-height:42vh}
  .education-shell #education-brand{display:none}
  .education-shell #education-lesson-open{font-size:10px;padding:5px 8px}
  .education-shell .learning-panel{top:68px}
  .education-shell .mvp-bubble{max-height:calc(100dvh - 380px)}
  .education-shell .mvp-bubble-text{max-height:none}
  .education-shell.is-comparing .maplibregl-popup{max-width:calc(50vw - 24px)!important}
  .education-shell.is-comparing .maplibregl-popup-content{padding:12px!important}
  .education-shell.compare-mode .time-panel{top:auto;bottom:230px;left:8px;max-width:calc(100% - 16px);width:calc(100% - 16px)}
}
