.live-results-public-shell {
  --lr-panel: #171c28;
  --lr-panel-high: #222735;
  --lr-panel-soft: #292e3e;
  --lr-border: rgba(207, 212, 229, 0.14);
  --lr-primary: #a990ff;
  --lr-primary-soft: rgba(169, 144, 255, 0.16);
  --lr-green: #54d18b;
  --lr-red: #ff6f73;
  --lr-pass: #c3c7d3;
  --lr-nav-height: 76px;
  background: #0f121a;
}

.live-results-public-shell .lr-topbar {
  position: sticky;
  top: 0;
  z-index: 80;
  padding: 0;
  border-bottom: 1px solid var(--lr-border);
  background: rgba(15, 18, 26, 0.94);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.lr-topbar__inner {
  width: min(100%, 1080px);
  min-height: 64px;
  margin: 0 auto;
  padding: 0.6rem clamp(0.8rem, 3vw, 1.5rem);
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 0.5rem;
}

.lr-topbar__titles { min-width: 0; }
.lr-topbar__eyebrow,
.lr-topbar__title {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lr-topbar__eyebrow { color: var(--text-soft); font-size: 0.72rem; font-weight: 700; }
.lr-topbar__title { color: #eee9ff; font-family: "Manrope", sans-serif; font-weight: 800; font-size: 1.1rem; }

.lr-icon-button {
  width: 44px;
  min-height: 44px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 50%;
  background: transparent;
  color: var(--text);
  display: inline-grid;
  place-items: center;
  cursor: pointer;
}
.lr-icon-button[hidden] { visibility: hidden; display: inline-grid; }

.live-results-public-shell .lr-main {
  width: min(100%, 1080px);
  margin: 0 auto;
  padding: 0.9rem clamp(0.75rem, 3vw, 1.5rem) calc(var(--lr-nav-height) + env(safe-area-inset-bottom, 0px) + 2rem);
}

.lr-app { min-height: calc(100vh - 160px); }

.lr-content { display: grid; gap: 0.85rem; }
.lr-panel {
  border: 1px solid var(--lr-border);
  border-radius: 0.85rem;
  background: var(--lr-panel);
  box-shadow: 0 18px 45px -35px #000;
  overflow: hidden;
}
.lr-panel__body { padding: 1rem; }
.lr-panel__heading { margin: 0; color: var(--text); font-size: 1rem; }
.lr-panel__subheading { margin-top: 0.2rem; color: var(--text-soft); font-size: 0.82rem; }
.lr-section-title { margin: 0.4rem 0 0; font-size: 0.78rem; color: var(--text-soft); text-transform: uppercase; letter-spacing: 0.08em; }

.lr-loading-card,
.lr-empty {
  min-height: 180px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 0.8rem;
  padding: 2rem 1rem;
  text-align: center;
  color: var(--text-muted);
}
.lr-spinner { width: 30px; height: 30px; border: 3px solid rgba(169, 144, 255, 0.2); border-top-color: var(--lr-primary); border-radius: 50%; animation: lr-spin 0.8s linear infinite; }
@keyframes lr-spin { to { transform: rotate(360deg); } }

.lr-flight-list { display: grid; gap: 0.7rem; }
.lr-flight-card {
  width: 100%;
  min-height: 84px;
  padding: 0.9rem;
  border: 1px solid var(--lr-border);
  border-radius: 0.8rem;
  background: var(--lr-panel-high);
  color: var(--text);
  text-align: left;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.9rem;
  cursor: pointer;
}
.lr-flight-card__name { display: block; font-family: "Manrope", sans-serif; font-weight: 800; }
.lr-flight-card__meta { display: block; margin-top: 0.2rem; color: var(--text-muted); font-size: 0.78rem; }
.lr-flight-card__height { align-self: center; color: #d8caff; font-size: 1.15rem; font-weight: 800; white-space: nowrap; }

.lr-badge { display: inline-flex; align-items: center; width: fit-content; border-radius: 999px; padding: 0.18rem 0.5rem; font-size: 0.65rem; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; }
.lr-badge--live { background: rgba(255, 111, 115, 0.18); color: #ff9699; }
.lr-badge--complete { background: rgba(84, 209, 139, 0.14); color: #80e4aa; }
.lr-badge--upcoming { background: rgba(195, 199, 211, 0.12); color: var(--lr-pass); }
.lr-badge--live::before { content: ""; width: 6px; height: 6px; margin-right: 0.35rem; border-radius: 50%; background: currentColor; animation: lr-pulse 1.4s ease-out infinite; }
@keyframes lr-pulse { 50% { opacity: 0.35; } }

.lr-flight-hero { padding: 1rem; background: linear-gradient(145deg, rgba(169, 144, 255, 0.12), transparent 55%), var(--lr-panel); }
.lr-flight-hero__top { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; }
.lr-flight-hero__details { margin-top: 0.75rem; display: flex; flex-wrap: wrap; gap: 0.55rem 1rem; color: var(--text-muted); font-size: 0.82rem; }
.lr-current-up { margin-top: 0.85rem; padding: 0.85rem; border: 1px solid rgba(169, 144, 255, 0.28); border-radius: 0.75rem; background: rgba(169, 144, 255, 0.08); display: flex; justify-content: space-between; gap: 0.75rem; align-items: center; }
.lr-current-up__name { font-weight: 800; }
.lr-current-up__meta { color: var(--text-soft); font-size: 0.72rem; }

.lr-attempts { display: inline-flex; gap: 0.3rem; flex-wrap: nowrap; }
.lr-attempt-mark { position: relative; width: 27px; height: 27px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; padding: 0; line-height: 1; text-align: center; border-radius: 50%; font-family: Arial, sans-serif; font-size: 0.72rem; font-weight: 800; border: 1px solid var(--lr-border); }
.lr-attempt-mark--make { color: var(--lr-green); background: rgba(84, 209, 139, 0.12); border-color: rgba(84, 209, 139, 0.34); }
.lr-attempt-mark--miss { color: var(--lr-red); background: rgba(255, 111, 115, 0.12); border-color: rgba(255, 111, 115, 0.34); }
.lr-attempt-mark--pass { color: var(--lr-pass); background: rgba(195, 199, 211, 0.1); }
.lr-attempt-mark--empty { color: var(--text-soft); opacity: 0.45; }

/* Center the visible O/X independently of the font baseline. Themes supply colors. */
.lr-attempt-mark:is(.lr-attempt-mark--make, .lr-attempt-mark--miss) .lr-attempt-mark__text { visibility: hidden; }
.lr-attempt-mark--make::before,
.lr-attempt-mark--miss::before,
.lr-attempt-mark--miss::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  box-sizing: border-box;
}
.lr-attempt-mark--make::before {
  width: .70em;
  height: .80em;
  border: max(1px, .13em) solid currentColor;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}
.lr-attempt-mark--miss::before,
.lr-attempt-mark--miss::after {
  width: 1em;
  border-top: max(1px, .13em) solid currentColor;
}
.lr-attempt-mark--miss::before { transform: translate(-50%, -50%) rotate(47deg); }
.lr-attempt-mark--miss::after { transform: translate(-50%, -50%) rotate(-47deg); }

.live-results-public-shell .lr-table-scroll {
  position: relative;
  width: 100%;
  max-width: 100%;
  overflow: auto;
  overscroll-behavior-x: none;
  overscroll-behavior-y: auto;
  touch-action: pan-x pan-y;
}
.lr-table-scroll--flight {
  max-height: calc(100vh - var(--lr-nav-height) - 255px);
  overscroll-behavior-y: none;
}
@supports (height: 100dvh) {
  .lr-table-scroll--flight { max-height: calc(100dvh - var(--lr-nav-height) - 255px); }
}
.live-results-public-shell .lr-results-table {
  --lr-place-column-width: 44px;
  display: table;
  width: 100%;
  min-width: 620px;
  margin-top: 0;
  overflow: visible;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 0;
  box-shadow: none;
}
.lr-results-table th,
.lr-results-table td { padding: 0.65rem 0.7rem; border-bottom: 1px solid var(--lr-border); text-align: center; white-space: nowrap; }
.lr-results-table th { position: sticky; top: 0; z-index: 2; background: var(--lr-panel-high); color: var(--text-soft); font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.04em; }
.lr-results-table td { color: var(--text-muted); font-size: 0.8rem; }
.live-results-public-shell .lr-table-scroll--flight .lr-results-table tr > :last-child { padding-right: 1rem; }
.lr-results-table .lr-sticky-place { position: sticky; left: 0; z-index: 2; width: var(--lr-place-column-width); min-width: var(--lr-place-column-width); max-width: var(--lr-place-column-width); padding-left: 0.25rem; padding-right: 0.25rem; background: var(--lr-panel); }
.lr-results-table .lr-sticky-athlete { position: sticky; left: var(--lr-place-column-width); z-index: 1; min-width: 165px; background: var(--lr-panel); text-align: left; box-shadow: 1px 0 var(--lr-border); }
.lr-results-table th.lr-sticky-place { z-index: 4; background: var(--lr-panel-high); }
.lr-results-table th.lr-sticky-athlete { z-index: 3; background: var(--lr-panel-high); }
.lr-athlete-name { display: block; color: var(--text); font-weight: 750; max-width: 180px; overflow: hidden; text-overflow: ellipsis; }
.lr-athlete-team { display: block; color: var(--text-soft); font-size: 0.68rem; max-width: 180px; overflow: hidden; text-overflow: ellipsis; }
.lr-up-row .lr-sticky-athlete { box-shadow: inset 3px 0 var(--lr-primary), 1px 0 var(--lr-border); }

.lr-segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 0.35rem; padding: 0.35rem; border-radius: 0.75rem; background: var(--lr-panel-high); }
.lr-segmented button { min-height: 42px; border: 0; border-radius: 0.6rem; background: transparent; color: var(--text-muted); font-weight: 750; cursor: pointer; }
.lr-segmented button[aria-pressed="true"] { background: var(--lr-primary); color: #171124; }

.lr-results-filter { display: grid; gap: 0.35rem; }
.lr-results-filter label { color: var(--text-soft); font-size: 0.72rem; font-weight: 750; }
.lr-select { width: 100%; min-height: 46px; padding: 0.65rem 2.4rem 0.65rem 0.8rem; border: 1px solid var(--lr-border); border-radius: 0.6rem; background: var(--lr-panel-high); color: var(--text); font-size: 16px; }
.lr-select:focus { outline: 0; border-color: var(--lr-primary); box-shadow: 0 0 0 3px rgba(169, 144, 255, 0.18); }

.lr-search-wrap { position: relative; }
.lr-search-wrap .material-symbols-outlined { position: absolute; z-index: 1; left: 0.9rem; top: 50%; width: 1.25rem; transform: translateY(-50%); color: var(--text-soft); font-size: 1.25rem; pointer-events: none; }
.live-results-public-shell input.lr-search { width: 100%; min-height: 50px; padding: 0.75rem 0.9rem 0.75rem 3rem; border: 1px solid var(--lr-border); border-radius: 0.75rem; background: var(--lr-panel-high); color: var(--text); font-size: 16px; -webkit-appearance: none; appearance: none; }
.lr-search:focus { outline: 0; border-color: var(--lr-primary); box-shadow: 0 0 0 3px rgba(169, 144, 255, 0.18); }
.lr-athlete-list { display: grid; gap: 0.65rem; margin-top: 0.8rem; }
.lr-athlete-card { padding: 0.85rem; border: 1px solid var(--lr-border); border-radius: 0.75rem; background: var(--lr-panel-high); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.75rem; align-items: center; }
.lr-athlete-card__meta { color: var(--text-soft); font-size: 0.72rem; }
.lr-athlete-card__result { color: var(--text); font-size: 1rem; font-weight: 850; white-space: nowrap; }

.lr-button { min-height: 44px; padding: 0.65rem 0.85rem; border: 1px solid transparent; border-radius: 0.7rem; background: var(--lr-primary); color: #171124; font-weight: 800; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem; }
.lr-button--secondary { background: var(--lr-panel-soft); color: var(--text); border-color: var(--lr-border); }
.lr-button--small { min-height: 40px; font-size: 0.75rem; }

.lr-bottom-nav {
  position: fixed;
  inset: auto 0 0;
  z-index: 90;
  padding: 0;
  border-top: 1px solid var(--lr-border);
  background: rgba(34, 39, 53, 0.97);
  box-shadow: 0 -14px 35px -26px #000;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  will-change: transform;
}
.lr-bottom-nav.lr-bottom-nav--keyboard-open { visibility: hidden; opacity: 0; pointer-events: none; }
.lr-bottom-nav__inner { width: min(100%, 720px); min-height: var(--lr-nav-height); margin: 0 auto; padding: 0.4rem 0.35rem calc(0.4rem + env(safe-area-inset-bottom, 0px)); display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.2rem; }
.live-results-public-shell .lr-bottom-nav__item {
  width: 100%;
  min-width: 0;
  min-height: 58px;
  padding: 0.45rem 0.2rem;
  border: 0;
  border-radius: 0.75rem;
  background: transparent;
  color: var(--text-muted);
  font-family: "Inter", sans-serif;
  font-size: clamp(0.62rem, 2.7vw, 0.72rem);
  font-weight: 750;
  line-height: 1.1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.28rem;
  white-space: normal;
  cursor: pointer;
}
.live-results-public-shell .lr-bottom-nav__item[aria-current="page"] { background: var(--lr-primary); color: #171124; }

.lr-pressable { transition: transform 120ms ease, background-color 120ms ease, box-shadow 120ms ease; -webkit-tap-highlight-color: transparent; }
.lr-pressable:active,
.lr-pressable.is-pressed { transform: scale(0.96); }
.lr-pressable:focus-visible { outline: 3px solid rgba(169, 144, 255, 0.55); outline-offset: 2px; }

.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }

@media (min-width: 760px) {
  .live-results-public-shell .lr-topbar__inner,
  .live-results-public-shell .lr-main { width: min(100%, 1440px); }
  .lr-flight-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lr-athlete-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lr-flight-hero { padding: 1.25rem; }
  .lr-table-scroll--desktop-results {
    max-height: min(56vh, 560px);
    overscroll-behavior-y: none;
    scrollbar-gutter: stable;
  }
  @supports (height: 100dvh) {
    .lr-table-scroll--desktop-results { max-height: min(56dvh, 560px); }
  }
}

@media (max-width: 390px) {
  .lr-current-up { align-items: flex-start; flex-direction: column; }
  .lr-athlete-card { grid-template-columns: 1fr; }
  .lr-athlete-card .lr-button { width: 100%; }
}

@media (max-width: 640px) {
  .live-results-public-shell .lr-main {
    padding-left: 0.35rem;
    padding-right: 0.35rem;
  }
  .live-results-public-shell .lr-results-table {
    --lr-place-column-width: 30px;
    width: max-content;
    min-width: 100%;
  }
  .lr-results-table th,
  .lr-results-table td {
    padding: 0.38rem 0.22rem;
  }
  .lr-results-table th {
    font-size: 0.58rem;
    letter-spacing: 0.02em;
  }
  .lr-results-table td {
    font-size: 0.7rem;
  }
  .lr-results-table .lr-sticky-athlete {
    width: 118px;
    min-width: 118px;
    max-width: 118px;
  }
  .lr-athlete-name,
  .lr-athlete-team {
    max-width: 108px;
  }
  .lr-athlete-name { font-size: 0.7rem; }
  .lr-athlete-team { font-size: 0.57rem; }
  .lr-attempts { gap: 0.06rem; }
  .lr-attempt-mark {
    width: 16px;
    height: 16px;
    font-size: 0.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lr-pressable:active,
  .lr-pressable.is-pressed { transform: none; }
}
@font-face {
  font-family: "Live Results Symbols";
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url("../fonts/live-results-symbols.woff2") format("woff2");
}
.live-results-public-shell .material-symbols-outlined {
  font-family: "Live Results Symbols";
  font-weight: 400;
  font-style: normal;
  font-feature-settings: "liga";
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
}
