:root {
  color-scheme: light;
  --ink: #553d63;
  --muted: #89758f;
  --pink: #ff6fa6;
  --pink-dark: #d94c86;
  --pink-soft: #ffd9e8;
  --purple: #8d72dc;
  --purple-soft: #e7e0ff;
  --blue: #55bde8;
  --blue-soft: #d9f3ff;
  --mint: #52c6a5;
  --mint-soft: #d8f6ed;
  --yellow: #f4bd4f;
  --surface: #fff9fc;
  --surface-strong: #ffffff;
  --border: rgba(132, 90, 143, 0.16);
  --shadow: 0 20px 60px rgba(111, 67, 122, 0.16);
  --shadow-small: 0 8px 24px rgba(111, 67, 122, 0.13);
  --radius-sm: 14px;
  --radius-md: 22px;
  --radius-lg: 32px;
  --font-ui: ui-rounded, "SF Pro Rounded", "Nunito", "Noto Sans TC",
    "PingFang TC", "Microsoft JhengHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
  background: #f8edf6;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: var(--font-ui);
  background:
    radial-gradient(circle at 10% 10%, rgba(255, 255, 255, 0.95), transparent 25rem),
    radial-gradient(circle at 92% 7%, rgba(224, 215, 255, 0.8), transparent 27rem),
    linear-gradient(145deg, #fff8fc 0%, #f5e8f4 48%, #eeeaff 100%);
}

button {
  color: inherit;
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible {
  outline: 4px solid rgba(85, 189, 232, 0.45);
  outline-offset: 3px;
}

.app-shell {
  width: min(1580px, calc(100% - 32px));
  min-height: calc(100vh - 32px);
  margin: 16px auto;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 36px;
  background: rgba(255, 249, 252, 0.89);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.topbar {
  position: relative;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(210px, 1fr) auto minmax(160px, 1fr);
  align-items: center;
  gap: 20px;
  min-height: 86px;
  padding: 13px 24px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.85);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  font-size: clamp(17px, 2vw, 22px);
  font-weight: 900;
  letter-spacing: 0.01em;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 17px;
  background: linear-gradient(145deg, #ff8fba, #ef5c99);
  box-shadow: 0 8px 16px rgba(228, 75, 137, 0.28);
}

.brand-mark svg {
  width: 30px;
  fill: #fff4b9;
  stroke: #fff;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.5;
}

.main-nav {
  display: flex;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: #f8f1f7;
}

.nav-button {
  display: flex;
  min-width: 94px;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
  border: 0;
  border-radius: 17px;
  background: transparent;
  color: var(--muted);
  font-size: 15px;
  font-weight: 850;
  cursor: pointer;
  transition:
    transform 160ms ease,
    background-color 160ms ease,
    color 160ms ease,
    box-shadow 160ms ease;
}

.nav-button svg {
  width: 21px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.nav-button:hover {
  transform: translateY(-1px);
  color: var(--pink-dark);
}

.nav-button.is-active {
  background: #fff;
  color: var(--pink-dark);
  box-shadow: var(--shadow-small);
}

.topbar-status {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  color: #765f7c;
  font-size: 14px;
  font-weight: 800;
}

.sparkle {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: #fff2ba;
  color: #d79219;
  font-size: 18px;
  box-shadow: inset 0 0 0 1px rgba(210, 146, 25, 0.16);
}

#game-main {
  min-height: calc(100vh - 119px);
}

.view {
  min-height: calc(100vh - 119px);
  animation: view-in 280ms ease both;
}

@keyframes view-in {
  from {
    opacity: 0;
    transform: translateY(7px);
  }
}

.dressup-layout {
  display: grid;
  grid-template-columns: 154px minmax(360px, 1fr) minmax(390px, 0.95fr);
  gap: clamp(16px, 2vw, 30px);
  min-height: calc(100vh - 119px);
  padding: clamp(18px, 2vw, 30px);
}

.category-rail {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-self: center;
}

.category-button {
  position: relative;
  display: grid;
  min-height: 86px;
  place-items: center;
  gap: 4px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 23px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--muted);
  font-size: 14px;
  font-weight: 850;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(111, 67, 122, 0.07);
  transition:
    transform 160ms ease,
    color 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.category-button svg {
  width: 34px;
  height: 34px;
  fill: currentColor;
}

.category-button:hover {
  transform: translateY(-2px);
  color: var(--pink-dark);
}

.category-button.is-active {
  border-color: rgba(255, 111, 166, 0.42);
  color: var(--pink-dark);
  box-shadow:
    0 13px 28px rgba(217, 76, 134, 0.17),
    inset 0 0 0 2px rgba(255, 111, 166, 0.12);
}

.category-count {
  position: absolute;
  top: 7px;
  right: 7px;
  display: grid;
  min-width: 27px;
  height: 27px;
  place-items: center;
  padding: 0 6px;
  border-radius: 14px;
  background: var(--pink);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  box-shadow: 0 5px 12px rgba(217, 76, 134, 0.24);
}

.stage-column {
  display: grid;
  min-width: 0;
  align-content: center;
  gap: 14px;
}

.stage-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.stage-heading > div {
  min-width: 0;
}

.stage-heading h1,
.closet-heading h2,
.camera-copy h1,
.feed-heading h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(25px, 3vw, 38px);
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.stage-heading p,
.closet-heading p,
.camera-copy p,
.feed-heading p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
  line-height: 1.5;
}

.mode-tag {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(82, 198, 165, 0.25);
  border-radius: 16px;
  background: var(--mint-soft);
  color: #287c68;
  font-size: 13px;
  font-weight: 850;
  white-space: nowrap;
}

.mode-tag::before {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--mint);
  content: "";
  box-shadow: 0 0 0 5px rgba(82, 198, 165, 0.14);
}

.scene-stage,
.photo-stage,
.post-photo {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background-image: url("./assets/background-atlas.png");
  background-repeat: no-repeat;
  background-size: 300% 400%;
}

.scene-stage {
  width: min(100%, 660px);
  height: clamp(530px, 67vh, 730px);
  justify-self: center;
  border: 7px solid rgba(255, 255, 255, 0.9);
  border-radius: 36px;
  box-shadow:
    0 25px 55px rgba(89, 55, 98, 0.2),
    0 0 0 1px rgba(132, 90, 143, 0.15);
}

.scene-stage::after,
.photo-stage::after,
.post-photo::after {
  position: absolute;
  z-index: -1;
  right: 0;
  bottom: 0;
  left: 0;
  height: 38%;
  background: linear-gradient(to top, rgba(58, 35, 72, 0.12), transparent);
  content: "";
  pointer-events: none;
}

.avatar-wrap {
  position: absolute;
  z-index: 2;
  right: 50%;
  bottom: -1.5%;
  width: auto;
  height: 91%;
  aspect-ratio: 1 / 2;
  transform: translateX(50%);
  transform-origin: bottom center;
  filter: drop-shadow(0 18px 18px rgba(72, 42, 73, 0.2));
  transition: transform 240ms cubic-bezier(0.2, 0.9, 0.2, 1);
}

.avatar-wrap.is-pose-1 {
  transform: translateX(50%) rotate(-1.5deg);
}

.avatar-wrap.is-pose-2 {
  transform: translateX(50%) rotate(1.5deg) scale(0.98);
}

.avatar-art {
  position: relative;
  isolation: isolate;
  display: block;
  width: 100%;
  height: 100%;
  user-select: none;
}

.avatar-art::after {
  position: absolute;
  z-index: 0;
  right: 34%;
  bottom: 3.8%;
  left: 34%;
  height: 3.2%;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(72, 42, 73, 0.25), transparent 68%);
  content: "";
  filter: blur(1.5px);
  pointer-events: none;
}

.avatar-base,
.avatar-hand,
.avatar-layer {
  position: absolute;
  display: block;
  max-width: none;
  pointer-events: none;
  user-select: none;
}

.avatar-base {
  z-index: 1;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
  clip-path: inset(0 0 13% 0);
}

.avatar-hand {
  z-index: 6;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
}

.avatar-neck {
  position: absolute;
  z-index: 5;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: contain;
  object-position: center bottom;
  clip-path: polygon(43% 31.5%, 57% 31.5%, 57% 36.8%, 43% 36.8%);
  pointer-events: none;
  user-select: none;
}

.avatar-hand-left {
  clip-path: inset(54% 66% 40% 23%);
  transform: translateX(-4%);
}

.avatar-hand-right {
  clip-path: inset(54% 23% 40% 66%);
  transform: translateX(4%);
}

.avatar-hand-dress {
  z-index: 6;
}

.avatar-hand-dress.avatar-hand-left {
  clip-path: inset(54% 66% 40% 23%);
  transform: translateX(-4%);
}

.avatar-hand-dress.avatar-hand-right {
  clip-path: inset(54% 23% 40% 66%);
  transform: translateX(4%);
}

.avatar-hand-grip {
  z-index: 10;
  clip-path: inset(54% 26% 41% 66%);
}

.avatar-layer {
  height: auto;
  object-fit: contain;
}

.avatar-top {
  z-index: 4;
  top: 29.2%;
  left: 18%;
  width: 64%;
  transform: scaleX(0.9);
  transform-origin: center 32%;
}

.avatar-skirt {
  z-index: 5;
  top: 46.1%;
  left: 15.5%;
  width: 69%;
}

.avatar-dress {
  z-index: 5;
  top: 30.1%;
  left: 12.5%;
  width: 75%;
}

.avatar-socks {
  position: absolute;
  z-index: 3;
  top: 76.9%;
  left: 39.5%;
  width: 24%;
  aspect-ratio: 1;
  pointer-events: none;
  transform-origin: 25% 100%;
  user-select: none;
}

.avatar-socks-left {
  transform: translateX(-14%) rotate(3.2deg) scaleX(0.96) scaleY(1.5);
  transform-origin: 25% 100%;
}

.avatar-socks-right {
  transform: translateX(14%) rotate(-3.2deg) scaleX(0.96) scaleY(1.5);
  transform-origin: 75% 100%;
}

.avatar-socks-art {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
}

.avatar-socks-left-upper {
  clip-path: inset(0 50% 46% 0);
  transform: rotate(5.5deg) scaleX(1.06);
  transform-origin: 25% 52%;
}

.avatar-socks-left-lower {
  clip-path: inset(50% 50% 0 0);
  transform: scaleX(0.9);
  transform-origin: 25% 100%;
}

.avatar-socks-right-upper {
  clip-path: inset(0 0 46% 50%);
  transform: rotate(-5.5deg) scaleX(1.06);
  transform-origin: 75% 52%;
}

.avatar-socks-right-lower {
  clip-path: inset(50% 0 0 50%);
  transform: scaleX(0.9);
  transform-origin: 75% 100%;
}

.avatar-shoes {
  z-index: 7;
  top: 78%;
  left: 36.5%;
  width: 30%;
}

.avatar-shoes-left {
  clip-path: inset(0 50% 0 0);
  transform: translateX(-7%);
}

.avatar-shoes-right {
  clip-path: inset(0 0 0 50%);
  transform: translateX(7%);
}

.shoe-fit-5 {
  top: 77.7%;
  left: 36%;
  width: 31%;
}

.shoe-fit-6,
.shoe-fit-7 {
  top: 77.3%;
  left: 35.5%;
  width: 32%;
}

.avatar-hair {
  z-index: 8;
  top: 3.5%;
  left: 19%;
  width: 62%;
}

.hair-silhouette-5 {
  top: 2%;
  left: 16%;
  width: 68%;
}

.avatar-accessory {
  z-index: 10;
}

.avatar-earrings {
  z-index: 9;
  top: 19%;
  width: 9%;
}

.avatar-earrings-left {
  left: 27%;
  clip-path: inset(0 50% 0 0);
}

.avatar-earrings-right {
  left: 64%;
  clip-path: inset(0 0 0 50%);
}

.accessory-headband {
  z-index: 9;
  top: 0;
  left: 27%;
  width: 46%;
}

.accessory-hat {
  top: 0.5%;
  left: 30%;
  width: 40%;
}

.accessory-bag {
  top: 52%;
  right: 13.5%;
  width: 31%;
}

.accessory-bag-back {
  z-index: 6;
}

.accessory-bag-front {
  z-index: 9;
  clip-path: inset(62% 0 0 0);
}

.accessory-necklace {
  top: 29%;
  left: 35.5%;
  width: 29%;
}

.accessory-pins {
  top: 31%;
  left: 40%;
  width: 20%;
}

.accessory-glasses {
  top: 14%;
  left: 36%;
  width: 28%;
}

.accessory-clip {
  top: 10%;
  right: 29%;
  width: 14%;
}

.accessory-bow {
  top: 8%;
  right: 25%;
  width: 20%;
}

.accessory-crown {
  top: -1%;
  left: 36%;
  width: 28%;
}

.background-strip {
  display: flex;
  gap: 10px;
  width: min(100%, 660px);
  justify-self: center;
  overflow-x: auto;
  padding: 3px 2px 10px;
  scrollbar-color: var(--pink-soft) transparent;
}

.background-button {
  position: relative;
  flex: 0 0 76px;
  height: 58px;
  overflow: hidden;
  border: 3px solid #fff;
  border-radius: 17px;
  background-image: url("./assets/background-atlas.png");
  background-repeat: no-repeat;
  background-size: 300% 400%;
  box-shadow: var(--shadow-small);
  cursor: pointer;
  transition:
    transform 150ms ease,
    border-color 150ms ease;
}

.background-button:hover {
  transform: translateY(-2px);
}

.background-button.is-active {
  border-color: var(--pink);
  box-shadow: 0 8px 20px rgba(217, 76, 134, 0.24);
}

.background-button span {
  position: absolute;
  right: 2px;
  bottom: 2px;
  left: 2px;
  overflow: hidden;
  padding: 4px 5px;
  border-radius: 9px;
  background: rgba(64, 37, 70, 0.62);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
  backdrop-filter: blur(5px);
}

.closet-panel {
  min-width: 0;
  align-self: center;
  padding: clamp(17px, 2vw, 25px);
  border: 1px solid rgba(255, 255, 255, 0.88);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow-small);
  backdrop-filter: blur(20px);
}

.closet-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 17px;
}

.closet-heading h2 {
  font-size: clamp(22px, 2.4vw, 30px);
}

.closet-heading-actions {
  display: flex;
  flex: none;
  align-items: center;
  gap: 9px;
}

.remove-accessory-button {
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid rgba(217, 76, 134, 0.2);
  border-radius: 12px;
  background: #fff;
  color: var(--pink-dark);
  font-size: 11px;
  font-weight: 850;
  cursor: pointer;
}

.remove-accessory-button:disabled {
  color: var(--muted);
  cursor: default;
  opacity: 0.45;
}

.page-count {
  flex: none;
  color: var(--pink-dark);
  font-size: 13px;
  font-weight: 900;
}

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

.item-card {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 144px;
  grid-template-rows: 100px auto;
  align-items: center;
  justify-items: center;
  overflow: hidden;
  padding: 7px 8px 10px;
  border: 2px solid transparent;
  border-radius: 20px;
  background:
    radial-gradient(circle at 50% 15%, #fff 0 25%, transparent 52%),
    linear-gradient(160deg, #fff 0%, #f9f0f8 100%);
  box-shadow: inset 0 0 0 1px var(--border);
  cursor: pointer;
  transition:
    transform 150ms ease,
    border-color 150ms ease,
    box-shadow 150ms ease;
}

.item-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-small);
}

.item-card.is-selected {
  border-color: var(--pink);
  box-shadow:
    0 10px 22px rgba(217, 76, 134, 0.16),
    inset 0 0 0 1px rgba(255, 255, 255, 0.9);
}

.item-preview {
  display: grid;
  width: 100%;
  height: 100px;
  place-items: center;
  overflow: hidden;
}

.item-art {
  display: block;
  width: 92%;
  height: 92%;
  object-fit: contain;
  filter: drop-shadow(0 5px 5px rgba(87, 52, 94, 0.14));
}

.item-art-hair {
  width: 100%;
  height: 100%;
}

.item-art-shoes,
.item-art-socks,
.item-art-earrings,
.item-art-hairAccessory,
.item-art-hat,
.item-art-glasses,
.item-art-necklace,
.item-art-bag,
.item-art-brooch {
  width: 84%;
  height: 84%;
}

.shuffle-note {
  display: flex;
  width: min(100%, 660px);
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  justify-self: center;
  padding: 11px 14px;
  border: 1px solid rgba(141, 114, 220, 0.2);
  border-radius: 17px;
  background: rgba(247, 242, 255, 0.9);
  color: #6d5792;
  font-size: 12px;
  font-weight: 800;
}

.shuffle-note button {
  flex: none;
  min-height: 34px;
  padding: 0 12px;
  border: 0;
  border-radius: 12px;
  background: #fff;
  color: var(--purple);
  font-size: 12px;
  font-weight: 900;
  box-shadow: var(--shadow-small);
  cursor: pointer;
}

.vs-challenge-bar {
  display: grid;
  width: min(100%, 660px);
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 14px;
  justify-self: center;
  padding: 12px 14px;
  border: 1px solid rgba(255, 111, 166, 0.24);
  border-radius: 20px;
  background: linear-gradient(135deg, #fff5fa, #f2eeff);
  box-shadow: var(--shadow-small);
}

.vs-challenge-bar > div {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 2px 9px;
}

.vs-challenge-bar > div > span {
  grid-row: 1 / 3;
  font-size: 25px;
}

.vs-challenge-bar strong {
  font-size: 13px;
}

.vs-challenge-bar small {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-action {
  min-height: 44px !important;
  padding: 0 16px;
  font-size: 13px !important;
}

.vs-view {
  min-height: calc(100vh - 119px);
  padding: clamp(24px, 3.4vw, 52px);
  background:
    radial-gradient(circle at 50% 22%, rgba(255, 255, 255, 0.98), transparent 31rem),
    linear-gradient(145deg, rgba(255, 234, 244, 0.72), rgba(231, 224, 255, 0.7));
}

.vs-heading {
  display: flex;
  width: min(100%, 1120px);
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin: 0 auto 24px;
}

.vs-heading h1 {
  margin: 6px 0 0;
  font-size: clamp(32px, 4.7vw, 58px);
  line-height: 1;
  letter-spacing: -0.04em;
}

.vs-heading p {
  margin: 9px 0 0;
  color: var(--muted);
  font-weight: 700;
}

.vs-kicker {
  color: var(--pink-dark);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.vs-record {
  display: flex;
  flex: none;
  gap: 8px;
}

.vs-record span {
  display: grid;
  min-width: 66px;
  min-height: 58px;
  place-items: center;
  padding: 7px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #fff;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  box-shadow: var(--shadow-small);
}

.vs-record b {
  color: var(--ink);
  font-size: 19px;
}

.vs-arena {
  display: grid;
  width: min(100%, 1120px);
  grid-template-columns: minmax(0, 1fr) 86px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  margin: 0 auto;
}

.contestant-card {
  overflow: hidden;
  border: 6px solid rgba(255, 255, 255, 0.94);
  border-radius: 32px;
  background: #fff;
  box-shadow: var(--shadow);
}

.contestant-card > header {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 17px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
}

.contestant-card > header strong {
  color: var(--pink-dark);
  font-size: 22px;
}

.contestant-card > header small {
  color: var(--muted);
  font-size: 11px;
}

.contestant-stage {
  position: relative;
  isolation: isolate;
  height: clamp(390px, 52vh, 570px);
  overflow: hidden;
  background-image: url("./assets/background-atlas.png");
  background-repeat: no-repeat;
  background-size: 300% 400%;
}

.contestant-stage::after {
  position: absolute;
  z-index: -1;
  right: 0;
  bottom: 0;
  left: 0;
  height: 32%;
  background: linear-gradient(to top, rgba(64, 38, 76, 0.16), transparent);
  content: "";
}

.contestant-stage .avatar-wrap {
  height: 94%;
}

.contestant-stage.is-mystery {
  display: grid;
  place-items: center;
  filter: saturate(0.7);
}

.mystery-look {
  display: grid;
  place-items: center;
  color: #fff;
  text-shadow: 0 3px 14px rgba(69, 44, 82, 0.5);
}

.mystery-look b {
  display: grid;
  width: 112px;
  height: 112px;
  place-items: center;
  border: 5px solid rgba(255, 255, 255, 0.85);
  border-radius: 50%;
  background: rgba(141, 114, 220, 0.6);
  font-size: 64px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.mystery-look span {
  margin-top: 13px;
  font-size: 13px;
  font-weight: 900;
}

.vs-medallion {
  position: relative;
  z-index: 5;
  display: grid;
  width: 86px;
  height: 86px;
  place-items: center;
  border: 7px solid #fff;
  border-radius: 50%;
  background: linear-gradient(145deg, #ff80b1, #8d72dc);
  color: #fff;
  font-size: 24px;
  font-weight: 1000;
  box-shadow: 0 13px 30px rgba(108, 71, 137, 0.32);
}

.vs-start-panel,
.vs-result {
  display: grid;
  width: min(100%, 1120px);
  grid-template-columns: 1fr minmax(260px, auto) auto;
  align-items: center;
  gap: 20px;
  margin: 22px auto 0;
  padding: 18px 21px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 25px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow-small);
}

.vs-start-panel > div {
  display: grid;
}

.vs-start-panel strong {
  font-size: 18px;
}

.vs-start-panel span,
.vs-start-panel p {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.vs-start-panel p {
  margin: 0;
  line-height: 1.55;
}

.vs-start-panel .primary-action,
.vs-actions .primary-action,
.vs-actions .secondary-action {
  min-width: 160px;
  padding: 0 18px;
}

.vs-result {
  grid-template-columns: minmax(200px, 0.7fr) minmax(260px, 1fr) minmax(290px, auto);
}

.result-copy {
  display: flex;
  align-items: center;
  gap: 12px;
}

.result-copy > span {
  font-size: 39px;
}

.result-copy h2,
.result-copy p {
  margin: 0;
}

.result-copy h2 {
  font-size: 23px;
}

.result-copy p,
.fair-score-note {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.45;
}

.score-breakdown {
  display: grid;
  gap: 7px;
}

.score-row {
  display: grid;
  grid-template-columns: 68px 1fr 27px;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 800;
}

.score-row > div {
  height: 8px;
  overflow: hidden;
  border-radius: 6px;
  background: #eee5ef;
}

.score-row i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--pink), var(--purple));
}

.fair-score-note {
  margin: 0;
}

.vs-actions {
  display: flex;
  grid-column: 1 / -1;
  justify-content: center;
  gap: 12px;
}

.post-author {
  color: var(--pink-dark) !important;
  font-size: 11px !important;
  font-weight: 900 !important;
}

.item-name {
  width: 100%;
  overflow: hidden;
  color: #664c6d;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.selected-check {
  position: absolute;
  top: 8px;
  right: 8px;
  display: none;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 50%;
  background: var(--pink);
  box-shadow: 0 6px 14px rgba(217, 76, 134, 0.24);
}

.selected-check svg {
  width: 17px;
  fill: none;
  stroke: #fff;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
}

.item-card.is-selected .selected-check {
  display: grid;
}

.pagination {
  display: grid;
  grid-template-columns: 48px 1fr 48px;
  align-items: center;
  gap: 10px;
  margin-top: 17px;
}

.page-button {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
  color: var(--purple);
  cursor: pointer;
  box-shadow: var(--shadow-small);
}

.page-button:disabled {
  opacity: 0.38;
  cursor: default;
}

.page-button svg {
  width: 24px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.5;
}

.page-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.page-dot {
  width: 9px;
  height: 9px;
  border: 0;
  border-radius: 50%;
  background: #dfd3e1;
  cursor: pointer;
}

.page-dot.is-active {
  width: 25px;
  border-radius: 8px;
  background: var(--pink);
}

.camera-layout {
  display: grid;
  grid-template-columns: minmax(390px, 0.78fr) minmax(480px, 1.22fr);
  gap: clamp(24px, 4vw, 64px);
  align-items: center;
  min-height: calc(100vh - 119px);
  padding: clamp(26px, 4vw, 64px);
}

.camera-copy {
  max-width: 430px;
  justify-self: end;
}

.camera-copy h1,
.feed-heading h1 {
  font-size: clamp(34px, 5vw, 60px);
}

.camera-copy p,
.feed-heading p {
  max-width: 38rem;
  font-size: 16px;
}

.pose-selector {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 26px;
}

.pose-button {
  min-height: 72px;
  border: 2px solid transparent;
  border-radius: 21px;
  background: #fff;
  color: var(--muted);
  font-size: 14px;
  font-weight: 850;
  box-shadow: var(--shadow-small);
  cursor: pointer;
}

.pose-button.is-active {
  border-color: var(--purple);
  color: #5a3f9b;
  background: var(--purple-soft);
}

.camera-actions {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}

.primary-action,
.secondary-action {
  display: inline-flex;
  min-height: 58px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  border-radius: 20px;
  font-size: 16px;
  font-weight: 900;
  cursor: pointer;
  transition:
    transform 150ms ease,
    box-shadow 150ms ease;
}

.primary-action {
  background: linear-gradient(145deg, #ff82b2, #ee5b99);
  color: #fff;
  box-shadow: 0 14px 28px rgba(217, 76, 134, 0.3);
}

.secondary-action {
  border: 1px solid rgba(82, 198, 165, 0.25);
  background: linear-gradient(145deg, #74d7bd, #46b999);
  color: #fff;
  box-shadow: 0 14px 28px rgba(48, 151, 124, 0.24);
}

.primary-action:hover,
.secondary-action:hover {
  transform: translateY(-2px);
}

.primary-action svg,
.secondary-action svg {
  width: 24px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.2;
}

.capture-note {
  display: none;
  margin-top: 14px;
  padding: 13px 16px;
  border-radius: 17px;
  background: var(--mint-soft);
  color: #287c68;
  font-size: 14px;
  font-weight: 800;
}

.capture-note.is-visible {
  display: block;
  animation: pop-in 240ms ease both;
}

@keyframes pop-in {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
}

.camera-preview {
  min-width: 0;
}

.photo-stage {
  width: min(100%, 650px);
  height: min(72vh, 720px);
  min-height: 580px;
  border: 8px solid #fff;
  border-radius: 40px;
  box-shadow: var(--shadow);
}

.photo-stage.is-captured {
  animation: shutter 480ms ease;
}

@keyframes shutter {
  0%,
  100% {
    filter: brightness(1);
  }
  32% {
    filter: brightness(2.15);
  }
}

.photo-stage .avatar-wrap {
  width: auto;
}

.photo-stage .photo-corners {
  position: absolute;
  z-index: 4;
  inset: 22px;
  border: 2px solid rgba(255, 255, 255, 0.7);
  border-radius: 23px;
  box-shadow:
    inset 24px 0 0 -22px #fff,
    inset -24px 0 0 -22px #fff,
    inset 0 24px 0 -22px #fff,
    inset 0 -24px 0 -22px #fff;
  pointer-events: none;
}

.camera-preview .background-strip {
  width: min(100%, 650px);
  margin-top: 14px;
}

.feed-view {
  min-height: calc(100vh - 119px);
  padding: clamp(28px, 4vw, 64px);
}

.feed-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  width: min(100%, 1100px);
  margin: 0 auto 32px;
}

.feed-heading .primary-action {
  flex: none;
  min-width: 170px;
  padding: 0 22px;
}

.feed-list {
  display: grid;
  width: min(100%, 1100px);
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 25px;
  margin: 0 auto;
}

.post-card {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.92);
  border-radius: 30px;
  background: #fff;
  box-shadow: var(--shadow-small);
}

.post-photo {
  height: clamp(390px, 52vh, 540px);
}

.post-photo .avatar-wrap {
  width: auto;
  height: 93%;
}

.post-footer {
  display: flex;
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 13px 18px;
}

.post-meta {
  min-width: 0;
}

.post-meta strong {
  display: block;
  overflow: hidden;
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.post-meta span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.heart-button {
  display: inline-flex;
  min-width: 96px;
  min-height: 47px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid rgba(255, 111, 166, 0.2);
  border-radius: 18px;
  background: #fff5f9;
  color: var(--pink-dark);
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
}

.heart-button svg {
  width: 22px;
  fill: transparent;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  transition: transform 180ms ease;
}

.heart-button.is-liked svg {
  fill: var(--pink);
  stroke: var(--pink);
  transform: scale(1.12);
}

.empty-feed {
  display: grid;
  min-height: 500px;
  grid-column: 1 / -1;
  place-items: center;
  padding: 40px;
  border: 2px dashed rgba(141, 114, 220, 0.25);
  border-radius: 32px;
  background:
    radial-gradient(circle at 50% 35%, #fff 0 14%, transparent 38%),
    linear-gradient(145deg, rgba(231, 224, 255, 0.55), rgba(255, 217, 232, 0.5));
  text-align: center;
}

.empty-feed-icon {
  display: grid;
  width: 96px;
  height: 96px;
  place-items: center;
  margin: 0 auto 20px;
  border-radius: 35px;
  background: #fff;
  color: var(--pink);
  box-shadow: var(--shadow-small);
}

.empty-feed-icon svg {
  width: 47px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.empty-feed h2 {
  margin: 0;
  font-size: 27px;
}

.empty-feed p {
  margin: 9px 0 22px;
  color: var(--muted);
  font-weight: 650;
}

.empty-feed .primary-action {
  min-width: 180px;
  padding: 0 22px;
}

.toast {
  position: fixed;
  z-index: 100;
  right: 50%;
  bottom: 28px;
  max-width: min(420px, calc(100% - 32px));
  padding: 14px 20px;
  border: 1px solid rgba(255, 255, 255, 0.84);
  border-radius: 18px;
  background: rgba(68, 45, 76, 0.92);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  opacity: 0;
  pointer-events: none;
  transform: translate(50%, 18px);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.toast.is-visible {
  opacity: 1;
  transform: translate(50%, 0);
}

.icon-library {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

@media (max-width: 1180px) {
  .dressup-layout {
    grid-template-columns: 112px minmax(340px, 1fr) minmax(320px, 0.86fr);
    gap: 16px;
  }

  .category-button {
    min-height: 80px;
  }

  .item-grid {
    gap: 8px;
  }

  .item-card {
    min-height: 127px;
    grid-template-rows: 86px auto;
  }

  .item-preview {
    height: 86px;
  }
}

@media (max-height: 820px) and (min-width: 961px) {
  .topbar {
    min-height: 72px;
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .brand-mark {
    width: 43px;
    height: 43px;
    border-radius: 15px;
  }

  .main-nav {
    padding: 4px;
  }

  .nav-button {
    min-height: 45px;
  }

  #game-main,
  .view {
    min-height: calc(100vh - 90px);
  }

  .dressup-layout {
    min-height: calc(100vh - 90px);
    padding-top: 13px;
    padding-bottom: 13px;
  }

  .category-rail {
    gap: 5px;
  }

  .category-button {
    min-height: 58px;
    padding: 6px;
    border-radius: 19px;
  }

  .category-button svg {
    width: 24px;
    height: 24px;
  }

  .scene-stage {
    height: clamp(360px, calc(100vh - 330px), 480px);
  }

  .background-button {
    height: 48px;
  }

  .closet-panel {
    padding: 15px;
  }

  .closet-heading {
    margin-bottom: 10px;
  }

  .closet-heading p {
    margin-top: 3px;
  }

  .item-grid {
    gap: 7px;
  }

  .item-card {
    min-height: 98px;
    grid-template-rows: 66px auto;
    padding: 4px 6px 7px;
    border-radius: 16px;
  }

  .item-preview {
    width: 62px;
    height: 66px;
  }

  .item-name {
    font-size: 10px;
  }

  .pagination {
    grid-template-columns: 40px 1fr 40px;
    margin-top: 9px;
  }

  .page-button {
    width: 40px;
    height: 40px;
    border-radius: 14px;
  }

  .camera-layout,
  .feed-view {
    min-height: calc(100vh - 90px);
    padding-top: 20px;
    padding-bottom: 20px;
  }

  .photo-stage {
    height: calc(100vh - 190px);
    min-height: 470px;
  }

  .vs-view {
    padding: 14px 30px 18px;
  }

  .vs-heading {
    margin-bottom: 12px;
  }

  .vs-heading h1 {
    font-size: 40px;
  }

  .contestant-stage {
    height: 245px;
  }

  .vs-start-panel,
  .vs-result {
    min-height: 74px;
    margin-top: 12px;
    padding-top: 11px;
    padding-bottom: 11px;
  }
}

@media (max-width: 960px) {
  .app-shell {
    width: calc(100% - 18px);
    min-height: calc(100vh - 18px);
    margin: 9px auto;
    border-radius: 28px;
    backdrop-filter: none;
  }

  .topbar {
    grid-template-columns: 1fr auto;
  }

  .main-nav {
    position: fixed;
    z-index: 50;
    right: 14px;
    bottom: 14px;
    left: 14px;
    justify-content: center;
    box-shadow: var(--shadow);
  }

  .nav-button {
    min-width: 0;
    flex: 1;
  }

  .topbar-status {
    display: none;
  }

  .dressup-layout {
    grid-template-columns: 1fr;
    padding-bottom: 110px;
  }

  .category-rail {
    display: grid;
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: minmax(92px, 1fr);
    order: 2;
    overflow-x: auto;
    padding-bottom: 7px;
  }

  .category-button {
    min-height: 74px;
  }

  .stage-column {
    order: 1;
  }

  .scene-stage {
    height: min(70vh, 680px);
  }

  .closet-panel {
    order: 3;
  }

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

  .camera-layout {
    grid-template-columns: 1fr;
    padding-bottom: 110px;
  }

  .camera-copy {
    display: grid;
    width: min(100%, 650px);
    max-width: none;
    justify-self: center;
    order: 2;
  }

  .camera-preview {
    order: 1;
  }

  .photo-stage {
    margin: 0 auto;
  }

  .feed-view {
    padding-bottom: 110px;
  }

  .vs-view {
    padding-bottom: 110px;
  }

  .vs-arena {
    grid-template-columns: minmax(0, 1fr) 68px minmax(0, 1fr);
  }

  .vs-medallion {
    width: 68px;
    height: 68px;
    font-size: 19px;
  }

  .vs-result,
  .vs-start-panel {
    grid-template-columns: 1fr 1fr;
  }

  .vs-start-panel .primary-action {
    grid-column: 1 / -1;
  }
}

@media (max-width: 680px) {
  .topbar {
    min-height: 72px;
    padding: 10px 14px;
  }

  .brand {
    font-size: 17px;
  }

  .brand-mark {
    width: 43px;
    height: 43px;
    border-radius: 15px;
  }

  .main-nav {
    gap: 4px;
    padding: 5px;
  }

  .nav-button {
    min-height: 48px;
    padding: 0 8px;
    font-size: 12px;
  }

  .nav-button svg {
    width: 19px;
  }

  .dressup-layout {
    padding: 14px 12px 96px;
  }

  .stage-heading {
    align-items: start;
    flex-wrap: wrap;
  }

  .stage-heading h1 {
    font-size: 25px;
  }

  .stage-heading p {
    font-size: 12px;
  }

  .mode-tag {
    min-height: 34px;
    padding: 0 10px;
    font-size: 11px;
  }

  .scene-stage {
    height: min(63vh, 560px);
    min-height: 470px;
    border-width: 5px;
    border-radius: 28px;
  }

  .avatar-wrap {
    width: auto;
  }

  .category-rail {
    grid-auto-columns: 82px;
    margin: 0 -4px;
  }

  .category-button {
    min-height: 70px;
    border-radius: 19px;
    font-size: 11px;
  }

  .category-button svg {
    width: 29px;
    height: 29px;
  }

  .category-count {
    min-width: 24px;
    height: 24px;
    font-size: 10px;
  }

  .closet-panel {
    padding: 15px 12px;
    border-radius: 24px;
  }

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

  .item-card {
    min-height: 133px;
    grid-template-rows: 91px auto;
  }

  .item-preview {
    height: 91px;
  }

  .camera-layout {
    gap: 24px;
    padding: 16px 12px 96px;
  }

  .photo-stage {
    height: min(65vh, 590px);
    min-height: 470px;
    border-width: 5px;
    border-radius: 28px;
  }

  .camera-copy h1,
  .feed-heading h1 {
    font-size: 32px;
  }

  .pose-selector {
    margin-top: 18px;
  }

  .pose-button {
    min-height: 58px;
    padding: 8px;
    font-size: 12px;
  }

  .feed-view {
    padding: 24px 12px 96px;
  }

  .vs-view {
    padding: 20px 12px 96px;
  }

  .vs-heading {
    display: grid;
  }

  .vs-record {
    width: 100%;
  }

  .vs-record span {
    min-width: 0;
    flex: 1;
  }

  .vs-arena {
    grid-template-columns: 1fr;
  }

  .vs-medallion {
    width: 62px;
    height: 62px;
    margin: -26px auto;
  }

  .contestant-stage {
    height: min(62vh, 510px);
  }

  .vs-result,
  .vs-start-panel {
    grid-template-columns: 1fr;
  }

  .vs-actions {
    display: grid;
  }

  .vs-challenge-bar {
    grid-template-columns: 1fr;
  }

  .compact-action {
    width: 100%;
  }

  .shuffle-note {
    align-items: start;
  }

  .feed-heading {
    display: grid;
    margin-bottom: 22px;
  }

  .feed-heading .primary-action {
    width: 100%;
  }

  .feed-list {
    grid-template-columns: 1fr;
  }

  .post-photo {
    height: min(70vh, 530px);
  }
}

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