/* Xuân Thu Swim "Tìm size của bạn". Brand: orange #E76228, cream #FFF7E9, ink #333, pill buttons. */
.xtfit, .xtfit-drawer, .xtfit-entry, .xtfit-chip {
  --xt-orange: #E76228;
  --xt-orange-deep: #C94E18;
  --xt-orange-soft: #FCE3D5;
  --xt-cream: #FFF7E9;
  --xt-ink: #333333;
  --xt-muted: #7A7068;
  --xt-line: #EEDFCB;
  --xt-white: #FFFFFF;
  --xt-accent: var(--xt-orange);
  font-family: inherit;
  color: var(--xt-ink);
}
.xtfit[data-g="nam"] { --xt-accent: #5E9C3A; }
.xtfit[data-g="be"] { --xt-accent: #1E9AA8; }
.xtfit-lock, .xtfit-lock body { overflow: hidden; }
:where(.xtfit, .xtfit-drawer, .xtfit-chip) button, :where(.xtfit-entry) { text-transform: none; letter-spacing: normal; }
.xtfit h3, .xtfit p, .xtfit ul { font-family: inherit; }
[data-xt-slot] { margin-top: 12px; }

/* entry on the product page */
.xtfit-entry {
  display: flex; align-items: center; gap: 12px; width: 100%;
  margin: 12px 0; padding: 12px 16px; min-height: 56px;
  background: var(--xt-cream); border: 1px solid var(--xt-line); border-radius: 14px;
  font: inherit; text-align: left; cursor: pointer;
  transition: border-color .2s, background .2s;
}
.xtfit-entry:hover { border-color: var(--xt-orange); }
.xtfit-entry:focus-visible { outline: 2px solid var(--xt-orange); outline-offset: 2px; }
.xtfit-entry__ic {
  flex: none; width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center; background: var(--xt-orange); color: var(--xt-white);
}
.xtfit-entry__ic svg { width: 20px; height: 20px; }
.xtfit-entry__t { display: block; font-weight: 600; font-size: 15px; }
.xtfit-entry__s { display: block; font-size: 13px; color: var(--xt-muted); margin-top: 2px; }
.xtfit-entry__go { margin-left: auto; color: var(--xt-orange); font-size: 20px; line-height: 1; }

.xtfit-chip {
  display: inline-flex; align-items: center; gap: 8px; margin: 0 0 10px;
  padding: 6px 6px 6px 12px; border-radius: 50px; background: var(--xt-orange-soft);
  font-size: 13px; font-weight: 600;
}
.xtfit-chip[hidden] { display: none; }
.xtfit-chip button {
  font: inherit; font-weight: 500; font-size: 12px; border: 0; cursor: pointer;
  padding: 4px 10px; border-radius: 50px; background: var(--xt-white); color: var(--xt-orange-deep);
}

/* drawer: bottom sheet on phones, right panel from 768px */
.xtfit-drawer {
  position: fixed; inset: 0; z-index: 9999; background: rgba(51, 51, 51, .38);
  opacity: 0; visibility: hidden; transition: opacity .25s, visibility .25s;
}
.xtfit-drawer.is-open { opacity: 1; visibility: visible; }
.xtfit-drawer__box {
  position: absolute; left: 0; right: 0; bottom: 0; max-height: 92vh; max-height: 92dvh;
  display: flex; flex-direction: column;
  background: var(--xt-cream); border-radius: 22px 22px 0 0;
  transform: translateY(24px); transition: transform .25s ease;
  box-shadow: 0 -12px 40px rgba(0, 0, 0, .12);
}
.xtfit-drawer.is-open .xtfit-drawer__box { transform: none; }
.xtfit-drawer__head {
  display: flex; align-items: center; gap: 12px; padding: 18px 20px 12px;
  border-bottom: 1px solid var(--xt-line);
  background:
    radial-gradient(120% 140% at 100% 0, rgba(231, 98, 40, .14), transparent 55%),
    var(--xt-cream);
  border-radius: 22px 22px 0 0;
}
.xtfit-drawer__title { margin: 0; font-size: 20px; font-weight: 700; color: var(--xt-orange); letter-spacing: .01em; }
.xtfit-drawer__x {
  margin-left: auto; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--xt-line);
  background: var(--xt-white); color: var(--xt-ink); font-size: 22px; line-height: 1; cursor: pointer;
}
.xtfit-drawer__body { overflow-y: auto; padding: 16px 20px 28px; -webkit-overflow-scrolling: touch; }
@media (min-width: 768px) {
  .xtfit-drawer__box {
    left: auto; top: 0; width: 480px; max-height: none; border-radius: 22px 0 0 22px;
    transform: translateX(32px);
  }
  .xtfit-drawer__head { border-radius: 22px 0 0 0; padding: 22px 28px 14px; }
  .xtfit-drawer__body { padding: 20px 28px 36px; }
}

/* panel */
.xtfit { display: block; font-size: 15px; line-height: 1.45; }
.xtfit * { box-sizing: border-box; }
.xtfit__tabs {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px;
  background: var(--xt-white); border: 1px solid var(--xt-line); border-radius: 50px; margin-bottom: 18px;
}
.xtfit__tab {
  font: inherit; font-weight: 600; font-size: 15px; min-height: 44px; border: 0; border-radius: 50px;
  background: transparent; color: var(--xt-muted); cursor: pointer; transition: background .2s, color .2s;
}
.xtfit__tab[aria-selected="true"] { background: var(--xt-accent); color: var(--xt-white); }
.xtfit__tab:focus-visible, .xtfit__pill:focus-visible, .xtfit__go:focus-visible, .xtfit__pick:focus-visible {
  outline: 2px solid var(--xt-ink); outline-offset: 2px;
}

.xtfit__step {
  background: var(--xt-white); border: 1px solid var(--xt-line); border-radius: 16px;
  padding: 16px; margin-bottom: 12px;
}
.xtfit__h { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; font-size: 16px; font-weight: 700; }
.xtfit__n {
  display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
  background: var(--xt-orange-soft); color: var(--xt-orange-deep); font-size: 12px; font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.xtfit[data-g="nam"] .xtfit__n { background: #E5F1DC; color: #477A2A; }
.xtfit[data-g="be"] .xtfit__n { background: #D8F1F3; color: #16757F; }
.xtfit__hint { margin: -6px 0 12px; font-size: 13px; color: var(--xt-muted); }
.xtfit__field .xtfit__hint { margin: 6px 0 0; }

.xtfit__row { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 10px; }
.xtfit__label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.xtfit__input {
  display: flex; align-items: center; min-height: 48px; padding: 0 12px;
  background: var(--xt-cream); border: 1.5px solid var(--xt-line); border-radius: 12px;
  transition: border-color .2s, background .2s;
}
.xtfit__input:focus-within { border-color: var(--xt-accent); background: var(--xt-white); }
.xtfit__input input {
  flex: 1; min-width: 0; width: 100%; border: 0; background: transparent; outline: 0;
  font: inherit; font-size: 18px; font-weight: 600; color: var(--xt-ink); padding: 10px 0;
  font-variant-numeric: tabular-nums;
}
.xtfit__unit { font-size: 13px; color: var(--xt-muted); margin-left: 6px; }

.xtfit__scan { display: grid; grid-template-columns: 104px 1fr; gap: 14px; align-items: start; }
.xtfit__map {
  position: relative; border-radius: 14px; padding: 10px 4px 4px;
  background: radial-gradient(90% 60% at 50% 100%, #DDF2F4, transparent 70%), var(--xt-cream);
}
.xtfit__map svg { display: block; width: 100%; height: auto; overflow: visible; }
.xtfit__map .xtfit__suit { fill: #F3B59A; }
.xtfit__map .xtfit__strap { stroke: #F3B59A; }
.xtfit__map .xtfit__water { opacity: 1; animation: xtfit-wave 2.4s linear infinite; }
.xtfit__line ellipse { fill: none; stroke: #E9C9B3; stroke-width: 1.6; stroke-dasharray: 2.5 2.5; transition: stroke .2s, stroke-width .2s; }
.xtfit__line.is-set ellipse { stroke: var(--xt-accent); stroke-dasharray: none; stroke-width: 1.8; }
.xtfit__line.is-focus ellipse { stroke: var(--xt-accent); stroke-width: 2.4; stroke-dasharray: 4 2.5; animation: xtfit-dash 1s linear infinite; }
@keyframes xtfit-dash { to { stroke-dashoffset: -13; } }
.xtfit__col { display: grid; gap: 10px; }
.xtfit__how { margin: 0; font-size: 13px; color: var(--xt-muted); min-height: 38px; }

.xtfit__choice + .xtfit__choice { margin-top: 14px; }
.xtfit__q { margin: 0 0 8px; font-size: 14px; font-weight: 600; }
.xtfit__pills { display: flex; flex-wrap: wrap; gap: 8px; }
.xtfit__pill {
  font: inherit; font-size: 14px; min-height: 44px; padding: 0 16px; border-radius: 50px; cursor: pointer;
  background: var(--xt-white); color: var(--xt-ink); border: 1.5px solid var(--xt-line);
  transition: background .2s, border-color .2s, color .2s;
}
.xtfit__pill[aria-checked="true"] { background: var(--xt-accent); border-color: var(--xt-accent); color: var(--xt-white); }
.xtfit__pills.is-sizes .xtfit__pill { min-width: 52px; padding: 0 10px; border-radius: 8px; font-weight: 600; }

.xtfit__go, .xtfit__pick {
  display: block; width: 100%; min-height: 52px; margin: 16px 0 4px; border: 0; border-radius: 50px; cursor: pointer;
  font: inherit; font-size: 16px; font-weight: 700; letter-spacing: .02em;
  background: var(--xt-orange); color: var(--xt-white); box-shadow: 0 6px 18px rgba(231, 98, 40, .28);
  transition: background .2s, transform .2s;
}
.xtfit__go:hover, .xtfit__pick:hover { background: var(--xt-orange-deep); }
.xtfit__go:active, .xtfit__pick:active { transform: scale(.99); }

/* belly shape cards */
.xtfit__shapes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.xtfit__shape {
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 6px 10px; min-height: 44px;
  font: inherit; color: var(--xt-ink); cursor: pointer; text-align: center;
  background: var(--xt-white); border: 1.5px solid var(--xt-line); border-radius: 14px;
  transition: border-color .2s, background .2s;
}
.xtfit__shape svg { width: 64px; height: 90px; margin-bottom: 2px; overflow: visible; }
.xtfit__skin { fill: #F7D5BE; }
.xtfit__skin-line { fill: none; stroke: #F7D5BE; stroke-width: 7; stroke-linecap: round; }
.xtfit__skin-line.is-leg { stroke-width: 9; }
.xtfit__hair { fill: #4A3328; }
.xtfit__bow { fill: var(--xt-orange); }
.xtfit__eye { fill: none; stroke: #4A3328; stroke-width: 1.6; stroke-linecap: round; }
.xtfit__cheek { fill: #F6A38E; opacity: .7; }
.xtfit__suit { fill: #F3B59A; transition: fill .25s; }
.xtfit__trim { fill: none; stroke: #FFF7E9; stroke-width: 2; stroke-linecap: round; }
.xtfit__shine { fill: #fff; opacity: .16; }
.xtfit__strap { fill: none; stroke: #F3B59A; stroke-width: 2.4; stroke-linecap: round; transition: stroke .25s; }
.xtfit__shape[aria-checked="true"] .xtfit__strap { stroke: var(--xt-accent); }
.xtfit__water { fill: none; stroke: #BFE6EA; stroke-width: 3; stroke-linecap: round; opacity: 0; transition: opacity .25s; }
.xtfit__fig { transform-box: fill-box; transform-origin: 50% 100%; }
.xtfit__shape:hover .xtfit__fig { animation: xtfit-hop .5s ease; }
.xtfit__shape[aria-checked="true"] { border-color: var(--xt-accent); background: var(--xt-cream); }
.xtfit__shape[aria-checked="true"] .xtfit__suit { fill: var(--xt-accent); }
.xtfit__shape[aria-checked="true"] .xtfit__water { opacity: 1; animation: xtfit-wave 1.6s linear infinite; }
.xtfit__shape[aria-checked="true"] .xtfit__fig { animation: xtfit-bob 1.8s ease-in-out infinite; }
@keyframes xtfit-bob { 50% { transform: translateY(-3px) rotate(-1.5deg); } }
@keyframes xtfit-hop { 40% { transform: translateY(-5px); } }
@keyframes xtfit-wave { to { stroke-dashoffset: -32; } }
.xtfit__water { stroke-dasharray: 10 6; }
.xtfit__shape:focus-visible { outline: 2px solid var(--xt-ink); outline-offset: 2px; }
.xtfit__sn { font-size: 14px; font-weight: 600; }

/* results */
.xtfit__out { scroll-margin-top: 12px; }
.xtfit__out:empty { display: none; }
.xtfit__rt { margin: 22px 0 12px; font-size: 18px; font-weight: 700; }
.xtfit__empty { margin: 16px 0 0; padding: 14px 16px; border-radius: 14px; background: var(--xt-orange-soft); font-size: 14px; }
.xtfit__cards { display: grid; gap: 12px; }
.xtfit__card {
  position: relative; padding: 16px; border-radius: 18px; background: var(--xt-white); border: 1px solid var(--xt-line);
  animation: xtfit-in .3s ease both; animation-delay: calc(var(--i, 0) * 70ms);
}
.xtfit__card.is-main { border: 2px solid var(--xt-accent); box-shadow: 0 10px 28px rgba(231, 98, 40, .12); }
@keyframes xtfit-in { from { opacity: 0; transform: translateY(6px); } }
.xtfit__ch { display: flex; align-items: center; gap: 8px; }
.xtfit__pn { font-size: 14px; font-weight: 600; color: var(--xt-muted); }
.xtfit__tag { margin-left: auto; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 50px; background: var(--xt-accent); color: var(--xt-white); }
.xtfit__top { display: flex; align-items: center; gap: 16px; margin-top: 6px; }
.xtfit__big { margin: 0; font-size: 48px; line-height: 1.05; font-weight: 800; color: var(--xt-accent); letter-spacing: -.01em; min-width: 72px; }
.xtfit__big.is-none { font-size: 24px; color: var(--xt-ink); }
.xtfit__meta { display: grid; gap: 4px; }
.xtfit__conf { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; }
.xtfit__conf i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.xtfit__conf.is-cao { color: #3E8A3A; }
.xtfit__conf.is-vua { color: #B7791F; }
.xtfit__conf.is-thap { color: #B4472B; }
.xtfit__basis { font-size: 13px; color: var(--xt-muted); }

.xtfit__gauge {
  position: relative; display: grid; grid-template-columns: repeat(var(--n), 1fr);
  margin: 14px 0 4px; padding-top: 14px;
}
.xtfit__gauge::before {
  content: ""; position: absolute; left: 0; right: 0; top: 4px; height: 4px; border-radius: 4px;
  background: linear-gradient(90deg, var(--xt-orange-soft), var(--xt-line));
}
.xtfit__tick { text-align: center; font-size: 12px; font-weight: 600; color: var(--xt-muted); padding-top: 4px; }
.xtfit__tick.is-on { color: var(--xt-accent); font-weight: 800; }
.xtfit__tick.is-alt { color: var(--xt-ink); }
.xtfit__dot {
  position: absolute; top: 0; width: 12px; height: 12px; border-radius: 50%;
  background: var(--xt-accent); box-shadow: 0 0 0 4px rgba(231, 98, 40, .2);
  left: calc((var(--at) + .5) / var(--n) * 100% - 6px); transition: left .3s ease;
}
.xtfit__notes { margin: 10px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.xtfit__notes li { position: relative; padding-left: 16px; font-size: 13.5px; }
.xtfit__notes li::before { content: ""; position: absolute; left: 2px; top: .6em; width: 6px; height: 6px; border-radius: 50%; background: var(--xt-accent); }
.xtfit__note { margin: 8px 0 0; font-size: 14px; }
.xtfit__pick { margin-top: 14px; min-height: 48px; font-size: 15px; }
.xtfit__pick.is-done { background: #3E8A3A; box-shadow: none; }

.xtfit__advice {
  position: relative; margin-top: 14px; padding: 14px 16px; border-radius: 16px;
  background: var(--xt-orange-soft); font-size: 13.5px;
}
.xtfit__advice { border: 1.5px solid #F0B595; }
.xtfit__advice-h { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.xtfit__advice p { margin: 8px 0 0; }
.xtfit__advice .xtfit__ask { font-weight: 600; margin-bottom: 10px; }
.xtfit__ref {
  margin: -4px 0 12px; padding: 8px 12px 8px 34px; position: relative; border-radius: 12px;
  background: var(--xt-orange-soft); font-size: 13px; font-weight: 600; color: var(--xt-orange-deep);
}
.xtfit__ref::before {
  content: "i"; position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
  width: 17px; height: 17px; border-radius: 50%; background: var(--xt-orange); color: var(--xt-white);
  font: italic 700 11px/17px Georgia, serif; text-align: center;
}
.xtfit__picknote { margin: 6px 0 0; text-align: center; font-size: 12px; color: var(--xt-muted); }
.xtfit__new {
  display: inline-block; padding: 2px 10px; border-radius: 50px; font-size: 11.5px; font-weight: 700;
  background: var(--xt-orange); color: var(--xt-white); letter-spacing: .04em;
}
.xtfit__contacts { display: flex; flex-wrap: wrap; gap: 8px; }
.xtfit__contact {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 50px;
  background: var(--xt-white); color: var(--xt-orange-deep); font-weight: 600; font-size: 13px; text-decoration: none;
  border: 1px solid #F4C9B2;
}
.xtfit__contact:hover { border-color: var(--xt-orange); }
.xtfit-entry__new { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 50px; font-size: 11px; font-weight: 700; background: var(--xt-orange); color: var(--xt-white); vertical-align: 2px; }
.xtfit__keep { display: flex; gap: 10px; align-items: flex-start; margin: 16px 0 6px; font-size: 14px; cursor: pointer; }
.xtfit__keep input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--xt-orange); flex: none; }
.xtfit__privacy { margin: 6px 0 0; font-size: 12.5px; color: var(--xt-muted); }
.xtfit__link { font: inherit; border: 0; background: none; padding: 0; color: var(--xt-orange-deep); text-decoration: underline; cursor: pointer; }

.xtfit__chart { margin-top: 18px; border-top: 1px solid var(--xt-line); padding-top: 12px; }
.xtfit__chart summary { cursor: pointer; font-weight: 600; font-size: 14px; color: var(--xt-orange-deep); min-height: 32px; display: flex; align-items: center; }
.xtfit__chart table { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 13.5px; background: var(--xt-white); border-radius: 12px; overflow: hidden; }
.xtfit__chart th { background: var(--xt-orange-soft); font-weight: 700; padding: 8px 6px; }
.xtfit[data-g="nam"] .xtfit__chart th { background: #E5F1DC; }
.xtfit[data-g="be"] .xtfit__chart th { background: #D8F1F3; }
.xtfit__chart td { text-align: center; padding: 7px 6px; border-top: 1px solid var(--xt-line); font-variant-numeric: tabular-nums; }
.xtfit__chart td:first-child { font-weight: 700; }

@media (prefers-reduced-motion: reduce) {
  .xtfit-drawer, .xtfit-drawer__box, .xtfit__card, .xtfit__dot { transition: none; animation: none; }
  .xtfit__line.is-focus ellipse { animation: none; }
  .xtfit__fig, .xtfit__water, .xtfit__map .xtfit__water, .xtfit__shape:hover .xtfit__fig, .xtfit__shape[aria-checked="true"] .xtfit__fig { animation: none; }
}
