/* Patch & Pint — shared Christmas theme */
:root {
  --green: #1e5631;
  --green-dark: #123d22;
  --green-light: #2f7a47;
  --red: #b22234;
  --red-dark: #861827;
  --white: #fbf8f2;
  --black: #151515;
  --orange: #e87b1e;
  --brown: #6b4423;
  --brown-light: #8a5a33;
  --gold: #d4af37;
  --gold-light: #f3d67a;
  --buzz-yellow: #f5c518;
  --buzz-green: #2ecc40;
  --ink: #1b1b1b;
  --muted: #6d6a64;
  --card: rgba(251, 248, 242, 0.96);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --radius: 18px;
  --font: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--black);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
[hidden] { display: none !important; }

/* Festive garland along the top border */
.garland {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 46px;
  background: url("/img/garland.svg") repeat-x top left;
  background-size: auto 46px;
  pointer-events: none;
  z-index: 50;
  filter: drop-shadow(0 3px 3px rgba(0, 0, 0, 0.35));
}

/* Thin candy-stripe frame on the bottom edge */
.candy-edge {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  height: 6px;
  background: repeating-linear-gradient(-45deg, var(--red) 0 10px, var(--white) 10px 20px, var(--green) 20px 30px, var(--white) 30px 40px);
  opacity: 0.85;
  z-index: 50;
  pointer-events: none;
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 3px solid var(--green);
  outline: 2px solid rgba(178, 34, 52, 0.85);
  outline-offset: -8px;
  position: relative;
}

.btn {
  font-family: var(--font);
  font-weight: 700;
  font-size: 1rem;
  border: none;
  border-radius: 12px;
  padding: 0.8em 1.3em;
  cursor: pointer;
  background: var(--red);
  color: var(--white);
  box-shadow: 0 3px 0 var(--red-dark);
  transition: transform 0.05s ease, filter 0.15s ease, background 0.15s;
  touch-action: manipulation;
  text-decoration: none;
  display: inline-block;
}
.btn:hover { filter: brightness(1.07); }
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--red-dark); }
.btn.btn:disabled { background: #9c9a96; box-shadow: 0 3px 0 #77756f; cursor: not-allowed; filter: none; transform: none; }
.btn.green { background: var(--green); box-shadow: 0 3px 0 var(--green-dark); }
.btn.orange { background: var(--orange); box-shadow: 0 3px 0 #b85d10; }
.btn.brown { background: var(--brown); box-shadow: 0 3px 0 #4a2e17; }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px #c9c4ba; }
.btn.ghost:active { box-shadow: inset 0 0 0 2px #a9a39a; }
.btn.small { font-size: 0.85rem; padding: 0.45em 0.8em; border-radius: 9px; }
.btn.big { font-size: 1.35rem; padding: 0.9em 1.4em; }
.btn.block { display: block; width: 100%; }

input, textarea, select {
  font-family: var(--font);
  font-size: 1rem;
  border: 2px solid #cfc9bf;
  border-radius: 10px;
  padding: 0.65em 0.8em;
  background: #fff;
  color: var(--ink);
  width: 100%;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(30, 86, 49, 0.2); }

.lang-toggle {
  font-family: var(--font);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  background: rgba(21, 21, 21, 0.65);
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  padding: 0.35em 0.75em;
  cursor: pointer;
}
.lang-toggle b { color: var(--gold-light); }

.pill {
  display: inline-block;
  padding: 0.25em 0.7em;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  background: var(--green);
  color: var(--white);
}
.pill.red { background: var(--red); }
.pill.orange { background: var(--orange); }
.pill.grey { background: #8b877f; }
.pill.gold { background: var(--gold); color: var(--black); }

.muted { color: var(--muted); }
.center { text-align: center; }

/* Snowflake spinner for "Reviewing…" */
.snow-spin {
  display: inline-block;
  animation: spin 3s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pop { 0% { transform: scale(0.85); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.04); } }

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  background: var(--black);
  color: var(--white);
  padding: 0.8em 1.2em;
  border-radius: 12px;
  box-shadow: var(--shadow);
  z-index: 1000;
  font-weight: 600;
  max-width: 90vw;
  animation: pop 0.2s ease;
}
.toast.error { background: var(--red); }

/* Team-name pins on Leaflet maps */
.team-pin {
  background: var(--red);
  color: var(--white);
  font: 700 13px/1 var(--font);
  padding: 5px 8px;
  border-radius: 8px;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  transform: translate(-50%, calc(-100% - 8px));
  position: absolute;
}
.team-pin::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -6px;
  margin-left: -6px;
  border: 6px solid transparent;
  border-bottom: none;
  border-top-color: var(--red);
}
.team-dot {
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--red); border: 3px solid var(--white);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
  transform: translate(-50%, -50%);
  position: absolute;
}
.target-star {
  font-size: 34px;
  line-height: 1;
  transform: translate(-50%, -50%);
  position: absolute;
  filter: drop-shadow(0 0 6px rgba(0, 0, 0, 0.6));
}
.leaflet-div-icon.plain { background: none; border: none; }
