* {
  box-sizing: border-box;
}

:root {
  color-scheme: light;
  --bg: #f5f7fb;
  --ink: #15171d;
  --muted: #6b7280;
  --subtle: #8b95a5;
  --primary: #2354e6;
  --primary-dark: #173fc2;
  --line: #e6eaf2;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --shadow: 0 20px 56px rgba(17, 24, 39, 0.12);
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

button {
  font: inherit;
}

[hidden] {
  display: none !important;
}

.wechat-open-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  min-height: calc(72px + env(safe-area-inset-top));
  padding: calc(10px + env(safe-area-inset-top)) 10px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  background: rgba(245, 247, 251, 0.98);
  backdrop-filter: saturate(180%) blur(14px);
}

.wechat-open-info {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.wechat-open-icon {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border-radius: 10px;
  border: 1px solid rgba(35, 84, 230, 0.12);
  background: #ffffff;
  object-fit: cover;
}

.wechat-open-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.wechat-open-copy strong,
.wechat-open-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wechat-open-copy strong {
  color: var(--ink);
  font-size: 17px;
  line-height: 1.15;
  font-weight: 800;
}

.wechat-open-copy span {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.2;
}

#wechatTopLaunchApp {
  display: block;
  width: 80px;
  min-height: 44px;
  flex: 0 0 80px;
}

body.wechat-open-bar-visible .page-shell {
  padding-top: calc(90px + env(safe-area-inset-top));
}

.page-shell {
  min-height: 100vh;
  padding: max(18px, env(safe-area-inset-top)) 14px max(18px, env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  justify-content: center;
}

.store-panel {
  width: min(100%, 1100px);
  min-height: min(760px, calc(100vh - 36px));
  padding: 22px 18px 24px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.app-summary {
  position: relative;
  z-index: 2;
}

.app-identity {
  display: flex;
  align-items: center;
  gap: 14px;
}

.app-icon {
  width: 76px;
  height: 76px;
  flex: 0 0 76px;
  border-radius: 19px;
  overflow: hidden;
  background: #eef2ff;
  border: 1px solid rgba(35, 84, 230, 0.12);
  box-shadow: 0 10px 24px rgba(35, 84, 230, 0.14);
}

.app-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.app-copy {
  min-width: 0;
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--primary);
  font-size: 13px;
  line-height: 1.2;
  font-weight: 700;
}

h1 {
  margin: 0;
  font-size: 30px;
  line-height: 1.12;
  letter-spacing: 0;
}

.slogan {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
}

.summary {
  margin: 20px 0 0;
  color: #384152;
  font-size: 17px;
  line-height: 1.7;
}

.meta-strip {
  margin: 20px 0 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface-soft);
  overflow: hidden;
}

.meta-strip div {
  min-width: 0;
  padding: 13px 8px;
  text-align: center;
}

.meta-strip div + div {
  border-left: 1px solid var(--line);
}

.meta-strip strong,
.meta-strip span {
  display: block;
  overflow-wrap: anywhere;
}

.meta-strip strong {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.25;
  font-weight: 800;
}

.meta-strip span {
  margin-top: 5px;
  color: var(--subtle);
  font-size: 12px;
  line-height: 1.25;
}

.notice {
  margin: 18px 0 0;
  padding: 12px 14px;
  border: 1px solid #c8d5ff;
  border-radius: 14px;
  background: #f4f7ff;
  color: var(--primary-dark);
  font-size: 14px;
  line-height: 1.55;
}

.actions {
  margin-top: 22px;
  display: grid;
  gap: 10px;
}

.wechat-launch-wrapper {
  width: 100%;
  min-height: 52px;
}

wx-open-launch-app {
  display: block;
  width: 100%;
  min-height: 52px;
}

.primary-button,
.secondary-button,
.link-button,
.action-link {
  width: 100%;
  min-height: 52px;
  border-radius: 14px;
  cursor: pointer;
}

.action-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-sizing: border-box;
}

.primary-button {
  border: 0;
  color: #ffffff;
  font-weight: 800;
  background: var(--primary);
  box-shadow: 0 12px 24px rgba(35, 84, 230, 0.24);
}

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

.secondary-button {
  color: var(--primary);
  font-weight: 800;
  background: #ffffff;
  border: 1px solid #c8d5ff;
}

.link-button {
  min-height: 42px;
  color: var(--muted);
  border: 0;
  background: transparent;
}

.primary-button:disabled,
.secondary-button:disabled {
  cursor: not-allowed;
  color: #8d96a8;
  background: #edf1f7;
  box-shadow: none;
}

.status-text {
  margin: 12px 0 0;
  min-height: 22px;
  color: var(--muted);
  text-align: center;
  font-size: 13px;
  line-height: 1.55;
}

.screenshots {
  margin-top: 26px;
  display: grid;
  grid-template-columns: 0.86fr 1fr 0.86fr;
  align-items: end;
  gap: 10px;
}

.phone-preview {
  margin: 0;
  position: relative;
  aspect-ratio: 1242 / 2688;
  border-radius: 22px;
  background: #eef2ff;
  border: 6px solid #111827;
  box-shadow: 0 14px 34px rgba(17, 24, 39, 0.16);
  overflow: hidden;
}

.phone-preview img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.phone-preview-main {
  transform: translateY(0);
}

.phone-preview-side {
  opacity: 0.96;
  transform: translateY(26px);
}

@media (max-width: 360px) {
  .store-panel {
    padding: 18px 14px 20px;
    border-radius: 20px;
  }

  .app-icon {
    width: 68px;
    height: 68px;
    flex-basis: 68px;
  }

  h1 {
    font-size: 27px;
  }

  .summary {
    font-size: 16px;
  }

  .screenshots {
    gap: 8px;
  }

  .phone-preview {
    border-width: 5px;
    border-radius: 18px;
  }
}

@media (min-width: 760px) {
  .page-shell {
    padding: 32px;
  }

  .store-panel {
    min-height: 620px;
    padding: 44px;
    display: grid;
    grid-template-columns: minmax(320px, 0.86fr) minmax(430px, 1.14fr);
    gap: 44px;
    align-items: center;
  }

  .app-icon {
    width: 96px;
    height: 96px;
    flex-basis: 96px;
    border-radius: 23px;
  }

  h1 {
    font-size: 42px;
  }

  .slogan {
    font-size: 16px;
  }

  .summary {
    max-width: 430px;
    font-size: 18px;
  }

  .actions {
    max-width: 360px;
  }

  .status-text {
    max-width: 360px;
    text-align: left;
  }

  .screenshots {
    margin: 0;
    grid-template-columns: 0.7fr 1fr 0.7fr;
    gap: 16px;
  }

  .phone-preview {
    border-radius: 28px;
    border-width: 7px;
  }

  .phone-preview-main {
    z-index: 2;
  }

  .phone-preview-advice {
    transform: translate(44px, 28px);
  }

  .phone-preview-device {
    transform: translate(-44px, 28px);
  }
}
