.admin-page{display:grid;gap:24px;min-width:0}.admin-tabs{display:flex;gap:6px;overflow-x:auto;padding:4px;background:var(--surface,#fff);border:1px solid var(--border,#e6e4ef);border-radius:16px;scrollbar-width:thin;max-width:100%}.admin-tabs button{display:flex;align-items:center;justify-content:center;gap:8px;flex:0 0 auto;border:0;background:transparent;font:inherit;color:var(--muted,#676575);padding:12px 16px;border-radius:12px;cursor:pointer}.admin-tabs button.active{background:var(--accent-soft,#eeebff);color:var(--accent,#6956df)}.admin-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}.admin-stat{display:grid;gap:12px;padding:20px}.admin-stat strong{font-size:32px;letter-spacing:-1px}.admin-section-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:20px;flex-wrap:wrap}.admin-section-head h2{margin:0 0 8px}.admin-section-head p{margin:0}.admin-loading{display:flex;align-items:center;gap:12px;justify-content:center;min-height:180px}.admin-error{border-color:#dc7979!important;background:var(--error-bg,#fff0f0)!important;color:var(--error,#9a3434)}.admin-error p,.admin-test-success p{white-space:pre-wrap;overflow-wrap:anywhere;margin:8px 0}.admin-test-success{background:var(--success-bg,#eaf8ef)!important}.admin-connection-notice{display:flex;align-items:center;gap:14px;flex-wrap:wrap}.admin-connection-notice>div{flex:1;min-width:150px}.admin-connection-notice p{margin:5px 0}.admin-search{display:flex;align-items:center;gap:10px;min-width:0;max-width:100%}.admin-search input{width:210px;min-width:0}.admin-id{display:block;font-family:monospace;font-size:12px;color:var(--muted,#676575)}.admin-prompt{display:block;max-width:330px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.admin-username{display:block;opacity:.7;text-align:start;margin-top:5px}.admin-job-error{display:block;white-space:normal;max-width:350px;overflow-wrap:anywhere;color:var(--error,#a34848)}.admin-pagination{display:flex;align-items:center;justify-content:flex-end;gap:15px;margin-top:20px;font-size:13px}.admin-empty{text-align:center;padding:30px}.admin-settings{display:grid;gap:22px}.admin-settings .card>h2{margin-top:0}.admin-switches{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;margin-top:24px}.admin-switches label{display:flex;align-items:flex-start;gap:10px;font-size:14px}.admin-switches input{width:19px;height:19px;accent-color:var(--accent,#6956df);flex:none}.admin-switches strong,.admin-switches small{display:block}.admin-switches small{margin-top:5px;color:var(--muted,#676575);line-height:1.7}.admin-costs{grid-template-columns:repeat(3,minmax(0,1fr))}.admin-model-lines{font-family:monospace;font-size:13px;resize:vertical}.admin-save-bar{display:flex;justify-content:flex-end}.admin-provider-layout{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(0,1fr);gap:24px;align-items:start}.admin-provider-layout .field{margin:0 0 20px}.admin-provider-guide ol{padding-inline-start:25px;line-height:2.1}.admin-provider-guide .notice{margin-top:20px}.admin-provider-guide .notice p{font-size:14px;line-height:1.8}.admin-provider-actions{display:flex;gap:12px;flex-wrap:wrap;margin:25px 0 18px}.admin-secret{display:flex;align-items:center;border:1px solid var(--border,#ddd);border-radius:12px;min-width:0;background:var(--surface,#fff)}.admin-secret input{min-width:0;flex:1;border:0!important;box-shadow:none!important;background:transparent!important}.admin-secret button{flex:none;margin:4px}.admin-audit-detail{display:block;white-space:pre-wrap;max-width:500px;overflow-wrap:anywhere}.admin-health-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.admin-health-name{display:flex;align-items:center;gap:10px}.admin-health-name h2{font-size:16px}.admin-health-value{white-space:pre-wrap;overflow-wrap:anywhere;font-family:monospace;line-height:1.8;font-size:13px;margin-bottom:0;text-align:left}.admin-dialog-cover{position:fixed;inset:0;z-index:120;background:#08091899;display:grid;place-items:center;padding:20px;backdrop-filter:blur(5px)}.admin-dialog{background:var(--surface,#fff);color:var(--text,#181825);width:min(660px,100%);max-height:90dvh;overflow:auto;border:1px solid var(--border,#ddd);border-radius:22px;padding:26px;box-shadow:0 30px 100px #0005}.admin-dialog header{display:flex;align-items:center;justify-content:space-between;gap:15px;margin-bottom:20px}.admin-dialog h2{margin:0;font-size:22px}.admin-dialog h3{display:flex;align-items:center;gap:8px}.admin-dialog hr{border:0;border-top:1px solid var(--border,#ddd);margin:28px 0}.admin-user-wallet{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));background:var(--accent-soft,#f2f0ff);border-radius:14px;margin-bottom:24px;padding:16px;gap:10px}.admin-user-wallet span{display:grid;gap:7px}.admin-user-wallet small{font-size:12px;color:var(--muted,#666)}.admin-user-wallet strong{font-size:25px}.admin-dialog .form-grid{margin-bottom:18px}.status-succeeded,.status-success,.status-active{color:var(--success,#2e7d53)!important;background:var(--success-bg,#eaf8ef)!important}.status-failed,.status-suspended{color:var(--error,#a34848)!important;background:var(--error-bg,#fff0f0)!important}.status-running{background:var(--accent-soft,#eeebff)!important;color:var(--accent,#6956df)!important}.status-queued{background:var(--warning-bg,#fff4df)!important;color:var(--warning,#a36d25)!important}
.admin-page{--text:var(--ink);--error:var(--danger);--error-bg:var(--danger-soft);--success:var(--green);--success-bg:var(--green-soft)}.admin-page .card{padding:24px}.admin-page .admin-stat{padding:20px}.admin-page .notice{display:block}.admin-page .admin-connection-notice{display:flex}.admin-page input,.admin-page select,.admin-page textarea{font-size:14px}.admin-dialog{--text:var(--ink);--error:var(--danger);--error-bg:var(--danger-soft)}.admin-page .admin-search input{padding:11px;border:1px solid var(--border);background:var(--surface);color:var(--ink);border-radius:10px}.spinner{display:inline-block;flex:none;width:17px;height:17px;border:2px solid currentColor;border-inline-end-color:transparent;border-radius:50%;animation:spin .8s linear infinite}.admin-page .data-table th,.admin-page .data-table td{font-size:12px}.admin-page .badge{font-size:11px}.admin-page p{font-size:13px}.admin-page .card>h2{margin-bottom:14px}.admin-page .field small{font-size:11px}.admin-page .page-header p{font-size:13px}.admin-page .admin-connection-notice p{font-size:12px}
@media(max-width:1100px){.admin-provider-layout{grid-template-columns:1fr}.admin-stats{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:600px){.admin-page{gap:18px}.admin-page .card{padding:18px}.admin-tabs button{padding:10px 13px;font-size:13px;min-height:44px}.admin-stats{gap:10px}.admin-page .admin-stat{padding:15px}.admin-stat strong{font-size:26px}.admin-stat .muted{font-size:12px}.admin-switches,.admin-health-grid,.admin-costs{grid-template-columns:1fr}.admin-search{width:100%}.admin-search input{flex:1;width:0}.admin-search>svg{flex:none}.admin-dialog-cover{padding:10px}.admin-dialog{padding:18px;border-radius:17px}.admin-dialog h2{font-size:18px}.admin-user-wallet strong{font-size:22px}.admin-user-wallet{padding:13px;gap:8px}.admin-provider-actions .btn{flex:1;white-space:normal;min-width:120px}.admin-pagination{justify-content:space-between;gap:5px;font-size:12px}.admin-page input,.admin-page select,.admin-page textarea,.admin-dialog input,.admin-dialog select{font-size:16px}}



:root{font-family:Tahoma,Arial,sans-serif;direction:rtl;color-scheme:light;--bg:#f7f7f3;--surface:#fff;--surface-soft:#f5f5f1;--surface-hover:#f0f0ec;--ink:#22252b;--muted:#85868b;--border:#e7e7e2;--accent:#7560c9;--accent-strong:#644cb9;--accent-soft:#f0ecfb;--accent-ink:#6750b3;--green:#398a64;--green-soft:#eef8f2;--danger:#b65c5c;--danger-soft:#fdf0ef;--blue:#567ca2;--shadow:0 14px 42px #22252b08;--radius:18px;background:var(--bg);color:var(--ink);font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased}
:root[data-theme=dark]{color-scheme:dark;--bg:#15171c;--surface:#1d2026;--surface-soft:#23262d;--surface-hover:#2a2d35;--ink:#eeeef2;--muted:#9c9ca8;--border:#32353e;--accent:#a392e1;--accent-strong:#8874ce;--accent-soft:#302940;--accent-ink:#c0acef;--green:#8bc6a5;--green-soft:#20372c;--danger:#f0a09c;--danger-soft:#40282b;--blue:#9ebfdf;--shadow:0 14px 42px #0002}
*{box-sizing:border-box}body{margin:0;min-width:280px}button,input,select,textarea{font:inherit}button,a,input,select,textarea{-webkit-tap-highlight-color:transparent}button{cursor:pointer;color:inherit}button:disabled{cursor:not-allowed;opacity:.52}button{border:0;background:none}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid #a08cde88;outline-offset:3px}a{color:var(--accent-ink)}h1,h2,h3,p{margin:0}h1{font-size:30px;line-height:1.65;font-weight:700;letter-spacing:-1px}h2{font-size:18px;line-height:1.8}h3{font-size:15px;line-height:1.8}p{line-height:1.95}small,.small{font-size:13px;line-height:1.8}svg{flex-shrink:0}input,select,textarea{max-width:100%;min-width:0}textarea{resize:vertical}button strong,button span,button small{overflow-wrap:anywhere}.muted{color:var(--muted)}.sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.spin{animation:spin 1.1s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}[hidden]{display:none!important}.status-dot{width:6px;height:6px;background:#83b295;border-radius:50%;display:inline-block}.eyebrow{display:flex;align-items:center;gap:7px;color:var(--muted);font-size:13px;line-height:1.8}.btn{display:inline-flex;justify-content:center;align-items:center;gap:8px;min-height:42px;padding:10px 16px;border:1px solid transparent;border-radius:10px;text-decoration:none;font-size:14px;font-weight:700;line-height:1.7;transition:background .15s,transform .15s;max-width:100%}.btn-primary{background:var(--accent);color:#fff}.btn-primary:hover:not(:disabled){background:var(--accent-strong)}.btn-secondary{background:var(--surface);border-color:var(--border)}.btn-secondary:hover:not(:disabled){background:var(--surface-hover)}.btn-ghost{background:transparent;color:var(--muted)}.btn-ghost:hover:not(:disabled){background:var(--surface-soft);color:var(--ink)}.btn-danger{background:var(--danger-soft);border-color:#b65c5c33;color:var(--danger)}.btn-sm{min-height:34px;padding:7px 12px;font-size:13px}.btn-full{width:100%}.icon-button{width:34px;height:34px;display:inline-flex;justify-content:center;align-items:center;flex-shrink:0;border-radius:9px;color:var(--muted)}.icon-button:hover:not(:disabled){color:var(--ink);background:var(--surface-hover)}.text-button{display:inline-flex;align-items:center;justify-content:center;gap:6px;font-size:13px;line-height:1.8;color:var(--accent-ink);padding:4px}.card,.panel{border:1px solid var(--border);background:var(--surface);border-radius:var(--radius);min-width:0}.panel{padding:22px}.panel-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:18px;flex-wrap:wrap}.panel-heading h2{display:flex;align-items:center;gap:8px;font-size:15px}.page-header{display:flex;justify-content:space-between;align-items:center;gap:18px;margin-bottom:25px}.page-header h1{margin-top:4px}.page-header p{color:var(--muted);font-size:14px;margin-top:4px;max-width:640px}.page-icon{display:inline-flex;width:47px;height:47px;justify-content:center;align-items:center;border-radius:13px;background:var(--accent-soft);color:var(--accent-ink);flex-shrink:0}.field{display:flex;flex-direction:column;gap:8px;font-size:14px;line-height:1.8;margin-bottom:18px;color:var(--ink);min-width:0}.field input,.field select,.field textarea{border:1px solid var(--border);background:var(--surface);color:var(--ink);border-radius:10px;padding:12px;line-height:1.8;width:100%;font-size:14px}.field input:disabled{background:var(--surface-soft);color:var(--muted)}.field textarea{min-height:96px}.field small{color:var(--muted);font-size:12px}.field input::placeholder,.field textarea::placeholder{color:var(--muted)}.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.form-section-heading{border-top:1px solid var(--border);padding-top:22px;margin:12px 0 20px}.form-section-heading p{color:var(--muted);font-size:13px;margin-top:4px}.notice{display:flex;align-items:flex-start;gap:10px;background:var(--surface-soft);border:1px solid var(--border);border-radius:12px;color:var(--muted);font-size:14px;line-height:1.9;padding:14px 16px;margin-bottom:18px;overflow-wrap:anywhere;min-width:0}.notice span{flex:1;min-width:0}.notice svg{margin-top:3px}.notice button{font-size:13px;color:var(--accent-ink);font-weight:700;display:inline-flex;align-items:center;gap:6px;flex-shrink:0}.notice-error{background:var(--danger-soft);border-color:#b65c5c25;color:var(--danger)}.notice-warning{background:#fff4db;border-color:#dbcda2;color:#987734}:root[data-theme=dark] .notice-warning{background:#3a3424;color:#ebcd8d;border-color:#4d4430}.badge{display:inline-flex;justify-content:center;align-items:center;gap:5px;border-radius:7px;background:var(--surface-soft);border:1px solid var(--border);color:var(--muted);font-size:12px;padding:4px 8px;line-height:1.7;white-space:nowrap}.badge-succeeded{color:var(--green);background:var(--green-soft);border-color:transparent}.badge-running{color:var(--accent-ink);background:var(--accent-soft);border-color:transparent}.badge-failed{color:var(--danger);background:var(--danger-soft);border-color:transparent}.badge-queued{color:#a48448;background:#faf4e7;border-color:transparent}:root[data-theme=dark] .badge-queued{background:#383123;color:#dfc690}.empty-state{display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;gap:13px;padding:58px 24px;color:var(--muted);min-width:0}.empty-state h2,.empty-state strong{color:var(--ink)}.empty-state p{max-width:450px;font-size:14px}.empty-state>svg{color:var(--accent);margin-bottom:5px}.empty-state.compact{padding:27px 15px;gap:9px}.empty-state.compact strong{font-size:14px}.empty-state.compact p{font-size:13px}.table-scroll{overflow-x:auto;max-width:100%;min-width:0;-webkit-overflow-scrolling:touch}.data-table{width:100%;border-collapse:collapse;text-align:right;font-size:14px;line-height:1.8}.data-table th{font-weight:400;color:var(--muted);white-space:nowrap;background:var(--surface-soft)}.data-table th,.data-table td{padding:12px 14px;border-bottom:1px solid var(--border)}.data-table tr:last-child td{border-bottom:0}.data-table td{max-width:360px;overflow-wrap:anywhere}.segmented-control{display:flex;gap:3px;padding:4px;background:var(--surface-soft);border:1px solid var(--border);border-radius:10px;min-width:0}.segmented-control button{padding:9px 15px;border-radius:7px;font-size:13px;color:var(--muted);line-height:1.7;display:flex;align-items:center;justify-content:center;gap:6px;white-space:nowrap}.segmented-control button.active{background:var(--surface);color:var(--ink);box-shadow:0 2px 5px #00000007}.search-field{display:flex;align-items:center;gap:10px;border:1px solid var(--border);background:var(--surface);border-radius:10px;padding:0 12px;min-width:0;color:var(--muted)}.search-field input{border:0;background:transparent;padding:12px 0;outline:0;color:var(--ink);width:100%;font-size:14px}.search-field:focus-within{box-shadow:0 0 0 3px #a08cde22}.model-control{display:flex;align-items:center;gap:6px;min-width:0;font-size:12px;color:var(--muted)}.model-control>span{flex-shrink:0}.model-control select{background:transparent;border:0;border-radius:5px;font-size:12px;color:var(--muted);padding:5px 1px;max-width:170px;text-overflow:ellipsis}.cost-label{display:inline-flex;align-items:center;gap:5px;font-size:12px;color:var(--muted);white-space:nowrap}.dialog{padding:0;border:1px solid var(--border);border-radius:20px;background:var(--surface);color:var(--ink);width:min(490px,calc(100vw - 28px));max-height:calc(100dvh - 40px);box-shadow:0 30px 100px #0003;overflow:auto}.dialog::backdrop{background:#171a275e;backdrop-filter:blur(5px)}.dialog-wide{width:min(850px,calc(100vw - 28px))}.dialog-inner{padding:25px;min-width:0}.dialog-header{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:22px}.dialog-header h2{font-size:18px}.dialog-inner>p{font-size:14px;color:var(--muted)}.dialog-actions{display:flex;justify-content:flex-end;align-items:center;gap:10px;margin-top:24px;flex-wrap:wrap}.toast-stack{position:fixed;left:24px;bottom:24px;width:min(430px,calc(100vw - 32px));display:flex;flex-direction:column;gap:10px;z-index:120;pointer-events:none}.toast{display:flex;align-items:flex-start;gap:10px;padding:15px;border-radius:13px;background:var(--surface);box-shadow:0 8px 35px #15151d1a;border:1px solid var(--border);font-size:14px;line-height:1.8;pointer-events:auto}.toast p{flex:1;min-width:0;overflow-wrap:anywhere;line-height:1.8}.toast>button{color:var(--muted);padding:3px}.toast-mark{display:inline-flex;padding:3px;color:var(--accent)}.toast-success{border-color:#6caa8333;background:var(--green-soft)}.toast-success .toast-mark{color:var(--green)}.toast-error{background:var(--danger-soft);border-color:#ba6d5733}.toast-error .toast-mark{color:var(--danger)}

/* Shell */
.app-shell{display:grid;grid-template-columns:236px minmax(0,1fr);min-height:100dvh}.desktop-sidebar{background:var(--surface);border-left:1px solid var(--border);height:100dvh;position:sticky;top:0;padding:26px 18px 15px;display:flex;flex-direction:column;gap:0;overflow-y:auto}.brand{display:flex;align-items:center;gap:10px}.brand-symbol{display:flex;align-items:center;justify-content:center;width:38px;height:38px;background:var(--accent);color:#fff;border-radius:11px;box-shadow:0 4px 10px #7660c920}.brand>span:last-child{font-weight:700;font-size:23px;line-height:1.25;display:flex;gap:7px;align-items:baseline}.brand small{font-size:11px;letter-spacing:1.5px;color:var(--muted);font-weight:400}.sidebar-brand{display:flex;justify-content:space-between;align-items:center;margin:0 10px 29px}.nav-section-label{padding:7px 14px 12px;font-size:11px;color:var(--muted)}.primary-nav{display:flex;flex-direction:column;gap:5px}.nav-item{display:flex;align-items:center;gap:12px;padding:12px 14px;border-radius:10px;font-size:13px;color:var(--muted);text-align:right;transition:background .12s,color .12s;min-width:0}.nav-item:hover{background:var(--surface-soft);color:var(--ink)}.nav-item.active{background:var(--accent-soft);color:var(--accent-ink);font-weight:700}.nav-item>span:first-of-type{flex:1}.new-pill{padding:2px 6px;border:1px solid #aa98d533;border-radius:5px;color:var(--accent-ink);font-size:11px}.nav-counter{background:var(--accent);color:#fff;min-width:19px;height:19px;display:inline-flex;justify-content:center;align-items:center;border-radius:6px;font-size:12px}.sidebar-divider{height:1px;background:var(--border);margin:20px 12px 13px}.sidebar-spacer{flex:1;min-height:25px}.sidebar-wallet{display:flex;align-items:center;gap:10px;border:1px solid var(--border);border-radius:12px;padding:14px 12px;background:var(--surface-soft);text-align:right}.wallet-icon{width:33px;height:33px;background:var(--surface);color:var(--accent);display:flex;justify-content:center;align-items:center;border-radius:9px}.sidebar-wallet>span:nth-child(2){display:flex;flex:1;flex-direction:column;gap:3px}.sidebar-wallet strong{font-size:15px}.sidebar-wallet strong span{font-size:11px;font-weight:400;color:var(--muted)}.sidebar-wallet>svg{color:var(--muted)}.sidebar-user{border-top:1px solid var(--border);margin-top:16px;padding-top:17px;display:flex;align-items:center;gap:8px}.user-info{display:flex;align-items:center;gap:9px;flex:1;text-align:right;min-width:0}.user-info>span:last-child{display:flex;flex-direction:column;gap:4px;min-width:0}.user-info strong{font-size:12px;max-width:118px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.user-info small{color:var(--muted);font-size:11px}.avatar{width:34px;height:34px;border:0;border-radius:50%;display:inline-flex;justify-content:center;align-items:center;background:#ebeee5;color:#727e62;flex-shrink:0;font-size:14px}.avatar-small{width:29px;height:29px;font-size:13px}.avatar-large{width:56px;height:56px;font-size:24px}:root[data-theme=dark] .avatar{background:#343b31;color:#c3d5ae}.app-content{min-width:0;display:flex;flex-direction:column}.topbar{height:73px;border-bottom:1px solid var(--border);background:var(--surface);padding:0 34px;display:flex;align-items:center;justify-content:space-between;gap:15px;position:sticky;top:0;z-index:15;min-width:0}.topbar-start{display:flex;align-items:center;gap:12px;font-size:13px;min-width:0}.topbar-start strong{font-size:13px;white-space:nowrap}.breadcrumb-brand{color:var(--muted)}.breadcrumb-separator{color:#c3c3c6}.topbar-actions{display:flex;align-items:center;gap:9px;flex-shrink:0}.topbar-wallet{display:flex;align-items:center;gap:6px;color:var(--accent-ink);padding:7px 10px;background:var(--accent-soft);border-radius:7px;margin-left:5px}.topbar-wallet strong{font-size:14px}.topbar-wallet span{font-size:11px}.notification-button{position:relative}.notification-button i{position:absolute;top:6px;right:7px;width:6px;height:6px;border-radius:50%;background:var(--accent);border:1px solid var(--surface)}.main-page{padding:30px 34px;max-width:1600px;width:100%;margin:0 auto;flex:1;min-width:0}.workspace-footer{display:flex;justify-content:space-between;align-items:center;gap:15px;padding:19px 34px;border-top:1px solid var(--border);color:var(--muted);font-size:11px;margin-top:12px}.mobile-menu,.mobile-bottom-nav,.drawer-close{display:none}.provider-notice{align-items:center;background:var(--accent-soft);color:var(--accent-ink);border-color:#9e88cf20;font-size:13px}.provider-notice svg{margin:0}

/* Overview */
.dashboard-hero{position:relative;display:flex;justify-content:space-between;align-items:center;gap:25px;min-height:263px;border:1px solid #e5e0ee;background:#f1eef5;border-radius:21px;padding:32px 38px;overflow:hidden;margin-bottom:24px}.hero-copy{position:relative;z-index:2;max-width:610px}.hero-copy h1{font-size:33px;line-height:1.65;margin:12px 0 11px;letter-spacing:-1px}.hero-copy h1>span:last-child{font-weight:400;font-size:27px}.hello-dot{color:var(--accent)}.hero-copy>p{font-size:14px;color:#888590;max-width:490px;line-height:2}.hero-actions{display:flex;align-items:center;gap:10px;margin-top:23px;flex-wrap:wrap}.hero-art{position:relative;flex-shrink:0;width:245px;height:230px;margin-left:15px}.hero-orbit{position:absolute;inset:12px;border:1px solid #c6bbdf85;border-radius:50%;transform:rotate(-25deg);height:160px;top:35px}.orbit-a{transform:rotate(-34deg)}.orbit-b{transform:rotate(45deg);height:210px;inset:10px 38px}.hero-core{width:116px;height:116px;border:1px solid #b4a5d75e;background:linear-gradient(160deg,#f6f3ff,#d5cce8);border-radius:31px;position:absolute;left:70px;top:58px;display:flex;justify-content:center;align-items:center;color:#8066b5;box-shadow:inset 0 0 25px #fff9,0 14px 28px #937fba22;transform:rotate(-13deg)}.hero-core svg{transform:rotate(13deg)}.hero-star{position:absolute;display:flex;align-items:center;justify-content:center;border-radius:13px;border:1px solid #dcd2ec;background:#f8f5fd;color:#9681b8;box-shadow:0 8px 18px #7b67a610;width:48px;height:48px;z-index:2}.star-a{left:25px;top:25px;transform:rotate(8deg)}.star-b{left:208px;top:139px;width:38px;height:38px;transform:rotate(-5deg)}.hero-floating{position:absolute;bottom:10px;right:15px;background:#fffd;border:1px solid #e4deeb;border-radius:9px;padding:9px 13px;font-size:11px;display:flex;align-items:center;gap:7px;white-space:nowrap;color:#8e869b;box-shadow:0 6px 16px #8b73ad09}.floating-dot{width:5px;height:5px;border-radius:50%;background:#93b39d}.stats-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:34px}.stat-card{background:var(--surface);border:1px solid var(--border);border-radius:13px;padding:17px 19px;min-width:0}.stat-card>div{display:flex;align-items:center;justify-content:space-between;gap:10px;color:var(--muted);font-size:12px}.stat-card>div svg{color:#a5a1af}.stat-card>strong{display:block;font-size:27px;line-height:1.4;font-weight:400;margin:13px 0 7px;letter-spacing:-1px}.stat-card>small{color:var(--muted);font-size:11px}.section-heading{display:flex;justify-content:space-between;align-items:flex-end;gap:18px;margin:0 0 19px}.section-heading h2{font-size:20px;margin-top:5px}.tool-cards-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:28px}.tool-card{position:relative;text-align:right;border:1px solid var(--border);background:var(--surface);padding:21px;border-radius:16px;min-width:0;transition:transform .15s,box-shadow .15s}.tool-card:hover{transform:translateY(-3px);box-shadow:var(--shadow)}.tool-card-icon{display:flex;align-items:center;justify-content:center;width:46px;height:46px;border-radius:12px;margin-bottom:20px;background:#eee9f9;color:#8f75bd}.tool-card-blue .tool-card-icon{background:#eaf2f8;color:#7e9bb8}.tool-card-peach .tool-card-icon{background:#fbede2;color:#bb967e}.tool-card-green .tool-card-icon{background:#edf3e8;color:#89a279}.tool-card-arrow{position:absolute;left:18px;top:22px;color:#b7b5bd}.tool-card>strong{font-size:14px}.tool-card p{font-size:12px;color:var(--muted);margin-top:11px;min-height:55px;line-height:2.15}.tool-card-foot{display:block;margin-top:20px;font-size:11px;color:#aaa7ad}.dashboard-bottom{display:grid;grid-template-columns:1fr 1fr;gap:20px;margin-bottom:24px}.dashboard-bottom .panel{padding:22px}.dashboard-bottom .panel-heading{margin-bottom:16px}.recent-projects,.activity-list{display:flex;flex-direction:column}.recent-project,.activity-row{display:flex;align-items:center;gap:12px;padding:13px 0;border-bottom:1px solid var(--border);width:100%;text-align:right;min-width:0}.recent-project:last-child,.activity-row:last-child{border-bottom:0}.project-mini-icon{width:38px;height:38px;background:var(--surface-soft);border:1px solid var(--border);color:var(--muted);border-radius:9px;display:flex;justify-content:center;align-items:center;flex-shrink:0}.recent-project>span:nth-child(2),.activity-row>span:nth-child(2){flex:1;min-width:0;display:flex;flex-direction:column;gap:5px}.recent-project strong,.activity-row strong{font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.recent-project small,.activity-row small{color:var(--muted);font-size:11px}.recent-project>svg{color:var(--muted)}.activity-icon{width:32px;height:32px;border-radius:50%;background:var(--accent-soft);color:var(--accent);display:flex;justify-content:center;align-items:center;flex-shrink:0}.dashboard-tip{display:flex;align-items:center;gap:15px;padding:19px 23px;background:var(--surface);border:1px dashed #dbd8e3;border-radius:13px}.tip-icon{width:39px;height:39px;border-radius:11px;background:var(--accent-soft);color:var(--accent);display:flex;justify-content:center;align-items:center;flex-shrink:0}.dashboard-tip p{font-size:12px;color:var(--muted);flex:1;min-width:0;line-height:1.9}.dashboard-tip p strong{display:block;color:var(--ink);font-size:13px;margin-bottom:4px}.dashboard-tip>button{flex-shrink:0}.skeleton-list{padding:12px 0;display:flex;flex-direction:column;gap:23px}.skeleton-list i{display:block;background:var(--surface-soft);border-radius:8px;height:36px;animation:skeleton 1.2s ease-in-out infinite alternate}@keyframes skeleton{to{opacity:.4}}:root[data-theme=dark] .dashboard-hero{background:#292435;border-color:#383044}:root[data-theme=dark] .hero-core{background:linear-gradient(160deg,#41344f,#372e46);color:#c3ade2;box-shadow:inset 0 0 25px #af97d015,0 14px 28px #0002}:root[data-theme=dark] .hero-star,:root[data-theme=dark] .hero-floating{background:#3b3348;color:#bca7d7;border-color:#53425f}:root[data-theme=dark] .hero-copy>p{color:#a19bab}:root[data-theme=dark] .tool-card-icon{background:#332c40}:root[data-theme=dark] .tool-card-blue .tool-card-icon{background:#273542}:root[data-theme=dark] .tool-card-peach .tool-card-icon{background:#3a312c}:root[data-theme=dark] .tool-card-green .tool-card-icon{background:#2e382b}

/* Authentication */
.startup-screen{min-height:100dvh;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:40px;padding:28px}.startup-card{background:var(--surface);border:1px solid var(--border);border-radius:22px;padding:45px 35px;text-align:center;max-width:510px;display:flex;align-items:center;flex-direction:column;gap:15px}.startup-card>svg{color:var(--accent)}.startup-card h1{font-size:23px}.startup-card p{color:var(--muted);font-size:14px}.startup-card .btn{margin-top:10px}.auth-page{min-height:100dvh;background:var(--bg)}.auth-top{max-width:1280px;margin:auto;padding:32px 35px;display:flex;align-items:center;justify-content:space-between}.auth-layout{max-width:1110px;margin:15px auto 50px;display:grid;grid-template-columns:1fr 430px;align-items:center;gap:70px;padding:0 35px}.auth-story h1{font-size:46px;line-height:1.7;margin:20px 0 13px;letter-spacing:-1.6px}.auth-story h1 span{color:var(--accent)}.auth-story>p{font-size:14px;color:var(--muted);max-width:480px}.auth-feature-row{display:flex;align-items:center;gap:10px;flex-wrap:wrap;color:var(--muted);font-size:12px;margin-top:25px}.auth-feature-row svg{color:var(--accent)}.auth-feature-row svg:nth-of-type(2){margin-right:16px}.auth-visual{position:relative;height:225px;max-width:360px;margin:25px auto 0}.orbital-ring{position:absolute;border:1px solid #cabee25e;border-radius:50%;width:310px;height:120px;top:58px;left:18px;transform:rotate(-24deg)}.ring-two{transform:rotate(35deg)}.orbital-center{position:absolute;width:105px;height:105px;background:var(--accent-soft);border:1px solid #bba9dc44;border-radius:28px;color:var(--accent);display:flex;justify-content:center;align-items:center;left:123px;top:61px;box-shadow:0 15px 45px #9d8ab222;transform:rotate(-12deg)}.orbital-chip{position:absolute;display:flex;align-items:center;gap:8px;background:var(--surface);border:1px solid var(--border);border-radius:10px;font-size:11px;color:var(--muted);padding:11px 15px;box-shadow:var(--shadow)}.orbital-chip svg{color:var(--accent)}.chip-one{top:28px;right:0;transform:rotate(5deg)}.chip-two{bottom:20px;left:0;transform:rotate(-4deg)}.auth-form-card{padding:35px;background:var(--surface);border:1px solid var(--border);border-radius:23px;box-shadow:var(--shadow);min-width:0}.auth-small-logo{width:46px;height:46px;border-radius:13px;background:var(--accent-soft);color:var(--accent);display:flex;align-items:center;justify-content:center;margin-bottom:21px}.auth-form-card h2{font-size:24px;letter-spacing:-.6px}.auth-form-card>p{font-size:13px;color:var(--muted);margin:6px 0 22px}.auth-tabs{display:flex;border-bottom:1px solid var(--border);gap:30px;margin:0 0 24px}.auth-tabs button{padding:12px 0;font-size:14px;position:relative;color:var(--muted)}.auth-tabs button.active{color:var(--accent-ink);font-weight:700}.auth-tabs button.active:after{content:'';position:absolute;bottom:-1px;left:0;right:0;background:var(--accent);height:2px}.auth-form-card .field input{background:var(--surface-soft)}.auth-form-card .btn-full{margin-top:4px}.auth-footnote{display:flex;align-items:center;justify-content:center;gap:8px;font-size:12px;color:var(--muted);margin-top:22px;text-align:center;line-height:1.8}.auth-help{display:block;text-align:center;color:var(--muted);font-size:11px;margin-top:18px}.auth-footer{text-align:center;color:var(--muted);font-size:12px;padding:0 20px 25px}

/* Studio */
.main-studio{max-width:none}.studio-header{display:flex;align-items:center;justify-content:space-between;gap:15px;margin-bottom:20px}.studio-title{display:flex;align-items:center;gap:13px;min-width:0}.studio-title h1{font-size:23px}.studio-title p{font-size:12px;color:var(--muted);margin-top:3px}.studio-header-actions{display:flex;align-items:center;gap:16px}.save-state{display:flex;align-items:center;gap:5px;color:var(--muted);font-size:11px;white-space:nowrap}.save-state i{width:5px;height:5px;background:var(--green);border-radius:50%}.save-state.unsaved i{background:#c8a466}.studio-layout{display:grid;grid-template-columns:minmax(285px,.72fr) minmax(0,1.6fr);gap:17px;height:760px;max-height:calc(100dvh - 211px);min-height:570px}.studio-conversation{padding:0;display:flex;flex-direction:column;overflow:hidden;min-width:0}.studio-conversation-heading{display:flex;align-items:center;gap:10px;padding:18px 20px;border-bottom:1px solid var(--border)}.assistant-avatar{display:inline-flex;width:34px;height:34px;justify-content:center;align-items:center;border-radius:10px;background:var(--accent-soft);color:var(--accent);flex-shrink:0}.studio-conversation-heading>div:nth-child(2){display:flex;flex-direction:column;gap:5px;flex:1}.studio-conversation-heading strong{font-size:14px}.studio-conversation-heading span:not(.ai-label){font-size:11px;color:var(--muted)}.ai-label{font-size:11px;color:var(--accent-ink);border:1px solid #a08cde33;padding:4px 5px;border-radius:5px}.studio-messages{flex:1;min-height:0;overflow:auto;padding:20px;scrollbar-width:thin}.studio-welcome{text-align:center;padding:26px 0 10px}.welcome-spark{width:61px;height:61px;display:flex;justify-content:center;align-items:center;border-radius:19px;background:var(--accent-soft);color:var(--accent);margin:0 auto 18px}.studio-welcome h2{font-size:18px}.studio-welcome>p{font-size:13px;color:var(--muted);margin:10px 0 24px}.suggestion-stack{display:flex;flex-direction:column;gap:8px}.suggestion-stack button{display:flex;align-items:center;gap:8px;text-align:right;font-size:12px;background:var(--surface-soft);border:1px solid var(--border);border-radius:9px;padding:12px;line-height:1.8}.suggestion-stack button>span{flex:1;min-width:0}.suggestion-stack svg{color:var(--muted)}.studio-welcome>small{display:block;color:var(--muted);font-size:11px;line-height:2.05;margin:20px 0 0}.studio-job{margin-bottom:25px}.studio-user-message{border:1px solid #9c86d02b;background:var(--accent-soft);padding:13px;border-radius:12px;margin-bottom:16px}.studio-user-message>span{font-size:11px;color:var(--accent-ink)}.studio-user-message>p{font-size:13px;line-height:2;white-space:pre-wrap;overflow-wrap:anywhere;margin-top:6px}.studio-assistant-message>.message-meta{display:flex;align-items:center;gap:6px;margin-bottom:10px;font-size:12px}.message-meta>svg{color:var(--accent)}.message-meta .badge{margin-right:auto;font-size:11px}.studio-assistant-message>.text-output{font-size:12px}.studio-assistant-message .btn{margin-top:12px}.studio-assistant-message>.muted{font-size:12px}.message-progress{display:flex;align-items:flex-start;gap:8px;color:var(--muted)}.message-progress>svg{color:var(--accent);margin-top:3px}.message-progress p{font-size:12px;flex:1}.message-progress button{font-size:11px}.build-plan{margin-top:15px;background:var(--surface-soft);padding:10px;border-radius:9px;font-size:12px;color:var(--muted)}.build-plan summary{cursor:pointer;display:flex;align-items:center;justify-content:space-between;gap:8px}.build-plan ol{line-height:2;padding-right:21px;margin:10px 0 0}.studio-composer{padding:16px;background:var(--surface);border-top:1px solid var(--border)}.composer-options{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:12px}.request-kind select{border:1px solid var(--border);background:var(--surface-soft);color:var(--ink);border-radius:7px;padding:7px;font-size:12px;max-width:180px}.studio-composer>textarea,.chat-composer>textarea{width:100%;border:1px solid var(--border);background:var(--surface-soft);color:var(--ink);resize:none;border-radius:11px;padding:12px;font-size:14px;line-height:1.9}.studio-composer>textarea{height:94px}.composer-bottom{display:flex;align-items:center;gap:10px;margin-top:11px}.composer-bottom .model-control{flex:1}.send-button{width:37px;height:37px;border-radius:9px;color:#fff;background:var(--accent);display:flex;justify-content:center;align-items:center;flex-shrink:0}.send-button:hover:not(:disabled){background:var(--accent-strong)}.composer-note{color:var(--muted);font-size:11px;line-height:1.9;margin-top:12px}.studio-workspace{padding:0;display:flex;flex-direction:column;overflow:hidden;min-width:0}.workspace-project-header{display:flex;align-items:center;gap:10px;justify-content:space-between;padding:15px 18px;border-bottom:1px solid var(--border)}.project-name-button{display:flex;align-items:center;gap:10px;text-align:right;min-width:0}.project-name-button>.project-mini-icon{width:32px;height:32px;flex-shrink:0}.project-name-button>span:nth-child(2){display:flex;flex-direction:column;gap:5px;min-width:0}.project-name-button strong{font-size:13px;max-width:250px;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.project-name-button small{font-size:11px;color:var(--muted)}.project-name-button>svg{color:var(--muted)}.workspace-actions{display:flex;align-items:center;gap:4px}.workspace-tabs{display:flex;align-items:center;gap:7px;padding:10px 14px;border-bottom:1px solid var(--border);min-width:0}.workspace-tabs button{display:flex;align-items:center;justify-content:center;gap:6px;padding:9px 12px;border-radius:8px;font-size:12px;line-height:1.5;color:var(--muted);white-space:nowrap;min-width:0}.workspace-tabs button.active{background:var(--accent-soft);color:var(--accent-ink)}.preview-toolbar{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:11px 16px;border-bottom:1px solid var(--border)}.preview-status{display:flex;align-items:center;gap:5px;font-size:11px;color:var(--muted)}.preview-status i{width:5px;height:5px;border-radius:50%;background:var(--green)}.device-controls{display:flex;align-items:center;gap:5px}.device-controls button{width:28px;height:28px;border-radius:6px;color:var(--muted);display:flex;justify-content:center;align-items:center}.device-controls button.active{background:var(--surface-hover);color:var(--accent)}.preview-area{flex:1;min-height:0;background:#f0f0ed;overflow:auto;display:flex;justify-content:center;align-items:flex-start;padding:16px;direction:ltr;scrollbar-width:thin}.preview-viewport{position:relative;background:#fff;border:1px solid #dfdfdc;border-radius:8px;overflow:hidden;flex-shrink:0;box-shadow:0 3px 12px #00000008;max-width:100%}.preview-viewport iframe{position:absolute;left:0;top:0;border:0;max-width:none;background:#fff}.preview-footer{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:9px 15px;border-top:1px solid var(--border);font-size:11px;color:var(--muted)}.preview-footer>span:last-child{display:flex;align-items:center;gap:5px}.workspace-empty{min-height:350px;padding:60px 20px;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center;max-width:100%;direction:rtl;flex:1}.workspace-empty-icon{width:76px;height:76px;border:1px dashed #c4bed1;border-radius:21px;color:#aa9cbd;display:flex;justify-content:center;align-items:center;margin-bottom:22px;background:#f8f8f466}.workspace-empty h2{font-size:19px;color:#777381}.workspace-empty p{font-size:13px;color:#9c98a4;margin-top:10px;max-width:320px}.empty-browser{position:relative;width:210px;height:75px;border:1px solid #d8d6db;border-radius:7px;margin-top:35px;padding:12px;display:flex;gap:5px;opacity:.65}.empty-browser span{width:4px;height:4px;border-radius:50%;background:#c2bdce}.empty-browser i{height:4px;width:60%;display:block;background:#ddd9e5;position:absolute;left:20%;top:36px;border-radius:4px}.code-panel{flex:1;display:flex;flex-direction:column;min-height:0;min-width:0}.file-tab-bar{display:flex;gap:0;border-bottom:1px solid var(--border);overflow-x:auto;flex-shrink:0;scrollbar-width:thin;direction:ltr}.file-tab-bar button{display:flex;align-items:center;gap:5px;padding:11px 13px;border-right:1px solid var(--border);font-size:12px;color:var(--muted);white-space:nowrap}.file-tab-bar button.active{color:var(--accent-ink);background:var(--accent-soft)}.file-tab-bar .add-file-button{padding:10px;flex-shrink:0}.code-editor{flex:1;min-height:300px;width:100%;border:0;background:#23232f;color:#e2e0ee;resize:none;outline:none;direction:ltr;white-space:pre;padding:20px;font:14px/1.85 ui-monospace,SFMono-Regular,Consolas,monospace;tab-size:2;border-radius:0}.code-editor:focus-visible{outline-offset:-3px}.code-footer{display:flex;justify-content:space-between;gap:10px;padding:9px 13px;font-size:11px;color:var(--muted)}.code-footer .text-button{font-size:11px}.files-panel,.versions-panel{padding:23px;overflow:auto;flex:1;min-height:0}.project-file-list{display:flex;flex-direction:column;gap:8px;margin-bottom:23px}.project-file-list>div{display:flex;align-items:center;gap:10px;background:var(--surface-soft);border:1px solid var(--border);padding:12px;border-radius:10px;min-width:0}.project-file-list>div>svg{color:var(--accent)}.project-file-list>div>button:nth-child(2){flex:1;text-align:right;display:flex;flex-direction:column;gap:5px;min-width:0}.project-file-list strong{font-size:13px;overflow-wrap:anywhere}.project-file-list small{font-size:11px;color:var(--muted)}.version-list>div{display:flex;align-items:center;gap:12px;border-bottom:1px solid var(--border);padding:14px 0}.version-list>div>span:nth-child(2){flex:1;display:flex;flex-direction:column;gap:5px}.version-list strong{font-size:14px}.version-list small{font-size:11px;color:var(--muted)}.version-symbol{width:35px;height:35px;display:flex;justify-content:center;align-items:center;border-radius:9px;background:var(--accent-soft);color:var(--accent)}.studio-mobile-tabs{display:none}:root[data-theme=dark] .preview-area{background:#1a1b20}:root[data-theme=dark] .workspace-empty-icon{background:#24242a;border-color:#4f455a}:root[data-theme=dark] .workspace-empty h2{color:#aaa0b7}:root[data-theme=dark] .empty-browser{border-color:#4a4255}:root[data-theme=dark] .empty-browser i,:root[data-theme=dark] .empty-browser span{background:#4e455c}

/* Conversations and safe text */
.chat-layout{display:grid;grid-template-columns:246px minmax(0,1fr);gap:18px;min-height:620px;height:calc(100dvh - 245px);max-height:830px}.chat-history{padding:18px;display:flex;flex-direction:column;overflow:hidden}.chat-history-heading{display:flex;align-items:center;gap:6px;margin-bottom:16px}.chat-history-heading h2{flex:1;font-size:14px}.chat-history-heading>.icon-button{width:26px;height:26px}.chat-search{margin-top:16px;background:var(--surface-soft);padding:0 10px}.chat-search input{font-size:12px;padding:10px 0}.thread-list{flex:1;min-height:0;overflow:auto;margin:17px -7px 0;scrollbar-width:thin}.thread-row{display:flex;align-items:center;gap:3px;padding:3px 5px;border-radius:9px;margin-bottom:3px;min-width:0}.thread-row.active{background:var(--accent-soft)}.thread-row:hover{background:var(--surface-soft)}.thread-row.active:hover{background:var(--accent-soft)}.thread-open{display:flex;align-items:flex-start;gap:8px;text-align:right;flex:1;min-width:0;padding:10px 3px}.thread-open>svg{color:var(--muted);margin-top:2px;width:14px}.thread-open>span{display:flex;flex-direction:column;gap:6px;min-width:0}.thread-open strong{font-size:12px;line-height:1.8;max-width:158px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-weight:400}.thread-row.active strong{color:var(--accent-ink);font-weight:700}.thread-open small{font-size:11px;color:var(--muted)}.thread-row>.icon-button{width:23px;height:25px;opacity:.5}.thread-row:hover>.icon-button{opacity:1}.history-note{border-top:1px solid var(--border);padding-top:16px;margin-top:16px;display:flex;align-items:flex-start;gap:7px;color:var(--muted)}.history-note p{font-size:11px;line-height:1.9}.history-note>svg{margin-top:3px;color:var(--accent)}.chat-conversation{display:flex;flex-direction:column;min-height:0;padding:0;overflow:hidden}.chat-conversation-header{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:17px 22px;border-bottom:1px solid var(--border)}.chat-conversation-header>div{display:flex;align-items:center;gap:11px;min-width:0}.chat-conversation-header>div>span:last-child{display:flex;flex-direction:column;gap:5px;min-width:0}.chat-conversation-header strong{font-size:13px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;max-width:400px}.chat-conversation-header small{font-size:11px;color:var(--muted)}.chat-conversation>.notice{margin:15px 20px 0}.chat-scroll{padding:25px 28px;flex:1;min-height:0;overflow:auto;scrollbar-width:thin}.chat-welcome{display:flex;flex-direction:column;align-items:center;text-align:center;justify-content:center;min-height:370px;padding:20px;max-width:480px;margin:auto}.chat-welcome-icon{width:75px;height:75px;display:flex;justify-content:center;align-items:center;border:1px solid #ac95d930;border-radius:23px;background:var(--accent-soft);color:var(--accent);margin-bottom:25px}.chat-welcome>.eyebrow{justify-content:center;color:var(--accent-ink)}.chat-welcome h2{font-size:25px;margin:11px 0}.chat-welcome p{font-size:13px;color:var(--muted);max-width:335px}.chat-suggestions{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin-top:30px;width:100%}.chat-suggestions button{display:flex;align-items:center;justify-content:space-between;gap:8px;background:var(--surface-soft);border:1px solid var(--border);padding:13px;border-radius:10px;font-size:12px;text-align:right;color:var(--muted)}.chat-suggestions button:hover{color:var(--accent-ink);border-color:#ad94d755}.chat-message-list{display:flex;flex-direction:column;gap:30px}.chat-message{display:flex;align-items:flex-start;gap:13px;min-width:0}.message-avatar{width:30px;height:30px;display:flex;align-items:center;justify-content:center;flex-shrink:0;border-radius:9px;background:var(--surface-soft);color:var(--muted)}.message-avatar.assistant{background:var(--accent-soft);color:var(--accent)}.message-body{flex:1;min-width:0}.message-label{display:flex;align-items:center;gap:11px;min-height:30px;margin-bottom:8px}.message-label strong{font-size:13px}.message-label>span{font-size:11px;color:var(--muted)}.message-label>button{margin-right:auto;width:25px;height:25px}.message-user .message-body{padding:10px 15px;background:var(--surface-soft);border:1px solid var(--border);border-radius:12px}.message-user .message-label{margin-bottom:4px}.message-user .text-output{font-size:14px}.text-output{min-width:0;font-size:14px;line-height:2.05;overflow-wrap:anywhere;color:var(--ink)}.text-output p{white-space:pre-wrap;line-height:2.05;margin:0 0 9px}.text-output h3{font-size:14px;line-height:1.8;margin:17px 0 10px}.text-output code{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:.9em;background:var(--surface-soft);border:1px solid var(--border);border-radius:4px;padding:1px 5px;overflow-wrap:anywhere}.output-list-item{display:flex;gap:8px;margin-bottom:5px;min-width:0}.output-list-item>span:last-child{min-width:0;overflow-wrap:anywhere}.output-spacer{height:6px}.output-code{background:#262633;border:1px solid #363543;border-radius:10px;overflow:hidden;margin:14px 0;max-width:100%;direction:ltr}.output-code pre{margin:0;padding:16px;overflow:auto;max-height:480px;font-size:13px;line-height:1.8;color:#e5e0ee;white-space:pre;max-width:100%}.output-code pre code{border:0;padding:0;background:none;color:inherit;overflow-wrap:normal}.code-language{font:9px ui-monospace,SFMono-Regular,Consolas,monospace;padding:9px 15px;border-bottom:1px solid #3c3948;color:#aaa0bd;background:#2e2b3b}.chat-composer{padding:18px 22px;border-top:1px solid var(--border)}.chat-composer>textarea{height:78px}.chat-composer .composer-note{text-align:center}.chat-task-state{display:flex;align-items:flex-start;gap:10px;margin-top:24px;background:var(--surface-soft);padding:12px;border-radius:11px;border:1px solid var(--border);flex-wrap:wrap}.chat-task-state>div{flex:1;min-width:80px}.chat-task-state strong{font-size:12px}.chat-task-state p{font-size:11px;color:var(--muted);margin-top:5px;overflow-wrap:anywhere}.chat-task-state>.badge{font-size:11px}.chat-scroll>.notice-error{margin-top:20px;font-size:12px}.chat-history-close,.chat-history-toggle{display:none}.chat-history-dialog .chat-history-close{display:none}.chat-history-dialog .thread-list{max-height:52dvh}.chat-history-dialog .thread-open strong{max-width:none}

/* Analysis / writing */
.analysis-modes{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:22px}.analysis-modes>button{display:flex;align-items:center;gap:12px;text-align:right;background:var(--surface);border:1px solid var(--border);border-radius:13px;padding:17px;min-width:0}.analysis-modes>button>svg{color:var(--muted)}.analysis-modes>button>span{display:flex;flex-direction:column;gap:6px;min-width:0}.analysis-modes strong{font-size:14px}.analysis-modes small{font-size:11px;color:var(--muted)}.analysis-modes>button.active{background:var(--accent-soft);border-color:#b49bd144;color:var(--accent-ink)}.analysis-modes>button.active>svg{color:var(--accent)}.analysis-layout,.writing-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:22px;align-items:start}.analysis-input-panel,.writing-input{padding:25px}.analysis-input-panel .field textarea,.writing-input .field textarea{min-height:220px}.attachment-box{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:-3px 0 22px}.attachment-box>small{font-size:11px;color:var(--muted)}.attachment-chip{width:100%;background:var(--accent-soft);border:1px solid #b49bd125;border-radius:10px;padding:12px;display:flex;align-items:center;gap:10px;color:var(--accent-ink);min-width:0}.attachment-chip>span{flex:1;display:flex;flex-direction:column;gap:4px;min-width:0}.attachment-chip strong{font-size:12px;overflow-wrap:anywhere}.attachment-chip small{font-size:11px;color:var(--muted)}.analysis-submit-row{display:flex;justify-content:space-between;align-items:center;gap:14px;flex-wrap:wrap;margin-top:12px}.analysis-submit-row .model-control{flex:1}.analysis-submit-row .btn{font-size:13px}.result-panel{padding:25px;min-height:475px;max-height:900px;overflow:auto;scrollbar-width:thin}.result-panel .text-output{margin-top:17px}.result-panel .working-state{margin:55px 0 30px}.result-panel>.notice-error{margin-top:25px}.result-empty{min-height:355px;display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;padding:35px 20px;color:var(--muted)}.result-empty>span{color:#ab9bbc;border:1px dashed #c8bdd6;width:80px;height:80px;border-radius:21px;display:flex;justify-content:center;align-items:center;background:var(--surface-soft);margin-bottom:25px}.result-empty h2{font-size:17px;color:var(--ink);font-weight:400}.result-empty p{font-size:13px;max-width:270px;margin-top:12px}.result-empty-lines{width:210px;max-width:100%;display:flex;flex-direction:column;align-items:center;gap:10px;margin-top:35px}.result-empty-lines i{display:block;border-radius:4px;height:4px;background:var(--border);width:100%}.result-empty-lines i:nth-child(2){width:83%}.result-empty-lines i:nth-child(3){width:65%}.complete-mark{display:inline-flex;align-items:center;gap:6px;color:var(--green);font-size:12px;padding:6px 10px;background:var(--green-soft);border-radius:7px}.result-actions{display:flex;gap:8px;flex-wrap:wrap;border-top:1px solid var(--border);margin-top:25px;padding-top:20px}.working-state{display:flex;align-items:flex-start;gap:12px;flex-wrap:wrap}.working-symbol{display:flex;align-items:center;justify-content:center;border-radius:13px;width:48px;height:48px;background:var(--accent-soft);color:var(--accent)}.working-state>div:nth-child(2){flex:1;min-width:120px}.working-state strong{font-size:14px}.working-state p{font-size:13px;color:var(--muted);margin-top:8px;max-width:330px}.working-state>.badge{font-size:11px}.output-history{margin-top:24px}.output-history-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.output-history-list>button{display:flex;align-items:center;gap:10px;border:1px solid var(--border);background:var(--surface-soft);padding:13px;border-radius:10px;text-align:right;min-width:0}.output-history-list>button>svg{color:var(--muted)}.output-history-list>button>span{display:flex;flex:1;flex-direction:column;gap:4px;min-width:0}.output-history-list strong{font-size:12px}.output-history-list small{font-size:11px;color:var(--muted)}.output-history-list .badge{font-size:11px;padding:3px 5px}.output-history-list>button.active{border-color:#a991d455;background:var(--accent-soft)}.writing-tools-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:25px}.writing-tools-grid>button{position:relative;display:grid;grid-template-columns:37px minmax(0,1fr);align-items:center;text-align:right;gap:5px 12px;padding:17px;border:1px solid var(--border);border-radius:13px;background:var(--surface);min-width:0}.writing-tools-grid>button>span{grid-row:span 2;display:flex;align-items:center;justify-content:center;background:var(--surface-soft);color:var(--muted);width:37px;height:37px;border-radius:10px}.writing-tools-grid strong{font-size:13px}.writing-tools-grid small{font-size:11px;color:var(--muted)}.writing-tools-grid>button.active{background:var(--accent-soft);border-color:#b299d344;color:var(--accent-ink)}.writing-tools-grid>button.active>span{background:var(--surface);color:var(--accent)}.writing-input>.notice{margin-top:20px;margin-bottom:0;font-size:12px}

/* Projects, account, activity */
.projects-toolbar{display:flex;align-items:center;gap:16px;margin-bottom:24px}.projects-toolbar>.search-field{width:350px;max-width:65%}.projects-toolbar>.muted{margin-right:auto}.projects-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:21px}.project-card{border:1px solid var(--border);border-radius:17px;background:var(--surface);overflow:hidden;min-width:0}.project-card-art{height:170px;position:relative;background:#ebe6f0;width:100%;display:flex;justify-content:center;align-items:center;overflow:hidden}.project-art-window{width:185px;height:117px;background:#ffffffbd;border:1px solid #ddd4e4;border-radius:7px;box-shadow:0 10px 23px #75617d12;transform:rotate(-3deg);position:relative;overflow:hidden;padding:10px;direction:ltr}.project-art-window>div:first-child{display:flex;gap:4px;border-bottom:1px solid #e2dce8;padding-bottom:8px}.project-art-window>div:first-child i{width:4px;height:4px;border-radius:50%;background:#cbc0d4}.project-art-letter{font-size:28px;display:flex;justify-content:center;align-items:center;border-radius:7px;width:47px;height:45px;position:absolute;right:18px;top:45px;background:#e9e0ef;color:#a38ab6}.project-art-lines{position:absolute;left:18px;top:49px;width:83px;display:flex;flex-direction:column;gap:8px}.project-art-lines i{height:4px;width:100%;border-radius:4px;background:#e1d7e8}.project-art-lines i:nth-child(2){width:78%}.project-art-lines i:nth-child(3){width:57%}.project-art-code{width:44px;height:44px;position:absolute;left:calc(50% - 108px);bottom:22px;display:flex;align-items:center;justify-content:center;background:#c7b6d5;color:#fff;border:1px solid #f4edf9;border-radius:12px;transform:rotate(10deg)}.project-art-1{background:#e8ece4}.project-art-1 .project-art-window{border-color:#d7e1d3}.project-art-1 .project-art-letter{background:#e1eadb;color:#93a984}.project-art-1 .project-art-lines i{background:#d8e3d3}.project-art-1 .project-art-code{background:#aebca4}.project-art-2{background:#e4ebef}.project-art-2 .project-art-letter{background:#dce6ed;color:#8fa9bb}.project-art-2 .project-art-lines i{background:#d7e1e9}.project-art-2 .project-art-code{background:#9ab1c1}.project-art-3{background:#f3e8df}.project-art-3 .project-art-letter{background:#f1e1d6;color:#b7967e}.project-art-3 .project-art-lines i{background:#ead9cb}.project-art-3 .project-art-code{background:#c8ae99}.project-open-chip{position:absolute;bottom:13px;right:14px;font-size:11px;padding:7px 10px;background:#ffffffdc;border-radius:7px;display:flex;align-items:center;gap:5px;color:#887994;opacity:0;transform:translateY(3px);transition:opacity .12s,transform .12s}.project-card-art:hover .project-open-chip,.project-card-art:focus-visible .project-open-chip{opacity:1;transform:none}.project-card-body{padding:21px}.project-card-body h2{font-size:14px}.project-card-body h2 button{text-align:right;padding:0;line-height:1.9;overflow-wrap:anywhere}.project-card-body p{font-size:12px;color:var(--muted);margin:8px 0 16px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;min-height:39px}.project-card-meta{display:flex;align-items:center;gap:8px;font-size:11px;color:var(--muted)}.project-card-meta span{background:var(--surface-soft);border:1px solid var(--border);border-radius:5px;padding:4px 7px}.project-card-bottom{border-top:1px solid var(--border);padding-top:13px;margin-top:18px;display:flex;justify-content:space-between;align-items:center;gap:10px}.project-card-bottom>small{font-size:11px;color:var(--muted)}.project-card-bottom>div{display:flex;gap:2px}.project-card-bottom .icon-button{width:29px;height:29px}.projects-empty{min-height:470px}.empty-icon-large{width:90px;height:90px;border-radius:24px;display:flex;justify-content:center;align-items:center;background:var(--accent-soft);color:var(--accent);margin-bottom:10px}.project-skeleton{padding:18px;display:flex;flex-direction:column;gap:18px;min-height:300px}.project-skeleton i{height:140px;background:var(--surface-soft);border-radius:10px;animation:skeleton 1.2s ease-in-out infinite alternate}.project-skeleton i:nth-child(n+2){height:17px;width:80%}.project-skeleton i:last-child{width:55%}.filter-tabs{width:max-content;max-width:100%;overflow:auto;margin-bottom:22px;scrollbar-width:thin}.jobs-list{display:flex;flex-direction:column;gap:14px}.job-card{padding:21px}.job-card-top{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap}.job-card-top>div{display:flex;align-items:center;gap:8px}.job-card-top strong{font-size:14px}.job-kind-icon{display:flex;align-items:center;justify-content:center;width:31px;height:31px;background:var(--accent-soft);color:var(--accent);border-radius:9px}.job-prompt{font-size:13px;line-height:1.9;color:var(--muted);white-space:pre-wrap;margin:17px 0;overflow-wrap:anywhere;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}.job-card>.notice{font-size:13px;margin-top:15px}.job-card-bottom{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;border-top:1px solid var(--border);padding-top:14px}.job-card-bottom>span{font-size:11px;color:var(--muted)}.wallet-overview{display:grid;grid-template-columns:1.15fr 1fr 1fr;gap:18px;margin-bottom:28px}.wallet-total{position:relative;padding:30px;border-radius:18px;background:var(--accent);color:#fff;overflow:hidden;min-height:215px}.wallet-total .eyebrow{color:#fff9}.wallet-total>strong{display:flex;align-items:baseline;gap:12px;font-size:48px;font-weight:400;line-height:1.7;margin:12px 0 7px;position:relative;z-index:1}.wallet-total>strong>span{font-size:14px;color:#fffc}.wallet-total>p{font-size:12px;color:#fffc;max-width:240px;position:relative;z-index:1}.wallet-decor{position:absolute;bottom:20px;left:10px;opacity:.12;transform:rotate(-12deg)}.wallet-detail{padding:24px}.stat-icon{width:40px;height:40px;display:flex;align-items:center;justify-content:center;background:var(--surface-soft);border-radius:10px;color:var(--accent);margin-bottom:13px}.wallet-detail h3{font-size:13px;font-weight:400;color:var(--muted)}.wallet-detail>strong{font-size:30px;display:block;line-height:1.5;font-weight:400;margin:10px 0}.wallet-detail strong>small{font-size:14px;color:var(--muted)}.wallet-detail>p{font-size:11px;color:var(--muted);margin-bottom:10px}.wallet-detail>.muted{font-size:11px}.wallet-overview+.panel{margin-bottom:25px}.amount-positive{color:var(--green);font-weight:700}.amount-negative{color:var(--muted)}.profile-layout{display:grid;grid-template-columns:minmax(0,1.45fr) minmax(0,1fr);gap:22px;max-width:1030px}.profile-heading{display:flex;align-items:center;gap:13px;margin-bottom:30px;padding-bottom:23px;border-bottom:1px solid var(--border)}.profile-heading>div{flex:1;min-width:0}.profile-heading h2{font-size:16px;overflow-wrap:anywhere}.profile-heading .muted{font-size:13px}.profile-export{align-self:start;padding:29px}.profile-export>svg{color:var(--accent);margin-bottom:16px}.profile-export h2{font-size:18px}.profile-export p{font-size:14px;color:var(--muted);margin:11px 0 23px}

/* Screen sizes */
@media(min-width:1650px){.main-page{padding:38px 45px}.topbar{padding:0 45px}.hero-copy h1{font-size:37px}.dashboard-hero{min-height:290px}.hero-art{margin-left:45px}.tool-card{padding:25px}.tool-card p{font-size:13px}.tool-card>strong{font-size:15px}.studio-layout{grid-template-columns:minmax(370px,.66fr) minmax(0,1.6fr)}}
@media(max-width:1250px){.app-shell{grid-template-columns:214px minmax(0,1fr)}.desktop-sidebar{padding:24px 13px 15px}.main-page{padding:25px}.topbar{padding:0 25px}.dashboard-hero{padding:28px}.hero-art{width:195px;margin-left:0;transform:scale(.85);transform-origin:center}.hero-copy h1{font-size:29px}.hero-copy h1>span:last-child{font-size:24px}.tool-card{padding:16px}.tool-card p{font-size:11px}.tool-card>strong{font-size:13px}.stats-grid{gap:10px}.stat-card{padding:15px}.stat-card>small{font-size:11px}.writing-tools-grid>button{padding:13px;gap:5px 8px;grid-template-columns:31px minmax(0,1fr)}.writing-tools-grid>button>span{width:31px;height:31px}.writing-tools-grid small{font-size:11px}.analysis-modes>button{padding:13px;gap:8px}.analysis-modes small{font-size:11px}.chat-layout{grid-template-columns:216px minmax(0,1fr)}.chat-history{padding:16px}.chat-scroll{padding:22px}.studio-layout{grid-template-columns:minmax(270px,.9fr) minmax(0,1.35fr);gap:13px}.studio-messages{padding:16px}.studio-header-actions{gap:10px}.studio-workspace .workspace-tabs{gap:3px;padding:10px}.studio-workspace .workspace-tabs button{padding:8px 9px;gap:5px}.projects-grid{gap:16px}.project-card-body{padding:17px}.project-art-window{width:160px}.project-art-code{left:calc(50% - 93px)}.output-history-list{grid-template-columns:repeat(2,minmax(0,1fr))}.wallet-overview{gap:13px}.wallet-total,.wallet-detail{padding:22px}}
@media(max-width:1023px){.app-shell{display:block}.desktop-sidebar{display:none}.mobile-menu{display:inline-flex}.drawer-backdrop{position:fixed;inset:0;background:#15172355;backdrop-filter:blur(4px);z-index:100;display:flex;justify-content:flex-start}.mobile-drawer{width:min(330px,calc(100vw - 40px));height:100dvh;background:var(--surface);padding:25px 20px 20px;display:flex;flex-direction:column;box-shadow:-10px 0 45px #0002;overflow-y:auto}.drawer-close{display:inline-flex}.mobile-bottom-nav{display:flex;justify-content:space-around;align-items:center;position:fixed;bottom:0;left:0;right:0;z-index:25;background:var(--surface);border-top:1px solid var(--border);padding:7px 8px calc(7px + env(safe-area-inset-bottom));box-shadow:0 -4px 20px #22252b04}.mobile-bottom-nav>button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;min-width:45px;min-height:46px;color:var(--muted);font-size:11px;padding:4px 10px}.mobile-bottom-nav>button.active{color:var(--accent-ink)}.mobile-bottom-nav .bottom-build{background:var(--accent-soft);border-radius:10px;color:var(--accent-ink);min-width:54px}.app-content{padding-bottom:75px}.workspace-footer{padding-bottom:15px}.toast-stack{bottom:calc(84px + env(safe-area-inset-bottom));left:16px}.topbar{height:64px}.tool-card>strong{font-size:14px}.tool-card p{font-size:12px}.stat-card>small{font-size:11px}.studio-layout{max-height:calc(100dvh - 237px);min-height:570px}.auth-layout{grid-template-columns:1fr 390px;gap:35px}.auth-story h1{font-size:35px}.auth-visual{transform:scale(.85)}.auth-form-card{padding:30px}.auth-story>p{font-size:14px}}
@media(max-width:767px){h1{font-size:25px}.main-page{padding:23px 18px}.topbar{padding:0 17px;height:61px}.topbar-start{gap:8px}.topbar-actions{gap:3px}.breadcrumb-brand{font-size:11px}.topbar-wallet{margin-left:1px;padding:6px 8px}.topbar-start strong{font-size:12px}.main-studio{padding:19px 14px}.dashboard-hero{padding:26px;min-height:250px;gap:10px;border-radius:18px}.hero-copy h1{font-size:28px}.hero-copy h1>span:last-child{font-size:23px}.hero-copy>p{font-size:13px;max-width:350px}.hero-art{position:absolute;left:-67px;top:14px;transform:scale(.74);opacity:.42}.hero-copy{max-width:85%}.hero-copy .eyebrow{font-size:11px}.hero-actions{gap:7px;margin-top:20px}.hero-actions .btn{font-size:12px;padding:9px 12px;min-height:37px}.stats-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:11px;margin-bottom:27px}.stat-card{padding:17px}.stat-card>small{font-size:11px}.stat-card>strong{font-size:26px}.tool-cards-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:11px}.tool-card{padding:19px}.tool-card p{min-height:48px}.tool-card-icon{margin-bottom:16px}.tool-card-foot{margin-top:15px}.dashboard-bottom{grid-template-columns:1fr;gap:17px}.dashboard-tip{padding:18px;gap:12px;flex-wrap:wrap}.dashboard-tip>p{min-width:150px}.dashboard-tip>button{margin-right:51px}.section-heading h2{font-size:18px}.section-heading>.muted{font-size:11px}.workspace-footer{font-size:11px;padding:17px 19px}.workspace-footer>span:last-child{display:none}.panel{padding:20px}.page-header{align-items:flex-start;gap:12px;margin-bottom:21px}.page-header p{font-size:13px}.page-header>.btn{font-size:12px;min-height:36px;padding:9px 12px}.page-header>.page-icon{width:38px;height:38px;margin-top:8px}.studio-header{margin-bottom:15px;gap:8px}.studio-title{gap:10px}.studio-title .page-icon{width:38px;height:38px}.studio-title h1{font-size:19px}.studio-title p{font-size:11px}.studio-header-actions .save-state{display:none}.studio-header-actions .btn{font-size:11px;padding:8px;gap:4px}.studio-mobile-tabs{display:flex;margin-bottom:13px}.studio-mobile-tabs>button{flex:1;font-size:12px;padding:9px}.studio-layout{display:block;height:auto;min-height:0;max-height:none}.studio-mobile-hidden{display:none}.studio-conversation,.studio-workspace{height:calc(100dvh - 240px);min-height:525px;max-height:820px}.studio-conversation-heading{padding:16px 18px}.studio-messages{padding:18px}.studio-welcome{padding:25px 9px}.studio-welcome>p{font-size:14px}.suggestion-stack button{font-size:13px;padding:14px}.studio-welcome>small{font-size:12px}.studio-composer{padding:15px}.studio-composer>textarea{font-size:14px;height:100px}.request-kind select{font-size:13px}.studio-composer .cost-label{font-size:12px}.studio-assistant-message>.text-output{font-size:14px}.studio-user-message>p{font-size:14px}.studio-workspace .workspace-tabs{gap:4px;padding:10px 13px}.studio-workspace .workspace-tabs button{flex:1;font-size:12px;padding:10px 7px}.workspace-project-header{padding:14px 17px}.project-name-button strong{font-size:14px;max-width:210px}.preview-area{padding:12px}.preview-toolbar{padding:11px 13px}.preview-footer{font-size:11px;padding:10px 12px}.preview-status{font-size:11px}.files-panel,.versions-panel{padding:18px}.workspace-empty{min-height:340px}.chat-layout{display:block;height:calc(100dvh - 230px);min-height:580px}.chat-history{display:none}.chat-history-toggle{display:inline-flex}.chat-conversation{height:100%}.chat-scroll{padding:20px}.chat-conversation-header{padding:15px 18px}.chat-conversation-header strong{max-width:240px}.chat-welcome{min-height:355px;padding:15px 10px}.chat-composer{padding:16px 18px}.chat-composer>textarea{font-size:14px;height:84px}.chat-message{gap:10px}.message-avatar{width:27px;height:27px}.message-label strong{font-size:12px}.message-label>span{font-size:11px}.chat-task-state .badge{margin-right:44px}.analysis-modes{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin-bottom:18px}.analysis-modes>button{padding:14px;gap:10px}.analysis-modes strong{font-size:13px}.analysis-modes small{font-size:11px}.analysis-layout,.writing-layout{grid-template-columns:1fr;gap:19px}.analysis-input-panel,.writing-input,.result-panel{padding:21px}.result-panel{max-height:none;min-height:380px}.result-empty{min-height:280px}.result-panel .working-state{margin:25px 0}.writing-tools-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin-bottom:20px}.writing-tools-grid>button{padding:15px;grid-template-columns:34px minmax(0,1fr);gap:5px 10px}.writing-tools-grid>button>span{width:34px;height:34px}.writing-tools-grid strong{font-size:13px}.writing-tools-grid small{font-size:11px}.analysis-input-panel .field textarea,.writing-input .field textarea{min-height:190px;font-size:14px}.output-history-list{grid-template-columns:repeat(2,minmax(0,1fr))}.output-history-list>button{padding:12px;gap:8px;flex-wrap:wrap}.output-history-list>button>.badge{margin-right:26px}.projects-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:13px}.project-card-art{height:145px}.project-art-window{width:150px;height:105px}.project-art-letter{right:13px;width:39px;height:39px;font-size:25px}.project-art-lines{width:65px;left:15px}.project-art-code{left:calc(50% - 85px);width:35px;height:35px;border-radius:9px;bottom:17px}.project-art-code>svg{width:20px}.project-card-body{padding:16px}.project-card-body h2{font-size:14px}.project-card-bottom{flex-wrap:wrap;gap:5px}.project-card-bottom>div{margin-right:auto}.project-open-chip{display:none}.projects-toolbar{gap:10px}.projects-toolbar>.search-field{width:auto;flex:1;max-width:none}.projects-toolbar>.muted{font-size:11px;white-space:nowrap}.wallet-overview{grid-template-columns:1fr 1fr;gap:13px}.wallet-total{grid-column:span 2;min-height:195px;padding:25px}.wallet-total>strong{font-size:44px}.wallet-detail{padding:20px}.wallet-detail>p{font-size:11px}.profile-layout{grid-template-columns:1fr;gap:18px}.profile-heading{gap:11px}.profile-heading .badge{font-size:11px}.dialog-inner{padding:22px}.auth-top{padding:24px}.auth-layout{grid-template-columns:1fr;max-width:500px;gap:27px;padding:0 24px;margin:8px auto 35px}.auth-story h1{font-size:30px;line-height:1.7;margin:13px 0 9px}.auth-story h1 br{display:none}.auth-story>p{font-size:13px;max-width:100%;margin-top:8px}.auth-feature-row{margin-top:17px;font-size:11px;gap:8px}.auth-visual{display:none}.auth-story>.eyebrow{font-size:11px}.auth-form-card{padding:28px}.auth-form-card h2{font-size:22px}.auth-form-card .field input{font-size:16px}.auth-small-logo{width:39px;height:39px;margin-bottom:17px}.auth-form-card>p{margin-bottom:17px}.auth-top .brand{gap:9px}.auth-top .brand>span:last-child{font-size:22px}.auth-form-card .btn{min-height:44px}.dialog .field input,.dialog .field select,.field textarea{font-size:16px}}
@media(max-width:420px){.main-page{padding:20px 14px}.topbar{padding:0 11px}.topbar-start{gap:6px}.topbar-start .breadcrumb-brand,.breadcrumb-separator{display:none}.topbar-actions .avatar-small{display:none}.topbar-wallet span{display:none}.topbar-actions .icon-button{width:31px;height:31px}.topbar-wallet{gap:5px;padding:7px}.topbar-start strong{font-size:12px}.dashboard-hero{padding:23px 19px;min-height:263px;margin-bottom:18px}.hero-copy{max-width:100%}.hero-copy h1{font-size:27px}.hero-copy h1>span:last-child{font-size:22px}.hero-copy>p{max-width:280px;font-size:12px}.hero-art{left:-105px;top:15px;opacity:.23;transform:scale(.65)}.hero-actions{gap:7px;flex-wrap:wrap}.hero-actions .btn{font-size:11px;padding:9px 10px}.stat-card{padding:14px}.stat-card>div{font-size:11px}.stat-card>div>svg{width:16px}.stat-card>strong{font-size:24px;margin:11px 0 6px}.stat-card>small{font-size:11px}.stats-grid{gap:9px;margin-bottom:26px}.tool-cards-grid{gap:9px}.tool-card{padding:15px}.tool-card-icon{width:39px;height:39px;border-radius:10px;margin-bottom:16px}.tool-card-icon svg{width:22px}.tool-card-arrow{left:11px;top:17px}.tool-card-arrow svg{width:15px}.tool-card>strong{font-size:13px}.tool-card p{font-size:11px;line-height:2.1;margin-top:10px;min-height:56px}.tool-card-foot{font-size:11px;margin-top:14px}.dashboard-bottom .panel{padding:18px}.dashboard-tip{padding:16px;gap:10px}.dashboard-tip>p{font-size:11px}.section-heading>.muted{display:none}.panel-heading h2{font-size:14px}.page-header h1{font-size:24px}.page-header>.btn{font-size:11px;padding:8px 10px;gap:5px}.page-header p{font-size:12px}.page-header .eyebrow{font-size:11px}.main-studio{padding:16px 11px}.studio-title h1{font-size:17px}.studio-title p{font-size:11px}.studio-title .page-icon{width:33px;height:33px}.studio-title .page-icon svg{width:19px}.studio-header-actions .btn span{display:none}.studio-header-actions .btn{padding:8px;min-height:32px}.studio-conversation,.studio-workspace{min-height:530px}.studio-conversation-heading{padding:15px}.studio-messages{padding:15px}.studio-welcome{padding:22px 2px}.studio-welcome>p{font-size:13px}.suggestion-stack button{font-size:12px;padding:12px}.studio-welcome>small{font-size:11px}.studio-composer{padding:14px}.studio-composer>textarea{font-size:14px}.studio-composer .model-control select{max-width:165px;font-size:11px}.workspace-project-header{padding:13px}.project-name-button{gap:7px}.project-name-button strong{max-width:165px;font-size:12px}.project-name-button .project-mini-icon{width:28px;height:28px}.workspace-actions .icon-button{width:29px;height:29px}.workspace-tabs{padding:8px!important;gap:0!important}.workspace-tabs button{padding:9px 8px!important;font-size:12px!important;gap:5px!important}.workspace-tabs svg{width:14px}.preview-toolbar{padding:9px 10px}.preview-status{font-size:11px;gap:3px}.device-controls{gap:3px}.device-controls button{width:25px;height:25px}.preview-footer>span:last-child{font-size:11px;gap:3px}.preview-area{padding:9px}.workspace-empty h2{font-size:17px}.workspace-empty p{font-size:12px}.chat-layout{min-height:580px}.chat-scroll{padding:16px 13px}.chat-conversation-header{padding:14px}.chat-conversation-header strong{max-width:185px}.chat-welcome{padding:13px 2px}.chat-welcome h2{font-size:23px}.chat-welcome p{font-size:12px}.chat-suggestions{gap:7px;margin-top:23px}.chat-suggestions button{font-size:11px;padding:11px;gap:4px}.chat-suggestions svg{width:13px}.chat-composer{padding:14px}.chat-composer .model-control select{max-width:133px;font-size:11px}.chat-composer .cost-label{font-size:11px;gap:3px}.chat-message{gap:8px}.message-user .message-body{padding:9px 11px}.text-output{font-size:13px}.message-label{gap:7px}.message-label>span{font-size:11px}.analysis-modes>button{padding:13px;gap:8px}.analysis-modes>button>svg{width:18px}.analysis-modes strong{font-size:12px}.analysis-modes small{font-size:11px}.writing-tools-grid>button{padding:13px;gap:4px 8px;grid-template-columns:29px minmax(0,1fr)}.writing-tools-grid>button>span{width:29px;height:29px;border-radius:8px}.writing-tools-grid>button>span>svg{width:18px}.writing-tools-grid strong{font-size:12px}.writing-tools-grid small{font-size:11px}.analysis-input-panel,.writing-input,.result-panel{padding:18px}.analysis-submit-row{gap:12px}.analysis-submit-row .model-control{width:100%;flex:none}.analysis-submit-row>.btn{width:100%}.attachment-box>small{font-size:11px}.output-history{padding:18px}.output-history-list{grid-template-columns:1fr}.output-history-list>button>.badge{margin-right:0}.output-history-list>button{flex-wrap:nowrap}.projects-grid{grid-template-columns:1fr;gap:17px}.project-card-art{height:180px}.project-art-window{width:200px;height:127px}.project-art-letter{top:51px;right:23px;width:46px;height:46px;font-size:30px}.project-art-lines{width:93px;left:19px;top:57px}.project-art-code{left:calc(50% - 117px);bottom:20px;width:44px;height:44px}.project-card-body{padding:20px}.project-card-body h2{font-size:15px}.project-card-body p{font-size:13px}.project-card-bottom{flex-wrap:nowrap}.project-card-bottom>small{font-size:11px}.projects-toolbar>.muted{display:none}.projects-toolbar{margin-bottom:20px}.wallet-overview{gap:11px}.wallet-detail{padding:17px}.wallet-detail>strong{font-size:27px}.wallet-detail h3{font-size:12px}.wallet-detail>p{font-size:11px}.wallet-detail>.muted{font-size:11px}.data-table th,.data-table td{padding:11px;font-size:13px}.profile-heading{flex-wrap:wrap}.profile-heading .badge{margin-right:68px}.profile-layout .panel{padding:20px}.profile-export p{font-size:13px}.form-grid{grid-template-columns:1fr;gap:0}.notice{font-size:13px;padding:13px;flex-wrap:wrap}.provider-notice{font-size:12px;flex-wrap:nowrap;gap:7px;padding:12px}.provider-notice>svg{width:16px}.provider-notice>button{font-size:11px;gap:4px}.provider-notice>button>svg{display:none}.filter-tabs button{padding:9px 13px;font-size:12px}.job-card{padding:17px}.job-card-bottom>span{font-size:11px}.toast-stack{left:12px;width:calc(100vw - 24px)}.toast{padding:13px;font-size:13px;gap:8px}.dialog-inner{padding:19px}.dialog-header h2{font-size:17px}.auth-top{padding:22px}.auth-layout{padding:0 18px;gap:24px}.auth-form-card{padding:23px}.auth-story h1{font-size:28px;letter-spacing:-1px}.auth-story>p{font-size:12px}.auth-story>.eyebrow{font-size:11px}.auth-feature-row{font-size:11px;gap:6px}.auth-feature-row svg{width:15px}.auth-feature-row svg:nth-of-type(2){margin-right:8px}.auth-form-card h2{font-size:21px}.auth-form-card>p{font-size:12px}.auth-footnote{font-size:11px}.auth-help{font-size:11px}.startup-card{padding:30px 23px}.startup-card h1{font-size:20px}.startup-card p{font-size:14px}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important;animation-duration:.01ms!important;animation-iteration-count:1!important}}

/* Readable controls and confined overflow across small screens. */
:root{--muted:#686b75}
:root[data-theme=dark]{--muted:#b2b3be}
body{font-size:15px}
button{min-height:44px}
.btn,.btn-sm,.icon-button,.send-button{min-height:44px}
.icon-button{width:44px;height:44px}
.page-header>div,.studio-title>div,.studio-header-actions,.workspace-project-header,.workspace-actions,.preview-toolbar,.preview-footer,.project-card-bottom,.chat-conversation-header,.message-body,.studio-assistant-message,.studio-user-message,.result-panel,.output-history-list>button{min-width:0}
.page-header{flex-wrap:wrap}
.page-header>div{flex:1 1 210px}
.studio-title{min-width:0;flex:1}
.studio-header{flex-wrap:wrap}
.studio-header-actions{margin-inline-start:auto}
.studio-header-actions .btn{min-height:44px}
.workspace-actions{display:flex;flex-shrink:0}
.project-name-button{flex:1}
.project-name-button strong{max-width:100%}
.project-name-button>span:nth-child(2){flex:1}
.workspace-tabs{overflow-x:auto;max-width:100%;scrollbar-width:thin}
.workspace-tabs button{flex-shrink:0;min-height:44px}
.studio-workspace .workspace-tabs button{flex:0 0 auto}
.preview-toolbar,.preview-footer{flex-wrap:wrap;gap:10px}
.device-controls{margin-inline-start:auto}
.device-controls button{width:44px;height:44px;min-width:44px;min-height:44px}
.preview-footer>span{max-width:100%;overflow-wrap:anywhere}
.composer-bottom{flex-wrap:wrap}
.composer-bottom .model-control{min-width:150px}
.model-control select{min-height:44px;min-width:0;max-width:100%;width:100%;font-size:13px}
.model-control{min-width:0}
.request-kind select{min-height:44px;font-size:13px}
.studio-composer>textarea,.chat-composer>textarea{font-size:16px}
.composer-note{font-size:12px}
.text-output,.studio-assistant-message>.text-output,.message-user .text-output{font-size:14px}
.text-output,.text-output>div,.output-code,.output-list-item{max-width:100%;min-width:0}
.output-list-item>span{min-width:0}
.text-output pre{max-width:100%;overflow-x:auto;font-size:13px}
.file-tab-bar{max-width:100%;min-width:0;overflow-x:auto}
.code-editor{min-width:0;max-width:100%;overflow:auto}
.code-footer{flex-wrap:wrap;gap:8px}
.code-footer>span{max-width:100%;overflow-wrap:anywhere}
.project-file-list>div>button,.version-list>div>span{min-width:0}
.project-file-list strong{overflow-wrap:anywhere}
.project-card-bottom{flex-wrap:wrap}
.project-card-bottom>div{margin-inline-start:auto;flex-wrap:wrap}
.project-card-bottom .icon-button{width:44px;height:44px}
.project-card-body p{min-height:unset}
.output-history-list>button>.badge{flex:none}
.notice{flex-wrap:wrap}
.notice>span{flex:1 1 150px}
.notice button{min-height:44px}
.provider-notice>button{margin-inline-start:auto}
.table-scroll{width:100%;overflow:auto}
.data-table{min-width:480px}
.toast>button{min-width:44px;min-height:44px;margin-top:-8px;margin-bottom:-8px}
.toast-mark{flex-shrink:0}
.topbar-start{flex:1}
.topbar-start strong{min-width:0;overflow:hidden;text-overflow:ellipsis}
.topbar-actions .icon-button{width:44px;height:44px}
.topbar-wallet{min-height:44px;max-width:105px}
.topbar-wallet strong{overflow:hidden;text-overflow:ellipsis}
.topbar-actions .avatar-small{width:44px;height:44px}
.auth-tabs button,.mobile-bottom-nav>button{min-height:44px}
@media(max-width:1023px){
  .mobile-bottom-nav>button{font-size:11px;min-width:44px;padding:4px 6px}
  .studio-layout{min-height:650px;max-height:none}
}
@media(max-width:767px){
  .topbar{gap:6px;padding-inline:12px;height:68px}
  .topbar-actions{gap:2px}
  .topbar-start{gap:5px}
  .topbar-start strong{font-size:12px}
  .breadcrumb-brand,.breadcrumb-separator{display:none}
  .topbar-wallet span{display:none}
  .topbar-actions .avatar-small{display:none}
  .btn,.btn-sm,.hero-actions .btn,.page-header>.btn{min-height:44px;font-size:13px}
  .studio-layout{min-height:0}
  .studio-mobile-tabs>button{min-height:48px;white-space:normal;line-height:1.6;font-size:13px}
  .studio-conversation,.studio-workspace{height:calc(100dvh - 265px);min-height:610px;max-height:none}
  .studio-title p,.save-state{font-size:12px}
  .studio-header-actions .btn{font-size:13px}
  .studio-workspace .workspace-tabs{gap:4px}
  .preview-status,.preview-footer{font-size:11px}
  .workspace-project-header{gap:5px;padding:12px}
  .project-name-button{gap:6px}
  .project-name-button strong{font-size:13px}
  .project-name-button small{font-size:11px}
  .project-name-button>.project-mini-icon{display:none}
  .studio-composer .model-control select,.chat-composer .model-control select{max-width:100%;font-size:13px}
  .chat-conversation-header strong{max-width:100%;font-size:14px}
  .chat-conversation-header>div{flex:1}
  .chat-layout{height:calc(100dvh - 240px);min-height:660px;max-height:none}
  .chat-message .message-label>span{font-size:11px}
  .chat-task-state .badge{margin-inline-start:0}
  .analysis-modes small,.writing-tools-grid small{font-size:11px;line-height:1.8}
  .analysis-modes strong,.writing-tools-grid strong{font-size:13px}
  .attachment-chip{max-width:100%;min-width:0}
  .attachment-chip strong{overflow-wrap:anywhere}
  .field input,.field select,.field textarea,.search-field input{font-size:16px}
  .hero-copy>p,.tool-card p,.page-header p,.wallet-detail>p,.profile-export p,.auth-story>p,.auth-form-card>p{font-size:13px}
  .tool-card>strong,.stat-card>div,.wallet-detail h3{font-size:13px}
  .stat-card>small,.tool-card-foot,.wallet-detail>.muted,.project-card-meta,.project-card-bottom>small,.auth-help,.auth-feature-row,.auth-footnote{font-size:11px}
  .provider-notice{flex-wrap:wrap;font-size:13px}
}
@media(max-width:420px){
  .topbar-actions .icon-button{width:44px;height:44px}
  .topbar-start strong{font-size:12px}
  .topbar-wallet{padding:6px;gap:4px;max-width:76px}
  .studio-title h1{font-size:18px}
  .studio-title .page-icon{display:none}
  .studio-header-actions .btn{font-size:13px;padding:8px 10px}
  .studio-mobile-tabs{gap:3px}
  .studio-mobile-tabs>button{padding:8px 4px;font-size:12px;gap:4px}
  .workspace-tabs button{font-size:12px!important}
  .preview-status{font-size:11px}
  .preview-footer>span:last-child{font-size:11px}
  .chat-suggestions{grid-template-columns:1fr}
  .chat-suggestions button{min-height:44px;font-size:13px}
  .chat-welcome{min-height:unset;padding-block:20px}
  .chat-composer .cost-label{font-size:12px}
  .writing-tools-grid>button,.analysis-modes>button{padding:12px;gap:8px}
  .writing-tools-grid>button{grid-template-columns:1fr}
  .writing-tools-grid>button>span{grid-row:auto;width:34px;height:34px}
  .writing-tools-grid small{grid-column:auto}
  .analysis-modes>button>svg{display:none}
  .output-history-list>button{flex-wrap:wrap}
  .output-history-list>button>.badge{margin-inline-start:26px}
  .wallet-overview{grid-template-columns:1fr}
  .wallet-total{grid-column:auto}
  .wallet-detail>strong{font-size:30px}
  .project-card-bottom{flex-wrap:wrap}
  .project-card-bottom>div{flex-wrap:nowrap}
}
@media(max-height:650px) and (min-width:768px){
 .studio-layout,.chat-layout{min-height:600px;max-height:none}
}

/* Build milestones reflect saved server checkpoints, including queued continuation slices. */
.build-progress{width:100%;min-width:0;max-width:100%;margin-block:15px;padding:13px 14px;border:1px solid var(--border);border-radius:11px;background:var(--surface-soft)}
.build-progress-heading{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:6px 12px;min-width:0}
.build-progress-heading strong{font-size:14px;line-height:1.8;overflow-wrap:anywhere;min-width:0}
.build-progress-heading>span{font-size:13px;color:var(--muted);line-height:1.8;overflow-wrap:anywhere}
.build-progress-track{width:100%;height:6px;background:var(--border);border-radius:8px;overflow:hidden;margin-top:10px}
.build-progress-track>span{display:block;height:100%;background:var(--accent);border-radius:inherit;transition:width .2s ease}
.build-progress-stopped .build-progress-track>span{background:var(--muted)}
.build-progress>p{font-size:13px;line-height:1.9;color:var(--muted);margin-top:8px;overflow-wrap:anywhere}
.job-retry-actions{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:10px;min-width:0;max-width:100%}
.retry-cost{font-size:13px;line-height:1.8;color:var(--muted);overflow-wrap:anywhere}
.job-card-bottom>div{min-width:0;max-width:100%}
.job-card-top>div{min-width:0;max-width:100%;flex-wrap:wrap}
.studio-assistant-message .job-retry-actions .btn{margin-top:0}
@media(max-width:560px){
 .build-progress{padding:12px;width:100%}
 .build-progress-heading{align-items:flex-start;flex-direction:column}
 .build-progress-heading strong{font-size:14px}
 .build-progress-heading>span,.build-progress>p,.retry-cost{font-size:13px}
 .job-card-bottom>div{width:100%}
 .job-retry-actions{width:100%;flex-direction:column;align-items:stretch;gap:8px}
 .job-retry-actions>.btn{width:100%;min-height:44px;font-size:14px}
}

/* Madar Studio 4.0 (2028 Edition) — Media Studio, Motion Player & Pro Tiers */
.live-worker-pill{display:inline-flex;align-items:center;gap:6px;background:var(--accent-soft);color:var(--accent-ink);border:1px solid #8b74ce44;padding:5px 11px;border-radius:99px;font-size:11px;font-weight:700}
.plan-pill{font-size:10px;padding:2px 7px;border-radius:6px;font-weight:700;letter-spacing:.5px}
.plan-pill-free{background:var(--surface-soft);color:var(--muted);border:1px solid var(--border)}
.plan-pill-pro{background:linear-gradient(135deg,#6366f1,#8b5cf6);color:#fff}
.plan-pill-studio{background:linear-gradient(135deg,#f59e0b,#ec4899,#6366f1);color:#fff}

.media-tabs{margin-bottom:22px;width:max-content;max-width:100%;overflow-x:auto}
.suggestion-pills{margin-top:10px}
.generated-image-stage{margin:16px 0;border-radius:16px;overflow:hidden;border:1px solid var(--border);background:#090d16;display:flex;justify-content:center;align-items:center;min-height:320px;max-height:620px;padding:12px}
.generated-raster-img{max-width:100%;max-height:580px;height:auto;border-radius:12px;box-shadow:0 18px 50px rgba(0,0,0,.45)}
.svg-stage-container{width:100%;display:flex;justify-content:center;align-items:center}
.svg-stage-container svg{max-width:100%;max-height:560px;height:auto;border-radius:12px}

.palette-row{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:14px 0}
.palette-swatch{display:inline-flex;align-items:center;justify-content:center;padding:6px 12px;border-radius:8px;color:#fff;font-size:11px;font-family:monospace;text-shadow:0 1px 3px rgba(0,0,0,.8);border:1px solid rgba(255,255,255,.2);min-height:34px}
.enhanced-prompt-box{background:var(--surface-soft);border:1px solid var(--border);border-radius:12px;padding:14px;margin-top:14px;font-size:13px}
.enhanced-prompt-box strong{display:block;margin-bottom:6px;color:var(--accent-ink)}
.enhanced-prompt-box p{color:var(--muted);font-size:12px;line-height:1.85}

.motion-player-wrapper{margin:16px 0;background:#070a14;border:1px solid var(--border);border-radius:16px;padding:14px;overflow:hidden}
.motion-canvas-stage{width:100%;max-height:520px;height:auto;display:block;margin:0 auto;border-radius:10px;background:#05070f}
.motion-controls-bar{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:12px;padding-top:12px;border-top:1px solid #1e293b}
.motion-scenes-list{margin-top:18px}
.motion-scenes-list h4{font-size:14px;margin:0 0 12px}
.scene-cards-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.scene-item-card{background:var(--surface-soft);border:1px solid var(--border);border-radius:11px;padding:12px;cursor:pointer;transition:border-color .15s,background .15s}
.scene-item-card.active{border-color:var(--accent);background:var(--accent-soft)}
.scene-item-head{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-bottom:6px}
.scene-item-card strong{display:block;font-size:13px;margin-bottom:4px}

.media-gallery-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}
.media-gallery-card{overflow:hidden;display:flex;flex-direction:column}
.media-gallery-thumb{height:190px;background:#090d16;display:flex;justify-content:center;align-items:center;overflow:hidden;cursor:pointer;padding:10px}
.svg-thumb-container{width:100%;height:100%;display:flex;justify-content:center;align-items:center}
.svg-thumb-container svg{max-width:100%;max-height:170px;height:auto}
.motion-thumb-placeholder{display:flex;flex-direction:column;align-items:center;gap:10px;color:#a5b4fc;font-size:13px}
.media-gallery-body{padding:16px;display:flex;flex-direction:column;gap:8px;flex:1}
.media-gallery-meta{display:flex;justify-content:space-between;align-items:center}
.media-gallery-actions{display:flex;justify-content:space-between;align-items:center;margin-top:auto;padding-top:10px;border-top:1px solid var(--border)}

.cost-pills-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}
.cost-pill-item{display:flex;flex-direction:column;gap:4px;background:var(--surface-soft);border:1px solid var(--border);border-radius:10px;padding:10px 12px;font-size:12px}
.cost-pill-item span{color:var(--muted);font-size:11px}
.cost-pill-item strong{color:var(--accent-ink);font-size:13px}

.plans-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;margin-top:16px}
.plan-card{padding:24px;display:flex;flex-direction:column;gap:14px;position:relative;transition:transform .15s,box-shadow .15s}
.plan-card:hover{transform:translateY(-3px);box-shadow:var(--shadow)}
.plan-card-active{border-color:var(--accent);background:var(--surface-soft)}
.plan-card-featured{border-color:#8b5cf6;box-shadow:0 16px 44px rgba(139,92,246,.14)}
.plan-card-head{display:flex;justify-content:space-between;align-items:center;gap:8px}
.plan-badge{padding:4px 10px;border-radius:8px;font-size:11px;font-weight:700}
.plan-badge-free{background:var(--surface-soft);color:var(--muted);border:1px solid var(--border)}
.plan-badge-pro{background:linear-gradient(135deg,#6366f1,#8b5cf6);color:#fff}
.plan-badge-studio{background:linear-gradient(135deg,#f59e0b,#ec4899,#6366f1);color:#fff}
.plan-price{display:flex;align-items:baseline;gap:8px;margin:4px 0}
.plan-price strong{font-size:36px;line-height:1.1;color:var(--ink)}
.plan-price span{font-size:12px;color:var(--muted)}
.plan-features{list-style:none;padding:0;margin:0 0 10px;display:flex;flex-direction:column;gap:10px;flex:1}
.plan-features li{display:flex;align-items:center;gap:8px;font-size:13px;color:var(--ink)}
.plan-features li svg{color:var(--green)}

@media(max-width:960px){
  .plans-grid,.media-gallery-grid{grid-template-columns:1fr 1fr}
  .cost-pills-grid{grid-template-columns:1fr 1fr}
}
@media(max-width:640px){
  .plans-grid,.media-gallery-grid,.scene-cards-grid,.cost-pills-grid{grid-template-columns:1fr}
  .live-worker-pill span{display:none}
}
