:root {
  color-scheme: light;
  font-family: system-ui, -apple-system, "Hiragino Sans", "Yu Gothic", sans-serif;
  color: #17211b;
  background: #f4f7f5;
}

* { box-sizing: border-box; }
body { margin: 0; }
main { width: min(100% - 24px, 760px); margin: 0 auto; padding: 28px 0 48px; }
header { margin-bottom: 22px; }
.eyebrow { margin: 0; color: #087443; font-size: .75rem; font-weight: 800; letter-spacing: .16em; }
h1 { margin: 4px 0 0; font-size: clamp(1.7rem, 8vw, 2.4rem); }

.storage-card {
  margin-bottom: 16px;
  padding: 16px;
  border: 1px solid #d9e3dc;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 5px 20px rgb(25 68 44 / 6%);
}
.storage-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.storage-heading h2 { margin: 0; font-size: 1.05rem; }
.secondary-button { min-height: 38px; padding: 0 12px; background: #e8f3ec; color: #087443; }
.storage-status { margin: 12px 0 0; color: #526158; }
.storage-status:empty { display: none; }
.storage-status.error { color: #b42318; }
.storage-details dl { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 16px 0 12px; }
.storage-details dl div { min-width: 0; }
.storage-details dt { color: #6c786f; font-size: .75rem; font-weight: 700; }
.storage-details dd { margin: 3px 0 0; overflow-wrap: anywhere; font-size: .95rem; font-weight: 800; }
.storage-details progress { display: block; width: 100%; height: 12px; accent-color: #087443; }

.filters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 16px;
  border: 1px solid #d9e3dc;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 5px 20px rgb(25 68 44 / 6%);
}
label { color: #526158; font-size: .8rem; font-weight: 700; }
select, input {
  display: block;
  width: 100%;
  min-height: 44px;
  margin-top: 5px;
  padding: 0 10px;
  border: 1px solid #b9c8be;
  border-radius: 9px;
  background: #fff;
  color: #17211b;
  font: inherit;
  font-size: 1rem;
}
select:focus, input:focus, button:focus-visible { outline: 3px solid #8ed5af; outline-offset: 1px; }
.status { min-height: 24px; margin: 18px 2px 10px; color: #526158; }
.status.error { color: #b42318; }
.date-kind { margin: 10px 2px -8px; color: #526158; font-size: .85rem; font-weight: 800; }
.date-kind.past { color: #9a5b00; }
.programs { display: grid; gap: 10px; }
.program {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px;
  border: 1px solid #d9e3dc;
  border-radius: 12px;
  background: #fff;
}
.program.past-program { border-color: #e5c384; background: #fffaf0; }
.program.weekly-program { border-left: 5px solid #7251b5; }
.program-body { min-width: 0; flex: 1; }
time { color: #087443; font-size: .84rem; font-weight: 800; }
h2 { margin: 4px 0; overflow-wrap: anywhere; font-size: 1rem; line-height: 1.45; }
.station-name { margin: 0; color: #6c786f; font-size: .78rem; }
.program-description { margin-top: 9px; color: #34473b; font-size: .84rem; }
.program-content {
  display: -webkit-box;
  overflow: hidden;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  line-height: 1.65;
  white-space: pre-wrap;
}
.program-content.expanded { display: block; overflow: visible; -webkit-line-clamp: unset; line-clamp: unset; }
.description-toggle {
  min-height: 36px;
  margin-top: 2px;
  padding: 0;
  background: transparent;
  color: #087443;
  font-size: .8rem;
}
button {
  min-height: 44px;
  flex: 0 0 auto;
  padding: 0 14px;
  border: 0;
  border-radius: 9px;
  background: #087443;
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}
button:disabled { background: #8a9890; cursor: default; }
.program-actions { display: grid; gap: 6px; justify-items: stretch; }
.weekly-button { background: #7251b5; }
.weekly-state { color: #5d3c9c; font-size: .72rem; font-weight: 800; text-align: center; }

@media (max-width: 520px) {
  main { width: min(100% - 20px, 760px); padding-top: 20px; }
  .filters { grid-template-columns: 1fr; padding: 14px; }
  .storage-details dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .program { align-items: stretch; flex-direction: column; }
  .program button, .program-actions { width: 100%; }
  .program .description-toggle { width: fit-content; }
}
