.fgl-theme-toggle {
  min-width: 5.5em;
}
.fgl-theme-toggle.is-overriding {
  text-decoration: underline;
  text-decoration-color: var(--accent-info);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.2em;
}
.fgl-theme-toggle[hidden] { display: none; }
.fgl-theme-menu { position: relative; display: inline-block; }
.fgl-theme-menu__trigger { list-style: none; }
.fgl-theme-menu__trigger::-webkit-details-marker { display: none; }
.fgl-theme-menu--text .fgl-theme-menu__trigger { min-width: 5.5em;  }
.fgl-theme-menu--emoji .fgl-theme-menu__trigger, .fgl-theme-menu--icons .fgl-theme-menu__trigger { min-width: 36px;  padding-inline: var(--space-2); }
.fgl-theme-menu__face { display: none; }
html:not([data-theme="dark"]):not([data-theme="light"]):not([data-theme="system"]):not([data-fgl-theme-default="dark"]):not([data-fgl-theme-default="light"]) .fgl-theme-menu__face[data-fgl-theme-face="system"],
html[data-theme="system"] .fgl-theme-menu__face[data-fgl-theme-face="system"],
html[data-theme="dark"] .fgl-theme-menu__face[data-fgl-theme-face="dark"],
html[data-fgl-theme-default="dark"]:not([data-theme="dark"]):not([data-theme="light"]):not([data-theme="system"]) .fgl-theme-menu__face[data-fgl-theme-face="dark"],
html[data-theme="light"] .fgl-theme-menu__face[data-fgl-theme-face="light"],
html[data-fgl-theme-default="light"]:not([data-theme="dark"]):not([data-theme="light"]):not([data-theme="system"]) .fgl-theme-menu__face[data-fgl-theme-face="light"] { display: inline-flex; }
.fgl-theme-menu__choices { position: absolute; inset-inline-end: 0; inset-block-start: calc(100% + var(--space-1)); z-index: 20;  margin: 0; padding: var(--space-2); min-width: max-content; background: var(--surface-elevated); border: 1px solid var(--border-subtle);  border-radius: var(--radius-md); box-shadow: var(--shadow-2); }
.fgl-theme-menu__choice { display: flex; align-items: center; gap: var(--space-2); min-height: 48px;  padding-inline: var(--space-3); border-radius: var(--radius-sm); color: var(--ink-body); cursor: pointer; }
.fgl-theme-menu__choice input { accent-color: var(--brand-primary); margin: 0; }
.fgl-theme-menu__choice:has(:checked) { background: var(--surface-primary); }
.fgl-theme-menu--text .fgl-theme-menu__trigger.is-overriding { text-decoration: underline; text-decoration-color: var(--accent-info); text-decoration-thickness: 2px;  text-underline-offset: 0.2em;  }
.fgl-theme-menu--flat { position: static; display: flex; flex-direction: column; margin: 0; padding: 0; border: 0; }
.fgl-theme-menu--flat .fgl-theme-menu__legend { padding: 0 var(--space-3); font-size: var(--fs-caption); color: var(--ink-muted); }
.fgl-theme-menu--corner { position: absolute; inset-block-start: var(--space-3); inset-inline-end: var(--space-3); z-index: 20;  }
.fgl-theme-menu--flip > .fgl-theme-menu__choices { inset-inline-end: auto; inset-inline-start: 0; }
.fgl-theme-menu[hidden] { display: none; }
