:root {
  --ground: #FFFFFF;
  --surface: #FFFFFF;
  --ink: #17171B;
  --muted: #5E5E66;
  --line: #ECE4E8;
  --line-soft: #F5EFF2;
  --stage: #FCEDF2;
  --seg: #F7EEF2;
  --accent: #E10F63;
  --accent-soft: #FFE5EF;
  --accent-ink: #FFFFFF;
  --good: #0F6B5C;
  --warn: #9A4A00;
  --danger: #B42318;
  --radius: 16px;
  --display: "Bricolage Grotesque", system-ui, sans-serif;
  --body: Inter, system-ui, -apple-system, sans-serif;
  --tabbar: calc(64px + env(safe-area-inset-bottom));
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--ground); color: var(--ink); font-family: var(--body); -webkit-text-size-adjust: 100%; }
body { min-height: 100dvh; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
svg.figure { stroke: none; }
[hidden] { display: none !important; }
/* File pickers: kept off-screen rather than display:none, which Safari (especially the home-screen web app) can refuse to open. */
.file-pick { position: fixed; left: -9999px; top: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

.app { max-width: 480px; margin: 0 auto; min-height: 100dvh; position: relative; }
main { padding: env(safe-area-inset-top) 20px calc(var(--tabbar) + 24px); }
.view { display: flex; flex-direction: column; gap: 14px; }

.topbar { display: flex; align-items: center; justify-content: space-between; padding: 16px 0 2px; min-height: 60px; }
.topbar-actions { display: flex; gap: 8px; }
.topbar-actions[hidden] { display: none; }
.wordmark { margin: 0; font-family: var(--display); font-weight: 800; font-size: 34px; line-height: 1; letter-spacing: -1.4px; color: var(--accent); }
.title { margin: 0; font-family: var(--display); font-weight: 700; font-size: 30px; letter-spacing: -0.8px; }
.label { margin: 0; font-size: 13px; font-weight: 600; letter-spacing: .6px; text-transform: uppercase; color: var(--muted); }
.hint { margin: 0; font-size: 14px; line-height: 1.45; color: var(--muted); }
.fineprint { margin: 2px 0 0; font-size: 12px; line-height: 1.4; color: var(--muted); text-align: center; }

/* Buttons */
.btn { height: 48px; padding: 0 20px; border-radius: 24px; border: 1px solid var(--line); background: var(--surface); font-size: 15px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap; }
.btn.small { height: 44px; padding: 0 16px; font-size: 14px; }
.btn.outline { background: var(--surface); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 700; }
.btn.danger { color: var(--danger); }
.btn.block { width: 100%; height: 54px; border-radius: 27px; font-size: 17px; }
.btn:disabled { opacity: .45; cursor: default; }
.icon-btn { width: 44px; height: 44px; border-radius: 22px; border: 1px solid var(--line); background: var(--surface); display: inline-flex; align-items: center; justify-content: center; padding: 0; color: var(--ink); }
.icon-btn.light { border: 0; box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.icon-btn.accent { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); width: 48px; height: 48px; border-radius: 24px; }
.link-btn { border: 0; background: none; padding: 8px 0; font-size: 13px; font-weight: 500; color: var(--muted); min-height: 32px; }
.row { display: flex; gap: 10px; }
.row.wrap { flex-wrap: wrap; }

/* Segmented control */
.seg { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; padding: 4px; background: var(--seg); border-radius: 24px; }
.seg button { height: 40px; border-radius: 20px; border: 0; background: transparent; color: #4A4A52; font-size: 14px; font-weight: 500; display: flex; align-items: center; justify-content: center; gap: 8px; }
.seg button svg { width: 18px; height: 18px; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(0,0,0,.08); }

/* Stage */
.stage { position: relative; border-radius: 22px; background: var(--stage); overflow: hidden; aspect-ratio: 3 / 4; max-height: 62dvh; width: 100%; display: flex; align-items: center; justify-content: center; }
.stage-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 24px; }
.stage-empty .figure { width: 92px; height: 160px; margin-bottom: 6px; }
.stage-empty h2 { margin: 0; font-family: var(--display); font-size: 22px; letter-spacing: -.3px; }
.stage-empty p { margin: 0 0 8px; font-size: 14px; line-height: 1.45; color: #4A4A52; max-width: 280px; }
#stage-img, #cam { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: var(--stage); }
#cam { object-fit: cover; background: #111; }
#cam.mirror { transform: scaleX(-1); }
.pill { position: absolute; height: 32px; padding: 0 12px; border-radius: 16px; background: var(--surface); font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; gap: 8px; box-shadow: 0 1px 3px rgba(0,0,0,.1); border: 0; }
.pill.tl { top: 14px; left: 14px; }
.pill.bl { bottom: 14px; left: 14px; }
.pill.br { bottom: 14px; right: 14px; }
.pill.tr { top: 14px; right: 14px; color: var(--ink); }
.pill svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
#btn-change-photo.avatar { position: relative; padding: 0; border: 2px solid var(--accent); overflow: visible; }
#btn-change-photo.avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; object-position: 50% 12%; }
.avatar-badge { position: absolute; right: -3px; bottom: -3px; width: 18px; height: 18px; border-radius: 9px; background: var(--accent); border: 2px solid var(--surface); display: flex; align-items: center; justify-content: center; }
.avatar-badge svg { width: 10px; height: 10px; fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.pill .dots { display: inline-flex; }
.pill .dots span { width: 16px; height: 16px; border-radius: 8px; border: 2px solid var(--surface); }
.pill .dots span + span { margin-left: -6px; }
.compare { user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; touch-action: none; height: 36px; }
.stage-actions { position: absolute; top: 14px; right: 14px; display: flex; flex-direction: column; gap: 10px; }
.cam-controls { position: absolute; left: 0; right: 0; bottom: 18px; display: flex; align-items: center; justify-content: center; gap: 28px; }
.shutter { width: 72px; height: 72px; border-radius: 36px; border: 4px solid #fff; background: rgba(255,255,255,.35); padding: 0; box-shadow: 0 1px 6px rgba(0,0,0,.25); }
.shutter:active { background: rgba(255,255,255,.7); }
.timer { font-size: 13px; font-weight: 600; }
.countdown { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: var(--display); font-size: 120px; font-weight: 700; color: #fff; text-shadow: 0 2px 16px rgba(0,0,0,.4); pointer-events: none; }
.loading { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; background: rgba(245,243,240,.72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.loading p { margin: 0; font-weight: 600; font-size: 15px; }
.loading-track { width: 160px; height: 4px; border-radius: 2px; background: rgba(23,23,27,.12); overflow: hidden; }
.loading-bar { width: 0; height: 100%; border-radius: 2px; background: var(--accent); }
.spinner { width: 44px; height: 44px; border-radius: 50%; border: 4px solid rgba(23,23,27,.15); border-top-color: var(--accent); animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 3s; } }

/* Items tray */
.tray { display: flex; flex-direction: column; gap: 8px; }
.tray-head { display: flex; align-items: center; justify-content: space-between; min-height: 32px; }
.items { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.item { position: relative; display: flex; align-items: center; gap: 10px; min-height: 72px; padding: 8px 36px 8px 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.item img { width: 44px; height: 56px; object-fit: cover; border-radius: 8px; background: var(--stage); flex-shrink: 0; }
.item .meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.item .name { font-size: 13px; font-weight: 600; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.item .sub { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item .price { font-size: 12px; font-weight: 600; color: var(--ink); }
.item .match { font-size: 11px; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.item .match.good { color: var(--good); }
.item .match.caution { color: var(--warn); }
.item .match svg { width: 12px; height: 12px; stroke-width: 2.4; }
.item .remove { position: absolute; top: 4px; right: 4px; width: 32px; height: 32px; border: 0; background: none; border-radius: 16px; display: flex; align-items: center; justify-content: center; color: var(--muted); padding: 0; }
.item .remove svg { width: 16px; height: 16px; }
.item.loading-item { justify-content: center; color: var(--muted); font-size: 13px; padding-right: 8px; }
.add-tile { min-height: 72px; border: 1.5px dashed #E3B7C8; border-radius: 14px; background: transparent; display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 13px; font-weight: 600; }
.add-tile svg { width: 16px; height: 16px; stroke-width: 2; }
.starters { margin-top: 12px; }
.starter-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
.starter { display: flex; flex-direction: column; gap: 3px; padding: 0; border: 0; background: transparent; text-align: left; color: var(--ink); }
.starter img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 10px; background: var(--stage); border: 1px solid var(--line); }
.starter .name { font-size: 11px; font-weight: 600; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.starter .price { font-size: 11px; color: var(--muted); }

/* Add bar */
.addbar { display: flex; gap: 8px; align-items: center; }
.input-wrap { flex: 1; position: relative; display: flex; align-items: center; min-width: 0; }
.input-wrap svg { position: absolute; left: 16px; width: 18px; height: 18px; color: var(--muted); }
.input-wrap input, .search input, .new-coll input { width: 100%; height: 48px; border-radius: 24px; border: 1px solid var(--line); background: var(--surface); padding: 0 16px 0 44px; font-size: 16px; }
.new-coll input { padding-left: 16px; }
input::placeholder { color: #6B6B73; }

/* Shop links */
.shop-links { display: flex; flex-direction: column; gap: 8px; }
.shop-links .label { margin-bottom: 2px; }
.shop-link { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 6px 14px 6px 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; text-decoration: none; color: var(--ink); }
.shop-link img { width: 38px; height: 40px; object-fit: cover; border-radius: 8px; background: var(--stage); }
.shop-link .tw { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.shop-link .t { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shop-link .s { font-size: 12px; color: var(--muted); font-weight: 500; }
.shop-link .go { color: var(--accent); font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.shop-link .go svg { width: 14px; height: 14px; stroke-width: 2; }

/* Collections */
.chips { display: flex; gap: 8px; overflow-x: auto; margin: 0 -20px; padding: 0 20px 2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { height: 44px; padding: 0 16px; border-radius: 22px; border: 1px solid var(--line); background: var(--surface); font-size: 14px; font-weight: 500; white-space: nowrap; flex-shrink: 0; }
.chip[aria-pressed="true"], .chip[aria-checked="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.coll-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; }
.coll-head h2 { margin: 0; font-family: var(--display); font-size: 22px; letter-spacing: -.4px; }
.coll-head .count { font-size: 13px; color: var(--muted); }
.looks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.look { display: flex; flex-direction: column; gap: 6px; border: 0; background: none; padding: 0; text-align: left; }
.look img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 18px; background: var(--stage); }
.look .cap { font-size: 13px; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; padding: 0 2px; }
.look .when { font-size: 12px; color: var(--muted); padding: 0 2px; }
.consent-row { display: flex; gap: 12px; align-items: flex-start; padding: 14px; background: var(--accent-soft); border: 1.5px solid var(--accent); border-radius: 16px; font-size: 13px; line-height: 1.4; color: var(--muted); cursor: pointer; }
.consent-row input { width: 22px; height: 22px; margin: 1px 0 0; flex: none; accent-color: var(--accent); }
.consent-row strong { display: block; color: var(--ink); font-size: 15px; margin-bottom: 2px; }
.consent-sub { display: block; }
.look .shop-line { font-size: 12px; font-weight: 600; color: var(--accent); padding: 0 2px; }
.look .shop-line.add { color: var(--muted); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.unlinked-row { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 6px 10px 6px 6px; background: var(--surface); border: 1px dashed var(--line); border-radius: 14px; }
.unlinked-row img { width: 38px; height: 40px; object-fit: cover; border-radius: 8px; background: var(--stage); }
.unlinked-row .swap-txt { flex: 1; min-width: 0; }
.unlinked-row .mini-btn { margin-top: 0; align-self: center; }
.empty { grid-column: 1 / -1; text-align: center; padding: 40px 20px; background: var(--surface); border: 1px dashed var(--line); border-radius: 18px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.empty strong { display: block; color: var(--ink); font-size: 16px; margin-bottom: 4px; }

/* Colors */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.season { display: flex; align-items: center; gap: 14px; }
.season .face { width: 64px; height: 64px; border-radius: 32px; object-fit: cover; background: var(--stage); flex-shrink: 0; }
.season .kicker { font-size: 12px; font-weight: 600; letter-spacing: .6px; text-transform: uppercase; color: var(--muted); }
.season .name { font-family: var(--display); font-size: 28px; font-weight: 700; letter-spacing: -.5px; line-height: 1.1; }
.season .sub { font-size: 13px; color: var(--muted); }
.card p { margin: 0; font-size: 14px; line-height: 1.5; }
.card .note { font-size: 12px; color: var(--muted); border-top: 1px solid var(--line-soft); padding-top: 10px; }
.swatches { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.swatch { display: flex; flex-direction: column; gap: 4px; }
.swatch span:first-child { height: 52px; border-radius: 12px; border: 1px solid #D9D4CE; }
.swatch span:last-child { font-size: 12px; font-weight: 500; line-height: 1.25; }
.tips { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; line-height: 1.45; }
.colors-intro { text-align: center; align-items: center; }
.colors-intro h2 { margin: 0; font-family: var(--display); font-size: 24px; letter-spacing: -.4px; }
.colors-intro ul { text-align: left; margin: 0; padding-left: 18px; font-size: 14px; line-height: 1.6; color: #3E3E45; }
.section { display: flex; flex-direction: column; gap: 8px; }
#colors-body { display: flex; flex-direction: column; gap: 20px; }

/* Brands */
.search { position: relative; display: flex; align-items: center; }
.search svg { position: absolute; left: 16px; width: 18px; height: 18px; color: var(--muted); }
.brand-cat { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.brand-cat .cat-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.brand-cat .cat-note { font-size: 12px; color: var(--muted); }
.brand-list { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.brand { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 8px 14px; text-decoration: none; color: var(--ink); border-top: 1px solid var(--line-soft); }
.brand:first-child { border-top: 0; }
.brand .mono { width: 40px; height: 40px; border-radius: 12px; background: var(--seg); display: flex; align-items: center; justify-content: center; font-family: var(--display); font-weight: 700; font-size: 17px; flex-shrink: 0; }
.brand .bm { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.brand .bn { font-size: 15px; font-weight: 600; }
.brand .bd { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand .tier { font-size: 12px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.brand > svg { width: 16px; height: 16px; color: var(--muted); }

/* Tab bar */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; height: var(--tabbar); padding: 4px 8px env(safe-area-inset-bottom); background: var(--surface); border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); max-width: 480px; margin: 0 auto; }
.tab { border: 0; background: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11px; font-weight: 500; color: var(--muted); min-height: 56px; }
.tab svg { width: 24px; height: 24px; }
.tab[aria-current="page"] { color: var(--accent); font-weight: 700; }

/* Sheets */
.sheet { border: 0; padding: 0; width: 100%; max-width: 480px; margin: auto auto 0; border-radius: 24px 24px 0 0; background: var(--ground); color: var(--ink); max-height: 92dvh; }
.sheet::backdrop { background: rgba(23,23,27,.45); }
.sheet-inner { padding: 16px 20px calc(20px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 12px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; }
.sheet-head h2 { margin: 0; font-family: var(--display); font-size: 22px; letter-spacing: -.4px; }
.save-list { display: flex; flex-direction: column; gap: 8px; }
.save-opt { height: 52px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); text-align: left; padding: 0 16px; font-size: 15px; font-weight: 600; display: flex; justify-content: space-between; align-items: center; }
.save-opt span { font-size: 13px; color: var(--muted); font-weight: 500; }
.field-label { font-size: 13px; font-weight: 600; color: var(--muted); }
.new-coll { display: flex; gap: 8px; }
.suggest { display: flex; flex-wrap: wrap; gap: 8px; }
.suggest button { height: 36px; padding: 0 12px; border-radius: 18px; border: 1px solid var(--line); background: var(--surface); font-size: 13px; }
.look-img { width: 100%; max-height: 56dvh; object-fit: contain; border-radius: 18px; background: var(--stage); }

/* Toast */
.toast { position: fixed; left: 50%; bottom: calc(var(--tabbar) + 16px); transform: translate(-50%, 20px); max-width: calc(100% - 40px); width: max-content; background: var(--ink); color: #fff; padding: 12px 16px; border-radius: 14px; font-size: 14px; line-height: 1.4; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 50; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast[popover] { top: auto; right: auto; bottom: calc(var(--tabbar) + 16px); left: 50%; margin: 0; border: 0; overflow: visible; height: auto; }
.toast.in-sheet { top: calc(12px + env(safe-area-inset-top)); bottom: auto; } /* inside a sheet: at the top, clear of its fields */

/* Plans: dates, budgets, prices */
.label .total { text-transform: none; letter-spacing: 0; color: var(--ink); font-weight: 600; margin-left: 6px; }
.field { width: 100%; height: 48px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); padding: 0 14px; font-size: 16px; }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.field-col { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.opt { font-weight: 400; }
.hint.small { font-size: 12px; }
.plan { display: flex; flex-direction: column; gap: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; font-size: 14px; }
.plan .line { display: flex; align-items: center; gap: 8px; line-height: 1.35; }
.plan .line svg { width: 16px; height: 16px; color: var(--muted); }
.plan .line.warn { color: var(--warn); font-weight: 600; }
.plan .line.warn svg { color: var(--warn); }
.coll-actions { display: flex; gap: 16px; flex-wrap: wrap; }
.coll-actions .link-btn { color: var(--ink); font-weight: 600; }
.coll-actions .link-btn.danger { color: var(--danger); }
.look .price { font-size: 12px; font-weight: 600; padding: 0 2px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.tag { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 10px; }
.tag.good { background: #E3F1EE; color: var(--good); }
.tag.over { background: #FBEBDD; color: var(--warn); }
.tag.drop { background: var(--accent-soft); color: var(--accent); }
.look .imgwrap { position: relative; }
.look .imgwrap .tag { position: absolute; top: 8px; left: 8px; box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.shop-link .was { text-decoration: line-through; margin-left: 4px; }
.shop-link .drop { color: var(--accent); font-weight: 600; }
.save-opt .sub2 { display: block; }

/* Link + screenshot items */
.add-hint { margin-top: -4px; }
.share-hint { text-align: center; margin-top: -4px; }
#sheet-notice .hint a { color: inherit; text-decoration: underline; }
#sheet-notice .notice-app { text-align: center; margin-top: 14px; }
#sheet-notice .notice-app a { color: var(--accent); font-weight: 600; text-decoration: none; white-space: nowrap; }
.item.needs { border-style: dashed; border-color: #B9B3AC; }
.thumb-add { width: 44px; height: 56px; border-radius: 8px; border: 1.5px dashed #E3B7C8; background: var(--ground); display: flex; align-items: center; justify-content: center; padding: 0; flex-shrink: 0; color: var(--muted); }
.thumb-add svg { width: 18px; height: 18px; }
.mini-btn { white-space: nowrap; align-self: flex-start; margin-top: 2px; min-height: 28px; padding: 0 10px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); font-size: 12px; font-weight: 600; color: var(--ink); }
.mini-btn.accent { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

.disclosure { margin: 2px 0 0; font-size: 11px; line-height: 1.4; color: var(--muted); }
.brands-disclosure { margin: 18px 0 8px; text-align: center; }

.season .face { object-position: 50% 12%; }

/* Sizes */
.mini-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.mini-row:empty { display: none; }
.mini-btn.sized { border-color: var(--good); color: var(--good); }
.sizes-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.section-label { margin-top: 4px; }
.field.area { height: auto; min-height: 64px; padding: 10px 14px; line-height: 1.4; resize: vertical; font-family: inherit; }
select.field { appearance: auto; }
.size-link { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; border: 0; background: none; padding: 2px 4px 6px; min-height: 32px; font-size: 13px; font-weight: 600; color: var(--accent); }
.size-link svg { width: 16px; height: 16px; }
.size-loading { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 28px 0; text-align: center; }
.size-loading p { margin: 0; font-weight: 600; }
.size-hero { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 14px 16px; }
.size-hero .kicker { font-size: 12px; font-weight: 600; letter-spacing: .6px; text-transform: uppercase; color: var(--muted); }
.size-big { font-family: var(--display); font-size: 44px; font-weight: 700; line-height: 1; letter-spacing: -1px; }
.size-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.conf { font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 12px; }
.conf-high { background: #E3F1EE; color: var(--good); }
.conf-medium { background: #EEF0F5; color: #2F4A7A; }
.conf-low { background: #FBEBDD; color: var(--warn); }
.brandfit { margin: 0; font-size: 16px; font-weight: 600; }
#size-body { display: flex; flex-direction: column; gap: 12px; }
#size-body p { margin: 0; }
.sources { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: baseline; font-size: 12px; }
.sources a { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.btn.primary { text-decoration: none; }
a.btn { text-decoration: none; color: inherit; }
a.btn.primary { color: var(--accent-ink); }

.size-cta { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-left: 0; border-radius: 16px; padding: 12px 14px; }
.size-cta div { flex: 1; display: flex; flex-direction: column; gap: 2px; font-size: 13px; line-height: 1.35; color: var(--muted); }
.size-cta strong { color: var(--ink); font-size: 14px; }

.size-big { overflow-wrap: anywhere; }
#size-body .size-big { font-size: clamp(26px, 9vw, 44px); }

.welcome-title { margin: 2px 0 0; font-family: var(--display); font-weight: 800; font-size: 26px; letter-spacing: -0.8px; }
#sheet-welcome p { margin: 0; line-height: 1.5; }
.fineprint a { color: var(--muted); }
.data-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

.share-row { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; line-height: 1.45; color: var(--muted); margin: 4px 0 12px; cursor: pointer; }
.share-row strong { color: var(--ink); }
.share-row input { width: 20px; height: 20px; flex: none; margin: 1px 0 0; accent-color: var(--accent); }

.intro-demo { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; align-items: center; gap: 6px; margin: 4px 0 2px; }
.intro-demo figure { margin: 0; display: grid; gap: 6px; justify-items: center; }
.intro-demo img, .intro-pieces { width: 100%; height: auto; aspect-ratio: 3 / 4; border-radius: 14px; object-fit: cover; background: var(--stage); display: block; }
.intro-pieces { display: grid; place-content: center; justify-items: center; gap: 6px; color: var(--accent); background: var(--accent-soft); padding: 6px; box-sizing: border-box; }
.intro-pieces svg { width: 26px; height: 26px; stroke-width: 2; }
.intro-pieces b { font-size: 11px; line-height: 1.25; text-align: center; color: var(--ink); font-weight: 600; }
.intro-demo figcaption { font-size: 12px; font-weight: 600; color: var(--muted); text-align: center; }
.intro-op { font: 800 20px/1 var(--display); color: var(--accent); margin-bottom: 22px; }
.intro-steps { list-style: none; margin: 2px 0; padding: 0; display: grid; gap: 12px; }
.intro-steps li { display: flex; gap: 12px; align-items: flex-start; }
.intro-steps .step-num { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-weight: 700; font-size: 14px; margin-top: 1px; }
.intro-steps b { display: block; font-size: 16px; }
.intro-steps span:not(.step-num) { display: block; color: var(--muted); font-size: 14px; line-height: 1.45; }

.finding { font-size: 12px; color: var(--muted); }
.store-match { display: grid; gap: 6px; margin: 2px 0; }
.store-match-q { font-size: 12px; line-height: 1.35; color: var(--muted); }
.store-match-q a { display: block; color: var(--accent); font-weight: 700; text-decoration: underline; text-underline-offset: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.store-match-row { display: flex; align-items: center; gap: 4px; }
.store-match-row .mini-btn { margin-top: 0; }
.text-btn { white-space: nowrap; min-height: 28px; padding: 0 6px; border: 0; background: none; font-size: 12px; font-weight: 600; color: var(--muted); }

.share-preview { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--muted); }
.share-preview .thumbs { display: flex; flex-shrink: 0; }
.share-preview img { width: 44px; height: 58px; object-fit: cover; border-radius: 10px; border: 2px solid var(--surface); background: var(--stage); }
.share-preview img.piece { width: 44px; height: 44px; }
.share-preview img + img { margin-left: -14px; }
.share-frames { display: flex; gap: 8px; flex-wrap: wrap; }
.share-frames .chip { height: 40px; padding: 0 14px; }
.share-toggle { display: flex; align-items: center; gap: 10px; font-size: 15px; min-height: 44px; }
.share-toggle input { width: 22px; height: 22px; accent-color: var(--accent); }
.share-ready { display: flex; gap: 8px; }
.share-ready .field { flex: 1; min-width: 0; }
.save-img { -webkit-touch-callout: default; user-select: auto; -webkit-user-select: auto; }
/* color-match pill sits above "Hold to compare" when both show */
.stage:has(#btn-compare:not([hidden])) #stage-match { bottom: 58px; }
.store-match-row { flex-wrap: wrap; }
/* very narrow phones: one item per row so the details have room */
@media (max-width: 359px) { .items { grid-template-columns: minmax(0, 1fr); } }

/* recent try-ons */
.recent { margin: 4px 0 14px; }
.recent .label { margin: 0 0 8px; }
.recent-row { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; }
.recent-look { flex: 0 0 auto; width: 76px; height: 101px; padding: 0; border: 0; border-radius: 14px; overflow: hidden; background: var(--stage); scroll-snap-align: start; }
.recent-look img { width: 100%; height: 100%; object-fit: cover; display: block; }
.recent-look:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
/* swap one piece */
.tray-tools { display: flex; align-items: center; gap: 18px; }
.link-btn.accent { color: var(--accent); font-weight: 600; }
.link-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.swap-step { display: flex; flex-direction: column; gap: 12px; }
.swap-list { display: flex; flex-direction: column; gap: 8px; }
.swap-opt, .swap-old { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 8px 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); text-align: left; color: var(--ink); font-size: 15px; }
.swap-opt img, .swap-old img, .swap-noimg { width: 48px; height: 48px; flex: none; object-fit: contain; border-radius: 10px; background: #fff; }
.swap-noimg { background: var(--stage); }
.swap-txt { display: grid; gap: 2px; min-width: 0; flex: 1; }
.swap-txt b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.swap-txt small { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.swap-old .link-btn { color: var(--accent); font-weight: 600; flex: none; }
/* photo tip on the stage */
.stage:has(#stage-tip:not([hidden])) #stage-match { display: none; } /* the tip sits where the color pill goes */
.stage-tip { position: absolute; left: 14px; right: 14px; bottom: 14px; display: flex; align-items: flex-start; gap: 8px; padding: 10px 8px 10px 14px; border-radius: 16px; background: var(--surface); box-shadow: 0 2px 8px rgba(0,0,0,.12); font-size: 13px; line-height: 1.35; }
.stage-tip span { flex: 1; padding-top: 4px; }
.stage-tip-x { flex: 0 0 auto; width: 32px; height: 32px; border: 0; border-radius: 16px; background: none; display: inline-flex; align-items: center; justify-content: center; color: var(--muted); }
.stage-tip-x svg { width: 16px; height: 16px; }
/* price-drop badge on the Collections tab */
.tab { position: relative; }
.tab.has-badge::after { content: ""; position: absolute; top: 8px; left: calc(50% + 10px); width: 9px; height: 9px; border-radius: 50%; background: var(--accent); border: 2px solid var(--surface); }
/* price-drop alerts card (iPhone app) */
.alerts-card { display: grid; gap: 10px; padding: 14px 16px; margin: 0 0 14px; border-radius: 18px; background: var(--accent-soft); }
.alerts-card strong { display: block; font-size: 15px; margin-bottom: 2px; }
.alerts-card span { font-size: 13px; color: var(--muted); line-height: 1.4; }
.alerts-card.on { display: flex; align-items: center; justify-content: space-between; padding: 8px 8px 8px 16px; background: var(--seg); }
.alerts-card.on span { color: var(--ink); font-weight: 600; }
.alerts-card .row { display: flex; gap: 8px; }
#sheet-welcome .hint a { color: var(--accent); font-weight: 600; }

/* mock Plus */
.plus-perks { margin: 8px 0 14px; padding-left: 20px; font-size: 15px; line-height: 1.5; }
.plus-perks li { margin: 4px 0; }
.plus-plans { display: grid; gap: 10px; margin-bottom: 12px; }
.plan-btn { display: flex; justify-content: space-between; align-items: center; gap: 12px; width: 100%; padding: 14px 16px; border-radius: 16px; border: 1.5px solid var(--line); background: #fff; font: inherit; text-align: left; cursor: pointer; }
.plan-btn.best { border-color: var(--accent); background: var(--accent-soft); }
.plan-btn b { display: block; font-size: 16px; color: var(--ink); }
.plan-btn span { display: block; font-size: 13px; color: var(--muted); }
.plan-btn .plan-price { font-weight: 700; font-size: 16px; color: var(--accent); white-space: nowrap; }
.plan-btn:disabled { opacity: .6; }
.plus-fine { margin-top: 12px; }
.usage-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.usage-bar { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; margin: 8px 0 4px; }
.usage-bar i { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
