/* Theme control: Auto / Light / Dark segmented radio group (src/components/ThemeControl.tsx).
   Shared by the player menu and the public document menu, so it lives with the brand
   stylesheet and carries BOTH themes (the generated light clones only cover
   src/index.css, identity.css and navigation.css). Sized for the ~330px menu
   panel: three 44px-high segments; on a narrower container the icon stacks over
   the label instead of truncating it. */
.pd-theme-control { display: grid; gap: 8px; min-width: 0; margin: 12px 8px 4px; padding: 12px 0 0; border-top: 1px solid #ffffff14; container-type: inline-size; box-sizing: border-box; }
.pd-theme-control-label { margin: 0; padding: 0 4px; color: #beb1c2; font: 500 11px/1.4 system-ui, sans-serif; letter-spacing: 0; }
.pd-theme-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; min-width: 0; padding: 4px; border: 1px solid #ffffff1f; border-radius: 14px; background: #ffffff0a; box-sizing: border-box; }
.pd-theme-option { display: flex; align-items: center; justify-content: center; gap: 6px; min-width: 0; min-height: 44px; margin: 0; padding: 0 6px; border: 1px solid transparent; border-radius: 10px; background: none; color: #d4c9d9; font: 500 12px/1.2 system-ui, sans-serif; letter-spacing: 0; text-align: center; text-decoration: none; cursor: pointer; touch-action: manipulation; box-sizing: border-box; transition: background-color 0.15s ease-out, color 0.15s ease-out, border-color 0.15s ease-out; }
.pd-theme-option > svg { flex: 0 0 auto; width: 16px; height: 16px; }
.pd-theme-option > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pd-theme-option:hover { background: #ffffff10; color: #f8f0dc; }
.pd-theme-option[aria-checked="true"] { background: #d8bd8524; border-color: #d8bd8566; color: #f6e2b8; }
.pd-theme-option:focus-visible { outline: 2px solid #d8bd85; outline-offset: 2px; }
@container (max-width: 300px) {
  .pd-theme-option { flex-direction: column; gap: 2px; min-height: 52px; padding: 4px 2px; font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) { .pd-theme-option { transition: none; } }
@media (forced-colors: active) {
  .pd-theme-options, .pd-theme-option { border-color: CanvasText; }
  .pd-theme-option[aria-checked="true"] { background: Highlight; color: HighlightText; }
}

/* Light: the same roles on paper. The selected segment is a raised white chip. */
html[data-theme="light"] .pd-theme-control { border-top-color: rgba(29, 22, 38, 0.09); }
html[data-theme="light"] .pd-theme-control-label { color: #5d5568; }
html[data-theme="light"] .pd-theme-options { background: rgba(29, 22, 38, 0.045); border-color: rgba(29, 22, 38, 0.12); }
html[data-theme="light"] .pd-theme-option { color: #3b3346; }
html[data-theme="light"] .pd-theme-option:hover { background: rgba(29, 22, 38, 0.07); color: #1d1626; }
html[data-theme="light"] .pd-theme-option[aria-checked="true"] { background: #ffffff; border-color: rgba(138, 90, 11, 0.5); color: #6a4206; box-shadow: 0 1px 2px rgba(29, 22, 38, 0.14); }
html[data-theme="light"] .pd-theme-option:focus-visible { outline-color: #9a5f0a; }
@media (forced-colors: active) {
  html[data-theme="light"] .pd-theme-option[aria-checked="true"] { background: Highlight; color: HighlightText; box-shadow: none; }
}
