/* 비로그인 공개 홈(2026-11-21 시안). 공개 홈 안에서만 쓰고, 로그인한 화면에는 닿지 않는다. */
body:has(.home-public-workshop) { background: #fcf9f4; font-family: Pretendard, 'Apple SD Gothic Neo', 'Noto Sans KR', sans-serif; }
body:has(.home-public-workshop) #pageContent { padding-top: calc(var(--main-nav-height, 88px) + var(--global-banner-height, 0px)) !important; }
body:has(.home-public-workshop) #mainNav { background: #fcf9f4; border-bottom: 1px solid #ece7f3; }
body:has(.home-public-workshop) .shell-nav-frame { max-width: 1264px; background: #fcf9f4; border: 0; box-shadow: none; backdrop-filter: none; border-radius: 0; }
body:has(.home-public-workshop) .shell-nav-public-actions { display: flex; align-items: center; gap: 8px; }
body:has(.home-public-workshop) .shell-nav-brand-wordmark,
body:has(.home-public-workshop) .shell-nav-public-link { white-space: nowrap; }
body:has(.home-public-workshop) .shell-nav-public-link { min-height: 44px; padding: 0 12px; display: inline-flex; align-items: center; border: 0; border-radius: 6px; background: transparent; box-shadow: none; color: #1f1746; font-size: 16px; font-weight: 600; }
body:has(.home-public-workshop) .shell-nav-public-link:hover { color: #4b2fa0; background: #f1ecfb; }
body:has(.home-public-workshop) .shell-nav-public-link--login { margin-left: 8px; padding: 0 20px; background: #4b2fa0; color: #fff; font-weight: 700; }
body:has(.home-public-workshop) .shell-nav-public-link--login:hover { background: #3d2585; color: #fff; }
body:has(.home-public-workshop) .shell-footer-shell { background: #f7f4ee; backdrop-filter: none; }

.home-public-workshop {
    --pub-ink: #1f1746;
    --pub-muted: #4f4866;
    --pub-sub: #5b5470;
    --pub-line: #ece7f3;
    --pub-violet: #4b2fa0;
    --pub-violet-dark: #3d2585;
    color: var(--pub-ink);
    background: #fcf9f4;
    padding-bottom: 72px;
    word-break: keep-all;
}
.home-public-workshop * { box-sizing: border-box; }
.home-public-workshop a { color: inherit; text-decoration: none; }
.home-public-workshop a:focus-visible,
.home-public-workshop summary:focus-visible,
.home-public-workshop [tabindex]:focus-visible { outline: 3px solid var(--pub-violet); outline-offset: 3px; border-radius: 4px; }
.home-public-workshop h2 { margin: 0 0 20px; font-size: 28px; line-height: 1.3; font-weight: 800; letter-spacing: -.02em; }
.pub-wrap { max-width: 1264px; margin: 0 auto; padding-inline: clamp(16px, 3vw, 32px); }

.pub-button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 56px; padding: 0 26px; border-radius: 6px; font-size: 18px; font-weight: 700; transition: background .15s, border-color .15s; }
.home-public-workshop .pub-button--primary { background: var(--pub-violet); color: #fff; }
.home-public-workshop .pub-button--primary:hover { background: var(--pub-violet-dark); }
.pub-button--quiet { border: 1px solid #d9d1ea; background: #fff; }
.pub-button--quiet:hover { border-color: var(--pub-violet); color: var(--pub-violet); }
.pub-button--small { min-height: 48px; padding: 0 20px; font-size: 16px; }
.pub-chevron { flex: none; color: var(--pub-violet); }

/* 첫 화면 */
.pub-hero { display: flex; flex-wrap: wrap; align-items: center; gap: 24px; padding-top: 24px; }
.pub-hero__copy { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 24px; padding: 32px 0; }
.pub-hero h1 { margin: 0; font-size: clamp(36px, 5vw, 64px); line-height: 1.12; font-weight: 800; letter-spacing: -.035em; }
.pub-hero h1 span { display: block; }
.pub-accent { color: var(--pub-violet); }
.pub-hero__summary { margin: 0; font-size: 20px; line-height: 1.6; color: var(--pub-muted); }
.pub-hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.pub-hero__note { margin: 0; font-size: 15px; color: var(--pub-sub); }
.pub-hero__art { flex: 1 1 520px; min-width: 0; height: clamp(240px, 40vw, 560px); margin: 0; overflow: hidden; }
.pub-hero__art img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 96% 50%; }

/* 많이 쓰는 도구 */
.pub-popular { padding-top: 32px; }
.pub-popular__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.pub-popular__card { display: flex; align-items: center; gap: 18px; padding: 14px; border: 1px solid var(--pub-line); border-radius: 8px; background: #fff; transition: border-color .15s; }
.pub-popular__card:hover { border-color: #c9bde3; }
.pub-popular__card img { display: block; flex: none; width: 152px; height: 96px; object-fit: cover; border-radius: 6px; }
.pub-popular__text { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 0; }
.pub-popular__text strong { font-size: 21px; font-weight: 800; }
.pub-popular__text span { font-size: 15px; line-height: 1.45; color: var(--pub-sub); }

/* 어떤 일을 도와드릴까요? */
.pub-tools { padding-top: 80px; scroll-margin-top: calc(var(--main-nav-height, 88px) + var(--global-banner-height, 0px) + 16px); }
.pub-tools h2 { font-size: 32px; margin-bottom: 24px; }
.pub-tools__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 32px 20px; }
.pub-group { min-width: 0; }
.pub-group__head { list-style: none; display: flex; flex-direction: column; gap: 14px; cursor: default; }
.pub-group__head::-webkit-details-marker { display: none; }
.pub-group__head img { display: block; width: 100%; aspect-ratio: 16 / 9; height: auto; object-fit: cover; border-radius: 8px; }
.pub-group__title strong { display: block; font-size: 21px; font-weight: 800; letter-spacing: -.01em; }
.pub-group__count { display: none; }
.pub-group__list { margin: 14px 0 0; padding: 0; list-style: none; border-top: 1px solid #e6e0ef; }
.pub-group__list li { border-bottom: 1px solid #efebf5; }
.pub-group__list a { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; padding: 6px 0; font-size: 16px; font-weight: 600; line-height: 1.4; }
.pub-group__list a:hover { color: var(--pub-violet); }
.pub-group__list svg { flex: none; color: #8a82a3; }
.pub-empty { color: var(--pub-sub); font-size: 18px; }
.pub-extras { margin-top: 48px; display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; }
.pub-extra { padding: 20px 24px; border-radius: 8px; background: #f4f0f8; }
.pub-extra h3 { margin: 0 0 6px; font-size: 17px; font-weight: 800; color: var(--pub-muted); }
.pub-extra ul { display: flex; flex-wrap: wrap; gap: 0 20px; margin: 0; padding: 0; list-style: none; }
.pub-extra a { display: inline-flex; align-items: center; min-height: 40px; font-size: 16px; font-weight: 600; }
.pub-extra a:hover { color: var(--pub-violet); }

/* 이야기 · 웹툰 · 앱 */
.pub-stories { display: flex; flex-wrap: wrap; gap: 20px; padding-top: 80px; }
.pub-story { flex: 2 1 560px; min-width: 0; display: flex; flex-wrap: wrap; overflow: hidden; border: 1px solid var(--pub-line); border-radius: 8px; background: #fff; }
.pub-story > img { display: block; flex: 1 1 260px; width: 0; min-height: 220px; height: auto; object-fit: cover; }
.pub-story__body { flex: 1 1 300px; display: flex; flex-direction: column; justify-content: center; gap: 14px; padding: 32px; }
.pub-story__body h2 { margin: 0; }
.pub-story__body p { margin: 0; font-size: 17px; line-height: 1.6; color: var(--pub-muted); }
.pub-story__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }
.pub-side { flex: 1 1 280px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.pub-side__card { flex: 1; border: 1px solid var(--pub-line); border-radius: 8px; background: #fff; }
.pub-side__card strong { display: block; font-size: 20px; font-weight: 800; }
.pub-side__card span span { display: block; margin-top: 4px; font-size: 15px; line-height: 1.5; color: var(--pub-sub); }
.pub-side__card--webtoon { display: flex; align-items: center; gap: 16px; padding: 20px 24px; transition: border-color .15s; }
.pub-side__card--webtoon:hover { border-color: #c9bde3; }
.pub-side__card--webtoon img { display: block; flex: none; width: 96px; height: 72px; object-fit: cover; border-radius: 6px; }
.pub-side__card--app > summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 24px; cursor: pointer; }
.pub-side__card--app > summary::-webkit-details-marker { display: none; }
.pub-side__card--app[open] > summary .pub-chevron { transform: rotate(180deg); }
.pub-side__card--app .teacher-app-guide__panel { padding: 0 24px 20px; }

@media (max-width: 767px) {
    body:has(.home-public-workshop) .shell-nav-frame { padding: 8px 16px; }
    body:has(.home-public-workshop) .shell-nav-brand-wordmark { font-size: 19px; }
    body:has(.home-public-workshop) .shell-nav-public-actions { gap: 2px; }
    body:has(.home-public-workshop) .shell-nav-public-link { padding: 0 9px; font-size: 15px; }
    body:has(.home-public-workshop) .shell-nav-public-link--login { margin-left: 4px; padding: 0 14px; min-height: 40px; }
    .home-public-workshop { padding-bottom: 56px; }
    .home-public-workshop h2 { font-size: 22px; margin-bottom: 14px; }
    .pub-hero { display: flex; flex-direction: column; align-items: stretch; gap: 16px; padding-top: 28px; }
    .pub-hero__copy { display: contents; }
    .pub-hero h1 { font-size: clamp(30px, 9.2vw, 36px); line-height: 1.18; }
    .pub-hero__summary { font-size: 17px; line-height: 1.55; }
    .pub-hero__summary br { display: none; }
    .pub-hero__art { order: 3; flex: none; height: 236px; margin-inline: calc(-1 * clamp(16px, 3vw, 32px)); }
    .pub-hero__art img { object-position: 72% 55%; }
    .pub-hero__actions { order: 4; margin: 0; }
    .pub-hero__actions .pub-button--primary { flex: 1 1 100%; }
    .pub-hero__actions .pub-button--quiet { display: none; }
    .pub-hero__note { order: 5; text-align: center; font-size: 14px; }
    .pub-popular__grid { grid-template-columns: minmax(0, 1fr); gap: 10px; }
    .pub-popular__card { gap: 14px; padding: 10px; }
    .pub-popular__card img { width: 104px; height: 64px; }
    .pub-popular__text strong { font-size: 18px; }
    .pub-popular__text span { font-size: 14px; }
    .pub-popular__card .pub-chevron { display: none; }
    .pub-tools { padding-top: 48px; }
    .pub-tools h2 { font-size: 24px; }
    .pub-tools__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .pub-group { overflow: hidden; border: 1px solid var(--pub-line); border-radius: 8px; background: #fff; }
    .pub-group__head { gap: 0; cursor: pointer; }
    .pub-group__head img { border-radius: 0; }
    .pub-group__title { padding: 10px 12px 12px; }
    .pub-group__title strong { font-size: 17px; }
    .pub-group__count { display: block; margin-top: 2px; font-size: 14px; color: var(--pub-sub); }
    .pub-group[open] { grid-column: 1 / -1; }
    .pub-group[open] .pub-group__head { flex-direction: row; align-items: center; }
    .pub-group[open] .pub-group__head img { width: 120px; flex: none; }
    .pub-group__list { margin: 0 16px; border-top-color: #efebf5; }
    .pub-group__list li:last-child { border-bottom: 0; }
    .pub-extras { margin-top: 20px; grid-template-columns: minmax(0, 1fr); gap: 10px; }
    .pub-extra { padding: 14px 16px; }
    .pub-extra h3 { font-size: 15px; }
    .pub-extra ul { gap: 0 16px; }
    .pub-extra a { font-size: 15px; }
    .pub-stories { padding-top: 48px; gap: 12px; }
    .pub-story > img { flex-basis: 100%; width: 100%; aspect-ratio: 16 / 9; min-height: 0; }
    .pub-story__body { padding: 18px 16px; gap: 10px; }
    .pub-story__body p { font-size: 15px; }
    .pub-story__actions { flex-direction: column; gap: 4px; }
    .pub-story__actions .pub-button { width: 100%; }
    .pub-story__actions .pub-button--quiet { border: 0; background: transparent; }
    .pub-side { flex-basis: 100%; gap: 12px; }
    .pub-side__card--webtoon, .pub-side__card--app > summary { padding: 16px; }
    .pub-side__card strong { font-size: 17px; }
    .pub-side__card span span { font-size: 14px; }
    .pub-side__card--app .teacher-app-guide__panel { padding: 0 16px 16px; }
}
@media (max-width: 399px) {
    /* 좁은 폭에서는 글자 상표를 접고 그림 상표만 둔다(링크 이름은 남는다). */
    body:has(.home-public-workshop) .shell-nav-brand-wordmark { display: none; }
}
@media (max-width: 359px) {
    body:has(.home-public-workshop) .shell-nav-public-link { padding: 0 6px; font-size: 14px; }
    body:has(.home-public-workshop) .shell-nav-public-link--login { padding: 0 10px; }
    .pub-tools__grid { gap: 8px; }
    .pub-group__title strong { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) { .home-public-workshop a, .pub-button { transition: none; } }
