/* OOTD 响应式布局（bf style.css 未扫到的工具类补齐） */

/* 着陆页：比应用页更早变宽，桌面四列成片不挤 */
.ootd-landing.bf-shell {
  max-width: 36rem;
}
@media (min-width: 768px) {
  .ootd-landing.bf-shell {
    max-width: 52rem;
  }
}
@media (min-width: 1024px) {
  .ootd-landing.bf-shell {
    max-width: 72rem;
  }
}

/* 首屏：桌面居中 + 字号阶梯（style.css 缺 sm:text-[44px] / md:text-[52px]） */
.ootd-landing .ootd-hero {
  max-width: 42rem;
}
.ootd-landing .ootd-hero h1 {
  font-size: 2.25rem; /* 36 */
  line-height: 1.12;
}
.ootd-landing .ootd-sticky {
  margin-bottom: 1.5rem;
}
/* 「看例子」锚点不被粘顶挡住 */
.ootd-landing #samples,
.ootd-landing #delivery {
  scroll-margin-top: 4.75rem;
}
@media (min-width: 640px) {
  .ootd-landing .ootd-hero h1 {
    font-size: 2.75rem; /* 44 */
  }
}
@media (min-width: 768px) {
  .ootd-landing .ootd-hero h1 {
    font-size: 3.25rem; /* 52 */
  }
  .ootd-landing .ootd-sticky {
    margin-bottom: 2.5rem;
  }
}
@media (min-width: 1024px) {
  .ootd-landing .ootd-hero {
    max-width: 48rem;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
  }
  .ootd-landing .ootd-hero .ootd-hero-cta {
    justify-content: center;
  }
  .ootd-landing .ootd-hero .ootd-hero-lead {
    margin-left: auto;
    margin-right: auto;
  }
}

/* 发帖序图组：手机横滑 → 平板 2×2 → 桌面四列 */
.ootd-post-grid {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 0.25rem;
  scrollbar-width: thin;
}
.ootd-post-grid::-webkit-scrollbar {
  height: 4px;
}
.ootd-post-grid::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.15);
  border-radius: 999px;
}
.ootd-post-grid > * {
  flex: 0 0 min(46vw, 10.5rem);
  scroll-snap-align: start;
  min-width: 0;
}
@media (min-width: 640px) {
  .ootd-post-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.625rem;
    overflow: visible;
    scroll-snap-type: none;
    padding-bottom: 0;
  }
  .ootd-post-grid > * {
    flex: unset;
    width: auto;
  }
}
@media (min-width: 1024px) {
  .ootd-post-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
  }
}

.ootd-lookset-stack {
  display: grid;
  gap: 1rem;
}
/* 宽屏：样例两列；卡内仍用 2×2 图组，避免四列挤扁 */
@media (min-width: 1024px) {
  .ootd-lookset-stack {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
  }
  .ootd-lookset-stack .ootd-post-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  /* 奇数末卡满宽 + 四列图，消除空窗 */
  .ootd-lookset-stack > *:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
  .ootd-lookset-stack > *:last-child:nth-child(odd) .ootd-post-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* 结果页发帖舞台：手机全宽，桌面限宽居中 */
.ootd-phone-stage {
  position: relative;
  border-radius: 1.35rem;
  overflow: hidden;
  background: #111;
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.28);
  aspect-ratio: 3 / 4;
  width: 100%;
  max-width: 22rem;
  margin-left: auto;
  margin-right: auto;
}
@media (min-width: 640px) {
  .ootd-phone-stage {
    max-width: 26rem;
  }
}
.ootd-phone-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  pointer-events: none;
  z-index: 2;
}

/* 灯箱：小屏少占边距 */
.ootd-lightbox-stage {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  padding: 0 2.75rem 1.25rem;
}
@media (min-width: 640px) {
  .ootd-lightbox-stage {
    padding: 0 4rem 1.5rem;
  }
}
.ootd-lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  height: 2.5rem;
  width: 2.5rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
@media (min-width: 640px) {
  .ootd-lightbox-nav {
    height: 2.75rem;
    width: 2.75rem;
  }
}
.ootd-lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.22);
}
.ootd-lightbox-nav.prev { left: 0.35rem; }
.ootd-lightbox-nav.next { right: 0.35rem; }
@media (min-width: 640px) {
  .ootd-lightbox-nav.prev { left: 0.75rem; }
  .ootd-lightbox-nav.next { right: 0.75rem; }
}

/* 确认/创建弹层：手机底栏，≥640 居中卡片（style.css 缺 sm:inset-0 / sm:max-w-md） */
.ootd-sheet-frame {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
}
.ootd-sheet-panel {
  width: 100%;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 28px 28px 0 0;
  padding: 1.25rem;
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.35);
}
.ootd-sheet-panel .ootd-sheet-grab {
  display: block;
  width: 2.5rem;
  height: 0.25rem;
  margin: 0 auto 0.75rem;
  border-radius: 9999px;
  background: rgba(0, 0, 0, 0.1);
}
@media (min-width: 640px) {
  .ootd-sheet-frame {
    inset: 0;
    bottom: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
  }
  .ootd-sheet-panel {
    max-width: 28rem;
    border-radius: 28px;
    padding: 1.5rem;
  }
  .ootd-sheet-panel .ootd-sheet-grab {
    display: none;
  }
}

/* 应用页：桌面别拉到 64rem，表单/列表保持可读宽度 */
.ootd-app {
  width: 100%;
  max-width: 36rem;
  margin-left: auto;
  margin-right: auto;
}
@media (min-width: 1024px) {
  .ootd-app {
    max-width: 40rem;
  }
}

/* 粘底 CTA：平板别拉满屏宽 */
.ootd-sticky-cta {
  width: 100%;
  max-width: 28rem;
}

/* 发帖预览卡圆角（style.css 缺 md:rounded-[28px]） */
@media (min-width: 768px) {
  .ootd-delivery-card {
    border-radius: 28px;
  }
  .ootd-bottom-cta {
    margin-top: 4rem;
  }
}

/* 结果舞台：键盘焦点可见 */
.ootd-phone-stage:focus-visible {
  outline: 2px solid rgba(190, 18, 60, 0.55);
  outline-offset: 3px;
}

/* 充值页：套餐两列（style.css 缺 sm:grid-cols-2） */
.ootd-pkg-grid {
  display: grid;
  gap: 0.75rem;
}
@media (min-width: 640px) {
  .ootd-pkg-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
  }
}

/* 着陆 WHY：两列（同上） */
.ootd-why-grid {
  display: grid;
  gap: 0.75rem;
}
@media (min-width: 640px) {
  .ootd-why-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.875rem;
  }
}

/* 结果页胶片条标签 */
.ootd-slide-label {
  position: absolute;
  left: 0.35rem;
  bottom: 0.35rem;
  border-radius: 9999px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 9px;
  font-weight: 600;
  padding: 0.15rem 0.4rem;
  pointer-events: none;
}

/* 弹层入场 */
@keyframes ootd-sheet-up {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (min-width: 640px) {
  .ootd-sheet-panel {
    animation: ootd-sheet-up 0.28s cubic-bezier(0.16, 1, 0.3, 1) both;
  }
}
@media (prefers-reduced-motion: reduce) {
  .ootd-sheet-panel { animation: none; }
}
