@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Noto+Sans+KR:wght@400;500;600;700&display=swap');

:root {
  --bg: #f7f8f8;
  --surface: #ffffff;
  --surface-2: #f4f6f7;
  --surface-3: #e9edef;
  --line: rgba(18,24,31,.09);
  --line-strong: rgba(18,24,31,.17);
  --text: #171a1e;
  --muted: #626a72;
  --dim: #8b9299;
  --blue: #167dcc;
  --blue-strong: #0870c1;
  --blue-dim: rgba(7,148,255,.08);
  --studio-blue: #0794ff;
  --studio-green: #5cff00;
  --studio-gradient: linear-gradient(135deg,var(--studio-blue),#10bcda 48%,var(--studio-green));
  --green: #488615;
  --red: #cf5048;
  --radius: 12px;
}

* { box-sizing: border-box; }
html { background: var(--bg); color: var(--text); font-family: Inter,'Noto Sans KR',sans-serif; -webkit-font-smoothing: antialiased; scroll-padding-top: 82px; }
body { min-height: 100vh; margin: 0; background: radial-gradient(circle at 76% -18%,rgba(7,148,255,.075),transparent 36%),var(--bg); }
.visually-hidden { width: 1px !important; height: 1px !important; padding: 0 !important; position: absolute !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }
button,input { font: inherit; }
button,a { -webkit-tap-highlight-color: transparent; }
button:focus-visible,a:focus-visible,input:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.noise { position: fixed; inset: 0; pointer-events: none; opacity: .012; mix-blend-mode: multiply; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }

.topbar { height: 68px; padding: 0 max(22px,calc((100vw - 1240px)/2)); display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(18,24,31,.08); background: rgba(255,255,255,.94); backdrop-filter: blur(22px) saturate(1.2); position: sticky; top: 0; z-index: 8; }
.brand { height: 40px; display: flex; align-items: center; color: #111214; text-decoration: none; }
.brand-lockup { height: 28px; display: flex; align-items: center; gap: 8px; }
.brand-wordmark { display: inline-flex; align-items: baseline; gap: 7px; color: #111214; font-size: 24px; line-height: 1; letter-spacing: -.06em; white-space: nowrap; }
.brand-wordmark strong,.brand-wordmark b { font: inherit; }
.brand-wordmark strong { font-weight: 700; }
.brand-wordmark b { color: #4e555b; font-weight: 500; letter-spacing: -.035em; }
.brand-beta { padding: 4px 6px 3px; border: 1px solid rgba(7,148,255,.2); border-radius: 99px; background: linear-gradient(135deg,rgba(7,148,255,.1),rgba(92,255,0,.08)); color: #0870c1; font-size: 7px; font-weight: 700; line-height: 1; letter-spacing: .12em; }
.top-actions { display: flex; align-items: center; gap: 7px; }
.credit-badge { height: 30px; padding: 0 9px; display: flex; align-items: center; gap: 4px; border: 1px solid #15171a; border-radius: 99px; background: #15171a; box-shadow: 0 5px 14px rgba(0,0,0,.1); }
.credit-spark { background: var(--studio-gradient); background-clip: text; -webkit-background-clip: text; color: transparent; font-size: 11px; line-height: 1; }
.credit-badge strong { color: #fff; font-size: 10px; line-height: 1; }
.credit-badge small { color: #a8adb2; font-size: 9px; line-height: 1; }
.account-copy { min-width: 0; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; }
.account-copy strong { max-width: 84px; overflow: hidden; color: #15171a; font-size: 11px; line-height: 1.1; text-overflow: ellipsis; white-space: nowrap; }
.account-copy small { margin-top: 3px; color: #777b80; font-size: 6px; line-height: 1; letter-spacing: .12em; }
.account { height: 40px; padding: 2px 9px 2px 3px; display: flex; align-items: center; gap: 8px; border: 0; border-radius: 99px; background: transparent; color: #15171a; cursor: pointer; transition: background .16s; }
.account:hover { background: rgba(0,0,0,.055); }
.account > span:first-child { width: 34px; height: 34px; flex: 0 0 34px; display: grid; place-items: center; position: relative; border: 1px solid rgba(0,0,0,.16); border-radius: 50%; background: linear-gradient(145deg,#e9f4ff,#8dc4f3); color: #101418; font-size: 11px; font-weight: 700; box-shadow: 0 0 0 2px rgba(7,148,255,.08); }
.account > span:first-child::after { content: ''; width: 6px; height: 6px; position: absolute; right: -1px; bottom: 1px; border: 2px solid #fff; border-radius: 50%; background: #40d400; }
.account i { margin-left: 0; color: #777b80; font-size: 10px; font-style: normal; line-height: 1; }
.hidden { display: none !important; }

main { width: min(1240px,100%); margin: 0 auto; padding: 42px 22px 100px; }
.lab-index { color: var(--blue); font-size: 10px; font-weight: 700; letter-spacing: .17em; }
.lab-index::before { content: ''; width: 24px; height: 2px; display: inline-block; margin: 0 9px 3px 0; border-radius: 99px; background: var(--studio-gradient); }

.login-shell { min-height: calc(100vh - 152px); display: grid; grid-template-columns: 1.08fr .72fr; gap: 72px; align-items: center; }
.login-copy h1 { margin: 24px 0 26px; font-size: clamp(60px,8vw,112px); line-height: .92; letter-spacing: -.07em; }
.login-copy h1 em { color: var(--blue); font-style: normal; }
.login-copy p { margin: 0; color: var(--muted); font-size: 17px; line-height: 1.85; }
.login-spec { margin-top: 34px; display: flex; flex-wrap: wrap; gap: 8px; }
.login-spec span { padding: 8px 11px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); font-size: 9px; letter-spacing: .12em; }
.login-panel { padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255,255,255,.92); box-shadow: 0 28px 72px rgba(25,42,58,.09); }
.login-art { aspect-ratio: 4/4.25; margin-bottom: 18px; padding: 28px; display: flex; flex-direction: column; justify-content: flex-end; position: relative; overflow: hidden; background: linear-gradient(145deg,#edf7ff,#f5faf2 72%,#eef3f4); border: 1px solid var(--line); border-radius: 12px; }
.login-art::before { content: ''; position: absolute; width: 280px; height: 280px; right: -85px; top: -60px; border: 1px solid rgba(7,148,255,.22); border-radius: 50%; box-shadow: 0 0 0 38px rgba(7,148,255,.04),0 0 0 76px rgba(92,255,0,.025); }
.login-art span { color: var(--muted); font-size: 11px; letter-spacing: .2em; }
.login-art strong { font-size: 82px; line-height: .92; letter-spacing: -.07em; }
.login-art small { margin-top: 14px; color: var(--blue); text-transform: uppercase; letter-spacing: .15em; }
.login-panel > p { margin: 14px 0 2px; color: var(--dim); font-size: 10px; line-height: 1.7; text-align: center; }
.login-sheet-backdrop { display: contents; }
.mobile-start-panel,.mobile-hero-preview,.login-sheet-head,.sheet-close,.mobile-flow-progress,.mobile-flow-actions,.mobile-step-title,.mobile-selection-summary,.mobile-creator-head,.mobile-review-visual,.mobile-credit-receipt,.mobile-app-nav,.mobile-catalog-hint,.mobile-upload-privacy { display: none; }
.garment-errors { margin-top: 10px; padding: 10px 12px; border: 1px solid rgba(207,80,72,.22); border-radius: 10px; background: #fff4f4; color: #943b3b; font-size: 11px; line-height: 1.55; }
.garment-errors p { margin: 0; }
.garment-errors p + p { margin-top: 5px; }
.consent-copy b,.consent-copy small { display: block; }
.consent-copy b { color: var(--text); font-size: 11px; }
.consent-copy small { margin-top: 3px; color: var(--muted); font-size: 9px; line-height: 1.5; }
.consent-copy em { margin-left: 4px; color: var(--blue-strong); font-size: 8px; font-style: normal; }
.consent-progress { color: var(--dim); font-size: 9px; text-align: center; }
.login-inline-error { margin: 7px 0; padding: 10px 12px; border-radius: 9px; background: #fff1f1; color: #8d3030; font-size: 10px; line-height: 1.5; }
.login-divider { margin: 13px 0 5px; display: flex; align-items: center; gap: 10px; color: var(--dim); font-size: 10px; }
.login-divider::before,.login-divider::after { content: ''; height: 1px; flex: 1; background: var(--line); }
.login-signup-open { margin-top: 0; }
.signup-section { margin-top: 12px; padding-top: 14px; border-top: 1px solid var(--line); }
.signup-section-head small { color: var(--blue-strong); font-size: 9px; font-weight: 700; letter-spacing: .13em; }
.signup-section-head h3 { margin: 5px 0; font-size: 20px; letter-spacing: -.035em; }
.signup-section-head p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.login-consents { margin: 12px 0; display: grid; gap: 8px; }
.login-consents label { display: flex; gap: 9px; align-items: flex-start; color: var(--muted); font-size: 10px; line-height: 1.55; }
.login-consents input { width: 16px; height: 16px; margin: 0; flex: 0 0 auto; accent-color: var(--blue-strong); }
.login-consents a,.consent a { color: #111; text-underline-offset: 2px; }
.btn.disabled { opacity: .42; pointer-events: none; }

.btn { min-height: 50px; width: 100%; padding: 0 18px; border: 1px solid transparent; border-radius: 10px; display: flex; align-items: center; justify-content: center; gap: 10px; background: #171a1e; color: #fff; font-size: 13px; font-weight: 700; text-decoration: none; cursor: pointer; transition: border-color .16s,background .16s,transform .16s; }
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: .35; cursor: not-allowed; transform: none; }
.btn.kakao { background: #fee500; color: #171500; }
.btn.ghost { margin-top: 8px; border-color: var(--line-strong); background: transparent; color: var(--text); }

.pending-shell { min-height: calc(100vh - 170px); display: flex; flex-direction: column; align-items: flex-start; justify-content: center; }
.pending-shell h1 { margin: 22px 0; font-size: clamp(48px,7vw,88px); line-height: .98; letter-spacing: -.06em; }
.pending-shell > p { color: var(--muted); line-height: 1.8; }
.pending-actions { width: min(420px,100%); margin-top: 28px; }

.workspace-title { min-height: 112px; display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; margin-bottom: 24px; }
.workspace-title h2 { margin: 8px 0 5px; display: flex; align-items: center; flex-wrap: wrap; gap: 10px; font-size: clamp(37px,5vw,58px); line-height: 1.08; letter-spacing: -.055em; }
.workspace-title h2 small { padding: 6px 9px; border: 1px solid rgba(7,148,255,.16); border-radius: 99px; background: rgba(7,148,255,.075); color: #246fa7; font-size: 11px; font-weight: 600; line-height: 1; letter-spacing: .02em; white-space: nowrap; }
.workspace-title p { margin: 0; color: var(--muted); font-size: 13px; }
.one-badge { width: 106px; height: 106px; flex: 0 0 106px; display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto 1fr auto; padding: 15px; border: 1px solid var(--line-strong); background: var(--surface); }
.one-badge small,.one-badge span { grid-column: 1/-1; color: var(--dim); font-size: 8px; letter-spacing: .12em; }
.one-badge strong { grid-column: 2; font-size: 48px; line-height: 1; letter-spacing: -.06em; }

.studio-layout { display: grid; grid-template-columns: minmax(0,1.18fr) minmax(340px,.82fr); gap: 18px; align-items: start; }
.creator-panel,.history-panel { min-width: 0; border: 1px solid rgba(18,24,31,.085); border-radius: 20px; background: rgba(255,255,255,.96); box-shadow: 0 18px 50px rgba(25,42,58,.075); }
.creator-panel { padding: 26px; }
.history-panel { padding: 18px; position: sticky; top: 86px; max-height: calc(100vh - 104px); overflow-y: auto; }
.experience-tabs { margin-bottom: 28px; padding: 4px; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; border: 1px solid var(--line); border-radius: 13px; background: #eef1f3; }
.experience-tabs button { min-height: 62px; padding: 10px 14px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; border: 0; border-radius: 9px; background: transparent; color: var(--dim); cursor: pointer; }
.experience-tabs button small,.experience-tabs button b { display: block; }
.experience-tabs button small { margin-bottom: 4px; font-size: 8px; letter-spacing: .08em; }
.experience-tabs button b { font-size: 13px; }
.experience-tabs button.active { background: #fff; color: var(--text); box-shadow: 0 5px 18px rgba(25,42,58,.1),inset 0 -2px var(--studio-blue); }
.experience-tabs button:disabled { cursor: not-allowed; opacity: .62; }
.experience-tabs button.coming-soon b { display: flex; align-items: center; gap: 7px; }
.experience-tabs button.coming-soon em { padding: 3px 6px; border: 1px solid var(--line-strong); border-radius: 99px; color: var(--dim); font-size: 7px; font-style: normal; font-weight: 700; letter-spacing: .04em; }
.step-head { min-height: 36px; display: grid; grid-template-columns: 34px 1fr; gap: 13px; align-items: start; }
.step-head > span { width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 7px; color: var(--blue); font-size: 9px; font-weight: 700; }
.step-head h3 { margin: 1px 0 4px; font-size: 16px; }
.step-head p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.step-state { padding: 5px 8px; border: 1px solid var(--line); border-radius: 7px; color: var(--dim); font-size: 9px; font-weight: 600; line-height: 1; }
.section-rule { height: 1px; margin: 26px 0; background: var(--line); }

.gender-tabs { width: 100%; margin-top: 16px; padding: 3px; display: grid; grid-template-columns: 1fr 1fr; gap: 3px; border: 1px solid var(--line); border-radius: 11px; background: #f0f2f3; }
.gender-tabs button { min-height: 39px; border: 0; border-radius: 8px; background: transparent; color: var(--dim); font-size: 11px; font-weight: 600; cursor: pointer; }
.gender-tabs button.active { background: #fff; color: var(--text); box-shadow: inset 0 -2px var(--studio-blue),0 4px 14px rgba(25,42,58,.1); }
.face-grid { max-height: 640px; margin-top: 9px; padding: 2px 4px 2px 2px; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 9px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.face-card { min-width: 0; padding: 0; position: relative; overflow: hidden; border: 0; border-radius: 14px; background: var(--surface-2); color: var(--text); cursor: pointer; }
.face-card img { width: 100%; aspect-ratio: 3/4; display: block; object-fit: cover; filter: saturate(.88); transition: filter .18s,transform .18s; }
.face-card::after { content: ''; position: absolute; inset: auto 0 0; height: 28%; pointer-events: none; background: linear-gradient(transparent,rgba(10,11,13,.7)); }
.face-card span { position: absolute; left: 10px; bottom: 9px; z-index: 2; color: rgba(255,255,255,.82); font-size: 9px; line-height: 1; letter-spacing: .1em; text-align: left; }
.face-card i { width: 22px; height: 22px; position: absolute; right: 7px; top: 7px; display: none; place-items: center; border-radius: 50%; background: var(--blue); color: #101418; font-size: 10px; font-style: normal; font-weight: 700; }
.face-card:hover img { filter: saturate(1); transform: scale(1.015); }
.face-card.selected { box-shadow: 0 0 0 2px var(--studio-blue),0 10px 26px rgba(7,148,255,.16); }
.face-card.selected i { display: grid; }
.empty-faces { grid-column: 1/-1; min-height: 150px; padding: 20px; display: grid; place-items: center; border: 1px dashed var(--line-strong); border-radius: 10px; color: var(--dim); font-size: 10px; text-align: center; }
.face-card.selected span { color: #d6eeff; }

.garment-drop { min-height: 148px; margin-top: 17px; display: grid; place-items: center; border: 1px dashed #bdc7cf; border-radius: 12px; background: #f9fafb; text-align: center; cursor: pointer; transition: .16s; }
.garment-drop:hover,.garment-drop.over { border-color: var(--blue); background: var(--blue-dim); }
.garment-drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.garment-drop strong,.garment-drop small { display: block; }
.garment-drop strong { margin: 7px 0 4px; font-size: 13px; }
.garment-drop small { color: var(--dim); font-size: 10px; }
.upload-symbol { width: 34px; height: 34px; margin: auto; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 9px; color: var(--blue); font-size: 20px; }
.garment-list { margin-top: 9px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.garment-list-head { grid-column: 1/-1; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.garment-list-head strong { font-size: 10px; }
.garment-list-head span { color: var(--dim); font-size: 8px; }
.garment-item { min-width: 0; padding: 7px; display: grid; grid-template-columns: 54px 1fr auto; align-items: center; gap: 9px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.garment-item img { width: 54px; height: 68px; object-fit: cover; background: var(--surface-3); }
.garment-item b,.garment-item small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.garment-item b { font-size: 10px; }
.garment-item small { margin-top: 4px; color: var(--dim); font-size: 9px; }
.garment-item-copy em { margin-top: 4px; display: block; color: var(--green); font-size: 8px; font-style: normal; }
.garment-item-actions { display: flex; gap: 4px; }
.garment-item .garment-item-actions button { min-width: 42px; height: 30px; padding: 0 6px; border: 1px solid var(--line); border-radius: 7px; background: transparent; color: var(--muted); font-size: 8px; cursor: pointer; }
.garment-focus { margin-top: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 11px; background: #f8fafb; }
.garment-focus > span { display: block; color: var(--muted); font-size: 8px; font-weight: 700; letter-spacing: .08em; }
.garment-focus > div { margin-top: 8px; display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 5px; }
.garment-focus button { min-height: 34px; padding: 0 5px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--dim); font-size: 8px; cursor: pointer; }
.garment-focus button.active { border-color: rgba(7,148,255,.42); background: var(--blue-dim); color: var(--blue-strong); font-weight: 700; }
.garment-focus > small { margin-top: 8px; display: block; color: var(--dim); font-size: 8px; line-height: 1.5; }
.source-tabs { margin-top: 16px; display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--line); }
.source-tabs button { min-height: 42px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--dim); font-size: 11px; font-weight: 600; cursor: pointer; }
.source-tabs button.active { border-bottom-color: var(--blue); color: var(--text); }
.upload-guide-row { margin-top: 13px; display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--dim); font-size: 9px; }
.upload-guide-row button { flex: 0 0 auto; padding: 6px 8px; border: 1px solid var(--line); border-radius: 7px; background: #fff; color: var(--blue-strong); font-size: 9px; cursor: pointer; }
.sample-grid { margin-top: 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.sample-card { min-width: 0; padding: 0; position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: 11px; background: #fff; color: var(--text); text-align: left; cursor: pointer; }
.sample-card img { width: 100%; aspect-ratio: 4/3; display: block; object-fit: cover; background: var(--surface-3); }
.sample-card > span { min-width: 0; padding: 10px; display: block; }
.sample-card b,.sample-card small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sample-card b { font-size: 10px; }
.sample-card small { margin-top: 4px; color: var(--dim); font-size: 8px; }
.sample-card i,.scene-card i { width: 20px; height: 20px; position: absolute; right: 7px; top: 7px; display: none; place-items: center; border-radius: 50%; background: var(--blue); color: #101418; font-size: 9px; font-style: normal; font-weight: 700; }
.sample-card.selected,.scene-card.selected { border-color: var(--blue); box-shadow: 0 0 0 1px var(--blue),0 8px 22px rgba(7,148,255,.12); }
.sample-card.selected i,.scene-card.selected i { display: grid; }
.sample-empty { grid-column: 1/-1; padding: 34px 16px; border: 1px dashed var(--line-strong); border-radius: 11px; color: var(--dim); font-size: 10px; text-align: center; }
.scene-grid { margin-top: 14px; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
.scene-card { min-width: 0; min-height: 78px; padding: 0; position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: 11px; background: #fff; color: var(--text); text-align: left; cursor: pointer; }
.scene-card:not(:has(img)) { padding: 14px 40px 14px 14px; }
.scene-card img { width: 100%; aspect-ratio: 4/5; display: block; object-fit: cover; object-position: center; background: var(--surface-3); }
.scene-card .scene-copy { min-width: 0; padding: 10px; display: block; }
.scene-card:not(:has(img)) .scene-copy { padding: 0; }
.scene-card b,.scene-card small { display: block; }
.scene-card em { margin-bottom: 5px; display: block; color: var(--blue-strong); font-size: 7px; font-style: normal; font-weight: 800; letter-spacing: .12em; }
.scene-card b { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.scene-card small { min-height: 2.9em; margin-top: 4px; color: var(--dim); font-size: 8px; line-height: 1.45; }
.guide-modal { z-index: 40; }
.guide-card { max-width: 470px; }
.guide-card h3 { margin: 11px 0 20px; font-size: 24px; }
.guide-points { display: grid; gap: 8px; }
.guide-points > div { padding: 12px; display: grid; grid-template-columns: 32px 1fr; gap: 10px; align-items: start; border: 1px solid var(--line); border-radius: 10px; }
.guide-points > div > b { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 7px; background: var(--blue-dim); color: var(--blue-strong); font-size: 8px; }
.guide-points strong,.guide-points small { display: block; }
.guide-points strong { font-size: 11px; }
.guide-points small { margin-top: 4px; color: var(--dim); font-size: 9px; line-height: 1.5; }
.guide-warning { margin: 12px 0; padding: 11px; border-radius: 9px; background: #f4f6f7; color: var(--muted); font-size: 9px; line-height: 1.55; }
.guide-dismiss { margin: 13px 0; display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 10px; }
.guide-dismiss input { width: 16px; height: 16px; accent-color: var(--blue-strong); }
.consent { margin: 18px 0; display: flex; gap: 10px; align-items: flex-start; color: var(--muted); font-size: 10px; line-height: 1.65; }
.consent input { width: 16px; height: 16px; margin: 0; flex: 0 0 auto; accent-color: var(--blue-strong); }
.consent-all { margin-bottom: 8px; padding: 11px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-2); color: var(--text); }
.ai-notice { margin-top: 18px; padding: 12px; display: grid; gap: 5px; border: 1px solid rgba(7,148,255,.22); border-radius: 9px; background: rgba(7,148,255,.045); }
.ai-notice strong { color: #101418; font-size: 10px; letter-spacing: .08em; }
.ai-notice span { color: var(--muted); font-size: 10px; line-height: 1.6; }
.ai-result-label { position: absolute; left: 12px; bottom: 11px; z-index: 2; color: #fff; font-size: 9px; font-weight: 700; letter-spacing: .08em; text-shadow: 0 1px 3px rgba(0,0,0,.9),0 0 8px rgba(0,0,0,.5); }
.ai-result-caption { margin: 8px 0 0; color: var(--dim); font-size: 8px; line-height: 1.5; text-align: center; }
.ai-tile-label { position: absolute; left: 5px; bottom: 5px; padding: 2px 4px; border-radius: 3px; background: rgba(10,14,18,.76); color: #fff; font-size: 6px; font-weight: 800; }
.text-action.danger { color: var(--red); }

.site-footer { max-width: 1440px; margin: 56px auto 0; padding: 28px 34px max(32px,env(safe-area-inset-bottom)); border-top: 1px solid var(--line); color: var(--dim); font-size: 9px; line-height: 1.75; }
.site-footer nav { margin-bottom: 12px; display: flex; flex-wrap: wrap; gap: 8px 16px; }
.site-footer a { color: #34383d; text-underline-offset: 3px; }
.site-footer p { margin: 2px 0; }
.site-footer strong { color: #22262a; }
.agreement-shell { max-width: 660px; margin: 60px auto; }
.generate { min-height: 58px; justify-content: space-between; border: 0; background: linear-gradient(105deg,#93c9f4 0%,#6fc7e4 55%,#a7e982 100%); color: #0d1418; font-size: 14px; box-shadow: 0 14px 34px rgba(7,148,255,.12); }
.generate small { font-size: 9px; letter-spacing: .08em; }

.credit-card { min-height: 108px; padding: 18px; display: flex; justify-content: space-between; align-items: end; background: var(--blue); color: #101418; }
.credit-card small,.credit-card span { display: block; }
.credit-card small { margin-bottom: 21px; font-size: 8px; font-weight: 700; letter-spacing: .15em; }
.credit-card span { font-size: 12px; }
.credit-card strong { font-size: 58px; line-height: .85; letter-spacing: -.07em; }
.history-head { padding: 22px 2px 13px; display: flex; align-items: end; justify-content: space-between; gap: 12px; }
.history-head span { color: var(--blue); font-size: 8px; letter-spacing: .15em; }
.history-head h3 { margin: 3px 0 0; font-size: 16px; }
.history-head p { display: none; }
.history-head > small { max-width: 160px; color: var(--dim); font-size: 9px; line-height: 1.5; text-align: right; }
.mobile-only { display: none; }
.mobile-edit-button { min-height: 44px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 9px; background: #fff; color: var(--blue-strong); font-size: 10px; font-weight: 700; cursor: pointer; }
.result-browser { min-width: 0; }
.result-viewer { margin-bottom: 9px; scroll-margin-top: 82px; }
.viewer-image { position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-3); }
.viewer-image[role='button'] { cursor: zoom-in; }
.viewer-image > img { width: 100%; aspect-ratio: 4/5; display: block; object-fit: cover; }
.viewer-image::after { content: ''; position: absolute; inset: auto 0 0; height: 26%; pointer-events: none; background: linear-gradient(transparent,rgba(0,0,0,.46)); }
.viewer-actions { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.viewer-action { width: 44px; height: 44px; padding: 0; position: absolute; right: 5px; display: grid; place-items: center; border: 0; background: transparent; color: white; text-decoration: none; cursor: pointer; pointer-events: auto; }
.viewer-action::before { content: ''; position: absolute; inset: 5px; border: 1px solid rgba(255,255,255,.3); border-radius: 50%; background: rgba(12,13,15,.7); backdrop-filter: blur(10px); box-shadow: 0 5px 16px rgba(0,0,0,.2); transition: transform .16s ease,background .16s ease; }
.viewer-favorite { top: 5px; }
.viewer-download { bottom: 5px; }
.viewer-action:hover::before { transform: translateY(-1px); background: rgba(12,13,15,.88); }
.viewer-action:focus-visible { outline: 3px solid rgba(255,255,255,.92); outline-offset: 2px; }
.viewer-action svg { width: 17px; height: 17px; position: relative; z-index: 1; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.viewer-favorite.loved { color: #e84562; }
.viewer-favorite.loved::before { background: rgba(255,255,255,.94); }
.viewer-favorite.loved svg { fill: currentColor; }
.download-menu { width: min(224px,calc(100% - 20px)); padding: 13px; position: absolute; right: 10px; bottom: 54px; z-index: 3; border: 1px solid rgba(18,24,31,.12); border-radius: 14px; background: rgba(255,255,255,.97); color: var(--text); box-shadow: 0 16px 42px rgba(10,16,22,.22); backdrop-filter: blur(16px); }
.download-menu[hidden] { display: none; }
.download-menu > strong { display: block; font-size: 13px; }
.download-menu > p { margin: 4px 0 10px; color: var(--muted); font-size: 10px; line-height: 1.4; }
.download-menu > button,.download-menu > a { width: 100%; min-height: 48px; padding: 8px 10px; display: flex; align-items: center; justify-content: space-between; gap: 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--text); text-align: left; text-decoration: none; cursor: pointer; }
.download-menu > button { border-color: #171a1e; background: #171a1e; color: #fff; }
.download-menu > * + * { margin-top: 7px; }
.download-menu span,.download-menu b { font-size: 10px; }
.download-menu span { opacity: .72; }
.download-menu b { font-weight: 700; }
.result-complete-status { margin-bottom: 10px; padding: 12px 13px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-radius: 11px; background: #eef8f2; }
.result-complete-status strong { font-size: 12px; }
.result-complete-status span { color: #42705a; font-size: 9px; }
.result-retention { margin: 10px 2px 0; color: var(--dim); font-size: 10px; line-height: 1.5; text-align: center; }
.empty-viewer { min-height: 210px; padding: 20px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 12px; color: var(--dim); font-size: 10px; text-align: center; }
.generation-state { min-height: 260px; padding: 28px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); text-align: center; }
.generation-preview { width: 110px; aspect-ratio: 4/5; position: relative; isolation: isolate; display: grid; place-items: center; overflow: hidden; border-radius: 18px; background: radial-gradient(circle at 50% 38%,rgba(255,255,255,.3),transparent 38%),linear-gradient(145deg,#86cdf4 0%,#7599e8 48%,#a9ddaa 100%); box-shadow: inset 0 0 0 1px rgba(255,255,255,.4),0 14px 34px rgba(46,104,164,.18); }
.generation-preview::before { content: ''; width: 44%; height: 150%; position: absolute; left: -70%; top: -25%; z-index: 2; transform: rotate(14deg); background: linear-gradient(90deg,transparent,rgba(255,255,255,.62),transparent); animation: generation-scan 2.6s ease-in-out infinite; }
.generation-preview::after { content: ''; width: 66%; height: 14px; position: absolute; left: 17%; bottom: 10px; border-radius: 50%; background: rgba(23,55,86,.17); filter: blur(6px); animation: generation-shadow 2.4s ease-in-out infinite; }
.generation-garment { width: 66%; position: relative; z-index: 1; overflow: visible; color: #fff; filter: drop-shadow(0 8px 12px rgba(26,63,99,.22)); animation: generation-float 2.4s ease-in-out infinite; }
.generation-garment path { fill: rgba(255,255,255,.12); stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 280; animation: generation-draw 3.8s ease-in-out infinite; }
.generation-orbit { position: absolute; inset: 9px; z-index: 3; border: 1px solid rgba(255,255,255,.27); border-radius: 14px; animation: generation-pulse 2.4s ease-in-out infinite; }
.generation-orbit i { width: 5px; height: 5px; position: absolute; border-radius: 50%; background: #fff; box-shadow: 0 0 9px rgba(255,255,255,.9); }
.generation-orbit i:nth-child(1) { left: 10%; top: 18%; animation: generation-dot 2s ease-in-out infinite; }
.generation-orbit i:nth-child(2) { right: 8%; top: 42%; animation: generation-dot 2s .55s ease-in-out infinite; }
.generation-orbit i:nth-child(3) { left: 22%; bottom: 11%; animation: generation-dot 2s 1.1s ease-in-out infinite; }
.generation-moments { width: min(290px,100%); height: 18px; position: relative; overflow: hidden; color: #42718f; font-size: 11px; font-weight: 700; }
.generation-moments span { width: 100%; position: absolute; inset: 0; opacity: 0; transform: translateY(7px); animation: generation-copy 7.2s ease-in-out infinite; }
.generation-moments span:nth-child(2) { animation-delay: 2.4s; }
.generation-moments span:nth-child(3) { animation-delay: 4.8s; }
.generation-state strong { font-size: 17px; }
.generation-state p { max-width: 330px; margin: 0; color: var(--muted); font-size: 10px; line-height: 1.65; }
.generation-state > b { color: var(--green); font-size: 10px; }
.generation-state .generation-new { margin-top: 4px; border-color: #171a1e; background: #171a1e; color: #fff; }
.generation-state .connection-status { width: 100%; margin-top: 2px; padding: 10px 12px; border-radius: 10px; background: #fff4d8; color: #745817; font-size: 12px; line-height: 1.5; }
.generation-state .btn { max-width: 280px; }
.generation-state.failed { border-color: rgba(194,65,65,.25); background: #fff8f8; }
.failure-mark { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: #9c2f2f; color: #fff; font-size: 17px; font-weight: 800; }
.image-load-error { min-height: 360px; padding: 24px; display: grid; place-items: center; gap: 12px; text-align: center; }
.image-load-error .btn { max-width: 260px; }
.result-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 3px; }
.result-cell { min-width: 0; aspect-ratio: 1; position: relative; overflow: hidden; border-radius: 7px; background: var(--surface-3); }
.result-tile { width: 100%; height: 100%; min-width: 0; padding: 0; position: relative; overflow: hidden; border: 0; border-radius: inherit; background: transparent; cursor: pointer; }
.result-tile img { width: 100%; height: 100%; display: block; object-fit: cover; }
.result-tile.selected::after { content: ''; position: absolute; inset: 0; border: 2px solid var(--blue); pointer-events: none; }
.result-tile i { position: absolute; left: 6px; top: 5px; display: none; color: white; font-size: 13px; font-style: normal; text-shadow: 0 2px 5px rgba(0,0,0,.7); }
.result-tile i.show { display: block; }
.result-tile-delete { width: 30px; height: 30px; padding: 0; position: absolute; right: 4px; top: 4px; z-index: 2; border: 1px solid rgba(255,255,255,.45); border-radius: 50%; background: rgba(12,15,18,.7); color: #fff; font-size: 20px; font-weight: 400; line-height: 1; cursor: pointer; backdrop-filter: blur(8px); }
.result-tile-delete:focus-visible { outline-color: #fff; outline-offset: 1px; }
.result-tile.processing { display: grid; place-items: center; color: var(--dim); cursor: default; }
.result-tile.processing .spinner { border-color: var(--line-strong); border-top-color: var(--blue); }
.result-tile.processing small { position: absolute; bottom: 9px; font-size: 8px; }
.result-tile.failed { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; border: 1px solid rgba(156,47,47,.22); background: #fff4f4; color: #7d2929; }
.result-tile.failed small { font-size: 8px; line-height: 1.45; }
.result-tile.failed .failure-mark { width: 24px; height: 24px; font-size: 13px; }
.result-grid > .empty-jobs { grid-column: 1/-1; }
.jobs { display: grid; gap: 9px; }
.empty-jobs { padding: 52px 18px; border: 1px solid var(--line); border-radius: 12px; color: var(--dim); font-size: 11px; text-align: center; }
.job-card { border: 1px solid var(--line); border-radius: 11px; background: var(--surface-2); }
.job-line { padding: 10px; display: grid; grid-template-columns: 44px 1fr auto; gap: 10px; align-items: center; }
.job-thumb { width: 44px; height: 54px; display: grid; place-items: center; overflow: hidden; background: var(--surface-3); }
.job-thumb img { width: 100%; height: 100%; object-fit: cover; }
.job-thumb span { width: 13px; height: 13px; border: 2px solid var(--line-strong); border-top-color: var(--blue); border-radius: 50%; animation: spin .8s linear infinite; }
.job-line b,.job-line small { display: block; }
.job-line b { font-size: 10px; }
.job-line small { margin-top: 4px; color: var(--dim); font-size: 8px; }
.job-status { padding: 5px 7px; border: 1px solid var(--line); border-radius: 7px; color: var(--muted); font-size: 8px; font-style: normal; }
.job-status.completed { border-color: rgba(185,244,107,.35); color: var(--green); }
.job-status.failed { color: var(--red); }
.job-result { padding: 0 10px 12px; }
.job-result > img { width: 100%; display: block; border: 1px solid var(--line); background: var(--surface-3); }
.job-actions { margin-top: 9px; display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.job-actions .btn { min-height: 43px; font-size: 10px; }
.job-actions .text-action { grid-column: 1/-1; }
.text-action { min-height: 36px; border: 0; background: transparent; color: var(--dim); font-size: 9px; text-decoration: underline; cursor: pointer; }
.rating { margin-top: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); text-align: center; }
.rating > span { display: block; margin-bottom: 8px; color: var(--muted); font-size: 9px; }
.rating > div { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.rating button { min-height: 36px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); color: var(--text); font-size: 9px; cursor: pointer; }

.toast { max-width: calc(100vw - 32px); position: fixed; left: 50%; bottom: 22px; z-index: 20; padding: 12px 16px; border: 1px solid rgba(255,255,255,.14); border-radius: 10px; background: #171a1e; color: #fff; font-size: 11px; opacity: 0; transform: translate(-50%,16px); pointer-events: none; transition: .2s; box-shadow: 0 12px 35px rgba(21,33,44,.22); }
.toast.show { opacity: 1; transform: translate(-50%,0); }
.spinner { width: 16px; height: 16px; border: 2px solid rgba(0,0,0,.2); border-top-color: #111; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.modal { position: fixed; inset: 0; z-index: 19; padding: 18px; display: grid; place-items: center; background: rgba(18,24,31,.42); backdrop-filter: blur(8px); }
.fit-lightbox { position: fixed; inset: 0; z-index: 80; display: grid; grid-template-columns: 62px minmax(0,1fr) 62px; grid-template-rows: auto minmax(0,1fr) auto; align-items: center; background: rgba(5,7,9,.98); color: #fff; touch-action: none; }
.fit-lightbox > header { min-height: 64px; padding: max(10px,env(safe-area-inset-top)) max(14px,env(safe-area-inset-right)) 8px max(14px,env(safe-area-inset-left)); grid-column: 1/-1; display: flex; align-items: center; justify-content: space-between; }
.fit-lightbox > header strong { font-size: 12px; letter-spacing: .08em; }
.fit-lightbox-actions { display: flex; align-items: center; gap: 8px; }
.fit-lightbox > header button,.fit-lightbox-nav { width: 46px; height: 46px; padding: 0; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.18); border-radius: 50%; background: rgba(255,255,255,.1); color: #fff; font-size: 30px; line-height: 1; cursor: pointer; backdrop-filter: blur(12px); }
.fit-lightbox [data-lightbox-favorite] svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.fit-lightbox [data-lightbox-favorite].loved { border-color: rgba(255,112,137,.48); background: rgba(232,69,98,.2); color: #ff7089; }
.fit-lightbox [data-lightbox-favorite].loved svg { fill: currentColor; }
.fit-lightbox [data-lightbox-favorite]:disabled { opacity: .55; cursor: wait; }
.fit-lightbox-stage { width: 100%; height: 100%; min-height: 0; margin: 0; position: relative; display: grid; place-items: center; overflow: hidden; touch-action: pan-y; }
.fit-lightbox-stage img { width: 100%; height: 100%; display: block; object-fit: contain; opacity: .7; transform: scale(.985); transition: opacity .2s,transform .2s; user-select: none; -webkit-user-drag: none; }
.fit-lightbox-stage img.arriving { opacity: 1; transform: scale(1); }
.fit-lightbox-stage span { position: absolute; left: 12px; bottom: 10px; color: #fff; font-size: 10px; font-weight: 700; letter-spacing: .08em; text-shadow: 0 1px 3px #000,0 0 8px rgba(0,0,0,.65); pointer-events: none; }
.fit-lightbox-nav { margin: 0 8px; justify-self: center; }
.fit-lightbox > p { margin: 0; padding: 10px 12px max(12px,env(safe-area-inset-bottom)); grid-column: 1/-1; color: rgba(255,255,255,.62); font-size: 10px; text-align: center; }
.modal-card { width: min(400px,100%); padding: 24px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: 0 28px 70px rgba(18,24,31,.18); }
.modal-card h3 { margin: 18px 0 8px; font-size: 25px; }
.modal-card p { margin: 0 0 18px; color: var(--muted); font-size: 11px; }
.modal-card .btn { margin-top: 7px; }
.account-modal-card { position: relative; display: flex; flex-direction: column; }
.account-modal-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.account-sheet-brand { display: flex; align-items: center; gap: 7px; }
.account-sheet-brand .brand-wordmark { font-size: 20px; }
.account-profile { margin-top: 26px; display: grid; grid-template-columns: 52px minmax(0,1fr); align-items: center; gap: 13px; }
.account-profile-avatar { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 50%; background: linear-gradient(145deg,#e8f5ff,#8dc4f3); color: #101418; font-size: 17px; font-weight: 700; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
.account-profile small { color: var(--blue-strong); font-size: 8px; font-weight: 700; letter-spacing: .14em; }
.account-profile h3 { margin: 4px 0 0; font-size: 23px; }
.account-profile p { margin: 5px 0 0; color: var(--muted); font-size: 10px; }
.account-modal-links { margin-top: 24px; display: grid; gap: 8px; }
.account-modal-links .btn { justify-content: space-between; text-align: left; }
.account-modal-links .btn > b { font-size: 21px; font-weight: 400; line-height: 1; }
.account-modal-actions { margin-top: 18px; display: flex; align-items: center; gap: 12px; }
.account-modal-card .text-action { min-height: 42px; }
.confirm-actions { display: grid; gap: 2px; }
.btn.danger-fill { background: #9c2f2f; color: #fff; }
.back-link { color: var(--blue); font-size: 11px; text-decoration: none; }

.admin-grid { display: grid; grid-template-columns: repeat(6,1fr); gap: 9px; margin: 18px 0; }
.metric { padding: 18px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); }
.metric small,.metric strong { display: block; }
.metric small { color: var(--muted); font-size: 9px; }
.metric strong { margin-top: 7px; font-size: 32px; }
.user-table-head { margin: 24px 2px 10px; display: flex; align-items: end; justify-content: space-between; gap: 16px; }
.user-table-head span { color: var(--blue-strong); font-size: 8px; font-weight: 700; letter-spacing: .16em; }
.user-table-head h3 { margin: 5px 0 3px; font-size: 22px; letter-spacing: -.035em; }
.user-table-head p { margin: 0; color: var(--dim); font-size: 9px; }
.user-table-head > strong { padding: 8px 11px; border-radius: 99px; background: #171a1e; color: #fff; font-size: 10px; white-space: nowrap; }
.user-table { overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.user-row { padding: 13px 15px; display: grid; grid-template-columns: 1.4fr .6fr .65fr 1.25fr; gap: 12px; align-items: center; border-bottom: 1px solid var(--line); font-size: 10px; }
.user-row:last-child { border-bottom: 0; }
.user-row b,.user-row small { display: block; }
.user-row small { margin-top: 3px; color: var(--dim); }
.user-row.current-user { background: rgba(7,148,255,.045); }
.user-name-line { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; }
.user-role { padding: 4px 7px; border-radius: 99px; font-size: 9px; font-style: normal; font-weight: 700; line-height: 1; }
.user-role.admin { background: #171a1e; color: #fff; }
.user-role.current { background: #e8f5ff; color: #126aa8; }
.user-controls { display: grid; justify-items: end; gap: 7px; }
.mini-actions { display: grid; grid-template-columns: 76px 48px 48px; justify-content: end; gap: 5px; }
.credit-input { width: 76px; min-height: 36px; padding: 0 9px; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; color: var(--text); font-size: 10px; text-align: right; }
.mini-btn { min-width: 38px; min-height: 32px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); color: var(--text); font-size: 9px; cursor: pointer; }
.credit-apply { border-color: rgba(7,148,255,.32); color: var(--blue); }
.history-btn { min-width: 182px; padding: 0 10px; display: flex; justify-content: space-between; align-items: center; border-color: rgba(7,148,255,.25); background: rgba(7,148,255,.055); color: #236d9f; }
.history-btn b { min-width: 20px; height: 20px; padding: 0 6px; display: grid; place-items: center; border-radius: 99px; background: #fff; color: var(--text); font-size: 9px; box-shadow: 0 1px 4px rgba(18,24,31,.08); }

.admin-face-panel { margin-top: 18px; padding: 20px; border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: 0 18px 46px rgba(25,42,58,.055); }
.admin-face-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.admin-face-head span { color: var(--blue-strong); font-size: 8px; font-weight: 700; letter-spacing: .16em; }
.admin-face-head h3 { margin: 6px 0 5px; font-size: 24px; letter-spacing: -.035em; }
.admin-face-head p { margin: 0; color: var(--dim); font-size: 9px; }
.admin-face-head > strong { padding: 8px 11px; border: 1px solid var(--line); border-radius: 99px; color: var(--muted); font-size: 9px; white-space: nowrap; }
.face-upload-form { margin-top: 18px; padding: 12px; display: grid; grid-template-columns: 1fr 110px 1.4fr 1fr 120px; gap: 8px; align-items: end; border: 1px solid var(--line); border-radius: 12px; background: #f8fafb; }
.face-upload-form label > span { margin-bottom: 6px; display: block; color: var(--muted); font-size: 8px; font-weight: 600; }
.face-upload-form input[type='text'],.face-upload-form input:not([type]),.face-upload-form input[name='name'],.face-upload-form select,.face-upload-form input[type='file'] { width: 100%; min-height: 40px; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; color: var(--text); font-size: 9px; }
.face-upload-form input[name='name'],.face-upload-form select { padding: 0 10px; }
.face-upload-form input[type='file'] { padding: 8px; }
.face-active-field { min-height: 40px; padding: 0 10px; display: flex; align-items: center; gap: 7px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.face-active-field > span { margin: 0 !important; font-size: 8px !important; line-height: 1.35; }
.face-upload-form > button { min-height: 40px; border: 0; border-radius: 8px; background: #171a1e; color: #fff; font-size: 9px; font-weight: 700; cursor: pointer; }
.face-upload-form > button:disabled { opacity: .5; }
.admin-face-tools { margin: 14px 0 10px; display: grid; grid-template-columns: 1fr 140px 140px; gap: 7px; }
.admin-face-tools input,.admin-face-tools select { min-height: 38px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--text); font-size: 9px; }
.admin-face-loading { min-height: 180px; display: grid; place-items: center; color: var(--dim); font-size: 10px; }
.admin-face-grid { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 8px; }
.admin-face-card { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 11px; background: #fff; }
.admin-face-card.active { border-color: rgba(7,148,255,.38); box-shadow: 0 0 0 2px var(--blue-dim); }
.admin-face-preview { width: 100%; padding: 0; display: block; overflow: hidden; border: 0; background: var(--surface-3); cursor: zoom-in; }
.admin-face-preview img { width: 100%; aspect-ratio: 4/5; display: block; object-fit: cover; }
.admin-face-copy { padding: 9px 9px 7px; }
.admin-face-copy b { display: block; overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.admin-face-copy small { margin-top: 4px; display: block; overflow: hidden; color: var(--dim); font-size: 7px; text-overflow: ellipsis; white-space: nowrap; }
.admin-face-actions { padding: 0 7px 7px; display: grid; grid-template-columns: 1fr auto; gap: 4px; }
.admin-face-actions button { min-height: 31px; padding: 0 7px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-2); color: var(--muted); font-size: 7px; cursor: pointer; }
.admin-face-actions .face-visibility.on { border-color: rgba(7,148,255,.25); background: var(--blue-dim); color: var(--blue-strong); }
.admin-face-actions .face-delete { color: var(--red); }
.admin-face-preview-modal { z-index: 32; }
.admin-face-preview-modal > section { width: min(620px,100%); max-height: calc(100vh - 36px); padding: 14px; overflow-y: auto; border: 1px solid rgba(255,255,255,.7); border-radius: 18px; background: #fff; box-shadow: 0 32px 90px rgba(18,24,31,.3); }
.admin-face-preview-modal header { padding: 2px 2px 12px; display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.admin-face-preview-modal header span { color: var(--blue-strong); font-size: 8px; font-weight: 700; letter-spacing: .15em; }
.admin-face-preview-modal h3 { margin: 5px 0 0; font-size: 22px; }
.admin-face-preview-modal > section > img { width: 100%; max-height: calc(100vh - 130px); display: block; border-radius: 11px; background: var(--surface-3); object-fit: contain; }

.admin-history-modal { padding: 22px; }
.admin-history-card { width: min(1080px,100%); max-height: calc(100vh - 44px); padding: 24px; overflow-y: auto; border: 1px solid var(--line); border-radius: 20px; background: #fff; box-shadow: 0 32px 90px rgba(18,24,31,.2); }
.admin-history-head { padding-bottom: 18px; display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); }
.admin-history-head span { color: var(--blue); font-size: 8px; font-weight: 700; letter-spacing: .16em; }
.admin-history-head h3 { margin: 6px 0 4px; font-size: 28px; letter-spacing: -.04em; }
.admin-history-head p { margin: 0; color: var(--dim); font-size: 10px; }
.modal-close { width: 40px; height: 40px; flex: 0 0 40px; border: 1px solid var(--line); border-radius: 50%; background: var(--surface-2); color: var(--text); font-size: 22px; line-height: 1; cursor: pointer; }
.admin-history-loading { min-height: 240px; display: grid; place-items: center; color: var(--dim); font-size: 11px; }
.admin-history-summary { min-height: 66px; display: flex; align-items: center; gap: 8px; }
.admin-history-summary span { padding: 8px 11px; border: 1px solid var(--line); border-radius: 99px; color: var(--muted); font-size: 9px; }
.admin-history-summary span b { margin-right: 3px; color: var(--text); font-size: 12px; }
.admin-history-summary > small { margin-left: auto; color: var(--dim); font-size: 9px; }
.admin-history-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.admin-job-card { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: 0 10px 28px rgba(25,42,58,.055); }
.admin-stage-label { min-height: 38px; padding: 0 12px; display: flex; align-items: center; justify-content: space-between; gap: 8px; border-bottom: 1px solid var(--line); background: #fafbfb; }
.admin-stage-label span { color: var(--blue-strong); font-size: 8px; font-weight: 700; letter-spacing: .13em; }
.admin-stage-label small { color: var(--dim); font-size: 8px; }
.admin-job-image { width: 100%; padding: 0; display: block; overflow: hidden; border: 0; background: var(--surface-3); cursor: zoom-in; }
.admin-job-image img { width: 100%; aspect-ratio: 4/5; display: block; object-fit: cover; transition: transform .18s; }
.admin-job-image:hover img { transform: scale(1.012); }
.admin-job-placeholder { aspect-ratio: 4/5; padding: 20px; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 7px; background: var(--surface-2); color: var(--dim); text-align: center; }
.admin-job-placeholder strong { color: var(--muted); font-size: 14px; }
.admin-job-placeholder small { max-width: 210px; font-size: 9px; line-height: 1.5; }
.admin-input-section { border-top: 1px solid var(--line); background: #f8fafb; }
.admin-input-section .admin-stage-label { border-bottom: 0; background: transparent; }
.admin-input-grid { padding: 0 10px 11px; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 6px; }
.admin-input-thumb { min-width: 0; padding: 0; position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--text); font: inherit; text-align: left; text-decoration: none; cursor: zoom-in; }
.admin-input-thumb img { width: 100%; aspect-ratio: 1; display: block; object-fit: cover; }
.admin-input-thumb span { min-height: 25px; padding: 5px 6px; display: grid; place-items: center start; overflow: hidden; color: var(--muted); font-size: 7px; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.admin-input-thumb.type-user_upload { box-shadow: inset 0 -2px #171a1e; }
.admin-input-thumb.type-normalized { box-shadow: inset 0 -2px var(--studio-blue); }
.admin-input-thumb.type-face { box-shadow: inset 0 -2px #58ad26; }
.admin-input-thumb[class*='type-derived'] { box-shadow: inset 0 -2px #9a66d8; }
.admin-input-thumb.unavailable { aspect-ratio: 1; padding: 8px; display: flex; flex-direction: column; justify-content: center; align-items: center; color: var(--dim); text-align: center; }
.admin-input-thumb.unavailable b { font-size: 8px; }
.admin-input-thumb.unavailable span { min-height: auto; padding: 4px 0 0; display: block; color: var(--dim); white-space: normal; }
.admin-no-input { grid-column: 1/-1; padding: 22px 10px; border: 1px dashed var(--line-strong); border-radius: 8px; color: var(--dim); font-size: 8px; text-align: center; }
.admin-job-meta { padding: 12px; }
.admin-job-meta > div:first-child { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.admin-job-meta time { color: var(--dim); font-size: 8px; }
.admin-status { padding: 5px 7px; border-radius: 99px; background: var(--surface-2); color: var(--muted); font-size: 8px; font-weight: 700; }
.admin-status.status-completed { background: rgba(79,141,22,.09); color: var(--green); }
.admin-status.status-failed { background: rgba(207,80,72,.08); color: var(--red); }
.admin-job-meta > small { margin: 9px 0 8px; display: block; color: var(--dim); font-size: 8px; }
.admin-job-signals { display: flex; flex-wrap: wrap; gap: 5px; }
.admin-job-signals span { padding: 5px 7px; border: 1px solid var(--line); border-radius: 7px; color: #afb4b9; font-size: 8px; }
.admin-job-signals span.on { border-color: rgba(7,148,255,.2); background: var(--blue-dim); color: var(--blue-strong); }
.admin-job-actions { margin-top: 10px; display: grid; grid-template-columns: 1.25fr 1fr; gap: 6px; }
.admin-compare-action,.admin-download { min-height: 36px; margin: 0; display: grid; place-items: center; border-radius: 8px; font-size: 9px; font-weight: 700; text-decoration: none; cursor: pointer; }
.admin-compare-action { border: 1px solid rgba(7,148,255,.3); background: var(--blue-dim); color: var(--blue-strong); }
.admin-download { border: 0; background: #171a1e; color: #fff; }

.admin-compare-modal { z-index: 30; padding: 18px; background: rgba(12,17,22,.72); backdrop-filter: blur(14px); }
.admin-compare-card { width: min(1240px,100%); max-height: calc(100vh - 36px); padding: 18px; overflow-y: auto; border: 1px solid rgba(255,255,255,.72); border-radius: 20px; background: #f6f8f9; box-shadow: 0 36px 110px rgba(0,0,0,.36); }
.admin-compare-head { padding: 2px 2px 14px; display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.admin-compare-head span { color: var(--blue-strong); font-size: 8px; font-weight: 700; letter-spacing: .16em; }
.admin-compare-head h3 { margin: 5px 0 4px; font-size: 26px; letter-spacing: -.04em; }
.admin-compare-head p { margin: 0; color: var(--dim); font-size: 9px; }
.admin-compare-layout { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.admin-compare-pane { min-width: 0; margin: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.admin-compare-pane figcaption { min-height: 42px; padding: 0 13px; display: flex; align-items: center; justify-content: space-between; gap: 8px; border-bottom: 1px solid var(--line); }
.admin-compare-pane figcaption span { overflow: hidden; font-size: 10px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.admin-compare-pane figcaption small { flex: 0 0 auto; color: var(--blue-strong); font-size: 8px; font-weight: 700; letter-spacing: .12em; }
.admin-compare-image { display: grid; place-items: center; overflow: hidden; background: #eef1f3; }
.admin-compare-image img { width: 100%; height: min(64vh,720px); display: block; object-fit: contain; }
.admin-compare-picker { margin-top: 10px; padding: 9px; display: flex; gap: 7px; overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.admin-compare-picker button { width: 96px; flex: 0 0 96px; padding: 3px; overflow: hidden; border: 1px solid transparent; border-radius: 9px; background: transparent; color: var(--muted); text-align: left; cursor: pointer; }
.admin-compare-picker button.active { border-color: var(--blue); background: var(--blue-dim); color: var(--text); }
.admin-compare-picker img { width: 100%; aspect-ratio: 1; display: block; border-radius: 6px; object-fit: cover; }
.admin-compare-picker span { padding: 6px 3px 3px; display: block; overflow: hidden; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.admin-compare-footer { min-height: 48px; padding: 10px 2px 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.admin-compare-footer small { color: var(--dim); font-size: 8px; }
.admin-compare-footer a { min-height: 36px; padding: 0 15px; display: grid; place-items: center; border-radius: 8px; background: #171a1e; color: #fff; font-size: 9px; font-weight: 700; text-decoration: none; }

@media (max-width: 860px), (hover: none) and (pointer: coarse) and (max-width: 1024px) {
  html { scroll-padding-top: calc(74px + env(safe-area-inset-top)); }
  .topbar { height: calc(60px + env(safe-area-inset-top)); padding: env(safe-area-inset-top) max(16px,env(safe-area-inset-right)) 0 max(16px,env(safe-area-inset-left)); position: fixed; inset: 0 0 auto; }
  .brand { flex: 1; min-width: 0; overflow: hidden; }
  .brand-lockup { height: 24px; }
  .brand-wordmark { gap: 6px; font-size: 22px; }
  .top-actions { flex: 0 0 auto; gap: 8px; }
  .credit-badge { height: 29px; padding: 0 8px; }
  .credit-badge small { display: none; }
  .account { width: 44px; height: 44px; padding: 5px; }
  .account-copy,.account i { display: none; }
  .account > span:first-child { width: 32px; height: 32px; flex-basis: 32px; }
  body.sheet-open { overflow: hidden; }
  main { padding: calc(72px + env(safe-area-inset-top)) 10px calc(104px + env(safe-area-inset-bottom)); }
  .login-shell { min-height: calc(100svh - 124px); display: block; }
  .login-copy { min-height: calc(100svh - 124px); padding: clamp(28px,7vh,58px) 8px 24px; display: flex; flex-direction: column; }
  .login-copy h1 { margin: 16px 0 18px; font-size: clamp(40px,11.6vw,52px); line-height: 1.02; letter-spacing: -.065em; }
  .login-copy p { margin: 0; color: #4f5861; font-size: 14px; line-height: 1.68; }
  .login-spec { margin-top: 22px; gap: 7px; }
  .login-spec span { padding: 7px 10px; border: 0; background: #eef5fa; color: #496273; font-size: 9px; letter-spacing: 0; }
  .mobile-start-panel { margin-top: auto; padding-top: 30px; display: block; }
  .mobile-hero-preview { width: min(330px,100%); min-height: 116px; margin: 28px auto 0; padding: 13px; display: grid; grid-template-columns: 1fr 28px 1fr; align-items: center; gap: 5px; border: 1px solid rgba(7,148,255,.12); border-radius: 18px; background: linear-gradient(145deg,#fff,#eef8ff 58%,#f2fbf6); box-shadow: 0 16px 38px rgba(25,42,58,.08); }
  .preview-inputs { height: 88px; position: relative; }
  .preview-inputs img { width: 64px; height: 78px; position: absolute; top: 5px; border: 3px solid #fff; border-radius: 12px; object-fit: cover; box-shadow: 0 8px 20px rgba(18,24,31,.14); }
  .preview-inputs img:first-child { left: 4px; transform: rotate(-4deg); }
  .preview-inputs img:last-child { right: 4px; transform: rotate(4deg); }
  .preview-arrow { color: var(--blue-strong); font-size: 22px; font-weight: 700; text-align: center; }
  .preview-output { height: 88px; padding: 13px 10px; display: flex; flex-direction: column; justify-content: center; border-radius: 13px; background: linear-gradient(145deg,#1683d8,#38b6db 58%,#83d987); color: #fff; }
  .preview-output small,.preview-output strong,.preview-output em { display: block; }
  .preview-output small { font-size: 9px; font-weight: 700; }
  .preview-output strong { margin: 5px 0; font-size: 15px; line-height: 1.2; }
  .preview-output em { color: rgba(255,255,255,.82); font-size: 9px; font-style: normal; }
  .mobile-value-list { margin-bottom: 18px; display: grid; grid-template-columns: repeat(3,1fr); gap: 6px; }
  .mobile-value-list span { min-width: 0; padding: 11px 7px; display: flex; flex-direction: column; gap: 7px; border-radius: 12px; background: #fff; color: #4e5760; font-size: 10px; line-height: 1.35; box-shadow: inset 0 0 0 1px var(--line); }
  .mobile-value-list b { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: #e4f3ff; color: var(--blue-strong); font-size: 10px; }
  .mobile-start { width: auto; min-height: 58px; position: fixed; left: max(10px,env(safe-area-inset-left)); right: max(10px,env(safe-area-inset-right)); bottom: max(10px,env(safe-area-inset-bottom)); z-index: 12; border-radius: 14px; background: #1683d8; font-size: 15px; box-shadow: 0 14px 30px rgba(8,112,193,.22); }
  .mobile-start-panel > small { margin: 11px 0 68px; display: block; color: var(--dim); font-size: 10px; text-align: center; }
  .mobile-signup { width: 100%; min-height: 42px; border: 0; background: transparent; color: #5c646c; font-size: 12px; cursor: pointer; }
  .mobile-signup b { color: #171a1e; text-decoration: underline; text-underline-offset: 3px; }
  .login-sheet-backdrop { padding: 0; display: flex; align-items: flex-end; position: fixed; inset: 0; z-index: 50; background: rgba(17,23,29,.52); opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .2s,visibility .2s; }
  .login-sheet-backdrop.open { opacity: 1; visibility: visible; pointer-events: auto; }
  .login-panel { width: 100%; max-height: min(92dvh,820px); padding: 18px 14px calc(14px + env(safe-area-inset-bottom)); overflow-y: auto; border: 0; border-radius: 24px 24px 0 0; background: #fff; box-shadow: 0 -20px 60px rgba(17,23,29,.2); transform: translateY(22px); transition: transform .22s; }
  .login-sheet-backdrop.open .login-panel { transform: translateY(0); }
  .sheet-close { width: 44px; height: 44px; margin-left: auto; display: grid; place-items: center; border: 0; border-radius: 50%; background: #f1f3f5; color: #5d646b; font-size: 25px; cursor: pointer; }
  .login-sheet-head { padding: 2px 4px 14px; display: block; }
  .login-sheet-head small { color: var(--blue-strong); font-size: 10px; font-weight: 700; }
  .login-sheet-head h2 { margin: 7px 0 9px; font-size: 30px; line-height: 1.08; letter-spacing: -.05em; }
  .login-sheet-head p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
  .login-art { display: none; }
  .login-consents { margin: 0 0 10px; gap: 6px; }
  .login-consents .consent { min-height: 58px; margin: 0; padding: 10px; align-items: center; border: 1px solid var(--line); border-radius: 11px; background: #fafbfc; font-size: 12px; line-height: 1.5; }
  .login-consents .consent-all { min-height: 64px; border-color: rgba(22,131,216,.28); background: #eef7fd; }
  .login-consents input { width: 20px; height: 20px; }
  .login-consents .consent-copy b { font-size: 13px; }
  .login-consents .consent-copy small { margin-top: 4px; font-size: 12px; line-height: 1.45; }
  .login-consents .consent-copy em { font-size: 9px; }
  .login-consents .consent-progress { padding: 3px 0; font-size: 11px; }
  .login-panel > p { margin: 11px 0 2px; }
  .login-panel .btn { min-height: 52px; }
  .login-panel #kakaoSignup { position: sticky; bottom: 0; z-index: 2; box-shadow: 0 -8px 20px rgba(255,255,255,.94),0 12px 26px rgba(95,82,0,.12); }
  .workspace-title { min-height: 76px; margin: 0 2px 16px; align-items: center; }
  .workspace-title h2 { gap: 8px; font-size: 30px; line-height: 1.15; }
  .workspace-title h2 small { display: inline; padding: 5px 8px; font-size: 10px; }
  .workspace-title p { font-size: 11px; }
  .one-badge { width: 78px; height: 78px; flex-basis: 78px; padding: 10px; }
  .one-badge strong { font-size: 34px; }
  .studio-layout { width: 100%; max-width: 100%; min-width: 0; display: flex; flex-direction: column; }
  .studio-layout.has-results .history-panel { order: -1; margin: 0 0 12px; }
  .studio-layout.no-results .history-panel { display: none; }
  .workspace-active .site-footer { display: none; }
  .creator-panel,.history-panel { width: 100%; max-width: 100%; padding: 18px 16px; overflow: hidden; }
  .history-panel { margin-top: 12px; position: static; max-height: none; }
  .history-head { padding: 4px 2px 12px; align-items: center; }
  .mobile-only { display: inline-flex; align-items: center; justify-content: center; }
  .result-viewer { scroll-margin-top: calc(72px + env(safe-area-inset-top)); }
  .step-head { grid-template-columns: 30px 1fr; gap: 10px; }
  .step-head h3 { margin-top: 0; font-size: 20px; letter-spacing: -.035em; }
  .step-head p { margin-top: 5px; font-size: 11px; }
  .mobile-flow-progress { margin: 4px 0 24px; display: flex; align-items: center; }
  .mobile-flow-progress span { display: flex; align-items: center; gap: 5px; color: #9aa1a8; font-size: 10px; font-weight: 700; white-space: nowrap; }
  .mobile-flow-progress span b { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: #e9edf0; color: #818990; font-size: 10px; }
  .mobile-flow-progress span.active { color: var(--text); }
  .mobile-flow-progress span.active b,.mobile-flow-progress span.completed b { background: #1683d8; color: #fff; }
  .mobile-flow-progress span.completed { color: var(--blue-strong); }
  .mobile-flow-progress i { height: 1px; flex: 1; margin: 0 7px; background: #dfe4e7; }
  .flow-step { display: none; }
  .flow-step.active { display: block; }
  .desktop-step-title { display: none; }
  .mobile-step-title { display: inline; }
  .mobile-selection-summary { margin-top: 18px; display: grid; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
  .mobile-selection-summary > div { min-height: 58px; padding: 10px 12px; display: grid; grid-template-columns: 54px 1fr auto; align-items: center; gap: 8px; border-bottom: 1px solid var(--line); }
  .mobile-selection-summary > div:last-child { border-bottom: 0; }
  .mobile-selection-summary span { color: var(--dim); font-size: 10px; }
  .mobile-selection-summary strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
  .mobile-selection-summary button { min-width: 48px; min-height: 38px; border: 0; border-radius: 9px; background: #eef6fc; color: var(--blue-strong); font-size: 10px; font-weight: 700; cursor: pointer; }
  .flow-step[data-flow-step='3'] .scene-grid { display: none; }
  .section-rule { display: none; }
  .gender-tabs button { min-height: 44px; }
  .face-grid { width: calc(100% + 16px); max-width: calc(100% + 16px); max-height: none; margin-right: -16px; padding: 3px 16px 12px 2px; display: flex; gap: 8px; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x proximity; scrollbar-width: none; }
  .face-grid::-webkit-scrollbar,.sample-grid::-webkit-scrollbar,.scene-grid::-webkit-scrollbar { display: none; }
  .face-card { flex: 0 0 96px; scroll-snap-align: start; }
  .face-card span { padding: 7px 5px; font-size: 8px; }
  .face-card i { width: 19px; height: 19px; right: 5px; top: 5px; }
  .garment-drop { min-height: 132px; }
  .garment-list { grid-template-columns: 1fr; }
  .source-tabs button,.upload-guide-row button,.garment-focus button { min-height: 44px; }
  .experience-tabs { display: none; }
  .sample-grid,.scene-grid { width: calc(100% + 16px); max-width: calc(100% + 16px); margin-right: -16px; padding: 2px 16px 10px 2px; display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; }
  .sample-card { flex: 0 0 min(44vw,168px); scroll-snap-align: start; }
  .scene-card { flex: 0 0 min(72vw,260px); scroll-snap-align: start; }
  .sample-card > span { padding: 8px; }
  .guide-card { max-height: calc(100vh - 24px); overflow-y: auto; }
  .account-modal { padding: 0; place-items: stretch; background: #fff; backdrop-filter: none; }
  .account-modal-card { width: 100%; height: 100dvh; max-height: none; padding: max(14px,env(safe-area-inset-top)) max(20px,env(safe-area-inset-right)) max(18px,env(safe-area-inset-bottom)) max(20px,env(safe-area-inset-left)); overflow-y: auto; border: 0; border-radius: 0; background: #fff; box-shadow: none; }
  .account-modal-head { min-height: 52px; }
  .account-sheet-brand .brand-wordmark { font-size: 22px; }
  .account-profile { margin-top: clamp(42px,10dvh,84px); grid-template-columns: 64px minmax(0,1fr); gap: 16px; }
  .account-profile-avatar { width: 64px; height: 64px; font-size: 20px; }
  .account-profile small { font-size: 10px; }
  .account-profile h3 { margin-top: 6px; font-size: 29px; letter-spacing: -.04em; }
  .account-profile p { margin-top: 7px; font-size: 13px; }
  .account-modal-links { margin-top: 34px; }
  .account-modal-links .btn { min-height: 58px; border-radius: 14px; font-size: 14px; }
  .account-modal-actions { margin-top: auto; padding-top: 28px; padding-bottom: 4px; display: grid; gap: 8px; }
  .account-modal-actions .text-action { width: 100%; min-height: 52px; border: 1px solid var(--line); border-radius: 13px; background: #f5f7f8; color: #343a40; font-size: 14px; font-weight: 700; text-decoration: none; }
  .account-modal-actions .text-action.danger { border-color: rgba(194,65,65,.16); background: #fff7f7; color: #b23b3b; }
  .text-action { min-height: 44px; }
  .result-grid { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 2px; }
  .generation-state { min-height: 230px; padding: 22px 16px; }
  .generation-state .btn { max-width: none; }
  .mobile-flow-actions { padding: 10px max(10px,env(safe-area-inset-right)) max(10px,env(safe-area-inset-bottom)) max(10px,env(safe-area-inset-left)); display: flex; gap: 8px; position: fixed; inset: auto 0 0; z-index: 12; background: rgba(247,248,248,.94); backdrop-filter: blur(16px); border-top: 1px solid var(--line); }
  .mobile-flow-actions[hidden] { display: none; }
  .studio-layout:not(.creation-active) .mobile-flow-actions,.studio-layout:not(.creation-active) .flow-step[data-flow-step='3'] .generate { display: none; }
  .studio-layout.creation-active.has-results .history-panel { display: none; }
  .studio-layout.creation-active .creator-panel { order: 0; }
  .mobile-flow-actions button { min-height: 56px; border: 0; border-radius: 14px; font-size: 14px; font-weight: 700; cursor: pointer; }
  .mobile-flow-actions #flowBack { width: 76px; flex: 0 0 76px; background: #e9edf0; color: #50575e; }
  .mobile-flow-actions #flowNext { flex: 1; background: #1683d8; color: #fff; }
  .mobile-flow-actions #flowNext:disabled { background: #e5e9ec; color: #9ca3a9; }
  .flow-step[data-flow-step='3'].active .generate { width: auto; min-height: 58px; margin: 0; position: fixed; left: max(10px,env(safe-area-inset-left)); right: max(10px,env(safe-area-inset-right)); bottom: max(10px,env(safe-area-inset-bottom)); z-index: 12; border-radius: 14px; box-shadow: 0 14px 34px rgba(27,54,75,.22); }
  .flow-step[data-flow-step='3'].active .generate:disabled { background: #e5e9ec; color: #9ca3a9; opacity: 1; }
  .result-grid { width: calc(100% + 32px); margin-right: -16px; margin-left: -16px; padding: 0; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 2px; overflow: visible; }
  .result-tile { width: 100%; border-radius: 0; }
  .result-complete-status { min-height: 52px; }
  .result-complete-status strong { font-size: 14px; }
  .result-complete-status span { font-size: 10px; }
  .admin-grid { grid-template-columns: 1fr 1fr; }
  .user-row { grid-template-columns: 1fr auto; }
  .user-row > span:first-of-type { display: none; }
  .user-controls { grid-column: 1/-1; width: 100%; margin-top: 5px; grid-template-columns: 1fr auto; align-items: center; justify-items: stretch; }
  .history-btn { min-width: 0; width: 100%; min-height: 38px; }
  .mini-actions { justify-content: end; }
  .admin-face-panel { padding: 14px; }
  .admin-face-head { display: block; }
  .admin-face-head > strong { margin-top: 10px; display: inline-block; }
  .face-upload-form { grid-template-columns: 1fr 100px; }
  .face-file-field,.face-active-field { grid-column: 1/-1; }
  .face-upload-form > button { grid-column: 1/-1; }
  .admin-face-tools { grid-template-columns: 1fr 1fr; }
  .admin-face-tools input { grid-column: 1/-1; }
  .admin-face-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; }
  .admin-history-modal { padding: 10px; }
  .admin-history-card { max-height: calc(100vh - 20px); padding: 16px; border-radius: 16px; }
  .admin-history-head h3 { font-size: 22px; }
  .admin-history-summary { padding: 12px 0; flex-wrap: wrap; }
  .admin-history-summary > small { width: 100%; margin-left: 0; line-height: 1.45; }
  .admin-history-grid { grid-template-columns: 1fr; gap: 10px; }
  .admin-job-meta { padding: 9px; }
  .admin-job-meta > div:first-child { align-items: flex-start; flex-direction: column; }
  .admin-job-signals { gap: 3px; }
  .admin-job-signals span { padding: 4px 5px; font-size: 7px; }
  .admin-compare-modal { padding: 6px; }
  .admin-compare-card { max-height: calc(100vh - 12px); padding: 10px; border-radius: 15px; }
  .admin-compare-head { padding: 2px 2px 10px; }
  .admin-compare-head h3 { font-size: 21px; }
  .admin-compare-head .modal-close { width: 38px; height: 38px; flex-basis: 38px; }
  .admin-compare-layout { gap: 5px; }
  .admin-compare-pane { border-radius: 10px; }
  .admin-compare-pane figcaption { min-height: 36px; padding: 0 8px; }
  .admin-compare-pane figcaption span { font-size: 8px; }
  .admin-compare-pane figcaption small { font-size: 7px; }
  .admin-compare-image img { height: auto; aspect-ratio: 4/5; }
  .admin-compare-picker { margin-top: 7px; padding: 6px; gap: 5px; }
  .admin-compare-picker button { width: 72px; flex-basis: 72px; }
  .admin-compare-footer { min-height: 44px; padding-top: 7px; }
  .admin-compare-footer small { max-width: 55%; }
  .admin-compare-footer a { min-height: 34px; padding: 0 10px; font-size: 8px; }
}

@media (max-width: 860px) and (max-height: 650px), (hover: none) and (pointer: coarse) and (max-width: 1024px) and (max-height: 650px) {
  .login-copy { padding-top: 18px; }
  .login-copy h1 { margin: 10px 0 12px; font-size: 36px; }
  .login-copy p { font-size: 12px; }
  .login-spec { margin-top: 12px; }
  .mobile-start-panel { padding-top: 14px; }
  .mobile-hero-preview { display: none; }
  .mobile-value-list { margin-bottom: 8px; }
  .mobile-value-list span { padding: 8px 6px; }
  .mobile-start { min-height: 54px; }
}

@media (max-width: 380px) {
  .topbar { padding-left: max(12px,env(safe-area-inset-left)); padding-right: max(12px,env(safe-area-inset-right)); }
  .brand-lockup { height: 23px; }
  .brand-wordmark { font-size: 21px; }
  .workspace-title p,.one-badge span,.one-badge small { display: none; }
  .workspace-title h2 { font-size: 32px; }
  .one-badge { width: 58px; height: 58px; flex-basis: 58px; display: flex; align-items: center; justify-content: center; }
  .one-badge strong { font-size: 31px; }
  .creator-panel,.history-panel { padding: 13px; }
  .face-grid,.sample-grid,.scene-grid { width: calc(100% + 13px); max-width: calc(100% + 13px); margin-right: -13px; padding-right: 13px; }
  .face-card { flex-basis: 88px; }
  .garment-focus > div { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .user-controls { display: block; }
  .mini-actions { margin-top: 7px; justify-content: start; }
}

/* Authenticated customer support. Kept outside #app so SPA renders cannot remove it. */
.support-widget { position: fixed; right: max(20px,env(safe-area-inset-right)); bottom: max(20px,env(safe-area-inset-bottom)); z-index: 45; font-family: Inter,Pretendard,sans-serif; }
.support-launcher { width: 58px; height: 58px; display: grid; place-items: center; gap: 0; border: 0; border-radius: 19px; background: #171a1d; color: #fff; box-shadow: 0 14px 38px rgba(20,26,31,.24); cursor: pointer; }
.support-launcher span { width: 24px; height: 22px; display: grid; place-items: center; font-size: 22px; line-height: 18px; }
.support-launcher span svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; }
.support-launcher.has-unread { background: #176b8b; box-shadow: 0 14px 38px rgba(23,107,139,.34); }
.support-launcher b { font-size: 10px; letter-spacing: .04em; }
.support-panel { width: min(380px,calc(100vw - 24px)); height: min(600px,calc(100dvh - 120px)); margin-bottom: 12px; position: absolute; right: 0; bottom: 58px; overflow: hidden; border: 1px solid #dfe4e7; border-radius: 22px; background: #fff; box-shadow: 0 24px 70px rgba(25,34,40,.24); }
.support-panel[hidden] { display: none; }
.support-panel > header { min-height: 76px; padding: 16px 18px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid #edf0f2; }
.support-panel > header small { color: #7d878d; font-size: 9px; font-weight: 800; letter-spacing: .12em; }
.support-panel > header h2 { margin: 4px 0 0; font-size: 17px; }
.support-panel > header button { width: 44px; height: 44px; border: 0; border-radius: 50%; background: #f1f3f4; color: #343a3e; font-size: 25px; cursor: pointer; }
.support-status { min-height: 38px; padding: 10px 16px; background: #f7f9fa; color: #68747b; font-size: 11px; line-height: 1.5; }
.support-messages { height: calc(100% - 230px); min-height: 190px; padding: 16px; display: flex; flex-direction: column; gap: 11px; overflow-y: auto; overscroll-behavior: contain; }
.support-empty { margin: auto; color: #8b959b; font-size: 12px; line-height: 1.65; text-align: center; }
.support-message { max-width: 84%; display: grid; gap: 4px; }
.support-message.customer { align-self: flex-end; }
.support-message.agent,.support-message.system { align-self: flex-start; }
.support-message strong { color: #6f7c83; font-size: 10px; }
.support-message p { margin: 0; padding: 11px 13px; border-radius: 15px; background: #f0f3f4; color: #283036; font-size: 13px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.support-message.customer p { border-bottom-right-radius: 4px; background: #1b2024; color: #fff; }
.support-message.agent p { border-bottom-left-radius: 4px; background: #edf7fb; }
.support-message.system p { padding: 7px 10px; background: #f7f7f7; color: #778087; font-size: 11px; }
.support-message time { color: #9aa2a7; font-size: 9px; }
.support-message.customer time { text-align: right; }
.support-compose { padding: 12px; position: absolute; inset: auto 0 0; border-top: 1px solid #e8ecee; background: #fff; }
.support-compose > label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.support-compose textarea { width: 100%; min-height: 70px; max-height: 120px; padding: 11px 12px; resize: vertical; border: 1px solid #cfd6da; border-radius: 12px; background: #fff; color: #20272b; font: inherit; font-size: 13px; line-height: 1.45; }
.support-compose textarea:focus { outline: 3px solid rgba(41,130,177,.18); border-color: #2982b1; }
.support-compose > div { margin-top: 8px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.support-compose small { color: #808a90; font-size: 9px; line-height: 1.35; }
.support-compose small a { color: inherit; }
.support-compose button { min-width: 66px; min-height: 42px; padding: 0 15px; border: 0; border-radius: 11px; background: #1d2226; color: #fff; font-weight: 800; cursor: pointer; }
.support-compose button:disabled { opacity: .42; cursor: default; }

@media (max-width: 900px) {
  .support-widget { right: max(12px,env(safe-area-inset-right)); bottom: calc(78px + env(safe-area-inset-bottom)); }
  .support-panel { width: calc(100vw - 24px); height: min(610px,calc(100dvh - 112px - env(safe-area-inset-bottom))); bottom: 60px; border-radius: 20px; }
  .support-launcher { width: 54px; height: 54px; border-radius: 17px; }
}

@media (max-width: 380px) {
  .support-widget { right: 9px; }
  .support-panel { width: calc(100vw - 18px); }
}

@media (prefers-reduced-motion: reduce) {
  .support-panel,.support-launcher { scroll-behavior: auto; transition: none; }
}

@media (max-width: 640px) {
  .site-footer { margin-top: 34px; padding: 22px 16px max(24px,env(safe-area-inset-bottom)); }
}

/* Authenticated mobile fitting app: one destination and one decision at a time. */
@media (max-width: 860px), (hover: none) and (pointer: coarse) and (max-width: 1024px) {
  body.workspace-active { background: #f4f6f8; }
  body.workspace-active .topbar { transition: transform .22s ease; }
  body.workspace-active main { padding: calc(60px + env(safe-area-inset-top)) 0 calc(92px + env(safe-area-inset-bottom)); }
  body.workspace-active.mobile-results-active { overflow: hidden; }
  body.workspace-active.mobile-results-active main { height: 100dvh; padding-bottom: 0; overflow: hidden; }
  body.modal-open { overflow: hidden; }
  .workspace-active .workspace-title { display: none; }
  .studio-layout { display: block; }
  .studio-layout.has-results:not(.creation-active) .creator-panel { display: none; }
  .studio-layout.creation-active .history-panel { display: none; }
  .creator-panel,.history-panel { min-height: calc(100dvh - 60px - env(safe-area-inset-top)); margin: 0; border: 0; border-radius: 0; background: #fff; box-shadow: none; }
  .creator-panel { padding: 0 16px calc(174px + env(safe-area-inset-bottom)); overflow: visible; }
  .history-panel { padding: 16px 12px calc(76px + env(safe-area-inset-bottom)); }
  body.mobile-results-active .history-panel { height: calc(100dvh - 60px - env(safe-area-inset-top)); min-height: 0; display: block; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  body.mobile-results-active .history-panel::-webkit-scrollbar { display: none; }
  body.results-immersive .topbar { transform: translateY(-100%); }
  body.results-immersive .history-panel { height: 100dvh; position: fixed; inset: 0 0 auto; z-index: 11; }

  .mobile-creator-head { min-height: 64px; margin: 0 -16px; padding: 8px 16px; display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 8px; position: sticky; top: calc(60px + env(safe-area-inset-top)); z-index: 7; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.96); backdrop-filter: blur(18px); }
  .mobile-creator-head > button { width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: #f1f4f6; color: #252a30; font-size: 30px; line-height: 1; cursor: pointer; }
  .mobile-creator-head > button[hidden] { visibility: hidden; display: block; }
  .mobile-creator-head small,.mobile-creator-head strong { display: block; }
  .mobile-creator-head small { color: var(--dim); font-size: 11px; }
  .mobile-creator-head strong { margin-top: 3px; font-size: 15px; }
  .mobile-creator-head > span { padding: 7px 9px; border-radius: 99px; background: #eef7fd; color: var(--blue-strong); font-size: 11px; font-weight: 700; }
  .mobile-flow-progress { margin: 18px 2px 24px; }
  .mobile-flow-progress span { font-size: 12px; }
  .mobile-flow-progress span b { width: 26px; height: 26px; font-size: 11px; }

  .step-head { min-height: 0; display: block; }
  .step-head > span { display: none; }
  .step-head h3 { margin: 0; font-size: 27px; line-height: 1.2; letter-spacing: -.05em; }
  .step-head p { margin-top: 8px; color: #68717a; font-size: 13px; line-height: 1.55; }
  .mobile-catalog-hint,.mobile-upload-privacy { display: block; color: #7d858d; font-size: 12px; line-height: 1.5; }
  .mobile-catalog-hint { margin: 11px 2px 5px; }
  .mobile-upload-privacy { margin: 9px 2px 0; text-align: center; }

  .gender-tabs { margin-top: 20px; border-radius: 13px; }
  .gender-tabs button { min-height: 48px; font-size: 14px; }
  .face-grid { width: 100%; max-width: none; margin: 8px 0 0; padding: 2px 2px 14px; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; overflow: visible; scroll-snap-type: none; }
  .face-card { min-width: 0; flex: none; border-radius: 16px; }
  .face-card img { aspect-ratio: 3/4; }
  .face-card span { left: 11px; bottom: 11px; padding: 0; font-size: 12px; font-weight: 600; letter-spacing: 0; }
  .face-card i { width: 28px; height: 28px; right: 8px; top: 8px; border: 2px solid #fff; color: #fff; font-size: 12px; }

  .source-tabs { margin-top: 20px; padding: 4px; gap: 4px; border: 0; border-radius: 14px; background: #eef1f4; }
  .source-tabs button { min-height: 48px; border: 0; border-radius: 11px; font-size: 13px; }
  .source-tabs button.active { border: 0; background: #fff; color: var(--text); box-shadow: 0 3px 12px rgba(25,42,58,.1); }
  .upload-guide-row { margin-top: 14px; font-size: 12px; }
  .upload-guide-row button { min-height: 44px; padding: 0 12px; border-radius: 10px; font-size: 12px; }
  .garment-drop { min-height: 178px; margin-top: 12px; border: 1.5px dashed #9cc7e8; border-radius: 17px; background: #f4faff; }
  .garment-drop strong { margin-top: 11px; font-size: 17px; }
  .garment-drop small { margin-top: 5px; font-size: 12px; }
  .upload-symbol { width: 46px; height: 46px; border-radius: 14px; background: #fff; font-size: 27px; box-shadow: 0 6px 18px rgba(8,112,193,.1); }
  .garment-list { margin-top: 16px; display: block; }
  .garment-list-head { margin-bottom: 9px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
  .garment-list-head strong { font-size: 14px; }
  .garment-list-head span { color: var(--dim); font-size: 11px; }
  .garment-item { min-height: 94px; margin-top: 8px; padding: 9px; grid-template-columns: 64px minmax(0,1fr) auto; gap: 10px; border-radius: 13px; }
  .garment-item img { width: 64px; height: 78px; border-radius: 9px; }
  .garment-item-copy b { font-size: 13px; }
  .garment-item-copy small { margin-top: 5px; font-size: 11px; }
  .garment-item-copy em { margin-top: 6px; display: block; color: var(--green); font-size: 10px; font-style: normal; }
  .garment-item-actions { display: flex; flex-direction: column; gap: 5px; }
  .garment-item .garment-item-actions button { width: auto; min-width: 52px; height: 44px; padding: 0 8px; border-radius: 9px; font-size: 11px; }
  .garment-focus { padding: 14px; border-radius: 14px; }
  .garment-focus > span { font-size: 12px; }
  .garment-focus > div { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .garment-focus button { min-height: 44px; font-size: 11px; }
  .garment-focus > small { font-size: 11px; }
  .sample-grid { width: 100%; max-width: none; margin: 15px 0 0; padding: 0 0 14px; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; overflow: visible; scroll-snap-type: none; }
  .sample-card { min-width: 0; flex: none; border-radius: 14px; }
  .sample-card img { aspect-ratio: 1/1; }
  .sample-card > span { padding: 11px; }
  .sample-card b { font-size: 12px; }
  .sample-card small { margin-top: 5px; font-size: 10px; }
  .sample-card i { width: 28px; height: 28px; border: 2px solid #fff; color: #fff; }

  .mobile-review-visual { margin: 20px 0 14px; display: grid; grid-template-columns: 1fr 28px 1fr; align-items: center; gap: 8px; }
  .mobile-review-visual figure { margin: 0; position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: #edf1f3; }
  .mobile-review-visual img { width: 100%; aspect-ratio: 4/5; display: block; object-fit: cover; }
  .mobile-review-visual img[hidden] { display: block; visibility: hidden; }
  .mobile-review-visual figcaption { position: absolute; left: 8px; bottom: 8px; padding: 5px 7px; border-radius: 99px; background: rgba(15,19,23,.74); color: #fff; font-size: 10px; }
  .mobile-review-visual > b { color: var(--blue-strong); font-size: 22px; text-align: center; }
  .mobile-selection-summary { margin-top: 0; border-radius: 14px; }
  .mobile-selection-summary > div { min-height: 56px; }
  .mobile-selection-summary span { font-size: 12px; }
  .mobile-selection-summary strong { font-size: 13px; }
  .mobile-selection-summary button { min-width: 54px; min-height: 44px; font-size: 12px; }
  .mobile-credit-receipt { margin-top: 14px; padding: 14px; display: grid; gap: 10px; border-radius: 14px; background: #f5f7f8; }
  .mobile-credit-receipt > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
  .mobile-credit-receipt span { color: var(--muted); font-size: 12px; }
  .mobile-credit-receipt strong { font-size: 13px; }
  .mobile-credit-receipt small { padding-top: 10px; border-top: 1px solid var(--line); color: var(--green); font-size: 11px; line-height: 1.5; }
  .ai-notice { margin-top: 14px; padding: 13px; border-radius: 12px; }
  .ai-notice strong { font-size: 12px; }
  .ai-notice span { font-size: 12px; }

  .mobile-flow-actions,.flow-step[data-flow-step='3'].active .generate { left: 0; right: 0; bottom: calc(68px + env(safe-area-inset-bottom)); padding: 10px max(12px,env(safe-area-inset-right)) 10px max(12px,env(safe-area-inset-left)); border: 0; border-top: 1px solid var(--line); border-radius: 0; background: rgba(255,255,255,.96); box-shadow: 0 -10px 30px rgba(25,42,58,.08); backdrop-filter: blur(18px); }
  .mobile-flow-actions button,.flow-step[data-flow-step='3'].active .generate { min-height: 58px; border-radius: 15px; font-size: 15px; }
  .flow-step[data-flow-step='3'].active .generate { width: auto; margin: 0; }
  .flow-step[data-flow-step='3'].active .generate:not(:disabled) { border: 1px solid transparent; background: linear-gradient(135deg,#191b1e 0%,#0d0f11 100%) padding-box,var(--studio-gradient) border-box; color: #fff; box-shadow: 0 -10px 30px rgba(25,42,58,.08),0 12px 28px rgba(15,17,19,.24); }
  .flow-step[data-flow-step='3'].active .generate span:first-child { font-size: 15px; }
  .flow-step[data-flow-step='3'].active .generate small { padding: 6px 9px; border-radius: 99px; background: rgba(255,255,255,.1); color: inherit; font-size: 11px; opacity: .88; }

  .history-head { padding: 5px 2px 14px; flex: 0 0 auto; align-items: center; }
  .history-head span { font-size: 10px; }
  .history-head h3 { margin-top: 4px; font-size: 25px; letter-spacing: -.045em; }
  .history-head p { margin: 5px 0 0; display: block; color: var(--muted); font-size: 12px; }
  .mobile-edit-button { min-width: 108px; min-height: 48px; padding: 0 10px; border: 0; border-radius: 13px; background: #1683d8; color: #fff; font-size: 12px; white-space: nowrap; box-shadow: 0 7px 18px rgba(8,112,193,.18); }
  .result-complete-status { min-height: 58px; margin-bottom: 10px; padding: 13px 14px; border-radius: 14px; }
  .result-complete-status strong { font-size: 15px; }
  .result-complete-status span { font-size: 12px; }
  .result-browser { min-height: 0; position: relative; }
  .result-viewer { margin-bottom: 0; }
  .history-panel.completed-selected .result-viewer { position: sticky; top: -16px; z-index: 6; padding-top: 16px; background: #fff; }
  .history-panel.viewer-pinned .result-complete-status { display: none; }
  .history-panel.viewer-pinned .viewer-image { margin-right: -12px; margin-left: -12px; border-width: 0; border-radius: 0; }
  .history-panel.viewer-pinned .viewer-image > img { height: min(52dvh,470px); }
  .history-panel.viewer-pinned .result-viewer { top: -16px; padding-top: 0; box-shadow: 0 12px 24px rgba(19,30,40,.1); }
  .viewer-image { border-radius: 17px; }
  .viewer-image > img { height: clamp(180px,36dvh,340px); aspect-ratio: auto; object-fit: contain; }
  .ai-result-label { font-size: 10px; }
  .result-retention { margin: 11px 2px 0; color: #66717a; font-size: 12px; line-height: 1.5; text-align: center; }
  .result-grid { min-height: 64px; margin-top: 8px; padding-bottom: 6px; grid-auto-rows: max-content; align-content: start; overflow: visible; }
  .result-cell,.result-tile { border-radius: 0; }
  .result-tile.processing small,.result-tile.failed small { font-size: 10px; }
  .generation-state { height: clamp(280px,40dvh,350px); min-height: 0; padding: 18px; gap: 8px; border: 0; border-radius: 17px; }
  .generation-preview { width: min(110px,30vw); margin-bottom: 2px; border-radius: 17px; }
  .generation-state strong { font-size: 22px; }
  .generation-state p { font-size: 13px; }
  .generation-state > b { font-size: 12px; }
  .generation-state > small { color: var(--muted); font-size: 11px; }

  .mobile-app-nav { min-height: calc(68px + env(safe-area-inset-bottom)); padding: 7px max(10px,env(safe-area-inset-right)) max(7px,env(safe-area-inset-bottom)) max(10px,env(safe-area-inset-left)); display: grid; grid-template-columns: repeat(3,1fr); position: fixed; inset: auto 0 0; z-index: 12; border-top: 1px solid var(--line); background: rgba(255,255,255,.97); backdrop-filter: blur(18px); }
  .mobile-app-nav button,.mobile-app-nav a { min-height: 52px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border: 0; border-radius: 12px; background: transparent; color: #7a838b; font-size: 11px; text-decoration: none; cursor: pointer; }
  .mobile-app-nav span { font-size: 19px; line-height: 1; }
  .mobile-app-nav b { font-size: 11px; }
  .mobile-app-nav .active { background: #eef7fd; color: var(--blue-strong); }
  .mobile-app-nav button:disabled { opacity: .42; cursor: not-allowed; }

  .fit-lightbox { grid-template-columns: 48px minmax(0,1fr) 48px; }
  .fit-lightbox > header { min-height: calc(58px + env(safe-area-inset-top)); }
  .fit-lightbox > header button,.fit-lightbox-nav { width: 42px; height: 42px; font-size: 27px; }
  .fit-lightbox-nav { margin: 0 3px; position: relative; z-index: 2; }
  .fit-lightbox-stage { width: calc(100% + 96px); margin-left: -48px; z-index: 1; }
  .fit-lightbox-stage img { padding: 0 8px; }
}

@keyframes generation-scan { 0%,14% { left: -70%; } 70%,100% { left: 125%; } }
@keyframes generation-float { 0%,100% { transform: translateY(2px) rotate(-1deg); } 50% { transform: translateY(-5px) rotate(1deg); } }
@keyframes generation-shadow { 0%,100% { opacity: .65; transform: scaleX(.82); } 50% { opacity: .35; transform: scaleX(1); } }
@keyframes generation-draw { 0% { stroke-dashoffset: 280; fill: rgba(255,255,255,0); } 34%,78% { stroke-dashoffset: 0; fill: rgba(255,255,255,.15); } 100% { stroke-dashoffset: -280; fill: rgba(255,255,255,0); } }
@keyframes generation-pulse { 0%,100% { opacity: .55; transform: scale(.97); } 50% { opacity: 1; transform: scale(1); } }
@keyframes generation-dot { 0%,100% { opacity: .35; transform: scale(.65); } 50% { opacity: 1; transform: scale(1.25); } }
@keyframes generation-copy { 0%,5%,100% { opacity: 0; transform: translateY(7px); } 12%,27% { opacity: 1; transform: translateY(0); } 33% { opacity: 0; transform: translateY(-7px); } }

@media (max-width: 860px) and (prefers-reduced-motion: reduce), (hover: none) and (pointer: coarse) and (max-width: 1024px) and (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .generation-preview::before,.generation-preview::after,.generation-garment,.generation-garment path,.generation-orbit,.generation-orbit i,.generation-moments span { animation: none; }
  .generation-moments span:first-child { opacity: 1; transform: none; }
}

@media (max-width: 860px) and (max-height: 650px), (hover: none) and (pointer: coarse) and (max-width: 1024px) and (max-height: 650px) {
  .viewer-image > img { height: 180px; }
  .generation-state { height: 230px; }
  .generation-preview { display: none; }
  .generation-state strong { font-size: 18px; }
  .generation-state p { font-size: 11px; }
}

@media (max-width: 380px) {
  .result-complete-status { display: grid; grid-template-columns: 1fr auto; }
}

/* Admin operations console v1 */
body.admin-v2-active { min-width: 0; background: #f3f5f7; }
body.admin-v2-active .site-footer { display: none; }
body.admin-v2-active main { width: min(1440px,100%); min-height: calc(100vh - 70px); padding: 88px 28px 50px; }
.admin-v2-shell { color: #20262c; }
.admin-v2-head { padding: 28px 30px; display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; border: 1px solid #dfe4e8; border-radius: 24px; background: #fff; box-shadow: 0 18px 50px rgba(28,43,54,.06); }
.admin-v2-head > div:first-child > span,.admin-v2-section-head span,.admin-v2-card header span,.admin-v2-action-card header span { color: #087ac2; font-size: 11px; font-weight: 800; letter-spacing: .14em; }
.admin-v2-back { margin-bottom: 18px; display: block; color: #68747e; font-size: 13px; font-weight: 700; text-decoration: none; }
.admin-v2-head h1 { margin: 7px 0 5px; font-size: 36px; letter-spacing: -.05em; }
.admin-v2-head p,.admin-v2-section-head p { margin: 0; color: #707b84; font-size: 14px; line-height: 1.55; }
.admin-v2-head-meta { min-width: 190px; text-align: right; }
.admin-v2-head-meta b,.admin-v2-head-meta small { display: block; }
.admin-v2-head-meta b { font-size: 15px; }
.admin-v2-head-meta small { margin-top: 5px; color: #7b858d; font-size: 12px; }
.admin-v2-head-meta button { min-height: 44px; margin-top: 13px; padding: 0 16px; border: 1px solid #dce1e5; border-radius: 12px; background: #f7f9fa; color: #30373d; font-size: 12px; font-weight: 700; cursor: pointer; }
.admin-v2-tabs { margin: 14px 0 20px; padding: 7px; display: grid; grid-template-columns: repeat(var(--admin-tab-count,7),minmax(0,1fr)); gap: 5px; position: sticky; top: 70px; z-index: 10; border: 1px solid #dfe4e8; border-radius: 17px; background: rgba(255,255,255,.94); box-shadow: 0 12px 30px rgba(30,43,54,.06); backdrop-filter: blur(16px); }
.admin-v2-tabs button { min-height: 54px; display: flex; align-items: center; justify-content: center; gap: 7px; border: 0; border-radius: 11px; background: transparent; color: #6c7780; cursor: pointer; }
.admin-v2-tabs button span { font-size: 17px; }
.admin-v2-tabs button b { font-size: 12px; }
.admin-v2-tabs button.active { background: #161b20; color: #fff; box-shadow: 0 8px 18px rgba(22,27,32,.16); }
.admin-v2-panel { min-height: 500px; }
.admin-v2-loading,.admin-v2-detail-loading { min-height: 360px; display: grid; place-items: center; align-content: center; gap: 14px; color: #6f7a83; font-size: 13px; }
.admin-v2-loading i,.admin-v2-detail-loading i { width: 30px; height: 30px; border: 3px solid #dfe7ed; border-top-color: #0788dc; border-radius: 50%; animation: spin .8s linear infinite; }
.admin-v2-section-head { margin: 28px 2px 14px; display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.admin-v2-section-head h2 { margin: 7px 0 5px; font-size: 29px; letter-spacing: -.045em; }
.admin-v2-section-head > strong,.admin-v2-section-head > time { color: #6d7880; font-size: 13px; }
.admin-v2-section-head > select { min-height: 44px; padding: 0 36px 0 13px; border: 1px solid #dbe1e5; border-radius: 11px; background: #fff; font-size: 13px; }
.admin-v2-alert-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; }
.admin-v2-alert-grid article { min-height: 180px; padding: 21px; position: relative; overflow: hidden; border: 1px solid #dfe4e8; border-radius: 17px; background: #fff; }
.admin-v2-alert-grid article.warning { border-color: rgba(205,83,67,.28); background: linear-gradient(145deg,#fff,#fff7f5); }
.admin-v2-alert-grid article > span { padding: 5px 8px; display: inline-block; border-radius: 99px; background: #eff7ec; color: #3a7e28; font-size: 10px; font-weight: 800; }
.admin-v2-alert-grid article.warning > span { background: #fff0ed; color: #b64435; }
.admin-v2-alert-grid strong { margin-top: 18px; display: block; font-size: 38px; letter-spacing: -.05em; }
.admin-v2-alert-grid h3 { margin: 7px 0 5px; font-size: 15px; }
.admin-v2-alert-grid p { margin: 0; color: #7b858d; font-size: 12px; line-height: 1.45; }
.admin-v2-card { margin-top: 12px; padding: 20px; border: 1px solid #dfe4e8; border-radius: 18px; background: #fff; box-shadow: 0 12px 34px rgba(30,43,54,.045); }
.admin-v2-card > header { margin-bottom: 16px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.admin-v2-card header h3 { margin: 5px 0 0; font-size: 20px; letter-spacing: -.035em; }
.admin-v2-card > header > b { padding: 7px 10px; border-radius: 99px; background: #f1f4f6; color: #65717a; font-size: 11px; }
.admin-v2-metrics,.admin-v2-analytics-metrics { display: grid; grid-template-columns: repeat(4,1fr); border: 1px solid #e4e8eb; border-radius: 14px; overflow: hidden; }
.admin-v2-metrics > div,.admin-v2-analytics-metrics > div { min-height: 96px; padding: 18px; border-right: 1px solid #e4e8eb; border-bottom: 1px solid #e4e8eb; background: #fafbfc; }
.admin-v2-metrics small,.admin-v2-analytics-metrics small { display: block; color: #707b84; font-size: 12px; }
.admin-v2-metrics strong,.admin-v2-analytics-metrics strong { margin-top: 8px; display: block; font-size: 24px; letter-spacing: -.035em; }
.admin-v2-action-list { display: grid; gap: 7px; }
.admin-v2-action-list > button { min-height: 66px; padding: 10px 14px; display: grid; grid-template-columns: 9px minmax(0,1fr) auto; align-items: center; gap: 13px; border: 1px solid #e1e5e8; border-radius: 12px; background: #fff; color: inherit; text-align: left; cursor: pointer; }
.admin-v2-action-list i { width: 9px; height: 9px; border-radius: 50%; }
.admin-v2-action-list i.red { background: #d55745; box-shadow: 0 0 0 5px rgba(213,87,69,.1); }
.admin-v2-action-list i.orange { background: #d58a2f; box-shadow: 0 0 0 5px rgba(213,138,47,.1); }
.admin-v2-action-list b,.admin-v2-action-list small { display: block; }
.admin-v2-action-list b { font-size: 13px; }
.admin-v2-action-list small { margin-top: 4px; color: #77828a; font-size: 11px; }
.admin-v2-action-list em { color: #087bc4; font-size: 11px; font-style: normal; font-weight: 700; }
.admin-v2-empty,.admin-v2-error { min-height: 150px; padding: 24px; display: grid; place-items: center; align-content: center; border: 1px dashed #d4dce1; border-radius: 14px; color: #68747d; text-align: center; }
.admin-v2-empty strong,.admin-v2-error strong { color: #30373d; font-size: 15px; }
.admin-v2-empty p,.admin-v2-error p { margin: 6px 0 0; font-size: 12px; }
.admin-v2-error button { min-height: 44px; margin-top: 14px; padding: 0 16px; border: 0; border-radius: 10px; background: #171c21; color: #fff; font-weight: 700; }
.admin-v2-filters { margin-bottom: 10px; padding: 10px; display: grid; grid-template-columns: minmax(220px,1fr) 160px 160px auto; gap: 8px; border: 1px solid #dfe4e8; border-radius: 15px; background: #fff; }
.admin-v2-filters input,.admin-v2-filters select,.admin-v2-filters button,.admin-v2-role select,.admin-v2-role button { min-height: 46px; padding: 0 13px; border: 1px solid #dce2e6; border-radius: 10px; background: #f8fafb; color: #272e34; font-size: 13px; }
.admin-v2-filters button,.admin-v2-role button { border-color: #171c21; background: #171c21; color: #fff; font-weight: 700; cursor: pointer; }
.admin-v2-user-list { overflow: hidden; border: 1px solid #dfe4e8; border-radius: 15px; background: #fff; }
.admin-v2-user { width: 100%; min-height: 86px; padding: 13px 17px; display: grid; grid-template-columns: 1.25fr .75fr .9fr 1fr 18px; align-items: center; gap: 15px; border: 0; border-bottom: 1px solid #e5e9ec; background: #fff; color: #282f35; text-align: left; cursor: pointer; }
.admin-v2-user:last-child { border-bottom: 0; }
.admin-v2-user.me { background: #f4faff; }
.admin-v2-user:hover { background: #f8fafb; }
.admin-v2-user .identity { display: grid; grid-template-columns: 44px minmax(0,1fr); align-items: center; gap: 11px; }
.admin-v2-user .identity > i { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: #e8f3fb; color: #1a5e8d; font-size: 15px; font-style: normal; font-weight: 800; }
.admin-v2-user b,.admin-v2-user small { display: block; }
.admin-v2-user b { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.admin-v2-user small { margin-top: 5px; overflow: hidden; color: #77828b; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.admin-v2-user .badges { display: flex; flex-wrap: wrap; gap: 4px; }
.admin-v2-user .badges em { padding: 5px 7px; border-radius: 99px; background: #eff2f4; color: #5b6670; font-size: 9px; font-style: normal; font-weight: 800; }
.admin-v2-user .badges em.ok { background: #edf7e9; color: #397528; }
.admin-v2-user .badges em.wait { background: #fff2df; color: #9a631f; }
.admin-v2-user .badges em.mine { background: #e8f5ff; color: #0a70b6; }
.admin-v2-pagination { min-height: 60px; display: flex; align-items: center; justify-content: center; gap: 14px; }
.admin-v2-pagination button { min-width: 80px; min-height: 42px; border: 1px solid #dce2e6; border-radius: 10px; background: #fff; color: #323a40; cursor: pointer; }
.admin-v2-pagination button:disabled { opacity: .4; cursor: not-allowed; }
.admin-v2-pagination span { color: #6d7881; font-size: 12px; }
.admin-v2-job-list { overflow: hidden; border: 1px solid #dfe4e8; border-radius: 15px; background: #fff; }
.admin-v2-job-list article { min-height: 78px; padding: 13px 16px; display: grid; grid-template-columns: 90px 1.2fr .7fr .7fr 1fr; align-items: center; gap: 15px; border-bottom: 1px solid #e5e9ec; }
.admin-v2-job-list article:last-child { border-bottom: 0; }
.admin-v2-job-list b,.admin-v2-job-list small { display: block; }
.admin-v2-job-list b { font-size: 12px; }
.admin-v2-job-list small { margin-top: 4px; overflow: hidden; color: #7b858d; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.admin-v2-status { padding: 7px 9px; display: inline-block; justify-self: start; border-radius: 99px; background: #eef1f3; color: #5f6972; font-size: 10px; font-weight: 800; white-space: nowrap; }
.admin-v2-status.status-completed,.admin-v2-status.status-active,.admin-v2-status.status-paid { background: #edf7e9; color: #3d782c; }
.admin-v2-status.status-failed,.admin-v2-status.status-past_due,.admin-v2-status.status-suspended,.admin-v2-status.status-declined { background: #fff0ee; color: #b4493b; }
.admin-v2-status.status-processing,.admin-v2-status.status-payment_pending,.admin-v2-status.status-pending_reconciliation { background: #eaf5fd; color: #1675b4; }
.admin-v2-status.status-approval_pending,.admin-v2-status.status-requested { background: #fff2df; color: #96611e; }
.admin-v2-status.status-succeeded,.admin-v2-status.status-refunded,.admin-v2-status.status-cancelled { background: #edf1f3; color: #4e5b64; }
.admin-v2-status.status-rejected { background: #fff0ee; color: #b4493b; }
.admin-v2-analytics-metrics { margin-bottom: 12px; grid-template-columns: repeat(6,1fr); border-radius: 15px; background: #fff; }
.admin-v2-analytics-metrics > div { min-height: 105px; background: #fff; }
.admin-v2-analytics-grid { display: grid; grid-template-columns: 1.4fr .8fr; gap: 12px; }
.admin-v2-funnel { display: grid; gap: 14px; }
.admin-v2-funnel > div { display: grid; grid-template-columns: 100px 1fr 42px; align-items: center; gap: 12px; }
.admin-v2-funnel span b,.admin-v2-funnel span small { display: block; }
.admin-v2-funnel span b { font-size: 12px; }
.admin-v2-funnel span small { margin-top: 3px; color: #78838b; font-size: 10px; }
.admin-v2-funnel i { height: 13px; overflow: hidden; border-radius: 99px; background: #edf1f4; }
.admin-v2-funnel em { height: 100%; display: block; border-radius: inherit; background: linear-gradient(90deg,#097fd0,#72b8e5); }
.admin-v2-funnel > div > strong { font-size: 13px; text-align: right; }
.admin-v2-segments { display: grid; gap: 7px; }
.admin-v2-segments > div { min-height: 48px; padding: 0 12px; display: flex; align-items: center; justify-content: space-between; border-radius: 10px; background: #f6f8f9; }
.admin-v2-segments span { color: #626e77; font-size: 12px; }
.admin-v2-segments strong { font-size: 18px; }
.admin-v2-device-list { display: grid; grid-template-columns: repeat(3,1fr); gap: 7px; }
.admin-v2-device-list > div { padding: 13px; display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; border-radius: 10px; background: #f6f8f9; }
.admin-v2-device-list span { font-size: 11px; }
.admin-v2-device-list b { font-size: 12px; }
.admin-v2-device-list small { color: #7b858d; font-size: 10px; }
.admin-v2-billing-list { display: grid; gap: 6px; }
.admin-v2-billing-list > button { min-height: 68px; padding: 10px 13px; display: grid; grid-template-columns: 1.2fr .7fr .55fr 1fr; align-items: center; gap: 12px; border: 1px solid #e3e7ea; border-radius: 11px; background: #fff; color: #2b3238; text-align: left; cursor: pointer; }
.admin-v2-billing-list b,.admin-v2-billing-list small { display: block; }
.admin-v2-billing-list b { font-size: 12px; }
.admin-v2-billing-list small { margin-top: 4px; color: #78838b; font-size: 10px; }
.admin-v2-audit { display: grid; gap: 7px; }
.admin-v2-audit article { min-height: 76px; padding: 14px 16px; display: grid; grid-template-columns: 10px 1fr minmax(130px,.5fr); align-items: center; gap: 14px; border: 1px solid #dfe4e8; border-radius: 13px; background: #fff; }
.admin-v2-audit article > i { width: 9px; height: 9px; border-radius: 50%; background: #1584cb; }
.admin-v2-audit h3,.admin-v2-audit p { margin: 0; }
.admin-v2-audit b { font-size: 13px; }
.admin-v2-audit p { margin-top: 4px; color: #59656e; font-size: 11px; }
.admin-v2-audit small { margin-top: 5px; display: block; color: #818b92; font-size: 10px; }
.admin-v2-audit summary { color: #0877bb; font-size: 11px; cursor: pointer; }
.admin-v2-audit pre { max-height: 220px; padding: 9px; overflow: auto; border-radius: 8px; background: #171c21; color: #dce6ed; font-size: 9px; }
.admin-v2-content-card { margin-top: 0; }
.admin-v2-detail-modal { z-index: 31; padding: 18px; align-items: stretch; justify-content: flex-end; background: rgba(20,27,33,.35); }
.admin-v2-detail-modal > section { width: min(720px,100%); height: calc(100vh - 36px); display: flex; flex-direction: column; overflow: hidden; border-radius: 22px; background: #f4f6f7; box-shadow: -20px 20px 70px rgba(20,27,33,.2); }
.admin-v2-detail-modal > section > header { min-height: 92px; padding: 18px 20px; display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; border-bottom: 1px solid #dde3e7; background: #fff; }
.admin-v2-detail-modal header > div > span { color: #087ac2; font-size: 10px; font-weight: 800; letter-spacing: .13em; }
.admin-v2-detail-modal h2 { margin: 6px 0 3px; font-size: 25px; letter-spacing: -.04em; }
.admin-v2-detail-modal header p { margin: 0; color: #78838b; font-size: 11px; }
.admin-v2-detail-modal header button,.admin-v2-action-card header button { width: 44px; height: 44px; flex: 0 0 44px; border: 1px solid #dce2e6; border-radius: 50%; background: #f7f9fa; color: #394047; font-size: 24px; cursor: pointer; }
.admin-v2-detail-scroll { padding: 14px; overflow-y: auto; }
.admin-v2-credit-hero { min-height: 126px; padding: 22px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-radius: 17px; background: linear-gradient(135deg,#192128,#2b3943); color: #fff; }
.admin-v2-credit-hero small { color: #a9c8dc; font-size: 11px; }
.admin-v2-credit-hero strong { margin-top: 5px; display: block; font-size: 32px; letter-spacing: -.04em; }
.admin-v2-credit-hero p { margin: 6px 0 0; color: #c6d3db; font-size: 12px; }
.admin-v2-credit-hero > b { padding: 7px 10px; border-radius: 99px; background: rgba(113,205,90,.18); color: #b4ec9f; font-size: 10px; }
.admin-v2-credit-hero.anomaly > b { background: rgba(240,121,93,.2); color: #ffc1b2; }
.admin-v2-detail-actions { margin: 8px 0 2px; display: grid; grid-template-columns: repeat(3,1fr); gap: 7px; }
.admin-v2-detail-actions button { min-height: 48px; border: 1px solid #dce2e6; border-radius: 11px; background: #fff; color: #30383f; font-size: 11px; font-weight: 700; cursor: pointer; }
.admin-v2-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.admin-v2-card dl { margin: 0; }
.admin-v2-card dl > div { min-height: 40px; display: flex; align-items: center; justify-content: space-between; gap: 14px; border-bottom: 1px solid #edf0f2; }
.admin-v2-card dt { color: #737e86; font-size: 11px; }
.admin-v2-card dd { margin: 0; font-size: 11px; font-weight: 700; text-align: right; }
.admin-v2-muted { color: #758088; font-size: 12px; }
.admin-v2-ledger { display: grid; }
.admin-v2-ledger > div { min-height: 59px; display: grid; grid-template-columns: 1fr 70px 130px; align-items: center; gap: 12px; border-bottom: 1px solid #edf0f2; }
.admin-v2-ledger b,.admin-v2-ledger small { display: block; }
.admin-v2-ledger b { font-size: 11px; }
.admin-v2-ledger small { margin-top: 4px; color: #7d878e; font-size: 9px; }
.admin-v2-ledger em { color: #3e7e2c; font-size: 14px; font-style: normal; font-weight: 800; text-align: right; }
.admin-v2-ledger em.minus { color: #b74d40; }
.admin-v2-timeline { display: grid; }
.admin-v2-timeline > div { min-height: 54px; display: grid; grid-template-columns: 9px 1fr auto; align-items: center; gap: 11px; border-bottom: 1px solid #edf0f2; }
.admin-v2-timeline i { width: 8px; height: 8px; border: 2px solid #48a0d8; border-radius: 50%; }
.admin-v2-timeline b,.admin-v2-timeline small { display: block; }
.admin-v2-timeline b { font-size: 11px; }
.admin-v2-timeline small,.admin-v2-timeline time { margin-top: 3px; color: #7d878e; font-size: 9px; }
.admin-v2-role { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.admin-v2-action-modal { z-index: 45; }
.admin-v2-action-card { width: min(470px,calc(100% - 24px)); padding: 22px; border-radius: 19px; background: #fff; box-shadow: 0 28px 80px rgba(17,24,30,.25); }
.admin-v2-action-card > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.admin-v2-action-card h3 { margin: 6px 0 0; font-size: 23px; letter-spacing: -.04em; }
.admin-v2-action-card > p { margin: 16px 0; color: #68747c; font-size: 12px; line-height: 1.55; }
.admin-v2-action-card label { margin-top: 12px; display: block; }
.admin-v2-action-card label > span { margin-bottom: 7px; display: block; color: #545f68; font-size: 11px; font-weight: 700; }
.admin-v2-action-card label b { color: #b94c3e; }
.admin-v2-action-card input,.admin-v2-action-card select,.admin-v2-action-card textarea { width: 100%; min-height: 48px; padding: 12px; border: 1px solid #d7dee3; border-radius: 11px; background: #fafbfc; color: #252c32; font: inherit; font-size: 13px; }
.admin-v2-action-preview { margin-top: 12px; padding: 12px; border-radius: 10px; background: #eef6fb; color: #25668f; font-size: 11px; line-height: 1.45; }
.admin-v2-action-card footer { margin-top: 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.admin-v2-action-card footer button { min-height: 48px; border: 1px solid #dbe1e5; border-radius: 11px; background: #f5f7f8; color: #333b41; font-weight: 700; cursor: pointer; }
.admin-v2-action-card footer button.danger { border-color: #171c21; background: #171c21; color: #fff; }
.admin-v2-system-list { display: grid; }
.admin-v2-system-list > div { min-height: 58px; display: grid; grid-template-columns: 10px 1fr auto; align-items: center; gap: 12px; border-bottom: 1px solid #edf0f2; }
.admin-v2-system-list i { width: 9px; height: 9px; border-radius: 50%; background: #45a342; }
.admin-v2-system-list .warning i { background: #d8634d; }
.admin-v2-system-list b,.admin-v2-system-list small { display: block; }
.admin-v2-system-list b { font-size: 12px; }
.admin-v2-system-list small { margin-top: 4px; color: #758088; font-size: 11px; }
.admin-v2-system-list em { color: #397b35; font-size: 11px; font-style: normal; font-weight: 800; }
.admin-v2-system-list .warning em { color: #b94c3e; }
.admin-v2-webhook { min-height: 74px; padding: 11px 4px; display: grid; grid-template-columns: 1.2fr 1.2fr .7fr 1fr; align-items: center; gap: 12px; border-bottom: 1px solid #edf0f2; }
.admin-v2-webhook b,.admin-v2-webhook small { display: block; overflow-wrap: anywhere; }
.admin-v2-webhook b { font-size: 11px; }
.admin-v2-webhook small { margin-top: 4px; color: #7b858d; font-size: 10px; }
.admin-v2-refund-card { max-height: min(760px,calc(100dvh - 24px)); overflow-y: auto; }
.admin-v2-refund-summary { margin-top: 16px; padding: 15px; display: grid; gap: 5px; border: 1px solid #dbe3e8; border-radius: 12px; background: #f7f9fa; }
.admin-v2-refund-summary b { font-size: 13px; }
.admin-v2-refund-summary span { color: #69757d; font-size: 11px; }
.admin-v2-refund-summary strong { margin-top: 5px; color: #176e9f; font-size: 18px; }
.admin-v2-refund-warning { margin-top: 10px; padding: 14px; border-radius: 12px; background: #fff2ee; color: #853f33; }
.admin-v2-refund-warning b { font-size: 12px; }
.admin-v2-refund-warning p { margin: 5px 0 0; font-size: 11px; line-height: 1.55; }
.admin-v2-refund-card label small { margin-top: 6px; display: block; color: #8a4c3e; font-size: 11px; }

@media (max-width: 900px) {
  body.admin-v2-active .topbar { display: none; }
  body.admin-v2-active main { padding: 12px 0 82px; }
  .admin-v2-head { margin: 0 12px; padding: 20px; display: block; border-radius: 18px; }
  .admin-v2-head h1 { font-size: 30px; }
  .admin-v2-head p { font-size: 12px; }
  .admin-v2-head-meta { margin-top: 18px; padding-top: 14px; display: flex; align-items: center; justify-content: space-between; border-top: 1px solid #e5e9ec; text-align: left; }
  .admin-v2-head-meta button { margin-top: 0; }
  .admin-v2-tabs { margin: 10px 0 14px; padding: 5px max(22px,env(safe-area-inset-right)) max(5px,env(safe-area-inset-bottom)) max(6px,env(safe-area-inset-left)); grid-template-columns: repeat(var(--admin-tab-count,7),minmax(70px,1fr)); position: fixed; inset: auto 0 0; top: auto; overflow-x: auto; scrollbar-width: none; border-radius: 0; z-index: 20; box-shadow: 0 -10px 24px rgba(31,43,52,.1); }
  .admin-v2-tabs::-webkit-scrollbar { display: none; }
  .admin-v2-tabs button { min-height: 58px; flex-direction: column; gap: 2px; }
  .admin-v2-tabs button b { font-size: 10px; white-space: nowrap; }
  .admin-v2-panel { padding: 0 12px; }
  .admin-v2-section-head { align-items: flex-start; }
  .admin-v2-section-head h2 { font-size: 25px; }
  .admin-v2-section-head p { font-size: 12px; }
  .admin-v2-alert-grid { grid-template-columns: 1fr 1fr; }
  .admin-v2-alert-grid article { min-height: 155px; padding: 16px; }
  .admin-v2-metrics { grid-template-columns: 1fr 1fr; }
  .admin-v2-metrics > div { min-height: 88px; }
  .admin-v2-filters { grid-template-columns: 1fr 1fr; }
  .admin-v2-filters input { grid-column: 1/-1; }
  .admin-v2-filters button { grid-column: 1/-1; }
  .admin-v2-user { min-height: 148px; grid-template-columns: 1fr auto; gap: 9px; }
  .admin-v2-user .identity { grid-column: 1; }
  .admin-v2-user .badges { grid-column: 2; justify-content: end; }
  .admin-v2-user .credit,.admin-v2-user .activity { padding-top: 9px; border-top: 1px solid #edf0f2; }
  .admin-v2-user > strong { display: none; }
  .admin-v2-job-list article { padding: 14px; grid-template-columns: 90px 1fr; gap: 10px; }
  .admin-v2-job-list article .error { grid-column: 1/-1; }
  .admin-v2-analytics-metrics { grid-template-columns: 1fr 1fr; }
  .admin-v2-analytics-grid { grid-template-columns: 1fr; }
  .admin-v2-device-list { grid-template-columns: 1fr; }
  .admin-v2-billing-list > button { min-height: 110px; grid-template-columns: 1fr 1fr; }
  .admin-v2-webhook { min-height: 110px; grid-template-columns: 1fr 1fr; }
  .admin-v2-audit article { grid-template-columns: 9px 1fr; }
  .admin-v2-audit details { grid-column: 2; }
  .admin-v2-detail-modal { padding: 0; }
  .admin-v2-detail-modal > section { width: 100%; height: 100dvh; border-radius: 0; }
  .admin-v2-detail-modal > section > header { padding-top: max(16px,env(safe-area-inset-top)); }
  .admin-v2-detail-scroll { padding: 10px 10px max(18px,env(safe-area-inset-bottom)); }
  .admin-v2-detail-actions { grid-template-columns: 1fr; }
  .admin-v2-detail-actions button { min-height: 50px; }
  .admin-v2-detail-grid { grid-template-columns: 1fr; }
  .admin-v2-ledger > div { grid-template-columns: 1fr 50px 90px; }
  .admin-v2-ledger small,.admin-v2-timeline small,.admin-v2-timeline time { font-size: 11px; }
  .admin-v2-content-card { padding: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .admin-v2-loading i,.admin-v2-detail-loading i { animation: none; }
}

@media (max-width: 380px) {
  .admin-v2-panel { padding: 0 9px; }
  .admin-v2-head { margin: 0 9px; }
  .admin-v2-alert-grid { gap: 7px; }
  .admin-v2-alert-grid article { min-height: 148px; padding: 13px; }
  .admin-v2-alert-grid strong { font-size: 31px; }
  .admin-v2-alert-grid h3 { font-size: 13px; }
  .admin-v2-card { padding: 14px; }
  .admin-v2-funnel > div { grid-template-columns: 74px 1fr 30px; gap: 7px; }
  .admin-v2-credit-hero { padding: 17px; }
  .admin-v2-credit-hero strong { font-size: 27px; }
}
