:root {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --border: #d9dce1;
  --text: #1c1f24;
  --text-muted: #6b7280;
  --accent: #2f6feb;
  --accent-contrast: #ffffff;
  --error-bg: #fdeceb;
  --error-border: #e5534b;
  --error-text: #8a1f16;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #14161a;
  --surface: #1b1e24;
  --border: #2e333c;
  --text: #e6e8eb;
  --text-muted: #9aa1ac;
  --accent: #5b9dff;
  --accent-contrast: #0b1220;
  --error-bg: #3a1c1c;
  --error-border: #e5534b;
  --error-text: #ffb4ac;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

.app {
  max-width: 1000px;
  margin: 0 auto;
  padding: 20px;
}

h1 {
  font-size: 26px;
  margin: 0 0 4px;
}

.app-description {
  color: var(--text-muted);
  margin: 0 0 20px;
  font-size: 14px;
}

.text-muted {
  color: var(--text-muted);
}
.small {
  font-size: 13px;
}

/* --- site header --- */
.site-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.site-header__brand {
  font-weight: 700;
  font-size: 15px;
  color: var(--accent);
  text-decoration: none;
  white-space: nowrap;
}
.site-header__brand:hover {
  text-decoration: underline;
}
.site-header__divider {
  color: var(--text-muted);
  font-weight: 400;
}
.site-header__title {
  font-weight: 600;
  font-size: 15px;
  color: var(--text-muted);
  white-space: nowrap;
}
.toolbar-spacer {
  flex: 1;
}

.btn,
.toggle-btn {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 13px;
  cursor: pointer;
}
.btn:hover,
.toggle-btn:hover {
  border-color: var(--accent);
}
.toggle-btn.active {
  background: var(--accent);
  color: var(--accent-contrast);
  border-color: var(--accent);
}
.icon-btn {
  padding: 6px 10px;
}

/* --- birth-date toolbar/form --- */
.toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 16px;
}
.toolbar-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.toolbar label {
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
}
.toolbar select {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 13px;
  cursor: pointer;
}
.toolbar select:focus {
  outline: none;
  border-color: var(--accent);
}

/* informational (non-error) banner */
.notice-banner {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  color: var(--text-muted);
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 16px;
  font-size: 13px;
}

/* flat bordered result panels */
.result-panel {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  padding: 16px 20px;
  margin-bottom: 16px;
}
.result-panel h2 {
  font-size: 18px;
  margin: 0 0 8px;
}
.result-panel p {
  margin: 0 0 8px;
}
.result-panel p:last-child {
  margin-bottom: 0;
}

.disclaimer {
  margin-top: 24px;
}

@media (max-width: 480px) {
  .toolbar-group {
    gap: 6px;
  }
}
