/* 빛갈래 테마 — "메종"
   흑과 아이보리, 가는 선, 넓은 여백. 서체는 책에 쓰는 고운바탕(제목)·고운돋움(본문), 한글 자간은 책처럼 보통으로. 포인트 색은 프리즘의 네 갈래 빛을 보석 빛으로 낮춘 것.
   브랜드 로고·모노그램·서체는 쓰지 않습니다.
   - :root 토큰은 모든 페이지가 함께 씁니다.
   - body[data-role] 아래 규칙은 수업 화면(class.html) 전용입니다. class.html의 인라인 <style> 뒤에 연결됩니다.
   - 이 파일을 지우면 원래 모양으로 돌아갑니다. */
@import url('https://fonts.googleapis.com/css2?family=Gowun+Batang:wght@400;700&family=Gowun+Dodum&display=swap');

:root{
  --bg:#f6f4ef; --card:#ffffff; --line:#e4dfd6; --fg:#141414; --muted:#6e6960; --soft:#efebe4;
  --accent:#141414; --on-accent:#ffffff;
  --lux-accent:#141414; --lux-on:#ffffff; --lux-gold:#a07a44; --lux-hair:#d6cfc2;
  --ok:#2e6a4f; --ok-soft:#e3eee7; --bad:#a3293d; --bad-soft:#f7e3e6; --now:#8f5f17; --now-soft:#f5ead3; --warn:#8f5f17;
  --star:#b08a4e;
  --jewel-1:#8e2c3a; --jewel-2:#b08a4e; --jewel-3:#2e6a4f; --jewel-4:#2a4a7f;
  --font-display:"Gowun Batang","Nanum Myeongjo","AppleMyungjo","Batang",serif;
  --font-body:"Gowun Dodum","Pretendard Variable",Pretendard,"Noto Sans KR",system-ui,-apple-system,"Malgun Gothic",sans-serif;
  --font:var(--font-body);
  --lux-r:2px;
  color-scheme:light;
}
@media (prefers-color-scheme: dark){
  :root:not([data-theme="light"]){
    --bg:#0f0f0e; --card:#181817; --line:#2e2c28; --fg:#f2efe9; --muted:#a59f94; --soft:#211f1c;
    --accent:#f2efe9; --on-accent:#141414;
    --lux-accent:#f2efe9; --lux-on:#141414; --lux-gold:#c9a66b; --lux-hair:#3a372f;
    --ok:#86c4a3; --ok-soft:#1a2d23; --bad:#ee8f9c; --bad-soft:#3d1c22; --now:#e3bd75; --now-soft:#3b2f18; --warn:#e3bd75;
    --star:#d3ae6f;
    --jewel-1:#d0707e; --jewel-2:#d3ae6f; --jewel-3:#86c4a3; --jewel-4:#8fb0e3;
    color-scheme:dark;
  }
}
:root[data-theme="dark"]{
  --bg:#0f0f0e; --card:#181817; --line:#2e2c28; --fg:#f2efe9; --muted:#a59f94; --soft:#211f1c;
  --accent:#f2efe9; --on-accent:#141414;
  --lux-accent:#f2efe9; --lux-on:#141414; --lux-gold:#c9a66b; --lux-hair:#3a372f;
  --ok:#86c4a3; --ok-soft:#1a2d23; --bad:#ee8f9c; --bad-soft:#3d1c22; --now:#e3bd75; --now-soft:#3b2f18; --warn:#e3bd75;
  --star:#d3ae6f;
  --jewel-1:#d0707e; --jewel-2:#d3ae6f; --jewel-3:#86c4a3; --jewel-4:#8fb0e3;
  color-scheme:dark;
}

/* ===================== 수업 화면 (class.html) ===================== */
/* 배경 테마(applySkin)가 body에 강조색을 직접 넣으므로 여기서 고정 */
body[data-role]{--accent:var(--lux-accent)!important;--on-accent:var(--lux-on)!important;
  --accent-soft:var(--soft)!important;--pane:#121211!important}

/* 버튼 · 입력: 각진 모서리, 가는 선, 자간 */
body[data-role] button{border-radius:var(--lux-r);font-weight:400;letter-spacing:0;transition:background .15s,color .15s,border-color .15s}
body[data-role] button:hover{border-color:var(--fg)}
body[data-role] .primary{background:var(--accent);border-color:var(--accent);color:var(--on-accent)}
body[data-role] .primary:hover{background:color-mix(in srgb,var(--accent) 84%,var(--card));border-color:var(--accent)}
body[data-role] :is(.icon,.say,.sw,.pc,.q .row button){border-radius:50%}
body[data-role] :is(input,textarea,select){border-radius:var(--lux-r)}
body[data-role] :is(button,a,input,textarea,select):focus-visible{outline:2px solid var(--fg);outline-offset:3px}
body[data-role] button.listening{background:#a3293d;border-color:#a3293d;color:#fff}

/* 맨 위 막대 */
body[data-role] .topbar{background:var(--card);border-bottom:1px solid var(--line)}
body[data-role] .mark{font-family:var(--font-display);font-weight:700;font-size:20px;letter-spacing:.02em}
body[data-role] :is(.mark,.logo) svg path:nth-child(1){stroke:var(--fg)}
body[data-role] .bg-mark .frame{stroke:var(--fg)} body[data-role] .bg-mark .r1{stroke:var(--jewel-1)} body[data-role] .bg-mark .r2{stroke:var(--jewel-2)}
body[data-role] .bg-mark .r3{stroke:var(--jewel-3)} body[data-role] .bg-mark .r4{stroke:var(--jewel-4)}
body[data-role] .mark .bg-mark{width:30px;height:27px;overflow:visible} body[data-role] .logo .bg-mark{width:40px;height:36px;overflow:visible}
body[data-role] :is(.mark,.logo) svg path:nth-child(2){stroke:var(--jewel-1)}
body[data-role] :is(.mark,.logo) svg path:nth-child(3){stroke:var(--jewel-2)}
body[data-role] :is(.mark,.logo) svg path:nth-child(4){stroke:var(--jewel-3)}
body[data-role] :is(.mark,.logo) svg path:nth-child(5){stroke:var(--jewel-4)}
body[data-role] .tbtn{border-radius:0;background:transparent;color:var(--muted);font-weight:400;font-size:15px;letter-spacing:0;min-height:40px}
body[data-role] .tbtn:hover{background:transparent;color:var(--fg)}
body[data-role] .tbtn[aria-expanded="true"]{background:transparent;color:var(--fg);box-shadow:inset 0 -2px 0 var(--fg)}
body[data-role] .topbar .exit{border-radius:var(--lux-r);background:transparent;border:1px solid var(--fg);color:var(--fg);
  font-family:var(--font-body);font-weight:400;letter-spacing:0}
body[data-role] .topbar .exit:hover{background:var(--fg);color:var(--card);border-color:var(--fg)}
body[data-role] .who{letter-spacing:0}

/* 펼친 메뉴 */
body[data-role] .menu{border-radius:0;border:1px solid var(--line);border-top:0;box-shadow:0 28px 56px rgba(0,0,0,.12);padding:18px 20px 22px}
body[data-role] .menu-back{background:rgba(10,10,10,.28)}
body[data-role] .menu h4{font-family:var(--font-display);font-weight:700;font-size:20px;letter-spacing:0;padding-bottom:10px;border-bottom:1px solid var(--line);margin-bottom:12px}
body[data-role] .menu-grp{letter-spacing:0;color:var(--muted);font-weight:700}
body[data-role] .menu-art{border-radius:var(--lux-r)}
body[data-role] .menu-art[aria-current="true"]{border-color:var(--fg);background:var(--soft)}
body[data-role] .menu-skins button{border-radius:var(--lux-r);font-family:var(--font-body);font-weight:400;letter-spacing:0}
body[data-role] .menu-skins button[aria-pressed="true"]{background:var(--fg);border-color:var(--fg);color:var(--card)}
body[data-role] .menu-home{font-family:var(--font-body)}
body[data-role] .lv{font-family:var(--font-display);color:var(--fg)}
body[data-role] .tree summary,body[data-role] .tree .unit{border-radius:var(--lux-r)}
body[data-role] .tree .pill{border-radius:var(--lux-r);background:var(--fg);color:var(--card)}
body[data-role] :is(.tree-opts,.tree .unit,.consent) input{accent-color:var(--fg)}
body[data-role] .stu{border-radius:var(--lux-r)}
body[data-role] .stu[open] summary{background:var(--soft)}
body[data-role] .lvb{border-radius:var(--lux-r);font-family:var(--font-body);font-weight:400;background:var(--fg);color:var(--card)}
body[data-role] .kpi{border-radius:var(--lux-r);background:var(--soft)}
body[data-role] .kpi b{font-family:var(--font-display);font-weight:700}
body[data-role] .hist .bar{height:4px;border-radius:0}
body[data-role] .lv-badge{border-radius:var(--lux-r)}

/* 시작 화면 */
/* 시작 화면 배경은 늘 지구 사진(NASA 아폴로 17호, 1972 · 퍼블릭 도메인). 수업 중 배경은 상단 메뉴에서 고른 것 */
body[data-role] .launch > .scene{background:#000 url("img/earth-1800.jpg") 50% 36vh/max(150vmin,980px) no-repeat!important;filter:none!important}
body[data-role] .launch > .scene > *{display:none!important}
@media (max-width:700px){body[data-role] .launch > .scene{background-size:190vw!important;background-position:50% 46vh!important;background-image:url("img/earth-1000.jpg")!important}}
body[data-role] .launch-card{border-radius:var(--lux-r);background:color-mix(in srgb,var(--card) 96%,transparent);
  border:1px solid var(--line);box-shadow:0 30px 80px rgba(0,0,0,.14);padding:34px 28px 26px;gap:14px}
body[data-role] .logo{font-family:var(--font-display);font-weight:700;font-size:36px;letter-spacing:.02em}
body[data-role] .sub{font-family:var(--font-display);font-size:16px;letter-spacing:.02em;color:var(--muted);margin:-2px 0 6px}
body[data-role] .sub::after{content:"";display:block;width:28px;height:1px;background:var(--fg);margin:16px auto 0}
body[data-role] .seg{background:transparent;border:1px solid var(--fg);border-radius:var(--lux-r);padding:0;gap:0}
body[data-role] .seg button{border-radius:0;font-family:var(--font-body);font-weight:400;font-size:17px;letter-spacing:.02em;min-height:46px}
body[data-role] .seg button[aria-pressed="true"]{background:var(--fg);color:var(--card)}
body[data-role] input.big{border:0;border-bottom:1px solid var(--fg);border-radius:0;background:transparent;padding:12px 2px;font-size:18px}
body[data-role] input.big::placeholder{color:var(--muted);letter-spacing:0}
body[data-role] .code-row input{letter-spacing:.2em}
body[data-role] .sw[aria-pressed="true"]{outline:2px solid var(--fg)}
body[data-role] .go{font-family:var(--font-body);font-weight:400;font-size:19px;letter-spacing:.04em;min-height:54px;border-radius:var(--lux-r)}
body[data-role] .link{color:var(--fg);letter-spacing:0;font-size:15px}
body[data-role] .notice{border-radius:var(--lux-r)}
body[data-role] .recbox{border-radius:var(--lux-r);background:var(--soft)}
body[data-role] .recbox a{border-radius:var(--lux-r)}
body[data-role] .lvlabel{letter-spacing:0}

/* 영상 칸 */
body[data-role] .cam-pane > .scene{opacity:.12}
@media (prefers-color-scheme: dark){:root:not([data-theme="light"]) body[data-role] [data-scene]{filter:brightness(.22) saturate(.6)}}
:root[data-theme="dark"] body[data-role] [data-scene]{filter:brightness(.22) saturate(.6)}
body[data-role] .stage{border-radius:var(--lux-r);box-shadow:none;outline:1px solid rgba(255,255,255,.08)}
body[data-role] .tag{border-radius:var(--lux-r);background:rgba(10,10,10,.62);font-family:var(--font-body);font-weight:400;font-size:15px;letter-spacing:0}
body[data-role] .bubble{border-radius:var(--lux-r);background:rgba(250,248,243,.96);color:#141414;font-family:var(--font-body);font-weight:400;box-shadow:0 12px 32px rgba(0,0,0,.28)}
body[data-role] .bubble b{font-family:var(--font-display);color:#141414;letter-spacing:.22em}
body[data-role] .pip{border-radius:var(--lux-r);border:1px solid rgba(255,255,255,.55)}
body[data-role] .status{border-radius:var(--lux-r);font-family:var(--font-body);font-weight:400;font-size:15px;letter-spacing:0;background:rgba(0,0,0,.42)}
body[data-role] .icon{background:rgba(255,255,255,.08);border-color:rgba(255,255,255,.35)}
body[data-role] .icon:hover{border-color:#fff}
body[data-role] .icon[aria-pressed="false"]{background:#a3293d;border-color:#a3293d}
body[data-role] :is(.msg,.cnotice){border-radius:var(--lux-r)}
body[data-role] .recind{border-radius:var(--lux-r);background:#a3293d}

/* 읽기 칸 */
body[data-role] .read-bar{border-radius:var(--lux-r);border:1px solid var(--line);box-shadow:0 14px 34px rgba(0,0,0,.08)}
body[data-role] .bar-row button{font-family:var(--font-body);font-weight:400;letter-spacing:0;border-radius:var(--lux-r)}
body[data-role] #btnRead{letter-spacing:.02em}
body[data-role] .stars span.on{color:var(--star)}
body[data-role] .progress{height:3px;border-radius:0}
body[data-role] .progress b{background:var(--lux-gold)}
body[data-role] .paper{border-radius:var(--lux-r);border:1px solid var(--line);box-shadow:0 18px 44px rgba(0,0,0,.06);padding:26px 30px 28px}
@media (max-width:560px){body[data-role] .paper{padding:18px 18px}}
@container (max-width:540px){body[data-role] .paper{padding:16px 16px}}
body[data-role] .src{font-size:14px;letter-spacing:0;color:var(--muted);font-weight:400}
body[data-role] .title-select{font-family:var(--font-display);font-weight:700;letter-spacing:-.01em}
body[data-role] .w{border-radius:3px}
body[data-role] .banner strong{font-family:var(--font-display);font-weight:700}
body[data-role] .qs h3{font-family:var(--font-display);font-weight:700;letter-spacing:0}
body[data-role] .q .num{background:var(--fg);color:var(--card);font-family:var(--font-display);font-weight:700}
body[data-role] .q .acts button{font-family:var(--font-body);font-weight:400;letter-spacing:0}
body[data-role] .say.speaking{background:var(--fg);border-color:var(--fg);color:var(--card)}
body[data-role] .exp{border-radius:var(--lux-r);background:var(--soft);border-left:2px solid var(--lux-gold)}
body[data-role] .exp-h{font-family:var(--font-display);font-weight:700;color:var(--fg);letter-spacing:0}
body[data-role] .grade .gs{color:var(--star)}
body[data-role] .pen-row button{font-family:var(--font-body);border-radius:var(--lux-r)}
body[data-role] #btnTRead.on{background:var(--ok);border-color:var(--ok);color:#fff}
@media (prefers-reduced-motion: reduce){body[data-role] button{transition:none}}
