@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;650;700;750;800&display=swap');
:root{color-scheme:dark;--bg:#100c18;--card:#1b1426;--card2:#271c36;--ink:#fcf7ff;--muted:#b1a3bd;--line:#3b2c49;--accent:#b3a0ff;--warm:#ffad98;--brand:#ff866e;--shadow:0 8px 35px #0003}*{box-sizing:border-box}html{min-height:100%;background:var(--bg)}body{margin:0;color:var(--ink);font:14px 'Manrope',system-ui,sans-serif;line-height:1.55}body.light{color-scheme:light;--bg:#fbf7fc;--card:#fff;--card2:#f4eaf8;--ink:#281934;--muted:#78657f;--line:#e6d9ec;--accent:#743bd1;--warm:#ae3456;--brand:#a93664;--shadow:0 8px 35px #30205008}button,input,select,textarea{font:inherit}button,a,input,select,textarea{-webkit-tap-highlight-color:transparent}button{color:inherit;cursor:pointer}button:disabled{opacity:.5;cursor:wait}button:focus-visible,a:focus-visible{outline:2px solid var(--warm);outline-offset:4px}a{color:inherit;text-decoration:none}button{border:0}h1,h2,h3,p{margin:0}h1{font-size:25px;letter-spacing:-.8px;line-height:1.3;font-weight:800}h2{font-size:20px;letter-spacing:-.5px}h3{font-size:15px}p{color:var(--muted)}svg{width:23px;height:23px;display:inline-block;vertical-align:middle;fill:none;stroke:currentColor;stroke-width:1.65;stroke-linecap:round;stroke-linejoin:round}.app-shell{max-width:880px;margin:auto;min-height:100dvh}.topbar{height:83px;display:flex;align-items:center;justify-content:space-between;padding:18px 26px;border-bottom:1px solid var(--line);gap:12px;background:var(--bg)}.brand{font-size:22px;font-weight:800;letter-spacing:-1px;white-space:nowrap}.brand>span:last-child{color:var(--accent)}.brand-mark{margin-right:7px;color:var(--brand);font-size:27px}.top-actions{display:flex;align-items:center;gap:10px}.icon-button{background:var(--card);border:1px solid var(--line);border-radius:50%;width:36px;height:36px;display:grid;place-items:center}.icon-button svg{width:18px;height:18px}.balance{height:36px;display:flex;align-items:center;gap:8px;background:var(--card2);border:1px solid var(--line);border-radius:24px;padding:0 12px;font-size:12px;font-weight:700}.bolt{color:var(--warm);font-size:21px}.balance-plus{font-size:20px;color:var(--warm);border-left:1px solid var(--line);padding-left:9px}main{padding:27px 26px 120px;min-height:70vh}.eyebrow{color:var(--accent);font-size:10px;letter-spacing:2px;text-transform:uppercase;font-weight:800}.heading-row{display:flex;justify-content:space-between;align-items:center;margin-bottom:18px;gap:12px}.heading-row a,.text-link{color:var(--warm);font-size:12px;background:none}.subheading{font-size:13px;margin-top:7px}.create-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:13px}.create-tile{border:1px solid var(--line);background:linear-gradient(150deg,var(--card2),var(--card));border-radius:18px;padding:27px 8px 22px;text-align:center;transition:.2s}.create-tile:hover{transform:translateY(-3px);border-color:var(--accent)}.tile-icon{display:grid;place-items:center;width:45px;height:45px;border-radius:15px;background:#9c78ff18;color:var(--accent);margin:0 auto 14px}.create-tile:nth-child(2) .tile-icon{color:var(--warm);background:#ff89631a}.create-tile:nth-child(3) .tile-icon{color:#e5a6ff;background:#bd6aff1a}.create-tile b{font-size:14px}.create-tile small{display:block;font-size:10px;color:var(--muted);margin-top:4px}.welcome{margin:20px 0 30px;padding:17px 18px;border:1px solid #ce92ff40;border-radius:16px;background:linear-gradient(110deg,#aa57ee20,#ff816c13);display:flex;align-items:center;justify-content:space-between;gap:12px}.welcome b{font-size:13px}.welcome p{font-size:11px;margin-top:4px}.welcome-star{color:var(--accent);font-size:32px}.trends-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}.trend-card{position:relative;overflow:hidden;border:1px solid var(--line);background:var(--card);border-radius:17px;text-align:left;padding:0;transition:.2s}.trend-card:hover{border-color:var(--accent);transform:translateY(-2px)}.trend-cover{height:185px;position:relative;overflow:hidden;background:var(--art-bg)}.trend-cover>svg{width:100%;height:100%;stroke:none}.trend-name{font-size:10px;font-weight:700;letter-spacing:.7px;text-transform:uppercase;padding:13px 12px;display:block;color:var(--muted)}.trend-counter{position:absolute;right:10px;top:10px;background:#19101cd9;color:#ffd3c5;border:1px solid #fff2;border-radius:20px;font-size:10px;padding:2px 7px}.trend-cover:after{content:'';position:absolute;inset:0;background:linear-gradient(transparent 65%,#0002);pointer-events:none}.bottom-nav{position:fixed;z-index:20;bottom:0;left:50%;transform:translateX(-50%);width:100%;max-width:880px;padding:12px 12px calc(13px + env(safe-area-inset-bottom));display:grid;grid-template-columns:repeat(5,1fr);border-top:1px solid var(--line);background:color-mix(in srgb,var(--bg) 94%,transparent);backdrop-filter:blur(18px)}.nav-item{display:flex;flex-direction:column;gap:5px;align-items:center;justify-content:center;color:var(--muted);background:none;font-size:9px;padding:3px}.nav-item svg{width:20px;height:20px}.nav-item.active{color:var(--warm)}.nav-item.create-nav .nav-icon{background:linear-gradient(130deg,#8d4aef,#b744d4,#f26a85);box-shadow:0 0 22px #8a55ff55;color:white;width:43px;height:43px;border-radius:50%;display:grid;place-items:center;margin-top:-25px}.nav-item.create-nav{color:var(--ink)}.back{padding:0;background:none;color:var(--muted);display:flex;align-items:center;gap:7px;font-size:12px;margin-bottom:20px}.back svg{width:16px;height:16px}.panel{background:var(--card);border:1px solid var(--line);border-radius:18px;padding:20px;margin:18px 0}.mode-grid{display:grid;grid-template-columns:1fr 1fr;gap:13px;margin-top:25px}.mode-card{background:var(--card);border:1px solid var(--line);border-radius:20px;padding:26px 18px;text-align:left;min-height:145px}.mode-card svg{width:30px;height:30px;color:var(--warm);margin-bottom:22px}.mode-card b{display:block}.mode-card p{font-size:12px;margin-top:8px}.form{margin-top:22px}.form label{display:block;margin:20px 0 9px;font-size:10px;letter-spacing:1.4px;font-weight:800;color:var(--muted);text-transform:uppercase}.form select,.form textarea{width:100%;background:var(--card);color:var(--ink);border:1px solid var(--line);border-radius:12px;padding:14px;outline:none}.form textarea{resize:vertical;min-height:142px;line-height:1.7}.form textarea:focus,.form select:focus{border-color:var(--accent)}.fields-row{display:grid;grid-template-columns:1fr 1fr;gap:14px}.model-note{color:var(--muted);font-size:11px;margin-top:7px}.primary{display:flex;align-items:center;justify-content:center;gap:10px;width:100%;background:linear-gradient(105deg,#7d3de5,#a63cc5 48%,#cc3c61);color:white;padding:15px 18px;border-radius:12px;font-size:13px;font-weight:800;box-shadow:0 5px 24px #7950ff22;margin-top:22px}.primary svg{width:19px;height:19px}.primary .cost{border-left:1px solid #fff5;padding-left:10px}.secondary{background:var(--card2);color:var(--accent);border:1px solid var(--line);border-radius:12px;padding:10px 16px;font-weight:700;font-size:12px}.note{font-size:11px;line-height:1.8;color:var(--muted);margin-top:12px}.upload{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:30px 20px;min-height:220px;border:1px dashed #6b5e864d;background:var(--card);border-radius:18px;cursor:pointer;gap:12px;margin:20px 0}.upload-icon{background:var(--card2);border-radius:50%;padding:16px;color:var(--accent)}.upload p{max-width:240px;font-size:12px}.upload img{max-height:210px;max-width:100%;border-radius:12px}.hidden{display:none!important}.chips{display:flex;gap:8px;overflow-x:auto;scrollbar-width:none;padding:4px 0;margin:15px 0 22px}.chip{white-space:nowrap;font-size:11px;border:1px solid var(--line);border-radius:30px;padding:8px 15px;background:none;color:var(--muted)}.chip.active{color:white;border-color:transparent;background:linear-gradient(120deg,#7d3de5,#a63cc5,#cc3c61)}.empty{text-align:center;padding:60px 20px}.empty svg{width:42px;height:42px;color:var(--accent);margin-bottom:18px}.empty h3{font-size:16px}.empty p{margin:10px auto 0;font-size:12px;max-width:270px}.profile-name{margin-top:6px;font-size:25px}.profile-id{display:inline-block;background:var(--card2);border-radius:20px;padding:4px 10px;font-size:10px;color:var(--muted);margin:10px 0 18px}.profile-rows{display:grid;gap:10px}.profile-row{display:flex;align-items:center;justify-content:space-between;width:100%;background:var(--card);border:1px solid var(--line);border-radius:16px;padding:21px;text-align:left;font-size:13px;font-weight:700}.profile-row .badge-icon{padding:13px;background:var(--card2);border-radius:12px;color:var(--accent)}.profile-row>svg{width:16px;color:var(--muted)}.profile-row small{display:block;color:var(--muted);font-size:10px;font-weight:400;margin-top:5px}.large-balance{font-size:46px;font-weight:800;letter-spacing:-2px;line-height:1.25;margin:12px 0;color:var(--ink)}.large-balance span{font-size:26px;color:var(--warm)}.stat-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.stat{padding:18px;background:var(--card);border:1px solid var(--line);border-radius:15px}.stat strong{font-size:25px;display:block}.stat small{font-size:11px;color:var(--muted)}.plans{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-top:20px}.plan{padding:23px 20px;border:1px solid var(--line);background:var(--card);border-radius:18px;position:relative}.plan.featured{border-color:#9a7ee9;background:linear-gradient(140deg,#9a66ff16,var(--card))}.plan h3{margin-bottom:15px}.plan .price{font-size:29px;font-weight:800}.plan p{font-size:12px;margin:8px 0}.pill{display:inline-block;color:var(--warm);font-size:10px;border-radius:15px;padding:3px 8px;background:#f16d9518;margin-bottom:13px}.list{list-style:none;padding:0;margin:15px 0;color:var(--muted);font-size:12px}.list li{padding:5px 0}.list li:before{content:'✓';color:var(--warm);margin-right:8px}.status-banner{background:#cfa35b12;border:1px solid #cfa35b30;color:#c8aa7e;font-size:12px;border-radius:12px;padding:13px 15px;margin-top:18px}.job-card{border:1px solid var(--line);background:var(--card);padding:18px;border-radius:17px;margin:15px 0}.job-head{display:flex;justify-content:space-between;font-size:10px;color:var(--muted);margin-bottom:12px}.job-prompt{font-size:13px;line-height:1.7;white-space:pre-wrap;overflow-wrap:anywhere}.job-card img,.job-card video{display:block;width:100%;max-height:420px;object-fit:contain;border-radius:12px;margin:15px 0;background:#000}.job-status{font-size:11px;margin:9px 0;color:var(--warm)}.job-actions{display:flex;gap:10px;align-items:center;margin-top:15px}.job-actions a{font-size:11px;color:var(--warm)}.text-result{white-space:pre-wrap;overflow-wrap:anywhere;background:var(--bg);padding:18px;border-radius:12px;margin-top:15px;font-size:13px;line-height:1.8}.ledger-row{display:flex;justify-content:space-between;align-items:center;padding:15px 0;border-bottom:1px solid var(--line);font-size:12px}.ledger-row small{display:block;color:var(--muted);font-size:10px}.positive{color:var(--warm)}.negative{color:var(--muted)}.preset{border:1px solid var(--line);border-radius:16px;padding:20px;background:var(--card);margin:14px 0}.preset p{font-size:12px;line-height:1.8;margin-top:9px}.preset .secondary{margin-top:15px}.text-templates{display:grid;grid-template-columns:1fr 1fr;gap:12px}.text-template{border:1px solid var(--line);background:var(--card);border-radius:16px;padding:20px;text-align:left}.text-template svg{color:var(--accent);margin-bottom:13px}.text-template b{display:block}.text-template small{display:block;font-size:10px;color:var(--muted);margin-top:6px}.prose p{margin:12px 0;font-size:13px;line-height:1.9}.search{width:100%;border:1px solid var(--line);border-radius:12px;background:var(--card);color:var(--ink);padding:13px 15px;margin:16px 0}.footer-note{margin-top:25px;color:var(--muted);font-size:10px;text-align:center}.view-header .back{margin-bottom:16px}.view-header h1{font-size:24px}dialog{border:1px solid var(--line);border-radius:22px;padding:30px 25px;background:var(--card);color:var(--ink);width:calc(100% - 36px);max-width:410px;box-shadow:var(--shadow)}dialog::backdrop{background:#000b;backdrop-filter:blur(5px)}dialog h2{font-size:21px;margin:12px 0}dialog p{font-size:13px;line-height:1.9}.dialog-close{position:absolute;top:10px;right:15px;background:none;font-size:25px;color:var(--muted)}.dialog-symbol{font-size:30px;color:var(--accent)}#toast{position:fixed;bottom:100px;left:50%;transform:translateX(-50%);max-width:90%;border:1px solid var(--line);border-radius:12px;padding:12px 18px;background:var(--card2);z-index:50;font-size:12px}input[type=file]{display:none}.kind-label{color:var(--accent)}.progress-dot{display:inline-block;width:7px;height:7px;background:var(--warm);border-radius:50%;margin-right:7px;animation:pulse 1.5s infinite}@keyframes pulse{50%{opacity:.3}}@media(max-width:600px){.topbar{padding:15px 16px;height:75px}.brand{font-size:20px}.brand-mark{font-size:25px}.top-actions{gap:7px}.balance{font-size:10px;gap:5px;padding:0 10px}main{padding:24px 16px 110px}.trends-grid{grid-template-columns:1fr 1fr;gap:11px}.trend-cover{height:190px}.create-tile{padding:22px 5px 18px;border-radius:15px}.create-grid{gap:10px}.create-tile small{font-size:9px}.tile-icon{margin-bottom:13px}.plans{grid-template-columns:1fr}.welcome{margin-bottom:28px}.mode-card{padding:22px 17px}.form{margin-top:17px}.profile-row{padding:19px}.trend-name{padding:12px 10px;font-size:9px}.nav-item{font-size:8px}.topbar .icon-button{width:32px;height:32px}}@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}

/* Shared account forms use the same controls as the creative tools. */
.panel label{display:block;font-size:12px;font-weight:700;color:var(--muted);margin:16px 0 9px}
.panel label:first-child{margin-top:0}.panel input,.panel textarea{display:block;width:100%;margin-top:8px;background:var(--bg);border:1px solid var(--line);border-radius:12px;padding:13px 14px;color:var(--ink);outline:none}.panel textarea{min-height:130px;resize:vertical;line-height:1.7}.panel input:focus,.panel textarea:focus{border-color:var(--accent);box-shadow:0 0 0 3px #b16aff15}.panel input::placeholder,.panel textarea::placeholder{color:var(--muted)}
.brand-logo{width:32px;height:32px;object-fit:contain;border-radius:9px;vertical-align:middle;margin-right:7px}.brand{display:flex;align-items:center}.brand-word{display:inline-block}.brand-word>span{color:var(--accent)}.brand>span:last-child{color:inherit}
/* Distinctive rounded triangle for the central creative action. */
.nav-item.create-nav .nav-icon{width:54px;height:49px;margin-top:-29px;border-radius:0;clip-path:path('M 23 6 Q 27 -1 31 6 L 52 40 Q 56 47 48 47 L 6 47 Q -2 47 2 40 Z');padding-top:10px;background:linear-gradient(145deg,#8d4aef,#bc49ca 58%,#ff866e);box-shadow:none}.nav-item.create-nav .nav-icon svg{width:18px;height:18px}.nav-item.create-nav{filter:drop-shadow(0 -3px 10px #bc49ca35);min-height:46px}

.studio-hero{position:relative;overflow:hidden;padding:27px 26px;margin-bottom:22px;border:1px solid #a86be52e;border-radius:25px;background:radial-gradient(ellipse at 100% 0,#b34bca29,transparent 68%),linear-gradient(115deg,var(--card),var(--bg))}.studio-hero h1{font-size:37px;line-height:1.12;letter-spacing:-1.4px;margin:13px 0}.studio-hero h1 span{color:var(--warm)}.studio-hero p{font-size:12px;line-height:1.9}.hero-spark{position:absolute;right:28px;bottom:25px;color:var(--accent);font-size:80px;line-height:1;opacity:.6;transform:rotate(12deg)}.trend-cover>img{width:100%;height:100%;object-fit:cover;display:block}.trend-name{color:var(--ink);font-size:12px;text-transform:none;letter-spacing:0;padding:14px}.trend-name>span{display:block;font-size:10px;color:var(--muted);margin-top:4px;font-weight:500}.collection-preview{display:block;width:100%;max-height:330px;object-fit:cover;border-radius:20px;margin-top:22px}.preset-mode{display:block;color:var(--warm);font-size:10px;margin-top:12px}.heading-row h2{margin-top:4px}@media(max-width:600px){.studio-hero{padding:24px 22px}.studio-hero h1{font-size:31px}.hero-spark{font-size:64px;right:20px;bottom:30px}.trend-name{padding:12px;font-size:12px}.trend-counter{font-size:9px;right:7px;top:7px}}

.consent-row{display:flex;gap:12px;align-items:flex-start;font-size:14px}.consent-row input{width:20px;height:20px;flex:0 0 20px;accent-color:#BC49CA}.stat strong{overflow-wrap:anywhere}#owner-view small{display:block;color:var(--muted);margin-top:8px}#owner-view h2{margin-top:24px}#owner-view .primary,#owner-view .secondary{margin-top:12px}

.prompt-preview{display:block;width:100%;max-height:420px;object-fit:contain;border-radius:16px;margin:16px 0;background:var(--panel,#241d31)}

.privacy-dialog{max-width:620px;width:calc(100% - 32px)}.privacy-copy{white-space:pre-wrap;max-height:50vh;overflow:auto;font-size:14px;line-height:1.65;margin:16px 0;padding:12px;border:1px solid var(--line,#46384e);border-radius:12px}.privacy-dialog .secondary{width:100%;margin-top:10px}

.invite-banner{margin:24px 0;border-color:#bc49ca66;background:linear-gradient(120deg,var(--card),#8d4aef14)}.invite-banner h2{margin-top:10px;font-size:22px;line-height:1.3}.invite-banner .primary{margin-top:16px}

/* Checkout and subscription management */
.billing-plans{grid-template-columns:repeat(3,minmax(0,1fr))}.plan .price small{font-size:12px;color:var(--muted)}.billing-check{display:flex!important;align-items:flex-start;gap:12px;font-size:14px;line-height:1.5;margin:18px 0}.billing-check input{width:20px!important;height:20px;flex:0 0 20px;margin-top:3px;accent-color:var(--accent)}.billing-check a{color:inherit;text-decoration:underline}.billing-bank-link{display:flex;text-align:center;text-decoration:none;justify-content:center}.billing-sub{padding:16px 0;border-bottom:1px solid var(--line)}.billing-sub:last-child{border:0}details.panel>summary{cursor:pointer;font-weight:650;padding:8px 0}#checkout-status{line-height:1.5}#receipt-email{width:100%;padding:14px;border-radius:12px;background:var(--card);color:var(--ink);border:1px solid var(--line)}@media(max-width:760px){.billing-plans{grid-template-columns:1fr}}

.billing-check{text-transform:none;letter-spacing:0;font-weight:400}

/* Hairstyles: free browsing, one explicit paid generation per selected look. */
.hair-entry{display:flex;flex-direction:column;align-items:flex-start;gap:9px;text-align:left;width:100%;cursor:pointer;background:linear-gradient(120deg,#452956,#282044);border:1px solid #ae83cf55;color:#fff;margin:18px 0}.hair-entry strong{font-size:25px}.hair-entry>span:last-child{font-size:14px;color:#e1cce9}.hair-studio{margin-top:24px;display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,1fr);gap:28px;align-items:start}.hair-main,.hair-choice{min-width:0}.hair-stage{height:450px;border-radius:24px;background:linear-gradient(150deg,#30243e,#181322);overflow:hidden;position:relative;touch-action:pan-y}.hair-stage img{width:100%;height:100%;object-fit:contain}.hair-stage-label{position:absolute;bottom:14px;left:14px;max-width:calc(100% - 28px);padding:7px 12px;background:#160e24d9;color:white;border-radius:12px;font-size:13px}.hair-empty{height:100%;padding:30px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;color:#f8f1ff}.hair-empty>svg{width:44px;height:44px;stroke:currentColor;fill:none;stroke-width:1.5}.hair-empty p{max-width:280px;color:#d5c6e0}.hair-empty .primary{margin-top:16px}.hair-tools{display:flex;gap:8px;flex-wrap:wrap;margin:12px 0}.hair-tools .secondary{font-size:13px;padding:10px 14px;min-height:42px;text-decoration:none}.hair-choice .primary{width:100%;margin-top:12px}.hair-pager{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px}.hair-pager .icon-button{font-size:30px;min-width:44px;min-height:44px}.hair-selected-art{display:flex;gap:18px;align-items:center}.hair-selected-art>svg{height:auto;stroke:none;width:105px;flex-shrink:0;border-radius:16px}.hair-selected-art h2{margin:7px 0;font-size:26px}.hair-groups{margin-top:28px;flex-wrap:wrap}.hair-catalog{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px}.hair-card{min-width:0;background:var(--panel,#21192d);border:2px solid transparent;border-radius:18px;padding:8px;cursor:pointer;text-align:left;color:inherit;display:flex;flex-direction:column;gap:8px}.hair-card svg{stroke:none;width:100%;height:auto;border-radius:12px}.hair-card strong{font-size:13px;line-height:1.35}.hair-card>span{font-size:11px;opacity:.7}.hair-card.selected{border-color:#cda1f3;background:#6f448d38}.hair-card:focus-visible{outline:3px solid #d7b7ff;outline-offset:3px}body.light .hair-card{background:#f2eafa}body.light .hair-card.selected{background:#e6d4f5}button:disabled{cursor:wait;opacity:.6}@media(max-width:650px){.hair-studio{grid-template-columns:1fr;gap:16px}.hair-stage{height:clamp(200px,26dvh,280px)}.hair-catalog{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.hair-selected-art>svg{width:75px}.hair-selected-art h2{font-size:22px}.hair-entry strong{font-size:22px}}@media(max-width:360px){.hair-catalog{grid-template-columns:repeat(2,minmax(0,1fr))}.hair-stage{height:230px}}

.hair-tips{font-size:12px;color:var(--muted);margin:8px 0}.hair-tips summary{cursor:pointer;padding:4px 0}.hair-tips p{margin-top:7px}

.hair-upload-label{cursor:pointer;display:inline-flex;align-items:center;justify-content:center}.hair-upload-label[aria-disabled="true"]{pointer-events:none;opacity:.55}

/* Photo atlases: 25 equal portrait cells per sheet, no per-card generation. */
.hair-photo{display:block;aspect-ratio:4/5;background-size:500% 500%;background-repeat:no-repeat;background-color:#aca7b2;border-radius:12px;width:100%;flex-shrink:0}.hair-selected-art>.hair-photo{width:105px}.hair-card .hair-photo{width:100%}.back{display:inline-flex;align-items:center;gap:9px;min-height:44px;padding:10px 16px!important;border:1px solid var(--accent)!important;border-radius:13px;background:var(--card2)!important;color:var(--ink)!important;font-size:14px!important;font-weight:800;box-shadow:0 3px 12px #0002;margin-bottom:18px!important}.back svg{width:21px;height:21px}.back:hover{border-color:var(--warm)!important;filter:brightness(1.12)}@media(max-width:650px){.hair-selected-art>.hair-photo{width:75px}.back{min-height:46px}}

.multi-photo{margin-bottom:20px}.multi-photo-head{display:flex;flex-wrap:wrap;gap:8px;justify-content:space-between;margin-bottom:12px}.multi-photo-head span{color:var(--muted);font-size:12px}.multi-photo-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(100px,1fr));gap:10px}.multi-photo figure{position:relative;margin:0;border:1px solid var(--line);border-radius:14px;overflow:hidden;background:var(--card)}.multi-photo figure img{width:100%;height:140px;object-fit:cover;display:block}.multi-photo figcaption{padding:7px 10px}.multi-photo figure button{position:absolute;right:4px;top:4px;min-width:36px;min-height:36px;padding:0;font-size:24px;background:var(--card)}.multi-photo .upload{width:100%;margin-top:12px;min-height:80px;display:flex;align-items:center;justify-content:center;gap:12px}.multi-photo .upload svg{width:25px;height:25px}@media(max-width:480px){.multi-photo-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.multi-photo figure img{height:110px}}

/* Keep controls within the WebView and use one scroll area inside consent. */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
.bottom-nav { background-color: var(--bg); }
@supports (background: color-mix(in srgb, white, transparent)) {
    .bottom-nav { background-color: color-mix(in srgb, var(--bg) 94%, transparent); }
}
dialog { max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); overflow: auto; }
dialog:not([open]) { display: none; }
dialog[open].privacy-dialog {
    display: flex;
    flex-direction: column;
    width: calc(100% - 24px);
    max-width: 480px;
    max-height: calc(100vh - 24px);
    max-height: calc(100dvh - max(12px, env(safe-area-inset-top)) - max(12px, env(safe-area-inset-bottom)));
    padding: 0;
    overflow: hidden;
}
.privacy-scroll { min-height: 0; overflow: auto; overscroll-behavior: contain; padding: 16px 16px 10px; }
.privacy-scroll h2 { margin: 0 0 7px; font-size: 18px; line-height: 1.25; }
.privacy-scroll p { line-height: 1.45; }
.privacy-details { margin-top: 8px; }
.privacy-details summary { padding: 9px 0; cursor: pointer; color: var(--accent); }
.privacy-copy {
    max-height: none;
    overflow: visible;
    overflow-wrap: anywhere;
    margin: 8px 0;
    padding: 10px;
    line-height: 1.55;
}
.privacy-actions, .marketing-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.privacy-actions { flex-shrink: 0; border-top: 1px solid var(--line); padding: 10px 16px 12px; }
.privacy-actions .primary, .privacy-actions .secondary,
.marketing-actions .primary, .marketing-actions .secondary {
    width: auto;
    min-height: 44px;
    margin: 0;
    padding: 8px 12px;
}
.privacy-actions .primary { flex: 1 1 auto; }
.marketing-invitation { padding: 12px 14px; }
.marketing-invitation h2 { font-size: 16px; }
.marketing-invitation p { margin: 4px 0 8px; color: var(--muted); font-size: 13px; }
.dialog-fallback-open, .dialog-fallback-open body { overflow: hidden; }
.dialog-fallback-backdrop { position: fixed; inset: 0; z-index: 90; background: #000b; }
dialog.dialog-fallback[open] { position: fixed; inset: 0; z-index: 91; margin: auto; height: fit-content; }
.job-actions, .job-head { flex-wrap: wrap; }
.profile-row { min-width: 0; overflow-wrap: anywhere; }
.profile-row > svg { flex-shrink: 0; }
.form select, .form textarea, .panel input, .panel textarea { min-width: 0; max-width: 100%; }

@media (max-width: 650px), (max-height: 480px) and (pointer: coarse) {
    .topbar {
        height: auto;
        min-height: 56px;
        padding: calc(6px + env(safe-area-inset-top, 0px)) max(12px, env(safe-area-inset-right, 0px)) 6px max(12px, env(safe-area-inset-left, 0px));
        gap: 6px;
    }
    .brand { font-size: 18px; }
    .brand-logo { width: 27px; height: 27px; margin-right: 5px; }
    .top-actions { gap: 4px; }
    .topbar .icon-button { width: 44px; height: 44px; }
    .balance { min-height: 44px; padding: 0 9px; font-size: 11px; }
    main {
        min-height: 0;
        padding: 14px max(12px, env(safe-area-inset-right, 0px)) 24px max(12px, env(safe-area-inset-left, 0px));
    }
    .site-documents { padding-bottom: calc(78px + env(safe-area-inset-bottom, 0px)) !important; }
    .bottom-nav {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        padding: 4px max(4px, env(safe-area-inset-right, 0px)) calc(4px + env(safe-area-inset-bottom, 0px)) max(4px, env(safe-area-inset-left, 0px));
    }
    .nav-item { min-width: 0; min-height: 44px; gap: 2px; font-size: 10px; }
    .nav-item svg { width: 18px; height: 18px; }
    .nav-item.create-nav .nav-icon { margin-top: -19px; }
    h1 { font-size: 22px; }
    h2 { font-size: 17px; }
    .studio-hero { padding: 15px; margin-bottom: 12px; border-radius: 17px; }
    .studio-hero h1 { font-size: 26px; margin: 6px 0; letter-spacing: -.7px; }
    .studio-hero p { line-height: 1.5; }
    .create-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
    .create-tile { padding: 12px 4px; }
    .create-tile .tile-icon { width: 36px; height: 36px; margin-bottom: 6px; }
    .mode-grid, .fields-row, .text-templates, .trends-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .mode-card { padding: 12px; min-height: 110px; }
    .mode-card svg { margin-bottom: 8px; }
    .panel, .plan, .job-card { padding: 13px; margin: 12px 0; }
    .hair-entry { gap: 4px; margin: 12px 0; }
    .hair-entry strong { font-size: 19px; }
    .hair-stage { height: clamp(150px, 36vh, 260px); height: clamp(150px, 36dvh, 260px); }
    .profile-row { padding: 12px; }
    .form select, .form textarea, .panel input:not([type="checkbox"]), .panel textarea, .search { font-size: 16px; }
    .chips { flex-wrap: wrap; overflow: visible; gap: 6px; margin: 10px 0 14px; }
    .chip { white-space: normal; max-width: 100%; }
    dialog { padding: 16px; }
    dialog h2 { padding-right: 20px; }
}
