:root {
  --ink: #111; --paper: #fff; --muted: #6b6b6b; --line: #e7e5e1; --soft: #f5f3ef; --wall: #ece6dc;
  --pick: #f7d9e3; --gold: #c6a15b; --danger: #b3261e; --radius: 10px;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
  --serif: "Didot", "Bodoni 72", "Bodoni Moda", "Playfair Display", Georgia, serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font: 14px/1.45 var(--sans); color: var(--ink); background: var(--paper); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
svg { display: block; }
img { max-width: 100%; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.fine { font-size: 11.5px; color: var(--muted); margin: 8px 0; }
.center { text-align: center; }
.center-block { display: block; margin: 12px auto 0; text-align: center; }
.pad { padding: 20px; }
.pad-x { padding: 0 16px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 12px 0; }
.row.center { justify-content: center; }
.eyebrow { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; margin: 0 0 10px; }
.danger { color: var(--danger) !important; }
:focus-visible { outline: 2px solid #3b6fd8; outline-offset: 2px; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border: 1px solid var(--ink); border-radius: 999px; background: var(--paper); text-decoration: none; font-size: 13px; letter-spacing: .02em; }
.btn svg { width: 18px; height: 18px; }
.btn.primary { background: var(--ink); color: var(--paper); }
.btn.block { display: flex; width: 100%; margin: 10px 0; }
.btn.small { min-height: 34px; padding: 0 14px; font-size: 12px; }
.btn.round { width: 48px; padding: 0; }
.btn.danger { border-color: var(--danger); }
.link { background: none; border: 0; padding: 0; text-decoration: underline; text-underline-offset: 3px; font-size: 13px; }
.plain { display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; padding: 6px; text-decoration: none; font-size: 12px; }
.icon-btn { width: 40px; height: 40px; display: grid; place-items: center; background: none; border: 0; color: inherit; border-radius: 8px; }
.icon-btn.ghost { visibility: hidden; }
.round-btn { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.95); border: 1px solid var(--line); box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 2px; background: var(--paper); }
.seg button { border: 0; background: none; padding: 5px 10px; border-radius: 999px; font-size: 12px; }
.seg button.on { background: var(--ink); color: var(--paper); }

/* storefront */
.site-head { position: sticky; top: 0; z-index: 20; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; height: 60px; padding: 0 16px; background: rgba(255,255,255,.96); border-bottom: 1px solid var(--line); backdrop-filter: blur(6px); }
.sh-left { display: flex; gap: 4px; }
.sh-right { display: flex; gap: 2px; justify-content: flex-end; align-items: center; }
.logo { font-family: var(--serif); font-size: 20px; letter-spacing: .22em; text-decoration: none; white-space: nowrap; }
.bag { position: relative; }
.bag-n { position: absolute; top: 2px; right: 0; font-size: 10px; font-weight: 600; }
.home-hero { text-align: center; padding: 48px 16px 24px; }
.home-hero h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(28px, 5vw, 44px); margin: 0 0 8px; letter-spacing: .04em; }
.home-hero p svg { display: inline; width: 16px; height: 16px; vertical-align: -3px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 2px; padding: 0 16px 48px; }
.card { text-decoration: none; padding-bottom: 16px; }
.card-art { position: relative; aspect-ratio: 4/5; background: var(--soft); display: grid; place-items: center; padding: 14%; }
.card-art svg { width: 100%; height: 100%; }
.card-try { position: absolute; left: 10px; bottom: 10px; width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; }
.card-try svg { width: 17px; height: 17px; }
.card-name { margin: 10px 4px 2px; font-size: 13px; }
.card-price { margin: 0 4px; font-size: 12px; color: var(--muted); }
.site-foot { text-align: center; color: var(--muted); font-size: 12px; padding: 24px 16px 96px; border-top: 1px solid var(--line); }
.pdp { display: grid; grid-template-columns: 1fr; min-height: calc(100vh - 60px); }
@media (min-width: 900px) { .pdp { grid-template-columns: 1.15fr 1fr; } }
.pdp-media { position: relative; background: var(--soft); display: grid; place-items: center; padding: 8% 12%; min-height: 60vh; }
.pdp-art { width: 100%; max-height: 72vh; }
.hanger { position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); width: 52px; height: 52px; border-radius: 50%; background: var(--ink); color: #fff; border: 2px solid #fff; display: grid; place-items: center; box-shadow: 0 4px 16px rgba(0,0,0,.25); }
.hanger svg { width: 26px; height: 26px; }
.hanger::after { content: "Try it on"; position: absolute; bottom: 60px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; font-size: 11px; padding: 4px 8px; border-radius: 4px; white-space: nowrap; opacity: 0; transition: opacity .2s; pointer-events: none; }
.hanger:hover::after, .hanger:focus-visible::after { opacity: 1; }
.pdp-info { padding: 32px clamp(16px, 5vw, 72px) 96px; max-width: 520px; }
.pdp-code { font-size: 11px; color: var(--muted); letter-spacing: .08em; }
.pdp-title { display: flex; justify-content: space-between; align-items: flex-start; }
.pdp-title h1 { font-weight: 400; font-size: 20px; margin: 6px 0 4px; }
.pdp-price { margin-bottom: 20px; }
.size { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line); padding: 10px 0; }
.size select { border: 0; background: none; }
.under { display: inline-block; font-size: 12px; margin: 10px 0 14px; text-underline-offset: 3px; }
.try-btn svg { width: 18px; }
.pdp-blurb { color: #444; font-size: 13px; margin-top: 18px; }
.pdp-more { list-style: none; padding: 0; margin: 16px 0; }
.pdp-more li { display: flex; justify-content: space-between; padding: 14px 0; border-top: 1px solid var(--line); font-size: 13px; }
.chat-pill { position: fixed; right: 20px; bottom: 20px; z-index: 15; display: flex; gap: 8px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 10px 16px; box-shadow: 0 4px 16px rgba(0,0,0,.1); font-size: 12px; }
.chat-pill svg { width: 16px; height: 16px; }
body.vfr-open .chat-pill { display: none; }
@media (max-width: 640px) { .hide-sm { display: none; } .plain span { display: none; } .logo { font-size: 15px; letter-spacing: .14em; } }

/* toast + simulated SMS */
#toast { position: fixed; left: 50%; bottom: 24px; z-index: 100; transform: translate(-50%, 20px); opacity: 0; transition: .25s; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 8px; font-size: 13px; max-width: min(92vw, 420px); text-align: center; pointer-events: none; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
.sms { position: fixed; top: 10px; left: 50%; z-index: 120; transform: translate(-50%, -140%); transition: transform .35s ease; width: min(92vw, 380px); background: rgba(250,250,250,.97); border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; box-shadow: 0 10px 30px rgba(0,0,0,.18); font-size: 13px; cursor: pointer; }
.sms.show { transform: translate(-50%, 0); }
.sms-app { font-size: 10.5px; color: var(--muted); letter-spacing: .06em; margin-bottom: 2px; }

/* queue */
.queue-card { position: fixed; z-index: 60; left: 50%; bottom: 96px; transform: translateX(-50%); width: min(90vw, 300px); background: #fff; border-radius: var(--radius); padding: 16px; text-align: center; box-shadow: 0 10px 40px rgba(0,0,0,.2); }
@media (min-width: 900px) { .queue-card { left: 28%; } }
.queue-card p { margin: 0 0 6px; font-size: 13px; }
.queue-card b { display: block; font-size: 20px; }
.queue-card span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }

/* fitting room shell */
#vfr-root { position: relative; z-index: 50; }
body.in-app #vfr-root { display: none; }
.vfr-pill { position: fixed; right: 20px; bottom: 20px; z-index: 55; display: flex; align-items: center; gap: 8px; background: var(--ink); color: #fff; border: 0; border-radius: 999px; padding: 12px 18px; box-shadow: 0 6px 20px rgba(0,0,0,.25); }
.vfr-wrap { position: fixed; z-index: 50; inset: 0; display: flex; }
.vfr-panel, .side-pane { background: #fff; display: flex; flex-direction: column; overflow: hidden; }
.vfr-panel { flex: 1; }
.side-pane { position: absolute; inset: 0; z-index: 2; }
@media (min-width: 768px) {
  .vfr-wrap { inset: 76px 20px 20px auto; gap: 12px; }
  .vfr-panel { flex: 0 0 400px; width: 400px; border-radius: 12px; box-shadow: 0 12px 48px rgba(0,0,0,.25); }
  .side-pane { position: static; flex: 0 0 360px; width: 360px; border-radius: 12px; box-shadow: 0 12px 48px rgba(0,0,0,.2); }
}
.vfr-head { flex: none; display: grid; grid-template-columns: 40px 1fr auto; align-items: center; height: 50px; padding: 0 6px; background: var(--ink); color: #fff; }
.vfr-head h2 { margin: 0; font-size: 14px; font-weight: 500; text-align: center; letter-spacing: .02em; }
.head-right { display: flex; }
.head-right .icon-btn { width: 36px; }
.vfr-body { flex: 1; min-height: 0; overflow: auto; }
.vfr-body input:not([type=checkbox]):not([type=range]), .vfr-body select, .app input:not([type=checkbox]), .app select { height: 44px; border: 1px solid #cfccc6; border-radius: 8px; padding: 0 12px; background: #fff; }
.phone { display: flex; gap: 8px; margin: 12px 0 4px; }
.phone select { flex: 0 0 96px; }
.phone input { flex: 1; min-width: 0; }
.phone.single input { width: 100%; }
.or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 11px; margin: 6px 0; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.code { width: 100%; text-align: center; font-size: 26px !important; letter-spacing: .5em; height: 56px !important; margin: 14px 0 4px; }
.store-note { display: flex; gap: 6px; align-items: center; justify-content: center; font-size: 12px; background: var(--soft); border-radius: 8px; padding: 6px 10px; }
.store-note svg { width: 16px; }
.hero-pair { display: grid; grid-template-columns: 1fr 24px 1fr; align-items: center; gap: 6px; margin: 4px 0 16px; }
.hp-product { background: var(--soft); border-radius: 8px; aspect-ratio: 3/4; display: grid; place-items: center; padding: 14%; }
.hp-product svg { width: 100%; height: 100%; }
.hp-model { border-radius: 8px; overflow: hidden; aspect-ratio: 3/4; }
.hp-model svg { width: 100%; height: 100%; object-fit: cover; }
.hp-model svg { height: auto; transform: translateY(-4%); }
.hp-arrow { color: var(--muted); }
.facts { padding-left: 18px; margin: 10px 0 16px; }
.facts li { margin: 4px 0; }
.check { display: flex; gap: 10px; align-items: flex-start; margin: 10px 0; font-size: 13px; }
.check input { margin-top: 3px; width: 16px; height: 16px; flex: none; accent-color: var(--ink); }
.upload { padding: 18px 20px; display: flex; flex-direction: column; }
.silhouette { flex: 1; min-height: 220px; display: grid; place-items: center; background: linear-gradient(#f4f2ee, #e9e6e0); border-radius: 10px; margin: 6px 0 12px; }
.ghost-fig { height: 100%; max-height: 360px; opacity: .55; filter: grayscale(1) contrast(.9); }
.spinner { width: 40px; height: 40px; margin: 40px auto 16px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--ink); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner, .spin { animation-duration: 3s; } }

/* profile set */
.profile-top { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; overflow: hidden; background: var(--soft); display: grid; place-items: center; flex: none; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tile { position: relative; margin: 0; border-radius: 8px; overflow: hidden; background: var(--wall); }
.tile-art { aspect-ratio: 3/4; overflow: hidden; display: grid; place-items: center; }
.tile-art img { width: 100%; height: 100%; object-fit: cover; }
.tile-art > svg { width: 100%; height: 100%; }
.tile figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 8px 6px; font-size: 11px; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.55)); }
.tile figcaption em { font-style: normal; font-size: 9.5px; background: rgba(255,255,255,.25); padding: 1px 5px; border-radius: 4px; margin-left: 4px; }
.tile-btn { position: absolute; right: 6px; top: 6px; width: 32px; height: 32px; display: grid; place-items: center; background: rgba(255,255,255,.92); border-radius: 50%; cursor: pointer; }
.tile-btn svg { width: 16px; height: 16px; }
.adjust { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin: 12px 0; }
.adjust-head { display: flex; justify-content: space-between; align-items: center; }
.face-editor { position: relative; width: 200px; height: 200px; margin: 10px auto; overflow: hidden; border-radius: 8px; background: #ddd; touch-action: none; cursor: grab; }
.face-editor img { position: absolute; max-width: none; user-select: none; pointer-events: none; }
.face-ring { position: absolute; left: 52px; top: 40px; width: 96px; height: 120px; border-radius: 50%; box-shadow: 0 0 0 200px rgba(0,0,0,.45); border: 2px solid #fff; pointer-events: none; }
.adjust input[type=range] { width: 100%; accent-color: var(--ink); }
.swatches { display: flex; align-items: center; gap: 8px; margin: 10px 0; }
.swatches span { width: 70px; }
.sw { width: 26px; height: 26px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); padding: 0; }
.sw.on { box-shadow: 0 0 0 2px var(--ink); }

/* styling progress */
.styling { position: relative; display: grid; place-items: center; overflow: hidden; background: var(--wall); }
.styling-bg { position: absolute; inset: 0; display: grid; place-items: center; filter: blur(3px) saturate(.8); opacity: .8; }
.styling-bg svg { height: 100%; }
.styling-bg img { width: 100%; height: 100%; object-fit: cover; }
.welcome { position: absolute; top: 12px; left: 12px; display: flex; gap: 8px; align-items: center; font-size: 13px; background: rgba(255,255,255,.85); border-radius: 999px; padding: 4px 12px 4px 4px; z-index: 1; }
.welcome .avatar { width: 28px; height: 28px; }
.ring { position: relative; width: 120px; height: 120px; display: grid; place-items: center; z-index: 1; background: rgba(255,255,255,.55); border-radius: 50%; backdrop-filter: blur(4px); }
.ring svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.ring-track { fill: none; stroke: rgba(255,255,255,.7); stroke-width: 5; }
.ring-arc { fill: none; stroke: #3d8bfd; stroke-width: 5; stroke-linecap: round; stroke-dasharray: 289; transition: stroke-dashoffset 1s linear; }
.ring div { text-align: center; position: relative; }
.ring b { display: block; font-size: 30px; font-weight: 500; }
.ring span { font-size: 12px; }
.styling-note { position: absolute; bottom: 16px; left: 16px; right: 16px; text-align: center; font-size: 12.5px; background: rgba(255,255,255,.85); border-radius: 8px; padding: 6px 10px; margin: 0; z-index: 1; }
.spin { stroke-dasharray: 80 210; animation: spin 1.2s linear infinite; transform-origin: 50% 50%; }

/* look view */
.vfr-body.look { display: flex; flex-direction: column; overflow: hidden; }
.look-top { flex: none; display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-bottom: 1px solid var(--line); }
.who { display: flex; align-items: center; gap: 6px; background: none; border: 0; padding: 0; text-align: left; }
.who .avatar { width: 30px; height: 30px; }
.who .small { font-size: 11px; line-height: 1.1; max-width: 60px; }
.tabs { display: flex; gap: 2px; margin-left: auto; overflow-x: auto; }
.tabs button { background: none; border: 0; padding: 8px 7px; font-size: 12px; color: var(--muted); border-bottom: 2px solid transparent; }
.tabs button[aria-selected=true] { color: var(--ink); border-bottom-color: var(--ink); }
.stage { position: relative; flex: 1; min-height: 0; background: var(--wall); }
.history { height: 100%; overflow-y: auto; scroll-snap-type: y mandatory; scrollbar-width: none; overscroll-behavior: contain; }
.history::-webkit-scrollbar { display: none; }
.look-slide { height: 100%; scroll-snap-align: start; scroll-snap-stop: always; display: flex; justify-content: center; }
.look-art { position: relative; height: 100%; aspect-ratio: 1 / 2; max-width: 100%; }
.look-art > svg { width: 100%; height: 100%; }
.look-art.is-photo { aspect-ratio: 2 / 3; }
.look-photo { width: 100%; height: 100%; object-fit: cover; display: block; }
.retry { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); z-index: 2; border: 0; border-radius: 999px; padding: 6px 12px; background: #fff3cd; color: #6b4e00; font-size: 12px; box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.product-photo { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; display: block; }
.card-art:has(.product-photo) { padding: 4%; }
.pdp-media:has(.product-photo) { padding: 3% 6%; }
img.pdp-art { max-height: 80vh; }
.hp-product:has(.product-photo) { padding: 4%; }
.tag { position: absolute; transform: translate(-50%, -50%); display: block; min-width: 50px; padding: 2px 6px 3px; border: 0; border-radius: 6px; background: rgba(255,255,255,.95); box-shadow: 0 2px 8px rgba(0,0,0,.15); text-align: center; line-height: 1.15; text-decoration: none; color: var(--ink); }
.tag small { display: block; font-size: 7.5px; color: var(--muted); white-space: nowrap; }
.tag b { font-size: 10.5px; font-weight: 600; }
.tag.mine { background: var(--pick); }
.tag:hover { outline: 1.5px solid var(--ink); }
.dots { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 5px; pointer-events: none; }
.dots span { width: 5px; height: 5px; border-radius: 50%; background: rgba(0,0,0,.2); }
.dots span.on { background: var(--ink); height: 12px; border-radius: 3px; }
.busy { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; background: rgba(236,230,220,.75); backdrop-filter: blur(3px); font-size: 13px; z-index: 3; padding: 20px; }
.busy .spinner { margin: 0 auto 12px; }
.mirror-btn { position: absolute; left: 6px; top: 50%; transform: translateY(-50%); width: 30px; height: 56px; border-radius: 8px; border: 1px solid var(--line); background: rgba(255,255,255,.9); display: none; place-items: center; z-index: 2; }
@media (min-width: 1024px) { .mirror-btn { display: grid; } }
.stage-actions { position: absolute; left: 10px; bottom: 26px; display: flex; gap: 8px; z-index: 2; pointer-events: none; }
.stage-actions button { pointer-events: auto; }
.disclaimer { position: absolute; left: 150px; right: 10px; bottom: 6px; margin: 0; text-align: right; font-size: 10.5px; color: #5b554c; pointer-events: none; }
.try-here { flex: none; display: flex; align-items: center; justify-content: center; gap: 8px; margin: 8px 10px 0; padding: 9px 12px; border: 1px dashed var(--ink); border-radius: 8px; background: var(--soft); font-size: 12.5px; }
.try-here svg { width: 18px; flex: none; }
.strip-head { flex: none; display: flex; justify-content: space-between; align-items: center; padding: 8px 10px 4px; }
.strip { flex: none; display: flex; gap: 8px; overflow-x: auto; padding: 4px 10px 12px; scrollbar-width: thin; }
.chip { position: relative; flex: 0 0 76px; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 4px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.chip.on { border-color: var(--ink); }
.chip-art { width: 46px; height: 46px; display: grid; place-items: center; }
.chip-art svg { max-width: 100%; max-height: 100%; }
.chip-name { font-size: 10px; line-height: 1.15; text-align: center; height: 23px; overflow: hidden; }
.chip-on { position: absolute; top: 3px; right: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; }
.chip-on svg { width: 11px; height: 11px; }

/* side panes */
.mirror .stage { flex: 1; }
.scroll-hint { position: absolute; left: 50%; top: 50%; z-index: 3; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 16px 18px; border-radius: 14px; background: rgba(17,17,17,.78); color: #fff; font-size: 12.5px; text-align: center; pointer-events: none; transform: translate(-50%, -50%); animation: hint-fade 3s ease forwards; }
.scroll-icon { position: relative; width: 22px; height: 34px; border: 2px solid #fff; border-radius: 12px; }
.scroll-icon::before, .scroll-icon::after { content: ""; position: absolute; left: 50%; width: 7px; height: 7px; border: solid #fff; border-width: 0 2px 2px 0; transform: translateX(-50%) rotate(45deg); }
.scroll-icon::before { top: -14px; transform: translateX(-50%) rotate(-135deg); }
.scroll-icon::after { bottom: -14px; }
.scroll-icon .wheel { position: absolute; left: 50%; top: 6px; width: 3px; height: 7px; margin-left: -1.5px; border-radius: 2px; background: #fff; animation: hint-wheel 1s ease-in-out infinite; }
@keyframes hint-fade { 0% { opacity: 0; } 12% { opacity: 1; } 80% { opacity: 1; } 100% { opacity: 0; } }
@keyframes hint-wheel { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(10px); opacity: 0; } 100% { transform: translateY(0); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .scroll-icon .wheel { animation: none; } }
.chat-head { flex: none; display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 14px; border-bottom: 1px solid var(--line); font-size: 13px; }
.chat-head .icon-btn { margin-left: auto; }
.msgs { flex: 1; overflow: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; background: #fafaf8; }
.msg { max-width: 86%; padding: 9px 12px; border-radius: 10px; background: #fff; border: 1px solid var(--line); font-size: 13px; }
.msg b { display: block; font-size: 11px; margin-bottom: 2px; }
.msg.me { align-self: flex-end; background: var(--ink); color: #fff; border-color: var(--ink); }
.look-msg { padding: 6px; display: flex; flex-direction: column; gap: 4px; font-size: 11px; }
.mini-look { width: 110px; height: 180px; background: var(--wall); border-radius: 6px; overflow: hidden; display: flex; justify-content: center; }
.chat-input { flex: none; display: flex; gap: 6px; padding: 10px; border-top: 1px solid var(--line); }
.chat-input input { flex: 1; height: 42px; border: 1px solid #cfccc6; border-radius: 999px; padding: 0 14px; }

/* modals */
.modal { position: fixed; inset: 0; z-index: 90; background: rgba(0,0,0,.4); display: grid; place-items: end center; }
@media (min-width: 768px) { .modal { place-items: center; } }
.sheet { width: min(100%, 420px); background: #fff; border-radius: 16px 16px 0 0; padding: 20px; max-height: 92vh; overflow: auto; }
@media (min-width: 768px) { .sheet { border-radius: 14px; } }
.sheet h3 { margin: 0 0 6px; font-size: 17px; font-weight: 500; }
.share-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 16px 0; }
.share-t { display: flex; flex-direction: column; align-items: center; gap: 6px; background: none; border: 0; font-size: 12px; text-decoration: none; }
.share-t span { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 18px; }
.big-check { width: 56px; height: 56px; margin: 6px auto 10px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; }
.big-check svg { width: 28px; height: 28px; }

/* companion app */
body.in-app { background: #e9e6e1; }
.app-shell { min-height: 100vh; display: flex; flex-direction: column; align-items: center; }
.app { position: relative; width: 100%; max-width: 430px; min-height: 100vh; background: #fff; display: flex; flex-direction: column; }
@media (min-width: 640px) { .app-shell { padding: 24px 0; } .app { min-height: min(880px, calc(100vh - 80px)); border-radius: 28px; overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,.15); } }
.app-head { position: sticky; top: 0; z-index: 3; display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; background: rgba(255,255,255,.95); border-bottom: 1px solid var(--line); font-size: 13px; }
.app-brand { font-weight: 600; letter-spacing: .02em; }
.app-brand b { background: var(--ink); color: #fff; padding: 0 4px; margin-left: 1px; border-radius: 3px; }
.app-main { flex: 1; overflow: auto; padding-bottom: 76px; }
.app-nav { position: sticky; bottom: 0; display: flex; justify-content: space-around; border-top: 1px solid var(--line); background: #fff; padding: 6px 0 calc(6px + env(safe-area-inset-bottom)); }
.app-nav a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; text-decoration: none; color: var(--muted); padding: 4px 16px; }
.app-nav a.on { color: var(--ink); }
.app-exit { margin: 12px; font-size: 12px; color: var(--muted); }
.app-pad { padding: 18px 16px; }
.app-h { font-size: 20px; font-weight: 500; margin: 0 0 6px; }
.app-h2 { font-size: 15px; font-weight: 500; margin: 18px 0 8px; }
.app-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 12px; }
.app-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.app-card { text-decoration: none; }
.app-card-art { background: var(--wall); border-radius: 10px; overflow: hidden; aspect-ratio: 3/5; display: flex; justify-content: center; margin-bottom: 6px; }
.app-card .look-art { height: 100%; }
.empty { text-align: center; padding: 40px 10px; }
.empty svg { display: inline; width: 16px; vertical-align: -3px; }
.app-detail { padding: 14px 0; }
.app-look { height: 62vh; max-height: 560px; background: var(--wall); display: flex; justify-content: center; margin: 10px 0; }
.app-items { list-style: none; padding: 0 16px; margin: 0; }
.app-items li { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.app-items li > div { flex: 1; }
.ai-art { width: 52px; height: 52px; background: var(--soft); border-radius: 8px; display: grid; place-items: center; padding: 6px; flex: none; }
.ai-art svg { max-width: 100%; max-height: 100%; }
.scanner { position: relative; aspect-ratio: 1; background: #000; border-radius: 12px; overflow: hidden; margin: 12px 0; }
.scanner video { width: 100%; height: 100%; object-fit: cover; }
.scan-frame { position: absolute; inset: 18%; border: 3px solid #fff; border-radius: 14px; }
.tiles.two .tile-art { aspect-ratio: 3/4; }
.settings { list-style: none; padding: 0; margin: 16px 0; }
.settings li { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.splash { justify-content: center; align-items: center; gap: 28px; background: linear-gradient(160deg, #dfe6ee, #f3efe9 60%, #e3d9cb); }
.app-brand.big { font-size: 22px; }
.splash-title { text-align: center; font-family: var(--serif); }
.splash-title i { display: block; font-size: 22px; }
.splash-title span { display: block; font-size: 48px; line-height: 1; }
.splash-title small { display: block; font-family: var(--sans); font-size: 13px; margin-top: 10px; }
.small-ring { width: 110px; height: 110px; }
.small-ring svg { transform: none; }

/* demo controls */
#demo-root { position: relative; z-index: 80; }
.demo-btn { position: fixed; left: 14px; bottom: 14px; z-index: 81; border: 1px dashed #888; background: #fffbe8; color: #5a4a00; border-radius: 999px; padding: 6px 12px; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
.demo-panel { position: fixed; left: 14px; bottom: 52px; z-index: 81; width: 280px; background: #fffef7; border: 1px solid #e6dfb8; border-radius: 12px; padding: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.15); display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.demo-panel label select { margin-left: 6px; }
body.vfr-open .demo-btn { opacity: .6; }
@media (max-width: 767px) { body.vfr-open .demo-btn, body.vfr-open .demo-panel { display: none; } }
.swing { text-align: center; }
.tag-card { position: relative; width: 200px; margin: 14px auto; padding: 34px 18px 18px; background: #c9a77c; border-radius: 6px 6px 10px 10px; color: #3a2a17; clip-path: polygon(20% 0, 80% 0, 100% 10%, 100% 100%, 0 100%, 0 10%); }
.tag-hole { position: absolute; top: 12px; left: 50%; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: #fff; }
.tag-brand { font-family: var(--serif); letter-spacing: .18em; font-size: 12px; }
.tag-name { font-size: 12px; margin: 4px 0 10px; }
.tag-qr { background: #fff; padding: 10px; border-radius: 4px; }
.tag-qr svg { width: 100%; height: auto; }
.tag-cta { font-size: 12px; margin-top: 8px; letter-spacing: .06em; }
@media print { body * { visibility: hidden; } .tag-card, .tag-card * { visibility: visible; } .tag-card { position: absolute; top: 20px; left: 20px; } }

/* profile: crops, checks, colours, sizes */
.pf-crops { display: grid; grid-template-columns: 1fr 1fr 0.8fr; gap: 8px; align-items: start; }
.pf-crop { margin: 0; display: flex; flex-direction: column; gap: 4px; }
.crop { position: relative; overflow: hidden; border-radius: 8px; background: var(--wall); }
.crop img { position: absolute; max-width: none; user-select: none; -webkit-user-drag: none; }
.pf-crop figcaption { font-size: 11.5px; font-weight: 500; }
.pf-crop.editing .crop { outline: 2px solid var(--ink); outline-offset: 2px; cursor: grab; touch-action: none; }
.pf-crop.editing .crop:active { cursor: grabbing; }
.crop-adjust { display: inline-flex; align-items: center; gap: 4px; align-self: flex-start; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 3px 9px 3px 6px; font-size: 11px; }
.crop-adjust svg { width: 13px; height: 13px; }
.crop-tools { display: flex; flex-wrap: wrap; gap: 4px; }
.crop-tools button { min-width: 30px; height: 28px; border: 1px solid var(--ink); background: #fff; border-radius: 6px; font-size: 14px; padding: 0 6px; }
.crop-tools button[data-pf="reset-crop"], .crop-tools .done { font-size: 11px; }
.crop-tools .done { background: var(--ink); color: #fff; }
.replace-photo { margin: 10px 0 4px; }
.crop-avatar { position: relative; }
.crop-avatar img { position: absolute; max-width: none; width: auto; height: auto; object-fit: initial; }
.tiles.one { grid-template-columns: minmax(0, 160px); }
.pf-checks { list-style: none; padding: 10px 12px; margin: 12px 0 4px; border: 1px solid var(--line); border-radius: 10px; display: grid; gap: 6px; font-size: 12.5px; }
.pf-checks li { display: flex; gap: 8px; align-items: flex-start; }
.pf-checks li > svg, .pf-checks li:not(:has(svg))::before { flex: none; }
.pf-checks li svg { width: 16px; height: 16px; padding: 2px; border-radius: 50%; background: #e3f3e6; color: #1e7b34; }
.pf-checks li.warn, .pf-checks li.bad { font-weight: 500; }
.pf-checks li.warn { color: #7a5200; }
.pf-checks li.bad { color: var(--danger); }
.pf-checks li.warn::first-letter, .pf-checks li.bad::first-letter { font-weight: 700; }
.pf-h { font-size: 13px; font-weight: 600; margin: 18px 0 6px; letter-spacing: .02em; }
.pf-row { display: grid; gap: 6px; margin: 8px 0 12px; }
.swatches.wrap { flex-wrap: wrap; margin: 0; }
.swatches.more { padding: 8px; background: var(--soft); border-radius: 8px; margin-top: 6px; }
.sw { position: relative; flex: none; }
.sw i { position: absolute; right: -3px; bottom: -3px; width: 10px; height: 10px; border-radius: 50%; background: var(--ink); border: 2px solid #fff; }
.sw-none { background: repeating-linear-gradient(135deg, #fff 0 4px, #ddd 4px 6px); }
.sw-more { height: 26px; border: 1px solid var(--line); border-radius: 999px; background: #fff; padding: 0 10px; font-size: 11.5px; }
.sw-more.on { border-color: var(--ink); }
.sw-custom { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; cursor: pointer; }
.sw-custom input { width: 30px; height: 26px; padding: 0; border: 1px solid var(--line); border-radius: 6px; background: none; }
.ai-badge { display: inline-block; font-size: 9.5px; font-weight: 700; letter-spacing: .04em; background: var(--ink); color: #fff; border-radius: 4px; padding: 1px 4px; margin-left: 4px; vertical-align: 1px; }
.pf-sizing { margin-top: 6px; }
.pf-pref { margin-bottom: 4px; }
.pf-fit h4 { font-size: 12.5px; margin: 14px 0 4px; }
.pf-size { display: grid; grid-template-columns: 1fr 112px 76px; gap: 6px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.pf-size select { height: 36px !important; padding: 0 6px !important; font-size: 12.5px; border: 1px solid #cfccc6; border-radius: 8px; background: #fff; }
.pf-size-name { font-size: 12.5px; }
.pf-eq { grid-column: 1 / -1; font-size: 11px; color: var(--muted); }
.pf-fit .link { margin: 8px 0; display: inline-block; }
.chart-wrap { overflow-x: auto; margin: 6px 0 10px; }
.size-chart { border-collapse: collapse; width: 100%; font-size: 11.5px; text-align: center; }
.size-chart caption { text-align: left; font-weight: 600; font-size: 11.5px; padding: 4px 0; }
.size-chart th { background: var(--soft); font-weight: 600; }
.size-chart th, .size-chart td { border: 1px solid var(--line); padding: 4px 6px; }
.size-note { font-size: 10.5px; background: #e3f3e6; color: #1e7b34; border-radius: 999px; padding: 2px 8px; margin-left: auto; margin-right: 8px; }
.size small { font-size: 11px; }

/* photo check */
.analyze-photo { position: relative; width: 150px; margin: 8px auto 16px; border-radius: 10px; overflow: hidden; box-shadow: 0 4px 16px rgba(0,0,0,.12); }
.analyze-photo img { display: block; width: 100%; }
.analyze-photo.small-photo { width: 110px; }
.analyze-photo.rejected img { filter: grayscale(1) blur(2px); opacity: .7; }
.scanline { position: absolute; left: 0; right: 0; height: 30%; background: linear-gradient(transparent, rgba(61,139,253,.35), transparent); animation: scan 1.6s ease-in-out infinite alternate; }
@keyframes scan { from { top: -30%; } to { top: 100%; } }
.analyze-steps { list-style: none; padding: 0; margin: 0 auto; max-width: 280px; text-align: left; font-size: 13px; display: grid; gap: 8px; }
.analyze-steps li { opacity: .35; padding-left: 22px; position: relative; animation: step-on .4s ease forwards; }
.analyze-steps li::before { content: ""; position: absolute; left: 0; top: 3px; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--ink); border-top-color: transparent; animation: spin .9s linear infinite; }
.analyze-steps li:nth-child(1) { animation-delay: .2s; } .analyze-steps li:nth-child(2) { animation-delay: 1.2s; }
.analyze-steps li:nth-child(3) { animation-delay: 2.2s; } .analyze-steps li:nth-child(4) { animation-delay: 3.2s; }
@keyframes step-on { to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .scanline { animation: none; } .analyze-steps li { opacity: 1; animation: none; } }
