/* 공통: 색 변수(라이트·다크), 기본 요소, 토스트, 넓은 버튼 */
:root {
  --bg: #f3f1ea;
  --card: #fffdf8;
  --ink: #26241f;
  --muted: #6b665c;   /* 밝은 배경에서 작은 글씨도 4.5:1 이상 */
  --line: #e2ddd1;
  --accent: #2f7d62;
  --accent-ink: #fff;
  --late: #c0392b;
  --warn: #9a6a00;
  --danger: #c0392b;
  --radius: 16px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #181a17;
    --card: #222520;
    --ink: #ece9e1;
    --muted: #a19d93;
    --line: #353831;
    --accent: #5cbf98;
    --accent-ink: #10130f;
    --late: #ff7b6b;
    --warn: #e0b35a;
    --danger: #ff7b6b;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.45 system-ui, -apple-system, "Noto Sans KR", sans-serif;
  -webkit-tap-highlight-color: transparent;
}
main {
  max-width: 560px;
  margin: 0 auto;
  padding: max(10px, env(safe-area-inset-top)) 16px calc(32px + env(safe-area-inset-bottom));
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
.center { max-width: 420px; margin: 20vh auto; padding: 0 16px; text-align: center; }
code { background: var(--card); padding: 2px 6px; border-radius: 6px; }

.top { display: flex; align-items: baseline; gap: 10px; padding: 4px 2px 8px; }
.top h1 { margin: 0; font-size: 1.35rem; }
.who { color: var(--muted); font-size: .9rem; }

.toast {
  position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom));
  transform: translateX(-50%); max-width: calc(100vw - 32px);
  background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 12px;
  font-size: .95rem; z-index: 10;
}
.toast-action { background: none; border: 0; color: inherit; text-decoration: underline; font-weight: 700; margin-left: 8px; }

.wide-btn {
  width: 100%; padding: 12px; margin: 12px 0; border-radius: 14px;
  border: 1px dashed var(--line); background: transparent; font-size: .95rem; color: var(--muted);
}
.hint { margin: 8px 2px 0; color: var(--muted); font-size: .85rem; }
.ghost { background: none; border: 0; color: var(--muted); }
