@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap");

:root {
  --canvas: #f7f0e6;
  --paper: #fffaf2;
  --paper-deep: #efe3d2;
  --ink: #30251e;
  --muted: #716459;
  --line: #dfd1c0;
  --brand: #805135;
  --brand-dark: #5c3825;
  --brand-soft: #ead4b9;
  --soft: #f2e6d5;
  --danger: #a04132;
  --success: #3b684b;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { min-height: 100%; }
body { min-height: 100dvh; display: flex; flex-direction: column; margin: 0; background: var(--canvas); color: var(--ink); font: 400 14px/1.45 Inter, Arial, sans-serif; }
button, input, select { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
.topbar {
  position: fixed; inset: 0 0 auto; z-index: 10; height: 64px;
  background: rgba(255, 250, 242, .97); border-bottom: 1px solid var(--line);
  box-shadow: 0 5px 24px rgba(64, 43, 26, .05);
}
.topbar .container-fluid { max-width: 1320px; }
.topbar .container-fluid > a:first-child { text-decoration: none; }
.header-logo { display: block; width: auto; height: 44px; max-width: min(40vw, 260px); object-fit: contain; }
.brand { color: var(--brand-dark); font: 600 20px/1 Inter, Arial, sans-serif; text-align: center; text-decoration: none; letter-spacing: -.02em; }
.brand small { display: block; margin-top: 6px; color: var(--muted); font: 500 8px/1 Inter, Arial, sans-serif; letter-spacing: .16em; }
.outline-nav {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 37px; padding: 0 17px; border: 1px solid #bda993; border-radius: 100px;
  background: transparent; color: var(--ink); text-decoration: none;
  font: 600 10px/1 Inter, Arial, sans-serif; letter-spacing: .05em; text-transform: uppercase;
  transition: background-color .2s, border-color .2s, color .2s;
}
.outline-nav:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: var(--paper); }
.flag { width: 32px; height: 20px; overflow: hidden; border-radius: 2px; box-shadow: 0 0 0 1px var(--line); }
.flag span { display: block; height: 33.333%; }
.flag .w { background: #fff; } .flag .g { background: #159447; } .flag .r { background: #d9292e; }
main { flex: 1; }
.calendar-wrap { width: 100%; max-width: 1320px; margin: 0 auto; padding: 92px 24px 56px; }
.toolbar { margin: 0 0 16px; padding: 0 0 16px; border-bottom: 1px solid var(--line); }
.toolbar-top { min-height: 42px; align-items: center !important; }
.toolbar-top > div:first-child b {
  display: block; color: var(--brand); font: 600 22px/1.2 Inter, Arial, sans-serif;
  letter-spacing: -.035em; white-space: nowrap;
}
.toolbar-bottom { padding: 8px 0 0; }
.nav-week { display: flex; align-items: center; justify-content: center; gap: 9px; }
.nav-week .btn {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 34px; height: 34px; padding: 0; border: 1px solid var(--line); border-radius: 50%;
  background: var(--paper); color: var(--brand-dark); text-decoration: none;
  transition: background-color .2s, border-color .2s, color .2s, transform .2s;
}
.nav-week .btn:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: var(--paper); transform: translateY(-2px); }
.nav-week .btn.disabled { opacity: .38; pointer-events: none; }
.week-date { min-width: 190px; margin: 0 4px; text-align: center; white-space: nowrap; color: var(--ink); font-size: 13px; letter-spacing: -.025em; }
.week-date b { font-weight: 600; }
.week-title { text-align: center; }
.week-range, .filters-link i, .trainer i { color: var(--brand); }
.filters-link { cursor: pointer; }
.filter-summary { margin-left: 12px; color: var(--muted); font-size: 13px; }
.filters-panel { display: none; margin-bottom: 16px; padding: 18px; border: 1px solid var(--line); border-radius: 15px; background: var(--paper); }
.filters-panel.show { display: block; }
.schedule { overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); box-shadow: 0 14px 45px rgba(77, 49, 28, .045); }
.day-title {
  min-height: 40px; padding: 10px 16px; border-left: 4px solid var(--brand);
  border-top: 1px solid var(--line); background: var(--soft); color: var(--brand-dark);
  font: 600 14px/20px Inter, Arial, sans-serif;
}
.day-title:first-child { border-top: 0; }
.class-row {
  display: grid; grid-template-columns: 118px minmax(0, 2.4fr) minmax(100px, .9fr) 55px 50px 112px;
  align-items: center; min-height: 52px; padding: 0 14px; gap: 10px;
  border-bottom: 1px solid #eee4d7; border-left: 4px solid transparent;
  background: var(--paper); transition: background-color .2s, border-color .2s;
}
.class-row:hover { background: #f8f0e5; border-left-color: var(--brand-soft); }
.class-row:last-child { border-bottom: 0; }
.class-row.waiting { border-left-color: #b69055; }
.class-row > div, .class-row > span { min-width: 0; }
.class-time { grid-column: 1; white-space: nowrap; color: var(--brand-dark); font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.class-name { grid-column: 2; font: 600 13px/1.35 Inter, Arial, sans-serif; color: var(--ink); }
.trainer { grid-column: 3; color: var(--muted); font-size: 12px; }
.trainer i { margin-right: 7px; }
.price { grid-column: 4; font-weight: 600; font-size: 13px; white-space: nowrap; }
.class-info { grid-column: 5; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.book, .nonbookable { grid-column: 6; justify-self: end; text-align: center; }
.book {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 31px; min-width: 106px; padding: 6px 10px; border-radius: 100px;
  background: var(--brand); color: var(--paper); text-decoration: none;
  font-size: 11px; font-weight: 600; cursor: pointer; white-space: nowrap;
  transition: background-color .2s, transform .2s;
}
.book:hover { background: var(--brand-dark); color: var(--paper); transform: translateY(-2px); }
.class-row.unavailable, .class-row.unavailable:hover { border-left-color: #e1d7ca; background: #f3ede4; color: #84786d; }
.class-row.unavailable .class-name, .class-row.unavailable .class-time, .class-row.unavailable .trainer i { color: #84786d; }
.nonbookable { color: #776b61; font-size: 12px; font-weight: 600; white-space: nowrap; }
.empty-week { margin: 0; padding: 64px 20px; color: var(--muted); text-align: center; }
.choose-btn, .booking-submit {
  border: 0; border-radius: 10px; background: var(--brand); color: var(--paper);
  font-weight: 700; cursor: pointer; transition: background-color .2s;
}
.choose-btn:hover, .booking-submit:hover { background: var(--brand-dark); }
.choose-btn { min-height: 38px; padding: 0 18px; }
.footer {
  position: relative; display: flex; align-items: center; justify-content: flex-end; gap: 12px;
  min-height: 54px; padding: 14px max(24px, calc((100vw - 1272px) / 2));
  border-top: 1px solid var(--line); background: var(--paper-deep); color: var(--muted);
  font: 11px/1.4 Inter, Arial, sans-serif;
}
.footer > div:first-child { margin-right: auto; }
.footer a { color: var(--brand-dark); }
.booking-dialog {
  width: min(520px, calc(100vw - 32px)); max-width: none; max-height: min(720px, calc(100dvh - 32px));
  margin: auto; padding: 0; overflow: auto; border: 1px solid var(--line);
  border-radius: 20px; background: var(--paper); color: var(--ink);
  box-shadow: 0 28px 80px rgba(35, 22, 14, .27);
}
.booking-dialog::backdrop { background: rgba(35, 25, 17, .62); }
.booking-shell { display: flex; flex-direction: column; padding: 30px; }
.booking-head { position: relative; padding: 0 35px 14px 0; border-bottom: 1px solid var(--line); }
.booking-title { margin: 0; font: 600 clamp(18px, 3vw, 22px)/1.25 Inter, Arial, sans-serif; color: var(--brand-dark); }
.dialog-close {
  position: absolute; top: -9px; right: -9px; display: grid; place-items: center;
  width: 37px; height: 37px; padding: 0; border: 0; border-radius: 50%;
  background: var(--soft); color: var(--brand-dark); font: 24px/1 Inter, Arial, sans-serif;
  transition: background-color .2s;
}
.dialog-close:hover { background: var(--brand-soft); }
.booking-meta { margin: 16px 0 17px; color: var(--muted); font-size: 13px; line-height: 1.75; }
.booking-meta strong { color: var(--ink); font-weight: 700; }
.availability { display: flex; justify-content: center; align-items: center; min-height: 48px; margin: 0 0 14px; background: #e3eee1; color: var(--success); border-radius: 10px; }
.booking-form { display: flex; flex-direction: column; gap: 0; }
.field-label { display: block; margin: 10px 0 6px; color: var(--ink); font-size: 12px; font-weight: 700; }
.booking-input, .booking-select {
  width: 100%; min-height: 44px; padding: 9px 13px; border: 1px solid #cdbba8;
  border-radius: 9px; outline: none; background: #fffcf7; color: var(--ink); font: 14px/1.4 Inter, Arial, sans-serif;
}
.booking-input:focus, .booking-select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(128, 81, 53, .13); }
.booking-input.required-look { border-color: #bc9363; }
.booking-input.input-error { border-color: var(--danger); }
.field-error { min-height: 0; margin: 3px 0 4px; color: var(--danger); font-size: 12px; }
.field-error:empty { display: none; }
.required-note { color: var(--danger); font-size: 12px; }
.comment-label { color: var(--muted); font-size: 12px; }
.booking-submit { width: 100%; min-height: 46px; margin-top: 21px; font-size: 13px; }
.booking-submit:disabled { opacity: .6; cursor: wait; }
.form-message { display: none; margin: 12px 0; padding: 13px 15px; border-radius: 9px; font-size: 13px; }
.form-message.success { display: block; background: #e2eddf; color: #31563e; }
.form-message.error { display: block; background: #f4e3db; color: #873d2d; }
.review-prompt { width: min(100%, 500px); margin: 14px auto 0; }
.review-prompt a, .review-prompt img { display: block; width: 100%; height: auto; }
.bi { display: inline-block; width: 1em; height: 1em; vertical-align: -.125em; background: currentColor; mask-repeat: no-repeat; mask-position: center; mask-size: contain; -webkit-mask-repeat: no-repeat; -webkit-mask-position: center; -webkit-mask-size: contain; }
.bi-chevron-left { mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M11 1.5 4.5 8l6.5 6.5-1 1L2.5 8 10 .5z'/%3E%3C/svg%3E"); -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M11 1.5 4.5 8l6.5 6.5-1 1L2.5 8 10 .5z'/%3E%3C/svg%3E"); }
.bi-chevron-right { mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m5 1.5 6.5 6.5L5 14.5l1 1L13.5 8 6 .5z'/%3E%3C/svg%3E"); -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m5 1.5 6.5 6.5L5 14.5l1 1L13.5 8 6 .5z'/%3E%3C/svg%3E"); }
.bi-person-fill { mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 14s-1 0-1-1 1-4 6-4 6 3 6 4-1 1-1 1zm5-6a3 3 0 1 0 0-6 3 3 0 0 0 0 6'/%3E%3C/svg%3E"); -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 14s-1 0-1-1 1-4 6-4 6 3 6 4-1 1-1 1zm5-6a3 3 0 1 0 0-6 3 3 0 0 0 0 6'/%3E%3C/svg%3E"); }
.bi-filter-left { mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M2 10.5a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 0 1h-3a.5.5 0 0 1-.5-.5m0-3a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 0 1h-7a.5.5 0 0 1-.5-.5m0-3a.5.5 0 0 1 .5-.5h11a.5.5 0 0 1 0 1h-11a.5.5 0 0 1-.5-.5'/%3E%3C/svg%3E"); -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M2 10.5a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 0 1h-3a.5.5 0 0 1-.5-.5m0-3a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 0 1h-7a.5.5 0 0 1-.5-.5m0-3a.5.5 0 0 1 .5-.5h11a.5.5 0 0 1 0 1h-11a.5.5 0 0 1-.5-.5'/%3E%3C/svg%3E"); }
@media (max-width: 991.98px) {
  .class-row { grid-template-columns: 96px minmax(0, 2.2fr) minmax(75px, .8fr) 47px 37px 98px; padding: 0 9px; gap: 6px; }
  .class-name { font-size: 12px; }
  .book { min-width: 94px; padding-inline: 7px; }
}
@media (max-width: 767.98px) {
  .topbar { height: 64px; }
  .header-logo { height: 43px; max-width: 34vw; }
  .outline-nav { min-height: 33px; padding-inline: 11px; font-size: 10px; }
  .calendar-wrap { padding: 82px 13px 40px; }
  .toolbar { margin-bottom: 12px; padding-bottom: 12px; }
  .toolbar-top { gap: 12px 0; }
  .toolbar-top > div:first-child { order: 2 !important; width: 100%; text-align: center; }
  .toolbar-top > div:first-child b { font-size: 20px; }
  .toolbar-top > div:nth-child(2) { order: 1 !important; width: 100%; }
  .week-date { min-width: 0; font-size: 12px; }
  .schedule { border-radius: 15px; }
  .day-title { min-height: 38px; padding: 9px 13px; font-size: 13px; }
  .class-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
    grid-template-rows: auto auto auto; gap: 2px 9px; min-height: 98px;
    padding: 10px 12px; border-left-width: 3px;
  }
  .class-time { grid-column: 1; grid-row: 1; font-size: 12px; }
  .class-name { grid-column: 2; grid-row: 1; align-self: center; font-size: 13px; }
  .price { grid-column: 1; grid-row: 2; align-self: center; }
  .trainer { grid-column: 2; grid-row: 2; align-self: center; font-size: 12px; }
  .class-info { grid-column: 1; grid-row: 3; align-self: center; }
  .book, .nonbookable { grid-column: 2; grid-row: 3; justify-self: start; }
  .book { min-height: 30px; }
  .booking-dialog { width: calc(100vw - 20px); max-height: calc(100dvh - 20px); }
  .booking-shell { padding: 22px 18px; }
  .footer { flex-wrap: wrap; padding: 14px; font-size: 11px; }
}
@media (max-width: 390px) {
  .topbar { padding-inline: 8px !important; }
  .outline-nav { padding-inline: 8px; font-size: 9px; }
  .week-date { font-size: 12px; }
  .class-row { grid-template-columns: 39% 61%; gap: 2px 0; padding-inline: 10px; }
  .class-name { font-size: 12px; }
  .book { min-width: 0; font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: .01ms !important; } }