:root {
  --bg: #F5F2EA;
  --panel: #FAF8F2;
  --ink: #1a1a1a;
  --muted: #888;
  --soft: #e8e4d8;
  --line: #d0ccc0;
  --white: #fff;
  --danger: #c0392b;
  --success: #27ae60;
  --accent: #FF8C42;
  --shadow: 0 8px 32px rgba(0,0,0,0.12);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { min-height: 100%; }
body {
  font-family: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.7;
  letter-spacing: -0.01em;
  min-height: 100vh;
}
button, input, textarea, select { font-family: inherit; }
button { cursor: pointer; }
a { color: inherit; }

.hidden { display: none !important; }
.loading { color: var(--muted); font-size: 14px; padding: 40px 0; text-align: center; }
.error { color: var(--danger); font-size: 13px; margin-bottom: 12px; }
.success { color: var(--success); font-size: 13px; margin-bottom: 12px; }
.help-text { font-size: 12px; color: var(--muted); margin-top: -8px; margin-bottom: 12px; }

.btn {
  padding: 10px 18px;
  border-radius: 2px;
  font-size: 13px;
  cursor: pointer;
  border: none;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.btn-primary, .btn { background: var(--ink); color: var(--bg); }
.btn-primary:hover, .btn:hover { background: #333; }
.btn-ghost, .btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn-ghost:hover, .btn.ghost:hover { background: #f0ece0; }
.btn.danger, .btn-danger { background: var(--danger); color: var(--bg); }
.btn.danger:hover, .btn-danger:hover { background: #a83224; }
.btn.small, .btn-small { padding: 6px 12px; font-size: 12px; }

.modal-bg {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-bg.open { display: flex; }
.modal {
  background: var(--panel);
  padding: 32px;
  border-radius: 4px;
  max-width: 460px;
  width: 100%;
}
.modal h3 { font-size: 18px; margin-bottom: 8px; font-weight: 600; }
.modal .modal-desc { font-size: 13px; color: var(--muted); margin-bottom: 20px; }
.modal input, .modal textarea {
  width: 100%;
  padding: 10px 14px;
  font-size: 14px;
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: 2px;
  margin-bottom: 12px;
  outline: none;
}
.modal input:focus, .modal textarea:focus { border-color: var(--ink); }
.modal textarea { min-height: 120px; resize: vertical; line-height: 1.6; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; }

.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: var(--bg);
  padding: 12px 24px;
  border-radius: 4px;
  font-size: 14px;
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.toast.show { opacity: 1; }
