/* =========================================================
   158班豪气排行榜 · 快乐整活版
   亮色 / 粗描边 / 贴纸感 / 综艺排行榜
   ========================================================= */

:root {
  --bg: #fff4dc;
  --bg-deep: #ffe6bd;
  --ink: #191624;
  --ink-soft: #38324d;
  --paper: #fffdf6;
  --yellow: #ffd93d;
  --yellow-deep: #ffb703;
  --orange: #ff8a00;
  --pink: #ff5d8f;
  --pink-soft: #ffd6e4;
  --cyan: #3ddcff;
  --cyan-soft: #d6f8ff;
  --purple: #8b5cf6;
  --blue: #3478ff;
  --lime: #c8f24a;
  --green: #39d98a;
  --danger: #e63946;
  --line: rgba(25, 22, 36, 0.12);
  --shadow: 7px 7px 0 var(--ink);
  --shadow-sm: 3px 3px 0 var(--ink);
  --shadow-xs: 2px 2px 0 var(--ink);
  --radius: 22px;
  --sans: "Arial Rounded MT Bold", "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", sans-serif;
  --display: "Arial Black", "Microsoft YaHei", "PingFang SC", sans-serif;
  --number: "Impact", "Arial Black", "Microsoft YaHei", sans-serif;
  --qq-blue: #12b7f5;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 7% 9%, rgba(255, 93, 143, 0.18), transparent 27%),
    radial-gradient(circle at 94% 4%, rgba(61, 220, 255, 0.24), transparent 29%),
    radial-gradient(circle at 80% 88%, rgba(255, 217, 61, 0.28), transparent 26%),
    linear-gradient(180deg, #fff8e8 0%, var(--bg) 52%, #ffedcf 100%);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.is-locked {
  overflow: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  opacity: 0.11;
  background-image: radial-gradient(var(--ink) 1.1px, transparent 1.1px);
  background-size: 17px 17px;
  mask-image: linear-gradient(180deg, #000 0%, transparent 78%);
}

button,
input,
textarea {
  font: inherit;
}

button {
  color: inherit;
}

button,
label {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--purple);
  outline-offset: 3px;
}

::selection {
  color: var(--ink);
  background: var(--yellow);
}

/* ---------- 背景装饰 ---------- */

.ambient {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.ambient::before,
.ambient::after {
  content: "";
  position: absolute;
  border: 3px solid var(--ink);
  opacity: 0.12;
}

.ambient::before {
  top: 105px;
  left: -70px;
  width: 160px;
  height: 160px;
  border-radius: 42% 58% 64% 36%;
  background: var(--pink);
  transform: rotate(18deg);
}

.ambient::after {
  right: -55px;
  bottom: 120px;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  background: var(--cyan);
}

/* ---------- 布局 ---------- */

.app {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 0 28px;
}

.main {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.special-section {
  margin-bottom: 48px;
}

/* ---------- 顶部 ---------- */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
  padding: 38px 0 30px;
  animation: pop-in 0.55s cubic-bezier(0.2, 1.2, 0.4, 1) both;
}

.brand {
  display: flex;
  align-items: center;
  gap: 20px;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.class-seal {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 76px;
  height: 76px;
  border: 3px solid var(--ink);
  border-radius: 18px;
  background: var(--yellow);
  box-shadow: 5px 5px 0 var(--ink);
  transform: rotate(-6deg);
}

.class-seal::before {
  content: "";
  position: absolute;
  inset: 5px;
  border: 2px dashed rgba(25, 22, 36, 0.45);
  border-radius: 12px;
}

.class-seal span {
  position: relative;
  z-index: 1;
  color: var(--ink);
  font-family: var(--number);
  font-size: 25px;
  letter-spacing: 0.04em;
  line-height: 1;
  transform: translateX(0.02em);
}

.brand-copy {
  display: block;
  min-width: 0;
}

.kicker {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 6px;
  color: var(--ink);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.16em;
  line-height: 1.2;
}

.kicker i {
  display: inline-block;
  width: 22px;
  height: 3px;
  border-radius: 99px;
  background: var(--pink);
}

h1 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(2rem, 4.15vw, 3.25rem);
  font-weight: 900;
  letter-spacing: -0.035em;
  line-height: 1.1;
  white-space: nowrap;
}

h1 span {
  position: relative;
  display: inline-block;
  z-index: 0;
}

h1 span::before {
  content: "";
  position: absolute;
  right: -0.05em;
  bottom: 0.03em;
  left: -0.05em;
  z-index: -1;
  height: 0.46em;
  border: 2px solid var(--ink);
  border-radius: 5px;
  background: var(--yellow);
  transform: rotate(-1.2deg);
}

.subtitle {
  display: block;
  margin-top: 7px;
  color: rgba(25, 22, 36, 0.62);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.sync-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 38px;
  padding: 0 12px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--paper);
  box-shadow: var(--shadow-xs);
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.sync-badge i {
  display: block;
  width: 8px;
  height: 8px;
  border: 1.5px solid var(--ink);
  border-radius: 50%;
  background: var(--yellow-deep);
}

.sync-badge[data-state="live"] {
  background: #e9ffe9;
}

.sync-badge[data-state="live"] i {
  background: var(--green);
  animation: blink 1.9s ease-in-out infinite;
}

.sync-badge[data-state="polling"] {
  background: #fff8d9;
}

.sync-badge[data-state="polling"] i {
  background: var(--yellow-deep);
  animation: blink 2.4s ease-in-out infinite;
}

.sync-badge[data-state="offline"] {
  background: #ffe8e8;
  color: #9b2c2c;
}

.sync-badge[data-state="offline"] i {
  background: var(--danger);
}

.admin-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 40px;
  padding: 0 15px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--pink);
  box-shadow: var(--shadow-xs);
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: transform 0.14s, box-shadow 0.14s, background 0.14s;
}

.admin-btn svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.admin-btn:hover,
.ghost-btn:hover {
  background: #ff7aa5;
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 var(--ink);
}

.admin-btn:active,
.ghost-btn:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--ink);
}

.admin-btn.is-admin {
  background: var(--lime);
}

/* ---------- 公告收起条 ---------- */

.notice-mini {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  min-height: 50px;
  margin: 0 0 24px;
  padding: 9px 14px;
  border: 3px solid var(--ink);
  border-radius: 14px;
  background: var(--paper);
  box-shadow: 4px 4px 0 var(--ink);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  animation: slide-down 0.4s cubic-bezier(0.2, 1.1, 0.4, 1) both;
  transition: transform 0.14s, box-shadow 0.14s, background 0.14s;
}

.notice-mini:hover {
  background: #f2fdff;
  transform: translate(-1px, -1px);
  box-shadow: 5px 5px 0 var(--ink);
}

.notice-mini-tag {
  flex: 0 0 auto;
  padding: 3px 8px;
  border: 2px solid var(--ink);
  border-radius: 6px;
  background: var(--cyan);
  color: var(--ink);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.1em;
}

.notice-mini-title {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notice-mini-action {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex: 0 0 auto;
  color: var(--blue);
  font-size: 10px;
  font-weight: 900;
}

.notice-mini-action svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.notice-mini:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 2px;
}

/* ---------- 区块标题 ---------- */

.special-section,
.board-section {
  animation: pop-in 0.62s 0.06s cubic-bezier(0.2, 1.1, 0.4, 1) both;
}

.board-section {
  animation-delay: 0.12s;
}

.section-head {
  display: flex;
  align-items: flex-end;
  gap: 13px;
  margin-bottom: 16px;
}

.section-head--compact {
  margin: 0;
}

.section-no {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border: 2.5px solid var(--ink);
  border-radius: 12px;
  background: var(--cyan);
  box-shadow: var(--shadow-xs);
  color: var(--ink);
  font-family: var(--number);
  font-size: 16px;
  line-height: 1;
  transform: rotate(-4deg);
}

.section-title {
  min-width: 0;
}

.section-kicker {
  margin: 0 0 3px;
  color: var(--ink);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.2em;
  line-height: 1.2;
}

.section-title h2 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(1.4rem, 2.7vw, 2rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.section-note {
  margin: 0 0 4px auto;
  padding: 4px 9px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

/* ---------- 最豪之人 ---------- */

.special-card {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 30px;
  min-height: 220px;
  padding: 36px 40px;
  overflow: hidden;
  border: 3px solid var(--ink);
  border-radius: 28px;
  background:
    radial-gradient(circle at 12% 12%, rgba(255, 255, 255, 0.8), transparent 24%),
    linear-gradient(125deg, #ffe66d 0%, var(--yellow) 35%, #ffc02e 66%, #ff9f1c 100%);
  box-shadow: 10px 10px 0 var(--ink);
}

.special-card::before {
  content: "";
  position: absolute;
  top: -45%;
  right: -6%;
  width: 44%;
  height: 180%;
  border: 3px solid rgba(25, 22, 36, 0.16);
  border-radius: 50%;
  transform: rotate(-14deg);
  pointer-events: none;
}

.special-card::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 38%;
  opacity: 0.16;
  background-image: radial-gradient(var(--ink) 1.2px, transparent 1.2px);
  background-size: 13px 13px;
  mask-image: linear-gradient(0deg, #000, transparent);
  pointer-events: none;
}

.special-frame {
  position: absolute;
  inset: 9px;
  border: 2px dashed rgba(25, 22, 36, 0.26);
  border-radius: 19px;
  pointer-events: none;
}

.crown-medallion {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 108px;
  height: 108px;
  flex: 0 0 auto;
  border: 3px solid var(--ink);
  border-radius: 26px;
  background: var(--paper);
  box-shadow: 6px 6px 0 var(--ink);
  color: var(--ink);
  transform: rotate(-5deg);
}

.crown-medallion::before {
  content: "";
  position: absolute;
  inset: 7px;
  border: 2px dashed rgba(25, 22, 36, 0.28);
  border-radius: 18px;
}

.crown-medallion svg {
  width: 51px;
  height: 51px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.special-main {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.special-label {
  margin: 0 0 7px;
  color: rgba(25, 22, 36, 0.66);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.16em;
}

.special-main h3 {
  margin: 0;
  overflow: hidden;
  color: var(--ink);
  font-family: var(--display);
  font-size: clamp(2rem, 4.3vw, 3.45rem);
  font-weight: 900;
  letter-spacing: -0.035em;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.special-main h3.is-empty {
  color: rgba(25, 22, 36, 0.4);
}

.special-copy {
  margin: 10px 0 0;
  color: rgba(25, 22, 36, 0.64);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.special-score {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: baseline;
  gap: 7px;
  padding: 15px 19px 13px;
  border: 3px solid var(--ink);
  border-radius: 18px;
  background: var(--ink);
  box-shadow: 5px 5px 0 var(--pink);
  color: var(--yellow);
  transform: rotate(2deg);
  white-space: nowrap;
}

.special-score > span:first-child {
  color: var(--yellow);
  font-family: var(--number);
  font-size: clamp(2.8rem, 5.6vw, 4.6rem);
  font-weight: 400;
  letter-spacing: 0.01em;
  line-height: 0.92;
}

.special-score.is-long > span:first-child {
  font-size: clamp(2rem, 4vw, 3.4rem);
}

.special-unit {
  color: var(--paper);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.special-stamp {
  position: absolute;
  right: 18px;
  bottom: 13px;
  z-index: 1;
  color: rgba(25, 22, 36, 0.13);
  font-family: var(--display);
  font-size: 35px;
  font-weight: 900;
  letter-spacing: 0.06em;
  line-height: 1;
  writing-mode: vertical-rl;
  pointer-events: none;
  user-select: none;
}

.float-sticker {
  position: absolute;
  z-index: 2;
  font-size: 27px;
  line-height: 1;
  filter: drop-shadow(2px 3px 0 rgba(25, 22, 36, 0.18));
  animation: floaty 4.2s ease-in-out infinite;
  pointer-events: none;
  user-select: none;
}

.float-sticker--coin {
  top: 18px;
  right: 35%;
}

.float-sticker--fire {
  right: 21%;
  bottom: 19px;
  font-size: 32px;
  animation-delay: -1.4s;
}

.float-sticker--star {
  top: 22px;
  left: 38%;
  font-size: 20px;
  animation-delay: -2.6s;
}

/* ---------- 十强 ---------- */

.board-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 15px;
}

.sort-note {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 0 0 3px;
  padding: 4px 9px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.sort-note svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: var(--ink);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.rank-list {
  display: flex;
  flex-direction: column;
  gap: 11px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rank-row {
  position: relative;
  display: grid;
  grid-template-columns: 52px 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 15px;
  min-height: 78px;
  padding: 13px 19px;
  overflow: hidden;
  border: 3px solid var(--ink);
  border-radius: 18px;
  background: var(--paper);
  box-shadow: 4px 4px 0 var(--ink);
  transition: transform 0.16s, box-shadow 0.16s, background 0.16s;
  animation: row-pop 0.42s cubic-bezier(0.2, 1.1, 0.4, 1) both;
  animation-delay: calc(var(--row-index, 0) * 35ms);
}

.rank-row:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--ink);
}

.rank-row--1 {
  background: linear-gradient(100deg, #ffe66d, var(--yellow) 58%, #ffc42b);
}

.rank-row--2 {
  background: linear-gradient(100deg, #d8fbff, var(--cyan-soft) 58%, #b5f4ff);
}

.rank-row--3 {
  background: linear-gradient(100deg, #ffe1eb, var(--pink-soft) 58%, #ffc2d6);
}

.rank-number {
  display: grid;
  place-items: center;
  width: 45px;
  height: 45px;
  border: 2.5px solid var(--ink);
  border-radius: 12px;
  background: var(--paper);
  box-shadow: var(--shadow-xs);
  color: var(--ink);
  font-family: var(--number);
  font-size: 21px;
  line-height: 1;
  letter-spacing: 0.01em;
  transform: rotate(-3deg);
}

.rank-number small {
  display: none;
}

.rank-row--1 .rank-number {
  background: var(--ink);
  color: var(--yellow);
  transform: rotate(4deg);
}

.rank-row--2 .rank-number {
  background: var(--blue);
  color: #fff;
}

.rank-row--3 .rank-number {
  background: var(--pink);
  color: var(--ink);
}

.avatar {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 2.5px solid var(--ink);
  border-radius: 50%;
  background: var(--lime);
  color: var(--ink);
  font-family: var(--display);
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
  box-shadow: var(--shadow-xs);
  user-select: none;
}

.rank-row--1 .avatar {
  background: var(--paper);
}

.rank-row--2 .avatar {
  background: var(--cyan);
}

.rank-row--3 .avatar {
  background: var(--pink-soft);
}

.avatar.is-empty {
  background: #ebe5d8;
  color: rgba(25, 22, 36, 0.35);
  font-family: var(--sans);
  font-size: 13px;
}

.player-info {
  display: block;
  min-width: 0;
}

.player-name-line {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.player-name {
  overflow: hidden;
  color: var(--ink);
  font-family: var(--display);
  font-size: 19px;
  font-weight: 900;
  letter-spacing: -0.01em;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-name.is-empty {
  color: rgba(25, 22, 36, 0.38);
  font-family: var(--sans);
  font-weight: 700;
}

.player-tag {
  flex: 0 0 auto;
  padding: 2px 7px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: var(--yellow);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.06em;
  line-height: 1.4;
  transform: rotate(-3deg);
}

.progress {
  display: block;
  width: min(310px, 82%);
  height: 8px;
  margin-top: 6px;
  overflow: hidden;
  border: 1.5px solid var(--ink);
  border-radius: 99px;
  background: #fff;
}

.progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--pink), var(--orange), var(--yellow-deep));
  transition: width 0.6s cubic-bezier(0.2, 1, 0.4, 1);
}

.score-block {
  display: flex;
  align-items: baseline;
  gap: 3px;
  padding: 7px 10px 6px;
  border: 2.5px solid var(--ink);
  border-radius: 12px;
  background: var(--ink);
  box-shadow: var(--shadow-xs);
  color: var(--yellow);
  white-space: nowrap;
  transform: rotate(1deg);
}

.score-value {
  color: var(--yellow);
  font-family: var(--number);
  font-size: 26px;
  font-weight: 400;
  letter-spacing: 0.01em;
  line-height: 1;
}

.score-block.is-long .score-value {
  font-size: 21px;
}

.rank-row--1 .score-value {
  color: var(--yellow);
}

.score-unit {
  color: rgba(255, 253, 246, 0.7);
  font-size: 8px;
  font-weight: 900;
}

.board-footnote {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 13px 2px 0;
  color: rgba(25, 22, 36, 0.48);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.board-footnote span {
  display: inline-block;
  width: 11px;
  height: 3px;
  border-radius: 99px;
  background: var(--pink);
}

/* ---------- 页脚 ---------- */

.site-footer {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 46px;
  padding: 20px 0 34px;
  border-top: 2px dashed rgba(25, 22, 36, 0.28);
  color: rgba(25, 22, 36, 0.52);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.footer-brand {
  margin: 0;
  color: var(--ink);
  font-family: var(--display);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: -0.01em;
}

.last-updated {
  margin: 0;
  color: rgba(25, 22, 36, 0.54);
}

.footer-note {
  margin: 0 0 0 auto;
}

/* ---------- QQ 风格公告弹窗 ---------- */

.notice-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 22px;
}

.notice-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(25, 22, 36, 0.58);
  backdrop-filter: blur(8px) saturate(0.8);
  -webkit-backdrop-filter: blur(8px) saturate(0.8);
  animation: fade-in 0.26s ease both;
}

.notice-window {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(540px, 100%);
  max-height: min(88dvh, 720px);
  overflow: hidden;
  border: 3px solid var(--ink);
  border-radius: 16px;
  background: #fff;
  color: #1f2329;
  box-shadow: 9px 9px 0 rgba(25, 22, 36, 0.36);
  animation: notice-in 0.38s cubic-bezier(0.2, 1.15, 0.4, 1) both;
  font-family: var(--sans);
}

.notice-modal.is-closing .notice-window {
  animation: notice-out 0.2s ease-in both;
}

.notice-modal.is-closing .notice-backdrop {
  animation: fade-out 0.2s ease-in both;
}

.notice-titlebar {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: 0 0 auto;
  height: 48px;
  padding: 0 12px 0 15px;
  border-bottom: 2px solid var(--ink);
  background: linear-gradient(180deg, #f8fbff, #eef5ff);
  color: #4a5665;
  font-size: 13px;
  user-select: none;
}

.qq-mark {
  display: grid;
  place-items: center;
  width: 23px;
  height: 23px;
  border: 1.5px solid var(--ink);
  border-radius: 50%;
  background: var(--qq-blue);
  color: #fff;
}

.qq-mark svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.notice-app {
  font-weight: 900;
  letter-spacing: 0.03em;
}

.notice-group {
  padding: 2px 7px;
  border: 1.5px solid rgba(25, 22, 36, 0.14);
  border-radius: 4px;
  background: #e8eef4;
  color: #788493;
  font-size: 10px;
  font-weight: 700;
}

.notice-close {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin-left: auto;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #8e98a5;
  font-family: Arial, sans-serif;
  font-size: 22px;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
  transition: background 0.16s, color 0.16s;
}

.notice-close:hover {
  background: #e8edf3;
  color: #47515e;
}

.notice-body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 24px 27px 6px;
}

.notice-heading {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}

.notice-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  border: 2px solid var(--ink);
  border-radius: 14px;
  background: var(--cyan-soft);
  color: var(--blue);
  box-shadow: var(--shadow-xs);
  transform: rotate(-3deg);
}

.notice-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.notice-from {
  margin: 1px 0 4px;
  color: #8b96a4;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.notice-heading h2 {
  margin: 0;
  color: var(--ink);
  font-family: var(--display);
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.38;
  overflow-wrap: anywhere;
}

.notice-content {
  max-height: 34dvh;
  overflow-y: auto;
  padding: 1px 6px 1px 1px;
  color: #3f4854;
  font-size: 14px;
  letter-spacing: 0.01em;
  line-height: 1.88;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  scrollbar-width: thin;
  scrollbar-color: #cbd5df transparent;
}

.notice-content::-webkit-scrollbar,
.notice-body::-webkit-scrollbar {
  width: 5px;
}

.notice-content::-webkit-scrollbar-thumb,
.notice-body::-webkit-scrollbar-thumb {
  border-radius: 99px;
  background: #cbd5df;
}

.notice-sign {
  margin: 14px 0 9px;
  color: #9ba5b1;
  font-size: 11px;
  font-weight: 700;
  text-align: right;
  letter-spacing: 0.02em;
}

.notice-footer {
  flex: 0 0 auto;
  padding: 9px 27px 20px;
  background: #fff;
}

.notice-confirm {
  display: block;
  width: 100%;
  height: 45px;
  border: 2.5px solid var(--ink);
  border-radius: 10px;
  background: linear-gradient(180deg, #46c9ff, var(--qq-blue));
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.18em;
  cursor: pointer;
  box-shadow: 3px 3px 0 var(--ink);
  transition: filter 0.16s, transform 0.14s, box-shadow 0.14s;
}

.notice-confirm:hover {
  filter: brightness(1.04);
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 var(--ink);
}

.notice-confirm:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--ink);
}

.notice-confirm:focus-visible {
  outline: 3px solid rgba(25, 22, 36, 0.34);
  outline-offset: 2px;
}

.notice-hint {
  margin: 8px 0 0;
  color: #a9b1bc;
  font-size: 10px;
  font-weight: 700;
  text-align: center;
  letter-spacing: 0.02em;
}

/* ---------- 登录 ---------- */

.login-modal {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: grid;
  place-items: center;
  padding: 20px;
}

.login-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(25, 22, 36, 0.56);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  animation: fade-in 0.22s ease both;
}

.login-card {
  position: relative;
  width: min(390px, 100%);
  padding: 32px 30px 28px;
  border: 3px solid var(--ink);
  border-radius: 24px;
  background: var(--paper);
  box-shadow: 10px 10px 0 var(--ink);
  animation: modal-pop 0.32s cubic-bezier(0.2, 1.15, 0.4, 1) both;
}

.login-close,
.editor-close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 2px solid var(--ink);
  border-radius: 9px;
  background: var(--paper);
  color: var(--ink);
  font-family: Arial, sans-serif;
  font-size: 20px;
  font-weight: 400;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow-xs);
  transition: transform 0.14s, background 0.14s;
}

.login-close:hover,
.editor-close:hover {
  background: var(--yellow);
  transform: rotate(4deg);
}

.login-seal {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin-bottom: 17px;
  border: 2.5px solid var(--ink);
  border-radius: 15px;
  background: var(--yellow);
  box-shadow: var(--shadow-sm);
  color: var(--ink);
  font-family: var(--number);
  font-size: 18px;
  letter-spacing: 0.03em;
  transform: rotate(-5deg);
}

.login-kicker {
  margin: 0 0 5px;
  color: var(--pink);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.18em;
}

.login-card h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 25px;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.login-sub {
  margin: 7px 0 22px;
  color: rgba(25, 22, 36, 0.56);
  font-size: 11px;
  font-weight: 700;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 15px;
}

.field > span:first-child {
  color: rgba(25, 22, 36, 0.62);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.field input,
.field textarea {
  width: 100%;
  border: 2px solid var(--ink);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  transition: box-shadow 0.16s, border-color 0.16s;
}

.field input {
  height: 44px;
  padding: 0 12px;
}

.field textarea {
  min-height: 120px;
  padding: 10px 12px;
  line-height: 1.7;
  resize: vertical;
}

.field input::placeholder,
.field textarea::placeholder {
  color: rgba(25, 22, 36, 0.28);
}

.field input:focus,
.field textarea:focus {
  border-color: var(--ink);
  box-shadow: var(--shadow-xs);
  outline: none;
}

.field input[type="number"] {
  font-variant-numeric: tabular-nums;
}

.password-wrap {
  position: relative;
  display: block;
}

.password-wrap input {
  padding-right: 55px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 5px;
  height: 33px;
  padding: 0 9px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--blue);
  font-size: 10px;
  font-weight: 900;
  cursor: pointer;
}

.password-toggle:hover {
  background: var(--cyan-soft);
}

.login-error {
  min-height: 17px;
  margin: -3px 0 8px;
  color: var(--danger);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.5;
}

.primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 45px;
  padding: 0 18px;
  border: 2.5px solid var(--ink);
  border-radius: 10px;
  background: var(--yellow);
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.03em;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform 0.14s, box-shadow 0.14s, background 0.14s;
}

.primary-btn:hover {
  background: #ffe56b;
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 var(--ink);
}

.primary-btn:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--ink);
}

.primary-btn:disabled {
  cursor: wait;
  filter: saturate(0.5);
  opacity: 0.68;
}

.login-submit {
  width: 100%;
  margin-top: 2px;
}

/* ---------- 管理台 ---------- */

.editor-overlay {
  position: fixed;
  inset: 0;
  z-index: 900;
}

.editor-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(25, 22, 36, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: fade-in 0.22s ease both;
}

.editor-panel {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  width: min(530px, 100%);
  height: 100%;
  height: 100dvh;
  border-left: 3px solid var(--ink);
  background:
    radial-gradient(circle at 100% 0%, rgba(255, 93, 143, 0.12), transparent 36%),
    var(--bg);
  box-shadow: -12px 0 0 rgba(25, 22, 36, 0.08);
  animation: drawer-in 0.32s cubic-bezier(0.2, 1.05, 0.4, 1) both;
}

.editor-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 0 0 auto;
  padding: 22px 24px 16px;
  border-bottom: 2px solid var(--ink);
}

.editor-kicker {
  margin: 0 0 4px;
  color: var(--pink);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.2em;
}

.editor-header h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.editor-close {
  position: static;
}

.editor-tabs {
  display: flex;
  flex: 0 0 auto;
  gap: 7px;
  padding: 12px 24px 0;
  border-bottom: 2px solid var(--ink);
}

.editor-tab-btn {
  position: relative;
  min-width: 76px;
  height: 40px;
  padding: 0 14px;
  border: 2px solid var(--ink);
  border-bottom: 0;
  border-radius: 10px 10px 0 0;
  background: #f2e8d3;
  color: rgba(25, 22, 36, 0.48);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.16s, color 0.16s;
}

.editor-tab-btn:hover {
  background: #fff8e8;
  color: var(--ink);
}

.editor-tab-btn.is-active {
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 -3px 0 var(--pink) inset;
}

.editor-tab {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 20px 24px 28px;
  scrollbar-width: thin;
  scrollbar-color: rgba(25, 22, 36, 0.24) transparent;
}

.editor-tab::-webkit-scrollbar {
  width: 6px;
}

.editor-tab::-webkit-scrollbar-thumb {
  border-radius: 99px;
  background: rgba(25, 22, 36, 0.24);
}

.editor-block {
  margin-bottom: 24px;
  padding-bottom: 23px;
  border-bottom: 2px dashed rgba(25, 22, 36, 0.2);
}

.editor-block:last-of-type {
  border-bottom: 0;
}

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

.block-head h3 {
  margin: 0;
  font-family: var(--display);
  font-size: 17px;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.block-head > span {
  padding: 2px 7px;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  background: var(--cyan-soft);
  color: var(--ink-soft);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.03em;
}

.block-hint {
  margin: -3px 0 13px;
  color: rgba(25, 22, 36, 0.5);
  font-size: 10px;
  font-weight: 600;
  line-height: 1.65;
}

.special-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(100px, 0.8fr);
  gap: 11px;
}

.special-grid .field {
  margin-bottom: 7px;
}

.edit-players {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.edit-player-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 106px;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border: 2px solid var(--ink);
  border-radius: 11px;
  background: var(--paper);
  box-shadow: var(--shadow-xs);
}

.edit-rank {
  color: var(--ink);
  font-family: var(--number);
  font-size: 15px;
  text-align: center;
}

.edit-player-row input {
  width: 100%;
  height: 36px;
  padding: 0 9px;
  border: 1.5px solid rgba(25, 22, 36, 0.3);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  transition: border-color 0.16s, box-shadow 0.16s;
}

.edit-player-row input:focus {
  border-color: var(--ink);
  box-shadow: var(--shadow-xs);
  outline: none;
}

.edit-player-row input::placeholder {
  color: rgba(25, 22, 36, 0.26);
}

.edit-player-row input[type="number"] {
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.text-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 35px;
  padding: 0 11px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: var(--shadow-xs);
  transition: transform 0.14s, box-shadow 0.14s, background 0.14s;
}

.text-btn:hover {
  background: var(--yellow);
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 var(--ink);
}

.text-btn:active {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0 var(--ink);
}

.backup-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.file-btn {
  cursor: pointer;
}

.save-bar {
  display: flex;
  align-items: stretch;
  gap: 8px;
  margin-top: 2px;
}

.save-status {
  flex: 1 1 auto;
  margin: 0;
  padding: 10px 12px;
  border: 2px solid var(--ink);
  border-radius: 9px;
  background: var(--paper);
  color: rgba(25, 22, 36, 0.5);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.5;
  text-align: center;
  transition: background 0.18s, color 0.18s;
}

.save-status[data-state="saving"] {
  background: #fff5c4;
  color: var(--ink);
}

.save-status[data-state="saved"] {
  background: #e9ffe9;
  color: #1d7a45;
}

.save-status[data-state="error"] {
  background: #ffe8e8;
  color: #a02d2d;
}

.save-bar .text-btn {
  flex: 0 0 auto;
  min-height: 39px;
}

.notice-actions {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.notice-actions .primary-btn {
  width: 100%;
}

.notice-actions > span {
  color: rgba(25, 22, 36, 0.45);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.5;
  text-align: center;
}

.editor-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex: 0 0 auto;
  padding: 13px 24px calc(13px + env(safe-area-inset-bottom));
  border-top: 2px solid var(--ink);
  background: #fff8e8;
}

.editor-footer .ghost-btn {
  height: 35px;
  background: var(--paper);
  font-size: 10px;
  box-shadow: var(--shadow-xs);
}

.editor-footer > span {
  color: rgba(25, 22, 36, 0.42);
  font-size: 9px;
  font-weight: 700;
}

/* ---------- Toast ---------- */

.toast {
  position: fixed;
  bottom: 25px;
  left: 50%;
  z-index: 1200;
  max-width: min(92vw, 520px);
  padding: 11px 19px;
  border: 2.5px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  box-shadow: 4px 4px 0 var(--pink);
  color: var(--yellow);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-align: center;
  transform: translate(-50%, 0);
  animation: toast-in 0.25s cubic-bezier(0.2, 1.15, 0.4, 1) both;
}

.toast.is-error {
  background: var(--danger);
  color: #fff;
  box-shadow: 4px 4px 0 var(--ink);
}

/* ---------- 动效 ---------- */

@keyframes pop-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes slide-down {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes row-pop {
  from {
    opacity: 0;
    transform: translateY(9px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes notice-in {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes notice-out {
  to {
    opacity: 0;
    transform: translateY(10px) scale(0.975);
  }
}

@keyframes modal-pop {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes drawer-in {
  from {
    transform: translateX(100%);
  }
  to {
    transform: translateX(0);
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fade-out {
  to {
    opacity: 0;
  }
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translate(-50%, 10px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

@keyframes blink {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.28);
  }
}

@keyframes floaty {
  0%,
  100% {
    transform: translateY(0) rotate(-4deg);
  }
  50% {
    transform: translateY(-7px) rotate(5deg);
  }
}

/* ---------- 响应式 ---------- */

@media (max-width: 880px) {
  .site-header {
    align-items: flex-start;
  }

  h1 {
    white-space: normal;
  }

  .header-tools {
    flex-direction: column;
    align-items: flex-end;
    gap: 7px;
  }

  .special-card {
    gap: 22px;
    padding: 30px;
  }

  .crown-medallion {
    width: 88px;
    height: 88px;
    border-radius: 22px;
  }

  .crown-medallion svg {
    width: 42px;
    height: 42px;
  }

  .special-score {
    padding: 12px 15px 11px;
  }
}

@media (max-width: 720px) {
  .app {
    padding: 0 17px;
  }

  .site-header {
    flex-direction: column;
    gap: 18px;
    padding: 26px 0 23px;
  }

  .brand {
    gap: 14px;
  }

  .class-seal {
    width: 60px;
    height: 60px;
    border-radius: 14px;
    box-shadow: 4px 4px 0 var(--ink);
  }

  .class-seal span {
    font-size: 20px;
  }

  .kicker {
    font-size: 8px;
    letter-spacing: 0.11em;
  }

  h1 {
    font-size: clamp(1.66rem, 7.3vw, 2.4rem);
    letter-spacing: -0.045em;
  }

  .subtitle {
    margin-top: 5px;
    font-size: 9px;
    letter-spacing: 0.08em;
  }

  .header-tools {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    width: 100%;
  }

  .main {
    gap: 0;
  }

  .special-section {
    margin-bottom: 36px;
  }

  .notice-mini {
    margin-bottom: 18px;
    min-height: 46px;
  }

  .section-head {
    gap: 9px;
    margin-bottom: 13px;
  }

  .section-no {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    font-size: 13px;
  }

  .section-kicker {
    font-size: 8px;
    letter-spacing: 0.14em;
  }

  .section-title h2 {
    font-size: 1.35rem;
  }

  .section-note {
    display: none;
  }

  .special-card {
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 15px;
    min-height: 0;
    padding: 23px 19px 20px;
    border-radius: 21px;
    box-shadow: 6px 6px 0 var(--ink);
  }

  .special-frame {
    inset: 6px;
    border-radius: 15px;
  }

  .crown-medallion {
    width: 61px;
    height: 61px;
    border-radius: 16px;
    box-shadow: 4px 4px 0 var(--ink);
  }

  .crown-medallion::before {
    inset: 5px;
    border-radius: 11px;
  }

  .crown-medallion svg {
    width: 28px;
    height: 28px;
  }

  .special-label {
    margin-bottom: 4px;
    font-size: 7px;
    letter-spacing: 0.1em;
  }

  .special-main h3 {
    font-size: clamp(1.64rem, 7vw, 2.3rem);
  }

  .special-copy {
    margin-top: 6px;
    font-size: 9px;
    line-height: 1.45;
  }

  .special-score {
    grid-column: 1 / -1;
    justify-content: flex-start;
    gap: 6px;
    margin-top: 3px;
    padding: 10px 13px 9px;
    border-radius: 13px;
    box-shadow: 4px 4px 0 var(--pink);
    transform: rotate(0.6deg);
  }

  .special-score > span:first-child {
    font-size: 2.5rem;
  }

  .special-score.is-long > span:first-child {
    font-size: 1.8rem;
  }

  .special-unit {
    font-size: 8px;
  }

  .float-sticker--coin {
    top: 12px;
    right: 22px;
    font-size: 23px;
  }

  .float-sticker--fire,
  .float-sticker--star {
    display: none;
  }

  .special-stamp {
    display: none;
  }

  .board-head {
    align-items: flex-end;
    gap: 8px;
  }

  .sort-note {
    font-size: 8px;
    padding: 3px 7px;
  }

  .sort-note svg {
    display: none;
  }

  .rank-list {
    gap: 9px;
  }

  .rank-row {
    grid-template-columns: 37px 37px minmax(0, 1fr) auto;
    gap: 8px;
    min-height: 68px;
    padding: 10px 10px;
    border-radius: 14px;
    box-shadow: 3px 3px 0 var(--ink);
  }

  .rank-number {
    width: 35px;
    height: 35px;
    border-radius: 9px;
    font-size: 17px;
    box-shadow: 2px 2px 0 var(--ink);
  }

  .avatar {
    width: 35px;
    height: 35px;
    border-width: 2px;
    font-size: 14px;
    box-shadow: 2px 2px 0 var(--ink);
  }

  .player-name {
    font-size: 15px;
    letter-spacing: -0.02em;
  }

  .player-tag {
    font-size: 7px;
    padding: 1px 4px;
    border-width: 1.5px;
  }

  .progress {
    width: 100%;
    height: 7px;
    margin-top: 5px;
  }

  .score-block {
    padding: 5px 7px 4px;
    border-width: 2px;
    border-radius: 9px;
    box-shadow: 2px 2px 0 var(--ink);
  }

  .score-value {
    font-size: 20px;
  }

  .score-block.is-long .score-value {
    font-size: 16px;
  }

  .rank-row--1 .score-value {
    font-size: 23px;
  }

  .rank-row--1 .score-block.is-long .score-value {
    font-size: 18px;
  }

  .score-unit {
    font-size: 7px;
  }

  .board-footnote {
    font-size: 9px;
  }

  .site-footer {
    margin-top: 34px;
    gap: 7px 12px;
    padding: 16px 0 26px;
  }

  .footer-note {
    flex-basis: 100%;
    margin-left: 0;
  }

  .notice-modal {
    padding: 13px;
  }

  .notice-window {
    max-height: 92dvh;
    border-radius: 14px;
    box-shadow: 6px 6px 0 rgba(25, 22, 36, 0.34);
  }

  .notice-titlebar {
    height: 44px;
    padding-left: 12px;
  }

  .notice-body {
    padding: 19px 19px 5px;
  }

  .notice-heading {
    gap: 10px;
    margin-bottom: 13px;
  }

  .notice-icon {
    width: 38px;
    height: 38px;
    border-radius: 11px;
  }

  .notice-icon svg {
    width: 19px;
    height: 19px;
  }

  .notice-heading h2 {
    font-size: 18px;
  }

  .notice-content {
    max-height: 38dvh;
    font-size: 13.5px;
    line-height: 1.82;
  }

  .notice-footer {
    padding: 8px 19px 16px;
  }

  .notice-confirm {
    height: 43px;
  }

  .login-card {
    padding: 27px 22px 23px;
    box-shadow: 7px 7px 0 var(--ink);
  }

  .editor-panel {
    border-left: 0;
  }

  .editor-header {
    padding: 19px 18px 13px;
  }

  .editor-tabs {
    padding: 10px 18px 0;
  }

  .editor-tab {
    padding: 18px 18px 24px;
  }

  .editor-footer {
    padding-right: 18px;
    padding-left: 18px;
  }

  .special-grid {
    grid-template-columns: minmax(0, 1.35fr) minmax(86px, 0.75fr);
    gap: 8px;
  }

  .edit-player-row {
    grid-template-columns: 28px minmax(0, 1fr) 92px;
    gap: 7px;
  }

  .toast {
    bottom: 16px;
    width: max-content;
    max-width: 92vw;
  }
}

@media (max-width: 390px) {
  .sync-badge {
    padding: 0 9px;
  }

  .admin-btn {
    padding: 0 11px;
  }

  .notice-mini-action {
    display: none;
  }

  .rank-row {
    grid-template-columns: 32px 33px minmax(0, 1fr) auto;
    gap: 6px;
    padding: 9px;
  }

  .rank-number {
    width: 31px;
    height: 31px;
    font-size: 15px;
  }

  .avatar {
    width: 32px;
    height: 32px;
    font-size: 13px;
  }

  .player-name {
    font-size: 14px;
  }

  .score-value {
    font-size: 18px;
  }

  .rank-row--1 .score-value {
    font-size: 21px;
  }

  .special-score {
    padding-left: 13px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    transition-duration: 0.01ms !important;
  }
}
