/* 베어트리 방탈출 — 공통 스타일
   팔레트: 소나무(pine) · 이끼(moss) · 꿀(honey) · 나무껍질(bark) · 안개(mist) */
:root {
  --bg: #f3f5f0;
  --surface: #ffffff;
  --surface-2: #e8ede4;
  --ink: #17231b;
  --ink-2: #4b5a4f;
  --line: #d3dccf;
  --pine: #1f4a33;
  --pine-ink: #ffffff;
  --moss: #6b8f55;
  --honey: #d99a14;
  --honey-soft: #fbefd0;
  --honey-ink: #3b2a08;
  --bark: #4a3426;
  --ok: #2f7d4a;
  --ok-soft: #dcefe2;
  --warn: #b7791f;
  --warn-soft: #fcefd6;
  --bad: #b3372b;
  --bad-soft: #f8dfdb;
  --shadow: 0 1px 2px rgb(23 35 27 / 0.06), 0 6px 20px rgb(23 35 27 / 0.06);
  --radius: 14px;
  --font-display: "Black Han Sans", "Noto Sans KR", "Apple SD Gothic Neo", sans-serif;
  --font-body: "IBM Plex Sans KR", "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1511; --surface: #16211a; --surface-2: #1d2b22; --ink: #e6eee7; --ink-2: #a3b3a7;
    --line: #2b3b30; --pine: #3f8a5f; --pine-ink: #06120a; --moss: #8fb877; --honey: #f0b43a;
    --honey-soft: #33280f; --honey-ink: #fbe7b8; --bark: #c9a58a; --ok: #5cc184; --ok-soft: #173424;
    --warn: #f0b43a; --warn-soft: #33280f; --bad: #f07a6c; --bad-soft: #3a1b17;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.4); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0e1511; --surface: #16211a; --surface-2: #1d2b22; --ink: #e6eee7; --ink-2: #a3b3a7;
  --line: #2b3b30; --pine: #3f8a5f; --pine-ink: #06120a; --moss: #8fb877; --honey: #f0b43a;
  --honey-soft: #33280f; --honey-ink: #fbe7b8; --bark: #c9a58a; --ok: #5cc184; --ok-soft: #173424;
  --warn: #f0b43a; --warn-soft: #33280f; --bad: #f07a6c; --bad-soft: #3a1b17;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.4); color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 var(--font-body);
  word-break: keep-all;
  overflow-wrap: anywhere;
}
[hidden] { display: none !important; }
img { max-width: 100%; display: block; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
p { margin: 0; }
button, input { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--honey); outline-offset: 2px; }

.display { font-family: var(--font-display); font-weight: 400; letter-spacing: 0.01em; }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: 0.08em; color: var(--ink-2); }
.muted { color: var(--ink-2); }

/* 버튼 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 20px; border-radius: 12px; border: 1px solid transparent;
  font-weight: 700; cursor: pointer; text-decoration: none; transition: transform .08s, filter .15s;
  white-space: nowrap; flex: none;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary { background: var(--pine); color: var(--pine-ink); }
.btn-honey { background: var(--honey); color: #241800; }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-danger { background: var(--bad); color: #fff; }
.btn-sm { min-height: 36px; padding: 0 12px; font-size: 14px; border-radius: 10px; }
.btn-block { width: 100%; }
.linkbtn { background: none; border: 0; padding: 4px 0; color: var(--ink-2); text-decoration: underline; cursor: pointer; font-size: 14px; }

.field {
  width: 100%; min-height: 52px; padding: 0 16px; border-radius: 12px;
  border: 1.5px solid var(--line); background: var(--surface); font-size: 18px;
}
.field:focus { border-color: var(--pine); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--pine) 25%, transparent); }

.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px;
  font-size: 13px; font-weight: 600; background: var(--surface-2); color: var(--ink-2); white-space: nowrap;
}
.chip-ok { background: var(--ok-soft); color: var(--ok); }
.chip-warn { background: var(--warn-soft); color: var(--warn); }
.chip-bad { background: var(--bad-soft); color: var(--bad); }
.chip-honey { background: var(--honey-soft); color: var(--honey-ink); }

.toast {
  position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%);
  max-width: min(92vw, 420px); padding: 12px 18px; border-radius: 12px; z-index: 50;
  background: var(--ink); color: var(--bg); font-weight: 600; box-shadow: var(--shadow);
}

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