/* Native select keeps keyboard, touch and screen-reader interaction familiar. */
:root {
  --appearance-bg: #fffdfa;
  --appearance-fg: #334a3d;
  --appearance-line: #ddd6c8;
  --appearance-focus: #0f6b5f;
}
:root[data-theme="dark"] {
  --appearance-bg: #192a22;
  --appearance-fg: #dce8dd;
  --appearance-line: #3b5144;
  --appearance-focus: #a7c9a9;
}
.theme-control {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  color: var(--appearance-fg);
}
.theme-control svg {
  position: absolute;
  left: 11px;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}
.theme-control .theme-moon { display: none; }
[data-theme="dark"] .theme-control .theme-sun { display: none; }
[data-theme="dark"] .theme-control .theme-moon { display: block; }
.theme-control::after {
  content: "";
  position: absolute;
  right: 12px;
  width: 5px;
  height: 5px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  pointer-events: none;
}
.theme-control select {
  appearance: none;
  -webkit-appearance: none;
  width: 132px;
  min-height: 40px;
  margin: 0;
  padding: 8px 28px 8px 35px;
  border: 1px solid var(--appearance-line);
  border-radius: 10px;
  background: var(--appearance-bg);
  color: inherit;
  font: 13px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", sans-serif;
  cursor: pointer;
}
.theme-control select:hover { border-color: var(--appearance-focus); }
.theme-control select:focus-visible { outline: 2px solid var(--appearance-focus); outline-offset: 3px; }
@media (pointer: coarse) { .theme-control select { min-height: 44px; font-size: 16px; width: 146px; } }
