:root{--surface:#fff;--canvas:#f3f6fb;--ink:#18263e;--muted:#64748b;--brand:#5046d4;--border:#e3e9f1;--shadow:0 12px 35px rgba(26,42,77,.06)}
body{background:var(--canvas);color:var(--ink)}
.header{background:rgba(255,255,255,.96);border-color:var(--border);box-shadow:0 4px 20px rgba(25,40,70,.04)}
.brand-icon{background:linear-gradient(145deg,#7065ed,#4636c3);box-shadow:0 7px 16px #5142c944}
.nav nav a:not(.nav-button){padding:8px 4px}.nav nav a:hover{color:var(--brand)}
.bookmark-nav a{display:inline-flex;align-items:center;padding:7px 13px;background:#fff;border:1px solid var(--border);border-radius:10px;font-size:12px}
.hero{background:linear-gradient(120deg,#e9e7ff 0%,#f1f6ff 55%,#e4f5f1 100%);border:1px solid #e1e6f5;box-shadow:var(--shadow)}
.hero-badge{box-shadow:0 4px 14px #5958b010}.hero h1{color:#1e2c49}.hero h1 span{color:var(--brand)}
.panel,.lesson-card,.stat{border-color:var(--border);box-shadow:var(--shadow)}
.lesson-card:hover{border-color:#c5c5f5;box-shadow:0 16px 40px #27365b18}.card-art{background:linear-gradient(135deg,#e2e1ff,#e5f2f6)}
.card-content h3{color:#202d48}.card-content p{color:#68788d}.pill{border-radius:99px}.chip,.tags a{border-color:#dfe6f0}.chip:hover,.tags a:hover{border-color:#aaa3ed;color:var(--brand)}
button,.button{background:linear-gradient(135deg,#6558e5,#4d42c8);box-shadow:0 4px 10px #5046d426;transition:filter .15s,transform .15s}button:hover,.button:hover{transform:translateY(-1px)}button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible,summary:focus-visible{outline:3px solid #a9a3fa;outline-offset:2px}.ghost,.secondary{box-shadow:none}.ghost{background:#fff}.secondary{background:#edebff;color:#5046c5}
.form input:not([type=checkbox]),.form textarea,.form select{border-color:#dce4ee;background:#fcfdff}.form label{color:#40516a;font-size:13px}
.workspace-menu{display:grid;grid-template-columns:1fr;gap:10px;margin:24px 0}.workspace-menu>div{display:flex;gap:7px;padding:10px 14px;border-color:var(--border);box-shadow:0 5px 20px #1b28470a}.workspace-menu strong{min-width:75px;color:#68788d;font-size:12px}.workspace-menu a{display:inline-flex;align-items:center;gap:7px;padding:8px 11px;background:transparent;color:#53637b;font-size:12px;font-weight:700}.workspace-menu a:hover,.workspace-menu a[aria-current=page]{background:#eeecff;color:var(--brand)}.workspace-icon{display:grid;place-items:center;width:25px;height:25px;border-radius:8px;background:#f1f2fa;color:var(--brand);font-size:15px}.workspace-menu a[aria-current=page] .workspace-icon{background:#dcd9ff}
.dashboard-intro{display:flex;justify-content:space-between;align-items:center;gap:20px;background:linear-gradient(115deg,#f0efff,#fff);border:1px solid #e3e1ff}.dashboard-intro h1{font-size:26px}.dashboard-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:16px;margin:18px 0 38px}.dashboard-card{display:flex;gap:15px;align-items:flex-start;padding:20px;border:1px solid var(--border);border-radius:16px;background:#fff;box-shadow:var(--shadow);transition:transform .15s,border-color .15s}.dashboard-card:hover{transform:translateY(-3px);border-color:#bdb8f0}.dashboard-card-icon{display:grid;place-items:center;flex:none;width:46px;height:46px;border-radius:14px;background:#eeecff;color:var(--brand);font-size:22px}.dashboard-card strong,.dashboard-card small{display:block}.dashboard-card small{color:var(--muted);margin-top:5px;line-height:1.7}
.workspace-icon svg{width:16px;height:16px}.dashboard-card-icon svg{width:23px;height:23px}
.tags .tag-separator{color:#7b899c;margin-inline:-4px}
.record-dates{display:flex;flex-wrap:wrap;gap:4px 18px;margin:10px 0;color:var(--muted);font-size:12px;line-height:1.8}.record-dates>span{display:inline-block}.record-dates strong{color:#53637b;font-weight:600}
.view-count{display:inline-flex;align-items:center;gap:5px;color:var(--muted);font-size:12px;white-space:nowrap}.view-count svg{width:17px;height:17px;flex:none}
.faq{border-color:#e8edf4}.faq>summary{list-style:none;padding:4px 0}.faq>summary::-webkit-details-marker{display:none}.faq>summary::before{content:'+';display:inline-grid;place-items:center;width:25px;height:25px;margin-left:10px;border-radius:8px;background:#f0efff;color:var(--brand);font-size:16px}.faq[open]>summary::before{content:'−'}
.timeline-card{border-color:#e0e7f0}.timeline-marker{background:#e8e6ff}.timeline::before{background:#d8d6f4}.resource-group>summary{font-size:15px}
.wizard{min-width:0;display:grid;gap:18px;padding:18px;border:1px solid #e2e8f2;border-radius:14px;background:#fbfcff}.wizard-progress{display:flex;align-items:stretch;gap:8px;margin:0;padding:0;list-style:none;overflow-x:auto}.wizard-progress li{display:flex;align-items:center;gap:7px;min-width:max-content;padding:7px 10px;border-radius:9px;background:#f0f3f8;color:#6e7d91;font-size:11px;font-weight:700}.wizard-progress li>span:first-child{display:grid;place-items:center;width:22px;height:22px;border-radius:50%;background:#fff;color:#718097}.wizard-progress .is-current{background:#e9e7ff;color:#4d42c8}.wizard-progress .is-current>span:first-child{background:#5d50db;color:#fff}.wizard-progress .is-complete{background:#e8f6f1;color:#268363}
.wizard-step{min-width:0;display:grid;gap:14px}.wizard-step h3{margin:0;color:#23334f;font-size:15px}.wizard-step p{margin:0}.wizard-step .rich-editor{margin-bottom:0}.wizard-step>img{max-width:140px}.wizard-actions{display:flex;flex-wrap:wrap;gap:9px;padding-top:15px;border-top:1px solid #e6ebf3}.wizard-actions button{min-width:112px}.wizard-review dl{display:grid;grid-template-columns:minmax(100px,150px) minmax(0,1fr);gap:8px 14px;margin:0}.wizard-review dt{color:#6d7b8e}.wizard-review dd{margin:0;overflow-wrap:anywhere;white-space:pre-wrap}.wizard [hidden]{display:none!important}
.lesson-wizard{padding:20px;border:1px solid var(--border);border-radius:16px;background:#fbfcff}.lesson-wizard [hidden]{display:none!important}.lesson-wizard .wizard-step>button{justify-self:start}.create-stage{display:grid;gap:13px;margin:12px 0;padding:18px;border:1px solid var(--border);border-radius:14px;background:#fff}.create-stage h4{margin:0}.create-stage-head{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap}.create-stage-head button{padding:7px 11px}.stage-texts{display:grid;gap:12px}.stage-texts button{margin-top:6px}.wizard-review .create-stage p{overflow-wrap:anywhere;white-space:pre-wrap}.create-stage button:disabled{opacity:.4;cursor:not-allowed}
.stage-content-groups{display:grid;gap:14px}.stage-content-group{display:grid;gap:12px;min-width:0;padding:18px;border:1px solid #e0e7f1;border-radius:14px;background:#f8faff}.stage-content-group h5{display:flex;align-items:center;gap:9px;margin:0;color:#27395b;font-size:15px}.stage-content-group h5 span{display:grid;place-items:center;width:34px;height:34px;border-radius:10px;background:#e9e7ff;color:var(--brand);font-size:18px}.stage-content-group p{color:var(--muted);font-size:12px}.stage-content-group>button{justify-self:start}.upload-previews{display:flex;flex-wrap:wrap;gap:12px}.upload-preview{display:grid;gap:5px;align-content:start;width:160px;padding:8px;border:1px solid #dfe6f0;border-radius:12px;background:#fff}.upload-preview-visual{display:grid;place-items:center;height:92px;overflow:hidden;border-radius:8px;background:#eef2f8}.upload-preview-visual img,.upload-preview-visual video{width:100%;height:100%;object-fit:cover}.upload-pdf{display:grid;place-items:center;width:54px;height:64px;border-radius:8px;background:#ffe8e8;color:#b83939;font-weight:800}.upload-preview strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px}.upload-preview small{color:var(--muted);font-size:11px}.upload-preview button{justify-self:start;padding:4px 9px;font-size:11px}.upload-status{display:grid;gap:8px;padding:15px;border:1px solid #dcdaf9;border-radius:12px;background:#f4f3ff}.upload-status progress{width:100%;height:12px;accent-color:var(--brand)}.upload-status [role=status]{font-size:12px;color:#53637b}
.create-stage-body{display:grid;gap:13px;min-width:0}.create-stage-head .create-stage-toggle{display:flex;align-items:center;justify-content:flex-start;gap:12px;flex:1;min-width:160px;padding:8px;background:transparent;color:#23334f;text-align:right}.create-stage-toggle h4{overflow-wrap:anywhere}.create-stage-indicator,.timeline-stage>summary::before{display:inline-grid;place-items:center;flex:none;width:34px;height:34px;border:1px solid #dcdaf6;border-radius:11px;background-color:#f1f0ff;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235046c5' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:center;background-size:18px;transition:transform .2s,background-color .2s,border-color .2s}.create-stage-toggle[aria-expanded="true"] .create-stage-indicator,.timeline-stage[open]>summary::before{transform:rotate(180deg);background-color:#e2e0ff;border-color:#c5c0f5}.create-stage-toggle:hover .create-stage-indicator,.timeline-stage>summary:hover::before{background-color:#e8e6ff;border-color:#bcb6ef}
.timeline-card .timeline-item-head{align-items:flex-start}.timeline-card details.timeline-stage{flex:1;min-width:0;margin:0}.timeline-stage>summary{display:flex;align-items:center;gap:10px;padding:5px 0;color:#23334f;font-size:14px;font-weight:700;overflow-wrap:anywhere;list-style:none}.timeline-stage>summary::-webkit-details-marker{display:none}.timeline-stage>summary::before{content:''}.timeline-stage[open]>summary{color:var(--brand)}
.timeline-grip{display:grid;place-items:center;flex:none;width:36px;height:36px;border:1px solid #dce4f0;border-radius:10px;background:#f5f7fb;color:#64748b;font-size:0;transition:background .15s,border-color .15s}.timeline-grip::before{content:'';width:18px;height:18px;background:currentColor;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='9' cy='5' r='1.7'/%3E%3Ccircle cx='15' cy='5' r='1.7'/%3E%3Ccircle cx='9' cy='12' r='1.7'/%3E%3Ccircle cx='15' cy='12' r='1.7'/%3E%3Ccircle cx='9' cy='19' r='1.7'/%3E%3Ccircle cx='15' cy='19' r='1.7'/%3E%3C/svg%3E") center/contain no-repeat}.timeline-grip:hover{background:#eaeefe;border-color:#b7b2ed;color:#5046c5}.timeline-move button,.create-stage-head [data-move]{width:36px;height:36px;min-width:36px;padding:0;font-size:0}.timeline-move button::before,.create-stage-head [data-move]::before{content:'';width:19px;height:19px;background:currentColor;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 19V5M6 11l6-6 6 6'/%3E%3C/svg%3E") center/contain no-repeat}.timeline-move .move-down::before,.create-stage-head [data-move="down"]::before{transform:rotate(180deg)}
.saved-resource-thumbnail{display:grid;place-items:center;width:160px;height:100px;margin:10px 0;overflow:hidden;border:1px solid #dfe6f0;border-radius:10px;background:#eef2f8}.saved-resource-thumbnail video,.saved-resource-thumbnail img{width:100%;height:100%;object-fit:cover}
.saved-resource-thumbnail canvas,.upload-preview-visual canvas{max-width:100%;max-height:100%;object-fit:contain;background:#fff;box-shadow:0 2px 8px #22324a30}
.saved-resource-thumbnail,.upload-preview-visual{position:relative}.pdf-thumbnail-badge{position:absolute;inset-inline-start:6px;bottom:6px;padding:2px 6px;border-radius:5px;background:#b42332;color:#fff;font-size:10px;font-weight:800;line-height:1.5;box-shadow:0 2px 5px #17253d30}
a.upload-preview-visual,a.saved-resource-thumbnail{cursor:pointer;outline-offset:3px;transition:box-shadow .15s,transform .15s}a.upload-preview-visual:hover,a.saved-resource-thumbnail:hover{box-shadow:0 0 0 3px #a9a3fa;transform:translateY(-2px)}
.file-preview-dialog{width:min(1100px,94vw);max-width:none;height:min(820px,90vh);max-height:90vh;padding:0;overflow:hidden;text-align:right}.file-preview-header{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px 18px;border-bottom:1px solid var(--border)}.file-preview-header button{width:auto;margin:0}.file-preview-content{display:flex;align-items:center;justify-content:center;flex-direction:column;gap:16px;height:calc(100% - 66px);padding:12px;background:#f4f6fa}.file-preview-content img,.file-preview-content video{max-width:100%;max-height:100%;object-fit:contain}.file-preview-content iframe{width:100%;height:100%;border:0;background:#fff}.file-preview-content p{text-align:center}
.file-preview-dialog{display:flex;flex-direction:column}.file-preview-dialog:not([open]){display:none}.file-preview-shell{display:flex;flex-direction:column;width:100%;height:100%;min-height:0;background:#fff}.file-preview-shell:fullscreen{width:100vw;height:100vh;background:#fff}.file-preview-dialog.is-expanded{position:fixed;inset:0;width:100vw;height:100vh;max-width:none;max-height:none;margin:0;border-radius:0}.file-preview-toolbar{display:flex;align-items:center;gap:6px;flex-wrap:wrap;padding:8px 14px;border-bottom:1px solid var(--border);background:#fff}.file-preview-toolbar button{width:36px;height:36px;margin:0;padding:0;font-size:19px;line-height:1;box-shadow:none}.file-preview-zoom{min-width:48px;text-align:center;color:#40516a;font-weight:700;direction:ltr}.file-preview-hint{color:#64748b;font-size:12px}.file-preview-content{flex:1;min-height:0;height:auto;overflow:hidden}.file-preview-content .file-preview-image{cursor:grab;touch-action:none;user-select:none;transform-origin:center}.file-preview-content .file-preview-image.is-panning{cursor:grabbing}
.file-preview-header strong{min-width:0;overflow-wrap:anywhere}.file-preview-header .file-preview-toolbar{flex:1;justify-content:center;padding:0;border:0;background:transparent}.file-preview-header>button{flex-shrink:0}@media(max-width:700px){.file-preview-header{flex-wrap:wrap;gap:8px}.file-preview-header .file-preview-toolbar{order:3;flex-basis:100%;justify-content:flex-start}}
.file-preview-toolbar .file-preview-download{width:auto;margin:0;white-space:nowrap}
.file-preview-content:has(.pdf-viewer){padding:0}.pdf-viewer{width:100%;height:100%;overflow:auto;text-align:center;padding:16px;box-sizing:border-box}.pdf-viewer canvas{display:block;margin:auto;max-width:none;background:white;box-shadow:0 2px 12px #0003}.pdf-viewer form{display:flex;justify-content:center;align-items:center;flex-wrap:wrap;gap:10px}.pdf-page-input{width:58px;min-width:0;text-align:center;direction:ltr}.pdf-page-count{white-space:nowrap;font-size:13px}
.upload-preview{width:min(100%,260px);gap:9px;padding:12px;box-shadow:0 4px 14px #27365b0a}.upload-preview-visual{height:120px}.upload-preview .upload-original-name{display:block;color:#52627a;font-size:11px}.upload-preview .upload-name-field{display:grid;gap:6px;color:#243957;font-size:12px}.upload-preview .upload-name-field input{min-width:0;padding:9px 10px;background:#fff;border-color:#bccbe0;font-size:13px}.upload-preview .upload-name-hint{line-height:1.7}.upload-preview .upload-name-result{padding:7px 9px;border-radius:8px;background:#edf7f1;color:#176240;overflow-wrap:anywhere;line-height:1.6}.upload-preview .upload-name-reset{padding:5px 9px;color:#45566d;font-size:11px}
.stage-file-name-card{margin:0;padding:16px;border:1px solid #dfe6f0;border-radius:12px;background:#fff}.stage-file-name-card .saved-resource-thumbnail{margin:0}.stage-file-name-card>small{color:#64748b}
.file-name-row{display:flex;align-items:center;gap:8px;min-width:0}.file-name-value{flex:1;min-width:0;overflow-wrap:anywhere;color:#263a57}.upload-preview .file-name-value{white-space:normal;overflow:visible}.file-name-row .file-name-icon{display:inline-grid;place-items:center;flex:none;width:34px;height:34px;margin:0;padding:0;border:1px solid #d8e2ef;border-radius:9px;background:#f2f6fc;color:#245b88;box-shadow:none}.file-name-icon::before{content:'';width:18px;height:18px;background:currentColor;mask:center/contain no-repeat}.file-name-edit::before{mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 20h9M16.5 3.5a2.1 2.1 0 0 1 3 3L8 18l-4 1 1-4Z'/%3E%3C/svg%3E")}.file-name-row .file-name-save{background:#e8f6ee;border-color:#c4e6d1;color:#126343}.file-name-save::before{mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2ZM7 3v6h9V3M7 21v-8h10v8'/%3E%3C/svg%3E")}.file-name-row .file-name-icon[hidden],.stage-file-name-field[hidden],.upload-preview [hidden]{display:none!important}
.thumbnail-fallback{display:grid;place-items:center;overflow:hidden;background:#e8f2fb;color:#183b56;text-align:center;font-weight:700;line-height:1.5}.thumbnail-fallback>span{display:-webkit-box;max-width:100%;overflow:hidden;overflow-wrap:anywhere;-webkit-box-orient:vertical;-webkit-line-clamp:3}.thumbnail-fallback-card{width:100%;height:100%;padding:16px;font-size:clamp(14px,2vw,19px)}.thumbnail-fallback-detail{width:100%;height:auto;aspect-ratio:16/9;max-height:360px;margin:20px 0;padding:24px;border-radius:12px;font-size:clamp(18px,3vw,28px)}.thumbnail-fallback-timeline{width:72px;height:54px;flex:none;padding:4px;border-radius:8px;font-size:9px;line-height:1.4}.timeline-link{gap:12px}.thumbnail-color-0{background:#e8f2fb;color:#183b56}.thumbnail-color-1{background:#f0ebfb;color:#382960}.thumbnail-color-2{background:#e2f5f3;color:#164d4a}.thumbnail-color-3{background:#fff3d9;color:#60430f}.thumbnail-color-4{background:#e6f5ed;color:#184a35}
.draft-bar{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;padding:12px 14px;border:1px solid #dfe6f0;border-radius:12px;background:#f5f8fc}.draft-bar [role=status]{color:#53637b;font-size:12px}.draft-bar button{font-size:12px;padding:7px 10px}
@media(max-width:650px){.workspace-menu>div{align-items:flex-start}.workspace-menu strong{width:100%}.workspace-menu a{font-size:11px}.dashboard-intro{align-items:flex-start;flex-direction:column}.dashboard-intro h1{font-size:22px}.wizard{padding:13px}.wizard-review dl{grid-template-columns:1fr;gap:3px}.wizard-review dd{margin-bottom:8px}.wizard-actions button{flex:1;min-width:100px}}
@media(max-width:650px){.lesson-create,.lesson-wizard{padding:12px}.lesson-wizard{gap:12px}.create-stage{min-width:0;padding:12px;margin:8px 0}.create-stage-head{gap:6px}.create-stage-head .create-stage-toggle{min-width:0;flex-basis:100%;padding:4px}.create-stage-head .actions{width:100%;justify-content:flex-end;gap:6px}.create-stage-body,.stage-content-groups,.stage-texts,.stage-content-group>label{min-width:0}.stage-content-group{padding:12px}.lesson-wizard input[type=file]{min-width:0;max-width:100%}.timeline-edit::before,.timeline-edit>.timeline-item>.timeline-marker{display:none}.timeline-edit .timeline-card{width:100%;padding:12px}.timeline-edit .timeline-item-head{flex-wrap:wrap;gap:8px}.timeline-edit .timeline-move{margin-inline-start:auto}.timeline-edit .timeline-stage{order:3;flex:1 0 100%}.timeline-edit .timeline-stage>summary{min-height:44px}.timeline-edit .stage-content-group{padding:12px}}
