/* =========================================================
   ORALI · Thu Đông 2026
   Hướng: tạp chí thời trang + "vé đi chơi". Mô-típ vòm lấy từ
   tấm vòm logo trong cửa hàng Orali. Màu nhấn duy nhất: đỏ rượu
   (màu túi Orali). Nền ngà và be ấm theo yêu cầu trong brief.
   Quy tắc góc bo: ảnh và khung = vuông 0; khung media đặc trưng = vòm;
   nút, chip, ô nhập = bo tròn hết (pill); thẻ thành viên = 18px.
   ========================================================= */

@font-face { font-family: 'Cormorant'; src: url('/fonts/CormorantGaramond[wght].ttf') format('truetype'); font-weight: 300 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'Cormorant'; src: url('/fonts/CormorantGaramond-Italic[wght].ttf') format('truetype'); font-weight: 300 700; font-style: italic; font-display: swap; }
@font-face { font-family: 'Be Vietnam Pro'; src: url('/fonts/BeVietnamPro-Light.ttf') format('truetype'); font-weight: 300; font-display: swap; }
@font-face { font-family: 'Be Vietnam Pro'; src: url('/fonts/BeVietnamPro-Medium.ttf') format('truetype'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Be Vietnam Pro'; src: url('/fonts/BeVietnamPro-SemiBold.ttf') format('truetype'); font-weight: 600; font-display: swap; }

:root {
  --paper: #F8F3EF;
  --paper-2: #F0E6E0;
  --sand: #E7D8CC;
  --blush: #F2D9DB;
  --ink: #2B1B1F;
  --ink-2: #6A5458;
  --line: rgba(43, 27, 31, .14);
  --wine: #7B1E2E;
  --wine-2: #5E1522;
  --on-wine: #FFF5F1;
  --shadow: 0 24px 60px -28px rgba(94, 21, 34, .35);
  --serif: 'Cormorant', 'Times New Roman', serif;
  --sans: 'Be Vietnam Pro', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --gutter: clamp(16px, 4vw, 56px);
  --max: 1320px;
  /* lớp z: nav 20, dock 30, dialog (top layer), toast 60, hạt nhiễu 70 */
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #191113;
    --paper-2: #22171A;
    --sand: #2E2124;
    --blush: #3A2429;
    --ink: #F3E8E5;
    --ink-2: #BDA7AB;
    --line: rgba(243, 232, 229, .14);
    --wine: #C9566A;
    --wine-2: #E07A8C;
    --on-wine: #1A0E11;
    --shadow: 0 24px 60px -28px rgba(0, 0, 0, .6);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: clip; max-width: 100%; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 300 16px/1.65 var(--sans); overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
/* hạt giấy rất nhẹ, cố định, không bắt chuột */
body::after {
  content: ''; position: fixed; inset: 0; z-index: 70; pointer-events: none; opacity: .05; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
@media (prefers-color-scheme: dark) { body::after { mix-blend-mode: screen; opacity: .04; } }

[hidden] { display: none !important; }
img, video { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--wine); color: var(--on-wine); }
:focus-visible { outline: 2px solid var(--wine); outline-offset: 3px; }

.skip { position: absolute; left: -999px; top: 8px; z-index: 80; background: var(--ink); color: var(--paper); padding: 8px 14px; border-radius: 999px; }
.skip:focus { left: 8px; }

/* ---------- Chữ ---------- */
.h2 {
  font: 400 clamp(36px, 5.2vw, 64px)/1.08 var(--serif); letter-spacing: -.01em; margin: 0 0 14px; text-wrap: balance;
}
.h2 em, .hero-title em, .manifesto em { font-style: italic; color: var(--wine); padding-bottom: .06em; }
.sub { color: var(--ink-2); max-width: 46ch; margin: 0; }
.opt { color: var(--ink-2); font-weight: 300; font-size: 13px; }

/* ---------- Nút ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap;
  min-height: 46px; padding: 0 22px; border: 1px solid transparent; cursor: pointer; text-decoration: none;
  font-weight: 500; font-size: 15px; letter-spacing: .01em;
  transition: transform .25s var(--ease), background-color .25s, color .25s, border-color .25s, box-shadow .25s;
}
.btn:active { transform: scale(.97); }
.btn-pill { border-radius: 999px; }
.btn-ink { background: var(--ink); color: var(--paper); }
.btn-ink:hover { background: var(--wine); color: var(--on-wine); }
.btn-wine { background: var(--wine); color: var(--on-wine); }
.btn-wine:hover { background: var(--wine-2); box-shadow: var(--shadow); }
.btn-ghost { background: transparent; border-color: var(--ink); color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }
.btn-lg { min-height: 54px; padding: 0 30px; font-size: 16px; }
.btn[disabled] { opacity: .55; cursor: progress; }
.link-underline { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; color: var(--ink-2); }
.link-underline:hover { color: var(--wine); }

/* ---------- Banner + Nav ---------- */
.banner {
  background: var(--wine); color: var(--on-wine); text-align: center; font-size: 13px; letter-spacing: .02em;
  padding: 8px var(--gutter);
}
.nav {
  position: sticky; top: 0; z-index: 20; height: 68px;
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 24px;
  padding: 0 var(--gutter);
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid transparent; transition: border-color .3s;
}
.nav.scrolled { border-bottom-color: var(--line); }
.wordmark { font: 500 26px/1 var(--serif); letter-spacing: .32em; text-decoration: none; padding-left: .32em; }
.nav-links { display: flex; justify-content: center; gap: clamp(14px, 2.4vw, 34px); font-size: 14px; }
.nav-links a { text-decoration: none; color: var(--ink-2); position: relative; padding: 6px 0; }
.nav-links a::after { content: ''; position: absolute; left: 0; right: 100%; bottom: 0; height: 1px; background: var(--wine); transition: right .35s var(--ease); }
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after { right: 0; }
.nav-cta { min-height: 40px; padding: 0 18px; font-size: 14px; }
@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav { grid-template-columns: 1fr auto; height: 60px; }
  .wordmark { font-size: 22px; }
}

/* ---------- Hero ---------- */
.hero {
  max-width: var(--max); margin: 0 auto; padding: clamp(28px, 5vw, 72px) var(--gutter) clamp(40px, 6vw, 96px);
  display: grid; grid-template-columns: 1.05fr 1fr; align-items: center; gap: clamp(24px, 5vw, 80px);
  min-height: calc(100dvh - 68px - 34px);
}
.greet { font: italic 400 24px/1.2 var(--serif); color: var(--wine); margin: 0 0 12px; }
.hero-title {
  font: 400 clamp(52px, 7.6vw, 108px)/1.02 var(--serif); letter-spacing: -.02em; margin: 0 0 22px; text-wrap: balance;
}
.hero-title em { display: inline-block; line-height: 1.1; }
.lede { font-size: clamp(16px, 1.35vw, 19px); color: var(--ink-2); max-width: 38ch; margin: 0 0 32px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }

.hero-art { position: relative; justify-self: center; width: min(100%, 470px); aspect-ratio: 3 / 4.35; }
.arch {
  position: absolute; overflow: hidden; background: var(--blush);
  border-radius: 999px 999px 0 0;
}
.arch-main { inset: 0 0 0 12%; box-shadow: var(--shadow); }
.arch video, .arch img { width: 100%; height: 100%; object-fit: cover; }
/* ảnh hero trôi chậm như máy quay lia, chỉ khi người xem cho phép chuyển động */
@media (prefers-reduced-motion: no-preference) {
  .kenburns { animation: kenburns 18s ease-in-out infinite alternate; transform-origin: 55% 35%; }
}
@keyframes kenburns { from { transform: scale(1.02); } to { transform: scale(1.12) translateY(-1.5%); } }
.arch-main::after { /* viền chỉ mảnh bên trong vòm, như khung cửa */
  content: ''; position: absolute; inset: 12px; border: 1px solid rgba(255, 245, 241, .55); border-radius: inherit; pointer-events: none;
}
.hero-polaroid {
  position: absolute; left: -6%; bottom: 5%; width: 31%; margin: 0; padding: 8px 8px 30px;
  background: #FFFDFB; box-shadow: 0 18px 40px -18px rgba(43, 27, 31, .45); transform: rotate(-6deg);
}
.hero-polaroid img { aspect-ratio: 3/4; object-fit: cover; width: 100%; }
.hang-tag {
  position: absolute; right: -3%; top: 34%; width: 112px; padding: 26px 12px 16px; text-align: center;
  background: var(--paper-2); color: var(--ink); border: 1px solid var(--line);
  clip-path: polygon(22% 0, 78% 0, 100% 14%, 100% 100%, 0 100%, 0 14%);
  transform-origin: 50% -40px; animation: swing 5s ease-in-out infinite;
  display: grid; gap: 2px; box-shadow: var(--shadow);
}
.hang-tag::before { /* sợi dây treo */
  content: ''; position: absolute; left: 50%; top: -46px; width: 1px; height: 54px; background: var(--ink-2);
}
.tag-hole { position: absolute; left: 50%; top: 9px; width: 9px; height: 9px; margin-left: -4.5px; border-radius: 50%; background: var(--paper); border: 1px solid var(--line); }
.tag-brand { font: 500 13px/1 var(--serif); letter-spacing: .3em; padding-left: .3em; }
.tag-price { font: 500 21px/1.15 var(--serif); margin-top: 8px; }
.tag-unit { font-size: 11px; color: var(--ink-2); }
.seal { position: absolute; width: 136px; height: 136px; right: 2%; bottom: -5%; fill: var(--wine); animation: spin 26s linear infinite; }
.seal text { font: 500 13.6px var(--sans); letter-spacing: .22em; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes swing { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg); } }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; min-height: 0; padding-top: 20px; gap: 36px; }
  .hero-art { width: min(86%, 400px); order: -1; }
  .hero-title { font-size: clamp(46px, 12vw, 64px); }
  .hang-tag { width: 92px; right: -6%; }
  .hero-polaroid { left: -3%; width: 34%; }
  .seal { width: 104px; height: 104px; }
}

/* ---------- Vé: Hôm nay bạn đi đâu ---------- */
.where { padding: clamp(56px, 8vw, 120px) var(--gutter); background: var(--paper-2); }
.where-head { max-width: var(--max); margin: 0 auto 40px; }
.tickets {
  max-width: var(--max); margin: 0 auto; display: grid; grid-template-columns: repeat(5, 1fr); gap: clamp(12px, 1.6vw, 22px);
  align-items: end;
}
/* vé là đồ vật giấy thật: giữ màu giấy sáng ở cả chế độ tối */
.ticket {
  --ink: #2B1B1F; --ink-2: #6A5458; --line: rgba(43, 27, 31, .18); --wine: #7B1E2E; --on-wine: #FFF5F1; --wine-2: #5E1522;
  position: relative; border: 0; cursor: pointer; text-align: left; padding: 22px 18px 20px; min-height: 196px;
  display: flex; flex-direction: column; gap: 8px; color: var(--ink); background: #FBF6F2;
  transition: transform .45s var(--ease), box-shadow .45s var(--ease);
  box-shadow: 0 10px 30px -22px rgba(43, 27, 31, .5);
}
.ticket:nth-child(odd) { transform: rotate(-1.6deg); }
.ticket:nth-child(even) { transform: rotate(1.4deg) translateY(-10px); }
.ticket:hover { transform: rotate(0) translateY(-8px); box-shadow: var(--shadow); }
.ticket i { font-size: 26px; color: var(--wine); }
.t-name { font: 500 28px/1.05 var(--serif); }
.t-line { font-size: 13px; color: var(--ink-2); }
.t-meta { margin-top: auto; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); }
/* hoá đơn cafe: mép răng cưa */
.tk-cafe { --tooth: 9px; padding-bottom: 30px;
  mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / calc(var(--tooth) * 2) 100%; }
/* vé phim: lỗ bấm hai bên */
.tk-phim { mask: radial-gradient(circle 11px at 0 62%, #0000 98%, #000) left / 51% 100% no-repeat, radial-gradient(circle 11px at 100% 62%, #0000 98%, #000) right / 51% 100% no-repeat; }
.tk-phim::after { content: ''; position: absolute; left: 16px; right: 16px; top: 62%; border-top: 1px dashed var(--line); }
/* hoá đơn siêu thị: mã vạch */
.tk-sieuthi .t-meta { height: 26px; color: transparent; overflow: hidden;
  background: repeating-linear-gradient(90deg, var(--ink) 0 2px, transparent 2px 4px, var(--ink) 4px 5px, transparent 5px 8px, var(--ink) 8px 11px, transparent 11px 12px); opacity: .7; }
/* thẻ quà Noel: lỗ xỏ dây */
.tk-noel { clip-path: polygon(14% 0, 86% 0, 100% 12%, 100% 100%, 0 100%, 0 12%); padding-top: 34px; }
.tk-noel::before { content: ''; position: absolute; left: 50%; top: 12px; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; border: 1px solid var(--ink-2); }
/* bao lì xì Tết */
.tk-tet { background: var(--wine); color: var(--on-wine); }
.tk-tet i, .tk-tet .t-line, .tk-tet .t-meta { color: var(--on-wine); }
.tk-tet::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 46px; background: var(--wine-2); clip-path: polygon(0 0, 100% 0, 50% 100%); opacity: .55; }
.tk-tet > * { position: relative; }

.ticket[aria-checked="true"] { transform: rotate(0) translateY(-14px); box-shadow: var(--shadow); }
.stamp {
  position: absolute; right: 10px; top: 10px; width: 62px; height: 62px; border-radius: 50%;
  border: 2px solid var(--wine); color: var(--wine); display: grid; place-items: center; text-align: center;
  font: 600 9.5px/1.15 var(--sans); letter-spacing: .1em; text-transform: uppercase;
  transform: rotate(-18deg) scale(1.3); opacity: 0; transition: transform .45s var(--ease), opacity .3s;
  pointer-events: none;
}
.tk-tet .stamp { border-color: var(--on-wine); color: var(--on-wine); }
.ticket[aria-checked="true"] .stamp { transform: rotate(-18deg) scale(1); opacity: .9; }

.where-result { max-width: var(--max); margin: 48px auto 0; }
.wr-empty { color: var(--ink-2); font: italic 400 22px/1.4 var(--serif); }
.wr-head { display: grid; gap: 4px; margin-bottom: 24px; }
.wr-head p { margin: 0; }
.wr-title { font: 400 30px/1.15 var(--serif); }
.wr-line { color: var(--ink-2); max-width: 60ch; }
.wr-grid { display: grid; grid-template-columns: minmax(220px, .7fr) 1.3fr; gap: clamp(20px, 4vw, 56px); align-items: center; }
.wr-scene { margin: 0; overflow: hidden; border-radius: 999px 999px 0 0; aspect-ratio: 3/4; animation: rise .7s var(--ease) both; }
.wr-scene img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 760px) { .wr-grid { grid-template-columns: 1fr; } .wr-scene { width: min(70%, 300px); } }
.wr-looks { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.wr-look { display: grid; grid-template-columns: 112px 1fr; gap: 16px; align-items: center; background: var(--paper); padding: 12px; border: 0; cursor: pointer; text-align: left;
  transition: transform .35s var(--ease), box-shadow .35s; animation: rise .6s var(--ease) both; }
.wr-look:nth-child(2) { animation-delay: .07s; } .wr-look:nth-child(3) { animation-delay: .14s; }
.wr-look:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.wr-look img { aspect-ratio: 3/4; object-fit: cover; width: 112px; }
.wr-look b { display: block; font: 500 21px/1.15 var(--serif); margin-bottom: 4px; }
.wr-look span { font-size: 14px; color: var(--ink-2); }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* điện thoại: vé xếp lưới 2 cột, không trượt ngang */
@media (max-width: 900px) {
  .tickets { grid-template-columns: 1fr 1fr; gap: 14px; align-items: stretch; }
  .ticket { min-height: 150px; padding: 18px 14px 16px; }
  .ticket:nth-child(even) { transform: rotate(1.2deg); }
  .ticket:last-child { grid-column: span 2; }
  .t-name { font-size: 24px; }
  .stamp { width: 52px; height: 52px; right: 6px; top: 6px; font-size: 8.5px; }
  .t-line { font-size: 12.5px; }
}

/* ---------- Bộ sưu tập ---------- */
.collection { max-width: var(--max); margin: 0 auto; padding: clamp(64px, 9vw, 140px) var(--gutter); }
.collection .h2 { margin-bottom: clamp(28px, 4vw, 56px); }
.looks {
  display: grid; grid-template-columns: 1.25fr 1fr 1fr; grid-template-rows: auto auto; gap: clamp(14px, 2vw, 28px) clamp(14px, 2vw, 28px);
}
.look { position: relative; cursor: pointer; border: 0; padding: 0; background: none; text-align: left; color: inherit; display: flex; flex-direction: column; }
.look:first-child { grid-row: span 2; }
.look:nth-child(3) { margin-top: clamp(0px, 5vw, 72px); }
.look:nth-child(5) { margin-top: clamp(0px, 5vw, 72px); }
.look-media { position: relative; overflow: hidden; aspect-ratio: 3 / 4; background: var(--sand); }
.look:first-child .look-media { aspect-ratio: auto; flex: 1; min-height: 520px; }
.look-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .6s var(--ease), transform 1.2s var(--ease); }
.look-media img + img { opacity: 0; }
@media (hover: hover) {
  .look:hover .look-media img:first-child { transform: scale(1.04); }
  .look:hover .look-media img + img { opacity: 1; transform: scale(1.04); }
}
.look-body { display: grid; grid-template-columns: 1fr auto; gap: 2px 16px; padding-top: 14px; align-items: start; }
.look-name { font: 500 clamp(22px, 2vw, 28px)/1.15 var(--serif); margin: 0; }
.look:first-child .look-name { font-size: clamp(28px, 3vw, 40px); }
.look-desc { grid-column: 1; font-size: 14px; color: var(--ink-2); margin: 0; }
.look-dots { grid-column: 2; grid-row: 1; display: flex; gap: 5px; padding-top: 8px; }
.dot { width: 13px; height: 13px; border-radius: 50%; border: 1px solid var(--line); }
.look-go { grid-column: 2; grid-row: 2; font-size: 13px; color: var(--wine); display: inline-flex; gap: 4px; align-items: center; }
.skeleton { min-height: 360px; background: linear-gradient(100deg, var(--sand) 30%, var(--paper-2) 50%, var(--sand) 70%) 0 0 / 300% 100%; animation: shimmer 1.6s linear infinite; }
@keyframes shimmer { to { background-position: -150% 0; } }
@media (max-width: 860px) {
  .looks { grid-template-columns: 1fr 1fr; }
  .look:first-child { grid-column: span 2; grid-row: auto; }
  .look:first-child .look-media { min-height: 0; aspect-ratio: 4 / 5; flex: none; }
  .look:nth-child(3), .look:nth-child(5) { margin-top: 28px; }
  .look-body { grid-template-columns: 1fr; }
  .look-dots, .look-go { grid-column: 1; grid-row: auto; }
  .look-desc { display: none; }
  .look:first-child .look-desc { display: block; }
}

/* ---------- Mười nơi (lưới so le kiểu tạp chí) ---------- */
.places { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter) clamp(64px, 9vw, 140px); }
.places-head { margin-bottom: clamp(28px, 4vw, 48px); }
.places-grid { columns: 4 240px; column-gap: clamp(12px, 1.6vw, 22px); }
.place { display: block; width: 100%; break-inside: avoid; margin: 0 0 clamp(12px, 1.6vw, 22px); padding: 0; border: 0; background: none; cursor: pointer; text-align: left; color: inherit; position: relative; overflow: hidden; }
.place img { width: 100%; height: auto; transition: transform 1.1s var(--ease); }
.place:nth-child(3n+2) img { aspect-ratio: 4/5; object-fit: cover; }
.place:nth-child(4n) img { aspect-ratio: 1/1; object-fit: cover; }
.place-cap { display: grid; gap: 2px; padding: 10px 2px 0; }
.place-cap b { font: 500 22px/1.15 var(--serif); }
.place-cap span { font-size: 13px; color: var(--ink-2); }
@media (hover: hover) { .place:hover img { transform: scale(1.04); } }
@media (max-width: 600px) { .places-grid { columns: 2; } .place-cap b { font-size: 18px; } }

/* ---------- Chất vải ---------- */
.fabric {
  max-width: var(--max); margin: 0 auto; padding: clamp(56px, 8vw, 120px) var(--gutter);
  display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(32px, 6vw, 96px); align-items: center;
}
.fabric-readout { margin-top: 28px; font: italic 400 24px/1.35 var(--serif); color: var(--wine); min-height: 2.7em; max-width: 30ch; }
.swatches { position: relative; height: 520px; }
.swatch {
  position: absolute; border: 0; cursor: grab; text-align: left; padding: 22px; display: flex; flex-direction: column; gap: 4px;
  color: var(--ink); touch-action: none; user-select: none; -webkit-user-select: none;
  box-shadow: 0 22px 40px -26px rgba(43, 27, 31, .55);
  transition: transform .6s cubic-bezier(.34, 1.56, .64, 1), box-shadow .3s;
  will-change: transform;
}
.swatch:active { cursor: grabbing; }
.pin { position: absolute; top: 12px; left: 50%; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: var(--wine); box-shadow: 0 3px 4px rgba(0, 0, 0, .25), inset -2px -2px 0 rgba(0, 0, 0, .2); }
.sw-name { font: 500 34px/1 var(--serif); margin-top: 18px; }
.sw-feel { font-size: 14px; color: var(--ink-2); max-width: 22ch; }
.sw-hint { margin-top: auto; font-size: 12px; letter-spacing: .06em; color: var(--ink-2); display: inline-flex; gap: 6px; align-items: center; }
/* dệt vải bằng gradient lặp, mỗi loại một kiểu sợi */
.sw-cotton { left: 0; top: 20px; width: 56%; height: 300px; transform: rotate(-4deg);
  background: repeating-linear-gradient(0deg, rgba(43, 27, 31, .045) 0 1px, transparent 1px 4px), repeating-linear-gradient(90deg, rgba(43, 27, 31, .045) 0 1px, transparent 1px 4px), #F5E3E4; }
.sw-poly { right: 0; top: 0; width: 44%; height: 250px; transform: rotate(5deg);
  background: repeating-linear-gradient(45deg, rgba(43, 27, 31, .05) 0 2px, transparent 2px 6px), repeating-linear-gradient(-45deg, rgba(43, 27, 31, .04) 0 2px, transparent 2px 6px), #EFE7DC; }
.sw-spandex { left: 24%; bottom: 0; width: 54%; height: 220px; transform: rotate(2deg); transform-origin: left center;
  background: repeating-linear-gradient(90deg, rgba(43, 27, 31, .06) 0 1px, transparent 1px 3px), #E9D9CB; }
@media (prefers-color-scheme: dark) {
  .swatch { color: #2B1B1F; }
  .swatch .sw-feel, .swatch .sw-hint { color: #6A5458; }
}
.sw-cotton.press { transform: rotate(-4deg) scale(1.05, .9); box-shadow: 0 8px 18px -12px rgba(43, 27, 31, .6); }
.sw-poly::after { content: ''; position: absolute; inset: 0; opacity: 0; transition: opacity .2s;
  background: linear-gradient(115deg, transparent 30%, rgba(43, 27, 31, .14) 34%, transparent 38%, transparent 55%, rgba(255, 255, 255, .5) 58%, transparent 62%); }
.sw-poly.press { transform: rotate(5deg) scale(.94) skewX(-3deg); }
.sw-poly.press::after { opacity: 1; }
.swatch.lift { z-index: 2; }
@media (max-width: 860px) {
  .fabric { grid-template-columns: 1fr; }
  /* điện thoại: ba mẫu vải xếp dọc, không chồng lên nhau */
  .swatches { height: auto; display: grid; gap: 16px; padding: 4px 6px; }
  .swatch { position: relative; left: auto; right: auto; top: auto; bottom: auto; width: 100%; height: 150px; }
  .sw-cotton { transform: rotate(-1.5deg); width: 96%; }
  .sw-poly { transform: rotate(1.5deg); width: 92%; justify-self: end; }
  .sw-spandex { transform: rotate(-1deg); width: 94%; }
  .sw-cotton.press { transform: rotate(-1.5deg) scale(1.04, .9); }
  .sw-poly.press { transform: rotate(1.5deg) scale(.95) skewX(-3deg); }
  .sw-name { font-size: 28px; margin-top: 12px; }
}

/* ---------- Chọn size ---------- */
.size {
  background: var(--paper-2); padding: clamp(56px, 8vw, 120px) var(--gutter);
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 96px); align-items: center;
}
.size > * { max-width: 600px; }
.size-tool { justify-self: end; width: 100%; }
.field-range { margin: 28px 0 0; }
.field-range label { display: flex; justify-content: space-between; font-weight: 500; font-size: 15px; margin-bottom: 10px; }
.field-range output { font: 500 22px/1 var(--serif); color: var(--wine); }
input[type="range"] { width: 100%; appearance: none; -webkit-appearance: none; background: transparent; height: 30px; }
input[type="range"]::-webkit-slider-runnable-track { height: 2px; background: var(--ink); }
input[type="range"]::-moz-range-track { height: 2px; background: var(--ink); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; margin-top: -12px; border-radius: 50%; background: var(--paper); border: 2px solid var(--wine); box-shadow: 0 4px 10px -4px rgba(94, 21, 34, .5); cursor: grab; }
input[type="range"]::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: var(--paper); border: 2px solid var(--wine); cursor: grab; }
.size-note { margin-top: 26px; color: var(--ink-2); min-height: 3.3em; }
.size-answer { display: grid; justify-items: start; gap: 26px; }
.size-letter {
  width: clamp(150px, 16vw, 210px); aspect-ratio: 1; border-radius: 999px 999px 0 0; background: var(--wine); color: var(--on-wine);
  display: grid; place-items: center; font: 400 clamp(84px, 9vw, 120px)/1 var(--serif); padding-top: .12em;
}
.size-letter.pop { animation: pop .5s var(--ease); }
@keyframes pop { 0% { transform: scale(.86); } 60% { transform: scale(1.04); } 100% { transform: none; } }
.size-table { border-collapse: collapse; width: 100%; font-size: 15px; }
.size-table th, .size-table td { padding: 10px 12px; text-align: center; }
.size-table thead th { font: 500 22px/1 var(--serif); border-bottom: 1px solid var(--ink); }
.size-table tbody th { text-align: left; font-weight: 500; color: var(--ink-2); }
.size-table .on { background: var(--blush); color: var(--ink); }
@media (max-width: 860px) {
  .size { grid-template-columns: minmax(0, 1fr); }
  .size-tool { justify-self: stretch; }
  .size-answer { grid-template-columns: minmax(0, 1fr); justify-items: center; gap: 18px; }
  .size-letter { width: 120px; font-size: 72px; }
  .size-table { font-size: 14px; }
  .size-table th, .size-table td { padding: 9px 6px; }
  .size-answer .link-underline { text-align: center; }
}

/* ---------- Câu chuyện ---------- */
.story { max-width: var(--max); margin: 0 auto; padding: clamp(72px, 10vw, 160px) var(--gutter); text-align: center; }
.manifesto { margin: 0 auto; }
.manifesto p { font: 400 clamp(44px, 7vw, 104px)/1.08 var(--serif); letter-spacing: -.02em; margin: 0; }
.manifesto em { display: inline-block; line-height: 1.12; }
.story-body { max-width: 52ch; margin: 28px auto 0; color: var(--ink-2); font-size: 17px; }
.story-media { display: grid; grid-template-columns: 1fr 1.1fr 1fr; gap: clamp(14px, 2.4vw, 36px); align-items: center; margin-top: clamp(48px, 6vw, 88px); }
.story-photo { margin: 0; }
.story-photo img { width: 100%; object-fit: cover; }
.sp-1 img { aspect-ratio: 3/4; }
.sp-2 { align-self: end; }
.sp-2 img { aspect-ratio: 4/5; }
.film { position: relative; aspect-ratio: 9/16; background: var(--ink); overflow: hidden; border-radius: 999px 999px 0 0; box-shadow: var(--shadow); }
.film video { width: 100%; height: 100%; object-fit: cover; }
.film-play {
  position: absolute; inset: auto 0 28px; margin: 0 auto; width: max-content; border: 0; cursor: pointer;
  display: inline-flex; gap: 10px; align-items: center; padding: 12px 22px; border-radius: 999px;
  background: rgba(255, 250, 247, .92); color: #2B1B1F; font-weight: 500; font-size: 15px;
  transition: transform .3s var(--ease);
}
.film-play:hover { transform: scale(1.04); }
.film-play i { font-size: 18px; color: #7B1E2E; }
.film.playing .film-play { opacity: 0; pointer-events: none; }
@media (max-width: 860px) {
  .story-media { grid-template-columns: 1fr 1fr; }
  .film { grid-column: span 2; order: -1; width: min(78%, 360px); justify-self: center; }
}

/* ---------- Khách hàng (cuộn ngang) ---------- */
.reel-wrap { padding: clamp(56px, 8vw, 120px) 0; background: var(--paper-2); }
.reel-head { max-width: var(--max); margin: 0 auto 36px; padding: 0 var(--gutter); }
.reel { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 0 var(--gutter) 12px; scrollbar-width: thin; scrollbar-color: var(--ink-2) transparent; }
.reel-item { display: block; width: 100%; position: relative; aspect-ratio: 9/16; background: var(--ink); overflow: hidden; border: 0; padding: 0; cursor: pointer; }
.reel-item video, .reel-item img { width: 100%; height: 100%; object-fit: cover; }
.reel-item .ri-play { position: absolute; left: 14px; bottom: 14px; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 250, 247, .9); color: #7B1E2E; font-size: 18px; transition: opacity .3s; }
.reel-item.playing .ri-play { opacity: 0; }
.reel-cap { flex: 0 0 auto; margin: 8px 0 0; font-size: 13px; color: var(--ink-2); }
.reel-cell { flex: 0 0 clamp(190px, 21vw, 260px); scroll-snap-align: start; }
/* điện thoại: video khách xếp lưới 2 cột, cuộn dọc như bình thường */
@media (max-width: 760px) {
  .reel { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 12px; overflow: visible; padding: 0 var(--gutter); }
  .reel-cell { flex: none; min-width: 0; }
}

/* ---------- Thành viên ---------- */
.member {
  max-width: var(--max); margin: 0 auto; padding: clamp(64px, 9vw, 140px) var(--gutter);
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 96px); align-items: center;
}
.member-card-wrap { perspective: 1200px; justify-self: center; width: min(100%, 440px); }
.member-card {
  aspect-ratio: 1.586; border-radius: 18px; position: relative; transform-style: preserve-3d;
  transition: transform .8s var(--ease);
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(255, 255, 255, .16), transparent 55%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, .04) 0 2px, transparent 2px 7px),
    #7B1E2E;
  color: #FFF5F1; box-shadow: 0 40px 70px -34px rgba(94, 21, 34, .7);
}
.mc-face { position: absolute; inset: 0; padding: clamp(20px, 5%, 30px); display: grid; grid-template-rows: auto auto 1fr auto auto; }
.mc-brand { font: 500 26px/1 var(--serif); letter-spacing: .34em; }
.mc-kind { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; opacity: .8; margin-top: 6px; }
.mc-name { align-self: end; font: italic 400 clamp(24px, 3vw, 32px)/1.15 var(--serif); padding-bottom: .1em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mc-code { font: 500 15px/1.6 ui-monospace, 'Cascadia Mono', Consolas, monospace; letter-spacing: .14em; }
.mc-off { position: absolute; right: clamp(20px, 5%, 30px); top: clamp(20px, 5%, 30px); text-align: right; font-size: 12px; opacity: .9; }
.mc-off b { display: block; font: 500 34px/1 var(--serif); }
.member-card.issued { animation: issue 1s var(--ease); }
@keyframes issue { 0% { transform: rotateY(0); } 50% { transform: rotateY(180deg) scale(.96); } 100% { transform: rotateY(360deg); } }
.member-form { display: grid; gap: 18px; max-width: 520px; }
.field { display: grid; gap: 8px; }
.field label { font-weight: 500; font-size: 14px; }
.field input, .field select, .field textarea {
  min-height: 50px; padding: 0 20px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--ink) 40%, transparent);
  background: var(--paper); color: var(--ink); transition: border-color .2s, box-shadow .2s; width: 100%;
}
.field textarea { border-radius: 22px; padding: 14px 20px; min-height: 80px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--wine); box-shadow: 0 0 0 3px color-mix(in srgb, var(--wine) 22%, transparent); }
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border: 2px solid #B3261E; background: color-mix(in srgb, #B3261E 7%, var(--paper)); }
.field-row { display: grid; grid-template-columns: 1.4fr 1fr; gap: 14px; }
.form-error { color: #B3261E; margin: 0; min-height: 1.2em; font-size: 14px; }
@media (prefers-color-scheme: dark) { .form-error, .field input[aria-invalid="true"] { color: #FFB4AB; border-color: #FFB4AB; } }
.member-done { display: flex; flex-wrap: wrap; gap: 12px; }
@media (max-width: 860px) {
  .member { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
}

/* ---------- Hỏi đáp ---------- */
.faq { max-width: var(--max); margin: 0 auto; padding: clamp(56px, 8vw, 120px) var(--gutter); display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
.seller { position: sticky; top: 96px; }
.seller-img { width: 100%; height: auto; aspect-ratio: 3/2; object-fit: cover; margin-bottom: 26px; border-radius: 18px; }
.seller-name { font: 500 26px/1.2 var(--serif); margin: 18px 0 6px; }
.seller-desc { color: var(--ink-2); margin: 0 0 22px; }
.seller-contact { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.seller-contact a { display: inline-flex; gap: 10px; align-items: center; text-decoration: none; padding: 10px 18px; border-radius: 999px; border: 1px solid var(--line); transition: border-color .2s, background .2s; }
.seller-contact a:hover { border-color: var(--wine); background: var(--paper-2); }
.seller-contact i { color: var(--wine); font-size: 18px; }
.seller-contact .pending { color: var(--ink-2); font-size: 14px; }
.faq-group + .faq-group { margin-top: 36px; }
.faq-group h3 { font: 500 14px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); margin: 0 0 6px; }
.qa { border-bottom: 1px solid var(--line); }
.qa summary { list-style: none; cursor: pointer; padding: 20px 40px 20px 0; position: relative; font: 500 clamp(20px, 2vw, 24px)/1.3 var(--serif); }
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after { content: '+'; position: absolute; right: 4px; top: 50%; transform: translateY(-50%); font: 300 26px/1 var(--sans); color: var(--wine); transition: transform .3s var(--ease); }
.qa[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.qa p { margin: 0 0 20px; color: var(--ink-2); max-width: 62ch; }
@media (max-width: 860px) { .faq { grid-template-columns: 1fr; } .seller { position: static; } }

/* ---------- Footer ---------- */
.foot { padding: 0 var(--gutter) 120px; max-width: var(--max); margin: 0 auto; border-top: 1px solid var(--line); }
.foot-mark { font: 400 clamp(72px, 21vw, 300px)/.9 var(--serif); letter-spacing: .18em; margin: 36px 0 18px; color: var(--wine); text-align: center; padding-left: .18em; }
.foot-row { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; color: var(--ink-2); font-size: 14px; }
.foot-row p { margin: 0; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; }
.foot-admin { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; color: var(--ink-2); font-size: 13px; transition: border-color .2s, color .2s; }
.foot-admin:hover { border-color: var(--wine); color: var(--wine); }

/* ---------- Thanh dưới (điện thoại) ---------- */
.dock {
  position: fixed; z-index: 30; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom));
  display: none; grid-template-columns: 1fr 1fr; gap: 8px; padding: 8px; border-radius: 999px;
  background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 14px 40px -16px rgba(43, 27, 31, .45); transform: translateY(140%); transition: transform .5s var(--ease);
}
.dock.show { transform: none; }
.dock .btn { min-height: 46px; padding: 0 12px; }
@media (max-width: 860px) { .dock { display: grid; } }

/* ---------- Phòng thử đồ ---------- */
.fit { padding: 0; border: 0; width: min(1180px, 100vw); max-width: 100vw; height: min(820px, 100dvh); max-height: 100dvh; background: var(--paper); color: var(--ink); overflow: hidden; }
.fit::backdrop { background: rgba(25, 12, 15, .55); backdrop-filter: blur(6px); }
.fit[open] { animation: sheet .55s var(--ease); }
@keyframes sheet { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
.fit-inner { display: grid; grid-template-columns: 1.05fr 1fr; height: 100%; }
.fit-close { position: absolute; z-index: 3; right: 14px; top: 14px; width: 46px; height: 46px; border-radius: 50%; border: 0; cursor: pointer; background: var(--paper); color: var(--ink); font-size: 20px; display: grid; place-items: center; box-shadow: 0 6px 16px -8px rgba(0, 0, 0, .4); }
.fit-media { position: relative; background: var(--sand); min-height: 0; }
.fit-track { display: flex; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.fit-track::-webkit-scrollbar { display: none; }
.fit-slide { flex: 0 0 100%; height: 100%; scroll-snap-align: start; position: relative; }
.fit-slide img, .fit-slide video { width: 100%; height: 100%; object-fit: cover; }
.fit-slide.is-video video { object-fit: contain; background: #140B0D; }
.fit-dots { position: absolute; left: 0; right: 0; bottom: 16px; display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; padding: 0 60px; }
.fit-dots button { width: 9px; height: 9px; padding: 0; border-radius: 50%; border: 1px solid #fff; background: rgba(255, 255, 255, .35); cursor: pointer; }
.fit-dots button.on { background: #fff; width: 24px; border-radius: 999px; }
.fit-dots button.v { border-color: #fff; background: transparent; position: relative; }
.fit-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255, 250, 247, .85); color: #2B1B1F; cursor: pointer; display: grid; place-items: center; font-size: 18px; }
.fit-prev { left: 14px; } .fit-next { right: 14px; }
.fit-info { overflow-y: auto; padding: clamp(28px, 4vw, 52px); padding-top: 64px; display: grid; align-content: start; gap: 22px; }
.fi-name { font: 500 clamp(34px, 3.6vw, 48px)/1.05 var(--serif); margin: 0; }
.fi-short { margin: 6px 0 0; color: var(--ink-2); }
.fi-price { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.fi-price b { font: 500 32px/1 var(--serif); }
.fi-price s { color: var(--ink-2); }
.fi-price span { font-size: 14px; color: var(--wine); }
.fi-label { font-size: 13px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); margin: 0 0 10px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 10px; }
.fi-label button { text-transform: none; letter-spacing: 0; font-size: 14px; background: none; border: 0; padding: 0; color: var(--wine); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 42px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: transparent; cursor: pointer; display: inline-flex; gap: 8px; align-items: center; font-size: 14px; transition: border-color .2s, background .2s; }
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.chip .dot { width: 16px; height: 16px; }
.chip-size { min-width: 54px; justify-content: center; font-weight: 500; }
.chip-size[disabled] { opacity: .45; cursor: not-allowed; text-decoration: line-through; }
.chip-size small { font-size: 11px; font-weight: 400; text-decoration: none; }
.ma-don { display: grid; gap: 4px; justify-items: center; }
.ma-don b { font: 600 30px/1 ui-monospace, 'Cascadia Mono', Consolas, monospace; letter-spacing: .14em; color: var(--wine); background: var(--paper-2); padding: 12px 18px; border-radius: 14px; border: 1.5px dashed var(--wine); }
.done-acts { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.fi-sizebox { background: var(--paper-2); padding: 16px 18px; display: none; }
.fi-sizebox.open { display: block; animation: rise .4s var(--ease); }
.fi-sizebox table { width: 100%; border-collapse: collapse; font-size: 14px; }
.fi-sizebox th, .fi-sizebox td { padding: 6px 4px; text-align: center; }
.fi-sizebox thead th { font: 500 18px/1 var(--serif); }
.fi-sizebox tbody th { text-align: left; color: var(--ink-2); font-weight: 500; }
.fi-sizebox p { margin: 10px 0 0; font-size: 13px; color: var(--ink-2); }
.feel { display: grid; gap: 8px; }
.feel-row { display: grid; grid-template-columns: 96px 1fr; align-items: center; font-size: 14px; }
.feel-dots { display: flex; gap: 6px; }
.feel-dots i { width: 10px; height: 10px; border-radius: 50%; border: 1px solid var(--wine); }
.feel-dots i.f { background: var(--wine); }
.mix-tabs { display: flex; flex-wrap: wrap; gap: 6px; padding-bottom: 2px; }
.mix-tabs .chip { min-height: 36px; padding: 0 14px; flex: 0 0 auto; }
.mix-text { margin: 12px 0 0; font: italic 400 21px/1.4 var(--serif); min-height: 3em; }
.fi-actions { display: flex; flex-wrap: wrap; gap: 10px; position: sticky; bottom: 0; padding: 14px 0 6px; background: linear-gradient(transparent, var(--paper) 30%); }
.fi-actions .btn { flex: 1 1 180px; }
.fi-policy summary { cursor: pointer; font-weight: 500; font-size: 15px; padding: 6px 0; }
.fi-policy p { margin: 6px 0 12px; color: var(--ink-2); font-size: 14px; }
.order { display: grid; gap: 14px; }
.order-sum { display: grid; gap: 6px; background: var(--paper-2); padding: 16px 20px; font-size: 15px; }
.order-sum div { display: flex; justify-content: space-between; }
.order-sum .total { font: 500 24px/1.2 var(--serif); border-top: 1px solid var(--line); padding-top: 8px; margin-top: 4px; }
.code-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: end; }
.code-msg { font-size: 13px; margin: -6px 0 0; min-height: 1.2em; }
.code-msg.ok { color: var(--wine); }
.done-box { text-align: center; padding: 30px 10px; display: grid; gap: 12px; justify-items: center; }
.done-box i { font-size: 54px; color: var(--wine); }
.done-box h3 { font: 500 34px/1.1 var(--serif); margin: 0; }
.done-box p { margin: 0; color: var(--ink-2); max-width: 38ch; }
@media (max-width: 860px) {
  .fit { width: 100vw; height: 100dvh; }
  .fit-inner { grid-template-columns: 1fr; grid-template-rows: 58dvh auto; overflow-y: auto; height: 100%; }
  .fit-media { height: 58dvh; }
  /* điện thoại: nút mũi tên to, rõ để bấm xem ảnh tiếp (không bắt khách phải vuốt) */
  .fit-nav { width: 48px; height: 48px; font-size: 22px; background: rgba(255, 250, 247, .94); box-shadow: 0 6px 16px -6px rgba(0, 0, 0, .45); }
  .fit-prev { left: 10px; } .fit-next { right: 10px; }
  .fit-info { overflow: visible; padding: 24px var(--gutter) 24px; }
  .fi-price span { flex-basis: 100%; }
  .fit-close { position: fixed; }
}

/* ---------- Báo chưa chọn size (to, rõ, rung nhẹ) ---------- */
.size-alert {
  display: flex; gap: 14px; align-items: center; margin-top: 14px; padding: 16px 18px;
  background: var(--wine); color: var(--on-wine); border-radius: 18px; animation: rise .35s var(--ease);
  box-shadow: var(--shadow);
}
.size-alert i { font-size: 34px; flex: none; }
.size-alert b { display: block; font: 500 24px/1.15 var(--serif); }
.size-alert span { font-size: 15px; opacity: .92; }
#fiSizes.need .chip-size { border: 2px solid var(--wine); color: var(--wine); font-size: 17px; min-width: 64px; min-height: 52px; }
@media (prefers-reduced-motion: no-preference) { #fiSizes.need { animation: lac .5s cubic-bezier(.36, .07, .19, .97) 2; } }
@keyframes lac { 10%, 90% { transform: translateX(-2px); } 20%, 80% { transform: translateX(4px); } 30%, 50%, 70% { transform: translateX(-8px); } 40%, 60% { transform: translateX(8px); } }
.field-err { display: flex; gap: 8px; align-items: center; margin: 2px 0 0; padding: 10px 14px; border-radius: 14px; background: #B3261E; color: #fff; font-size: 15px; font-weight: 500; animation: rise .3s var(--ease); }
.field-err i { font-size: 20px; flex: none; }
.form-error:not(:empty) { padding: 12px 16px; border-radius: 14px; background: color-mix(in srgb, #B3261E 12%, var(--paper)); font-size: 15px; font-weight: 500; }

/* =========================================================
   CHẤT MAY ĐO: nền vân vải lanh, hoa Orali in chìm, đường chỉ may,
   mép vải lượn sóng, thước dây thợ may chạy theo trang.
   ========================================================= */
body {
  background-color: var(--paper);
  background-image:
    repeating-linear-gradient(0deg, var(--thread) 0 1px, transparent 1px 4px),
    repeating-linear-gradient(90deg, var(--thread) 0 1px, transparent 1px 5px);
}
:root { --thread: rgba(123, 30, 46, .028); --flower: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'%3E%3Cg fill='none' stroke='%237B1E2E' stroke-width='1.2'%3E%3Cg transform='translate(100 100)'%3E%3Cellipse rx='22' ry='46' cy='-44'/%3E%3Cellipse rx='22' ry='46' cy='-44' transform='rotate(72)'/%3E%3Cellipse rx='22' ry='46' cy='-44' transform='rotate(144)'/%3E%3Cellipse rx='22' ry='46' cy='-44' transform='rotate(216)'/%3E%3Cellipse rx='22' ry='46' cy='-44' transform='rotate(288)'/%3E%3Ccircle r='9'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E"); }
@media (prefers-color-scheme: dark) { :root { --thread: rgba(243, 232, 229, .025); } }

/* hoa Orali in chìm, rất mờ, sau tiêu đề vài mục */
.collection, .member, .story, .places { position: relative; isolation: isolate; overflow-x: clip; }
.collection::before, .member::before, .story::before {
  content: ''; position: absolute; z-index: -1; width: clamp(260px, 34vw, 520px); aspect-ratio: 1;
  background: var(--flower) center / contain no-repeat; opacity: .07; pointer-events: none;
}
.collection::before { right: -6%; top: 2%; transform: rotate(14deg); }
.member::before { left: -8%; bottom: -4%; transform: rotate(-20deg); }
.story::before { left: 50%; top: 4%; transform: translateX(-50%); width: clamp(300px, 46vw, 680px); opacity: .05; }
@media (prefers-reduced-motion: no-preference) {
  .collection::before, .member::before { animation: xoay 90s linear infinite; }
}
@keyframes xoay { to { rotate: 360deg; } }

/* mép vải lượn sóng (viền ren) ở đầu các mảng nền màu */
.where, .size, .reel-wrap { position: relative; }
.where::before, .size::before, .reel-wrap::before {
  content: ''; position: absolute; left: 0; right: 0; top: -15px; height: 16px; background: var(--paper-2);
  -webkit-mask: radial-gradient(circle 12px at 12px 16px, #000 98%, #0000) 0 0 / 24px 16px repeat-x;
          mask: radial-gradient(circle 12px at 12px 16px, #000 98%, #0000) 0 0 / 24px 16px repeat-x;
}
.where::after, .size::after, .reel-wrap::after { /* hàng chỉ khâu chạy theo viền */
  content: ''; position: absolute; left: 0; right: 0; top: 10px; border-top: 1.5px dashed color-mix(in srgb, var(--wine) 35%, transparent); pointer-events: none;
}

/* đường chỉ may + kéo, ngăn giữa các mục */
.seam { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); display: flex; align-items: center; gap: 12px; color: var(--wine); }
.seam::before, .seam::after { content: ''; flex: 1; border-top: 1.5px dashed color-mix(in srgb, var(--wine) 45%, transparent); }
.seam::after { flex: .12; }
.seam i { font-size: 22px; transform: rotate(-90deg); }
@media (prefers-reduced-motion: no-preference) {
  .seam i { animation: cat linear both; animation-timeline: view(); animation-range: entry 10% cover 60%; }
}
@keyframes cat { from { translate: 40vw 0; } to { translate: 0 0; } }
@media (max-width: 760px) { .seam i { animation: none !important; } }

/* thước dây thợ may dọc mép phải, kim chỉ trượt theo độ cuộn trang */
.tape {
  position: fixed; z-index: 15; right: 0; top: 68px; bottom: 0; width: 30px; pointer-events: none;
  background-color: #F1E4C8;
  background-image:
    repeating-linear-gradient(180deg, #2B1B1F 0 1px, transparent 1px 50px),
    repeating-linear-gradient(180deg, #2B1B1F 0 1px, transparent 1px 10px);
  background-size: 14px 100%, 7px 100%; background-repeat: no-repeat; background-position: left top, left top;
  box-shadow: inset 2px 0 0 rgba(43, 27, 31, .15), -6px 0 16px -10px rgba(43, 27, 31, .4);
  opacity: .9;
}
.tape::before { /* số cm mờ */
  content: '10  20  30  40  50  60  70  80  90  100  110  120  130  140  150'; position: absolute; left: 15px; top: 46px;
  writing-mode: vertical-rl; font: 600 9px/1 var(--sans); letter-spacing: 32.5px; color: rgba(43, 27, 31, .6); white-space: pre;
}
.tape-kim { position: absolute; right: 0; top: 0; width: 46px; height: 3px; background: var(--wine); border-radius: 2px; }
.tape-kim::before { content: ''; position: absolute; left: -7px; top: -5px; border: 6px solid transparent; border-right-color: var(--wine); border-left: 0; }
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: scroll()) {
    .tape-kim { animation: kim linear both; animation-timeline: scroll(root); }
  }
}
@keyframes kim { from { transform: translateY(6px); } to { transform: translateY(calc(100dvh - 68px - 10px)); } }
@media (max-width: 1100px) { .tape { display: none; } }
@media (min-width: 1101px) { body { padding-right: 30px; } .nav { margin-right: -30px; padding-right: calc(var(--gutter) + 30px); } }

/* ---------- Toast ---------- */
.toast { position: fixed; z-index: 60; left: 50%; top: 22px; transform: translate(-50%, -20px); opacity: 0; pointer-events: none;
  width: max-content; max-width: min(92vw, 520px); text-align: center;
  background: var(--wine); color: var(--on-wine); padding: 14px 24px; border-radius: 18px; font-size: 16px; font-weight: 500; line-height: 1.4;
  box-shadow: 0 18px 40px -12px rgba(43, 27, 31, .5); transition: transform .4s var(--ease); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast[popover] { inset: 22px auto auto 50%; margin: 0; border: 0; overflow: visible; }
.toast[popover]:not(:popover-open) { display: none; }

/* ---------- Xuất hiện khi cuộn ---------- */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(26px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
  .reveal.in { opacity: 1; transform: none; }
  .reveal-hero { opacity: 0; transform: translateY(18px); animation: rise .9s var(--ease) forwards; }
  .reveal-hero:nth-of-type(2) { animation-delay: .08s; }
  .lede.reveal-hero { animation-delay: .16s; }
  .hero-cta.reveal-hero { animation-delay: .26s; }
  .hero-art { animation: rise 1.1s var(--ease) .1s both; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .seal, .hang-tag { animation: none !important; }
}
