:root {
  color-scheme: light;
  font-family: system-ui, sans-serif;
  color: #172a26;
  background: #eef3f0;
  --muted: #526661;
  --line: #dce6e0;
  --green: #125642;
  --day-free: #bde7cd;
  --day-flex: #ffdf87;
  --day-fixed: #f4a8aa;
}
* { box-sizing: border-box; }
body { margin: 0; }
header, main { width: min(100% - 2rem, 58rem); margin: auto; }
header, .brand, .section-head, .week-controls { display: flex; align-items: center; gap: .65rem; }
header, .section-head { justify-content: space-between; }
header { padding: 1.2rem 0; }
.brand { gap: .75rem; }
.mark { display: grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: .8rem; background: var(--green); color: white; font-weight: 800; }
small { display: block; color: var(--muted); margin-top: .15rem; }
.hero, .panel { border-radius: 1.25rem; padding: clamp(1rem, 4vw, 2rem); margin-bottom: 1rem; }
.hero { background: #103f34; color: white; display: flex; align-items: end; justify-content: space-between; gap: 1rem; }
.hero p { color: #deeee6; }
.hero[data-status="free"] { background: #dcf4e7; color: #153e30; }
.hero[data-status="free"] p { color: #355d4e; }
.hero[data-status="free"] .pill { background: #c6e9d6; color: #164d37; }
.hero .primary { background: #d7f3e4; color: #103f34; }
.hero[data-status="free"] .primary { background: var(--green); color: white; }
.panel { background: white; border: 1px solid var(--line); }
h1, h2, p { margin: 0; }
h1 { margin: .7rem 0 .35rem; font-size: clamp(2rem, 6vw, 3.15rem); letter-spacing: -.055em; line-height: 1.05; }
h2 { font-size: 1.25rem; letter-spacing: -.02em; }
p { color: var(--muted); line-height: 1.5; }
.pill { display: inline-block; background: #ffffff20; padding: .32rem .65rem; border-radius: 2rem; font-size: .9rem; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; min-height: 2.75rem; padding: .5rem .8rem; border: 1px solid transparent; border-radius: .7rem; font-weight: 650; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid #3478ce; outline-offset: 2px; }
.primary { background: var(--green); color: white; }
.quiet { background: #edf4f0; color: #174d3d; }
.days, .slots { display: grid; gap: .45rem; margin-top: 1rem; }
.days { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.days button { min-width: 0; padding: .45rem .15rem; background: #f3f6f4; color: inherit; }
.days button[aria-pressed="true"] {
  border-color: #173e33;
  box-shadow: inset 0 0 0 1px #173e33;
}
.days strong { display: block; margin-top: .2rem; }
.days button { display: grid; justify-items: center; align-content: start; min-height: 4.6rem; }
.today-label { color: white; background: #214d40; border-radius: 1rem; padding: .08rem .28rem; font-size: .75rem; margin-top: .2rem; }
fieldset { margin: 0; padding: .5rem .75rem .65rem; border: 1px solid #9db4a9; border-radius: .5rem; }
legend { padding-inline: .25rem; font-weight: 600; }
fieldset label { display: flex; align-items: center; gap: .5rem; min-height: 2.25rem; }
fieldset input { width: 1rem; height: 1rem; accent-color: var(--green); }
.slots { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.slots button { text-align: left; }
.slots span, .slots strong { display: block; }
.slots span { margin-top: .2rem; font-size: .875rem; font-weight: 500; }
.free { background: #dcf4e7; color: #164d37; }
.flex { background: #fff0c5; color: #604600; }
.fixed { background: #f9e0df; color: #781f27; }
.legend { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .9rem; }
.legend span { border-radius: 1rem; padding: .25rem .6rem; font-size: .875rem; }
.booking { display: flex; align-items: center; justify-content: space-between; gap: .65rem; padding: .8rem 0; border-top: 1px solid var(--line); }
#bookings, #flexible-bookings { margin-top: .9rem; }
.booking-dot { width: .6rem; height: .6rem; flex: 0 0 .6rem; border-radius: 50%; }
.booking-dot.fixed { background: #b44048; }
.booking-dot.flex { background: #a77700; }
.booking > div:first-of-type { flex: 1; }
#booking-kind label { margin-block: .25rem; border-radius: .5rem; padding-inline: .5rem; }
#booking-kind label:has(input:checked) { outline: 1px solid currentColor; }
#booking-kind .fixed input { accent-color: #a2313c; }
#booking-kind .flex input { accent-color: #805a00; }
.profile-summary { background: #edf4f0; border-radius: .7rem; padding: .75rem; }
.profile-summary label { margin-top: .55rem; }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: .45rem; }
a { color: var(--green); font-weight: 650; }
footer, #notice { padding: .25rem 0 1rem; color: var(--muted); }
#notice:empty { display: none; }
dialog { width: min(100% - 1.5rem, 32rem); border: 1px solid var(--line); border-radius: 1.2rem; padding: 1.25rem; color: inherit; }
dialog::backdrop { background: #102c25a0; }
form { display: grid; gap: .85rem; }
label { display: grid; gap: .3rem; font-weight: 600; min-width: 0; }
input, select, textarea { min-width: 0; width: 100%; padding: .6rem; border: 1px solid #9db4a9; border-radius: .5rem; background: white; color: inherit; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
[hidden] { display: none !important; }
.error { color: #872b32; }
.error:empty { display: none; }
@media (max-width: 35rem) {
  .hero { flex-direction: column; align-items: stretch; }
  .slots { grid-template-columns: 1fr 1fr; }
  .slots button:first-child { grid-column: 1 / -1; }
  .booking { flex-wrap: wrap; }
  .week-controls { gap: .25rem; }
  .week-controls button { padding-inline: .45rem; }
}

.legend .free { background: var(--day-free); }
.legend .flex { background: var(--day-flex); }
.legend .fixed { background: var(--day-fixed); }

@media (max-width: 23rem) { .today-label { font-size: .67rem; padding-inline: .15rem; } }

#whole-day-fields { display: grid; gap: .45rem; }

.own-day-bookings { margin-top: 1rem; padding: .75rem; border: 1px solid var(--line); border-radius: .8rem; }
.own-day-bookings h3 { margin: 0 0 .5rem; font-size: 1rem; }
.own-day-bookings .booking:last-child { padding-bottom: 0; }
