/* แสงทอง — หน้ารุ่นมือถือ (mockup)  ·  โลกของหน้า: ตู้โชว์กระจก + ป้ายราคาขอบทอง */

:root {
  --paper: #ffffff;
  --mist: #f2f5fb;
  --glass: #e4ebf6;
  --line: #d3dcea;
  --ink: #0e1f3d;
  --ink-2: #45546e;
  --cobalt: #1746b0;
  --cobalt-deep: #0f2f7a;
  --cobalt-wash: #e8eefb;
  --gold: #b98a2c;
  --gold-ink: #856012;
  --gold-wash: #f8efd8;
  --warn: #a8261c;
  --tint: #eef2f9;               /* แสงบนชั้นโชว์ เปลี่ยนตามสีเครื่องที่เลือก */
  --display: "Prompt", "Noto Sans Thai", "Leelawadee UI", system-ui, sans-serif;
  --text: "Prompt", "Noto Sans Thai", "Leelawadee UI", system-ui, sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --gutter: 1.125rem;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 1rem;
  background: var(--mist);
}

body {
  margin: 0;
  font-family: var(--text);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  caret-color: var(--cobalt);
}

::selection { background: var(--cobalt); color: #fff; }
:focus-visible { outline: 2px solid var(--cobalt); outline-offset: 3px; border-radius: 4px; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; font-family: inherit; }
img { display: block; max-width: 100%; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: var(--cobalt); text-underline-offset: 0.2em; }

.page {
  max-width: 30rem;
  margin: 0 auto;
  background: var(--paper);
  min-height: 100vh;
  padding-bottom: 5.5rem;         /* ที่ว่างให้แถบล่าง */
  box-shadow: 0 0 0 1px var(--line);
}

/* ---------- แถบบน ---------- */
.topline {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 0.875rem var(--gutter) 0.625rem;
}
.wordmark {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.375rem;
  line-height: 1;
  color: var(--gold-ink);
  text-decoration: none;
  letter-spacing: 0.01em;
}
.wordmark small {
  font-family: var(--text);
  font-weight: 500;
  font-size: 0.8125rem;
  color: var(--ink-2);
  margin-left: 0.5rem;
  letter-spacing: 0;
}
.topline__brand { font-size: 0.9375rem; font-weight: 600; color: var(--ink-2); }

/* ---------- ตู้โชว์ ---------- */
.counter { position: relative; }
.stage {
  position: relative;
  background: radial-gradient(115% 78% at 50% 34%, var(--tint) 0%, #fff 66%);
  transition: background 0.6s var(--ease);
}
.reel {
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;             /* ปัดรูปได้แค่ซ้ายขวา รูปไม่ขยับขึ้นลงในกรอบ */
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
  aspect-ratio: 1 / 1;           /* เวทีสูงพอให้เห็นเครื่องเต็มตัวบนจอมือถือ */
  cursor: zoom-in;
  touch-action: pan-x pan-y;
}
.reel::-webkit-scrollbar { display: none; }
.reel > li {
  position: relative;
  flex: 0 0 100%;
  scroll-snap-align: center;
  scroll-snap-stop: always;      /* ปัดทีละรูป ไม่ข้าม */
  display: grid;
  place-items: center;
  min-width: 0;
}
/* วางรูปแบบ absolute ในกรอบที่รู้ขนาดแน่นอน: Safari บน iPhone คิด height:100% ของรูปในกรอบแบบ aspect-ratio ไม่ออก
   ทำให้รูปล้นกรอบแล้วโดนตัดขอบล่าง (เจ้าของเจอบนมือถือจริง 11/11/2569) */
.reel img {
  position: absolute;
  inset: 0.75rem 0.75rem 1.5rem;
  width: calc(100% - 1.5rem);
  height: calc(100% - 2.25rem);
  object-fit: contain;
  object-position: center bottom;
  mix-blend-mode: multiply;        /* พื้นขาวของรูปกลืนไปกับแสงบนชั้น */
}
.reel__empty { align-self: center; color: var(--ink-2); font-size: 0.9375rem; }

.stage__count {
  position: absolute;
  right: var(--gutter);
  top: 0.5rem;
  padding: 0.0625rem 0.5rem;
  background: rgb(255 255 255 / 0.85);
  border-radius: 999px;
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
  color: var(--ink-2);
}
.reel.is-dragging { scroll-snap-type: none; cursor: grabbing; user-select: none; }
.reel.is-nudging > li:first-child img { animation: nudge 0.9s var(--ease); }
@keyframes nudge { 35% { transform: translateX(-1.75rem); } }

/* ลูกศรเลื่อนรูป: ใช้ได้ทั้งนิ้วและเมาส์ */
.nav {
  position: absolute;
  top: 50%;
  width: 2.75rem;
  height: 2.75rem;
  margin-top: -1.375rem;
  padding: 0;
  display: grid;
  place-items: center;
  background: none;
  border: 0;
  color: var(--ink);
}
.nav::before {
  content: "";
  position: absolute;
  inset: 0.3125rem;
  border-radius: 50%;
  background: rgb(255 255 255 / 0.92);
  box-shadow: 0 1px 4px rgb(14 31 61 / 0.22);
}
.nav svg { position: relative; width: 1.25rem; height: 1.25rem; }
.nav--prev { left: 0.25rem; }
.nav--next { right: 0.25rem; }
.nav[hidden] { display: none; }
.nav:active::before { background: var(--cobalt-wash); }

.pips { position: absolute; left: 0; right: 0; bottom: 0.375rem; display: flex; justify-content: center; gap: 0.3125rem; pointer-events: none; }
.pips li { width: 0.375rem; height: 0.375rem; border-radius: 999px; background: #b9c4d8; transition: width 0.3s var(--ease), background 0.3s var(--ease); }
.pips li.is-on { width: 1.125rem; background: var(--cobalt); }

.shelf {
  height: 0.875rem;
  background: linear-gradient(#dfe7f3, #f6f8fc 55%, #fff);
  border-top: 1px solid #bfcbe0;
  box-shadow: 0 0.75rem 1.25rem -0.75rem rgb(14 31 61 / 0.28);
}

.underShelf { padding: 0.625rem var(--gutter) 0; }

.swatches { display: flex; align-items: center; flex-wrap: wrap; gap: 0.25rem 0.5rem; }
.swatches__label { font-size: 0.9375rem; color: var(--ink-2); margin-right: 0.25rem; }
.swatches__label b { color: var(--ink); font-weight: 600; }
.swatch {
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 0;
  background: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
}
.swatch i {
  width: 1.875rem;
  height: 1.875rem;
  border-radius: 50%;
  background: var(--c);
  box-shadow: inset 0 0 0 1px rgb(14 31 61 / 0.22), 0 1px 2px rgb(14 31 61 / 0.18);
  transition: transform 0.25s var(--ease);
}
.swatch[aria-pressed="true"] i { transform: scale(0.82); box-shadow: inset 0 0 0 1px rgb(14 31 61 / 0.22), 0 0 0 3px #fff, 0 0 0 5px var(--cobalt); }

/* ---------- ป้ายราคา ---------- */
.tagWrap { padding: 1.5rem var(--gutter) 0; }
.tag {
  position: relative;
  padding: 1.75rem 1.125rem 1.25rem;
  background: #fff;
  border: 1px solid var(--gold);
  border-radius: 0.875rem;
  box-shadow: inset 0 0 0 3px #fff, inset 0 0 0 4px var(--gold-wash), 0 1.125rem 2rem -1.375rem rgb(14 31 61 / 0.45);
}
.tag::before {                     /* เชือกห้อยป้ายจากชั้น */
  content: "";
  position: absolute;
  left: 50%;
  top: -1.5rem;
  width: 1px;
  height: calc(1.5rem + 0.875rem);
  background: var(--gold);
}
.tag::after {                      /* รูร้อยเชือก */
  content: "";
  position: absolute;
  left: 50%;
  top: 0.625rem;
  width: 0.625rem;
  height: 0.625rem;
  margin-left: -0.3125rem;
  border-radius: 50%;
  background: var(--mist);
  box-shadow: inset 0 0 0 1px var(--gold);
}

.tag__name {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.5rem;
  line-height: 1.25;
  text-align: center;
  text-wrap: balance;
}

.variants { display: flex; justify-content: center; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; }
.chip {
  min-height: 2.75rem;
  padding: 0 0.875rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--ink-2);
}
.chip[aria-pressed="true"] { background: var(--cobalt-wash); border-color: var(--cobalt); color: var(--cobalt-deep); font-weight: 600; }

.figure { margin-top: 0.625rem; text-align: center; perspective: 40rem; }
.figure__amount output { display: inline-flex; overflow: hidden; padding: 0.125rem 0; }
.figure__amount output i { display: inline-block; font-style: normal; }
.figure__turn.is-turning .figure__amount output i { animation: roll 0.55s var(--ease) both; animation-delay: calc(var(--d) * 45ms); }
@keyframes roll { from { transform: translateY(70%); opacity: 0; filter: blur(3px); } }
.figure__turn.is-turning .figure__after, .figure__turn.is-turning .figure__down { animation: fadeUp 0.5s var(--ease) 0.12s both; }
@keyframes fadeUp { from { transform: translateY(0.375rem); opacity: 0; } }
/* ป้ายราคาแกว่งเบา ๆ เหมือนป้ายที่ห้อยจากชั้น */
.tag { transform-origin: 50% -1.5rem; }
.tag.is-turning { animation: sway 0.9s var(--ease); }
@keyframes sway { 0% { transform: rotate(0); } 22% { transform: rotate(1.1deg); } 50% { transform: rotate(-0.7deg); } 76% { transform: rotate(0.3deg); } 100% { transform: rotate(0); } }
.figure__lead { font-size: 1rem; color: var(--ink-2); }
.figure__amount {
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 0.5rem;
  font-family: var(--display);
  font-weight: 700;
  color: var(--cobalt-deep);
  line-height: 1.05;
}
.figure__amount output { font-size: 3rem; font-variant-numeric: lining-nums tabular-nums; letter-spacing: -0.01em; }
.figure__amount span { font-size: 1.25rem; font-weight: 600; }
.figure__after { margin-top: 0.25rem; font-size: 0.9375rem; color: var(--ink-2); }
.figure__down { margin-top: 0.375rem; font-size: 0.9375rem; font-weight: 600; color: var(--ink); }

.months { --i: 2; position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.5rem; margin-top: 0.875rem; }
.months__pill {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: calc((100% - 1.5rem) / 4);
  border-radius: 0.75rem;
  background: var(--cobalt);
  box-shadow: 0 0.375rem 0.875rem -0.375rem rgb(23 70 176 / 0.55);
  transform: translateX(calc(var(--i) * (100% + 0.5rem)));
  transition: transform 0.45s var(--ease);
  z-index: 1;
  pointer-events: none;
}
.month {
  position: relative;
  min-height: 3.75rem;
  padding: 0.375rem 0.25rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  display: grid;
  align-content: center;
  justify-items: center;
  line-height: 1.15;
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.month > * { position: relative; z-index: 2; }
.month b { font-family: var(--display); font-size: 1.4375rem; font-weight: 600; font-variant-numeric: lining-nums; }
.month small { font-size: 0.75rem; color: var(--ink-2); }
.month[aria-checked="true"] { background: none; border-color: transparent; color: #fff; }
.month[aria-checked="true"] small { color: #dfe7fb; }


.kept {
  display: none;
  margin-top: 0.625rem;
  padding: 0.5rem 0.75rem;
  background: var(--gold-wash);
  border-radius: 0.5rem;
  font-size: 0.875rem;
  color: #5c4208;
  text-align: center;
}
.kept.is-on { display: block; }

.downs { display: grid; grid-template-columns: 1fr 1fr; margin-top: 0.875rem; padding: 0.1875rem; background: var(--mist); border-radius: 0.75rem; }
.down {
  min-height: 2.75rem;
  background: none;
  border: 0;
  border-radius: 0.5625rem;
  font-weight: 500;
  color: var(--ink-2);
}
.down[aria-checked="true"] { background: #fff; color: var(--cobalt-deep); font-weight: 600; box-shadow: 0 1px 3px rgb(14 31 61 / 0.18); }

.cta {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 3.25rem;
  margin-top: 1rem;
  padding: 0 1rem;
  background: var(--cobalt);
  border: 0;
  border-radius: 0.75rem;
  color: #fff;
  font-weight: 600;
  font-size: 1.0625rem;
  text-decoration: none;
  transition: background 0.2s var(--ease), transform 0.2s var(--ease);
}
.cta:active { background: var(--cobalt-deep); transform: translateY(1px); }
.cta[disabled] { background: #9fb0d3; cursor: default; }

/* ---------- เนื้อหาใต้ตู้ ---------- */
.block { padding: 2.75rem var(--gutter) 0; }
.block > h2 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.375rem;
  line-height: 1.25;
  margin-bottom: 0.75rem;
}

.points li {
  display: grid;
  grid-template-columns: 2rem 1fr;
  gap: 0.75rem;
  padding: 0.875rem 0;
  border-top: 1px solid var(--line);
}
.points li:last-child { border-bottom: 1px solid var(--line); }
.points svg { width: 1.75rem; height: 1.75rem; margin-top: 0.125rem; color: var(--cobalt); }
.points h3 { font-size: 1.0625rem; font-weight: 600; line-height: 1.35; }
.points p { font-size: 0.9375rem; color: var(--ink-2); }

.specs > div {
  display: grid;
  grid-template-columns: 6.75rem 1fr;
  gap: 0.75rem;
  padding: 0.6875rem 0;
  border-top: 1px solid var(--line);
  font-size: 0.9375rem;
}
.specs > div:last-child { border-bottom: 1px solid var(--line); }
.specs dt { color: var(--ink-2); }
.specs dd { font-weight: 500; overflow-wrap: anywhere; }
.specsMore { margin-top: 0.25rem; }
.specsMore summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 3rem;
  cursor: pointer;
  list-style: none;
  color: var(--cobalt);
  font-weight: 600;
}
.specsMore summary::-webkit-details-marker { display: none; }
.specsMore summary svg { width: 1.25rem; height: 1.25rem; transition: transform 0.35s var(--ease); }
.specsMore[open] summary svg { transform: rotate(180deg); }
.specsMore[open] .specs { animation: fadeUp 0.4s var(--ease); }
.specsMore .specs > div:first-child { border-top: 1px solid var(--line); }

/* เครื่องนี้เหมาะกับใคร */
.fits li { display: grid; grid-template-columns: 2.75rem 1fr; gap: 0.75rem; align-items: center; padding: 0.625rem 0; }
.fits li + li { border-top: 1px solid var(--line); }
.fits svg { width: 2.75rem; height: 2.75rem; padding: 0.5625rem; border-radius: 50%; background: var(--cobalt-wash); color: var(--cobalt-deep); }
.fits h3 { font-size: 1.0625rem; font-weight: 600; line-height: 1.35; }
.fits p { font-size: 0.9375rem; color: var(--ink-2); }
.fits__note { margin-top: 0.625rem; padding: 0.5rem 0.75rem; background: var(--gold-wash); border-radius: 0.5rem; font-size: 0.875rem; color: #5c4208; }

/* รุ่นข้างเคียงบนชั้นเดียวกัน */
.neighbours { display: grid; grid-template-columns: 1fr 1fr; }
.neighbour { display: block; color: inherit; text-decoration: none; min-width: 0; }
.neighbour__img {
  aspect-ratio: 1 / 1.05;
  padding: 0.5rem 1rem 0;
  background: radial-gradient(110% 75% at 50% 40%, var(--mist), #fff 70%);
}
.neighbour__img img { width: 100%; height: 100%; object-fit: contain; object-position: center bottom; mix-blend-mode: multiply; }
.neighbour__shelf {                 /* ชั้นโชว์ต่อเนื่องใต้สองเครื่อง */
  height: 0.75rem;
  background: linear-gradient(#dfe7f3, #f6f8fc 55%, #fff);
  border-top: 1px solid #bfcbe0;
  box-shadow: 0 0.625rem 1rem -0.625rem rgb(14 31 61 / 0.28);
}
.neighbour__text { padding: 0.75rem 0.75rem 0 0; }
.neighbour + .neighbour .neighbour__text { padding: 0.75rem 0 0 0.75rem; }
.neighbour__kind { font-size: 0.8125rem; font-weight: 600; color: var(--gold-ink); }
.neighbour__name { font-family: var(--display); font-weight: 600; font-size: 1.0625rem; line-height: 1.3; color: var(--ink); }
.neighbour__pay { margin-top: 0.125rem; font-size: 0.9375rem; color: var(--ink-2); }
.neighbour__pay b { color: var(--cobalt-deep); font-variant-numeric: tabular-nums; }
.neighbour__go { display: inline-block; margin-top: 0.25rem; font-size: 0.9375rem; font-weight: 600; color: var(--cobalt); text-decoration: underline; text-underline-offset: 0.2em; }
.neighbour--none .neighbour__img { display: grid; place-items: center; color: var(--ink-2); font-size: 0.875rem; text-align: center; }

/* ---------- ฟอร์ม ---------- */
.lead { margin-top: 2.75rem; padding: 2rem var(--gutter) 2.25rem; background: var(--mist); }
.lead > h2 { font-family: var(--display); font-weight: 600; font-size: 1.5rem; line-height: 1.25; }
.lead > p { margin-top: 0.375rem; color: var(--ink-2); font-size: 0.9375rem; }
.pick {
  margin-top: 1rem;
  padding: 0.75rem 0.875rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  font-size: 0.9375rem;
}
.pick b { font-weight: 600; }
.pick span { color: var(--ink-2); }
fieldset { border: 0; padding: 0; margin: 1.5rem 0 0; min-width: 0; }
legend { padding: 0; font-weight: 600; font-size: 1.1875rem; line-height: 1.35; margin-bottom: 0.25rem; }
.field { margin-top: 0.875rem; }
.field label { display: block; font-size: 0.9375rem; font-weight: 500; margin-bottom: 0.3125rem; }
.field input, .field textarea {
  width: 100%;
  min-height: 3rem;
  padding: 0.625rem 0.75rem;
  background: #fff;
  border: 1px solid #aab7cf;
  border-radius: 0.625rem;
  font-size: 1rem;
}
.field textarea { min-height: 5.25rem; resize: vertical; line-height: 1.5; }
.field input:focus, .field textarea:focus { outline: 2px solid var(--cobalt); outline-offset: 1px; border-color: var(--cobalt); }
.field__row { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 0.5rem; }
.field__unit { color: var(--ink-2); font-size: 0.9375rem; }
.field__hint { margin-top: 0.25rem; font-size: 0.8125rem; color: var(--ink-2); }
.field__error { display: none; margin-top: 0.25rem; font-size: 0.875rem; color: var(--warn); font-weight: 500; }
.field.is-bad input, .field.is-bad textarea { border-color: var(--warn); }
.field.is-bad .field__error { display: block; }
.field .agree { display: flex; align-items: flex-start; gap: 0.75rem; min-height: 2.75rem; margin: 0; padding: 0.75rem; border: 1px solid var(--line); border-radius: 0.75rem; font-weight: 400; line-height: 1.5; cursor: pointer; }
.field .agree input { flex: none; width: 1.375rem; height: 1.375rem; min-height: 0; margin: 0.125rem 0 0; padding: 0; accent-color: var(--cobalt); }
.field.is-bad .agree { border-color: var(--warn); }
.trap { position: absolute; left: -200vw; width: 1px; height: 1px; overflow: hidden; }
.sheet__error { margin: 0 0 0.5rem; font-size: 0.9375rem; font-weight: 500; color: var(--warn); }
.lead__note { margin-top: 0.75rem; font-size: 0.8125rem; color: var(--ink-2); }

.sent { display: none; margin-top: 1.25rem; padding: 1.25rem 1rem; background: #fff; border: 1px solid var(--gold); border-radius: 0.875rem; }
.sent h3 { font-family: var(--display); font-size: 1.25rem; font-weight: 600; }
.sent p { margin-top: 0.25rem; color: var(--ink-2); font-size: 0.9375rem; }
.lead.is-sent form { display: none; }
.lead.is-sent .sent { display: block; }

.foot { padding: 1.5rem var(--gutter) 0; font-size: 0.8125rem; color: var(--ink-2); }
.foot p + p { margin-top: 0.375rem; }

/* ---------- แถบล่างตามนิ้ว ---------- */
.dock {
  position: fixed;
  left: 50%;
  bottom: 0;
  width: min(100%, 30rem);
  transform: translate(-50%, 110%);
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem var(--gutter) calc(0.625rem + env(safe-area-inset-bottom));
  background: #fff;
  border-top: 1px solid var(--line);
  box-shadow: 0 -0.5rem 1.5rem -1rem rgb(14 31 61 / 0.35);
  transition: transform 0.35s var(--ease);
  z-index: 5;
}
.dock.is-up { transform: translate(-50%, 0); }
.dock__pay { line-height: 1.25; min-width: 0; }
.dock__pay small { display: block; font-size: 0.8125rem; color: var(--ink-2); }
.dock__pay b { font-family: var(--display); font-size: 1.375rem; font-weight: 700; color: var(--cobalt-deep); font-variant-numeric: lining-nums tabular-nums; }
.dock .cta { width: auto; margin: 0; min-height: 3rem; padding: 0 1.125rem; font-size: 1rem; }

/* ---------- หน้ารวมทุกรุ่น ---------- */
.catalog { padding: 0.5rem var(--gutter) 0; }
.catalog > h1 { font-family: var(--display); font-weight: 600; font-size: 1.75rem; line-height: 1.2; }
.catalog > p { color: var(--ink-2); margin-top: 0.25rem; font-size: 0.9375rem; }
.brandRow { margin-top: 2rem; }
.brandRow h2 { font-family: var(--display); font-weight: 600; font-size: 1.25rem; display: flex; justify-content: space-between; align-items: baseline; }
.brandRow h2 small { font-family: var(--text); font-size: 0.8125rem; font-weight: 500; color: var(--ink-2); }
.rack { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem 0.75rem; margin-top: 0.75rem; }
.rack a { color: inherit; text-decoration: none; display: block; }
.rack__img { aspect-ratio: 1 / 1.05; padding: 0.5rem 0.75rem 0; background: radial-gradient(110% 75% at 50% 40%, var(--mist), #fff 70%); border-bottom: 1px solid #bfcbe0; box-shadow: 0 0.5rem 0.875rem -0.625rem rgb(14 31 61 / 0.3); }
.rack__img img { width: 100%; height: 100%; object-fit: contain; object-position: center bottom; mix-blend-mode: multiply; }
.rack__name { margin-top: 0.75rem; font-family: var(--display); font-weight: 600; font-size: 1.0625rem; line-height: 1.3; }
.rack__pay { font-size: 0.9375rem; color: var(--ink-2); }
.rack__pay b { color: var(--cobalt-deep); font-variant-numeric: tabular-nums; }

.missing { padding: 4rem var(--gutter); text-align: center; }
.missing h1 { font-family: var(--display); font-size: 1.5rem; }
.missing p { color: var(--ink-2); margin-top: 0.5rem; }

@media (min-width: 31rem) {
  .page { margin: 1.5rem auto; min-height: 0; border-radius: 1.25rem; overflow: clip; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ---------- หน้ารวมทุกรุ่น: แถบเลือกยี่ห้อและการใช้งาน ---------- */
.filters {
  position: sticky;
  top: 0;
  z-index: 4;
  margin: 1rem calc(var(--gutter) * -1) 0;
  background: rgb(255 255 255 / 0.97);
  border-bottom: 1px solid var(--line);
}
.brandNav { display: flex; align-items: center; gap: 0.5rem; overflow-x: auto; scrollbar-width: none; padding: 0.5rem var(--gutter); }
.brandNav::-webkit-scrollbar { display: none; }
.brandNav--use { padding-top: 0; }
.brandNav__label { flex: 0 0 auto; font-size: 0.875rem; color: var(--ink-2); }
.brandNav .chip { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 0.375rem; transition: background 0.25s var(--ease), border-color 0.25s var(--ease), color 0.25s var(--ease); }
.brandNav--use .chip { min-height: 2.5rem; font-size: 0.875rem; }
.brandNav .chip small { font-size: 0.8125rem; font-weight: 500; color: var(--ink-2); }
.brandNav .chip[aria-pressed="true"] small { color: var(--cobalt-deep); }
.rack a[hidden] { display: none; }
.catalog__none { margin-top: 2rem; color: var(--ink-2); }
.catalog.is-shuffling .rack a { animation: fadeUp 0.5s var(--ease) both; animation-delay: calc(var(--n, 0) * 45ms); }
.brandRow[hidden] { display: none; }
.brandRow { scroll-margin-top: 7rem; }
.dots { display: flex; gap: 0.25rem; margin-top: 0.375rem; }
.dots i { width: 0.75rem; height: 0.75rem; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgb(14 31 61 / 0.25); }
.rack__kind { font-size: 0.75rem; font-weight: 600; color: var(--gold-ink); }
.allLink { display: inline-flex; align-items: center; min-height: 2.75rem; font-weight: 600; }
.topline__all { font-size: 0.9375rem; font-weight: 600; color: var(--cobalt); text-decoration: underline; text-underline-offset: 0.2em; display: inline-flex; align-items: center; min-height: 2.75rem; margin: -0.75rem 0; }
.topline { align-items: center; }

/* ---------- รูปใหญ่เต็มจอ ---------- */
dialog { color: var(--ink); font-family: var(--text); }
dialog::backdrop { background: rgb(14 31 61 / 0.55); }
.viewer {
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: #fff;
}
.viewer[open] { display: grid; grid-template-rows: 1fr auto; }
.viewer__reel {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  overscroll-behavior: contain;
  min-height: 0;
  background: radial-gradient(110% 70% at 50% 40%, var(--tint), #fff 68%);
}
.viewer__reel::-webkit-scrollbar { display: none; }
.viewer__reel > li { flex: 0 0 100%; scroll-snap-align: center; scroll-snap-stop: always; display: grid; place-items: center; padding: 3.5rem 0.75rem 1rem; min-width: 0; }
.viewer__reel img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.viewer__reel.is-dragging { scroll-snap-type: none; cursor: grabbing; user-select: none; }
.viewer__count { position: absolute; left: var(--gutter); top: 1rem; font-size: 0.9375rem; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.viewer__close, .sheet__icon {
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  display: grid;
  place-items: center;
  background: var(--mist);
  border: 0;
  border-radius: 50%;
  color: var(--ink);
}
.viewer__close { position: absolute; right: 0.75rem; top: 0.5rem; }
.viewer__close svg, .sheet__icon svg { width: 1.25rem; height: 1.25rem; }
.viewer .nav { top: calc(50% - 2.5rem); }
.viewer__strip { display: flex; gap: 0.5rem; overflow-x: auto; scrollbar-width: none; padding: 0.625rem var(--gutter) calc(0.75rem + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
.viewer__strip::-webkit-scrollbar { display: none; }
.viewer__strip button { flex: 0 0 3.5rem; height: 3.5rem; padding: 0.25rem; background: #fff; border: 1px solid var(--line); border-radius: 0.625rem; }
.viewer__strip button[aria-current="true"] { border-color: var(--cobalt); box-shadow: inset 0 0 0 1px var(--cobalt); }
.viewer__strip img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }

/* ---------- ฟอร์มทำเคส เต็มจอ ทีละขั้น ---------- */
.sheet {
  width: min(100vw, 30rem);
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0 auto;
  padding: 0;
  border: 0;
  background: #fff;
}
.sheet[open] { animation: rise 0.38s var(--ease); }
@keyframes rise { from { transform: translateY(8%); opacity: 0; } }
.sheet__form { height: 100%; display: grid; grid-template-rows: auto 1fr auto; }
.sheet__head {
  display: grid;
  grid-template-columns: 2.75rem 1fr 2.75rem;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem 0;
}
.sheet__head #sheetBack[hidden] { display: grid; visibility: hidden; }
.sheet__title { text-align: center; }
.sheet__title h2 { font-size: 1.0625rem; font-weight: 600; line-height: 1.3; }
.sheet__title p { font-size: 0.8125rem; color: var(--ink-2); }
.sheet__bar { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.375rem; padding: 0.625rem 0.375rem 0.75rem; }
.sheet__bar i { height: 0.25rem; border-radius: 999px; background: var(--glass); transition: background 0.3s var(--ease); }
.sheet__bar i.is-on { background: var(--cobalt); }
.sheet__body { overflow-y: auto; overscroll-behavior: contain; padding: 0.25rem var(--gutter) 1.5rem; }
.sheet__body .pick { margin-top: 0; background: var(--mist); border-color: transparent; }
.sheet__body fieldset { margin-top: 1.25rem; }
.sheet__body fieldset[hidden] { display: none; }
.sheet__foot { padding: 0.625rem var(--gutter) calc(0.75rem + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: #fff; }
.sheet__foot .cta { margin-top: 0; }

/* ---------- ป๊อปอัปหลังส่งข้อมูล ---------- */
.thanks {
  width: min(calc(100vw - 2rem), 22rem);
  padding: 1.75rem 1.25rem 1.25rem;
  border: 1px solid var(--gold);
  border-radius: 1rem;
  background: #fff;
  text-align: center;
  box-shadow: inset 0 0 0 3px #fff, inset 0 0 0 4px var(--gold-wash), 0 1.5rem 3rem -1rem rgb(14 31 61 / 0.5);
}
.thanks[open] { animation: rise 0.38s var(--ease); }
.thanks__mark { width: 3rem; height: 3rem; color: var(--cobalt); }
.thanks h2 { margin-top: 0.5rem; font-size: 1.375rem; font-weight: 600; line-height: 1.3; }
.thanks p { margin-top: 0.5rem; font-size: 1rem; line-height: 1.55; }
.thanks__hours { font-weight: 600; color: var(--cobalt-deep); }
.thanks .cta { margin-top: 1.125rem; }

/* สรุปสิ่งที่เลือกในช่วงท้ายหน้า: ไม่ทำเป็นกล่องซ้อนกล่อง */
.lead > .pick { padding: 0.75rem 0; background: none; border: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); border-radius: 0; }

/* ---------- การเคลื่อนไหว ---------- */
/* เครื่องถูกวางลงบนชั้น + แสงวิ่งผ่านกระจกชั้น ตอนเปิดหน้าและตอนเปลี่ยนสี */
.counter.is-placing .reel > li:first-child img { animation: place 0.7s var(--ease) both; }
@keyframes place { from { transform: translateY(-0.875rem) scale(1.04); opacity: 0; filter: blur(4px); } }
.shelf { position: relative; overflow: hidden; }
.counter.is-placing .shelf::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 35%;
  background: linear-gradient(100deg, transparent, rgb(255 255 255 / 0.95) 45%, transparent);
  animation: glint 1.1s var(--ease) 0.15s both;
}
@keyframes glint { from { transform: translateX(-120%); } to { transform: translateX(400%); } }

/* จุดบอกรูปที่กำลังพาดู ค่อย ๆ เติมเต็ม */
.pips li { position: relative; overflow: hidden; }
.stage.is-touring .pips li.is-on::after { content: ""; position: absolute; inset: 0; background: var(--gold); transform-origin: 0 50%; animation: fill 2.4s linear both; }
@keyframes fill { from { transform: scaleX(0); } }

/* ปุ่มหลักมีแสงวิ่งผ่านเป็นระยะ */
.cta--glint { position: relative; overflow: hidden; }
.cta--glint::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 28%;
  background: linear-gradient(100deg, transparent, rgb(255 244 214 / 0.55) 50%, transparent);
  transform: translateX(-140%);
  animation: sheen 5.5s var(--ease) 2.2s infinite;
}
@keyframes sheen { 0% { transform: translateX(-140%); } 22%, 100% { transform: translateX(520%); } }

/* ค่อย ๆ ขึ้นมาตอนเลื่อนถึง */
.will-rise { opacity: 0; transform: translateY(0.875rem); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); transition-delay: calc(var(--n, 0) * 70ms); }
.will-rise.is-in { opacity: 1; transform: none; }

/* เครื่องหมายถูกในป๊อปอัปวาดตัวเอง */
.thanks__mark circle, .thanks__mark path { stroke-dasharray: 1; stroke-dashoffset: 1; }
.thanks[open] .thanks__mark circle { animation: draw 0.6s var(--ease) 0.1s forwards; }
.thanks[open] .thanks__mark path { animation: draw 0.4s var(--ease) 0.55s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* สีที่เลือกเด้งรับ */
.swatch:active i { transform: scale(0.74); }

@media (prefers-reduced-motion: reduce) {
  .will-rise { opacity: 1; transform: none; }
  .thanks__mark circle, .thanks__mark path { stroke-dashoffset: 0; }
  .cta--glint::after { display: none; }
}
