:root {
  --bg: #210708;
  --paper: #f5efe1;
  --paper-strong: #fffaf0;
  --ink: #2a0d0f;
  --line: #d8cab0;
  --line-strong: #bda884;
  --text: #281416;
  --muted: #6c6255;
  --brand: #c93a32;
  --brand-dark: #8f161d;
  --green: #c93a32;
  --gold: #d6a536;
  --red: #b4141f;
  --cyan: #ffd18a;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.26);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--text);
  font-family: "Bahnschrift", "Microsoft YaHei UI", "PingFang SC", sans-serif;
  min-height: 100vh;
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    radial-gradient(circle at 12% 0%, rgba(201, 58, 50, 0.34), transparent 27%),
    radial-gradient(circle at 80% 12%, rgba(214, 165, 54, 0.24), transparent 30%),
    linear-gradient(135deg, #180204 0%, #2a0609 48%, #1d0f05 100%);
  background-size: 40px 40px, 40px 40px, auto, auto, auto;
}

body.modal-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

code {
  font-family: "Consolas", "Courier New", monospace;
  word-break: break-all;
}

.page-shell,
.live-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 48px;
}

.site-icp-footer {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 28px;
  text-align: center;
  color: rgba(255, 247, 223, 0.72);
  font-size: 13px;
  line-height: 1.7;
}

.site-icp-footer a {
  border-bottom: 1px solid rgba(255, 247, 223, 0.28);
  transition: color 0.2s ease, border-color 0.2s ease;
}

.site-icp-footer a:hover {
  color: #fff7df;
  border-color: rgba(255, 247, 223, 0.72);
}

.live-shell {
  width: min(1500px, calc(100% - 24px));
}

.hero,
.live-header {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 24px;
  align-items: stretch;
  margin-bottom: 28px;
}

.live-room-header {
  grid-template-columns: minmax(0, 1.28fr) minmax(380px, 0.92fr);
  align-items: stretch;
}

.hero-copy,
.hero-card,
.player-card,
.data-card,
.chat-card,
.section-block {
  background: rgba(245, 239, 225, 0.94);
  border: 1px solid rgba(216, 202, 176, 0.82);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.hero-copy,
.hero-card,
.section-block,
.player-card,
.data-card,
.chat-card {
  padding: 28px;
}

.hero-copy {
  position: relative;
  overflow: hidden;
  color: #fff7df;
  background:
    linear-gradient(120deg, rgba(201, 58, 50, 0.28), transparent 34%),
    radial-gradient(circle at 90% 10%, rgba(214, 165, 54, 0.30), transparent 28%),
    linear-gradient(135deg, #220407 0%, #4a0a10 58%, #2c1606 100%);
}

.hero-copy::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent 0 92%, rgba(255, 209, 138, 0.18) 92% 93%, transparent 93%),
    linear-gradient(0deg, transparent 0 86%, rgba(255, 209, 138, 0.13) 86% 87%, transparent 87%);
  background-size: 72px 72px;
  opacity: 0.45;
}

.hero-copy > * {
  position: relative;
  z-index: 1;
}

.live-title-card,
.live-control-card {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.live-title-card {
  min-height: 210px;
  padding: 30px;
  color: #fff7df;
  background:
    linear-gradient(135deg, rgba(201, 58, 50, 0.30), transparent 38%),
    radial-gradient(circle at 90% 18%, rgba(214, 165, 54, 0.34), transparent 28%),
    linear-gradient(135deg, #220407 0%, #4a0a10 58%, #2c1606 100%);
  border: 1px solid rgba(255, 209, 138, 0.25);
}

.live-title-card::after {
  content: "";
  position: absolute;
  inset: auto -8% -40% 42%;
  height: 180px;
  border-radius: 999px;
  background: rgba(255, 209, 138, 0.14);
  transform: rotate(-12deg);
}

.live-title-card > * {
  position: relative;
  z-index: 1;
}

.live-title-card .eyebrow {
  color: var(--cyan);
}

.live-title-card .hero-text {
  max-width: 680px;
  color: rgba(255, 247, 223, 0.82);
}

.live-control-card {
  padding: 20px;
  background: rgba(245, 239, 225, 0.96);
  border: 1px solid rgba(216, 202, 176, 0.82);
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--brand);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 12px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-size: clamp(32px, 5vw, 52px);
  margin-bottom: 8px;
  line-height: 1.05;
}

.hero-copy h1,
.live-title-card h1 {
  display: flex;
  align-items: center;
  gap: 4px;
  justify-content: flex-start;
  flex-wrap: wrap;
  margin-top: -8px;
  margin-bottom: -10px;
  margin-left: -18px;
}

.hero-copy h1::before,
.live-title-card h1::before {
  content: "";
  width: clamp(120px, 14vw, 190px);
  height: clamp(120px, 14vw, 190px);
  flex: 0 0 auto;
  margin-left: -28px;
  margin-right: -18px;
  border-radius: 0;
  background: url("/a.png") center / contain no-repeat;
  box-shadow: none;
}

h2 {
  font-size: 26px;
  margin-bottom: 8px;
}

h3 {
  font-size: 20px;
  margin-bottom: 10px;
}

.hero-text,
.section-head p,
.plan-desc,
.status-label,
.permission-tip {
  color: var(--muted);
  line-height: 1.7;
}

.hero-copy .hero-text {
  color: rgba(255, 247, 223, 0.82);
  max-width: 760px;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px 0;
}

.hero-badges span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  color: #fff2c9;
  background: rgba(255, 209, 138, 0.12);
  border: 1px solid rgba(255, 209, 138, 0.32);
  font-size: 13px;
  font-weight: 700;
}

.account-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.9fr);
  gap: 24px;
  align-items: start;
}

.account-stack {
  display: grid;
  gap: 24px;
}

.auth-page-card {
  align-self: start;
}

.account-section {
  margin-bottom: 0;
}

.account-section .section-head {
  margin-bottom: 18px;
}

.compact-notice {
  align-self: start;
}

.compact-notice p {
  margin-bottom: 10px;
}

.compact-notice p:last-child {
  margin-bottom: 0;
}

.account-section .primary-btn,
.account-section .secondary-btn {
  width: fit-content;
}

.account-section .auth-form {
  margin-bottom: 0;
}

.signal-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 26px;
}

.signal-board div {
  padding: 14px;
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 247, 223, 0.18);
}

.signal-board span {
  display: block;
  margin-bottom: 8px;
  color: var(--cyan);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.signal-board strong {
  display: block;
  color: #fff7df;
  font-size: 14px;
  line-height: 1.5;
}

.member-summary {
  min-height: 72px;
  margin: 12px 0 18px;
  padding: 16px;
  border-radius: 16px;
  background: var(--paper-strong);
  border: 1px solid var(--line);
}

.member-summary.compact {
  min-width: 260px;
  margin: 0;
}

.primary-btn,
.secondary-btn,
.link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 14px;
  border: none;
  cursor: pointer;
  font-size: 15px;
  font-weight: 700;
  transition: transform 0.2s ease, opacity 0.2s ease, background 0.2s ease;
}

.primary-btn {
  color: #fff;
  background: linear-gradient(135deg, var(--green) 0%, var(--brand-dark) 100%);
  box-shadow: 0 10px 24px rgba(201, 58, 50, 0.24);
}

.secondary-btn,
.link-btn:not(.primary-btn) {
  color: var(--text);
  background: #ede2cf;
  border: 1px solid var(--line);
}

.primary-btn.link-btn {
  color: #fff;
  background: linear-gradient(135deg, var(--green) 0%, var(--brand-dark) 100%);
  border: none;
}

.primary-btn:hover,
.secondary-btn:hover,
.link-btn:hover,
.live-link-card:hover {
  transform: translateY(-2px);
}

.section-block {
  margin-bottom: 22px;
}

.section-head {
  margin-bottom: 20px;
}

.plan-grid,
.link-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.replay-empty-card {
  grid-column: 1 / -1;
  padding: 22px;
  border-radius: 22px;
  background: var(--paper-strong);
  border: 1px dashed var(--line-strong);
  color: var(--muted);
  line-height: 1.8;
}

.plan-card,
.live-link-card {
  position: relative;
  overflow: hidden;
  padding: 22px;
  border-radius: 22px;
  background: var(--paper-strong);
  border: 1px solid var(--line);
}

.plan-card::before,
.live-link-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--green), var(--brand));
}

.live-link-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.live-link-card code {
  max-width: 100%;
  overflow-wrap: anywhere;
}

.push-config-card p {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  margin: 0;
  color: var(--muted);
}

.push-config-card p span {
  font-weight: 700;
  color: var(--text);
}

.plan-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.plan-badge,
.pill,
.link-tag {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.level-c .plan-badge,
.link-tag {
  background: rgba(20, 122, 85, 0.12);
  color: var(--green);
}

.level-b .plan-badge {
  background: rgba(184, 133, 9, 0.15);
  color: var(--gold);
}

.level-a .plan-badge {
  background: rgba(164, 52, 52, 0.12);
  color: var(--red);
}

.featured-plan {
  border-color: rgba(189, 139, 22, 0.48);
  box-shadow: 0 26px 70px rgba(189, 139, 22, 0.18);
}

.price {
  font-size: 32px;
}

.price span {
  font-size: 14px;
  color: var(--muted);
  margin-left: 4px;
}

.feature-list {
  margin: 0 0 22px;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.9;
}

.notice-block p {
  margin-bottom: 12px;
  line-height: 1.9;
}

.notice-block p:last-child {
  margin-bottom: 0;
}

.risk-block {
  color: #f9ead0;
  background:
    linear-gradient(135deg, rgba(176, 68, 60, 0.20), rgba(12, 31, 24, 0.94)),
    #0d1f18;
  border-color: rgba(255, 207, 152, 0.24);
}

.risk-block .eyebrow,
.risk-block h2 {
  color: #ffd899;
}

.risk-block p {
  color: rgba(255, 247, 223, 0.82);
}

.room-upgrade-block {
  margin-top: 24px;
}

.room-upgrade-block .live-link-card {
  min-height: 150px;
}

.replay-card {
  min-height: 170px;
}

.replay-admin-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 12px 0 6px;
}

.replay-section-switcher {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 0 0 22px;
}

.replay-section-card {
  cursor: pointer;
  text-align: left;
  display: grid;
  gap: 8px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 22px;
  color: var(--text);
  background:
    radial-gradient(circle at 86% 16%, rgba(201, 58, 50, 0.16), transparent 30%),
    linear-gradient(135deg, rgba(255, 250, 240, 0.94), rgba(242, 226, 199, 0.84));
  box-shadow: 0 14px 34px rgba(91, 31, 16, 0.08);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.replay-section-card:hover,
.replay-section-card.is-active {
  transform: translateY(-2px);
  border-color: rgba(201, 58, 50, 0.56);
  box-shadow: 0 22px 52px rgba(143, 22, 29, 0.18);
}

.replay-section-card span {
  color: var(--red);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.replay-section-card strong {
  font-size: 24px;
  color: var(--ink);
}

.replay-section-card small {
  color: var(--muted);
  line-height: 1.7;
}

.replay-library-hero {
  grid-template-columns: minmax(0, 1.45fr) minmax(340px, 0.8fr);
}

.replay-section-tabs {
  margin-bottom: 0;
}

.replay-section-current {
  margin: 0 0 18px;
  padding: 18px 20px;
  border: 1px solid rgba(201, 58, 50, 0.24);
  border-radius: 20px;
  background: rgba(255, 250, 240, 0.7);
}

.replay-section-current h3 {
  margin: 0 0 8px;
  font-size: 24px;
}

.replay-video-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.replay-library-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.replay-video-card {
  display: grid;
  overflow: hidden;
  min-height: 320px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: var(--paper-strong);
  box-shadow: 0 18px 44px rgba(64, 26, 10, 0.12);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.replay-video-card:hover {
  transform: translateY(-3px);
  border-color: rgba(201, 58, 50, 0.48);
  box-shadow: 0 24px 58px rgba(64, 26, 10, 0.20);
}

.replay-load-more-card {
  grid-column: 1 / -1;
  cursor: pointer;
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 96px;
  padding: 20px;
  border: 1px dashed rgba(201, 58, 50, 0.46);
  border-radius: 22px;
  color: var(--ink);
  background:
    radial-gradient(circle at 50% 0%, rgba(201, 58, 50, 0.12), transparent 30%),
    rgba(255, 250, 240, 0.82);
  font: inherit;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.replay-load-more-card:hover {
  transform: translateY(-2px);
  border-color: rgba(201, 58, 50, 0.72);
  box-shadow: 0 18px 38px rgba(64, 26, 10, 0.14);
}

.replay-load-more-card strong {
  font-size: 18px;
}

.replay-load-more-card small {
  color: var(--muted);
  font-weight: 700;
}

.replay-thumb {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background:
    radial-gradient(circle at 50% 40%, rgba(214, 165, 54, 0.16), transparent 34%),
    linear-gradient(135deg, #160405, #3e080d);
}

.replay-thumb::before {
  content: "视频封面";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(255, 247, 223, 0.72);
  font-weight: 800;
  letter-spacing: 0.18em;
}

.replay-thumb-image,
.replay-thumb-placeholder {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: block;
  background: #130607;
}

.replay-thumb-image {
  object-fit: cover;
}

.replay-thumb-placeholder {
  display: grid;
  place-items: center;
  color: rgba(255, 247, 223, 0.88);
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0.08em;
  background:
    radial-gradient(circle at 50% 45%, rgba(214, 165, 54, 0.22), transparent 35%),
    linear-gradient(135deg, #160405, #3e080d);
}

.replay-thumb-badge {
  position: absolute;
  z-index: 2;
  left: 12px;
  top: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  color: #fff7df;
  background: rgba(143, 22, 29, 0.88);
  font-size: 12px;
  font-weight: 800;
}

.replay-video-body {
  display: grid;
  gap: 10px;
  padding: 18px;
}

.replay-video-body strong {
  font-size: 19px;
  line-height: 1.45;
  color: var(--ink);
}

.replay-video-body small {
  color: var(--muted);
  font-weight: 700;
}

.replay-picker {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 12px;
  margin-bottom: 18px;
}

.replay-quick-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.replay-filter-bar {
  display: flex;
  gap: 12px;
  align-items: center;
  margin: 0 0 18px;
  flex-wrap: wrap;
}

.live-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(520px, 0.96fr);
  gap: 28px;
}

.live-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
}

.live-action-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.player-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

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

.player-card {
  align-self: start;
}

.player-card-head h2 {
  margin: 10px 0 0;
}

.room-flags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.room-flags span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  color: #f7ead6;
  background: #3a0b10;
  border: 1px solid rgba(255, 209, 138, 0.28);
  font-size: 12px;
  font-weight: 700;
}

.room-flag-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 209, 138, 0.28);
  background: #3a0b10;
  color: #f7ead6;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.room-flag-toggle:hover {
  transform: translateY(-1px);
}

.room-flag-toggle.is-active {
  background: linear-gradient(135deg, #8b1818 0%, #b63b24 100%);
  border-color: rgba(255, 223, 166, 0.5);
}

.pill {
  background: rgba(187, 77, 0, 0.12);
  color: var(--brand);
}

.player-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  background:
    linear-gradient(rgba(255, 209, 138, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 209, 138, 0.08) 1px, transparent 1px),
    #020806;
  background-size: 32px 32px;
  aspect-ratio: 16 / 9;
}

#live-video,
#replay-video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
  object-fit: contain;
}

.mobile-fullscreen-button {
  display: none;
  align-items: center;
  justify-content: center;
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 6;
  min-width: 58px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 999px;
  background: rgba(7, 12, 16, 0.72);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
  backdrop-filter: blur(8px);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.28);
}

@media (max-width: 900px), (pointer: coarse) {
  .mobile-fullscreen-button {
    display: inline-flex;
  }
}

.mobile-fullscreen-button:active {
  transform: scale(0.96);
}

body.is-mobile-video-expanded {
  overflow: hidden;
}

.player-wrap.is-mobile-expanded,
.player-wrap:fullscreen,
.player-wrap:-webkit-full-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  border-radius: 0;
  aspect-ratio: auto;
  background: #000;
}

.player-wrap.is-mobile-expanded.is-mobile-rotated {
  top: 50%;
  left: 50%;
  right: auto;
  bottom: auto;
  width: 100vh;
  width: 100dvh;
  height: 100vw;
  transform: translate(-50%, -50%) rotate(90deg);
  transform-origin: center center;
}

.player-wrap.is-mobile-expanded #live-video,
.player-wrap.is-mobile-expanded #replay-video,
.player-wrap:fullscreen #live-video,
.player-wrap:fullscreen #replay-video,
.player-wrap:-webkit-full-screen #live-video,
.player-wrap:-webkit-full-screen #replay-video {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  object-fit: contain;
}

.player-wrap.is-mobile-expanded.is-mobile-rotated #live-video,
.player-wrap.is-mobile-expanded.is-mobile-rotated #replay-video {
  width: 100%;
  height: 100%;
}

.access-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
  color: #fff;
  background: rgba(5, 8, 12, 0.78);
  backdrop-filter: blur(6px);
  font-size: 20px;
  line-height: 1.8;
}

.replay-loading-state {
  display: grid;
  gap: 8px;
  justify-items: center;
}

.replay-loading-state strong {
  font-size: 22px;
}

.replay-loading-state span {
  max-width: 360px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 15px;
  line-height: 1.7;
}

.danmaku-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  overflow: hidden;
}

.danmaku-layer.is-hidden {
  display: none;
}

.danmaku-item {
  position: absolute;
  top: var(--danmaku-top);
  left: 100%;
  max-width: 78%;
  white-space: nowrap;
  padding: 7px 12px;
  border-radius: 999px;
  color: #fff7df;
  background: rgba(3, 12, 9, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.2);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.75);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
  font-weight: 700;
  animation: danmaku-slide var(--danmaku-duration, 12s) linear forwards;
}

.danmaku-item.is-admin {
  color: #241004;
  background: rgba(255, 209, 138, 0.92);
  border-color: rgba(255, 247, 223, 0.72);
  text-shadow: none;
}

@keyframes danmaku-slide {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(calc(-100vw - 100%));
  }
}

.playback-feedback-card {
  display: grid;
  gap: 14px;
  margin-top: 16px;
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(255, 250, 240, 0.94);
  border: 1px solid rgba(216, 202, 176, 0.82);
  box-shadow: var(--shadow);
}

.playback-feedback-copy strong {
  display: block;
  margin-top: 8px;
  font-size: 20px;
  color: var(--brand-dark);
}

.playback-feedback-copy small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.6;
}

.playback-feedback-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.feedback-btn {
  min-width: 110px;
}

.feedback-btn.is-selected {
  color: #fff7df;
  border-color: rgba(255, 223, 166, 0.54);
  background: linear-gradient(135deg, #8b1818 0%, #b63b24 100%);
}

.feedback-btn:disabled {
  opacity: 0.58;
  cursor: not-allowed;
}

.hidden {
  display: none !important;
}

.data-list {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.data-point {
  padding: 16px 18px;
  border-radius: 16px;
  background: var(--paper-strong);
  border: 1px solid var(--line);
}

.data-point span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
}

.data-point strong {
  display: block;
  line-height: 1.65;
}

.replay-point {
  display: block;
  color: inherit;
}

.replay-point em {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-style: normal;
  line-height: 1.6;
}

.chat-card {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: min(760px, calc(100vh - 210px));
  min-height: 560px;
  width: 100%;
  padding: 30px 30px 26px;
}

.chat-head {
  margin-bottom: 14px;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-right: 2px;
  min-height: 260px;
  scrollbar-width: thin;
  scrollbar-color: rgba(201, 58, 50, 0.82) rgba(216, 202, 176, 0.55);
}

.chat-messages::-webkit-scrollbar {
  width: 8px;
}

.chat-messages::-webkit-scrollbar-track {
  border-radius: 999px;
  background: rgba(216, 202, 176, 0.55);
}

.chat-messages::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: linear-gradient(180deg, var(--green), var(--brand));
}

.chat-empty {
  padding: 18px;
  border-radius: 16px;
  border: 1px dashed var(--line);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.6);
  line-height: 1.7;
}

.chat-message {
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--paper-strong);
  border: 1px solid var(--line);
}

.chat-message-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.chat-message-head strong {
  font-size: 14px;
}

.chat-message-head span {
  font-size: 12px;
  color: var(--muted);
}

.chat-message p {
  margin: 0;
  line-height: 1.75;
  white-space: pre-wrap;
  word-break: break-word;
}

.chat-risk-tip {
  margin: 14px 0 0;
  color: var(--red);
  font-size: 13px;
  line-height: 1.7;
  font-weight: 700;
}

.chat-form {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.auth-form {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
}

.replay-form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 24px;
  align-items: end;
}

.replay-url-input,
.replay-summary-input,
.replay-title-input {
  grid-column: 1 / -1;
}

.replay-form-grid .primary-btn {
  width: fit-content;
}

.danmaku-admin-form {
  grid-template-columns: minmax(130px, 0.7fr) minmax(260px, 2fr) repeat(3, minmax(120px, 0.65fr)) minmax(110px, 0.6fr) auto auto;
  align-items: center;
}

.danmaku-enabled-option {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.danmaku-enabled-option input {
  width: 16px;
  height: 16px;
  accent-color: var(--brand);
}

.replay-free-option {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 250, 240, 0.7);
  color: var(--ink);
  font-weight: 700;
}

.replay-free-option input {
  width: 18px;
  height: 18px;
  accent-color: var(--red);
}

.section-note {
  margin: -6px 0 24px;
  color: var(--muted);
  font-size: 13px;
}

.replay-file-input {
  padding-top: 10px;
  padding-bottom: 10px;
}

.replay-upload-status {
  grid-column: 1 / -1;
  display: grid;
  gap: 10px;
  margin: -10px 0 24px;
  padding: 14px;
  border: 1px solid rgba(175, 126, 57, 0.28);
  border-radius: 14px;
  background: rgba(255, 250, 240, 0.78);
}

.replay-upload-status-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--ink);
  font-size: 13px;
}

.replay-upload-status-head span {
  color: var(--muted);
  text-align: right;
}

.replay-upload-progress {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(63, 36, 14, 0.12);
}

.replay-upload-progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--red), var(--gold));
  transition: width 0.18s ease;
}

.replay-upload-status.is-success {
  border-color: rgba(52, 132, 88, 0.35);
  background: rgba(236, 248, 241, 0.9);
}

.replay-upload-status.is-error {
  border-color: rgba(173, 45, 45, 0.35);
  background: rgba(255, 239, 235, 0.9);
}

.replay-upload-status.is-error .replay-upload-progress span {
  background: #b63a32;
}

.replay-category-select {
  min-width: 170px;
  height: auto;
  padding: 8px 10px;
}

.form-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.form-divider::before,
.form-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--line);
}

.code-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 128px;
  gap: 10px;
}

.code-row .secondary-btn {
  min-height: 44px;
  padding: 0 12px;
  font-size: 14px;
}

.reset-form {
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 250, 240, 0.76);
  border: 1px solid var(--line);
}

.auth-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.contact-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(19, 6, 8, 0.68);
  backdrop-filter: blur(4px);
}

.contact-modal.hidden {
  display: none;
}

.contact-modal-card {
  width: min(460px, 100%);
  padding: 26px;
  border-radius: 24px;
  background: rgba(255, 250, 240, 0.98);
  border: 1px solid rgba(216, 202, 176, 0.9);
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.32);
}

.contact-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.contact-modal-head h2 {
  margin-bottom: 10px;
}

.contact-modal-copy {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.7;
}

.contact-modal-close {
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f3e6d3;
  color: var(--text);
  font-size: 22px;
  cursor: pointer;
}

.contact-modal-list {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
}

.contact-modal-item {
  padding: 16px 18px;
  border-radius: 18px;
  background: #f7efe1;
  border: 1px solid var(--line);
}

.contact-modal-item span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
}

.contact-modal-item strong {
  display: block;
  color: var(--brand-dark);
  font-size: 24px;
  letter-spacing: 0.03em;
}

.delete-user-modal-card {
  width: min(560px, 100%);
}

.payment-modal-card {
  width: min(540px, 100%);
}

.payment-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 18px;
}

.payment-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 700;
}

.payment-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  grid-column: 1 / -1;
  min-height: 48px;
  padding: 0 16px;
  border-radius: 14px;
  background: #f7efe1;
  border: 1px solid var(--line);
}

.payment-total span {
  color: var(--muted);
  font-weight: 700;
}

.payment-total strong {
  color: var(--brand-dark);
  font-size: 24px;
}

.payment-form .primary-btn {
  grid-column: 1 / -1;
  width: 100%;
}

.payment-qrcode-wrap {
  display: grid;
  justify-items: center;
  gap: 10px;
  margin: 16px 0;
  padding: 18px;
  border-radius: 16px;
  background: #fffaf0;
  border: 1px solid var(--line);
}

.payment-qrcode-wrap.hidden {
  display: none;
}

.payment-qrcode-wrap img {
  width: 220px;
  height: 220px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--line);
}

.payment-qrcode-wrap strong {
  color: var(--brand-dark);
  font-size: 18px;
}

.payment-qrcode-wrap span,
.payment-qrcode-wrap p {
  margin: 0;
  color: var(--muted);
  text-align: center;
}

.contact-modal-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 22px;
}

.admin-section-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}

.admin-section-card {
  display: grid;
  gap: 8px;
  min-height: 132px;
  padding: 18px;
  border: 1px solid rgba(189, 168, 132, 0.7);
  border-radius: 16px;
  background: rgba(255, 250, 240, 0.72);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.admin-section-card:hover,
.admin-section-card.is-active {
  transform: translateY(-2px);
  border-color: rgba(201, 58, 50, 0.42);
  box-shadow: 0 16px 34px rgba(42, 13, 15, 0.12);
}

.admin-section-card span {
  color: var(--brand);
  font-size: 13px;
  font-weight: 700;
}

.admin-section-card strong {
  color: var(--ink);
  font-size: 20px;
}

.admin-section-card small {
  color: var(--muted);
  line-height: 1.6;
}

.admin-stat-card {
  padding: 18px 20px;
  border-radius: 20px;
  background: rgba(245, 239, 225, 0.94);
  border: 1px solid rgba(216, 202, 176, 0.82);
  box-shadow: var(--shadow);
}

.admin-stat-card span {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 13px;
}

.admin-stat-card strong {
  display: block;
  font-size: 34px;
  color: var(--brand-dark);
}

.analytics-grid,
.room-watch-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}

.location-summary-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 22px;
}

.admin-map-shell {
  width: min(1500px, calc(100% - 32px));
}

.admin-map-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.admin-map-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.location-map-section {
  overflow: hidden;
}

.china-real-map {
  width: 100%;
  height: min(72vh, 760px);
  min-height: 560px;
  border-radius: 22px;
  background:
    radial-gradient(circle at 18% 8%, rgba(201, 58, 50, 0.12), transparent 30%),
    radial-gradient(circle at 82% 18%, rgba(214, 165, 54, 0.18), transparent 28%),
    linear-gradient(135deg, rgba(255, 250, 240, 0.88), rgba(237, 226, 207, 0.94));
  border: 1px solid rgba(216, 202, 176, 0.82);
  box-shadow: inset 0 1px 0 rgba(255, 250, 240, 0.8);
}

.china-location-map {
  display: grid;
  grid-template-columns: repeat(7, minmax(92px, 1fr));
  grid-auto-rows: 82px;
  gap: 10px;
  padding: 20px;
  border-radius: 22px;
  background:
    radial-gradient(circle at 20% 10%, rgba(201, 58, 50, 0.12), transparent 30%),
    linear-gradient(135deg, rgba(255, 250, 240, 0.72), rgba(237, 226, 207, 0.82));
  border: 1px solid rgba(216, 202, 176, 0.82);
  overflow-x: auto;
}

.china-province-tile {
  --heat: 0.18;
  position: relative;
  display: grid;
  align-content: center;
  gap: 4px;
  min-width: 92px;
  padding: 10px;
  border-radius: 16px;
  color: #fff7df;
  background:
    linear-gradient(135deg, rgba(143, 22, 29, 0.82), rgba(214, 165, 54, 0.55)),
    rgba(143, 22, 29, var(--heat));
  border: 1px solid rgba(255, 209, 138, 0.35);
  box-shadow: 0 12px 26px rgba(42, 13, 15, 0.18);
}

.china-province-tile.is-empty {
  color: var(--muted);
  background: rgba(255, 250, 240, 0.78);
  border-color: rgba(216, 202, 176, 0.9);
  box-shadow: none;
}

.china-province-tile span,
.china-province-tile strong,
.china-province-tile small {
  position: relative;
  z-index: 1;
}

.china-province-tile span {
  font-weight: 800;
  letter-spacing: 0.04em;
}

.china-province-tile strong {
  font-size: 26px;
  line-height: 1;
}

.china-province-tile small {
  overflow: hidden;
  color: inherit;
  opacity: 0.82;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 11px;
}

.location-rank-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.location-ranking {
  display: grid;
  gap: 12px;
  max-height: 520px;
  overflow-y: auto;
  padding-right: 6px;
}

.location-rank-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 250, 240, 0.9);
  border: 1px solid rgba(216, 202, 176, 0.82);
}

.location-rank-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 10px;
  color: #fff7df;
  background: var(--brand-dark);
  font-weight: 800;
}

.location-rank-item strong {
  overflow: hidden;
  color: var(--ink);
  white-space: nowrap;
  text-overflow: ellipsis;
}

.location-rank-item em {
  color: var(--brand-dark);
  font-style: normal;
  font-weight: 900;
}

.location-rank-bar {
  grid-column: 2 / -1;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(122, 39, 28, 0.08);
}

.location-rank-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand-dark), var(--gold));
}

.empty-location-state {
  padding: 18px;
  border-radius: 16px;
  color: var(--muted);
  background: rgba(255, 250, 240, 0.84);
  border: 1px dashed var(--line);
}

.room-watch-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 18px;
}

.analytics-visual-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.analytics-metric-card,
.room-watch-card,
.analytics-chart-card,
.funnel-step {
  padding: 18px 20px;
  border-radius: 20px;
  background: rgba(255, 250, 240, 0.94);
  border: 1px solid rgba(216, 202, 176, 0.82);
  box-shadow: var(--shadow);
}

.analytics-metric-card span,
.room-watch-card span,
.funnel-copy span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 8px;
}

.analytics-metric-card strong,
.room-watch-card strong,
.funnel-copy strong {
  display: block;
  font-size: 28px;
  color: var(--brand-dark);
}

.room-watch-card small,
.funnel-copy small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.6;
}

.analytics-chart-card {
  min-height: 100%;
}

.analytics-chart-card-wide {
  grid-column: 1 / -1;
}

.chart-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.chart-card-head h3 {
  margin: 6px 0 0;
  font-size: 24px;
  color: var(--brand-dark);
}

.chart-card-head strong {
  font-size: 18px;
  color: var(--brand-dark);
  white-space: nowrap;
}

.chart-card-subhead {
  margin-top: 8px;
  margin-bottom: 16px;
  align-items: center;
}

.chart-note {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.chart-kicker {
  display: inline-block;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.donut-chart {
  --chart-c-stop: 0%;
  --chart-b-stop: 0%;
  position: relative;
  width: min(240px, 100%);
  aspect-ratio: 1;
  margin: 0 auto 18px;
  border-radius: 50%;
  background:
    conic-gradient(
      #8b1818 0 var(--chart-c-stop),
      #d18f34 var(--chart-c-stop) var(--chart-b-stop),
      #632224 var(--chart-b-stop) 100%
    );
  display: flex;
  align-items: center;
  justify-content: center;
}

.donut-chart.is-empty {
  background: conic-gradient(#e6dcc9 0 100%);
}

.donut-chart::after {
  content: "";
  position: absolute;
  inset: 18%;
  border-radius: 50%;
  background: rgba(255, 250, 240, 0.98);
  box-shadow: inset 0 0 0 1px rgba(216, 202, 176, 0.52);
}

.donut-chart span {
  position: relative;
  z-index: 1;
  font-size: 34px;
  font-weight: 800;
  color: var(--brand-dark);
}

.chart-legend {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.chart-legend span {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(122, 39, 28, 0.05);
  color: var(--muted);
  font-size: 13px;
}

.chart-legend strong {
  color: var(--brand-dark);
  margin-left: auto;
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex: 0 0 auto;
}

.legend-c {
  background: #8b1818;
}

.legend-b {
  background: #d18f34;
}

.legend-a {
  background: #632224;
}

.bar-chart {
  display: grid;
  gap: 14px;
}

.feedback-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.feedback-chip-card {
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid rgba(216, 202, 176, 0.82);
  background: rgba(122, 39, 28, 0.05);
}

.feedback-chip-card span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 8px;
}

.feedback-chip-card strong {
  display: block;
  font-size: 30px;
  color: var(--brand-dark);
}

.feedback-chip-smooth {
  background: rgba(209, 143, 52, 0.08);
}

.feedback-chip-minor {
  background: rgba(182, 59, 36, 0.08);
}

.feedback-chip-severe {
  background: rgba(139, 24, 24, 0.1);
}

.bar-row {
  display: grid;
  grid-template-columns: 72px 1fr 48px;
  align-items: center;
  gap: 12px;
}

.bar-row span,
.bar-row strong {
  color: var(--brand-dark);
  font-size: 14px;
}

.bar-row div {
  position: relative;
  height: 14px;
  border-radius: 999px;
  background: rgba(122, 39, 28, 0.08);
  overflow: hidden;
}

.bar-row i {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #8b1818 0%, #d18f34 100%);
  transition: width 0.3s ease;
}

.feedback-row-smooth i {
  background: linear-gradient(90deg, #d18f34 0%, #f1c97a 100%);
}

.feedback-row-minor i {
  background: linear-gradient(90deg, #b63b24 0%, #d18f34 100%);
}

.feedback-row-severe i {
  background: linear-gradient(90deg, #7f1212 0%, #b63b24 100%);
}

.funnel-board {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.funnel-step {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 16px;
  align-items: center;
}

.funnel-icon {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  background: linear-gradient(135deg, #8b1818 0%, #b63b24 100%);
  color: #fff7df;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 20px;
}

.funnel-progress {
  grid-column: 1 / -1;
  height: 10px;
  border-radius: 999px;
  background: rgba(122, 39, 28, 0.08);
  overflow: hidden;
}

.funnel-progress span {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, #8b1818 0%, #d18f34 100%);
  transition: width 0.25s ease;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border-radius: 18px;
  background: rgba(255, 250, 240, 0.82);
}

.user-table-scroll {
  max-height: min(68vh, 720px);
  overflow: auto;
  border: 1px solid var(--line);
}

.user-table-scroll .admin-table {
  border: 0;
}

.user-table-scroll .admin-table th {
  z-index: 2;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1560px;
  background: var(--paper-strong);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
}

.replay-table {
  min-width: 1320px;
}

.record-table {
  min-width: 980px;
}

.chat-admin-table {
  min-width: 1120px;
}

.user-admin-table th:nth-child(8),
.user-admin-table td:nth-child(8) {
  min-width: 230px;
}

.admin-table th,
.admin-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
  line-height: 1.45;
}

.admin-table th {
  color: var(--muted);
  font-size: 13px;
  background: #f4eadc;
  position: sticky;
  top: 0;
  z-index: 1;
}

.admin-table tbody tr:nth-child(even) {
  background: rgba(250, 244, 233, 0.72);
}

.admin-table tbody tr:hover {
  background: rgba(255, 244, 220, 0.92);
}

.admin-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}

.admin-actions .secondary-btn {
  min-height: 30px;
  padding: 0 10px;
  font-size: 13px;
  border-radius: 12px;
}

.customer-source-cell {
  min-width: 250px;
}

.customer-source-control {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 230px;
}

.customer-source-input {
  width: auto;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 34px;
  padding: 0 10px;
  font-size: 13px;
  border-radius: 12px;
}

.customer-source-save {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 12px;
  font-size: 13px;
  white-space: nowrap;
  box-shadow: none;
}

.customer-source-save:hover {
  transform: none;
}

.customer-source-save.is-saving {
  opacity: 0.78;
  cursor: progress;
}

.customer-source-save.is-saved {
  color: #2f7a3e;
  background: #e5f3df;
  border-color: #b9d7ae;
}

.customer-source-save.is-error {
  color: #b21f1a;
  background: #ffe7df;
  border-color: #e2a99e;
}

.network-cell {
  min-width: 132px;
}

.network-cell strong,
.network-cell small {
  display: block;
}

.network-cell small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.chat-admin-text-cell {
  min-width: 320px;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.7;
}

.admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 14px;
  margin-top: 16px;
}

.admin-duration-label,
.admin-days-label {
  display: inline-grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 700;
}

.admin-search-label {
  display: inline-grid;
  gap: 8px;
  min-width: min(360px, 100%);
  flex: 1 1 320px;
  color: var(--muted);
  font-weight: 700;
}

.admin-duration-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.admin-duration-value {
  width: 82px;
}

.admin-duration-unit {
  width: 86px;
  min-height: 46px;
  padding: 0 12px;
}

.admin-days-input {
  width: 160px;
}

.admin-search-input {
  width: 100%;
}

.admin-chat-interval-input {
  width: 88px;
}

.admin-chat-time-input {
  width: 178px;
}

#admin-records-toggle.is-active {
  background: rgba(122, 39, 28, 0.1);
  border-color: rgba(122, 39, 28, 0.24);
  color: var(--brand-dark);
}

.status-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.status-active {
  color: var(--green);
  background: rgba(20, 122, 85, 0.12);
}

.status-free {
  color: var(--red);
  background: rgba(164, 52, 52, 0.12);
}

.status-expired {
  color: var(--red);
  background: rgba(164, 52, 52, 0.12);
}

.status-deleted {
  color: #8a4b42;
  background: rgba(138, 75, 66, 0.12);
}

.status-empty {
  color: var(--muted);
  background: #f0e6d8;
}

.admin-meta-note {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.admin-inline-note {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.danger-ghost-btn {
  color: var(--red);
  border-color: rgba(164, 52, 52, 0.24);
  background: rgba(164, 52, 52, 0.06);
}

.danger-ghost-btn:hover {
  background: rgba(164, 52, 52, 0.12);
}

.danger-btn {
  background: linear-gradient(135deg, #b53b31, #8f2a24);
  box-shadow: 0 14px 28px rgba(143, 42, 36, 0.28);
}

.chat-input,
.chat-textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--text);
  padding: 12px 14px;
  font: inherit;
}

.chat-input:focus,
.chat-textarea:focus {
  outline: 2px solid rgba(187, 77, 0, 0.18);
  border-color: var(--brand);
}

.chat-textarea {
  resize: vertical;
  min-height: 96px;
}

.data-item {
  padding: 16px 18px;
  border-radius: 16px;
  background: var(--paper-strong);
  border: 1px solid var(--line);
}

.data-item strong {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  color: var(--muted);
}

.replay-player-wrap {
  aspect-ratio: 16 / 9;
  background: #000;
}

.replay-info-card {
  align-self: start;
}

.replay-chat-card {
  align-self: stretch;
}

.replay-meta-block {
  margin-top: 24px;
}

.replay-side-actions {
  margin-top: 18px;
}

.cell-nowrap {
  white-space: nowrap;
}

.data-item span {
  font-size: 22px;
  font-weight: 700;
}

.muted-value {
  color: #8e8378;
}

@media (max-width: 980px) {
  .hero,
  .live-header,
  .account-main-grid,
  .replay-library-hero,
  .live-layout,
  .replay-form-grid,
  .danmaku-admin-form,
  .plan-grid,
  .link-grid,
  .replay-section-switcher,
  .replay-video-grid,
  .signal-board {
    grid-template-columns: 1fr;
  }

  .admin-stats,
  .admin-section-grid,
  .analytics-grid,
  .analytics-visual-grid,
  .location-summary-grid,
  .location-rank-layout,
  .room-watch-grid,
  .funnel-board,
  .replay-quick-list,
  .replay-picker {
    grid-template-columns: 1fr;
  }

  .live-actions {
    align-items: stretch;
  }

  .live-room-header {
    grid-template-columns: 1fr;
  }

  .live-action-buttons {
    grid-template-columns: 1fr;
  }

  .chat-card {
    height: auto;
    min-height: 560px;
    max-height: none;
  }

  .player-card-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .room-flags {
    justify-content: flex-start;
  }

  .code-row {
    grid-template-columns: 1fr;
  }

  .member-summary.compact {
    min-width: 0;
  }

  .playback-feedback-actions,
  .feedback-summary-grid {
    grid-template-columns: 1fr;
  }

  .playback-feedback-actions {
    display: grid;
  }

  .chart-card-head,
  .chart-card-subhead {
    flex-direction: column;
    align-items: flex-start;
  }

  .china-location-map {
    grid-template-columns: repeat(4, minmax(88px, 1fr));
    grid-auto-rows: 78px;
  }

  .china-real-map {
    height: 520px;
    min-height: 420px;
  }
}
