:root { color-scheme: light; }
:root.dark { color-scheme: dark; }
rost-theme-toggle { display: inline-flex; flex: none; align-items: center; }
.theme-switch { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 1px solid currentColor; border-color: color-mix(in srgb, currentColor 24%, transparent); border-radius: 9px; background: transparent; color: inherit; cursor: pointer; }
.theme-switch:hover { background: color-mix(in srgb, currentColor 10%, transparent); }
.theme-switch:focus-visible { outline: 2px solid #56b87e; outline-offset: 3px; }
.theme-switch svg { width: 19px; height: 19px; }
.theme-sun, .dark .theme-moon { display: none; }
.dark .theme-sun { display: block; }
.entry-top { display: flex; align-items: center; justify-content: space-between; margin: 0 0 18px; }
.entry-top .entry-brand { margin: 0; }
.rost-account .theme-switch { color: #eef5ef; }
.meet-brand rost-theme-toggle { margin-inline-start: 8px; }
.theme-reveal::view-transition-old(root), .theme-reveal::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
.theme-reveal::view-transition-new(root) { animation: reveal-theme 400ms ease-out both; }
@keyframes reveal-theme {
  from { clip-path: circle(0 at var(--reveal-origin)); }
  to { clip-path: circle(var(--reveal-radius) at var(--reveal-origin)); }
}

html[data-theme=light] :is(.account-entry, #modal.entry-dialog) {
  color-scheme: light;
  --card: white; --foreground: #18281f; --card-foreground: var(--foreground);
  --input: #c8d3ca; --border: #d6dfd7; --primary: #175f36; --primary-foreground: white;
  --popover: white; --popover-foreground: var(--foreground); --accent: #e6f0e7; --accent-foreground: var(--foreground);
  --muted-foreground: #506457;
}
html[data-theme=light] .account-entry { background: #f3f6f2; }
html[data-theme=light] .entry-brand, html[data-theme=light] .entry-brand span, html[data-theme=light] .entry-card .card-action { color: #195b36; }
html[data-theme=light] :is(.entry-field .input, .entry-dialog .field .input, .entry-field .rost-picker > button) { background: #fff; }
html[data-theme=light] :is(.entry-card > footer, #modal.entry-dialog .modal-footer) { background: #f6f8f5; }
html[data-theme=light] .entry-submit:hover { background: #124d2d; }

html.dark {
  --canvas: #111713; --surface: #1a221d; --raised: #222e26; --ink: #e7efe9;
  --dark: var(--ink); --muted: #acbcb0; --line: #38473c; --green: #9cdda9; --mint: #223c2b;
  --green-light: #264330; --green-dark: #a6e3b3; --malachite-dark: #20514a;
  --primary: #a6e3b3; --primary-foreground: #10291a; --card: var(--surface);
  --background: var(--canvas); --foreground: var(--ink); --card-foreground: var(--ink);
  --popover: var(--raised); --popover-foreground: var(--ink); --accent: #304137;
  --accent-foreground: var(--ink); --border: var(--line); --input: #46564a;
  --color-card: var(--surface); --color-card-foreground: var(--ink); --color-background: var(--canvas);
  --color-muted: var(--raised); --color-muted-foreground: var(--muted);
}
.dark .rost-shell { color: var(--ink); background: var(--canvas); }
.dark .rost-mast { background: var(--surface); }
.dark .rost-navline button, .dark .rost-context, .dark .rost-more > button { color: var(--muted); }
.dark .rost-navline [aria-current=page], .dark .rost-shell .metric strong { color: var(--green); }
.dark .rost-shell :is(.panel,.card,.metric,.metrics,.toolbar,.event-grid,.event-card,.trip-grid,.catalog-filter-fields,.table-wrap,.profile-links a,.comm-workspace,.event-chat,.chat-bubble,.chat-composer,.chat-aside,.notification-list,.notification-item,.organizer-card,.cal-day,.pg-grid button), .dark #modal.dialog:not(.entry-dialog), .dark #modal.dialog:not(.entry-dialog) > form, .dark dialog.pg-picker, .dark #toaster .toast-content {
  background-color: var(--surface); color: var(--ink); border-color: var(--line);
}
.dark .rost-shell :is(th,.event-card-top,.comm-inbox,.chat-aside-head,.chat-timeline,.cal-toolbar,.pg-month,.pg-modes,.pg-picker button,.fc-list-day-cushion,.notification-item.is-unread,.video-entry,.resource-file-icon), .dark #modal:not(.entry-dialog) :is(.modal-head,.modal-footer), .dark .rost-shell .table-wrap tr:hover td { background: var(--raised); color: var(--ink); }
.dark .rost-shell :is(input:not([type=checkbox]),select,textarea,.rost-picker > button,[data-popover]), .dark #modal:not(.entry-dialog) :is(input:not([type=range],[type=checkbox]),textarea,.rost-picker > button,[data-popover]) { background-color: var(--raised); color: var(--ink); border-color: var(--line); }
.dark .rost-shell :is(.event-sections [role=tab],.pg-list .fc-list-event-title p,.event-card-top time,.event-meta,.rost-context,.chat-subtitle,.programme-time) { color: var(--muted); }
.dark .rost-shell :is(.event-sections [aria-selected=true],.comm-list-item.is-selected,.is-own .chat-bubble,.badge,.btn[data-variant=ghost]:hover,.btn[data-variant=outline]:hover) { background: var(--mint); color: var(--green); }
.dark .rost-shell .btn[data-variant=primary], .dark #modal .btn.primary, .dark .pg-modes [aria-pressed=true] { background: var(--primary); color: var(--primary-foreground); }

.dark .room-page-body :is(.meet-prejoin,.meet-missing,.meet-prejoin-header,.meet-missing-card,.meet-identity,.meet-device-field select) { color: var(--ink); background: var(--surface); border-color: var(--line); }
.dark .room-page-body :is(.meet-prejoin-details h1,.meet-brand,.meet-text-button,.meet-eyebrow,.meet-prejoin-description,.meet-prejoin-footnote) { color: var(--ink); }
html[data-theme=light] .room-page-body :is(.meet-conference,.meet-room-header,.meet-footer,.meet-panel,.meet-control-dock) { background: #f2f6f2; color: #1a3024; border-color: #c9d7cd; }
html[data-theme=light] .meet-conference :is(.meet-brand,.meet-brand-sub,.meet-room-heading h1,.meet-panel h2,.meet-person,.meet-room-quality,.meet-session-info,.meet-icon-button,.meet-control,.meet-device-chevron,.meet-view-switch button) { color: #244434; }
html[data-theme=light] .meet-conference :is(.meet-control,.meet-icon-button,.meet-device-chevron,.meet-view-switch button) { background: #e0e9e1; }
html[data-theme=light] .meet-conference .meet-control.is-danger { color: #911d37; background: #ffe1e6; }
.dark .rost-shell :is(.table-foot,.cal-view,.cal-month td,.cal-empty-mark,.profile-preview-card,.notification-filters,.notification-empty,.pg-rail,.pg-date,.organizer-portrait,.resource-empty-icon,.event-chat-header,.chat-stage,.chat-compose-row,.chat-aside-tabs,.chat-mute) {
  background-color: var(--surface); border-color: var(--line); color: var(--ink);
}
.dark .rost-shell :is(.profile-private-label,.cal-view-button.is-active,.cal-selected .cal-day,.chat-room-mark,.chat-aside-tabs button.active) { background: var(--mint); color: var(--green); }
.dark .rost-shell :is(.chat-send:disabled,.chat-empty > span,.cal-outside .cal-day) { background: var(--raised); color: var(--muted); }
.dark .rost-shell :is(.cal-day-number,.chat-empty h3,.chat-empty p,.chat-mute,.profile-preview-card strong,.cal-view-button) { color: var(--ink); }
.dark .rost-shell .pg-grid button[aria-pressed=true] { background: var(--primary); color: var(--primary-foreground); }
