:root{
  --bg:#eef1f5;--surface:#fff;--surface-2:#f7f9fb;--line:#e4e8ee;--line-strong:#d6dbe3;
  --text:#1e293b;--text-2:#64748b;--text-3:#94a3b8;
  --blue:#2563eb;--blue-700:#1d4ed8;--blue-50:#eff6ff;--blue-100:#dbeafe;
  --green:#10b981;--green-700:#059669;--green-50:#ecfdf5;
  --amber:#f59e0b;--amber-50:#fffbeb;--amber-100:#fef3c7;--red:#dc2626;--red-50:#fef2f2;
  --ink:#0f172a;--radius:12px;
  --shadow-sm:0 1px 2px rgba(15,23,42,.04);
  --shadow:0 1px 3px rgba(15,23,42,.06),0 8px 24px rgba(15,23,42,.05);
  --font:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Inter,Helvetica,Arial,sans-serif;
}
*{box-sizing:border-box;margin:0;padding:0}
html,body{height:100%;max-width:100%;overflow-x:hidden}
body{font-family:var(--font);background:var(--bg);color:var(--text);font-size:14px;line-height:1.45;display:flex;flex-direction:column;min-height:100vh;-webkit-font-smoothing:antialiased}
button{font-family:inherit;cursor:pointer;border:none;background:none;color:inherit}
button:not(:disabled){transition:transform .16s ease,filter .16s ease}
button:not(:disabled):active{transform:translateY(1px) scale(.985)}
button:not(:disabled):hover{filter:brightness(.98)}
button:focus-visible{outline:3px solid rgba(37,99,235,.3);outline-offset:2px}
input,textarea,select{font-family:inherit;font-size:inherit;color:inherit}
a{color:inherit;text-decoration:none}
svg{display:block;flex:none}
.hidden{display:none!important}
::selection{background:var(--blue-100)}

.dev-notice{display:flex;align-items:flex-start;gap:10px;flex:none;width:calc(100% - 28px);max-width:none;position:sticky;top:10px;z-index:110;margin:10px auto 8px;padding:8px 14px;background:#fff1f2;color:#842b35;border:1px solid #f1c6cb;border-radius:14px;box-shadow:0 5px 18px rgba(112,36,48,.09)}
.dev-notice-icon{display:grid;place-items:center;flex:none;width:23px;height:23px;border:1.5px solid #c87983;border-radius:50%;font-size:14px;font-weight:800;line-height:1;margin-top:1px}
.dev-notice-content{min-width:0;flex:1}
.dev-notice-heading{display:flex;align-items:baseline;flex-wrap:wrap;gap:3px 8px}
.dev-notice-heading strong{font-size:14px;letter-spacing:.1px}
.dev-notice-heading span{font-size:13px;color:#98515a}
.dev-notice-list{display:flex;flex-wrap:wrap;gap:2px 18px;margin:2px 0 0;padding-left:18px;color:#74313a;font-size:12.5px;line-height:1.3}
.dev-notice-list li{padding-right:3px}

.auth-screen{position:fixed;inset:0;z-index:100;background:#172554;display:grid;place-items:center;padding:20px;animation:fade-in .3s ease both}
.auth-card{width:100%;max-width:380px;background:var(--surface);border-radius:18px;box-shadow:0 24px 60px rgba(2,6,23,.45);padding:28px 26px}
.auth-brand{justify-content:center}
.brand-mark{display:block;position:relative;width:46px;height:42px;overflow:hidden;flex:none}
.brand-mark img{position:absolute;left:0;top:-4px;height:50px;width:auto;max-width:none}
.brand-name{color:var(--text);font-weight:700;font-size:17px;letter-spacing:-.2px}
.auth-brand .brand-mark{width:56px;height:50px}
.auth-brand .brand-mark img{height:60px;top:-5px}
.auth-brand .brand-name{font-size:20px}
.auth-sub{text-align:center;color:var(--text-2);font-size:13px;margin:8px 0 18px}
.auth-tabs{display:grid;grid-template-columns:1fr 1fr;gap:4px;background:var(--surface-2);padding:4px;border-radius:10px;margin-bottom:18px}
.auth-tab{padding:9px;border-radius:8px;font-weight:600;font-size:13.5px;color:var(--text-2);transition:.15s}
.auth-tab.active{background:var(--surface);color:var(--text);box-shadow:var(--shadow-sm)}
.auth-form{display:flex;flex-direction:column;gap:13px}
.auth-form label{display:flex;flex-direction:column;gap:6px;font-size:12px;font-weight:600;color:var(--text-2)}
.auth-msg{min-height:18px;margin-top:12px;font-size:12.5px;font-weight:600;text-align:center;color:var(--red)}
.auth-msg.ok{color:var(--green-700)}
.auth-note{margin-top:14px;font-size:11px;color:var(--text-3);text-align:center;line-height:1.5}
.verify-spam-note{margin:0;padding:9px 11px;border:1px solid var(--amber-100);border-radius:9px;background:var(--amber-50);color:var(--text-2);font-size:12px;line-height:1.45}
.auth-link{align-self:center;padding:2px 0;color:var(--blue);font-size:12px;font-weight:600;background:transparent;border:0;cursor:pointer;transition:color .15s,transform .15s}
.auth-link:hover{color:var(--blue-700,#1d4ed8);transform:translateY(-1px)}

.topbar{height:56px;flex:none;background:var(--surface);border-bottom:1px solid var(--line);display:flex;align-items:center;gap:18px;padding:0 20px;position:relative;z-index:40}
.brand{display:flex;align-items:center;gap:10px;font-weight:700;font-size:17px;letter-spacing:-.2px}
.topnav{display:flex;gap:4px}
.topnav a{padding:7px 12px;border-radius:8px;color:var(--text-2);font-weight:500;font-size:13.5px;transition:.15s}
.topnav a:hover{background:var(--surface-2);color:var(--text)}
.topnav a.active{color:var(--text);background:var(--surface-2)}
.topbar .spacer{flex:1}
.icon-btn{width:34px;height:34px;border-radius:8px;border:1px solid var(--line);background:var(--surface);display:grid;place-items:center;color:var(--text-2);transition:.15s}
.icon-btn:hover{border-color:var(--line-strong);color:var(--text)}
.avatar-btn{display:flex;align-items:center;gap:7px;padding:5px 8px;border-radius:8px;border:1px solid var(--line);background:var(--surface);transition:.15s}
.avatar-btn:hover{border-color:var(--line-strong)}
.avatar{width:26px;height:26px;border-radius:50%;background:#2563eb;color:#fff;display:grid;place-items:center;font-size:11px;font-weight:700}
.burger{display:none;width:34px;height:34px;border-radius:8px;border:1px solid var(--line);align-items:center;justify-content:center}
.menu-pop{position:absolute;top:48px;right:20px;min-width:200px;background:var(--surface);border:1px solid var(--line);border-radius:10px;box-shadow:var(--shadow);padding:6px;z-index:50;display:none}
.menu-pop.open{display:block}
.menu-pop button,.menu-pop a{display:flex;align-items:center;gap:9px;width:100%;text-align:left;padding:8px 10px;border-radius:7px;font-size:13.5px;color:var(--text)}
.menu-pop button:hover,.menu-pop a:hover{background:var(--surface-2)}
.menu-pop .sep{height:1px;background:var(--line);margin:5px 2px}
.menu-pop .danger{color:var(--red)}
.menu-user{padding:8px 10px;display:flex;flex-direction:column;gap:2px}
.menu-user b{font-size:13.5px}
.menu-user span{font-size:12px;color:var(--text-3)}

.modal{position:fixed;inset:0;z-index:80;background:rgba(15,23,42,.5);display:none;place-items:center;padding:20px}
.modal.open{display:grid}
.modal-card{width:100%;max-width:440px;background:var(--surface);border-radius:16px;box-shadow:var(--shadow);overflow:hidden}
.modal-head{display:flex;align-items:center;justify-content:space-between;padding:16px 18px;border-bottom:1px solid var(--line)}
.modal-head h2{font-size:16px}
.modal-body{padding:18px;display:flex;flex-direction:column;gap:4px}
.feedback-modal-card{max-width:460px}
.feedback-modal-body{gap:10px}
.feedback-help{margin:0;text-align:center;color:var(--text-2);font-size:13px}
.feedback-stars{display:flex;justify-content:center;gap:5px;margin:2px 0}
.feedback-star{width:44px;height:44px;border:0;border-radius:10px;background:transparent;color:var(--line-strong);font-size:32px;line-height:1;cursor:pointer;transition:color .15s,background .15s,transform .15s}
.feedback-star:hover,.feedback-star.selected{color:#f4b740}
.feedback-star:hover{background:var(--surface-2);transform:scale(1.06)}
.feedback-star:focus-visible{outline:2px solid var(--blue);outline-offset:2px}
.feedback-rating-caption{min-height:18px;margin:0;text-align:center;color:var(--text-2);font-size:12px;font-weight:600}
.feedback-comment-label{font-size:12px;font-weight:600;color:var(--text-2)}
.feedback-comment{min-height:100px}
.feedback-status{min-height:0;margin:0;color:var(--red);font-size:12px;line-height:1.4}
.feedback-status:empty{display:none}
.feedback-modal-card form .modal-foot .btn-create{width:auto;margin:0;padding:9px 16px}
.feedback-modal-card form .modal-foot .btn-create:disabled{opacity:.55;cursor:not-allowed}
  .modal-foot{display:flex;align-items:center;justify-content:flex-end;gap:12px;padding:14px 18px;border-top:1px solid var(--line)}
.app-dialog{position:fixed;inset:0;z-index:120;background:rgba(15,23,42,.48);display:none;place-items:center;padding:18px;animation:fade-in .16s ease both}
.app-dialog.open{display:grid}
.app-dialog-card{width:min(100%,440px);background:var(--surface);border:1px solid var(--line);border-radius:14px;padding:22px;box-shadow:0 18px 60px rgba(15,23,42,.24);animation:rise-in .2s ease both}
.app-dialog-card h2{font-size:17px;margin-bottom:9px}
.app-dialog-card p{color:var(--text-2);line-height:1.5;margin-bottom:15px}
.app-dialog-card .input{margin-bottom:4px}
.app-dialog-actions{display:flex;justify-content:flex-end;gap:9px;margin-top:18px}
.app-dialog-actions .btn-create{width:auto;min-width:104px;margin:0;padding:9px 16px}
.seg.two-col{grid-template-columns:1fr 1fr}
.warn-box{background:var(--amber-50);border:1px solid var(--amber-100);border-radius:10px;padding:11px 13px;font-size:12px;color:#92400e;line-height:1.5}

.shell{flex:1;display:flex;min-height:0;min-width:0;width:100%;overflow:hidden}
.sidebar{width:264px;flex:none;background:var(--surface);border-right:1px solid var(--line);display:flex;flex-direction:column;min-height:0}
.sb-scroll{overflow-y:auto;padding:16px 14px;display:flex;flex-direction:column;gap:18px;flex:1}
.btn-new{display:flex;align-items:center;justify-content:center;gap:8px;background:var(--blue);color:#fff;font-weight:600;font-size:13.5px;padding:10px;border-radius:10px;box-shadow:none;transition:.15s}
.btn-new:hover{background:var(--blue-700)}
.sb-group{display:flex;flex-direction:column;gap:2px}
.sb-item{display:flex;align-items:center;gap:10px;padding:8px 10px;border-radius:8px;color:var(--text-2);font-weight:500;font-size:13.5px;transition:.12s;width:100%;text-align:left}
.sb-item svg{display:block;flex:0 0 18px;width:18px;height:18px;color:var(--text-3)}
.sb-item:hover{background:var(--surface-2);color:var(--text)}
.sb-item.active{background:var(--blue-50);color:var(--blue-700)}
.sb-item.active svg{color:var(--blue)}
.sb-item .count{margin-left:auto;font-size:12px;color:var(--text-3);font-weight:600;background:var(--surface-2);padding:1px 7px;border-radius:20px}
.sb-item.active .count{background:#fff;color:var(--blue)}
.sb-label{display:flex;align-items:center;justify-content:space-between;font-size:11px;font-weight:700;letter-spacing:.6px;color:var(--text-3);text-transform:uppercase;padding:0 10px 4px}
.sb-label button{color:var(--text-3);width:20px;height:20px;border-radius:6px;display:grid;place-items:center}
.sb-label button:hover{background:var(--surface-2);color:var(--text)}
.subject{display:flex;align-items:center;gap:10px;padding:7px 10px;border-radius:8px;font-size:13.5px;color:var(--text-2);font-weight:500;width:100%;min-width:0;text-align:left;transition:.12s}
.subject:hover{background:var(--surface-2);color:var(--text)}
.subject.active{color:var(--text);background:var(--surface-2)}
.subject-folder{display:block;width:17px;height:17px;flex:0 0 17px;color:var(--subject-color,var(--blue))}
.subject .count{margin-left:auto;font-size:12px;color:var(--text-3)}
.subject.empty{color:var(--text-3);font-size:12.5px;font-style:italic;cursor:default}
.note-list{display:flex;flex-direction:column;gap:1px}
.note{display:flex;flex-direction:column;gap:2px;padding:8px 10px;border-radius:8px;width:100%;text-align:left;transition:.12s;border:1px solid transparent}
.note-row{display:flex;align-items:center;gap:3px;min-width:0}
.note-row .note{flex:1;min-width:0}
.note-delete{flex:none;width:30px;height:30px;border:1px solid transparent;border-radius:7px;display:grid;place-items:center;color:var(--text-3);background:transparent;opacity:.75;transition:color .15s,border-color .15s,background .15s,opacity .15s}
.note-row:hover .note-delete,.note-delete:focus-visible{opacity:1}
.note-delete:hover{color:var(--red);border-color:var(--red);background:var(--red-50)}
.note:hover{background:var(--surface-2)}
.note.active{background:var(--blue-50);border-color:#cfe0ff}
.note .t{font-size:13px;font-weight:600;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:flex;align-items:center;gap:6px}
.note .t .st{color:var(--amber);flex:none}
.note .d{font-size:11.5px;color:var(--text-3)}
.note.empty{color:var(--text-3);font-size:12.5px;padding:14px 10px;text-align:center;font-style:italic}
.help{display:flex;align-items:center;gap:10px;padding:11px 12px;border-radius:10px;border:1px solid var(--line);background:var(--surface);font-weight:600;font-size:13px;color:var(--text);margin-top:auto}
.help .ic{width:30px;height:30px;border-radius:8px;background:var(--green-50);color:var(--green-700);display:grid;place-items:center;flex:none}
.help small{display:block;font-weight:400;color:var(--text-3);font-size:11.5px}

.workspace{flex:1;min-width:0;overflow-y:auto;overflow-x:hidden;padding:24px 28px 8px}
.ws-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:18px}
.ws-head h1{font-size:21px;font-weight:700;letter-spacing:-.3px}
.ws-head p{color:var(--text-2);font-size:13.5px;margin-top:3px}
.saved{display:flex;align-items:center;gap:7px;font-size:12.5px;color:var(--green-700);font-weight:600;white-space:nowrap}
.saved.saving{color:var(--text-3)}
.saved .dot{width:7px;height:7px;border-radius:50%;background:var(--green)}
.saved.saving .dot{background:var(--amber);animation:pulse 1s infinite}
@keyframes pulse{50%{opacity:.3}}

.stepper{display:flex;align-items:center;gap:6px;list-style:none;margin-bottom:20px;flex-wrap:wrap}
.step{display:flex;align-items:center;gap:8px;padding:7px 12px;border-radius:9px;font-size:13px;font-weight:600;color:var(--text-3)}
.step .n{width:20px;height:20px;border-radius:50%;background:var(--surface-2);color:var(--text-2);display:grid;place-items:center;font-size:11.5px;font-weight:700}
.step.done{color:var(--green-700)}
.step.done .n{background:var(--green-50);color:var(--green-700)}
.step.active{color:var(--blue-700);background:var(--blue-50)}
.step.active .n{background:var(--blue);color:#fff}
.step .chev{color:var(--line-strong)}

.grid-2{display:grid;grid-template-columns:minmax(0,420px) minmax(0,1fr);gap:20px;align-items:start;padding-bottom:24px;min-width:0}
.panel{min-width:0;background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow-sm);animation:rise-in .35s ease both}
.panel-head{display:flex;align-items:center;gap:9px;padding:14px 16px;border-bottom:1px solid var(--line)}
.panel-head .ic{width:26px;height:26px;border-radius:7px;display:grid;place-items:center;flex:none}
.panel-head h2{font-size:14.5px;font-weight:700;min-width:0;overflow-wrap:anywhere}
.panel-head .right{margin-left:auto;display:flex;gap:8px;align-items:center}
.mode-badge{font-size:10.5px;font-weight:700;letter-spacing:.4px;text-transform:uppercase;padding:3px 8px;border-radius:20px;background:var(--surface-2);color:var(--text-3);border:1px solid var(--line)}
.mode-badge.ai{background:var(--blue-50);color:var(--blue-700);border-color:var(--blue-100)}
.panel-body{padding:16px}

.tabs{display:inline-flex;gap:4px;background:var(--surface-2);padding:4px;border-radius:9px;margin-bottom:16px;flex-wrap:wrap}
.tab{padding:6px 13px;border-radius:7px;font-size:12.5px;font-weight:600;color:var(--text-2);display:flex;align-items:center;gap:6px;transition:.12s}
.tab:hover{color:var(--text)}
.tab.active{background:var(--green);color:#fff;box-shadow:none}
.field{margin-bottom:14px}
.field label{display:block;font-size:12px;font-weight:600;color:var(--text-2);margin-bottom:6px}
.input,.textarea,.select{width:100%;border:1px solid var(--line-strong);border-radius:9px;background:var(--surface);padding:9px 11px;font-size:13.5px;transition:.12s;color:var(--text)}
.input:focus,.textarea:focus,.select:focus{outline:none;border-color:var(--blue);box-shadow:0 0 0 3px rgba(37,99,235,.12)}
.textarea{resize:vertical;min-height:150px;line-height:1.55}
.counter{text-align:right;font-size:11.5px;color:var(--text-3);margin-top:5px}
.select{appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 11px center;padding-right:30px}
.drop{border:1.5px dashed var(--line-strong);border-radius:10px;background:var(--surface-2);padding:18px;text-align:center;color:var(--text-2);font-size:13px;transition:.15s;cursor:pointer}
.drop:hover,.drop.over{border-color:var(--blue);background:var(--blue-50);color:var(--blue-700)}
.drop .ic{width:34px;height:34px;border-radius:9px;background:#fff;border:1px solid var(--line);display:grid;place-items:center;margin:0 auto 8px;color:var(--blue)}
.drop b{color:var(--text);font-weight:600}
.drop small{display:block;margin-top:3px;color:var(--text-3);font-size:11.5px;line-height:1.45}
.pane{display:none}
.pane.show{display:block;animation:rise-in .22s ease both}

.sec-title{display:flex;align-items:center;gap:8px;font-size:13px;font-weight:700;margin:6px 0 12px;color:var(--text)}
.sec-title svg{color:var(--text-3)}
.seg{display:grid;grid-template-columns:repeat(3,1fr);gap:4px;background:var(--surface-2);padding:4px;border-radius:9px}
.seg button{padding:7px 4px;border-radius:7px;font-size:12.5px;font-weight:600;color:var(--text-2);transition:.12s}
.seg button:hover{color:var(--text)}
.seg button.active{background:var(--surface);color:var(--text);box-shadow:none}
.two{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-bottom:14px}
.check{display:flex;align-items:center;gap:9px;font-size:13px;color:var(--text);padding:5px 0;cursor:pointer}
.check input{width:16px;height:16px;accent-color:var(--blue);cursor:pointer}
.btn-create{width:100%;margin-top:6px;background:var(--ink);color:#fff;font-weight:600;font-size:14px;padding:12px;border-radius:10px;display:flex;align-items:center;justify-content:center;gap:9px;transition:.15s}
.btn-create:hover{background:#1e293b}
.btn-create:disabled{opacity:.7;cursor:progress}
.btn-create .spin{width:15px;height:15px;border:2px solid rgba(255,255,255,.35);border-top-color:#fff;border-radius:50%;animation:rot .7s linear infinite}
@keyframes rot{to{transform:rotate(360deg)}}
.hint{font-size:11.5px;color:var(--text-3);text-align:center;margin-top:9px}

.btn-ghost{display:flex;align-items:center;gap:6px;padding:7px 11px;border:1px solid var(--line);border-radius:8px;font-size:12.5px;font-weight:600;color:var(--text-2);background:var(--surface);transition:.12s}
.btn-ghost:hover{border-color:var(--line-strong);color:var(--text);background:var(--surface-2)}
.toolbar{display:flex;align-items:center;gap:2px;padding:8px 16px;border-bottom:1px solid var(--line);flex-wrap:wrap}
.tb{width:30px;height:30px;border-radius:7px;display:grid;place-items:center;color:var(--text-2);font-size:14px;transition:.12s}
.tb:hover{background:var(--surface-2);color:var(--text)}
.tb.b{font-weight:800}
.tb.i{font-style:italic;font-family:Georgia,serif}
.tb sub,.tb sup{font-size:10px}
.toolbar .edit-toggle{margin-left:auto;display:flex;align-items:center;gap:7px;font-size:12.5px;color:var(--text-2);font-weight:500}
.dl-menu{top:38px;right:0;min-width:150px}
.doc{padding:26px 30px 18px;min-width:0;overflow-wrap:anywhere}
.doc[contenteditable="true"]{outline:2px solid var(--blue-100);outline-offset:-4px;border-radius:8px}
.doc-top{display:flex;align-items:center;gap:10px;margin-bottom:14px}
.tag{background:var(--blue);color:#fff;font-size:10.5px;font-weight:700;letter-spacing:.5px;padding:3px 9px;border-radius:6px;text-transform:uppercase}
.doc-top .meta{font-size:12px;color:var(--text-3)}
.doc-top .sheet{margin-left:auto;font-size:11.5px;color:var(--text-3);font-weight:600}
.doc h1.dt{font-size:25px;font-weight:800;letter-spacing:-.5px;line-height:1.2;margin-bottom:8px;overflow-wrap:anywhere;word-break:normal}
.doc .dmeta{font-size:12.5px;color:var(--text-3);margin-bottom:22px;display:flex;gap:6px;flex-wrap:wrap}
.doc .dmeta span:not(:last-child)::after{content:"·";margin-left:6px;color:var(--line-strong)}
.blk{margin-bottom:20px}
.blk-h{display:flex;align-items:center;gap:8px;font-size:14px;font-weight:700;margin-bottom:9px}
.blk-h svg{color:var(--blue)}
.blk p{font-size:13.5px;color:var(--text-2);line-height:1.65;margin-bottom:8px}
.formula{background:var(--blue-50);border:1px solid var(--blue-100);border-left:3px solid var(--blue);border-radius:9px;padding:14px 16px;text-align:center}
.formula .cap{font-size:12px;color:var(--blue-700);font-weight:600;margin-bottom:7px;display:flex;align-items:center;justify-content:center;gap:6px}
.formula .eq{font-size:18px;font-weight:700;color:var(--ink);letter-spacing:.3px;font-family:"Cambria Math",Georgia,serif}
.formula .sub{font-size:11.5px;color:var(--text-3);margin-top:7px}
.cols{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.col-card{border:1px solid var(--line);border-radius:9px;padding:13px 14px;background:var(--surface)}
.col-card .ct{font-size:13px;font-weight:700;margin-bottom:7px;display:flex;align-items:center;gap:6px}
.col-card .ct .sq{width:8px;height:8px;border-radius:2px;background:var(--blue)}
.col-card.green .ct .sq{background:var(--green)}
.col-card p{font-size:12.5px;color:var(--text-2);line-height:1.55;margin-bottom:5px}
.col-card .res{font-size:12px;color:var(--text);font-weight:600;margin-top:4px}
ul.list{list-style:none;display:flex;flex-direction:column;gap:7px}
ul.list li{position:relative;padding-left:18px;font-size:13.5px;color:var(--text-2);line-height:1.55}
ul.list li::before{content:"";position:absolute;left:3px;top:8px;width:6px;height:6px;border-radius:50%;background:var(--blue)}
.quiz{background:var(--amber-50);border:1px solid var(--amber-100);border-radius:10px;padding:14px 16px}
.quiz .qh{display:flex;align-items:center;gap:8px;font-weight:700;font-size:13.5px;margin-bottom:10px}
.quiz-help-icon{width:17px;height:17px;border:1.7px solid currentColor;border-radius:50%;display:inline-grid;place-items:center;color:#b77900;font-size:11px;font-weight:800;line-height:1;flex:none}
.quiz .qh .pill{margin-left:auto;background:var(--amber-100);color:#92400e;font-size:11px;font-weight:700;padding:2px 9px;border-radius:20px}
.quiz-item{padding:9px 0}
.quiz-question{font-size:13px;color:var(--text-2);font-weight:600;line-height:1.5;margin-bottom:8px;overflow-wrap:anywhere}
.quiz-options{display:grid;gap:6px}
.quiz-option{width:100%;padding:8px 10px;border:1px solid var(--line);border-radius:8px;background:var(--surface);color:var(--text-2);text-align:left;font-size:12.5px;line-height:1.45;transition:background .15s,border-color .15s,color .15s,transform .15s}
.quiz-option:hover:not(:disabled){border-color:#eab308;color:#854d0e;background:#fff}
.quiz-option[aria-pressed="true"]{border-color:#eab308;color:#854d0e}
.quiz-option.correct{border-color:#86efac;color:#15803d;background:#f0fdf4}
.quiz-option.incorrect{border-color:#fca5a5;color:#b91c1c;background:#fef2f2}
.quiz-option:disabled{cursor:default}
.quiz-feedback{min-height:0;font-size:12.5px;font-weight:700;margin-top:5px}
.quiz-feedback:empty{display:none}
.quiz-feedback.correct{color:#15803d}
.quiz-feedback.incorrect{color:#b91c1c}
.quiz .q{display:flex;align-items:flex-start;gap:9px;font-size:13px;color:var(--text-2);padding:5px 0}
.quiz .q input{margin-top:2px;width:15px;height:15px;accent-color:var(--amber);flex:none}
#quizConfetti{position:fixed;inset:0;width:100%;height:100%;pointer-events:none;z-index:89}
.doc-foot{display:flex;align-items:center;justify-content:space-between;gap:12px;border-top:1px solid var(--line);padding:12px 16px;margin-top:6px;flex-wrap:wrap}
.doc-foot .loc{display:flex;align-items:center;gap:7px;font-size:12.5px;color:var(--text-2)}
.doc-foot .loc svg{color:var(--green)}
.btn-re{display:flex;align-items:center;gap:7px;padding:8px 13px;border:1px solid var(--line);border-radius:8px;font-size:12.5px;font-weight:600;color:var(--text);background:var(--surface);transition:.12s}
.btn-re:hover{border-color:var(--blue);color:var(--blue);background:var(--blue-50)}
.btn-re.on{border-color:#eab308;color:#d99a00;background:var(--surface);box-shadow:none}
.btn-re.on svg{fill:none;stroke:currentColor;animation:star-pop .24s ease both}
.btn-re.on:hover{border-color:#ca8a04;background:var(--surface);color:#ca8a04}
@keyframes star-pop{50%{transform:scale(1.22) rotate(-8deg)}}
.danger-btn:hover{border-color:var(--red);color:var(--red);background:var(--red-50)}
.doc-empty{padding:60px 30px;text-align:center;color:var(--text-3)}
.doc-empty .ic{width:54px;height:54px;border-radius:14px;background:var(--surface-2);display:grid;place-items:center;margin:0 auto 14px;color:var(--line-strong)}
.doc-empty b{display:block;color:var(--text-2);font-size:14px;margin-bottom:4px}
.progress{padding:40px 30px;text-align:center;color:var(--text-2)}
.progress .pic{width:46px;height:46px;border-radius:12px;background:var(--blue-50);color:var(--blue);display:grid;place-items:center;margin:0 auto 14px;animation:pulse 1.2s infinite}
.progress b{display:block;font-size:14px;color:var(--text);margin-bottom:10px}
.pbar{height:7px;border-radius:7px;background:var(--surface-2);overflow:hidden;max-width:320px;margin:0 auto}
.pbar i{display:block;height:100%;width:0;background:var(--blue);border-radius:7px;transition:width .2s}
.progress small{display:block;margin-top:9px;color:var(--text-3);font-size:12px}
.skel{padding:26px 30px}
.skel .l{height:13px;border-radius:6px;background:#e8edf3;animation:pulse 1.3s ease-in-out infinite;margin-bottom:13px}
.skel .l.t{height:24px;width:60%;margin-bottom:18px}
.skel .l.s{width:40%}
.skel .l.m{width:85%}

.lib-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:16px;padding-bottom:24px}
.lib-card{background:var(--surface);border:1px solid var(--line);border-radius:12px;padding:16px;text-align:left;transition:transform .18s ease,border-color .18s ease,box-shadow .18s ease;display:flex;flex-direction:column;gap:8px;box-shadow:var(--shadow-sm);animation:rise-in .3s ease both}
.lib-card:hover{border-color:var(--blue);box-shadow:var(--shadow);transform:translateY(-2px)}
.lib-card-open{width:100%;padding:0;border:0;background:transparent;color:inherit;text-align:left;display:flex;flex-direction:column;gap:8px;cursor:pointer;min-width:0}
.lib-card-delete{align-self:flex-end;position:absolute;top:10px;right:10px;width:32px;height:32px;display:grid;place-items:center;border:1px solid var(--line);border-radius:8px;background:var(--surface);color:var(--text-3);cursor:pointer;transition:color .15s,border-color .15s,background .15s}
.lib-card{position:relative;padding-right:48px}
.lib-card-delete:hover{color:var(--red);border-color:var(--red);background:var(--red-50)}
.lib-card .lc-top{display:flex;align-items:center;gap:8px}
.lib-card .lc-note-icon{width:32px;height:32px;border-radius:9px;display:grid;place-items:center;flex:none;background:#ecfdf5;color:#059669}
.lib-card .lc-note-icon svg{display:none}.lib-card .lc-note-icon::after{content:"▤";font-size:18px;font-weight:600;line-height:1}
.lib-card .lc-fav{margin-left:auto;color:var(--amber)}
.lib-card h3{font-size:15px;font-weight:700;line-height:1.3;overflow-wrap:anywhere}
.lib-card p{font-size:12.5px;color:var(--text-2);line-height:1.5;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.lib-card .lc-meta{margin-top:auto;font-size:11.5px;color:var(--text-3);display:flex;gap:8px;align-items:center}
.lib-empty{text-align:center;padding:60px 20px;color:var(--text-3)}
.lib-empty svg{margin:0 auto 12px;color:var(--line-strong)}
.lib-empty b{display:block;color:var(--text-2);font-size:15px;margin-bottom:4px}

.how{max-width:880px;padding-bottom:30px}
.how h2{font-size:20px;margin-bottom:18px}
.how-steps{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:14px}
.how-step{background:var(--surface);border:1px solid var(--line);border-radius:12px;padding:16px;box-shadow:var(--shadow-sm);transition:transform .18s ease,box-shadow .18s ease}
.how-step:hover{transform:translateY(-2px);box-shadow:var(--shadow)}
.how-step .hn{width:28px;height:28px;border-radius:8px;background:var(--blue-50);color:var(--blue-700);display:grid;place-items:center;font-weight:800;margin-bottom:10px}
.how-step h3{font-size:14.5px;margin-bottom:6px}
.how-step p{font-size:12.5px;color:var(--text-2);line-height:1.55}
.how-note{margin-top:18px;font-size:12.5px;color:var(--text-3);text-align:center}

.pagefoot{flex:none;background:var(--surface);border-top:1px solid var(--line);padding:11px 28px;display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:12.5px;color:var(--text-3)}
.pagefoot .rate{display:flex;align-items:center;gap:7px;color:var(--text-2);font-weight:500;cursor:pointer;transition:color .18s ease,transform .18s ease}
.pagefoot .rate:hover{color:var(--text)}
.pagefoot .rate:hover svg{transform:scale(1.12)}
.pagefoot .rate svg{transition:transform .18s ease}
.toast-host{position:fixed;bottom:22px;left:50%;transform:translateX(-50%);z-index:90;display:flex;flex-direction:column;gap:8px;align-items:center}
.toast{background:var(--ink);color:#fff;padding:10px 16px;border-radius:10px;font-size:13px;font-weight:500;box-shadow:0 8px 24px rgba(15,23,42,.25);display:flex;align-items:center;gap:9px;animation:tin .25s ease;max-width:90vw}
.toast.ok{background:var(--green-700)}
.toast.warn{background:#b45309}
.toast svg{flex:none}
@keyframes tin{from{opacity:0;transform:translateY(10px)}}
@keyframes fade-in{from{opacity:0}to{opacity:1}}
@keyframes rise-in{from{opacity:0;transform:translateY(7px)}to{opacity:1;transform:translateY(0)}}
.overlay{position:fixed;inset:0;background:rgba(15,23,42,.4);z-index:35;display:none}
.overlay.open{display:block}

.limit-card{display:flex;align-items:center;gap:11px;padding:11px 12px;border:1px solid var(--line);border-radius:10px;background:var(--surface);margin-top:auto}
.limit-icon{width:32px;height:32px;border-radius:9px;display:grid;place-items:center;background:var(--green-50);color:var(--green-700);flex:none}
.limit-icon svg{display:block;width:20px;height:20px}
.limit-card b{display:block;font-size:13px}.limit-card small{display:block;margin-top:1px;color:var(--text-3);font-size:11.5px}
.file-result{margin-top:12px;padding:12px;border:1px solid var(--line);border-radius:10px;background:var(--surface)}
.file-result-head{display:flex;align-items:center;gap:10px;text-align:left}.file-result-head>span:nth-child(2){min-width:0;flex:1}.file-result-head b,.file-result-head small{display:block;overflow-wrap:anywhere}.file-result-head small{color:var(--text-3);margin-top:2px;font-size:11.5px}
.file-result-icon{width:30px;height:30px;display:grid;place-items:center;border-radius:8px;background:var(--green-50);color:var(--green-700);font-weight:700;flex:none}
.file-change{white-space:nowrap;padding:7px 9px;font-size:12px}.file-result details{margin-top:10px;border-top:1px solid var(--line);padding-top:8px;color:var(--text-2);font-size:12px}.file-result summary{cursor:pointer;font-weight:600}.file-result pre{max-height:180px;overflow:auto;white-space:pre-wrap;overflow-wrap:anywhere;margin-top:8px;color:var(--text-2);font:inherit;font-size:12px}
.support-card{width:100%;max-width:none;background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:22px;box-shadow:var(--shadow-sm)}.support-card h2{font-size:20px}.support-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;border-bottom:1px solid var(--line);padding-bottom:16px}.support-card-head p,.support-intro{color:var(--text-2);margin:5px 0 0}.support-actions{display:flex;gap:8px;flex-wrap:wrap}.support-actions .active{background:var(--blue-50);border-color:var(--blue-100);color:var(--blue-700)}.support-intro{margin:18px 0}.ticket-form{max-width:none}.ticket-form .textarea{min-height:190px}.ticket-status{display:none;margin-top:10px;color:var(--green-700);font-weight:600}.ticket-status.visible{display:block}.ticket-replies{min-height:320px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:28px}.ticket-replies.hidden{display:none}.ticket-empty-icon{width:48px;height:48px;border-radius:14px;display:grid;place-items:center;background:var(--blue-50);color:var(--blue);font-size:24px;font-weight:700;margin-bottom:12px}.ticket-replies h3{font-size:16px}.ticket-replies p{max-width:460px;color:var(--text-2);margin:6px 0 16px}
@media(max-width:700px){.support-card{padding:16px}.support-card-head{flex-direction:column}.support-actions{width:100%}.support-actions .btn-ghost{flex:1;justify-content:center}.ticket-replies{min-height:240px}}
:root[data-theme="dark"]{color-scheme:dark;--bg:#111827;--surface:#1f2937;--surface-2:#273449;--line:#374151;--line-strong:#4b5563;--text:#f3f4f6;--text-2:#cbd5e1;--text-3:#94a3b8;--blue-50:#1e3a5f;--blue-100:#254a76;--green-50:#123a31;--green-700:#34d399;--amber-50:#3b3016;--amber-100:#5a4720;--red-50:#3b1f25;--ink:#0f172a;--shadow-sm:0 1px 2px rgba(0,0,0,.18);--shadow:0 1px 3px rgba(0,0,0,.25),0 8px 24px rgba(0,0,0,.2)}
:root{color-scheme:light}
:root[data-theme="dark"] .dev-notice{background:#35272b;color:#f5dce0;border-color:#63434a;box-shadow:0 5px 18px rgba(0,0,0,.22)}
:root[data-theme="dark"] .dev-notice-icon{border-color:#d0959e}
:root[data-theme="dark"] .dev-notice-heading span{color:#d8adb2}
:root[data-theme="dark"] .dev-notice-list{color:#f0d3d7}
:root[data-theme="dark"] .btn-create:hover{background:#1e293b}

.ticket-replies.ticket-list-view:not(.hidden){display:block;min-height:0;text-align:left;padding:18px 0 0}
.ticket-replies.ticket-list-view.hidden{display:none}
.support-ticket-list{display:grid;gap:14px;width:100%}
.support-ticket-item{border:1px solid var(--line);border-radius:12px;padding:16px;text-align:left;background:var(--surface)}
.support-ticket-item>header{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding-bottom:12px;border-bottom:1px solid var(--line)}
.support-ticket-item>header>div{display:grid;gap:5px}.support-ticket-item>header strong{font-size:14px}.support-ticket-item>header small,.support-thread-message small{color:var(--text-2);font-size:12px}
.support-ticket-status{padding:4px 8px;border-radius:999px;background:var(--blue-50);color:var(--blue-700);font-size:11px;white-space:nowrap}.support-ticket-status.active{background:var(--amber-50,#fff7e6);color:var(--amber-700,#a86c12)}.support-ticket-status.closed{background:var(--green-50,#eaf7ef);color:var(--green-700)}
.support-thread-messages{display:grid;gap:10px;padding:14px 0}.support-thread-message{max-width:90%;padding:10px 12px;border-radius:10px;background:var(--surface-2);text-align:left}.support-thread-message.from-admin{margin-left:auto;background:var(--blue-50)}.support-thread-message strong{font-size:12px}.support-thread-message p{white-space:pre-wrap;overflow-wrap:anywhere;margin:5px 0;color:var(--text)}.support-thread-reply{display:flex;align-items:flex-end;gap:10px}.support-thread-reply .textarea{min-height:56px;flex:1}.support-thread-reply .btn-ghost{flex:0 0 auto}.support-thread-reply button:disabled{opacity:.6;cursor:progress}
@media(max-width:700px){.support-ticket-item{padding:12px}.support-thread-reply{align-items:stretch;flex-direction:column}.support-thread-reply .btn-ghost{align-self:flex-end}}
:root[data-theme="dark"] .quiz-option:hover:not(:disabled){background:#273449;color:var(--text);border-color:#eab308}
:root[data-theme="dark"] .quiz-option.correct{background:#123a31;color:#6ee7b7;border-color:#059669}
:root[data-theme="dark"] .quiz-option.incorrect{background:#3b1f25;color:#fca5a5;border-color:#dc2626}
:root[data-theme="dark"] .quiz .qh .pill{color:#fde68a}
:root[data-theme="dark"] .quiz-help-icon{color:#fbbf24}
:root[data-theme="dark"] .quiz-option[aria-pressed="true"]{color:#fde68a;background:#3b3016;border-color:#d4a017}
:root[data-theme="dark"] .quiz-feedback.correct{color:#6ee7b7}
:root[data-theme="dark"] .quiz-feedback.incorrect{color:#fca5a5}
:root[data-theme="dark"] .quiz .q{color:var(--text-2)}
:root[data-theme="dark"] .auth-tab.active{box-shadow:none}
:root[data-theme="dark"] .auth-screen{background:#111827}:root[data-theme="dark"] .drop .ic{background:var(--surface)}:root[data-theme="dark"] .sb-item.active .count{background:#273449;color:#93c5fd}:root[data-theme="dark"] .quiz{background:var(--amber-50);border-color:var(--amber-100)}:root[data-theme="dark"] .quiz-option{background:var(--surface);color:var(--text)}

.btn-create:hover,.btn-new:hover,.btn-re:hover{transform:translateY(-1px)}
.btn-create:active,.btn-new:active,.btn-re:active{transform:translateY(1px) scale(.985)}

@media(prefers-reduced-motion:reduce){
  *,*::before,*::after{scroll-behavior:auto!important;animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}
}

@media(max-width:1180px){.grid-2{grid-template-columns:1fr}}
@media(max-width:920px){
  .topnav{display:none}
  .burger{display:flex}
  .sidebar{position:fixed;top:56px;bottom:0;left:0;z-index:38;transform:translateX(-100%);transition:.25s;box-shadow:var(--shadow)}
  .sidebar.open{transform:none}
  .workspace{padding:18px 16px 8px}
  .cols{grid-template-columns:1fr}
  .doc{padding:20px 18px}
  .panel-head{flex-wrap:wrap}
  .panel-head .right{flex-wrap:wrap;justify-content:flex-end}
}
@media(max-width:600px){
  .dev-notice{top:6px;width:calc(100% - 20px);gap:8px;margin:6px auto;padding:9px 11px}
  .dev-notice-heading{display:grid;gap:2px}
  .dev-notice-list{display:grid;gap:3px;margin-top:5px;padding-left:17px;font-size:12px}
  .topbar{gap:9px;padding:0 12px}
  .brand{font-size:15px;gap:7px}
  .topbar .spacer{min-width:0}
  .workspace{padding:14px 10px 8px}
  .ws-head{flex-direction:column;gap:8px}
  .ws-head h1{font-size:19px}
  .stepper{gap:2px;margin-bottom:12px}
  .step{font-size:11.5px;padding:6px 7px;gap:5px}
  .panel-head{padding:12px}
  .panel-head .right{width:100%;margin-left:0;justify-content:flex-start}
  .panel-body{padding:12px}
  .two{grid-template-columns:1fr}
  .doc{padding:18px 14px}
  .doc h1.dt{font-size:21px}
  .doc-foot{align-items:flex-start;padding:10px 12px}
  .pagefoot{padding:10px 12px}
}
@media print{
  .dev-notice,.topbar,.sidebar,.pagefoot,.toast-host,.overlay,.auth-screen,.modal,.app-dialog,#quizConfetti,.ws-head,.stepper,.grid-2>section:first-child,.panel-head,.toolbar,.doc-foot{display:none!important}
  body,.shell,.workspace,#workView,.grid-2,.panel{display:block!important;background:#fff;padding:0;margin:0;overflow:visible;box-shadow:none;border:none}
  .doc{padding:0}
}
