:root {
  color-scheme: dark;
  --bg: #630908;
  --surface: #7d100c;
  --gold: #ffe0a0;
  --gold-bright: #fff0bd;
  --muted: #edc7a5;
  --line: rgba(255, 213, 147, 0.28);
  --text: #fff8eb;
  --serif: "Songti SC", "STSong", "SimSun", serif;
  --sans: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input {
  touch-action: manipulation;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: wait;
  opacity: 0.55;
}
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
}
button {
  color: inherit;
}
a {
  color: var(--gold);
  text-decoration: none;
}
[hidden] {
  display: none !important;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 2.8px;
  color: var(--muted);
  margin: 0 0 7px;
}
.screen-body {
  --barrage-height: 72px;
  height: 100dvh;
  overflow: hidden;
  min-width: 800px;
}
.screen-shell {
  height: 100%;
  position: relative;
  padding: 21vh 2.0833vw 12vh;
  display: flex;
  flex-direction: column;
  background: #a20c04 url("/assets/ping-an-event.f9c78491c0d1.webp") center / cover no-repeat;
}
.screen-controls {
  position: absolute;
  top: 0.5vh;
  right: 2.0833vw;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: clamp(12px, 0.8333vw, 32px);
}
.screen-controls time {
  font-size: clamp(16px, 1.0417vw, 40px);
  font-variant-numeric: tabular-nums;
  color: #fff3d4;
  text-shadow: 0 2px 6px #730000;
}
.event-brand {
  display: flex;
  gap: 15px;
  align-items: center;
}
.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  font-size: 31px;
  color: var(--gold);
  border: 1px solid #695638;
  border-radius: 11px;
  background: linear-gradient(130deg, #bf310d, #700d09);
}
.event-brand h1 {
  font-size: 22px;
  letter-spacing: 2px;
  font-weight: 600;
  margin: 0;
}
.connection {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #630908;
  font-size: 14px;
  color: #fff2d2;
  white-space: nowrap;
}
.live-tag i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #a59980;
}
.fullscreen-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  height: clamp(24px, 3.3333vh, 72px);
  width: clamp(24px, 3.3333vh, 72px);
  padding: 0;
  border: 1px solid #ffe7b4;
  border-radius: 8px;
  background: #ffe0a0;
  color: #6f1208;
  font-size: clamp(12px, 0.8333vw, 32px);
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 3px 12px #48060040;
}
.fullscreen-button:hover {
  background: #fff0bd;
}
.fullscreen-button svg {
  width: 1.25em;
  height: 1.25em;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.screen-grid {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 1fr);
  gap: 20px;
  flex: 1;
  min-height: 0;
}
.live-stage {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid #ffdb9a73;
  border-radius: 16px;
  background: linear-gradient(180deg, #67040020, #49050058);
}
.stage-heading {
  position: absolute;
  top: 27px;
  left: 30px;
  right: 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 3;
}
.live-tag {
  display: flex;
  gap: 9px;
  align-items: center;
  font-size: 16px;
  letter-spacing: 2px;
  color: #fff0d0;
  text-shadow: 0 2px 8px #700000;
}
.live-tag i {
  background: #f4ca86;
  box-shadow: 0 0 15px #f4ca8666;
}
.stage-number {
  font-size: 16px;
  letter-spacing: 2px;
  color: #ffe7ba;
  text-shadow: 0 2px 8px #700000;
}
.barrage {
  position: absolute;
  inset: 75px 0 235px;
  overflow: hidden;
  pointer-events: none;
  z-index: 4;
}
.barrage-card {
  position: absolute;
  left: 0;
  top: 0;
  display: flex;
  align-items: center;
  width: 420px;
  height: var(--barrage-height);
  padding: 8px 15px 8px 8px;
  gap: 10px;
  border: 1px solid #ffe09e9c;
  border-radius: 50px;
  background: linear-gradient(90deg, #8e160cf5, #600800ed);
  box-shadow: 0 5px 22px #0003;
  will-change: transform;
  white-space: nowrap;
}
.avatar {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #a93d16;
  color: #ffe6b8;
  font-size: 17px;
  object-fit: cover;
}
.barrage-card .barrage-name {
  font-size: 20px;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.barrage-card small {
  font-size: 14px;
  color: #f4cea4;
}
.barrage-amount {
  flex-shrink: 0;
  color: var(--gold-bright);
  margin-left: auto;
  font-weight: 600;
  font-size: 24px;
  font-variant-numeric: tabular-nums;
}
.barrage-card .avatar {
  width: 50px;
  height: 50px;
  font-size: 22px;
}
.barrage-card.featured {
  border-color: #ffe9add9;
  background: linear-gradient(90deg, #b34710f5, #8b1a04ed);
}
.stage-bottom {
  position: absolute;
  z-index: 5;
  bottom: 27px;
  left: 30px;
  right: 30px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}
.join-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #680800e8;
  border: 1px solid #ffd28e8a;
  border-radius: 12px;
  padding: 12px 19px 12px 12px;
  min-width: 236px;
}
.qr-box {
  height: 160px;
  width: 160px;
  background: #fff;
  border-radius: 7px;
  padding: 4px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.qr-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.qr-box span {
  color: #726048;
  font-size: 12px;
  text-align: center;
}
.join-card strong {
  font-size: 20px;
  font-weight: 500;
  letter-spacing: 1px;
}
.join-card p {
  font-size: 14px;
  color: #ffddb2;
  margin: 8px 0;
}
.event-stats {
  display: flex;
  gap: 25px;
  align-items: center;
  padding: 14px 18px;
  border-radius: 12px;
  background: #630900dc;
  border: 1px solid #ffd28e66;
}
.stat-label {
  font-size: 16px;
  color: #ffdeb0;
  letter-spacing: 1px;
}
.event-stats p {
  margin: 8px 0 0;
  white-space: nowrap;
  display: flex;
  gap: 7px;
  align-items: baseline;
}
.event-stats strong {
  font-family: Georgia, serif;
  font-size: max(24px, 2.5vw);
  font-weight: 400;
  letter-spacing: 1px;
  font-variant-numeric: tabular-nums;
}
.event-stats p > span {
  font-size: 16px;
  color: #ffdeb0;
}
.event-stats p > .currency {
  font-size: 19px;
}
.stats-divider {
  height: 40px;
  width: 1px;
  background: #96774c55;
}
.ranking-panel {
  padding: 25px 21px 0;
  display: flex;
  flex-direction: column;
  background: linear-gradient(170deg, #860900ee, #4d0401f0);
  border: 1px solid #ffdb9a8c;
  border-radius: 16px;
  min-width: 0;
  overflow: hidden;
}
.ranking-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  flex-shrink: 0;
  margin-bottom: clamp(16px, 1.25vw, 48px);
}
.ranking-heading .eyebrow {
  font-size: 9px;
  letter-spacing: 2px;
}
.ranking-heading h2 {
  font-size: 28px;
  letter-spacing: 3px;
  margin: 3px 0 0;
  font-weight: 500;
}
.ranking-heading h2 > span {
  color: #e4be7a;
  letter-spacing: 0;
  margin-right: 6px;
  font-size: 27px;
}
.rank-switch {
  display: flex;
  background: #4d0804;
  border: 1px solid var(--line);
  padding: 3px;
  border-radius: 6px;
}
.rank-switch button {
  border: 0;
  color: #e7b994;
  background: transparent;
  padding: 5px 7px;
  border-radius: 3px;
  font-size: 13px;
}
.rank-switch button[aria-pressed="true"] {
  background: #ffd083;
  color: #6c1606;
}
.rank-columns {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: #f3c89b;
  letter-spacing: 0.5px;
  margin: 23px 0 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  gap: 6px;
}
.ranking-list {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  margin-bottom: clamp(12px, 0.8333vw, 32px);
}
.rank-row {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  display: flex;
  align-items: center;
  gap: 9px;
  transition:
    background 0.6s,
    opacity 0.6s;
  border-radius: 7px;
  padding: 0 5px;
  font-variant-numeric: tabular-nums;
}
.rank-row .rank-number {
  font-size: 17px;
  color: #f0c296;
  min-width: 19px;
  text-align: center;
  font-family: Georgia, serif;
}
.rank-row .avatar {
  width: auto;
  height: min(32px, 100%);
  aspect-ratio: 1;
  font-size: 15px;
  background: #a23d16;
}
.rank-row .rank-name {
  min-width: 0;
  font-size: 16px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}
.rank-row .rank-amount {
  flex-shrink: 0;
  white-space: nowrap;
  font-size: 18px;
  color: #fff1d5;
  font-weight: 500;
  letter-spacing: 0.2px;
}
.rank-row[data-rank="1"] {
  background: linear-gradient(90deg, #eaaa346b, #d9862029);
  border: 1px solid #ffe09966;
}
.rank-row[data-rank="1"] .rank-number,
.rank-row[data-rank="1"] .rank-amount {
  color: #ffda8d;
}
.rank-row[data-rank="2"] .rank-number {
  color: #dad8d2;
}
.rank-row[data-rank="3"] .rank-number {
  color: #d9a383;
}
.rank-row.changed {
  animation: rank-flash 1.5s ease-out;
}
.rank-row.climbing {
  z-index: 3;
  background: linear-gradient(90deg, #ffe3a0, #eeb44c);
  color: #661509;
  border: 1px solid #fff0bd;
  box-shadow: inset 0 0 14px #fff5d57a;
}
.rank-row.climbing .rank-number,
.rank-row.climbing .rank-amount {
  color: #661509;
}
.ranking-list.compact .rank-row {
  gap: 6px;
}
.ranking-list.compact .avatar {
  width: auto;
  height: min(20px, 100%);
  aspect-ratio: 1;
  font-size: 9px;
}
.ranking-list.compact .rank-name {
  font-size: 14px;
  line-height: 1;
}
.ranking-list.compact .rank-amount {
  font-size: 16px;
  line-height: 1;
}
.ranking-list.compact .rank-number {
  font-size: 13px;
  min-width: 15px;
}
.ranking-empty {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  gap: 15px;
}
.ranking-empty > span {
  font-size: 48px;
  color: #ab8955;
}
.ranking-empty strong {
  font-size: 13px;
  font-weight: 400;
  color: #c6b295;
}
.ranking-empty p {
  font-size: 11px;
  color: #847967;
  margin: 0;
}
.ranking-footer {
  border-top: 1px solid var(--line);
  padding: 18px 0;
  text-align: center;
  font-size: 13px;
  letter-spacing: 1px;
  color: #f4cfa2;
  flex-shrink: 0;
}
.ranking-panel:has(.ranking-list.compact) .ranking-footer,
.ranking-panel:has(.ranking-list.compact) .ranking-heading .eyebrow {
  display: none;
}
.ranking-panel:has(.ranking-list.compact) .rank-columns {
  margin-top: 10px;
  margin-bottom: 7px;
  padding-bottom: 8px;
}
.tiny-spark {
  color: #c59f60;
  margin-right: 4px;
}
.celebration-layer {
  position: fixed;
  inset: 0;
  z-index: 30;
  overflow: hidden;
  pointer-events: none;
}
.celebration-shade,
.celebration-layer canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.celebration-shade {
  background: radial-gradient(ellipse, #300301c7, #27020070);
  opacity: 0.25;
  transition: opacity 0.65s;
}
.celebration-layer[data-phase="fireworks"] .celebration-shade {
  opacity: 1;
}
.celebration-rocket {
  position: absolute;
  left: 0;
  top: 0;
  width: clamp(88px, 7.3vw, 260px);
  aspect-ratio: 100 / 180;
  will-change: transform;
  filter: drop-shadow(0 0 20px #ffcf6dcc);
}
.celebration-rocket svg {
  display: block;
  width: 100%;
  height: 100%;
}
.rocket-flame {
  transform-origin: 50px 115px;
  animation: rocket-flame 0.16s ease-in-out infinite alternate;
}
.celebration-card {
  position: absolute;
  left: 50%;
  top: 48%;
  width: min(82vw, 1100px);
  padding: clamp(28px, 3vw, 80px);
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: clamp(15px, 1.4vw, 44px);
  text-align: center;
  background: radial-gradient(
    ellipse,
    #560b07f0 15%,
    #560b0773 55%,
    transparent 72%
  );
  opacity: 0;
  transform: translate(-50%, -40%) scale(0.86);
  transition:
    opacity 0.45s,
    transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.celebration-layer[data-phase="fireworks"] .celebration-card {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}
.celebration-rank {
  margin: 0;
  color: #ffdfa0;
  font-size: clamp(24px, 2.2vw, 72px);
  letter-spacing: 0.2em;
  text-shadow: 0 2px 20px #fbbf4a80;
}
.celebration-person {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(16px, 1.4vw, 48px);
  max-width: 100%;
}
.celebration-avatar .avatar {
  width: clamp(58px, 5vw, 140px);
  height: clamp(58px, 5vw, 140px);
  border: 3px solid #ffe1a0;
  box-shadow: 0 0 28px #ffd27e50;
  font-size: clamp(25px, 2.5vw, 70px);
}
.celebration-name {
  color: #fff6d7;
  font-size: clamp(32px, 3.2vw, 92px);
  font-weight: 600;
  overflow-wrap: anywhere;
  min-width: 0;
  text-shadow: 0 4px 24px #490a05;
}
.celebration-amount {
  margin: 0;
  color: #ffe19a;
  font-family: Georgia, serif;
  font-size: clamp(42px, 4.1vw, 128px);
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 34px #fbc75b85;
}
.portal-body {
  min-height: 100dvh;
  background:
    radial-gradient(ellipse at 90% 0, #df64184f, transparent 45%), #640a08;
}
.particle-wall {
  position: absolute;
  inset: clamp(12px, 1.25vw, 48px);
  overflow: hidden;
  isolation: isolate;
}
.wall-card {
  position: absolute;
  left: 0;
  top: 0;
  transform-origin: top left;
  transition: transform 850ms cubic-bezier(0.22, 0.68, 0.2, 1);
}
.wall-float {
  width: 100%;
  height: 100%;
}
.wall-card-body {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: 2.5em minmax(0, 1fr);
  grid-template-rows: 1fr 1fr;
  gap: 0.06em 0.55em;
  align-items: center;
  padding: 0.55em 0.8em;
  border-radius: 0.9em;
  border: 1px solid #ffc778a3;
  background: linear-gradient(125deg, #8b1c0df7, #490706f5);
  box-shadow: 0 3px 10px #35040070;
}
.wall-card.wall-arriving {
  z-index: 1000 !important;
}
.wall-arriving .wall-card-body {
  border-color: #fff5c9;
  box-shadow: 0 0 26px #ffe09aa6;
}
.wall-card .avatar {
  width: 2.5em;
  height: 2.5em;
  grid-row: span 2;
  font-size: 1em;
}
.wall-person {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 0.5em;
}
.wall-name {
  font-size: 1em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wall-unit {
  color: #efc89e;
  font-size: 0.58em;
  white-space: nowrap;
  flex-shrink: 0;
}
.wall-amount {
  color: #ffe4a1;
  font-size: 1.18em;
  line-height: 1;
  white-space: nowrap;
}
.wall-champion .wall-card-body {
  background: linear-gradient(125deg, #efb451, #fce0a0);
  border-color: #fff5d9;
  color: #611309;
  box-shadow: 0 0 35px #ffe09a55;
}
.wall-champion .wall-amount,
.wall-champion .wall-unit {
  color: #6c200b;
}
.rank-flight {
  position: fixed;
  z-index: 25;
  transform-origin: top left;
  transition: none;
  will-change: transform, opacity;
  pointer-events: none;
}
.rank-flight .wall-card-body {
  box-shadow: 0 0 30px #ffd377a0;
}
.operator-entry {
  position: fixed;
  right: 12px;
  bottom: 8px;
  width: 32px;
  height: 24px;
  opacity: 0.15;
  z-index: 45;
  transition: opacity 0.2s;
}
.operator-entry:hover,
.operator-entry:focus-visible {
  opacity: 1;
}
.operator-entry svg {
  width: 100%;
  height: 100%;
  fill: #fff2cd;
}
.screen-shell:has(.summary-panel:not([hidden])) {
  background-size: contain;
}
.summary-panel {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(94vw, 167.1111vh);
  height: min(52.875vw, 94vh);
  container-type: size;
}
.summary-mountain {
  position: absolute;
  /* The smaller customer artwork is cropped; keep its peaks aligned with the labels. */
  left: 18.15%;
  top: 6.27%;
  width: 61.33%;
  height: 77.98%;
  object-fit: contain;
}
.summary-total,
.summary-unit {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1cqh;
  text-align: center;
  color: #fff8dc;
  font-family: var(--sans);
  font-weight: 700;
  -webkit-text-stroke: 0.45cqh #a82b0a;
  paint-order: stroke fill;
  text-shadow: 0 0.3cqh 0.65cqh #721100;
}
.summary-total {
  top: 27%;
  left: 39%;
  width: 24%;
}
.summary-unit {
  width: 22%;
}
.summary-city {
  top: 62%;
  left: 22%;
}
.summary-one {
  left: 40%;
  top: 68%;
}
.summary-two {
  left: 58%;
  top: 57%;
}
.summary-total span,
.summary-unit span {
  font-size: 4.6cqh;
  white-space: nowrap;
  max-width: 100%;
  line-height: 1.15;
}
.summary-total strong,
.summary-unit strong {
  font-family: var(--sans);
  font-weight: 700;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  font-size: 6.6cqh;
  max-width: 100%;
  line-height: 1.15;
}
.summary-total strong {
  font-size: 7.6cqh;
}
.control-shell {
  max-width: 780px;
  margin: 0 auto;
  padding: 35px 24px;
}
.control-shell h1 {
  font-size: 24px;
  font-weight: 500;
}
.control-phase {
  display: inline-block;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 20px;
  color: #ffe2a8;
  font-size: 13px;
}
.control-total {
  display: grid;
  gap: 14px;
  margin: 32px 0;
}
.control-total > span {
  color: var(--muted);
}
.control-total strong {
  font-size: clamp(24px, 5vw, 42px);
  font-family: Georgia, serif;
  overflow-wrap: anywhere;
}
.control-units {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}
.control-units > div {
  display: grid;
  gap: 9px;
  min-width: 0;
}
.control-units span {
  color: var(--muted);
  font-size: 13px;
}
.control-units strong {
  font-size: 16px;
  overflow-wrap: anywhere;
}
.control-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.control-links {
  border-top: 1px solid var(--line);
  padding-top: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 12px;
}
.control-links .text-button {
  margin-left: auto;
}
.import-card {
  grid-column: 2;
}
.settings-card {
  grid-row: span 2;
}
.records-card {
  grid-column: 2;
  min-width: 0;
  overflow-x: auto;
}
.import-help {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.8;
}
.import-card h2 {
  font-size: 16px;
  font-weight: 500;
  margin: 0;
}
.import-card .records-header a {
  font-size: 12px;
}
#import-form {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
#import-form label {
  flex-basis: 100%;
  margin-top: 10px;
}
#import-file {
  font-size: 12px;
  min-width: 0;
  max-width: 100%;
}
.table-scroll {
  max-height: 320px;
  overflow: auto;
  margin: 15px 0;
}
.table-scroll thead {
  position: sticky;
  top: 0;
  background: #6b150f;
}
.record-unit {
  max-width: 115px;
  padding: 7px;
  background: #4c0a08;
  color: #ffe3b4;
  border: 1px solid var(--line);
  border-radius: 5px;
  font-size: 12px;
}
@media (prefers-reduced-motion: reduce) {
  .wall-card {
    transition: none;
  }
}
@media (max-width: 720px) {
  .admin-grid {
    grid-template-columns: 1fr;
  }
  .settings-card,
  .import-card,
  .records-card {
    grid-column: 1;
    grid-row: auto;
  }
  .control-units {
    grid-template-columns: 1fr;
  }
  .control-units > div {
    grid-template-columns: 90px 1fr;
  }
  .control-actions {
    grid-template-columns: 1fr;
  }
  .control-actions .danger-button {
    min-height: 48px;
  }
}
.mobile-shell {
  max-width: 440px;
  margin: auto;
  padding: 29px 24px 25px;
}
.mobile-heading {
  margin: 0 0 24px;
}
.mobile-heading p {
  margin: 0 0 8px;
  font-size: 14px;
  color: #ffdfb0;
}
.mobile-heading h1 {
  margin: 0;
  font-size: 28px;
  font-weight: 500;
}
.form-card {
  padding: 24px 22px;
  background: linear-gradient(145deg, #831610, #4a0a08);
  border: 1px solid #efbb685c;
  border-radius: 17px;
}
.avatar-upload {
  margin: 0 auto 24px;
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  border: 0;
  background: transparent;
  position: relative;
  cursor: pointer;
}
.avatar-upload .avatar {
  width: 72px;
  height: 72px;
  border: 1px solid #b58a4666;
  background: #9b351b;
  font-size: 25px;
}
.avatar-upload > span:last-child {
  font-size: 11px;
  color: #bca684;
}
.avatar-upload .avatar-edit {
  position: absolute;
  top: 52px;
  left: calc(50% + 16px);
  background: #dbb777;
  width: 23px;
  height: 23px;
  border-radius: 50%;
  border: 3px solid #272118;
  color: #32230f;
  text-align: center;
  line-height: 17px;
  font-size: 13px;
}
.field-label {
  display: block;
  font-size: 12px;
  color: #cebd9f;
  letter-spacing: 1px;
  margin: 21px 0 9px;
}
.input-wrap {
  position: relative;
}
.input-wrap > span {
  position: absolute;
  left: 14px;
  top: 13px;
  color: #d7b67b;
  font-size: 18px;
}
.field-input {
  width: 100%;
  height: 48px;
  color: #f2e8d6;
  background: #2d050780;
  border: 1px solid #76604455;
  border-radius: 8px;
  padding: 0 13px;
  outline: none;
  font-size: 15px;
}
.field-input:focus {
  border-color: #d0a663;
}
.field-input::placeholder {
  color: #b99b87;
  font-size: 13px;
}
.amount-input {
  padding-left: 36px;
  font-family: Georgia, serif;
  font-size: 22px;
}
.field-hint {
  font-size: 10px;
  color: #d5b79d;
  line-height: 1.7;
  margin: 10px 0 0;
}
.consent {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 11px;
  color: #e4c4a7;
  line-height: 1.8;
  margin: 22px 0 16px;
  cursor: pointer;
}
.consent input {
  accent-color: #dfbd7f;
  margin: 3px 0 0;
  flex-shrink: 0;
  width: 15px;
  height: 15px;
}
.primary-button {
  width: 100%;
  border: 1px solid #ebc98c;
  border-radius: 8px;
  background: linear-gradient(110deg, #e8c98b, #cfaa68);
  color: #322410;
  font-weight: 600;
  height: 48px;
  letter-spacing: 2px;
  font-size: 14px;
}
.secondary-button {
  border: 1px solid #8b714b70;
  color: #d6bd94;
  border-radius: 8px;
  background: transparent;
  padding: 11px 20px;
  font-size: 12px;
}
.form-error {
  font-size: 12px;
  color: #ffb29f;
  line-height: 1.7;
  margin: 13px 0 0;
  min-height: 0;
}
.success-card {
  text-align: center;
  padding: 36px 22px;
  container-type: inline-size;
}
.success-icon {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  border: 1px solid #a7874e;
  border-radius: 50%;
  color: #eac988;
  margin: 0 auto 22px;
  font-size: 27px;
  background: #ac83471a;
}
.success-card h2 {
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 400;
  letter-spacing: 3px;
}
.success-card p {
  font-size: 12px;
  color: #ad9b7e;
  line-height: 1.8;
}
.success-amount {
  font-size: clamp(20px, 9cqi, 37px);
  white-space: nowrap;
  font-family: Georgia, serif;
  color: #ebc984;
  margin: 25px 0 10px;
}
.success-rank {
  font-size: 12px;
  color: #c1aa85;
  padding-bottom: 25px;
}
.success-card .secondary-button {
  width: 100%;
  margin-top: 15px;
}
.closed-message {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #ddc499;
  font-size: 13px;
  line-height: 1.8;
}
.admin-shell {
  max-width: 1120px;
  margin: 0 auto;
  padding: 35px 28px;
}
.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 35px;
}
.admin-header h1 {
  font-size: 22px;
  font-weight: 500;
  margin: 0;
}
.admin-links {
  display: flex;
  gap: 18px;
  align-items: center;
  font-size: 12px;
}
.login-panel {
  max-width: 380px;
  margin: 80px auto;
}
.login-panel h2 {
  font-size: 20px;
  margin: 0 0 25px;
}
.login-panel .primary-button {
  margin-top: 24px;
}
.admin-grid {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 24px;
  align-items: start;
}
.settings-card h2,
.records-header h2 {
  font-size: 16px;
  font-weight: 500;
  margin: 0;
}
.settings-card .primary-button {
  margin-top: 20px;
}
.settings-card .field-input {
  font-size: 13px;
}
.toggle-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  margin-top: 23px;
}
.toggle-label input {
  accent-color: #dfbd7f;
  width: 19px;
  height: 19px;
}
.entry-code-card {
  display: grid;
  justify-items: start;
  gap: 12px;
  margin-top: 24px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
  font-size: 12px;
  color: #c6b494;
}
.entry-code-card img {
  width: 152px;
  height: 152px;
  border-radius: 8px;
}
.entry-code-card a {
  color: #dfbd7f;
  text-underline-offset: 4px;
}
.records-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.records-summary {
  font-size: 11px;
  color: #a18e70;
}
.record-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.record-table th {
  text-align: left;
  padding: 13px 10px;
  color: #a99472;
  font-weight: 400;
  border-bottom: 1px solid var(--line);
}
.record-table td {
  padding: 14px 10px;
  border-bottom: 1px solid #c6a66a14;
  vertical-align: middle;
}
.record-person {
  display: flex;
  align-items: center;
  gap: 9px;
}
.record-person .avatar {
  width: 27px;
  height: 27px;
  font-size: 11px;
}
.delete-button {
  border: 0;
  background: none;
  color: #c79982;
  padding: 7px;
  font-size: 11px;
}
.empty-records {
  text-align: center;
  color: #938168;
  padding: 45px 10px;
  font-size: 13px;
}
.status-text {
  font-size: 12px;
  color: #c3d2a5;
  min-height: 20px;
  line-height: 1.7;
}
.screen-size-tip {
  display: none;
}
.text-button {
  border: 0;
  background: transparent;
  color: #c7b28c;
  font-size: 12px;
}
.dialog-backdrop {
  position: fixed;
  inset: 0;
  background: #000a;
  z-index: 99;
  display: grid;
  place-items: center;
  padding: 24px;
}
.dialog-box {
  max-width: 420px;
  width: 100%;
  background: #29231c;
  border: 1px solid #b38c5144;
  border-radius: 16px;
  padding: 28px;
}
.dialog-box h3 {
  font-size: 19px;
}
.dialog-box p {
  font-size: 13px;
  color: #c7b496;
  line-height: 1.8;
  overflow-wrap: anywhere;
}
.dialog-actions {
  display: flex;
  gap: 12px;
  margin-top: 23px;
}
.dialog-actions button {
  flex: 1;
}
.danger-button {
  border: 1px solid #c38b70;
  background: #9b5e40;
  color: #fff0df;
  border-radius: 8px;
  font-size: 12px;
}
@keyframes rank-flash {
  0%,
  20% {
    box-shadow: inset 0 0 0 1px #f4ce8799;
    background-color: #d7a95833;
  }
  100% {
    box-shadow: inset 0 0 0 1px transparent;
  }
}
@keyframes rocket-flame {
  to {
    transform: scale(0.88, 1.14);
  }
}
@media (min-width: 1800px) {
  .screen-body {
    --barrage-height: 4.5833vw;
  }
  .screen-grid {
    gap: 1.3542vw;
  }
  .ranking-panel {
    padding: 1.6667vw 1.4583vw 0;
  }
  .ranking-heading h2 {
    font-size: 1.875vw;
  }
  .ranking-heading .eyebrow {
    font-size: 11px;
  }
  .rank-columns {
    font-size: 0.9375vw;
    margin: 1.1979vw 0 0.625vw;
    padding-bottom: 0.625vw;
  }
  .rank-row .rank-name {
    font-size: 1.25vw;
  }
  .rank-row .rank-amount {
    font-size: 1.4583vw;
  }
  .rank-row .avatar {
    height: min(2.3958vw, 100%);
    font-size: 1.1458vw;
  }
  .rank-row .rank-number {
    font-size: 1.1979vw;
    min-width: 1.3021vw;
  }
  .rank-row {
    gap: 0.625vw;
  }
  .ranking-list.compact .rank-name {
    font-size: 1.0417vw;
  }
  .ranking-list.compact .rank-amount {
    font-size: 1.1458vw;
  }
  .ranking-list.compact .avatar {
    height: min(1.5104vw, 100%);
  }
  .ranking-list.compact .rank-number {
    font-size: 0.9896vw;
  }
  .qr-box {
    width: 11.6667vw;
    height: 11.6667vw;
  }
  .join-card {
    min-width: 280px;
    gap: 0.8333vw;
    padding: 0.625vw 0.9896vw 0.625vw 0.625vw;
  }
  .join-card strong {
    font-size: 1.4583vw;
  }
  .join-card p {
    font-size: 1.0417vw;
  }
  .stage-bottom {
    left: 1.9792vw;
    right: 1.9792vw;
    bottom: 1.875vw;
  }
  .stage-heading {
    left: 1.9792vw;
    right: 1.9792vw;
    top: 1.7708vw;
  }
  .live-tag {
    font-size: 1.0417vw;
  }
  .stage-number {
    font-size: 1.0417vw;
  }
  .barrage {
    inset: 4.6875vw 0 16.1458vw;
  }
  .barrage-card {
    width: 28.125vw;
  }
  .barrage-card .barrage-name {
    font-size: 1.4583vw;
  }
  .barrage-card .avatar {
    width: 3.3333vw;
    height: 3.3333vw;
    font-size: 1.4063vw;
  }
  .barrage-card small {
    font-size: 0.9375vw;
  }
  .barrage-amount {
    font-size: 1.6667vw;
  }
  .stat-label {
    font-size: 1.1458vw;
  }
  .event-stats {
    gap: 1.3021vw;
    padding: 0.7292vw 0.9375vw;
  }
  .ranking-footer {
    font-size: 0.8854vw;
    padding: 0.9375vw 0;
  }
}
@media (max-width: 1100px) {
  .screen-body {
    --barrage-height: 64px;
  }
  .screen-grid {
    gap: 12px;
  }
  .screen-grid {
    grid-template-columns: minmax(0, 3fr) minmax(0, 1fr);
  }
  .ranking-panel {
    padding: 19px 12px 0;
  }
  .ranking-heading {
    flex-wrap: wrap;
  }
  .ranking-heading h2 {
    font-size: 19px;
  }
  .ranking-heading .eyebrow {
    font-size: 8px;
  }
  .rank-columns {
    font-size: 9px;
    margin-top: 14px;
  }
  .rank-row {
    gap: 5px;
    padding: 0 2px;
  }
  .rank-row .rank-name {
    font-size: 14px;
  }
  .rank-row .rank-amount {
    font-size: 15px;
  }
  .rank-row .avatar {
    height: min(23px, 100%);
    font-size: 10px;
  }
  .rank-row .rank-number {
    min-width: 13px;
    font-size: 10px;
  }
  .rank-switch button {
    padding: 3px 6px;
  }
  .ranking-footer {
    font-size: 8px;
    letter-spacing: 0;
  }
  .stage-bottom {
    left: 20px;
    right: 20px;
    bottom: 20px;
    gap: 10px;
  }
  .qr-box {
    width: 128px;
    height: 128px;
  }
  .join-card {
    min-width: 190px;
    padding: 8px;
    gap: 10px;
  }
  .join-card strong {
    font-size: 16px;
  }
  .join-card p {
    font-size: 12px;
  }
  .event-stats {
    gap: 12px;
    align-items: flex-start;
    flex-direction: column;
  }
  .event-stats .stats-divider {
    display: none;
  }
  .stat-label {
    font-size: 13px;
  }
  .event-stats strong {
    font-size: 24px;
  }
  .barrage {
    inset: 68px 0 188px;
  }
  .barrage-card {
    width: 360px;
  }
  .barrage-card .avatar {
    width: 44px;
    height: 44px;
  }
  .barrage-card .barrage-name {
    font-size: 18px;
  }
  .barrage-amount {
    font-size: 22px;
  }
  .stage-heading {
    left: 20px;
    right: 20px;
  }
  .stage-number {
    font-size: 12px;
  }
  .ranking-list.compact .avatar {
    height: min(17px, 100%);
    font-size: 8px;
  }
  .ranking-list.compact .rank-name {
    font-size: 12px;
  }
  .ranking-list.compact .rank-amount {
    font-size: 13px;
  }
}
@media (max-height: 680px) {
  .rank-columns {
    margin-top: 13px;
    margin-bottom: 7px;
  }
  .ranking-footer {
    padding: 12px 0;
  }
  .ranking-list.compact .avatar {
    display: none;
  }
  .ranking-list.compact .rank-name {
    font-size: 10px;
  }
  .ranking-list.compact .rank-amount {
    font-size: 10px;
  }
}
@media (max-width: 720px) {
  .admin-shell {
    padding: 24px 16px;
  }
  .admin-header {
    align-items: flex-start;
  }
  .admin-header h1 {
    font-size: 18px;
  }
  .admin-links {
    flex-wrap: wrap;
    gap: 10px;
  }
  .admin-grid {
    grid-template-columns: 1fr;
  }
  .record-table th,
  .record-table td {
    padding: 12px 5px;
  }
  .record-person {
    gap: 5px;
  }
  .records-card {
    padding: 20px 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
