:root{
  --safe-inset: 0vmin;
  --panel-bg: rgba(6, 10, 16, 0.82);
  --panel-border: rgba(255, 255, 255, 0.22);
  --panel-soft: rgba(255, 255, 255, 0.09);
  --text-main: #f7f8fa;
  --text-soft: rgba(247, 248, 250, 0.86);
  --accent-orange: #f68e2e;
  --accent-orange-2: #e67613;
}

html,
body{
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
}

html,
body,
*{
  cursor: none;
}

body.stApp{
  overflow: hidden;
}

.xp-boot-splash{
  position: fixed;
  inset: 0;
  z-index: 14050;
  display: grid;
  place-items: center;
  background:
    radial-gradient(130% 110% at 50% 18%, rgba(41, 108, 215, 0.56) 0%, rgba(11, 31, 72, 0.7) 42%, rgba(3, 8, 22, 0.94) 100%),
    linear-gradient(180deg, rgba(3, 8, 20, 0.96), rgba(3, 8, 20, 1));
  opacity: 1;
  visibility: visible;
  transition: opacity 420ms ease, visibility 420ms step-end;
}

.xp-boot-splash.is-exit{
  opacity: 0;
  visibility: hidden;
}

.xp-boot-splash.is-hidden{
  display: none;
}

.xp-boot-shell{
  width: min(760px, 88vw);
  min-height: 300px;
  display: grid;
  grid-template-rows: auto auto auto auto;
  align-items: center;
  justify-items: center;
  gap: 16px;
  padding: 22px 22px 18px;
  font-family: Tahoma, Verdana, sans-serif;
  text-align: center;
  color: rgba(244, 249, 255, 0.98);
  text-shadow: 0 2px 9px rgba(0, 0, 0, 0.52);
}

.xp-boot-mark{
  width: 68px;
  height: 68px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 4px;
  transform: perspective(260px) rotateY(-8deg);
  filter: drop-shadow(0 7px 14px rgba(0, 0, 0, 0.45));
}

.xp-boot-mark span{
  border-radius: 6px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
}

.xp-boot-mark .m1{ background: linear-gradient(160deg, #ef4f42, #b01209); }
.xp-boot-mark .m2{ background: linear-gradient(160deg, #71c04e, #3b8f1d); }
.xp-boot-mark .m3{ background: linear-gradient(160deg, #2f88de, #1d4fb2); }
.xp-boot-mark .m4{ background: linear-gradient(160deg, #efca2e, #b8880b); }

.xp-boot-brand{
  font-size: clamp(48px, 7.3vh, 88px);
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 0.96;
}

.xp-boot-loading-wrap{
  width: min(420px, 78vw);
  padding: 5px;
  border-radius: 999px;
  border: 1px solid rgba(175, 205, 255, 0.7);
  background: linear-gradient(180deg, rgba(21, 41, 84, 0.8), rgba(8, 21, 50, 0.9));
  box-shadow: inset 0 1px 4px rgba(255, 255, 255, 0.22), 0 8px 24px rgba(0, 0, 0, 0.42);
}

.xp-boot-loading-track{
  position: relative;
  height: 16px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(3, 10, 23, 0.86), rgba(1, 5, 14, 0.98));
  overflow: hidden;
}

.xp-boot-loading-track::before{
  content: "";
  position: absolute;
  top: 2px;
  left: -22%;
  width: 22%;
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(131, 203, 255, 0.08), rgba(131, 203, 255, 0.95) 40%, rgba(225, 248, 255, 1) 50%, rgba(131, 203, 255, 0.95) 60%, rgba(131, 203, 255, 0.08));
  box-shadow: 0 0 12px rgba(103, 202, 255, 0.78);
  animation: xpBootBarSlide 1050ms linear infinite;
}

.xp-boot-version{
  margin-top: 4px;
  font-size: clamp(16px, 2vh, 26px);
  font-weight: 600;
  color: rgba(212, 228, 255, 0.88);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

@keyframes xpBootBarSlide{
  0%{ transform: translateX(0); }
  100%{ transform: translateX(560%); }
}

.tv-shell{
  --header-row-size: minmax(192px, 20vh);
  --header-row-size-smart: minmax(234px, 24.6vh);
  position: fixed;
  inset: 0;
  padding: calc(10px + var(--safe-inset));
  display: grid;
  grid-template-rows: var(--header-row-size) minmax(42px, 3.7vh) minmax(0, 1fr) minmax(72px, 11.4vh);
  gap: 12px;
}

.tv-shell.smart-mode-enabled{
  grid-template-rows: var(--header-row-size-smart) minmax(42px, 3.7vh) minmax(0, 1fr) minmax(72px, 11.4vh);
}

.tv-header{
  min-height: 0;
  height: 100%;
  max-height: 100%;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) clamp(120px, 8vw, 154px);
  grid-template-areas: "stage smart qr";
  align-items: stretch;
  column-gap: 10px;
  row-gap: 8px;
  overflow: hidden;
}

.smart-side{
  grid-area: smart;
  display: none;
  min-width: 0;
  min-height: 0;
  align-self: stretch;
  justify-self: stretch;
  grid-template-rows: minmax(0, 1fr);
  gap: 0;
}

.tv-shell.smart-mode-enabled .smart-side{
  display: grid;
}

.track-card{
  grid-area: stage;
  justify-self: start;
  align-self: stretch;
  width: -moz-fit-content;
  width: fit-content;
  max-width: min(55vw, 100%);
  max-height: 100%;
  min-width: 0;
  border-radius: 20px;
  border: 1px solid var(--panel-border);
  background: linear-gradient(180deg, rgba(26, 32, 44, 0.9), rgba(14, 18, 25, 0.86));
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.35);
  padding: clamp(10px, 1.2vh, 16px) clamp(14px, 1.6vw, 22px);
  display: inline-grid;
  grid-template-rows: auto 1fr;
  align-items: stretch;
  gap: 4px;
  overflow: hidden;
}

.track-title{
  color: var(--text-main);
  font-size: clamp(60px, 7.1vh, 136px);
  font-weight: 960;
  letter-spacing: 0.02em;
  line-height: 1.01;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.track-meta-line{
  width: auto;
  max-width: 100%;
  min-height: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  row-gap: 4px;
  padding: 1px 8px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(0, 0, 0, 0.64);
  overflow: hidden;
  white-space: normal;
  text-overflow: ellipsis;
}

.track-meta-line .meta-item{
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  line-height: 1.5;
  white-space: nowrap;
}

.track-meta-line .meta-label{
  color: rgba(255, 255, 255, 0.92);
  font-size: clamp(16px, 1.9vh, 30px);
  font-weight: 760;
  letter-spacing: 0.01em;
  line-height: 1.5;
}

.track-meta-line .meta-value{
  display: inline-flex;
  align-items: center;
  min-width: 0;
  padding: 0 8px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  background: rgba(0, 0, 0, 0.72);
  color: rgba(255, 255, 255, 0.98);
  font-size: clamp(24px, 2.85vh, 45px);
  font-weight: 840;
  letter-spacing: 0.01em;
  line-height: 1.5;
  overflow: hidden;
  text-overflow: ellipsis;
}

.track-meta-line .bubble-sep{
  width: clamp(7px, 0.62vh, 11px);
  height: clamp(7px, 0.62vh, 11px);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.95), rgba(255, 190, 120, 0.88) 58%, rgba(255, 138, 31, 0.86) 100%);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.26), 0 0 10px rgba(255, 164, 74, 0.38);
  flex: 0 0 auto;
}

#metaSeason,
#metaClass,
#metaEntries{
  flex: 0 0 auto;
  overflow: visible;
  text-overflow: clip;
}

#metaRecord{
  flex: 1 1 auto;
  min-width: 0;
}

.now-driving-card{
  --nd-top: rgba(120, 194, 255, 0.2);
  --nd-grad-a: rgba(30, 51, 74, 0.98);
  --nd-grad-b: rgba(10, 22, 35, 0.96);
  --nd-border: rgba(198, 222, 255, 0.7);
  --nd-glow: rgba(120, 194, 255, 0.22);
  display: none;
  align-self: stretch;
  justify-self: stretch;
  width: 100%;
  max-width: 100%;
  min-width: min(100%, 300px);
  min-height: 0;
  height: 100%;
  border-radius: 20px;
  border: 1px solid var(--nd-border);
  background:
    radial-gradient(130% 100% at 50% -12%, var(--nd-top), rgba(120, 194, 255, 0) 62%),
    linear-gradient(180deg, var(--nd-grad-a), var(--nd-grad-b));
  box-shadow:
    0 12px 30px rgba(0, 0, 0, 0.4),
    inset 0 0 0 1px rgba(231, 243, 255, 0.12),
    0 0 26px var(--nd-glow);
  padding: clamp(14px, 1.75vh, 22px) clamp(17px, 1.85vw, 28px);
  gap: 10px;
  overflow: hidden;
  transition: background 420ms ease, border-color 360ms ease, box-shadow 420ms ease;
}

.tv-shell.smart-mode-enabled .now-driving-card{
  display: grid;
  grid-template-rows: auto auto auto auto 1fr;
  align-content: start;
}

.now-driving-card[data-status="free"]{
  --nd-top: rgba(120, 194, 255, 0.17);
  --nd-grad-a: rgba(30, 51, 74, 0.98);
  --nd-grad-b: rgba(10, 22, 35, 0.96);
  --nd-border: rgba(198, 222, 255, 0.62);
  --nd-glow: rgba(122, 192, 255, 0.18);
}

.now-driving-card[data-status="queued"]{
  --nd-top: rgba(116, 176, 255, 0.26);
  --nd-grad-a: rgba(23, 56, 104, 0.96);
  --nd-grad-b: rgba(10, 31, 59, 0.96);
  --nd-border: rgba(145, 199, 255, 0.76);
  --nd-glow: rgba(104, 176, 255, 0.3);
}

.now-driving-card[data-status="driving"]{
  --nd-top: rgba(110, 248, 165, 0.27);
  --nd-grad-a: rgba(16, 84, 54, 0.96);
  --nd-grad-b: rgba(8, 41, 28, 0.96);
  --nd-border: rgba(118, 244, 170, 0.78);
  --nd-glow: rgba(102, 245, 163, 0.34);
}

.now-driving-card[data-status="processing"]{
  --nd-top: rgba(255, 221, 136, 0.3);
  --nd-grad-a: rgba(121, 83, 18, 0.96);
  --nd-grad-b: rgba(64, 41, 8, 0.95);
  --nd-border: rgba(255, 213, 125, 0.86);
  --nd-glow: rgba(255, 180, 83, 0.34);
}

.now-driving-card[data-status="finished"]{
  --nd-top: rgba(131, 255, 187, 0.28);
  --nd-grad-a: rgba(23, 97, 63, 0.95);
  --nd-grad-b: rgba(9, 46, 30, 0.96);
  --nd-border: rgba(136, 245, 184, 0.8);
  --nd-glow: rgba(115, 243, 175, 0.34);
}

.now-driving-card[data-status="needs_review"]{
  --nd-top: rgba(255, 142, 142, 0.28);
  --nd-grad-a: rgba(116, 24, 24, 0.96);
  --nd-grad-b: rgba(57, 10, 10, 0.96);
  --nd-border: rgba(255, 140, 140, 0.82);
  --nd-glow: rgba(255, 118, 118, 0.34);
}

.now-driving-card[data-status="dnf"]{
  --nd-top: rgba(255, 118, 118, 0.26);
  --nd-grad-a: rgba(92, 14, 14, 0.96);
  --nd-grad-b: rgba(38, 7, 7, 0.97);
  --nd-border: rgba(244, 126, 126, 0.78);
  --nd-glow: rgba(238, 107, 107, 0.28);
}

.now-driving-title{
  color: rgba(245, 250, 255, 0.98);
  font-size: clamp(20px, 2.08vh, 30px);
  font-weight: 920;
  letter-spacing: 0.11em;
  line-height: 1.1;
  text-transform: uppercase;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
}

.now-driving-nick{
  color: rgba(250, 253, 255, 1);
  font-size: clamp(70px, 7.45vh, 118px);
  font-weight: 960;
  line-height: 0.92;
  letter-spacing: 0.01em;
  display: inline-flex;
  align-items: center;
  justify-self: start;
  width: -moz-fit-content;
  width: fit-content;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.52);
}

.now-driving-nick > span{
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.now-driving-nick.is-flight-receive{
  opacity: 0.34;
  filter: saturate(0.74) blur(0.3px);
  transition: opacity 240ms ease, filter 240ms ease;
}

.now-driving-card[data-status="driving"] .now-driving-nick{
  color: rgba(214, 255, 233, 0.99);
  text-shadow:
    0 0 10px rgba(108, 255, 175, 0.48),
    0 0 24px rgba(67, 214, 135, 0.34),
    0 2px 8px rgba(0, 0, 0, 0.42);
  filter: drop-shadow(0 0 10px rgba(74, 231, 149, 0.34));
  animation: nowDrivingNickGlow 1700ms ease-in-out infinite alternate;
}

.now-driving-row{
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
}

.now-driving-status{
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 6px 16px 7px;
  border-radius: 999px;
  border: 1px solid rgba(199, 218, 240, 0.58);
  background: rgba(66, 82, 99, 0.82);
  color: rgba(249, 252, 255, 0.99);
  font-size: clamp(19px, 1.95vh, 29px);
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1.1;
  text-transform: uppercase;
  white-space: nowrap;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
}

.now-driving-status-icon{
  flex: 0 0 auto;
  font-size: clamp(22px, 2.18vh, 32px);
  line-height: 1;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.4));
}

.now-driving-status-label{
  display: inline-block;
  line-height: 1;
}

.status-queued,
.now-driving-status[data-status="queued"]{
  border-color: rgba(126, 184, 255, 0.72);
  background: rgba(38, 92, 168, 0.8);
  color: #f2f8ff;
}

.status-driving,
.now-driving-status[data-status="driving"]{
  border-color: rgba(255, 214, 122, 0.75);
  background: rgba(188, 132, 20, 0.8);
  color: #fff8e8;
}

.status-finished,
.now-driving-status[data-status="finished"]{
  border-color: rgba(122, 236, 167, 0.72);
  background: rgba(26, 130, 72, 0.8);
  color: #edfff5;
}

.status-needs_review,
.now-driving-status[data-status="needs_review"]{
  border-color: rgba(255, 129, 129, 0.78);
  background: rgba(166, 29, 29, 0.82);
  color: #fff2f2;
}

.now-driving-status[data-status="processing"]{
  border-color: rgba(255, 214, 122, 0.84);
  background: linear-gradient(180deg, rgba(198, 129, 27, 0.92), rgba(142, 90, 13, 0.9));
  color: #fff8ea;
  box-shadow: inset 0 0 0 1px rgba(255, 236, 188, 0.22), 0 0 15px rgba(255, 174, 86, 0.26);
}

.now-driving-status[data-status="free"]{
  border-color: rgba(188, 204, 223, 0.5);
  background: rgba(73, 90, 110, 0.74);
  color: rgba(244, 249, 255, 0.94);
}

.now-driving-status[data-status="dnf"]{
  border-color: rgba(255, 155, 155, 0.72);
  background: rgba(93, 29, 29, 0.8);
  color: #ffecec;
}

.now-driving-meta{
  min-width: 0;
  color: rgba(248, 252, 255, 0.99);
  font-size: clamp(25px, 2.48vh, 39px);
  font-weight: 890;
  letter-spacing: 0.018em;
  line-height: 1.24;
  white-space: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.44);
}

.now-driving-review{
  min-width: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 141, 141, 0.56);
  background: linear-gradient(90deg, rgba(149, 24, 24, 0.48), rgba(114, 14, 14, 0.44));
  min-height: 30px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.now-driving-review.is-visible{
  opacity: 1;
  visibility: visible;
}

.now-driving-review-badge{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 11px;
  border-radius: 999px;
  border: 1px solid rgba(255, 199, 199, 0.72);
  background: rgba(99, 8, 8, 0.56);
  color: #fff3f3;
  font-size: clamp(15px, 1.52vh, 22px);
  font-weight: 920;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.now-driving-review-text{
  min-width: 0;
  color: rgba(255, 240, 240, 0.99);
  font-size: clamp(19px, 1.95vh, 29px);
  font-weight: 820;
  letter-spacing: 0.02em;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.38);
}

@keyframes nowDrivingNickGlow{
  0%{
    filter: drop-shadow(0 0 8px rgba(74, 231, 149, 0.22));
  }
  100%{
    filter: drop-shadow(0 0 13px rgba(98, 255, 178, 0.48));
  }
}

.now-driving-card.is-arrival-pulse{
  animation: nowDrivingArrivalPulse 1020ms cubic-bezier(0.18, 0.9, 0.22, 1) both;
}

.now-driving-card.is-arrival-pulse .now-driving-nick{
  animation: nowDrivingArrivalNick 1020ms cubic-bezier(0.18, 0.9, 0.22, 1) both;
}

@keyframes nowDrivingArrivalPulse{
  0%{
    box-shadow:
      0 12px 30px rgba(0, 0, 0, 0.4),
      inset 0 0 0 1px rgba(231, 243, 255, 0.12),
      0 0 0 rgba(118, 230, 165, 0);
  }
  38%{
    box-shadow:
      0 14px 32px rgba(0, 0, 0, 0.44),
      inset 0 0 0 1px rgba(211, 255, 227, 0.42),
      0 0 28px rgba(118, 230, 165, 0.48);
  }
  100%{
    box-shadow:
      0 12px 30px rgba(0, 0, 0, 0.4),
      inset 0 0 0 1px rgba(231, 243, 255, 0.12),
      0 0 0 rgba(118, 230, 165, 0);
  }
}

@keyframes nowDrivingArrivalNick{
  0%{
    transform: translate3d(0, 0, 0) scale(1.01);
    filter: drop-shadow(0 0 8px rgba(105, 235, 165, 0.42));
  }
  45%{
    transform: translate3d(0, -1px, 0) scale(1.05);
    filter: drop-shadow(0 0 16px rgba(105, 235, 165, 0.7));
  }
  100%{
    transform: translate3d(0, 0, 0) scale(1);
    filter: none;
  }
}

.qr-card{
  grid-area: qr;
  align-self: stretch;
  justify-self: end;
  width: clamp(120px, 8vw, 154px);
  min-width: clamp(120px, 8vw, 154px);
  height: 100%;
  max-height: 100%;
  border-radius: 18px;
  border: 1px solid var(--panel-border);
  background: linear-gradient(180deg, rgba(15, 20, 30, 0.9), rgba(8, 12, 19, 0.86));
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.34);
  padding: 8px 8px 7px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  align-items: center;
  justify-content: stretch;
  gap: 7px;
  box-sizing: border-box;
}

.qr-card img{
  width: min(95%, 93px);
  aspect-ratio: 1 / 1;
  height: auto;
  display: block;
  margin: 0 auto;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: #fff;
}

.qr-meta-stack{
  width: 100%;
  min-height: 0;
  display: grid;
  align-content: stretch;
  gap: 5px;
}

.qr-version{
  width: 100%;
  padding: 4px 6px;
  border-radius: 8px;
  border: 1px solid rgba(179, 207, 236, 0.32);
  background: rgba(15, 27, 40, 0.78);
  color: rgba(246, 251, 255, 0.98);
  font-size: clamp(11px, 1.2vh, 15px);
  font-weight: 940;
  letter-spacing: 0.04em;
  line-height: 1.1;
  text-align: center;
  text-transform: uppercase;
  box-sizing: border-box;
}

.wrc-live{
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 5px 8px;
  border-radius: 10px;
  border: 1px solid rgba(206, 223, 241, 0.34);
  background: rgba(12, 20, 31, 0.76);
  color: rgba(245, 251, 255, 0.97);
  font-size: clamp(10px, 1.12vh, 13px);
  font-weight: 920;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  line-height: 1.15;
  box-sizing: border-box;
}

.wrc-live .dot{
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #9aa0a6;
}

.wrc-live[data-status="connected"] .dot{ background: #34c759; }
.wrc-live[data-status="reconnecting"] .dot{ background: #ffcc00; }
.wrc-live[data-status="offline"] .dot{ background: #ff453a; }

.wrc-entry-mode{
  width: 100%;
  padding: 5px 6px;
  border-radius: 8px;
  border: 1px solid rgba(255, 162, 162, 0.5);
  text-align: center;
  font-size: clamp(10px, 1.1vh, 13px);
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1.15;
  text-transform: uppercase;
  color: #fff1f1;
  background: linear-gradient(180deg, rgba(194, 72, 72, 0.94), rgba(128, 36, 36, 0.96));
  box-sizing: border-box;
}

.wrc-entry-mode[data-mode="smart"]{
  border-color: rgba(132, 236, 176, 0.52);
  color: #edfff4;
  background: linear-gradient(180deg, rgba(52, 166, 98, 0.92), rgba(26, 109, 64, 0.95));
}

.tv-info-bar{
  min-height: 0;
  position: relative;
  border-radius: 14px;
  border: 1px solid rgba(255, 193, 120, 0.42);
  background:
    linear-gradient(122deg, rgba(252, 158, 62, 0.74) 0%, rgba(247, 136, 33, 0.47) 42%, rgba(232, 118, 19, 0.66) 100%),
    linear-gradient(180deg, rgba(255, 177, 104, 0.25), rgba(205, 103, 19, 0.18));
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.3);
  color: #fffef8;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: clamp(21px, 2.4vh, 36px);
  font-weight: 920;
  letter-spacing: 0.01em;
  padding: 0 18px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  isolation: isolate;
  transition: filter 280ms ease, box-shadow 280ms ease;
}

.tv-info-bar.state-new-leader{
  animation: leaderBarPulse 1200ms ease-out both;
}

.tv-info-bar::before{
  content: "";
  position: absolute;
  inset: -35% -15%;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(116deg, rgba(255, 237, 198, 0.32), rgba(255, 167, 73, 0.16) 36%, rgba(226, 109, 16, 0.34) 73%, rgba(255, 200, 138, 0.22));
  transform: translateX(-6%) skewX(-12deg);
  animation: infoBarPulse 1.15s ease-in-out infinite alternate;
}

.tv-info-text{
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  z-index: 1;
  transform: translate(118%, -50%);
  opacity: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 14px;
}

.tv-info-text.is-enter{
  transform: translate(0, -50%);
  opacity: 1;
  transition: transform 260ms cubic-bezier(0.2, 0.92, 0.2, 1), opacity 180ms ease;
}

.tv-info-text.is-exit{
  transform: translate(-126%, -50%);
  opacity: 0.04;
  transition: transform 430ms cubic-bezier(0.72, 0.02, 0.84, 0.22), opacity 280ms ease;
}

@keyframes infoBarPulse{
  0%{
    opacity: 0.38;
    filter: saturate(1) brightness(0.95);
  }
  100%{
    opacity: 0.92;
    filter: saturate(1.22) brightness(1.18);
  }
}

@keyframes leaderBarPulse{
  0%{
    filter: brightness(1.1);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.34), 0 0 22px rgba(255, 213, 137, 0.28);
  }
  100%{
    filter: brightness(1);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.3);
  }
}

.tv-table-area{
  min-height: 0;
}

.tv-table-frame{
  width: 100%;
  height: 100%;
  min-height: 0;
  border-radius: 18px;
  border: 1px solid var(--panel-border);
  background: var(--panel-bg);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.3);
  padding: 10px 16px 8px;
  transition: opacity 260ms ease, transform 260ms ease;
}

.tv-table-frame.page-transition{
  opacity: 0.16;
  transform: translateY(7px);
}

.wrc-tv-table{
  width: 100%;
  height: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.wrc-tv-table thead tr{
  height: 10%;
}

.wrc-tv-table tbody tr{
  height: 10%;
  position: relative;
  will-change: transform;
}

.wrc-tv-table th{
  color: rgba(247, 248, 250, 0.92);
  font-size: clamp(14px, 1.5vh, 24px);
  text-align: left;
  font-weight: 780;
  line-height: 1;
  padding: 5px 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.4);
  letter-spacing: 0.02em;
  border-right: 1px solid rgba(255, 255, 255, 0.22);
}

.wrc-tv-table th .th-main{
  display: block;
  line-height: 1;
}

.wrc-tv-table th .th-hint{
  display: block;
  margin-top: 2px;
  color: rgba(224, 233, 242, 0.64);
  font-size: 0.52em;
  font-weight: 650;
  line-height: 1;
  letter-spacing: 0.01em;
}

.wrc-tv-table th.wrc-time{
  text-align: left;
}

.wrc-tv-table th.wrc-cond{
  text-align: center;
  border-left: 1px solid rgba(255, 255, 255, 0.2);
}

.wrc-tv-table th.wrc-checkin{
  text-align: center;
  letter-spacing: 0.04em;
}

.wrc-tv-table td{
  color: #ffffff;
  font-size: clamp(22px, 2.25vh, 34px);
  font-weight: 800;
  line-height: 1.04;
  padding: 5px 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  vertical-align: middle;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border-right: 1px solid rgba(255, 255, 255, 0.16);
}

.wrc-tv-table tbody tr.empty td{
  opacity: 0.36;
}

.wrc-tv-table tbody tr.is-row-highlight td{
  background: linear-gradient(90deg, rgba(255, 190, 120, 0.2), rgba(255, 190, 120, 0));
}

.wrc-tv-table tbody tr.state-improved td,
.wrc-tv-table tbody tr.state-dropped td,
.wrc-tv-table tbody tr.state-new td{
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0));
}

.wrc-tv-table tbody tr.state-improved td{
  background: linear-gradient(90deg, rgba(54, 188, 224, 0.2), rgba(54, 188, 224, 0.02));
}

.wrc-tv-table tbody tr.state-dropped td{
  background: linear-gradient(90deg, rgba(235, 169, 68, 0.2), rgba(235, 169, 68, 0.02));
}

.wrc-tv-table tbody tr.state-new td{
  background: linear-gradient(90deg, rgba(62, 204, 144, 0.2), rgba(62, 204, 144, 0.02));
}

.wrc-tv-table tbody tr.state-improved.state-major-move td{
  background: linear-gradient(90deg, rgba(54, 188, 224, 0.28), rgba(54, 188, 224, 0.04));
}

.wrc-tv-table tbody tr.state-dropped.state-major-move td{
  background: linear-gradient(90deg, rgba(235, 169, 68, 0.3), rgba(235, 169, 68, 0.05));
}

.wrc-tv-table tbody tr.state-top3-entry td{
  animation: top3EntryCell 600ms ease-out both;
}

.wrc-tv-table tbody tr.state-top3-entry.state-top3-p1 td{
  box-shadow: inset 0 0 0 1px rgba(238, 194, 104, 0.32), inset 0 0 18px rgba(238, 194, 104, 0.2);
}

.wrc-tv-table tbody tr.state-top3-entry.state-top3-p2 td{
  box-shadow: inset 0 0 0 1px rgba(208, 216, 224, 0.3), inset 0 0 16px rgba(206, 214, 224, 0.18);
}

.wrc-tv-table tbody tr.state-top3-entry.state-top3-p3 td{
  box-shadow: inset 0 0 0 1px rgba(201, 150, 108, 0.3), inset 0 0 16px rgba(201, 150, 108, 0.18);
}

.wrc-tv-table th:last-child,
.wrc-tv-table td:last-child{
  border-right: none;
}

.wrc-rank{
  width: 5.8ch;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.wrc-nick{
  width: 35%;
  text-align: left;
}

.wrc-time{
  width: 13%;
  text-align: center;
  font-variant-numeric: tabular-nums;
  padding-left: 0;
  padding-right: 0;
}

.wrc-gap{
  width: 18%;
  text-align: right;
  font-variant-numeric: tabular-nums;
  transition: width 360ms cubic-bezier(0.22, 0.9, 0.21, 1);
}

.wrc-lgap{
  width: 19%;
  text-align: right;
  font-variant-numeric: tabular-nums;
  border-right: none;
}

.wrc-cond{
  width: 12%;
  text-align: center;
  font-variant-numeric: tabular-nums;
  border-left: 1px solid rgba(255, 255, 255, 0.14);
  border-right: none;
  transition: width 360ms cubic-bezier(0.22, 0.9, 0.21, 1);
}

.wrc-checkin{
  width: 0;
  max-width: 0;
  text-align: center;
  font-variant-numeric: tabular-nums;
  overflow: hidden;
  padding-left: 0 !important;
  padding-right: 0 !important;
  border-left: none;
  border-right: none;
  opacity: 0;
  transition:
    width 360ms cubic-bezier(0.22, 0.9, 0.21, 1),
    max-width 360ms cubic-bezier(0.22, 0.9, 0.21, 1),
    padding 360ms ease,
    border-color 260ms ease,
    opacity 260ms ease;
}

.wrc-tv-table.smart-mode-enabled .wrc-gap{
  width: 12.9%;
}

.wrc-tv-table.smart-mode-enabled .wrc-checkin{
  width: 15.9%;
  max-width: 15.9%;
  border-left: 1px solid rgba(255, 196, 129, 0.68);
  border-right: 1px solid rgba(255, 196, 129, 0.5);
  opacity: 1;
  padding-left: 4px !important;
  padding-right: 4px !important;
  animation: checkinColIn 360ms cubic-bezier(0.22, 0.9, 0.21, 1) both;
  box-shadow:
    inset 0 0 0 1px rgba(255, 214, 161, 0.36),
    inset 0 0 18px rgba(255, 164, 73, 0.22),
    0 0 12px rgba(255, 168, 78, 0.2);
}

.wrc-tv-table.smart-mode-enabled th.wrc-cond,
.wrc-tv-table.smart-mode-enabled td.wrc-cond{
  width: 0 !important;
  max-width: 0 !important;
  min-width: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  border-left: none !important;
  border-right: none !important;
  opacity: 0;
  overflow: hidden;
  font-size: 0;
}

.wrc-tv-table td.wrc-rank{
  font-size: clamp(29px, 3.05vh, 48px);
  font-weight: 860;
  padding-left: 4px;
  padding-right: 2px;
  text-align: center;
  overflow: hidden;
}

.wrc-tv-table td.wrc-nick{
  font-size: clamp(34px, 3.7vh, 60px);
  font-weight: 930;
  padding-left: 6px;
  position: relative;
  padding-right: 14px;
}

.wrc-tv-table th.wrc-nick{
  padding-left: 6px;
}

.wrc-tv-table th.wrc-rank{
  text-align: center;
  padding-left: 2px;
  padding-right: 1px;
}

.wrc-tv-table td.wrc-time{
  font-size: clamp(40px, 4.45vh, 72px);
  font-weight: 950;
  letter-spacing: 0.01em;
  text-align: center;
  padding-left: 0;
  padding-right: 0;
}

.wrc-tv-table td.wrc-gap,
.wrc-tv-table td.wrc-lgap{
  font-size: clamp(24px, 2.55vh, 40px);
  font-weight: 820;
  padding-right: 12px;
  position: relative;
}

.wrc-tv-table td.wrc-gap{
  color: rgba(245, 249, 255, 0.9);
}

.wrc-tv-table td.wrc-lgap{
  color: rgba(255, 255, 255, 0.95);
}

.wrc-tv-table td.wrc-cond{
  font-size: clamp(17px, 1.8vh, 26px);
  font-weight: 900;
  color: rgba(250, 253, 255, 0.99);
  display: table-cell;
  vertical-align: middle;
  text-align: center;
  padding-left: 4px;
  padding-right: 4px;
  min-width: 7ch;
  letter-spacing: 0.02em;
  line-height: 1;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.42);
  border-left: 1px solid rgba(255, 255, 255, 0.24);
  border-right: 1px solid rgba(255, 255, 255, 0.2);
  position: relative;
  z-index: 2;
}

.wrc-tv-table tbody td.wrc-cond{
  border-bottom: 1px solid rgba(255, 255, 255, 0.42) !important;
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.34);
}

.wrc-tv-table th.wrc-cond{
  text-align: center;
  color: rgba(248, 252, 255, 0.95);
  border-left: 1px solid rgba(255, 255, 255, 0.24);
  border-right: 1px solid rgba(255, 255, 255, 0.2);
  min-width: 7ch;
  position: relative;
  z-index: 2;
}

.wrc-tv-table td.wrc-checkin{
  font-size: clamp(24px, 2.45vh, 38px);
  font-weight: 930;
  letter-spacing: 0.015em;
  text-align: center;
  padding-right: 0;
}

.wrc-tv-table.smart-mode-enabled th.wrc-checkin{
  color: rgba(255, 239, 218, 0.98);
  text-shadow: 0 0 8px rgba(255, 183, 96, 0.36);
}

.wrc-tv-table.smart-mode-enabled td.wrc-checkin{
  border-bottom: 1px solid rgba(255, 209, 152, 0.34);
}

.checkin-value{
  display: inline-flex;
  width: 100%;
  min-width: 0;
  font-size: clamp(27px, 2.75vh, 44px);
  font-weight: 940;
  line-height: 1.05;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  align-items: center;
  justify-content: center;
  padding: 0.24em 0.72em 0.22em;
  border-radius: 999px;
  border: 1px solid transparent;
  color: rgba(246, 251, 255, 0.88);
  opacity: 0;
  transform: translateX(18px);
  transition: transform 360ms cubic-bezier(0.22, 0.9, 0.21, 1), opacity 240ms ease, color 240ms ease, border-color 240ms ease;
}

.wrc-tv-table.smart-mode-enabled .checkin-value{
  opacity: 1;
  transform: translateX(0);
}

.checkin-value.is-wait{
  color: rgba(255, 239, 197, 0.99);
  border-color: rgba(255, 206, 122, 0.52);
  background: rgba(196, 127, 38, 0.32);
}

.checkin-value.is-wait.is-wait-first{
  color: rgba(255, 247, 231, 1);
  border-color: rgba(255, 220, 153, 0.84);
  background: linear-gradient(90deg, rgba(255, 178, 89, 0.56), rgba(255, 236, 181, 0.28));
  box-shadow: inset 0 0 0 1px rgba(255, 236, 194, 0.42), 0 0 14px rgba(255, 171, 83, 0.32);
}

.checkin-value.is-now{
  color: rgba(191, 255, 224, 0.98);
  border-color: rgba(98, 233, 156, 0.48);
  background: rgba(32, 152, 96, 0.24);
}

.checkin-value.is-none{
  color: rgba(236, 245, 255, 0.66);
  border-color: rgba(161, 186, 214, 0.24);
  background: rgba(88, 109, 133, 0.18);
}

@keyframes checkinColIn{
  0%{
    opacity: 0;
    clip-path: inset(0 100% 0 0);
  }
  100%{
    opacity: 1;
    clip-path: inset(0 0 0 0);
  }
}

.nick-flight-token{
  position: fixed;
  z-index: 13020;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.7em;
  border-radius: 999px;
  border: 1px solid rgba(185, 236, 206, 0.72);
  background: linear-gradient(90deg, rgba(34, 130, 83, 0.9), rgba(17, 92, 54, 0.88));
  color: rgba(236, 255, 245, 0.98);
  font-size: clamp(20px, 2.05vh, 34px);
  font-weight: 930;
  letter-spacing: 0.02em;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
  box-sizing: border-box;
  overflow: visible;
  transform-origin: center center;
  will-change: transform, opacity, filter;
  transition-property: transform, opacity, filter;
  transition-timing-function: var(--nick-flight-ease, cubic-bezier(0.2, 0.88, 0.2, 1));
  filter: drop-shadow(0 12px 22px rgba(0, 0, 0, 0.42));
  box-shadow: 0 0 0 1px rgba(224, 255, 240, 0.25), 0 10px 24px rgba(9, 45, 30, 0.4);
  isolation: isolate;
}

.nick-flight-token::after{
  content: "";
  position: absolute;
  inset: -16% -8%;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  z-index: -1;
}

.nick-flight-token.is-to-now{
  border-color: rgba(165, 239, 195, 0.74);
  background: linear-gradient(90deg, rgba(45, 151, 98, 0.92), rgba(24, 116, 68, 0.9));
  color: rgba(239, 255, 246, 0.99);
  box-shadow:
    0 0 0 1px rgba(224, 255, 240, 0.36),
    0 12px 28px rgba(9, 45, 30, 0.44),
    0 0 20px rgba(112, 238, 177, 0.34);
}

.nick-flight-token.is-to-now::after{
  background: radial-gradient(circle at center, rgba(161, 255, 209, 0.58), rgba(161, 255, 209, 0) 72%);
  opacity: 0.92;
  animation: nickFlightTrailNow 560ms ease-out infinite;
}

.nick-flight-token.is-to-overlay{
  border-color: rgba(255, 220, 158, 0.72);
  background: linear-gradient(90deg, rgba(219, 143, 45, 0.93), rgba(153, 92, 21, 0.9));
  color: rgba(255, 247, 226, 0.99);
}

@keyframes nickFlightTrailNow{
  0%{
    transform: scale(0.92);
    opacity: 0.92;
  }
  100%{
    transform: scale(1.26);
    opacity: 0.05;
  }
}

.rank-inner{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 1px;
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.rank-medal{
  flex: 0 0 auto;
  font-size: 0.72em;
  line-height: 1;
}

.rank-text{
  display: inline-block;
  line-height: 1;
}

.nick-text{
  display: block;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nick-wrap{
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.nick-change-indicator{
  flex: 0 0 auto;
  min-width: 0;
  max-width: 62%;
  color: rgba(214, 221, 230, 0.88);
  font-size: clamp(30px, 3.25vh, 54px);
  font-weight: 900;
  letter-spacing: 0.02em;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0.95;
  transform: translate3d(0, 0, 0);
}

.nick-change-indicator.state-improved{
  color: rgba(176, 245, 229, 0.94);
  text-shadow: 0 0 10px rgba(79, 212, 187, 0.28);
}

.nick-change-indicator.state-dropped{
  color: rgba(255, 209, 165, 0.92);
  text-shadow: 0 0 10px rgba(237, 149, 95, 0.26);
}

.nick-change-indicator.state-new{
  color: rgba(206, 231, 255, 0.9);
}

@keyframes top3EntryCell{
  0%{
    transform: scale(1.02);
    opacity: 1;
  }
  100%{
    transform: scale(1);
    opacity: 1;
  }
}

.wrc-gap-wrap{
  width: 100%;
  position: relative;
  display: block;
  line-height: 1;
  isolation: isolate;
}

.wrc-gap-value{
  display: block;
  width: 100%;
  text-align: right;
  position: relative;
  z-index: 2;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.46);
}

.wrc-gap-value.is-zero{
  opacity: 0.56;
}

.wrc-gap-bar{
  position: absolute;
  inset: 50% 0 auto;
  display: block;
  width: 100%;
  height: 0.36em;
  transform: translate3d(0, -50%, 0);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
  pointer-events: none;
}

.wrc-gap-fill{
  position: absolute;
  inset: 0;
  transform-origin: right center;
  transform: scaleX(0);
  opacity: 0;
  will-change: transform, opacity;
  transition: transform 260ms ease, opacity 220ms ease;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.02), rgba(245, 165, 82, 0.34));
}

.wrc-tv-table td.wrc-gap .wrc-gap-fill{
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.01), rgba(245, 165, 82, 0.27));
}

.wrc-tv-table td.wrc-lgap .wrc-gap-fill{
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.04), rgba(243, 131, 47, 0.5));
}

.wrc-tv-table td.wrc-lgap .wrc-gap-bar{
  background: rgba(255, 255, 255, 0.1);
}

.wrc-ticker{
  min-height: 0;
  border-radius: 16px;
  border: 1px solid var(--panel-border);
  background: linear-gradient(180deg, rgba(12, 16, 22, 0.92), rgba(7, 10, 16, 0.9));
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  overflow: hidden;
}

.wrc-ticker .msg{
  width: 100%;
  color: #f9fbff;
  font-size: clamp(35px, 3.95vh, 62px);
  font-weight: 920;
  line-height: 1.05;
  letter-spacing: 0.01em;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0;
  transform: translate3d(116%, 0, 0);
  will-change: transform, opacity;
  transition:
    transform 960ms cubic-bezier(0.18, 0.9, 0.2, 1),
    opacity 760ms ease;
}

.wrc-ticker .msg[data-kind="event"],
.wrc-ticker .msg[data-kind="track_event"]{
  color: #fff4de;
  text-shadow:
    0 0 12px rgba(255, 178, 78, 0.42),
    0 2px 6px rgba(0, 0, 0, 0.48);
}

.wrc-ticker .msg[data-kind="shout"]{
  color: #e8f5ff;
  text-shadow: 0 0 8px rgba(122, 203, 255, 0.24), 0 1px 4px rgba(0, 0, 0, 0.42);
}

.wrc-ticker .msg.is-enter{
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.wrc-ticker .msg.is-leave{
  opacity: 0.08;
  transform: translate3d(-118%, 0, 0);
  transition:
    transform 960ms cubic-bezier(0.22, 0.88, 0.2, 1),
    opacity 780ms ease;
}

.wrc-overlay{
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 220ms ease, visibility 220ms ease;
  background: radial-gradient(circle at 50% 52%, rgba(16, 20, 28, 0.36), rgba(0, 0, 0, 0.58));
}

.wrc-overlay.is-visible{
  opacity: 1;
  visibility: visible;
}

.wrc-overlay-card{
  --fly-x: 0px;
  --fly-y: 0px;
  position: relative;
  width: min(1040px, 94vw);
  padding: 26px 34px 28px;
  border-radius: 22px;
  border: 2px solid rgba(255, 255, 255, 0.22);
  background: linear-gradient(180deg, rgba(16, 22, 30, 0.86), rgba(8, 12, 18, 0.74));
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.55);
  overflow: hidden;
  opacity: 0;
  transform: translate3d(0, 0, 0) scale(0.92);
  transition: transform 240ms cubic-bezier(0.2, 0.95, 0.2, 1), opacity 220ms ease;
}

.wrc-overlay.is-visible .wrc-overlay-card{
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
}

.wrc-overlay-card.is-flying{
  opacity: 0.06;
  transform: translate3d(var(--fly-x), var(--fly-y), 0) scale(0.26);
  transition: transform 640ms cubic-bezier(0.25, 0.08, 0.21, 1), opacity 560ms ease;
}

.wrc-overlay-card.is-top3{
  border-color: rgba(255, 214, 140, 0.54);
  background: linear-gradient(180deg, rgba(40, 34, 18, 0.9), rgba(13, 11, 8, 0.72));
  box-shadow: 0 24px 74px rgba(96, 64, 16, 0.5);
}

.wrc-overlay-card.is-record{
  border-color: rgba(68, 230, 123, 0.55);
  background: linear-gradient(180deg, rgba(22, 90, 34, 0.9), rgba(10, 48, 22, 0.76));
  box-shadow: 0 22px 70px rgba(10, 80, 30, 0.55);
}

.wrc-overlay-grid{
  position: relative;
  display: grid;
  grid-template-columns: minmax(190px, 240px) 1fr;
  grid-template-rows: auto auto auto;
  column-gap: 26px;
  row-gap: 5px;
  align-items: center;
}

.wrc-overlay-place-line{
  grid-row: 1 / 3;
  grid-column: 1;
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: 10px;
  min-width: 0;
}

.wrc-overlay-medal{
  font-size: clamp(44px, 4.6vh, 78px);
  line-height: 1;
  filter: drop-shadow(0 3px 10px rgba(0, 0, 0, 0.4));
}

.wrc-overlay-place{
  font-size: clamp(64px, 7.2vh, 122px);
  font-weight: 960;
  line-height: 0.92;
  letter-spacing: 0.01em;
}

.wrc-overlay-name{
  grid-row: 1;
  grid-column: 2;
  font-size: clamp(48px, 5.2vh, 86px);
  font-weight: 940;
  letter-spacing: 0.01em;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wrc-overlay-time{
  grid-row: 2;
  grid-column: 2;
  font-size: clamp(58px, 6.8vh, 118px);
  font-weight: 970;
  letter-spacing: 0.01em;
  color: #fff;
  opacity: 0.98;
}

.wrc-overlay-meta{
  grid-row: 3;
  grid-column: 1 / 2;
  font-size: clamp(22px, 2.25vh, 38px);
  font-weight: 760;
  opacity: 0.9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wrc-overlay-gap{
  grid-row: 3;
  grid-column: 2;
  font-size: clamp(24px, 2.45vh, 40px);
  font-weight: 820;
  text-align: right;
  color: rgba(255, 246, 227, 0.95);
}

.wrc-overlay-rank{
  position: absolute;
  right: 24px;
  top: 18px;
  font-size: clamp(18px, 1.7vh, 30px);
  font-weight: 800;
  opacity: 0.92;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.wrc-overlay-glow{
  position: absolute;
  inset: auto -10% -65% -10%;
  height: 58%;
  pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(255, 186, 106, 0.38), rgba(255, 186, 106, 0) 72%);
  filter: blur(4px);
}

.wrc-overlay-card.is-record .wrc-overlay-rank{
  color: rgba(212, 255, 220, 0.98);
}

.wrc-overlay-card .fw{
  display: none;
}

.wrc-overlay-card.is-record .fw{
  display: block;
}

.fw{
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
}

.fw::before{
  content: "";
  position: absolute;
  inset: -60px;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.9) 0, rgba(255, 255, 255, 0) 60%),
    radial-gradient(circle, rgba(46, 204, 113, 0.8) 0, rgba(46, 204, 113, 0) 55%),
    radial-gradient(circle, rgba(241, 196, 15, 0.8) 0, rgba(241, 196, 15, 0) 55%),
    radial-gradient(circle, rgba(231, 76, 60, 0.8) 0, rgba(231, 76, 60, 0) 55%);
  filter: blur(0.4px);
}

.fw.a{ left: 15%; top: 25%; animation: burst 1.4s ease 0s infinite; }
.fw.b{ left: 82%; top: 30%; animation: burst 1.6s ease 0.3s infinite; }
.fw.c{ left: 25%; top: 70%; animation: burst 1.5s ease 0.2s infinite; }
.fw.d{ left: 78%; top: 72%; animation: burst 1.7s ease 0.1s infinite; }
.fw.e{ left: 50%; top: 18%; animation: burst 1.8s ease 0.4s infinite; }

@keyframes burst{
  0%{ transform: translate(-50%, -50%) scale(0.2); opacity: 0; }
  20%{ opacity: 0.95; }
  70%{ opacity: 0; transform: translate(-50%, -50%) scale(1.3); }
  100%{ opacity: 0; }
}

@media (max-width: 1380px){
  .tv-shell.smart-mode-enabled .tv-header{
    grid-template-columns: auto minmax(0, 1fr) clamp(120px, 9vw, 154px);
    grid-template-areas:
      "stage . qr"
      "smart smart qr";
  }

  .tv-shell{
    --header-row-size-smart: minmax(240px, 26.8vh);
  }

  .tv-shell.smart-mode-enabled .now-driving-card{
    min-width: 0;
  }
}

@media (max-width: 1100px){
  .tv-shell{
    --header-row-size: minmax(170px, 22vh);
    --header-row-size-smart: minmax(228px, 30vh);
    grid-template-rows: var(--header-row-size) minmax(44px, 5.4vh) minmax(0, 1fr) minmax(70px, 11.8vh);
  }

  .tv-header{
    grid-template-columns: auto minmax(0, 1fr) clamp(108px, 10vw, 140px);
    column-gap: 8px;
    row-gap: 8px;
  }

  .track-card{
    max-width: min(70vw, 100%);
  }

  .tv-shell.smart-mode-enabled .now-driving-card{
    min-width: 0;
  }

  .now-driving-nick{
    font-size: clamp(30px, 3.6vh, 54px);
  }
}
