.paper-homework-card { min-width: 0; padding: 16px 12px; background: #d96543; color: #211b19; border: 1px solid #ad462d; box-shadow: 0 12px 30px #4a2a231f; font-family: "Noto Sans TC", "Microsoft JhengHei", system-ui, sans-serif; }
.paper-homework-card--white { background: #fff; border-color: #382b27; }
.paper-card-column-all-received { margin-top: 6px; padding: 3px 8px; border: 1px solid #b7d5bf; border-radius: 4px; color: #276738; background: #e8f5e9; font: inherit; font-size: 12px; cursor: pointer; }
.paper-card-column-all-received:disabled { opacity: .5; cursor: default; }
.paper-card-column-all-received:focus-visible { outline: 2px solid var(--primary, #2563eb); outline-offset: 2px; }
.paper-print-dialog { box-sizing: border-box; width: min(1280px, calc(100vw - 40px)); height: min(880px, calc(100dvh - 40px)); max-height: none; padding: 20px; overflow: hidden; border: 1px solid var(--border, #ccd5df); border-radius: 8px; color: var(--text, #17202a); background: var(--surface, #fff); }
.paper-print-dialog[open] { display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 16px; }
.paper-print-workspace { display: grid; grid-template-columns: minmax(340px, .95fr) minmax(0, 1.3fr); gap: 20px; min-height: 0; }
.paper-print-settings { display: flex; flex-direction: column; gap: 12px; min-height: 0; min-width: 0; }
.paper-print-settings [data-print-status] { margin: 0; font-size: 13px; }
.paper-print-settings small { color: var(--muted, #64748b); }
.paper-print-highlight { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.paper-print-highlight:has(input:disabled) { color: var(--muted, #64748b); }
.paper-print-highlight input { width: 16px; height: 16px; margin: 0; accent-color: var(--primary, #2563eb); }
.paper-print-highlight input:focus-visible { outline: 2px solid var(--primary, #2563eb); outline-offset: 2px; }
.paper-print-dialog [hidden] { display: none !important; }
.paper-print-preview { display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 12px; min-height: 0; min-width: 0; }
.paper-print-preview-toolbar, .paper-print-preview-toolbar > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.paper-print-preview-toolbar [data-print-page-label] { min-width: 48px; text-align: center; font-variant-numeric: tabular-nums; }
.paper-print-dialog button:disabled { opacity: .45; cursor: default; }
.paper-print-dialog :is(button, select):focus-visible { outline: 2px solid var(--primary, #2563eb); outline-offset: 2px; }
.paper-print-dialog::backdrop { background: #15233a70; }
.paper-print-dialog header, .paper-print-options { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.paper-print-dialog header { justify-content: space-between; }
.paper-print-dialog button, .paper-print-dialog select { padding: 8px 12px; border: 1px solid var(--border, #ccd5df); border-radius: 6px; background: #fff; color: var(--text, #17202a); }
.paper-print-dialog iframe { box-sizing: border-box; display: block; width: 100%; height: 100%; min-height: 0; border: 1px solid var(--border, #ccd5df); background: #eef1f5; }
.paper-print-items { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; min-width: 0; min-height: 0; border: 0; color: #111; background: #fff; }
.paper-print-list-wrap { min-height: 0; overflow: auto; }
.paper-print-items legend { margin-bottom: 6px; font-size: 13px; }
.paper-print-selection-actions { display: flex; gap: 8px; }
.paper-print-selection-actions button { padding: 4px 12px; border: 1px solid #555; border-radius: 0; color: #111; }
.paper-print-list { width: 100%; min-width: 0; border-collapse: collapse; table-layout: fixed; color: #111; font: 15px/1.4 var(--hw-print-font); }
.paper-print-list caption { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.paper-print-list :is(th,td) { padding: 6px 8px; border: 1px solid #555; background: #fff; overflow-wrap: anywhere; vertical-align: middle; }
.paper-print-list thead th { position: sticky; top: 0; text-align: center; font-weight: 400; z-index: 1; }
.paper-print-list tbody th { font-weight: 400; text-align: left; }
.paper-print-list td { text-align: center; }
.paper-print-list label { display: block; cursor: pointer; }
.paper-print-list input { width: 16px; height: 16px; margin: 0; accent-color: #222; vertical-align: middle; cursor: pointer; }
.paper-print-list :is(input,label):focus-visible { outline: 2px solid #2563eb; outline-offset: 2px; }
.paper-print-select-col { width: 52px; }
.paper-print-subject-col { width: 16%; }
.paper-print-record-col { width: 30%; }
@media (max-width: 899px) {
  .paper-print-dialog { width: calc(100vw - 20px); height: calc(100dvh - 20px); padding: 12px; }
  .paper-print-workspace { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); gap: 12px; }
  .paper-print-items { max-height: 24dvh; }
  .paper-print-settings { gap: 8px; }
  .paper-print-list { font-size: 13px; }
}
/* Same paper card in the reader; only density changes, not markup or behavior. */
.hw-table-reader-body .paper-homework-card { min-width: 0; padding: 10px; box-shadow: none; }
.hw-table-reader-body .paper-card-top { min-height: 30px; flex-wrap: wrap; gap: 8px; }
.hw-table-reader-body .paper-card-identity > strong { font-size: 20px; }
.hw-table-reader-body :is(.paper-card-date, .paper-card-legend) { font-size: 14px; }
.hw-table-reader-body :is(.paper-card-subjects, .paper-card-assignments) { min-height: 28px; font-size: 14px; padding-bottom: 4px; flex-wrap: wrap; white-space: normal; }
.hw-table-reader-body .paper-card-grid thead th { height: auto; padding: 4px; font-size: 12px; line-height: 16px; }
.hw-table-reader-body .paper-card-grid thead strong { margin-top: 2px; font-size: 14px; }
.hw-table-reader-body .paper-card-table tbody :is(th,td) { height: var(--hw-overview-row-height, 24px); padding: 1px 4px; font-size: 14px; line-height: 16px; }
.hw-table-reader-body .paper-card-edit-toolbar { padding: 4px 8px; line-height: 16px; }
.hw-table-reader-body .paper-card-mark :is(button, .paper-card-mark-readonly) { min-height: 0; height: calc(var(--hw-overview-row-height, 24px) - 2px); line-height: calc(var(--hw-overview-row-height, 24px) - 2px); font-size: 17px; }
.paper-homework-card.hw-paper-followup { min-width: 0; padding: 0; border: 0; background: var(--surface); color: var(--text); box-shadow: none; font-family: var(--font); }
.hw-paper-followup .paper-card-top { min-height: 44px; flex-wrap: wrap; margin-bottom: 10px; }
.hw-paper-followup .paper-card-identity > strong { font-size: 24px; }
.hw-paper-followup .paper-card-date { font-size: 17px; }
.hw-paper-followup h3 { margin: 0; font-size: 20px; }
.hw-paper-metrics { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-bottom: 16px; font-size: 17px; line-height: 1.6; }
.hw-paper-metric--missing { color: #991b1b; }
.hw-paper-metric--provisional { color: #8a5300; }
.hw-paper-followup .hw-paper-followup-table { width: 100%; min-width: 0; border: 1px solid var(--hw-record-line); font-size: var(--hw-record-type); line-height: 1.5; }
.hw-paper-followup .hw-paper-followup-table :is(th,td) { height: auto; padding: 10px 12px; text-align: left; vertical-align: top; border: 1px solid var(--hw-record-line); overflow-wrap: anywhere; white-space: normal; }
.hw-paper-followup-table thead th { background: var(--hw-record-heading); color: var(--text); font-size: 14px; font-weight: 700; }
.hw-paper-followup-table .hw-student-no-column { width: 72px; min-width: 72px; }
.hw-paper-followup .hw-paper-followup-table .hw-student-no-column { white-space: nowrap; }
.hw-paper-followup-table .hw-student-name-column { width: 120px; min-width: 120px; }
.hw-paper-item-column { width: 24%; }
.hw-paper-count-column { width: 90px; }
.hw-paper-followup-table td.hw-paper-count { text-align: center; font-weight: 700; }
.hw-paper-student-list { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.hw-paper-student-entry { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 6px; }
.hw-paper-followup .hw-followup-item-label { flex-wrap: wrap; }
.hw-paper-followup .hw-missing-lookup { font-size: inherit; }
.hw-paper-followup .hw-followup-item-subject { font-size: 13px; }
.hw-paper-followup .hw-followup-state { font-size: 14px; }
.hw-paper-followup .hw-followup-state[data-state="provisional_missing"] { color: #8a5300; }
.hw-paper-pending { margin-top: 16px; padding-top: 12px; border-top: 1px solid #382b27; font-size: 15px; }
.hw-paper-day-note { margin: 12px 0 0; font-size: 14px; color: #8a5300; }
.hw-paper-pending summary { cursor: pointer; font-weight: 700; }
.hw-paper-pending-group { margin-top: 12px; }
.hw-paper-pending-group ul { margin: 6px 0 0; padding-left: 20px; }
.hw-paper-pending-group li { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0; }
.hw-paper-query-choices summary { cursor: pointer; color: var(--primary); font-weight: 700; }
.hw-paper-query-choices .hw-followup-choices { margin: 10px 0 0; }
.hw-paper-query-selection { display: flex; gap: 8px; margin-top: 10px; }
.hw-paper-query-selection button { padding: 6px 12px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--primary); cursor: pointer; }
@media (max-width: 640px) {
  .paper-homework-card.hw-paper-followup { padding: 0; }
  .hw-paper-followup .paper-card-identity { gap: 12px; white-space: normal; }
  .hw-paper-followup .paper-card-top { gap: 10px; }
  .hw-paper-followup h3 { font-size: 18px; }
  .hw-paper-metrics { font-size: 15px; }
  .hw-paper-followup .hw-paper-followup-table :is(th,td) { padding: 9px 6px; font-size: 15px; }
  .hw-paper-followup .hw-paper-followup-table thead th { font-size: 13px; }
  .hw-paper-followup-table .hw-student-no-column { width: 42px; min-width: 42px; }
  .hw-paper-followup-table .hw-student-name-column { width: 76px; min-width: 76px; }
  .hw-paper-count-column { width: 58px; }
  .hw-paper-item-column { width: 30%; }
  .hw-paper-followup .hw-missing-subject-group { grid-template-columns: 1fr; gap: 3px; }
}
.paper-card-top { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px; min-height: 54px; }
.paper-card-identity { display: flex; align-items: baseline; flex-wrap: wrap; gap: 20px; white-space: nowrap; }
.paper-card-identity > strong { font-size: 30px; line-height: 1; }
.paper-card-date { font-size: 19px; letter-spacing: .05em; }
.paper-card-assignments { display: flex; flex-wrap: wrap; align-items: baseline; gap: 7px; min-height: 46px; padding-bottom: 8px; font-size: 18px; }
.paper-card-assignments .paper-card-assignment-option.hw-subject-tag { width: auto; padding: 2px 3px; border: 0; background: var(--hw-subject-background, #f8fafc); font: inherit; font-weight: 400; cursor: pointer; }
.paper-card-assignments .paper-card-assignment-option.hw-subject-tag.is-current { font-weight: 900; text-decoration: underline; text-underline-offset: 5px; }
.paper-card-assignment-option:focus-visible { outline: 2px solid currentColor; outline-offset: 1px; }
.paper-card-assignment-focus { flex: 1 0 100%; font-size: 14px; color: var(--text-secondary, #536273); line-height: 1.5; }
.paper-card-legend { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; font-size: 17px; white-space: nowrap; min-width: 0; }
.paper-card-legend span { display: inline-flex; gap: 6px; align-items: baseline; }
.paper-card-legend b { font-weight: 700; }
.paper-card-marker-option { display: inline-flex; align-items: baseline; gap: 6px; padding: 3px 5px; border: 0; border-radius: 4px; background: transparent; color: inherit; font: inherit; cursor: pointer; }
.paper-card-marker-option:hover { background: #eef5ff; }
.paper-card-marker-option[aria-pressed="true"] { background: #eef5ff; color: #1d4ed8; text-decoration: underline; text-underline-offset: 5px; }
.paper-card-marker-option:focus-visible { outline: 2px solid #2563eb; outline-offset: 2px; }
.paper-card-legend span.paper-card-marker-option { cursor: default; }
.paper-card-all-received { flex: none; padding: 3px 8px; border: 0; border-radius: 4px; background: #eaf9ee; color: #166534; font: inherit; font-size: inherit; line-height: inherit; font-weight: 800; cursor: pointer; }
.paper-card-all-received:hover:not(:disabled), .paper-card-all-received:focus-visible { background: #d8f2df; outline: 2px solid #166534; outline-offset: 1px; }
.paper-card-all-received:disabled { opacity: .65; cursor: default; }
.paper-homework-card--white .paper-card-all-received { background: #eaf9ee; color: #166534; }
.paper-homework-card--white .paper-card-marker-option[data-paper-marker="absent"] { background: #eef2f6; color: #536273; }
.paper-homework-card--white .paper-card-marker-option[data-paper-marker="missing"] { background: #fee2e2; color: #991b1b; }
.paper-homework-card--white .paper-card-marker-option[data-paper-marker="sick"] { background: #fff1d6; color: #8a5300; }
.paper-homework-card--white .paper-card-marker-option[data-paper-marker="lost"] { background: #f0e8ff; color: #653c9e; }
.paper-homework-card--white .paper-card-marker-option[data-paper-marker="unknown"] { background: #e7eef7; color: #42566f; }
.paper-homework-card--white .paper-card-marker-option[aria-pressed="true"] { box-shadow: inset 0 0 0 2px currentColor; text-decoration-thickness: 2px; }
.paper-card-subjects { display: flex; flex-wrap: wrap; align-items: baseline; gap: 7px; min-height: 46px; font-size: 18px; }
.paper-card-subject-option { padding: 2px 3px; border: 0; border-radius: 4px; background: transparent; color: inherit; cursor: pointer; font: inherit; }
.paper-card-subjects .paper-card-subject-option.hw-subject-tag { width: auto; padding: 2px 3px; background: var(--hw-subject-background, #f8fafc); font-size: inherit; line-height: inherit; }
.paper-card-subject-option:hover { background: #ffffff40; }
.paper-card-subject-option.is-current { font-weight: 900; text-decoration: underline; text-underline-offset: 5px; }
.paper-card-subject-option:focus-visible { outline: 2px solid currentColor; outline-offset: 1px; }
.paper-homework-card--white .paper-card-subject-option:hover { background: #eef5ff; }
.paper-card-slash { padding: 0 1px; }
.paper-card-other { margin-left: auto; }
.paper-card-table { width: 100%; min-width: var(--paper-roster-min-width, 624px); table-layout: fixed; border-collapse: collapse; border: 2px solid #382b27; font-size: 17px; }
.paper-card-no-col { width: 2.7%; }
.paper-card-name-col { width: 9.5%; }
.paper-card-mark-col { width: 4.46%; }
.paper-card-table th, .paper-card-table td { height: 46px; padding: 2px 3px; border: 1.5px solid #382b27; text-align: center; }
.paper-card-table th { font-weight: 650; white-space: nowrap; overflow: hidden; }
.paper-card-number { font-variant-numeric: tabular-nums; }
.paper-card-table .paper-card-name { white-space: normal; overflow-wrap: anywhere; }
.paper-card-table :is(td, th).paper-card-student-muted { filter: grayscale(1); opacity: .62; }
.paper-card-table :is(td, th).paper-card-student-muted:is(:hover, :focus-within) { filter: none; opacity: 1; }
.paper-card-table .paper-card-number { font-size: 15px; }
.paper-homework-card--white [data-paper-student-cell] { cursor: pointer; }
.paper-homework-card--white [data-paper-student-cell]:hover { background: #eef5ff; }
.paper-card-mark { padding: 0 !important; }
.paper-card-mark-readonly { line-height: 44px; cursor: default !important; }
.paper-card-lookup { padding: 0; border: 0; background: transparent; color: var(--primary, #2563eb); font: inherit; font-weight: inherit; cursor: pointer; }
.paper-card-lookup:focus-visible { outline: 2px solid currentColor; outline-offset: 1px; }
.paper-card-mark :is(button, .paper-card-mark-readonly) { display: block; width: 100%; min-height: 44px; padding: 0; border: 0; background: transparent; color: inherit; cursor: pointer; font: inherit; font-size: 23px; font-weight: 750; }
.paper-card-mark :is(button, .paper-card-mark-readonly)[data-paper-mark-state="absent"] { font-size: 15px; }
.paper-card-mark button:hover, .paper-card-mark button:focus-visible { background: #ffffff45; outline: 2px solid #211b19; outline-offset: -3px; }
.paper-homework-card--white .paper-card-mark button:hover, .paper-homework-card--white .paper-card-mark button:focus-visible { background: #eef5ff; }
.paper-homework-card--white .paper-card-mark :is(button, .paper-card-mark-readonly)[data-paper-mark-state="received"] { background: #e8f5e9; color: #276738; }
.paper-homework-card--white .paper-card-mark :is(button, .paper-card-mark-readonly)[data-paper-mark-state="absent"] { background: #eef2f6; color: #536273; }
.paper-homework-card--white .paper-card-mark :is(button, .paper-card-mark-readonly)[data-paper-mark-state="missing"] { background: #fee2e2; color: #991b1b; }
.paper-homework-card--white .paper-card-mark :is(button, .paper-card-mark-readonly)[data-paper-mark-state="sick"] { background: #fff1d6; color: #8a5300; }
.paper-homework-card--white .paper-card-mark :is(button, .paper-card-mark-readonly)[data-paper-mark-state="lost"] { background: #f0e8ff; color: #653c9e; }
.paper-homework-card--white .paper-card-mark :is(button, .paper-card-mark-readonly)[data-paper-mark-state="unknown"] { background: #e7eef7; color: #42566f; }
.paper-card-all { font-family: serif; font-size: 30px; font-weight: 750; letter-spacing: .15em; }
.paper-card-grid { min-width: var(--paper-grid-min-width, 564px); }
.paper-card-grid thead th { height: 76px; background: #f8fafc; white-space: normal; overflow-wrap: anywhere; }
.paper-card-grid thead strong { display: block; margin-top: 6px; font-size: 18px; }
.paper-card-grid tbody th { text-align: left; padding-left: 8px; }
.paper-card-grid tbody td, .paper-card-grid tbody th { height: 50px; }
.paper-card-grid tbody tr.paper-card-student-muted > * { filter: grayscale(1); opacity: .62; }
.paper-card-grid tbody tr.paper-card-student-muted:is(:hover, :focus-within) > * { filter: none; opacity: 1; }
.paper-card-grid .paper-card-mark button { min-height: 49px; }
.paper-card-grid button[data-paper-mark-state=""] { color: #9ca3af; font-weight: 400; }
.paper-homework-card .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
@media print { .paper-homework-card { min-width: 0; zoom: 1 !important; padding: 0; border: 0; box-shadow: none; print-color-adjust: exact; -webkit-print-color-adjust: exact; } .paper-card-all-received { display: none; } .paper-card-table th, .paper-card-table td { height: 34px; } .paper-card-mark button { min-height: 32px; } }
@media print { .paper-card-marker-option, .paper-card-marker-option[aria-pressed="true"] { padding: 0; color: inherit; background: transparent; text-decoration: none; } }
.paper-card-edit-toolbar { display: flex; align-items: center; gap: 12px; padding: 10px 16px; font-size: 14px; border-top: 1px solid currentColor; }
.paper-card-edit-toolbar span { flex: 1; }
.paper-card-edit-toolbar button { font: inherit; padding: 6px 12px; cursor: pointer; }
.paper-card-edit-toolbar button:disabled { opacity: .5; cursor: default; }
.hw-mobile-homework { min-width: 0; padding: 0 0 90px; border: 0; box-shadow: none; background: var(--surface, #fff); color: var(--text, #111827); }
.hw-mobile-context, .hw-mobile-summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; }
.hw-mobile-context { font-size: 17px; }
.hw-mobile-context [data-paper-mobile-class] { padding: 8px 12px; border: 1px solid var(--border); background: #f8fafc; color: var(--text); font-weight: 700; }
.hw-mobile-subjects, .hw-mobile-assignments { display: flex; flex-wrap: wrap; gap: 8px; padding: 8px 0; }
.hw-mobile-homework button { min-height: 44px; font: inherit; border-radius: 8px; cursor: pointer; }
.hw-mobile-homework button:disabled { opacity: .55; cursor: default; }
.hw-mobile-homework button:focus-visible { outline: 3px solid var(--primary, #2563eb); outline-offset: 2px; }
.hw-mobile-subjects button { width: auto; padding: 8px 12px; border: 2px solid transparent; }
.hw-mobile-assignments button { padding: 8px 12px; background: #f8fafc; color: var(--text); border: 1px solid var(--border, #e5e7eb); }
.hw-mobile-subjects button[aria-pressed="true"], .hw-mobile-assignments button[aria-pressed="true"] { border-color: var(--primary, #2563eb); font-weight: 700; }
.hw-mobile-summary button { background: #eaf9ee; color: #166534; border: 1px solid #bbdfc5; padding: 8px 14px; }
.hw-mobile-filter { padding: 8px 12px; margin-bottom: 8px; background: #f8fafc; color: var(--text); border: 1px solid var(--border, #e5e7eb); }
.hw-mobile-filter[aria-pressed="true"] { background: var(--primary-soft, #eff6ff); color: var(--primary, #2563eb); border-color: currentColor; }
.hw-mobile-student-row { display: flex; align-items: stretch; border-bottom: 1px solid var(--border, #e5e7eb); }
.hw-mobile-student-row.paper-card-student-muted { filter: grayscale(1); opacity: .62; }
.hw-mobile-student-row.paper-card-student-muted:is(:hover, :focus-within) { filter: none; opacity: 1; }
.hw-mobile-student { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 12px 4px; background: transparent; border: 0; color: var(--text); text-align: left; }
.hw-mobile-number { width: 26px; flex: none; color: var(--text-secondary, #6b7280); font-variant-numeric: tabular-nums; }
.hw-mobile-student strong { min-width: 0; overflow-wrap: anywhere; }
.hw-mobile-state { margin-left: auto; flex: none; font-size: 13px; color: var(--text-secondary, #6b7280); padding: 5px 6px; border-radius: 6px; }
.hw-mobile-state small { display: block; font-size: 10px; }
.hw-mobile-state[data-paper-mark-state="received"] { background: #eaf9ee; color: #166534; }
.hw-mobile-state[data-paper-mark-state="missing"] { background: #fff1e5; color: #92400e; }
.hw-mobile-homework[data-paper-provisional="false"] .hw-mobile-state[data-paper-mark-state="missing"] { background: #fee2e2; color: #991b1b; }
.hw-mobile-state[data-paper-mark-state="absent"] { background: #eef2f6; color: #536273; }
.hw-mobile-state[data-paper-mark-state="sick"] { background: #fff1d6; color: #8a5300; }
.hw-mobile-state[data-paper-mark-state="lost"] { background: #f0e8ff; color: #653c9e; }
.hw-mobile-state[data-paper-mark-state="unknown"] { background: #e7eef7; color: #42566f; }
.hw-mobile-exception { width: 44px; flex: none; border: 0; background: transparent; color: var(--text-secondary); font-size: 24px !important; }
.hw-mobile-empty { padding: 24px 0; color: var(--text-secondary); }
.hw-mobile-homework[data-mobile-style="paper"] .hw-mobile-student-row { margin-bottom: 8px; border: 1px solid var(--border, #e5e7eb); border-radius: 10px; background: var(--surface-soft, #f8fafc); }
.hw-mobile-homework[data-mobile-style="paper"] .hw-mobile-student { padding: 14px 8px; }
.hw-mobile-homework[data-mobile-style="paper-grid"] .hw-mobile-roster { border: 1px solid var(--border, #cbd5e1); }
.hw-mobile-homework[data-mobile-style="paper-grid"] .hw-mobile-student-row:last-child { border-bottom: 0; }
.hw-mobile-homework[data-mobile-style="paper-grid"] .hw-mobile-student { padding: 0; gap: 0; }
.hw-mobile-homework[data-mobile-style="paper-grid"] .hw-mobile-number { width: 38px; padding: 14px 4px; align-self: stretch; display: flex; align-items: center; justify-content: center; border-right: 1px solid var(--border, #cbd5e1); }
.hw-mobile-homework[data-mobile-style="paper-grid"] .hw-mobile-student strong { padding: 10px 8px; }
.hw-mobile-homework[data-mobile-style="paper-grid"] .hw-mobile-state { align-self: stretch; display: flex; flex-direction: column; justify-content: center; border-radius: 0; border-left: 1px solid var(--border, #cbd5e1); max-width: 100px; flex-shrink: 1; }
.hw-mobile-homework[data-mobile-style="paper-grid"] .hw-mobile-exception { border-left: 1px solid var(--border, #cbd5e1); border-radius: 0; }
.hw-mobile-savebar { position: fixed; bottom: 0; left: 0; right: 0; z-index: 55; display: flex; align-items: center; gap: 8px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: var(--surface, #fff); border-top: 1px solid var(--border); box-shadow: 0 -4px 16px #0f172a0d; font-size: 13px; }
.hw-mobile-savebar span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.hw-mobile-savebar button { border: 1px solid var(--border); padding: 8px 10px; background: #f8fafc; color: var(--text); }
.hw-mobile-savebar [data-paper-save] { background: var(--primary, #2563eb); color: #fff; border-color: transparent; }
.hw-mobile-sheet-backdrop { position: fixed; inset: 0; z-index: 110; background: #0f172a70; display: flex; align-items: flex-end; }
.hw-mobile-sheet { width: 100%; max-height: 85dvh; overflow-y: auto; padding: 20px 20px calc(20px + env(safe-area-inset-bottom)); border-radius: 18px 18px 0 0; background: var(--surface, #fff); display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hw-mobile-sheet h3, .hw-mobile-sheet p, .hw-mobile-sheet [data-paper-mobile-sheet-close] { grid-column: 1 / -1; margin: 0; }
.hw-mobile-sheet p { color: var(--text-secondary); padding-bottom: 8px; }
.hw-mobile-sheet button { padding: 12px; border: 1px solid var(--border); background: #f8fafc; color: var(--text); }
.hw-mobile-sheet button[aria-pressed="true"] { border: 2px solid var(--primary); }
