.teacher-theme-switch {
  --theme-track: #262a32;
  --theme-track-border: #505663;
  --theme-highlight: #49464c;
  --theme-divider: #a68d58;
  --theme-icons: #bdc4cf;
  --theme-selected-icon: #ffe186;
  --theme-highlight-shape: polygon(59% 0, 100% 0, 100% 100%, 41% 100%);
  position: absolute; z-index: 1203; top: calc(10px + env(safe-area-inset-top, 0px)); left: 50%;
  transform: translateX(-50%); display: flex; align-items: center; isolation: isolate;
  width: 86px; height: 38px; border: 1px solid var(--theme-track-border); border-radius: 999px;
  background: var(--theme-track); overflow: hidden; color: var(--theme-icons);
  view-transition-name: teacher-theme-switch;
  transition: background-color 300ms ease, border-color 300ms ease, color 220ms ease;
}
.teacher-theme-switch::before {
  content: ""; position: absolute; inset: 0; z-index: -1; background: var(--theme-highlight);
  clip-path: var(--theme-highlight-shape); pointer-events: none;
  transition: clip-path 320ms cubic-bezier(.23,.72,.25,1), background-color 280ms ease;
}
.theme-switch-divider { position: absolute; top: -1px; bottom: -1px; left: 50%; width: 1px; background: var(--theme-divider); transform: skewX(-23deg); pointer-events: none; transition: background-color 280ms ease; }
.teacher-theme-switch button { display: grid; flex: 1; height: 100%; place-items: center; padding: 0; border: 0; background: transparent; color: inherit; touch-action: manipulation; transition: color 220ms ease; }
.teacher-theme-switch button[aria-pressed="true"] { color: var(--theme-selected-icon); }
.teacher-theme-switch svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; transition: transform 160ms cubic-bezier(.22,.7,.28,1); }
.teacher-theme-switch button:is(:active,[data-pressing]) svg { transform: translateY(2px) scale(.83); }
.teacher-theme-switch button:focus-visible { outline: 2px solid currentColor; outline-offset: -4px; border-radius: 13px; }
::view-transition { pointer-events: none; }
::view-transition-group(root), ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
::view-transition-image-pair(root) { isolation: auto; }
::view-transition-old(root), ::view-transition-new(root) { mix-blend-mode: normal; }
::view-transition-new(root) { z-index: 1; }
/* Keep the live capsule above the page reveal so its own transitions remain visible. */
::view-transition-group(teacher-theme-switch) { z-index: 2; animation: none; }
::view-transition-old(teacher-theme-switch) { display: none; }
::view-transition-new(teacher-theme-switch) { animation: none; mix-blend-mode: normal; }

html[data-teacher-theme="day"] {
  color-scheme: light; --bg: #fff; --ink: #111318; --muted: #414955; --line: #e2e6ed;
  --card: #fff; --surface: #f5f6f8; --blue: #eabb20; --blue-2: #bb8408; --teal: #795300;
}
.teacher-theme-switch[data-active-theme="day"],
[data-teacher-theme="day"] .teacher-theme-switch:not([data-active-theme]) {
  --theme-track: #f5f6f8;
  --theme-track-border: #d9dce2;
  --theme-highlight: #ffe7a0;
  --theme-divider: #b58b38;
  --theme-icons: #4a5261;
  --theme-selected-icon: #29230f;
  --theme-highlight-shape: polygon(0 0, 59% 0, 41% 100%, 0 100%);
}
[data-teacher-theme="day"] :is(body,.app-shell,.page,.teach-header,.teach-topbar,.map-header,.profile-heading,.bottom-nav,.desktop-brand) { background: var(--bg); color: var(--ink); border-color: var(--line); }
[data-teacher-theme="day"] :is(.order-panel,.home-hero,.home-common,.home-recommendations,.home-order-row,.order-card,.result-card,.favorite-row,.teach-intro,.teach-guidance,.composer,.teacher-identity,.teacher-completion,.teacher-rows,.update-row,.message.ai p,.detail-sheet,.auth-sheet-card,.product-dialog > div) { background: var(--card); color: var(--ink); border-color: var(--line); }
[data-teacher-theme="day"] :is(.filter-entry-grid > button,.online-filter-shortcut:not([aria-pressed="true"]),.composer input,.avatar-small.user-avatar,.home-input,.detail-box,.detail-section,.location-search,.location-picker-card,.filter-options button) { background: var(--surface); color: var(--ink); border-color: var(--line); }
[data-teacher-theme="day"] .home-hero::before { opacity: .13; }
[data-teacher-theme="day"] .home-search { background: #fff9e8; border-color: #edd17f; box-shadow: none; }
[data-teacher-theme="day"] :is(.home-input input::placeholder,.home-hero > p,.filter-entry-grid > button small,.filter-entry-grid > button svg,.nav-item,.pending-tag,.card-location svg,.card-meta svg,.detail-publisher,.detail-sheet .commute-addresses small) { color: var(--muted); }
[data-teacher-theme="day"] :is(.nav-item.active,.teacher-parent-link:hover,.teach-more,.teach-followup,.location-distance,.teach-tabs button[aria-pressed="true"],.teacher-account button) { color: #76520b; }
[data-teacher-theme="day"] .nav-item:is(:hover,.active) { background: #fff3c6; border-color: #efdb9a; }
[data-teacher-theme="day"] :is(.tag,.home-order-tags span,.teach-tabs) { background: #f1f3f6; color: var(--ink); border-color: var(--line); }
[data-teacher-theme="day"] :is(.update-row > svg:first-child,.profile-avatar,.card-recommendation b,.card-recommendation.muted b) { background: #fff2c7; color: #76520b; border-color: #e9d69c; }
[data-teacher-theme="day"] :is(.card-recommendation,.teacher-parent-link,.detail-sheet .commute-addresses strong,.detail-sheet .detail-favorite) { color: var(--ink); }
[data-teacher-theme="day"] :is(.detail-sheet .detail-favorite[aria-pressed="true"],.home-order-star[aria-pressed="true"]) { color: #8a5800; }
[data-teacher-theme="day"] .app-shell [data-teacher-gender] { --order-font: #111318; }
[data-teacher-theme="day"] :is(.order-card,.home-order-row,.favorite-row,.result-card).self-operated-order { --self-operated-gold: #76520b; color: var(--self-operated-gold); border-color: #ac801e; }
[data-teacher-theme="day"] .app-shell .self-operated-order[data-teacher-gender],
[data-teacher-theme="day"] .app-shell .self-operated-order [data-teacher-gender] { --order-font: var(--self-operated-gold); }
[data-teacher-theme="day"] .self-operated-badge { color: #76520b; }
[data-teacher-theme="day"] .detail-sheet .order-wechat { background: #eff8f2; border-color: #c9dfd0; }
[data-teacher-theme="day"] :is(.order-wechat-heading small,.order-wechat #orderWechatPanel p) { color: #365644; }
[data-teacher-theme="day"] .order-wechat .order-wechat-button { background: #dff1e6; color: #1f5136; border-color: #a5cbb2; }
[data-teacher-theme="day"] .order-wechat-icon { background: #d8ede0; color: #214d35; }
[data-teacher-theme="day"] .teacher-menu button { border-color: var(--line); }
[data-teacher-theme="day"] .toast { background: #f2f4f8; color: var(--ink); border: 1px solid var(--line); }

@media (min-width: 900px) { .teacher-theme-switch { top: 17px; } }
@media (max-width: 560px) {
  .app-shell > .global-share-button { width: 36px; padding: 0; justify-content: center; }
  .app-shell > .global-share-button span { display: none; }
  .app-shell:has(.home-page.active) > .global-share-button { right: max(84px,calc(env(safe-area-inset-right, 0px) + 73px)); width: 32px; }
  .app-shell .teach-topbar { padding-right: 58px; }
  .teach-topbar .clear-button { min-width: 34px; padding-inline: 6px; font-size: 0; }
  .teach-topbar .clear-button::after { content: "↺"; font-size: 17px; }
}
@media (prefers-reduced-motion: reduce) {
  .teacher-theme-switch, .teacher-theme-switch::before,
  .teacher-theme-switch :is(button,svg,.theme-switch-divider) { transition: none; }
}
