/* Sutra — Sanu's Art of Stitching · editorial couture, mobile-first */
:root {
  --ivory: #faf6f0;
  --paper: #fffdf9;
  --sand: #efe5d7;
  --line: #e6dccd;
  --ink: #221a1e;
  --ink-2: #5a4c52;
  --muted: #8b7d82;
  --wine: #5b1530;
  --wine-2: #7a2347;
  --wine-soft: #f4e7ea;
  --gold: #b08d57;
  --gold-2: #d6b67a;
  --ok: #2f6b4f;
  --err: #a32035;
  --wa: #1f9d57;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(60, 20, 35, .05), 0 8px 24px rgba(60, 20, 35, .07);
  --shadow-lg: 0 20px 50px rgba(60, 20, 35, .18);
  --serif: 'Cormorant Garamond', 'Times New Roman', serif;
  --sans: 'Jost', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --col: 560px;
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--ivory); color: var(--ink); font: 400 16px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased; min-height: 100dvh;
  -webkit-tap-highlight-color: transparent;
}
body.has-nav { padding-bottom: calc(76px + var(--safe-b)); }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
svg { display: block; }
h1, h2, h3, h4 { margin: 0; font-weight: 500; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; z-index: 99; background: var(--paper); padding: 8px 12px; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

#view { max-width: var(--col); margin: 0 auto; padding: 8px 16px 32px; outline: none; }
.splash { min-height: 80dvh; display: grid; place-items: center; }

/* ---------- brand ---------- */
.brand { display: inline-flex; flex-direction: column; align-items: center; line-height: 1; }
.brand-name { font-family: var(--serif); font-weight: 500; letter-spacing: .42em; padding-left: .42em; color: var(--wine); font-size: 22px; }
.brand-tag { font-family: var(--sans); font-size: 9.5px; letter-spacing: .28em; text-transform: uppercase; color: var(--gold); margin-top: 6px; white-space: nowrap; }
.brand.sm .brand-name { font-size: 19px; } .brand.sm .brand-tag { font-size: 8px; margin-top: 4px; }
.brand.lg .brand-name { font-size: 34px; } .brand.lg .brand-tag { font-size: 10.5px; }
.brand.xl .brand-name { font-size: 46px; } .brand.xl .brand-tag { font-size: 11.5px; margin-top: 10px; }

/* ---------- type ---------- */
.display { font-family: var(--serif); font-weight: 500; font-size: 38px; line-height: 1.05; letter-spacing: -.01em; }
.display em { font-style: italic; color: var(--wine); }
.display.sm { font-size: 30px; }
.eyebrow { font-size: 11px; letter-spacing: .24em; text-transform: uppercase; color: var(--gold); margin: 0 0 8px; font-weight: 500; }
.eyebrow.light { color: var(--gold-2); }
.lead { color: var(--ink-2); font-size: 16.5px; font-weight: 300; }
.muted { color: var(--muted); margin: 6px 0 0; }
.fine { font-size: 12.5px; color: var(--muted); display: flex; gap: 6px; align-items: flex-start; }
.fine svg { width: 16px; flex: none; margin-top: 1px; }
.center { justify-content: center; text-align: center; }
.link { color: var(--wine); font-weight: 500; background: none; border: 0; padding: 0; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(91, 21, 48, .3); }

/* ---------- top & tab bars ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: calc(8px + env(safe-area-inset-top, 0px)) 16px 8px; background: rgba(250, 246, 240, .88);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid rgba(230, 220, 205, .6);
}
.top-title { font-family: var(--serif); font-size: 22px; font-weight: 500; }
.icon-btn, .icon-spacer { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; }
.icon-btn svg { width: 24px; }
.icon-btn:active { background: var(--sand); }
.avatar-btn { width: 38px; height: 38px; border-radius: 50%; overflow: hidden; background: var(--wine); color: #fff; display: grid; place-items: center; font-family: var(--serif); font-size: 18px; border: 2px solid var(--paper); box-shadow: 0 0 0 1px var(--gold-2); }
.avatar-btn img { width: 100%; height: 100%; object-fit: cover; }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; justify-content: space-around; align-items: flex-end;
  padding: 6px 6px calc(8px + var(--safe-b)); background: rgba(255, 253, 249, .94); border-top: 1px solid var(--line);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.tabbar a { flex: 1; max-width: 96px; display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 10.5px; letter-spacing: .04em; color: var(--muted); padding: 4px 0; }
.tabbar a svg { width: 24px; height: 24px; }
.tabbar a.active { color: var(--wine); }
.tabbar a.tab-cta svg { width: 48px; height: 48px; padding: 12px; margin-top: -22px; border-radius: 50%; background: var(--wine); color: #fff; box-shadow: 0 8px 20px rgba(91, 21, 48, .35); }
.tabbar a.tab-cta.active svg { background: var(--wine-2); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 22px; border-radius: 999px;
  border: 1px solid transparent; font-size: 14px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; transition: transform .15s, background .2s, box-shadow .2s;
  position: relative; user-select: none; text-align: center;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn:active { transform: scale(.98); }
.btn.block { width: 100%; }
.btn.sm { min-height: 38px; padding: 0 16px; font-size: 12px; }
.btn.primary { background: var(--wine); color: #fff; box-shadow: 0 6px 18px rgba(91, 21, 48, .22); }
.btn.primary:hover { background: var(--wine-2); }
.btn.ghost { border-color: var(--wine); color: var(--wine); background: transparent; }
.btn.soft { background: var(--wine-soft); color: var(--wine); }
.btn.light { background: #fff; color: var(--wine); }
.btn.text { background: none; color: var(--ink-2); text-transform: none; letter-spacing: .01em; font-size: 14.5px; padding: 0 10px; min-height: 42px; }
.btn.danger, .btn.text.danger { color: var(--err); }
.btn.danger-solid { background: var(--err); color: #fff; }
.btn.whatsapp { background: var(--wa); color: #fff; }
.btn[disabled] { opacity: .55; pointer-events: none; }
.btn.loading { color: transparent !important; }
.btn.loading::after { content: ''; position: absolute; width: 18px; height: 18px; border-radius: 50%; border: 2px solid currentColor; border-color: rgba(255,255,255,.9) rgba(255,255,255,.9) transparent; animation: spin .7s linear infinite; }
.btn.ghost.loading::after, .btn.soft.loading::after, .btn.text.loading::after { border-color: var(--wine) var(--wine) transparent; }
@keyframes spin { to { transform: rotate(360deg); } }
.stack { display: grid; gap: 12px; margin: 26px 0; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.row-2:has(> :only-child) { grid-template-columns: 1fr; }
.row-2 .btn { padding: 0 12px; font-size: 12.5px; letter-spacing: .05em; }
.row-end { display: flex; justify-content: flex-end; margin: -4px 0 16px; font-size: 14px; }
.mt { margin-top: 12px; }

/* ---------- forms ---------- */
.field { display: block; margin-bottom: 16px; }
.field > span { display: block; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 7px; font-weight: 500; }
.field > span small { text-transform: none; letter-spacing: 0; color: var(--muted); font-weight: 400; font-size: 12.5px; }
.field input, .field textarea, .field select, .admin-update select, .admin-update input {
  width: 100%; min-height: 52px; padding: 13px 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--paper);
  font: 400 16px/1.3 var(--sans); color: var(--ink); transition: border-color .2s, box-shadow .2s; appearance: none;
}
.field textarea { resize: vertical; min-height: 96px; }
.field input:focus, .field textarea:focus, .admin-update :is(input, select):focus { outline: none; border-color: var(--wine); box-shadow: 0 0 0 4px rgba(91, 21, 48, .08); }
.field input:disabled { background: var(--sand); color: var(--muted); }
.field.sm { margin-bottom: 0; } .field.sm input { min-height: 46px; }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 52px; }
.pw-toggle { position: absolute; right: 4px; top: 4px; width: 44px; height: 44px; border: 0; background: none; color: var(--muted); display: grid; place-items: center; }
.pw-toggle svg { width: 20px; }
.meter { height: 4px; background: var(--sand); border-radius: 4px; margin-top: 8px; overflow: hidden; }
.meter i { display: block; height: 100%; width: 0; background: var(--err); transition: width .25s, background .25s; }
.meter[data-s="1"] i { width: 25%; } .meter[data-s="2"] i { width: 50%; background: #c98a2a; }
.meter[data-s="3"] i { width: 75%; background: #6e9a4a; } .meter[data-s="4"] i { width: 100%; background: var(--ok); }
.hint { display: block; font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.form-error { color: var(--err); font-size: 14px; background: #fbeef0; padding: 10px 14px; border-radius: 10px; margin: 0 0 14px; }
.prefix { display: flex; align-items: center; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--paper); padding-left: 14px; }
.prefix b { color: var(--muted); font-weight: 400; }
.prefix input { border: 0 !important; box-shadow: none !important; padding-left: 4px; }
.prefix:focus-within { border-color: var(--wine); box-shadow: 0 0 0 4px rgba(91, 21, 48, .08); }
.check { display: flex; gap: 10px; align-items: center; margin: 0 0 16px; font-size: 15px; }
.check input { width: 20px; height: 20px; accent-color: var(--wine); }
.notice { background: var(--paper); border: 1px solid var(--line); border-left: 3px solid var(--gold); padding: 16px; border-radius: var(--radius-sm); }
.notice p { margin: 6px 0 0; color: var(--ink-2); }

/* ---------- chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 4px; }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px 16px; padding: 2px 16px; scrollbar-width: none; }
.chips.scroll::-webkit-scrollbar { display: none; }
.chip { flex: none; min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); font-size: 14px; display: inline-flex; align-items: center; color: var(--ink-2); transition: all .2s; }
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ---------- welcome & auth ---------- */
.welcome { display: grid; gap: 8px; padding-top: 8px; }
.welcome-figure { height: 46dvh; min-height: 320px; display: grid; place-items: center; animation: rise .9s ease both; }
.welcome-figure svg { height: 100%; width: auto; filter: drop-shadow(0 18px 30px rgba(91, 21, 48, .12)); }
.welcome-copy { text-align: center; animation: rise .9s .1s ease both; }
.welcome-copy .display { margin: 22px 0 12px; font-size: 40px; }
.feature-list { list-style: none; padding: 0; margin: 10px 0 0; text-align: left; border-top: 1px solid var(--line); }
.feature-list li { display: flex; gap: 16px; padding: 14px 4px; border-bottom: 1px solid var(--line); color: var(--ink-2); font-size: 15px; }
.feature-list b { font-family: var(--serif); color: var(--gold); font-size: 18px; font-weight: 500; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.auth { margin: 0 -16px; }
.auth-hero { position: relative; height: 230px; overflow: hidden; background: linear-gradient(180deg, #f3e9dc, var(--ivory)); display: flex; align-items: center; justify-content: center; gap: 10px; }
.auth-hero svg { height: 125%; width: auto; margin-top: 70px; position: absolute; left: 50%; transform: translateX(-120%); opacity: .95; }
.auth-hero-text { position: relative; margin-left: 110px; }
.auth-card { background: var(--paper); border-radius: 26px 26px 0 0; margin-top: -24px; position: relative; padding: 28px 20px 24px; box-shadow: 0 -10px 30px rgba(60, 20, 35, .05); min-height: 60dvh; }
.auth-card .display { margin-bottom: 4px; }
.auth-card form { margin-top: 22px; }
.switch { text-align: center; color: var(--muted); margin-top: 22px; }

/* ---------- home ---------- */
.banner { display: block; background: var(--wine-soft); color: var(--wine); padding: 12px 14px; border-radius: var(--radius-sm); font-size: 14px; margin: 8px 0; }
.banner.gold { background: #f7eedd; color: #7a5a24; }
.hello { padding: 18px 2px 18px; }
.hero-card { display: flex; align-items: stretch; background: radial-gradient(120% 140% at 100% 0%, #8a2c55 0%, var(--wine) 45%, #3c0d20 100%); color: #fff; border-radius: 24px; padding: 24px; position: relative; overflow: hidden; box-shadow: var(--shadow-lg); }
.hero-card::after { content: ''; position: absolute; inset: 10px; border: 1px solid rgba(214, 182, 122, .35); border-radius: 18px; pointer-events: none; }
.hero-card h3 { font-family: var(--serif); font-size: 32px; line-height: 1.05; margin-bottom: 6px; }
.hero-card p { margin: 0 0 18px; color: rgba(255, 255, 255, .78); font-weight: 300; }
.hero-card-text { flex: 1; position: relative; z-index: 1; }
.hero-card-art { width: 110px; color: var(--gold-2); opacity: .85; align-self: center; }
.block { margin-top: 30px; }
.block-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; }
.block-head h3 { font-family: var(--serif); font-size: 24px; }
.hscroll { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -16px; padding: 4px 16px 10px; scrollbar-width: none; }
.hscroll::-webkit-scrollbar { display: none; }
.hscroll > * { scroll-snap-align: start; flex: none; }
.look-card { width: 150px; background: var(--paper); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: block; }
.look-grid .look-card { width: auto; }
.look-art { height: 210px; background: linear-gradient(#f7efe4, #efe3d3); display: grid; place-items: center; overflow: hidden; }
.look-art svg { height: 100%; width: auto; }
.look-art .fabric-thumb { width: 100%; height: 100%; object-fit: cover; }
.look-meta { padding: 10px 12px 12px; }
.look-meta b { display: block; font-weight: 500; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.look-meta span { font-size: 12px; color: var(--muted); }
.look-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.order-mini { display: flex; gap: 12px; align-items: center; background: var(--paper); border-radius: var(--radius); padding: 10px; width: 250px; box-shadow: var(--shadow); }
.order-mini img { width: 62px; height: 62px; border-radius: 12px; object-fit: cover; }
.order-mini b { display: block; font-weight: 500; font-size: 14.5px; }
.order-mini small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.chip-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.style-pill { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 6px 10px; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); }
.style-pill .dress-icon { width: 30px; height: 38px; color: var(--wine); }
.contact-card { margin-top: 26px; display: flex; gap: 14px; align-items: center; padding: 16px; border-radius: var(--radius); background: #eaf6ef; color: #17643a; }
.contact-card svg { width: 30px; flex: none; }
.contact-card b { display: block; font-weight: 500; } .contact-card span { font-size: 13.5px; opacity: .8; }
.empty { text-align: center; padding: 50px 20px; color: var(--ink-2); }
.empty > svg { width: 64px; height: 64px; margin: 0 auto 12px; color: var(--gold); }
.empty h3 { font-family: var(--serif); font-size: 26px; margin-bottom: 4px; }
.empty p { color: var(--muted); margin: 0 0 20px; }
.empty.small { padding: 22px; background: var(--paper); border: 1px dashed var(--line); border-radius: var(--radius); }
.empty.small p { margin: 0; }

/* ---------- studio ---------- */
.studio-intro { padding: 14px 2px 18px; }
.dropzone { position: relative; aspect-ratio: 4 / 3.4; border-radius: 22px; border: 1.5px dashed var(--gold); background: repeating-linear-gradient(45deg, var(--paper), var(--paper) 12px, #fbf5ec 12px, #fbf5ec 24px); display: grid; place-items: center; overflow: hidden; cursor: pointer; transition: border-color .2s; }
.dropzone.over { border-color: var(--wine); }
.dropzone img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.dropzone.busy::after { content: 'Reading your fabric…'; position: absolute; inset: 0; display: grid; place-items: center; background: rgba(34, 26, 30, .45); color: #fff; font-family: var(--serif); font-size: 24px; font-style: italic; animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { background: rgba(91, 21, 48, .55); } }
.dz-empty { text-align: center; color: var(--ink-2); }
.dz-icon { width: 64px; height: 64px; border-radius: 50%; background: var(--wine-soft); color: var(--wine); display: grid; place-items: center; margin: 0 auto 12px; }
.dz-icon svg { width: 30px; }
.dz-empty p { margin: 0; } .dz-empty small { color: var(--muted); }
.tips-list { margin: 18px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.tips-list li { position: relative; padding-left: 22px; color: var(--ink-2); font-size: 14.5px; }
.tips-list li::before { content: '✦'; position: absolute; left: 0; color: var(--gold); font-size: 12px; top: 2px; }
.fabric-card { display: flex; gap: 14px; align-items: center; background: var(--paper); border-radius: var(--radius); padding: 10px; box-shadow: var(--shadow); margin-bottom: 18px; }
.fabric-card img { width: 72px; height: 72px; border-radius: 12px; object-fit: cover; }
.palette { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.palette-name { width: 100%; font-size: 13.5px; color: var(--ink-2); font-family: var(--serif); font-style: italic; font-size: 17px; }
.swatch { width: 26px; height: 26px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); display: inline-block; flex: none; }
.swatch.sm { width: 20px; height: 20px; }
.dress-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.dress-card { text-align: left; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 14px; display: flex; flex-direction: column; gap: 4px; transition: all .2s; position: relative; }
.dress-card .dress-icon { width: 40px; height: 50px; color: var(--wine); margin-bottom: 8px; }
.dress-card b { font-weight: 500; font-size: 15.5px; }
.dress-card small { color: var(--muted); font-size: 12.5px; line-height: 1.35; }
.dress-card.selected, .dress-card:active { border-color: var(--wine); box-shadow: 0 0 0 3px rgba(91, 21, 48, .08); }
.dress-card.loading::after { content: ''; position: absolute; top: 14px; right: 14px; width: 16px; height: 16px; border: 2px solid var(--wine); border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }

.style-layout { display: grid; grid-template-columns: 42% 1fr; gap: 14px; align-items: start; }
.mini-stage { position: sticky; top: 72px; height: 380px; display: grid; place-items: center; }
.mini-stage svg { height: 100%; width: auto; }
.style-controls h4 { font-size: 11.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-2); margin: 4px 0 10px; font-weight: 500; }
.style-controls .chips { margin-bottom: 20px; }
.style-controls .chip { min-height: 36px; padding: 0 13px; font-size: 13.5px; }
.sticky-cta { position: sticky; bottom: calc(84px + var(--safe-b)); margin-top: 18px; z-index: 5; }

/* ---------- look ---------- */
.look-stage { position: relative; margin: 0 -16px; height: min(68dvh, 620px); min-height: 440px; background: radial-gradient(80% 60% at 50% 35%, #fffaf2, #f1e6d6 70%, #eadcc8); overflow: hidden; }
.stage { height: 100%; display: grid; place-items: center; padding: 10px 0 0; }
.stage svg { height: 100%; width: auto; animation: rise .6s ease both; }
.stage-badges { position: absolute; top: 14px; left: 16px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; }
.badge.ghost { background: rgba(255, 255, 255, .8); color: var(--ink-2); backdrop-filter: blur(6px); }
.badge.metal { background: var(--c); color: #2a2024; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
.photo-chip { position: absolute; right: 14px; top: 14px; display: flex; align-items: center; gap: 8px; border: 0; padding: 4px 12px 4px 4px; border-radius: 999px; background: rgba(255,255,255,.9); font-size: 12.5px; box-shadow: var(--shadow); }
.photo-chip img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; }
.panel { background: var(--paper); border-radius: var(--radius); padding: 18px 16px; margin-top: 14px; box-shadow: var(--shadow); }
.look-stage + .panel { margin-top: -26px; position: relative; }
.panel h3 { font-family: var(--serif); font-size: 23px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 14px; }
.model-row { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.model-me { flex: none; border: 0; background: none; padding: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 11px; color: var(--muted); }
.model-me img, .model-me span { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; background: var(--wine-soft); color: var(--wine); display: grid; place-items: center; font-family: var(--serif); font-size: 17px; box-shadow: 0 0 0 2px var(--paper), 0 0 0 3px var(--line); }
.model-me.on img, .model-me.on span { box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--wine); }
.skin-row { display: flex; gap: 8px; flex-wrap: wrap; }
.skin { width: 34px; height: 34px; border-radius: 50%; border: 0; box-shadow: 0 0 0 2px var(--paper), 0 0 0 3px var(--line); transition: box-shadow .2s, transform .2s; padding: 0; position: relative; }
.skin.on { box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--wine); transform: scale(1.06); }
.skin-row.big { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.skin-row.big .skin { width: 100%; height: auto; aspect-ratio: 1; }
.skin-row.big .skin small { position: absolute; bottom: -20px; left: 50%; transform: translateX(-50%); font-size: 10.5px; color: var(--muted); white-space: nowrap; }
.skin-row.big { margin-bottom: 24px; }
.switch-toggle { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.switch-toggle input { display: none; }
.switch-toggle span { width: 40px; height: 24px; border-radius: 99px; background: var(--line); position: relative; transition: background .2s; }
.switch-toggle span::after { content: ''; position: absolute; width: 20px; height: 20px; border-radius: 50%; background: #fff; top: 2px; left: 2px; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch-toggle input:checked + span { background: var(--wine); }
.switch-toggle input:checked + span::after { transform: translateX(16px); }
.pair-row { display: flex; gap: 10px; overflow-x: auto; margin: 0 -16px; padding: 4px 16px 8px; scrollbar-width: none; }
.pair-row::-webkit-scrollbar { display: none; }
.pair { flex: none; width: 92px; border: 0; background: none; padding: 0; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer; }
.pair-sw { width: 64px; height: 64px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 3px var(--paper), 0 0 0 4px var(--line), inset 0 -10px 18px rgba(0,0,0,.12), inset 0 8px 14px rgba(255,255,255,.18); transition: box-shadow .2s, transform .2s; position: relative; overflow: hidden; }
.pair.on .pair-sw { box-shadow: 0 0 0 3px var(--paper), 0 0 0 5px var(--wine), inset 0 -10px 18px rgba(0,0,0,.12); transform: scale(1.04); }
.pair b { font-weight: 500; font-size: 13px; line-height: 1.2; margin-top: 4px; }
.pair small { font-size: 10.5px; color: var(--muted); line-height: 1.2; }
.custom-sw { background: conic-gradient(#e0218a, #f2c12e, #5cb82e, #0f6f86, #6b2d8a, #e0218a); }
.custom-sw input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; border: 0; }
.why { font-family: var(--serif); font-style: italic; font-size: 17px; color: var(--ink-2); margin: 10px 0 0; line-height: 1.35; }
.rec-group { font-size: 11.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); margin: 18px 0 10px; font-weight: 500; }
.rec-group:first-of-type { margin-top: 4px; }
.rec-grid { display: grid; gap: 10px; }
.rec-card { display: flex; align-items: center; gap: 14px; padding: 10px 12px 10px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: linear-gradient(180deg, #fffefb, #fcf8f2); }
.rec-icon { width: 54px; height: 54px; border-radius: 12px; background: #f6efe5; display: grid; place-items: center; flex: none; }
.rec-icon svg { width: 44px; height: 44px; }
.rec-body { flex: 1; min-width: 0; }
.rec-body small { display: block; font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.rec-body b { display: block; font-weight: 500; font-size: 15px; line-height: 1.3; }
.rec-body span { font-size: 12.5px; color: var(--muted); }
.actions-panel .field { margin-bottom: 6px; }
.render-img { border-radius: var(--radius-sm); margin: 10px auto 8px; max-height: 70dvh; }

/* ---------- sheet & toasts ---------- */
.sheet-wrap { position: fixed; inset: 0; z-index: 50; background: rgba(34, 26, 30, 0); display: flex; align-items: flex-end; justify-content: center; transition: background .3s; }
.sheet-wrap.in { background: rgba(34, 26, 30, .45); }
.sheet { position: relative; width: 100%; max-width: var(--col); max-height: 92dvh; overflow-y: auto; background: var(--paper); border-radius: 26px 26px 0 0; padding: 26px 20px calc(24px + var(--safe-b)); transform: translateY(100%); transition: transform .32s cubic-bezier(.2, .8, .2, 1); }
.sheet-wrap.in .sheet { transform: none; }
.sheet::before { content: ''; position: absolute; top: 8px; left: 50%; transform: translateX(-50%); width: 40px; height: 4px; border-radius: 4px; background: var(--line); }
.sheet-close { position: absolute; right: 12px; top: 12px; width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--sand); font-size: 22px; line-height: 1; }
.sheet .display { margin-bottom: 14px; padding-right: 40px; }
.order-summary { display: flex; gap: 12px; align-items: center; background: var(--ivory); border-radius: var(--radius-sm); padding: 10px; margin-bottom: 18px; }
.order-summary img { width: 60px; height: 60px; border-radius: 10px; object-fit: cover; }
.order-summary b { display: block; font-weight: 500; } .order-summary span { display: block; font-size: 13px; color: var(--muted); }
.success { text-align: center; display: grid; gap: 12px; padding-top: 6px; }
.success-mark { width: 64px; height: 64px; border-radius: 50%; margin: 0 auto; background: var(--wine); color: #fff; display: grid; place-items: center; font-size: 30px; }
.toasts { position: fixed; left: 0; right: 0; top: calc(12px + env(safe-area-inset-top, 0px)); z-index: 60; display: grid; justify-items: center; gap: 8px; pointer-events: none; padding: 0 16px; }
.toast { max-width: 440px; background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 14px; font-size: 14.5px; box-shadow: var(--shadow-lg); transform: translateY(-20px); opacity: 0; transition: all .35s; }
.toast.in { transform: none; opacity: 1; }
.toast.err { background: var(--err); }

/* ---------- orders ---------- */
.page-head { padding: 14px 2px 16px; }
.order-card { background: var(--paper); border-radius: var(--radius); padding: 14px; margin-bottom: 14px; box-shadow: var(--shadow); }
.order-card header { display: flex; gap: 12px; align-items: flex-start; }
.order-card header > img { width: 60px; height: 60px; border-radius: 12px; object-fit: cover; flex: none; }
.order-card header > div { flex: 1; min-width: 0; }
.order-card header b { display: block; font-weight: 500; }
.order-card header small { display: block; font-size: 12.5px; color: var(--muted); }
.order-card footer { display: flex; flex-wrap: wrap; gap: 4px; margin: 8px -6px -4px; border-top: 1px solid var(--line); padding-top: 6px; }
.order-card footer .btn svg { width: 16px; }
.order-card details { margin-top: 8px; font-size: 14px; }
.order-card summary { cursor: pointer; color: var(--wine); font-weight: 500; }
.history { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 8px; }
.history li { color: var(--ink-2); }
.history small { display: block; color: var(--muted); font-size: 12px; }
.status { display: inline-block; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; padding: 4px 10px; border-radius: 99px; background: var(--sand); color: var(--ink-2); white-space: nowrap; font-weight: 500; }
.s-requested { background: #f7eedd; color: #7a5a24; }
.s-fabric_received, .s-cutting, .s-stitching { background: var(--wine-soft); color: var(--wine); }
.s-trial_ready, .s-ready { background: #e4f1ea; color: var(--ok); }
.s-delivered { background: var(--ink); color: #fff; }
.s-cancelled { background: #f1e9ea; color: var(--muted); text-decoration: line-through; }
.timeline { list-style: none; padding: 0; margin: 16px 0 8px; display: grid; grid-template-columns: repeat(7, 1fr); }
.timeline li { position: relative; text-align: center; font-size: 9.5px; color: var(--muted); line-height: 1.2; padding-top: 18px; }
.timeline li i { position: absolute; top: 4px; left: 50%; transform: translateX(-50%); width: 10px; height: 10px; border-radius: 50%; background: var(--line); z-index: 1; }
.timeline li::before { content: ''; position: absolute; top: 8px; left: -50%; right: 50%; height: 2px; background: var(--line); }
.timeline li:first-child::before { display: none; }
.timeline li.done i, .timeline li.done::before, .timeline li.now::before { background: var(--gold); }
.timeline li.now i { background: var(--wine); box-shadow: 0 0 0 4px rgba(91, 21, 48, .15); width: 12px; height: 12px; top: 3px; }
.timeline li.now span { color: var(--wine); font-weight: 600; }

/* admin */
.order-card.admin header { align-items: stretch; }
.admin-art { width: 92px; height: 150px; flex: none; background: linear-gradient(#f7efe4, #efe3d3); border-radius: 12px; overflow: hidden; display: grid; place-items: center; }
.admin-art svg { height: 100%; width: auto; } .admin-art img { width: 100%; height: 100%; object-fit: cover; }
.admin-info small b { color: var(--wine); font-weight: 600; }
.cust { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-weight: 500; }
.cust img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.cust-links { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 6px; font-size: 13px; }
.cust-links a { display: inline-flex; align-items: center; gap: 4px; color: var(--wine); }
.cust-links svg { width: 15px; }
.note { font-family: var(--serif); font-style: italic; font-size: 17px; color: var(--ink-2); margin: 12px 0 4px; }
.admin-update { display: grid; grid-template-columns: 1fr; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.admin-update select, .admin-update input { min-height: 44px; padding: 10px 12px; font-size: 15px; }

/* ---------- profile ---------- */
.profile-head { display: flex; gap: 16px; align-items: center; padding: 10px 2px 4px; }
.profile-head .display { font-size: 26px; }
.avatar-lg { position: relative; width: 92px; height: 92px; flex: none; border-radius: 50%; overflow: hidden; background: var(--wine-soft); color: var(--wine); display: grid; place-items: center; cursor: pointer; box-shadow: 0 0 0 3px var(--paper), 0 0 0 4px var(--gold-2); }
.avatar-lg img { width: 100%; height: 100%; object-fit: cover; }
.avatar-lg span { display: grid; justify-items: center; gap: 2px; font-size: 10.5px; text-align: center; }
.avatar-lg span svg { width: 26px; }
.avatar-lg.busy::after { content: ''; position: absolute; inset: 0; background: rgba(255,255,255,.6) ; }
.avatar-lg.busy::before { content: ''; position: absolute; z-index: 1; width: 26px; height: 26px; border: 2px solid var(--wine); border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
.verified, .unverified { font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; padding: 2px 8px; border-radius: 99px; margin-left: 4px; white-space: nowrap; }
.verified { background: #e4f1ea; color: var(--ok); } .unverified { background: #f7eedd; color: #7a5a24; }
.measure { border-top: 1px solid var(--line); padding-top: 14px; margin: 6px 0 18px; }
.measure summary { cursor: pointer; font-weight: 500; margin-bottom: 12px; }
.measure summary small { color: var(--muted); font-weight: 400; }
.measure-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.danger-zone .btn { display: flex; padding-left: 0; }
.colophon { display: flex; justify-content: center; margin: 32px 0 8px; opacity: .8; }

/* ---------- larger screens ---------- */
@media (min-width: 900px) {
  :root { --col: 1080px; }
  .welcome { grid-template-columns: 1fr 1fr; align-items: center; min-height: 88dvh; gap: 40px; }
  .welcome-figure { height: 82dvh; }
  .welcome-copy { text-align: left; } .welcome-copy .brand { align-items: flex-start; } .welcome-copy .brand-name { padding-left: 0; }
  .welcome-copy .display { font-size: 56px; }
  .auth { display: grid; grid-template-columns: 1fr 460px; margin: 0; min-height: 90dvh; align-items: center; gap: 30px; }
  .auth-hero { height: 80dvh; border-radius: 30px; }
  .auth-hero svg { height: 92%; margin-top: 0; transform: translateX(-105%); }
  .auth-card { border-radius: 26px; margin: 0; min-height: 0; box-shadow: var(--shadow-lg); }
  #view > :is(.hello, .hero-card, .block, .banner, .contact-card) { max-width: 760px; margin-left: auto; margin-right: auto; }
  .hello, .hero-card, .block, .banner, .contact-card, .studio-intro, .dropzone, .row-2, .tips-list, .fabric-card, .dress-grid, .style-layout, .sticky-cta, .page-head, .order-card, .profile-head, .panel, .look-grid, .empty, .chips.scroll { max-width: 760px; margin-left: auto; margin-right: auto; }
  .panel .row-2, .panel .chips, .sheet .row-2 { max-width: none; }
  .look-grid { grid-template-columns: repeat(4, 1fr); }
  .dress-grid { grid-template-columns: repeat(3, 1fr); }
  .look-stage { margin: 0 auto; max-width: 760px; border-radius: 26px; height: 72dvh; }
  .sticky-cta { bottom: 100px; }
  .tabbar { max-width: 620px; margin: 0 auto 14px; border-radius: 26px; border: 1px solid var(--line); box-shadow: var(--shadow-lg); padding-bottom: 8px; }
  .mini-stage { height: 520px; }
}
@media (max-width: 370px) {
  .display { font-size: 32px; } .display.sm { font-size: 26px; }
  .brand.xl .brand-name { font-size: 38px; }
  .style-layout { grid-template-columns: 1fr; } .mini-stage { position: relative; top: 0; height: 320px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- two-step verification ---------- */
.mfa-badge { width: 56px; height: 56px; border-radius: 50%; background: var(--wine-soft); color: var(--wine); display: grid; place-items: center; margin-bottom: 14px; }
.mfa-badge svg { width: 28px; }
.otp { font-size: 26px !important; letter-spacing: .4em; text-align: center; font-variant-numeric: tabular-nums; }
.gate { text-align: center; padding: 22px 6px 6px; max-width: 520px; margin: 0 auto; }
.gate > svg { width: 52px; height: 52px; margin: 0 auto 12px; color: var(--gold); }
.gate .display { margin-bottom: 6px; }
.gate .btn.block { margin-top: 20px; }
.setup-steps { list-style: none; counter-reset: s; padding: 18px 16px; display: grid; gap: 22px; }
.setup-steps > li { counter-increment: s; position: relative; padding-left: 44px; }
.setup-steps > li::before { content: counter(s); position: absolute; left: 0; top: -2px; width: 30px; height: 30px; border-radius: 50%; background: var(--wine); color: #fff; display: grid; place-items: center; font-family: var(--serif); font-size: 17px; }
.setup-steps b { display: block; font-weight: 500; }
.setup-steps > li > span { display: block; color: var(--muted); font-size: 14px; margin-bottom: 10px; }
.qr-box { display: grid; justify-items: center; gap: 8px; padding: 14px; border: 1px dashed var(--line); border-radius: var(--radius-sm); background: #fff; }
.qr-box img { border-radius: 8px; }
.qr-box small { color: var(--muted); text-align: center; }
.qr-box code { font-size: 15px; letter-spacing: .08em; background: var(--ivory); padding: 6px 10px; border-radius: 8px; word-break: break-all; text-align: center; }
.recovery { columns: 2; list-style: none; padding: 16px; margin: 16px 0 0; background: var(--ivory); border-radius: var(--radius-sm); font: 500 15px/2 ui-monospace, Consolas, monospace; text-align: center; }
.mfa-row { display: flex; align-items: center; gap: 12px; padding: 14px 0 4px; border-top: 1px solid var(--line); margin-top: 16px; }
.mfa-row > svg { width: 26px; color: var(--ok); flex: none; }
.mfa-row div { flex: 1; } .mfa-row b { display: block; font-weight: 500; } .mfa-row span { font-size: 13px; color: var(--muted); }
