:root {
  --bg: #ffffff;
  --bg-2: #f5f6f8;
  --card: #ffffff;
  --line: #e5e7eb;
  --text: #1a1d26;
  --muted: #6b7280;
  --accent: #e84d1a;
  --accent-2: #c2410c;
  --burst-pink: #ff7abd;
  --burst-red: #ff3338;
  --teal: #0d9488;
  --danger: #dc2626;
  --limit: #7c3aed;
  --limit-soft: #a78bfa;
  --ok: #16a34a;
  --shadow: 0 8px 28px rgba(15, 23, 42, 0.06);
  --radius: 18px;
  --page-width: 1120px;
  --page-gutter: 8px;
  --page-edge-inset: 1px;
  --query-bleed-right: calc(-1 * var(--page-gutter) + var(--page-edge-inset));
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
html { scrollbar-gutter: stable; }
body {
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

.page-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(900px 420px at 90% -10%, rgba(232, 77, 26, 0.08), transparent 55%),
    radial-gradient(700px 380px at -10% 110%, rgba(13, 148, 136, 0.06), transparent 50%),
    linear-gradient(180deg, #ffffff, #f8f9fb 45%, #ffffff);
}
.page-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(15, 23, 42, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(circle at 50% 20%, black, transparent 75%);
}

a { color: var(--accent-2); text-decoration: none; }
a:hover { color: var(--accent); }
h1, h2, h3 { font-family: var(--font-sans); letter-spacing: 0; line-height: 1.15; }
h1 { font-size: clamp(2rem, 4vw, 3.4rem); margin: 0 0 0.6rem; }
h2 { font-size: 1.6rem; }
p { margin: 0 0 1rem; }

.site-header, .site-footer, .site-main {
  width: min(var(--page-width), calc(100% - var(--page-gutter) * 2));
  margin: 0 auto;
}
.site-header {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 12px 0 8px;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 800; }
.brand:hover { color: var(--text); }
.brand-mark {
  width: 36px; height: 36px; display: grid; place-items: center;
  background: var(--accent); color: #fff; border-radius: 10px;
  font-family: var(--font-sans);
}
.brand-logo {
  height: 36px;
  width: auto;
  display: block;
  object-fit: contain;
}
.site-nav { display: flex; gap: 10px; flex: 1; min-width: 0; align-items: center; }
.site-nav__link {
  color: var(--muted);
  white-space: nowrap;
  padding: 6px 12px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  transition: background 0.15s ease, color 0.15s ease;
}
.site-nav__link:hover { color: var(--text); background: var(--bg-2); }
.site-nav__link.is-active,
.site-nav__link.is-active:hover {
  background: var(--text);
  color: #fff;
}
.site-nav__link--primary { flex: 0 0 auto; }
.site-nav__link--extra { flex: 0 0 auto; }

/* 管理后台角标：红点=有事情待办，数字=待办条数（冻结人数、补单条数）。 */
.nav-badge {
  display: inline-block;
  vertical-align: top;
  flex: 0 0 auto;
  font-style: normal;
  line-height: 1;
  pointer-events: none;
}
.nav-badge--dot {
  width: 8px;
  height: 8px;
  margin-left: 4px;
  margin-top: 1px;
  border-radius: 50%;
  background: #e11d48;
  box-shadow: 0 0 0 2px var(--bg);
}
.nav-badge--count {
  min-width: 16px;
  margin-left: 5px;
  padding: 2px 5px;
  border-radius: 999px;
  background: #e11d48;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.nav-badge--danger {
  margin-left: 5px;
  padding: 2px 5px;
  border-radius: 999px;
  background: #b45309;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.site-nav__link.is-active .nav-badge--dot { box-shadow: 0 0 0 2px var(--text); }
.user-menu__item .nav-badge { vertical-align: middle; }
.header-actions { display: flex; gap: 10px; align-items: center; margin-left: auto; flex: 0 0 auto; flex-shrink: 0; }
.header-menu { display: none; }
.user-menu {
  position: relative;
}
.user-menu__trigger {
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font: inherit;
}
.user-menu__trigger.chip {
  color: var(--teal);
}
.user-menu__caret {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 12px;
  height: 12px;
  color: var(--muted);
  flex-shrink: 0;
  user-select: none;
  pointer-events: none;
  transition: transform 0.15s ease;
}
.user-menu__caret svg {
  width: 12px;
  height: 12px;
  display: block;
}
.user-menu__trigger[aria-expanded="true"] .user-menu__caret {
  transform: rotate(180deg);
}
.user-menu__menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 40;
  /* 宽度必须是"可确定"的值：菜单宽由内容决定、track 又写两栏宽，
     百分比就成了循环定义——实测（tmp/menu_width_probe.html）菜单撑到 494px。
     --user-menu-w 指**内容宽**（菜单 240 = 内容 226 + 内边距 12 + 边框 2），
     栏宽按内容算才不会把每行右头的开关裁掉 14px。 */
  --user-menu-w: min(226px, calc(100vw - 38px));
  width: calc(var(--user-menu-w) + 14px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 6px;
  box-sizing: border-box;
}
.user-menu__menu[hidden] {
  display: none !important;
}
.user-menu__item {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  text-decoration: none;
  padding: 8px 10px;
  cursor: pointer;
}
.user-menu__item:hover,
.user-menu__item:focus-visible {
  background: rgba(232, 77, 26, 0.08);
  color: var(--text);
  outline: none;
}
.user-menu__item.is-active,
.user-menu__item.is-active:hover,
.user-menu__item.is-active:focus-visible {
  background: var(--text);
  color: #fff;
}
.user-menu__logout {
  margin: 0;
}
.user-menu__nav {
  display: none;
  gap: 2px;
  padding-bottom: 4px;
  margin-bottom: 2px;
  border-bottom: 1px solid var(--line);
}
.user-menu__account {
  display: grid;
  gap: 2px;
  padding-top: 2px;
}
.user-menu__account .user-menu__logout {
  padding-top: 2px;
  border-top: 1px solid var(--line);
}
.user-menu__mute-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  color: var(--accent);
}
.user-menu__mute-badge[hidden] {
  display: none !important;
}
.user-menu__mute-badge svg {
  width: 14px;
  height: 14px;
  display: block;
}
.user-menu__prefs {
  display: grid;
  gap: 2px;
  padding-bottom: 4px;
  margin-bottom: 2px;
  border-bottom: 1px solid var(--line);
}
.user-menu__pref {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 4px;
  align-items: start;
}
.user-menu__mute {
  display: flex;
  align-items: center;
  gap: 8px;
}
.user-menu__mute-hit {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: inherit;
  cursor: pointer;
}
.user-menu__mute-hit:first-child {
  flex: 1 1 auto;
  min-width: 0;
  justify-content: flex-start;
  text-align: left;
}
.user-menu__mute-icon {
  display: inline-flex;
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  color: var(--muted);
}
.user-menu__mute-icon svg {
  width: 16px;
  height: 16px;
  display: block;
}
.user-menu__mute-label {
  flex: 1 1 auto;
  min-width: 0;
}
.user-menu__switch {
  position: relative;
  width: 36px;
  height: 20px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #d1d5db;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.06);
}
.user-menu__switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.2);
  transition: transform 0.15s ease;
}
.user-menu__mute.is-on,
.user-menu__mute[aria-checked="true"] {
  color: var(--accent);
}
.user-menu__mute.is-on .user-menu__mute-icon,
.user-menu__mute[aria-checked="true"] .user-menu__mute-icon {
  color: var(--accent);
}
.user-menu__mute.is-on .user-menu__switch,
.user-menu__mute[aria-checked="true"] .user-menu__switch {
  background: var(--accent);
}
.user-menu__mute.is-on .user-menu__switch::after,
.user-menu__mute[aria-checked="true"] .user-menu__switch::after {
  transform: translateX(16px);
}
.user-menu__burst-color {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--burst-pink);
  transition: color 0.15s ease, background 0.15s ease;
}
.user-menu__burst-color .user-menu__mute-icon {
  color: inherit;
}
.user-menu__burst-color.is-pink,
.user-menu__burst-color:not(.is-red),
.user-menu__burst-color.is-pink:hover,
.user-menu__burst-color.is-pink:focus-visible,
.user-menu__burst-color:not(.is-red):hover,
.user-menu__burst-color:not(.is-red):focus-visible {
  color: var(--burst-pink);
}
.user-menu__burst-color.is-pink:hover,
.user-menu__burst-color.is-pink:focus-visible,
.user-menu__burst-color:not(.is-red):hover,
.user-menu__burst-color:not(.is-red):focus-visible {
  background: rgba(255, 122, 189, 0.12);
}
.user-menu__burst-color.is-red,
.user-menu__burst-color.is-red:hover,
.user-menu__burst-color.is-red:focus-visible {
  color: var(--burst-red);
}
.user-menu__burst-color.is-red:hover,
.user-menu__burst-color.is-red:focus-visible {
  background: rgba(255, 51, 56, 0.12);
}
.user-menu__color-switch {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1;
  user-select: none;
}
.user-menu__color-switch-opt.is-pink {
  color: var(--burst-pink);
}
.user-menu__color-switch-opt.is-red {
  color: var(--burst-red);
}
.user-menu__burst-color.is-pink .user-menu__color-switch-opt.is-red,
.user-menu__burst-color:not(.is-red) .user-menu__color-switch-opt.is-red {
  opacity: 0.38;
}
.user-menu__burst-color.is-red .user-menu__color-switch-opt.is-pink {
  opacity: 0.38;
}
.user-menu__color-switch-track {
  position: relative;
  width: 36px;
  height: 20px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--burst-pink);
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.06);
}
.user-menu__color-switch-track::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.2);
  transition: transform 0.15s ease;
}
.user-menu__burst-color.is-red .user-menu__color-switch-track {
  background: var(--burst-red);
}
.user-menu__burst-color.is-red .user-menu__color-switch-track::after {
  transform: translateX(16px);
}
.user-menu__help {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  margin: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}
.user-menu__help:hover,
.user-menu__help:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
  outline: none;
}
.user-menu__help[aria-expanded="true"] {
  background: rgba(232, 77, 26, 0.08);
  border-color: var(--accent);
  color: var(--accent);
}
.user-menu__help-bubble {
  grid-column: 1 / -1;
  margin: 0 2px 4px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--bg-2);
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.45;
}
.user-menu__help-bubble[hidden] {
  display: none !important;
}
.user-menu__pref.is-disabled .user-menu__mute {
  cursor: not-allowed;
}
.user-menu__pref.is-disabled .user-menu__mute-icon,
.user-menu__pref.is-disabled .user-menu__mute-label {
  color: #9ca3af;
}
.user-menu__pref.is-disabled .user-menu__mute-label {
  text-decoration: line-through;
  text-decoration-thickness: 1px;
}
.user-menu__pref.is-disabled .user-menu__item:hover,
.user-menu__pref.is-disabled .user-menu__item:focus-visible {
  background: transparent;
}
.user-menu__mute-disabled {
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 700;
  color: #9ca3af;
  white-space: nowrap;
}
.user-menu__mute-disabled[hidden] {
  display: none !important;
}
.user-menu__hitsound-volume {
  display: grid;
  gap: 6px;
  padding: 2px 10px 8px 34px;
}
.user-menu__hitsound-volume[hidden] {
  display: none !important;
}
.user-menu__hitsound-volume-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}
.user-menu__hitsound-volume-value {
  min-width: 2.5em;
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.user-menu__hitsound-volume-slider {
  width: 100%;
  margin: 0;
  accent-color: var(--accent);
  cursor: pointer;
}
/* —— 个性化二级面板：主菜单向左滑出、面板从右侧滑入（iOS 设置里二级页那套手感） ——
   只合成 transform: translateX()，不许用 display:none 硬切——两栏都得留在流内，
   滑过去的路上才有东西可看；viewport 的 overflow:hidden 负责裁掉另一栏。
   高度由 app.js 钉成「当前栏」的自然高度（两栏内容差得多，交给 track 会被高的那栏撑出空白）。 */
.user-menu__viewport {
  position: relative;
  overflow: hidden;
  transition: height 0.3s cubic-bezier(0.32, 0.72, 0, 1);
}
.user-menu__track {
  display: flex;
  align-items: flex-start;
  width: calc(var(--user-menu-w) * 2);
  transform: translateX(0);
  transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
  will-change: transform;
}
.user-menu__menu.is-personalizing .user-menu__track {
  transform: translateX(-50%);
}
.user-menu__pane {
  flex: 0 0 var(--user-menu-w);
  width: var(--user-menu-w);
  min-width: 0;
  display: grid;
  gap: 2px;
  /* 菜单挂在表头下方：最高只能到「视口 - 表头 - 上下留白 - 底部安全区」，
     超出走内部滚动，绝不把「退出登录」顶到屏幕外。 */
  max-height: calc(100vh - 88px - env(safe-area-inset-bottom, 0px));
  max-height: calc(100dvh - 88px - env(safe-area-inset-bottom, 0px));
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.user-menu__pane::-webkit-scrollbar {
  display: none;
}
.user-menu__personalize,
.user-menu__back {
  display: flex;
  align-items: center;
  gap: 8px;
}
.user-menu__chevron {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  pointer-events: none;
  user-select: none;
}
.user-menu__chevron--back {
  font-size: 16px;
}
.user-menu__back .user-menu__mute-label {
  color: var(--muted);
}
.user-menu__prefs--query {
  border-bottom: 0;
  padding-bottom: 0;
  margin-bottom: 0;
}
.user-menu__prefs-title {
  margin: 4px 10px 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.user-menu__qpref-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 2px 10px;
  min-width: 0;
  /* 必须自己钉字号：这一行不是 .user-menu__item（那条给了 13px/600），
     继承 body 的 16px 会让「单/双列字母索引」在 226px 宽里断成两行且折在词中。 */
  font-size: 13px;
  font-weight: 600;
}
.user-menu__qpref-note {
  margin: 0 10px 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.4;
}
.user-menu__qpref:last-child .user-menu__qpref-note {
  margin-bottom: 2px;
}
.user-menu__item.user-menu__qpref-switch {
  flex: 0 0 auto;
  width: auto;
  padding: 2px 0;
}
.seg-toggle--panel {
  font-size: 11px;
}
.seg-toggle--panel .seg-toggle__opt {
  padding: 5px 9px;
}
@media (prefers-reduced-motion: reduce) {
  .user-menu__viewport,
  .user-menu__track {
    transition: none;
  }
}
.header-menu__trigger {
  gap: 6px;
}
.site-main { padding: 28px 0 64px; }
.site-footer {
  display: flex; justify-content: space-between; gap: 16px; align-items: baseline;
  padding: 24px 0 40px; color: var(--muted); border-top: 1px solid var(--line);
}
.site-footer p { margin: 0; }
.site-footer__notes { display: flex; flex-direction: column; gap: 6px; min-width: 0; max-width: 100%; }
.site-footer__note { white-space: nowrap; max-width: 100%; min-width: 0; overflow: hidden; font-size: clamp(10px, 3.4vw, 1rem); }
.site-footer__free { color: var(--accent); font-weight: 700; }
.site-footer > * { min-width: 0; }
.site-footer a { word-break: break-all; }

.afdian-promo {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  margin: 0 0 48px;
  padding: 22px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.afdian-promo h2 {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
}
.afdian-promo p:last-of-type { margin-bottom: 0; }
.afdian-promo__link { font-weight: 700; word-break: break-all; }
.afdian-promo__btn { display: block; flex-shrink: 0; }
.afdian-promo__btn img {
  display: block;
  width: 200px;
  max-width: 100%;
  height: auto;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; cursor: pointer; border-radius: 999px;
  padding: 10px 16px; font-weight: 700; font-size: 14px;
}
.btn[hidden] { display: none; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { filter: brightness(1.06); color: #fff; }
.btn.is-busy,
a.is-busy {
  pointer-events: none;
  opacity: 0.72;
}
.btn-purple { background: #7c3aed; color: #fff; }
.btn-purple:hover { filter: brightness(1.06); color: #fff; }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn-ghost:hover { background: var(--bg-2); }
/* 类别弹窗里第三颗（SSP）的两态：金色=这一族/这一赛季能选，
   灰=照样看得见但点不动（原因由后端写在弹窗的 data-ssp-off-note 上，前端不自己拼）。
   刻意不叠 .btn-ghost：那条在后头，同特异性会把这里的底色盖回去。 */
.btn-gold { background: #f5c451; color: #4a2c06; box-shadow: inset 0 0 0 1px #d9a220; }
.btn-gold:hover { filter: brightness(1.05); color: #4a2c06; }
.btn--off { background: var(--bg-2); color: var(--muted); cursor: not-allowed; }
.btn--off:hover { background: var(--bg-2); color: var(--muted); }
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.chip {
  display: inline-flex; align-items: center; padding: 6px 10px; border-radius: 999px;
  background: #f0fdf9; color: var(--teal); font-size: 12px;
  border: 1px solid #ccfbf1;
}

.hero { display: grid; grid-template-columns: 1.3fr 0.9fr; gap: 32px; align-items: start; padding: 24px 0 48px; }
.lead { font-size: 1.08rem; color: var(--muted); max-width: 46ch; }
.eyebrow {
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 15px;
  margin: 0 0 0.45rem;
}
.eyebrow--hero {
  font-size: 18px;
  letter-spacing: 0.16em;
}
.hero-actions, .inline-field { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; }
.inline-field { margin: 0 0 12px; }
.hero-panel, .panel, .plan-card, .auth-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow);
}
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat-grid div, .hero-panel .stat-grid div {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 14px; padding: 14px;
}
.stat-grid strong { display: block; font-size: 1.3rem; }
.stat-grid span, .muted { color: var(--muted); }
.danger-text { color: var(--danger); }
.stat-grid--guest { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.stat-grid--compact { gap: 8px; margin-bottom: 12px; }
.stat-grid--compact div { padding: 10px 12px; border-radius: 10px; }
.stat-grid--compact strong { font-size: 1.15rem; }
/* 卡片里的值一律 1.05rem：--compact 钉成一行（日期、模式赛季），--wrap 允许折行（身份可能很长）。
   复合选择器不是冗余：.stat-grid--compact strong 的特异度（0-1-1）高于单类（0-1-0），
   只写单类时 1.05rem 会被上面的 1.15rem 盖掉。 */
.stat-value--compact, .stat-value--wrap,
.stat-grid--compact .stat-value--compact, .stat-grid--compact .stat-value--wrap { font-size: 1.05rem; letter-spacing: .01em; }
.stat-value--compact { white-space: nowrap; }
.stat-grid strong + strong { margin-top: 2px; }
.role-list { list-style: none; padding: 0; margin: 0; }
.role-list li { padding: 10px 0; border-top: 1px solid var(--line); color: var(--muted); }
.role-list b { display: block; color: var(--text); }

.section { margin: 18px 0 46px; }
.section-head { display: flex; justify-content: space-between; gap: 16px; align-items: end; margin-bottom: 18px; flex-wrap: wrap; }
.section-subhead { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin: 18px 0; }
.section-subhead h2 { margin: 0; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.panel-sub { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.panel-sub h4 { margin: 0 0 8px; font-size: 15px; color: var(--text); }
.muted.small { font-size: 13px; margin: 0; }
/* —— 舞团管理页：紧凑卡片与折叠区 —— */
.card-grid--compact { gap: 10px; }
.section--compact { margin: 12px 0 20px; }
.panel--compact { padding: 12px 14px; }
.panel--compact h3 { margin: 0 0 8px; font-size: 15px; }
.panel--compact .form-stack { gap: 8px; }
.panel--compact .check-row { margin: 0; }
.panel--compact__actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.panel--compact__actions .spacer { flex: 1 1 auto; }
.btn-mini { padding: 4px 10px; font-size: 13px; }
.form-inline-tight { margin-top: 8px; }
/* —— 添加成员卡片：一行双按钮 + 向下展开面板 —— */
.add-member__switch { display: flex; gap: 8px; }
.add-member__switch .btn { flex: 1 1 0; white-space: nowrap; background: #fff; }
.add-member__switch .btn.is-on { background: var(--accent); border-color: var(--accent); color: #fff; }
.add-member__switch .btn.is-on:hover { filter: brightness(1.06); color: #fff; }
.add-member__switch .btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.add-member__panel { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.add-member__panel[hidden] { display: none; }
.add-member__result { display: flex; align-items: center; gap: 8px; }
.add-member__result[hidden] { display: none; }
.add-member__result code { flex: 1 1 auto; min-width: 0; font-size: 18px; font-weight: 800; letter-spacing: 0.12em; padding: 8px 12px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 8px; overflow-wrap: anywhere; }
.add-member__preview { margin: 0; }
.add-member__preview.is-error { color: #dc2626; }
.add-member__hint { margin-top: 10px; }
.kv--compact { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; margin: 6px 0 0; font-size: 14px; }
.kv--compact dt { color: var(--muted); }
.kv--compact dd { margin: 0; }
.fold { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); }
.fold > summary { cursor: pointer; list-style: none; padding: 10px 14px; font-weight: 700; font-size: 15px; user-select: none; }
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary::before { content: "▸ "; color: var(--accent); }
.fold[open] > summary { border-bottom: 1px solid var(--line); }
.fold[open] > summary::before { content: "▾ "; }
.fold .table-wrap { border: none; box-shadow: none; margin: 10px 0 0; }
/* —— 邀请码徽标：足够扁的圆角小 pill，状态缀在邀请码下方，UID 缀在使用者下方 —— */
.invite-meta { display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.invite-meta:empty { display: none; }
.mini-badge {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  line-height: 20px;
  white-space: nowrap;
}
.mini-badge--unused { background: rgba(5, 150, 105, 0.12); color: #059669; border: 1px solid rgba(5, 150, 105, 0.3); }
.mini-badge--used { background: var(--bg-2); color: var(--muted); border: 1px solid var(--line); }
.mini-badge--revoked { background: rgba(220, 38, 38, 0.1); color: #dc2626; border: 1px solid rgba(220, 38, 38, 0.28); }
.mini-badge--uid { background: rgba(37, 99, 235, 0.1); color: #2563eb; border: 1px solid rgba(37, 99, 235, 0.28); }
.invite-revoke-form { margin: 0; display: inline-flex; }
.invite-revoke { height: 20px !important; padding: 0 8px !important; font-size: 11px !important; line-height: 18px !important; border-radius: 999px !important; }
/* —— 当前赛季提示：正文黑色，赛季名/日期用主题橙红色 —— */
.season-line { color: var(--text); }
.season-line strong { color: var(--accent); font-weight: 800; }
.row-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.row-actions .btn { white-space: nowrap; }
.price { font-size: 2rem; font-family: var(--font-sans); margin: 8px 0; }
.price small { font-size: 0.9rem; color: var(--muted); margin-left: 6px; }
/* —— 限时免费：原价划线置灰，现价 0 元高亮 —— */
.price-old { color: #9ca3af; text-decoration: line-through; font-weight: 400; margin-right: 6px; }
.price-now { color: #059669; font-weight: 800; }
.price--free .price-now { color: #059669; }

/* —— 订阅方案卡：个人按模式 + 舞团按档位，数量多，用小卡密排而非大面板 —— */
.card-grid--plans {
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 10px;
}
.plan-card {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 12px 14px;
  border-radius: 12px;
}
.plan-card h3 { margin: 0; font-size: 0.95rem; }
.plan-card .price { font-size: 1.15rem; margin: 2px 0; }
.plan-card .price small { font-size: 0.72rem; margin-left: 3px; }
.plan-card p { margin: 0; font-size: 12.5px; line-height: 1.45; }
.plan-card .btn {
  margin-top: 8px;
  align-self: stretch;
  padding: 8px 12px;
  font-size: 13px;
}
.plan-card__deal { color: var(--accent-2); font-weight: 600; }
@media (max-width: 640px) {
  .card-grid--plans { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .plan-card { padding: 10px 12px; }
  .plan-card h3 { font-size: 0.88rem; }
  .plan-card .price { font-size: 1.02rem; }
  .plan-card p { font-size: 12px; }
}

/* —— 多赛季折扣：方案页横幅 + 结算页可点选赛季档（划原价、标现价） —— */
.discount-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
  margin: 0 0 18px;
  padding: 10px 14px;
  background: rgba(232, 77, 26, 0.06);
  border: 1px dashed rgba(232, 77, 26, 0.4);
  border-radius: 12px;
  font-size: 13px;
}
.discount-banner__title { font-weight: 700; color: var(--accent-2); }
.discount-banner__note { color: var(--muted); }
.season-choices { border: 0; padding: 0; margin: 0 0 6px; display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(132px, 1fr)); }
.season-choices legend { font-size: 13px; font-weight: 600; color: var(--muted); padding: 0 0 4px; }
.season-choice {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
}
.season-choice input { position: absolute; opacity: 0; pointer-events: none; }
.season-choice:has(input:checked) {
  background: var(--card);
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(232, 77, 26, 0.16);
}
.season-choice:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.season-choice__top { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.season-choice__seasons { font-size: 13px; font-weight: 600; }
.season-choice__badge {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  background: var(--line);
  border-radius: 999px;
  padding: 1px 7px;
}
.season-choice--deal .season-choice__badge { color: #fff; background: var(--accent); }
.season-choice__total { display: flex; align-items: baseline; gap: 6px; }
.season-choice__was { font-size: 12px; color: var(--muted); }
.season-choice__now { font-size: 1.12rem; }
.season-choice__meta { font-size: 11.5px; color: var(--muted); line-height: 1.35; }
.season-choice__flag {
  position: absolute;
  top: -7px;
  right: 10px;
  font-size: 10.5px;
  font-weight: 700;
  color: #fff;
  background: var(--accent-2);
  border-radius: 999px;
  padding: 1px 7px;
}
@media (max-width: 640px) {
  .season-choices { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
}
.is-locked { opacity: 0.72; background-image: repeating-linear-gradient(-45deg, transparent, transparent 10px, rgba(232,77,26,0.04) 10px, rgba(232,77,26,0.04) 12px); }

.redeem-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin: 0 0 24px;
  padding: 18px 24px;
  background: linear-gradient(135deg, rgba(232, 77, 26, 0.05) 0%, rgba(255, 122, 189, 0.05) 100%), var(--card);
  border: 1px solid rgba(232, 77, 26, 0.22);
  border-left: 5px solid var(--accent);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.redeem-banner__content {
  flex: 1;
  min-width: 0;
}
.redeem-banner__header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.redeem-banner__badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(232, 77, 26, 0.1);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.redeem-banner__title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
}
.redeem-banner__desc {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
}
.redeem-banner__action {
  flex-shrink: 0;
}

.profile-grid .auth-card { width: auto; }
.auth-layout { display: grid; place-items: start center; padding-top: 20px; }
.auth-card { width: min(460px, 100%); }
.auth-tabs {
  display: flex;
  gap: 8px;
  margin: 0 0 16px;
}
.auth-tab {
  flex: 1;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}
.auth-tab.is-on {
  color: var(--text);
  border-color: var(--accent);
  background: rgba(232, 77, 26, 0.08);
}
.auth-switch-phone {
  display: inline-flex;
  align-items: center;
  margin-top: 8px;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid currentColor;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}
.auth-switch-phone:hover { background: rgba(220, 38, 38, 0.08); }
.form-stack { display: grid; gap: 12px; }
.profile-field { display: grid; gap: 6px; }
.profile-field > .muted { margin: 0; font-size: 14px; }
.profile-username-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
}
.profile-username-value {
  font-size: 16px;
  color: var(--text);
}
.profile-edit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.profile-edit-btn:hover {
  color: var(--accent);
  background: rgba(232, 77, 26, 0.08);
}
.profile-phone {
  margin: 0;
  font-size: 16px;
  color: var(--text);
}
.profile-uid {
  margin: 0;
  font-size: 16px;
  color: var(--text);
}
.profile-uid code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 15px;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.06);
  color: var(--text);
}
.profile-username-edit .errorlist { margin-top: 6px; }
label { display: grid; gap: 6px; font-size: 14px; color: var(--muted); }
.check-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
}
.check-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
  flex: 0 0 auto;
}
.check-row label {
  display: inline;
  margin: 0;
  font-size: 14px;
  color: var(--muted);
  white-space: nowrap;
}
.field-input, select.field-input, textarea {
  width: 100%; background: #fff; color: var(--text);
  border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font: inherit;
}
.errorlist { color: var(--danger); list-style: none; padding: 0; margin: 6px 0 0; font-size: 13px; }
.inline-field .field-input { flex: 1; min-width: 220px; }
.captcha-field { margin: 2px 0 4px; position: relative; }
.captcha-sdk-host {
  width: 100%;
}
.captcha-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.captcha-status { font-size: 14px; }

.roster-note-form { display: flex; gap: 8px; align-items: center; margin: 0; }
.roster-note-form .field-input { min-width: 140px; width: 180px; padding: 6px 10px; }
.roster-note-field { position: relative; display: inline-flex; align-items: center; }
.roster-note-field .field-input { padding-right: 30px; }
.roster-note-clear {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; padding: 0; border: 0; border-radius: 50%;
  background: transparent; color: var(--muted); cursor: pointer;
}
.roster-note-clear:hover { background: var(--bg-2); color: var(--text); }
.roster-note-clear[hidden] { display: none !important; }
.roster-note-clear svg { width: 13px; height: 13px; display: block; }
.roster-note-form__icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; flex: 0 0 auto; padding: 0;
  border: 1px solid var(--line); border-radius: 8px;
  background: transparent; color: var(--muted); cursor: pointer;
}
.roster-note-form__icon-btn:hover { background: var(--bg-2); color: var(--text); }
.roster-note-form__icon-btn[hidden] { display: none !important; }
.roster-note-form__icon-btn svg { width: 15px; height: 15px; display: block; }
.roster-note-form__icon-btn--apply { color: var(--ok); border-color: rgba(22, 163, 74, 0.35); }
.roster-note-form__icon-btn--apply:hover { background: rgba(22, 163, 74, 0.08); color: var(--ok); }
.roster-note-form__icon-btn--cancel { color: var(--danger); border-color: rgba(220, 38, 38, 0.3); }
.roster-note-form__icon-btn--cancel:hover { background: rgba(220, 38, 38, 0.07); color: var(--danger); }
.row-menu { position: relative; display: inline-flex; }
.row-menu[hidden] { display: none !important; }
.row-menu__trigger {
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 4px 12px; font-size: 13px; white-space: nowrap;
}
.row-menu__caret {
  width: 12px; height: 12px; display: block; color: var(--muted);
  pointer-events: none; transition: transform 0.15s ease;
}
.row-menu__trigger.is-down .row-menu__caret { transform: rotate(180deg); }
.row-menu__menu {
  position: fixed; z-index: 60;
  min-width: 148px; max-width: calc(100vw - 16px);
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow); padding: 6px;
  display: grid; gap: 2px;
}
.row-menu__menu[hidden] { display: none !important; }
.row-menu__form { margin: 0; }
.row-menu__item {
  display: block; width: 100%; border: 0; border-radius: 8px;
  background: transparent; color: var(--text);
  font: inherit; font-size: 13px; font-weight: 600; text-align: left; text-decoration: none;
  padding: 8px 10px; cursor: pointer;
}
.row-menu__item:hover,
.row-menu__item:focus-visible { background: rgba(232, 77, 26, 0.08); color: var(--text); outline: none; }
.row-menu__item--danger { color: var(--danger); }
.row-menu__item--danger:hover,
.row-menu__item--danger:focus-visible { background: rgba(220, 38, 38, 0.08); color: var(--danger); }
.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 12px; }
.table-wrap:has(.table-compact),
.table-wrap--compact {
  border-radius: 8px;
  background: var(--card);
}
.code-block {
  margin: 0;
  padding: 12px 14px;
  overflow: auto;
  max-height: 420px;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.45;
  background: color-mix(in srgb, var(--line) 35%, transparent);
  border-radius: 12px;
}
.pager {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 14px;
}
input.field-input[type="datetime-local"] {
  min-width: 210px;
}
table { width: 100%; border-collapse: collapse; background: var(--card); }
th, td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 600; font-size: 13px; background: var(--bg-2); }

/* —— 订单表（我的订单 / 个人中心最近订单）：定宽列，长订单号折两行，短列不再被压成一字一竖排 —— */
.table--orders,
.table--recent-orders { table-layout: fixed; font-size: 13px; font-variant-numeric: tabular-nums; }
.table--orders { min-width: 552px; }
.table--recent-orders { min-width: 460px; }
.table--orders th,
.table--orders td,
.table--recent-orders th,
.table--recent-orders td { padding: 12px 8px; }
.table--orders td:first-child,
.table--recent-orders td:first-child { word-break: break-all; }
.table--orders th:nth-child(3),
.table--orders td:nth-child(3),
.table--recent-orders th:nth-child(3),
.table--recent-orders td:nth-child(3) { white-space: nowrap; }
.table--orders th:nth-child(1) { width: 26%; }
.table--orders th:nth-child(2) { width: 14%; }
.table--orders th:nth-child(3) { width: 12%; }
.table--orders th:nth-child(4) { width: 10%; }
.table--orders th:nth-child(5) { width: 13%; }
.table--orders th:nth-child(6) { width: 17%; }
.table--orders th:nth-child(7) { width: 8%; }
.table--recent-orders th:nth-child(1) { width: 25%; }
.table--recent-orders th:nth-child(2) { width: 22%; }
.table--recent-orders th:nth-child(3) { width: 16%; }
.table--recent-orders th:nth-child(4) { width: 16%; }
.table--recent-orders th:nth-child(5) { width: 21%; }

.table-compact {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  line-height: 1.35;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.table-compact th,
.table-compact td {
  padding: 4px 8px;
  vertical-align: middle;
  border-bottom: 1px solid var(--line);
  border-right: 1px solid rgba(0, 0, 0, 0.06);
}
.table-compact th {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--muted);
  background: var(--bg-2);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 75%, black 15%);
  border-right: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 2;
  user-select: none;
}
.table-compact th:last-child,
.table-compact td:last-child {
  border-right: none;
}
.table-compact tbody tr:nth-child(even) {
  background: rgba(0, 0, 0, 0.015);
}
.table-compact tbody tr:hover {
  background: rgba(232, 77, 26, 0.05);
}
.table-compact tbody tr.is-clickable:hover {
  background: rgba(232, 77, 26, 0.08);
}
.table-compact code,
.table-compact .db-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 11.5px;
  background: transparent;
  padding: 0;
  color: inherit;
}
.table-compact a {
  font-weight: 600;
}
.table-compact .role-badge {
  padding: 1px 6px;
  font-size: 11px;
  border-radius: 4px;
  line-height: 1.25;
}
.table-compact .status-indicator {
  font-size: 11.5px;
  gap: 4px;
}
.table-compact .status-dot {
  width: 6px;
  height: 6px;
}
.table-compact .btn {
  height: 22px;
  padding: 1px 6px;
  font-size: 11px;
  border-radius: 4px;
  line-height: 1;
}
.table-compact small {
  font-size: 10.5px;
  line-height: 1.2;
}

.filter-bar-compact {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 0 0 12px;
}
.filter-bar-compact label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
  margin: 0;
  min-width: 0;
  flex: 1 1 auto;
}
.filter-bar-compact .field-input,
.filter-bar-compact select.field-input {
  width: auto;
  height: 32px;
  padding: 4px 10px;
  font-size: 13px;
  border-radius: 8px;
}
.filter-bar-compact .field-input[type="search"],
.filter-bar-compact input.field-input {
  min-width: 0;
  width: 100%;
  flex: 1 1 auto;
}
.filter-bar-compact .btn {
  height: 32px;
  padding: 4px 12px;
  font-size: 13px;
  line-height: 1;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  white-space: nowrap;
}
.filter-bar-compact .filter-count {
  font-size: 12px;
  color: var(--muted);
  margin-left: auto;
  white-space: nowrap;
}
/* 窄卡片（如舞团「成员」面板）内：输入框可收缩，搜索按钮始终留在输入框右侧 */
.panel .filter-bar-compact label {
  flex: 1 1 120px;
  min-width: 0;
}
.panel .filter-bar-compact input.field-input[type="search"] {
  width: 100%;
  min-width: 0;
}
.panel .filter-bar-compact .btn {
  flex: 0 0 auto;
  white-space: nowrap;
}

/* Table Pagers (Top & Bottom) */
.table-pager-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 8px;
  padding: 2px 2px;
  font-size: 12px;
  color: var(--muted);
}
.table-pager-top__info b {
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.table-pager-top__nav {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn-pager-compact {
  height: 26px !important;
  padding: 0 8px !important;
  font-size: 12px !important;
  line-height: 24px !important;
  border-radius: 6px !important;
  border: 1px solid var(--line) !important;
  background: var(--card) !important;
  color: var(--text) !important;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn-pager-compact:hover:not(.is-disabled) {
  border-color: var(--primary) !important;
  color: var(--primary) !important;
  background: rgba(232, 77, 26, 0.05) !important;
}
.btn-pager-compact.is-disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.table-pager-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 14px 0 20px;
  padding: 2px 0;
  font-size: 12.5px;
}
.table-pager-bottom__pages {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.pager-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text);
  text-decoration: none;
  transition: all 0.15s ease;
  user-select: none;
}
.pager-arrow:hover:not(.is-disabled) {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(232, 77, 26, 0.06);
}
.pager-arrow.is-disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}
.pager-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 30px;
  padding: 0 7px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text);
  font-size: 12.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-decoration: none;
  transition: all 0.15s ease;
  user-select: none;
}
.pager-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(232, 77, 26, 0.06);
}
.pager-btn.is-active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(232, 77, 26, 0.25);
  cursor: default;
}
.pager-ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 30px;
  color: var(--muted);
  font-size: 13px;
  user-select: none;
}
.table-pager-bottom__jump {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  margin: 0;
}
.pager-jump__input {
  width: 54px !important;
  height: 30px !important;
  padding: 2px 6px !important;
  font-size: 12.5px !important;
  font-variant-numeric: tabular-nums !important;
  text-align: center !important;
  border-radius: 6px !important;
}
.pager-jump__submit {
  height: 30px !important;
  padding: 0 10px !important;
  font-size: 12px !important;
  border-radius: 6px !important;
  line-height: 28px !important;
}

.table-pager-top__jump {
  margin-left: 4px;
}
.table-pager-top__nav {
  flex-wrap: wrap;
}
.table-pager-top__jump .pager-jump__input {
  width: 48px !important;
  height: 26px !important;
  font-size: 12px !important;
}
.table-pager-top__jump .pager-jump__submit {
  height: 26px !important;
  padding: 0 8px !important;
  font-size: 12px !important;
  line-height: 24px !important;
}

.role-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
}
.role-badge--admin {
  background: rgba(13, 148, 136, 0.12);
  color: #0d9488;
  border: 1px solid rgba(13, 148, 136, 0.25);
}
.role-badge--dev {
  background: rgba(124, 58, 237, 0.12);
  color: #7c3aed;
  border: 1px solid rgba(124, 58, 237, 0.25);
}
.role-badge--user {
  background: var(--bg-2);
  color: var(--muted);
  border: 1px solid var(--line);
}

.status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  white-space: nowrap;
}
.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
  flex: 0 0 auto;
}
.status-dot--active {
  background: var(--ok);
}
.status-dot--inactive {
  background: var(--muted);
  opacity: 0.7;
}
.status-cell {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
}
.status-dot--ok {
  background: var(--ok);
}
.status-dot--muted {
  background: var(--muted);
}
.status-dot--warn {
  background: #d97706;
}
.status-dot--danger {
  background: var(--danger);
}

.role-list--compact li {
  padding: 6px 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
}
.role-list--compact b {
  display: inline;
}

.flash-stack {
  width: min(var(--page-width), calc(100% - var(--page-gutter) * 2));
  margin: 12px auto 0;
  display: grid;
  gap: 8px;
}
.flash { padding: 10px 14px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); }
.flash-success { background: rgba(22, 163, 74, 0.08); color: var(--ok); border-color: rgba(22, 163, 74, 0.2); }
.flash-error, .flash-warning { background: rgba(220, 38, 38, 0.08); color: var(--danger); border-color: rgba(220, 38, 38, 0.2); }
.flash-info { background: rgba(13, 148, 136, 0.08); color: var(--teal); border-color: rgba(13, 148, 136, 0.2); }

.staff-nav, .staff-tabs {
  display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px;
}
.staff-nav a, .staff-tabs a {
  padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted);
}
.staff-nav a.is-on, .staff-tabs a.is-on { color: var(--text); border-color: var(--accent); background: rgba(232,77,26,0.08); }
.staff-nav a .nav-badge, .staff-tabs a .nav-badge { vertical-align: middle; }
.season-alert {
  margin: 8px 0 0;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(225, 29, 72, 0.35);
  background: rgba(225, 29, 72, 0.08);
  color: #e11d48;
  font-weight: 700;
  font-size: 13px;
}
.hidden { display: none; }
.inline-edit-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-end;
  padding: 8px 0;
}
.inline-edit-form label { flex: 1 1 180px; }
.inline-edit-form .btn { flex: 0 0 auto; height: 34px; }
.table-compact tr:has(.inline-edit-form) { background: var(--bg-2); }
.table-compact tr:has(.inline-edit-form):hover { background: var(--bg-2); }
.version-board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}
.version-board--compact {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}
.version-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 18px 16px;
  box-shadow: var(--shadow);
}
.version-board--compact .version-card {
  padding: 12px 14px 10px;
}
.version-board--compact .version-card__head h2 { font-size: 1rem; }
.version-board--compact .version-card__head p { font-size: 12px; margin: 2px 0 0; }
.version-board--compact .version-badge { padding: 2px 8px; font-size: 11px; }
.version-board--compact .version-pair { gap: 8px; margin-top: 10px; }
.version-board--compact .version-slot { padding: 10px; border-radius: 10px; }
.version-board--compact .version-slot h3 { font-size: 11px; margin-bottom: 6px; }
.version-board--compact .version-slot code { font-size: 0.95rem; margin-bottom: 4px; }
.version-board--compact .version-slot time,
.version-board--compact .version-slot .muted { font-size: 12px; }
.version-board--compact .version-card__detail { font-size: 12px; }
.version-board--compact .version-card__note { font-size: 12px; margin-top: 8px; }
.version-card__head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
  flex-wrap: wrap;
}
.version-card__head h2 { margin: 0; font-size: 1.15rem; }
.version-card__head p { margin: 4px 0 0; }
.version-badge {
  flex: 0 0 auto;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  line-height: 1.4;
  background: var(--bg-2);
  color: var(--muted);
}
.version-card--ok .version-badge {
  background: rgba(22, 163, 74, 0.12);
  color: var(--ok);
}
.version-card--behind .version-badge {
  background: rgba(220, 38, 38, 0.1);
  color: var(--danger);
}
.version-card--ahead .version-badge {
  background: rgba(232, 77, 26, 0.1);
  color: var(--accent);
}
.version-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}
.version-slot {
  background: var(--bg-2);
  border: 1px solid transparent;
  border-radius: 14px;
  padding: 12px;
  min-width: 0;
}
.version-slot h3 {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}
.version-slot code {
  display: block;
  margin: 0 0 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 1.02rem;
  line-height: 1.35;
  color: var(--text);
  word-break: break-all;
}
.version-slot code.is-missing { color: var(--muted); }
.version-slot time,
.version-slot .muted { display: block; font-size: 13px; }
.version-slot p { margin: 4px 0 0; }
.version-card__detail { word-break: break-all; }
.version-card--behind .version-slot--latest {
  border-color: rgba(220, 38, 38, 0.28);
}
.version-card__note {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 8px;
  margin: 12px 0 0;
  font-size: 13px;
  color: var(--muted);
}
.version-card__note code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: var(--text);
}
.staff-log-title { margin: 22px 0 6px; font-size: 1.05rem; }
.staff-burst-prefs {
  margin: 22px 0 8px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
}
.staff-burst-prefs h2 { margin: 0 0 6px; font-size: 1.1rem; }
.staff-burst-prefs__form { display: grid; gap: 14px; margin-top: 12px; }
.staff-burst-prefs__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px 16px;
  align-items: end;
}
.staff-burst-prefs__grid label { display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
.staff-burst-check {
  display: flex !important;
  align-items: center;
  gap: 8px;
  grid-template-columns: none !important;
  min-height: 42px;
  color: var(--text) !important;
}
.staff-burst-check input { width: 16px; height: 16px; }
.staff-burst-editor { margin-top: 28px; }
.staff-burst-slot-list { display: grid; gap: 14px; }
.staff-burst-slot {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  background: var(--card);
}
.staff-burst-slot.is-empty { opacity: 0.78; }
.staff-burst-slot.is-locked {
  border-color: rgba(232, 77, 26, 0.45);
  box-shadow: inset 3px 0 0 var(--accent);
}
.staff-burst-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  border: 1px solid rgba(232, 77, 26, 0.35);
  vertical-align: middle;
}
.staff-burst-badge--rec {
  color: var(--ok, #15803d);
  border-color: rgba(22, 163, 74, 0.35);
}
.staff-burst-badge--fire {
  color: var(--danger);
  border-color: rgba(220, 38, 38, 0.35);
}
.staff-burst-badge--limit {
  color: var(--limit);
  border-color: rgba(147, 51, 234, 0.35);
}
.staff-burst-slot__head {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.staff-burst-slot__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.staff-burst-slot__fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px 12px;
  margin-bottom: 10px;
}
.staff-burst-slot__fields label { display: grid; gap: 5px; font-size: 12px; color: var(--muted); }
.staff-burst-slot__note { grid-column: 1 / -1; }
.staff-burst-slot__meta { margin: 0 0 10px; font-size: 13px; }
.scope-grid { display: grid; gap: 8px; margin: 0 0 16px; }
.burst-block { margin: 28px 0; }
.burst-block--plain { margin: 12px 0 0; }
.mode-label-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 5px 12px;
  font-weight: 700;
  font-size: 13px;
  line-height: 1.2;
  color: #fff;
  user-select: none;
}
.mode-label-badge--single { background: var(--accent); }
.mode-label-badge--double { background: #7c3aed; }
/* SSP 与弹窗里那颗 .btn-gold 同色：金色是这一档独有的，橙/紫已被单双排占掉。 */
.mode-label-badge--ssp { background: #f5c451; color: #4a2c06; }
.query-filters { margin-bottom: 12px; }
.filter-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: end; margin-top: 10px; }
.filter-row label { min-width: 140px; }
.filter-row label.filter-check { min-width: 0; display: inline-flex; flex-direction: row; align-items: center; gap: 6px; white-space: nowrap; cursor: pointer; color: var(--text); padding-bottom: 8px; }
.filter-row label.filter-check input[type="checkbox"] { width: 16px; height: 16px; margin: 0; flex: 0 0 auto; }
.filter-bar-compact label.filter-check { min-width: 0; display: inline-flex; flex-direction: row; align-items: center; gap: 6px; white-space: nowrap; cursor: pointer; color: var(--text); }
.filter-bar-compact label.filter-check input[type="checkbox"] { width: 16px; height: 16px; margin: 0; flex: 0 0 auto; }
.table-compact td.cell-wrap { white-space: normal; word-break: break-word; min-width: 180px; max-width: 420px; line-height: 1.5; }
.paywall-panel { max-width: 560px; }
.slot-meta { display: grid; gap: 8px; margin: 10px 0 0; font-size: 14px; }
.slot-meta div { display: grid; grid-template-columns: 72px 1fr; gap: 8px; align-items: start; }
.slot-meta dt { margin: 0; color: var(--muted); font-weight: 600; }
.slot-meta dd { margin: 0; }
.slot-meta .slot-note { grid-column: 1 / -1; display: grid; grid-template-columns: 72px 1fr; gap: 8px; }
.slot-gain { font-weight: 800; font-size: 1.05rem; }
.burst-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.slot-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px;
}
.slot-card h4 { margin: 0 0 6px; }
.slot-card.is-empty { opacity: 0.55; }
.slot-bonly {
  grid-column: 1 / -1;
  border: 1px dashed var(--line);
  border-radius: 14px;
  padding: 10px 12px;
  background: rgba(15, 23, 42, 0.02);
}
.slot-bonly > summary {
  cursor: pointer;
  list-style: none;
  color: var(--muted);
  font-weight: 700;
  font-size: 14px;
  user-select: none;
}
.slot-bonly > summary::-webkit-details-marker { display: none; }
.slot-bonly > summary::before {
  content: "▸ ";
  color: var(--accent);
}
.slot-bonly[open] > summary {
  margin-bottom: 10px;
  color: var(--text);
}
.slot-bonly[open] > summary::before { content: "▾ "; }
.slot-bonly .slot-card { margin: 0; }

/* —— 爆气查询列表 —— */
.site-main:has(.query-section) {
  padding-top: 10px;
  padding-bottom: 0;
  /* --site-header-h 由 app.js 实测头部高度写入；写死 60px 会让「位置=底部」的
     筛选条离屏幕底差一截（真实头部约 47px）。 */
  min-height: calc(100vh - var(--site-header-h, 60px));
  min-height: calc(100dvh - var(--site-header-h, 60px));
  display: flex;
  flex-direction: column;
}
.site-main:has(.query-section) + .site-footer {
  display: none !important;
}
.query-section {
  margin-top: 0;
  margin-bottom: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}
.query-section .section-head {
  align-items: start;
  margin-bottom: 12px;
}
.query-section .section-head h1 {
  flex: 0 0 auto;
  margin-bottom: 0;
  font-size: clamp(1.75rem, 3.5vw, 2.8rem);
}
.query-section .section-head p {
  flex: 1 1 280px;
  margin: 0;
  max-width: 36em;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}
.query-shell {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  /* 撑满一屏，「位置=底部」的筛选条才有地方可钉（结果只有一两首时也要贴底） */
  grid-template-rows: minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  flex: 1 1 auto;
  min-height: 0;
}
.query-shell > .query-main { align-self: stretch; }
.alpha-rail {
  /* 热区相对 28px 栏宽向外扩一截，便于鼠标/触屏滑动选字母。
     高度由 JS 按「当前位置到视口底」写入 --alpha-rail-fit，避免 100vh
     从标题下方起算把字母拉长，点 B 实际打到 G。 */
  --alpha-rail-pad-start: 14px;
  --alpha-rail-pad-end: 20px;
  --alpha-rail-pad-y: 10px;
  position: sticky;
  top: 8px;
  z-index: 15;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0;
  width: 28px;
  box-sizing: border-box;
  height: var(--alpha-rail-fit, auto);
  max-height: calc(100vh - 16px);
  max-height: calc(100svh - 16px);
  max-height: calc(100dvh - 16px);
  overflow: hidden;
  overscroll-behavior: contain;
  padding: var(--alpha-rail-pad-y) var(--alpha-rail-pad-end) var(--alpha-rail-pad-y) var(--alpha-rail-pad-start);
  margin: calc(var(--alpha-rail-pad-y) * -1) calc(var(--alpha-rail-pad-end) * -1) calc(var(--alpha-rail-pad-y) * -1) calc(var(--alpha-rail-pad-start) * -1);
  border-right: none;
  scrollbar-width: none;
  -ms-overflow-style: none;
  touch-action: none;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}
.alpha-rail::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 auto;
  left: calc(var(--alpha-rail-pad-start) + 28px);
  width: 1px;
  background: var(--line);
  pointer-events: none;
}
.alpha-rail::-webkit-scrollbar {
  display: none;
}
.alpha-rail__item {
  display: grid;
  place-items: center;
  width: 28px;
  flex: 1 1 auto;
  min-height: 1em;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  font-size: clamp(8px, calc((var(--alpha-rail-fit, 70svh) - 20px) / 36), 13px);
  font-weight: 600;
  font-family: var(--font-sans);
  font-variant-numeric: tabular-nums;
  line-height: 1;
  letter-spacing: 0;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}
.alpha-rail__item:hover,
.alpha-rail__item.is-scrub {
  color: var(--text);
  background: rgba(232, 77, 26, 0.1);
}
.alpha-rail__item.is-on,
.alpha-rail__item.is-on:hover,
.alpha-rail__item.is-on.is-scrub {
  color: #fff;
  background: var(--text);
  font-weight: 700;
}

/* 「双列字母」：同一条 27 个按钮左右各渲染一份，各藏一半，切换只改显示不搬 DOM。
   左栏留 # 与 A–M（前 14 个），右栏留 N–Z，两栏各自的竖直间距随之翻倍。 */
.query-shell[data-alpha-cols="double"] {
  grid-template-columns: 28px minmax(0, 1fr) 28px;
}
.query-shell > .alpha-rail--right {
  display: none;
}
.query-shell[data-alpha-cols="double"] > .alpha-rail--right {
  display: flex;
}
.query-shell[data-alpha-cols="double"] > .alpha-rail--left .alpha-rail__item:nth-child(n + 15),
.query-shell[data-alpha-cols="double"] > .alpha-rail--right .alpha-rail__item:nth-child(-n + 14) {
  display: none;
}
/* 右栏是左栏的镜像：留白/外边距左右对调后，28px 字母格还要沿网格列靠右落位，
   否则字形会顶到 overflow:hidden 的边界被切掉半截。 */
.alpha-rail--right {
  justify-self: end;
  align-items: flex-end;
  padding: var(--alpha-rail-pad-y) var(--alpha-rail-pad-start) var(--alpha-rail-pad-y) var(--alpha-rail-pad-end);
  margin: calc(var(--alpha-rail-pad-y) * -1) calc(var(--alpha-rail-pad-start) * -1) calc(var(--alpha-rail-pad-y) * -1) calc(var(--alpha-rail-pad-end) * -1);
}
.query-toolbar { margin-bottom: 8px; }
.query-section .query-toolbar {
  position: sticky;
  top: 0;
  z-index: 20;
  margin-bottom: 2px;
  padding: 6px 0 10px;
  background: var(--bg);
  box-shadow: 0 1px 0 var(--line);
}
.query-section .bpm-combo__menu {
  z-index: 30;
}
.query-section .query-filters {
  margin-bottom: 0;
}
.query-section .query-mode-line {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0 2px;
  margin-bottom: 8px;
  width: 100%;
  min-width: 0;
}
.query-section .family-filter,
.query-section .star-filter,
.query-section .bpm-filter {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1 1 0;
  min-width: 0;
}
.query-section .star-filter {
  margin-left: -1px;
}
.query-section .family-picker,
.query-section .star-picker,
.query-section .bpm-combo {
  flex: 1 1 auto;
  min-width: 0;
}
.query-section .family-filter__text,
.query-section .star-filter__text,
.query-section .bpm-filter__text {
  flex: 0 0 auto;
  min-width: 0;
  font-size: 12px;
  letter-spacing: -0.02em;
}
.query-section .star-picker__trigger,
.query-section .family-picker__trigger {
  width: 100%;
  min-width: 4.35rem;
  max-width: none;
  padding: 6px 3px 6px 6px;
  gap: 2px;
  font-size: 12px;
}
.query-section .family-picker__value {
  gap: 0.25em;
  font-size: 12px;
}
.query-section .family-picker__icon {
  width: 14px;
  height: 14px;
}
.query-section .star-picker__value {
  font-size: 12px;
}
.query-section .star-picker__caret,
.query-section .family-picker__caret {
  font-size: 10px;
}
.query-section .bpm-combo__field {
  box-sizing: border-box;
  width: 100%;
  min-width: calc(4.75ch + 1.05rem);
  max-width: none;
  border-radius: 12px;
  overflow: hidden;
}
.query-section .bpm-combo__trigger {
  min-width: 0;
  flex: 1 1 60%;
  padding: 6px 1px 6px 4px;
  font-size: 12px;
  overflow: hidden;
  text-overflow: clip;
}
.query-section .bpm-combo__caret {
  flex: 0 0 40%;
  padding: 0;
}
.query-section .bpm-combo__caret-glyph {
  font-size: 14px;
}
.query-section .bpm-combo__pad {
  z-index: 31;
}
.query-section .query-search-line {
  width: 100%;
}
.query-section .family-filter__text,
.query-section .star-filter__text,
.query-section .bpm-filter__text,
.query-section .search-filter__text {
  flex: 0 0 auto;
}
.query-section .search-filter {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-width: 0;
}
.query-section .search-filter .search-box {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
  max-width: none;
}
.query-section .search-filter .field-input {
  width: 100%;
  min-width: 0;
  padding: 8px 32px 8px 10px;
  font-size: 13px;
}
.query-section .search-filter .btn {
  flex: 0 0 auto;
  margin-right: calc(-1 * var(--query-bleed-right) + 8px);
  padding: 8px 12px;
  font-size: 13px;
}
.query-section .query-main {
  overflow: visible;
  min-width: 0;
  margin-right: var(--query-bleed-right);
}
.query-mode-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  margin-bottom: 12px;
}
.query-search-line {
  display: flex;
}
.search-filter {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 auto;
  min-width: 0;
}
.star-filter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 0 0 auto;
}
.star-filter__text {
  color: var(--muted);
  font-weight: 600;
  font-size: 13px;
  white-space: nowrap;
}
.star-picker {
  position: relative;
}
.star-picker__native {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.star-picker__trigger,
.family-picker__trigger {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  box-sizing: border-box;
  width: 5.25rem;
  min-width: 5.25rem;
  max-width: 5.25rem;
  padding: 8px 8px 8px 10px;
  cursor: pointer;
  text-align: left;
}
.star-picker__value,
.family-picker__value {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.star-picker__value {
  font-size: 13px;
  font-weight: 600;
}
.star-picker__caret,
.family-picker__caret {
  color: var(--muted);
  font-size: 12px;
  line-height: 1;
  flex: 0 0 auto;
}
.star-picker__menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 30;
  min-width: 100%;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 6px;
  display: none;
  gap: 2px;
}
.star-picker__menu:not([hidden]) {
  display: grid;
}
.star-picker__menu[hidden] {
  display: none !important;
}
.star-picker__option {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  border-radius: 8px;
  padding: 8px 10px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  white-space: nowrap;
}
.star-picker__option:hover,
.star-picker__option.is-on {
  background: rgba(232, 77, 26, 0.08);
}
.search-filter__text {
  color: var(--muted);
  font-weight: 600;
  font-size: 13px;
  white-space: nowrap;
}
.bpm-filter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 0 0 auto;
}
.bpm-filter__text {
  color: var(--muted);
  font-weight: 600;
  font-size: 13px;
  white-space: nowrap;
}
.bpm-combo {
  position: relative;
}
.bpm-combo__field {
  display: inline-flex;
  align-items: stretch;
  width: auto;
  min-width: 0;
  padding: 0;
  overflow: visible;
}
.bpm-combo__trigger {
  /* 左半边不再是文本框：点了弹自己的数字键盘，和半场combo 那个同一套手感。 */
  flex: 1 1 60%;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  border: none;
  background: transparent;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  padding: 8px 4px 8px 10px;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}
.bpm-combo__trigger:focus {
  outline: none;
}
.bpm-combo__trigger:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
  border-radius: 8px;
}
.bpm-filter.is-empty .bpm-combo__trigger {
  color: var(--muted);
}
.bpm-filter.is-filled .bpm-combo__trigger {
  color: var(--accent);
}
/* 正在敲的草稿要像"输入"而不是"占位"，也不能冒充已生效的那个值（橙色）：这条排最后才压得住。 */
.bpm-filter.is-drafting .bpm-combo__trigger {
  color: var(--text);
}
/* 判定范围按整框的右 40% 算，不只圈住那个字形——拇指落在这一带都算点开下拉。 */
.bpm-combo__caret {
  flex: 0 0 40%;
  align-self: stretch;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-left: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.02);
  color: var(--muted);
  font: inherit;
  line-height: 1;
  padding: 0;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}
.bpm-combo__caret-glyph {
  font-size: 18px;
  line-height: 1;
}
.bpm-combo__caret:hover {
  color: var(--text);
  background: rgba(232, 77, 26, 0.06);
}
/* 数字键盘：观感照搬 .burst-cb__pad，但定宽且沿右沿对齐——
   BPM 是筛选行最右的一格，键盘向左长出去才不会顶出视口。 */
.bpm-combo__pad {
  position: absolute;
  z-index: 31;
  top: calc(100% + 6px);
  right: 0;
  width: 156px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow);
}
.bpm-combo__pad[hidden] {
  display: none !important;
}
.bpm-combo__pad.is-up {
  top: auto;
  bottom: calc(100% + 6px);
}
.bpm-combo__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
}
.bpm-combo__key {
  height: 38px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fafb;
  color: var(--text);
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.bpm-combo__key:active {
  background: rgba(232, 77, 26, 0.12);
  border-color: var(--accent);
}
.bpm-combo__key--fn {
  font-size: 14px;
  color: var(--muted);
}
/* 首位不给 0：先把这颗键示意成不可用，真点了才给一句提示。 */
.bpm-filter:not(.is-drafting) .bpm-combo__key[data-bpm-key="0"] {
  opacity: 0.38;
}
.bpm-combo__hint {
  margin: 6px 0 0;
  color: var(--danger);
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}
.bpm-combo__menu {
  position: absolute;
  z-index: 20;
  top: calc(100% + 4px);
  left: 0;
  min-width: 100%;
  max-height: 280px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  padding: 4px;
}
.bpm-combo__menu[hidden] {
  display: none !important;
}
.bpm-combo__option {
  display: block;
  width: 100%;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  padding: 8px 10px;
  cursor: pointer;
  white-space: nowrap;
}
.bpm-combo__option:hover,
.bpm-combo__option.is-on {
  background: rgba(232, 77, 26, 0.08);
}
.family-filter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 0 0 auto;
}
.family-filter__text {
  color: var(--muted);
  font-weight: 600;
  font-size: 13px;
  white-space: nowrap;
}
.family-picker {
  position: relative;
}
.family-picker__native {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.family-picker__value {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  font-size: 13px;
  font-weight: 600;
}
.family-picker__value > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.family-picker__menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 30;
  min-width: 100%;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 6px;
  display: none;
  gap: 2px;
}
.family-picker__menu:not([hidden]) {
  display: grid;
}
.family-picker__menu[hidden] {
  display: none !important;
}
/* 视口下沿放不下时向上弹（筛选条切到「底部」贴着屏幕下沿时），高度由 JS 按剩余空间钳制 */
.star-picker__menu.is-up,
.family-picker__menu.is-up,
.bpm-combo__menu.is-up {
  top: auto;
  bottom: calc(100% + 4px);
}
.star-picker__trigger.is-up .star-picker__caret,
.family-picker__trigger.is-up .family-picker__caret,
.bpm-combo__caret.is-up {
  transform: rotate(180deg);
}
.family-picker__option {
  display: flex;
  align-items: center;
  gap: 0.45em;
  width: 100%;
  border: 0;
  background: transparent;
  border-radius: 8px;
  padding: 8px 10px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  text-align: left;
}
.family-picker__option:hover,
.family-picker__option.is-on {
  background: rgba(232, 77, 26, 0.08);
}
/* 「类别」那一排三颗同形：一律白底，只有当前档跟着上面那条走淡橙
   （owner 2026-10-11 定：SSP 那颗在下拉里不单独染金，金色只留给头部徽标
   .mode-label-badge--ssp 与点歌名弹窗那颗 .btn-gold）。 */
.family-picker__icon {
  width: 1em;
  height: 1em;
  object-fit: contain;
  flex: 0 0 auto;
  display: block;
}
.family-picker__icon.is-ornate {
  width: 1.35em;
  height: 1em;
}
.mode-badge {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  font-size: 12px;
  font-weight: 800;
  color: #fff;
  background: #334155;
  flex: 0 0 auto;
}
.mode-badge[data-family="xingdong"] { background: #e8408c; }
.mode-badge[data-family="dianfeng"] { background: #7c3aed; }
.mode-badge[data-family="pinball"] { background: #6d28d9; }
.mode-badge[data-family="bubble"] { background: #0ea5e9; }
.mode-badge[data-family="crescent"] { background: #ea580c; }
.mode-icon-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex: 1 1 auto;
  min-width: 0;
  margin-bottom: 0;
}
.mode-icon-chip {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: #fff;
  font-weight: 700;
  font-size: 13px;
}
.mode-icon-chip:hover,
.mode-icon-chip.is-on {
  color: var(--text);
  border-color: var(--accent);
  background: rgba(232, 77, 26, 0.06);
}
.mode-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: block;
  flex: 0 0 auto;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12);
  object-fit: cover;
}
.mode-icon--ornate {
  width: 40px;
  height: 28px;
  border-radius: 0;
  object-fit: contain;
  box-shadow: none;
  filter: drop-shadow(0 2px 6px rgba(124, 58, 237, 0.28));
}
.mode-icon--sm { width: 28px; height: 28px; }
.mode-icon--sm.mode-icon--ornate { width: 36px; height: 24px; }
.star-badge {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  font-size: 12px;
  font-weight: 800;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
}
.query-filter-row { margin-top: 0; align-items: end; }
.query-search-field { flex: 1; min-width: 200px; align-items: center; }
.search-box {
  position: relative;
  flex: 1;
  min-width: 200px;
}
.search-box .field-input {
  width: 100%;
  min-width: 0;
  padding-right: 38px;
}
.search-box input[type="search"]::-webkit-search-cancel-button,
.query-search-field input[type="search"]::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
  display: none;
}
.search-box input[type="search"]::-ms-clear,
.query-search-field input[type="search"]::-ms-clear {
  display: none;
}
.search-clear {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
  display: none;
  place-items: center;
  cursor: pointer;
  padding: 0;
}
.search-clear.is-on { display: grid; }
.search-clear:hover { color: var(--text); background: rgba(15, 23, 42, 0.06); }
.query-hint { margin: 0 0 10px; }
.query-section .query-hint {
  margin: 0 0 8px;
  /* owner 2026-09-30：这行提示原本继承 body 默认 16px，比歌单行（13px）还大，
     「星动D开头 共 7 首」把整屏视觉重心抢走了，要求压掉一大半 → 9px。
     16→9 实测文本宽 133px→75px；再往下 8px 粉色粗体「星动」开始糊（阶梯对比图
     见 tmp/query_hint_size_harness.html，owner 要调档只改这一个数）。 */
  font-size: 9px;
  line-height: 1.4;
}
.query-hint__summary { color: var(--text); }
.query-hint__mode,
.query-hint__star,
.query-hint__letter { font-weight: 700; }
.query-hint__mode[data-family="xingdong"] { color: #c026a8; } /* 粉紫 */
.query-hint__mode[data-family="dianfeng"] { color: #7c3aed; } /* 紫 */
.query-hint__mode[data-family="pinball"] { color: #0891b2; } /* 青蓝 */
.query-hint__mode[data-family="bubble"] { color: #ca8a04; } /* 金黄 */
.query-hint__mode[data-family="crescent"] { color: #ea580c; } /* 橙红 */
.query-hint__star { color: var(--text); }
.query-hint__letter { color: var(--text); }
.query-hint__bpm {
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.query-hint__q { color: var(--text); font-weight: 800; }
/* ==========================================================================
 * 查询页：顶/底切换 + 显示模式切换（搜索/表格）
 * -------------------------------------------------------------------------- */
.query-section .query-main {
  /* 让 query-main 成为竖向 flex 容器，方便底部切换时用 order 重排 */
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  margin-bottom: 0;
  --query-chrome-h: 42px;
}
/* order 重排只在「底部」模式生效：
   顶部模式保持 DOM 自然顺序（chrome → 筛选行 → 提示 → 歌单），
   否则筛选行天然落在歌单下方 = 「选顶部却在底部」。 */
.query-section .query-shell[data-rows-position="bottom"] .query-main > .query-chrome { order: 0; }
.query-section .query-shell[data-rows-position="bottom"] .query-main > .query-hint { order: 1; }
.query-section .query-shell[data-rows-position="bottom"] .query-main > .song-list { order: 2; }
.query-section .query-shell[data-rows-position="bottom"] .query-main > .query-toolbar { order: 3; }

/* 右上角切换开关：独立 sticky，位置切到「底部」时仍留在顶部右上角 */
.query-chrome {
  position: sticky;
  top: 0;
  z-index: 22;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 6px 0;
  background: var(--bg);
  flex-wrap: wrap;
}
.seg-toggle {
  display: inline-flex;
  align-items: stretch;
  padding: 2px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  line-height: 1;
  flex: 0 0 auto;
  min-width: 0;
}
.seg-toggle__opt {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s ease, background 0.15s ease;
}
.seg-toggle__opt:hover { color: var(--text); }
.seg-toggle__opt.is-on {
  background: var(--bg);
  color: var(--accent);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}
/* —— 安装到桌面：主页 / 查询页开关行 / 顶栏菜单三处共用同一控件 ——
   默认由 hidden 属性收起，不参与任何布局；能不能装、要不要退成图标，
   全在 desktop-install.js 里按运行时能力判定，CSS 不猜浏览器。 */
[data-desktop-install][hidden] { display: none !important; }
[data-desktop-install].is-measuring {
  /* 量宽专用：.query-chrome 是 sticky，绝对定位子元素不参与 flex 布局 */
  position: absolute;
  top: 0;
  left: 0;
  visibility: hidden;
  pointer-events: none;
}
.install-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-2);
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
}
.install-chip:hover { color: var(--text); }
.install-chip__icon { width: 14px; height: 14px; flex: 0 0 auto; }
.install-chip.is-icon-only { padding: 6px 8px; }
.install-chip.is-icon-only .install-chip__label { display: none; }
.install-hint {
  /* 挂 body 的 fixed 气泡：留在 sticky 开关行内会把整行撑高，压掉一行歌单 */
  position: fixed;
  z-index: 70;
  max-width: min(320px, calc(100vw - 24px));
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  box-shadow: var(--shadow);
  font-size: 13px;
  line-height: 1.5;
  color: var(--text);
}
.install-hint p { margin: 0; }
.install-hint p + p { margin-top: 6px; }
.install-hint__note { color: var(--muted); font-size: 12px; }
/* QQ 的内置浏览器没有「在浏览器打开」可指路，气泡里直接把地址交出去。
   这段必须是普通文本不是表单控件：user-select:all 让长按/双击一次选中整段，
   是「复制」按钮失效时的兜底，而移动端一聚焦输入框就会放大页面、气泡飞出视野。 */
.install-hint__urlrow {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
}
.install-hint__url {
  flex: 1 1 auto;
  min-width: 0;
  max-height: 9em;
  padding: 5px 7px;
  overflow: auto;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: var(--bg-2);
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: anywhere;
  user-select: all;
  -webkit-user-select: all;
  -webkit-touch-callout: default;
}
.install-hint__copy {
  flex: 0 0 auto;
  padding: 7px 10px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
}
.install-hint__copy.is-done { border-color: var(--ok); background: var(--ok); }
.install-hint__copy.is-fail { border-color: var(--danger); background: var(--danger); }
/* iOS 分享面板图标：描边写在 CSS 里（presentation attribute 可被 CSS 覆盖），
   JS 只建 <svg> 与三个 <path>，省掉一串 setAttribute。 */
.install-hint__share {
  display: inline-block;
  width: 14px;
  height: 14px;
  margin: 0 4px;
  vertical-align: -2px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
/* 显示模式互斥：search/table 两套筛选行只显示一套 */
.query-shell[data-display-mode="search"] [data-filter-rows][data-rows="table"],
.query-shell[data-display-mode="table"] [data-filter-rows][data-rows="search"] {
  display: none !important;
}

/* 表格模式：两行自定义布局 —— 模式按钮 + 星级分瓣按钮 */
.query-filters--table {
  display: grid;
  gap: 8px;
  margin-bottom: 0;
}
.query-section .query-filters--table {
  margin-bottom: 0;
}
.table-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
/* 模式行恒为一行：查表时靠它切模式，换行会把星级行和结果整体下推。
   挤不下时先按视口缩字号/内距/图标，缩到下限仍不够才横向滚（滚动条隐藏，
   但按钮始终可达，所以不用 ellipsis 截掉模式名）。 */
.table-row--modes {
  flex-wrap: nowrap;
  gap: clamp(3px, 1.1vw, 6px);
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  /* 一旦有轴可滚，另一轴也会变成裁剪：内补白要盖住 is-on 的 4px 外阴影，
     再用等量负外边距把内容推回原位，避免整行下移。 */
  padding: 3px 4px 6px;
  margin: -3px -4px -6px;
}
.table-row--modes::-webkit-scrollbar { display: none; }
.table-row--stars {
  flex-wrap: nowrap;
}
.table-row__lead {
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: -0.02em;
}
.table-row__empty {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

/* 模式按钮 —— 移动端单行紧凑 */
.mode-chip {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: clamp(2px, 0.8vw, 4px);
  padding: 6px clamp(5px, 1.5vw, 10px);
  min-height: 34px;
  font: inherit;
  font-size: clamp(11px, 3vw, 13px);
  font-weight: 600;
  line-height: 1;
  color: var(--muted);
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  flex: 0 0 auto;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.mode-chip:hover { color: var(--text); border-color: rgba(232, 77, 26, 0.35); }
.mode-chip.is-on {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 1px 4px rgba(232, 77, 26, 0.25);
}
.mode-chip__icon {
  width: clamp(10px, 2.8vw, 14px);
  height: clamp(10px, 2.8vw, 14px);
  flex: 0 0 auto;
  filter: grayscale(0.4);
}
.mode-chip.is-on .mode-chip__icon { filter: none; }
.mode-chip__label { display: inline-block; }

/* 星级按钮 —— 单个按钮单个等级 */
.star-chips,
.star-pairs {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  scroll-snap-type: x proximity;
}
.star-chips::-webkit-scrollbar,
.star-pairs::-webkit-scrollbar { display: none; }
.star-chip {
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-2);
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  min-width: 36px;
  height: 32px;
  padding: 0 10px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  scroll-snap-align: start;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.star-chip:hover {
  color: var(--text);
  border-color: rgba(232, 77, 26, 0.35);
}
.star-chip.is-on {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 1px 4px rgba(232, 77, 26, 0.25);
}
.star-pair {
  display: inline-flex;
  align-items: stretch;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-2);
  overflow: hidden;
  flex: 0 0 auto;
  scroll-snap-align: start;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.star-pair:has(.star-pair__half.is-on) {
  border-color: var(--accent);
  background: rgba(232, 77, 26, 0.08);
}
.star-pair__half {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  min-width: 30px;
  height: 30px;
  padding: 0 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, color 0.15s ease;
}
.star-pair__half + .star-pair__half {
  border-left: 1px solid var(--line);
}
.star-pair__half:hover { color: var(--text); }
.star-pair__half.is-on {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.star-pair__half.is-on + .star-pair__half {
  border-left-color: rgba(255, 255, 255, 0.4);
}

/* 「位置 = 顶部」：filter rows sticky 贴在 chrome 下方 */
.query-section .query-shell[data-rows-position="top"] .query-main > .query-toolbar {
  position: sticky;
  top: var(--query-chrome-h, 42px);
  z-index: 20;
  background: var(--bg);
  box-shadow: 0 1px 0 var(--line);
}
.query-section .query-shell[data-rows-position="top"] .query-main > .song-list {
  margin-bottom: 0;
}
/* 「位置 = 底部」：filter rows sticky 到屏幕底部（必须重置 top，否则 top:0 优先于 bottom:0）
   margin-top:auto 让结果很少时筛选条也压在一屏最底；列表长时 auto 归零，间距由歌单 margin-bottom 兜住 */
.query-section .query-shell[data-rows-position="bottom"] .query-main > .query-toolbar {
  top: auto;
  margin-top: auto;
  margin-bottom: 0;
  padding: 10px 0 8px;
  background: var(--bg);
  box-shadow: 0 -1px 0 var(--line), 0 -6px 16px rgba(15, 23, 42, 0.04);
  position: sticky;
  bottom: 0;
  z-index: 25;
}
.query-section .query-shell[data-rows-position="bottom"] .query-main > .song-list {
  margin-bottom: 14px;
}

/* ==========================================================================
 * 查询页 —— 歌单与提示
 * -------------------------------------------------------------------------- */
.song-list {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  overflow: hidden;
}
/* 「歌名窄间距」只在查询页 shell 上挂 class，行距走变量往下传给每一行：
   默认值也得声明在 .query-shell 上——挂在 .song-list 就变成子元素自己定值，
   祖先上的 modifier 永远压不过它。字号与换行仍由 app.js 的 fitSongTitles 管，这里不碰。 */
.query-shell {
  --song-row-pad-y: 12px;
}
.query-shell.is-tight-title-gap {
  --song-row-pad-y: 6px;
}
.song-row {
  width: 100%;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px 12px;
  padding: var(--song-row-pad-y, 12px) 16px;
  border: 0;
  border-bottom: 1px solid #e8eaee;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  font: inherit;
}
.song-row[hidden] {
  display: none !important;
}
.song-row:last-child { border-bottom: 0; }
.song-row:hover { background: rgba(15, 23, 42, 0.03); }
.song-row.is-fire,
.song-row.is-fire .song-row__title { color: var(--danger); }
.song-row.is-limit,
.song-row.is-limit .song-row__title { color: var(--limit); }
/* 既单排爆气又双排极限：歌名斜向紫红渐变，副信息中性灰 */
.song-row.is-fire.is-limit .song-row__title {
  background-image: linear-gradient(105deg, var(--danger) 0%, var(--danger) 34%, var(--limit) 66%, var(--limit) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}
.song-row__title-rail {
  flex: 1 1 auto;
  min-width: 0;
}
/* 长歌名先由 js/app.js 降字号试着压成一行，一行放不下才换两行；
   --title-min 是能缩的下限（= 同行星级/BPM 的 13px），再小不如换行。 */
.song-row__title {
  --title-min: 13px;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  overflow-wrap: anywhere;
  font-weight: 700;
  line-height: 1.25;
}
/* 量宽探针：app.js 一次性把所有标题钉成单行读自然宽，再统一写回字号 */
.song-row__title.is-measuring,
.burst-detail__title.is-measuring {
  display: block;
  -webkit-line-clamp: unset;
  line-clamp: unset;
  overflow: visible;
  white-space: nowrap;
}
.song-row__meta {
  display: inline-flex;
  flex-wrap: nowrap;
  flex: 0 0 auto;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}
.song-row.is-fire .song-row__meta { color: #f87171; }
.song-row.is-limit .song-row__meta { color: var(--limit-soft); }
.song-row.is-fire.is-limit .song-row__meta { color: var(--muted); }
.song-row__bpm {
  flex: 0 0 auto;
  margin-left: 0;
  color: var(--muted);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.song-row.is-fire .song-row__bpm { color: #f87171; }
.song-row.is-limit .song-row__bpm { color: var(--limit-soft); }
.song-row.is-fire.is-limit .song-row__bpm { color: var(--muted); }
.song-tag { font-weight: 600; }
.song-list__empty { margin: 0; padding: 24px 16px; }

.category-modal[hidden] { display: none !important; }
.category-modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 24px;
}
.category-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
}
.category-modal__panel {
  position: relative;
  width: min(440px, 100%);
  background: #fff;
  border-radius: 18px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 28px 24px 24px;
}
.category-modal__x {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  font-size: 22px;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
}
.category-modal__warn {
  margin: 0 0 14px;
  color: var(--danger);
  font-size: 12px;
  line-height: 1.45;
}
.category-modal__mode {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 8px;
  flex-wrap: wrap;
}
.category-modal__mode-lead {
  color: var(--text);
}
.category-modal__mode-pick {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.category-modal__mode-name {
  font-weight: 700;
}
.category-modal__mode-meta {
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.category-modal__mode-name[data-family="xingdong"] { color: #c026a8; }
.category-modal__mode-name[data-family="dianfeng"] { color: #7c3aed; }
.category-modal__mode-name[data-family="pinball"] { color: #0891b2; }
.category-modal__mode-name[data-family="bubble"] { color: #ca8a04; }
.category-modal__mode-name[data-family="crescent"] { color: #ea580c; }
.category-modal__title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}
.category-modal__title-row:has(+ .category-modal__artist-row .category-modal__artist:not([hidden])) {
  margin-bottom: 0;
}
.category-modal__title {
  margin: 0;
  font-size: 1.45rem;
}
.category-modal__star {
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  flex-shrink: 0;
}
.category-modal__star[hidden] {
  display: none !important;
}
.category-modal__artist-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 16px;
}
.category-modal__artist {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}
.category-modal__artist[hidden] {
  display: none !important;
}
.category-modal__bpm {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  flex-shrink: 0;
}
.category-modal__bpm[hidden] {
  display: none !important;
}
.category-modal__prompt {
  margin: 0 0 14px;
  color: var(--text);
}
.category-modal__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.category-modal__actions [hidden] {
  display: none !important;
}
.category-modal__lock { margin: 12px 0 0; }
.category-modal__error {
  margin: 12px 0 0;
  color: #dc2626;
  font-size: 13px;
  line-height: 1.4;
}
.category-modal__error[hidden] {
  display: none !important;
}
.resume-modal__body {
  margin: 0 0 12px;
  line-height: 1.6;
}
.resume-modal .category-modal__title { font-size: 22px; margin-bottom: 18px; }

/* —— 爆点详情 —— */
.burst-detail {
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}
.burst-detail__card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 16px 16px 18px;
  box-shadow: var(--shadow);
}
.burst-detail__head {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}
.burst-detail__mode-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.burst-family-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 12px 3px 3px;
  border-radius: 999px;
  background: #fce7f3;
  color: #9d174d;
  font-weight: 700;
  font-size: 14px;
  line-height: 1.2;
}
.burst-family-pill .mode-icon {
  width: 24px;
  height: 24px;
  box-shadow: none;
}
.burst-family-pill .mode-icon--ornate {
  width: 32px;
  height: 22px;
}
.burst-family-pill[data-family="xingdong"] { background: #fce7f3; color: #9d174d; }
.burst-family-pill[data-family="dianfeng"] { background: #ede9fe; color: #6d28d9; }
.burst-family-pill[data-family="pinball"] { background: #cffafe; color: #0e7490; }
.burst-family-pill[data-family="bubble"] { background: #fef9c3; color: #a16207; }
.burst-family-pill[data-family="crescent"] { background: #ffedd5; color: #c2410c; }
.burst-family-pill__text { white-space: nowrap; }
/* 详情页头部：模式胶囊 + 单/双排徽标本身就是下拉触发器，不额外铺一行模式。 */
.burst-mode-picker {
  position: relative;
  display: inline-flex;
}
.burst-mode-picker__trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  cursor: pointer;
  border-radius: 999px;
}
.burst-mode-picker__trigger:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.burst-mode-picker__caret {
  /* 11px 的 ▾ 在胶囊旁边几乎看不见，用户会以为模式不能换。放大并提亮，
     同时钉住 flex 尺寸，别让胶囊文字把它挤没。 */
  flex: 0 0 auto;
  font-size: 17px;
  font-weight: 700;
  line-height: 1;
  opacity: 0.8;
  transition: transform 0.15s;
}
.burst-mode-picker__trigger[aria-expanded="true"] .burst-mode-picker__caret {
  transform: rotate(180deg);
}
.burst-mode-picker__menu {
  width: max-content;
  min-width: 100%;
}
.burst-mode-picker__group {
  margin: 4px 0 2px;
  padding: 0 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #9ca3af;
}
.burst-mode-picker__group:first-child {
  margin-top: 0;
}
.burst-mode-picker__now,
.burst-mode-picker__need {
  margin-left: auto;
  font-size: 11px;
  font-weight: 600;
}
.burst-mode-picker__now {
  color: var(--accent);
}
.burst-mode-picker__need {
  color: #9ca3af;
}
.family-picker__option.is-disabled {
  cursor: default;
  color: #b0b5bd;
}
/* 类别行没有图标，补一个图标列的宽度，文字才和上面的模式行对齐。
   不用 :has() —— QQ/微信内置的 Chromium 版本偏旧，认不得。 */
.family-picker__option--text {
  padding-left: calc(10px + 1em + 0.45em);
}
.family-picker__option.is-disabled:hover {
  background: transparent;
}
.family-picker__option.is-disabled .family-picker__icon {
  filter: grayscale(1);
  opacity: 0.5;
}
.burst-detail__mode-name {
  font-weight: 700;
  font-size: 15px;
}
.burst-detail__mode-name[data-family="xingdong"] { color: #c026a8; }
.burst-detail__mode-name[data-family="dianfeng"] { color: #7c3aed; }
.burst-detail__mode-name[data-family="pinball"] { color: #0891b2; }
.burst-detail__mode-name[data-family="bubble"] { color: #ca8a04; }
.burst-detail__mode-name[data-family="crescent"] { color: #ea580c; }
.burst-detail__star {
  font-weight: 700;
  font-size: 15px;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.burst-detail__title-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px 10px;
  min-width: 0;
}
.burst-detail__skill {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 50%;
  flex: 0 0 auto;
}
/* 标题不 grow：BPM 的 margin-left:auto 才留得住右侧，歌名按自身宽度排，
   超宽时由 js/app.js 降字号，缩到 --title-min 仍放不下就换两行。 */
.burst-detail__title {
  --title-min: 18px;
  margin: 0;
  flex: 0 1 auto;
  min-width: 0;
  font-family: var(--font-sans);
  font-size: clamp(1.45rem, 5vw, 1.85rem);
  font-weight: 900;
  line-height: 1.22;
  letter-spacing: 0;
  color: var(--text);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  overflow-wrap: anywhere;
}
/* 技能那两格（图标＋标题色）读页头那一行的 data-title-skill，不读 h1 上的类：
   半场 combo 修正「换成仅B段」时技能可能跟着换，而 app.js 只改这一个属性；
   旧写法把 is-fire/is-limit/is-sp 渲死在 h1 上，换卡跟不动且不报错。
   卡片那侧的着色是另一把尺（.burst-item[data-burst-skill]），两处各自只有一份。 */
.burst-detail__title-row[data-title-skill="fire"] .burst-detail__title {
  color: var(--danger);
}
.burst-detail__title-row[data-title-skill="limit"] .burst-detail__title {
  color: var(--limit);
}
/* 单排极限配金色 Perfect 徽章，紫色只留双排/SSP：多一个属性＝特异性更高，不靠先后取胜 */
.burst-detail__title-row[data-title-mode="single"][data-title-skill="limit"] .burst-detail__title {
  color: #d97706;
}
/* 这一页真有换卡入口时两颗图标都渲在页头里，放哪一颗由上面那把尺决定（换卡只改属性）。 */
.burst-detail__skill--fire,
.burst-detail__skill--limit {
  display: none;
}
.burst-detail__title-row[data-title-skill="fire"] .burst-detail__skill--fire,
.burst-detail__title-row[data-title-skill="limit"] .burst-detail__skill--limit {
  display: block;
}
.burst-detail__bpm {
  margin-left: auto;
  flex: 0 0 auto;
  color: #2563eb;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
/* 「切换爆点」只有双排页且真有另型那一行时才渲出来（presenters 的 15000 分差判据）。
   歌名因此让一档字号：这一行要跟歌名一起看完，歌名占着两行就没有"下面那一行"的位置了。
   字号只在这一格出现时才降，单排/SSP 与没有另型的歌维持原样——不是全站改标题尺寸。
   `fitSongTitles` 取的是 computed font-size 当基准再按阶梯缩，所以这条不会被内联样式盖掉。 */
.burst-detail__head--with-switch .burst-detail__title {
  font-size: clamp(1.15rem, 4vw, 1.45rem);
}
.burst-form-pick {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
}
.burst-form-pick__label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}
.burst-form-pick__btn {
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  cursor: pointer;
}
.burst-form-pick__btn.is-on {
  border-color: var(--accent);
  background: var(--bg-2);
  color: var(--accent);
}
/* 另型那一块进页就带 hidden：宿主按 .burst-item.is-open 挂播放器，整块不显示时
   一条都不该挂。这条声明是防"以后有人给 .burst-form 写了 display"把 hidden 吃掉。 */
.burst-form[hidden] {
  display: none;
}
.burst-detail__tags {
  /* 挂在模式行里（模式/单排右边）。flex: 0 0 auto 是必须的：允许收缩（0 1 auto
     + min-width:0）时，标签组会被压到比自身内容还窄，芯片里的 white-space: nowrap
     让它整组溢出卡片、页面横向滚动，而不是像预期那样换到下一行（360px 实测）。 */
  display: inline-flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.burst-chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #f3f4f6;
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
  white-space: nowrap;
}
/* 5K 用绿色字体：和旁边灰底黑字的「突变」拉开，一眼能分清「几键」和「分值变动」。
   取 --ok 的深一档，#16a34a 压在 #f3f4f6 底上小字号对比不够。 */
.burst-chip--keys5 {
  color: #15803d;
}
.burst-detail__close {
  width: 28px;
  height: 28px;
  margin-left: auto;
  border-radius: 50%;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
  flex: 0 0 auto;
}
.burst-detail__close:hover { color: var(--text); border-color: var(--accent); }
.burst-detail__switch { margin-bottom: 8px; }
.burst-accordion { display: grid; gap: 14px; margin-bottom: 0; }
.burst-item {
  background: transparent;
  overflow: visible;
  /* 折叠器是 grid，网格项默认 min-width:auto 会被 nowrap 提示文字顶宽（实测 320 屏撑到 356），
     那样提示既挤不动、整页还横向溢出。放开到 0 才轮得到下面的省略号。 */
  min-width: 0;
  contain: layout;
}
.burst-item--bonly .burst-item__box { border-style: dashed; }
/* 「换成仅B段」时源卡整张藏起来：正文已经搬进接收卡，露出来只剩一张空壳。
   折叠器是 grid，明确写 display:none，别指望 UA 那条 [hidden] 规则压得住。 */
.burst-item[hidden] {
  display: none;
}
.burst-item--empty {
  padding: 12px 14px;
  border: 1px dashed var(--line);
  border-radius: 14px;
  background: #fff;
}
.burst-item__box {
  position: relative;
  background: #f3f4f6;
  border-radius: 14px;
  padding: 12px 12px 10px;
}
.burst-code-stack {
  display: grid;
  gap: 10px;
}
.burst-code-row {
  display: flex;
  align-items: stretch;
  gap: 4px;
  min-width: 0;
}
.burst-code-col {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 4px;
  flex: 0 0 auto;
  min-width: 0;
  width: auto;
}
.burst-item.is-open .burst-code-col {
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
}
.burst-code {
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.25;
  color: #ff0000;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.burst-code-rank {
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.burst-code-rank.is-corrected {
  color: var(--ok);
}
.burst-code-rank:empty {
  display: none;
}
.burst-code.is-fire,
.burst-item.is-fire .burst-code { color: #ff0000; }
.burst-code.is-limit,
.burst-item.is-limit .burst-code { color: var(--limit); }
.burst-desc-card {
  background: #fff;
  border-radius: 10px;
  padding: 4px 8px;
  flex: 1 1 auto;
  min-width: 0;
}
.burst-code-row:first-child .burst-desc-card {
  padding-right: 58px;
}
/* 单排整张大卡片染色（包含爆点、描述、工具栏）：按该档携带技能上色，爆气暖红／极限紫。
   读 data-burst-skill 而不是 article 上的 is-fire/is-limit——单排极限按既有规则
   既不红也不紫（画紫只给双排），挂回那两个类名单排极限就会静默无色。
   卡片内描述框保持白底，工具栏各项（半场combo框、撤销、问号小图标）保持白底。 */
.burst-item:not([data-burst-kind="double"])[data-burst-skill="fire"] .burst-item__box {
  background: rgba(255, 51, 56, 0.1);
}
.burst-item:not([data-burst-kind="double"])[data-burst-skill="limit"] .burst-item__box {
  background: rgba(124, 58, 237, 0.1);
}

/* 双排只染色上半部分（一爆内容覆盖范围），贴齐卡片边缘无灰边，下半部分（二爆）保持中性并加极淡阴影。 */
.burst-item[data-burst-kind="double"][data-burst-skill="fire"] .burst-code-row:first-child {
  background: rgba(255, 51, 56, 0.1);
  margin: -12px -12px 0 -12px;
  padding: 12px 12px 10px 12px;
  border-radius: 14px 14px 0 0;
}
.burst-item[data-burst-kind="double"][data-burst-skill="limit"] .burst-code-row:first-child {
  background: rgba(124, 58, 237, 0.1);
  margin: -12px -12px 0 -12px;
  padding: 12px 12px 10px 12px;
  border-radius: 14px 14px 0 0;
}
.burst-item[data-burst-kind="double"] .burst-code-row:nth-child(2) .burst-desc-card {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}
/* 双排收折（未展开）状态：同样上下分层颜色，一爆上半段着色贴齐边缘、二爆下半段中性底色 */
.burst-item:not(.is-open)[data-burst-kind="double"] .burst-item__box {
  display: block;
  padding: 0;
  overflow: hidden;
}
.burst-item:not(.is-open)[data-burst-kind="double"] .burst-code-stack {
  gap: 0;
}
.burst-item:not(.is-open)[data-burst-kind="double"] .burst-code-row:first-child {
  margin: 0;
  padding: 8px 64px 8px 12px;
  border-radius: 14px 14px 0 0;
}
.burst-item:not(.is-open)[data-burst-kind="double"] .burst-code-row:only-child {
  border-radius: 14px;
}
.burst-item:not(.is-open)[data-burst-kind="double"] .burst-code-row:nth-child(2) {
  margin: 0;
  padding: 8px 64px 8px 12px;
  border-radius: 0 0 14px 14px;
  border-top: 1px solid rgba(0, 0, 0, 0.04);
}
.burst-descs {
  display: grid;
  gap: 1px;
}
.burst-item__toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}
.burst-item__correct {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1 1 auto;
  /* 工具栏这一行只许一行：提示宁可被省略号截掉，也不能折成两行把爆点顶下去。 */
  flex-wrap: nowrap;
  min-width: 0;
}
.burst-cb__tip {
  flex: 0 1 auto;
  min-width: 0;
  margin-left: auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}
.burst-cb {
  position: relative;
  flex: 0 0 auto;
}
.burst-cb__field.field-input {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  width: auto;
  min-width: 0;
  padding: 6px 8px;
  font-size: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  text-align: left;
  cursor: pointer;
}
.burst-cb__field.field-input:hover {
  background: #fff;
}
.burst-cb__field:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.burst-cb__value {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.burst-cb.is-filled .burst-cb__value {
  color: var(--accent);
}
.burst-cb.is-filled .burst-cb__label {
  display: none;
}
.burst-cb__label {
  color: var(--muted);
  font-size: 11px;
}
/* 向下弹：向上会盖住正在实时改写的爆点号，那就白算了。 */
.burst-cb__pad {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 20;
  width: 210px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow);
}
.burst-cb__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.burst-cb__key {
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fafb;
  color: var(--text);
  font: inherit;
  font-size: 17px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.burst-cb__key:active {
  background: rgba(232, 77, 26, 0.12);
  border-color: var(--accent);
}
.burst-cb__key--fn {
  font-size: 15px;
  color: var(--muted);
}
.burst-cb__hint {
  margin: 6px 0 0;
  color: var(--danger);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}
/* .burst-item 带 contain: layout，后一张卡会压在它下面弹出的键盘上，只能抬层。 */
.burst-item.is-pad-open {
  position: relative;
  z-index: 40;
}
.burst-item__undo {
  padding: 7px 10px;
  font-size: 13px;
  white-space: nowrap;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.burst-item__undo:hover,
.burst-item__undo:focus,
.burst-item__undo:active {
  background: #fff;
  border-color: var(--line);
}
.burst-item__calc:disabled,
.burst-item__undo:disabled {
  opacity: 1;
  color: var(--muted);
  background: #fff;
  border: 1px solid var(--line);
  cursor: not-allowed;
}
.burst-correct-help {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}
.burst-correct-help__btn {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid var(--muted);
  background: #fff;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.burst-correct-help__btn:hover,
.burst-correct-help__btn:focus-visible {
  background: #fff;
  border-color: var(--accent);
  color: var(--accent);
  outline: none;
}
.burst-correct-help__btn[aria-expanded="true"] {
  background: #fff;
  border-color: var(--accent);
  color: var(--accent);
}
.burst-correct-help__bubble {
  position: absolute;
  bottom: calc(100% + 8px);
  right: -8px;
  z-index: 20;
  width: min(280px, 70vw);
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: var(--shadow);
  color: var(--text);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.6;
  text-align: left;
  white-space: normal;
}
.burst-correct-help__bubble[hidden] {
  display: none !important;
}
.burst-correct-help__bubble::after {
  content: "";
  position: absolute;
  top: 100%;
  right: 14px;
  border: 6px solid transparent;
  border-top-color: #fff;
  filter: drop-shadow(0 1px 0 var(--line));
}
.burst-correct-help__text {
  display: block;
}
.burst-correct-help__text + .burst-correct-help__text {
  margin-top: 8px;
}
.burst-item__toggle {
  border: 1px solid var(--accent);
  background: var(--accent);
  padding: 3px 10px;
  border-radius: 999px;
  margin-left: auto;
  color: #fff;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
  text-decoration: none;
  cursor: pointer;
  flex: 0 0 auto;
  white-space: nowrap;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.burst-item__box .burst-item__toggle--float {
  position: absolute;
  top: 8px;
  right: 12px;
  z-index: 5;
  margin-left: 0;
  background: var(--accent);
  color: #fff;
  border: 1px solid var(--accent);
  border-radius: 999px;
  padding: 3px 10px;
}
.burst-item:not(.is-open) .burst-item__box .burst-item__toggle--float {
  top: 50%;
  transform: translateY(-50%);
}
.burst-item__toggle:hover,
.burst-item__toggle:focus-visible {
  color: #fff;
  background: var(--accent-2);
  border-color: var(--accent-2);
  outline: none;
}
.burst-item:not(.is-open) .burst-desc-card,
.burst-item:not(.is-open) .burst-desc--type,
.burst-item:not(.is-open) .burst-item__correct {
  display: none;
}
.burst-item:not(.is-open) .burst-code-row {
  display: flex;
}
.burst-item:not(.is-open) .burst-code-col {
  display: inline-flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: baseline;
  gap: 4px;
  max-width: none;
  width: auto;
}
.burst-item:not(.is-open) .burst-code-rank {
  white-space: nowrap;
}
.burst-item:not(.is-open) .burst-item__box {
  display: flex;
  align-items: center;
  gap: 8px 12px;
  padding: 10px 64px 10px 12px;
}
.burst-item:not(.is-open) .burst-code-stack {
  flex: 1 1 auto;
  min-width: 0;
  gap: 4px;
}
.burst-item:not(.is-open) .burst-item__toolbar {
  margin-top: 0;
  flex: 0 0 auto;
}
.burst-item__panel {
  display: grid;
  grid-template-rows: 0fr;
}
.burst-item.is-open .burst-item__panel { grid-template-rows: 1fr; }
.burst-item__panel-inner {
  overflow: hidden;
  min-height: 0;
}
.burst-item__tail { margin-top: 0; }
.burst-item.is-open .burst-item__tail { margin-top: 10px; }
.burst-item__body { padding: 0; text-align: left; }
.burst-preview-list {
  position: relative;
  display: block;
  width: 100%;
  margin-top: 14px;
}
/* 一爆/二爆互斥：只显一段，但两段都要是热的（参考图画好、播放器挂好），切换才不用等首帧。
   收起的那段绝不能改任何可测尺寸：display:none 会让播放器量到 0，画布退化成 640×1 且显形时不自愈（已实测）。
   所以把它挪出文档流（不占版面高度）+ visibility:hidden（不画、不可点、退出 Tab 序与读屏器），
   盒子宽高与显形时逐像素相同。选择器与属性由 burst-preview-host.js 的 applyClip 落。 */
.burst-preview-list[data-burst-clip-pref="1"] [data-burst-clip="2"],
.burst-preview-list[data-burst-clip-pref="2"] [data-burst-clip="1"] {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  visibility: hidden;
  pointer-events: none;
}
.burst-preview {
  min-width: 0;
  contain: layout;
}
.burst-preview__title {
  margin: 0 0 8px;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}
.burst-preview__player {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #000;
}
.burst-preview__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.burst-preview__head .burst-preview__title {
  margin-bottom: 0;
}
/* 互斥切换（一爆/二爆、图片/视频）：深色胶囊沿用播放器控制条（#120918 底、紫描边） */
.burst-preview__switch {
  display: flex;
  flex: 0 0 auto;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: #120918;
}
.burst-preview__switch[hidden] {
  display: none;
}
/* 未选档：透明底 + 亮紫字（对比度 7:1，两档都得读得清，区分度不靠把未选档压暗） */
.burst-preview__switch button {
  padding: 4px 12px;
  border: 0;
  border-radius: 99px;
  background: transparent;
  color: #a89cc8;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.burst-preview__switch button:hover {
  color: #e6dcff;
}
/* 选中档：与 .mode-chip.is-on 同族的品牌色实底。
   原来只是 rgba(255,255,255,.18) 的半透明底，压在近黑的 #120918 上和透明底几乎看不出差别
   （一爆/二爆两颗按钮字都一样亮，手机上看更分不清哪档生效），故改成填充色而非提亮文字。 */
.burst-preview__switch button.is-on,
.burst-preview__switch button.is-on:hover {
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.26);
}
.burst-preview__switch button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
/* 一爆/二爆那档带爆点编号，窄屏宁可整颗按钮换行也不能把文案截断。 */
.burst-preview__switch--clip button {
  white-space: nowrap;
}
.burst-reference {
  position: relative; /* 缩放按钮按容器定位，不跟着画布宽窄跑 */
  width: 100%;
  margin: 0 auto 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  overflow: hidden;
}
.burst-reference[hidden] {
  display: none;
}
/* 跳转条：配色与播放器下方那两条一致，一眼认出是同一件事 */
.burst-reference__nav {
  display: flex;
  gap: 8px;
  padding: 5px 8px 7px;
}
.burst-reference__nav button {
  flex: 1 1 0;
  min-width: 0;
  padding: 5px 10px;
  border: 0;
  border-radius: 10px;
  font: 700 13px/1.2 system-ui, sans-serif;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}
.burst-reference__jump--start {
  background: #20d9dc;
  color: #08353a;
}
.burst-reference__jump--start:hover {
  background: #4fe3e6;
}
.burst-reference__jump--end {
  background: #ff7abd;
  color: #fff;
}
.burst-reference__jump--end:hover {
  filter: brightness(1.08);
}
/* 图片本体（含缩放按钮）按画布宽收拢、居中；两侧留白不属于滚动盒，拖那里滚页面。 */
.burst-reference__stage {
  position: relative;
  width: fit-content;
  max-width: 100%;
  margin-inline: auto;
}
.burst-reference__scroll {
  max-height: 62vh;
  overflow-x: hidden; /* 兜底：放大上限就是容器宽，永远不给左右拖的余地 */
  overflow-y: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.burst-reference__scroll::-webkit-scrollbar {
  display: none;
}
.burst-reference__scroll canvas {
  display: block;
  max-width: 100%;
  cursor: grab;
}
.burst-reference__scroll[data-dragging="1"] canvas {
  cursor: grabbing;
  user-select: none;
}
.burst-reference__zoom {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 2; /* 现在是容器的直接子节点，不抬层会被后画的画布盖住 */
  display: flex;
  gap: 6px;
}
.burst-reference__zoom button {
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  color: #1f2430;
  font: 16px/1 system-ui, sans-serif;
  cursor: pointer;
}
.burst-reference__zoom button:hover {
  background: #fff;
  border-color: var(--accent);
  color: var(--accent);
}
/* 位置条：几何与播放器进度条一致（32px 高、8px 轨道、18px 白心紫边游标） */
.burst-reference__seek {
  position: relative;
  height: 32px;
  padding: 0 9px;
  cursor: pointer;
  touch-action: none;
  outline: none;
}
.burst-reference__seek:focus-visible .burst-reference__thumb {
  border-color: #fff;
}
.burst-reference__rail {
  position: absolute;
  left: 9px;
  right: 9px;
  top: 12px;
  height: 8px;
}
.burst-reference__track {
  position: absolute;
  inset: 0;
  border-radius: 99px;
  overflow: hidden;
  background: #4a3d68;
}
.burst-reference__played {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0;
  background: rgba(255, 255, 255, 0.4);
}
.burst-reference__thumb {
  position: absolute;
  top: -5px;
  left: 0;
  width: 18px;
  height: 18px;
  margin-left: -9px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #e4a6ff;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.4);
  pointer-events: none;
}
.burst-preview[data-burst-view="image"] .burst-preview__player {
  display: none;
}
.burst-preview[data-burst-view="video"] .burst-reference {
  display: none;
}
.burst-preview[data-preview-state="ready"] .burst-preview__player {
  aspect-ratio: auto;
}
.burst-preview__canvas {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  flex: 1 1 auto;
  height: 100%;
  min-height: 0;
}
.burst-preview[data-preview-state="ready"] .burst-preview__canvas {
  flex: 0 0 auto;
  height: auto;
}
.burst-preview__status {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  margin: 0;
  padding: 16px;
  background: rgba(32, 18, 64, 0.72);
  color: #efe8ff;
  font-size: 13px;
  text-align: center;
}
.burst-preview__status[hidden],
.burst-preview[data-preview-state="ready"] .burst-preview__status {
  display: none !important;
}
.burst-preview[data-preview-state="error"] .burst-preview__status {
  color: var(--danger);
}
.burst-desc-line {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--text);
  text-align: left;
  overflow-wrap: anywhere;
}
.burst-desc-tag {
  font-weight: 700;
  color: var(--text);
}
.burst-start-combo {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.burst-start-combo.is-fire { color: var(--danger); }
.burst-start-combo.is-limit { color: var(--limit); }
.burst-desc--note { color: var(--muted); margin: 4px 0 0; text-align: left; font-size: 12px; }
.burst-desc--type { padding-left: 0; }
/* 统计卡恒定单行：宁可缩字号也不折行，打歌时没时间等第二行（基础三格；SSP 那行四格见下条） */
.burst-stat-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  margin: 0 0 8px;
}
.burst-stat {
  min-width: 0;
  background: #f3f4f6;
  border-radius: 8px;
  padding: 5px 5px 4px;
  text-align: center;
}
/* SSP 那一行比单双排多一张「SSP数」（owner 2026-10-11 定，挤在半(全)combo 右边）。
   四格等分会把「爆气分(指数)」那格的六位数 + 指数括号挤出灰格外（nowrap + 居中 = 两头
   溢出去压邻居，320px 实测超 20.9px），所以列宽按内容给：SSP数 最窄（实测 34–364，三位），
   爆气分最宽。这一条不许写 gap——统计行的间隙是水印 statrow 信道的基数，改一下标定整体偏移。 */
.burst-stat-row--ssp {
  grid-template-columns: 1.12fr 0.62fr 1.42fr 0.84fr;
}
.burst-stat-row--ssp .burst-stat__label { font-size: clamp(9px, 2.5vw, 10.5px); }
.burst-stat-row--ssp .burst-stat__value { font-size: clamp(9.5px, 2.8vw, 13.5px); }
.burst-stat__label {
  display: block;
  font-size: clamp(9.5px, 2.7vw, 11px);
  font-weight: 600;
  color: var(--muted);
  line-height: 1.2;
  white-space: nowrap;
}
.burst-stat__value {
  display: block;
  margin-top: 1px;
  font-size: clamp(10px, 3.1vw, 15px);
  font-weight: 800;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  white-space: nowrap;
}
/* 修正爆点时 app.js 只改写 .slot-gain 里的数字，括号中的指数原样留着 */
.burst-stat__value .slot-gain { font-size: inherit; }
.score-delta {
  margin-left: 1px;
  font-weight: 700;
  font-size: clamp(9.5px, 2.6vw, 12px);
  font-variant-numeric: tabular-nums;
}
.score-delta.is-pos { color: var(--ok); }
.score-delta.is-neg { color: var(--danger); }
.burst-extra { display: grid; gap: 4px; margin: 0; font-size: 13px; }
.burst-extra div { display: grid; grid-template-columns: 72px 1fr; gap: 8px; }
.burst-extra dt { margin: 0; color: var(--muted); font-weight: 600; }
.burst-extra dd { margin: 0; }
.burst-extra__note { grid-column: 1 / -1; }

@media (max-width: 880px) {
  /* 小屏不换行：logo、导航、账号区挤在同一行，导航自身可横向滚动兜底 */
  .site-header {
    flex-wrap: nowrap;
    gap: 6px;
    padding: 10px 0 8px;
  }
  .brand {
    flex: 0 0 auto;
    min-width: 0;
  }
  .brand-logo {
    height: 24px;
    width: auto;
  }
  .site-nav {
    flex: 1 1 auto;
    gap: 4px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .site-nav::-webkit-scrollbar { display: none; }
  .site-nav__link {
    font-size: 12px;
    padding: 5px 7px;
  }
  .site-nav__link--extra {
    display: none;
  }
  .header-actions {
    gap: 6px;
    flex-shrink: 0;
  }
  .header-actions__auth {
    padding: 5px 8px;
    font-size: 12px;
    white-space: nowrap;
  }
  .user-menu__trigger > span:first-child {
    max-width: 6em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .user-menu__nav {
    display: grid;
  }
}

@media (max-width: 400px) {
  .site-header { gap: 4px; }
  .brand-logo { height: 20px; }
  .chip { padding: 4px 7px; }
  .header-actions__auth { padding: 4px 6px; }
  .user-menu__trigger > span:first-child { max-width: 4.5em; }
}

@media (max-width: 800px) {
  .burst-grid { grid-template-columns: 1fr; }
  .hero { grid-template-columns: 1fr; }
  .site-footer { flex-direction: column; align-items: flex-start; gap: 8px; }
  .afdian-promo { grid-template-columns: 1fr; }
  .redeem-banner {
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
    gap: 14px;
  }
  .redeem-banner__action .btn {
    width: 100%;
  }
  .query-shell { grid-template-columns: 28px minmax(0, 1fr); gap: 8px; }
  /* 手机端再扩一截：约等于栏宽，拇指更容易落在滑动热区内 */
  .alpha-rail {
    --alpha-rail-pad-start: 20px;
    --alpha-rail-pad-end: 32px;
    --alpha-rail-pad-y: 16px;
  }
  /* 三个开关并排要 322px，手机屏（双列字母时可用宽度还要再减 36px）放不下，压扁选项内边距保一行 */
  .query-chrome .seg-toggle__opt {
    padding: 6px 8px;
  }
}

/* -------------------------------------------------------------------------- */
/* 数值步进器 (Number Stepper: [-] [ 0 ] [+])                                  */
/* -------------------------------------------------------------------------- */
.number-stepper {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  vertical-align: middle;
}
.number-stepper:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(232, 77, 26, 0.15);
}
.stepper-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  min-width: 38px;
  border: none;
  background: var(--bg-2);
  color: var(--text);
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.15s ease, color 0.15s ease, opacity 0.15s ease;
}
.stepper-btn:hover:not(:disabled) {
  background: rgba(232, 77, 26, 0.12);
  color: var(--accent);
}
.stepper-btn:active:not(:disabled) {
  background: rgba(232, 77, 26, 0.22);
}
.stepper-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  color: var(--muted);
}
.stepper-input {
  border: none !important;
  border-radius: 0 !important;
  text-align: center;
  font-weight: 700;
  font-size: 15px;
  width: 52px;
  min-width: 44px;
  padding: 6px 4px !important;
  box-shadow: none !important;
  background: transparent !important;
  -moz-appearance: textfield;
}
.stepper-input::-webkit-outer-spin-button,
.stepper-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* 兑换码生成管理界面专有组件 */
.redeem-kind-tabs {
  display: inline-flex;
  gap: 6px;
  background: var(--bg-2);
  padding: 4px;
  border-radius: 14px;
  border: 1px solid var(--line);
  margin-bottom: 4px;
}
.redeem-kind-tab {
  padding: 8px 18px;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
}
.redeem-kind-tab.is-active {
  background: #fff;
  color: var(--accent);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  font-weight: 700;
}
.stepper-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
  margin: 10px 0;
}
.stepper-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 14px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.stepper-card:hover {
  border-color: rgba(232, 77, 26, 0.3);
}
.stepper-card .number-stepper {
  display: flex;
  width: 100%;
}
.stepper-card .stepper-input {
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
}
@media (max-width: 640px) {
  .stepper-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .stepper-card {
    padding: 10px;
  }
  .stepper-btn {
    width: 32px;
    height: 32px;
    min-width: 32px;
    font-size: 16px;
  }
}
.stepper-card__label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}
.stepper-quick-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.stepper-quick-btn {
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s ease;
}
.stepper-quick-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(232, 77, 26, 0.05);
}

/* Staff Logs: 测算与爆点变更升级样式 */
.change-toolbar {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
  padding: 12px 14px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.change-toolbar__filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  align-items: center;
}
.change-filter-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.change-filter-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  margin-right: 2px;
}
.change-filter-btn {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text);
  padding: 3px 10px;
  border-radius: 14px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.change-filter-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.change-filter-btn.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}
.change-toolbar__search {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.change-search-input {
  flex: 1;
  max-width: 380px;
  height: 32px;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 6px;
}
.change-counter {
  font-size: 12px;
  color: var(--muted);
}

.badge-change {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
  background: var(--bg-2);
  color: var(--text);
  border: 1px solid var(--line);
}
.badge-change--new {
  background: rgba(46, 160, 67, 0.15);
  color: #2ea043;
  border-color: rgba(46, 160, 67, 0.35);
}
.badge-change--burst {
  background: rgba(138, 75, 235, 0.15);
  color: #8a4beb;
  border-color: rgba(138, 75, 235, 0.35);
}
.badge-change--skill {
  background: rgba(30, 111, 232, 0.15);
  color: #1e6fe8;
  border-color: rgba(30, 111, 232, 0.35);
}
.badge-change--note {
  background: rgba(210, 153, 34, 0.15);
  color: #b07d12;
  border-color: rgba(210, 153, 34, 0.35);
}
.badge-change--score {
  background: rgba(23, 162, 184, 0.15);
  color: #138496;
  border-color: rgba(23, 162, 184, 0.35);
}
.badge-change--remove, .badge-change--error {
  background: rgba(220, 53, 69, 0.15);
  color: #dc3545;
  border-color: rgba(220, 53, 69, 0.35);
}

.badge-mode {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  background: var(--bg-2);
  color: var(--text);
  border: 1px solid var(--line);
}
.badge-slot {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11px;
  background: var(--card);
  color: var(--muted);
  border: 1px solid var(--line);
}

.diff-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.diff-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 12px;
}
.diff-chip__label {
  font-weight: 600;
  color: var(--muted);
  font-size: 11px;
}
.diff-chip__old {
  color: var(--muted);
  text-decoration: line-through;
}
.diff-chip__arrow {
  color: var(--accent);
  font-size: 10px;
}
.diff-chip__new {
  color: #2ea043;
  font-weight: 700;
}

.slots-cell {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.slots-primary-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.slot-summary-card {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 11px;
}
.slot-summary-card__head {
  color: var(--muted);
}
.slot-summary-card__code {
  color: #1e6fe8;
  font-weight: 700;
  font-family: ui-monospace, monospace;
}
.slot-summary-card__skill {
  display: inline-block;
  padding: 1px 4px;
  border-radius: 3px;
  background: rgba(30, 111, 232, 0.12);
  color: #1e6fe8;
  font-size: 10px;
}
.slot-summary-card__score {
  color: #8a4beb;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

/* —— 日志合并视图：组徽标 / 异常标记 / 组内明细行 —— */
.log-group-scope {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  background: rgba(30, 111, 232, 0.12);
  color: #1e6fe8;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.log-group-flag {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  background: rgba(250, 173, 20, 0.15);
  color: #b7791f;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.log-group-flag--error {
  background: rgba(245, 34, 45, 0.12);
  color: #cf1322;
}
/* 验证结论徽标：绿＝真的通过验证，灰＝谈不上验证（未提交 / 未送达） */
.log-group-flag--ok {
  background: rgba(54, 179, 126, 0.14);
  color: #1f7a4d;
}
.log-group-flag--muted {
  background: rgba(120, 125, 135, 0.14);
  color: #6b7280;
}
.log-group-members {
  padding: 0 8px 8px;
  background: rgba(0, 0, 0, 0.015);
}
.log-group-members .slots-expand__content {
  max-height: 360px;
}
/* 组行行尾：步数徽标 + 下拉展开箭头 */
.log-group-toggle-cell {
  white-space: nowrap;
  text-align: right;
}
.log-group-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 1px 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted, #666);
  font: inherit;
  cursor: pointer;
}
.log-group-toggle:hover {
  border-color: var(--accent);
}
.log-group-toggle__count {
  display: inline-block;
  min-width: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: rgba(250, 140, 22, 0.16);
  color: #d97706;
  font-size: 12px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 18px;
  text-align: center;
}
.log-group-toggle__caret {
  font-size: 11px;
  line-height: 1;
  transition: transform 0.15s ease;
}
.log-group-toggle__text {
  font-size: 12px;
  line-height: 1;
}
.log-group-toggle[aria-expanded="true"] .log-group-toggle__caret {
  transform: rotate(180deg);
}
@media (max-width: 720px) {
  .log-group-members .table-compact td.cell-wrap { min-width: 0; }
}

.slots-expand {
  margin-top: 2px;
}
.slots-expand__trigger {
  cursor: pointer;
  font-size: 11px;
  color: var(--accent);
  user-select: none;
  display: inline-flex;
  align-items: center;
  padding: 2px 0;
  font-weight: 600;
}
.slots-expand__trigger:hover {
  text-decoration: underline;
}
.slots-expand__content {
  margin-top: 6px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  max-height: 280px;
}
.slots-table {
  width: 100%;
  font-size: 11px;
  background: var(--card);
}
.slots-table th {
  background: var(--bg-2);
  padding: 4px 8px;
  font-size: 10px;
}
.slots-table td {
  padding: 4px 8px;
}
.slot-code-text {
  color: #1e6fe8;
  font-family: ui-monospace, monospace;
}
.slot-notes-text {
  color: var(--muted);
  max-width: 360px;
  white-space: normal;
  word-break: break-all;
}

.notice-pill {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 4px;
  background: var(--bg-2);
  color: var(--muted);
  font-size: 12px;
}

/* —— 限额策略列表：卡片式（替代 table 包 form，避免移动端表头被压成竖排） —— */
.policy-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr));
}
.policy-card {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  background: var(--bg-2);
  display: grid;
  gap: 12px;
  align-content: start;
}
.policy-card__head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
  flex-wrap: wrap;
}
.policy-card__code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-weight: 700;
  font-size: 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1px 8px;
}
.policy-card__name {
  font-weight: 700;
  color: var(--text);
}
.policy-card__fields {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.policy-card__notes {
  grid-column: 1 / -1;
}
.policy-card__notes .field-input {
  overflow: hidden;
  text-overflow: ellipsis;
}
.policy-card__foot {
  display: flex;
  justify-content: flex-end;
}
@media (max-width: 480px) {
  .policy-card__fields {
    grid-template-columns: 1fr;
  }
  .policy-card__notes {
    grid-column: auto;
  }
  .version-pair {
    grid-template-columns: 1fr;
  }
}

/* —— 移动端表格/表单兜底：表头不再被压成一字一排，超宽内容横向滚动 —— */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
}
@media (max-width: 640px) {
  .table-wrap table:not(.table-compact) th {
    white-space: nowrap;
  }
  .table-wrap table:not(.table-compact) td {
    vertical-align: top;
  }
  .roster-note-form {
    flex-wrap: wrap;
  }
  .roster-note-field {
    flex: 1 1 140px;
    min-width: 0;
  }
  .roster-note-form .field-input {
    flex: 1 1 140px;
    width: auto;
    min-width: 0;
  }
  .filter-row { gap: 8px; }
  .filter-row label {
    flex: 1 1 100%;
    min-width: 0;
  }
  .filter-row label.filter-check { flex: 1 1 100%; padding-bottom: 0; }
  .filter-row .field-input { width: 100%; min-width: 0; }
  input.field-input[type="datetime-local"] { min-width: 0; width: 100%; }
  .filter-row .btn { width: 100%; }
  .filter-bar-compact { gap: 8px; }
  .filter-bar-compact label { flex: 1 1 100%; min-width: 0; }
  .filter-bar-compact label.filter-check { flex: 1 1 100%; }
  .filter-bar-compact .field-input,
  .filter-bar-compact select.field-input { width: 100%; min-width: 0; }
  .filter-bar-compact input.field-input[type="search"] {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
  }
  .filter-bar-compact .btn { flex: 1 1 auto; }
  .table-compact td.cell-wrap { min-width: 160px; max-width: none; }
  .section-head {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .section-head h1,
  .section-head h2 {
    margin-bottom: 0;
  }
  .section-head p {
    margin-bottom: 0;
  }
  .query-section .section-head p {
    flex: none;
    max-width: none;
  }
  .panel {
    padding: 16px;
  }
}

/* —— 开发者 API 日志详情：紧凑表格，一行一个字段 —— */
.api-log-detail-table th[scope="row"] {
  width: 92px;
  min-width: 92px;
  white-space: nowrap;
  text-align: right;
  vertical-align: top;
}
.api-log-detail-table td.cell-wrap {
  white-space: normal;
  word-break: break-word;
  min-width: 0;
  max-width: none;
}
.code-block--compact {
  max-height: 240px;
  padding: 8px 10px;
  border-radius: 8px;
}

/* —— 开发者 API 日志详情弹窗：右上角关闭 —— */
.api-log-modal[hidden] { display: none !important; }
.api-log-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 24px;
}
.api-log-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
}
.api-log-modal__panel {
  position: relative;
  width: min(960px, 100%);
  max-height: min(90vh, 900px);
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 16px 16px 12px;
}
.api-log-modal__x {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  font-size: 22px;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
}
.api-log-modal__x:hover { background: rgba(0, 0, 0, 0.06); color: var(--text); }
.api-log-modal__title {
  margin: 0 40px 10px 0;
  font-size: 1.05rem;
}
.api-log-modal__body {
  overflow: auto;
  min-height: 120px;
}
.api-log-modal__foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  margin-top: 10px;
}

/* —— 开发者「冻结/封禁记录」页 —— */
.freeze-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  align-items: center;
  padding: 10px 14px;
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-2);
  font-size: 13px;
}
.freeze-summary__item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}
.freeze-detail {
  padding: 10px 4px 4px;
}
.freeze-detail__rule {
  padding: 0 0 10px;
  margin-bottom: 10px;
  border-bottom: 1px dashed var(--line);
}
.freeze-detail__rule h4 {
  margin: 0 0 6px;
  font-size: 14px;
}
.freeze-detail__rule p {
  margin: 0 0 4px;
  font-size: 13px;
  color: var(--text);
}
.freeze-rules {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.freeze-rule {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  background: var(--card);
}
.freeze-rule__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.freeze-rule p {
  margin: 0 0 10px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
}
.freeze-rule table { margin: 0; }
.freeze-rule th { width: 42%; }

