:root {
  color-scheme: dark;
  --bg: #08090d;
  --surface: #111319;
  --surface-raised: #181a22;
  --ink: #f7f7fa;
  --text: #f7f7fa;
  --muted: #a0a1ab;
  --line: #292b34;
  --accent: #ff365d;
  --accent-dark: #e82750;
  --accent-soft: #2a1119;
  --sidebar: #0c0d12;
  --lime: #ff4567;
  --danger: #ff929c;
  --radius: 20px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
  background: var(--bg);
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--text);
  background:
    radial-gradient(ellipse at 82% 0%, #3c132333, transparent 34rem),
    radial-gradient(ellipse at 7% 26%, #171a2a55, transparent 38rem),
    var(--bg);
}

button,
input,
select {
  font: inherit;
}

button:disabled {
  cursor: wait;
  opacity: .58;
}

a {
  color: inherit;
  text-decoration: none;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 2px solid #ff6b84;
  outline-offset: 3px;
}

.app-layout {
  grid-template-columns: 252px minmax(0, 1fr);
  min-height: 100vh;
  background: transparent;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 27px 17px 20px;
  border-right: 1px solid #ffffff0c;
  background:
    radial-gradient(ellipse at 15% 0%, #ff365d12, transparent 19rem),
    var(--sidebar);
}

.brand {
  gap: 12px;
  padding: 0 9px;
}

.brand-mark {
  width: 43px;
  height: 43px;
  border-radius: 14px;
  background: linear-gradient(140deg, #ff6173, #f22655 75%);
  color: #fff;
  box-shadow: 0 8px 26px #ff365d33;
}

.brand-name {
  color: #fff;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: .12em;
}

.brand-caption {
  color: #c49aa4;
  letter-spacing: .12em;
}

.sidebar-label {
  margin: 43px 12px 12px;
  color: #737580;
}

.sidebar-nav {
  gap: 6px;
}

.nav-link {
  min-height: 45px;
  padding: 11px 12px;
  border: 1px solid transparent;
  border-radius: 13px;
  color: #a3a4ad;
}

.nav-link:hover {
  background: #ffffff09;
  color: #fff;
}

.nav-link.active {
  border-color: #ff45672a;
  background: linear-gradient(100deg, #ff365d20, #ffffff08);
  color: #fff;
}

.nav-link.active .nav-icon {
  color: #ff607b;
}

.nav-icon {
  color: #80828d;
}

.main-content {
  width: 100%;
  max-width: 1680px;
  padding: 26px clamp(22px, 4vw, 58px) 42px;
}

.page-header {
  min-height: 60px;
  margin-bottom: 20px;
}

.page-overline,
.micro-label,
.section-index {
  color: #ff7189;
}

.page-heading h1 {
  color: #f8f8fa;
  font-size: clamp(24px, 2.2vw, 31px);
}

.header-pill {
  border-color: #ffffff16;
  background: #13141bbd;
  color: #c5c6ce;
  box-shadow: 0 8px 24px #0002;
}

.connection-dot {
  background: #ff536e;
  box-shadow: 0 0 0 3px #ff536e20, 0 0 14px #ff536e80;
}

.featured {
  min-height: 370px;
  grid-template-columns: minmax(0, 1.08fr) minmax(250px, .92fr);
  padding: 42px 44px;
  border: 1px solid #ff6b8426;
  border-radius: 26px;
  background:
    radial-gradient(ellipse at 83% 50%, #f2295542, transparent 27rem),
    linear-gradient(112deg, #17151e 0%, #19131b 49%, #28121b 100%);
  box-shadow: 0 28px 80px #0007, inset 0 1px #ffffff08;
}

.featured::before {
  background:
    linear-gradient(90deg, #090a0f80, transparent 74%),
    radial-gradient(ellipse at 82% 50%, #ff365d15, transparent 24rem);
}

.featured-copy {
  max-width: 650px;
}

.featured-status {
  border-color: #ffffff28;
  background: #ffffff0c;
  color: #ffd45d;
}

.featured-status.is-live {
  border-color: #ff526d88;
  background: #ff365d1b;
  color: #ff9aab;
}

.featured-overline {
  color: #c7c0c6;
}

.featured-copy h2 {
  color: #fff;
  font-size: clamp(31px, 3.5vw, 51px);
  letter-spacing: -.055em;
}

.featured-meta {
  color: #aaa5ad;
}

.featured-teams {
  color: #f3e9ee;
}

.featured-play {
  border: 1px solid #ff8094;
  background: linear-gradient(120deg, #ff526c, #ed2854);
  color: #fff;
  box-shadow: 0 9px 28px #ff365d3d;
}

.featured-play:hover:not(:disabled) {
  background: linear-gradient(120deg, #ff6a7f, #f33a62);
}

.featured-play:disabled {
  background: #ffffff20;
  color: #ffffff9e;
}

.featured-art {
  opacity: .9;
}

.arena-glow {
  background: #ff365d52;
}

.arena-ring {
  border-color: #ffffff20;
}

.arena-orb {
  border-color: #ffffff68;
  background:
    radial-gradient(circle at 34% 26%, #ffe1d4 0, #ff7182 17%, #b52e58 48%, #382139 78%);
  box-shadow: inset -16px -18px 32px #21111d99, 0 0 68px #ff52624d;
}

.arena-score span,
.arena-score i {
  color: #e2cbd3;
}

.connection-card {
  grid-template-columns: minmax(190px, .65fr) minmax(0, 1.35fr);
  margin: 16px 0 35px;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(145deg, #14151b, #101116);
  box-shadow: 0 16px 42px #0003;
}

.micro-label {
  color: #ff7189;
}

.connection-copy h2 {
  color: #f6f6f8;
}

.connection-copy p {
  color: #999aa4;
}

input,
select {
  border: 1px solid #ffffff19;
  border-radius: 11px;
  background: #0a0b10;
  color: #f5f5f8;
}

input::placeholder {
  color: #777984;
}

input:focus,
select:focus {
  border-color: #ff607b99;
  box-shadow: 0 0 0 3px #ff365d1b;
}

#loadButton,
.refresh-button {
  border: 1px solid #ff59742b;
  background: linear-gradient(120deg, #ff4d69, #e92c55);
  color: #fff;
  box-shadow: 0 7px 20px #ff365d25;
}

#loadButton:hover:not(:disabled),
.refresh-button:hover:not(:disabled) {
  background: linear-gradient(120deg, #ff657c, #f13b61);
}

.status {
  color: #a2a3ad;
}

.error {
  color: var(--danger) !important;
}

.content-section {
  margin: 0 0 39px;
  scroll-margin-top: 24px;
}

.section-heading {
  margin-bottom: 17px;
}

.section-index {
  color: #ff7189;
}

.section-heading h2 {
  color: #f5f5f7;
  font-size: clamp(22px, 2.2vw, 28px);
}

.section-subtitle {
  color: #92939d;
}

.toolbar {
  gap: 10px;
  margin-bottom: 10px;
}

.search-box,
.select-box {
  border-color: #292b34;
  background: #111218;
  color: #858792;
}

.search-box input,
.select-box select {
  color: #ededf1;
}

.summary,
.section-count,
#updated,
#sportsUpdated {
  color: #92939d;
}

.summary-note {
  color: #7e808a;
}

.channel-grid {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 205px), 1fr));
  gap: 13px;
}

.card,
.event-card {
  border: 1px solid #272932;
  border-radius: 17px;
  background: linear-gradient(145deg, #15161d, #101116);
  box-shadow: 0 8px 26px #0003, inset 0 1px #ffffff05;
}

.card:hover,
.event-card:hover {
  border-color: #ff526a70;
  background: linear-gradient(145deg, #1d171e, #14151b);
  box-shadow: 0 15px 34px #0006, 0 0 0 1px #ff365d12;
}

.card {
  min-height: 174px;
  padding: 16px;
}

.channel-mark {
  border: 1px solid #ffffff14;
  background: linear-gradient(145deg, hsl(var(--channel-hue) 56% 24%), #171920);
  color: hsl(var(--channel-hue) 88% 78%);
  overflow: hidden;
}

.channel-mark.has-logo {
  background: #fff;
}

.channel-mark img {
  width: 100%;
  height: 100%;
  padding: 4px;
  object-fit: contain;
}

.category {
  border-color: #ff45672b;
  background: #ff365d12;
  color: #ff91a4;
}

.card h2,
.event-title {
  color: #f5f5f7;
}

.play-button {
  border: 1px solid #ff526a45;
  border-radius: 10px;
  background: #ff365d17;
  color: #ff91a4;
}

.play-button:hover:not(:disabled) {
  border-color: #ff607b;
  background: linear-gradient(120deg, #ff526c, #ed2854);
  color: #fff;
}

.empty {
  color: #92939d;
}

.sports-section {
  padding: 25px;
  border: 1px solid #33303a;
  border-radius: 22px;
  background:
    radial-gradient(ellipse at 100% 0%, #ff365d0c, transparent 32rem),
    linear-gradient(145deg, #121319, #0e0f14);
  box-shadow: 0 18px 45px #0003;
}

.sports-section .section-heading h2 {
  color: #fff;
}

.sports-section .section-subtitle {
  color: #999aa4;
}

.sports-section .refresh-button {
  border: 1px solid #ffffff20;
  background: #ffffff0a;
  color: #f2f2f5;
  box-shadow: none;
}

.sports-section .refresh-button:hover:not(:disabled) {
  border-color: #ff526a75;
  background: #ff365d1b;
  color: #ff9aac;
}

.event-grid {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 285px), 1fr));
  gap: 13px;
}

.event-card {
  padding: 17px;
}

.event-card[role="button"] {
  cursor: pointer;
}

.event-card[role="button"]:focus-visible {
  outline: 2px solid #ff7189;
  outline-offset: 3px;
}

.event-card.is-unavailable {
  cursor: default;
}

.event-card-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 15px;
  padding-top: 12px;
  border-top: 1px solid #ffffff0f;
  color: #ff91a4;
  font-size: 11px;
  font-weight: 850;
}

.event-card-action > span:last-child {
  color: #ff7189;
  font-size: 16px;
}

.event-card.is-unavailable .event-card-action {
  color: #858792;
}

.event-status {
  padding: 5px 8px;
  border: 1px solid #ff536d45;
  border-radius: 999px;
  background: #ff365d15;
  color: #ff8ea2;
}

.event-status:not(.upcoming) {
  color: #ff8ea2;
}

.event-status.upcoming {
  border-color: #f0bf5b38;
  background: #f0bf5b12;
  color: #f2ca75;
}

.event-status.completed {
  border-color: #ffffff20;
  background: #ffffff08;
  color: #a4a6b0;
}

.event-meta {
  color: #a0a1ab;
}

.matchup {
  border-color: #ffffff10;
  background: #0b0c11;
  color: #eeeef2;
}

.team img {
  border: 1px solid #ffffff16;
  background: #f5f5f5;
}

.versus {
  color: #ff7c91;
}

.sports-status {
  color: #a0a1ab;
}

footer {
  border-top-color: #ffffff13;
  color: #858792;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: none;
  padding: 0;
  overflow-y: auto;
  background: #050609;
  backdrop-filter: none;
}

.modal.show {
  display: block;
}

.player-open {
  overflow: hidden;
}

.player-dialog {
  display: flex;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  flex-direction: column;
  padding: clamp(14px, 2.4vw, 34px);
  border: 0;
  border-radius: 0;
  background:
    radial-gradient(ellipse at 50% 0%, #211018, transparent 34rem),
    #08090d;
  box-shadow: none;
  color: #f6f6f8;
}

.player-header {
  display: grid;
  width: min(100%, 1500px);
  grid-template-columns: minmax(120px, 1fr) minmax(0, 2fr) minmax(120px, 1fr);
  align-items: center;
  gap: 18px;
  margin: 0 auto 20px;
}

.close-player {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 14px;
  border: 1px solid #ffffff20;
  border-radius: 11px;
  background: #ffffff0b;
  color: #f4f4f7;
  font-size: 13px;
}

.close-player > span {
  color: #ff7189;
  font-size: 20px;
  line-height: 1;
}

.player-heading {
  min-width: 0;
  text-align: center;
}

.player-kicker {
  display: block;
  margin-bottom: 4px;
  color: #ff7189;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .18em;
}

.player-header h2 {
  overflow: hidden;
  margin: 0;
  color: #fff;
  font-size: clamp(15px, 2vw, 20px);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-channel-title {
  overflow: hidden;
  margin: 4px 0 0;
  color: #a7a8b1;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-channel-title[hidden] {
  display: none;
}

.player-live-badge {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 11px;
  border: 1px solid #ff526a42;
  border-radius: 999px;
  background: #ff365d12;
  color: #ff9aab;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .13em;
}

.player-live-badge > span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ff526d;
  box-shadow: 0 0 12px #ff526d;
  animation: mira-live-pulse 1.8s ease-in-out infinite;
}

.close-player:hover:not(:disabled) {
  border-color: #ff526a75;
  background: #ff365d20;
}

.player-stage {
  position: relative;
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  width: min(100%, 1500px);
  width: min(100%, 1500px, calc((100dvh - 190px) * 1.7778));
  height: auto;
  max-height: calc(100vh - 190px);
  max-height: calc(100dvh - 190px);
  flex: none;
  aspect-ratio: 16 / 9;
  place-items: center;
  overflow: hidden;
  margin: auto;
  border: 1px solid #ffffff18;
  border-radius: 15px;
  background: #000;
  box-shadow: 0 22px 70px #000a, 0 0 0 1px #ff365d0b;
  isolation: isolate;
}

.player-stage.settings-open {
  overflow: visible;
}

.player-video-frame {
  position: relative;
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
}

.player-stage.settings-open .player-video-frame {
  overflow: visible;
}

.modal.has-event-channels .player-stage {
  width: min(100%, 1200px);
  max-height: none;
  flex: 0 0 auto;
  aspect-ratio: 16 / 9;
  margin: 0 auto;
}

#videoPlayer {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  box-shadow: none;
}

.player-controls {
  position: absolute;
  z-index: 3;
  inset: auto 0 0;
  display: grid;
  gap: 9px;
  padding: 48px max(16px, env(safe-area-inset-right)) max(14px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  background: linear-gradient(transparent, #050609e8 42%);
  color: #f5f6f9;
  transition: opacity .22s ease;
}

.player-stage.controls-hidden .player-controls {
  opacity: 0;
  pointer-events: none;
}

.player-timeline {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.player-tool-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.player-control-button {
  display: inline-flex;
  min-width: 42px;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  padding: 7px 10px;
  border: 1px solid #ffffff24;
  border-radius: 9px;
  background: #11141bd9;
  color: #f5f6f9;
  font-size: 11px;
  font-weight: 750;
  transition: border-color .16s, background .16s;
}

.player-control-button:hover:not(:disabled) {
  border-color: #c8f1698c;
  background: #252b35;
}

.player-play-button {
  min-width: 38px;
  padding: 7px;
  color: #c8f169;
  font-size: 13px;
}

.player-fullscreen-button {
  margin-left: auto;
}

.player-range {
  width: 100%;
  height: 24px;
  margin: 0;
  accent-color: #c8f169;
  cursor: pointer;
}

.player-range:disabled {
  cursor: default;
  opacity: .48;
}

.player-volume-control {
  display: flex;
  width: clamp(68px, 9vw, 112px);
  align-items: center;
}

.player-time {
  min-width: 54px;
  color: #e6e8ed;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}

.player-select-control {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border: 1px solid #ffffff1f;
  border-radius: 9px;
  background: #11141bd9;
  color: #adb3c0;
  font-size: 9px;
  font-weight: 750;
}

.player-select-control select {
  max-width: 132px;
  padding: 5px 19px 5px 5px;
  border: 0;
  background: transparent;
  color: #f5f6f9;
  font-size: 10px;
  font-weight: 700;
}

.player-select-control select option {
  background: #11141b;
  color: #f5f6f9;
}

.player-settings {
  position: relative;
  flex: none;
}

.player-settings > summary {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  padding: 7px 10px;
  border: 1px solid #ffffff24;
  border-radius: 9px;
  background: #11141bd9;
  color: #f5f6f9;
  font-size: 11px;
  font-weight: 750;
  list-style: none;
  cursor: pointer;
}

.player-settings > summary::-webkit-details-marker {
  display: none;
}

.player-settings[open] > summary {
  border-color: #c8f1698c;
}

.player-settings-panel {
  position: absolute;
  z-index: 5;
  right: 0;
  bottom: calc(100% + 8px);
  display: grid;
  min-width: 190px;
  max-width: min(82vw, 280px);
  gap: 7px;
  padding: 9px;
  border: 1px solid #ffffff24;
  border-radius: 12px;
  background: #11141bf2;
  box-shadow: 0 12px 35px #000b;
  max-height: min(65dvh, 360px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.player-settings-panel .player-select-control {
  width: 100%;
  min-width: 0;
  justify-content: space-between;
}

.player-settings-panel .player-select-control select {
  max-width: 160px;
}

.player-stage:fullscreen,
.player-stage:-webkit-full-screen,
.player-stage.pseudo-fullscreen {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: grid;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  max-height: none;
  flex: none;
  aspect-ratio: auto;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: #000;
  box-shadow: none;
}

.player-stage:fullscreen .player-video-frame,
.player-stage:-webkit-full-screen .player-video-frame,
.player-stage.pseudo-fullscreen .player-video-frame {
  width: min(100vw, 177.7778vh);
  height: min(100vh, 56.25vw);
  width: min(100vw, 177.7778dvh);
  height: min(100dvh, 56.25vw);
  aspect-ratio: 16 / 9;
  flex: none;
}

.player-stage:fullscreen #videoPlayer,
.player-stage:-webkit-full-screen #videoPlayer,
.player-stage.pseudo-fullscreen #videoPlayer {
  width: 100%;
  height: 100%;
  max-height: none;
  aspect-ratio: 16 / 9;
  object-fit: contain;
}

.player-stage:fullscreen .player-controls,
.player-stage:-webkit-full-screen .player-controls,
.player-stage.pseudo-fullscreen .player-controls {
  padding-top: 64px;
}

@media (pointer: coarse), (max-width: 980px) {
  .player-stage:fullscreen .player-video-frame,
  .player-stage:-webkit-full-screen .player-video-frame,
  .player-stage.pseudo-fullscreen .player-video-frame {
    position: absolute;
    inset: 0;
    width: auto;
    height: auto;
    aspect-ratio: auto;
  }
}

.player-event-channels {
  width: min(100%, 1200px);
  margin: 18px auto 0;
  padding: 18px;
  border: 1px solid #ffffff14;
  border-radius: 17px;
  background:
    radial-gradient(ellipse at 100% 0%, #ff365d0c, transparent 26rem),
    linear-gradient(145deg, #121319, #0d0e13);
}

.player-event-channels[hidden] {
  display: none;
}

.player-event-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 13px;
}

.player-event-kicker {
  color: #ff7189;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .16em;
}

.player-event-heading h3 {
  margin: 4px 0 0;
  color: #f5f5f7;
  font-size: 16px;
}

.player-event-count {
  color: #9c9da7;
  font-size: 10px;
}

.player-event-streams {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 245px), 1fr));
  gap: 9px;
}

.player-event-option {
  display: grid;
  min-width: 0;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 11px;
  border: 1px solid #ffffff14;
  border-radius: 12px;
  background: #ffffff06;
  color: #f2f2f5;
  text-align: left;
  transition: border-color .18s, background .18s, transform .18s;
}

.player-event-option:hover {
  transform: translateY(-2px);
  border-color: #ff526a70;
  background: #ff365d12;
}

.player-event-option.is-playing {
  border-color: #ff526a7a;
  background: linear-gradient(120deg, #ff365d1b, #ffffff08);
}

.player-event-option-number {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid #ffffff14;
  border-radius: 9px;
  background: #ffffff08;
  color: #ff91a4;
  font-size: 10px;
  font-weight: 900;
}

.player-event-option-info {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.player-event-option-info strong {
  overflow-wrap: anywhere;
  font-size: 11px;
}

.player-event-option-state {
  color: #a3a4ad;
  font-size: 9px;
  font-weight: 800;
  white-space: nowrap;
}

.player-event-option.is-playing .player-event-option-state {
  color: #ff91a4;
}

.player-overlay-state {
  position: absolute;
  z-index: 4;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
  padding: 24px;
  background:
    radial-gradient(ellipse at center, #171219 0, #090a0d 68%);
  color: #f5f5f7;
  text-align: center;
  pointer-events: none;
}

.player-loading-spinner {
  width: 38px;
  height: 38px;
  border: 3px solid #ffffff1a;
  border-top-color: #ff526d;
  border-radius: 50%;
  animation: mira-spin .8s linear infinite;
}

.player-overlay-state.has-error .player-loading-spinner {
  display: none;
}

.player-overlay-state strong {
  color: #ff9aab;
  font-size: 13px;
  letter-spacing: .12em;
}

.player-overlay-state > span:last-child {
  max-width: 420px;
  color: #a7a8b1;
  font-size: 12px;
}

.player-details {
  display: flex;
  width: min(100%, 1500px);
  min-height: 44px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 12px auto 0;
}

.player-status {
  min-height: 20px;
  margin: 0;
  color: #a7a8b1;
  font-size: 12px;
}

.player-status.error {
  color: #ff9aa7;
}

.player-feedback {
  display: flex;
  align-items: center;
  gap: 12px;
}

.retry-player {
  padding: 7px 11px;
  border: 1px solid #ff526a55;
  border-radius: 9px;
  background: #ff365d17;
  color: #ff9aab;
  font-size: 11px;
  font-weight: 800;
}

.direct-player {
  text-decoration: none;
  white-space: nowrap;
}

.retry-player:hover:not(:disabled) {
  background: #ff365d30;
  color: #fff;
}

.player-shortcut {
  color: #777984;
  font-size: 10px;
}

.player-shortcut kbd {
  padding: 3px 6px;
  border: 1px solid #ffffff24;
  border-radius: 5px;
  color: #c6c7ce;
  font: inherit;
}

@media (max-width: 980px) {
  .app-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .sidebar {
    z-index: 10;
    height: auto;
    flex-direction: row;
    align-items: center;
    gap: 18px;
    padding: 12px 22px;
    border-right: 0;
    border-bottom: 1px solid #ffffff12;
    background: #0c0d12ed;
    backdrop-filter: blur(16px);
  }

  .sidebar-label {
    display: none;
  }

  .sidebar-nav {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-left: auto;
  }

  .main-content {
    max-width: 1200px;
    padding-top: 22px;
  }

  .featured {
    min-height: 340px;
    padding: 34px;
  }
}

@media (max-width: 620px) {
  .sidebar {
    gap: 8px;
    padding: 10px 12px;
  }

  .sidebar .brand {
    gap: 8px;
    padding: 0;
  }

  .sidebar .brand-mark {
    width: 35px;
    height: 35px;
    border-radius: 11px;
    font-size: 14px;
  }

  .sidebar .brand-name {
    font-size: 12px;
  }

  .sidebar .brand-caption {
    font-size: 7px;
  }

  .sidebar-nav {
    gap: 2px;
  }

  .nav-link {
    min-height: 38px;
    gap: 5px;
    padding: 8px 7px;
    font-size: 9px;
  }

  .nav-icon {
    width: 17px;
    font-size: 14px;
  }

  .main-content {
    padding: 17px 14px 28px;
  }

  .page-header {
    margin-bottom: 15px;
  }

  .page-heading h1 {
    font-size: 21px;
  }

  .page-overline {
    font-size: 7px;
  }

  .header-pill {
    padding: 7px 9px;
    font-size: 9px;
  }

  .featured {
    min-height: 340px;
    grid-template-columns: 1fr;
    padding: 24px 20px 132px;
    border-radius: 21px;
  }

  .featured-copy h2 {
    font-size: clamp(29px, 8vw, 38px);
  }

  .featured-overline {
    margin-top: 15px;
  }

  .featured-teams {
    max-width: 95%;
    font-size: 10px;
    line-height: 1.5;
  }

  .featured-art {
    top: auto;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 145px;
    opacity: .72;
  }

  .arena-glow {
    top: 0;
    right: 10%;
    width: 190px;
    height: 190px;
  }

  .arena-ring {
    left: 72%;
  }

  .ring-one {
    width: 230px;
    height: 170px;
  }

  .ring-two {
    width: 170px;
    height: 230px;
  }

  .arena-orb {
    left: 72%;
    width: 95px;
    height: 95px;
  }

  .arena-score {
    right: 17px;
    bottom: 14px;
  }

  .arena-score strong {
    font-size: 14px;
  }

  .connection-card {
    grid-template-columns: 1fr;
    gap: 12px;
    margin: 13px 0 28px;
    padding: 16px;
  }

  .connection-form {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 7px;
  }

  .connection-form input {
    font-size: 10px;
  }

  #loadButton {
    padding: 9px 10px;
    font-size: 9px;
  }

  .content-section {
    margin-bottom: 30px;
  }

  .section-heading {
    align-items: flex-start;
  }

  .section-heading h2 {
    font-size: 20px;
  }

  .section-count {
    max-width: 130px;
    padding-top: 12px;
    font-size: 8px;
  }

  .section-subtitle {
    font-size: 10px;
  }

  .toolbar {
    grid-template-columns: minmax(0, 1fr) 125px;
    gap: 6px;
  }

  .search-box,
  .select-box {
    height: 42px;
    padding: 0 9px;
  }

  .search-box input,
  .select-box select {
    height: 38px;
    font-size: 9px;
  }

  .search-box {
    gap: 6px;
  }

  .search-box > span {
    font-size: 18px;
  }

  .channel-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .card {
    min-height: 150px;
    padding: 11px;
  }

  .channel-mark {
    width: 34px;
    height: 34px;
    border-radius: 11px;
    font-size: 10px;
  }

  .card h2 {
    font-size: 12px;
  }

  .play-button {
    padding: 7px 9px;
    font-size: 9px;
  }

  .sports-section {
    padding: 17px 13px;
    border-radius: 18px;
  }

  .sports-section .section-heading h2 {
    font-size: 21px;
  }

  .sports-section .section-heading {
    align-items: center;
  }

  .refresh-button {
    padding: 8px 10px;
    font-size: 9px;
  }

  .event-grid {
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .event-card {
    padding: 13px;
  }

  .summary {
    font-size: 9px;
  }

  footer {
    flex-direction: column;
    gap: 5px;
    font-size: 8px;
  }

  .modal {
    padding: 0;
  }

  .player-dialog {
    min-height: 100vh;
    min-height: 100dvh;
    padding: max(8px, env(safe-area-inset-top)) max(8px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
  }

  .player-header {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
    margin-bottom: 14px;
  }

  .player-live-badge {
    display: none;
  }

  .player-heading {
    text-align: right;
  }

  .player-kicker {
    font-size: 8px;
  }

  .player-header h2 {
    font-size: 13px;
  }

  .close-player {
    gap: 6px;
    padding: 9px 10px;
    font-size: 11px;
  }

  .player-stage {
    width: min(100%, 1500px);
    width: min(100%, 1500px, calc((100dvh - 160px) * 1.7778));
    max-height: calc(100dvh - 160px);
    border-radius: 9px;
  }

  .player-controls {
    gap: 5px;
    padding: 20px max(9px, env(safe-area-inset-right)) max(7px, env(safe-area-inset-bottom)) max(9px, env(safe-area-inset-left));
  }

  .player-timeline {
    grid-template-columns: 34px minmax(0, 1fr) auto;
    gap: 7px;
  }

  .player-tool-row {
    gap: 5px;
    flex-wrap: wrap;
    overflow: visible;
  }

  .player-control-button {
    min-width: 36px;
    min-height: 34px;
    padding: 6px 8px;
    font-size: 10px;
  }

  .player-play-button {
    min-width: 34px;
  }

  .player-volume-control {
    width: 64px;
  }

  .player-select-control {
    min-height: 34px;
    gap: 4px;
    padding: 3px 6px;
  }

  .player-select-control select {
    max-width: 160px;
    font-size: 9px;
  }

  .player-settings > summary {
    min-height: 34px;
    padding: 6px 8px;
    font-size: 10px;
  }

  .player-time {
    min-width: 42px;
    font-size: 9px;
  }

  .player-details {
    align-items: flex-start;
  }

  .player-feedback {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }

  .player-shortcut {
    white-space: nowrap;
  }
}

@media (max-width: 370px) {
  .sidebar {
    padding-right: 8px;
    padding-left: 8px;
  }

  .sidebar .brand-caption {
    display: none;
  }

  .nav-link {
    gap: 3px;
    padding: 7px 5px;
    font-size: 8px;
  }

  .toolbar {
    grid-template-columns: minmax(0, 1fr) 112px;
  }

  .channel-grid {
    grid-template-columns: 1fr;
  }
}

@keyframes mira-page-enter {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes mira-hero-slide {
  from {
    opacity: .35;
    transform: translateX(14px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.page-view:not([hidden]) {
  animation: mira-page-enter .42s cubic-bezier(.2, .7, .25, 1) both;
}

.event-hero {
  touch-action: pan-y;
  user-select: none;
}

.event-hero.slide-enter .featured-copy {
  animation: mira-hero-slide .42s cubic-bezier(.2, .7, .25, 1) both;
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 18px;
}

.hero-actions .featured-play {
  margin-top: 0;
}

.hero-secondary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #f1dfe5;
  font-size: 12px;
  font-weight: 750;
  transition: color .18s, gap .18s;
}

.hero-secondary:hover {
  gap: 11px;
  color: #ff9aab;
}

.hero-carousel-controls {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 23px;
}

.hero-arrow {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  padding: 0;
  border: 1px solid #ffffff2a;
  border-radius: 50%;
  background: #ffffff0b;
  color: #fff;
  font-size: 14px;
}

.hero-arrow:hover:not(:disabled) {
  border-color: #ff6b84;
  background: #ff365d25;
}

.hero-arrow:disabled {
  opacity: .4;
}

.hero-dots {
  display: flex;
  align-items: center;
  gap: 5px;
  min-height: 20px;
}

.hero-dot {
  width: 6px;
  height: 6px;
  min-width: 6px;
  min-height: 6px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: #ffffff42;
  transition: width .22s, background .22s;
}

.hero-dot.active {
  width: 20px;
  background: #ff647e;
}

.hero-count {
  margin-left: 3px;
  color: #cdbdc4;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .12em;
}

.home-shortcuts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
  margin: 18px 0 34px;
}

.shortcut-card {
  display: grid;
  min-height: 82px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  padding: 15px 17px;
  border: 1px solid #ffffff13;
  border-radius: 16px;
  background: linear-gradient(120deg, #17141b, #101116);
  transition: border-color .2s, transform .2s, background .2s;
}

.shortcut-card:hover {
  transform: translateY(-3px);
  border-color: #ff526a55;
  background: linear-gradient(120deg, #24151d, #14151b);
}

.shortcut-tv {
  background: linear-gradient(120deg, #141720, #101116);
}

.shortcut-icon {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid #ff526a33;
  border-radius: 12px;
  background: #ff365d15;
  color: #ff7189;
  font-size: 19px;
}

.shortcut-tv .shortcut-icon {
  border-color: #6a83ff32;
  background: #647dff12;
  color: #9baeff;
}

.shortcut-card strong,
.shortcut-card small {
  display: block;
}

.shortcut-card strong {
  color: #f4f4f7;
  font-size: 13px;
}

.shortcut-card small {
  margin-top: 3px;
  color: #9697a1;
  font-size: 10px;
}

.shortcut-arrow {
  color: #ff7189;
  font-size: 17px;
}

.section-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #ff8da1;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.section-more:hover {
  color: #ffc0ca;
}

.home-channel-grid {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 180px), 1fr));
}

.home-channel-grid .card {
  min-height: 154px;
}

#homeChannelCount {
  margin-left: auto;
  color: #8d8e98;
  font-size: 10px;
  white-space: nowrap;
}

#shownCount,
#updated {
  color: #9697a1;
}

.about-panel {
  position: relative;
  overflow: hidden;
  margin: 0 0 18px;
  padding: clamp(24px, 5vw, 52px);
  border: 1px solid #ff526a2b;
  border-radius: 23px;
  background:
    radial-gradient(ellipse at 92% 10%, #ff365d24, transparent 26rem),
    linear-gradient(130deg, #17141b, #101116);
}

.about-panel h2 {
  max-width: 700px;
  margin: 13px 0 10px;
  color: #fff;
  font-size: clamp(26px, 4vw, 42px);
  letter-spacing: -.045em;
}

.about-panel > p {
  max-width: 680px;
  margin: 0;
  color: #aaaab2;
  font-size: 13px;
  line-height: 1.8;
}

.about-features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 28px;
}

.about-features > div {
  display: grid;
  gap: 9px;
  padding: 14px;
  border: 1px solid #ffffff12;
  border-radius: 13px;
  background: #ffffff06;
}

.about-features strong {
  color: #ff7189;
  font-size: 10px;
  letter-spacing: .14em;
}

.about-features span {
  color: #d3d3d9;
  font-size: 11px;
}

.page-header .header-pill #count {
  color: #c5c6ce;
  white-space: nowrap;
}

@media (max-width: 980px) {
  .about-features {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .sidebar {
    overflow-x: auto;
  }

  .sidebar .brand {
    flex: none;
  }

  .sidebar-nav {
    flex: none;
    margin-left: auto;
  }

  .nav-link {
    white-space: nowrap;
  }

  .page-header {
    gap: 10px;
  }

  .home-shortcuts {
    grid-template-columns: 1fr;
    gap: 8px;
    margin: 13px 0 27px;
  }

  .shortcut-card {
    min-height: 70px;
    padding: 12px;
  }

  .hero-carousel-controls {
    gap: 7px;
    margin-top: 16px;
  }

  .hero-arrow {
    width: 29px;
    height: 29px;
  }

  .hero-dot:nth-child(n + 7) {
    display: none;
  }

  .section-more,
  #homeChannelCount {
    font-size: 9px;
  }

  .about-panel {
    padding: 22px 18px;
    border-radius: 18px;
  }

  .about-panel > p {
    font-size: 11px;
  }

  .about-features {
    margin-top: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

.channel-grid {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 165px), 1fr));
  gap: 11px;
}

.home-channel-grid {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 165px), 1fr));
}

.card {
  position: relative;
  isolation: isolate;
  display: flex;
  min-height: 144px;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  overflow: hidden;
  cursor: pointer;
  background: linear-gradient(145deg, #15161d, #101116);
}

.home-channel-grid .card {
  min-height: 144px;
}

.channel-mark {
  position: absolute;
  z-index: -2;
  inset: 0;
  display: grid;
  width: auto;
  height: auto;
  place-items: center;
  overflow: hidden;
  border: 0;
  border-radius: inherit;
  background: linear-gradient(145deg, hsl(var(--channel-hue) 56% 24%), #171920);
  color: hsl(var(--channel-hue) 88% 78%);
  font-size: clamp(76px, 11vw, 132px);
  font-weight: 950;
  letter-spacing: -.08em;
  opacity: .24;
  pointer-events: none;
}

.channel-mark.has-logo {
  background: transparent;
  color: transparent;
  opacity: 1;
}

.channel-mark img {
  width: 100%;
  height: 100%;
  padding: 0;
  object-fit: cover;
  opacity: .62;
  transform: scale(1.04);
  transition: opacity .25s, transform .35s;
}

.category {
  position: relative;
  z-index: 1;
  max-width: 100%;
  align-self: flex-start;
  padding: 4px 8px;
  font-size: 8px;
}

.card h2 {
  position: relative;
  z-index: 1;
  display: -webkit-box;
  min-height: 0;
  overflow: hidden;
  max-width: 100%;
  margin: auto 0 0;
  font-size: 15px;
  line-height: 1.3;
  text-shadow: 0 2px 8px #000b;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(0deg, #0c0d13e8 0%, #0c0d13a8 36%, #0c0d1340 72%, #0c0d131a 100%);
  content: "";
  pointer-events: none;
}

.card:hover,
.event-card:hover {
  transform: translateY(-4px);
}

.card:hover .channel-mark {
  transform: none;
  box-shadow: none;
}

.card:hover .channel-mark img {
  opacity: .76;
  transform: scale(1.1);
}

.card:hover .channel-mark:not(.has-logo) {
  opacity: .32;
}

.card:focus-visible {
  border-color: #ff7189;
  box-shadow: 0 0 0 3px #ff365d2b, 0 12px 30px #0005;
}

.event-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.event-top {
  min-width: 0;
  align-items: flex-start;
}

.event-title {
  display: -webkit-box;
  min-width: 0;
  overflow: hidden;
  font-size: 15px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.event-status {
  flex: none;
  padding: 5px 8px;
  border: 1px solid #ff526a2b;
  border-radius: 999px;
  background: #ff365d12;
}

.matchup {
  min-width: 0;
  gap: 8px;
}

.team {
  gap: 8px;
}

.team-mark {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  place-items: center;
  overflow: hidden;
  border: 1px solid #ffffff17;
  border-radius: 12px;
  background: linear-gradient(145deg, #39202a, #191920);
  color: #ff9aab;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: -.04em;
}

.team-mark.has-logo {
  border-radius: 50%;
  background: #fff;
}

.team-mark img {
  width: 100%;
  height: 100%;
  padding: 3px;
  object-fit: contain;
}

.team-name {
  display: -webkit-box;
  min-width: 0;
  overflow: hidden;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.about-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.about-action {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  gap: 9px;
  padding: 0 14px;
  border: 1px solid #ff526a45;
  border-radius: 11px;
  background: #ff365d14;
  color: #ff9aab;
  font-size: 11px;
  font-weight: 800;
}

.about-action:hover {
  border-color: #ff667e;
  background: #ff365d26;
  color: #fff;
}

@media (max-width: 620px) {
  .sidebar {
    position: fixed;
    z-index: 15;
    inset: auto 0 0;
    display: block;
    height: auto;
    overflow: visible;
    padding: 7px 8px calc(7px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid #2a2932;
    border-bottom: 0;
    background: #101015f2;
    backdrop-filter: blur(16px);
  }

  .sidebar .brand {
    display: none;
  }

  .sidebar-nav {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
    margin: 0;
  }

  .nav-link {
    min-height: 54px;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    padding: 6px 3px;
    border-radius: 11px;
    font-size: 9px;
    text-align: center;
  }

  .nav-icon {
    width: auto;
    font-size: 17px;
  }

  .nav-link:hover {
    transform: none;
  }

  .main-content {
    padding-bottom: calc(94px + env(safe-area-inset-bottom, 0px));
  }

  .channel-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }

  .card {
    min-height: 140px;
    padding: 12px;
  }

  .home-channel-grid .card {
    min-height: 140px;
  }

  .channel-mark {
    font-size: clamp(78px, 20vw, 112px);
  }

  .category {
    padding: 3px 7px;
    font-size: 8px;
  }

  .card h2 {
    font-size: 13px;
  }

  .event-card {
    padding: 13px;
  }

  .team-mark {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
  }

  .about-actions {
    gap: 8px;
    margin-top: 20px;
  }
}

@media (max-width: 370px) {
  .channel-grid {
    grid-template-columns: 1fr;
  }

  .card {
    min-height: 148px;
  }

  .channel-mark {
    font-size: clamp(100px, 30vw, 140px);
  }
}
