:root {
  --bg: #fafafa;
  --surface: #ffffff;
  --text: #1b1b1b;
  --muted: #555;
  --border: #ddd;
  --accent: #1a5fb4;
  --warn-bg: #fff4e5;
  --warn-text: #8a4b00;
}

:root[data-theme="dark"] {
    --bg: #14161a;
    --surface: #1e2127;
    --text: #ececec;
    --muted: #a8adb5;
    --border: #333841;
    --accent: #7db3ff;
    --warn-bg: #3a2a10;
    --warn-text: #ffc680;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --bg: #14161a;
    --surface: #1e2127;
    --text: #ececec;
    --muted: #a8adb5;
    --border: #333841;
    --accent: #7db3ff;
    --warn-bg: #3a2a10;
    --warn-text: #ffc680;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}

a { color: var(--accent); }
[hidden] { display: none !important; }

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.brand { font-weight: 700; font-size: 1.1rem; color: var(--text); text-decoration: none; }

.theme-toggle {
  width: 40px;
  height: 40px;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 50%;
}

.theme-toggle:hover, .theme-toggle:focus-visible { border-color: var(--accent); }

main { flex: 1; width: 100%; max-width: 960px; margin: 0 auto; padding: 32px 16px 48px; }

.hero { text-align: center; padding: 24px 0 40px; }
.hero h1 { font-size: clamp(1.8rem, 5vw, 2.6rem); margin: 0 0 12px; line-height: 1.2; }
.hero p { max-width: 620px; margin: 0 auto; color: var(--muted); font-size: 1.05rem; }

h2 { font-size: 1.3rem; margin: 0 0 16px; }


.legal { max-width: 760px; }
.legal h1 { font-size: 1.8rem; margin: 8px 0 16px; }
.legal h2 { font-size: 1.1rem; margin: 24px 0 8px; }
.legal p { margin: 0 0 12px; }
.back { display: inline-block; padding: 6px 0; text-decoration: none; }
.updated { color: var(--muted); font-size: 0.85rem; margin-top: 24px; }
.notice { padding: 12px; border-radius: 8px; background: var(--warn-bg); color: var(--warn-text); }

.site-footer {
  padding: 16px;
  text-align: center;
  border-top: 1px solid var(--border);
  background: var(--surface);
  font-size: 0.85rem;
}

.site-footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 20px; }
.site-footer p { margin: 8px 0 0; color: var(--muted); }

.button {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--bg);
  font-weight: 600;
  text-decoration: none;
}

.button:hover, .button:focus-visible { opacity: 0.9; }

.app {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}

.app + .app { margin-top: 20px; }
.app-head { display: flex; align-items: center; gap: 16px; margin-bottom: 12px; }
.app-icon { font-size: 2.4rem; line-height: 1; }
.app h3 { margin: 0; font-size: 1.3rem; }
.app-tagline { margin: 2px 0 0; color: var(--muted); }
.app-features { margin: 0 0 20px; padding-left: 1.2rem; }
.app-features li { margin-bottom: 6px; }
.note { margin-top: 16px; color: var(--muted); font-size: 0.95rem; }
