.theme-fields {
  min-inline-size: 0;
  margin: 12px 0;
  padding: 0;
  border: 0;
}
.theme-fields legend { padding: 0; margin-bottom: 8px; font-weight: 650; color: var(--ink); }
.theme-choices, .theme-hours {
  display: grid;
  gap: 6px;
  width: 100%;
  max-width: 34rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.theme-fields .theme-choice { position: relative; display: block; margin: 0; cursor: pointer; }
.theme-choice input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.theme-choice > span {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 46px;
  padding: 6px 4px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  font-size: .88rem;
  font-weight: 600;
  text-align: center;
  line-height: 1.22;
}
.theme-choice svg { flex-shrink: 0; width: 19px; height: 19px; }
.theme-choice input:checked + span {
  border-color: var(--accent-strong);
  box-shadow: inset 0 0 0 1px var(--accent-strong);
  color: var(--accent-strong);
  background: var(--soft);
}
.theme-choice input:focus-visible + span {
  outline: 3px solid var(--accent-strong);
  outline-offset: 2px;
}
.theme-fields [data-theme-times][hidden] { display: none; }
.theme-fields .theme-hours {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.theme-hours > label { min-width: 0; margin: 0; }
.theme-hours input { width: 100%; min-width: 0; min-height: 44px; }
.theme-schedule-note { display: flex; flex-wrap: wrap; gap: 2px 12px; margin-top: 7px; font-size: .8rem; line-height: 1.45; color: var(--muted); }
.theme-schedule-note [role=status] { font-weight: 650; color: var(--ink); }
.theme-schedule-note .theme-error { color: var(--danger, var(--ink)); }
@media (max-width: 400px) {
  .theme-choice > span { flex-direction: column; gap: 3px; }
}
@media (max-width: 360px) {
  .theme-fields .theme-hours { grid-template-columns: 1fr; gap: 6px; }
  .theme-fields .theme-hours > label {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(135px, 1.4fr);
    align-items: center;
    gap: 6px;
    margin: 0;
  }
}
@media (forced-colors: active) {
  .theme-choice input:checked + span { outline: 2px solid Highlight; outline-offset: -3px; }
}
