/* 태온 공통 토큰 — MBX(mbx.teamcodebridge.dev)와 같은 값을 쓴다.
 * 타이포는 작고 촘촘하게, 카드는 테두리 없이 부드러운 그림자, 모서리 8px(버튼·입력)·18px(카드),
 * 굵기는 700까지. 터미널만 실제 화면처럼 어두운 틀(LCD 제어의 미리보기와 같은 방식).
 * 글꼴: 한글·본문 Pretendard(내장), 터미널·숫자 코드는 IBM Plex Mono(내장, 칸 폭이 일정해야 해서).
 */
@font-face {
  font-family: "Pretendard";
  src: url("/p/fonts/PretendardVariable.woff2") format("woff2");
  font-weight: 45 920;
  font-display: swap;
}
@font-face { font-family: "Plex Mono"; src: url("/p/fonts/plex-mono-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url("/p/fonts/plex-mono-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url("/p/fonts/plex-mono-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }

:root {
  /* MBX 파랑 */
  --blue: #0969da;
  --blue-hover: #0051ae;
  --blue-soft: #e7effb;
  --blue-line: #9ec4ff;
  --blue-on-dark: #58a6ff;
  /* MBX 중성 회색(푸른기) */
  --bg: #f7f9ff;
  --panel: #ffffff;
  --panel-2: #ebeef5;
  --line: #e0e2e9;
  --line-strong: #c2c6d6;
  --text: #181c21;
  --muted: #424753;
  --faint: #727785;
  --warn: #9a6700;
  --warn-soft: #fff4d6;
  --danger: #cf222e;
  --danger-soft: #ffebe9;
  --success: #1a7f37;
  --success-dot: #2da44e;
  /* 터미널 틀 */
  --screen: #0f1216;
  --screen-2: #1a1e24;
  --screen-text: #d6dbe3;

  --radius: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --shadow-1: 0 1px 2px rgba(15, 23, 42, 0.05), 0 8px 24px rgba(15, 23, 42, 0.045);
  --shadow-2: 0 2px 6px rgba(15, 23, 42, 0.06), 0 14px 34px rgba(15, 23, 42, 0.09);

  --sans: "Pretendard", -apple-system, BlinkMacSystemFont, system-ui, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif;
  --mono: "Plex Mono", "D2Coding", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 14px/1.5 var(--sans);
  letter-spacing: -0.1px;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p { margin: 0; }
button, input { font: inherit; color: inherit; letter-spacing: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }

/* ---- 공통 부품 ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 36px; padding: 0 14px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-sm);
  cursor: pointer; white-space: nowrap; font-weight: 600; color: var(--text);
}
.btn:hover:not(:disabled) { background: var(--bg); border-color: var(--line-strong); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn.primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn.primary:hover:not(:disabled) { background: var(--blue-hover); border-color: var(--blue-hover); }
.btn.danger { color: var(--danger); border-color: #f5c6ca; }
.btn.danger:hover:not(:disabled) { background: var(--danger-soft); border-color: #f5c6ca; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover:not(:disabled) { background: var(--panel-2); border-color: transparent; }
.btn.small { min-height: 30px; padding: 0 10px; font-size: 12.5px; }
.btn.block { width: 100%; }
.btn.on, .btn[aria-pressed="true"] { background: var(--blue-soft); border-color: var(--blue-line); color: var(--blue); }

.card { background: var(--panel); border-radius: var(--radius); box-shadow: var(--shadow-1); padding: 20px; }
.card > h2 { font-size: 15px; font-weight: 700; margin-bottom: 12px; }

.badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 1px 8px;
  font-size: 12px; font-weight: 600; border-radius: 4px; white-space: nowrap;
  background: var(--panel-2); color: var(--muted);
}
.badge.info { background: var(--blue-soft); color: var(--blue); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.danger { background: var(--danger-soft); color: var(--danger); }

.notice { display: flex; gap: 8px; padding: 11px 14px; border-radius: 10px; font-size: 13px; line-height: 1.5; }
.notice.info { background: var(--blue-soft); color: var(--blue-hover); }
.notice.danger { background: var(--danger-soft); color: #a40e26; }
.notice.plain { background: var(--panel-2); color: var(--muted); }

kbd {
  font-family: var(--mono); font-size: 0.85em; font-weight: 500;
  border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 4px;
  padding: 0 5px; background: var(--panel); color: var(--text); white-space: nowrap;
}

/* 태온 표시: 파란 사각 안의 터미널 프롬프트 */
.mark { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: var(--blue); color: #fff; flex: none; }
.mark svg { display: block; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
