/* 스토어 · 교사 · 관리자 화면 공통 스타일 (2026-11-10 Variant 시안 적용).
   색·글꼴은 아래 변수만 바꾸면 전체에 반영된다. 시안 원본: design/variant/ */
:root {
  /* 바탕 · 글자 */
  --bg: #f8f9fb;          /* 페이지 바탕 */
  --surface: #ffffff;     /* 카드 */
  --band: #f3f5f9;        /* 띠 · 표 짝수 줄 */
  --text: #1a1a1a;
  --muted: #5d5d5d;
  --border: #e4e7ee;      /* 머리카락 선 */
  /* 브랜드 */
  --navy: #112144;        /* 제목 · 상표 */
  --primary: #2240a3;     /* 버튼 · 링크 */
  --primary-text: #ffffff;
  --label: #3569b2;       /* 작은 머리표 · 진행 막대 */
  --highlight: #ffd400;   /* 형광 노랑 (강조 한 곳에만) */
  /* 알림 */
  --success-bg: #e7f5ef; --success-text: #05694c;
  --error-bg: #fbecea;   --error-text: #b3261e;
  --warn-text: #a85a00;
  --info-bg: #edf1fb;    --info-text: #2240a3;
  --radius: 4px;
  --radius-lg: 8px;
  --shadow: 0 4px 6px -1px rgba(17, 33, 68, .05), 0 2px 4px -1px rgba(17, 33, 68, .03);
  --shadow-float: 0 8px 24px rgba(17, 33, 68, .12);
  /* 글꼴: 화면은 Pretendard(설치된 경우) → 시스템 글꼴, 제목은 명조 */
  --sans: "Pretendard Variable", "Pretendard", -apple-system, BlinkMacSystemFont, system-ui, "Apple SD Gothic Neo", "Malgun Gothic", "Segoe UI", sans-serif;
  --serif: "Noto Serif KR", "Nanum Myeongjo", "AppleMyungjo", "Batang", "Times New Roman", serif;
  font-family: var(--sans);
}
@media (prefers-color-scheme: dark) {
  :root {
    /* Variant 프롬프트 v3 (11/10) 의 어두운 모드 값. --navy 는 제목 글자에 쓰므로 밝은 남색 */
    --bg: #0e1424; --surface: #151c2f; --band: #1b2338; --text: #e8eaf0; --muted: #a3a9b8; --border: #2a3349;
    --navy: #d3dcf5; --primary: #8fa8ff; --primary-text: #0e1424; --label: #8fb0e8; --highlight: #ffd400;
    --success-bg: #12301e; --success-text: #8fd6a5;
    --error-bg: #3a1618;   --error-text: #f2a3a3;
    --warn-text: #f0b460;
    --info-bg: #18234a;    --info-text: #b7c6ff;
    --shadow: 0 2px 6px rgba(0, 0, 0, .3); --shadow-float: 0 8px 24px rgba(0, 0, 0, .45);
  }
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); line-height: 1.6; -webkit-font-smoothing: antialiased; word-break: keep-all; overflow-wrap: anywhere; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3 { color: var(--navy); line-height: 1.35; }
h1 { font-family: var(--serif); font-size: 1.65rem; font-weight: 700; margin: 1.6rem 0 1.1rem; }
h2 { font-size: 1.1rem; font-weight: 700; margin: 0 0 .8rem; }
h3 { font-size: 1rem; margin: 0 0 .6rem; }
.container { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
@media (max-width: 480px) { .container { padding: 0 16px; } }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
/* 빈 화면: 원고지 격자 위에 한 문장 */
.empty {
  grid-column: 1 / -1; color: var(--muted); text-align: center; padding: 3rem 1.5rem; margin: 0;
  border: 1px dashed var(--border); border-radius: var(--radius);
  background-color: var(--surface);
  background-image: linear-gradient(var(--band) 1px, transparent 1px), linear-gradient(90deg, var(--band) 1px, transparent 1px);
  background-size: 22px 22px; background-position: center;
}
code { background: var(--band); border: 1px solid var(--border); padding: 1px 6px; border-radius: var(--radius); }
.svg-i { width: 1.25em; height: 1.25em; flex: none; vertical-align: -.25em; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------------------------------------------------------------- 머리말 · 꼬리말 */
.site-header {
  background: color-mix(in srgb, var(--surface) 95%, transparent); border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 20; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.nav { display: flex; align-items: center; gap: 20px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 8px; color: var(--navy); flex: none; }
.brand:hover { text-decoration: none; }
.brand .logo img { display: block; height: 36px; width: auto; }
@media (max-width: 380px) { .brand .logo img { height: 32px; } }
.search { flex: 1; min-width: 160px; max-width: 360px; position: relative; }
.search input { width: 100%; padding-inline-start: 36px; height: 38px; background: var(--bg); }
.search .svg-i { position: absolute; inset-inline-start: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.menu { display: flex; align-items: center; gap: 4px 16px; flex-wrap: wrap; margin-inline-start: auto; font-size: .93rem; }
.menu a, .menu button.link { color: var(--muted); font-weight: 500; }
.menu a:hover, .menu button.link:hover { color: var(--navy); text-decoration: none; }
.menu a.active { color: var(--navy); font-weight: 700; }
.menu .btn { color: var(--primary-text); }
.nav-toggle { display: none; }
.site-footer { margin-top: 4rem; padding: 2rem 0 2.4rem; border-top: 1px solid var(--border); font-size: .85rem; color: var(--muted); }
.site-footer .brand { margin-bottom: .6rem; }
.site-footer .brand .logo img { height: 28px; opacity: .85; }

/* 언어 고르기 (i18n.py) · 아랍어는 오른쪽에서 왼쪽 (dir="rtl") */
.langs { display: flex; align-items: center; gap: 0; font-size: .82rem; flex: none; }
.langs a { color: var(--muted); padding: 0 8px; border-inline-start: 1px solid var(--border); }
.langs a:first-child { border-inline-start: 0; }
.langs a.active { color: var(--navy); font-weight: 700; }
:root:lang(ar) body { font-family: "Noto Naskh Arabic", "Segoe UI", Tahoma, "Geeza Pro", system-ui, sans-serif; line-height: 1.8; }
:root:lang(ar) h1 { font-family: inherit; }

/* 휴대폰: ☰ 를 누르면 메뉴·검색·언어가 아래로 펼쳐진다 (static/js/site.js) */
@media (max-width: 860px) {
  .nav { flex-wrap: wrap; gap: 0 12px; min-height: 56px; }
  .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center; margin-inline-start: auto;
    width: 44px; height: 44px; border: 0; background: transparent; color: var(--navy); border-radius: var(--radius); cursor: pointer;
  }
  .nav-toggle:hover { background: var(--band); }
  .nav-toggle svg { width: 24px; height: 24px; }
  .nav .search, .nav .menu, .nav .langs { display: none; }
  .site-header.open .nav .search, .site-header.open .nav .menu, .site-header.open .nav .langs { display: flex; }
  .site-header.open .nav { padding-bottom: 12px; }
  .site-header.open .search { flex: 1 1 100%; max-width: none; margin: 4px 0 8px; }
  .site-header.open .menu { flex: 1 1 100%; flex-direction: column; align-items: stretch; gap: 0; margin: 0; font-size: 1rem; }
  .site-header.open .menu > a, .site-header.open .menu > form { display: flex; align-items: center; min-height: 48px; border-top: 1px solid var(--border); padding: 0 4px; }
  .site-header.open .menu > a.btn { justify-content: center; margin-top: 8px; border-top: 0; }
  .site-header.open .menu a.active { color: var(--primary); }
  .site-header.open .langs { flex: 1 1 100%; padding: 12px 0 0; border-top: 1px solid var(--border); font-size: .9rem; }
  .site-header.open .langs a:first-child { padding-inline-start: 4px; }
}

/* 휴대폰 아래쪽 탭 (로그인한 회원) */
.tabbar { display: none; }
@media (max-width: 860px) {
  body.has-tabbar { padding-bottom: calc(62px + env(safe-area-inset-bottom)); }
  .tabbar {
    display: flex; position: fixed; inset-inline: 0; bottom: 0; z-index: 20;
    background: var(--surface); border-top: 1px solid var(--border); padding-bottom: env(safe-area-inset-bottom);
  }
  .tabbar a {
    flex: 1; min-width: 0; height: 60px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    color: var(--muted); font-size: .7rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .tabbar a:hover { text-decoration: none; background: var(--bg); }
  .tabbar a.active { color: var(--primary); font-weight: 700; }
  .tabbar svg { width: 24px; height: 24px; }
}

/* ---------------------------------------------------------------- 폼 요소 · 버튼 */
input, select, textarea {
  font: inherit; color: var(--text); background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius); padding: 9px 12px; max-width: 100%;
}
input:focus, select:focus, textarea:focus { outline: 0; border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
input[type=checkbox], input[type=radio] { accent-color: var(--primary); width: 1.05em; height: 1.05em; }
input[type=file] { background: var(--bg); border-style: dashed; padding: 10px; }
label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: .9rem; }
label.check { flex-direction: row; align-items: center; gap: 8px; }
fieldset { border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 14px; margin: 0; display: flex; flex-direction: column; gap: 8px; }
fieldset label.check { font-weight: 400; }
legend { font-weight: 700; color: var(--navy); padding: 0 4px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: inherit; font-weight: 600; cursor: pointer;
  background: var(--primary); color: var(--primary-text); border: 1px solid var(--primary);
  border-radius: var(--radius); padding: 10px 20px; text-align: center; min-height: 42px; line-height: 1.3;
  transition: background-color .15s, border-color .15s, color .15s;
}
.btn:hover { background: var(--navy); border-color: var(--navy); text-decoration: none; }
.btn.secondary { background: var(--surface); color: var(--navy); border-color: var(--border); }
.btn.secondary:hover { background: var(--band); border-color: var(--navy); }
.btn.small { padding: 5px 12px; font-size: .86rem; min-height: 34px; }
.btn.large { padding: 14px 28px; font-size: 1.05rem; min-height: 52px; }
.btn.block { width: 100%; }
.btn.danger { background: var(--error-text); border-color: var(--error-text); color: #fff; }
.btn.danger:hover { filter: brightness(.9); }
@media (prefers-color-scheme: dark) { .btn:hover { background: #b3c3f8; border-color: #b3c3f8; } .btn.secondary:hover { background: var(--band); } }
button.link { background: none; border: 0; padding: 0; font: inherit; color: var(--primary); cursor: pointer; }
form.inline { display: inline; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.row input { flex: 1; min-width: 160px; }
.row.tight select { padding: 6px 8px; }
.stack { display: flex; flex-direction: column; gap: 14px; max-width: 440px; }
.grid-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.grid-form .full { grid-column: 1 / -1; }

.flash { padding: 12px 16px; border-radius: var(--radius); margin: 16px 0 0; border: 1px solid transparent; border-inline-start-width: 3px; }
.flash.info { background: var(--info-bg); color: var(--info-text); border-color: color-mix(in srgb, var(--info-text) 25%, transparent); }
.flash.success { background: var(--success-bg); color: var(--success-text); border-color: color-mix(in srgb, var(--success-text) 25%, transparent); }
.flash.error { background: var(--error-bg); color: var(--error-text); margin-bottom: 12px; border-color: color-mix(in srgb, var(--error-text) 25%, transparent); }

.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; margin-bottom: 20px; box-shadow: var(--shadow); }
.panel > h2:first-child { padding-bottom: .7rem; border-bottom: 1px solid var(--border); }
.form-card { max-width: 440px; margin: 2.5rem auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.form-card h1 { margin-top: 0; text-align: center; }
.form-card form { display: flex; flex-direction: column; gap: 14px; }
.kv { display: grid; grid-template-columns: 110px 1fr; gap: 8px 16px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }

.badge {
  display: inline-flex; align-items: center; font-size: .76rem; font-weight: 600; padding: 1px 8px; border-radius: var(--radius);
  background: var(--info-bg); color: var(--info-text); border: 1px solid color-mix(in srgb, var(--info-text) 20%, transparent); white-space: nowrap;
}
.badge.muted { background: var(--bg); color: var(--muted); border-color: var(--border); }
.badge.warn { background: var(--error-bg); color: var(--error-text); border-color: color-mix(in srgb, var(--error-text) 25%, transparent); }
/* 내 서재: 대출 만료일 (7일 이하 남으면 빨간색) */
.loan-due { color: var(--info-text); font-weight: 600; }
.loan-due.soon { color: var(--error-text); }

/* ---------------------------------------------------------------- 랜딩 페이지 (landing.html, 로그아웃 첫 화면)
   대응표: docs/DESIGN.md 맨 끝. 띠 배경은 흰색(.lp-band) · #F3F5F9(.alt) · 남색(.navy) */
.hero-lead { font-size: clamp(1.02rem, 2vw, 1.2rem); color: var(--muted); margin: 0 0 1.8rem; font-weight: 500; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 1rem; }
@media (max-width: 480px) { .hero-actions .btn { flex: 1 1 100%; } }
.hero-devices { font-size: .85rem; color: var(--muted); margin: 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 1.4rem; }
.section-head h1, .section-head h2 { font-family: var(--serif); font-size: clamp(1.3rem, 3vw, 1.75rem); margin: 0; }
.store-head { margin: 2rem 0 .4rem; }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin: 0; padding: 0; list-style: none; counter-reset: step; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }
.steps li { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.steps li::before { counter-increment: step; content: "0" counter(step); display: block; font-family: var(--serif); font-weight: 700; color: var(--label); font-size: 1.1rem; margin-bottom: .4rem; }
.steps h3 { font-size: 1.08rem; color: var(--navy); margin: 0 0 .4rem; }
.steps p { margin: 0; color: var(--muted); font-size: .93rem; }

/* 머리말: 랜딩에서만 [로그인] [기관 도입 상담] (768px 이상) */
.header-cta { display: none; gap: 8px; align-items: center; flex: none; }
@media (min-width: 768px) {
  .header-cta { display: flex; order: 3; }
  .landing .menu .narrow-only { display: none !important; }
}
@media (min-width: 768px) and (max-width: 860px) { .landing .nav-toggle { margin-inline-start: 0; order: 4; } .header-cta { margin-inline-start: auto; } }

.landing-main { display: block; }
/* 랜딩 머리말은 상표 · 메뉴 · 언어 · 버튼만 (검색은 스토어에서) — 한 줄에 들어가게 */
.landing .nav .search { display: none !important; }
@media (min-width: 861px) { .landing .menu { flex-wrap: nowrap; white-space: nowrap; } }
.lp-band { background: var(--surface); padding: clamp(3rem, 7vw, 5.5rem) 0; }
.lp-band.alt { background: var(--band); }
.lp-band.navy { background: #112144; color: #e8eaf0; }
.lp-band.navy h2, .lp-band.navy h3 { color: #fff; }
.lp-band.navy .lp-label { color: #a9c3f0; }
.lp-band.navy .lp-lead { color: #c4ccdc; }
.lp-band h2 { font-family: var(--serif); font-size: clamp(1.45rem, 3.4vw, 2.1rem); line-height: 1.4; margin: 0 0 1rem; }
.lp-label { display: inline-block; font-size: .86rem; font-weight: 700; color: var(--label); margin-bottom: .7rem; }
.lp-narrow-head { max-width: 820px; text-align: center; margin-bottom: 2.4rem; }
.lp-lead { color: var(--muted); font-size: 1.02rem; margin: 0 auto; max-width: 42em; }
.lp-note { text-align: center; color: var(--muted); font-size: .9rem; margin: 1.6rem 0 0; }
.lp-closing { text-align: center; font-family: var(--serif); font-weight: 700; color: var(--navy); font-size: clamp(1.15rem, 2.6vw, 1.6rem); margin: 2.6rem 0 0; }
.lp-more { font-weight: 700; white-space: nowrap; }
:root:lang(ar) .lp-band h2, :root:lang(ar) .lp-closing { font-family: inherit; }

/* 1. 첫 화면: 1024px 이상 2단 */
.lp-hero-band { padding-top: clamp(2rem, 5vw, 4rem); }
.lp-hero { display: grid; gap: 32px; align-items: center; }
@media (min-width: 1024px) { .lp-hero { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 56px; } }
.lp-hero h1 { font-size: clamp(1.8rem, 4.4vw, 2.85rem); line-height: 1.3; margin: 0 0 1rem; }
.lp-hero .lp-label { background: color-mix(in srgb, var(--label) 10%, transparent); border: 1px solid color-mix(in srgb, var(--label) 22%, transparent); padding: 4px 12px; border-radius: var(--radius); }
.lp-device { justify-self: center; width: 100%; max-width: 540px; border: 8px solid #2a2a2a; border-radius: 22px; background: #e4e7ee; padding: 6px; box-shadow: 0 20px 50px -12px rgba(17, 33, 68, .2); }
.lp-device-screen { position: relative; background: #fffdf8; border-radius: 12px; padding: 48px 28px 100px; min-height: 200px; overflow: hidden; }
.lp-device-progress { position: absolute; inset-inline-start: 0; top: 0; height: 3px; width: 42%; background: #2240a3; }
.lp-device-text { font-family: var(--serif); font-size: clamp(1.1rem, 2.6vw, 1.45rem); line-height: 2.1; color: #1f2430; margin: 0; }
.lp-device-text .w { display: inline-block; }
.lp-device-text .w.hidden { opacity: 0; }
.lp-device-text { position: relative; }
.lp-device-text .w.cur { font-weight: 700; }
.lp-device-text mark { background: rgba(254, 218, 0, .8); color: inherit; padding: 0 2px; border-radius: 2px; }
.lp-dk {
  position: absolute; top: calc(100% + 4px); inset-inline-start: 0; width: min(17em, 100%); z-index: 1;
  background: rgb(255, 247, 209); border: 1px solid #e4e7ee; border-radius: 4px; box-shadow: 0 8px 24px rgba(17, 33, 68, .14);
  padding: 8px 12px; font-family: var(--sans); font-size: .8rem; line-height: 1.5; font-weight: 400; color: #000;
}
@media (min-width: 1024px) { .lp-device-screen { min-height: 240px; } }

/* 2·5·6. 카드 3장 */
.lp-cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; }
@media (min-width: 760px) { .lp-cards.three { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.lp-quote { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; display: flex; flex-direction: column; gap: 10px; }
.lp-quote blockquote { margin: 0; font-family: var(--serif); font-size: 1.12rem; font-weight: 700; color: var(--navy); line-height: 1.55; }
.lp-quote p { margin: 0; color: var(--muted); font-size: .92rem; flex: 1; }
.lp-who { font-size: .82rem; font-weight: 700; color: var(--label); }
.lp-stat { border: 1px solid rgba(255, 255, 255, .16); border-radius: var(--radius); padding: 26px; display: flex; flex-direction: column; gap: 10px; background: rgba(255, 255, 255, .04); }
.lp-stat b { font-family: var(--serif); font-size: clamp(1.3rem, 2.6vw, 1.7rem); color: #ffd400; }
.lp-stat span:last-child { color: #c4ccdc; font-size: .9rem; }
.lp-review { margin: 24px 0 0; text-align: center; color: #e8eaf0; font-family: var(--serif); font-size: 1.05rem; }
.lp-band.navy .badge.muted { background: rgba(255, 255, 255, .12); color: #e8eaf0; border-color: rgba(255, 255, 255, .2); }
.lp-plan { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; display: flex; flex-direction: column; gap: 8px; }
.lp-plan .lp-label { margin: 0; }
.lp-plan h3 { font-family: var(--serif); font-size: 1.25rem; margin: 0; }
.lp-plan > p { margin: 0; color: var(--muted); font-size: .93rem; }
.lp-checks { list-style: none; padding: 0; margin: 8px 0; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.lp-checks li { padding-inline-start: 1.5em; position: relative; font-size: .93rem; }
.lp-checks li::before { content: "✓"; position: absolute; inset-inline-start: 0; color: var(--label); font-weight: 700; }
.lp-strong { font-weight: 700; color: var(--navy) !important; margin-bottom: 8px !important; }

/* 4. 직접 체험 */
.lp-try { max-width: 760px; margin: 0 auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); }
.lp-try-bar { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; background: #112144; color: #fff; padding: 8px 12px; }
.lp-try-bar button { min-height: 40px; padding: 0 12px; font: inherit; font-size: .9rem; font-weight: 600; color: #fff; background: transparent; border: 1px solid rgba(255, 255, 255, .25); border-radius: var(--radius); cursor: pointer; }
.lp-try-bar button:hover { background: rgba(255, 255, 255, .1); }
.lp-try-speed { min-width: 7.5em; text-align: center; font-size: .85rem; font-variant-numeric: tabular-nums; }
.lp-try-restart { margin-inline-start: auto; }
.lp-try-stage { position: relative; background: #fffdf8; }
.lp-try-frame { display: block; width: 100%; border: 0; height: 260px; background: #fffdf8; }
.lp-try-fallback { padding: 24px; margin: 0; color: var(--muted); }
.lp-try-done { padding: 18px 22px 22px; border-top: 1px solid var(--border); text-align: center; }
.lp-try-done p { font-family: var(--serif); font-weight: 700; color: var(--navy); font-size: 1.15rem; margin: 0 0 12px; }
.lp-try-done .hero-actions { justify-content: center; margin: 0; }
/* 덜컥이 상자 (superbook.js 가 만든다. 뷰어 reader.css 의 .sb-dk 와 같은 모양, 색 번호 값은 superbook.js) */
.lp-try .sb-dk {
  position: absolute; z-index: 4; width: 62%; max-height: 80%; overflow: auto; overflow-wrap: break-word; line-height: normal;
  background: #fff; color: #000; border: 1px solid rgba(17, 33, 68, .18); border-radius: 4px; box-shadow: 0 8px 24px rgba(17, 33, 68, .12);
  transform: scale(1, 0); transition: transform .2s; font-family: var(--sans);
}
.lp-try .sb-dk.open { transform: scale(1, 1); }
.lp-try .sb-dk-exp { padding: 8px 10px; font-size: .95rem; white-space: pre-wrap; background: rgb(255, 247, 209); }

/* 7. 책장: 무료 리본 */
.cover-wrap { position: relative; display: block; }
.ribbon { position: absolute; top: 0; inset-inline-end: 10px; background: #2240a3; color: #fff; font-size: .74rem; font-weight: 700; padding: 6px 7px 7px; border-radius: 0 0 4px 4px; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); }

/* 8. 자주 묻는 질문 */
.lp-faq { max-width: 820px; }
.lp-faq h2 { text-align: center; }
.lp-qa { border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg); margin-bottom: 10px; }
.lp-qa summary { cursor: pointer; list-style: none; padding: 18px 20px; font-weight: 700; color: var(--navy); display: flex; justify-content: space-between; gap: 12px; }
.lp-qa summary::-webkit-details-marker { display: none; }
.lp-qa summary::after { content: "+"; color: var(--primary); font-size: 1.3rem; line-height: 1; }
.lp-qa[open] summary::after { content: "−"; }
.lp-qa p { margin: 0; padding: 0 20px 18px; color: var(--text); }

/* 9. 상담 양식 (남색 띠 안의 흰 카드) */
.lp-contact { max-width: 760px; margin: 0 auto; background: var(--surface); color: var(--text); border-radius: var(--radius); padding: clamp(20px, 4vw, 40px); box-shadow: 0 20px 40px rgba(0, 0, 0, .25); }
.lp-contact .flash { margin: 0 0 16px; }
.lp-tabs { display: flex; border-bottom: 1px solid var(--border); margin-bottom: 22px; }
.lp-tabs label { flex: 1; display: block; font-weight: 700; }
.lp-tabs input { position: absolute; opacity: 0; pointer-events: none; }
.lp-tabs span { display: block; text-align: center; padding: 12px 4px; color: var(--muted); border-bottom: 3px solid transparent; margin-bottom: -1px; cursor: pointer; }
.lp-tabs input:checked + span { color: var(--primary); border-bottom-color: var(--primary); }
.lp-tabs input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 2px; }
.lp-personal { display: none; text-align: center; padding: 12px 0; }
.lp-personal p { font-size: 1.05rem; margin: 0 0 16px; }
.lp-contact:has(input[value="personal"]:checked) .lp-personal { display: block; }
.lp-contact:has(input[value="personal"]:checked) .lp-fields { display: none; }
.lp-fields .grid-form { margin-bottom: 14px; }
.lp-fields input:not([type=checkbox]), .lp-fields select, .lp-fields textarea { width: 100%; background: var(--bg); }
.lp-agree { font-weight: 400; font-size: .88rem; margin: 6px 0 16px; align-items: flex-start; }
.lp-agree input { margin-top: 4px; }
.lp-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.lp-small { text-align: center; color: var(--muted); font-size: .82rem; margin: 10px 0 0; }

/* 휴대폰: 아래쪽 고정 [기관 도입 상담] */
.lp-sticky { display: none; }
@media (max-width: 767px) {
  body.landing { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
  .lp-sticky.btn.block {
    display: flex; position: fixed; inset-inline: 12px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 20; width: auto;
    box-shadow: 0 6px 18px rgba(17, 33, 68, .25);
  }
}


/* ---------------------------------------------------------------- 스토어 · 책 카드 */
.book-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 28px 20px; margin-top: 1rem; }
@media (max-width: 480px) { .book-grid { grid-template-columns: repeat(2, 1fr); gap: 22px 14px; } }
.book-card { color: var(--text); display: flex; flex-direction: column; gap: 6px; }
.book-card:hover { text-decoration: none; }
.book-card:hover .cover { transform: translateY(-6px); box-shadow: 0 14px 28px rgba(17, 33, 68, .2); }
.cover { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: var(--radius-lg); background: var(--border); box-shadow: 0 4px 12px rgba(17, 33, 68, .14); transition: transform .25s, box-shadow .25s; margin-bottom: 6px; }
.book-title { font-weight: 700; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.book-author { color: var(--muted); font-size: .86rem; }
.book-price { font-weight: 600; font-size: .92rem; color: var(--navy); }
.progress { height: 4px; background: var(--border); border-radius: 99px; overflow: hidden; margin: 4px 0 2px; }
.progress span { display: block; height: 100%; background: var(--label); }

/* 상세 */
.detail { display: grid; grid-template-columns: minmax(160px, 260px) 1fr; gap: 40px; margin-top: 2rem; align-items: start; }
@media (max-width: 640px) { .detail { grid-template-columns: 1fr; gap: 24px; } .detail-cover { max-width: 220px; margin: 0 auto; } }
.detail-cover { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: var(--radius-lg); box-shadow: 0 14px 30px rgba(17, 33, 68, .2); }
.detail-body h1 { margin-top: 0; }
.detail-price { font-size: 1.35rem; font-weight: 700; color: var(--navy); }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 1.2rem 0 .6rem; }
.description { white-space: pre-line; }

/* ---------------------------------------------------------------- 표 · 탭 */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 22px; overflow-x: auto; }
.tabs a { padding: 10px 14px; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; margin-bottom: -1px; font-weight: 500; }
.tabs a.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 700; }
.tabs a:hover { text-decoration: none; color: var(--navy); }
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.table-wrap > table th, .table-wrap > table td { border-bottom-color: var(--border); }
.table-wrap > table tr:last-child td { border-bottom: 0; }
.panel .table-wrap { box-shadow: none; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: start; padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
th { color: var(--muted); font-weight: 600; font-size: .84rem; white-space: nowrap; background: var(--surface); }
.table-wrap tbody tr:nth-child(even) td { background: color-mix(in srgb, var(--band) 60%, transparent); }
tbody tr:hover td { background: var(--band); }
td.num { text-align: end; font-variant-numeric: tabular-nums; white-space: nowrap; }
.thumb { width: 40px; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 2px; display: block; border: 1px solid var(--border); box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }

.error-page { text-align: center; padding: 4rem 0; }
.error-code { font-family: var(--serif); font-size: 3.2rem; font-weight: 700; color: var(--muted); margin: 0; }

/* ---------------------------------------------------------------- 관리자: 왼쪽 메뉴 (admin/_layout.html) */
body.admin-page main.container { max-width: 1320px; }
.admin-shell { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 28px; align-items: start; margin-top: 1.6rem; }
.admin-side { position: sticky; top: 84px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 8px 0; }
.admin-side h2 { font-size: .75rem; letter-spacing: .12em; color: var(--muted); padding: 8px 18px 6px; margin: 0; border: 0; }
.admin-side a { display: block; padding: 9px 18px; color: var(--muted); border-inline-start: 3px solid transparent; font-weight: 500; }
.admin-side a:hover { background: var(--band); color: var(--text); text-decoration: none; }
.admin-side a.active { color: var(--navy); background: var(--bg); border-inline-start-color: var(--navy); font-weight: 700; }
.admin-main > h1:first-child, .admin-main > h2:first-child { margin-top: 0; }
@media (max-width: 860px) {
  .admin-shell { grid-template-columns: 1fr; gap: 16px; margin-top: 1rem; }
  .admin-side { position: static; display: flex; overflow-x: auto; padding: 0; }
  .admin-side h2 { display: none; }
  .admin-side a { border-inline-start: 0; border-bottom: 2px solid transparent; white-space: nowrap; padding: 10px 14px; }
  .admin-side a.active { border-bottom-color: var(--navy); }
}

/* 관리자: 덜컥이 묶음 */
.dk-set { border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; margin-bottom: 12px; background: var(--surface); }
.dk-set form { margin: 6px 0; }
.dk-set label.small { display: flex; flex-direction: column; gap: 4px; }
.check-list { display: flex; flex-direction: column; gap: 6px; margin: 8px 0; }

/* ---------------------------------------------------------------- 검사·설문 (LMS) */
.task-items { display: flex; flex-direction: column; gap: 14px; padding-inline-start: 1.4em; }
.task-items textarea { width: 100%; }
.task-items .scale { margin-top: 6px; }
.matrix th, .matrix td { text-align: center; padding: 6px 8px; }
.matrix th:first-child, .matrix td:first-child { text-align: start; white-space: nowrap; }
/* 좋아짐·나빠짐: 색만으로 알리지 않도록 ▲▼ 기호를 함께 (뜻을 따른다: 체크가 줄어도 좋아지면 good) */
b.good { color: var(--success-text); }
b.bad { color: var(--error-text); }
td.num b.good::before { content: "▲ "; font-size: .75em; }
td.num b.bad::before { content: "▼ "; font-size: .75em; }
.task-items .vocab-word { font-size: 1.1rem; }
.grade-item { border: 1px solid var(--border); border-radius: var(--radius); margin: 0 0 14px; padding: 8px 12px; min-width: 0; background: var(--surface); }
.grade-marks { white-space: nowrap; }
.grade-marks .check { display: inline-flex; margin-inline-end: 10px; }
.grade-item td:first-child { white-space: nowrap; }
.grade-item td:nth-child(2) { min-width: 8em; width: 100%; }

/* 학습일지 */
.journal { padding-inline-start: 0; list-style: none; margin: 0; display: flex; flex-direction: column; gap: 14px; }
.journal > li { border-top: 1px solid var(--border); padding-top: 12px; }
.journal-head { display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: baseline; margin-bottom: 6px; }
.journal .stack { max-width: none; }
.pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.nowrap { white-space: nowrap; }
.skip-list { padding-inline-start: 18px; display: flex; flex-direction: column; gap: 8px; }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { padding: 6px 10px; border-inline-start: 3px solid var(--border); margin-bottom: 4px; overflow-wrap: anywhere; }
.timeline li.play_start { border-inline-start-color: var(--label); }
.timeline li.chapter_open { background: var(--band); }
.timeline li.skip { background: var(--error-bg); border-inline-start-color: var(--error-text); }
.timeline mark { background: color-mix(in srgb, var(--highlight) 55%, transparent); color: inherit; font-weight: 700; padding: 0 2px; border-radius: 2px; }

/* 수업 자료 */
.material { border-top: 1px solid var(--border); padding: 14px 0; }
.material-head { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.material .stack { max-width: none; }
/* 코드 목록 (교사·관리자: 만든 직후 한 번만 보여 준다, 인쇄용) */
.code-sheet { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); margin: 16px 0; }
.code-card { border: 1px dashed #9aa3b5; border-radius: 10px; padding: 14px 16px; background: #fff; color: #1f2937; break-inside: avoid; }
.code-card b { display: block; font-size: 1.05rem; }
.code-card code { display: block; margin-top: 6px; font-size: 1.25rem; letter-spacing: .12em; background: none; border: 0; padding: 0; }
.code-card small { display: block; margin-top: 6px; color: #5b6474; }
@media print {
  .site-header, .site-footer, .tabbar, .admin-side, .no-print, .flash { display: none !important; }
  .code-sheet { grid-template-columns: repeat(2, 1fr); }
}
