:root {
  --bg: #07101f;
  --panel: rgba(16, 29, 52, .84);
  --line: rgba(255, 255, 255, .09);
  --text: #f5f7fb;
  --muted: #91a0b7;
  --primary: #6d7cff;
  --purple: #9e6dff;
  --cyan: #38d9c9;
  --danger: #ff6b7a;
  --shadow: 0 24px 70px rgba(0, 0, 0, .25);
}

* { box-sizing: border-box; }
html { color-scheme: dark; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, system-ui, -apple-system, "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 0, rgba(109, 124, 255, .18), transparent 34rem),
    radial-gradient(circle at 100% 35%, rgba(56, 217, 201, .11), transparent 32rem),
    var(--bg);
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
textarea { resize: vertical; }

.ambient {
  position: fixed;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  filter: blur(90px);
  opacity: .15;
  pointer-events: none;
  z-index: -1;
}
.ambient-a { left: -140px; top: -140px; background: var(--primary); }
.ambient-b { right: -160px; top: 38%; background: var(--cyan); }

.top {
  width: min(1180px, calc(100% - 32px));
  min-height: 82px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand { display: inline-flex; align-items: center; gap: 12px; min-width: 0; }
.brand > span:last-child { display: grid; min-width: 0; }
.brand strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand small { color: var(--muted); font-size: 9px; letter-spacing: .16em; }
.brand-mark {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  overflow: hidden;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--primary), var(--purple));
  font-size: 22px;
  font-weight: 900;
  box-shadow: 0 12px 30px rgba(109, 124, 255, .25);
}
.brand-mark img { width: 100%; height: 100%; object-fit: cover; }

.outline {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .04);
  padding: 10px 15px;
  border-radius: 12px;
}
.outline:hover { background: rgba(255, 255, 255, .08); }
.small-button { padding: 8px 11px; }
.header-actions { display: flex; gap: 8px; }

.wrap { width: min(1120px, calc(100% - 32px)); margin: 48px auto 80px; }
.hero { display: flex; justify-content: space-between; align-items: end; gap: 25px; }
.eyebrow { margin: 0 0 10px; color: var(--cyan); font-size: 11px; font-weight: 800; letter-spacing: .2em; }
.hero h1, .heading h1, .auth-card h1 { margin: 0; }
.hero h1 { max-width: 780px; font-size: clamp(40px, 7vw, 72px); line-height: 1.04; letter-spacing: -.05em; }
.hero > div > p:not(.eyebrow) { color: var(--muted); line-height: 1.8; max-width: 760px; }
.competition-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.competition-meta span { border: 1px solid var(--line); border-radius: 999px; padding: 7px 10px; color: var(--muted); font-size: 12px; }
.live {
  white-space: nowrap;
  color: #b7fff4;
  border: 1px solid rgba(56, 217, 201, .25);
  background: rgba(56, 217, 201, .08);
  padding: 10px 14px;
  border-radius: 999px;
}
.live i { display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: currentColor; }
.live-connected i { box-shadow: 0 0 0 6px rgba(56, 217, 201, .11); }
.live-connecting { color: #ffd993; border-color: rgba(255, 217, 147, .3); background: rgba(255, 217, 147, .08); }
.live-fallback { color: #b8c1d4; }

.tabs { display: flex; gap: 9px; overflow-x: auto; margin: 34px 0 25px; scrollbar-width: none; }
.tab-button {
  white-space: nowrap;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .035);
  padding: 10px 17px;
  border-radius: 11px;
  color: var(--muted);
}
.tab-button.active, .primary {
  border: 0;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--purple));
  font-weight: 800;
}

.podium { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; align-items: end; margin-bottom: 18px; }
.podium-card, .panel {
  border: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: blur(18px);
  border-radius: 22px;
  box-shadow: var(--shadow);
}
.podium-card { min-height: 150px; padding: 22px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.podium-card strong { margin: 9px 0 4px; }
.podium-card b { color: var(--cyan); }
.podium-card small { color: var(--muted); margin-top: 8px; }
.podium-1 { min-height: 188px; border-color: rgba(255, 215, 100, .28); }
.podium-medal { font-size: 30px; }

.ranking { padding: 24px; }
.panel-head, .card-head, .heading { display: flex; justify-content: space-between; align-items: center; gap: 18px; }
.panel-head h2, .card-head h3 { margin: 0; }
.panel-head small, .card-head small, .heading small { color: var(--muted); }
.rank-list, .manage { display: grid; gap: 9px; margin-top: 18px; }
.rank-row {
  display: grid;
  grid-template-columns: 60px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255, 255, 255, .025);
}
.rank-1 { border-color: rgba(255, 215, 100, .25); }
.rank-2 { border-color: rgba(190, 205, 225, .22); }
.rank-3 { border-color: rgba(219, 146, 88, .22); }
.rank-number { text-align: center; font-size: 20px; font-weight: 900; }
.rank-person { display: flex; align-items: center; gap: 12px; min-width: 0; }
.rank-person > div { min-width: 0; }
.rank-person strong, .rank-person small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-person small, .manage-row small, .preview-row small, .log-row small { color: var(--muted); margin-top: 4px; }
.avatar {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: linear-gradient(135deg, rgba(109, 124, 255, .35), rgba(56, 217, 201, .2));
  font-weight: 900;
}
.avatar.small { width: 38px; height: 38px; }
.rank-score strong { font-size: 23px; }
.rank-score span { margin-left: 5px; color: var(--muted); }
.empty, .empty-admin { padding: 42px 20px; text-align: center; color: var(--muted); }
.empty strong, .empty span { display: block; }
.empty span { margin-top: 8px; }
footer {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto 28px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  gap: 15px;
  font-size: 13px;
}

.auth-page { display: grid; place-items: center; }
.auth-shell { width: min(430px, calc(100% - 32px)); padding: 45px 0; }
.auth-brand { margin-bottom: 20px; }
.auth-card { padding: 30px; }
.auth-card > p:not(.eyebrow) { color: var(--muted); line-height: 1.7; }
.form { display: grid; gap: 17px; }
.auth-card .form { margin-top: 24px; }
label { display: grid; gap: 8px; font-size: 13px; color: #cbd5e3; }
input, select, textarea {
  width: 100%;
  min-height: 45px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .04);
  border-radius: 11px;
  padding: 10px 12px;
  outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(109, 124, 255, .12); }
.primary { min-height: 45px; border-radius: 11px; }
.back-link { display: inline-block; margin-top: 18px; color: var(--muted); }

.admin-top { width: calc(100% - 40px); max-width: none; border-bottom: 1px solid var(--line); }
.admin-shell { display: grid; grid-template-columns: 210px minmax(0, 1fr); min-height: calc(100vh - 82px); }
.admin-nav { padding: 24px 16px; border-right: 1px solid var(--line); display: grid; align-content: start; gap: 7px; }
.admin-nav button { border: 0; background: transparent; color: var(--muted); text-align: left; padding: 12px; border-radius: 10px; }
.admin-nav button.active { color: #fff; background: rgba(109, 124, 255, .15); }
.admin-main { padding: 34px; min-width: 0; }
.admin-page { display: none; }
.admin-page.active { display: block; }
.heading { align-items: end; margin-bottom: 22px; }
.heading h1 { font-size: clamp(28px, 4vw, 42px); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 13px; margin-bottom: 17px; }
.stat-card { border: 1px solid var(--line); background: var(--panel); border-radius: 17px; padding: 19px; display: grid; gap: 7px; }
.stat-card span, .stat-card small { color: var(--muted); }
.stat-card strong { font-size: 32px; }
.note, .form, .admin-main .panel { padding: 21px; }
.note p { color: var(--muted); line-height: 1.8; }
.cols { display: grid; grid-template-columns: minmax(270px, .75fr) minmax(0, 1.6fr); gap: 17px; align-items: start; }
.form h3 { margin: 0; }
.label { font-size: 13px; color: #cbd5e3; }
.checks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 9px; }
.check-option { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 10px; padding: 9px; background: rgba(255, 255, 255, .025); }
.check-option input { width: auto; min-height: 0; }
.manage-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.row-actions button, .quick-score button {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .04);
  border-radius: 8px;
  padding: 7px 9px;
}
.danger-text { color: var(--danger); }
.participant-row { grid-template-columns: minmax(0, 1fr) auto auto; }
.participant-main { display: flex; align-items: center; gap: 10px; min-width: 0; }
.participant-main > div { min-width: 0; }
.participant-main strong, .participant-main small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.participant-score { color: var(--cyan); white-space: nowrap; }
.score-cols { display: grid; grid-template-columns: minmax(300px, 1fr) minmax(240px, .8fr); gap: 17px; }
.quick-score { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.current-score { display: grid; place-items: center; align-content: center; text-align: center; min-height: 270px; }
.current-score > b { font-size: 62px; }
.current-score > span { color: var(--muted); }
.preview-row { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px; border-bottom: 1px solid var(--line); }
.preview-row > b { text-align: center; font-size: 20px; }
.preview-row em { font-style: normal; font-weight: 900; }
.log-row { display: grid; grid-template-columns: minmax(0, 1fr) 80px 130px; align-items: center; gap: 12px; padding: 12px; border-bottom: 1px solid var(--line); }
.log-row > span { color: var(--muted); text-align: right; }
.delta-plus { color: #6ff0c9; }
.delta-minus { color: var(--danger); }
.delta-neutral { color: #8eb6ff; }
.muted-text, .setting-note { color: var(--muted); font-size: 13px; line-height: 1.7; }
.settings-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(300px, .8fr); gap: 17px; align-items: start; }
.form-two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.logo-setting { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 14px; align-items: center; }
.logo-setting > div:last-child { display: grid; gap: 8px; align-items: start; }
.logo-setting small { color: var(--muted); }
.logo-preview { width: 88px; height: 88px; border: 1px solid var(--line); border-radius: 20px; overflow: hidden; display: grid; place-items: center; background: linear-gradient(135deg, var(--primary), var(--purple)); font-size: 34px; font-weight: 900; }
.logo-preview img { width: 100%; height: 100%; object-fit: cover; }
.file-button { display: inline-flex; align-items: center; justify-content: center; width: max-content; min-height: 39px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255, 255, 255, .04); cursor: pointer; }
.file-button input { display: none; }
.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 20px; background: rgba(0, 0, 0, .65); backdrop-filter: blur(8px); }
.modal-card { width: min(500px, 100%); background: #101d34 !important; }
.modal-card .primary { margin-top: 12px; }
.modal-close { border: 0; background: transparent; font-size: 28px; }
.hidden { display: none !important; }
.toast-wrap { position: fixed; right: 18px; bottom: 18px; z-index: 99; display: grid; gap: 8px; }
.toast { min-width: 240px; max-width: min(380px, calc(100vw - 36px)); padding: 12px 15px; border: 1px solid var(--line); border-radius: 11px; background: #15233d; opacity: 0; transform: translateY(10px); transition: .2s; box-shadow: var(--shadow); }
.toast.show { opacity: 1; transform: none; }
.toast-success { border-color: rgba(56, 217, 201, .4); }
.toast-error { border-color: rgba(255, 107, 122, .4); }

@media (max-width: 980px) {
  .admin-shell { grid-template-columns: 1fr; }
  .admin-nav { position: sticky; top: 0; z-index: 10; display: flex; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 10px; background: rgba(7, 16, 31, .95); }
  .admin-nav button { white-space: nowrap; }
  .cols, .score-cols, .settings-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 680px) {
  .top { width: calc(100% - 24px); min-height: 72px; }
  .wrap { width: calc(100% - 24px); margin-top: 28px; }
  .hero { display: block; }
  .live { display: inline-block; margin-top: 16px; }
  .podium { grid-template-columns: 1fr; }
  .podium-card, .podium-1 { min-height: auto; }
  .ranking { padding: 15px; }
  .panel-head { align-items: flex-start; flex-direction: column; }
  .rank-row { grid-template-columns: 42px minmax(0, 1fr) auto; padding: 10px; gap: 8px; }
  .rank-score strong { font-size: 19px; }
  footer { flex-direction: column; gap: 6px; }
  .admin-main { padding: 22px 12px; }
  .participant-row { grid-template-columns: minmax(0, 1fr) auto; }
  .participant-row .row-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .checks, .form-two { grid-template-columns: 1fr; }
  .quick-score { grid-template-columns: repeat(2, 1fr); }
  .log-row { grid-template-columns: minmax(0, 1fr) auto; }
  .log-row > span { grid-column: 1 / -1; text-align: left; }
  .header-actions .outline:first-child { display: none; }
}


/* 动态文案加载前隐藏，避免刷新时旧文案闪现 */
.settings-loading #hero-title,
.settings-loading #hero-description,
.settings-loading #competition-meta,
.settings-loading #end-countdown {
  visibility: hidden;
}

/* 首页结束倒计时 */
.end-countdown {
  width: fit-content;
  max-width: 100%;
  margin-top: 18px;
  padding: 14px 16px;
  border: 1px solid rgba(109, 124, 255, .26);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(109, 124, 255, .10), rgba(56, 217, 201, .06));
  box-shadow: 0 14px 40px rgba(0, 0, 0, .14);
}
.countdown-title { display: block; margin-bottom: 9px; color: var(--muted); font-size: 12px; }
.countdown-grid { display: grid; grid-template-columns: repeat(4, minmax(48px, 1fr)); gap: 8px; }
.countdown-grid b { min-width: 54px; padding: 8px 9px; border: 1px solid var(--line); border-radius: 11px; background: rgba(255,255,255,.035); text-align: center; }
.countdown-grid strong { display: block; color: var(--text); font-size: 22px; line-height: 1; font-variant-numeric: tabular-nums; }
.countdown-grid small { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; }
.end-countdown.countdown-finished { border-color: rgba(255,107,122,.28); background: rgba(255,107,122,.07); }
.end-countdown.countdown-finished .countdown-title { color: #ff9ba6; }
@media (max-width: 520px) {
  .end-countdown { width: 100%; }
  .countdown-grid { gap: 6px; }
  .countdown-grid b { min-width: 0; padding: 8px 5px; }
  .countdown-grid strong { font-size: 19px; }
}


/* 主页美化优化：保留原风格，只调整层级与布局 */
.wrap {
  margin-top: 32px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(330px, .75fr);
  align-items: end;
  gap: 34px;
  min-height: 310px;
}

.hero-info {
  min-width: 0;
  padding-bottom: 4px;
}

.hero h1 {
  max-width: 700px;
  font-size: clamp(42px, 5.3vw, 60px);
  line-height: 1.06;
}

.hero-info > p:not(.eyebrow) {
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.75;
  max-width: 700px;
}

.hero-status {
  display: grid;
  gap: 14px;
  justify-items: stretch;
  align-content: end;
}

.hero-status .live {
  justify-self: end;
}

.leaderboard-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin: 34px 0 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.leaderboard-heading h2 {
  margin: 0;
  font-size: 25px;
}

.leaderboard-heading > span {
  color: var(--muted);
  font-size: 13px;
}

.end-countdown {
  width: 100%;
  margin-top: 0;
  padding: 17px 18px;
}

.countdown-title {
  margin-bottom: 11px;
  color: #b9c6da;
  font-weight: 700;
}

.countdown-grid {
  grid-template-columns: repeat(4, minmax(58px, 1fr));
  gap: 9px;
}

.countdown-grid b {
  min-width: 0;
  padding: 11px 8px;
}

.countdown-grid strong {
  font-size: 25px;
}

.podium {
  gap: 16px;
  margin-bottom: 22px;
}

.podium-card {
  min-height: 168px;
  padding: 24px 22px;
  overflow: hidden;
}

.podium-card strong {
  font-size: 17px;
}

.podium-card b {
  margin-top: 2px;
  font-size: 18px;
}

.podium-card small {
  display: -webkit-box;
  width: 100%;
  max-width: 300px;
  min-height: 38px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-height: 1.55;
  text-overflow: ellipsis;
}

.podium-1 {
  min-height: 208px;
  border-color: rgba(255, 215, 100, .42);
  background:
    radial-gradient(circle at 50% 0, rgba(255, 215, 100, .13), transparent 62%),
    var(--panel);
  box-shadow:
    0 24px 70px rgba(0, 0, 0, .25),
    0 0 34px rgba(255, 215, 100, .07);
}

.podium-1 .podium-medal {
  transform: scale(1.12);
}

.podium-1 b {
  font-size: 22px;
}

.ranking {
  margin-top: 0;
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: 0;
    gap: 24px;
  }

  .hero-status {
    max-width: 520px;
  }

  .hero-status .live {
    justify-self: start;
  }
}

@media (max-width: 680px) {
  .wrap {
    margin-top: 22px;
  }

  .hero {
    display: grid;
    gap: 20px;
  }

  .hero h1 {
    font-size: clamp(38px, 12vw, 50px);
  }

  .hero-status {
    max-width: none;
  }

  .hero-status .live {
    margin-top: 0;
  }

  .leaderboard-heading {
    margin-top: 28px;
  }

  .podium-card,
  .podium-1 {
    min-height: auto;
  }

  .podium-card small {
    max-width: none;
  }
}

@media (max-width: 520px) {
  .countdown-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .countdown-grid strong {
    font-size: 21px;
  }
}


/* 分数与排名显示控制 */
.display-control-form {
  max-width: 760px;
  padding: 24px;
}

.display-mode-options {
  display: grid;
  gap: 12px;
  margin: 6px 0 4px;
}

.display-mode-card {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, .025);
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}

.display-mode-card:hover {
  border-color: rgba(109, 124, 255, .48);
  background: rgba(109, 124, 255, .07);
  transform: translateY(-1px);
}

.display-mode-card:has(input:checked) {
  border-color: rgba(109, 124, 255, .72);
  background: linear-gradient(135deg, rgba(109, 124, 255, .14), rgba(56, 217, 201, .05));
  box-shadow: 0 0 0 3px rgba(109, 124, 255, .08);
}

.display-mode-card input {
  width: 18px;
  min-height: 18px;
  margin: 2px 0 0;
  accent-color: var(--primary);
}

.display-mode-card > span {
  display: grid;
  gap: 6px;
}

.display-mode-card strong {
  color: var(--text);
  font-size: 15px;
}

.display-mode-card small {
  color: var(--muted);
  line-height: 1.6;
}

.display-extra-toggle {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  margin: 10px 0 6px;
  padding: 16px;
  border: 1px solid rgba(56, 217, 201, .24);
  border-radius: 14px;
  background: rgba(56, 217, 201, .045);
  cursor: pointer;
}

.display-extra-toggle input {
  width: 18px;
  min-height: 18px;
  margin: 2px 0 0;
  accent-color: var(--cyan);
}

.display-extra-toggle > span { display: grid; gap: 6px; }
.display-extra-toggle strong { color: var(--text); font-size: 15px; }
.display-extra-toggle small { color: var(--muted); line-height: 1.6; }

.score-concealed {
  color: var(--muted) !important;
  font-size: 13px !important;
  font-weight: 700;
  letter-spacing: .04em;
}

.rank-public-list {
  grid-template-columns: minmax(0, 1fr);
  padding-left: 18px;
  padding-right: 18px;
}

.rank-public-list .rank-person {
  width: 100%;
}

@media (max-width: 680px) {
  .display-control-form {
    padding: 18px;
  }

  .display-mode-card {
    padding: 14px;
  }
}


/* 快速点选加分 */
.score-tap-panel {
  display: grid;
  gap: 18px;
  padding: 24px;
}

.score-tap-head {
  margin-bottom: 0;
}

.score-heading-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 9px;
}

.scoring-state {
  padding: 8px 11px;
  border: 1px solid rgba(56, 217, 201, .34);
  border-radius: 999px;
  background: rgba(56, 217, 201, .08);
  color: #65e5d6;
  font-size: 12px;
  font-weight: 800;
}

.scoring-state.is-disabled {
  border-color: rgba(255, 107, 122, .34);
  background: rgba(255, 107, 122, .07);
  color: #ff9ba6;
}

.score-mode-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(88px, .72fr)) minmax(190px, 1.35fr);
  gap: 10px;
}

.score-preset {
  min-height: 68px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, .025);
  transition: border-color .18s ease, background .18s ease, transform .18s ease, box-shadow .18s ease;
}

.score-preset {
  color: var(--text);
  font-size: 22px;
  font-weight: 800;
  cursor: pointer;
}

.score-preset:hover {
  transform: translateY(-1px);
  border-color: rgba(109, 124, 255, .5);
}

.score-preset.active {
  border-color: rgba(109, 124, 255, .8);
  background: linear-gradient(135deg, rgba(109, 124, 255, .18), rgba(56, 217, 201, .07));
  box-shadow: 0 0 0 3px rgba(109, 124, 255, .08);
}

.manual-score-choice {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 68px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, .025);
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.manual-score-choice > span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.manual-score-choice input {
  min-width: 0;
  height: 44px;
  margin: 0;
  padding: 8px 10px;
  text-align: center;
  font-size: 16px;
  font-weight: 800;
}

.manual-score-choice:focus-within,
.manual-score-choice.active {
  border-color: rgba(56, 217, 201, .62);
  background: rgba(56, 217, 201, .065);
  box-shadow: 0 0 0 3px rgba(56, 217, 201, .07);
}

.manual-score-choice input[aria-invalid="true"] {
  border-color: rgba(255, 107, 122, .72);
}

.score-choice-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid rgba(56, 217, 201, .18);
  border-radius: 13px;
  background: rgba(56, 217, 201, .045);
}

.score-choice-bar > div {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.score-choice-bar span,
.score-choice-bar small {
  color: var(--muted);
  font-size: 12px;
}

.score-choice-bar strong {
  color: #56dfcf;
  font-size: 18px;
}

.batch-score-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(109, 124, 255, .22);
  border-radius: 14px;
  background: rgba(109, 124, 255, .045);
}

.batch-score-form > div { display: grid; gap: 8px; }
.batch-score-form label { color: var(--text); font-size: 14px; font-weight: 800; }
.batch-score-form input { margin: 0; }
.batch-score-form small { color: var(--muted); line-height: 1.55; }
.batch-score-form button { min-width: 190px; padding: 10px 16px; }
.group-create-stack { display: grid; gap: 17px; }
.form-help { display: block; color: var(--muted); line-height: 1.55; }

.score-tap-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.score-tap-group {
  display: grid;
  gap: 6px;
  min-height: 78px;
  padding: 14px 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, .025);
  color: var(--text);
  text-align: center;
  cursor: pointer;
  transition: transform .15s ease, border-color .15s ease, background .15s ease, box-shadow .15s ease;
}

.score-tap-group:hover:not(:disabled) {
  transform: translateY(-2px);
  border-color: rgba(109, 124, 255, .58);
  background: rgba(109, 124, 255, .08);
}

.score-tap-group:active:not(:disabled) {
  transform: translateY(0) scale(.985);
}

.score-tap-group strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
}

.score-tap-group small {
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
}

.score-tap-group.is-working {
  opacity: .68;
  cursor: wait;
}

.score-tap-group.is-success {
  animation: scoreSuccessFade 5s ease-out forwards;
}

.score-tap-group.is-success strong,
.score-tap-group.is-success small {
  animation: scoreSuccessTextFade 5s ease-out forwards;
}

.score-tap-group:disabled:not(.is-working) {
  opacity: .48;
  cursor: not-allowed;
}

@keyframes scoreSuccessFade {
  0% {
    border-color: rgba(56, 217, 201, .9);
    background: rgba(56, 217, 201, .28);
    box-shadow: 0 0 0 4px rgba(56, 217, 201, .12);
  }
  35% {
    border-color: rgba(56, 217, 201, .64);
    background: rgba(56, 217, 201, .16);
    box-shadow: 0 0 0 3px rgba(56, 217, 201, .07);
  }
  100% {
    border-color: var(--line);
    background: rgba(255, 255, 255, .025);
    box-shadow: none;
  }
}

@keyframes scoreSuccessTextFade {
  0%, 35% { color: #65e5d6; }
  100% { color: var(--text); }
}

/* 分组记录 */
.log-panel {
  padding: 20px;
}

.log-filter-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.log-filter-head > div {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.log-filter-head strong {
  font-size: 17px;
}

.log-filter-head small {
  color: var(--muted);
}

.log-group-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-bottom: 16px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.log-group-filter button {
  min-width: 56px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .025);
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
}

.log-group-filter button:hover,
.log-group-filter button.active {
  border-color: rgba(109, 124, 255, .62);
  background: rgba(109, 124, 255, .12);
  color: var(--text);
}

.log-manage {
  margin-top: 0;
}

@media (max-width: 980px) {
  .score-tap-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .score-mode-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .score-tap-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .score-choice-bar {
    align-items: flex-start;
    flex-direction: column;
  }

  .batch-score-form {
    grid-template-columns: 1fr;
  }

  .batch-score-form button { width: 100%; }
}

@media (max-width: 520px) {
  .score-tap-panel,
  .log-panel {
    padding: 16px;
  }

  .score-preset {
    min-height: 60px;
  }

  .score-mode-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .score-heading-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .score-tap-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .score-tap-group {
    min-height: 70px;
  }
}

.danger-zone {
  grid-column: 1 / -1;
  border-color: rgba(255, 107, 122, .3) !important;
  background: rgba(255, 107, 122, .035) !important;
}

.danger-zone .card-head h3,
.danger-zone .card-head small { color: #ff9ba6; }

.danger-button {
  min-height: 45px;
  border: 1px solid rgba(255, 107, 122, .55);
  border-radius: 11px;
  background: rgba(255, 107, 122, .12);
  color: #ffb2ba;
  font-weight: 800;
}

.danger-button:hover { background: rgba(255, 107, 122, .2); }
.danger-button:disabled { opacity: .55; cursor: wait; }


/* =========================================================
   最终排名逐个揭榜
   ========================================================= */
.final-stage {
  margin: 30px 0 22px;
}

.final-stage-status {
  position: relative;
  overflow: hidden;
  padding: 42px 28px;
  border: 1px solid rgba(109, 124, 255, .28);
  border-radius: 24px;
  background:
    radial-gradient(circle at 50% 0, rgba(109, 124, 255, .16), transparent 58%),
    linear-gradient(135deg, rgba(13, 28, 52, .92), rgba(8, 21, 39, .92));
  text-align: center;
  box-shadow: var(--shadow);
}

.final-stage-icon {
  display: block;
  margin-bottom: 12px;
  font-size: 36px;
  line-height: 1;
}

.final-stage-status h2 {
  margin: 5px 0 9px;
  font-size: clamp(28px, 4vw, 44px);
}

.final-stage-status > p:not(.eyebrow) {
  max-width: 650px;
  margin: 0 auto;
  color: var(--muted);
  line-height: 1.75;
}

.final-stage-status > small {
  display: block;
  margin-top: 14px;
  color: #9fb0ca;
}

.final-reveal-list {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.final-reveal-card {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  min-height: 150px;
  padding: 24px 28px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background:
    radial-gradient(circle at 12% 50%, rgba(109, 124, 255, .12), transparent 38%),
    var(--panel);
  box-shadow: var(--shadow);
  animation: finalRevealIn .42s ease both;
}

.final-rank-1 {
  border-color: rgba(255, 215, 100, .52);
  background:
    radial-gradient(circle at 12% 50%, rgba(255, 215, 100, .15), transparent 40%),
    var(--panel);
}

.final-rank-2 { border-color: rgba(203, 216, 236, .32); }
.final-rank-3 { border-color: rgba(219, 146, 88, .32); }

.final-reveal-rank {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding-right: 18px;
  border-right: 1px solid var(--line);
}

.final-reveal-rank span { font-size: 38px; line-height: 1; }
.final-reveal-rank strong { font-size: 16px; }

.final-reveal-main { min-width: 0; }
.final-reveal-main h3 { margin: 0; font-size: clamp(24px, 3.6vw, 38px); }
.final-reveal-main b { display: block; margin-top: 8px; color: var(--cyan); font-size: 22px; }
.final-reveal-main small {
  display: block;
  margin-top: 9px;
  overflow: hidden;
  color: var(--muted);
  line-height: 1.55;
  text-overflow: ellipsis;
}

.final-waiting {
  padding: 34px 20px;
  border: 1px dashed var(--line);
  border-radius: 18px;
  color: var(--muted);
  text-align: center;
}

@keyframes finalRevealIn {
  from { opacity: 0; transform: translateY(12px) scale(.985); }
  to { opacity: 1; transform: none; }
}

/* 后台最终揭榜控制 */
.final-admin-panel { padding: 22px; }

.final-admin-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px;
  border: 1px solid rgba(109, 124, 255, .25);
  border-radius: 16px;
  background: rgba(109, 124, 255, .06);
}

.final-admin-banner > div { min-width: 0; }
.final-admin-banner strong, .final-admin-banner small { display: block; }
.final-admin-banner strong { font-size: 18px; }
.final-admin-banner small { margin-top: 7px; color: var(--muted); line-height: 1.6; }

.final-admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 16px 0 12px;
}

.final-admin-actions button { min-height: 42px; padding: 9px 14px; border-radius: 10px; }
.final-admin-actions button:disabled, .final-admin-row button:disabled { opacity: .45; cursor: not-allowed; }
.danger-outline { border-color: rgba(255, 107, 122, .32) !important; color: #ff9ba6 !important; }

.final-admin-help {
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .025);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.final-admin-list { display: grid; gap: 9px; }

.final-admin-row {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) 110px 86px;
  align-items: center;
  gap: 14px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, .018);
}

.final-admin-row.is-revealed {
  border-color: rgba(56, 217, 201, .33);
  background: rgba(56, 217, 201, .045);
}

.final-admin-rank { display: flex; align-items: center; gap: 8px; }
.final-admin-rank b { font-size: 13px; }
.final-admin-group { min-width: 0; }
.final-admin-group strong, .final-admin-group small { display: block; }
.final-admin-group strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.final-admin-group small { margin-top: 4px; color: var(--muted); font-size: 11px; }
.final-admin-row em { color: var(--cyan); font-style: normal; font-weight: 800; text-align: right; }
.final-admin-row button { min-height: 38px; padding: 7px 10px; border-radius: 9px; }

/* 手机排行榜重新排序和紧凑化 */
@media (max-width: 680px) {
  .leaderboard-heading { margin-top: 20px; margin-bottom: 12px; }
  .podium { gap: 10px; margin-bottom: 14px; }
  .podium-1 { order: 1; }
  .podium-2 { order: 2; }
  .podium-3 { order: 3; }

  .podium-card,
  .podium-1 {
    min-height: 0;
    padding: 17px 15px;
    border-radius: 18px;
  }

  .podium-medal { font-size: 27px; }
  .podium-1 .podium-medal { transform: scale(1.06); }
  .podium-card strong { margin: 6px 0 2px; font-size: 16px; }
  .podium-card b, .podium-1 b { margin-top: 0; font-size: 19px; }
  .podium-card small {
    min-height: 0;
    margin-top: 5px;
    -webkit-line-clamp: 1;
    font-size: 12px;
  }

  .ranking { padding: 13px; }
  .rank-list { gap: 7px; }
  .rank-row { padding: 9px 10px; }

  .final-stage { margin-top: 20px; }
  .final-stage-status { padding: 30px 18px; border-radius: 19px; }
  .final-stage-icon { font-size: 31px; }
  .final-stage-status h2 { font-size: 28px; }
  .final-reveal-card {
    grid-template-columns: 92px minmax(0, 1fr);
    min-height: 118px;
    gap: 14px;
    padding: 18px 16px;
    border-radius: 18px;
  }
  .final-reveal-rank { padding-right: 12px; }
  .final-reveal-rank span { font-size: 31px; }
  .final-reveal-rank strong { font-size: 13px; }
  .final-reveal-main h3 { font-size: 24px; }
  .final-reveal-main b { margin-top: 5px; font-size: 20px; }
  .final-reveal-main small { margin-top: 6px; font-size: 11px; }

  .final-admin-row {
    grid-template-columns: 92px minmax(0, 1fr) auto;
    gap: 9px;
  }
  .final-admin-row em { text-align: left; }
  .final-admin-row button { grid-column: 1 / -1; }
}

@media (max-width: 520px) {
  .podium-card,
  .podium-1 { padding: 15px 13px; }
  .podium-medal { font-size: 25px; }
  .podium-card strong { font-size: 15px; }
  .podium-card b, .podium-1 b { font-size: 18px; }
  .final-admin-panel { padding: 16px; }
  .final-admin-banner { align-items: flex-start; flex-direction: column; }
  .final-admin-actions { display: grid; grid-template-columns: 1fr; }
}
/* =========================================================
   手机端公开排行榜 V11
   仅优化首页，不影响管理后台
   ========================================================= */
.public-home {
  --home-card: rgba(13, 29, 49, .88);
  --home-card-soft: rgba(255, 255, 255, .035);
  --home-border: rgba(170, 201, 226, .12);
  --home-accent: #43d9c6;
  --home-muted: #91a6bc;
}

.public-home .admin-entry {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
}

.public-home .admin-entry svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (max-width: 680px) {
  .public-home .leaderboard-top {
    width: calc(100% - 28px);
    min-height: 66px;
    gap: 10px;
  }

  .public-home .brand {
    flex: 1 1 auto;
    gap: 10px;
    max-width: calc(100% - 78px);
  }

  .public-home .brand-mark {
    width: 40px;
    height: 40px;
    border-radius: 12px;
  }

  .public-home .brand strong {
    display: -webkit-box;
    overflow: hidden;
    white-space: normal;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    font-size: 14px;
    line-height: 1.28;
    text-overflow: ellipsis;
  }

  .public-home .brand small {
    margin-top: 3px;
    font-size: 8px;
    letter-spacing: .12em;
  }

  .public-home .admin-entry {
    min-height: 34px;
    padding: 7px 10px;
    border-radius: 10px;
    color: #c4d0df;
    font-size: 12px;
  }

  .public-home .wrap {
    width: calc(100% - 28px);
    margin-top: 10px;
    margin-bottom: 46px;
  }

  .public-home .hero {
    display: grid;
    gap: 14px;
    padding: 20px;
    border: 1px solid var(--home-border);
    border-radius: 20px;
    background:
      radial-gradient(circle at 100% 0, rgba(67, 217, 198, .09), transparent 48%),
      var(--home-card);
    box-shadow: 0 18px 50px rgba(0, 0, 0, .18);
  }

  .public-home .hero-info {
    padding: 0;
  }

  .public-home .hero .eyebrow {
    margin-bottom: 8px;
    color: var(--home-accent);
  }

  .public-home .hero h1 {
    max-width: none;
    font-size: clamp(30px, 8.8vw, 38px);
    line-height: 1.14;
    letter-spacing: -.025em;
  }

  .public-home .hero-info > p:not(.eyebrow) {
    margin: 10px 0 0;
    color: var(--home-muted);
    font-size: 13px;
    line-height: 1.55;
  }

  .public-home .competition-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    margin-top: 14px;
  }

  .public-home .competition-meta span {
    min-width: 0;
    overflow: hidden;
    padding: 7px 9px;
    border-color: var(--home-border);
    background: var(--home-card-soft);
    font-size: 10px;
    line-height: 1.35;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .public-home .hero-status {
    display: grid;
    gap: 10px;
  }

  .public-home .hero-status .live {
    justify-self: start;
    margin: 0;
    padding: 8px 11px;
    font-size: 12px;
  }

  .public-home .end-countdown {
    padding: 12px;
    border-color: var(--home-border);
    border-radius: 15px;
    background: rgba(255, 255, 255, .025);
    box-shadow: none;
  }

  .public-home .countdown-title {
    margin-bottom: 8px;
    font-size: 11px;
  }

  .public-home .countdown-grid {
    gap: 6px;
  }

  .public-home .countdown-grid b {
    padding: 8px 4px;
    border-color: var(--home-border);
    background: rgba(255, 255, 255, .025);
  }

  .public-home .countdown-grid strong {
    font-size: 19px;
  }

  .public-home .leaderboard-heading {
    align-items: end;
    margin: 24px 0 12px;
    padding: 0 2px 11px;
  }

  .public-home .leaderboard-heading .eyebrow {
    margin-bottom: 6px;
  }

  .public-home .leaderboard-heading h2 {
    font-size: 22px;
  }

  .public-home .podium {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    align-items: stretch;
    margin-bottom: 14px;
  }

  .public-home .podium-1 { order: 1; }
  .public-home .podium-2 { order: 2; }
  .public-home .podium-3 { order: 3; }

  .public-home .podium-card,
  .public-home .podium-1 {
    justify-content: center;
    min-width: 0;
    min-height: 124px;
    padding: 13px 7px;
    border-color: var(--home-border);
    border-radius: 16px;
    background: var(--home-card);
    box-shadow: 0 12px 32px rgba(0, 0, 0, .14);
  }

  .public-home .podium-1 {
    border-color: rgba(241, 201, 91, .48);
    background:
      linear-gradient(180deg, rgba(241, 201, 91, .09), transparent 70%),
      var(--home-card);
  }

  .public-home .podium-2 { border-color: rgba(190, 205, 225, .3); }
  .public-home .podium-3 { border-color: rgba(211, 145, 91, .32); }

  .public-home .podium-medal,
  .public-home .podium-1 .podium-medal {
    font-size: 24px;
    line-height: 1;
    transform: none;
  }

  .public-home .podium-card strong {
    display: block;
    width: 100%;
    margin: 8px 0 3px;
    overflow: hidden;
    font-size: 14px;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .public-home .podium-card b,
  .public-home .podium-1 b {
    display: block;
    max-width: 100%;
    overflow: hidden;
    color: var(--home-accent);
    font-size: 16px;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .public-home .podium-card small {
    display: none;
  }

  .public-home .ranking {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
  }

  .public-home .ranking .panel-head {
    flex-direction: row;
    align-items: end;
    gap: 10px;
    padding: 0 2px 10px;
  }

  .public-home .ranking .panel-head .eyebrow {
    margin-bottom: 5px;
  }

  .public-home .ranking .panel-head h2 {
    font-size: 19px;
  }

  .public-home .ranking .panel-head > small {
    max-width: 48%;
    overflow: hidden;
    font-size: 9px;
    line-height: 1.35;
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .public-home .rank-list {
    gap: 7px;
    margin-top: 0;
  }

  .public-home .rank-row {
    grid-template-columns: 34px minmax(0, 1fr) auto;
    min-height: 58px;
    gap: 9px;
    padding: 9px 12px;
    border-color: var(--home-border);
    border-radius: 14px;
    background: var(--home-card-soft);
  }

  .public-home .rank-public-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .public-home .rank-number {
    font-size: 16px;
  }

  .public-home .rank-person {
    gap: 0;
  }

  .public-home .rank-person .avatar {
    display: none;
  }

  .public-home .rank-person strong {
    font-size: 14px;
  }

  .public-home .rank-person small {
    margin-top: 2px;
    font-size: 10px;
  }

  .public-home .rank-score {
    white-space: nowrap;
  }

  .public-home .rank-score strong {
    color: var(--text);
    font-size: 18px;
  }

  .public-home .rank-score span {
    margin-left: 3px;
    color: var(--home-muted);
    font-size: 11px;
  }

  .public-home .rank-1 { border-color: rgba(241, 201, 91, .32); }
  .public-home .rank-2 { border-color: rgba(190, 205, 225, .22); }
  .public-home .rank-3 { border-color: rgba(211, 145, 91, .24); }

  .public-home footer {
    width: calc(100% - 28px);
    margin-bottom: 22px;
    padding-top: 15px;
    font-size: 11px;
  }
}

@media (max-width: 380px) {
  .public-home .competition-meta {
    grid-template-columns: 1fr;
  }

  .public-home .podium-card,
  .public-home .podium-1 {
    min-height: 116px;
    padding-left: 5px;
    padding-right: 5px;
  }

  .public-home .podium-card strong { font-size: 13px; }
  .public-home .podium-card b,
  .public-home .podium-1 b { font-size: 14px; }
}


/* =========================================================
   公开排行榜 V12：桌面端收紧、透明 Logo 与移动端领奖台
   ========================================================= */
.public-home .leaderboard-top {
  width: min(1180px, calc(100% - 40px));
  min-height: 76px;
}

.public-home .brand-mark {
  width: 46px;
  height: 46px;
  overflow: visible;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.public-home .brand-mark > [data-logo-text] {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--primary), var(--purple));
  box-shadow: 0 12px 30px rgba(109, 124, 255, .25);
}

.public-home .brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.logo-preview img {
  padding: 5px;
  object-fit: contain;
}

.public-home .wrap {
  width: min(1180px, calc(100% - 40px));
  margin: 18px auto 64px;
}

.public-home .hero {
  display: block;
  min-height: 0;
  padding: 34px 38px;
  border: 1px solid var(--home-border);
  border-radius: 24px;
  background:
    radial-gradient(circle at 100% 0, rgba(67, 217, 198, .10), transparent 46%),
    radial-gradient(circle at 0 100%, rgba(109, 124, 255, .09), transparent 52%),
    var(--home-card);
  box-shadow: 0 20px 56px rgba(0, 0, 0, .18);
}

.public-home .hero-info {
  padding: 0;
}

.public-home .hero h1 {
  font-size: clamp(42px, 4.5vw, 58px);
}

.public-home .hero-info > p:not(.eyebrow) {
  margin-top: 12px;
}

.public-home .hero-status {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 12px;
  margin: 12px 4px 0;
}

.public-home .hero-status .live {
  flex: 0 0 auto;
  align-self: center;
  justify-self: auto;
  margin: 0;
}

.public-home .hero-status .end-countdown {
  width: min(520px, 100%);
}

.public-home .leaderboard-heading {
  margin: 28px 0 16px;
}

.public-home .podium {
  grid-template-columns: .96fr 1.08fr .96fr;
}

@media (max-width: 680px) {
  .public-home .leaderboard-top {
    width: calc(100% - 28px);
    min-height: 72px;
  }

  .public-home .brand-mark {
    width: 44px;
    height: 44px;
  }

  .public-home .wrap {
    width: calc(100% - 28px);
    margin-top: 8px;
    margin-bottom: 46px;
  }

  .public-home .hero {
    padding: 20px;
    border-radius: 20px;
  }

  .public-home .hero-status {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 10px;
    margin: 10px 2px 0;
  }

  .public-home .hero-status .live {
    margin: 0;
    padding: 8px 11px;
    font-size: 12px;
  }

  .public-home .hero-status .end-countdown {
    flex-basis: 100%;
    order: 2;
  }

  .public-home .leaderboard-heading {
    margin-top: 22px;
  }

  .public-home .podium {
    grid-template-columns: .92fr 1.08fr .92fr;
    gap: 7px;
    align-items: end;
  }

  .public-home .podium-2 { order: 1; }
  .public-home .podium-1 { order: 2; }
  .public-home .podium-3 { order: 3; }

  .public-home .podium-card:not(.podium-1) {
    min-height: 124px;
  }

  .public-home .podium-1 {
    min-height: 144px;
    padding-top: 16px;
    padding-bottom: 16px;
    box-shadow:
      0 16px 38px rgba(0, 0, 0, .18),
      0 0 24px rgba(241, 201, 91, .06);
  }

  .public-home .podium-1 .podium-medal {
    font-size: 29px;
  }

  .public-home .podium-1 strong {
    font-size: 15px;
  }

  .public-home .podium-1 b {
    font-size: 18px;
  }

  .public-home .ranking .panel-head > small {
    max-width: 54%;
  }
}

@media (max-width: 380px) {
  .public-home .podium-card:not(.podium-1) {
    min-height: 112px;
  }

  .public-home .podium-1 {
    min-height: 132px;
  }

  .public-home .podium-1 b {
    font-size: 16px;
  }
}


/* =========================================================
   公开排行榜 V13：宽屏独立布局与紧凑对称手机首屏
   ========================================================= */
.public-home .hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
  align-items: center;
  gap: 38px;
  min-height: 0;
  overflow: hidden;
  padding: 30px 36px;
}

.public-home .hero::after {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .018) 1px, transparent 1px);
  background-size: 34px 34px;
  content: '';
  opacity: .45;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(90deg, transparent 35%, #000 100%);
  mask-image: linear-gradient(90deg, transparent 35%, #000 100%);
}

.public-home .hero-info,
.public-home .hero-side {
  position: relative;
  z-index: 1;
}

.public-home .hero h1 {
  font-size: clamp(40px, 4.2vw, 54px);
}

.public-home .hero-side {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding-left: 30px;
  border-left: 1px solid var(--home-border);
}

.public-home .hero-side .competition-meta {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin: 0;
}

.public-home .hero-side .competition-meta span {
  width: 100%;
  padding: 9px 12px;
  border-color: var(--home-border);
  background: var(--home-card-soft);
  text-align: center;
}

.public-home .hero-side .end-countdown {
  width: 100%;
  margin: 0;
}

.public-home .leaderboard-heading {
  align-items: center;
  margin-top: 25px;
}

.public-home .leaderboard-summary {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  color: var(--home-muted);
  font-size: 12px;
  white-space: nowrap;
}

.public-home .leaderboard-summary .live {
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-size: 12px;
}

.public-home .leaderboard-summary .live i {
  width: 7px;
  height: 7px;
  margin-right: 5px;
}

.public-home .leaderboard-summary .live-connected i {
  box-shadow: 0 0 0 3px rgba(56, 217, 201, .10);
}

.public-home .leaderboard-summary .live-final {
  color: #e9c968;
}

.public-home .leaderboard-summary .live-final i {
  box-shadow: 0 0 0 3px rgba(233, 201, 104, .10);
}

.public-home .leaderboard-summary .live-calculating,
.public-home .leaderboard-summary .live-reveal {
  color: #ffd993;
}

.public-home .podium {
  width: min(960px, 100%);
  grid-template-columns: .95fr 1.1fr .95fr;
  gap: 14px;
  margin-right: auto;
  margin-bottom: 24px;
  margin-left: auto;
}

.public-home .podium-card {
  min-height: 150px;
  padding: 20px;
}

.public-home .podium-1 {
  min-height: 188px;
}

.public-home .ranking {
  padding: 22px;
}

.public-home .ranking .panel-head {
  padding: 0 2px 14px;
  border-bottom: 1px solid var(--home-border);
}

.public-home .ranking .panel-head h2 {
  font-size: 22px;
}

.public-home .ranking .rank-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-top: 14px;
}

.public-home .ranking .rank-list > .empty {
  grid-column: 1 / -1;
}

.public-home .ranking .rank-row {
  min-height: 64px;
}

@media (max-width: 900px) {
  .public-home .ranking .rank-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .public-home .leaderboard-top {
    min-height: 66px;
  }

  .public-home .brand-mark {
    width: 40px;
    height: 40px;
  }

  .public-home .wrap {
    margin-top: 6px;
  }

  .public-home .hero {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 16px;
    border-radius: 18px;
  }

  .public-home .hero::after {
    background-size: 28px 28px;
    opacity: .3;
    -webkit-mask-image: linear-gradient(180deg, transparent 20%, #000 100%);
    mask-image: linear-gradient(180deg, transparent 20%, #000 100%);
  }

  .public-home .hero-info {
    text-align: center;
  }

  .public-home .hero .eyebrow {
    margin-bottom: 5px;
    font-size: 9px;
  }

  .public-home .hero h1 {
    font-size: clamp(29px, 8.3vw, 34px);
    line-height: 1.1;
  }

  .public-home .hero-info > p:not(.eyebrow) {
    margin: 7px 0 0;
    font-size: 11px;
    line-height: 1.45;
  }

  .public-home .hero-side {
    display: grid;
    gap: 8px;
    padding: 0;
    border-left: 0;
  }

  .public-home .hero-side .competition-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    margin: 0;
  }

  .public-home .hero-side .competition-meta span {
    overflow: hidden;
    padding: 7px 6px;
    font-size: 9px;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .public-home .hero-side .end-countdown {
    padding: 10px;
  }

  .public-home .leaderboard-heading {
    align-items: center;
    margin: 18px 0 10px;
    padding-bottom: 9px;
  }

  .public-home .leaderboard-heading .eyebrow {
    margin-bottom: 4px;
  }

  .public-home .leaderboard-heading h2 {
    font-size: 20px;
  }

  .public-home .leaderboard-summary {
    gap: 5px;
    font-size: 10px;
  }

  .public-home .leaderboard-summary .live {
    padding: 0;
    font-size: 10px;
  }

  .public-home .leaderboard-summary .live i {
    width: 6px;
    height: 6px;
    margin-right: 4px;
  }

  .public-home .podium {
    width: 100%;
    grid-template-columns: .94fr 1.08fr .94fr;
    gap: 6px;
    margin-bottom: 16px;
  }

  .public-home .podium-card:not(.podium-1) {
    min-height: 112px;
    padding: 11px 6px;
  }

  .public-home .podium-1 {
    min-height: 130px;
    padding: 13px 7px;
  }

  .public-home .podium-1 .podium-medal {
    font-size: 27px;
  }

  .public-home .ranking {
    padding: 0;
  }

  .public-home .ranking .panel-head {
    align-items: center;
    padding: 0 2px 9px;
  }

  .public-home .ranking .panel-head h2 {
    font-size: 18px;
  }

  .public-home .ranking .rank-list {
    grid-template-columns: 1fr;
    gap: 7px;
    margin-top: 0;
  }
}

@media (max-width: 360px) {
  .public-home .hero-side .competition-meta {
    grid-template-columns: 1fr;
  }

  .public-home .leaderboard-summary {
    display: grid;
    gap: 2px;
    justify-items: end;
  }

  .public-home .podium-card:not(.podium-1) {
    min-height: 106px;
  }

  .public-home .podium-1 {
    min-height: 122px;
  }
}

/* V14: compact public results, shared medal artwork and continuous ranking rows. */
.public-home {
  --home-gold: #e5ca88;
  --home-border: rgba(170, 201, 226, .11);
  --home-muted: #9aaec2;
  background:
    radial-gradient(ellipse at 9% 0, rgba(91, 109, 194, .13), transparent 38rem),
    radial-gradient(ellipse at 100% 30%, rgba(56, 217, 201, .055), transparent 36rem),
    var(--bg);
}
.public-home .ambient { opacity: .07; }
.public-home .leaderboard-top,
.public-home .wrap,
.public-home footer { width: min(1120px, calc(100% - 48px)); }
.public-home .leaderboard-top { min-height: 74px; }
.public-home .wrap { margin: 10px auto 44px; }
.public-home .hero {
  grid-template-columns: minmax(0, 1fr) minmax(250px, 300px);
  gap: 32px;
  padding: 25px 30px;
  border-radius: 20px;
  background: linear-gradient(110deg, rgba(20, 37, 62, .85), rgba(17, 44, 54, .5));
  box-shadow: none;
}
.public-home .hero::after { display: none; }
.public-home .hero.hero-without-time { grid-template-columns: 1fr; }
.public-home .hero h1 {
  max-width: none;
  font-size: clamp(30px, 3.3vw, 40px);
  line-height: 1.25;
  letter-spacing: -.025em;
  overflow-wrap: anywhere;
}
.public-home .hero-info > p:not(.eyebrow) {
  margin: 9px 0 0;
  font-size: 13px;
  line-height: 1.5;
}
.public-home .hero-side { gap: 12px; padding-left: 26px; }
.public-home .hero-side .competition-meta { gap: 10px; }
.public-home .hero-side .competition-meta > span {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  text-align: left;
  color: #c0cede;
  font-size: 12px;
  line-height: 1.5;
  white-space: normal;
  overflow: visible;
}
.public-home .competition-meta small { color: var(--home-muted); font-size: 11px; }
.public-home .competition-meta time { font-variant-numeric: tabular-nums; white-space: nowrap; }
.public-home .hero-side .end-countdown {
  padding: 10px 0 0;
  border: 0;
  border-top: 1px solid var(--home-border);
  border-radius: 0;
  background: none;
  box-shadow: none;
}
.public-home .countdown-title { margin-bottom: 6px; font-size: 11px; font-weight: 400; }
.public-home .countdown-grid { gap: 8px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.public-home .countdown-grid b { padding: 3px 0; border: 0; border-radius: 0; background: none; }
.public-home .countdown-grid strong { display: inline; font-size: 18px; }
.public-home .countdown-grid small { display: inline; margin-left: 4px; font-size: 10px; }
.public-home .leaderboard-heading { margin: 23px 0 16px; padding: 0; border: 0; gap: 12px; }
.public-home .leaderboard-heading h2 { font-size: 20px; letter-spacing: .02em; }
.public-home .leaderboard-summary { display: flex; gap: 8px; font-size: 11px; }
.public-home .leaderboard-summary .live { font-size: 11px; }
.public-home .leaderboard-summary .live-final { color: var(--home-gold); }
.public-home .podium {
  width: 100%;
  grid-template-columns: 1fr 1.12fr 1fr;
  gap: 16px;
  margin: 0 auto 26px;
}
.public-home .podium-card {
  position: relative;
  justify-content: center;
  min-width: 0;
  min-height: 180px;
  padding: 18px 16px;
  border-radius: 18px;
  border-color: var(--home-border);
  background: rgba(17, 31, 51, .72);
  box-shadow: none;
  backdrop-filter: none;
}
.public-home .podium-2 { order: 1; }
.public-home .podium-1 {
  order: 2;
  min-height: 210px;
  padding: 21px 16px;
  border-color: rgba(229, 202, 136, .38);
  background: radial-gradient(ellipse at 50% 0, rgba(229, 202, 136, .13), transparent 75%), rgba(17, 31, 51, .85);
  box-shadow: 0 8px 30px rgba(0, 0, 0, .12);
}
.public-home .podium-1::before {
  position: absolute;
  top: 0;
  left: 24%;
  width: 52%;
  height: 1px;
  content: '';
  background: linear-gradient(90deg, transparent, var(--home-gold), transparent);
}
.public-home .podium-3 { order: 3; }
.public-home .podium[data-count="1"] .podium-1 { grid-column: 2; }
.public-home .podium[data-count="2"] .podium-2 { grid-column: 1; }
.public-home .podium[data-count="2"] .podium-1 { grid-column: 2; }
.public-home .podium-card .podium-medal { height: 44px; line-height: 1; font-size: inherit; transform: none; }
.public-home .medal-icon { display: block; width: 38px; height: 44px; color: var(--home-gold); overflow: visible; }
.public-home .medal-2 { color: #b9cce0; }
.public-home .medal-3 { color: #d7a17b; }
.public-home .medal-ribbon { fill: currentColor; opacity: .4; }
.public-home .medal-disc { fill: currentColor; fill-opacity: .15; stroke: currentColor; stroke-width: 1.3; }
.public-home .medal-ring { fill: none; stroke: currentColor; stroke-width: .6; opacity: .45; }
.public-home .medal-icon text { fill: currentColor; font: 600 18px system-ui, sans-serif; }
.public-home .podium-card .podium-name {
  display: block;
  width: 100%;
  margin: 11px 0 6px;
  font-size: 18px;
  line-height: 1.35;
  white-space: normal;
  overflow-wrap: anywhere;
}
.public-home .podium-card .podium-score {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 5px;
  width: 100%;
  margin: 0;
  color: #e4edf6;
  font-size: 36px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -.025em;
  font-variant-numeric: tabular-nums;
}
.public-home .podium-score em { font-size: 12px; font-style: normal; font-weight: 400; letter-spacing: 0; color: var(--home-muted); }
.public-home .podium-1 .podium-score { color: var(--home-gold); font-size: 46px; }
.public-home .podium-1 .podium-score em { color: #c3b18c; }
.public-home .podium-card .score-long { font-size: 28px; }
.public-home .podium-card .score-concealed { margin-top: 5px; font-size: 14px; color: var(--home-muted); }
.public-home .podium-card > small { min-height: 0; max-height: none; margin: 8px 0 0; font-size: 11px; }
.public-home .ranking {
  padding: 22px 24px 10px;
  border: 1px solid var(--home-border);
  border-radius: 18px;
  background: rgba(15, 29, 49, .72);
  box-shadow: none;
  backdrop-filter: none;
}
.public-home .ranking .panel-head { padding: 0 0 14px; gap: 12px; }
.public-home .ranking .panel-head h2 { font-size: 20px; }
.public-home .ranking .panel-head > small { max-width: none; color: var(--home-muted); font-size: 11px; }
.public-home .ranking .rank-list { gap: 0 28px; margin-top: 0; }
.public-home .ranking .rank-row {
  grid-template-columns: 30px minmax(0, 1fr) auto;
  min-height: 62px;
  gap: 14px;
  padding: 12px 8px;
  border: 0;
  border-bottom: 1px solid rgba(170, 201, 226, .075);
  border-radius: 0;
  background: transparent;
  transition: background-color .18s ease;
}
.public-home .ranking .rank-public-list { grid-template-columns: minmax(0, 1fr); }
.public-home .rank-number { color: var(--home-muted); font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
.public-home .rank-number .medal-icon { width: 25px; height: 30px; margin: auto; }
.public-home .rank-person { gap: 0; }
.public-home .rank-person strong { font-size: 15px; font-weight: 600; white-space: normal; overflow-wrap: anywhere; }
.public-home .rank-person small { font-size: 11px; }
.public-home .rank-score { white-space: nowrap; font-variant-numeric: tabular-nums; }
.public-home .rank-score strong { font-size: 24px; font-weight: 650; color: #e6eef7; }
.public-home .rank-score span { margin-left: 5px; font-size: 11px; color: var(--home-muted); }
.public-home .rank-1 .rank-score strong { color: var(--home-gold); }
.public-home .final-reveal-rank .medal-icon { width: 30px; height: 36px; }
@media (hover: hover) {
  .public-home .ranking .rank-row:hover { background: rgba(157, 193, 217, .045); }
}
@media (max-width: 900px) and (min-width: 681px) {
  .public-home .hero { grid-template-columns: minmax(0, 1fr) 238px; gap: 22px; padding: 23px; }
  .public-home .hero-side { padding-left: 18px; }
}
@media (max-width: 680px) {
  .public-home .leaderboard-top,
  .public-home .wrap,
  .public-home footer { width: calc(100% - 28px); }
  .public-home .leaderboard-top { min-height: 66px; }
  .public-home .admin-entry { min-height: 36px; }
  .public-home .wrap { margin: 5px auto 32px; }
  .public-home .hero { grid-template-columns: 1fr; gap: 13px; padding: 17px 15px; border-radius: 16px; }
  .public-home .hero-info { text-align: center; }
  .public-home .hero h1 { font-size: clamp(24px, 6.5vw, 29px); line-height: 1.25; }
  .public-home .hero-info > p:not(.eyebrow) { margin-top: 6px; font-size: 11px; line-height: 1.5; }
  .public-home .hero-side { padding: 0; gap: 10px; border: 0; }
  .public-home .hero-side .competition-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .public-home .hero-side .competition-meta > span { display: flex; flex-direction: column; gap: 3px; text-align: center; font-size: 10px; line-height: 1.4; }
  .public-home .competition-meta small { font-size: 10px; color: #8ca1b9; }
  .public-home .competition-meta > span:only-child { grid-column: 1 / -1; }
  .public-home .hero-side .end-countdown { padding: 8px 0 0; }
  .public-home .countdown-title { text-align: center; font-size: 10px; }
  .public-home .countdown-grid strong { font-size: 16px; }
  .public-home .leaderboard-heading { margin: 19px 0 12px; padding: 0; gap: 8px; }
  .public-home .leaderboard-heading h2 { font-size: 17px; white-space: nowrap; }
  .public-home .leaderboard-summary { display: flex; gap: 5px; font-size: 10px; }
  .public-home .leaderboard-summary .live { font-size: 10px; }
  .public-home .podium { grid-template-columns: 1fr 1.13fr 1fr; gap: 7px; margin-bottom: 21px; }
  .public-home .podium-card:not(.podium-1) { min-height: 132px; padding: 12px 5px; }
  .public-home .podium-card { border-color: var(--home-border); border-radius: 14px; }
  .public-home .podium-1 { min-height: 153px; padding: 15px 5px; border-color: rgba(229, 202, 136, .38); }
  .public-home .podium-card .podium-medal { height: 34px; }
  .public-home .podium-card .medal-icon { width: 29px; height: 34px; }
  .public-home .podium-card .podium-name { margin: 8px 0 5px; font-size: 14px; }
  .public-home .podium-card .podium-score { gap: 3px; font-size: 25px; }
  .public-home .podium-1 .podium-score { font-size: 31px; }
  .public-home .podium-score em { font-size: 10px; }
  .public-home .podium-card .score-long { font-size: clamp(11px, 3.4vw, 15px); flex-wrap: wrap; white-space: normal; overflow: visible; }
  .public-home .score-long > span { min-width: 0; max-width: 100%; overflow-wrap: anywhere; }
  .public-home .podium-card .score-concealed { font-size: 11px; }
  .public-home .podium-card > small { display: none; }
  .public-home .ranking { padding: 0 12px; border-radius: 15px; }
  .public-home .ranking .panel-head { align-items: center; padding: 14px 0 11px; gap: 8px; }
  .public-home .ranking .panel-head h2 { font-size: 17px; white-space: nowrap; }
  .public-home .ranking .panel-head > small { font-size: 9px; text-align: right; line-height: 1.5; white-space: normal; overflow: visible; }
  .public-home #updated-time { display: block; white-space: nowrap; }
  .public-home .ranking .rank-list { grid-template-columns: 1fr; gap: 0; }
  .public-home .ranking .rank-row { grid-template-columns: 25px minmax(0, 1fr) auto; min-height: 55px; padding: 10px 0; gap: 10px; }
  .public-home .ranking .rank-row:last-child { border-bottom: 0; }
  .public-home .ranking .rank-public-list { grid-template-columns: minmax(0, 1fr); }
  .public-home .rank-number { font-size: 14px; }
  .public-home .rank-number .medal-icon { width: 22px; height: 26px; }
  .public-home .rank-person strong { font-size: 14px; }
  .public-home .rank-score strong { font-size: 21px; }
  .public-home .rank-score span { margin-left: 3px; font-size: 10px; }
  .public-home footer { padding-top: 14px; font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .public-home .ranking .rank-row { transition: none; }
}

/* V14: shared branding, stable first render, login and admin layout. */
html { scrollbar-gutter: stable; }
.page-skeleton { display: none; }
.page-loading .page-skeleton { display: block; }
.page-loading .wrap, .page-loading .admin-main { display: none; }
body[data-page="admin"], .auth-page {
  --primary: #48c9b7;
  --line: rgba(171, 195, 221, .12);
  --panel: rgba(16, 31, 52, .83);
  background: radial-gradient(ellipse at 0 0, rgba(90, 110, 185, .1), transparent 42rem), var(--bg);
}
body[data-page="admin"] .brand-mark, .auth-page .brand-mark {
  width: 44px; height: 44px; border-radius: 0; background: transparent; box-shadow: none; overflow: visible;
}
body[data-page="admin"] .brand-mark img, .auth-page .brand-mark img {
  display: block; width: 100%; height: 100%; object-fit: contain; object-position: center;
}
body[data-page="admin"] [data-logo-text], .auth-page [data-logo-text] {
  width: 100%; height: 100%; display: grid; place-items: center; border-radius: 12px; background: #163f47; color: #8ee5d7;
}
.brand-loading .brand-mark, .brand-loading [data-site-name] { visibility: hidden; }
.page-skeleton { color: var(--muted); }
.home-skeleton { width: min(1120px, calc(100% - 48px)); margin: 10px auto 44px; }
.skeleton-hero { height: 137px; border-radius: 20px; background: rgba(160, 184, 212, .065); }
.skeleton-podium { display: grid; grid-template-columns: 1fr 1.12fr 1fr; align-items: end; gap: 16px; margin: 56px 0 26px; }
.skeleton-podium i { height: 180px; border-radius: 18px; background: rgba(160, 184, 212, .05); }
.skeleton-podium i:nth-child(2) { height: 210px; }
.skeleton-lines { height: 230px; border-radius: 16px; background: repeating-linear-gradient(transparent 0 38px, rgba(160, 184, 212, .035) 38px 39px), rgba(160, 184, 212, .025); }
.load-error-message { display: none; padding: 45px 20px; text-align: center; border: 1px solid var(--line); border-radius: 16px; }
.load-error-message strong { color: var(--text); }
.load-error-message p { font-size: 13px; }
.load-error .skeleton-content { display: none; }
.load-error .load-error-message { display: block; }
.auth-page { min-height: 100svh; padding: 28px 0; }
.auth-shell { width: min(400px, calc(100% - 36px)); padding: 0; }
.auth-brand { display: flex; justify-content: center; margin: 0 0 24px; }
.auth-brand strong { max-width: 300px; font-size: 16px; white-space: normal; overflow-wrap: anywhere; }
.auth-brand small { margin-top: 3px; font-size: 9px; }
.auth-card { padding: 28px; border-radius: 20px; box-shadow: 0 18px 55px rgba(0, 0, 0, .15); }
.auth-card h1 { font-size: 26px; line-height: 1.3; letter-spacing: -.02em; }
.auth-card > p:not(.eyebrow) { margin: 10px 0 0; font-size: 13px; line-height: 1.65; }
.auth-card .form { padding: 0; margin: 25px 0 0; gap: 18px; }
.auth-card input { min-height: 46px; background: rgba(154, 186, 214, .045); }
.auth-card .primary, body[data-page="admin"] .primary {
  background: #187b72; color: #fff; font-weight: 600; border: 1px solid rgba(124, 224, 204, .15);
}
.auth-card .primary { margin-top: 3px; min-height: 46px; }
.auth-card .back-link { display: block; width: fit-content; margin: 23px auto 0; font-size: 12px; }
body[data-page="admin"] .admin-top { width: min(1400px, calc(100% - 40px)); min-height: 74px; }
body[data-page="admin"] .brand strong { max-width: 500px; font-size: 16px; }
body[data-page="admin"] .header-actions .outline { padding: 8px 13px; font-size: 13px; min-height: 36px; }
body[data-page="admin"] .admin-shell { width: min(1440px, 100%); margin: auto; grid-template-columns: 180px minmax(0, 1fr); min-height: calc(100vh - 74px); }
body[data-page="admin"] .admin-nav { padding: 22px 14px; gap: 4px; }
body[data-page="admin"] .admin-nav button { min-height: 42px; padding: 10px 14px; font-size: 13px; }
body[data-page="admin"] .admin-nav button.active { background: rgba(64, 200, 179, .1); color: #8ae2d3; }
body[data-page="admin"] .admin-main, .admin-skeleton { padding: 27px 28px; min-width: 0; }
body[data-page="admin"] .heading { margin-bottom: 22px; align-items: center; flex-wrap: wrap; gap: 8px 16px; }
body[data-page="admin"] .heading .eyebrow { display: none; }
body[data-page="admin"] .heading h1 { font-size: 28px; line-height: 1.35; letter-spacing: -.025em; }
body[data-page="admin"] .heading small { font-size: 12px; }
body[data-page="admin"] .panel { border-radius: 16px; box-shadow: none; backdrop-filter: none; }
body[data-page="admin"] .admin-main .panel { padding: 20px; }
body[data-page="admin"] .stat-card { gap: 7px; padding: 18px; border-radius: 14px; min-width: 0; }
body[data-page="admin"] .stat-card span { font-size: 12px; }
body[data-page="admin"] .stat-card strong { font-size: 30px; font-weight: 650; line-height: 1.2; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
body[data-page="admin"] .stat-card small { font-size: 11px; }
body[data-page="admin"] .card-head { align-items: center; flex-wrap: wrap; gap: 7px 12px; }
body[data-page="admin"] h3 { font-size: 16px; }
body[data-page="admin"] .overview-guide h3 { margin: 0; }
body[data-page="admin"] .overview-guide p { margin: 10px 0 17px; font-size: 13px; }
.overview-shortcuts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.overview-shortcuts button { display: flex; justify-content: space-between; align-items: center; gap: 5px; padding: 12px 14px; font-size: 13px; }
.overview-shortcuts span { color: #75d1c2; }
body[data-page="admin"] .manage { gap: 0; }
body[data-page="admin"] .manage-row { padding: 12px 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; }
body[data-page="admin"] .manage-row:last-child { border-bottom: 0; }
body[data-page="admin"] .manage-row strong { font-size: 14px; overflow-wrap: anywhere; }
body[data-page="admin"] .manage-row small, body[data-page="admin"] .preview-row small { font-size: 11px; }
body[data-page="admin"] .row-actions button { font-size: 12px; }
body[data-page="admin"] .preview-row { grid-template-columns: 32px minmax(0, 1fr) auto; padding: 13px 0; font-size: 14px; }
body[data-page="admin"] .preview-row em { font-size: 20px; }
body[data-page="admin"] .log-row { padding: 13px 0; }
body[data-page="admin"] .log-row strong { font-size: 14px; }
body[data-page="admin"] .log-row small, body[data-page="admin"] .log-row > span { font-size: 11px; }
body[data-page="admin"] .form { gap: 16px; }
body[data-page="admin"] input, body[data-page="admin"] select, body[data-page="admin"] textarea { min-width: 0; }
body[data-page="admin"] .form-two > label { min-width: 0; }
body[data-page="admin"] .logo-preview { border-radius: 12px; background: rgba(255,255,255,.025); }
body[data-page="admin"] .logo-preview img { object-fit: contain; }
body[data-page="admin"] .score-preset { min-height: 62px; border-radius: 12px; }
body[data-page="admin"] .score-tap-group { min-height: 88px; border-radius: 12px; }
body[data-page="admin"] .score-choice-bar { border-radius: 12px; }
body[data-page="admin"] .display-mode-card { border-radius: 12px; }
body[data-page="admin"] .final-admin-banner { border-radius: 12px; }
body[data-page="admin"] .final-admin-actions { flex-wrap: wrap; }
.skeleton-heading { width: 160px; height: 34px; margin-bottom: 22px; border-radius: 8px; background: rgba(160, 184, 212, .065); }
.skeleton-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; margin-bottom: 17px; }
.skeleton-stats i { height: 110px; border-radius: 14px; background: rgba(160, 184, 212, .05); }
@media (max-width: 980px) {
  body[data-page="admin"] .admin-shell { grid-template-columns: 1fr; grid-template-rows: auto 1fr; align-items: start; }
  body[data-page="admin"] .admin-nav {
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px;
    overflow: visible; padding: 8px 12px; border-right: 0;
  }
  body[data-page="admin"] .admin-nav button { padding: 9px 4px; min-height: 36px; text-align: center; font-size: 12px; }
  body[data-page="admin"] .cols, body[data-page="admin"] .settings-grid { grid-template-columns: 1fr; }
  body[data-page="admin"] .admin-main, .admin-skeleton { padding: 22px; }
  .skeleton-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .home-skeleton { width: calc(100% - 28px); margin-top: 5px; }
  .skeleton-hero { height: 142px; border-radius: 16px; }
  .skeleton-podium { grid-template-columns: 1fr 1.13fr 1fr; gap: 7px; margin: 52px 0 21px; }
  .skeleton-podium i { height: 132px; border-radius: 14px; }
  .skeleton-podium i:nth-child(2) { height: 153px; }
  .auth-page { padding: 26px 0; place-items: start center; }
  .auth-shell { width: min(400px, calc(100% - 36px)); }
  .auth-brand { margin-bottom: 21px; }
  .auth-brand strong { max-width: 235px; font-size: 15px; }
  .auth-card { padding: 25px 22px; border-radius: 18px; }
  .auth-card h1 { font-size: 25px; text-align: center; }
  .auth-card > p:not(.eyebrow) { font-size: 12px; text-align: center; }
  .auth-card label { font-size: 12px; }
  .auth-card input { font-size: 16px; }
  body[data-page="admin"] .admin-top { width: calc(100% - 28px); min-height: 66px; gap: 10px; }
  body[data-page="admin"] .brand { gap: 9px; }
  body[data-page="admin"] .brand-mark { width: 38px; height: 38px; }
  body[data-page="admin"] .brand strong { max-width: 190px; font-size: 14px; }
  body[data-page="admin"] .brand small { font-size: 8px; }
  body[data-page="admin"] .header-actions .outline { padding: 8px 11px; font-size: 12px; }
  body[data-page="admin"] .admin-nav { padding: 7px 10px; gap: 2px 4px; }
  body[data-page="admin"] .admin-nav button { font-size: 11px; padding: 8px 2px; min-height: 34px; }
  body[data-page="admin"] .admin-main, .admin-skeleton { padding: 21px 14px; }
  body[data-page="admin"] .heading { margin-bottom: 15px; gap: 6px; }
  body[data-page="admin"] .heading h1 { font-size: 23px; }
  body[data-page="admin"] .heading small { font-size: 10px; }
  body[data-page="admin"] .stats { gap: 10px; }
  body[data-page="admin"] .stat-card { padding: 14px; gap: 6px; }
  body[data-page="admin"] .stat-card strong { font-size: 28px; }
  body[data-page="admin"] .stat-card small { font-size: 10px; }
  body[data-page="admin"] .admin-main .panel { padding: 16px; border-radius: 14px; }
  body[data-page="admin"] .overview-guide p { font-size: 12px; line-height: 1.7; }
  .overview-shortcuts { gap: 6px; }
  .overview-shortcuts button { padding: 10px 6px; min-height: 40px; font-size: 11px; border-radius: 9px; }
  body[data-page="admin"] label { font-size: 12px; }
  body[data-page="admin"] input, body[data-page="admin"] select, body[data-page="admin"] textarea { font-size: 16px; }
  body[data-page="admin"] .form-two { grid-template-columns: 1fr; }
  body[data-page="admin"] .row-actions button { padding: 7px 8px; }
  body[data-page="admin"] .score-tap-grid { gap: 8px; }
  body[data-page="admin"] .score-tap-group { min-height: 76px; padding: 12px 6px; }
  body[data-page="admin"] .score-choice-bar { gap: 8px; padding: 12px; }
  body[data-page="admin"] .score-choice-bar small { font-size: 11px; }
  body[data-page="admin"] .final-admin-actions button { min-height: 40px; font-size: 12px; }
  body[data-page="admin"] .final-admin-banner { flex-wrap: wrap; }
  body[data-page="admin"] .card-head small { font-size: 11px; }
  body[data-page="admin"] .logo-setting { grid-template-columns: 64px minmax(0, 1fr); gap: 12px; }
  body[data-page="admin"] .logo-preview { width: 64px; height: 64px; }
  body[data-page="admin"] .logo-setting small { font-size: 11px; }
}

/* V15: trophy artwork, fuller countdown and new scoring controls. */
.public-home .hero {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 360px);
}
.public-home .hero-side .end-countdown {
  padding: 14px 15px;
  border: 1px solid rgba(109, 124, 255, .24);
  border-radius: 15px;
  background: linear-gradient(135deg, rgba(109, 124, 255, .10), rgba(56, 217, 201, .055));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .025);
}
.public-home .countdown-title {
  margin-bottom: 10px;
  color: #aebed0;
  font-size: 11px;
  font-weight: 600;
}
.public-home .countdown-grid { gap: 7px; }
.public-home .countdown-grid b {
  padding: 9px 4px;
  border: 1px solid rgba(170, 201, 226, .11);
  border-radius: 10px;
  background: rgba(255, 255, 255, .025);
}
.public-home .countdown-grid strong {
  display: block;
  color: #eef6ff;
  font-size: 22px;
  line-height: 1;
}
.public-home .countdown-grid small {
  display: block;
  margin: 5px 0 0;
  color: #8298af;
  font-size: 9px;
}
.public-home .countdown-is-waiting { text-align: center; }
.public-home .countdown-is-waiting .countdown-title { margin-bottom: 6px; }
.countdown-waiting {
  display: block;
  padding: 9px 12px;
  border-radius: 10px;
  background: rgba(56, 217, 201, .06);
  color: #8ee5d7;
  font-size: 16px;
  letter-spacing: .08em;
}
.public-home .podium-card .podium-medal {
  display: grid;
  place-items: center;
  width: 100%;
  height: 70px;
}
.public-home .podium-1 .podium-medal { height: 88px; }
.public-home .trophy-icon {
  display: block;
  width: 70px;
  height: 70px;
  object-fit: contain;
  filter: drop-shadow(0 7px 12px rgba(0, 0, 0, .28));
}
.public-home .podium-1 .trophy-icon { width: 88px; height: 88px; }
.public-home .rank-number .trophy-icon {
  display: block;
  width: 32px;
  height: 32px;
  margin: auto;
  object-fit: contain;
}
.public-home .final-reveal-rank .trophy-icon {
  width: 40px;
  height: 40px;
  object-fit: contain;
}
.batch-result-panel {
  padding: 16px;
  border: 1px solid rgba(56, 217, 201, .25);
  border-radius: 14px;
  background: rgba(56, 217, 201, .055);
}
.batch-result-panel.is-fading { animation: batchResultFade 60s linear forwards; }
.batch-result-list { display: grid; gap: 0; max-height: 280px; overflow: auto; }
.batch-result-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 8px 2px;
  border-bottom: 1px solid var(--line);
}
.batch-result-row:last-child { border-bottom: 0; }
.batch-result-row > span { color: var(--muted); font-size: 11px; }
.batch-result-row strong { overflow-wrap: anywhere; }
.batch-result-row b { color: #72e6d7; white-space: nowrap; }
.score-tap-group.is-success,
.score-tap-group.is-success strong,
.score-tap-group.is-success small {
  animation-duration: var(--flash-duration, 5s);
}
@keyframes batchResultFade {
  0%, 18% { opacity: 1; }
  100% { opacity: .08; }
}
.reset-dialog {
  width: min(520px, calc(100% - 28px));
  padding: 0;
  border: 1px solid rgba(255, 107, 122, .3);
  border-radius: 18px;
  background: #0f1d31;
  color: var(--text);
  box-shadow: 0 28px 90px rgba(0, 0, 0, .5);
}
.reset-dialog::backdrop { background: rgba(2, 8, 18, .78); backdrop-filter: blur(5px); }
.reset-dialog-card { display: grid; gap: 20px; padding: 24px; }
.reset-dialog-card h2 { margin: 7px 0 0; }
.reset-dialog-card p { margin: 12px 0 0; color: var(--muted); line-height: 1.75; }
.reset-dialog-card label { display: grid; gap: 9px; }
.reset-dialog-card input { width: 100%; }
.danger-kicker { color: #ff9ba6; font-size: 11px; font-weight: 800; letter-spacing: .12em; }
.reset-dialog-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat-card.stat-text strong { font-size: clamp(18px, 2.1vw, 27px); }

@media (max-width: 680px) {
  .public-home .hero { grid-template-columns: 1fr; }
  .public-home .hero-side .end-countdown { padding: 12px; }
  .public-home .countdown-grid strong { font-size: 19px; }
  .public-home .podium-card .podium-medal { height: 52px; }
  .public-home .podium-card .trophy-icon { width: 52px; height: 52px; }
  .public-home .podium-1 .podium-medal { height: 65px; }
  .public-home .podium-1 .trophy-icon { width: 65px; height: 65px; }
  .public-home .rank-number .trophy-icon { width: 27px; height: 27px; }
  .score-mode-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .score-preset { min-height: 56px; font-size: 19px; }
  .manual-score-choice { grid-column: 1 / -1; min-height: 60px; }
  .batch-score-form { grid-template-columns: 1fr; }
  .batch-score-form button { width: 100%; min-width: 0; }
  .batch-result-row { grid-template-columns: 30px minmax(0, 1fr) auto; font-size: 12px; }
  .reset-dialog-card { padding: 20px; }
}
