:root {
  --brown-dark: #3A1F08;
  --brown-mid:  #8B5E2A;
  --gold:       #c8921e;
  --parchment:  #f2e4b4;
  --parchment-2:#e4d09a;
  --ink:        #3A1F08;
  --muted:      #6b4e2a;
  --accent:     #2a7a22;
  --danger:     #8b2020;
}

* {
  box-sizing: border-box;
}

/* ── Forest background ── */
body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background-color: #0d1f0a;
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.18)),
    url('/forest_background.png');
  background-size: cover;
  background-position: center center;
  background-attachment: scroll;
  background-repeat: no-repeat;
}

/* ── Header banner ── */
.site-header {
  background: linear-gradient(180deg, #2a1200 0%, #5a2e0a 50%, #3a1a04 100%);
  border-bottom: 2px solid var(--gold);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6), 0 2px 0 rgba(200, 146, 30, 0.3);
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
}

.site-header h1 {
  margin: 0;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(1.5rem, 5vw, 1.8rem);
  font-weight: bold;
  color: #fff;
  letter-spacing: 0.5px;
  text-shadow: 1px 2px 4px #3A1F08, 0 0 18px rgba(58,31,8,0.6);
  line-height: 1.1;
}

.site-header p {
  margin: 4px 0 0;
  font-family: 'Segoe UI', system-ui, sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.92);
  letter-spacing: 0.5px;
  text-shadow: 1px 1px 6px #3A1F08;
}

/* ── Page layout ── */
.page {
  max-width: 860px;
  margin: 0 auto;
  padding: 28px 18px 48px;
}

/* ── Parchment card ── */
.hero {
  padding: 24px 24px 20px;
  border-radius: 18px;
  background: linear-gradient(150deg, var(--parchment) 0%, var(--parchment-2) 100%);
  border: 2px solid var(--brown-mid);
  box-shadow:
    0 0 0 1px rgba(200, 146, 30, 0.35),
    0 8px 40px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.hero h1 {
  margin: 14px 0 8px;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(1.5rem, 3vw, 2rem);
  line-height: 1.2;
  color: var(--brown-dark);
  text-shadow: 0 1px 2px rgba(255,255,255,0.4);
}

/* ── Brand tile row ── */
.brand-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tile {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--brown-dark);
  background-image: url('/tile.png');
  background-size: cover;
  background-position: center;
  border: 2px solid var(--brown-mid);
  box-shadow:
    0 3px 8px rgba(58, 31, 8, 0.45),
    inset 0 1px 0 rgba(255,255,255,0.3);
  text-shadow: 0 1px 1px rgba(255,255,255,0.35);
  letter-spacing: 0.5px;
}

/* ── Subtitle ── */
.subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.55;
}

/* ── Action rows ── */
.actions {
  margin-top: 20px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* ── Buttons ── */
button,
.button {
  border: none;
  border-radius: 10px;
  padding: 11px 18px;
  font-family: 'Segoe UI', system-ui, sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: filter 0.15s ease, transform 0.1s ease;
  letter-spacing: 0.2px;
}

button:hover:not(:disabled),
.button:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

button:active:not(:disabled),
.button:active {
  transform: translateY(0);
  filter: brightness(0.92);
}

button:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

/* Green — positive / confirm */
.primary {
  color: #fff;
  background: linear-gradient(145deg, #34923a 0%, #227028 100%);
  border: 1px solid #1a5820;
  box-shadow: 0 3px 10px rgba(20, 80, 20, 0.45), inset 0 1px 0 rgba(255,255,255,0.2);
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

/* Parchment/gold — neutral navigation */
.secondary {
  color: var(--brown-dark);
  background: linear-gradient(145deg, var(--parchment) 0%, var(--parchment-2) 100%);
  border: 1.5px solid var(--brown-mid);
  box-shadow: 0 2px 8px rgba(58, 31, 8, 0.22), inset 0 1px 0 rgba(255,255,255,0.5);
}

/* Red — destructive */
.danger {
  color: #fff;
  background: linear-gradient(145deg, #b84040 0%, #8a2020 100%);
  border: 1px solid #6e1818;
  box-shadow: 0 3px 10px rgba(100, 20, 20, 0.45), inset 0 1px 0 rgba(255,255,255,0.18);
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

/* ── Panel (inner box within card) ── */
.panel {
  margin-top: 18px;
  padding: 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid rgba(139, 94, 42, 0.25);
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.06);
}

/* ── Form elements ── */
label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--brown-dark);
}

input {
  width: 100%;
  padding: 11px 14px;
  border-radius: 9px;
  border: 1.5px solid var(--brown-mid);
  font-family: 'Segoe UI', system-ui, sans-serif;
  font-size: 0.97rem;
  color: var(--brown-dark);
  background: rgba(255, 255, 255, 0.75);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  outline: none;
}

input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(200, 146, 30, 0.22);
  background: rgba(255, 255, 255, 0.9);
}

/* ── Button row ── */
.row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

/* ── Status messages ── */
.status {
  margin-top: 12px;
  min-height: 20px;
  font-size: 0.91rem;
  font-weight: 700;
  border-radius: 8px;
}

.status:not(:empty) {
  padding: 9px 12px;
}

.status.ok {
  color: #145c3b;
  background: rgba(34, 120, 50, 0.15);
  border: 1px solid rgba(34, 120, 50, 0.35);
}

.status.warn {
  color: #7a4e10;
  background: rgba(200, 140, 30, 0.15);
  border: 1px solid rgba(200, 140, 30, 0.35);
}

.status.err {
  color: #8b1f1f;
  background: rgba(160, 40, 40, 0.12);
  border: 1px solid rgba(160, 40, 40, 0.3);
}

/* ── Small helper text ── */
.small {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
  margin: 8px 0 0;
}

/* ── Footer ── */
footer {
  margin-top: 20px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.85rem;
  text-align: center;
  line-height: 1.5;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}
