:root {
  --primary: #1e6fff;
  --primary-soft: #ddeaff;
  --primary-btn-soft: #e4edff;
  --bg: #f0f2f5;
  --sidebar: #f5f6f7;
  --main-bg: #ffffff;
  --card: #ffffff;
  --text: #303133;
  --text-secondary: #606266;
  --muted: #909399;
  --line: #ebeef5;
  --border: #dcdfe6;
  --danger: #f56c6c;
  --ok: #67c23a;
  --header-h: 56px;
  --sidebar-w: 240px;
  --sidebar-collapsed-w: 64px;
  --radius: 6px;
  --shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
  --accent: #1e6fff;
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
}
#app { height: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
img { max-width: 100%; display: block; }
code {
  background: #f5f7fa;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 12px;
  color: var(--primary);
}

/* ===== Login ===== */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 20% 20%, rgba(30, 111, 255, 0.18), transparent 42%),
    radial-gradient(circle at 80% 0%, rgba(30, 111, 255, 0.12), transparent 36%),
    linear-gradient(160deg, #f5f7fb 0%, #e8eef8 100%);
  padding: 24px;
}
.login-card {
  width: min(420px, 100%);
  background: #fff;
  border-radius: 12px;
  padding: 36px 32px 28px;
  box-shadow: 0 12px 40px rgba(30, 111, 255, 0.12);
  border: 1px solid #e8eef8;
}
.login-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
}
.login-brand h1 {
  margin: 0 0 4px;
  font-size: 22px;
  font-weight: 600;
  color: #1f2329;
}
.login-brand p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.brand-logo {
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  background: #f7f3ea;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
.login-brand .brand-logo {
  width: 56px;
  height: 56px;
}

.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.field span { font-size: 13px; color: var(--text-secondary); }
.field .req {
  color: var(--danger, #e5484d);
  font-style: normal;
  font-weight: 600;
  margin-left: 2px;
}
.field input:not([type="checkbox"]):not([type="radio"]),
.field textarea,
.field select {
  width: 100%;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: var(--radius);
  padding: 9px 12px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.field textarea { min-height: 96px; resize: vertical; }
.field input:not([type="checkbox"]):not([type="radio"]):focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(30, 111, 255, 0.12);
}
.field input[type="checkbox"],
.field input[type="radio"],
.check input[type="checkbox"],
.check input[type="radio"] {
  width: 16px;
  height: 16px;
  min-width: 16px;
  min-height: 16px;
  margin: 0;
  padding: 0;
  flex: none;
  border: none;
  box-shadow: none;
  accent-color: var(--primary);
}
.row { display: flex; gap: 12px; }
.row .field { flex: 1; }

.primary, .ghost, .danger, .tiny, .header-btn {
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 8px 16px;
  font-size: 14px;
  line-height: 1.4;
  transition: background .15s, border-color .15s, color .15s;
}
.primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.primary:hover { background: #185ce0; }
.primary:disabled { opacity: 0.55; cursor: default; }
.ghost, .tiny {
  background: #fff;
  color: var(--text);
  border-color: var(--border);
}
.ghost:hover, .tiny:hover {
  color: var(--primary);
  border-color: #b3d0ff;
  background: var(--primary-btn-soft);
}
.danger {
  background: #fff;
  color: var(--danger);
  border-color: #fbc4c4;
}
.danger:hover { background: #fef0f0; }
.tiny { padding: 5px 10px; font-size: 12px; }
.full { width: 100%; margin-top: 8px; }
.hint { color: var(--muted); font-size: 12px; line-height: 1.6; }
.error-text { color: var(--danger); min-height: 20px; font-size: 13px; margin: 0 0 8px; }

/* ===== Shell / Header / Sidebar ===== */
.shell {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 100vh;
  overflow: hidden;
  background: var(--bg);
}
.top-header {
  height: var(--header-h);
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  background: #fff;
  border-bottom: 1px solid #eef0f4;
  z-index: 30;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-name {
  font-size: 16px;
  font-weight: 600;
  color: #1f2329;
  letter-spacing: 0.2px;
}
.header-right {
  display: flex;
  align-items: center;
  gap: 14px;
}
.header-mode {
  font-size: 12px;
  color: var(--muted);
  background: #f5f7fa;
  border-radius: 999px;
  padding: 4px 10px;
}
.header-user {
  font-size: 13px;
  color: var(--text-secondary);
}
.header-btn {
  background: var(--primary-btn-soft);
  color: var(--primary);
  border-color: transparent;
  padding: 6px 12px;
  font-size: 13px;
}
.header-btn:hover {
  background: var(--primary);
  color: #fff;
}

.shell-body {
  flex: 1;
  min-height: 0;
  display: flex;
  overflow: hidden;
}

.sidebar {
  width: var(--sidebar-w);
  height: 100%;
  background: var(--sidebar);
  color: var(--text);
  flex: none;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border-right: 1px solid #e8eaed;
  transition: width .2s ease;
}
.shell.collapsed .sidebar { width: var(--sidebar-collapsed-w); }
.shell.collapsed .nav-group-title,
.shell.collapsed .nav-btn span,
.shell.collapsed .nav-caret,
.shell.collapsed .collapse-btn span {
  display: none;
}
.shell.collapsed .nav-btn,
.shell.collapsed .collapse-btn {
  justify-content: center;
  padding-left: 0;
  padding-right: 0;
}
.shell.collapsed .nav-parent { justify-content: center; }
.shell.collapsed .nav-sub-list { display: none !important; }

.sidebar-top {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 12px 10px 8px;
}
.nav-list { display: flex; flex-direction: column; gap: 14px; }
.nav-group { display: flex; flex-direction: column; gap: 2px; }
.nav-group-title {
  font-size: 12px;
  color: #909399;
  padding: 8px 12px 6px;
  letter-spacing: 0.5px;
}
.nav-btn {
  width: 100%;
  text-align: left;
  background: transparent;
  color: #303133;
  border: 0;
  border-radius: var(--radius);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}
.nav-btn:hover { background: rgba(30, 111, 255, 0.06); color: var(--primary); }
.nav-btn.active {
  background: var(--primary-soft);
  color: var(--primary);
}
.nav-ico {
  width: 18px;
  text-align: center;
  font-style: normal;
  font-size: 13px;
  opacity: 0.85;
  flex: none;
}
.nav-parent {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-parent-left {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.nav-caret {
  font-style: normal;
  opacity: 0.45;
  font-size: 12px;
}
.nav-sub-list {
  display: none;
  padding: 2px 0 4px 8px;
}
.nav-sub-list.open { display: flex; flex-direction: column; gap: 2px; }
.nav-btn.nav-sub {
  padding: 9px 12px;
  font-size: 13px;
  color: #606266;
}
.nav-btn.nav-sub.active {
  background: var(--primary-soft);
  color: var(--primary);
}

.sidebar-foot {
  flex: none;
  padding: 10px;
  border-top: 1px solid #e8eaed;
}
.collapse-btn {
  width: 100%;
  border: 0;
  background: transparent;
  color: #606266;
  border-radius: var(--radius);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}
.collapse-btn:hover {
  background: rgba(30, 111, 255, 0.06);
  color: var(--primary);
}

/* ===== Main content ===== */
.main {
  flex: 1;
  min-width: 0;
  height: 100%;
  overflow-y: auto;
  padding: 16px 20px 24px;
  background: var(--main-bg);
}
.page-panel {
  background: #fff;
  min-height: calc(100% - 4px);
}
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  padding: 0 0 14px;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  border-bottom: 1px solid var(--line);
}
.topbar h2 {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 600;
  color: #1f2329;
}
.page-body { min-height: 120px; }

.card {
  background: var(--card);
  border-radius: 8px;
  padding: 18px 20px;
  box-shadow: none;
  margin-bottom: 12px;
  border: 1px solid var(--line);
}
.card h3 {
  margin: 0 0 14px;
  font-size: 15px;
  font-weight: 600;
  color: #1f2329;
}
.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}
.card-head h3 { margin: 0 0 6px; }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; }
.stat {
  background: #fff;
  border-radius: 8px;
  padding: 16px;
  box-shadow: var(--shadow);
}
.stat b { display: block; font-size: 18px; margin-top: 8px; color: #1f2329; }
.stat span { color: var(--muted); font-size: 12px; }

.layout { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 12px; align-items: start; }
.preview-col { position: sticky; top: 0; }

/* ===== 团队风采：左列表固定 / 中编辑可滚 / 右预览固定 ===== */
.main.main--team {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding-bottom: 16px;
}
.main.main--team .page-panel {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.main.main--team .topbar {
  flex: none;
  margin-bottom: 12px;
}
.main.main--team .page-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.team-workspace {
  flex: 1;
  min-height: 0;
  height: 100%;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr) 390px;
  grid-template-rows: minmax(0, 1fr);
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}
.host-side {
  border-right: 1px solid var(--line);
  background: #fafbfc;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}
.host-side-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 14px 14px 8px;
}
.host-side-title {
  font-size: 14px;
  font-weight: 600;
  color: #1f2329;
}
.host-side-title-field {
  margin: 0 14px 10px;
}
.host-side-head,
.host-side-title-field,
.host-side-foot {
  flex: none;
}
.host-side-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 0 8px 8px;
  overscroll-behavior: contain;
}
.host-side-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  border: 0;
  background: transparent;
  border-radius: 6px;
  padding: 10px;
  margin-bottom: 4px;
  color: #303133;
}
.host-side-item:hover { background: rgba(30, 111, 255, 0.06); }
.host-side-item.active {
  background: var(--primary-soft);
  color: var(--primary);
}
.host-side-item img,
.host-side-avatar {
  width: 40px;
  height: 52px;
  border-radius: 4px;
  object-fit: cover;
  flex: none;
  background: #eef2f8;
}
.host-side-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #909399;
}
.host-side-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.host-side-text b {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.host-side-text i {
  font-style: normal;
  font-size: 12px;
  color: #909399;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.host-side-item.active .host-side-text i { color: #5b8ff9; }
.host-side-foot {
  padding: 12px 14px;
  border-top: 1px solid var(--line);
  background: #fff;
}
.host-main {
  min-width: 0;
  height: 100%;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 16px 18px 20px;
  background: #fff;
  overscroll-behavior: contain;
}
.host-editor-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}
.host-editor-head h3 { margin: 0 0 6px; font-size: 16px; }
.bind-code-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
}
.bind-code-value {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 8px;
  background: #f3f4f6;
  border: 1px solid var(--line);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: #111;
}
.host-editor-foot {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}
.danger-text { color: var(--danger) !important; }
.team-preview {
  border-left: 1px solid var(--line);
  background: #f5f6f7;
  padding: 16px 12px;
  height: 100%;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}
.team-preview .device {
  flex: none;
  transform: scale(0.92);
  transform-origin: top center;
  margin: 0 auto;
}
.empty-panel {
  text-align: center;
  color: #909399;
  padding: 40px 16px;
}
.empty-panel.tall {
  min-height: 360px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.empty-ico {
  width: 72px;
  height: 56px;
  margin: 0 auto 12px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, #fff 0 40%, transparent 40%),
    linear-gradient(135deg, #e8edf5 0%, #d7dee8 100%);
  box-shadow: 8px 8px 0 #eef2f7, 16px 16px 0 #f5f7fa;
}
.pv-stack {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
  font-size: 0;
  line-height: 0;
  background: #000;
}
.pv-media {
  width: 100%;
  margin: 0;
  padding: 0;
  position: relative;
  line-height: 0;
  font-size: 0;
  overflow: hidden;
}
.pv-media + .pv-media { margin-top: -1px; }
.pv-media img {
  width: 100%;
  display: block;
  margin: 0;
  padding: 0;
  vertical-align: top;
  background: #000;
}
.pv-info {
  width: 100%;
  padding: 28px 22px 24px;
  background: #000;
  color: #fff;
  box-sizing: border-box;
  font-size: 12px;
  line-height: 1.6;
  text-align: center;
}
.pv-info-title {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-bottom: 14px;
  color: #fff;
}
.pv-info-content {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.88);
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.75;
}
.pv-info-divider {
  height: 1px;
  margin: 18px 8px 16px;
  background: rgba(255, 255, 255, 0.18);
}
.pv-info-fields {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px 0;
}
.pv-info-field {
  width: 33.333%;
  box-sizing: border-box;
  padding: 0 6px;
  text-align: center;
}
.pv-info-value {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  line-height: 1.3;
}
.pv-info-label {
  margin-top: 4px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.45);
}
.pv-video .pv-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 44px;
  height: 44px;
  margin: -22px 0 0 -22px;
  border-radius: 50%;
  background: rgba(255,255,255,.88);
}
.pv-video .pv-play::after {
  content: '';
  position: absolute;
  left: 18px;
  top: 14px;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 12px solid #222;
}
.pv-empty {
  padding: 120px 20px;
  text-align: center;
  color: #999;
  font-size: 14px;
  line-height: 1.5;
  background: #111;
}
.screen--host {
  background: #000;
  color: #fff;
}
.pv-host-nav {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  z-index: 5;
  height: 88px;
  padding: 44px 12px 0;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0) 100%);
  pointer-events: none;
}
.pv-host-back {
  width: 28px;
  flex: none;
  font-size: 28px;
  line-height: 1;
  color: #fff;
  text-align: center;
}
.pv-host-nav-title {
  flex: 1;
  min-width: 0;
  text-align: center;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.capsule--inline {
  position: static;
  flex: none;
  width: 78px;
  height: 28px;
  margin: 0;
}
.host-detail-scroll {
  padding: 0;
  padding-top: 88px;
  background: #000;
  height: calc(100% - 64px);
  box-sizing: border-box;
}
.host-detail-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #000;
  height: 64px;
  padding: 0 10px;
  box-sizing: border-box;
  color: #fff;
}
.host-detail-bar .bar-pill-mini {
  flex-direction: row;
}
.bar-stat-mini {
  width: auto;
  min-width: 44px;
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: #fff;
  font-size: 10px;
  line-height: 1.2;
  white-space: nowrap;
}
.bar-stat-img {
  width: 16px;
  height: 16px;
  display: block;
  object-fit: contain;
}
.host-detail-bar .bar-stat-img {
  width: 16px;
  height: 16px;
}
.bar-stat-img-wrap {
  position: relative;
  width: 16px;
  height: 16px;
  display: inline-block;
}
.bar-dot {
  position: absolute;
  top: -2px;
  right: -3px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ff3b30;
}
.bar-pill-mini {
  flex: 1;
  min-width: 0;
  height: 36px;
  border-radius: 7px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 5px;
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}
.bar-pill-mini.follow { background: #2c2c2e; }
.bar-pill-mini.phone { background: #ff3b30; }
.bar-pill-img {
  width: 14px;
  height: 14px;
  display: block;
  object-fit: contain;
  flex: none;
}
.host-detail-bar .bar-pill-img {
  width: 14px;
  height: 14px;
}

@media (max-width: 1200px) {
  .team-workspace {
    grid-template-columns: 220px minmax(0, 1fr);
  }
  .team-preview { display: none; }
  .main.main--team {
    overflow-y: auto;
  }
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  font-size: 13px;
}
.data-table th,
.data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}
.data-table th {
  background: #f5f7fa;
  font-size: 12px;
  color: #606266;
  font-weight: 600;
}
.data-table tr:hover td { background: #fafcff; }
.data-table tr:last-child td { border-bottom: 0; }
.col-sort { width: 88px; }
.col-cover { width: 72px; }
.col-phone { width: 150px; }
.col-video { width: 200px; }
.video-cell { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.video-link { font-size: 12px; color: var(--primary); }
.col-enable { width: 110px; }
.col-actions { width: 140px; white-space: nowrap; }

.media-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 16px 0 12px;
}
.media-add-dock {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  gap: 8px;
  margin: 12px 0 10px;
  padding: 10px 0;
  background: #fff;
}
.media-add-btn {
  flex: 1;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 10px;
  border: none;
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(30, 111, 255, 0.28);
  -webkit-user-select: none;
  user-select: none;
}
.media-add-btn input {
  display: none;
}
.media-add-btn:hover {
  background: #185ce0;
}
.media-add-btn:disabled,
.media-add-btn.is-disabled {
  opacity: 0.45;
  cursor: default;
  box-shadow: none;
  pointer-events: none;
}
.media-add-btn:active:not(:disabled):not(.is-disabled) {
  transform: scale(0.98);
}
body.is-media-sorting .media-add-dock,
body.is-media-sorting .host-save-dock {
  opacity: 0;
  pointer-events: none;
}
.host-editor {
  padding-bottom: 8px;
}
.host-save-btn {
  min-width: 140px;
}
.media-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.media-card {
  border: 1px solid var(--line);
  border-left-width: 3px;
  border-radius: 8px;
  padding: 12px;
  background: #f5f7fb;
  touch-action: pan-y;
}
.media-card--image {
  background: #eef4ff;
  border-color: #d6e4ff;
  border-left-color: #1e6fff;
}
.media-card--video {
  background: #fff6eb;
  border-color: #ffe2c2;
  border-left-color: #e6a23c;
}
.media-card--info {
  background: #eef9f0;
  border-color: #d4edda;
  border-left-color: #67c23a;
}
.media-card.is-sort-source {
  outline: 2px solid rgba(30, 111, 255, 0.45);
  outline-offset: 1px;
  background: #e4edff;
}
.media-card--video.is-sort-source {
  outline-color: rgba(230, 162, 60, 0.55);
  background: #ffefd6;
}
.media-card--info.is-sort-source {
  outline-color: rgba(103, 194, 58, 0.55);
  background: #dff3e2;
}
.media-sort-rail {
  position: fixed;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1400;
  pointer-events: none;
  max-height: min(78vh, 640px);
}
.media-sort-rail-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 10px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.18);
  border: 1px solid rgba(0, 0, 0, 0.06);
  max-height: min(78vh, 640px);
  overflow-y: auto;
  overflow-x: visible;
  -webkit-overflow-scrolling: touch;
  box-sizing: border-box;
}
.media-sort-pill {
  min-width: 44px;
  height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  background: #1a1a1a;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 28px;
  text-align: center;
  white-space: nowrap;
  box-sizing: border-box;
  flex: none;
  will-change: transform;
  transition: background .15s ease, margin .2s ease, box-shadow .15s ease, opacity .15s ease;
}
.media-sort-pill.is-other {
  opacity: 0.92;
}
.media-sort-pill.is-target {
  background: #2f6bff;
  margin: 8px 0;
  box-shadow: 0 4px 14px rgba(47, 107, 255, 0.45);
  opacity: 1;
  z-index: 2;
}
.media-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.media-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}
.drag-handle {
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  flex: none;
}
.drag-handle:active {
  cursor: grabbing;
  background: var(--primary-soft);
  border-color: var(--primary);
  color: var(--primary);
}
.drag-handle-bars {
  width: 16px;
  height: 12px;
  display: block;
  background:
    linear-gradient(currentColor, currentColor) 0 0 / 100% 2px no-repeat,
    linear-gradient(currentColor, currentColor) 0 5px / 100% 2px no-repeat,
    linear-gradient(currentColor, currentColor) 0 10px / 100% 2px no-repeat;
}
body.is-media-sorting {
  cursor: grabbing;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}
body.is-media-sorting .main {
  overscroll-behavior: contain;
}
.media-card-body {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.media-card-body--video {
  align-items: flex-start;
}
.media-thumb {
  width: 72px;
  height: 96px;
  flex: none;
}
.media-thumb--lg,
.media-thumb--lg img,
.media-thumb--lg .table-cover,
.media-thumb--lg .table-cover.empty {
  width: 96px;
  height: 128px;
}
.media-thumb img,
.media-thumb .table-cover,
.media-thumb .table-cover.empty {
  width: 72px;
  height: 96px;
  object-fit: cover;
}
.media-card-fields {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
}
.media-card-body--info {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}
.media-card-body--info .field {
  width: 100%;
}
.media-card-body--info textarea {
  width: 100%;
  min-height: 88px;
  resize: vertical;
  font: inherit;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  background: #fff;
}
.info-fields-editor {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.info-fields-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.info-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 8px;
  align-items: center;
}
.info-field-row input {
  width: 100%;
  min-width: 0;
}
.media-tile-row {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-start;
}
.media-tile {
  position: relative;
  width: 88px;
  height: 88px;
  border-radius: 6px;
  overflow: hidden;
  background: #eef1f6;
  flex: none;
}
.media-tile-video video,
.media-tile-video .media-tile-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #111;
}
.media-tile-video .media-tile-poster {
  z-index: 1;
}
.media-tile-play {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  width: 28px;
  height: 28px;
  margin: -14px 0 0 -14px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  pointer-events: none;
}
.media-tile-play::after {
  content: '';
  position: absolute;
  left: 11px;
  top: 8px;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 10px solid #333;
}
.media-tile-del {
  position: absolute;
  top: 4px;
  right: 4px;
  z-index: 3;
  width: 20px;
  height: 20px;
  border: 0;
  border-radius: 50%;
  background: #f56c6c;
  color: #fff;
  font-size: 14px;
  line-height: 20px;
  padding: 0;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}
.media-tile-del:hover { background: #e04b4b; }
.media-tile-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed var(--border);
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
}
.media-tile-empty:hover {
  color: var(--primary);
  border-color: #b3d0ff;
  background: var(--primary-btn-soft);
}
.media-tile-empty input { display: none; }
.media-tile-empty.is-disabled {
  opacity: 0.45;
  pointer-events: none;
  cursor: not-allowed;
}
.media-tile-progress {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 120px;
  height: 120px;
  background: linear-gradient(160deg, #243044 0%, #151a24 100%);
  color: #fff;
  border: 0;
  cursor: default;
  user-select: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}
.media-tile-progress-num {
  position: relative;
  z-index: 1;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}
.media-tile-progress-label {
  position: relative;
  z-index: 1;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.2;
}
.media-tile-progress-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 6px;
  background: rgba(255, 255, 255, 0.16);
}
.media-tile-progress-bar::after {
  content: '';
  display: block;
  height: 100%;
  width: calc(var(--p, 0) * 1%);
  max-width: 100%;
  background: linear-gradient(90deg, #5b9dff, #3b82f6);
  transition: width 0.25s ease;
}
.hint[data-video-progress-hint] {
  color: var(--primary, #3b82f6);
  font-weight: 600;
}
.tiny-upload {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  padding: 6px 10px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: #fff;
  cursor: pointer;
  color: var(--text-secondary);
}
.tiny-upload:hover {
  color: var(--primary);
  border-color: #b3d0ff;
  background: var(--primary-btn-soft);
}
.tiny-upload input { display: none; }

.sort-input {
  width: 64px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 6px 8px;
}
.cover-pick {
  position: relative;
  display: inline-flex;
  cursor: pointer;
  border-radius: var(--radius);
  overflow: hidden;
}
.cover-pick input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}
.cover-pick:hover .table-cover,
.cover-pick:hover .table-cover.empty {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
}
.table-cover,
.table-cover.empty {
  width: 48px;
  height: 64px;
  object-fit: cover;
  border-radius: var(--radius);
  background: #eef2f8;
  display: block;
}
.table-cover.empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 11px;
}
.table-title,
.table-phone,
.table-slogan {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 10px;
}
.table-slogan {
  margin-top: 8px;
  font-size: 12px;
}
.table-phone { font-variant-numeric: tabular-nums; }
.empty-cell {
  text-align: center !important;
  color: var(--muted);
  padding: 28px 14px !important;
}
.check.inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
}
.modal-wide { width: min(480px, 100%); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 12px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f5f7fa;
  border-radius: 999px;
  padding: 6px 8px 6px 12px;
  font-size: 13px;
  color: var(--text-secondary);
}
.banner-list { display: flex; flex-direction: column; gap: 10px; }
.banner-row {
  display: grid;
  grid-template-columns: 92px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fafbfd;
}
.banner-row img {
  width: 92px;
  height: 64px;
  object-fit: cover;
  border-radius: var(--radius);
  background: #eef2f8;
}
.check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.4;
  cursor: pointer;
}
.check-row {
  display: flex;
  align-items: center;
  margin-bottom: 16px;
  padding: 0 20px;
}
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.upload {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed #c0c4cc;
  border-radius: 8px;
  min-height: 72px;
  padding: 12px;
  color: var(--text-secondary);
  background: #fafbfd;
  cursor: pointer;
}
.upload:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-btn-soft);
}
.upload input { display: none; }
.thumb {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: var(--radius);
  background: #eef2f8;
}
.post {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.post:last-child { border-bottom: 0; }

.toast {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  background: #1f2329;
  color: #fff;
  border-radius: 8px;
  padding: 10px 16px;
  z-index: 80; /* 高于弹窗 modal-mask(50) */
  font-size: 14px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  pointer-events: none;
}
.toast.err { background: var(--danger); }

.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  padding: 20px;
}
.modal-card {
  width: min(360px, 100%);
  background: #fff;
  border-radius: 10px;
  padding: 22px 20px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
}
.modal-card--form {
  width: min(440px, 100%);
  padding: 0 0 18px;
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 16px;
}
.modal-head b { font-size: 15px; }
.modal-card--form .field { padding: 0 20px; }
.modal-card--form .hint { padding: 0 20px; margin: -4px 0 12px; }
.modal-card--form .modal-actions { padding: 0 20px; justify-content: flex-end; }
.icon-close {
  border: 0;
  background: transparent;
  font-size: 22px;
  line-height: 1;
  color: var(--muted);
  padding: 0 4px;
}
.icon-close:hover { color: var(--text); }
.modal-title {
  margin: 0 0 18px;
  font-size: 16px;
  font-weight: 600;
  text-align: center;
}
.modal-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.panel-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px 18px 20px;
  box-shadow: var(--shadow);
}
.panel-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}
.panel-title {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 600;
}
.td-actions { white-space: nowrap; }
.link-btn {
  border: 0;
  background: transparent;
  color: var(--primary);
  padding: 0 8px 0 0;
  font-size: 13px;
}
.link-btn:hover { text-decoration: underline; }
.link-btn.danger { color: var(--danger); }
.empty-td {
  text-align: center !important;
  color: var(--muted);
  padding: 36px 14px !important;
}
.team-workspace.host-only {
  grid-template-columns: minmax(0, 1fr) 400px;
}
@media (max-width: 1200px) {
  .team-workspace.host-only {
    grid-template-columns: minmax(0, 1fr);
  }
}
input:disabled,
input[readonly] {
  background: #f5f7fa;
  color: var(--text-secondary);
  cursor: not-allowed;
}

/* ===== Phone preview (unchanged look) ===== */
.device {
  width: 375px;
  height: 760px;
  margin: 0 auto;
  background: #111;
  border-radius: 36px;
  padding: 12px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
}
.screen {
  position: relative;
  height: 100%;
  border-radius: 26px;
  overflow: hidden;
  background: #1f1f1f;
  color: #fff;
}
.screen-scroll { height: 100%; overflow: auto; padding-bottom: 56px; }
.screen-scroll::-webkit-scrollbar { width: 0; }
.hero, .splash-hero { position: relative; background: #1a1a1a; }
.hero { height: calc(100% - 56px); }
.splash-hero { height: 100%; }
.hero img, .splash-hero img, .hero .ph, .splash-hero .ph { width: 100%; height: 100%; object-fit: cover; }
.ph.light { background: linear-gradient(180deg, #c5c8cc, #f3f1ee); }
.ph.dark { background: linear-gradient(180deg, #2a3848, #10141a); }
.shade {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 42%;
  background: linear-gradient(180deg, rgba(0,0,0,0), rgba(0,0,0,.38));
}
.splash-copy {
  position: absolute;
  left: 24px; right: 24px;
  bottom: 16%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  z-index: 2;
  text-shadow: 0 2px 12px rgba(0,0,0,.35);
}
.splash-copy .welcome { letter-spacing: 4px; font-size: 13px; opacity: .92; }
.splash-copy .title { margin-top: 10px; font-size: 26px; font-weight: 500; }
.enter-btn {
  margin-top: 18px;
  border: 0;
  color: #fff;
  background: rgba(255,255,255,.22);
  backdrop-filter: blur(10px);
  border-radius: 999px;
  height: 42px;
  padding: 0 22px;
  text-shadow: none;
}
.dots { position: absolute; left: 0; right: 0; bottom: 22px; display: flex; justify-content: center; gap: 8px; z-index: 2; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.45); display: block; }
.dots i.on { background: #fff; }
.diamonds { bottom: 18px; gap: 8px; }
.diamonds i { width: 6px; height: 6px; border-radius: 1px; transform: rotate(45deg); }
.panel { background: #1f1f1f; padding: 36px 28px 48px; text-align: center; }
.panel h4 { margin: 0; font-size: 22px; font-weight: 600; letter-spacing: 1px; }
.tags { margin-top: 12px; color: #9a9a9a; font-size: 13px; display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; }
.split { display: flex; align-items: center; gap: 12px; margin: 28px 0 18px; color: #8d8d8d; font-size: 13px; }
.split em { flex: 1; height: 1px; background: rgba(255,255,255,.16); }
.cities { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; }
.cities span {
  border: 1px solid rgba(255,255,255,.22);
  background: #2a2a2a;
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 13px;
}
.icon-row { display: flex; width: 100%; margin-top: 32px; }
.icon-row .act { flex: 1; min-width: 0; background: transparent; color: #c8c8c8; border: 0; padding: 0; font-size: 12px; text-align: center; }
.bubble {
  width: 56px; height: 56px; margin: 0 auto 8px;
  border-radius: 50%;
  background: #343434;
  display: flex; align-items: center; justify-content: center;
}
.bubble img { width: 22px; height: 22px; }
.fab {
  position: absolute;
  right: 12px;
  bottom: 92px;
  width: 54px; height: 54px;
  border-radius: 50%;
  border: 0;
  background: #fff;
  color: #161616;
  box-shadow: 0 8px 20px rgba(0,0,0,.18);
  z-index: 3;
}
.capsule {
  position: absolute;
  top: 12px; right: 12px;
  width: 78px; height: 28px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.35);
  background: rgba(0,0,0,.18);
  z-index: 4;
}
.tabbar {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 56px;
  background: #fff;
  color: #9a9a9a;
  display: flex;
  z-index: 4;
}
.tabbar div { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11px; }
.tabbar img { width: 22px; height: 22px; }
.tabbar .on { color: #111; }
.mask {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 5;
  display: flex;
  align-items: flex-end;
}
.sheet {
  width: 100%;
  height: 70%;
  box-sizing: border-box;
  background: #fff;
  color: #222;
  border-radius: 18px 18px 0 0;
  padding: 18px 18px 24px;
  display: flex;
  flex-direction: column;
}
.sheet h5 { margin: 0 0 6px; text-align: center; font-size: 16px; flex-shrink: 0; }
.sheet .sub { text-align: center; color: #888; font-size: 12px; margin-bottom: 12px; flex-shrink: 0; }
.sheet-row {
  width: 100%;
  text-align: left;
  background: #f6f6f6;
  border: 0;
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 8px;
  flex-shrink: 0;
}
.qr {
  width: 100%;
  flex: 1;
  min-height: 180px;
  margin: 8px auto 0;
  object-fit: contain;
  display: block;
}
.team { background: #111; padding: 18px 12px 28px; text-align: left; }
.team-head { display: flex; align-items: center; gap: 6px; font-size: 16px; font-weight: 600; margin-bottom: 14px; }
.team-head i, .host-card p i { font-style: normal; font-weight: 400; opacity: .8; }
.team-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 10px; }
.host-cover-wrap { position: relative; overflow: hidden; border-radius: 4px; }
.host-card img, .host-card .ph { width: 100%; height: 220px; object-fit: cover; display: block; }
.host-top {
  position: absolute; left: 0; right: 0; top: 0;
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
  padding: 8px 8px 18px;
  background: linear-gradient(180deg, rgba(0,0,0,.62) 0%, rgba(0,0,0,.25) 55%, rgba(0,0,0,0) 100%);
  color: #fff; font-size: 11px; line-height: 1.2; pointer-events: none;
}
.host-heat, .host-views { white-space: nowrap; text-shadow: 0 1px 4px rgba(0,0,0,.45); }
.host-card p { margin: 8px 0 0; font-size: 12px; display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.team-empty { color: #8d8d8d; font-size: 12px; grid-column: 1 / -1; padding: 4px 0 8px; }
.host-edit { display: grid; grid-template-columns: 128px 1fr; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line); }
.host-cover, .host-cover.empty { width: 120px; height: 160px; object-fit: cover; border-radius: 10px; background: #1c1c1c; margin-bottom: 8px; }
.host-cover.empty { display: flex; align-items: center; justify-content: center; color: #aaa; font-size: 13px; }

.count-tag {
  display: inline-block;
  margin-left: 6px;
  font-style: normal;
  font-size: 12px;
  color: var(--primary);
  background: var(--primary-soft);
  border-radius: 999px;
  padding: 1px 8px;
  font-weight: 600;
}
.modal-card--post {
  width: min(560px, 100%);
  max-height: min(92vh, 860px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding-bottom: 0;
}
.modal-card--post .modal-head {
  margin-bottom: 0;
  flex-shrink: 0;
}
.modal-card--post .modal-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 16px 0 12px;
}
.modal-card--post .modal-actions--fixed {
  flex-shrink: 0;
  margin: 0;
  padding: 12px 20px calc(12px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line);
  background: #fff;
  justify-content: flex-end;
}
.post-video-box {
  position: relative;
  border: 1px solid var(--line, #e5e5e5);
  border-radius: 10px;
  padding: 12px;
  background: #fafafa;
}
.post-video-box.is-uploading {
  pointer-events: none;
}
.post-video-preview {
  display: block;
  width: 100%;
  max-height: 220px;
  background: #111;
  border-radius: 8px;
}
.post-video-empty {
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999;
  background: #f0f0f0;
  border-radius: 8px;
}
.post-video-upload {
  margin-top: 10px;
  display: inline-flex;
}
.post-video-progress {
  width: 100%;
  max-width: 100%;
  height: 160px;
  border-radius: 8px;
  margin: 0;
}
.post-cover-box {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}
.post-cover-box .upload {
  display: inline-flex;
}

.mobile-nav-btn,
.mobile-only,
.sidebar-mask {
  display: none;
}
.desktop-only { display: flex; }

@media (max-width: 1100px) {
  .layout, .stats { grid-template-columns: 1fr; }
  .preview-col { display: none; }
  .team-workspace,
  .team-workspace.host-only {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ===== Mobile H5 ===== */
@media (max-width: 768px) {
  :root {
    --header-h: 52px;
    --sidebar-w: min(82vw, 300px);
  }

  .mobile-nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 8px;
    background: #f2f4f7;
    color: #303133;
    font-size: 18px;
    flex: none;
    padding: 0;
  }
  .mobile-only { display: flex; }
  .desktop-only { display: none !important; }

  .login-wrap { padding: 16px; align-items: flex-start; padding-top: 10vh; }
  .login-card { padding: 24px 18px 20px; border-radius: 12px; }
  .login-brand { gap: 10px; margin-bottom: 20px; }
  .login-brand h1 { font-size: 18px; }
  .login-brand .brand-logo { width: 48px; height: 48px; }

  .top-header {
    padding: 0 12px;
    position: sticky;
    top: 0;
  }
  .brand { gap: 8px; min-width: 0; }
  .brand-logo { width: 28px; height: 28px; }
  .brand-name {
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .header-mode { display: none; }
  .header-user {
    max-width: 88px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .header-btn { padding: 6px 10px; }

  .shell {
    height: 100dvh;
    min-height: 100dvh;
  }
  .shell-body {
    position: relative;
    overflow: hidden;
  }
  .sidebar-mask {
    display: block;
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.42);
    z-index: 40;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
  }
  .shell.mobile-nav-open .sidebar-mask {
    opacity: 1;
    pointer-events: auto;
  }
  .sidebar {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: var(--sidebar-w) !important;
    height: 100%;
    z-index: 50;
    transform: translateX(-105%);
    transition: transform .22s ease;
    box-shadow: 8px 0 24px rgba(0, 0, 0, 0.12);
    border-right: 0;
  }
  .shell.collapsed .sidebar {
    width: var(--sidebar-w) !important;
    transform: translateX(-105%);
  }
  .shell.mobile-nav-open .sidebar {
    width: var(--sidebar-w) !important;
    transform: translateX(0);
  }
  .shell.collapsed .nav-group-title,
  .shell.collapsed .nav-btn span,
  .shell.collapsed .nav-caret,
  .shell.collapsed .collapse-btn span {
    display: initial;
  }
  .shell.collapsed .nav-btn,
  .shell.collapsed .collapse-btn {
    justify-content: flex-start;
    padding-left: 12px;
    padding-right: 12px;
  }
  .shell.collapsed .nav-sub-list.open { display: block !important; }

  .main {
    width: 100%;
    height: 100%;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 12px;
  }
  .page-panel { min-height: auto; }
  .topbar {
    margin-bottom: 12px;
    padding-bottom: 10px;
  }
  .topbar h2 { font-size: 16px; }

  .card,
  .panel-card {
    padding: 14px;
    border-radius: 10px;
  }
  .panel-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .panel-toolbar .primary,
  .panel-toolbar .ghost {
    width: 100%;
  }

  .row { grid-template-columns: 1fr !important; }
  .layout { grid-template-columns: 1fr; gap: 12px; }
  .preview-col,
  .team-preview { display: none !important; }
  .host-side {
    max-height: none;
  }
  .team-workspace,
  .team-workspace.host-only {
    display: block;
  }
  .host-editor-head {
    flex-direction: column;
    align-items: flex-start;
  }
  .media-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .main.main--team .topbar .hint {
    display: none;
  }
  .media-add-dock {
    position: sticky;
    top: 0;
    z-index: 20; /* 低于侧栏(50)与遮罩(40)，避免盖住菜单 */
    gap: 8px;
    margin: 0 0 12px;
    padding: 10px 0 12px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 8px 16px rgba(255, 255, 255, 0.95);
  }
  .media-add-btn {
    min-height: 42px;
    font-size: 13px;
    border-radius: 10px;
    box-shadow: none;
  }
  .host-save-dock {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 25; /* 低于侧栏，打开菜单时不被挡住 */
    display: flex;
    margin: 0;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
    background: rgba(255, 255, 255, 0.96);
    border-top: 1px solid var(--line);
    box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
  }
  .shell.mobile-nav-open .media-add-dock,
  .shell.mobile-nav-open .host-save-dock {
    visibility: hidden;
    pointer-events: none;
  }
  .host-save-dock .host-save-btn {
    width: 100%;
    min-height: 48px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
  }
  .host-editor {
    padding-bottom: calc(78px + env(safe-area-inset-bottom, 0px));
  }
  .media-card-body,
  .media-card-body--video {
    flex-direction: column;
  }
  .media-card-head {
    gap: 8px;
  }
  .media-card-head > b {
    flex: 1;
    min-width: 0;
  }
  .drag-handle {
    width: 44px;
    height: 44px;
  }
  .media-card-actions .tiny.danger {
    min-height: 44px;
    padding: 0 12px;
  }

  .table-wrap {
    border-radius: 8px;
    -webkit-overflow-scrolling: touch;
  }
  .data-table {
    min-width: 520px;
    font-size: 12px;
  }
  .data-table th,
  .data-table td {
    padding: 10px 10px;
  }
  .td-actions {
    white-space: nowrap;
  }
  .link-btn {
    display: inline-block;
    padding: 6px 8px 6px 0;
  }

  .modal-mask {
    padding: 0;
    align-items: flex-end;
  }
  .modal-card,
  .modal-card--form {
    width: 100%;
    max-width: 100%;
    max-height: 92dvh;
    border-radius: 14px 14px 0 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .modal-card--post {
    width: 100%;
    max-width: 100%;
    max-height: 92dvh;
    border-radius: 14px 14px 0 0;
    overflow: hidden;
  }
  .modal-card--post .modal-body {
    -webkit-overflow-scrolling: touch;
  }
  .modal-card--form .field,
  .modal-card--form .hint,
  .modal-card--form .modal-actions {
    padding-left: 16px;
    padding-right: 16px;
  }
  .modal-card--post .modal-actions--fixed {
    padding-left: 16px;
    padding-right: 16px;
    width: 100%;
    box-sizing: border-box;
  }
  .modal-card--post .modal-actions--fixed .ghost,
  .modal-card--post .modal-actions--fixed .primary {
    flex: 1;
    min-height: 44px;
  }
  .post-video-preview {
    max-height: 48vw;
  }
  .post-video-progress {
    height: 48vw;
    max-height: 220px;
    min-height: 140px;
  }
  .post-cover-box img,
  .post-cover-box .post-video-empty {
    width: min(160px, 42vw) !important;
    height: min(160px, 42vw) !important;
  }
  .post-video-upload,
  .post-cover-box .upload {
    width: 100%;
    justify-content: center;
    min-height: 44px;
    box-sizing: border-box;
  }
  .modal-actions {
    position: sticky;
    bottom: 0;
    background: #fff;
    padding-top: 10px;
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    gap: 8px;
  }
  .modal-actions .ghost,
  .modal-actions .primary {
    flex: 1;
    min-height: 40px;
  }

  .primary,
  .ghost,
  .upload,
  .header-btn,
  .nav-btn {
    min-height: 40px;
  }
  .field input:not([type="checkbox"]):not([type="radio"]),
  .field textarea,
  .field select {
    font-size: 16px; /* 避免 iOS 聚焦放大 */
    min-height: 40px;
  }
  .field textarea { min-height: 96px; }
  .field input[type="checkbox"],
  .field input[type="radio"],
  .check input[type="checkbox"],
  .check input[type="radio"] {
    width: 18px;
    height: 18px;
    min-width: 18px;
    min-height: 18px;
  }
  .check-row {
    padding: 0 16px;
    margin-bottom: 12px;
  }
  .modal-card--form .field {
    margin-bottom: 12px;
  }
  .modal-head {
    padding: 12px 16px;
    margin-bottom: 10px;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 2;
  }

  .toast {
    left: 12px;
    right: 12px;
    transform: none;
    width: auto;
    text-align: center;
  }
}

@media (max-width: 420px) {
  .brand-name { max-width: 120px; }
  .header-user { display: none; }
}
