/* The approved charcoal theme remains the default. */
html[data-theme=light]{color-scheme:light;--ink:#25212c;--muted:#69636f;--line:#e3dfe7;--paper:#faf9f7;--surface:#fff;--soft:#eee8fa;--accent:#6b48a8;--accent-dark:#57328f;--error:#ad2344;--control-line:#9a919f;background:#eeeae6}
html[data-theme=light] body{background:#eeeae6}
html[data-theme=light] body:not(.admin-mode) .site-shell{border-color:#ded9e0}
html[data-theme=light] .button-dark,html[data-theme=light] .discover-screen .product-actions .button-dark{background:#29232f;color:#fff}
html[data-theme=light] .button-dark:hover:not(:disabled){background:#493b59}
html[data-theme=light] .button-quiet:hover,html[data-theme=light] .button-outline:hover{background:#eee8f3}
html[data-theme=light] body:not(.admin-mode) .main-nav{background:#fffffff2;border-color:#e4dfe8;box-shadow:0 4px 24px #37263e0d}
html[data-theme=light] .main-nav a{color:#706776}
html[data-theme=light] .main-nav a[aria-current=page]{color:var(--accent)}
html[data-theme=light] .guest-banner{background:#f0ecf4;border-color:var(--line)}
html[data-theme=light] .wardrobe-feature-photo,html[data-theme=light] .wardrobe-thumbnail,html[data-theme=light] .wardrobe-photo,html[data-theme=light] .discover-screen .product-photo{background:#eeeae6}
html[data-theme=light] .ad-badge{border-color:#b3a9ba}
html[data-theme=light] .native-sheet{background:var(--paper);border-color:var(--line);box-shadow:0 -12px 60px #30213924}
html[data-theme=light] .native-sheet::backdrop{background:#231d385e}
html[data-theme=light] .sheet-handle{background:#b0a6b7}
html[data-theme=light] .close-sheet,html[data-theme=light] .option-icon,html[data-theme=light] .batch-remove,html[data-theme=light] .usage-future{background:#eee8f3;color:var(--ink)}
html[data-theme=light] .native-sheet .field input,html[data-theme=light] .native-sheet .field select,html[data-theme=light] .native-sheet .field textarea,html[data-theme=light] .batch-fields input,html[data-theme=light] .batch-fields select{background:#fff;border-color:var(--control-line)}
html[data-theme=light] .native-sheet .item-entry>img,html[data-theme=light] .sheet-detail-photo,html[data-theme=light] .batch-item>img{background:#eeeae6}
html[data-theme=light] .detail-meta button,html[data-theme=light] .native-sheet .account-details>.button-stop{color:var(--error)}
html[data-theme=light] .toast{background:#29232f;color:#fff}
/* A camera always sits on a dark, legible stage, in either theme. */
html[data-theme=light] .video-placeholder strong,html[data-theme=light] .camera-header{color:#f7f5f0}
html[data-theme=light] .video-placeholder p{color:#bbb6c5}
html[data-theme=light] .camera-header>.icon-button,html[data-theme=light] .video-placeholder .empty-icon{background:#302b39;color:#d6caff}
html[data-theme=light] .video-placeholder .button-dark{background:#f4f2ee;color:#17171c}
.header-actions{display:flex;gap:6px;align-items:center}
.command-entry button{background:var(--accent);color:#17121f}
html[data-theme=light] .command-entry button{color:#fff}
.live-indicator{background:#28232ee6;color:#fff}
.theme-toggle{border:1px solid var(--line);background:var(--surface);color:var(--ink);border-radius:24px;min-height:44px;padding:0 12px;font-size:12px;white-space:nowrap}
.appearance-row{display:flex;align-items:center;justify-content:space-between;padding:14px 16px;gap:16px}
.auth-screen .theme-toggle{align-self:flex-end}
.discover-screen .product-photo,.discover-screen .product-photo.is-stack{width:100%;aspect-ratio:var(--photo-ratio,3/4);min-height:200px;max-height:620px;padding:0;overflow:hidden;border:0;border-radius:18px;background:var(--surface);isolation:isolate}
.discover-screen .product-photo>img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;display:block}
.product-gallery-controls{position:absolute;z-index:5;top:52px;bottom:auto;left:50%;transform:translateX(-50%);display:flex;align-items:center;gap:4px;background:#17141de6;color:#fff;border-radius:24px;padding:0 2px;white-space:nowrap}
.product-gallery-controls button{width:44px;height:44px;border:0;background:none;color:#fff;font-size:22px}
.product-gallery-controls span{font-size:12px;min-width:28px;text-align:center;font-variant-numeric:tabular-nums}
.product-stack{position:absolute;inset:0;touch-action:pan-y pinch-zoom;user-select:none;cursor:grab;isolation:isolate;border-radius:inherit}
.product-stack:focus-visible{outline:3px solid var(--accent);outline-offset:-3px}
.product-stack-card{position:absolute;inset:0;overflow:hidden;border:0;border-radius:18px;box-shadow:none;background:var(--surface);transform-origin:top center}
.product-stack-card>img{display:block;width:100%;height:100%;pointer-events:none}
.product-stack-card[data-depth="0"]{z-index:3;animation:product-photo-in .2s ease}
.product-stack-card[data-depth="1"]{z-index:2;transform:translateY(-11px) scale(.96);filter:brightness(.93)}
.product-stack-card[data-depth="2"]{z-index:1;transform:translateY(-22px) scale(.92);filter:brightness(.85)}
.discover-screen[data-view=grid] .product-stack-card:not([data-depth="0"]){display:none}
.discover-screen[data-view=large] .product-photo.is-stack{padding-top:24px;overflow:visible;background:transparent}
.discover-screen[data-view=large] .product-photo.is-stack .product-stack{inset:24px 0 0}
.discover-screen[data-view=large] .product-gallery-steps{top:24px}
.discover-screen[data-view=large] .product-gallery-controls,.discover-screen[data-view=large] .product-photo.is-stack .save-button{top:72px}
.discover-screen[data-view=large] .product-photo.is-stack>.ad-badge{top:78px}
@keyframes product-photo-in{from{opacity:.6}to{opacity:1}}
.product-stack.is-dragging{cursor:grabbing}
.product-gallery-steps{position:absolute;z-index:5;top:0;left:12px;right:12px;display:flex;gap:5px;padding:0 4px}
.product-gallery-steps button{min-width:44px;min-height:44px;flex:1;position:relative;border:0;background:none;padding:0}
.product-gallery-steps button::after{content:'';position:absolute;left:0;right:0;top:12px;height:3px;border-radius:4px;background:#fff5;box-shadow:0 1px 2px #0003}
.product-gallery-steps button[aria-pressed=true]::after{background:#fff}
.save-button[aria-busy=true] svg{opacity:.3}
.save-button[aria-busy=true]::after{content:'';position:absolute;width:18px;height:18px;border:2px solid var(--line);border-top-color:var(--accent);border-radius:50%;animation:save-pending .7s linear infinite}
@keyframes save-pending{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){.product-stack-card[data-depth="0"]{animation:none}}
.native-sheet.product-coupon{padding:24px;background:var(--paper)}
.product-coupon p{font-size:12px;line-height:1.7;color:var(--muted);white-space:pre-wrap;overflow-wrap:anywhere;margin:0 0 12px}
.coupon-code{display:flex;gap:8px;justify-content:space-between;align-items:center;margin:0 0 12px}
.coupon-code code{overflow-wrap:anywhere;font-size:14px;user-select:all}
.coupon-code button{border:1px solid var(--line);border-radius:20px;background:var(--soft);color:var(--ink);min-height:44px;padding:0 14px;white-space:nowrap}
.view-switch{display:flex;gap:2px;padding:3px;border:1px solid var(--line);border-radius:16px;background:var(--surface)}
.view-switch button{width:44px;height:44px;padding:11px;border:0;border-radius:12px;color:var(--muted);background:transparent}
.view-switch button[aria-pressed=true]{background:var(--paper);color:var(--accent);box-shadow:0 2px 8px #00000012}
.view-switch svg{width:22px;height:22px}
.discover-catalog .section-heading{flex-wrap:wrap;justify-content:flex-start;margin-bottom:20px}
.discover-catalog #recommend-button{margin-left:auto;padding-inline:4px}
.discover-scroll{padding-inline:16px;padding-bottom:24px}
.discover-screen .product-grid,.wardrobe-grid{display:block;columns:2;column-gap:12px}
.discover-screen[data-view=large] .product-grid{columns:1}
.discover-screen .product-card,.wardrobe-grid .wardrobe-card{display:block;width:100%;break-inside:avoid;margin:0 0 24px}
.discover-screen .product-photo .product-info{position:absolute;z-index:4;left:10px;bottom:10px;width:fit-content;max-width:calc(100% - 20px);max-height:calc(100% - 72px);padding:0 10px;border:1px solid var(--line);border-radius:12px;color:var(--ink);background:var(--paper);box-shadow:0 3px 12px #00000012;overflow:auto}
.discover-screen .product-info-top{position:relative;min-height:48px;padding:8px 18px 8px 0;list-style:none;cursor:pointer}
.discover-screen .product-info-top::-webkit-details-marker{display:none}
.discover-screen .product-info-top::after{content:'⌄';position:absolute;right:0;top:50%;transform:translateY(-50%);color:var(--muted);font-size:16px}
.discover-screen .product-info[open] .product-info-top::after{content:'⌃'}
.discover-screen .product-info[open]{width:calc(100% - 20px)}
.discover-screen .product-byline{color:var(--muted);font-size:12px;margin:4px 0 8px;padding:0}
.discover-screen .product-name{font-size:16px;line-height:1.4;font-weight:600;letter-spacing:-.3px;margin:0 0 3px;color:var(--ink);display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden}
.discover-screen .product-info[open] .product-name{-webkit-line-clamp:unset}
.discover-screen .product-price{font-size:14px;color:var(--ink);font-variant-numeric:tabular-nums}
.discover-screen .tag-row{margin:8px 0 10px;gap:4px}
.discover-screen .tag{background:var(--soft);color:var(--ink);font-size:12px;border:0}
.discover-screen .product-photo>.ad-badge{position:absolute;z-index:5;top:8px;left:8px;background:#17141de6;border:0;color:#fff;padding:5px 8px;font-size:11px;border-radius:8px}
.discover-screen .product-photo.is-stack>.ad-badge{top:58px}
.discover-screen .save-button{z-index:5;top:8px;right:8px;bottom:auto;width:44px;height:44px;background:#17141de6;color:#fff;border:1px solid #ffffff38;backdrop-filter:blur(12px)}
.discover-screen .product-photo.is-stack .save-button{top:52px}
.discover-screen .save-button[aria-pressed=true]{background:#f0e7ff;color:#573b82}
.discover-screen .product-actions{margin-top:8px;gap:6px}
.discover-screen .product-actions .button{border-radius:14px;font-size:13px;min-height:44px;padding:10px 6px;letter-spacing:-.2px}
.discover-screen .product-actions .button-outline{border-color:var(--line);background:var(--surface);color:var(--ink)}
.product-coupon-link{display:block;max-width:100%;min-height:44px;border:0;background:transparent;color:var(--accent);font-size:12px;text-decoration:underline;text-underline-offset:3px;padding:6px 0;text-align:left;overflow-wrap:anywhere}
.discover-screen[data-view=grid] .product-name{font-size:14px}
.discover-screen[data-view=grid] .product-price{font-size:13px}
.discover-screen[data-view=grid] .product-photo .product-info{padding:0 8px}
.discover-screen[data-view=grid] .product-gallery-steps{display:none}
.discover-screen[data-view=grid] .product-actions{flex-direction:row;gap:6px}
.discover-screen[data-view=grid] .product-actions .button{min-width:0;padding:8px 3px;font-size:12px;white-space:nowrap}
.discover-screen[data-view=grid] .try-prefix{display:none}
.discover-screen[data-view=grid] .product-gallery-controls{top:8px;left:8px;transform:none;gap:0}
.discover-screen[data-view=grid] .product-gallery-controls button:first-child{display:none}
.discover-screen[data-view=grid] .product-photo.is-stack .save-button{top:8px}
.discover-screen[data-view=large] .product-photo{min-height:290px}
.wardrobe-grid .wardrobe-photo{display:block;aspect-ratio:auto}
.wardrobe-grid .wardrobe-photo img{display:block;width:100%;height:auto;min-height:100px;padding:0;object-fit:cover}
.wardrobe-grid .wardrobe-info{padding-top:8px}
.wardrobe-grid .wardrobe-info h2{font-size:13px}
.wardrobe-grid.is-masonry{display:grid;columns:auto;grid-template-columns:repeat(2,minmax(0,1fr));grid-auto-rows:8px;grid-auto-flow:dense;gap:0 12px;align-items:start}
.wardrobe-grid.is-masonry .wardrobe-card{margin:0;align-self:start}
.wardrobe-grid.is-masonry .wardrobe-card:nth-child(2){grid-column:2;grid-row-start:5}
.wardrobe-feature-photo{height:auto;min-height:200px;max-height:620px}
.wardrobe-feature-photo>img{height:auto;min-height:200px;max-height:620px;object-fit:cover}
.wardrobe-thumbnail img{object-fit:cover}
.camera-guide{margin:12px 0 18px;position:relative;border-radius:16px;overflow:hidden;background:#eeeae6;color:#28202f}
.camera-guide img{display:block;width:100%;height:auto}
.camera-guide-distance{position:absolute;left:55%;top:82%;transform:translate(-50%,-50%);padding:4px 10px;background:#fffffff0;border-radius:20px;font-size:14px;font-weight:700;color:#523688}
.camera-guide-caption{font-size:12px;color:var(--muted);margin:0 0 16px;line-height:1.7}
.camera-guide-trigger{display:flex;align-items:center;gap:10px;margin-top:12px;padding:6px 12px 6px 6px;border:1px solid #5c5568;border-radius:14px;background:#25212c;color:#e9e2f5;min-height:44px;font-size:12px}
.camera-guide-trigger img{width:58px;height:40px;object-fit:cover;border-radius:8px}
@media(max-width:360px){.header-actions{gap:4px}.theme-toggle{padding-inline:9px;font-size:11px}.header-actions .add-button{width:44px;height:44px}}
@media(max-height:650px){.video-placeholder{gap:8px;padding-top:74px}.video-placeholder .empty-icon{display:none}.camera-guide-trigger img{display:none}}

/* Fitting shares the app width; only its available height differs. */
body.fitting-mode .site-shell{height:100dvh;overflow:hidden}
body.fitting-mode #customer-view{height:100%}
body.fitting-mode.browsing #customer-view{height:calc(100% - 44px)}
body:not(.admin-mode) #fitting{height:100%;min-height:0;padding:0 0 calc(88px + env(safe-area-inset-bottom));gap:0;overflow:auto}
#fitting #video-stage{display:grid;grid-template-rows:auto minmax(0,1fr) auto;flex:1 1 0;min-height:180px;height:auto;aspect-ratio:auto;margin:0 20px;border:1px solid #34323d;border-radius:20px;isolation:isolate}
#fitting .video-stage video{object-fit:contain}
#fitting .live-indicator{position:static;margin:0;font-size:10px}
#fitting .framing-tip{position:relative;inset:auto;grid-row:1;margin:12px 12px 0;padding:7px 10px;font-size:12px;line-height:1.5}
#fitting .video-placeholder{position:relative;inset:auto;grid-row:2;min-height:0;overflow:auto;justify-content:safe center;padding:8px 16px;gap:8px;z-index:1}
#fitting .video-placeholder::before{display:none}
#fitting .video-placeholder .empty-icon,#fitting .video-placeholder>p{display:none}
#fitting .video-placeholder strong{color:#f7f5f0;font-size:16px;line-height:1.5;flex-shrink:0}
#fitting .camera-guide-trigger{margin:0;min-height:44px;flex-shrink:0;padding:6px 12px}
#fitting .camera-guide-trigger img{width:44px;height:32px}
#fitting .camera-actions{position:relative;grid-row:3;z-index:3;display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:8px;padding:10px 12px 12px}
#fitting .camera-actions button{min-height:48px;min-width:0;border-radius:28px;font-size:13px;padding:10px 16px;line-height:1.4}
#fitting #preview-button{background:#f4f2ee;color:#202027;white-space:nowrap}
#fitting #voice-button{position:static;transform:none;margin:0;background:#302b39;color:#f0eafb;border:1px solid #62596f;justify-content:center;white-space:nowrap;box-shadow:none}
#fitting #voice-button:active{transform:scale(.985)}
#fitting .fitting-tray{margin:12px 20px 0;padding:0;min-height:52px;max-height:40%;display:flex;flex-direction:column;border:1px solid var(--line);border-radius:20px;background:var(--paper);transform:translateY(var(--tray-drag,0));transition:transform .2s ease}
#fitting .fitting-tray.is-dragging{transition:none}
.fitting-tray-toggle{position:relative;display:flex;align-items:center;gap:8px;flex-shrink:0;width:100%;min-height:52px;padding:14px 16px 6px;border:0;border-radius:20px;background:transparent;color:var(--ink);font-size:13px;text-align:left;touch-action:pan-x pinch-zoom;user-select:none;cursor:grab}
.fitting-tray-toggle:active:not(:disabled){transform:none;cursor:grabbing}
.tray-grip{position:absolute;top:7px;left:50%;transform:translateX(-50%);width:32px;height:3px;border-radius:3px;background:var(--muted)}
#fitting-tray-action{margin-left:auto;color:var(--muted);font-size:12px}
.fitting-tray-toggle svg{width:16px;height:16px;color:var(--muted);transition:transform .2s}
.is-collapsed .fitting-tray-toggle svg{transform:rotate(180deg)}
.fitting-tray-content{min-height:0;overflow:auto;overscroll-behavior:contain;padding:0 16px 8px;scrollbar-width:thin}
#fitting .selected-product strong{margin:0;font-size:15px}
#fitting .selected-product .skip-link{min-height:44px;display:inline-flex;align-items:center}
#fitting .fitting-items{padding:4px 0 10px}
#fitting .mini-garment{width:52px;height:58px}
#fitting .provider-note{font-size:12px;line-height:1.5;margin-top:8px}
#fitting .text-command{min-height:44px;font-size:12px}
#fitting .control-row .button{min-height:48px}
@media(max-height:500px){
  body:not(.admin-mode) #fitting{overflow-y:auto}
  #fitting #video-stage{flex:0 0 260px}
  #fitting .fitting-tray{max-height:none}
}
@media(prefers-reduced-motion:reduce){#fitting .fitting-tray,.fitting-tray-toggle svg{transition:none}}

/* Shared title, action and content alignment on the four customer pages. */
.app-screen>.page-header{display:block;flex-shrink:0;width:100%;min-height:0;padding:20px 20px 16px;background:var(--paper)}
.page-header .brand-caption{display:block;font-size:13px;line-height:18px;letter-spacing:-.2px;margin:0 0 8px;color:var(--muted)}
.page-title-row{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:44px}
.page-header h1{font-size:32px;line-height:40px;letter-spacing:-1.2px;margin:0;font-weight:700}
.page-header .header-actions{display:flex;align-items:center;gap:8px;flex-shrink:0}
.page-header .header-actions>.icon-button,.page-header .theme-toggle{width:44px;height:44px;min-height:44px;border-radius:14px;padding:10px;border:1px solid var(--line);background:var(--surface);color:var(--ink)}
.page-header .theme-toggle svg,.page-header .icon-button svg{display:block;width:22px;height:22px}
.page-header .view-switch{padding:0;gap:0;height:44px;border:0;border-radius:14px}
.page-header .view-switch button{height:44px;border:1px solid transparent}
.page-header .view-switch button[aria-pressed=true]{border-color:var(--line);box-shadow:none}
.page-description{font-size:13px;line-height:20px;color:var(--muted);margin:8px 0 0}
.wardrobe-tabs{margin-inline:20px}
.closet-scroll,.discover-scroll,.profile-scroll{padding-inline:20px}
.discover-catalog .section-heading{min-height:44px;margin:0 0 12px}
.featured-caption{right:auto;left:12px;bottom:12px;max-width:calc(100% - 24px);padding:10px 12px;background:var(--paper);color:var(--ink);border:1px solid var(--line);border-radius:12px}
.featured-caption strong{font-size:18px}
.featured-caption>span{font-size:12px;color:var(--muted)}
@media(max-width:360px){.page-header .header-actions{gap:4px}.discover-screen[data-view=grid] .product-name{font-size:13px}}
