/* What Do I Wear — design pass
   Skill: ui-ux-pro-max (Wardrobe & Outfit Planner)
   Style: Minimalism & Swiss. Palette: fashion rose + gold.
   Type: Playfair Display + Inter (Classic Elegant). Motion: subtle. */

@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/inter-400.woff2") format("woff2");
}
@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/inter-500.woff2") format("woff2");
}
@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/inter-600.woff2") format("woff2");
}
@font-face {
  font-family: "Playfair Display";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/playfair-500.woff2") format("woff2");
}
@font-face {
  font-family: "Playfair Display";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/playfair-600.woff2") format("woff2");
}

:root {
  --paper: #fdf2f8;
  --ink: #1c1214;
  --muted: #475569;
  --line: #c496a8;
  --card: #ffffff;
  --featured: #fff5f8;
  --accent: #be185d;
  --accent-text: #be185d;
  --on-accent: #ffffff;
  --accent-press: #9f1239;
  --chip: #f8e8ef;
  --gold: #d97706;
  --on-gold: #1c1214;
  --gold-ink: #92400e;
  --shadow: none;
  color-scheme: light;
  --space-section: 2rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #140e12;
    --ink: #fbf7f8;
    --muted: #e4d0d8;
    --line: #8a7080;
    --card: #241c20;
    --featured: #2e2428;
    --accent: #be185d;
    --accent-text: #fecdd3;
    --on-accent: #ffffff;
    --accent-press: #9f1239;
    --chip: #3a2c32;
    --gold: #fbbf24;
    --on-gold: #1c1214;
    --gold-ink: #fbbf24;
    color-scheme: dark;
  }
}

html {
  scroll-padding-top: 1.25rem;
}

body {
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  background: var(--paper);
  color: var(--ink);
  text-rendering: optimizeLegibility;
}

.grain {
  background-image: none;
}

h1,
h2,
h3,
.serif {
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 500;
}

::selection {
  background: var(--accent);
  color: var(--on-accent);
}

body > div.mx-auto {
  width: min(100%, 76rem);
  max-width: 76rem;
  gap: var(--space-section);
  padding: 1.5rem max(1.15rem, env(safe-area-inset-right))
    max(2.25rem, env(safe-area-inset-bottom))
    max(1.15rem, env(safe-area-inset-left));
  overflow-x: clip;
}

@media (min-width: 64rem) {
  :root {
    --space-section: 2.75rem;
  }
  body > div.mx-auto {
    padding-top: 2.25rem;
    padding-inline: max(2rem, env(safe-area-inset-left))
      max(2rem, env(safe-area-inset-right));
  }
}

header.flex {
  gap: 1.35rem 2.5rem;
}

header .max-w-xl {
  max-width: 40rem;
}

header p.text-xs {
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: var(--accent-text);
}

header h1,
h1.text-\[2\.35rem\] {
  margin-top: 0.4rem;
  font-size: clamp(2.75rem, 5.4vw, 4.5rem);
  font-weight: 500;
  line-height: 0.96;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

header p.mt-2 {
  max-width: 36rem;
  margin-top: 0.85rem;
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--muted);
}

label.grid {
  gap: 0.4rem;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

label.grid .field,
label.grid span {
  letter-spacing: 0;
  text-transform: none;
  font-weight: 500;
}

hr.rule {
  height: 1px;
  margin: 0;
  border: 0;
  background: var(--line);
}

h2.text-2xl {
  font-size: clamp(1.85rem, 2.4vw, 2.3rem);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h2.text-2xl::before {
  content: "";
  display: block;
  width: 1.5rem;
  height: 2px;
  margin-bottom: 0.65rem;
  background: var(--accent);
}

.card {
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--card);
  box-shadow: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-width: 2.75rem;
  min-height: 2.75rem;
  padding: 0 0.9rem;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--card);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.01em;
  text-align: center;
  cursor: pointer;
  touch-action: manipulation;
  transition:
    background-color 180ms ease,
    color 180ms ease,
    border-color 180ms ease;
}

.btn:hover {
  border-color: var(--ink);
  background: var(--chip);
}

.btn:active {
  background: var(--line);
  transform: none;
}

.btn[aria-checked="true"],
.btn[aria-pressed="true"] {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}

.btn[aria-checked="true"]:hover,
.btn[aria-pressed="true"]:hover {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}

.btn.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--on-accent);
}

.btn.primary:hover,
.btn.primary:active {
  border-color: var(--accent-press);
  background: var(--accent-press);
  color: var(--on-accent);
}

.btn.ghost {
  background: transparent;
}

.btn:disabled {
  transform: none;
  cursor: not-allowed;
  opacity: 0.45;
}

.btn:focus-visible,
.field:focus-visible,
.swatch-btn:focus-visible,
[role="option"]:focus-visible {
  outline: 2px solid var(--accent-text);
  outline-offset: 3px;
}

.seg .btn {
  border-radius: 0;
}

.seg .btn:first-child {
  border-radius: 2px 0 0 2px;
}

.seg .btn:last-child {
  margin-left: -1px;
  border-radius: 0 2px 2px 0;
}

.field {
  width: 100%;
  min-height: 2.75rem;
  padding: 0 0.85rem;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--card);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}

.field::placeholder {
  color: var(--muted);
  opacity: 1;
}

select.field {
  padding-right: 2.25rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23475569' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  appearance: none;
}

@media (prefers-color-scheme: dark) {
  select.field {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23E4D0D8' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
  }
}

input[type="range"] {
  width: 100%;
  height: 2.75rem;
  accent-color: var(--accent);
  cursor: pointer;
}

input[type="checkbox"] {
  width: 1.25rem;
  height: 1.25rem;
  accent-color: var(--accent);
}

.swatch {
  border-radius: 2px;
  box-shadow: inset 0 0 0 1px rgb(28 18 20 / 22%);
}

.swatch-btn {
  border-radius: 2px;
  cursor: pointer;
}

.swatch-btn[aria-pressed="true"] {
  outline: 2px solid var(--accent-text);
  outline-offset: 3px;
}

.text-accent {
  color: var(--accent-text);
}

span.text-accent[aria-label="Favorite"] {
  display: inline-block;
  width: 0.85rem;
  height: 0.85rem;
  background: var(--accent-text);
  font-size: 0;
  vertical-align: -0.05em;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 2.6l2.7 5.5 6.1.9-4.4 4.3 1 6.1L12 16.8 6.6 19.4l1-6.1L3.2 9l6.1-.9L12 2.6z'/%3E%3C/svg%3E")
    center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 2.6l2.7 5.5 6.1.9-4.4 4.3 1 6.1L12 16.8 6.6 19.4l1-6.1L3.2 9l6.1-.9L12 2.6z'/%3E%3C/svg%3E")
    center / contain no-repeat;
}

section.card {
  gap: 1.15rem;
  padding: 1.35rem 1.25rem 1.2rem;
}

@media (min-width: 40rem) {
  section.card.grid {
    padding: 1.6rem 1.75rem 1.35rem;
  }
}

section.card > .flex.flex-wrap {
  gap: 1rem 1.5rem;
}

section.card p.nums {
  margin-top: 0.15rem;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: clamp(4rem, 7vw, 5.5rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.04em;
}

section.card .min-w-0:first-child > p.text-sm {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--muted);
  font-size: 0.9375rem;
}

section.card span.mr-1 {
  display: inline-flex;
  flex: 0 0 auto;
  width: 1.15rem;
  height: 1.15rem;
  color: var(--accent-text);
}

section.card span.mr-1 svg {
  display: block;
  width: 100%;
  height: 100%;
}

section.card p.truncate.text-lg {
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(1.45rem, 2vw, 1.85rem);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

section.card li.rounded-full {
  display: inline-flex;
  align-items: center;
  width: auto;
  padding: 0.4rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: transparent;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

@media (pointer: coarse) {
  section.card li.rounded-full {
    min-height: 2.75rem;
  }
}

section[role="alert"] {
  border-left: 4px solid var(--accent);
}

section[aria-busy="true"] {
  min-height: 11rem;
}

#looks {
  gap: 1.15rem;
}

#looks > .grid {
  gap: 1.15rem;
}

#looks [role="radiogroup"] {
  gap: 0.5rem;
}

article.card {
  gap: 0.95rem;
  padding: 1.2rem 1.2rem 1.05rem;
  transition:
    border-color 200ms ease,
    background-color 200ms ease;
}

article h3.text-xl {
  font-size: 1.5rem;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

article.featured {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
  background: var(--featured);
  box-shadow: inset 4px 0 0 var(--accent);
}

article.featured h3.text-xl {
  font-size: 1.7rem;
}

article .nums {
  border: 1px solid var(--gold);
  border-radius: 2px;
  background: transparent;
  color: var(--gold-ink);
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.04em;
  padding: 0.28rem 0.45rem;
}

article.featured .nums {
  border-color: var(--gold);
  background: var(--gold);
  color: var(--on-gold);
}

article ul.grid {
  gap: 0.45rem;
}

article .swatch {
  width: 0.8rem;
  height: 0.8rem;
}

article:not(.featured) .btn.primary {
  border-color: var(--accent-text);
  background: transparent;
  color: var(--accent-text);
}

article:not(.featured) .btn.primary:hover,
article:not(.featured) .btn.primary:active {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--on-accent);
}

#looks > div.card,
#looks > p.text-muted,
section:has(#saved-heading):not(:has(li)) > p,
section:has(#closet-heading) > p.text-muted {
  border: 1px dashed var(--line);
  border-radius: 2px;
  background: var(--card);
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.5;
  padding: 1.35rem 1.15rem;
}

#looks > div.card {
  gap: 1rem;
}

section:has(#saved-heading) {
  gap: 0.9rem;
}

section:has(#saved-heading) li.card {
  min-height: 4.5rem;
  padding: 0.85rem 1rem;
  border-left: 4px solid var(--accent);
}

section:has(#saved-heading) li.card .truncate {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.3rem;
  font-weight: 500;
  line-height: 1.2;
}

section:has(#closet-heading) ul.grid {
  gap: 0.85rem;
}

li.card .swatch.size-4 {
  width: 2.5rem;
  height: 2.5rem;
  margin-top: 0;
  border-radius: 2px;
}

li.card h3.text-lg {
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.35;
}

li.card .btn.ghost {
  border-color: transparent;
  background: transparent;
  color: var(--muted);
}

li.card .btn.ghost:hover {
  border-color: var(--line);
  background: transparent;
  color: var(--ink);
}

form.card {
  gap: 1.15rem;
  padding: 1.35rem;
}

form.card h3.text-xl {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.7rem;
  font-weight: 500;
}

legend.text-sm {
  margin-bottom: 0.35rem;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

[role="listbox"].card {
  padding: 0.35rem;
  border-radius: 2px;
}

[role="option"],
[role="listbox"] button {
  min-height: 2.75rem;
  border-radius: 2px;
}

[role="option"][aria-selected="true"] {
  background: var(--chip);
}

.skip:focus,
.skip:focus-visible {
  top: max(0.75rem, env(safe-area-inset-top));
  left: max(0.75rem, env(safe-area-inset-left));
}

.toast {
  top: auto;
  bottom: max(1rem, env(safe-area-inset-bottom));
  border-radius: 2px;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.9375rem;
  padding: 0.7rem 1rem;
}

footer.text-sm {
  margin-top: 0.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9375rem;
}

.skel {
  border-radius: 2px;
  background: linear-gradient(90deg, var(--chip), var(--card), var(--chip));
  background-size: 200% 100%;
  animation: wdw-sheen 1.2s ease-in-out infinite;
}

@keyframes wdw-sheen {
  0% {
    background-position: 100% 0;
  }
  100% {
    background-position: -100% 0;
  }
}

@media (prefers-reduced-motion: no-preference) {
  article.card {
    animation: wdw-rise 380ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }
  article.card:nth-child(2) {
    animation-delay: 70ms;
  }
  article.card:nth-child(3) {
    animation-delay: 140ms;
  }
}

@keyframes wdw-rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  article.card:hover,
  li.card:hover {
    border-color: var(--accent-text);
  }
  article.featured:hover {
    border-color: color-mix(in srgb, var(--accent) 70%, var(--line));
  }
}

@media (max-width: 639px) {
  section.card > div.flex.flex-wrap {
    flex-direction: column;
    align-items: flex-start;
  }

  section.card p.truncate.text-lg,
  section.card .min-w-0 {
    text-align: left;
  }

  section.card li.rounded-full {
    min-height: 2.75rem;
  }

  ul.grid > li.card {
    padding: 0.95rem 1rem 0.85rem;
  }

  ul.grid > li.card h3.truncate {
    overflow: visible;
    text-overflow: unset;
    white-space: normal;
  }

  ul.grid > li.card > .mt-auto {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    width: 100%;
  }

  ul.grid > li.card > .mt-auto .btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .skel,
  article.card,
  .btn,
  .card {
    animation: none;
    transition: none;
  }
  .btn:active {
    transform: none;
  }
}
