* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  background:
    radial-gradient(900px 500px at 18% 0%, #eef2ec 0%, rgba(238, 242, 236, 0) 60%),
    radial-gradient(800px 500px at 100% 100%, #e7ede7 0%, rgba(231, 237, 231, 0) 55%),
    #e8ece6;
  color: #1c2420;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

.studio {
  min-height: 100vh;
  padding: 26px 40px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.studio-head {
  width: 100%;
  max-width: 1080px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.studio-eyebrow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: #17695a;
}

.studio-head h1 {
  margin: 6px 0 4px;
  font-size: 24px;
  letter-spacing: -0.03em;
  font-weight: 650;
}

.studio-head p {
  margin: 0;
  font-size: 12.5px;
  color: #748079;
}

.studio-tag {
  height: 26px;
  padding: 0 11px;
  border-radius: 999px;
  border: 1px solid #e3ddcd;
  background: #fbf6ea;
  color: #98702a;
  font-size: 11px;
  line-height: 24px;
  white-space: nowrap;
}

.studio-body {
  width: 100%;
  max-width: 1080px;
  margin-top: 18px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 38px;
}

.phone-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  flex: none;
}

.phone {
  position: relative;
  width: 375px;
  height: 812px;
  box-sizing: content-box;
  border: 10px solid #1a211d;
  border-radius: 54px;
  background: #1a211d;
  box-shadow:
    0 2px 0 rgba(255, 255, 255, 0.4) inset,
    0 40px 80px rgba(22, 34, 27, 0.26),
    0 6px 18px rgba(22, 34, 27, 0.14);
}

.phone::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 9px;
  width: 104px;
  height: 26px;
  transform: translateX(-50%);
  border-radius: 0 0 16px 16px;
  background: #1a211d;
  z-index: 12;
  pointer-events: none;
}

.phone-screen {
  position: relative;
  width: 375px;
  height: 812px;
  border-radius: 44px;
  overflow: hidden;
  background: #f5f6f2;
}

.phone-caption {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  color: #748079;
}

.dot-live {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #34a276;
  box-shadow: 0 0 0 3px rgba(52, 162, 118, 0.14);
}

/* Phone chrome */

.statusbar {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 44px;
  padding: 12px 22px 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  z-index: 9;
  pointer-events: none;
  color: #1b2420;
}

.status-time {
  font-size: 13.5px;
  font-weight: 650;
  letter-spacing: 0.01em;
}

.status-icons {
  display: flex;
  align-items: center;
  gap: 5px;
  padding-top: 2px;
}

.status-icons i {
  display: block;
}

.sig {
  width: 15px;
  height: 10px;
  background: linear-gradient(
    to right,
    #1b2420 0 2px,
    transparent 2px 4px,
    #1b2420 4px 6px,
    transparent 6px 8px,
    #1b2420 8px 10px,
    transparent 10px 12px,
    #1b2420 12px 15px
  );
  clip-path: polygon(0 70%, 100% 0, 100% 100%, 0 100%);
}

.wifi {
  width: 13px;
  height: 10px;
  border: 2px solid #1b2420;
  border-bottom-color: transparent;
  border-left-color: transparent;
  border-right-color: transparent;
  border-radius: 50%;
  transform: rotate(180deg);
}

.battery {
  width: 20px;
  height: 10px;
  border: 1.4px solid rgba(27, 36, 32, 0.7);
  border-radius: 3px;
  position: relative;
}

.battery::after {
  content: "";
  position: absolute;
  right: -3px;
  top: 2.5px;
  width: 2px;
  height: 4px;
  border-radius: 0 1px 1px 0;
  background: rgba(27, 36, 32, 0.55);
}

.battery::before {
  content: "";
  position: absolute;
  left: 1.5px;
  top: 1.5px;
  bottom: 1.5px;
  width: 12px;
  border-radius: 1px;
  background: #1b2420;
}

.wechat-capsule {
  position: absolute;
  top: 50px;
  right: 9px;
  width: 87px;
  height: 32px;
  border-radius: 16px;
  border: 1px solid rgba(27, 36, 32, 0.1);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  z-index: 10;
  pointer-events: none;
}

.capsule-dots {
  font-size: 13px;
  letter-spacing: 1px;
  line-height: 1;
  color: #1b2420;
}

.capsule-divider {
  width: 1px;
  height: 16px;
  background: rgba(27, 36, 32, 0.12);
}

.capsule-circle {
  width: 14px;
  height: 14px;
  border: 1.6px solid #1b2420;
  border-radius: 50%;
  position: relative;
}

.capsule-circle::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: #1b2420;
}

.mp-page-root {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  z-index: 2;
  background: #f5f6f2;
}

.mp-tabbar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 56px;
  display: none;
  background: #ffffff;
  border-top: 1px solid #edf0ec;
  z-index: 8;
}

.mp-tabbar.is-visible {
  display: flex;
}

.tab-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 10px;
  color: #8b948f;
  cursor: pointer;
  user-select: none;
}

.tab-item img {
  width: 22px;
  height: 22px;
  display: block;
}

.tab-item.is-active {
  color: #17695a;
  font-weight: 600;
}

.mp-toast {
  position: absolute;
  left: 50%;
  top: 96px;
  transform: translate(-50%, -8px);
  max-width: 280px;
  padding: 9px 15px;
  border-radius: 9px;
  background: rgba(20, 30, 25, 0.88);
  color: #ffffff;
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
  z-index: 30;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.mp-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.mp-modal {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 32px;
  background: rgba(18, 28, 23, 0.36);
  backdrop-filter: blur(2px);
}

.mp-modal.is-visible {
  display: flex;
}

.mp-dialog {
  width: 100%;
  max-width: 292px;
  border-radius: 15px;
  background: #ffffff;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(20, 30, 25, 0.24);
  animation: dialogIn 0.16s ease;
}

.mp-dialog-head {
  padding: 20px 20px 0;
  font-size: 15px;
  font-weight: 600;
  text-align: center;
}

.mp-dialog-body {
  padding: 9px 22px 18px;
  font-size: 12.5px;
  line-height: 1.65;
  color: #6c7770;
  text-align: center;
}

.mp-dialog-foot {
  display: flex;
  border-top: 1px solid #eef1ec;
}

.mp-dialog-foot button {
  flex: 1;
  height: 46px;
  border: 0;
  background: #ffffff;
  color: #55625a;
  font-size: 14px;
  cursor: pointer;
}

.mp-dialog-foot button + button {
  border-left: 1px solid #eef1ec;
  color: #17695a;
  font-weight: 600;
}

.mp-dialog-foot button.confirm-danger {
  color: #b84434;
}

.mp-loading {
  position: absolute;
  inset: 0;
  z-index: 45;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(18, 28, 23, 0.24);
}

.mp-loading.is-visible {
  display: flex;
}

.mp-loading-card {
  min-width: 120px;
  padding: 18px 20px;
  border-radius: 12px;
  background: rgba(20, 30, 25, 0.88);
  color: #ffffff;
  font-size: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.mp-loading-ring {
  width: 22px;
  height: 22px;
  border: 2.5px solid rgba(255, 255, 255, 0.28);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.mp-preview {
  position: absolute;
  inset: 0;
  z-index: 50;
  display: none;
  align-items: center;
  justify-content: center;
  background: #0b110e;
}

.mp-preview.is-visible {
  display: flex;
}

.mp-preview img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.mp-preview .close {
  position: absolute;
  right: 16px;
  top: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* QA */

.qa {
  width: 286px;
  flex: none;
  background: #ffffff;
  border: 1px solid #e1e7e1;
  border-radius: 18px;
  box-shadow: 0 18px 50px rgba(22, 34, 27, 0.08);
  padding: 18px;
  max-height: 690px;
  overflow: auto;
}

.qa-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 13px;
  border-bottom: 1px solid #eef1ec;
}

.qa-head strong {
  display: block;
  font-size: 13px;
}

.qa-head span {
  display: block;
  margin-top: 2px;
  font-size: 10px;
  color: #9aa49e;
  line-height: 1.5;
}

.qa-badge {
  flex: none;
  height: 20px;
  padding: 0 7px;
  border-radius: 5px;
  background: #eef4f0;
  color: #17695a !important;
  font-size: 9px !important;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 20px !important;
}

.qa-section {
  padding: 14px 0;
  border-bottom: 1px solid #f1f3f0;
}

.qa-section:last-of-type {
  border-bottom: 0;
}

.qa-label {
  margin-bottom: 9px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #98a29c;
  text-transform: uppercase;
}

.qa-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 0;
  font-size: 11.5px;
  color: #46534b;
  cursor: pointer;
}

.qa-row input {
  width: 13px;
  height: 13px;
  accent-color: #17695a;
}

.qa-note {
  margin: 8px 0 0;
  font-size: 10px;
  line-height: 1.55;
  color: #9aa49e;
}

.qa-btn {
  display: block;
  width: 100%;
  height: 34px;
  margin-top: 7px;
  border: 1px solid #e1e7e1;
  border-radius: 8px;
  background: #fbfcfa;
  color: #3c4a42;
  font-size: 11.5px;
  cursor: pointer;
  text-align: center;
}

.qa-btn:hover {
  background: #f4f7f3;
}

.qa-btn-danger {
  color: #a03a2a;
  border-color: #f0d9d4;
  background: #fdf7f5;
}

.qa-flow {
  margin: 0;
  padding-left: 16px;
  font-size: 11px;
  line-height: 1.8;
  color: #6c7770;
}

.qa-foot {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #eef1ec;
  font-size: 10px;
  line-height: 1.6;
  color: #9aa49e;
}

body.qa-hidden .qa {
  display: none;
}

body.qa-hidden .studio-body {
  justify-content: center;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes dialogIn {
  from {
    opacity: 0;
    transform: scale(0.97) translateY(4px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 1080px) {
  .studio {
    padding: 20px;
  }
  .studio-body {
    flex-direction: column;
    align-items: center;
  }
  .qa {
    width: 100%;
    max-width: 420px;
    max-height: none;
  }
}

.demo-leader .qa { display: none !important; }
.demo-leader .studio-body { grid-template-columns: minmax(0, 1fr); justify-items: center; }
