/* 공통 디자인 토큰 (사양 7장: 아이보리 바탕, 짙은 남색 글자, 청록 강조). 6단계에서 다듬는다. */
:root {
  --bg: #faf6ec;
  --surface: #ffffff;
  --ink: #14213d;
  --muted: #5b6478;
  --line: #e2dccb;
  --accent: #0f9d9a;
  --accent-ink: #ffffff;
  --danger: #b42318;
  --warn-bg: #fff4d6;
  --ok: #067647;
  --radius: 14px;
  --gap: 16px;
  color-scheme: light;
}

/* 고대비: 야외·밝은 실내 */
:root[data-contrast='high'] {
  --bg: #ffffff;
  --ink: #000000;
  --muted: #1f2937;
  --line: #000000;
  --accent: #006b68;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, 'Apple SD Gothic Neo', 'Malgun Gothic', 'Noto Sans KR', sans-serif;
  font-size: 17px;
  line-height: 1.45;
  -webkit-text-size-adjust: 100%;
}
h1, h2, h3 { line-height: 1.2; margin: 0 0 12px; }
h1 { font-size: 1.5rem; }
h2 { font-size: 1.2rem; }
p { margin: 0 0 12px; }
.muted { color: var(--muted); }
.hidden { display: none !important; }

.banner {
  background: var(--warn-bg);
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  padding: 6px 16px;
  font-size: 0.85rem;
  text-align: center;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--gap);
}

button, .btn {
  font: inherit;
  min-height: 56px;
  min-width: 56px;
  padding: 0 20px;
  border-radius: 12px;
  border: 2px solid var(--ink);
  background: var(--surface);
  color: var(--ink);
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
}
button:disabled { opacity: 0.45; cursor: not-allowed; }
button.primary {
  min-height: 72px;
  width: 100%;
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
  font-size: 1.15rem;
}
button[aria-pressed='true'] {
  background: var(--ink);
  color: var(--surface);
}
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

input[type='text'], input[type='password'], input[type='number'], input[inputmode], textarea, select {
  font: inherit;
  width: 100%;
  min-height: 56px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 2px solid var(--line);
  background: var(--surface);
  color: var(--ink);
}
textarea { min-height: 120px; }
label { display: block; font-weight: 700; margin-bottom: 6px; }
.error { color: var(--danger); font-weight: 700; }

.team-badge { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.team-badge .team-name { font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-icon { flex: none; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 0.85rem;
  font-weight: 700;
}
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.dot.CONNECTED { background: var(--ok); }
.dot.UNSTABLE { background: #d97706; }
.dot.DISCONNECTED { background: #9ca3af; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
