/* ============================================================================
   页面层：详情页、排行榜、管理页的骨架。
   ========================================================================= */

/* ------------------------------------------------------------------ 悬浮顶栏 */

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  display: flex;
  justify-content: center;
  pointer-events: none;
}

.topbar__inner {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: var(--app-w);
  height: 54px;
  padding: 0 14px;
  color: var(--ink-invert);
}

.topbar--solid .topbar__inner {
  height: calc(54px + env(safe-area-inset-top, 0px));
  padding-top: env(safe-area-inset-top, 0px);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px) saturate(160%);
  color: var(--ink);
  border-bottom: 1px solid var(--line);
}

.topbar__btn {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(20, 18, 28, 0.28);
  color: inherit;
  pointer-events: auto;
  backdrop-filter: blur(6px);
}

.topbar--solid .topbar__btn {
  background: var(--surface-3);
}

.topbar__title {
  flex: 1;
  min-width: 0;
  font-size: 15px;
  font-weight: 600;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-shadow: 0 1px 10px rgba(10, 9, 18, 0.35);
}

.topbar--solid .topbar__title {
  text-shadow: none;
}

.topbar__slot {
  width: 34px;
  flex: none;
}

/* ------------------------------------------------------------------ 详情页 */

.detail-photo {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  max-height: 58vh;
  overflow: hidden;
  background: var(--surface-3);
}

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

.detail-photo__shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(15, 12, 22, 0.68) 0%,
    rgba(15, 12, 22, 0.3) 24%,
    rgba(15, 12, 22, 0) 46%
  );
  pointer-events: none;
}

.detail-body {
  position: relative;
  margin-top: -22px;
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  background: var(--bg);
  padding: 18px 16px 0;
}

.detail-name {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.detail-name h1 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.detail-org {
  margin-top: 4px;
  font-size: 13px;
  color: var(--ink-3);
}

.detail-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin-top: 16px;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--line);
  box-shadow: var(--shadow-1);
}

.detail-stat {
  background: var(--surface);
  padding: 13px 12px;
  text-align: center;
}

.detail-stat b {
  display: block;
  font-family: var(--font-num);
  font-size: 22px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.detail-stat span {
  font-size: 11.5px;
  color: var(--ink-3);
}

.intro-text {
  font-size: 14px;
  line-height: 1.8;
  color: var(--ink-2);
}

/* ------------------------------------------------------------------ 固定 CTA */

.cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  display: flex;
  justify-content: center;
  pointer-events: none;
}

.cta__inner {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: var(--app-w);
  padding: 10px 14px calc(12px + env(safe-area-inset-bottom, 0px));
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px) saturate(160%);
  border-top: 1px solid var(--line);
  box-shadow: var(--shadow-3);
}

.cta__hint {
  flex: none;
  width: 92px;
}

.cta__hint b {
  display: block;
  font-family: var(--font-num);
  font-size: 17px;
  font-weight: 700;
  color: var(--like-ink);
}

.cta__hint span {
  font-size: 10.5px;
  color: var(--ink-3);
}

/* ------------------------------------------------------------------ 页面标题 */

.page-head {
  padding: 22px 16px 16px;
}

/* 固定顶栏（榜单页）会盖住内容，给紧随其后的标题留出高度 */
.topbar--solid + .page-head {
  padding-top: calc(74px + env(safe-area-inset-top, 0px));
}

.page-head h1 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.page-head p {
  margin-top: 6px;
  font-size: 13px;
  color: var(--ink-3);
}

.divider {
  height: 1px;
  margin: 20px 16px;
  background: var(--line);
}

/* ------------------------------------------------------------------ 管理页 */

.admin-head {
  padding: 74px 16px 16px;
}

.admin-head h1 {
  font-size: 21px;
  font-weight: 700;
}

.admin-head p {
  margin-top: 6px;
  font-size: 12.5px;
  color: var(--ink-3);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  padding: 0 16px;
}

.stat-card {
  background: var(--surface);
  border-radius: var(--r-md);
  padding: 14px;
  box-shadow: var(--shadow-1);
}

.stat-card b {
  display: block;
  font-family: var(--font-num);
  font-size: 24px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.stat-card span {
  font-size: 11.5px;
  color: var(--ink-3);
}

.admin-list {
  margin: 0 16px;
  background: var(--surface);
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: var(--shadow-1);
}

.admin-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
}

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

.thumb {
  position: relative;
  flex: none;
  width: 46px;
  height: 46px;
  border-radius: var(--r-sm);
  overflow: hidden;
  background: var(--surface-3);
}

.admin-row__body {
  flex: 1;
  min-width: 0;
}

.admin-row__name {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
}

.admin-row__meta {
  font-size: 11.5px;
  color: var(--ink-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-row__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}

.upload {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: var(--r-md);
  border: 1px dashed var(--line-strong);
  background: var(--surface-2);
}

.upload__preview {
  position: relative;
  flex: none;
  width: 64px;
  height: 64px;
  border-radius: var(--r-sm);
  overflow: hidden;
  background: var(--surface-3);
}

.upload__body {
  flex: 1;
  min-width: 0;
}

.upload__title {
  font-size: 13.5px;
  font-weight: 600;
}

.upload__hint {
  margin-top: 2px;
  font-size: 11.5px;
  color: var(--ink-3);
}

.admin-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0 16px;
}

.safe-bottom {
  height: 12px;
}
