:root {
  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-2: #edf2f9;
  --border: #dce4f0;
  --text: #0f172a;
  --muted: #526077;
  --accent: #0284c7;
  --accent-soft: rgba(2, 132, 199, 0.10);
  --emerald: #059669;
  --amber: #d97706;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
  --radius: 20px;
}
html[data-mode="night"] {
  --bg: #050a15;
  --surface: #0d1629;
  --surface-2: #15223d;
  --border: rgba(56, 189, 248, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --accent: #38bdf8;
  --accent-soft: rgba(56, 189, 248, 0.16);
  --emerald: #34d399;
  --amber: #fbbf24;
  --shadow: 0 14px 36px rgba(0, 0, 0, 0.45);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg); color: var(--text); line-height: 1.7;
  transition: background .25s, color .25s; min-height: 100vh; display: flex; flex-direction: column;
}
main { flex: 1; }
a { color: inherit; text-decoration: none; }
/* UNIFIED 1200PX CONTAINER ACROSS ALL MAIN & SUBPAGES */
.container { max-width: 1200px; width: 100%; margin: 0 auto; padding: 0 24px; }

header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(16px);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  border-bottom: 1px solid var(--border);
}
.nav-wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; min-height: 68px; flex-wrap: wrap; padding: 10px 0;
}
.brand { display: flex; align-items: center; gap: 12px; }
.logo-badge {
  padding: 6px 15px; border-radius: 10px; background: var(--accent); color: #ffffff;
  font-weight: 900; font-size: 18px; letter-spacing: 0.04em; display: inline-block;
}
.logo-italic { font-style: italic; letter-spacing: 0.05em; }
.logo-kw {
  background: #0f172a; color: #ffffff; font-weight: 900; font-size: 19px;
  -webkit-text-stroke: 0.6px #ffffff;
}
html[data-mode="night"] .logo-kw { background: #e0f2fe; color: #0f172a; -webkit-text-stroke: 0.6px #0f172a; }
.logo-kw .plus-w { color: #38bdf8; font-weight: 900; -webkit-text-stroke: 0.8px #38bdf8; }
html[data-mode="night"] .logo-kw .plus-w { color: #0284c7; -webkit-text-stroke: 0.8px #0284c7; }
.brand-sub { font-size: 12px; color: var(--muted); font-weight: 600; }

.site-tabs { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.site-tab {
  padding: 8px 15px; border-radius: 999px; font-size: 13px; font-weight: 700;
  color: var(--muted); border: 1px solid transparent; transition: all .15s;
}
.site-tab:hover { color: var(--text); background: var(--surface-2); }
.site-tab.active { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); font-weight: 800; }
.bold-w { font-weight: 900; -webkit-text-stroke: 0.4px currentColor; }

.tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dn-switch { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); }
.dn-btn { padding: 5px 12px; border-radius: 999px; border: none; background: transparent; color: var(--muted); font-size: 11px; font-weight: 800; cursor: pointer; }
.dn-btn.active { background: var(--surface); color: var(--text); box-shadow: 0 2px 8px rgba(0,0,0,0.12); }

.lang-bar { display: flex; gap: 4px; }
.lang-btn { padding: 5px 9px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--muted); font-size: 11px; font-weight: 700; cursor: pointer; }
.lang-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }

.status-strip {
  margin-top: 20px; padding: 12px 20px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow);
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px;
  font-family: ui-monospace, monospace; font-size: 12px;
}

.hero { padding: 20px 0 24px; }
.hero-card {
  position: relative; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--border); box-shadow: var(--shadow); min-height: 410px; background: #090d16;
}
.hero-card img { width: 100%; height: 100%; object-fit: cover; display: block; aspect-ratio: 16 / 9; }
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(9,13,22,0.12) 0%, rgba(9,13,22,0.90) 82%);
  display: flex; flex-direction: column; justify-content: flex-end; padding: 36px; color: #f8fafc;
}
.pill-badge { display: inline-block; width: fit-content; padding: 5px 12px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 800; margin-bottom: 12px; }
.hero-overlay h1 { font-size: clamp(24px, 3vw, 35px); font-weight: 900; line-height: 1.25; margin-bottom: 10px; }
.hero-overlay p { font-size: 14px; color: #cbd5e1; max-width: 680px; margin-bottom: 18px; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-primary { display: inline-flex; align-items: center; gap: 8px; padding: 11px 20px; border-radius: 12px; background: var(--accent); color: #fff; font-weight: 800; font-size: 13px; border: none; cursor: pointer; }
.btn-glass { display: inline-flex; align-items: center; gap: 8px; padding: 11px 18px; border-radius: 12px; background: rgba(255,255,255,0.15); backdrop-filter: blur(8px); color: #fff; border: 1px solid rgba(255,255,255,0.28); font-weight: 700; font-size: 13px; cursor: pointer; }

section { padding: 22px 0; }
.sec-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; gap: 12px; flex-wrap: wrap; }
.sec-head h2 { font-size: 20px; font-weight: 800; }
.sec-head span { font-size: 12px; color: var(--muted); }

.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 18px;
  padding: 22px; box-shadow: var(--shadow); display: flex; flex-direction: column; justify-content: space-between;
  transition: transform .15s, border-color .15s;
}
a.card:hover { transform: translateY(-2px); border-color: var(--accent); }
.card-tag { font-size: 11px; font-weight: 800; color: var(--accent); margin-bottom: 8px; display: inline-block; letter-spacing: 0.04em; }
.card h3 { font-size: 17px; font-weight: 800; margin-bottom: 8px; line-height: 1.35; }
.card p { font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.exp-track { height: 7px; border-radius: 999px; background: var(--surface-2); overflow: hidden; margin: 10px 0 6px; }
.exp-track > div { height: 100%; background: linear-gradient(90deg, var(--accent), #06b6d4); border-radius: 999px; }

/* UNIFIED 1200PX 2-COLUMN SUBPAGE PORTAL LAYOUT */
.sub-crumb {
  padding: 18px 0 10px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px;
  font-size: 13px; color: var(--muted);
}
.pill-link { padding: 6px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); font-weight: 700; font-size: 12px; color: var(--text); display: inline-block; }
.pill-link:hover { border-color: var(--accent); color: var(--accent); }
.sub-layout { display: grid; grid-template-columns: 1.68fr 1fr; gap: 24px; padding: 12px 0 36px; align-items: start; }
.article-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.article-cover img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.article-body { padding: 32px; }
.article-body h1 { font-size: clamp(23px, 2.6vw, 31px); font-weight: 900; line-height: 1.3; margin-bottom: 12px; }
.article-summary { font-size: 15px; color: var(--muted); margin-bottom: 22px; padding-bottom: 18px; border-bottom: 1px solid var(--border); }
.scene-block { padding: 20px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--border); margin-bottom: 16px; }
.scene-speaker { font-size: 12px; font-weight: 800; color: var(--accent); margin-bottom: 6px; }
.scene-text { font-size: 15px; }

.sidebar { position: sticky; top: 88px; display: flex; flex-direction: column; gap: 18px; }
.side-box { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 22px; box-shadow: var(--shadow); }
.side-box h3 { font-size: 15px; font-weight: 800; margin-bottom: 12px; }
.side-item { display: flex; justify-content: space-between; gap: 8px; padding: 10px 12px; border-radius: 10px; font-size: 13px; margin-bottom: 6px; background: var(--surface-2); }
.side-item.current { border: 1px solid var(--accent); color: var(--accent); font-weight: 800; }

/* ZERO-CLS ADSENSE CONTAINER (min-height: 280px) */
.adsense-wrapper {
  min-height: 280px; width: 100%; border-radius: 18px; border: 1px solid var(--border);
  background: var(--surface); padding: 12px; display: flex; flex-direction: column; justify-content: center; align-items: center; overflow: hidden;
}
.filter-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.filter-btn { padding: 7px 14px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--muted); font-size: 12px; font-weight: 700; cursor: pointer; }
.filter-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }

footer { border-top: 1px solid var(--border); padding: 28px 0; margin-top: 32px; font-size: 12px; color: var(--muted); }
.foot-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.foot-links { display: flex; gap: 14px; flex-wrap: wrap; }
.foot-links a:hover { color: var(--accent); }

@media (max-width: 960px) {
  .grid-4, .grid-3, .grid-2, .sub-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; }
}
