:root {
  --bg: #f6f8f7;
  --surface: #ffffff;
  --surface-soft: #eef7f3;
  --surface-warm: #fff8ed;
  --ink: #17211d;
  --muted: #66736d;
  --line: #dfe7e3;
  --primary: #178f6d;
  --primary-dark: #0c6e55;
  --primary-soft: #dff5ed;
  --blue: #3779c2;
  --amber: #c77919;
  --rose: #c75062;
  --shadow: 0 16px 44px rgba(30, 58, 48, 0.12);
  --radius: 8px;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
}

body.login-mode .app-shell {
  display: none;
}

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: linear-gradient(135deg, #eef7f3 0%, #fff8ed 100%);
}

.login-card {
  width: min(420px, 100%);
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.login-card .brand {
  padding: 0 0 22px;
  color: var(--ink);
}

.login-card .brand span {
  color: var(--muted);
}

.login-form {
  display: grid;
  gap: 14px;
}

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

.login-error {
  min-height: 20px;
  color: var(--rose);
  font-size: 13px;
}

.login-choice {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 8px !important;
  color: var(--muted) !important;
  font-size: 13px !important;
}

.login-choice input {
  width: 16px;
  height: 16px;
  margin: 0;
}

.login-connection {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 22px 16px;
  color: var(--ink);
  background: var(--surface);
  border-right: 1px solid var(--line);
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 6px 6px 24px;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  color: #12332a;
  background: #baf3dc;
  font-weight: 800;
}

.brand-logo {
  width: 82px;
  height: 56px;
  object-fit: contain;
  flex: 0 0 auto;
}

.brand strong,
.brand span {
  display: block;
}

.brand span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

.nav-list {
  display: grid;
  gap: 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  color: #40504a;
  background: transparent;
  text-align: left;
}

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

.nav-item svg,
button svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.nav-badge {
  min-width: 20px;
  margin-left: auto;
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--rose);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  text-align: center;
}

.sync-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 800;
}

.sync-status::before {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.sync-status[data-state="offline"] {
  background: #fff0f2;
  color: var(--rose);
}

.sync-status[data-state="reconnecting"] {
  background: var(--surface-warm);
  color: var(--amber);
}

.collaboration-notice,
.conflict-panel,
.collaboration-card {
  padding: 14px;
  border: 1px solid #f0d7a7;
  border-radius: var(--radius);
  background: var(--surface-warm);
}

.conflict-panel p,
.collaboration-card p {
  margin: 8px 0 0;
}

.conflict-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

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

.collaboration-grid span {
  color: var(--muted);
  font-size: 12px;
}

.collaboration-grid strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 14px;
}

.presence-note {
  color: var(--primary-dark);
  font-weight: 700;
}

.sidebar-note {
  position: absolute;
  right: 16px;
  bottom: 18px;
  left: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7fbf9;
}

.sidebar-support,
.login-support {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}

.sidebar-note span,
.sidebar-note strong {
  display: block;
}

.sidebar-note span {
  color: var(--muted);
  font-size: 12px;
}

.sidebar-note strong {
  margin-top: 4px;
  font-size: 14px;
}

.main {
  min-width: 0;
  padding: 24px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 13px;
}

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

h1 {
  margin-bottom: 0;
  font-size: 28px;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 14px;
  font-size: 18px;
}

h3 {
  margin-bottom: 8px;
  font-size: 15px;
}

.topbar-actions,
.toolbar,
.inline-actions,
.filter-row,
.form-grid,
.modal-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.date-pill,
.status-pill,
.tag,
.intent-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 700;
}

.date-pill {
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
}

.primary-button,
.secondary-button,
.ghost-button,
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-weight: 700;
}

.primary-button {
  padding: 0 14px;
  color: #ffffff;
  background: var(--primary);
}

.primary-button:hover {
  background: var(--primary-dark);
}

.secondary-button {
  padding: 0 14px;
  color: var(--primary-dark);
  background: var(--primary-soft);
  border-color: #c3eadc;
}

.ghost-button,
.icon-button {
  color: var(--ink);
  background: var(--surface);
  border-color: var(--line);
}

.ghost-button {
  padding: 0 12px;
}

.icon-button {
  width: 38px;
  padding: 0;
}

.page {
  display: none;
}

.page.active {
  display: block;
}

.grid {
  display: grid;
  gap: 16px;
}

.grid > * {
  min-width: 0;
}

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

.grid.two {
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
}

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

.panel,
.metric-card,
.event-card,
.ai-result,
.empty-state {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 1px 0 rgba(20, 35, 30, 0.03);
}

.panel {
  padding: 18px;
}

.metric-card {
  padding: 16px;
}

.metric-card span {
  color: var(--muted);
  font-size: 13px;
}

.metric-card strong {
  display: block;
  margin-top: 8px;
  font-size: 28px;
}

.metric-card small {
  color: var(--primary-dark);
  font-weight: 700;
}

.table-wrap {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 820px;
}

th,
td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
  font-size: 14px;
}

th {
  color: var(--muted);
  background: #f9fbfa;
  font-size: 12px;
  font-weight: 800;
}

tr:last-child td {
  border-bottom: 0;
}

.parent-cell strong,
.event-title strong {
  display: block;
}

.parent-cell span,
.event-title span,
.muted {
  color: var(--muted);
  font-size: 12px;
}

input,
select,
textarea {
  min-height: 38px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--ink);
  background: #ffffff;
}

textarea {
  min-height: 92px;
  resize: vertical;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.filter-row {
  margin-bottom: 14px;
}

.filter-row input {
  max-width: 260px;
}

.filter-row select {
  max-width: 170px;
}

.status-pill.status-new {
  color: #235d99;
  background: #e3f0ff;
}

.status-pill.status-contacted,
.status-pill.status-invited,
.status-pill.status-scheduled {
  color: #84510d;
  background: #fff0d8;
}

.status-pill.status-visited,
.status-pill.status-strong {
  color: #0f6a51;
  background: #dff5ed;
}

.status-pill.status-enrolled {
  color: #ffffff;
  background: var(--primary);
}

.status-pill.status-cold {
  color: #6f5a62;
  background: #f7e7ec;
}

.intent-pill {
  color: #175c74;
  background: #e0f3f8;
}

.intent-pill.high {
  color: #0f6a51;
  background: #dff5ed;
}

.intent-pill.low {
  color: #8a5414;
  background: #fff0d8;
}

.tag {
  color: var(--muted);
  background: #f1f4f3;
}

.funnel {
  display: grid;
  gap: 10px;
}

.funnel-row {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) 42px;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

.bar {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf1ef;
}

.bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), #55b7a1);
}

.timeline {
  display: grid;
  gap: 12px;
}

.timeline-item {
  padding-left: 14px;
  border-left: 3px solid var(--primary-soft);
}

.timeline-item strong {
  display: block;
  margin-bottom: 4px;
}

.content-audit-list {
  display: grid;
  gap: 8px;
}

.content-audit-item {
  display: grid;
  grid-template-columns: minmax(110px, 0.8fr) minmax(130px, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--primary-soft);
  border-radius: 10px;
  background: #fbfdfc;
}

.content-audit-action {
  color: var(--primary-dark);
  font-weight: 700;
}

.content-audit-item time {
  color: var(--muted);
  white-space: nowrap;
}

.event-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.event-card {
  padding: 16px;
}

.event-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 12px 0;
}

.event-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 12px 0;
}

.event-stats div {
  padding: 10px;
  border-radius: 8px;
  background: #f6f8f7;
}

.event-stats span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.event-stats strong {
  font-size: 20px;
}

.ai-layout {
  display: grid;
  grid-template-columns: minmax(300px, 380px) minmax(0, 1fr);
  gap: 16px;
}

.ai-result {
  padding: 18px;
  white-space: pre-wrap;
  line-height: 1.7;
}

.history-list {
  display: grid;
  gap: 10px;
}

.history-card {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfc;
}

.history-card strong {
  display: block;
  margin-bottom: 6px;
}

.acquisition-source-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.source-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfc;
}

.source-card-heading {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.source-card-heading h3,
.source-card p {
  margin: 0;
}

.source-card p {
  min-height: 42px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.source-icon {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 8px;
  color: var(--primary-dark);
  background: var(--primary-soft);
}

.source-icon svg {
  width: 18px;
  height: 18px;
}

.source-url {
  display: grid;
  gap: 4px;
  padding: 10px;
  border-radius: 8px;
  background: #f1f4f3;
}

.source-url span {
  color: var(--muted);
  font-size: 12px;
}

.source-url code {
  overflow-wrap: anywhere;
  color: var(--primary-dark);
  font-size: 12px;
}

.source-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.source-card-footer > span {
  color: var(--muted);
  font-size: 13px;
}

.source-card-footer strong {
  color: var(--ink);
  font-size: 18px;
}

.acquisition-table td:first-child strong,
.acquisition-table td:first-child .muted {
  display: block;
}

.lead-insight {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid #bfe3d3;
  border-radius: 8px;
  background: #f4fbf7;
}

.lead-insight h3,
.lead-insight h4,
.lead-insight p {
  margin: 0;
}

.lead-insight h4 {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
}

.visitor-profile {
  display: flex;
  align-items: center;
  gap: 10px;
}

.visitor-avatar {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  background: #477b68;
  font-weight: 800;
}

.visitor-avatar-image {
  object-fit: cover;
  background: #ffffff;
}

.visitor-profile strong,
.visitor-profile span {
  display: block;
}

.visitor-profile > div > span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.lead-insight-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
}

.lead-insight-summary > div {
  min-width: 0;
  padding: 10px;
  border-radius: 8px;
  background: #ffffff;
}

.lead-insight-summary span,
.lead-insight-summary strong {
  display: block;
}

.lead-insight-summary span {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 12px;
}

.lead-insight-summary strong {
  overflow-wrap: anywhere;
  font-size: 14px;
}

.lead-insight-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.lead-insight-evidence {
  padding-top: 2px;
}

.lead-insight-videos {
  padding-top: 2px;
}

.video-click-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.video-click-list span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 8px;
  border: 1px solid #c9ddd3;
  border-radius: 6px;
  color: #3f5149;
  background: #ffffff;
  font-size: 12px;
}

.video-click-list svg {
  width: 14px;
  height: 14px;
}

.lead-insight-evidence ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 20px;
  color: #3f5149;
  font-size: 13px;
  line-height: 1.5;
}

.follow-up-plan {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid #c9ddd3;
  border-radius: 8px;
  background: #ffffff;
  line-height: 1.65;
}

.follow-up-plan-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.follow-up-plan-grid > div {
  min-width: 0;
  padding: 10px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.follow-up-plan-grid strong {
  font-size: 12px;
}

.follow-up-plan-grid p {
  margin-top: 5px;
  color: #3f5149;
  font-size: 13px;
}

.talk-script {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.talk-script > div {
  min-width: 0;
}

.talk-script p {
  margin-top: 4px;
  color: #3f5149;
  white-space: pre-wrap;
}

.talk-script .ghost-button {
  flex: 0 0 auto;
}

.lead-insight-empty {
  padding: 14px;
  border: 1px dashed #c7d8d0;
  border-radius: 8px;
  color: var(--muted);
  background: #ffffff;
  line-height: 1.6;
}

.modal-root {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(11, 24, 20, 0.42);
  z-index: 20;
}

.modal-root.open {
  display: flex;
}

.modal {
  width: min(780px, 100%);
  max-height: min(88vh, 900px);
  overflow: auto;
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.modal-header,
.modal-body,
.modal-actions {
  padding: 18px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
}

.modal-header h2 {
  margin-bottom: 2px;
}

.modal-body {
  display: grid;
  gap: 16px;
}

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

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.form-grid .full {
  grid-column: 1 / -1;
}

.empty-state {
  padding: 24px;
  text-align: center;
  color: var(--muted);
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  transform: translateY(18px);
  opacity: 0;
  pointer-events: none;
  padding: 12px 14px;
  border-radius: 8px;
  color: #ffffff;
  background: #17372f;
  box-shadow: var(--shadow);
  transition: 0.18s ease;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    padding: 14px;
  }

  .brand {
    padding-bottom: 12px;
  }

  .nav-list {
    grid-template-columns: repeat(6, minmax(86px, 1fr));
    overflow-x: auto;
  }

  .sidebar-note {
    display: none;
  }

  .main {
    padding: 18px;
  }

  .topbar,
  .grid.two,
  .ai-layout {
    grid-template-columns: 1fr;
    display: grid;
  }

  .grid.metrics,
  .grid.three,
  .event-list,
  .acquisition-source-grid,
  .lead-insight-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  body {
    overflow-x: hidden;
  }

  .main {
    padding: 14px;
  }

  .topbar-actions,
  .toolbar,
  .filter-row {
    align-items: stretch;
  }

  .topbar-actions > *,
  .filter-row > *,
  .toolbar > * {
    width: 100%;
    max-width: none;
  }

  .grid.metrics,
  .grid.three,
  .event-list,
  .acquisition-source-grid,
  .lead-insight-summary,
  .lead-insight-details,
  .follow-up-plan-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .talk-script {
    display: grid;
  }

  .nav-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: visible;
  }

  .nav-item {
    min-width: 0;
  }

  h1 {
    font-size: 24px;
  }

  .content-audit-item {
    grid-template-columns: 1fr auto;
    gap: 5px 10px;
  }

  .content-audit-item time {
    grid-column: 1 / -1;
  }
}

/* Parent QR landing page */
.consult-form[hidden],
.privacy-note[hidden],
.success-panel[hidden] {
  display: none;
}

.parent-page {
  min-width: 320px;
  color: #1c2922;
  background:
    radial-gradient(circle at 12% 12%, rgba(255, 238, 28, 0.1), transparent 22%),
    radial-gradient(circle at 88% 10%, rgba(22, 153, 201, 0.1), transparent 24%),
    #f7fbfb;
}

.parent-page main {
  width: min(100%, 760px);
  margin: 0 auto;
}

.mini-program-shell {
  min-height: calc(100vh - 37px);
  padding: 18px 18px 24px;
}

.parent-hero {
  position: relative;
  min-height: calc(100vh - 82px);
  overflow: hidden;
  color: #263238;
  background: #ffffff;
  border: 1px solid #dceff1;
  border-radius: 8px;
  box-shadow: 0 18px 50px rgba(48, 184, 193, 0.14);
}

.internal-demo-banner {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 9px 18px;
  color: #40504a;
  background: #fff8ed;
  border-bottom: 1px solid #eadcc8;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
}

.parent-hero-image {
  position: absolute;
  inset: 168px 0 0;
  opacity: 0.78;
  background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(18, 69, 72, 0.58)), url("https://images.unsplash.com/photo-1560785496-3c9d27877182?auto=format&fit=crop&w=1400&q=82");
  background-position: center;
  background-size: cover;
}

.parent-hero-content {
  position: relative;
  display: flex;
  min-height: calc(100vh - 82px);
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 26px 24px 36px;
}

.parent-brand,
.source-label,
.wechat-demo,
.privacy-note,
.parent-primary-button,
.parent-detail-button,
.video-card {
  display: inline-flex;
  align-items: center;
}

.parent-brand {
  gap: 24px;
  margin-bottom: auto;
  color: #30363a;
  font-size: 24px;
  font-weight: 800;
}

.parent-brand-logo {
  width: 168px;
  height: 116px;
  object-fit: contain;
  border-radius: 8px;
  background: #ffffff;
}

.parent-brand-mark {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 8px;
  color: #1b4b3d;
  background: #d9f4e9;
}

.source-label {
  min-height: 26px;
  margin: 0 0 12px;
  padding: 0 9px;
  border: 1px solid rgba(50, 184, 193, 0.28);
  border-radius: 999px;
  color: #1699c9;
  background: rgba(245, 251, 252, 0.94);
  font-size: 12px;
  font-weight: 700;
}

.internal-demo-pill {
  min-height: 26px;
  margin: 0 0 8px;
  padding: 0 9px;
  border-radius: 999px;
  color: #1b4b3d;
  background: rgba(217, 244, 233, 0.92);
  font-size: 12px;
  font-weight: 800;
}

.parent-hero h1 {
  max-width: 560px;
  margin: 0 0 14px;
  color: #ffffff;
  text-shadow: 0 2px 18px rgba(11, 45, 46, 0.28);
  font-size: 38px;
  line-height: 1.18;
}

.hero-copy {
  max-width: 510px;
  margin-bottom: 22px;
  color: #f7ffff;
  font-size: 15px;
  line-height: 1.7;
}

.philosophy-card {
  max-width: 520px;
  margin: 0 0 22px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 8px;
  color: #263238;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 12px 28px rgba(18, 69, 72, 0.14);
}

.philosophy-card span {
  display: block;
  margin-bottom: 8px;
  color: #1699c9;
  font-size: 12px;
  font-weight: 800;
}

.philosophy-card strong {
  display: block;
  line-height: 1.58;
  font-size: 15px;
}

.hero-menu {
  width: min(100%, 540px);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.hero-menu button {
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.56);
  border-radius: 8px;
  color: #263238;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 22px rgba(18, 69, 72, 0.12);
  font-weight: 800;
  text-align: left;
}

.hero-menu button:hover,
.hero-menu button:focus-visible {
  border-color: #32b8c1;
  background: #f5fbfc;
}

.hero-menu svg {
  width: 20px;
  height: 20px;
  color: #1699c9;
}

.parent-primary-button,
.parent-secondary-button {
  min-height: 46px;
  gap: 8px;
  padding: 0 16px;
  border-radius: 8px;
  font-weight: 800;
  text-decoration: none;
}

.parent-primary-button {
  border: 1px solid #32b8c1;
  color: #ffffff;
  background: linear-gradient(135deg, #32b8c1 0%, #1699c9 100%);
  box-shadow: 0 12px 24px rgba(22, 153, 201, 0.22);
}

.parent-primary-button:hover,
.parent-primary-button:focus-visible {
  background: linear-gradient(135deg, #1699c9 0%, #32b8c1 100%);
}

.parent-secondary-button {
  border: 1px solid #cceef1;
  color: #30363a;
  background: #ffffff;
}

.parent-section {
  min-height: calc(100vh - 82px);
  padding: 32px 22px;
  border: 1px solid #dceff1;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 18px 50px rgba(48, 184, 193, 0.1);
}

.parent-section-soft {
  background: linear-gradient(180deg, #ffffff 0%, #f5fbfc 100%);
}

.parent-section-warm {
  background: linear-gradient(180deg, #ffffff 0%, #fff8fb 100%);
}

.parent-step {
  display: none;
}

.parent-step-active {
  display: block;
}

.parent-hero.parent-step-active {
  display: block;
}

.step-actions {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  margin-top: 24px;
}

.step-actions .parent-primary-button,
.step-actions .parent-secondary-button {
  flex: 1;
}

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

.section-heading > p:first-child {
  margin-bottom: 7px;
  color: #1699c9;
  font-size: 13px;
  font-weight: 800;
}

.section-heading h2 {
  margin-bottom: 8px;
  font-size: 25px;
  line-height: 1.32;
}

.section-heading h2 + p {
  margin: 0;
  color: #5e6d65;
  line-height: 1.65;
}

.story-grid,
.teacher-list,
.daily-flow,
.video-list,
.consult-form {
  display: grid;
  gap: 12px;
}

.feature-grid,
.activity-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.story-card {
  position: relative;
  display: flex;
  min-height: 180px;
  overflow: hidden;
  align-items: flex-end;
  padding: 16px;
  border: 1px solid rgba(26, 56, 45, 0.1);
  border-radius: 8px;
  color: #ffffff;
  background-color: #5a8876;
  background-position: center;
  background-size: cover;
}

.story-card::before {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(180deg, transparent 35%, rgba(15, 39, 31, 0.7));
}

.story-card > div {
  position: relative;
  z-index: 1;
}

.story-card span,
.video-card > span:not(.video-play) {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
  font-weight: 800;
}

.story-card strong,
.video-card strong {
  display: block;
  line-height: 1.4;
}

.story-classroom { background-image: url("https://images.unsplash.com/photo-1607453998774-d533f65dac99?auto=format&fit=crop&w=900&q=80"); }
.story-outdoor { background-image: url("https://images.unsplash.com/photo-1596464716127-f2a82984de30?auto=format&fit=crop&w=900&q=80"); }
.story-nap { background-image: url("https://images.unsplash.com/photo-1503454537195-1dcabb73ffb9?auto=format&fit=crop&w=900&q=80"); }
.story-paint { background-image: url("https://images.unsplash.com/photo-1560421683-6856ea585c78?auto=format&fit=crop&w=900&q=80"); }
.story-explore { background-image: url("https://images.unsplash.com/photo-1558060370-d644479cb6f7?auto=format&fit=crop&w=900&q=80"); }
.story-birthday { background-image: url("https://images.unsplash.com/photo-1464349153735-7db50ed83c84?auto=format&fit=crop&w=900&q=80"); }

.sample-carousel {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(238px, 74%);
  gap: 13px;
  margin-right: -22px;
  margin-left: -2px;
  overflow-x: auto;
  padding: 2px 22px 8px 2px;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}

.sample-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #dceff1;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 12px 26px rgba(48, 184, 193, 0.08);
  scroll-snap-align: start;
}

.sample-media-slot {
  position: relative;
  min-height: 190px;
  display: flex;
  align-items: flex-end;
  padding: 13px;
  color: #ffffff;
  background-color: #5a8876;
  background-position: center;
  background-size: cover;
}

.sample-media-slot::before {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(180deg, rgba(18, 69, 72, 0.08), rgba(18, 69, 72, 0.68));
}

.sample-media-slot span {
  position: relative;
  z-index: 1;
  font-size: 12px;
  font-weight: 800;
}

.sample-card-body {
  display: grid;
  gap: 9px;
  padding: 14px;
}

.sample-card-body h3 {
  margin: 0;
  font-size: 17px;
}

.sample-card-body p {
  margin: 0;
  color: #617066;
  font-size: 13px;
  line-height: 1.55;
}

.campus-classroom .sample-media-slot { background-image: url("https://images.unsplash.com/photo-1607453998774-d533f65dac99?auto=format&fit=crop&w=760&q=82"); }
.campus-outdoor .sample-media-slot { background-image: url("https://images.unsplash.com/photo-1596464716127-f2a82984de30?auto=format&fit=crop&w=760&q=82"); }
.campus-function .sample-media-slot { background-image: url("https://images.unsplash.com/photo-1596464716127-f2a82984de30?auto=format&fit=crop&w=760&q=82"); background-position: 42% center; }
.campus-entry .sample-media-slot { background-image: url("https://images.unsplash.com/photo-1577896851231-70ef18881754?auto=format&fit=crop&w=760&q=82"); }
.activity-theme .sample-media-slot { background-image: url("https://images.unsplash.com/photo-1604881991720-f91add269bed?auto=format&fit=crop&w=760&q=82"); }
.activity-nature .sample-media-slot { background-image: url("https://images.unsplash.com/photo-1558060370-d644479cb6f7?auto=format&fit=crop&w=760&q=82"); }
.activity-festival .sample-media-slot { background-image: url("https://images.unsplash.com/photo-1464349153735-7db50ed83c84?auto=format&fit=crop&w=760&q=82"); }
.activity-open-day .sample-media-slot { background-image: url("https://images.unsplash.com/photo-1560785496-3c9d27877182?auto=format&fit=crop&w=760&q=82"); }
.activity-foreign .sample-media-slot { background-image: url("https://images.unsplash.com/photo-1602030028438-4cf153cbae9e?auto=format&fit=crop&w=760&q=82"); }

.section-video-button {
  margin-top: 10px;
}

.feature-grid .story-card:first-child,
.activity-grid .story-card:first-child {
  grid-column: 1 / -1;
  min-height: 230px;
}

.facility-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.care-module-list {
  display: grid;
  gap: 14px;
}

.care-module-card {
  display: grid;
  grid-template-columns: 138px minmax(0, 1fr);
  min-height: 178px;
  overflow: hidden;
  border: 1px solid #dceff1;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 12px 26px rgba(48, 184, 193, 0.08);
}

.care-media-slot {
  position: relative;
  min-height: 178px;
  display: flex;
  align-items: flex-end;
  padding: 12px;
  color: #ffffff;
  background-position: center;
  background-size: cover;
}

.care-media-slot::before {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(180deg, rgba(18, 69, 72, 0.08), rgba(18, 69, 72, 0.62));
}

.care-media-slot span {
  position: relative;
  z-index: 1;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
}

.care-media-meal { background-image: url("https://images.unsplash.com/photo-1606787366850-de6330128bfc?auto=format&fit=crop&w=520&q=78"); }
.care-media-nap { background-image: url("https://images.unsplash.com/photo-1505693416388-ac5ce068fe85?auto=format&fit=crop&w=520&q=78"); }
.care-media-pickup { background-image: url("https://images.unsplash.com/photo-1558904541-efa843a96f01?auto=format&fit=crop&w=520&q=78"); }
.care-media-clean { background-image: url("https://images.unsplash.com/photo-1585421514738-01798e348b17?auto=format&fit=crop&w=520&q=78"); }
.care-media-feedback { background-image: linear-gradient(135deg, #f5fbfc 0%, #fff8ed 100%); color: #30363a; }
.care-media-feedback::before { background: linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(50, 184, 193, 0.16)); }

.care-module-body {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 10px;
  padding: 15px;
}

.care-module-heading {
  display: flex;
  align-items: center;
  gap: 8px;
}

.care-module-heading svg {
  width: 21px;
  height: 21px;
  color: #32b8c1;
}

.care-module-heading h3 {
  margin: 0;
  font-size: 16px;
}

.care-module-body p {
  margin: 0;
  color: #617066;
  font-size: 13px;
  line-height: 1.55;
}

.care-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.care-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  color: #1699c9;
  background: #edf9fa;
  font-size: 11px;
  font-weight: 800;
}

.care-video-button {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 6px;
  min-height: 32px;
  margin-top: auto;
  padding: 0 10px;
  border: 1px solid #32b8c1;
  border-radius: 8px;
  color: #ffffff;
  background: #32b8c1;
  font-size: 12px;
  font-weight: 800;
}

.care-video-button svg {
  width: 15px;
  height: 15px;
}

.care-video-button.ghost-video {
  color: #1699c9;
  background: #ffffff;
}

.mini-play-button {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 5px;
  min-height: 28px;
  padding: 0 9px;
  border: 1px solid #cceef1;
  border-radius: 8px;
  color: #1699c9;
  background: #ffffff;
  font-size: 12px;
  font-weight: 800;
}

.mini-play-button svg {
  width: 13px;
  height: 13px;
}

.compact-card {
  min-height: 154px;
  align-items: flex-start;
  flex-direction: column;
  color: #25372f;
  background: #ffffff;
}

.compact-card::before { display: none; }
.compact-card svg { width: 25px; height: 25px; color: #32b8c1; }
.compact-card h3 { margin: auto 0 5px; font-size: 15px; }
.compact-card p { margin: 0; color: #617066; font-size: 13px; line-height: 1.5; }

.parent-detail-button {
  gap: 6px;
  margin-top: 16px;
  padding: 0;
  border: 0;
  color: #1699c9;
  background: transparent;
  font-size: 14px;
  font-weight: 800;
}

.parent-detail-button svg { width: 17px; height: 17px; }
.detail-copy { margin: 12px 0 0; color: #526159; line-height: 1.7; }

.teacher-story-panel {
  overflow: hidden;
  border: 1px solid #dceff1;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 12px 26px rgba(48, 184, 193, 0.08);
}

.teacher-story-media {
  min-height: 230px;
  display: flex;
  align-items: flex-end;
  padding: 16px;
  color: #ffffff;
  background-image: linear-gradient(180deg, rgba(18, 69, 72, 0.08), rgba(18, 69, 72, 0.68)), url("https://images.unsplash.com/photo-1604881991720-f91add269bed?auto=format&fit=crop&w=900&q=82");
  background-position: center;
  background-size: cover;
}

.teacher-story-media span {
  font-size: 12px;
  font-weight: 800;
}

.teacher-story-copy {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.teacher-story-copy > span {
  color: #1699c9;
  font-size: 12px;
  font-weight: 800;
}

.teacher-story-copy h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.35;
}

.teacher-story-copy p {
  margin: 0;
  color: #617066;
  line-height: 1.6;
}

.team-role-list {
  margin-top: 12px;
}

.teacher-card {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid #e2e9e4;
  border-radius: 8px;
  background: #ffffff;
}

.teacher-avatar {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  font-weight: 800;
}

.teacher-avatar-one { background: #d07154; }
.teacher-avatar-two { background: #5586a5; }
.teacher-avatar-three { background: #a7784d; }
.teacher-avatar-four { background: #8f7cb7; }
.teacher-avatar svg { width: 19px; height: 19px; }
.teacher-card h3 { margin-bottom: 4px; }
.teacher-card p { margin: 0; color: #65736b; font-size: 13px; line-height: 1.5; }
.teacher-role { color: #1699c9; font-size: 12px; font-weight: 800; }

.team-proof-note {
  margin: 12px 0 0;
  padding: 12px;
  border: 1px solid #dceff1;
  border-radius: 8px;
  color: #526159;
  background: #f5fbfc;
  font-size: 13px;
  line-height: 1.65;
}

.daily-flow article {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid #f0dfc5;
}

.daily-flow article:last-child { border-bottom: 0; }
.daily-flow span { color: #b46a1d; font-size: 13px; font-weight: 800; }
.daily-flow h3 { margin-bottom: 5px; }
.daily-flow p { margin: 0; color: #6e665b; font-size: 14px; line-height: 1.55; }

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

.video-card {
  position: relative;
  min-height: 240px;
  overflow: hidden;
  align-items: flex-start;
  flex-direction: column;
  justify-content: flex-end;
  padding: 14px;
  border: 0;
  border-radius: 8px;
  color: #ffffff;
  background-color: #426f5d;
  background-position: center;
  background-size: cover;
  text-align: left;
}

.video-card::before {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(180deg, rgba(12, 39, 29, 0.06), rgba(12, 39, 29, 0.8));
}

.video-card > * { position: relative; z-index: 1; }
.video-morning { background-image: url("https://images.unsplash.com/photo-1604881991720-f91add269bed?auto=format&fit=crop&w=700&q=80"); }
.video-teacher { background-image: url("https://images.unsplash.com/photo-1602030028438-4cf153cbae9e?auto=format&fit=crop&w=700&q=80"); }
.video-openday { background-image: url("https://images.unsplash.com/photo-1560785496-3c9d27877182?auto=format&fit=crop&w=700&q=80"); }
.video-card.watched::after { position: absolute; top: 12px; right: 12px; z-index: 2; content: "已浏览"; padding: 4px 6px; border-radius: 4px; background: #32b8c1; font-size: 11px; font-weight: 800; }

.video-play {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  margin-bottom: auto;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: #176e57;
}

.video-play svg { width: 17px; height: 17px; fill: currentColor; }
.wechat-demo { gap: 7px; margin: 16px 0 0; color: #5d6c64; font-size: 12px; line-height: 1.5; }
.wechat-demo svg, .privacy-note svg { width: 17px; height: 17px; flex: 0 0 auto; color: #178f6d; }

.consultation-section { background: linear-gradient(180deg, #ffffff 0%, #f5fbfc 100%); }

.consult-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 16px;
  border: 1px solid #cce8db;
  border-radius: 8px;
  background: #ffffff;
}

.consult-form label { color: #526159; }
.consult-notes, .consult-submit { grid-column: 1 / -1; }
.consult-submit { width: 100%; justify-content: center; }
.privacy-note { gap: 7px; margin: 14px 0 0; color: #5a6c62; font-size: 12px; line-height: 1.55; }

.success-panel {
  display: flex;
  gap: 12px;
  margin-top: 16px;
  padding: 18px;
  border: 1px solid #bde4d2;
  border-radius: 8px;
  color: #145740;
  background: #ffffff;
}

.success-panel > svg { width: 30px; height: 30px; flex: 0 0 auto; color: #32b8c1; }
.success-panel h3 { margin-bottom: 5px; font-size: 18px; }
.success-panel p { margin: 0; color: #526159; line-height: 1.65; }

.content-hero-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 132px;
  gap: 18px;
  align-items: stretch;
  margin-top: 18px;
  padding: 18px;
  border: 1px solid #cce8db;
  border-radius: 8px;
  background: linear-gradient(135deg, #f7fcfb 0%, #fff7f0 100%);
}

.content-hero-summary h3 {
  margin: 10px 0 8px;
  color: var(--ink);
  font-size: 24px;
}

.content-hero-summary p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.content-status {
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #ffffff;
  text-align: center;
}

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

.content-status strong {
  color: var(--primary);
  font-size: 18px;
}

.content-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.content-summary-card {
  min-height: 128px;
  padding: 16px;
  border: 1px solid #e3efea;
  border-radius: 8px;
  background: #ffffff;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.content-summary-card:hover,
.content-summary-card:focus-visible {
  border-color: #32b8c1;
  box-shadow: 0 12px 28px rgba(48, 184, 193, 0.12);
  transform: translateY(-1px);
  outline: none;
}

.content-summary-card span {
  color: var(--primary);
  font-size: 13px;
  font-weight: 800;
}

.content-summary-card strong {
  display: block;
  margin-top: 8px;
  color: var(--ink);
}

.content-summary-card p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.content-summary-card em {
  display: inline-flex;
  margin-top: 10px;
  color: #1699c9;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.content-sync-status {
  display: grid;
  gap: 4px;
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 8px;
  border: 1px solid #d8e8e3;
  background: #f8fbfa;
}

.content-sync-status strong {
  color: var(--ink);
}

.content-sync-status span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.content-sync-status.ok {
  border-color: #bde4d2;
  background: #f3fbf7;
}

.content-sync-status.ok strong {
  color: #176e57;
}

.content-sync-status.fail {
  border-color: #f1c1b8;
  background: #fff6f3;
}

.content-sync-status.fail strong {
  color: #b14f3d;
}

.content-hero-form,
.content-module-editor,
.content-json-details {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid #e2efea;
  border-radius: 8px;
  background: #ffffff;
}

.content-module-editor {
  scroll-margin-top: 18px;
}

.content-module-details {
  padding: 0;
  overflow: hidden;
}

.content-module-details > summary,
.content-item-details > summary {
  list-style: none;
}

.content-module-details > summary::-webkit-details-marker,
.content-item-details > summary::-webkit-details-marker {
  display: none;
}

.content-module-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px;
  cursor: pointer;
  user-select: none;
}

.content-module-summary p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.content-module-summary > span {
  flex: 0 0 auto;
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 800;
}

.content-module-summary > span::before {
  margin-right: 5px;
  content: "＋";
}

.content-module-details[open] > .content-module-summary > span::before { content: "－"; }

.content-module-body {
  padding: 0 18px 18px;
  border-top: 1px solid #edf3f1;
}

.content-module-highlight {
  border-color: #32b8c1;
  box-shadow: 0 0 0 4px rgba(50, 184, 193, 0.12);
}

.content-hero-form h3,
.content-module-editor h3 {
  margin: 0;
}

.content-module-heading,
.content-item-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.content-module-heading span,
.content-item-heading span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.content-item-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.content-item-editor {
  min-width: 0;
  container: content-card / inline-size;
  padding: 0;
  overflow: hidden;
  border: 1px solid #e6efec;
  border-radius: 8px;
  background: #fbfefd;
}

.content-item-details[open] {
  grid-column: 1 / -1;
}

.content-item-summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  cursor: pointer;
  user-select: none;
}

.content-item-summary > div { min-width: 0; }

.content-item-summary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.content-item-summary strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
}

.content-item-summary p {
  overflow: hidden;
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.content-item-summary .content-item-status {
  flex: 0 0 auto;
  padding: 5px 8px;
  border-radius: 999px;
  color: var(--primary-dark);
  background: var(--primary-soft);
}

.content-item-body {
  padding: 14px;
  border-top: 1px solid #edf3f1;
}

.content-item-controls {
  display: flex;
  justify-content: flex-end;
}

.content-item-heading {
  align-items: flex-start;
  padding-bottom: 12px;
  border-bottom: 1px solid #edf3f1;
}

.content-item-heading strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
}

.content-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.content-toggle input {
  width: auto;
}

.content-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.content-form-grid .full {
  grid-column: 1 / -1;
}

.content-form-grid > *,
.content-gallery-editor,
.content-media-actions {
  min-width: 0;
}

.content-form-grid textarea {
  min-height: 76px;
}

.content-form-grid textarea.content-copy-field {
  box-sizing: border-box;
  height: 64px;
  min-height: 64px;
  max-height: 120px;
  overflow-y: auto;
  resize: vertical;
}

.content-copy-field + small {
  color: var(--muted);
  font-weight: 500;
  line-height: 1.5;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.content-media-field,
.content-video-config {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid #e4efeb;
  border-radius: 8px;
  background: #ffffff;
}

.content-media-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.content-upload-button {
  cursor: pointer;
}

.content-upload-button.is-disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.content-preview-link.disabled {
  pointer-events: none;
  opacity: 0.48;
}

.content-image-preview {
  width: 100%;
  max-height: 190px;
  object-fit: cover;
  border: 1px solid #dceff1;
  border-radius: 8px;
  background: #f5fbfc;
}

.content-video-config {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.content-video-config .full {
  grid-column: 1 / -1;
}

.content-json-details summary {
  cursor: pointer;
  color: var(--primary);
  font-weight: 800;
}

.content-json-editor {
  width: 100%;
  min-height: 560px;
  margin-top: 16px;
  padding: 16px;
  border: 1px solid #d9e8e2;
  border-radius: 8px;
  background: #fbfefd;
  color: #21312c;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  line-height: 1.55;
  resize: vertical;
}

.content-json-editor[readonly] {
  background: #f4f7f6;
  color: #6b7874;
}

.list-view-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.list-view-tabs button {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface);
  font-weight: 800;
  cursor: pointer;
}

.list-view-tabs button.active {
  border-color: var(--primary);
  color: #ffffff;
  background: var(--primary);
}

.list-refresh-notice {
  width: 100%;
  margin-bottom: 14px;
  padding: 10px 14px;
  border: 1px solid #f0d7a7;
  border-radius: 8px;
  color: #76510f;
  background: var(--surface-warm);
  font-weight: 800;
  cursor: pointer;
}

.list-primary-filters input {
  flex: 1 1 280px;
  max-width: 460px;
}

.advanced-filters {
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.advanced-filters summary {
  color: var(--primary-dark);
  font-weight: 800;
  cursor: pointer;
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.filter-checkbox {
  display: flex;
  align-items: center;
  align-self: end;
  min-height: 38px;
  flex-direction: row;
}

.filter-checkbox input {
  width: 18px;
  min-height: 18px;
}

.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.pagination-bar label {
  display: flex;
  align-items: center;
  flex-direction: row;
}

.pagination-bar select {
  width: 72px;
}

.assignee-cell strong,
.assignee-cell span {
  display: block;
}

.assignee-cell span,
.field-hint {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.analytics-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 14px 0;
}

.analytics-summary-grid > section,
.storage-status {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.storage-status {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.storage-status.warning,
.storage-status.critical {
  border-color: #e0a84b;
  background: var(--surface-warm);
}

.storage-status p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.storage-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.storage-metrics span {
  color: var(--muted);
  font-size: 12px;
}

.storage-metrics strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 15px;
}

.footprint-list {
  display: grid;
  gap: 14px;
}

.footprint-card {
  padding: 16px;
  border: 1px solid #dceff1;
  border-radius: 8px;
  background: linear-gradient(135deg, #ffffff 0%, #f8fefd 58%, #fff7f4 100%);
}

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

.footprint-card .lead-insight-summary {
  margin-top: 10px;
}

.footprint-card .lead-insight-details {
  margin-top: 12px;
}

@media (max-width: 760px) {
  .footprint-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .filter-grid,
  .analytics-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .storage-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pagination-bar {
    justify-content: flex-start;
  }
}

@media (max-width: 460px) {
  .filter-grid,
  .analytics-summary-grid,
  .storage-metrics {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 621px) {
  .parent-hero-content { padding-right: 48px; padding-left: 48px; }
  .parent-section { padding: 56px 48px; }
  .sample-carousel { grid-auto-columns: minmax(260px, 58%); margin-right: -48px; padding-right: 48px; }
  .story-grid.feature-grid { grid-template-columns: 1.5fr 1fr 1fr; }
  .feature-grid .story-card:first-child { grid-column: auto; min-height: 280px; }
  .facility-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .teacher-story-panel { display: grid; grid-template-columns: 1.05fr 1fr; }
  .teacher-story-media { min-height: 260px; }
}

@media (max-width: 460px) {
  .parent-hero { min-height: 510px; }
  .parent-hero-content { min-height: 510px; }
  .parent-brand { gap: 14px; font-size: 18px; }
  .parent-brand-logo { width: 126px; height: 88px; }
  .parent-hero h1 { font-size: 30px; }
  .parent-section { padding: 40px 18px; }
  .care-module-card { grid-template-columns: 1fr; }
  .care-media-slot { min-height: 148px; }
  .video-list, .consult-form { grid-template-columns: 1fr; }
  .content-hero-summary, .content-summary-grid { grid-template-columns: 1fr; }
  .content-item-grid, .content-form-grid { grid-template-columns: 1fr; }
  .content-video-config { grid-template-columns: 1fr; }
  .video-card { min-height: 180px; }
  .teacher-card { grid-template-columns: 44px minmax(0, 1fr); }
  .teacher-role { grid-column: 2; }
}

.content-gallery-editor {
  display: grid;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-soft);
}
.content-gallery-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.content-gallery-toolbar .content-media-actions { flex: 0 1 auto; }
.content-gallery-count {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  padding: 7px 11px;
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface);
  font-size: 13px;
  white-space: nowrap;
}
.content-gallery-count strong {
  color: var(--primary-dark);
  font-size: 15px;
}
.content-order-help {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}
.content-order-help svg { flex: 0 0 auto; }
.content-gallery-images,
.content-gallery-image-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  min-width: 0;
}
.content-gallery-image {
  display: grid;
  align-content: start;
  gap: 9px;
  min-width: 0;
  padding: 9px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: var(--surface);
  transition: border-color 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
}
.content-gallery-image.is-primary { border-color: #bfe6d9; }
.content-gallery-image:has(.content-image-details[open]) { grid-column: span 2; }
.content-gallery-image.is-hidden,
.content-gallery-image:has([data-content-image-field="enabled"]:not(:checked)) { opacity: 0.64; }
.content-gallery-image.is-dragging { opacity: 0.48; }
.content-gallery-image.is-drag-target {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}
.content-image-preview {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border-radius: 10px;
  background: var(--surface-soft);
}
.content-image-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.content-image-preview-badges {
  position: absolute;
  top: 7px;
  left: 7px;
  right: 46px;
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}
.content-position-badge,
.content-status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 999px;
  color: #fff;
  background: rgb(20 54 46 / 78%);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  backdrop-filter: blur(4px);
}
.content-status-badge {
  display: none;
  background: rgb(91 99 96 / 82%);
}
.content-gallery-image.is-hidden .content-status-badge,
.content-gallery-image:has([data-content-image-field="enabled"]:not(:checked)) .content-status-badge { display: inline-flex; }
.content-image-card-summary {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 0 2px;
}
.content-image-card-summary strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.content-image-card-summary small {
  color: var(--muted);
  font-size: 11px;
}
.content-image-details {
  min-width: 0;
  border-top: 1px solid var(--line);
}
.content-image-details summary {
  padding: 9px 2px 2px;
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  user-select: none;
}
.content-image-details[open] summary { margin-bottom: 9px; }
.content-image-editor-body {
  display: grid;
  gap: 11px;
  min-width: 0;
}
.content-image-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.content-drag-handle {
  position: absolute;
  top: 7px;
  right: 7px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid rgb(255 255 255 / 58%);
  border-radius: 8px;
  color: #fff;
  background: rgb(20 54 46 / 72%);
  cursor: grab;
  user-select: none;
  backdrop-filter: blur(4px);
}
.content-drag-handle:active { cursor: grabbing; }
.content-drag-handle[data-disabled="true"] { cursor: default; opacity: 0.55; }
.content-image-actions { flex-wrap: wrap; }
.content-image-actions .secondary-button {
  min-height: 34px;
  padding: 0 11px;
  font-size: 12px;
}
.content-image-actions svg { width: 14px; height: 14px; }
.content-visibility-toggle {
  display: inline-flex;
  width: fit-content;
  cursor: pointer;
}
.content-visibility-toggle > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--muted);
  background: var(--surface);
  font-size: 12px;
  font-weight: 700;
}
.content-visibility-toggle svg { width: 14px; height: 14px; }
.content-visibility-when-hidden { display: none !important; }
.content-visibility-toggle:has(input:not(:checked)) .content-visibility-when-visible { display: none; }
.content-visibility-toggle:has(input:not(:checked)) .content-visibility-when-hidden { display: inline-flex !important; }
.content-visibility-toggle:has(input:disabled) { cursor: default; opacity: 0.55; }

.parent-dynamic-gallery { display: flex; gap: 10px; overflow-x: auto; padding: 0; }
.parent-dynamic-gallery figure { min-width: min(82%, 320px); margin: 0; }
.parent-dynamic-gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 14px; }
.parent-dynamic-gallery figcaption { padding: 6px 2px; color: var(--muted); font-size: 13px; }
.parent-dynamic-video { display: grid; gap: 14px; padding: 18px; }
.parent-dynamic-video > img { width: 100%; max-height: 280px; object-fit: cover; border-radius: 14px; }

@container content-card (max-width: 520px) {
  .content-gallery-image-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .content-gallery-image:has(.content-image-details[open]) { grid-column: span 2; }
  .content-gallery-toolbar { align-items: flex-start; }
}

@container content-card (max-width: 390px) {
  .content-gallery-editor { padding: 10px; }
  .content-gallery-image-grid { gap: 8px; }
  .content-gallery-image { padding: 7px; }
  .content-image-actions .secondary-button { flex: 1 1 auto; }
}
