@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@500;600;700;800&family=Manrope:wght@400;500;600;700&display=swap');

:root {
  --font-headline: "Plus Jakarta Sans", "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  --font-body: "Manrope", "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  --font: var(--font-body);
  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.25rem;
  --radius-full: 9999px;
}

html[data-theme="light"] {
  --bg: #f8f9fb;
  --surface: #f8f9fb;
  --surface-lowest: #ffffff;
  --surface-low: #f3f4f6;
  --surface-container: #edeef0;
  --surface-high: #e7e8ea;
  --surface-highest: #e1e2e4;
  --surface-2: var(--surface-low);
  --text: #191c1e;
  --text-muted: #4a4733;
  --text-dim: #7c7760;
  --primary: #695f00;
  --primary-dim: #dbc900;
  --bubble-me: #ffeb33;
  --bubble-me-text: #201c00;
  --bubble-other: #ffffff;
  --secondary-container: #d0e5f8;
  --accent: #ffeb33;
  --danger: #ba1a1a;
  --outline: #cdc7ac;
  --border: transparent;
  --shadow: 0 12px 32px rgba(25, 28, 30, 0.06);
  --shadow-ambient: var(--shadow);
  --border-ghost: rgba(124, 119, 96, 0.15);
}

html[data-theme="dark"] {
  --bg: #15171a;
  --surface: #15171a;
  --surface-lowest: #23262a;
  --surface-low: #1c1e22;
  --surface-container: #23262a;
  --surface-high: #2a2d31;
  --surface-highest: #33363b;
  --surface-2: var(--surface-low);
  --text: #e5e7ea;
  --text-muted: #b5b29a;
  --text-dim: #8b8876;
  --primary: #dbc900;
  --primary-dim: #fff46b;
  --bubble-me: #ffeb33;
  --bubble-me-text: #201c00;
  --bubble-other: #2a2d31;
  --secondary-container: #354958;
  --accent: #ffeb33;
  --danger: #f87171;
  --outline: #4a4733;
  --border: transparent;
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  --shadow-ambient: var(--shadow);
  --border-ghost: rgba(220, 220, 220, 0.08);
}

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

html, body { min-height: 100dvh; max-width: 100%; overflow-x: hidden; }

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg, video, canvas { max-width: 100%; height: auto; }

h1, h2, h3, h4 {
  font-family: var(--font-headline);
  font-weight: 700;
  letter-spacing: -0.015em;
  margin: 0;
}

button { font-family: inherit; cursor: pointer; color: inherit; }
a { color: inherit; }

.icon-btn {
  background: transparent;
  border: 0;
  width: 40px; height: 40px;
  display: inline-grid;
  place-items: center;
  font-size: 1.1rem;
  color: var(--text);
  border-radius: var(--radius-full);
  transition: background .15s;
}
.icon-btn:hover { background: var(--surface-container); }

.btn-primary {
  background: #ffeb33;
  color: #201c00;
  border: 0;
  padding: 12px 22px;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-family: var(--font-headline);
  box-shadow: var(--shadow-ambient);
  transition: transform .08s, filter .15s;
}
.btn-primary:hover { filter: brightness(0.97); transform: translateY(-1px); }
.btn-primary:active { transform: scale(0.98); }

.theme-toggle-fixed {
  position: fixed;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  background: var(--surface-lowest);
  box-shadow: var(--shadow-ambient);
}
.theme-toggle-fixed:hover { background: var(--surface-container); }
/* 관리자 페이지: 전역 fixed 토글 숨김 (admin 토글은 상단바 내 별도 버튼) */
body:has(.admin-v2) .theme-toggle-fixed { display: none; }
.invisible { visibility: hidden; pointer-events: none; }

.btn-ghost {
  background: var(--surface-container);
  color: var(--text);
  border: 0;
  padding: 10px 18px;
  border-radius: var(--radius-full);
  font-weight: 600;
}
.btn-ghost:hover { background: var(--surface-high); }

input, textarea, select { font-family: inherit; color: var(--text); }

input[type="text"], input[type="password"], input[type="date"],
input:not([type]), textarea, select {
  min-height: 48px;
  padding: 12px 16px;
  border: 0;
  border-radius: var(--radius-full);
  background: var(--surface-low);
  font-size: .95rem;
  transition: background .15s, box-shadow .15s;
}
textarea { border-radius: var(--radius-lg); min-height: auto; padding: 14px 16px; }
input:focus, textarea:focus, select:focus {
  outline: 0;
  background: var(--surface-highest);
  box-shadow: 0 0 0 2px rgba(105, 95, 0, 0.18);
}

.hidden { display: none !important; }

.pill {
  display: inline-block;
  background: var(--secondary-container);
  color: #081e2b;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.card {
  background: var(--surface-lowest);
  border-radius: var(--radius-xl);
  padding: 20px;
  margin-bottom: 16px;
}
