:root {
  --cream: #fff7ea;
  --milk: #fffdf8;
  --butter: #ffd35d;
  --coral: #ff7c73;
  --teal: #28b9ad;
  --berry: #f45f91;
  --sky: #3aa8e8;
  --leaf: #80c45c;
  --ink: #392a42;
  --soft-line: rgba(86, 58, 78, 0.13);
  --shadow: 0 18px 44px rgba(99, 61, 73, 0.18);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Avenir Next", "Trebuchet MS", sans-serif;
  background:
    linear-gradient(90deg, rgba(255, 211, 93, 0.24) 0 12px, transparent 12px 24px),
    linear-gradient(180deg, #fff8e8 0%, #ffd4bf 48%, #b9edf0 100%);
}

.app-shell {
  max-width: 1480px;
  margin: 0 auto;
  padding: 16px 18px 28px;
}

.marquee {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  padding: 14px 22px;
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(255, 253, 248, 0.96), rgba(255, 244, 223, 0.94)),
    linear-gradient(90deg, var(--butter), var(--coral), var(--teal));
  box-shadow: var(--shadow);
  border: 2px solid rgba(255, 255, 255, 0.78);
  position: relative;
  overflow: hidden;
}

.marquee::after {
  content: "";
  position: absolute;
  right: 28px;
  bottom: -18px;
  width: 142px;
  height: 54px;
  border-radius: 50%;
  background: repeating-linear-gradient(90deg, rgba(255, 124, 115, 0.22) 0 18px, rgba(40, 185, 173, 0.18) 18px 36px);
  pointer-events: none;
}

.marquee > * {
  position: relative;
  z-index: 1;
}

.eyebrow,
.panel-eyebrow,
.switcher-label {
  margin: 0 0 7px;
  text-transform: uppercase;
  letter-spacing: 0;
  font-size: 0.72rem;
  font-weight: 800;
}

h1,
h2,
.runway-title {
  font-family: Georgia, "Times New Roman", serif;
}

h1 {
  margin: 0;
  font-size: 2.55rem;
  line-height: 0.98;
}

.hero-copy {
  display: none;
}

button {
  font: inherit;
}

.reset-button,
.category-tab,
.doll-pill,
.closet-card {
  cursor: pointer;
}

.reset-button {
  position: relative;
  z-index: 2;
  border: 0;
  border-radius: 10px;
  padding: 12px 17px;
  font-size: 0.95rem;
  font-weight: 800;
  color: white;
  background: linear-gradient(135deg, var(--berry), var(--coral));
  box-shadow: 0 14px 26px rgba(244, 95, 145, 0.3);
}

.reset-button:disabled {
  opacity: 0.72;
  cursor: progress;
}

.playroom {
  display: grid;
  grid-template-columns: 92px minmax(430px, 1fr) 340px;
  gap: 16px;
  margin-top: 16px;
  align-items: start;
}

.panel,
.stage-card,
.doll-switcher {
  border-radius: 16px;
  background: rgba(255, 253, 248, 0.94);
  box-shadow: var(--shadow);
  border: 2px solid rgba(255, 255, 255, 0.78);
}

.panel {
  padding: 12px;
}

.panel-title h2 {
  margin: 0;
  font-size: 1.7rem;
}

.panel-categories .panel-title h2 {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.panel-categories .category-list {
  margin-top: 8px;
}

.category-list,
.closet-grid {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.category-tab {
  border: 2px solid rgba(255, 255, 255, 0.72);
  border-radius: 14px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--category-color) 42%, white), color-mix(in srgb, var(--category-detail) 50%, white)),
    white;
  padding: 6px;
  min-height: 58px;
  color: var(--ink);
  display: grid;
  place-items: center;
  font-weight: 800;
  position: relative;
  transition: transform 170ms ease, background 170ms ease, box-shadow 170ms ease, border-color 170ms ease;
}

.category-tab:hover,
.doll-pill:hover,
.closet-card:hover,
.reset-button:hover {
  transform: translateY(-2px);
}

.category-tab.is-active {
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--category-color) 72%, white), color-mix(in srgb, var(--category-trim) 42%, white)),
    white;
  border-color: var(--ink);
  box-shadow: 0 8px 18px rgba(57, 42, 66, 0.18);
  transform: translateX(4px);
}

.category-tab-count {
  display: none;
}

.category-tab-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.category-tab-icon .piece-preview-svg {
  width: 44px;
  height: 44px;
}

.category-tab-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.category-fallback-icon {
  font-size: 1.5rem;
}

.runway {
  display: grid;
  gap: 12px;
  align-content: start;
}

.doll-switcher {
  padding: 10px 12px;
  width: fit-content;
  max-width: 100%;
  display: flex;
  gap: 14px;
  align-items: center;
}

.doll-switcher-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.doll-pill {
  border: 0;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 0.94rem;
  font-weight: 800;
  background: white;
  color: var(--ink);
}

.doll-pill.is-active {
  background: linear-gradient(135deg, var(--teal), var(--sky));
  color: white;
}

.stage-card {
  position: relative;
  overflow: hidden;
  padding: 12px 16px;
  min-height: 604px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(255, 246, 229, 0.88)),
    repeating-linear-gradient(90deg, rgba(255, 124, 115, 0.12) 0 24px, rgba(255, 211, 93, 0.12) 24px 48px, rgba(40, 185, 173, 0.1) 48px 72px);
}

.spotlight-ring {
  position: absolute;
  left: 50%;
  top: 56px;
  width: 392px;
  height: 462px;
  transform: translateX(-50%);
  border-radius: 52% 52% 45% 45%;
  border: 6px solid rgba(255, 255, 255, 0.65);
  box-shadow: inset 0 0 0 3px rgba(255, 124, 115, 0.18);
}

.doll-stage-art {
  position: relative;
  height: 500px;
  border-radius: 14px;
  display: grid;
  place-items: center;
}

.doll-figure {
  position: relative;
  width: 238px;
  height: 476px;
}

.doll-svg,
.piece-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.doll-svg {
  z-index: 1;
  filter: drop-shadow(0 16px 18px rgba(73, 40, 55, 0.16));
}

.wear-slot,
.wear-layer {
  position: absolute;
  inset: 0;
}

.wear-slot {
  pointer-events: none;
  z-index: 2;
}

.wear-layer {
  pointer-events: none;
  z-index: 5;
  opacity: 1;
  animation: dress-pop 180ms ease-out;
}

.wear-layer-socks {
  z-index: 3;
}

.wear-layer-pants,
.wear-layer-dresses {
  z-index: 4;
}

.wear-layer-shirts {
  z-index: 6;
}

.wear-layer-jewelry,
.wear-layer-sunglasses,
.wear-layer-hats {
  z-index: 8;
}

.wear-layer-hats .piece-svg {
  transform: translateY(-28px);
}

.wear-layer-sunglasses .piece-svg {
  transform: translateX(-7px);
}

.wear-slot-shoes {
  top: 440px;
  left: 51px;
  width: 160px;
  height: 44px;
}

.wear-slot-socks {
  top: 332px;
  left: 68px;
  width: 124px;
  height: 112px;
}

.wear-slot-pants {
  top: 248px;
  left: 68px;
  width: 124px;
  height: 197px;
}

.wear-slot-shirts {
  top: 153px;
  left: 57px;
  width: 146px;
  height: 154px;
}

.wear-slot-dresses {
  top: 153px;
  left: 58px;
  width: 146px;
  height: 257px;
}

.wear-slot-hats {
  top: 20px;
  left: 58px;
  width: 144px;
  height: 86px;
}

.wear-slot-sunglasses {
  top: 75px;
  left: 74px;
  width: 112px;
  height: 42px;
}

.wear-slot-jewelry {
  top: 170px;
  left: 92px;
  width: 76px;
  height: 66px;
}

.runway-label {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 16px;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: end;
}

.runway-title {
  margin: 0;
  font-size: 1.65rem;
}

.runway-copy {
  margin: 0;
  color: rgba(57, 42, 66, 0.7);
  font-weight: 800;
}

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

.closet-card {
  border: 2px solid transparent;
  border-radius: 12px;
  padding: 9px;
  text-align: left;
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 10px;
  align-items: center;
  position: relative;
  background: white;
  box-shadow: 0 12px 24px rgba(72, 40, 76, 0.08);
  transition: transform 170ms ease, box-shadow 170ms ease, border-color 170ms ease;
}

.closet-card.is-worn {
  border-color: var(--teal);
  box-shadow: 0 14px 26px rgba(40, 185, 173, 0.18);
  background:
    linear-gradient(135deg, rgba(40, 185, 173, 0.1), rgba(255, 255, 255, 0.94)),
    white;
}

.closet-card-preview {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 247, 232, 0.86)),
    repeating-linear-gradient(45deg, rgba(255, 211, 93, 0.12) 0 8px, transparent 8px 16px);
  overflow: hidden;
}

.piece-preview-svg {
  width: 64px;
  height: 64px;
  display: block;
  filter: drop-shadow(0 5px 4px rgba(75, 44, 64, 0.13));
}

.closet-card-name {
  font-size: 0.94rem;
  font-weight: 800;
  line-height: 1.2;
}

.closet-card-check {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: var(--milk);
  background: var(--teal);
  font-size: 0.9rem;
  font-weight: 900;
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 160ms ease, transform 160ms ease;
}

.closet-card.is-worn .closet-card-check {
  opacity: 1;
  transform: scale(1);
}

.flight-chip {
  position: absolute;
  width: 78px;
  height: 78px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 12px 24px rgba(72, 40, 76, 0.14);
  animation: fly-back 620ms cubic-bezier(0.2, 0.7, 0.3, 1) forwards;
  z-index: 50;
  overflow: hidden;
}

.flight-chip .piece-preview-svg {
  width: 78px;
  height: 78px;
}

@keyframes fly-back {
  from {
    transform: translate(0, 0) scale(1);
    opacity: 0.95;
  }
  to {
    transform: translate(var(--flight-x), var(--flight-y)) scale(0.65);
    opacity: 0;
  }
}

@keyframes dress-pop {
  from {
    transform: scale(0.985);
  }
  to {
    transform: scale(1);
  }
}

@media (max-width: 1120px) {
  .playroom {
    grid-template-columns: 84px minmax(360px, 1fr) 300px;
    gap: 12px;
  }

  h1 {
    font-size: 2rem;
  }

  .app-shell {
    padding: 12px;
  }
}

@media (max-width: 860px) {
  .marquee {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: start;
    gap: 12px;
    padding: 12px 14px;
  }

  .eyebrow {
    font-size: 0.68rem;
  }

  h1 {
    font-size: 1.9rem;
    line-height: 1.02;
  }

  .reset-button {
    padding: 10px 12px;
    border-radius: 12px;
    max-width: 86px;
    line-height: 1.05;
  }

  .playroom {
    grid-template-columns: 76px 1fr;
  }

  .doll-switcher {
    width: 100%;
    display: grid;
    gap: 8px;
  }

  .doll-pill {
    padding: 10px 12px;
  }

  .panel-closet {
    grid-column: 1 / -1;
  }

  .closet-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
