:root {
  --pink: #e8567f;
  --purple: #7b5cff;
  --grad: linear-gradient(135deg, #e8567f, #7b5cff);
  --bg: #fdf5f7;
  --card: #ffffff;
  --ink: #33303a;
  --ink-2: #8a8694;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { scrollbar-width: none; }
html::-webkit-scrollbar, body::-webkit-scrollbar { width: 0; height: 0; background: transparent; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -webkit-overflow-scrolling: touch;
}
a { text-decoration: none; color: inherit; }
img { display: block; }

/* ---------- 头部 ---------- */
.hero {
  background: var(--grad);
  color: #fff;
  text-align: center;
  padding: 56px 20px 44px;
  border-radius: 0 0 28px 28px;
}
.hero h1 { font-size: 28px; letter-spacing: 2px; }
.hero-sub { margin-top: 10px; font-size: 14px; opacity: .9; }
.hero-sm { padding: 36px 20px 30px; }
.hero-sm h1 { font-size: 22px; }
.hero-remain {
  display: inline-block;
  margin-top: 12px;
  padding: 4px 14px;
  font-size: 13px;
  background: rgba(255, 255, 255, .22);
  border-radius: 999px;
}

/* ---------- 区块 ---------- */
.section { padding: 24px 16px 4px; max-width: 720px; margin: 0 auto; }
.section-title {
  font-size: 17px;
  margin-bottom: 14px;
  padding-left: 10px;
  border-left: 4px solid var(--pink);
  line-height: 1.2;
}

/* ---------- 学员卡片 ---------- */
.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.grid-page { padding: 16px; max-width: 720px; margin: 0 auto; }
.card {
  background: var(--card);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(123, 92, 255, .08);
  padding-bottom: 10px;
}
.card-link { display: block; }
.card { cursor: pointer; }
.card:active { transform: scale(.98); transition: transform .1s; }
.pair { position: relative; display: flex; aspect-ratio: 3 / 2; background: #eee; }
.pair img { width: 50%; height: 100%; object-fit: cover; }
.pair-ph { width: 50%; height: 100%; background: #ece7f5; }
.rank {
  position: absolute; top: 8px; left: 8px;
  min-width: 24px; height: 24px; line-height: 24px;
  text-align: center; font-size: 13px; font-weight: 700;
  color: #fff; background: rgba(0, 0, 0, .45); border-radius: 8px;
  padding: 0 6px;
}
.award {
  position: absolute; top: 8px; right: 8px;
  font-size: 12px; font-weight: 600;
  color: #7a4d00; background: linear-gradient(135deg, #ffe08a, #f5b942);
  padding: 3px 8px; border-radius: 8px;
}
.meta { padding: 10px 12px 0; text-align: center; }
.name { font-size: 15px; font-weight: 600; }
.days { font-size: 12px; color: var(--ink-2); margin-top: 2px; }
.votes { font-size: 13px; color: var(--pink); font-weight: 600; margin-top: 4px; }

/* ---------- 投票按钮 ---------- */
.vote-btn {
  display: block;
  width: calc(100% - 24px);
  margin: 10px 12px 0;
  padding: 9px 0;
  border: 0; border-radius: 999px;
  background: var(--grad);
  color: #fff; font-size: 14px; font-weight: 600;
  cursor: pointer;
}
.vote-btn:disabled { background: #d9d4e3; cursor: not-allowed; }
.vote-btn-lg { width: 100%; margin: 14px 0 0; padding: 12px 0; font-size: 15px; }

/* ---------- 历届列表 ---------- */
.act-list { display: flex; flex-direction: column; gap: 10px; }
.act-row {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--card); border-radius: 14px; padding: 16px;
  box-shadow: 0 2px 10px rgba(123, 92, 255, .08);
}
.act-row-title { font-size: 15px; font-weight: 600; }
.act-row-sub { font-size: 12px; color: var(--ink-2); margin-top: 4px; }
.act-badge { font-size: 12px; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.act-badge-active { background: #fde8ee; color: var(--pink); }
.act-badge-ended { background: #efedf5; color: var(--ink-2); }
.act-badge-pre { background: #e8f4fd; color: #3a7bd5; }

/* ---------- 奖项 ---------- */
.prizes {
  max-width: 720px; margin: 14px auto 0; padding: 0 16px;
}
.prize-row {
  display: flex; gap: 10px; align-items: baseline;
  background: var(--card); border-radius: 12px;
  padding: 10px 14px; margin-bottom: 8px; font-size: 13px;
  box-shadow: 0 2px 8px rgba(123, 92, 255, .06);
}
.prize-level { font-weight: 700; color: var(--pink); }
.prize-count { color: var(--ink-2); }
.prize-name { flex: 1; }

/* ---------- 转化区（仅总入口页） ---------- */
.convert { text-align: center; padding-bottom: 30px; }
.convert-intro { font-size: 14px; color: var(--ink-2); line-height: 1.8; margin-bottom: 16px; white-space: pre-line; }
.qrcode { width: 200px; height: 200px; object-fit: contain; margin: 0 auto; background: #fff; padding: 10px; border-radius: 12px; }
.convert-hint { font-size: 13px; color: var(--ink-2); margin-top: 10px; }
.phone-btn {
  display: inline-block; margin-top: 14px;
  padding: 10px 28px; border-radius: 999px;
  border: 1px solid var(--pink); color: var(--pink);
  font-size: 14px; font-weight: 600;
}
.short-btn {
  display: inline-block; margin-left: 8px;
  padding: 6px 18px; border-radius: 999px;
  background: rgba(255, 78, 146, .08); color: var(--pink);
  font-size: 13px; font-weight: 600;
}

/* ---------- 弹层 ---------- */
.modal {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(20, 16, 30, .72);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.modal[hidden] { display: none; }
.modal-body {
  position: relative;
  width: 100%; max-width: 420px; max-height: 92vh; overflow-y: auto;
  background: var(--card); border-radius: 16px; overflow-x: hidden;
}
.modal-close {
  position: absolute; top: 8px; right: 10px; z-index: 2;
  width: 32px; height: 32px; border: 0; border-radius: 50%;
  background: rgba(0, 0, 0, .4); color: #fff; font-size: 20px; line-height: 1;
  cursor: pointer;
}

/* 相册滑动：首张为学舞后，左右滑动查看其余照片 */
.gallery {
  position: relative; aspect-ratio: 3 / 4; overflow: hidden;
  background: #000; touch-action: pan-y; user-select: none;
}
.gallery-track { display: flex; height: 100%; transition: transform .3s ease; }
.gallery-slide { position: relative; flex: 0 0 100%; height: 100%; }
.gallery-slide img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  -webkit-user-drag: none; user-select: none; pointer-events: none;
}
.gallery-tag {
  position: absolute; bottom: 10px; left: 10px; z-index: 1;
  font-size: 11px; color: #fff; background: rgba(0, 0, 0, .45);
  padding: 2px 8px; border-radius: 6px;
}
.gallery-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 38px; height: 38px; border: 0; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, .38); color: #fff; font-size: 22px; line-height: 1;
  padding: 0 0 3px; cursor: pointer;
  transition: opacity .2s;
}
.gallery-arrow-l { left: 10px; }
.gallery-arrow-r { right: 10px; }
.gallery-arrow[disabled] { opacity: .22; cursor: default; }
.gallery-dots {
  position: absolute; bottom: 12px; left: 0; right: 0; z-index: 2;
  display: flex; justify-content: center; gap: 6px;
}
.gallery-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: rgba(255, 255, 255, .5); transition: all .2s;
}
.gallery-dot.on { width: 16px; border-radius: 3px; background: #fff; }

.detail-meta { padding: 16px; text-align: center; }
.detail-name-row { display: flex; flex-direction: column; align-items: center; gap: 4px; margin-bottom: 6px; }
.detail-name { font-size: 20px; font-weight: 700; }
.detail-votes { font-size: 15px; color: var(--pink); font-weight: 700; margin-top: 2px; }
.detail-intro { font-size: 13px; color: var(--ink-2); line-height: 1.8; margin-top: 12px; white-space: pre-line; text-align: left; }
.detail-motto { font-size: 13px; color: var(--ink); line-height: 1.8; margin-top: 8px; padding: 8px 10px; background: #fce8ee; border-left: 3px solid var(--pink); border-radius: 6px; white-space: pre-line; text-align: left; }

/* ---------- 验证码 ---------- */
.captcha-body { padding: 24px 20px; text-align: center; }
.captcha-title { font-size: 16px; margin-bottom: 14px; }
.captcha-img { margin: 0 auto; cursor: pointer; border-radius: 8px; background: #f2f0f7; }
.captcha-input {
  display: block; width: 100%; margin-top: 14px;
  padding: 11px 14px; font-size: 16px; text-align: center; letter-spacing: 6px;
  border: 1px solid #ddd; border-radius: 10px; outline: none;
}
.captcha-input:focus { border-color: var(--purple); }

/* ---------- 其他 ---------- */
.footer { text-align: center; font-size: 12px; color: var(--ink-2); padding: 26px 16px 34px; }
.rules { line-height: 1.8; }
.back-home {
  display: inline-block; padding: 10px 26px; border-radius: 999px;
  background: var(--grad); color: #fff; font-size: 14px; font-weight: 600;
}
.empty { grid-column: 1 / -1; text-align: center; color: var(--ink-2); font-size: 14px; padding: 40px 0; }
.empty-page { padding-top: 40vh; }
.empty-link { display: inline-block; margin-top: 14px; color: var(--pink); }
.toast {
  position: fixed; left: 50%; bottom: 60px; transform: translateX(-50%) translateY(20px);
  z-index: 99; max-width: 80vw;
  background: rgba(30, 26, 40, .88); color: #fff;
  font-size: 14px; padding: 10px 20px; border-radius: 999px;
  opacity: 0; pointer-events: none; transition: all .25s;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- 顶部店名 ---------- */
.topbar {
  display: flex;
  align-items: center;
  gap: 9px;
  background: #fff;
  padding: 11px 16px;
  position: sticky;
  top: 0;
  z-index: 45;
  box-shadow: 0 1px 0 rgba(0,0,0,.05);
}
.topbar-mark {
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  background: var(--grad);
  box-shadow: 0 3px 8px rgba(232, 86, 127, .3);
}
.topbar-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: .5px;
}

/* ---------- 底部导航 ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0;
  z-index: 40;
  display: flex; justify-content: space-around; align-items: center;
  height: 56px;
  background: #fff;
  border-top: 1px solid rgba(0,0,0,.06);
  padding-bottom: env(safe-area-inset-bottom);
}
.tabbar a {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  position: relative;
  gap: 3px; height: 100%;
  font-size: 11px; color: var(--ink-2); text-decoration: none;
}
.tabbar a.on { color: var(--pink); font-weight: 600; }
.tabbar a.on::before {
  content: ''; position: absolute; top: 7px; left: 50%; transform: translateX(-50%);
  width: 26px; height: 3px; border-radius: 3px; background: var(--grad);
}
.tabbar svg {
  width: 22px; height: 22px;
  stroke: currentColor; fill: none;
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.has-tabbar { padding-bottom: calc(56px + env(safe-area-inset-bottom)); }
.studio-hero {
  background: var(--grad); color: #fff; text-align: center;
  padding: 44px 20px 32px; border-radius: 0 0 28px 28px;
}
.studio-hero h1 { font-size: 24px; }
.about-sections { padding: 16px; }
.empty-tip {
  text-align: center; color: var(--ink-2); padding: 40px 0;
}
.about-section {
  margin-bottom: 16px;
  background: var(--card); border-radius: 16px;
  box-shadow: 0 2px 10px rgba(123, 92, 255, .06);
  overflow: hidden;
}
.about-text {
  white-space: pre-wrap; font-size: 15px; line-height: 1.8;
  color: var(--ink); padding: 18px;
}
.about-img {
  display: block; width: 100%; height: auto;
}
.about-video {
  display: block; width: 100%; height: auto;
  background: #000;
}
.about-iframe {
  display: block; width: 100%; aspect-ratio: 16 / 10;
  border: 0; border-radius: 16px; background: #000;
}
.about-video-link {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 40px 18px; color: var(--ink);
  text-decoration: none;
}
.about-video-link .play {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--grad); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
}
.contact-block {
  margin-top: 8px; padding-bottom: 30px;
}
.studio-phone {
  display: block; margin: 0 16px 16px;
  text-align: center; padding: 14px; background: var(--grad); color: #fff;
  font-size: 16px; font-weight: 600; border-radius: 999px;
}
.studio-phone.short {
  display: block; margin: 0 16px 16px;
  padding: 12px 14px; font-size: 14px;
  background: #fff; color: var(--pink);
  border: 1px solid var(--pink);
  text-align: center;
}
.studio-qr {
  text-align: center; padding: 0 16px 30px;
}
.studio-qr img {
  display: inline-block; width: 180px; height: 180px; object-fit: contain;
  border-radius: 12px; border: 1px solid rgba(0,0,0,.08);
}

/* ---------- 抖音卡片 ---------- */
.douyin-card {
  margin: 0 16px 16px;
  background: var(--card); border-radius: 16px;
  box-shadow: 0 2px 10px rgba(123, 92, 255, .06);
  padding: 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.douyin-name { font-size: 15px; font-weight: 600; color: var(--ink); }
.douyin-actions { display: flex; gap: 10px; flex: 0 0 auto; }
.douyin-copy {
  border: 1px solid var(--pink); color: var(--pink);
  background: transparent; border-radius: 999px;
  padding: 8px 16px; font-size: 13px; font-weight: 600; cursor: pointer;
}
.douyin-open {
  background: var(--grad); color: #fff; text-decoration: none;
  border-radius: 999px; padding: 8px 16px; font-size: 13px; font-weight: 600;
}
