/* =============================================================================
   喵喵花生酱 · 样式表
   视觉：薰衣草紫底 + 薄荷条纹顶栏 + 白描边圆体标题 + 贴纸感作品卡（2026-09 设计稿）
   ============================================================================= */

:root {
  /* 底色 */
  --bg: #dbdbff;              /* 页面薰衣草紫（设计稿取色） */
  --bg-stripe: #e1e0ff;       /* 现货区条纹的亮条 */
  --bg-deep: #cfcff7;         /* 页脚、分隔 */
  --card: #cac9f5;            /* 作品卡内底 */
  --white: #ffffff;
  --line: #c4c2ee;

  /* 顶栏条纹 */
  --stripe-a: #d5d5fd;
  --stripe-b: #d3e3e3;

  /* 文字 */
  --ink: #2e2745;             /* 正文 */
  --mute: #5c5c79;            /* 次要文字（设计稿里的接单状态色，在紫底上 4.78:1） */
  --title: #3e0c62;           /* 大标题深紫（10.9:1） */
  --title-soft: #9d8bbf;      /* 区块标题的淡紫描边色（设计稿取色） */
  --teal: #2a6170;            /* 导航（设计稿 #2f6a79 在条纹上 4.41:1，略压深到达标） */
  --teal-soft: #47666b;       /* logo 副标题（设计稿 #729aa1 只有 2.23:1，压深） */

  /* 紫色按钮。设计稿的 #a385cc 配白字只有 3.1:1，只能用在 24px 以上的大字按钮；
     普通尺寸的按钮用压深一档的 #8963be（4.57:1）。 */
  --lilac: #a385cc;
  --lilac-strong: #8963be;
  --lilac-strong-hover: #7651ad;
  --lilac-text: #816ca7;      /* 白底上的淡紫字，小字用（4.53:1） */
  --lilac-text-lg: #9b8ab9;   /* 白底上的淡紫字，大字用（设计稿原色，3.1:1） */

  /* 字体。圆体是自托管子集（css/fonts.css，由 deploy/gen_fonts.py 生成），
     子集里没有的字退到系统圆体（苹果：圆体-简；Windows：幼圆），再退到黑体。 */
  --round: "MeowPeanut Round", "Yuanti SC", "YouYuan", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", sans-serif;
  --sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Noto Sans CJK SC",
    "Source Han Sans SC", sans-serif;
  /* 接单状态那行用宋体（设计稿如此）。Georgia 放最前面：它没有汉字，汉字会落到后面的宋体；
     不放的话英文版会用中易宋体（SimSun）自带的英文字母——那是等宽的，像打字机。 */
  --song: Georgia, "Songti SC", "STSong", "SimSun", serif;

  --radius: 14px;
  --radius-card: 28px;
  --shadow: 0 14px 30px -24px rgba(62, 12, 98, 0.45);

  /* 白色描边：用 text-shadow 叠 8 个方向，比 -webkit-text-stroke 兼容面广，
     而且描边画在字外面，不会把细字体吃得更细。 */
  --outline-2: 2px 0 #fff, -2px 0 #fff, 0 2px #fff, 0 -2px #fff, 1.4px 1.4px #fff, -1.4px -1.4px #fff,
    1.4px -1.4px #fff, -1.4px 1.4px #fff;
  /* 区块标题：白色字身 + 淡紫描边（空心贴纸字），和大标题正好相反 */
  --outline-lilac: 2px 0 var(--title-soft), -2px 0 var(--title-soft), 0 2px var(--title-soft),
    0 -2px var(--title-soft), 1.4px 1.4px var(--title-soft), -1.4px -1.4px var(--title-soft),
    1.4px -1.4px var(--title-soft), -1.4px 1.4px var(--title-soft);
}

/* ---------- 基础 ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  height: 100%;
}

html,
body {
  margin: 0;
}

body {
  min-height: 100%;
  color: var(--ink);
  background: var(--bg);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

[hidden] {
  display: none !important;
}

h1,
h2,
h3 {
  font-family: var(--round);
  line-height: 1.3;
}

h1 {
  margin: 0 0 12px;
  color: var(--title);
  font-weight: 350;
  font-size: clamp(1.9rem, 3.2vw, 2.6rem);
  text-shadow: var(--outline-2);
}

h2 {
  margin: 0 0 12px;
  color: var(--title);
  font-weight: 500;
  font-size: 1.35rem;
}

h3 {
  font-weight: 500;
}

.wrap {
  width: min(1280px, calc(100% - 40px));
  margin-inline: auto;
}

.sr-only,
.seo-panel,
.hotspot-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.muted {
  margin: 0;
  color: var(--mute);
  font-size: 0.92rem;
}

/* ---------- 入口页（index.html 海边小店大图）—— 这次改版不动 ---------- */

body.home,
body.home main {
  height: 100%;
}

body.home {
  overflow: hidden;
  background: #e4d3bf;
}

.hero {
  position: relative;
  margin: 0;
  width: 100%;
  height: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
}

/* 舞台：尺寸等于图片按 cover 缩放后的真实渲染框，可以溢出 .hero 被裁掉。
   以前热区直接用视口百分比定位，而图是 object-fit: cover ——
   视口宽高比一变，图的裁剪范围就变，热区却不动，于是漂到画面别处去。
   把热区放进这个舞台后，百分比相对的是图片本身，任何比例下都对得上。
   cover 宽度 = max(容器宽, 容器高 × 图片宽高比)；aspect-ratio 再定出高度。
   right/top+translateY 对应原来的 object-position: center right。 */
.hero-stage {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: max(100%, calc(100vh * 16 / 9));
  width: max(100%, calc(100dvh * 16 / 9));
  aspect-ratio: 16 / 9;
}

.hero-img {
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
}

.hotspot {
  position: absolute;
  z-index: 6;
  display: block;
  border-radius: 12px;
  border: 2px solid rgba(255, 246, 214, 0.92);
  background: rgba(255, 246, 214, 0.04);
  cursor: pointer;
}

/* 相对 .hero-stage（也就是相对图片）定位，对应横图里的「点击进店」木牌。
   放在基础规则而不是 @media (min-width: 861px) 里：视口宽度可能是
   860.5px 这种小数，那样两个媒体查询都不匹配，热区会没有位置。 */
.hotspot-enter {
  left: 57.4%;
  top: 63.6%;
  width: 6.8%;
  height: 16.2%;
}

.hotspot-enter:focus-visible {
  outline: 3px solid #fff6d6;
  outline-offset: 4px;
  background: rgba(255, 246, 214, 0.22);
}

.hotspot-enter::after {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 12px;
  animation: enter-pulse 2.2s ease-out infinite;
  pointer-events: none;
}

@keyframes enter-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 220, 120, 0.45);
  }
  100% {
    box-shadow: 0 0 0 16px rgba(255, 220, 120, 0);
  }
}

/* ---------- 页头 ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: repeating-linear-gradient(
    135deg,
    var(--stripe-a) 0 13px,
    var(--stripe-b) 13px 26px
  );
}

.header-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px clamp(40px, 8vw, 120px);
  width: min(1380px, calc(100% - 32px));
  min-height: 82px;
  margin-inline: auto;
}

.brand {
  display: inline-grid;
  justify-items: center;
  gap: 2px;
  padding: 6px 0;
}

.brand img {
  width: 222px;
  height: auto;
}

.brand-sub {
  color: var(--teal-soft);
  font-family: var(--round);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
}

.nav-main {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 36px;
  font-family: var(--round);
  font-size: 1.15rem;
}

.nav-main a {
  color: var(--teal);
  padding: 4px 0;
  border-bottom: 2px solid transparent;
}

.nav-main a.is-active,
.nav-main a:hover {
  border-bottom-color: currentColor;
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 18px;
  font-family: var(--round);
}

.header-tools > a {
  color: var(--teal);
}

.header-tools > a:hover {
  text-decoration: underline;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #5e5580;
  font-size: 1rem;
}

.lang-switch a {
  padding: 2px 4px;
  border-radius: 6px;
}

.lang-switch a:hover {
  background: rgba(255, 255, 255, 0.55);
}

.lang-switch a[aria-current="true"] {
  color: var(--title);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.nav-toggle {
  display: none;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
  color: var(--teal);
  font-family: var(--round);
  cursor: pointer;
}

/* ---------- 页脚 ---------- */

.site-footer {
  margin-top: 48px;
  background: var(--bg-deep);
  color: var(--mute);
  font-size: 0.88rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  align-items: center;
  padding: 18px 0;
}

.footer-inner a:hover {
  color: var(--ink);
  text-decoration: underline;
}

/* ---------- 横幅 / 提示 ---------- */

.preview-banner {
  background: #fff3c4;
  font-size: 0.88rem;
}

.preview-banner .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  align-items: center;
  padding: 10px 0;
}

/* 关掉 JS 时的提示。页头导航是 frame.js 注入的，没有 JS 时页面上一个链接都没有 */
.noscript-note {
  width: min(1280px, calc(100% - 40px));
  margin: 16px auto;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}

.noscript-note p {
  margin: 4px 0;
}

.noscript-note a {
  text-decoration: underline;
}

.notice,
.summary {
  margin-top: 16px;
  padding: 16px 18px;
  border-radius: var(--radius);
  background: var(--white);
  border: 1px solid var(--line);
}

.empty {
  padding: 24px;
  border: 2px dashed var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.7);
  color: var(--mute);
}

.field-error {
  color: #8a2a3d;
  font-size: 0.9rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: #efeafd;
  color: var(--ink);
  font-size: 0.75rem;
}

.badge-leaf {
  background: #dff0ee;
}

/* ---------- 按钮 ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border: 0;
  border-radius: var(--radius);
  background: var(--lilac-strong);
  color: var(--white);
  font-family: var(--round);
  font-weight: 500;
  cursor: pointer;
}

.btn:hover {
  background: var(--lilac-strong-hover);
}

/* 白底淡紫字。.btn-ghost 是旧名字，页面脚本里还在用，保留为同义 */
.btn-soft,
.btn-ghost {
  background: var(--white);
  color: var(--lilac-text);
  border: 1px solid transparent;
}

.btn-soft:hover,
.btn-ghost:hover {
  background: #f4f0ff;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* 设计稿尺寸的大按钮：字号 ≥ 24px 算"大字"，可以用设计稿原色 */
.btn-lg {
  min-height: 44px;
  padding: 0 14px;
  border-radius: 10px;
  background: var(--lilac);
  font-size: 1.6rem;
  font-weight: 350;
  line-height: 1.2;
}

.btn-lg.btn-soft {
  background: var(--white);
  color: var(--lilac-text-lg);
}

.btn-small {
  min-height: 36px;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 1.15rem;
  font-weight: 350;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------- 标题样式 ---------- */

/* 「娃衣作品」「购买现货」这类区块标题：白色字身 + 淡紫描边。
   注意和大标题（深紫字身 + 白描边）是反过来的，对照设计稿放大确认过。 */
.section-title {
  margin: 0 0 40px;
  color: var(--white);
  font-weight: 350;
  font-size: clamp(1.6rem, 2.3vw, 2rem);
  text-shadow: var(--outline-lilac);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  color: #371260;
  font-family: var(--round);
  font-weight: 350;
  font-size: 1.5rem;
}

.eyebrow img {
  width: auto;
  height: 1.3em;
}

/* ---------- 首页（shop.html） ---------- */

.shop-home .wrap {
  width: min(1345px, calc(100% - 64px));
}

.home-hero {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  column-gap: 40px;
  padding: 64px 0 40px;
}

.home-hero h1 {
  max-width: 11em;
  margin: 0 0 18px;
  white-space: pre-line;
  font-size: clamp(2.2rem, 3.9vw, 3.5rem);
  line-height: 1.22;
  letter-spacing: 0.01em;
}

/* 英文标题更长，同样的字号会换成三四行 */
html[lang="en"] .home-hero h1 {
  max-width: 15em;
  font-size: clamp(2rem, 3.3vw, 3rem);
}

.hero-mascot {
  align-self: center;
  width: 104px;
  margin-top: -40px;
}

.order-status {
  margin: 0 0 30px;
  color: var(--mute);
  font-family: var(--song);
  font-size: 1rem;
}

.order-status a {
  color: var(--lilac-text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.home-hero .actions {
  gap: 64px;
}

.home-section {
  padding: 120px 0 124px;
}

.home-stock {
  padding: 28px 0 150px;
  background: repeating-linear-gradient(135deg, var(--bg) 0 25px, var(--bg-stripe) 25px 50px);
}

/* ---------- 轮播 ---------- */

.carousel-track {
  --per-view: 4;
  --gap: 25px;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - (var(--per-view) - 1) * var(--gap)) / var(--per-view));
  gap: var(--gap);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  padding: 4px 2px 8px;
}

.carousel-track::-webkit-scrollbar {
  display: none;
}

.carousel-track > * {
  scroll-snap-align: start;
}

.carousel-track:focus-visible {
  outline: 3px solid var(--lilac-strong);
  outline-offset: 6px;
  border-radius: var(--radius-card);
}

.carousel-foot {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  margin-top: 40px;
}

.carousel-dots {
  grid-column: 2;
  display: flex;
  gap: 14px;
}

.carousel-dots button {
  width: 18px;
  height: 18px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--white);
  cursor: pointer;
}

.carousel-dots button[aria-current="true"] {
  background: var(--lilac-strong);
}

.carousel-foot > .btn {
  grid-column: 3;
  justify-self: end;
}

/* ---------- 作品卡：紫色内底 + 白色粗边框，有贴纸图就放贴纸 ---------- */

.work-tile {
  position: relative;
  display: block;
  aspect-ratio: 308 / 414;
  overflow: hidden;
  border: 7px solid var(--white);
  border-radius: var(--radius-card);
  background: var(--card);
  box-shadow: var(--shadow);
  transition: transform 0.18s ease;
}

.work-tile:hover,
.work-card:hover .work-tile {
  transform: translateY(-3px);
}

.work-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.work-tile.is-sticker img {
  padding: 8% 10% 5%;
  object-fit: contain;
}

.work-tile .ph {
  height: 100%;
  min-height: 0;
  border-radius: 0;
  background: transparent;
}

.work-card {
  display: block;
}

.work-card .card-body {
  padding: 12px 6px 4px;
}

.work-card h3 {
  margin: 0 0 2px;
  font-size: 1.05rem;
  color: var(--ink);
}

.work-card p {
  margin: 0;
  color: var(--mute);
  font-size: 0.88rem;
}

/* ---------- 商品卡 / 现货卡：白底圆角 ---------- */

.card {
  display: block;
  overflow: hidden;
  border-radius: var(--radius-card);
  background: var(--white);
  box-shadow: var(--shadow);
}

.card-body {
  padding: 14px 16px 18px;
}

.card h3 {
  margin: 8px 0 4px;
  font-size: 1.05rem;
}

.card p {
  margin: 0;
  color: var(--mute);
  font-size: 0.92rem;
}

.card-photo {
  display: block;
  width: 100%;
  aspect-ratio: 208 / 257;
  object-fit: cover;
  background: var(--white);
}

.price {
  margin-top: 6px;
  color: var(--ink);
  font-weight: 600;
}

/* 现货区没有商品时：说明文字 + 一排淡化的小猫素体占位（纯装饰，不可点） */
.stock-empty {
  display: grid;
  gap: 24px;
  justify-items: center;
}

.stock-empty p {
  margin: 0;
  color: var(--mute);
  font-family: var(--round);
  font-size: 1.15rem;
}

.stock-placeholders {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 208px));
  gap: 44px;
  justify-content: center;
  width: 100%;
}

.stock-placeholders div {
  display: grid;
  place-items: center;
  aspect-ratio: 208 / 257;
  border-radius: 30px;
  background: var(--white);
  opacity: 0.85;
}

.stock-placeholders img {
  width: 90%;
}

/* ---------- 通用布局 ---------- */

.section {
  padding: 36px 0;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 16px;
}

.section-head a {
  color: var(--lilac-text);
}

.grid-3,
.grid-4 {
  display: grid;
  gap: 24px;
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.works-group {
  padding: 0 0 36px;
}

.works-group .section-head h2 {
  margin: 0;
  color: var(--white);
  font-size: 1.6rem;
  text-shadow: var(--outline-lilac);
}

.ph {
  display: grid;
  place-items: center;
  min-height: 220px;
  padding: 16px;
  border-radius: var(--radius);
  background: var(--card);
  color: var(--mute);
  text-align: center;
}

.ph-quiet {
  min-height: 200px;
}

/* 现货页顶部（ready.html） */
.welcome {
  display: grid;
  gap: 12px;
  padding: 40px 0 20px;
}

.welcome .lede {
  margin: 0 0 16px;
  max-width: 32em;
  color: var(--mute);
}

/* 关于页 */
.creator {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 32px;
  align-items: center;
  padding: 40px 0 20px;
}

.creator-figure {
  margin: 0;
}

.creator-photo {
  width: 100%;
  aspect-ratio: 1024 / 767;
  object-fit: cover;
  object-position: 50% 42%;
  border: 7px solid var(--white);
  border-radius: var(--radius-card);
  background: var(--card);
}

.creator-copy p {
  margin: 0 0 10px;
}

/* ---------- 作品 / 商品详情 ---------- */

.product-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 36px;
  padding: 32px 0 80px;
}

.product-photo,
.work-photo {
  width: 100%;
  height: auto;
  border: 7px solid var(--white);
  border-radius: var(--radius-card);
  background: var(--card);
}

.product-photo {
  min-height: 240px;
  object-fit: cover;
}

.work-photo {
  object-fit: contain;
}

.work-shot {
  margin: 0;
  align-self: start;
}

.work-shot figcaption {
  margin-top: 8px;
  color: var(--mute);
  font-size: 0.875rem;
}

.work-shot.is-reference figcaption,
.work-shot.is-collage figcaption {
  color: var(--ink);
}

.work-more {
  display: grid;
  gap: 28px;
  padding: 0 0 80px;
}

.thumbs {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  margin-top: 10px;
}

.thumbs button {
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
  cursor: pointer;
  font-size: 0.75rem;
}

.thumbs button.is-on {
  border-color: var(--lilac-strong);
  box-shadow: inset 0 0 0 1px var(--lilac-strong);
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.choice {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
  cursor: pointer;
}

.choice.is-on {
  background: var(--lilac-strong);
  color: var(--white);
  border-color: var(--lilac-strong);
}

.buybar {
  display: none;
}

/* ---------- 筛选按钮 ---------- */

.chip,
.filter-desktop button,
.drawer-panel button.chip,
[data-work-filters] button {
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--white);
  color: var(--lilac-text);
  font-family: var(--round);
  cursor: pointer;
}

.chip.is-on,
.filter-desktop button.is-on,
.drawer-panel button.chip.is-on,
[data-work-filters] button.is-on {
  background: var(--lilac-strong);
  color: var(--white);
}

[data-work-filters] {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 0;
}

#open-filter {
  display: none;
}

.drawer {
  display: none;
}

.drawer.is-open {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(46, 39, 69, 0.3);
}

.drawer-panel {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: min(360px, 100%);
  padding: 20px;
  background: var(--bg);
  overflow: auto;
}

/* ---------- 定制表单 ---------- */

.stepper {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin: 0 0 20px;
  color: var(--mute);
  font-family: var(--round);
}

.stepper .is-on {
  color: var(--title);
  font-weight: 500;
}

#custom-form {
  max-width: 760px;
}

label.field {
  display: grid;
  gap: 6px;
  margin-top: 14px;
}

input,
select,
textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
}

input[type="checkbox"] {
  width: auto;
}

.base-card {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 12px;
  align-items: center;
  margin: 0 0 16px;
  padding: 12px;
  border-radius: 18px;
  background: var(--white);
}

.base-photo,
.base-card .ph {
  width: 96px;
  height: 96px;
  min-height: 96px;
  object-fit: cover;
  border-radius: 12px;
}

.previews {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.previews img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 12px;
}

.wizard-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

/* ---------- 购物袋 ---------- */

.bag-row {
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
}

.bag-line {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  align-items: center;
  gap: 12px 16px;
}

.bag-item p {
  margin: 4px 0 0;
}

.bag-qty {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.bag-qty .btn {
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  font-size: 1.1rem;
}

.bag-qty span {
  min-width: 2ch;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.bag-price {
  display: grid;
  justify-items: end;
  min-width: 6em;
  font-variant-numeric: tabular-nums;
}

.bag-price .muted {
  font-size: 0.85rem;
}

.bag-total {
  display: flex;
  justify-content: flex-end;
  align-items: baseline;
  gap: 16px;
  padding: 16px 0 4px;
  font-size: 1.1rem;
  font-variant-numeric: tabular-nums;
}

/* ---------- 响应式 ---------- */

@media (prefers-reduced-motion: reduce) {
  .hotspot-enter::after {
    animation: none;
  }

  .carousel-track {
    scroll-behavior: auto;
  }

  .work-tile {
    transition: none;
  }
}

@media (min-width: 861px) {
  .filter-desktop {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
  }

  .work-more {
    grid-template-columns: 1fr 1fr;
  }

  .work-more .work-shot.is-collage {
    grid-column: 1 / -1;
  }
}

@media (max-width: 1100px) {
  .carousel-track {
    --per-view: 3;
  }

  .stock-placeholders {
    grid-template-columns: repeat(3, minmax(0, 208px));
  }

  .stock-placeholders div:nth-child(n + 4) {
    display: none;
  }
}

@media (max-width: 860px) {
  .wrap {
    width: calc(100% - 36px);
  }

  .header-inner {
    grid-template-columns: 1fr auto;
    gap: 10px 16px;
    min-height: 64px;
  }

  .brand img {
    width: 168px;
  }

  .brand-sub {
    font-size: 0.72rem;
  }

  .nav-main,
  .link-orders {
    display: none;
  }

  .nav-main.is-open {
    display: flex;
    flex-direction: column;
    grid-column: 1 / -1;
    gap: 4px;
    padding: 4px 0 14px;
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
  }

  .header-tools {
    gap: 12px;
  }

  #open-filter {
    display: inline-flex;
  }

  .home-hero {
    grid-template-columns: 1fr;
    padding: 36px 0 24px;
  }

  .home-hero h1 {
    font-size: clamp(2rem, 8vw, 2.6rem);
  }

  html[lang="en"] .home-hero h1 {
    font-size: clamp(1.8rem, 7vw, 2.3rem);
  }

  .hero-mascot {
    grid-row: 1;
    justify-self: end;
    width: 84px;
    margin: 0 0 -24px;
  }

  .home-hero .actions {
    gap: 18px;
  }

  .btn-lg {
    font-size: 1.4rem;
  }

  .home-section {
    padding: 44px 0 24px;
  }

  .home-stock {
    padding: 44px 0 64px;
  }

  .carousel-track {
    --per-view: 2.3;
    --gap: 16px;
  }

  /* 首页那条加宽规则优先级更高，这里要单独压回手机边距 */
  .shop-home .wrap {
    width: calc(100% - 36px);
  }

  .carousel-foot {
    grid-template-columns: 1fr auto;
    gap: 16px;
    margin-top: 24px;
  }

  .carousel-dots {
    grid-column: 1;
  }

  .carousel-foot > .btn {
    grid-column: 2;
  }

  .work-tile {
    border-width: 5px;
    border-radius: 22px;
  }

  .stock-placeholders {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .stock-placeholders div:nth-child(n + 3) {
    display: none;
  }

  .grid-3,
  .grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .creator,
  .product-layout {
    grid-template-columns: 1fr;
  }

  .creator-figure {
    max-width: 320px;
  }

  .choice-grid,
  .thumbs {
    grid-template-columns: 1fr 1fr;
  }

  .buybar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 30;
    display: flex;
    gap: 8px;
    padding: 12px 18px;
    background: var(--bg);
    border-top: 1px solid var(--line);
  }

  /* 这里换成竖图 shop-portrait-*.webp（9:16），舞台比例和锚点都要跟着换。
     原来是 object-position: center top —— 水平居中、垂直贴顶。 */
  .hero-stage {
    right: auto;
    left: 50%;
    top: 0;
    transform: translateX(-50%);
    width: max(100%, calc(100vh * 9 / 16));
    width: max(100%, calc(100dvh * 9 / 16));
    aspect-ratio: 9 / 16;
  }

  /* 竖图里木牌的位置和横图不同，需要单独一组值 */
  .hotspot-enter {
    left: 38.8%;
    top: 67.4%;
    width: 11.6%;
    height: 11.4%;
  }
}

@media (max-width: 560px) {
  .carousel-track {
    --per-view: 1.6;
  }

  /* 手机上一屏一张多一点，16 件作品就是 16 个圆点：一排放不下会把页面撑宽，
     缩小到放得下又小于 24px 的最小点击区。手机本来就靠滑动，右边露出的
     半张卡已经提示还能往右滑，所以这里不显示圆点。 */
  .carousel-dots {
    display: none;
  }

  .carousel-foot > .btn {
    grid-column: 1 / -1;
    justify-self: end;
  }

  .bag-line {
    grid-template-columns: auto 1fr auto;
  }

  .bag-item {
    grid-column: 1 / -1;
  }
}
