/* ===== 테오스과학학원 공통 스타일 =====
   색을 바꾸고 싶으면 아래 :root 안의 값만 바꾸면 사이트 전체에 적용돼요. */
:root {
  --ink: #1a2238;        /* 기본 글자색 (남색) */
  --ink-soft: #5a6275;   /* 보조 글자색 */
  --line: #e4e7ee;       /* 구분선 */
  --bg: #ffffff;         /* 바탕 */
  --bg-soft: #f6f7fa;    /* 연한 바탕 */
  --accent: #2457d6;     /* 포인트 색 (파랑) */
  --accent-soft: #eaf0fd;
  --max: 1080px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Pretendard", -apple-system, "Malgun Gothic", sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-size: 16px;
  line-height: 1.7;
  word-break: keep-all;
}
a { color: inherit; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }

/* ----- 상단 메뉴 ----- */
.header { border-bottom: 1px solid var(--line); background: #fff; position: sticky; top: 0; z-index: 10; }
.header .wrap { display: flex; align-items: center; height: 68px; }
.logo { font-weight: 700; font-size: 19px; text-decoration: none; letter-spacing: -0.3px; margin-right: auto; }
.nav { display: flex; gap: 32px; }
.nav a { text-decoration: none; font-size: 15px; color: var(--ink-soft); padding: 6px 0; }
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--accent); font-weight: 600; }
.nav .nav-cta { color: #fff; background: var(--accent); padding: 8px 16px; border-radius: 6px; font-weight: 600; }
.nav .nav-cta:hover { color: #fff; opacity: .9; }
.nav .nav-cta[aria-current="page"] { color: #fff; }
.menu-btn { display: none; background: none; border: 1px solid var(--line); border-radius: 6px; padding: 6px 12px; font: inherit; font-size: 14px; color: var(--ink); cursor: pointer; }

/* ----- 페이지 제목 영역 ----- */
.page-head { padding: 64px 0 40px; border-bottom: 1px solid var(--line); }
.page-head h1 { font-size: 36px; line-height: 1.3; margin: 0 0 10px; letter-spacing: -0.8px; }
.page-head p { margin: 0; color: var(--ink-soft); font-size: 17px; max-width: 40em; }

.section { padding: 56px 0; }
.section + .section { border-top: 1px solid var(--line); }
.section h2 { font-size: 24px; margin: 0 0 20px; letter-spacing: -0.4px; }

/* ----- 홈 ----- */
.hero { padding: 96px 0 72px; }
.hero h1 { font-size: 46px; line-height: 1.28; letter-spacing: -1.4px; margin: 0 0 20px; font-weight: 700; }
.hero p { font-size: 18px; color: var(--ink-soft); margin: 0 0 32px; max-width: 34em; }
.btn { display: inline-block; text-decoration: none; padding: 13px 22px; border-radius: 6px; font-weight: 600; font-size: 16px; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-line { border: 1px solid var(--line); margin-left: 8px; }
.btn:hover { opacity: .9; }

.quick { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 2px solid var(--ink); }
.quick a { display: block; text-decoration: none; padding: 24px 20px 28px 0; border-bottom: 1px solid var(--line); }
.quick a + a { padding-left: 20px; border-left: 1px solid var(--line); }
.quick strong { display: block; font-size: 19px; margin-bottom: 6px; }
.quick span { color: var(--ink-soft); font-size: 14px; }
.quick a:hover strong { color: var(--accent); }

.subjects { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.subjects li { display: flex; align-items: center; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.subjects b { font-size: 18px; min-width: 64px; }
.subjects .who { color: var(--ink-soft); margin-right: auto; }
.badge { font-size: 13px; font-weight: 600; padding: 3px 10px; border-radius: 20px; background: var(--accent-soft); color: var(--accent); white-space: nowrap; }
.badge.soon { background: var(--bg-soft); color: var(--ink-soft); }

/* ----- 교육철학 ----- */
.principles { display: grid; gap: 0; border-top: 1px solid var(--line); }
.principle { display: grid; grid-template-columns: 260px 1fr; gap: 32px; padding: 32px 0; border-bottom: 1px solid var(--line); }
.principle h3 { margin: 0; font-size: 20px; }
.principle p { margin: 0; color: var(--ink-soft); }

/* ----- 강사진 ----- */
.teachers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.teacher .photo { aspect-ratio: 4 / 5; background: var(--bg-soft); border-radius: 8px; display: grid; place-items: center; color: #a3a9b8; font-size: 14px; margin-bottom: 16px; }
.teacher .subject { font-size: 13px; font-weight: 600; color: var(--accent); }
.teacher h3 { margin: 2px 0 8px; font-size: 20px; }
.teacher ul { margin: 0; padding-left: 18px; color: var(--ink-soft); font-size: 15px; }

/* ----- 시간표 ----- */
.tabs { display: flex; gap: 8px; margin-bottom: 24px; flex-wrap: wrap; }
.tab { font: inherit; font-size: 15px; padding: 8px 18px; border-radius: 6px; border: 1px solid var(--line); background: #fff; color: var(--ink); cursor: pointer; }
.tab[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 620px; }
th, td { text-align: left; padding: 14px 12px; border-bottom: 1px solid var(--line); }
thead th { border-bottom: 2px solid var(--ink); font-size: 14px; color: var(--ink-soft); font-weight: 600; }
tbody th { font-weight: 600; white-space: nowrap; }
.empty-note { padding: 40px 0; color: var(--ink-soft); }
.note { color: var(--ink-soft); font-size: 14px; margin-top: 16px; }

/* ----- 시설 ----- */
.rooms { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px; }
.room .pic { aspect-ratio: 3 / 2; background: var(--bg-soft); border-radius: 8px; display: grid; place-items: center; color: #a3a9b8; font-size: 14px; margin-bottom: 14px; }
.room h3 { margin: 0 0 4px; font-size: 19px; }
.room p { margin: 0; color: var(--ink-soft); font-size: 15px; }

/* ----- 상담문의 ----- */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.info { margin: 0; }
.info div { display: grid; grid-template-columns: 96px 1fr; padding: 14px 0; border-bottom: 1px solid var(--line); }
.info dt { color: var(--ink-soft); }
.info dd { margin: 0; font-weight: 500; }
.map { aspect-ratio: 4 / 3; background: var(--bg-soft); border-radius: 8px; display: grid; place-items: center; color: #a3a9b8; font-size: 14px; }

/* ----- 하단 ----- */
.footer { background: var(--bg-soft); padding: 40px 0; margin-top: 40px; font-size: 14px; color: var(--ink-soft); }
.footer strong { color: var(--ink); display: block; margin-bottom: 6px; font-size: 16px; }
.footer p { margin: 2px 0; }

/* ----- 휴대폰 화면 ----- */
@media (max-width: 860px) {
  .menu-btn { display: block; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 68px; background: #fff; border-bottom: 1px solid var(--line); flex-direction: column; gap: 0; padding: 8px 20px 16px; }
  .nav.open { display: flex; }
  .nav a { padding: 12px 0; font-size: 16px; }
  .nav .nav-cta { text-align: center; margin-top: 8px; }
  .hero { padding: 56px 0 48px; }
  .hero h1 { font-size: 32px; }
  .hero p { font-size: 16px; }
  .quick { grid-template-columns: 1fr 1fr; }
  .quick a:nth-child(3) { padding-left: 0; border-left: 0; }
  .page-head { padding: 44px 0 28px; }
  .page-head h1 { font-size: 28px; }
  .principle { grid-template-columns: 1fr; gap: 8px; }
  .teachers { grid-template-columns: 1fr 1fr; gap: 20px; }
  .rooms, .contact { grid-template-columns: 1fr; }
  .btn-line { margin-left: 0; margin-top: 8px; }
}
@media (max-width: 480px) {
  .teachers { grid-template-columns: 1fr; }
  .subjects li { flex-wrap: wrap; gap: 4px 12px; }
  .subjects .who { width: 100%; order: 3; }
}

/* ===== 사진 추가 (흐린 배경, 사진 칸) ===== */
.hero { position: relative; overflow: hidden; isolation: isolate; }
.hero::before {
  content: ""; position: absolute; inset: -24px; z-index: -2;
  background: url("../images/facilities/classroom1.jpg") center / cover no-repeat;
  filter: blur(6px) saturate(.9);
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgba(255,255,255,.93) 0%, rgba(255,255,255,.78) 50%, rgba(255,255,255,.35) 100%);
}
.hero .meta { font-size: 15px; color: var(--ink-soft); margin: 0 0 14px; }

.photo img, .pic img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.teacher .photo, .room .pic { overflow: hidden; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.split img { width: 100%; border-radius: 8px; aspect-ratio: 4 / 3; object-fit: cover; }
.split p { color: var(--ink-soft); }
.text-link { color: var(--accent); font-weight: 600; text-decoration: none; }
.text-link:hover { text-decoration: underline; }

.results { display: grid; grid-template-columns: repeat(2, 1fr); column-gap: 48px; border-top: 1px solid var(--line); }
.results div { display: grid; grid-template-columns: 96px 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.results b { font-size: 16px; }
.results span { color: var(--ink-soft); }

.lead-teacher { display: grid; grid-template-columns: 320px 1fr; gap: 48px; align-items: start; }
.lead-teacher img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; object-position: top; border-radius: 8px; background: #1d2c55; }
.lead-teacher h3 { font-size: 26px; margin: 4px 0 16px; }
.lead-teacher ul { margin: 0; padding-left: 18px; color: var(--ink-soft); line-height: 2; }

td.small, .note small { color: var(--ink-soft); }
.page-photo { margin-top: 32px; }
.page-photo img { width: 100%; max-height: 360px; object-fit: cover; border-radius: 8px; }

@media (max-width: 860px) {
  .split, .lead-teacher { grid-template-columns: 1fr; gap: 24px; }
  .lead-teacher img { max-width: 320px; }
  .results { grid-template-columns: 1fr; }
  .hero::after { background: rgba(255,255,255,.88); }
}

/* ===== 과목 구분 (과학 = 파랑, 수학 = 초록) ===== */
:root { --sci: #2457d6; --sci-soft: #eaf0fd; --math: #0b8a68; --math-soft: #e5f5ef; }
.sci { --c: var(--sci); --c-soft: var(--sci-soft); }
.math { --c: var(--math); --c-soft: var(--math-soft); }
.subj-label { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--c); font-size: 15px; }
.subj-label::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--c); }

.subject-jump { display: flex; gap: 10px; margin-top: 24px; flex-wrap: wrap; }
.subject-jump a { text-decoration: none; padding: 9px 18px; border-radius: 999px; font-weight: 600; font-size: 15px; background: var(--c-soft); color: var(--c); }
.subject-jump a:hover { background: var(--c); color: #fff; }

.subject-block { padding: 56px 0; border-top: 1px solid var(--line); scroll-margin-top: 80px; }
.subject-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; padding-bottom: 20px; margin-bottom: 32px; border-bottom: 3px solid var(--c); flex-wrap: wrap; }
.subject-head h2 { margin: 6px 0 0; font-size: 30px; letter-spacing: -0.6px; }
.subject-head p { margin: 0; color: var(--ink-soft); font-size: 15px; }
.teacher .subject { color: var(--c, var(--accent)); }
.teacher .photo { background: var(--c-soft, var(--bg-soft)); color: var(--c, #a3a9b8); }

/* 과목 탭 (시간표) */
.subject-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin-bottom: 32px; }
.subject-tab { font: inherit; text-align: left; padding: 18px 22px; background: #fff; border: 0; cursor: pointer; color: var(--ink-soft); border-top: 4px solid transparent; }
.subject-tab + .subject-tab { border-left: 1px solid var(--line); }
.subject-tab strong { display: block; font-size: 20px; color: var(--ink); }
.subject-tab span { font-size: 14px; }
.subject-tab[aria-selected="true"] { border-top-color: var(--c); background: var(--c-soft); }
.subject-tab[aria-selected="true"] strong { color: var(--c); }
.sci .tab[aria-selected="true"], .tabs.sci .tab[aria-selected="true"] { background: var(--sci); border-color: var(--sci); }
.subject-panel thead th { border-bottom-color: var(--c); }

/* ===== 메인 화면 ===== */
.home-hero { position: relative; min-height: 640px; display: flex; align-items: center; color: #fff; overflow: hidden; isolation: isolate; }
.home-hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transform: scale(1.04); filter: blur(2px); }
.home-hero::after { content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(100deg, rgba(14,24,52,.92) 0%, rgba(14,24,52,.78) 45%, rgba(14,24,52,.25) 100%); }
.home-hero .wrap { width: 100%; padding-top: 80px; padding-bottom: 80px; }
.home-hero .meta { color: rgba(255,255,255,.75); font-size: 15px; margin: 0 0 18px; }
.home-hero h1 { font-size: 54px; line-height: 1.22; letter-spacing: -1.8px; margin: 0 0 22px; font-weight: 800; }
.home-hero p.lead { font-size: 18px; color: rgba(255,255,255,.85); max-width: 30em; margin: 0 0 36px; }
.home-hero .btn-line { border-color: rgba(255,255,255,.45); color: #fff; }
.home-hero .btn-primary { background: #fff; color: var(--ink); }

.quick-bar { background: #fff; position: relative; margin-top: -48px; z-index: 2; border-radius: 12px; box-shadow: 0 12px 40px rgba(20,33,61,.12); }
.quick-bar .quick { border-top: 0; }
.quick-bar .quick a { padding: 26px 24px 28px; border-bottom: 0; }
.quick-bar .quick a + a { border-left: 1px solid var(--line); }

.home-section { padding: 88px 0 0; }
.home-section > .wrap > h2 { font-size: 30px; letter-spacing: -0.6px; margin: 0 0 8px; }
.home-section .sub { color: var(--ink-soft); margin: 0 0 32px; }

.subject-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.subject-card { display: block; text-decoration: none; border-radius: 12px; padding: 32px; background: var(--c-soft); border-top: 4px solid var(--c); }
.subject-card h3 { font-size: 26px; margin: 12px 0 8px; }
.subject-card p { margin: 0 0 20px; color: var(--ink-soft); }
.subject-card .go { color: var(--c); font-weight: 600; }
.subject-card:hover .go { text-decoration: underline; }

.director { display: grid; grid-template-columns: 360px 1fr; gap: 56px; align-items: center; }
.director img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 12px; }
.director h2 { font-size: 30px; margin: 8px 0 16px; letter-spacing: -0.6px; }
.director ul { padding-left: 18px; color: var(--ink-soft); line-height: 2; margin: 0 0 20px; }

.photo-strip { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 12px; }
.photo-strip img { width: 100%; height: 280px; object-fit: cover; border-radius: 10px; }

.cta-band { margin-top: 96px; background: var(--ink); color: #fff; padding: 56px 0; }
.cta-band .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.cta-band h2 { margin: 0 0 6px; font-size: 26px; }
.cta-band p { margin: 0; color: rgba(255,255,255,.7); }
.cta-band .btn-primary { background: #fff; color: var(--ink); font-size: 18px; }
.cta-band + .footer { margin-top: 0; }

@media (max-width: 860px) {
  .home-hero { min-height: 520px; }
  .home-hero h1 { font-size: 34px; letter-spacing: -1px; }
  .home-hero p.lead { font-size: 16px; }
  .home-hero::after { background: rgba(14,24,52,.8); }
  .quick-bar { margin-top: -32px; }
  .quick-bar .quick a { padding: 20px 16px; }
  .quick-bar .quick a:nth-child(3) { border-left: 0; }
  .quick-bar .quick a:nth-child(n+3) { border-top: 1px solid var(--line); }
  .home-section { padding-top: 64px; }
  .subject-cards, .director { grid-template-columns: 1fr; }
  .director img { max-width: 320px; }
  .photo-strip { grid-template-columns: 1fr 1fr; }
  .photo-strip img:first-child { grid-column: 1 / -1; }
  .photo-strip img { height: 180px; }
  .subject-tab { padding: 14px 16px; }
  .subject-tab strong { font-size: 18px; }
}
main:has(.cta-band) + .footer { margin-top: 0; }

/* ===== Dembrandt로 뽑은 기준 적용 (참고: toss.im 디자인 토큰) =====
   - 글자색 #1C1F25 계열, 제목 글자 간격 -2%, 본문 줄 간격 1.6
   - 알약 모양 버튼, 아주 옅은 파란 그림자
   - 한글 줄바꿈: 단어 단위로 끊고, 제목은 줄 길이를 고르게 */
:root { --ink: #1c1f25; --ink-soft: #5e6470; --shadow: 0 7px 35px rgba(2,32,71,.07); }
body { font-size: 17px; line-height: 1.6; letter-spacing: -0.01em; }
h1, h2, h3, .logo { letter-spacing: -0.02em; text-wrap: balance; }
p, li, dd, td { text-wrap: pretty; }
.btn, .nav .nav-cta, .tab { border-radius: 999px; }
.btn { padding: 14px 26px; }
.home-hero h1 { font-size: 64px; line-height: 1.28; letter-spacing: -0.02em; }
.home-hero p.lead { line-height: 1.65; }
.quick-bar { box-shadow: var(--shadow); border-radius: 16px; }
.subject-card { border-radius: 16px; transition: box-shadow .2s ease; }
.subject-card:hover { box-shadow: var(--shadow); }
.home-section > .wrap > h2, .director h2, .subject-head h2 { font-size: 36px; line-height: 1.4; }
.results b { font-weight: 700; }
@media (max-width: 860px) {
  .home-hero h1 { font-size: 38px; }
  .home-section > .wrap > h2, .director h2, .subject-head h2 { font-size: 28px; }
}

/* 곧 공개되는 선생님 칸 */
.teacher-soon .photo { border: 2px dashed var(--c, var(--line)); background: transparent; font-weight: 600; font-size: 15px; }
.teacher-soon h3 { color: var(--ink-soft); }
.teacher .photo img { object-position: top; }

/* ===== 메인: 빠른 이동 박스 (색 + 마우스 올리면 움직임) ===== */
.quick-boxes { position: relative; z-index: 2; margin-top: -56px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.qb-navy  { --c: #1d2c55; --c-soft: #e8ebf3; }
.qb-blue  { --c: #2457d6; --c-soft: #eaf0fd; }
.qb-green { --c: #0b8a68; --c-soft: #e5f5ef; }
.qb-amber { --c: #c26a00; --c-soft: #fdf1e2; }
.qb {
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; align-items: center; gap: 14px;
  padding: 26px 22px; border-radius: 16px; text-decoration: none;
  background: #fff; border: 1px solid var(--line); border-top: 5px solid var(--c);
  box-shadow: var(--shadow);
  transition: transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .35s ease, border-color .35s ease;
}
.qb::before {
  content: ""; position: absolute; inset: 0; z-index: -1; background: var(--c);
  transform: scaleY(0); transform-origin: bottom; transition: transform .4s cubic-bezier(.2,.8,.2,1);
}
.qb-icon { flex: none; width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: var(--c-soft); color: var(--c); transition: transform .4s cubic-bezier(.2,.8,.2,1), background .3s ease, color .3s ease; }
.qb-icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.qb strong { font-size: 19px; color: var(--ink); transition: color .3s ease; }
.qb-arrow { margin-left: auto; font-size: 20px; color: var(--c); transition: transform .35s cubic-bezier(.2,.8,.2,1), color .3s ease; }
.qb:hover, .qb:focus-visible { transform: translateY(-8px); border-color: var(--c); box-shadow: 0 18px 40px color-mix(in srgb, var(--c) 30%, transparent); }
.qb:hover::before, .qb:focus-visible::before { transform: scaleY(1); }
.qb:hover strong, .qb:focus-visible strong, .qb:hover .qb-arrow, .qb:focus-visible .qb-arrow { color: #fff; }
.qb:hover .qb-icon, .qb:focus-visible .qb-icon { background: rgba(255,255,255,.18); color: #fff; transform: rotate(-8deg) scale(1.1); }
.qb:hover .qb-arrow, .qb:focus-visible .qb-arrow { transform: translateX(6px); }

/* ===== 메인: 겨울방학 수업 카드 ===== */
.season-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.season-card { display: flex; flex-direction: column; text-decoration: none; padding: 28px; border-radius: 16px; background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--c); transition: transform .3s ease, box-shadow .3s ease; }
.season-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.season-card h3 { font-size: 22px; margin: 10px 0 16px; }
.season-card dl { margin: 0 0 20px; }
.season-card dl div { display: grid; grid-template-columns: 52px 1fr; padding: 8px 0; border-top: 1px solid var(--line); font-size: 15px; }
.season-card dt { color: var(--ink-soft); }
.season-card dd { margin: 0; font-weight: 600; }
.season-card .go { margin-top: auto; color: var(--c); font-weight: 600; }

/* ===== 메인: 선생님 소개 ===== */
.mini-teachers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.mini-teacher { display: block; text-decoration: none; }
.mini-teacher img, .mini-empty { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: top; border-radius: 14px; margin-bottom: 14px; display: grid; place-items: center; background: var(--c-soft); color: var(--c); font-size: 14px; transition: transform .35s ease; }
.mini-teacher:hover img, .mini-teacher:hover .mini-empty { transform: translateY(-4px); }
.mini-teacher strong { display: block; font-size: 18px; margin-top: 4px; }

@media (max-width: 860px) {
  .quick-boxes { grid-template-columns: 1fr 1fr; gap: 12px; margin-top: -36px; }
  .qb { padding: 18px 16px; gap: 10px; }
  .qb-icon { width: 38px; height: 38px; }
  .qb strong { font-size: 16px; }
  .season-cards { grid-template-columns: 1fr; }
  .mini-teachers { grid-template-columns: 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .qb, .qb::before, .qb-icon, .qb-arrow, .season-card, .mini-teacher img { transition: none; }
  .qb:hover, .season-card:hover { transform: none; }
}

/* ===== 메인: 섹션 제목 줄 ===== */
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.section-head h2 { margin: 0; font-size: 36px; line-height: 1.4; }
.section-head .sub { margin: 4px 0 0; }

/* ===== 메인: 학원 소식 (블로그 글 카드) ===== */
.news-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.news-card { display: flex; flex-direction: column; text-decoration: none; border-radius: 16px; overflow: hidden; background: #fff; border: 1px solid var(--line); transition: transform .3s ease, box-shadow .3s ease; }
.news-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.news-thumb { aspect-ratio: 16 / 10; background: linear-gradient(135deg, #1d2c55, #2457d6); display: grid; place-items: center; overflow: hidden; }
.news-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.news-card:hover .news-thumb img { transform: scale(1.05); }
.news-thumb span { color: rgba(255,255,255,.85); font-weight: 700; font-size: 18px; }
.news-body { padding: 20px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.news-date { font-size: 14px; color: var(--ink-soft); }
.news-body h3 { font-size: 19px; line-height: 1.45; margin: 6px 0 16px; }
.news-body .go { margin-top: auto; color: #03a94d; font-weight: 600; font-size: 15px; }

/* ===== 메인: 선생님 소개 (과학 / 수학 묶음) ===== */
.teacher-groups { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.teacher-group { background: var(--c-soft); border-radius: 18px; padding: 22px; border-top: 5px solid var(--c); }
.group-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.group-head .subj-label { font-size: 20px; }
.group-head .badge { background: #fff; color: var(--c); }
.teacher-group .mini-teachers { grid-template-columns: 1fr 1fr; gap: 14px; }
.mini-teacher { background: #fff; border-radius: 14px; padding: 10px 10px 14px; transition: transform .3s ease, box-shadow .3s ease; }
.mini-teacher:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.mini-teacher img, .mini-empty { margin-bottom: 12px; border-radius: 10px; }
.mini-teacher:hover img, .mini-teacher:hover .mini-empty { transform: none; }
.mini-teacher strong { font-size: 18px; margin: 0 4px; }
.mini-teacher > span:last-child { display: block; margin: 0 4px; font-size: 14px; color: var(--ink-soft); }
.mini-teacher.soon .mini-empty { background: transparent; border: 2px dashed var(--c); font-weight: 600; }

/* ===== 휴대폰: 메뉴 항상 펼치기 ===== */
@media (max-width: 860px) {
  .menu-btn { display: none; }
  .header .wrap { height: auto; flex-wrap: wrap; padding-top: 12px; }
  .nav, .nav.open { display: flex; position: static; flex-direction: row; align-items: center; gap: 4px; width: 100%;
    padding: 8px 0 10px; border: 0; overflow-x: auto; scrollbar-width: none; }
  .nav a { padding: 6px 10px; font-size: 15px; white-space: nowrap; }
  .nav a[aria-current="page"] { background: var(--accent-soft); border-radius: 999px; }
  .nav .nav-cta { margin: 0 0 0 auto; padding: 6px 14px; }
  .section-head h2 { font-size: 28px; }
  .news-cards, .teacher-groups { grid-template-columns: 1fr; }
}

/* ===== 상단 로고 ===== */
.logo { display: inline-flex; align-items: center; gap: 10px; }
.logo-mark { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; flex: none;
  background: linear-gradient(140deg, #3d6cf0 0%, #1d2c55 100%); box-shadow: 0 6px 16px rgba(36,87,214,.28); }
.logo-mark svg { width: 26px; height: 26px; fill: none; stroke: #fff; stroke-width: 1.6; transition: transform .8s cubic-bezier(.2,.8,.2,1); }
.logo-mark circle { fill: #9fe3c9; stroke: none; }
.logo:hover .logo-mark svg { transform: rotate(180deg); }
.logo-text { display: flex; flex-direction: column; line-height: 1.15; }
.logo-name { font-size: 18px; font-weight: 600; color: var(--ink); letter-spacing: -0.02em; }
.logo-name b { font-weight: 800; letter-spacing: 0.02em; color: #1d2c55; }
.logo-tag { font-size: 11px; color: var(--ink-soft); letter-spacing: 0.01em; margin-top: 2px; }
@media (prefers-reduced-motion: reduce) { .logo:hover .logo-mark svg { transform: none; } }

/* ===== 학원 소식: 좌우 스크롤 ===== */
.news-cards { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 4px 14px; margin: 0 -4px; scrollbar-width: thin; }
.news-card { flex: 0 0 280px; scroll-snap-align: start; }
.news-card:hover { transform: translateY(-4px); }
.news-thumb { aspect-ratio: 16 / 9; }
.news-thumb span { font-size: 15px; }
.news-body { padding: 14px 16px 16px; }
.news-body h3 { font-size: 16px; margin: 4px 0 10px; }
.news-body .go { font-size: 14px; }

/* ===== 주간 시간표 ===== */
.tt-list tbody tr { cursor: pointer; transition: background .2s ease; }
.tt-list tbody tr:hover { background: var(--bg-soft); }
.tt-list .dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--g); margin-right: 10px; vertical-align: 1px; }
.tt-list tbody tr.on { background: color-mix(in srgb, var(--g) 12%, #fff); }
.tt-list tbody tr.on th { color: var(--g); }
.tt-title { font-size: 22px; margin: 48px 0 4px; }
.tt-help { color: var(--ink-soft); font-size: 15px; margin: 0 0 16px; }
.tt-chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 16px; }
.tt-chips-label { font-size: 14px; color: var(--ink-soft); margin-right: 4px; }
.tt-chip { font: inherit; font-size: 14px; font-weight: 600; padding: 7px 14px; border-radius: 999px; cursor: pointer;
  border: 1.5px solid var(--g); color: var(--g); background: #fff; transition: background .2s ease, color .2s ease, transform .2s ease; }
.tt-chip:hover { transform: translateY(-2px); }
.tt-chip[aria-pressed="true"] { background: var(--g); color: #fff; }

.tt-week-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.tt-week { display: grid; grid-template-columns: 52px repeat(var(--days), minmax(110px, 1fr)); min-width: calc(52px + var(--days) * 110px); }
.tt-corner, .tt-day { height: 44px; display: grid; place-items: center; font-weight: 700; border-bottom: 1px solid var(--line); background: var(--bg-soft); }
.tt-day + .tt-day, .tt-corner + .tt-day { border-left: 1px solid var(--line); }
.tt-times { position: relative; height: var(--h); }
.tt-times span { position: absolute; right: 8px; transform: translateY(-50%); font-size: 12px; color: var(--ink-soft); }
.tt-times span:first-child { transform: none; }
.tt-col { position: relative; height: var(--h); border-left: 1px solid var(--line);
  background-image: repeating-linear-gradient(to bottom, var(--line) 0 1px, transparent 1px calc(var(--row) * 2)); }
.tt-block { position: absolute; border: 0; border-radius: 10px; padding: 6px 8px; text-align: left; cursor: pointer; overflow: hidden;
  font: inherit; color: #fff; background: var(--g); display: flex; flex-direction: column; gap: 2px;
  box-shadow: 0 4px 12px color-mix(in srgb, var(--g) 30%, transparent);
  transition: opacity .3s ease, filter .3s ease, transform .3s cubic-bezier(.2,.8,.2,1), box-shadow .3s ease; }
.tt-block strong { font-size: 13px; line-height: 1.3; }
.tt-block span { font-size: 12px; opacity: .85; }
.tt-block:hover { transform: translateY(-2px); }
.tt-active .tt-block:not(.on) { opacity: .18; filter: grayscale(1); }
.tt-active .tt-list tbody tr:not(.on) { opacity: .45; }
.tt-block.on { z-index: 2; transform: scale(1.04); animation: tt-glow 1.6s ease-in-out infinite; }
@keyframes tt-glow {
  0%, 100% { box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--g), 0 0 14px 2px color-mix(in srgb, var(--g) 50%, transparent); }
  50%      { box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--g), 0 0 28px 8px color-mix(in srgb, var(--g) 55%, transparent); }
}
@media (prefers-reduced-motion: reduce) { .tt-block.on { animation: none; box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--g); } }
@media (max-width: 860px) {
  .logo-mark { width: 32px; height: 32px; } .logo-mark svg { width: 22px; height: 22px; }
  .logo-name { font-size: 16px; }
  .news-card { flex-basis: 78%; }
}
.tt-week-scroll { overflow-y: hidden; }
.tt-times span:last-child { transform: translateY(-100%); }
.tt-week-scroll { padding: 0 0 12px; } .tt-col, .tt-times { margin-top: 8px; }

/* ===== 교육철학: 관리 시스템 흐름 ===== */
.flow { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: none; }
.flow-step { display: flex; gap: 16px; padding: 24px; border-radius: 16px; background: #fff; border: 1px solid var(--line); transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease; }
.flow-step:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--sci); }
.flow-num { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #fff; background: linear-gradient(140deg, #3d6cf0, #1d2c55); }
.flow-step h3 { margin: 4px 0 8px; font-size: 19px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.flow-step p { margin: 0; color: var(--ink-soft); font-size: 15px; }
.why { margin: 0; padding: 32px 36px; border-radius: 18px; background: #1d2c55; color: #fff; }
.why p { margin: 0; font-size: 19px; line-height: 1.7; }
.why p + p { margin-top: 14px; color: rgba(255,255,255,.75); font-size: 17px; }
.schools { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.school-group { padding: 22px; border-radius: 16px; background: var(--c-soft); }
.school-group ul { list-style: none; padding: 0; margin: 14px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.school-group li { background: #fff; color: var(--ink); padding: 7px 14px; border-radius: 999px; font-weight: 600; font-size: 15px; }
@media (max-width: 860px) {
  .flow { grid-template-columns: 1fr; }
  .schools { grid-template-columns: 1fr; }
  .why { padding: 24px; } .why p { font-size: 17px; }
}

/* ===== Claude Design 시안 반영 ===== */
/* 맨 위 안내 띠 */
.notice-bar { display: flex; justify-content: center; align-items: center; gap: 12px; padding: 9px 16px; background: var(--math); color: #fff; text-decoration: none; font-size: 14px; }
.notice-bar strong { font-weight: 700; }
.notice-bar span { opacity: .9; padding-left: 12px; border-left: 1px solid rgba(255,255,255,.4); }
.notice-bar:hover span { text-decoration: underline; }

/* 첫 화면 */
.home-hero::after { background: linear-gradient(100deg, rgba(17,26,56,.95) 0%, rgba(17,26,56,.86) 50%, rgba(17,26,56,.55) 100%); }
.hero-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.hero-badges span { font-size: 14px; font-weight: 600; padding: 6px 14px; border-radius: 999px; border: 1px solid rgba(255,255,255,.35); color: rgba(255,255,255,.9); }
.hero-badges .math { background: var(--math); border-color: var(--math); color: #fff; }
.btn-call { display: inline-flex; align-items: baseline; gap: 10px; background: var(--accent); color: #fff; font-size: 19px; font-weight: 700; padding: 15px 28px; }
.btn-call small { font-size: 13px; font-weight: 500; opacity: .85; }
.home-hero .btn-line { background: rgba(255,255,255,.06); }

/* 관리 시스템 */
.mgmt { display: grid; grid-template-columns: 5fr 7fr; gap: 56px; align-items: start; }
.mgmt-intro { position: sticky; top: 100px; }
.mgmt-intro h2 { font-size: 44px; line-height: 1.3; letter-spacing: -0.03em; margin: 0 0 18px; color: #1d2c55; }
.mgmt-intro p { color: var(--ink-soft); margin: 0 0 20px; max-width: 26em; }
.mgmt-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.mgmt-steps li { padding: 24px; border-radius: 16px; border: 1px solid var(--line); background: #fff; transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease; }
.mgmt-steps li:nth-child(even) { transform: translateY(32px); }
.mgmt-steps li:hover { border-color: var(--accent); box-shadow: var(--shadow); }
.mgmt-steps li:nth-child(odd):hover { transform: translateY(-4px); }
.mgmt-steps li:nth-child(even):hover { transform: translateY(28px); }
.mgmt-num { font-weight: 800; color: var(--accent); font-size: 15px; }
.mgmt-steps h3 { margin: 6px 0 8px; font-size: 20px; color: #1d2c55; }
.mgmt-steps p { margin: 0; font-size: 15px; color: var(--ink-soft); }
.mgmt + * { margin-top: 32px; }

@media (max-width: 860px) {
  .notice-bar { font-size: 13px; flex-wrap: wrap; gap: 4px 10px; }
  .btn-call { font-size: 17px; padding: 13px 22px; }
  .mgmt { grid-template-columns: 1fr; gap: 28px; }
  .mgmt-intro { position: static; }
  .mgmt-intro h2 { font-size: 32px; }
  .mgmt-steps { grid-template-columns: 1fr; }
  .mgmt-steps li:nth-child(even), .mgmt-steps li:nth-child(even):hover { transform: none; }
}
@media (prefers-reduced-motion: reduce) { .mgmt-steps li { transition: none; } }
.mgmt-steps { padding-bottom: 32px; } @media (max-width: 860px) { .mgmt-steps { padding-bottom: 0; } }

/* ===== 학원 소식: 블로그 자동 연동 카드 (js/blog.js) ===== */
.news-cards.from-blog .news-card { flex-basis: 240px; }
.news-cards.from-blog .news-thumb { aspect-ratio: 1 / 1; background: linear-gradient(135deg, #1d2c55, #2457d6); }
.news-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.news-cat { font-size: 12px; font-weight: 700; color: #2457d6; background: #eef3ff; padding: 3px 8px; border-radius: 999px; }
.news-meta .news-date { font-size: 13px; }
.news-cards.from-blog .news-body h3 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 860px) { .news-cards.from-blog .news-card { flex-basis: 66%; } }

/* =====================================================================
   글자 로고 (모든 페이지): TEOS + 과학학원
   ===================================================================== */
.logo { display: inline-flex; align-items: baseline; gap: 9px; }
.wm { font-size: 30px; font-weight: 800; letter-spacing: 0.06em; color: var(--ink); line-height: 1; }
.wm-sub { font-size: 14px; font-weight: 500; color: var(--ink-soft); line-height: 1; }

/* =====================================================================
   어두운 메인 (body.dark) — 칠판에서 따온 색
   주인공은 첫 화면의 칠판 수업 사진 하나. 나머지는 조용하게.
   ===================================================================== */
body.dark {
  --d-bg: #0f1311;        /* 칠판 녹흑 */
  --d-surface: #161b19;   /* 한 단계 밝은 면 */
  --d-line: rgba(236,235,228,.12);
  --d-chalk: #ecebe4;     /* 분필 흰색 */
  --d-dim: #a4a8a2;       /* 분필 회색 */
  --d-blue: #6e9bff;      /* 과학 */
  --d-green: #3fbf95;     /* 수학 */
  --d-amber: #e0a24a;
  background: var(--d-bg); color: var(--d-chalk);
}
body.dark .sci  { --c: var(--d-blue);  --c-soft: rgba(110,155,255,.12); }
body.dark .math { --c: var(--d-green); --c-soft: rgba(63,191,149,.12); }
body.dark :focus-visible { outline: 2px solid var(--d-chalk); outline-offset: 3px; }

/* 맨 위 띠 */
/* 맨 위 띠: 겨울방학 특강 모집 — 과학 파랑으로 강조, 크게 */
body.dark .notice-bar { background: #2f62e0; color: #fff; border-bottom: 0; gap: 18px; padding: 16px 20px; font-size: 17px; letter-spacing: -0.01em; transition: background .25s ease; }
body.dark .notice-bar strong { color: #fff; font-weight: 800; }
body.dark .notice-bar span { opacity: 1; border-left: 1px solid rgba(255,255,255,.45); padding-left: 18px; color: #fff; font-weight: 600; text-decoration: underline; text-decoration-color: rgba(255,255,255,.5); text-underline-offset: 4px; }
body.dark .notice-bar:hover { background: #3a6ef0; }
body.dark .notice-bar:hover span { text-decoration-color: #fff; }
/* 휴대폰: 메인 관리 6단계를 2칸씩 작게 */
@media (max-width: 860px) {
  body.dark .mgmt { gap: 20px; }
  body.dark .mgmt-intro h2 { font-size: 28px; margin-bottom: 12px; }
  body.dark .mgmt-intro p { font-size: 15px; margin-bottom: 12px; }
  body.dark .mgmt-steps { grid-template-columns: 1fr 1fr; gap: 8px; }
  body.dark .mgmt-steps li { padding: 14px 14px 16px; }
  body.dark .mgmt-num { font-size: 12px; }
  body.dark .mgmt-steps h3 { font-size: 15.5px; margin: 2px 0 4px; line-height: 1.35; }
  body.dark .mgmt-steps p { font-size: 13px; line-height: 1.55; }
}
@media (max-width: 860px) { body.dark .notice-bar { font-size: 15px; padding: 13px 16px; gap: 6px 14px; } body.dark .notice-bar span { padding-left: 14px; } }

/* 머리글 */
body.dark .header { background: rgba(15,19,17,.86); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-bottom: 1px solid var(--d-line); }
body.dark .wm { color: var(--d-chalk); }
body.dark .wm-sub { color: var(--d-dim); }
body.dark .nav a { color: var(--d-dim); transition: color .2s ease; }
body.dark .nav a:hover { color: var(--d-chalk); }
body.dark .nav .nav-cta { background: transparent; color: var(--d-chalk); border: 1px solid rgba(236,235,228,.45); border-radius: 4px; font-weight: 600; }
body.dark .nav .nav-cta:hover { background: var(--d-chalk); color: var(--d-bg); opacity: 1; }

/* 첫 화면 */
.home-top { position: relative; overflow: hidden; isolation: isolate; display: flex; flex-direction: column; min-height: min(calc(100vh - 110px), 820px); }
/* 배경 사진 4장이 천천히 번갈아 바뀜 (한 장당 7초, 한 바퀴 28초) */
.hero-photo { position: absolute; inset: 0; z-index: -1; overflow: hidden; background: var(--d-bg); }
.hero-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: brightness(.55) saturate(.75);
  opacity: 0; animation: hero-slide 28s linear infinite; }
.hero-photo .s1 { object-position: 78% 50%; animation-delay: 0s; }
.hero-photo .s2 { object-position: 50% 55%; animation-delay: 7s; }
.hero-photo .s3 { object-position: 50% 55%; animation-delay: 14s; }
.hero-photo .s4 { object-position: 60% 50%; animation-delay: 21s; }
.hero-photo .s1 { animation-name: hero-slide-first; }
@keyframes hero-slide { 0% { opacity: 0; transform: scale(1); } 6% { opacity: 1; } 25% { opacity: 1; } 32% { opacity: 0; transform: scale(1.07); } 100% { opacity: 0; transform: scale(1.07); } }
@keyframes hero-slide-first { 0% { opacity: 1; transform: scale(1); } 25% { opacity: 1; } 32% { opacity: 0; transform: scale(1.07); } 94% { opacity: 0; transform: scale(1); } 100% { opacity: 1; transform: scale(1); } }
/* 글이 잘 읽히도록 왼쪽과 아래를 어둡게 */
.hero-photo::after { content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(90deg, rgba(15,19,17,.96) 0%, rgba(15,19,17,.9) 45%, rgba(15,19,17,.5) 75%, rgba(15,19,17,.3) 100%),
              linear-gradient(180deg, rgba(15,19,17,.6) 0%, rgba(15,19,17,0) 25%, rgba(15,19,17,0) 65%, var(--d-bg) 100%); }

.hero-inner { flex: 1; display: flex; flex-direction: column; justify-content: center; padding-top: 88px; padding-bottom: 72px; }
.hero-news { list-style: none; margin: 0 0 34px; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 28px; font-size: 15px; color: var(--d-dim); }
.hero-news b { color: var(--c); font-weight: 700; margin-right: 10px; }
.home-top h1 { margin: 0; max-width: 11em; font-size: clamp(40px, 5vw, 62px); line-height: 1.24; font-weight: 700; letter-spacing: -0.035em; color: var(--d-chalk); }
.home-top .lead { margin: 26px 0 0; max-width: 31em; font-size: 18px; line-height: 1.75; color: var(--d-dim); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 48px; }
.act { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 58px; padding: 0 28px; box-sizing: border-box;
  font-size: 16px; font-weight: 600; text-decoration: none; border-radius: 4px; transition: background .2s ease, color .2s ease, border-color .2s ease; }
.act-fill { background: var(--d-chalk); color: var(--d-bg); }
.act-fill .num { font-weight: 800; letter-spacing: 0.01em; }
.act-fill:hover { background: #ffffff; }
.act-line { color: var(--d-chalk); border: 1px solid rgba(236,235,228,.55); }
.act-line:hover { border-color: var(--d-chalk); background: rgba(236,235,228,.06); }

/* 바로가기: 선 위에 이름만. 마우스를 올리면 과목 색 선이 차오름 */
.hero-links { display: grid; grid-template-columns: repeat(4, 1fr); padding-bottom: 8px; width: 100%; box-sizing: border-box; }
.hero-inner { width: 100%; box-sizing: border-box; }
.hero-links a { position: relative; padding: 22px 0 26px; border-top: 1px solid var(--d-line); color: var(--d-chalk); text-decoration: none; font-size: 17px; font-weight: 600; }
.hero-links a + a { padding-left: 24px; }
.hero-links a::before { content: ""; position: absolute; left: 0; top: -1px; height: 2px; width: 0; background: var(--hl); transition: width .45s cubic-bezier(.2,.8,.2,1); }
.hero-links a + a::before { left: 24px; }
.hero-links a:hover::before, .hero-links a:focus-visible::before { width: calc(100% - 24px); }
.hl-chalk { --hl: var(--d-chalk); } .hl-blue { --hl: var(--d-blue); } .hl-green { --hl: var(--d-green); } .hl-amber { --hl: var(--d-amber); }

/* 메인 나머지 구간 */
body.dark .home-section h2, body.dark .section-head h2, body.dark .mgmt-intro h2 { color: var(--d-chalk); }
body.dark .home-section .sub, body.dark .mgmt-intro p { color: var(--d-dim); }
body.dark .text-link { color: var(--d-chalk); text-decoration: underline; text-decoration-color: rgba(236,235,228,.35); text-underline-offset: 5px; }
body.dark .text-link:hover { text-decoration-color: var(--d-chalk); }
body.dark .mgmt-steps li { background: var(--d-surface); border-color: var(--d-line); border-radius: 10px; }
body.dark .mgmt-steps li:hover { border-color: rgba(236,235,228,.3); box-shadow: none; }
body.dark .mgmt-num { color: var(--d-blue); }
body.dark .mgmt-steps h3 { color: var(--d-chalk); }
body.dark .mgmt-steps p { color: var(--d-dim); }

body.dark .news-card { background: var(--d-surface); border-color: var(--d-line); border-radius: 10px; }
body.dark .news-card:hover { box-shadow: none; border-color: rgba(236,235,228,.3); }
body.dark .news-body h3 { color: var(--d-chalk); }
body.dark .news-date { color: var(--d-dim); }
body.dark .news-cat { background: rgba(110,155,255,.14); color: #a9c2ff; border-radius: 4px; }
body.dark .news-body .go { color: var(--d-dim); }
body.dark .news-cards { scrollbar-color: rgba(236,235,228,.25) transparent; }

body.dark .teacher-group { background: var(--d-surface); border-top: 2px solid var(--c); border-radius: 10px; }
body.dark .group-head .badge { background: var(--c-soft); color: var(--c); border-radius: 4px; }
body.dark .mini-teacher { background: transparent; padding: 0; }
body.dark .mini-teacher:hover { box-shadow: none; }
body.dark .mini-teacher strong { color: var(--d-chalk); margin: 0; }
body.dark .mini-teacher > span:last-child { color: var(--d-dim); margin: 0; }
body.dark .mini-teacher img, body.dark .mini-empty { border-radius: 6px; }
body.dark .mini-empty { background: rgba(236,235,228,.05); color: var(--d-dim); }
body.dark .mini-teacher.soon .mini-empty { border: 1px dashed rgba(236,235,228,.3); }

body.dark .photo-strip img { border-radius: 6px; filter: brightness(.9); }

body.dark .cta-band { background: transparent; border-top: 1px solid var(--d-line); margin-top: 120px; padding: 72px 0; }
body.dark .cta-band h2 { font-size: 30px; letter-spacing: -0.03em; color: var(--d-chalk); }
body.dark .cta-band p { color: var(--d-dim); }
body.dark .cta-band .btn-primary { background: var(--d-chalk); color: var(--d-bg); border-radius: 4px; font-weight: 800; }
body.dark .footer { background: #0a0d0c; color: var(--d-dim); border-top: 1px solid var(--d-line); }
body.dark .footer strong { color: var(--d-chalk); }
body.dark .footer a { color: var(--d-dim); }

@media (max-width: 860px) {
  .wm { font-size: 26px; } .wm-sub { font-size: 13px; }
  body.dark .header { -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--d-bg); }
  body.dark .nav, body.dark .nav.open { background: transparent; }
  body.dark .nav a[aria-current="page"] { background: rgba(236,235,228,.1); border-radius: 4px; }
  .home-top { min-height: 0; }
  .hero-photo { bottom: auto; height: 320px; }
  .hero-photo::after { background: linear-gradient(180deg, rgba(15,19,17,.35) 0%, rgba(15,19,17,.2) 50%, var(--d-bg) 100%); }
  .hero-photo .s1 { object-position: 72% 50%; }
  .hero-inner { padding-top: 230px; padding-bottom: 48px; }
  .hero-news { margin-bottom: 22px; font-size: 14px; }
  .home-top .lead { font-size: 16px; }
  .hero-actions { margin-top: 36px; }
  .act { flex: 1 1 100%; }
  .hero-links { grid-template-columns: 1fr 1fr; }
  .hero-links a, .hero-links a + a { padding: 18px 0 20px; }
  .hero-links a:nth-child(even) { padding-left: 16px; }
  .hero-links a::before, .hero-links a + a::before { left: 0; }
  .hero-links a:nth-child(even)::before { left: 16px; }
  .hero-links a:hover::before { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { .hero-photo img { animation: none; } .hero-photo .s1 { opacity: 1; } }

/* =====================================================================
   전 페이지 어두운 톤 (모든 페이지 body.dark)
   - 공통 색 값을 칠판 톤으로 바꿔서 하위 페이지도 함께 어두워짐
   - 버튼·칸은 둥근 알약 대신 각진 모서리(4px), 메인 '학원 둘러보기' 버튼 느낌
   ===================================================================== */
body.dark {
  --ink: #ecebe4; --ink-soft: #a4a8a2; --line: rgba(236,235,228,.12);
  --bg: #0f1311; --bg-soft: #161b19; --accent: #6e9bff; --accent-soft: rgba(110,155,255,.12);
  --sci: #6e9bff; --sci-soft: rgba(110,155,255,.12); --math: #3fbf95; --math-soft: rgba(63,191,149,.12);
  --shadow: none;
}
body.dark .footer { margin-top: 96px; }
body.dark main:has(.cta-band) + .footer { margin-top: 0; }

/* 공통 버튼: 각진 테두리 / 채움 */
body.dark .btn { border-radius: 4px; padding: 15px 26px; font-weight: 600; transition: background .2s ease, color .2s ease, border-color .2s ease; }
body.dark .btn:hover { opacity: 1; }
body.dark .btn-primary { background: var(--d-chalk); color: var(--d-bg); }
body.dark .btn-primary:hover { background: #fff; }
body.dark .btn-line { border: 1px solid rgba(236,235,228,.55); color: var(--d-chalk); background: transparent; }
body.dark .btn-line:hover { border-color: var(--d-chalk); background: rgba(236,235,228,.06); }
body.dark .badge, body.dark .badge.soon { border-radius: 3px; background: transparent; border: 1px solid currentColor; color: var(--d-dim); font-size: 12px; padding: 2px 8px; }
body.dark .subj-label::before { display: none; }
body.dark .nav a[aria-current="page"] { color: var(--d-chalk); font-weight: 700; }

/* 페이지 제목 */
body.dark .page-head { padding: 88px 0 48px; border-bottom: 1px solid var(--d-line); }
body.dark .page-head h1 { font-size: 48px; font-weight: 700; letter-spacing: -0.035em; color: var(--d-chalk); }
body.dark .page-head p { color: var(--d-dim); }
body.dark .page-photo img { border-radius: 6px; filter: brightness(.8); max-height: 420px; }
body.dark .section h2, body.dark .section-head h2 { color: var(--d-chalk); letter-spacing: -0.03em; }

/* 표 */
body.dark table { color: var(--d-chalk); }
body.dark thead th { border-bottom: 1px solid rgba(236,235,228,.4); color: var(--d-dim); font-weight: 500; }
body.dark th, body.dark td { border-bottom-color: var(--d-line); }

/* 교육철학 */
body.dark .flow { gap: 12px; }
body.dark .flow-step { background: var(--d-surface); border: 1px solid var(--d-line); border-radius: 8px; }
body.dark .flow-step:hover { transform: none; border-color: rgba(236,235,228,.3); }
body.dark .flow-num { width: auto; height: auto; border-radius: 0; background: none; color: var(--d-blue); font-size: 15px; font-weight: 700; display: block; padding-top: 6px; min-width: 22px; }
body.dark .flow-step h3 { color: var(--d-chalk); }
body.dark .why { background: var(--d-surface); border-left: 2px solid var(--d-chalk); border-radius: 0 8px 8px 0; }
body.dark .why p + p { color: var(--d-dim); }
body.dark .school-group { background: var(--d-surface); border-radius: 8px; }
body.dark .school-group li { background: transparent; border: 1px solid var(--d-line); border-radius: 4px; color: var(--d-chalk); }
body.dark .qb-blue, body.dark .qb-navy { --c: var(--d-chalk); }

/* 시설 */
body.dark .room .pic { border-radius: 6px; background: var(--d-surface); }
body.dark .photo img, body.dark .pic img { border-radius: 6px; }
body.dark .room h3 { color: var(--d-chalk); }

/* 상담 문의 */
body.dark .info dt { color: var(--d-dim); }
body.dark .contact img { border-radius: 6px !important; filter: brightness(.88); }

/* ----- 선생님 카드: 가로로 넘기기 (메인 + 강사진) ----- */
.rail-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; }
.rail-nav { display: flex; align-items: center; gap: 8px; }
.rail-nav .text-link { margin-right: 16px; }
.rbtn { width: 44px; height: 44px; display: grid; place-items: center; background: transparent; border: 1px solid rgba(236,235,228,.35); border-radius: 4px; color: var(--d-chalk); cursor: pointer; transition: border-color .2s ease, background .2s ease; }
.rbtn:hover { border-color: var(--d-chalk); background: rgba(236,235,228,.06); }
.rbtn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.filter { display: flex; }
.fbtn { font: inherit; font-size: 15px; font-weight: 600; min-width: 88px; height: 46px; padding: 0 20px; cursor: pointer;
  background: transparent; color: var(--d-dim); border: 1px solid rgba(236,235,228,.35); transition: background .2s ease, color .2s ease; }
.fbtn + .fbtn { border-left: 0; }
.fbtn:first-child { border-radius: 4px 0 0 4px; } .fbtn:last-child { border-radius: 0 4px 4px 0; }
.fbtn:hover { color: var(--d-chalk); }
.fbtn[aria-pressed="true"] { background: var(--d-chalk); color: var(--d-bg); border-color: var(--d-chalk); }

.t-rail { display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; padding-bottom: 16px; scrollbar-width: thin; scrollbar-color: rgba(236,235,228,.25) transparent; }
.t-card { flex: 0 0 300px; scroll-snap-align: start; text-decoration: none; color: var(--d-chalk); }
.t-card[hidden] { display: none; }
.t-photo { aspect-ratio: 3 / 4; border-radius: 6px; overflow: hidden; background: var(--d-surface); display: grid; place-items: center; color: var(--d-dim); font-size: 14px; margin-bottom: 18px; }
.t-photo img { width: 100%; height: 100%; object-fit: cover; object-position: top; filter: brightness(.9); transition: filter .4s ease, transform .6s cubic-bezier(.2,.7,.2,1); }
a.t-card:hover .t-photo img { filter: brightness(1); transform: scale(1.03); }
.t-soon .t-photo { background: transparent; border: 1px dashed rgba(236,235,228,.3); }
.t-role { margin: 0; font-size: 14px; color: var(--d-dim); }
.t-subj { color: var(--c); font-weight: 700; margin-right: 8px; }
.t-card h3 { margin: 4px 0 0; font-size: 24px; font-weight: 700; letter-spacing: -0.02em; }
.t-grade { margin: 10px 0 0; font-size: 15px; color: var(--d-chalk); }
.t-career { list-style: none; margin: 16px 0 0; padding: 16px 0 0; border-top: 1px solid var(--d-line); font-size: 14px; line-height: 1.9; color: var(--d-dim); }
.t-rail-mini .t-card { flex-basis: 248px; }
.t-rail-mini .t-card h3 { font-size: 20px; }

/* ----- 시간표: 큰 글자 탭 + 밑줄 ----- */
body.dark .subject-tabs { display: flex; gap: 40px; border: 0; border-bottom: 1px solid var(--d-line); border-radius: 0; overflow: visible; margin-bottom: 36px; }
body.dark .subject-tab { background: transparent; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; padding: 0 0 18px; color: var(--d-dim); }
body.dark .subject-tab + .subject-tab { border-left: 0; }
body.dark .subject-tab strong { font-size: 40px; font-weight: 700; letter-spacing: -0.03em; color: rgba(236,235,228,.35); line-height: 1.2; transition: color .2s ease; }
body.dark .subject-tab span { font-size: 14px; }
body.dark .subject-tab:hover strong { color: rgba(236,235,228,.7); }
body.dark .subject-tab[aria-selected="true"] { background: transparent; border-bottom-color: var(--c); }
body.dark .subject-tab[aria-selected="true"] strong { color: var(--d-chalk); }
body.dark .tabs { gap: 28px; border-bottom: 1px solid var(--d-line); margin-bottom: 28px; }
body.dark .tab { background: transparent; border: 0; border-bottom: 2px solid transparent; border-radius: 0; margin-bottom: -1px; padding: 0 0 12px; font-size: 18px; font-weight: 600; color: var(--d-dim); }
body.dark .tab[aria-selected="true"], body.dark .tabs.sci .tab[aria-selected="true"] { background: transparent; color: var(--d-chalk); border-bottom-color: var(--d-chalk); }
body.dark .subject-panel thead th { border-bottom-color: rgba(236,235,228,.4); }

body.dark .tt-list tbody tr:hover { background: rgba(236,235,228,.04); }
body.dark .tt-list tbody tr.on { background: color-mix(in srgb, var(--g) 14%, transparent); }
body.dark .tt-list tbody tr.on th { color: var(--d-chalk); }
.tt-grade { font-size: 14px; font-weight: 700; white-space: nowrap; color: color-mix(in srgb, var(--g) 55%, #fff); }
body.dark .tt-title { color: var(--d-chalk); }
body.dark .tt-chip { border-radius: 4px; border: 1px solid rgba(236,235,228,.3); background: transparent; color: var(--d-chalk); border-top: 2px solid var(--g); }
body.dark .tt-chip:hover { transform: none; border-color: rgba(236,235,228,.6); border-top-color: var(--g); }
body.dark .tt-chip[aria-pressed="true"] { background: color-mix(in srgb, var(--g) 30%, transparent); color: #fff; border-color: var(--g); }
body.dark .tt-week-scroll { background: var(--d-surface); border-color: var(--d-line); border-radius: 6px; }
body.dark .tt-corner, body.dark .tt-day { background: rgba(236,235,228,.04); border-color: var(--d-line); color: var(--d-chalk); }
body.dark .tt-block { border-radius: 3px; background: color-mix(in srgb, var(--g) 32%, #161b19); border-left: 3px solid var(--g); box-shadow: none; color: var(--d-chalk); }
body.dark .tt-block.on { animation: none; transform: none; background: color-mix(in srgb, var(--g) 60%, #161b19); box-shadow: 0 0 0 2px var(--d-chalk); }
body.dark .tt-active .tt-block:not(.on) { opacity: .25; }
body.dark .empty-note a { color: var(--d-chalk); }

@media (max-width: 860px) {
  body.dark .page-head { padding: 56px 0 32px; }
  body.dark .page-head h1 { font-size: 34px; }
  .t-card { flex-basis: 78%; }
  .t-rail-mini .t-card { flex-basis: 62%; }
  .rail-nav .rbtn { display: none; }
  body.dark .subject-tab strong { font-size: 32px; }
  .fbtn { flex: 1; min-width: 0; }
  .filter { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { .t-rail { scroll-behavior: auto; } }

/* =====================================================================
   2026-11-11 추가: 페이지 전환 · 스크롤 등장 · 교육철학 · 하단 정보
   ===================================================================== */

/* 메인 배경: 카운터 확대 사진 한 장 고정 */
.hero-photo .still { opacity: 1; object-position: 50% 50%; animation: hero-still-in 1.6s cubic-bezier(.2,.7,.2,1) both; }
@keyframes hero-still-in { from { opacity: 0; transform: scale(1.04); } to { opacity: 1; transform: none; } }

/* 메뉴로 페이지를 넘길 때 부드럽게 (모든 브라우저, main.js와 함께 동작)
   - 누르면: 지금 페이지 본문이 살짝 위로 사라짐
   - 새 페이지: 본문이 아래에서 살짝 떠오름. 위쪽 메뉴 줄은 그대로 */
html { scroll-behavior: smooth; }
main, .site-foot, .notice-bar { animation: page-in .65s cubic-bezier(.2,.7,.2,1) both; }
@keyframes page-in { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes page-fade { from { opacity: 0; } to { opacity: 1; } }
.page-leaving main, .page-leaving .site-foot, .page-leaving .notice-bar {
  opacity: 0; transform: translateY(-12px); animation: none;
  transition: opacity .3s ease, transform .3s ease; }

/* 스크롤하면 떠오르는 요소 */
.js-reveal .reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s cubic-bezier(.2,.7,.2,1), transform .9s cubic-bezier(.2,.7,.2,1); }
.js-reveal .reveal.in { opacity: 1; transform: none; }
.js-reveal .steps li:nth-child(2) { transition-delay: .08s; }
.js-reveal .steps li:nth-child(4) { transition-delay: .08s; }
.js-reveal .steps li:nth-child(6) { transition-delay: .08s; }

/* 메인 바로가기: 커서를 올리면 글자가 커지며 과목 색으로 빛남 */
.hero-links a { transform-origin: left center; transition: color .3s ease, text-shadow .3s ease, transform .35s cubic-bezier(.2,.8,.2,1); }
.hero-links a + a { transform-origin: 24px center; }
.hero-links a:hover, .hero-links a:focus-visible { color: var(--hl); transform: scale(1.08); text-shadow: 0 0 18px color-mix(in srgb, var(--hl) 65%, transparent); }

/* 선생님 카드: 커서를 올리면 살짝 떠오르고 사진이 밝아짐 */
.t-card { transition: transform .4s cubic-bezier(.2,.8,.2,1); }
.t-card:hover { transform: translateY(-6px); }
.t-card:hover .t-photo img { filter: brightness(1.04); transform: scale(1.04); }
.t-card:hover h3 { color: #fff; }
.t-empty { position: relative; }
.t-empty img { filter: none; }
.t-empty span { position: absolute; left: 0; right: 0; bottom: 18px; text-align: center; font-size: 13px; color: var(--d-dim); }
.t-soon .t-photo { border: 0; }

/* ----- 교육철학 ----- */
.ph-stage { display: grid; position: relative; border-bottom: 1px solid var(--d-line); }
.ph-photo { grid-area: 1 / 1; position: sticky; top: 90px; align-self: start; justify-self: end; z-index: 0; pointer-events: none;
  width: min(42vw, 600px); aspect-ratio: 1 / 1; margin-right: max(0px, calc((100vw - 1240px) / 2)); overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 30%); mask-image: linear-gradient(90deg, transparent 0%, #000 30%); }
.ph-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; opacity: .7; }
.ph-photo::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 30%; background: linear-gradient(180deg, rgba(15,19,17,0), var(--d-bg)); }
.ph-text { grid-area: 1 / 1; position: relative; z-index: 1; width: 100%; padding-top: 128px; padding-bottom: 160px; }
.ph-kicker { margin: 0 0 20px; font-size: 16px; font-weight: 600; color: var(--d-dim); }
.ph-title { margin: 0 0 96px; max-width: 12em; font-size: clamp(40px, 5.6vw, 72px); line-height: 1.18; font-weight: 700; letter-spacing: -0.04em; color: var(--d-chalk); }
.ph-body { max-width: 34em; }
.ph-body p { margin: 0 0 1.7em; font-size: 19px; line-height: 1.95; color: rgba(236,235,228,.84); }
.ph-body p:last-child { margin-bottom: 0; }

.ph-system { padding-top: 120px; }
.ph-system-head h2 { margin: 0 0 10px; font-size: 36px; }
.ph-system-head p { margin: 0; color: var(--d-dim); }
.steps { list-style: none; margin: 48px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; column-gap: 64px; border-top: 1px solid rgba(236,235,228,.3); }
.steps li { display: grid; grid-template-columns: 52px 1fr; padding: 30px 0 32px; border-bottom: 1px solid var(--d-line); }
.steps-num { grid-row: 1 / span 2; padding-top: 4px; font-size: 15px; font-weight: 700; color: var(--d-blue); }
.steps h3 { margin: 0 0 8px; font-size: 21px; font-weight: 700; letter-spacing: -0.02em; color: var(--d-chalk); }
.steps h3 em { font-style: normal; font-size: 12px; font-weight: 600; color: var(--d-blue); margin-left: 8px; vertical-align: 2px; }
.steps p { margin: 0; font-size: 15.5px; line-height: 1.75; color: var(--d-dim); }

/* ----- 하단 정보 ----- */
body.dark .site-foot { background: #0a0d0c; border-top: 1px solid var(--d-line); padding: 56px 0 64px; font-size: 13.5px; line-height: 1.9; color: var(--d-dim); }
.site-foot p { margin: 0; }
.site-foot a { color: var(--d-dim); text-decoration: none; }
.site-foot a:hover { color: var(--d-chalk); }
.sf-name { color: var(--d-chalk); font-weight: 700; font-size: 15px; margin-bottom: 8px !important; }
.site-foot .sep { margin: 0 8px; color: rgba(236,235,228,.25); }
.sf-label { margin-top: 18px !important; font-size: 12.5px; color: rgba(236,235,228,.45); }
.sf-links { display: flex; gap: 20px; margin-top: 18px; }
.sf-links a { color: var(--d-chalk); }
.sf-follow { display: flex; gap: 20px; margin-top: 28px !important; }
.sf-follow span { color: rgba(236,235,228,.45); }
.sf-copy { margin-top: 28px !important; font-size: 12.5px; color: rgba(236,235,228,.45); }

@media (max-width: 860px) {
  .ph-photo { width: 78vw; top: 70px; margin-right: 0; }
  .ph-photo img { opacity: .35; }
  .ph-text { padding-top: 72px; padding-bottom: 96px; }
  .ph-title { margin-bottom: 56px; }
  .ph-body p { font-size: 17px; }
  .ph-system { padding-top: 72px; }
  .steps { grid-template-columns: 1fr; }
  .site-foot .sep { display: block; height: 0; overflow: hidden; margin: 0; }
}
/* ----- 상담 문의: 상담 방법 ----- */
.ways-title { margin: 0 0 20px; font-size: 24px; color: var(--d-chalk); letter-spacing: -0.02em; }
.ways { list-style: none; margin: 0 0 88px; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.way { display: flex; flex-direction: column; gap: 4px; height: 100%; padding: 28px 24px; border: 1px solid rgba(236,235,228,.18); border-radius: 6px; text-decoration: none; color: var(--d-chalk); background: var(--d-surface); transition: border-color .25s ease, background .25s ease, transform .35s cubic-bezier(.2,.8,.2,1); }
.way svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 28px; color: var(--d-dim); transition: color .25s ease; }
.way strong { font-size: 20px; font-weight: 700; }
.way span { font-size: 14px; color: var(--d-dim); }
.way:hover { border-color: var(--d-chalk); background: rgba(236,235,228,.06); transform: translateY(-4px); }
.way:hover svg { color: var(--d-chalk); }
.place { align-items: center; padding-top: 48px; border-top: 1px solid var(--d-line); }
.place-addr { margin: 0 0 24px; font-size: 18px; color: var(--d-chalk); }
.place-img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; filter: brightness(.88); }
@media (max-width: 860px) { .ways { grid-template-columns: 1fr 1fr; margin-bottom: 56px; } .way { padding: 22px 18px; } .way svg { margin-bottom: 18px; } }

@media (prefers-reduced-motion: reduce) {
  /* 움직임 줄이기 설정: 위아래 움직임은 빼고, 흐려졌다 나타나는 전환만 남김 */
  main, .site-foot, .notice-bar { animation: page-fade .5s ease both; }
  .page-leaving main, .page-leaving .site-foot, .page-leaving .notice-bar { opacity: 0; transform: none; transition: opacity .28s ease; }
  .js-reveal .reveal { transform: none; transition: opacity .8s ease; }
  .hero-photo .still { animation: none; }
}

/* =====================================================================
   강사진 카드 (2026-11-12)
   - PC: 사진에 마우스를 올리면 반투명 막과 함께 약력이 아래에서 올라옴
   - 휴대폰: 사진 왼쪽 + 약력 오른쪽 가로형 카드, 위아래로 내려 보기
   ===================================================================== */
.t-rail:not(.t-rail-mini) .t-card { position: relative; outline-offset: 4px; }
.t-info .t-grade::before { content: "담당"; display: inline-block; margin-right: 8px; font-size: 12px; font-weight: 600; color: var(--d-dim); }

@media (hover: hover) and (min-width: 861px) {
  .t-rail:not(.t-rail-mini) .t-info {
    position: absolute; top: 0; left: 0; right: 0; aspect-ratio: 3 / 4; z-index: 1;
    display: flex; flex-direction: column; justify-content: flex-end;
    padding: 24px 22px 22px; border-radius: 6px; overflow: hidden;
    background: linear-gradient(180deg, rgba(15,19,17,.55) 0%, rgba(15,19,17,.86) 45%, rgba(15,19,17,.94) 100%);
    -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
    opacity: 0; transform: translateY(18px);
    transition: opacity .35s ease, transform .45s cubic-bezier(.2,.8,.2,1);
    pointer-events: none;
  }
  .t-rail:not(.t-rail-mini) .t-card:hover .t-info,
  .t-rail:not(.t-rail-mini) .t-card:focus-within .t-info,
  .t-rail:not(.t-rail-mini) .t-card:focus .t-info { opacity: 1; transform: none; }
  .t-rail:not(.t-rail-mini) .t-info .t-grade { margin: 0; font-size: 16px; font-weight: 600; color: var(--d-chalk); }
  .t-rail:not(.t-rail-mini) .t-info .t-career { margin: 14px 0 0; padding: 14px 0 0; border-top: 1px solid rgba(236,235,228,.22); font-size: 14.5px; line-height: 1.85; color: rgba(236,235,228,.86); }
  /* 사진 아래에는 과목·이름만 */
  .t-rail:not(.t-rail-mini) .t-card .t-photo { margin-bottom: 16px; }
}

@media (max-width: 860px) {
  .t-rail:not(.t-rail-mini) { display: grid; gap: 14px; overflow: visible; scroll-snap-type: none; padding-bottom: 0; }
  .t-rail:not(.t-rail-mini) .t-card {
    display: grid; grid-template-columns: 38% minmax(0, 1fr); grid-template-rows: auto auto 1fr; column-gap: 16px;
    padding: 12px; border: 1px solid var(--d-line); border-radius: 8px; background: var(--d-surface);
  }
  .t-rail:not(.t-rail-mini) .t-card:hover { transform: none; }
  .t-rail:not(.t-rail-mini) .t-card .t-photo { grid-column: 1; grid-row: 1 / span 3; margin: 0; align-self: start; }
  .t-rail:not(.t-rail-mini) .t-role { grid-column: 2; margin-top: 2px; font-size: 13px; }
  .t-rail:not(.t-rail-mini) .t-card h3 { grid-column: 2; font-size: 20px; margin: 2px 0 0; }
  .t-rail:not(.t-rail-mini) .t-info { grid-column: 2; }
  .t-rail:not(.t-rail-mini) .t-info .t-grade { margin: 8px 0 0; font-size: 14px; }
  .t-rail:not(.t-rail-mini) .t-info .t-career { margin: 10px 0 0; padding: 10px 0 0; font-size: 13px; line-height: 1.7; }
}

/* =====================================================================
   시설: 설명 없이 사진만 나열 (2026-11-12)
   ===================================================================== */
.gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.gallery img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 6px; filter: brightness(.9); transition: filter .35s ease; }
.gallery img:hover { filter: brightness(1); }
@media (max-width: 860px) { .gallery { grid-template-columns: 1fr; gap: 10px; } }

/* =====================================================================
   시간표: 학년별 묶음 표 (2026-11-12)
   - 학년 이름 줄(.tt-ghead)을 누르면 그 학년 반들이 함께 표시됨
   ===================================================================== */
.tt-list tr.tt-ghead { cursor: pointer; }
.tt-list tr.tt-ghead th {
  padding: 22px 12px 10px; border-bottom: 1px solid color-mix(in srgb, var(--g) 70%, transparent);
  font-size: 16px; font-weight: 800; letter-spacing: -0.01em;
  color: color-mix(in srgb, var(--g) 50%, #fff); background: transparent;
}
.tt-list tr.tt-ghead th span { margin-left: 10px; font-size: 13px; font-weight: 500; color: var(--d-dim); }
.tt-list tbody tr.tt-ghead:first-child th { padding-top: 14px; }
.tt-list tbody tr[data-id] th { font-weight: 500; padding-left: 20px; }
body.dark .tt-list tbody tr.tt-ghead:hover { background: transparent; }
body.dark .tt-list tbody tr.tt-ghead.on th { color: #fff; }
body.dark .tt-active .tt-list tbody tr.tt-ghead:not(.on) { opacity: .45; }

/* =====================================================================
   시간표 목록 (2026-11-12): 주간 시간표 없음.
   학년 이름을 왼쪽에 크게(색 없이 분필색), 오른쪽에 그 학년 수업
   ===================================================================== */
.sched { --g-col: 200px; --cols: minmax(0, 1.7fr) minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, .7fr); margin-top: 8px; }
.sched.has-note { --cols: minmax(0, 1.6fr) minmax(0, 1.2fr) minmax(0, .9fr) minmax(0, .6fr) minmax(0, 1fr); }
.sched-head { display: grid; grid-template-columns: var(--g-col) var(--cols); padding: 0 0 12px; font-size: 13px; color: var(--d-dim); border-bottom: 1px solid rgba(236,235,228,.35); }
.sched-group { display: grid; grid-template-columns: var(--g-col) minmax(0, 1fr); border-bottom: 1px solid rgba(236,235,228,.35); }
.sched-grade { margin: 0; padding: 22px 16px 22px 0; font-size: 26px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.25; color: var(--d-chalk); }
.sched-rows { list-style: none; margin: 0; padding: 0; }
.sched-row { display: grid; grid-template-columns: var(--cols); align-items: baseline; padding: 20px 0; border-top: 1px solid var(--d-line); font-size: 15px; color: var(--d-dim); }
.sched-row:first-child { border-top: 0; }
.sc-name { font-weight: 600; color: var(--d-chalk); padding-right: 16px; }
.sc-time { color: var(--d-chalk); font-variant-numeric: tabular-nums; }
.sc-time b { font-weight: 700; margin-right: 4px; }
.sc-open { font-variant-numeric: tabular-nums; }
.sc-open i { display: none; font-style: normal; }
.sc-note { font-size: 14px; }

@media (max-width: 860px) {
  .sched-head { display: none; }
  .sched { border-top: 1px solid rgba(236,235,228,.35); }
  .sched-group { display: block; padding: 22px 0 8px; }
  .sched-grade { padding: 0 0 6px; font-size: 24px; }
  .sched-row { display: flex; flex-wrap: wrap; gap: 4px 14px; padding: 14px 0; font-size: 14px; }
  .sched-row:first-child { border-top: 0; }
  .sc-name { flex-basis: 100%; font-size: 16px; padding: 0; }
  .sc-open i { display: inline; }
  .sc-note:empty { display: none; }
}

/* =====================================================================
   선생님 카드: 화보형 그리드 (2026-11-12) — 메인 + 강사진
   - 한 줄 최대 3명, 아래로 이어짐 (옆으로 넘기기 없음)
   - 사진 위 아래쪽에 과목·직책·이름. PC에서는 평소 흑백,
     마우스를 올리면 색이 돌아오고 이름 아래로 약력이 펼쳐짐
   ===================================================================== */
.t-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.t-grid .t-card { position: relative; display: block; overflow: hidden; border-radius: 6px; background: var(--d-surface); color: var(--d-chalk); text-decoration: none; flex: none; }
.t-grid .t-card:hover { transform: translateY(-4px); }
.t-grid .t-photo { aspect-ratio: 3 / 4; margin: 0; border-radius: 0; background: var(--d-surface); }
.t-grid .t-photo img { filter: none; transition: filter .6s ease, transform .9s cubic-bezier(.2,.7,.2,1); }
.t-grid .t-card::before, .t-grid .t-card::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.t-grid .t-card::after { background: linear-gradient(180deg, rgba(15,19,17,0) 45%, rgba(15,19,17,.55) 70%, rgba(15,19,17,.95) 100%); }
.t-grid .t-card::before { background: rgba(15,19,17,.62); opacity: 0; transition: opacity .45s ease; }
.t-grid .t-body { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 22px 24px 24px; }
.t-grid .t-role { margin: 0; font-size: 13.5px; color: rgba(236,235,228,.82); }
.t-grid .t-card h3 { margin: 2px 0 0; font-size: 30px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.2; color: #fff; }
.t-grid .t-info { position: static; aspect-ratio: auto; max-height: 0; overflow: hidden; opacity: 0; padding: 0; background: none; transform: none;
  transition: max-height .6s cubic-bezier(.2,.8,.2,1), opacity .4s ease; }
.t-grid .t-info .t-grade { margin: 14px 0 0; font-size: 15px; font-weight: 600; color: var(--d-chalk); }
.t-grid .t-info .t-career { margin: 12px 0 0; padding: 12px 0 0; border-top: 1px solid rgba(236,235,228,.25); font-size: 14px; line-height: 1.8; color: rgba(236,235,228,.86); }

@media (hover: hover) and (min-width: 861px) {
  .t-grid .t-photo img { filter: grayscale(1) brightness(.85) contrast(1.05); }
  .t-grid .t-card:hover .t-photo img, .t-grid .t-card:focus-within .t-photo img, .t-grid .t-card:focus .t-photo img { filter: none; transform: scale(1.04); }
  .t-grid:not(.t-grid-mini) .t-card:hover::before, .t-grid:not(.t-grid-mini) .t-card:focus::before { opacity: 1; }
  .t-grid .t-card:hover .t-info, .t-grid .t-card:focus .t-info, .t-grid .t-card:focus-within .t-info { max-height: 340px; opacity: 1; }
}
@media (hover: none) and (min-width: 861px) {
  .t-grid .t-info { max-height: none; opacity: 1; }
  .t-grid .t-card::before { opacity: 1; }
}

@media (max-width: 860px) {
  /* 강사진 페이지: 사진 왼쪽 + 이름·약력 오른쪽 가로형 카드 */
  .t-grid:not(.t-grid-mini) { grid-template-columns: 1fr; gap: 12px; }
  .t-grid:not(.t-grid-mini) .t-card { display: grid; grid-template-columns: 38% minmax(0, 1fr); column-gap: 16px; padding: 12px; border: 1px solid var(--d-line); border-radius: 8px; }
  .t-grid:not(.t-grid-mini) .t-card::before, .t-grid:not(.t-grid-mini) .t-card::after { display: none; }
  .t-grid:not(.t-grid-mini) .t-photo { border-radius: 6px; align-self: start; }
  .t-grid:not(.t-grid-mini) .t-body { position: static; padding: 0; }
  .t-grid:not(.t-grid-mini) .t-card h3 { font-size: 22px; }
  .t-grid:not(.t-grid-mini) .t-info { max-height: none; opacity: 1; }
  .t-grid:not(.t-grid-mini) .t-info .t-grade { margin-top: 8px; font-size: 14px; }
  .t-grid:not(.t-grid-mini) .t-info .t-career { margin-top: 10px; padding-top: 10px; font-size: 13px; line-height: 1.7; }
  /* 메인: 2명씩 */
  .t-grid-mini { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .t-grid-mini .t-body { padding: 14px 14px 16px; }
  .t-grid-mini .t-card h3 { font-size: 20px; }
  .t-grid-mini .t-role { font-size: 12px; }
  .t-grid .t-card:hover { transform: none; }
}

/* =====================================================================
   2026-11-12 수정
   ===================================================================== */
/* 강사 필터: 숨긴 카드는 확실히 숨김 (그리드 표시 규칙보다 우선) */
.t-grid .t-card[hidden] { display: none; }

/* 강사 사진: 흑백 없이 처음부터 컬러.
   강사진 페이지는 마우스를 올리면 사진이 살짝 흐려지고 어두워지며 약력이 올라옴 */
.t-grid .t-photo img { filter: none; }
@media (hover: hover) and (min-width: 861px) {
  .t-grid .t-photo img { filter: none; }
  .t-grid .t-card:hover .t-photo img, .t-grid .t-card:focus .t-photo img, .t-grid .t-card:focus-within .t-photo img { filter: none; transform: scale(1.04); }
  .t-grid:not(.t-grid-mini) .t-card:hover .t-photo img,
  .t-grid:not(.t-grid-mini) .t-card:focus .t-photo img,
  .t-grid:not(.t-grid-mini) .t-card:focus-within .t-photo img { filter: blur(3px) brightness(.9); transform: scale(1.06); }
}
/* '담당' 글자는 빼고 학년만 */
.t-info .t-grade::before { content: none; }

/* 메인 첫 화면: 제목 → 설명이 한 줄씩 차례로 나타남 */
.home-top .ln { display: block; opacity: 0; animation: ln-in 1s cubic-bezier(.2,.7,.2,1) forwards; }
.home-top .ln1 { animation-delay: .25s; }
.home-top .ln2 { animation-delay: .75s; }
.home-top .ln3 { animation-delay: 1.35s; }
.home-top .ln4 { animation-delay: 1.7s; }
.home-top .hero-news, .home-top .hero-actions { opacity: 0; animation: ln-in .9s ease forwards; }
.home-top .hero-news { animation-delay: .05s; }
.home-top .hero-actions { animation-delay: 2.15s; }
@keyframes ln-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes ln-fade { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  /* 움직임 줄이기 설정: 위아래 이동 없이 차례로 흐려졌다 나타나기만 */
  .home-top .ln, .home-top .hero-news, .home-top .hero-actions { animation-name: ln-fade; }
}

/* =====================================================================
   2026-11-12 (2): 메인 문구 더 빠르고 부드럽게 / 메인 선생님 카드도 약력 올라옴
   ===================================================================== */
.home-top .ln, .home-top .hero-news, .home-top .hero-actions {
  opacity: 0; will-change: opacity, transform, filter;
  animation: ln-soft .75s cubic-bezier(.22,1,.36,1) forwards;
}
.home-top .hero-news { animation-delay: 0s; }
.home-top .ln1 { animation-delay: .1s; }
.home-top .ln2 { animation-delay: .28s; }
.home-top .ln3 { animation-delay: .5s; }
.home-top .ln4 { animation-delay: .64s; }
.home-top .hero-actions { animation-delay: .82s; }
@keyframes ln-soft { from { opacity: 0; transform: translateY(8px); filter: blur(6px); } to { opacity: 1; transform: none; filter: blur(0); } }
@keyframes ln-soft-fade { from { opacity: 0; filter: blur(6px); } to { opacity: 1; filter: blur(0); } }
/* 첫 화면은 본문 전체 떠오르기와 겹치지 않게 */
main:has(.home-top) { animation: none; }
@media (prefers-reduced-motion: reduce) {
  .home-top .ln, .home-top .hero-news, .home-top .hero-actions { animation-name: ln-soft-fade; }
}

@media (hover: hover) and (min-width: 861px) {
  .t-grid-mini .t-card:hover::before, .t-grid-mini .t-card:focus::before { opacity: 1; }
  .t-grid-mini .t-card:hover .t-photo img, .t-grid-mini .t-card:focus .t-photo img { filter: blur(3px) brightness(.9); transform: scale(1.06); }
}
.t-grid-mini .t-info .t-career { font-size: 13.5px; }

/* =====================================================================
   하단 정보: 가로로 짧게 (2026-11-12)
   왼쪽 학원 정보 2줄 / 오른쪽 링크·저작권
   ===================================================================== */
body.dark .site-foot { padding: 36px 0 40px; }
.sf { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px 48px; flex-wrap: wrap; }
.sf-main { min-width: 0; }
.site-foot .sf-name { margin: 0 0 8px !important; font-size: 15px; }
.sf-line { display: flex; flex-wrap: wrap; row-gap: 2px; margin: 0; font-size: 13px; line-height: 1.8; color: var(--d-dim); }
.sf-line span + span::before { content: ""; display: inline-block; width: 1px; height: 10px; margin: 0 12px; background: rgba(236,235,228,.25); vertical-align: -1px; }
.sf-side { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.site-foot .sf-links { margin: 0; gap: 18px; font-size: 13px; }
.site-foot .sf-copy { margin: 0 !important; font-size: 12px; }
@media (max-width: 860px) {
  .sf { flex-direction: column; align-items: flex-start; gap: 18px; }
  .sf-side { align-items: flex-start; }
  .sf-line span + span::before { margin: 0 8px; }
}
@media (max-width: 860px) {
  .sf-line { display: block; }
  .sf-line span { display: block; }
  .sf-line span + span::before { display: none; }
}

/* =====================================================================
   메인 관리: 5단계 하루 흐름 (2026-11-12)
   가로 선 위에 가는 눈금, 번호 + 단계 이름 + 한 줄 설명. 동그라미 없음
   ===================================================================== */
.flow5-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px 24px; flex-wrap: wrap; margin-bottom: 44px; }
.flow5-head h2 { margin: 0; font-size: 36px; line-height: 1.3; letter-spacing: -0.03em; color: var(--d-chalk); }
.flow5-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-top: 1px solid rgba(236,235,228,.35); }
.flow5-steps li { position: relative; padding: 30px 28px 0 0; }
.flow5-steps li::before { content: ""; position: absolute; left: 0; top: -8px; width: 1px; height: 15px; background: var(--d-chalk); }
.f5-num { font-size: 13px; font-weight: 600; color: var(--d-dim); font-variant-numeric: tabular-nums; }
.flow5-steps h3 { margin: 8px 0 10px; font-size: 26px; font-weight: 800; letter-spacing: -0.03em; color: var(--d-chalk); }
.flow5-steps p { margin: 0; font-size: 15px; line-height: 1.75; color: var(--d-dim); }
.js-reveal .flow5-steps li:nth-child(2) { transition-delay: .08s; }
.js-reveal .flow5-steps li:nth-child(3) { transition-delay: .16s; }
.js-reveal .flow5-steps li:nth-child(4) { transition-delay: .24s; }
.js-reveal .flow5-steps li:nth-child(5) { transition-delay: .32s; }
@media (max-width: 860px) {
  .flow5-head { margin-bottom: 28px; }
  .flow5-head h2 { font-size: 28px; }
  .flow5-steps { grid-template-columns: 1fr; border-top: 0; border-left: 1px solid rgba(236,235,228,.35); margin-left: 7px; }
  .flow5-steps li { padding: 0 0 26px 24px; }
  .flow5-steps li:last-child { padding-bottom: 0; }
  .flow5-steps li::before { top: 11px; left: -8px; width: 15px; height: 1px; }
  .flow5-steps h3 { display: inline; margin: 0 0 0 10px; font-size: 21px; }
  .flow5-steps p { margin-top: 6px; font-size: 14.5px; }
}

/* =====================================================================
   교육철학: 원칙 5개 (2026-11-12) — 왼쪽 큰 문장, 오른쪽 설명
   순서가 아니므로 번호 없음. 스크롤하면 하나씩 떠오름
   ===================================================================== */
.ph-stage .ph-title { margin-bottom: 72px; }
.principles2 { border-top: 1px solid rgba(236,235,228,.35); }
.pr { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 24px 56px; padding: 44px 0; border-bottom: 1px solid var(--d-line); }
.pr h2 { margin: 0; font-size: clamp(24px, 2.6vw, 32px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.3; color: var(--d-chalk); }
.pr p { margin: 0; max-width: 34em; font-size: 18px; line-height: 1.9; color: rgba(236,235,228,.84); }
@media (max-width: 860px) {
  .ph-stage .ph-title { margin-bottom: 48px; }
  .pr { grid-template-columns: 1fr; gap: 12px; padding: 30px 0; }
  .pr h2 { font-size: 24px; }
  .pr p { font-size: 16px; line-height: 1.85; }
}
/* 교육철학 마무리: 마지막 원칙 아래 선 없애고, 아래 빈 공간 줄이기 */
.principles2 .pr:last-child { border-bottom: 0; padding-bottom: 0; }
.ph-stage { border-bottom: 0; }
.ph-stage .ph-text { padding-bottom: 96px; }
body.dark:has(.ph-stage) .footer { margin-top: 0; }
@media (max-width: 860px) { .ph-stage .ph-text { padding-bottom: 64px; } }

/* ----- 시간표: 교육비 기준 안내 (2026-11-12) ----- */
.fee-basis { margin: -8px 0 16px; font-size: 15px; color: var(--d-dim); }
.fee-basis strong { color: var(--d-chalk); font-weight: 700; }

/* ----- 새 로고 이미지 (2026-11-12): TEOS만 (테오스학원 글자는 명칭 문제로 뺌), 투명 바탕 분필색 ----- */
.logo { align-items: center; }
.logo-img { display: block; height: 30px; width: auto; }
@media (max-width: 860px) { .logo-img { height: 26px; } }
