:root {
  color-scheme: dark;
  font-family: system-ui, sans-serif;
  background: #111;
  color: #f5f5f5;
  font-variant-numeric: tabular-nums;
}
* { box-sizing: border-box; }
body { margin: 0; }
main { width: min(100% - 40px, 900px); margin: 64px auto; }
.page-header { display: flex; align-items: center; gap: 18px; margin-bottom: 32px; }
.mark {
  display: grid;
  grid-template-columns: repeat(2, 8px);
  gap: 4px;
  flex: none;
  padding: 13px;
  border: 1px solid #444;
  border-radius: 12px;
}
.mark i { height: 8px; border-radius: 2px; background: #555; }
.mark i:first-child, .mark i:last-child { background: #eee; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(1.75rem, 6vw, 2.5rem); line-height: 1.1; letter-spacing: -.045em; }
h2 { font-size: 1.125rem; }
p { color: #b0b0b0; }
.page-header p { margin-top: 8px; }
.layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 16px; align-items: start; }
.panel { padding: 24px; background: #191919; border: 1px solid #333; border-radius: 16px; }
form { display: grid; gap: 8px; margin-top: 22px; }
label { font-size: .875rem; }
label:not(:first-child) { margin-top: 10px; }
input, button { font: inherit; color: inherit; }
input {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 9px 11px;
  border: 1px solid #555;
  border-radius: 8px;
  background: #141414;
}
small, #storage-error { color: #b0b0b0; font-size: .8125rem; }
#storage-error { margin-top: 12px; }
button { cursor: pointer; }
.apply { min-height: 44px; margin-top: 8px; border: 0; border-radius: 8px; background: #eee; color: #111; font-weight: 650; }
.apply:hover { background: #ccc; }
:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.calendar-header { display: flex; justify-content: space-between; align-items: start; gap: 12px; }
#range { margin-top: 5px; font-size: .875rem; }
.progress-label { color: #eee; white-space: nowrap; font-size: .875rem; }
progress { display: block; width: 100%; height: 4px; margin: 18px 0 22px; border: 0; border-radius: 4px; overflow: hidden; appearance: none; background: #373737; }
progress::-webkit-progress-bar { background: #373737; }
progress::-webkit-progress-value { background: #eee; }
progress::-moz-progress-bar { background: #eee; }
.week { display: grid; grid-template-columns: 54px repeat(7, minmax(0, 1fr)); align-items: center; gap: 6px; }
.weekdays { margin-bottom: 8px; text-align: center; }
.weekdays span:first-child { text-align: left; }
.weekdays, .week-date { color: #b8b8b8; font-size: .8125rem; }
#calendar { display: grid; gap: 6px; }
.day { display: grid; place-items: center; min-width: 0; aspect-ratio: 1; padding: 0; border: 1px solid #4b4b4b; border-radius: 7px; background: #262626; color: #d0d0d0; font-size: .875rem; }
.day:hover { border-color: #aaa; }
.day[aria-pressed="true"] { background: #f2f2f2; border-color: #f2f2f2; color: #111; font-weight: 700; }
.day[aria-current="date"] { box-shadow: inset 0 0 0 1px #aaa; border-color: #aaa; }
.day[aria-current="date"][aria-pressed="true"] { box-shadow: inset 0 0 0 1px #222; }
.legend { display: flex; flex-wrap: wrap; gap: 9px 15px; margin-top: 18px; color: #b8b8b8; font-size: .8125rem; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 11px; height: 11px; border: 1px solid #555; border-radius: 3px; background: #262626; }
.legend span:nth-child(2) i { background: #eee; border-color: #eee; }
.legend span:nth-child(3) i { border-color: #aaa; }
@media (max-width: 660px) {
  main { width: min(100% - 24px, 460px); margin: 26px auto; }
  .layout { grid-template-columns: minmax(0, 1fr); }
  .panel { padding: 16px; }
  .page-header { margin-bottom: 20px; }
  .week { grid-template-columns: 42px repeat(7, minmax(0, 1fr)); gap: 4px; }
  #calendar { gap: 4px; }
}
