:root {
  --bg: #f2f4f8;
  --card: #fff;
  --text: #111;
  --muted: #646a7a;
  --accent: linear-gradient(90deg, #ff33a6 0%, #7f4bff 100%);
  --radius: 24px;
  --shadow: 0 22px 44px rgba(15, 17, 24, 0.12);
  --soft-shadow: 0 8px 24px rgba(73, 87, 113, 0.15);
}
* { box-sizing: border-box; }
html, body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  color: var(--text);
  background: radial-gradient(circle at top, #fff 0%, var(--bg) 55%);
}
.page-wrap { min-height: 100vh; display: flex; justify-content: center; padding: 10px; }
.app-shell {
  width: min(100%, 520px);
  min-height: calc(100vh - 20px);
  background: #fff;
  border-radius: 32px;
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
}
.top-bar {
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 9;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(6px);
}
.top-bar-title h1 { margin: 0; font-size: 1rem; letter-spacing: .04em; }
.top-bar-title small { color: var(--muted); font-size: .73rem; }
.demo-alert { margin: 0 16px 10px; background: #fff8db; color: #7a6618; border: none; border-radius: 12px; padding: 10px 14px; font-size: .9rem; box-shadow: var(--soft-shadow); }
.icon-btn {
  border: none;
  background: #f1f4f9;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  color: #1f2230;
  box-shadow: var(--soft-shadow);
}
.feed { height: calc(100vh - 90px); overflow-y: auto; scroll-snap-type: y mandatory; }
.look-slide { min-height: calc(100vh - 90px); scroll-snap-align: start; padding: 0 14px 26px; display: flex; flex-direction: column; justify-content: center; gap: 14px; }
.media-card { position: relative; }
.media-row { display: flex; overflow-x: auto; gap: 0; scroll-snap-type: x mandatory; scrollbar-width: none; border-radius: var(--radius); }
.media-row::-webkit-scrollbar { display: none; }
.media-row img, .media-row video { width: 100%; max-width: none; aspect-ratio: 9 / 13; object-fit: cover; border-radius: 0; flex: 0 0 100%; scroll-snap-align: start; background: #f0f2f4; }
.media-nav { position: absolute; inset: 0; display: flex; align-items: center; justify-content: space-between; padding: 0 10px; pointer-events: none; }
.media-arrow {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 999px;
  background: rgba(17, 17, 17, 0.48);
  color: #fff;
  font-size: 1.45rem;
  line-height: 1;
  cursor: pointer;
  pointer-events: auto;
}
.media-dots { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); display: flex; gap: 8px; }
.media-dot { width: 8px; height: 8px; border: none; border-radius: 50%; background: rgba(255, 255, 255, 0.55); padding: 0; cursor: pointer; }
.media-dot.active { background: #fff; }
.post-layout { display: flex; align-items: flex-start; }
.look-info { flex: 1; background: var(--card); border-radius: var(--radius); padding: 20px; box-shadow: 0 10px 24px rgba(17, 24, 39, 0.1); }
.look-info h2 { margin: 0 0 8px; font-size: 2rem; line-height: 1.05; text-transform: uppercase; }
.look-info p { margin: 0 0 8px; color: #181c2b; font-size: 1.1rem; }
.look-info small { display: block; margin-bottom: 18px; color: var(--muted); }
.action-rail { position: absolute; right: 14px; bottom: 16px; display: flex; flex-direction: column; gap: 10px; }
.rail-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: rgba(17, 17, 17, 0.32);
  color: #fff;
  backdrop-filter: blur(6px);
  cursor: pointer;
  font-size: 1.4rem;
}
.rail-btn.active { color: #ff2a9e; }
.ml-btn {
  border: none;
  text-decoration: none;
  color: #fff;
  background: var(--accent);
  display: inline-flex;
  justify-content: center;
  align-items: center;
  font-weight: 600;
  border-radius: 14px;
  padding: 14px 18px;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(124, 65, 241, 0.28);
}
.ml-btn.secondary { background: #30384a; box-shadow: var(--soft-shadow); }
.google-btn {
  border: none;
  border-radius: 14px;
  padding: 12px 16px;
  color: #1f2333;
  text-decoration: none;
  background: #eef2f8;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--soft-shadow);
}
.google-g {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: none;
  display: grid;
  place-items: center;
  color: #4285f4;
  background: #fff;
  font-weight: 700;
}
.profile-panel { position: absolute; inset: 0; z-index: 10; background: rgba(255, 255, 255, .98); padding: 16px; transform: translateX(100%); transition: transform .25s ease; overflow: auto; }
.profile-panel.open { transform: translateX(0); }
.panel-head { display: flex; justify-content: space-between; align-items: center; }
.panel-box { background: #f7f8fb; border-radius: 18px; padding: 14px; margin-top: 12px; }
.panel-box h3 { margin: 0 0 8px; }
.panel-box h4 { margin: 10px 0 6px; font-size: .86rem; color: #1f2333; }
.account-row { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.account-row img { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; background: #dbe1ee; }
.muted { color: var(--muted); margin: 0 0 8px; display: block; }
label { display: block; font-size: .92rem; margin-bottom: 8px; color: #1f2333; }
input, textarea {
  width: 100%;
  border: none;
  border-radius: 14px;
  padding: 12px;
  margin-top: 6px;
  font: inherit;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(147, 159, 183, 0.26);
}
.size-groups { display: grid; gap: 8px; }
.chip-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.size-chip {
  border: none;
  border-radius: 999px;
  padding: 9px 14px;
  background: #eef2f8;
  cursor: pointer;
  color: #30384a;
  box-shadow: var(--soft-shadow);
}
.size-chip.active { background: #2f3a50; color: #fff; }
.inline-form { display: flex; gap: 8px; margin: 8px 0 10px; }
.inline-form .ml-btn { padding: 10px 14px; border-radius: 12px; }
.size-inline-form input { margin-top: 0; }
.mini-list { margin: 0; padding-left: 20px; color: #1f2333; }
.detail-list { margin: 0; padding: 0; list-style: none; }
.detail-item, .collection-item {
  list-style: none;
  border: none;
  border-radius: 14px;
  background: #fff;
  padding: 12px;
  margin-bottom: 8px;
  box-shadow: var(--soft-shadow);
}
.detail-item { display: flex; justify-content: space-between; gap: 12px; }
.detail-item a, .collection-item a { color: #3a64ff; text-decoration: none; display: block; margin-top: 4px; font-size: .9rem; }
.collection-head { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; margin-bottom: 8px; }
.collection-item ul { margin: 0; padding-left: 18px; }
.mini-action {
  border: none;
  border-radius: 12px;
  background: #eef2f8;
  cursor: pointer;
  padding: 8px 10px;
  font-size: .78rem;
  margin-left: 6px;
  box-shadow: var(--soft-shadow);
}
.mini-action.danger { color: #b6242f; background: #ffecef; }
.empty { display: grid; place-items: center; }

.ml-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 30px);
  opacity: 0;
  pointer-events: none;
  background: #222939;
  color: #fff;
  border-radius: 999px;
  padding: 12px 18px;
  font-size: .9rem;
  transition: all .22s ease;
  z-index: 40;
}
.ml-toast.open { opacity: 1; transform: translate(-50%, 0); }

.ml-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(16, 22, 35, 0.42);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 30;
  padding: 14px;
}
.ml-modal-backdrop.open { display: flex; }
.ml-modal {
  width: min(100%, 420px);
  background: #fff;
  border-radius: 20px;
  padding: 16px;
  box-shadow: 0 30px 45px rgba(13, 20, 37, 0.24);
}
.ml-modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.ml-modal-content { display: grid; gap: 10px; }
.modal-collection-list { display: flex; flex-wrap: wrap; gap: 8px; }
.modal-collection-list .mini-action { margin-left: 0; }

@media (min-width: 960px) {
  .page-wrap { padding: 20px 16px; }
  .app-shell { width: min(560px, 100%); min-height: calc(100vh - 40px); }
  .feed, .look-slide { min-height: calc(100vh - 130px); height: calc(100vh - 130px); }
}

@media (max-width: 700px) {
  .page-wrap { padding: 0; }
  .app-shell { width: 100%; min-height: 100vh; border-radius: 0; box-shadow: none; }
  .action-rail { right: 10px; bottom: 12px; }
  .rail-btn { width: 44px; height: 44px; }
  .detail-item { flex-direction: column; align-items: flex-start; }
}
