/* AI Portrait Studio — 前台樣式（全部以 .aips 命名空間隔離） */
.aips {
  --aips-navy: #10223f;
  --aips-navy-2: #1b355f;
  --aips-blue: #2f6fc4;
  --aips-paper: #faf7f1;
  --aips-card: #ffffff;
  --aips-line: #e7e1d6;
  --aips-ink: #1b2233;
  --aips-muted: #6b7180;
  --aips-gold: #c29b52;
  --aips-gold-soft: #f4ead6;
  --aips-danger: #b4382f;
  --aips-radius: 14px;
  --aips-shadow: 0 18px 40px -18px rgba(16, 34, 63, .35);
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;
  color: var(--aips-ink);
  background: var(--aips-paper);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
.aips *, .aips *::before, .aips *::after { box-sizing: border-box; }
.aips h1, .aips h2, .aips h3 { margin: 0; line-height: 1.25; color: var(--aips-navy); }
.aips p { margin: 0; }
.aips ul, .aips ol { margin: 0; padding: 0; list-style: none; }
.aips button { font: inherit; cursor: pointer; }
.aips [hidden] { display: none !important; }
.aips-wrap { max-width: 1160px; margin: 0 auto; padding: 0 20px; }

/* ---------- Buttons ---------- */
.aips-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 22px; border-radius: 999px; border: 1px solid transparent;
  font-weight: 600; font-size: 15px; text-decoration: none; transition: transform .15s, background .2s, box-shadow .2s;
}
.aips-btn:active { transform: translateY(1px); }
.aips-btn:disabled { opacity: .45; cursor: not-allowed; }
.aips-btn--primary { background: var(--aips-navy); color: #fff; box-shadow: 0 10px 24px -12px rgba(16,34,63,.7); }
.aips-btn--primary:hover:not(:disabled) { background: var(--aips-navy-2); }
.aips-btn--ghost { background: transparent; color: var(--aips-navy); border-color: #cfd5df; }
.aips-btn--ghost:hover { border-color: var(--aips-navy); }
.aips-btn--gold { background: var(--aips-gold); color: #fff; }
.aips-btn--lg { min-height: 54px; padding: 0 30px; font-size: 16px; }
.aips-btn--block { width: 100%; }
.aips-link { background: none; border: 0; color: var(--aips-muted); text-decoration: underline; padding: 8px 0; font-size: 14px; }
.aips :focus-visible { outline: 2px solid var(--aips-blue); outline-offset: 2px; }

/* ---------- HERO ---------- */
/* 有短代碼的頁面：讓外掛區塊滿版 */
/* 區塊佈景主題（如 Twenty Twenty-Five）會以 !important 把內容限制在置中窄欄，這裡需同樣以 !important 才能滿版 */
html:has(body.aips-page), body.aips-page { overflow-x: clip; }
.aips-page .aips {
  width: 100vw; max-width: 100vw !important; box-sizing: border-box;
  margin-left: calc(50% - 50vw) !important; margin-right: calc(50% - 50vw) !important;
}
/* 外掛首頁已有大標題（H1），隱藏佈景主題的頁面標題，避免重複 H1（後台可關閉） */
.aips-hide-title .wp-block-post-title, .aips-hide-title .entry-title, .aips-hide-title .page-title, .aips-hide-title h1.entry-header { display: none !important; }

.aips-hero { position: relative; overflow: hidden; padding: 84px 0 92px; background: #e9dcc7; isolation: isolate; }
.aips-hero__scene {
  position: absolute; z-index: -2; top: -40px; left: -40px; width: calc(100% + 80px); height: calc(100% + 80px);
  max-width: none; object-fit: cover; object-position: 70% 50%; filter: blur(7px) saturate(.92); transform: scale(1.02);
}
.aips-hero__veil {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgba(250,247,241,.97) 0%, rgba(250,247,241,.93) 34%, rgba(250,247,241,.45) 58%, rgba(250,247,241,.08) 100%),
    linear-gradient(0deg, rgba(250,247,241,.6), transparent 30%);
}
.aips-hero__grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: 40px; align-items: center; }
.aips-eyebrow { font-size: 13px; letter-spacing: .14em; color: var(--aips-gold); font-weight: 700; margin-bottom: 18px; }
.aips-hero__title {
  font-family: "Noto Serif TC", "Songti TC", serif; font-weight: 900;
  font-size: clamp(50px, 7vw, 100px); line-height: 1.08; letter-spacing: .02em; color: var(--aips-navy);
}
.aips-hero__title { font-size: clamp(34px, 4.3vw, 64px); line-height: 1.18; }
.aips-nowrap { white-space: nowrap; }
.aips-hero__title em { font-style: normal; color: var(--aips-blue); }
.aips-hero__num {
  display: inline-block; font-family: "Noto Serif TC", serif; font-weight: 900; color: var(--aips-gold);
  font-size: 1.35em; line-height: .8; transform: translateY(.06em); padding: 0 .04em;
}
.aips-hero__tag { margin-top: 18px; font-size: clamp(18px, 2vw, 24px); font-weight: 700; color: var(--aips-blue); letter-spacing: .04em; }
.aips-hero__lead { margin-top: 16px; font-size: 15px; color: #5d6372; max-width: 29em; }
.aips-hero__cta { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 22px; margin-top: 30px; }
.aips-hero__price { font-size: 14px; color: var(--aips-muted); }
.aips-hero__price b { color: var(--aips-navy); font-size: 16px; }
.aips-hero__price i { font-style: normal; margin: 0 8px; color: var(--aips-gold); }
.aips-hero__trust { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 30px; font-size: 13.5px; color: var(--aips-muted); }
.aips-hero__trust li { display: flex; align-items: center; gap: 7px; }
.aips-hero__trust li::before { content: ""; width: 16px; height: 16px; border-radius: 50%; background: var(--aips-gold-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.2l2.2 2.2 4.8-4.8' stroke='%23c29b52' stroke-width='1.8' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") center/16px no-repeat; }

.aips-hero__visual { position: relative; width: 100%; max-width: 600px; aspect-ratio: 1 / 1; margin-left: auto; }

/* 前後對比：生活照 → 正式大頭照 */
.aips-story { aspect-ratio: 600 / 540; }
.aips-snap {
  position: absolute; margin: 0; background: #fff; padding: 8px 8px 0; border-radius: 4px;
  box-shadow: 0 22px 44px -18px rgba(30, 24, 16, .55), 0 2px 6px rgba(30,24,16,.12);
}
.aips-snap img { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; object-position: 50% 35%; }
.aips-snap figcaption { padding: 6px 2px 8px; font-size: 12px; color: var(--aips-muted); text-align: center; font-family: "Noto Sans TC", sans-serif; }
.aips-snap--1 { width: 31%; left: 0; top: 7%; transform: rotate(-8deg); z-index: 1; padding-bottom: 8px; }
.aips-snap--2 { width: 31%; left: 15%; top: 31%; transform: rotate(5deg); z-index: 2; }
.aips-story__arrow { position: absolute; left: 45%; top: 31%; z-index: 6; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.aips-story__arrow-icon {
  width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, #d6b16a, var(--aips-gold)); box-shadow: 0 10px 24px -8px rgba(160, 120, 50, .7);
  animation: aipsNudge 2.4s ease-in-out infinite;
}
.aips-story__arrow-text { font-size: 12.5px; font-weight: 700; color: var(--aips-navy); background: rgba(255,255,255,.9); padding: 2px 10px; border-radius: 999px; }
@keyframes aipsNudge { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(6px); } }
.aips-story__pro { width: 33%; left: 54%; top: 0; transform: rotate(-3deg); z-index: 4; padding: 9px 9px 0; }
.aips-story__age { width: 19%; z-index: 5; padding: 5px 5px 0; }
.aips-story__age figcaption { font-size: 11.5px; padding: 5px 0 6px; }
.aips-story__age--senior { left: 81%; top: 13%; transform: rotate(7deg); }
.aips-story__age--baby { left: 39%; top: 69%; transform: rotate(-7deg); }
.aips-story__pro figcaption { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; font-size: 13.5px; padding: 9px 3px 11px; }
.aips-story__pro figcaption span { font-size: 11.5px; color: var(--aips-blue); }
.aips-story__sheet {
  position: absolute; width: 52%; left: 47%; top: 57%; transform: rotate(4deg); z-index: 3;
  background: #fff; padding: 2.2% 2.2% 0; border-radius: 3px;
  box-shadow: 0 22px 44px -18px rgba(30, 24, 16, .5), 0 2px 6px rgba(30,24,16,.1);
}
.aips-story__sheet-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; aspect-ratio: 210 / 125; align-content: center; padding: 0 12.4%; }
.aips-story__sheet-grid img { display: block; width: 100%; aspect-ratio: 35 / 45; object-fit: cover; object-position: 50% 25%; outline: 1px dashed #d4d8de; outline-offset: 1px; }
.aips-story__sheet-cap { display: block; text-align: center; font-size: 11.5px; color: var(--aips-muted); padding: 5px 0 7px; }

/* 配送方式列 */
.aips-carriers {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px 20px; margin-top: 22px; padding-top: 18px;
  border-top: 1px solid rgba(16, 34, 63, .1);
}
.aips-carriers__title { display: flex; align-items: center; gap: 6px; flex: none; font-size: 12.5px; font-weight: 700; color: var(--aips-muted); letter-spacing: .06em; }
.aips-carriers__title svg { color: var(--aips-gold); }
.aips-carriers__list { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; }
.aips-carriers__name { font-size: 13px; font-weight: 700; color: #7b8190; letter-spacing: .04em; }
.aips-carriers__name + .aips-carriers__name::before { content: ""; display: inline-block; width: 1px; height: 11px; background: #cfd4dc; margin: 0 18px 0 -9px; vertical-align: -1px; }
.aips-carriers__logo img { display: block; height: 22px; width: auto; filter: grayscale(1); opacity: .65; transition: opacity .2s, filter .2s; }
.aips-carriers__logo img:hover { filter: none; opacity: 1; }
.aips-carriers__note { font-size: 12px; color: var(--aips-muted); margin-left: auto; }

/* 適用證件小卡 */
.aips-uses { display: flex; align-items: center; gap: 22px; margin-top: 36px; }
.aips-uses__title { flex: none; font-size: 13px; font-weight: 700; letter-spacing: .08em; color: var(--aips-gold); }
.aips-uses__list { display: flex; gap: 14px; flex-wrap: wrap; }
.aips-uses__list li { display: flex; align-items: center; gap: 8px; background: rgba(255,255,255,.88); padding: 5px 12px 5px 5px; border-radius: 999px; box-shadow: 0 6px 16px -10px rgba(30,24,16,.5); font-size: 13px; color: var(--aips-navy); font-weight: 600; }
.aips-uses__list img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; object-position: 50% 25%; }
.aips-photo {
  position: absolute; margin: 0; background: #fff; padding: 7px 7px 0; border-radius: 6px;
  box-shadow: 0 24px 50px -20px rgba(30, 24, 16, .55), 0 2px 6px rgba(30,24,16,.12);
}
.aips-photo__img { aspect-ratio: 35 / 45; overflow: hidden; border-radius: 2px; }
.aips-photo__img svg { display: block; width: 100%; height: 100%; }
.aips-photo__real, .aips-outfits i img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.aips-hero__scene.is-photo { filter: blur(2px) saturate(.95); }
.aips-chip__snap.is-photo { background-size: cover; background-position: center; }
.aips-photo figcaption { padding: 7px 2px 9px; font-size: 12.5px; font-weight: 600; color: var(--aips-navy); text-align: center; letter-spacing: .04em; }
.aips-photo--main { width: 40%; left: 29%; top: 8%; z-index: 5; padding: 9px 9px 0; }
.aips-photo--main figcaption { display: flex; justify-content: space-between; align-items: baseline; font-size: 14px; padding: 10px 4px 12px; }
.aips-photo--main figcaption span { font-size: 12px; font-weight: 600; color: var(--aips-blue); }
.aips-photo--a { width: 26%; left: 1%; top: 4%; transform: rotate(-5deg); z-index: 2; }
.aips-photo--baby { width: 24%; left: 4%; top: 45%; transform: rotate(5deg); z-index: 3; }
.aips-photo--b { width: 25%; left: 73%; top: 0; transform: rotate(6deg); z-index: 2; }
.aips-photo--c { width: 26%; left: 72%; top: 40%; transform: rotate(-3deg); z-index: 4; }
.aips-photo--child { width: 23%; left: 39%; top: 64%; transform: rotate(-4deg); z-index: 6; }
.aips-chip {
  position: absolute; z-index: 7; left: 66%; bottom: 2%; display: flex; align-items: center; gap: 8px; white-space: nowrap;
  background: #fff; padding: 9px 16px 9px 9px; border-radius: 999px; box-shadow: var(--aips-shadow); font-size: 14px; color: var(--aips-muted);
}
.aips-chip b { color: var(--aips-navy); }
.aips-chip svg { color: var(--aips-gold); }
.aips-chip__snap { width: 30px; height: 30px; border-radius: 50%; background: linear-gradient(135deg, #b8c7a8, #7d8a7a); }
.aips-sheet-mini {
  position: absolute; z-index: 3; right: 0; bottom: 0; background: #fff; padding: 10px; border-radius: 10px; box-shadow: var(--aips-shadow);
  font-size: 12px; color: var(--aips-muted); text-align: center;
}
.aips-sheet-mini__grid { display: grid; grid-template-columns: repeat(4, 34px); gap: 3px; padding: 6px; background: #f3f1ec; margin-bottom: 6px; }
.aips-sheet-mini__grid div { aspect-ratio: 35 / 45; overflow: hidden; }
.aips-sheet-mini__grid svg { width: 100%; height: 100%; display: block; }

/* ---------- STUDIO ---------- */
.aips-studio { padding: 72px 0; background: #fff; border-top: 1px solid var(--aips-line); }
.aips-studio__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.aips-studio__head h2 { font-family: "Noto Serif TC", serif; font-size: 30px; }
.aips-steps { display: flex; gap: 6px; background: var(--aips-paper); padding: 6px; border-radius: 999px; }
.aips-steps li { display: flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 999px; font-size: 14px; color: var(--aips-muted); }
.aips-steps li span { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; background: #e7e3da; color: var(--aips-muted); font-weight: 700; }
.aips-steps li.is-active { background: #fff; color: var(--aips-navy); font-weight: 600; box-shadow: 0 4px 12px -6px rgba(16,34,63,.3); }
.aips-steps li.is-active span, .aips-steps li.is-done span { background: var(--aips-navy); color: #fff; }

.aips-panel { background: var(--aips-paper); border: 1px solid var(--aips-line); border-radius: 20px; padding: 32px; }
.aips-step { display: none; }
.aips-step.is-active { display: block; animation: aipsIn .35s ease; }
@keyframes aipsIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.aips-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 24px; }
.aips-error { color: var(--aips-danger); font-size: 14px; min-height: 0; }
.aips-error:not(:empty) { margin-top: 12px; }

/* step 1 */
.aips-uploads { display: grid; grid-template-columns: 1fr 1fr 1.1fr; gap: 18px; }
.aips-drop {
  position: relative; aspect-ratio: 1 / 1; max-height: 300px; border: 1.5px dashed #c9cfd9; border-radius: var(--aips-radius); background: #fff;
  display: grid; place-items: center; cursor: pointer; overflow: hidden; transition: border-color .2s, background .2s;
}
.aips-drop:hover, .aips-drop.is-over { border-color: var(--aips-blue); background: #f5f9ff; }
.aips-drop__empty { display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--aips-muted); text-align: center; padding: 12px; }
.aips-drop__empty svg { color: var(--aips-blue); margin-bottom: 4px; }
.aips-drop__empty b { color: var(--aips-navy); font-size: 15px; }
.aips-drop__empty small { font-size: 13px; }
.aips-drop img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.aips-drop.has-img::after { content: "更換"; position: absolute; right: 10px; bottom: 10px; background: rgba(16,34,63,.8); color: #fff; font-size: 12px; padding: 4px 10px; border-radius: 999px; }
.aips-tips { background: #fff; border-radius: var(--aips-radius); padding: 22px; border: 1px solid var(--aips-line); align-self: start; }
.aips-tips h3 { font-size: 16px; margin-bottom: 12px; }
.aips-tips li { font-size: 14px; color: var(--aips-muted); padding-left: 18px; position: relative; margin-bottom: 8px; }
.aips-tips li::before { content: ""; position: absolute; left: 0; top: .7em; width: 7px; height: 7px; border-radius: 50%; background: var(--aips-gold); }
.aips-consent { display: flex; gap: 10px; align-items: flex-start; margin-top: 20px; font-size: 14px; color: var(--aips-muted); cursor: pointer; }
.aips-consent input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--aips-navy); flex: none; }
.aips-consent a { color: var(--aips-blue); }

/* step 2 */
.aips-config { display: grid; grid-template-columns: 1fr 300px; gap: 32px; }
.aips-field { margin-bottom: 24px; }
.aips-label { display: block; font-weight: 600; color: var(--aips-navy); margin-bottom: 10px; font-size: 15px; }
.aips-label small { font-weight: 400; color: var(--aips-muted); margin-left: 6px; }
.aips-note { margin-top: 10px; font-size: 13px; color: #7a5a1e; background: var(--aips-gold-soft); padding: 10px 14px; border-radius: 10px; }
.aips-seg { display: inline-grid; grid-template-columns: 1fr 1fr; background: #fff; border: 1px solid var(--aips-line); border-radius: 12px; padding: 4px; gap: 4px; }
.aips-seg button { border: 0; background: none; padding: 10px 22px; border-radius: 9px; color: var(--aips-muted); font-weight: 600; display: flex; flex-direction: column; line-height: 1.3; }
.aips-seg button small { font-weight: 400; font-size: 12px; }
.aips-seg button.is-active { background: var(--aips-navy); color: #fff; }
.aips-outfits { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.aips-outfits button {
  border: 1.5px solid var(--aips-line); background: #fff; border-radius: 12px; padding: 6px 6px 8px; font-size: 13px; color: var(--aips-ink);
  display: flex; flex-direction: column; gap: 6px; align-items: center; transition: border-color .2s;
}
.aips-outfits i { display: block; width: 100%; aspect-ratio: 1; border-radius: 8px; overflow: hidden; background: #eef1f5; }
.aips-outfits i svg { width: 100%; height: 100%; display: block; }
.aips-outfits button.is-active { border-color: var(--aips-navy); box-shadow: 0 0 0 3px rgba(16,34,63,.08); font-weight: 600; }
.aips-swatches { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.aips-swatches button { width: 32px; height: 32px; border-radius: 50%; border: 2px solid #fff; background: var(--sw); box-shadow: 0 0 0 1px #cfd5df; }
.aips-swatches button.is-active { box-shadow: 0 0 0 2px var(--aips-navy); }
.aips-swatches--bg { margin-top: 0; }
.aips-swatches--bg button { width: auto; height: auto; border-radius: 10px; padding: 0; border: 0; box-shadow: none; background: none; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.aips-swatches--bg button::before { content: ""; width: 54px; height: 54px; border-radius: 10px; background: var(--sw); box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
.aips-swatches--bg button em { font-style: normal; font-size: 12.5px; color: var(--aips-muted); }
.aips-swatches--bg button.is-active::before { box-shadow: 0 0 0 2px var(--aips-paper), 0 0 0 4px var(--aips-navy); }
.aips-swatches--bg button.is-active em { color: var(--aips-navy); font-weight: 600; }
.aips-swatches--bg button:disabled { opacity: .3; cursor: not-allowed; }
.aips-layouts__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.aips-layouts__grid button { padding: 10px; }
.aips-layouts__grid button b { font-size: 14px; }
.aips-layouts__grid button small { font-size: 11.5px; }
.aips-layouts__cat { font-size: 13px; font-weight: 700; color: var(--aips-gold); letter-spacing: .06em; margin: 4px 0 8px; }
.aips-layouts__grid + .aips-layouts__cat { margin-top: 18px; }
.aips-layout__sheet { display: block; margin-bottom: 8px; border-radius: 4px; box-shadow: 0 0 0 1px #e3e6eb; overflow: hidden; }
.aips-layout__sheet svg { display: block; width: 100%; height: auto; }
.aips-layouts button { border: 1.5px solid var(--aips-line); background: #fff; border-radius: 12px; padding: 12px; text-align: left; color: var(--aips-ink); }
.aips-layouts button b { display: block; font-size: 15px; color: var(--aips-navy); }
.aips-layouts button small { display: block; font-size: 12px; color: var(--aips-muted); line-height: 1.4; margin-top: 2px; }
.aips-layouts button.is-active { border-color: var(--aips-navy); box-shadow: 0 0 0 3px rgba(16,34,63,.08); }
.aips-config__preview { position: sticky; top: 20px; align-self: start; }
.aips-live { aspect-ratio: 35 / 45; border-radius: 10px; overflow: hidden; box-shadow: var(--aips-shadow); border: 8px solid #fff; background: #fff; }
.aips-live svg, .aips-live img { width: 100%; height: 100%; display: block; object-fit: cover; object-position: 50% 30%; }
.aips-live { position: relative; }
.aips-live__bg {
  position: absolute; left: 8px; bottom: 8px; display: flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,.92); border-radius: 999px; padding: 4px 10px 4px 4px; font-size: 12px; color: var(--aips-navy);
}
.aips-live__bg i { width: 18px; height: 18px; border-radius: 50%; background: var(--sw); box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }
.aips-sheet { margin-top: 16px; background: #fff; border-radius: 6px; box-shadow: 0 6px 18px -10px rgba(16,34,63,.4); }
.aips-sheet svg { display: block; width: 100%; height: auto; }
.aips-sheet svg[data-a4] { width: auto; max-width: 100%; max-height: 460px; margin: 0 auto; border: 1px solid #e6e3dc; }
.aips-sheet__cap { margin-top: 8px; font-size: 12.5px; color: var(--aips-muted); text-align: center; }

/* step 3 */
.aips-progress { max-width: 420px; margin: 40px auto; text-align: center; color: var(--aips-muted); }
.aips-progress__bar { height: 8px; background: #e7e3da; border-radius: 999px; overflow: hidden; margin-bottom: 14px; }
.aips-progress__bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--aips-blue), var(--aips-navy)); transition: width .4s ease; }
.aips-result { display: grid; grid-template-columns: 320px 1fr; gap: 36px; align-items: start; }
.aips-result__preview { position: relative; }
.aips-result__img { position: relative; aspect-ratio: 35 / 45; border-radius: 10px; overflow: hidden; border: 8px solid #fff; box-shadow: var(--aips-shadow); background: #fff; }
.aips-result__img img, .aips-result__img svg { width: 100%; height: 100%; display: block; object-fit: cover; }
.aips-result__badge { display: block; margin-top: 12px; text-align: center; font-size: 13px; color: var(--aips-muted); }
.aips-ai-flag { margin-top: 10px; font-size: 12.5px; color: #7a5a1e; background: var(--aips-gold-soft); padding: 8px 12px; border-radius: 8px; }
.aips-unlock, .aips-done { background: #fff; border: 1px solid var(--aips-line); border-radius: 18px; padding: 28px; }
.aips-unlock h3, .aips-done h3 { font-size: 20px; }
.aips-unlock__price { font-size: 15px; color: var(--aips-muted); margin: 6px 0 14px; }
.aips-unlock__price b { font-size: 38px; color: var(--aips-navy); font-family: "Noto Serif TC", serif; margin-left: 2px; }
.aips-check li { position: relative; padding-left: 26px; margin-bottom: 8px; font-size: 14.5px; }
.aips-check li::before { content: ""; position: absolute; left: 0; top: .3em; width: 17px; height: 17px; border-radius: 50%; background: var(--aips-gold-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.2l2.2 2.2 4.8-4.8' stroke='%23c29b52' stroke-width='1.8' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") center/17px no-repeat; }
.aips-input { display: block; margin-top: 16px; }
.aips-input span { display: block; font-size: 13.5px; color: var(--aips-muted); margin-bottom: 6px; }
.aips-input input { width: 100%; min-height: 46px; border: 1px solid #d3d8e0; border-radius: 10px; padding: 0 14px; font: inherit; font-size: 16px; background: #fff; color: var(--aips-ink); }
.aips-input input:focus { border-color: var(--aips-navy); outline: none; box-shadow: 0 0 0 3px rgba(16,34,63,.1); }
.aips-unlock .aips-btn--block { margin-top: 16px; }
.aips-downloads { display: grid; gap: 10px; margin-top: 18px; }
.aips-print { margin-top: 22px; border: 1px solid var(--aips-gold); border-radius: 14px; background: #fffcf6; }
.aips-print summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 18px; cursor: pointer; }
.aips-print summary::-webkit-details-marker { display: none; }
.aips-print summary b { display: block; color: var(--aips-navy); }
.aips-print summary small { font-size: 13px; color: var(--aips-muted); }
.aips-print summary em { font-style: normal; font-weight: 700; color: var(--aips-gold); font-size: 18px; white-space: nowrap; }
.aips-print__form { padding: 0 18px 18px; }
.aips-print__form .aips-btn { margin-top: 18px; }
.aips-print__ok { padding: 0 18px 18px; color: #2c6b3f; font-size: 14px; }
.aips-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ---------- INFO ---------- */
.aips-info { padding: 72px 0 80px; }
.aips-info__grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: 56px; }
.aips-info h2 { font-family: "Noto Serif TC", serif; font-size: 26px; margin-bottom: 20px; }
.aips-price { display: flex; justify-content: space-between; align-items: center; gap: 16px; background: #fff; border: 1px solid var(--aips-line); border-radius: 14px; padding: 18px 22px; margin-bottom: 12px; }
.aips-price b { color: var(--aips-navy); display: block; }
.aips-price small { color: var(--aips-muted); font-size: 13.5px; }
.aips-price strong { font-family: "Noto Serif TC", serif; font-size: 26px; color: var(--aips-navy); white-space: nowrap; }
.aips-price--hl { border-color: var(--aips-gold); background: #fffcf6; }
.aips-price--hl strong { color: var(--aips-gold); }
.aips-fine { font-size: 13px; color: var(--aips-muted); margin-top: 6px; }
.aips-faq details { border-bottom: 1px solid var(--aips-line); }
.aips-faq summary { list-style: none; cursor: pointer; padding: 16px 32px 16px 0; font-weight: 600; color: var(--aips-navy); position: relative; }
.aips-faq summary::-webkit-details-marker { display: none; }
.aips-faq summary::after { content: "+"; position: absolute; right: 4px; top: 12px; font-size: 22px; font-weight: 300; color: var(--aips-gold); transition: transform .2s; }
.aips-faq details[open] summary::after { transform: rotate(45deg); }
.aips-faq details p { padding: 0 0 18px; color: var(--aips-muted); font-size: 14.5px; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .aips-hero { padding: 48px 0 56px; }
  .aips-hero__grid { grid-template-columns: 1fr; gap: 36px; }
  .aips-hero__veil { background: linear-gradient(180deg, rgba(250,247,241,.96) 0%, rgba(250,247,241,.9) 45%, rgba(250,247,241,.35) 100%); }
  .aips-hero__visual { max-width: 520px; margin: 0 auto; }
  .aips-config { grid-template-columns: 1fr; }
  .aips-config__preview { position: static; display: grid; grid-template-columns: 150px 1fr; gap: 14px; align-items: center; order: -1; }
  .aips-config__preview .aips-sheet { margin-top: 0; }
  .aips-sheet__cap { grid-column: 1 / -1; margin-top: 0; }
  .aips-outfits { grid-template-columns: repeat(3, 1fr); }
  .aips-layouts__grid { grid-template-columns: repeat(2, 1fr); }
  .aips-result { grid-template-columns: 1fr; }
  .aips-result__preview { max-width: 300px; margin: 0 auto; width: 100%; }
  .aips-info__grid { grid-template-columns: 1fr; gap: 40px; }
}
@media (max-width: 640px) {
  .aips-wrap { padding: 0 16px; }
  .aips-hero { padding: 36px 0 44px; }
  .aips-hero__title { font-size: 34px; }
  .aips-step__title { font-size: 22px; }
  .aips-pick { width: 100%; padding: 0 20px; font-size: 17px; }
  .aips-btn--xl { width: 100%; min-width: 0; }
  .aips-photo { padding: 4px 4px 0; }
  .aips-photo figcaption { font-size: 10.5px; padding: 5px 0 6px; letter-spacing: 0; }
  .aips-photo--main { padding: 6px 6px 0; }
  .aips-photo--main figcaption { font-size: 12px; padding: 6px 2px 8px; }
  .aips-photo--main figcaption span { font-size: 10.5px; }
  .aips-chip { display: none; }
  .aips-snap { padding: 4px 4px 0; }
  .aips-snap figcaption { font-size: 10px; padding: 4px 0 5px; }
  .aips-story__arrow-icon { width: 42px; height: 42px; }
  .aips-story__arrow-icon svg { width: 20px; height: 20px; }
  .aips-story__arrow-text { display: none; }
  .aips-story__pro { padding: 5px 5px 0; }
  .aips-story__pro figcaption { font-size: 11px; padding: 5px 1px 7px; }
  .aips-story__pro figcaption span { display: none; }
  .aips-story__sheet-grid { gap: 2px; }
  .aips-story__age { padding: 3px 3px 0; }
  .aips-story__age figcaption { font-size: 9px; padding: 3px 0 4px; }
  .aips-story__sheet-cap { font-size: 9.5px; padding: 3px 0 4px; }
  .aips-uses { flex-direction: column; align-items: flex-start; gap: 10px; margin-top: 24px; }
  .aips-uses__list { gap: 8px; }
  .aips-uses__list li { font-size: 11.5px; padding: 4px 10px 4px 4px; }
  .aips-uses__list img { width: 26px; height: 26px; }
  .aips-carriers { gap: 8px 14px; }
  .aips-carriers__list { gap: 6px 14px; }
  .aips-carriers__name { font-size: 12px; }
  .aips-carriers__name + .aips-carriers__name::before { margin: 0 14px 0 -7px; }
  .aips-carriers__note { margin-left: 0; width: 100%; }
  .aips-live__bg { display: none; }
  .aips-chip__snap { width: 24px; height: 24px; }
  .aips-hero__cta .aips-btn { width: 100%; }
  .aips-studio, .aips-info { padding: 48px 0; }
  .aips-studio__head h2 { font-size: 24px; }
  .aips-steps { width: 100%; justify-content: space-between; }
  .aips-steps li { padding: 7px 10px; font-size: 13px; gap: 6px; }
  .aips-panel { padding: 18px; border-radius: 16px; }
  .aips-uploads { grid-template-columns: 1fr 1fr; gap: 12px; }
  .aips-tips { grid-column: 1 / -1; padding: 16px; }
  .aips-seg { display: grid; width: 100%; }
  .aips-seg button { padding: 10px 8px; }
  .aips-config__preview { grid-template-columns: 110px 1fr; }
  .aips-actions { flex-direction: column-reverse; }
  .aips-actions .aips-btn { width: 100%; }
  .aips-unlock, .aips-done { padding: 20px; }
  .aips-row { grid-template-columns: 1fr; gap: 0; }
}
.aips-fail { max-width: 460px; margin: 40px auto; text-align: center; }
.aips-fail p { color: var(--aips-danger); margin-bottom: 18px; }
.aips-ai-flag--mock { background: #e8eef8; color: var(--aips-navy); }
.aips-drop.is-loading::before {
  content: "上傳中…"; position: absolute; inset: 0; z-index: 2; display: grid; place-items: center;
  background: rgba(16,34,63,.55); color: #fff; font-weight: 600;
}

/* ---------- 簡化流程（大按鈕、小說明） ---------- */
.aips-hero__trust { font-size: 12px; gap: 6px 16px; margin-top: 22px; }
.aips-hero__trust li::before { width: 13px; height: 13px; background-size: 13px; }
.aips-hero__price { font-size: 13px; }
.aips-btn--xl { min-height: 58px; padding: 0 40px; font-size: 17px; min-width: 240px; }
.aips-btn.is-ready { animation: aipsPulse 1.6s ease-in-out infinite; }
@keyframes aipsPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(47,111,196,.45); } 50% { box-shadow: 0 0 0 10px rgba(47,111,196,0); } }

.aips-step[data-step="1"] { text-align: center; }
.aips-step__title { font-size: 26px; font-family: "Noto Serif TC", serif; }
.aips-step__hint { margin-top: 4px; font-size: 13px; color: var(--aips-muted); }
.aips-pick {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; margin: 20px 0 18px;
  min-height: 62px; padding: 0 44px; border-radius: 999px; cursor: pointer;
  background: var(--aips-blue); color: #fff; font-size: 18px; font-weight: 700;
  box-shadow: 0 14px 30px -14px rgba(47,111,196,.9); transition: transform .15s, background .2s;
}
.aips-pick:hover { background: #255fae; }
.aips-pick:active { transform: translateY(1px); }
.aips-step[data-step="1"] .aips-uploads { grid-template-columns: 1fr 1fr; max-width: 440px; margin: 0 auto; gap: 14px; }
.aips-step[data-step="1"] .aips-drop { aspect-ratio: 3 / 4; max-height: 260px; }
.aips-drop__empty b { font-size: 34px; font-family: "Noto Serif TC", serif; color: #c9cfd9; line-height: 1; }
.aips-drop__empty small { font-size: 12px; }
.aips-fineprint { margin-top: 12px; font-size: 11.5px; color: #9097a3; }
.aips-step[data-step="1"] .aips-consent { justify-content: center; font-size: 12.5px; margin-top: 14px; text-align: left; }
.aips-step[data-step="1"] .aips-actions { justify-content: center; }
.aips-step[data-step="1"] .aips-error { text-align: center; }

.aips-label { font-size: 16px; }
.aips-label--sm { font-size: 13px; }
.aips-more { margin-top: 4px; border-top: 1px dashed var(--aips-line); padding-top: 10px; }
.aips-more > summary { cursor: pointer; font-size: 13px; color: var(--aips-muted); list-style: none; display: inline-flex; align-items: center; gap: 6px; }
.aips-more > summary::-webkit-details-marker { display: none; }
.aips-more > summary::before { content: "＋"; color: var(--aips-gold); font-weight: 700; }
.aips-more[open] > summary::before { content: "－"; }
.aips-more[open] > summary { margin-bottom: 14px; }
.aips-more--layouts { margin-top: 12px; border-top: 0; padding-top: 0; }
.aips-step[data-step="2"] .aips-actions { align-items: center; justify-content: space-between; }
.aips-sheet__cap, .aips-live__bg { font-size: 11px; }
.aips-fineprint--left { text-align: left; margin-top: 8px; }
.aips-idlink { margin: -4px 0 14px; font-size: 13px; }
.aips-idlink .aips-link { padding: 0; font-size: 13px; color: var(--aips-blue); }
.aips-orderinfo { font-size: 12.5px; color: var(--aips-muted); margin: 6px 0 4px; }
.aips-orderinfo a { color: var(--aips-blue); }
.aips-input--sm span { font-size: 12px; }
.aips-lookup { text-align: center; padding: 10px 0 6px; }
.aips-lookup .aips-downloads { max-width: 420px; margin: 18px auto; }
.aips-lookup__ship { margin: 10px 0; font-weight: 600; color: var(--aips-navy); }
.aips-lookup__again { margin-left: 12px; }
.aips-lookup:not([hidden]) ~ .aips-step { display: none !important; }
@media (max-width: 640px) {
  .aips-step__title { font-size: 22px; }
  .aips-pick { width: 100%; padding: 0 20px; font-size: 17px; }
  .aips-btn--xl { width: 100%; min-width: 0; }
  .aips-step[data-step="2"] .aips-actions { flex-direction: column-reverse; gap: 6px; }
}

/* 預覽鎖定（Mock 示意；正式版模糊與浮水印在伺服器端完成） */
.aips-blur { position: absolute; inset: 0; filter: blur(7px) saturate(.9); transform: scale(1.06); }
.aips-blur svg { width: 100%; height: 100%; display: block; }
.aips-wm {
  position: absolute; inset: 0; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='110'%3E%3Ctext x='10' y='70' transform='rotate(-24 80 55)' font-family='Arial' font-weight='700' font-size='24' fill='%23ffffff' fill-opacity='.55' letter-spacing='3'%3EPREVIEW%3C/text%3E%3C/svg%3E");
}

@media (max-width: 960px) {
  .aips-uses { margin-top: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  .aips *, .aips *::before, .aips *::after { animation: none !important; transition: none !important; }
}

/* 1.0.8：多張點數卡、付款紀錄 */
.aips-cards-more { display: grid; gap: 8px; }
.aips-cards-more:empty { display: none; }
.aips-addcard { display: inline-block; margin: 6px 0 4px; font-size: 13.5px; }
.aips-payments { margin-top: 10px; padding: 10px 12px; background: #f7f5f0; border-radius: 8px; font-size: 13px; color: var(--aips-ink, #10223f); text-align: left; }
.aips-payments b { display: block; margin-bottom: 4px; }
.aips-paylist { margin: 0; padding: 0; list-style: none; }
.aips-paylist li { margin: 0; padding: 6px 0; border-top: 1px solid rgba(16,34,63,.08); }
.aips-paylist li:first-child { border-top: 0; padding-top: 2px; }
.aips-paylist__main { display: block; font-weight: 600; overflow-wrap: anywhere; }
.aips-paylist__sub { display: block; color: var(--aips-muted, #6b7280); font-size: 12px; overflow-wrap: anywhere; }

/* 1.0.9：AI 形象照預覽前驗證點數卡 */
.aips-gate { margin: 14px 0 4px; padding: 12px 14px; border: 1px solid rgba(184,146,74,.45); background: #fffaf0; border-radius: 10px; }
.aips-gate .aips-input { margin-bottom: 6px; }

/* 1.0.15：一次結帳 */
.aips-plans { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0 6px; }
.aips-plan { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; text-align: left; padding: 12px 14px; border: 1.5px solid var(--aips-line); border-radius: 12px; background: #fff; color: var(--aips-ink); cursor: pointer; font: inherit; }
.aips-plan b { font-size: 15px; color: var(--aips-navy); }
.aips-plan small { font-size: 12px; color: var(--aips-muted); line-height: 1.4; }
.aips-plan em { font-style: normal; font-weight: 700; color: var(--aips-gold); font-size: 17px; margin-top: 2px; }
.aips-plan.is-active { border-color: var(--aips-navy); box-shadow: 0 0 0 3px rgba(16,34,63,.08); background: #f7f9fc; }
.aips-unlock [data-plan-ship] { margin: 6px 0 4px; padding: 0; }
.aips-paynow { display: grid; gap: 0; margin-top: 4px; }
.aips-paynow > .aips-btn { margin-top: 14px; }
.aips-paynow .aips-error:empty { display: none; }
.aips-otprow { display: flex; gap: 8px; }
.aips-otprow input { flex: 1; min-width: 0; }
.aips-otprow .aips-btn { white-space: nowrap; padding: 0 14px; min-height: 46px; }
.aips-paywait { margin: 0; padding: 12px 14px; border-radius: 10px; background: var(--aips-gold-soft); color: var(--aips-navy); font-size: 14px; line-height: 1.5; }
.aips-havecard { margin-top: 14px; border-top: 1px dashed var(--aips-line); padding-top: 10px; }
.aips-havecard summary { cursor: pointer; color: var(--aips-muted); font-size: 14px; padding: 4px 0; }
.aips-havecard[open] summary { margin-bottom: 10px; }
.aips-havecard > * + * { margin-top: 10px; }
@media (max-width: 560px) {
  .aips-plans { grid-template-columns: 1fr; }
}

/* 1.0.19：點數卡改為備用選項 */
.aips-altpay { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 4px 12px; margin-top: 14px; border-top: 1px dashed var(--aips-line); padding-top: 8px; }
.aips-altpay .aips-havecard { flex: 1 1 260px; margin: 0; border: 0; padding: 0; }
.aips-altpay .aips-havecard[open] { flex-basis: 100%; }
.aips-buycard { font-size: 13px; color: var(--aips-muted); white-space: nowrap; padding: 6px 0; }
.aips-buycard:hover { color: var(--aips-navy); }
.aips-paydone { margin: 8px 0 0; padding: 10px 12px; border-radius: 10px; background: #eef6ef; color: #1d5e2b; font-size: 14px; }
.aips-mailnote { margin: 10px 0 0; padding: 10px 12px; border-radius: 10px; background: #eef6ef; color: #1d5e2b; font-size: 13.5px; line-height: 1.6; }
