:root {
  color-scheme: light;
  --paper: #f5f3ef;
  --card: #ffffff;
  --ink: #1b1a18;
  --muted: #706c67;
  --line: #ded9d2;
  --sand: #b39a84;
  --sand-soft: #f2ebe4;
  --green: #426151;
  --green-soft: #edf3ef;
  --warning: #76531d;
  --warning-soft: #fbf2df;
  --danger: #813f38;
  --danger-soft: #f8e8e5;
  --shadow: 0 28px 80px rgba(37, 31, 24, 0.09);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 18% 8%, rgba(179, 154, 132, 0.12), transparent 28rem),
    #11110f;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }

.topbar {
  width: min(100%, 760px);
  min-height: 58px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
}

.brand { color: #fff; font-size: 21px; font-weight: 790; letter-spacing: 0.17em; }
.brand span { color: var(--sand); }

.private-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #d3cec8;
  font-size: 12px;
  font-weight: 650;
}

.private-pill svg, .privacy-note svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
}

.page-shell { width: min(100%, 760px); margin: 0 auto 32px; }

.recommender-card {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0 0 24px 24px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.intro {
  padding: 44px 44px 34px;
  background:
    radial-gradient(circle at 88% 5%, rgba(179, 154, 132, 0.2), transparent 18rem),
    #171614;
  color: #fff;
}

.eyebrow, .context-label, .result-eyebrow {
  display: block;
  margin: 0 0 10px;
  color: #bfa58f;
  font-size: 11px;
  font-weight: 780;
  letter-spacing: 0.15em;
}

h1, h2, p { margin-top: 0; }

h1 {
  max-width: 590px;
  margin-bottom: 16px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(38px, 6.2vw, 58px);
  font-weight: 400;
  letter-spacing: -0.045em;
  line-height: 1.02;
}

.intro-copy {
  max-width: 570px;
  margin-bottom: 0;
  color: #c9c4be;
  font-size: 17px;
  line-height: 1.65;
}
.intro-copy strong { color: #fff; font-weight: 700; }

.product-context {
  margin: 28px 44px 0;
  padding: 18px 20px;
  border: 1px solid #d8e3dc;
  border-radius: 16px;
  background: var(--green-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.product-context strong { display: block; font-size: 16px; line-height: 1.35; }
.product-context small { display: block; margin-top: 3px; color: #65756c; font-size: 12px; }
.context-label { margin-bottom: 4px; color: var(--green); font-size: 10px; }

.verified-badge {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--green);
  font-size: 12px;
  font-weight: 730;
}

.verified-badge i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(66, 97, 81, 0.1);
}
.verified-badge.is-blocked { color: var(--danger); }
.verified-badge.is-blocked i { background: var(--danger); box-shadow: 0 0 0 4px rgba(129, 63, 56, 0.1); }

.size-form { padding: 26px 44px 38px; }
.method-picker { margin: 0 0 28px; padding: 0; border: 0; }
.method-picker legend { margin-bottom: 11px; padding: 0; font-size: 16px; font-weight: 780; }
.method-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.method-options label { position: relative; cursor: pointer; }
.method-options input { position: absolute; opacity: 0; pointer-events: none; }
.method-options span {
  min-height: 104px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  display: grid;
  grid-template-columns: 32px 1fr;
  grid-template-rows: auto auto;
  column-gap: 10px;
  align-content: center;
  background: #fff;
  transition: border-color 150ms ease, background-color 150ms ease, box-shadow 150ms ease;
}
.method-options svg {
  width: 30px;
  height: 30px;
  grid-row: 1 / 3;
  align-self: center;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.45;
}
.method-options strong { align-self: end; font-size: 14px; }
.method-options small { margin-top: 2px; color: var(--muted); font-size: 12px; }
.method-options input:checked + span {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
  box-shadow: 0 8px 24px rgba(27, 26, 24, 0.14);
}
.method-options input:checked + span small { color: #d2cec8; }
.method-options input:focus-visible + span { outline: 3px solid rgba(179, 154, 132, 0.42); outline-offset: 2px; }

.garment-notice {
  margin: -6px 0 26px;
  padding: 17px 18px;
  border: 1px solid #dac7b8;
  border-radius: 15px;
  background: var(--sand-soft);
  color: #5f5147;
  font-size: 13px;
}
.garment-notice > strong { display: block; margin-bottom: 4px; color: var(--ink); font-size: 14px; }
.garment-notice p { margin-bottom: 7px; }
.garment-notice ul { margin: 0; padding-left: 18px; }
.garment-notice li + li { margin-top: 3px; }
.form-heading { margin-bottom: 20px; }
.form-heading h2 { margin-bottom: 4px; font-size: 21px; line-height: 1.25; }
.form-heading p { margin-bottom: 0; color: var(--muted); font-size: 14px; }

.measure-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.measure-field { display: flex; flex-direction: column; gap: 8px; }
.measure-field > span:first-child { font-size: 14px; font-weight: 740; }
.input-wrap { position: relative; display: block; }

.input-wrap input {
  width: 100%;
  height: 60px;
  padding: 0 54px 0 17px;
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: none;
  background: #fff;
  color: var(--ink);
  font-size: 19px;
  font-weight: 690;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.input-wrap input::placeholder { color: #aaa49d; font-weight: 500; }
.input-wrap input:focus { border-color: var(--ink); box-shadow: 0 0 0 4px rgba(27, 26, 24, 0.08); }
.input-wrap small { position: absolute; top: 18px; right: 17px; color: var(--muted); font-size: 14px; }

.measure-reminder {
  margin: 15px 0 0;
  padding: 12px 14px;
  border-left: 3px solid var(--sand);
  background: #faf8f5;
  color: var(--muted);
  font-size: 13px;
}
.measure-reminder strong { color: var(--ink); }

.measure-help { margin: 22px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.measure-help summary {
  min-height: 56px;
  padding: 12px 2px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  list-style: none;
  font-size: 14px;
  font-weight: 720;
}
.measure-help summary::-webkit-details-marker { display: none; }
.help-icon {
  width: 24px;
  height: 24px;
  border: 1px solid var(--line);
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  color: var(--muted);
  font-size: 12px;
}
.chevron {
  width: 9px;
  height: 9px;
  margin-left: auto;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 160ms ease;
}
.measure-help[open] .chevron { transform: rotate(225deg) translate(-2px, -2px); }

.help-content {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 22px;
  align-items: center;
  padding: 2px 0 22px;
}
.help-content img { width: 100%; height: auto; display: block; border-radius: 12px; background: #faf9f7; }
.help-content.garment-help img { max-height: 380px; object-fit: contain; }
.help-copy { color: var(--muted); font-size: 13px; }
.help-copy p { margin-bottom: 14px; }
.help-copy p:last-child { margin-bottom: 0; }
.help-copy strong { color: var(--ink); }
.help-copy .tape-note { padding-top: 12px; border-top: 1px solid var(--line); color: var(--ink); font-size: 12px; }

.form-error {
  margin: 0 0 16px;
  padding: 13px 15px;
  border: 1px solid #efd0cb;
  border-radius: 12px;
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 13px;
  line-height: 1.5;
}

.primary-button, .secondary-button, .product-button {
  min-height: 58px;
  border-radius: 14px;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms ease, background-color 160ms ease;
}

.primary-button {
  width: 100%;
  padding: 0 20px;
  border: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--ink);
  color: #fff;
}
.primary-button:hover { background: #36332f; transform: translateY(-1px); }
.primary-button:focus-visible, .secondary-button:focus-visible, .product-button:focus-visible {
  outline: 3px solid rgba(179, 154, 132, 0.45);
  outline-offset: 3px;
}

.privacy-note {
  margin: 12px 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.result-card {
  margin: 34px 44px 44px;
  padding: 36px;
  overflow: hidden;
  position: relative;
  border-radius: 22px;
  background: var(--ink);
  color: #fff;
}
.result-card::after {
  content: "";
  position: absolute;
  right: -90px;
  top: -100px;
  width: 260px;
  height: 260px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
}
.result-inner { position: relative; z-index: 1; }
.result-eyebrow { color: #ccb8a7; }
.result-title { margin-bottom: 6px; font-family: Georgia, "Times New Roman", serif; font-size: 29px; font-weight: 400; }
.size-result { margin: 0 0 20px; display: flex; align-items: baseline; gap: 14px; }
.size-result span { color: #cbc6c0; font-size: 18px; }
.size-result strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(76px, 15vw, 104px);
  font-weight: 400;
  letter-spacing: -0.07em;
  line-height: 0.95;
}
.result-explanation {
  margin-bottom: 18px;
  padding: 17px 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.055);
}
.result-explanation.is-between {
  border-color: rgba(231, 196, 132, 0.38);
  background: rgba(231, 196, 132, 0.13);
}
.result-explanation > strong { display: block; margin-bottom: 7px; color: #fff; font-size: 15px; }
.result-explanation p { margin: 0; color: #e8e3dd; font-size: 14px; line-height: 1.55; }

.fit-result-note {
  margin-bottom: 18px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(204, 184, 167, 0.12);
  color: #ddd2c9;
  font-size: 13px;
  line-height: 1.55;
}
.fit-result-note strong { display: block; margin-bottom: 3px; color: #fff; }

.method-note {
  margin: 0 0 17px;
  padding: 13px 15px;
  border-left: 3px solid #ccb8a7;
  background: rgba(204, 184, 167, 0.09);
  color: #d8d0c8;
  font-size: 12px;
  line-height: 1.55;
}
.method-note strong { color: #fff; }

.fit-guarantee {
  margin-bottom: 18px;
  padding: 15px 16px;
  display: flex;
  align-items: flex-start;
  gap: 11px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  background: #f4f0eb;
  color: #171614;
  font-size: 13px;
  line-height: 1.55;
}
.fit-guarantee-icon {
  width: 25px;
  height: 25px;
  flex: 0 0 25px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #171614;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
}
.fit-guarantee p { margin: 0; }
.fit-guarantee strong { display: block; font-size: 14px; }
.calculation-note { margin: 0 0 19px; color: #aba59e; font-size: 12px; line-height: 1.5; }
.result-actions { display: grid; grid-template-columns: 1fr; gap: 10px; }
.product-button, .secondary-button {
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 15px;
}
.product-button { background: #fff; color: var(--ink); }
.secondary-button { border: 1px solid rgba(255, 255, 255, 0.25); background: transparent; color: #fff; }
.secondary-button:hover { background: rgba(255, 255, 255, 0.08); }

.result-card.issue { background: #392f29; }
.result-card.issue .result-title { max-width: 500px; }
.issue-list { margin: 16px 0 23px; padding-left: 19px; color: #e2d8d0; font-size: 14px; }

.blocked-product {
  margin: 30px 44px 44px;
  padding: 24px;
  border: 1px solid #ead2cd;
  border-radius: 16px;
  background: var(--danger-soft);
  color: var(--danger);
}
.blocked-product strong { display: block; margin-bottom: 7px; color: #672f2a; font-size: 18px; }
.blocked-product p { margin-bottom: 0; font-size: 14px; line-height: 1.6; }
.blocked-product a { display: inline-block; margin-top: 14px; color: inherit; font-size: 13px; font-weight: 750; }
.legal-note { margin: 16px auto 0; max-width: 620px; color: #8e8983; font-size: 11px; text-align: center; }
[hidden] { display: none !important; }

@media (max-width: 640px) {
  body { background: #11110f; }
  .topbar { width: 100%; min-height: 54px; padding: 0 20px; }
  .brand { font-size: 19px; }
  .private-pill { font-size: 11px; }
  .page-shell { width: 100%; margin: 0; }
  .recommender-card { border: 0; border-radius: 0; box-shadow: none; }
  .intro { padding: 30px 20px 26px; }
  h1 { font-size: 39px; }
  .intro-copy { font-size: 16px; }
  .product-context { margin: 22px 20px 0; padding: 15px 16px; align-items: flex-start; flex-direction: column; gap: 8px; }
  .verified-badge { font-size: 11px; }
  .size-form { padding: 22px 20px 32px; }
  .method-options span { min-height: 112px; padding: 13px; grid-template-columns: 1fr; grid-template-rows: auto auto auto; text-align: center; }
  .method-options svg { width: 27px; height: 27px; margin: 0 auto 7px; grid-row: auto; }
  .method-options strong { font-size: 13px; }
  .measure-grid { gap: 10px; }
  .input-wrap input { height: 58px; padding-left: 14px; }
  .help-content { grid-template-columns: 1fr; gap: 16px; }
  .help-content img { width: min(100%, 330px); margin: 0 auto; }
  .primary-button { min-height: 60px; }
  .result-card { margin: 28px 20px 34px; padding: 28px 22px; }
  .result-actions { grid-template-columns: 1fr; }
  .product-button, .secondary-button { min-height: 54px; }
  .blocked-product { margin: 26px 20px 34px; }
  .legal-note { padding: 0 24px 24px; }
}

@media (max-width: 370px) {
  .measure-grid { grid-template-columns: 1fr; }
}

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