:root {
  --bg: #f3f5f9;
  --card: #ffffff;
  --text: #1f2329;
  --muted: #8f959e;
  --primary: #1677ff;
  --primary-soft: rgba(22, 119, 255, 0.08);
  --line: #eef0f3;
  --danger: #ff4d4f;
  --success: #00b578;
  --radius: 16px;
  --shadow: 0 8px 24px rgba(31, 35, 41, 0.06);
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(1200px 500px at 10% -10%, rgba(22, 119, 255, 0.12), transparent 60%),
    radial-gradient(900px 400px at 100% 0%, rgba(13, 148, 136, 0.08), transparent 55%),
    var(--bg);
  min-height: 100vh;
}

body.layout-admin {
  background: #f5f6f8;
}

a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.topbar-inner {
  width: min(1080px, calc(100% - 40px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 14px 0;
}

.brand {
  font-size: 20px;
  font-weight: 800;
  color: var(--primary);
}

.nav {
  display: flex;
  gap: 8px;
  flex: 1;
}

.nav a {
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 14px;
}

.nav a.active,
.nav a:hover {
  background: var(--primary-soft);
  color: var(--primary);
}

.user-area {
  display: flex;
  align-items: center;
  gap: 10px;
}

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  background: #e8eef8;
}

.nickname {
  font-size: 12px;
  font-weight: 600;
}

.container {
  width: min(1080px, calc(100% - 40px));
  margin: 28px auto 48px;
}

.footer {
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  padding: 32px 16px 40px;
}

.footer-brand { margin-bottom: 10px; }
.footer-links { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--primary); }

.footer-legal {
  margin-top: 12px;
  color: var(--muted);
  line-height: 1.6;
}

.footer-legal a {
  color: var(--muted);
  text-decoration: none;
}

.footer-legal a:hover {
  color: var(--primary);
}

.footer--admin {
  margin-top: auto;
  padding: 16px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.footer--admin .footer-legal {
  margin-top: 0;
}

.hero-seo {
  margin-bottom: 28px;
  padding: 28px 24px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(22, 119, 255, 0.1), rgba(255, 255, 255, 0.9));
  box-shadow: var(--shadow);
}

.hero-seo h1 {
  font-size: 34px;
  letter-spacing: 0.02em;
  margin-bottom: 10px;
}

.hero-lead {
  font-size: 18px;
  font-weight: 600;
  color: #3d4a5c;
  margin: 0 0 12px;
}

.hero-desc {
  margin: 0 0 18px;
  color: #4e5969;
  line-height: 1.7;
  max-width: 820px;
}

.seo-faq h2,
.about-page h2 {
  font-size: 20px;
  margin-bottom: 14px;
}

.faq-list { margin: 0; }
.faq-item { margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.faq-item:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.faq-item dt { font-weight: 700; margin-bottom: 6px; }
.faq-item dd { margin: 0; color: #4e5969; line-height: 1.65; }

.prose p, .prose li { line-height: 1.7; color: #4e5969; }
.prose ul { padding-left: 18px; }
.prose + .prose { margin-top: 14px; }

.about-page .panel { margin-bottom: 14px; }


.demo-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 14px;
}

.demo-banner a { color: var(--primary); font-weight: 700; text-decoration: underline; }

.flash {
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 14px;
}
.flash.error { background: #fff1f0; color: var(--danger); }
.flash.success { background: #e8fff3; color: var(--success); }

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

.page-head h1 { font-size: 28px; }
.muted { color: var(--muted); font-size: 14px; }
.page-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 10px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  background: #edf0f5;
  color: var(--text);
}
.btn.primary { background: var(--primary); color: #fff; }
.btn.ghost { background: transparent; border: 1px solid var(--line); }
.btn.danger {
  background: #fff;
  color: #d4380d;
  border: 1px solid #ffa39e;
}
.btn.danger:hover {
  background: #fff1f0;
  border-color: #ff7875;
}
.btn.block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.inline-form { display: inline; margin: 0; }

.card-grid,
.template-grid,
.stats-grid {
  display: grid;
  gap: 14px;
}

.card-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.template-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.stats-grid { grid-template-columns: repeat(4, 1fr); margin-bottom: 18px; }

.activity-card,
.template-card,
.stat-card,
.panel,
.auth-card,
.empty-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.activity-card {
  display: block;
  padding: 18px;
  transition: transform .15s ease, box-shadow .15s ease;
}
.activity-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(31, 35, 41, 0.1);
}
.activity-card-top {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: 12px;
}
.tag { color: var(--primary); background: var(--primary-soft); padding: 4px 8px; border-radius: 999px; }
.status { color: var(--muted); }
.activity-card h3 { font-size: 18px; margin-bottom: 12px; line-height: 1.35; min-height: 48px; }
.activity-meta { display: flex; flex-direction: column; gap: 4px; color: var(--muted); font-size: 13px; }

.activity-list-toolbar {
  margin-bottom: 14px;
}

.activity-list-search {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 420px;
  padding: 0 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.activity-list-search-icon {
  color: var(--muted);
  font-size: 16px;
  line-height: 1;
}

.activity-list-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 12px 0;
  font-size: 14px;
  color: #1f2329;
  outline: none;
}

.activity-list-search input::placeholder {
  color: #c9cdd4;
}

.activity-list-panel {
  padding: 0;
  overflow: hidden;
}

.activity-list-panel .table-wrap {
  margin: 0;
}

.activity-list-table th,
.activity-list-table td {
  padding: 14px 16px;
  vertical-align: middle;
}

.activity-list-table tbody tr:hover {
  background: #fafbfc;
}

.activity-list-title {
  color: #1f2329;
  font-weight: 600;
  text-decoration: none;
}

.activity-list-title:hover {
  color: var(--primary);
}

.activity-list-empty {
  padding: 24px 16px 28px;
  text-align: center;
}

.activity-list-row[hidden] {
  display: none;
}

.activity-list-actions {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.activity-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 12px;
  border: 1px solid #e5e6eb;
  border-radius: 6px;
  background: #fff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
  color: #4e5969;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.activity-action:hover:not(:disabled) {
  box-shadow: 0 1px 2px rgba(31, 35, 41, 0.06);
}

.activity-action:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

.activity-action--edit:hover:not(:disabled) {
  border-color: #91caff;
  color: var(--primary);
  background: var(--primary-soft);
}

.activity-action--share:hover:not(:disabled) {
  border-color: #95de64;
  color: #389e0d;
  background: rgba(82, 196, 26, 0.08);
}

.activity-action--stop {
  border-color: #ffccc7;
  color: #cf1322;
  background: #fff;
}

.activity-action--stop:hover:not(:disabled) {
  border-color: #ffa39e;
  color: #a8071a;
  background: #fff1f0;
}

.activity-list-stop-form {
  display: inline-flex;
  margin: 0;
}

.activity-list-table td:last-child {
  min-width: 240px;
  white-space: nowrap;
}

.activity-list-table .activity-list-actions {
  opacity: 0.92;
}

.activity-list-table tbody tr:hover .activity-list-actions {
  opacity: 1;
}

.template-card { padding: 20px; }
.template-icon { font-size: 28px; margin-bottom: 10px; }
.template-card h3 { margin-bottom: 8px; }
.template-card p { color: var(--muted); font-size: 13px; line-height: 1.5; min-height: 60px; margin: 0 0 16px; }

.stat-card { padding: 18px; text-align: center; }
.stat-value { font-size: 28px; font-weight: 800; color: var(--primary); }
.stat-label { margin-top: 6px; color: var(--muted); font-size: 13px; }

.panel { padding: 20px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.panel-head h2 { font-size: 18px; }

.auth-card {
  width: min(420px, 100%);
  margin: 40px auto;
  padding: 28px;
}
.auth-card--login {
  width: min(720px, 100%);
}
.auth-login-layout {
  display: grid;
  grid-template-columns: minmax(0, 200px) minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}
.auth-qr-panel {
  padding-top: 4px;
}
.auth-qr-img {
  display: block;
  width: 100%;
  max-width: 200px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
}
.auth-qr-tip {
  margin: 12px 0 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--muted);
  text-align: center;
}
.auth-form-panel h1 { margin-bottom: 8px; }
.auth-card h1 { margin-bottom: 8px; }

.form { display: flex; flex-direction: column; gap: 14px; }
.form label { display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.form input:not(.field-row-title),
.form textarea,
.form select {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 14px;
  font-family: inherit;
  background: #fff;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 8px; }

.tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.tab {
  padding: 8px 14px;
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  border: 1px solid var(--line);
  font-size: 14px;
}
.tab.active { background: var(--primary); color: #fff; border-color: var(--primary); }

.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 600; }

.copyable-cell {
  cursor: pointer;
}

.copyable-cell:hover {
  color: var(--primary);
}

.empty-card {
  padding: 48px 20px;
  text-align: center;
}
.desc-block {
  background: #fff;
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 16px;
  color: #4e5969;
  line-height: 1.6;
}

.activity-basic {
  margin-bottom: 16px;
}

.activity-basic-desc {
  margin: 0 0 14px;
  color: #4e5969;
  line-height: 1.6;
  white-space: pre-wrap;
}

.activity-content-blocks {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 14px;
}

.activity-content-heading {
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 600;
  color: #1f2329;
}

.activity-content-text {
  margin: 0;
  color: #4e5969;
  line-height: 1.7;
  white-space: pre-wrap;
}

.activity-content-image {
  display: block;
  width: 100%;
  max-width: 640px;
  height: auto;
  border-radius: 8px;
  border: 1px solid #e5e6eb;
}

.activity-content-location-name {
  font-weight: 500;
  color: #1f2329;
}

.activity-content-location-address {
  margin-top: 4px;
  font-size: 13px;
}

.activity-content-link {
  display: inline-flex;
  align-items: center;
  color: #1677ff;
  text-decoration: none;
}

.activity-content-link:hover {
  text-decoration: underline;
}

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

.activity-meta-row {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  font-size: 14px;
  line-height: 1.5;
}

.activity-meta-row:first-child {
  border-top: 0;
  padding-top: 0;
}

.activity-meta-label {
  color: var(--muted);
}

.activity-meta-value {
  color: #1f2329;
  word-break: break-word;
}

.activity-data-panel {
  margin-top: 0;
}

.activity-data-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.activity-data-tabs {
  margin-bottom: 0;
}

.activity-data-tabs .tab {
  cursor: pointer;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
}

.activity-data-tabs .tab:hover {
  color: var(--primary);
}

.activity-data-tabs .tab.active {
  color: var(--primary);
  background: var(--primary-soft);
  border-color: transparent;
  font-weight: 600;
}

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

.stats-summary-row--filled {
  grid-template-columns: repeat(1, minmax(160px, 220px));
}

.stats-summary-item {
  background: #f7f8fa;
  border-radius: 10px;
  padding: 12px 14px;
}

.stats-summary-value {
  font-size: 22px;
  font-weight: 700;
  color: #1f2329;
  line-height: 1.2;
}

.stats-summary-label {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.status-pill.ok {
  color: #00b578;
  background: rgba(0, 181, 120, 0.1);
}

.status-pill.miss {
  color: #8f959e;
  background: rgba(143, 149, 158, 0.12);
}

@media (max-width: 800px) {
  .topbar-inner { flex-wrap: wrap; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-summary-row { grid-template-columns: repeat(2, 1fr); }
  .form-row { grid-template-columns: 1fr; }
  .page-head { flex-direction: column; align-items: flex-start; }
  .activity-meta-row {
    grid-template-columns: 72px 1fr;
  }

  .admin-body { flex-direction: column; }
  .admin-sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--line);
    position: static;
    height: auto;
  }
  .admin-menu {
    display: flex;
    overflow-x: auto;
    gap: 4px;
    padding-bottom: 4px;
  }
  .admin-menu-item {
    white-space: nowrap;
    border-radius: 8px;
  }
  .admin-menu-item.active {
    border-left: none;
    background: var(--primary-soft);
  }
  .admin-sidebar-foot { display: none; }
  .admin-main { padding: 16px; }
  .admin-products { gap: 2px; }
  .product-qr-popup { left: 0; transform: none; }
}

/* ========== 登录后管理后台布局 ========== */
.admin-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.admin-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 20px;
  height: 56px;
  padding: 0 20px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.admin-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  font-weight: 800;
  color: var(--primary);
}

.admin-brand-logo {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: contain;
  display: block;
  background: #fff;
}

.admin-brand-text {
  font-size: 15px;
  letter-spacing: 0.02em;
}

.admin-products {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
  margin-right: 8px;
  flex: 0 0 auto;
  min-width: 0;
  overflow: visible;
}

.product-link {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 14px;
  line-height: 1.3;
  color: var(--muted);
  border: none;
  background: transparent;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
}

a.product-link:hover,
button.product-link:hover {
  color: var(--primary);
  background: var(--primary-soft);
}

.product-item {
  position: relative;
}

.product-qr-popup {
  position: absolute;
  left: 50%;
  top: calc(100% + 10px);
  transform: translateX(-50%);
  width: 180px;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(31, 35, 41, 0.14);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .15s ease, visibility .15s ease;
  z-index: 50;
}

.product-qr-popup::before {
  content: '';
  position: absolute;
  left: 50%;
  top: -6px;
  width: 12px;
  height: 12px;
  background: #fff;
  border-left: 1px solid var(--line);
  border-top: 1px solid var(--line);
  transform: translateX(-50%) rotate(45deg);
}

.product-item--qr:hover .product-qr-popup,
.product-item--qr:focus-within .product-qr-popup {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.product-qr-img {
  display: block;
  width: 156px;
  height: 156px;
  object-fit: contain;
  background: #f7f8fa;
  border-radius: 8px;
}

.product-qr-tip {
  margin-top: 8px;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
}

.admin-top-right {
  flex-shrink: 0;
}

.user-menu {
  position: relative;
}

.user-menu-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 999px;
  padding: 4px 8px 4px 4px;
  cursor: pointer;
  font: inherit;
  color: var(--text);
}

.user-menu-trigger:hover,
.user-menu.open .user-menu-trigger {
  background: #f5f6f8;
  border-color: var(--line);
}

.user-menu .avatar {
  width: 30px;
  height: 30px;
}

.user-caret {
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid #8f959e;
  margin-left: 2px;
}

.user-menu-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: 220px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(31, 35, 41, 0.12);
  padding: 8px;
  z-index: 40;
}

.user-menu-meta {
  padding: 10px 10px 12px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 6px;
}

.user-menu-name {
  font-size: 14px;
  font-weight: 700;
}

.user-menu-hint {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}

.user-menu-item {
  display: block;
  padding: 10px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--text);
}

.user-menu-item:hover {
  background: #f5f6f8;
}

.user-menu-logout {
  margin: 4px 0 0;
  padding-top: 4px;
  border-top: 1px solid var(--line);
}

.user-menu-logout button {
  width: 100%;
  border: none;
  background: transparent;
  text-align: left;
  padding: 10px;
  border-radius: 8px;
  font: inherit;
  font-size: 13px;
  color: var(--danger);
  cursor: pointer;
}

.user-menu-logout button:hover {
  background: #fff1f0;
}

.admin-body {
  display: flex;
  flex: 1;
  min-height: 0;
}

.admin-sidebar {
  width: 200px;
  flex-shrink: 0;
  background: #fff;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 56px;
  height: calc(100vh - 56px);
}

.admin-menu {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 10px;
}

.admin-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 0 10px 10px 0;
  font-size: 14px;
  color: #4e5969;
  border-left: 3px solid transparent;
}

.admin-menu-item:hover {
  background: #f7f8fa;
  color: var(--text);
}

.admin-menu-item.active {
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 600;
  border-left-color: var(--primary);
}

.admin-menu-icon {
  width: 18px;
  text-align: center;
  font-size: 13px;
  opacity: 0.85;
}

.admin-sidebar-foot {
  margin-top: auto;
  padding: 12px;
}

.sidebar-promo {
  display: block;
  padding: 12px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(22, 119, 255, 0.1), rgba(22, 119, 255, 0.04));
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
}

.admin-main {
  flex: 1;
  min-width: 0;
  padding: 24px 28px 48px;
}

/* ========== 创建发布：选择场景类型 ========== */
.scene-page-layout {
  max-width: none;
}

.scene-page-main.scene-page {
  max-width: 720px;
}

.scene-page {
  max-width: 720px;
}

.scene-live-feed {
  display: none;
}

@media (min-width: 1280px) {
  .scene-live-feed {
    display: flex;
    flex-direction: column;
    position: fixed;
    right: 0;
    top: 56px;
    width: 360px;
    height: calc(100vh - 56px);
    overflow: hidden;
    border-radius: 0;
    border: none;
    border-left: 1px solid #e8eaed;
    background: #fff;
    box-shadow: -6px 0 24px rgba(31, 35, 41, 0.05);
    z-index: 20;
  }
}

.scene-live-feed-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px 12px;
  border-bottom: 1px solid #f0f1f3;
}

.scene-live-feed-title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: #1f2329;
}

.scene-live-feed-status {
  font-size: 11px;
  color: #52c41a;
  font-weight: 600;
}

.scene-live-feed-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
}

.scene-live-feed-empty {
  padding: 48px 24px;
  text-align: center;
  font-size: 13px;
  color: #8a9199;
}

.scene-live-feed-item {
  display: flex;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid #f5f6f7;
}

.scene-live-feed-item:last-child {
  border-bottom: none;
}

.scene-live-feed-item--insert {
  animation: sceneFeedInsert 0.52s cubic-bezier(0.22, 1, 0.36, 1) both;
  transform-origin: top center;
}

@keyframes sceneFeedInsert {
  0% {
    opacity: 0;
    transform: translateY(-18px) scale(0.97);
    background-color: #dbeafe;
    box-shadow: inset 3px 0 0 #1677ff;
  }
  45% {
    opacity: 1;
    transform: translateY(0) scale(1.01);
    background-color: #f0f7ff;
    box-shadow: inset 3px 0 0 #1677ff;
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    background-color: transparent;
    box-shadow: inset 3px 0 0 transparent;
  }
}

@media (prefers-reduced-motion: reduce) {
  .scene-live-feed-item--insert {
    animation: none;
    background-color: #f0f7ff;
  }
}

.scene-live-feed-item--remove {
  animation: sceneFeedRemove 0.28s ease forwards;
  overflow: hidden;
}

@keyframes sceneFeedRemove {
  to {
    opacity: 0;
    transform: translateX(12px);
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    margin-bottom: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .scene-live-feed-item--remove {
    animation: none;
    opacity: 0;
  }
}

.scene-live-feed-avatar-wrap {
  flex-shrink: 0;
}

.scene-live-feed-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.scene-live-feed-avatar-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e8f3ff;
  color: #1677ff;
  font-size: 15px;
  font-weight: 700;
}

.scene-live-feed-body {
  flex: 1;
  min-width: 0;
}

.scene-live-feed-name {
  font-size: 14px;
  font-weight: 700;
  color: #1f2329;
}

.scene-live-feed-action {
  margin-top: 4px;
  font-size: 13px;
  color: #4e5969;
  line-height: 1.45;
}

.scene-live-feed-summary {
  margin-top: 6px;
  font-size: 12px;
  color: #8a9199;
  line-height: 1.5;
  word-break: break-word;
}

.scene-live-feed-summary.copyable-cell:hover {
  color: var(--primary);
}

.scene-live-feed-images {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.scene-live-feed-image {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  object-fit: cover;
}

.scene-live-feed-image.single {
  width: 120px;
  height: 80px;
}

.scene-live-feed-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
  font-size: 11px;
  color: #b0b6bf;
}

.scene-live-feed-meta-dot {
  color: #d0d4d9;
}

.scene-live-feed-meta-title {
  color: #4a90e2;
  text-decoration: none;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scene-live-feed-meta-title:hover {
  text-decoration: underline;
}

/* 创建发布：实时动态顶部通知 */
.scene-feed-toast-stack {
  position: fixed;
  top: 64px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 40;
  width: min(560px, calc(100vw - 400px));
  max-width: calc(100vw - 32px);
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

@media (max-width: 1279px) {
  .scene-feed-toast-stack {
    width: min(560px, calc(100vw - 32px));
  }
}

.scene-feed-toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid #dbeafe;
  border-left: 3px solid #1677ff;
  border-radius: 10px;
  box-shadow: 0 10px 28px rgba(31, 35, 41, 0.12);
  animation: sceneFeedToastIn 0.38s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.scene-feed-toast--leave {
  animation: sceneFeedToastOut 0.28s ease forwards;
}

@keyframes sceneFeedToastIn {
  from {
    opacity: 0;
    transform: translateY(-14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes sceneFeedToastOut {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-10px);
  }
}

.scene-feed-toast-main {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.scene-feed-toast-badge {
  flex-shrink: 0;
  padding: 2px 8px;
  border-radius: 999px;
  background: #e8f3ff;
  color: #1677ff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.6;
}

.scene-feed-toast-badge--removed {
  background: #fff1f0;
  color: #cf1322;
}

.scene-feed-toast-text {
  font-size: 13px;
  color: #4e5969;
  line-height: 1.45;
}

.scene-feed-toast-text strong {
  color: #1f2329;
  font-weight: 700;
  margin-right: 4px;
}

.scene-feed-toast-link {
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 600;
  color: #1677ff;
  text-decoration: none;
}

.scene-feed-toast-link:hover {
  text-decoration: underline;
}

.scene-feed-toast-close {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  background: transparent;
  color: #8a9199;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  border-radius: 6px;
}

.scene-feed-toast-close:hover {
  background: #f5f6f8;
  color: #4e5969;
}

.scene-title {
  position: relative;
  display: inline-block;
  margin: 4px 0 18px;
  padding-left: 12px;
  font-size: 18px;
  font-weight: 700;
  color: #1f2329;
  line-height: 1.3;
}

.scene-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 3px;
  bottom: 3px;
  width: 3px;
  border-radius: 999px;
  background: #1677ff;
}

.scene-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 108px;
  gap: 12px;
}

.scene-card {
  position: relative;
  display: block;
  min-height: 0;
  height: 100%;
  padding: 16px 14px;
  border-radius: 10px;
  overflow: hidden;
  box-sizing: border-box;
  transition: transform .15s ease, box-shadow .15s ease;
}

.scene-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(31, 35, 41, 0.08);
}

.scene-card--featured {
  grid-row: span 2;
  padding: 22px 18px;
  color: #fff;
  background: linear-gradient(160deg, #5aa2ff 0%, #3d8bfd 48%, #2f7cf0 100%);
}

.scene-card--featured .scene-card-label {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #fff;
}

.scene-card--featured .scene-card-desc {
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
  font-weight: 400;
}

.scene-card-text {
  position: relative;
  z-index: 1;
  max-width: calc(100% - 52px);
}

.scene-card-label {
  font-size: 15px;
  font-weight: 700;
  color: #1f2329;
  line-height: 1.35;
}

.scene-card-desc {
  margin-top: 6px;
  font-size: 12px;
  color: #8a9199;
  line-height: 1.45;
}

.scene-card-icon {
  position: absolute;
  right: 12px;
  top: 12px;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  line-height: 1;
  background: rgba(255, 255, 255, 0.72);
}

.scene-card--featured .scene-card-icon {
  right: 16px;
  bottom: 16px;
  top: auto;
  width: 92px;
  height: 92px;
  border-radius: 18px;
  font-size: 44px;
  background: rgba(255, 255, 255, 0.16);
}

.theme-custom .scene-card-icon::before { content: '📋'; }
.theme-checkin { background: #e9eef5; }
.theme-checkin .scene-card-icon { background: rgba(74, 144, 226, 0.14); color: #4a90e2; }
.theme-checkin .scene-card-icon::before { content: '📅'; }
.theme-relay { background: #efeaf8; }
.theme-relay .scene-card-icon { background: rgba(149, 117, 205, 0.16); }
.theme-relay .scene-card-icon::before { content: '🛒'; }
.theme-habit { background: #e7f5ea; }
.theme-habit .scene-card-icon { background: rgba(76, 175, 80, 0.14); }
.theme-habit .scene-card-icon::before { content: '📚'; }
.theme-registration { background: #f8e8ec; }
.theme-registration .scene-card-icon { background: rgba(229, 115, 115, 0.16); }
.theme-registration .scene-card-icon::before { content: '📝'; }
.theme-queue { background: #fff0e0; }
.theme-queue .scene-card-icon { background: rgba(255, 167, 38, 0.16); }
.theme-queue .scene-card-icon::before { content: '⏰'; }
.theme-vote { background: #e6f4f2; }
.theme-vote .scene-card-icon { background: rgba(38, 166, 154, 0.14); }
.theme-vote .scene-card-icon::before { content: '👍'; }
.theme-xhs { background: #fde8ef; }
.theme-xhs .scene-card-icon { background: rgba(219, 39, 119, 0.14); }
.theme-xhs .scene-card-icon::before { content: '📕'; }
.theme-meal { background: #e8eefc; }
.theme-meal .scene-card-icon { background: rgba(37, 99, 235, 0.14); }
.theme-meal .scene-card-icon::before { content: '🍽️'; }

.scene-template-banner {
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-radius: 10px;
  background: #eaf2fb;
  transition: background .15s ease;
}

.scene-template-banner:hover {
  background: #e0ebf8;
}

.scene-template-banner-title {
  font-size: 14px;
  font-weight: 700;
  color: #1f2329;
}

.scene-template-banner-desc {
  margin-top: 4px;
  font-size: 12px;
  color: #8a9199;
}

.scene-template-banner-link {
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 600;
  color: #4a90e2;
}

@media (max-width: 900px) {
  .scene-grid {
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: 104px;
  }
  .scene-card--featured {
    grid-column: 1 / -1;
    grid-row: span 1;
    min-height: 148px;
  }
  .scene-card--featured .scene-card-icon {
    width: 64px;
    height: 64px;
    font-size: 30px;
  }
}

@media (max-width: 560px) {
  .scene-grid {
    grid-template-columns: 1fr;
  }
  .auth-login-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .auth-qr-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 0;
  }
  .auth-qr-img {
    max-width: 168px;
  }
}

/* —— 创建活动：顶部标题/说明 + 设置 —— */
.create-top {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.9fr);
  gap: 16px;
  align-items: stretch;
  margin-bottom: 18px;
}

.create-top-left,
.create-top-right {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
}

.create-top-left {
  background: #fafbfc;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
}

.create-desc-label {
  min-height: 0;
}

.create-desc-textarea {
  width: 100%;
  min-height: 120px;
  max-height: 220px;
  resize: vertical;
  line-height: 1.6;
  box-sizing: border-box;
}

.create-cover-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.create-cover-section > span {
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
}

.create-cover-box {
  position: relative;
  width: 100%;
  max-width: 420px;
  aspect-ratio: 16 / 9;
  border: none;
  border-radius: 10px;
  overflow: hidden;
  background: #1677ff;
  cursor: pointer;
  transition: box-shadow 0.15s ease, outline-color 0.15s ease;
}

.create-cover-box.has-cover {
  background: #eef0f3;
}

.create-cover-box.is-dragover {
  box-shadow: 0 0 0 2px #1677ff, 0 8px 24px rgba(22, 119, 255, 0.18);
}

.create-cover-box.has-cover .create-cover-placeholder,
.create-cover-placeholder[hidden] {
  display: none !important;
}

.create-cover-placeholder {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 13px;
  pointer-events: none;
  user-select: none;
}

.create-cover-placeholder-icon {
  width: 56px;
  height: 56px;
  color: rgba(255, 255, 255, 0.5);
}

.create-cover-placeholder-text {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.78);
}

.create-cover-preview {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.create-cover-preview[hidden] {
  display: none;
}

.create-cover-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 2px;
}

.create-cover-actions .btn.ghost {
  padding: 6px 12px;
  font-size: 13px;
}

.create-cover-tip {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

.create-desc-trigger {
  width: 100%;
  min-height: 120px;
  max-height: 720px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  text-align: left;
  cursor: pointer;
  box-sizing: border-box;
  overflow-y: auto;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.create-desc-trigger:hover {
  border-color: #b8bcc4;
  box-shadow: 0 0 0 2px rgba(22, 119, 255, 0.08);
}

.create-desc-preview {
  display: block;
  pointer-events: none;
}

.create-desc-placeholder {
  display: block;
  color: #8f959e;
  font-size: 14px;
  line-height: 1.6;
}

.create-desc-preview.has-content .create-desc-placeholder {
  display: none;
}

.create-desc-preview-text {
  margin: 0 0 12px;
  color: #1f2329;
  font-size: 14px;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
}

.create-desc-preview-text:last-child {
  margin-bottom: 0;
}

.create-desc-preview-image {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  margin-bottom: 12px;
  border-radius: 8px;
  border: 1px solid #e5e6eb;
}

.create-desc-preview-link,
.create-desc-preview-location {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid #e5e6eb;
  border-radius: 8px;
  background: #f7f8fa;
}

.create-desc-preview-link-icon,
.create-desc-preview-location-icon {
  flex-shrink: 0;
  font-size: 16px;
  line-height: 1.4;
}

.create-desc-preview-link-body,
.create-desc-preview-location-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.create-desc-preview-link-title,
.create-desc-preview-location-name {
  color: #1f2329;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  word-break: break-word;
}

.create-desc-preview-link-url,
.create-desc-preview-location-address {
  color: #8f959e;
  font-size: 12px;
  line-height: 1.5;
  word-break: break-all;
}

/* legacy alias */
.create-desc-summary {
  display: block;
  color: #8f959e;
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}

.create-desc-summary.has-content {
  color: #1f2329;
}

body.content-editor-open {
  overflow: hidden;
}

.content-editor-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.content-editor-modal[hidden] {
  display: none !important;
}

.content-editor-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 18, 24, 0.45);
}

.content-editor-panel {
  position: relative;
  width: min(980px, 100%);
  max-height: calc(100vh - 48px);
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 18px 48px rgba(15, 18, 24, 0.18);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.content-editor-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.content-editor-main {
  padding: 18px;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: #f7f8fa;
  border-right: 1px solid var(--line);
}

.content-editor-empty {
  color: #8f959e;
  font-size: 14px;
  padding: 48px 12px;
  text-align: center;
}

.content-editor-empty[hidden] {
  display: none !important;
}

.content-editor-blocks {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.content-block-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}

.content-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid #f0f1f3;
  background: #fafbfc;
}

.content-block-title {
  font-size: 13px;
  font-weight: 600;
  color: #646a73;
}

.content-block-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.content-block-body {
  padding: 12px;
}

.content-block-textarea {
  width: 100%;
  min-height: 96px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  font: inherit;
  line-height: 1.6;
  resize: vertical;
  box-sizing: border-box;
}

.content-block-image {
  display: block;
  width: 100%;
  max-height: 280px;
  object-fit: contain;
  border-radius: 8px;
  background: #f5f6f7;
}

.content-block-image-empty {
  padding: 28px;
  text-align: center;
  color: #8f959e;
  background: #f5f6f7;
  border-radius: 8px;
}

.content-block-image-btn {
  margin-top: 10px;
}

.content-block-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 10px;
}

.content-block-field:last-child {
  margin-bottom: 0;
}

.content-block-field > span {
  font-size: 12px;
  color: var(--muted);
}

.content-block-field input {
  width: 100%;
  box-sizing: border-box;
}

.content-block-location-placeholder {
  text-align: center;
  padding: 24px 12px;
  color: #646a73;
}

.content-block-location-icon {
  font-size: 28px;
  display: block;
  margin-bottom: 8px;
}

.content-block-location-placeholder .muted {
  margin-top: 6px;
  font-size: 12px;
  color: #8f959e;
}

.content-editor-sidebar {
  padding: 16px 12px;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: #fff;
}

.content-editor-sidebar-title {
  font-size: 13px;
  color: #8f959e;
  margin-bottom: 12px;
}

.content-editor-type-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.content-editor-type-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  text-align: left;
  cursor: pointer;
}

.content-editor-type-item:hover {
  border-color: #1677ff;
  background: #f0f7ff;
}

.content-editor-type-icon {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.content-editor-type-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.content-editor-type-label {
  font-size: 14px;
  font-weight: 600;
  color: #1f2329;
}

.content-editor-type-desc {
  font-size: 12px;
  color: #8f959e;
  line-height: 1.4;
}

.content-editor-footer {
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 14px 18px;
  border-top: 1px solid var(--line);
  background: #fff;
}

body.location-sync-open {
  overflow: hidden;
}

.location-sync-modal {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.location-sync-modal[hidden] {
  display: none !important;
}

.location-sync-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 18, 24, 0.45);
}

.location-sync-panel {
  position: relative;
  width: min(420px, 100%);
  background: #fff;
  border-radius: 14px;
  padding: 24px 24px 18px;
  box-shadow: 0 18px 48px rgba(15, 18, 24, 0.18);
}

.location-sync-title {
  text-align: center;
  font-size: 18px;
  font-weight: 700;
  color: #1f2329;
  margin-bottom: 14px;
}

.location-sync-tip {
  background: #fff7e6;
  color: #8c6a1a;
  font-size: 13px;
  line-height: 1.6;
  padding: 12px 14px;
  border-radius: 10px;
  margin-bottom: 18px;
}

.location-sync-qr-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 240px;
  margin-bottom: 12px;
}

.location-sync-qr {
  width: 220px;
  height: 220px;
  object-fit: contain;
}

.location-sync-qr-loading {
  color: #8f959e;
  font-size: 14px;
}

.location-sync-error {
  color: #ff4d4f;
  font-size: 13px;
  text-align: center;
  margin-bottom: 10px;
}

.location-sync-footer {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.content-block-location-filled {
  padding: 8px 0;
}

.content-block-location-name {
  font-size: 14px;
  font-weight: 600;
  color: #1f2329;
}

.content-block-location-address,
.content-block-location-meta {
  margin-top: 6px;
  font-size: 12px;
}

@media (max-width: 900px) {
  .content-editor-body {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr) auto;
  }
  .content-editor-main {
    max-height: 50vh;
  }
  .content-editor-sidebar {
    border-top: 1px solid var(--line);
    max-height: 36vh;
  }
}

.settings-block {
  background: #fafbfc;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.settings-block h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
}

.settings-block .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.settings-switch {
  flex-direction: row !important;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.settings-switch input[type="checkbox"] {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.recurring-weekdays {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.recurring-weekdays[hidden],
#customTimeSlotRow[hidden] {
  display: none !important;
}

.recurring-weekdays-label {
  font-size: 13px;
  color: #4e5969;
}

.recurring-weekday-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.recurring-weekday-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  cursor: pointer;
  user-select: none;
}

.recurring-weekday-item input {
  width: 14px;
  height: 14px;
  margin: 0;
}

/* —— 创建活动：填写项构建器 —— */
.create-form .form-builder {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.9fr);
  gap: 16px;
  margin-top: 8px;
  align-items: start;
}

.form-builder-main,
.form-builder-side {
  background: #fafbfc;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
}

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

.form-builder-head h2 {
  font-size: 16px;
}

.preset-list-panel {
  margin-bottom: 12px;
}

.preset-list-entry {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  text-align: left;
}

.preset-list-entry:hover {
  border-color: #1677ff;
}

.preset-list-entry-title {
  font-weight: 600;
  color: var(--text);
}

.preset-list-entry-summary {
  font-size: 13px;
  color: var(--muted);
}

.preset-list-hint {
  margin: 8px 2px 0;
  font-size: 13px;
}

.preset-setting-body .preset-add-list-btn {
  width: 100%;
  margin: 4px 0 12px;
  padding: 10px 12px;
  border: 1px dashed #1677ff;
  border-radius: 8px;
  background: #f0f7ff;
  color: #1677ff;
  cursor: pointer;
}

.preset-setting-body .preset-add-list-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.field-modal-flags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-top: 8px;
}

.field-modal-flag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}

.field-modal-flag input[type="checkbox"] {
  width: 16px;
  height: 16px;
}

.preset-names-tip {
  margin: 0 0 10px;
  font-size: 13px;
}

.preset-names-textarea {
  width: 100%;
  min-height: 220px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  font: inherit;
  resize: vertical;
}

.preset-names-textarea.is-example {
  color: var(--muted);
}

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

.preset-names-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.preset-names-preview {
  margin-top: 12px;
}

.preset-preview-title {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 8px;
}

.preset-preview-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.preset-preview-tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: #f3f4f6;
  font-size: 13px;
}

.preset-modal .field-modal-panel {
  max-width: 560px;
}

.preset-names-panel .field-modal-panel {
  max-width: 640px;
}

.visibility-select {
  max-width: 280px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  background: #fff;
  color: var(--text);
  font-size: 13px;
}

.field-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 48px;
}

.field-list-empty {
  color: var(--muted);
  font-size: 13px;
  padding: 24px 8px;
  text-align: center;
}

.field-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
}

.field-row-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  width: 100%;
}

.field-row-main {
  flex: 1 1 140px;
  min-width: 0;
}

.form .field-row-title,
.field-row .field-row-title {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  color: var(--text);
  line-height: 1.4;
}

.form .field-row-title:focus,
.form .field-row-title:focus-visible,
.field-row .field-row-title:focus,
.field-row .field-row-title:focus-visible {
  outline: none;
  border: none;
  box-shadow: none;
}

.form .field-row-title::placeholder,
.field-row .field-row-title::placeholder {
  color: #b0b4bc;
  font-weight: 500;
}

.field-row-type {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}

.field-row-required {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}

.field-row-flags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding-top: 2px;
  border-top: 1px solid #f0f1f3;
}

.field-row-flag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}

.field-row-flag input[type="checkbox"] {
  width: 16px;
  height: 16px;
}

.field-row-actions {
  display: flex;
  gap: 4px;
  margin-left: auto;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: #f3f5f9;
  color: #646a73;
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
}

.icon-btn svg {
  display: block;
  flex-shrink: 0;
}

.icon-btn:hover {
  background: var(--primary-soft);
  color: var(--primary);
}

.icon-btn.danger {
  color: #8c8c8c;
}

.icon-btn.danger:hover {
  background: rgba(255, 77, 79, 0.1);
  color: var(--danger);
}

.field-catalog-block + .field-catalog-block {
  margin-top: 18px;
}

.field-catalog-block h3 {
  font-size: 14px;
  margin-bottom: 10px;
}

.field-catalog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.catalog-item {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  padding: 10px 8px;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
  text-align: center;
}

.catalog-item:hover {
  border-color: rgba(22, 119, 255, 0.35);
  color: var(--primary);
  background: var(--primary-soft);
}

/* ========== 团建打卡：选择创建方式 ========== */
.checkin-flow-mask[hidden] {
  display: none !important;
}

.checkin-flow-mask {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.45);
}

.checkin-flow-panel {
  width: min(420px, 100%);
  background: #fff;
  border-radius: 14px;
  padding: 18px 16px 8px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.2);
}

.checkin-flow-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
  padding: 0 6px 8px;
}

.checkin-flow-title {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  color: #1f2329;
}

.checkin-flow-close {
  border: 0;
  background: transparent;
  font-size: 22px;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
}

.checkin-flow-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 16px 10px;
  border: 0;
  border-top: 1px solid var(--line);
  background: transparent;
  text-align: left;
  cursor: pointer;
  border-radius: 8px;
}

.checkin-flow-item:hover {
  background: #f7f8fa;
}

.checkin-flow-item-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.checkin-flow-item-title {
  font-size: 15px;
  font-weight: 600;
  color: #1f2329;
}

.checkin-flow-item-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
}

.checkin-flow-item-arrow {
  color: #c8c9cc;
  font-size: 16px;
}

.create-flow-banner {
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(22, 119, 255, 0.08);
  color: #1677ff;
  font-size: 13px;
  line-height: 1.5;
}

.create-flow-banner strong {
  font-weight: 600;
}

.checkin-step-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 18px;
  padding: 12px 14px;
  background: #f7f8fa;
  border-radius: 12px;
}

.checkin-step {
  font-size: 14px;
  font-weight: 600;
  color: #8f959e;
}

.checkin-step.active {
  color: #1677ff;
}

.checkin-step.done {
  color: #1f2329;
}

.checkin-step-line {
  flex: 1;
  height: 1px;
  background: #e5e6eb;
}

.date-range-picker {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 4px 0 2px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fafbfc;
}

.date-range-picker-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #1f2329;
}

.date-range-duration {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}

.date-range-summary {
  padding: 8px 10px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--line);
  font-size: 12px;
  color: #1677ff;
  line-height: 1.4;
}

.date-range-picker label {
  gap: 4px;
}

.date-range-picker label[hidden] {
  display: none !important;
}

.date-range-picker select,
.date-range-picker input[type="datetime-local"] {
  width: 100%;
}

.create-checkin-flow-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.create-checkin-flow-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  background: #fff;
}

.create-checkin-flow-option:has(input:checked) {
  border-color: rgba(22, 119, 255, 0.45);
  background: rgba(22, 119, 255, 0.04);
}

.create-checkin-flow-option input {
  margin-top: 3px;
}

.create-checkin-flow-option span {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.create-checkin-flow-option .opt-title {
  font-size: 14px;
  font-weight: 600;
  color: #1f2329;
}

.create-checkin-flow-option .opt-desc {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}

.field-modal[hidden] {
  display: none !important;
}

.field-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.field-modal-mask {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
}

.field-modal-panel {
  position: relative;
  width: min(480px, 100%);
  max-height: min(80vh, 720px);
  overflow: auto;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.2);
  display: flex;
  flex-direction: column;
}

.field-modal-head,
.field-modal-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}

.field-modal-foot {
  border-bottom: 0;
  border-top: 1px solid var(--line);
  justify-content: flex-end;
}

.field-modal-close {
  border: 0;
  background: transparent;
  font-size: 22px;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
}

.field-modal-body {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.field-prop {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
}

.field-prop input[type="text"],
.field-prop input[type="number"],
.field-prop select,
.field-prop textarea {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
}

.field-prop input[type="checkbox"] {
  width: 16px;
  height: 16px;
}

@media (max-width: 900px) {
  .create-top,
  .create-form .form-builder {
    grid-template-columns: 1fr;
  }
  .create-desc-textarea {
    min-height: 100px;
    max-height: 180px;
  }
  .field-catalog-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .field-row-top {
    flex-direction: column;
    align-items: stretch;
  }
  .field-catalog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
