:root {
  color-scheme: light;
  --page: #f5f6f1;
  --paper: #fff;
  --ink: #20271e;
  --muted: #596655;
  --edge: #dce2d7;
  --green: #284a32;
  --mint: #dfeadb;
  --danger: #8a2f26;
  font:
    15px/1.5 system-ui,
    -apple-system,
    sans-serif;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
}
a {
  color: var(--green);
  text-underline-offset: 0.2em;
}
button,
input,
select {
  font: inherit;
}
button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid var(--edge);
  border-radius: 8px;
  padding: 0.5rem 0.9rem;
  background: white;
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
  font-weight: 650;
  white-space: nowrap;
}
button:hover,
.button:hover {
  background: #eef2eb;
}
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.primary,
.primary:hover {
  background: var(--green);
  border-color: var(--green);
  color: white;
}
.primary:hover {
  background: #365b41;
}
.quiet {
  background: transparent;
}
.danger {
  color: var(--danger);
}
.icon {
  padding: 0.35rem 0.75rem;
  font-size: 1.3rem;
}
input,
select {
  min-height: 42px;
  border: 1px solid #c8d0c4;
  border-radius: 7px;
  padding: 0.45rem 0.65rem;
  background: white;
  color: var(--ink);
  max-width: 100%;
}
input[type="checkbox"] {
  min-height: auto;
  width: 17px;
  height: 17px;
  flex: none;
  accent-color: var(--green);
}
:focus-visible {
  outline: 3px solid #678b5e;
  outline-offset: 2px;
}
.topbar {
  min-height: 65px;
  padding: 0.75rem max(calc((100vw - 1300px) / 2), 1rem);
  border-bottom: 1px solid var(--edge);
  background: var(--paper);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.055em;
}
.brand img {
  border-radius: 8px;
}
.brand small {
  font-size: 0.65rem;
  color: var(--muted);
  display: block;
  line-height: 1.15;
  letter-spacing: 0.17em;
}
.topbar nav,
.actions,
.controls,
.date-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.55rem;
}
.topbar nav {
  gap: 1rem;
}
.topbar nav a {
  text-decoration: none;
  font-weight: 650;
}
.topbar nav form,
.actions form {
  margin: 0;
}
.wrap {
  width: min(100% - 2rem, 1300px);
  margin: 0 auto;
}
.narrow {
  width: min(100% - 2rem, 660px);
  margin: 0 auto;
  padding: 1.5rem 0;
}
.topline {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
  margin: 2rem 0 1.3rem;
  flex-wrap: wrap;
}
h1,
h2,
h3,
p {
  margin: 0 0 0.85rem;
}
h1 {
  font-size: clamp(2rem, 5vw, 3.1rem);
  font-weight: 720;
  letter-spacing: -0.055em;
  line-height: 1.05;
}
h2 {
  font-size: 1.21rem;
  letter-spacing: -0.022em;
}
h3 {
  font-size: 1rem;
}
.topline h1 {
  margin: 0;
}
.studio-name {
  font-weight: 700;
  color: #52674b;
  margin-bottom: 0.43rem;
  font-size: 0.86rem;
}
.muted,
.foot {
  color: var(--muted);
}
.controls {
  justify-content: space-between;
  margin-bottom: 0.9rem;
}
.segments {
  display: flex;
  padding: 3px;
  background: #e9ede5;
  border-radius: 9px;
  gap: 2px;
}
.segments a {
  padding: 0.42rem 0.85rem;
  text-decoration: none;
  color: var(--muted);
  font-weight: 650;
  border-radius: 6px;
}
.segments .selected {
  background: white;
  color: var(--ink);
  box-shadow: 0 1px 2px #18221012;
}
.calendar-meta {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.88rem;
  color: var(--muted);
}
#calendar-results {
  contain: inline-size;
}
.day-scroll {
  overflow: auto;
  border: 1px solid var(--edge);
  border-radius: 12px;
  background: white;
  max-height: 72vh;
}
.day-grid {
  display: grid;
  grid-template-columns: 62px repeat(var(--count), minmax(160px, 1fr));
  min-width: max-content;
}
.day-heading {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 58px;
  padding: 0.55rem 0.65rem;
  background: #fff;
  border-bottom: 1px solid var(--edge);
  border-right: 1px solid var(--edge);
}
.time-lane {
  position: sticky;
  left: 0;
  z-index: 3;
  background: white;
}
.avatar {
  background: var(--mint);
  color: #33553a;
  border-radius: 50%;
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  font-weight: 750;
  flex: none;
}
.quick-block {
  margin-left: auto;
  font-size: 0.74rem;
}
.hour-heading {
  color: var(--muted);
  font-size: 0.75rem;
}
.hours > div {
  height: 60px;
  padding: 0.25rem 0.58rem;
  color: var(--muted);
  font-size: 0.72rem;
}
.day-column {
  position: relative;
  height: var(--day-height);
  border-right: 1px solid var(--edge);
  background: repeating-linear-gradient(
    to bottom,
    #fff 0,
    #fff 59px,
    #e6eae3 59px,
    #e6eae3 60px
  );
}
.day-column:nth-child(even) {
  background: repeating-linear-gradient(
    to bottom,
    #fcfdfa 0,
    #fcfdfa 59px,
    #e6eae3 59px,
    #e6eae3 60px
  );
}
.event {
  position: absolute;
  left: 5px;
  right: 5px;
  top: var(--top);
  height: var(--height);
  overflow: hidden;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  align-content: start;
  gap: 0 0.4rem;
  font-size: 0.78rem;
  line-height: 1.28;
  padding: 0.18rem 0.4rem;
  border-radius: 5px;
  background: #e0eddf;
  border-left: 3px solid #537c51;
  text-decoration: none;
  color: #203a26;
}
.event strong,
.event span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}
.event-time {
  font-variant-numeric: tabular-nums;
}
.event.block,
.summary-event.block {
  background: #eeeae4;
  border-color: #9d8061;
  color: #55483b;
}
.off-shift {
  position: absolute;
  inset-inline: 0;
  top: var(--top);
  height: var(--height);
  background: repeating-linear-gradient(135deg, #f2f0ec 0 5px, #faf9f7 5px 10px);
  pointer-events: none;
}
.event.arrived {
  border-color: #176353;
}
.agenda-barber,
.calendar-agenda {
  display: none;
}
.week-capacity {
  margin: 0 0 0.55rem;
  color: var(--muted);
  font-size: 0.78rem;
}
.activity-nav {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.activity-badge {
  background: #f1d4c6;
  color: #241914;
  border-radius: 999px;
  min-width: 1.45rem;
  padding: 0.02rem 0.4rem;
  text-align: center;
}
.activity-list {
  display: grid;
  gap: 0.35rem;
}
.activity-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem;
  border: 1px solid var(--edge);
  border-inline-start-width: 4px;
  border-radius: 6px;
  text-decoration: none;
}
.activity-item.unread {
  border-inline-start-color: var(--green);
  background: var(--mint);
}
.activity-item .notice-mark {
  display: none;
}
.activity-item .notice-when {
  color: var(--muted);
  text-align: right;
  font-size: 0.85rem;
}
.activity-inbox {
  margin-bottom: 1.2rem;
}
.inbox-heading {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: end;
  gap: 0.75rem;
  margin-block: 0.25rem 0.6rem;
}
.inbox-heading :is(h1, p) {
  margin-bottom: 0;
}
.inbox-heading p {
  margin-top: 0.45rem;
  color: var(--muted);
}
.notice-copy {
  display: grid;
  gap: 0.1rem;
  min-width: 0;
  overflow-wrap: anywhere;
}
.notice-type {
  font-size: 0.78rem;
  font-weight: 700;
}
.notice-when,
.notice-copy > span:last-child {
  font-size: 0.85rem;
}
.notice-arrow {
  font-size: 1.35rem;
  line-height: 1;
}
.slot-search form :is(label, select, input) {
  display: block;
  width: 100%;
}
.slot-search label {
  margin-bottom: 0.25rem;
}
.slot-search-period {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem;
}
.slot-search-period > div {
  min-width: 0;
}
.slot-search .options strong {
  overflow-wrap: normal;
}

.activity-toast:not([hidden]) {
  position: fixed;
  z-index: 10;
  top: 0.8rem;
  right: 0.8rem;
  max-width: min(26rem, calc(100vw - 1.6rem));
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem;
  background: var(--paper);
  border: 1px solid var(--edge);
  border-radius: 8px;
  box-shadow: 0 6px 24px #1f1b1829;
}
.activity-toast a {
  padding: 0.3rem;
  min-width: 0;
}
.activity-toast button {
  min-height: 44px;
  min-width: 44px;
  padding: 0;
}
.appointment-summary {
  display: grid;
  gap: 0.35rem;
  margin-bottom: 0.8rem;
}
.status-pill {
  justify-self: start;
  padding: 0.14rem 0.55rem;
  background: var(--mint);
  border-radius: 999px;
  font-size: 0.8rem;
}
.booking-extras {
  border: 1px solid var(--edge);
  border-radius: 8px;
  padding: 0.6rem 0.8rem;
  margin: 0;
}
.booking-extras legend,
.booking-extras strong {
  font-weight: 700;
}
.booking-extras small {
  color: var(--muted);
}
.extra-option {
  min-height: 44px;
  margin: 0;
}
.extra-option small {
  display: block;
}
.options button[name="staff"] {
  text-align: left;
  min-height: 44px;
  background: var(--paper);
}
.agenda-active .day-scroll {
  display: none;
}
.agenda-active .calendar-agenda,
.agenda-active .agenda-barber {
  display: block;
}
.agenda-status {
  color: var(--muted);
  font-size: 0.86rem;
}
.agenda-items {
  display: grid;
  gap: 0.5rem;
}
.agenda-items .event {
  position: static;
  min-height: 58px;
  height: auto;
  display: grid;
  grid-template-columns: 5.8rem minmax(0,1fr);
  gap: 0.25rem 0.75rem;
  padding: 0.6rem;
}
.agenda-items .event-time {
  grid-row: span 3;
}
.agenda-items .event span:not(.event-time) {
  grid-column: 2;
}
.agenda-items .event.in-progress {
  box-shadow: inset 0 0 0 1px var(--green);
}
.event:hover {
  filter: brightness(0.96);
}
.now-line {
  display: none;
  position: absolute;
  top: var(--top);
  z-index: 1;
  left: 0;
  right: 0;
  height: 2px;
  background: #aa4c39;
  pointer-events: none;
}
.now-line:before {
  content: "";
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  left: 0;
  top: -2px;
  background: #aa4c39;
}
.week-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.55rem;
}
.week-day {
  background: #fff;
  border: 1px solid var(--edge);
  border-radius: 9px;
  padding: 0.65rem;
  min-height: 8rem;
}
.week-day h2 {
  font-size: 0.9rem;
}
.week-day h2 a {
  text-decoration: none;
}
.summary-event {
  padding: 0.35rem;
  border-left: 2px solid #537c51;
  background: #e0eddf;
  margin-bottom: 0.35rem;
  border-radius: 4px;
  font-size: 0.78rem;
  overflow-wrap: anywhere;
}
.summary-event a {
  text-decoration: none;
}
.summary-event span,
.summary-event strong {
  display: block;
}
.week-day .muted {
  font-size: 0.78rem;
}
.month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid var(--edge);
  background: var(--edge);
  border-radius: 10px;
  overflow: hidden;
}
.month-label,
.month-day {
  background: #fff;
  padding: 0.55rem;
}
.month-label {
  font-weight: 650;
  font-size: 0.8rem;
}
.month-day {
  min-height: 72px;
  display: flex;
  flex-direction: column;
  text-decoration: none;
}
.month-day span {
  font-size: 0.76rem;
}
.outside {
  background: #f2f3ef;
  color: var(--muted);
}
.current-day {
  box-shadow: inset 0 0 0 2px #7ba375;
}
.month-day:hover {
  background: var(--mint);
}
.card {
  border: 1px solid var(--edge);
  border-radius: 13px;
  background: white;
  padding: clamp(1rem, 3vw, 1.75rem);
  margin: 1rem 0;
}
.card h1 {
  margin-bottom: 1.3rem;
}
.stack {
  display: grid;
  gap: 0.75rem;
}
.stack > p {
  margin: 0;
}
.stack label,
.stack p label {
  display: grid;
  gap: 0.2rem;
  font-weight: 650;
}
.stack label.check {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.stack button {
  justify-self: start;
}
.stack p input,
.stack p select {
  width: 100%;
}
.two,
.settings-grid {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.settings-grid > .card {
  margin: 0;
}
.hour-input {
  grid-template-columns: minmax(76px, 1fr) 2fr;
}
.inner-form {
  padding: 0.65rem 0;
}
.card details {
  border-top: 1px solid var(--edge);
  padding: 0.6rem 0;
}
.card details summary {
  cursor: pointer;
  font-weight: 650;
}
.back {
  display: inline-block;
  margin: 0.5rem 0;
}
.error,
.errorlist {
  padding: 0.6rem 0.8rem;
  border-radius: 7px;
  background: #fae9e5;
  color: #762b21;
}
.errorlist {
  margin: 0;
  list-style: none;
}
.hero {
  padding: clamp(4rem, 13vw, 10rem) 0;
}
.hero h1 {
  font-size: clamp(3.3rem, 12vw, 8rem);
  max-width: 12ch;
}
.hero p {
  margin-bottom: 1.4rem;
}
.options {
  display: grid;
  gap: 0.5rem;
}
.options a {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.8rem;
  border: 1px solid var(--edge);
  border-radius: 8px;
  text-decoration: none;
}
.options a:hover {
  background: var(--mint);
}
.options a span {
  font-size: 0.8rem;
}
.service-options .service-option {
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 0.65rem;
  align-items: start;
  min-height: 48px;
}
.service-option-copy,
.service-option-meta {
  display: grid;
  gap: 0.2rem;
}
.service-option-copy {
  min-width: 0;
  overflow-wrap: anywhere;
}
.service-option-copy > span,
.service-option-meta > span {
  font-size: 0.82rem;
  line-height: 1.4;
}
.service-option-meta {
  grid-column: 2;
  text-align: right;
  white-space: nowrap;
}
.service-arrow {
  grid-column: 3;
}
.service-category {
  margin-block: 1.4rem 0.5rem;
  font-size: 1.03rem;
  scroll-margin-top: 1rem;
}
.booking-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.booking-categories a {
  display: inline-flex;
  align-items: center;
  padding-inline: 0.7rem;
  min-height: 44px;
  border: 1px solid var(--edge);
  border-radius: 6px;
  font-size: 0.85rem;
}
.service-summary {
  margin-block: 0.65rem 1rem;
}
.choice {
  border-bottom: 1px solid var(--edge);
  padding-bottom: 0.55rem;
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.choice span {
  color: var(--muted);
}
.slot-options {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.date-booking {
  margin: 1rem 0;
}
.foot {
  margin: 1rem auto 2rem;
}
.foot summary {
  cursor: pointer;
}
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
code {
  overflow-wrap: anywhere;
}
@media (max-width: 900px) {
  .week-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
@media (max-width: 620px) {
  .topbar {
    gap: 0.5rem;
  }
  .topbar nav {
    gap: 0.65rem;
    width: 100%;
    font-size: 0.86rem;
  }
  .topbar nav form {
    margin-left: auto;
  }
  .topline {
    margin-top: 1.3rem;
  }
  .calendar-meta {
    font-size: 0.76rem;
  }
  .date-nav {
    gap: 0.35rem;
  }
  .date-nav input {
    width: 128px;
  }
  .date-nav select {
    max-width: 150px;
  }
  .settings-grid {
    grid-template-columns: 1fr;
  }
  .week-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .month-day,
  .month-label {
    padding: 0.35rem;
  }
  .month-day {
    min-height: 53px;
  }
  .desktop-word {
    display: none;
  }
  .options a {
    gap: 0.4rem;
  }
  .day-grid {
    grid-template-columns: 48px repeat(var(--count), minmax(137px, 1fr));
  }
  .hour-heading,
  .hours > div {
    padding-left: 0.38rem;
  }
  .day-heading {
    padding: 0.35rem;
    font-size: 0.82rem;
  }
}
