:root {
  --paper: #efefef;
  --ink: #111111;
  --line: #cfcfcf;
  --panel: #ffffff;
  --muted: #5a5a5a;
  --night-sky: #173157;
  --night-sky-deep: #08111f;
  --night-line: #3d5d8e;
  --night-ink: #f5f0e1;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.site-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 260px 1fr;
}

.left-rail {
  background: #f7f7f7;
  border-right: 1px solid var(--line);
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.logo-wrap {
  display: flex;
  justify-content: center;
}

.logo-dot {
  width: 136px;
  height: 136px;
  border-radius: 50%;
  border: 1px solid #ffffff;
  background: #000000;
  color: #ffffff;
  font-size: 20px;
  font-weight: 500;
  line-height: 0.95;
  display: grid;
  place-content: center;
  text-align: center;
  text-transform: uppercase;
  padding: 0 8px;
}

.back-link {
  color: var(--ink);
  text-decoration: none;
  border: 1px solid var(--line);
  background: #fff;
  padding: 8px 10px;
  font-size: 14px;
}

.back-link:hover {
  background: #f0f0f0;
}

.calendar-launch {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.calendar-launch h3 {
  margin: 0 0 8px;
  font-size: 16px;
  text-transform: uppercase;
}

.calendar-launch p {
  margin: 0;
  font-size: 13px;
  line-height: 1.35;
  color: var(--muted);
}

.main-pane {
  padding: 14px 20px 24px;
}

.top-bar {
  background: var(--panel);
  border: 1px solid var(--line);
  min-height: 52px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 8px 12px;
}

h1 {
  margin: 0;
  font-size: clamp(28px, 3.8vw, 46px);
  font-weight: 500;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

.status {
  margin: 0 0 0 auto;
  font-size: 14px;
  color: var(--muted);
}

.status.error {
  color: #7a1f1f;
}

.calendar-panel {
  margin-top: 14px;
  border: 1px solid var(--line);
  background: var(--panel);
  padding: 14px;
}

.month-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.month-controls h2 {
  margin: 0 10px 0 6px;
  font-size: clamp(24px, 3vw, 34px);
  text-transform: uppercase;
  font-weight: 500;
}

.month-controls button {
  border: 1px solid #2a2a2a;
  background: #efefef;
  color: var(--ink);
  font: inherit;
  cursor: pointer;
  padding: 7px 10px;
}

.month-controls button:hover {
  background: #ffffff;
}

.month-summary {
  margin: 8px 0 12px;
  font-size: 13px;
  color: var(--muted);
}

.weekday-row {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 8px;
}

.weekday-row span {
  font-size: 12px;
  text-transform: uppercase;
  color: #3f3f3f;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.day-cell {
  border: 1px solid var(--line);
  min-height: 90px;
  background: #fafafa;
  text-align: left;
  padding: 8px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 2px;
  align-items: flex-start;
}

.day-cell:hover {
  background: #f0f0f0;
}

.day-cell.has-night-events {
  border-color: var(--night-line);
  background:
    radial-gradient(circle at top right, rgba(164, 198, 255, 0.22), transparent 34%),
    linear-gradient(180deg, #1c3b67 0%, var(--night-sky) 58%, var(--night-sky-deep) 100%);
  box-shadow: inset 0 0 0 1px rgba(7, 16, 31, 0.18);
}

.day-cell.has-night-events:hover {
  background:
    radial-gradient(circle at top right, rgba(185, 213, 255, 0.26), transparent 34%),
    linear-gradient(180deg, #244876 0%, #1a3a65 58%, var(--night-sky-deep) 100%);
}

.day-cell.inactive {
  opacity: 0.35;
  cursor: default;
}

.day-cell.selected {
  border-color: #111111;
  background: #ececec;
}

.day-cell.today {
  box-shadow: inset 0 0 0 1px #111111;
}

.day-number {
  font-size: 15px;
  font-weight: 600;
}

.day-cell.has-night-events .day-number {
  color: var(--night-ink);
}

.day-pins {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.day-pin {
  align-self: flex-start;
  border: 1px solid #8f8f8f;
  background: #ffffff;
  border-radius: 999px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 1px 6px;
  font-weight: 700;
  white-space: nowrap;
}

.day-pin.night-pin {
  border-color: var(--night-line);
  background: rgba(7, 16, 31, 0.7);
  color: var(--night-ink);
}

.day-pin.popup-pin {
  border-color: #d3b24d;
  background: #f2de9a;
  color: #111111;
}

.day-count {
  margin-top: auto;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.2;
}

.day-cell.has-events .day-count {
  color: #111111;
  font-weight: 600;
}

.day-cell.has-night-events .day-count {
  color: var(--night-ink);
  background: rgba(7, 16, 31, 0.42);
  border: 1px solid rgba(92, 125, 174, 0.58);
  border-radius: 999px;
  padding: 2px 7px;
}

.day-details {
  margin-top: 14px;
  border: 1px solid var(--line);
  background: var(--panel);
  padding: 12px 14px;
}

.day-details h3 {
  margin: 0;
  font-size: 22px;
  text-transform: uppercase;
  font-weight: 500;
}

.selected-summary {
  margin: 6px 0 10px;
  font-size: 13px;
  color: var(--muted);
}

.selected-list {
  margin: 0;
  display: grid;
  gap: 10px;
}


@media (max-width: 900px) {
  .site-shell {
    grid-template-columns: 1fr;
  }

  .left-rail {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .status {
    margin-left: 0;
  }

  .day-cell {
    min-height: 84px;
    padding: 7px;
  }

  .day-pin {
    font-size: 9px;
  }

  .day-count {
    font-size: 11px;
  }
}

.club-update-modal {
  width: min(520px, calc(100vw - 32px));
  margin: auto;
  border: 1px solid #d9c48f;
  border-radius: 18px;
  padding: 0;
  background: linear-gradient(180deg, rgba(255, 248, 230, 0.985) 0%, rgba(249, 237, 204, 0.985) 100%);
  box-shadow: 0 28px 80px rgba(45, 35, 14, 0.22);
  color: var(--ink);
}

.club-update-modal::backdrop {
  background: rgba(20, 16, 10, 0.32);
  backdrop-filter: blur(10px) saturate(0.9);
  -webkit-backdrop-filter: blur(10px) saturate(0.9);
}

.club-update-form {
  display: grid;
  gap: 14px;
  padding: 22px 22px 20px;
}

.club-update-form-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.club-update-form-title {
  margin: 0;
  font-size: 28px;
  line-height: 1;
  font-weight: 500;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: #5f4b1f;
}

.club-update-close {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  background: rgba(95, 75, 31, 0.08);
  color: #5f4b1f;
  font: inherit;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.club-update-form-subhead {
  margin: -2px 0 2px;
  font-size: 14px;
  line-height: 1.45;
  color: #5d533f;
}

.club-update-label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
  color: #5d533f;
}

.club-update-label input,
.club-update-label textarea {
  width: 100%;
  border: 1px solid rgba(95, 75, 31, 0.2);
  border-radius: 10px;
  padding: 11px 12px;
  background: rgba(255, 253, 247, 0.98);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
}

.club-update-label textarea {
  min-height: 116px;
  resize: vertical;
}

.club-update-submit {
  justify-self: start;
  border: 1px solid #876525;
  border-radius: 999px;
  padding: 10px 16px;
  background: #d4ab4d;
  color: #231909;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
}

.club-update-status {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: #245c3f;
}

.club-update-status:empty {
  display: none;
}

.club-update-status.is-error {
  color: #a12d2d;
}

body.club-update-modal-open .site-shell {
  filter: blur(5px) saturate(0.92);
  transition: filter 160ms ease;
}
