:root {
  font-family:
    -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue",
    sans-serif;
  color: #333;
  background: #f1eeee;
  font-synthesis: none;
  --brand: #8a011b;
  --canvas: #fafafa;
}

* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
a,
input {
  font: inherit;
}
button {
  cursor: pointer;
  color: inherit;
  border: 0;
  background: none;
  -webkit-tap-highlight-color: transparent;
}
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
}
button:disabled {
  cursor: wait;
  opacity: 0.5;
}
a {
  color: var(--brand);
}
.studio {
  width: 100%;
  max-width: 430px;
  height: 100dvh;
  min-height: 0;
  position: relative;
  margin: 0 auto;
  background: var(--canvas);
  overflow: hidden;
  container-type: inline-size;
}
.screen {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
}
.screen::-webkit-scrollbar {
  display: none;
}
#navigation {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 109px;
  display: flex;
  justify-content: space-around;
  align-items: flex-start;
  padding: 17px 26px 30px;
  background: linear-gradient(0deg, #fff 40%, #ffffff00);
  z-index: 5;
}
#navigation[hidden] {
  display: none;
}
.nav-item {
  position: relative;
  width: 94px;
  height: 62px;
  flex-shrink: 0;
  color: #999;
  font-size: 14px;
  font-weight: 500;
  display: grid;
  place-items: center;
}
.nav-item::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 0;
  width: 88px;
  height: 60px;
  background: url("assets/lace.webp") center/100% 100%;
  opacity: 0.5;
  transform: rotate(90deg);
  width: 60px;
  height: 88px;
  left: 17px;
  top: -14px;
}
.nav-item[aria-current="page"] {
  color: #333;
}
.nav-item[aria-current="page"]::before {
  opacity: 1;
}
.nav-item span {
  position: relative;
  z-index: 1;
}
.nav-ornament {
  position: absolute;
  z-index: 2;
  object-fit: contain;
  right: -5px;
  top: 3px;
  width: 25px;
  height: 47px;
  transform: rotate(18deg);
}
.nav-ornament.butterfly {
  top: 22px;
  right: -3px;
  width: 29px;
  height: 22px;
  transform: none;
}
.nav-shirt {
  position: absolute;
  right: -1px;
  top: 20px;
  width: 29px;
  height: 30px;
  color: #d8d3c9;
}
.mirror-screen {
  background: #f5f5f5;
  min-height: 100%;
  padding-bottom: 110px;
}
.mirror-stage {
  height: 121.6285cqw;
  max-height: calc(100dvh - 290px);
  min-height: 290px;
  position: relative;
}
.stage-background {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: fill;
}
.arch {
  position: absolute;
  left: 23.6641%;
  top: 14.2259%;
  width: 52.6718%;
  height: 91.4226%;
  background: #fff;
  border: 1px solid #8a011b40;
  border-radius: 110px 110px 22px 22px;
  overflow: hidden;
  z-index: 1;
}
.model-photo {
  position: absolute;
  left: 18.575%;
  top: 15.8996%;
  width: 58.7786%;
  height: 89.7489%;
  object-fit: cover;
  z-index: 2;
  pointer-events: none;
}
.model-photo.personal {
  left: 23.6641%;
  top: 14.2259%;
  width: 52.6718%;
  height: 91.4226%;
  object-fit: cover;
  border-radius: 110px 110px 22px 22px;
}
.mirror-stage.styling .arch {
  background: #b08d6c;
  border: 0;
}
.stage-control {
  position: absolute;
  z-index: 3;
  right: 5.6%;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  padding: 0;
}
.mode-control {
  top: 70.9%;
}
.model-control {
  top: 82.5%;
}
.stage-control:hover {
  background: #ffffff22;
}
.styling-piece {
  position: absolute;
  z-index: 2;
  object-fit: fill;
  pointer-events: none;
}
.piece-bottom {
  left: 31.635%;
  top: 46.85%;
  width: 41.685%;
  height: 55.82%;
  transform: rotate(3.88161deg);
  transform-origin: top left;
}
.piece-top {
  left: 27.866%;
  top: 26.758%;
  width: 42.122%;
  height: 41.692%;
  transform: rotate(-2.63084deg);
  transform-origin: top left;
}
.piece-top.changed {
  left: 32%;
  top: 30%;
  width: 35%;
  height: 30%;
  object-fit: contain;
  transform: none;
}
.piece-bottom.changed {
  left: 35%;
  top: 52%;
  width: 30%;
  height: 31%;
  object-fit: contain;
  transform: none;
}
.piece-dot {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #563f31;
  z-index: 3;
  padding: 0;
  transform: translate(-50%, -50%);
}
.piece-dot::before {
  content: "";
  position: absolute;
  inset: -17px;
}
.source-tabs {
  display: flex;
  gap: 24px;
  height: 44px;
  margin: 32px 0 8px;
  padding-left: 36px;
  align-items: center;
}
.source-tabs button,
.category-tabs button {
  height: 44px;
  position: relative;
  padding: 0;
  font-size: 16px;
  white-space: nowrap;
  color: #999;
}
.source-tabs button[aria-selected="true"],
.category-tabs button[aria-selected="true"] {
  color: #333;
  font-weight: 600;
}
.source-tabs button[aria-selected="true"]:after,
.category-tabs button[aria-selected="true"]:after {
  content: "";
  position: absolute;
  bottom: 4px;
  left: 4px;
  right: 4px;
  height: 2px;
  background: var(--brand);
}
.strip {
  display: flex;
  gap: 12px;
  padding: 0 16px;
  overflow-x: auto;
  scrollbar-width: none;
  scroll-snap-type: x mandatory;
}
.strip > .card {
  flex: 0 0 calc((100cqw - 56px) / 3);
  scroll-snap-align: start;
}
.card {
  position: relative;
  background: #fff;
  border: 1px solid #00000008;
  border-radius: 15px;
  padding: 0;
  overflow: hidden;
  min-width: 0;
}
.card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.outfit-card {
  aspect-ratio: 3/4;
}
.card[aria-pressed="true"] {
  outline: 1px solid #8a011b55;
  outline-offset: -1px;
}
.categories {
  display: flex;
  gap: 8px;
  overflow: auto;
  scrollbar-width: none;
  padding: 0 26px;
  margin-bottom: 14px;
}
.categories button {
  flex-shrink: 0;
  height: 44px;
  min-width: 61px;
  border-radius: 14px;
  background: #f0f0f0;
  font-size: 14px;
  padding: 0 16px;
  border: 1px solid transparent;
}
.categories button[aria-selected="true"] {
  background: #f6e9ec;
  border-color: #dca1ad;
}
.mirror-screen:has(.styling) .source-tabs {
  margin-bottom: 8px;
}
.mirror-screen .item-card {
  height: 110px;
}
.item-card img {
  width: 70%;
  height: 70%;
  margin: 15%;
  object-fit: contain;
}
.item-card[data-kind="tee"] img {
  width: 57%;
  height: 56%;
  margin: 22% auto;
}
.item-card[data-kind="yellow"] img {
  width: 69%;
  height: 49%;
  margin: 25% auto;
}
.closet-screen {
  padding: 72px 16px 110px;
  min-height: 100%;
}
.category-tabs {
  display: flex;
  gap: 24px;
  height: 44px;
  overflow: auto;
  scrollbar-width: none;
  margin: 0 8px 10px;
}
.closet-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px 12px;
}
.favorite-star {
  position: absolute;
  right: 8px;
  top: 8px;
  width: 34px !important;
  height: 32px !important;
  object-fit: contain !important;
}
.inspiration-screen {
  padding: 67px 8px 110px;
  min-height: 100%;
}
.feed {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  align-items: start;
}
.feed-column {
  display: grid;
  gap: 8px;
}
.feed-card {
  position: relative;
  border-radius: 4px;
  overflow: hidden;
  background: #f5f5f5;
  aspect-ratio: 184/245;
}
.feed-card.flat {
  aspect-ratio: 1;
}
.feed-open {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
}
.feed-open > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.flat .feed-open > img {
  width: 48%;
  height: 100%;
  margin: auto;
  object-fit: fill;
  opacity: 0.7;
}
.try-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  bottom: 7px;
  right: 7px;
  min-width: 48px;
  height: 32px;
  padding: 0 10px;
  border-radius: 20px;
  background: #00000020;
  border: 1px solid #ffffff20;
  color: white;
  font-size: 14px;
  backdrop-filter: blur(4px);
}
.try-chip::after {
  content: "";
  position: absolute;
  inset: -6px 0;
}
.feed-card .favorite-star {
  width: 29px !important;
  height: 27px !important;
  right: 7px;
  top: 8px;
}
.detail-screen {
  padding-top: 64px;
  padding-bottom: 90px;
  min-height: 100%;
}
.detail-top {
  position: relative;
  height: 51px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 0 23px;
}
.detail-wordmark {
  position: absolute;
  left: 50%;
  top: 12px;
  transform: translateX(-50%);
  width: 55px;
  height: 20px;
  object-fit: contain;
}
.back {
  width: 44px;
  height: 44px;
  margin-left: -9px;
  display: grid;
  place-items: center;
}
.back svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: #444;
  stroke-width: 1.8;
}
.favorite {
  width: 44px;
  height: 44px;
  padding: 0;
}
.favorite img {
  width: 42px;
  height: 39px;
  object-fit: contain;
}
.favorite[aria-pressed="false"] img {
  filter: grayscale(1);
  opacity: 0.35;
}
.detail-photo {
  display: block;
  width: 70.133%;
  aspect-ratio: 275.624/367;
  margin: 0 auto 16px;
  border-radius: 26px;
  object-fit: cover;
}
.detail-items {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 0 24px;
}
.detail-items .item-card {
  aspect-ratio: 1;
}
.detail-dock {
  position: absolute;
  bottom: 0;
  padding: 16px 40px 35px;
  display: flex;
  gap: 12px;
  width: 100%;
  background: linear-gradient(0deg, #fafafa 55%, #fafafa00);
  z-index: 6;
}
.primary,
.secondary {
  height: 44px;
  min-height: 44px;
  border-radius: 18px;
  padding: 0 18px;
  font-size: 14px;
  font-weight: 600;
}
.primary {
  background: var(--brand);
  color: white;
  border: 1px solid var(--brand);
}
.secondary {
  background: white;
  color: var(--brand);
  border: 1px solid #eacbd2;
}
.detail-dock button {
  flex: 1;
  white-space: nowrap;
  padding: 0 10px;
}
.empty {
  margin: 32px 24px;
  text-align: center;
  color: #777;
  font-size: 14px;
  line-height: 1.8;
}
.strip > .empty {
  flex: 1 0 100%;
  min-width: 0;
  margin: 24px 0;
  text-align: center;
}
.empty button,
.empty a {
  display: inline-block;
  margin-top: 14px;
}
.empty-stage {
  position: absolute;
  inset: 25% 28%;
  z-index: 2;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
  font-size: 14px;
  color: #777;
}
.empty-stage button {
  color: var(--brand);
}
#notice {
  position: absolute;
  left: 50%;
  top: 50%;
  width: max-content;
  max-width: calc(100% - 48px);
  transform: translate(-50%, -50%);
  background: rgba(248, 244, 239, .94);
  color: #62574f;
  border: 1px solid rgba(133, 113, 103, .15);
  box-shadow: 0 4px 18px rgba(60, 45, 35, .10);
  text-align: center;
  overflow-wrap: anywhere;
  border-radius: 12px;
  padding: 8px 14px;
  font-size: 12px;
  line-height: 1.5;
  z-index: 30;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
}
#notice.visible {
  opacity: 1;
}
dialog {
  width: calc(100% - 32px);
  max-width: 361px;
  max-height: 85dvh;
  overflow: auto;
  border: 0;
  border-radius: 24px;
  padding: 24px;
  background: #fafafa;
  color: #333;
  box-shadow: 0 12px 80px #0002;
}
dialog::backdrop {
  background: #0006;
}
dialog h2 {
  font-size: 18px;
  margin: 0 40px 22px 0;
}
dialog p {
  font-size: 14px;
  line-height: 1.7;
  color: #777;
}
dialog .close {
  position: absolute;
  right: 12px;
  top: 12px;
  width: 44px;
  height: 44px;
  font-size: 26px;
  border-radius: 50%;
}
/* Opening a dialog reads its title, rather than highlighting the close icon.
   Keyboard users still get a soft circular focus state, never a square frame. */
dialog #sheetTitle:focus,
dialog .close:focus {
  outline: none;
}
dialog .close:focus-visible {
  background: #f3e8ea;
  color: var(--brand);
}
.mirror-binding-sheet h2 { margin-bottom:8px; }
.mirror-binding-sheet p { margin:0 0 20px; }
.mirror-device-code {
  display:block; width:100%; min-width:0; height:56px; padding:15px 16px;
  border:1px solid #e5d3d7; border-radius:16px; background:#fff;
  color:#333; font-size:14px; line-height:24px; letter-spacing:.18em;
}
.mirror-device-code::placeholder { color:#999; font-size:inherit; line-height:inherit; letter-spacing:normal; }
.mirror-device-code:focus-visible { outline:2px solid var(--brand); outline-offset:2px; }
.tryon-access-form { display:grid; gap:12px; }
.tryon-access-form label { font-size:14px; color:#777; }
.tryon-access-form input { width:100%; min-width:0; min-height:48px; padding:12px 16px; border:1px solid #e7c4cd; border-radius:16px; background:#fff; color:#333; font:inherit; font-size:16px; }
.tryon-access-form input:focus-visible { outline:2px solid var(--brand); outline-offset:2px; }
.tryon-access-form .primary, .tryon-access-form .secondary { width:100%; min-height:48px; margin:0; }
.tryon-access-link { display:flex; align-items:center; justify-content:center; min-height:48px; text-decoration:none; }
#tryonAccessDescription { margin:0 0 4px; }
#tryonAccessMessage { margin:0; font-size:13px; color:var(--brand); overflow-wrap:anywhere; }
#tryonAccessMessage:empty { display:none; }
dialog .primary,
dialog .secondary {
  width: 100%;
  margin-top: 12px;
}
.model-options {
  display: flex;
  gap: 12px;
}
.model-option {
  flex: 1;
  height: 200px;
  background: white;
  border: 1px solid #e5d3d7;
  border-radius: 18px;
  padding: 12px;
}
.model-option img {
  height: 145px;
  max-width: 100%;
  object-fit: contain;
}
.model-option span {
  display: block;
  font-size: 14px;
}
.progress-art {
  height: 140px;
  display: block;
  margin: 10px auto;
}
.progress {
  height: 4px;
  border-radius: 4px;
  background: #eee;
  overflow: hidden;
  margin: 18px 0;
}
.progress i {
  display: block;
  background: var(--brand);
  height: 100%;
  width: var(--progress, 5%);
  transition: width 0.3s;
}
.result-tools {
  position: absolute;
  top: 50px;
  left: 16px;
  right: 16px;
  z-index: 4;
  display: flex;
  gap: 8px;
  justify-content: space-between;
}
.result-tools button {
  font-size: 14px;
  padding: 10px 14px;
  background: #fffd;
  border-radius: 18px;
  min-height: 44px;
}
.piece-options label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: white;
  border-radius: 12px;
  margin: 8px 0;
  font-size: 14px;
}
.piece-options img {
  width: 44px;
  height: 55px;
  object-fit: contain;
}
.piece-options input {
  width: 20px;
  height: 20px;
  accent-color: var(--brand);
}
@media (min-width: 700px) {
  body {
    padding: 24px;
  }
  .studio {
    width: 393px;
    height: min(852px, calc(100dvh - 48px));
    border-radius: 40px;
    box-shadow: 0 12px 48px #34212414;
  }
  .mirror-stage {
    max-height: calc(100dvh - 338px);
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
@media (max-height: 700px) {
  #navigation {
    height: 94px;
    padding-top: 14px;
  }
  .mirror-stage {
    max-height: none;
    min-height: 230px;
    height: clamp(230px, calc(100dvh - 360px), 330px);
  }
  .source-tabs {
    margin-top: 30px;
  }
  .detail-screen {
    padding-top: 32px;
  }
  .closet-screen {
    padding-top: 36px;
  }
  .inspiration-screen {
    padding-top: 28px;
  }
}
/* Source: Figma 201:23890 and 201:24095, measured at 393 × 852. */
.strip {
  scroll-padding-left: 16px;
}
.source-tabs {
  margin-bottom: 9px;
}
.strip > .card {
  flex-basis: calc((100cqw - 57px) / 3);
}
.nav-ornament {
  right: -2px;
  top: 4px;
}
.mirror-stage.styling .arch {
  background: transparent url("assets/arch.svg") center/100% 100%;
  border: 0;
}
.mirror-screen:has(.styling) {
  background: #fafafa;
}
.mirror-screen:has(.styling) .source-tabs {
  padding-left: 33px;
  margin-bottom: 8px;
}
.categories {
  padding-left: 28px;
  gap: 8px;
  margin-bottom: 15px;
}
.categories button {
  height: 42px;
  min-width: 60px;
  padding: 0 16px;
}
.mirror-screen .strip {
  padding: 0 24px;
  gap: 8px;
  scroll-padding-left: 24px;
}
.mirror-screen .strip > .card {
  flex-basis: calc((100cqw - 64px) / 3);
}
.mirror-screen .item-card {
  height: 110px;
}
#navigation {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding-left: 19px;
  padding-right: 19px;
}
.nav-item {
  justify-self: center;
}
.detail-dock .secondary {
  flex: 141;
}
.detail-dock .primary {
  flex: 160;
}
.detail-items {
  row-gap: 8px;
}
.detail-items .item-card {
  border-width: 0.357143px;
}
.back {
  margin-left: -12px;
}
.category-tabs {
  margin-left: 20px;
}
.nav-shirt {
  right: -11px;
}
.live-piece {
  left: 31%;
  top: 24%;
  width: 38%;
  height: 40%;
  object-fit: contain;
}
.live-piece-bottom,
.live-piece-skirt {
  top: 54%;
  height: 42%;
}
.live-piece-dress {
  top: 22%;
  height: 66%;
}
.live-piece-shoes {
  top: 89%;
  height: 12%;
}
.live-piece-bag,
.live-piece-accessory,
.live-piece-hat {
  left: 58%;
  top: 53%;
  width: 18%;
  height: 20%;
}
.flat .feed-open > img {
  width: 100%;
  height: 100%;
  opacity: 1;
  object-fit: fill;
}
.feed-card {
  aspect-ratio: 184/245;
}
.feed-card.flat {
  aspect-ratio: 1;
}
.card {
  border: 0;
  box-shadow: inset 0 0 0 0.357143px #00000014;
}
.outfit-card {
  aspect-ratio: 112.054/149.405;
}
.closet-grid {
  column-gap: 12.143px;
}
.closet-screen {
  padding-right: 16.66px;
}
.try-chip {
  height: 30px;
  bottom: 7px;
  font-weight: 400;
  min-width: 48px;
  background: #0000001a;
  backdrop-filter: none;
}
.nav-item::before {
  pointer-events: none;
}
/* Figma feed columns are 184px, with an 8.5px horizontal gutter. */
.feed {
  grid-template-columns: repeat(2, calc((100cqw - 25px) / 2));
  column-gap: 8.5px;
}
.closet-grid .outfit-card {
  height: calc(150px + (100cqw - 393px) * 0.38);
  aspect-ratio: auto;
}
.closet-grid .outfit-card > img:not(.favorite-star) {
  height: calc(100% - 0.6px);
  object-fit: fill;
}
.category-tabs {
  margin-bottom: 11px;
}

.category-tabs {
  margin-bottom: 10px;
}
.nav-shirt {
  width: 33.6784px;
  height: 28.4781px;
  top: 17px;
  right: -11.5px;
}
.closet-grid .favorite-star {
  width: 28.7336px !important;
  height: 26.1202px !important;
  right: 10.32px;
  top: 10.467px;
}

.load-more {
  display: block;
  margin: 20px auto;
  min-height: 44px;
}

.studio:not([data-reference]) .flat .feed-open > img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 1;
}

.model-library {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  padding: 4px 2px 12px;
  gap: 12px;
}
.model-library .model-option {
  flex: 0 0 64%;
  max-width: 190px;
  scroll-snap-align: start;
  height: auto;
  min-height: 210px;
}
.model-library .model-option img {
  display: block;
  width: 100%;
  height: 150px;
}
.model-library .model-option[aria-pressed="true"] {
  border: 2px solid #8a011b;
  background: #fff5f7;
}
.model-library small {
  color: #777;
  font-size: 12px;
}
.model-personal {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.delete-outfit {
  display: block;
  min-height: 44px;
  margin: 0 24px 12px auto;
  padding: 8px 16px;
  border: 1px solid #e7d6db;
  border-radius: 18px;
  color: #8a011b;
  background: white;
}

.mirror-profile-card {
  position: absolute;
  top: 34%;
  left: 2%;
  width: 21%;
  aspect-ratio: 102 / 151;
  z-index: 4;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 10px;
  padding: 12px 6px;
  background: url('/static/selfit/assets/lace-card@4x.webp') center / 100% 100% no-repeat;
  color: #715b54;
  text-decoration: none;
  font-size: 14px;
  white-space: nowrap;
}
.profile-card-title {
  color: #8a011b;
  font-family: 'Bradley Hand', 'Chalkboard SE', cursive;
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  transform: rotate(-4deg);
}
.mirror-screen .outfit-card[aria-pressed="true"] {
  outline: 2px solid #8a011b;
  outline-offset: -2px;
}
.mirror-screen .mirror-note-card .outfit-state {
  top: 7px;
  left: 7px;
  right: auto;
  bottom: auto;
}
.outfit-selected-label {
  position: absolute;
  top: 0;
  right: 0;
  padding: 4px 8px;
  border-radius: 0 14px 0 10px;
  background: #8a011b;
  color: #fff;
  font-size: 12px;
  line-height: 18px;
  font-weight: 600;
}

.mirror-loading {
  min-height: calc(100dvh - 110px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 72px 24px 32px;
  color: #73646a;
  text-align: center;
}
.mirror-loading p { margin: 0; font-size: 14px; }
.mirror-spinner {
  width: 32px;
  height: 32px;
  border: 2px solid #eadde1;
  border-top-color: #8a011b;
  border-radius: 50%;
  animation: mirror-spin .85s linear infinite;
}
@keyframes mirror-spin { to { transform: rotate(360deg); } }
@media (min-width: 600px) { .mirror-loading { min-height: 742px; } }
@media (prefers-reduced-motion: reduce) { .mirror-spinner { animation: none; } }

/* Reserve the upload dock and navigation outside the wardrobe scroll area. */
.studio[data-screen="closet"] {
  --closet-safe-bottom: max(0px, calc(env(safe-area-inset-bottom, 0px) - 24px));
  --closet-navigation-height: calc(109px + var(--closet-safe-bottom));
  --closet-upload-height: 72px;
  --closet-upload-bottom: calc(var(--closet-navigation-height) + 8px);
}
#studio[data-screen="closet"] > #screen {
  bottom: calc(var(--closet-upload-bottom) + var(--closet-upload-height) + 12px);
  overscroll-behavior-y: contain;
}
#studio[data-screen="closet"] > #navigation {
  height: var(--closet-navigation-height);
  background-size: 100% 109px;
  background-position: center top;
}
.studio[data-screen="closet"] .closet-screen.wardrobe-source-layout {
  padding-bottom: 24px;
}
.studio[data-screen="closet"] .closet-screen:has(.wardrobe-empty) {
  height: auto;
  min-height: 100%;
  padding-bottom: 24px;
}
#studio[data-screen="closet"] > .completion-notice {
  bottom: calc(var(--closet-upload-bottom) + var(--closet-upload-height) + 12px);
}
.studio > .add-garment {
  position: absolute;
  bottom: var(--closet-upload-bottom);
  left: 32px;
  right: 32px;
  height: var(--closet-upload-height);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 16px;
  margin: 0;
  border: 1px dashed rgb(138 1 27 / 24%);
  border-radius: 24px;
  background: rgb(255 255 255 / 56%);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: #795963;
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
  box-shadow: 0 5px 24px rgb(92 52 61 / 3%);
  z-index: 6;
}
.studio > .add-garment[hidden] { display: none; }
.studio > .add-garment:active { background: rgb(255 246 248 / 82%); }
.add-garment svg {
  display: block;
  flex: none;
  width: 30px;
  height: 30px;
  fill: none;
  stroke: rgb(138 1 27 / 64%);
  stroke-width: 1.5;
  stroke-linecap: round;
}

.outfit-composition {
  position: absolute;
  left: 23.6641%; top: 14.2259%; width: 52.6718%; height: 91.4226%;
  z-index: 3;
  pointer-events: none;
}
.composition-piece { position:absolute; }
/* Match the arch silhouette as a final guard against image overflow. */
.outfit-composition { border-radius:50% 50% 10% 10% / 24% 24% 5% 5%; overflow:hidden; }
.composition-piece img { width:100%; height:100%; object-fit:contain; display:block; }
.mirror-filter-definitions { position:absolute; pointer-events:none; }
.composition-piece.delicate-piece img { filter:url(#mirror-fine-accessory); }
.mirror-piece-preview { display:block; width:100%; height:160px; object-fit:contain; margin:16px auto; }
.mirror-piece-name { text-align:center; font-size:14px; }
.mirror-category-options { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; margin:16px 0; }
.mirror-category-options button { min-height:44px; padding:8px 4px; border:1px solid var(--line,#e7e7e7); border-radius:12px; font-size:14px; background:#fff; color:#666; }
.mirror-category-options button[aria-pressed="true"] { color:#8a011b; border-color:#8a011b; background:#fff5f6; }
.mirror-size-controls { display:flex; justify-content:center; align-items:center; gap:16px; margin:16px 0; font-size:14px; }
.mirror-size-controls button { width:44px; min-height:44px; border-radius:50%; background:#f5eeee; color:#8a011b; font-size:20px; }
.mirror-piece-hint { color:#777; font-size:14px; line-height:1.6; }
.mirror-piece-sheet > .primary { width:100%; margin-top:16px; }

/* The SVG preserves 207:437 internally: use the same box for the artwork
   and garment coordinates so its transparent side margins are not usable space. */
.mirror-stage.styling .arch,
.outfit-composition {
  left:50%; width:auto; aspect-ratio:207 / 437;
  transform:translateX(-50%);
}

/* Canvas controls operate on the draft, never on wardrobe library records. */
button.composition-piece { pointer-events:auto; padding:0; border:1px solid transparent; border-radius:8px; background:transparent; min-width:0; min-height:0; }
button.composition-piece[aria-pressed="true"] { border:1px dashed #8a011b; background:#fff2; }
button.composition-piece:focus-visible { outline:2px solid #8a011b; outline-offset:2px; }
.canvas-tools { position:absolute; left:16px; top:16px; z-index:5; display:flex; gap:8px; }
.canvas-tools button { width:44px; min-height:44px; padding:3px; background:#f6f0e8e8; color:#573b3b; border:0; border-radius:16px; font-size:22px; line-height:1; display:grid; justify-items:center; align-content:center; gap:2px; }
.canvas-tools button span { font-size:10px; line-height:1.2; }
.canvas-tools button:disabled { opacity:.45; cursor:default; }
.canvas-tools svg { width:22px; height:22px; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; }

.composition-actions { position:absolute; left:50%; top:14.2259%; height:91.4226%; aspect-ratio:207 / 437; transform:translateX(-50%); z-index:6; pointer-events:none; }
.canvas-remove { position:absolute; transform:translate(-50%,-50%); pointer-events:auto; width:44px; height:44px; padding:9px; border:0; background:transparent; display:grid; place-items:center; }
.canvas-remove svg { width:26px; height:26px; padding:5px; box-sizing:border-box; border-radius:50%; background:#8a011b; color:white; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; box-shadow:0 2px 6px #573b3b25; }
.canvas-remove:focus-visible { outline:2px solid #8a011b; outline-offset:0; }

/* Data categories and action sheets retain the original mirror layout. */
.closet-screen, .inspiration-screen { position: relative; }
.collection-brand {
  position: absolute;
  inset: 0 0 auto;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.collection-brand img { display: block; width: 55px; height: 20px; object-fit: contain; }
.category-tabs { overflow-x: auto; justify-content: flex-start; gap: 16px; }
.category-tabs button { flex-shrink: 0; min-height: 44px; }
#sheet > .primary, #sheet > .secondary { display: block; width: 100%; min-height: 44px; margin-top: 12px; }

.closet-screen:has(.wardrobe-empty) {
  display: flex; flex-direction: column; height: 100%; min-height: 660px;
  padding-bottom: 190px;
}
.closet-screen:has(.wardrobe-empty) .category-tabs { flex-shrink: 0; }
.closet-grid:empty { display: none; }
.wardrobe-empty {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  justify-content: center; text-align: center; padding: 24px 8px;
  animation: empty-arrive 350ms ease-out both;
}
.wardrobe-empty-art { position:relative; width:232px; height:196px; margin-bottom:22px; }
.empty-mirror { position:absolute; width:126px; height:169px; filter:drop-shadow(0 5px 8px #60453c12); }
.empty-mirror--back { left:102px; top:5px; transform:rotate(12deg); }
.empty-mirror--front { left:18px; top:23px; transform:rotate(-10deg); }
.empty-mirror-frame { position:absolute; inset:0; width:100%; height:100%; object-fit:fill; }
.empty-mirror-shirt { position:absolute; width:92px; height:104px; object-fit:contain; left:17px; top:30px; filter:drop-shadow(0 3px 3px #60453c12); }
.empty-mirror-butterfly { position:absolute; width:62px; height:50px; object-fit:contain; left:39px; top:48px; transform:rotate(-12deg); }

.wardrobe-empty h2 { margin: 0; font-size: 18px; line-height: 28px; color: #493b38; font-weight: 600; }
.wardrobe-empty h2 + .primary { margin-top:26px; }
.wardrobe-empty p { margin: 12px 0 26px; font-size: 14px; line-height: 25px; color: #82736e; }
.wardrobe-empty > .primary { width: 224px; max-width: 100%; min-height: 44px; border-radius: 18px; font-size: 14px; }
.empty-browse { margin-top: 8px; min-height: 44px; font-size: 14px; color: #8a6567; }
.empty-browse span { margin-left: 6px; }
@keyframes empty-arrive { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .wardrobe-empty { animation: none; } }

/* Figma App 1092:13832; measured header/chips/grid at y=72/133/191. */
.closet-screen.wardrobe-source-layout { padding:72px 20px 120px; }
.wardrobe-header { height:44px; display:flex; align-items:center; justify-content:space-between; margin-bottom:17px; flex-shrink:0; }
.wardrobe-header [role="tablist"] { display:flex; gap:24px; height:44px; }
.wardrobe-header [role="tab"] { position:relative; padding:0; border:0; background:transparent; color:#999; font-size:16px; font-weight:400; }
.wardrobe-header [aria-selected="true"] { color:#333; }
.wardrobe-header [aria-selected="true"]::after { content:""; position:absolute; left:0; right:0; bottom:5px; height:1px; background:#8a011b; }
.wardrobe-groups { min-width:0; }
.wardrobe-group + .wardrobe-group { margin-top:24px; }
.wardrobe-group h2 { display:flex; align-items:center; gap:8px; margin:0 0 12px; font-size:16px; line-height:26px; font-weight:600; color:#555; }
.wardrobe-group h2 > span { display:grid; place-items:center; width:26px; height:26px; border-radius:50%; background:#efeeee; font-size:17px; }
.wardrobe-items-row { display:grid; grid-auto-flow:column; grid-auto-columns:calc((100% - 24px)/3); gap:12px; min-width:0; overflow-x:auto; padding-bottom:6px; scroll-snap-type:x proximity; overscroll-behavior-x:contain; scrollbar-width:thin; scrollbar-color:#d9cbcd transparent; }
.wardrobe-items-row:focus-visible { outline:2px solid #8a011b; outline-offset:3px; border-radius:12px; }
.wardrobe-items-row .item-card { position:relative; display:flex; flex-direction:column; gap:8px; align-items:center; min-width:0; height:176px; aspect-ratio:auto; padding:10px; border-radius:16px; background:white; box-shadow:none; scroll-snap-align:start; }
.wardrobe-item-photo { display:block; flex:1; min-height:0; width:100%; padding:0; border:0; background:transparent; border-radius:8px; touch-action:pan-x pan-y; user-select:none; -webkit-user-select:none; -webkit-touch-callout:none; }
.wardrobe-item-photo > img { display:block; width:100%; height:100%; margin:0; object-fit:contain; object-position:center; -webkit-touch-callout:none; }
.wardrobe-style { flex-shrink:0; width:100%; min-height:44px; padding:0 4px; border:1px solid #edd8dd; border-radius:999px; background:#fff6f8; color:var(--brand); font-size:12px; line-height:18px; font-weight:600; white-space:nowrap; }
.wardrobe-style:active { background:#f7e7ec; }
.wardrobe-item-delete { position:absolute; top:2px; right:2px; display:grid; place-items:center; width:44px; height:44px; padding:10px; border:0; border-radius:50%; background:#fff1f4; color:var(--brand); box-shadow:0 2px 8px #6335401a; }
.wardrobe-item-delete[hidden] { display:none; }
.wardrobe-item-delete svg { width:24px; height:24px; fill:none; stroke:currentColor; stroke-width:1.6; stroke-linecap:round; stroke-linejoin:round; }
.wardrobe-items-row .show-delete { box-shadow:inset 0 0 0 1px #ecd1d8; }
.wardrobe-items-row [aria-busy="true"] .wardrobe-item-photo { opacity:.5; }
.wardrobe-items-row button:disabled { cursor:wait; opacity:.5; }
.wardrobe-source-layout .closet-grid { gap:12px; }
.wardrobe-source-layout .closet-grid .card { height:150px; aspect-ratio:auto; padding:8px; border-radius:12px; box-shadow:none; background:#fff; }
.wardrobe-source-layout .closet-grid .card > img:not(.favorite-star) { display:block; height:100%; width:100%; margin:0; object-fit:contain; object-position:center; }
.wardrobe-source-layout.wardrobe-outfits .wardrobe-header { margin-bottom:20px; }
.wardrobe-outfits .closet-grid { column-gap:8px; grid-template-columns:repeat(3,minmax(0,1fr)); width:calc(100% - .571px); }
.wardrobe-outfits .closet-grid .card { padding:0; border-radius:14.2857px; }

/* Figma garment sheet 1128:6291, image 1128:6342, CTA 1128:6304. */
#sheet.garment-sheet { position:fixed; inset:auto 0 0; width:min(100vw,430px); max-width:none; height:450px; max-height:90dvh; margin:0 auto; padding:0; border-radius:16px 16px 0 0; }
.garment-sheet #sheetTitle, .garment-sheet > .close { position:absolute; width:1px; height:1px; margin:-1px; padding:0; overflow:hidden; clip-path:inset(50%); }
.garment-sheet > .close:focus-visible { clip-path:none; width:44px; height:44px; top:8px; left:8px; margin:0; }
.garment-sheet-image { position:absolute; top:56px; left:50%; transform:translateX(-50%); width:300px; height:300px; max-width:85%; object-fit:contain; }
#sheet.garment-sheet > .garment-sheet-cta { position:absolute; top:366px; left:40px; width:calc(100% - 80px); height:44px; min-height:44px; margin:0; border-radius:18px; }
.garment-delete { position:absolute; right:12px; top:12px; width:44px; height:44px; border:0; background:transparent; color:#8a011b; padding:12px; }
.garment-delete svg { width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
@media(min-width:700px) { #sheet.garment-sheet { width:393px; bottom:max(24px,calc(100dvh - 876px)); } }
@media(max-height:500px) { #sheet.garment-sheet { height:90dvh; } .garment-sheet-image { top:40px; height:calc(90dvh - 124px); } #sheet.garment-sheet > .garment-sheet-cta { top:auto; bottom:20px; } }

/* Source navigation1092:13869: contiguous lace and separate 55x56 AI button. */
#navigation { height:109px; padding:0; display:block; background:url("assets/main-app/nav-background.webp?v=20260908-assets7") center / 100% 100% no-repeat; }
#navigation .nav-item { position:absolute; top:18px; height:60px; width:21%; background:transparent; border:0; font-size:14px; font-weight:400; }
#navigation .nav-item:nth-child(1) { left:8.9%; }
#navigation .nav-item:nth-child(2) { left:29%; }
#navigation .nav-item:nth-child(3) { left:49.6%; }
#navigation .nav-item::before { display:none; }
#navigation .nav-item span { position:relative; z-index:1; }
#navigation .nav-item[aria-current="page"] { color:#333; font-weight:500; }
#navigation .nav-shirt { width:38px; height:32px; top:10px; right:-7px; transform:rotate(10deg); }
#navigation .nav-ai { position:absolute; left:78.625%; top:21px; width:14%; height:56px; padding:0; border:0; background:transparent; border-radius:50%; }
.nav-ai img { width:100%; height:100%; object-fit:contain; }
.chat-screen { height:100%; display:flex; flex-direction:column; background:#f5f5f5; padding-top:40px; }
.chat-header { display:flex; align-items:center; height:52px; flex-shrink:0; padding:0 16px; position:relative; }
.chat-header button { width:44px; height:44px; font-size:30px; background:none; border:0; }
.chat-header h1 { font-size:16px; font-weight:500; margin:0; position:absolute; left:50%; transform:translateX(-50%); }
.chat-messages { flex:1; min-height:0; overflow:auto; padding:20px; }
.chat-welcome { padding-top:60px; text-align:center; }
.chat-welcome h2 { font-size:22px; font-weight:500; }
.chat-welcome p { color:#777; font-size:14px; line-height:1.8; }
.chat-message { margin:0 0 20px; max-width:90%; width:fit-content; }
.chat-message p { margin:5px 0 0; padding:12px 16px; border-radius:16px; background:white; white-space:pre-wrap; overflow-wrap:anywhere; font-size:14px; line-height:1.7; }
.chat-message.from-user { margin-left:auto; }
.chat-message.from-user p { background:#f0e3e5; }
.chat-speaker { color:#888; font-size:11px; }
.chat-composer { padding:12px 16px max(20px,env(safe-area-inset-bottom)); display:flex; gap:8px; background:#fafafa; border-top:1px solid #eee; align-items:flex-end; }
.chat-composer textarea { flex:1; min-width:0; resize:none; border:1px solid #e4d7db; border-radius:16px; padding:12px; font:inherit; font-size:14px; background:white; }
.chat-composer button { min-width:60px; height:44px; padding:0 14px; }
.chat-error { font-size:13px; line-height:1.8; color:#8a011b; }
.chat-error a { display:block; text-decoration:underline; }
.sr-chat-label { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }

/* Account archive — Figma 1092:12585 / 1092:16208. */
.profile-screen { min-height:100%; padding:60px 16px 80px; color:#262626; background:#fafafa; }
.profile-header { height:44px; display:grid; grid-template-columns:44px 1fr 44px; align-items:center; margin-bottom:20px; }
.profile-header h1 { font-size:14px; font-weight:500; text-align:center; margin:0; }
.profile-header button { border:0; background:transparent; padding:10px; width:44px; height:44px; color:inherit; }
.profile-header button:disabled { opacity:.25; }
.profile-header svg { width:24px; height:24px; fill:none; stroke:currentColor; stroke-width:1.5; stroke-linecap:round; stroke-linejoin:round; }
.profile-analysis { background:white; border-radius:20px; padding:20px; }
.profile-more h2 { font-weight:400; font-size:14px; line-height:20px; margin:0 0 8px; }
/* 我的档案顶部 suit 模块：照片并排 + 共享特征卡（卡片样式在 selfit-suit-cards.css）。 */
.profile-suit-photos { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.profile-suit-photos .profile-photo { width:100%; height:auto; aspect-ratio:166/203; border-radius:12px; }
.profile-suit-photos .profile-photo-empty { font-size:13px; }
.profile-photo-slot { min-width:0; }
.profile-photo-retry { display:block; padding:0; border:1px solid #e4d7db; font:inherit; cursor:pointer; }
.profile-photo-retry:focus-visible { outline:2px solid #8a011b; outline-offset:3px; }
.profile-suit-cards { margin-top:4px; }
/* 照片直接点击替换：与 onboarding 的 suit 页一致（档案页无编辑按钮）。 */
.profile-photo-replace { position:relative; display:block; cursor:pointer; }
.profile-photo-replace input { position:absolute; inset:0; width:100%; height:100%; opacity:0; cursor:pointer; }
.profile-photo-replace:focus-within { outline:2px solid #8a011b; outline-offset:3px; }
.profile-photo-swap { position:absolute; right:6px; bottom:6px; width:24px; height:24px; border-radius:50%; display:grid; place-items:center; background:rgba(138,1,27,.85); color:#fff; font-size:15px; line-height:1; pointer-events:none; }
.profile-photo-replace:active img { opacity:.8; }
.profile-photo-replace.is-replacing::after { content:"正在更换…"; position:absolute; inset:0; display:grid; place-items:center; background:rgba(255,255,255,.72); color:#8a011b; font-size:13px; }
.profile-photo { width:73.4px; height:88px; border-radius:7px; overflow:hidden; background:#f3f1ef; }
.profile-photo>img { width:100%; height:100%; object-fit:cover; display:block; }
.profile-photo-empty { height:100%; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:6px; font-size:12px; color:#999; }
.profile-photo-empty small { font-size:10px; }
.profile-attribute { display:flex; flex-direction:column; align-items:center; gap:8px; font-size:14px; white-space:nowrap; }
.profile-attribute-art { height:56px; width:36px; object-fit:contain; }
.profile-skin { display:block; width:40px; height:40px; border-radius:50%; margin:8px 0; flex-shrink:0; }
.profile-unknown { display:grid; place-items:center; height:56px; width:36px; color:#bbb; }
.profile-report-card { position:relative; width:100%; max-width:361px; margin:24px auto 0; }
.profile-report { width:100%; display:grid; place-items:center; background:transparent; color:var(--brand); text-align:center; text-decoration:none; }
.profile-report>img { display:block; width:100%; height:auto; object-fit:contain; object-position:center; }
.profile-report strong { display:block; margin:32px 0 92px; font-size:24px; line-height:1.8; }
.profile-test-invite { position:relative; display:flex; gap:24px; margin:0; padding:28px 20px; border-radius:16px; background:#8a011b url('assets/main-app/profile-textile.webp') center/cover; color:white; text-decoration:none; height:262.824px; flex-direction:column; align-items:center; padding-bottom:26.824px; }
.profile-test-invite span { font-size:14px; }
.profile-more { margin-top:24px; }
.profile-more h2 { color:#888; margin-bottom:16px; }
.profile-more>div { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.profile-more button { height:70px; border:0; background:white; border-radius:16px; font-size:14px; color:#888; box-shadow:0 0 30px #5959590d; display:flex; gap:12px; padding:10px 16px; align-items:center; text-align:left; }
.profile-more small { display:block; font-size:11px; margin-top:5px; color:#aaa; }
.profile-status { min-height:300px; display:grid; align-content:center; justify-items:center; font-size:14px; color:#888; }
.profile-status button,.profile-status a { text-decoration:none; border:1px solid #d8bbc0; background:white; color:#8a011b; border-radius:24px; padding:12px 24px; }
.profile-edit-screen { display:flex; flex-direction:column; padding-bottom:36px; min-height:852px; }
.profile-edit-photos { display:grid; grid-template-columns:1fr 1fr; gap:25.4px; }
.edit-photo { position:relative; width:100%; height:auto; aspect-ratio:167.654/201; border-radius:8px; cursor:pointer; }
.edit-photo>img { filter:brightness(.6); }
.profile-photo-plus { position:absolute; left:50%; top:50%; transform:translate(-50%,-50%); width:48px; height:48px; border-radius:50%; display:grid; place-items:center; background:#8a011b; color:white; font-size:25px; }
.edit-photo input { position:absolute; inset:0; opacity:0; width:100%; height:100%; cursor:pointer; }
.edit-photo:focus-within { outline:2px solid #8a011b; outline-offset:3px; }
.profile-edit-fields { margin:28px 20px 24px; }
 .profile-edit-hint { margin:0 0 12px; color:#777; font-size:14px; line-height:20px; }
.profile-edit-fields .profile-field-row { position:relative; display:flex; min-height:72px; gap:12px; align-items:center; padding:10px 12px; margin-top:8px; border:1px solid #eadfe1; border-radius:14px; background:#fff; font-size:14px; cursor:pointer; transition:background .15s,border-color .15s; }
.profile-field-label { color:#777; flex:1; }
.profile-field-value { color:#333; font-size:14px; font-weight:500; }
.profile-field-chevron { width:16px; height:20px; flex-shrink:0; fill:none; stroke:#9f6b75; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; }
.profile-edit-fields .profile-field-row select { position:absolute; inset:0; width:100%; height:100%; max-width:none; opacity:0; cursor:pointer; font-size:16px; }
.profile-field-row:hover { border-color:#c599a3; }
.profile-field-row:active { background:#f8eff1; }
.profile-field-row:focus-within { outline:2px solid #8a011b; outline-offset:2px; }
.profile-field-row:has(select:disabled) { opacity:.6; cursor:wait; }
.profile-edit-fields .profile-attribute-art { width:44px; height:42px; }
.profile-edit-fields .profile-skin { width:40px; height:40px; margin:0 2px; }
.profile-save { margin:auto 16px 0; min-height:44px; border:0; border-radius:22px; background:#8a011b; color:white; font-size:14px; font-weight:500; }
.profile-logout { display:block; width:100%; margin-top:32px; min-height:44px; border:0; border-radius:22px; background:#8a011b; color:white; font-size:14px; font-weight:500; }
.profile-logout:active { background:#720015; }
.profile-save-error { color:#8a011b; font-size:13px; margin:0 20px 20px; line-height:1.6; }
.profile-save:disabled { opacity:.6; }
.profile-gender-row { display:flex; align-items:center; gap:12px; width:100%; min-height:56px; margin:0 0 20px; padding:12px 18px; border:1px solid #eadfe1; border-radius:20px; background:#fff; text-align:left; color:#685d60; }
.profile-gender-row strong { margin-left:auto; color:#333; font-size:14px; }
.profile-gender-help { max-width:353px; margin:8px auto 24px; padding:0 12px; color:#84777b; font-size:14px; line-height:1.7; }
.profile-gender-options { display:grid; grid-template-columns:1fr 1fr; gap:12px; max-width:353px; margin:0 auto; padding:0 12px; }
.profile-gender-options button { display:flex; align-items:center; justify-content:center; gap:12px; min-height:84px; border:1px solid #eadfe1; border-radius:20px; background:#fff; color:#685d60; font-size:16px; }
.profile-gender-options button[aria-pressed="true"] { border-color:#ff4f86; background:#fff0f5; color:#a72250; }
.profile-gender-screen .profile-save { background:#ff4f86; font-weight:600; }
.profile-gender-options button:focus-visible,.profile-gender-row:focus-visible { outline:2px solid #ff4f86; outline-offset:3px; }
.home-notes-notice { margin:0 16px 12px; color:#857477; font-size:12px; line-height:1.6; }
.mirror-profile-card { border:0; }
.profile-more button>img { width:28px; height:46px; object-fit:contain; }
.profile-more button>span { min-width:0; font-size:12px; }
.profile-test-invite strong { font-size:20px; line-height:20px; font-weight:400; }
.profile-test-invite>img { width:234.648px; height:100px; object-fit:contain; }
.profile-test-invite>span,.profile-retest { display:grid; place-items:center; min-height:44px; width:118px; border-radius:22px; background:transparent; color:#333; font-size:14px; margin-top:-4px; position:relative; isolation:isolate; }
.profile-retest { position:absolute; left:50%; bottom:12px; transform:translateX(-50%); margin:0; text-decoration:none; }
.profile-test-invite>* { flex-shrink:0; }
.profile-test-invite>span::before,.profile-retest::before { content:""; position:absolute; inset:4px 0; background:white; border-radius:18px; z-index:-1; }
@media(max-width:430px) { .profile-edit-screen { min-height:100dvh; } }

.profile-test-invite>.profile-test-pin { position:absolute; width:97.153px; height:68.5184px; left:-18.407px; top:-11.249px; }

/* App inspiration source 1092:14592; preserve distinct flat-lay and note proportions. */
.inspiration-screen { padding:78px 9px 110px; }
.feed-card { border-radius:8px; }
.feed-card.flat .feed-open > img { width:100%;height:100%;object-fit:contain;opacity:1; }
.note-detail { padding:60px 24px 120px; }
.note-detail header { height:44px;display:flex;align-items:center;position:relative;margin-bottom:23px; }
.note-detail h1 { font-size:16px;line-height:22px;text-align:center;margin:0 42px;flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
.note-detail .back { position:absolute;left:-12px;top:0;width:44px;height:44px; }
.note-detail .favorite { position:absolute;right:0;top:0;width:44px;height:44px; }
.note-detail .favorite[aria-pressed="false"] img { filter:grayscale(1);opacity:.45; }
.note-detail-photo { display:block;width:80%;max-height:460px;object-fit:contain;margin:auto;border-radius:16px; }
.note-attribution { display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:20px 0;color:#777;font-size:12px; }
.note-attribution a { color:#8a011b; }

.note-detail .favorite svg { width:20px;height:20px;fill:#999; }
.note-detail .favorite[aria-pressed="true"] svg { fill:#8a011b; }
.detail-dock.note-dock { padding-left:24px;padding-right:24px;gap:10px; }
.detail-dock.note-dock button { flex:1;width:0;min-width:0; }

/* Source 1128:6449: personal outfit opens over its wardrobe grid. */
.outfit-sheet .garment-sheet-image { top:34px;width:225px;height:300px; }
.sheet-handle { position:absolute;top:7px;left:calc(50% - 16px);width:32px;height:4px;border-radius:2px;background:#0003; }
.outfit-detail-image { display:block;width:276.373px;max-width:100%;height:367px;object-fit:contain;margin:auto;border-radius:16px; }
.outfit-detail-pieces { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-top:20px; }
.outfit-detail-pieces .card { width:100%;height:auto;aspect-ratio:1;border-radius:19px; }
.detail-remove { display:block;width:44px;height:44px;margin:12px 0 0 auto;color:#8a011b; }
.detail-remove svg { width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.5; }
@media(max-height:500px) { .outfit-sheet .garment-sheet-image { top:30px;height:calc(90dvh - 120px); } }

/* Upload confirmation: only selected extraction candidates are committed. */
.import-review header { margin-bottom:11px; }
.import-review-photo { display:block;width:276.373px;max-width:100%;height:367px;object-fit:contain;border-radius:16px;margin:auto; }
.import-review-copy { margin:16px 0 12px;color:#999;font-size:10px;line-height:14px;text-align:center; }
.import-review-pieces { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px; }
.import-choice { position:relative;aspect-ratio:1;background:#fff;border-radius:19px;padding:12px; }
.import-choice img { display:block;width:100%;height:100%;object-fit:contain; }
.import-choice span { position:absolute;right:12px;bottom:12px;width:12px;height:12px;border-radius:50%;background:#8a011b;color:#fff;font-size:9px;line-height:12px; }
.import-choice[aria-pressed="false"] img { opacity:.3; }
.import-choice[aria-pressed="false"] span { background:#eee; }
.import-review-error { color:#8a011b;font-size:13px;line-height:20px; }

.resume-import { width:100%;padding:12px;margin-bottom:12px;border-radius:12px;background:#f4edef;color:#8a011b;font-size:12px; }

/* Source1092:12499: the design reference retains its composite mirror frame. */
.result-viewer { position:relative;min-height:0;height:100%;background:#f5f5f5; }
.result-viewer-background,.result-viewer-reference { position:absolute;inset:0;width:100%;height:100%;object-fit:fill; }
.result-viewer-photo { position:absolute;left:8.78%;top:8.745%;width:82.43%;height:81.925%;object-fit:contain;border-radius:50% 50% 8% 8% / 24% 24% 4% 4%; }
.viewer-collapse { position:absolute;left:11.93%;top:84.65%;width:44px;height:44px;padding:10px; }
.viewer-collapse img { width:24px;height:24px;display:block; }
/* Live images own their rounded edges; the background contains no empty mirror.
   Reserve a separate row for the close action so it never covers the photo. */
.result-viewer.is-photo { display:flex;flex-direction:column;align-items:center;gap:16px;padding:24px 20px max(24px, env(safe-area-inset-bottom)); }
.result-viewer.is-photo .result-viewer-background { bottom:auto;height:auto;max-height:61%;object-fit:cover;object-position:top;pointer-events:none; }
.result-viewer-photo-area { position:relative;z-index:1;display:flex;align-items:center;justify-content:center;flex:1;min-height:0;width:100%; }
.result-viewer.is-photo .result-viewer-photo { position:static;display:block;flex:none;width:auto;height:auto;max-width:100%;max-height:100%;border-radius:24px;object-fit:contain; }
.result-viewer.is-photo .viewer-collapse { position:relative;z-index:1;left:auto;top:auto;flex:none;display:flex;align-items:center;justify-content:center;gap:8px;width:auto;min-width:132px;height:44px;padding:10px 20px;border-radius:999px;background:#fff;color:#666;font-size:14px; }
.result-expand { position:absolute;z-index:4;left:24%;bottom:-5%;width:44px;height:44px;padding:14px;color:#999; }
.result-expand svg { display:block;width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.5; }

.result-viewer-reference { object-fit:contain; }

/* The source keeps generation inside the mirror, over the submitted photograph. */
.mirror-stage.is-generating .model-photo { opacity:.12; }
.mirror-stage.is-generating .stage-control { visibility:hidden; }
.mirror-generation {
  position:absolute; z-index:6; left:23.6641%; top:14.2259%;
  width:52.6718%; height:91.4226%; display:flex; flex-direction:column;
  justify-content:center; align-items:center; gap:10px; color:#8a011b;
  pointer-events:none;
}
.mirror-generation > span { font:italic 22px/1.2 Georgia,serif; }
.mirror-generation > strong { font-size:16px; font-weight:600; }

.mirror-screen .strip { margin-top:64px; }
.outfit-state { position:absolute; bottom:8px; right:8px; width:14px; height:14px;
  display:grid; place-items:center; border-radius:50%; background:#8a011b; color:white; font-size:10px; }
.outfit-state.pending { background:transparent; border:1.5px solid #8a011b40;
  border-right-color:#8a011b; animation:outfit-progress 1s linear infinite; }
@keyframes outfit-progress { to { transform:rotate(360deg); } }
@media (prefers-reduced-motion:reduce) { .outfit-state.pending { animation:none; } }

.mirror-profile-card { left:78.88%; top:61.09%; width:21.12%; aspect-ratio:83/76;
  padding:0; background:url('/static/selfit-tryon/assets/main-app/mirror-profile.webp?v=20260908-assets7') center/100% 100% no-repeat; }
.mirror-profile-card > span { visibility:hidden; }
.model-mode .arch, .model-mode .mirror-photo-frame { left:24.17%; top:14.64%; width:51.66%; height:90.59%; }
.model-mode .arch { border:2px solid #ccc3b8; }
.has-framed-photo .arch { visibility:hidden; }
.mirror-photo-frame { position:absolute; z-index:2; display:flex; align-items:center; justify-content:center; }
/* Round the fitted image itself, so contain never exposes a separate frame. */
.mirror-photo-frame > .model-photo.personal { position:static; display:block; flex:none; width:auto; height:auto; max-width:100%; max-height:100%; border-radius:110px 110px 22px 22px; background:#f4f0ec; object-fit:contain; object-position:center; }
/* Portraits keep their complete vertical extent at a stable mirror height.
   Clip excess width at the arch, without stretching the body or trimming head/feet. */
.mirror-photo-frame[data-fit="height"] { overflow:hidden; border-radius:110px 110px 22px 22px; }
.mirror-photo-frame[data-fit="height"] > .model-photo.personal { height:100%; max-width:none; }
.model-mode .stage-control { background:#ffffffdd; color:#777; }
.model-mode .mode-control { background:url('/static/selfit-tryon/assets/main-app/mirror-mode.webp') center/contain no-repeat; }
.mirror-generation { inset:0; width:100%; height:100%; display:block; }
.mirror-generation img { width:100%; height:100%; }

/* Source 1092:15337: compact controls within the mirror and paged outfit strip. */
.mirror-favorite { position:absolute; z-index:4; left:calc(64.12% - 6px); top:calc(95.81% - 6px); width:56px; height:56px;
  display:grid; place-items:center; padding:12px; color:#ccc; border:0; border-radius:50%; background:transparent; touch-action:manipulation; }
.mirror-favorite svg { width:32px; height:32px; fill:currentColor; pointer-events:none; }
.mirror-favorite[aria-pressed="true"] { color:#8a011b; }
.model-mode .result-expand { left:24.17%; top:95.81%; bottom:auto; }
.mirror-screen .strip { padding:0 17px; margin-top:62px; }
.mirror-screen .strip > .card { flex-basis:calc((100cqw - 58px)/3); aspect-ratio:112.143/150; border-radius:14.286px; }
.mirror-pagination { display:flex; justify-content:center; gap:4px; height:5px; margin:27px 0 0; }
.mirror-pagination span { width:5px; height:5px; border-radius:50%; background:#ccc; }
.mirror-pagination span[data-active="true"] { background:#262626; }

.model-mode .has-result .stage-control { visibility:hidden; }
.mirror-result-actions { position:absolute; top:13.18%; left:84.48%; width:44px; height:44px; z-index:4; padding:0; }
.mirror-result-actions img { display:block; width:100%; height:100%; }
.mirror-screen .outfit-card[aria-pressed="true"] { border:0.5px solid #8a011b; outline:none; box-shadow:none; background:#8a011b14; }
.mirror-screen .outfit-card[aria-pressed="true"] > img:not(.favorite-star) { opacity:.7; }
.model-photo[data-action="compare"] { cursor:pointer; touch-action:pan-y; }

.feed-favorite { position:absolute; z-index:2; right:0; top:0; width:44px; height:44px; padding:13px; background:transparent; color:#999; }
.feed-favorite svg { width:18px; height:18px; fill:currentColor; }
.feed-favorite[aria-pressed="true"] { color:#8a011b; }
.feed-favorite:disabled { opacity:.5; }
.feed-card .feed-favorite { top:auto; bottom:0; right:55px; width:44px; height:44px; padding:8px; display:grid; place-items:center; color:rgba(255,255,255,.65); filter:drop-shadow(0 1px 2px rgba(0,0,0,.15)); }
.feed-card .feed-favorite svg { width:28px; height:28px; pointer-events:none; }
.feed-card .feed-favorite[aria-pressed="true"] { color:#8a011b; }

.topic-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
.inspiration-notes { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
.topic-grid + .inspiration-notes { margin-top:24px; }
.inspiration-notes .feed-open > img { object-fit:contain; }
.note-persona-badge { pointer-events:none; }
.topic-card { position:relative; display:block; min-width:0; padding:0; overflow:hidden; border-radius:16px; background:#f0eceb; text-align:left; }
.topic-cover { display:block; width:100%; aspect-ratio:1; object-fit:cover; }
.topic-previews { display:flex; justify-content:center; gap:4px; padding:9px 10px 10px; }
.topic-previews img { display:block; width:calc((100% - 8px)/3); aspect-ratio:3/4; object-fit:cover; }
.topic-previews img:first-child { transform:rotate(-5deg); }
.topic-previews img:last-child { transform:rotate(5deg); }
.topic-badge { position:absolute; top:8px; left:8px; max-width:calc(100% - 16px); padding:6px 10px; border-radius:999px; background:rgba(240,240,240,.6); color:#333; box-shadow:0 2px 8px #0000000a; font-size:14px; font-weight:600; line-height:20px; overflow-wrap:anywhere; transform:scale(.7); transform-origin:top left; }
.topic-card:focus-visible { outline:2px solid var(--brand); outline-offset:2px; }
.topic-screen { min-height:100%; padding:60px 9px 32px; }
.topic-screen header { height:44px; display:flex; align-items:center; justify-content:center; position:relative; margin-bottom:23px; }
.topic-screen .back { position:absolute; left:3px; width:44px; height:44px; padding:12px; }
.topic-screen .back svg { width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:2; }
.topic-screen h1 { font-size:16px; font-weight:600; line-height:22px; margin:0 48px; }
.topic-group-title { margin:24px 4px 12px; font-size:14px; font-weight:600; }


.history-screen { min-height:100%; padding:20px 20px max(24px,env(safe-area-inset-bottom)); background:#f5f1ef; }
.history-header { position:sticky; top:-20px; z-index:2; display:grid; grid-template-columns:44px minmax(0,1fr) 44px; align-items:center; margin:-20px -20px 20px; padding:max(20px,env(safe-area-inset-top)) 12px 12px; background:#f5f1ef; }
.history-header h1 { margin:0; font-size:20px; line-height:28px; font-weight:600; text-align:center; }
.history-header button { display:grid; place-items:center; width:44px; height:44px; padding:10px; }
.history-header svg { width:24px; height:24px; fill:none; stroke:currentColor; stroke-width:1.75; stroke-linecap:round; stroke-linejoin:round; }
.tryon-history { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); align-items:start; gap:20px 16px; }
.history-card { display:grid; grid-template-rows:minmax(0,1fr) 32px; width:100%; min-width:0; aspect-ratio:3/5; padding:0; overflow:hidden; border-radius:16px; background:#fff; }
.history-card img { width:100%; height:100%; min-height:0; display:block; object-fit:contain; }
.history-card time { display:grid; place-items:center; font-size:12px; line-height:18px; font-weight:600; color:#666; }
.history-empty { display:flex; flex-direction:column; align-items:center; justify-content:center; min-height:280px; gap:12px; text-align:center; color:#777; font-size:14px; line-height:22px; }
.history-empty p { margin:0; color:#555; font-size:16px; }
.history-empty .secondary { width:auto; min-width:132px; margin-top:12px; }

.completion-notice { position:absolute; z-index:45; left:50%; bottom:117px; transform:translateX(-50%); display:flex; align-items:center; gap:8px; height:44px; padding:0 14px; border:1px solid #ffffff66; border-radius:999px; background:rgb(240 240 240 / 78%); color:#333; box-shadow:0 4px 16px #3e252c14; white-space:nowrap; }
.completion-notice span { font-size:14px; line-height:20px; font-weight:500; }
.completion-check { width:20px; height:20px; color:var(--brand); }
.completion-chevron { width:14px; height:14px; fill:none; stroke:#999; stroke-width:1.75; stroke-linecap:round; stroke-linejoin:round; }
.completion-notice[hidden] { display:none; }


.model-mode .stage-control { display:none; }

.mirror-screen .strip { gap:12px; }
.mirror-screen .strip > .card { flex-basis:28.5351cqw; }

/* Default mirror artwork and expansion control from 1092:11867. */
.model-mode .model-photo:not(.personal) { left:18.3199%; top:17.0008%; width:58.015%; height:88.3236%; object-fit:contain; }
.model-mode .result-expand { padding:0; }
.result-expand img { display:block; width:44px; height:44px; }

/* Conversation: light editorial collage, useful starting points, quiet composer. */
.chat-screen { background:var(--canvas); padding-top:max(20px,env(safe-area-inset-top)); }
.chat-header { height:64px; border-bottom:1px solid #eee; }
.chat-header-title { position:absolute; left:50%; transform:translateX(-50%); text-align:center; white-space:nowrap; }
.chat-header-title h1 { position:static; transform:none; font-size:16px; font-weight:600; }
.chat-header-title > span { display:block; font-size:10px; color:#999; margin-top:4px; }
.chat-messages { padding:20px 24px 24px; }
.chat-welcome { padding-top:0; max-width:350px; margin:0 auto; }
.chat-welcome-art { margin:0 auto 16px; }
.chat-welcome .chat-eyebrow { color:var(--brand); font-size:11px; margin:0 0 10px; }
.chat-welcome h2 { font-size:22px; line-height:1.4; font-weight:600; margin:0 0 12px; letter-spacing:-.5px; }
.chat-welcome .chat-welcome-copy { font-size:12px; line-height:1.9; margin:0; color:#888; text-wrap:pretty; }
.chat-prompts { display:grid; gap:8px; margin-top:24px; text-align:left; }
.chat-prompts button { display:flex; align-items:center; justify-content:space-between; padding:12px 16px; border:1px solid #eae6e5; border-radius:16px; background:#fff; min-height:62px; text-align:left; transition:border-color .18s,transform .18s; }
.chat-prompts strong { font-size:13px; font-weight:500; display:block; }
.chat-prompts small { display:block; color:#999; font-size:11px; margin-top:4px; }
.chat-prompts button > span:last-child { color:var(--brand); font-size:19px; }
.chat-prompts button:hover { border-color:#cdb5bc; }
.chat-prompts button:active { transform:scale(.985); }
.chat-composer { display:block; padding:12px 20px max(12px,env(safe-area-inset-bottom)); border-top:0; box-shadow:0 -8px 20px var(--canvas); }
.chat-input-row { display:flex; align-items:flex-end; gap:8px; padding:8px; border:1px solid #e6dedf; border-radius:22px; background:white; }
.chat-input-row:focus-within { border-color:#b78a94; }
.chat-composer textarea { border:0; padding:8px 4px 6px 8px; background:transparent; line-height:1.6; outline:none; font-size:13px; }
.chat-composer button { min-width:44px; width:44px; height:44px; padding:0; border-radius:50%; font-size:24px; }
.chat-composer button:disabled { background:#e7e1e2; color:#fff; opacity:1; }
.chat-composer-note { margin:8px 0 0; text-align:center; font-size:10px; color:#aaa; }
.chat-message { margin-bottom:24px; max-width:94%; }
.chat-message p { border:1px solid #eee8e8; border-radius:4px 18px 18px; padding:14px 16px; }
.chat-message.from-user p { border:0; background:#f0e5e8; border-radius:18px 4px 18px 18px; }
.chat-message.from-user .chat-speaker { display:block; text-align:right; }
.chat-speaker { font-size:10px; color:#9a878b; }
.chat-thinking { color:#9a878b; font-size:12px; line-height:1.8; }
.chat-thinking > span { font-size:24px; color:var(--brand); }
.chat-error { background:#f5edef; padding:12px 14px; border-radius:14px; }
@media(max-height:740px) { .chat-welcome-art { transform:scale(.85); transform-origin:top center; margin-bottom:-13px; } .chat-prompts { margin-top:18px; } }

/* Visible mirror actions share one labeled rail in both mirror modes. */
.mirror-edit-tools { position:absolute; left:3.4%; right:auto; top:63%; z-index:6; width:52px; display:grid; gap:4px; padding:6px 2px; border-radius:24px; background:#f6f0e8f5; box-shadow:0 2px 8px #573b3b15; }
.mirror-edit-tools button { display:grid; justify-items:center; align-content:center; gap:3px; min-height:46px; padding:3px 0; border-radius:18px; color:#66524c; }
.mirror-edit-tools button:hover { background:#e9ded6; }
.mirror-edit-tools button:active { background:#e1d2c8; }
.mirror-edit-tools svg { width:22px; height:22px; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; }
.mirror-edit-tools span { font-size:10px; line-height:14px; white-space:nowrap; }

.styling-mode .canvas-tools { left:16px; right:auto; }

/* Turn through the edge before revealing the reverse of the mirror. */
#studio[data-mirror-turn] .mirror-stage { pointer-events:none; transform-origin:50% 50%; backface-visibility:hidden; will-change:transform,opacity; }
#studio[data-mirror-turn="out"] .mirror-stage { animation:mirror-turn-out 230ms cubic-bezier(.55,.05,.85,.45) both; }
#studio[data-mirror-turn="in"] .mirror-stage { animation:mirror-turn-in 310ms cubic-bezier(.15,.65,.25,1) both; }
@keyframes mirror-turn-out { from { transform:perspective(1200px) rotateY(0); opacity:1; } to { transform:perspective(1200px) rotateY(90deg) scale(.98); opacity:.65; } }
@keyframes mirror-turn-in { from { transform:perspective(1200px) rotateY(-90deg) scale(.98); opacity:.65; } to { transform:perspective(1200px) rotateY(0); opacity:1; } }
@media(prefers-reduced-motion:reduce) { #studio[data-mirror-turn] .mirror-stage { animation:none; } }

/* A dedicated portrait picker with a stationary personal-photo action. */
#sheet.model-sheet { width:min(100% - 24px,393px); max-width:393px; height:min(780px,88dvh); max-height:88dvh; padding:24px 0 0; border-radius:28px; overflow:hidden; }
#sheet.model-sheet[open] { display:flex; flex-direction:column; }
.model-sheet #sheetTitle { flex-shrink:0; margin:0 56px 8px 24px; font-size:20px; font-weight:600; line-height:28px; }
.model-sheet > .close { top:16px; right:14px; border-radius:50%; color:#777; }
.model-sheet .model-sheet-intro { margin:0 24px 20px; font-size:12px; line-height:1.8; color:#888; }
.model-sheet-scroll { min-height:0; flex:1; overflow-y:auto; overflow-x:hidden; padding:0 20px 20px; overscroll-behavior:contain; scrollbar-width:thin; scrollbar-color:#ddd transparent; }
.model-sheet .model-library { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; overflow:visible; padding:0; }
.model-sheet .model-option { min-width:0; max-width:none; min-height:0; padding:0; border:1px solid #e8e5e3; border-radius:18px; overflow:hidden; text-align:left; background:#fff; }
.model-sheet .model-option[aria-pressed="true"] { border:1px solid #8a011b; background:#fff; box-shadow:inset 0 0 0 1px #8a011b; }
.model-sheet .model-portrait { position:relative; aspect-ratio:3/4; background:#f3f1ee; margin:5px 5px 0; border-radius:13px; overflow:hidden; }
.model-sheet .model-option img { width:100%; height:100%; object-fit:contain; }
.model-sheet .model-selected-mark { position:absolute; right:7px; bottom:7px; display:flex; gap:4px; align-items:center; padding:4px 7px; border-radius:999px; color:#fff; background:#8a011b; font-size:10px; line-height:14px; }
.model-sheet .model-selected-mark span { font-size:10px; }
.model-option-copy { padding:10px 12px 12px; }
.model-sheet .model-option-copy > span { font-size:14px; font-weight:600; line-height:20px; }
.model-sheet .model-option-copy small { display:block; margin-top:3px; font-size:11px; color:#999; }
.model-sheet-footer { flex-shrink:0; border-top:1px solid #eee; padding:12px 20px max(16px,env(safe-area-inset-bottom)); background:#fafafa; }
.model-sheet-footer .secondary { height:48px; margin:0; border-radius:999px; background:white; border-color:#d9bfc5; font-size:14px; }
.model-sheet-footer p { margin:8px 0 0; text-align:center; font-size:11px; color:#999; }
.model-sheet-status { padding:48px 12px; text-align:center; color:#999; font-size:14px; line-height:1.8; }
.model-sheet .model-option:hover { border-color:#b88691; }
.model-sheet .model-option:active { opacity:.8; }

/* Swipe through full-height model portraits without visible scrollbars. */
#sheet.model-sheet { height:fit-content; }
.model-sheet-scroll { flex:0 1 auto; overflow-y:auto; scrollbar-width:none; padding:0 0 20px; }
.model-sheet-scroll::-webkit-scrollbar, .model-sheet .model-library::-webkit-scrollbar { display:none; }
.model-sheet .model-library { display:flex; flex-wrap:nowrap; gap:12px; padding:0 var(--model-edge,20px) 2px; overflow-x:auto; overscroll-behavior-x:contain; scroll-snap-type:x mandatory; scrollbar-width:none; }
.model-sheet .model-option { flex:0 0 var(--model-card-width,64%); max-width:230px; scroll-snap-align:center; }
.model-sheet .model-portrait { aspect-ratio:3/4; max-height:42dvh; }
.model-sheet .model-option-copy { padding:12px; }

.profile-edit-fields button.profile-field-row { width:100%; text-align:left; }
.profile-feature-screen { height:100%; min-height:0; display:flex; flex-direction:column; padding-bottom:max(24px,env(safe-area-inset-bottom)); }
.profile-feature-content { flex:1; min-height:0; overflow:auto; padding:12px 4px 24px; }
.profile-feature-content h2 { max-width:353px; margin:0 auto 16px; font-size:16px; font-weight:400; }
.profile-feature-options { display:flex; flex-wrap:wrap; justify-content:center; gap:24px 12px; max-width:353px; margin:0 auto; }
.profile-feature-options button { flex:0 0 calc((100% - 24px)/3); min-width:0; display:grid; gap:8px; padding:0; color:#888; font-size:12px; }
.profile-feature-art { display:grid; place-items:center; height:120px; border:1px solid transparent; border-radius:12px; background:#3030340d; padding:10px; }
.profile-feature-art img { width:65px; height:100px; max-width:100%; object-fit:contain; }
.profile-feature-options[data-kind="bodyShape"] .profile-feature-art { height:174px; }
.profile-feature-options[data-kind="bodyShape"] img { width:54px; height:154px; }
.profile-feature-options[data-kind="skin"] .profile-feature-art { height:74px; background:none; }
.profile-feature-art i { display:block; width:64px; height:64px; border-radius:50%; }
.profile-feature-options button[aria-pressed="true"] { color:#8a011b; font-weight:600; }
.profile-feature-options button[aria-pressed="true"] .profile-feature-art { border-color:#8a011b; background:#8a011b0d; }
.profile-feature-options[data-kind="skin"] button[aria-pressed="true"] .profile-feature-art { border-color:transparent; background:none; }
.profile-feature-options button[aria-pressed="true"] i { outline:1px solid #8a011b; outline-offset:3px; }
.profile-feature-screen .profile-save { flex-shrink:0; width:calc(100% - 32px); min-height:48px; }
.profile-feature-options[data-gender="male"][data-kind="faceShape"] .profile-feature-art { height:188px; }
.profile-feature-options[data-gender="male"][data-kind="bodyShape"] .profile-feature-art { height:230px; }
.profile-feature-options[data-gender="male"]:not([data-kind="skin"]) .profile-feature-art { grid-template-rows:minmax(0,1fr); overflow:hidden; padding:0; background:transparent; border-color:transparent; }
.profile-feature-options[data-gender="male"]:not([data-kind="skin"]) img { width:100%; height:100%; object-fit:contain; }
.profile-feature-options[data-gender="male"]:not([data-kind="skin"]) button[aria-pressed="true"] .profile-feature-art { outline:1px solid #8a011b; outline-offset:2px; }

.import-approximate { display:block; padding:4px 5px; color:#8a011b; font-size:10px; line-height:1.5; }

.outfit-builder { padding:58px 20px 110px; }
.outfit-builder header { display:flex;align-items:center;gap:16px;margin-bottom:20px; }
.outfit-builder h1 { font-size:20px;margin:0; }
.builder-match-state { min-height:420px; display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; padding:24px 12px; }
.builder-match-state > img { width:160px; height:190px; object-fit:contain; margin-bottom:24px; }
.builder-match-state > .primary { min-height:44px; min-width:180px; margin-top:20px; border-radius:999px; }
.builder-match-spinner { width:24px; height:24px; border:2px solid #eedce1; border-top-color:var(--brand); border-radius:50%; animation:match-spin 1s linear infinite; }
.builder-match-note { margin:10px 0 0; padding:0 2px 8px; }
.builder-match-note strong { display:block; font-size:16px; line-height:1.5; overflow-wrap:anywhere; }
.builder-match-note span { display:block; margin-top:2px; color:#8a7378; font-size:14px; line-height:1.5; }
.outfit-builder .builder-match-note p { margin:10px 0 0; color:#65575a; font-size:14px; line-height:1.7; }
@keyframes match-spin { to { transform:rotate(360deg); } }
@media(prefers-reduced-motion:reduce) { .builder-match-spinner { animation:none; } }
.outfit-builder h2 { font-size:15px;margin:18px 0 12px; }
.outfit-builder p,.outfit-builder small { color:#888;font-size:12px;line-height:1.7; }
.outfit-builder small { float:right;font-weight:400; }
.outfit-builder { padding-top:32px; }

.builder-composition { margin:0; width:100%; background:#fff; border:1px solid #f0e6e8; border-radius:22px; overflow:hidden; }
.builder-composition-canvas { position:relative; width:100%; aspect-ratio:3/4; }
.builder-composition-piece { position:absolute; }
.builder-composition-piece img { display:block; width:100%; height:100%; object-fit:contain; }
.builder-composition-loading { position:absolute; inset:0; display:grid; place-items:center; color:#888; font-size:14px; }
.builder-composition figcaption { padding:8px 16px 16px; text-align:center; font-size:14px; color:#65575a; }

.builder-notes { display:flex; flex-direction:column; gap:14px; }
.builder-note-entry { min-width:0; }
.builder-note-card { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); align-items:stretch; gap:8px; width:100%; min-width:0; padding:0; border:0; border-radius:16px; background:transparent; text-align:initial; }
.builder-note-photo,.builder-note-flatlay { position:relative; display:block; min-width:0; overflow:hidden; border:1px solid #f0e6e8; border-radius:16px; background:#fff; }
.builder-note-photo img { display:block; width:100%; height:auto; max-width:100%; aspect-ratio:auto; object-fit:contain; }
.builder-note-flatlay { align-self:stretch; }
.builder-note-flatlay .builder-composition--compact { position:absolute; inset:0; width:100%; height:100%; margin:0; border:0; border-radius:0; }
.builder-note-flatlay .builder-composition-canvas { position:absolute; inset:0; width:100%; height:100%; aspect-ratio:auto; }
.builder-note-card i { position:absolute; z-index:2; top:8px; left:8px; width:26px; height:26px; border-radius:50%; background:var(--brand); color:#fff; display:grid; place-items:center; font-style:normal; font-size:15px; opacity:0; }
.builder-note-card[aria-selected=true] .builder-note-photo { border-color:var(--brand); box-shadow:0 0 0 1px var(--brand); }
.builder-note-card[aria-selected=true] i { opacity:1; }
.builder-note-card:focus-visible { outline:2px solid var(--brand); outline-offset:3px; }

/* Keep the builder action row outside the scrollable canvas and item list. */
.screen:has(> .outfit-builder) { display:grid;grid-template-rows:minmax(0,1fr) auto;overflow:hidden; }
.screen > .outfit-builder { min-height:0;overflow-y:auto;overflow-x:hidden;padding-bottom:24px;scrollbar-width:none; }
.screen > .outfit-builder + .detail-dock { position:static;background:var(--canvas);border-top:1px solid #eee;padding-top:12px;padding-bottom:max(20px,env(safe-area-inset-bottom)); }

/* Notebook images preview independently from the explicit try-on action. */
.mirror-note-open { display:block; width:100%; height:100%; padding:0; border-radius:inherit; }
.mirror-note-open:focus-visible { outline-offset:-3px; }
.mirror-note-card > .favorite-star,.mirror-note-card > .outfit-state { pointer-events:none; }
.mirror-screen .mirror-note-card[data-active="true"] { border:0.5px solid #8a011b; box-shadow:none; background:#8a011b14; }
.mirror-screen .mirror-note-card[data-active="true"] .mirror-note-open > img { opacity:.7; }
.mirror-screen .mirror-note-card .try-chip { min-width:56px; height:44px; }
.mirror-screen .mirror-note-card .try-chip::after { content:none; }
#sheet.note-preview-sheet { width:calc(100% - 32px); max-width:430px; max-height:90dvh; padding:16px; overflow:hidden; }
.note-preview-sheet h2 { min-height:44px; margin:0 44px 12px 0; display:flex; align-items:center; font-size:16px; line-height:22px; overflow-wrap:anywhere; }
.note-preview-image { display:block; width:auto; max-width:100%; height:auto; max-height:calc(90dvh - 100px); object-fit:contain; margin:0 auto; border-radius:16px; }

/* Detail content scrolls above an opaque action bar fixed inside the app shell. */
#studio[data-screen="detail"] .screen:has(> .note-detail) { display:grid; grid-template-rows:minmax(0,1fr) auto; overflow:hidden; }
#studio[data-screen="detail"] .screen > .note-detail { min-height:0; overflow-y:auto; overflow-x:hidden; overscroll-behavior-y:contain; scrollbar-width:none; padding-bottom:24px; }
#studio[data-screen="detail"] .detail-dock.note-dock { position:relative; bottom:auto; padding:16px 24px max(24px,env(safe-area-inset-bottom)); background:var(--canvas); }
#studio[data-screen="detail"] .detail-dock.note-dock::before { content:""; position:absolute; left:0; right:0; top:-20px; height:20px; background:linear-gradient(to bottom,#fafafa00,var(--canvas)); pointer-events:none; }

/* Personal photo shares the fixed models' full-size carousel frame. */
.model-sheet .model-option .model-upload-placeholder { height:100%; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:12px; color:#8b7b7d; font-size:14px; }
.model-upload-placeholder > span:first-child { font-size:36px; font-weight:300; line-height:1; }

.photo-upload-trigger { display:flex; align-items:center; justify-content:center; min-height:48px; cursor:pointer; }
.photo-upload-hint { color:#888; font-size:12px; line-height:1.6; }
