:root {
  --bg: #f7f3ff;
  --panel: #ffffff;
  --panel-2: #fbf9ff;
  --ink: #242238;
  --muted: #817b94;
  --line: #ebe5f5;
  --primary: #7c55df;
  --primary-2: #a985ff;
  --mint: #40c8a0;
  --coral: #ff7c75;
  --sun: #ffc857;
  --sky: #7bb8ff;
  --shadow: 0 18px 45px rgba(68, 47, 118, 0.14);
  --soft-shadow: 0 10px 22px rgba(68, 47, 118, 0.08);
  color-scheme: light;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
}

html.native-app,
html.native-app body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}

body {
  background:
    radial-gradient(circle at 16% 14%, rgba(124, 85, 223, 0.16), transparent 28%),
    linear-gradient(135deg, #f2fbff 0%, #f9f4ff 46%, #fff8f4 100%);
  color: var(--ink);
}

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

button {
  border: 0;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

img {
  display: block;
  max-width: 100%;
}

.app-stage {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(340px, 430px);
  gap: 32px;
  align-items: center;
  justify-content: center;
  padding: 32px;
}

.brand-panel {
  width: min(760px, 100%);
  min-height: 720px;
  display: grid;
  align-content: end;
  position: relative;
  overflow: hidden;
}

.brand-mascot {
  width: min(420px, 82%);
  margin: 0 auto;
  filter: drop-shadow(0 24px 34px rgba(68, 47, 118, 0.18));
  animation: mascot-float 4.2s ease-in-out infinite;
}

.brand-copy {
  width: min(600px, calc(100% - 32px));
  margin: -120px auto 28px;
  padding: 22px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 22px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  position: relative;
}

.brand-icon {
  width: 54px;
  height: 54px;
  border-radius: 15px;
  margin-bottom: 12px;
}

.eyebrow {
  color: var(--primary);
  font-size: 13px;
  font-weight: 800;
  margin: 0 0 8px;
}

.brand-copy h1 {
  margin: 0;
  font-size: clamp(44px, 8vw, 82px);
  line-height: 0.94;
  letter-spacing: 0;
}

.brand-copy p {
  margin: 12px 0 0;
  color: #615a74;
  line-height: 1.7;
}

.brand-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 18px;
}

.brand-metrics span {
  padding: 12px;
  border-radius: 14px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  box-shadow: var(--soft-shadow);
}

.brand-metrics strong {
  display: block;
  color: var(--ink);
  font-size: 18px;
}

.phone-shell {
  width: min(430px, 100%);
  height: min(900px, calc(100vh - 32px));
  min-height: 680px;
  border-radius: 28px;
  background: transparent;
  box-shadow: none;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.app-screen {
  flex: 1;
  min-height: 0;
  border-radius: 28px;
  overflow: hidden;
  background: var(--bg);
  position: relative;
  box-shadow: 0 22px 60px rgba(68, 47, 118, 0.16);
}

.view {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.scroll {
  --scroll-pad-top: 20px;
  --scroll-pad-inline: 18px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: var(--scroll-pad-top) var(--scroll-pad-inline) 92px;
  scrollbar-width: none;
}

.scroll::-webkit-scrollbar {
  display: none;
}

.screen-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.screen-title.has-back {
  position: sticky;
  top: calc(-1 * var(--scroll-pad-top));
  z-index: 40;
  justify-content: flex-start;
  align-items: center;
  gap: 14px;
  margin: calc(-1 * var(--scroll-pad-top)) calc(-1 * var(--scroll-pad-inline)) 16px;
  padding: var(--scroll-pad-top) var(--scroll-pad-inline) 14px;
  background: rgba(248, 246, 255, 0.96);
  border-bottom: 1px solid transparent;
  box-shadow: 0 10px 24px rgba(68, 47, 118, 0.06);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.screen-title-copy {
  min-width: 0;
}

.screen-title.has-back .back-btn {
  flex: 0 0 auto;
}

.screen-title.has-back h2 {
  font-size: 24px;
  line-height: 1.18;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.screen-title.has-back p {
  margin-top: 5px;
  font-size: 13px;
  line-height: 1.5;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.screen-title h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.18;
  letter-spacing: 0;
}

.screen-title p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.splash {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  overflow-y: auto;
  padding: 64px 24px 28px;
  background:
    radial-gradient(circle at 50% 18%, rgba(124, 85, 223, 0.14), transparent 32%),
    linear-gradient(180deg, rgba(244, 253, 255, 0.95), rgba(248, 242, 255, 0.98));
}

.splash-intro,
.splash-actions {
  width: 100%;
  max-width: 340px;
}

.splash-actions {
  margin-top: clamp(100px, 18vh, 150px);
}

.splash-icon {
  width: 82px;
  height: 82px;
  border-radius: 22px;
  margin: 0 auto 18px;
  box-shadow: var(--shadow);
}

.splash h1 {
  text-align: center;
  margin: 0;
  font-size: 30px;
  letter-spacing: 0;
}

.splash p {
  color: var(--muted);
  text-align: center;
  margin: 8px auto 0;
  max-width: 260px;
  line-height: 1.6;
}

.btn {
  width: 100%;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 14px;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
  box-shadow: 0 12px 24px rgba(124, 85, 223, 0.24);
}

.btn.secondary {
  background: #fff;
  color: var(--primary);
  box-shadow: var(--soft-shadow);
  border: 1px solid var(--line);
}

.btn.mint {
  background: var(--mint);
  box-shadow: 0 12px 24px rgba(64, 200, 160, 0.22);
}

.btn.coral {
  background: var(--coral);
  box-shadow: 0 12px 24px rgba(255, 124, 117, 0.2);
}

.btn.small {
  min-height: 36px;
  border-radius: 12px;
  font-size: 13px;
  padding: 0 14px;
  width: auto;
}

.icon-btn {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: #fff;
  color: var(--primary);
  border: 1px solid var(--line);
  box-shadow: var(--soft-shadow);
}

.icon-btn svg,
.tab svg,
.mini-icon svg {
  width: 20px;
  height: 20px;
}

.login-card,
.card,
.list-card,
.sheet {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 18px;
  box-shadow: var(--soft-shadow);
}

.login-card {
  padding: 18px;
}

.login-view {
  background:
    linear-gradient(180deg, #f7f3ff 0%, #f9fbff 42%, #f7f3ff 100%);
}

.login-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 18px 18px 34px;
  scrollbar-width: none;
}

.login-scroll::-webkit-scrollbar {
  display: none;
}

.login-topbar {
  height: 46px;
  display: grid;
  grid-template-columns: 42px 1fr 42px;
  align-items: center;
  margin-bottom: 8px;
}

.login-topbar .back-btn {
  width: 42px;
  height: 42px;
}

.login-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 900;
}

.login-brand img {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  box-shadow: 0 7px 14px rgba(124, 85, 223, 0.18);
}

.login-hero {
  min-height: 184px;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.login-hero-copy {
  position: relative;
  z-index: 1;
  padding: 14px 0 20px 4px;
}

.login-kicker {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 900;
}

.login-hero h1 {
  margin: 0;
  font-size: 38px;
  line-height: 1.08;
  letter-spacing: 0;
}

.login-hero p {
  max-width: 330px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.login-panel {
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--soft-shadow);
}

.login-panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.login-panel-heading h2 {
  margin: 0;
  font-size: 19px;
  line-height: 1.2;
}

.login-panel-heading p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.login-panel-heading > span {
  flex: 0 0 auto;
  padding: 5px 9px;
  border-radius: 999px;
  background: #e8faf4;
  color: #24866a;
  font-size: 11px;
  font-weight: 900;
}

.login-field-label {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 12px 2px 7px;
  font-size: 12px;
  font-weight: 850;
}

.login-field-label span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.login-field {
  min-height: 48px;
  background: #fbfaff;
}

.login-code-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 106px;
  gap: 8px;
}

.code-btn {
  min-height: 48px;
  border: 1px solid #ddcffb;
  border-radius: 14px;
  background: #f1ebff;
  color: var(--primary);
  font-size: 12px;
  font-weight: 900;
}

.login-submit {
  margin-top: 8px;
}

.login-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 17px 0 13px;
  color: #aaa4b9;
  font-size: 11px;
}

.login-divider::before,
.login-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.guest-entry {
  width: 100%;
  min-height: 64px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 16px;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.guest-entry-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #e9fbf5;
  color: #289878;
}

.guest-entry-icon svg {
  width: 19px;
  height: 19px;
}

.guest-entry strong,
.guest-entry small {
  display: block;
}

.guest-entry strong {
  font-size: 13px;
}

.guest-entry small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}

.guest-entry-arrow {
  color: var(--primary);
  font-size: 24px;
  line-height: 1;
}

.login-trust-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 10px;
}

.login-trust-row span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.login-trust-row svg {
  width: 13px;
  height: 13px;
  color: var(--primary);
}

.field {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  padding: 0 14px;
  outline: 0;
  color: var(--ink);
}

textarea.field {
  min-height: 96px;
  resize: vertical;
  padding-top: 12px;
}

.field:focus {
  border-color: rgba(124, 85, 223, 0.72);
  box-shadow: 0 0 0 4px rgba(124, 85, 223, 0.1);
}

.field-stack {
  display: grid;
  gap: 12px;
}

.hero-weather {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 12px;
  margin-bottom: 14px;
}

.weather-card,
.assistant-card {
  min-height: 132px;
  padding: 16px;
  position: relative;
  overflow: hidden;
}

.weather-card {
  background: linear-gradient(135deg, #fff 0%, #f3ecff 100%);
}

.weather-card .temp {
  font-size: 34px;
  font-weight: 900;
  color: var(--primary);
  margin-top: 18px;
}

.weather-refresh {
  margin-top: 8px;
  padding: 0;
  background: transparent;
  color: var(--primary);
  font-size: 11px;
  font-weight: 800;
}

.weather-test-control {
  display: grid;
  gap: 14px;
  margin-bottom: 14px;
}

.weather-test-control label {
  display: grid;
  gap: 8px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.weather-test-control .btn:disabled {
  cursor: wait;
  opacity: 0.68;
}

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

.weather-coordinate span {
  min-width: 0;
  border: 1px solid var(--line);
  background: #f8f7fb;
  border-radius: 8px;
  padding: 10px 12px;
  color: #716a82;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.weather-test-message {
  border: 1px solid #f2c7c0;
  border-left: 4px solid #ef7d73;
  background: #fff8f6;
  border-radius: 8px;
  margin-bottom: 14px;
  padding: 14px;
}

.weather-test-message strong {
  color: #9d554f;
}

.weather-test-message p {
  margin-top: 6px;
  color: #7f6663;
  font-size: 12px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.weather-test-result {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.weather-test-result-head,
.weather-test-temperature {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.weather-test-result-head h3 {
  margin-top: 2px;
  font-size: 22px;
}

.weather-test-result-head div > span,
.weather-test-temperature span {
  color: #7b748b;
  font-size: 12px;
}

.weather-test-temperature {
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
}

.weather-test-temperature strong {
  color: var(--primary);
  font-size: 40px;
  line-height: 1;
}

.weather-test-temperature span {
  font-size: 15px;
  font-weight: 800;
}

.weather-test-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.weather-test-metrics div,
.weather-test-forecast div {
  min-width: 0;
  background: #f8f7fb;
  border-radius: 8px;
  padding: 11px;
}

.weather-test-metrics span,
.weather-test-location span,
.weather-test-forecast span,
.weather-test-forecast small {
  display: block;
  color: #858094;
  font-size: 11px;
}

.weather-test-metrics strong,
.weather-test-location strong,
.weather-test-forecast strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.weather-test-location {
  display: grid;
  gap: 10px;
}

.weather-test-location div {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
}

.weather-test-location strong {
  margin-top: 0;
  text-align: right;
}

.weather-test-forecast {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.weather-test-forecast div {
  text-align: center;
}

.weather-test-forecast strong {
  margin: 5px 0;
}

.assistant-card {
  background: linear-gradient(135deg, #ecfff8 0%, #fff 56%, #fff5f3 100%);
}

.closet-search {
  margin: 2px 0 12px;
}

.assistant-bubble {
  font-size: 13px;
  line-height: 1.55;
  color: #585168;
  margin: 6px 78px 0 0;
}

.assistant-mini {
  position: absolute;
  right: -10px;
  bottom: -18px;
  width: 128px;
  height: 150px;
  display: block;
  animation: mascot-float 4.4s ease-in-out infinite;
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 12px 0 18px;
}

.quick-action {
  min-height: 76px;
  border-radius: 18px;
  background: #fff;
  color: var(--ink);
  display: grid;
  place-items: center;
  gap: 6px;
  padding: 10px 4px;
  box-shadow: var(--soft-shadow);
  border: 1px solid var(--line);
  font-size: 12px;
  font-weight: 700;
}

.quick-action .mini-icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  color: var(--primary);
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 18px 0 10px;
}

.section-head h3 {
  margin: 0;
  font-size: 16px;
}

.link-btn {
  background: transparent;
  color: var(--primary);
  font-weight: 800;
  padding: 0;
}

.outfit-card {
  padding: 14px;
  margin-bottom: 12px;
}

.outfit-top {
  display: flex;
  align-items: center;
  gap: 12px;
}

.swatches {
  display: flex;
  gap: 5px;
  flex-shrink: 0;
}

.swatch {
  width: 22px;
  height: 42px;
  border-radius: 9px;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.outfit-card h4,
.list-card h4,
.card h4 {
  margin: 0;
  font-size: 15px;
}

.outfit-card p,
.list-card p,
.card p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
  margin: 5px 0 0;
}

.score-pill,
.tag,
.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: #f0e9ff;
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
}

.tag.mint {
  background: #e8fbf5;
  color: #129a75;
}

.tag.coral {
  background: #fff0ee;
  color: #db5f59;
}

.tag.sun {
  background: #fff7de;
  color: #9b7010;
}

.chip-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.chip-row::-webkit-scrollbar {
  display: none;
}

.chip {
  flex: 0 0 auto;
  min-height: 34px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: #6d657e;
  padding: 0 13px;
  font-size: 13px;
  font-weight: 700;
}

.chip.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.closet-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.closet-item {
  min-height: 244px;
  padding: 12px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--soft-shadow);
  display: grid;
  gap: 10px;
}

.cloth-art {
  height: 142px;
  border-radius: 15px;
  background: linear-gradient(135deg, var(--cloth, #d7c3ff), #fff);
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.03);
}

.cloth-art img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  padding: 6px;
}

.cloth-art.has-photo {
  background: #fff;
}

.closet-item .cloth-art {
  height: 172px;
}

.closet-item .cloth-art img {
  padding: 0;
  transform: none;
}

.cloth-art svg {
  width: 46px;
  height: 46px;
  color: rgba(255, 255, 255, 0.92);
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.08));
}

.closet-item strong {
  font-size: 14px;
}

.closet-item small {
  color: var(--muted);
  font-size: 12px;
}

.item-detail-view {
  padding-bottom: 118px;
}

.item-detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(140px, 0.85fr);
  gap: 16px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.item-detail-art {
  height: 320px;
  border-radius: 8px;
}

.item-detail-art img {
  padding: 0;
  transform: none;
}

.item-detail-art svg {
  width: 74px;
  height: 74px;
}

.item-detail-heading {
  min-width: 0;
}

.item-detail-heading > div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.item-detail-heading h3 {
  margin: 14px 0 6px;
  font-size: 20px;
  line-height: 1.25;
}

.item-detail-heading p,
.detail-copy {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.detail-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 12px;
  border-block: 1px solid var(--line);
}

.detail-metrics > div {
  display: grid;
  gap: 3px;
  padding: 14px 8px;
  text-align: center;
}

.detail-metrics > div + div {
  border-left: 1px solid var(--line);
}

.detail-metrics strong {
  color: var(--primary);
  font-size: 20px;
}

.detail-metrics span {
  color: var(--muted);
  font-size: 11px;
}

.detail-section {
  padding: 18px 2px;
  border-bottom: 1px solid var(--line);
}

.detail-section .section-head {
  margin: 0 0 10px;
}

.detail-info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 12px;
}

.detail-info-row span {
  color: var(--muted);
}

.detail-info-row strong {
  max-width: 66%;
  text-align: right;
}

.detail-outfit-row {
  width: 100%;
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.detail-outfit-row span {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.detail-outfit-row small {
  color: var(--muted);
}

.detail-outfit-row b {
  color: var(--primary);
}

.item-edit-form {
  display: grid;
  gap: 10px;
}

.item-edit-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

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

.item-detail-actions {
  display: grid;
  gap: 9px;
  padding-top: 16px;
}

.danger-btn {
  border: 1px solid #ffd5d0;
  background: #fff5f3;
  color: #c94c45;
}

.form-card {
  padding: 16px;
  display: grid;
  gap: 12px;
}

.import-loading {
  padding: 18px;
  display: grid;
  gap: 6px;
}

.import-loading span,
.import-source-note {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.import-image-zone {
  min-height: 220px;
  border-radius: 8px;
}

.import-image-zone .preview-image {
  height: 220px;
  max-height: none;
  object-fit: contain;
  border-radius: 6px;
}

.import-image-zone small {
  display: inline-block;
  margin-top: 5px;
  font-size: 10px;
}

.import-warning,
.import-success {
  margin: 0;
  padding: 10px 12px;
  border-left: 3px solid #ff9a92;
  background: #fff7f5;
  color: #8b625f;
  font-size: 11px;
  line-height: 1.55;
}

.import-success {
  border-left-color: #67c7a9;
  background: #f0fbf7;
  color: #47796b;
}

.detail-image-upload {
  min-height: 190px;
}

.form-card > label:not(.upload-zone) {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.upload-zone {
  min-height: 160px;
  border: 1.5px dashed #cabbed;
  border-radius: 18px;
  background: #fbf8ff;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--muted);
  padding: 18px;
  position: relative;
  overflow: hidden;
}

.upload-zone input {
  position: absolute;
  inset: 0;
  opacity: 0;
}

.preview-image {
  width: 100%;
  max-height: 190px;
  object-fit: cover;
  border-radius: 16px;
}

.garment-upload-zone {
  min-height: 340px;
}

.garment-upload-zone .preview-image {
  height: 320px;
  max-height: 320px;
  object-fit: contain;
  object-position: center;
  padding: 0;
  border-radius: 8px;
  transform: none;
}

.garment-upload-zone.has-photo {
  background: #fff;
}

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

.tryon-upload-grid.single {
  grid-template-columns: minmax(0, 190px);
  justify-content: center;
}

.tryon-upload-card {
  min-width: 0;
  display: grid;
  gap: 7px;
}

.tryon-upload-card > strong {
  font-size: 12px;
}

.tryon-upload-card > span,
.tryon-privacy,
.tryon-meta {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

.upload-zone.compact {
  min-height: 150px;
  aspect-ratio: 4 / 5;
  padding: 8px;
  border-radius: 8px;
  cursor: pointer;
}

.upload-zone.compact .preview-image {
  width: 100%;
  height: 100%;
  max-height: none;
  border-radius: 6px;
  object-fit: contain;
}

.upload-zone.compact svg {
  width: 28px;
  height: 28px;
}

.tryon-field-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.tryon-category button {
  border-radius: 8px;
}

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

.tryon-persona-section {
  display: grid;
  gap: 10px;
  padding: 14px;
  margin-bottom: 12px;
}

.text-btn {
  min-height: 32px;
  padding: 0 4px;
  border: 0;
  background: transparent;
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
}

.persona-picker {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 78px;
  gap: 9px;
  overflow-x: auto;
  padding-bottom: 3px;
  scrollbar-width: none;
}

.persona-picker::-webkit-scrollbar {
  display: none;
}

.persona-choice {
  min-width: 0;
  display: grid;
  gap: 5px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
}

.persona-choice.active {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(118, 78, 221, 0.12);
  color: var(--primary);
}

.persona-choice img {
  width: 100%;
  height: 86px;
  display: block;
  border-radius: 6px;
  object-fit: cover;
  object-position: center top;
}

.persona-choice span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px;
  font-weight: 800;
}

.empty-persona {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px dashed #cabbed;
  border-radius: 8px;
  background: #fbf8ff;
  color: var(--primary);
  font-size: 11px;
  font-weight: 800;
}

.empty-persona svg {
  width: 18px;
  height: 18px;
}

.tryon-shoe-upload {
  display: grid;
  gap: 7px;
}

.upload-zone.shoe-zone {
  min-height: 108px;
  border-radius: 8px;
  padding: 8px;
}

.shoe-preview-row {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.shoe-preview-row img {
  width: 100%;
  height: 90px;
  display: block;
  border-radius: 6px;
  object-fit: contain;
  background: #fff;
}

.tryon-shoe-status {
  color: #a45d55;
  font-size: 10px;
  line-height: 1.45;
}

.tryon-shoe-status.is-ready {
  color: #28785f;
}

.tryon-guidance {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border-left: 3px solid var(--mint);
  background: #f2faf7;
  color: #5f6e69;
  font-size: 11px;
  line-height: 1.5;
}

.tryon-consent {
  display: flex !important;
  grid-template-columns: none !important;
  align-items: flex-start;
  gap: 9px !important;
  color: #5f576f !important;
  font-size: 11px !important;
  line-height: 1.5;
  cursor: pointer;
}

.tryon-consent input {
  flex: 0 0 17px;
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: var(--primary);
}

.segmented {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.segmented button {
  min-height: 38px;
  border-radius: 12px;
  background: #fff;
  color: var(--muted);
  border: 1px solid var(--line);
  font-weight: 800;
}

.segmented button.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

#cloth-category {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

#cloth-category button {
  min-width: 0;
  padding: 0 4px;
  white-space: nowrap;
  font-size: 11px;
}

.list {
  display: grid;
  gap: 10px;
}

.list-card {
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.list-main {
  min-width: 0;
}

.list-main h4 {
  overflow-wrap: anywhere;
}

.menu-card {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 20px;
  align-items: center;
  min-height: 68px;
  gap: 12px;
  padding: 14px 16px;
  text-align: left;
}

.menu-card .menu-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  color: var(--primary);
}

.menu-card .menu-icon svg {
  display: block;
  width: 28px;
  height: 28px;
  flex: none;
}

.menu-card .list-main {
  min-width: 0;
}

.menu-card .list-main h4 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow-wrap: normal;
  line-height: 1.35;
}

.menu-chevron {
  display: grid;
  place-items: center;
  width: 20px;
  height: 36px;
  color: var(--muted);
  font-size: 24px;
  font-weight: 500;
  line-height: 1;
}

.settings-section {
  margin-top: 18px;
}

.settings-section > h3 {
  margin: 0 0 9px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.danger-card .menu-icon,
.danger-card .list-main h4,
.danger-card .menu-chevron {
  color: #d55d65;
}

.progress {
  height: 9px;
  border-radius: 999px;
  background: #eee8f8;
  overflow: hidden;
  margin-top: 10px;
}

.progress span {
  display: block;
  height: 100%;
  width: var(--value, 50%);
  background: linear-gradient(90deg, var(--primary), var(--mint));
  border-radius: inherit;
}

.generating-view {
  display: grid;
  place-items: center;
  padding-bottom: 96px;
}

.generating-card {
  width: min(100%, 330px);
  padding: 28px 22px;
  display: grid;
  justify-items: center;
  gap: 12px;
  text-align: center;
}

.generating-card h3,
.generating-card p {
  margin: 0;
}

.generating-card small {
  color: var(--muted);
}

.generating-spinner {
  width: 46px;
  height: 46px;
  border: 4px solid #eee7ff;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: generating-spin 0.85s linear infinite;
}

@keyframes generating-spin {
  to { transform: rotate(360deg); }
}

.feedback-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.tryon-task,
.tryon-result {
  padding: 16px;
}

.tryon-error {
  display: grid;
  gap: 8px;
  padding: 16px;
  border-color: #f0d8d4;
  background: #fff8f6;
}

.tryon-error h4,
.tryon-error p {
  margin: 0;
}

.tryon-task h4 {
  margin: 2px 0 0;
}

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

.tryon-compare figure {
  position: relative;
  min-height: 200px;
  margin: 0;
  overflow: hidden;
  border-radius: 14px;
  background: #f4f0fa;
}

.tryon-compare img {
  width: 100%;
  height: 200px;
  display: block;
  object-fit: contain;
}

.tryon-compare figcaption {
  position: absolute;
  right: 8px;
  bottom: 8px;
  padding: 4px 7px;
  border-radius: 8px;
  background: rgba(34, 32, 48, 0.66);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
}

.tryon-top,
.tryon-bottom {
  position: absolute;
  left: 30%;
  right: 30%;
  border-radius: 14px;
  opacity: 0.65;
  mix-blend-mode: multiply;
}

.tryon-top {
  top: 36%;
  height: 28%;
  background: var(--tryon-top);
}

.tryon-bottom {
  top: 63%;
  height: 27%;
  background: var(--tryon-bottom);
}

.tryon-download {
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.tryon-download svg {
  width: 17px;
  height: 17px;
}

.tryon-meta {
  margin-top: 8px;
  text-align: center;
}

.tryon-result-warning {
  margin-top: 10px;
  padding: 9px 10px;
  border-left: 3px solid #efae53;
  background: #fff8e9;
  color: #8c672e;
  font-size: 10px;
  line-height: 1.5;
}

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

.persona-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.persona-card.active {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(118, 78, 221, 0.12);
}

.persona-card-select {
  width: 100%;
  display: grid;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
}

.persona-card-select img {
  width: 100%;
  aspect-ratio: 3 / 4;
  display: block;
  object-fit: cover;
  object-position: center top;
  background: #f4f0fa;
}

.persona-card-select > span {
  min-width: 0;
  display: grid;
  gap: 2px;
  padding: 10px 42px 10px 10px;
}

.persona-card-select strong,
.persona-card-select small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.persona-card-select strong {
  font-size: 12px;
}

.persona-card-select small {
  color: var(--muted);
  font-size: 9px;
}

.persona-delete {
  position: absolute;
  right: 6px;
  bottom: 7px;
  min-width: 30px;
  height: 30px;
  padding: 0 7px;
  border: 1px solid #f1d4d0;
  border-radius: 7px;
  background: #fff6f4;
  color: #b85750;
  font-size: 9px;
  font-weight: 800;
}

.persona-delete svg {
  width: 15px;
  height: 15px;
}

.persona-empty {
  grid-column: 1 / -1;
  display: grid;
  place-items: center;
  gap: 6px;
  padding: 24px;
  text-align: center;
}

.persona-empty span svg {
  width: 32px;
  height: 32px;
  color: var(--primary);
}

.persona-empty h3,
.persona-empty p {
  margin: 0;
}

.persona-upload-zone {
  min-height: 250px;
  border-radius: 8px;
}

.persona-upload-zone .preview-image {
  height: 300px;
  max-height: 300px;
  object-fit: contain;
}

.daily-plan {
  display: grid;
  gap: 9px;
}

.daily-plan-card {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.daily-day {
  color: var(--primary);
  font-size: 12px;
  font-weight: 900;
}

.daily-plan-card strong {
  font-size: 13px;
}

.daily-plan-card p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.community-card {
  position: relative;
}

.community-card .tag {
  justify-self: start;
  margin-top: 2px;
}

.detail-hero {
  min-height: 230px;
  border-radius: 22px;
  background: linear-gradient(160deg, #fff, #f2edff 52%, #e9fff8);
  padding: 16px;
  display: grid;
  align-items: end;
  position: relative;
  overflow: hidden;
  box-shadow: var(--soft-shadow);
}

.detail-hero .model {
  position: absolute;
  inset: 18px 64px 46px;
  display: grid;
  place-items: center;
}

.model-body {
  width: 86px;
  height: 156px;
  position: relative;
}

.head,
.torso,
.legs,
.shoe {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.head {
  top: 0;
  width: 44px;
  height: 44px;
  background: #f4d3c7;
  border-radius: 50%;
}

.torso {
  top: 42px;
  width: 74px;
  height: 66px;
  border-radius: 18px 18px 12px 12px;
  background: var(--top, #d8e5f8);
}

.legs {
  top: 102px;
  width: 76px;
  height: 52px;
  display: flex;
  gap: 10px;
}

.legs span {
  flex: 1;
  border-radius: 10px 10px 8px 8px;
  background: var(--bottom, #262939);
}

.shoe {
  bottom: -4px;
  width: 86px;
  display: flex;
  justify-content: space-between;
}

.shoe span {
  width: 34px;
  height: 10px;
  border-radius: 999px;
  background: var(--shoe, #fff);
  border: 1px solid var(--line);
}

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

.score-card {
  padding: 12px 8px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid var(--line);
  text-align: center;
}

.score-card strong {
  color: var(--primary);
  font-size: 19px;
}

.score-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 3px;
}

.calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}

.day {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #fff;
  color: #6f6682;
  border: 1px solid var(--line);
  font-size: 12px;
  font-weight: 800;
}

.day.active {
  background: var(--primary);
  color: #fff;
}

.pack-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--line);
}

.pack-item input {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
}

.pack-item.done span {
  text-decoration: line-through;
  color: var(--muted);
}

.chat {
  display: grid;
  gap: 10px;
}

.service-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 42px;
  margin-bottom: 12px;
  padding: 9px 12px;
  border: 1px solid #f0d8d4;
  border-radius: 8px;
  background: #fff6f4;
  color: #a45d55;
  font-size: 11px;
}

.service-strip.is-online {
  border-color: #ccecdf;
  background: #effbf6;
  color: #28785f;
}

.service-strip strong,
.service-strip span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message {
  max-width: 82%;
  padding: 12px 14px;
  border-radius: 18px;
  background: #fff;
  color: #5f576f;
  line-height: 1.55;
  font-size: 13px;
  box-shadow: var(--soft-shadow);
}

.message small {
  display: block;
  margin-top: 5px;
  color: #91879f;
  font-size: 10px;
  font-weight: 700;
}

.message.me small {
  color: rgba(255, 255, 255, 0.75);
}

.message.me {
  justify-self: end;
  background: var(--primary);
  color: #fff;
}

.tabbar {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  min-height: 66px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  padding: 7px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.93);
  box-shadow: 0 16px 40px rgba(68, 47, 118, 0.16);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.86);
}

.assistant-dock {
  position: absolute;
  width: 128px;
  height: 134px;
  border-radius: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  overflow: visible;
  z-index: 4;
  padding: 0;
  animation: mascot-float 3.8s ease-in-out infinite;
  touch-action: none;
  cursor: grab;
}

.assistant-dock.is-dragging {
  animation: none;
  cursor: grabbing;
}

.mascot-sprite {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  transform-origin: 50% 88%;
  --action-duration: 5200ms;
}

.mascot-sprite::before {
  content: "";
  position: absolute;
  z-index: 0;
  left: 27%;
  right: 23%;
  bottom: 4%;
  height: 10%;
  border-radius: 50%;
  background: rgba(82, 57, 130, 0.15);
  filter: blur(7px);
}

.assistant-3d {
  position: absolute;
  z-index: 1;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.mascot-prop {
  position: absolute;
  z-index: 2;
  opacity: 0;
  pointer-events: none;
}

.prop-shirt {
  width: 22px;
  height: 26px;
  left: 14%;
  top: 30%;
  border-radius: 8px 8px 6px 6px;
  background: linear-gradient(135deg, #ffffff, #d8cdf7);
  box-shadow: inset 0 0 0 2px rgba(124, 85, 223, 0.18), 0 5px 12px rgba(68, 47, 118, 0.14);
}

.prop-hanger {
  width: 24px;
  height: 15px;
  right: 12%;
  top: 22%;
  border: 3px solid rgba(124, 85, 223, 0.55);
  border-top: 0;
  border-radius: 2px 2px 12px 12px;
}

.prop-hanger::before {
  content: "";
  position: absolute;
  left: 8px;
  top: -10px;
  width: 9px;
  height: 11px;
  border: 3px solid rgba(124, 85, 223, 0.55);
  border-left-color: transparent;
  border-bottom: 0;
  border-radius: 50% 50% 0 0;
}

.prop-spark {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--sun);
  transform: rotate(45deg);
}

.prop-spark.one {
  right: 10%;
  top: 16%;
}

.prop-spark.two {
  left: 24%;
  top: 18%;
  background: var(--mint);
}

.mascot-sprite[data-action="tidy"] .prop-shirt {
  animation: prop-shirt-tidy var(--action-duration) ease-in-out infinite;
}

.mascot-sprite[data-action="tidy"] .prop-hanger {
  animation: prop-hanger-tidy var(--action-duration) ease-in-out infinite;
}

.mascot-sprite[data-action="recommend"] .prop-spark,
.mascot-sprite[data-action="saved"] .prop-spark,
.mascot-sprite[data-action="spin"] .prop-spark {
  animation: prop-spark-pop var(--action-duration) ease-in-out infinite;
}

.assistant-dock::after {
  content: "";
  position: absolute;
  right: 20px;
  bottom: 11px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--mint);
  border: 2px solid #fff;
  box-shadow: 0 0 0 5px rgba(64, 200, 160, 0.15);
}

@keyframes mascot-float {
  0%,
  100% {
    transform: translateY(0) rotate(-1deg);
  }
  50% {
    transform: translateY(-8px) rotate(1deg);
  }
}

@keyframes mascot-idle {
  0% {
    transform: translate3d(0, 0, 0) rotate(-1deg) scale(1);
  }
  22% {
    transform: translate3d(-2px, -5px, 0) rotate(1.5deg) scale(1.015);
  }
  48% {
    transform: translate3d(2px, 1px, 0) rotate(-0.8deg) scale(0.995);
  }
  74% {
    transform: translate3d(-1px, -3px, 0) rotate(1deg) scale(1.01);
  }
  100% {
    transform: translate3d(0, 0, 0) rotate(-1deg) scale(1);
  }
}

@keyframes mascot-spin {
  0%, 10% {
    transform: translateY(0) rotateY(0deg) rotate(0deg) scale(1);
  }
  28% {
    transform: translateY(-8px) rotateY(90deg) rotate(2deg) scale(0.94);
  }
  48% {
    transform: translateY(-6px) rotateY(180deg) rotate(-1deg) scale(1.02);
  }
  68% {
    transform: translateY(-8px) rotateY(270deg) rotate(2deg) scale(0.94);
  }
  86%, 100% {
    transform: translateY(0) rotateY(360deg) rotate(0deg) scale(1);
  }
}

@keyframes mascot-tidy-body {
  0%, 100% {
    transform: translateX(0) rotate(0deg);
  }
  18% {
    transform: translateX(-5px) rotate(-3deg);
  }
  36% {
    transform: translateX(4px) rotate(2deg);
  }
  58% {
    transform: translateX(-3px) translateY(-2px) rotate(-1.5deg);
  }
  76% {
    transform: translateX(2px) rotate(1deg);
  }
}

@keyframes mascot-plan {
  0%, 100% {
    transform: translateY(0) rotate(-1deg);
  }
  24% {
    transform: translateY(-4px) rotate(2deg);
  }
  44% {
    transform: translateX(-3px) rotate(-2deg);
  }
  68% {
    transform: translateX(3px) translateY(-2px) rotate(1deg);
  }
}

@keyframes mascot-recommend {
  0%, 100% {
    transform: translateY(0) scale(1);
  }
  20% {
    transform: translateY(-7px) scale(1.03) rotate(-2deg);
  }
  42% {
    transform: translateY(0) scale(0.99) rotate(1deg);
  }
  62% {
    transform: translateY(-4px) scale(1.02) rotate(2deg);
  }
}

@keyframes mascot-tryon {
  0%, 100% {
    transform: translateX(0) rotateY(0deg);
  }
  28% {
    transform: translateX(-5px) rotateY(-12deg) rotate(-1deg);
  }
  52% {
    transform: translateX(3px) rotateY(8deg) rotate(1deg);
  }
  78% {
    transform: translateX(-2px) rotateY(-6deg);
  }
}

@keyframes mascot-saved {
  0%, 100% {
    transform: translateY(0) scale(1);
  }
  18% {
    transform: translateY(-6px) scale(1.035) rotate(-2deg);
  }
  32% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-4px) rotate(2deg);
  }
}

@keyframes prop-shirt-tidy {
  0%, 14%, 100% {
    opacity: 0;
    transform: translate3d(-18px, 18px, 0) rotate(-18deg) scale(0.72);
  }
  24% {
    opacity: 1;
  }
  48% {
    opacity: 1;
    transform: translate3d(34px, -2px, 0) rotate(8deg) scale(1);
  }
  72% {
    opacity: 0;
    transform: translate3d(66px, -16px, 0) rotate(0deg) scale(0.6);
  }
}

@keyframes prop-hanger-tidy {
  0%, 20%, 100% {
    opacity: 0;
    transform: translate3d(12px, -10px, 0) rotate(12deg) scale(0.7);
  }
  34%, 62% {
    opacity: 1;
  }
  78% {
    opacity: 0;
    transform: translate3d(-34px, 32px, 0) rotate(-10deg) scale(0.85);
  }
}

@keyframes prop-spark-pop {
  0%, 18%, 100% {
    opacity: 0;
    transform: translateY(8px) rotate(45deg) scale(0.2);
  }
  28% {
    opacity: 1;
    transform: translateY(-8px) rotate(45deg) scale(1);
  }
  48% {
    opacity: 0;
    transform: translateY(-18px) rotate(45deg) scale(0.4);
  }
  62% {
    opacity: 1;
    transform: translateY(-6px) rotate(45deg) scale(0.8);
  }
  78% {
    opacity: 0;
    transform: translateY(-14px) rotate(45deg) scale(0.3);
  }
}

.mascot-model,
.model-core,
.part {
  transform-style: preserve-3d;
}

.mascot-model {
  position: absolute;
  inset: 0;
  display: block;
  perspective: 520px;
}

.model-shadow {
  position: absolute;
  left: 28%;
  right: 22%;
  bottom: 2%;
  height: 13px;
  border-radius: 50%;
  background: rgba(82, 57, 130, 0.16);
  filter: blur(8px);
  transform: rotateX(72deg);
}

.model-core {
  position: absolute;
  left: 50%;
  bottom: 5%;
  width: 82px;
  height: 124px;
  transform: translateX(-50%) rotateX(4deg);
  transform-origin: 50% 86%;
}

.part {
  position: absolute;
  display: block;
}

.head {
  left: 19px;
  top: 11px;
  width: 46px;
  height: 43px;
  border-radius: 48% 48% 46% 46%;
  background:
    radial-gradient(circle at 34% 33%, rgba(255, 255, 255, 0.92), transparent 17%),
    linear-gradient(145deg, #fff2ed 0%, #f3cfc3 100%);
  box-shadow:
    inset -5px -6px 11px rgba(193, 125, 132, 0.18),
    inset 6px 5px 8px rgba(255, 255, 255, 0.7),
    0 5px 12px rgba(68, 47, 118, 0.16);
  transform: translateZ(28px);
  z-index: 7;
}

.hair.back {
  left: 13px;
  top: 3px;
  width: 58px;
  height: 50px;
  border-radius: 52% 52% 48% 48%;
  background:
    radial-gradient(circle at 28% 22%, #fff7fb 0 18%, transparent 19%),
    linear-gradient(145deg, #f8eff7 0%, #cbbbe2 100%);
  box-shadow: inset -8px -7px 12px rgba(119, 88, 162, 0.18);
  transform: translateZ(12px);
  z-index: 5;
}

.hair.bun {
  top: 1px;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 26%, #fff, transparent 19%),
    linear-gradient(145deg, #f7edf6, #cab5e2);
  box-shadow: inset -4px -5px 8px rgba(116, 83, 156, 0.18), 0 4px 9px rgba(68, 47, 118, 0.12);
  z-index: 4;
}

.hair.bun.left {
  left: 7px;
  transform: translateZ(9px) rotate(-16deg);
}

.hair.bun.right {
  right: 4px;
  transform: translateZ(9px) rotate(16deg);
}

.eye {
  top: 18px;
  width: 8px;
  height: 11px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, #fff 0 17%, transparent 18%),
    radial-gradient(circle at 56% 68%, #b690e7 0 18%, transparent 19%),
    #4d376f;
  box-shadow: 0 0 0 1px rgba(77, 55, 111, 0.1);
}

.eye.left {
  left: 13px;
}

.eye.right {
  right: 13px;
}

.blush {
  top: 31px;
  width: 8px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255, 148, 148, 0.35);
}

.blush.left {
  left: 8px;
}

.blush.right {
  right: 8px;
}

.mouth {
  left: 21px;
  top: 32px;
  width: 5px;
  height: 3px;
  border-radius: 50%;
  border-bottom: 2px solid rgba(155, 78, 95, 0.65);
}

.hairpin {
  left: 4px;
  top: 12px;
  width: 15px;
  height: 9px;
  border: 3px solid #a874e7;
  border-top-color: transparent;
  border-radius: 50% 50% 40% 40%;
  transform: rotate(-28deg);
}

.headphones {
  top: 42px;
  width: 15px;
  height: 20px;
  border-radius: 50%;
  background: linear-gradient(145deg, #d4bbf3, #8e68d7);
  box-shadow: inset 2px 2px 4px rgba(255, 255, 255, 0.55);
  z-index: 8;
}

.headphones.left {
  left: 22px;
  transform: translateZ(31px) rotate(10deg);
}

.headphones.right {
  right: 20px;
  transform: translateZ(31px) rotate(-10deg);
}

.neck {
  left: 36px;
  top: 50px;
  width: 13px;
  height: 14px;
  border-radius: 7px;
  background: #efcabe;
  transform: translateZ(14px);
  z-index: 4;
}

.torso {
  left: 22px;
  top: 58px;
  width: 40px;
  height: 46px;
  border-radius: 18px 18px 13px 13px;
  background:
    radial-gradient(circle at 38% 22%, rgba(255, 255, 255, 0.8), transparent 20%),
    linear-gradient(145deg, #fff 0%, #eee8fb 45%, #c8b2ec 100%);
  box-shadow:
    inset -6px -7px 10px rgba(105, 74, 150, 0.16),
    0 8px 13px rgba(68, 47, 118, 0.14);
  transform: translateZ(16px);
  z-index: 4;
}

.hoodie-mark {
  position: absolute;
  left: 14px;
  top: 15px;
  width: 14px;
  height: 10px;
  border: 3px solid #9c74df;
  border-top-color: transparent;
  border-radius: 50% 50% 40% 40%;
}

.strap {
  position: absolute;
  left: 19px;
  top: -2px;
  width: 6px;
  height: 52px;
  border-radius: 999px;
  background: rgba(143, 110, 207, 0.28);
  transform: rotate(-26deg);
}

.arm {
  top: 60px;
  width: 14px;
  height: 38px;
  border-radius: 999px;
  background: linear-gradient(145deg, #fff, #d9cff0);
  transform-origin: 50% 8%;
  z-index: 5;
}

.arm.left {
  left: 12px;
  transform: translateZ(20px) rotate(20deg);
}

.arm.right {
  right: 11px;
  transform: translateZ(20px) rotate(-18deg);
}

.hand {
  position: absolute;
  left: 2px;
  bottom: -5px;
  width: 11px;
  height: 10px;
  border-radius: 50%;
  background: #efcabe;
}

.skirt {
  left: 22px;
  top: 96px;
  width: 42px;
  height: 22px;
  border-radius: 10px 10px 16px 16px;
  background: linear-gradient(145deg, #b995ef, #8f66d8);
  transform: translateZ(13px) rotateX(-10deg);
  z-index: 3;
}

.leg {
  top: 110px;
  width: 14px;
  height: 26px;
  border-radius: 999px;
  background: linear-gradient(180deg, #f0c9bd, #d6a99f);
  transform-origin: 50% 5%;
  z-index: 2;
}

.leg.left {
  left: 29px;
  transform: translateZ(10px) rotate(5deg);
}

.leg.right {
  right: 24px;
  transform: translateZ(10px) rotate(-4deg);
}

.shoe {
  position: absolute;
  left: -5px;
  bottom: -6px;
  width: 23px;
  height: 11px;
  border-radius: 999px 999px 8px 8px;
  background: linear-gradient(145deg, #fff, #b99aea);
  box-shadow: inset -3px -3px 4px rgba(88, 58, 137, 0.12);
}

.prop-card {
  right: 8%;
  top: 34%;
  width: 28px;
  height: 36px;
  border-radius: 6px;
  background: linear-gradient(145deg, #fff, #dfeaf8);
  box-shadow: inset 0 0 0 2px rgba(124, 85, 223, 0.18), 0 8px 16px rgba(68, 47, 118, 0.13);
}

.prop-card::after {
  content: "";
  position: absolute;
  left: 8px;
  top: 11px;
  width: 12px;
  height: 9px;
  border: 2px solid #8f66d8;
  border-top-color: transparent;
  border-radius: 50% 50% 35% 35%;
}

.prop-mirror {
  right: 5%;
  top: 14%;
  width: 22px;
  height: 72px;
  border-radius: 999px;
  border: 5px solid rgba(143, 102, 216, 0.65);
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.75), rgba(205, 235, 255, 0.25));
}

.mascot-sprite[data-action="idle"] .model-core {
  animation: rig-idle var(--action-duration) ease-in-out infinite;
}

.mascot-sprite[data-action="idle"] .head,
.mascot-sprite[data-action="plan"] .head,
.mascot-sprite[data-action="recommend"] .head {
  animation: head-curious var(--action-duration) ease-in-out infinite;
}

.mascot-sprite[data-action="idle"] .arm.left,
.mascot-sprite[data-action="idle"] .arm.right {
  animation: arm-soft var(--action-duration) ease-in-out infinite;
}

.mascot-sprite[data-action="spin"] .model-core {
  animation: rig-spin var(--action-duration) cubic-bezier(0.5, 0, 0.22, 1) infinite;
}

.mascot-sprite[data-action="spin"] .hair.bun.left,
.mascot-sprite[data-action="spin"] .hair.bun.right {
  animation: bun-spin var(--action-duration) ease-in-out infinite;
}

.mascot-sprite[data-action="tidy"] .model-core {
  animation: rig-tidy var(--action-duration) ease-in-out infinite;
}

.mascot-sprite[data-action="tidy"] .arm.left {
  animation: left-arm-tidy var(--action-duration) ease-in-out infinite;
}

.mascot-sprite[data-action="tidy"] .arm.right {
  animation: right-arm-tidy var(--action-duration) ease-in-out infinite;
}

.mascot-sprite[data-action="tidy"] .prop-shirt,
.mascot-sprite[data-action="tidy"] .prop-hanger {
  opacity: 1;
}

.mascot-sprite[data-action="plan"] .model-core {
  animation: rig-plan var(--action-duration) ease-in-out infinite;
}

.mascot-sprite[data-action="plan"] .arm.left,
.mascot-sprite[data-action="plan"] .arm.right {
  animation: arm-map-hold var(--action-duration) ease-in-out infinite;
}

.mascot-sprite[data-action="recommend"] .model-core {
  animation: rig-recommend var(--action-duration) ease-in-out infinite;
}

.mascot-sprite[data-action="recommend"] .arm.right {
  animation: arm-wave var(--action-duration) ease-in-out infinite;
}

.mascot-sprite[data-action="recommend"] .prop-card {
  animation: card-present var(--action-duration) ease-in-out infinite;
}

.mascot-sprite[data-action="tryon"] .model-core {
  animation: rig-tryon var(--action-duration) ease-in-out infinite;
}

.mascot-sprite[data-action="tryon"] .prop-mirror {
  animation: mirror-pop var(--action-duration) ease-in-out infinite;
}

.mascot-sprite[data-action="saved"] .model-core {
  animation: rig-saved var(--action-duration) ease-in-out infinite;
}

@keyframes rig-idle {
  0%, 100% { transform: translateX(-50%) translateY(0) rotateX(4deg) rotateZ(-1deg); }
  35% { transform: translateX(-50%) translateY(-5px) rotateX(6deg) rotateZ(1.5deg); }
  70% { transform: translateX(-50%) translateY(-2px) rotateX(3deg) rotateZ(-1.2deg); }
}

@keyframes head-curious {
  0%, 100% { transform: translateZ(28px) rotateZ(0deg); }
  35% { transform: translateZ(30px) rotateZ(-6deg) translateY(-1px); }
  68% { transform: translateZ(28px) rotateZ(4deg); }
}

@keyframes arm-soft {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 3px; }
}

@keyframes rig-spin {
  0%, 10% { transform: translateX(-50%) rotateX(4deg) rotateY(0deg) translateY(0); }
  32% { transform: translateX(-50%) rotateX(4deg) rotateY(115deg) translateY(-7px); }
  55% { transform: translateX(-50%) rotateX(4deg) rotateY(225deg) translateY(-5px); }
  80%, 100% { transform: translateX(-50%) rotateX(4deg) rotateY(360deg) translateY(0); }
}

@keyframes bun-spin {
  0%, 100% { scale: 1; }
  35% { scale: 1.08; }
  65% { scale: 0.96; }
}

@keyframes rig-tidy {
  0%, 100% { transform: translateX(-50%) rotateX(4deg) rotateZ(0); }
  22% { transform: translateX(-54%) rotateX(6deg) rotateZ(-8deg); }
  48% { transform: translateX(-46%) rotateX(4deg) rotateZ(6deg); }
  72% { transform: translateX(-52%) rotateX(6deg) rotateZ(-4deg); }
}

@keyframes left-arm-tidy {
  0%, 100% { transform: translateZ(20px) rotate(20deg); }
  30% { transform: translateZ(24px) rotate(-58deg) translateY(-4px); }
  58% { transform: translateZ(24px) rotate(42deg) translateY(2px); }
}

@keyframes right-arm-tidy {
  0%, 100% { transform: translateZ(20px) rotate(-18deg); }
  28% { transform: translateZ(24px) rotate(60deg) translateY(-2px); }
  56% { transform: translateZ(24px) rotate(-54deg) translateY(3px); }
}

@keyframes rig-plan {
  0%, 100% { transform: translateX(-50%) rotateX(4deg) rotateZ(-1deg); }
  42% { transform: translateX(-50%) translateY(-4px) rotateX(5deg) rotateZ(2deg); }
}

@keyframes arm-map-hold {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -4px; }
}

@keyframes rig-recommend {
  0%, 100% { transform: translateX(-50%) rotateX(4deg) translateY(0); }
  22% { transform: translateX(-50%) rotateX(5deg) translateY(-8px) rotateZ(-2deg); }
  48% { transform: translateX(-50%) rotateX(4deg) translateY(0) rotateZ(1deg); }
}

@keyframes arm-wave {
  0%, 100% { transform: translateZ(20px) rotate(-18deg); }
  22% { transform: translateZ(26px) rotate(-92deg) translateY(-4px); }
  38% { transform: translateZ(26px) rotate(-55deg) translateY(-8px); }
  54% { transform: translateZ(26px) rotate(-95deg) translateY(-4px); }
}

@keyframes card-present {
  0%, 16%, 100% { opacity: 0; transform: translate3d(12px, 18px, 0) rotate(12deg) scale(0.7); }
  28%, 72% { opacity: 1; transform: translate3d(-12px, -8px, 26px) rotate(-5deg) scale(1); }
  86% { opacity: 0; transform: translate3d(-8px, -20px, 0) rotate(-10deg) scale(0.8); }
}

@keyframes rig-tryon {
  0%, 100% { transform: translateX(-50%) rotateX(4deg) rotateY(0); }
  28% { transform: translateX(-54%) rotateX(4deg) rotateY(-18deg); }
  56% { transform: translateX(-45%) rotateX(4deg) rotateY(15deg); }
}

@keyframes mirror-pop {
  0%, 14%, 100% { opacity: 0; transform: translateX(20px) scale(0.8) rotateY(-30deg); }
  30%, 76% { opacity: 1; transform: translateX(-4px) scale(1) rotateY(-10deg); }
}

@keyframes rig-saved {
  0%, 100% { transform: translateX(-50%) rotateX(4deg) translateY(0) scale(1); }
  18% { transform: translateX(-50%) rotateX(4deg) translateY(-9px) scale(1.04) rotateZ(-3deg); }
  36% { transform: translateX(-50%) rotateX(4deg) translateY(0) scale(1); }
  54% { transform: translateX(-50%) rotateX(4deg) translateY(-5px) rotateZ(3deg); }
}

.tab {
  border-radius: 16px;
  background: transparent;
  color: #9b94ab;
  display: grid;
  place-items: center;
  gap: 2px;
  font-size: 11px;
  font-weight: 800;
}

.tab.active {
  color: var(--primary);
  background: #f1ebff;
}

.toast {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 92px;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border-radius: 14px;
  background: rgba(36, 34, 56, 0.92);
  color: #fff;
  padding: 10px 14px;
  font-size: 13px;
  z-index: 5;
  animation: toast-in 0.2s ease;
}

.legal-consent-row,
.legal-links {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.legal-consent-row {
  justify-content: flex-start;
  margin-top: 2px;
  padding: 4px 2px;
}

.legal-consent-row input {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin: 0 3px 0 0;
  accent-color: var(--primary);
}

.legal-consent-row label {
  color: var(--text);
}

.legal-consent-row button,
.legal-links button,
.legal-inline {
  border: 0;
  background: transparent;
  color: var(--primary);
  padding: 0;
  font: inherit;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.splash .legal-consent-row {
  max-width: 320px;
  margin: 14px auto 0;
  justify-content: center;
}

.legal-links {
  margin: 12px 0 2px;
}

.legal-inline {
  display: inline;
  margin-left: 4px;
}

.legal-scroll {
  background: #fff;
}

.legal-document {
  color: var(--text);
  padding-bottom: 24px;
}

.legal-intro {
  border-left: 4px solid var(--primary);
  padding: 12px 14px;
  background: #f7f3ff;
}

.legal-intro p {
  margin: 0 0 10px;
  color: var(--text);
  font-weight: 700;
}

.legal-intro div {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  color: var(--muted);
  font-size: 11px;
}

.legal-document section {
  padding: 18px 2px;
  border-bottom: 1px solid #ece8f5;
}

.legal-document h3 {
  margin: 0 0 10px;
  font-size: 17px;
  line-height: 1.4;
}

.legal-document p,
.legal-document li {
  color: #5e586f;
  font-size: 14px;
  line-height: 1.8;
}

.legal-document p {
  margin: 0 0 9px;
}

.legal-document ul {
  margin: 0;
  padding-left: 20px;
}

.legal-document li + li {
  margin-top: 7px;
}

.account-delete-zone {
  margin-top: 22px;
  padding: 20px 0 8px;
  border-top: 1px solid #e8e2f0;
}

.account-delete-zone h3 {
  margin: 0 0 6px;
  font-size: 17px;
}

.account-delete-zone p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

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

.hidden {
  display: none !important;
}

@media (max-width: 920px) {
  html,
  body {
    width: 100%;
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
  }

  .app-stage {
    width: 100%;
    height: 100dvh;
    min-height: 0;
    grid-template-columns: 1fr;
    align-items: stretch;
    justify-items: stretch;
    padding: 0;
  }

  .brand-panel {
    display: none;
  }

  .phone-shell {
    margin: 0 auto;
    height: 100%;
    min-height: 0;
    border-radius: 0;
  }

  .app-screen {
    height: 100%;
    border-radius: 0;
    box-shadow: none;
  }

  .scroll {
    padding-bottom: calc(92px + env(safe-area-inset-bottom));
  }

  .tabbar {
    bottom: 0;
    min-height: calc(66px + env(safe-area-inset-bottom));
    padding-bottom: calc(7px + env(safe-area-inset-bottom));
    z-index: 50;
  }
}

@media (max-width: 470px) {
  body {
    background: var(--bg);
  }

  .app-stage {
    padding: 0;
  }

  .phone-shell {
    width: 100%;
    height: 100dvh;
    min-height: 0;
    border-radius: 0;
    padding: 0;
  }

  .app-screen {
    border-radius: 0;
  }

  .item-detail-hero {
    grid-template-columns: 1fr;
  }

  .item-detail-art {
    height: 340px;
  }
}

html.native-app .scroll {
  --scroll-pad-top: max(20px, env(safe-area-inset-top));
  padding-bottom: calc(96px + env(safe-area-inset-bottom));
}

html.native-app .tabbar {
  bottom: 0;
}

html.native-app .toast {
  bottom: calc(96px + env(safe-area-inset-bottom));
}
