:root {
  color-scheme: light;
  --black: #070808;
  --black-soft: #121417;
  --ink: #171717;
  --muted: #6d7074;
  --line: #e6e6e6;
  --line-dark: rgba(255, 255, 255, 0.16);
  --yellow: #ffd400;
  --yellow-deep: #f2bd00;
  --white: #ffffff;
  --panel: #f7f7f5;
  --danger: #d64545;
  --ok: #1b9c54;
  --shadow: 0 18px 42px rgba(18, 18, 18, 0.11);
  --content: min(1760px, calc(100vw - 96px));
  font-family: "HarmonyOS Sans SC", "Microsoft YaHei UI", "PingFang SC", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background: #fff;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  display: inline-block;
  width: 1em;
  height: 1em;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon--button {
  width: 17px;
  height: 17px;
}

.page-shell {
  overflow: hidden;
  background: #fff;
}

.site-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto minmax(260px, 1fr);
  align-items: center;
  gap: 28px;
  width: 100%;
  padding: 22px 44px;
  color: #f4f4f2;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0));
}

/* 独立页面（如个人中心）的头部：参与文档流 + 深色实底，不再悬浮于 hero 渐变上 */
.site-header--page {
  position: static;
  background: #0d0f11;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand__logo {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.brand strong {
  overflow: hidden;
  font-size: 16px;
  font-weight: 900;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(20px, 3.5vw, 58px);
}

.site-nav a {
  position: relative;
  padding: 10px 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
  font-weight: 800;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 0;
  height: 3px;
  border-radius: 999px;
  background: var(--yellow);
  transform: translateX(-50%);
  transition: width 180ms ease;
}

.site-nav a:hover,
.site-nav a.is-active {
  color: var(--yellow);
}

.site-nav a:hover::after,
.site-nav a.is-active::after {
  width: 24px;
}

.header-actions {
  display: flex;
  justify-content: flex-end;
  gap: 14px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 30px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease,
    color 180ms ease;
}

.button--yellow {
  color: #0b0b0b;
  background: linear-gradient(180deg, var(--yellow), var(--yellow-deep));
  box-shadow: 0 14px 30px rgba(255, 212, 0, 0.26);
}

.button--yellow:hover {
  transform: translateY(-1px);
  background: #ffe15a;
}

.button--ghost {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.42);
  background: rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(10px);
}

.button--ghost:hover {
  border-color: var(--yellow);
  color: var(--yellow);
}

.button--small {
  min-height: 34px;
  padding: 0 22px;
  font-size: 13px;
}

.button--header-download {
  min-height: 36px;
  padding: 0 18px;
  border-color: rgba(255, 212, 0, 0.7);
  box-shadow: none;
}

.button--header-download:hover {
  box-shadow: 0 10px 22px rgba(255, 212, 0, 0.18);
}

.button.is-disabled {
  color: #8f8f8f;
  pointer-events: none;
  background: #2a2a2a;
  border-color: #3b3b3b;
  box-shadow: none;
}

.hero {
  position: relative;
  min-height: 386px;
  color: #fff;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.96) 0%, rgba(0, 0, 0, 0.82) 43%, rgba(0, 0, 0, 0.22) 100%),
    repeating-linear-gradient(168deg, rgba(255, 255, 255, 0.12) 0 2px, transparent 2px 26px),
    linear-gradient(110deg, #050606, #191b1d 48%, #57534a 100%);
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto -10% -44px 44%;
  height: 140px;
  pointer-events: none;
  background: linear-gradient(95deg, transparent, rgba(255, 212, 0, 0.16), rgba(255, 255, 255, 0.4), transparent);
  filter: blur(14px);
  transform: rotate(-5deg);
}

.hero__content {
  position: relative;
  z-index: 2;
  width: var(--content);
  margin: 0 auto;
  padding: 114px 0 42px;
}

.hero h1 {
  max-width: 780px;
  margin: 0;
  font-size: clamp(30px, 2.5vw, 46px);
  font-weight: 950;
  line-height: 1.24;
  letter-spacing: 0;
}

.hero h1 span {
  display: block;
  margin-top: 5px;
  color: var(--yellow);
  font-size: clamp(34px, 3vw, 54px);
}

.hero__lead {
  max-width: 560px;
  margin: 16px 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.62;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 20px;
}

.hero__marks {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
  font-weight: 800;
}

.hero__marks li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.hero__marks .icon {
  width: 14px;
  height: 14px;
  color: var(--yellow);
}

.hero__media {
  position: absolute;
  top: 80px;
  right: 0;
  bottom: 0;
  z-index: 0;
  width: min(920px, 56vw);
  margin: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  mask-image: linear-gradient(90deg, transparent 0%, #000 17%, #000 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 17%, #000 100%);
}

.hero__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center right;
}

.section-light {
  background: #fff;
}

.section-title {
  width: var(--content);
  margin: 0 auto;
  text-align: center;
}

.section-title h2,
.workflow h2,
.workbench__copy h2,
.scenarios h2,
.pricing__title,
.testimonials h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 950;
  line-height: 1.2;
}

.section-title h2::after,
.workflow h2::after,
.scenarios h2::after,
.pricing__title::after,
.testimonials h2::after {
  content: "";
  display: block;
  width: 32px;
  height: 3px;
  margin: 8px auto 0;
  border-radius: 999px;
  background: var(--yellow);
}

.capabilities {
  padding: 12px 0 12px;
}

.capability-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 24px;
  width: var(--content);
  margin: 20px auto 0;
}

.capability-card {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 16px;
  min-height: 168px;
  padding: 22px 18px 18px;
  border: 1px solid #efefef;
  border-radius: 4px;
  background: linear-gradient(180deg, #fff, #f7f7f7);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.06);
}

.capability-card__icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  color: var(--yellow-deep);
}

.capability-card__icon .icon {
  width: 42px;
  height: 42px;
  stroke-width: 1.8;
}

.capability-card strong {
  display: block;
  font-size: 16px;
  font-weight: 950;
}

.capability-card p {
  margin: 16px 0 0;
  color: #4d4f52;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.68;
}

.ratio-list,
.tool-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.ratio-list span,
.tool-list span {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 7px;
  border: 1px solid #d7d7d7;
  border-radius: 3px;
  color: #3d3d3d;
  font-size: 12px;
  font-weight: 800;
  background: #fff;
}

/* 原生滚动条收窄淡化，与右侧刻度轨道视觉统一 */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #f0f1f2;
}

::-webkit-scrollbar-thumb {
  border-radius: 5px;
  background: #c9cbcd;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--yellow-deep);
}

html {
  scrollbar-width: thin;
  scrollbar-color: #c9cbcd #f0f1f2;
}

.side-nav {
  position: fixed;
  top: 0;
  right: 0;
  /* 底部让给悬浮客服按钮，轨道止于按钮上方 */
  bottom: 96px;
  z-index: 40;
  width: 96px;
  pointer-events: none;
}

.side-nav__track,
.side-nav__progress {
  position: absolute;
  top: 0;
  right: 20px;
  width: 2px;
}

.side-nav__track {
  bottom: 0;
  background: rgba(128, 130, 133, 0.35);
}

.side-nav__progress {
  height: 0;
  background: var(--yellow);
  box-shadow: 0 0 6px rgba(255, 212, 0, 0.55);
}

.side-nav a {
  position: absolute;
  right: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  pointer-events: auto;
  text-decoration: none;
  transform: translateY(-50%);
}

.side-nav__label {
  color: #8b8d90;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  transition: color 0.18s ease;
}

.side-nav__tick {
  width: 12px;
  height: 2px;
  flex: 0 0 auto;
  border-radius: 1px;
  background: #b9babc;
  transition: background-color 0.18s ease, width 0.18s ease;
}

.side-nav a:hover .side-nav__label,
.side-nav a:focus-visible .side-nav__label {
  color: #3c3e41;
}

.side-nav a.is-active .side-nav__label {
  color: var(--yellow-deep);
}

.side-nav a.is-active .side-nav__tick {
  width: 18px;
  background: var(--yellow);
}

@media (max-width: 640px) {
  .side-nav {
    bottom: 78px;
    width: 74px;
  }

  .side-nav__track,
  .side-nav__progress {
    right: 14px;
  }

  .side-nav a {
    right: 4px;
    gap: 4px;
  }

  .side-nav__label {
    font-size: 9px;
  }

  .side-nav__tick {
    width: 9px;
  }

  .side-nav a.is-active .side-nav__tick {
    width: 13px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .side-nav__label,
  .side-nav__tick {
    transition: none;
  }
}

.promo-video__frame {
  position: relative;
  width: min(960px, 92vw);
  margin: 8px auto 0;
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  overflow: hidden;
  background: #060708;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.18);
}

.promo-video__poster {
  position: absolute;
  inset: 0;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.promo-video__poster img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.promo-video__play {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: var(--yellow);
  color: #060708;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  transform: translate(-50%, -50%);
  transition: transform 0.18s ease;
}

.promo-video__poster:hover .promo-video__play,
.promo-video__poster:focus-visible .promo-video__play {
  transform: translate(-50%, -50%) scale(1.08);
}

.promo-video__play-icon {
  width: 32px;
  height: 32px;
  margin-left: 4px;
  fill: currentColor;
  stroke: none;
}

.promo-video__iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.promo-video__hint {
  margin: 14px 0 0;
  color: #6a6d70;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.workflow {
  width: var(--content);
  margin: 0 auto;
  padding: 10px 0 26px;
  border-top: 1px solid #eeeeee;
}

.workflow h2,
.scenarios h2 {
  text-align: left;
}

.workflow h2::after,
.scenarios h2::after {
  margin-left: 0;
}

.workflow-strip {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 22px;
  align-items: start;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.workflow-strip li {
  position: relative;
  min-width: 0;
  padding-left: 54px;
}

.workflow-strip li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 18px;
  left: calc(100% - 18px);
  width: 38px;
  height: 1px;
  background: #b6a35b;
}

.workflow-strip span {
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: #111;
  font-weight: 950;
  background: var(--yellow);
}

.workflow-strip strong,
.workflow-strip em {
  display: block;
}

.workflow-strip strong {
  overflow-wrap: anywhere;
  font-size: 13px;
  font-weight: 950;
}

.workflow-strip em {
  margin-top: 8px;
  color: #777;
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
  line-height: 1.45;
}

.workbench {
  display: grid;
  grid-template-columns: 330px 1fr;
  gap: 32px;
  width: var(--content);
  margin: 0 auto;
  padding: 10px 0 22px;
  border-top: 1px solid #eeeeee;
}

.workbench__copy p {
  margin: 10px 0 0;
  color: #676a6e;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.6;
}

.workbench-list {
  display: grid;
  gap: 18px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.workbench-list li {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  min-height: 44px;
}

.workbench-list__icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 2px solid rgba(255, 212, 0, 0.48);
  border-radius: 50%;
  color: var(--yellow-deep);
  background: linear-gradient(180deg, rgba(255, 212, 0, 0.16), rgba(255, 212, 0, 0.04)), #fff;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.06);
}

.workbench-list__icon .icon {
  width: 22px;
  height: 22px;
  color: currentColor;
  stroke-width: 2.1;
}

.workbench-list__copy strong,
.workbench-list__copy span {
  display: block;
}

.workbench-list__copy strong {
  font-size: 14px;
  font-weight: 950;
}

.workbench-list__copy span {
  margin-top: 5px;
  color: #777;
  font-size: 12px;
  font-weight: 700;
}

.workbench__screens {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 30px;
  align-items: end;
}

.workbench__screens img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 7px;
  object-fit: cover;
  box-shadow: var(--shadow);
  background: #111;
}

.workbench__screens img:first-child {
  aspect-ratio: 1916 / 972;
}

.workbench__screens img:last-child {
  aspect-ratio: 1920 / 955;
}

.scenarios {
  width: var(--content);
  margin: 0 auto;
  padding: 2px 0 26px;
}

.scene-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 24px;
  margin-top: 16px;
}

.scene-card {
  overflow: hidden;
  min-width: 0;
  border-radius: 4px;
  color: #fff;
  background: #111;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.14);
}

.scene-card__media {
  position: relative;
  display: block;
  aspect-ratio: 16 / 8.4;
  overflow: hidden;
  background: #222;
}

.scene-card__media::after {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  background: linear-gradient(180deg, transparent 50%, rgba(0, 0, 0, 0.18));
}

.scene-card__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.scene-card strong,
.scene-card p {
  display: block;
  margin: 0;
  padding: 0 16px;
}

.scene-card strong {
  padding-top: 10px;
  font-size: 15px;
  font-weight: 950;
}

.scene-card p {
  padding-bottom: 13px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 12px;
  font-weight: 700;
}

.pricing {
  position: relative;
  overflow: hidden;
  padding: 42px 0 46px;
  color: #fff;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0)),
    linear-gradient(115deg, #060708 0%, #12161b 48%, #070808 100%);
}

.pricing__inner {
  position: relative;
  z-index: 1;
  width: var(--content);
  margin: 0 auto;
}

.pricing__heading {
  display: grid;
  gap: 10px;
  max-width: 760px;
}

.pricing__heading p {
  max-width: 690px;
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.7;
}

.pricing__title::after {
  margin-left: 0;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-top: 28px;
}

.pricing__help {
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.62);
  font-size: 14px;
  font-weight: 750;
}

.pricing__help-link {
  padding: 0;
  color: var(--yellow);
  border: 0;
  background: none;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.pricing-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 456px;
  padding: 24px 24px 26px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 7px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.105), rgba(255, 255, 255, 0.035)),
    rgba(8, 10, 12, 0.86);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.24);
}

.pricing-card--featured {
  border-color: rgba(255, 212, 0, 0.9);
  box-shadow:
    0 0 0 1px rgba(255, 212, 0, 0.24),
    0 24px 54px rgba(0, 0, 0, 0.32);
}

.pricing-card__badge {
  position: absolute;
  top: 18px;
  right: 18px;
  min-height: 26px;
  padding: 0 12px;
  color: #090909;
  border-radius: 4px;
  background: var(--yellow);
  font-size: 12px;
  font-weight: 950;
  line-height: 26px;
}

.pricing-card__term {
  color: var(--yellow);
  font-size: 13px;
  font-weight: 900;
}

.pricing-card h3 {
  margin: 12px 0 0;
  font-size: 30px;
  font-weight: 950;
  line-height: 1.1;
}

.pricing-card p {
  min-height: 48px;
  margin: 14px 0 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.65;
}

.pricing-card__price {
  display: grid;
  gap: 7px;
  margin-top: 18px;
  padding: 18px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.pricing-card__price strong {
  color: #fff;
  font-size: 25px;
  font-weight: 950;
  line-height: 1.1;
}

.pricing-card__price span {
  color: rgba(255, 255, 255, 0.52);
  font-size: 12px;
  font-weight: 800;
}

.pricing-card__features {
  display: grid;
  gap: 12px;
  margin: 20px 0 24px;
  padding: 0;
  list-style: none;
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
  font-weight: 800;
}

.pricing-card__features li {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.pricing-card__features .icon {
  width: 15px;
  height: 15px;
  color: var(--yellow);
}

.pricing-card__status {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  margin-top: auto;
  padding: 0 14px;
  color: var(--yellow);
  border: 1px solid rgba(255, 212, 0, 0.58);
  border-radius: 5px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 950;
  background: rgba(255, 212, 0, 0.06);
  cursor: pointer;
}

.pricing-card__status:hover,
.pricing-card__status:focus-visible {
  color: #090909;
  background: var(--yellow);
}

.pricing-modal[hidden] {
  display: none;
}

.pricing-modal {
  position: fixed;
  inset: 0;
  /* 客服弹窗可从其他弹窗内触发，需保持最顶层 */
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 24px;
}

.pricing-modal__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.72);
  cursor: pointer;
}

.pricing-modal__panel {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  width: min(100%, 360px);
  padding: 24px;
  color: #fff;
  text-align: center;
  border: 1px solid rgba(255, 212, 0, 0.72);
  border-radius: 7px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04)),
    #111418;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.48);
}

.pricing-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  color: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.pricing-modal__close:hover,
.pricing-modal__close:focus-visible {
  color: #090909;
  background: var(--yellow);
  border-color: var(--yellow);
}

.pricing-modal__panel h3 {
  margin: 6px 0 0;
  font-size: 24px;
  font-weight: 950;
}

.pricing-modal__panel p {
  margin: 10px 0 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: 14px;
  font-weight: 750;
  line-height: 1.6;
}

.pricing-modal__panel .pricing-modal__group {
  margin: 2px 0 18px;
}

.pricing-modal__group strong {
  color: var(--yellow);
}

.pricing-modal__panel .pricing-modal__meta {
  margin-top: 14px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 12px;
}

.pricing-modal__panel img {
  display: block;
  width: min(100%, 240px);
  height: auto;
  border-radius: 6px;
  background: #fff;
}

/* 手机号验证码登录弹窗 */
.login-modal[hidden] {
  display: none;
}

.login-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-modal__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.72);
  cursor: pointer;
}

.login-modal__panel {
  position: relative;
  z-index: 1;
  width: min(100%, 380px);
  padding: 24px;
  color: #fff;
  text-align: left;
  border: 1px solid rgba(255, 212, 0, 0.72);
  border-radius: 7px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04)),
    #111418;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.48);
}

.login-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  color: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.login-modal__close:hover,
.login-modal__close:focus-visible {
  color: #090909;
  background: var(--yellow);
  border-color: var(--yellow);
}

.login-modal__panel h3 {
  margin: 6px 0 0;
  font-size: 24px;
  font-weight: 950;
}

.login-form {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.login-form__field {
  display: grid;
  gap: 6px;
}

.login-form__field > span {
  color: rgba(255, 255, 255, 0.68);
  font-size: 13px;
  font-weight: 750;
}

.login-form__field input {
  height: 42px;
  padding: 0 12px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  font-size: 15px;
}

.login-form__field input::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

.login-form__field input:focus {
  outline: 0;
  border-color: var(--yellow);
}

.login-form__captcha {
  display: grid;
  grid-template-columns: 1fr 112px;
  gap: 10px;
  align-items: end;
}

.login-form__captcha-image {
  height: 42px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
  cursor: pointer;
}

.login-form__captcha-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.login-form__sms {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: end;
}

.login-form__send {
  height: 42px;
  padding: 0 14px;
  color: var(--yellow);
  border: 1px solid var(--yellow);
  border-radius: 6px;
  background: transparent;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

.login-form__send:disabled {
  color: rgba(255, 255, 255, 0.4);
  border-color: rgba(255, 255, 255, 0.18);
  cursor: not-allowed;
}

.login-form__error {
  margin: 0;
  color: var(--danger);
  font-size: 13px;
  font-weight: 700;
}

.login-form__submit {
  height: 44px;
  border: 0;
  cursor: pointer;
}

.login-form__submit:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.login-form__hint {
  margin: 12px 0 0;
  color: rgba(255, 255, 255, 0.5);
  font-size: 12px;
  text-align: center;
}

.header-account {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

/* 显式 display 会覆盖 hidden 属性的 UA 样式，需单独声明使其生效 */
.header-account[hidden] {
  display: none;
}

.button[hidden] {
  display: none;
}

.header-account__phone {
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
  font-weight: 750;
  white-space: nowrap;
}

@media (max-width: 760px) {
  .login-form__captcha,
  .login-form__sms {
    grid-template-columns: 1fr;
  }
}

/* 个人中心独立页面（黑金风格，与主页价格区同源） */
.account-page {
  min-height: calc(100vh - 64px);
  padding: 56px max(24px, calc((100vw - 1760px) / 2 + 48px)) 96px;
  color: #fff;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0)),
    linear-gradient(115deg, #060708 0%, #12161b 48%, #070808 100%);
}

.account-page__heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 32px;
}

.account-page__buy {
  flex-shrink: 0;
  border: 0;
}

@media (max-width: 760px) {
  .account-page__heading {
    align-items: stretch;
    flex-direction: column;
  }

  .account-page__buy {
    width: 100%;
  }
}

.account-page__title {
  position: relative;
  display: inline-block;
  margin: 0;
  font-size: 34px;
  font-weight: 950;
}

.account-page__title::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -8px;
  height: 4px;
  border-radius: 2px;
  background: var(--yellow);
}

.account-page__user {
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.62);
  font-size: 14px;
  font-weight: 750;
}

.account-page__section {
  width: min(100%, 720px);
  margin: 0 auto;
}

.account-page__section-head {
  margin-bottom: 14px;
}

.account-page__subtitle {
  margin: 0;
  font-size: 20px;
  font-weight: 900;
}

/* 状态容器（未登录/加载/错误/空态）卡片化 */
.account-page__state {
  display: grid;
  justify-items: center;
  gap: 16px;
  padding: 32px 24px;
  border: 1px dashed rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  text-align: center;
}

/* 显式 display 会覆盖 hidden 属性的 UA 样式，需单独声明使其生效 */
.account-page__state[hidden] {
  display: none;
}

.account-key-list[hidden] {
  display: none;
}

.account-page__state-icon {
  width: 40px;
  height: 40px;
  color: var(--yellow);
}

.account-page__state-text {
  margin: 0;
  color: rgba(255, 255, 255, 0.66);
  font-size: 14px;
  font-weight: 700;
}

.account-page__error {
  color: var(--danger);
}

.account-page__state-action {
  border: 0;
}

.account-page__keys {
  max-height: none;
  margin-top: 0;
}

.account-key-card:hover {
  border-color: rgba(255, 212, 0, 0.55);
}

.account-key-list {
  display: grid;
  gap: 10px;
  max-height: 46vh;
  overflow: auto;
  margin-top: 14px;
}

.account-key-card {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
}

.account-key-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.account-key-card__head-right {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.account-key-card__suffix {
  font-weight: 900;
  letter-spacing: 0.5px;
}

.account-key-badge {
  font-size: 11px;
  font-weight: 900;
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
}

.account-key-badge--unused {
  color: #0b0b0b;
  background: var(--yellow);
}

.account-key-badge--active {
  color: #fff;
  background: var(--ok);
}

.account-key-badge--expired {
  color: #fff;
  background: var(--danger);
}

.account-key-card__rows {
  display: grid;
  gap: 4px;
}

.account-key-card__row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 12px;
}

.account-key-card__label {
  color: rgba(255, 255, 255, 0.45);
  white-space: nowrap;
}

.account-key-card__copy {
  flex-shrink: 0;
  padding: 3px 10px;
  color: var(--yellow);
  border: 1px solid rgba(255, 212, 0, 0.55);
  border-radius: 999px;
  background: transparent;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.account-key-card__copy:hover {
  color: #0b0b0b;
  background: var(--yellow);
}

.account-key-card__binding {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.account-key-card__unbind {
  flex-shrink: 0;
  padding: 2px 10px;
  color: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 999px;
  background: transparent;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.account-key-card__unbind:hover:not(:disabled) {
  color: #0b0b0b;
  border-color: var(--yellow);
  background: var(--yellow);
}

.account-key-card__unbind:disabled {
  opacity: 0.45;
  cursor: default;
}

/* 购买激活码弹窗 */
.buy-modal[hidden] {
  display: none;
}

.buy-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
}

.buy-modal__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.72);
  cursor: pointer;
}

.buy-modal__panel {
  position: relative;
  z-index: 1;
  width: min(100%, 420px);
  padding: 24px;
  color: #fff;
  text-align: left;
  border: 1px solid rgba(255, 212, 0, 0.72);
  border-radius: 7px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04)),
    #111418;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.48);
}

.buy-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  color: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.buy-modal__close:hover,
.buy-modal__close:focus-visible {
  color: #090909;
  background: var(--yellow);
  border-color: var(--yellow);
}

.buy-modal__panel h3 {
  margin: 6px 0 0;
  font-size: 24px;
  font-weight: 950;
}

.buy-modal__product {
  display: grid;
  gap: 4px;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid rgba(255, 212, 0, 0.3);
  border-radius: 6px;
}

.buy-modal__product strong {
  font-size: 18px;
  font-weight: 950;
}

.buy-modal__product span {
  color: var(--yellow);
  font-size: 22px;
  font-weight: 950;
}

.buy-modal__product em {
  color: rgba(255, 255, 255, 0.6);
  font-style: normal;
  font-size: 12px;
}

.buy-modal__actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.buy-modal__actions .button {
  flex: 1;
  border: 0;
}

.buy-modal__error {
  color: var(--danger);
  font-size: 13px;
  font-weight: 700;
  margin: 12px 0 0;
}

.buy-modal__qrcode {
  display: grid;
  justify-items: center;
  margin-top: 16px;
}

.buy-modal__qrcode[hidden] {
  display: none;
}

.buy-modal__qrcode img {
  display: block;
  width: 200px;
  height: 200px;
  padding: 10px;
  border-radius: 8px;
  background: #fff;
}

.buy-modal__paying {
  margin: 10px 0 0;
  color: rgba(255, 255, 255, 0.6);
  font-size: 13px;
  text-align: center;
}

.buy-modal__result {
  display: grid;
  justify-items: center;
  gap: 10px;
  margin-top: 14px;
}

/* 显式 display 会覆盖 hidden 属性的 UA 样式，需单独声明使其生效 */
.buy-modal__result[hidden] {
  display: none;
}

.buy-modal__result p {
  margin: 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: 13px;
}

.buy-modal__result code {
  display: block;
  padding: 10px 14px;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 15px;
  font-weight: 900;
  color: var(--yellow);
  word-break: break-all;
  border: 1px dashed rgba(255, 212, 0, 0.6);
  border-radius: 6px;
  user-select: all;
}

.buy-modal__help,
.login-modal__help {
  margin-top: 14px;
  border: 0;
  background: none;
  color: rgba(255, 255, 255, 0.5);
  font-size: 12px;
  text-decoration: underline;
  cursor: pointer;
}

.login-modal__help {
  display: block;
  margin: 10px auto 0;
}

/* 购买动态滚动浮层（社会证明） */
.purchase-ticker {
  position: fixed;
  left: 20px;
  bottom: 20px;
  z-index: 70;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  color: #fff;
  border: 1px solid rgba(255, 212, 0, 0.55);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.03)),
    #111418;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45);
  animation: purchase-ticker-in 0.35s ease;
}

/* 显式 display 会覆盖 hidden 属性的 UA 样式，需单独声明使其生效 */
.purchase-ticker[hidden] {
  display: none;
}

.purchase-ticker__badge {
  padding: 2px 8px;
  border-radius: 999px;
  color: #0b0b0b;
  background: var(--yellow);
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.purchase-ticker__text {
  margin: 0;
  font-size: 13px;
  font-weight: 750;
}

@keyframes purchase-ticker-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
}

@media (max-width: 760px) {
  .purchase-ticker {
    left: 14px;
    /* 右侧留出悬浮客服按钮的位置 */
    right: 76px;
    bottom: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .purchase-ticker {
    animation: none;
  }
}

/* 悬浮客服入口：所有访客可见；层级高于章节刻度，低于各类弹窗（个人中心充值弹窗为 60） */
.contact-fab {
  position: fixed;
  right: 16px;
  bottom: 20px;
  z-index: 50;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 2px;
  width: 56px;
  height: 56px;
  padding: 0;
  color: #0b0b0b;
  border: 0;
  border-radius: 14px;
  background: var(--yellow);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.3);
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.contact-fab .icon {
  width: 22px;
  height: 22px;
}

.contact-fab:hover,
.contact-fab:focus-visible {
  background: #ffe15a;
}

@media (max-width: 760px) {
  .contact-fab {
    right: 12px;
    bottom: 14px;
    width: 50px;
    height: 50px;
    border-radius: 12px;
  }

  .contact-fab .icon {
    width: 20px;
    height: 20px;
  }
}

/* 页脚：联系我们（客服二维码直接展示，不要求登录） */
.site-footer {
  padding: 56px max(48px, calc((100vw - 1760px) / 2 + 48px)) 28px;
  color: #fff;
  border-top: 1px solid var(--line-dark);
  background: #0b0d0f;
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  /* 右侧章节刻度的文字会伸进页面边距，多留一段，避免压在二维码和文字上 */
  padding-right: 40px;
}

.site-footer__brand {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 440px;
}

.site-footer__brand strong {
  font-size: 16px;
  font-weight: 900;
}

.site-footer__brand p {
  margin: 6px 0 0;
  color: rgba(255, 255, 255, 0.56);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.6;
}

.site-footer__contact {
  display: flex;
  align-items: center;
  gap: 28px;
}

.site-footer__copy h2 {
  margin: 0 0 10px;
  font-size: 22px;
  font-weight: 950;
}

.site-footer__copy p {
  margin: 6px 0 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: 14px;
  font-weight: 750;
  line-height: 1.6;
}

.site-footer__copy strong {
  color: var(--yellow);
}

.site-footer__copy .site-footer__meta {
  margin-top: 12px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 12px;
}

.site-footer__qr {
  display: block;
  width: 150px;
  height: auto;
  border-radius: 6px;
  background: #fff;
}

.site-footer__copyright {
  margin: 40px 0 0;
  padding-top: 20px;
  color: rgba(255, 255, 255, 0.4);
  border-top: 1px solid var(--line-dark);
  font-size: 12px;
  text-align: center;
}

@media (max-width: 760px) {
  .site-footer {
    /* 底部留白，避免版权行被购买浮层和悬浮按钮挡住 */
    padding: 40px 14px 88px;
  }

  .site-footer__inner {
    gap: 28px;
  }

  .site-footer__contact {
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
  }

  .site-footer__qr {
    width: 160px;
  }
}

.testimonials {
  padding: 26px max(48px, calc((100vw - 1760px) / 2 + 48px)) 112px;
  color: #fff;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0)),
    #14171b;
}

.testimonials h2::after {
  margin-left: 0;
}

.testimonial-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 24px;
  padding: 0;
  list-style: none;
}

.testimonial-item {
  display: grid;
  grid-template-columns: auto 54px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-width: 0;
  padding: 15px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 6px;
  background:
    linear-gradient(135deg, rgba(255, 212, 0, 0.08), rgba(255, 255, 255, 0.035)),
    rgba(255, 255, 255, 0.035);
}

.testimonial-rank {
  color: var(--yellow);
  font-size: 13px;
  font-weight: 950;
}

.testimonial-avatar {
  position: relative;
  width: 54px;
  height: 54px;
  overflow: hidden;
  border: 1px solid rgba(255, 212, 0, 0.42);
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 34%, rgba(255, 212, 0, 0.9) 0 9px, transparent 10px),
    radial-gradient(circle at 50% 86%, rgba(255, 212, 0, 0.75) 0 22px, transparent 23px),
    linear-gradient(135deg, #2a2d32, #0a0b0d);
  box-shadow: inset 0 0 0 4px rgba(0, 0, 0, 0.22);
}

.testimonial-avatar__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.testimonial-copy {
  min-width: 0;
}

.testimonial-copy strong,
.testimonial-copy span,
.testimonial-copy p,
.testimonial-item .rating {
  display: block;
}

.testimonial-copy strong {
  font-size: 15px;
  font-weight: 950;
}

.testimonial-copy span {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 12px;
  font-weight: 800;
}

.testimonial-copy p {
  margin: 9px 0 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.6;
}

.testimonial-item .rating {
  grid-column: 3;
  color: var(--yellow);
  font-style: normal;
}

.testimonial-item .rating {
  display: inline-flex;
  gap: 3px;
  margin-top: 2px;
}

.testimonial-item .rating .icon {
  width: 14px;
  height: 14px;
  fill: currentColor;
  stroke: currentColor;
}

.testimonial-item[data-testimonial-extra] {
  grid-column: 1 / -1;
  grid-template-columns: 34px 46px minmax(0, 1fr) auto;
  padding: 12px 14px;
}

.testimonial-item[data-testimonial-extra][hidden] {
  display: none !important;
}

.testimonial-item[data-testimonial-extra] .testimonial-avatar {
  width: 46px;
  height: 46px;
}

.testimonial-item[data-testimonial-extra] .rating {
  grid-column: 4;
  margin-top: 0;
}

.testimonial-item[data-testimonial-extra] .testimonial-copy {
  display: grid;
  grid-template-columns: minmax(110px, auto) minmax(100px, auto) minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.testimonial-item[data-testimonial-extra] .testimonial-copy span,
.testimonial-item[data-testimonial-extra] .testimonial-copy p {
  margin-top: 0;
}

.testimonial-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  margin-top: 16px;
  padding: 0 18px;
  color: #0b0b0b;
  border: 0;
  border-radius: 5px;
  background: var(--yellow);
  font-size: 13px;
  font-weight: 950;
  cursor: pointer;
}

.testimonial-more:hover {
  background: #ffe15a;
}

@media (prefers-reduced-motion: no-preference) {
  .button,
  .capability-card,
  .scene-card,
  .workbench__screens img {
    transition:
      transform 180ms ease,
      box-shadow 180ms ease,
      border-color 180ms ease;
  }

  .capability-card:hover,
  .scene-card:hover,
  .workbench__screens img:hover {
    transform: translateY(-2px);
  }
}

@media (max-width: 1080px) {
  :root {
    --content: min(1120px, calc(100vw - 48px));
  }

  .site-header {
    grid-template-columns: 1fr auto;
  }

  .site-nav {
    display: none;
  }

  .capability-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .capability-card:last-child {
    grid-column: span 2;
  }

  .workflow-strip {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .workflow-strip li:not(:last-child)::after {
    display: none;
  }

  .workbench {
    grid-template-columns: 1fr;
  }

  .scene-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .pricing-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pricing-card--featured {
    grid-column: 1 / -1;
  }

  .testimonial-board {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .testimonial-item[data-testimonial-extra] .testimonial-copy {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 760px) {
  :root {
    --content: calc(100vw - 28px);
  }

  .site-header {
    position: relative;
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 16px 14px;
    color: #fff;
    background: var(--black);
  }

  .brand strong {
    white-space: normal;
  }

  .header-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .button {
    width: 100%;
    min-height: 44px;
    padding: 0 16px;
    font-size: 14px;
  }

  .hero {
    min-height: auto;
  }

  .hero__content {
    padding: 34px 0 28px;
  }

  .hero h1,
  .hero h1 span {
    font-size: 31px;
  }

  .hero__lead {
    font-size: 15px;
  }

  .hero__actions {
    display: grid;
  }

  .hero__marks {
    gap: 12px;
  }

  .hero__media {
    position: relative;
    top: auto;
    right: auto;
    bottom: auto;
    width: var(--content);
    min-height: 170px;
    margin: 0 auto 20px;
  }

  .capabilities,
  .workflow,
  .workbench,
  .scenarios {
    padding-top: 22px;
    padding-bottom: 24px;
  }

  .pricing {
    padding-top: 30px;
    padding-bottom: 34px;
  }

  .capability-grid,
  .workflow-strip,
  .workbench__screens,
  .scene-grid,
  .testimonial-board {
    grid-template-columns: 1fr;
  }

  .capability-card,
  .capability-card:last-child {
    grid-column: auto;
  }

  .capability-card {
    min-height: auto;
  }

  .pricing-grid {
    grid-template-columns: 1fr;
  }

  .pricing-card,
  .pricing-card--featured {
    grid-column: auto;
    min-height: auto;
  }

  .pricing-modal__panel {
    padding: 18px;
  }

  .pricing-modal__panel img {
    width: min(100%, 210px);
  }

  .workflow-strip li {
    min-height: 42px;
  }

  .workbench {
    gap: 18px;
  }

  .testimonials {
    padding-left: 14px;
    padding-right: 14px;
    padding-bottom: 72px;
  }

  .testimonial-item {
    grid-template-columns: auto 48px minmax(0, 1fr);
    padding: 13px;
  }

  .testimonial-avatar {
    width: 48px;
    height: 48px;
  }

  .testimonial-item[data-testimonial-extra] {
    grid-template-columns: auto 48px minmax(0, 1fr);
  }

  .testimonial-item[data-testimonial-extra] .rating {
    grid-column: 3;
  }
}

/* ===== AI海报积分（个人中心，深色主题与站点一致） ===== */

.trial-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

[data-trial-section][hidden], [data-trial-history-section][hidden],
.trial-load-error[hidden], .trial-notice[hidden], .trial-dialog [hidden] {
  display: none;
}

.trial-day + .trial-day { margin-top: 24px; }
.trial-day__title { margin: 0 0 10px; font-size: 14px; color: #c1c1c1; letter-spacing: 0; }
.trial-item { padding: 16px; margin-top: 10px; border: 1px solid #424242; border-radius: 6px; }
.trial-item__head { display: flex; justify-content: space-between; gap: 16px; align-items: start; }
.trial-item__title { margin: 0; font-size: 16px; line-height: 1.5; overflow-wrap: anywhere; letter-spacing: 0; }
.trial-item__duration { color: var(--yellow); flex-shrink: 0; font-size: 16px; }
.trial-item__meta { display: grid; gap: 6px; margin: 10px 0 16px; color: #b7b7b7; font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
.trial-history-row { padding: 14px 0; border-bottom: 1px solid #424242; }
.trial-history-row p { margin-bottom: 0; }
.trial-load-error { display: flex; align-items: center; gap: 12px; color: #e8bbbb; }
.trial-notice { padding: 12px 0; color: #a9d9b8; font-size: 14px; line-height: 1.7; }
.trial-dialog { width: min(520px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 24px; box-sizing: border-box; color: #fff; background: #202020; border: 1px solid #575757; border-radius: 8px; overflow: auto; }
.trial-dialog::backdrop { background: rgba(0, 0, 0, .72); }
.trial-dialog__head { display: flex; justify-content: space-between; align-items: start; gap: 12px; margin-bottom: 20px; }
.trial-dialog__head h2 { margin: 0; font-size: 20px; line-height: 1.5; overflow-wrap: anywhere; letter-spacing: 0; }
.trial-dialog__close { width: 32px; height: 32px; flex-shrink: 0; border: 0; color: #ddd; background: transparent; font-size: 24px; cursor: pointer; }
.trial-dialog__choices { display: grid; gap: 12px; margin: 0; padding: 0; border: 0; }
.trial-dialog__choices legend { margin-bottom: 12px; color: #b7b7b7; font-size: 13px; }
.trial-dialog__choices label { display: flex; gap: 10px; align-items: center; font-size: 14px; }
.trial-dialog input { accent-color: var(--yellow); }
.trial-dialog__field { display: grid; gap: 8px; margin-top: 20px; font-size: 14px; }
.trial-dialog select { width: 100%; min-width: 0; padding: 10px 8px; color: #fff; background: #303030; border: 1px solid #666; border-radius: 4px; font: inherit; font-size: 12px; }
.trial-dialog__summary { margin: 20px 0; color: #c8c8c8; font-size: 14px; line-height: 1.7; overflow-wrap: anywhere; }
.trial-dialog__submit { min-width: 140px; }
.trial-dialog button:disabled { opacity: .5; cursor: default; }

.account-page__section + .account-page__section {
  margin-top: 40px;
}

.credit-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
}

.credit-card[hidden] {
  display: none;
}

.credit-card__balance-value {
  color: var(--yellow);
  font-size: 30px;
  font-weight: 700;
}

.credit-card__balance-unit {
  margin-left: 6px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
}

.credit-card__rate {
  color: var(--yellow);
  font-size: 13px;
}

/* ===== 充值弹窗（与购买弹窗同款深色面板） ===== */

.credit-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
}

.credit-modal[hidden] {
  display: none;
}

.credit-modal__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.62);
}

.credit-modal__panel {
  position: relative;
  z-index: 1;
  width: min(100%, 420px);
  padding: 24px;
  color: #fff;
  border: 1px solid rgba(255, 212, 0, 0.72);
  border-radius: 7px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04)),
    #101317;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

.credit-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.72);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.credit-modal__actions {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

.credit-modal__qrcode {
  margin-top: 16px;
  padding: 12px;
  text-align: center;
  background: #fff;
  border-radius: 8px;
}

.credit-modal__qrcode img {
  width: 208px;
  height: 208px;
  display: block;
  margin: 0 auto;
}

.credit-modal__paying {
  margin-top: 12px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
  text-align: center;
}

.credit-modal__error {
  margin-top: 12px;
  color: var(--danger);
  font-size: 13px;
}

.credit-modal__result {
  margin-top: 16px;
  padding: 16px;
  border-radius: 8px;
  background: rgba(19, 138, 84, 0.16);
  border: 1px solid rgba(19, 138, 84, 0.5);
  color: #4ade80;
  text-align: center;
}

.credit-modal__result-points {
  margin-top: 6px;
  font-size: 20px;
  font-weight: 700;
}

.credit-form__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 12px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.85);
}

.credit-form__field input {
  padding: 10px 12px;
  border: 1px solid var(--line-dark);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  font-size: 15px;
}

.credit-form__chips {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.credit-form__chips button {
  padding: 6px 14px;
  border: 1px solid var(--line-dark);
  border-radius: 999px;
  background: transparent;
  color: rgba(255, 255, 255, 0.85);
  cursor: pointer;
}

.credit-form__chips button:hover {
  border-color: var(--yellow);
  color: var(--yellow);
}

.credit-form__estimate {
  margin-top: 10px;
  color: var(--yellow);
  font-size: 13px;
}

/* ===== AI海报工作台（隐蔽页，深色主题） ===== */

.poster-workbench {
  min-height: calc(100vh - 64px);
  padding: 24px max(24px, calc((100vw - 1760px) / 2 + 48px)) 96px;
  color: #fff;
  /* 页面根声明了 light，暗色工作台内必须覆盖，否则原生控件（聚焦环/自动填充/滚动条）按浅色渲染 */
  color-scheme: dark;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0)),
    linear-gradient(115deg, #060708 0%, #12161b 48%, #070808 100%);
}

.poster-workbench__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 0 20px;
  border-bottom: 1px solid var(--line-dark);
}

.poster-workbench__header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.poster-workbench__user {
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
}

.poster-workbench__balance {
  color: var(--yellow);
  font-size: 14px;
  text-decoration: none;
  border: 1px solid var(--line-dark);
  border-radius: 999px;
  padding: 6px 14px;
}

.poster-workbench__balance:hover {
  border-color: var(--yellow);
}

.poster-workbench__state {
  padding: 80px 16px;
  text-align: center;
  color: rgba(255, 255, 255, 0.72);
}

.poster-workbench__state--error {
  color: var(--danger);
}

.poster-workbench__body {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 24px 0 80px;
}

.poster-workbench__body[hidden] {
  display: none;
}

.poster-panel {
  padding: 20px;
  border: 1px solid var(--line-dark);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
}

/* 宽屏两栏：左选风格、右生成信息；窄屏自动堆叠 */
.poster-workbench__grid {
  display: grid;
  grid-template-columns: minmax(0, 11fr) minmax(0, 13fr);
  gap: 20px;
  align-items: start;
}

@media (max-width: 1080px) {
  .poster-workbench__grid {
    grid-template-columns: 1fr;
  }
}

/* 宽屏应用式布局：整页不滚，左右两栏各自独立滚动 */
@media (min-width: 1081px) {
  .poster-workbench {
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
    padding-bottom: 24px;
  }

  .poster-workbench__header {
    flex-shrink: 0;
  }

  .poster-workbench__body {
    flex: 1;
    min-height: 0;
    padding: 20px 0 0;
  }

  .poster-workbench__grid {
    flex: 1;
    min-height: 0;
    align-items: stretch;
  }

  .poster-panel--styles,
  .poster-panel--form {
    display: flex;
    flex-direction: column;
    min-height: 0;
  }

  /* 短窗口下标题/搜索栏保持固有高度，只压缩滚动区 */
  .poster-panel--styles .poster-panel__head,
  .poster-panel--styles .poster-templates-search,
  .poster-panel--form .poster-panel__title {
    flex-shrink: 0;
  }

  /* 左栏：滚动区跟随栏高，不再固定 540px */
  .poster-panel--styles .poster-templates-scroll {
    flex: 1;
    min-height: 0;
    max-height: none;
  }

  /* 右栏：表单整体在栏内滚动 */
  .poster-panel--form .poster-form {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-right: 8px;
  }

  .poster-panel--form .poster-form::-webkit-scrollbar {
    width: 8px;
  }

  .poster-panel--form .poster-form::-webkit-scrollbar-thumb {
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.16);
  }

  .poster-panel--form .poster-form::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.28);
  }

  .poster-panel--form .poster-form::-webkit-scrollbar-track {
    background: transparent;
  }
}

.poster-panel__head-left {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}

.poster-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  padding: 6px 14px;
  border: 1px solid var(--line-dark);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.8);
  font-size: 13px;
  cursor: pointer;
}

.poster-pill:hover {
  border-color: var(--yellow);
  color: #fff;
}

.poster-pill svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.poster-panel__title {
  margin: 0 0 16px;
  font-size: 18px;
}

/* 面板标题行：标题 + 模板计数 */
.poster-panel__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.poster-panel__head .poster-panel__title {
  margin: 0;
}

.poster-templates-count {
  color: rgba(255, 255, 255, 0.45);
  font-size: 13px;
}

.poster-templates-count[hidden] {
  display: none;
}

/* 模板内部滚动区：模板再多也不把下方表单挤走 */
.poster-templates-scroll {
  max-height: 540px;
  overflow-y: auto;
  overscroll-behavior: contain;
  /* 四周留白：选中态卡片上浮+外发光会被 overflow 裁边 */
  padding: 6px 6px 6px 6px;
}

.poster-templates-scroll::-webkit-scrollbar {
  width: 8px;
}

.poster-templates-scroll::-webkit-scrollbar-thumb {
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.16);
}

.poster-templates-scroll::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.28);
}

.poster-templates-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.poster-templates {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 12px;
}

/* ===== 模板搜索 / 空态 / 加载尾态 ===== */
.poster-templates-search {
  position: relative;
  width: fit-content;
  max-width: 100%;
  margin-bottom: 16px;
}

.poster-templates-search__icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  fill: rgba(255, 255, 255, 0.45);
  pointer-events: none;
}

.poster-templates-search__input {
  display: block;
  width: 360px;
  max-width: 100%;
  padding: 10px 38px 10px 40px;
  border: 1px solid var(--line-dark);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 14px;
  outline: none;
}

.poster-templates-search__input::placeholder {
  color: rgba(255, 255, 255, 0.38);
}

.poster-templates-search__input:focus {
  border-color: var(--yellow);
}

/* 用自定义清除按钮，隐藏 webkit 原生 × */
.poster-templates-search__input::-webkit-search-cancel-button {
  display: none;
}

.poster-templates-search__clear {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
}

.poster-templates-search__clear:hover {
  background: rgba(255, 255, 255, 0.22);
}

.poster-templates-empty {
  padding: 36px 16px;
  text-align: center;
}

.poster-templates-empty[hidden] {
  display: none;
}

.poster-templates-empty__title {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 600;
}

.poster-templates-empty__hint {
  margin: 0 0 14px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 13px;
}

.poster-templates-more {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  min-height: 36px;
  font-size: 13px;
}

.poster-templates-more[hidden] {
  display: none;
}

/* 显式 display 会覆盖 hidden 属性，三个状态必须单独兜底 */
.poster-templates-more__loading[hidden],
.poster-templates-more__button[hidden],
.poster-templates-more__end[hidden] {
  display: none;
}

.poster-templates-more__loading {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.5);
}

.poster-templates-more__button {
  border: 0;
  padding: 6px 14px;
  border-radius: 999px;
  background: none;
  color: rgba(255, 255, 255, 0.65);
  font-size: 13px;
  cursor: pointer;
}

.poster-templates-more__button:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.poster-templates-more__end {
  color: rgba(255, 255, 255, 0.35);
}

.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-top-color: var(--yellow);
  border-radius: 50%;
  animation: poster-spin 0.8s linear infinite;
}

.spinner--small {
  width: 14px;
  height: 14px;
}

@keyframes poster-spin {
  to {
    transform: rotate(360deg);
  }
}

/* ===== 生成历史弹窗 ===== */
.history-modal {
  position: fixed;
  inset: 0;
  z-index: 72;
  display: grid;
  place-items: center;
  padding: 24px;
}

.history-modal[hidden] {
  display: none;
}

.history-modal__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.7);
}

.history-modal__panel {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: min(880px, 100%);
  max-height: min(86vh, 780px);
  padding: 22px;
  color: #fff;
  border: 1px solid rgba(255, 212, 0, 0.6);
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0.03)), #101317;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
}

.history-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.history-modal__head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.history-modal__refresh {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border: 1px solid var(--line-dark);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.75);
  font-size: 13px;
  cursor: pointer;
}

.history-modal__refresh:hover {
  border-color: var(--yellow);
  color: #fff;
}

.history-modal__refresh svg {
  width: 13px;
  height: 13px;
  fill: currentColor;
}

.history-modal__head h3 {
  margin: 0;
  font-size: 18px;
}

.history-modal__close {
  border: 0;
  background: rgba(0, 0, 0, 0.45);
  color: rgba(255, 255, 255, 0.85);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
}

.history-modal__close:hover {
  color: #fff;
}

.history-modal__body {
  min-height: 0;
  overflow-y: auto;
  /* 顶部/底部留白：卡片高亮描边会被 overflow 裁边（与模板滚动区同类问题） */
  padding: 6px 8px 6px 2px;
}

.history-modal__body::-webkit-scrollbar {
  width: 8px;
}

.history-modal__body::-webkit-scrollbar-thumb {
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.16);
}

.history-modal__body::-webkit-scrollbar-track {
  background: transparent;
}

.history-modal__count {
  margin-left: 10px;
  color: rgba(255, 255, 255, 0.45);
  font-size: 13px;
  font-weight: 400;
}

.history-modal__count[hidden] {
  display: none;
}

.history-modal__more {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  margin-top: 14px;
  font-size: 13px;
}

.history-modal__more[hidden] {
  display: none;
}

.history-modal__body .poster-form__hint {
  padding: 30px 0;
  text-align: center;
}

/* ===== 提交成功反馈浮层 ===== */
.generation-overlay {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: grid;
  place-items: center;
  padding: 24px;
}

.generation-overlay[hidden] {
  display: none;
}

.generation-overlay__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.72);
}

.generation-overlay__panel {
  position: relative;
  z-index: 1;
  width: min(420px, 100%);
  padding: 34px 28px 28px;
  text-align: center;
  color: #fff;
  border: 1px solid rgba(255, 212, 0, 0.6);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0.03)), #101317;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
}

.generation-overlay__check {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin: 0 auto 14px;
  border: 1px solid rgba(74, 222, 128, 0.4);
  border-radius: 50%;
  background: rgba(19, 138, 84, 0.2);
  color: #4ade80;
  font-size: 32px;
}

.generation-overlay__panel h3 {
  margin: 0 0 8px;
  font-size: 20px;
}

.generation-overlay__panel p {
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
}

.generation-overlay__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

/* ===== 图片预览灯箱 ===== */
.image-viewer {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
}

.image-viewer[hidden] {
  display: none;
}

.image-viewer__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  background: rgba(0, 0, 0, 0.85);
  cursor: zoom-out;
}

.image-viewer__image {
  position: relative;
  z-index: 1;
  max-width: min(92vw, 1080px);
  max-height: 84vh;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.65);
}

.image-viewer__counter {
  position: absolute;
  z-index: 2;
  top: 22px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.75);
  font-size: 13px;
  letter-spacing: 1px;
}

.image-viewer__close {
  position: absolute;
  z-index: 2;
  top: 16px;
  right: 20px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.image-viewer__close:hover {
  background: rgba(255, 255, 255, 0.26);
}

.image-viewer__nav {
  position: absolute;
  z-index: 2;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.image-viewer__nav:hover {
  background: rgba(255, 255, 255, 0.24);
}

.image-viewer__nav--prev {
  left: 20px;
}

.image-viewer__nav--next {
  right: 20px;
}

/* ===== 模板详情弹窗 ===== */
.poster-detail {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  padding: 24px;
}

.poster-detail[hidden] {
  display: none;
}

.poster-detail__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.66);
}

.poster-detail__panel {
  position: relative;
  z-index: 1;
  width: min(560px, 100%);
  max-height: min(82vh, 720px);
  overflow-y: auto;
  padding: 22px;
  color: #fff;
  border: 1px solid rgba(255, 212, 0, 0.6);
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0.03)), #101317;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
}

.poster-detail__close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  border: 0;
  background: rgba(0, 0, 0, 0.45);
  color: rgba(255, 255, 255, 0.85);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
}

.poster-detail__cover img {
  width: 100%;
  max-height: 300px;
  object-fit: cover;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.poster-detail__info {
  margin-top: 14px;
}

.poster-detail__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.poster-detail__head h3 {
  margin: 0;
  font-size: 19px;
}

.poster-detail__points {
  flex-shrink: 0;
  color: var(--yellow);
  font-weight: 700;
}

.poster-detail__requirement {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.65);
  font-size: 13px;
}

.poster-detail__description {
  margin: 12px 0 0;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.85);
  font-size: 14px;
  line-height: 1.7;
  white-space: pre-wrap;
}

.poster-detail__gallery-section {
  margin-top: 16px;
}

.poster-detail__gallery-section h4 {
  margin: 0 0 10px;
  font-size: 15px;
}

.poster-detail__gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.poster-detail__gallery img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 6px;
  cursor: zoom-in;
  background: rgba(255, 255, 255, 0.06);
}

.poster-detail__use {
  width: 100%;
  margin-top: 18px;
}

.poster-template {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  border: 2px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  text-align: left;
  color: #fff;
}

.poster-template.is-selected {
  border-color: var(--yellow);
  box-shadow: 0 0 0 3px rgba(255, 212, 0, 0.45), 0 0 22px rgba(255, 212, 0, 0.28);
  transform: translateY(-2px);
}

.poster-template__image {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
}

.poster-template__name {
  font-size: 14px;
  font-weight: 600;
}

.poster-template__points {
  color: var(--yellow);
  font-size: 12px;
}

.poster-form__selected {
  margin-bottom: 16px;
  padding: 10px 14px;
  border: 1px solid rgba(255, 212, 0, 0.45);
  border-radius: 8px;
  background: rgba(255, 212, 0, 0.08);
  color: rgba(255, 255, 255, 0.88);
  font-size: 14px;
}

/* 选中模板卡片角标（对齐小程序"已选"） */
.poster-template.is-selected::after {
  content: "已选";
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 1;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--yellow);
  color: #101317;
  font-size: 11px;
  font-weight: 700;
}

.poster-form__label {
  display: block;
  margin: 16px 0 8px;
  font-size: 14px;
  font-weight: 600;
}

.poster-form__requirement {
  color: rgba(255, 255, 255, 0.55);
  font-weight: 400;
}

.poster-form__variables-hint {
  margin: 0 0 12px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 13px;
}

.poster-form__variable {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.85);
}

.poster-form__variable-head {
  display: flex;
  align-items: center;
  gap: 6px;
}

.poster-form__variable-label {
  font-weight: 600;
}

.poster-form__variable-required {
  color: #f87171;
  font-weight: 700;
}

.poster-form__variable-count {
  margin-left: auto;
  color: rgba(255, 255, 255, 0.4);
  font-size: 12px;
}

.poster-form__variable input {
  padding: 10px 12px;
  border: 1px solid var(--line-dark);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  font-size: 15px;
}

.poster-form__variable input:focus {
  outline: none;
  border-color: rgba(255, 212, 0, 0.75);
  box-shadow: 0 0 0 2px rgba(255, 212, 0, 0.18);
}

.poster-materials {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}

.poster-materials__item {
  position: relative;
  width: 86px;
}

.poster-materials__item img {
  width: 86px;
  height: 86px;
  object-fit: cover;
  border-radius: 8px;
}

.poster-materials__status {
  display: block;
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 12px;
  text-align: center;
}

/* 上传中：真实进度条（对齐小程序） */
.poster-materials__progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 26px;
  padding: 0 8px;
}

.poster-materials__progress-percent {
  display: block;
  margin-bottom: 3px;
  color: var(--yellow);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.poster-materials__progress-track {
  height: 4px;
  border-radius: 2px;
  background: rgba(0, 0, 0, 0.55);
  overflow: hidden;
}

.poster-materials__progress-value {
  height: 100%;
  border-radius: 2px;
  background: var(--yellow);
  box-shadow: 0 0 8px rgba(255, 212, 0, 0.55);
  transition: width 0.2s ease;
}

.poster-materials__item--uploading img {
  opacity: 0.65;
}

.poster-materials__item--failed .poster-materials__status {
  color: #f87171;
}

.poster-materials__item--ready .poster-materials__status {
  color: #4ade80;
}

.poster-materials__retry {
  display: block;
  margin: 4px auto 0;
  padding: 2px 12px;
  border: 1px solid rgba(248, 113, 113, 0.6);
  border-radius: 999px;
  background: rgba(248, 113, 113, 0.12);
  color: #f87171;
  font-size: 12px;
  cursor: pointer;
}

.poster-materials__retry:hover {
  background: rgba(248, 113, 113, 0.24);
}

.poster-materials__remove {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  cursor: pointer;
}

.poster-materials__remove:hover {
  background: var(--danger);
}

/* 素材上传区标题行：要求 + 已选计数 */
.poster-form__materials-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.poster-form__materials-head .poster-form__label {
  margin: 0;
}

.poster-form__materials-count {
  flex-shrink: 0;
  color: rgba(255, 255, 255, 0.5);
  font-size: 13px;
}

.poster-form__materials-count[hidden] {
  display: none;
}

/* 上传入口：对齐小程序的大号虚线拖放区 */
.poster-materials__picker {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 28px 16px;
  border: 1.5px dashed rgba(255, 255, 255, 0.25);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  text-align: center;
}

.poster-materials__picker:hover {
  border-color: var(--yellow);
  background: rgba(255, 212, 0, 0.05);
}

.poster-materials__picker[hidden] {
  display: none;
}

.poster-materials__picker svg {
  width: 32px;
  height: 32px;
  fill: rgba(255, 255, 255, 0.4);
}

.poster-materials__picker-title {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.85);
}

.poster-materials__picker-hint {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.45);
}

.poster-form__additional textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line-dark);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  font-size: 14px;
  box-sizing: border-box;
  resize: vertical;
}

.poster-form__actions {
  margin-top: 20px;
}

.poster-form__error {
  margin-top: 12px;
  color: var(--danger);
  font-size: 13px;
}

.poster-form__error:empty {
  display: none;
}

.poster-form__hint {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 12px;
}

.poster-history {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}

.poster-history__card {
  padding: 14px;
  border: 1px solid var(--line-dark);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
}

.poster-history__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 14px;
}

.poster-history__status {
  flex-shrink: 0;
  padding: 2px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
}

.poster-history__card--succeeded .poster-history__status {
  background: rgba(19, 138, 84, 0.22);
  color: #4ade80;
}

.poster-history__card--failed .poster-history__status {
  background: rgba(214, 69, 69, 0.22);
  color: #f87171;
}

.poster-history__result {
  width: 100%;
  border-radius: 8px;
  cursor: zoom-in;
}

.poster-history__message {
  margin: 0;
  color: rgba(255, 255, 255, 0.55);
  font-size: 13px;
}

/* 价格卡：购买赠送积分标签 */
.pricing-card__bonus {
  display: inline-block;
  margin-top: 6px;
  padding: 3px 10px;
  border: 1px solid var(--yellow);
  border-radius: 999px;
  color: var(--yellow);
  font-size: 12px;
}

.pricing-card__bonus[hidden] {
  display: none;
}

/* 个人中心：积分明细 */
.credit-ledger-toggle {
  margin-top: 12px;
}

.credit-ledger-block {
  margin-top: 12px;
}

.credit-ledger-block[hidden] {
  display: none;
}

/* 明细区固定高度内部滚动，不挤压下方区块 */
.credit-ledger-scroll {
  max-height: 320px;
  overflow-y: auto;
}

.credit-ledger {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.credit-ledger-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 10px;
}

.credit-ledger-pageinfo {
  color: rgba(255, 255, 255, 0.6);
  font-size: 13px;
}

.credit-ledger-pager .button[disabled] {
  opacity: 0.4;
  cursor: not-allowed;
}

.credit-ledger__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  font-size: 13px;
}

.credit-ledger__info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.credit-ledger__type {
  font-weight: 600;
}

.credit-ledger__meta {
  color: rgba(255, 255, 255, 0.55);
  font-size: 12px;
}

.credit-ledger__points {
  flex-shrink: 0;
  font-weight: 700;
}

.credit-ledger__points--credit {
  color: var(--yellow);
}

.credit-ledger__points--debit {
  color: #f87171;
}

.credit-summary {
  margin-top: 12px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 12px;
  line-height: 1.7;
}

/* ===== 首屏 AI 海报按钮：流光扫过 ===== */
.button--ai-launch {
  position: relative;
  overflow: hidden;
}

.button--ai-launch::after {
  content: "";
  position: absolute;
  top: 0;
  left: -60%;
  width: 45%;
  height: 100%;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  transform: skewX(-20deg);
  animation: ai-launch-shine 2.6s ease-in-out infinite;
}

@keyframes ai-launch-shine {
  0% { left: -60%; }
  55% { left: 130%; }
  100% { left: 130%; }
}

/* ===== AI 海报进入转场（约2.3s） ===== */
.ai-launch {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  background: radial-gradient(ellipse at center, #101317 0%, #060708 70%);
  animation: ai-launch-in 0.25s ease-out both;
}

.ai-launch[hidden] {
  display: none;
}

@keyframes ai-launch-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* 速度线：左右两侧飞驰的黄白光条 */
.ai-launch__streak {
  position: absolute;
  height: 2px;
  width: 34vw;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, rgba(255, 212, 0, 0.9), transparent);
  opacity: 0;
  animation: ai-launch-streak 1.1s cubic-bezier(0.2, 0.7, 0.3, 1) both;
}

.ai-launch__streak:nth-child(1) { top: 18%; animation-delay: 0.05s; }
.ai-launch__streak:nth-child(2) { top: 30%; animation-delay: 0.35s; width: 24vw; transform: scaleX(-1); }
.ai-launch__streak:nth-child(3) { top: 44%; animation-delay: 0.18s; width: 40vw; }
.ai-launch__streak:nth-child(4) { top: 58%; animation-delay: 0.5s; width: 20vw; transform: scaleX(-1); }
.ai-launch__streak:nth-child(5) { top: 70%; animation-delay: 0.28s; width: 30vw; }
.ai-launch__streak:nth-child(6) { top: 82%; animation-delay: 0.6s; width: 26vw; transform: scaleX(-1); }

@keyframes ai-launch-streak {
  0% { opacity: 0; transform: translateX(-40vw); }
  25% { opacity: 1; }
  100% { opacity: 0; transform: translateX(40vw); }
}

.ai-launch__streak:nth-child(2),
.ai-launch__streak:nth-child(4),
.ai-launch__streak:nth-child(6) {
  animation-name: ai-launch-streak-rev;
}

@keyframes ai-launch-streak-rev {
  0% { opacity: 0; transform: translateX(40vw) scaleX(-1); }
  25% { opacity: 1; }
  100% { opacity: 0; transform: translateX(-40vw) scaleX(-1); }
}

/* 中央核心：扩散光环 + 标题 */
.ai-launch__core {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.ai-launch__ring {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 240px;
  height: 240px;
  border: 2px solid rgba(255, 212, 0, 0.85);
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0.3);
  opacity: 0;
  animation: ai-launch-ring 1.4s ease-out 0.25s both;
}

.ai-launch__ring--late {
  animation-delay: 0.75s;
}

@keyframes ai-launch-ring {
  0% { transform: translate(-50%, -50%) scale(0.3); opacity: 0; }
  20% { opacity: 0.95; }
  100% { transform: translate(-50%, -50%) scale(1.7); opacity: 0; }
}

.ai-launch__title {
  font-size: 46px;
  font-weight: 800;
  letter-spacing: 0.5em;
  text-indent: 0.5em;
  color: #fff;
  text-shadow: 0 0 24px rgba(255, 212, 0, 0.65);
  animation: ai-launch-title 1s cubic-bezier(0.2, 0.8, 0.2, 1) 0.15s both;
}

@keyframes ai-launch-title {
  0% { opacity: 0; letter-spacing: 0.9em; filter: blur(8px); }
  100% { opacity: 1; letter-spacing: 0.5em; filter: blur(0); }
}

.ai-launch__sub {
  color: rgba(255, 255, 255, 0.65);
  font-size: 14px;
  font-style: normal;
  letter-spacing: 0.2em;
  animation: ai-launch-in 0.6s ease-out 0.8s both;
}

/* 格纹旗：终段从左向右扫过 */
.ai-launch__flag {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 14px;
  margin-top: -7px;
  background-image:
    linear-gradient(45deg, rgba(255, 212, 0, 0.9) 25%, transparent 25%, transparent 75%, rgba(255, 212, 0, 0.9) 75%),
    linear-gradient(45deg, rgba(255, 212, 0, 0.9) 25%, transparent 25%, transparent 75%, rgba(255, 212, 0, 0.9) 75%);
  background-size: 14px 14px;
  background-position: 0 0, 7px 7px;
  opacity: 0;
  transform: translateX(-100%) skewX(-12deg);
  animation: ai-launch-flag 0.7s cubic-bezier(0.3, 0.7, 0.2, 1) 1.45s both;
}

@keyframes ai-launch-flag {
  0% { opacity: 0; transform: translateX(-100%) skewX(-12deg); }
  30% { opacity: 0.9; }
  100% { opacity: 0; transform: translateX(100%) skewX(-12deg); }
}

/* 进度条 */
.ai-launch__bar {
  position: absolute;
  bottom: 16vh;
  left: 50%;
  transform: translateX(-50%);
  width: min(320px, 60vw);
  height: 3px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.14);
  overflow: hidden;
}

.ai-launch__bar span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--yellow);
  animation: ai-launch-bar 2s linear 0.2s both;
}

@keyframes ai-launch-bar {
  0% { width: 0; }
  100% { width: 100%; }
}

/* 终幕闪光 */
.ai-launch__flash {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(255, 212, 0, 0.85), rgba(255, 212, 0, 0) 65%);
  opacity: 0;
  animation: ai-launch-flash 0.45s ease-in 1.85s both;
}

@keyframes ai-launch-flash {
  0% { opacity: 0; }
  60% { opacity: 1; }
  100% { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .ai-launch__streak,
  .ai-launch__ring,
  .ai-launch__title,
  .ai-launch__flag,
  .ai-launch__bar span,
  .ai-launch__flash {
    animation: none;
  }
}

/* AI海报工作台：logo 圆角 */
.poster-workbench .brand__logo {
  border-radius: 10px;
}

/* 生成记录卡片：可点击 + 悬停反馈 */
.poster-history__card {
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.poster-history__card:hover {
  border-color: rgba(255, 212, 0, 0.55);
  transform: translateY(-2px);
}

/* ===== 生成记录详情弹窗 ===== */
.history-detail {
  position: fixed;
  inset: 0;
  z-index: 75;
  display: grid;
  place-items: center;
  padding: 24px;
}

.history-detail[hidden] {
  display: none;
}

.history-detail__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.7);
}

.history-detail__panel {
  position: relative;
  z-index: 1;
  width: min(640px, 100%);
  max-height: min(86vh, 780px);
  overflow-y: auto;
  padding: 22px;
  color: #fff;
  border: 1px solid rgba(255, 212, 0, 0.6);
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0.03)), #101317;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
}

.history-detail__refresh {
  position: absolute;
  top: 12px;
  right: 52px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 30px;
  padding: 0 12px;
  border: 1px solid var(--line-dark);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.45);
  color: rgba(255, 255, 255, 0.85);
  font-size: 13px;
  cursor: pointer;
}

.history-detail__refresh:hover {
  border-color: var(--yellow);
  color: #fff;
}

.history-detail__refresh svg {
  width: 13px;
  height: 13px;
  fill: currentColor;
}

.history-detail__close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  border: 0;
  background: rgba(0, 0, 0, 0.45);
  color: rgba(255, 255, 255, 0.85);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
}

.history-detail__panel h3 {
  margin: 0;
  font-size: 19px;
}

.history-detail__meta {
  margin: 8px 0 14px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 13px;
}

.history-detail__result img {
  width: 100%;
  border-radius: 8px;
  cursor: zoom-in;
  background: rgba(255, 255, 255, 0.05);
}

.history-detail__result .poster-form__hint {
  text-align: center;
}

.history-detail__failure {
  margin: 0;
  padding: 12px 14px;
  border-radius: 8px;
  background: rgba(214, 69, 69, 0.14);
  border: 1px solid rgba(214, 69, 69, 0.45);
  color: #f87171;
  font-size: 13px;
}

.history-detail__materials {
  margin-top: 16px;
}

.history-detail__materials h4 {
  margin: 0 0 10px;
  font-size: 15px;
}

.history-detail__material-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.history-detail__material-grid img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 6px;
  cursor: zoom-in;
  background: rgba(255, 255, 255, 0.06);
}

/* ===== AI海报工作台：移动端适配 ===== */

/* ---------- 平板及以下（≤1080px） ---------- */

@media (max-width: 1080px) {
  /* .page-shell 的 overflow:hidden 会让 position:sticky 失去参照视口，
     导致底部“提交生成”条无法常驻；工作台自身不需要裁剪溢出 */
  .poster-workbench {
    overflow: visible;
  }

  /* 弹窗打开时锁定背景滚动（:has 不支持时退化为原行为） */
  html:has(.history-modal:not([hidden])),
  html:has(.poster-detail:not([hidden])),
  html:has(.history-detail:not([hidden])),
  html:has(.generation-overlay:not([hidden])),
  html:has(.image-viewer:not([hidden])),
  body:has(.history-modal:not([hidden])),
  body:has(.poster-detail:not([hidden])),
  body:has(.history-detail:not([hidden])),
  body:has(.generation-overlay:not([hidden])),
  body:has(.image-viewer:not([hidden])) {
    overflow: hidden;
  }

  .poster-templates-scroll,
  .history-modal__body {
    -webkit-overflow-scrolling: touch;
  }
}

/* 触屏设备：悬停位移会在点按后残留，统一关闭 */
@media (hover: none) {
  .poster-history__card:hover,
  .poster-template.is-selected {
    transform: none;
  }
}

/* 手机横屏等矮窗口：先压缩模板滚动区，避免面板高于屏幕 */
@media (min-width: 761px) and (max-width: 1080px) and (max-height: 520px) {
  .poster-templates-scroll {
    max-height: 300px;
  }
}

/* ---------- 手机（≤760px） ---------- */

@media (max-width: 760px) {
  /* 页面底部不再露出 body 白底 */
  body:has(.poster-workbench) {
    background: #060708;
  }

  .poster-workbench {
    min-height: 100vh;
    min-height: 100dvh;
    padding: 12px max(12px, env(safe-area-inset-left)) calc(28px + env(safe-area-inset-bottom))
      max(12px, env(safe-area-inset-right));
  }

  /* --- 头部：折成两行，避免用户/积分/充值被挤成竖排文字 --- */
  .poster-workbench__header {
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 12px;
    padding: 2px 0 12px;
  }

  .poster-workbench__header .brand {
    flex: 1 1 auto;
    gap: 8px;
  }

  .poster-workbench .brand__logo {
    width: 32px;
    height: 32px;
    border-radius: 8px;
  }

  .poster-workbench .brand strong {
    font-size: 15px;
    white-space: normal;
  }

  .poster-workbench__header-right {
    flex: 1 1 100%;
    gap: 8px;
    min-width: 0;
  }

  .poster-workbench__user {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .poster-workbench__balance {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    min-height: 36px;
    padding: 0 12px;
    font-size: 13px;
  }

  /* 站点级 .button 在 760px 下是整行宽（width:100%），头部小按钮必须还原为自适应宽度 */
  .poster-workbench__header-right .button {
    flex: 0 0 auto;
    width: auto;
    min-height: 40px;
    padding: 0 16px;
    font-size: 13px;
  }

  /* --- 状态区（未登录 / 加载中 / 失败） --- */
  .poster-workbench__state {
    padding: 40px 8px;
    font-size: 14px;
  }

  .poster-workbench__state .button {
    max-width: 260px;
    margin: 12px auto 0;
  }

  /* --- 面板与分栏 --- */
  .poster-workbench__body {
    gap: 14px;
    padding: 14px 0 28px;
  }

  .poster-workbench__grid {
    gap: 14px;
  }

  .poster-panel {
    padding: 14px;
    border-radius: 12px;
  }

  .poster-panel__head {
    flex-wrap: wrap;
    gap: 8px 10px;
    margin-bottom: 12px;
  }

  .poster-panel__title {
    font-size: 16px;
  }

  /* 触控目标：面板头胶囊按钮补足到 40px */
  .poster-pill {
    min-height: 40px;
    padding: 0 14px;
  }

  /* --- 模板搜索 --- */
  .poster-templates-search {
    width: 100%;
    margin-bottom: 12px;
  }

  .poster-templates-search__input {
    width: 100%;
    padding: 12px 40px;
    /* 16px 起：iOS 聚焦输入框时不会自动放大整页 */
    font-size: 16px;
  }

  .poster-templates-search__clear {
    right: 6px;
    width: 28px;
    height: 28px;
    font-size: 15px;
  }

  /* --- 模板列表：窄屏两列，仍以内层滚动为准（“加载更多”依赖它作为 IntersectionObserver 根） --- */
  .poster-templates-scroll {
    max-height: 52vh;
    max-height: max(52dvh, 240px);
    /* 触屏允许滚动链回页面，避免“滚到底就卡住” */
    overscroll-behavior: auto;
  }

  .poster-templates {
    grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
    gap: 10px;
  }

  .poster-template {
    gap: 6px;
    padding: 8px;
    border-radius: 8px;
  }

  .poster-template__name {
    display: -webkit-box;
    overflow: hidden;
    font-size: 13px;
    line-height: 1.35;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .poster-template__points {
    font-size: 11px;
  }

  .poster-templates-empty {
    padding: 28px 12px;
  }

  .poster-templates-empty .button {
    max-width: 220px;
    margin: 0 auto;
  }

  .poster-templates-more__button {
    min-height: 40px;
    padding: 8px 16px;
  }

  /* --- 生成信息表单 --- */
  .poster-form__selected {
    margin-bottom: 14px;
    padding: 10px 12px;
    font-size: 13px;
  }

  .poster-form__label,
  .poster-form__variable {
    font-size: 13px;
  }

  .poster-form__variable input,
  .poster-form__additional textarea {
    padding: 12px;
    /* 16px 起：iOS 聚焦不缩放整页 */
    font-size: 16px;
  }

  .poster-form__variable input {
    min-height: 46px;
    /* 键盘弹出后 scrollIntoView 不会把输入框顶到贴边 */
    scroll-margin-block: 120px;
  }

  .poster-form__additional textarea {
    min-height: 96px;
  }

  .poster-materials {
    gap: 8px;
  }

  .poster-materials__item,
  .poster-materials__item img {
    width: 76px;
  }

  .poster-materials__item img {
    height: 76px;
  }

  .poster-materials__remove {
    top: -8px;
    right: -8px;
    width: 28px;
    height: 28px;
    font-size: 15px;
  }

  .poster-materials__progress {
    bottom: 22px;
    padding: 0 4px;
  }

  .poster-materials__retry {
    min-height: 32px;
    padding: 4px 12px;
  }

  .poster-materials__picker {
    padding: 22px 14px;
  }

  .poster-materials__picker svg {
    width: 28px;
    height: 28px;
  }

  /* 提交区常驻底部：长表单不必滚到底才能生成（错误提示同步移入该区域） */
  .poster-form__actions {
    position: sticky;
    bottom: 0;
    z-index: 3;
    margin-top: 16px;
    padding: 12px 0 calc(12px + env(safe-area-inset-bottom));
    background: linear-gradient(180deg, rgba(9, 11, 13, 0), rgba(9, 11, 13, 0.94) 45%);
    backdrop-filter: blur(8px);
  }

  .poster-form__actions .button {
    min-height: 48px;
    font-size: 15px;
  }

  .poster-form__error {
    margin: 0 0 10px;
  }

  /* --- 模板详情 / 生成历史 / 生成记录详情：贴近满屏 --- */
  .history-modal,
  .poster-detail,
  .history-detail,
  .generation-overlay {
    padding: 10px;
    padding-bottom: calc(10px + env(safe-area-inset-bottom));
  }

  .history-modal__panel,
  .poster-detail__panel,
  .history-detail__panel {
    width: 100%;
    max-height: 88vh;
    max-height: 88dvh;
    padding: 16px 14px;
    border-radius: 14px;
  }

  .history-modal__panel {
    max-height: 92vh;
    max-height: 92dvh;
  }

  .history-modal__head {
    gap: 8px;
    margin-bottom: 12px;
  }

  .history-modal__head h3 {
    font-size: 16px;
  }

  .history-modal__refresh {
    min-height: 36px;
    padding: 0 12px;
    font-size: 12px;
  }

  .history-modal__close,
  .poster-detail__close,
  .history-detail__close {
    top: 8px;
    right: 8px;
    width: 40px;
    height: 40px;
    font-size: 22px;
  }

  .history-modal__body {
    padding: 4px 2px;
  }

  .history-modal__body .poster-form__hint {
    padding: 22px 0;
  }

  .history-detail__refresh {
    top: 8px;
    right: 54px;
    height: 40px;
    font-size: 12px;
  }

  .history-detail__panel h3 {
    padding-right: 106px;
    font-size: 17px;
  }

  .history-detail__material-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  /* 固定比例：详情接口返回后换图（列表缩略图 → 详情图）不再改变弹窗高度，
     避免下方“使用此模板”按钮位移造成误触 */
  .poster-detail__cover img {
    aspect-ratio: 3 / 4;
    max-height: 40vh;
    max-height: 40dvh;
  }

  .poster-detail__head h3 {
    font-size: 17px;
  }

  .poster-detail__gallery {
    gap: 6px;
  }

  /* 主操作吸底：效果图等异步内容在下方加载/重建时，按钮位置恒定；
     深色光晕与面板底色一致，用于遮挡从其下方滚过的内容 */
  .poster-detail__use {
    position: sticky;
    bottom: 0;
    z-index: 2;
    min-height: 46px;
    margin-top: 14px;
    box-shadow: 0 -12px 18px 14px rgba(16, 19, 23, 0.94), 0 10px 22px rgba(255, 212, 0, 0.2);
  }

  /* --- 提交成功浮层 --- */
  .generation-overlay__panel {
    width: 100%;
    padding: 26px 18px 20px;
  }

  .generation-overlay__check {
    width: 56px;
    height: 56px;
    margin-bottom: 12px;
    font-size: 28px;
  }

  .generation-overlay__panel h3 {
    font-size: 18px;
  }

  .generation-overlay__panel p {
    margin-bottom: 18px;
    font-size: 13px;
  }

  .generation-overlay__actions .button {
    width: 100%;
    min-height: 46px;
  }

  /* --- 图片预览灯箱 --- */
  .image-viewer__image {
    max-width: 96vw;
    max-height: 74vh;
    max-height: 74dvh;
  }

  .image-viewer__counter {
    top: max(14px, env(safe-area-inset-top));
    font-size: 12px;
  }

  .image-viewer__close {
    top: max(10px, env(safe-area-inset-top));
    right: 10px;
    width: 42px;
    height: 42px;
  }

  .image-viewer__nav {
    width: 38px;
    height: 38px;
    font-size: 22px;
  }

  .image-viewer__nav--prev {
    left: 6px;
  }

  .image-viewer__nav--next {
    right: 6px;
  }

  /* --- 触控：消除双击缩放判定，点按响应更快 --- */
  .poster-pill,
  .poster-template,
  .poster-templates-more__button,
  .poster-materials__picker,
  .poster-materials__remove,
  .poster-materials__retry,
  .history-modal__refresh,
  .history-modal__close,
  .poster-detail__close,
  .history-detail__refresh,
  .history-detail__close,
  .image-viewer__close,
  .image-viewer__nav {
    touch-action: manipulation;
  }

  /* --- 入场动画：窄屏收字距，避免标题溢出 --- */
  .ai-launch__title {
    font-size: clamp(26px, 9vw, 46px);
    letter-spacing: 0.28em;
    text-indent: 0.28em;
  }

  .ai-launch__ring {
    width: 170px;
    height: 170px;
  }

  .ai-launch__sub {
    font-size: 12px;
    letter-spacing: 0.12em;
  }

  .ai-launch__bar {
    bottom: 10vh;
    bottom: 10dvh;
  }
}

/* 窄屏标题动画：动画会覆盖普通声明，末帧字距需与窄屏静态值一致；
   限定 no-preference，避免覆盖站点级 prefers-reduced-motion 的 animation:none */
@media (max-width: 760px) and (prefers-reduced-motion: no-preference) {
  .ai-launch__title {
    animation-name: ai-launch-title-narrow;
  }
}

@keyframes ai-launch-title-narrow {
  0% {
    opacity: 0;
    letter-spacing: 0.6em;
    filter: blur(8px);
  }
  100% {
    opacity: 1;
    letter-spacing: 0.28em;
    filter: blur(0);
  }
}

/* ---------- 小屏手机（≤380px） ---------- */

@media (max-width: 380px) {
  .poster-workbench {
    padding-left: max(10px, env(safe-area-inset-left));
    padding-right: max(10px, env(safe-area-inset-right));
  }

  .poster-templates {
    grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
    gap: 8px;
  }

  .poster-materials__item,
  .poster-materials__item img {
    width: 68px;
  }

  .poster-materials__item img {
    height: 68px;
  }

  .poster-materials__progress {
    bottom: 20px;
  }
}

/* ---------- 触屏平板（761–1080px，如 iPad 竖屏） ---------- */
/* 该区间手机断点不生效，单独按触控尺寸补足；桌面浏览器（hover:hover）不受影响 */
@media (hover: none) and (min-width: 761px) and (max-width: 1080px) {
  .poster-templates-search__input,
  .poster-form__variable input,
  .poster-form__additional textarea {
    font-size: 16px;
  }

  .poster-materials__remove {
    width: 26px;
    height: 26px;
  }

  .poster-pill,
  .poster-templates-more__button {
    min-height: 40px;
  }

  .poster-form__actions {
    display: grid;
  }

  /* 触屏上提交按钮给足宽度，但不必横跨整个平板宽度 */
  .poster-form__actions .button {
    width: 100%;
    max-width: 360px;
    margin-inline: auto;
  }

  .history-modal__close,
  .poster-detail__close,
  .history-detail__close {
    width: 36px;
    height: 36px;
    font-size: 20px;
  }

  .history-detail__refresh {
    right: 58px;
    height: 36px;
  }
}
