:root {
  color-scheme: light;
  --ink: #17211d;
  --muted: #66726c;
  --paper: #faf8f3;
  --panel: #ffffff;
  --line: #ded8ce;
  --rose: #c76e7e;
  --moss: #466b57;
  --teal: #1d7a78;
  --gold: #c5923d;
  --plum: #73506c;
  --blue: #326b9a;
  --shadow: 0 18px 48px rgba(45, 35, 27, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    linear-gradient(120deg, rgba(199, 110, 126, 0.14), transparent 36%),
    linear-gradient(240deg, rgba(29, 122, 120, 0.12), transparent 34%),
    var(--paper);
}

button,
select,
textarea,
a {
  font: inherit;
}

.app-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 48px;
}

.hero {
  min-height: min(680px, calc(100vh - 36px));
  display: grid;
  grid-template-columns: 1fr minmax(320px, 460px);
  gap: 32px;
  align-items: center;
  padding: 28px 0 38px;
}

.hero-copy {
  max-width: 680px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--teal);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 18px;
  font-size: clamp(3rem, 8vw, 6.5rem);
  line-height: 0.92;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: 1.1rem;
  line-height: 1.25;
  letter-spacing: 0;
}

.hero-copy p:last-child {
  max-width: 560px;
  color: #4f5b55;
  font-size: 1.08rem;
  line-height: 1.7;
}

.fit-stage {
  position: relative;
  min-height: 480px;
  border: 1px solid rgba(70, 107, 87, 0.26);
  border-radius: 8px;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.15)),
    repeating-linear-gradient(90deg, rgba(23, 33, 29, 0.055) 0 1px, transparent 1px 68px),
    #efe8dc;
  box-shadow: var(--shadow);
}

.wardrobe-rail {
  position: absolute;
  inset: 46px 42px auto;
  height: 120px;
  border-top: 5px solid rgba(23, 33, 29, 0.62);
  display: flex;
  justify-content: space-around;
  padding-top: 14px;
}

.wardrobe-rail span {
  width: 48px;
  height: 86px;
  border-radius: 26px 26px 8px 8px;
  background: var(--rose);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.wardrobe-rail span:nth-child(2) {
  height: 104px;
  background: var(--moss);
}

.wardrobe-rail span:nth-child(3) {
  height: 94px;
  background: var(--gold);
}

.wardrobe-rail span:nth-child(4) {
  height: 112px;
  background: var(--plum);
}

.mannequin {
  position: absolute;
  left: 50%;
  bottom: 28px;
  width: 190px;
  height: 365px;
  transform: translateX(-50%);
}

.head,
.neck,
.top,
.waist,
.bottom,
.shoe-left,
.shoe-right {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.head {
  top: 0;
  width: 54px;
  height: 58px;
  border-radius: 50%;
  background: #d8b49b;
}

.neck {
  top: 52px;
  width: 28px;
  height: 30px;
  background: #d8b49b;
}

.top {
  top: 72px;
  width: 132px;
  height: 112px;
  clip-path: polygon(20% 0, 80% 0, 100% 100%, 0 100%);
  background: var(--rose);
  border-radius: 8px 8px 2px 2px;
}

.waist {
  top: 176px;
  width: 104px;
  height: 12px;
  border-radius: 99px;
  background: rgba(23, 33, 29, 0.72);
}

.bottom {
  top: 188px;
  width: 146px;
  height: 148px;
  clip-path: polygon(10% 0, 90% 0, 74% 100%, 26% 100%);
  background: var(--moss);
  border-radius: 2px 2px 12px 12px;
}

.shoe-left,
.shoe-right {
  bottom: 0;
  width: 58px;
  height: 18px;
  border-radius: 99px 99px 8px 8px;
  background: #202522;
}

.shoe-left {
  margin-left: -34px;
}

.shoe-right {
  margin-left: 34px;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(280px, 380px) 1fr;
  gap: 18px;
  align-items: start;
}

.panel,
.recommend-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 10px 28px rgba(45, 35, 27, 0.08);
}

.store-focus {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 18px;
  overflow: hidden;
}

.focus-copy p:last-child {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.focus-meter {
  width: 96px;
  aspect-ratio: 1;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #fff;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.2), transparent),
    linear-gradient(90deg, var(--teal) var(--score), #d7d0c6 0);
  flex: 0 0 auto;
}

.focus-meter span {
  font-size: 1.45rem;
  font-weight: 950;
  line-height: 1;
}

.focus-meter small {
  max-width: 64px;
  text-align: center;
  font-size: 0.64rem;
  font-weight: 850;
  line-height: 1.15;
  text-transform: uppercase;
}

.profile-panel {
  display: grid;
  gap: 14px;
  padding: 18px;
  position: sticky;
  top: 16px;
}

.panel-heading {
  display: grid;
  gap: 4px;
  margin-bottom: 2px;
}

label,
fieldset {
  display: grid;
  gap: 7px;
  color: #32413a;
  font-size: 0.88rem;
  font-weight: 700;
}

select,
textarea {
  width: 100%;
  border: 1px solid #cfc8bd;
  border-radius: 6px;
  color: var(--ink);
  background: #fffdf9;
  padding: 11px 12px;
  outline-color: var(--teal);
}

textarea {
  resize: vertical;
  min-height: 92px;
  line-height: 1.45;
}

fieldset {
  grid-template-columns: 1fr 1fr;
  margin: 0;
  padding: 12px;
  border: 1px solid #d7d0c6;
  border-radius: 8px;
}

legend {
  padding: 0 6px;
}

.check {
  display: flex;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-weight: 650;
}

.check input {
  accent-color: var(--teal);
}

button {
  min-height: 48px;
  border: 0;
  border-radius: 6px;
  color: #fff;
  background: var(--ink);
  font-weight: 850;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease;
}

button:hover {
  transform: translateY(-1px);
  background: #284137;
}

.results {
  display: grid;
  gap: 18px;
}

.closet-score {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  padding: 18px;
}

.score-ring {
  width: 86px;
  aspect-ratio: 1;
  border: 8px solid rgba(29, 122, 120, 0.25);
  border-top-color: var(--teal);
  border-right-color: var(--gold);
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.score-ring span {
  display: block;
  font-size: 1.35rem;
  font-weight: 900;
  line-height: 1;
}

.score-ring small {
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
}

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

.recommend-card {
  min-height: 390px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  overflow: hidden;
}

.catalog-photo {
  position: relative;
  min-height: 184px;
  overflow: hidden;
  background: var(--swatch, var(--rose));
}

.catalog-photo img {
  width: 100%;
  height: 100%;
  min-height: 184px;
  display: block;
  object-fit: cover;
}

.catalog-photo span {
  position: absolute;
  left: 10px;
  bottom: 10px;
  max-width: calc(100% - 20px);
  border-radius: 99px;
  color: #fff;
  background: rgba(23, 33, 29, 0.76);
  padding: 7px 10px;
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
}

.card-body {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.brand-name {
  margin: 0;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 900;
}

.brand-meta {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.catalog-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.catalog-list span {
  border-radius: 6px;
  color: #20322b;
  background: #f3eee6;
  padding: 7px 8px;
  font-size: 0.73rem;
  font-weight: 800;
}

.image-source {
  margin: 0;
  color: #7b827e;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 14px 14px;
}

.pill,
.brand-pill {
  border: 1px solid rgba(23, 33, 29, 0.14);
  border-radius: 99px;
  color: #304139;
  background: #fffdf9;
  padding: 6px 9px;
  font-size: 0.75rem;
  font-weight: 800;
  white-space: nowrap;
}

.brand-pill {
  min-height: 0;
  cursor: pointer;
  transition: border-color 160ms ease, color 160ms ease, background 160ms ease, transform 160ms ease;
}

.brand-pill:hover,
.brand-pill.active {
  color: #fff;
  border-color: var(--ink);
  background: var(--ink);
  transform: translateY(-1px);
}

.store-link {
  border-radius: 99px;
  color: #fff;
  background: var(--teal);
  padding: 6px 10px;
  font-size: 0.75rem;
  font-weight: 850;
  text-decoration: none;
  white-space: nowrap;
}

.mix-panel {
  padding: 18px;
}

.mix-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.mix-item {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 10px;
  align-items: start;
  padding: 12px;
  border-radius: 8px;
  background: #f5f0e8;
}

.mix-number {
  width: 32px;
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--moss);
  font-weight: 900;
}

.mix-item p {
  margin: 0;
  color: #4f5b55;
  line-height: 1.45;
}

.brand-strip {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  align-items: center;
  margin: 0 0 18px;
  padding: 18px 0;
  border-top: 1px solid rgba(23, 33, 29, 0.1);
  border-bottom: 1px solid rgba(23, 33, 29, 0.1);
}

.brand-strip h2 {
  font-size: 1.4rem;
}

.brand-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

@media (max-width: 880px) {
  .app-shell {
    width: min(100% - 22px, 720px);
    padding-top: 12px;
  }

  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .fit-stage {
    min-height: 390px;
  }

  .workspace {
    grid-template-columns: 1fr;
  }

  .profile-panel {
    position: static;
  }

  .recommendation-grid {
    grid-template-columns: 1fr;
  }

  .recommend-card {
    min-height: 0;
  }

  .brand-strip {
    display: grid;
  }

  .brand-tags {
    justify-content: flex-start;
  }
}

@media (max-width: 480px) {
  .hero-copy p:last-child {
    font-size: 1rem;
  }

  .fit-stage {
    min-height: 340px;
  }

  .mannequin {
    transform: translateX(-50%) scale(0.82);
    transform-origin: bottom center;
  }

  fieldset {
    grid-template-columns: 1fr;
  }

  .closet-score {
    align-items: flex-start;
  }

  .store-focus {
    grid-template-columns: 1fr;
  }

  .focus-meter {
    width: 100%;
    aspect-ratio: auto;
    min-height: 64px;
    display: flex;
    justify-content: center;
    gap: 8px;
  }
}
