:root {
  --blue: #2a6db5;
  --blue-dark: #1d4f86;
  --yellow: #f7cf3d;
  --green: #4e8c4a;
  --bg: #f4f8ef;
  --card: #ffffff;
  --text: #25303a;
  --muted: #6a7785;
  --err: #c0392b;
}

* { box-sizing: border-box; }

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

.wrap { max-width: 640px; margin: 0 auto; padding: 24px 18px 64px; }
.wrap-wide { max-width: 1100px; }

header.hero {
  text-align: center;
  padding: 28px 16px 8px;
}
header.hero h1 { margin: 0; font-size: 2rem; color: var(--blue-dark); }
header.hero p.sub { margin: 6px 0 0; color: var(--muted); }

.flowers { font-size: 1.6rem; letter-spacing: 4px; }

.count-badge {
  display: inline-block;
  background: var(--yellow);
  color: var(--blue-dark);
  font-weight: 700;
  border-radius: 999px;
  padding: 6px 16px;
  margin: 14px 0;
}

.card {
  background: var(--card);
  border-radius: 14px;
  padding: 22px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
  margin-bottom: 18px;
}

.intro { color: var(--muted); }

label { display: block; font-weight: 600; margin: 14px 0 6px; }
input[type="text"], input[type="number"], select, textarea {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid #cdd6df;
  border-radius: 9px;
  font-size: 1rem;
  font-family: inherit;
  background: #fff;
}
textarea { resize: vertical; min-height: 90px; }

.check-row { display: flex; align-items: flex-start; gap: 10px; margin: 18px 0 4px; }
.check-row input { margin-top: 4px; width: 20px; height: 20px; }
.check-row label { margin: 0; }

.sub-section {
  border-left: 3px solid var(--yellow);
  padding-left: 14px;
  margin: 8px 0 4px;
}
.hidden { display: none; }

.hint { color: var(--muted); font-size: 0.88rem; margin-top: 4px; }

.pref-list {
  max-height: 340px; overflow-y: auto;
  border: 1px solid #cdd6df; border-radius: 9px; padding: 8px; background: #fff;
}
.pref-group { margin-bottom: 10px; }
.pref-group-title {
  font-weight: 700; color: var(--blue-dark); font-size: 0.82rem;
  text-transform: uppercase; letter-spacing: 0.03em;
  margin: 4px 0; padding: 4px 2px; position: sticky; top: -8px; background: #fff;
}
.pref-item {
  display: flex; align-items: center; gap: 9px; font-weight: 400; margin: 0;
  padding: 5px 6px; border-radius: 6px; cursor: pointer;
}
.pref-item:hover { background: var(--bg); }
.pref-item input { width: 18px; height: 18px; margin: 0; }
.pref-item input:disabled + span { color: #b3bcc6; }

button.primary {
  background: var(--blue);
  color: #fff;
  border: 0;
  border-radius: 10px;
  padding: 13px 22px;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  margin-top: 22px;
  width: 100%;
}
button.primary:hover { background: var(--blue-dark); }

button.ghost {
  background: #fff;
  color: var(--blue-dark);
  border: 1px solid var(--blue);
  border-radius: 9px;
  padding: 9px 16px;
  font-weight: 600;
  cursor: pointer;
}
button.ghost:hover { background: #eef4fb; }

.error {
  background: #fde9e7;
  color: var(--err);
  border: 1px solid #f3b6b0;
  border-radius: 9px;
  padding: 10px 14px;
  margin-bottom: 16px;
}

.thanks-big { text-align: center; }
.thanks-big .check { font-size: 3rem; }

/* ---- Admin ---- */
.admin-bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.admin-bar .field { flex: 1 1 150px; }
.admin-bar label { margin-top: 0; }
.admin-bar input { width: 100%; }

table.responses { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
table.responses th, table.responses td {
  text-align: left; padding: 7px 9px; border-bottom: 1px solid #e6ebf0;
}
table.responses th { color: var(--muted); font-weight: 600; }

.teams-grid { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 14px; }
.team-col {
  flex: 1 1 200px;
  min-width: 180px;
  background: #fff;
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 1px 6px rgba(0,0,0,0.06);
}
.team-col h4 { margin: 0 0 8px; color: var(--blue-dark); }
.team-col.dragover { outline: 2px dashed var(--blue); }
.player {
  background: var(--bg);
  border-radius: 8px;
  padding: 7px 10px;
  margin-bottom: 6px;
  cursor: grab;
  font-size: 0.92rem;
  display: flex; justify-content: space-between; gap: 8px;
}
.player .meta { color: var(--muted); font-size: 0.82rem; white-space: nowrap; }
.team-stats { color: var(--muted); font-size: 0.82rem; margin-top: 8px; }

.toast {
  position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%);
  background: var(--green); color: #fff; padding: 10px 18px; border-radius: 10px;
  opacity: 0; transition: opacity .25s; pointer-events: none;
}
.toast.show { opacity: 1; }

.section-title { color: var(--blue-dark); margin-top: 26px; }

.site-footer { text-align: center; margin-top: 24px; }
.admin-link {
  display: inline-block;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.85rem;
  padding: 6px 14px;
  border: 1px solid #d6dde4;
  border-radius: 999px;
}
.admin-link:hover { color: var(--blue-dark); border-color: var(--blue); }

.invited-name { font-size: 0.9rem; padding: 3px 6px; border-radius: 6px; color: var(--muted); }
.invited-name.status-yes { color: #1c6b2e; background: #e6f6ea; font-weight: 600; }
.invited-name.status-no  { color: #b3261e; background: #fde9e7; font-weight: 600; }
.invited-name.status-none { color: #9aa6b1; }
.unmatched {
  margin-top: 12px; padding: 10px 14px; border-radius: 9px;
  background: #fff6e5; border: 1px solid #f0d9a8; font-size: 0.88rem;
}
.pill {
  display: inline-block; padding: 2px 10px; border-radius: 999px;
  background: #eef2f6; color: var(--muted); font-size: 0.82rem; font-weight: 600;
}
.pill-yes { background: #e6f6ea; color: #1c6b2e; }
.pill-no { background: #fde9e7; color: #b3261e; }
table.responses tr.row-declined td { color: #b3261e; background: #fdf3f2; }

.warn-banner { margin: 10px 0; }
.warn-line {
  border-radius: 9px; padding: 9px 13px; margin-bottom: 6px; font-size: 0.9rem;
}
.warn-line.warn-med { background: #fff6e5; border: 1px solid #f0d9a8; color: #8a6d1a; }
.warn-line.warn-high { background: #fdecea; border: 1px solid #f3b6b0; color: #b3261e; font-weight: 600; }

/* Familjefärger */
.publish-card { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }

.family-legend { margin: 6px 0 4px; font-size: 0.85rem; color: var(--muted); line-height: 2; }
.fam-chip { display: inline-block; margin-right: 10px; white-space: nowrap; }
.fam-dot {
  display: inline-block; width: 11px; height: 11px; border-radius: 50%;
  margin-right: 5px; vertical-align: middle;
}

/* Admin-knapp uppe till höger på publika sidan */
.admin-btn {
  position: fixed; top: 14px; right: 14px; z-index: 10;
  background: var(--blue); color: #fff; text-decoration: none;
  font-size: 0.9rem; font-weight: 700; padding: 9px 16px; border-radius: 999px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.admin-btn:hover { background: var(--blue-dark); }

/* Separata aktivitetskort (fotboll / 3-kamp) */
.activity-card {
  border: 1px solid #dbe3ea; border-radius: 12px; padding: 16px 18px;
  margin: 18px 0; background: #fbfdff;
}
.activity-head {
  font-size: 1.2rem; font-weight: 700; color: var(--blue-dark);
  margin: 0 0 12px;
}
.intro-text { text-align: center; color: var(--muted); margin: 0 0 20px; }
.muted { color: var(--muted); font-weight: 400; font-size: 0.9em; }

/* Ja/Nej-val per aktivitet */
.activity-q { font-weight: 600; margin: 8px 0 10px; }
.choice-row { display: flex; gap: 10px; flex-wrap: wrap; }
.choice {
  flex: 1 1 140px; display: flex; align-items: center; justify-content: center; gap: 9px;
  padding: 13px; border: 2px solid #cdd6df; border-radius: 11px; cursor: pointer;
  font-weight: 600; margin: 0; background: #fff; transition: all 0.12s;
}
.choice input { position: absolute; opacity: 0; width: 0; height: 0; }
.choice:hover { border-color: var(--blue); }
.choice.yes.selected { border-color: var(--green); background: #e9f6ea; color: #1c6b2e; }
.choice.maybe.selected { border-color: #d9a300; background: #fff7e0; color: #8a6d1a; }
.choice.no.selected { border-color: var(--err); background: #fdecea; color: #b3261e; }
.choice-row-3 .choice { flex: 1 1 110px; padding: 11px 8px; }

.decline-note { color: var(--muted); font-size: 0.86rem; margin: 18px 0 0; }
