/* WEducator 공통 스타일 — OpenAI.com 스타일. 색·여백은 아래 토큰만 사용한다. */
:root {
  --bg: #262629; --surface: #2f2f33; --surface2: #3a3a3e; --text: #dedee2; --muted: #9a9aa0; --line: rgba(255,255,255,.14);
  --inv-bg: #dedee2; --inv-text: #232326; --brand: #dedee2; --brand-ink: #232326; --brand-soft: #3a3a3e;
  --danger: #ff8b8b; --danger-soft: #2a1717; --warn: #ffc56b; --warn-soft: #2a2114; --ok: #6fdba0; --ok-soft: #14251c;
  --c1: #8ab4ff; --c2: #c9a6ff;
  --cp-bg: #fbfaf5; --cp-ink: #26272e; --cp-blue: #3a6fd8; --cp-red: #e0474c; --cp-line: #b9bcc6; --cp-p-yellow: #f8e7a6; --cp-p-pink: #f6c9c9; --cp-p-sky: #cfe0f8; --cp-p-gray: #e7e8ec; --cp-green: #2f9e6e; --cp-p-green: #cdebd0; --cp-p-orange: #fbd9b0; --cp-p-purple: #e0d4f5; --cp-night: #5b5a96;   /* 과학 개념 그림(concept.js) 전용: 종이 바탕 + 네임펜(검정·파랑·빨강) + 파스텔 크레파스 칠. 힘=빨강, 속도·운동=파랑 */
  --tile: var(--surface);
  --demo-cur: #fff;   /* 홈 사용법 장면의 마우스 동그라미(흰색, 어두운 테두리로 구분) */
  --tile-float: 0 4px 12px rgba(0,0,0,.18); --tile-float-hi: 0 8px 18px rgba(0,0,0,.24); --float: 0 4px 12px rgba(0,0,0,.18), inset 0 1px 0 rgba(255,255,255,.05); --float-hi: 0 8px 18px rgba(0,0,0,.24), inset 0 1px 0 rgba(255,255,255,.07);   /* 다크: 어두운 바탕에 큰 그림자는 띠(층)처럼 보여서 작고 약하게 + 윗선 하이라이트로 떠 보이게 */   /* 떠 있는 느낌의 그림자 */
  --maxw: 1456px; --gutter: clamp(20px, 4.5vw, 40px); --pad-card: clamp(18px, 1.5vw + 14px, 36px); --gap-card: clamp(14px, 1.2vw + 9px, 24px); --gap-section: clamp(40px, 5vw + 20px, 96px); --gap-head: clamp(18px, 1.6vw + 10px, 32px); --pad-hero: clamp(24px, 5.4vw, 52px); --pad-tile: clamp(20px, 1.2vw + 14px, 32px);   /* 여백은 폭에 따라 단계 없이 연속으로 변함 */
  --font: "Pretendard Variable", "Pretendard", -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", system-ui, sans-serif;
}
:root[data-theme="light"] {
  --bg: #fff; --surface: #f6f6f6; --surface2: #efefef; --text: #45454b; --muted: #7a7a80; --line: rgba(0,0,0,.12);
  --inv-bg: #64646a; --inv-text: #fff; --brand: #64646a; --brand-ink: #fff; --brand-soft: #ececec;
  --danger: #c62d2d; --danger-soft: #fdecec; --warn: #9a5a00; --warn-soft: #fff3df; --ok: #1b7f4b; --ok-soft: #e4f6ec;
  --c1: #1f5fd1; --c2: #7a3fc4;
  --tile: #fff;   /* 홈 바로가기 카드: 라이트에서는 흰색(그림자와 함께 떠 보임) */
  --demo-cur: #fff;
  --tile-float: 0 1px 2px rgba(0,0,0,.05), 0 8px 24px rgba(0,0,0,.09); --tile-float-hi: 0 2px 4px rgba(0,0,0,.06), 0 14px 32px rgba(0,0,0,.13); --float: 0 0 0 1px rgba(0,0,0,.04), 0 1px 2px rgba(0,0,0,.05), 0 8px 24px rgba(0,0,0,.09); --float-hi: 0 0 0 1px rgba(0,0,0,.05), 0 2px 4px rgba(0,0,0,.06), 0 14px 32px rgba(0,0,0,.13);
}
* { box-sizing: border-box; }
html { color-scheme: dark light; scroll-behavior: smooth; } :root[data-theme="light"] { color-scheme: light; } :root[data-theme="dark"] { color-scheme: dark; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.7 var(--font); letter-spacing: -.01em; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; }
h1, h2, h3, h4 { font-weight: 400; line-height: 1.25; margin: 0 0 .4em; letter-spacing: -.02em; }
h1, h2, h3 { word-break: keep-all; }
h2 { font-size: 1.6rem; } h3 { font-size: 1.12rem; font-weight: 500; } h4 { font-size: .98rem; font-weight: 600; margin-top: 1.4em; }
p { margin: .7em 0; } a { color: inherit; }
code { background: var(--surface2); padding: 1px 7px; border-radius: 6px; font-size: .86em; word-break: break-all; }
.muted { color: var(--muted); } .sm { font-size: .82rem; } .eyebrow { color: var(--muted); font-size: .85rem; margin-bottom: 14px; }
.skip { position: absolute; left: -999px; } .skip:focus { left: 8px; top: 8px; z-index: 99; background: var(--surface); padding: 8px 12px; }
:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }

/* 상단 바 */
.top { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--bg) 80%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }   /* 뒤로 지나가는 내용이 뿌옇게 비쳐 느껴지게(배경 80% + 블러 10px) */
.top-in { max-width: var(--maxw); margin: 0 auto; padding: 16px var(--gutter); display: flex; align-items: center; gap: 28px; }
.wordmark { background: none; border: 0; color: var(--text); font: inherit; font-size: 1.15rem; font-weight: 600; letter-spacing: -.03em; padding: 0; cursor: pointer; flex: none; }
.nav { display: flex; gap: 20px; flex: 1; min-width: 0; overflow: hidden; }
.nav-tab { background: none; border: 0; color: var(--text); opacity: 1; font: inherit; font-size: .88rem; padding: 6px 0; cursor: pointer; white-space: nowrap; }
.nav-tab.active { opacity: 1; }   /* 지금 보는 메뉴에도 밑줄을 두지 않음 (심플) */
.top-act { display: flex; align-items: center; gap: 10px; flex: none; }
.iconbtn { background: none; border: 0; color: var(--text); width: 36px; height: 36px; border-radius: 50%; cursor: pointer; display: grid; place-items: center; font-size: 1rem; }
.iconbtn:hover { background: var(--surface2); } .menu-btn { display: none; }
.chev { display: block; flex: none; opacity: .7; margin-left: 2px; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: var(--gap-head) var(--gutter) 96px; outline: none; }

/* 버튼 — 알약형 */
.btn { border: 0; background: var(--surface2); color: var(--text); font: inherit; font-size: .9rem; font-weight: 500; padding: 9px 18px; border-radius: 999px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px; line-height: 1.3; white-space: nowrap; }
.btn:hover { filter: brightness(1.18); } :root[data-theme="light"] .btn:hover { filter: brightness(.94); } .btn:disabled { opacity: .35; cursor: not-allowed; }
.btn.dark { background: var(--surface2); } .btn.light, .btn.primary { background: var(--inv-bg); color: var(--inv-text); }
.btn.sm { padding: 5px 13px; font-size: .82rem; }
.link { background: none; border: 0; color: var(--text); font: inherit; font-size: .88rem; cursor: pointer; padding: 4px 0; text-align: left; text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--line); }
.link:hover { text-decoration-color: currentColor; }
.inp { width: 100%; padding: 11px 16px; border: 1px solid var(--line); background: var(--surface); color: var(--text); border-radius: 14px; font: inherit; }
/* 날짜·시간 입력: 아이폰(사파리)은 기본 모양일 때 칸 폭을 넘겨 잘려 보이므로, 기본 모양을 끄고 칸 안에 맞춘다 */
input.inp[type=date], input.inp[type=month], input.inp[type=time], input.inp[type=datetime-local] { -webkit-appearance: none; appearance: none; display: block; min-width: 0; max-width: 100%; min-height: 46px; text-align: left; }
input.inp[type=date]::-webkit-date-and-time-value, input.inp[type=month]::-webkit-date-and-time-value, input.inp[type=time]::-webkit-date-and-time-value { text-align: left; min-width: 0; margin: 0; }
input.inp[type=date]::-webkit-calendar-picker-indicator { opacity: .6; cursor: pointer; }
.inp:focus { border-color: var(--muted); outline: 0; } textarea.inp { resize: vertical; }
.fld { margin: 16px 0; } .fld label, .lbl { display: block; font-size: .84rem; color: var(--muted); margin-bottom: 5px; }
.fgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; } .row.end { justify-content: flex-end; margin-top: 16px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0 22px; }
.chip, .pill-o { border: 1px solid var(--line); background: none; color: var(--text); font: inherit; font-size: .86rem; padding: 6px 15px; border-radius: 999px; cursor: pointer; }
.chip:hover, .pill-o:hover { background: var(--surface2); } .chip.on { background: var(--inv-bg); color: var(--inv-text); border-color: var(--inv-bg); }
.tag { display: inline-block; font-size: .78rem; color: var(--muted); } .meta .tag + .tag::before, .meta .tag + .meta-l::before { content: "· "; }
.tag.t-c1 { color: var(--c1); } .tag.t-c2 { color: var(--c2); }
.pill { display: inline-block; font-size: .75rem; padding: 2px 11px; border-radius: 999px; background: var(--surface2); color: var(--text); vertical-align: middle; }
.pill.danger { background: var(--danger-soft); color: var(--danger); } .pill.ok { background: var(--ok-soft); color: var(--ok); }
.empty { text-align: center; color: var(--muted); padding: 32px 0; }

.prompt { position: relative; max-width: 700px; margin: 0 auto; background: var(--surface); border-radius: 28px; padding: 22px 22px 14px; text-align: left; min-height: 112px; display: flex; flex-direction: column; justify-content: space-between; }
.prompt input { width: 100%; background: none; border: 0; outline: 0; color: var(--text); font: inherit; font-size: 1rem; padding: 0; } .prompt input::placeholder { color: var(--muted); }
.results { position: absolute; top: calc(100% + 8px); left: 0; right: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; max-height: 56vh; overflow: auto; z-index: 60; text-align: left; box-shadow: 0 18px 50px rgba(0,0,0,.4); }
.sr { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; width: 100%; text-align: left; padding: 11px 18px; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; border-bottom: 1px solid var(--line); }
.sr:last-child { border-bottom: 0; } .sr:hover, .sr:focus { background: var(--surface2); outline: 0; }
.sr small { grid-column: 2; color: var(--muted); font-size: .78rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 피처 카드 + 우측 목록 */
.feature { display: grid; grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr); gap: 32px; margin-bottom: var(--gap-section); align-items: start; }
.feature-main { background: var(--surface); border-radius: 24px; padding: var(--pad-hero); }
.feature-main h2 { font-size: clamp(1.7rem, 3vw, 2.6rem); line-height: 1.25; margin-bottom: 20px; }
.feature-main p { color: var(--muted); max-width: 56ch; margin-bottom: 30px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--line); }
.stats b { display: block; font-size: 2rem; font-weight: 400; line-height: 1.1; } .stats small { font-size: 1rem; color: var(--muted); } .stats span { color: var(--muted); font-size: .84rem; }
.feed-h { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; } .feed-h h3 { font-size: 1.2rem; }

.block { margin-bottom: var(--gap-section); } .sec-h { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: var(--gap-head); } .sec-h h2 { margin: 0; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr)); gap: var(--gap-card); }
.tile { background: var(--surface); border: 0; border-radius: 20px; padding: var(--pad-tile); text-align: left; color: var(--text); font: inherit; display: flex; flex-direction: column; gap: 10px; }
.tile { min-width: 0; } .tile h3 { margin: 0; } .tile p { color: var(--muted); font-size: .92rem; margin: 0 0 12px; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }   /* 설명은 한 줄만 — 어떤 폭에서도 카드 높이가 같도록 */
.link-tile { cursor: pointer; } .link-tile:hover { background: var(--surface2); } .link-tile span { font-size: .88rem; }

/* 카드(하위 화면) */
.card { background: var(--surface); border-radius: 24px; padding: var(--pad-card); margin-bottom: var(--gap-card); }
.card-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; } .card-h h2, .card-h h3 { margin: 0; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap-card); align-items: start; } .grid2 .card { margin-bottom: 0; } .grid2 + .grid2 { margin-top: var(--gap-card); }
.bar { height: 6px; border-radius: 99px; background: var(--surface2); overflow: hidden; margin: 12px 0 8px; } .bar i { display: block; height: 100%; background: var(--text); border-radius: 99px; transition: width .3s; } .bar.ok i { background: var(--ok); } .bar.warn i { background: var(--warn); }

.task { display: flex; gap: 14px; align-items: flex-start; padding: 20px 4px; border-bottom: 1px solid var(--line); cursor: pointer; } .task:last-child { border-bottom: 0; }
.task input[type=checkbox] { width: 18px; height: 18px; margin-top: 3px; flex: none; accent-color: var(--text); }
.task-main { flex: 1; min-width: 0; display: block; } .task-main b { font-weight: 500; }
.task.done .task-main b { text-decoration: line-through; color: var(--muted); }
.meta { display: flex; gap: 4px 6px; flex-wrap: wrap; align-items: center; margin-top: 6px; font-size: .78rem; color: var(--muted); } .meta .ref { margin-left: auto; font-size: .76rem; }
.feed .meta .meta-l { display: none; }

.alert { border-radius: 14px; background: var(--surface2); padding: 18px 22px; margin: 18px 0; }
.alert p { margin: 6px 0; font-size: .9rem; } .alert ul { margin: 6px 0 0; padding-left: 18px; font-size: .88rem; }
.alert.danger { background: var(--danger-soft); } .alert.warn { background: var(--warn-soft); } .alert.ok { background: var(--ok-soft); }

.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: .88rem; margin: 16px 0; }
.tbl th, .tbl td { border-bottom: 1px solid var(--line); padding: 14px 16px; text-align: left; vertical-align: top; }
.tbl th { color: var(--muted); font-weight: 500; white-space: nowrap; font-size: .8rem; }
.tbl.compact td, .tbl.compact th { padding: 8px 12px; }
.tbl input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--text); }


.mlayout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 56px; align-items: start; }
.mnav { position: sticky; top: calc(var(--hdr-h, 69px) + 32px); max-height: calc(100vh - var(--hdr-h, 69px) - 56px); overflow: auto; padding: 18px; background: none; border-radius: 0; margin: 0; }
.mnav .inp { border-radius: 999px; }
.mnav-ch { font-size: .76rem; color: var(--muted); margin: 24px 14px 6px; }
.mnav-i { display: flex; justify-content: space-between; gap: 8px; width: 100%; text-align: left; border: 0; background: none; color: var(--text); opacity: .75; font: inherit; font-size: .9rem; padding: 10px 14px; border-radius: 12px; cursor: pointer; }
.mnav-i small { color: var(--muted); font-size: .72rem; white-space: nowrap; margin-top: 3px; } .mnav-i:hover { background: var(--surface2); opacity: 1; } .mnav-i.on { background: var(--surface); opacity: 1; font-weight: 600; }
.prose { padding: 56px 60px; max-width: 880px; } .prose h2 { font-size: 2rem; margin-bottom: .6em; } .prose .crumb { color: var(--muted); font-size: .85rem; margin-bottom: 6px; }
.prose ul, .prose ol { padding-left: 22px; margin: .5em 0; } .prose li { margin: 8px 0; }
.prose .warn-li { background: var(--warn-soft); border-radius: 10px; padding: 6px 12px; list-style: none; margin-left: -22px; }
.callout { background: var(--surface2); border-radius: 14px; padding: 18px 22px; margin: 22px 0; font-size: .92rem; } .callout.danger { background: var(--danger-soft); }
ol.flow { list-style: none; counter-reset: s; padding: 0 !important; display: grid; gap: 12px; margin: 18px 0; }
ol.flow li { counter-increment: s; display: flex; gap: 12px; align-items: flex-start; background: var(--surface2); padding: 15px 20px; border-radius: 14px; font-size: .92rem; margin: 0; }
ol.flow li::before { content: counter(s); flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--inv-bg); color: var(--inv-text); display: grid; place-items: center; font-size: .74rem; font-weight: 600; }
.src { margin-top: 40px; border-top: 1px solid var(--line); padding-top: 18px; }

.glayout { display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: var(--gap-card); align-items: start; } .glayout .card { margin-bottom: 0; }


.links { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.linkcard { display: grid; gap: 4px; background: var(--surface2); text-decoration: none; padding: 20px 24px; border-radius: 16px; } .linkcard:hover { filter: brightness(1.2); } .linkcard span { color: var(--muted); font-size: .8rem; }

/* 푸터 */
.foot { border-top: 1px solid var(--line); }
.foot-in { max-width: var(--maxw); margin: 0 auto; padding: 64px var(--gutter) 80px; }
.foot-cols { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 48px 40px; margin-bottom: 56px; }
.foot h4 { margin: 0 0 14px; font-size: .95rem; color: var(--muted); font-weight: 500; }
.foot button, .foot a { display: block; background: none; border: 0; color: var(--text); font: inherit; font-size: 1rem; line-height: 1.4; padding: 9px 0; cursor: pointer; text-decoration: none; text-align: left; } .foot-empty { display: block; color: var(--muted); font-size: .95rem; padding: 9px 0; } .foot button:hover, .foot a:hover { text-decoration: underline; }
.foot p { color: var(--muted); font-size: .8rem; max-width: 80ch; }

dialog { border: 0; border-radius: 24px; background: var(--surface); color: var(--text); padding: 40px; width: min(600px, calc(100vw - 24px)); }
dialog::backdrop { background: rgba(0,0,0,.6); }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); background: var(--inv-bg); color: var(--inv-text); padding: 11px 20px; border-radius: 999px; font-size: .88rem; opacity: 0; pointer-events: none; transition: .25s; z-index: 80; max-width: calc(100vw - 32px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* 메뉴가 상단에 들어갈 자리가 없을 때(또는 터치 기기)만 햄버거 — app.js 의 fitNav 가 html 에 nav-compact 를 붙임 */
  html.nav-compact .menu-btn { display: grid; }html.nav-compact .top-in { gap: 12px; }html.nav-compact .top-act { margin-left: auto; gap: 4px; }html.nav-compact .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 0; background: var(--bg); padding: 4px 16px 16px; border-bottom: 1px solid var(--line); }html.nav-compact .menu-open .nav { display: flex; }html.nav-compact .nav-tab { padding: 13px 0; font-size: 1.05rem; text-align: left; border-bottom: 1px solid var(--line); }html.nav-compact .nav-tab.active { text-decoration: none; font-weight: 600; }
@media (max-width: 900px) {
  .wrap { padding-bottom: 72px; }
  .feature, .grid2, .glayout, .mlayout { grid-template-columns: minmax(0, 1fr); } .feature { gap: 24px; }
  .mlayout { gap: 24px; } .mnav { position: static; max-height: 260px; padding: 0 0 8px; } .prose { padding: 32px 28px; max-width: none; }
  .fgrid { grid-template-columns: 1fr; }
  .meta .ref { margin-left: 0; } .foot-cols { grid-template-columns: 1fr 1fr; gap: 36px; } .foot-in { padding-top: 48px; padding-bottom: 64px; }
}
@media (max-width: 400px) { .prose { padding: 26px 22px; } dialog { padding: 28px; } }
@media (max-width: 520px) { .stats b { font-size: 1.5rem; } }

@media print {
  .top, .foot, .toast, .btn, .chips, .link, .mnav, .skip, .card-h .row { display: none !important; }
  body { background: #fff; color: #000; } .wrap { padding: 0; max-width: none; } .card { background: none; padding: 0; }
}

/* 상단 메뉴 하위 패널 */
.mega { position: absolute; left: 0; right: 0; top: 100%; background: var(--bg); opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity 0.133333s, transform 0.133333s, visibility 0.133333s; max-height: calc(100vh - 80px); overflow: auto; }
.mega.show { opacity: 1; visibility: visible; transform: none; }
.mega-in { max-width: var(--maxw); margin: 0 auto; padding: 22px var(--gutter) 34px; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px 44px; }
.mega-col h5 { margin: 0 0 8px; font-size: .8rem; font-weight: 500; color: var(--muted); }
.mega-col button { display: block; width: 100%; background: none; border: 0; color: var(--text); font: inherit; font-size: clamp(1.15rem, .6rem + 1vw, 1.5rem); line-height: 1.35; padding: 6px 0; cursor: pointer; text-align: left; }
.mega-col button { transition: color 0.1s; } .mega-col button:hover, .mega-col button:focus-visible { color: var(--muted); }
html.nav-compact .mega { display: none; }
@media (hover: none) { .mega { display: none; } }

/* 하위 메뉴가 열리면 아래 화면을 어둡게 + 블러 처리 */
.mega-bg { position: fixed; inset: 0; z-index: 30; background: rgba(0,0,0,.55); -webkit-backdrop-filter: blur(0); backdrop-filter: blur(0); opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .25s ease, backdrop-filter .25s ease, -webkit-backdrop-filter .25s ease, visibility .25s; }
.mega-bg.show { opacity: 1; visibility: visible; -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); transition: opacity .32s ease, backdrop-filter .32s ease, -webkit-backdrop-filter .32s ease, visibility 0s; }   /* 켜질 때 화면 전체가 동시에 서서히 어두워지고 흐려진다(위에서 내려오는 느낌 없이). 닫힐 때는 즉시 해제 */
html:has(.mega-bg.show) .top { background: var(--bg); }
.top { transition: background-color 0.3s ease; }   /* 메뉴가 열리고 닫힐 때 상단바 바탕이 번쩍 바뀌지 않고 서서히 바뀜 */   /* 하위메뉴가 열려 있는 동안 상단바는 비치지 않는 흰색(배경색) 유지 */
:root[data-theme="light"] .mega-bg { background: rgba(70,72,82,.3); }
.mega-in { padding: 40px var(--gutter) 52px; gap: 20px clamp(32px, 5vw, 64px); }   /* 열 사이 간격도 폭에 따라 연속으로(특정 폭에서 필요한 폭이 튀면 햄버거 전환이 들쭉날쭉해짐) */
.mega-in.big { grid-template-columns: minmax(280px, 1.3fr) repeat(auto-fit, minmax(200px, 1fr)); }
@media (max-width: 700px) { .mega-in { padding-top: 24px; } }
.mega-in.big .mega-col:first-child button { font-size: clamp(1.5rem, 2.6vw, 2.2rem); line-height: 1.3; padding: 5px 0; letter-spacing: -.02em; }
.mega-in.big .mega-col:not(:first-child) button { font-size: clamp(1.1rem, .57rem + 1vw, 1.425rem); font-weight: 500; padding: 7px 0; }
.mega-in .mega-col:not(:first-child) h5, .mega-in .mega-col h5 { margin-bottom: 14px; }
html.nav-compact .mega-bg { display: none; }
@media (hover: none) { .mega-bg { display: none; } }
.card[id] { scroll-margin-top: 88px; }

/* 검색 창 (상단 돋보기 / "/" 키) */
.sdlg { top: 12vh; margin: 0 auto; padding: 0; background: none; width: min(700px, calc(100vw - 24px)); overflow: visible; }
.sdlg::backdrop { background: rgba(0,0,0,.45); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.sdlg .prompt { min-height: 0; padding: 18px 22px; border-radius: 22px; }
.sdlg .results { position: static; margin-top: 10px; max-height: 56vh; box-shadow: none; }


/* 상단 메뉴: 평소엔 모두 밝게, 하나에 올리면 그 항목만 밝게 두고 나머지는 어둡게 */
.nav-tab { transition: opacity 0.25s ease; }
/* 메뉴 글자 위에 마우스가 있을 때만: 그 메뉴는 그대로 진하게, 나머지는 연하게 */
@media (hover: hover) { html:not(.nav-compact) .nav:has(.nav-tab:hover) .nav-tab:not(:hover) { opacity: .4; } }
.nav.dim .nav-tab { opacity: .4; }
.nav .nav-tab:hover, .nav.dim .nav-tab.open { opacity: 1; }

/* 부드러운 전환 (OpenAI 사이트처럼 살짝 늦게, 천천히 나타나고 사라짐) */
/* 하위 메뉴: 바탕 영역은 바로 나타나고(사라질 때는 글자가 올라가는 동안만 남음), 안의 글자만 스르륵 내려오며 나타남 */
.mega { opacity: 1; transform: none; clip-path: inset(0 0 100% 0); transition: clip-path 0.35s cubic-bezier(.22,.61,.36,1), visibility 0s 0.35s, height 0.625s cubic-bezier(.4,0,.2,1); }   /* 닫힐 때: 투명해지지 않고 아래쪽부터 위로 말려 올라감 */
.mega.show { clip-path: inset(0 0 0 0); transition: clip-path 0.35s cubic-bezier(.22,.61,.36,1), visibility 0s, height 0.625s cubic-bezier(.4,0,.2,1); }   /* 열릴 때: 위에서 아래로 펼쳐짐 */
.mega-in { transform: translateY(-28px); transition: transform 0.35s cubic-bezier(.22,.61,.36,1); }
.mega.show .mega-in { transform: none; }
.mega-bg { transition: opacity 0.316667s cubic-bezier(.4,0,.2,1), backdrop-filter 0.316667s cubic-bezier(.4,0,.2,1), -webkit-backdrop-filter 0.316667s cubic-bezier(.4,0,.2,1), visibility 0.316667s; }   /* 닫힐 때 어두움·흐림도 서서히 풀림 */
.mega-col button { transition: color 0.183333s ease; }
@keyframes megaIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.btn, .chip, .pill-o, .tile, .task, .mnav-i, .linkcard, .iconbtn, .sr, .link, .inp { transition: background-color .28s ease, color .28s ease, opacity .28s ease, filter .28s ease, border-color .28s ease; }
.tile { transition: background-color .3s ease; }
#view.enter { animation: viewIn .5s cubic-bezier(.22,.61,.36,1) both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.toast { transition: opacity .35s ease, transform .35s cubic-bezier(.22,.61,.36,1); }
/* 움직임 줄이기(prefers-reduced-motion) 설정은 일부러 따르지 않는다: 윈도우 사용자에게도 맥과 똑같이 보이게 하려는 사용자 결정(2026-10-21) */

/* 홈: 왼쪽 카드는 상단에 고정하고 오른쪽 목록만 먼저 스크롤 → 두 영역의 아래선이 맞으면 함께 스크롤 (OpenAI 사이트 방식) */
.feature { align-items: stretch; } .feature-left { min-width: 0; }
@media (min-width: 901px) and (min-height: 640px) { .feature-main { position: sticky; top: calc(var(--hdr-h, 69px) + 32px); } }

/* 완료한 업무는 목록에 그대로 남고, 흐리게 + 완료 표시 */
.feed-sub { margin: 0 0 6px; font-size: .84rem; color: var(--muted); }
.task .done-pill { flex: none; align-self: center; }
.task .task-main b { transition: color .3s ease; }
.task.done .meta { opacity: .6; }

/* 계정(구글 로그인) */
.acct { position: relative; }
.acct-btn { gap: 8px; max-width: 14em; height: 36px; padding-top: 0; padding-bottom: 0; }   /* 이름이 보일 때도 숨겨졌을 때도 같은 높이(36px, 옆 아이콘 버튼과 동일) */ .acct-ico { display: inline-flex; align-items: center; }
#acct-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar { width: 22px; height: 22px; border-radius: 50%; background: var(--inv-bg); color: var(--inv-text); display: grid; place-items: center; font-size: .72rem; font-weight: 700; }
.acct-pop { position: absolute; right: 0; top: calc(100% + 10px); width: 300px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 22px; z-index: 60; box-shadow: 0 18px 50px rgba(0,0,0,.35); }
.acct-pop[hidden] { display: none; } .acct-name { font-weight: 600; word-break: break-all; }
.acct-status { margin: 14px 0 8px; font-size: .86rem; } .acct-status.err { color: var(--danger); }
.acct-pop .btn { margin-top: 14px; width: 100%; }
@media (max-width: 900px) { .acct-pop { position: fixed; left: 16px; right: 16px; top: 64px; width: auto; } }

/* 상단 바 정리: 로그인 버튼 추가에 맞춰 폭 조정 */
.acct-btn { max-width: 9em; }

/* 로그인 버튼 + 마이페이지 */
.acct-btn { max-width: 11em; }
.acct-pop { width: 320px; padding: 20px; }
.acct-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.avatar.lg { width: 44px; height: 44px; font-size: 1.1rem; flex: none; }
.acct-mail { word-break: break-all; }
.acct-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; text-align: left; background: var(--surface2); color: var(--text); border: 0; border-radius: 14px; padding: 14px 16px; font: inherit; cursor: pointer; transition: background-color .25s ease, filter .25s ease; }
.acct-row:hover { filter: brightness(1.15); } :root[data-theme="light"] .acct-row:hover { filter: brightness(.95); }
.acct-row span:first-child { display: grid; gap: 2px; min-width: 0; } .acct-row b { font-weight: 600; font-size: .94rem; }
.acct-row small { color: var(--muted); font-size: .8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-go { color: var(--muted); font-size: 1.3rem; line-height: 1; }
.acct-status { display: flex; align-items: center; gap: 8px; margin: 16px 0 8px; font-size: .84rem; color: var(--muted); }
.acct-status .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); flex: none; } .acct-status.err .dot { background: var(--danger); }
@media (max-width: 900px) { .acct-pop { position: fixed; left: auto; right: 16px; top: 64px; width: min(340px, calc(100vw - 32px)); } }

/* 좁은 화면: 햄버거를 누르면 헤더 아래 화면 전체를 덮는 메뉴 — 분류 이름을 누르면 바로 그 화면으로, 옆 ⌄ 단추를 누르면 그 자리에서 하위 메뉴가 펼쳐짐(아코디언) */
.nav-sub, .nav-exp { display: none; }
/* 메뉴가 상단에 들어갈 자리가 없을 때(또는 터치 기기)만 햄버거 — app.js 의 fitNav 가 html 에 nav-compact 를 붙임 */
html.nav-compact .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; height: calc(100dvh - 100%); overflow-y: auto; overscroll-behavior: contain; grid-template-columns: minmax(0, 1fr) auto; grid-auto-rows: max-content; align-content: start; gap: 0 8px; background: var(--bg); padding: 20px var(--gutter) 56px; border: 0; }   /* grid-auto-rows: 하위 메뉴를 펼쳐 내용이 화면보다 길어져도 각 줄 높이가 줄어들지 않게 */
html.nav-compact .menu-open .nav { display: grid; animation: navIn .32s cubic-bezier(.22,.61,.36,1) both; }
html.nav-compact .nav-tab { grid-column: 1; display: flex; align-items: center; justify-content: flex-start; width: 100%; min-height: 44px; font-size: clamp(1.9rem, 7vw, 2.8rem); letter-spacing: -.03em; line-height: 1.25; padding: 8px 0; border: 0; text-align: left; opacity: 1; white-space: nowrap; }
html.nav-compact .nav-tab.active { text-decoration: none; font-weight: 400; color: var(--text); }
html.nav-compact .nav:hover .nav-tab { opacity: 1; }
html.nav-compact .nav-exp { grid-column: 2; align-self: center; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 999px; background: none; color: var(--muted); cursor: pointer; transition: background-color .25s ease, color .25s ease; }
html.nav-compact .nav-exp:hover, html.nav-compact .nav-exp[aria-expanded="true"] { color: var(--text); } html.nav-compact .nav-exp:hover { background: var(--surface2); }
.nav-exp svg { transition: transform .28s cubic-bezier(.22,.61,.36,1); } .nav-exp[aria-expanded="true"] svg { transform: rotate(180deg); }
html.nav-compact .nav-sub { grid-column: 1 / -1; }
html.nav-compact .nav-sub.open { display: grid; grid-template-columns: repeat(auto-fill, minmax(11.5em, 1fr)); gap: 0 24px; padding: 2px 0 22px; animation: navIn .28s cubic-bezier(.22,.61,.36,1) both; }
html.nav-compact .nav-col { min-width: 0; }
html.nav-compact .nav-col:not(.g) { grid-column: 1 / -1; }   /* 서비스 목록은 한 줄씩, 그 아래 묶음(개념 체험·과학 개념 등)은 폭에 따라 여러 열 */
html.nav-compact .nav-col.g { padding-top: 16px; }
html.nav-compact .nav-sub-h { margin: 0 0 2px; font-size: .84rem; font-weight: 400; color: var(--muted); letter-spacing: 0; white-space: nowrap; }
html.nav-compact .nav-sub-i { display: flex; align-items: center; width: 100%; min-height: 44px; text-align: left; background: none; border: 0; color: var(--text); font: inherit; font-size: 1.2rem; font-weight: 400; line-height: 1.3; padding: 6px 0; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color .2s ease; }
html.nav-compact .nav-col.g .nav-sub-i { font-size: 1.02rem; }
html.nav-compact .nav-sub-i:hover { color: var(--muted); }
html.nav-compact .nav-foot { grid-column: 1 / -1; }
html.nav-compact body.menu-open { overflow: hidden; }
@keyframes navIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* 상단 바 모양은 폭이 변해도 튀지 않게: 간격은 폭에 따라 부드럽게 줄고, 로고·아이콘 크기는 그대로.
   자리가 모자랄 때만 단계적으로 바뀜 — 1단계 계정 이름 숨김(acct-icon), 2단계 햄버거(nav-compact). 둘 다 app.js 의 fitNav 가 html 에 붙임 */
.top-in { gap: clamp(16px, 3.4vw, 28px); }
html.acct-icon .acct-btn, html.acct-icon .acct-btn.on, html.nav-compact .acct-btn, html.nav-compact .acct-btn.on { width: 44px; height: 36px; padding: 0; justify-content: center; max-width: none; }
html.acct-icon #acct-label, html.nav-compact #acct-label { display: none; }
html.nav-compact .top-in { gap: 12px; } html.nav-compact .top-act { gap: 4px; }
/* 아주 좁은 폰(340px 이하)에서만 테마 전환 버튼을 숨겨 넘침 방지 (푸터에 같은 버튼 있음) */
@media (max-width: 340px) { .tpop-wrap { display: none; } }

/* 상단 테마 버튼이 숨겨지는 340px 이하에서만, 전체 화면 메뉴 아래쪽에 작은 테마 전환 버튼 표시 */
.nav-foot { display: none; }
@media (max-width: 340px) {
  .nav-foot { display: block; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); }
  .nav-foot-l { display: block; font-size: .82rem; color: var(--muted); margin-bottom: 10px; }
}

/* ───── 필터 컨트롤: 성격에 따라 모양을 다르게 ─────
   seg-ctl = 몇 개 중 하나를 고르는 묶음(분야·영역·보기 전환), strip = 항목이 많은 한 줄 가로 스크롤 탭(월·분류) */
.fgroup { display: flex; align-items: center; gap: 16px; margin: 14px 0 18px; min-width: 0; }
.flabel { flex: none; width: 2.6em; font-size: .82rem; color: var(--muted); }
.seg-ctl { display: inline-flex; gap: 2px; padding: 3px; background: var(--surface2); border-radius: 999px; max-width: 100%; overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; scrollbar-width: none; }
.seg-ctl::-webkit-scrollbar, .strip::-webkit-scrollbar { display: none; }
.seg-ctl-b { flex: none; border: 0; background: none; color: var(--muted); font: inherit; font-size: .86rem; padding: 6px 16px; border-radius: 999px; cursor: pointer; white-space: nowrap; transition: background-color .25s ease, color .25s ease; }
.seg-ctl-b:hover { color: var(--text); } .seg-ctl-b.on { background: var(--inv-bg); color: var(--inv-text); }
.strip { display: flex; gap: 22px; flex: 1; min-width: 0; overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; scrollbar-width: none; border-bottom: 1px solid var(--line); }
.strip-i { flex: none; background: none; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; color: var(--muted); font: inherit; font-size: .9rem; padding: 8px 0; cursor: pointer; white-space: nowrap; transition: color .25s ease, border-color .25s ease; }
.strip-i:hover { color: var(--text); } .strip-i.on { color: var(--text); border-bottom-color: var(--text); }
@media (max-width: 560px) { .fgroup { flex-direction: column; align-items: flex-start; gap: 8px; } .flabel { width: auto; } .strip { width: 100%; flex: none; } }

/* ───── 매뉴얼 목차: 좁은 화면에서는 접이식 ───── */
.mnav-toggle { display: none; }
@media (max-width: 900px) {
  .mnav { position: static; max-height: none; overflow: visible; padding: 0; background: var(--surface); border-radius: 20px; }
  .mnav-toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; background: none; border: 0; color: var(--text); font: inherit; text-align: left; padding: 14px 18px; cursor: pointer; }
  .mnav-toggle span { display: grid; gap: 1px; min-width: 0; } .mnav-toggle small { color: var(--muted); font-size: .74rem; }
  .mnav-toggle b { font-weight: 500; font-size: 1rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .mnav-chev { flex: none; color: var(--muted); transition: transform .25s ease; } .mnav.open .mnav-chev { transform: rotate(180deg); }
  .mnav-list { display: none; padding: 0 14px 14px; max-height: 56vh; overflow-y: auto; } .mnav.open .mnav-list { display: block; }
}

/* ───── 좁은 화면: 표를 카드형으로 쌓기, 매뉴얼 안의 표는 가로 스크롤 ───── */
@media (max-width: 600px) {
  .tbl-stack, .tbl-stack tbody { display: block; } .tbl-stack thead { display: none; }
  .tbl-stack tr { display: grid; gap: 4px 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .tbl.tbl-stack td { display: block; border: 0; padding: 0; } .tbl.tbl-stack td:empty { display: none; }
  .links { gap: 8px; } .linkcard { padding: 12px 16px; border-radius: 14px; } .linkcard span { font-size: .76rem; }
  .prose .tbl { display: block; overflow-x: auto; } .prose .tbl td, .prose .tbl th { min-width: 130px; }
}

/* ───── 아주 좁은 화면(400px 이하): 여백·글자·간격을 줄여 화면이 길게 늘어나지 않게 ───── */
@media (max-width: 400px) {
  body { font-size: 15px; line-height: 1.62; }
  h2 { font-size: 1.3rem; } .prose h2 { font-size: 1.5rem; } .feature-main h2 { font-size: 1.5rem; }
  .card-h { margin-bottom: 14px; gap: 10px; }
  .prose { padding: 22px 18px; } dialog { padding: 22px; }
  .task { padding: 14px 2px; }
  .tbl th, .tbl td { padding: 10px; } .alert { padding: 14px 16px; margin: 14px 0; } .callout { padding: 14px 16px; margin: 16px 0; }
  ol.flow li { padding: 12px 14px; } .stats { margin-top: 32px; padding-top: 22px; gap: 12px; }
}

/* 화면 테마 설정 (헤더 팝업 · 푸터 · 좁은 폭 메뉴) */
.tpop-wrap { position: relative; }
.acct-pop.theme-pop { width: 270px; padding: 14px; }
.theme-h { margin: 2px 10px 8px; font-size: .8rem; font-weight: 400; color: var(--muted); letter-spacing: 0; }
.theme-opt { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; background: none; border: 0; color: var(--text); font: inherit; text-align: left; padding: 11px 12px; border-radius: 12px; cursor: pointer; transition: background-color .2s ease; }
.theme-opt:hover, .theme-opt:focus-visible { background: var(--surface2); }
.theme-opt span { display: grid; gap: 1px; min-width: 0; } .theme-opt b { font-weight: 500; font-size: .95rem; } .theme-opt small { color: var(--muted); font-size: .76rem; line-height: 1.35; }
.theme-opt .ck { flex: none; opacity: 0; transition: opacity .2s ease; } .theme-opt[aria-checked="true"] .ck { opacity: 1; }
.foot .seg-ctl { margin-top: 2px; } .foot .seg-ctl-b { display: inline-block; padding: 6px 14px; color: var(--muted); } .foot .seg-ctl-b:hover { color: var(--text); text-decoration: none; } .foot .seg-ctl-b.on { color: var(--inv-text); }
@media (max-width: 900px) { .acct-pop.theme-pop { width: min(270px, calc(100vw - 32px)); } }
@media (max-width: 340px) { .nav-foot .seg-ctl { max-width: 100%; } .nav-foot .seg-ctl-b { padding: 6px 12px; } }

/* ───── 경고 팝업: 가운데 둥근 상자 + 연한 붉은색으로 흐려진 배경 ───── */
.warn-dlg { width: min(520px, calc(100vw - 24px)); box-shadow: 0 20px 60px rgba(0, 0, 0, .18); }
.warn-dlg::backdrop { background: color-mix(in srgb, var(--danger) 16%, transparent); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.warn-dlg[open] { animation: wdIn .25s cubic-bezier(.22,.61,.36,1) both; } .warn-dlg[open]::backdrop { animation: wdBg .25s ease both; }
@keyframes wdIn { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes wdBg { from { opacity: 0; } to { opacity: 1; } }
.warn-dlg h3 { margin: 0 0 16px; } .warn-dlg .alert { margin: 0 0 16px; } .warn-dlg .alert p { margin: 0; } .warn-dlg .alert ul { margin: 8px 0 0; }
.wd-label { display: grid; gap: 10px; font-size: .9rem; margin: 18px 0 0; }
.btn.danger { background: var(--danger); color: var(--bg); } .btn.danger:disabled { cursor: not-allowed; }

/* ───── 입력 팝업 ───── */
.ask-dlg { width: min(460px, calc(100vw - 24px)); } .ask-dlg h3 { margin: 0 0 16px; }
.ask-choices { display: grid; gap: 4px; margin: 0 0 8px; }
.ask-choice { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; cursor: pointer; transition: background-color .2s ease; } .ask-choice:hover { background: var(--surface2); }
.ask-choice input { width: 18px; height: 18px; accent-color: var(--text); flex: none; }
.warn-dlg.plain::backdrop { background: rgba(0, 0, 0, .6); -webkit-backdrop-filter: none; backdrop-filter: none; }

/* 서비스가 아직 없는 분류의 하위 메뉴: "작업 중" */
.mega-empty { margin: 0; padding: 5px 0; color: var(--muted); font-size: clamp(1.5rem, 2.6vw, 2.2rem); line-height: 1.3; letter-spacing: -.02em; }
.nav-sub-empty { margin: 0; padding: 14px 0; color: var(--muted); font-size: 1.1rem; }
.mega-in.swap { animation: megaSwap 0.625s ease both; }
.mega-in.out { position: absolute; left: 0; right: 0; top: 0; pointer-events: none; animation: megaOut 0.625s ease both; }
@keyframes megaOut { from { opacity: 1; } to { opacity: 0; } }
@keyframes megaSwap { from { opacity: 0; } to { opacity: 1; } }
.mega.snap, .mega.snap .mega-in { transition: none !important; }   /* 닫힐 때는 하단 메뉴가 바로 사라짐 */


/* 하위 메뉴 위계: 왼쪽 서비스(큰 글씨) → 오른쪽 그 서비스의 분류 묶음(라벨 + 굵은 소제목, 선 없이 글자 크기·굵기·여백으로 구분) → 그 아래 항목 */
.mega-in.has-g { grid-template-columns: minmax(220px, .7fr) minmax(0, 2.3fr); align-items: start; }
.mega-groups { display: flex; gap: clamp(24px, 4vw, 56px); min-width: 0; padding-left: clamp(24px, 4vw, 56px); }
.mega-groups .mega-group { flex: 1 1 0; padding-left: 0; }
.mega-group { display: grid; gap: 14px; padding-left: clamp(24px, 4vw, 56px); min-width: 0; }
.mega-gl { color: var(--muted); font-size: .8rem; font-weight: 500; }   /* 수업 보조 살펴보기 제목(.mega-col h5)과 같은 크기 */
.mega-gcols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); gap: 22px clamp(16px, 2.4vw, 32px); }
.mega-group .mega-col h5 { margin: 0 0 8px; color: var(--text); font-size: clamp(.95rem, .5rem + .8vw, 1.1rem); font-weight: 600; }
.mega-in.big .mega-group .mega-col button, .mega-group .mega-col button { font-size: .8rem; line-height: 1.5; font-weight: 400; color: var(--text); padding: 6px 0; }   /* 바로 위 "가상 실험" 제목과 같은 크기 */
.mega-group .mega-col button:hover, .mega-group .mega-col button:focus-visible { color: var(--muted); }   /* 왼쪽 항목과 같게: 평소 본문색, 올리면 흐려짐 */

/* 하위 메뉴 패널은 글자를 줄바꿈하지 않고, 열 폭은 내용 기준(남는 폭만 나눠 가짐). 한 줄에 다 안 들어가면 app.js 의 fitNav 가 햄버거로 바꿈
   — 필요한 폭은 보이지 않는 복제(.mega-probe)에 같은 내용을 넣어 잼 */
.mega-in, .mega-in.big, .mega-in.has-g { display: flex; align-items: flex-start; }
.mega-in > .mega-col { flex: 1 0 auto; }
.mega-in.has-g > .mega-col { flex: .7 0 auto; }
.mega-groups { flex: 2.3 0 auto; min-width: auto; }
.mega-groups .mega-group { flex: 1 0 auto; min-width: auto; }
.mega-gcols { display: flex; gap: 22px clamp(16px, 2.4vw, 32px); }
.mega-gcols > .mega-col { flex: 1 0 auto; }
.mega-col h5, .mega-col button, .mega-gl, .mega-empty { white-space: nowrap; }
.mega-probe { position: absolute; left: 0; top: 0; width: 0; height: 0; overflow: hidden; visibility: hidden; pointer-events: none; }
.mega-probe .mega-in { width: max-content; max-width: none; margin: 0; transform: none; transition: none; }

/* 하단(푸터) — OpenAI 처럼: 선 없이 넉넉한 여백, 그룹(회색 제목 + 진한 링크)이 여러 열로 흘러 들어감, 맨 아래 한 줄 */
.foot { border-top: 0; }
.foot-in { padding-top: clamp(56px, 9vw, 120px); padding-bottom: clamp(48px, 6vw, 72px); }
.foot-cols { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: clamp(36px, 3.4vw, 44px) clamp(20px, 2.4vw, 32px); margin-bottom: 0; }   /* 그룹은 가로로 나란히 (OpenAI 처럼 열 단위) */
.foot-g { min-width: 0; }
.foot h4 { margin: 0 0 4px; font-size: .875rem; font-weight: 400; color: var(--muted); line-height: 1.4; }   /* OpenAI 하단과 같은 크기·간격: 14px, 제목→첫 항목 간격 좁게 */
.foot button, .foot a { font-size: .875rem; line-height: 1.4; padding: 8px 0; transition: color .25s ease; } .foot button:hover, .foot a:hover { color: var(--muted); }
.foot-bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; margin-top: clamp(40px, 6vw, 88px); }
.foot-bottom p { margin: 0; font-size: .9rem; color: var(--muted); max-width: none; }
@media (max-width: 1100px) { .foot-cols { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 720px) { .foot-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); } .foot-bottom { flex-direction: column; align-items: flex-start; } }

/* 하단: 분류별 메뉴 열은 홈에서만. 다른 화면에서는 상단 메뉴와 겹치므로 맨 아래 한 줄(설명·©)만 보임 */
html:not(.on-home) .foot-cols { display: none; }
html:not(.on-home) .foot-in { padding-top: 28px; padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px)); }   /* 화면 맨 아래에 가깝게 */
html:not(.on-home) .foot-bottom { margin-top: 0; }

@media (max-width: 560px) { .foot-cols { grid-template-columns: minmax(0, 1fr); gap: 30px; } }   /* 폰: OpenAI 처럼 한 줄(한 열)로 */

.acct-row + .acct-row { margin-top: 10px; }   /* 마이페이지의 줄(내 정보·앱으로 설치 등)이 서로 붙지 않게 */

/* 내용이 짧은 화면에서도 하단(설명·©)이 화면 맨 아래에 붙도록: 본문이 남는 높이를 채움 */
body { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
body > main#view { flex: 1 0 auto; width: 100%; }
body > .foot { flex: none; }

/* 하단 (Apple 하단 참고): 연한 회색 바탕 + 메뉴 열과 맨 아래 문구 사이 연한 분리선 */
.foot { background: var(--surface); }
.foot-bottom { margin-top: clamp(72px, 9vw, 112px); padding-top: 20px; border-top: 1px solid var(--line); }   /* 메뉴 열 아래 여백: 앞으로 메뉴를 더 넣을 자리를 미리 확보(예전의 2배) */
html:not(.on-home) .foot-bottom { margin-top: 0; padding-top: 0; border-top: 0; }   /* 메뉴 열이 없는 화면은 나눌 것이 없으므로 선 없음 */

html.on-home .foot-in { padding-top: clamp(28px, 3vw, 40px); }   /* 메뉴 열이 회색 영역 위쪽에 가깝게 (아래 여백은 앞으로 메뉴가 늘어날 것을 감안해 그대로) */

html.on-home .foot-bottom { padding-top: 23px; }
html.on-home .foot-in { padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px)); }   /* 분리선 → 글자, 글자 → 맨 아래 여백을 같게 */

/* 상단 메뉴 하위 패널: 묶음(가상 실험·과학 개념·빅히스토리)의 첫 버튼이 항목 수와 상관없이 같은 높이에서 시작하게 함. 예전에는 남는 높이가 라벨 줄과 버튼 줄에 나뉘어 항목이 4개인 묶음만 버튼이 약 16px 아래로 밀렸음 — 그 높이(버튼 한 개 높이의 절반)를 모든 묶음의 위쪽 여백으로 고정 */
.mega-group { align-content: start; }
.mega-group .mega-gcols { margin-top: calc(.6rem + 6px); }

/* 알림 알약(.toast): 좁은 화면에서 글이 두 줄이 되면 왼쪽으로 쏠려 보이던 것을 가운데 정렬 + 줄 나눔을 고르게(어절 단위) */
.toast { width: max-content; max-width: calc(100vw - 32px); text-align: center; line-height: 1.4; word-break: keep-all; overflow-wrap: break-word; text-wrap: balance; }

/* 푸터 오른쪽: 방문 숫자 + 저작권을 한 덩어리로(연한 작은 글자, 상자·색 없음). 좁은 화면에서는 위아래로 쌓임 */
.foot-r { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 20px; }
.foot-bottom .foot-stats { font-variant-numeric: tabular-nums; }
.foot-bottom .foot-stats[hidden] { display: none; }
@media (max-width: 720px) { .foot-r { flex-direction: column; align-items: flex-start; gap: 4px; } }

/* 개인정보 처리방침: 글만 있는 안내 페이지(상자 없음, 줄 길이 제한) */
.doc { max-width: 720px; } .doc h3 { margin: 30px 0 8px; font-size: 1.05rem; font-weight: 600; word-break: keep-all; }
.doc p, .doc li { color: var(--muted); line-height: 1.7; word-break: keep-all; margin: 0 0 6px; } .doc ul { margin: 0; padding-left: 1.2em; } .doc b { color: var(--text); font-weight: 600; }
.doc .doc-lead { color: var(--text); }
.foot-bottom .foot-pv .link { color: inherit; font-size: inherit; padding: 0; }

/* 학교 찾기(입력 중 목록)·회원 탈퇴 */
.sp-intro { margin: -6px 0 14px; line-height: 1.55; word-break: keep-all; }
.sp-q { width: 100%; box-sizing: border-box; }
.sp-list { display: grid; gap: 4px; margin: 10px 0 14px; min-height: 120px; align-content: start; }
.sp-msg { margin: 8px 4px; }
.sp-item { display: grid; gap: 2px; text-align: left; padding: 11px 14px; border: 0; border-radius: 14px; background: var(--surface2); color: var(--text); font: inherit; cursor: pointer; transition: background-color .2s ease; }
.sp-item:hover, .sp-item:focus-visible { background: var(--line); }
.sp-item b { font-weight: 600; font-size: .95rem; } .sp-item small { color: var(--muted); font-size: .8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wd-link { display: block; margin: 12px auto 0; color: var(--muted); font-size: .8rem; text-align: center; }
/* 작업물이 아직 없는 메뉴는 더 흐리게(2026-10-30 숨겼던 준비 중 메뉴를 다시 보이게 하며 구분): 단추·타일은 .nowork(전역 .empty 와 겹치지 않게), 개념 카드는 .soon(concept.css) */
.seg-ctl-b.nowork { opacity: .5; } .seg-ctl-b.nowork.on { opacity: .7; }
.tile.nowork, .cp-areaw.nowork .tile { opacity: .5; } .tile.nowork:hover, .cp-areaw.nowork .tile:hover { opacity: .7; }
