/* Autumn landscape theme. Layout and semantic success/error colors stay in base styles. */
body:not(.auth-screen) {
  --autumn-landscape: url('/assets/autumn-landscape-v1.webp');
  --bg: #f7f0e4;
  --panel: #fffdf8;
  --panel-strong: #f3e8d6;
  --text: #493b30;
  --ink: #493b30;
  --muted: #756957;
  --line: #e1d2bb;
  --brand: #8c5335;
  --brand-dark: #693c29;
  --accent: #a65237;
  --gold: #8b672b;
  --good: #35704b;
  --bad: #ac403e;
  --shadow: 0 5px 18px #7043220c;
  background: var(--bg);
  isolation: isolate;
}
body:not(.auth-screen)::before {
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(#f7f0e4bf, #f7f0e4e6), var(--autumn-landscape) center / cover no-repeat;
}
body:not(.auth-screen) .app-shell { width: min(1320px, calc(100% - 64px)); }
body:not(.auth-screen) .topbar {
  padding: 14px 18px 20px; background: #fffdf7ed; border-bottom: 1px solid #ceb184; border-radius: 12px 12px 0 0;
}
body:not(.auth-screen) .brand-symbol { background: #f7ead1; color: #955536; border: 1px solid #d8ba88; }
body:not(.auth-screen) .topbar h1 { color: #70462e; }
body:not(.auth-screen) .brand-lockup .eyebrow { color: #876c4c; }
body:not(.auth-screen) .user-pill { color: #695443; }
body:not(.auth-screen) #logoutBtn { border-color: var(--line); background: #fffdf8; }
body:not(.auth-screen) .section-tabs { padding: 10px 12px 16px 0; background: #fffdf7ed; border-right: 1px solid #dfd0b7; border-radius: 8px; }
body:not(.auth-screen) .nav-tab { border-left: 3px solid transparent; }
body:not(.auth-screen) .nav-tab:hover { background: #f4e6d0; color: #70462e; }
body:not(.auth-screen) .nav-tab.active { background: #805337; color: #fffaf1; border-left-color: #d5ac64; }
body:not(.auth-screen) .primary { background: #945032; border-color: #945032; }
body:not(.auth-screen) .primary:hover:not(:disabled) { background: #733d29; border-color: #733d29; }
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: #fffdf8; border-color: #deceb5; }
body:not(.auth-screen) .secondary:hover:not(:disabled),
body:not(.auth-screen) .link-button:hover,
body:not(.auth-screen) .ghost:hover { background: #f3e8d6; border-color: #c5a777; }
body:not(.auth-screen) button:focus-visible,
body:not(.auth-screen) a:focus-visible { outline-color: #ad773c; }
body:not(.auth-screen) input:focus,
body:not(.auth-screen) textarea:focus,
body:not(.auth-screen) select:focus { border-color: #ae784b; box-shadow: 0 0 0 3px #ae784b24; }
body:not(.auth-screen) .tabs { background: #f1e8d9; }
body:not(.auth-screen) .tab.active { background: #fffdf8; color: #8c5335; }

/* Open scenery at the right; quiet paper behind the welcome text. */
body:not(.auth-screen) .welcome-band {
  position: relative; isolation: isolate; overflow: hidden; min-height: 190px; padding: 26px 30px;
  background: #faf0dc; border: 1px solid #d8bc8f; border-left: 3px solid #ad7044; border-radius: 10px;
}
body:not(.auth-screen) .welcome-band::after {
  content: ''; position: absolute; z-index: -1; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, #fff5e4 0%, #fff5e4f5 32%, #fff5e4c4 53%, #fff5e414 78%),
    var(--autumn-landscape) center 56% / cover no-repeat;
}
body:not(.auth-screen) .welcome-band > div { position: relative; width: 70%; min-width: 0; }
body:not(.auth-screen) .welcome-band .seasonal-greeting { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin: 0 0 12px; font-size: 11px; line-height: 1.6; color: #975631; }
body:not(.auth-screen) .seasonal-greeting svg { width: 16px; height: 16px; }
body:not(.auth-screen) .welcome-date { color: #76624c; margin-bottom: 5px; }
body:not(.auth-screen) .welcome-band h2 { color: #66472f; font-size: 25px; }
body:not(.auth-screen) .welcome-band #welcomeCaption { color: #735c46; }
body:not(.auth-screen) .welcome-art { display: none; }
body:not(.auth-screen) .point-totals { border-block: 1px solid #d9c19a; background: #fffdf7ed; padding: 14px 18px; border-radius: 8px; }
body:not(.auth-screen) .point-totals strong { color: #805337; }
body:not(.auth-screen) .point-totals > div:first-child > svg { color: #987132; }
body:not(.auth-screen) .point-totals > div:nth-child(2) > svg { color: #a2573c; }
body:not(.auth-screen) .honor-item { background: #fff6e5f5; border-color: #e1ceaa; --honor-color: #856221; --honor-tint: #f7ebce; }
body:not(.auth-screen) .honor-quiz { background: #f9ede4f5; --honor-color: #915c45; --honor-tint: #f4e2d3; }
body:not(.auth-screen) .honor-emblem { border: 1px solid #dcc492; background: #fffdf5; }
body:not(.auth-screen) .stat { background: #fcf4e6; border-color: #e0caab; }
body:not(.auth-screen) .stat-icon { color: #b18c5a; }
body:not(.auth-screen) .user-stat:nth-child(4) { background: #f9ece2; border-color: #e8cdbb; }
body:not(.auth-screen) .user-stat:nth-child(4) .stat-icon { color: #ac7355; }
body:not(.auth-screen) .user-stat:nth-child(5) { background: #f0f1e2; border-color: #d6d9b8; }
body:not(.auth-screen) .user-stat:nth-child(5) .stat-icon { color: #798354; }
body:not(.auth-screen) .stat-action.highlight { background: #f8ebcd; border-color: #dbc28b; }
body:not(.auth-screen) .stat-action.highlight:hover { background: #f3e1b8; }
body:not(.auth-screen) .stat-action.highlight .stat-icon { color: #9b6b28; }
body:not(.auth-screen) .admin-batch-choice { background: #fffaf1; border-color: #dbc7a7; }

/* Paper surfaces keep dense lessons, lists and forms easy to read. */
body:not(.auth-screen) .view-pane { position: relative; padding: 20px 22px; background: #fffdf8f5; border-block: 1px solid #ddc7a4; border-radius: 10px; }
body:not(.auth-screen) #adminPane { padding: 20px; background: #fffaf0e8; }
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: 62px; padding-block: 8px 14px; border-bottom-color: #dcc49e; }
body:not(.auth-screen) .admin-page-head h2,
body:not(.auth-screen) .view-pane > .table-panel > .panel-head h2,
body:not(.auth-screen) .section-heading h2 { color: #805337; }
body:not(.auth-screen) .section-heading { padding-bottom: 12px; border-bottom: 1px solid #ddc7a4; }
body:not(.auth-screen) .section-heading h2 { font-family: 'Songti SC', STSong, SimSun, serif; font-size: 23px; }
body:not(.auth-screen) .school-identity { padding: 6px 12px; background: #fffdf7ed; border-left: 2px solid #bf934b; }
body:not(.auth-screen) .task-panel::before { background: linear-gradient(90deg, #ab6745 0% 25%, #cc9c52 25% 50%, #9b9b63 50% 75%, #bdb799 75%); height: 4px; }
body:not(.auth-screen) .task-card { background: #faf2e4; border-color: #ddccae; border-top-color: #ad7044; }
body:not(.auth-screen) .task-card:nth-child(4n+2) { border-top-color: #bb9858; }
body:not(.auth-screen) .task-card:nth-child(4n+3) { border-top-color: #8b945e; }
body:not(.auth-screen) .task-card:nth-child(4n+4) { border-top-color: #ac8b72; }
body:not(.auth-screen) .task-card.past { background: #f3eee4; }
body:not(.auth-screen) .task-card.current { background: #fff3d9; border-color: #d6b879; border-top-color: #b5853e; color: #71512e; }
body:not(.auth-screen) .task-card:hover { border-color: #b08b57; }
body:not(.auth-screen) .task-card.selected { background: #805337; border-color: #805337; color: #fffaf0; }
body:not(.auth-screen) .task-card.selected span { color: #f7e8cf; }
body:not(.auth-screen) .task-card.selected .task-action { color: #fff2d1; }
body:not(.auth-screen) .practice-panel { background: #f1f2e6; padding-inline: 14px; border-color: #d4d6b9; }
body:not(.auth-screen) .practice-icon { color: #8a794c; }
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; }

/* Small scenic windows echo the landscape without replacing functional icons. */
body:not(.auth-screen) .admin-feature-card {
  --scene-position: 15% 65%; min-height: 190px; background: #fcf1de; border: 1px solid #e0caa2;
  border-top: 3px solid #be934c; box-shadow: inset 0 0 0 4px #ffffff48;
}
body:not(.auth-screen) .admin-feature-card::before {
  content: ''; position: absolute; top: 12px; right: 12px; width: 82px; height: 82px; pointer-events: none;
  background: var(--autumn-landscape) var(--scene-position) / auto 155% no-repeat;
  border: 3px solid #fff9eb; border-radius: 50%; box-shadow: 0 0 0 1px #b99b6740;
}
body:not(.auth-screen) .admin-feature-card .feature-icon { position: relative; z-index: 1; width: 38px; height: 38px; margin-bottom: 34px; padding: 8px; background: #fffaf0; border: 1px solid #dfcaa6; color: #95642f; }
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: #997b56; }
body:not(.auth-screen) .admin-feature-card > small { padding-right: 20px; }
body:not(.auth-screen) .admin-feature-card:nth-child(4n+2) { --scene-position: 70% 55%; background: #f8ece3; border-color: #ddc4b3; border-top-color: #b77b58; }
body:not(.auth-screen) .admin-feature-card:nth-child(4n+2) .feature-icon { color: #9b5d43; }
body:not(.auth-screen) .admin-feature-card:nth-child(4n+3) { --scene-position: 45% 12%; background: #f1f0e2; border-color: #d3d3b3; border-top-color: #979867; }
body:not(.auth-screen) .admin-feature-card:nth-child(4n+3) .feature-icon { color: #727950; }
body:not(.auth-screen) .admin-feature-card:nth-child(4n+4) { --scene-position: 55% 95%; background: #f0eee8; border-color: #d3cdc0; border-top-color: #939486; }
body:not(.auth-screen) .admin-feature-card:nth-child(4n+4) .feature-icon { color: #6b756c; }
body:not(.auth-screen) .admin-feature-card:hover { border-color: #b28c51; box-shadow: inset 0 0 0 4px #ffffff6b, 0 4px 12px #70432210; }
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) .notification-row { background: #fffaf1; padding-inline: 14px; }
body:not(.auth-screen) .notification-row.latest { background: #fbefd9; border-color: #ddc594; border-left: 3px solid #ba8d45; }
body:not(.auth-screen) .notification-head strong { color: #805337; }
body:not(.auth-screen) .leader-item { background: #fffcf6; }
body:not(.auth-screen) .leader-item:first-child { background: #f8edcd; border-block: 1px solid #dbc28b; }
body:not(.auth-screen) .rank { color: #805b32; background: #f1e5ce; }
body:not(.auth-screen) .leader-item:first-child .rank { background: #856221; color: #fffaf0; }
body:not(.auth-screen) .rank-batch-button { background: #f7eedc; border-color: #ddccae; }
body:not(.auth-screen) .rank-batch-button[aria-pressed="true"] { background: #805337; border-color: #805337; 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) .homework-submission { padding: 18px 14px; background: #faf3e6; border-color: #dfccaa; }
body:not(.auth-screen) .homework-user { background: #f8f0e2; padding-inline: 12px; }
body:not(.auth-screen) .homework-user:nth-child(2n) { background: #fff9ef; }
body:not(.auth-screen) .homework-user:hover { background: #f4e8d3; }
body:not(.auth-screen) .homework-review-item[open] { background: #fff9ed; border-color: #d9c596; }
body:not(.auth-screen) .homework-review-item > summary:focus-visible { outline-color: #ad773c; }
body:not(.auth-screen) .homework-audio-controls { background: #fbf1df; border-color: #dec9a5; }
body:not(.auth-screen) .school-member-row,
body:not(.auth-screen) .directory-member,
body:not(.auth-screen) .roster-row { padding-inline: 10px; background: #faf2e4; }
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: #fffaf1; }
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: #f0e5d0; }
body:not(.auth-screen) .admin-notice:not(:empty) { background: #f7efdf; border-left-color: #b69459; }
body:not(.auth-screen) .admin-summary-row { background: #f7efdf; padding-inline: 8px; }
body:not(.auth-screen) .admin-summary-row:nth-child(2n) { background: #fff8e9; }
body:not(.auth-screen) .message-thread { background: #f6f0e3; border-color: #d8c5a0; }
body:not(.auth-screen) .message-thread-head { background: #f0e6d1; }
body:not(.auth-screen) .message-history { background: linear-gradient(#fff9eac9, #fff9eac9), var(--autumn-landscape) center / cover no-repeat; }
body:not(.auth-screen) .message-list { background: transparent; }
body:not(.auth-screen) .message-contact { background: #f4ead7; border: 1px solid #dfccaa; }
body:not(.auth-screen) .message-contact.selected { background: #805337; border-color: #805337; color: #fffaf0; }
body:not(.auth-screen) .message-contact.selected span { color: #f6e5cd; }
body:not(.auth-screen) .message-row > div { background: #fffefa; border-color: #d4c9a9; }
body:not(.auth-screen) .message-row.mine > div { background: #f3e3be; border-color: #d6bc85; }
body:not(.auth-screen) .message-form { background: #fff9edf2; }
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 { background: #faf3e6; }
body:not(.auth-screen) .comment-inbox-item.is-unread { border-left-color: #ac654e; background: #fbecd9; }

/* The handwriting canvas and photographs retain their original neutral surfaces. */
body:not(.auth-screen) dialog,
body:not(.auth-screen) .notice-dialog { color: var(--text); background: #fffdf5; border-color: #d1b98e; }
body:not(.auth-screen) dialog::backdrop { background: #40302270; }
body:not(.auth-screen) .quiz-dialog::backdrop { background: #352e25cc; }
body:not(.auth-screen) .quiz-dialog { background: #fffdf8; }
body:not(.auth-screen) .quiz-dialog .batch-banner { background: #f4ead7; border-top: 3px solid #b88c47; }
body:not(.auth-screen) .quiz-tabs { background: #fffaf0; }
body:not(.auth-screen) .quiz-tabs button[aria-selected="true"] { color: #945032; border-bottom-color: #945032; }
body:not(.auth-screen) .quiz-dialog-body { background: #fffdf8; }
body:not(.auth-screen) .quiz-point-summary { background: #f7efdf; }
body:not(.auth-screen) .ready-next.pulse { background: #805337; border-color: #805337; box-shadow: 0 0 0 3px #ebd8b6; }
body:not(.auth-screen) .ready-next:disabled { background: #efebe2; border-color: #efebe2; color: var(--muted); }
body:not(.auth-screen) .answer-input-modes button[aria-pressed="true"] { background: #805337; border-color: #805337; color: #fffaf0; }
body:not(.auth-screen) .handwriting-pad { background: #f6eddd; border-color: #d5c09a; }
body:not(.auth-screen) .ink-paper,
body:not(.auth-screen) .homework-photo-dialog { background-color: #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: #fffaf0fa; border-radius: 0; }
  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 { padding: 22px 18px; min-height: 186px; }
  body:not(.auth-screen) .welcome-band > div { width: 90%; }
  body:not(.auth-screen) .welcome-band h2 { font-size: 21px; }
  body:not(.auth-screen) .welcome-band::after { background-position: center, 58% center; background-image: linear-gradient(90deg, #fff5e4f5, #fff5e4c9 62%, #fff5e445), var(--autumn-landscape); }
  body:not(.auth-screen) .welcome-band .seasonal-greeting { font-size: 10px; }
  body:not(.auth-screen) .point-totals { padding: 13px 12px; gap: 10px 18px; }
  body:not(.auth-screen) .view-pane > .table-panel > .panel-head,
  body:not(.auth-screen) .admin-page-head { 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: 188px; }
  body:not(.auth-screen) .admin-feature-card::before { width: 68px; height: 68px; right: 7px; top: 12px; }
  body:not(.auth-screen) .admin-feature-card .feature-icon { width: 32px; height: 32px; padding: 7px; margin-bottom: 38px; }
  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) .rank-batch-button { padding-inline: 4px; }
  body:not(.auth-screen) .quiz-dialog { border-color: transparent; }
}
@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: 56px; height: 56px; right: 6px; top: 15px; }
  body:not(.auth-screen) .admin-feature-card > span { font-size: 14px; }
  body:not(.auth-screen) .practice-panel { padding-inline: 10px; }
  body:not(.auth-screen) .point-totals { gap: 8px 14px; }
  body:not(.auth-screen) .point-totals > div { gap: 7px; }
}
