/* ============================================================
   灰灰UU HUIU — 设计系统
   水蓝 + 白 · 轻透 · 星轨
   ============================================================ */

:root {
  --a50: #f2fbff;
  --a100: #e1f6ff;
  --a200: #c0ecfb;
  --a300: #8fdcf5;
  --a400: #4fc4ec;
  --a500: #1fa6dc;
  --a600: #1289bc;
  --a700: #0e6e98;

  --ink: #0b2c3c;
  --ink2: #1d4a5e;
  /* 次要文字的对比度：4a6b7c ≈ 5.5:1、54727f ≈ 5.1:1，均达到 WCAG AA（4.5:1） */
  --muted: #4a6b7c;
  --muted2: #54727f;

  --line: #dceef7;
  --line2: #eef7fb;
  --white: #ffffff;
  --page: #f8fdff;
  --silver: #c7d8e1;

  --r-sm: 10px;
  --r: 14px;
  --r-lg: 20px;
  --r-xl: 28px;

  --sh-sm: 0 1px 2px rgba(11, 44, 60, 0.05), 0 4px 12px rgba(11, 44, 60, 0.05);
  --sh: 0 2px 8px rgba(11, 44, 60, 0.05), 0 18px 40px rgba(11, 44, 60, 0.07);
  --sh-lg: 0 12px 34px rgba(18, 137, 188, 0.2);

  --font-d: 'Outfit', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', system-ui, sans-serif;
  --font-b: system-ui, -apple-system, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB',
    'Microsoft YaHei', sans-serif;
  --font-mono: 'SFMono-Regular', Menlo, Consolas, 'Liberation Mono', monospace;

  --nav-h: 68px;
  --maxw: 1160px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-b);
  color: var(--ink);
  background: var(--page);
  font-size: 15px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
}

a {
  color: var(--a600);
  text-decoration: none;
  transition: color 0.18s ease;
}

a:hover {
  color: var(--a500);
}

img {
  max-width: 100%;
  display: block;
}

button,
input,
select,
textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

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

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

.bg-decor {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
  background:
    radial-gradient(900px 520px at 12% -6%, rgba(79, 196, 236, 0.16), transparent 62%),
    radial-gradient(760px 460px at 88% 4%, rgba(143, 220, 245, 0.2), transparent 60%),
    radial-gradient(1100px 700px at 50% 110%, rgba(31, 166, 220, 0.09), transparent 65%),
    var(--page);
}

.bg-decor::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle, rgba(31, 166, 220, 0.28) 1px, transparent 1.4px),
    radial-gradient(circle, rgba(31, 166, 220, 0.18) 1px, transparent 1.4px);
  background-size: 120px 120px, 76px 76px;
  background-position: 0 0, 38px 42px;
  opacity: 0.5;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.9), transparent 78%);
  -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.9), transparent 78%);
}

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

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

main#app {
  min-height: calc(100vh - var(--nav-h) - 240px);
  padding-bottom: 72px;
}

.section {
  padding: 56px 0;
}

.eyebrow {
  font-family: var(--font-d);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--a600);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.eyebrow::before {
  content: '';
  width: 22px;
  height: 1px;
  background: var(--a400);
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-d);
  color: var(--ink);
  letter-spacing: -0.01em;
  margin: 0 0 12px;
  line-height: 1.25;
}

h1 {
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 700;
}
h2 {
  font-size: clamp(24px, 3.4vw, 34px);
  font-weight: 700;
}
h3 {
  font-size: 20px;
  font-weight: 600;
}

.page-head {
  padding: 46px 0 26px;
}

.page-head h1 {
  margin-bottom: 8px;
}

.page-head p {
  color: var(--muted);
  margin: 0;
  max-width: 640px;
}

/* ---------- 导航 ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: saturate(1.6) blur(14px);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid var(--line);
}

/* 三栏网格：左品牌 / 中导航（真正居中） / 右外链 */
.nav {
  height: var(--nav-h);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  flex-shrink: 0;
  justify-self: start;
  min-width: 0;
}

.brand:hover {
  color: var(--ink);
}

.brand-name {
  font-family: var(--font-d);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.02em;
  line-height: 1.1;
}

.brand-latin {
  display: block;
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.28em;
  color: var(--muted2);
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  justify-self: center;
}

/* ---------- 顶栏右侧 ---------- */

.nav-right {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-self: end;
}

.nav-right a.nav-admin {
  padding: 8px 15px;
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink2);
  white-space: nowrap;
}

.nav-right a.nav-admin:hover {
  background: var(--a50);
  color: var(--a600);
}

.nav-right a.nav-admin.active {
  background: var(--a100);
  color: var(--a700);
  font-weight: 600;
}

.nav-right a.nav-bili {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  background: linear-gradient(135deg, var(--a400), var(--a600));
  box-shadow: 0 4px 12px rgba(31, 166, 220, 0.26);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.nav-right a.nav-bili:hover {
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 7px 16px rgba(31, 166, 220, 0.34);
}

.nav-links a {
  position: relative;
  padding: 8px 15px;
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink2);
}

.nav-links a:hover {
  background: var(--a50);
  color: var(--a600);
}

.nav-links a.active {
  background: var(--a100);
  color: var(--a700);
  font-weight: 600;
}

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.nav-toggle span {
  display: block;
  width: 17px;
  height: 1.6px;
  background: var(--ink2);
  position: relative;
}

.nav-toggle span::before,
.nav-toggle span::after {
  content: '';
  position: absolute;
  left: 0;
  width: 17px;
  height: 1.6px;
  background: var(--ink2);
}

.nav-toggle span::before {
  top: -5px;
}
.nav-toggle span::after {
  top: 5px;
}

/* ---------- 按钮 ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease,
    background 0.16s ease,
    border-color 0.16s ease;
  white-space: nowrap;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--a400), var(--a600));
  color: #fff;
  box-shadow: 0 8px 20px rgba(18, 137, 188, 0.28);
}

.btn-primary:hover {
  color: #fff;
  box-shadow: var(--sh-lg);
  transform: translateY(-1px);
}

.btn-ghost {
  background: var(--white);
  border-color: var(--line);
  color: var(--ink2);
}

.btn-ghost:hover {
  border-color: var(--a300);
  color: var(--a600);
  background: var(--a50);
}

.btn-sm {
  padding: 7px 15px;
  font-size: 13px;
}

.btn-danger {
  background: #fff;
  border-color: #f3cdd4;
  color: #c0455c;
}

.btn-danger:hover {
  background: #fff3f5;
  border-color: #e8aeb8;
  color: #a23047;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* ---------- 卡片 / 通用 ---------- */

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-sm);
}

.pad {
  padding: 24px;
}

.divider {
  height: 1px;
  background: var(--line);
  margin: 26px 0;
  border: 0;
}

.muted {
  color: var(--muted);
}

.mono {
  font-family: var(--font-mono);
  font-size: 12.5px;
}

.empty {
  text-align: center;
  padding: 56px 20px;
  color: var(--muted);
}

.empty-icon {
  font-size: 34px;
  display: block;
  margin-bottom: 10px;
  opacity: 0.6;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  background: var(--a50);
  color: var(--a700);
  border: 1px solid var(--a200);
}

.badge-jp {
  background: #fff1f5;
  color: #c0455c;
  border-color: #f7d3de;
}
.badge-cn {
  background: #fff6ec;
  color: #b1632a;
  border-color: #f7ddc4;
}
.badge-en {
  background: #f0f4ff;
  color: #4a5bb5;
  border-color: #d6ddf7;
}
.badge-ot {
  background: #f2f5f6;
  color: #5f7f90;
  border-color: #dfe6e9;
}

/* ---------- 封面 / 头像 ---------- */

.cover {
  position: relative;
  overflow: hidden;
  border-radius: var(--r);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-family: var(--font-d);
  font-weight: 700;
  flex-shrink: 0;
  background: linear-gradient(140deg, var(--c1, #4fc4ec), var(--c2, #1289bc));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}

.cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cover .glyph {
  position: relative;
  z-index: 2;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
}

.cover::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 80% at 20% 15%, rgba(255, 255, 255, 0.4), transparent 55%),
    radial-gradient(60% 50% at 85% 90%, rgba(255, 255, 255, 0.18), transparent 60%);
}

.cover.lg {
  border-radius: var(--r-lg);
  aspect-ratio: 1;
  font-size: 58px;
}

.cover.sm {
  width: 56px;
  height: 56px;
  font-size: 20px;
  border-radius: 12px;
}

.cover.xs {
  width: 44px;
  height: 44px;
  font-size: 16px;
  border-radius: 10px;
}

/* ---------- Hero ---------- */

.hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
  padding: 60px 0 40px;
}

.hero h1 .cn {
  display: block;
  font-size: clamp(44px, 7vw, 76px);
  letter-spacing: 0.02em;
}

.hero .latin {
  font-family: var(--font-d);
  font-size: 13px;
  letter-spacing: 0.42em;
  color: var(--a600);
  text-transform: uppercase;
  margin-bottom: 14px;
  display: block;
}

.hero p.lead {
  font-size: 16.5px;
  color: var(--ink2);
  max-width: 520px;
  margin: 16px 0 28px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-stats {
  display: flex;
  gap: 30px;
  margin-top: 34px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.hero-stats .k {
  font-family: var(--font-d);
  font-size: 26px;
  font-weight: 700;
  line-height: 1.1;
  color: var(--a700);
}

.hero-stats .l {
  font-size: 12.5px;
  color: var(--muted);
  letter-spacing: 0.08em;
}

/* 星球视觉 */
.planet {
  position: relative;
  isolation: isolate;
  aspect-ratio: 1;
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  display: grid;
  place-items: center;
}

.planet .orb {
  position: absolute;
  width: 62%;
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 26%, #ffffff 0%, #d8f4ff 18%, var(--a300) 44%, var(--a500) 70%, var(--a700) 100%);
  box-shadow:
    0 24px 60px rgba(18, 137, 188, 0.32),
    inset -12px -14px 40px rgba(6, 60, 90, 0.28),
    inset 12px 14px 34px rgba(255, 255, 255, 0.55);
}

.planet .orb::before {
  content: '';
  position: absolute;
  inset: 12% 8%;
  border-radius: 50%;
  background:
    radial-gradient(ellipse at 30% 40%, rgba(255, 255, 255, 0.5), transparent 42%),
    radial-gradient(ellipse at 70% 66%, rgba(255, 255, 255, 0.28), transparent 44%);
  opacity: 0.85;
}

.planet .ring {
  position: absolute;
  width: 96%;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1.5px solid var(--a300);
  transform: rotate(-18deg);
  opacity: 0.85;
}

.planet .ring.r2 {
  width: 78%;
  border-color: var(--a200);
  transform: rotate(24deg);
  border-style: dashed;
}

.planet .ring.r3 {
  width: 112%;
  border-color: rgba(143, 220, 245, 0.55);
  transform: rotate(-6deg);
}

.planet .dot {
  position: absolute;
  border-radius: 50%;
  background: var(--a500);
  box-shadow: 0 0 12px rgba(31, 166, 220, 0.6);
}

.planet .dot.d1 {
  width: 11px;
  height: 11px;
  top: 8%;
  right: 16%;
}
.planet .dot.d2 {
  width: 7px;
  height: 7px;
  bottom: 14%;
  left: 10%;
  background: var(--a300);
}
.planet .dot.d3 {
  width: 5px;
  height: 5px;
  top: 34%;
  left: 2%;
  background: var(--a400);
}
.planet .dot.d4 {
  width: 6px;
  height: 6px;
  bottom: 30%;
  right: 4%;
  background: var(--a400);
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.planet .ring {
  animation: spin 44s linear infinite;
}
.planet .ring.r2 {
  animation-duration: 62s;
  animation-direction: reverse;
}

@keyframes floaty {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.planet .orb {
  animation: floaty 7s ease-in-out infinite;
}

/* ---------- 歌曲列表 ---------- */

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  padding: 16px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-sm);
  margin-bottom: 20px;
}

.search {
  position: relative;
  flex: 1 1 240px;
  min-width: 200px;
}

.search input {
  width: 100%;
  padding: 10px 14px 10px 38px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--a50);
  outline: none;
  transition: all 0.16s ease;
}

.search input:focus {
  border-color: var(--a400);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(79, 196, 236, 0.18);
}

.search svg {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted2);
}

.select {
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--white);
  cursor: pointer;
  outline: none;
  font-size: 14px;
}

.select:focus {
  border-color: var(--a400);
}

.song-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.song-row {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 12px 18px 12px 12px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--sh-sm);
  transition: all 0.18s ease;
  cursor: pointer;
}

.song-row:hover {
  border-color: var(--a300);
  box-shadow: var(--sh);
  transform: translateX(3px);
}

.song-row .t {
  font-weight: 600;
  font-size: 15.5px;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}

.song-row .o {
  font-size: 13px;
  color: var(--muted);
  margin-top: 2px;
}

.song-row .meta {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--muted2);
  font-size: 12.5px;
  white-space: nowrap;
}

.song-row .play {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--a200);
  background: var(--a50);
  color: var(--a600);
  display: grid;
  place-items: center;
  transition: all 0.18s ease;
}

.song-row:hover .play {
  background: linear-gradient(135deg, var(--a400), var(--a600));
  color: #fff;
  border-color: transparent;
}

/* ---------- 歌曲卡片（首页） ---------- */

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
  gap: 18px;
}

.song-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--sh-sm);
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
}

.song-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--sh);
  border-color: var(--a200);
}

.song-card .thumb {
  position: relative;
  aspect-ratio: 16 / 10;
  background: linear-gradient(140deg, var(--c1, #4fc4ec), var(--c2, #1289bc));
  display: grid;
  place-items: center;
  color: #fff;
  font-family: var(--font-d);
  font-size: 34px;
  font-weight: 700;
  overflow: hidden;
}

.song-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.song-card .thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 80% at 25% 20%, rgba(255, 255, 255, 0.32), transparent 55%);
}

.song-card .body {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.song-card .body .t {
  font-weight: 700;
  font-size: 16px;
  color: var(--ink);
}

.song-card .body .o {
  font-size: 13px;
  color: var(--muted);
}

/* ---------- 歌曲详情 ---------- */

.detail {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 40px;
  align-items: start;
}

.detail-side {
  position: sticky;
  top: calc(var(--nav-h) + 24px);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

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

.meta-list .row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 14px;
}

.meta-list .row:last-child {
  border-bottom: 0;
}

.meta-list .row .k {
  color: var(--muted);
  flex-shrink: 0;
}

.meta-list .row .v {
  text-align: right;
  font-weight: 500;
}

.player {
  width: 100%;
  border-radius: 999px;
  height: 40px;
}

.attach-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--a50);
  margin-bottom: 8px;
  font-size: 13.5px;
}

.attach-item .nm {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}

.attach-item .sz {
  color: var(--muted2);
  font-size: 12px;
}

/* ---------- Markdown 正文 ---------- */

.prose {
  font-size: 15.5px;
  line-height: 1.85;
  color: var(--ink2);
}

.prose > *:first-child {
  margin-top: 0;
}

.prose h1,
.prose h2,
.prose h3,
.prose h4 {
  margin: 30px 0 12px;
  scroll-margin-top: 90px;
}

.prose h2 {
  font-size: 22px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.prose h3 {
  font-size: 18px;
  color: var(--a700);
}

.prose p {
  margin: 0 0 14px;
}

.prose ul,
.prose ol {
  margin: 0 0 16px;
  padding-left: 22px;
}

.prose li {
  margin-bottom: 6px;
}

.prose blockquote {
  margin: 18px 0;
  padding: 14px 20px;
  border-left: 3px solid var(--a400);
  background: var(--a50);
  border-radius: 0 var(--r) var(--r) 0;
  color: var(--ink2);
}

.prose blockquote p:last-child {
  margin-bottom: 0;
}

.prose code {
  background: var(--a50);
  border: 1px solid var(--line);
  padding: 1.5px 6px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--a700);
}

.prose pre {
  background: #0b2c3c;
  color: #dff3fb;
  padding: 16px 18px;
  border-radius: var(--r);
  overflow-x: auto;
  margin: 0 0 18px;
}

.prose pre code {
  background: none;
  border: 0;
  color: inherit;
  padding: 0;
  font-size: 13px;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 18px;
  font-size: 14px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
}

.prose th,
.prose td {
  padding: 9px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.prose th {
  background: var(--a50);
  font-weight: 600;
  color: var(--a700);
}

.prose tr:last-child td {
  border-bottom: 0;
}

.prose img {
  border-radius: var(--r);
  margin: 12px 0;
}

.prose hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 26px 0;
}

.prose strong {
  color: var(--ink);
}

/* ---------- 关于页 ---------- */

.about-hero {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 40px;
  align-items: center;
  padding: 40px;
  border-radius: var(--r-xl);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(225, 246, 255, 0.75));
  border: 1px solid var(--line);
  box-shadow: var(--sh-sm);
}

.avatar {
  position: relative;
  isolation: isolate;
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid #fff;
  box-shadow: 0 12px 34px rgba(18, 137, 188, 0.24);
  background: linear-gradient(150deg, #e1f6ff, #8fdcf5);
  display: grid;
  place-items: center;
  color: #fff;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 上传的图片由 JS 异步填充：未拿到地址前保持隐藏，避免破图 */
img[data-file] {
  display: none;
}

img[data-file].ok {
  display: block;
}

.cover img[data-file] {
  position: absolute;
  inset: 0;
  z-index: 4;
}

/* 直链图片（coverSrc / audioSrc 那种）没有 data-file 属性，
   但要和上面那条表现一致 —— 否则它会留在普通流里，被前面的字形 span 挤偏移 */
.cover img:not([data-file]),
.song-card .thumb img:not([data-file]),
.avatar img:not([data-file]) {
  position: absolute;
  inset: 0;
  z-index: 4;
}

.song-card .thumb img[data-file] {
  position: absolute;
  inset: 0;
  z-index: 3;
}

.avatar img[data-file] {
  position: absolute;
  inset: 0;
  z-index: 3;
}

.spec-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0 32px;
}

/* ---------- 表单 ---------- */

.field {
  margin-bottom: 16px;
}

.field > label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink2);
  margin-bottom: 6px;
}

.input,
.textarea,
.field select {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: var(--white);
  outline: none;
  transition: all 0.16s ease;
}

.input:focus,
.textarea:focus,
.field select:focus {
  border-color: var(--a400);
  box-shadow: 0 0 0 3px rgba(79, 196, 236, 0.16);
}

.textarea {
  min-height: 120px;
  resize: vertical;
  line-height: 1.7;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.uploader {
  border: 1.5px dashed var(--a200);
  border-radius: var(--r);
  background: var(--a50);
  padding: 18px;
  text-align: center;
  cursor: pointer;
  transition: all 0.16s ease;
  font-size: 13.5px;
  color: var(--muted);
}

.uploader:hover {
  border-color: var(--a400);
  background: var(--a100);
}

.uploader input {
  display: none;
}

.thumb-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: #fff;
}

/* ---------- 后台 ---------- */

.admin-wrap {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 28px;
  align-items: start;
}

.admin-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: sticky;
  top: calc(var(--nav-h) + 24px);
}

.admin-nav button {
  text-align: left;
  padding: 10px 14px;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  background: none;
  cursor: pointer;
  font-weight: 500;
  color: var(--ink2);
  transition: all 0.16s ease;
}

.admin-nav button:hover {
  background: var(--a50);
  color: var(--a600);
}

.admin-nav button.on {
  background: var(--a100);
  border-color: var(--a200);
  color: var(--a700);
  font-weight: 700;
}

.admin-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: #fff;
  margin-bottom: 8px;
}

.admin-row .nm {
  flex: 1;
  min-width: 0;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.md-editor {
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
}

.md-editor .bar {
  display: flex;
  gap: 4px;
  padding: 6px;
  background: var(--a50);
  border-bottom: 1px solid var(--line);
}

.md-editor .bar button {
  padding: 5px 12px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: none;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.md-editor .bar button.on {
  background: #fff;
  border-color: var(--line);
  color: var(--a700);
  box-shadow: var(--sh-sm);
}

.md-editor .bar .hint {
  margin-left: auto;
  align-self: center;
  font-size: 12px;
  color: var(--muted2);
  padding-right: 8px;
}

.md-editor .area {
  padding: 14px 16px;
  min-height: 240px;
  background: #fff;
}

.md-editor .area textarea {
  width: 100%;
  min-height: 240px;
  border: 0;
  outline: none;
  resize: vertical;
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.8;
}

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

.auth-box {
  max-width: 420px;
  margin: 60px auto;
  padding: 36px;
  border-radius: var(--r-xl);
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: var(--sh);
  text-align: center;
}

.auth-box h2 {
  margin-bottom: 6px;
}

.auth-box .sub {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 26px;
}

.auth-box .field {
  text-align: left;
}

.alert {
  padding: 10px 14px;
  border-radius: var(--r-sm);
  font-size: 13.5px;
  margin-bottom: 14px;
  text-align: left;
}

.alert.err {
  background: #fff3f5;
  border: 1px solid #f7d3de;
  color: #a23047;
}

.alert.ok {
  background: #eefaf3;
  border: 1px solid #c9ecda;
  color: #1e7a52;
}

.alert.info {
  background: var(--a50);
  border: 1px solid var(--a200);
  color: var(--a700);
}

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

.site-footer {
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.7);
  padding: 40px 0 28px;
  margin-top: 40px;
}

.foot-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
}

.foot-grid h4 {
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted2);
  margin-bottom: 12px;
  font-weight: 600;
}

.foot-grid ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  font-size: 14px;
}

.foot-grid a {
  color: var(--ink2);
  /* 手机上更容易点中：把可点区域从 18px 撑到 36px 左右 */
  display: inline-block;
  padding: 9px 0;
}

.foot-grid a:hover {
  color: var(--a600);
}

.foot-bottom {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: var(--muted2);
}

/* 备案号：法规要求全站可见，占据页脚右侧（原「水蓝 #1FA6DC」的位置），链接指向工信部备案查询系统 */
.foot-icp a {
  color: var(--muted2);
  text-decoration: none;
  padding-bottom: 1px;
  border-bottom: 1px solid transparent;
  transition: color 0.18s ease, border-color 0.18s ease;
}

.foot-icp a:hover,
.foot-icp a:focus-visible {
  color: var(--a600);
  border-bottom-color: var(--a600);
}

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

#toast {
  position: fixed;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%) translateY(20px);
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  pointer-events: none;
}

.toast-item {
  padding: 11px 22px;
  border-radius: 999px;
  background: rgba(11, 44, 60, 0.94);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 10px 30px rgba(11, 44, 60, 0.28);
  animation: toastIn 0.24s ease forwards;
}

@keyframes toastIn {
  to {
    transform: translateY(0);
    opacity: 1;
  }
  from {
    transform: translateY(16px);
    opacity: 0;
  }
}

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

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-top: 36px;
  }
  .planet {
    max-width: 300px;
    order: -1;
  }
  .detail {
    grid-template-columns: 1fr;
    gap: 26px;
  }
  .detail-side {
    position: static;
  }
  .about-hero {
    grid-template-columns: 1fr;
    padding: 26px;
    gap: 24px;
    text-align: center;
  }
  .avatar {
    max-width: 170px;
    margin: 0 auto;
  }
  .admin-wrap {
    grid-template-columns: 1fr;
  }
  .admin-nav {
    position: static;
    flex-direction: row;
    overflow-x: auto;
  }
  .foot-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .wrap {
    padding: 0 16px;
  }
  /* 窄屏回退为 flex：品牌在左，右侧一组靠右，导航收进下拉 */
  .nav {
    display: flex;
    gap: 10px;
  }
  .nav-right {
    margin-left: auto;
  }
  .nav-right a.nav-admin {
    padding: 8px 11px;
    font-size: 13.5px;
  }
  /* 窄屏放不下整条文案，只留图标（hover/长按看 title） */
  .nav-right a.nav-bili {
    padding: 8px 10px;
  }
  .nav-right a.nav-bili .nav-bili-txt {
    display: none;
  }
  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 10px 16px 16px;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--sh);
  }
  .nav-links.open {
    display: flex;
  }
  .nav-links a {
    padding: 11px 12px;
    border-radius: var(--r-sm);
  }
  .nav-toggle {
    display: flex;
  }
  .hero-stats {
    gap: 20px;
  }
  .field-row {
    grid-template-columns: 1fr;
  }
  .song-row {
    grid-template-columns: 44px 1fr;
    padding-right: 12px;
  }
  .song-row .play {
    display: none;
  }
  .foot-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   首页细长条曲目列表 + 全局播放条
   ============================================================ */

.hero-meta {
  margin-top: 22px;
  font-size: 13px;
  color: var(--muted2);
  letter-spacing: 0.04em;
}

.track-sec {
  padding: 10px 0 34px;
}

.sec-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.sec-title {
  font-size: 22px;
  font-weight: 700;
  margin: 6px 0 0;
}

.sec-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.track-list {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.track-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) minmax(0, 190px) 30px;
  align-items: center;
  gap: 12px;
  padding: 10px 10px;
  border-bottom: 1px solid var(--line2);
  cursor: pointer;
  transition: background 0.15s ease;
}

.track-row:last-child {
  border-bottom: 0;
}

.track-row:hover,
.track-row.hover {
  background: var(--a50);
}

.track-row .idx {
  font-family: var(--font-d);
  font-size: 11.5px;
  color: var(--muted2);
  letter-spacing: 0.08em;
}

.track-row .nm {
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 0.15s ease;
}

.track-row:hover .nm,
.track-row.hover .nm {
  color: var(--a700);
}

.track-row .or {
  font-size: 13.5px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.track-row .play {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--muted2);
  border: 1px solid transparent;
  transition: all 0.15s ease;
}

.track-row:hover .play,
.track-row.hover .play {
  background: #fff;
  border-color: var(--a200);
  color: var(--a600);
}

.track-foot {
  margin-top: 12px;
  font-size: 13px;
  color: var(--muted2);
}

/* ---------- 全局播放条 ---------- */

.player-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 120;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: saturate(1.6) blur(16px);
  -webkit-backdrop-filter: saturate(1.6) blur(16px);
  border-top: 1px solid var(--line);
  box-shadow: 0 -10px 30px rgba(11, 44, 60, 0.1);
  transform: translateY(120%);
  transition: transform 0.3s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.player-bar.on {
  transform: translateY(0);
}

body.player-on {
  padding-bottom: 68px;
}

.pb-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.pb-cover {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  color: #fff;
  font-family: var(--font-d);
  font-weight: 700;
  font-size: 15px;
  background: linear-gradient(140deg, var(--c1, #4fc4ec), var(--c2, #1289bc));
}

.pb-info {
  min-width: 0;
  width: 168px;
  flex-shrink: 0;
}

.pb-title {
  font-size: 14px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pb-orig {
  font-size: 12px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pb-ctrls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.pb-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink2);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all 0.16s ease;
}

.pb-btn:hover {
  border-color: var(--a300);
  color: var(--a600);
}

.pb-btn.main {
  width: 38px;
  height: 38px;
  border: 0;
  background: linear-gradient(135deg, var(--a400), var(--a600));
  color: #fff;
  box-shadow: 0 6px 16px rgba(18, 137, 188, 0.3);
}

.pb-btn.main:hover {
  color: #fff;
  transform: translateY(-1px);
}

.pb-prog {
  flex: 1;
  height: 4px;
  border-radius: 999px;
  background: var(--a100);
  cursor: pointer;
  min-width: 70px;
  overflow: hidden;
}

.pb-fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--a400), var(--a600));
}

.pb-time {
  font-size: 11.5px;
  color: var(--muted);
  font-family: var(--font-mono);
  flex-shrink: 0;
  min-width: 84px;
  text-align: right;
}

@media (max-width: 640px) {
  .pb-inner {
    padding: 8px 14px;
    gap: 10px;
  }
  .pb-time {
    display: none;
  }
  .pb-info {
    width: auto;
    flex: 1;
  }
  .track-row {
    grid-template-columns: minmax(0, 1fr) auto 28px;
    gap: 10px;
  }
  .track-row .idx {
    display: none;
  }
  .track-row .or {
    font-size: 12.5px;
  }
  .sec-actions {
    width: 100%;
  }
}

/* ============================================================
   音声按钮板（Voice Buttons）
   ============================================================ */

.sb-bar {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
  padding: 12px 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--sh-sm);
}

.sb-count {
  margin-left: auto;
  font-size: 12.5px;
  color: var(--muted2);
}

.sb-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.sb-item {
  position: relative;
  display: inline-flex;
}

.sb-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: linear-gradient(135deg, var(--a400), var(--a600));
  color: #fff;
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(18, 137, 188, 0.22);
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease,
    background 0.16s ease;
}

.sb-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(18, 137, 188, 0.3);
  color: #fff;
}

.sb-btn:active {
  transform: translateY(0);
}

.sb-btn.none {
  background: #fff;
  color: var(--muted);
  border-color: var(--line);
  box-shadow: none;
}

.sb-btn.none:hover {
  border-color: var(--a300);
  color: var(--a600);
  box-shadow: var(--sh-sm);
}

.sb-btn.playing {
  background: linear-gradient(135deg, #0e6e98, #1289bc);
  box-shadow:
    0 0 0 3px rgba(79, 196, 236, 0.35),
    0 8px 18px rgba(18, 137, 188, 0.3);
}

.sb-btn.playing svg {
  animation: sbPulse 1.1s ease-in-out infinite;
}

@keyframes sbPulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.55;
    transform: scale(0.86);
  }
}

.sb-edit,
.sb-del {
  position: absolute;
  top: -6px;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  font-size: 11px;
  display: grid;
  place-items: center;
  cursor: pointer;
  line-height: 1;
  opacity: 0;
  transition: all 0.16s ease;
  box-shadow: var(--sh-sm);
}

.sb-item:hover .sb-edit,
.sb-item:hover .sb-del {
  opacity: 1;
}

.sb-edit {
  right: 25px;
}

.sb-del {
  right: -5px;
  color: #c0455c;
  border-color: #f3cdd4;
}

.sb-edit:hover {
  color: var(--a600);
  border-color: var(--a300);
}

.sb-del:hover {
  background: #fff3f5;
}

/* ---------- 弹窗 ---------- */

.modal-mask {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(11, 44, 60, 0.4);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  display: grid;
  place-items: center;
  padding: 20px;
}

.modal {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-radius: var(--r-lg);
  box-shadow: 0 20px 60px rgba(11, 44, 60, 0.28);
  padding: 26px;
  animation: modalIn 0.2s ease;
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
}

.modal h3 {
  margin-bottom: 14px;
}

.modal .actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 18px;
}

@media (max-width: 640px) {
  .sb-count {
    margin-left: 0;
    width: 100%;
  }
  .sb-edit,
  .sb-del {
    opacity: 1;
  }
}

/* ---------- 数据统计页 ---------- */

.stat-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.sh-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 4px;
}

.sh-upd {
  font-size: 12.5px;
  color: var(--muted2);
}

/* 主播概览卡 */

.stat-profile {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  padding: 18px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-sm);
  margin-bottom: 16px;
}

.sp-avatar {
  position: relative;
  width: 84px;
  height: 84px;
  flex-shrink: 0;
}

.sp-avatar img {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--a200);
  background: var(--a50);
}

.sp-live {
  position: absolute;
  left: 50%;
  bottom: -6px;
  transform: translateX(-50%);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 2px 9px;
  border-radius: 999px;
  white-space: nowrap;
  background: #eef2f5;
  color: var(--muted);
  border: 1px solid var(--line);
}

.sp-live.on {
  background: linear-gradient(135deg, #ff6b8b, #ff3b63);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(255, 59, 99, 0.3);
}

.sp-name {
  font-family: var(--font-d);
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 9px;
}

.sp-level {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--a100);
  color: var(--a700);
}

.sp-uid {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted2);
  margin-top: 3px;
}

.sp-sign {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.7;
}

.sp-sub {
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted2);
}

.sp-note {
  font-size: 12px;
  font-weight: 400;
  color: var(--muted2);
}

.sp-note b.up {
  color: var(--a600);
  font-weight: 700;
}

.sp-note b.down {
  color: #7aa99a;
  font-weight: 700;
}

.sp-room {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-end;
  min-width: 190px;
}

.sp-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 12.5px;
  color: var(--muted2);
}

.sp-row b {
  color: var(--ink2);
  font-weight: 600;
}

.sp-row b.clip {
  max-width: 190px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sp-room .btn {
  margin-top: 4px;
}

/* 指标卡 */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.stat-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 14px 16px;
  box-shadow: var(--sh-sm);
  transition: all 0.18s ease;
}

.stat-card:hover {
  border-color: var(--a300);
  transform: translateY(-2px);
  box-shadow: var(--sh);
}

.sc-k {
  font-size: 12.5px;
  color: var(--muted2);
}

.sc-v {
  font-family: var(--font-d);
  font-size: 23px;
  font-weight: 700;
  color: var(--a700);
  line-height: 1.35;
  word-break: break-all;
}

.sc-sub {
  font-size: 11.5px;
  color: var(--muted2);
}

/* 范围筛选 */

.stat-range {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.sr-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  background: var(--a50);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.sr-btn {
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.16s ease;
}

.sr-btn:hover {
  color: var(--a700);
}

.sr-btn.on {
  background: linear-gradient(135deg, var(--a400), var(--a600));
  color: #fff;
  box-shadow: 0 4px 12px rgba(18, 137, 188, 0.24);
}

.sr-tabs.small .sr-btn {
  padding: 5px 11px;
  font-size: 12px;
}

.sr-count {
  font-size: 12.5px;
  color: var(--muted2);
}

/* 面板 */

.stat-panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-sm);
  padding: 16px 18px 18px;
  margin-bottom: 16px;
}

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

.sp-title {
  font-family: var(--font-d);
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}

/* 图表 */

.stat-chart {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 720 / 176;
}

.ch-grid {
  stroke: var(--line2);
  stroke-width: 1;
}

.ch-tick,
.ch-xlab {
  font-size: 10px;
  fill: var(--muted2);
  font-family: var(--font-mono);
}

.ch-bar {
  transition: opacity 0.16s ease;
}

.ch-bar:hover {
  opacity: 0.72;
}

.stat-empty {
  padding: 34px 16px;
  text-align: center;
  color: var(--muted);
  font-size: 13.5px;
  border: 1px dashed var(--line);
  border-radius: var(--r);
  background: var(--page);
}

/* 明细表 */

.stat-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.stat-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  min-width: 620px;
}

.stat-table th {
  text-align: left;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--muted2);
  padding: 0 10px 9px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.stat-table td {
  padding: 10px;
  border-bottom: 1px solid var(--line2);
  color: var(--ink2);
  vertical-align: middle;
}

.stat-table tbody tr:hover td {
  background: var(--a50);
}

.stat-table .num {
  text-align: right;
  font-family: var(--font-mono);
  white-space: nowrap;
}

.stat-table th.num {
  text-align: right;
}

.stat-table .nowrap {
  white-space: nowrap;
}

.stat-table .clip {
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sbtn {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--muted);
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
  transition: all 0.16s ease;
}

.sbtn:hover {
  color: #fff;
  background: #e5484d;
  border-color: transparent;
}

/* 场次明细翻页 */

.stat-pager {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line2);
}

.stat-pager .pg-btn {
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  padding: 5px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.16s ease;
}

.stat-pager .pg-btn:hover:not(:disabled) {
  color: var(--a700);
  border-color: var(--a400);
}

.stat-pager .pg-btn.on {
  background: linear-gradient(135deg, var(--a400), var(--a600));
  color: #fff;
  border-color: transparent;
}

.stat-pager .pg-btn:disabled {
  opacity: 0.42;
  cursor: default;
}

.stat-pager .pg-info {
  font-size: 12px;
  color: var(--muted2);
  margin-left: 4px;
}

/* 说明 */

.stat-note {
  background: var(--a50);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 14px 16px;
  margin-bottom: 16px;
}

.sn-line {
  font-size: 12.5px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* 数据源不可用时的过期快照提示（刷新失败不清空旧数据） */
.sn-stale {
  margin-top: 10px;
  padding: 9px 13px;
  border-radius: 10px;
  font-size: 12.5px;
  line-height: 1.8;
  color: #8a5300;
  background: #fff8e8;
  border: 1px solid #ffe2a8;
}

.sn-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.sn-dot.ok {
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.16);
}

.sn-dot.warn {
  background: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.16);
}

.stat-tip {
  padding: 12px 16px;
  border-radius: var(--r);
  background: #fffdf3;
  border: 1px solid #f1e2b6;
  color: #7a6318;
  font-size: 13px;
}

.stat-tip a {
  color: var(--a700);
  font-weight: 600;
}

@media (max-width: 860px) {
  .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stat-profile {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .sp-room {
    grid-column: 1 / -1;
    align-items: flex-start;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px 16px;
    padding-top: 12px;
    border-top: 1px solid var(--line2);
    min-width: 0;
  }
}

@media (max-width: 560px) {
  .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .sc-v {
    font-size: 19px;
  }

  .sr-btn {
    padding: 5px 10px;
    font-size: 12px;
  }
}

/* ---------- 后台：统计录入 ---------- */

.admin-sessions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}

.as-row {
  display: grid;
  grid-template-columns: 124px minmax(0, 1.4fr) 66px 66px 66px 78px 86px 72px 30px;
  gap: 8px;
  align-items: center;
}

.as-head {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--muted2);
  letter-spacing: 0.04em;
}

.as-row input {
  width: 100%;
  padding: 7px 9px;
  font-size: 12.5px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--white);
  color: var(--ink2);
  font-family: inherit;
}

.as-row input:focus {
  outline: none;
  border-color: var(--a400);
  box-shadow: 0 0 0 3px rgba(79, 196, 236, 0.16);
}

.proxy-box {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.proxy-box .input {
  flex: 1;
  min-width: 240px;
  font-family: var(--font-mono);
  font-size: 12.5px;
}

@media (max-width: 760px) {
  .as-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .as-head {
    display: none;
  }
}

/* 窄屏：首页星球的装饰环原本 112% 宽会撑出视口，收到 100% 以内 */
@media (max-width: 640px) {
  .planet .ring {
    width: 92%;
  }

  .planet .ring.r2 {
    width: 74%;
  }

  .planet .ring.r3 {
    width: 94%;
  }
}

/* ============ 后台运行模式徽章 ============ */

.mode-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--muted);
  background: var(--line2);
  border: 1px solid var(--line);
  white-space: nowrap;
}

.mode-badge .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #94a3b8;
  flex: none;
}

.mode-badge.on {
  color: #15803d;
  background: rgba(34, 197, 94, 0.1);
  border-color: rgba(34, 197, 94, 0.35);
}

.mode-badge.on .dot {
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.18);
}

/* ============ 后台「从服务器文件夹选择」文件列表 ============ */

.media-picker {
  margin-top: 10px;
  max-height: 240px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
  box-shadow: var(--sh-sm);
}

.media-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  padding: 10px 13px;
  border: 0;
  border-bottom: 1px solid var(--line2);
  background: transparent;
  font-family: inherit;
  font-size: 13px;
  color: var(--ink2);
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease;
}

.media-row:last-child {
  border-bottom: 0;
}

.media-row:hover,
.media-row:focus-visible {
  background: var(--a50);
  outline: none;
}

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

/* 长文件名自己截断，不能把后面的标签一起吃掉 */
.media-file {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.media-tag {
  flex: none;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 10.5px;
  line-height: 1.6;
  color: var(--a700);
  background: var(--a100);
}

.media-size {
  flex: none;
  font-size: 11.5px;
  color: var(--muted2);
  font-variant-numeric: tabular-nums;
}

.media-sep {
  padding: 7px 13px;
  font-size: 11.5px;
  letter-spacing: 0.5px;
  color: var(--muted2);
  background: var(--line2);
}

.media-empty {
  padding: 14px 13px;
  font-size: 13px;
  color: var(--muted2);
  line-height: 1.7;
}
