:root {
  --bg: #eef5ff;
  --surface: #ffffff;
  --line: #dbe7f7;
  --text: #172033;
  --muted: #6b7890;
  --blue: #176bff;
  --blue-dark: #0e4dcc;
  --blue-soft: #eaf2ff;
  --green: #18a058;
  --orange: #d46b08;
  --shadow: 0 22px 60px rgba(20, 56, 112, 0.14);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 12%, rgba(23, 107, 255, 0.17), transparent 34%),
    linear-gradient(135deg, #eef5ff 0%, #f8fbff 45%, #e8f0ff 100%);
  color: var(--text);
}

button,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.client-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(380px, 438px) minmax(340px, 580px);
  gap: 52px;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
}

.phone-frame {
  width: min(100%, 420px);
  max-height: calc(100vh - 80px);
  overflow: auto;
  background: #f7faff;
  border: 12px solid #10223f;
  border-radius: 42px;
  box-shadow: var(--shadow);
  padding: 18px;
}

.phone-frame::-webkit-scrollbar {
  width: 0;
}

.client-top {
  min-height: 138px;
  margin: -18px -18px 14px;
  padding: 34px 22px 22px;
  border-radius: 28px 28px 22px 22px;
  background: linear-gradient(135deg, #0d5bdb, #1f7dff);
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
}

.client-top p,
.section-head p,
.merchant-card p,
.side-panel p,
.url-item span,
.map-preview small,
.preference-list span,
.qr-lock-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.client-top p {
  color: rgba(255, 255, 255, 0.78);
}

.client-top h1 {
  margin: 6px 0 0;
  font-size: 25px;
  line-height: 1.2;
}

.client-top span {
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 12px;
  white-space: nowrap;
}

.merchant-card,
.qr-lock-card,
.section-card,
.result-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: 0 12px 30px rgba(22, 64, 125, 0.06);
}

.merchant-card {
  display: flex;
  align-items: center;
  gap: 13px;
}

.merchant-cover {
  width: 64px;
  height: 64px;
  flex: 0 0 auto;
  border-radius: 18px;
  background: linear-gradient(135deg, #d9e8ff, #f7fbff);
  display: grid;
  place-items: center;
}

.merchant-cover span {
  width: 42px;
  height: 42px;
  border-radius: 15px;
  background: var(--blue);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 18px;
}

.merchant-card h2,
.section-head h3,
.side-panel h2 {
  margin: 0;
}

.merchant-card h2 {
  font-size: 18px;
}

.qr-lock-card {
  background:
    linear-gradient(135deg, rgba(23, 107, 255, 0.08), rgba(255, 255, 255, 0.92)),
    #fff;
}

.qr-lock-card span {
  display: inline-flex;
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
}

.qr-lock-card strong {
  display: block;
  margin: 10px 0 5px;
  font-size: 18px;
}

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

.section-head span {
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
}

.section-head select {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px 10px;
  background: #fff;
  color: var(--text);
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
}

.photo-grid button,
.photo-grid span {
  aspect-ratio: 1;
  border: 1px dashed #b8cceb;
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(23, 107, 255, 0.12), transparent),
    #f6f9ff;
}

.photo-grid button {
  color: var(--blue);
  font-size: 28px;
  font-weight: 300;
}

.photo-grid span:nth-child(2) {
  background: linear-gradient(135deg, #f7dfc3, #fff7ed);
}

.photo-grid span:nth-child(3) {
  background: linear-gradient(135deg, #cfe4ff, #eff7ff);
}

.photo-grid span:nth-child(4) {
  background: linear-gradient(135deg, #d6f3e4, #f6fffa);
}

.vision-tags,
.template-list,
.poi-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.vision-tags span,
.template-list button,
.poi-list span {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: #3a4a61;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 800;
}

.vision-tags span {
  background: var(--blue-soft);
  border-color: transparent;
  color: var(--blue);
}

.template-list button.active {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.poi-list span {
  border-radius: 14px;
  background: #f8fbff;
  line-height: 1.4;
}

.poi-list b {
  color: var(--blue);
}

.map-preview {
  min-height: 126px;
  border-radius: 18px;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.84), rgba(255, 255, 255, 0.72)),
    repeating-linear-gradient(45deg, #dcecff 0 10px, #eef6ff 10px 20px);
  border: 1px solid #cfe0f5;
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 14px;
}

.map-preview span {
  display: inline-flex;
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
}

.map-preview strong {
  display: block;
  margin: 10px 0 4px;
  font-size: 17px;
}

.map-preview a,
.generate-btn,
.result-card button,
.console-link {
  border: 0;
  border-radius: 14px;
  background: var(--blue);
  color: #fff;
  padding: 11px 14px;
  text-decoration: none;
  font-weight: 800;
  white-space: nowrap;
}

.preference-list {
  display: grid;
  gap: 9px;
}

.preference-list div {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #f8fbff;
}

.preference-list strong {
  display: block;
  margin-top: 4px;
  line-height: 1.5;
}

.generate-btn {
  width: 100%;
  min-height: 52px;
  margin-bottom: 12px;
  font-size: 17px;
  box-shadow: 0 14px 28px rgba(23, 107, 255, 0.24);
}

.result-card {
  display: none;
}

.result-card.visible {
  display: block;
}

.result-card button {
  background: #0e1d35;
  padding: 8px 11px;
}

.result-card article {
  margin-top: 10px;
  border-radius: 16px;
  background: #f8fbff;
  border: 1px solid var(--line);
  padding: 14px;
  color: #2f3d52;
  line-height: 1.75;
  white-space: pre-wrap;
}

.client-side {
  align-self: stretch;
  display: flex;
  align-items: center;
}

.side-panel {
  width: 100%;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(193, 211, 238, 0.72);
  border-radius: 30px;
  box-shadow: var(--shadow);
  padding: 28px;
}

.side-panel h2 {
  font-size: 28px;
}

.side-panel p {
  margin-top: 10px;
  font-size: 15px;
}

.url-item {
  margin-top: 16px;
  padding: 16px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid var(--line);
}

.url-item strong {
  display: block;
  margin-top: 6px;
  word-break: break-all;
}

.demo-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.demo-links a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 11px;
  border-radius: 999px;
  color: var(--blue);
  background: var(--blue-soft);
  text-decoration: none;
  font-size: 13px;
  font-weight: 800;
}

.console-link {
  display: inline-flex;
  margin-top: 18px;
}

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

  .phone-frame {
    justify-self: center;
    max-height: none;
  }

  .client-side {
    align-self: auto;
  }
}

@media (max-width: 480px) {
  .client-shell {
    padding: 0;
  }

  .phone-frame {
    width: 100%;
    min-height: 100vh;
    max-height: none;
    border: 0;
    border-radius: 0;
  }

  .client-top {
    border-radius: 0 0 24px 24px;
  }

  .client-side {
    display: none;
  }
}
