/* Seasonal presentation only: preserve layout, input states and status semantics. */
body:not(.auth-screen) {
  --bg: #f4f7f4;
  --panel: #fffefb;
  --panel-strong: #eaf2ed;
  --text: #263e35;
  --ink: #263e35;
  --muted: #62756a;
  --line: #d8e3dc;
  --brand: #286556;
  --brand-dark: #184c40;
  --accent: #a13f35;
  --gold: #896827;
  --good: #286b48;
  --bad: #b43f3e;
  --shadow: 0 5px 18px #234f3e0a;
  background: var(--bg);
}
body:not(.auth-screen) .topbar { border-bottom-color: #d9d8bb; }
body:not(.auth-screen) .brand-symbol { background: #fff4dd; color: #9b4337; border: 1px solid #e5cd98; }
body:not(.auth-screen) .topbar h1 { color: #285e53; }
body:not(.auth-screen) .brand-lockup .eyebrow { color: #8c6740; }
body:not(.auth-screen) .user-pill { color: #385849; }
body:not(.auth-screen) #logoutBtn { border-color: var(--line); background: #fffefb; }
body:not(.auth-screen) .nav-tab:hover { background: #e7eee7; color: #275d4e; }
body:not(.auth-screen) .nav-tab.active { color: #fff9e9; background: #285e53; }
body:not(.auth-screen) .primary { background: #a13f35; border-color: #a13f35; }
body:not(.auth-screen) .primary:hover:not(:disabled) { background: #853129; border-color: #853129; }
body:not(.auth-screen) .primary.danger-button { background: var(--bad); border-color: var(--bad); }
body:not(.auth-screen) .secondary,
body:not(.auth-screen) .link-button { background: #fffefb; border-color: #d3dfd5; }
body:not(.auth-screen) .secondary:hover:not(:disabled),
body:not(.auth-screen) .link-button:hover,
body:not(.auth-screen) .ghost:hover { background: #edf3ed; border-color: #b6cbbd; }
body:not(.auth-screen) button:focus-visible,
body:not(.auth-screen) a:focus-visible { outline-color: #be8b57; }
body:not(.auth-screen) input:focus,
body:not(.auth-screen) textarea:focus,
body:not(.auth-screen) select:focus { border-color: #538372; box-shadow: 0 0 0 3px #53837220; }
body:not(.auth-screen) .tabs { background: #e8efea; }
body:not(.auth-screen) .tab.active { background: #fffefb; color: #974234; }

/* Keep illustration away from questions, tables and handwriting. */
body:not(.auth-screen) .welcome-band { position: relative; isolation: isolate; overflow: hidden; min-height: 164px; padding: 24px 30px; background: #285e53; border-left: 3px solid #c89c53; }
body:not(.auth-screen) .welcome-band::after { content: ''; position: absolute; z-index: -1; top: 0; right: 0; bottom: 0; width: 38%; background: url('/assets/midautumn-2026-v1.jpg') 28% 47% / cover no-repeat; pointer-events: none; }
body:not(.auth-screen) .welcome-band > div { width: 60%; min-width: 0; }
body:not(.auth-screen) .welcome-band .seasonal-greeting { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin: 0 0 13px; font-size: 11px; line-height: 1.6; color: #ffe1a2; }
body:not(.auth-screen) .seasonal-greeting svg { width: 16px; height: 16px; }
body:not(.auth-screen) .welcome-date { color: #dae9dc; margin-bottom: 5px; }
body:not(.auth-screen) .welcome-band h2 { color: #fffdf4; font-size: 25px; }
body:not(.auth-screen) .welcome-band #welcomeCaption { color: #e0ecdf; }
body:not(.auth-screen) .welcome-art { display: none; }
body:not(.auth-screen) .point-totals { border-block: 1px solid #dfdbc5; background: #fffefb; padding: 14px 18px; }
body:not(.auth-screen) .point-totals strong { color: #285e53; }
body:not(.auth-screen) .point-totals > div:first-child > svg { color: #987132; }
body:not(.auth-screen) .point-totals > div:nth-child(2) > svg { color: #a24b3e; }
body:not(.auth-screen) .honor-item { background: #fffefb; --honor-color: #856221; --honor-tint: #fbf1d8; }
body:not(.auth-screen) .honor-quiz { --honor-color: #9b483c; --honor-tint: #faece5; }
body:not(.auth-screen) .stat { background: #fffefb; }
body:not(.auth-screen) .stat-icon { color: #648a78; }
body:not(.auth-screen) .user-stat:nth-child(4) { background: #f9eee8; border-color: #e8d6ca; }
body:not(.auth-screen) .user-stat:nth-child(4) .stat-icon { color: #ad6351; }
body:not(.auth-screen) .user-stat:nth-child(5) { background: #eaf3ed; border-color: #d3e2d7; }
body:not(.auth-screen) .user-stat:nth-child(5) .stat-icon { color: #56806e; }
body:not(.auth-screen) .stat-action.highlight { background: #fbf0dd; border-color: #dbc58f; }
body:not(.auth-screen) .stat-action.highlight:hover { background: #f6e7c8; }
body:not(.auth-screen) .stat-action.highlight .stat-icon { color: #9b6b28; }
body:not(.auth-screen) .task-panel::before { background: linear-gradient(90deg, #a64c3f 0% 25%, #c59b55 25% 50%, #43816f 50% 75%, #8fb19a 75%); height: 4px; }
body:not(.auth-screen) .task-card { background: #fffefb; border-top-color: #a25b48; }
body:not(.auth-screen) .task-card:nth-child(4n+2) { border-top-color: #c09b54; }
body:not(.auth-screen) .task-card:nth-child(4n+3) { border-top-color: #538876; }
body:not(.auth-screen) .task-card:nth-child(4n+4) { border-top-color: #85a695; }
body:not(.auth-screen) .task-card.past { background: #edf1ed; }
body:not(.auth-screen) .task-card.current { background: #eff7f0; border-color: #bed3c3; border-top-color: #699d7d; color: #2c5142; }
body:not(.auth-screen) .task-card:hover { border-color: #62917b; }
body:not(.auth-screen) .task-card.selected { background: #285e53; border-color: #285e53; color: #fffaf0; }
body:not(.auth-screen) .task-card.selected span { color: #e7efe3; }
body:not(.auth-screen) .task-card.selected .task-action { color: #fff2d1; }
body:not(.auth-screen) .practice-icon { color: #96703c; }
body:not(.auth-screen) .retake-panel { border-top-color: #a1773f; }
body:not(.auth-screen) .retake-panel .retake-card.current { background: #fcf3e0; border-color: #d9bd86; color: #6c522e; }
body:not(.auth-screen) .directed-redo-panel { border-left-color: #a65b49; }
body:not(.auth-screen) .result-retake-entry { border-color: #ddcda7; }
body:not(.auth-screen) .retake-offer-icon { color: #987039; }
body:not(.auth-screen) .retake-offer-deadline { background: #fcf4e3; border-color: #b88a43; }

body:not(.auth-screen) .admin-feature-card { background: #fffefb; border-color: #d8e3dc; }
body:not(.auth-screen) .admin-feature-card:hover { border-color: #b99654; box-shadow: 0 5px 18px #3457420d; }
body:not(.auth-screen) .admin-feature-card .feature-icon { background: #e8f1e9; color: #316b55; }
body:not(.auth-screen) .admin-feature-card:nth-child(4n+2) .feature-icon { background: #f8eae4; color: #9b4b3e; }
body:not(.auth-screen) .admin-feature-card:nth-child(4n+3) .feature-icon { background: #f7efd9; color: #8a662c; }
body:not(.auth-screen) .admin-feature-card:nth-child(4n+4) .feature-icon { background: #e8f1ef; color: #416f71; }
body:not(.auth-screen) .feature-arrow { color: #8c9f90; }
body:not(.auth-screen) .admin-page-head h2,
body:not(.auth-screen) .section-heading h2 { color: #285e53; }
body:not(.auth-screen) .admin-notice:not(:empty) { background: #edf4ee; border-left-color: #679477; }
body:not(.auth-screen) .reward-adjust-table th,
body:not(.auth-screen) #rewardResults th { background: #eaf1eb; }
body:not(.auth-screen) .homework-user:hover { background: #eaf2ec; }
body:not(.auth-screen) .homework-review-item[open] { border-bottom: 1px solid #d9ccb0; }
body:not(.auth-screen) .homework-review-item > summary:focus-visible { outline-color: #538372; }
body:not(.auth-screen) .homework-review-status.reviewed { color: #286b48; background: #e7f3e9; }

body:not(.auth-screen) .rank-batch-button { background: #edf3ed; }
body:not(.auth-screen) .rank-batch-button[aria-pressed="true"] { background: #285e53; border-color: #285e53; color: #fffaf0; }
body:not(.auth-screen) .leader-item:first-child { background: #f7f0de; }
body:not(.auth-screen) .rank { color: #31654f; background: #e3eee4; }
body:not(.auth-screen) .leader-item:first-child .rank { background: #856221; color: #fffaf0; }
body:not(.auth-screen) .like-button[aria-pressed="true"] { color: #994538; background: #faece5; border-color: #dfbcb0; }
body:not(.auth-screen) .rank-comment.comment-located { background: #fcf0c9; box-shadow: inset 3px 0 #ba8c3a; }
body:not(.auth-screen) .notification-row.latest { background: #eef5ef; border-color: #c3d9c9; border-left: 3px solid #c19951; }
body:not(.auth-screen) .notification-head strong { color: #285e53; }
body:not(.auth-screen) .comment-alert { border-color: #dbc59d; border-left-color: #a57636; background: #fff7e7; color: #715226; }
body:not(.auth-screen) .comment-inbox-icon { background: #f7ebdf; color: #9c5140; }
body:not(.auth-screen) .comment-inbox-item.is-unread { border-left-color: #ac654e; background: #fbf1e9; }
body:not(.auth-screen) .message-contact { background: #eaf1eb; }
body:not(.auth-screen) .message-contact.selected { background: #285e53; color: #fffaf0; }
body:not(.auth-screen) .message-contact.selected span { color: #e1eee4; }
body:not(.auth-screen) .message-thread-head { background: #edf4ef; }
body:not(.auth-screen) .message-list { background: #f6f8f4; }
body:not(.auth-screen) .message-row.mine > div { background: #e6f0e4; border-color: #cbdcc9; }
body:not(.auth-screen) .message-form { background: #fffefb; }

body:not(.auth-screen) dialog,
body:not(.auth-screen) .notice-dialog { color: var(--text); border-color: #d8c8a7; background: #fffefb; }
body:not(.auth-screen) dialog::backdrop { background: #193c3266; }
body:not(.auth-screen) .quiz-dialog::backdrop { background: #16372bcc; }
body:not(.auth-screen) .quiz-dialog { background: #fff; border-color: #cbdcd0; }
body:not(.auth-screen) .quiz-dialog .batch-banner { background: #edf4ef; border-top: 3px solid #c5a162; }
body:not(.auth-screen) .quiz-tabs { background: #fffefb; }
body:not(.auth-screen) .quiz-tabs button[aria-selected="true"] { color: #994538; border-bottom-color: #a13f35; }
body:not(.auth-screen) .quiz-point-summary { background: #fafcf8; }
body:not(.auth-screen) .timer-bar { background: #4c8d70; }
body:not(.auth-screen) .timer-bar[data-low="true"] { background: #a13f35; }
body:not(.auth-screen) .ready-next.pulse { background: #285e53; border-color: #285e53; box-shadow: 0 0 0 3px #d4e5d5; }
body:not(.auth-screen) .ready-next:disabled { background: #e9eee4; border-color: #e9eee4; color: var(--muted); }
body:not(.auth-screen) .answer-input-modes button { background: #f4f8f4; color: #526e60; border-color: #ccdcd2; }
body:not(.auth-screen) .answer-input-modes button[aria-pressed="true"],
body:not(.auth-screen) .ink-word-tabs button[aria-pressed="true"] { background: #e5f0e8; color: #285e53; border-color: #659981; }
body:not(.auth-screen) .handwriting-pad { background: #f7faf5; border-color: #bcd2c3; }
body:not(.auth-screen) .ink-toolbar,
body:not(.auth-screen) .ink-review-label { color: #3f705b; }
body:not(.auth-screen) .ink-paper { border-color: #89b39c; background-image: repeating-linear-gradient(to bottom, transparent 0, transparent calc(33.333% - 1px), #d3e4d8 calc(33.333% - 1px), #d3e4d8 33.333%); }
body:not(.auth-screen) .ink-word-tabs button,
body:not(.auth-screen) .ink-tools .icon-only,
body:not(.auth-screen) #inkSpaceBtn { color: #386953; border-color: #c5d9cb; }
body:not(.auth-screen) #recognizeInkBtn { background: #a13f35; border-color: #a13f35; }

@media (max-width: 760px) {
  body:not(.auth-screen) .section-tabs { background: #fffefb; border-top-color: #dcd4bc; box-shadow: 0 -4px 16px #294e3408; }
  body:not(.auth-screen) .welcome-band { padding: 22px 20px; min-height: 166px; }
  body:not(.auth-screen) .welcome-band > div { width: 69%; }
  body:not(.auth-screen) .welcome-band::after { width: 28%; background-position: 30% 50%; }
  body:not(.auth-screen) .welcome-band h2 { font-size: 22px; }
  body:not(.auth-screen) .welcome-band .seasonal-greeting { font-size: 10px; gap: 5px; }
  body:not(.auth-screen) .point-totals { padding: 13px 12px; gap: 10px 18px; }
  body:not(.auth-screen) .quiz-dialog { border-color: transparent; }
}
@media (max-width: 380px) {
  body:not(.auth-screen) .welcome-band { padding: 20px 16px; }
  body:not(.auth-screen) .welcome-band > div { width: 73%; }
  body:not(.auth-screen) .welcome-band::after { width: 24%; }
  body:not(.auth-screen) .point-totals { gap: 8px 14px; }
  body:not(.auth-screen) .point-totals > div { gap: 7px; }
}

/* A separate illustrated world for the signed-in app, not the login landscape. */
body:not(.auth-screen) {
  --festival-paper: url('/assets/festival-garden-v1.jpg');
  --festival-book: url('/assets/festival-book-v1.webp');
  --festival-lanterns: url('/assets/festival-lanterns-v1.webp');
  --festival-mooncakes: url('/assets/festival-mooncakes-v1.webp');
  --module-art: var(--festival-book);
  --line: #d5dcca;
  --bg: #edf2e9;
  isolation: isolate;
}
body:not(.auth-screen)::before { content: ''; position: fixed; inset: 0; z-index: -1; background: #edf2e9 var(--festival-paper) center / cover no-repeat; pointer-events: none; }
body:not(.auth-screen) .app-shell { width: min(1320px, calc(100% - 64px)); }
body:not(.auth-screen) .topbar { padding: 14px 18px 20px; background: #fffefac9; border-bottom: 1px solid #cab67f; }
body:not(.auth-screen) .brand-symbol { border-color: #c4a36b; }
body:not(.auth-screen) .section-tabs { padding: 10px 12px 16px 0; background: #fffefacb; border-right: 1px solid #d4c89f; }
body:not(.auth-screen) .nav-tab { border-left: 3px solid transparent; }
body:not(.auth-screen) .nav-tab.active { border-left-color: #cfab60; background: #285e53; }
body:not(.auth-screen) .view-pane { --module-art: var(--festival-book); position: relative; padding: 20px 22px; background: #fffefce8; border-block: 1px solid #d2c39c; }
body:not(.auth-screen) #adminPane { padding: 20px; background: #f7fbf2c7; }
body:not(.auth-screen) #rankPane,
body:not(.auth-screen) #adminAttemptsPage,
body:not(.auth-screen) #adminRewardsPage { --module-art: var(--festival-mooncakes); }
body:not(.auth-screen) #messagePane,
body:not(.auth-screen) #noticePane,
body:not(.auth-screen) #commentInboxPane,
body:not(.auth-screen) #directoryPane,
body:not(.auth-screen) #adminOrganizationPage,
body:not(.auth-screen) #adminUsersPage,
body:not(.auth-screen) #adminNoticePage { --module-art: var(--festival-lanterns); }
body:not(.auth-screen) .view-pane > .table-panel { border-top: 0; padding-top: 0; }
body:not(.auth-screen) .view-pane > .table-panel > .panel-head,
body:not(.auth-screen) .admin-page-head { min-height: 68px; padding: 8px 0 8px 70px; background: var(--module-art) left center / 60px 60px no-repeat; }
body:not(.auth-screen) .admin-page-head { border-bottom-color: #cdb783; margin-bottom: 4px; }
body:not(.auth-screen) .view-pane > .table-panel > .panel-head h2,
body:not(.auth-screen) .admin-page-head h2 { color: #285e53; }
body:not(.auth-screen) .section-heading { padding-bottom: 12px; border-bottom: 1px solid #cfbb8c; }
body:not(.auth-screen) .section-heading h2 { font-family: 'Songti SC', STSong, SimSun, serif; font-size: 23px; }
body:not(.auth-screen) .table-panel,
body:not(.auth-screen) .side-panel,
body:not(.auth-screen) .admin-form { border-color: #d6ccb0; }
body:not(.auth-screen) .school-identity { padding: 6px 12px; background: #fffefbd9; border-left: 2px solid #cba15c; }

body:not(.auth-screen) .welcome-band { min-height: 178px; background: linear-gradient(#eef5eade, #eef5eade), var(--festival-paper) center 58% / cover no-repeat; border-block: 1px solid #cdb580; border-left-color: #a45541; }
body:not(.auth-screen) .welcome-band > div { position: relative; z-index: 1; width: 66%; }
body:not(.auth-screen) .welcome-band::after { width: 29%; background: var(--festival-book) center / contain no-repeat; margin: 8px 20px; }
body:not(.auth-screen) .welcome-band h2 { color: #285e53; }
body:not(.auth-screen) .welcome-band .welcome-date,
body:not(.auth-screen) .welcome-band #welcomeCaption { color: #3d6655; }
body:not(.auth-screen) .welcome-band .seasonal-greeting { color: #995039; }
body:not(.auth-screen) .admin-batch-choice { padding: 10px 12px; background: #fffdfae8; border-bottom: 1px solid #d5c7a3; }
body:not(.auth-screen) .point-totals { background: #fafff6ed; border-block-color: #c9b485; }
body:not(.auth-screen) .honor-item { background: #fdf6e5f5; border-color: #d7c69a; }
body:not(.auth-screen) .honor-quiz { background: #fcf0ebf5; border-color: #e0c1ad; }
body:not(.auth-screen) .honor-emblem { border: 1px solid #d9c089; background: #fffdf5; }
body:not(.auth-screen) .stat { background: #e9f4ecf0; border-color: #b6cdbc; overflow: hidden; }
body:not(.auth-screen) .stat::after { content: ''; position: absolute; right: 10px; bottom: 8px; width: 50px; height: 50px; background: var(--festival-lanterns) center / contain no-repeat; pointer-events: none; }
body:not(.auth-screen) .stat-icon.lucide { width: 17px; height: 17px; top: 13px; right: 13px; bottom: auto; }
body:not(.auth-screen) .stat span { padding-right: 22px; }
body:not(.auth-screen) .stat strong { padding-right: 50px; }
body:not(.auth-screen) .user-stat:nth-child(4) { background: #f9eae2ed; }
body:not(.auth-screen) .user-stat:nth-child(5) { background: #e5f1eced; }
body:not(.auth-screen) .user-stat:nth-child(5)::after { background-image: var(--festival-book); }
body:not(.auth-screen) .stat-action.highlight { background: #fbefd9ef; }
body:not(.auth-screen) .stat-action.highlight::after { background-image: var(--festival-mooncakes); }

/* Each functional tile keeps its existing Lucide icon and receives a painted vignette. */
body:not(.auth-screen) .admin-feature-card { --tile-art: var(--festival-lanterns); min-height: 202px; background: #e5f0e5f5; border: 1px solid #b9cfb9; border-top: 3px solid #759777; box-shadow: inset 0 0 0 4px #ffffff48; }
body:not(.auth-screen) .admin-feature-card::before { content: ''; position: absolute; top: 9px; right: 12px; width: 102px; height: 102px; background: var(--tile-art) center / contain no-repeat; pointer-events: none; }
body:not(.auth-screen) .admin-feature-card .feature-icon { position: relative; z-index: 1; width: 40px; height: 40px; margin-bottom: 40px; padding: 9px; background: #fffdf5e6; border: 1px solid #c5d7c4; }
body:not(.auth-screen) .admin-feature-card > span,
body:not(.auth-screen) .admin-feature-card > small { position: relative; z-index: 1; }
body:not(.auth-screen) .admin-feature-card .feature-arrow { top: auto; bottom: 18px; color: #526e58; }
body:not(.auth-screen) .admin-feature-card > small { padding-right: 20px; }
body:not(.auth-screen) .admin-feature-card:nth-child(4n+2) { --tile-art: var(--festival-book); background: #f9e9e1f5; border-color: #debfab; border-top-color: #b67d66; }
body:not(.auth-screen) .admin-feature-card:nth-child(4n+3) { --tile-art: var(--festival-mooncakes); background: #f7efd8f5; border-color: #d9c895; border-top-color: #b7954d; }
body:not(.auth-screen) .admin-feature-card:nth-child(4n+4) { --tile-art: var(--festival-book); background: #e4f0edf5; border-color: #b9d0c7; border-top-color: #6f9b89; }
body:not(.auth-screen) .admin-feature-card[data-admin-page="attempts"],
body:not(.auth-screen) .admin-feature-card[data-admin-page="rewards"] { --tile-art: var(--festival-mooncakes); }
body:not(.auth-screen) .admin-feature-card[data-admin-page="notice"],
body:not(.auth-screen) .admin-feature-card[data-homework-channel="dubbing"],
body:not(.auth-screen) .admin-feature-card[data-review-channel="dubbing"] { --tile-art: var(--festival-lanterns); }
body:not(.auth-screen) .admin-feature-card[data-homework-channel="written"],
body:not(.auth-screen) .admin-feature-card[data-review-channel="written"] { --tile-art: var(--festival-book); }
body:not(.auth-screen) .admin-feature-card:hover { border-color: #9c7441; box-shadow: inset 0 0 0 4px #ffffff6b, 0 4px 12px #506e3610; }
body:not(.auth-screen) .admin-feature-card.has-unread-homework::after { z-index: 2; box-shadow: 0 0 0 3px #fffaf1; }

body:not(.auth-screen) .task-card { background: #f5f5eaf7; border-color: #d5cfb3; }
body:not(.auth-screen) .task-card.past { background: #eef0e5f5; }
body:not(.auth-screen) .task-card.current { background: #e3f0e6; border-color: #9fbea5; border-top-color: #5c9475; }
body:not(.auth-screen) .task-card.selected { background: #285e53; color: #fffaf0; border-color: #285e53; }
body:not(.auth-screen) .task-card .task-action { padding-left: 29px; min-height: 33px; background: var(--festival-book) left 6px / 25px 25px no-repeat; }
body:not(.auth-screen) .practice-panel { background: #edf5ea; padding-inline: 14px; border-color: #c4cdae; }
body:not(.auth-screen) .notification-row.latest { background: #f8f0df; border-color: #ddc594; }
body:not(.auth-screen) .notification-row { background: #ffffff66; padding-inline: 14px; }
body:not(.auth-screen) .leader-item { background: #fbfcf6ab; }
body:not(.auth-screen) .leader-item:first-child { background: #f8edcd; border-block: 1px solid #cfb679; }
body:not(.auth-screen) .rank-batch-button { background: #edf3e7; border-color: #c8d4b9; }
body:not(.auth-screen) .rank-batch-button[aria-pressed="true"] { background: #285e53; border-color: #285e53; }
body:not(.auth-screen) .homework-submission { padding: 18px 14px; background: #f3f7ec; border-color: #c8c9a8; }
body:not(.auth-screen) .homework-user { background: #f5f7ed; padding-inline: 12px; }
body:not(.auth-screen) .homework-user:nth-child(2n) { background: #fff9ef; }
body:not(.auth-screen) .homework-review-item[open] { background: #fff9ed; border-color: #d9c596; }
body:not(.auth-screen) .school-member-row,
body:not(.auth-screen) .directory-member,
body:not(.auth-screen) .roster-row { padding-inline: 10px; background: #f3f7eeab; }
body:not(.auth-screen) .school-member-row:nth-child(2n),
body:not(.auth-screen) .directory-member:nth-child(2n),
body:not(.auth-screen) .roster-row:nth-child(2n) { background: #fff8edab; }
body:not(.auth-screen) .reward-adjust-table,
body:not(.auth-screen) #rewardResults table { background: #fffdf6; }
body:not(.auth-screen) .reward-adjust-table th,
body:not(.auth-screen) #rewardResults th { background: #e4eddd; }
body:not(.auth-screen) .admin-summary-row { background: #f6f8ed; padding-inline: 8px; }
body:not(.auth-screen) .admin-summary-row:nth-child(2n) { background: #fff8e9; }
body:not(.auth-screen) .message-thread { background: #f6f3e7; border-color: #c3bd98; }
body:not(.auth-screen) .message-thread-head { background: #e4ecdc; }
body:not(.auth-screen) .message-history { background: #f7f5ec var(--festival-paper) center bottom / cover no-repeat; }
body:not(.auth-screen) .message-list { background: transparent; }
body:not(.auth-screen) .message-contact { background: #e7efdf; border: 1px solid #cfdbbf; }
body:not(.auth-screen) .message-contact.selected { background: #285e53; border-color: #285e53; }
body:not(.auth-screen) .message-row > div { background: #fffefa; border-color: #d4c9a9; }
body:not(.auth-screen) .message-row.mine > div { background: #e2eedc; border-color: #b8cba8; }
body:not(.auth-screen) .message-form { background: #fff9edf2; }
body:not(.auth-screen) .comment-inbox-item { background: #f4f7eeb3; }
body:not(.auth-screen) .comment-inbox-item.is-unread { background: #fbf0e2; }

/* Dialogs are festival stationery; the actual writing surface remains plain. */
body:not(.auth-screen) dialog,
body:not(.auth-screen) .notice-dialog { background: #fffdf4; border-color: #c9b17c; }
body:not(.auth-screen) .notice-dialog { background-image: linear-gradient(#fffef9eb, #fffef9eb), var(--festival-paper); background-size: cover; }
body:not(.auth-screen) .quiz-dialog { background: #fbfcf6; }
body:not(.auth-screen) .quiz-dialog .batch-banner { background: #e9f0df; border-top-color: #b68d49; }
body:not(.auth-screen) .quiz-tabs { background: #fcf8eb; }
body:not(.auth-screen) .quiz-dialog-body { background-image: linear-gradient(#fffefbee, #fffefbee), var(--festival-paper); background-position: center; background-size: cover; }
body:not(.auth-screen) .quiz-dialog .question-panel { background: transparent; }
body:not(.auth-screen) .quiz-point-summary { background: #eaf0e0; }
body:not(.auth-screen) .handwriting-pad { background: #f0f5e6; border-color: #aebe9b; }
body:not(.auth-screen) .ink-paper { background-color: #fff; }
body:not(.auth-screen) .homework-photo-dialog { background: #fff; }

@media (max-width: 1100px) {
  body:not(.auth-screen) .app-shell { width: calc(100% - 40px); }
  body:not(.auth-screen) .section-tabs { padding-right: 8px; }
  body:not(.auth-screen) .view-pane { padding-inline: 18px; }
}
@media (max-width: 760px) {
  body:not(.auth-screen)::before { background-size: auto 100%; background-position: 38% center; }
  body:not(.auth-screen) .app-shell { width: calc(100% - 28px); }
  body:not(.auth-screen) .topbar { padding: 10px 8px 16px; }
  body:not(.auth-screen) .section-tabs { padding: 8px 4px calc(8px + env(safe-area-inset-bottom)); border-right: 0; background: #fffaf0f5; }
  body:not(.auth-screen) .nav-tab { border-left: 0; border-top: 2px solid transparent; }
  body:not(.auth-screen) .nav-tab.active { border-top-color: #d7b15d; }
  body:not(.auth-screen) .view-pane,
  body:not(.auth-screen) #adminPane { padding: 16px 12px; }
  body:not(.auth-screen) .welcome-band > div { width: 72%; }
  body:not(.auth-screen) .welcome-band::after { width: 24%; margin-right: 4px; }
  body:not(.auth-screen) .welcome-band { padding: 20px 16px; }
  body:not(.auth-screen) .view-pane > .table-panel > .panel-head,
  body:not(.auth-screen) .admin-page-head { padding-left: 50px; background-size: 42px 42px; min-height: 56px; flex-wrap: wrap; gap: 8px; }
  body:not(.auth-screen) .admin-page-head h2 { font-size: 19px; }
  body:not(.auth-screen) .admin-feature-grid { gap: 10px; }
  body:not(.auth-screen) .admin-feature-card { padding: 16px 12px; min-height: 200px; }
  body:not(.auth-screen) .admin-feature-card::before { width: 82px; height: 82px; right: 5px; top: 8px; }
  body:not(.auth-screen) .admin-feature-card .feature-icon { width: 32px; height: 32px; padding: 7px; margin-bottom: 44px; }
  body:not(.auth-screen) .admin-feature-card > span { font-size: 15px; }
  body:not(.auth-screen) .admin-feature-card .feature-arrow { bottom: 16px; right: 10px; }
  body:not(.auth-screen) .task-list { gap: 8px; }
  body:not(.auth-screen) .task-card { padding-inline: 10px; }
  body:not(.auth-screen) .stat::after { width: 40px; height: 40px; right: 7px; }
  body:not(.auth-screen) .stat strong { padding-right: 32px; }
  body:not(.auth-screen) .rank-batch-button { padding-inline: 4px; }
}
@media (max-width: 380px) {
  body:not(.auth-screen) .app-shell { width: calc(100% - 24px); }
  body:not(.auth-screen) .topbar { padding-inline: 3px; }
  body:not(.auth-screen) .view-pane,
  body:not(.auth-screen) #adminPane { padding-inline: 9px; }
  body:not(.auth-screen) .admin-feature-card { padding-inline: 10px; }
  body:not(.auth-screen) .admin-feature-card::before { width: 71px; height: 71px; right: 2px; top: 15px; }
  body:not(.auth-screen) .admin-feature-card > span { font-size: 14px; }
  body:not(.auth-screen) .practice-panel { padding-inline: 10px; }
}
