/* 语文老师工作台 pages (site.css carries the shared base). Projection first: big readable text, calm colors. */
.workbench{--red:#b5483c;--amber:#b7791f;--blue:#3c6e9e;--purple:#7b5aa6;--soft:#f3f1e8}
.workbench .student-main{max-width:1280px}
.workbench h1{font-size:30px;line-height:1.3;margin:0 0 6px}
.workbench h2{font-size:19px;margin:0 0 10px}
.workbench h3{font-size:16px;margin:0 0 10px}
.workbench .muted{color:var(--muted);margin:0}
.workbench .hint{color:var(--muted);font-size:14px;margin:8px 0}
.workbench code{background:var(--soft);padding:1px 6px;border-radius:6px;font-size:.95em}
.workbench .big-code{font-size:1.15em;letter-spacing:2px;color:var(--ink)}
.workbench button,.workbench .button{flex:none}
.workbench .button.small,.workbench button.small{min-height:34px;padding:4px 12px;font-size:14px}
.workbench .link-button{background:none;border:0;color:var(--green);padding:2px 4px;min-height:0;font-weight:500}
.workbench .link-button:hover{background:none;color:var(--green-dark);text-decoration:underline}
.workbench .danger,.workbench button.danger{background:#fff;color:var(--red);border-color:#ecd3cf}
.workbench .danger-text{color:var(--red)}
.workbench .header-link{cursor:pointer;color:var(--ink);min-height:0;display:inline-flex;align-items:center}
.workbench .header-link:hover{background:#f1f5ee;color:var(--green-dark)}
.workbench .header-actions{display:flex;gap:12px;align-items:center}
.workbench .hint.center{text-align:center}
.workbench .notice{padding:12px 16px;border-radius:12px;background:#eef3ea;margin:0 0 16px}
.workbench .notice.error{background:#fbeceb;color:var(--red)}
.workbench .tag{display:inline-block;font-size:12px;padding:1px 8px;border-radius:999px;background:#eef3ea;color:var(--green-dark)}
.workbench .tag.off{background:#f7ebe0;color:#9a5b1f}
.workbench .badge{display:inline-block;min-width:24px;padding:1px 9px;border-radius:999px;background:var(--amber);color:#fff;font-size:13px;font-weight:650;text-align:center}

.wb-hero{text-align:center;padding:30px 0 10px}
.wb-hero h1{font-size:36px}
.wb-hero p{color:var(--muted);font-size:17px}
.wb-entry{display:grid;grid-template-columns:1fr 1fr;gap:24px;max-width:860px;margin:24px auto}
.wb-card{background:var(--white);border:1px solid var(--line);border-radius:18px;padding:22px 24px;box-shadow:var(--shadow)}
a.wb-card{color:var(--ink);display:block;transition:transform .15s,border-color .15s}
a.wb-card:hover{transform:translateY(-2px);border-color:#c9d6c3}
.wb-form{display:flex;flex-direction:column;gap:12px}
.wb-form label,.review-pane label{display:flex;flex-direction:column;gap:5px;font-size:14px;color:var(--muted);font-weight:550}
.wb-form label.check,.review-pane label.check{flex-direction:row;align-items:center;gap:8px;color:var(--ink);font-weight:500}
.wb-form input:not([type=checkbox]),.wb-form select,.wb-form textarea,.review-pane input,.review-pane select,.review-pane textarea{font:inherit;color:var(--ink);background:#fff;border:1px solid var(--line);border-radius:10px;padding:9px 12px;width:100%}
.wb-form textarea,.review-pane textarea{resize:vertical;line-height:1.7}
.wb-form button{align-self:flex-start}
.wb-row{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}
.wb-error{color:var(--red);margin:0;min-height:0;font-size:14px}
.wb-error:empty{display:none}

.wb-heading{display:flex;justify-content:space-between;align-items:flex-start;gap:20px;margin:6px 0 22px}
.wb-heading .heading-actions{display:flex;gap:10px;align-items:flex-start;flex-wrap:wrap;justify-content:flex-end}
.wb-form label[hidden]{display:none}
.intro-line{margin:4px 0 0;color:var(--ink);font-size:.92em}
.genre-pick{border:0;padding:0;margin:0;display:flex;flex-wrap:wrap;gap:6px 16px}
.genre-pick legend{font-weight:600;margin-bottom:6px;padding:0}
.requirement{background:var(--soft);border-radius:12px;padding:10px 14px;margin:10px 0 0;white-space:pre-wrap;max-width:760px}
.wb-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:20px}
.class-card h2{font-size:22px}
.class-card .badge{margin-top:12px}
.wb-section{margin:28px 0}
.wb-section-head{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:12px}
.wb-section-head h2{margin:0}
.wb-fold{margin-top:16px}
.wb-fold>summary,.wb-menu>summary{cursor:pointer;font-weight:650;color:var(--green)}
.wb-fold[open]>summary{margin-bottom:14px}
.wb-menu{position:relative}
.wb-menu>summary{list-style:none;border:1px solid var(--line);background:#fff;border-radius:10px;padding:9px 16px}
.wb-menu>summary::-webkit-details-marker{display:none}
.wb-menu[open]>*:not(summary){margin-top:10px}
.wb-menu[open]{background:var(--white);border:1px solid var(--line);border-radius:14px;padding:12px;box-shadow:var(--shadow);position:absolute;right:30px;z-index:5;width:min(520px,calc(100vw - 32px))}
.wb-menu[open]>summary{border:0;padding:0 0 4px}
.wb-menu[open] .wb-form{margin-bottom:12px}

.wb-table{width:100%;border-collapse:collapse;background:var(--white);border:1px solid var(--line);border-radius:14px;overflow:hidden}
.wb-table th,.wb-table td{padding:11px 14px;text-align:left;border-bottom:1px solid var(--line);vertical-align:middle}
.wb-table th{font-size:13px;color:var(--muted);font-weight:600;background:#fbfaf4}
.wb-table tr:last-child td{border-bottom:0}
.row-actions{white-space:nowrap;text-align:right}
.status{display:inline-block;font-size:13px;padding:2px 10px;border-radius:999px;background:var(--soft);color:var(--muted);white-space:nowrap}
.status-review{background:#fdf1dc;color:#8a5a12}
.status-published{background:#e3efe0;color:var(--green-dark)}
.status-failed{background:#fbeceb;color:var(--red)}
.status-queued,.status-grading{background:#e6eef7;color:var(--blue)}
.status-todo{background:var(--green);color:#fff}
.wb-list{display:flex;flex-direction:column;gap:14px;max-width:860px}
.assignment-card{display:flex !important;justify-content:space-between;align-items:center;gap:16px}
.assignment-card h2{margin:0 0 4px}
.attempts{display:flex;flex-direction:column;gap:6px;margin:0 0 16px}
.attempt{background:var(--white);border:1px solid var(--line);border-radius:12px;padding:9px 14px}
.wb-dialog{border:0;border-radius:18px;padding:24px;width:min(720px,calc(100vw - 32px));box-shadow:0 30px 80px #0003}
.wb-dialog::backdrop{background:#2f443866}
.fb-dot{display:inline-block;flex:none;width:8px;height:8px;border-radius:50%;background:#d9534f;vertical-align:middle}
.form-actions{display:flex;gap:10px;flex-wrap:wrap;align-items:center}

/* essay text and marks */
.essay-text{font-size:19px;line-height:2.1;letter-spacing:.5px;white-space:normal;word-break:break-all}
.essay-text.plain{white-space:pre-wrap}
.mk{border-radius:4px;padding:1px 0;cursor:pointer;color:inherit;text-decoration:none}
mark.mk{background:none}
.mk-typo{background:#fbe1dd !important;box-shadow:inset 0 -2px 0 var(--red)}
.mk-word,.mk-sentence{background:#fdecc8 !important;box-shadow:inset 0 -2px 0 var(--amber)}
.mk-punct{background:#e9e1f4 !important;box-shadow:inset 0 -2px 0 var(--purple)}
.mk-good{background:#dcefd7 !important;box-shadow:inset 0 -2px 0 var(--green)}
.mk-tip{background:#dfeaf5 !important;box-shadow:inset 0 -2px 0 var(--blue)}
.mk-soft{background:#f3efe6 !important;box-shadow:inset 0 -1px 0 var(--muted)}
.mk-para{background:#efe6f7 !important;box-shadow:inset 0 -2px 0 #8a5cb8}
.mk.active{outline:2px solid var(--ink);outline-offset:1px}
.mk sup{font-size:11px;color:var(--muted);margin-left:1px}
.legend{display:flex;flex-wrap:wrap;gap:10px;font-size:13px;margin:14px 0 0}
.legend .mk{padding:1px 6px;cursor:default}
.chip{display:inline-flex;align-items:center;border-radius:6px;padding:0 6px;font-size:13px}
.chip select{border:0 !important;background:transparent !important;padding:2px 0 !important;width:auto !important;font-size:13px;font-weight:650}

/* review page */
.review-layout,.result-layout{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(0,1fr);gap:22px;align-items:start}
.essay-pane{position:sticky;top:12px;max-height:calc(100vh - 24px);overflow:auto}
.pane-head{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:10px}
.pane-head h2{margin:0}
.review-pane,.result-pane{display:flex;flex-direction:column;gap:16px}
.review-pane label{margin-bottom:10px}
.score-total{display:flex;align-items:baseline;gap:8px;margin-bottom:10px}
.score-total strong{font-size:42px;line-height:1}
.score-total em{font-style:normal;font-size:20px;font-weight:700;color:var(--green-dark);background:#e3efe0;border-radius:10px;padding:2px 12px;margin-left:8px}
.dim-row{display:grid !important;grid-template-columns:3.5em 5em 2.5em 1fr;align-items:center;gap:8px !important;flex-direction:row !important;margin:0 0 6px !important}
.dim-row input{padding:5px 8px !important}
.dim-row em{font-style:normal;font-size:13px;font-weight:400;color:var(--muted)}
.flags{display:flex;flex-wrap:wrap;gap:6px}
.mark-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:10px}
.mark-item{border:1px solid var(--line);border-radius:12px;padding:10px 12px;background:#fff}
.mark-item.active{border-color:var(--green);box-shadow:0 0 0 2px #cfe0c9}
.mark-head{display:flex;align-items:center;gap:8px;margin-bottom:6px}
.mark-head q{flex:1;font-size:16px}
.mark-item label{flex-direction:row !important;align-items:center;margin:4px 0 0 !important}
.mark-item label input{padding:5px 9px !important}
.rejected{margin-top:16px;border-top:1px dashed var(--line);padding-top:12px}
.rejected h4{margin:0 0 8px;font-size:14px;color:var(--muted)}
.rejected ul{margin:0;padding-left:18px;display:flex;flex-direction:column;gap:8px;font-size:14px}
.example{background:var(--soft);border-radius:12px;padding:10px 14px;margin-top:6px}
.example p{margin:4px 0}
.review-actions{display:flex;gap:10px;align-items:center;justify-content:flex-end;position:sticky;bottom:0;background:linear-gradient(transparent,var(--paper) 30%);padding:14px 0 6px}
.save-status{color:var(--muted);font-size:14px;margin-right:auto}
.model-note{font-size:12px}
.waiting{display:flex;flex-direction:column;align-items:center;text-align:center;gap:4px;margin-bottom:18px}
.spinner{width:34px;height:34px;border-radius:50%;border:4px solid var(--line);border-top-color:var(--green);animation:spin 1s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}

/* result page */
.result-head{display:flex;justify-content:space-between;align-items:center;gap:20px;margin:6px 0 22px}
.level-badge{display:flex;flex-direction:column;align-items:center;justify-content:center;min-width:110px;min-height:110px;border-radius:50%;background:#e3efe0;color:var(--green-dark);text-align:center}
.level-badge strong{font-size:38px;line-height:1.1}
.level-badge small{font-size:13px}
.level-badge.level-良{background:#e6eef7;color:var(--blue)}
.level-badge.level-及格{background:#fdf1dc;color:#8a5a12}
.level-badge.level-待提高{background:#f3ece4;color:#8a5a3c}
.level-badge.level-待提高 strong{font-size:26px}
.summary{font-size:17px;line-height:1.9;margin:0}
.praise ul,.advice ul{margin:0;padding-left:20px;display:flex;flex-direction:column;gap:6px;font-size:16px}
.example .before{text-decoration:line-through;text-decoration-color:#c9a59f;color:var(--muted)}
.example .after{font-weight:550}
.dim-bar{display:grid;grid-template-columns:3em 1fr 4.5em;align-items:center;gap:10px;margin:8px 0}
.dim-bar .bar{height:10px;border-radius:999px;background:var(--soft);overflow:hidden}
.dim-bar .bar i{display:block;height:100%;background:var(--green);border-radius:999px}
.dim-bar em{font-style:normal;font-size:14px;color:var(--muted)}
.marks-view{margin-top:22px}
.marks-view ol{margin:0;padding-left:24px;display:grid;grid-template-columns:repeat(auto-fill,minmax(320px,1fr));gap:8px 24px}
.marks-view li{font-size:15px}
.marks-view li:target{background:#fff6d6;border-radius:8px}

/* 投屏讲评 */
.projection .site-header{min-height:60px;padding:10px 30px}
.projection .student-main{max-width:none;padding:8px 40px 30px}
.projection .essay-text{font-size:28px;line-height:2.1}
.projection h1{font-size:40px}
.projection .summary,.projection .praise ul,.projection .advice ul{font-size:22px}
.projection .marks-view li{font-size:20px}
.projection .site-footer{display:none}

@media(max-width:900px){
  .review-layout,.result-layout{grid-template-columns:1fr}
  .essay-pane{position:static;max-height:none}
  .wb-entry{grid-template-columns:1fr}
  .wb-row{grid-template-columns:1fr}
  .wb-heading,.result-head{flex-direction:column}
  .wb-heading .heading-actions{justify-content:flex-start}
  .wb-menu[open]{position:static;width:auto}
}
@media(max-width:600px){
  .workbench h1{font-size:24px}
  .wb-card{padding:16px}
  .essay-text{font-size:17px}
  .wb-table th:nth-child(3),.wb-table td:nth-child(3){display:none}
  .wb-table .col-time{display:none}
  .wb-table th,.wb-table td{padding:9px 8px}
  .level-badge{min-width:86px;min-height:86px}
  .level-badge strong{font-size:30px}
}
@media print{.site-header,.site-footer,.legend{display:none}.wb-card{box-shadow:none}}
.wb-table td{font-size:15px;color:var(--ink)}

/* header: the signed-in teacher or student */
.me-menu{position:relative}
.me-menu>summary{list-style:none;display:flex;align-items:center;gap:9px;cursor:pointer;border:1px solid var(--line);background:var(--white);border-radius:999px;padding:4px 14px 4px 4px;color:var(--ink);font-size:14px;font-weight:600}
.me-menu>summary::-webkit-details-marker{display:none}
.me-menu>summary:hover{border-color:#c9d6c3}
.me-avatar{width:34px;height:34px;border-radius:50%;object-fit:cover;flex:none;display:inline-grid;place-items:center;background:var(--green);color:#fff;font-weight:700;font-size:15px}
.me-avatar.big{width:96px;height:96px;font-size:40px}
.me-name{max-width:12em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.me-menu>summary .me-name:only-child{padding-left:10px}
.me-pop{position:absolute;right:0;top:calc(100% + 8px);z-index:20;background:var(--white);border:1px solid var(--line);border-radius:14px;box-shadow:var(--shadow);padding:6px;min-width:180px;display:flex;flex-direction:column}
.me-pop a,.me-pop button{display:block;width:100%;text-align:left;background:none;border:0;color:var(--ink);font-size:14px;font-weight:500;padding:10px 12px;border-radius:9px;min-height:0}
.me-pop a:hover,.me-pop button:hover{background:#f1f5ee;color:var(--green-dark)}
.avatar-edit{display:flex;align-items:center;gap:18px}
.avatar-edit .button{cursor:pointer;margin:0}

/* entry, sign-in and home */
.wb-entry.single{grid-template-columns:minmax(0,440px);justify-content:center}
.entry-card{display:flex !important;flex-direction:column;align-items:flex-start;gap:10px}
.entry-card h2{margin:4px 0 0;font-size:24px}
.entry-card .button{margin-top:8px}
.entry-icon{width:48px;height:48px;border-radius:15px;display:grid;place-items:center;background:#edf1e3;color:#6f8a5f;flex:none}
.entry-icon.student{background:#e8eff5;color:#5d819b}
.trial-card .button{margin-top:6px}
.feature-card{display:flex;flex-direction:column;gap:10px}
.feature-top{display:flex;gap:14px;align-items:center}
.feature-top h3{margin:0;font-size:20px}
.feature-state{margin:2px 0 0;font-size:14px;color:var(--green-dark)}
.feature-state strong{font-size:18px}
.feature-card.state-soon .feature-state{color:var(--amber)}
.feature-card.state-expired .feature-state{color:var(--red)}
.feature-card.state-none .feature-state{color:var(--muted)}
.feature-card.state-expired,.feature-card.state-none{background:#fbfaf6}
.feature-meta{margin:0;font-size:14px}
.feature-card .button{align-self:flex-start}
.class-card h3{font-size:21px;margin:0 0 6px}

/* tabs and photo picker */
.tabs{display:flex;gap:6px;background:var(--soft);padding:4px;border-radius:12px;align-self:flex-start;flex-wrap:wrap}
.tabs .tab{background:none;color:var(--muted);border:0;min-height:38px;padding:6px 14px;font-size:14px;border-radius:9px;flex:none}
.tabs .tab svg{width:18px;height:18px}
.tabs .tab.active{background:var(--white);color:var(--green-dark);box-shadow:0 1px 4px #0001}
.tabs .tab:hover{background:#fff8}
.photo-picker{display:flex;flex-wrap:wrap;gap:12px}
.photo-list{display:contents}
.photo-item{position:relative;margin:0;width:132px}
.photo-item img{width:132px;height:176px;object-fit:contain;background:var(--line);border-radius:12px;border:1px solid var(--line);display:block}
.photo-item figcaption{font-size:13px;color:var(--muted);text-align:center;margin-top:4px}
.photo-remove,.photo-crop{position:absolute;top:6px;right:6px;width:30px;height:30px;min-height:0;padding:0;border-radius:50%;background:#000a;color:#fff;font-size:18px;line-height:1}
.photo-crop{top:auto;right:auto;bottom:32px;left:50%;transform:translateX(-50%);width:auto;padding:0 12px;border-radius:15px;font-size:13px;white-space:nowrap}
.crop-dialog{border:0;border-radius:18px;padding:16px;width:min(720px,calc(100vw - 16px));max-width:none;height:92vh;height:92dvh;max-height:none;box-shadow:0 30px 80px #0003;box-sizing:border-box}
.crop-dialog[open]{display:flex;flex-direction:column;gap:8px}
.crop-dialog::backdrop{background:#2f4438b3}
.crop-dialog h2{margin:0;font-size:19px}
.crop-dialog .hint{margin:0}
.crop-dialog .form-actions{justify-content:flex-end;flex-wrap:nowrap}
.crop-dialog .form-actions button{white-space:nowrap;padding-left:14px;padding-right:14px}
.crop-stage{flex:1;min-height:0;display:flex;align-items:center;justify-content:center;padding:22px;box-sizing:border-box;background:#22302a;border-radius:12px;overflow:hidden}
.crop-sheet{position:relative;flex:none;user-select:none;-webkit-user-select:none}
.crop-sheet img{display:block;width:100%;height:100%;pointer-events:none}
.crop-shade{position:absolute;inset:0;overflow:hidden;pointer-events:none}
.crop-hole{position:absolute;box-shadow:0 0 0 4000px #0009}
.crop-box{position:absolute;box-sizing:border-box;border:2px solid #fff;cursor:move;touch-action:none}
.crop-handle{position:absolute;width:44px;height:44px;margin:-22px 0 0 -22px;display:block;touch-action:none}
.crop-handle::after{content:"";position:absolute;left:14px;top:14px;width:16px;height:16px;border-radius:50%;background:#fff;box-shadow:0 0 3px #0008}
.crop-nw{left:0;top:0;cursor:nwse-resize}.crop-n{left:50%;top:0;cursor:ns-resize}.crop-ne{left:100%;top:0;cursor:nesw-resize}.crop-e{left:100%;top:50%;cursor:ew-resize}
.crop-se{left:100%;top:100%;cursor:nwse-resize}.crop-s{left:50%;top:100%;cursor:ns-resize}.crop-sw{left:0;top:100%;cursor:nesw-resize}.crop-w{left:0;top:50%;cursor:ew-resize}
.resubmit-link{margin-top:28px;font-size:14px}
.photo-add{display:flex !important;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:6px;width:min(100%,320px);min-height:176px;border:2px dashed #c9d6c3;border-radius:14px;padding:16px;cursor:pointer;color:var(--green-dark) !important;background:#f7faf3}
.photo-add svg{width:40px;height:40px}
.photo-add span{font-size:17px;font-weight:700}
.photo-add small{font-size:13px;color:var(--muted);font-weight:400}
.photo-add.busy{opacity:.6;pointer-events:none}
.photo-add[hidden]{display:none !important}
.typed-alt>summary{cursor:pointer;color:var(--green);font-size:14px;margin:4px 0}
.photo-plain{display:block;max-width:100%;border-radius:12px;border:1px solid var(--line);margin:0 auto 14px}

/* red pen (static/redpen.js?v=0dc2bbdc) */
@font-face{font-family:RedPen;src:url(redpen-font.0924cd57.woff2) format('woff2');font-display:swap}
.redpen{position:relative;max-width:1040px;margin:0 auto}
.rp-page{position:relative;width:100%;margin:0 0 16px;border-radius:6px;overflow:hidden;box-shadow:0 6px 24px #344b3818;background:#fff}
.rp-page>svg{display:block;width:100%;height:auto}
.redpen .typed{fill:#2b2b2b;font-family:'Kaiti SC',STKaiti,KaiTi,serif}
.redpen .ink{fill:none;stroke:#d2342a;stroke-linecap:round;stroke-linejoin:round;opacity:.92}
.redpen .pen{fill:#d2342a;font-family:RedPen,'Kaiti SC',STKaiti,KaiTi,serif;paint-order:stroke;stroke:#fffdf7;stroke-width:.08em;stroke-linejoin:round}
.redpen .mark{cursor:pointer;outline:none}
.redpen .mark .hit{fill:transparent;stroke:none}
.redpen .mark:hover .ink,.redpen .mark:focus .ink{stroke:#a3170f}
.redpen .mark:focus .hit{fill:#d2342a14}
.rp-summary{background:#fffef8}
.rp-legend{display:flex;gap:6px 14px;flex-wrap:wrap;justify-content:center;font-size:13px;color:var(--muted);margin:4px 0 0}
.rp-legend span{white-space:nowrap;display:inline-flex;align-items:center;gap:2px}
.rp-legend .ink{fill:none;stroke:#d2342a;stroke-linecap:round;stroke-linejoin:round}
.rp-pop{position:absolute;z-index:10;max-width:min(320px,calc(100% - 16px));background:var(--white);border:1px solid #efd6d2;border-radius:12px;box-shadow:0 12px 32px #0002;padding:12px 14px;font-size:15px;line-height:1.7}
.rp-pop strong{display:inline-block;color:#d2342a;margin-right:8px}
.rp-pop p{margin:4px 0 0}
.rp-pop b{color:#d2342a}
.rp-export{display:flex;justify-content:center;gap:10px;margin:14px auto 0}
.redpen.compact{max-width:none}
.projection .redpen{max-width:min(1400px,100%)}
.correct-text{margin-top:16px}
.trial-next{margin-top:20px;max-width:860px;margin-left:auto;margin-right:auto}
.trial-terms{margin:0 0 16px;padding-left:1.2em;line-height:1.8}
.trial-old{max-width:860px;margin:28px auto 10px}
.trial-banner{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:6px 14px;padding:10px 16px;margin:0 0 16px;border-radius:12px;background:#fdf3dc;color:#7a5512;font-size:15px}
.trial-banner .link-button{color:#7a5512;font-weight:600}
.essay-pane .tabs{margin-bottom:12px}


@media(max-width:600px){
  .me-name{max-width:6em}
  .me-menu>summary{padding-right:10px}
  .photo-item{width:30%}
  .photo-item img{width:100%;height:auto;aspect-ratio:3/4}
}
.nowrap{white-space:nowrap}
/* header chip, feature cards, classes overview */
.header-chip{display:inline-flex;align-items:center;gap:6px;border:1px solid var(--line);background:var(--white);border-radius:999px;padding:6px 14px;color:var(--ink);font-size:14px;font-weight:600}
.header-chip svg{width:18px;height:18px;color:var(--green)}
.header-chip small{background:#eef3ea;color:var(--green-dark);border-radius:999px;padding:0 7px;font-size:12px}
.header-chip:hover{border-color:#c9d6c3;color:var(--green-dark)}
.feature-grid{grid-template-columns:repeat(auto-fill,minmax(320px,1fr))}
a.feature-card{display:flex}
.feature-go{margin-top:auto;align-self:flex-end;font-weight:650;color:var(--green)}
.feature-line.state-soon{color:var(--amber)}
.feature-line.state-expired{color:var(--red)}
.class-card-head{display:flex;justify-content:space-between;align-items:center;gap:10px}
.class-stats{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:14px 0 12px}
.class-stats dt,.class-stats dd{white-space:nowrap}
.stat-card{min-width:0}
.class-stats div{background:var(--soft);border-radius:10px;padding:8px 6px;text-align:center}
.class-stats dt{font-size:12px;color:var(--muted)}
.class-stats dd{margin:0;font-size:20px;font-weight:700}
.class-stats small{font-size:12px;color:var(--muted);font-weight:400}
.level-bar{display:flex;height:26px;border-radius:8px;overflow:hidden;font-size:12px;color:#fff;font-weight:600}
.level-bar span{display:flex;align-items:center;justify-content:center;white-space:nowrap;overflow:hidden;min-width:0;padding:0 4px}
.level-bar .lv-1{background:#4f8a5b}.level-bar .lv-2{background:#7ea86a}.level-bar .lv-3{background:#d3a548}.level-bar .lv-4{background:#c7685b}
.trial-list{list-style:none;padding:0;margin:12px 0 0;display:flex;flex-direction:column;gap:12px}
.trial-list li{display:flex;align-items:center;gap:12px}
.trial-list li>div{flex:1;min-width:0}
.trial-list small{display:block;color:var(--muted);font-size:13px;line-height:1.5}
.entry-icon.small{width:38px;height:38px;border-radius:12px}
.inline-filter{display:flex;align-items:center;gap:8px;font-size:14px;color:var(--muted);margin:0}
.inline-filter select{min-height:36px;padding:4px 10px}
.narrow-card{max-width:760px}
.narrow-card .wb-form+.wb-form{margin-top:12px}

.pdf-link-dialog h2{margin:0 0 8px}
.pdf-link-row{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin:12px 0}
.pdf-link-dialog .form-actions{justify-content:flex-end;margin:12px 0 0}
/* 使用帮助 */
.help-doc{max-width:760px;margin:0 auto}
.help-doc h2{font-size:18px;margin:0 0 10px}
.help-doc .wb-card+.wb-card{margin-top:16px}
.help-doc ol,.help-doc ul{margin:0;padding-left:1.4em}
.help-doc li{margin:8px 0;line-height:1.7}
.help-shot{margin:10px 0 14px}
.help-shot img{display:block;width:100%;max-width:300px;height:auto;border:1px solid var(--line);border-radius:12px}
.help-doc dt{font-weight:650;margin-top:12px}
.help-doc dt:first-of-type{margin-top:0}
.help-doc dd{margin:4px 0 0;line-height:1.7;color:var(--muted)}

@media(max-width:700px){
  .class-stats{grid-template-columns:repeat(2,1fr)}
  .feature-grid{grid-template-columns:1fr}
  .me-menu>summary .me-name:not(:only-child){display:none}
  .me-menu>summary:has(.me-avatar){padding-right:4px}
}
/* Phones: the buttons keep their words, the site name and the page-level link give way. */
@media(max-width:560px){
  .workbench .site-header:has(.me-menu) .brand>span:last-child{display:none}
  .workbench .header-link:has(+ .header-chip){display:none}
}
@media(max-width:440px){
  .workbench .header-actions{gap:6px;min-width:0}
  .header-chip{padding:6px 10px;white-space:nowrap}
  .help-link>span{display:none}
  .me-menu{min-width:0}
}

/* 布置作文: pick a unit from the textbook */
.unit-picker{border:1px dashed var(--line);border-radius:12px;padding:10px 14px 14px;margin:0;background:var(--soft)}
.unit-picker legend{float:left;width:100%;font-size:14px;color:var(--muted);padding:0;margin:0 0 8px}
.unit-picker legend+*{clear:both}
.rp-legend .rp-tip{flex-basis:100%;justify-content:center;color:#d2342a}
.table-tools{display:flex;justify-content:flex-end;margin:0 0 8px}
.table-tools label{display:flex;align-items:center;gap:8px;font-size:14px;color:var(--muted)}
.table-tools select{width:auto;min-height:34px;padding:4px 10px}
/* 班级作文报 shelf (class page, student home) */
.paper-shelf{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:14px;max-width:860px}
.paper-chip{position:relative;display:flex;flex-direction:column;gap:2px;padding:18px 18px 14px;border-radius:6px;color:var(--ink);background:#fbf6ea;border:1px solid #e6dcc2;border-top:4px solid #2c4a37;box-shadow:var(--shadow);transition:transform .15s}
.paper-chip:hover{transform:translateY(-2px);color:var(--ink)}
.paper-chip strong{font-family:RedPen,KaiTi,serif;font-weight:400;font-size:22px;color:#2c4a37;letter-spacing:1px;padding-right:58px}
.paper-chip small{color:var(--muted);font-size:13px}
.paper-chip-issue{position:absolute;top:14px;right:14px;color:#b5483c;border:2px solid #b5483c;border-radius:6px;padding:0 6px;font-size:13px;font-weight:700;transform:rotate(-6deg)}
.list-title{margin:28px 0 12px}
