.theme-picker {
  position: fixed;
  right: max(1rem, env(safe-area-inset-right));
  bottom: max(1rem, env(safe-area-inset-bottom));
  z-index: 30;
  max-width: calc(100vw - 2rem);
  border: 1px solid #c892a8;
  border-radius: 1.2rem;
  background: #fff8f5;
  color: #673b54;
  box-shadow: 0 5px 25px #44223918;
  font:
    400 0.8rem/1.5 system-ui,
    sans-serif;
}
.theme-picker summary {
  cursor: pointer;
  padding: 0.7rem 1rem;
}
.theme-picker summary::marker {
  color: #a35579;
}
.theme-picker__panel {
  padding: 0 1rem 0.8rem;
  width: 18rem;
  max-width: calc(100vw - 4rem);
}
.theme-picker label {
  display: block;
  margin-bottom: 0.45rem;
}
.theme-picker select {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 0.45rem;
  border: 1px solid #b9809b;
  border-radius: 0.5rem;
  background: #fffdfb;
  color: #673b54;
  font: inherit;
}
.theme-picker p {
  margin: 0.55rem 0 0;
  font: inherit;
  color: inherit;
}
.theme-picker :focus-visible {
  outline: 3px solid #a34b7a;
  outline-offset: 3px;
}
html[data-theme="celestial"] .theme-picker {
  background: #291e39;
  color: #f6ddeb;
  border-color: #80668f;
}
html[data-theme="celestial"] .theme-picker select {
  background: #20172e;
  color: #f6ddeb;
  border-color: #927ca7;
}
html[data-theme="celestial"] .theme-picker summary::marker {
  color: #dcc0f0;
}
html[data-theme="celestial"] .theme-picker :focus-visible {
  outline-color: #eab6d3;
}
html[data-theme="sketchbook"] .theme-picker {
  background: #fff5fa;
  border-style: dashed;
  border-radius: 0.45rem 1.2rem 0.7rem 1.3rem;
}
@media (max-width: 480px) {
  .theme-picker {
    right: 0.65rem;
    bottom: max(0.65rem, env(safe-area-inset-bottom));
  }
  .theme-picker summary {
    padding: 0.6rem 0.8rem;
  }
}
@media print {
  .theme-picker {
    display: none;
  }
}
