:root {
  --brand: #7f1d1d;
  --brand-strong: #991b1b;
  --brand-soft: #fef2f2;
  --brand-line: rgba(127, 29, 29, 0.14);
  --surface: #ffffff;
  --surface-soft: #faf8f6;
  --surface-accent: #f5efea;
  --text: #1f2937;
  --text-strong: #111827;
  --muted: #6b7280;
  --border: rgba(17, 24, 39, 0.09);
  --shadow: 0 18px 40px rgba(17, 24, 39, 0.09);
  --radius: 20px;
  --focus: #b91c1c;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--text);
  background:
    radial-gradient(900px 420px at 0% 0%, rgba(127, 29, 29, 0.08), transparent 60%),
    radial-gradient(900px 520px at 100% 0%, rgba(120, 113, 108, 0.10), transparent 58%),
    linear-gradient(180deg, var(--surface-soft), #f3f0ec);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.wrap {
  width: min(720px, 100%);
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  backdrop-filter: blur(6px);
}

.accent {
  width: 100%;
  height: 6px;
  background: linear-gradient(90deg, var(--brand), #b45309, #7f1d1d);
}

.header {
  padding: 22px 22px 18px;
  background: linear-gradient(180deg, #ffffff 0%, var(--surface-soft) 100%);
  color: var(--text-strong);
  display: flex;
  gap: 16px;
  align-items: center;
  border-bottom: 1px solid var(--border);
}

.logo {
  width: 64px;
  min-width: 64px;
  height: 64px;
  min-height: 64px;
  flex: 0 0 64px;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff, #f9f6f2);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 10px;
  background: transparent;
}

.brand {
  min-width: 0;
}

.brand h1 {
  margin: 0;
  font-size: 19px;
  line-height: 1.2;
  letter-spacing: 0.2px;
  color: var(--text-strong);
}

.brand p {
  margin: 6px 0 0;
  font-size: 14px;
  color: var(--muted);
}

.brand a {
  color: var(--brand);
  font-weight: 600;
}

.content {
  padding: 18px 22px 22px;
}

.event-card {
  margin: 0 0 18px;
  padding: 16px 18px;
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(250, 248, 246, 0.96)),
    linear-gradient(90deg, rgba(127, 29, 29, 0.06), rgba(180, 83, 9, 0.04));
  border: 1px solid var(--brand-line);
  box-shadow: 0 12px 28px rgba(127, 29, 29, 0.06);
}

.event-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.event-eyebrow {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand);
}

.event-head-icon {
  display: inline-block;
  margin-right: 8px;
}

.event-calendar-link {
  color: var(--brand);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.event-calendar-link:hover {
  border-bottom-color: currentColor;
}

.event-title {
  margin: 0 0 8px;
  font-size: 22px;
  line-height: 1.2;
  color: var(--text-strong);
}

.next-events-list {
  display: grid;
  gap: 14px;
}

.next-event-item {
  padding-top: 2px;
}

.next-event-item + .next-event-item {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid rgba(127, 29, 29, 0.12);
}

.event-subtitle {
  margin: -2px 0 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--brand);
}

.event-download {
  margin: -2px 0 10px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.event-download-link {
  color: var(--brand);
  font-size: 13px;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.event-download-link:hover {
  color: var(--brand-strong);
}

.event-download-action {
  flex: 0 0 auto;
  font-size: 12px;
  padding: 7px 10px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-strong);
  border: 1px solid rgba(127, 29, 29, 0.16);
  font-weight: 600;
  text-decoration: none;
}

.event-download-action:hover {
  border-color: rgba(127, 29, 29, 0.28);
  box-shadow: 0 10px 18px rgba(17, 24, 39, 0.06);
}

.event-date,
.event-time {
  margin: 0;
  color: var(--text);
  font-size: 14px;
}

.event-time {
  margin-top: 4px;
  color: var(--muted);
}

.hint {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.social-section {
  margin: 0 0 18px;
}

.social-heading {
  margin-bottom: 12px;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, #ffffff, #fcfbfa);
  color: var(--text-strong);
  text-decoration: none;
  transition: transform 0.08s ease, border-color 0.12s ease, box-shadow 0.12s ease;
}

.social-link:hover {
  transform: translateY(-1px);
  border-color: rgba(127, 29, 29, 0.24);
  box-shadow: 0 10px 18px rgba(17, 24, 39, 0.06);
}

.social-icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--brand);
}

.social-icon svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.social-name {
  font-size: 14px;
  font-weight: 600;
}

.wanted-trades-section {
  margin: 0 0 18px;
}

.wanted-trades-heading {
  margin-bottom: 12px;
}

.wanted-trades-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.wanted-trade-item {
  min-width: 0;
}

.wanted-trade-card {
  height: 100%;
  padding: 14px 15px;
  border-radius: 16px;
  border: 1px solid rgba(127, 29, 29, 0.14);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(250, 245, 244, 0.98)),
    linear-gradient(90deg, rgba(127, 29, 29, 0.04), rgba(180, 83, 9, 0.03));
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.05);
}

.wanted-trade-title {
  display: block;
  margin: 0;
  font-size: 15px;
  line-height: 1.3;
  font-weight: 700;
  color: var(--text-strong);
}

.wanted-trade-note {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.4;
  color: var(--muted);
}

.links {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  text-decoration: none;
  padding: 14px 14px 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, #ffffff, #fcfbfa);
  transition: transform 0.08s ease, border-color 0.12s ease, box-shadow 0.12s ease, background-color 0.12s ease;
  color: var(--text);
}

.links a:hover {
  transform: translateY(-1px);
  border-color: rgba(127, 29, 29, 0.24);
  box-shadow: 0 12px 24px rgba(17, 24, 39, 0.07);
  background: linear-gradient(180deg, #ffffff, #faf5f4);
}

.label {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.label strong {
  font-size: 15px;
  line-height: 1.2;
  color: var(--text-strong);
}

.label span {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 520px;
}

.pill {
  flex: 0 0 auto;
  font-size: 12px;
  padding: 7px 10px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-strong);
  border: 1px solid rgba(127, 29, 29, 0.16);
  font-weight: 600;
}

.config-error {
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--brand-line);
  background: rgba(127, 29, 29, 0.05);
  color: var(--text-strong);
}

.footer {
  padding: 14px 22px 18px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.footer small {
  color: var(--muted);
}

.footer-links {
  display: inline-flex;
  gap: 14px;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--brand);
  text-decoration: none;
  font-weight: 600;
}

.footer-links a:hover {
  text-decoration: underline;
}

.noscript-note {
  width: min(720px, calc(100% - 48px));
  margin: 16px auto 0;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media (max-width: 520px) {
  .label span {
    max-width: 260px;
  }

  .header {
    padding: 18px;
  }

  .content {
    padding: 16px 18px 18px;
  }

  .event-card {
    padding: 14px 16px;
  }

  .event-title {
    font-size: 20px;
  }

  .logo {
    width: 56px;
    min-width: 56px;
    height: 56px;
    min-height: 56px;
    flex: 0 0 56px;
  }

  .links a {
    align-items: flex-start;
    justify-content: flex-start;
    flex-direction: column;
  }

  .pill {
    align-self: flex-start;
    margin-top: 10px;
  }

  .social-links {
    gap: 8px;
  }

  .social-link {
    padding: 9px 12px;
  }

  .footer {
    padding: 12px 18px 16px;
  }
}
