.fit-profile { margin: 16px 0 22px; padding: 14px 16px; border: 1px solid var(--line); background: #f6f3eb; }
.body-profile-picker { min-width: 0; margin: 0; padding: 0; border: 0; }
.body-profile-picker legend { padding: 0; font: 600 18px/1.35 var(--serif); color: var(--green); }
.body-profile-picker > p { margin: 4px 0 12px; color: #4f5e54; }
.measurement-units { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; margin: 0 0 12px; font-weight: 600; color: var(--green); }
.measurement-units select { min-height: 44px; max-width: 100%; padding: 7px 12px; border: 1px solid #bac6ba; background: var(--white); color: var(--green); font: inherit; }
.fit-estimate-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px; max-width: 460px; }
.fit-estimate-fields .field { min-width: 0; }
.fit-estimate-fields input { width: 100%; min-height: 44px; font-size: 16px; }
.fit-estimate-fields input:invalid { border-color: #9e4937; }
[data-profile-estimate] { padding-top: 9px; font-weight: 600; }
.manual-body-profile { border-top: 1px solid var(--line); margin-top: 8px; }
.body-profile-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.body-profile-grid label { position: relative; cursor: pointer; }
.body-profile-grid input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.body-profile-card {
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 100%;
  background: #faf8f3;
  color: var(--green);
  border: 1px solid #bec7b9;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
}
.body-profile-photo {
  display: block;
  width: 100%;
  height: clamp(166px, 16vw, 230px);
  object-fit: contain;
  background: #eee8de;
}
.body-profile-label {
  display: grid;
  place-items: center;
  min-height: 44px;
  padding: 7px 8px;
  overflow-wrap: anywhere;
  text-wrap: balance;
}
.body-profile-grid label:hover .body-profile-card,
.body-profile-grid input:checked + .body-profile-card { border-color: var(--green); }
.body-profile-grid input:checked + .body-profile-card .body-profile-label { background: var(--green); color: #fff; }
.body-profile-grid input:focus-visible + .body-profile-card { outline: 3px solid #a17a37; outline-offset: 2px; }
.manual-body-profile button { min-height: 44px; margin-top: 4px; }
.shop-fit p.fit-recommendation-line { color: var(--green); font-weight: 650; }
.shop-fit [hidden] { display: none; }
.shop-fit-visuals {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.shop-fit-visuals:has(> figure[hidden]),
.shop-fit-visuals:has(> figure:only-child) { grid-template-columns: minmax(0, 1fr); }
.body-fit-comparison,
.trouser-fit-preview {
  display: grid;
  align-content: start;
  justify-items: stretch;
  gap: 10px;
  min-width: 0;
  margin: 0;
  padding: 12px;
  background: #f5f1e9;
  border: 1px solid #d8dace;
}
.trouser-fit-preview[hidden] { display: none; }
.outfit-photo {
  position: relative;
  width: 100%;
  max-width: 224px;
  margin-inline: auto;
  background: #e9e5da;
}
.outfit-canvas { display: block; width: 100%; height: auto; }
.outfit-photo-error { display: none; }
.outfit-photo:has([data-preview-status="unavailable"]) .outfit-photo-error {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  padding: 12px;
  text-align: center;
}
.trouser-fit-preview figcaption { color: #4f5e54; font-size: 14px; line-height: 1.45; }
.trouser-fit-preview strong { display: block; color: var(--green); font-size: 16px; }
.trouser-fit-preview figcaption p { margin: 6px 0; }
.trouser-fit-preview small { display: block; font-size: 13px; }
.config-body .trouser-fit-preview { margin-top: 12px; grid-template-columns: min(37%, 160px) minmax(0, 1fr); align-items: center; gap: 14px; }
.body-fit-frame { min-width: 0; }
.body-fit-frame [hidden] { display: none; }
.outfit-photo-grid { display: grid; gap: 6px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.outfit-cut-label { display: block; padding: 6px 2px; text-align: center; font-size: 12px; font-weight: 600; }
.body-fit-comparison figcaption { color: #4f5e54; font-size: 14px; }
.body-fit-comparison figcaption strong { display: block; color: var(--green); font-size: 16px; }
.body-fit-comparison figcaption p { margin: 6px 0 0; line-height: 1.45; }
.body-fit-comparison button { min-height: 44px; margin-top: 3px; }
.shirt-fit-controls { margin-top: 16px; }
.shirt-fit-controls fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.shirt-fit-controls legend { margin-bottom: 8px; font-size: 14px; font-weight: 600; color: var(--green); }
.shirt-fit-controls p { margin: 8px 0 0; font-size: 14px; line-height: 1.5; }
.shirt-fit-controls p:empty, .trouser-fit-preview figcaption :empty { display: none; }
.shirt-fit-controls button { min-height: 44px; }
.shop-fit .outfit-preview-note { margin: 10px 0 0; font-size: 13px; color: #4f5e54; }

@media (max-width: 520px) {
  .body-profile-grid { gap: 6px; }
  .body-profile-card { font-size: 12px; }
  .body-profile-photo { height: clamp(126px, 39vw, 181px); }
  .body-profile-label { padding-inline: 4px; }
  .shop-fit-visuals { grid-template-columns: minmax(0, 1fr); }
}
