/* DOTALK Official Brand Tokens — Self-Hosted Rounded Typography & WCAG AA Contrast */
@font-face {
  font-family: "Baloo 2";
  src: url("/brand/fonts/Baloo2-ExtraBold.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "NanumSquareRound";
  src: url("/brand/fonts/NanumSquareRoundR.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "NanumSquareRound";
  src: url("/brand/fonts/NanumSquareRoundB.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "NanumSquareRound";
  src: url("/brand/fonts/NanumSquareRoundEB.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --font-brand: "Baloo 2", "NanumSquareRound", sans-serif;
  --font-sans: "NanumSquareRound", "Hiragino Maru Gothic ProN", "Apple SD Gothic Neo", "Malgun Gothic", "Yu Gothic UI", sans-serif;
}
:root:lang(en) {
  --font-sans: "Inter", "Baloo 2", -apple-system, BlinkMacSystemFont, "Segoe UI", "NanumSquareRound", sans-serif;
}
:root:lang(ja) {
  --font-sans: "Hiragino Maru Gothic ProN", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Meiryo", "NanumSquareRound", sans-serif;
}

:root {

  /* Light Theme — Authentic Airy Borderless Pastel DOTALK (WCAG AA >= 4.5:1 text contrast) */
  --canvas: #F3F6FB;
  --surf: #FFFFFF;
  --surf-2: #F4F6FC;
  --surf-3: #EBF0F8;
  --line: rgba(24, 30, 50, 0.07);
  --line-strong: rgba(24, 30, 50, 0.14);
  --ink: #1B2030;
  --ink-2: #475068;
  --ink-3: #5A647D;

  /* Official Mint -> Lavender Identity + High-Contrast Text Accent (WCAG AA >= 4.5:1 verified) */
  --mint: #8CEEE0;
  --lavender: #BEB1FA;
  --accent-pill: #6754E0;     /* Soft airy lavender CTA — 5.3:1 contrast with #FFFFFF */
  --accent-pill-hover: #5643CF;
  --accent: #5B48D6;          /* 6.1:1 contrast for text links & active icons on white */
  --accent-hover: #4B38C2;
  --accent-soft: rgba(103, 84, 224, 0.11);
  --accent-ink: #FFFFFF;
  --accent-grad: linear-gradient(135deg, #86ECDE 0%, #9E8DF7 100%);
  --chat-room-bg: #EEF2FA;
  --danger: #C93044;
  --danger-soft: rgba(201, 48, 68, 0.10);
  --ok: #157A54;
  --ok-soft: rgba(21, 122, 84, 0.11);

  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 24px;
  --radius-pane: 26px;
  --radius-pill: 999px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --shadow-pane: 0 6px 26px rgba(0, 0, 0, 0.045);
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 10px 28px rgba(0, 0, 0, 0.11);
}

[data-mode="dark"] {
  --canvas: #121520;
  --surf: #1A1E2C;
  --surf-2: #222738;
  --surf-3: #2B3146;
  --line: rgba(255, 255, 255, 0.07);
  --line-strong: rgba(255, 255, 255, 0.15);
  --ink: #F2F5FC;
  --ink-2: #C8D1E6;
  --ink-3: #9FAAC4;

  --accent-pill: #A89AF8;
  --accent-pill-hover: #B9ADFF;
  --accent: #B4A7FA;
  --accent-hover: #C5BAFF;
  --accent-soft: rgba(180, 167, 250, 0.16);
  --accent-ink: #121520;
  --accent-grad: linear-gradient(135deg, #7BE8D8 0%, #B4A5FC 100%);
  --chat-room-bg: #141825;
  --danger: #FF788B;
  --danger-soft: rgba(255, 120, 139, 0.16);
  --ok: #5CE0AE;
  --ok-soft: rgba(92, 224, 174, 0.16);
  --shadow-pane: 0 8px 32px rgba(0, 0, 0, 0.28);
  --shadow-sm: 0 2px 12px rgba(0, 0, 0, 0.26);
  --shadow-md: 0 14px 36px rgba(0, 0, 0, 0.44);
}

*, *::before, *::after { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  font-family: var(--font-sans);
  background: var(--canvas);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button, input, textarea, select { font-family: inherit; }
:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 2px; }

.brand-lockup {
  display: inline-flex; align-items: center; gap: 3px;
  text-decoration: none; color: var(--ink); user-select: none;
}
.brand-wordmark {
  font-family: var(--font-brand);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1;
  transform: translateY(1px);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
