:root{color-scheme:dark;--bg:#11151a;--panel:#1b2229;--line:#34414d;--text:#eef3f5;--muted:#aebbc5;--orange:#ff9a45}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text);font:15px system-ui,sans-serif;line-height:1.5}header{padding:20px 28px;display:flex;justify-content:space-between;align-items:center;gap:16px;border-bottom:1px solid var(--line)}.brand{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.brand strong{font-size:27px;letter-spacing:-1px}.brand span{color:var(--orange)}.brand small{margin-left:12px;color:var(--muted)}.demo,.chip{font-size:11px;font-weight:700;letter-spacing:.06em;border:1px solid #6e4a2c;border-radius:20px;padding:5px 10px;color:#ffbc86;white-space:nowrap}.notice{background:#30251c;color:#e6c4a6;padding:10px 28px;font-size:13px}main{max-width:1300px;margin:auto;padding:26px}nav{display:flex;gap:6px;margin-bottom:32px;flex-wrap:wrap}button,input,select{font:inherit;border:1px solid #42505d;border-radius:9px;color:var(--text);background:#242e37;padding:11px 14px;max-width:100%;min-height:44px}button{cursor:pointer}button:hover{border-color:var(--orange)}button:focus-visible,input:focus-visible,select:focus-visible,canvas:focus-visible{outline:2px solid var(--orange);outline-offset:3px}button.selected,.primary{background:var(--orange);color:#21150b;font-weight:650;border-color:var(--orange)}button:disabled{opacity:.4;cursor:default}h1{font-size:32px;letter-spacing:-.9px;margin:4px 0 10px;line-height:1.2}h2{font-size:20px;margin:0 0 12px}.sub,.muted{color:var(--muted)}.sub{margin:0;max-width:680px}.eyebrow{color:var(--orange);font-size:11px;letter-spacing:.16em;font-weight:700;margin:0}.heading{display:flex;justify-content:space-between;gap:20px;align-items:center;margin-bottom:24px}.overview{background:#172824;border:1px solid #305649;padding:16px 20px;border-radius:12px;margin-bottom:20px}.overview.warning{background:#392a1f;border-color:#785333}.cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;margin:20px 0}.panel,.card{border:1px solid var(--line);border-radius:14px;background:var(--panel);padding:22px;min-width:0}.row{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.spread{justify-content:space-between}.status{color:#8dd5ad;font-size:13px}.status.error{color:#ffb58e}.mock-output{height:170px;margin:16px 0;border:1px solid #4c443d;border-radius:9px;background:repeating-linear-gradient(0deg,transparent,transparent 39px,#ff9a4530 40px),repeating-linear-gradient(90deg,#151a21,#151a21 59px,#ff9a4530 60px);display:grid;place-items:center;text-align:center;color:#e6b88e}.mock-output.black{background:#000;color:#89919a}.facts{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:16px 0}.facts small{display:block;color:var(--muted)}.facts strong{font-weight:500;font-size:14px}.card .actions{margin-top:20px;display:flex;gap:8px;flex-wrap:wrap}.muted{font-size:13px}label{display:block;color:var(--muted);font-size:13px;margin:16px 0 6px}input,select{width:100%}.editor-layout{display:grid;grid-template-columns:310px minmax(0,1fr);gap:20px}canvas{display:block;width:100%;aspect-ratio:16/10;background:#0d1014;border:1px solid #455360;border-radius:10px;margin:20px 0;touch-action:pan-y}.panel>.row>select{width:auto;flex:1;min-width:180px}.remote{margin-top:32px}.event{padding:12px 0;border-bottom:1px solid var(--line)}.event:last-child{border:0}.event small{color:var(--muted)}.error-text{color:#ffb58e}#toast{color:#ffbd86;min-height:24px}footer{padding:0 28px 28px;color:var(--muted);font-size:12px}[hidden]{display:none!important}@media(max-width:760px){header{padding:16px;flex-wrap:wrap}.brand small{width:100%;margin:0}.notice{padding:12px 16px}main{padding:16px}.heading{display:block}.heading>button{margin-top:16px}h1{font-size:27px}.cards,.editor-layout{grid-template-columns:1fr}.panel,.card{padding:16px}button,input,select{font-size:16px}.facts{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.facts strong{overflow-wrap:anywhere}nav button{flex:1;font-size:14px;padding:10px}.row>button{flex-grow:1}}
.stats{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;margin:24px 0}.stats .panel strong{display:block;font-size:28px}.stats small{color:var(--muted)}.event-card{border-top:3px solid #ff9a45}.facts strong{overflow-wrap:anywhere}dialog{color:var(--text);background:var(--panel);border:1px solid #ff9a45;border-radius:16px;max-width:560px;width:calc(100% - 32px);padding:26px}dialog::backdrop{background:#080d14c9;backdrop-filter:blur(4px)}dialog h2{color:var(--orange)}dialog p{color:var(--muted)}dialog .row{margin-top:22px}a{color:var(--orange)}.log{border-left:2px solid #465361;padding-left:16px;margin:16px 0}.badge-warn{color:#ffbc86}.detail-grid{display:grid;grid-template-columns:1.4fr 1fr;gap:20px}.muted{line-height:1.6}.actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:20px}@media(max-width:760px){.stats{grid-template-columns:1fr}.detail-grid{grid-template-columns:1fr}.stats .panel{display:flex;justify-content:space-between;align-items:center}.stats .panel strong{font-size:24px}}
.brand img{width:175px;height:auto}header nav{margin:0}header button{font-size:13px}.auth{max-width:460px;margin:40px auto}.auth h1{margin-bottom:24px}form button{margin-top:18px}label.check{display:flex;align-items:center;gap:12px}input[type=checkbox]{width:20px;min-height:20px}pre{white-space:pre-wrap;overflow-wrap:anywhere;padding:16px;background:#101519;border-radius:8px}dialog{max-height:85vh;overflow:auto}textarea{font:inherit;display:block;width:100%;background:#101519;color:#fff;border:1px solid #435360;padding:12px;min-height:100px}svg.mesh{display:block;width:100%;height:180px;background:#0e1318;border-radius:9px}.live-image{width:100%;height:180px;object-fit:contain;background:#000}.preview-label{font-size:12px;color:var(--muted);margin:8px 0}.settings-list{display:grid;gap:14px}.license-info{border-left:3px solid var(--orange);padding:12px 18px;background:var(--panel);margin:22px 0}.list-row{display:flex;flex-wrap:wrap;gap:16px;align-items:center;justify-content:space-between;padding:18px 0;border-bottom:1px solid var(--line)}.list-row p{margin:0}#toast{position:sticky;bottom:12px;background:#252e36;border-radius:8px;padding:0 12px;z-index:20}#toast:not(:empty){padding:12px}code{overflow-wrap:anywhere}.auth .actions button{margin-top:0}.offline{opacity:.75}.row>label{flex:1}.empty{text-align:center;padding:50px 20px}.alert{color:#ffbc86}.error-text{white-space:pre-line}.card .facts{min-height:105px}h2 small{font-size:12px;color:var(--muted)}

/* Portal shell: sidebar navigation, matching the FotoVent structure. */
#sidebar>header{border:0;padding:24px;display:block}#sidebar .brand{display:block}#sidebar .brand img{width:180px;max-width:100%}#sidebarAccount:empty,#navigation:empty{display:none}.workspace{min-width:0}body:not(.signed-in) #sidebar{border-bottom:1px solid var(--line)}body:not(.signed-in) #sidebar>header{max-width:1300px;margin:auto}body.signed-in{display:grid;grid-template-columns:246px minmax(0,1fr);min-height:100vh}body.signed-in #sidebar{position:sticky;top:0;height:100dvh;display:flex;flex-direction:column;background:#171d23;border-right:1px solid var(--line);overflow:auto}#sidebar nav{display:flex;flex-direction:column;flex:1;gap:6px;padding:8px 16px;margin:0}#sidebar nav button{text-align:left;background:transparent;border-color:transparent;font-size:14px;width:100%;flex:none}#sidebar nav button:hover{background:#242d35}#sidebar nav button[aria-current=page]{background:#ff9a451a;border-color:#ff9a4555;color:#ffb375;box-shadow:inset 3px 0 var(--orange)}.nav-label{font-size:10px;letter-spacing:.14em;color:var(--muted);margin:20px 12px 6px}.sidebar-bottom{padding:22px 24px;border-top:1px solid var(--line);margin-top:24px}.sidebar-bottom strong,.sidebar-bottom small{display:block;overflow-wrap:anywhere}.sidebar-bottom small{color:var(--muted);margin:4px 0 16px}.sidebar-bottom button{width:100%;font-size:13px}.workspace main{width:100%;padding:32px}.workspace footer{padding:20px 32px}.workspace #crumbs:empty{display:none}.signed-in .workspace{display:flex;flex-direction:column}.signed-in .workspace main{flex:1;margin:0 auto}
@media(max-width:760px){body.signed-in{display:block}body.signed-in #sidebar{position:relative;height:auto;border-right:0;border-bottom:1px solid var(--line);overflow:visible}#sidebar>header{padding:18px 16px}#sidebar .brand img{width:160px}#sidebar nav{flex-direction:row;flex-wrap:wrap;padding:0 16px 14px;gap:8px}#sidebar nav button{width:auto;flex:none}#sidebar .nav-label{display:none}.sidebar-bottom{display:flex;align-items:center;flex-wrap:wrap;gap:8px 16px;margin:0;padding:12px 16px}.sidebar-bottom small{margin:0;flex:1}.sidebar-bottom button{width:auto;min-height:38px;padding:7px 10px}.workspace main{padding:22px 16px}.workspace footer{padding:20px 16px}}

#sidebar nav .guide-link{font-size:14px;padding:12px 14px;text-decoration:none;border-radius:9px;color:var(--muted)}#sidebar nav .guide-link:hover{color:var(--orange);background:#242d35}.download-link{display:inline-block;background:var(--orange);color:#21150b;border-radius:9px;padding:12px 18px;text-decoration:none;font-weight:650}.section-heading{margin-top:32px}.signed-in #sidebar>header{padding-bottom:20px}.signed-in #sidebar nav{overflow-y:auto;flex-wrap:nowrap;min-height:100px}.sidebar-bottom{flex-shrink:0}

#toast:empty{display:none}@media(max-width:760px){.signed-in #sidebar nav{min-height:0;flex-wrap:wrap;overflow:visible}}
/* Keep dialog actions on one shared row, including form submit and close. */
#modal[open]{display:flex;flex-wrap:wrap;align-items:center;gap:12px}
#modalBody,#modalBody>form{display:contents}
#modalBody>:not(form):not(button),#modalBody>form>:not(button){flex-basis:100%;min-width:0}
#modalBody h2{margin:0 0 4px}
#modalBody label{margin:6px 0 0}
#modalBody p{margin:4px 0}
#modalBody pre{max-width:100%;margin:4px 0}
#modalBody #formError:empty{display:none}
#modal button{width:auto;flex:0 1 auto;margin:6px 0 0}
#modal .row,#modal .actions{display:flex;flex-direction:row;flex-wrap:wrap;gap:10px}

.profile-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;margin-top:24px;align-items:start}.profile-grid h3{font-size:16px;margin:0 0 6px}.privacy-action,.account-closure,.password-section{border-top:1px solid var(--line);padding-top:20px;margin-top:20px}.privacy-action p{margin:4px 0 12px;color:var(--muted)}.privacy-action .actions{margin-top:8px}.billing-summary{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-bottom:20px}.billing-summary small{display:block;color:var(--muted)}.billing-summary strong{font-size:14px;font-weight:500;overflow-wrap:anywhere}.danger{color:#ffc0b7;border-color:#865048;background:#402a27}.privacy-request{border-top:1px solid var(--line);padding-top:16px;margin-top:12px}.profile-grid .download-link{font-size:14px}.profile-grid p{overflow-wrap:anywhere}@media(max-width:950px){.profile-grid{grid-template-columns:1fr}}
