:root {
  --red: #7a1022;
  --red-dark: #4e0a16;
  --red-bright: #a3182f;
  --green: #14452f;
  --green-dark: #0c2e1f;
  --cream: #f6ecd6;
  --cream-dim: #e8d9b8;
  --gold: #d4af5a;
  --gold-dark: #9c7a2c;
  --ink: #2a1a14;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-title: Georgia, "Iowan Old Style", "Palatino Linotype", Palatino, "Times New Roman", serif;
  --radius: 14px;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--cream);
  background: var(--green-dark);
  min-height: 100vh;
  min-height: 100dvh;
}
h1, h2, h3 { font-family: var(--font-title); font-weight: 700; line-height: 1.2; margin: 0 0 0.5em; }
p { margin: 0 0 1em; }
img, video { max-width: 100%; }
[hidden] { display: none !important; }

:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 8px; top: -60px; background: var(--gold); color: var(--ink);
  padding: 8px 14px; border-radius: 8px; z-index: 100; font-weight: 600;
}
.skip-link:focus { top: 8px; }

.btn {
  font: inherit; font-weight: 600; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4em;
  min-height: 44px; padding: 0.55em 1.2em;
  border-radius: 999px; border: 2px solid transparent;
  background: var(--gold); color: var(--ink);
  transition: transform 0.15s, filter 0.15s;
  text-decoration: none;
}
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }
.btn-secondary { background: transparent; color: var(--cream); border-color: rgba(246, 236, 214, 0.5); }
.btn-danger { background: #b3261e; color: #fff; }
.btn-small { min-height: 36px; padding: 0.3em 0.9em; font-size: 0.9rem; }
.btn-ghost { background: transparent; color: var(--cream); border-color: transparent; text-decoration: underline; }

label { display: block; font-weight: 600; margin-bottom: 0.3em; }
input[type="text"], input[type="password"], input[type="number"], textarea, select {
  font: inherit; width: 100%; padding: 0.7em 0.9em; min-height: 44px;
  border-radius: 10px; border: 2px solid rgba(212, 175, 90, 0.5);
  background: #fffaf0; color: var(--ink);
}
textarea { resize: vertical; min-height: 6em; }
input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid var(--gold); border-color: var(--gold); }

.msg { padding: 0.7em 1em; border-radius: 10px; margin: 0.8em 0; font-weight: 500; }
.msg-error { background: #fde7e4; color: #6b0f0a; border: 1px solid #e99; }
.msg-ok { background: #e1f3e6; color: #0d3b1d; border: 1px solid #8c9; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  background: var(--cream); color: var(--ink);
  padding: 0.8em 1.3em; border-radius: 999px; box-shadow: var(--shadow);
  z-index: 200; max-width: min(92vw, 460px); text-align: center; font-weight: 600;
}

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