/* This file deliberately contains no rules outside the phone media query. */
@media (max-width: 767px), (max-width: 1023px) and (hover: none) and (pointer: coarse) {
  html:root .wuli-mobile-shell { flex-direction: column; min-height: 100svh; width: 100%; }
  html:root .wuli-mobile-shell > [code-path$="Layout.tsx:24:5"] { display: none; }
  html:root .wuli-mobile-shell > [code-path$="Pomodoro.tsx:171:7"] { position: fixed; inset: calc(5px + env(safe-area-inset-top, 0px)) 12px auto auto; z-index: 45; max-width: calc(100% - 146px); min-height: 42px; padding: 1px 5px; gap: 5px; box-shadow: none; border-color: var(--art-line); background: var(--art-surface); }
  html:root .wuli-mobile-shell [code-path$="Pomodoro.tsx:172:9"], html:root .wuli-mobile-shell [code-path$="Pomodoro.tsx:186:9"] { min-width: 34px; min-height: 40px; display: flex; align-items: center; justify-content: center; }
  html:root .wuli-mobile-shell [code-path$="Pomodoro.tsx:182:11"] { display: none; }
  html:root .wuli-mobile-shell [code-path$="Pomodoro.tsx:176:11"] { font-size: 11px; }
  html:root .wuli-mobile-shell > [code-path$="Layout.tsx:193:7"] { width: 100%; min-width: 0; margin-left: 0; padding: 14px 14px calc(90px + env(safe-area-inset-bottom, 0px)); background-size: auto, auto, 660px auto; }
  html:root .wuli-mobile-shell [code-path$="Layout.tsx:194:9"] { min-width: 0; max-width: 100%; }
  html:root .wuli-mobile-shell > [code-path$="Layout.tsx:198:7"] { position: static; align-self: flex-end; padding: 0 14px calc(76px + env(safe-area-inset-bottom, 0px)); margin-top: -66px; font-size: 10px; }
  .wuli-mobile-header { position: sticky; top: 0; z-index: 40; padding: env(safe-area-inset-top, 0px) 14px 8px; background: var(--art-surface); border-bottom: 1px solid var(--art-line); box-shadow: 0 3px 12px #00000006; }
  .wuli-mobile-header { transition: transform .18s ease, opacity .18s ease; }
  html:root .wuli-mobile-shell > [code-path$="Pomodoro.tsx:171:7"] { transition: transform .18s ease, opacity .18s ease; }
  .wuli-mobile-shell[data-wuli-mobile-header-hidden] .wuli-mobile-header,
  html:root .wuli-mobile-shell[data-wuli-mobile-header-hidden] > [code-path$="Pomodoro.tsx:171:7"] { transform: translate3d(0, calc(-100% - env(safe-area-inset-top, 0px) - 8px), 0); opacity: 0; pointer-events: none; }
  @media (prefers-reduced-motion: reduce) {
    .wuli-mobile-header, html:root .wuli-mobile-shell > [code-path$="Pomodoro.tsx:171:7"] { transition: none; }
  }
  .wuli-mobile-brand { display: flex; gap: 7px; align-items: center; min-height: 52px; max-width: calc(100% - 144px); color: var(--art-ink); white-space: nowrap; }
  .wuli-mobile-brand > span { font-size: 24px; line-height: 1; color: var(--art-accent); }
  .wuli-mobile-brand strong { font-size: 15px; letter-spacing: .2px; }
  .wuli-mobile-classbar { display: flex; align-items: center; gap: 9px; min-height: 40px; }
  .wuli-mobile-classbar label { flex: 0 0 auto; font-size: 11px; color: var(--art-muted); }
  .wuli-mobile-classbar select, .wuli-mobile-first-class { min-width: 0; flex: 1; height: 38px; border: 1px solid var(--art-line); border-radius: 9px; padding: 5px 9px; background: var(--art-canvas); color: var(--art-ink); font-size: 14px; font-weight: 600; }
  .wuli-mobile-manage-class { min-width: 44px; min-height: 40px; padding: 5px; font-size: 12px; color: var(--art-accent); background: transparent; }
  .wuli-mobile-bottom-nav { position: fixed; inset: auto 0 0; z-index: 40; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 3px; padding: 5px 9px calc(6px + env(safe-area-inset-bottom, 0px)); background: var(--art-surface); border-top: 1px solid var(--art-line); box-shadow: 0 -3px 16px #00000008; }
  .wuli-mobile-bottom-nav button { display: flex; min-width: 0; min-height: 50px; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border-radius: 10px; padding: 4px 2px; color: var(--art-muted); background: transparent; font-size: 11px; font-weight: 600; }
  .wuli-mobile-bottom-nav button > span:first-child { font-size: 20px; line-height: 1; }
  .wuli-mobile-bottom-nav button[aria-current="page"] { background: color-mix(in srgb, var(--art-accent) 11%, var(--art-surface)); color: var(--art-accent); }
  .wuli-mobile-menu-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .wuli-mobile-menu-grid button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 67px; padding: 8px 3px; border: 1px solid var(--art-line); border-radius: 10px; background: var(--art-canvas); color: var(--art-ink); font-size: 12px; overflow-wrap: anywhere; }
  .wuli-mobile-menu-grid button > span:first-child { font-size: 22px; line-height: 1; }
  .wuli-mobile-menu-grid button[aria-current="page"] { border-color: var(--art-accent); color: var(--art-accent); background: color-mix(in srgb, var(--art-accent) 9%, var(--art-surface)); }
  .wuli-mobile-account { display: flex; flex-wrap: wrap; gap: 5px 10px; align-items: center; margin-top: 16px; border-top: 1px solid var(--art-line); padding-top: 12px; color: var(--art-muted); font-size: 12px; overflow-wrap: anywhere; }
  .wuli-mobile-account strong { color: var(--art-ink); max-width: 100%; }
  .wuli-mobile-account > div { width: 100%; display: flex; gap: 8px; margin-top: 3px; }
  .wuli-mobile-account button, .wuli-mobile-themes button { min-height: 40px; border: 1px solid var(--art-line); border-radius: 8px; padding: 7px 11px; color: var(--art-accent); background: var(--art-surface); font-size: 12px; }
  .wuli-mobile-themes { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 12px; color: var(--art-muted); font-size: 11px; }
  .wuli-mobile-themes button { padding: 6px 9px; }
  .wuli-mobile-themes button[aria-pressed="true"] { border-color: var(--art-accent); color: var(--art-on-accent); background: var(--art-accent); }
  .wuli-mobile-disclosure { min-width: 0; margin: 12px 0; border: 1px solid var(--art-line); border-radius: 12px; background: var(--art-surface); color: var(--art-ink); }
  .wuli-mobile-disclosure > summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 46px; padding: 10px 12px; cursor: pointer; font-size: 13px; font-weight: 600; }
  .wuli-mobile-disclosure > summary::-webkit-details-marker { display: none; }
  .wuli-mobile-disclosure > summary small { font-size: 11px; font-weight: 400; color: var(--art-accent); white-space: nowrap; }
  .wuli-mobile-disclosure-body { min-width: 0; padding: 4px 11px 11px; border-top: 1px solid var(--art-line); }
  .wuli-mobile-disclosure-body > [code-path$="ui-kit.tsx:6:5"] { box-shadow: none; border: 0; padding: 10px 0 0; background: transparent; }
  html:root .wuli-mobile-shell [code-path$="Layout.tsx:207:5"] { padding: 12px 13px; gap: 9px; margin-bottom: 12px; }
  html:root .wuli-mobile-shell [code-path$="Layout.tsx:209:9"] { font-size: 21px; line-height: 1.35; }
  html:root .wuli-mobile-shell [code-path$="Layout.tsx:210:18"] { font-size: 12px; line-height: 1.5; }
  html:root .wuli-mobile-shell [code-path$="Layout.tsx:207:5"] > :last-child { min-width: 0; max-width: 100%; }
  html:root .wuli-mobile-shell input:not([type="checkbox"]):not([type="radio"]), html:root .wuli-mobile-shell select, html:root .wuli-mobile-shell textarea,
  html:root [role="dialog"] input:not([type="checkbox"]):not([type="radio"]), html:root [role="dialog"] select, html:root [role="dialog"] textarea { max-width: 100%; font-size: 16px; min-height: 42px; }
  html:root .wuli-mobile-shell input[type="checkbox"], html:root .wuli-mobile-shell input[type="radio"] { width: 19px; height: 19px; flex-shrink: 0; }
  html:root .wuli-mobile-shell [code-path$="ui-kit.tsx:32:5"] { min-height: 42px; padding: 9px 12px; white-space: normal; }
  html:root [code-path$="ui-kit.tsx:146:5"] { padding: 12px; }
  html:root [code-path$="ui-kit.tsx:150:7"] { max-height: 88dvh; padding: 18px; }
  html:root [code-path$="ui-kit.tsx:156:13"] { min-width: 40px; min-height: 40px; margin: -6px -6px -6px 0; }
  html:root .wuli-mobile-shell [code-path$="Dashboard.tsx:79:7"] { min-height: 0; padding: 14px 15px; border-radius: 14px; margin-bottom: 12px; }
  html:root .wuli-mobile-shell [code-path$="Dashboard.tsx:80:9"] { flex-direction: row; align-items: center; min-height: 0; gap: 10px; }
  html:root .wuli-mobile-shell [code-path$="Dashboard.tsx:81:11"] { min-width: 0; flex: 1; }
  html:root .wuli-mobile-shell [code-path$="Dashboard.tsx:82:13"] { font-size: 11px; letter-spacing: 0; }
  html:root .wuli-mobile-shell [code-path$="Dashboard.tsx:85:13"] { font-size: 20px; margin-top: 5px; line-height: 1.35; overflow-wrap: anywhere; }
  html:root .wuli-mobile-shell [code-path$="Dashboard.tsx:88:13"] { font-size: 11px; margin-top: 4px; line-height: 1.45; }
  html:root .wuli-mobile-shell [code-path$="Dashboard.tsx:92:11"] { width: auto; flex-direction: column; align-items: flex-end; gap: 6px; }
  html:root .wuli-mobile-shell [code-path$="Dashboard.tsx:93:13"] { min-width: 0; padding: 5px 8px; gap: 5px; }
  html:root .wuli-mobile-shell [code-path$="Dashboard.tsx:94:15"] { font-size: 19px; }
  html:root .wuli-mobile-shell [code-path$="Dashboard.tsx:95:15"] { font-size: 10px; }
  html:root .wuli-mobile-shell [code-path$="Dashboard.tsx:92:11"] button { min-height: 32px; padding: 5px 8px; font-size: 11px; }
  html:root .wuli-mobile-shell [code-path$="Dashboard.tsx:105:9"] { padding: 9px 11px; font-size: 12px; }
  html:root .wuli-mobile-shell [code-path$="Dashboard.tsx:113:7"] { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 13px; }
  html:root .wuli-mobile-shell [code-path$="Dashboard.tsx:120:11"], html:root .wuli-mobile-shell [code-path$="Dashboard.tsx:130:9"] { min-height: 82px; grid-column: auto; padding: 10px; border-radius: 12px; }
  html:root .wuli-mobile-shell [code-path$="Dashboard.tsx:122:15"], html:root .wuli-mobile-shell [code-path$="Dashboard.tsx:132:13"] { width: 25px; height: 25px; border-radius: 8px; font-size: 15px; }
  html:root .wuli-mobile-shell [code-path$="Dashboard.tsx:123:15"], html:root .wuli-mobile-shell [code-path$="Dashboard.tsx:133:13"] { font-size: 24px; }
  html:root .wuli-mobile-shell [code-path$="Dashboard.tsx:125:13"], html:root .wuli-mobile-shell [code-path$="Dashboard.tsx:135:11"] { font-size: 12px; margin-top: 7px; }
  html:root .wuli-mobile-shell [code-path$="Dashboard.tsx:126:13"], html:root .wuli-mobile-shell [code-path$="Dashboard.tsx:136:11"] { font-size: 10px; line-height: 1.35; margin-top: 4px; }
  html:root .wuli-mobile-shell [code-path$="Dashboard.tsx:140:7"] { gap: 10px; }
  html:root .wuli-mobile-shell [code-path$="Dashboard.tsx:140:7"] > [code-path$="ui-kit.tsx:6:5"] { min-height: 0; padding: 14px; border-radius: 13px; }
  html:root .wuli-mobile-shell [code-path$="Dashboard.tsx:148:13"], html:root .wuli-mobile-shell [code-path$="Dashboard.tsx:172:13"], html:root .wuli-mobile-shell [code-path$="Dashboard.tsx:202:13"] { min-height: 0; padding: 10px 11px; }
  html:root .wuli-mobile-shell [code-path$="Dashboard.tsx:144:13"], html:root .wuli-mobile-shell [code-path$="Dashboard.tsx:165:13"], html:root .wuli-mobile-shell [code-path$="Dashboard.tsx:198:13"] { font-size: 14px; }
  html:root .wuli-mobile-shell [code-path$="Tools.tsx:59:5"], html:root .wuli-mobile-shell [code-path$="Games.tsx:95:11"] { gap: 10px; }
  html:root .wuli-mobile-shell [code-path$="Export.tsx:42:7"] { max-width: none; padding: 15px; }
  html:root .wuli-mobile-shell [code-path$="Export.tsx:43:9"] { text-align: left; margin-bottom: 13px; }
  html:root .wuli-mobile-shell [code-path$="Export.tsx:44:11"] { display: none; }
  html:root .wuli-mobile-shell [code-path$="Export.tsx:47:11"] { font-size: 17px; }
  html:root .wuli-mobile-shell [code-path$="Export.tsx:48:11"] { font-size: 12px; line-height: 1.65; }
  html:root .wuli-mobile-shell [code-path$="Migrate.tsx:92:7"] { padding: 10px 0 0; }
  html:root .wuli-mobile-shell [code-path$="Migrate.tsx:106:7"] { gap: 11px; }
  html:root [code-path$="Login.tsx:43:5"] { min-height: 100svh; padding: 61px 14px 22px; }
  html:root [code-path$="Login.tsx:45:7"] { display: grid; grid-template-columns: 1fr; max-width: 440px; min-height: 0; border-radius: 17px; }
  html:root [code-path$="Login.tsx:46:9"] { min-height: 0; padding: 18px 21px; }
  html:root [code-path$="Login.tsx:47:11"] { width: 36px; height: 36px; margin-bottom: 8px; }
  html:root [code-path$="Login.tsx:50:11"] { font-size: 24px; line-height: 1.3; }
  html:root [code-path$="Login.tsx:51:11"] { font-size: 11px; margin-top: 5px; }
  html:root [code-path$="Login.tsx:54:9"] { padding: 19px; }
  html:root [code-path$="Login.tsx:101:11"] { padding-top: 11px; margin-top: 12px; }
  html:root [code-path$="Login.tsx:54:9"] input { font-size: 16px; min-height: 44px; }
  .wuli-mobile-todo-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-bottom: 12px; }
  .wuli-mobile-todo-tabs button { min-height: 44px; padding: 8px 2px; border: 1px solid var(--art-line); border-radius: 9px; font-size: 12px; color: var(--art-muted); background: var(--art-surface); }
  .wuli-mobile-todo-tabs button[aria-pressed="true"] { color: var(--art-on-accent); border-color: var(--art-accent); background: var(--art-accent); }
  .wuli-mobile-todo-list { display: grid; gap: 10px; }
  .wuli-mobile-todo-item { border: 1px solid var(--art-line); border-radius: 12px; padding: 13px; background: var(--art-surface); color: var(--art-ink); overflow-wrap: anywhere; }
  .wuli-mobile-todo-item > strong { display: block; font-size: 15px; line-height: 1.55; }
  .wuli-mobile-todo-item > p { font-size: 11px; color: var(--art-muted); margin: 5px 0; }
  .wuli-mobile-todo-item details > summary { font-size: 12px; min-height: 34px; padding: 8px 0 0; color: var(--art-accent); }
  .wuli-mobile-todo-item details > div { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 7px; }
  html:root .wuli-mobile-shell [code-path$="Games.tsx:93:7"] { grid-template-columns: 1fr; gap: 10px; }
  html:root .wuli-mobile-shell [code-path$="Games.tsx:97:15"], html:root .wuli-mobile-shell [code-path$="Tools.tsx:61:9"] { padding: 11px 13px; gap: 10px; }
  html:root .wuli-mobile-shell [code-path$="Games.tsx:98:17"], html:root .wuli-mobile-shell [code-path$="Tools.tsx:62:11"] { font-size: 24px; }
  html:root .wuli-mobile-shell [code-path$="Games.tsx:100:19"], html:root .wuli-mobile-shell [code-path$="Tools.tsx:64:13"] { font-size: 16px; line-height: 1.4; }
  html:root .wuli-mobile-shell [code-path$="Games.tsx:101:19"], html:root .wuli-mobile-shell [code-path$="Tools.tsx:65:13"] { font-size: 10px; }
  html:root .wuli-mobile-shell [code-path$="Games.tsx:104:15"], html:root .wuli-mobile-shell [code-path$="Tools.tsx:68:9"] { padding: 9px 13px 11px; font-size: 12px; line-height: 1.55; }
  html:root .wuli-mobile-shell [code-path$="Games.tsx:117:11"], html:root .wuli-mobile-shell [code-path$="Tools.tsx:117:11"] { padding: 8px 10px; flex-wrap: wrap; gap: 7px; }

}

/* Compact phone-only score selection; the desktop score table is untouched. */
@media (max-width: 767px), (max-width: 1023px) and (hover: none) and (pointer: coarse) {
  .wuli-mobile-grade-students { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .wuli-mobile-grade-student { min-width: 0; border: 1px solid var(--art-line); border-radius: 10px; background: var(--art-canvas); color: var(--art-ink); }
  .wuli-mobile-grade-student.is-selected { border-color: var(--art-accent); background: color-mix(in srgb, var(--art-accent) 12%, var(--art-surface)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--art-accent) 22%, transparent); }
  .wuli-mobile-grade-select { display: grid; grid-template-columns: 19px minmax(0, 1fr) auto; align-items: center; column-gap: 8px; row-gap: 2px; width: 100%; min-height: 50px; box-sizing: border-box; padding: 6px 9px; cursor: pointer; }
  .wuli-mobile-grade-select:focus-within { border-radius: 9px; outline: 2px solid var(--art-accent); outline-offset: 2px; }
  .wuli-mobile-grade-select > input { grid-column: 1; grid-row: 1 / span 2; align-self: center; width: 19px; height: 19px; min-height: 0; margin: 0; accent-color: var(--art-accent); }
  .wuli-mobile-grade-name { grid-column: 2; grid-row: 1; min-width: 0; overflow-wrap: anywhere; font-size: 13px; line-height: 18px; font-weight: 600; }
  .wuli-mobile-grade-score { grid-column: 3; grid-row: 1; display: inline-flex; align-items: baseline; justify-content: flex-end; gap: 3px; font-size: 13px; line-height: 18px; white-space: nowrap; font-variant-numeric: tabular-nums; }
  .wuli-mobile-grade-score strong { font-weight: 700; }
  .wuli-mobile-grade-score small { font-size: 10px; font-weight: 400; color: var(--art-muted); }
  .wuli-mobile-grade-meta { grid-column: 2 / 4; grid-row: 2; display: flex; flex-wrap: wrap; gap: 1px 8px; min-width: 0; color: var(--art-muted); font-size: 11px; line-height: 14px; }
  .wuli-mobile-grade-rank, .wuli-mobile-grade-change { min-width: 0; overflow-wrap: anywhere; }
  @media (min-width: 640px) { .wuli-mobile-grade-students { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
}

/* A fixed-height trend area and an independent student scroller. */
@media (max-width: 767px), (max-width: 1023px) and (hover: none) and (pointer: coarse) {
  html:root .wuli-mobile-shell:has(.wuli-mobile-grade-workspace) { position: relative; }
  html:root .wuli-mobile-shell:has(.wuli-mobile-grade-workspace) > [code-path$="Layout.tsx:193:7"] { padding-bottom: calc(var(--wuli-mobile-bottom-height, 62px) + 14px); }
  html:root .wuli-mobile-shell:has(.wuli-mobile-grade-workspace) > [code-path$="Layout.tsx:198:7"] { position: absolute; right: 14px; bottom: var(--wuli-mobile-bottom-height, 62px); margin: 0; padding: 0; font-size: 9px; }
  .wuli-mobile-grade-page, .wuli-mobile-grade-workspace, .wuli-mobile-grade-list-scroll { overflow-anchor: none; }
  .wuli-mobile-grade-workspace { --wuli-grade-workspace-height: calc(var(--wuli-mobile-viewport-height, 100dvh) - var(--wuli-mobile-header-offset, 103px) - var(--wuli-mobile-bottom-height, 62px) - 14px); position: sticky; top: var(--wuli-mobile-header-offset, 103px); display: flex; flex-direction: column; min-width: 0; min-height: 0; height: var(--wuli-grade-workspace-height); box-sizing: border-box; overflow: hidden; border: 1px solid var(--art-line); border-radius: 14px; background: var(--art-surface); color: var(--art-ink); }
  .wuli-mobile-grade-graph { position: relative; flex: 0 0 auto; min-width: 0; padding: 4px 8px; border-bottom: 1px solid var(--art-line); }
  .wuli-mobile-grade-graph-header { display: flex; align-items: center; justify-content: space-between; gap: 6px; min-height: 30px; }
  .wuli-mobile-grade-graph-header h2 { display: flex; align-items: center; gap: 6px; min-width: 0; margin: 0; font-size: 13px; font-weight: 700; }
  .wuli-mobile-grade-graph-header h2 small { white-space: nowrap; font-size: 10px; font-weight: 400; color: var(--art-muted); }
  .wuli-mobile-grade-graph-actions { display: flex; flex-shrink: 0; align-items: center; gap: 4px; }
  .wuli-mobile-grade-graph-actions > button, .wuli-mobile-grade-settings > summary { display: block; min-width: 40px; min-height: 30px; box-sizing: border-box; padding: 6px; border: 1px solid var(--art-line); border-radius: 8px; background: var(--art-canvas); color: var(--art-accent); font-size: 11px; line-height: 16px; text-align: center; cursor: pointer; }
  .wuli-mobile-grade-settings > summary { list-style: none; }
  .wuli-mobile-grade-settings > summary::-webkit-details-marker { display: none; }
  .wuli-mobile-grade-settings-menu { position: absolute; top: 36px; right: 5px; z-index: 25; width: min(300px, calc(100% - 10px)); max-height: min(260px, calc(var(--wuli-grade-workspace-height) * .65)); box-sizing: border-box; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 10px; border: 1px solid var(--art-line); border-radius: 10px; background: var(--art-surface); box-shadow: 0 8px 22px #00000024; }
  .wuli-mobile-grade-settings-menu p { margin: 0 0 7px; font-size: 11px; color: var(--art-muted); }
  .wuli-mobile-grade-settings-menu label { display: flex; align-items: center; gap: 8px; min-height: 42px; font-size: 12px; overflow-wrap: anywhere; }
  .wuli-mobile-grade-settings-menu button { min-height: 36px; margin-top: 6px; padding: 6px 9px; border-radius: 7px; background: var(--art-canvas); color: var(--art-accent); font-size: 11px; }
  .wuli-mobile-grade-stage { display: flex; align-items: center; justify-content: center; min-width: 0; height: clamp(42px, calc(var(--wuli-grade-workspace-height) * .22), 180px); }
  .wuli-mobile-grade-stage-scroll { width: 100%; height: 100%; min-width: 0; overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; }
  .wuli-mobile-grade-empty { max-width: 100%; margin: 0; padding: 6px 8px; color: var(--art-muted); font-size: 12px; line-height: 17px; text-align: center; }
  .wuli-mobile-grade-legend { display: flex; align-items: center; gap: 6px; height: 24px; min-width: 0; overflow-x: auto; overflow-y: hidden; white-space: nowrap; scrollbar-width: none; }
  .wuli-mobile-grade-legend::-webkit-scrollbar { display: none; }
  .wuli-mobile-grade-legend > span { color: var(--art-muted); font-size: 10px; }
  .wuli-mobile-grade-legend button { display: inline-flex; flex-shrink: 0; align-items: center; gap: 4px; min-height: 23px; padding: 2px 4px; border-radius: 5px; color: var(--art-ink); font-size: 11px; line-height: 16px; }
  .wuli-mobile-grade-legend button > span { width: 7px; height: 7px; border-radius: 50%; background: var(--wuli-grade-line-color); }
  .wuli-mobile-grade-legend button.is-hidden { opacity: .5; text-decoration: line-through; }
  .wuli-mobile-grade-student-panel { display: flex; flex: 1; flex-direction: column; min-width: 0; min-height: 0; }
  .wuli-mobile-grade-controls { display: grid; flex: 0 0 auto; grid-template-columns: minmax(0, 1fr) 104px; align-items: center; gap: 6px; padding: 4px 8px; border-bottom: 1px solid var(--art-line); }
  html:root .wuli-mobile-shell .wuli-mobile-grade-controls input, html:root .wuli-mobile-shell .wuli-mobile-grade-controls select { width: 100%; min-width: 0; height: 42px; box-sizing: border-box; padding: 6px 8px; border: 1px solid var(--art-line); border-radius: 8px; background: var(--art-canvas); color: var(--art-ink); font-size: 16px; }
  .wuli-mobile-grade-list-scroll { flex: 1; min-width: 0; min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; touch-action: pan-y; padding: 6px 8px; }
  .wuli-mobile-grade-no-results { margin: 8px 0; padding: 10px; color: var(--art-muted); font-size: 12px; text-align: center; }
  .wuli-mobile-grade-analysis { margin-top: 8px; border: 1px solid var(--art-line); border-radius: 9px; padding: 8px; color: var(--art-ink); }
  .wuli-mobile-grade-analysis > summary { min-height: 28px; font-size: 12px; cursor: pointer; }
  .wuli-mobile-grade-analysis p { margin: 5px 0; font-size: 12px; }
  .wuli-mobile-grade-analysis small { display: block; color: var(--art-muted); font-size: 11px; overflow-wrap: anywhere; }
  .wuli-mobile-grade-analysis > div > div { margin-top: 7px; padding: 7px; border-radius: 7px; background: var(--art-canvas); }
}

@media (max-width: 767px), (max-width: 1023px) and (pointer: coarse) and (hover: none) {
  .wuli-mobile-homework-filter { order: 1; }
  .wuli-mobile-homework-records { order: 2; margin-bottom: 16px; }
  .wuli-mobile-homework-entry { order: 4; }
  .wuli-mobile-homework-empty-records { order: 5; }
  .wuli-mobile-homework { min-width: 0; color: var(--art-ink); }
  .wuli-mobile-homework-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 9px; }
  .wuli-mobile-homework-heading h1 { margin: 0; font-size: 18px; line-height: 1.4; font-weight: 700; }
  .wuli-mobile-homework-heading > span { font-size: 11px; color: var(--art-muted); }
  .wuli-mobile-homework-context { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; margin-bottom: 9px; scroll-margin-top: 112px; }
  .wuli-mobile-homework-context > div { min-width: 0; }
  .wuli-mobile-homework-context label { display: block; margin-bottom: 4px; font-size: 11px; line-height: 1.25; color: var(--art-muted); }
  .wuli-mobile-homework-field-frame { position: relative; display: flex; box-sizing: border-box; width: 100%; min-width: 0; min-inline-size: 0; max-width: 100%; height: 44px; min-height: 44px; max-height: 44px; overflow: hidden; border: 1px solid var(--art-line); border-radius: 9px; background: var(--art-surface); }
  html:root .wuli-mobile-shell .wuli-mobile-homework-context .wuli-mobile-homework-control { display: block; flex: 1 1 0%; box-sizing: border-box; width: 100%; inline-size: 100%; min-width: 0; min-inline-size: 0; max-width: 100%; max-inline-size: 100%; height: 42px; min-height: 42px; max-height: 42px; margin: 0; border: 0; border-radius: 0; padding: 7px 8px; font: inherit; font-size: 16px; line-height: normal; color: var(--art-ink); background: transparent; appearance: none; -webkit-appearance: none; }
  .wuli-mobile-homework-context input[type="date"] { overflow: hidden; }
  .wuli-mobile-homework-context input[type="date"]::-webkit-date-and-time-value { min-inline-size: 0; margin: 0; line-height: 28px; text-align: left; }
  .wuli-mobile-homework-context input[type="date"]::-webkit-datetime-edit { min-width: 0; min-inline-size: 0; max-width: 100%; padding: 0; }
  .wuli-mobile-homework-context input[type="date"]::-webkit-datetime-edit-fields-wrapper { padding: 0; }
  .wuli-mobile-homework-context input[type="date"]::-webkit-calendar-picker-indicator { flex: 0 0 16px; width: 16px; margin: 0; padding: 0; }
  html:root .wuli-mobile-shell .wuli-mobile-homework-context select.wuli-mobile-homework-control { padding-right: 25px; }
  .wuli-mobile-homework-field-task::after { content: ""; position: absolute; top: 16px; right: 10px; width: 7px; height: 7px; border-right: 1.5px solid var(--art-muted); border-bottom: 1.5px solid var(--art-muted); transform: rotate(45deg); pointer-events: none; }
  .wuli-mobile-homework-modes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-bottom: 10px; }
  .wuli-mobile-homework-modes button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; min-width: 0; min-height: 48px; border: 1px solid var(--art-line); border-radius: 10px; padding: 5px; background: var(--art-surface); color: var(--art-muted); }
  .wuli-mobile-homework-modes strong { font-size: 14px; font-weight: 600; line-height: 1.35; }
  .wuli-mobile-homework-modes small { font-size: 10px; line-height: 1.3; }
  .wuli-mobile-homework-modes button[aria-pressed="true"] { border-color: var(--art-accent); background: color-mix(in srgb, var(--art-accent) 13%, var(--art-surface)); color: var(--art-accent); }
  .wuli-mobile-homework-roster { min-width: 0; margin-bottom: 15px; }
  .wuli-mobile-homework-roster-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 5px; margin-bottom: 7px; }
  .wuli-mobile-homework-roster-heading h2 { margin: 0; font-size: 13px; line-height: 1.4; font-weight: 650; }
  .wuli-mobile-homework-roster-heading > span { color: var(--art-muted); font-size: 10px; }
  .wuli-mobile-homework-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 7px; align-items: start; }
  .wuli-mobile-homework-student { display: flex; flex-direction: column; justify-content: center; align-items: stretch; gap: 3px; min-width: 0; min-height: 56px; border: 1px solid var(--art-line); border-radius: 9px; padding: 6px 7px; text-align: left; background: var(--art-surface); color: var(--art-ink); }
  .wuli-mobile-homework-student-no { display: block; min-width: 0; font-size: 9px; line-height: 1.2; letter-spacing: .2px; color: var(--art-muted); overflow-wrap: anywhere; }
  .wuli-mobile-homework-student-row { display: flex; align-items: flex-start; gap: 4px; min-width: 0; width: 100%; }
  .wuli-mobile-homework-student-name { display: block; flex: 1 1 0%; min-width: 0; font-size: 14px; font-weight: 650; line-height: 1.35; white-space: normal; overflow-wrap: anywhere; word-break: normal; }
  .wuli-mobile-homework-student-status { display: block; flex: 0 0 auto; padding-top: 3px; font-size: 10px; line-height: 1.3; white-space: nowrap; }
  .wuli-mobile-homework-student[data-status="missing"] { border-color: color-mix(in srgb, #e34f75 65%, var(--art-line)); background: color-mix(in srgb, #e34f75 11%, var(--art-surface)); }
  .wuli-mobile-homework-student[data-status="leave"] { border-color: color-mix(in srgb, #21a679 65%, var(--art-line)); background: color-mix(in srgb, #21a679 11%, var(--art-surface)); }
  .wuli-mobile-homework-student[data-status="excellent"] { border-color: color-mix(in srgb, #c48d17 65%, var(--art-line)); background: color-mix(in srgb, #c48d17 11%, var(--art-surface)); }
  .wuli-mobile-homework-student[data-status="missing"] .wuli-mobile-homework-student-status { color: #c33258; }
  .wuli-mobile-homework-student[data-status="leave"] .wuli-mobile-homework-student-status { color: #188460; }
  .wuli-mobile-homework-student[data-status="excellent"] .wuli-mobile-homework-student-status { color: #9c6d0a; }
  [data-theme="dark"] .wuli-mobile-homework-student[data-status="missing"] .wuli-mobile-homework-student-status { color: #ff9db2; }
  [data-theme="dark"] .wuli-mobile-homework-student[data-status="leave"] .wuli-mobile-homework-student-status { color: #80dab5; }
  [data-theme="dark"] .wuli-mobile-homework-student[data-status="excellent"] .wuli-mobile-homework-student-status { color: #f4d27c; }
  .wuli-mobile-homework-student:focus-visible, .wuli-mobile-homework button:focus-visible { outline: 2px solid var(--art-accent); outline-offset: 2px; }
  .wuli-mobile-homework .wuli-mobile-disclosure { margin: 9px 0; }
  .wuli-mobile-homework-results { display: grid; gap: 10px; padding-top: 9px; }
  .wuli-mobile-homework-results article { min-width: 0; border-bottom: 1px solid var(--art-line); padding: 0 0 9px; }
  .wuli-mobile-homework-results article:last-child { border-bottom: 0; padding-bottom: 0; }
  .wuli-mobile-homework-result-heading { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 5px; margin-bottom: 6px; }
  .wuli-mobile-homework-result-heading strong { font-size: 13px; overflow-wrap: anywhere; }
  .wuli-mobile-homework-result-heading small { color: var(--art-muted); font-size: 10px; }
  .wuli-mobile-homework-results p, .wuli-mobile-homework-alerts p { margin: 4px 0; font-size: 12px; line-height: 1.7; overflow-wrap: anywhere; }
  .wuli-mobile-homework-result-actions, .wuli-mobile-homework-sort { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
  .wuli-mobile-homework-result-actions { justify-content: flex-end; }
  .wuli-mobile-homework-result-actions button, .wuli-mobile-homework-sort button, .wuli-mobile-homework-add { min-height: 44px; border: 1px solid var(--art-line); border-radius: 9px; padding: 7px 10px; background: var(--art-surface); color: var(--art-accent); font-size: 12px; }
  .wuli-mobile-homework-sort button[aria-pressed="true"] { border-color: var(--art-accent); background: color-mix(in srgb, var(--art-accent) 12%, var(--art-surface)); }
  .wuli-mobile-homework-add { margin-top: 9px; }
  .wuli-mobile-homework-help, .wuli-mobile-homework-empty { margin: 8px 0; font-size: 11px; line-height: 1.7; color: var(--art-muted); }
}
