:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #edf3fb;
}

* { box-sizing: border-box; }

html,
body {
  margin: 0;
  min-width: 980px;
  height: 100%;
  overflow: hidden;
}

.demo-header {
  height: 68px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  padding: 0 24px;
  border-bottom: 1px solid #d7e3f3;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 8px 24px rgba(51, 81, 126, 0.08);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: max-content;
  color: #10192b;
  font-weight: 800;
  text-decoration: none;
}

.brand img { width: 34px; height: 34px; border-radius: 9px; }

.demo-state { display: flex; align-items: center; gap: 12px; }
.demo-state strong { color: #16213a; font-size: 16px; }
.demo-state span {
  padding: 6px 11px;
  border-radius: 999px;
  color: #1c8d4b;
  background: #ecfbf2;
  font-size: 12px;
  font-weight: 700;
}

.header-actions { justify-self: end; display: flex; gap: 10px; }
.header-actions a {
  padding: 9px 13px;
  border: 1px solid #d4e1f5;
  border-radius: 10px;
  color: #2f6bff;
  background: #fff;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.desktop-demo-stage {
  height: calc(100vh - 68px);
  padding: 12px;
}

.desktop-demo-frame-viewport {
  width: 100%;
  height: 100%;
  overflow: hidden;
  border: 1px solid #cbdcf1;
  border-radius: 18px;
  background: #eaf1fa;
  box-shadow: 0 20px 54px rgba(36, 67, 112, 0.14);
}

#desktopDemoFrame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #eaf1fa;
}

html.is-embedded,
html.is-embedded body {
  min-width: 0;
}

.is-embedded .demo-header {
  height: 56px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  padding: 0 12px;
}

.is-embedded .brand {
  gap: 7px;
  font-size: 14px;
  white-space: nowrap;
}

.is-embedded .brand img {
  width: 30px;
  height: 30px;
  border-radius: 8px;
}

.is-embedded .demo-state {
  min-width: 0;
  justify-content: center;
}

.is-embedded .demo-state strong {
  display: none;
}

.is-embedded .demo-state span {
  max-width: 100%;
  padding: 5px 9px;
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.is-embedded .header-actions {
  gap: 7px;
  white-space: nowrap;
}

.is-embedded .header-actions a {
  padding: 7px 9px;
  border-radius: 8px;
  font-size: 12px;
}

.is-embedded .desktop-demo-stage {
  height: calc(100vh - 56px);
  padding: 8px;
}

.is-embedded .desktop-demo-frame-viewport {
  border-radius: 14px;
}

.is-embedded #desktopDemoFrame {
  max-width: none;
  transform-origin: left top;
}

@media (max-width: 680px) {
  .is-embedded .demo-state {
    display: none;
  }

  .is-embedded .demo-header {
    grid-template-columns: 1fr auto;
  }
}
