:root{--background:#f6f7f4;--panel:#fff;--panel-muted:#eef2ec;--ink:#17201b;--muted:#5f6c64;--line:#dbe2da;--brand:#276749;--brand-strong:#17452f;--accent:#d69e2e;--danger:#b42318;--shadow:0 18px 50px #17201b14}*{box-sizing:border-box}html{background:var(--background);min-height:100%}body{min-height:100%;color:var(--ink);background:var(--background);margin:0;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif}a{color:inherit;text-decoration:none}button,input,textarea,select{font:inherit}.page-shell{min-height:100vh}.public-header,.app-header{justify-content:space-between;align-items:center;gap:20px;padding:22px clamp(20px,5vw,72px);display:flex}.brand-lockup{align-items:center;gap:10px;font-weight:800;display:inline-flex}.brand-mark{color:#fff;background:var(--brand);border-radius:8px;place-items:center;width:34px;height:34px;display:grid;box-shadow:0 10px 24px #2767493d}.hero{grid-template-columns:minmax(0,1.05fr) minmax(320px,.95fr);align-items:center;gap:clamp(28px,5vw,64px);padding:clamp(28px,7vw,88px) clamp(20px,5vw,72px) 56px;display:grid}.hero h1{letter-spacing:0;max-width:780px;margin:0;font-size:clamp(42px,8vw,82px);line-height:.98}.hero p{max-width:660px;color:var(--muted);margin:24px 0 0;font-size:clamp(18px,2vw,22px);line-height:1.55}.hero-panel,.panel,.card{border:1px solid var(--line);background:var(--panel);box-shadow:var(--shadow);border-radius:8px}.hero-panel{padding:22px}.hero-panel-grid{gap:12px;display:grid}.metric-row,.stack-row,.nav-row{justify-content:space-between;align-items:center;gap:12px;display:flex}.metric-row{border:1px solid var(--line);background:#fbfcfa;border-radius:8px;padding:14px}.eyebrow{color:var(--brand);letter-spacing:.08em;text-transform:uppercase;margin:0 0 8px;font-size:.78rem;font-weight:800}.muted{color:var(--muted)}.tiny{font-size:.84rem}.button,.secondary-button,.ghost-button,.danger-button{cursor:pointer;border:1px solid #0000;border-radius:8px;justify-content:center;align-items:center;gap:8px;min-height:42px;padding:0 16px;font-weight:750;display:inline-flex}.button{color:#fff;background:var(--brand)}.button:hover{background:var(--brand-strong)}.secondary-button{color:var(--brand-strong);background:#eef7f1;border-color:#b8d0c3}.ghost-button{border-color:var(--line);background:var(--panel)}.danger-button{color:#fff;background:var(--danger)}.button[disabled],.secondary-button[disabled],.ghost-button[disabled]{cursor:not-allowed;opacity:.5}.section{padding:20px clamp(20px,5vw,72px) 48px}.section-narrow{max-width:1120px;margin:0 auto;padding:32px 20px 56px}.grid{gap:18px;display:grid}.grid-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-3{grid-template-columns:repeat(3,minmax(0,1fr))}.card,.panel{padding:18px}.card h3,.panel h2,.panel h3{margin:0 0 8px}.card p,.panel p{margin:0}.app-shell{grid-template-columns:270px minmax(0,1fr);min-height:100vh;display:grid}.sidebar{border-right:1px solid var(--line);background:#fbfcfa;padding:22px 18px}.sidebar-nav{gap:6px;margin-top:28px;display:grid}.sidebar-link{min-height:42px;color:var(--muted);border-radius:8px;align-items:center;gap:10px;padding:0 12px;font-weight:700;display:flex}.sidebar-link:hover,.sidebar-link.active{color:var(--ink);background:var(--panel-muted)}.main{min-width:0}.main-inner{max-width:1220px;margin:0 auto;padding:28px clamp(18px,4vw,44px) 64px}.page-title{justify-content:space-between;align-items:flex-start;gap:20px;margin-bottom:22px;display:flex}.page-title h1{margin:0;font-size:clamp(28px,4vw,44px);line-height:1.05}.form{gap:14px;display:grid}.field{gap:6px;display:grid}.field label{color:var(--muted);font-size:.86rem;font-weight:750}.field input,.field textarea,.field select{border:1px solid var(--line);width:100%;color:var(--ink);background:#fff;border-radius:8px;padding:11px 12px}.field textarea{resize:vertical;min-height:120px}.list{gap:10px;display:grid}.list-item{border:1px solid var(--line);background:#fbfcfa;border-radius:8px;justify-content:space-between;align-items:center;gap:16px;padding:14px;display:flex}a.list-item{color:inherit;text-decoration:none}a.list-item:hover{background:#f3f8f5;border-color:#b8d0c3}.list-actions,.detail-actions{flex-wrap:wrap;justify-content:flex-end;align-items:center;gap:8px;display:inline-flex}.detail-actions{margin-top:14px}.details-grid{grid-template-columns:minmax(0,1.2fr) minmax(280px,.8fr);align-items:start;gap:18px;display:grid}.details-list{gap:12px;display:grid}.position-multiselect{position:relative}.position-multiselect-trigger{border:1px solid var(--line);width:100%;min-height:48px;color:var(--ink);cursor:pointer;font:inherit;text-align:left;background:#fff;border-radius:8px;justify-content:space-between;align-items:center;gap:12px;padding:0 12px;display:flex}.position-multiselect-menu{z-index:20;border:1px solid var(--line);max-height:260px;box-shadow:var(--shadow);background:#fff;border-radius:8px;gap:4px;margin-top:6px;padding:8px;display:grid;position:absolute;left:0;right:0;overflow:auto}.position-multiselect-option{min-height:38px;color:var(--ink);cursor:pointer;border-radius:6px;align-items:center;gap:10px;padding:7px 8px;display:flex}.position-multiselect-option:hover{background:#eef7f1}.position-multiselect-option input{width:auto}.smart-subs-editor-toolbar{justify-content:space-between;align-items:end;gap:16px;margin-bottom:16px;display:flex}.smart-subs-counts{flex-wrap:wrap;justify-content:flex-end;gap:8px;display:flex}.smart-subs-tool-buttons{flex-wrap:wrap;gap:8px;margin-bottom:12px;display:flex}.smart-subs-bulk-panel{margin-bottom:18px}.smart-subs-bulk-grid{grid-template-columns:minmax(220px,.35fr) minmax(0,1fr);gap:16px;margin-top:16px;display:grid}.smart-subs-position-palette{align-content:start;gap:12px;display:grid}.smart-subs-position-brush-list{grid-template-columns:repeat(auto-fit,minmax(98px,1fr));gap:8px;display:grid}.smart-subs-position-brush{border:1px solid var(--line);min-height:58px;color:var(--ink);cursor:pointer;text-align:left;background:#fbfcfa;border-radius:8px;align-content:center;gap:2px;padding:8px;display:grid}.smart-subs-position-brush span{color:var(--muted);font-size:.78rem;font-weight:750}.smart-subs-position-brush.is-active{border-color:var(--brand);color:var(--brand-strong);background:#e7f4ec}.smart-subs-active-position{border:1px solid var(--line);background:#fbfcfa;border-radius:8px;gap:10px;padding:12px;display:grid}.smart-subs-player-matrix{gap:8px;display:grid}.smart-subs-assignment-row{border:1px solid var(--line);background:#fbfcfa;border-radius:8px;grid-template-columns:minmax(180px,.38fr) minmax(0,1fr);align-items:center;gap:10px;padding:8px;display:grid}.smart-subs-assignment-heading{min-height:40px;color:var(--muted);text-transform:uppercase;letter-spacing:.08em;background:0 0;font-size:.78rem;font-weight:850}.smart-subs-player-toggle{min-height:48px;color:var(--ink);cursor:pointer;text-align:left;background:0 0;border:1px solid #0000;border-radius:8px;align-content:center;gap:3px;padding:8px 10px;display:grid}.smart-subs-player-toggle:hover{background:#eef7f1;border-color:#b8d0c3}.smart-subs-player-toggle span{color:var(--muted);text-overflow:ellipsis;white-space:nowrap;font-size:.78rem;font-weight:700;overflow:hidden}.smart-subs-position-chip-grid{grid-template-columns:repeat(auto-fill,minmax(74px,1fr));gap:6px;display:grid}.smart-subs-position-chip{border:1px solid var(--line);min-height:34px;color:var(--ink);cursor:pointer;text-overflow:ellipsis;white-space:nowrap;background:#fff;border-radius:8px;padding:0 8px;font-weight:800;overflow:hidden}.smart-subs-position-chip:hover{background:#eef7f1;border-color:#b8d0c3}.smart-subs-position-chip.is-selected{border-color:var(--brand);background:var(--brand);color:#fff}.smart-subs-board{touch-action:none;background:repeating-linear-gradient(90deg,#ffffff21 0 18px,#fff0 18px 36px),linear-gradient(#dff0df 0%,#cfe8d3 100%);border:2px solid #c7d7cb;border-radius:8px;min-height:clamp(620px,72vw,880px);position:relative;overflow:hidden}.smart-subs-field-lines{pointer-events:none;border:1px solid #17201b47;border-radius:8px;position:absolute;inset:8%}.smart-subs-field-lines:before,.smart-subs-field-lines:after{content:"";border:1px solid #17201b2e;width:34%;height:18%;position:absolute;left:50%;transform:translate(-50%)}.smart-subs-field-lines:before{border-top:0;top:0}.smart-subs-field-lines:after{border-bottom:0;bottom:0}.smart-subs-slot-editor{border:1px solid var(--line);background:#fffffff0;border-radius:8px;justify-items:center;gap:4px;width:116px;min-height:82px;padding:6px;display:grid;position:absolute;transform:translate(-50%,-50%);box-shadow:0 10px 24px #17201b1f}.smart-subs-slot-editor.is-dragging{z-index:10;border-color:var(--brand);box-shadow:0 18px 36px #17201b33}.smart-subs-slot-editor:hover,.smart-subs-slot-editor:focus-within{z-index:9}.smart-subs-drag-handle{width:100%;height:22px;color:var(--brand-strong);cursor:grab;background:#eef7f1;border:0;border-radius:6px;justify-content:center;align-items:center;display:inline-flex}.smart-subs-slot-name{text-align:center;width:100%;height:28px;padding:4px 6px;font-size:.9rem;font-weight:800}.smart-subs-slot-player{width:100%;color:var(--muted);text-align:center;text-overflow:ellipsis;white-space:nowrap;font-size:.76rem;font-weight:700;line-height:1.15;display:block;overflow:hidden}.smart-subs-slot-editor .badge{min-height:22px;padding:0 8px;font-size:.72rem}.source-preview{border:1px solid var(--line);max-height:340px;color:var(--ink);white-space:pre-wrap;background:#fbfcfa;border-radius:8px;margin:0;padding:14px;overflow:auto}.sr-only{clip:rect(0, 0, 0, 0);white-space:nowrap;border:0;width:1px;height:1px;padding:0;position:absolute;overflow:hidden}.import-chat-panel{gap:14px;padding:0;display:grid;overflow:hidden}.import-chat-panel>.stack-row,.import-chat-context,.import-chat-composer,.import-chat-disabled{margin:0 18px}.import-chat-panel>.stack-row{padding-top:18px}.import-chat-context{gap:10px;display:grid}.chat-question-card{background:#f3faf6;border:1px solid #bfd5c8;border-radius:8px;gap:8px;padding:12px;display:grid}.chat-question-card ul{color:var(--muted);margin:0;padding-left:18px}.import-chat-thread{border-block:1px solid var(--line);background:linear-gradient(180deg, #fbfcfaf5, #f6f7f4f5), var(--panel-muted);gap:12px;min-height:230px;max-height:430px;padding:16px 18px;display:grid;overflow-y:auto}.chat-empty-state{text-align:center;background:#fffc;border:1px dashed #b8c5bb;border-radius:8px;place-self:center;max-width:320px;padding:22px}.chat-message{display:flex}.chat-message-user{justify-content:flex-end}.chat-message-assistant{justify-content:flex-start}.chat-bubble{border:1px solid var(--line);background:#fff;border-radius:8px;max-width:min(86%,640px);padding:12px 14px;box-shadow:0 10px 24px #17201b0f}.chat-message-user .chat-bubble{color:#fff;border-color:var(--brand);background:var(--brand)}.chat-message-meta{flex-wrap:wrap;justify-content:space-between;align-items:baseline;gap:8px;margin-bottom:6px;font-size:.78rem;display:flex}.chat-message-meta span{color:var(--muted);font-weight:700}.chat-message-user .chat-message-meta span{color:#ffffffc2}.chat-bubble p{white-space:pre-wrap;margin:0;line-height:1.45}.import-chat-composer{gap:10px;padding-bottom:18px;display:grid}.import-chat-composer textarea{border:1px solid var(--line);width:100%;min-height:92px;color:var(--ink);resize:vertical;background:#fff;border-radius:8px;padding:11px 12px}.import-chat-disabled{margin-bottom:18px}.badge{min-height:26px;color:var(--brand-strong);background:#e7f4ec;border-radius:999px;align-items:center;padding:0 9px;font-size:.78rem;font-weight:800;display:inline-flex}.badge-muted{color:var(--muted);background:var(--panel-muted)}.auth-card{max-width:520px;margin:48px auto}.auth-provider-list{gap:10px;margin-top:18px;display:grid}.local-login-form{border:1px solid var(--line);background:#fbfcfa;border-radius:8px;gap:10px;padding:12px;display:grid}.form-error{color:var(--danger);margin:0;font-size:.88rem;font-weight:750}.empty-state{background:#fbfcfa;border:1px dashed #b8c5bb;border-radius:8px;padding:28px}@media (max-width:900px){.hero,.grid-2,.grid-3,.details-grid,.app-shell{grid-template-columns:1fr}.sidebar{border-right:0;border-bottom:1px solid var(--line)}.sidebar-nav{grid-template-columns:repeat(2,minmax(0,1fr))}.smart-subs-editor-toolbar{flex-direction:column;align-items:stretch}.smart-subs-counts{justify-content:flex-start}.smart-subs-bulk-grid,.smart-subs-assignment-row{grid-template-columns:1fr}.smart-subs-assignment-heading{display:none}}@media (max-width:560px){.public-header,.app-header,.page-title,.stack-row{flex-direction:column;align-items:stretch}.sidebar-nav{grid-template-columns:1fr}.smart-subs-board{min-height:460px}.smart-subs-slot-editor{width:112px;min-height:96px}}
