/* Three palettes share identical page structure, focus order and cabinet forms. */
html[data-themed] body.campus {
  --paper:#f8f5eb; --ink:#2c3029; --panel:#ede8da; --line:#c9c4b4;
  --accent:#603828; --strong:#42291f; --serif:Georgia,Constantia,serif;
  --frame:2px; --glaze:#ded7c5;
  color:var(--ink); background:var(--paper);
  font-family:"Segoe UI",Arial,sans-serif;
}
html[data-visual="jade"] body.campus {
  --paper:#f3f7f4; --ink:#172d2a; --panel:#e0ece3; --line:#adc4b6;
  --accent:#24544a; --strong:#13392f; --serif:"Segoe UI",Arial,sans-serif;
  --frame:20px; --glaze:#b8ceba;
}
html[data-visual="ink"] body.campus {
  color-scheme:dark; --paper:#191c20; --ink:#f2eadb; --panel:#25292e;
  --line:#4c4a46; --accent:#e7bd87; --strong:#e7bd87;
  --serif:Constantia,Georgia,serif; --frame:4px; --glaze:#47453e;
}
html[data-themed] .schoolbar {min-height:80px;background:var(--paper)}
html[data-themed] .logo {letter-spacing:-.075em;color:var(--ink)}
html[data-themed] .logo i {background:var(--accent);color:var(--paper);border-radius:5px;font-style:normal}
.appearance {display:inline-flex;align-items:center;gap:8px;font-size:13px;color:var(--ink)}
.appearance select {font:inherit;background:var(--paper);color:inherit;border:1px solid var(--line);border-radius:20px;padding:7px 10px}
html[data-themed] .campus .mast {background:transparent;color:var(--ink);margin:0;padding:46px 0;min-height:410px;gap:5%;border-radius:0}
html[data-themed] .mast h1,html[data-themed] .chapter h1,html[data-themed] .hero h1,html[data-themed] .campus h2,html[data-themed] .folio h3,html[data-themed] .tile h3,html[data-themed] .workspace h1 {
  font-family:var(--serif);font-weight:400;letter-spacing:-.055em
}
html[data-themed] .mast h1 {font-size:clamp(54px,6.2vw,96px)}
html[data-themed] .mast h1 em,html[data-themed] .campus .kicker {color:var(--accent)}
html[data-themed] .mast .eyeline,html[data-themed] .unit {color:var(--accent);font-size:11px;letter-spacing:.14em}
html[data-themed] .scene {height:clamp(290px,30vw,430px);background:url("img/mountain-print.svg") center/cover;border-radius:var(--frame);overflow:hidden}
html[data-themed] .scene>* ,html[data-themed] .scene:before {display:none}
html[data-themed] .scene:after {content:"한글";position:absolute;top:20px;left:22px;writing-mode:vertical-rl;font:36px/1.1 "Malgun Gothic",sans-serif;color:#263a32;letter-spacing:4px}
html[data-themed] .teaser,html[data-themed] .chapter,html[data-themed] .folio,html[data-themed] .syllabus,html[data-themed] .doc,html[data-themed] .teacher-art {background:var(--panel);border:1px solid var(--line);border-radius:var(--frame);color:var(--ink)}
html[data-themed] .teaser {padding:clamp(24px,3.6vw,54px);margin:0 0 44px}
html[data-themed] .campus .btn {background:var(--accent);color:var(--paper);border-radius:var(--frame);padding:12px 20px;border:1px solid var(--accent)}
html[data-themed] .btn:hover {background:var(--strong)}
html[data-themed] .tiles {gap:16px}
html[data-themed] .tile {border:1px solid var(--line);border-radius:var(--frame);color:var(--ink);background:var(--panel)}
html[data-themed] .tile.gold {background:var(--paper)}
html[data-themed] .tile.green {background:var(--glaze)}
html[data-themed] .chapter>img,html[data-themed] .teacher-photo {border-radius:var(--frame)!important}
html[data-themed] .campus .workspace {padding-top:40px}
html[data-themed] .workspace .access {margin:50px auto 70px;max-width:480px;padding:clamp(24px,4vw,50px);border-top:4px solid var(--accent)}
html[data-themed] .workspace input,html[data-themed] .workspace textarea,html[data-themed] .workspace select,html[data-themed] .folio input {border:1px solid var(--line);border-radius:5px;background:var(--paper);color:var(--ink)}
html[data-themed] .workspace .rolebar button[aria-pressed="true"] {background:var(--accent);color:var(--paper)}
html[data-themed] :focus-visible {outline:3px solid var(--accent);outline-offset:3px}
html[data-visual="jade"] .campus .mast {background:var(--panel);border-radius:26px;margin:24px 0;padding:clamp(25px,4vw,54px)}
html[data-visual="jade"] .mast h1 {font-weight:540;font-size:clamp(50px,5.4vw,83px)}
html[data-visual="jade"] .mast h1 em {font-style:normal}
html[data-visual="jade"] .scene {
  background:radial-gradient(ellipse at 50% 88%,#36504483,transparent 48%),repeating-linear-gradient(90deg,#bacdbf 0 7%,#a7bfad 7% 8%);border-radius:48% 48% 12px 12px
}
html[data-visual="jade"] .scene .sun {display:block;left:19%;top:23%;width:62%;height:66%;transform:none;background:radial-gradient(ellipse at 29% 27%,#f7f6d9 1%,#c5d8ba 27%,#83aa94 62%,#426d61 90%);border-radius:38% 38% 47% 47% / 30% 30% 65% 65%;box-shadow:12px 15px 20px #25443846}
html[data-visual="jade"] .scene .sun:before {content:"";position:absolute;left:30%;width:40%;top:-5%;height:12%;border-radius:18% 18% 55% 55%;background:linear-gradient(90deg,#acc6b0,#edf0d8,#89a38e);border-top:4px solid #667b6a}
html[data-visual="jade"] .scene:after {content:"";top:auto;left:38%;bottom:10%;width:24%;height:4%;border-radius:50%;background:#5c7c69}
html[data-visual="jade"] .teaser {background:transparent;border-width:1px 0;border-radius:0}
html[data-visual="ink"] .campus .mast {background:linear-gradient(90deg,#15171a 0%,#171a1e 45%,#242524);padding:clamp(23px,4vw,58px);margin:20px 0 28px;border:1px solid var(--line)}
html[data-visual="ink"] .scene {background:radial-gradient(circle at 43% 42%,#655645,#262729 65%);border:1px solid #827566}
html[data-visual="ink"] .scene .sun {display:block;inset:8% 16%;width:auto;height:auto;background:url("img/mountain-print.svg") center/cover;filter:sepia(.65) saturate(.65);border-radius:50%;transform:none;box-shadow:0 0 0 8px #202123,0 0 0 9px #958474}
html[data-visual="ink"] .scene:after {content:"한국어";color:#e5c695;font-size:14px;left:auto;right:12px}
html[data-visual="ink"] .teaser {border-left:3px solid var(--accent)}
html[data-visual="ink"] .mast h1 em {font-style:italic}
@media(max-width:760px){
 html[data-themed] .campus .mast {padding:22px 0;min-height:0}
 html[data-visual="jade"] .campus .mast,html[data-visual="ink"] .campus .mast{padding:22px}
 html[data-themed] .scene {width:100%;max-width:none;height:210px}
 html[data-themed] .schoolbar {min-height:0}
 .appearance {margin-left:auto}
}
@media(max-width:400px){.appearance{font-size:12px}.appearance select{max-width:135px}}

/* A language workbook and a two-panel strip drawn from the course. */
.sample { display:none; margin:0; min-width:0 }
html:is([data-visual="notebook"],[data-visual="storyboard"]) .mast .scene { display:none }
html[data-visual="notebook"] .notebook-sample,
html[data-visual="storyboard"] .storyboard-sample { display:block }
.sample figcaption { display:flex; align-items:baseline; justify-content:space-between; gap:12px }
.sample figcaption a { text-underline-offset:4px }
html[data-visual="notebook"] body.campus {
  --ink:#172c40; --paper:#f9f8f2; --panel:#eeeee5; --line:#b9c2c7;
  --accent:#254d8a; --strong:#173769; --glaze:#e3eaf0; --frame:2px;
  --serif:Cambria,Georgia,serif;
}
html[data-visual="notebook"] .schoolbar { border-bottom:2px solid var(--ink) }
html[data-visual="notebook"] .campus .mast { grid-template-columns:.95fr 1.1fr; gap:5%; padding-block:clamp(26px,4vw,60px) }
html[data-visual="notebook"] .mast h1 { line-height:.98 }
html[data-visual="notebook"] .mast h1 em { color:var(--ink) }
.notebook-sample { padding:clamp(16px,3vw,46px) clamp(13px,2.2vw,34px) 14px; background:#294b73; color:#fff; border-radius:4px }
.book-spread { display:grid; grid-template-columns:1fr 1fr; color:#1e3447; box-shadow:0 3px #dbd6c6,0 5px #a6a49c,2px 9px 14px #142b463b; transform:rotate(-2deg) }
.book-page { padding:clamp(13px,2vw,30px); min-width:0; display:flex; flex-direction:column; align-items:flex-start; justify-content:space-between; gap:12px }
.alphabet { background:linear-gradient(90deg,#fcfaf0 89%,#e6e2d6); border-radius:2px 0 0 2px }
.practice-page { background:linear-gradient(90deg,#d9d5c9,#f7f4e9 8%,#fffdf4 95%); border-radius:0 3px 3px 0 }
.running-title { width:100%; padding-bottom:6px; border-bottom:1px solid #a4b0bc; font:600 11px/1.4 'Segoe UI',sans-serif; letter-spacing:.08em; text-transform:uppercase }
.model-letter { align-self:center; display:grid; place-items:center; width:min(100%,155px); aspect-ratio:1; border:1px solid #aebbc4; color:#244c86;
  background:linear-gradient(90deg,transparent 49.5%,#cbd2d6 50%,transparent 50.7%),linear-gradient(transparent 49.5%,#cbd2d6 50%,transparent 50.7%); font:500 clamp(66px,8.2vw,120px)/1 'Malgun Gothic',sans-serif }
.letter-name { font:italic clamp(14px,1.5vw,21px)/1.15 Cambria,Georgia,serif }
.practice-page .construction { font:500 clamp(25px,3.1vw,47px)/1.3 'Malgun Gothic',sans-serif; margin:0; white-space:nowrap; color:#244c86 }
.mast .practice-page p:not(.construction) { font:clamp(14px,1.22vw,18px)/1.4 Cambria,Georgia,serif; margin:0 }
.sample-sound { color:#254d8a; background:transparent; border:1px solid #8e9baa; border-radius:2px; padding:7px 11px; font:600 13px 'Segoe UI',sans-serif; cursor:pointer }
.sample-sound:hover { background:#e5eaf0 }
.notebook-sample figcaption { margin-top:21px; justify-content:flex-end; font-size:13px }
html[data-visual="notebook"] .teaser { border:0; border-block:1px solid var(--line); background:transparent; padding-inline:0 }
html[data-visual="notebook"] .chapter, html[data-visual="notebook"] .syllabus { border-top:4px double var(--accent) }
html[data-visual="notebook"] .tile { border-width:2px 0 0; background:transparent }
html[data-visual="notebook"] .tile .unit { font-family:Consolas,monospace }
html[data-visual="storyboard"] body.campus {
  --paper:#faf4e9; --ink:#29231e; --panel:#efe6d7; --line:#b9aca0;
  --accent:#933d29; --strong:#662918; --frame:3px; --glaze:#e0e5cc;
  --serif:'Arial Narrow','Segoe UI',sans-serif;
}
html[data-visual="storyboard"] .schoolbar .logo i { border-radius:50% }
html[data-visual="storyboard"] .campus .mast { grid-template-columns:.9fr 1.1fr; padding:clamp(25px,3.4vw,52px); background:#302e27; color:#fff7e6; margin:20px 0 28px; gap:4% }
html[data-visual="storyboard"] .mast .eyeline,html[data-visual="storyboard"] .mast h1 em { color:#fdc376 }
html[data-visual="storyboard"] .mast h1 { font-weight:750; font-size:clamp(47px,5.4vw,82px); line-height:1; letter-spacing:-.06em }
html[data-visual="storyboard"] .mast h1 em { font:italic 1em/1 Georgia,serif }
html[data-visual="storyboard"] .mast .btn { background:#f5cb90; border-color:#f5cb90; color:#322a21 }
.storyboard-sample { background:#fff7e7; color:#29231e; padding:clamp(12px,1.6vw,24px); transform:rotate(1deg) }
.strip-cover { display:flex; align-items:baseline; justify-content:space-between; padding-bottom:8px }
.strip-heading { font:800 clamp(20px,2.2vw,34px)/1 'Arial Narrow','Segoe UI',sans-serif; letter-spacing:-.055em }
.strip-heading i { font-family:Georgia,serif; color:#933d29 }
.episode { font:italic 15px Georgia,serif }
.comic-panels { display:grid; grid-template-columns:.9fr 1.1fr; gap:6px }
.comic-frame { display:flex; flex-direction:column; position:relative; align-items:center; justify-content:flex-end; overflow:hidden; min-width:0; border:2px solid #322a21; height:clamp(190px,18vw,285px) }
.comic-frame.question { background:#e8b66f }
.comic-frame.answer { background:#f3e9fc }
.comic-frame img { height:66%; width:95%; object-fit:contain; object-position:center bottom }
.comic-frame.answer img { width:100%; height:79%; object-fit:cover; object-position:50% 52% }
.comic-frame>span { align-self:flex-start; position:absolute; z-index:1; top:8%; left:6%; padding:5px 11px; border:1.5px solid #302b25; border-radius:50%; background:#fffdf6; font:bold clamp(14px,1.5vw,23px)/1.7 'Malgun Gothic',sans-serif; white-space:nowrap }
.comic-frame>span:after { content:''; position:absolute; bottom:-5px; left:30%; width:7px; height:7px; transform:skewY(-20deg) rotate(45deg); border:solid #302b25; border-width:0 1.5px 1.5px 0; background:#fffdf6 }
.storyboard-sample figcaption { margin-top:10px; font:italic clamp(18px,2vw,27px)/1.2 Georgia,serif }
.storyboard-sample figcaption a { font:600 13px/1.4 'Segoe UI',sans-serif }
html[data-visual="storyboard"] :is(.chapter,.syllabus,.tile) { border:1px solid var(--ink) }
html[data-visual="storyboard"] .campus h2,html[data-visual="storyboard"] .chapter h1,html[data-visual="storyboard"] .tile h3 { font-weight:700 }
html[data-visual="storyboard"] .campus h2 { letter-spacing:-.025em }
html[data-visual="storyboard"] .teaser { background:#f0d5a8; border:0 }
html[data-visual="storyboard"] .workspace .access { border-top:5px solid var(--accent) }
@media(max-width:760px){
  html[data-visual="notebook"] .campus .mast, html[data-visual="storyboard"] .campus .mast { grid-template-columns:minmax(0,1fr); gap:24px }
  html[data-visual="storyboard"] .campus .mast { padding:clamp(16px,4vw,27px) }
  .book-page { padding:clamp(13px,3.4vw,25px) }
  .comic-frame { height:clamp(160px,44vw,225px) }
  .comic-frame>span { padding-inline:7px }
}


.original-copy, .campus .actions .original-action {display:none}
html[data-visual="original"] .original-copy {display:block}
html[data-visual="original"] .campus .actions .original-action {display:inline-block}
html[data-visual="original"] .mast :is(.variant-copy,.actions .variant-action) {display:none}
html[data-visual="original"] #lessons + .teaser {margin-top:32px}