/* V72 FONT PATCH — the Ekkamai .ttf files have a corrupted character map
   outside Basic Latin and Thai: 44%% of the codepoints they claim to cover
   point at the wrong outline (° draws a letter, · draws an "n", × and most
   accented Latin draw Thai tone marks). The unicode-range below stops the
   browser from using these faces for anything except the two ranges they
   render correctly; everything else falls through to the next family in the
   stack. Do not widen it — widening reinstates the broken glyphs. */
/* COREVERSE inline Nail Shape + Size Guide — V12 */
.nsg.section {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
  scroll-margin-top: 90px;
  background: #fff;
  color: #0b0b0d;
}

.nsg button,
.nsg input { font: inherit; }

.nsg-shapes {
  width: min(100%, 1540px);
  margin: 0 auto;
  padding: clamp(62px, 7vw, 118px) clamp(22px, 6vw, 96px) clamp(42px, 5vw, 86px);
}

.nsg-title { text-align: center; }
.nsg-title .micro { color: #77777c; }
.nsg-title h2 {
  margin: 2px 0 clamp(28px, 4vw, 58px);
  font: 500 clamp(62px, 9.5vw, 164px)/.82 "Howto Longa", "Times New Roman", serif;
  letter-spacing: -.055em;
  text-transform: uppercase;
}

.nsg-shape-feature {
  display: grid;
  grid-template-columns: 46px minmax(220px, .85fr) minmax(320px, 1.15fr) 46px;
  align-items: center;
  gap: clamp(18px, 3vw, 52px);
  max-width: 1120px;
  min-height: 380px;
  margin: 0 auto 34px;
}

.nsg-round-nav {
  display: grid;
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  place-items: center;
  padding: 0;
  border: 1px solid #a9a9ad;
  border-radius: 50%;
  background: #fff;
  color: #111114;
  cursor: pointer;
  transition: background .2s ease, color .2s ease, transform .2s ease;
}

.nsg-round-nav:hover { background: #111114; color: #fff; transform: scale(1.05); }
.nsg-selected-nail { display: grid; min-width: 0; margin: 0; place-items: center; }
.nsg-selected-nail img {
  display: block;
  width: auto;
  height: clamp(250px, 28vw, 430px);
  max-width: 100%;
  object-fit: contain;
  filter: drop-shadow(0 18px 13px rgba(0, 0, 0, .15));
}

.nsg-shape-copy { align-self: center; min-width: 0; }
.nsg-shape-copy .micro { margin: 0 0 8px; color: #88888d; }
.nsg-shape-copy h3 {
  margin: 0;
  font: 500 clamp(42px, 5vw, 82px)/.95 "Howto Longa", "Times New Roman", serif;
  letter-spacing: -.035em;
}
.nsg-shape-copy > strong {
  display: block;
  margin: 15px 0 10px;
  font: 500 clamp(35px, 4vw, 62px)/1 "Howto Longa", "Times New Roman", serif;
}
.nsg-shape-copy > strong small { font: 700 12px/1 Arial, sans-serif; text-transform: uppercase; }
.nsg-shape-copy > p:last-child { max-width: 520px; margin: 0; color: #6e6e73; font-size: clamp(13px, 1.15vw, 17px); line-height: 1.55; }

.nsg-shape-rail {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 6px;
  width: 100%;
  overflow: hidden;
}

.nsg-shape-rail button {
  min-width: 0;
  min-height: 190px;
  padding: 14px 7px 10px;
  overflow: hidden;
  border: 0;
  border-top: 1px solid transparent;
  background: #f5f5f3;
  color: #111114;
  cursor: pointer;
}
.nsg-shape-rail button.is-on { border-top: 3px double #111114; background: #fff; }
.nsg-shape-rail img { display: block; width: 100%; height: 138px; object-fit: contain; filter: drop-shadow(0 9px 7px rgba(0,0,0,.13)); }
.nsg-shape-rail span { display: block; margin-top: 7px; font-size: clamp(9px, .9vw, 13px); font-weight: 700; line-height: 1.15; }
.nsg-shape-rail i { font-style: normal; }

.nsg-lace-divider {
  position: relative;
  z-index: 2;
  height: clamp(54px, 6vw, 90px);
  overflow: hidden;
  background: #fff;
}
.nsg-lace-divider img {
  position: absolute;
  top: 50%;
  left: 50%;
  width: clamp(64px, 6vw, 96px);
  max-width: none;
  height: auto;
  transform: translate(-50%, -50%) rotate(-90deg);
  transform-origin: center;
}

.nsg-measure {
  position: relative;
  padding: clamp(64px, 8vw, 132px) clamp(18px, 6vw, 100px) clamp(62px, 8vw, 124px);
  overflow: hidden;
  background: #0d0e12;
  color: #f5f5f2;
}
.nsg-measure::before {
  position: absolute;
  inset: 0;
  content: "";
  opacity: .16;
  background:
    radial-gradient(circle at 15% 18%, rgba(255,255,255,.15), transparent 25%),
    radial-gradient(circle at 83% 70%, rgba(255,255,255,.1), transparent 28%),
    repeating-linear-gradient(90deg, transparent 0 78px, rgba(255,255,255,.025) 79px 80px);
  pointer-events: none;
}
.nsg-measure > * { position: relative; z-index: 1; }
.nsg-measure-head { width: min(100%, 1200px); margin: 0 auto clamp(36px, 5vw, 72px); }
.nsg-measure-head .micro { color: #a7a7ac; }
.nsg-measure-head h2 {
  margin: 8px 0 0;
  color: #eeeef0;
  font: 500 clamp(62px, 8.5vw, 142px)/.84 "Howto Longa", Georgia, serif;
  letter-spacing: -.045em;
}

.nsg-method-intro {
  display: grid;
  grid-template-columns: minmax(260px, .8fr) minmax(300px, 1.2fr);
  align-items: center;
  gap: clamp(26px, 5vw, 82px);
  width: min(100%, 1080px);
  margin: 0 auto clamp(38px, 6vw, 82px);
}
.nsg-method-intro figure { margin: 0; transform: rotate(-2deg); }
.nsg-method-intro img { display: block; width: 100%; border-radius: 4px; box-shadow: 0 18px 50px rgba(0,0,0,.5); }
.nsg-method-intro p { display: grid; gap: 14px; margin: 0; color: #b8b8bd; font-size: clamp(14px, 1.4vw, 20px); line-height: 1.55; }
.nsg-method-intro strong { color: #f5f5f2; font: 500 clamp(29px, 3.1vw, 48px)/1.08 "Howto Longa", Georgia, serif; }

.nsg-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  width: min(100%, 1320px);
  margin: 0 auto clamp(58px, 7vw, 112px);
  padding: 0;
  border: 1px solid #393a40;
  border-radius: 20px;
  list-style: none;
}
.nsg-steps li { min-height: 220px; padding: 28px 24px; border-right: 1px solid #393a40; }
.nsg-steps li:last-child { border-right: 0; }
.nsg-steps b { display: block; margin-bottom: 42px; color: #6f7077; font: italic 500 27px/1 Georgia, serif; }
.nsg-steps strong { display: block; color: #f4f4f2; font-size: clamp(15px, 1.25vw, 19px); line-height: 1.3; }
.nsg-steps p { margin: 10px 0 0; color: #999aa1; font-size: clamp(12px, .95vw, 14px); line-height: 1.5; }

.nsg-chart-layout {
  display: grid;
  grid-template-columns: minmax(230px, .55fr) minmax(620px, 1.45fr);
  align-items: center;
  gap: clamp(20px, 4vw, 72px);
  width: min(100%, 1320px);
  margin: 0 auto;
}
.nsg-chart-note .micro { color: #8e8f95; }
.nsg-chart-note h3 { margin: 8px 0 16px; font: 500 clamp(30px, 3.2vw, 49px)/1 "Howto Longa", Georgia, serif; }
.nsg-chart-note p { margin: 0; color: #a7a8ae; font-size: clamp(13px, 1vw, 16px); line-height: 1.6; }
.nsg-chart-art { position: relative; width: 100%; aspect-ratio: 2306 / 1231; margin: 0; }
.nsg-chart-art img {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 53.38%;
  max-width: none;
  height: auto;
  transform: translate(-50%, -50%) rotate(-90deg);
  filter: drop-shadow(0 25px 28px rgba(0,0,0,.35));
}

.nsg-record {
  padding: clamp(58px, 8vw, 120px) clamp(14px, 6vw, 92px);
  background: #050507;
  color: #fff;
}
.nsg-record-frame { position: relative; width: min(100%, 1180px); min-height: 620px; margin: 0 auto; padding: clamp(55px, 7vw, 110px); }
.nsg-record-frame-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: fill; pointer-events: none; }
.nsg-size-form {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 24px;
  min-height: 440px;
  padding: clamp(28px, 4vw, 58px);
  border: 1px solid #d8d8dc;
  border-radius: 3px;
  background: rgba(255,255,255,.97);
  color: #111114;
  box-shadow: 0 22px 50px rgba(0,0,0,.28);
}
.nsg-size-form header { text-align: center; }
.nsg-size-form header .micro { margin: 0 0 5px; }
.nsg-size-form h2 { margin: 0; font: 500 clamp(38px, 5vw, 72px)/.95 "Howto Longa", Georgia, serif; }
.nsg-size-form label { display: grid; gap: 7px; color: #36363a; font-size: 12px; font-weight: 700; letter-spacing: .04em; }
.nsg-size-form input {
  width: 100%;
  min-height: 48px;
  padding: 9px 12px;
  border: 1px solid #9a9aa0;
  border-radius: 6px;
  background: #fff;
  color: #111114;
  font-size: 16px;
}
.nsg-name { width: min(100%, 520px); margin: 0 auto; }
.nsg-finger-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.nsg-size-result { display: block; padding: 12px 16px; border: 1px solid #d1d1d5; border-radius: 999px; background: #f4f4f2; text-align: center; font-weight: 700; }
.nsg-form-actions { display: grid; grid-template-columns: 1fr 1fr 1.25fr; gap: 10px; }
.nsg-form-actions button { min-height: 50px; padding: 10px 14px; border: 1px solid #111114; border-radius: 999px; background: #fff; color: #111114; font-weight: 700; cursor: pointer; }
.nsg-form-actions button:first-child,
.nsg-form-actions button:last-child { background: #111114; color: #fff; }
.nsg-save-status { min-height: 20px; margin: -8px 0 0; color: #5c5d62; text-align: center; font-size: 12px; }
.nsg-lace-divider--bottom { background: #050507; }

@media (max-width: 900px) {
  .nsg-shape-feature { grid-template-columns: 38px minmax(150px, .8fr) minmax(220px, 1.2fr) 38px; gap: 13px; }
  .nsg-chart-layout { grid-template-columns: 1fr; width: min(100%, 760px); }
  .nsg-chart-note { max-width: 620px; }
  .nsg-record-frame { padding: 62px 48px; }
}

@media (max-width: 700px) {
  .nsg.section { scroll-margin-top: 74px; }
  .nsg-shapes { padding: 52px 10px 34px; }
  .nsg-title h2 { margin-bottom: 30px; font-size: clamp(62px, 20vw, 96px); }
  .nsg-shape-feature {
    grid-template-columns: 30px minmax(100px, 40%) minmax(0, 1fr) 30px;
    gap: 7px;
    min-height: 230px;
    margin-bottom: 24px;
  }
  .nsg-round-nav { width: 30px; min-width: 30px; height: 30px; min-height: 30px; font-size: 12px; }
  .nsg-selected-nail img { height: clamp(170px, 48vw, 235px); }
  .nsg-shape-copy .micro { margin-bottom: 5px; font-size: 8px; }
  .nsg-shape-copy h3 { font-size: clamp(29px, 9vw, 45px); }
  .nsg-shape-copy > strong { margin: 9px 0 6px; font-size: clamp(28px, 8vw, 39px); }
  .nsg-shape-copy > p:last-child { font-size: 10px; line-height: 1.4; }
  .nsg-shape-rail {
    display: flex;
    gap: 3px;
    padding: 0;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }
  .nsg-shape-rail::-webkit-scrollbar { display: none; }
  .nsg-shape-rail button { flex: 0 0 calc((100% - 12px) / 5); min-height: 158px; padding: 9px 3px 7px; scroll-snap-align: start; }
  .nsg-shape-rail img { height: 116px; }
  .nsg-shape-rail span { font-size: 8px; }
  .nsg-lace-divider { height: 60px; }
  .nsg-lace-divider img { width: 68px; }
  .nsg-measure { padding: 66px 14px 70px; }
  .nsg-measure-head { margin-bottom: 40px; }
  .nsg-measure-head h2 { font-size: clamp(56px, 17vw, 84px); }
  .nsg-method-intro { grid-template-columns: 44% 1fr; gap: 16px; margin-bottom: 42px; }
  .nsg-method-intro strong { font-size: clamp(20px, 6vw, 28px); }
  .nsg-method-intro p { gap: 8px; font-size: 11px; }
  .nsg-steps { grid-template-columns: repeat(2, 1fr); border-radius: 14px; }
  .nsg-steps li { min-height: 185px; padding: 20px 16px; border-right: 1px solid #393a40; border-bottom: 1px solid #393a40; }
  .nsg-steps li:nth-child(2n) { border-right: 0; }
  .nsg-steps li:nth-child(n+3) { border-bottom: 0; }
  .nsg-steps b { margin-bottom: 28px; font-size: 22px; }
  .nsg-steps strong { font-size: 13px; }
  .nsg-steps p { font-size: 10px; }
  .nsg-chart-note { padding: 0 10px; }
  .nsg-chart-note h3 { font-size: 34px; }
  .nsg-chart-art { width: calc(100% + 18px); margin-left: -9px; }
  .nsg-record { padding: 55px 8px 92px; }
  .nsg-record-frame { min-height: 0; padding: 46px 30px; }
  .nsg-size-form { gap: 18px; min-height: 0; padding: 24px 15px; }
  .nsg-size-form h2 { font-size: 42px; }
  .nsg-finger-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .nsg-finger-grid label:last-child { grid-column: 1 / -1; width: calc(50% - 5px); justify-self: center; }
  .nsg-size-form input { min-height: 44px; font-size: 15px; }
  .nsg-size-result { border-radius: 12px; font-size: 12px; line-height: 1.4; }
  .nsg-form-actions { grid-template-columns: 1fr 1fr; }
  .nsg-form-actions button:last-child { grid-column: 1 / -1; }
}

@media (max-width: 390px) {
  .nsg-shape-feature { grid-template-columns: 27px minmax(90px, 38%) minmax(0, 1fr) 27px; gap: 5px; }
  .nsg-round-nav { width: 27px; min-width: 27px; height: 27px; min-height: 27px; }
  .nsg-shape-copy h3 { font-size: 28px; }
  .nsg-record-frame { padding: 38px 22px; }
}

/* V13: compact placement before Queue, desktop reference layout, and the
   original V11 reusable image template. */
.nsg-title .micro,
.nsg-shape-copy .micro,
.nsg-measure-head .micro,
.nsg-method-intro > p,
.nsg-chart-note { display: none !important; }

.nsg-shapes {
  padding-top: clamp(38px, 4vw, 64px);
  padding-bottom: clamp(28px, 3.5vw, 52px);
}
.nsg-title h2 {
  margin-bottom: clamp(16px, 2vw, 28px);
  font-size: clamp(50px, 6vw, 96px);
  line-height: .9;
}
.nsg-shape-feature {
  grid-template-columns: 38px minmax(180px, .8fr) minmax(280px, 1.2fr) 38px;
  gap: clamp(12px, 2vw, 30px);
  min-height: 250px;
  margin-bottom: 18px;
}
.nsg-round-nav { width: 36px; min-width: 36px; height: 36px; min-height: 36px; }
.nsg-selected-nail img { height: clamp(190px, 19vw, 300px); }
.nsg-shape-copy h3 { font-size: clamp(34px, 4vw, 64px); }
.nsg-shape-copy > strong { margin: 8px 0 7px; font-size: clamp(27px, 3vw, 46px); }
.nsg-shape-copy > p:last-child { font-size: clamp(11px, .9vw, 14px); }
.nsg-shape-rail {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.nsg-shape-rail::-webkit-scrollbar { display: none; }
.nsg-shape-rail button {
  flex: 0 0 calc((100% - 16px) / 5);
  min-height: 132px;
  padding: 8px 5px 7px;
  scroll-snap-align: start;
}
.nsg-shape-rail img { height: 94px; }
.nsg-shape-rail span { margin-top: 4px; font-size: clamp(8px, .75vw, 11px); }

.nsg-lace-divider { height: clamp(38px, 4.2vw, 68px); background: #fff; }
.nsg-lace-divider img {
  position: absolute;
  inset: 0;
  width: 100%;
  max-width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 50%;
  transform: none;
}

.nsg-measure {
  display: grid;
  grid-template-columns: minmax(250px, 28%) minmax(0, 72%);
  grid-template-areas:
    "measure-head measure-steps"
    "measure-photo measure-steps"
    "measure-chart measure-chart";
  align-items: start;
  gap: clamp(18px, 2.5vw, 38px);
  padding: clamp(44px, 4.7vw, 76px) clamp(22px, 4vw, 72px) clamp(46px, 5vw, 78px);
}
.nsg-measure-head {
  grid-area: measure-head;
  width: auto;
  margin: 0;
}
.nsg-measure-head h2 {
  margin: 0;
  font-family: "Howto Northwood", "Howto Ekkamai", Georgia, serif;
  font-size: clamp(43px, 4.7vw, 76px);
  line-height: .94;
}
.nsg-method-intro {
  grid-area: measure-photo;
  display: block;
  width: auto;
  margin: 0;
}
.nsg-method-intro figure { width: min(100%, 330px); margin: 4px auto 0; }
.nsg-method-intro img { box-shadow: none; }
.nsg-steps {
  grid-area: measure-steps;
  width: 100%;
  margin: 0;
}
.nsg-steps li { min-height: 205px; padding: clamp(18px, 1.6vw, 26px); }
.nsg-steps b { margin-bottom: clamp(28px, 3vw, 48px); }
.nsg-chart-layout {
  grid-area: measure-chart;
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(240px, .7fr);
  align-items: center;
  gap: clamp(20px, 3vw, 52px);
  width: min(100%, 1220px);
  margin: 8px auto 0;
}
.nsg-chart-art,
.nsg-ruler-art { position: relative; width: 100%; margin: 0; aspect-ratio: auto; }
.nsg-chart-art img,
.nsg-ruler-art img {
  position: static;
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  transform: none;
  filter: none;
}

.nsg-record { display: none !important; }
.nsg-template {
  padding: clamp(44px, 5vw, 76px) 18px clamp(52px, 6vw, 88px);
  background: #f2f2f4;
  color: #19191c;
}
.nsg-template-head {
  max-width: 720px;
  margin: 0 auto 24px;
  text-align: center;
}
.nsg-template-head h2 {
  margin: 0 0 10px;
  font: 600 clamp(34px, 3.6vw, 54px)/1 "Howto Ekkamai", Inter, sans-serif;
  letter-spacing: -.025em;
}
.nsg-template-head p { margin: 0 auto; color: #68686e; font-size: clamp(11px, .9vw, 14px); line-height: 1.55; }
.size-template-editor {
  width: min(100%, 760px);
  margin: 0 auto;
  padding: clamp(12px, 1.6vw, 20px);
  border: 1px solid rgba(20,20,25,.12);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 24px 60px -38px rgba(20,20,25,.5);
}
.size-template-canvas-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid rgba(20,20,25,.13);
  background: #fff;
}
.size-template-canvas-wrap > img { display: block; width: 100%; height: 100%; object-fit: contain; }
.size-template-input {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--w);
  height: var(--h);
  min-width: 0;
  padding: 0 3px;
  border: 1px solid rgba(15,15,18,.4);
  border-radius: clamp(3px, .6vw, 8px);
  outline: 0;
  background: rgba(255,255,255,.98);
  color: #111;
  font: 700 clamp(9px, 1.65vw, 20px)/1 "Howto Ekkamai", Arial, sans-serif;
  text-align: center;
}
.size-template-input:focus { z-index: 4; border-color: #111; box-shadow: 0 0 0 3px rgba(15,15,18,.14); transform: scale(1.04); }
.size-template-title-editor {
  position: absolute;
  z-index: 2;
  left: 13.5%;
  top: 13.5%;
  display: flex;
  width: 74%;
  height: 7.2%;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #fff;
  color: #111;
  font: 600 clamp(13px, 2.8vw, 35px)/1 Georgia, serif;
  white-space: nowrap;
}
.size-template-input--name {
  position: static;
  flex: 0 0 48%;
  width: 48%;
  height: 100%;
  padding: 0 .25em 0 0;
  border-color: transparent;
  border-radius: 0;
  background: #fff;
  font: 600 clamp(13px, 2.8vw, 35px)/1 Georgia, serif;
  text-align: right;
}
.size-template-title-editor > span { display: flex; height: 100%; align-items: center; background: #fff; }
.size-template-title-editor:focus-within { z-index: 5; box-shadow: 0 0 0 3px rgba(15,15,18,.14); }
.size-template-title-editor .size-template-input:focus { box-shadow: none; transform: none; }
.size-template-input::placeholder { color: #8b8b90; opacity: .72; }
.size-template-hint { margin: 14px auto 0; color: #626268; font-size: 11px; line-height: 1.5; text-align: center; }
.size-template-actions { display: flex; justify-content: center; gap: 8px; margin-top: 13px; }
.size-template-actions .btn { width: auto; margin: 0; min-height: 38px; padding: 8px 15px; }
.size-template-status { min-height: 18px; margin: 8px 0 0; color: #555; font-size: 11px; text-align: center; }

@media (max-width: 700px) {
  .nsg-shapes { padding: 34px 8px 25px; }
  .nsg-title h2 { margin-bottom: 14px; font-size: clamp(48px, 14vw, 70px); }
  .nsg-shape-feature {
    grid-template-columns: 27px minmax(84px, 37%) minmax(0, 1fr) 27px;
    gap: 5px;
    min-height: 170px;
    margin-bottom: 14px;
  }
  .nsg-round-nav { width: 27px; min-width: 27px; height: 27px; min-height: 27px; }
  .nsg-selected-nail img { height: clamp(130px, 36vw, 175px); }
  .nsg-shape-copy h3 { font-size: clamp(25px, 7.7vw, 36px); }
  .nsg-shape-copy > strong { margin: 5px 0 4px; font-size: clamp(22px, 6.5vw, 30px); }
  .nsg-shape-copy > p:last-child { font-size: 9px; line-height: 1.3; }
  .nsg-shape-rail button { flex-basis: calc((100% - 12px) / 5); min-height: 108px; padding: 5px 2px; }
  .nsg-shape-rail img { height: 77px; }
  .nsg-shape-rail span { font-size: 7px; }
  .nsg-lace-divider { height: 42px; }
  .nsg-measure {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-areas:
      "measure-head"
      "measure-photo"
      "measure-steps"
      "measure-chart";
    gap: 20px;
    padding: 38px 10px 44px;
  }
  .nsg-measure-head h2 { font-size: clamp(42px, 13vw, 62px); }
  .nsg-method-intro figure { width: min(72%, 270px); }
  .nsg-steps { grid-template-columns: repeat(2, 1fr); margin: 0; }
  .nsg-steps li { min-height: 145px; padding: 14px 12px; }
  .nsg-steps b { margin-bottom: 18px; font-size: 19px; }
  .nsg-steps strong { font-size: 11px; }
  .nsg-steps p { font-size: 8.5px; }
  .nsg-chart-layout { grid-template-columns: 1fr; gap: 10px; margin-top: 0; }
  .nsg-chart-art { width: 100%; margin: 0; }
  .nsg-ruler-art { width: 58%; justify-self: end; margin-top: -10%; }
  .nsg-template { padding: 38px 8px 72px; }
  .nsg-template-head { margin-bottom: 18px; padding: 0 14px; }
  .nsg-template-head h2 { font-size: 32px; }
  .nsg-template-head p { font-size: 10px; }
  .size-template-editor { max-width: 520px; padding: 10px; border-radius: 15px; }
  .size-template-input { padding: 0 1px; border-radius: 3px; }
  .size-template-hint { margin-top: 10px; font-size: 9px; }
  .size-template-actions { display: grid; grid-template-columns: 1fr auto; }
  .size-template-actions .btn { width: 100%; min-height: 36px; padding: 7px 10px; font-size: 9px; }
}

/* V18: the guide is a direct child of Try On, so both move together. */
.tryon > .nsg {
  width: 100vw;
  max-width: none;
  margin-inline: calc(50% - 50vw);
}
.nsg.section { scroll-margin-top: 84px; }

/* V19: enlarge the complete guide on desktop and Android. */
@media (min-width: 701px) {
  .nsg-shapes {
    width: min(100%, 1760px);
    padding-top: clamp(66px, 6vw, 100px);
    padding-bottom: clamp(54px, 5vw, 82px);
  }
  .nsg-title h2 {
    margin-bottom: clamp(28px, 3vw, 46px);
    font-size: clamp(72px, 7vw, 120px);
  }
  .nsg-shape-feature {
    grid-template-columns: 52px minmax(260px, .9fr) minmax(440px, 1.25fr) 52px;
    gap: clamp(28px, 3vw, 56px);
    min-height: 380px;
    margin-bottom: 32px;
  }
  .nsg-round-nav { width: 48px; min-width: 48px; height: 48px; min-height: 48px; font-size: 18px; }
  .nsg-selected-nail img { height: clamp(310px, 25vw, 430px); }
  .nsg-shape-copy h3 { font-size: clamp(54px, 4.9vw, 86px); }
  .nsg-shape-copy > strong { font-size: clamp(42px, 3.8vw, 64px); }
  .nsg-shape-copy > p:last-child { max-width: 620px; font-size: clamp(14px, 1.05vw, 18px); line-height: 1.55; }
  .nsg-shape-rail button { min-height: 178px; padding: 12px 8px 10px; }
  .nsg-shape-rail img { height: 128px; }
  .nsg-shape-rail span { font-size: clamp(10px, .85vw, 13px); }
  .nsg-lace-divider { height: clamp(66px, 5.5vw, 94px); }

  .nsg-measure {
    grid-template-columns: minmax(420px, 32%) minmax(0, 68%);
    gap: clamp(38px, 4vw, 72px);
    padding: clamp(78px, 6.5vw, 118px) clamp(44px, 4.8vw, 92px) clamp(92px, 7vw, 132px);
  }
  .nsg-measure-head h2 { font-size: clamp(68px, 6vw, 108px); }
  .nsg-method-intro figure { width: min(100%, 610px); margin-top: 18px; }
  .nsg-steps li { min-height: 282px; padding: clamp(28px, 2.2vw, 40px); }
  .nsg-steps b { margin-bottom: clamp(46px, 4vw, 68px); font-size: 36px; }
  .nsg-steps strong { font-size: clamp(18px, 1.45vw, 24px); line-height: 1.25; }
  .nsg-steps p { margin-top: 14px; font-size: clamp(13px, 1vw, 17px); line-height: 1.55; }
  .nsg-chart-layout {
    grid-template-columns: minmax(0, 2.15fr) minmax(390px, .9fr);
    gap: clamp(32px, 3.5vw, 64px);
    width: min(100%, 1760px);
    margin-top: 42px;
  }
  .nsg-chart-art img,
  .nsg-ruler-art img { width: 100%; }
  .nsg-template { padding-top: clamp(68px, 6vw, 104px); padding-bottom: clamp(78px, 7vw, 118px); }
  .nsg-template-head { max-width: 880px; margin-bottom: 34px; }
  .nsg-template-head h2 { font-size: clamp(48px, 4.5vw, 72px); }
  .nsg-template-head p { font-size: clamp(14px, 1.05vw, 18px); }
  .size-template-editor { width: min(100%, 960px); padding: clamp(18px, 2vw, 28px); }
}

@media (max-width: 700px) {
  .nsg-shapes { padding: 52px 8px 38px; }
  .nsg-title h2 { margin-bottom: 22px; font-size: clamp(62px, 17vw, 86px); }
  .nsg-shape-feature {
    grid-template-columns: 32px minmax(112px, 41%) minmax(0, 1fr) 32px;
    gap: 7px;
    min-height: 232px;
    margin-bottom: 20px;
  }
  .nsg-round-nav { width: 32px; min-width: 32px; height: 32px; min-height: 32px; }
  .nsg-selected-nail img { height: clamp(188px, 50vw, 238px); }
  .nsg-shape-copy h3 { font-size: clamp(32px, 9.2vw, 44px); }
  .nsg-shape-copy > strong { font-size: clamp(28px, 8vw, 38px); }
  .nsg-shape-copy > p:last-child { font-size: 10.5px; line-height: 1.4; }
  .nsg-shape-rail button { min-height: 132px; padding: 7px 3px; }
  .nsg-shape-rail img { height: 94px; }
  .nsg-shape-rail span { font-size: 8px; }
  .nsg-lace-divider { height: 58px; }
  .nsg-measure { gap: 28px; padding: 54px 12px 72px; }
  .nsg-measure-head h2 { font-size: clamp(54px, 15vw, 74px); }
  .nsg-method-intro figure { width: min(100%, 440px); margin-top: 4px; }
  .nsg-steps li { min-height: 178px; padding: 18px 15px; }
  .nsg-steps b { margin-bottom: 25px; font-size: 25px; }
  .nsg-steps strong { font-size: 13px; line-height: 1.3; }
  .nsg-steps p { margin-top: 9px; font-size: 10.5px; line-height: 1.45; }
  .nsg-chart-layout { gap: 20px; }
  .nsg-chart-art { width: 112%; margin-left: -6%; }
  .nsg-ruler-art { width: 88%; justify-self: center; margin-top: 0; }
  .nsg-template { padding: 52px 8px 82px; }
  .nsg-template-head { margin-bottom: 24px; padding: 0 10px; }
  .nsg-template-head h2 { font-size: clamp(36px, 10.5vw, 48px); }
  .nsg-template-head p { font-size: 11px; }
  .size-template-editor { width: 100%; max-width: 620px; padding: 12px; }
}

/* V20 — readable measurement layout and supplied Thai typography. */
@font-face {
  font-family: "NSG Ekkamai";
  src: url("assets/fonts/ekkamainew-regular-user.ttf") format("truetype");
  font-style: normal;
  font-weight: 300 600;
  font-display: swap;
  unicode-range: U+0020-007E, U+0E00-0E7F;
}

@font-face {
  font-family: "NSG Ekkamai";
  src: url("assets/fonts/ekkamainew-bold-user.ttf") format("truetype");
  font-style: normal;
  font-weight: 700 900;
  font-display: swap;
  unicode-range: U+0020-007E, U+0E00-0E7F;
}

.nsg [lang="th"],
.nsg input[lang="th"],
.nsg button[lang="th"] {
  font-family: "NSG Ekkamai", "Howto Ekkamai", sans-serif !important;
  font-style: normal;
  letter-spacing: 0;
}

.nsg-measure-head h2 [lang="th"],
.nsg-title h2 [lang="th"],
.nsg-shape-copy h3 [lang="th"],
.nsg-template-head h2 [lang="th"] {
  font-weight: 400;
  line-height: 1.04;
}

.nsg-steps strong [lang="th"],
.nsg-template .btn [lang="th"] { font-weight: 700; }

.nsg-measure-head,
.nsg-method-intro,
.nsg-steps,
.nsg-chart-layout { max-width: 1760px; }

.nsg-chart-note {
  display: block !important;
  grid-column: 1 / -1;
  max-width: 900px;
  margin-bottom: 4px;
}
.nsg-chart-note h3 {
  margin: 0 0 8px;
  color: #f4f4f2;
  font-size: clamp(30px, 3vw, 52px);
}
.nsg-chart-note p {
  max-width: 820px;
  color: #aaaab0;
  font-size: clamp(13px, 1vw, 17px);
}

.nsg-chart-art,
.nsg-ruler-art {
  box-sizing: border-box;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 24px;
  background: rgba(255,255,255,.025);
}
.nsg-chart-art img,
.nsg-ruler-art img { filter: drop-shadow(0 22px 28px rgba(0,0,0,.34)); }
.nsg-swipe-hint { display: none; }

@media (min-width: 1100px) {
  .nsg-measure {
    grid-template-columns: minmax(430px, 34%) minmax(0, 66%);
    gap: clamp(38px, 3.8vw, 70px);
    padding: clamp(72px, 5.5vw, 104px) clamp(48px, 5.2vw, 100px) clamp(82px, 6vw, 116px);
  }
  .nsg-measure-head h2 { font-size: clamp(72px, 5.5vw, 104px); }
  .nsg-method-intro figure { width: min(100%, 650px); margin: 12px 0 0; }
  .nsg-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(240px, 1fr));
    align-self: stretch;
    min-height: 610px;
    margin: 0;
    border-radius: 24px;
  }
  .nsg-steps li {
    display: flex;
    min-height: 0;
    flex-direction: column;
    padding: clamp(28px, 2.1vw, 42px);
    border-right: 1px solid #393a40;
    border-bottom: 1px solid #393a40;
    background: rgba(255,255,255,.012);
  }
  .nsg-steps li:nth-child(2n) { border-right: 0; }
  .nsg-steps li:nth-child(n+3) { border-bottom: 0; }
  .nsg-steps b { margin: 0 0 auto; padding-bottom: 42px; font-size: clamp(30px, 2.1vw, 40px); }
  .nsg-steps strong { font-size: clamp(20px, 1.35vw, 26px); }
  .nsg-steps p { max-width: 330px; font-size: clamp(14px, .95vw, 18px); }
  .nsg-chart-layout {
    grid-template-columns: minmax(0, 1.8fr) minmax(370px, .78fr);
    gap: clamp(24px, 3vw, 54px);
    width: min(100%, 1760px);
    margin-top: 54px;
  }
  .nsg-chart-art { padding: clamp(12px, 1.2vw, 22px); }
  .nsg-ruler-art { padding: clamp(12px, 1.2vw, 20px); }
}

@media (min-width: 701px) and (max-width: 1099px) {
  .nsg-measure { display: block; padding: 68px 34px 86px; }
  .nsg-measure-head { margin-bottom: 30px; }
  .nsg-method-intro figure { width: min(76vw, 580px); margin: 0 auto 34px; }
  .nsg-steps {
    grid-template-columns: repeat(2, 1fr);
    width: min(100%, 920px);
    margin: 0 auto 60px;
  }
  .nsg-steps li { min-height: 235px; border-bottom: 1px solid #393a40; }
  .nsg-steps li:nth-child(2n) { border-right: 0; }
  .nsg-steps li:nth-child(n+3) { border-bottom: 0; }
  .nsg-chart-layout { width: min(100%, 920px); }
}

@media (max-width: 700px) {
  .nsg-measure { display: block; padding: 48px 10px 72px; }
  .nsg-measure-head { margin: 0 4px 28px; text-align: center; }
  .nsg-measure-head h2 { font-size: clamp(50px, 14.5vw, 68px); }
  .nsg-method-intro { display: block; margin: 0 0 34px; }
  .nsg-method-intro figure { width: min(100%, 470px); margin: 0 auto; }
  .nsg-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    margin: 0 0 52px;
    border-radius: 18px;
  }
  .nsg-steps li { min-height: 205px; padding: 20px 15px; background: rgba(255,255,255,.012); }
  .nsg-steps b { margin-bottom: 30px; font-size: 27px; }
  .nsg-steps strong { font-size: 15px; line-height: 1.32; }
  .nsg-steps p { font-size: 11.5px; line-height: 1.5; }
  .nsg-chart-layout { display: grid; gap: 22px; width: 100%; margin: 0; }
  .nsg-chart-note { padding: 0 8px; }
  .nsg-chart-note h3 { font-size: 30px; }
  .nsg-chart-note p { font-size: 12px; line-height: 1.55; }
  .nsg-chart-art {
    width: 100%;
    margin: 0;
    padding: 10px 10px 34px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: thin;
  }
  .nsg-chart-art img { width: 700px; max-width: none; }
  .nsg-swipe-hint {
    position: sticky;
    left: 0;
    display: block;
    width: calc(100vw - 42px);
    margin: 10px 0 -22px;
    color: #a9a9ae;
    text-align: center;
    font-size: 11px;
  }
  .nsg-ruler-art { width: 100%; margin: 0; padding: 8px; }
  .nsg-ruler-art img { width: 118%; max-width: none; margin-left: -9%; }
  .nsg-template-head p [lang="th"],
  .size-template-hint [lang="th"] { font-size: 13px; line-height: 1.55; }
}

@media (max-width: 390px) {
  .nsg-steps li { min-height: 190px; padding: 18px 12px; }
  .nsg-steps strong { font-size: 14px; }
  .nsg-steps p { font-size: 10.5px; }
  .nsg-chart-art img { width: 650px; }
}
