/* page.css — 소설 글 화면 (page.html · story/*.html, 2026-10-31 page.html 에서 나눔) */
:root {
  /* Yuja Lemon System (Primary) — v2 Lemon Refresh */
  --yuja-lemon: #FFE135;
  --yuja-lemon-amber: #F5C800;
  --yuja-forest: #142814;
  --yuja-forest-mid: #1E3D1E;
  --yuja-lemon-tint: #FEFCE8;
  /* Yuja Brand Points */
  --leaf-green: #4CAA48;
  --leaf-green-mid: #388E3C;
  --leaf-green-light: #B8E0B5;
  --leaf-green-tint: #E8F5E7;
  /* Notion Canvas */
  --canvas: #FFFFFF;
  --canvas-cream: #F7F6F3;
  --surface: #F1F0EE;
  --surface-soft: #F8F7F5;
  --hairline: #E8E7E4;
  --hairline-strong: #D3D1CB;
  /* Text */
  --ink-deep: #1A1A1A;
  --ink: #37352F;
  --charcoal: #4B4945;
  --slate: #6F6E69;
  --steel: #9B9A97;
  /* Shapes & Shadows */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;
  --shadow-subtle: rgba(15,15,15,0.04) 0px 1px 2px;
  --shadow-card: rgba(15,15,15,0.08) 0px 4px 12px;
  --shadow-modal: rgba(15,15,15,0.14) 0px 14px 40px -8px;
  --shadow-frap: 0 0 6px rgba(0,0,0,0.15), 0 8px 12px rgba(0,0,0,0.1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--canvas-cream);
  color: var(--ink);
  letter-spacing: -0.01em;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ── Top Nav ── */
.top-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--canvas);
  border-bottom: 1px solid var(--hairline);
  height: 64px;
  display: flex;
  align-items: center;
  padding: 0 32px;
  justify-content: space-between;
}
.nav-logo {
  font-size: 18px;
  font-weight: 800;
  color: var(--yuja-forest);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-logo img {
  height: 32px;
  width: auto;
  object-fit: contain;
}
.nav-brunch {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 40px; padding: 0 16px 0 12px;
  border: 1px solid var(--hairline-strong); border-radius: var(--radius-full);
  font-size: 14px; font-weight: 700; color: var(--ink-deep); text-decoration: none;
  background: var(--canvas); transition: background 150ms ease;
}
.nav-brunch:hover { background: var(--yuja-lemon-tint); }
.brunch-ico { flex: none; display: block; }
@media (max-width: 480px) { .top-nav { padding: 0 16px; } .nav-brunch span { font-size: 13px; } }
.btn-secondary {
  padding: 8px 16px;
  border: 1px solid var(--hairline-strong);
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  transition: background 150ms ease;
}
.btn-secondary:hover { background: var(--surface); }

/* ── Loader ── */
.loader {
  width: 48px; height: 48px;
  border: 4px solid var(--surface);
  border-top-color: var(--leaf-green);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 120px auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Hero Band ── */
.hero-band {
  background: var(--canvas-cream);
  padding: 32px 32px 24px;
  text-align: center;
  position: relative;
  color: var(--ink-deep);
}
body[data-persona="student"] .hero-band { background: #B8E0B5; color: #142814; }
body[data-persona="parent"] .hero-band { background: #FFB74D; color: #142814; }
body[data-persona="teacher"] .hero-band { background: #FFE082; color: #142814; }

body[data-persona="parent"] .hero-badge {
  background: rgba(255, 255, 255, 0.5);
  border-color: rgba(255, 255, 255, 0.4);
  color: #142814;
}

.hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--canvas);
  border: 1px solid var(--hairline);
  color: var(--yuja-forest);
  font-size: 13px;
  font-weight: 700;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  margin-bottom: 24px;
  box-shadow: var(--shadow-subtle);
}

.hero-badge.cat-1 { background: #FF6B6B; color: #fff; border: none; }
.hero-badge.cat-2 { background: #FFD93D; color: var(--ink); border: none; }
.hero-badge.cat-3 { background: #6BCB77; color: #fff; border: none; }
.hero-badge.cat-4 { background: #4D96FF; color: #fff; border: none; }
.hero-badge.cat-5 { background: #9D72FF; color: #fff; border: none; }
.hero-badge.cat-6 { background: #FFA07A; color: #fff; border: none; }
.hero-badge.cat-7 { background: #B0BEC5; color: #fff; border: none; }

.hero-title {
  font-size: clamp(36px, 6vw, 56px);
  font-weight: 800;
  color: inherit;
  line-height: 1.05;
  letter-spacing: -1.5px;
  width: 100%;
  word-break: keep-all;
}

/* ── Main Layout ── */
.main-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px 80px;
}
.grid-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 32px;
  margin-top: 24px;
}
@media (max-width: 1024px) {
  .grid-layout { grid-template-columns: 1fr; }
}

/* ── Cards (Notion Base) ── */
.card-base {
  background: var(--canvas);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-card);
  transition: background-color 0.4s ease;
}
body[data-persona="student"] .card-base { background: #F7FAF7; }
body[data-persona="parent"] .card-base { background: #FFF9F5; }
body[data-persona="teacher"] .card-base { background: #FFFEF5; }

/* ── Blog Content ── */
.blog-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
}
.blog-icon {
  width: 48px; height: 48px;
  background: var(--yuja-forest);
  border-radius: var(--radius-full);
  display: flex; align-items: center; justify-content: center;
}
.blog-icon img { width: 24px; height: 24px; object-fit: contain; }
.blog-header h2 { font-size: 24px; font-weight: 700; color: var(--ink-deep); }

.blog-intro {
  font-size: 18px;
  font-weight: 500;
  color: var(--charcoal);
  line-height: 1.6;
  margin-bottom: 32px;
}

.blog-image-wrap {
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 32px;
  border: 1px solid var(--hairline);
}
.blog-image-wrap img { width: 100%; display: block; }

.blog-content {
  font-size: 16px;
  color: var(--ink);
  line-height: 1.7;
}
.blog-content p { margin-bottom: 24px; }

/* ── 가린 화 (2026-10-19, 개정 2026-10-27) — 본문 두세 줄이 흐려지다 사라지고, 그 자리에 안내와 브런치 버튼.
   아래 칸(인용·인스타·전문지식)은 실제 글을 싣지 않고 흐린 자리표시만 둔다 ── */
.sealed-teaser {
  position: relative; max-height: 6.2em; overflow: hidden; margin-bottom: 0;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 35%, transparent 100%);
          mask-image: linear-gradient(to bottom, #000 0%, #000 35%, transparent 100%);
  user-select: none; -webkit-user-select: none;
}
.sealed-teaser p { margin-bottom: 0; }
.sealed-notice { text-align: center; padding: 0 12px 32px; margin: 0 0 8px; }
.sealed-dots { display: flex; justify-content: center; gap: 10px; margin: 44px 0 36px; }
.sealed-dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--slate); opacity: .35; }
.blog-content .sealed-text { font-size: 17px; color: var(--ink-deep); line-height: 1.85; margin: 0 0 4px; font-weight: 500; }
.sealed-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 28px; margin-top: 20px;
  background: var(--yuja-lemon-amber); color: var(--on-dark);
  border-radius: var(--radius-full); font-size: 15px; font-weight: 700; text-decoration: none;
  transition: background 150ms ease;
}
.sealed-btn:hover { background: var(--yuja-lemon); }
@media (max-width: 640px) { .sealed-btn { width: 100%; } }

/* Format Text Styling */
.quote-block {
  display: block;
  margin: 32px 0;
  padding: 24px 32px;
  background: var(--surface-soft);
  border-left: 4px solid var(--leaf-green);
  color: var(--ink-deep);
  font-weight: 500;
  font-family: 'Noto Serif KR', serif;
  font-size: 18px;
  line-height: 1.8;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  position: relative;
}
.dialogue-text {
  color: var(--leaf-green-mid);
  font-family: 'Noto Serif KR', serif;
  font-weight: 600;
}
.dialogue-line {
  display: block;
  margin: 10px 0;
  padding-left: 2px;
  font-family: 'Noto Serif KR', serif;
  font-weight: 600;
  color: var(--leaf-green-mid);
  line-height: 1.8;
}
.page-speaker-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  padding: 6px 16px 6px 8px;
  background: var(--canvas);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-card);
}
.page-speaker-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}
.page-speaker-meta {
  display: flex;
  flex-direction: column;
  text-align: left;
  line-height: 1.25;
}
.page-speaker-role {
  font-size: 11px;
  font-weight: 600;
  color: var(--slate);
}
.page-speaker-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-deep);
}
.highlight-inline {
  color: var(--leaf-green-deep);
  font-weight: 700;
}
.step-marker {
  display: inline-block;
  color: var(--yuja-lemon-amber);
  font-weight: 800;
  font-size: 1.1em;
  margin-right: 4px;
}
.step-break {
  display: block;
  margin-top: 24px;
  content: "";
}
.bullet-item {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
  align-items: flex-start;
}
.bullet-dot {
  flex-shrink: 0;
  width: 6px; height: 6px;
  background: var(--leaf-green);
  border-radius: 50%;
  margin-top: 10px;
}

/* ── Blog Quote / Conclusion ── */
.blog-quote-box {
  background: var(--leaf-green-light);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin: 40px 0;
  color: var(--yuja-forest);
  font-size: 18px;
  font-weight: 500;
  line-height: 1.6;
  position: relative;
}
.blog-conclusion-box {
  background: var(--yuja-forest);
  color: #FFFFFF;
  border-radius: var(--radius-lg);
  padding: 32px;
  margin: 40px 0;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.6;
  display: flex;
  gap: 16px;
}
.conclusion-icon {
  background: var(--leaf-green);
  border-radius: var(--radius-full);
  padding: 8px;
  flex-shrink: 0;
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  color: var(--yuja-forest);
}

/* Naver Style Quote */
.naver-quote-wrap {
  display: flex;
  justify-content: center;
  margin: 64px 0 32px;
}
.naver-quote {
  position: relative;
  display: inline-block;
  padding: 0 40px;
  max-width: 80%;
  text-align: center;
}
.naver-quote::before, .naver-quote::after {
  content: '"';
  position: absolute;
  font-family: 'Noto Serif KR', serif;
  font-size: 64px;
  color: var(--leaf-green);
  line-height: 1;
}
.naver-quote::before { top: -20px; left: -10px; }
.naver-quote::after { bottom: -40px; right: -10px; }
.naver-quote-text {
  font-size: 24px;
  font-weight: 700;
  color: var(--ink-deep);
  word-break: keep-all;
  white-space: pre-line;
}

/* ── Sidebar ── */
.sidebar-section { display: flex; flex-direction: column; gap: 24px; }

.insta-card {
  background: var(--canvas);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.insta-header {
  padding: 12px 16px; border-bottom: 1px solid var(--hairline);
  display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 14px;
}
.insta-avatar {
  width: 36px; height: 36px; background: var(--surface); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 1.5px solid var(--hairline); overflow: hidden; flex-shrink: 0;
}
.insta-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.insta-teacher-link {
  display: flex; align-items: center; gap: 6px;
  text-decoration: none; color: inherit;
  cursor: pointer;
}
@keyframes blink-finger { 0%,100% { opacity: 1; } 50% { opacity: 0; } }
.insta-teacher-link .insta-click-hint {
  font-size: 16px; animation: blink-finger 1.1s ease-in-out infinite; margin-left: 2px;
}
.insta-img { width: 100%; aspect-ratio: 4/5; object-fit: contain; background: var(--surface); } /* 2026-10-01 인스타 세로 4:5 */
.insta-body { padding: 20px; }
.insta-actions { display: flex; gap: 16px; margin-bottom: 12px; }
.insta-caption { font-size: 14px; color: var(--ink); line-height: 1.6; white-space: pre-line; margin-bottom: 12px;}
.insta-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.insta-tag { color: #2563EB; font-size: 13px; font-weight: 600; }

/* Deep Green Feature Band (Knowledge) */
.knowledge-box {
  background: var(--yuja-forest);
  color: var(--on-dark);
  border-radius: var(--radius-lg);
  padding: 32px;
  position: relative;
  overflow: hidden;
}
.knowledge-box::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: var(--leaf-green);
}
.know-badge {
  font-size: 11px; font-weight: 700; color: var(--leaf-green);
  letter-spacing: 0.05em; text-transform: uppercase; margin-bottom: 8px; display: block;
}
.know-title { font-size: 18px; font-weight: 700; margin-bottom: 16px; line-height: 1.4; color: #FFFFFF; }
.know-summary { margin-bottom: 24px; }
.know-summary-line { display: flex; gap: 8px; margin-bottom: 8px; font-size: 14px; color: rgba(255,255,255,0.8); }
.know-summary-dot { flex-shrink: 0; width: 6px; height: 6px; border-radius: 50%; background: var(--leaf-green); margin-top: 8px; }

.btn-primary-full {
  width: 100%;
  height: 50px;
  background: var(--yuja-lemon-amber);
  color: var(--on-dark);
  border: none;
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: transform 150ms ease, background 150ms ease;
}
.btn-primary-full:active { transform: scale(0.95); }
.btn-primary-full:hover { background: var(--yuja-lemon); }

/* ── Floating Actions (Starbucks Frap style) ── */
.floating-actions {
  position: fixed;
  bottom: 32px;
  right: 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 90;
  align-items: flex-end;
}
.frap-btn {
  width: 50px; height: 50px;
  background: var(--canvas);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-full);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-frap);
  transition: transform 150ms ease, color 150ms ease;
  color: var(--charcoal);
  text-decoration: none;
}
.frap-btn:hover { color: var(--yuja-lemon-amber); }
.frap-btn:active { transform: scale(0.95); }

.persona-pill {
  background: var(--canvas);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-full);
  display: flex;
  flex-direction: column;
  padding: 4px;
  box-shadow: var(--shadow-frap);
}
.persona-tab {
  width: 42px; height: 42px;
  border-radius: var(--radius-full);
  border: none; background: transparent;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700; color: var(--slate);
  cursor: pointer; transition: all 150ms ease; gap: 2px;
}
.persona-tab:hover { color: var(--ink); }
.persona-tab.active {
  background: var(--yuja-forest);
  color: var(--leaf-green);
}
.persona-tab .icon { font-size: 14px; line-height: 1; }

/* Side Nav (Left/Right Sidebars) */
.side-nav-btn {
  position: fixed;
  top: 0;
  bottom: 0;
  width: calc((100vw - 1200px) / 2);
  min-width: 80px;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--yuja-lemon-amber);
  cursor: pointer;
  z-index: 80;
  transition: all 0.3s ease;
  opacity: 0;
  border: none;
  outline: none;
}
.side-nav-btn:hover {
  opacity: 1;
  background: rgba(0, 0, 0, 0.02);
}
.side-nav-btn svg {
  width: 32px;
  height: 32px;
  transition: transform 0.2s ease;
}
.side-nav-btn.left { left: 0; }
.side-nav-btn.left:hover svg { transform: translateX(-4px); }
.side-nav-btn.right { right: 0; }
.side-nav-btn.right:hover svg { transform: translateX(4px); }

@media (max-width: 640px) {
  .floating-actions { bottom: 24px; right: 16px; }
  .frap-btn { width: 44px; height: 44px; }
  .persona-tab { width: 38px; height: 38px; font-size: 9px; }
  .card-base { padding: 20px; }
  .blog-content, .blog-intro, .blog-quote-box, .blog-conclusion-box, .naver-quote-text {
    font-size: 16px !important;
  }
  .blog-quote-box, .blog-conclusion-box { padding: 20px; }
  .side-nav-btn { display: none !important; }
}

/* ── Modal ── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(15,15,15,0.4); backdrop-filter: blur(4px);
  display: none; align-items: center; justify-content: center; padding: 24px; z-index: 1000;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--canvas); border-radius: var(--radius-lg); max-width: min(98vw, 1360px); width: 100%;
  max-height: 90vh; overflow-y: auto; box-shadow: var(--shadow-modal); position: relative;
}
.modal-foot {
  display: flex; justify-content: center; align-items: center; padding: 32px 0 16px; margin-top: 16px;
}
.modal-foot-close {
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--hairline);
  background: var(--canvas); cursor: pointer; display: inline-flex; align-items: center;
  justify-content: center; color: var(--slate); transition: background 150ms ease, color 150ms ease;
}
.modal-foot-close:hover { background: var(--surface); color: var(--ink); }
.modal-header {
  position: sticky; top: 0; background: rgba(255,255,255,0.95); backdrop-filter: blur(8px);
  padding: 20px 64px 20px 32px; border-bottom: 1px solid var(--hairline); z-index: 10;
}
.modal-close {
  position: absolute; top: 14px; right: 14px; width: 36px; height: 36px;
  border-radius: var(--radius-md); border: 1px solid var(--hairline); background: var(--canvas);
  cursor: pointer; display: flex; align-items: center; justify-content: center; color: var(--slate);
}
.modal-close:hover { background: var(--surface); color: var(--ink); }
.modal-body-content { padding: 0 32px 32px; }
@media (max-width: 768px) {
  .modal-overlay { padding: 8px; }
  .modal { max-height: 94dvh; }
  .modal-header { padding: 16px 56px 16px 16px; }
  .modal-close { top: 10px; right: 10px; }
  .modal-body-content { padding: 0 16px 24px; }
}
.expertise-item { padding: 32px 0; border-bottom: 1px solid var(--hairline); width: 100%; }
.expertise-item:last-child { border-bottom: none; }
.exp-type {
  display: inline-block; padding: 4px 12px; border-radius: var(--radius-full);
  font-size: 12px; font-weight: 600; background: var(--surface); margin-bottom: 12px;
}
.exp-title { font-size: 20px; font-weight: 700; color: var(--ink-deep); margin-bottom: 4px; }
.exp-meta { font-size: 13px; color: var(--slate); margin-bottom: 16px; }
.exp-text { font-size: 16px; color: var(--ink); line-height: 1.75; margin-bottom: 14px; word-break: keep-all; width: 100%; }
.exp-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.exp-link {
  padding: 6px 14px; background: var(--surface); border-radius: var(--radius-full);
  font-size: 13px; font-weight: 600; color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; gap: 6px;
}
.exp-book { background: var(--surface-soft); border: 1px solid var(--hairline); border-radius: var(--radius-md); padding: 16px; margin-top: 16px; width: 100%; }
.exp-view-tabs { display: inline-flex; gap: 4px; padding: 3px; margin: 12px 0 16px; border: 1px solid var(--hairline); border-radius: 9999px; }
.exp-view-tab { height: 32px; padding: 0 16px; border: none; border-radius: 9999px; background: transparent; font-size: 13px; font-weight: 600; color: var(--slate); cursor: pointer; transition: all 120ms ease; }
.exp-view-tab.is-on { background: var(--ink-deep); color: #fff; }

/* Fade Anim */
.persona-fade { animation: pFade 300ms ease; }
@keyframes pFade { from{ opacity:0; transform:translateY(4px); } to{ opacity:1; transform:translateY(0); } }

/* Footer */
footer { background: var(--yuja-forest); color: rgba(255,255,255,0.7); text-align: center; padding: 40px; font-size: 14px; }
