:root {
  --key-color: #168458;
  --key-dark: color-mix(in srgb,var(--key-color) 72%,black);
  --key-pale: color-mix(in srgb,var(--key-color) 9%,white);
  --key-border: color-mix(in srgb,var(--key-color) 20%,white);
  font-family: system-ui,sans-serif;
  color: #24312b;
  background: var(--key-pale);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
main {
  max-width: 760px;
  margin: auto;
  padding: 24px;
}
header {
  display: flex;
  justify-content: center;
  margin-bottom: 28px;
}
.logo {
  display: block;
  width: 180px;
  height: 180px;
  border-radius: 24px;
  overflow: hidden;
}
.logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
section {
  background: white;
  padding: 28px;
  border-radius: 16px;
  box-shadow: 0 8px 30px color-mix(in srgb,var(--key-color) 12%,transparent);
}
h1 {
  margin-top: 0;
}
a {
  color: var(--key-dark);
}
label {
  display: block;
  margin: 16px 0 6px;
  font-weight: 650;
}
input,
button {
  font: inherit;
}
input {
  width: 100%;
  padding: 11px;
  border: 1px solid #b7c7bd;
  border-radius: 8px;
  font-size: max(16px,1em);
}
.name-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.booking-fields {
  margin-top: 22px;
  border-top: 1px solid var(--key-border);
}
.booking-field {
  padding: 14px 0;
  border-bottom: 1px solid var(--key-border);
}
.booking-field > label,
.field-label {
  display: block;
  margin: 0 0 6px;
  font-weight: 650;
}
.name-fields label {
  margin: 0;
  font-size: .9rem;
  min-width: 0;
}
.name-fields input {
  margin-top: 6px;
}
.slot-duration {
  color: #74636a;
  font-size: .9rem;
}
button,
.button {
  display: inline-block;
  border: 0;
  border-radius: 9px;
  padding: 11px 17px;
  background: var(--key-color);
  color: white;
  cursor: pointer;
  text-decoration: none;
  font-weight: 700;
}
button.secondary {
  background: var(--key-pale);
  color: var(--key-dark);
}
button.danger {
  background: #a20b38;
}
button:disabled {
  opacity: .55;
  cursor: not-allowed;
}
button.processing::before {
  content: "";
  display: inline-block;
  width: 1em;
  height: 1em;
  margin-right: .55em;
  border: 2px solid currentcolor;
  border-right-color: transparent;
  border-radius: 50%;
  vertical-align: -.15em;
  animation: spin .7s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@media (prefers-reduced-motion:reduce) {
  button.processing::before {
    animation-duration: 1.8s;
  }
}
.mail-notice,
.selected-slot {
  color: #74636a;
  font-size: .9rem;
}
footer {
  min-height: 30vh;
}
button:focus-visible,
input:focus-visible,
a:focus-visible {
  outline: 3px solid color-mix(in srgb,var(--key-color) 35%,transparent);
  outline-offset: 2px;
}
.date-group {
  margin: 10px 0 16px;
  padding: 16px;
  border: 1px solid #cbd9d0;
  border-radius: 10px;
}
.date-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.date-heading label,
.time-range label {
  margin: 0;
}
.date-heading input {
  margin-top: 6px;
}
.time-range {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto;
  gap: 8px;
  align-items: center;
  margin: 10px 0;
}
.time-range input {
  margin-top: 6px;
}
.slots {
  display: grid;
  grid-template-columns: repeat(auto-fill,minmax(210px,1fr));
  gap: 8px;
}
.booking-day {
  padding: 16px;
  margin: 14px 0;
  border: 1px solid #cbd9d0;
  box-shadow: none;
}
.booking-day h2 {
  margin: 0 0 12px;
  font-size: 1.05rem;
}
.slot {
  background: var(--key-pale);
  color: var(--key-dark);
  text-align: left;
}
.slot.occupied,
.slot:disabled {
  background: #e5e7e6;
  color: #7b817e;
  cursor: not-allowed;
  text-decoration: line-through;
}
.slot.selected {
  background: var(--key-color);
  color: white;
}
.message {
  padding: 12px;
  border-radius: 8px;
  background: var(--key-pale);
  margin: 14px 0;
}
.error {
  background: #fff0ef;
  color: #a72d22;
}
.urls a {
  overflow-wrap: anywhere;
}
.admin-bookmark p {
  margin-bottom: 0;
}
.share-url {
  margin: 18px 0;
}
.share-url > label {
  margin-bottom: 6px;
}
.share-url > div {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto auto;
  gap: 8px;
}
.share-url .button,
.share-url button {
  white-space: nowrap;
}
.copy-status {
  min-height: 1.5em;
  margin: 5px 0 0;
  color: var(--key-dark);
  font-size: .9rem;
}
table {
  width: 100%;
  border-collapse: collapse;
}
.admin-day {
  padding: 0;
  margin: 18px 0;
  border: 1px solid #cbd9d0;
  box-shadow: none;
  overflow: hidden;
}
.admin-day h2 {
  margin: 0;
  padding: 12px 14px;
  font-size: 1.05rem;
  background: var(--key-pale);
}
.admin-scroll {
  overflow-x: auto;
}
.admin-day table {
  min-width: 620px;
}
.history {
  margin-top: 28px;
  padding: 20px;
  border: 1px solid #cbd9d0;
  box-shadow: none;
}
.history ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.history li {
  display: grid;
  grid-template-columns: 11rem 6rem 1fr;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid var(--key-border);
}
th,
td {
  text-align: left;
  padding: 10px;
  border-bottom: 1px solid #ddd;
}
@media (max-width:600px) {
  main {
    padding: 12px;
  }
  footer {
    min-height: 55vh;
  }
  section {
    padding: 19px;
  }
  .date-heading {
    align-items: stretch;
    flex-direction: column;
  }
  .share-url > div {
    grid-template-columns: 1fr 1fr;
  }
  .share-url input {
    grid-column: 1 / -1;
  }
  .date-heading button {
    align-self: start;
  }
  .time-range {
    grid-template-columns: 1fr;
  }
  .history li {
    grid-template-columns: 1fr;
  }
  .time-range span {
    display: none;
  }
  .time-range button {
    width: max-content;
  }
  table {
    font-size: .85rem;
  }
}
