/* 공개 페이지 공통 상단 메뉴(휴대폰 모양 통일). 각 페이지 스타일 뒤에 불러온다. */
html body .topbar .nav a[aria-current="page"] {
  background: #6B4F0B;
  border-color: #6B4F0B;
  color: #fff;
}

/* 2026-09-30 디자인 스킬 재검토(Taste redesign + Vercel 지침) */
html body :is(h1, h2, h3) { text-wrap: balance; word-break: keep-all; overflow-wrap: anywhere; }
html body main p { text-wrap: pretty; }
html body .lesson-fold > p,
html body p.lesson-preview,
html body .lesson-preview p,
html body .guide-hero ~ * .section-desc,
html body .container > .section-desc,
html body .admission-method-note { max-width: 44em; }
html body footer.site-legal {
  margin-top: 48px; padding: 28px 20px; border-top: 1px solid #E8DCC8; background: #F5F0E8;
  color: #6F604B; font-size: .85rem; line-height: 1.8; text-align: center; word-break: keep-all;
}
html body footer.site-legal .site-legal-inner { max-width: 1080px; margin: 0 auto; }
html body footer.site-legal a,
html body footer.footer a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 760px) {
  html body .topbar .brand { display: inline-flex; align-items: center; min-height: 44px; }
  html body .article-preview > a { display: inline-flex; align-items: center; min-height: 44px; }
  html body footer.site-legal { padding-bottom: 96px; }
}
@media (max-width: 760px) {
  /* 게시판·Q&A처럼 학원 이름과 메뉴 버튼을 한 줄에 */
  html body .topbar[data-nav-enhanced] .topbar-inner {
    display: flex !important; flex-direction: row !important; flex-wrap: wrap !important;
    align-items: center !important; justify-content: space-between !important; column-gap: 10px;
  }
  html body .topbar[data-nav-enhanced] .brand {
    flex: 1 1 0 !important; min-width: 0; max-width: none !important;
    font-size: 14.5px !important; line-height: 1.35; letter-spacing: -0.02em; word-break: keep-all;
    font-family: 'Nanum Myeongjo', 'Batang', Georgia, serif !important; font-weight: 800;
  }
  html body .top-bar[data-nav-enhanced] > span:first-child { flex: 1 1 0 !important; min-width: 0; font-size: 14.5px; line-height: 1.35; }
  html body .topbar[data-nav-enhanced] .nav-toggle,
  html body .top-bar[data-nav-enhanced] .nav-toggle { margin-left: 0; flex: 0 0 auto; width: auto !important; }
  html body .top-bar[data-nav-enhanced] { flex-direction: row !important; flex-wrap: wrap !important; align-items: center !important; }
  html body .topbar[data-nav-enhanced] .nav,
  html body .top-bar[data-nav-enhanced] .guide-nav { flex: 1 1 100%; }
}

/* 안내 페이지 제목 크기 통일(읽는 글은 각 페이지 크기 유지) */
html body[data-title-scale="hub"] h1 {
  font-size: clamp(2.1rem, 4.4vw, 4rem) !important;
  line-height: 1.16 !important;
  letter-spacing: -0.035em;
}
html body .top-bar .guide-nav a[aria-current="page"] { background: #6B4F0B; border-color: #6B4F0B; color: #fff; }
@media (max-width: 760px) {
  html body[data-title-scale="hub"] h1 { font-size: 2.05rem !important; }
  html body .top-bar .guide-nav a { font-size: .78rem; line-height: 1.2; padding: 6px 4px; text-align: center; word-break: keep-all; }
}

/* 2026-09-30 2차: 공개 4 + 재원생 4 + 실력 테스트, 휴대폰은 메뉴 버튼 */
/* 2026-10-01: '소개' 한 메뉴 안의 두 쪽(상세 소개 / 학원 안내) */
/* 2026-10-01 2차: 큰 막대 → 본문 폭에 맞춘 밑줄 탭 */
html body .intro-tabs {
  display: flex; gap: 28px; max-width: 1180px; margin: 0 auto; padding: 0 20px;
  border-bottom: 1px solid #E8DCC8;
}
html body .intro-tabs a {
  position: relative; display: inline-flex; align-items: center; min-height: 52px; padding: 0 2px;
  color: #8A7A60; font-size: 1rem; font-weight: 700; text-decoration: none; white-space: nowrap;
}
html body .intro-tabs a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; background: transparent; border-radius: 2px;
}
html body .intro-tabs a[aria-current="page"] { color: #2C2416; font-weight: 800; }
html body .intro-tabs a[aria-current="page"]::after { background: #6B4F0B; }
html body .intro-tabs a:not([aria-current]):hover { color: #2C2416; }
html body .intro-tabs a:focus-visible { outline: 2px solid #8B6914; outline-offset: 2px; }
@media (max-width: 760px) { html body .intro-tabs { gap: 22px; padding: 0 16px; } html body .intro-tabs a { min-height: 48px; font-size: .95rem; } }
/* 학원 안내 첫 화면: 탭 바로 아래로 붙이고 남는 빈칸·모서리 장식 제거 */
html body.about-page:not(.intro-page) .about-hero { min-height: 0 !important; padding-top: clamp(36px, 5vw, 64px) !important; }
html body.about-page:not(.intro-page) .about-hero::before { display: none !important; }
html body.intro-page .intro-head { padding-top: 28px; }
/* 2026-09-30 3차: 재원생 4개는 한 칸(드롭다운)으로 접는다 */
html body nav .nav-member { position: relative; display: inline-flex; align-items: center; align-self: center; }
html body nav .nav-member > summary {
  list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
  min-height: 44px; padding: 6px 12px; border-radius: 8px;
  font: inherit; font-size: .88rem; font-weight: 700; white-space: nowrap; color: inherit;
}
html body nav .nav-member > summary::-webkit-details-marker { display: none; }
html body nav .nav-member > summary::after { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform .16s ease; }
html body nav .nav-member[open] > summary::after { transform: translateY(2px) rotate(-135deg); }
html body nav .nav-member[data-current] > summary { color: #6B4F0B; text-decoration: underline; text-underline-offset: 4px; }
html body nav .nav-member > summary:focus-visible { outline: 2px solid #8B6914; outline-offset: 2px; }
html body nav .nav-member-list {
  position: absolute; top: calc(100% + 6px); right: 0; z-index: 60;
  display: flex; flex-direction: column; min-width: 168px; padding: 6px;
  background: #fff; border: 1px solid #E8DCC8; border-radius: 10px;
  box-shadow: 0 12px 28px rgba(44,36,22,.16);
}
html body nav .nav-member-list a {
  display: flex !important; align-items: center; justify-content: flex-start !important;
  min-height: 44px; padding: 8px 12px !important; margin: 0 !important; border: 0 !important; border-radius: 6px;
  background: transparent !important; color: #2C2416 !important; font-size: .9rem; font-weight: 700; white-space: nowrap; text-decoration: none;
}
html body nav .nav-member-list a:hover,
html body nav .nav-member-list a:focus-visible { background: #F5F0E8 !important; }
html body nav .nav-member-list a[aria-current="page"] { background: #6B4F0B !important; color: #fff !important; }
#landing .cover-nav-links .nav-member > summary { color: rgba(253,248,240,.92); }
@media (max-width: 760px) {
  /* 소개 추가로 공개 메뉴 5칸: 3칸씩 두 줄 */
  html body .topbar .nav, html body .top-bar .guide-nav { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
}
@media (min-width: 761px) {
  html body header.cover-nav:has(.nav-member),
  html body .topbar .nav:has(.nav-member),
  html body .top-bar:has(.nav-member),
  html body .site-nav:has(.nav-member) { overflow: visible !important; }
}
@media (max-width: 760px) {
  html body nav .nav-member { grid-column: 1 / -1; display: block; width: 100%; }
  html body nav .nav-member > summary {
    width: 100%; justify-content: space-between; min-height: 44px; padding: 8px 14px;
    border: 1px solid #E8DCC8; background: #fff; color: #2C2416;
  }
  html body nav .nav-member-list {
    position: static; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px;
    min-width: 0; margin-top: 6px; padding: 0; border: 0; box-shadow: none; background: transparent;
  }
  html body nav .nav-member-list a { justify-content: center !important; border: 1px solid #E8DCC8 !important; background: #fff !important; white-space: normal; }
  #landing .cover-nav-links .nav-member > summary { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.28); color: #FDF8F0; }
}
html body nav .nav-group {
  display: inline-flex; align-items: center; align-self: center;
  margin-left: 6px; padding: 0 4px 0 12px;
  border-left: 1px solid rgba(44,36,22,.22);
  color: #8A6A1E; font-size: .72rem; font-weight: 800; letter-spacing: .04em; white-space: nowrap;
}
#landing .cover-nav-links .nav-group { color: rgba(240,213,140,.85); border-left-color: rgba(255,255,255,.28); }
html body .topbar .nav a.nav-cta,
html body .top-bar .guide-nav a.guide-nav-cta { background: #6B4F0B; border-color: #6B4F0B; color: #fff; }
html body .topbar .nav-toggle,
html body .top-bar .nav-toggle { display: none; }
@media (max-width: 760px) {
  html body .topbar .topbar-inner { flex-wrap: wrap; align-items: center; }
  html body .topbar[data-nav-enhanced] .brand { flex: 1 1 auto; max-width: calc(100% - 84px); }
  html body .topbar .nav-toggle,
  html body .top-bar .nav-toggle {
    display: none; align-items: center; justify-content: center; min-height: 42px; padding: 0 16px;
    border: 1px solid #6B4F0B; border-radius: 8px; background: #fff; color: #6B4F0B;
    font: inherit; font-size: .9rem; font-weight: 800; cursor: pointer;
  }
  html body .topbar[data-nav-enhanced] .nav-toggle,
  html body .top-bar[data-nav-enhanced] .nav-toggle { display: inline-flex; }
  html body .topbar[data-nav-enhanced]:not([data-nav-open]) .nav,
  html body .top-bar[data-nav-enhanced]:not([data-nav-open]) .guide-nav { display: none !important; }
  html body .top-bar .guide-nav { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  html body .topbar .nav-toggle,
  html body .top-bar .nav-toggle { margin-left: auto; }
  html body .top-bar .guide-nav { display: grid; gap: 6px; flex: 1 1 100%; width: 100%; }
  html body .top-bar .guide-nav a { display: flex; align-items: center; justify-content: center; min-height: 42px; border: 1px solid #E8DCC8; border-radius: 8px; background: #fff; font-size: .85rem; font-weight: 700; }
  html body nav .nav-group { grid-column: 1 / -1; margin: 6px 0 0; padding: 0; border-left: 0; justify-content: flex-start; }
  html body .topbar .nav a.nav-cta,
  html body .top-bar .guide-nav a.guide-nav-cta { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  html body .topbar .topbar-inner { flex-wrap: wrap; row-gap: 8px; }
  html body .topbar .brand { flex: 1 1 100%; max-width: 100%; }
  html body .topbar .nav {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    flex: 1 1 100%;
    width: 100%;
    overflow: visible;
    padding: 0;
  }
  html body .topbar .nav a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 42px;
    padding: 6px 4px;
    border: 1px solid #E8DCC8;
    border-radius: 8px;
    background: #fff;
    color: #2C2416;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    white-space: normal;
    word-break: keep-all;
  }
  html body .topbar .nav a[aria-current="page"] { background: #6B4F0B; border-color: #6B4F0B; color: #fff; }
}

/* 2026-10-01 내부 페이지 머리를 홈 표지 메뉴 막대와 같은 모양으로 통일 (넓은 화면) */
@media (min-width: 1100px) {
  html body header.topbar,
  html body header.masthead {
    position: sticky; top: 0; z-index: 50;
    padding: 12px clamp(16px, 2.6vw, 30px) !important;
    border: 0 !important; background: rgba(253, 248, 240, .92) !important;
    -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
    box-shadow: none !important;
  }
  html body header.topbar .topbar-inner,
  html body header.masthead .masthead-inner,
  html body div.top-bar {
    display: grid !important; grid-template-columns: auto minmax(0, 1fr) auto !important;
    align-items: center !important; gap: clamp(12px, 2vw, 28px) !important;
    width: min(1380px, 100%) !important; max-width: none !important; min-height: 62px !important;
    box-sizing: border-box; margin: 0 auto !important; padding: 8px 10px 8px 20px !important;
    border: 1px solid #DCCBA9 !important; border-radius: 18px !important;
    background: rgba(255, 255, 255, .72) !important;
    box-shadow: 0 6px 18px rgba(44, 36, 22, .05), inset 0 1px 1px rgba(255, 255, 255, .8) !important;
  }
  html body div.top-bar { margin: 12px auto !important; width: min(1380px, calc(100% - 40px)) !important; }
  html body div.top-bar > .nav-toggle,
  html body header.topbar .nav-toggle,
  html body header.masthead .nav-toggle { display: none !important; }
  html body header.topbar .brand,
  html body header.masthead .brand,
  html body div.top-bar > .brand {
    display: inline-flex; align-items: center; min-height: 44px; max-width: none !important; flex: none !important;
    color: #2C2416 !important; font-family: 'Nanum Myeongjo', 'Batang', Georgia, serif !important;
    font-size: clamp(.875rem, 1.25vw, 1rem) !important; font-weight: 800 !important; letter-spacing: .035em;
    text-decoration: none !important; white-space: nowrap;
  }
  html body header.topbar .nav,
  html body header.masthead .site-nav,
  html body div.top-bar .guide-nav {
    display: flex !important; flex-wrap: nowrap; align-items: center; justify-content: flex-end !important;
    gap: 4px clamp(8px, 1.25vw, 18px) !important; grid-column: 2 / 4; margin: 0 !important; padding: 0 !important;
    border: 0 !important; background: none !important; overflow: visible !important; width: auto !important;
  }
  html body header.topbar .nav > a,
  html body header.masthead .site-nav > a,
  html body div.top-bar .guide-nav > a,
  html body nav .nav-member > summary {
    display: inline-flex !important; align-items: center; min-height: 44px; padding: 0 2px !important;
    border: 0 !important; border-radius: 0 !important; background: none !important; box-shadow: none !important;
    color: #4A3B2A !important; font-family: 'Noto Sans KR', sans-serif !important; font-size: .8125rem !important;
    font-weight: 700 !important; text-decoration: none !important; white-space: nowrap;
  }
  html body header.topbar .nav > a[aria-current="page"],
  html body header.masthead .site-nav > a[aria-current="page"],
  html body div.top-bar .guide-nav > a[aria-current="page"],
  html body nav .nav-member[data-current] > summary {
    color: #6B4F0B !important; text-decoration: underline !important; text-decoration-thickness: 2px !important; text-underline-offset: 6px !important;
  }
  html body header.topbar .nav > a:not(.nav-cta):hover,
  html body header.masthead .site-nav > a:not(.nav-cta):hover,
  html body div.top-bar .guide-nav > a:not(.guide-nav-cta):hover { color: #6B4F0B !important; }
  html body header.topbar .nav > a.nav-cta,
  html body header.masthead .site-nav > a.nav-cta,
  html body div.top-bar .guide-nav > a.guide-nav-cta {
    margin-left: clamp(8px, 1.6vw, 22px); padding: 10px 15px !important;
    border: 1px solid #8B6914 !important; border-radius: 0 !important; background: #8B6914 !important;
    color: #FDF8F0 !important; font-size: .875rem !important; font-weight: 800 !important; text-decoration: none !important;
    display: inline-flex !important; align-items: center; justify-content: center;
    height: 44px !important; box-sizing: border-box !important; padding-block: 0 !important; line-height: 22px !important;
  }
  html body header.topbar .nav > a.nav-cta:hover,
  html body header.masthead .site-nav > a.nav-cta:hover,
  html body div.top-bar .guide-nav > a.guide-nav-cta:hover { background: #6B4F0B !important; border-color: #6B4F0B !important; }
}

@media (min-width: 761px) {
  html body header.topbar::before, html body header.topbar::after,
  html body header.masthead::before, html body header.masthead::after { display: none !important; }
  #landing .cover-nav-links .nav-member > summary,
  html body #cover-nav-links .nav-member > summary { color: rgba(253,248,240,.84) !important; font-size: .75rem !important; }
}
html body div.top-bar > a.brand { color: #2C2416; font-family: 'Nanum Myeongjo', 'Batang', Georgia, serif; font-weight: 800; text-decoration: none; }
@media (max-width: 760px) { html body div.top-bar > a.brand { font-size: 14.5px; line-height: 1.35; } }
/* 2026-10-03 실력 테스트 버튼을 모든 머리글(topbar·masthead·guide)에서 같은 모양으로 */
html body header.topbar .nav > a.nav-cta,
html body header.masthead .site-nav > a.nav-cta,
html body div.top-bar .guide-nav > a.guide-nav-cta {
  display: inline-flex !important; align-items: center !important; justify-content: center !important;
  box-sizing: border-box !important; height: 44px !important; min-height: 44px !important;
  padding: 0 15px !important; border: 1px solid #8B6914 !important; border-radius: 0 !important;
  background: #8B6914 !important; box-shadow: none !important; color: #FDF8F0 !important;
  font-family: 'Noto Sans KR', sans-serif !important; font-size: .875rem !important; font-weight: 800 !important;
  line-height: 22px !important; text-decoration: none !important; white-space: nowrap;
}
html body header.topbar .nav > a.nav-cta:hover,
html body header.masthead .site-nav > a.nav-cta:hover,
html body div.top-bar .guide-nav > a.guide-nav-cta:hover { background: #6B4F0B !important; border-color: #6B4F0B !important; }
@media (min-width: 761px) and (max-width: 1100px) {
  /* 태블릿 폭: 버튼이 넓어져 머리글이 두 줄로 무너지지 않게 좌우 여백·글자를 줄인다 */
  html body header.topbar .nav > a.nav-cta,
  html body header.masthead .site-nav > a.nav-cta,
  html body div.top-bar .guide-nav > a.guide-nav-cta { padding: 0 8px !important; font-size: .8125rem !important; margin-left: 4px !important; }
  html body header.topbar .brand,
  html body header.masthead .brand { font-family: 'Nanum Myeongjo', 'Batang', Georgia, serif !important; word-break: keep-all; }
  /* 메뉴는 한 줄로, 학원명은 필요하면 두 줄로 */
  html body header.topbar .nav,
  html body header.masthead .site-nav { flex-wrap: nowrap !important; column-gap: 10px !important; }
  html body header.topbar .nav > a:not(.nav-cta),
  html body header.masthead .site-nav > a:not(.nav-cta) {
    padding-left: 2px !important; padding-right: 2px !important; white-space: nowrap;
    border: 0 !important; border-radius: 0 !important; background: none !important; box-shadow: none !important;
    font-size: .875rem !important; font-weight: 700 !important;
  }
  html body header.topbar .brand,
  html body header.masthead .brand { min-width: 0; flex: 0 1 auto; font-size: .9375rem !important; line-height: 1.35; }
}
@media (max-width: 760px) {
  html body header.topbar .nav > a.nav-cta,
  html body header.masthead .site-nav > a.nav-cta,
  html body div.top-bar .guide-nav > a.guide-nav-cta { grid-column: 1 / -1; width: 100% !important; justify-content: center !important; }
}
