:root {
  --blue: #135a50;
  --ink: #142d29;
  --muted: #60736b;
  --line: #dce5dd;
  --soft: #edf2e9;
  --lime: #d5f56a;
  --deep: #112d2a;
  --paper: #f4f6ef;
  background: #e5ede7;
}

body { color: var(--ink); }
h1, h2, h3, h4 { line-height: 1.22; }
h2 { font-size: 30px; letter-spacing: -1.25px; }
h3 { font-size: 19px; }
p { margin: 8px 0; }
:focus-visible { outline-color: #73a786 !important; outline-offset: 3px; }

.miniapp {
  background: var(--paper);
  box-shadow: 0 20px 80px #173c2d22;
  padding-bottom: calc(102px + env(safe-area-inset-bottom, 0px));
}
.app-header {
  background: var(--deep);
  color: #fff;
  border: 0;
  padding: calc(20px + env(safe-area-inset-top, 0px)) 22px 20px;
}
.brand { gap: 11px; }
.brand h1 {
  font-size: 16px;
  line-height: 1.25;
  font-weight: 800;
  letter-spacing: -.45px;
}
.brand-mark {
  background: none;
  color: var(--lime);
  border-radius: 0;
  width: 36px;
  height: 36px;
}
.brand-mark svg { display: block; width: 36px; height: 36px; }
.app-header .icon-button {
  background: #ffffff19;
  color: #e9f4e9;
  border: 1px solid #ffffff1c;
  width: 44px;
  height: 44px;
  border-radius: 10px;
}
.role-switch {
  background: var(--deep);
  border: 0;
  border-top: 1px solid #ffffff20;
  padding: 10px 22px 17px;
}
.role-switch > span {
  color: #b4cbc0;
  font-size: 12px;
  text-align: right;
}
.role-switch .segmented { background: #ffffff16; border-radius: 11px; }
.role-switch .segmented button {
  color: #c1d3c8;
  min-height: 44px;
  padding: 7px 13px;
  border-radius: 8px;
  font-size: 13px;
}
.role-switch .segmented .selected {
  color: var(--deep) !important;
  background: var(--lime) !important;
  box-shadow: none;
}
.operator-switch {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--deep);
  border-top: 1px solid #ffffff20;
  padding: 10px 22px 14px;
}
.operator-switch label { color: #d4e6da; font-size: 14px; font-weight: 650; }
.operator-switch select {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  border: 1px solid #ffffff40;
  border-radius: 10px;
  padding: 9px 12px;
  background: #ffffff;
  color: var(--deep);
  font: inherit;
}
.miniapp > main {
  padding: 0 22px 28px;
  min-height: calc(100dvh - 235px);
}
.page-heading { margin: 25px 0 17px; }
.page-heading h2 { color: var(--deep); }
.section { margin: 28px 0; }
.section > h3, .section-heading h3 { margin-bottom: 14px; }
.section-heading { margin-bottom: 0; }

.primary, .secondary, .danger {
  border-radius: 12px;
  min-height: 48px;
  font-size: 14px;
  font-weight: 700;
  transition: background .18s, transform .18s, box-shadow .18s;
}
.primary {
  background: var(--deep);
  border-color: var(--deep);
  color: #fff;
  box-shadow: 0 7px 15px #112d2a18;
}
.primary:hover { background: #1c4640; }
.primary:active, .coach-card:active { transform: scale(.985); }
.primary:disabled {
  color: #839088;
  background: #dee5de;
  border-color: #dee5de;
  box-shadow: none;
}
.secondary { color: var(--deep); background: #fff; border-color: var(--line); }
.secondary:hover { background: #f2f7ec; }
.text-button, .back-button { color: var(--blue); font-size: 14px; font-weight: 700; min-height: 44px; }
.back-button { margin: 18px 0 8px; }
.panel, .booking-card, .invoice, .court-times, .calendar-cell {
  background: #fff;
  border-color: var(--line);
  border-radius: 16px;
}
.empty {
  background: #fff;
  border-color: #cad9cf;
  color: var(--muted);
}
.alert {
  background: #fff6df;
  color: #6e5429;
  border-color: #ebdcb0;
}
.policy { color: #6b7a72; font-size: 13px; line-height: 1.5; }

/* Coaches */
.coach-list { gap: 18px; padding-bottom: 8px; }
.coach-card {
  display: block;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 12px 30px #173c2d0c;
  transition: transform .2s, box-shadow .2s;
}
.coach-card:hover { box-shadow: 0 17px 34px #173c2d20; }
.coach-card > .coach-card-media { width: 100%; height: 210px; overflow: hidden; background: #ccddd2; padding: 0; }
.coach-card-media img { width: 100%; height: 100%; object-fit: cover; object-position: center 45%; }
.coach-card:nth-child(2) .coach-card-media img { object-position: center 46%; }
.coach-card:nth-child(3) .coach-card-media img { object-position: center 42%; }
.coach-card > .coach-card-info {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 17px 18px 14px;
}
.coach-card-identity { min-width: 0; }
.coach-card h3 { font-size: 23px; letter-spacing: -.8px; color: var(--deep); }
.coach-card p { color: var(--muted); font-size: 13px; margin: 4px 0 0; }
.coach-price {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0;
  margin: 0;
  line-height: 1.1;
}
.coach-price small { color: #718277; font-size: 12px; }
.coach-price strong, .coach-price > strong {
  color: var(--deep);
  font: 800 24px Manrope, sans-serif;
  letter-spacing: -.8px;
  margin: 3px 0 1px;
}
.coach-card > .coach-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px 17px;
  gap: 12px;
}
.tags { gap: 6px; }
.tags span {
  background: #edf3e7;
  border: 1px solid #e3eadd;
  color: #446351;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.25;
}
.card-arrow {
  width: 35px;
  height: 35px;
  flex: none;
  display: grid;
  place-items: center;
  background: var(--lime);
  color: var(--deep);
  border-radius: 50%;
  font-size: 20px;
  font-weight: 700;
}

/* Coach details and selection */
.profile-hero {
  margin-top: 6px;
  height: 275px;
  border-radius: 19px;
  background: #acc5b5;
}
.profile-hero > img { object-position: center 43%; }
.profile-hero > div {
  padding: 55px 20px 19px;
  background: linear-gradient(transparent, #081b1abf);
}
.profile-hero h2 { font-size: 30px; letter-spacing: -1px; }
.profile-hero p { color: #eef5e9; font-size: 13px; }
.profile-copy { margin: 17px 2px 26px; }
.profile-copy > p { font-size: 15px; line-height: 1.55; color: #40534c; }
.profile-copy .tags { margin-top: 13px; }
.profile-copy .tags span { font-size: 12px; }
.date-strip { gap: 7px; }
.date-strip button {
  background: #fff;
  color: #51675d;
  border-color: var(--line);
  min-height: 69px;
  border-radius: 12px;
}
.date-strip button.selected,
.time.selected,
.group-options button.selected {
  background: var(--lime) !important;
  color: var(--deep) !important;
  border-color: #b9d357 !important;
  box-shadow: inset 0 0 0 1px #b9d357;
}
.date-strip strong { font-size: 23px; color: inherit; }
.date-strip small { font-size: 13px; font-weight: 700; }
.court-time-list { gap: 11px; }
.court-times {
  border-left: 4px solid #80a794;
  padding: 16px;
  box-shadow: 0 5px 18px #173c2d08;
}
.court-times h4 { font-size: 15px; color: var(--deep); }
.court-times small { color: var(--muted); font-size: 13px; }
.court-id { color: #8b9b90; font-size: 12px; }
.time-grid { gap: 8px; margin-top: 15px; }
.time {
  min-width: 76px;
  min-height: 44px;
  border-color: #cbded0;
  background: #eff7e9;
  color: #1a5744;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
}
.time.occupied {
  color: #89988f;
  background: #eff1ed;
  border-color: #e2e7e1;
}
.time.unpublished:not(.occupied) { color: #9ca99e; border-color: #d6dfd6; }
.customer-time-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}
.customer-time {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 3px;
  min-width: 0;
  min-height: 67px;
  padding: 10px 12px;
  border: 1px solid #cbded0;
  border-radius: 13px;
  background: #fff;
  color: var(--deep);
  text-align: left;
  box-shadow: 0 3px 12px #173c2d08;
}
.customer-time strong { font-size: 17px; line-height: 1.2; }
.customer-time span { color: #597464; font-size: 12px; line-height: 1.2; }
.customer-time.selected {
  border-color: #a8ca58;
  background: var(--lime);
  box-shadow: 0 0 0 2px #acc96644;
}
.customer-time.selected span { color: #345333; }
.customer-time.unavailable,
.customer-time:disabled {
  border-color: #e2e7e1;
  background: #ecefec;
  color: #819087;
  box-shadow: none;
  cursor: not-allowed;
}
.customer-time.unavailable span { color: #819087; }
.court-preferences-section { scroll-margin-top: 18px; }
.preference-picker {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}
.preference-picker-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin: 0 1px 12px;
  color: #526c5e;
  font-size: 13px;
  font-weight: 700;
}
.preference-picker-head span:last-child:not(:first-child) { color: #77877d; font-weight: 500; text-align: right; }
.court-pick-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.picked-grid { border-bottom: 1px solid var(--line); padding: 1px 0 14px; margin-bottom: 14px; }
.available-grid:empty { display: none; }
.court-pick {
  min-width: 0;
  overflow: visible;
  display: flex;
  flex-direction: column;
  border: 1px solid #e0e6df;
  border-radius: 14px;
  background: #f1f3f1;
  color: #718079;
  transition: background .16s ease, border-color .16s ease, transform .16s ease;
}
.court-pick.picked {
  background: #f0f9e9;
  border-color: #9abca5;
  color: var(--deep);
  box-shadow: 0 4px 12px #193d2c12;
}
.court-pick-select {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  width: 100%;
  min-width: 0;
  min-height: 115px;
  padding: 14px 5px 10px;
  border: 0;
  border-radius: 13px;
  background: transparent;
  color: inherit;
  text-align: center;
}
.court-pick-icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-bottom: 9px;
  border-radius: 11px;
  background: #dfe4df;
  color: #84938b;
}
.court-pick-icon svg { width: 27px; height: 27px; }
.picked .court-pick-icon { background: var(--deep); color: var(--lime); }
.court-pick-rank {
  position: absolute;
  top: -8px;
  right: -10px;
  display: grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 4px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: var(--lime);
  color: var(--deep);
  font: 800 12px Manrope, sans-serif;
  box-shadow: 0 2px 6px #173c2d27;
}
.court-pick-select strong {
  display: block;
  width: 100%;
  overflow-wrap: anywhere;
  font-size: 14px;
  line-height: 1.25;
  font-weight: 800;
}
.court-pick-select small { display: block; font-size: 13px; line-height: 1.4; color: inherit; }
.court-pick-controls { display: flex; justify-content: space-between; align-items: center; padding: 0 6px 7px; }
.court-pick-controls .pick-move,
.court-pick-controls .drag-handle {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: #dfe9da;
  color: #285d45;
  font-size: 16px;
  line-height: 1;
}
.court-pick-controls .pick-move:disabled { opacity: .3; }
.court-pick-controls .drag-handle { background: var(--deep); color: var(--lime); font-size: 20px; cursor: grab; touch-action: none; }
.court-pick-controls .drag-handle:active { cursor: grabbing; }
.court-pick.drag-target { border-color: var(--blue); box-shadow: 0 0 0 3px #92c9a477; transform: translateY(-2px); }
@media (max-width: 360px) {
  .preference-picker { padding: 11px; }
  .court-pick-grid { grid-template-columns: 1fr; gap: 7px; }
  .court-pick-controls { padding: 0 7px 7px; }
  .customer-time-grid { gap: 6px; }
  .customer-time { padding: 9px 7px; }
  .customer-time strong { font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) { .court-pick { transition: none; } }
.group-options { gap: 9px; }
.group-options button {
  background: #fff;
  border-color: var(--line);
  color: #536b5c;
  border-radius: 12px;
  min-height: 79px;
}
.group-options small { font-size: 12px; font-weight: 700; }
.group-options strong { font-size: 21px; color: inherit; }
.checkout-bar { border-top-color: var(--line); }
.checkout-bar small { color: var(--muted); font-size: 13px; }
.checkout-bar strong { color: var(--deep); }
.checkout-bar .primary { min-width: 150px; }

/* Invoice, payment and bookings */
.invoice {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 8px 28px #173c2d0c;
}
.invoice-row span, .invoice-courts > span { color: var(--muted); }
.invoice-row strong { color: var(--deep); font-weight: 700; }
.invoice-total { border-top-color: #cbd8c9; }
.invoice-total strong { color: var(--deep); }
.payment-card {
  background: var(--deep);
  color: #fff;
  border: 0;
  border-radius: 20px;
  text-align: left;
}
.payment-icon {
  background: var(--lime);
  color: var(--deep);
  margin: 0;
  width: 55px;
  height: 55px;
  font-size: 30px;
}
.payment-card > h3 { color: var(--lime); }
.payment-card > p { color: #bdcfc2; }
.payment-card .row { border-color: #ffffff30; }
.payment-card .row span { color: #c3d3c8; }
.filter-row { border-color: var(--line); }
.filter-row button { color: #718278; font-weight: 600; }
.filter-row .selected {
  color: var(--deep) !important;
  border-bottom-color: var(--deep) !important;
  font-weight: 800;
}
.booking-card { box-shadow: 0 5px 18px #173c2d0a; }
.booking-card h3 { color: var(--deep); }
.booking-card .row .muted { color: var(--muted); }
.telegram-updates { margin: 15px 0; }
.telegram-updates-connected { display: flex; align-items: center; gap: 9px; padding: 13px 15px; border: 1px solid #bde0c5; border-radius: 12px; background: #e8f7e9; color: #236c3f; font-size: 13px; }
.telegram-updates-connected span { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #2e8150; color: #fff; font-weight: 800; }
.status { background: #e8f0ed; color: #266256; font-size: 12px; border-radius: 999px; font-weight: 700; }
.status.green { background: #e3f5dc; color: #286c39; }
.status.grey { background: #edf0ec; color: #58655e; }

/* Coach tools */
.schedule-controls { gap: 8px; }
.schedule-controls .segmented { background: #e4eae3; border-radius: 10px; }
.schedule-controls .segmented button { color: #566c5d; font-size: 12px; min-height: 44px; }
.schedule-controls .segmented .selected { background: var(--deep) !important; color: #fff !important; }
.court-checks label { min-height: 44px; }
.court-checks label.court-busy { flex-wrap: wrap; align-content: center; color: #728079; background: #eef0ee; padding: 4px; border-radius: 7px; }
.court-checks label.court-busy small { display: block; flex-basis: 100%; padding-left: 19px; color: #69776e; font-size: 11px; line-height: 1.35; overflow-wrap: anywhere; }
.court-options summary, .break-editor summary { min-height: 44px; display: flex; align-items: center; }
.weekday-checks label { min-height: 44px; }
.range-shortcuts button, .filter-row button, .small-button, .modal-head .icon-button { min-height: 44px; }
.modal-head .icon-button { width: 44px; height: 44px; }
.legend { color: #61756b; font-size: 12px; }
.legend i { background: #76a78a; }
.legend i.booked { background: #aeb9ae; }
.calendar-cell { min-height: 100px; }
.calendar-cell small, .calendar-cell > span { color: var(--muted); }
.rule-row { border-color: var(--line); }
.rule-row strong { color: var(--deep); font-size: 14px; }
.rule-row small { color: var(--muted); font-size: 12px; }
.profile-avatar img { border-radius: 15px; }
.profile-form label, .price-fields label { color: #4a6154; font-weight: 600; }
.profile-form small { color: var(--muted); font-size: 12px; }
.currency-input { background: #fff; border-color: var(--line); }
.currency-input > span { color: var(--muted); }
input, select, textarea {
  color: var(--deep);
  border-color: #cddbd0;
  border-radius: 11px;
}
input:focus, textarea:focus, select:focus { border-color: var(--blue); }
dialog { border-radius: 20px; }
dialog::backdrop { background: #0b2424a8; }
.modal-head { border-color: var(--line); }
.modal-head h2 { color: var(--deep); }
.modal-content > label, .field-grid label { color: #52695c; font-size: 14px; }
.window-editor { border-color: var(--line); }
.court-options summary { color: var(--blue); font-size: 14px; }
.court-checks label, .weekday-checks label { color: #53695d; font-size: 13px; }
.dialog-feedback { background: #f0f8ee; color: #265c3c; }

/* Telegram sized navigation */
.bottom-nav {
  background: #112d2af2;
  border: 0;
  box-shadow: 0 -8px 22px #112d2a16;
  padding: 8px 15px calc(9px + env(safe-area-inset-bottom, 0px));
}
.bottom-nav button {
  color: #a3bcaf;
  min-height: 56px;
  font-size: 12px;
  font-weight: 700;
  gap: 4px;
}
.bottom-nav button > span { width: 22px; height: 22px; }
.bottom-nav svg { display: block; width: 22px; height: 22px; }
.bottom-nav button.active {
  background: #d5f56a;
  color: var(--deep);
  border-radius: 12px;
  font-weight: 800;
}

@media (min-width: 700px) {
  .miniapp {
    margin: 25px auto;
    min-height: calc(100dvh - 50px);
    border-radius: 24px;
    border: 1px solid #c9d9ce;
  }
  .bottom-nav { border-radius: 0; }
}
@media (max-width: 390px) {
  .miniapp > main { padding-left: 16px; padding-right: 16px; }
  .app-header, .role-switch, .operator-switch { padding-left: 16px; padding-right: 16px; }
  .brand h1 { font-size: 15px; }
  .coach-card { display: block; }
  .coach-card > .coach-card-media { height: 180px; }
  .coach-card > .coach-card-info { padding: 15px 15px 12px; }
  .coach-card h3 { font-size: 21px; }
  .coach-card > .coach-card-foot { padding: 0 15px 15px; }
  .tags span { font-size: 11px; }
  .group-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .time { font-size: 13px; min-width: 70px; }
  .schedule-controls { flex-wrap: wrap; }
  .schedule-controls .segmented { margin-left: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .coach-card, .primary, .secondary, .danger { transition: none; }
}

/* Coach scheduling */
.coach-schedule { padding-bottom: 86px; }
.coach-schedule .page-heading { margin-bottom: 19px; }
.coach-week-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 8px; margin-bottom: 15px; }
.coach-week-head h3 { font-size: 19px; letter-spacing: -.5px; }
.coach-week-head input { width: 153px; min-height: 44px; padding: 9px 7px; font-size: 16px; background: #fff; }
.eyebrow { display: block; color: #65786b; font-size: 12px; font-weight: 800; letter-spacing: .07em; margin-bottom: 5px; }
.coach-week-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; align-items: center; margin: 0 0 21px; }
.coach-week-strip { min-width: 0; flex: 1; display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); gap: 4px; }
.coach-week-strip { grid-row: 1; grid-column: 1 / -1; }
.coach-week-strip button { min-width: 0; min-height: 68px; padding: 6px 1px; border-radius: 12px; border: 1px solid var(--line); background: #fff; color: #4a6154; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.coach-week-strip button small { font-size: 12px; font-weight: 700; }
.coach-week-strip button strong { font: 800 16px Manrope,sans-serif; }
.coach-week-strip button i { width: 5px; height: 5px; border-radius: 50%; background: transparent; }
.coach-week-strip button i.has-hours { background: #45a069; }
.coach-week-strip button.selected { background: var(--deep) !important; color: #fff !important; border-color: var(--deep) !important; }
.coach-week-strip button.selected i.has-hours { background: var(--lime); }
.week-arrow { grid-row: 2; justify-self: start; min-width: 44px; min-height: 44px; padding: 0 4px; border: 0; background: transparent; color: var(--deep); font-size: 13px; font-weight: 800; }
.week-arrow:last-child { justify-self: end; }
.week-arrow:disabled { opacity: .25; }
.coach-day-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.coach-day-title .text-button { min-height: 44px; padding: 0 4px; }
.coach-range { display: block; width: 100%; padding: 16px; margin: 0 0 10px; border: 1px solid var(--line); border-radius: 16px; text-align: left; color: var(--deep); background: #fff; box-shadow: 0 4px 14px #173c2d08; }
.coach-range:active { transform: scale(.99); }
.coach-range-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.coach-range-top strong { font: 800 19px Manrope,sans-serif; letter-spacing: -.5px; }
.coach-range-top > span { font-size: 12px; color: var(--blue); font-weight: 800; white-space: nowrap; }
.coach-range-courts { display: block; margin: 5px 0 13px; color: #52685a; font-size: 13px; line-height: 1.4; }
.coach-hour-list, .coach-hour-preview { display: flex; flex-wrap: wrap; gap: 6px; }
.coach-hour { display: inline-flex; flex-direction: column; min-width: 68px; padding: 6px 8px; border-radius: 9px; border: 1px solid #d7e8d4; background: #eff7e9; color: #245b40; line-height: 1.15; }
.coach-hour strong { font-size: 14px; }
.coach-hour small { font-size: 12px; margin-top: 3px; color: inherit; }
.coach-hour.is-busy { background: #f0f2ef; color: #5e6f64; border-color: #d5ddd4; }
.coach-schedule-links { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.coach-day-bookings { margin: 20px 0; }
.coach-day-bookings h3 { font-size: 16px; margin-bottom: 9px; }
.coach-booking-row { display: flex; flex-direction: column; width: 100%; gap: 3px; min-height: 57px; margin-bottom: 7px; padding: 10px 13px; text-align: left; color: var(--deep); background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.coach-booking-row strong { font-size: 13px; }
.coach-booking-row small { color: var(--muted); font-size: 12px; }
.recurring-hours { margin: 20px 0; border-top: 1px solid var(--line); }
.recurring-hours > summary { display: flex; justify-content: space-between; align-items: center; min-height: 52px; cursor: pointer; color: var(--deep); font-size: 14px; font-weight: 800; }
.recurring-hours > summary span { margin-left: auto; margin-right: 10px; padding: 3px 8px; border-radius: 999px; background: #e7eddf; font-size: 12px; }
.repeat-setting { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.repeat-setting strong, .repeat-setting small { display: block; }
.repeat-setting strong { font-size: 13px; }
.repeat-setting small { margin-top: 4px; color: var(--muted); font-size: 12px; }
.repeat-setting .text-button { min-height: 44px; flex: none; }
.coach-schedule-cta { position: fixed; left: 50%; bottom: calc(77px + env(safe-area-inset-bottom,0px)); transform: translateX(-50%); z-index: 18; width: min(100%,510px); padding: 10px 21px; background: linear-gradient(#f4f6efdc,#f4f6effa); border-top: 1px solid #dde8dc; backdrop-filter: blur(10px); }
.coach-schedule-cta .primary { min-height: 50px; }

/* Add hours bottom sheet */
.coach-editor { padding-top: 16px; }
.coach-editor-date { color: #536b5b; font-size: 14px; font-weight: 800; margin: 0 0 13px; }
.coach-editor-section { padding: 16px 0 18px; border-top: 1px solid var(--line); }
.coach-editor-section h3 { display: flex; align-items: center; gap: 9px; font-size: 17px; margin-bottom: 10px; }
.coach-editor-section h3 > span { display: grid; place-items: center; width: 25px; height: 25px; flex: none; border-radius: 8px; background: var(--lime); color: var(--deep); font-size: 12px; }
.coach-editor-section .field-grid { margin: 11px 0; }
.coach-editor-section input[type=time] { min-height: 51px; font-size: 16px; font-weight: 700; }
.coach-time-range { margin: 11px 0; padding: 11px 13px; border: 1px solid var(--line); border-radius: 13px; background: #fff; }
.coach-time-range.selected { border-color: #8eb98d; background: #f8fcf5; }
.coach-time-range-top { display: flex; justify-content: space-between; align-items: center; min-height: 28px; }
.coach-time-range-top strong { font-size: 13px; color: var(--deep); }
.coach-time-range-top button { min-height: 38px; }
.coach-time-range .field-grid { margin: 4px 0 0; }
.coach-range-tabs { display: flex; gap: 7px; overflow-x: auto; padding: 0 0 7px; margin: 0 0 9px; }
.coach-range-tabs button { flex: none; min-height: 44px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: #526b5b; font-size: 13px; font-weight: 700; }
.coach-range-tabs button.selected { background: var(--deep) !important; color: #fff !important; border-color: var(--deep) !important; }
.coach-venue-prompt { margin: 0 0 12px; color: #536b5b; font-size: 13px; font-weight: 700; }
.coach-venue-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
.coach-venue { position: relative; display: flex; align-items: center; gap: 9px; min-width: 0; min-height: 78px; padding: 10px; border: 1px solid var(--line); border-radius: 13px; background: #fff; color: #51685a; cursor: pointer; }
.coach-venue input { position: absolute; width: 1px; height: 1px; opacity: 0; margin: 0; padding: 0; }
.coach-venue:has(input:focus-visible) { outline: 3px solid #73a786; outline-offset: 2px; }
.coach-venue-icon { position: relative; display: grid; place-items: center; width: 35px; height: 35px; flex: none; border-radius: 10px; background: #eef3ec; color: #718579; }
.coach-venue-icon svg { width: 23px; height: 23px; }
.coach-venue-icon i { display: none; position: absolute; top: -6px; right: -5px; width: 16px; height: 16px; border-radius: 50%; background: var(--lime); color: var(--deep); text-align: center; font-size: 11px; font-style: normal; font-weight: 900; }
.coach-venue-copy { min-width: 0; }
.coach-venue strong { display: block; font-size: 13px; line-height: 1.3; }
.coach-venue small { display: block; margin-top: 3px; font-size: 12px; line-height: 1.3; color: inherit; }
.coach-venue.picked { background: #eaf8e2; border-color: #8eb98d; color: var(--deep); }
.coach-venue.picked .coach-venue-icon { background: var(--deep); color: var(--lime); }
.coach-venue.picked .coach-venue-icon i { display: block; }
.coach-venue.venue-busy { background: #f0f2ef; color: #5e6f64; }
.coach-venue.venue-busy.picked { border-color: #9bb4a0; }
.coach-venue:has(input:disabled) { opacity: .6; cursor: not-allowed; }
.coach-hour-preview { margin-top: 14px; }
.coach-repeat-toggle { display: flex; align-items: center; gap: 12px; min-height: 48px; font-size: 14px; font-weight: 800; cursor: pointer; }
.coach-repeat-toggle input { width: 21px; height: 21px; accent-color: var(--deep); }
.coach-repeat-options { padding: 2px 0 17px; }
.coach-repeat-options .weekday-checks { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); gap: 4px; margin: 8px 0 14px; }
.coach-repeat-options .weekday-checks label { display: block; position: relative; min-width: 0; min-height: 45px; margin: 0; }
.coach-repeat-options .weekday-checks input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.coach-repeat-options .weekday-checks span { display: grid; place-items: center; width: 100%; min-height: 45px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: #586c5d; font-size: 12px; font-weight: 800; }
.coach-repeat-options .weekday-checks input:checked + span { background: var(--deep); border-color: var(--deep); color: #fff; }
.coach-repeat-options .weekday-checks input:focus-visible + span { outline: 3px solid #73a786; outline-offset: 2px; }
.coach-until-button { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 11px 14px; border: 1px solid var(--line); border-radius: 11px; background: #fff; color: var(--deep); font-size: 14px; text-align: left; cursor: pointer; }
.coach-until-button strong { margin-left: auto; font-size: 14px; }
.coach-until-button svg { width: 22px; height: 22px; flex: none; color: var(--blue); }
.coach-until-button:focus-visible { outline: 3px solid #73a786; outline-offset: 2px; }
.coach-end-date { display: block; margin-top: 12px; font-size: 13px; font-weight: 700; }
.coach-end-date[hidden] { display: none; }
.coach-end-date input { display: block; width: 100%; min-height: 48px; margin-top: 6px; }
.schedule-note { margin: 12px 0 16px; color: #667b6c; font-size: 12px; line-height: 1.5; }
.coach-editor-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; position: sticky; bottom: 0; z-index: 3; margin: 17px -21px -21px; padding: 12px 21px calc(12px + env(safe-area-inset-bottom,0px)); border-top: 1px solid var(--line); background: #fff; }
.coach-editor-footer span { color: #637869; font-size: 12px; font-weight: 700; }
.coach-editor-footer .primary { min-width: 146px; }
.copy-day-options { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; max-height: 40dvh; overflow: auto; }
.copy-day-options label { min-height: 47px; padding: 9px; display: flex; align-items: center; gap: 7px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: #52685a; font-size: 12px; cursor: pointer; }
.copy-day-options input { width: 17px; height: 17px; flex: none; accent-color: var(--deep); }
@media (max-width: 390px) {
  .coach-week-head h3 { font-size: 16px; }
  .coach-week-head input { width: 147px; }
  .coach-week-strip { gap: 2px; }
  .coach-week-strip button { border-radius: 9px; }
  .coach-venue-grid { grid-template-columns: 1fr; }
  .coach-schedule-cta { padding-left: 16px; padding-right: 16px; }
  .coach-editor-footer { margin-left: -18px; margin-right: -18px; padding-left: 18px; padding-right: 18px; }
}

/* Calendar-first coach schedule */
.coach-schedule { margin: 0 -5px; }
.coach-schedule-day { padding-bottom: 90px; }
.coach-schedule .page-heading { margin: 18px 4px 14px; }
.schedule-month-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 4px 7px; }
.schedule-month-head h3 { font-size: 24px; letter-spacing: -.8px; }
.schedule-month-head > div { display: flex; gap: 6px; }
.month-arrow { width: 43px; height: 43px; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--deep); font-size: 23px; line-height: 1; }
.month-arrow:disabled { opacity: .35; }
.schedule-month-meta { margin: 0 4px 14px; color: var(--muted); font-size: 13px; font-weight: 700; }
.schedule-calendar { padding: 10px 7px 8px; border: 1px solid var(--line); border-radius: 18px; background: #fff; box-shadow: 0 12px 26px #173c2d0a; }
.calendar-weekdays, .calendar-grid { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); gap: 4px; }
.calendar-weekdays { padding: 0 2px 8px; }
.calendar-weekdays span { text-align: center; color: #718578; font-size: 12px; font-weight: 800; }
.calendar-day { display: flex; min-width: 0; min-height: 77px; flex-direction: column; align-items: flex-start; gap: 4px; padding: 6px 3px 5px; border: 1px solid transparent; border-radius: 10px; background: #f7f9f5; color: var(--deep); text-align: left; }
.calendar-day.has-hours { border-color: #d5e7d4; background: #eaf3e8; }
.calendar-day.hours-busy { border-color: #e0e5df; background: #eef1ee; color: #77867b; }
.calendar-day.today { border-color: var(--deep); }
.calendar-day.picked:not(.today) { border-color: #97bb92; }
.calendar-day.outside { opacity: .48; }
.calendar-day.past { opacity: .38; }
.calendar-day .number { display: grid; place-items: center; width: 25px; height: 23px; border-radius: 7px; font-size: 14px; font-weight: 800; }
.calendar-day.today .number { background: var(--deep); color: #fff; }
.calendar-hours { display: flex; width: 100%; flex-direction: column; gap: 3px; }
.calendar-hours span { display: block; width: 100%; overflow: hidden; white-space: nowrap; border-radius: 4px; padding: 2px 1px; background: #d7eabe; color: #315e39; text-align: center; font-size: 11px; line-height: 1.15; font-weight: 800; }
.calendar-hours span:nth-child(2) { background: #d5e9df; color: #315d53; }
.calendar-hours span.more { background: transparent; color: #4f6c57; }
.hours-busy .calendar-hours span { background: #e0e4e0; color: #6a786d; }
.schedule-back { min-height: 42px; margin: 0 0 8px; padding: 0 4px; border: 0; background: transparent; color: var(--blue); font-size: 14px; font-weight: 800; }
.schedule-day-date { font-size: 27px; letter-spacing: -.7px; }
.schedule-day-meta { margin: 5px 0 0; color: var(--muted); font-size: 14px; }
.schedule-timeline { margin: 18px 0 20px; padding: 17px 16px 13px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.schedule-timeline-bar { position: relative; height: 18px; overflow: hidden; border-radius: 99px; background: #e8eee8; }
.schedule-timeline-bar i { position: absolute; top: 2px; bottom: 2px; border-radius: 99px; background: #84bf92; }
.schedule-timeline-axis { display: flex; justify-content: space-between; margin-top: 9px; color: var(--muted); font-size: 12px; font-weight: 700; }
.coach-range-venues { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.coach-range-venues span { padding: 5px 8px; border-radius: 7px; background: var(--soft); color: #355e44; font-size: 12px; font-weight: 700; }
.coach-day-title { margin-top: 14px; }
dialog.availability-dialog { width: min(100vw,510px); max-width: 510px; height: 100dvh; max-height: 100dvh; margin: 0 auto; border-radius: 0; }
.availability-dialog .modal-head { padding-top: calc(19px + env(safe-area-inset-top,0px)); }
.availability-dialog .coach-editor { min-height: calc(100dvh - 86px); }
.coach-editor-section { border: 0; padding: 8px 0 16px; }
.coach-editor-section > h3 { margin: 2px 0 11px; }
.coach-time-range { margin: 13px 0; padding: 15px; border-radius: 16px; }
.coach-time-range-top strong { font-size: 15px; }
.coach-time-range h4 { margin: 17px 0 9px; color: var(--deep); font-size: 14px; }
.coach-time-range .coach-venue-grid { gap: 7px; }
.coach-time-range .coach-venue { min-height: 67px; padding: 8px; }
.coach-time-range .coach-venue strong { font-size: 12px; }
.coach-time-range .coach-venue small { font-size: 11px; }
.coach-add-range { display: block; width: 100%; min-height: 48px; border: 1px dashed #9eb6a3; border-radius: 12px; background: #f1f6ed; color: #215e3e; font-size: 14px; font-weight: 800; }
.coach-repeat-section { margin-top: 13px; padding: 13px 15px; border: 1px solid var(--line); border-radius: 15px; background: #fff; }
.coach-repeat-section h3 { font-size: 16px; }
@media (max-width: 510px) { dialog.availability-dialog { width: 100%; max-width: 100%; max-height: 100dvh; border-radius: 0; } }
@media (max-width: 390px) { .calendar-day { min-height: 72px; padding: 5px 2px; } .calendar-hours span { font-size: 10px; } .calendar-weekdays, .calendar-grid { gap: 2px; } .coach-time-range .coach-venue-grid { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .calendar-day, .month-arrow, .coach-range { transition: none; } }

/* Customer calendar and in-page booking feedback */
.profile-hero.customer-hero { height: 150px; }
.profile-hero.customer-hero > div { padding: 26px 18px 12px; }
.profile-hero.customer-hero h2 { font-size: 24px; }
.customer-calendar-section { margin-top: 21px; }
.customer-calendar-section .schedule-month-head { margin-bottom: 7px; }
.customer-calendar-section .schedule-month-meta { margin-bottom: 13px; }
.customer-calendar .calendar-day { min-height: 75px; justify-content: space-between; padding: 7px 4px; }
.customer-calendar .calendar-day.has-hours { border-color: #b8d7ba; background: #eaf5e9; }
.customer-calendar .calendar-day.picked.has-hours { border-color: var(--deep); box-shadow: inset 0 0 0 1px var(--deep); }
.customer-calendar .calendar-day.unavailable,
.customer-calendar .calendar-day:disabled { background: #f0f1ef; color: #a6afa7; border-color: #eaedea; opacity: 1; cursor: not-allowed; }
.customer-calendar .calendar-day.outside { opacity: .35; }
.customer-day-mark { display: block; padding: 2px 3px; width: 100%; border-radius: 5px; color: #396544; background: #d7ebd5; font-size: 10px; line-height: 1.15; font-weight: 800; text-align: center; white-space: nowrap; }
.customer-day-venues { margin-top: 6px; color: var(--muted); font-size: 13px; }
.inline-feedback { margin: 15px 0 0; padding: 11px 13px; border-radius: 11px; border: 1px solid #cfdfd1; color: #265c3c; background: #f0f8ee; font-size: 13px; font-weight: 650; }
.inline-feedback[hidden] { display: none; }
.inline-confirm { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; margin: 16px 0; padding: 12px; border: 1px solid #e9c6c3; border-radius: 12px; background: #fff7f5; }
.inline-confirm > strong { flex: 1 0 100%; color: #8b3c37; font-size: 13px; }
.inline-confirm-context { flex: 1 0 100%; color: #9a524d; font-size: 12px; }
.inline-confirm button { flex: 1; min-height: 42px; }
.dialog-feedback { position: static; margin: 10px 21px 0; border: 1px solid #cfdfd1; background: #f0f8ee; color: #265c3c; box-shadow: none; }
.status.yellow { background: #fff3d6; color: #8c5c06; }
.status.green { background: #dff3e4; color: #236c3f; }
.status.red { background: #ffe7e4; color: #a33131; }
.status.grey { background: #eef0ef; color: #65726c; }
@media (max-width: 390px) { .customer-calendar .calendar-day { min-height: 70px; padding: 6px 2px; } .customer-day-mark { font-size: 9px; } }
