/* =============================================================================
   DM — ONE 플랫폼 디자인 토큰 (통합 표준 6절)
   강조색은 Primary 와 같은 lightness/chroma 에 hue 만 바꿔 쓴다.
   ============================================================================= */

:root {
  --bg:          oklch(98% 0.004 260);
  --text:        oklch(22% 0.01 260);
  --text-sub:    oklch(52% 0.01 260);
  --text-faint:  oklch(66% 0.01 260);
  --border:      oklch(92% 0.005 260);
  --border-soft: oklch(95% 0.004 260);
  --primary:     oklch(55% 0.14 260);
  --primary-ink: oklch(97% 0.01 260);
  --primary-soft:oklch(95% 0.03 260);
  --accent:      oklch(55% 0.14 300);   /* DM 전용 — hue 만 변경 */
  --accent-soft: oklch(95% 0.03 300);
  --danger:      oklch(55% 0.16 25);
  --mention:     oklch(48% 0.17 250);   /* 멘션 파란색 */
  --mention-bg:  oklch(94% 0.045 250);
  --mention-me:  oklch(42% 0.13 95);    /* 내가 멘션된 경우 — 더 눈에 띄게 */
  --mention-me-bg: oklch(92% 0.09 95);
  --card:        #fff;
  --hover:       oklch(96% 0.004 260);
  --msg-hover:   oklch(97.5% 0.003 260);   /* 메시지 행 호버 */
  --active:      oklch(93% 0.02 300);

  --radius-card: 14px;
  --radius-btn:  9px;
  --radius-bubble: 14px;
  --navbar-h:    54px;
  --list-w:      300px;

  --shadow-pop: 0 8px 28px oklch(22% 0.01 260 / 0.14);

  font-family: 'Noto Sans KR', system-ui, -apple-system, 'Malgun Gothic', sans-serif;
  font-size: 14px;
  color-scheme: light;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

button, input, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

.hidden { display: none !important; }

/* ---- 버튼 ---------------------------------------------------------------- */
.btn {
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: var(--radius-btn);
  padding: 7px 13px;
  cursor: pointer;
  line-height: 1.2;
  transition: background .12s, border-color .12s;
}
.btn:hover { background: var(--hover); }
.btn:disabled { opacity: .5; cursor: default; }

.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  font-weight: 700;
}
.btn-primary:hover { background: oklch(50% 0.14 260); }
.btn-primary:disabled { background: var(--primary); }

.btn-ghost {
  border: 1px solid rgba(255, 255, 255, .18);
  background: rgba(255, 255, 255, .06);
  color: #fff;
  border-radius: var(--radius-btn);
  padding: 6px 11px;
  font-size: 12px;
  cursor: pointer;
}
.btn-ghost:hover { background: rgba(255, 255, 255, .14); }

.icon-btn {
  border: 0;
  background: transparent;
  border-radius: 8px;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-sub);
  font-size: 15px;
}
.icon-btn:hover { background: var(--hover); color: var(--text); }
.icon-btn.on { color: var(--accent); }

/* ---- 입력 ---------------------------------------------------------------- */
.field {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-btn);
  padding: 8px 11px;
  background: var(--card);
  outline: none;
}
.field:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

/* ---- 토스트 -------------------------------------------------------------- */
#toast-host {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 90;
  pointer-events: none;
}
.toast {
  background: oklch(25% 0.02 260);
  color: #fff;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 13px;
  box-shadow: var(--shadow-pop);
  animation: toast-in .16s ease-out;
}
.toast.err { background: var(--danger); }
@keyframes toast-in { from { opacity: 0; transform: translateY(6px); } }
