* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Noto Sans KR', 'Apple SD Gothic Neo', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
  font-size: inherit;
}

.container { max-width: 1280px; margin: 0 auto; padding: 0 48px; }

/* 공통 헤더 */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.site-header .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 72px;
}
.logo { font-size: 20px; font-weight: 900; letter-spacing: -0.5px; color: var(--ink); }
.logo em { font-style: normal; color: var(--accent); }

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--chip-bg);
  border: 1px solid var(--chip-border);
  border-radius: 8px;
  padding: 0 14px;
  width: 300px;
}
.search-box svg { stroke: var(--ink-muted); flex-shrink: 0; }
.search-box input {
  border: none;
  background: none;
  outline: none;
  color: var(--ink);
  font-size: 14px;
  font-family: inherit;
  padding: 11px 0;
  width: 100%;
}
.search-box input::placeholder { color: var(--ink-muted); }

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--chip-border);
  border-radius: 8px;
  background: var(--surface);
}
.theme-toggle svg { stroke: var(--ink-soft); }
.theme-toggle:hover { border-color: var(--ink-faint); }
.theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: none; }
}

/* 공통 푸터 */
.site-footer {
  margin-top: 64px;
  border-top: 1px solid var(--border);
  padding: 28px 0;
}
.site-footer .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--ink-muted);
}
.site-footer .links { display: flex; gap: 20px; }
.site-footer .links a { color: var(--ink-muted); }

@media (max-width: 720px) {
  .container { padding: 0 20px; }
  .site-header .inner { height: auto; flex-wrap: wrap; padding: 14px 0; }
  .search-box { width: 100%; order: 3; }
  .site-footer .inner { flex-direction: column; gap: 12px; }
}
