:root {
  --bg: #eef1f4;
  --surface: rgba(255, 255, 255, 0.9);
  --surface-strong: #ffffff;
  --text: #1f2430;
  --muted: #6f7480;
  --line: rgba(32, 37, 45, 0.09);
  --navy: #1f2430;
  --teal: #8bc4c8;
  --coral: #f76a0c;
  --gold: #ffc516;
  --gold-soft: rgba(255, 197, 22, 0.16);
  --gold-wash: rgba(255, 197, 22, 0.08);
  --soft: #eef2f3;
  --soft-gold: rgba(247, 106, 12, 0.14);
  --shadow: 0 24px 60px rgba(31, 36, 48, 0.12);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(247, 106, 12, 0.1), transparent 24%),
    radial-gradient(circle at 78% 18%, rgba(255, 197, 22, 0.08), transparent 18%),
    radial-gradient(circle at right, rgba(139, 196, 200, 0.06), transparent 28%),
    linear-gradient(180deg, #f7f8fa 0%, var(--bg) 100%);
}

body {
  padding: 18px;
}

button,
input,
a {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.hidden {
  display: none !important;
}

.shell {
  width: min(100%, 1280px);
  margin: 0 auto;
}

.hero {
  position: relative;
  overflow: hidden;
  border-radius: 38px;
  padding: 18px;
  background:
    linear-gradient(180deg, rgba(46, 52, 60, 0.96), rgba(34, 39, 46, 0.92)),
    linear-gradient(135deg, rgba(247, 106, 12, 0.08), rgba(255, 197, 22, 0.06), rgba(139, 196, 200, 0.05));
  box-shadow: var(--shadow);
}

.hero__backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top right, rgba(247, 106, 12, 0.14), transparent 22%),
    radial-gradient(circle at left 30%, rgba(255, 197, 22, 0.08), transparent 24%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 60%);
}

.hero__topbar,
.hero__content,
.hero__actions,
.tabs,
.section__header,
.card__footer {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero__topbar,
.hero__content {
  position: relative;
  z-index: 1;
}

.hero__topbar {
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
}

.brand__logo {
  height: 54px;
  width: auto;
  display: block;
}

.section__eyebrow {
  margin: 0 0 4px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.72rem;
  color: #ffd36a;
  opacity: 0.92;
}

.hero h2,
.section h3,
.card h4 {
  margin: 0;
}

.hero__content {
  margin-top: 14px;
}

.tag,
.tab,
.chip,
.button {
  border-radius: 999px;
}

.tag {
  min-height: 34px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
}

.button {
  min-height: 44px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 0;
  font-weight: 800;
  transition: transform 160ms ease, opacity 160ms ease, background 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button:active {
  transform: translateY(0);
  filter: brightness(0.96);
}

.button--ghost {
  background: rgba(247, 106, 12, 0.08);
  color: var(--coral);
  border: 1px solid rgba(247, 106, 12, 0.16);
}

.button--light {
  background: white;
  color: var(--navy);
}

.button--secondary {
  background: linear-gradient(180deg, #ffcf2f 0%, #f3b90d 100%);
  color: #1f2430;
}

.button--secondary:hover {
  color: #1f2430;
}

.button--outline {
  background: transparent;
  color: var(--navy);
  border: 1.5px solid rgba(31, 36, 48, 0.12);
  box-shadow: 0 8px 18px rgba(31, 36, 48, 0.04);
}

.button--outline:hover,
.button--ghost:hover,
.button--light:hover {
  color: var(--navy);
}

.intro-card {
  max-width: 760px;
  display: grid;
  gap: 10px;
  padding: 6px 2px 2px;
}

.intro-card__eyebrow {
  margin: 0;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.intro-card__title {
  margin: 0;
  font-size: clamp(1.5rem, 3vw, 2.15rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: #f8fafc;
}

.intro-card__text {
  margin: 0;
  max-width: 680px;
  color: rgba(243, 244, 246, 0.82);
  line-height: 1.6;
}

.app {
  margin-top: 22px;
}

.toolbar,
.section {
  background: var(--surface);
  border-radius: var(--radius-xl);
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.toolbar {
  padding: 18px;
}

.section {
  background: var(--surface);
}

.toolbar__row {
  display: grid;
  grid-template-columns: minmax(240px, 1.5fr) repeat(2, minmax(180px, 0.7fr)) auto;
  gap: 14px;
  align-items: end;
}

.search {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding: 0 16px;
  border-radius: 18px;
  background: #fffdfa;
  border: 1px solid var(--line);
}

.search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
}

.search__icon {
  color: var(--muted);
  font-size: 1.1rem;
}

.event-type-filter {
  display: grid;
  gap: 8px;
}

.event-type-filter span {
  color: #5f6673;
  font-size: 0.9rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.event-type-filter select {
  min-height: 50px;
  border-radius: 20px;
  border: 1.5px solid rgba(31, 36, 48, 0.12);
  background: #fffdfa;
  color: var(--text);
  padding: 0 18px;
  font: inherit;
  appearance: none;
  font-weight: 700;
  box-shadow: 0 8px 18px rgba(31, 36, 48, 0.04);
}

.tabs {
  margin-top: 14px;
  gap: 8px;
  flex-wrap: nowrap;
}

.status {
  margin: 14px 0 0;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(139, 196, 200, 0.1);
  color: #bde4e7;
  font-size: 0.94rem;
  font-weight: 700;
}

.status[data-tone="error"] {
  background: rgba(247, 106, 12, 0.1);
  color: #a54800;
}

.tab,
.chip {
  border: 1.5px solid rgba(31, 36, 48, 0.12);
  min-height: 36px;
  padding: 0 11px;
  background: #fffdfa;
  cursor: pointer;
  color: var(--text);
  font-weight: 800;
  font-size: 0.8rem;
  box-shadow: 0 8px 18px rgba(31, 36, 48, 0.04);
  white-space: nowrap;
  flex: 1 1 0;
  justify-content: center;
}

.tab.is-active,
.chip.is-active {
  background: linear-gradient(180deg, #ffd869 0%, #ffc516 100%);
  color: #5a3900;
  border-color: rgba(255, 197, 22, 0.95);
  box-shadow: 0 12px 24px rgba(255, 197, 22, 0.32);
}

.section {
  margin-top: 18px;
  padding: 18px;
}

.section__header {
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

#favoritesToggle {
  min-height: 34px;
  padding: 0 10px;
  font-size: 0.78rem;
  white-space: nowrap;
  border-radius: 999px;
}

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

.card {
  overflow: hidden;
  border-radius: 24px;
  background: var(--surface-strong);
  border: 1px solid var(--line);
  min-height: 100%;
}

.sponsor-card {
  display: block;
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid rgba(255, 197, 22, 0.18);
  background: #fffdfa;
  box-shadow: 0 18px 38px rgba(255, 197, 22, 0.08);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.sponsor-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 48px rgba(255, 197, 22, 0.12);
}

.sponsor-card__media {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: #3a424b;
}

.sponsor-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(0.9);
}

.sponsor-card__badge {
  position: absolute;
  top: 14px;
  left: 14px;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  background: rgba(245, 247, 250, 0.94);
  color: #8b5a00;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.card__media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #343b43;
}

.card__media-button {
  position: absolute;
  inset: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 180ms ease, filter 180ms ease;
}

.card__media-button:hover .card__image {
  transform: scale(1.02);
  filter: saturate(1.02);
}

.card__media-button:active .card__image {
  transform: scale(1);
  filter: brightness(0.94);
}

.card__favorite {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  background: rgba(255, 253, 250, 0.92);
  color: var(--coral);
  font-size: 1.25rem;
  font-weight: 800;
}

.card__favorite.is-active {
  background: var(--coral);
  color: white;
}

.card__category {
  position: absolute;
  top: 14px;
  right: 58px;
  min-height: 38px;
  padding: 0 16px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.94);
  color: #114d4f;
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.card__date {
  position: absolute;
  left: 14px;
  bottom: 14px;
  width: 64px;
  height: 74px;
  border-radius: 18px;
  background: rgba(255, 253, 250, 0.94);
  color: #114d4f;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-shadow: 0 12px 24px rgba(31, 36, 48, 0.16);
  border: 1px solid rgba(31, 36, 48, 0.08);
}

.card__date span:first-child {
  display: block;
  font-size: 1.72rem;
  font-weight: 800;
  line-height: 1;
}

.card__date span:last-child {
  display: block;
  margin-top: 1px;
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  color: #798093;
  font-weight: 800;
}

.card__body {
  padding: 16px 18px 14px;
  display: flex;
  flex-direction: column;
  min-height: 244px;
}

.tag {
  background: linear-gradient(180deg, rgba(255, 197, 22, 0.18), rgba(255, 197, 22, 0.1));
  color: #ffe099;
  font-size: 0.82rem;
  font-weight: 800;
}

.tag--soft {
  background: rgba(139, 196, 200, 0.12);
  color: #bfe4e7;
}

.card h4 {
  margin-top: 0;
  font-size: clamp(1.52rem, 2.8vw, 1.9rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: #2a3037;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.16em;
}

.card__excerpt {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.32;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.64em;
}

.card__meta-pills {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.meta-pill {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  background: #ffc516;
  color: #1f2430;
  font-weight: 900;
  font-size: 0.88rem;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.06);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

[data-location].meta-pill {
  max-width: min(100%, 240px);
  font-size: 0.84rem;
}

.meta-pill::before {
  margin-right: 10px;
  font-size: 1rem;
}

.meta-pill[data-kind="location"]::before {
  content: "📍";
}

.meta-pill[data-kind="time"]::before {
  content: "◔";
}

.card__footer {
  margin-top: auto;
  padding-top: 10px;
}

.card__link {
  min-height: 28px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #5f6673;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  font-weight: 800;
  cursor: pointer;
  transition: color 160ms ease, transform 160ms ease;
}

.card__link:hover {
  color: var(--coral);
  transform: translateX(2px);
}

.card__link:active {
  color: #b9550a;
  transform: translateX(1px);
}

.empty {
  padding: 56px 18px;
  text-align: center;
}

.empty h4 {
  margin: 0;
  font-size: 1.2rem;
}

.empty p {
  margin: 10px 0 0;
  color: var(--muted);
}

.empty__actions {
  margin-top: 18px;
}

.dialog {
  width: min(880px, calc(100vw - 20px));
  max-width: 100%;
  border: 0;
  padding: 0;
  background: transparent;
}

.dialog::backdrop {
  background: rgba(19, 34, 56, 0.58);
  backdrop-filter: blur(8px);
}

.dialog__panel {
  position: relative;
  border-radius: 28px;
  padding: 24px;
  background: #fffdfa;
  box-shadow: var(--shadow);
}

.dialog__panel--narrow {
  width: min(100%, 560px);
}

.dialog__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 50px;
  height: 50px;
  border-radius: 999px;
  border: 2px solid rgba(31, 36, 48, 0.12);
  cursor: pointer;
  font-size: 1.8rem;
  font-weight: 500;
  background: #ffffff;
  color: var(--text);
  box-shadow: 0 16px 30px rgba(31, 36, 48, 0.18);
  z-index: 2;
}

.dialog__close:hover {
  background: #fff5cf;
  transform: scale(1.03);
}

.dialog__close:active {
  transform: scale(0.98);
}

.detail {
  display: grid;
  gap: 16px;
}

.detail__header {
  display: grid;
  gap: 12px;
}

.detail__cover {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 22px;
}

.detail__meta,
.detail__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.detail__title {
  display: grid;
  gap: 6px;
}

.detail__title h3 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  line-height: 1.06;
}

.detail__venue {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  font-weight: 700;
}

.detail__summary {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.detail__text {
  color: var(--text);
  line-height: 1.7;
}

.detail__text img {
  max-width: 100%;
  height: auto;
  border-radius: 16px;
}

.detail__text p {
  margin: 0 0 1em;
}

.detail__text a {
  color: var(--coral);
  font-weight: 700;
}

.detail__actions .button {
  min-height: 46px;
}

.install-help {
  display: grid;
  gap: 12px;
}

.install-help__eyebrow {
  margin: 0;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.install-help__title {
  margin: 0;
  color: #2a3037;
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  line-height: 1.1;
}

.install-help__text,
.install-help__hint {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.install-help__steps {
  margin: 0;
  padding-left: 1.2rem;
  color: #2a3037;
  line-height: 1.7;
  font-weight: 700;
}


.loading-card {
  min-height: 460px;
  border-radius: 24px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.4)),
    linear-gradient(180deg, #ede8de 0 52%, #fffdfa 52% 100%);
  background-size: 240% 100%, 100% 100%;
  animation: shimmer 1.4s linear infinite;
  border: 1px solid var(--line);
}

@keyframes shimmer {
  from {
    background-position: 200% 0, 0 0;
  }

  to {
    background-position: -40% 0, 0 0;
  }
}

@media (max-width: 980px) {
  .hero__content {
    margin-top: 10px;
  }

  .toolbar__row {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .toolbar__row {
    grid-template-columns: 1fr;
  }

  .tabs {
    gap: 6px;
  }

  .tab,
  .chip {
    min-height: 34px;
    padding: 0 8px;
    font-size: 0.72rem;
  }

  .card__category {
    right: 52px;
    max-width: calc(100% - 126px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .card__date {
    left: 12px;
    bottom: 12px;
    width: 60px;
    height: 70px;
  }

  .card__date span:first-child {
    font-size: 1.62rem;
  }
}

@media (max-width: 640px) {
  body {
    padding: 10px;
  }

  .hero,
  .toolbar,
  .section {
    border-radius: 24px;
  }

  .hero {
    padding: 18px;
  }

  .hero__copy h2 {
    font-size: 2.2rem;
  }

  .brand {
    align-items: flex-start;
  }

  .hero__topbar {
    align-items: flex-start;
  }
}
