*,:after,:before{box-sizing:border-box}:root{color-scheme:light dark;--bg:#fafaf9;--bg-ink:#18181b;--bg-muted:#f4f4f5;--accent:#2563eb;--accent-hover:#1d4ed8;--accent-muted:rgba(37,99,235,.1);--stroke:rgba(0,0,0,.08);--stroke-strong:rgba(0,0,0,.15);--shadow-sm:0 1px 2px rgba(0,0,0,.04);--shadow:0 4px 12px rgba(0,0,0,.06);--radius:12px;--radius-sm:8px;--text-primary:#18181b;--text-secondary:#71717a;--text-muted:#a1a1aa;--surface:#fff;--surface-raised:#fff;--surface-muted:#f4f4f5;--input-bg:#fff;--error-bg:#fef2f2;--error-text:#b91c1c;--success:#16a34a;--warning:#ca8a04;--space-xs:4px;--space-sm:8px;--space-md:12px;--space-lg:16px;--space-xl:24px}[data-theme=dark]{--bg:#09090b;--bg-ink:#fafafa;--bg-muted:#18181b;--accent:#3b82f6;--accent-hover:#60a5fa;--accent-muted:rgba(59,130,246,.15);--stroke:hsla(0,0%,100%,.08);--stroke-strong:hsla(0,0%,100%,.15);--shadow-sm:0 1px 2px rgba(0,0,0,.2);--shadow:0 4px 12px rgba(0,0,0,.3);--text-primary:#fafafa;--text-secondary:#a1a1aa;--text-muted:#71717a;--surface:#18181b;--surface-raised:#27272a;--surface-muted:#27272a;--input-bg:#27272a;--error-bg:rgba(185,28,28,.15);--error-text:#fca5a5;--success:#22c55e;--warning:#facc15}body,html{padding:0;margin:0;min-height:100vh}body{font-family:var(--font-body),"IBM Plex Sans",system-ui,-apple-system,sans-serif;background:var(--bg);color:var(--text-primary);font-size:14px;line-height:1.5;transition:background-color .5s ease,color .5s ease}*,:after,:before{transition:background-color .3s ease,border-color .3s ease,color .3s ease,box-shadow .3s ease}.theme-transition{animation:themePulse .6s ease}@keyframes themePulse{0%{opacity:1}50%{opacity:.7}to{opacity:1}}@media (max-width:768px){body{font-size:13px}h1{font-size:20px}h2{font-size:16px}h3{font-size:14px}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}h1,h2,h3,h4{font-family:var(--font-display),"Bricolage Grotesque",system-ui,sans-serif;margin:0;font-weight:600}p{margin:0}button,input,select,textarea{font:inherit;color:inherit}button{cursor:pointer;border:none;background:none}a{color:inherit;text-decoration:none}.app{display:flex;min-height:100vh}.sidebar{position:fixed;left:0;top:0;bottom:0;width:260px;background:var(--surface);border-right:1px solid var(--stroke);display:flex;flex-direction:column;transform:translateX(-100%);transition:transform .2s ease;z-index:100}.sidebar.open{transform:translateX(0)}.sidebar-backdrop{position:fixed;inset:0;background:rgba(0,0,0,.4);opacity:0;visibility:hidden;transition:opacity .2s ease,visibility .2s ease;z-index:99}.sidebar-backdrop.visible{opacity:1;visibility:visible}.sidebar-header{padding:16px;border-bottom:1px solid var(--stroke);display:flex;align-items:center;justify-content:space-between;gap:12px}@media (max-width:768px){.sidebar-header{padding:12px;border-bottom:1px solid var(--stroke)}.sidebar-title{font-size:16px}}.sidebar-header-left{display:flex;flex-direction:column;gap:2px}.sidebar-title{font-size:18px;font-weight:650;letter-spacing:-.01em;color:var(--text-primary);margin:0}.sidebar-subtitle{font-size:11px;text-transform:uppercase;letter-spacing:.06em;color:var(--text-muted);font-weight:500}.sidebar-header h2{font-size:14px;font-weight:600;text-transform:uppercase;letter-spacing:.04em;color:var(--text-secondary)}.sidebar-footer{padding:12px 16px;border-top:1px solid var(--stroke);margin-top:auto}.sidebar-user-button{display:flex;align-items:center;gap:10px;width:100%;padding:10px 12px;border-radius:var(--radius-sm);border:1px solid var(--stroke);background:var(--surface);color:var(--text-primary);font-size:13px;font-weight:500;cursor:pointer;transition:background .15s ease,border-color .15s ease}.sidebar-user-button:hover{background:var(--surface-muted);border-color:var(--stroke-strong)}.sidebar-user-avatar{width:28px;height:28px;border-radius:50%;background:var(--accent-muted);display:flex;align-items:center;justify-content:center;color:var(--accent);font-weight:600;font-size:12px}.sidebar-user-avatar img{width:100%;height:100%;border-radius:50%;object-fit:cover}.sidebar-user-info{display:flex;flex-direction:column;align-items:flex-start;gap:2px;flex:1 1}.sidebar-user-name{font-size:13px;font-weight:500;color:var(--text-primary)}.sidebar-user-tier{font-size:11px;font-weight:400;color:var(--text-secondary);text-transform:capitalize}.sidebar-close{width:28px;height:28px;display:flex;align-items:center;justify-content:center;border-radius:var(--radius-sm);color:var(--text-secondary);transition:background .15s ease}.sidebar-close:hover{background:var(--surface-muted)}@media (max-width:768px){.sidebar-close{width:40px;height:40px;min-width:40px;min-height:40px}}.sidebar-content{flex:1 1;overflow-y:auto;padding:12px}.sidebar-content::-webkit-scrollbar{width:8px}.sidebar-content::-webkit-scrollbar-track{background:transparent}.sidebar-content::-webkit-scrollbar-thumb{background:var(--stroke);border-radius:4px;-webkit-transition:background .2s ease;transition:background .2s ease}.sidebar-content::-webkit-scrollbar-thumb:hover{background:var(--stroke-strong)}.sidebar-content{scrollbar-width:thin;scrollbar-color:var(--stroke) transparent}.history-groups{gap:16px}.history-folders,.history-groups{display:flex;flex-direction:column}.history-folders{margin-bottom:14px;gap:6px}.history-folders-header{font-size:11px;text-transform:uppercase;letter-spacing:.06em;color:var(--text-muted);margin-left:4px;font-weight:500}.history-folder-list{display:flex;flex-wrap:wrap;gap:6px}.history-folder-btn{border:1px solid var(--stroke);background:var(--surface-muted);color:var(--text-muted);font-size:12px;padding:4px 10px;border-radius:999px;transition:background .15s ease,color .15s ease,border-color .15s ease}.history-folder-btn:focus-visible,.history-folder-btn:hover{color:var(--text);border-color:var(--stroke-strong)}.history-folder-btn.active{background:var(--accent-muted);color:var(--text);border-color:transparent}.history-group-title{font-size:11px;text-transform:uppercase;letter-spacing:.06em;color:var(--text-muted);margin:0 0 6px 4px;font-weight:500}.history-list{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:4px}.history-item{padding:10px 12px;border-radius:var(--radius-sm);cursor:pointer;transition:background .15s ease;display:flex;align-items:center;justify-content:space-between;gap:8px}.history-item:hover{background:var(--surface-muted)}@media (max-width:768px){.history-item{padding:12px 14px;border-radius:0;border-bottom:1px solid var(--stroke);background:transparent}.history-item:hover{background:var(--surface-muted)}.history-delete{opacity:1;width:36px;height:36px}}.history-item.active{background:var(--accent-muted)}.history-item-content{flex:1 1;min-width:0;display:flex;flex-direction:column;gap:2px}.history-item-content strong{font-size:13px;font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.history-item-content .meta{font-size:11px;color:var(--text-muted)}.history-delete{width:24px;height:24px;display:flex;align-items:center;justify-content:center;border-radius:6px;color:var(--text-muted);opacity:0;transition:opacity .15s ease,background .15s ease,color .15s ease;flex-shrink:0}.history-item:hover .history-delete{opacity:1}.history-delete:hover{background:var(--error-bg);color:var(--error-text)}.history-context-menu{position:fixed;z-index:3000;min-width:200px;max-width:260px;max-height:calc(100vh - 24px);overflow-y:auto;background:var(--surface);border:1px solid var(--stroke);border-radius:var(--radius-md);box-shadow:var(--shadow-lg);padding:6px}.history-context-item{width:100%;display:flex;align-items:center;gap:8px;padding:8px 10px;border-radius:var(--radius-sm);background:transparent;color:var(--text);font-size:13px;text-align:left;transition:background .15s ease,color .15s ease}.history-context-item:focus-visible,.history-context-item:hover{background:var(--surface-muted)}.history-context-item.active{background:var(--accent-muted)}.history-context-item.danger{color:var(--error-text)}.history-context-item.danger:focus-visible,.history-context-item.danger:hover{background:var(--error-bg)}.history-context-divider{height:1px;background:var(--stroke);margin:6px 4px}.history-context-label{font-size:11px;text-transform:uppercase;letter-spacing:.06em;color:var(--text-muted);margin:6px 6px 4px;font-weight:500}.wave-group{position:relative;margin-bottom:16px}@media (max-width:768px){.wave-group .input{padding:12px 14px 12px 5px;font-size:14px}}.wave-group .input{font-size:14px;padding:10px 10px 10px 5px;display:block;width:100%;border:none;border-bottom:1px solid var(--stroke);background:transparent;color:var(--text-primary)}.wave-group .input:focus{outline:none}.wave-group .label{color:var(--text-muted);font-size:14px;font-weight:400;position:absolute;pointer-events:none;left:5px;top:10px;display:flex}.wave-group .label-char{transition:all .2s ease;transition-delay:calc(var(--index) * .05s)}.wave-group .input.has-value~.label .label-char,.wave-group .input:focus~.label .label-char{transform:translateY(-20px);font-size:12px;color:var(--accent)}.wave-group .bar{position:relative;display:block;width:100%}.wave-group .bar:after,.wave-group .bar:before{content:"";height:2px;width:0;bottom:1px;position:absolute;background:var(--accent);transition:all .2s ease;-moz-transition:all .2s ease;-webkit-transition:all .2s ease}.wave-group .bar:before{left:50%}.wave-group .bar:after{right:50%}.wave-group .input:focus~.bar:after,.wave-group .input:focus~.bar:before{width:50%}.main{flex:1 1;display:flex;flex-direction:column;min-height:100vh}.footer{border-top:1px solid var(--stroke);background:var(--surface);padding:8px 16px}.footer-inner{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}.footer-text{font-size:12px;color:var(--text-muted)}.footer-links{display:flex;gap:12px;align-items:center;font-size:12px}.footer-link{color:var(--text-secondary);text-decoration:none}.footer-link:hover{color:var(--text-primary);text-decoration:underline}.footer-icon-btn{position:relative;display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;border-radius:10px;border:1px solid var(--stroke);background:var(--surface);color:var(--text-secondary);text-decoration:none;transition:background .15s ease,border-color .15s ease,color .15s ease,transform .15s ease}.footer-icon-btn:hover{background:var(--surface-muted);border-color:var(--stroke-strong);color:var(--accent)}.footer-icon-btn:focus-visible{outline:none;box-shadow:0 0 0 3px var(--accent-muted)}.footer-icon{width:22px;height:22px;transition:transform .2s ease}.footer-icon-btn:hover .footer-icon{transform:scale(1.15)}.footer-tooltip{position:absolute;top:-46px;left:50%;transform:translateX(-50%) scale(0);transform-origin:center;padding:8px 10px;border-radius:10px;border:1px solid var(--stroke);background:var(--surface);box-shadow:var(--shadow);font-size:12px;font-weight:650;color:var(--text-primary);white-space:nowrap;pointer-events:none;transition:transform .2s ease;z-index:10}.footer-icon-btn:focus-visible .footer-tooltip,.footer-icon-btn:hover .footer-tooltip{transform:translateX(-50%) scale(1)}.settings-float{position:relative;z-index:1000}.settings-btn{width:32px;height:32px;display:flex;align-items:center;justify-content:center;border-radius:var(--radius-sm);border:1px solid var(--stroke);background:var(--surface);color:var(--text-secondary);transition:all .15s ease;box-shadow:var(--shadow-sm);opacity:.8}.settings-btn:hover{background:var(--surface-muted);border-color:var(--stroke-strong);color:var(--text-primary);opacity:1}@media (max-width:768px){.settings-btn{width:40px;height:40px;border:none;background:transparent;box-shadow:none;opacity:1}.settings-btn:active{background:var(--surface-muted)}}.zemni-heading{display:flex;justify-content:center;margin:7px 0;width:100%}.zemni-heading h1{font-size:28px;color:var(--text-primary);font-weight:700;letter-spacing:-.03em;opacity:.85}@media (max-width:768px){.zemni-heading{margin:4px 0}.zemni-heading h1{font-size:20px;opacity:.9}}.input-panel{position:relative;display:flex;flex-direction:column;gap:16px;padding:16px;flex:1 1;min-height:0;overflow-y:visible;overflow-x:visible}@media (max-width:768px){.input-panel{padding:12px;gap:12px}}.input-panel .model-selector{overflow:visible}.input-panel .model-selector-dropdown{overflow-y:auto!important;overflow-x:hidden}.sidebar-toggle-input{width:32px;height:32px;display:flex;align-items:center;justify-content:center;border-radius:8px;color:var(--text-secondary);background:var(--surface);border:1px solid var(--stroke);transition:all .15s ease;box-shadow:var(--shadow-sm);opacity:.85}.sidebar-toggle-input:hover{background:var(--surface-muted);opacity:1}.folder-toggle-input,.sidebar-toggle-input:hover{color:var(--text-primary);border-color:var(--stroke-strong)}@media (max-width:768px){.sidebar-toggle-input{width:40px;height:40px;border:none;background:transparent;box-shadow:none;opacity:1}.sidebar-toggle-input:active{background:var(--surface-muted)}}.input-panel-topbar{position:relative;display:flex;justify-content:space-between;align-items:center;padding:8px 0;pointer-events:none;z-index:10}.input-panel-topbar-left,.input-panel-topbar-right{pointer-events:auto;display:flex;align-items:center;gap:8px}.topbar-left-group{display:flex;align-items:center;gap:8px}.input-bar-btn{display:flex;align-items:center;gap:6px;padding:6px 10px;border-radius:var(--radius-sm);border:1px solid var(--stroke);background:var(--surface);color:var(--text-secondary);font-size:12px;font-weight:500;cursor:pointer;transition:all .15s ease;box-shadow:var(--shadow-sm)}.folder-menu{position:relative}.folder-menu-btn{border-color:var(--stroke-strong);color:var(--text-primary)}.folder-menu-panel{position:absolute;right:0;top:calc(100% + 6px);min-width:180px;background:var(--surface);border:1px solid var(--stroke);border-radius:var(--radius-sm);box-shadow:var(--shadow);padding:6px;z-index:60;display:flex;flex-direction:column;gap:4px}.folder-menu-header{padding:6px 8px 4px;font-size:11px;font-weight:700;color:var(--text-muted);text-transform:uppercase;letter-spacing:.04em}.folder-menu-item{width:100%;display:flex;align-items:center;padding:8px 10px;border-radius:8px;border:1px solid transparent;background:transparent;color:var(--text-primary);font-size:13px;cursor:pointer;text-align:left}.folder-menu-item:focus-visible,.folder-menu-item:hover{background:var(--surface-muted);border-color:var(--stroke);outline:none}.folder-menu-item.active{background:var(--accent-muted)}.folder-menu-divider{height:1px;background:var(--stroke);margin:4px 6px}.input-bar-btn:hover{background:var(--surface-muted);border-color:var(--stroke-strong);color:var(--text-primary)}.input-bar-btn:active{transform:translateY(1px)}.input-bar-btn-label{display:none}@media (min-width:1024px){.input-bar-btn-label{display:inline}}.quick-menu{position:relative}.quick-menu-dropdown{position:absolute;top:auto;bottom:calc(100% + 6px);right:0;min-width:180px;border:1px solid var(--stroke);background:var(--surface);border-radius:var(--radius-sm);box-shadow:var(--shadow);padding:6px;display:flex;flex-direction:column;gap:2px;z-index:100}@media (max-width:768px){.folder-menu-panel{left:0;right:auto;max-width:calc(100vw - 24px)}.quick-menu-dropdown{top:calc(100% + 6px);bottom:auto}}.quick-menu-header{padding:4px 8px 2px;font-size:10px;font-weight:600;color:var(--text-muted);text-transform:uppercase;letter-spacing:.03em;border-bottom:1px solid var(--stroke);margin-bottom:2px}.quick-menu-item{width:100%;display:flex;align-items:center;gap:8px;padding:8px 10px;border-radius:var(--radius-sm);border:1px solid transparent;background:transparent;color:var(--text-primary);font-size:13px;cursor:pointer;text-align:left;transition:all .15s ease}.quick-menu-item:focus-visible,.quick-menu-item:hover{background:var(--surface-muted);border-color:var(--stroke);outline:none}.quick-menu-item-icon{font-size:16px;line-height:1}.quick-menu-item-meta{margin-left:auto;color:var(--text-muted);font-size:12px}.quick-menu-item-arrow{margin-left:auto;color:var(--text-muted);font-size:14px}.quick-menu-divider{height:1px;background:var(--stroke);margin:4px 0}.activity-bar{padding:10px 20px;border-bottom:1px solid var(--stroke);background:var(--surface)}@media (max-width:768px){.activity-bar{padding:8px 12px;background:transparent;border-bottom:1px solid var(--stroke)}.activity-bar-label{font-size:11px}.activity-bar-elapsed,.activity-bar-percent{font-size:10px}}.activity-bar-row{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin-bottom:8px}.activity-bar-left{display:flex;align-items:baseline;gap:10px;min-width:0}.activity-bar-label{font-size:12px;font-weight:700;color:var(--text-primary)}.activity-bar-elapsed,.activity-bar-percent{font-size:11px;color:var(--text-muted);font-feature-settings:"tnum";font-variant-numeric:tabular-nums}.activity-bar-track{height:6px;border-radius:999px;background:var(--surface-muted);overflow:hidden}.activity-bar-fill{height:100%;background:var(--accent);border-radius:999px;transition:width .2s ease}.activity-bar-fill.indeterminate{width:40%;background:linear-gradient(90deg,var(--accent) 0,var(--accent-muted) 50%,var(--accent) 100%);background-size:200% 100%;animation:activity-indeterminate 1.1s ease-in-out infinite}@keyframes activity-indeterminate{0%{transform:translateX(-60%)}to{transform:translateX(260%)}}.activity-bar-hint{margin-top:8px;font-size:11px;color:var(--text-muted)}.activity-bar-right{display:flex;align-items:center;gap:10px}.activity-bar-estimated{font-size:11px;color:var(--accent);font-feature-settings:"tnum";font-variant-numeric:tabular-nums;font-weight:500}.activity-bar-cancel{display:flex;align-items:center;justify-content:center;width:22px;height:22px;border:none;background:var(--surface-muted);border-radius:50%;cursor:pointer;color:var(--text-muted);transition:all .2s ease;padding:0}.activity-bar-cancel:hover{background:var(--error-muted);color:var(--error)}.activity-bar-cancel:active{transform:scale(.95)}.activity-bar-mode{font-size:11px;font-weight:600;color:var(--accent);text-transform:uppercase;letter-spacing:.5px;padding:2px 8px;background:var(--accent-muted);border-radius:4px}.activity-bar-stages{display:flex;align-items:center;gap:8px;margin:12px 0 8px;padding:8px 0}.activity-bar-stage{display:flex;align-items:center;gap:6px;font-size:11px;color:var(--text-muted);transition:color .2s ease}.activity-bar-stage.active{color:var(--accent);font-weight:600}.activity-bar-stage.completed{color:var(--success)}.activity-bar-stage-dot{width:8px;height:8px;border-radius:50%;background:var(--text-muted);transition:all .2s ease}.activity-bar-stage.active .activity-bar-stage-dot{background:var(--accent);box-shadow:0 0 0 3px var(--accent-muted)}.activity-bar-stage.completed .activity-bar-stage-dot{background:var(--success)}.activity-bar-stage-line{flex:1 1;height:2px;background:var(--surface-muted);border-radius:1px;max-width:40px;position:relative}.activity-bar-stage-line:after{content:"";position:absolute;left:0;top:0;height:100%;width:0;background:var(--success);border-radius:1px;transition:width .3s ease}.header-left{gap:12px}.header-left,.sidebar-toggle{display:flex;align-items:center}.sidebar-toggle{width:36px;height:36px;justify-content:center;border-radius:var(--radius-sm);border:1px solid var(--stroke);background:var(--surface);color:var(--text-secondary);transition:background .15s ease,border-color .15s ease}.sidebar-toggle:hover{background:var(--surface-muted);border-color:var(--stroke-strong)}.header-title{font-size:18px;font-weight:650;letter-spacing:-.01em}.top-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 20px;border-bottom:1px solid var(--stroke);background:var(--surface);flex-wrap:wrap}@media (max-width:768px){.top-toolbar{padding:8px 12px;background:transparent;border-bottom:1px solid var(--stroke)}}.top-toolbar-branding,.top-toolbar-center,.top-toolbar-left,.top-toolbar-right{display:flex;align-items:center;gap:10px}.top-toolbar-branding{display:none}.top-toolbar-logo{font-size:18px;font-weight:700;color:var(--text-primary);letter-spacing:-.02em}.mobile-header{display:none}@media (max-width:768px){.top-toolbar{display:none}.mobile-header{display:flex;flex-direction:column;align-items:stretch;padding:12px;border-bottom:1px solid var(--stroke);background:var(--surface);gap:10px;width:100%;max-width:100%;overflow-x:hidden}.mobile-header-top{width:100%;justify-content:space-between;gap:12px}.mobile-header-branding,.mobile-header-top{display:flex;align-items:center;min-width:0}.mobile-header-branding{justify-content:flex-start}.mobile-header-logo{font-family:var(--font-display),"Bricolage Grotesque",system-ui,sans-serif;font-size:25px;font-weight:800;line-height:1.1;color:var(--text-primary);letter-spacing:-.03em;padding-left:2px}.mobile-settings-btn{display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;padding:0;border:1px solid var(--stroke);border-radius:10px;background:var(--surface);color:var(--text-primary);flex-shrink:0}.mobile-settings-btn:hover{background:var(--surface-muted)}.mobile-settings-btn svg{width:16px;height:16px}.mobile-header-controls{display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start;gap:8px;width:100%;min-width:0}.mobile-header-controls .mode-switch{display:flex;gap:4px;padding:3px;border:1px solid var(--stroke);border-radius:999px;background:var(--bg);width:100%;max-width:100%;min-width:0}.mobile-header-controls .mode-btn{flex:1 1;min-width:0;border:1px solid transparent;background:transparent;color:var(--text-secondary);font-size:12px;font-weight:600;padding:7px 8px;border-radius:999px;cursor:pointer;transition:all .15s ease}.mobile-header-controls .mode-btn.active{background:var(--accent);color:#fff;border-color:var(--accent)}.mobile-header-controls .view-toggle{display:flex;width:100%;max-width:100%;justify-content:space-between;min-width:0}.mobile-header-controls .view-btn{flex:1 1;min-width:0;text-align:center}}.top-toolbar .mode-switch{display:inline-flex;gap:6px;padding:4px;border:1px solid var(--stroke);border-radius:999px;background:var(--surface)}.top-toolbar .mode-btn{border:1px solid transparent;background:transparent;color:var(--text-secondary);font-size:12px;font-weight:700;padding:6px 10px;border-radius:999px;cursor:pointer;transition:background .15s ease,color .15s ease,border-color .15s ease}.top-toolbar .mode-btn:hover{background:var(--surface-muted);color:var(--text-primary)}.top-toolbar .mode-btn.active{background:var(--accent-muted);color:var(--text-primary);border-color:rgba(0,0,0,.06)}.mode-select{border:1px solid var(--stroke);border-radius:999px;padding:8px 36px 8px 12px;background:var(--surface);color:var(--text-primary);font-size:12px;font-weight:650;letter-spacing:.02em;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' stroke='%2371717a' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 12px center}.mode-select:focus-visible{outline:none;box-shadow:0 0 0 3px var(--accent-muted)}.view-toggle{display:inline-flex;gap:6px;padding:4px;border:1px solid var(--stroke);border-radius:999px;background:var(--surface)}@media (max-width:768px){.view-toggle{border:1px solid var(--stroke);background:var(--bg);padding:3px}}.view-btn{border:1px solid transparent;background:transparent;color:var(--text-secondary);font-size:12px;font-weight:700;padding:6px 10px;border-radius:999px;cursor:pointer;transition:background .15s ease,color .15s ease,border-color .15s ease}.view-btn:hover{background:var(--surface-muted);color:var(--text-primary)}.view-btn.active{background:var(--accent-muted);color:var(--text-primary);border-color:rgba(0,0,0,.06)}@media (max-width:768px){.view-btn{padding:8px 14px;font-size:13px}.view-btn.active{background:var(--accent);color:#fff;border-color:var(--accent)}}.header-right{display:flex;align-items:center;gap:8px}.settings-menu{position:relative}.settings-menu.open .icon-btn{border-color:var(--accent);color:var(--accent)}.settings-popover{position:absolute;top:calc(100% + 8px);right:0;min-width:220px;border:1px solid var(--stroke);background:var(--surface);border-radius:12px;box-shadow:var(--shadow);padding:6px;display:flex;flex-direction:column;gap:4px;z-index:80}.settings-popover-up{top:auto;bottom:calc(100% + 8px)}.settings-popover-section{padding:6px 8px 4px;font-size:11px;font-weight:700;color:var(--text-muted);text-transform:uppercase;letter-spacing:.04em}.settings-popover-item{width:100%;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:9px 10px;border-radius:10px;border:1px solid transparent;background:transparent;color:var(--text-primary);font-size:13px;cursor:pointer;text-align:left}.settings-popover-item:focus-visible,.settings-popover-item:hover:not(:disabled){background:var(--surface-muted);border-color:var(--stroke);outline:none}.settings-popover-item:disabled{opacity:.55;cursor:not-allowed}.settings-popover-meta{color:var(--text-muted);font-size:12px}.sidebar-footer-actions{margin-top:10px;display:flex;flex-direction:column;gap:8px}.sidebar-settings-menu{position:relative}.sidebar-settings-btn{width:100%;justify-content:center;gap:8px}.sidebar-settings-btn .input-bar-btn-label{display:inline}.icon-btn{width:32px;height:32px;display:flex;align-items:center;justify-content:center;border-radius:8px;color:var(--text-secondary);background:var(--surface);border:1px solid var(--stroke);transition:all .15s ease;box-shadow:var(--shadow-sm);opacity:.85}.icon-btn:hover{background:var(--surface-muted);border-color:var(--stroke-strong)}@media (max-width:768px){.icon-btn{width:40px;height:40px;border:none;background:transparent;box-shadow:none;opacity:1}.icon-btn:active{background:var(--surface-muted)}}.status-badge{display:inline-flex;align-items:center;gap:6px;padding:6px 12px;border-radius:999px;border:1px solid var(--stroke);background:var(--surface);font-size:12px;font-weight:500}.status-dot{width:8px;height:8px;border-radius:999px;background:var(--text-muted)}.status-dot.status-dot-corner{box-shadow:0 0 0 4px var(--status-dot-ring,var(--surface-muted))}.status-dot.ready{background:var(--success)}.status-dot.busy{background:var(--warning)}.status-dot.error{background:var(--error-text)}.status-text{display:none}.content{flex:1 1;display:grid;grid-template-columns:340px 1fr;grid-template-rows:minmax(0,1fr);align-items:stretch;align-content:stretch;grid-gap:0;gap:0;min-height:0}.input-column{display:flex;flex-direction:column;min-height:0;background:var(--surface);border-right:1px solid var(--stroke);overflow:visible}.input-panel-modebar{padding:0;border-bottom:1px solid var(--stroke);background:var(--surface)}.input-panel-modebar .mode-switch{width:100%;border:none;background:none;border-radius:0}.input-panel-modebar .mode-btn{flex:1 1;text-align:center;justify-content:center;border-radius:0;border-bottom:2px solid transparent}.input-panel-modebar .mode-btn.active{background:transparent;border-bottom-color:var(--accent)}.dropzone{border:2px dashed var(--stroke-strong);border-radius:var(--radius);padding:32px 24px;text-align:center;background:var(--surface-muted);--status-dot-ring:var(--surface-muted);cursor:pointer;transition:all .2s ease;position:relative;display:flex;flex-direction:column;align-items:center;gap:8px}@media (max-width:768px){.dropzone{border:2px dashed var(--stroke);padding:28px 16px;margin-top:0;background:var(--surface);--status-dot-ring:var(--surface)}.dropzone-label{font-size:14px}.dropzone-hint{font-size:12px}}.dropzone-corner{position:absolute;top:10px;right:10px;pointer-events:none}.dropzone.drag,.dropzone:hover{border-color:var(--accent);background:var(--accent-muted);--status-dot-ring:var(--accent-muted);transform:translateY(-1px)}.dropzone-icon{color:var(--text-muted);margin-bottom:4px;transition:color .2s ease}.dropzone.drag .dropzone-icon,.dropzone:hover .dropzone-icon{color:var(--accent)}.dropzone.has-file{border-style:solid;border-color:var(--stroke);background:var(--surface);padding:20px 24px}.dropzone.has-file:hover{border-color:var(--accent);background:var(--accent-muted)}.dropzone-label{font-size:15px;font-weight:600;color:var(--text-primary)}.dropzone-hint{font-size:13px;color:var(--text-muted);line-height:1.4}.dropzone-status{font-size:12px;font-weight:600;color:var(--accent);line-height:1.3}.field{display:flex;flex-direction:column;gap:6px}.field-label{font-size:12px;font-weight:500;color:var(--text-secondary)}@media (max-width:768px){.field-label{font-size:11px;margin-bottom:6px}.field{gap:6px}.field input,.field select,.field textarea{padding:12px 14px;font-size:14px}}.field input,.field select,.field textarea{border:1px solid var(--stroke);border-radius:var(--radius-sm);padding:10px 12px;background:var(--input-bg);color:var(--text-primary);transition:border-color .15s ease}.field input:focus,.field select:focus,.field textarea:focus{outline:none;border-color:var(--accent)}.field select{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2371717a' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 10px center;padding-right:32px}.field-hint{font-size:11px}.model-selector{position:relative;width:100%;z-index:10}.model-selector-button{width:100%;display:flex;align-items:center;gap:8px;padding:10px 12px;border:1px solid var(--stroke);border-radius:var(--radius-sm);background:var(--input-bg);color:var(--text-primary);font-size:14px;text-align:left;cursor:pointer;transition:border-color .15s ease,box-shadow .15s ease}@media (max-width:768px){.model-selector-button{padding:12px 14px;font-size:14px}}.model-selector-button:hover{border-color:var(--stroke-strong)}.model-selector-button:focus-visible{outline:none;border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-muted)}.model-selector-button-text{flex:1 1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.model-selector-button svg{flex-shrink:0;width:14px;height:14px;color:var(--text-muted);transition:transform .2s ease}.model-selector:has(.model-selector-dropdown) .model-selector-button svg{transform:rotate(180deg)}.model-selector-backdrop{position:fixed;inset:0;z-index:999;background:transparent;pointer-events:auto}.model-selector-dropdown{position:fixed;z-index:1001;max-height:320px;overflow-y:auto;overflow-x:hidden;background:var(--surface);border:1px solid var(--stroke);border-radius:var(--radius-sm);box-shadow:var(--shadow);padding:6px 4px 12px;pointer-events:auto}.model-selector-group{margin-bottom:4px}.model-selector-group:last-child{margin-bottom:0}.model-selector-group-header{padding:6px 10px;margin-bottom:2px}.model-selector-group-label{font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.08em;color:var(--text-muted);display:flex;align-items:center;gap:6px}.unlock-label{margin-left:auto;color:var(--accent);font-size:9px;background:var(--accent-muted);padding:1px 6px;border-radius:4px}.tier-locked{background:var(--bg-muted);margin:4px;border-radius:var(--radius-sm);border:1px solid var(--stroke)}.model-option{width:100%;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:10px 12px;border:none;background:transparent;color:var(--text-primary);font-size:13px;text-align:left;cursor:pointer;border-radius:var(--radius-sm);transition:all .15s ease}.model-option:focus-visible,.model-option:hover{background:var(--surface-muted);outline:none}.model-option.selected{background:var(--accent-muted);color:var(--accent);font-weight:550}.premium-sparkle{color:#fbbf24;font-size:12px;margin-left:4px;animation:sparkle-float 2s ease-in-out infinite;display:inline-block}@keyframes sparkle-float{0%,to{transform:translateY(0) scale(1.1)}50%{transform:translateY(-1px) scale(1.2)}}.model-option-name{flex:1 1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tier-badge{display:inline-flex;align-items:center;padding:2px 8px;border-radius:4px;font-size:10px;font-weight:600;text-transform:uppercase;letter-spacing:.5px;flex-shrink:0}.tier-badge-free{background:rgba(34,197,94,.15);color:#16a34a}[data-theme=dark] .tier-badge-free{background:rgba(34,197,94,.2);color:#22c55e}.tier-badge-basic{background:rgba(59,130,246,.15);color:#2563eb}[data-theme=dark] .tier-badge-basic{background:rgba(59,130,246,.2);color:#3b82f6}.tier-badge-plus{background:rgba(168,85,247,.15);color:#9333ea}[data-theme=dark] .tier-badge-plus{background:rgba(168,85,247,.2);color:#a855f7}.tier-badge-pro{background:rgba(251,191,36,.15);color:#d97706}[data-theme=dark] .tier-badge-pro{background:rgba(251,191,36,.2);color:#fbbf24}.model-upgrade-info{text-align:center}.model-option-main{display:flex;align-items:center;gap:8px;flex:1 1;min-width:0}.model-option.locked{opacity:.5;cursor:not-allowed;background:transparent!important}.model-option.locked .model-option-name,.model-option.locked svg{color:var(--text-muted)}.upgrade-tag{font-size:10px;font-weight:700;color:var(--accent);text-transform:uppercase;letter-spacing:.02em}.model-selector-upgrade-cta{margin-top:4px;padding:10px;border-top:1px solid var(--stroke);text-align:center}.model-selector-upgrade-cta a{display:block;font-size:12px;font-weight:600;color:var(--accent);transition:color .15s ease}.model-selector-upgrade-cta a:hover{color:var(--accent-hover);text-decoration:underline}.custom-scrollbar::-webkit-scrollbar{width:5px}.custom-scrollbar::-webkit-scrollbar-track{background:transparent}.custom-scrollbar::-webkit-scrollbar-thumb{background:var(--stroke);border-radius:10px}.custom-scrollbar::-webkit-scrollbar-thumb:hover{background:var(--stroke-strong)}.custom-scrollbar{scrollbar-width:thin;scrollbar-color:var(--stroke) transparent}@media (max-width:768px){.model-selector-dropdown{max-height:240px}.model-option{padding:12px}}.field-inline{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}.mode-switch{display:inline-flex;gap:6px;padding:12px;background:var(--surface)}@media (max-width:768px){.mode-switch{padding:6px;background:transparent;gap:4px}}.mode-btn{border:1px solid transparent;background:transparent;color:var(--text-secondary);font-size:12px;font-weight:600;padding:6px 10px;border-radius:12px;cursor:pointer;transition:background .15s ease,color .15s ease,border-color .15s ease}.mode-btn:hover{background:var(--surface-muted);color:var(--text-primary)}.mode-btn.active{background:var(--accent-muted);color:var(--text-primary);border-color:rgba(0,0,0,.06)}.density-switch{display:flex;width:100%;gap:6px;padding:6px;border:1px solid var(--stroke);border-radius:16px;background:var(--surface-muted)}.density-btn{flex:1 1;border:1px solid transparent;background:transparent;color:var(--text-secondary);padding:10px;border-radius:12px;cursor:pointer;transition:background .15s ease,color .15s ease,border-color .15s ease;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;min-height:44px}.density-label{font-size:12px;font-weight:750;letter-spacing:.01em}.density-meta{font-size:10px;font-weight:650;color:var(--text-muted)}.density-btn.active,.density-btn:hover:not(:disabled){background:var(--surface);color:var(--text-primary)}.density-btn.active{border-color:var(--stroke);box-shadow:0 1px 0 rgba(0,0,0,.06)}.density-btn:focus-visible{outline:none;box-shadow:0 0 0 3px var(--accent-muted)}.density-btn:disabled{opacity:.55;cursor:not-allowed}.mode-panel{flex:1 1;min-height:0;overflow:auto;padding:20px;background:var(--bg)}.mode-empty{border:1px dashed var(--stroke);border-radius:var(--radius);padding:18px;color:var(--text-muted);background:var(--surface)}.mode-empty.error{border-style:solid;border-color:rgba(185,28,28,.25);background:var(--error-bg);color:var(--error-text)}.flashcards-meta{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:12px;color:var(--text-muted);margin-bottom:12px}.flashcards-actions{display:flex;gap:8px}.flashcards-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-gap:12px;gap:12px}@media (max-width:480px){.flashcards-grid{grid-template-columns:1fr;gap:10px}}.flashcard{text-align:left;border:1px solid var(--stroke);border-radius:var(--radius);background:var(--surface);padding:12px;cursor:pointer;transition:border-color .15s ease,background .15s ease,transform .05s ease}@media (max-width:768px){.flashcard{padding:14px;min-height:80px}}.flashcard:hover{border-color:var(--stroke-strong);background:var(--surface-muted)}.flashcard:active{transform:translateY(1px)}.flashcard-front{font-weight:600}.flashcard-back,.flashcard-front{font-size:13px;color:var(--text-primary)}.flashcard-back{margin-top:10px}.flashcard-source{border-top:1px dashed var(--stroke);padding-top:10px}.flashcard-hint,.flashcard-source{margin-top:10px;font-size:11px;color:var(--text-muted)}.flashcard-hint{display:flex;align-items:center;justify-content:flex-end}body.flashcard-player-open{overflow:hidden}.flashcard-player-overlay{position:fixed;inset:0;background:rgba(0,0,0,.55);z-index:200;display:flex;align-items:center;justify-content:center;padding:20px}.flashcard-player{width:min(920px,100%);background:var(--surface);border:1px solid var(--stroke);border-radius:var(--radius);box-shadow:var(--shadow);padding:14px;display:flex;flex-direction:column;gap:12px}@media (max-width:768px){.flashcard-player{width:calc(100% - 32px);padding:12px;box-shadow:none}.flashcard-player-overlay{padding:16px}}.flashcard-player-top{display:flex;align-items:center;justify-content:space-between;gap:12px}.flashcard-player-meta{display:flex;align-items:center;gap:10px;font-size:12px;color:var(--text-muted);min-width:0;flex-wrap:wrap}.flashcard-player-progress{font-weight:600;color:var(--text-secondary)}.flashcard-player-badge{padding:2px 8px;border-radius:999px;border:1px solid var(--stroke);background:var(--surface-muted);color:var(--text-secondary);font-size:11px}.flashcard-stage{width:100%;border-radius:var(--radius);padding:0;background:transparent;perspective:1200px}.flashcard-card{position:relative;width:100%;min-height:420px;transform-style:preserve-3d;transition:transform .24s ease}.flashcard-card.is-flipped{transform:rotateY(180deg)}.flashcard-face{position:absolute;inset:0;border-radius:var(--radius);border:1px solid var(--stroke);background:var(--surface-raised);padding:18px;-webkit-backface-visibility:hidden;backface-visibility:hidden;display:flex;flex-direction:column}.flashcard-face-back{transform:rotateY(180deg)}.flashcard-player-title{font-size:11px;text-transform:uppercase;letter-spacing:.05em;color:var(--text-muted);margin-bottom:12px;font-weight:600}.flashcard-player-content{font-size:18px;line-height:1.55;color:var(--text-primary);font-weight:650;white-space:pre-wrap}.flashcard-player-hint{padding-top:14px}.flashcard-player-hint,.flashcard-player-source{margin-top:auto;font-size:12px;color:var(--text-muted)}.flashcard-player-source{border-top:1px dashed var(--stroke);padding-top:12px;white-space:pre-wrap}.flashcard-player-actions{display:grid;grid-template-columns:1fr 1fr 1fr;grid-gap:10px;gap:10px}@media (max-width:768px){.flashcard-player-actions{gap:8px}.flashcard-player-actions button{min-height:44px;padding:12px}}.quiz-view{display:flex;flex-direction:column;gap:12px}.quiz-meta{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:12px;color:var(--text-muted)}.quiz-actions{display:flex;gap:8px}.quiz-question{font-size:16px;font-weight:700;color:var(--text-primary);background:var(--surface);border:1px solid var(--stroke);border-radius:var(--radius);padding:14px}.quiz-options{display:flex;flex-direction:column;gap:10px}.quiz-option{display:flex;gap:10px;align-items:flex-start;background:var(--surface);border:1px solid var(--stroke);border-radius:var(--radius);padding:12px;cursor:pointer;text-align:left;width:100%;transition:border-color .15s ease,background .15s ease,transform .05s ease}@media (max-width:768px){.quiz-option{padding:14px;min-height:44px}}.quiz-option:hover{border-color:var(--stroke-strong);background:var(--surface-muted)}.quiz-option:active{transform:translateY(1px)}.quiz-option.focused{border-color:rgba(37,99,235,.45);box-shadow:0 0 0 3px var(--accent-muted)}.quiz-option.correct{border-color:rgba(34,197,94,.35);background:rgba(34,197,94,.08)}.quiz-option.selected.wrong{border-color:rgba(239,68,68,.4);background:rgba(239,68,68,.08)}.quiz-option.selected.correct{border-color:rgba(34,197,94,.45);background:rgba(34,197,94,.12)}.quiz-option-letter{font-weight:700;color:var(--text-secondary);width:18px;flex:0 0 18px}.quiz-option-text{color:var(--text-primary);font-size:13px}.quiz-answer{background:var(--surface);border:1px solid var(--stroke);border-radius:var(--radius);padding:12px}.quiz-explanation{font-size:13px;color:var(--text-primary);margin-bottom:10px}.quiz-feedback{font-size:12px;font-weight:650;margin-bottom:8px}.quiz-feedback.ok{color:var(--success)}.quiz-feedback.bad{color:var(--error-text)}.quiz-source-details{border-top:1px dashed var(--stroke);padding-top:10px}.quiz-source-details summary{cursor:pointer;font-size:12px;font-weight:600;color:var(--text-secondary);-webkit-user-select:none;-moz-user-select:none;user-select:none;list-style:none}.quiz-source-details summary::-webkit-details-marker{display:none}.quiz-source-details summary:before{content:"+";display:inline-block;width:14px;color:var(--text-muted)}.quiz-source-details[open] summary:before{content:"–"}.quiz-source-snippet{margin-top:8px;font-size:11px;color:var(--text-muted);white-space:pre-wrap}.stats-section{border:1px solid var(--stroke);border-radius:var(--radius);background:var(--surface-muted);overflow:hidden}.stats-toggle{width:100%;display:flex;align-items:center;justify-content:space-between;padding:12px;font-size:12px;font-weight:500;color:var(--text-secondary);background:transparent;cursor:pointer;transition:background .15s ease}.stats-toggle:hover{background:var(--surface)}.stats-toggle-icon{transition:transform .2s ease}.stats-toggle-icon.open{transform:rotate(180deg)}.stats-content{display:none;padding:0 12px 12px}.stats-content.open{display:block}.stats-grid{display:grid;grid-template-columns:repeat(2,1fr);grid-gap:8px;gap:8px}.stat{padding:8px 10px;border-radius:var(--radius-sm);background:var(--surface);border:1px solid var(--stroke)}.stat-label{font-size:10px;color:var(--text-muted);text-transform:uppercase;letter-spacing:.04em}.stat-value{font-size:13px;font-weight:600;margin-top:2px}.cost-preview{padding:12px;border-radius:var(--radius);border:1px solid var(--stroke);background:var(--surface-muted);font-size:12px}@media (max-width:768px){.cost-preview{background:transparent;border:1px solid var(--stroke);padding:10px}.cost-preview,.cost-preview-title{font-size:11px}}.cost-preview-title{font-weight:500;color:var(--text-secondary);margin-bottom:8px;display:flex;align-items:center;gap:4px}.cost-preview-toggle{width:100%;justify-content:space-between;cursor:pointer;padding:0;text-align:left}.cost-preview-toggle:hover{color:var(--text-primary)}.cost-preview-toggle:focus-visible{outline:none;box-shadow:0 0 0 3px var(--accent-muted);border-radius:10px}.cost-preview-chevron{display:inline-flex;align-items:center;justify-content:center;transition:transform .15s ease;color:var(--text-muted)}.cost-preview-chevron.collapsed{transform:rotate(-90deg)}.cost-preview.collapsed{padding-bottom:10px}.cost-preview.collapsed .cost-preview-title{margin-bottom:0}.estimating-indicator{font-weight:400;color:var(--text-muted);font-style:italic}.cost-row{display:flex;justify-content:space-between;padding:4px 0;color:var(--text-secondary)}.cost-row strong{color:var(--text-primary)}.cost-row-total{border-top:1px solid var(--stroke);margin-top:4px;padding-top:8px;font-weight:500}.heuristic-hint{color:var(--accent);cursor:help;margin-left:2px}.cost-hint{margin-top:8px;padding-top:8px;border-top:1px dashed var(--stroke);font-size:10px;color:var(--text-muted)}.cost-row-tokens{color:var(--text-muted);font-weight:450}.output-panel{display:flex;flex-direction:column;background:var(--bg);min-height:0}.output-header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 20px;border-bottom:1px solid var(--stroke);background:var(--surface);flex-wrap:wrap}@media (max-width:768px){.output-header{padding:10px 12px;background:transparent;border-bottom:1px solid var(--stroke)}}.output-tabs-wrapper{position:relative;flex:1 1;min-width:0}.output-tabs{display:flex;gap:8px;flex-wrap:wrap;align-items:center}.output-tabs-empty{font-size:12px;color:var(--text-muted);font-style:italic}.output-tab{display:flex;align-items:center;padding:6px 12px;border-radius:999px;font-size:12px;font-weight:500;color:var(--text-secondary);background:transparent;border:1px solid transparent;transition:all .15s ease;cursor:pointer;position:relative}.output-tab:hover{background:var(--surface-muted)}.output-tab.active{background:var(--accent);color:#fff}@media (max-width:768px){.output-tabs-wrapper{position:relative;overflow:hidden;mask-image:linear-gradient(90deg,#000 calc(100% - 40px),transparent);-webkit-mask-image:linear-gradient(90deg,#000 calc(100% - 40px),transparent)}.output-tabs{gap:6px;overflow-x:auto;-webkit-overflow-scrolling:touch;scrollbar-width:none;flex-wrap:nowrap;padding-right:40px}.output-tabs::-webkit-scrollbar{display:none}.output-tab{padding:8px 14px;font-size:13px;white-space:nowrap;border-bottom:2px solid transparent}.output-tab.active{background:transparent;color:var(--accent);border-bottom-color:var(--accent)}.output-tab-close{opacity:1!important;transform:scale(1)!important}}.output-tab.split-active{background:var(--surface-muted);border-color:var(--accent)}.output-tab.generating{border-color:var(--accent);animation:pulse 1.5s ease-in-out infinite}@keyframes pulse{0%,to{opacity:.7}50%{opacity:1}}.output-tab-label{white-space:nowrap}.output-tab-close{position:absolute;top:-6px;right:-6px;--tab-close-size:clamp(18px,2.2vw,24px);width:var(--tab-close-size);height:var(--tab-close-size);display:flex;align-items:center;justify-content:center;border-radius:50%;background:#dc2626;color:#fff;opacity:0;transform:scale(.7);transition:opacity .15s ease,transform .15s ease,background .15s ease;flex-shrink:0;box-shadow:0 1px 3px rgba(0,0,0,.2)}.output-tab-close svg{width:calc(var(--tab-close-size) * .6);height:calc(var(--tab-close-size) * .6)}.output-tab:hover .output-tab-close{opacity:1;transform:scale(1)}.output-tab-close:hover{background:#b91c1c;transform:scale(1.1)!important}@media (hover:none) and (pointer:coarse){.output-tab-close{opacity:1;transform:scale(1)}}.output-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap;justify-content:flex-end}@media (max-width:768px){.output-actions{gap:6px}}.export-actions-group{display:flex;gap:4px}.subject-btn{max-width:260px;overflow:hidden;text-overflow:ellipsis}.subject-picker-overlay{position:fixed;inset:0;z-index:220;display:flex;align-items:center;justify-content:center;padding:16px}.subject-picker-backdrop{position:absolute;inset:0;background:rgba(0,0,0,.45)}.subject-picker{position:relative;width:min(520px,100%);height:min(720px,calc(100vh - 32px));display:flex;flex-direction:column;border-radius:16px;border:1px solid var(--stroke);background:var(--surface);box-shadow:var(--shadow);overflow:hidden}@media (max-width:480px){.subject-picker{width:100%;height:100vh;border-radius:0;border:none;box-shadow:none}.subject-picker-overlay{padding:0}}.subject-picker-header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 14px 10px;border-bottom:1px solid var(--stroke)}.subject-picker-title{font-size:13px;font-weight:650}.subject-picker-search{padding:12px 14px;border-bottom:1px solid var(--stroke);background:var(--surface)}.subject-picker-search input{width:100%;padding:10px 12px;border-radius:var(--radius-sm);border:1px solid var(--stroke);background:var(--input-bg)}.subject-picker-search input:focus{outline:none;border-color:var(--accent)}.subject-picker-list{flex:1 1;overflow-y:auto;padding:10px;display:flex;flex-direction:column;gap:6px}.subject-picker-item{width:100%;text-align:left;padding:12px;border-radius:12px;border:1px solid var(--stroke);background:var(--surface);color:var(--text-primary)}.subject-picker-item:hover{background:var(--surface-muted)}.subject-picker-item.active{border-color:rgba(0,0,0,.06);background:var(--accent-muted)}.subject-picker-empty{padding:16px;color:var(--text-muted);font-size:13px}.confirm-overlay{position:fixed;inset:0;z-index:230;display:flex;align-items:center;justify-content:center;padding:16px}.confirm-backdrop{position:absolute;inset:0;background:rgba(0,0,0,.5)}.confirm-modal{position:relative;width:min(520px,100%);border-radius:16px;border:1px solid var(--stroke);background:var(--surface);box-shadow:var(--shadow);padding:16px}@media (max-width:480px){.confirm-modal{width:calc(100% - 32px);border-radius:12px;padding:14px;box-shadow:none}.confirm-actions{flex-direction:column;gap:8px}.confirm-actions .btn{width:100%;min-height:44px}}.confirm-title{font-size:14px;font-weight:700;margin-bottom:8px}.confirm-body{color:var(--text-secondary);font-size:13px;line-height:1.5}.confirm-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:14px}.toast-container{position:fixed;top:16px;right:16px;z-index:200;display:flex;flex-direction:column;gap:8px;max-width:400px;pointer-events:none}.toast{display:flex;align-items:center;gap:12px;padding:12px 16px;border-radius:var(--radius-sm);border:1px solid var(--stroke);background:var(--surface);box-shadow:var(--shadow);pointer-events:auto;animation:toast-slide-in .2s ease-out}@keyframes toast-slide-in{0%{transform:translateX(100%);opacity:0}to{transform:translateX(0);opacity:1}}.toast-content{flex:1 1;min-width:0}.toast-message{font-size:13px;line-height:1.4;color:var(--text-primary)}.toast-close{flex-shrink:0;width:20px;height:20px;display:flex;align-items:center;justify-content:center;border-radius:4px;color:var(--text-muted);transition:background .15s ease,color .15s ease}.toast-close:hover{background:var(--surface-muted);color:var(--text-primary)}.toast-success{border-left:3px solid var(--success)}.toast-error{border-left:3px solid var(--error-text)}.toast-info{border-left:3px solid var(--accent)}.toast-warning{border-left:3px solid var(--warning)}@media (max-width:768px){.toast-container{top:12px;right:12px;left:12px;max-width:none}.toast{padding:10px 14px}}.export-progress{display:flex;align-items:center;gap:8px;padding:6px 12px;border-radius:var(--radius-sm);background:var(--surface-muted);border:1px solid var(--stroke);font-size:12px}.export-progress-text{white-space:nowrap;color:var(--text-secondary);font-weight:500}.export-progress-bar{width:60px;height:4px;background:var(--stroke);border-radius:2px;overflow:hidden}.export-progress-fill{height:100%;background:var(--accent);border-radius:2px;transition:width .2s ease}.preview-container{flex:1 1;display:flex;flex-direction:column;min-height:0;overflow:hidden}.preview-container.split-view{flex-direction:row}.preview{flex:1 1;overflow-y:auto;padding:20px;position:relative}@media (max-width:768px){.preview{padding:16px}.markdown-content h1{font-size:20px;margin-top:16px}.markdown-content h2{font-size:16px;margin-top:14px}.markdown-content h3{font-size:14px;margin-top:12px}.markdown-content p{margin:6px 0}}.preview-container.split-view .preview{flex:1 1;min-width:0}.preview-container.split-view .preview-second{border-left:1px solid var(--stroke)}.preview-toolbar{position:absolute;top:12px;right:12px;display:flex;align-items:center;gap:4px;z-index:10}@media (max-width:768px){.preview-toolbar{top:8px;right:8px;gap:6px}.preview-toolbar .icon-btn{width:40px;height:40px;background:var(--surface)!important;border:1px solid var(--stroke)!important;box-shadow:var(--shadow-sm)!important;opacity:1!important}}.preview-label{font-weight:500;color:var(--text-secondary);margin-right:4px}.preview-label,.preview-model-label{font-size:11px;padding:4px 8px;background:var(--surface-muted);border-radius:var(--radius-sm)}.preview-model-label{position:absolute;top:12px;left:12px;font-weight:600;color:var(--text-muted);z-index:10}.preview-container.split-view .preview .markdown-content{padding-top:28px}.icon-btn-close:hover{background:rgba(220,38,38,.1)!important;border-color:rgba(220,38,38,.3)!important;color:#dc2626!important}.preview-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;color:var(--text-muted);font-size:14px;gap:8px;padding:48px 24px;text-align:center}.preview-empty:before{content:"📄";font-size:48px;opacity:.5;margin-bottom:8px}.markdown-content h1,.markdown-content h2,.markdown-content h3{margin-top:20px;margin-bottom:8px}.markdown-content h1:first-child,.markdown-content h2:first-child,.markdown-content h3:first-child{margin-top:0}.markdown-content h1{font-size:24px}.markdown-content h2{font-size:18px}.markdown-content h3{font-size:15px}.markdown-content{overflow-wrap:anywhere}.markdown-content p{margin:8px 0;line-height:1.6}.markdown-content ol,.markdown-content ul{margin:8px 0;padding-left:20px}.markdown-content li{margin:4px 0}.markdown-content blockquote{margin:12px 0;padding:10px 14px;border-left:3px solid var(--accent);background:var(--accent-muted);border-radius:0 var(--radius-sm) var(--radius-sm) 0}.markdown-content code{background:var(--surface-muted);padding:2px 6px;border-radius:4px;font-size:13px;font-family:SF Mono,Fira Code,monospace}.markdown-content pre{background:var(--bg-muted);padding:14px;border-radius:var(--radius-sm);overflow-x:auto;margin:12px 0;-webkit-overflow-scrolling:touch}.markdown-content pre code{background:none;padding:0}.markdown-content table{width:100%;border-collapse:collapse;margin:12px 0;font-size:13px;display:block;overflow-x:auto;-webkit-overflow-scrolling:touch}.markdown-content td,.markdown-content th{border:1px solid var(--stroke);padding:8px 10px;text-align:left}.markdown-content th{background:var(--surface-muted);font-weight:600}.markdown-editor{flex:1 1;display:flex;flex-direction:column;min-height:0;position:relative}.preview-container.split-view .markdown-editor{border-left:1px solid var(--stroke);position:relative}.markdown-editor .preview-model-label{position:absolute;top:12px;left:12px}.markdown-editor textarea{flex:1 1;width:100%;padding:20px;border:none;background:var(--surface);color:var(--text-primary);font-family:SF Mono,Fira Code,monospace;font-size:13px;line-height:1.6;resize:none}.markdown-editor textarea:focus{outline:none}.refine-bar{display:flex;gap:8px;padding:12px 20px;border-top:1px solid var(--stroke);background:var(--surface)}@media (max-width:768px){.refine-bar{padding:12px;background:var(--surface);border-top:1px solid var(--stroke);position:fixed;bottom:0;left:0;right:0;z-index:50;box-shadow:0 -4px 12px rgba(0,0,0,.1);transition:transform .3s ease;display:flex;gap:8px;align-items:center}.refine-bar,.refine-bar.refine-bar-hidden{transform:translateY(100%)}.refine-bar:not(.refine-bar-hidden){transform:translateY(0)}.refine-bar:not(.refine-bar-hidden)~.refine-float-btn{display:none!important}.refine-bar-close{width:32px;height:32px;display:flex;align-items:center;justify-content:center;border-radius:var(--radius-sm);border:1px solid var(--stroke);background:var(--surface-muted);color:var(--text-secondary);cursor:pointer;flex-shrink:0;transition:background .15s ease,border-color .15s ease}.refine-bar-close:active,.refine-bar-close:hover{background:var(--surface);border-color:var(--stroke-strong);color:var(--text-primary)}.refine-bar input{padding:12px 14px;font-size:14px;flex:1 1}.refine-float-btn{position:fixed;bottom:20px;right:20px;width:56px;height:56px;border-radius:50%;background:var(--accent);color:#fff;border:none;box-shadow:0 4px 12px rgba(0,0,0,.2);display:flex;align-items:center;justify-content:center;z-index:40;cursor:pointer;transition:opacity .3s ease,transform .3s ease,box-shadow .2s ease}.refine-float-btn:active{transform:scale(.95)}}.refine-bar input{flex:1 1;padding:10px 14px;border-radius:var(--radius-sm);border:1px solid var(--stroke);background:var(--input-bg);color:var(--text-primary)}.refine-bar input:focus{outline:none;border-color:var(--accent)}.bottom-actions{display:flex;gap:8px;padding:12px 20px;border-top:1px solid var(--stroke);background:var(--surface)}.btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:10px 16px;border-radius:var(--radius-sm);font-size:13px;font-weight:500;transition:all .15s ease;white-space:nowrap}.btn-primary{background:var(--accent);color:#fff;border:1px solid var(--accent)}.btn-primary:hover:not(:disabled){background:var(--accent-hover);border-color:var(--accent-hover)}@media (max-width:768px){.btn-primary{padding:12px 20px;border-radius:10px;box-shadow:none}}.btn-secondary{background:var(--surface);color:var(--text-primary);border:1px solid var(--stroke)}.btn-secondary:hover:not(:disabled){background:var(--surface-muted);border-color:var(--stroke-strong)}@media (max-width:768px){.btn-secondary{padding:12px 20px;border-radius:10px;background:var(--bg);border:none}.btn-secondary:hover:not(:disabled){background:var(--surface-muted)}}.btn-danger{background:var(--error-text);color:#fff}.btn-danger:hover:not(:disabled){filter:brightness(.95)}.btn:disabled{opacity:.5;cursor:not-allowed}.btn-sm{padding:6px 10px;font-size:12px}.btn-xs{padding:5px 8px;font-size:12px}.export-menu{position:relative;display:inline-flex}.export-menu-panel{position:absolute;right:0;top:calc(100% + 6px);min-width:160px;background:var(--surface);border:1px solid var(--stroke);border-radius:var(--radius-sm);box-shadow:var(--shadow);padding:6px;z-index:50}.export-menu-item{width:100%;text-align:left;padding:8px 10px;border-radius:8px;background:transparent;border:1px solid transparent;color:var(--text-primary);font-size:12px;cursor:pointer}.export-menu-item:hover{background:var(--surface-muted);border-color:var(--stroke)}.error-display{padding:20px;background:var(--error-bg);border:1px solid var(--error-text);border-radius:var(--radius);margin:20px}.error-display .error-message{color:var(--error-text);margin-bottom:12px;line-height:1.6}.error-display .error-suggestion{color:var(--text-secondary);margin-top:8px;margin-bottom:12px;padding:8px 12px;background:var(--surface-muted);border-left:3px solid var(--accent);border-radius:var(--radius-sm);font-size:13px;line-height:1.5}.error-display .btn{margin-top:8px}.cache-badge{display:inline-flex;align-items:center;gap:4px;padding:4px 8px;background:var(--accent-muted);color:var(--accent);border-radius:6px;font-size:11px;font-weight:600;margin-bottom:12px}.cache-indicator{margin-left:6px;opacity:.7;font-size:12px}.error-retry-indicator{margin-left:6px;opacity:.8;font-size:12px}.modal-backdrop{position:fixed;inset:0;background:rgba(0,0,0,.4);z-index:100}.modal{position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);width:90%;max-width:500px;max-height:90vh;background:var(--surface);border:1px solid var(--stroke);border-radius:var(--radius);box-shadow:var(--shadow);z-index:101;display:flex;flex-direction:column;overflow:hidden}.modal-header{display:flex;align-items:center;justify-content:space-between;padding:20px;border-bottom:1px solid var(--stroke)}.modal-header h2{font-size:18px;font-weight:600;margin:0}.modal-content{flex:1 1;overflow-y:auto;padding:20px}.modal-footer{display:flex;align-items:center;justify-content:flex-end;gap:10px;padding:20px;border-top:1px solid var(--stroke)}.field-hint{font-size:12px;color:var(--text-muted);margin-top:6px;line-height:1.4}.login-prompt-banner{position:relative;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 16px;margin:0 24px 16px;background:var(--accent-muted);border:1px solid var(--accent);border-radius:var(--radius-sm);font-size:13px;color:var(--text-primary)}.login-prompt-content{display:flex;align-items:center;gap:12px;flex:1 1}.login-prompt-text{color:var(--text-primary);font-size:13px;line-height:1.4}.login-prompt-close{width:20px;height:20px;display:flex;align-items:center;justify-content:center;border-radius:var(--radius-sm);color:var(--text-secondary);cursor:pointer;transition:background .15s ease,color .15s ease;flex-shrink:0}.login-prompt-close:hover{background:var(--surface-muted);color:var(--text-primary)}@media (max-width:768px){.login-prompt-banner{margin:0 12px 12px;padding:10px 12px}.login-prompt-banner,.login-prompt-content{flex-direction:column;align-items:flex-start;gap:10px}.login-prompt-content{width:100%}.login-prompt-close{position:absolute;top:10px;right:10px}}.error-banner{padding:10px 14px;margin:12px 20px;border-radius:var(--radius-sm);background:var(--error-bg);border:1px solid rgba(185,28,28,.2);color:var(--error-text);font-size:13px}.settings-page{min-height:100vh;display:flex;flex-direction:column;background:var(--bg)}.settings-shell{flex:1 1;display:grid;grid-template-columns:300px 1fr;max-width:1400px;width:100%;margin:0 auto;min-height:0}@media (max-width:900px){.settings-shell{grid-template-columns:1fr;grid-template-rows:auto 1fr}.settings-sidebar{padding:16px;border-bottom:1px solid var(--stroke);background:var(--surface)}.settings-sidebar-profile{flex-direction:row;align-items:center;gap:12px}.settings-sidebar-profile .settings-avatar-large{width:48px;height:48px}.settings-sidebar-profile .settings-avatar-placeholder{font-size:18px}.settings-sidebar-usage{margin-top:12px;padding-top:12px;border-top:1px solid var(--stroke)}}.settings-sidebar{background:transparent;border:none;display:flex;flex-direction:column;overflow-y:auto;padding:0 12px 24px}.settings-back-link{display:inline-flex;align-items:center;gap:6px;font-size:13px;text-decoration:none;padding:8px 12px;border-radius:var(--radius-sm);border:1px solid var(--stroke);background:var(--surface)}.settings-back-link:focus-visible,.settings-back-link:hover{color:var(--text-primary);background:var(--surface-muted);border-color:var(--stroke-strong);outline:none}.settings-sidebar-card{border:1px solid var(--stroke);background:var(--surface);border-radius:var(--radius);padding:18px;box-shadow:var(--shadow);display:flex;flex-direction:column;gap:10px}.settings-avatar{width:56px;height:56px;border-radius:16px;background:var(--accent-muted);color:var(--accent);display:inline-flex;align-items:center;justify-content:center;font-weight:700;font-size:22px}.settings-sidebar-title{font-weight:600;color:var(--text-primary)}.settings-sidebar-subtitle{font-size:12px;color:var(--text-muted)}.settings-sidebar-divider{height:1px;background:var(--stroke);margin:6px 0}.settings-metric{display:flex;align-items:baseline;justify-content:space-between;gap:12px;font-size:13px;color:var(--text-secondary)}.settings-metric strong{color:var(--text-primary);font-size:13px}.settings-main{display:flex;flex-direction:column;overflow-y:auto;background:transparent;padding:0 48px 48px 0}@media (max-width:768px){.settings-main{padding:0 16px 24px}.settings-content{gap:16px}}.settings-header-bar{height:64px;background:transparent;display:flex;align-items:center;justify-content:space-between;padding:0 48px;flex-shrink:0;z-index:10}@media (max-width:768px){.settings-header-bar{height:56px;padding:0 16px}}.settings-tabs-horizontal{display:flex;align-items:center;gap:6px;margin-bottom:32px;overflow-x:auto;padding:4px;background:var(--surface-muted);border-radius:var(--radius);border:1px solid var(--stroke)}.settings-tab-horizontal{padding:10px 18px;border-radius:var(--radius-sm);display:inline-flex;align-items:center;justify-content:center;color:var(--text-secondary);font-size:13px;font-weight:500;transition:all .2s ease;border:1px solid transparent;background:transparent;cursor:pointer;white-space:nowrap;position:relative}@media (max-width:768px){.settings-tabs-horizontal{overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch;scrollbar-width:none;padding:4px;margin-bottom:12px;display:flex;flex-wrap:nowrap;gap:4px;border-radius:var(--radius-sm)}.settings-tabs-horizontal::-webkit-scrollbar{display:none}.settings-tab-horizontal{padding:10px 14px;font-size:13px;white-space:nowrap;flex-shrink:0}.settings-tab-horizontal.active{background:var(--surface);border-color:var(--stroke-strong);color:var(--text-primary);box-shadow:0 1px 3px rgba(0,0,0,.1)}}.settings-tab-horizontal:hover{background:var(--surface);color:var(--text-primary);border-color:var(--stroke)}.settings-tab-horizontal.active{background:var(--surface);color:var(--text-primary);font-weight:600;border-color:var(--stroke-strong);box-shadow:0 1px 3px rgba(0,0,0,.08)}.settings-tab-horizontal.active:after{content:"";position:absolute;bottom:-4px;left:50%;transform:translateX(-50%);width:20px;height:3px;background:var(--accent);border-radius:2px}@media (max-width:768px){.settings-tab-horizontal.active:after{bottom:-2px;width:16px;height:2px}}.settings-sidebar-profile{display:flex;flex-direction:column;align-items:center;text-align:center;margin-bottom:48px;padding:24px 16px;background:var(--surface);border-radius:var(--radius);border:1px solid var(--stroke)}.settings-sidebar-profile .settings-avatar-large{margin-bottom:12px;width:80px;height:80px;border-width:3px}.settings-sidebar-profile .settings-avatar-placeholder{font-size:32px}.settings-sidebar-profile .settings-profile-name{font-size:16px;font-weight:600;margin-bottom:8px;color:var(--text-primary)}.settings-sidebar-profile .tier-badge{font-size:11px;padding:4px 12px}.settings-sidebar-usage{margin-bottom:24px;padding:16px;background:var(--surface);border-radius:var(--radius);border:1px solid var(--stroke)}.settings-usage-header{margin-bottom:12px}.settings-usage-label{font-size:12px;font-weight:600;color:var(--text-secondary);text-transform:uppercase;letter-spacing:.5px}.settings-usage-count{font-size:16px;font-weight:700;color:var(--text-primary)}.settings-usage-progress-container{height:8px;background:var(--surface-muted);border-radius:4px;overflow:hidden;margin-bottom:8px}.settings-usage-progress-bar{height:100%;border-radius:4px;transition:width .3s ease,background-color .3s ease}.settings-usage-warning{font-size:.875rem}.settings-usage-reset{font-size:.75rem;color:var(--text-secondary)}.usage-bar-container{height:6px;background:var(--surface-muted);border-radius:3px;overflow:hidden;margin-top:8px;margin-bottom:12px}.usage-bar-fill{height:100%;border-radius:3px;transition:width .3s ease}.usage-bar-fill.standard{background:var(--accent)}.usage-bar-fill.premium{background:#ec4899}.settings-buy-credits-btn{width:100%;margin-top:16px;background:#ec4899;color:#fff;border:none;padding:10px;border-radius:var(--radius-sm);font-size:13px;font-weight:600;cursor:pointer;transition:opacity .15s}.settings-buy-credits-btn:hover{opacity:.9}.settings-buy-credits-btn.accent{background:var(--accent);color:#fff}.settings-back-link{color:var(--text-secondary);font-weight:500}.settings-sign-out-btn{font-size:12px;color:var(--text-secondary);opacity:.6}.settings-sign-out-btn:disabled{opacity:.4}.settings-avatar-large{margin-bottom:12px;box-shadow:0 4px 12px rgba(0,0,0,.2);font-size:24px;background:var(--accent-muted);color:var(--accent);display:flex;align-items:center;justify-content:center;font-weight:700;width:64px;height:64px;border-radius:50%;overflow:hidden;background:var(--surface-muted);border:2px solid var(--stroke);flex-shrink:0}.settings-avatar-large img{width:100%;height:100%;object-fit:cover}.settings-avatar-placeholder{width:100%;height:100%;display:flex;align-items:center;justify-content:center;font-size:24px;font-weight:600;color:var(--text-secondary);background:var(--surface-muted)}.settings-avatar-initial{width:100%;height:100%}.settings-profile-header{display:flex;align-items:center;gap:16px;padding:8px 0 16px}.settings-profile-info{display:flex;flex-direction:column;min-width:0;flex:1 1}.settings-profile-name{font-size:18px;font-weight:700;margin:0 0 2px;color:var(--text-primary)}.settings-profile-email{font-size:12px;color:var(--text-secondary);margin:0 0 12px;overflow:hidden;text-overflow:ellipsis;width:100%}.settings-tier-badge-inline{font-size:11px;padding:2px 8px}.settings-usage-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}.settings-usage-title{font-size:12px;font-weight:700;color:var(--text-primary)}.settings-usage-subtitle{font-size:10px;color:var(--text-muted)}.settings-usage-metric{margin-bottom:16px}.settings-usage-metric:last-of-type{margin-bottom:20px}.settings-usage-metric-row{display:flex;justify-content:space-between;font-size:11px;margin-bottom:4px}.settings-usage-metric-label{font-weight:500;opacity:.8}.settings-usage-bar-wrapper{margin:4px 0}.settings-sidebar-footer{margin-top:auto;padding-top:24px}.settings-shortcuts-toggle{width:100%;display:flex;align-items:center;justify-content:space-between;padding:8px 0;background:transparent;border:none;color:var(--text-secondary);font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.5px;cursor:pointer;transition:color .15s ease}.settings-shortcuts-toggle:hover{color:var(--text-primary)}.settings-shortcuts-toggle-icon{transition:transform .2s ease;font-size:10px}.settings-shortcuts-toggle-icon.open{transform:rotate(180deg)}.settings-shortcuts-content{max-height:0;overflow:hidden;transition:max-height .3s ease}.settings-shortcuts-content.open{max-height:500px}.settings-shortcut{color:var(--text-secondary)}.settings-shortcut kbd{background:transparent;font-size:10px}.settings-card-title{font-size:16px;margin-bottom:16px}.field-value-input{width:100%;background:transparent;border:none;padding:0;color:inherit}.field-value-muted{opacity:.7}.settings-section-header-spaced{margin-top:32px}.settings-textarea{width:100%;min-height:120px;background:var(--surface-muted);border:1px solid var(--stroke);border-radius:var(--radius-sm);padding:12px;color:inherit;font-size:14px}.field-hint-spaced{margin-top:8px}.field-hint-error{color:var(--error-text);margin-top:8px}.settings-card-danger{border:1px solid var(--error-text);background:transparent}.settings-delete-confirm{padding:12px;border:1px dashed var(--error-text);border-radius:var(--radius-sm);background:var(--error-bg)}.settings-delete-confirm .settings-row{gap:12px}.settings-notice{display:flex;flex-direction:column;gap:8px;padding:10px 12px;border-radius:var(--radius-sm);border:1px solid var(--stroke);background:var(--surface);font-size:13px}.settings-notice.success{border-color:color-mix(in srgb,var(--success-text) 40%,transparent);background:color-mix(in srgb,var(--success-bg) 75%,var(--surface));color:var(--success-text)}.settings-notice.error{border-color:color-mix(in srgb,var(--error-text) 40%,transparent);background:color-mix(in srgb,var(--error-bg) 70%,var(--surface));color:var(--error-text)}.settings-notice.warning{border-color:color-mix(in srgb,#d97706 46%,var(--stroke));background:color-mix(in srgb,#facc15 14%,var(--surface));color:var(--text-primary)}.settings-notice.warning strong{font-weight:800}.settings-notice-action{color:inherit;font-weight:600;text-decoration:underline;text-underline-offset:3px}.settings-section{display:flex;flex-direction:column;gap:10px;padding-top:0}.settings-section-header h2{margin:0 0 8px;font-size:22px}@media (max-width:768px){.settings-section-header h2{font-size:16px}.settings-section-header p{font-size:12px}.settings-section{gap:12px;padding-top:0}}.settings-section-header p{margin:4px 0 0;color:var(--text-secondary);font-size:13px}.settings-card{border:1px solid var(--stroke);background:var(--surface);border-radius:var(--radius);padding:18px;box-shadow:var(--shadow);display:flex;flex-direction:column;gap:14px}@media (max-width:768px){.settings-card{padding:14px;box-shadow:none;border:1px solid var(--stroke);background:transparent}.settings-card-title{font-size:14px}}.settings-card-split{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-gap:14px;gap:14px}.settings-card-block{border:1px solid var(--stroke);border-radius:var(--radius-sm);padding:14px;background:var(--surface-muted);display:flex;flex-direction:column;gap:8px}.settings-card-title{font-weight:600;color:var(--text-primary)}.settings-card-copy{margin:0;color:var(--text-secondary);font-size:13px;line-height:1.5}.settings-row{display:flex;flex-wrap:wrap;gap:8px}.settings-textarea{min-height:140px;resize:vertical}.settings-hidden-input{display:none}.hint{font-size:12px;color:var(--text-muted)}@media (max-width:768px){.mobile-only{display:block}.desktop-only{display:none}.touch-target{min-height:44px;min-width:44px}.text-mobile-sm{font-size:11px}.text-mobile-base{font-size:13px}}@media (min-width:769px){.mobile-only{display:none}.desktop-only{display:block}}@media (max-width:1000px){.settings-shell{grid-template-columns:240px 1fr}}@media (max-width:800px){.settings-shell{grid-template-columns:1fr}.settings-sidebar{border-right:none;border-bottom:1px solid var(--stroke);padding:16px;height:auto;overflow-y:visible;background:transparent}.settings-sidebar-footer{display:none}.settings-sidebar-profile{flex-direction:row;align-items:center;text-align:left;gap:16px;padding-bottom:16px;margin-bottom:16px}.settings-sidebar-profile .settings-avatar{width:60px!important;height:60px!important;margin-bottom:0!important;font-size:24px!important}.settings-sidebar-usage{display:none}}@media (min-width:769px){.status-text{display:inline}.stats-content{display:block}.bottom-actions{display:none}}@media (max-width:768px){body,html{overflow-x:hidden}.app,.content,.main{width:100%;max-width:100%}.settings-page{padding:12px 0 24px}.settings-back-link{font-size:15px;font-weight:700;color:var(--text-primary)}.settings-header{flex-direction:column;align-items:stretch}.settings-actions,.settings-tabs{width:100%}.settings-card-split{grid-template-columns:1fr}.settings-card{padding:14px}.settings-sidebar{padding:0 16px;border:none}.settings-section-header{margin:0}.settings-section-header h2{font-size:18px;margin:0}.settings-tabs-horizontal{overflow-x:auto;-webkit-overflow-scrolling:touch;scrollbar-width:none;padding-bottom:2px}.settings-tabs-horizontal::-webkit-scrollbar{display:none}.settings-tab-horizontal{min-width:auto;padding:10px 14px;font-size:13px;white-space:nowrap}.field{margin-bottom:16px}.input-panel .field-structure,.subscription-current-plan-field{margin-bottom:0}.settings-tier-display{margin:0}.field-label{font-size:13px;margin-bottom:6px}.field-input,.settings-textarea{font-size:14px;padding:10px 12px;min-height:44px}.btn{min-height:44px;padding:10px 16px;font-size:14px}.btn-small{min-height:36px;padding:8px 12px;font-size:13px}.settings-row{flex-direction:column;gap:10px}.settings-row .btn{width:100%}.settings-toggle{gap:10px}.settings-toggle input[type=checkbox]{min-width:44px;min-height:44px}.mode-select{width:100%;border-radius:999px}.top-toolbar{padding:8px 12px}.content{grid-template-columns:1fr;grid-template-rows:minmax(260px,42vh) 1fr}.content.content-mobile{display:block;position:relative;overflow-x:hidden;overflow-y:visible}.content.content-mobile .input-panel,.content.content-mobile .output-panel{position:absolute;inset:0;width:100%;height:100%;transition:transform .22s ease,opacity .22s ease;will-change:transform;overflow-y:auto;overflow-x:hidden}.content.content-mobile.view-input .input-panel{transform:translateX(0);opacity:1;pointer-events:auto}.content.content-mobile.view-input .output-panel{transform:translateX(100%);opacity:0;pointer-events:none}.content.content-mobile.view-output .input-panel{transform:translateX(-100%);opacity:0;pointer-events:none}.content.content-mobile.view-output .output-panel{transform:translateX(0);opacity:1;pointer-events:auto}.input-panel{border-right:none;border-bottom:1px solid var(--stroke);height:100%}.input-panel-topbar{margin-bottom:0;padding:0}.mobile-actions{display:flex;gap:10px;margin-top:16px}.mobile-actions .btn{flex:1 1;min-height:48px;font-weight:600}.sidebar{width:100%;touch-action:pan-y}.header-title{font-size:18px}.preview-container.split-view{flex-direction:column}.preview-container.split-view .preview-second{border-left:none;border-top:1px solid var(--stroke)}.markdown-editor textarea{min-height:55vh}.footer{padding:10px 16px}.footer-text{display:none}.footer-inner{justify-content:center}}@media (max-width:480px){.header{padding:10px 16px}.header.header-compact{padding:7px 12px}.header-title{font-size:20px}.activity-bar{padding:8px 12px}.activity-bar-row{margin-bottom:6px}}.benchmark-container{padding:2rem;max-width:1600px;margin:0 auto}.benchmark-header{margin-bottom:1rem}.benchmark-subtitle{color:var(--text-secondary);margin:0 0 1.25rem;max-width:72ch}.benchmark-controls{position:-webkit-sticky;position:sticky;top:0;z-index:10;background:var(--bg);padding:.75rem 0 1rem;margin-bottom:1.5rem;border-bottom:1px solid var(--stroke)}.benchmark-controls-row{gap:.75rem}.benchmark-controls-row,.benchmark-segment{display:flex;align-items:flex-end;flex-wrap:wrap}.benchmark-segment{gap:.5rem}.benchmark-control{display:flex;flex-direction:column;gap:.35rem;min-width:160px}.benchmark-control-inline{min-width:220px}.benchmark-control-grow{flex:1 1 240px;min-width:220px}.benchmark-control-label{font-size:.85rem;color:var(--text-secondary)}.benchmark-control-input{padding:.55rem .65rem;border:1px solid var(--stroke);border-radius:var(--radius-sm);background:var(--surface);color:var(--text-primary)}.benchmark-control-input:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.benchmark-control-button{padding:.55rem .75rem;border:1px solid var(--stroke);border-radius:var(--radius-sm);background:var(--surface);color:var(--text-primary);cursor:pointer;height:38px}.benchmark-control-button:hover{background:var(--bg-muted)}.benchmark-control-button:disabled{opacity:.6;cursor:not-allowed}.benchmark-kpi-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));grid-gap:.75rem;gap:.75rem;margin-top:.75rem}.benchmark-kpi{background:var(--surface);border:1px solid var(--stroke);border-radius:var(--radius);padding:.75rem 1rem}.benchmark-kpi-label{font-size:.85rem;color:var(--text-secondary)}.benchmark-kpi-value{font-weight:700;font-size:1.15rem;margin-top:.25rem}.benchmark-section{margin-bottom:2rem}.benchmark-section-header{display:flex;align-items:baseline;justify-content:space-between;gap:1rem;flex-wrap:wrap;margin-bottom:.75rem}.benchmark-table{width:100%;border-collapse:collapse;background:var(--surface);border-radius:var(--radius);overflow:hidden}.benchmark-table-compact td,.benchmark-table-compact th{padding:10px;font-size:.9rem}.benchmark-table thead tr{background:var(--accent);color:#fff}.benchmark-table td,.benchmark-table th{padding:12px;text-align:left}.benchmark-table th{text-align:left}.benchmark-table tbody tr{border-bottom:1px solid var(--stroke)}.benchmark-table tbody tr[role=button]{cursor:pointer}.benchmark-table tbody tr:hover{background:var(--bg-muted)}.benchmark-table tbody tr[tabindex="0"]:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}.benchmark-row-selected{background:var(--bg-muted)}.benchmark-th-right{text-align:right}.benchmark-td-right{text-align:right;white-space:nowrap}.benchmark-model-id{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:.92em}.benchmark-scorecell{display:flex;justify-content:flex-end;align-items:center;gap:.5rem}.benchmark-bar{width:90px;height:8px;border-radius:999px;border:1px solid var(--stroke);background:var(--surface-muted);overflow:hidden}.benchmark-bar-fill{height:100%;background:var(--accent)}.benchmark-empty-state{padding:1.25rem;border:1px solid var(--stroke);border-radius:var(--radius);background:var(--surface);color:var(--text-secondary)}.benchmark-empty-title{font-weight:600;color:var(--text-primary);margin-bottom:.25rem}.benchmark-empty-subtitle{font-size:.9rem}.benchmark-explorer-controls{display:flex;gap:.75rem;align-items:flex-end;flex-wrap:wrap;margin-bottom:.75rem}.benchmark-explorer-context{margin-left:auto}.benchmark-model-summary{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));grid-gap:.5rem 1rem;gap:.5rem 1rem;background:var(--surface);border:1px solid var(--stroke);border-radius:var(--radius);padding:.75rem 1rem;margin-bottom:.75rem}.benchmark-output{margin-top:.75rem}.benchmark-output-header{display:flex;justify-content:space-between;align-items:flex-start;gap:.75rem}.benchmark-output-title{font-weight:600}.benchmark-output-subtitle{font-size:.85rem;color:var(--text-secondary)}.benchmark-output-pre{margin:.75rem 0 0;padding:.75rem;border:1px solid var(--stroke);border-radius:var(--radius);background:var(--surface-muted);max-height:320px;overflow:auto;white-space:pre-wrap}.benchmark-card{background:var(--surface);padding:1.25rem;border-radius:var(--radius);border:1px solid var(--stroke)}.benchmark-button{padding:.75rem 1.5rem;border:none;background:var(--surface-muted);color:var(--text-primary);cursor:pointer;border-radius:var(--radius-sm) var(--radius-sm) 0 0;font-weight:400;text-transform:capitalize;transition:background .2s}.benchmark-segment .benchmark-button{border-radius:var(--radius-sm)}.benchmark-button:hover{background:var(--bg-muted)}.benchmark-button-active{background:var(--accent);color:#fff;font-weight:700}.benchmark-rank-badge{display:inline-block;padding:4px 8px;border-radius:var(--radius-sm);font-weight:700}.benchmark-rank-badge-gold{background:gold}.benchmark-rank-badge-silver{background:silver}.benchmark-rank-badge-bronze{background:#cd7f32}.benchmark-rank-badge-default{background:var(--surface-muted)}.benchmark-score-high{color:#27ae60;font-weight:700}.benchmark-score-medium{color:#f39c12;font-weight:700}.benchmark-score-low{color:#e74c3c;font-weight:700}.benchmark-topic-filter{display:flex;gap:.5rem;flex-wrap:wrap;margin-bottom:1rem}.benchmark-topic-filter-label{padding:.5rem;font-weight:600}.benchmark-topic-button{padding:.5rem 1rem;border:1px solid var(--stroke);background:var(--surface);color:var(--text-primary);cursor:pointer;border-radius:var(--radius-sm);transition:background .2s}.benchmark-topic-button:hover{background:var(--bg-muted)}.benchmark-topic-button-active{background:var(--accent);color:#fff}.benchmark-grid{display:grid;grid-gap:1rem;gap:1rem}.benchmark-grid-300,.benchmark-grid-auto{grid-template-columns:repeat(auto-fit,minmax(300px,1fr))}.benchmark-grid-400{grid-template-columns:repeat(auto-fit,minmax(400px,1fr))}.benchmark-task-section{border-left:4px solid var(--accent);padding-left:.75rem}.benchmark-task-title{margin:0 0 .5rem;text-transform:capitalize}.benchmark-metric-row{display:flex;justify-content:space-between;gap:.25rem;font-size:.9rem}.benchmark-metric-label{color:var(--text-secondary)}.benchmark-metric-value{font-weight:700}.benchmark-topic-card{border-left:3px solid var(--accent);padding-left:.75rem}.benchmark-topic-header{display:flex;justify-content:space-between;margin-bottom:.25rem}.benchmark-topic-stats{font-size:.85rem;color:var(--text-secondary)}.benchmark-divider{margin-top:.5rem;padding-top:.5rem;border-top:1px solid var(--stroke)}.benchmark-stats-text{font-size:.85rem;color:var(--text-secondary);margin-bottom:.25rem}@media (max-width:768px){.mode-select{padding:8px 34px 8px 12px}.mode-switch{width:100%;border-radius:999px}.input-panel{--panel-padding:12px;padding:12px}.preview{padding:16px}.bottom-actions,.refine-bar{padding:12px}.cost-preview{padding:10px;font-size:11px;background:transparent;border:1px solid var(--stroke)}.cost-preview-title{margin-bottom:6px}.cost-row{padding:2px 0}.cost-row-tokens{display:none}.markdown-editor textarea{min-height:60vh}.footer{padding:8px 12px}.footer-inner{justify-content:flex-end}.app:has(.output-tab.active) .footer-text{display:none}.footer-icon-btn{width:30px;height:30px;border-radius:9px}.footer-icon{width:18px;height:18px}.footer-tooltip{display:none}}@media (hover:none) and (pointer:coarse){.history-delete{opacity:1;width:32px;height:32px}.output-tab-close{opacity:1;transform:scale(1);width:24px;height:24px;top:-6px;right:-6px}}@media (max-width:768px){.output-tab-close{opacity:1!important;transform:scale(1)!important}.preview-toolbar .icon-btn{background:var(--surface)!important;border:1px solid var(--stroke)!important;box-shadow:var(--shadow-sm)!important}.refine-float-btn{transition:opacity .3s ease,transform .3s ease}.refine-bar:not(.refine-bar-hidden)+.refine-float-btn,.refine-bar:not(.refine-bar-hidden)~.refine-float-btn,.refine-float-btn.hidden{opacity:0;pointer-events:none;transform:scale(.8)}}@media (prefers-reduced-motion:reduce){*,:after,:before{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}.settings-content{display:flex;flex-direction:column;gap:24px}.settings-sidebar-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:16px}.settings-sidebar-actions{display:flex;gap:8px}.settings-avatar-img{width:64px;height:64px;border-radius:50%;object-fit:cover}.settings-avatar-initial{width:64px;height:64px;border-radius:50%;background:var(--accent);color:#fff;display:flex;align-items:center;justify-content:center;font-size:24px;font-weight:600}.settings-tier-badge{display:inline-block;padding:4px 12px;border-radius:999px;font-size:12px;font-weight:600;background:var(--surface-muted);color:var(--text-primary)}.settings-tier-badge[data-tier=free]{background:var(--surface-muted);color:var(--text-secondary)}.settings-tier-badge[data-tier=basic]{background:color-mix(in srgb,var(--accent) 15%,transparent);color:var(--accent)}.settings-tier-badge[data-tier=plus]{background:color-mix(in srgb,#8b5cf6 15%,transparent);color:#8b5cf6}.settings-tier-badge[data-tier=pro]{background:color-mix(in srgb,#f59e0b 15%,transparent);color:#f59e0b}.settings-tier-badge-large{display:inline-block;padding:8px 16px;font-weight:600}.settings-tier-display{margin:8px 0}.settings-stats-grid{grid-template-columns:repeat(auto-fit,minmax(150px,1fr));margin-top:12px}.settings-stat{display:flex;flex-direction:column;gap:4px}.settings-stat-label{font-size:12px;color:var(--text-secondary)}.settings-stat-value{font-size:20px;font-weight:600}.settings-benefits{display:flex;flex-direction:column;gap:8px;margin-top:8px}.settings-benefit{font-size:13px;color:var(--text-secondary)}.settings-benefit strong{color:var(--text-primary)}.settings-toggle{display:flex;align-items:center;gap:12px}.settings-toggle input[type=checkbox]{width:40px;height:24px;border-radius:12px;background:var(--surface-muted);border:1px solid var(--stroke);-webkit-appearance:none;-moz-appearance:none;appearance:none;position:relative;cursor:pointer;transition:background .2s}@media (max-width:768px){.settings-toggle input[type=checkbox]{width:48px;height:28px;min-width:48px;min-height:28px}.settings-toggle input[type=checkbox]:before{width:22px;height:22px}.settings-toggle input[type=checkbox]:checked:before{transform:translateX(20px)}}.settings-toggle input[type=checkbox]:checked{background:var(--accent);border-color:var(--accent)}.settings-toggle input[type=checkbox]:before{content:"";position:absolute;width:18px;height:18px;border-radius:50%;background:#fff;top:2px;left:2px;transition:transform .2s}.settings-toggle input[type=checkbox]:checked:before{transform:translateX(16px)}.settings-key-display{display:flex;align-items:center;justify-content:space-between;padding:12px;border:1px solid var(--stroke);border-radius:var(--radius-sm);background:var(--surface-muted)}.settings-key-status{display:flex;align-items:center;gap:8px;font-size:13px;color:var(--text-secondary)}.settings-key-status-indicator{width:8px;height:8px;border-radius:50%;background:var(--text-muted)}.settings-key-status-indicator.active{background:var(--success)}.settings-key-last-used{margin-left:8px;font-size:11px;color:var(--text-muted)}.settings-key-actions,.settings-key-input{display:flex;gap:8px}.settings-key-input{flex-direction:column}.settings-key-input-actions{display:flex;gap:8px}.settings-history-list{display:flex;flex-direction:column;gap:8px;margin-top:12px}.settings-history-item{display:flex;align-items:center;gap:12px;padding:12px;border:1px solid var(--stroke);border-radius:var(--radius-sm);background:var(--surface)}.settings-history-item-content{flex:1 1;display:flex;flex-direction:column;gap:4px}.settings-history-item-title{font-size:14px;font-weight:500;color:var(--text-primary)}.settings-history-item-meta{font-size:12px;color:var(--text-secondary)}.settings-models-list{display:flex;flex-direction:column;gap:8px;margin-top:12px}.settings-model-item{display:flex;align-items:center;justify-content:space-between;padding:12px;border:1px solid var(--stroke);border-radius:var(--radius-sm);background:var(--surface)}.settings-model-item.unavailable{opacity:.85;border-style:dashed;background:var(--bg-muted);position:relative;overflow:hidden}.settings-model-item.unavailable:after{content:"PREMIUM";position:absolute;top:10px;right:-25px;background:var(--accent);color:#fff;font-size:8px;font-weight:800;padding:2px 30px;transform:rotate(45deg);pointer-events:none;box-shadow:0 1px 4px rgba(0,0,0,.1)}.settings-model-info{display:flex;flex-direction:column;gap:4px}.settings-model-name{font-size:14px;font-weight:600;color:var(--text-primary)}.settings-model-meta{display:flex;gap:8px;font-size:12px;color:var(--text-secondary)}.settings-model-tier{padding:2px 6px;border-radius:4px;background:var(--surface-muted);font-size:11px;font-weight:500}.settings-model-tier[data-tier=pro]{background:#fef3c7;color:#92400e}.settings-model-tier[data-tier=plus]{background:#f5f3ff;color:#5b21b6}.settings-model-pricing{font-size:11px}.settings-model-unavailable-badge{font-size:11px;color:var(--text-muted);font-weight:500}.settings-model-upgrade-cta{display:flex;align-items:center;gap:12px}.settings-models-search{display:flex;align-items:center;gap:8px;padding:8px 12px;background:var(--surface);border:1px solid var(--stroke);border-radius:var(--radius-sm);margin-bottom:12px;position:relative}.settings-models-search:focus-within{border-color:var(--accent);box-shadow:0 0 0 2px var(--accent-muted)}.settings-search-icon{color:var(--text-muted);flex-shrink:0}.settings-search-input{flex:1 1;border:none;background:transparent;font-size:14px;color:var(--text-primary);outline:none}.settings-search-input::placeholder{color:var(--text-muted)}.settings-search-clear{display:flex;align-items:center;justify-content:center;padding:4px;border:none;background:transparent;color:var(--text-muted);cursor:pointer;border-radius:4px;transition:all .2s}.settings-search-clear:hover{background:var(--surface-muted);color:var(--text-secondary)}.settings-models-empty{padding:24px;text-align:center;color:var(--text-muted);font-size:14px;background:var(--surface);border:1px dashed var(--stroke);border-radius:var(--radius-sm)}.settings-model-header{display:flex;align-items:center;gap:8px;margin-bottom:2px}.settings-model-description{font-size:12px;color:var(--text-muted);line-height:1.4;margin-left:28px}.settings-theme-toggle{display:flex;gap:8px}.settings-divider{height:1px;background:var(--stroke);margin:8px 0}.settings-contact-form{display:flex;flex-direction:column;gap:16px}.settings-resources{display:flex;flex-direction:column;gap:8px;margin-top:8px}.settings-resource-link{color:var(--accent);text-decoration:none;font-size:13px}.settings-resource-link:hover{text-decoration:underline}.field-value{padding:8px 12px;border:1px solid var(--stroke);border-radius:var(--radius-sm);background:var(--surface-muted);font-size:14px;color:var(--text-primary)}@media (max-width:768px){.field-value{min-height:44px}.field-value,.settings-textarea{padding:12px 14px;font-size:14px}.settings-textarea{min-height:120px}}.field-value-mono{font-family:monospace;font-size:12px}.btn-danger,.field-label-danger{color:var(--error-text)}.btn-danger{background:var(--error-bg);border:1px solid var(--error-text)}.btn-danger:hover{background:var(--error-text);color:#fff}.btn-small{padding:6px 12px;font-size:12px}.btn-text{background:transparent;color:var(--text-secondary);border:none;padding:6px 12px}.btn-text:hover{color:var(--text-primary);background:var(--surface-muted)}@media (min-width:769px){.settings-header-bar .settings-back-link{font-size:14px;font-weight:700;color:var(--text-primary);border-color:var(--stroke-strong)}}.settings-sidebar-section-title{font-size:12px;font-weight:600;color:var(--text-secondary);text-transform:uppercase;letter-spacing:.5px;margin-bottom:8px}.settings-shortcut{display:flex;justify-content:space-between;align-items:center;padding:6px 0;font-size:12px}.settings-shortcut kbd{padding:2px 6px;border-radius:4px;background:var(--surface-muted);border:1px solid var(--stroke);font-size:11px;font-family:monospace}.dashboard-page{max-width:1200px;margin:0 auto;padding:48px 24px}.dashboard-header{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:32px}.dashboard-title{font-size:32px;margin:0 0 8px}.dashboard-subtitle{color:var(--text-secondary);font-size:14px;margin:0}.dashboard-controls{margin-bottom:24px}.dashboard-stats{display:flex;gap:24px;margin-bottom:32px}.dashboard-stat{padding:16px;border:1px solid var(--stroke);border-radius:var(--radius);background:var(--surface)}.dashboard-stat-label{font-size:12px;color:var(--text-secondary);margin-bottom:4px}.dashboard-stat-value{font-size:24px;font-weight:600;color:var(--text-primary)}.dashboard-documents{margin-top:24px}.dashboard-empty{text-align:center;padding:64px 24px;color:var(--text-secondary)}.dashboard-list{display:grid;grid-gap:16px;gap:16px}.dashboard-card{display:flex;justify-content:space-between;align-items:center;padding:16px;border:1px solid var(--stroke);border-radius:var(--radius);background:var(--surface)}.dashboard-card-content{flex:1 1}.dashboard-card-title{font-size:16px;font-weight:600;margin:0 0 4px;color:var(--text-primary)}.dashboard-card-meta{font-size:12px;color:var(--text-secondary);margin:0}.dashboard-card-actions{display:flex;gap:8px}.settings-link{color:var(--accent);text-decoration:none}.settings-link:hover{text-decoration:underline}.settings-instructions{margin:12px 0;padding-left:24px;color:var(--text-secondary);font-size:13px;line-height:1.6}.settings-instructions li{margin:8px 0}.settings-checkbox-row{margin:12px 0}.settings-checkbox-label{display:flex;align-items:center;gap:10px;font-size:14px;color:var(--text-primary);cursor:pointer}.settings-checkbox-label input[type=checkbox]{width:18px;height:18px;accent-color:var(--accent);cursor:pointer}.settings-checkbox-label input[type=checkbox]:disabled{opacity:.5;cursor:not-allowed}.settings-subscription-overview{display:flex;flex-direction:column;gap:16px;padding:20px;border:1px solid var(--stroke);border-radius:22px;background:linear-gradient(180deg,color-mix(in srgb,var(--surface) 92%,var(--accent-muted) 8%) 0,var(--surface) 100%);box-shadow:0 18px 36px -28px rgba(15,23,42,.45)}.settings-subscription-overview-main{display:flex;align-items:center;justify-content:space-between;gap:16px}.settings-subscription-overview-copy{display:flex;align-items:center;gap:16px;min-width:0}.settings-subscription-overview-text{min-width:0}.settings-subscription-overview-title{margin:0;font-size:15px;font-weight:600;color:var(--text-primary)}.settings-subscription-overview-subtitle{margin:4px 0 0;font-size:13px;color:var(--text-secondary)}.settings-subscription-notice{gap:4px;padding:12px 14px;line-height:1.45}.settings-subscription-overview-meta{display:flex;flex-wrap:wrap;gap:10px}.settings-subscription-pill{display:inline-flex;align-items:center;padding:8px 12px;border:1px solid var(--stroke);border-radius:999px;background:color-mix(in srgb,var(--surface-muted) 70%,transparent);font-size:12px;font-weight:600;color:var(--text-secondary)}.settings-tiers-comparison{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));grid-gap:14px;gap:14px;margin-top:16px}.settings-tier-card-flip{perspective:900px;height:300px}.settings-tier-card-inner{position:relative;width:100%;height:100%;transform-style:preserve-3d;transition:transform .55s cubic-bezier(.4,.2,.2,1)}.settings-tier-card-flip:focus-within .settings-tier-card-inner,.settings-tier-card-flip:hover .settings-tier-card-inner{transform:rotateY(180deg)}.settings-tier-card-face{position:absolute;inset:0;border-radius:20px;backface-visibility:hidden;-webkit-backface-visibility:hidden;display:flex;flex-direction:column;overflow:hidden;border:1px solid var(--stroke);background:var(--surface);transition:border-color .2s ease,box-shadow .2s ease}.settings-tier-card-flip[data-tier=free] .settings-tier-card-face{border-top:3px solid var(--stroke-strong)}.settings-tier-card-flip[data-tier=basic] .settings-tier-card-face{border-top:3px solid var(--accent)}.settings-tier-card-flip[data-tier=plus] .settings-tier-card-face{border-top:3px solid #7c3aed}.settings-tier-card-flip[data-tier=pro] .settings-tier-card-face{border-top:3px solid #d97706}.settings-tier-card-flip.active .settings-tier-card-face{box-shadow:0 0 0 2px var(--accent),0 18px 32px -20px rgba(15,23,42,.45);border-color:var(--accent)}.settings-tier-card-front{padding:20px;justify-content:space-between;background:linear-gradient(160deg,color-mix(in srgb,var(--surface) 93%,var(--surface-muted)) 0,var(--surface) 100%)}.settings-tier-card-header{display:flex;align-items:flex-start;justify-content:space-between;gap:8px;margin-bottom:10px}.settings-tier-card-header h3{margin:4px 0 0;font-size:26px;line-height:1;font-weight:800;letter-spacing:-.03em}.settings-tier-card-badges{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:6px}.settings-tier-eyebrow{margin:0;font-size:10px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--text-muted)}.settings-tier-badge-current,.settings-tier-badge-featured{display:inline-flex;align-items:center;padding:4px 10px;border-radius:999px;font-size:10px;font-weight:800;letter-spacing:.06em;text-transform:uppercase}.settings-tier-badge-current{background:var(--accent);color:#fff}.settings-tier-badge-featured{background:color-mix(in srgb,var(--surface-muted) 70%,transparent);color:var(--text-secondary);border:1px solid var(--stroke)}.settings-tier-price-row{display:flex;flex-direction:column;gap:3px}.settings-tier-price{font-size:22px;font-weight:800;line-height:1;color:var(--text-primary);font-family:var(--font-display),"Bricolage Grotesque",system-ui,sans-serif}.settings-tier-quota{font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.06em;color:var(--text-muted)}.settings-tier-front-stats{display:grid;grid-template-columns:1fr;grid-gap:8px;gap:8px}.settings-tier-front-stat{display:flex;flex-direction:column;gap:2px;padding:10px 12px;border:1px solid var(--stroke);border-radius:12px;background:color-mix(in srgb,var(--surface-muted) 50%,transparent)}.settings-tier-front-stat-value{font-size:20px;font-weight:800;line-height:1;color:var(--text-primary)}.settings-tier-front-stat-label{letter-spacing:.06em}.settings-tier-flip-hint,.settings-tier-front-stat-label{font-size:10px;font-weight:700;text-transform:uppercase;color:var(--text-muted)}.settings-tier-flip-hint{display:flex;align-items:center;justify-content:center;letter-spacing:.07em;opacity:.55}.settings-tier-card-back{transform:rotateY(180deg);padding:16px;justify-content:space-between}.settings-tier-back-summary{margin:0 0 10px;font-size:12px;line-height:1.5;color:var(--text-secondary)}.settings-tier-back-model-showcase{display:flex;flex-wrap:wrap;gap:5px;margin-bottom:10px}.settings-tier-model-chip-more{display:inline-flex;align-items:center;padding:3px 8px;border:1px dashed var(--stroke);border-radius:999px;font-size:10px;font-weight:600;color:var(--text-muted);background:transparent;white-space:nowrap}.settings-tier-back-models{flex:1 1;min-height:0;display:flex;flex-direction:column;gap:6px;margin-bottom:10px;overflow:hidden}.settings-tier-model-label{font-size:10px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--text-muted)}.settings-tier-back-model-chips{display:flex;flex-wrap:wrap;gap:5px;overflow-y:auto;max-height:68px;padding-right:2px}.settings-tier-back-model-chips::-webkit-scrollbar{width:3px}.settings-tier-back-model-chips::-webkit-scrollbar-thumb{background:var(--stroke-strong);border-radius:99px}.settings-tier-model-chip-sm{display:inline-flex;align-items:center;padding:3px 8px;border:1px solid var(--stroke);border-radius:999px;font-size:10px;font-weight:600;color:var(--text-primary);background:var(--surface);white-space:nowrap}.settings-tier-empty{margin:0;font-size:12px;color:var(--text-secondary)}.settings-tier-back-features{list-style:none;padding:0;margin:0 0 10px;display:flex;flex-direction:column;gap:7px}.settings-tier-back-features li{display:flex;align-items:flex-start;gap:8px;font-size:11px;line-height:1.45;color:var(--text-secondary)}.settings-tier-back-features li svg{color:var(--success);flex-shrink:0;margin-top:1px}.settings-tier-action{width:100%;justify-content:center}@media (max-width:1024px){.settings-tiers-comparison{grid-template-columns:repeat(2,minmax(0,1fr))}}@media (max-width:520px){.settings-tiers-comparison{grid-template-columns:1fr}.settings-tier-card-flip{height:auto;perspective:none}.settings-tier-card-inner{transform:none!important;transform-style:flat;height:auto;display:flex;flex-direction:column;gap:12px}.settings-tier-card-face{position:relative;inset:auto;backface-visibility:visible;-webkit-backface-visibility:visible}.settings-tier-card-back{transform:none}.settings-tier-flip-hint{display:none}}.settings-tier-display{display:flex;align-items:center;gap:16px;margin-bottom:20px}.settings-tier-badge-large{display:inline-flex;align-items:center;justify-content:center;padding:12px 20px;border-radius:999px;border:1px solid var(--stroke);background:var(--surface);box-shadow:0 12px 24px -20px rgba(15,23,42,.45);font-size:16px;font-weight:800;letter-spacing:.06em;text-transform:uppercase}.settings-tier-badge-large[data-tier=pro]{background:#fff4db;color:#9a5b08;border-color:#f0c36b}.settings-tier-badge-large[data-tier=plus]{background:#f4ebff;color:#6d28d9;border-color:#d8b4fe}.settings-tier-badge-large[data-tier=basic]{background:color-mix(in srgb,var(--accent-muted) 65%,#fff);color:var(--accent);border-color:color-mix(in srgb,var(--accent) 35%,#fff)}.settings-tier-badge-large[data-tier=free]{background:var(--surface-muted);color:var(--text-secondary)}@media (max-width:768px){.settings-subscription-overview-main{flex-direction:column;align-items:stretch}.settings-subscription-overview-copy,.settings-tier-price-block{flex-direction:column;align-items:flex-start}.settings-tier-quota{text-align:left}}.settings-stats-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));grid-gap:16px;gap:16px;margin-top:16px}.settings-stat{padding:16px;border:1px solid var(--stroke);border-radius:12px;background:var(--surface);transition:border-color .2s ease}.settings-stat:hover{border-color:var(--stroke-strong)}.settings-stat-label{font-size:11px;color:var(--text-muted);font-weight:700;text-transform:uppercase;letter-spacing:.05em;margin-bottom:6px}.settings-stat-value{font-size:22px;font-weight:800;color:var(--text-primary);font-family:var(--font-display)}.own-key-badge{background:var(--warning);font-size:11px;margin-left:8px}.own-cost-badge,.own-key-badge{display:inline-flex;align-items:center;padding:2px 8px;color:#fff;font-weight:700;border-radius:4px;text-transform:uppercase;letter-spacing:.03em}.own-cost-badge{background:#f59e0b;font-size:10px}.own-key-indicator{padding:2px 6px;background:rgba(245,158,11,.15);color:#d97706;border-radius:4px;border:1px solid rgba(245,158,11,.3)}.api-key-indicator,.own-key-indicator{display:inline-flex;align-items:center;font-size:10px;font-weight:700;margin-left:8px;text-transform:uppercase;letter-spacing:.03em}.api-key-indicator{padding:2px 8px;background:var(--success);color:#fff;border-radius:4px}.model-option.own-key{background:rgba(245,158,11,.05);border-left:3px solid #f59e0b}.model-option.own-key:hover{background:rgba(245,158,11,.1)}[data-theme=dark] .own-key-indicator{background:rgba(245,158,11,.2);color:#fbbf24;border-color:rgba(245,158,11,.4)}[data-theme=dark] .model-option.own-key{background:rgba(245,158,11,.08)}[data-theme=dark] .model-option.own-key:hover{background:rgba(245,158,11,.12)}.save-status{display:inline-flex;align-items:center;gap:6px;padding:4px 10px;border-radius:6px;font-size:12px;font-weight:500;transition:all .2s ease}.save-status.saving{color:var(--accent);background:rgba(59,130,246,.1)}.save-status.saved{color:#22c55e;background:rgba(34,197,94,.1)}.save-status.error{color:var(--error-text);background:var(--error-bg)}.save-status.idle{color:var(--text-muted);background:transparent}.save-status-spinner{width:12px;height:12px;border:2px solid;border-right:2px solid transparent;border-radius:50%;animation:spin .75s linear infinite}@keyframes spin{to{transform:rotate(1turn)}}.save-status-icon{font-size:12px;line-height:1}.save-status-text{line-height:1.4}.save-status-action{margin-left:4px;padding:2px 8px;font-size:11px;font-weight:600;color:#fff;background:var(--error-text);border:none;border-radius:4px;cursor:pointer;transition:opacity .2s}.save-status-action:hover{opacity:.9}.save-status-dismiss{margin-left:4px;padding:2px 4px;font-size:11px;color:var(--text-muted);background:transparent;border:none;cursor:pointer;opacity:.7;transition:opacity .2s}.save-status-dismiss:hover{opacity:1}.save-status-container{position:absolute;right:12px;top:50%;transform:translateY(-50%);z-index:10}.folder-page{min-height:100vh;background:var(--bg);padding:24px}@media (max-width:768px){.folder-page{padding:16px}}.folder-loading{display:flex;align-items:center;justify-content:center;min-height:100vh;font-size:14px;color:var(--text-secondary)}.folder-header{margin-bottom:24px;padding-bottom:16px;border-bottom:1px solid var(--stroke)}.folder-header-content{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap}.folder-title{font-size:28px;font-weight:700;color:var(--text-primary);letter-spacing:-.02em}@media (max-width:768px){.folder-title{font-size:22px}}.folder-stats{display:flex;flex-wrap:wrap;gap:24px;margin-bottom:32px;padding:16px 20px;background:var(--surface);border:1px solid var(--stroke);border-radius:var(--radius)}@media (max-width:768px){.folder-stats{gap:16px;padding:12px 16px}}.folder-stat{display:flex;flex-direction:column;gap:4px}.folder-stat-value{font-size:20px;font-weight:700;color:var(--text-primary)}.folder-stat-label{font-size:12px;color:var(--text-secondary);text-transform:uppercase;letter-spacing:.04em}.folder-card-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(320px,1fr));grid-gap:20px;gap:20px}@media (max-width:768px){.folder-card-grid{grid-template-columns:1fr;gap:16px}}.folder-card{background:var(--surface);border:1px solid var(--stroke);border-radius:var(--radius);padding:20px;display:flex;flex-direction:column;gap:12px;transition:border-color .15s ease,box-shadow .15s ease}.folder-card:hover{border-color:var(--stroke-strong);box-shadow:var(--shadow)}.folder-card-header{display:flex;flex-direction:column;gap:4px}.folder-card-title{font-size:16px;font-weight:600;color:var(--text-primary);margin:0}.folder-card-filename{font-size:12px;color:var(--text-muted)}.folder-card-meta{font-size:12px;color:var(--text-secondary)}.folder-card-snippet{font-size:13px;color:var(--text-secondary);line-height:1.5;margin:0;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}.folder-card-counts{display:flex;flex-wrap:wrap;gap:12px}.folder-count{display:inline-flex;align-items:center;gap:6px;font-size:12px;color:var(--text-secondary);background:var(--surface-muted);padding:4px 10px;border-radius:999px}.folder-count-icon{font-size:14px}.folder-card-action{margin-top:auto;align-self:flex-start}.folder-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:16px;padding:48px 24px;text-align:center;color:var(--text-secondary)}.folder-empty p{font-size:14px}