:root {
  color-scheme: light;
  --font: "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", "Noto Sans CJK KR", system-ui, sans-serif;
  --bg: #f4f5f7;
  --surface: #ffffff;
  --text: #15171c;
  --muted: #586070;
  --line: #dde1e8;
  --primary: #1d5fd1;
  --primary-hover: #174da9;
  --primary-ink: #ffffff;
  --rec: #c8231a;
  --ok: #10734f;
  --warn: #9a4a00;
  --warn-bg: #fff2e0;
  --pause: #4a5464;
  --radius: 12px;
  --shadow: 0 1px 2px rgb(16 24 40 / 6%), 0 1px 3px rgb(16 24 40 / 10%);
  --t-start: #586070;
  --t-rules: #1d5fd1;
  --t-play: #10734f;
  --t-done: #7a3db8;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }

button, .btn {
  font: inherit;
  font-weight: 600;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
button:hover, .btn:hover { background: #eef1f5; }
button:active, .btn:active { transform: translateY(1px); }
button:focus-visible, .btn:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid #8fb4ff;
  outline-offset: 2px;
}
button:disabled { opacity: 0.5; cursor: not-allowed; }
button.primary, .btn.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
button.primary:hover, .btn.primary:hover { background: var(--primary-hover); }
button.danger { color: var(--rec); }

input, select {
  font: inherit;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid #c4cad4;
  background: var(--surface);
  color: var(--text);
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.tag {
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 999px;
  color: #fff;
  background: var(--t-start);
  white-space: nowrap;
}
.tag[data-tag="규칙 생김"] { background: var(--t-rules); }
.tag[data-tag="플레이 가능"] { background: var(--t-play); }
.tag[data-tag="완성"] { background: var(--t-done); }
.tag:empty { display: none; }

.muted { color: var(--muted); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

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