/* MindMap Studio — 사이트 공통 스타일 (정보 페이지·헤더·푸터·쿠키 배너) */
:root {
  --bg-page: #f5f7fb;
  --bg-card: #ffffff;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-soft: #94a3b8;
  --border: #e2e8f0;
  --accent: #3155ff;
  --accent-soft: #eef2ff;
  --shadow: 0 12px 32px rgba(15, 23, 42, 0.06);
  --radius-lg: 24px;
  --radius-md: 14px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body {
  margin: 0;
  padding: 0;
  font-family: Arial, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif;
  background: var(--bg-page);
  color: var(--text-main);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
body { min-height: 100vh; display: flex; flex-direction: column; }
.page, .contact-shell, .animal-shell { flex: 1; }
/* index.html (full-screen app)에서는 .app이 flex 레이아웃을 점유 */
body:has(.app) { min-height: 0; display: block; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ===== Header / Navigation ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 12px;
}
.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 17px;
  color: var(--text-main);
}
.site-brand:hover { text-decoration: none; }
.brand-icon { font-size: 22px; }
.site-nav {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.site-nav a {
  padding: 8px 12px;
  border-radius: 10px;
  color: #334155;
  font-size: 14px;
  font-weight: 600;
  transition: background .15s ease, color .15s ease;
}
.site-nav a:hover { background: var(--accent-soft); color: var(--accent); text-decoration: none; }
.site-nav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); }

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 6px 12px;
  font-size: 18px;
  cursor: pointer;
  color: var(--text-main);
}

@media (max-width: 760px) {
  .nav-toggle { display: inline-block; }
  .site-nav {
    width: 100%;
    flex-direction: column;
    gap: 2px;
    display: none;
  }
  .site-nav.open { display: flex; }
  .site-nav a { width: 100%; }
}

/* ===== Page wrappers ===== */
.page {
  max-width: 880px;
  margin: 0 auto;
  padding: 48px 24px 64px;
}
.page-center {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===== Hero (about) ===== */
.hero {
  text-align: center;
  padding: 32px 0 16px;
}
.hero h1 {
  font-size: clamp(28px, 4vw, 40px);
  margin: 8px 0 12px;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.hero-desc {
  color: var(--text-muted);
  font-size: 16px;
  max-width: 640px;
  margin: 0 auto 24px;
}
.hero-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}
.cta {
  display: inline-block;
  padding: 12px 22px;
  border-radius: var(--radius-md);
  background: white;
  color: var(--text-main);
  border: 1px solid var(--border);
  font-weight: 700;
  font-size: 15px;
  transition: transform .08s ease, background .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.cta:hover { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); text-decoration: none; }
.cta.primary {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
  box-shadow: 0 8px 18px rgba(49, 85, 255, 0.18);
}
.cta.primary:hover { background: #2745df; color: white; border-color: #2745df; }

.tiny-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-soft);
  margin: 0;
}

/* ===== Content ===== */
.content { margin-top: 24px; }
.content h2 {
  margin-top: 40px;
  margin-bottom: 12px;
  font-size: 22px;
  font-weight: 800;
}
.content p { color: #334155; }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 16px;
}
.feature {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow);
}
.feature-icon { font-size: 28px; margin-bottom: 8px; }
.feature h3 { margin: 0 0 6px; font-size: 16px; font-weight: 800; }
.feature p { margin: 0; font-size: 14px; color: var(--text-muted); line-height: 1.6; }

.audience-list, .principles {
  padding-left: 20px;
}
.audience-list li, .principles li { margin-bottom: 8px; color: #334155; }

/* ===== Documents (privacy / terms / guide) ===== */
.doc {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px clamp(20px, 4vw, 44px);
  box-shadow: var(--shadow);
}
.doc-head { margin-bottom: 20px; }
.doc-head h1 {
  margin: 6px 0 4px;
  font-size: clamp(24px, 3.5vw, 32px);
  font-weight: 800;
  letter-spacing: -0.01em;
}
.doc-updated {
  color: var(--text-soft);
  font-size: 13px;
  margin: 0;
}
.doc section { margin-top: 28px; }
.doc h2 {
  font-size: 18px;
  font-weight: 800;
  margin: 0 0 10px;
  color: var(--text-main);
}
.doc h3 {
  font-size: 15px;
  font-weight: 700;
  margin: 16px 0 6px;
  color: #334155;
}
.doc p { margin: 0 0 10px; color: #334155; }
.doc ul, .doc ol { margin: 0 0 10px 0; padding-left: 22px; color: #334155; }
.doc li { margin-bottom: 4px; }
.doc-footer-note {
  margin-top: 32px;
  padding-top: 18px;
  border-top: 1px dashed var(--border);
  color: var(--text-muted);
  font-size: 13px;
}

/* TOC */
.toc {
  background: var(--accent-soft);
  border: 1px solid #dbe5ff;
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin: 24px 0 8px;
}
.toc strong { display: block; margin-bottom: 6px; font-size: 14px; }
.toc ol { margin: 0; padding-left: 18px; }
.toc li { margin-bottom: 4px; font-size: 14px; }

/* Keyboard table */
.kbd-table {
  width: 100%;
  border-collapse: collapse;
  margin: 14px 0;
  font-size: 14px;
}
.kbd-table th, .kbd-table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}
.kbd-table th { background: #f8fafc; font-weight: 700; }
kbd {
  display: inline-block;
  padding: 2px 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  background: white;
  border: 1px solid var(--border);
  border-bottom-width: 2px;
  border-radius: 6px;
  color: #334155;
}

.tip-list { padding-left: 20px; }
.tip-list li { margin-bottom: 8px; }

details {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 8px;
}
details summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--text-main);
}
details[open] { background: white; }
details p { margin-top: 8px; color: var(--text-muted); }

.cta-row {
  margin-top: 32px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* ===== 404 ===== */
.error-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 48px 32px;
  box-shadow: var(--shadow);
  text-align: center;
  max-width: 480px;
  width: 100%;
}
.error-code {
  font-size: 64px;
  font-weight: 900;
  letter-spacing: -0.04em;
  background: linear-gradient(135deg, #3155ff, #7c5cff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 8px;
}
.error-card h1 { font-size: 22px; margin: 0 0 8px; }
.error-card p { color: var(--text-muted); margin: 0 0 20px; }

/* ===== Footer ===== */
.site-footer {
  background: white;
  border-top: 1px solid var(--border);
  margin-top: 48px;
}
.footer-inner {
  max-width: 880px;
  margin: 0 auto;
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.footer-brand {
  margin: 0 0 4px;
  font-weight: 800;
  font-size: 16px;
}
.footer-tagline {
  margin: 0;
  color: var(--text-muted);
  font-size: 13px;
}
.footer-links {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}
.footer-links a {
  color: #334155;
  font-size: 14px;
  font-weight: 600;
}
.footer-links a:hover { color: var(--accent); }
.footer-copy {
  margin: 0;
  font-size: 12px;
  color: var(--text-soft);
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

/* ===== Cookie consent ===== */
.cookie-consent {
  position: fixed;
  bottom: 16px;
  left: 16px;
  right: 16px;
  max-width: 720px;
  margin: 0 auto;
  background: rgba(15, 23, 42, 0.96);
  color: white;
  padding: 16px 18px;
  border-radius: var(--radius-md);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.25);
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  z-index: 1000;
}
.cookie-consent[hidden] { display: none; }
.cookie-text {
  flex: 1 1 280px;
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
}
.cookie-text a { color: #93c5fd; }
.cookie-actions { display: flex; gap: 8px; }
.cookie-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: transparent;
  color: white;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 700;
  font-size: 13px;
  text-decoration: none;
}
.cookie-btn:hover { background: rgba(255, 255, 255, 0.1); text-decoration: none; }
.cookie-btn.primary {
  background: var(--accent);
  border-color: var(--accent);
}
.cookie-btn.primary:hover { background: #2745df; }

/* ===== Compact header used inside the app (index.html) ===== */
.app-bottom-strip {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.9);
  border-top: 1px solid var(--border);
  padding: 6px 14px;
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  z-index: 30;
  backdrop-filter: blur(8px);
}
[data-theme="dark"] .app-bottom-strip {
  background: rgba(15, 23, 42, 0.9);
  border-top-color: #334155;
  color: #94a3b8;
}
.app-bottom-strip a {
  color: inherit;
  text-decoration: none;
  font-weight: 600;
}
.app-bottom-strip a:hover { color: var(--accent); }
[data-theme="dark"] .app-bottom-strip a:hover { color: #93c5fd; }
