/* Events page (calendar) */

body.page-events {
  --text: #111a2d;
  --muted: #6a7587;
  --muted-2: #4f5f74;
  --border: rgba(27, 177, 242, 0.12);
  --border-strong: rgba(255, 7, 108, 0.14);
  --shadow: 0 18px 46px rgba(17, 28, 45, 0.06);
  background:
    radial-gradient(circle at 6% 9%, rgba(27, 177, 242, 0.14), transparent 40%),
    radial-gradient(circle at 94% 12%, rgba(255, 7, 108, 0.11), transparent 42%),
    radial-gradient(circle at 72% 78%, rgba(27, 177, 242, 0.08), transparent 44%),
    linear-gradient(180deg, #f8fafe 0%, #f2f6fc 45%, #eef3fa 100%);
  color: var(--text);
}

body.page-events::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(17, 26, 45, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17, 26, 45, 0.022) 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: 0.45;
}

.page-events .site-header {
  background:
    linear-gradient(180deg, rgba(248, 251, 255, 0.92), rgba(248, 251, 255, 0.76)),
    radial-gradient(circle at 12% 0%, rgba(27, 177, 242, 0.08), transparent 42%),
    radial-gradient(circle at 88% 0%, rgba(255, 7, 108, 0.07), transparent 40%);
  border-bottom: 1px solid rgba(17, 26, 45, 0.05);
  box-shadow:
    0 10px 28px rgba(17, 26, 45, 0.035),
    0 1px 0 rgba(255, 255, 255, 0.68) inset;
}

.page-events .site-header::after {
  background: linear-gradient(
    90deg,
    rgba(27, 177, 242, 0.22),
    rgba(255, 7, 108, 0.18),
    rgba(17, 26, 45, 0)
  );
}

.page-events .brand {
  color: var(--text);
}

.page-events .brand-mark {
  filter:
    drop-shadow(0 0 14px rgba(27, 177, 242, 0.18))
    drop-shadow(0 6px 14px rgba(255, 7, 108, 0.12));
}

.page-events .nav-link {
  color: #576a81;
}

.page-events .nav-link::before {
  background: linear-gradient(90deg, rgba(27, 177, 242, 0.95), rgba(255, 7, 108, 0.78));
}

.page-events .nav-link:hover {
  color: #16263a;
}

.page-events .nav-link.is-active {
  color: #0f1d31;
}

.page-events .site-footer {
  border-top: 1px solid rgba(17, 26, 45, 0.06);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.63), rgba(255, 255, 255, 0.53)),
    radial-gradient(circle at 7% 24%, rgba(27, 177, 242, 0.08), transparent 44%),
    radial-gradient(circle at 94% 12%, rgba(255, 7, 108, 0.07), transparent 44%);
  backdrop-filter: blur(10px);
}

.page-events .footer-kicker {
  color: #16263a;
}

.page-events .footer-note,
.page-events .footer-copy,
.page-events .footer-col-title {
  color: #61738a;
}

.page-events .footer-list a {
  color: #31465d;
}

.page-events .footer-list a:hover {
  color: #14253a;
  border-bottom-color: rgba(27, 177, 242, 0.26);
}

.page-events .main-content {
  position: relative;
  z-index: 1;
  padding-top: 1.35rem;
  padding-bottom: 2.8rem;
}

.ev-hero,
.ev-calendar-area {
  position: relative;
  z-index: 2;
}

.ev-birds-stage {
  --ev-bird-top: 4.15rem;
  position: fixed;
  inset: var(--ev-bird-top) 0 0;
  z-index: 0;
  pointer-events: none;
}

.ev-bird {
  position: absolute;
  width: clamp(180px, 18vw, 290px);
  height: auto;
  opacity: 0.78;
  filter:
    drop-shadow(0 10px 14px rgba(17, 26, 45, 0.05))
    contrast(1.02);
}

.ev-bird-left {
  left: clamp(0.6rem, 1.8vw, 2rem);
  top: 10%;
  animation: ev-bird-float-a 8.5s ease-in-out infinite;
}

.ev-bird-right {
  right: clamp(0.6rem, 1.8vw, 2rem);
  bottom: 13%;
  animation: ev-bird-float-b 9.5s ease-in-out infinite;
}

@keyframes ev-bird-float-a {
  0%,
  100% {
    transform: translate3d(0, 0, 0) rotate(-1.3deg);
  }
  50% {
    transform: translate3d(8px, -7px, 0) rotate(0.8deg);
  }
}

@keyframes ev-bird-float-b {
  0%,
  100% {
    transform: translate3d(0, 0, 0) rotate(1.2deg);
  }
  50% {
    transform: translate3d(-9px, 6px, 0) rotate(-0.8deg);
  }
}

.ev-hero-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(0, 0.94fr);
  gap: 1.4rem;
  padding: 0.8rem 0 0.6rem;
  border-top: 1px solid rgba(17, 26, 45, 0.06);
}

.ev-hero-copy h1 {
  margin: 0.35rem 0 0;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.4vw, 3.35rem);
  line-height: 0.96;
  letter-spacing: -0.03em;
  color: #0f1b2e;
  max-width: 13ch;
}

.ev-hero-copy .hl-lead-a {
  color: #1bb1f2;
}

.ev-hero-copy .hl-lead-b {
  color: #ff076c;
}

.ev-hero-lead {
  margin: 0.85rem 0 0;
  color: #5a6f87;
  max-width: 52ch;
  font-size: 0.98rem;
}

.ev-hero-meta {
  align-self: end;
  display: grid;
  gap: 0.45rem;
  padding: 0.25rem 0 0.1rem 1.1rem;
  border-left: 1px solid rgba(17, 26, 45, 0.07);
}

.ev-meta-row {
  display: grid;
  grid-template-columns: minmax(5.9rem, auto) 1fr;
  gap: 0.75rem;
  align-items: baseline;
  padding: 0.45rem 0;
  border-bottom: 1px dashed rgba(17, 26, 45, 0.07);
}

.ev-meta-label {
  color: #72839a;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.13em;
}

.ev-meta-value {
  color: #1f334b;
  font-weight: 600;
  font-size: 0.9rem;
}

.ev-calendar-area {
  margin-top: 1.15rem;
}

.ev-calendar-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.24fr) minmax(0, 0.76fr);
  gap: 1.2rem 1.6rem;
}

.ev-months {
  min-width: 0;
}

.ev-months-head {
  margin-bottom: 0.75rem;
}

.ev-months-head h2 {
  margin: 0.35rem 0 0;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2vw, 2rem);
  letter-spacing: -0.02em;
  line-height: 1.06;
  color: #101f32;
}

.ev-month-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.ev-month {
  min-width: 0;
  border: 1px solid rgba(17, 26, 45, 0.06);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.66)),
    radial-gradient(circle at 8% 10%, rgba(27, 177, 242, 0.045), transparent 44%);
}

.ev-month-header {
  display: flex;
  gap: 0.8rem;
  justify-content: space-between;
  align-items: flex-start;
  padding: 0.8rem 0.85rem 0.7rem;
  border-bottom: 1px solid rgba(17, 26, 45, 0.06);
}

.ev-month-header h3 {
  margin: 0.35rem 0 0;
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: #12243a;
}

.ev-month-counts {
  display: grid;
  gap: 0.25rem;
  justify-items: end;
  padding-top: 0.12rem;
}

.ev-count {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #61758e;
}

.ev-count-open {
  color: #ff076c;
}

.ev-count-scrim {
  color: #1bb1f2;
}

.ev-count-event {
  color: #8b5cf6;
}

.ev-weekdays {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  border-bottom: 1px solid rgba(17, 26, 45, 0.05);
}

.ev-weekdays span {
  padding: 0.5rem 0.35rem;
  text-align: right;
  color: #74859b;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.ev-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  border-left: 1px solid rgba(17, 26, 45, 0.05);
}

.ev-day {
  min-height: 7.3rem;
  border-right: 1px solid rgba(17, 26, 45, 0.05);
  border-bottom: 1px solid rgba(17, 26, 45, 0.05);
  padding: 0.35rem 0.33rem 0.42rem;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 0.22rem;
  background: rgba(255, 255, 255, 0.16);
  position: relative;
}

.ev-day.is-outside {
  background: rgba(255, 255, 255, 0.06);
}

.ev-day.is-outside .ev-day-num,
.ev-day.is-outside .ev-day-item,
.ev-day.is-outside .ev-day-more {
  opacity: 0.42;
}

.ev-day.is-past.is-current:not(.is-today) .ev-day-num {
  color: #7f91a6;
}

.ev-day.is-today {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.54), rgba(255, 255, 255, 0.22)),
    radial-gradient(circle at 16% 10%, rgba(27, 177, 242, 0.08), transparent 56%);
}

.ev-day.is-today::after {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: linear-gradient(90deg, rgba(27, 177, 242, 0.86), rgba(255, 7, 108, 0.74));
}

.ev-day-head {
  display: flex;
  justify-content: flex-end;
}

.ev-day-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.45rem;
  min-height: 1.25rem;
  color: #1a2d45;
  font-weight: 700;
  font-size: 0.82rem;
}

.ev-day.has-open .ev-day-num {
  color: #cf0f66;
}

.ev-day.has-scrim:not(.has-open) .ev-day-num {
  color: #0f8ec8;
}

.ev-day-events {
  display: grid;
  align-content: start;
  gap: 0.18rem;
  min-width: 0;
}

.ev-day-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.28rem 0.35rem;
  align-items: center;
  min-width: 0;
  padding: 0.16rem 0.22rem;
  border-left: 2px solid transparent;
  background: rgba(255, 255, 255, 0.35);
}

.ev-day-item--open {
  border-left-color: rgba(255, 7, 108, 0.75);
}

.ev-day-item--scrim {
  border-left-color: rgba(27, 177, 242, 0.78);
}

.ev-day-item-time {
  color: #70839a;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.ev-day-item-title {
  color: #1b2f47;
  font-size: 0.69rem;
  font-weight: 600;
  line-height: 1.15;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ev-day-more {
  color: #6d8097;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 0.1rem 0.15rem 0;
}

.ev-rail {
  min-width: 0;
  border-left: 1px solid rgba(17, 26, 45, 0.06);
  padding-left: 1rem;
}

.ev-rail-block {
  padding-bottom: 0.95rem;
  margin-bottom: 0.95rem;
  border-bottom: 1px solid rgba(17, 26, 45, 0.06);
}

.ev-rail-block:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: 0;
}

.ev-rail-block h3 {
  margin: 0.35rem 0 0;
  font-family: var(--font-display);
  font-size: 1.22rem;
  letter-spacing: -0.02em;
  line-height: 1.07;
  color: #0f1f32;
}

.ev-rail-text {
  margin: 0.65rem 0 0;
  color: #5f728a;
  font-size: 0.92rem;
  line-height: 1.45;
}

.ev-legend {
  margin-top: 0.7rem;
  display: grid;
  gap: 0.45rem;
}

.ev-legend-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.55rem;
  align-items: center;
  color: #36506a;
  font-size: 0.9rem;
}

.ev-legend-chip {
  width: 0.85rem;
  height: 0.85rem;
  display: inline-block;
  border-radius: 999px;
}

.ev-legend-chip-open {
  background: linear-gradient(135deg, rgba(255, 7, 108, 0.95), rgba(255, 7, 108, 0.6));
  box-shadow: 0 0 0 4px rgba(255, 7, 108, 0.08);
}

.ev-legend-chip-scrim {
  background: linear-gradient(135deg, rgba(27, 177, 242, 0.95), rgba(27, 177, 242, 0.62));
  box-shadow: 0 0 0 4px rgba(27, 177, 242, 0.08);
}

.ev-feed {
  margin-top: 0.75rem;
  display: grid;
  gap: 0.45rem;
}

.ev-feed-row {
  padding: 0.55rem 0.1rem 0.55rem 0.55rem;
  border-left: 2px solid rgba(17, 26, 45, 0.08);
  border-bottom: 1px dashed rgba(17, 26, 45, 0.06);
}

.ev-feed-row--open {
  border-left-color: rgba(255, 7, 108, 0.7);
}

.ev-feed-row--scrim {
  border-left-color: rgba(27, 177, 242, 0.75);
}

.ev-feed-time {
  margin: 0;
  color: #6c8097;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.ev-feed-row h4 {
  margin: 0.28rem 0 0;
  font-family: var(--font-display);
  font-size: 0.98rem;
  letter-spacing: -0.015em;
  color: #15263d;
}

.ev-feed-row p:last-child {
  margin: 0.18rem 0 0;
  color: #5f728a;
  font-size: 0.86rem;
}

@media (max-width: 1400px) {
  .ev-bird {
    width: clamp(150px, 16vw, 240px);
    opacity: 0.6;
  }
}

@media (max-width: 1180px) {
  .ev-calendar-layout {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .ev-rail {
    border-left: 0;
    border-top: 1px solid rgba(17, 26, 45, 0.06);
    padding-left: 0;
    padding-top: 0.95rem;
  }

  .ev-bird {
    opacity: 0.45;
  }
}

@media (max-width: 980px) {
  .ev-birds-stage {
    display: none;
  }

  .ev-hero-shell {
    grid-template-columns: 1fr;
    gap: 0.9rem;
    padding-top: 0.55rem;
  }

  .ev-hero-meta {
    border-left: 0;
    border-top: 1px solid rgba(17, 26, 45, 0.06);
    padding-left: 0;
    padding-top: 0.55rem;
  }

  .ev-month-grid {
    grid-template-columns: 1fr;
  }

  .ev-day {
    min-height: 6.45rem;
  }
}

@media (max-width: 760px) {
  .page-events .main-content {
    padding-top: 1.15rem;
  }

  .ev-hero-copy h1 {
    font-size: clamp(1.7rem, 8.8vw, 2.3rem);
    max-width: none;
  }

  .ev-meta-row {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }

  .ev-month-header {
    flex-direction: column;
    gap: 0.45rem;
  }

  .ev-month-counts {
    justify-items: start;
    grid-auto-flow: column;
    gap: 0.55rem;
  }

  .ev-weekdays span {
    padding: 0.45rem 0.2rem;
    font-size: 0.66rem;
  }

  .ev-day {
    min-height: 5.8rem;
    padding: 0.28rem 0.18rem 0.32rem;
  }

  .ev-day-item {
    padding: 0.12rem 0.16rem;
    gap: 0.16rem 0.22rem;
  }

  .ev-day-item-time {
    font-size: 0.6rem;
  }

  .ev-day-item-title {
    font-size: 0.62rem;
  }

  .ev-rail-block h3 {
    font-size: 1.08rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ev-bird-left,
  .ev-bird-right {
    animation: none !important;
  }
}

/* Events v2: no big side feed, hover overview on calendar days */
.ev-hero-shell {
  grid-template-columns: 1fr;
  gap: 0.6rem;
}

.ev-hero-copy {
  max-width: 68rem;
}

.ev-hero-caption {
  margin: 0.7rem 0 0;
  color: #627991;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
}

.ev-months-sub {
  margin: 0.45rem 0 0;
  color: #61748d;
  font-size: 0.92rem;
  max-width: 64ch;
}

.ev-calendar-layout {
  grid-template-columns: 1fr;
}

.ev-day {
  overflow: visible;
}

.ev-day.has-events {
  cursor: default;
}

.ev-day:hover,
.ev-day:focus,
.ev-day:focus-within {
  z-index: 8;
}

.ev-day:focus {
  outline: none;
}

.ev-day.has-events:focus .ev-day-head,
.ev-day.has-events:hover .ev-day-head {
  transform: translateY(-1px);
}

.ev-day-head {
  transition: transform 180ms ease;
}

.ev-day-markers {
  display: grid;
  align-content: start;
  gap: 0.18rem;
}

.ev-day-marker {
  width: fit-content;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  gap: 0.24rem;
  padding: 0.12rem 0.24rem;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #465d76;
  background: rgba(255, 255, 255, 0.48);
  border-left: 2px solid transparent;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ev-day-marker--open {
  border-left-color: rgba(255, 7, 108, 0.78);
  color: #b7115d;
}

.ev-day-marker--scrim {
  border-left-color: rgba(27, 177, 242, 0.78);
  color: #127eaf;
}

.ev-day-marker--event {
  border-left-color: rgba(139, 92, 246, 0.78);
  color: #6d3fc0;
}

.ev-day-marker--custom {
  /* color set via inline style */
}

.ev-day-marker--recurring {
  border-left-color: rgba(139, 92, 246, 0.78);
  color: #6d3fc0;
}

.ev-day-popover {
  position: absolute;
  left: 0.28rem;
  top: calc(100% + 0.45rem);
  width: min(18.8rem, calc(100vw - 3rem));
  padding: 0.7rem 0.7rem 0.65rem;
  border: 1px solid rgba(17, 26, 45, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.9)),
    radial-gradient(circle at 8% 8%, rgba(27, 177, 242, 0.06), transparent 40%),
    radial-gradient(circle at 94% 10%, rgba(255, 7, 108, 0.05), transparent 42%);
  box-shadow:
    0 20px 36px rgba(17, 26, 45, 0.12),
    0 4px 14px rgba(17, 26, 45, 0.05);
  opacity: 0;
  transform: translate3d(0, 8px, 0);
  pointer-events: none;
  transition:
    opacity 180ms ease,
    transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.ev-day-popover::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 1rem;
  width: 10px;
  height: 10px;
  background: rgba(255, 255, 255, 0.95);
  border-left: 1px solid rgba(17, 26, 45, 0.08);
  border-top: 1px solid rgba(17, 26, 45, 0.08);
  transform: rotate(45deg);
}

.ev-days > .ev-day:nth-child(7n-1) .ev-day-popover,
.ev-days > .ev-day:nth-child(7n) .ev-day-popover {
  left: auto;
  right: 0.28rem;
}

.ev-days > .ev-day:nth-child(7n-1) .ev-day-popover::before,
.ev-days > .ev-day:nth-child(7n) .ev-day-popover::before {
  left: auto;
  right: 1rem;
}

.ev-days > .ev-day:nth-last-child(-n + 14) .ev-day-popover {
  top: auto;
  bottom: calc(100% + 0.45rem);
  transform: translate3d(0, -8px, 0);
}

.ev-days > .ev-day:nth-last-child(-n + 14) .ev-day-popover::before {
  top: auto;
  bottom: -6px;
  border-left: 0;
  border-top: 0;
  border-right: 1px solid rgba(17, 26, 45, 0.08);
  border-bottom: 1px solid rgba(17, 26, 45, 0.08);
}

.ev-day.has-events:hover .ev-day-popover,
.ev-day.has-events:focus .ev-day-popover,
.ev-day.has-events:focus-within .ev-day-popover {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  pointer-events: auto;
}

.ev-day-popover-head {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  align-items: baseline;
  padding-bottom: 0.45rem;
  margin-bottom: 0.45rem;
  border-bottom: 1px solid rgba(17, 26, 45, 0.06);
}

.ev-day-popover-head p {
  margin: 0;
  color: #243a54;
  font-weight: 700;
  font-size: 0.82rem;
}

.ev-day-popover-head span {
  color: #6d839c;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.ev-day-popover-list {
  display: grid;
  gap: 0.32rem;
}

.ev-day-popover-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.35rem 0.5rem;
  align-items: start;
  padding: 0.32rem 0.35rem;
  background: rgba(255, 255, 255, 0.45);
  border-left: 2px solid rgba(17, 26, 45, 0.08);
}

.ev-day-popover-item--open {
  border-left-color: rgba(255, 7, 108, 0.72);
}

.ev-day-popover-item--scrim {
  border-left-color: rgba(27, 177, 242, 0.75);
}

.ev-day-popover-item--event,
.ev-day-popover-item--recurring {
  border-left-color: rgba(139, 92, 246, 0.75);
}

.ev-day-popover-time {
  color: #677e96;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
  padding-top: 0.12rem;
}

.ev-day-popover-copy {
  display: grid;
  gap: 0.08rem;
}

.ev-day-popover-copy strong {
  color: #14263d;
  font-size: 0.8rem;
  line-height: 1.2;
}

.ev-day-popover-copy span {
  color: #60758e;
  font-size: 0.73rem;
  line-height: 1.25;
}

.ev-day-popover-twitch {
  margin-top: 0.55rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: #20354e;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.8rem;
  border-bottom: 1px solid rgba(27, 177, 242, 0.2);
}

.ev-day-popover-twitch span {
  color: #ff076c;
}

.ev-day-popover-twitch:hover {
  border-bottom-color: rgba(255, 7, 108, 0.26);
}

@media (max-width: 1180px) {
  .ev-calendar-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .ev-day {
    z-index: auto !important;
    overflow: hidden;
  }

  .ev-day.has-events {
    cursor: pointer;
  }

  .ev-day-popover {
    display: none;
  }

  .ev-day-popover::before {
    display: none;
  }
}

/* Mobile popover: appended to body by JS */
.ev-mobile-popover-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(8, 14, 24, 0.55);
  z-index: 100000;
  animation: fadeIn 0.2s ease;
}

.ev-mobile-popover-backdrop.is-active {
  display: block;
}

.ev-mobile-popover {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  border-radius: 1rem 1rem 0 0;
  padding: 1.8rem 1.4rem calc(2rem + env(safe-area-inset-bottom, 0px));
  z-index: 100001;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.94)),
    radial-gradient(circle at 8% 8%, rgba(27, 177, 242, 0.06), transparent 40%),
    radial-gradient(circle at 94% 10%, rgba(255, 7, 108, 0.05), transparent 42%);
  border: 1px solid rgba(17, 26, 45, 0.08);
  border-bottom: none;
  box-shadow: 0 -12px 48px rgba(17, 26, 45, 0.22);
  animation: mobileSlideUp 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.ev-mobile-popover.is-active {
  display: block;
}

@keyframes mobileSlideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (max-width: 760px) {
  .ev-hero-caption,
  .ev-months-sub {
    font-size: 0.86rem;
  }

  .ev-day-marker {
    font-size: 0.56rem;
    padding: 0.1rem 0.18rem;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .ev-day-markers {
    overflow: hidden;
  }
}

/* Tryout Area */
.ev-tryout-area {
  background: linear-gradient(135deg, rgba(27, 177, 242, 0.05), rgba(255, 7, 108, 0.03));
  border-top: 2px solid rgba(27, 177, 242, 0.15);
  border-bottom: 2px solid rgba(27, 177, 242, 0.15);
  margin-top: 3rem;
  font-family: var(--font-display);
}

.ev-tryout-shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 3rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
}

.ev-tryout-copy h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
  font-weight: 700;
  font-family: var(--font-display);
}

.ev-tryout-copy p {
  font-size: 1rem;
  color: #6a7587;
  margin-bottom: 1.5rem;
  max-width: 500px;
  font-family: var(--font-display);
}

.ev-tryout-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.6rem;
  background: transparent;
  color: var(--turquoise);
  border: 2px solid var(--turquoise);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 700;
  font-family: var(--font-display);
  cursor: pointer;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  transition: background 0.25s ease, color 0.25s ease, box-shadow 0.25s ease, transform 0.2s ease;
}

.ev-tryout-btn:hover {
  background: var(--turquoise);
  color: #fff;
  box-shadow: 0 0 24px rgba(27, 177, 242, 0.35);
  transform: translateY(-2px);
}

.ev-tryout-btn:active {
  transform: translateY(0);
  box-shadow: 0 0 12px rgba(27, 177, 242, 0.2);
}

/* Modal Dialog */
.ev-tryout-modal {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  display: none;
  background: transparent !important;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  padding: 1.5rem;
  z-index: 9999999;
  -webkit-appearance: none;
  appearance: none;
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
  max-width: none;
  max-height: none;
  margin: 0 !important;
  overflow: visible;
}

.ev-tryout-modal[open],
.ev-tryout-modal.is-open {
  display: block;
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
}

.ev-tryout-modal:focus,
.ev-tryout-modal:focus-visible,
.ev-tryout-modal[open]:focus,
.ev-tryout-modal[open]:focus-visible {
  outline: 0 !important;
}

.ev-tryout-modal::backdrop {
  background: rgba(8, 14, 24, 0.36);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.ev-tryout-modal-content {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #f6f8fb;
  border-radius: 1.2rem;
  width: min(920px, calc(100vw - 3rem));
  max-width: 920px;
  border: 1px solid rgba(17, 26, 45, 0.08);
  box-shadow: 0 24px 64px rgba(17, 26, 45, 0.16);
  max-height: calc(100vh - 3rem);
  margin: 0;
  overflow-y: auto;
  animation: slideIn 0.3s ease;
  font-family: var(--font-display);
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

.ev-tryout-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding: 2rem 2rem 1.2rem;
  border-bottom: 1px solid rgba(17, 26, 45, 0.09);
}

.ev-tryout-kicker {
  margin: 0 0 0.4rem;
  color: #0a8cd6;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-family: var(--font-display);
}

.ev-tryout-modal-header h3 {
  font-size: 1.9rem;
  font-weight: 700;
  margin: 0 0 0.4rem;
  color: #111a2d;
  font-family: var(--font-display);
}

.ev-tryout-sub {
  margin: 0;
  color: #5f7189;
  font-size: 0.95rem;
  font-family: var(--font-display);
}

.ev-tryout-close {
  background: none;
  border: none;
  font-size: 1.75rem;
  cursor: pointer;
  color: #a0a9b5;
  transition: all 0.2s ease;
  padding: 0.5rem;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  flex-shrink: 0;
}

.ev-tryout-close:hover {
  color: #111a2d;
  background: rgba(27, 177, 242, 0.08);
}

.ev-tryout-form {
  padding: 1.4rem 2rem 2rem;
}

.ev-card-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 320px) 108px;
  gap: 0.8rem 1.25rem;
  align-items: start;
}

.ev-form-group {
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
}

.ev-card-identity {
  grid-column: 1;
  grid-row: 1;
  padding: 0;
  align-self: end;
}

.ev-identity-line {
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
  padding: 0;
}

.ev-name-line,
.ev-age-line {
  border: none;
  border-bottom: 2px solid rgba(17, 26, 45, 0.2);
  border-radius: 0;
  background: transparent;
  padding: 0.15rem 0.2rem 0.34rem;
  color: #0f1d31;
  transition: border-color 0.2s ease;
}

.ev-name-line {
  font-size: 2rem;
  font-weight: 700;
  font-family: var(--font-display);
  width: min(100%, 460px);
  min-width: 240px;
}

.ev-age-line {
  width: 78px;
  font-size: 1.2rem;
  font-weight: 600;
  font-family: var(--font-display);
  text-align: center;
  transform: translateY(2px);
}

.ev-name-line::placeholder,
.ev-age-line::placeholder {
  color: #8ea1b8;
}

.ev-name-line:focus,
.ev-age-line:focus {
  outline: none;
  border-bottom-color: #0a8cd6;
}

.ev-name-sep {
  font-size: 1.8rem;
  color: #44556c;
  font-weight: 700;
  line-height: 1;
  padding-bottom: 0.2rem;
}

.ev-card-rank {
  grid-column: 2;
  grid-row: 1;
  padding: 0;
  align-self: end;
}

.ev-rank-line {
  width: 100%;
}

.ev-rank-floating {
  position: static;
  grid-column: 3;
  grid-row: 1 / span 3;
  justify-self: end;
  align-self: center;
  margin-top: 0;
  width: 108px;
  height: 108px;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ev-rank-floating img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transform: translateY(-4px) scale(0.94);
  transition: opacity 0.18s ease, transform 0.2s ease;
}

.ev-rank-floating img.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.ev-field-discord {
  grid-column: 1;
  grid-row: 2;
}

.ev-field-team {
  grid-column: 2;
  grid-row: 2;
}

.ev-field-role {
  grid-column: 2;
  grid-row: 3;
}

.ev-field-date {
  grid-column: 1;
  grid-row: 3;
}

.ev-form-group label {
  display: none;
}

.ev-form-group input,
.ev-form-group select,
.ev-rank-line {
  padding: 0.15rem 0.2rem 0.34rem;
  border: none;
  border-bottom: 2px solid rgba(17, 26, 45, 0.2);
  border-radius: 0;
  font-size: 1rem;
  font-family: var(--font-display);
  transition: all 0.2s ease;
  background: transparent;
  color: #0f1d31;
}

.ev-name-line,
.ev-age-line,
.ev-rank-line {
  line-height: 1;
}

.ev-rank-line {
  margin: 0;
  transform: translateY(-1px);
}

.ev-form-group input::placeholder,
.ev-form-group select::placeholder,
.ev-rank-line::placeholder {
  color: #8ea1b8;
}

.ev-form-group input:focus,
.ev-form-group select:focus,
.ev-rank-line:focus {
  outline: none;
  border-bottom-color: #0a8cd6;
}

.ev-form-group select,
.ev-rank-line {
  -webkit-appearance: none;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #5b6c80 50%),
    linear-gradient(135deg, #5b6c80 50%, transparent 50%);
  background-position: calc(100% - 16px) calc(1em + 2px), calc(100% - 11px) calc(1em + 2px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 2rem;
}

.ev-tryout-submit {
  width: 100%;
  padding: 1rem;
  background: linear-gradient(135deg, #1bb1f2 0%, #0a8cd6 100%);
  color: white;
  border: none;
  border-radius: 0.6rem;
  font-size: 1rem;
  font-weight: 600;
  font-family: var(--font-display);
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 1.5rem;
  box-shadow: 0 4px 15px rgba(27, 177, 242, 0.2);
  letter-spacing: 0.03em;
}

.ev-tryout-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 25px rgba(27, 177, 242, 0.35);
}

.ev-tryout-submit:active {
  transform: translateY(0);
}

.ev-tryout-message {
  padding: 1.75rem 2rem;
  background: linear-gradient(135deg, #f0f7ff, #fff5f9);
  border-radius: 0.8rem;
  border-left: 4px solid #1bb1f2;
  font-family: var(--font-display);
}

.ev-tryout-message p {
  margin: 0.75rem 0;
  color: #111a2d;
  line-height: 1.5;
}

.ev-tryout-message p:first-child {
  font-weight: 600;
  font-size: 1.05rem;
  margin-bottom: 1rem;
}

.ev-tryout-message-link {
  color: #ff076c;
  text-decoration: none;
  font-weight: 700;
  font-family: var(--font-display);
  transition: color 0.2s ease;
}

.ev-tryout-message-link:hover {
  color: #0a8cd6;
}

@media (max-width: 640px) {
  .ev-tryout-modal {
    padding: 0.75rem;
  }

  .ev-tryout-modal-content {
    width: calc(100vw - 1.5rem);
    max-width: 100%;
    border-radius: 0.75rem;
    margin: 0;
    max-height: calc(100vh - 1.5rem);
  }

  .ev-tryout-modal-header {
    padding: 1.4rem 1.2rem 1rem;
  }

  .ev-tryout-modal-header h3 {
    font-size: 1.35rem;
  }

  .ev-tryout-form {
    padding: 1rem 1.2rem 1.2rem;
  }

  .ev-card-grid {
    grid-template-columns: 1fr;
    gap: 0.7rem;
    align-items: start;
  }

  .ev-card-identity,
  .ev-card-rank,
  .ev-rank-floating,
  .ev-field-discord,
  .ev-field-team,
  .ev-field-role,
  .ev-field-date {
    grid-column: 1;
    grid-row: auto;
  }

  .ev-name-line {
    width: 100%;
    min-width: 0;
    font-size: 1.55rem;
  }

  .ev-age-line {
    width: 70px;
    font-size: 1.05rem;
  }

  .ev-rank-floating {
    width: 82px;
    height: 82px;
    justify-self: end;
    align-self: start;
  }
}
