:root {
  --bg: #0d0f12;
  --panel: #171a1f;
  --panel-2: #20242b;
  --text: #f6f7f8;
  --muted: #9ea6b2;
  --line: #2a3038;
  --accent: #f2a93b;
  --accent-strong: #ffb642;
  --max: 1180px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
}

a { color: inherit; }

.hero {
  min-height: 330px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 48px 20px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 50% 0%, rgba(255,255,255,.08), transparent 38%),
    linear-gradient(180deg, #15191e 0%, #0d0f12 100%);
}

.hero__inner { max-width: 760px; }

.eyebrow {
  color: var(--accent);
  letter-spacing: .18em;
  font-size: 12px;
  font-weight: 700;
}

h1 {
  font-size: clamp(36px, 7vw, 72px);
  line-height: .95;
  margin: 18px 0;
}

.hero p {
  color: var(--muted);
  font-size: 18px;
}

.secondary-link {
  display: inline-block;
  margin-top: 18px;
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--muted);
}

.page {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0 80px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
  margin-bottom: 24px;
}

.section-head h2 { margin: 0; font-size: 28px; }
.section-head p { color: var(--muted); margin: 8px 0 0; }

.event-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 18px;
}

.event-card {
  display: block;
  padding: 24px;
  min-height: 220px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--panel);
  text-decoration: none;
  transition: transform .18s ease, border-color .18s ease;
}

.event-card:hover {
  transform: translateY(-3px);
  border-color: #4a535f;
}

.event-card__date {
  color: var(--accent);
  font-size: 23px;
  font-weight: 800;
  margin-bottom: 36px;
}

.event-card h3 {
  margin: 0 0 10px;
  font-size: 24px;
}

.event-card__location {
  color: var(--muted);
}

.status {
  color: var(--muted);
  padding: 18px 0;
}

.status.error { color: #ff8a8a; }
.hidden { display: none !important; }

.topbar {
  min-height: 72px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 max(20px, calc((100vw - var(--max)) / 2));
}

.back-link { text-decoration: none; color: var(--muted); }
.brand-small { font-weight: 800; letter-spacing: .08em; }

.event-detail__top {
  padding: 26px 0 32px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
}

.date-large {
  color: var(--accent);
  font-size: 24px;
  font-weight: 800;
}

.event-detail h1 {
  font-size: clamp(38px, 6vw, 64px);
  margin-bottom: 10px;
}

.location { color: var(--muted); font-size: 18px; }

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 22px;
}

.panel h3 { margin-top: 0; }
.panel p { color: #c9ced5; line-height: 1.6; white-space: pre-line; }

.accent-panel {
  margin-top: 18px;
  border-color: rgba(242,169,59,.5);
}

.primary-button {
  border: 0;
  border-radius: 12px;
  padding: 13px 18px;
  background: var(--accent);
  color: #18120a;
  font-weight: 800;
}

.primary-button:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.link-list {
  display: grid;
  gap: 10px;
}

.link-item {
  display: block;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--panel-2);
  text-decoration: none;
}

@media (max-width: 700px) {
  .detail-grid { grid-template-columns: 1fr; }
  .hero { min-height: 280px; }
}

/* ---------- Admin dashboard ---------- */
.muted { color: var(--muted); }
.small-text { font-size: 13px; }

.admin-corner-link {
  position: absolute;
  top: 18px;
  right: 22px;
  z-index: 5;
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(13,15,18,.72);
  backdrop-filter: blur(8px);
}

.admin-corner-link:hover { color: var(--text); border-color: #4a535f; }
.admin-body { min-height: 100vh; }
.admin-page { padding-top: 34px; }
.admin-topbar { gap: 18px; }
.admin-badge { color: var(--accent); font-size: 11px; margin-left: 8px; }

.auth-shell {
  min-height: calc(100vh - 160px);
  display: grid;
  place-items: center;
}

.auth-card { width: min(460px, 100%); padding: 32px; }
.admin-title { font-size: clamp(32px, 5vw, 50px); line-height: 1; margin: 14px 0 8px; }
.dashboard-title { margin-top: 10px; }
.form-stack { display: grid; gap: 16px; margin-top: 28px; }

.field { display: grid; gap: 8px; }
.field > span { color: #cfd4db; font-size: 13px; font-weight: 700; }

input, textarea, select {
  width: 100%;
  border: 1px solid #343b45;
  border-radius: 12px;
  background: #101318;
  color: var(--text);
  padding: 12px 13px;
  font: inherit;
  outline: none;
}

textarea { resize: vertical; min-height: 96px; }
input:focus, textarea:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(242,169,59,.12); }

.full-button { width: 100%; }
.secondary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 42px;
  border-radius: 12px;
  padding: 10px 14px;
  font: inherit;
  font-weight: 750;
  cursor: pointer;
}

.secondary-button {
  background: var(--panel-2);
  border: 1px solid #3a424d;
  color: var(--text);
}

.ghost-button {
  background: transparent;
  border: 1px solid var(--line);
  color: #d7dbe1;
}

.primary-button { cursor: pointer; }
.primary-button:disabled, .secondary-button:disabled, .ghost-button:disabled { opacity: .5; cursor: wait; }
.button-link { text-decoration: none; }

.admin-heading-row,
.editor-toolbar,
.editor-actions,
.admin-event-title-row,
.participants-header,
.subpanel-head,
.location-picker-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.admin-heading-row { margin-bottom: 28px; }
.editor-toolbar { margin-bottom: 32px; }
.editor-actions { justify-content: flex-end; }
.editor-heading { margin-bottom: 20px; }

.admin-event-list { display: grid; gap: 14px; }
.admin-event-card {
  display: grid;
  grid-template-columns: 220px 1fr auto;
  align-items: center;
  gap: 22px;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
}

.admin-event-date { color: var(--accent); font-weight: 850; font-size: 16px; }
.admin-event-content h3 { margin: 0; font-size: 21px; }
.admin-event-title-row { justify-content: flex-start; }
.admin-event-meta { margin-top: 9px; color: #c8ced6; font-size: 13px; }
.admin-event-actions { display: flex; gap: 9px; }

.status-pill,
.count-pill {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  border: 1px solid var(--line);
}
.status-published { color: #9be4ae; border-color: rgba(155,228,174,.35); background: rgba(155,228,174,.08); }
.status-draft { color: #f7c978; border-color: rgba(247,201,120,.3); background: rgba(247,201,120,.07); }
.status-completed { color: #acd7ff; }
.status-cancelled { color: #ff9b9b; }
.count-pill { color: var(--accent); min-width: 32px; justify-content: center; }

.editor-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(330px, .8fr);
  gap: 18px;
  align-items: start;
}

.form-panel { display: grid; gap: 18px; }
.form-panel h2 { margin: 0 0 4px; font-size: 21px; }
.two-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grow-field { flex: 1; }
.field-button { margin-top: 21px; white-space: nowrap; }

.subpanel {
  border: 1px solid #3a424d;
  border-radius: 15px;
  background: #11151a;
  padding: 16px;
  display: grid;
  gap: 14px;
}
.subpanel.hidden { display: none !important; }
.icon-button {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 9px;
  background: var(--panel-2);
  color: var(--muted);
  font-size: 20px;
  cursor: pointer;
}

.editor-side { position: sticky; top: 92px; }
.participants-editor-list { display: grid; gap: 12px; }
.participant-row {
  border: 1px solid #313842;
  border-radius: 15px;
  background: #11151a;
  padding: 14px;
  display: grid;
  gap: 12px;
}
.participant-row-top { display: flex; justify-content: space-between; align-items: center; }
.participant-number { font-size: 13px; }
.compact-status { padding: 12px 0 0; min-height: 24px; }
.status.success { color: #91dda4; }

@media (max-width: 900px) {
  .admin-event-card { grid-template-columns: 1fr; gap: 12px; }
  .admin-event-actions { justify-content: flex-start; }
  .editor-grid { grid-template-columns: 1fr; }
  .editor-side { position: static; }
}

@media (max-width: 620px) {
  .admin-heading-row,
  .editor-toolbar,
  .location-picker-row { align-items: stretch; flex-direction: column; }
  .editor-actions { width: 100%; }
  .editor-actions > * { flex: 1; }
  .two-columns { grid-template-columns: 1fr; }
  .field-button { margin-top: 0; }
  .admin-event-actions { flex-direction: column; }
  .admin-event-actions > * { width: 100%; }
  .admin-corner-link { top: 12px; right: 12px; }
}


/* Admin session indicator */
.admin-session-area {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.logged-in-indicator {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--text);
  font-size: 12px;
  line-height: 1.25;
}

.logged-in-indicator > span:last-child {
  display: grid;
  gap: 2px;
}

.logged-in-email {
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
}

.online-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #56d364;
  box-shadow: 0 0 0 3px rgba(86, 211, 100, .12);
  flex: 0 0 auto;
}

@media (max-width: 700px) {
  .logged-in-email { display: none; }
  .admin-session-area { gap: 8px; }
}

/* ---------- Admin v2: compact participants + editable locations ---------- */
.location-actions,
.location-form-actions,
.participant-summary-actions,
.modal-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.location-actions { align-self: end; }
.location-actions .field-button { margin-top: 0; }

.danger-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border-radius: 12px;
  padding: 10px 14px;
  border: 1px solid rgba(255, 122, 122, .35);
  background: rgba(255, 122, 122, .08);
  color: #ff9b9b;
  font: inherit;
  font-weight: 750;
  cursor: pointer;
}

.participants-editor-list { gap: 8px; }
.participant-row {
  padding: 0;
  overflow: hidden;
}

.participant-summary {
  min-height: 54px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 9px 8px 14px;
}

.participant-expand {
  min-width: 0;
  flex: 1;
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 8px 0;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.participant-summary-name {
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.participant-summary-phone {
  font-size: 12px;
  white-space: nowrap;
}

.participant-summary-actions .icon-button {
  width: 30px;
  height: 30px;
  font-size: 15px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(0, 0, 0, .68);
  backdrop-filter: blur(6px);
}

.modal-card {
  width: min(620px, 100%);
  max-height: calc(100vh - 44px);
  overflow-y: auto;
  border: 1px solid #3a424d;
  border-radius: 20px;
  background: var(--panel);
  box-shadow: 0 24px 90px rgba(0,0,0,.45);
  padding: 22px;
  display: grid;
  gap: 18px;
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.modal-head h2 { margin: 6px 0 0; }
.modal-actions { justify-content: flex-end; border-top: 1px solid var(--line); padding-top: 16px; }

.checklist-box {
  display: grid;
  gap: 8px;
  padding: 16px;
  border-radius: 15px;
  border: 1px solid var(--line);
  background: #11151a;
}
.checklist-box h3 { margin: 0; font-size: 16px; }
.checklist-box p { margin: 5px 0 8px; }
.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid #2d343d;
  border-radius: 11px;
  background: #0f1216;
  cursor: pointer;
}
.check-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

@media (max-width: 700px) {
  .location-actions { width: 100%; }
  .location-actions > * { flex: 1; }
  .participant-summary-phone { display: none; }
  .modal-card { padding: 17px; }
}


/* ---------- Public event participant portal ---------- */

.detail-panel-wide {
  grid-column: 1 / -1;
}

.participant-portal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.participant-portal-head h3 {
  margin-bottom: 8px;
}

.participant-portal-head p {
  margin: 0;
}

.participant-login-panel {
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
}

.participant-login-actions,
.compact-status {
  grid-column: 1 / -1;
}

.participant-login-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.compact-status {
  margin: 0;
  min-height: 0;
  padding: 10px 12px;
}

.participant-dashboard {
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.participant-welcome {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.participant-welcome h3 {
  margin: 4px 0 0;
}

.participant-checklist {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
}

.participant-checklist h4 {
  margin: 0 0 14px;
}

.participant-checklist-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.participant-check-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
}

.check-state {
  width: 24px;
  height: 24px;
  border: 1px solid var(--line);
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  color: var(--muted);
  font-weight: 800;
}

.check-state.done {
  background: #2ea043;
  border-color: #2ea043;
  color: white;
}

.participant-checklist-note {
  margin: 14px 0 0 !important;
  font-size: 12px;
  color: var(--muted) !important;
}

@media (max-width: 760px) {
  .participant-portal-head {
    align-items: stretch;
    flex-direction: column;
  }

  .participant-portal-head .primary-button {
    width: 100%;
  }

  .participant-login-panel {
    grid-template-columns: 1fr;
  }

  .participant-login-actions,
  .compact-status {
    grid-column: 1;
  }

  .participant-checklist-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}


/* ---------- Login-first participant event page ---------- */

.participant-session-indicator {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
}

.participant-session-indicator > div {
  display: grid;
  line-height: 1.2;
}

.participant-session-indicator strong {
  font-size: 12px;
}

.participant-session-indicator #participantSessionName {
  color: var(--muted);
  font-size: 11px;
}

.participant-session-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #2ea043;
  box-shadow: 0 0 0 3px rgba(46, 160, 67, .16);
  flex: 0 0 auto;
}

.compact-button {
  padding: 8px 11px;
}

.participant-login-screen {
  min-height: calc(100vh - 170px);
  display: grid;
  place-items: center;
  padding: 28px 0;
}

.participant-login-card {
  width: min(100%, 460px);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 30px;
}

.participant-login-card h1 {
  margin: 6px 0 8px;
  font-size: clamp(32px, 5vw, 46px);
}

.participant-login-subtitle {
  margin: 0 0 24px;
  color: var(--muted);
}

.participant-login-card .field {
  margin-bottom: 16px;
}

.participant-login-submit {
  width: 100%;
  margin-top: 6px;
}

.participant-dashboard-panel {
  margin-top: 18px;
}

@media (max-width: 700px) {
  .participant-session-indicator #participantSessionName {
    display: none;
  }

  .participant-session-indicator {
    gap: 7px;
  }

  .participant-login-card {
    padding: 22px;
  }
}


/* ---------- Event type + participant profile V3 ---------- */

.event-type-toggle {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(130px, 1fr));
  gap: 8px;
  padding: 5px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.event-type-option {
  cursor: pointer;
}

.event-type-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.event-type-option span {
  display: grid;
  place-items: center;
  min-height: 42px;
  padding: 8px 16px;
  border-radius: 10px;
  color: var(--muted);
  font-weight: 800;
  transition: .16s ease;
}

.event-type-option input:checked + span {
  background: var(--accent);
  color: #111;
}

.checklist-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.checklist-permission-note {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--muted);
  margin: 8px 0 14px;
}

.permission-badge {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 7px;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .08em;
}

.permission-badge.admin-only {
  color: var(--accent);
  border-color: rgba(242, 169, 59, .45);
}

.permission-badge.participant-edit {
  color: #8bd49c;
  border-color: rgba(86, 211, 100, .35);
}

.participant-fields-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.field-card {
  min-height: 62px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
}

.field-card > span {
  display: grid;
  gap: 2px;
}

.field-card small,
.field small {
  color: var(--muted);
  font-weight: 500;
  font-size: 10px;
}

.admin-field {
  border-color: rgba(242, 169, 59, .28);
}

.participant-field {
  border-color: rgba(86, 211, 100, .20);
}

.event-specific-fields {
  margin-top: 14px;
}

.time-input-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.status-pill.event-type-tunnel,
.status-pill.event-type-skydive {
  text-transform: uppercase;
}

.participant-profile-form {
  display: grid;
  gap: 18px;
}

.participant-section-title h4 {
  margin: 0 0 4px;
}

.participant-section-title p {
  margin: 0;
}

.readonly-field {
  opacity: .82;
}

.readonly-field input[readonly],
.readonly-field input:disabled {
  cursor: default;
}

.participant-profile-actions {
  display: flex;
  justify-content: flex-end;
  padding-top: 4px;
}

#participantSaveStatus {
  margin: 0;
}

@media (max-width: 700px) {
  .participant-fields-grid {
    grid-template-columns: 1fr;
  }

  .event-type-toggle {
    width: 100%;
  }

  .time-input-row {
    grid-template-columns: 1fr 1fr;
  }
}


/* ---------- Payments + participant spreadsheet export ---------- */

.participants-header-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.compact-export-button {
  padding: 8px 11px;
  min-height: 34px;
  white-space: nowrap;
}

.payment-box {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid rgba(242, 169, 59, .28);
  border-radius: 14px;
  background: rgba(242, 169, 59, .035);
}

.payment-box-head h3 {
  margin: 0 0 3px;
}

.payment-box-head p {
  margin: 0 0 14px;
}

.payment-table {
  display: grid;
  gap: 8px;
}

.payment-row {
  display: grid;
  grid-template-columns: minmax(110px, 1.1fr) repeat(3, minmax(90px, 1fr));
  align-items: center;
  gap: 8px;
}

.payment-row-head {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .05em;
  padding: 0 4px;
}

.payment-field input {
  width: 100%;
  min-width: 0;
}

.payment-left {
  display: flex;
  align-items: center;
  min-height: 43px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  font-weight: 800;
  color: var(--accent);
}

@media (max-width: 720px) {
  .participants-header {
    align-items: flex-start;
  }

  .participants-header-actions {
    flex-direction: column-reverse;
    align-items: flex-end;
  }

  .payment-row {
    grid-template-columns: 1fr;
    gap: 5px;
    padding: 10px 0;
    border-top: 1px solid var(--line);
  }

  .payment-row-head {
    display: none;
  }

  .payment-row strong {
    margin-bottom: 4px;
  }

  .payment-field::before {
    display: block;
    color: var(--muted);
    font-size: 10px;
    margin-bottom: 4px;
  }

  .payment-row .payment-field:nth-child(2)::before { content: "Total"; }
  .payment-row .payment-field:nth-child(3)::before { content: "Paid"; }

  .payment-left::before {
    content: "Left to pay: ";
    color: var(--muted);
    font-weight: 600;
    margin-right: 6px;
  }
}


/* ---------- V6 Payment layout ---------- */

.payment-section {
  display: grid;
  gap: 8px;
}

.coach-payment-section {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 8px;
}

.coach-payment-title {
  display: block;
  margin-bottom: 2px;
}

.payment-row-no-label {
  grid-template-columns: repeat(3, minmax(90px, 1fr));
}

.participant-payment-status {
  margin-top: 18px;
}

.readonly-payment-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.readonly-payment-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg);
}

.readonly-payment-card > strong {
  display: block;
  margin-bottom: 12px;
  font-size: 15px;
}

.readonly-payment-values {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.readonly-payment-values > div {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
}

.readonly-payment-values span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.readonly-payment-values b {
  font-size: 14px;
}

.readonly-payment-values > div:last-child b {
  color: var(--accent);
}

@media (max-width: 760px) {
  .readonly-payment-grid {
    grid-template-columns: 1fr;
  }

  .readonly-payment-values {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .payment-row-no-label {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}


/* ---------- V7 participant info + logbook ---------- */

.event-participant-welcome {
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin: 7px 0 5px;
  font-size: 15px;
}

.event-participant-welcome span {
  color: var(--muted);
}

.event-participant-welcome strong {
  color: var(--accent);
}

.missing-admin-info {
  margin-top: 15px;
  padding: 12px 14px;
  border: 1px solid rgba(248, 81, 73, .55);
  border-radius: 12px;
  background: rgba(248, 81, 73, .08);
  color: #ff8d86;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  font-size: 12px;
}

.missing-required-field {
  border-color: rgba(248, 81, 73, .75) !important;
  box-shadow: 0 0 0 1px rgba(248, 81, 73, .15);
}

.participant-collapsible {
  margin-top: 18px;
  padding: 0;
  overflow: hidden;
}

.participant-collapsible > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  user-select: none;
}

.participant-collapsible > summary::-webkit-details-marker {
  display: none;
}

.participant-collapsible > summary h3 {
  margin: 0 0 3px;
}

.participant-collapsible > summary p {
  margin: 0;
}

.collapse-chevron {
  font-size: 20px;
  color: var(--muted);
  transition: transform .18s ease;
}

.participant-collapsible[open] .collapse-chevron {
  transform: rotate(180deg);
}

.participant-collapse-content {
  border-top: 1px solid var(--line);
  padding: 18px 20px 20px;
}

.participant-admin-note {
  margin-top: 0;
}

.participant-logbook-list {
  display: grid;
  gap: 10px;
}

.logbook-entry {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 16px;
  align-items: center;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
}

.logbook-entry-main {
  display: flex;
  gap: 10px;
  align-items: baseline;
}

.logbook-entry-main span,
.logbook-entry-date {
  color: var(--muted);
  font-size: 12px;
}

.logbook-entry p {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.admin-logbook-box {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,.015);
}

.admin-logbook-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.admin-logbook-head h3,
.admin-logbook-head p {
  margin: 0;
}

.admin-logbook-list {
  display: grid;
  gap: 9px;
}

.admin-logbook-entry {
  display: grid;
  grid-template-columns: 140px 100px 1fr 1fr auto;
  gap: 8px;
  align-items: end;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
}

.admin-logbook-entry .field {
  margin: 0;
}

.admin-logbook-empty {
  margin: 0;
}

@media (max-width: 850px) {
  .admin-logbook-entry {
    grid-template-columns: 1fr 1fr;
  }

  .admin-logbook-entry .logbook-notes-field {
    grid-column: 1 / -1;
  }

  .admin-logbook-entry .remove-logbook-entry {
    align-self: center;
  }
}

@media (max-width: 600px) {
  .admin-logbook-entry {
    grid-template-columns: 1fr;
  }

  .logbook-entry {
    grid-template-columns: 1fr;
  }

  .logbook-entry-date {
    justify-self: start;
  }
}


/* V8 mobile index + persistent participant login */

.remember-login-row {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: -4px 0 18px;
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
}

.remember-login-row input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

.other-events-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 22px;
  padding: 11px 16px;
  border: 1px solid rgba(242, 169, 59, .55);
  border-radius: 999px;
  background: rgba(242, 169, 59, .08);
  color: var(--text);
  font-weight: 800;
  text-decoration: none;
}

.event-card__topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.event-card__icons {
  display: flex;
  align-items: center;
  gap: 7px;
}

.event-country-flag,
.event-type-icon {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255,255,255,.025);
  font-size: 20px;
  line-height: 1;
}

.event-type-icon {
  font-size: 17px;
}

@media (max-width: 700px) {
  .hero {
    padding: 72px 20px 42px;
  }

  .hero__inner h1 {
    font-size: clamp(42px, 13vw, 62px);
    line-height: .98;
  }

  .other-events-link {
    width: 100%;
    max-width: 290px;
    margin-top: 24px;
    padding: 13px 18px;
  }

  .page {
    padding-left: 16px;
    padding-right: 16px;
  }

  .section-head h2 {
    font-size: 26px;
    line-height: 1.08;
  }

  .event-card {
    padding: 17px;
    border-radius: 16px;
  }

  .event-card h3 {
    font-size: 23px;
    margin-top: 12px;
    margin-bottom: 7px;
  }

  .event-country-flag,
  .event-type-icon {
    width: 32px;
    height: 32px;
  }
}


/* ---------- V9 Event-level Skydive Logbook ---------- */

.admin-event-logbook {
  margin: 28px auto 0;
  width: min(100%, 1200px);
}

.admin-event-logbook-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.admin-event-logbook-head h2,
.admin-event-logbook-head p {
  margin: 0;
}

.event-logbook-days {
  display: grid;
  gap: 18px;
}

.logbook-day-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  overflow: hidden;
}

.logbook-day-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.logbook-day-title-wrap {
  display: grid;
  grid-template-columns: 180px minmax(220px, 1fr);
  gap: 10px;
  flex: 1;
}

.logbook-day-actions,
.logbook-load-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.logbook-loads {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.logbook-load-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg);
  overflow: hidden;
}

.logbook-load-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
}

.load-number-field {
  width: 150px;
}

.logbook-groups {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.logbook-group-card {
  border: 1px solid rgba(242, 169, 59, .22);
  border-radius: 12px;
  padding: 12px;
  background: rgba(242, 169, 59, .025);
}

.logbook-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.logbook-group-grid {
  display: grid;
  grid-template-columns: minmax(180px, .65fr) minmax(220px, 1fr);
  gap: 10px;
}

.logbook-group-participants-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 8px 0 7px;
  font-size: 12px;
  font-weight: 700;
}

.logbook-group-participants {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.logbook-participant-choice {
  cursor: pointer;
}

.logbook-participant-choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.logbook-participant-choice span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.logbook-participant-choice input:checked + span {
  color: #111;
  background: var(--accent);
  border-color: var(--accent);
}

.danger-ghost-button {
  border: 1px solid rgba(248, 81, 73, .35);
  color: #ff8d86;
  background: transparent;
  border-radius: 10px;
  padding: 9px 11px;
  cursor: pointer;
  font-weight: 700;
}

.coached-jump-label {
  color: var(--accent) !important;
  font-weight: 800;
}

@media (max-width: 760px) {
  .admin-event-logbook-head,
  .logbook-day-header,
  .logbook-load-header {
    align-items: stretch;
    flex-direction: column;
  }

  .logbook-day-title-wrap,
  .logbook-group-grid {
    grid-template-columns: 1fr;
  }

  .load-number-field {
    width: 100%;
  }

  .logbook-day-actions,
  .logbook-load-actions {
    width: 100%;
  }

  .logbook-day-actions > *,
  .logbook-load-actions > * {
    flex: 1;
  }
}


/* ---------- V10 index admin + real flag images ---------- */

.admin-home-link {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 40;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(17, 21, 26, .92);
  color: var(--text);
  text-decoration: none;
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(10px);
}

.admin-home-link:hover {
  border-color: rgba(242, 169, 59, .65);
  color: var(--accent);
}

.event-country-flag {
  overflow: hidden;
}

.event-country-flag-img {
  display: block;
  width: 28px;
  height: 20px;
  object-fit: cover;
  border-radius: 3px;
  box-shadow: 0 0 0 1px rgba(255,255,255,.12);
}

.event-country-fallback {
  font-size: 18px;
}

@media (max-width: 700px) {
  .admin-home-link {
    top: 10px;
    right: 10px;
    padding: 8px 10px;
  }

  .admin-home-link span:last-child {
    display: none;
  }
}

/* Ensure the event logbook is visually separated inside the event editor. */
#editorView .admin-event-logbook {
  margin-top: 24px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
}


/* ---------- V11 Admin collapsed details + simplified logbook ---------- */

.event-details-collapsible {
  padding: 0 !important;
  overflow: hidden;
}

.event-details-summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 20px;
  user-select: none;
}

.event-details-summary::-webkit-details-marker {
  display: none;
}

.event-details-summary h2,
.event-details-summary p {
  margin: 0;
}

.event-details-summary h2 {
  margin-bottom: 3px;
}

.event-details-collapsible[open] .collapse-chevron {
  transform: rotate(180deg);
}

.event-details-content {
  border-top: 1px solid var(--line);
  padding: 20px;
}

.logbook-top-actions {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
}

.logbook-participant-picker {
  display: flex;
  align-items: end;
  gap: 9px;
  margin-top: 10px;
}

.logbook-selected-participants {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}

.logbook-selected-participant {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 6px 8px 6px 11px;
  border: 1px solid rgba(242, 169, 59, .38);
  border-radius: 999px;
  background: rgba(242, 169, 59, .08);
  font-size: 12px;
  font-weight: 800;
}

.remove-logbook-participant {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,.06);
  color: var(--muted);
  cursor: pointer;
}

.remove-logbook-participant:hover {
  color: #ff8d86;
}

@media (max-width: 760px) {
  .event-details-summary {
    padding: 16px;
  }

  .event-details-content {
    padding: 16px;
  }

  .logbook-top-actions {
    width: 100%;
  }

  .logbook-top-actions > * {
    flex: 1;
  }

  .logbook-participant-picker {
    align-items: stretch;
    flex-direction: column;
  }

  .logbook-participant-picker .field-button {
    width: 100%;
  }
}


/* ---------- V12 Logbook layout cleanup ---------- */

#editorView .admin-event-logbook {
  margin-top: 16px;
  margin-bottom: 18px;
}

#editorView .admin-event-logbook-head h2 {
  margin: 0;
}

#editorView .admin-event-logbook-head .eyebrow {
  display: none;
}

/* V13 requested admin arrangement */
.editor-grid-v13{display:grid;grid-template-columns:minmax(0,2fr) minmax(340px,1fr);gap:18px;align-items:start}
.editor-left-column{display:grid;gap:18px;min-width:0}
.editor-grid-v13 .admin-event-logbook{margin:0!important;width:100%;box-sizing:border-box}
.participants-collapsible,.admin-event-logbook{padding:0!important;overflow:hidden}
.participants-summary,.logbook-summary{list-style:none;cursor:pointer;display:flex;align-items:center;justify-content:space-between;gap:14px;padding:18px 20px;user-select:none}
.participants-summary::-webkit-details-marker,.logbook-summary::-webkit-details-marker{display:none}
.participants-summary h2,.participants-summary p,.logbook-summary h2,.logbook-summary p{margin:0}
.participants-summary h2,.logbook-summary h2{margin-bottom:3px}
.participants-collapsible[open] .collapse-chevron,.admin-event-logbook[open] .collapse-chevron{transform:rotate(180deg)}
.participants-content,.logbook-collapsible-content{border-top:1px solid var(--line);padding:20px}
.participants-content .participants-header-actions,.logbook-collapsible-content .logbook-top-actions{display:flex;justify-content:flex-end;margin-bottom:16px}
@media(max-width:920px){.editor-grid-v13{grid-template-columns:1fr}.editor-left-column{order:1}.participants-collapsible{order:2}}

.editor-left-column{gap:8px!important;}


/* ---------- V15 unified collapsible box headers ---------- */

/* The three top editor boxes use exactly the same collapsed header geometry. */
.event-details-collapsible,
.participants-collapsible,
.admin-event-logbook {
  display: block !important;
  min-height: 0 !important;
}

.event-details-summary,
.participants-summary,
.logbook-summary {
  box-sizing: border-box;
  width: 100%;
  min-height: 106px;
  padding: 18px 20px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 14px;
}

.event-details-summary > div,
.participants-summary > div,
.logbook-summary > div {
  min-width: 0;
}

.event-details-summary h2,
.participants-summary h2,
.logbook-summary h2 {
  margin: 0 0 3px !important;
  font-size: 21px !important;
  line-height: 1.2;
}

.event-details-summary p,
.participants-summary p,
.logbook-summary p {
  margin: 0 !important;
  line-height: 1.35 !important;
}

/* Same arrow placement and appearance on all three boxes. */
.event-details-summary .collapse-chevron,
.participants-summary .collapse-chevron,
.logbook-summary .collapse-chevron {
  flex: 0 0 auto;
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  font-size: 16px;
  line-height: 1;
  color: var(--muted);
  transition: transform .18s ease;
}

/* Closed boxes should contain only the header, with no inherited empty height. */
.event-details-collapsible:not([open]),
.participants-collapsible:not([open]),
.admin-event-logbook:not([open]) {
  height: auto !important;
}

.editor-side {
  min-height: 0 !important;
}

/* Keep the requested tighter Event Details -> Logbook spacing. */
.editor-left-column {
  gap: 8px !important;
}

@media (max-width: 760px) {
  .event-details-summary,
  .participants-summary,
  .logbook-summary {
    min-height: 94px;
    padding: 16px !important;
  }
}


/* ---------- V16 visibility + summary actions ---------- */

/* Native date calendar icons: force white on dark UI. */
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="datetime-local"]::-webkit-calendar-picker-indicator,
input[type="month"]::-webkit-calendar-picker-indicator,
input[type="week"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator {
  filter: invert(1) brightness(2);
  opacity: 1;
  cursor: pointer;
}

/* Header title + participant count sit together. */
.summary-title-with-count {
  display: flex;
  align-items: center;
  gap: 9px;
}

.summary-title-with-count h2 {
  margin: 0 0 3px !important;
}

/* Export buttons live beside the collapse arrow. */
.summary-right-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.summary-export-button {
  white-space: nowrap;
  min-height: 38px;
  padding: 8px 12px;
}

/* Make all collapsible arrows much easier to see. */
.event-details-summary .collapse-chevron,
.participants-summary .collapse-chevron,
.logbook-summary .collapse-chevron {
  width: 30px !important;
  height: 30px !important;
  font-size: 22px !important;
  font-weight: 900;
  color: #ffffff !important;
  opacity: 1 !important;
  border-radius: 50%;
  background: rgba(255,255,255,.07);
}

/* Don't leave an empty old participant action area. */
.participants-content > .participants-header-actions:empty {
  display: none;
}

@media (max-width: 760px) {
  .summary-right-actions {
    gap: 6px;
  }

  .summary-export-button {
    padding: 7px 9px;
    font-size: 12px;
  }

  .participants-summary,
  .logbook-summary {
    align-items: center !important;
  }
}


/* ---------- V19 step-by-step Logbook ---------- */

.summary-save-button {
  min-height: 38px;
  padding: 8px 14px;
  white-space: nowrap;
}

.logbook-step-heading {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logbook-step-heading > div {
  display: grid;
  gap: 2px;
}

.logbook-step-number {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(242, 169, 59, .12);
  border: 1px solid rgba(242, 169, 59, .35);
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
}

.logbook-day-header,
.logbook-load-header {
  align-items: center !important;
}

.logbook-day-controls,
.logbook-load-controls {
  display: flex;
  align-items: end;
  gap: 8px;
  flex-wrap: wrap;
}

.logbook-day-date-field {
  min-width: 230px;
}

.logbook-participant-boxes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 7px;
}

.logbook-participant-box {
  min-height: 38px;
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #20252c;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, color .15s ease,
              transform .15s ease;
}

.logbook-participant-box:hover {
  border-color: rgba(255,255,255,.35);
  transform: translateY(-1px);
}

.logbook-participant-box.is-selected {
  background: rgba(46, 160, 67, .22);
  border-color: #3fb950;
  color: #7ee787;
  box-shadow: inset 0 0 0 1px rgba(63,185,80,.18);
}

.logbook-participant-box.is-selected::before {
  content: "✓ ";
}

.logbook-group-card .field > span {
  display: block;
}

@media (max-width: 760px) {
  .logbook-day-controls,
  .logbook-load-controls {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
  }

  .logbook-day-date-field,
  .load-number-field {
    width: 100%;
    min-width: 0;
  }

  .summary-save-button,
  .summary-export-button {
    padding: 7px 9px;
    font-size: 12px;
  }
}


/* ---------- V20 Logbook day -> load -> group flow ---------- */

.logbook-day-adder {
  justify-content: flex-start !important;
  align-items: end;
  gap: 10px;
}

.logbook-add-day-field {
  min-width: 270px;
  margin: 0;
}

.logbook-day-actions,
.logbook-load-controls {
  display: flex;
  align-items: end;
  gap: 8px;
  flex-wrap: wrap;
}

.logbook-day-display-date {
  display: block;
  margin-top: 2px;
}

.summary-save-button {
  display: none !important;
}

@media (max-width: 760px) {
  .logbook-day-adder,
  .logbook-day-actions,
  .logbook-load-controls {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
  }

  .logbook-add-day-field {
    min-width: 0;
    width: 100%;
  }
}


/* ---------- V21 Event date dropdown fix ---------- */

.logbook-day-adder #addLogbookDayButton {
  width: auto !important;
  min-width: 0 !important;
  min-height: 36px;
  padding: 8px 12px;
  font-size: 12px;
  white-space: nowrap;
  flex: 0 0 auto !important;
}

.logbook-day-adder {
  align-items: end !important;
}

@media (max-width: 760px) {
  .logbook-day-adder #addLogbookDayButton {
    width: fit-content !important;
    align-self: flex-start;
  }
}


/* ---------- V22 Logbook defaults + group confirmation ---------- */

/* Remove the old yellow step numbers completely. */
.logbook-step-number {
  display: none !important;
}

.logbook-step-heading {
  gap: 0 !important;
}

.logbook-group-confirm-row {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.confirm-group-button {
  min-width: 112px;
}

.group-confirmed-label {
  color: #7ee787;
  font-size: 12px;
  font-weight: 800;
}

.logbook-group-card.is-confirmed {
  border-color: rgba(63, 185, 80, .45);
}

@media (max-width: 760px) {
  .logbook-group-confirm-row {
    justify-content: stretch;
  }

  .confirm-group-button {
    width: 100%;
  }
}


/* ---------- V23 defaults + compact confirmed groups ---------- */

.logbook-group-summary {
  min-height: 66px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logbook-group-summary.hidden,
.logbook-group-editor.hidden {
  display: none !important;
}

.logbook-group-summary-main {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.logbook-group-summary-title {
  font-size: 15px;
  font-weight: 900;
}

.logbook-group-summary-coach,
.logbook-group-summary-participants,
.logbook-group-summary-notes {
  font-size: 12px;
}

.logbook-group-summary-participants {
  font-weight: 800;
  color: var(--text);
}

.logbook-group-summary-actions {
  display: flex;
  gap: 7px;
  flex: 0 0 auto;
}

.logbook-group-card.is-confirmed {
  padding: 0 !important;
  border-color: rgba(63, 185, 80, .38);
  background: rgba(63, 185, 80, .025);
}

.logbook-group-card.is-confirmed .logbook-group-summary {
  border-left: 3px solid #3fb950;
}

#newLogbookDaySelect:not(:disabled) {
  font-weight: 700;
}

.logbook-load-number {
  font-weight: 800;
}

@media (max-width: 760px) {
  .logbook-group-summary {
    align-items: stretch;
    flex-direction: column;
  }

  .logbook-group-summary-actions {
    width: 100%;
  }

  .logbook-group-summary-actions > * {
    flex: 1;
  }
}


/* ---------- V26 restore previous admin collapse arrows ---------- */
.event-details-summary .collapse-chevron,
.participants-summary .collapse-chevron,
.logbook-summary .collapse-chevron {
  width: 24px !important;
  height: 24px !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  color: var(--muted) !important;
  background: transparent !important;
  border-radius: 0 !important;
  opacity: 1 !important;
}

/* ---------- V26 participant logbook table ---------- */
.participant-logbook-day {
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  margin-top: 12px;
  background: var(--panel);
}

.participant-logbook-day-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 15px;
  border-bottom: 1px solid var(--line);
}

.participant-logbook-day-header h3 {
  margin: 0;
  font-size: 16px;
}

.participant-logbook-day-header span {
  color: var(--muted);
  font-size: 12px;
}

.participant-logbook-table-wrap {
  overflow-x: auto;
}

.participant-logbook-table {
  width: 100%;
  border-collapse: collapse;
}

.participant-logbook-table th,
.participant-logbook-table td {
  padding: 11px 14px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

.participant-logbook-table th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--muted);
}

.participant-logbook-table td {
  font-size: 13px;
}

.participant-logbook-table tbody tr:last-child td {
  border-bottom: 0;
}


/* ---------- V28 group summary layout ---------- */

.logbook-group-summary-main {
  flex: 1 1 auto !important;
  display: grid !important;
  grid-template-columns: 48px 110px minmax(0, 1fr);
  align-items: center;
  column-gap: 14px;
  min-width: 0;
}

.logbook-group-summary-number,
.logbook-group-summary-coach,
.logbook-group-summary-participants {
  font-size: 15px !important;
  line-height: 1.3;
}

.logbook-group-summary-number {
  font-weight: 800;
  color: var(--text);
}

.logbook-group-summary-coach,
.logbook-group-summary-participants {
  font-weight: 500;
  color: var(--text);
}

.logbook-group-summary-participants {
  min-width: 0;
  overflow-wrap: anywhere;
}

@media (max-width: 700px) {
  .logbook-group-summary-main {
    grid-template-columns: 32px 80px minmax(0, 1fr);
    column-gap: 9px;
  }

  .logbook-group-summary-number,
  .logbook-group-summary-coach,
  .logbook-group-summary-participants {
    font-size: 13px !important;
  }
}


/* ---------- V29 participant optional sections + stats ---------- */

.missing-admin-info {
  font-size: 15px !important;
  line-height: 1.45;
  padding: 13px 15px !important;
}

.missing-admin-info strong {
  font-size: 16px;
}

.participant-logbook-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 7px;
  font-size: 12px;
  color: var(--muted);
}

.participant-logbook-stats strong {
  color: var(--text);
  font-size: 14px;
}

.event-cost-data-box {
  margin-top: 4px;
}


/* ---------- V30 Living location + Event venue ---------- */

.event-venue-box {
  margin-top: 4px;
}

.event-info-stack {
  display: grid;
  gap: 6px;
  line-height: 1.45;
}

.event-info-stack strong {
  color: var(--text);
}

.event-info-stack span {
  color: var(--muted);
}

.event-info-link {
  display: inline-flex;
  width: fit-content;
  margin-top: 3px;
  color: var(--accent);
  font-weight: 800;
  text-decoration: none;
}

.event-info-link:hover {
  text-decoration: underline;
}


/* ---------- V31 collapsible Day + Load ---------- */

.logbook-collapse-button {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255,255,255,.04);
  color: var(--text);
  font-size: 17px;
  font-weight: 900;
  cursor: pointer;
}

.logbook-collapse-button:hover {
  border-color: rgba(255,255,255,.35);
}

.logbook-day-card.is-collapsed .logbook-day-body,
.logbook-load-card.is-collapsed .logbook-load-body {
  display: none;
}

.logbook-day-card.is-collapsed .logbook-day-header,
.logbook-load-card.is-collapsed .logbook-load-header {
  border-bottom: 0;
}

.selected-venue-details {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}


/* V32 compact mobile admin logbook */
.logged-in-admin-name{max-width:90px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#signOutButton{position:relative;width:42px;min-width:42px;height:42px;padding:0;display:inline-grid;place-items:center}
.signout-icon{font-size:21px;line-height:1;transform:rotate(180deg)}
.signout-tooltip{position:absolute;right:0;top:calc(100% + 7px);z-index:20;padding:6px 9px;border:1px solid var(--line);border-radius:8px;background:#111419;color:var(--text);font-size:12px;font-weight:700;white-space:nowrap;opacity:0;pointer-events:none}
#signOutButton:hover .signout-tooltip,#signOutButton:focus-visible .signout-tooltip{opacity:1}
.logbook-day-header,.logbook-load-header{display:flex;align-items:center;justify-content:space-between;gap:8px}
.logbook-title-with-collapse,.logbook-day-actions,.logbook-load-controls{display:flex;align-items:center;gap:7px;flex-wrap:nowrap}
.logbook-day-display-date{display:block;margin-top:2px}
.logbook-action-icon{width:34px!important;min-width:34px!important;height:34px!important;padding:0!important;display:inline-grid!important;place-items:center;font-size:19px;font-weight:900;border-radius:9px}
.logbook-load-body>.load-number-field{max-width:180px;margin-bottom:12px}
.logbook-day-card.is-collapsed .logbook-day-body,.logbook-load-card.is-collapsed .logbook-load-body{display:none!important}
@media(max-width:600px){
.logbook-day-header,.logbook-load-header{flex-direction:row!important;align-items:center!important}
.logbook-day-actions,.logbook-load-controls{width:auto!important;margin-left:auto}
.logbook-day-card,.logbook-load-card{padding-left:12px;padding-right:12px}
.logbook-day-display-title,.logbook-load-display-title{font-size:15px}
.logbook-day-display-date{font-size:11px}
.logbook-collapse-button,.logbook-action-icon{width:31px!important;min-width:31px!important;height:31px!important}
.logbook-title-with-collapse{gap:5px}
.logbook-top-actions.logbook-day-adder{display:grid;grid-template-columns:minmax(0,1fr) 34px;align-items:end;gap:8px}
#addLogbookDayButton{height:48px!important}
.logged-in-admin-name{max-width:70px;font-size:12px}
#signOutButton{width:38px;min-width:38px;height:38px}
}


/* ---------- V33 Admin mobile visual refinement ---------- */

/* Admin name in header */
.logged-in-indicator {
  gap: 7px;
}

.logged-in-admin-name {
  display: inline-block;
  max-width: 90px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  line-height: 1.1;
}

/* Day / Load header layout */
.logbook-day-header,
.logbook-load-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
}

.logbook-day-title-row,
.logbook-load-title-row {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 6px;
}

/* Same visual language as the main collapsible sections:
   plain chevron, no boxed button. */
.collapse-inline-chevron {
  flex: 0 0 auto;
  width: 18px;
  min-width: 18px;
  height: 24px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
}

.collapse-inline-chevron:hover,
.collapse-inline-chevron:focus-visible {
  color: var(--text);
  background: transparent;
  outline: none;
}

.logbook-day-display-title,
.logbook-load-label {
  white-space: nowrap;
}

/* + and × always next to one another and identical dimensions */
.logbook-compact-actions {
  display: flex !important;
  flex: 0 0 auto;
  align-items: center !important;
  justify-content: flex-end;
  gap: 6px !important;
  width: auto !important;
  margin-left: auto !important;
}

.logbook-action-icon {
  box-sizing: border-box !important;
  width: 34px !important;
  min-width: 34px !important;
  max-width: 34px !important;
  height: 34px !important;
  min-height: 34px !important;
  padding: 0 !important;
  margin: 0 !important;
  display: inline-grid !important;
  place-items: center !important;
  border-radius: 9px !important;
  line-height: 1 !important;
  font-size: 18px !important;
  font-weight: 900 !important;
}

/* Load number lives directly in the header. */
.logbook-load-number-inline {
  box-sizing: border-box;
  width: 54px !important;
  min-width: 54px !important;
  max-width: 54px !important;
  height: 34px !important;
  min-height: 34px !important;
  margin: 0 0 0 2px !important;
  padding: 4px 8px !important;
  border-radius: 8px !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  text-align: center;
}

/* Entire content under load header collapses. */
.logbook-load-card.is-collapsed .logbook-load-body,
.logbook-day-card.is-collapsed .logbook-day-body {
  display: none !important;
}

@media (max-width: 600px) {
  .logged-in-admin-name {
    max-width: 64px;
    font-size: 12px;
  }

  .logbook-day-header,
  .logbook-load-header {
    flex-direction: row !important;
    flex-wrap: nowrap !important;
  }

  .logbook-day-title-row,
  .logbook-load-title-row {
    gap: 4px;
  }

  .logbook-compact-actions {
    gap: 5px !important;
  }

  .logbook-action-icon {
    width: 32px !important;
    min-width: 32px !important;
    max-width: 32px !important;
    height: 32px !important;
    min-height: 32px !important;
  }

  .logbook-load-number-inline {
    width: 48px !important;
    min-width: 48px !important;
    max-width: 48px !important;
    height: 32px !important;
    min-height: 32px !important;
    padding: 3px 5px !important;
    font-size: 13px !important;
  }

  .collapse-inline-chevron {
    width: 16px;
    min-width: 16px;
    font-size: 14px;
  }
}


/* ---------- V34 Day dropdown + compact group icons ---------- */

/* Remove vertical space that existed for the old "Add day" field label. */
.logbook-add-day-field {
  margin: 0 !important;
}

.logbook-add-day-field select {
  height: 48px !important;
  min-height: 48px !important;
}

/* Add Day + matches the dropdown height and stays square. */
.add-day-match-button {
  box-sizing: border-box;
  width: 48px !important;
  min-width: 48px !important;
  max-width: 48px !important;
  height: 48px !important;
  min-height: 48px !important;
  padding: 0 !important;
  display: inline-grid !important;
  place-items: center !important;
  border-radius: 10px !important;
  font-size: 21px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
}

/* Group compact summary actions become small icons. */
.compact-group-icon-actions {
  display: flex !important;
  align-items: center !important;
  gap: 5px !important;
}

.group-summary-icon {
  box-sizing: border-box !important;
  width: 30px !important;
  min-width: 30px !important;
  max-width: 30px !important;
  height: 30px !important;
  min-height: 30px !important;
  padding: 0 !important;
  display: inline-grid !important;
  place-items: center !important;
  border-radius: 8px !important;
  font-size: 14px !important;
  line-height: 1 !important;
}

@media (max-width: 600px) {
  .logbook-top-actions.logbook-day-adder {
    grid-template-columns: minmax(0, 1fr) 48px !important;
    gap: 8px !important;
    align-items: center !important;
  }

  .logbook-add-day-field select,
  .add-day-match-button {
    height: 48px !important;
    min-height: 48px !important;
  }
}


/* ---------- V35 clickable Day / Load headers + refined Groups ---------- */

.logbook-day-header,
.logbook-load-header {
  cursor: pointer;
  user-select: none;
}

.logbook-day-header:hover,
.logbook-load-header:hover {
  background: rgba(255, 255, 255, 0.025);
}

/* Interactive controls inside a clickable header keep their normal cursor. */
.logbook-day-header button,
.logbook-load-header button,
.logbook-load-header input {
  cursor: pointer;
}

.logbook-load-header input {
  cursor: text;
}

/* Make the collapsed state feel like the main Logbook/Event Details boxes. */
.logbook-day-card.is-collapsed .logbook-day-header,
.logbook-load-card.is-collapsed .logbook-load-header {
  border-bottom-color: transparent;
}

/* Refined compact group card */
.logbook-group-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 13px !important;
  border-radius: 11px;
}

.logbook-group-summary.hidden {
  display: none !important;
}

.logbook-group-summary-main {
  display: grid !important;
  grid-template-columns: 34px minmax(0, 1fr) !important;
  align-items: center;
  gap: 10px !important;
  min-width: 0;
  flex: 1 1 auto;
}

.logbook-group-summary-number {
  width: 32px;
  height: 32px;
  display: inline-grid;
  place-items: center;
  border-radius: 9px;
  background: rgba(255,255,255,.06);
  font-size: 14px !important;
  font-weight: 900 !important;
}

.logbook-group-summary-info {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.logbook-group-coach-line,
.logbook-group-participants-line {
  display: flex;
  align-items: baseline;
  gap: 7px;
  min-width: 0;
}

.logbook-group-summary-label {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.logbook-group-summary-coach {
  color: var(--text);
  font-size: 14px !important;
  font-weight: 900 !important;
}

.logbook-group-summary-participants {
  min-width: 0;
  color: var(--text);
  font-size: 13px !important;
  font-weight: 750 !important;
  line-height: 1.35;
}

.compact-group-icon-actions {
  flex: 0 0 auto;
  align-self: center;
  display: flex !important;
  gap: 5px !important;
}

@media (max-width: 600px) {
  .logbook-group-summary {
    gap: 8px;
    padding: 10px !important;
  }

  .logbook-group-summary-main {
    grid-template-columns: 30px minmax(0, 1fr) !important;
    gap: 8px !important;
  }

  .logbook-group-summary-number {
    width: 28px;
    height: 28px;
    font-size: 12px !important;
  }

  .logbook-group-coach-line,
  .logbook-group-participants-line {
    gap: 5px;
  }

  .logbook-group-summary-label {
    font-size: 9px;
  }

  .logbook-group-summary-coach {
    font-size: 13px !important;
  }

  .logbook-group-summary-participants {
    font-size: 12px !important;
  }

  .group-summary-icon {
    width: 28px !important;
    min-width: 28px !important;
    max-width: 28px !important;
    height: 28px !important;
    min-height: 28px !important;
  }
}


/* ---------- V36 compact group card redesign ---------- */

.logbook-group-summary {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  padding: 12px 12px !important;
}

.logbook-group-summary.hidden {
  display: none !important;
}

.logbook-group-summary-main {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 10px !important;
  min-width: 0;
  flex: 1 1 auto;
  text-align: left;
}

.logbook-group-summary-number {
  flex: 0 0 auto;
  width: 34px !important;
  min-width: 34px !important;
  height: 34px !important;
  display: inline-grid !important;
  place-items: center !important;
  border-radius: 9px !important;
  background: rgba(255,255,255,.06) !important;
  font-size: 13px !important;
  font-weight: 900 !important;
}

.logbook-group-summary-info {
  display: grid !important;
  gap: 4px !important;
  min-width: 0;
  text-align: left;
}

.logbook-group-summary-coach {
  color: var(--text) !important;
  font-size: 14px !important;
  font-weight: 900 !important;
  line-height: 1.2 !important;
  text-align: left;
}

.logbook-group-summary-participants {
  color: var(--text) !important;
  font-size: 13px !important;
  font-weight: 650 !important;
  line-height: 1.35 !important;
  text-align: left;
  overflow-wrap: anywhere;
}

/* Same visual size as the + / × buttons in Load header. */
.compact-group-icon-actions {
  flex: 0 0 auto;
  align-self: center;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
}

.group-summary-icon {
  box-sizing: border-box !important;
  width: 34px !important;
  min-width: 34px !important;
  max-width: 34px !important;
  height: 34px !important;
  min-height: 34px !important;
  max-height: 34px !important;
  padding: 0 !important;
  margin: 0 !important;
  display: inline-grid !important;
  place-items: center !important;
  border-radius: 9px !important;
  font-size: 15px !important;
  line-height: 1 !important;
}

@media (max-width: 600px) {
  .logbook-group-summary {
    gap: 9px !important;
    padding: 10px !important;
  }

  .logbook-group-summary-main {
    gap: 8px !important;
  }

  .logbook-group-summary-number,
  .group-summary-icon {
    width: 32px !important;
    min-width: 32px !important;
    max-width: 32px !important;
    height: 32px !important;
    min-height: 32px !important;
    max-height: 32px !important;
  }

  .logbook-group-summary-coach {
    font-size: 13px !important;
  }

  .logbook-group-summary-participants {
    font-size: 12px !important;
  }

  .compact-group-icon-actions {
    gap: 5px !important;
  }
}


/* ---------- V37 mobile group alignment ---------- */

.logbook-group-summary {
  display: block !important;
  padding: 12px !important;
}

.logbook-group-summary.hidden {
  display: none !important;
}

.logbook-group-summary-left {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  width: 100%;
}

.logbook-group-left-rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
}

.logbook-group-summary-number {
  width: 34px !important;
  min-width: 34px !important;
  height: 34px !important;
  margin: 0 !important;
  display: inline-grid !important;
  place-items: center !important;
}

.compact-group-icon-actions {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 6px !important;
  margin: 0 !important;
}

.group-summary-icon {
  width: 34px !important;
  min-width: 34px !important;
  max-width: 34px !important;
  height: 34px !important;
  min-height: 34px !important;
  max-height: 34px !important;
  margin: 0 !important;
}

.logbook-group-summary-info {
  min-width: 0;
  width: 100%;
  display: grid !important;
  gap: 5px !important;
  padding-top: 1px;
  text-align: left;
}

.logbook-group-summary-coach {
  display: block;
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
}

.logbook-group-summary-participants {
  display: block;
  width: 100%;
  min-width: 0;
  text-align: left;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
  word-break: normal !important;
  line-height: 1.4 !important;
}

@media (max-width: 600px) {
  .logbook-group-summary {
    padding: 10px !important;
  }

  .logbook-group-summary-left {
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 8px;
  }

  .logbook-group-summary-number,
  .group-summary-icon {
    width: 32px !important;
    min-width: 32px !important;
    max-width: 32px !important;
    height: 32px !important;
    min-height: 32px !important;
    max-height: 32px !important;
  }

  .compact-group-icon-actions {
    gap: 5px !important;
  }

  .logbook-group-summary-info {
    padding-right: 2px;
  }

  .logbook-group-summary-coach {
    font-size: 13px !important;
  }

  .logbook-group-summary-participants {
    font-size: 12px !important;
    line-height: 1.45 !important;
  }
}


/* ---------- V38 group summary: number left, actions right ---------- */

.logbook-group-summary {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 34px !important;
  align-items: start !important;
  gap: 10px !important;
  padding: 11px 10px 11px 12px !important;
}

.logbook-group-summary.hidden {
  display: none !important;
}

.logbook-group-summary-content {
  min-width: 0;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: start;
  gap: 9px;
}

.logbook-group-summary-number {
  width: 34px !important;
  min-width: 34px !important;
  max-width: 34px !important;
  height: 34px !important;
  min-height: 34px !important;
  margin: 0 !important;
  display: inline-grid !important;
  place-items: center !important;
  align-self: start;
}

.logbook-group-summary-info {
  min-width: 0;
  width: 100%;
  display: grid !important;
  gap: 4px !important;
  padding-top: 2px;
  text-align: left !important;
}

.logbook-group-summary-coach {
  display: block;
  color: var(--text) !important;
  font-size: 14px !important;
  font-weight: 900 !important;
  line-height: 1.25 !important;
  text-align: left !important;
  white-space: normal !important;
  overflow-wrap: anywhere;
}

.logbook-group-summary-participants {
  display: block;
  min-width: 0;
  width: 100%;
  color: var(--text) !important;
  font-size: 13px !important;
  font-weight: 650 !important;
  line-height: 1.4 !important;
  text-align: left !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
  word-break: normal !important;
}

.compact-group-icon-actions {
  width: 34px;
  min-width: 34px;
  margin: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 6px !important;
  align-self: start !important;
}

.group-summary-icon {
  box-sizing: border-box !important;
  width: 34px !important;
  min-width: 34px !important;
  max-width: 34px !important;
  height: 34px !important;
  min-height: 34px !important;
  max-height: 34px !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Neutralize the previous V37 left-rail layout. */
.logbook-group-summary-left,
.logbook-group-left-rail {
  display: contents !important;
}

@media (max-width: 600px) {
  .logbook-group-summary {
    grid-template-columns: minmax(0, 1fr) 32px !important;
    gap: 8px !important;
    padding: 10px 9px 10px 10px !important;
  }

  .logbook-group-summary-content {
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 8px;
  }

  .logbook-group-summary-number,
  .group-summary-icon {
    width: 32px !important;
    min-width: 32px !important;
    max-width: 32px !important;
    height: 32px !important;
    min-height: 32px !important;
    max-height: 32px !important;
  }

  .compact-group-icon-actions {
    width: 32px;
    min-width: 32px;
    gap: 5px !important;
  }

  .logbook-group-summary-coach {
    font-size: 13px !important;
  }

  .logbook-group-summary-participants {
    font-size: 12px !important;
    line-height: 1.45 !important;
  }
}


/* ---------- V39 small sizing tweaks ---------- */

/* Add-day + button matches the + buttons used inside Day / Load headers. */
.add-day-match-button {
  width: 34px !important;
  min-width: 34px !important;
  max-width: 34px !important;
  height: 48px !important;
  min-height: 48px !important;
  padding: 0 !important;
  display: inline-grid !important;
  place-items: center !important;
  border-radius: 9px !important;
}

/* Group text slightly larger for readability. */
.logbook-group-summary-coach {
  font-size: 15px !important;
}

.logbook-group-summary-participants {
  font-size: 14px !important;
  line-height: 1.45 !important;
}

@media (max-width: 600px) {
  .logbook-top-actions.logbook-day-adder {
    grid-template-columns: minmax(0, 1fr) 34px !important;
  }

  .add-day-match-button {
    width: 34px !important;
    min-width: 34px !important;
    max-width: 34px !important;
    height: 48px !important;
    min-height: 48px !important;
  }

  .logbook-group-summary-coach {
    font-size: 14px !important;
  }

  .logbook-group-summary-participants {
    font-size: 13px !important;
  }
}


/* ---------- V40 Add Day button width ---------- */

.add-day-match-button {
  width: 68px !important;
  min-width: 68px !important;
  max-width: 68px !important;
  height: 48px !important;
  min-height: 48px !important;
}

@media (max-width: 600px) {
  .logbook-top-actions.logbook-day-adder {
    grid-template-columns: minmax(0, 1fr) 68px !important;
  }

  .add-day-match-button {
    width: 68px !important;
    min-width: 68px !important;
    max-width: 68px !important;
  }
}


/* ---------- V41 full-width Load + Group cards ---------- */

/*
  Day remains the outer card.
  Loads and Groups now use the full available horizontal width inside it,
  instead of becoming progressively narrower with every nesting level.
*/
.logbook-day-body,
.logbook-loads,
.logbook-load-body,
.logbook-groups {
  width: 100% !important;
  max-width: none !important;
}

.logbook-load-card {
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

.logbook-group-card {
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* Remove nested horizontal indentation responsible for the staircase effect. */
.logbook-day-body,
.logbook-load-body {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

.logbook-loads,
.logbook-groups {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* Keep a clean full-width divider from left to right. */
.logbook-day-body > .logbook-loads,
.logbook-load-body > .logbook-groups {
  border-left: 0 !important;
  border-right: 0 !important;
}

@media (max-width: 600px) {
  .logbook-load-card,
  .logbook-group-card {
    width: 100% !important;
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .logbook-day-body,
  .logbook-loads,
  .logbook-load-body,
  .logbook-groups {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
}


/* ---------- V42 flat full-width logbook nesting ---------- */

/*
  Load should visually span the full inner width of the Day card.
  Remove the extra nested rounded shell/border that made it look like
  a smaller card inside the Day.
*/
.logbook-day-body {
  overflow: visible !important;
}

.logbook-loads {
  width: calc(100% + 24px) !important;
  max-width: none !important;
  margin-left: -12px !important;
  margin-right: -12px !important;
}

.logbook-load-card {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding-left: 12px !important;
  padding-right: 12px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

/* A clean full-width separator defines each Load instead of an outer box. */
.logbook-load-card + .logbook-load-card {
  border-top: 1px solid var(--line) !important;
}

.logbook-load-header {
  width: 100% !important;
  border-bottom: 1px solid var(--line) !important;
  border-radius: 0 !important;
}

/*
  Groups sit inside the Load with a modest inset, but without another
  nested outer container border around the whole group region.
*/
.logbook-load-body {
  width: 100% !important;
  padding: 12px 0 0 !important;
}

.logbook-groups {
  width: 100% !important;
  margin: 0 !important;
  padding: 0 12px 12px !important;
  border: 0 !important;
}

.logbook-group-card {
  width: 100% !important;
  max-width: none !important;
  margin: 0 0 10px !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

/* Keep the actual editable/confirmed group surface, but remove the extra shell. */
.logbook-group-card .logbook-group-editor,
.logbook-group-card .logbook-group-summary {
  width: 100% !important;
  box-sizing: border-box !important;
}

@media (max-width: 600px) {
  .logbook-loads {
    width: calc(100% + 24px) !important;
    margin-left: -12px !important;
    margin-right: -12px !important;
  }

  .logbook-load-card {
    padding-left: 10px !important;
    padding-right: 10px !important;
  }

  .logbook-groups {
    padding-left: 8px !important;
    padding-right: 8px !important;
  }
}


/* ---------- V44 day header + wider Add Day button ---------- */

.add-day-match-button {
  width: 136px !important;
  min-width: 136px !important;
  max-width: 136px !important;
}

.logbook-day-display-date {
  display: none !important;
}

.logbook-day-display-title {
  white-space: normal !important;
  line-height: 1.3 !important;
}

@media (max-width: 600px) {
  .logbook-top-actions.logbook-day-adder {
    grid-template-columns: minmax(0, 1fr) 68px !important;
  }

  /* On phone: twice the width of the other 34px + buttons. */
  .add-day-match-button {
    width: 68px !important;
    min-width: 68px !important;
    max-width: 68px !important;
  }
}


/* ---------- V47 SHAKSHUKA Quests ---------- */

.admin-event-quests {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
}

.quests-summary {
  list-style: none;
  cursor: pointer;
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.quests-summary::-webkit-details-marker {
  display: none;
}

.quests-summary h2 {
  margin: 0;
}

.quests-content {
  padding: 0 20px 20px;
  border-top: 1px solid var(--line);
}

.admin-quest-categories {
  display: grid;
  gap: 12px;
  margin: 14px 0;
}

.quest-category-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: rgba(0,0,0,.12);
}

.quest-category-header,
.quest-item-editor {
  display: grid;
  grid-template-columns: minmax(0,1fr) 34px;
  align-items: center;
  gap: 8px;
}

.quest-category-title {
  font-weight: 850;
}

.quest-items {
  display: grid;
  gap: 8px;
  margin: 10px 0;
}

.quest-icon-button {
  width: 34px !important;
  min-width: 34px !important;
  height: 34px !important;
  padding: 0 !important;
  display: inline-grid !important;
  place-items: center !important;
}

.add-quest-item {
  padding: 8px 11px;
}

.participant-quests-list {
  display: grid;
  gap: 14px;
}

.participant-quest-category {
  display: grid;
  gap: 8px;
}

.participant-quest-category h4 {
  margin: 0;
  font-size: 15px;
}

.participant-quest-items {
  display: grid;
  gap: 7px;
}

.participant-quest-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255,255,255,.025);
  cursor: pointer;
}

.participant-quest-row input {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.participant-quest-row span {
  line-height: 1.35;
}

.participant-quest-row.is-complete {
  border-color: rgba(63,185,80,.6);
  background: rgba(63,185,80,.08);
}

.participant-quest-row.is-complete span {
  text-decoration: line-through;
  opacity: .75;
}

@media (max-width: 600px) {
  .quests-summary {
    padding: 16px;
  }

  .quests-content {
    padding: 0 14px 14px;
  }

  .quest-category-card {
    padding: 10px;
  }
}


/* ---------- V48 collapsible participant event information ---------- */

.event-info-boxes {
  display: grid;
  gap: 16px;
}

.event-summary-box summary,
.participant-payment-status summary {
  min-height: 68px;
}

.event-summary-title-row {
  min-width: 0;
}

.event-summary-title-row h3,
.participant-payment-status summary h3 {
  margin: 0;
}

.event-summary-right {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.event-type-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.event-type-badge:empty {
  display: none;
}

.event-summary-box .event-info-stack {
  padding-top: 2px;
}

.event-summary-box .event-info-stack span {
  color: var(--text);
}

.participant-payment-status {
  padding: 0 !important;
}

.participant-payment-status .participant-collapse-content {
  padding: 0 22px 22px;
}

.participant-payment-status .readonly-payment-grid {
  margin-top: 0;
}

@media (max-width: 600px) {
  .event-info-boxes {
    gap: 12px;
  }

  .event-summary-box summary,
  .participant-payment-status summary {
    min-height: 62px;
  }

  .event-type-badge {
    min-height: 26px;
    padding: 3px 8px;
    font-size: 10px;
  }

  .participant-payment-status .participant-collapse-content {
    padding: 0 14px 14px;
  }
}


/* ---------- V49 compact Admin venue + consolidated Event info ---------- */

/* Welcome is the main personal line; remove the need for a secondary location line. */
.event-participant-welcome {
  font-size: 18px !important;
  line-height: 1.25;
  margin-top: 8px;
}

.event-participant-welcome strong {
  font-size: 20px !important;
}

/* Event information now contains venue + living location. */
.event-information-content {
  display: grid;
  gap: 16px;
}

.event-description-text {
  margin: 0;
  line-height: 1.55;
}

.event-description-text:empty {
  display: none;
}

.event-information-item {
  display: grid;
  gap: 9px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.event-description-text:empty + .event-information-item {
  padding-top: 0;
  border-top: 0;
}

.event-information-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.event-information-item-head h4 {
  margin: 0;
  min-width: 0;
  font-size: 16px;
}

.event-information-item .event-info-stack {
  gap: 6px;
}

@media (max-width: 600px) {
  .event-participant-welcome {
    font-size: 17px !important;
  }

  .event-participant-welcome strong {
    font-size: 19px !important;
  }

  .event-information-content {
    gap: 14px;
  }

  .event-information-item {
    padding-top: 12px;
  }

  .event-information-item-head h4 {
    font-size: 15px;
  }
}


/* ---------- V50 event loading + payment due ---------- */

.readonly-payment-values b.payment-due {
  color: #ff5b5b !important;
}


/* ---------- V51 Admin participant payment editor ---------- */

.participant-payment-editor {
  padding: 18px !important;
}

.participant-payment-editor .payment-box-head {
  margin-bottom: 14px;
}

.participant-payment-editor .payment-box-head h3 {
  margin: 0;
}

.payment-editor-section {
  display: grid;
  gap: 10px;
}

.payment-editor-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  align-items: stretch;
}

.payment-editor-field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.payment-editor-field > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
}

.payment-editor-field input,
.payment-editor-field .payment-left {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  height: 46px;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 15px;
  font-weight: 700;
}

.payment-editor-field .payment-left {
  display: flex;
  align-items: center;
  color: var(--accent);
}

.participant-payment-editor .coach-payment-section {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.participant-payment-editor .coach-payment-title {
  margin-bottom: 2px;
  font-size: 15px;
}

/* Override old mobile pseudo-label layout. */
.participant-payment-editor .payment-left::before,
.participant-payment-editor .payment-field::before {
  content: none !important;
  display: none !important;
}

@media (max-width: 600px) {
  .participant-payment-editor {
    padding: 14px !important;
  }

  .payment-editor-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }

  .payment-editor-left {
    grid-column: 1 / -1;
  }

  .payment-editor-field input,
  .payment-editor-field .payment-left {
    height: 44px;
    font-size: 14px;
  }

  .payment-editor-left .payment-left {
    justify-content: space-between;
  }
}

@media (max-width: 390px) {
  .payment-editor-grid {
    grid-template-columns: 1fr;
  }

  .payment-editor-left {
    grid-column: auto;
  }
}


/* ---------- V52 compact three-column payment layout ---------- */

.participant-payment-editor .payment-editor-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 9px !important;
}

.participant-payment-editor .payment-editor-left {
  grid-column: auto !important;
}

.participant-payment-editor .payment-left::before,
.participant-payment-editor .payment-left::after {
  content: none !important;
  display: none !important;
}

.participant-payment-editor .payment-editor-field input,
.participant-payment-editor .payment-editor-field .payment-left {
  height: 46px;
  padding: 9px 11px;
}

@media (max-width: 600px) {
  .participant-payment-editor .payment-editor-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 7px !important;
  }

  .participant-payment-editor .payment-editor-left {
    grid-column: auto !important;
  }

  .participant-payment-editor .payment-editor-field > span {
    font-size: 9px;
    white-space: nowrap;
  }

  .participant-payment-editor .payment-editor-field input,
  .participant-payment-editor .payment-editor-field .payment-left {
    height: 43px;
    padding: 8px 9px;
    font-size: 13px;
  }
}

@media (max-width: 350px) {
  .participant-payment-editor .payment-editor-grid {
    gap: 5px !important;
  }

  .participant-payment-editor .payment-editor-field > span {
    font-size: 8px;
  }

  .participant-payment-editor .payment-editor-field input,
  .participant-payment-editor .payment-editor-field .payment-left {
    padding: 7px;
    font-size: 12px;
  }
}


/* ---------- V53 force Admin payment to 3 columns on mobile ---------- */

/*
  Support both the newer payment-editor markup and the older payment-row markup,
  so the mobile layout remains 3 columns even if cached HTML is still present.
*/
.participant-payment-editor .payment-editor-grid,
.payment-box .payment-row.payment-row-no-label {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 8px !important;
  align-items: end !important;
  width: 100% !important;
}

.payment-box .payment-row-head.payment-row-no-label {
  align-items: center !important;
}

.payment-box .payment-row-head.payment-row-no-label > span {
  min-width: 0 !important;
  font-size: 10px !important;
  line-height: 1.15 !important;
  white-space: nowrap !important;
}

.payment-box .payment-field,
.participant-payment-editor .payment-editor-field {
  min-width: 0 !important;
  width: 100% !important;
  margin: 0 !important;
}

.payment-box .payment-field input,
.payment-box .payment-left,
.participant-payment-editor .payment-editor-field input,
.participant-payment-editor .payment-editor-field .payment-left {
  box-sizing: border-box !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  height: 44px !important;
  margin: 0 !important;
  padding: 8px 10px !important;
  border-radius: 10px !important;
  font-size: 14px !important;
}

/* Never inject labels inside the value boxes. */
.payment-box .payment-field::before,
.payment-box .payment-field::after,
.payment-box .payment-left::before,
.payment-box .payment-left::after,
.participant-payment-editor .payment-field::before,
.participant-payment-editor .payment-left::before,
.participant-payment-editor .payment-left::after {
  content: none !important;
  display: none !important;
}

.payment-box .payment-left,
.participant-payment-editor .payment-left {
  display: flex !important;
  align-items: center !important;
  color: var(--accent) !important;
  font-weight: 800 !important;
}

@media (max-width: 600px) {
  .participant-payment-editor .payment-editor-grid,
  .payment-box .payment-row.payment-row-no-label {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 6px !important;
  }

  .payment-box .payment-row-head.payment-row-no-label > span,
  .participant-payment-editor .payment-editor-field > span {
    font-size: 9px !important;
  }

  .payment-box .payment-field input,
  .payment-box .payment-left,
  .participant-payment-editor .payment-editor-field input,
  .participant-payment-editor .payment-editor-field .payment-left {
    height: 42px !important;
    padding: 7px 8px !important;
    font-size: 13px !important;
  }
}

@media (max-width: 380px) {
  .participant-payment-editor .payment-editor-grid,
  .payment-box .payment-row.payment-row-no-label {
    gap: 5px !important;
  }

  .payment-box .payment-field input,
  .payment-box .payment-left,
  .participant-payment-editor .payment-editor-field input,
  .participant-payment-editor .payment-editor-field .payment-left {
    padding-left: 6px !important;
    padding-right: 6px !important;
    font-size: 12px !important;
  }
}


/* ---------- V54 payment notes ---------- */

.payment-notes-field {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.payment-notes-field textarea {
  resize: vertical;
  min-height: 84px;
}

.participant-payment-notes {
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255,255,255,.025);
}

.participant-payment-notes > strong {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
}

.participant-payment-notes p {
  margin: 0;
  white-space: pre-wrap;
  line-height: 1.5;
  color: var(--text);
  font-size: 13px;
}


/* ---------- V55 flat quests + competitions ---------- */

.admin-quest-items {
  display: grid;
  gap: 8px;
  margin: 14px 0;
}

.competition-admin-list,
.competition-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.competition-admin-item,
.competition-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255,255,255,.02);
}

.competition-admin-item > summary,
.competition-item > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 50px;
  padding: 12px 14px;
}

.competition-admin-item > summary::-webkit-details-marker,
.competition-item > summary::-webkit-details-marker {
  display: none;
}

.competition-admin-item[open] > summary,
.competition-item[open] > summary {
  border-bottom: 1px solid var(--line);
}

.competition-admin-body,
.competition-item-body {
  padding: 12px 14px 14px;
}

.competition-item-body p {
  margin: 0;
  white-space: pre-wrap;
  line-height: 1.5;
}

.competition-admin-item[open] > summary .collapse-chevron,
.competition-item[open] > summary .collapse-chevron {
  transform: rotate(180deg);
}


/* ---------- V56 quest progress + competition ranking ---------- */

.quest-summary-right {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.quest-progress-count {
  color: var(--accent);
  font-size: 13px;
  white-space: nowrap;
}

.competition-ranking-block {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.competition-ranking-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.competition-ranking-head > div {
  display: grid;
  gap: 2px;
}

.competition-ranking-list {
  display: grid;
  gap: 7px;
}

.competition-ranking-row {
  display: grid;
  grid-template-columns: 22px 34px minmax(0,1fr);
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  cursor: grab;
}

.competition-ranking-row.is-dragging {
  opacity: .55;
}

.competition-drag-handle {
  color: var(--muted);
  font-weight: 900;
  cursor: grab;
  user-select: none;
}

.competition-place {
  width: 30px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(255,255,255,.06);
  font-weight: 900;
}

.landing-score-head,
.landing-ranking-row {
  grid-template-columns: 22px 34px minmax(120px,1.5fr) repeat(3,minmax(72px,.8fr)) minmax(72px,.8fr);
}

.landing-score-head {
  display: grid;
  gap: 8px;
  padding: 0 10px 6px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.competition-score-input {
  width: 100%;
  min-width: 0;
  height: 34px;
  padding: 6px 8px;
  text-align: center;
}

.competition-total {
  text-align: center;
  color: var(--accent);
}

@media (max-width: 700px) {
  .landing-score-head {
    display: none;
  }

  .landing-ranking-row {
    grid-template-columns: 20px 30px minmax(0,1fr) repeat(3,58px) 62px;
    gap: 5px;
    overflow-x: auto;
  }

  .competition-score-input {
    padding: 5px;
    font-size: 12px;
  }
}


/* ---------- V57 Landing Competition participant leaderboard ---------- */

.landing-leaderboard-wrap {
  width: 100%;
  margin-top: 14px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.landing-leaderboard {
  width: 100%;
  min-width: 660px;
  border-collapse: collapse;
  background: rgba(0,0,0,.12);
}

.landing-leaderboard th,
.landing-leaderboard td {
  padding: 10px 11px;
  text-align: center;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.landing-leaderboard th {
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.landing-leaderboard td {
  font-size: 13px;
  font-weight: 700;
}

.landing-leaderboard th:nth-child(2),
.landing-leaderboard td:nth-child(2) {
  text-align: left;
}

.landing-leaderboard tbody tr:last-child td {
  border-bottom: 0;
}

.landing-leaderboard tr.is-me {
  background: rgba(242,169,59,.08);
}

.landing-leaderboard tr.is-me .landing-participant-name {
  color: var(--accent);
}

.landing-total-score {
  color: var(--accent);
  font-weight: 900 !important;
}

.landing-my-score {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255,255,255,.025);
}

.landing-my-score-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.landing-score-entry {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr)) 42px;
  align-items: end;
  gap: 8px;
}

.landing-score-entry label {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.landing-score-entry label > span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.landing-score-entry input {
  width: 100%;
  min-width: 0;
  height: 42px;
  padding: 7px 8px;
  text-align: center;
}

.landing-add-score-button {
  width: 42px !important;
  min-width: 42px !important;
  height: 42px !important;
  padding: 0 !important;
  display: inline-grid !important;
  place-items: center !important;
  font-size: 20px !important;
  font-weight: 900 !important;
}

@media (max-width: 600px) {
  .landing-my-score-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }

  .landing-score-entry {
    grid-template-columns: repeat(3, minmax(0,1fr)) 38px;
    gap: 5px;
  }

  .landing-score-entry label > span {
    font-size: 9px;
  }

  .landing-score-entry input {
    height: 38px;
    padding: 6px 4px;
    font-size: 12px;
  }

  .landing-add-score-button {
    width: 38px !important;
    min-width: 38px !important;
    height: 38px !important;
  }
}


/* ---------- V58 participant event header ---------- */

.event-topbar {
  justify-content: space-between;
}

.event-topbar .participant-session-indicator {
  margin-left: auto;
}

.participant-session-name {
  color: var(--text);
  font-size: 13px;
  font-weight: 850;
  white-space: nowrap;
}

.event-hero-copy {
  display: grid;
  gap: 7px;
}

.event-hero-copy #eventName {
  margin: 0;
}

.event-hero-copy .date-large {
  margin: 0;
}

.event-hero-copy .event-participant-welcome {
  margin: 0;
}

@media (max-width: 600px) {
  .event-topbar {
    gap: 10px;
  }

  .event-topbar .back-link {
    min-width: 0;
    white-space: nowrap;
  }

  .participant-session-indicator {
    gap: 7px;
  }

  .participant-session-name {
    max-width: 95px;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 12px;
  }

  .event-hero-copy {
    gap: 6px;
  }

  .event-hero-copy #eventName {
    font-size: clamp(30px, 8vw, 42px);
    line-height: 1.08;
  }

  .event-hero-copy .date-large {
    font-size: 20px;
  }
}


/* ---------- V59 compact event hero/header ---------- */

/* Reduce the empty space between the top bar and event title. */
.event-detail__top {
  padding-top: 20px !important;
  margin-top: 0 !important;
}

.event-hero-copy {
  gap: 5px !important;
}

/* Event title slightly smaller than V58. */
.event-hero-copy #eventName {
  font-size: clamp(30px, 5vw, 42px) !important;
  line-height: 1.08 !important;
}

/* Logged-in participant is now shown beside the green dot. */
.participant-session-welcome {
  display: inline-flex !important;
  align-items: center;
  gap: 4px;
  color: var(--text);
  font-size: 13px;
  white-space: nowrap;
}

.participant-session-name {
  max-width: none !important;
  overflow: visible !important;
  text-overflow: clip !important;
  color: var(--accent) !important;
}

@media (max-width: 600px) {
  .event-detail__top {
    padding-top: 14px !important;
  }

  .event-hero-copy #eventName {
    font-size: clamp(28px, 7.4vw, 36px) !important;
  }

  .participant-session-welcome {
    display: inline-flex !important;
    font-size: 11px;
  }

  .participant-session-name {
    display: inline !important;
    max-width: 85px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
}


/* ---------- V60 Landing Competition compact scoring ---------- */

/* Admin table: drag, place, name, jumps, P, A, F, average score */
.landing-score-head,
.landing-ranking-row {
  grid-template-columns:
    20px
    30px
    minmax(90px, 1fr)
    34px
    56px
    56px
    56px
    62px !important;
  gap: 5px !important;
}

.landing-score-head {
  padding-left: 8px !important;
  padding-right: 8px !important;
}

.competition-jumps {
  text-align: center;
  font-weight: 800;
}

.competition-total {
  font-size: 13px;
}

/* Participant Event leaderboard should fit without horizontal scrolling on normal phones. */
.landing-leaderboard {
  min-width: 0 !important;
  table-layout: fixed;
}

.landing-leaderboard th,
.landing-leaderboard td {
  padding: 8px 5px !important;
  white-space: normal !important;
}

.landing-leaderboard th:nth-child(1),
.landing-leaderboard td:nth-child(1) { width: 7%; }

.landing-leaderboard th:nth-child(2),
.landing-leaderboard td:nth-child(2) { width: 31%; }

.landing-leaderboard th:nth-child(3),
.landing-leaderboard td:nth-child(3) { width: 8%; }

.landing-leaderboard th:nth-child(4),
.landing-leaderboard td:nth-child(4),
.landing-leaderboard th:nth-child(5),
.landing-leaderboard td:nth-child(5),
.landing-leaderboard th:nth-child(6),
.landing-leaderboard td:nth-child(6) { width: 9%; }

.landing-leaderboard th:nth-child(7),
.landing-leaderboard td:nth-child(7) { width: 19%; }

@media (max-width: 700px) {
  .landing-score-head {
    display: grid !important;
    font-size: 9px !important;
  }

  .landing-ranking-row {
    grid-template-columns:
      16px
      26px
      minmax(76px, 1fr)
      28px
      45px
      45px
      45px
      52px !important;
    gap: 4px !important;
    overflow: visible !important;
  }

  .competition-score-input {
    height: 31px !important;
    padding: 4px 3px !important;
    font-size: 11px !important;
  }

  .competition-participant-name {
    font-size: 11px;
    overflow-wrap: anywhere;
  }

  .competition-jumps,
  .competition-total {
    font-size: 11px;
  }

  .landing-leaderboard th {
    font-size: 9px !important;
  }

  .landing-leaderboard td {
    font-size: 11px !important;
  }

  .landing-score-entry label > span {
    text-align: center;
    font-size: 10px !important;
    font-weight: 900 !important;
  }
}


/* ---------- V61 Landing Competition mobile fit ---------- */

/* The leaderboard must fit the card width without an inner horizontal scroller. */
.landing-leaderboard-wrap {
  overflow-x: hidden !important;
}

.landing-leaderboard {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  table-layout: fixed !important;
}

.landing-leaderboard th,
.landing-leaderboard td {
  box-sizing: border-box;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-left: 4px !important;
  padding-right: 4px !important;
}

/* Compact column proportions that still keep the participant name readable. */
.landing-leaderboard th:nth-child(1),
.landing-leaderboard td:nth-child(1) { width: 7% !important; }

.landing-leaderboard th:nth-child(2),
.landing-leaderboard td:nth-child(2) { width: 32% !important; }

.landing-leaderboard th:nth-child(3),
.landing-leaderboard td:nth-child(3) { width: 8% !important; }

.landing-leaderboard th:nth-child(4),
.landing-leaderboard td:nth-child(4),
.landing-leaderboard th:nth-child(5),
.landing-leaderboard td:nth-child(5),
.landing-leaderboard th:nth-child(6),
.landing-leaderboard td:nth-child(6) { width: 9% !important; }

.landing-leaderboard th:nth-child(7),
.landing-leaderboard td:nth-child(7) { width: 17% !important; }

.landing-participant-name {
  white-space: normal !important;
  overflow-wrap: anywhere;
}

/* Full category names in participant score entry, while keeping one-row mobile layout. */
.landing-score-entry label > span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 600px) {
  .competition-item-body {
    padding-left: 10px !important;
    padding-right: 10px !important;
  }

  .landing-leaderboard th {
    font-size: 8px !important;
    padding: 7px 2px !important;
  }

  .landing-leaderboard td {
    font-size: 10px !important;
    padding: 8px 2px !important;
  }

  .landing-leaderboard th:nth-child(1),
  .landing-leaderboard td:nth-child(1) { width: 7% !important; }

  .landing-leaderboard th:nth-child(2),
  .landing-leaderboard td:nth-child(2) { width: 33% !important; }

  .landing-leaderboard th:nth-child(3),
  .landing-leaderboard td:nth-child(3) { width: 8% !important; }

  .landing-leaderboard th:nth-child(4),
  .landing-leaderboard td:nth-child(4),
  .landing-leaderboard th:nth-child(5),
  .landing-leaderboard td:nth-child(5),
  .landing-leaderboard th:nth-child(6),
  .landing-leaderboard td:nth-child(6) { width: 8% !important; }

  .landing-leaderboard th:nth-child(7),
  .landing-leaderboard td:nth-child(7) { width: 20% !important; }

  .landing-my-score {
    padding: 10px !important;
  }

  .landing-score-entry {
    grid-template-columns: repeat(3, minmax(0, 1fr)) 38px !important;
    gap: 5px !important;
  }

  .landing-score-entry label > span {
    font-size: 9px !important;
    text-align: left !important;
  }

  .landing-score-entry input {
    width: 100% !important;
    min-width: 0 !important;
  }
}

@media (max-width: 420px) {
  .landing-leaderboard th {
    font-size: 7px !important;
  }

  .landing-leaderboard td {
    font-size: 9px !important;
  }

  .landing-score-entry label > span {
    font-size: 8px !important;
  }
}


/* ---------- V62 Admin Landing Competition automatic ranking ---------- */

/* Landing Competition is no longer draggable. */
#landingCompetitionRanking .competition-ranking-row {
  cursor: default !important;
}

#landingCompetitionRanking .competition-drag-handle {
  display: none !important;
}

/* # | Participant | J | P | A | F | Score */
.landing-score-head,
.landing-ranking-row {
  grid-template-columns:
    30px
    minmax(90px, 1fr)
    34px
    48px
    48px
    48px
    58px !important;
  gap: 5px !important;
}

.competition-score-input {
  box-sizing: border-box !important;
  width: 48px !important;
  min-width: 48px !important;
  max-width: 48px !important;
  height: 32px !important;
  padding: 4px !important;
  text-align: center !important;
  font-size: 12px !important;
}

/* Enough room for a four-digit/decimal average without taking extra space. */
#landingCompetitionRanking .competition-total {
  width: 58px;
  min-width: 58px;
  text-align: center;
  font-size: 12px !important;
}

@media (max-width: 700px) {
  .landing-score-head,
  .landing-ranking-row {
    grid-template-columns:
      26px
      minmax(70px, 1fr)
      28px
      42px
      42px
      42px
      50px !important;
    gap: 4px !important;
  }

  .competition-score-input {
    width: 42px !important;
    min-width: 42px !important;
    max-width: 42px !important;
    height: 30px !important;
    font-size: 11px !important;
  }

  #landingCompetitionRanking .competition-total {
    width: 50px;
    min-width: 50px;
    font-size: 11px !important;
  }
}


/* ---------- V63 Landing Competition table spacing/readability ---------- */

/* Give less unused space to Participant and more balanced compact columns. */
.landing-leaderboard th:nth-child(1),
.landing-leaderboard td:nth-child(1) { width: 7% !important; }

.landing-leaderboard th:nth-child(2),
.landing-leaderboard td:nth-child(2) { width: 27% !important; }

.landing-leaderboard th:nth-child(3),
.landing-leaderboard td:nth-child(3) { width: 9% !important; }

.landing-leaderboard th:nth-child(4),
.landing-leaderboard td:nth-child(4),
.landing-leaderboard th:nth-child(5),
.landing-leaderboard td:nth-child(5),
.landing-leaderboard th:nth-child(6),
.landing-leaderboard td:nth-child(6) { width: 10% !important; }

.landing-leaderboard th:nth-child(7),
.landing-leaderboard td:nth-child(7) { width: 18% !important; }

/* Slightly larger, easier-to-read table text. */
.landing-leaderboard th {
  font-size: 10px !important;
}

.landing-leaderboard td {
  font-size: 13px !important;
}

.landing-leaderboard .landing-participant-name {
  font-size: 13px !important;
  font-weight: 800 !important;
}

@media (max-width: 600px) {
  .landing-leaderboard th {
    font-size: 8px !important;
    padding-left: 2px !important;
    padding-right: 2px !important;
  }

  .landing-leaderboard td,
  .landing-leaderboard .landing-participant-name {
    font-size: 11px !important;
  }

  .landing-leaderboard th:nth-child(1),
  .landing-leaderboard td:nth-child(1) { width: 7% !important; }

  .landing-leaderboard th:nth-child(2),
  .landing-leaderboard td:nth-child(2) { width: 28% !important; }

  .landing-leaderboard th:nth-child(3),
  .landing-leaderboard td:nth-child(3) { width: 8% !important; }

  .landing-leaderboard th:nth-child(4),
  .landing-leaderboard td:nth-child(4),
  .landing-leaderboard th:nth-child(5),
  .landing-leaderboard td:nth-child(5),
  .landing-leaderboard th:nth-child(6),
  .landing-leaderboard td:nth-child(6) { width: 10% !important; }

  .landing-leaderboard th:nth-child(7),
  .landing-leaderboard td:nth-child(7) { width: 17% !important; }
}


/* ---------- V66 Social Media Competition ---------- */

.social-score-head,
.social-ranking-list .competition-ranking-row {
  display: grid;
  grid-template-columns: 30px minmax(95px,1fr) 44px 44px 44px 44px 58px;
  gap: 5px;
  align-items: center;
}

.social-score-head {
  padding: 0 10px 6px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

.social-ranking-list .competition-ranking-row {
  cursor: default !important;
}

.social-count,
.social-total {
  text-align: center;
}

.social-total {
  color: var(--accent);
}

.social-media-rules {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 6px;
  margin: 12px 0;
}

.social-media-rules span {
  padding: 8px 6px;
  border: 1px solid var(--line);
  border-radius: 9px;
  text-align: center;
  font-size: 11px;
}

.social-leaderboard-wrap {
  width: 100%;
  overflow-x: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.social-leaderboard {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
}

.social-leaderboard th,
.social-leaderboard td {
  padding: 8px 4px;
  border-bottom: 1px solid var(--line);
  text-align: center;
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.social-leaderboard th {
  color: var(--muted);
  font-size: 8px;
  text-transform: uppercase;
}

.social-leaderboard th:nth-child(2),
.social-leaderboard td:nth-child(2) {
  text-align: left;
  width: 31%;
}

.social-leaderboard th:nth-child(1),
.social-leaderboard td:nth-child(1) { width: 7%; }

.social-leaderboard th:nth-child(3),
.social-leaderboard td:nth-child(3),
.social-leaderboard th:nth-child(4),
.social-leaderboard td:nth-child(4),
.social-leaderboard th:nth-child(5),
.social-leaderboard td:nth-child(5),
.social-leaderboard th:nth-child(6),
.social-leaderboard td:nth-child(6) { width: 10%; }

.social-leaderboard th:nth-child(7),
.social-leaderboard td:nth-child(7) { width: 22%; }

.social-leaderboard tr.is-me {
  background: rgba(242,169,59,.08);
}

.social-leaderboard tr.is-me .social-participant-name,
.social-total-score {
  color: var(--accent);
  font-weight: 900;
}

.social-my-score {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255,255,255,.025);
}

.social-score-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 6px;
}

.social-score-add {
  min-width: 0;
  padding: 8px 5px;
  display: grid;
  gap: 3px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
}

.social-score-add > span:first-child {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 9px;
  font-weight: 800;
}

.social-score-add b {
  color: var(--accent);
  font-size: 11px;
}

.social-plus {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border-radius: 7px;
  background: var(--accent);
  color: #111;
  font-size: 17px !important;
  font-weight: 900 !important;
}

@media (max-width: 600px) {
  .social-score-head,
  .social-ranking-list .competition-ranking-row {
    grid-template-columns: 26px minmax(72px,1fr) 34px 34px 34px 34px 46px;
    gap: 3px;
  }

  .social-score-head {
    font-size: 8px;
  }

  .social-ranking-list .competition-participant-name,
  .social-count,
  .social-total {
    font-size: 10px;
  }

  .social-media-rules {
    gap: 4px;
  }

  .social-media-rules span {
    padding: 6px 3px;
    font-size: 9px;
  }

  .social-leaderboard th,
  .social-leaderboard td {
    padding: 7px 2px;
    font-size: 10px;
  }

  .social-leaderboard th {
    font-size: 7px;
  }

  .social-score-actions {
    gap: 4px;
  }

  .social-score-add {
    padding: 7px 3px;
  }

  .social-score-add > span:first-child {
    font-size: 8px;
  }
}


/* ---------- V67 #seqlife social scoring ---------- */
.social-score-head,
.social-ranking-list .competition-ranking-row {
  grid-template-columns: 30px minmax(90px,1fr) 40px 40px 40px 40px 40px 56px !important;
}

.social-media-rules,
.social-score-actions {
  grid-template-columns: repeat(5, minmax(0,1fr)) !important;
}

.social-leaderboard th:nth-child(2),
.social-leaderboard td:nth-child(2) { width: 27% !important; }

.social-leaderboard th:nth-child(1),
.social-leaderboard td:nth-child(1) { width: 6% !important; }

.social-leaderboard th:nth-child(3),
.social-leaderboard td:nth-child(3),
.social-leaderboard th:nth-child(4),
.social-leaderboard td:nth-child(4),
.social-leaderboard th:nth-child(5),
.social-leaderboard td:nth-child(5),
.social-leaderboard th:nth-child(6),
.social-leaderboard td:nth-child(6),
.social-leaderboard th:nth-child(7),
.social-leaderboard td:nth-child(7) { width: 9% !important; }

.social-leaderboard th:nth-child(8),
.social-leaderboard td:nth-child(8) { width: 22% !important; }

@media (max-width:600px) {
  .social-score-head,
  .social-ranking-list .competition-ranking-row {
    grid-template-columns: 24px minmax(65px,1fr) 31px 31px 31px 31px 31px 44px !important;
    gap: 2px !important;
  }

  .social-media-rules,
  .social-score-actions {
    grid-template-columns: repeat(5, minmax(0,1fr)) !important;
    gap: 3px !important;
  }
}


/* ---------- V68 existing Shakshuka post/reel +1 ---------- */
.social-score-head,
.social-ranking-list .competition-ranking-row {
  grid-template-columns: 28px minmax(82px,1fr) 34px 34px 34px 34px 34px 34px 52px !important;
  gap: 3px !important;
}

.social-media-rules,
.social-score-actions {
  grid-template-columns: repeat(3, minmax(0,1fr)) !important;
}

.social-leaderboard th:nth-child(1),
.social-leaderboard td:nth-child(1) { width: 6% !important; }
.social-leaderboard th:nth-child(2),
.social-leaderboard td:nth-child(2) { width: 25% !important; }
.social-leaderboard th:nth-child(n+3):nth-child(-n+8),
.social-leaderboard td:nth-child(n+3):nth-child(-n+8) { width: 8% !important; }
.social-leaderboard th:nth-child(9),
.social-leaderboard td:nth-child(9) { width: 21% !important; }

@media (max-width:600px) {
  .social-score-head,
  .social-ranking-list .competition-ranking-row {
    grid-template-columns: 23px minmax(58px,1fr) repeat(6,28px) 40px !important;
    gap: 2px !important;
  }

  .social-media-rules,
  .social-score-actions {
    grid-template-columns: repeat(3, minmax(0,1fr)) !important;
  }
}


/* ---------- V69 Social Media Competition cleanup ---------- */
.social-my-score > strong {
  font-size: 18px;
}

.social-score-add > span:first-child {
  font-size: 12px !important;
  line-height: 1.2;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}

.social-score-add b {
  font-size: 14px !important;
}

.social-plus {
  font-size: 20px !important;
  width: 29px;
  height: 29px;
}

@media (max-width: 600px) {
  .social-my-score > strong {
    font-size: 17px;
  }

  .social-score-add > span:first-child {
    font-size: 10px !important;
  }

  .social-score-add b {
    font-size: 13px !important;
  }
}


/* ---------- V70 Beer Fine ---------- */
.beer-fine-admin-content,.beer-fine-event-sections,.beer-fine-sections{display:grid;gap:10px}
.beer-fine-admin-toolbar{display:grid;grid-template-columns:minmax(140px,1.3fr) minmax(120px,1fr) auto;gap:8px;align-items:center}
.beer-fine-section{border:1px solid var(--line);border-radius:12px;overflow:hidden;background:rgba(255,255,255,.02)}
.beer-fine-section-title{padding:10px 12px;border-bottom:1px solid var(--line);background:rgba(255,255,255,.025)}
.beer-fine-admin-list,.beer-fine-event-list{display:grid}
.beer-fine-admin-row,.beer-fine-event-row{display:grid;align-items:center;gap:8px;padding:8px 12px;min-height:44px;border-bottom:1px solid var(--line)}
.beer-fine-admin-row:last-child,.beer-fine-event-row:last-child{border-bottom:0}
.beer-fine-admin-row{grid-template-columns:minmax(90px,1fr) 52px 150px 30px}
.beer-fine-event-row{grid-template-columns:minmax(0,1fr) auto}
.beer-fine-ratio{font-weight:900;color:var(--accent);text-align:center;font-variant-numeric:tabular-nums}
.beer-fine-count-editor{display:grid;grid-template-columns:repeat(2,70px);gap:6px}
.beer-fine-count-editor label{display:grid;gap:3px}
.beer-fine-count-editor label span{font-size:9px;color:var(--muted);text-transform:uppercase;text-align:center}
.beer-fine-count-editor input{width:100%;min-width:0;text-align:center;padding:6px 4px}
.beer-fine-remove{width:30px;height:30px;padding:0}
.beer-fine-empty{padding:10px 12px}
@media(max-width:600px){
 .beer-fine-admin-toolbar{grid-template-columns:1fr 1fr}
 .beer-fine-admin-toolbar #addBeerFineButton{grid-column:1/-1}
 .beer-fine-admin-row{grid-template-columns:minmax(74px,1fr) 44px 124px 28px;gap:4px;padding:7px 8px}
 .beer-fine-count-editor{grid-template-columns:repeat(2,60px);gap:4px}
}


/* ---------- V71 Social score buttons ---------- */
.social-score-add {
  min-height: 92px;
  padding: 12px 7px !important;
  gap: 8px !important;
}

.social-score-add > span:first-child {
  font-size: 15px !important;
  line-height: 1.15 !important;
  font-weight: 900 !important;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
}

.social-plus {
  width: auto !important;
  min-width: 48px;
  height: 34px !important;
  padding: 0 10px;
  font-size: 18px !important;
  line-height: 34px !important;
  font-weight: 900 !important;
}

@media (max-width: 600px) {
  .social-score-add {
    min-height: 88px;
    padding: 10px 5px !important;
  }

  .social-score-add > span:first-child {
    font-size: 13px !important;
  }

  .social-plus {
    min-width: 44px;
    height: 32px !important;
    padding: 0 8px;
    font-size: 17px !important;
    line-height: 32px !important;
  }
}


/* ---------- V72 Beer Fine admin cleanup ---------- */
#eventBeerFineSection > summary {
  list-style: none !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

#eventBeerFineSection > summary::-webkit-details-marker {
  display: none !important;
}

#eventBeerFineSection > summary::marker {
  content: "" !important;
  display: none !important;
}

#eventBeerFineSection > summary::before,
#eventBeerFineSection > summary::after {
  content: none !important;
  display: none !important;
}

#eventBeerFineSection > summary .collapse-chevron {
  margin-left: auto;
  flex: 0 0 auto;
}

.beer-fine-admin-row {
  grid-template-columns: minmax(90px,1fr) 150px 30px !important;
}

@media (max-width:600px) {
  .beer-fine-admin-row {
    grid-template-columns: minmax(74px,1fr) 124px 28px !important;
  }
}


/* ---------- V73 Beer Fine unpaid alert ---------- */
.beer-fine-unpaid-alert {
  margin: 10px 0 14px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 83, 83, .55);
  border-radius: 12px;
  background: rgba(255, 83, 83, .10);
  color: #ff5f5f;
  font-size: 16px;
  font-weight: 900;
  text-align: center;
  letter-spacing: .1px;
}

@media (max-width: 600px) {
  .beer-fine-unpaid-alert {
    font-size: 15px;
    padding: 11px 10px;
  }
}


/* ---------- V74 Admin top-level box consistency ---------- */

/* Beer Fine now follows the exact same header spacing as Quests/Competitions. */
#eventBeerFineSection > .quests-summary {
  padding: 20px !important;
  min-height: 70px;
  box-sizing: border-box;
}

#eventBeerFineSection > .quests-summary h2 {
  margin: 0;
}

/* Keep the one right-side chevron only. */
#eventBeerFineSection > .quests-summary .collapse-chevron {
  margin-left: auto;
  flex: 0 0 auto;
}

/* Match the content spacing used by the other admin sections. */
#eventBeerFineSection > .beer-fine-admin-content {
  padding: 0 20px 20px !important;
  border-top: 1px solid var(--line);
}

/* Keep the main admin collapsible cards visually aligned. */
.event-details-collapsible,
.event-logbook-collapsible,
#eventQuestsSection,
#eventBeerFineSection,
#eventCompetitionsSection,
.participants-collapsible {
  border-radius: 18px;
}

@media (max-width: 600px) {
  #eventBeerFineSection > .quests-summary {
    padding: 16px !important;
    min-height: 70px;
  }

  #eventBeerFineSection > .beer-fine-admin-content {
    padding: 0 16px 16px !important;
  }
}


/* ---------- V77 Participant Beer Fine payment ---------- */
.beer-fine-event-row {
  grid-template-columns: minmax(0,1fr) auto auto;
}

.beer-fine-mark-paid {
  border: 1px solid rgba(242,169,59,.55);
  border-radius: 9px;
  background: rgba(242,169,59,.12);
  color: var(--accent);
  font-weight: 900;
  font-size: 11px;
  padding: 7px 9px;
  white-space: nowrap;
  cursor: pointer;
}

.beer-fine-mark-paid:hover {
  background: rgba(242,169,59,.20);
}

.beer-fine-mark-paid:disabled {
  opacity: .6;
  cursor: default;
}

.beer-fine-event-row.is-my-beer-fine {
  background: rgba(242,169,59,.035);
}

@media (max-width:600px) {
  .beer-fine-event-row {
    grid-template-columns: minmax(0,1fr) auto;
  }

  .beer-fine-mark-paid {
    grid-column: 1 / -1;
    justify-self: stretch;
    text-align: center;
  }
}


/* ---------- V83 Admin Landing score entry ---------- */
.admin-landing-score-entry {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255,255,255,.025);
}

.admin-landing-participant-field {
  margin: 0;
}

.admin-landing-participant-field select {
  width: 100%;
}

.admin-landing-score-entry .landing-score-entry {
  margin-top: 0;
}


/* ---------- V84 Event competition cards ---------- */
.event-page .competition-item.participant-collapsible,
#event .competition-item.participant-collapsible {
  margin-top: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
}

.event-page .competition-item.participant-collapsible > summary,
#event .competition-item.participant-collapsible > summary {
  min-height: 64px;
  padding: 18px 20px;
  border: 0;
  box-sizing: border-box;
}

.event-page .competition-item.participant-collapsible[open] > summary,
#event .competition-item.participant-collapsible[open] > summary {
  border-bottom: 1px solid var(--line);
}

.event-page .competition-item .competition-item-body,
#event .competition-item .competition-item-body {
  padding: 18px 20px 20px;
}

.competition-summary-title {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.competition-summary-title > strong {
  font-size: 16px;
}

.competition-summary-icon {
  width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 24px;
  font-size: 18px;
  line-height: 1;
}

.instagram-summary-icon {
  color: var(--accent);
}

.instagram-icon {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (max-width: 600px) {
  .event-page .competition-item.participant-collapsible > summary,
  #event .competition-item.participant-collapsible > summary {
    min-height: 64px;
    padding: 18px 20px;
  }

  .competition-summary-title > strong {
    font-size: 16px;
  }
}


/* ---------- V85 Event competition cards: same design as other top-level boxes ---------- */
#event .landing-competition-item,
#event .social-media-competition-item {
  margin-top: 18px;
  padding: 0;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
}

#event .landing-competition-item > summary,
#event .social-media-competition-item > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  padding: 18px 20px;
  border: 0 !important;
  box-sizing: border-box;
  user-select: none;
}

#event .landing-competition-item > summary::-webkit-details-marker,
#event .social-media-competition-item > summary::-webkit-details-marker {
  display: none;
}

#event .landing-competition-item[open] > summary,
#event .social-media-competition-item[open] > summary {
  border-bottom: 1px solid var(--line) !important;
}

#event .landing-competition-item .participant-collapse-content,
#event .social-media-competition-item .participant-collapse-content {
  padding: 18px 20px 20px;
  border-top: 0;
}

.competition-summary-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.competition-summary-title > strong {
  font-size: 18px;
  line-height: 1.2;
}

.competition-header-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  display: inline-grid;
  place-items: center;
  font-size: 15px;
  line-height: 1;
}

.social-instagram-icon {
  color: var(--accent);
}

.social-instagram-icon svg {
  display: block;
  width: 18px !important;
  height: 18px !important;
  max-width: 18px !important;
  max-height: 18px !important;
  min-width: 18px !important;
  min-height: 18px !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 2 !important;
  stroke-linecap: round;
  stroke-linejoin: round;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
}

@media (max-width: 600px) {
  #event .landing-competition-item > summary,
  #event .social-media-competition-item > summary {
    min-height: 64px;
    padding: 18px 20px;
  }

  .competition-summary-title > strong {
    font-size: 18px;
  }
}

/* Beer Fine participant action button must remain visible in its own row. */
#event .beer-fine-event-row .beer-fine-mark-paid {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: auto !important;
  min-width: 92px;
  min-height: 34px;
  padding: 7px 10px !important;
  border: 1px solid rgba(242,169,59,.55) !important;
  border-radius: 9px !important;
  background: rgba(242,169,59,.12) !important;
  color: var(--accent) !important;
  font-size: 11px !important;
  font-weight: 900 !important;
  line-height: 1.1;
  white-space: nowrap;
}


/* ---------- V86 Event header icons ---------- */
.event-summary-title {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  min-width: 0;
}

.event-header-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  display: inline-grid;
  place-items: center;
  margin-top: 1px;
  font-size: 15px;
  line-height: 1;
}

.event-summary-title > div {
  min-width: 0;
}

.event-summary-title h3,
.event-summary-title p {
  margin-left: 0;
}

#beerFineUnpaidAlert.beer-fine-unpaid-alert {
  display: block;
  margin: 0 0 18px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 83, 83, .55);
  border-radius: 12px;
  background: rgba(255, 83, 83, .10);
  color: #ff6464;
  font-size: 16px;
  font-weight: 900;
  text-align: center;
}

#beerFineUnpaidAlert.beer-fine-unpaid-alert.hidden {
  display: none !important;
}


/* ---------- V87 Header icon alignment + own Beer Fine summary ---------- */
/* Keep every icon directly LEFT of the complete header text block. */
.event-summary-title,
.competition-summary-title {
  align-items: center !important;
}

.event-header-icon,
.competition-header-icon {
  align-self: center !important;
  margin-top: 0 !important;
}

.beer-fine-my-summary {
  margin-top: 3px !important;
}

.beer-fine-my-summary.has-unpaid {
  color: #ff6464 !important;
  font-weight: 800;
}


/* ---------- V88 Admin top-level competition cards + header icons ---------- */
.admin-box-title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.admin-box-title h2 {
  margin: 0 !important;
  line-height: 1.2;
}

.admin-box-icon {
  width: 19px;
  height: 19px;
  flex: 0 0 19px;
  display: inline-grid;
  place-items: center;
  align-self: center;
  margin: 0;
  font-size: 16px;
  line-height: 1;
}

.admin-instagram-icon {
  color: var(--accent);
}

.admin-instagram-icon svg {
  display: block;
  width: 19px !important;
  height: 19px !important;
  min-width: 19px !important;
  min-height: 19px !important;
  max-width: 19px !important;
  max-height: 19px !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 2 !important;
  stroke-linecap: round;
  stroke-linejoin: round;
  background: transparent !important;
  border: 0 !important;
}

.admin-competition-top-level {
  margin-top: 0;
}

.admin-competition-top-level > .quests-summary {
  min-height: 70px;
  padding: 20px !important;
}

.admin-competition-top-level > .quests-content {
  padding: 0 20px 20px !important;
  border-top: 1px solid var(--line);
}

.admin-competition-top-level .competition-admin-body {
  padding-top: 16px !important;
}

/* The competition boxes now stand alone, exactly like Quests and Beer Fine. */
#eventLandingCompetitionSection,
#eventSocialCompetitionSection {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
}

/* Keep icons centered beside text on both admin and participant pages. */
.admin-box-title,
.event-summary-title,
.competition-summary-title {
  align-items: center !important;
}

.admin-box-icon,
.event-header-icon,
.competition-header-icon {
  align-self: center !important;
  margin-top: 0 !important;
}

@media (max-width: 600px) {
  .admin-box-title {
    gap: 9px;
  }

  .admin-box-icon {
    width: 18px;
    height: 18px;
    flex-basis: 18px;
    font-size: 15px;
  }

  .admin-instagram-icon svg {
    width: 18px !important;
    height: 18px !important;
    min-width: 18px !important;
    min-height: 18px !important;
    max-width: 18px !important;
    max-height: 18px !important;
  }
}


/* ---------- V89 Admin header icons: always small and LEFT of title ---------- */
#eventForm summary .admin-box-title,
#eventForm .event-details-summary .admin-box-title,
#eventForm .logbook-summary .admin-box-title,
#eventForm .quests-summary .admin-box-title,
#eventForm .participants-summary .admin-box-title {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: flex-start !important;
  flex-wrap: nowrap !important;
  gap: 9px !important;
  width: auto !important;
  min-width: 0 !important;
}

#eventForm summary .admin-box-title > .admin-box-icon {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  position: static !important;
  width: 18px !important;
  height: 18px !important;
  min-width: 18px !important;
  min-height: 18px !important;
  max-width: 18px !important;
  max-height: 18px !important;
  flex: 0 0 18px !important;
  margin: 0 !important;
  padding: 0 !important;
  font-size: 15px !important;
  line-height: 18px !important;
  vertical-align: middle !important;
  overflow: hidden !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
}

#eventForm summary .admin-box-title > h2,
#eventForm summary .admin-box-title > .summary-title-with-count,
#eventForm summary .admin-box-title > .summary-title-with-count h2 {
  margin: 0 !important;
  padding: 0 !important;
  width: auto !important;
  min-width: 0 !important;
  line-height: 1.2 !important;
}

#eventForm summary .admin-instagram-icon svg {
  display: block !important;
  position: static !important;
  width: 17px !important;
  height: 17px !important;
  min-width: 17px !important;
  min-height: 17px !important;
  max-width: 17px !important;
  max-height: 17px !important;
  margin: 0 !important;
  padding: 0 !important;
  transform: none !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 2 !important;
  background: transparent !important;
  border: 0 !important;
}

/* Prevent competition headings from inheriting the old oversized inner-card layout. */
#eventLandingCompetitionSection > summary,
#eventSocialCompetitionSection > summary {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
}

@media (max-width: 600px) {
  #eventForm summary .admin-box-title {
    gap: 8px !important;
  }

  #eventForm summary .admin-box-title > .admin-box-icon {
    width: 17px !important;
    height: 17px !important;
    min-width: 17px !important;
    min-height: 17px !important;
    max-width: 17px !important;
    max-height: 17px !important;
    flex-basis: 17px !important;
    font-size: 14px !important;
    line-height: 17px !important;
  }

  #eventForm summary .admin-instagram-icon svg {
    width: 16px !important;
    height: 16px !important;
    min-width: 16px !important;
    min-height: 16px !important;
    max-width: 16px !important;
    max-height: 16px !important;
  }
}


/* ---------- V91 Admin mobile box order ---------- */
@media (max-width: 900px) {
  #eventForm.editor-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
  }

  #eventForm > .editor-left-column {
    display: contents !important;
  }

  #eventLogbookSection { order: 1 !important; }
  #eventLandingCompetitionSection { order: 2 !important; }
  #eventSocialCompetitionSection { order: 3 !important; }
  #eventBeerFineSection { order: 4 !important; }
  #eventParticipantsSection { order: 5 !important; }
  #eventDetailsSection { order: 6 !important; }
  #eventQuestsSection { order: 7 !important; }

  #eventParticipantsSection {
    position: static !important;
    top: auto !important;
  }
}


/* ---------- V92 Export icon buttons ---------- */
.icon-only-export-button {
  width: 38px !important;
  min-width: 38px !important;
  height: 38px !important;
  min-height: 38px !important;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex: 0 0 38px !important;
  font-size: 18px !important;
  line-height: 1 !important;
}

.logbook-day-adder {
  align-items: end !important;
}


/* ---------- V93 Logbook Day controls on one row ---------- */
.logbook-day-adder {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 8px !important;
  width: 100% !important;
}

.logbook-day-adder select {
  flex: 1 1 auto !important;
  width: auto !important;
  min-width: 0 !important;
}

.logbook-day-adder #addLogbookDayButton,
.logbook-day-adder #exportLogbookButton {
  flex: 0 0 38px !important;
  width: 38px !important;
  min-width: 38px !important;
  height: 38px !important;
  min-height: 38px !important;
  margin: 0 !important;
}

@media (max-width: 600px) {
  .logbook-day-adder {
    gap: 7px !important;
  }

  .logbook-day-adder #addLogbookDayButton,
  .logbook-day-adder #exportLogbookButton {
    flex-basis: 36px !important;
    width: 36px !important;
    min-width: 36px !important;
    height: 36px !important;
    min-height: 36px !important;
  }
}


/* ---------- V94 Logbook controls: guaranteed mobile fit ---------- */
.logbook-day-adder {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 34px 34px !important;
  align-items: center !important;
  gap: 6px !important;
  width: 100% !important;
}

.logbook-day-adder .logbook-add-day-field {
  min-width: 0 !important;
  width: 100% !important;
  margin: 0 !important;
}

.logbook-day-adder .logbook-add-day-field select,
.logbook-day-adder select {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

.logbook-day-adder #addLogbookDayButton,
.logbook-day-adder #exportLogbookButton {
  width: 34px !important;
  min-width: 34px !important;
  max-width: 34px !important;
  height: 34px !important;
  min-height: 34px !important;
  max-height: 34px !important;
  padding: 0 !important;
  margin: 0 !important;
  flex: none !important;
}

@media (max-width: 480px) {
  .logbook-day-adder {
    grid-template-columns: minmax(0, 1fr) 32px 32px !important;
    gap: 5px !important;
  }

  .logbook-day-adder #addLogbookDayButton,
  .logbook-day-adder #exportLogbookButton {
    width: 32px !important;
    min-width: 32px !important;
    max-width: 32px !important;
    height: 32px !important;
    min-height: 32px !important;
    max-height: 32px !important;
    font-size: 16px !important;
  }
}


/* ---------- V95 Cleaner smartphone admin cards ---------- */
@media (max-width: 600px) {
  /* Make all main Admin collapsible headers the same compact height. */
  #eventForm .event-details-summary,
  #eventForm .logbook-summary,
  #eventForm .quests-summary,
  #eventForm .participants-summary {
    min-height: 70px !important;
    height: auto !important;
    padding: 14px 16px !important;
    align-items: center !important;
  }

  #eventForm .event-details-summary h2,
  #eventForm .logbook-summary h2,
  #eventForm .quests-summary h2,
  #eventForm .participants-summary h2 {
    margin: 0 !important;
    font-size: 18px !important;
    line-height: 1.2 !important;
  }

  #eventForm .admin-box-title {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 8px !important;
  }

  #eventForm .admin-box-icon {
    width: 17px !important;
    height: 17px !important;
    min-width: 17px !important;
    min-height: 17px !important;
    max-width: 17px !important;
    max-height: 17px !important;
    flex: 0 0 17px !important;
    font-size: 14px !important;
    line-height: 17px !important;
  }

  #eventForm .collapse-chevron {
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    font-size: 14px !important;
    line-height: 20px !important;
  }

  /* Remove the oversized empty feeling from the Logbook card. */
  #eventLogbookSection,
  #eventDetailsSection,
  #eventQuestsSection,
  #eventBeerFineSection,
  #eventLandingCompetitionSection,
  #eventSocialCompetitionSection,
  #eventParticipantsSection {
    min-height: 0 !important;
  }

  /* Cleaner spacing once Logbook is opened. */
  .logbook-collapsible-content {
    padding: 14px !important;
  }

  .logbook-day-adder {
    margin-bottom: 12px !important;
  }

  /* Slightly tighten the page heading on phones. */
  .editor-heading {
    margin-bottom: 16px !important;
  }

  .editor-heading .admin-title,
  #editorTitle {
    font-size: 28px !important;
    line-height: 1.15 !important;
  }
}


/* ---------- V97 Ordered + full-width flat Logbook ---------- */

/* Day cards always fill the Logbook width and no longer look like nested boxes. */
.event-logbook-days {
  width: calc(100% + 40px) !important;
  max-width: none !important;
  margin: 0 -20px -20px !important;
  padding: 0 !important;
}

.logbook-day-card {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

/* Use simple separators instead of borders around cards. */
.logbook-day-card + .logbook-day-card {
  border-top: 1px solid var(--line) !important;
}

.logbook-day-header {
  width: 100% !important;
  box-sizing: border-box !important;
  padding-left: 20px !important;
  padding-right: 20px !important;
  border-radius: 0 !important;
  border-left: 0 !important;
  border-right: 0 !important;
}

.logbook-day-body,
.logbook-loads,
.logbook-load-card,
.logbook-load-body,
.logbook-groups,
.logbook-group-card {
  width: 100% !important;
  max-width: none !important;
  box-sizing: border-box !important;
}

/* Remove all nested outer borders/shells inside Logbook. */
.logbook-load-card,
.logbook-group-card {
  border-left: 0 !important;
  border-right: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

/* Keep content aligned with the main Logbook edges. */
.logbook-load-header {
  padding-left: 20px !important;
  padding-right: 20px !important;
}

.logbook-groups {
  padding-left: 20px !important;
  padding-right: 20px !important;
}

@media (max-width: 600px) {
  .event-logbook-days {
    width: calc(100% + 28px) !important;
    margin-left: -14px !important;
    margin-right: -14px !important;
    margin-bottom: -14px !important;
  }

  .logbook-day-header,
  .logbook-load-header {
    padding-left: 14px !important;
    padding-right: 14px !important;
  }

  .logbook-groups {
    padding-left: 14px !important;
    padding-right: 14px !important;
  }
}


/* ---------- V98 Strict chronological Logbook day order ---------- */
#eventLogbookDays,
.event-logbook-days {
  display: flex !important;
  flex-direction: column !important;
}

/* Day cards receive an explicit inline order from admin.js. */
#eventLogbookDays > .logbook-day-card {
  flex: 0 0 auto;
}


/* ---------- V99 Logbook first-row order ---------- */
/* Left-to-right: Export, +, Day dropdown. */
.logbook-day-adder {
  display: grid !important;
  grid-template-columns: 34px 34px minmax(0, 1fr) !important;
  gap: 7px !important;
  align-items: center !important;
  width: 100% !important;
}

.logbook-day-adder #exportLogbookButton {
  grid-column: 1 !important;
}

.logbook-day-adder #addLogbookDayButton {
  grid-column: 2 !important;
}

.logbook-day-adder .logbook-add-day-field {
  grid-column: 3 !important;
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
}

.logbook-day-adder .logbook-add-day-field select {
  width: 100% !important;
  min-width: 0 !important;
}

@media (max-width: 480px) {
  .logbook-day-adder {
    grid-template-columns: 32px 32px minmax(0, 1fr) !important;
    gap: 6px !important;
  }
}


/* ---------- V100 Canopy Training ---------- */
.canopy-training-admin-content {
  display: grid;
  gap: 14px;
  padding-top: 16px !important;
}

.canopy-course-admin-card {
  display: grid;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,.02);
}

.canopy-course-admin-head > div {
  display: grid;
  gap: 3px;
}

.canopy-course-admin-head strong {
  font-size: 18px;
}

.canopy-admin-subsection {
  display: grid;
  gap: 9px;
}

.canopy-participant-assignments {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 7px;
}

.canopy-assignment-row {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255,255,255,.025);
  cursor: pointer;
}

.canopy-assignment-row input {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
}

.canopy-tasks-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.canopy-admin-tasks {
  display: grid;
  gap: 7px;
}

.canopy-task-editor {
  display: grid;
  grid-template-columns: minmax(0,1fr) 34px;
  gap: 7px;
  align-items: center;
}

.canopy-task-editor input {
  width: 100%;
  min-width: 0;
}

.canopy-task-remove {
  width: 34px !important;
  min-width: 34px !important;
  height: 34px !important;
  padding: 0 !important;
}

.participant-canopy-training-list {
  display: grid;
  gap: 16px;
}

.participant-canopy-course {
  display: grid;
  gap: 8px;
}

.participant-canopy-course-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.participant-canopy-course-head strong {
  color: var(--accent);
  font-size: 16px;
}

/* Mobile ordering: Canopy Training immediately after Logbook. */
@media (max-width: 900px) {
  #eventLogbookSection { order: 1 !important; }
  #eventCanopyTrainingSection { order: 2 !important; }
  #eventLandingCompetitionSection { order: 3 !important; }
  #eventSocialCompetitionSection { order: 4 !important; }
  #eventBeerFineSection { order: 5 !important; }
  #eventParticipantsSection { order: 6 !important; }
  #eventDetailsSection { order: 7 !important; }
  #eventQuestsSection { order: 8 !important; }
}

@media (max-width: 600px) {
  .canopy-participant-assignments {
    grid-template-columns: 1fr;
  }

  .canopy-course-admin-card {
    padding: 12px;
  }
}


/* ---------- V101 Canopy Training UX ---------- */
.canopy-course-admin-card {
  padding: 0 !important;
  overflow: hidden;
}

.canopy-course-summary {
  list-style: none;
  cursor: pointer;
  min-height: 58px;
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.canopy-course-summary::-webkit-details-marker {
  display: none;
}

.canopy-course-summary > div {
  display: grid;
  gap: 2px;
}

.canopy-course-summary > div > strong {
  font-size: 18px;
}

.canopy-course-admin-card[open] > .canopy-course-summary {
  border-bottom: 1px solid var(--line);
}

.canopy-course-admin-card[open] > .canopy-course-summary .collapse-chevron {
  transform: rotate(180deg);
}

.canopy-course-admin-body {
  display: grid;
  gap: 16px;
  padding: 14px;
}

.canopy-add-participant-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.canopy-add-participant-row select {
  width: 100%;
  min-width: 0;
}

.canopy-participant-assignments {
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
}

.canopy-assigned-participant {
  min-height: 40px;
  padding: 7px 8px 7px 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255,255,255,.025);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.canopy-assignment-remove {
  width: 32px !important;
  min-width: 32px !important;
  height: 32px !important;
  padding: 0 !important;
}

@media (max-width: 600px) {
  .canopy-course-summary {
    min-height: 54px;
    padding: 12px;
  }

  .canopy-course-admin-body {
    padding: 12px;
  }

  .canopy-add-participant-row {
    grid-template-columns: minmax(0, 1fr) 58px;
  }
}


/* ---------- V102 Logbook first row: dropdown, add, export ---------- */
.logbook-day-adder {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 34px 34px !important;
  gap: 7px !important;
  align-items: center !important;
  width: 100% !important;
}

.logbook-day-adder .logbook-add-day-field {
  grid-column: 1 !important;
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
}

.logbook-day-adder #addLogbookDayButton {
  grid-column: 2 !important;
}

.logbook-day-adder #exportLogbookButton {
  grid-column: 3 !important;
}

.logbook-day-adder .logbook-add-day-field select {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
}

@media (max-width: 480px) {
  .logbook-day-adder {
    grid-template-columns: minmax(0, 1fr) 32px 32px !important;
    gap: 6px !important;
  }
}


/* ---------- V103 Canopy Training: no CT1/CT2 arrow buttons ---------- */
.canopy-course-summary .collapse-chevron {
  display: none !important;
}

.canopy-course-summary {
  padding-right: 14px !important;
}


/* ---------- V104 Schedule + unified box spacing ---------- */

/* Admin schedule editor */
.schedule-admin-content {
  padding-top: 14px !important;
}

.admin-schedule-items {
  display: grid;
  gap: 9px;
  margin-bottom: 10px;
}

.schedule-item-editor {
  display: grid;
  gap: 8px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255,255,255,.02);
}

.schedule-item-fields {
  display: grid;
  grid-template-columns: 150px 120px minmax(0,1fr);
  gap: 8px;
  align-items: end;
}

.schedule-item-editor .field {
  margin: 0;
}

.schedule-item-editor textarea {
  resize: vertical;
}

.remove-schedule-item {
  justify-self: end;
}

/* Participant schedule */
.participant-schedule-list {
  display: grid;
  gap: 7px;
}

.participant-schedule-item {
  display: grid;
  grid-template-columns: 105px minmax(0,1fr);
  gap: 12px;
  align-items: start;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255,255,255,.025);
}

.participant-schedule-when {
  display: grid;
  gap: 2px;
}

.participant-schedule-when strong {
  font-size: 13px;
}

.participant-schedule-when span {
  color: var(--accent);
  font-weight: 800;
}

.participant-schedule-body {
  display: grid;
  gap: 3px;
}

.participant-schedule-body p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

/* All participant event boxes: same width/header height and one small gap. */
.event-detail .event-info-boxes {
  display: contents !important;
}

.event-detail .participant-collapsible {
  width: 100% !important;
  box-sizing: border-box !important;
  margin: 8px 0 0 !important;
  border-radius: 18px !important;
}

.event-detail .participant-collapsible > summary {
  box-sizing: border-box !important;
  width: 100% !important;
  min-height: 66px !important;
  padding: 14px 16px !important;
}

.event-detail .participant-collapsible > summary h3 {
  margin: 0 !important;
  font-size: 18px !important;
  line-height: 1.2 !important;
}

.event-detail .participant-collapsible > summary p {
  margin: 2px 0 0 !important;
  line-height: 1.15 !important;
}

.event-detail .event-summary-title {
  min-width: 0;
}

/* All Admin top-level editor boxes: same collapsed header geometry + small gap. */
#eventForm {
  gap: 8px !important;
}

#eventForm > .editor-left-column {
  gap: 8px !important;
}

#eventForm #eventDetailsSection,
#eventForm #eventScheduleSection,
#eventForm #eventLogbookSection,
#eventForm #eventCanopyTrainingSection,
#eventForm #eventQuestsSection,
#eventForm #eventBeerFineSection,
#eventForm #eventLandingCompetitionSection,
#eventForm #eventSocialCompetitionSection,
#eventForm #eventParticipantsSection {
  width: 100% !important;
  box-sizing: border-box !important;
  margin: 0 !important;
}

#eventForm #eventDetailsSection > summary,
#eventForm #eventScheduleSection > summary,
#eventForm #eventLogbookSection > summary,
#eventForm #eventCanopyTrainingSection > summary,
#eventForm #eventQuestsSection > summary,
#eventForm #eventBeerFineSection > summary,
#eventForm #eventLandingCompetitionSection > summary,
#eventForm #eventSocialCompetitionSection > summary,
#eventForm #eventParticipantsSection > summary {
  box-sizing: border-box !important;
  width: 100% !important;
  min-height: 70px !important;
  padding: 14px 16px !important;
}

/* Mobile admin order: keep Schedule near the top with the operational boxes. */
@media (max-width: 900px) {
  #eventLogbookSection { order: 1 !important; }
  #eventScheduleSection { order: 2 !important; }
  #eventCanopyTrainingSection { order: 3 !important; }
  #eventLandingCompetitionSection { order: 4 !important; }
  #eventSocialCompetitionSection { order: 5 !important; }
  #eventBeerFineSection { order: 6 !important; }
  #eventParticipantsSection { order: 7 !important; }
  #eventDetailsSection { order: 8 !important; }
  #eventQuestsSection { order: 9 !important; }
}

@media (max-width: 600px) {
  .schedule-item-fields {
    grid-template-columns: 1fr 1fr;
  }

  .schedule-item-title-field {
    grid-column: 1 / -1;
  }

  .participant-schedule-item {
    grid-template-columns: 86px minmax(0,1fr);
  }

  .event-detail .participant-collapsible {
    margin-top: 7px !important;
  }

  .event-detail .participant-collapsible > summary {
    min-height: 62px !important;
    padding: 12px 14px !important;
  }

  #eventForm #eventDetailsSection > summary,
  #eventForm #eventScheduleSection > summary,
  #eventForm #eventLogbookSection > summary,
  #eventForm #eventCanopyTrainingSection > summary,
  #eventForm #eventQuestsSection > summary,
  #eventForm #eventBeerFineSection > summary,
  #eventForm #eventLandingCompetitionSection > summary,
  #eventForm #eventSocialCompetitionSection > summary,
  #eventForm #eventParticipantsSection > summary {
    min-height: 64px !important;
    padding: 12px 14px !important;
  }
}


/* ---------- V105 Schedule by event day ---------- */
.admin-schedule-days {
  display: grid;
  gap: 8px;
  padding-top: 14px;
}

.schedule-day-card {
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255,255,255,.018);
  overflow: hidden;
}

.schedule-day-summary {
  min-height: 58px;
  padding: 11px 13px;
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.schedule-day-summary::-webkit-details-marker {
  display: none;
}

.schedule-day-summary-text {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.schedule-day-summary-text strong {
  font-size: 15px;
}

.schedule-day-card[open] > .schedule-day-summary {
  border-bottom: 1px solid var(--line);
}

.schedule-day-body {
  display: grid;
  gap: 12px;
  padding: 12px;
}

.schedule-day-title-field {
  margin: 0 !important;
}

.schedule-day-items {
  display: grid;
  gap: 7px;
}

.schedule-day-item-editor,
.schedule-new-item-row {
  display: grid;
  gap: 7px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(0,0,0,.11);
}

.schedule-day-item-editor.is-all-days {
  border-style: dashed;
}

.schedule-day-item-top,
.schedule-new-item-top {
  display: grid;
  grid-template-columns: 118px minmax(0,1fr) 82px 34px;
  gap: 7px;
  align-items: center;
}

.schedule-new-item-top {
  grid-template-columns: 118px minmax(0,1fr) 102px 60px;
}

.schedule-time-selects {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 3px;
}

.schedule-time-selects select {
  min-width: 0;
  width: 100%;
}

.schedule-day-item-title,
.schedule-new-item-title,
.schedule-day-item-details,
.schedule-new-item-details {
  width: 100%;
  min-width: 0;
}

.schedule-day-item-details,
.schedule-new-item-details {
  resize: vertical;
  min-height: 50px;
}

.schedule-item-scope-badge {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.schedule-item-delete {
  width: 34px !important;
  min-width: 34px !important;
  height: 34px !important;
  padding: 0 !important;
}

.schedule-add-label {
  margin-top: 2px;
  font-size: 12px;
  font-weight: 850;
  color: var(--muted);
}

.schedule-add-item-button {
  min-width: 60px !important;
  padding-left: 8px !important;
  padding-right: 8px !important;
}

.schedule-empty-day {
  margin: 2px 0;
}

/* Participant grouped schedule */
.participant-schedule-list {
  display: grid;
  gap: 10px;
}

.participant-schedule-day {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

.participant-schedule-day-head {
  padding: 10px 11px;
  background: rgba(255,255,255,.025);
  border-bottom: 1px solid var(--line);
}

.participant-schedule-day-head > div {
  display: grid;
  gap: 2px;
}

.participant-schedule-day-title {
  color: var(--accent);
  font-size: 12px;
  font-weight: 750;
}

.participant-schedule-day-items {
  display: grid;
}

.participant-schedule-day .participant-schedule-item {
  border: 0 !important;
  border-radius: 0 !important;
  border-bottom: 1px solid var(--line) !important;
  background: transparent !important;
}

.participant-schedule-day .participant-schedule-item:last-child {
  border-bottom: 0 !important;
}

.participant-schedule-empty {
  margin: 0;
  padding: 10px 11px;
}

@media (max-width: 700px) {
  .schedule-day-item-top,
  .schedule-new-item-top {
    grid-template-columns: 98px minmax(0,1fr) 72px 32px;
    gap: 5px;
  }

  .schedule-new-item-top {
    grid-template-columns: 98px minmax(0,1fr);
  }

  .schedule-new-item-scope {
    grid-column: 1;
  }

  .schedule-add-item-button {
    grid-column: 2;
    width: 100%;
  }

  .schedule-item-scope-badge {
    font-size: 9px;
    padding-left: 4px;
    padding-right: 4px;
  }
}

@media (max-width: 460px) {
  .schedule-day-item-top {
    grid-template-columns: 92px minmax(0,1fr) 32px;
  }

  .schedule-day-item-top .schedule-item-scope-badge {
    grid-column: 1 / 3;
    grid-row: 2;
    justify-self: start;
    min-height: 24px;
  }

  .schedule-day-item-top .schedule-item-delete {
    grid-column: 3;
    grid-row: 1;
  }
}
