/* ══════════════════════════════════════════════════════════════
   BLACKBOXY — Shared site stylesheet
   Used by: about, how-to, guide*, blog*, privacy, terms, contact
   (index.html has its own embedded styles for the app itself,
   but shares these same design tokens + nav/footer classes)
   ══════════════════════════════════════════════════════════════ */

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

:root {
  --bg: #101114;
  --surface: #1B1D22;
  --surface2: #22242A;
  --border: #292C33;
  --text: #EFEFF1;
  --text-mid: #8A8E98;
  --text-dim: #5E626C;
  --text-faint: #45484F;
  --neon: #7BFFB5;
  --paper: #F7F5EE;
  --paper-fold: #E3E0D4;
  --paper-line: #DDD9CC;
  --paper-tag: #ECE9DE;
}

html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Pretendard', -apple-system, sans-serif;
  line-height: 1.7;
}
a { color: inherit; }
img { max-width: 100%; }

/* ══ SITE NAV ══ */
.site-nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 28px;
  position: sticky; top: 0; z-index: 50;
  background: rgba(16,17,20,0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 12px;
}
.nav-brand {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none;
}
.nav-brand img { width: 26px; height: 26px; object-fit: contain; }
.nav-brand-pixel { font-family: 'Press Start 2P', monospace; font-size: 11px; color: var(--text); }
.nav-links {
  display: flex; align-items: center; gap: 4px; flex-wrap: wrap;
}
.nav-link {
  padding: 7px 13px;
  border-radius: 10px;
  font-size: 12.5px; font-weight: 700; color: var(--text-dim);
  text-decoration: none;
  transition: all .15s;
}
.nav-link:hover { color: var(--text); background: var(--surface); }
.nav-link.active { color: var(--neon); background: rgba(123,255,181,.08); }
.nav-cta {
  padding: 8px 16px;
  background: var(--neon); color: #14251C;
  border-radius: 12px;
  font-size: 12.5px; font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

/* ══ CONTENT PAGE LAYOUT ══ */
.content-wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 56px 24px 80px;
}
.content-wrap.wide { max-width: 1080px; }

.page-eyebrow {
  font-size: 11px; font-weight: 800; color: var(--neon);
  text-transform: uppercase; letter-spacing: 1px;
  margin-bottom: 12px;
}
.page-title {
  font-size: 34px; font-weight: 800; letter-spacing: -.6px;
  line-height: 1.3; margin-bottom: 14px;
}
.page-subtitle {
  font-size: 16px; color: var(--text-mid); font-weight: 500;
  line-height: 1.7; margin-bottom: 8px;
}
.page-meta {
  display: flex; gap: 12px; align-items: center;
  font-size: 12px; color: var(--text-faint); font-weight: 600;
  margin-top: 18px; margin-bottom: 40px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
}
.page-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--text-faint); }

/* Article typography */
.article h2 {
  font-size: 22px; font-weight: 800; letter-spacing: -.3px;
  margin: 42px 0 16px;
  color: var(--text);
}
.article h3 {
  font-size: 17px; font-weight: 800;
  margin: 28px 0 12px;
  color: var(--text);
}
.article p {
  font-size: 15.5px; color: #C7CAD1; line-height: 1.85;
  margin-bottom: 18px;
}
.article ul, .article ol {
  margin: 0 0 18px 22px;
  color: #C7CAD1; font-size: 15.5px; line-height: 1.85;
}
.article li { margin-bottom: 8px; }
.article strong { color: var(--text); font-weight: 700; }
.article a.inline-link { color: var(--neon); text-decoration: underline; text-underline-offset: 3px; }
.article hr {
  border: none; border-top: 1px solid var(--border);
  margin: 44px 0;
}
.article blockquote {
  border-left: 3px solid var(--neon);
  padding: 4px 0 4px 20px;
  margin: 24px 0;
  color: var(--text-mid); font-size: 15px; font-style: italic;
}

/* Prompt example box (paper-style, matches app cards) */
.prompt-box {
  background: var(--paper);
  border-radius: 3px 12px 12px 12px;
  padding: 18px 20px;
  margin: 22px 0;
  position: relative;
  box-shadow: 0 2px 0 rgba(0,0,0,.4), 0 6px 20px rgba(0,0,0,.25);
}
.prompt-box::before {
  content: '';
  position: absolute; top: 0; right: 0;
  width: 0; height: 0;
  border-style: solid; border-width: 0 18px 18px 0;
  border-color: transparent var(--bg) transparent transparent;
}
.prompt-box::after {
  content: '';
  position: absolute; top: 0; right: 0;
  width: 0; height: 0;
  border-style: solid; border-width: 18px 18px 0 0;
  border-color: var(--paper-fold) transparent transparent transparent;
}
.prompt-box-label {
  font-size: 9.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .6px;
  color: #A29D8E; margin-bottom: 8px;
}
.prompt-box-text {
  font-family: 'Georgia', serif; font-style: italic;
  font-size: 14px; color: #4A473F; line-height: 1.75;
  white-space: pre-wrap;
}

/* Callout box */
.callout {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-left: 3px solid var(--neon);
  border-radius: 12px;
  padding: 16px 20px;
  margin: 24px 0;
  font-size: 14px; color: var(--text-mid); line-height: 1.75;
}
.callout strong { color: var(--text); }

/* Table of contents */
.toc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 22px;
  margin: 28px 0 36px;
}
.toc-title { font-size: 11px; font-weight: 800; color: var(--text-faint); text-transform: uppercase; letter-spacing: .8px; margin-bottom: 10px; }
.toc ol { margin: 0; padding-left: 18px; }
.toc li { font-size: 13.5px; color: var(--text-mid); margin-bottom: 6px; }
.toc a { text-decoration: none; color: inherit; }
.toc a:hover { color: var(--neon); }

/* Guide/Blog index grid */
.index-intro { margin-bottom: 36px; }
.card-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px;
}
@media (max-width: 640px) { .card-grid { grid-template-columns: 1fr; } }

.post-card {
  display: block; text-decoration: none;
  background: var(--paper);
  border-radius: 3px 12px 12px 12px;
  padding: 18px 20px 16px;
  position: relative;
  transition: transform .15s;
  box-shadow: 0 2px 0 rgba(0,0,0,.4), 0 6px 20px rgba(0,0,0,.25);
}
.post-card::before {
  content: '';
  position: absolute; top: 0; right: 0;
  width: 0; height: 0;
  border-style: solid; border-width: 0 18px 18px 0;
  border-color: transparent var(--bg) transparent transparent;
}
.post-card::after {
  content: '';
  position: absolute; top: 0; right: 0;
  width: 0; height: 0;
  border-style: solid; border-width: 18px 18px 0 0;
  border-color: var(--paper-fold) transparent transparent transparent;
}
.post-card:hover { transform: translateY(-3px); }
.post-card-tag {
  display: inline-block;
  font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px;
  background: var(--paper-tag); color: #938F81;
  padding: 3px 9px; border-radius: 8px;
  margin-bottom: 10px;
}
.post-card-title {
  font-size: 15px; font-weight: 800; color: #26282E;
  line-height: 1.4; margin-bottom: 8px;
}
.post-card-desc {
  font-size: 12.5px; color: #8A867A; line-height: 1.6;
}

/* Related posts */
.related-box {
  margin-top: 52px; padding-top: 28px;
  border-top: 1px solid var(--border);
}
.related-title { font-size: 12px; font-weight: 800; color: var(--text-faint); text-transform: uppercase; letter-spacing: .8px; margin-bottom: 16px; }
.related-links { display: flex; flex-direction: column; gap: 10px; }
.related-link {
  display: flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 700; color: var(--text-mid);
  text-decoration: none; padding: 4px 0;
  transition: color .15s;
}
.related-link:hover { color: var(--neon); }
.related-link .arrow { color: var(--neon); }

/* CTA box (drive users to the app) */
.cta-box {
  margin: 48px 0 20px;
  background: linear-gradient(135deg, #1B1D22 0%, #1F2A22 100%);
  border: 1.5px solid rgba(123,255,181,.25);
  border-radius: 18px;
  padding: 26px 28px;
  text-align: center;
}
.cta-box-title { font-size: 17px; font-weight: 800; margin-bottom: 8px; }
.cta-box-sub { font-size: 13.5px; color: var(--text-mid); margin-bottom: 18px; }
.cta-box-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 11px 22px;
  background: var(--neon); color: #14251C;
  border-radius: 14px;
  font-size: 13px; font-weight: 800;
  text-decoration: none;
  box-shadow: 0 4px 0 #3A7D5A;
}

/* Legal page tweaks */
.legal-updated { font-size: 12px; color: var(--text-faint); margin-bottom: 32px; }
.article table { width: 100%; border-collapse: collapse; margin: 20px 0; font-size: 13.5px; }
.article th, .article td { border: 1px solid var(--border); padding: 10px 14px; text-align: left; color: var(--text-mid); }
.article th { background: var(--surface); color: var(--text); font-weight: 800; }

/* Contact page */
.contact-card {
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: 18px; padding: 28px;
  display: flex; align-items: center; gap: 18px;
  margin-top: 12px;
}
.contact-card img { width: 48px; height: 48px; object-fit: contain; flex-shrink: 0; }
.contact-email {
  display: inline-flex; align-items: center; gap: 7px;
  margin-top: 8px;
  padding: 9px 16px;
  background: var(--surface2); border: 2px solid var(--border);
  border-radius: 12px;
  font-size: 13px; color: var(--text); font-weight: 700;
  text-decoration: none;
}
.contact-email:hover { border-color: rgba(123,255,181,.4); color: var(--neon); }

/* ══ SHARED AD BLOCKS (sponsor banner + adsense placeholder) ══ */
.ad-slot-wrap { max-width: 1160px; margin: 40px auto 0; width: 100%; padding: 0 40px; }
.ad-banner {
  display: flex; align-items: center; gap: 16px;
  width: 100%; min-height: 84px;
  background: linear-gradient(135deg, #1B1D22 0%, #1F2A22 100%);
  border: 1.5px solid rgba(123,255,181,.25);
  border-radius: 16px; padding: 16px 22px;
  text-decoration: none; transition: all .18s;
  position: relative; overflow: hidden;
}
.ad-banner:hover { border-color: rgba(123,255,181,.5); transform: translateY(-2px); box-shadow: 0 8px 26px rgba(123,255,181,.08); }
.ad-banner-icon { width: 44px; height: 44px; flex-shrink: 0; border-radius: 12px; background: var(--surface2); display: flex; align-items: center; justify-content: center; font-size: 22px; }
.ad-banner-body { flex: 1; min-width: 0; }
.ad-banner-title { font-size: 13.5px; font-weight: 800; color: var(--text); display: flex; align-items: center; gap: 8px; }
.ad-banner-sub { font-size: 11.5px; color: var(--text-mid); font-weight: 600; margin-top: 3px; }
.ad-banner-cta { flex-shrink: 0; display: flex; align-items: center; gap: 5px; padding: 8px 16px; background: var(--neon); color: #14251C; border-radius: 12px; font-size: 12px; font-weight: 800; white-space: nowrap; }
.ad-tag { font-size: 8.5px; text-transform: uppercase; letter-spacing: .8px; background: var(--surface2); color: var(--text-faint); padding: 2px 7px; border-radius: 5px; font-weight: 800; }

.adsense-slot-wrap { max-width: 1160px; margin: 12px auto 0; width: 100%; padding: 0 40px; }
.adsense-slot {
  width: 100%; min-height: 90px;
  background: var(--surface); border: 1.5px dashed var(--border); border-radius: 14px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  color: var(--text-faint); font-size: 11px; font-weight: 700; letter-spacing: .5px;
}
.adsense-tag { font-size: 9px; text-transform: uppercase; background: var(--surface2); padding: 2px 8px; border-radius: 6px; color: var(--text-faint); }

/* ══ SITE FOOTER ══ */
.site-footer-wrap { max-width: 1160px; margin: 0 auto; width: 100%; padding: 40px 40px 50px; }
.footer-columns {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 24px;
  padding-bottom: 32px; margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
}
@media (max-width: 760px) { .footer-columns { grid-template-columns: 1fr 1fr; } }
.footer-brand-col { display: flex; align-items: flex-start; gap: 12px; }
.footer-brand-col img { width: 36px; height: 36px; object-fit: contain; flex-shrink: 0; margin-top: 2px; }
.footer-brand { font-family: 'Press Start 2P', monospace; font-size: 11px; color: var(--text-mid); margin-bottom: 8px; }
.footer-tag { font-size: 12px; color: var(--text-faint); font-weight: 600; line-height: 1.7; }
.footer-col-title { font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .6px; color: var(--text-faint); margin-bottom: 12px; }
.footer-col-links { display: flex; flex-direction: column; gap: 9px; }
.footer-col-links a { font-size: 13px; color: var(--text-mid); text-decoration: none; font-weight: 600; }
.footer-col-links a:hover { color: var(--neon); }

.footer-bottom { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.footer-copyright { font-size: 11.5px; color: var(--text-faint); font-weight: 600; }
.footer-contact-group { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.footer-contact-label { font-size: 11px; color: var(--text-faint); font-weight: 700; white-space: nowrap; }
.footer-contact {
  display: flex; align-items: center; gap: 7px; padding: 9px 15px;
  background: var(--surface); border: 2px solid var(--border); border-radius: 12px;
  font-size: 12px; color: var(--text-dim); font-weight: 700; text-decoration: none; transition: all .15s;
}
.footer-contact:hover { border-color: rgba(123,255,181,.3); color: var(--neon); }

/* ══ MOBILE (content pages) ══ */
@media (max-width: 768px) {
  /* 사이트 네비: 1행 = 로고+CTA, 2행 = 가로 스크롤 메뉴 */
  .site-nav { padding: 12px 16px; row-gap: 10px; }
  .nav-brand { flex: 1; min-width: 0; }
  .nav-brand-pixel { font-size: 10px; }
  .nav-cta { order: 2; flex-shrink: 0; padding: 7px 13px; font-size: 11.5px; }
  .site-nav .nav-links {
    order: 3;
    flex-basis: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .site-nav .nav-links::-webkit-scrollbar { display: none; }
  .site-nav .nav-link { white-space: nowrap; flex-shrink: 0; padding: 6px 11px; font-size: 12px; }

  /* 본문 */
  .content-wrap { padding: 36px 18px 60px; }
  .page-title { font-size: 26px; }
  .page-subtitle { font-size: 14.5px; }
  .article h2 { font-size: 19px; }
  .article h3 { font-size: 15.5px; }
  .article p, .article ul, .article ol { font-size: 14.5px; }
  .prompt-box { padding: 15px 16px; }
  .prompt-box-text { font-size: 13px; }
  .cta-box { padding: 22px 18px; }

  /* 광고/푸터 */
  .ad-slot-wrap, .adsense-slot-wrap { padding: 0 16px; }
  .ad-banner { padding: 14px 16px; gap: 12px; }
  .ad-banner-cta { padding: 7px 12px; font-size: 11px; }
  .site-footer-wrap { padding: 32px 18px 40px; }
  .footer-columns { gap: 20px; }
  .contact-card { flex-direction: column; align-items: flex-start; }
}
