/* Quizzard base theme — big, bold, survives beer. */
:root {
  --bg: #1b1530;
  --bg2: #261d45;
  --panel: #2f2556;
  --line: #4a3d80;
  --text: #fbf7ff;
  --muted: #b9add9;
  --accent: #ffcf3f;      /* wizard gold */
  --accent2: #7c5cff;     /* wizard purple */
  --good: #2ecc71;
  --bad: #ff4d5e;
  --warn: #ff9f1c;
  --radius: 18px;
  --font: 'Fredoka', 'Nunito', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font-family: var(--font); }
body { -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
input, textarea, select { font: inherit; color: inherit; }
a { color: var(--accent); }
.hidden { display: none !important; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: .7em 1.2em; border-radius: var(--radius); background: var(--panel); border: 2px solid var(--line);
  font-weight: 700; transition: transform .08s, filter .1s; user-select: none;
}
.btn:hover { filter: brightness(1.15); }
.btn:active { transform: scale(.96); }
.btn:disabled { opacity: .4; cursor: default; transform: none; }
.btn-primary { background: var(--accent); color: #241a00; border-color: transparent; }
.btn-purple { background: var(--accent2); border-color: transparent; }
.btn-good { background: var(--good); color: #062b14; border-color: transparent; }
.btn-bad { background: var(--bad); color: #2b0006; border-color: transparent; }
.btn-ghost { background: transparent; }

.avatar { border-radius: 50%; object-fit: cover; flex: none; background: var(--panel); border: 3px solid var(--accent2); }
.avatar-fallback { display: inline-flex; align-items: center; justify-content: center; font-weight: 800; color: var(--text); }

.field { width: 100%; padding: .7em .9em; border-radius: 14px; border: 2px solid var(--line); background: var(--bg2); outline: none; }
.field:focus { border-color: var(--accent); }

/* map pins (shared by TV, phone, admin) */
.pin { position: relative; width: var(--pin-size); height: calc(var(--pin-size) * 1.35); pointer-events: none; }
.pin-head {
  position: absolute; left: 0; top: 0; width: var(--pin-size); height: var(--pin-size); border-radius: 50%;
  background: var(--pin-color); border: 3px solid #fff; overflow: hidden; display: flex; align-items: center; justify-content: center;
  font-weight: 800; color: #fff; font-size: calc(var(--pin-size) * .4); box-shadow: 0 4px 10px rgba(0,0,0,.35);
}
.pin-head img { width: 100%; height: 100%; object-fit: cover; }
.pin-tip {
  position: absolute; left: 50%; bottom: 0; width: 0; height: 0; transform: translateX(-50%);
  border-left: calc(var(--pin-size) * .22) solid transparent; border-right: calc(var(--pin-size) * .22) solid transparent;
  border-top: calc(var(--pin-size) * .42) solid #fff;
}
.pin-target .pin-head { background: #fff; font-size: calc(var(--pin-size) * .6); }
.pin-label {
  position: absolute; left: 50%; top: -1.9em; transform: translateX(-50%); white-space: nowrap;
  background: rgba(20, 14, 40, .88); color: #fff; padding: .15em .5em; border-radius: 8px; font-weight: 800; font-size: 15px;
}
.maplibregl-canvas { outline: none; }
.maplibregl-marker.pin { position: absolute; }
