/* =============================================================
   SpoluSport — style.css
   Palette: light #fdfcf7 · dark #232743 · red #d90368
            green #cee35f · hl #e7ff57 · blue #068d9d
   Typography: Neuzeit Grotesk (sans) · Felt Tip Woman (hand)
   ============================================================= */

@import url('https://fonts.googleapis.com/css2?family=Caveat:wght@400;700&family=Barlow:wght@400;700&display=swap');

/*
@font-face {
  font-family: 'Neuzeit Grotesk';
  src: url('/assets/fonts/NeuzeitGrotesk-Regular.woff2') format('woff2');
  font-weight: 400; font-display: swap;
}
@font-face {
  font-family: 'Neuzeit Grotesk';
  src: url('/assets/fonts/NeuzeitGrotesk-Bold.woff2') format('woff2');
  font-weight: 700; font-display: swap;
}
@font-face {
  font-family: 'Felt Tip Woman';
  src: url('/assets/fonts/FeltTipWoman.woff2') format('woff2');
  font-weight: 400; font-display: swap;
}
*/

/* ---- Design tokens ---------------------------------------- */
:root {
  --light:  #fdfcf7;
  --dark:   #232743;
  --red:    #d90368;
  --green:  #cee35f;
  --hl:     #e7ff57;
  --blue:   #068d9d;

  --bg:          var(--light);
  --bg-card:     #ffffff;
  --bg-muted:    #edecea;
  --border:      #c8c4bb;
  --border-dark: var(--dark);
  --text:        var(--dark);
  --text-muted:  #6a6e88;
  --accent:      var(--blue);
  --accent-mid:  #057585;
  --accent-pale: #d4f0f4;
  --danger:      var(--red);
  --warn-pale:   #fff3cd;

  --sport-1: #3a6b9e;
  --sport-2: #8b4513;
  --sport-3: #5a5a9e;
  --sport-4: #9e3a3a;
  --sport-5: #4a8b4a;

  --card-bg:        #ffffff;
  --card-bg-friend: #f4fcbe;
  --card-skill-on:  #068d9d;
  --card-skill-off: #d4f0f4;
  --card-text:      var(--dark);
  --card-shadow:    2px 3px 10px rgba(0,0,0,.09), 0 1px 3px rgba(0,0,0,.06);
  --card-shadow-hover: 3px 5px 16px rgba(0,0,0,.15);

  --pill-special-active: var(--green);
  --pill-sport-active:   var(--blue);

  --radius: 0;
  --gap:    1.5rem;
  --nav-h:  3.25rem;

  --font-sans: 'Neuzeit Grotesk', 'Barlow', 'Helvetica Neue', Arial, sans-serif;
  --font-hand: 'Felt Tip Woman', 'Caveat', cursive;

  --df-pad: 0.75rem;
}

/* ---- Reset ------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; }

/* ---- Base -------------------------------------------------- */
html { font-size: 16px; }
body {
  font-family: var(--font-sans);
  background-color: var(--bg);
  background-image: url('../assets/pozadi_papir.jpg');
  background-size: 100% auto;
  background-repeat: repeat-y;
  background-attachment: scroll;
  color: var(--text);
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
h1, h2, h3 { font-family: var(--font-sans); font-weight: 700; line-height: 1.2; }
h1 { font-size: 1.75rem; }
h2 { font-size: 1.2rem; }
h3 { font-size: 1rem; }
a  { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
small, .text-muted { color: var(--text-muted); font-size: 0.85rem; }

hr {
  border: none; height: 1.5px;
  background: var(--border-dark);
  clip-path: polygon(3px 0%, calc(100% - 2px) 0%, 100% 100%, 0% 100%);
  margin: 1.5rem 0;
}

/* ---- Navigation ------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--dark);
  box-shadow: 0 2px 10px rgba(0,0,0,.3);
  overflow: visible;
}
.nav {
  max-width: 72rem; margin: 0 auto; padding: 0 var(--gap);
  display: flex; align-items: center; justify-content: space-between;
  height: var(--nav-h); overflow: visible;
}
.nav-brand {
  display: flex; align-items: flex-end;
  text-decoration: none; overflow: visible;
  margin-bottom: calc(-1 * var(--nav-h) * 0.28);
  margin-top: .35rem; flex-shrink: 1; min-width: 0;
}
.nav-brand > div { display: block; max-width: 100%; }
.nav-brand svg   { display: block; }
.nav-brand:hover { opacity: .88; text-decoration: none; }
.nav-links {
  display: flex; align-items: center;
  gap: 1.5rem; font-size: 0.875rem; flex-shrink: 0;
}
.nav-links a { color: var(--light); opacity: 0.85; font-weight: 600; }
.nav-links a:hover { opacity: 1; text-decoration: none; }
.lang-toggle {
  border: 1.5px solid rgba(255,255,255,.45); padding: 0.15rem 0.5rem;
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.05em; color: var(--light);
}
@media (max-width: 500px) {
  /* Nav stays single row — logo switches to head.json via JS */
  .nav-links { gap: .75rem; font-size: .8rem; }
}

/* ---- Layout ----------------------------------------------- */
.main-content { flex: 1; max-width: 72rem; margin: 0 auto; width: 100%; padding: var(--gap); }

/* ---- Footer ----------------------------------------------- */
.site-footer {
  margin-top: auto;   /* pushes footer to bottom in flex column body */
  padding: 0;
  flex-shrink: 0;
  font-family: var(--font-sans);
}
/* Legacy .site-footer p rules removed — new footer uses footer.php styles */
.footer-thankyou { font-family: var(--font-hand); font-size: 1.05rem; }

/* ---- Buttons ---------------------------------------------- */
.btn {
  display: inline-block; padding: 0.5rem 1.2rem;
  border: 2px solid transparent; font-size: 0.875rem; font-weight: 700;
  font-family: var(--font-sans); cursor: pointer; text-decoration: none;
  transition: opacity 0.12s; white-space: nowrap; letter-spacing: .01em;
}
.btn:hover { opacity: 0.8; text-decoration: none; }
.btn:active { opacity: 0.6; }
.btn-primary   { background: var(--dark); color: var(--light); border-color: var(--dark); }
.btn-secondary { background: transparent; color: var(--dark); border: 2px solid var(--dark); }
.btn-danger    { background: transparent; color: var(--red);  border: 2px solid var(--red); }
.btn-sm        { padding: 0.3rem 0.7rem; font-size: 0.8rem; }
.btn-google    { background: var(--bg-card); color: var(--dark); border: 2px solid var(--dark); display: flex; align-items: center; gap: 0.6rem; width: fit-content; }

/* ---- Forms ------------------------------------------------ */
.field { display: flex; flex-direction: column; gap: 0.35rem; margin-bottom: 1.1rem; }
.field label { font-size: 0.875rem; font-weight: 700; }
.field input, .field select, .field textarea {
  border: 1.5px solid var(--border); padding: 0.5rem 0.7rem;
  background: var(--bg-card); color: var(--text); width: 100%;
  transition: border-color 0.12s; border-radius: 0; -webkit-appearance: none;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--dark); }
.field textarea { resize: vertical; min-height: 5.5rem; }
.field-hint   { font-size: 0.8rem; color: var(--text-muted); }
.form-error   { border: 2px solid var(--red);  padding: 0.6rem 0.9rem; color: var(--red);  font-size: 0.875rem; margin-bottom: 1rem; background: #fdf0f0; }
.form-success { border: 2px solid var(--blue); padding: 0.6rem 0.9rem; color: var(--blue); font-size: 0.875rem; margin-bottom: 1rem; background: var(--accent-pale); }
.auth-box { max-width: 26rem; margin: 3rem auto; padding: 2rem; border: 2px solid var(--dark); }
.auth-box h1 { margin-bottom: 0.5rem; }
.auth-intro { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 1.5rem; }

/* ---- Badges ----------------------------------------------- */
.badge {
  display: inline-block; padding: 0.15rem 0.5rem;
  font-size: 0.7rem; font-weight: 700; font-family: var(--font-sans);
  letter-spacing: 0.04em; text-transform: uppercase; border: 1.5px solid currentColor;
}
.badge-open      { color: var(--blue); }
.badge-full      { color: #7a4a00; }
.badge-cancelled { color: var(--red); }
.badge-completed { color: var(--text-muted); }
.badge-verified  { color: var(--blue); font-size: 0.65rem; }

/* ================================================================
   INDEX PAGE — Filter bar (wraps pills + distance filter)
   ================================================================ */
.filter-bar { margin-bottom: 1.25rem; }

/* Toggle header — plain light bar with dropshadow, no texture */
.filter-bar-toggle {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; padding: 0.45rem 1rem;
  background: var(--light);
  border: none;
  box-shadow: 2px 3px 10px rgba(0,0,0,.13), 0 1px 3px rgba(0,0,0,.07);
  cursor: pointer;
  font-family: var(--font-sans); font-weight: 700; font-size: .88rem;
  color: var(--dark);
  transition: box-shadow .12s;
}
.filter-bar-toggle:hover { box-shadow: 2px 4px 14px rgba(0,0,0,.17); }

/* Active dot — shows filters are set even when bar is collapsed */
.filter-active-dot {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: var(--blue); margin-left: .4rem; flex-shrink: 0;
}

.filter-bar-arrow {
  height: 1.2rem; width: auto;
  transition: transform .2s;
  filter: grayscale(1) opacity(.5);
  flex-shrink: 0;
}
.filter-bar-arrow.open { transform: rotate(90deg); filter: grayscale(1) opacity(.7); }

/* Body — transparent, content stacks naturally */
.filter-bar-body { padding: .75rem 0 0; }

/* ================================================================
   INDEX PAGE — Sport filter pills
   ================================================================ */
.sport-filter {
  display: flex; flex-wrap: wrap;
  align-items: center; gap: 0.35rem;
  margin-bottom: 0.75rem;
}
.sport-filter a {
  padding: 0.28rem 0.85rem;
  border: 1px solid var(--dark);    /* thinner: 1px not 2px */
  font-size: 0.82rem; font-weight: 700;
  color: var(--dark); background: var(--light);
  display: inline-flex; align-items: center; gap: .3rem;
  text-decoration: none;
  transition: background .12s, color .12s;
}
.sport-filter a:hover { opacity: .8; text-decoration: none; }
.sport-filter a.pill-special { border-radius: 0; }
.sport-filter a.sport-pill   { border-radius: 999px; }

.sport-filter a.pill-special.active {
  background: var(--green); color: var(--dark);
}
.sport-filter a.sport-pill.active,
.sport-filter a:not(.sport-pill):not(.pill-special).active {
  background: var(--blue); color: var(--light); border-color: var(--blue);
}
.sport-filter .pill-icon { width: 14px; height: 14px; vertical-align: middle; }

/* ================================================================
   INDEX PAGE — Distance filter (inside filter-bar-body)
   ================================================================ */
.distance-filter {
  margin-bottom: 0;                  /* filter-bar owns the bottom margin */
  border: none;
  border-radius: 0 6px 6px 6px;
  background: var(--light);          /* plain light — no texture */
  background-image: none;
  box-shadow: 2px 3px 10px rgba(0,0,0,.13), 0 1px 3px rgba(0,0,0,.07);
  display: inline-block;
  min-width: 0; overflow: hidden;
  padding: 0.4rem 1rem;
  transition: background .2s, box-shadow .2s;
}
.distance-filter.is-open { display: block; padding: 0; }

/* Active — blue bar */
.distance-filter.is-active {
  background: var(--blue);
  box-shadow: 2px 3px 10px rgba(6,141,157,.25), 0 1px 3px rgba(6,141,157,.15);
}
.distance-filter.is-active .distance-filter-toggle { color: var(--light); }
.distance-filter.is-active .dist-clear-btn { color: var(--light); border-color: rgba(255,255,255,.5); }

/* Expanded body — green */
.distance-filter-body { background: var(--green); padding: .5rem 0 0; }

/* Toggle label — vertically centered */
.distance-filter-toggle {
  display: flex; align-items: center; gap: .5rem;
  background: none; border: none; padding: 0;
  cursor: pointer; font-size: 0.85rem;
  font-weight: 700; font-family: var(--font-sans);
  color: var(--dark); width: 100%; min-height: 2rem;
}
.distance-filter.is-open .distance-filter-toggle { padding: 0.5rem var(--df-pad) 0; }
.distance-filter-toggle:hover { opacity: .8; }

/* Clear button — compact, inline link style */
.dist-clear-btn {
  font-size: .75rem; font-weight: 700; font-family: var(--font-sans);
  color: var(--dark); background: none; border: 1px solid rgba(0,0,0,.2);
  padding: .1rem .45rem; cursor: pointer; text-decoration: none;
  white-space: nowrap; flex-shrink: 0; line-height: 1.4;
}
.dist-clear-btn:hover { opacity: .7; text-decoration: none; }

.distance-map-wrap { margin-bottom: 0.75rem; overflow: hidden; }
#distance-map { height: 33vh; width: 100%; cursor: crosshair; }

/* Radius row — always dark text (readable on green) */
.radius-row {
  display: flex; align-items: center;
  gap: 0.75rem; font-size: 0.85rem; font-weight: 700;
  color: var(--dark);               /* explicit dark so green bg doesn't hide it */
  padding: 0 var(--df-pad);
}
.radius-row input[type=range] { flex: 1; accent-color: var(--dark); }
#radius-label { min-width: 3.5rem; font-weight: 700; color: var(--dark); text-align: right; }

.distance-filter-actions {
  display: flex; justify-content: center;
  gap: 0.75rem; margin-top: 0.75rem;
  padding: 0 var(--df-pad) 0.6rem;
}

/* Paper-texture apply/cancel buttons */
.dist-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 5rem; height: 2.2rem; padding: 0 1rem;
  border: none; cursor: pointer; text-decoration: none;
  font-family: var(--font-sans); font-weight: 700; font-size: .82rem;
  color: var(--dark); white-space: nowrap;
  border-radius: 3px 5px 4px 6px / 5px 3px 6px 4px;
  transform: rotate(-0.6deg);
  background-image: url('../assets/pozadi_papir.jpg');
  background-size: 100vw auto; background-position: center center;
  box-shadow: inset 0 2px 5px rgba(0,0,0,.12), inset 0 -1px 2px rgba(0,0,0,.06),
              inset 2px 0 4px rgba(0,0,0,.06), inset -2px 0 4px rgba(0,0,0,.06);
  transition: box-shadow .15s, transform .1s;
}
.dist-btn:hover {
  text-decoration: none;
  box-shadow: inset 0 3px 7px rgba(0,0,0,.16), inset 0 -1px 3px rgba(0,0,0,.09),
              inset 2px 0 5px rgba(0,0,0,.09), inset -2px 0 5px rgba(0,0,0,.09);
  transform: rotate(-0.6deg) scale(1.02);
}

/* ================================================================
   INDEX PAGE — Week/List nav bar
   ================================================================ */
.week-nav-bar {
  padding: .5rem 0 .35rem;
  display: flex; align-items: center; gap: 0;
  min-height: 2.8rem; overflow: visible;
}
.wnav-view-toggle { flex-shrink: 0; display: flex; align-items: center; }

.week-nav-inner {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: .4rem;
  background: none; border: none; padding: 0;
  white-space: nowrap; overflow: visible; min-width: 0;
}

.wnav-btn {
  display: inline-flex; align-items: center; justify-content: center;
  background: none; border: none; padding: 0;
  cursor: pointer; text-decoration: none;
  opacity: .85; transition: opacity .15s, transform .1s; flex-shrink: 0;
}
.wnav-btn img { height: 2rem; width: auto; display: block; }
.wnav-btn:hover { opacity: 1; transform: scale(1.08); text-decoration: none; }

.wnav-label {
  display: flex; flex-direction: column; align-items: center;
  min-width: 0; text-align: center; overflow: hidden;
}
.wnav-month {
  font-family: var(--font-sans); font-weight: 700; font-size: .9rem;
  line-height: 1.2; letter-spacing: .03em; text-transform: capitalize;
  color: var(--dark); white-space: nowrap;
}
.wnav-range { font-size: .72rem; color: var(--text-muted); line-height: 1.2; white-space: nowrap; }
.wnav-range.is-today-link { color: var(--red); font-weight: 700; }
a.wnav-label:hover .wnav-range { color: var(--dark); }
a.wnav-label:hover { text-decoration: none; }

.wnav-highlight-btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 5rem; height: 2.2rem; padding: 0 .9rem;
  background: transparent; border: 2px solid var(--blue);
  cursor: pointer; text-decoration: none;
  font-family: var(--font-sans); font-weight: 700; font-size: .82rem;
  color: var(--blue);
  transition: background .15s, color .15s;
  white-space: nowrap; transform: rotate(-0.4deg);
}
.wnav-highlight-btn:hover { background: var(--blue); color: var(--light); text-decoration: none; }

/* ================================================================
   INDEX PAGE — Week grid + day column headers
   ================================================================ */
.cal-scroll-outer {
  overflow-x: auto; overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin; scrollbar-color: var(--border) transparent;
  margin: 0 calc(-1 * var(--gap)); padding: 0 var(--gap);
}
.cal-scroll-outer::-webkit-scrollbar { height: 4px; }
.cal-scroll-outer::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.week-grid { display: flex; flex-direction: row; gap: 0.5rem; width: 100%; align-items: flex-start; padding-bottom: .5rem; }

.day-col { display: flex; flex-direction: column; gap: 0.35rem; flex: 1; min-width: 2.8rem; }
.day-col.has-events    { flex: none; width: 9.5rem; min-width: 9.5rem; }
.day-col.is-today      { flex: 1; min-width: 3.4rem; }
.day-col.is-today.has-events { flex: none; width: 9.5rem; min-width: 9.5rem; }

.day-label {
  font-size: 0.72rem; font-weight: 400; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--dark);
  padding: 0.35rem 0 0.25rem;
  border-bottom: 2px solid var(--blue); position: relative;
}
.day-label.today { color: var(--red); font-weight: 700; border-bottom-color: var(--red); }
.day-empty { font-size: 0.8rem; color: var(--text-muted); padding: 0.4rem 0; }

/* ================================================================
   Calendar header
   ================================================================ */
.calendar-header {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 1rem;
  margin-bottom: 1.25rem; padding-bottom: 1rem;
  border-bottom: 2px solid var(--dark);
}
.calendar-nav { display: flex; align-items: center; gap: 0.6rem; }
.calendar-nav strong { min-width: 10rem; text-align: center; font-size: 0.95rem; font-family: var(--font-sans); font-weight: 700; }
.view-toggle { display: flex; border: 2px solid var(--blue); overflow: hidden; }
.view-toggle a { padding: 0.3rem 0.85rem; font-size: 0.8rem; font-weight: 700; color: var(--blue); background: var(--light); }
.view-toggle a.active { background: var(--blue); color: var(--light); }

/* ================================================================
   Event cards — Week view
   ================================================================ */
.event-card-wrap { margin-bottom: .35rem; }
.event-card-wrap:nth-child(odd)  .event-card { transform: rotate(-0.55deg); transform-origin: center; }
.event-card-wrap:nth-child(even) .event-card { transform: rotate(0.45deg);  transform-origin: center; }

.event-card {
  display: block; background: var(--card-bg);
  border: 1.5px solid transparent;
  padding: 0.3rem 0.75rem 0.55rem;
  color: var(--card-text); text-decoration: none;
  box-shadow: var(--card-shadow);
  transition: border-color 0.13s, box-shadow 0.13s;
  position: relative; overflow: visible;
}
.event-card:hover { border-color: var(--dark) !important; box-shadow: var(--card-shadow-hover); text-decoration: none; }
.event-card.has-friend { background: var(--card-bg-friend); }
.event-card.is-mine    { background: #c5d4f9; }
.event-card.is-full    { opacity: 0.68; }
.event-card.is-cancelled { opacity: 0.38; }

.ec-top { display: flex; align-items: center; justify-content: space-between; gap: .4rem; margin-bottom: .1rem; }
.ec-time { font-family: var(--font-hand); font-size: 1.45rem; font-weight: 400; color: var(--card-text); line-height: 1.0; flex: 1; }
.ec-sport { font-family: var(--font-sans); font-size: 1.0rem; font-weight: 700; color: var(--card-text); line-height: 1.15; margin-bottom: .15rem; }
.event-card.has-friend .ec-sport { color: #2a5c2a; }
.ec-icons { display: flex; align-items: center; gap: .3rem; flex-shrink: 0; margin-top: .05rem; }
.ec-icon-multisport { display: inline-block; flex-shrink: 0; width: 16px; height: 16px; vertical-align: middle; }
.ec-icon-free       { display: inline-block; flex-shrink: 0; width: 14px; height: 14px; vertical-align: middle; }

.ec-skill-circles { display: flex; align-items: center; gap: 5px; margin-bottom: .2rem; }
.ec-skill-circle  { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.ec-skill-circle.on  { background: var(--card-skill-on); }
.ec-skill-circle.off { background: transparent; border: 3px solid var(--card-skill-off); }

.ec-venue-row { font-family: var(--font-sans); font-size: .88rem; font-weight: 400; color: var(--card-text); margin-bottom: .15rem; line-height: 1.2; }
.ec-venue-row strong { font-weight: 700; }
.ec-desc { font-family: var(--font-hand); font-size: 1.15rem; color: var(--card-text); line-height: 1.3; margin-top: .1rem; opacity: .85; word-break: break-word; }

/* ================================================================
   Event rows — List view
   ================================================================ */
.list-view { display: flex; flex-direction: column; }
.list-day-heading {
  font-size: 0.75rem; font-weight: 700; font-family: var(--font-sans);
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--dark); padding: 0.85rem 0 0.4rem;
  border-top: 2px solid var(--dark);
}
.list-day-heading.today { color: var(--red); border-color: var(--red); }

.event-row {
  display: flex; align-items: center; gap: .65rem;
  background: var(--card-bg); border: none;
  border-left: 3px solid var(--border);
  padding: .4rem .75rem .4rem .6rem;
  color: var(--text); text-decoration: none;
  margin-bottom: .35rem; box-shadow: var(--card-shadow);
  transition: box-shadow .15s, transform .1s; transform-origin: center;
}
.event-row:nth-child(odd)  { transform: rotate(-0.25deg); }
.event-row:nth-child(even) { transform: rotate(0.2deg); }
.event-row:hover { box-shadow: var(--card-shadow-hover); transform: rotate(0deg) translateY(-1px); text-decoration: none; }
.event-row.is-cancelled { opacity: 0.42; }
.event-row.has-friend   { background: var(--card-bg-friend); }
.event-row.is-mine      { background: #c5d4f9; }
.event-row.is-full      { opacity: 0.68; }

.er-time { font-family: var(--font-hand); font-size: 23px; color: var(--dark); white-space: nowrap; flex-shrink: 0; align-self: center; line-height: 1; }
.er-main { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: .3rem .45rem; }
.er-sport-name { font-weight: 700; font-size: 16px; white-space: nowrap; }
.er-skill   { font-size: 13px; color: var(--text-muted); white-space: nowrap; }
.er-icon    { width: 13px; height: 13px; flex-shrink: 0; align-self: center; }
.er-venue   { font-size: 13px; color: var(--text-muted); white-space: nowrap; }
.er-capacity { font-size: 13px; color: var(--text-muted); white-space: nowrap; }
.er-capacity.is-full span { color: var(--red); font-weight: 700; }
.er-dot  { font-size: 13px; color: var(--text-muted); flex-shrink: 0; }
.er-desc { font-family: var(--font-hand); font-size: 18.4px; color: var(--text-muted); min-width: 0; overflow-wrap: break-word; word-break: break-word; }

.sport-beach-volejbal { border-left-color: var(--sport-1); }
.sport-badminton      { border-left-color: var(--sport-2); }
.sport-tenis          { border-left-color: var(--sport-3); }
.sport-squash         { border-left-color: var(--sport-4); }
.sport-padel          { border-left-color: var(--sport-5); }

/* ================================================================
   Event detail page
   ================================================================ */
.event-detail { max-width: 42rem; }
.event-detail h1 { margin-bottom: 0.25rem; }
.event-meta { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; color: var(--text-muted); font-size: 0.875rem; margin-bottom: 1.5rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border); }
.event-meta strong { color: var(--text); }
.participant-list { list-style: none; margin: 0.75rem 0; }
.participant-list li { display: flex; align-items: center; gap: 0.75rem; padding: 0.45rem 0; border-bottom: 1px solid var(--bg-muted); font-size: 0.9rem; }
.participant-list li:last-child { border-bottom: none; }
.p-nick   { flex: 1; font-weight: 700; }
.p-stats  { font-size: 0.78rem; color: var(--text-muted); display: flex; gap: 0.75rem; }
.p-role   { font-size: 0.72rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.p-noshow { font-size: 0.72rem; color: var(--red); font-weight: 700; }

/* ================================================================
   Message board
   ================================================================ */
.message-board { margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid var(--border); }
.message-board h2 { margin-bottom: 1rem; font-size: 0.85rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); }
.message-list  { display: flex; flex-direction: column; gap: 0.85rem; margin-bottom: 1.25rem; }
.message-item  { display: grid; grid-template-columns: auto 1fr; gap: 0.2rem 0.75rem; }
.msg-nick { font-weight: 700; font-size: 0.85rem; }
.msg-time { font-size: 0.75rem; color: var(--text-muted); }
.msg-text { grid-column: 2; font-size: 0.9rem; line-height: 1.5; }
.message-form { display: flex; gap: 0.5rem; }
.message-form textarea { flex: 1; border: 1.5px solid var(--border); padding: 0.5rem 0.75rem; resize: none; height: 2.5rem; font-size: 0.88rem; background: var(--bg-card); transition: height 0.15s, border-color 0.15s; }
.message-form textarea:focus { outline: none; height: 5rem; border-color: var(--dark); }

/* ================================================================
   Rating stars
   ================================================================ */
.star-row { display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: 0.2rem; margin: 0.3rem 0 0.75rem; }
.star-row input[type=radio] { display: none; }
.star-row label { cursor: pointer; font-size: 1.3rem; color: var(--border); transition: color 0.1s; }
.star-row label:hover, .star-row label:hover ~ label, .star-row input[type=radio]:checked ~ label { color: #c8952a; }

/* ================================================================
   Profile page
   ================================================================ */
.profile-box { max-width: 30rem; }
.profile-stats { display: flex; gap: 2rem; margin: 1rem 0 1.5rem; padding: 1rem; background: var(--bg-muted); border: 1.5px solid var(--border); }
.stat-item  { text-align: center; }
.stat-value { font-size: 1.35rem; font-family: var(--font-sans); font-weight: 700; }
.stat-label { font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }

.stat-circles     { display: flex; gap: .5rem; align-items: flex-start; flex-wrap: wrap; }
.stat-circle-wrap { display: flex; flex-direction: column; align-items: center; gap: .25rem; }
.stat-circle {
  width: 52px; height: 52px; border-radius: 50%;
  border: 2px solid var(--border); background: var(--bg-card);
  display: flex; align-items: center; justify-content: center;
  font-size: .82rem; font-weight: 700; line-height: 1.1;
  text-align: center; padding: 2px; position: relative;
}
.stat-circle-label { font-size: .6rem; color: var(--text-muted); text-align: center; line-height: 1.2; max-width: 52px; }

/* ================================================================
   Utility
   ================================================================ */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.flex { display: flex; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.text-right { text-align: right; }

#friend-panel { box-shadow: -4px 0 16px rgba(0,0,0,.12); }
#friend-panel::-webkit-scrollbar { width: 4px; }
#friend-panel::-webkit-scrollbar-thumb { background: var(--border); }

/* ---- Required field asterisk ------------------------------ */
.req::after {
  content: ' *';
  color: var(--red);
  font-size: 1em;
  /* no vertical-align — avoids squish inside flex containers */
}

/* ---- Save / Create button row ----------------------------- */
.save-row      { display: flex; align-items: center; gap: 0; margin-bottom: 1.25rem; }
.save-row-line { flex: 1; border-top: 1.5px dashed var(--green); }

.save-btn {
  flex-shrink: 0;
  border-radius: 999px;
  border: 1.5px dashed var(--green);
  background: transparent;
  color: var(--dark);
  padding: .45rem 2rem;
  cursor: pointer;
  font-size: .875rem; font-weight: 700;
  font-family: var(--font-sans);
  letter-spacing: .01em;
  transition: background .18s, color .18s, border-color .18s, border-style .18s;
}
.save-btn:hover { border-style: solid; }
.save-btn.dirty, .save-btn.ready {
  border-style: solid;
  border-color: var(--green);
  background: var(--green);
  color: var(--red);
}
.save-btn.dirty:hover, .save-btn.ready:hover { filter: brightness(.95); }