:root {
  font-family: "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
  color-scheme: dark;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html, body { margin: 0; width: 100%; height: 100%; background: transparent; overflow: hidden; }
[hidden] { display: none !important; }

.broadcast {
  position: absolute;
  left: 0;
  top: 0;
  width: 320px;
  height: 160px;
  overflow: hidden;
  transform-origin: top left;
  isolation: isolate;
  color: #fff9f2;
  border: 1px solid #f8d8a7;
  border-radius: 9px;
  background:
    radial-gradient(ellipse at 50% 34%, rgba(118, 80, 164, .42), transparent 48%),
    linear-gradient(180deg, #392452 0%, #24163f 46%, #17152f 100%);
  box-shadow:
    inset 0 0 0 2px rgba(112, 70, 134, .95),
    inset 0 0 0 4px rgba(226, 177, 127, .34),
    inset 0 0 20px rgba(168, 122, 216, .22),
    0 0 9px rgba(116, 73, 169, .55);
}

.broadcast::before {
  content: "";
  position: absolute;
  inset: 6px;
  z-index: 4;
  pointer-events: none;
  border: 1px solid rgba(231, 190, 142, .64);
  border-radius: 5px;
}

.stars {
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: .46;
  background-image:
    radial-gradient(circle, #fff 0 .55px, transparent .9px),
    radial-gradient(circle, #d8c2ff 0 .7px, transparent 1.05px),
    radial-gradient(circle, #ffe1a7 0 .5px, transparent .85px);
  background-size: 53px 47px, 79px 61px, 97px 71px;
  background-position: 7px 11px, 31px 6px, 16px 37px;
  mask-image: linear-gradient(180deg, #000 0%, rgba(0,0,0,.7) 62%, transparent 100%);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, rgba(0,0,0,.7) 62%, transparent 100%);
}

.corner {
  position: absolute;
  z-index: 5;
  width: 27px;
  height: 27px;
  pointer-events: none;
}
.corner::before,
.corner::after {
  content: "";
  position: absolute;
  border-radius: 2px;
  background: linear-gradient(90deg, #9a669f, #ffe0a2 48%, #b478a7);
  box-shadow: 0 0 3px rgba(248, 196, 255, .8);
}
.corner::before { left: 0; top: 4px; width: 25px; height: 1.5px; }
.corner::after { left: 4px; top: 0; width: 1.5px; height: 25px; }
.corner-tl { left: 3px; top: 3px; }
.corner-tr { right: 3px; top: 3px; transform: scaleX(-1); }
.corner-bl { left: 3px; bottom: 3px; transform: scaleY(-1); }
.corner-br { right: 3px; bottom: 3px; transform: scale(-1); }

header {
  position: relative;
  height: 50px;
  margin: 0 14px;
  border-bottom: 1px solid rgba(229, 188, 140, .45);
}
.crest {
  position: absolute;
  left: 50%;
  top: 3px;
  width: 105px;
  height: 24.5px;
  overflow: visible;
  transform: translateX(-50%);
  display: flex;
  justify-content: center;
  align-items: flex-start;
}
.crest svg {
  display: block;
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 1px 1px rgba(18, 8, 35, .7));
}
.header-row {
  position: absolute;
  left: 15px;
  right: 15px;
  bottom: 4px;
  height: 17px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  white-space: nowrap;
}
h1 {
  margin: 0;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: #fff8ef;
  text-shadow: 0 0 4px rgba(195, 159, 255, .55);
}
.prize { display: flex; align-items: baseline; gap: 2px; }
.prize > span { font-size: var(--prize-label-size, 8px); color: #cdbbd7; }
.prize strong { font-size: var(--prize-size, 20px); color: #ffe0a0; font-variant-numeric: tabular-nums; }
.prize b { font-size: var(--prize-unit-size, 9px); color: #eee0e8; }

.record-area {
  position: relative;
  height: 63px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-top: 1px;
}
.record-area::before,
.record-area::after {
  content: "✦";
  position: absolute;
  top: 34px;
  color: #f5cf8e;
  font-size: 9px;
  text-shadow: 0 0 5px rgba(190, 148, 255, .75);
}
.record-area::before { left: 29px; }
.record-area::after { right: 29px; }
.record-label {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 13px;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 1.2px;
  color: #d7c6de;
}
.record-label i {
  display: block;
  width: 23px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(232, 192, 145, .75));
}
.record-label i:last-child { transform: scaleX(-1); }
.record {
  height: 47px;
  max-width: 245px;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 5px;
  white-space: nowrap;
}
.record strong {
  font-size: 36px;
  font-weight: 900;
  line-height: 1.18;
  letter-spacing: -1px;
  color: #fff4dc;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 6px rgba(188, 151, 239, .52), 0 1px 0 #604471;
}
.unit { font-size: 13px; color: #efd3a5; }

footer {
  position: relative;
  height: 39px;
  margin: 0 14px;
  padding: 4px 8px 6px;
  display: flex;
  align-items: stretch;
  gap: 15px;
  border-top: 1px solid rgba(229, 188, 140, .48);
  background: linear-gradient(90deg, transparent, rgba(78, 52, 110, .42) 20%, rgba(78, 52, 110, .42) 80%, transparent);
}
.info-box {
  width: calc(50% - 7.5px);
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
}
.field-label {
  font-size: 7px;
  line-height: 1;
  letter-spacing: .8px;
  color: #bda8ca;
}
.info-box strong {
  width: 100%;
  min-width: 0;
  overflow: hidden;
  color: #fff7ef;
  font-size: 14px;
  line-height: 1.15;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-shadow: 0 0 4px rgba(190, 151, 239, .42);
}
.member-line strong { color: #ffdda0; }
.footer-gem {
  position: absolute;
  left: 50%;
  top: -4px;
  width: 8px;
  height: 8px;
  transform: translateX(-50%) rotate(45deg);
  border: 1px solid #ffe3ad;
  background: linear-gradient(135deg, #f4e6ff, #9b72db 55%, #432867);
  box-shadow: 0 0 5px rgba(190, 151, 239, .7);
}

.changed { animation: glow .8s ease-out; }
@keyframes glow {
  0% { filter: brightness(1.28); box-shadow: inset 0 0 24px rgba(218, 190, 255, .62), 0 0 16px rgba(193, 152, 255, .76); }
  100% { filter: brightness(1); }
}
@media (prefers-reduced-motion: reduce) { .changed { animation: none; } }
