/* base.css — リセット・カラートークン・タイポグラフィ */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
}

:root {
  color-scheme: light dark;

  --font-sans:
    system-ui, "Segoe UI", "Hiragino Sans", "Yu Gothic UI", "Noto Sans JP", sans-serif;
  --font-mono: ui-monospace, "Cascadia Mono", Consolas, "Hiragino Sans", monospace;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.12);

  --transition-fast: 120ms ease;
  --transition-med: 200ms ease;

  /* light theme tokens */
  --bg: #f8fafc;
  --bg-elev: #ffffff;
  --bg-sunken: #eef2f6;
  --fg: #0f172a;
  --fg-muted: #475569;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --accent: #2563eb;
  --accent-fg: #ffffff;
  --danger: #dc2626;
  --success: #16a34a;
  --warning: #d97706;
}

:root.theme-dark {
  --bg: #0f172a;
  --bg-elev: #1e293b;
  --bg-sunken: #0b1220;
  --fg: #e2e8f0;
  --fg-muted: #94a3b8;
  --border: #334155;
  --border-strong: #475569;
  --accent: #60a5fa;
  --accent-fg: #0b1220;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--fg);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button {
  font: inherit;
  color: inherit;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 600;
}

p {
  margin: 0;
}

[hidden] {
  display: none !important;
}

/* a11y */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

::selection {
  background: color-mix(in srgb, var(--accent) 35%, transparent);
}
