/* Atelier — visual system based on DESIGN.md:
   white surfaces floating on a faint cool canvas, pillow-soft 20–28px radii, pill controls,
   Inter with tight negative tracking (hierarchy through size + tracking, never bold),
   soft layered shadows instead of borders, and ONE saturated accent (violet) reserved for
   the wordmark dot and the send button. Photography carries all other colour. */

:root {
  --canvas: #f2f4f5;
  --surface: #ffffff;
  --ink: #000000;
  --ink-2: #787574;          /* muted gray: secondary text, idle icons */
  --line: #ebebeb;           /* hairlines on inputs and pills only */
  --stone: #cccccc;
  --fog: #acb0aa;
  --slate: #332f2d;
  --violet: #5433eb;
  --violet-wash: #c0b5f3;
  --good: #1f7a4d;           /* functional status only (worn ✓, owned) */

  --r-card: 28px;
  --r-inner: 20px;
  --r-pill: 9999px;

  --sh-sm: rgba(0, 0, 0, 0.06) 0 2px 8px 0;
  --sh-card: rgba(0, 0, 0, 0.1) 0 4px 6px -1px, rgba(0, 0, 0, 0.1) 0 2px 4px -2px;
  --sh-lg: rgba(0, 0, 0, 0.12) 0 4px 24px 0;
  --sh-violet: rgba(69, 36, 219, 0.34) 0 4px 24px 0;

  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --track-body: -0.031em;
  --track-head: -0.05em;

  /* legacy aliases used by the scripts */
  --bg: var(--canvas);
  --surface-2: #f2f4f5;
  --accent: var(--ink);
  --accent-ink: #fff;
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; overflow: hidden; }
body {
  margin: 0; height: 100vh; height: 100dvh;
  display: grid; grid-template-columns: 76px minmax(0, 1fr); grid-template-rows: 64px minmax(0, 1fr);
  background: var(--canvas); color: var(--ink);
  font: 400 16px/1.38 var(--font); letter-spacing: var(--track-body);
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; }
a { color: inherit; }
.muted { color: var(--ink-2); font-size: 14px; letter-spacing: -0.014em; }
.dot { display: inline-block; width: .32em; height: .32em; border-radius: 50%; background: var(--violet); margin-left: .06em; }

/* ---------------------------------------------------------------- nav rail */
.rail {
  grid-row: 1 / 3; grid-column: 1; background: var(--surface);
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 0; z-index: 6;
}
.rail-mark { font-weight: 600; font-size: 26px; letter-spacing: -0.06em; line-height: 1; margin: 4px 0 18px; }
.rail button {
  position: relative; width: 60px; border: 0; background: transparent; border-radius: 20px;
  display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 10px 0 8px; color: var(--ink-2);
}
.rail button svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.rail .lbl { font-size: 11px; letter-spacing: -0.017em; font-weight: 500; }
.rail button:hover { color: var(--ink); }
.rail button.active { background: var(--canvas); color: var(--ink); }
.rail .cnt:not(:empty) {
  position: absolute; top: 4px; right: 8px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--ink); color: #fff; font-size: 10px; line-height: 18px; font-weight: 500; letter-spacing: 0;
}

/* ---------------------------------------------------------------- header */
.top {
  grid-column: 2; grid-row: 1; display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px; background: transparent; min-width: 0; z-index: 5;
}
.brand { display: flex; align-items: baseline; }
.word { font-size: 22px; font-weight: 600; letter-spacing: -0.06em; }
.top-actions { display: flex; gap: 8px; align-items: center; min-width: 0; }
.ghost, .who {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-pill);
  padding: 7px 14px; font-size: 14px; letter-spacing: -0.014em; box-shadow: var(--sh-sm); white-space: nowrap;
}
.ghost:hover, .who:hover { box-shadow: var(--sh-lg); }
.who { display: flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; cursor: pointer; }

.avatar {
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: var(--canvas); box-shadow: inset 0 0 0 1px var(--line); font-size: 13px; font-weight: 500;
}
.panel-toggle { display: none; }

/* ---------------------------------------------------------------- layout */
.layout {
  grid-column: 2; grid-row: 2; min-height: 0; display: grid;
  grid-template-columns: minmax(0, 1fr) 380px; grid-template-rows: minmax(0, 1fr); gap: 12px; padding: 0 12px 12px 0;
}
.layout > .chat, .layout > .wardrobe-view { grid-column: 1; grid-row: 1; }
.chat { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow: hidden; }
.messages { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; position: relative;
  padding: 20px max(20px, calc((100% - 760px) / 2)) 16px; }
.panel { grid-column: 2; grid-row: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; background: var(--surface);
  border-radius: var(--r-card); box-shadow: var(--sh-card); }

/* ---------------------------------------------------------------- messages */
.msg { display: flex; margin: 0 0 16px; }
.msg.her { justify-content: flex-end; }
.bubble {
  max-width: min(580px, 88%); padding: 14px 18px; border-radius: 24px; background: var(--surface);
  box-shadow: var(--sh-sm); overflow-wrap: anywhere; font-size: 15.5px; line-height: 1.45;
}
.msg.her .bubble { background: var(--ink); color: #fff; box-shadow: none; border-bottom-right-radius: 8px; }
.msg.stylist .bubble { border-bottom-left-radius: 8px; }
.bubble p { margin: 0 0 10px; } .bubble p:last-child { margin: 0; }
.bubble ul { margin: 4px 0 12px; padding-left: 18px; }
.bubble li { margin: 2px 0; }
.bubble strong { font-weight: 600; }
.bubble .look-title { display: block; font-size: 18px; font-weight: 600; letter-spacing: var(--track-head); margin: 10px 0 2px; }
.bubble img.thumb { max-width: 200px; border-radius: 16px; display: block; margin-bottom: 8px; }
.bubble a { text-decoration: underline; text-underline-offset: 2px; }
.bubble .time { font-size: 11px; opacity: .5; margin-top: 6px; text-align: right; letter-spacing: -0.017em; }
.meta { font-size: 12px; color: var(--ink-2); margin-top: 6px; }
.status { display: inline-flex; align-items: center; gap: 10px; color: var(--ink-2); font-size: 14px; }
.dots span { display: inline-block; width: 6px; height: 6px; margin-right: 3px; border-radius: 50%; background: var(--ink-2); animation: blink 1.2s infinite both; }
.dots span:nth-child(2) { animation-delay: .2s; } .dots span:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25 } 40% { opacity: 1 } }
.photo-chip { font-size: 13px; }

/* ---------------------------------------------------------------- composer: the pill search bar */
.composer { flex: none; padding: 8px max(20px, calc((100% - 760px) / 2)) max(16px, env(safe-area-inset-bottom)); }
.composer .row {
  display: flex; align-items: flex-end; gap: 6px; background: var(--surface);
  border: 1px solid rgba(5, 41, 77, 0.1); border-radius: 28px; padding: 5px 5px 5px 8px; box-shadow: var(--sh-sm);
}
.composer .row:focus-within { box-shadow: var(--sh-lg); }
textarea { flex: 1; border: 0; outline: 0; resize: none; background: transparent; padding: 11px 6px; max-height: 160px; font-size: 16px; line-height: 1.35; }
textarea::placeholder { color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.attach { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; color: var(--ink-2); cursor: pointer; flex: none; }
.attach:hover { background: var(--canvas); color: var(--ink); }
.send {
  width: 46px; height: 46px; border-radius: 50%; border: 0; flex: none; display: grid; place-items: center;
  background: var(--violet); color: #fff; box-shadow: var(--sh-violet); transition: transform .15s ease;
}
.send:hover { transform: translateY(-1px); }
.send:disabled { opacity: .45; cursor: default; transform: none; }
.attachments { display: flex; gap: 8px; margin-bottom: 8px; }
.attachments .chip { position: relative; border: 0; padding: 0; }
.attachments img { width: 60px; height: 60px; object-fit: cover; border-radius: 16px; box-shadow: var(--sh-sm); }
.attachments button { position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; border-radius: 50%; border: 0; background: var(--ink); color: #fff; font-size: 12px; line-height: 1; }
.file-chip { display: inline-flex; align-items: center; height: 60px; padding: 0 12px; border-radius: 16px; background: var(--surface); box-shadow: var(--sh-sm); font-size: 12px; max-width: 180px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.jump {
  position: absolute; left: 50%; bottom: 96px; transform: translateX(-50%); z-index: 3; border: 0; border-radius: var(--r-pill);
  padding: 9px 16px; background: var(--ink); color: #fff; font-size: 13px; box-shadow: var(--sh-lg);
}

/* ---------------------------------------------------------------- buttons, chips, pills */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-pill);
  padding: 9px 16px; font-size: 14px; letter-spacing: -0.014em; box-shadow: var(--sh-sm); white-space: nowrap;
}
.btn:hover { box-shadow: var(--sh-lg); }
.btn.primary { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn:disabled { opacity: .5; }
.danger { color: #c4291c; }
.linkish { align-self: flex-start; border: 0; background: none; color: var(--ink-2); font-size: 12px; padding: 0; margin-top: auto; text-decoration: underline; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag, .chip {
  display: inline-flex; align-items: center; gap: 6px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-pill); padding: 4px 11px; font-size: 13px; letter-spacing: -0.014em;
}
.tag.no { background: var(--canvas); border-color: transparent; color: var(--ink-2); }
.chip.r-loved { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip.r-not_again { background: var(--canvas); border-color: transparent; }
.swatch { width: 14px; height: 14px; border-radius: 50%; flex: none; background: var(--canvas); box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
.owned { font-size: 11px; color: var(--good); background: rgba(31,122,77,.08); border-radius: var(--r-pill); padding: 2px 8px; margin-left: auto; white-space: nowrap; }
.tobuy { font-size: 11px; color: var(--ink); background: var(--canvas); border-radius: var(--r-pill); padding: 2px 8px; margin-left: auto; white-space: nowrap; text-decoration: none; }
a.tobuy:hover { background: var(--ink); color: #fff; }

/* feedback pill row under looks */
.fb { display: flex; gap: 6px; flex-wrap: wrap; }
.fb button { border: 1px solid var(--line); background: var(--surface); border-radius: var(--r-pill); padding: 6px 12px; font-size: 13px; }
.fb button:hover { box-shadow: var(--sh-sm); }
.fb button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.fb .wore { background: var(--canvas); border-color: transparent; }

/* ---------------------------------------------------------------- side panel */
.tabs { display: flex; gap: 4px; padding: 14px 14px 10px; position: sticky; top: 0; background: var(--surface); z-index: 1; overflow-x: auto; }
.tabs button { border: 0; background: transparent; padding: 8px 12px; border-radius: var(--r-pill); color: var(--ink-2); font-size: 14px; white-space: nowrap; }
.tabs button.active { background: var(--canvas); color: var(--ink); }
.tab-body { padding: 8px 22px 36px; }
.tab-body h3 { font-size: 18px; font-weight: 600; letter-spacing: var(--track-head); margin: 22px 0 8px; }
.tab-body h3:first-child { margin-top: 4px; font-size: 22px; }
.kv { display: grid; grid-template-columns: 100px 1fr; gap: 6px 12px; font-size: 14px; margin: 0; letter-spacing: -0.014em; }
.kv dt { color: var(--ink-2); } .kv dd { margin: 0; }
.progress { height: 6px; background: var(--canvas); border-radius: 99px; overflow: hidden; margin: 6px 0 4px; }
.progress div { height: 100%; background: var(--ink); border-radius: 99px; }
.note { background: var(--canvas); border-radius: 16px; padding: 10px 14px; font-size: 14px; margin: 6px 0; }
.look-mini { border-radius: 20px; background: var(--canvas); padding: 12px 14px; margin-bottom: 10px; }
.look-mini h4 { margin: 0; font-size: 15px; font-weight: 600; letter-spacing: -0.03em; }
.look-mini .muted { font-size: 12.5px; }
.pieces { list-style: none; margin: 0 0 10px; padding: 0; font-size: 14px; letter-spacing: -0.014em; }
.pieces li { display: flex; align-items: center; gap: 10px; padding: 5px 0; }
.piece-thumb { width: 32px; height: 32px; border-radius: 10px; object-fit: cover; flex: none; }
.trend { padding: 14px 0; border-top: 1px solid var(--line); }
.trend h4 { margin: 2px 0 4px; font-size: 16px; font-weight: 600; letter-spacing: -0.035em; }
.trend .cat { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); font-weight: 500; }
.trend p { margin: 4px 0; font-size: 14px; }
.trend a { color: var(--ink-2); font-size: 12px; margin-right: 8px; }

/* inspiration board (panel) */
.inspo-grid { display: grid; gap: 12px; }
.inspo { border-radius: var(--r-card); overflow: hidden; background: var(--surface); box-shadow: var(--sh-card); padding: 8px; }
.inspo img { width: 100%; max-height: 280px; object-fit: cover; object-position: center; display: block; border-radius: var(--r-inner); background: var(--canvas); }
.inspo-body { padding: 10px 8px 6px; }
.inspo-body h4 { margin: 2px 0 4px; font-size: 15px; font-weight: 600; letter-spacing: -0.03em; }
.inspo-body p { margin: 4px 0 8px; font-size: 13.5px; }
.inspo-body .likes { color: var(--ink); }

/* photos the stylist shows */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin: -4px 0 20px; max-width: 760px; }
.shot { position: relative; margin: 0; background: var(--surface); border-radius: var(--r-card); overflow: hidden; box-shadow: var(--sh-card); padding: 6px; }
.shot img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; display: block; border-radius: 22px; background: var(--canvas); }
.shot figcaption { padding: 8px 8px 6px; font-size: 13px; line-height: 1.35; }
.shot .save { position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; border-radius: 50%; border: 0; background: rgba(255,255,255,.95); color: var(--ink); font-size: 16px; line-height: 1; box-shadow: var(--sh-sm); }
.shot .save.on { background: var(--ink); color: #fff; }

/* ---------------------------------------------------------------- mood boards (looks) */
.looks { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 370px)); gap: 14px; margin: -4px 0 22px; max-width: 760px; }
.look, .mood-card { background: var(--surface); border-radius: var(--r-card); box-shadow: var(--sh-card); overflow: hidden; display: flex; flex-direction: column; padding: 8px; }
.mood-open { border: 0; padding: 0; background: none; display: block; width: 100%; cursor: zoom-in; }
.mood { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; border-radius: var(--r-inner); overflow: hidden; }
.mood.n1 { grid-template-columns: 1fr; } .mood.n2 { grid-template-columns: 1fr 1fr; } .mood.n4 { grid-template-columns: 1fr 1fr; }
.mood.has-hero { grid-template-columns: repeat(3, 1fr); }
.mood.n5:not(.has-hero) .tile:last-child { grid-column: span 2; aspect-ratio: auto; }
.tile { position: relative; aspect-ratio: 1; background: var(--canvas); overflow: hidden; }
.tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile.hero { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; }
.tile.hero.worn img { object-position: center; }
.tcolour { width: 100%; height: 100%; display: grid; place-items: center; }
.tcolour .swatch { width: 40%; height: 40%; }
.tlabel {
  position: absolute; left: 6px; bottom: 6px; max-width: calc(100% - 12px); padding: 4px 8px; border-radius: 10px;
  background: rgba(255,255,255,.88); color: var(--ink); font-size: 11px; line-height: 1.25; letter-spacing: -0.017em;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-align: left;
  backdrop-filter: blur(6px);
}
.noimg-tile .tlabel { background: transparent; backdrop-filter: none; }
.ttag { position: absolute; top: 6px; left: 6px; font-size: 10px; padding: 2px 7px; border-radius: var(--r-pill); background: rgba(255,255,255,.92); color: var(--ink); letter-spacing: -0.01em; font-weight: 500; }
.ttag.yours { color: var(--good); }
.ttag.ex { color: var(--ink-2); }
.look-body { padding: 12px 8px 6px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.look-body h4, .look h4 { margin: 0; font-size: 18px; font-weight: 600; letter-spacing: var(--track-head); line-height: 1.15; }
.look-body .why { margin: 0; font-size: 13.5px; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.look-body .fb { margin-top: auto; }
.worn-chip { font-size: 12px; color: var(--good); }
.mood-card.outfit { box-shadow: var(--sh-card), inset 0 0 0 2px var(--canvas); }

/* ---------------------------------------------------------------- full views (wardrobe, lookbook) */
.wardrobe-view { overflow-y: auto; min-height: 0; overscroll-behavior: contain; padding: 22px max(20px, calc((100% - 1040px) / 2)) 48px; }
.whead { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.whead h2 { font-size: 34px; font-weight: 600; letter-spacing: -0.055em; line-height: 1.05; margin: 0 0 6px; }
.whead p { margin: 0; }
.wactions { display: flex; gap: 8px; flex-wrap: wrap; }
.wfilters { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 20px; }
.wfilters button {
  display: inline-flex; align-items: center; gap: 6px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-pill); padding: 7px 14px; font-size: 14px; box-shadow: var(--sh-sm);
}
.wfilters button span { color: var(--ink-2); font-size: 12px; }
.wfilters button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.wfilters button.on span { color: rgba(255,255,255,.7); }
.wfilters.occ { margin-top: -8px; }
.wfilters.occ button { font-size: 13px; padding: 5px 12px; box-shadow: none; }
.wfilters.sub { margin-top: -8px; }
.wfilters.sub button { font-size: 13px; padding: 5px 12px; box-shadow: none; }
.wfilters.sub button.ideas { margin-left: auto; color: var(--violet); border-color: transparent; background: rgba(84,51,235,.07); }
.wfilters.sub button.ideas:hover { background: rgba(84,51,235,.13); }

/* accessories: the finishing layer under a mood board */
.acc-strip { display: flex; gap: 6px; padding: 8px 2px 0; overflow-x: auto; scrollbar-width: none; min-width: 0; max-width: 100%;
  -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent); mask-image: linear-gradient(90deg, #000 88%, transparent); }
.mgrid > * { min-width: 0; }
.mood.big + .acc-strip { flex-wrap: wrap; -webkit-mask-image: none; mask-image: none; }
.acc-strip::-webkit-scrollbar { display: none; }
.acc { display: flex; align-items: center; gap: 6px; flex: none; max-width: 150px; padding: 3px 10px 3px 3px;
  border-radius: var(--r-pill); background: var(--canvas); font-size: 12px; letter-spacing: -0.01em; color: var(--ink); }
.acc-dot { width: 28px; height: 28px; border-radius: 50%; overflow: hidden; flex: none; background: var(--surface);
  display: grid; place-items: center; box-shadow: inset 0 0 0 1px rgba(0,0,0,.05); }
.acc-dot img { width: 100%; height: 100%; object-fit: cover; }
.acc-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acc.buy .acc-dot { box-shadow: 0 0 0 1.5px var(--violet); }
.mood.big + .acc-strip .acc { max-width: 220px; font-size: 13px; }
.mood.big + .acc-strip .acc-dot { width: 36px; height: 36px; }
h5.finish { margin: 14px 0 4px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-2); }
.pieces .how { display: block; font-size: 12.5px; color: var(--ink-2); margin-top: 1px; }
.wempty { margin-top: 12px; padding: 22px 24px; background: var(--surface); border-radius: var(--r-card); box-shadow: var(--sh-card); max-width: 640px; font-size: 15px; }
.wempty p { margin: 0 0 6px; }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--canvas); border-top-color: var(--ink); animation: spin .9s linear infinite; margin-bottom: 10px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* wardrobe grid: image-first product tiles */
.wgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; }
.witem { background: var(--surface); border-radius: var(--r-card); box-shadow: var(--sh-card); overflow: hidden; display: flex; flex-direction: column; padding: 8px; transition: box-shadow .2s ease, transform .2s ease; }
.witem:hover { box-shadow: var(--sh-lg); transform: translateY(-2px); }
.witem.dim { opacity: .5; }
.wphoto { position: relative; border: 0; padding: 0; background: var(--canvas); display: block; width: 100%; aspect-ratio: 1; border-radius: var(--r-inner); overflow: hidden; }
.wphoto img { width: 100%; height: 100%; object-fit: cover; display: block; }
.noimg { width: 100%; height: 100%; display: grid; place-items: center; }
.noimg span { font-size: 44px; font-weight: 600; letter-spacing: -0.05em; color: rgba(255,255,255,.9); text-shadow: 0 1px 3px rgba(0,0,0,.2); }
.noimg.big { aspect-ratio: 1; border-radius: var(--r-inner); }
.badge { position: absolute; left: 8px; top: 8px; background: var(--ink); color: #fff; font-size: 11px; padding: 3px 9px; border-radius: var(--r-pill); }
.addphoto { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); background: var(--surface); color: var(--ink); font-size: 12px; padding: 5px 12px; border-radius: var(--r-pill); white-space: nowrap; box-shadow: var(--sh-sm); cursor: pointer; }
.wphoto.busy::after { content: "Adding photo…"; position: absolute; inset: 0; display: grid; place-items: center; background: rgba(255,255,255,.8); font-size: 13px; color: var(--ink); }
.wbody { padding: 12px 8px 4px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.wname { font-size: 14px; font-weight: 500; line-height: 1.3; letter-spacing: -0.02em; }
.wmeta { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); letter-spacing: -0.014em; }
.wmeta.small { font-size: 12px; }
.wmeta.worn { color: var(--good); }
.wrate { display: flex; gap: 6px; margin-top: auto; padding-top: 10px; flex-wrap: wrap; }
.wrate button { border: 1px solid var(--line); background: var(--surface); border-radius: var(--r-pill); min-width: 38px; height: 32px; font-size: 14px; }
.wrate button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.wrate .ok { font-size: 12px; padding: 0 12px; background: var(--canvas); border-color: transparent; }
.witem.loading { align-items: center; justify-content: center; text-align: center; min-height: 260px; font-size: 14px; }

/* lookbook */
.lgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 18px; }
.lgrid .mood-card:hover { box-shadow: var(--sh-lg); }
a.tobuy { text-decoration: none; }

/* outfit diary */
.diary { display: grid; gap: 16px; max-width: 880px; }
.wear { display: grid; grid-template-columns: 220px 1fr; gap: 18px; background: var(--surface); border-radius: var(--r-card); box-shadow: var(--sh-card); overflow: hidden; padding: 8px; }
.wear-photo { background: var(--canvas); border-radius: var(--r-inner); overflow: hidden; }
.wear-photo > img { width: 100%; height: 100%; max-height: 320px; object-fit: cover; object-position: center; display: block; }
.wear-body { padding: 12px 14px 10px 0; display: flex; flex-direction: column; gap: 8px; }
.wear-date { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); font-weight: 500; }
.wear-body h4 { margin: 0; font-size: 22px; font-weight: 600; letter-spacing: var(--track-head); }
.wear-meta { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; font-size: 13px; }
.wear-body .why { margin: 0; font-size: 14px; }
.wear-pieces { display: flex; gap: 6px; flex-wrap: wrap; }
.wear-pieces img { width: 48px; height: 48px; border-radius: 12px; object-fit: cover; }
.spotted { font-size: 13px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.addp { background: var(--canvas); border-color: transparent; cursor: pointer; }

/* ---------------------------------------------------------------- modal + toast */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.28); backdrop-filter: blur(4px); display: grid; place-items: center; padding: 16px; z-index: 30; }
.modal-card { position: relative; background: var(--surface); border-radius: 32px; padding: 26px; width: min(760px, 100%); max-height: 92dvh; overflow-y: auto; box-shadow: var(--sh-lg); }
.modal .close { position: absolute; top: 14px; right: 16px; width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--canvas); font-size: 20px; line-height: 1; color: var(--ink); }
.modal-card h3, #wearForm h3 { padding-right: 44px; font-size: 26px; font-weight: 600; letter-spacing: var(--track-head); line-height: 1.1; margin: 0 0 6px; }
.mgrid { display: grid; grid-template-columns: 250px 1fr; gap: 22px; margin-top: 10px; }
.look-detail .mgrid { grid-template-columns: 1.1fr 1fr; margin-top: 0; }
.mood.big { border-radius: var(--r-inner); }
.mphoto { display: flex; flex-direction: column; gap: 10px; }
.mphoto img { width: 100%; border-radius: var(--r-inner); display: block; background: var(--canvas); }
.mphoto .btn { justify-content: center; }
.mphoto .small { font-size: 12px; margin: 0; }
.mfields { display: flex; flex-direction: column; gap: 12px; }
.mfields label { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--ink-2); font-weight: 500; letter-spacing: -0.017em; }
.mfields input, .mfields select { font-size: 15px; color: var(--ink); padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--surface); outline: 0; }
.mfields input:focus, .mfields select:focus { box-shadow: var(--sh-sm); border-color: #d8d8d8; }
.mfields .two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mfields fieldset { border: 0; background: var(--canvas); border-radius: 20px; padding: 10px 14px 12px; display: flex; gap: 14px; flex-wrap: wrap; font-size: 14px; margin: 0; }
.mfields legend { font-size: 12px; color: var(--ink-2); padding: 0; float: left; width: 100%; margin-bottom: 4px; font-weight: 500; }
.mfields .chk { flex-direction: row; align-items: center; gap: 6px; color: var(--ink); font-size: 14px; font-weight: 400; }
.mactions { display: flex; gap: 8px; margin-top: 22px; align-items: center; flex-wrap: wrap; }
.photo-drop { display: grid; place-items: center; text-align: center; background: var(--canvas); border-radius: var(--r-inner); min-height: 200px; cursor: pointer; padding: 12px; font-size: 14px; }
.photo-drop img { max-width: 100%; max-height: 280px; border-radius: 16px; }
.toast {
  position: fixed; left: 50%; bottom: 104px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 11px 18px;
  border-radius: var(--r-pill); font-size: 14px; z-index: 40; box-shadow: var(--sh-lg); max-width: min(540px, 92vw); text-align: center;
}

/* ---------------------------------------------------------------- splash: pick a profile */
.who { font-size: 14px; }
.splash {
  position: fixed; inset: 0; z-index: 50; background: var(--canvas); overflow-y: auto;
  display: grid; place-items: center; padding: 40px 20px calc(40px + env(safe-area-inset-bottom));
  transition: opacity .35s ease, transform .35s ease;
}
.splash.leaving { opacity: 0; transform: scale(1.02); pointer-events: none; }
.splash-inner { width: min(980px, 100%); text-align: center; }
.splash-mark { font-size: clamp(56px, 11vw, 104px); font-weight: 600; letter-spacing: -0.07em; line-height: .9; animation: rise .6s ease both; }
.splash-mark .dot { width: .2em; height: .2em; }
.splash-tag { margin: 10px 0 44px; color: var(--ink-2); font-size: 16px; animation: rise .6s .05s ease both; }
.splash h1 { font-size: 22px; font-weight: 600; letter-spacing: var(--track-head); margin: 0 0 22px; animation: rise .6s .1s ease both; }
.profiles { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px; }
.pcard {
  width: 200px; border: 0; background: var(--surface); border-radius: var(--r-card); padding: 8px 8px 16px;
  box-shadow: var(--sh-card); text-align: center; transition: transform .2s ease, box-shadow .2s ease;
  animation: rise .55s ease both;
}
.pcard:nth-child(1) { animation-delay: .14s; } .pcard:nth-child(2) { animation-delay: .2s; }
.pcard:nth-child(3) { animation-delay: .26s; } .pcard:nth-child(4) { animation-delay: .32s; }
.pcard:nth-child(n+5) { animation-delay: .38s; }
.pcard:hover, .pcard:focus-visible { transform: translateY(-4px); box-shadow: var(--sh-lg); outline: 0; }
.pcard.last { box-shadow: var(--sh-card), 0 0 0 2px var(--ink); }
.pcard.picked { transform: scale(.97); }
.pcover { aspect-ratio: 4 / 5; border-radius: var(--r-inner); overflow: hidden; background: var(--canvas); display: grid; }
.pcover > img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.pmosaic { display: grid; gap: 3px; width: 100%; height: 100%; }
.pmosaic.n2, .pmosaic.n4 { grid-template-columns: 1fr 1fr; }
.pmosaic.n3 { grid-template-columns: 1fr 1fr; } .pmosaic.n3 img:first-child { grid-row: span 2; }
.pmosaic img { width: 100%; height: 100%; object-fit: cover; min-height: 0; }
.pinitial { display: grid; place-items: center; font-size: 64px; font-weight: 600; letter-spacing: -0.05em; color: var(--ink); }
.pinitial.plus { font-weight: 400; color: var(--ink-2); }
.pcard.add .pcover { background: transparent; box-shadow: inset 0 0 0 1.5px var(--line); }
.pname { margin-top: 12px; font-size: 17px; font-weight: 600; letter-spacing: -0.04em; }
.pstats { margin-top: 2px; font-size: 12px; color: var(--ink-2); letter-spacing: -0.017em; }
.splash-new { max-width: 440px; margin: 0 auto; text-align: left; background: var(--surface); border-radius: 32px; padding: 30px; box-shadow: var(--sh-card); animation: rise .45s ease both; }
.splash-new h1 { text-align: left; margin-bottom: 6px; }
.splash-new p { margin: 0 0 22px; }
.splash-new label { display: block; font-size: 13px; color: var(--ink-2); margin-bottom: 8px; }
.splash-new .row { display: flex; gap: 6px; background: var(--surface); border: 1px solid rgba(5,41,77,.1); border-radius: var(--r-pill); padding: 5px; box-shadow: var(--sh-sm); }
.splash-new input { flex: 1; min-width: 0; padding: 10px 14px; border: 0; outline: 0; background: transparent; font-size: 16px; }
.splash-new button[type=submit] { width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--violet); color: #fff; box-shadow: var(--sh-violet); display: grid; place-items: center; }
.splash-new .back { margin-top: 18px; }
.splash-foot { margin: 48px 0 0; font-size: 12px; color: var(--ink-2); }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .splash *, .splash { animation: none !important; transition: none !important; } }
@media (max-width: 520px) {
  .profiles { gap: 12px; }
  .pcard { width: calc(50% - 6px); max-width: 190px; }
  .splash-tag { margin-bottom: 32px; }
}

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1100px) {
  .layout { grid-template-columns: minmax(0, 1fr) 330px; }
}
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; padding: 0; }
  .panel { position: fixed; top: 64px; bottom: 12px; right: 12px; width: min(400px, calc(100% - 24px)); transform: translateX(calc(100% + 24px));
    transition: transform .25s ease; z-index: 10; box-shadow: var(--sh-lg); }
  .panel.open { transform: none; }
  .panel-toggle { display: inline-block; }
  .look-detail .mgrid, .mgrid { grid-template-columns: 1fr; }
  .wear { grid-template-columns: 1fr; }
  .wear-body { padding: 4px 8px 8px; }
}
@media (max-width: 760px) {
  /* the rail becomes a bottom tab bar */
  body { grid-template-columns: minmax(0, 1fr); grid-template-rows: 56px minmax(0, 1fr) auto; }
  .rail { grid-row: 3; grid-column: 1; flex-direction: row; justify-content: space-around; padding: 6px 8px max(6px, env(safe-area-inset-bottom));
    box-shadow: 0 -1px 0 var(--line); }
  .rail-mark { display: none; }
  .rail button { width: auto; flex: 1; max-width: 120px; padding: 7px 0 6px; }
  .rail .cnt:not(:empty) { right: calc(50% - 24px); }
  .top, .layout { grid-column: 1; }
  .top { padding: 0 14px; }
  #newChatBtn { display: none; }
  #whoName { max-width: 90px; overflow: hidden; text-overflow: ellipsis; }
  .panel { top: 60px; bottom: 76px; }
  .toast, .jump { bottom: 96px; }
  .wgrid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
  .lgrid { grid-template-columns: 1fr; }
  .whead h2 { font-size: 28px; }
  .messages { padding-top: 8px; }
}
/* small tiles in the Lookbook grid: the piece name is always visible (phones can't hover), kept compact */
.lgrid .tile:not(.hero) .tlabel { font-size: 10.5px; padding: 3px 7px; left: 4px; bottom: 4px; max-width: calc(100% - 8px); }

/* ---------------------------------------------------------------- tidy up */
.tidy-banner { display: flex; align-items: center; gap: 16px; background: var(--surface); border-radius: var(--r-card);
  box-shadow: var(--sh-card); padding: 14px 18px; margin: 0 0 18px; }
.tidy-text { flex: 1; display: flex; flex-direction: column; gap: 2px; font-size: 14px; min-width: 0; }
.tidy-text strong { font-size: 15px; letter-spacing: -0.01em; }
.tidy-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.tidy-score { position: relative; width: 48px; height: 48px; flex: none; }
.tidy-score svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.tidy-score circle { fill: none; stroke: var(--canvas); stroke-width: 3.5; }
.tidy-score circle.val { stroke: var(--violet); stroke-linecap: round; transition: stroke-dasharray .4s ease; }
.tidy-score span { position: absolute; inset: 0; display: grid; place-items: center; font-size: 12px; font-weight: 600; }
.tidy-score.big { width: 88px; height: 88px; margin: 8px auto 4px; }
.tidy-score.big span { font-size: 20px; }
.tidy-card.done { text-align: center; max-width: 420px; }
.tidy-top { display: flex; align-items: center; gap: 12px; margin: 0 40px 14px 0; font-size: 13px; }
.tidy-top .progress { flex: 1; margin: 0; }
.field { display: flex; flex-direction: column; gap: 6px; margin: 10px 0 0; }
.flabel { font-size: 13px; color: var(--ink-2); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips button { border: 1px solid var(--line); background: var(--surface); border-radius: var(--r-pill); padding: 5px 11px; font-size: 13px; }
.chips button.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.small-input { font-size: 13px !important; padding: 6px 10px !important; max-width: 220px; }
.guess { font-size: 11px; color: var(--violet); background: rgba(84,51,235,.08); padding: 1px 7px; border-radius: var(--r-pill); margin-left: 4px; font-weight: 500; }
.twin-note { background: rgba(84,51,235,.06); border-radius: 14px; padding: 10px 12px; font-size: 13.5px; margin-bottom: 10px; }
@media (max-width: 760px) { .tidy-banner { flex-wrap: wrap; } .tidy-actions { width: 100%; justify-content: stretch; } .tidy-actions .btn { flex: 1; } }

/* ---------------------------------------------------------------- outfit of the day */
.msg.daily .bubble { box-shadow: var(--sh-card), inset 0 0 0 1.5px rgba(84,51,235,.18); }
.daily-head { font-size: 12px; font-weight: 600; color: var(--violet); letter-spacing: .02em; margin-bottom: 6px; }
.daily-card { background: var(--canvas); border-radius: var(--r-inner); padding: 14px 16px; margin: 10px 0 18px; display: flex; flex-direction: column; gap: 10px; }
.daily-card p { margin: 0; font-size: 13px; }
.daily-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 14px; }
.daily-row input[type=time] { border: 1px solid var(--line); border-radius: var(--r-pill); padding: 5px 10px; font: inherit; background: var(--surface); }
.days { display: flex; gap: 4px; }
.days button { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); font-size: 12px; padding: 0; }
.days button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.switch { position: relative; width: 42px; height: 24px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: #d6d6d6; border-radius: 99px; transition: background .2s; cursor: pointer; }
.switch span::after { content: ""; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: var(--sh-sm); transition: transform .2s; }
.switch input:checked + span { background: var(--violet); }
.switch input:checked + span::after { transform: translateX(18px); }
.switch input:disabled + span { opacity: .5; cursor: not-allowed; }

/* ---------------------------------------------------------------- language */
.lang-pick { display: inline-flex; background: var(--canvas); border-radius: var(--r-pill); padding: 3px; gap: 2px; margin: 4px 0 14px; }
.lang-pick button { border: 0; background: transparent; border-radius: var(--r-pill); padding: 6px 14px; font-size: 14px; color: var(--ink-2); }
.lang-pick button.on { background: var(--surface); color: var(--ink); box-shadow: var(--sh-sm); font-weight: 500; }
.lang-pick.small { margin: 0; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.lang-pick.small button { padding: 4px 11px; font-size: 13px; }
.lang-pick.small button.on { background: var(--ink); color: #fff; }
.lang-row { margin: 10px 0 0; }

/* live reply while it is being written */
.msg .bubble .draft:empty { display: none; }
.msg.drafting .bubble .draft { margin-bottom: 6px; }
.msg.drafting .status { opacity: .7; font-size: 12px; }

/* ---------------------------------------------------------------- product check ("is this a good buy?") */
.buys { display: flex; flex-direction: column; gap: 10px; margin: 4px 0 14px; }
.buy { background: var(--surface); border-radius: var(--r-card); box-shadow: var(--sh-card); padding: 8px; max-width: 560px; }
.buy.passed { opacity: .55; }
.buy-top { display: flex; gap: 14px; padding: 6px; }
.buy-top > img, .buy-noimg { width: 112px; height: 140px; object-fit: cover; border-radius: var(--r-inner); background: var(--canvas); flex: none; }
.buy-noimg { display: grid; place-items: center; }
.buy-noimg .swatch { width: 36px; height: 36px; }
.buy-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; padding-top: 2px; }
.buy .shop { font-size: 12.5px; color: var(--ink-2); }
.buy .pname { font-size: 17px; font-weight: 600; letter-spacing: -.02em; line-height: 1.2; }
.buy .pname a { color: inherit; text-decoration: none; }
.buy .pname a:hover { text-decoration: underline; }
.buy .price { font-size: 15px; }
.verdict { display: inline-flex; align-items: center; gap: 4px; align-self: flex-start; padding: 4px 12px; border-radius: var(--r-pill); font-size: 13px; font-weight: 600; }
.v-yes { background: #e7f6ec; color: #17773a; } .v-maybe { background: #fff4dc; color: #8a5a00; } .v-no { background: #fdeaea; color: #a12a2a; }
.unlocks { font-size: 14px; } .unlocks b { font-size: 22px; letter-spacing: -.03em; margin-right: 2px; }
.buy .reasons { list-style: none; margin: 4px 10px; padding: 0; font-size: 14px; display: flex; flex-direction: column; gap: 5px; }
.buy .reasons li { display: flex; gap: 8px; } .buy .reasons .ok { color: #17773a; } .buy .reasons .warn { color: #8a5a00; font-weight: 600; }
.buy .with { margin: 8px 10px 2px; font-size: 12.5px; color: var(--ink-2); }
.buy .with-row { display: flex; gap: 6px; margin: 6px 10px 8px; flex-wrap: wrap; }
.buy .with-row img, .with-tile { width: 60px; height: 60px; border-radius: 14px; object-fit: cover; background: var(--canvas); }
.with-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 4px; overflow: hidden; }
.with-tile small { font-size: 9.5px; line-height: 1.1; text-align: center; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.buy .acts { display: flex; gap: 8px; flex-wrap: wrap; padding: 8px 6px 4px; border-top: 1px solid var(--line); margin-top: 4px; }
.buy .acts button { border: 1px solid var(--line); background: var(--surface); border-radius: var(--r-pill); padding: 7px 14px; font-size: 14px; }
.buy .acts button.primary { background: var(--ink); color: #fff; border-color: var(--ink); }
.buy .acts button.on { background: var(--canvas); font-weight: 500; }
.buy-done { color: #17773a; font-weight: 600; font-size: 14px; padding: 7px 6px; }
.shelf-wrap { background: var(--surface); border-radius: var(--r-card); box-shadow: var(--sh-card); padding: 14px 16px; margin: 0 0 18px; }
.shelf-head { display: flex; gap: 10px; align-items: baseline; margin-bottom: 10px; font-size: 14px; }
.shelf { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; }
.shelf-it { flex: none; width: 118px; border: 0; background: none; padding: 0; text-align: left; display: flex; flex-direction: column; gap: 4px; cursor: pointer; }
.shelf-it img, .shelf-it .buy-noimg { width: 118px; height: 118px; border-radius: 16px; object-fit: cover; }
.shelf-it .sname { font-size: 12.5px; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.shelf-it .pill { align-self: flex-start; padding: 2px 8px; border-radius: var(--r-pill); font-size: 11px; font-weight: 600; }
.product-modal { max-width: 600px; background: var(--canvas); }
.product-modal .buy { max-width: none; box-shadow: none; }
@media (max-width: 760px) { .buy { max-width: none; } .buy-top > img, .buy-noimg { width: 96px; height: 120px; } }

/* ---------------------------------------------------------------- About you */
.you-check { background: var(--surface); border-radius: var(--r-card); box-shadow: var(--sh-card), inset 0 0 0 1.5px rgba(84,51,235,.18); padding: 18px 20px; margin: 0 0 18px; }
.you-check h3, .you-card h3 { margin: 0 0 4px; font-size: 17px; font-weight: 600; letter-spacing: -0.02em; display: flex; align-items: center; gap: 8px; }
.you-check > .muted { margin: 0 0 12px; font-size: 13.5px; }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.check { background: var(--canvas); border-radius: var(--r-inner); padding: 14px; display: flex; flex-direction: column; gap: 12px; transition: opacity .3s, transform .3s; }
.check p { margin: 0; font-size: 14.5px; line-height: 1.4; }
.check.answered { opacity: 0; transform: scale(.97); }
.check-acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; }
.check-acts .btn { padding: 7px 14px; font-size: 13.5px; }
.pill-count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 99px; background: var(--violet); color: #fff; font-size: 12px; font-weight: 600; }
.you-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; margin-bottom: 14px; }
.you-card { background: var(--surface); border-radius: var(--r-card); box-shadow: var(--sh-card); padding: 16px 18px; }
.you-card.wide { margin-bottom: 14px; }
.you-card .sub { font-size: 12.5px; color: var(--ink-2); margin: 12px 0 6px; }
.you-card .sub:first-of-type { margin-top: 8px; }
.you-card .tags { margin-top: 6px; }
.tag.rm { padding-right: 4px; }
.tag.rm button { border: 0; background: none; color: var(--ink-2); font-size: 14px; padding: 0 5px; margin-left: 2px; border-radius: 99px; line-height: 1; opacity: .55; }
.tag.rm:hover button { opacity: 1; }
.tag.rm.armed { box-shadow: inset 0 0 0 1.5px #d64545; }
.tag.rm.armed button { color: #d64545; opacity: 1; font-size: 12px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin: 10px 0 4px; }
.stat { background: var(--canvas); border-radius: var(--r-inner); padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.stat b { font-size: 26px; letter-spacing: -0.04em; font-weight: 600; }
.stat span { font-size: 12.5px; color: var(--ink-2); line-height: 1.25; }
.you-card .with-row { display: flex; gap: 6px; flex-wrap: wrap; }
.you-card .with-row img, .you-card .with-tile { width: 64px; height: 64px; border-radius: 14px; object-fit: cover; background: var(--canvas); }
.timeline { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.timeline li { display: flex; gap: 12px; }
.timeline .when { flex: none; width: 56px; color: var(--ink-2); font-size: 12.5px; padding-top: 1px; }
.settings .daily-card { background: var(--canvas); }
.danger-zone { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.you-skel { height: 320px; border-radius: var(--r-card); background: linear-gradient(90deg, var(--surface) 25%, #f7f7f8 50%, var(--surface) 75%); background-size: 200% 100%; animation: skel 1.4s infinite; }
@keyframes skel { to { background-position: -200% 0; } }
.you-cta { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; border: 0; cursor: pointer; background: var(--canvas); border-radius: var(--r-inner); padding: 12px 14px; margin: 12px 0 4px; flex-wrap: wrap; }
.you-cta strong { flex: 1 1 100%; font-size: 14.5px; }
.you-cta .muted { flex: 1; font-size: 13px; }
.you-cta .arrow { color: var(--ink-2); }
.you-cta:hover { background: #ebedef; }

/* ---------------------------------------------------------------- Guide */
.guide-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.guide-card { background: var(--surface); border-radius: var(--r-card); box-shadow: var(--sh-card); padding: 18px 18px 14px; display: flex; flex-direction: column; gap: 8px; }
.gicon { width: 36px; height: 36px; border-radius: 12px; background: rgba(84,51,235,.08); color: var(--violet); display: grid; place-items: center; font-size: 17px; }
.guide-card h3 { margin: 4px 0 0; font-size: 17px; font-weight: 600; letter-spacing: -0.02em; }
.guide-card p { margin: 0; font-size: 14px; color: var(--ink-2); line-height: 1.45; }
.tries { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.try { text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: 16px; padding: 9px 12px; font-size: 14px; color: var(--ink); cursor: pointer; transition: background .15s, border-color .15s; }
.try:hover { background: rgba(84,51,235,.05); border-color: rgba(84,51,235,.35); }
.guide-card .linkish { align-self: flex-start; margin-top: 2px; }
.guide-tips { background: var(--surface); border-radius: var(--r-card); box-shadow: var(--sh-card); padding: 16px 20px; margin: 14px 0 20px; }
.guide-tips h3 { margin: 0 0 8px; font-size: 16px; }
.guide-tips ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
@media (max-width: 760px) { .rail.views button .lbl { font-size: 10.5px; } }

/* ---------------------------------------------------------------- rate a reply */
.msg .rate { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; margin: 4px 0 0 6px; width: 100%; max-width: 640px; }
.msg.stylist { flex-wrap: wrap; }
.rate > button { border: 0; background: none; font-size: 14px; padding: 3px 6px; border-radius: 99px; opacity: .35; filter: grayscale(1); cursor: pointer; transition: opacity .15s; }
.msg:hover .rate > button, .rate > button.on { opacity: 1; }
.rate > button.on { filter: none; background: var(--surface); box-shadow: var(--sh-sm); }
@media (hover: none) { .rate > button { opacity: .6; } }
.rate-panel { flex-basis: 100%; background: var(--surface); border-radius: var(--r-inner); box-shadow: var(--sh-card); padding: 12px 14px; margin-top: 6px; display: flex; flex-direction: column; gap: 10px; }
.rate-panel .rp-title { margin: 0; font-size: 14px; font-weight: 500; }
.rate-panel textarea { font: inherit; font-size: 14px; border: 1px solid var(--line); border-radius: 14px; padding: 8px 12px; resize: vertical; background: var(--canvas); }
.rate-panel .chips button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.rp-acts { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.rp-thanks { flex-basis: 100%; margin: 4px 0 0; font-size: 13px; color: var(--ink-2); }

/* ---------- style quiz (onboarding) ---------- */
.quiz { position: fixed; inset: 0; z-index: 60; background: rgba(242,244,245,.96); backdrop-filter: blur(6px); display: grid; place-items: center; padding: 16px; }
.quiz[hidden] { display: none; }
.qcard { width: min(620px, 100%); max-height: min(860px, calc(100dvh - 32px)); display: flex; flex-direction: column; background: var(--surface); border-radius: var(--r-card); box-shadow: var(--sh-lg); overflow: hidden; }
.qtop { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; padding: 16px 22px 0; }
.qtop .linkish { margin: 0; font-size: 13px; }
.qtop .linkish:last-child { justify-self: end; }
.qdots { display: flex; gap: 5px; }
.qdots span { width: 7px; height: 7px; border-radius: 50%; background: var(--line); transition: background .2s; }
.qdots span.on { background: var(--ink); }
.qbody { flex: 1; overflow-y: auto; padding: 14px 22px 8px; }
.qbody h2 { margin: 6px 0 4px; font-size: 26px; letter-spacing: var(--track-head); line-height: 1.1; }
.qbody > p.muted { margin: 0 0 6px; }
.qlabel { font-size: 14px; font-weight: 600; letter-spacing: -0.014em; margin: 18px 0 8px; }
.qbody .chips button { font-size: 14px; padding: 7px 13px; }
.qbody .days button { width: 36px; height: 36px; font-size: 13px; }
.qinput { width: 100%; border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; font: inherit; font-size: 15px; background: var(--surface); }
.qinput.short { width: 120px; }
.qtoggle { display: flex; gap: 10px; align-items: center; margin: 14px 0 0; font-size: 14px; padding: 10px 14px; background: var(--canvas); border-radius: 14px; cursor: pointer; }
.qtoggle input { width: 18px; height: 18px; accent-color: var(--ink); }
.qcolours { display: flex; flex-wrap: wrap; gap: 6px; }
.qcolours button { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--surface); border-radius: var(--r-pill); padding: 5px 11px 5px 6px; font-size: 13px; }
.qcolours button span { width: 18px; height: 18px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }
.qcolours button.on { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); font-weight: 600; }
.qhint { margin: -4px 0 8px; font-size: 13px; }
.qshapes { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; }
.qshapes button { display: flex; flex-direction: column; align-items: center; gap: 4px; border: 1px solid var(--line); background: var(--surface); border-radius: var(--r-inner); padding: 10px 6px 8px; font-size: 12.5px; }
.qshapes svg { width: 34px; height: 56px; fill: var(--stone); }
.qshapes button.on { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.qshapes button.on svg { fill: var(--ink); }
.qshapes button.unsure { justify-content: center; color: var(--ink-2); }
.qphotos { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 16px 0 12px; }
.qphoto { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; border: 1px dashed var(--stone); border-radius: var(--r-inner); padding: 18px 10px 14px; cursor: pointer; }
.qphoto:hover { background: var(--canvas); }
.qphoto.on { border: 2px solid var(--ink); }
.qphoto img { width: 100%; max-height: 180px; object-fit: cover; border-radius: 14px; margin-bottom: 6px; }
.qpicon { font-size: 34px; line-height: 1; color: var(--ink-2); margin-bottom: 6px; }
.qphoto .small { font-size: 12.5px; }
.qacts { display: flex; justify-content: space-between; gap: 10px; padding: 12px 22px 18px; border-top: 1px solid var(--line); }
.qacts:empty { display: none; }
.qintro { padding: 8px 0; }
.splash-mark.small { font-size: 34px; margin-bottom: 18px; }
.qpoints { list-style: none; padding: 0; margin: 16px 0 6px; display: flex; flex-direction: column; gap: 8px; }
.qpoints li { padding: 10px 14px; background: var(--canvas); border-radius: 14px; font-size: 14.5px; }
.qpoints li::before { content: "✓"; margin-right: 10px; font-weight: 700; }
.qworking { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 60px 10px; }
@media (max-width: 640px) {
  .quiz { padding: 0; }
  .qcard { max-height: 100dvh; height: 100dvh; border-radius: 0; }
  .qbody h2 { font-size: 23px; }
}

/* setup checklist + colour analysis (About you) */
.you-card.setup .progress { height: 6px; border-radius: 99px; background: var(--canvas); overflow: hidden; margin: 8px 0 6px; }
.you-card.setup .progress div { height: 100%; background: var(--ink); border-radius: 99px; }
.setup-list { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; }
.setup-list li { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.setup-list li:last-child { border-bottom: 0; }
.setup-list .stext { flex: 1; }
.setup-list li.done .stext { color: var(--ink-2); text-decoration: line-through; }
.setup-list .btn { padding: 6px 14px; font-size: 13px; cursor: pointer; }
.tick { width: 22px; height: 22px; flex: none; border-radius: 50%; border: 1.5px solid var(--stone); display: grid; place-items: center; font-size: 12px; font-weight: 700; }
li.done .tick { background: var(--good); border-color: var(--good); color: #fff; }
.colours-card .cc-head { display: flex; gap: 14px; align-items: flex-start; }
.colours-card .cc-head img { width: 76px; height: 96px; object-fit: cover; border-radius: 16px; flex: none; }
.colours-card .cc-head p { margin: 4px 0 0; }
.colours-card .cc-acts { display: flex; gap: 16px; margin-top: 14px; }
.colours-card .cc-acts .linkish { margin: 0; cursor: pointer; font-size: 12.5px; }
.colours-card label.busy { opacity: .6; pointer-events: none; }
.muted.small { font-size: 12.5px; }
.qpicon svg { width: 44px; height: 58px; fill: var(--stone); display: block; }
.toast { z-index: 70; }

/* tooltips (tips.js) */
.tipbubble { position: fixed; z-index: 90; max-width: min(280px, calc(100vw - 16px)); background: var(--ink); color: #fff; font-size: 13px; line-height: 1.4; letter-spacing: -0.01em; padding: 8px 12px; border-radius: 12px; box-shadow: var(--sh-lg); pointer-events: none; animation: tipin .12s ease both; }
.tipbubble::after { content: ""; position: absolute; left: var(--arrow, 50%); bottom: -5px; width: 10px; height: 10px; background: var(--ink); transform: translateX(-50%) rotate(45deg); border-radius: 2px; }
.tipbubble.below::after { bottom: auto; top: -5px; }
@keyframes tipin { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }
[data-tip] { -webkit-touch-callout: none; }
.qwear { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.qwear button { border: 1px solid var(--line); background: var(--surface); border-radius: 14px; padding: 12px 8px; font-size: 14.5px; font-weight: 500; }
.qwear button.on { background: var(--ink); color: #fff; border-color: var(--ink); }

/* sign-in */
.splash-new.auth { max-width: 420px; }
.splash-new.auth h1 { font-size: 26px; margin-bottom: 6px; }
.splash-new.auth form { display: flex; flex-direction: column; gap: 12px; margin-top: 4px; }
.splash-new.auth label { display: flex; flex-direction: column; gap: 6px; margin: 0; font-size: 13px; color: var(--ink-2); }
.splash-new.auth input { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; font-size: 16px; background: var(--surface); color: var(--ink); flex: none; }
.splash-new.auth input:focus { outline: 2px solid var(--ink); outline-offset: -1px; }
.splash-new.auth .btn.wide { width: 100%; justify-content: center; padding: 13px; font-size: 15px; margin-top: 4px; }
.splash-new.auth p { margin: 0 0 14px; }
.splash-new.auth form p { margin: 0; }
.auth-err { color: #a12a2a; background: #fdeaea; border-radius: 12px; padding: 9px 12px; font-size: 14px; }
.auth-alt { margin-top: 18px !important; font-size: 14px; }
.auth-alt .linkish, .auth-row .linkish { font-size: 14px; margin: 0; }
.auth-row { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
/* account menu */
.account-menu { position: fixed; z-index: 55; min-width: 230px; background: var(--surface); border-radius: 20px; box-shadow: var(--sh-lg); padding: 8px; display: flex; flex-direction: column; }
.account-menu[hidden] { display: none; }
.account-menu .am-head { display: flex; flex-direction: column; padding: 8px 12px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.account-menu .am-view { margin-top: 6px; font-size: 12.5px; color: var(--violet); }
.account-menu button, .account-menu a { text-align: left; border: 0; background: none; padding: 10px 12px; border-radius: 12px; font-size: 14.5px; color: var(--ink); text-decoration: none; }
.account-menu button:hover, .account-menu a:hover { background: var(--canvas); }
#whoBtn.has-badge { position: relative; }
#whoBtn.has-badge::after { content: attr(data-badge); position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; border-radius: 99px; background: var(--violet); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; padding: 0 4px; }
.account-card { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.pw-form { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0; }
.pw-form input { flex: 1; min-width: 180px; border: 1px solid var(--line); border-radius: 12px; padding: 9px 12px; font-size: 15px; }
.splash-new.auth .btn.wide, .splash-new.auth button[type=submit] { width: 100%; height: auto; border-radius: var(--r-pill); box-shadow: none; background: var(--ink); display: flex; }
.home-link { border: 0; background: none; padding: 0; color: inherit; font: inherit; cursor: pointer; }
.rail-mark.home-link { font-weight: 600; font-size: 26px; letter-spacing: -0.06em; line-height: 1; border-radius: 12px; padding: 4px 6px; margin: 0 0 14px; }
.home-link:hover { opacity: .75; }
.brand.home-link { font-size: inherit; }
#splashPick .back { margin-top: 22px; }
.rail button.rail-mark { flex-direction: row; align-items: baseline; gap: 0; width: auto; padding: 4px 8px; color: var(--ink); }
@media (max-width: 760px) { .rail button.rail-mark { display: none; } }
/* vertical padding as a transparent border: the 2-line clamp then never shows a sliver of line 3 */
.tlabel { padding-top: 0; padding-bottom: 0; border-top: 4px solid transparent; border-bottom: 4px solid transparent; }
.lgrid .tile:not(.hero) .tlabel { padding-top: 0; padding-bottom: 0; border-top-width: 3px; border-bottom-width: 3px; }

/* several pieces in one photo: pick which to add */
.modal-card.picker { width: min(620px, 100%); }
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-top: 16px; }
.pick { display: flex; flex-direction: column; gap: 3px; text-align: left; border: 0; background: none; padding: 0; cursor: pointer; }
.pick-img { position: relative; display: block; aspect-ratio: 1; border-radius: var(--r-inner); overflow: hidden; background: var(--canvas); box-shadow: inset 0 0 0 1px var(--line); }
.pick-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: opacity .15s; }
.pick:not(.on) .pick-img img { opacity: .75; }
.pick.on .pick-img { box-shadow: 0 0 0 3px var(--ink); }
.pick-check { position: absolute; top: 8px; right: 8px; width: 26px; height: 26px; border-radius: 50%; background: rgba(255,255,255,.9); border: 1.5px solid var(--stone); display: grid; place-items: center; font-size: 13px; font-weight: 700; color: transparent; }
.pick.on .pick-check { background: var(--ink); border-color: var(--ink); color: #fff; }
.pick strong { font-size: 14px; font-weight: 600; margin-top: 6px; }
.btn[disabled] { opacity: .45; cursor: default; }
