/* 咔嚓乐园：温暖的纸张、薄荷绿与可点击的学习贴纸。 */
:root {
    color-scheme: light;
    --ink: #324c42;
    --muted: #717d72;
    --green: #34765b;
    --mint: #e9f4ec;
    --line: #e7ebe2;
    --paper: #fffefa;
    --shadow: 0 5px 18px rgba(58, 80, 57, .035);
    font-family: "Nunito", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
    font-synthesis: none;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body { color: var(--ink); background: #f7f8f2; background-image: radial-gradient(#d8dfce 0.65px, transparent .65px); background-size: 18px 18px; min-height: 100vh; min-height: 100dvh; padding: max(18px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left)); -webkit-tap-highlight-color: transparent; }
button, input { font: inherit; }
button { cursor: pointer; color: inherit; }
button, a, [role="button"] { touch-action: manipulation; }
button { border: 0; }
button:disabled { cursor: wait; opacity: .6; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #327b5d; outline-offset: 4px; }
::selection { background: #d4ecd9; }
.page-width { width: 100%; max-width: 1392px; margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: fixed; top: -100px; left: 20px; padding: 12px 20px; background: white; z-index: 5000; border-radius: 12px; }
.skip-link:focus { top: 12px; }

.button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid var(--line); border-radius: 12px; min-height: 44px; padding: 9px 15px; background: var(--paper); font-size: 13px; line-height: 1.4; font-weight: 600; white-space: nowrap; transition: background .18s, border-color .18s, transform .18s; }
.button > span[aria-hidden] { font-size: 20px; line-height: 1; }

.welcome-grid { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(290px, 1fr); gap: 20px; margin-bottom: 26px; }
.welcome-card { position: relative; overflow: hidden; background: #edf3e7; border: 1px solid #e0e8d8; border-radius: 25px; min-height: 246px; padding: 29px 34px; display: flex; align-items: center; }
.welcome-card::after { content: ''; position: absolute; width: 270px; height: 270px; right: -12px; top: -20px; border-radius: 50%; border: 1px dashed #cedcc4; }
.welcome-copy { position: relative; z-index: 1; width: 67%; }
.eyebrow { color: #56754b; display: inline-flex; align-items: center; gap: 6px; font-size: 11px; letter-spacing: 2px; font-weight: 600; }
h1 { font-size: clamp(27px, 2.7vw, 39px); font-weight: 800; line-height: 1.42; letter-spacing: 1px; margin: 10px 0 13px; }
.hand-underline { position: relative; z-index: 0; }
.hand-underline::after { content: ''; position: absolute; z-index: -1; bottom: 1px; left: 0; width: 96%; height: 10px; border-radius: 50%; background: #e3cf83; transform: rotate(-3deg); }
.welcome-copy p { font-size: 12px; color: #6e8068; line-height: 1.8; max-width: 290px; }
.hero-sticker { position: absolute; z-index: 1; width: 242px; height: 242px; object-fit: contain; right: 22px; bottom: -1px; transform: rotate(-4deg); }
.hero-spark { position: absolute; font-size: 28px; color: #b0be7b; }
.spark-one { right: 282px; bottom: 42px; transform: rotate(-15deg); }
.spark-two { right: 26px; top: 23px; font-size: 19px; color: #d9b75f; }
.progress-card { min-width: 0; border: 1px solid #eae7dc; border-radius: 25px; background: #fffcf2; padding: 24px 26px 23px; position: relative; overflow: hidden; }
.progress-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.section-kicker { font-size: 14px; font-weight: 700; }
.progress-subject { font-size: 11px; color: #8d7952; background: #f4edda; padding: 5px 10px; border-radius: 8px; max-width: 55%; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; }
.progress-number { display: flex; gap: 5px; align-items: baseline; margin: 22px 0 20px; position: relative; z-index: 1; }
.progress-number > strong { font-size: 52px; line-height: 1; letter-spacing: -2px; font-weight: 800; color: #51785b; font-variant-numeric: tabular-nums; }
.progress-number > span { font-size: 13px; color: #8a8a73; }
.progress-sticker { position: absolute; width: 112px; height: 112px; right: 23px; top: 58px; object-fit: contain; transform: rotate(11deg); }
.progress-bar { height: 11px; width: 100%; border-radius: 20px; background: #ebeadd; overflow: hidden; position: relative; }
.progress-fill { height: 100%; width: 0; background: #71ac87; border-radius: inherit; transition: width .4s ease; }
.progress-caption { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 13px; color: #85866c; font-size: 11px; }
.progress-caption strong { color: #56775c; font-size: 12px; }
.next-round { background: #dcebd7; border-radius: 9px; padding: 5px 10px; font-size: 11px; margin-top: 9px; color: #315f42; }
.classroom { background: #ffffff; border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow); overflow: clip; }
.record-bar { position: sticky; top: 0; z-index: 30; box-shadow: 0 3px 8px #324c4209; padding: 0 25px; min-height: 71px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 20px; background: #fefefb; }
.record-scroll { display: flex; align-items: center; gap: 16px; overflow-x: auto; min-width: 0; padding: 12px 2px; scrollbar-width: thin; scrollbar-color: #d6e1d7 transparent; }
#record-container { display: flex; align-items: center; gap: 7px; }
.record-item { padding: 10px 18px; min-height: 43px; border: 1px solid transparent; border-radius: 11px; background: transparent; color: #788075; font-size: 14px; font-weight: 600; white-space: nowrap; max-width: 220px; overflow: hidden; text-overflow: ellipsis; flex-shrink: 0; }
.record-item.current-record { color: #326d50; background: #e9f2e7; border-color: #dce9d6; }
.add-record { border-style: dashed; color: #7b8579; min-height: 39px; font-size: 12px; padding: 7px 12px; flex-shrink: 0; }
.report-button { border: 0; background: transparent; color: #71826c; padding-inline: 4px; flex-shrink: 0; }
.report-button[aria-pressed="true"] { color: #2d7052; background: #eaf3e7; padding-inline: 12px; }
.board-header { padding: 12px 20px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; }
h2 { font-size: 21px; line-height: 1.5; font-weight: 750; overflow-wrap: anywhere; }
.icon-button { background: transparent; width: 44px; height: 44px; border-radius: 9px; font-size: 22px; color: #7c8c7c; flex-shrink: 0; }
.board-actions { display: flex; flex-wrap: wrap; gap: 8px; flex-shrink: 0; }
.board-actions .button { font-size: 12px; padding-inline: 12px; background: #fdfdf9; }
.switch-arrow { color: #8b9c85; font-size: 16px; margin-left: 2px; }
.filter-bar { margin: 0; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.filter-tabs { display: flex; gap: 3px; padding: 4px; background: #f4f6f0; border-radius: 11px; }
.filter-tab { display: flex; align-items: center; justify-content: center; gap: 6px; background: transparent; border: 1px solid transparent; border-radius: 8px; padding: 8px 13px; min-height: 36px; font-size: 12px; color: #7b8577; white-space: nowrap; }
.filter-tab.active { color: #406b4c; background: white; border-color: #e5eadf; box-shadow: 0 2px 3px #293e3410; font-weight: 600; }
.filter-tab > span { font-size: 10px; min-width: 17px; padding: 2px 4px; border-radius: 4px; background: #e9eee3; font-variant-numeric: tabular-nums; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.status-dot.pending { background: #d8b265; }
.status-dot.done { background: #70a581; }
.grid-container { display: grid; grid-template-columns: repeat(auto-fill, minmax(106px, 1fr)); gap: 8px; padding: 0 20px 16px; width: 100%; }
.student-card { min-width: 0; position: relative; text-align: center; background: #f9faf5; border: 1.5px solid #e7ebdf; border-radius: 14px; padding: 8px 6px 6px; cursor: pointer; transition: transform .18s, background .18s, border-color .18s, box-shadow .18s; overflow: hidden; -webkit-user-select: none; user-select: none; }
.card-front { display: flex; flex-direction: column; align-items: center; min-width: 0; }
.student-number { color: #596953; font-size: 17px; font-weight: 700; line-height: 1.4; overflow-wrap: anywhere; max-width: 100%; font-variant-numeric: tabular-nums; }
.student-name { color: #53664e; font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; max-width: 100%; }
.emoji { width: 70px; height: 70px; display: block; object-fit: contain; margin: 2px auto; pointer-events: none; }
.study .emoji { width: 78px; height: 78px; margin: 2px auto; }
.student-card.completed { background: #edf7ee; border-color: #bfdac2; box-shadow: 0 2px 0 #e2eee2; }
.student-card.completed .student-number { color: #34714a; }
/* 不规则笔锋的手写勾，白色细描边让它在贴纸旁仍然清晰。 */
.student-card.completed::after { content: ''; position: absolute; right: 6px; bottom: 5px; width: 32px; height: 30px; pointer-events: none; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 30'%3E%3Cpath d='M3.5 15.5C5.7 16.5 7.8 19 9.4 21.5C14.5 13.6 21.2 6.9 28.2 2.5C29 2 29.9 2.6 29.2 3.5C23.3 9.8 17.9 16.6 12.7 25C11.3 27.2 9.4 27.2 8.1 25C6.3 21.7 4.3 19.5 2.8 17.3C2 16.1 2.4 15 3.5 15.5Z' fill='%233d8e59' stroke='white' stroke-width='1' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; }
.card-back { position: absolute; inset: 0; padding: 10px 5px; background: #e4eddd; color: #3c6245; display: none; flex-direction: column; justify-content: center; align-items: center; z-index: 2; }
.show-back .card-front { visibility: hidden; }
.show-back .card-back { display: flex; }
.confirm-message { font-size: 12px; line-height: 1.6; margin-bottom: 12px; overflow-wrap: anywhere; }
.confirm-buttons { display: flex; gap: 6px; }
.confirm-btn { min-width: 40px; min-height: 44px; background: white; border: 1px solid #c7d8be; border-radius: 10px; font-size: 13px; }
.confirm-btn.confirm { background: #487653; color: white; border-color: #487653; }
.student-card.highlighted, .student-card.quick-located { background: #fff3d0; border-color: #d9b449; box-shadow: 0 0 0 3px #f7e4a9; transform: translateY(-3px); }
.flipping { animation: cardPop .22s ease; }
@keyframes cardPop { 50% { transform: scale(.96); } }
.filter-empty { display: flex; align-items: center; flex-direction: column; padding: 30px 16px 46px; text-align: center; }
.filter-empty img { object-fit: contain; margin-bottom: 8px; }
.filter-empty h3 { font-size: 16px; }
.filter-empty p { font-size: 12px; color: var(--muted); margin: 8px 0 18px; }
.board-footer { padding: 16px 27px; border-top: 1px dashed #e5e9dc; color: #909780; display: flex; justify-content: space-between; gap: 16px; font-size: 11px; line-height: 1.6; background: #fdfef9; }
.board-footer > span:first-child > span[aria-hidden] { font-size: 15px; margin-right: 5px; }
.board-footer-note span { color: #c9ac56; }
.page-footer { text-align: center; color: #96a187; font-size: 11px; padding: 24px 0 70px; line-height: 1.8; letter-spacing: 1px; }
.page-footer > span { color: #a5b38e; margin: 0 9px; font-size: 15px; }
/* 总览按任务固定配色；文字、图标和勾选同时区分状态。 */
[data-tone="orange"] { --task-ink: #913b1b; --task-color: #bd5b31; --task-soft: #fff1e6; --task-line: #edbfa3; }
[data-tone="blue"] { --task-ink: #215694; --task-color: #3978b9; --task-soft: #eaf3ff; --task-line: #acc9ee; }
[data-tone="purple"] { --task-ink: #694198; --task-color: #875bb2; --task-soft: #f3ecff; --task-line: #d0b9ec; }
[data-tone="teal"] { --task-ink: #166568; --task-color: #25858a; --task-soft: #e6f7f5; --task-line: #a7d8d1; }
[data-tone="pink"] { --task-ink: #9b3a65; --task-color: #b4557e; --task-soft: #fff0f5; --task-line: #ebbad0; }
[data-tone="green"] { --task-ink: #3c6625; --task-color: #598a3c; --task-soft: #f0f7e7; --task-line: #bfd7a7; }
.overview-subjects { display: grid; grid-template-columns: repeat(auto-fit,minmax(190px,1fr)); gap: 12px; padding: 0 27px 24px; }
.overview-subject { min-width: 0; padding: 14px; border: 1px solid var(--task-line); border-top: 5px solid var(--task-color); border-radius: 15px; background: var(--task-soft); color: var(--task-ink); }
.overview-subject-title { display: flex; align-items: center; gap: 10px; }
.overview-subject-title > span { font-size: 29px; }
.overview-subject-title > div { min-width: 0; }
.overview-subject-title h3 { font-size: 19px; line-height: 1.4; overflow-wrap: anywhere; }
.overview-subject-title small { font-size: 12px; display: block; margin-bottom: 3px; }
.overview-subject-count { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 12px 0 8px; font-size: 14px; }
.overview-subject-count strong { font-size: 27px; }
.overview-subject-count strong span { font-size: 14px; font-weight: 600; }
.overview-subject-track { height: 7px; border-radius: 6px; background: #fff; overflow: hidden; }
.overview-subject-track i { display: block; height: 100%; border-radius: inherit; background: var(--task-color); }
.statistics-content { display: grid; grid-template-columns: repeat(6, minmax(156px, 1fr)); gap: 10px; padding: 4px 20px 22px; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; scrollbar-color: #bbcdb6 transparent; }
.statistics-content .student-card { min-height: 148px; cursor: default; padding: 12px 10px; background: #fff; border-color: #cad7d0; box-shadow: 0 3px 0 #eaf0eb; }
.statistics-content .card-front { align-items: stretch; }
.overview-student-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 5px; padding-bottom: 9px; text-align: left; }
.overview-number { display: block; font-size: 23px; color: #2c4940; line-height: 1.2; }
.overview-number small { font-size: 13px; margin-left: 3px; }
.statistics-content .student-name { display: block; font-size: 16px; font-weight: 700; margin-top: 5px; color: #334e43; }
.overview-student-count { font-size: 11px; padding: 4px 5px; border-radius: 7px; background: #edf2ee; color: #4c6557; white-space: nowrap; }
.homework-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(56px, 1fr)); width: 100%; gap: 5px; }
.homework-item { display: flex; align-items: center; justify-content: center; gap: 4px; font-size: 14px; line-height: 1.3; padding: 5px 4px; min-height: 34px; min-width: 0; width: 100%; text-align: center; border: 1px solid var(--task-line); border-bottom: 3px solid var(--task-color); border-radius: 8px; color: var(--task-ink); background: var(--task-soft); }
.homework-item strong { white-space: nowrap; }
.homework-item.incomplete { cursor: pointer; }
.homework-item.incomplete:hover { box-shadow: inset 0 0 0 1px var(--task-color); }
.homework-status { flex-shrink: 0; font-size: 11px; font-weight: 700; }
.homework-item.task-done { background: #fff; border-bottom-color: var(--task-line); }
.task-done .homework-status { color: #367147; font-size: 14px; }
.overview-done-message { margin-top: 9px; font-size: 12px; font-weight: 700; color: #367147; }
.statistics-content .overview-all-done { border-color: #a9c9ad; background: #f8fcf5; }
.statistics-content .card-back { padding: 10px; overflow-y: auto; background: #edf5e8; }
.statistics-content .confirm-message { font-size: 15px; color: #35553e; }
.statistics-content .confirm-btn { font-size: 14px; min-width: 55px; }
.no-data { grid-column: 1/-1; text-align: center; padding: 60px 20px; color: #76806f; font-size: 14px; }
.context-menu { display: none; position: fixed; z-index: 1800; background: #fffffc; border: 1px solid #e1e8d9; border-radius: 15px; padding: 7px; min-width: 178px; max-width: calc(100vw - 20px); max-height: calc(100dvh - 20px); overflow-y: auto; box-shadow: 0 12px 40px #2f4b3926; }
.context-menu-item { display: block; width: 100%; text-align: left; min-height: 44px; padding: 10px 12px; font-size: 13px; border-radius: 9px; background: transparent; line-height: 1.5; }
.context-menu-item:last-child { color: #ab6651; }
.context-menu-separator { height: 1px; background: var(--line); margin: 4px; }
.custom-alert-overlay, .custom-confirm-overlay, .custom-input-overlay { position: fixed; inset: 0; background: #253a3259; backdrop-filter: blur(5px); z-index: 2200; display: none; align-items: center; justify-content: center; padding: 20px; }
.custom-alert-box, .custom-confirm-box, .custom-input-box { width: 100%; max-width: 390px; min-width: 0; max-height: calc(100dvh - 40px); overflow-y: auto; text-align: center; border: 3px solid white; border-radius: 24px; background: #fcfdf6; padding: 30px 24px 24px; box-shadow: 0 20px 80px #22382d33; animation: cardPop .2s ease; }
.custom-alert-message, .custom-confirm-message, .custom-input-message { font-size: 16px; font-weight: 600; line-height: 1.8; overflow-wrap: anywhere; white-space: pre-line; margin-bottom: 24px; }
.custom-confirm-buttons, .custom-input-buttons { display: flex; gap: 12px; justify-content: center; }
.custom-alert-button, .custom-confirm-button, .custom-input-button { min-height: 46px; padding: 10px 25px; border-radius: 12px; background: #397553; color: white; font-size: 14px; line-height: 1.5; }
.custom-confirm-button.cancel, .custom-input-button.cancel { background: #e9eee1; color: #5d7153; }
.custom-input-field { width: 100%; min-width: 0; background: white; border: 1.5px solid #d5dec9; border-radius: 11px; min-height: 48px; padding: 10px 14px; margin-bottom: 20px; color: var(--ink); font-size: 16px; }
.float-number-btn { position: fixed; right: max(24px, env(safe-area-inset-right)); bottom: max(22px, env(safe-area-inset-bottom)); width: 122px; height: 122px; padding: 0; border: 0; outline: 0; border-radius: 50%; background: transparent; color: #315f50; z-index: 1500; touch-action: none; user-select: none; cursor: grab; transition: transform .2s, filter .2s; }
.float-number-sticker { width: 100%; height: 100%; display: block; object-fit: contain; pointer-events: none; filter: drop-shadow(0 6px 8px #365e4430); }
.float-btn-text { position: absolute; left: 50%; bottom: 3px; transform: translateX(-50%); white-space: nowrap; padding: 3px 8px; border: 2px solid #fff; border-radius: 999px; background: #f7fbe9; box-shadow: 0 2px 6px #365e4422; font-size: 11px; font-weight: 800; }
.float-number-btn.dragging { cursor: grabbing; transform: scale(1.04); filter: drop-shadow(0 10px 18px #365e4433); }
.quick-number-overlay { position: fixed; inset: 0; background: #253a3240; backdrop-filter: blur(3px); display: none; z-index: 2100; }
.quick-number-box { position: fixed; width: min(292px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); overflow-y: auto; padding: 17px; background: #fbfdf6; border: 3px solid white; border-radius: 22px; box-shadow: 0 14px 50px #29433340; }
.quick-number-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.quick-number-title { font-size: 16px; font-weight: 700; }
.quick-close-btn { background: #eef2e6; color: #738064; font-size: 24px; width: 44px; height: 44px; border-radius: 12px; }
.quick-number-display { display: flex; justify-content: center; gap: 9px; margin: 13px 0; }
.digit-slot { width: 50px; height: 54px; display: grid; place-items: center; border: 1.5px solid #dce4d2; border-radius: 12px; background: white; font-size: 28px; font-weight: 700; }
.digit-slot.active { border-color: #5b8c66; box-shadow: 0 0 0 3px #e3eddd; }
.digit-slot.filled { color: #3f7751; border-color: #7eab82; }
.quick-number-tip { font-size: 12px; line-height: 1.6; min-height: 24px; margin-bottom: 10px; text-align: center; color: #78836f; }
.quick-number-tip.error { color: #ac503f; }
.quick-keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.keypad-btn { min-height: 48px; background: white; border: 1px solid #e0e6d7; border-radius: 11px; box-shadow: 0 2px 0 #e1e8d8; font-size: 20px; font-weight: 600; }
.keypad-btn.keypad-func { color: #7e876e; font-size: 13px; background: #f0f3e8; }
.keypad-btn.keypad-confirm { background: #477b5b; color: white; font-size: 14px; border-color: #477b5b; box-shadow: 0 2px 0 #386246; }
.quick-toast { position: fixed; left: 50%; bottom: 90px; transform: translate(-50%, 12px); max-width: calc(100vw - 36px); background: #355643; color: white; border: 2px solid white; border-radius: 14px; box-shadow: 0 5px 30px #304c3026; padding: 12px 20px; font-size: 13px; line-height: 1.6; opacity: 0; pointer-events: none; z-index: 2500; transition: opacity .2s, transform .2s; text-align: center; }
.quick-toast.show { opacity: 1; transform: translate(-50%,0); }
@media (hover: hover) {
    .button:hover, .icon-button:hover, .context-menu-item:hover { background: #eff4e9; border-color: #d0ddc6; }
    .record-item:hover { background: #f0f4e8; }
    .student-card:hover { transform: translateY(-3px); border-color: #bacdae; box-shadow: 0 6px 14px #3c5a3b0d; }
    .student-card.completed:hover { border-color: #8cb392; }
    .homework-item.incomplete:hover { background: #eee1c3; }
    .keypad-btn:hover { background: #e9f0df; }
    .keypad-btn.keypad-confirm:hover { background: #356b48; }
}
button:active { transform: translateY(1px); }
@media (min-width: 1800px) { .page-width { max-width: 1660px; } .grid-container { grid-template-columns: repeat(12, minmax(0,1fr)); gap: 10px; } .student-card { padding: 9px 8px 7px; } .emoji { width: 78px; height: 78px; } .study .emoji { width: 86px; height: 86px; } .welcome-card { min-height: 265px; } .hero-sticker { width: 270px; height: 270px; right: 55px; } }
@media (max-width: 1100px) { .welcome-grid { grid-template-columns: minmax(0,1.4fr) minmax(280px,1fr); gap: 16px; } .welcome-card { padding: 25px; } .hero-sticker { width: 200px; height: 200px; right: 3px; bottom: 10px; } .welcome-copy { width: 68%; } h1 { font-size: 31px; } .welcome-copy p { max-width: 220px; } .spark-one { display: none; } .progress-card { padding: 24px; } .progress-sticker { width: 95px; height: 95px; right: 14px; top: 68px; } .progress-caption { font-size: 10px; } }
@media (max-width: 820px) { body { padding-inline: 18px; }   .welcome-grid { grid-template-columns: minmax(0,1.4fr) minmax(250px,1fr); margin-bottom: 20px; } .welcome-card { padding: 24px; min-height: 224px; } h1 { font-size: 28px; } .hero-sticker { width: 165px; height: 165px; right: -3px; bottom: 10px; } .welcome-copy { width: 75%; } .welcome-copy p { max-width: 185px; font-size: 11px; } .eyebrow { font-size: 10px; letter-spacing: 1px; } .progress-card { padding: 21px 18px; } .progress-number { margin-top: 25px; } .progress-number > strong { font-size: 45px; } .progress-sticker { width: 85px; height: 85px; right: 4px; top: 72px; } .board-header { padding: 12px 16px; align-items: stretch; flex-direction: column; gap: 10px; } .board-actions { align-self: flex-end; margin-top: -3px; } .record-bar { padding-inline: 18px; gap: 10px; } .grid-container { grid-template-columns: repeat(5, minmax(0, 1fr)); padding-inline: 16px; gap: 8px; } .filter-bar { margin: 0; gap: 10px; } .statistics-content { padding-inline: 20px; } .filter-tab { padding-inline: 10px; } .board-footer { padding-inline: 20px; } .board-footer-note { display: none; } }
@media (max-width: 620px) { body { padding-inline: 16px; }         .welcome-grid { grid-template-columns: 1fr; gap: 13px; margin-bottom: 18px; } .welcome-card { min-height: 216px; border-radius: 21px; padding: 23px 22px; } .welcome-copy { width: 71%; } h1 { font-size: 30px; margin: 8px 0 12px; } .welcome-copy p { font-size: 11px; max-width: 190px; } .hero-sticker { width: 181px; height: 181px; right: 0; bottom: 3px; } .welcome-card::after { width: 210px; height: 210px; right: -20px; top: 7px; } .spark-two { right: 25px; top: 18px; } .progress-card { border-radius: 18px; min-height: 163px; padding: 17px 20px 16px; } .progress-top { padding-right: 82px; justify-content: flex-start; gap: 12px; } .section-kicker { font-size: 12px; } .progress-subject { font-size: 10px; } .progress-number { margin: 9px 0 14px; } .progress-number > strong { font-size: 35px; } .progress-number > span { font-size: 12px; } .progress-sticker { width: 89px; height: 89px; top: 4px; right: 15px; } .progress-bar { height: 9px; } .progress-caption { margin-top: 9px; font-size: 10px; } .classroom { border-radius: 20px; } .record-bar { padding-inline: 14px; flex-wrap: wrap; gap: 0; } .record-scroll { flex: 1 1 100%; padding: 12px 0 7px; gap: 8px; } .record-item { font-size: 12px; padding: 9px 12px; max-width: 150px; min-height: 42px; } .add-record { min-width: 92px; min-height: 42px; padding-inline: 9px; } .report-button { width: 100%; justify-content: flex-end; min-height: 38px; margin-bottom: 3px; font-size: 11px; } .report-button > span[aria-hidden] { font-size: 16px; } .board-header { padding: 10px 12px; gap: 8px; } h2 { font-size: 19px; } .board-actions { align-self: stretch; gap: 8px; margin-top: 0; } .board-actions .button { min-height: 42px; flex: 1; padding: 7px; font-size: 11px; } .filter-bar { margin: 0; flex-direction: column; align-items: stretch; gap: 10px; } .filter-tabs { width: 100%; } .filter-tab { flex: 1; min-height: 39px; padding: 7px 4px; gap: 5px; font-size: 11px; } .filter-tab > span { font-size: 9px; min-width: 16px; } .grid-container { grid-template-columns: repeat(5, minmax(0,1fr)); gap: 5px; padding: 0 8px 12px; } .student-card { border-radius: 12px; padding: 6px 4px; } .student-number { font-size: 15px; } .student-name { font-size: 12px; } .emoji { width: 60px; height: 60px; margin: 2px auto; } .study .emoji { width: 68px; height: 68px; margin: 2px auto; } .student-card.completed::after { right: 4px; bottom: 4px; width: 28px; height: 27px; } .board-footer { font-size: 10px; padding: 13px 15px; } .statistics-content { gap: 8px; padding: 4px 12px 20px; } .page-footer { font-size: 10px; letter-spacing: 0; } .float-number-btn { right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); } }
@media (max-width: 370px) { body { padding-inline: 10px; }     .welcome-card { padding-inline: 18px; min-height: 206px; } h1 { font-size: 27px; } .hero-sticker { width: 150px; height: 150px; right: -4px; bottom: 8px; } .welcome-copy p { max-width: 158px; } .welcome-copy { width: 77%; } .grid-container { grid-template-columns: repeat(5,minmax(0,1fr)); } .study .emoji { width: 68px; height: 68px; } .filter-tab { font-size: 10px; gap: 3px; } .progress-top { gap: 6px; } }
@media (max-height: 500px) and (orientation: landscape) { .quick-number-box { padding: 10px 14px; } .quick-number-header { margin-bottom: 3px; } .quick-number-display { margin: 5px 0; } .digit-slot { height: 35px; font-size: 22px; } .quick-number-tip { margin: 3px 0; min-height: 18px; } .keypad-btn { min-height: 37px; } .quick-keypad { gap: 5px; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
@media print { body { background: white; padding: 0; } .welcome-grid, .dashboard-toggle, .board-actions, .filter-bar, .float-number-btn, .page-footer, .context-menu, .record-bar { display: none !important; } .classroom { border: 0; } .student-card { break-inside: avoid; } .grid-container { grid-template-columns: repeat(6,minmax(0,1fr)); } }
/* 小屏压缩装饰区，确保文案和贴纸各有空间。 */
.progress-sticker { width: 88px; height: 88px; top: 52px; }
@media (min-width: 621px) and (max-width: 820px) { .hero-sticker { width: 145px; height: 145px; right: -2px; bottom: 12px; } .welcome-copy { width: calc(100% - 104px); } .welcome-copy p { max-width: 160px; } h1 { font-size: 26px; } .progress-sticker { width: 76px; height: 76px; top: 67px; } }
@media (max-width: 620px) {
    .welcome-card { min-height: 192px; padding-block: 20px; }
    .welcome-copy { width: calc(100% - 110px); }
    .welcome-copy p { max-width: 165px; }
    h1 { font-size: 27px; }
    .hero-sticker { width: 146px; height: 146px; right: 1px; bottom: 17px; }
    .progress-card { min-height: 145px; padding-block: 14px; }
    .progress-number { margin-block: 8px 10px; }
    .progress-sticker { top: 3px; width: 83px; height: 83px; }
    .record-bar { flex-wrap: nowrap; gap: 8px; min-height: 64px; }
    .record-scroll { flex: 1 1 auto; padding-block: 10px; }
    .report-button { width: 42px; min-height: 43px; padding: 4px 0; margin: 0; flex-direction: column; gap: 2px; justify-content: center; }
    .report-button .report-label { font-size: 9px; }
    .report-button[aria-pressed="true"] { padding-inline: 0; }
}
@media (max-width: 370px) { h1 { font-size: 25px; } .welcome-card { min-height: 190px; } .hero-sticker { width: 126px; height: 126px; right: 1px; bottom: 24px; } .welcome-copy { width: calc(100% - 95px); } .welcome-copy p { max-width: 148px; } }

/* 桌面端进一步压紧首屏内容。 */
@media (min-width: 821px) {
    .welcome-grid { grid-template-columns: minmax(0, 1.45fr) minmax(320px, .8fr); margin-bottom: 16px; gap: 14px; }
    .welcome-card, .progress-card { min-height: 190px; }
    .welcome-card { padding-block: 22px; }
    .hero-sticker { width: 190px; height: 190px; right: 28px; }
    .progress-card { padding-block: 19px; }
    .progress-number { margin-block: 14px 13px; }
    .progress-sticker { width: 86px; height: 86px; top: 47px; right: 16px; }
    .board-header { padding-block: 12px; }
    .grid-container { padding-bottom: 18px; }
    .page-footer { padding-top: 12px; }
}
/* 箭头脱离文档流；题图与进度整个区块隐藏后不留下高度或外边距。 */
main.page-width { position: relative; }
.dashboard-toggle { position: absolute; top: -16px; left: calc(50% - 18px); z-index: 40; width: 36px; height: 28px; display: grid; place-items: center; padding: 4px 8px; border: 1px solid #dce6d5; border-radius: 0 0 12px 12px; background: #fffefa; color: #628264; box-shadow: 0 2px 5px #365e4410; }
.dashboard-toggle svg { transition: transform .32s ease; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.dashboard-toggle[aria-expanded="false"] svg { transform: rotate(180deg); }
.dashboard-toggle:hover { background: #edf5e8; }
.progress-top { position: relative; padding-right: 0; }
.grid-container .student-card { min-height: 100px; }
.subject-preset-menu { width: 520px; min-width: min(290px, calc(100vw - 20px)); padding: 14px; }
.preset-menu-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 3px 3px 14px; color: #334f43; font-size: 19px; font-weight: 800; }
.preset-menu-title span { color: #647467; font-size: 12px; font-weight: 500; }
.preset-columns { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.preset-column { min-width: 0; padding: 8px; border-radius: 13px; border: 1px solid #ceddef; background: #f0f6ff; }
.preset-column.daily { background: #f1f8e9; border-color: #ccdebd; }
.preset-column h3 { padding: 5px 5px 10px; font-size: 16px; color: #285b92; }
.preset-column.daily h3 { color: #426a2c; }
.preset-item { width: 100%; display: flex; align-items: center; gap: 9px; min-height: 55px; padding: 8px; margin-bottom: 5px; border: 1px solid #fff; border-radius: 10px; background: #fff; text-align: left; }
.preset-item:last-child { margin-bottom: 0; }
.preset-item .preset-emoji { flex-shrink: 0; width: 25px; text-align: center; font-size: 22px; }
.preset-item strong, .preset-item small { display: block; }
.preset-item strong { font-size: 15px; color: #304a41; }
.preset-item small { margin-top: 3px; color: #627368; font-size: 11px; }
.preset-item:hover, .preset-item:focus-visible { border-color: #9dbf9c; background: #fffcdf; }
@media (max-width: 620px) {
    .overview-subjects { padding: 0 15px 18px; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
    .overview-subject { padding: 10px; }
    .overview-subject-title { gap: 6px; align-items: flex-start; }
    .overview-subject-title > span { font-size: 22px; }
    .overview-subject-title h3 { font-size: 16px; }
    .overview-subject-title small { font-size: 10px; }
    .overview-subject-count { margin-top: 9px; }
    .overview-subject-count strong { font-size: 23px; }
    .overview-subject-count strong span { font-size: 12px; }
    .statistics-content { padding: 4px 12px 20px; gap: 8px; }
    .statistics-content .student-card { padding: 12px 10px; }
}
@media (max-width: 400px) {
    .subject-preset-menu { padding: 10px; }
    .preset-columns { gap: 8px; }
    .preset-column { padding: 5px; }
    .preset-item { padding: 7px 4px; gap: 5px; }
    .preset-item .preset-emoji { width: 21px; font-size: 19px; }
    .preset-item strong { font-size: 14px; }
    .preset-menu-title { font-size: 17px; }
    .preset-menu-title span { font-size: 10px; }
}
.board-settings { display: inline-flex; }
@media (max-width: 820px) {
    .float-number-btn { width: 102px; height: 102px; right: max(14px, env(safe-area-inset-right)); bottom: max(14px, env(safe-area-inset-bottom)); }
    .float-btn-text { bottom: 1px; font-size: 10px; }
}
@media (max-width: 370px) { .float-number-btn { width: 88px; height: 88px; } }

/* 收拢时同时压缩高度与间距；结束后 hidden 彻底退出布局。 */
.welcome-grid.is-animating { overflow: hidden; will-change: height, opacity; }
.progress-sticker { filter: drop-shadow(0 0 7px #f6ce6570); }
@media (prefers-reduced-motion: reduce) { .dashboard-toggle svg { transition: none; } }

/* 手机学号卡固定五列，贴纸与撤销按钮随卡片收窄。 */
@media screen and (max-width: 620px) {
    .grid-container .student-card { min-height: 88px; padding: 6px 2px; border-radius: 10px; }
    .grid-container .student-number { font-size: 14px; }
    .grid-container .student-name { font-size: 11px; }
    .grid-container .emoji, .grid-container.study .emoji { width: min(100%, 48px); height: auto; aspect-ratio: 1; }
    .grid-container .student-card.completed::after { width: 23px; height: 23px; right: 1px; bottom: 2px; }
    .grid-container .card-back { padding: 4px 2px; }
    .grid-container .confirm-message { font-size: 11px; margin-bottom: 4px; }
    .grid-container .confirm-buttons { flex-direction: column; gap: 3px; width: 100%; }
    .grid-container .confirm-btn { min-width: 0; min-height: 27px; width: 100%; font-size: 12px; border-radius: 7px; }
}
@media screen and (max-width: 620px) {
    .statistics-content { grid-template-columns: repeat(5,minmax(0,1fr)); gap: 5px; padding-inline: 8px; }
    .statistics-content .student-card { padding: 7px 3px; border-radius: 10px; }
    .overview-student-heading { flex-direction: column; align-items: center; text-align: center; padding-bottom: 6px; gap: 4px; }
    .overview-number { font-size: 16px; }
    .overview-number small { font-size: 9px; margin-left: 1px; }
    .statistics-content .student-name { font-size: 11px; margin-top: 3px; }
    .overview-student-count { font-size: 9px; padding: 2px 3px; }
    .homework-list { grid-template-columns: minmax(0,1fr); gap: 4px; }
    .homework-item { padding: 4px 1px; font-size: 11px; gap: 2px; min-height: 32px; border-radius: 6px; }
    .homework-status, .task-done .homework-status { font-size: 10px; }
    .overview-done-message { font-size: 10px; }
    .statistics-content .card-back { padding: 5px 2px; }
    .statistics-content .confirm-message { font-size: 11px; margin-bottom: 5px; }
    .statistics-content .confirm-buttons { flex-direction: column; gap: 4px; width: 100%; }
    .statistics-content .confirm-btn { min-width: 0; width: 100%; font-size: 11px; }
}
