/* Shared visual system. Page-specific layout and functional states stay in the templates. */
:root{--bg-dark:#f6f7f5;--bg-card:#fff;--bg-input:#f4f7f3;--border:#dce4df;--text-primary:#1d3235;--text-secondary:#718080;--accent-blue:#13786f;--accent-green:#31825b;--accent-orange:#9b6c25;--accent-red:#b84646;--accent-purple:#716294;--gradient-1:linear-gradient(135deg,#13786f,#0b5953)}
:root{color-scheme:light;--canvas:#f6f7f5;--surface:#fff;--ink:#1d3235;--muted:#718080;--line:#e2e8e4;--accent:#13786f;--accent-dark:#0b5953;--soft:#eaf4f0;--sidebar:280px;--shadow:0 4px 24px #183b3210;--bg:var(--canvas);--card:var(--surface);--fg:var(--ink);--err:#ad3939;--ok:#13786f}
*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;padding:0 0 48px;background:var(--canvas);color:var(--ink);font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;font-size:17px;line-height:1.6;min-height:100vh;letter-spacing:-.01em}
body:before{display:none}button,input,select,textarea{font:inherit}button,a,input,select,textarea,summary{-webkit-tap-highlight-color:transparent}a{color:var(--accent)}button,a,summary{touch-action:manipulation}button{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.5}button:focus-visible,a:focus-visible,summary:focus-visible,[tabindex]:focus-visible{outline:3px solid #53bda9;outline-offset:4px}
.ui-icon{flex-shrink:0;display:inline-block;vertical-align:middle}.studio-sidebar{position:fixed;inset:0 auto 0 0;width:var(--sidebar);background:#142e30;color:#dae7e3;z-index:80;padding:31px 18px 18px;display:flex;flex-direction:column;overflow-y:auto}
.studio-brand{display:flex;align-items:center;gap:11px;color:white;text-decoration:none;font-size:24px;font-weight:650;letter-spacing:-.6px;padding:0 10px;margin-bottom:48px;line-height:1.25}.studio-brand small{display:block;color:#96b6b0;letter-spacing:2.3px;font-size:12px;font-weight:500;margin-top:5px}.brand-mark{width:37px;height:42px;background:#d5edc6;color:#244e41;display:grid;place-items:center;border-radius:11px}.brand-mark svg{width:25px;height:25px}
.nav-caption{font-size:12px;font-weight:650;letter-spacing:1.9px;color:#8fa9a5;padding:0 15px;margin-bottom:10px}.studio-nav{display:grid;gap:5px;margin:0 0 30px}.studio-nav a{display:flex;gap:12px;align-items:center;min-height:45px;padding:11px 14px;color:#b9ccc8;text-decoration:none;font-size:16px;font-weight:500;border-radius:8px;transition:background .18s,color .18s}.studio-nav a:hover{background:#ffffff0a;color:white}.studio-nav a.active{background:#294849;color:#f3f9ee}.studio-nav a.active>.ui-icon{color:#c9eeb6}.nav-active-dot{width:5px;height:5px;margin-left:auto;border-radius:50%;background:#c9eeb6}.sidebar-bottom{margin-top:auto;padding-top:32px}.sidebar-note{padding:20px 12px 0;border-top:1px solid #ffffff12;margin-top:25px;color:#95aeaa;font-size:13px;display:flex;align-items:center;gap:8px}.live-dot{width:5px;height:5px;border-radius:50%;background:#a6d399}
.ecosystem-links{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin:0}.ecosystem-links a{display:flex;align-items:center;gap:7px;font-size:14px;text-decoration:none;padding:9px 7px;border:1px solid #ffffff10;border-radius:7px;color:#c8d8d3;transition:background .2s}.ecosystem-links a:hover{background:#ffffff0c;color:white}.ecosystem-links a>.ui-icon{width:12px;height:12px;margin-left:auto;opacity:.6}.app-monogram{display:grid;place-items:center;width:22px;height:22px;border-radius:5px;font-size:13px;font-weight:650;color:#d8cfee;background:#594f7055}.app-editor{background:#5b835255;color:#d9ecca}.app-course{background:#99774444;color:#f1d5a9}.app-image{background:#4a748755;color:#c5e6ef}
.studio-topbar{height:80px;margin-left:var(--sidebar);padding:0 44px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;gap:16px;background:#ffffffb8}.topbar-context{display:flex;align-items:center;gap:14px;font-size:16px;min-width:0}.topbar-workspace{color:var(--muted)}.topbar-slash{color:#bac5bf}.topbar-context strong{font-weight:550}.profile-menu{position:relative;z-index:90}.profile-menu summary{display:flex;align-items:center;gap:10px;cursor:pointer;list-style:none;font-size:16px}.profile-menu summary::-webkit-details-marker{display:none}.profile-avatar{width:32px;height:32px;display:grid;place-items:center;background:#e2eadf;color:#466641;border:3px solid white;box-shadow:0 0 0 1px #dce5da;border-radius:50%;font-size:16px;font-weight:650}.profile-name{max-width:180px;overflow:hidden;text-overflow:ellipsis}.profile-menu .ui-icon{width:14px}.profile-popover{position:absolute;right:0;top:48px;width:210px;padding:8px;background:white;box-shadow:0 12px 36px #183b3220;border:1px solid var(--line);border-radius:12px}.profile-role{display:block;font-size:13px;color:var(--muted);padding:9px 12px;text-transform:uppercase;letter-spacing:.6px}.profile-popover a,.profile-popover button{display:block;padding:10px 12px;text-align:left;font-size:16px;width:100%;margin:0;border:0;background:transparent;color:var(--ink);text-decoration:none;border-radius:6px}.profile-popover a:hover,.profile-popover button:hover{background:var(--soft)}.profile-popover form{margin:0}.nav-toggle,.nav-scrim{display:none}
body>.container{margin:0 44px 0 calc(var(--sidebar) + 44px);width:auto;max-width:none;background:none;border:0;border-radius:0;box-shadow:none;overflow:visible;padding:0}
.container>.header{position:relative;display:block;padding:43px 0 32px;text-align:left;background:none;color:var(--ink);border:0;border-radius:0;margin:0;box-shadow:none;overflow:visible}.container>.header:before{content:"REALTYWARP / AUDIO STUDIO";display:block;position:static;background:none;transform:none;width:auto;height:auto;font-size:12px;font-weight:650;letter-spacing:2px;color:var(--accent);margin:0 0 12px;opacity:1}.container>.header:after{display:none}.container>.header h1{font-size:clamp(32px,3vw,44px);font-weight:600;letter-spacing:-1.4px;line-height:1.2;margin:0 0 10px;color:var(--ink);text-shadow:none}.container>.header p{font-size:16px;color:var(--muted);opacity:1;line-height:1.7;margin:0;max-width:680px}.container>.header>a,.container>.header>.nav-links{display:none}.content{padding:0}
.section,.tool-card,.folder-scan-section,.run-card,.history-item,.results-section,.summary-stat{border:1px solid var(--line);border-radius:14px;background:var(--surface);box-shadow:0 2px 5px #183b3203;padding:27px;margin-bottom:24px;border-left:1px solid var(--line)}
.section-title{font-size:19px;color:var(--ink);font-weight:650;margin-bottom:20px;letter-spacing:-.3px}.section>p,.description{color:var(--muted)}.tts-options{grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:12px}.tts-card{padding:20px;border:1px solid var(--line);border-radius:10px;background:#fff;transition:border-color .2s,background .2s,box-shadow .2s}.tts-card:hover{border-color:#a5c5b8;box-shadow:0 3px 12px #13786f0d}.tts-card.selected{border:1px solid var(--accent);background:#f1f8f4;box-shadow:0 0 0 1px var(--accent)}.tts-card h3{font-size:17px;color:var(--ink);margin-bottom:9px}.tts-card p{font-size:16px;line-height:1.65;color:var(--muted)}.tts-card .meta{font-size:13px;gap:8px;color:#5d766f}
label,.form-group label{font-size:16px;font-weight:600;color:#405653;margin-bottom:8px}input[type=text],input[type=password],input[type=number],input[type=file],textarea,select,.form-control{border:1px solid #dce4df;border-radius:8px;background:#fcfdfb;color:var(--ink);font-size:16px;line-height:1.5;padding:11px 13px;min-height:43px;box-shadow:none;max-width:100%}textarea{font-family:"SFMono-Regular",Consolas,monospace;font-size:16px;line-height:1.75;min-height:170px}input:focus,textarea:focus,select:focus{border-color:var(--accent);outline:2px solid #13786f20;outline-offset:1px}input[type=checkbox],input[type=radio],input[type=range]{accent-color:var(--accent)}input[type=checkbox],input[type=radio]{width:auto;min-height:0}.form-group{margin-bottom:23px}input::file-selector-button{padding:7px 11px;background:#eaf1eb;border:0;border-radius:5px;color:#305b4f;margin-right:12px;font:inherit}select{cursor:pointer}
.btn,.auth-page button:not(.nav-toggle):not(.nav-scrim),.guest-page button{font-size:16px;font-weight:600;letter-spacing:0;line-height:1.5;padding:11px 17px;border-radius:8px;border:1px solid transparent;box-shadow:none;transition:background .18s,box-shadow .18s;transform:none}.btn:hover{transform:none;box-shadow:0 3px 12px #183b3212}.btn-primary,.auth-page .card button,.guest-page .card button{background:var(--accent);color:white}.btn-primary:hover,.auth-page .card button:hover,.guest-page .card button:hover{background:var(--accent-dark)}.btn-secondary{background:#edf1ed;color:#446158;border-color:#dce5dc}.btn-success{background:#e8f3e9;color:#2e6c42;border-color:#cee2d0}.btn-danger{background:#fbeeee;color:#af4949;border-color:#efd4d4}.btn-warning{background:#fcf3e4;color:#8e6a2c;border-color:#ecdfc4}.btn-sm{padding:7px 11px;font-size:14px}
.tools-grid{gap:24px;padding:0;align-items:start}.tool-card{margin:0;transform:none}.tool-card:hover{transform:none;box-shadow:var(--shadow)}.tool-card h2{font-size:22px;color:var(--ink);font-weight:600;margin-bottom:9px}.tool-card h2 .icon{font-size:22px}.tool-card .description{font-size:16px;line-height:1.8;margin-bottom:25px}.file-drop-zone{border:1px dashed #afc5b7;border-radius:10px;background:#f6f9f5;padding:28px 18px}.file-drop-zone:hover,.file-drop-zone.dragover{border-color:var(--accent);background:#edf6ef;transform:none}.file-drop-zone .icon{font-size:34px;opacity:.7;margin-bottom:8px}.file-drop-zone p{font-size:16px;color:#536c60}.file-drop-zone .formats{font-size:13px;color:#7d8d84}.preset-card,.format-card{border-radius:8px;border-width:1px;box-shadow:none}.preset-card.selected,.format-card.selected{border-color:var(--accent);background:var(--soft);color:var(--accent)}.file-item,.param-item{border-radius:8px;background:#f4f7f3;border-color:var(--line)}
.folder-scan-section h2{color:var(--ink);font-size:21px}.run-card,.history-item{padding:0;overflow:hidden;transition:box-shadow .18s,border-color .18s}.run-card:hover,.history-item:hover{transform:none;border-color:#c5d6cb;box-shadow:var(--shadow)}.run-header,.history-header{background:#fff;padding:23px}.run-header:hover,.history-header:hover{background:#f9fbf7}.run-details,.history-details{border-top:1px solid var(--line);background:#fcfdfb}.history-info h3,.run-info h3{font-size:19px;color:var(--ink)}.history-meta,.run-meta{font-size:14px;color:var(--muted)}.summary-row{gap:15px;margin-bottom:24px}.summary-stat{padding:20px;margin-bottom:0}.summary-stat .value{font-size:32px;font-weight:600;color:var(--accent)}.summary-stat .label{font-size:14px;color:var(--muted)}.empty-state{padding:70px 24px;border:1px dashed #ccdacf;border-radius:14px;background:#fcfdfb;color:var(--muted)}.empty-state h2{color:var(--ink);font-size:24px}.status-badge{border-radius:5px;font-size:13px;letter-spacing:.3px;padding:4px 8px}.history-type{border-radius:5px}
table,.files-table{font-size:16px;border-collapse:collapse}td,th,.files-table td,.files-table th{padding:13px 15px;border-bottom:1px solid var(--line);text-align:left;overflow-wrap:anywhere}th,.files-table th{color:#667c70;background:#f5f8f3;font-size:13px;font-weight:600;letter-spacing:.5px;text-transform:uppercase}table input{min-width:0}.alert,.msg{border-radius:9px;font-size:16px;box-shadow:none}.progress-bar{background:var(--accent)}.progress{background:#e6ede5;border-radius:6px}.spinner{border-top-color:var(--accent)}audio{max-width:100%}.result-item,.slide-card,.ex-card{border:1px solid var(--line);border-radius:10px;box-shadow:none}.vision-provider-btn,.vm-tab{border-radius:7px;font-size:16px}.vm-modal{border-radius:16px;box-shadow:0 30px 90px #102e3030}.vm-modal-header{background:#f8faf6;border-bottom:1px solid var(--line)}.vm-modal-header h3{color:var(--ink)}
.auth-page .card{max-width:700px;margin:45px 44px 0 calc(var(--sidebar) + 44px);background:white;border:1px solid var(--line);border-radius:16px;box-shadow:var(--shadow);padding:36px}.auth-page .card.wide{max-width:1000px}.auth-page h1,.guest-page h1{font-size:32px;font-weight:600;letter-spacing:-.8px;margin-bottom:12px;color:var(--ink)}.auth-page h2{color:var(--ink);margin-top:22px}.auth-page p.sub,.guest-page p.sub{font-size:16px;line-height:1.8;color:var(--muted)}.auth-page .card nav{font-size:16px;margin-bottom:26px}.auth-page .card form:not(.inline)>button{width:auto}.auth-page .card button.ghost,.guest-page .card button.ghost{background:#f2f6f1;border-color:#dbe5dc;color:#45634d}.auth-page .card button.small{font-size:14px;padding:6px 10px}.auth-page .card .check,.guest-page .card .check{font-size:16px;font-weight:400}.auth-page .card td{max-width:290px;font-size:14px}.auth-page .card table{display:block;overflow-x:auto}.auth-page .profile-popover button{background:transparent;color:var(--ink)}
.guest-page{background:radial-gradient(ellipse at 15% 0%,#e6eee1,transparent 50%),var(--canvas);padding:0 20px 40px}.guest-brand{display:flex;justify-content:center;padding:40px 0 0}.guest-brand .studio-brand{margin:0;color:var(--ink);padding:0}.guest-brand .studio-brand small{color:#668177}.guest-page .card{max-width:460px;margin:35px auto 26px;background:#fff;border:1px solid var(--line);border-radius:18px;box-shadow:0 12px 50px #274d3510;padding:36px}.guest-page .card button{width:100%;margin-top:22px}.guest-page .qr{padding:8px;background:#f9fbf7;border:1px solid var(--line);border-radius:12px}.guest-page .qr img{width:190px;height:190px}.guest-page>.ecosystem-links{max-width:460px;margin:0 auto;grid-template-columns:repeat(4,1fr)}.guest-page>.ecosystem-links a{background:#fff8;color:#597061;border-color:var(--line)}.guest-page>.ecosystem-links .app-monogram{background:#e7eee4;color:#5d7858}.guest-page>.ecosystem-links a>.ui-icon{display:none}.guest-page code{font-size:14px;background:var(--soft);color:#365e4d}
.container>.header h1{background:none;-webkit-text-fill-color:var(--ink)}
.history-item-header{padding:23px 23px 0;margin-bottom:0}.history-item-title{font-size:19px;color:var(--ink);margin-bottom:8px}.history-item-meta{font-size:14px;color:var(--muted);gap:14px;overflow-wrap:anywhere}.history-item-actions{padding:0 23px 23px;flex-wrap:wrap}.history-list{gap:16px}.history-list>.history-item{margin-bottom:0}.history-item>.run-details{border:0;border-top:1px solid var(--line);border-radius:0;margin:0}.btn-secondary:hover{background:#e0e9df;color:#36543e}.btn-success:hover{background:#d8eadb;color:#205430}.btn-danger:hover{background:#f4dede;color:#993838}.btn-warning:hover{background:#f2e7d1;color:#795b25}
.radio-group{flex-wrap:wrap}.folder-scan-form,.form-row{min-width:0}.folder-scan-form>*{min-width:0}.folder-scan-form input{width:100%;min-width:0}.history-info{min-width:0;flex-wrap:wrap}.history-meta{min-width:0;flex-wrap:wrap}.history-details{overflow-x:auto}.step-number{display:inline-grid;place-items:center;width:28px;height:28px;margin-right:9px;border-radius:7px;background:#eef4eb;color:#6c8561;font-size:13px;font-weight:650;letter-spacing:.3px}
.repair-panel>summary{list-style:none;display:flex;align-items:center;justify-content:space-between;gap:16px;cursor:pointer;font-size:17px;font-weight:600;color:var(--ink)}.repair-panel>summary::-webkit-details-marker{display:none}.repair-panel>summary small{display:block;font-size:14px;color:var(--muted);font-weight:400;margin-top:3px}.repair-expand{display:grid;place-items:center;width:28px;height:28px;background:var(--soft);border-radius:7px;color:var(--accent);font-size:22px;font-weight:400}.repair-panel[open]>summary{margin-bottom:24px}.repair-panel[open] .repair-expand{transform:rotate(45deg)}
.studio-nav a{font-size:16px}.section-title{display:flex;align-items:center}.tool-card h2 .icon{display:none}.file-drop-zone .icon{filter:grayscale(1);opacity:.55}.security-intro{display:flex;align-items:center;gap:16px;padding:20px;border:1px solid #d9e6d7;border-radius:10px;background:#f3f8ef;margin:24px 0 28px}.security-intro>.ui-icon{color:#5e8054;width:28px;height:28px}.security-intro strong{display:block;font-size:16px}.security-intro p{font-size:16px;color:var(--muted);margin:3px 0 0}.device-name{font-size:16px;font-weight:600}.device-platform{font-size:14px;color:var(--muted)}.auth-page .card table{display:table;width:100%}.auth-page .card>nav{display:none}.auth-page .card td:first-child{width:45%}.auth-page .card form>label:first-of-type{margin-top:0}.auth-page .card h2{margin-bottom:16px}
@media(min-width:1600px){body>.container{max-width:1260px;margin-left:calc(var(--sidebar) + (100vw - var(--sidebar) - 1260px)/2);margin-right:auto}.studio-topbar{padding-left:60px;padding-right:60px}}
@media(max-width:1150px){:root{--sidebar:260px}.studio-topbar{padding:0 28px}body>.container{margin:0 28px 0 calc(var(--sidebar) + 28px)}.auth-page .card{margin-left:calc(var(--sidebar) + 28px);margin-right:28px}.tools-grid{grid-template-columns:1fr}.section,.tool-card{padding:23px}.studio-sidebar{padding-left:12px;padding-right:12px}}
@media(max-width:800px){:root{--sidebar:280px}.studio-sidebar{transform:translateX(-100%);transition:transform .2s;z-index:120}.nav-open .studio-sidebar{transform:translateX(0)}.nav-open .nav-scrim{display:block;position:fixed;inset:0;width:100%;height:100%;border:0;border-radius:0;background:#10292980;z-index:110;margin:0}.nav-toggle{display:grid;place-items:center;width:34px;height:34px;padding:5px;margin:0;border:1px solid var(--line);border-radius:7px;color:var(--ink);background:white}.studio-topbar{margin:0;height:66px;padding:0 20px}.topbar-context{gap:9px}.topbar-workspace,.topbar-slash{display:none}body>.container{margin:0 22px}.container>.header{padding:32px 0 25px}.auth-page .card{margin:28px 22px 0;max-width:none}.studio-brand{margin-bottom:30px}.sidebar-bottom{padding-top:20px}.tts-options{grid-template-columns:repeat(2,minmax(0,1fr))}.tts-card{padding:16px}.summary-row{flex-wrap:wrap}.summary-stat{min-width:120px}.profile-name{max-width:100px}.history-actions,.run-actions{flex-wrap:wrap}.history-header,.run-header{flex-wrap:wrap;gap:14px}.guest-page .card{margin-top:26px}}
@media(max-width:480px){body>.container{margin:0 14px}.studio-topbar{padding:0 15px}.profile-name{display:none}.section,.tool-card,.folder-scan-section{padding:19px 16px;margin-bottom:18px}.container>.header h1{font-size:32px}.container>.header p{font-size:16px}.tts-options{grid-template-columns:1fr}.tts-card{padding:17px}.section-title{font-size:17px}.auth-page .card{margin:22px 14px 0;padding:23px 18px}.guest-page{padding-left:14px;padding-right:14px}.guest-page .card{padding:26px 22px}.guest-page>.ecosystem-links{grid-template-columns:repeat(2,1fr)}.tools-grid{gap:18px}.run-header,.history-header{padding:17px}.topbar-context{font-size:14px}.studio-topbar strong{white-space:nowrap}.slide-range{grid-template-columns:1fr}.content{min-width:0}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}*,*:before,*:after{animation-duration:.01ms!important;transition-duration:.01ms!important;animation-iteration-count:1!important}}

/* Keep larger text comfortable in narrow controls and card layouts. */
small{font-size:.875em}.tts-card .meta{flex-wrap:wrap}.section-title{gap:4px}.step-number{flex-shrink:0}.ecosystem-links a{min-width:0}.app-monogram{flex-shrink:0}.topbar-context strong{overflow-wrap:anywhere}
@media(max-width:480px){.studio-topbar strong{white-space:normal}.topbar-context{gap:7px}.history-item-header{padding:18px 16px 0}.history-item-actions{padding:0 16px 18px}.auth-page .card td,.auth-page .card th{padding:10px 6px}.profile-popover{width:230px}}
