/* Studio components (darkroom theme). */

.app { color-scheme: dark; position: fixed; inset: 0; display: grid; grid-template-rows: auto minmax(0, 1fr); background: var(--studio-0); color: var(--studio-text); font-size: var(--t-small); }
.app .i { width: 18px; height: 18px; }

/* App bar */
.appbar { height: 52px; padding: 0 12px; padding-top: env(safe-area-inset-top); box-sizing: content-box; display: flex; align-items: center; gap: 16px; border-bottom: 1px solid var(--studio-line); background: var(--studio-1); }
.appbar__brand { display: flex; align-items: center; gap: 10px; color: var(--studio-text); }
.appbar__brand [data-logo='mark-light'] svg { width: 26px; height: 30px; }
.appbar__word svg { height: 13px; width: auto; }
.modes { display: flex; gap: 2px; margin: 0 auto; background: var(--studio-0); padding: 3px; border: 1px solid var(--studio-line); }
.mode { display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px; color: var(--studio-muted); transition: color var(--d-fast), background var(--d-fast); white-space: nowrap; }
.mode:hover { color: var(--studio-text); }
.mode[aria-selected='true'] { background: var(--studio-3); color: var(--studio-text); box-shadow: inset 0 -1px 0 var(--rouge-lit); }
.appbar__end { display: flex; align-items: center; gap: 10px; }
.privacy-pill { display: inline-flex; align-items: center; gap: 6px; font-size: var(--t-micro); letter-spacing: 0.08em; text-transform: uppercase; color: #9fc4a2; border: 1px solid rgba(159,196,162,.3); padding: 5px 10px; border-radius: var(--r-pill); }
.privacy-pill .i { width: 13px; height: 13px; }
.lang--app select { border-color: var(--studio-line-2); color: var(--studio-text); }
.lang--app select option { background: var(--studio-2); color: var(--studio-text); }

.views { position: relative; min-height: 0; }
.view { position: absolute; inset: 0; min-height: 0; }

/* Panels */
.panel { background: var(--studio-1); border-color: var(--studio-line); border-style: solid; border-width: 0; display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.panel--left { border-right-width: 1px; }
.panel--right { border-left-width: 1px; }
.panel__scroll { overflow-y: auto; overscroll-behavior: contain; min-height: 0; flex: 1; scrollbar-width: thin; scrollbar-color: var(--studio-3) transparent; }
.panel__section { padding: 14px 14px 16px; border-bottom: 1px solid var(--studio-line); display: grid; gap: 12px; }
.panel__title { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-family: var(--font-mono); font-size: var(--t-micro); letter-spacing: var(--track-caps); text-transform: uppercase; color: var(--studio-muted); }
.panel__title b { font-weight: 400; color: var(--studio-text); }

/* Tabs */
.tabs { display: flex; border-bottom: 1px solid var(--studio-line); overflow-x: auto; scrollbar-width: none; flex: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: 1 0 auto; height: 42px; padding: 0 12px; color: var(--studio-muted); font-size: var(--t-small); position: relative; white-space: nowrap; }
.tab::after { content: ''; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 1px; background: var(--rouge-lit); transform: scaleX(0); transition: transform var(--d-base) var(--ease-out); }
.tab:hover { color: var(--studio-text); }
.tab[aria-selected='true'] { color: var(--studio-text); }
.tab[aria-selected='true']::after { transform: scaleX(1); }

/* Buttons */
.ibtn { width: 36px; height: 36px; display: inline-grid; place-items: center; color: var(--studio-muted); border: 1px solid transparent; transition: color var(--d-fast), background var(--d-fast), border-color var(--d-fast); flex: none; }
.ibtn:hover:not(:disabled) { color: var(--studio-text); background: var(--studio-2); }
.ibtn[aria-pressed='true'] { color: var(--studio-text); background: var(--studio-3); border-color: var(--studio-line-2); }
.ibtn:disabled { opacity: 0.35; cursor: default; }
.ibtn--sm { width: 28px; height: 28px; } .ibtn--sm .i { width: 15px; height: 15px; }
.tbtn { height: 34px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--studio-line-2); color: var(--studio-text); font-size: var(--t-small); transition: background var(--d-fast), border-color var(--d-fast), color var(--d-fast); white-space: nowrap; }
.tbtn:hover:not(:disabled) { background: var(--studio-2); border-color: var(--studio-muted); }
.tbtn:disabled { opacity: 0.4; cursor: default; }
.tbtn--primary { background: var(--vellum); color: var(--ink); border-color: var(--vellum); }
.tbtn--primary:hover:not(:disabled) { background: #fff; color: var(--ink); border-color: #fff; }
.tbtn--rouge { background: var(--rouge); border-color: var(--rouge); color: var(--vellum); }
.tbtn--rouge:hover:not(:disabled) { background: var(--rouge-lit); border-color: var(--rouge-lit); }
.tbtn--block { width: 100%; }
.tbtn--lg { height: 44px; padding: 0 18px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row--end { justify-content: flex-end; }
.row--between { justify-content: space-between; }

/* Segmented */
.seg { display: flex; border: 1px solid var(--studio-line-2); }
.seg button { flex: 1; height: 30px; color: var(--studio-muted); font-size: var(--t-micro); letter-spacing: 0.04em; padding: 0 8px; }
.seg button + button { border-left: 1px solid var(--studio-line-2); }
.seg button[aria-pressed='true'] { background: var(--studio-3); color: var(--studio-text); }

/* Sliders */
.slider { display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; align-items: center; }
.slider label { color: var(--studio-muted); font-size: var(--t-small); }
.slider output { font-family: var(--font-mono); font-size: var(--t-micro); color: var(--studio-text); min-width: 3.5ch; text-align: right; }
.slider input { grid-column: 1 / -1; }
input[type='range'] { -webkit-appearance: none; appearance: none; width: 100%; height: 22px; background: transparent; margin: 0; cursor: pointer; touch-action: pan-y; }
input[type='range']::-webkit-slider-runnable-track { height: 2px; background: linear-gradient(to right, var(--studio-text) var(--fill, 50%), var(--studio-3) var(--fill, 50%)); }
input[type='range']::-moz-range-track { height: 2px; background: var(--studio-3); }
input[type='range']::-moz-range-progress { height: 2px; background: var(--studio-text); }
input[type='range']::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%; background: var(--vellum); margin-top: -6px; border: 0; box-shadow: 0 0 0 3px var(--studio-1); transition: transform var(--d-fast); }
input[type='range']::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--vellum); border: 0; box-shadow: 0 0 0 3px var(--studio-1); }
input[type='range']:active::-webkit-slider-thumb { transform: scale(1.25); }
input[type='range']:focus-visible { box-shadow: none; outline: 1px solid var(--rouge-lit); outline-offset: 2px; }

/* Product list */
.plist { display: grid; }
.pgroup { padding: 12px 14px 4px; font-family: var(--font-mono); font-size: var(--t-micro); letter-spacing: var(--track-caps); text-transform: uppercase; color: var(--studio-faint); }
.pitem { display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 12px; padding: 9px 14px; text-align: left; color: var(--studio-text); border-left: 2px solid transparent; transition: background var(--d-fast); }
.pitem:hover { background: var(--studio-2); }
.pitem[aria-selected='true'] { background: var(--studio-2); border-left-color: var(--rouge-lit); }
.pitem__sw { width: 28px; height: 28px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(255,255,255,.1); position: relative; overflow: hidden; }
.pitem__sw::after { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 32% 28%, rgba(255,255,255,.45), transparent 42%); }
.pitem__name { font-size: var(--t-small); line-height: 1.25; }
.pitem__name small { display: block; color: var(--studio-faint); font-size: var(--t-micro); margin-top: 2px; }
.pitem__on { width: 6px; height: 6px; border-radius: 50%; background: var(--rouge-lit); }

/* Looks */
.looks-grid { display: grid; gap: 8px; padding: 14px; }
.look-card { display: grid; grid-template-columns: 1fr auto; gap: 6px; padding: 12px; border: 1px solid var(--studio-line); text-align: left; transition: border-color var(--d-fast), background var(--d-fast); }
.look-card:hover { border-color: var(--studio-line-2); background: var(--studio-2); }
.look-card b { font-family: var(--font-display); font-weight: 400; font-size: 1.15rem; }
.look-card .sw { display: flex; gap: 3px; grid-column: 1 / -1; }
.look-card .sw i { width: 14px; height: 14px; border-radius: 50%; }
.look-card small { color: var(--studio-faint); }

/* Shade picker */
.families { display: flex; gap: 4px; flex-wrap: wrap; }
.fam { height: 26px; padding: 0 10px; border-radius: var(--r-pill); border: 1px solid var(--studio-line); color: var(--studio-muted); font-size: var(--t-micro); letter-spacing: 0.02em; }
.fam:hover { color: var(--studio-text); border-color: var(--studio-line-2); }
.fam[aria-pressed='true'] { color: var(--ink); background: var(--studio-text); border-color: var(--studio-text); }
.shades { display: grid; grid-template-columns: repeat(auto-fill, minmax(30px, 1fr)); gap: 8px; }
.shade { aspect-ratio: 1; border-radius: 50%; position: relative; box-shadow: inset 0 0 0 1px rgba(255,255,255,.1); transition: transform var(--d-fast) var(--ease-out); min-width: 26px; }
.shade:hover { transform: scale(1.1); z-index: 1; }
.shade[aria-selected='true']::after { content: ''; position: absolute; inset: -4px; border-radius: 50%; border: 1.5px solid var(--studio-text); }
.shade.is-fav::before { content: ''; position: absolute; right: -2px; top: -2px; width: 7px; height: 7px; border-radius: 50%; background: var(--rouge-lit); box-shadow: 0 0 0 2px var(--studio-1); }
.shade-current { display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; }
.shade-current__chip { width: 44px; height: 44px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(255,255,255,.14); position: relative; overflow: hidden; }
.shade-current__chip::after { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 30% 26%, rgba(255,255,255,.5), transparent 40%); }
.shade-current__name { font-family: var(--font-display); font-size: 1.2rem; line-height: 1.1; }
.shade-current__hex { font-family: var(--font-mono); font-size: var(--t-micro); color: var(--studio-faint); }
.custom-colour { display: flex; align-items: center; gap: 8px; }
.custom-colour input[type='color'] { -webkit-appearance: none; appearance: none; width: 34px; height: 34px; border: 1px solid var(--studio-line-2); background: none; padding: 2px; cursor: pointer; border-radius: 50%; }
.custom-colour input[type='color']::-webkit-color-swatch-wrapper { padding: 0; }
.custom-colour input[type='color']::-webkit-color-swatch { border: 0; border-radius: 50%; }
.custom-colour input[type='text'] { width: 92px; height: 34px; background: var(--studio-0); border: 1px solid var(--studio-line-2); padding: 0 10px; font-family: var(--font-mono); font-size: var(--t-micro); text-transform: uppercase; }
.compare-row { display: flex; gap: 6px; }
.compare-row button { flex: 1; height: 26px; border-radius: 2px; position: relative; }
.compare-row button span { position: absolute; left: 6px; bottom: 3px; font-size: 10px; font-family: var(--font-mono); color: rgba(255,255,255,.85); text-shadow: 0 1px 2px rgba(0,0,0,.5); }

/* Layers */
.layers { display: grid; }
.layer { display: grid; grid-template-columns: 28px 22px 1fr auto; align-items: center; gap: 8px; padding: 7px 10px 7px 6px; border-left: 2px solid transparent; cursor: pointer; }
.layer:hover { background: var(--studio-2); }
.layer[aria-selected='true'] { background: var(--studio-2); border-left-color: var(--rouge-lit); }
.layer__sw { width: 22px; height: 22px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); }
.layer__name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--t-small); }
.layer__name small { display: block; color: var(--studio-faint); font-size: var(--t-micro); }
.layer.is-hidden .layer__name, .layer.is-hidden .layer__sw { opacity: 0.4; }
.layer__actions { display: flex; opacity: 0.6; }
.layer:hover .layer__actions, .layer[aria-selected='true'] .layer__actions { opacity: 1; }
.empty-note { padding: 14px; color: var(--studio-faint); font-size: var(--t-small); line-height: 1.5; }

/* Dropzone / empty state */
.empty { position: absolute; inset: 0; display: grid; place-items: center; padding: 24px; overflow-y: auto; }
.empty__card { width: min(560px, 100%); display: grid; gap: 22px; justify-items: center; text-align: center; }
.empty__title { font-family: var(--font-display); font-size: clamp(2rem, 1.4rem + 2.4vw, 3.25rem); line-height: 1; font-weight: 400; }
.empty__title em { color: var(--blush); }
.empty__sub { color: var(--studio-muted); max-width: 30em; }
.drop { width: 100%; border: 1px dashed var(--studio-line-2); padding: 30px 20px; display: grid; gap: 14px; justify-items: center; transition: border-color var(--d-fast), background var(--d-fast); }
.drop.is-over { border-color: var(--rouge-lit); background: rgba(183,50,63,.06); }
.drop .row { justify-content: center; }
.samples { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.sample { width: 64px; height: 64px; border-radius: 50%; overflow: hidden; border: 1px solid var(--studio-line-2); transition: transform var(--d-fast) var(--ease-out), border-color var(--d-fast); }
.sample:hover { transform: translateY(-2px); border-color: var(--studio-text); }
.sample img { width: 100%; height: 100%; object-fit: cover; }
.fineprint { font-size: var(--t-micro); color: var(--studio-faint); font-family: var(--font-mono); letter-spacing: 0.03em; line-height: 1.6; max-width: 46em; }

/* Modal */
.modal { border: 1px solid var(--studio-line-2); background: var(--studio-1); color: var(--studio-text); padding: 0; width: min(460px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); }
.modal::backdrop { background: rgba(8,7,6,.66); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.modal__body { padding: 22px; display: grid; gap: 16px; }
.modal h2 { font-family: var(--font-display); font-weight: 400; font-size: 1.7rem; }
.modal p { color: var(--studio-muted); font-size: var(--t-small); }

/* Spinner */
.spinner { width: 18px; height: 18px; border: 1.5px solid var(--studio-line-2); border-top-color: var(--studio-text); border-radius: 50%; animation: spin 800ms linear infinite; }
