:root {
  --screen-bg: #0e1524;
  --screen-panel: #182235;
  --screen-panel-2: #202d46;
  --screen-text: #f5f7fb;
  --screen-muted: #9fb0cf;
  --screen-accent: #7c5cff;
  --screen-good: #39d98a;
}

body {
  min-height: 100vh;
}

.grid.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.stack {
  display: grid;
  gap: .75rem;
}

.thumb {
  width: 74px;
  height: 74px;
  object-fit: cover;
  border-radius: 14px;
}

.thumb.placeholder {
  display: grid;
  place-items: center;
  background: #f1f3f5;
  font-size: 2rem;
}

.performer-row.is-inactive {
  opacity: .45;
}

.vote-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: .75rem;
}

.vote-card {
  border: 2px solid #e3e6ef;
  border-radius: 16px;
  padding: .75rem;
  display: grid;
  gap: .5rem;
  cursor: pointer;
  background: white;
}

.vote-card:has(input:checked) {
  border-color: #485fc7;
  box-shadow: 0 0 0 3px rgba(72, 95, 199, .18);
}

.vote-card input {
  justify-self: start;
}

.vote-card img,
.vote-placeholder {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  object-fit: cover;
  background: #f1f3f5;
  display: grid;
  place-items: center;
  font-size: 3rem;
}

.vote-name {
  font-weight: 800;
}

.vote-card small {
  color: #667085;
}

.screen-body {
  width: 100vw;
  height: 100vh;
  margin: 0;
  overflow: hidden;
  background: radial-gradient(circle at top left, #263b67, var(--screen-bg) 38%, #070b12);
  color: var(--screen-text);
}

.screen-two-columns {
  width: 100vw;
  height: 100vh;
  padding: 2vw;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(340px, .9fr);
  gap: 2vw;
  overflow: hidden;
}

.screen-results-panel,
.screen-qr-panel {
  min-width: 0;
  min-height: 0;
  border-radius: 32px;
  background: rgba(24, 34, 53, .9);
  border: 1px solid rgba(255,255,255,.1);
  box-shadow: 0 20px 70px rgba(0,0,0,.25);
  overflow: hidden;
}

.screen-results-panel {
  padding: 1.2vw;
}

.screen-category-grid {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: repeat(4, minmax(0, 1fr));
  gap: 1vw;
  overflow: hidden;
}

.screen-category-card {
  min-height: 0;
  overflow: hidden;
  border-radius: 24px;
  background: rgba(255,255,255,.055);
  padding: 1vw;
  display: grid;
  grid-template-rows: auto minmax(0, auto) minmax(0, 1fr);
  gap: .7vh;
}

.screen-category-header {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 1vw;
}

.screen-category-title {
  font-size: clamp(1.35rem, 2.6vh, 2.4rem);
  font-weight: 1000;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.screen-category-total {
  font-size: clamp(.95rem, 1.8vh, 1.55rem);
  line-height: 1;
  font-weight: 900;
  color: var(--screen-good);
  background: rgba(57, 217, 138, .12);
  border-radius: 999px;
  padding: .35rem .7rem;
  white-space: nowrap;
}

.screen-winner {
  display: grid;
  gap: .45rem;
  overflow: hidden;
}

.screen-winner-person {
  display: flex;
  align-items: center;
  gap: .8vw;
  min-width: 0;
}

.screen-winner-person img,
.screen-winner-placeholder {
  width: clamp(52px, 7vh, 92px);
  height: clamp(52px, 7vh, 92px);
  object-fit: cover;
  border-radius: 18px;
  background: var(--screen-panel-2);
  display: grid;
  place-items: center;
  font-size: clamp(1.8rem, 3vh, 2.6rem);
  flex: 0 0 auto;
}

.screen-winner-text {
  min-width: 0;
}

.screen-winner-text strong {
  display: block;
  font-size: clamp(1.3rem, 2.7vh, 2.5rem);
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.screen-winner-text span {
  display: block;
  color: var(--screen-muted);
  font-size: clamp(.9rem, 1.5vh, 1.3rem);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.screen-bars {
  min-height: 0;
  display: grid;
  align-content: end;
  gap: .45vh;
  overflow: hidden;
}

.screen-bar-row {
  display: grid;
  grid-template-columns: minmax(6rem, 11rem) minmax(0, 1fr) 4.2rem;
  align-items: center;
  gap: .7vw;
  font-size: clamp(.85rem, 1.55vh, 1.35rem);
  font-weight: 700;
}

.screen-bar-row span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.screen-bar-row b {
  text-align: right;
  font-size: clamp(1rem, 1.8vh, 1.5rem);
}

.screen-bar {
  height: clamp(.55rem, 1.15vh, 1rem);
  background: rgba(255,255,255,.12);
  border-radius: 999px;
  overflow: hidden;
}

.screen-bar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--screen-accent), var(--screen-good));
  border-radius: inherit;
}

.screen-qr-panel {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  place-items: center;
  padding: 2vw;
  background: #fff;
  color: #111827;
}

.screen-qr-panel img {
  width: min(42vw, 78vh);
  height: min(42vw, 78vh);
  object-fit: contain;
}

.screen-qr-url {
  width: 100%;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: clamp(.85rem, 1.4vh, 1.2rem);
  font-weight: 700;
}

@media (max-aspect-ratio: 4 / 3) {
  .screen-two-columns {
    grid-template-columns: minmax(0, 1fr) minmax(280px, .75fr);
  }

  .screen-qr-panel img {
    width: min(38vw, 72vh);
    height: min(38vw, 72vh);
  }
}
.first-only-card {
  grid-template-rows: auto minmax(0, 1fr);
  gap: 1.2vh;
}

.screen-first-winner {
  min-height: 0;
  height: 100%;
  display: grid;
  grid-template-columns: clamp(76px, 10vh, 130px) minmax(0, 1fr) auto;
  align-items: center;
  gap: 1vw;
  overflow: hidden;
}

.screen-first-winner img,
.screen-first-winner .screen-winner-placeholder {
  width: clamp(76px, 10vh, 130px);
  height: clamp(76px, 10vh, 130px);
  object-fit: cover;
  border-radius: 22px;
  background: var(--screen-panel-2);
  display: grid;
  place-items: center;
  font-size: clamp(2rem, 4vh, 3.5rem);
}

.screen-first-text {
  min-width: 0;
}

.screen-first-text strong {
  display: block;
  font-size: clamp(2rem, 4.2vh, 4.6rem);
  line-height: .95;
  font-weight: 1000;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.screen-first-text span {
  display: block;
  margin-top: .35rem;
  color: var(--screen-muted);
  font-size: clamp(1rem, 2vh, 2rem);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.screen-first-votes {
  min-width: clamp(90px, 9vw, 170px);
  display: grid;
  place-items: center;
  padding: .8vh 1vw;
  border-radius: 24px;
  background: rgba(57, 217, 138, .12);
  color: var(--screen-good);
  text-align: center;
}

.screen-first-votes b {
  font-size: clamp(2.5rem, 6vh, 6rem);
  line-height: .85;
  font-weight: 1000;
}

.screen-first-votes span {
  margin-top: .35rem;
  font-size: clamp(.9rem, 1.8vh, 1.5rem);
  font-weight: 900;
  line-height: 1;
}
