/* Tranipola — giao diện shop. Port từ prototype polaroid-shop-pink.html.
   Giữ nguyên thị giác: nền sọc hồng, khung polaroid cổ điển, lật 3D mặt sau.
   Fonts self-host (không gọi Google Fonts — tốc độ + GDPR): @font-face khai báo ở
   static/fonts/fonts.css (nạp trước file này trong base.html), file .woff2 đi kèm. */

:root {
  /* Shop chỉ có bản SÁNG (nguồn thị giác: docs/polaroid-shop-pink.html). Khai báo rõ để
     trình duyệt thôi tự đảo màu bằng "auto dark mode" — nó biến nền hồng thành mận đục,
     chữ chìm vào nền và ô nhập gần như tàng hình. Muốn có chế độ tối thật thì phải dựng
     hẳn một bộ biến màu, không phải để trình duyệt đoán. */
  color-scheme: light;
  --stripe-a: #f6d3dc;
  --stripe-b: #ffffff;
  --card: #fffbfc;
  --ink: #5a3444;
  /* Contrast ≥4.5:1 trên nền card/trắng (axe color-contrast). */
  --muted: #6b3d4d;
  --pink: #f0b8c8;
  --pink-deep: #c45a7c;
  --pink-dark: #8e3d5c;
  --cream: #fdf3e2;
  --line: rgba(90, 52, 68, 0.13);
}
* { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  overflow-x: clip;
}
body {
  margin: 0;
  color: var(--ink);
  font-family: Inter, system-ui, sans-serif;
  background: repeating-linear-gradient(90deg,
    var(--stripe-a) 0px, var(--stripe-a) 26px,
    var(--stripe-b) 26px, var(--stripe-b) 62px);
  overflow-x: clip;
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; width: 100%; }

header { padding: 60px 0 24px; text-align: center; }
.eyebrow {
  display: inline-block; font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase;
  font-weight: 600; background: #fff; color: var(--pink-dark); padding: 8px 16px;
  border-radius: 100px; box-shadow: 0 4px 14px -6px rgba(184, 95, 126, 0.5);
}
h1 {
  font-family: Fraunces, serif; font-weight: 800; font-size: clamp(36px, 7vw, 70px);
  line-height: 1.02; margin: 22px 0 16px; letter-spacing: -0.02em;
  text-shadow: 0 2px 0 #fff, 0 6px 18px rgba(255, 255, 255, 0.9);
}
h1 em { font-style: italic; color: var(--pink-dark); }
.lede {
  max-width: 54ch; margin: 0 auto; color: var(--muted); font-size: 16.5px; line-height: 1.65;
  background: rgba(255, 255, 255, 0.75); padding: 12px 18px; border-radius: 14px;
}

/* ── Home hero: brand + 1 headline + 1 câu + CTA + fan polaroid ── */
.home-hero {
  padding: 28px 0 8px;
  padding-top: max(28px, env(safe-area-inset-top));
}
.home-hero-inner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 28px 36px;
  align-items: center;
  min-height: min(72vh, 640px);
}
.home-hero-copy { max-width: 34rem; }
.home-brand {
  font-family: Fraunces, serif; font-weight: 800;
  font-size: clamp(28px, 4.5vw, 40px); color: var(--pink-dark);
  margin: 0 0 8px; letter-spacing: -0.02em;
  text-shadow: 0 2px 0 #fff;
}
.home-hero-copy h1 {
  font-size: clamp(30px, 5.2vw, 48px); margin: 0 0 14px; text-align: left;
}
.home-hero-copy .lede {
  margin: 0 0 14px; text-align: left; max-width: 40ch;
  padding: 10px 14px; font-size: 15.5px;
}
.hero-price {
  display: inline-block; margin: 0 0 18px; padding: 10px 14px;
  font-family: Inter, system-ui, sans-serif; font-size: 15px; font-weight: 500;
  line-height: 1.4; color: var(--ink);
  background: rgba(255, 251, 252, 0.95); border-radius: 12px;
  box-shadow: 0 4px 14px -8px rgba(90, 52, 68, 0.35);
  font-variant-numeric: tabular-nums;
}
.hero-price strong {
  font-weight: 700; font-size: 1.12em; color: var(--pink-dark);
  letter-spacing: 0.01em;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.hero-cta .btn { margin-top: 0; }
.home-hero-stage {
  position: relative; min-height: 340px;
  display: flex; align-items: center; justify-content: center;
}
.hero-fan {
  position: relative; width: min(100%, 380px); height: 360px;
  margin: 0 auto;
}
.hero-polaroid {
  position: absolute; width: 200px; margin: 0; padding: 10px 10px 36px;
  background: #fff; border-radius: 2px;
  box-shadow: 0 16px 36px -14px rgba(90, 52, 68, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.9);
  animation: hero-float 5.5s ease-in-out infinite;
}
.hero-polaroid img {
  display: block; width: 100%; aspect-ratio: 1 / 1.24; object-fit: cover;
  background: #f6e3ea;
}
.hero-polaroid figcaption {
  position: absolute; left: 10px; right: 10px; bottom: 10px;
  /* Fraunces italic (có VN) — Caveat không hỗ trợ tiếng Việt nên trước đây bị fallback lẫn font. */
  font-family: Fraunces, serif; font-style: italic; font-size: 15px; font-weight: 600;
  color: #8a5a70; text-align: center;
}
.hero-polaroid.hp-a {
  left: 8%; top: 18%; transform: rotate(-8deg); z-index: 1;
  animation-delay: 0s;
}
.hero-polaroid.hp-b {
  left: 28%; top: 4%; transform: rotate(2deg); z-index: 3;
  animation-delay: 0.4s;
}
.hero-polaroid.hp-c {
  right: 4%; top: 22%; left: auto; transform: rotate(9deg); z-index: 2;
  animation-delay: 0.8s;
}
@keyframes hero-float {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -8px; }
}
@media (max-width: 880px) {
  .home-hero { padding: 36px 0 12px; }
  .home-hero-inner {
    grid-template-columns: 1fr; min-height: 0; gap: 0; text-align: center;
  }
  .home-hero-copy { margin: 0 auto; max-width: 28rem; }
  .home-hero-copy h1 { text-align: center; }
  .home-brand { font-size: clamp(34px, 9vw, 44px); }
  .hero-price { margin-left: auto; margin-right: auto; }
  /* Fan polaroid absolute hay tràn đè headline trên phone — ẩn; mẫu demo vẫn ở studio bên dưới. */
  .home-hero-stage { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-polaroid { animation: none; }
}

.demo-shots { margin-top: 22px; }
.demo-shots.is-hidden { display: none; }
.demo-label {
  margin: 0 0 14px; font-size: 13px; color: var(--muted); font-style: italic;
}
.demo-shot { cursor: pointer; }
.demo-shot .cap.demo-cap {
  pointer-events: none; position: absolute; bottom: 11px; left: 10px; right: 10px;
  text-align: center; font-family: Fraunces, serif; font-style: italic;
  font-size: 15px; color: #8a5a70; font-weight: 600;
}
.demo-shot:focus-visible { outline: 3px solid var(--pink); outline-offset: 6px; border-radius: 4px; }

/* margin trái/phải = auto để căn giữa (giữ lại max-width của .wrap).
   Prototype dùng `0` nên khối studio lệch trái trên màn hình rộng — sửa ở đây. */
.studio { display: grid; grid-template-columns: 1.45fr 0.9fr; gap: 22px; margin: 28px auto 60px; align-items: start; scroll-margin-top: 16px; }
@media (max-width: 880px) { .studio { grid-template-columns: 1fr; } .bill { position: static; } }

.panel {
  background: var(--card); border-radius: 24px; padding: 26px;
  box-shadow: 0 18px 44px -20px rgba(184, 95, 126, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.8);
  min-width: 0;
  max-width: 100%;
}
.panel h2 { font-family: Fraunces, serif; font-weight: 600; font-size: 22px; margin: 0 0 4px; }
.panel .sub { color: var(--muted); font-size: 13.5px; margin: 0 0 18px; }

.drop {
  border: 2px dashed var(--pink); border-radius: 20px; padding: 34px 20px; text-align: center;
  cursor: pointer; transition: border-color 0.18s, background 0.18s;
  background: linear-gradient(#fff8fa, #fdeef3);
  animation: drop-breathe 3.2s ease-in-out infinite;
}
.drop:hover, .drop.hot {
  border-color: var(--pink-deep); background: #fce7ee;
  animation: none;
}
@keyframes drop-breathe {
  0%, 100% { border-color: var(--pink); }
  50% { border-color: var(--pink-deep); }
}
@media (prefers-reduced-motion: reduce) {
  .drop { animation: none; }
}
.drop strong { display: block; font-size: 16px; margin-bottom: 6px; }
.drop span { color: var(--muted); font-size: 13px; }

/* Turnstile: gọn, căn giữa; ẩn sau khi verify (interaction-only + Success) */
.ts-upload-gate {
  display: flex;
  justify-content: center;
  margin-top: 14px;
  min-height: 0;
}
.ts-upload-gate.is-verified {
  display: none;
}
.ts-widget,
.ts-upload-gate .cf-turnstile {
  margin: 0 auto;
}
.ts-noscript {
  margin: 10px 0 0;
  font-size: 13px;
  color: var(--pink-dark);
}

.btn {
  display: inline-block; margin-top: 15px; background: var(--pink-dark); color: #fff; border: 0;
  padding: 12px 24px; border-radius: 100px; font-weight: 600; font-size: 14px; cursor: pointer;
  font-family: inherit; transition: 0.18s; text-decoration: none; text-align: center; min-height: 44px;
}
a.btn:not(.btn-google) { color: #fff; }
.btn:hover { background: #7a304c; transform: translateY(-1px); }
.btn:focus-visible { outline: 3px solid var(--pink); outline-offset: 3px; }
input[type="file"] { display: none; }

/* KHUNG POLAROID */
.shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 28px 20px; margin-top: 22px; }
.shot {
  perspective: 900px;
  animation: pop 0.36s cubic-bezier(0.34, 1.4, 0.5, 1) both; position: relative;
}
.shot.rot-0 { transform: rotate(-2.5deg); }
.shot.rot-1 { transform: rotate(-1.5deg); }
.shot.rot-2 { transform: rotate(-0.5deg); }
.shot.rot-3 { transform: rotate(0.5deg); }
.shot.rot-4 { transform: rotate(1.5deg); }
.shot.rot-5 { transform: rotate(2.5deg); }
.shot.rot-6 { transform: rotate(-2deg); }
.shot.rot-7 { transform: rotate(2deg); }
.shot.rot-8 { transform: rotate(-1deg); }
.shot.rot-9 { transform: rotate(1deg); }
@keyframes pop {
  from { opacity: 0; translate: 0 16px; scale: 0.9; }
  to { opacity: 1; translate: 0 0; scale: 1; }
}
.flip { position: relative; transform-style: preserve-3d; transition: transform 0.5s cubic-bezier(0.4, 0.1, 0.3, 1); }
.shot.back .flip { transform: rotateY(180deg); }
.face {
  background: #fff; border-radius: 2px; padding: 10px 10px 40px;
  box-shadow: 0 10px 24px -8px rgba(184, 95, 126, 0.6); backface-visibility: hidden;
}
.face.rear {
  position: absolute; inset: 0; transform: rotateY(180deg);
  background: #fff; padding: 0;
}

/* Khung/skin — texture từ assets/frames/polaroid/ → static/img/skins/*_tile.png */
.face.skin-classic,
.face.skin-,
.order-photos .ophoto-open.skin-classic,
.order-photos .ophoto-open.skin-,
.console .ophoto-frame.skin-classic,
.console .ophoto-frame.skin- { background: #fff; }
.face.skin-stripe_red,
.face.skin-stripe_blue_bow,
.face.skin-bow_pink,
.face.skin-dot_yellow,
.order-photos .ophoto-open.skin-stripe_red,
.order-photos .ophoto-open.skin-stripe_blue_bow,
.order-photos .ophoto-open.skin-bow_pink,
.order-photos .ophoto-open.skin-dot_yellow,
.console .ophoto-frame.skin-stripe_red,
.console .ophoto-frame.skin-stripe_blue_bow,
.console .ophoto-frame.skin-bow_pink,
.console .ophoto-frame.skin-dot_yellow {
  background-color: #fff;
  background-repeat: repeat;
  background-position: center top;
}
.face.skin-stripe_red,
.order-photos .ophoto-open.skin-stripe_red,
.console .ophoto-frame.skin-stripe_red {
  background-image: url("../img/skins/stripe_red_tile.png");
  background-size: 48px 48px;
}
.face.skin-stripe_blue_bow,
.order-photos .ophoto-open.skin-stripe_blue_bow,
.console .ophoto-frame.skin-stripe_blue_bow {
  background-image: url("../img/skins/stripe_blue_bow_tile.png");
  background-size: 64px 64px;
}
.face.skin-bow_pink,
.order-photos .ophoto-open.skin-bow_pink,
.console .ophoto-frame.skin-bow_pink {
  background-image: url("../img/skins/bow_pink_tile.png");
  background-size: 96px 96px;
}
.face.skin-dot_yellow,
.order-photos .ophoto-open.skin-dot_yellow,
.console .ophoto-frame.skin-dot_yellow {
  background-image: url("../img/skins/dot_yellow_tile.png");
  background-size: 56px 56px;
}
.face.skin-stripe_red .pic,
.face.skin-stripe_blue_bow .pic,
.face.skin-bow_pink .pic,
.face.skin-dot_yellow .pic,
.order-photos .ophoto-open.skin-stripe_red img,
.order-photos .ophoto-open.skin-stripe_blue_bow img,
.order-photos .ophoto-open.skin-bow_pink img,
.order-photos .ophoto-open.skin-dot_yellow img,
.console .ophoto-frame.skin-stripe_red img,
.console .ophoto-frame.skin-stripe_blue_bow img,
.console .ophoto-frame.skin-bow_pink img,
.console .ophoto-frame.skin-dot_yellow img {
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
  background: #f6e3ea;
}
.face.skin-stripe_red .cap,
.face.skin-stripe_blue_bow .cap,
.face.skin-bow_pink .cap,
.face.skin-dot_yellow .cap,
.order-photos .ophoto-open.skin-stripe_red .ophoto-meta,
.order-photos .ophoto-open.skin-stripe_blue_bow .ophoto-meta,
.order-photos .ophoto-open.skin-bow_pink .ophoto-meta,
.order-photos .ophoto-open.skin-dot_yellow .ophoto-meta {
  color: #3a2430;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.55);
}

.pic { width: 100%; display: block; background: #f6e3ea; object-fit: cover; aspect-ratio: 1 / 1.24; }

.skin-badge {
  position: absolute; top: 8px; left: 8px; z-index: 1;
  font-size: 11px; font-weight: 700; letter-spacing: 0.02em;
  background: rgba(255, 255, 255, 0.92); color: #8a5a70;
  padding: 3px 7px; border-radius: 999px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}
.is-hidden { display: none !important; }

/* Menu khung — hàng swatch tinh tế (scroll ngang trên phone) */
.skin-menu {
  margin-top: 22px;
  padding: 4px 0 2px;
  border: 0;
  background: transparent;
}
.skin-menu-head { margin-bottom: 12px; }
.skin-menu-title {
  margin: 0;
  font-family: Fraunces, serif;
  font-size: 18px;
  font-weight: 600;
  color: #5c3044;
  letter-spacing: -0.01em;
}
.skin-menu-sub {
  margin: 5px 0 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
  max-width: 42ch;
}
.skin-menu-hint {
  margin: 10px 0 0;
  font-size: 12px;
  color: var(--muted);
  opacity: 0.9;
  line-height: 1.35;
}
.skin-menu-flash {
  margin: 10px 0 0;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 12.5px;
  font-weight: 600;
  color: #8a4a62;
  animation: pop 0.28s cubic-bezier(0.34, 1.4, 0.5, 1) both;
}

.skin-rail-wrap {
  position: relative;
  margin: 0 -4px;
}
.skin-rail-wrap::before,
.skin-rail-wrap::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 8px;
  width: 18px;
  z-index: 1;
  pointer-events: none;
}
.skin-rail-wrap::before {
  left: 0;
  background: linear-gradient(90deg, var(--card, #fffbfc), transparent);
}
.skin-rail-wrap::after {
  right: 0;
  background: linear-gradient(270deg, var(--card, #fffbfc), transparent);
}

.skin-combos {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 4px 14px 10px;
}
.skin-combos::-webkit-scrollbar { display: none; }

.skin-combo {
  flex: 0 0 auto;
  width: 72px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  cursor: pointer;
  text-align: center;
  scroll-snap-align: start;
  transition: transform 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
.skin-combo:hover { transform: translateY(-2px); }
.skin-combo:focus-visible {
  outline: 2px solid var(--pink-deep);
  outline-offset: 3px;
}
.skin-combo-card {
  display: block;
  width: 56px;
  height: 70px;
  padding: 5px 5px 14px;
  border-radius: 3px;
  background: #fff;
  box-shadow:
    0 1px 0 rgba(90, 52, 68, 0.06),
    0 8px 18px -10px rgba(90, 52, 68, 0.35);
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.skin-combo.on .skin-combo-card {
  box-shadow:
    0 0 0 2px var(--pink-deep),
    0 10px 22px -10px rgba(196, 90, 124, 0.45);
}
.skin-combo-preview {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 1px;
  border: 1px solid rgba(0, 0, 0, 0.05);
}
.skin-combo-name {
  font-size: 11.5px;
  font-weight: 600;
  color: #3a2430;
  line-height: 1.15;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.skin-combo-meta {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.01em;
  margin-top: -2px;
}
.skin-combo.on .skin-combo-name { color: var(--pink-dark); }
.skin-combo.on .skin-combo-meta { color: var(--pink-deep); }

.skin-combo.skin-classic .skin-combo-preview,
.skin-swatch.skin-classic .skin-swatch-preview,
.skin-chip-dot.skin-classic { background: #fff; }
.skin-combo.skin-stripe_red .skin-combo-preview,
.skin-swatch.skin-stripe_red .skin-swatch-preview,
.skin-chip-dot.skin-stripe_red {
  background-image: url("../img/skins/stripe_red_thumb.png");
  background-size: cover;
  background-position: center;
}
.skin-combo.skin-stripe_blue_bow .skin-combo-preview,
.skin-swatch.skin-stripe_blue_bow .skin-swatch-preview,
.skin-chip-dot.skin-stripe_blue_bow {
  background-image: url("../img/skins/stripe_blue_bow_thumb.png");
  background-size: cover;
  background-position: center;
}
.skin-combo.skin-bow_pink .skin-combo-preview,
.skin-swatch.skin-bow_pink .skin-swatch-preview,
.skin-chip-dot.skin-bow_pink {
  background-image: url("../img/skins/bow_pink_thumb.png");
  background-size: cover;
  background-position: center;
}
.skin-combo.skin-dot_yellow .skin-combo-preview,
.skin-swatch.skin-dot_yellow .skin-swatch-preview,
.skin-chip-dot.skin-dot_yellow {
  background-image: url("../img/skins/dot_yellow_thumb.png");
  background-size: cover;
  background-position: center;
}

.skin-foot { margin-top: 8px; }
.skin-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: 100%;
  justify-content: center;
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(232, 176, 194, 0.85);
  background: rgba(255, 255, 255, 0.92);
  font-size: 12.5px;
  font-weight: 600;
  color: #7a4a5e;
  cursor: pointer;
  box-shadow: 0 1px 0 rgba(90, 52, 68, 0.04);
  -webkit-tap-highlight-color: transparent;
}
.skin-chip.paid { color: #8e3d5c; border-color: #e4a8bb; }
.skin-chip.open {
  border-color: var(--pink-deep);
  box-shadow: 0 0 0 2px rgba(196, 90, 124, 0.18);
}
.skin-chip-dot {
  width: 16px;
  height: 20px;
  border-radius: 2px;
  flex-shrink: 0;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.skin-picker {
  display: flex;
  gap: 8px;
  justify-content: flex-start;
  flex-wrap: nowrap;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  margin-top: 8px;
  padding: 10px 8px;
  background: rgba(255, 255, 255, 0.96);
  border-radius: 14px;
  border: 1px solid rgba(240, 213, 223, 0.9);
  box-shadow: 0 10px 24px -16px rgba(90, 52, 68, 0.35);
  animation: pop 0.28s cubic-bezier(0.34, 1.4, 0.5, 1) both;
}
.skin-picker::-webkit-scrollbar { display: none; }
.skin-swatch {
  flex: 0 0 auto;
  width: 56px;
  min-height: 44px;
  border-radius: 10px;
  border: 1.5px solid rgba(232, 196, 210, 0.9);
  cursor: pointer;
  padding: 5px;
  background: #fff;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  scroll-snap-align: start;
  -webkit-tap-highlight-color: transparent;
}
.skin-swatch.on {
  border-color: var(--pink-deep);
  box-shadow: 0 0 0 2px rgba(196, 90, 124, 0.2);
}
.skin-swatch-preview {
  display: block;
  height: 32px;
  border-radius: 5px;
  border: 1px solid rgba(0, 0, 0, 0.05);
}
.skin-swatch-label {
  font-size: 10px;
  font-weight: 600;
  text-align: center;
  color: #3a2430;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.shot.editing { z-index: 3; }

@media (min-width: 720px) {
  .skin-combo { width: 80px; }
  .skin-combo-card { width: 62px; height: 78px; }
  .skin-rail-wrap::before,
  .skin-rail-wrap::after { width: 28px; }
}

@media (max-width: 560px) {
  .skin-menu { margin-top: 18px; }
  .skin-menu-title { font-size: 17px; }
  .skin-menu-sub { font-size: 12.5px; max-width: none; }
  .skin-combos {
    gap: 8px;
    padding: 2px 12px 8px;
    scroll-padding-inline: 12px;
  }
  .skin-combo { width: 68px; gap: 5px; }
  .skin-combo-card {
    width: 52px;
    height: 66px;
    padding: 4px 4px 12px;
  }
  .skin-combo-name { font-size: 11px; }
  .skin-combo-meta { font-size: 10px; }
  .skin-chip { font-size: 12px; }
  .skin-picker {
    margin-left: -2px;
    margin-right: -2px;
    padding: 8px;
    gap: 6px;
  }
  .skin-swatch { width: 52px; }
}

@media (prefers-reduced-motion: reduce) {
  .skin-combo,
  .skin-combo-card { transition: none; }
  .skin-picker,
  .skin-menu-flash { animation: none; }
}

.cap {
  position: absolute; bottom: 11px; left: 10px; right: 10px; text-align: center;
  font-family: Fraunces, serif; font-style: italic; font-size: 15px; color: #8a5a70;
  border: 0; background: transparent; width: calc(100% - 20px); font-weight: 600;
  padding: 2px 0; border-bottom: 1px dashed transparent;
}
.cap:hover { border-bottom-color: #f0d5df; }
.cap:focus { outline: none; border-bottom-color: var(--pink-deep); }
.cap::placeholder { color: #dcbfcb; }

.acts { position: absolute; top: -12px; right: -12px; display: flex; gap: 6px; z-index: 2; }
.acts button {
  width: 36px; height: 36px; border-radius: 50%; border: 0; cursor: pointer;
  font-size: 14px; font-weight: 700; color: #fff; box-shadow: 0 3px 9px rgba(184, 95, 126, 0.55);
}
.acts .turn { background: var(--muted); }
.acts .del { background: var(--pink-dark); }

.empty { color: var(--muted); font-size: 13.5px; margin-top: 22px; text-align: center; }
.empty.is-hidden { display: none; }

/* HOÁ ĐƠN */
.bill { position: sticky; top: 20px; }
.row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px 12px; flex-wrap: wrap; padding: 10px 0; font-size: 14.5px; }
.row + .row { border-top: 1px dashed var(--line); }
.row .k { color: var(--muted); flex: 1 1 auto; min-width: 0; }
.row .v { font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; flex: 0 1 auto; min-width: 0; word-break: break-word; }
.save .v { color: var(--pink-dark); }
.total { margin-top: 14px; padding-top: 14px; border-top: 2px solid var(--pink); display: flex; justify-content: space-between; align-items: baseline; }
.total .k { font-weight: 600; font-size: 15px; }
.total .v { font-family: Fraunces, serif; font-weight: 800; font-size: clamp(22px, 6.5vw, 30px); font-variant-numeric: tabular-nums; }
.hint { margin-top: 14px; background: var(--cream); padding: 11px 14px; font-size: 13px; font-weight: 500; border-radius: 14px; color: #6b4528; }
.order { width: 100%; margin-top: 14px; padding: 14px; font-size: 15px; }
.order[disabled], .order[aria-disabled="true"] {
  opacity: 1; cursor: not-allowed; transform: none;
  background: #e8d3da; color: #6b3d4d; box-shadow: none;
}

.combos {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 0 0 16px;
  padding-top: 6px;
}
.bill .combos { margin-bottom: 18px; }
.combo {
  background: var(--card); border-radius: 16px; padding: 14px 10px 12px; transition: 0.18s; position: relative;
  box-shadow: 0 10px 26px -16px rgba(184, 95, 126, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.7);
  min-width: 0;
}
.combo.on {
  background: linear-gradient(150deg, var(--pink-deep), var(--pink-dark)); color: #fff;
  box-shadow: 0 16px 30px -14px rgba(184, 95, 126, 0.85); transform: translateY(-2px);
}
.combo .qty { font-family: Fraunces, serif; font-weight: 800; font-size: 24px; line-height: 1; }
.combo .price { font-size: 12.5px; margin-top: 5px; font-weight: 600; line-height: 1.3; }
.combo .off { font-size: 11px; color: var(--muted); margin-top: 3px; line-height: 1.25; }
.combo.on .off { color: rgba(255, 255, 255, 0.85); }
.combo .tag {
  position: absolute; top: -8px; right: 8px; background: #fff; color: var(--pink-dark);
  font-size: 10px; font-weight: 700; padding: 3px 8px; border-radius: 100px;
  box-shadow: 0 3px 10px -3px rgba(184, 95, 126, 0.6);
}
@media (max-width: 400px) {
  .combos { grid-template-columns: 1fr; gap: 12px; }
  .combo .qty { font-size: 26px; }
}

/* FORM CHECKOUT + THANH TOÁN */
.page { max-width: 760px; margin: 48px auto; width: 100%; }
.page.narrow { max-width: 560px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 18px; min-width: 0; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field.wide { grid-column: 1 / -1; }
.field label { font-size: 13px; color: var(--muted); font-weight: 500; }
.field input, .field textarea {
  font-family: inherit; font-size: 14.5px; color: var(--ink);
  padding: 11px 13px; border: 1px solid var(--line); border-radius: 12px; background: #fff;
  width: 100%; max-width: 100%; min-width: 0;
  -webkit-appearance: none; appearance: none;
}
.field input:focus, .field textarea:focus { outline: 2px solid var(--pink); border-color: var(--pink-deep); }
.field .errorlist { list-style: none; margin: 0; padding: 0; color: var(--pink-dark); font-size: 12.5px; }
.summary { margin: 18px 0; padding: 14px 16px; background: var(--cream); border-radius: 14px; overflow: hidden; }
.summary .row .v { color: var(--ink); }
.summary .skin-summary-v {
  text-align: right;
  max-width: 62%;
  line-height: 1.35;
  font-weight: 600;
}
.pay-card { text-align: center; }
.pay-card .qr { width: 220px; height: 220px; margin: 12px auto; border-radius: 16px; background: #fff;
  border: 1px solid var(--line); object-fit: contain; padding: 8px; }
.pay-card .bankinfo { text-align: left; background: var(--cream); border-radius: 14px; padding: 14px 16px; margin: 14px 0; }
.pay-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.pay-actions form { margin: 0; }
.pay-actions .btn { width: 100%; margin-top: 0; }
.pay-demo-note { margin: 0; font-size: 13px; }
.pay-cancel { margin-top: 0 !important; }
.order-cancel-form { margin-top: 12px; }
.order-cancel-form .btn { width: 100%; margin-top: 0; }
.banner { padding: 14px 18px; border-radius: 14px; font-weight: 600; margin: 14px 0; }
.banner.ok { background: #e9f7ec; color: #2f7d42; }
.banner.wait { background: var(--cream); color: #8a6440; }
.msg { padding: 10px 14px; border-radius: 12px; background: var(--cream); color: #6b4528; margin: 8px 0; font-size: 14px; }
@media (max-width: 720px) { .form-grid { grid-template-columns: 1fr; } }

/* Skip link — ẩn hẳn đến khi Tab vào (không lộ “link trần” trên đầu trang). */
.skip-link {
  position: absolute;
  width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); clip-path: inset(50%);
  white-space: nowrap; border: 0;
}
.skip-link:focus, .skip-link:focus-visible {
  position: fixed; top: 12px; left: 12px; z-index: 10000;
  width: auto; height: auto; margin: 0; padding: 12px 18px;
  clip: auto; clip-path: none; overflow: visible; white-space: normal;
  background: var(--pink-dark); color: #fff;
  font-weight: 600; font-size: 14px; text-decoration: none;
  border-radius: 12px;
  box-shadow: 0 10px 28px -12px rgba(90, 52, 68, 0.55);
  outline: 3px solid var(--pink); outline-offset: 3px;
}

/* TOP NAV */
.topnav {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px;
  padding: 12px 22px;
  padding-top: max(12px, env(safe-area-inset-top));
  background: rgba(255,255,255,.8); backdrop-filter: blur(6px);
}
.topnav .brand { font-family: Fraunces, serif; font-weight: 800; font-size: 18px;
  color: var(--pink-dark); text-decoration: none; min-height: 44px;
  display: inline-flex; align-items: center; padding: 10px 4px; }
.topnav .spacer { flex: 1; }
.topnav a { color: var(--ink); text-decoration: none; font-size: 14px; font-weight: 500;
  padding: 12px 14px; min-height: 44px; min-width: 44px; display: inline-flex; align-items: center; }
.topnav a:hover { color: var(--pink-dark); }
.logout-form { display: inline-flex; margin: 0; }
.nav-link-btn {
  background: none; border: none; color: var(--ink); font: inherit; font-size: 14px;
  font-weight: 500; padding: 10px 12px; min-height: 44px; cursor: pointer;
}
.nav-link-btn:hover { color: var(--pink-dark); }
.nav-link-btn:focus-visible { outline: 3px solid var(--pink); outline-offset: 2px; }
.site-footer {
  margin-top: 48px;
  padding: 28px 0 40px;
  background: rgba(255, 251, 252, 0.92);
  border-top: 1px solid var(--line);
}
.site-footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr auto;
  gap: 20px 28px;
  align-items: end;
}
.site-footer-name {
  font-family: Fraunces, serif; font-weight: 800; font-size: 20px;
  color: var(--pink-dark); text-decoration: none;
}
.site-footer-tag { margin: 6px 0 0; font-size: 13px; color: var(--muted); line-height: 1.45; }
.site-footer-nav { display: flex; flex-wrap: wrap; gap: 4px 8px; }
.site-footer-nav a {
  color: var(--ink); text-decoration: none; font-size: 14px; font-weight: 500;
  padding: 10px 12px; min-height: 44px; display: inline-flex; align-items: center;
}
.site-footer-nav a:hover { color: var(--pink-dark); }
.site-footer-copy { margin: 0; font-size: 13px; color: var(--muted); align-self: center; }
@media (max-width: 720px) {
  .site-footer-inner { grid-template-columns: 1fr; gap: 14px; }
  .site-footer-copy { order: 3; }
}

/* Trang chính sách / liên hệ */
.legal-page { max-width: 720px; margin: 36px auto 56px; }
.legal-head { text-align: center; margin-bottom: 28px; }
.legal-head h1 {
  font-family: Fraunces, serif; font-weight: 800; font-size: clamp(32px, 6vw, 44px);
  margin: 14px 0 12px; line-height: 1.1;
}
.legal-head .lede { margin-top: 0; }
.legal-block {
  background: var(--card); border-radius: 20px; padding: 22px 24px;
  margin-bottom: 14px;
  box-shadow: 0 14px 36px -22px rgba(184, 95, 126, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.8);
}
.legal-block h2 {
  font-family: Fraunces, serif; font-weight: 600; font-size: 22px;
  margin: 0 0 10px; color: var(--ink);
}
.legal-block p {
  margin: 0 0 10px; color: var(--muted); font-size: 15px; line-height: 1.65;
}
.legal-block p:last-child { margin-bottom: 0; }
.legal-foot {
  margin: 22px 0 0; text-align: center; font-size: 14px; color: var(--muted); line-height: 1.55;
}
.legal-foot a { color: var(--pink-dark); font-weight: 600; }
.contact-list {
  background: var(--card); border-radius: 20px; padding: 8px 8px;
  box-shadow: 0 14px 36px -22px rgba(184, 95, 126, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.8);
}
.contact-row {
  display: flex; justify-content: space-between; gap: 16px; align-items: baseline;
  padding: 16px 18px; border-top: 1px dashed var(--line);
}
.contact-row:first-child { border-top: 0; }
.contact-k { font-size: 13px; font-weight: 600; color: var(--muted); }
.contact-v { font-size: 15px; font-weight: 600; color: var(--ink); text-align: right; }
.contact-v a { color: var(--pink-dark); text-decoration: none; }
.contact-v a:hover { text-decoration: underline; }

.error-panel { text-align: center; }
.privacy-note { font-size: 12.5px; font-style: italic; }
#order:disabled { opacity: 0.55; cursor: not-allowed; filter: grayscale(0.15); }

/* CONSOLE STAFF */
.console { max-width: 1040px; margin: 28px auto 56px; }
.console-head {
  margin-bottom: 20px;
  display: flex; flex-wrap: wrap; gap: 12px;
  align-items: flex-end; justify-content: space-between;
}
.console-h1 { font-family: Fraunces, serif; font-size: clamp(28px, 5vw, 36px); margin: 10px 0 8px; }
.console-lede { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.5; max-width: 48ch; }
.console-stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
  margin: 0 0 22px;
}
.stat {
  background: var(--card); border-radius: 18px; padding: 16px 18px;
  box-shadow: 0 12px 28px -20px rgba(184, 95, 126, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.75);
  min-width: 0;
}
.stat-alert { box-shadow: 0 12px 28px -18px rgba(184, 95, 126, 0.7), 0 0 0 2px var(--pink-deep); }
.stat-lab {
  display: block; font-size: 11px; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 6px;
}
.stat-val {
  display: block; font-family: Fraunces, serif; font-weight: 800;
  font-size: clamp(22px, 3.2vw, 28px); color: var(--ink); line-height: 1.15;
  font-variant-numeric: tabular-nums; word-break: break-word;
}
.stat-hint { display: block; margin-top: 6px; font-size: 12.5px; color: var(--muted); line-height: 1.35; }
.console-empty {
  background: var(--card); border-radius: 18px; padding: 36px 22px; text-align: center;
  box-shadow: 0 10px 26px -18px rgba(184, 95, 126, 0.45);
}
.console-empty-title { margin: 0 0 8px; font-weight: 700; font-size: 16px; color: var(--ink); }
.console-empty .dim { margin: 4px 0; }
/* ── Bảng đơn console xưởng — một panel liền, dễ quét ─────────────────── */
.otbl {
  background: var(--card); border-radius: 16px; overflow: hidden;
  box-shadow: 0 14px 34px -22px rgba(150, 60, 95, .5), 0 0 0 1px var(--line);
}
.orow, .otbl-head {
  display: grid;
  grid-template-columns: 6px 128px 1.6fr 66px 106px 122px;
  gap: 14px; align-items: center;
}
.otbl-head {
  padding: 11px 18px 11px 0; background: #fff6f9; border-bottom: 1px solid var(--line);
}
.otbl-head .oh {
  font-size: 10.5px; font-weight: 700; letter-spacing: .07em;
  text-transform: uppercase; color: var(--muted);
}
.otbl-head .oh-r { text-align: right; }
.oitem { border-bottom: 1px solid var(--line); }
.oitem:last-child { border-bottom: 0; }
.orow { padding: 13px 18px 13px 0; }
.orow:hover { background: #fff6f9; }
/* Vạch màu trạng thái bên trái — đọc trạng thái tức thì */
.obar { grid-column: 1; justify-self: start; width: 6px; height: 40px; border-radius: 0 4px 4px 0; background: var(--muted); }
.s-paid .obar { background: #3fae63; }
.s-in_production .obar { background: #e0a54e; }
.s-shipped .obar { background: #5b83e0; }
.s-delivered .obar { background: #9a6fd6; }
.s-awaiting_payment .obar { background: #e07aa0; }
/* Hai trạng thái của dòng booklet — thiếu thì chúng rơi về xám, trùng "không rõ trạng thái",
   mà đây lại là sản phẩm đắt nhất shop bán. */
.s-designing .obar { background: #6b3f9e; }
.s-proof_review .obar { background: #d64545; }
.s-cancelled .obar, .s-refunded .obar, .s-payment_failed .obar { background: #b08a97; }
.ocode { min-width: 0; }
.ocode-link { font-family: Fraunces, serif; font-weight: 700; font-size: 16px; color: var(--pink-dark); text-decoration: none; }
.ocode-link:hover { text-decoration: underline; }
.otime { display: block; margin-top: 2px; font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.ocust { min-width: 0; display: flex; flex-direction: column; gap: 5px; align-items: flex-start; }
.oname { font-weight: 600; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* SĐT nổi bật — chip đậm, tabular, kèm nút copy */
.ophone-wrap { display: inline-flex; align-items: center; gap: 5px; }
.ophone {
  font-size: 13.5px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums;
  letter-spacing: .02em; background: #fff6f9; border: 1px solid var(--line); border-radius: 7px; padding: 2px 8px;
}
.copy-btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; padding: 0; border: 1px solid var(--line); border-radius: 8px;
  background: #fff; color: var(--pink-deep); cursor: pointer;
}
.copy-btn:hover { background: #fff6f9; border-color: var(--pink); }
.copy-btn:focus-visible { outline: 3px solid var(--pink); outline-offset: 2px; }
.copy-btn svg { width: 15px; height: 15px; pointer-events: none; }
.copy-btn.is-copied { color: #237a3b; border-color: #9ed4ac; background: #eaf7ee; }
.copy-btn.is-copied::after {
  content: "Đã chép"; position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%);
  background: var(--ink); color: #fff; font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 6px;
  white-space: nowrap; pointer-events: none; z-index: 3;
}
.oqty { font-size: 14px; font-variant-numeric: tabular-nums; }
.oqty .ou { color: var(--muted); font-size: 12px; }
.oqty .m-lab { display: none; }
.ototal { text-align: right; font-weight: 700; font-size: 15px; color: var(--ink); font-variant-numeric: tabular-nums; }
.ostatus { justify-self: end; }
/* Chi tiết đơn */
.odetail { padding: 2px 18px 15px 22px; display: flex; flex-direction: column; gap: 11px; }
.onote { margin: 0; font-size: 13px; }
.onote-wait { color: #b23e6a; }
/* Giao đến — địa chỉ nổi bật, tỉnh/thành tách riêng dòng để phân loại giao */
.oshipto { display: flex; flex-wrap: wrap; align-items: baseline; gap: 5px 12px; font-size: 13.5px; }
.oflabel { font-size: 10.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.oshipto-lines { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.oaddr-main { color: var(--ink); font-weight: 600; }
.oprovince { font-weight: 800; color: var(--pink-dark); font-size: 13px; text-transform: uppercase; letter-spacing: .03em; }
.otrack {
  background: #e7eefb; color: #2f56ac; border-radius: 7px; padding: 2px 9px;
  font-weight: 700; font-size: 12px; font-variant-numeric: tabular-nums;
}
.oemail { color: var(--muted); font-size: 12.5px; }
/* Khung cần in — cảnh báo ĐỎ, chữ to (in sai khung là hỏng cả đơn) */
.oneeds {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 14px; border-radius: 11px;
  background: #fdeaea; border: 1px solid #f2c4c4; border-left: 5px solid #d64545;
}
.oneeds-lab { font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #c02f2f; white-space: nowrap; }
.oneeds-val { font-size: 17px; font-weight: 800; color: #a51f1f; letter-spacing: .01em; }
/* Vùng thao tác */
.oacts { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; padding-top: 2px; }
.oacts form { display: flex; gap: 8px; align-items: center; margin: 0; }
.oacts .btn { margin: 0; }
.oacts .zip-link { margin-left: auto; }
@media (max-width: 900px) {
  .console-stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .console-stats { grid-template-columns: 1fr; }
}
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.tab { text-decoration: none; color: var(--ink); background: #fff; border-radius: 100px;
  padding: 8px 15px; font-size: 13.5px; font-weight: 500; border: 1px solid var(--line); }
.tab.on { background: var(--pink-deep); color: #fff; border-color: var(--pink-deep); }
.tab .pill { display: inline-block; margin-left: 6px; background: rgba(0,0,0,.08); color: inherit;
  border-radius: 100px; padding: 1px 8px; font-size: 12px; font-weight: 700; }
.tab.on .pill { background: rgba(255,255,255,.25); }
.dim { color: var(--muted); font-size: 12.5px; }
.ship-form input { font-family: inherit; font-size: 13px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 10px; }
.btn.ghost {
  background: var(--pink-deep);
  color: #fff;
  border: 0;
  box-shadow: 0 4px 14px -6px rgba(184, 95, 126, 0.55);
}
.btn.ghost:hover { background: var(--pink-dark); }
.badge { display: inline-block; padding: 3px 10px; border-radius: 100px; font-size: 12px; font-weight: 700; }
.badge.s-paid { background: #e9f7ec; color: #2f7d42; }
.badge.s-in_production { background: #fdf3e2; color: #8a6440; }
.badge.s-shipped { background: #e8eefb; color: #3355aa; }
.badge.s-designing { background: #f3ecfb; color: #6b3f9e; }
.badge.s-proof_review { background: #fdeaea; color: #a51f1f; }
.badge.s-delivered { background: #eef1ee; color: #4a6b52; }
.badge.s-awaiting_payment { background: #fce7ee; color: var(--pink-dark); }
.badge.s-cancelled, .badge.s-refunded, .badge.s-payment_failed { background: #f2e3e3; color: #9a5a5a; }
.msg.success { background: #e9f7ec; color: #2f7d42; }
.msg.error { background: #fce7ee; color: var(--pink-dark); }
.ophotos { margin: 12px 0; padding-top: 12px; border-top: 1px solid var(--line); }
.ophotos-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  margin-bottom: 10px; flex-wrap: wrap;
}
.ophotos-head .lab { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.ophotos-hint { font-size: 12px; color: var(--muted); font-style: italic; }
.btn-sm { font-size: 12px; padding: 6px 12px; margin: 0; }
.ophotos-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.ophoto { width: 100px; text-align: center; }
.ophoto img { width: 100px; height: 124px; object-fit: cover; border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,.08); background: #f6e3ea; }
/* Console xưởng: bấm thumb xem gốc (cùng lightbox trang đơn) */
.ophoto-console-thumb {
  display: block; width: 100px; margin: 0; padding: 0; border: 0;
  background: transparent; cursor: zoom-in; border-radius: 8px;
}
.console .ophoto-frame {
  width: 100px;
  padding: 6px 6px 18px;
  border-radius: 2px;
  background: #fff;
  box-shadow: 0 6px 14px -8px rgba(90, 52, 68, 0.4);
}
.console .ophoto-frame img {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1.24;
  object-fit: cover;
  border-radius: 0;
  box-shadow: none;
  display: block;
  background: #f6e3ea;
}
.ophoto-console-thumb:focus-visible {
  outline: 3px solid var(--pink); outline-offset: 2px;
}
.ophoto-console-thumb img { display: block; pointer-events: none; }
.console .ophotos-hint { margin: 0 0 10px; width: 100%; }
/* Trang đơn khách: khổ polaroid cố định (không giãn 1fr), lightbox theo tỉ lệ ảnh */
.order-photos { margin: 18px 0 8px; padding-top: 16px; }
.order-photos-grid {
  display: flex; flex-wrap: wrap; gap: 14px;
  align-items: flex-start;
}
.order-photos-grid.is-scroll {
  max-height: min(62vh, 520px);
  overflow: auto;
  padding: 4px 6px 8px 2px;
  -webkit-overflow-scrolling: touch;
}
.order-photos .ophoto-open {
  /* Khung polaroid: ảnh 1:1.24 + viền trắng + chỗ caption — width cố định, không giãn full hàng */
  --op-w: 118px;
  position: relative;
  width: var(--op-w); margin: 0; padding: 8px 8px 28px;
  border: 0; background: #fff; font: inherit; color: inherit;
  cursor: zoom-in; text-align: center; border-radius: 2px;
  box-shadow: 0 10px 22px -12px rgba(90, 52, 68, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.9);
}
.order-photos-grid.is-dense .ophoto-open { --op-w: 96px; padding: 6px 6px 24px; }
.order-photos .ophoto-open:focus-visible {
  outline: 3px solid var(--pink); outline-offset: 3px;
}
.order-photos .ophoto img {
  width: 100%; height: auto; aspect-ratio: 1 / 1.24;
  object-fit: cover; border-radius: 0; box-shadow: none; display: block;
  background: #f6e3ea;
}
.order-photos .ophoto-meta {
  position: absolute; left: 8px; right: 8px; bottom: 7px;
  margin: 0; font-size: 11px; gap: 0;
}
.order-photos-grid.is-dense .ophoto-meta { font-size: 10px; bottom: 5px; left: 6px; right: 6px; }
.ophoto-meta { font-size: 11px; margin-top: 4px; color: var(--muted); display: flex; flex-direction: column; gap: 2px; }
.ophoto-meta a { color: var(--pink-dark); font-weight: 600; }
.ophoto-cap { font-style: italic; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ophotos-missing { margin: 8px 0 0; font-size: 12.5px; }

.order-lightbox {
  position: fixed; inset: 0; z-index: 12000;
  display: flex; align-items: center; justify-content: center;
  padding: max(12px, env(safe-area-inset-top)) 12px max(12px, env(safe-area-inset-bottom));
}
.order-lightbox[hidden] { display: none !important; }
.order-lightbox-backdrop {
  position: absolute; inset: 0; border: 0; margin: 0; padding: 0;
  background: rgba(40, 22, 30, 0.72); cursor: pointer;
}
.order-lightbox-sheet {
  position: relative; z-index: 1; display: flex; align-items: center; justify-content: center;
  gap: 10px; max-width: 100%;
}
.order-lightbox-figure {
  /* Ảnh gốc: giữ tỉ lệ thật (không ép 1:1.24), vừa viewport */
  position: relative;
  margin: 0; max-width: min(92vw, 960px); max-height: min(88vh, 900px);
  background: #111; border-radius: 12px;
  padding: 12px 12px 40px;
  box-shadow: 0 24px 48px -18px rgba(0, 0, 0, 0.5);
}
.order-lightbox-img {
  display: block; margin: 0 auto;
  width: auto; height: auto;
  max-width: min(88vw, 920px); max-height: min(72vh, 780px);
  object-fit: contain; background: #111; border-radius: 4px;
}
.order-lightbox-figure figcaption {
  position: absolute; left: 14px; right: 14px; bottom: 10px;
  display: flex; flex-direction: column; gap: 2px; align-items: center;
  margin: 0; font-size: 13px; color: rgba(255, 255, 255, 0.75); text-align: center;
}
.order-lightbox-idx { font-size: 11px; letter-spacing: 0.04em; }
.order-lightbox-cap {
  font-family: Fraunces, serif; font-style: italic; font-weight: 600;
  font-size: 15px; color: #fff; max-width: 100%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.order-lightbox-x {
  position: absolute; top: -10px; right: -10px; z-index: 2;
  width: 40px; height: 40px; border: 0; border-radius: 999px;
  background: #fff; color: var(--ink); font-size: 26px; line-height: 1;
  cursor: pointer; box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
}
.order-lightbox-nav {
  flex: 0 0 auto; width: 42px; height: 42px; border: 0; border-radius: 999px;
  background: #fff; color: var(--pink-dark); font-size: 28px; line-height: 1;
  cursor: pointer; box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}
.order-lightbox-nav:disabled { opacity: 0.35; cursor: default; }
body.lb-open { overflow: hidden; }
@media (max-width: 640px) {
  .order-lightbox-figure { padding: 10px 10px 36px; max-width: 96vw; }
  .order-lightbox-img { max-width: 92vw; max-height: 68vh; }
  .order-lightbox-nav { width: 36px; height: 36px; font-size: 24px; }
  .order-lightbox-x { top: -8px; right: -8px; width: 36px; height: 36px; font-size: 22px; }
}

.ship-to-card {
  margin: 18px 0 20px; padding: 16px 18px;
  background: #fffbfc; border-radius: 16px; border: 1px solid var(--line);
}
.ship-to-title {
  margin: 0 0 10px; font-size: 11px; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--muted); font-weight: 700;
}
.ship-to-name {
  margin: 0 0 4px; font-family: Fraunces, serif; font-weight: 700;
  font-size: 18px; color: var(--ink);
}
.ship-to-phone { margin: 0 0 8px; font-size: 14px; font-weight: 600; color: var(--pink-dark); }
.ship-to-addr { margin: 0; font-size: 14px; line-height: 1.5; color: var(--muted); }
.ship-to-card .privacy-note { margin: 12px 0 0; }
.uploading, .upload-err { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600; border-radius: 4px; }
.uploading { background: rgba(255,255,255,.75); color: var(--pink-dark); }
.upload-err { background: rgba(252,231,238,.92); color: #a04040; padding: 4px; text-align: center; }
.face { position: relative; }
.shots .retry { background: #fff3e0; color: #8a6440; }
@media (max-width: 720px) {
  .otbl-head { display: none; }
  .orow {
    grid-template-columns: 1fr auto; gap: 5px 12px; align-items: start;
    padding: 13px 16px; border-left: 5px solid var(--muted);
  }
  .s-paid .orow { border-left-color: #3fae63; }
  .s-in_production .orow { border-left-color: #e0a54e; }
  .s-shipped .orow { border-left-color: #5b83e0; }
  .s-delivered .orow { border-left-color: #9a6fd6; }
  .s-awaiting_payment .orow { border-left-color: #e07aa0; }
  .s-designing .orow { border-left-color: #6b3f9e; }
  .s-proof_review .orow { border-left-color: #d64545; }
  .obar { display: none; }
  .ocode { grid-column: 1; grid-row: 1; }
  .ostatus { grid-column: 2; grid-row: 1; justify-self: end; }
  .ocust { grid-column: 1 / -1; grid-row: 2; }
  .oqty { grid-column: 1; grid-row: 3; }
  .oqty .m-lab { display: inline; color: var(--muted); font-size: 12px; }
  .ototal { grid-column: 2; grid-row: 3; align-self: end; }
  .odetail { padding-left: 16px; }
}

/* ── Tài khoản khách: đăng nhập + đơn của tôi ── */
.auth-page { max-width: 520px; margin: 0 auto; padding: 32px 20px 48px; }
.auth-head { text-align: center; padding: 24px 0 28px; }
.auth-head h1 {
  font-family: Fraunces, serif; font-weight: 800; font-size: clamp(28px, 6vw, 42px);
  line-height: 1.08; margin: 16px 0 10px; letter-spacing: -0.02em;
  text-shadow: 0 2px 0 #fff, 0 4px 14px rgba(255, 255, 255, 0.85);
}
.auth-card { text-align: center; padding: 32px 28px; }
.auth-card h2 { font-family: Fraunces, serif; font-size: 20px; margin: 0 0 6px; }
.auth-card .sub { margin-bottom: 22px; line-height: 1.55; }
.auth-card .msg { text-align: left; }

a.btn.btn-google {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; margin-top: 0; padding: 14px 20px; font-size: 15px;
  background: #fff; color: var(--ink); border: 1px solid var(--line);
  box-shadow: 0 4px 14px -6px rgba(184, 95, 126, 0.35);
  white-space: nowrap;
}
a.btn.btn-google:hover {
  background: #fffbfc; border-color: var(--pink); color: var(--pink-dark);
  transform: translateY(-1px); box-shadow: 0 8px 20px -8px rgba(184, 95, 126, 0.45);
}
a.btn.btn-google svg { flex-shrink: 0; }

.auth-dev {
  margin-top: 24px; padding-top: 22px; border-top: 1px dashed var(--line); text-align: left;
}
.auth-dev .sub { margin: 0 0 10px; font-size: 12.5px; }
.auth-dev-form { display: flex; flex-wrap: wrap; gap: 10px; }
.auth-dev-form input {
  flex: 1 1 180px; font-family: inherit; font-size: 14px; padding: 11px 13px;
  border: 1px solid var(--line); border-radius: 12px; background: #fff;
}
.auth-dev-form input:focus { outline: 2px solid var(--pink); border-color: var(--pink-deep); }
.auth-dev-form .btn { margin-top: 0; flex-shrink: 0; }

.account-page { max-width: 720px; margin: 0 auto; padding: 28px 20px 52px; }
.account-head { text-align: center; padding: 8px 0 24px; }
.account-head h1 {
  font-family: Fraunces, serif; font-weight: 800; font-size: clamp(30px, 6vw, 44px);
  margin: 14px 0 0; letter-spacing: -0.02em;
  text-shadow: 0 2px 0 #fff, 0 4px 14px rgba(255, 255, 255, 0.85);
}
.account-user {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 12px 16px; padding: 16px 20px; margin-bottom: 22px;
}
.account-user .email {
  font-size: 14.5px; font-weight: 600; color: var(--ink);
  word-break: break-all;
}
.account-user .email span {
  display: block; font-size: 11px; font-weight: 500; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--muted); margin-bottom: 3px;
}
.account-user .logout {
  font-size: 13.5px; font-weight: 600; color: var(--pink-dark); text-decoration: none;
  padding: 8px 14px; border-radius: 100px; border: 1px solid var(--pink);
  background: #fff; transition: 0.18s;
}
.profile-panel { padding: 24px 26px 28px; }
.profile-actions {
  display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px;
}
.profile-actions .btn { margin-top: 0; }
.profile-actions .btn.order { flex: 1 1 200px; }
.checkout-profile-hint a { color: var(--pink-dark); font-weight: 600; }
.account-user-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.account-user-actions .logout-form { margin: 0; }
.account-user-actions button.logout {
  font: inherit; cursor: pointer;
  font-size: 13.5px; font-weight: 600; color: var(--pink-dark);
  padding: 8px 14px; border-radius: 100px; border: 1px solid var(--pink);
  background: #fff;
}

.account-tabs {
  margin: 0 0 18px;
  padding-bottom: 2px;
  /* phone: cuộn ngang thay vì xuống dòng rối */
  flex-wrap: nowrap;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
}
.account-tabs::-webkit-scrollbar { display: none; }
.account-tabs .tab {
  flex: 0 0 auto;
  scroll-snap-align: start;
  white-space: nowrap;
}

.account-empty {
  text-align: center; padding: 36px 24px 32px;
}
.account-empty-tab { padding: 28px 22px; }
.account-empty-tab h2 { margin-bottom: 8px; }
.account-empty .polaroid-empty {
  width: 120px; margin: 0 auto 18px; background: #fff; border-radius: 2px;
  padding: 8px 8px 32px; box-shadow: 0 10px 24px -8px rgba(184, 95, 126, 0.55);
  transform: rotate(-2deg);
}
.account-empty .polaroid-empty .ph {
  aspect-ratio: 1 / 1.24; background: linear-gradient(145deg, #f6e3ea, #fdeef3);
  border-radius: 1px; display: flex; align-items: center; justify-content: center;
  font-size: 28px; color: var(--pink);
}
.account-empty h2 {
  font-family: Fraunces, serif; font-size: 22px; margin: 0 0 8px; font-weight: 700;
}
.account-empty p { color: var(--muted); font-size: 14.5px; margin: 0 0 20px; line-height: 1.55; }
.account-empty .btn { margin-top: 0; }

.order-list { display: flex; flex-direction: column; gap: 14px; }
.order-card { padding: 18px 20px; }
.order-card-top {
  display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between;
  gap: 10px 16px; margin-bottom: 14px;
}
.order-card-top .code {
  font-family: Fraunces, serif; font-weight: 800; font-size: 20px;
  color: var(--pink-dark); text-decoration: none;
}
.order-card-top .code:hover { text-decoration: underline; }
.order-card-meta {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
  padding: 14px 0; border-top: 1px dashed var(--line); border-bottom: 1px dashed var(--line);
}
.order-card-meta .lab {
  display: block; font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--muted); margin-bottom: 4px;
}
.order-card-meta .val { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.order-card-foot {
  display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between;
  gap: 12px; margin-top: 14px;
}
.order-card-ship { flex: 1 1 200px; min-width: 0; }
.order-card-actions { flex: 0 0 auto; }
.order-card-foot .tracking { font-size: 13px; color: var(--muted); line-height: 1.5; }
.order-card-foot .tracking.dim { font-style: italic; }
.order-card-foot .btn { margin-top: 0; padding: 11px 20px; font-size: 14px; white-space: nowrap; }
.track-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px; background: #fce7ee; padding: 2px 6px; border-radius: 4px;
}
@media (max-width: 520px) {
  .order-card-meta { grid-template-columns: 1fr 1fr; }
  .order-card-meta .meta-date { grid-column: 1 / -1; }
  .order-card-actions { width: 100%; }
  .order-card-actions .btn { width: 100%; text-align: center; }
}

/* ── Order timeline + shipping ── */
.timeline-card {
  margin: 22px 0;
  padding: 20px 18px 10px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: linear-gradient(160deg, #fff 0%, #fdf3f7 48%, #fce8ef 100%);
  box-shadow: 0 8px 28px -18px rgba(184, 95, 126, 0.55);
}
.timeline-card-title, .ship-box-title {
  font-family: Fraunces, serif;
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 18px;
  letter-spacing: -0.01em;
}
.timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 0;
  padding: 0;
}
.timeline-step {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 14px;
  align-items: start;
  padding: 0 0 22px;
  position: relative;
  margin: 0;
}
.timeline-step:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 23px;
  top: 48px;
  bottom: 2px;
  width: 3px;
  border-radius: 99px;
  background: rgba(90, 52, 68, 0.1);
}
.timeline-step.is-done:not(:last-child)::after {
  background: linear-gradient(180deg, var(--pink-deep) 0%, var(--pink) 100%);
}
.timeline-marker {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 2px solid rgba(90, 52, 68, 0.14);
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.timeline-icon { width: 22px; height: 22px; color: #fff; }
.timeline-ring {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(166, 126, 142, 0.45);
  background: #fff;
}
.timeline-pulse {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--pink-dark);
  box-shadow: 0 0 0 0 rgba(184, 95, 126, 0.45);
  animation: timeline-pulse 2s ease-out infinite;
}
@keyframes timeline-pulse {
  0% { box-shadow: 0 0 0 0 rgba(184, 95, 126, 0.45); }
  70% { box-shadow: 0 0 0 10px rgba(184, 95, 126, 0); }
  100% { box-shadow: 0 0 0 0 rgba(184, 95, 126, 0); }
}
.timeline-step.is-done .timeline-marker {
  background: linear-gradient(145deg, var(--pink-deep), var(--pink-dark));
  border-color: transparent;
  box-shadow: 0 4px 14px -4px rgba(184, 95, 126, 0.65);
}
.timeline-step.is-current .timeline-marker {
  border-color: var(--pink-dark);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(240, 184, 200, 0.55);
  transform: scale(1.04);
}
.timeline-step.is-pending .timeline-marker { background: #faf7f8; }
.timeline-body { padding-top: 4px; min-width: 0; }
.timeline-label {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.35;
}
.timeline-step.is-pending .timeline-label { color: var(--muted); font-weight: 600; }
.timeline-step.is-current .timeline-label { color: var(--pink-dark); }
.timeline-time {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.timeline-time--wait { font-style: italic; opacity: 0.85; }

@media (min-width: 560px) {
  .timeline {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    padding-top: 4px;
  }
  .timeline-step {
    flex: 1;
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    padding: 0;
    min-width: 0;
  }
  .timeline-step:not(:last-child)::after {
    left: calc(50% + 28px);
    right: calc(-50% + 28px);
    top: 24px;
    bottom: auto;
    width: auto;
    height: 3px;
  }
  .timeline-body { padding-top: 10px; }
  .timeline-label { font-size: 13px; }
  .timeline-time { font-size: 11px; }
}

.ship-box {
  margin: 16px 0;
  padding: 16px 18px;
  background: #fffbfc;
  border-radius: 16px;
  border: 1px solid var(--line);
}
.ship-dl { margin: 0 0 12px; }
.ship-row { display: flex; gap: 8px; margin-bottom: 6px; font-size: 14px; flex-wrap: wrap; }
.ship-row dt { min-width: 100px; color: var(--muted); font-weight: 600; }
.ship-row dd { margin: 0; }
.ship-pending {
  font-size: 14px; color: var(--muted); margin: 12px 0;
  padding: 12px 14px; background: #fdf8fa; border-radius: 12px; line-height: 1.5;
}
.btn-sm { padding: 8px 14px !important; font-size: 13px !important; display: inline-block; }
.status-history-card {
  margin-top: 16px; padding: 14px 16px;
  background: #fffbfc; border-radius: 16px; border: 1px solid var(--line);
}
.status-history-summary {
  list-style: none; cursor: pointer; display: flex; align-items: center;
  justify-content: space-between; gap: 12px; font-weight: 600; color: var(--ink);
}
.status-history-summary::-webkit-details-marker { display: none; }
.status-history-summary-label { font-size: 14px; }
.status-history-summary-count {
  font-size: 12px; font-weight: 600; color: var(--muted);
  background: #f6e3ea; padding: 3px 10px; border-radius: 999px;
}
.status-history-rail {
  list-style: none; margin: 14px 0 0; padding: 0 0 0 4px;
  border-left: 2px solid #f0d5df;
}
.status-history-item {
  position: relative; display: flex; gap: 12px; padding: 0 0 14px 14px;
}
.status-history-item:last-child { padding-bottom: 2px; }
.status-history-dot {
  position: absolute; left: -5px; top: 6px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--pink-deep); box-shadow: 0 0 0 3px #fffbfc;
}
.status-history-label { margin: 0; font-size: 14px; font-weight: 700; color: var(--ink); }
.status-history-time { display: block; margin-top: 2px; font-size: 12px; color: var(--muted); }
.status-history-note { margin: 4px 0 0; font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.dim { color: var(--muted); }

footer { padding: 30px 0 56px; color: var(--muted); font-size: 13px; text-align: center; }
footer span { background: rgba(255, 255, 255, 0.75); padding: 8px 16px; border-radius: 100px; }

/* ── Mobile — checkout, trang chủ, tài khoản ── */
@media (max-width: 640px) {
  .wrap { padding: 0 14px; }
  header { padding: 36px 0 16px; }
  h1 { font-size: clamp(28px, 9vw, 42px); margin: 16px 0 12px; }
  .lede { font-size: 15px; padding: 10px 14px; }

  .studio { margin: 20px auto 36px; gap: 16px; }
  .panel { padding: 18px 16px; border-radius: 18px; }
  .panel h2 { font-size: 20px; }
  .bill { position: static; top: auto; }

  .page { margin: 20px auto 36px; }
  .page.narrow { margin: 16px auto 32px; }
  .auth-page { padding: 20px 14px 40px; }
  .auth-card { padding: 24px 18px; }
  .account-page { padding: 16px 14px 40px; }
  .profile-panel { padding: 18px 16px 22px; }

  .field input, .field textarea, .auth-dev-form input {
    font-size: 16px; /* tránh zoom tự động trên iOS */
    padding: 12px 14px;
  }

  .drop { padding: 26px 16px; }
  .shots { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 18px; }
  .hint, .checkout-profile-hint { font-size: 12.5px; line-height: 1.5; }

  .topnav { padding: 10px 14px; gap: 6px 10px; }
  .topnav .brand { font-size: 17px; margin-right: auto; }
  .topnav .spacer { display: none; }
  .topnav a { font-size: 13px; }

  .profile-actions { flex-direction: column; }
  .profile-actions .btn { width: 100%; text-align: center; }
  .profile-actions .btn.order { flex: none; }

  form .btn.order { width: 100%; }

  .pay-card .qr { width: min(220px, 70vw); height: auto; aspect-ratio: 1; }
  .pay-card .bankinfo { padding: 12px 14px; }

  .banner { padding: 12px 14px; font-size: 14px; line-height: 1.45; }
  .order-card { padding: 16px 14px; }
}

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ── Giỏ hàng (đơn nhiều dòng: polaroid + booklet) ─────────────────────────── */
.nav-badge {
  display: inline-block; min-width: 20px; padding: 1px 7px; border-radius: 100px;
  background: var(--pink-dark); color: #fff; font-size: 12px; font-weight: 700;
  line-height: 1.5; text-align: center;
}
.btn.btn-secondary {
  background: #fff; color: var(--pink-dark);
  box-shadow: inset 0 0 0 2px var(--pink), 0 4px 14px -8px rgba(184, 95, 126, 0.5);
}
.btn.btn-secondary:hover { background: #fdeef3; color: var(--pink-dark); }
.btn.btn-secondary:disabled { opacity: .55; }
.add-to-cart-form { margin-top: 10px; }
.add-to-cart-form .btn { width: 100%; margin-top: 0; }
.cart-note { margin: 10px 0 0; color: var(--muted); font-size: 12.5px; text-align: center; }

.cart-lines { list-style: none; margin: 18px 0 0; padding: 0; }
.cart-line {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 14px 0; border-bottom: 1px dashed var(--line);
}
.cart-line-main { display: flex; flex-direction: column; gap: 3px; flex: 1 1 190px; min-width: 0; }
.cart-line-label { font-weight: 600; }
.cart-line-qty { color: var(--muted); font-size: 13px; }
.cart-line-total { font-weight: 600; font-variant-numeric: tabular-nums; }
.cart-remove {
  min-height: 44px; min-width: 44px; padding: 0 12px; color: var(--pink-dark); font-size: 13.5px;
}
.cart-actions { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-top: 20px; }
.cart-actions .btn { width: 100%; margin-top: 0; }
.cart-keep-shopping { color: var(--pink-dark); font-size: 14px; }

/* ── Booklet: tab sản phẩm, khay ảnh, sơ đồ trang ─────────────────────────── */
.product-tabs { display: flex; gap: 4px; margin-left: 14px; }
.product-tabs a {
  padding: 8px 14px; border-radius: 100px; font-size: 14px; font-weight: 600;
  color: var(--muted); min-height: 44px; display: inline-flex; align-items: center;
}
.product-tabs a[aria-current="page"] { background: var(--pink-dark); color: #fff; }
.product-tabs a:hover:not([aria-current="page"]) { color: var(--pink-dark); background: rgba(255,255,255,.7); }

.booklet-hero-stack { position: relative; height: 260px; }
.booklet-hero-page {
  position: absolute; width: 150px; height: 210px; border-radius: 4px; background: var(--card);
  box-shadow: 0 14px 34px -14px rgba(184, 95, 126, 0.6), 0 0 0 1px rgba(255,255,255,.8);
}
.bp-a { left: 6%;  top: 18px; transform: rotate(-7deg); background: linear-gradient(160deg, #26355f, #47598f); }
.bp-b { left: 32%; top: 4px;  transform: rotate(2deg); }
.bp-c { left: 58%; top: 26px; transform: rotate(8deg); background: linear-gradient(160deg, #fdf3e2, #f6d3dc); }

.booklet-intro { margin-top: 8px; }
.booklet-steps { margin: 12px 0 0; padding-left: 20px; color: var(--muted); line-height: 1.75; }
.booklet-steps strong { color: var(--ink); }
.booklet-note {
  margin-top: 14px; padding: 12px 16px; background: var(--cream); border-radius: 14px;
  color: #8a6440; font-size: 13.5px; line-height: 1.6;
}

.booklet-field { margin: 16px 0; display: flex; flex-direction: column; gap: 6px; }
.booklet-field label { font-size: 13px; font-weight: 600; }
.booklet-field select,
.booklet-field .booklet-text {
  font-family: inherit; font-size: 14px; padding: 11px 12px; min-height: 44px;
  border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink);
}
.booklet-field textarea.booklet-text { min-height: 76px; resize: vertical; }

.booklet-tray { margin-top: 20px; }
.booklet-tray-title { font-family: Fraunces, serif; font-size: 17px; margin: 0 0 8px; }
.booklet-tray-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 10px;
}
.booklet-chip {
  position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden;
  background: #f6e3ea; min-height: 44px;
}
.booklet-chip img { width: 100%; height: 100%; object-fit: cover; display: block; }
.booklet-chip:focus-visible { outline: 3px solid var(--pink-deep); outline-offset: 2px; }
.booklet-chip-wait {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 3px 6px; font-size: 11px;
  text-align: center; background: rgba(90, 52, 68, .88); color: #fff;
}
.booklet-chip-wait { top: 0; display: grid; place-items: center; background: rgba(90,52,68,.78); }

.booklet-spread { margin-top: 26px; }
.booklet-spread-title { font-family: Fraunces, serif; font-size: 17px; margin: 0 0 8px; }
.booklet-stage {
  position: relative; width: 100%; background: #fffdfa; border-radius: 6px;
  box-shadow: 0 10px 26px -14px rgba(184, 95, 126, .6), 0 0 0 1px var(--line);
  /* Nếp gấp giữa trang đôi — nhắc khách đây là hai mặt A5. */
  background-image: linear-gradient(90deg, transparent calc(50% - 1px), var(--line) 50%, transparent calc(50% + 1px));
}
/* Bảng gói thiết kế trong console — cuộn ngang trong khung, body không cuộn theo. */
.messages { list-style: none; margin: 12px 0; padding: 0; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.dim-row .k, .dim-row .v { color: var(--muted); font-size: 13px; }
.design-brief {
  margin: 14px 0; padding: 14px 16px; background: var(--cream); border-radius: 14px;
}
.design-brief h3 { margin: 0 0 6px; font-family: Fraunces, serif; font-size: 15px; }
.design-brief p { margin: 0; color: #6b4528; line-height: 1.6; white-space: pre-wrap; }
.design-scroll { overflow-x: auto; margin: 10px 0 4px; }
.design-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.design-table th, .design-table td {
  padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle;
}
.design-table code { word-break: break-all; font-size: 12px; }
.design-thumb { border-radius: 6px; object-fit: cover; }
.design-text { margin: 6px 0 0; color: var(--muted); font-size: 13.5px; }

@media (max-width: 700px) {
  .product-tabs { margin-left: 0; order: 3; flex-basis: 100%; justify-content: center; }
  .product-tabs a { padding: 8px 11px; font-size: 13px; }
  .booklet-tray-grid { grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); }
}

/* ── Booklet: chọn kiểu, chọn mẫu, ảnh mẫu thật ───────────────────────────── */
.booklet-hero-shot { margin: 0; }
.booklet-hero-shot img {
  width: 100%; height: auto; border-radius: 8px; display: block;
  box-shadow: 0 18px 40px -18px rgba(184, 95, 126, .7), 0 0 0 1px rgba(255,255,255,.8);
}
.booklet-hero-shot figcaption {
  margin-top: 8px; text-align: center; color: var(--muted); font-size: 12.5px;
}

.booklet-gallery {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px; margin-top: 16px;
}
.booklet-gallery figure { margin: 0; }
.booklet-gallery img {
  width: 100%; height: auto; border-radius: 6px; display: block;
  box-shadow: 0 10px 26px -16px rgba(184, 95, 126, .7), 0 0 0 1px var(--line);
}
.booklet-gallery-note { margin-top: 8px; text-align: center; }

.hero-lede {
  margin: 0 0 16px; max-width: 34rem; color: var(--muted); font-size: 15px; line-height: 1.55;
}
/* Chỉ top/bottom — không ghi đè margin: auto ngang của .wrap (lệch trái). */
.custom-proof { margin-top: 8px; margin-bottom: 28px; }
.custom-proof-title {
  font-family: Fraunces, serif;
  font-size: clamp(1.35rem, 2.4vw, 1.75rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 14px;
  text-align: center;
}
.custom-proof-gallery { margin-top: 0; }
.custom-proof .book-flip { margin-top: 0; }
.custom-include {
  margin: 12px 0 16px; padding: 0 0 0 18px; color: var(--muted); font-size: 13.5px; line-height: 1.65;
}
.custom-include li { margin: 0 0 4px; }
.custom-include li::marker { color: var(--pink-dark); }

.booklet-themes { border: 0; padding: 0; margin: 0 0 18px; }
.booklet-themes legend { font-size: 13px; font-weight: 600; padding: 0; margin-bottom: 8px; }
.booklet-kind-grid,
.booklet-theme-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px;
}
.booklet-kind,
.booklet-theme {
  display: flex; flex-direction: column; gap: 3px; cursor: pointer;
  padding: 12px 14px; min-height: 44px; border-radius: 14px; background: #fff;
  box-shadow: inset 0 0 0 1px var(--line);
}
.booklet-kind input,
.booklet-theme input { position: absolute; opacity: 0; pointer-events: none; }
.booklet-kind.is-on,
.booklet-theme.is-on { box-shadow: inset 0 0 0 2px var(--pink-deep); background: #fff8fa; }
.booklet-kind:focus-within,
.booklet-theme:focus-within { outline: 3px solid var(--pink-deep); outline-offset: 2px; }
.booklet-kind-name,
.booklet-theme-name { font-weight: 600; }
.booklet-kind-price { font-family: Fraunces, serif; font-weight: 800; color: var(--pink-dark); }
.booklet-kind-desc,
.booklet-theme-blurb { color: var(--muted); font-size: 12.5px; line-height: 1.45; }

.booklet-tray-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.booklet-tray-head .btn { margin: 0; }
.booklet-package-note { margin: 8px 0 0; line-height: 1.5; }
.is-hidden { display: none !important; }

/* ── Nền giấy theo chủ đề mẫu ──────────────────────────────────────────────
   Sơ đồ trang từng để trắng trơn nên nhìn như form nhập liệu. Mỗi mẫu một
   chất giấy riêng, dựng bằng gradient thuần (không thêm file ảnh nào).
   Giữ RẤT nhạt: đây là nền để ảnh của khách nổi lên, không phải hoạ tiết
   để ngắm — hoạ tiết đậm làm sơ đồ trông bẩn và át mất ảnh. */
.booklet-stage {
  --fold: linear-gradient(90deg, transparent calc(50% - 1px),
          rgba(90, 52, 68, .10) 50%, transparent calc(50% + 1px));
  background-image: var(--fold);
  background-color: var(--card);
}

/* Du ký — giấy kem ấm, ánh nắng nhẹ từ mép trên. */
.booklet-stage[data-theme="du-ky-a5"] {
  background-color: #fdf8f0;
  background-image:
    var(--fold),
    radial-gradient(140% 80% at 50% -10%, rgba(253, 243, 226, .95) 0%, rgba(253, 248, 240, 0) 70%),
    linear-gradient(#fefcf8, #fbf5ec);
}

/* Kỷ yếu — giấy vở, kẻ ngang rất mờ. */
.booklet-stage[data-theme="ky-yeu-a5"] {
  background-color: #fcfcfa;
  background-image:
    var(--fold),
    repeating-linear-gradient(0deg, transparent 0 25px, rgba(90, 110, 150, .05) 25px 26px),
    linear-gradient(#fdfdfb, #f8f8f4);
}

/* Ngày cưới — blush rất nhạt, sáng dần về giữa. */
.booklet-stage[data-theme="cuoi-a5"] {
  background-color: #fdf6f8;
  background-image:
    var(--fold),
    radial-gradient(120% 90% at 50% 15%, rgba(255, 255, 255, .9) 0%, rgba(255, 255, 255, 0) 65%),
    linear-gradient(#fdf4f7, #fbeaf0);
}

/* Em bé — kem ngả bạc hà, chấm bi thưa và mờ. */
.booklet-stage[data-theme="em-be-a5"] {
  background-color: #fafbf7;
  background-image:
    var(--fold),
    radial-gradient(circle at 30% 30%, rgba(146, 190, 166, .13) 0 4px, transparent 4px),
    linear-gradient(160deg, #fdfbf5 0%, #f5faf6 100%);
  background-size: auto, 120px 120px, auto;
}

/* Bạn thân — kem ấm, ánh vàng nhẹ. */
.booklet-stage[data-theme="ban-than-a5"] {
  background-color: #fdf7ef;
  background-image:
    var(--fold),
    radial-gradient(130% 80% at 40% -5%, rgba(255, 236, 210, .7) 0%, transparent 65%),
    linear-gradient(#fefaf4, #f8efe4);
}

/* Sinh nhật — blush pastel. */
.booklet-stage[data-theme="sinh-nhat-a5"] {
  background-color: #fdf5f7;
  background-image:
    var(--fold),
    radial-gradient(circle at 70% 20%, rgba(255, 182, 193, .18) 0 18%, transparent 19%),
    linear-gradient(#fff8fa, #fbecef);
}

/* Thú cưng — kem ngả be. */
.booklet-stage[data-theme="thu-cung-a5"] {
  background-color: #faf6f0;
  background-image:
    var(--fold),
    radial-gradient(120% 70% at 50% 100%, rgba(210, 180, 140, .2) 0%, transparent 55%),
    linear-gradient(#fdf9f3, #f5ebe0);
}

/* Gia đình — giấy ấm trung tính. */
.booklet-stage[data-theme="gia-dinh-a5"] {
  background-color: #faf7f2;
  background-image:
    var(--fold),
    linear-gradient(#fdfbf7, #f3eee6);
}

/* Nút xoá ảnh trong khay */
.booklet-chip-del {
  position: absolute; top: 3px; right: 3px; width: 26px; height: 26px; padding: 0;
  border: 0; border-radius: 50%; cursor: pointer; line-height: 1; font-size: 17px;
  background: rgba(90, 52, 68, .82); color: #fff;
}
/* Vùng chạm 44×44 theo rule, nhưng nút chỉ hiện 26px để không che mất ảnh. */
.booklet-chip-del::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 44px; height: 44px;
  transform: translate(-50%, -50%);
}
.booklet-chip-del:hover { background: var(--pink-dark); }
.booklet-chip-del:focus-visible { outline: 3px solid var(--pink-deep); outline-offset: 2px; }

/* ── Bộ sưu tập mẫu booklet ───────────────────────────────────────────────── */
.booklet-cards {
  list-style: none; margin: 18px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px;
}
.booklet-card-link {
  display: flex; flex-direction: column; height: 100%; overflow: hidden;
  border-radius: 18px; background: #fff; color: var(--ink); text-decoration: none;
  box-shadow: 0 10px 28px -18px rgba(184, 95, 126, .8), 0 0 0 1px var(--line);
}
.booklet-card-link:hover { box-shadow: 0 14px 32px -16px rgba(184, 95, 126, .9), 0 0 0 2px var(--pink); }
.booklet-card-link:focus-visible { outline: 3px solid var(--pink-deep); outline-offset: 2px; }

/* Sơ đồ thu nhỏ: dùng lại nền giấy theo chủ đề của .booklet-stage */
.booklet-card-figure { display: block; width: 100%; }

.booklet-card-body { display: flex; flex-direction: column; gap: 5px; padding: 14px 16px 16px; }
.booklet-card-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.booklet-card-name { font-family: Fraunces, serif; font-size: 18px; font-weight: 700; }
.booklet-card-price { font-family: Fraunces, serif; font-size: 17px; font-weight: 800; color: var(--pink-dark); }
.booklet-card-theme {
  align-self: flex-start; padding: 2px 10px; border-radius: 100px; font-size: 11.5px;
  font-weight: 600; background: var(--cream); color: #6b4528;
}
.booklet-card-blurb { color: var(--muted); font-size: 13px; line-height: 1.5; }
.booklet-card-meta { color: var(--muted); font-size: 12px; }
.booklet-card-cta { margin-top: 4px; color: var(--pink-dark); font-size: 13.5px; font-weight: 600; }

.booklet-switch {
  margin: 18px 0 0; padding: 12px 16px; border-radius: 14px;
  background: rgba(255, 255, 255, .8); box-shadow: inset 0 0 0 1px var(--line);
  font-size: 14px; line-height: 1.55;
}
.booklet-switch a { color: var(--pink-dark); font-weight: 600; }
.booklet-switch-back { background: none; box-shadow: none; padding: 0; margin: 0 0 14px; }

/* ── Cuốn thiết kế riêng: sản phẩm chính, phải "nặng" hơn mọi khối khác ─────── */
/* `a.btn:not(.btn-google)` ép màu trắng, nên nút viền phải thắng bằng cùng mức tuyển chọn. */
a.btn.btn-ghost,
.btn.btn-ghost {
  background: rgba(255, 255, 255, .55); color: var(--pink-dark);
  box-shadow: inset 0 0 0 2px rgba(196, 90, 124, .45);
}
a.btn.btn-ghost:hover,
.btn.btn-ghost:hover { background: #fff; color: var(--pink-dark); }

.signature {
  position: relative; margin: 6px 0 26px; padding: 30px 26px 26px; border-radius: 22px;
  background:
    radial-gradient(120% 90% at 12% 0%, rgba(253, 243, 226, .95) 0%, rgba(253, 243, 226, 0) 60%),
    linear-gradient(160deg, #fffdfa 0%, #fdf2f6 100%);
  box-shadow: 0 26px 60px -34px rgba(90, 52, 68, .5), 0 0 0 1px rgba(196, 90, 124, .16);
}
/* Viền vàng mảnh ở mép trên — tín hiệu "bản cao cấp", không cần thêm chữ nào. */
.signature::before {
  content: ""; position: absolute; inset: 0 0 auto; height: 3px; border-radius: 22px 22px 0 0;
  background: linear-gradient(90deg, #e6c07a, #c45a7c 45%, #e6c07a);
}
.signature-head { max-width: 62ch; }
.signature-eyebrow {
  margin: 0 0 6px; font-size: 12.5px; font-weight: 700; letter-spacing: .16em;
  text-transform: uppercase; color: var(--pink-dark);
}
.signature h2 { font-family: Fraunces, serif; font-size: clamp(24px, 3.4vw, 34px); margin: 0 0 10px; }
.signature-lede { margin: 0; color: var(--muted); font-size: 15.5px; line-height: 1.65; }

.signature-gallery {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px;
  margin: 22px 0 8px;
}
.signature-gallery figure { margin: 0; }
.signature-gallery img {
  width: 100%; height: auto; display: block; border-radius: 12px;
  box-shadow: 0 16px 34px -20px rgba(90, 52, 68, .65), 0 0 0 1px var(--line);
}
.signature-note { margin: 0; color: var(--muted); font-size: 12.5px; }

.signature-foot {
  display: grid; grid-template-columns: 1fr auto; gap: 22px; align-items: end;
  margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line);
}
.signature-points { margin: 0; padding-left: 18px; color: var(--muted); line-height: 1.7; }
.signature-points strong { color: var(--ink); }
.signature-buy { text-align: right; }
.signature-price { margin: 0 0 10px; display: flex; flex-direction: column; align-items: flex-end; }
.signature-price-num { font-family: Fraunces, serif; font-size: 34px; font-weight: 700; line-height: 1.1; }
.signature-price-sub { color: var(--muted); font-size: 13px; }
.signature-cta { margin: 0; white-space: nowrap; }

.hero-signature .home-brand {
  color: var(--pink-dark); font-family: inherit; font-size: 13px; font-weight: 700;
  letter-spacing: .16em; text-transform: uppercase;
}

.signature-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 14px 0 22px; }
.signature-compare > div {
  padding: 16px 18px; border-radius: 14px; background: #fff; box-shadow: 0 0 0 1px var(--line);
}
.signature-compare h3 { font-family: Fraunces, serif; font-size: 17px; margin: 0 0 6px; }
.signature-compare p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.signature-compare .is-highlight {
  background: linear-gradient(160deg, #fffdfa, #fdf2f6);
  box-shadow: 0 0 0 2px rgba(196, 90, 124, .35), 0 18px 40px -30px rgba(90, 52, 68, .6);
}

/* ── Xem trước bố cục một trang đôi ────────────────────────────────────────── */
.spread-previews { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 18px 0 10px; }
.spread-preview { margin: 0; }
.spread-preview .spread-svg {
  border-radius: 8px;
  box-shadow: 0 16px 34px -22px rgba(90, 52, 68, .6), 0 0 0 1px var(--line);
}
.spread-preview-shot {
  width: 100%; height: auto; display: block; border-radius: 8px;
  box-shadow: 0 16px 34px -22px rgba(90, 52, 68, .6), 0 0 0 1px var(--line);
}
.spread-preview figcaption { margin-top: 8px; display: flex; flex-direction: column; gap: 1px; }
.spread-preview-name { font-family: Fraunces, serif; font-size: 15px; }
.spread-preview-meta { color: var(--muted); font-size: 12.5px; }
.spread-previews-note { margin: 4px 0 0; }
.booklet-card-shot {
  width: 100%; height: auto; display: block; aspect-ratio: 640 / 453; object-fit: cover;
}

/* ── Lật xem trang đôi mẫu ─────────────────────────────────────────────────── */
.book-flip {
  margin: 18px 0 10px;
  --book-flip-ms: 420ms;
}
.book-flip-stage {
  position: relative;
  width: min(100%, 760px);
  margin: 0 auto;
  aspect-ratio: 1400 / 990;
  perspective: 2200px;
  touch-action: pan-y;
}
.book-flip:not(.is-ready) .book-flip-stage {
  aspect-ratio: auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  width: 100%;
}
.book-flip:not(.is-ready) .book-flip-page {
  position: static;
  transform: none !important;
  opacity: 1 !important;
  box-shadow: none;
}
.book-flip:not(.is-ready) .book-flip-page[hidden] { display: block; }
.book-flip:not(.is-ready) .book-flip-bar,
.book-flip:not(.is-ready) .book-flip-thumbs,
.book-flip:not(.is-ready) .book-flip-hint { display: none; }

.book-flip-page {
  position: absolute;
  inset: 0;
  margin: 0;
  border-radius: 10px;
  background: #fff;
  transform-origin: left center;
  transform: rotateY(0deg);
  transition:
    transform var(--book-flip-ms) cubic-bezier(0.4, 0.1, 0.2, 1),
    opacity calc(var(--book-flip-ms) * .7) ease;
  box-shadow:
    0 18px 40px -20px rgba(90, 52, 68, .55),
    0 0 0 1px rgba(90, 52, 68, .08);
  overflow: hidden;
  cursor: ew-resize;
}
.book-flip-page img {
  width: 100%; height: auto; display: block;
  aspect-ratio: 1400 / 990; object-fit: cover;
  user-select: none; -webkit-user-drag: none;
}
.book-flip-caption {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  padding: 28px 14px 12px;
  background: linear-gradient(transparent, rgba(40, 22, 30, .72));
  color: #fff;
  text-align: center;
}
.book-flip-name { font-family: Fraunces, serif; font-size: 16px; }
.book-flip-meta { font-size: 12.5px; opacity: .9; }

.book-flip.is-ready .book-flip-page.is-exit-next {
  transform: rotateY(-88deg);
  opacity: .35;
  z-index: 3;
}
.book-flip.is-ready .book-flip-page.is-exit-prev {
  transform: rotateY(88deg);
  transform-origin: right center;
  opacity: .35;
  z-index: 3;
}
.book-flip.is-ready .book-flip-page.is-enter {
  z-index: 1;
}
.book-flip.is-ready .book-flip-page.is-current:not(.is-exit-next):not(.is-exit-prev) {
  z-index: 2;
}

.book-flip-bar {
  display: flex; align-items: center; justify-content: center; gap: 14px;
  margin-top: 14px;
}
.book-flip-nav {
  width: 44px; height: 44px; border-radius: 999px; border: 0;
  background: #fff; color: var(--ink); font-size: 26px; line-height: 1;
  box-shadow: 0 0 0 1px var(--line), 0 8px 18px -12px rgba(184, 95, 126, .7);
  cursor: pointer;
}
.book-flip-nav:hover:not(:disabled) { background: #fff8fa; color: var(--pink-dark); }
.book-flip-nav:disabled { opacity: .35; cursor: default; }
.book-flip-nav:focus-visible { outline: 3px solid var(--pink-deep); outline-offset: 2px; }
.book-flip-status {
  margin: 0; min-width: 9rem; text-align: center;
  font-size: 13.5px; color: var(--muted);
}

.book-flip-thumbs {
  display: flex; justify-content: center; gap: 10px; flex-wrap: wrap;
  margin-top: 14px;
}
.book-flip-thumb {
  padding: 0; border: 0; background: none; border-radius: 8px;
  width: 88px; overflow: hidden; cursor: pointer;
  box-shadow: 0 0 0 1px var(--line);
  opacity: .72; transition: opacity .15s ease, box-shadow .15s ease;
}
.book-flip-thumb img { width: 100%; height: auto; display: block; aspect-ratio: 640 / 453; object-fit: cover; }
.book-flip-thumb.is-on { opacity: 1; box-shadow: 0 0 0 2px var(--pink-deep); }
.book-flip-thumb:focus-visible { outline: 3px solid var(--pink-deep); outline-offset: 2px; }
.book-flip-hint { text-align: center; margin: 10px 0 0; }

@media (max-width: 720px) {
  .book-flip:not(.is-ready) .book-flip-stage { grid-template-columns: 1fr; }
  .book-flip-thumb { width: 72px; }
}
@media (prefers-reduced-motion: reduce) {
  .book-flip { --book-flip-ms: 1ms; }
  .book-flip-page { transition: none; }
}

.hero-spread .spread-preview-stage { border-radius: 10px; }
.section-sub { font-family: Fraunces, serif; font-size: 19px; margin: 26px 0 10px; }

/* ── Bậc giá theo số ảnh ───────────────────────────────────────────────────── */
.price-ladder { margin: 12px 0 4px; }
.price-ladder summary {
  cursor: pointer; color: var(--pink-dark); font-size: 13.5px; font-weight: 600;
  padding: 6px 0; min-height: 44px; display: flex; align-items: center;
}
.price-ladder summary:focus-visible { outline: 3px solid var(--pink-deep); outline-offset: 2px; }
.price-ladder .design-table { margin-top: 4px; }
.price-ladder .dim { font-size: 12.5px; margin: 8px 0 0; }

@media (max-width: 860px) {
  .signature-foot { grid-template-columns: 1fr; align-items: start; }
  .signature-buy { text-align: left; }
  .signature-price { align-items: flex-start; }
  .signature-cta { width: 100%; }
  .signature-compare { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .signature { padding: 24px 18px 20px; border-radius: 18px; }
  .signature-gallery { grid-template-columns: 1fr; gap: 12px; }
  .spread-previews { grid-template-columns: 1fr; }
}

/* ── Sơ đồ bố cục trang đôi (SVG — CSP cấm inline style nên không dùng div/%) ── */
.spread-svg { display: block; width: 100%; height: auto; }
.spread-svg-paper { fill: #fffdfa; }
.spread-svg-fold { stroke: rgba(90, 52, 68, .16); stroke-width: .6; }
.spread-svg-slot {
  fill: rgba(255, 255, 255, .78);
  stroke: rgba(196, 90, 124, .5);
  stroke-width: .9;
  stroke-dasharray: 2.6 2;
}
/* Nền giấy theo chủ đề — cùng bảng màu với `.booklet-stage[data-theme]`. */
.spread-svg[data-theme="du-ky-a5"] .spread-svg-paper { fill: #fdf8f0; }
.spread-svg[data-theme="ky-yeu-a5"] .spread-svg-paper { fill: #fbfcfa; }
.spread-svg[data-theme="cuoi-a5"] .spread-svg-paper { fill: #fdf6f8; }
.spread-svg[data-theme="em-be-a5"] .spread-svg-paper { fill: #f8fbf7; }
.spread-svg[data-theme="ban-than-a5"] .spread-svg-paper { fill: #fdf7ef; }
.spread-svg[data-theme="sinh-nhat-a5"] .spread-svg-paper { fill: #fdf5f7; }
.spread-svg[data-theme="thu-cung-a5"] .spread-svg-paper { fill: #faf6f0; }
.spread-svg[data-theme="gia-dinh-a5"] .spread-svg-paper { fill: #faf7f2; }
.spread-svg[data-theme="ky-yeu-a5"] .spread-svg-slot { stroke: rgba(90, 110, 150, .55); }
.spread-svg[data-theme="em-be-a5"] .spread-svg-slot { stroke: rgba(96, 150, 118, .6); }

.booklet-card-link:hover .spread-svg-slot { stroke-dasharray: none; }

/* Sơ đồ trong hero cần khung giấy, nếu không nó trôi lửng giữa nền sọc. */
.hero-spread {
  padding: 14px; border-radius: 16px; background: #fff;
  box-shadow: 0 26px 54px -30px rgba(90, 52, 68, .7), 0 0 0 1px var(--line);
}
.hero-spread .spread-preview figcaption { margin-top: 10px; }
.spread-preview .spread-svg { background: #fff; }

/* ── Trang bán booklet: dải tin cậy, luồng đặt, bảng giá, câu hay hỏi ───────── */
.trust-strip {
  list-style: none; margin: 4px 0 22px; padding: 14px 18px; border-radius: 16px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px 22px;
  background: rgba(255, 255, 255, .72); box-shadow: 0 0 0 1px var(--line);
  color: var(--muted); font-size: 13.5px; line-height: 1.55;
}
.trust-strip strong { color: var(--ink); display: block; }

.flow-steps { list-style: none; margin: 16px 0 0; padding: 0; counter-reset: flow; }
.flow-steps li {
  position: relative; padding: 0 0 18px 52px; color: var(--muted); line-height: 1.65;
}
.flow-steps li:not(:last-child)::after {
  content: ""; position: absolute; left: 17px; top: 38px; bottom: 4px; width: 2px;
  background: linear-gradient(rgba(196, 90, 124, .35), rgba(196, 90, 124, .06));
}
.flow-steps strong { color: var(--ink); display: block; margin-bottom: 2px; }
.flow-step-num {
  position: absolute; left: 0; top: 0; width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center; background: var(--pink-dark); color: #fff;
  font-family: Fraunces, serif; font-size: 17px; font-weight: 700;
}

.price-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 18px; margin-top: 16px; }
.price-col {
  padding: 18px 20px; border-radius: 16px; background: #fff; box-shadow: 0 0 0 1px var(--line);
}
.price-col h3 { font-family: Fraunces, serif; font-size: 18px; margin: 0 0 10px; }
.price-col p { color: var(--muted); line-height: 1.6; }
.price-col.is-highlight {
  background: linear-gradient(160deg, #fffdfa, #fdf2f6);
  box-shadow: 0 0 0 2px rgba(196, 90, 124, .35), 0 18px 40px -30px rgba(90, 52, 68, .6);
}
.price-flat { font-family: Fraunces, serif; font-size: 32px; font-weight: 700; color: var(--ink); margin: 0 0 6px; }
.price-col .btn { width: 100%; }

.faq { margin-top: 12px; }
.faq details {
  border-bottom: 1px solid var(--line); padding: 4px 0;
}
.faq details:first-of-type { border-top: 1px solid var(--line); }
.faq summary {
  cursor: pointer; padding: 12px 30px 12px 0; min-height: 44px; display: flex;
  align-items: center; font-weight: 600; color: var(--ink); position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 6px; color: var(--pink-dark); font-size: 20px;
  font-weight: 400; line-height: 1;
}
.faq details[open] summary::after { content: "−"; }
.faq summary:focus-visible { outline: 3px solid var(--pink-deep); outline-offset: 2px; }
.faq p { margin: 0 0 14px; color: var(--muted); line-height: 1.7; }

.closing-cta {
  margin: 8px 0 30px; padding: 30px 26px; border-radius: 22px; text-align: center;
  background: linear-gradient(160deg, #fffdfa 0%, #fdf2f6 100%);
  box-shadow: 0 26px 60px -34px rgba(90, 52, 68, .5), 0 0 0 1px rgba(196, 90, 124, .16);
}
.closing-cta h2 { font-family: Fraunces, serif; font-size: clamp(21px, 3vw, 29px); margin: 0 0 8px; }
.closing-cta p { margin: 0 auto 6px; max-width: 56ch; color: var(--muted); line-height: 1.65; }
.closing-cta .hero-cta { justify-content: center; }

@media (max-width: 860px) {
  .trust-strip { grid-template-columns: 1fr; }
  .price-grid { grid-template-columns: 1fr; }
}

/* ── Console: bộ ảnh khách gửi (shop phải nhìn đủ rõ để chọn tấm nào lên trang) ── */
.design-photos {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px; margin: 10px 0 16px;
}
.design-photo { position: relative; display: block; border-radius: 10px; overflow: hidden; }
.design-photo img {
  /* `cover` cắt phăng ảnh dọc — mà đây đúng là trang shop nhìn để chọn tấm nào lên
     trang nào, và sản phẩm thì hứa với khách "ảnh giữ nguyên khung, không cắt vuông". */
  width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: contain;
  display: block; background: #fff;
}
.design-photo:hover img { opacity: .92; }
.design-photo:focus-visible { outline: 3px solid var(--pink-deep); outline-offset: 2px; }
.design-photo-num {
  position: absolute; left: 6px; bottom: 6px; padding: 2px 8px; border-radius: 100px;
  background: rgba(90, 52, 68, .82); color: #fff; font-size: 12px; font-weight: 700;
}

/* Nhãn nhóm ảnh theo dòng hàng — đơn nhiều sản phẩm phải tách rõ bộ ảnh nào của cái nào. */
.ophotos-group-lab {
  margin: 12px 0 6px; font-size: 13px; font-weight: 700; color: var(--ink);
  display: flex; align-items: center; gap: 8px;
}
.ophotos-group-lab::after {
  content: ""; flex: 1; height: 1px; background: var(--line);
}

/* ── Không có JavaScript: giấu phần tải ảnh, chừa lại lối đặt qua Liên hệ ────
   Trước đây khối này là `<noscript><style>` nội tuyến — CSP production phải mở
   `style-src 'unsafe-inline'` chỉ vì nó. Nay để ở CSS ngoài: `booklet.js` gỡ class
   `no-js` khi chạy được, JS tắt thì class ở nguyên và các rule dưới có hiệu lực. */
.no-js #booklet-studio .drop,
.no-js #booklet-file,
.no-js #booklet-tray,
.no-js #booklet-add,
.no-js .add-to-cart-form { display: none; }

/* ── Trang dàn trang booklet (console xưởng) ───────────────────────────────────
   Công cụ cho thợ, không phải trang bán hàng: form đi thành 4 bước đánh số ở cột
   trái, phần giải thích dồn sang cột phải và giấu trong <details> để trang còn
   liếc được. <details> là HTML thuần — CSP production cấm JS nội tuyến. */
.impose-cols { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 18px; }
.impose-form, .impose-aside { margin: 0; }
.impose-aside { align-self: start; position: sticky; top: 18px; }
.impose-aside h2 { font-size: 19px; }

.step { padding: 18px 0; border-top: 1px solid var(--line); }
.step:first-of-type { padding-top: 0; border-top: 0; }
.step-h {
  display: flex; align-items: center; gap: 10px;
  font-family: Fraunces, serif; font-weight: 600; font-size: 17px; margin: 0 0 12px;
}
.step-n {
  flex: none; display: grid; place-items: center;
  width: 24px; height: 24px; border-radius: 999px;
  background: var(--pink-deep); color: #fff;
  font-family: Inter, system-ui, sans-serif; font-size: 12.5px; font-weight: 700;
}

/* Thẻ chọn: cả ô là vùng bấm (≥44px) thay vì mỗi cái nút tròn bé xíu. */
.picks { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 10px; }
.pick {
  display: flex; gap: 10px; align-items: flex-start; cursor: pointer;
  padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px;
  background: #fff; transition: border-color .12s, box-shadow .12s;
}
.pick:hover { border-color: var(--pink); }
.pick:has(input:checked) { border-color: var(--pink-deep); box-shadow: inset 0 0 0 1px var(--pink-deep); }
.pick:has(input:focus-visible) { outline: 3px solid var(--pink); outline-offset: 2px; }
.pick input { margin: 2px 0 0; flex: none; accent-color: var(--pink-deep); }
.pick-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.pick-t { font-weight: 700; font-size: 13.5px; }
.pick-d { color: var(--muted); font-size: 12.5px; line-height: 1.5; }
.pick-warn {
  display: none; margin-top: 6px; padding: 7px 9px; border-radius: 9px;
  background: var(--cream); color: #6b4528; font-size: 12px; line-height: 1.5;
}
/* Lời cảnh báo của một lối in chỉ hiện khi đã chọn lối đó — hiện cả bốn cùng lúc thì
   thành bức tường chữ và không ai đọc cái nào. */
.route:has(input:checked) .pick-warn { display: block; }
.route { align-items: flex-start; }

.step-sub { margin: -6px 0 12px; color: var(--muted); font-size: 12.5px; }
.sel {
  font-family: inherit; font-size: 14.5px; color: var(--ink);
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px;
  background: #fff; width: 100%; max-width: 100%; min-width: 0;
}
.sel:focus { outline: 2px solid var(--pink); border-color: var(--pink-deep); }

.tune { padding: 16px 0 0; border-top: 1px solid var(--line); }
.tune > summary {
  display: flex; align-items: center; gap: 10px; cursor: pointer;
  font-family: Fraunces, serif; font-weight: 600; font-size: 17px;
  padding: 4px 0; min-height: 32px;
}
.tune > summary:focus-visible { outline: 3px solid var(--pink); outline-offset: 2px; border-radius: 8px; }
.tune > .dim { margin-top: 10px; }

.nums { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-top: 14px; }
.num { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.num label { font-size: 13px; color: var(--muted); font-weight: 500; }
.num-in { display: flex; align-items: center; gap: 8px; }
.num-in input {
  font-family: inherit; font-size: 14.5px; color: var(--ink);
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff;
  width: 100%; min-width: 0;
}
.num-in input:focus { outline: 2px solid var(--pink); border-color: var(--pink-deep); }
.num-u { flex: none; color: var(--muted); font-size: 13px; font-weight: 600; }

.limits { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; }
.limits span {
  background: var(--cream); color: #6b4528; border-radius: 999px;
  padding: 4px 11px; font-size: 12px; font-weight: 600;
}

.note { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 10px; }
.note summary {
  cursor: pointer; font-size: 13px; font-weight: 600; color: var(--pink-dark);
  padding: 4px 0; min-height: 28px;
}
.note summary:focus-visible { outline: 3px solid var(--pink); outline-offset: 2px; border-radius: 6px; }
.note p { color: var(--muted); font-size: 12.5px; line-height: 1.65; margin: 8px 0 0; }

/* Sơ đồ 2 tờ giấy → cuốn 8 trang. Màu đặt bằng thuộc tính SVG/class, không style
   nội tuyến — CSP không mở `style-src unsafe-inline`. */
.dgm { display: block; width: 100%; height: auto; margin: 12px 0 10px; }
.dgm-sheet rect { fill: #fff; stroke: var(--pink-deep); stroke-width: 1; }
.dgm-fold line { stroke: var(--pink-deep); stroke-width: 1; stroke-dasharray: 3 3; opacity: .75; }
.dgm-cap text { fill: var(--muted); font-size: 8px; font-weight: 600; }
.dgm-num text { fill: var(--ink); font-size: 20px; font-weight: 700; text-anchor: middle; }

.impose-steps { margin: 10px 0 4px; padding-left: 20px; font-size: 13.5px; line-height: 1.7; }
.impose-steps li { margin-bottom: 5px; }
.impose-go { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 20px 0 0; }
.impose-go .btn { margin: 0; }

/* Bảng thông số bản in — thứ thợ đọc trước khi bấm tải. */
.spec { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; margin: 0 0 16px; }
.spec > div { background: var(--cream); border-radius: 12px; padding: 10px 13px; min-width: 0; }
.spec dt {
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.05em;
  text-transform: uppercase; color: #8a6a4a; margin-bottom: 3px;
}
.spec dd { margin: 0; font-size: 13.5px; font-weight: 600; color: var(--ink); }

/* Kết quả kiểm trước khi in. Màu ở VIỀN TRÁI chứ không ở chữ: chữ đủ tương phản để
   đọc, còn dải màu để liếc một cái là thấy có gì đỏ không. */
.flags { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.flag {
  padding: 10px 13px; border-radius: 12px; background: #fff;
  border: 1px solid var(--line); border-left-width: 4px;
}
.flag-t { display: block; font-size: 13.5px; font-weight: 700; color: var(--ink); }
.flag-d { display: block; margin-top: 3px; font-size: 12.5px; line-height: 1.55; color: var(--muted); }
.flag-loi { border-left-color: #b3261e; background: #fdeef3; }
.flag-loi .flag-t { color: #8c1d18; }
.flag-canh-bao { border-left-color: #b5761f; background: var(--cream); }
.flag-canh-bao .flag-t { color: #6b4528; }
.flag-on { border-left-color: #3f7d52; }

/* Cảnh báo mất nội dung — phải nổi hơn `.hint`, đây là chỗ mất chữ trên bìa. */
.warn {
  margin-top: 12px; padding: 11px 14px; border-radius: 14px;
  background: #fdeef3; border: 1px solid var(--pink-deep);
  color: var(--pink-dark); font-size: 13px; line-height: 1.55;
}

/* Lưới xem trước: mỗi ô là một MẶT giấy nằm ngang đã render. Đúng HAI cột để mặt
   trước và mặt sau của cùng một tờ nằm cạnh nhau — đó là cặp cần đối chiếu. */
.pv-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.pv { margin: 0; }
.pv img {
  display: block; width: 100%; height: auto;
  border: 1px solid var(--line); border-radius: 10px; background: #fff;
}
.pv figcaption { margin-top: 6px; color: var(--muted); font-size: 12.5px; font-weight: 600; }

/* Hai rule khác trong file này phải gỡ ra ở đây, nếu không ô chọn file biến mất hẳn:
   `input[type="file"] { display: none }` (dòng ~225) giấu ô file cho khối tải ảnh của
   khách — chỗ đó dùng vùng kéo-thả riêng. Còn `.field input { appearance: none }` xoá
   luôn nút "Choose files" của trình duyệt. Trang xưởng dùng ô file trần nên cần cả hai. */
.field input[type="file"] {
  display: block; -webkit-appearance: none; appearance: auto; padding: 10px 12px;
}
.field input[type="file"]::file-selector-button {
  font: inherit; font-weight: 600; font-size: 13px;
  margin-right: 12px; padding: 7px 14px; cursor: pointer;
  color: var(--pink-dark); background: #fdeef3;
  border: 1px solid var(--pink-deep); border-radius: 999px;
}

@media (max-width: 860px) {
  .impose-cols { grid-template-columns: minmax(0, 1fr); }
  .impose-aside { position: static; }
}
@media (max-width: 640px) {
  .pv-grid { grid-template-columns: minmax(0, 1fr); }
}

/* Sổ tay in — bảng tra cứu cho thợ. */
.head-links { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 0; }
.head-links .btn { margin: 0; }
.tbl-scroll { overflow-x: auto; margin: 10px 0 6px; }
.tbl { border-collapse: collapse; width: 100%; min-width: 480px; font-size: 13.5px; }
.tbl th, .tbl td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl th {
  font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--muted); border-bottom-width: 2px;
}
.tbl td { line-height: 1.55; }
.tbl tr:last-child td { border-bottom: 0; }
.guide .panel + .panel { margin-top: 18px; }
.guide-steps { margin: 10px 0 6px; padding-left: 20px; font-size: 13.5px; line-height: 1.7; }
.guide-steps li { margin-bottom: 8px; }
