:root {
  --overlay-width: 1760px;
  --overlay-gap: 18px;
  --overlay-radius: 30px;
  --panel-bg: rgba(33, 18, 9, 0.94);
  --panel-border: rgba(226, 189, 126, 0.24);
  --panel-shadow: 0 26px 70px rgba(23, 10, 4, 0.58);
  --text-main: #f7eddc;
  --text-soft: rgba(247, 237, 220, 0.72);
  --accent-red: #b64a2c;
  --accent-blue: #6ca4a2;
  --accent-lime: #d9b768;
  --accent-ink: #1b120d;
  --accent-leather: #5e311d;
  --accent-sand: #bf8d4c;
  --accent-dust: #d8b27c;
  --accent-barn: #7a3b22;
  --progress-bg: rgba(255, 243, 221, 0.14);
  --font-body: "Alegreya Sans", "Trebuchet MS", sans-serif;
  --font-display: "Rye", Georgia, serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  overflow: hidden;
  background: transparent;
  color: var(--text-main);
  font-family: var(--font-body);
}

body {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 6px 28px 8px;
}

.overlay-shell {
  width: 100%;
  display: flex;
  justify-content: center;
}

.lower-third {
  position: relative;
  width: min(100%, var(--overlay-width));
  border: 1px solid var(--panel-border);
  border-radius: var(--overlay-radius) var(--overlay-radius) 0 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 84% 16%, rgba(245, 182, 85, 0.26), transparent 18%),
    radial-gradient(circle at 70% 18%, rgba(159, 75, 38, 0.24), transparent 28%),
    linear-gradient(180deg, rgba(255, 222, 168, 0.06), rgba(0, 0, 0, 0) 30%),
    linear-gradient(90deg, rgba(27, 18, 13, 0.18), rgba(27, 18, 13, 0) 16%, rgba(27, 18, 13, 0.22) 84%, rgba(27, 18, 13, 0.56)),
    linear-gradient(135deg, rgba(70, 34, 18, 0.98), rgba(39, 20, 11, 0.99) 58%, rgba(21, 12, 7, 0.99));
  box-shadow: var(--panel-shadow);
  backdrop-filter: blur(10px);
}

.lower-third::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 50%, rgba(216, 178, 124, 0.08), transparent 22%),
    linear-gradient(90deg, transparent, rgba(246, 216, 161, 0.08), transparent),
    repeating-linear-gradient(
      90deg,
      rgba(255, 239, 211, 0.015) 0 2px,
      rgba(83, 43, 23, 0.02) 2px 15px,
      rgba(18, 10, 7, 0.015) 15px 33px
    ),
    repeating-linear-gradient(
      180deg,
      rgba(255, 232, 189, 0.02) 0 1px,
      transparent 1px 9px
    );
}

.lower-third::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255, 234, 196, 0.06), transparent 18%, transparent 72%, rgba(0, 0, 0, 0.22)),
    radial-gradient(circle at 50% 112%, rgba(216, 178, 124, 0.16), transparent 24%);
  mix-blend-mode: screen;
  opacity: 0.72;
}

.headline-row {
  display: grid;
  grid-template-columns: 348px 1fr;
  min-height: 110px;
}

.logo-block {
  position: relative;
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 10px;
  align-items: center;
  padding: 12px 14px 12px 14px;
  background:
    radial-gradient(circle at top left, rgba(255, 225, 173, 0.2), transparent 34%),
    repeating-linear-gradient(
      90deg,
      rgba(124, 64, 37, 0.18) 0 14px,
      rgba(88, 42, 22, 0.06) 14px 28px
    ),
    linear-gradient(135deg, rgba(118, 58, 29, 0.99), rgba(78, 35, 18, 0.98) 58%, rgba(39, 17, 8, 0.98)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent);
}

.logo-block::after {
  content: "";
  position: absolute;
  inset: 12px 0 12px auto;
  width: 1px;
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.35), transparent);
}

.logo-crest {
  position: relative;
  width: 84px;
  height: 78px;
  border-radius: 20px;
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 234, 196, 0.24), transparent 50%),
    linear-gradient(180deg, rgba(255, 243, 221, 0.16), rgba(255, 255, 255, 0.04));
  border: 1px solid rgba(255, 220, 173, 0.22);
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.logo-crest::before {
  content: "";
  position: absolute;
  inset: auto -14px -32px auto;
  width: 72px;
  height: 72px;
  border-radius: 999px;
  background: rgba(217, 183, 104, 0.34);
  filter: blur(4px);
}

.logo-mascot {
  position: absolute;
  left: -4px;
  bottom: -10px;
  width: 98px;
  max-width: none;
  filter: drop-shadow(0 12px 18px rgba(0, 0, 0, 0.28));
}

.logo-stack {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.logo-kicker {
  font-family: var(--font-display);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 234, 196, 0.92);
}

.logo-wordmark {
  width: min(112px, 100%);
  height: auto;
}

.logo-mission {
  margin: 0;
  font-size: 0.72rem;
  line-height: 1.2;
  color: rgba(255, 236, 209, 0.82);
}

.headline-content {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(220px, 300px) 214px;
  align-items: center;
  gap: var(--overlay-gap);
  padding: 14px 24px 14px 26px;
  background:
    linear-gradient(180deg, rgba(255, 238, 212, 0.03), rgba(0, 0, 0, 0) 30%),
    radial-gradient(circle at 76% 18%, rgba(191, 141, 76, 0.12), transparent 24%);
}

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(217, 183, 104, 0.42);
  background: linear-gradient(180deg, rgba(116, 58, 27, 0.8), rgba(71, 31, 16, 0.86));
  box-shadow: inset 0 1px 0 rgba(255, 236, 209, 0.16);
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 800;
  font-size: 0.74rem;
  white-space: nowrap;
}

.live-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--accent-red);
  box-shadow: 0 0 0 0 rgba(235, 48, 82, 0.8);
  animation: pulse 1.7s infinite;
}

.headline-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.headline-label {
  font-family: var(--font-display);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-soft);
}

.headline-value {
  font-family: var(--font-display);
  font-size: clamp(1.18rem, 1.8vw, 1.86rem);
  letter-spacing: 0.02em;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.28);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.progress-cluster {
  display: flex;
  align-items: center;
  gap: 12px;
}

.progress-bar {
  position: relative;
  flex: 1;
  height: 16px;
  border-radius: 999px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 247, 233, 0.12), rgba(93, 48, 27, 0.3)),
    var(--progress-bg);
  border: 1px solid rgba(226, 189, 126, 0.12);
}

.progress-fill {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent-red), var(--accent-sand) 48%, var(--accent-lime));
  box-shadow: inset 0 0 18px rgba(255, 255, 255, 0.18);
  transition: width 0.9s ease;
}

.progress-text {
  font-family: var(--font-display);
  font-size: 0.94rem;
  font-weight: 800;
  color: var(--accent-lime);
  min-width: 58px;
  text-align: right;
}

.qr-cluster {
  display: grid;
  grid-template-columns: 1fr 108px;
  gap: 12px;
  align-items: center;
  padding: 8px 12px 8px 14px;
  border-radius: 22px;
  text-decoration: none;
  color: inherit;
  background:
    linear-gradient(135deg, rgba(255, 244, 223, 0.1), rgba(94, 49, 29, 0.08)),
    rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(226, 189, 126, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 240, 212, 0.08);
}

.qr-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.qr-kicker {
  font-family: var(--font-display);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.qr-label {
  font-family: var(--font-display);
  font-size: 0.98rem;
  letter-spacing: 0.03em;
  color: var(--text-main);
}

.qr-url {
  font-size: 0.72rem;
  color: var(--accent-blue);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.qr-image {
  width: 108px;
  height: 108px;
  display: block;
  padding: 5px;
  border-radius: 16px;
  background: white;
  object-fit: contain;
}

.ticker-row {
  display: grid;
  grid-template-columns: 304px 1fr;
  align-items: center;
  gap: 18px;
  min-height: 72px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(90deg, rgba(217, 183, 104, 0.18), rgba(108, 164, 162, 0.04) 24%, transparent 48%),
    repeating-linear-gradient(
      90deg,
      rgba(112, 55, 29, 0.16) 0 18px,
      rgba(67, 31, 16, 0.08) 18px 36px
    ),
    rgba(29, 16, 9, 0.94);
}

.ticker-prefix {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  height: 100%;
  padding: 0 22px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--accent-lime);
  border-right: 1px solid rgba(226, 189, 126, 0.12);
  font-family: var(--font-display);
}

.ticker-prefix img {
  width: 30px;
  height: 30px;
  object-fit: contain;
  border-radius: 999px;
}

.ticker-viewport {
  position: relative;
  overflow: hidden;
  height: 100%;
  display: flex;
  align-items: center;
}

.ticker-track {
  display: inline-flex;
  align-items: center;
  gap: 2.75rem;
  white-space: nowrap;
  padding-right: 2.75rem;
  will-change: transform;
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  font-size: 1rem;
  letter-spacing: 0.02em;
}

.ticker-bullet {
  color: var(--accent-sand);
  font-weight: 900;
}

.ticker-emphasis {
  color: var(--accent-blue);
  font-weight: 800;
}

.lower-third.is-alert .headline-content {
  background:
    linear-gradient(90deg, rgba(182, 74, 44, 0.24), transparent 34%),
    linear-gradient(180deg, rgba(255, 242, 218, 0.04), transparent);
}

.lower-third.is-alert .headline-value {
  color: #fff4df;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(235, 48, 82, 0.75);
  }

  70% {
    box-shadow: 0 0 0 12px rgba(235, 48, 82, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(235, 48, 82, 0);
  }
}

@media (max-width: 1280px) {
  .headline-row,
  .ticker-row {
    grid-template-columns: 1fr;
  }

  .logo-block {
    grid-template-columns: 88px 1fr;
  }

  .logo-block::after,
  .ticker-prefix {
    display: none;
  }

  .headline-content {
    grid-template-columns: 1fr;
  }

  .progress-cluster {
    width: 100%;
  }

  .qr-cluster {
    grid-template-columns: 1fr 84px;
  }

  .qr-image {
    width: 84px;
    height: 84px;
  }
}
