:root {
  color-scheme: light;
  font-family: system-ui, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #24352f;
  background: #f1f5f2;
  --green: #245744;
  --muted: #52675d;
  --line: #d8e3da;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; line-height: 1.55; }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .56; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid #2f795b; outline-offset: 3px; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); line-height: 1.2; letter-spacing: -.03em; }
h2 { font-size: 1.17rem; }
h3 { font-size: .95rem; }
ul { list-style: none; margin: 0; padding: 0; }
.topbar { background: #203e32; color: #f2f9f4; }
.topbar-inner { width: min(100% - 40px, 1056px); min-height: 58px; margin: auto; display: flex; gap: 20px; align-items: center; font-size: .92rem; }
.topbar-inner span { border-left: 1px solid #678272; padding-left: 20px; }
.topbar .quiet { color: inherit; margin-left: auto; }
.back { text-decoration: none; }
.back:hover { text-decoration: underline; }
.workspace { width: min(100% - 40px, 1056px); margin: 0 auto 48px; }
.page-heading { padding: 42px 0 25px; }
.page-heading p, .unlock p { color: var(--muted); margin-top: 8px; }
.columns { display: grid; grid-template-columns: 1.14fr 1fr; gap: 18px; align-items: start; }
.panel { padding: 23px; background: #fff; border: 1px solid var(--line); border-radius: 13px; min-width: 0; }
.unlock { width: min(100%, 480px); }
.unlock label, #mini-link label, #web-link label { margin-top: 13px; }
.unlock .primary { margin-top: 16px; }
.section-head { display: flex; align-items: center; gap: 12px; justify-content: space-between; margin-bottom: 16px; }
label { display: block; margin-bottom: 4px; font-weight: 600; font-size: .91rem; }
input:not([type=checkbox]), select {
  display: block; width: 100%; min-height: 43px; padding: 8px 11px; border-radius: 6px;
  border: 1px solid #a8b9ae; background: white; color: inherit;
}
input[type=checkbox] { accent-color: var(--green); width: 17px; height: 17px; flex: 0 0 17px; }
.primary, .secondary, .quiet { border: 1px solid transparent; border-radius: 6px; padding: 8px 12px; font-weight: 650; }
.primary { background: var(--green); color: #fff; min-height: 42px; }
.primary:not(:disabled):hover { background: #193f30; }
.secondary { background: #f5f8f5; border-color: #a8b9ae; color: var(--green); }
.quiet { color: var(--green); background: transparent; font-size: .9rem; padding: 4px 6px; }
.quiet:not(:disabled):hover { text-decoration: underline; }
.hint { color: var(--muted); font-size: .85rem; margin-top: 6px; }
.hint:empty { display: none; }
.notice, .error { padding: 10px 13px; border-radius: 6px; background: #fff1df; color: #763c22 !important; }
.notice { margin-bottom: 16px; }
.error { margin: 10px 0; }
.fields { display: grid; gap: 10px; margin-top: 12px; }
.jump { border-top: 1px solid var(--line); margin-top: 17px; padding-top: 13px; }
.search { display: flex; gap: 8px; }
.search input { min-width: 0; }
.search button { flex-shrink: 0; }
.recipient-source { margin-bottom: 12px; }
.recipient-source select { min-width: 0; }
.roster-actions { margin-top: 10px; }
.roster-actions button { font-size: .88rem; }
.pagination { display: flex; justify-content: space-between; align-items: center; margin-top: 7px; color: var(--muted); font-size: .85rem; }
.count { background: #e4f0e7; color: var(--green); border-radius: 20px; padding: 3px 10px; font-size: .86rem; white-space: nowrap; }
.students { margin-top: 12px; max-height: 324px; overflow: auto; }
.students li + li, .result-items li + li { border-top: 1px solid var(--line); }
.student-row { display: flex; align-items: center; gap: 9px; padding: 8px 1px; margin: 0; cursor: pointer; overflow-wrap: anywhere; }
.student-row:has(:disabled) { cursor: default; }
.student-row:has(:disabled:not(:checked)) { color: var(--muted); }
.student-row > span { flex: 1; }
.student-row small, .result-items small { display: block; color: var(--muted); font-weight: 400; font-size: .83rem; }
.student-row em { font-style: normal; font-size: .78rem; font-weight: 400; flex-shrink: 0; }
.selection { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 12px; }
.selected { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.selected button { background: #edf4ef; border: 1px solid #cbded0; border-radius: 5px; padding: 3px 8px; color: var(--green); font-size: .84rem; overflow-wrap: anywhere; }
.actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 16px 0; padding: 13px 16px; border-radius: 8px; background: #e2eee6; }
.actions p { color: #385748; font-size: .9rem; }
.results p { color: var(--muted); }
.result-items { margin-top: 10px; max-height: 460px; overflow: auto; }
.result-items li { display: grid; grid-template-columns: 1fr auto; gap: 3px 12px; padding: 9px 0; overflow-wrap: anywhere; }
.result-items small { grid-column: 1 / -1; }
.result-items strong { color: var(--green); }
.result-items strong[data-problem] { color: #8a3f27; }
dialog { max-height: min(90vh, 760px); width: min(calc(100% - 24px), 535px); padding: 23px; border: 1px solid var(--line); border-radius: 13px; color: inherit; }
dialog::backdrop { background: #142a21a8; }
.message { padding: 14px 15px; margin-bottom: 16px; background: #eef5ef; border-left: 4px solid #6a957c; border-radius: 3px 7px 7px 3px; overflow-wrap: anywhere; }
#message-body { margin-top: 7px; white-space: pre-wrap; }
.message-link { margin-top: 10px; padding-top: 7px; border-top: 1px solid #c6d8cb; font-size: .85rem; color: var(--green); }
.confirm-students { max-height: 125px; overflow: auto; margin: 6px 0 14px; font-size: .88rem; color: var(--muted); }
.consent { display: flex; align-items: flex-start; gap: 7px; margin: 12px 0; }
.consent input { margin-top: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); }
@media (max-width: 690px) {
  .columns { grid-template-columns: 1fr; gap: 12px; }
  .panel { padding: 16px; }
  .page-heading { padding: 26px 0 19px; }
  .workspace, .topbar-inner { width: calc(100% - 26px); }
  .actions { flex-direction: column; align-items: stretch; }
  .topbar-inner, .topbar-inner span { gap: 11px; padding-left: 0; }
  .topbar-inner span { padding-left: 11px; }
}
