@font-face {
  font-family: "Arimo";
  src: url("fonts/arimo-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Arimo";
  src: url("fonts/arimo-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #111111;
  --card: #151515;
  --line: #2a2a2a;
  --edge: #3a3a3a;
  --tile: #232323;
  --tile-hover: #2e2e2e;
  --text: #ffffff;
  --muted: #a3a3a3;
  --faint: #6e6e6e;
  --green: #154734;
  --green-hover: #1c5a43;
  --gold: #ffb81c;
  --radius: 10px;
  --tap: 44px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Arimo", "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
h1, h2, h3, p { margin: 0; }
a { color: var(--text); }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.preview-tag {
  align-self: center;
  margin: 12px 0 0;
  padding: 4px 12px;
  border: 1px solid var(--gold);
  border-radius: 999px;
  color: var(--gold);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

/* ---------- layout ---------- */
.card {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  padding: 24px 20px 8px;
  display: grid;
  grid-template-areas: "top" "book" "bottom";
  row-gap: 28px;
}
.who-top { grid-area: top; }
.book { grid-area: book; min-width: 0; }
.who-bottom { grid-area: bottom; }

h1 { font-size: 28px; line-height: 1.15; font-weight: 700; letter-spacing: -.01em; }
.role { color: var(--muted); font-size: 17px; margin-top: 4px; }
.contact { display: flex; flex-wrap: wrap; column-gap: 20px; margin-top: 6px; }
.contact a, .links a {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  text-decoration: none;
  font-size: 17px;
}
.contact a:hover, .links a:hover { text-decoration: underline; text-underline-offset: 3px; }

.office { font-style: normal; color: var(--muted); font-size: 16px; line-height: 1.5; }
.links { display: flex; flex-wrap: wrap; column-gap: 22px; margin-top: 10px; }
.links:empty { display: none; }
.links a { font-size: 16px; }

.foot { margin: auto 0 0; padding: 12px 20px calc(16px + env(safe-area-inset-bottom)); text-align: center; }
.foot a {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  padding: 0 8px;
  color: var(--faint);
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .24em;
}
.foot a:hover { color: var(--muted); }

/* ---------- booking head ---------- */
.book-head { display: flex; flex-direction: column; gap: 12px; }
h2 { font-size: 20px; font-weight: 700; }
.seg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 4px;
  border: 1px solid var(--edge);
  border-radius: 12px;
  gap: 4px;
}
.seg button {
  min-height: var(--tap);
  border: 0;
  border-radius: 8px;
  background: transparent;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}
.seg button[aria-checked="true"] { background: var(--text); color: #000; }
.seg button[aria-checked="false"]:hover { background: var(--tile); }
.meta { color: var(--muted); margin-top: 10px; }
.notice { margin-top: 12px; padding: 10px 12px; border: 1px solid var(--edge); border-radius: var(--radius); }

/* ---------- days: phone chips ---------- */
.picker { margin-top: 18px; }
.chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  padding: 2px 2px 8px;
  margin: 0 -2px;
  scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 74px;
  min-height: 78px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  border: 1px solid var(--edge);
  border-radius: 12px;
  background: var(--tile);
  cursor: pointer;
  scroll-snap-align: start;
}
.chip .c-dow { font-size: 14px; color: var(--muted); }
.chip .c-num { font-size: 22px; font-weight: 700; line-height: 1.1; }
.chip .c-open { font-size: 14px; color: var(--muted); }
.chip:hover { background: var(--tile-hover); }
.chip[aria-pressed="true"] { background: var(--text); color: #000; border-color: var(--text); }
.chip[aria-pressed="true"] .c-dow, .chip[aria-pressed="true"] .c-open { color: #333; }

/* ---------- days: desktop month ---------- */
.month { display: none; }
.month-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.month-head h3 { font-size: 17px; font-weight: 700; }
.month-nav { display: flex; gap: 4px; }
.icon-btn {
  width: var(--tap); height: var(--tap);
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: 8px; background: transparent; cursor: pointer;
}
.icon-btn:hover:not(:disabled) { background: var(--tile); }
.icon-btn:disabled { color: #444; cursor: default; }
.dow, .grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.dow span { text-align: center; font-size: 14px; color: var(--muted); padding: 4px 0; }
.day {
  aspect-ratio: 1;
  min-height: var(--tap);
  display: flex; align-items: center; justify-content: center;
  border: 0; border-radius: 8px;
  background: transparent;
  color: var(--faint);
  font-size: 16px;
}
.day.open { background: var(--tile); color: var(--text); font-weight: 700; cursor: pointer; }
.day.open:hover { background: var(--tile-hover); }
.day.open[aria-pressed="true"] { background: var(--text); color: #000; }
.day.blank { visibility: hidden; }

/* ---------- times ---------- */
.times { margin-top: 18px; }
.day-title { font-size: 17px; font-weight: 700; }
.group-label {
  margin: 16px 0 8px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
.slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.slot {
  min-height: 48px;
  border: 1px solid var(--edge);
  border-radius: var(--radius);
  background: transparent;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  font-variant-numeric: tabular-nums;
}
.slot:hover { border-color: var(--text); }
.slot[aria-pressed="true"] { background: var(--text); color: #000; border-color: var(--text); }
.tz { color: var(--muted); margin-top: 14px; font-size: 16px; }

/* loading placeholders */
.sk { background: #1c1c1c !important; border-color: #1c1c1c !important; cursor: default; animation: pulse 1.4s ease-in-out infinite; }
.slot.sk { display: block; }
@keyframes pulse { 50% { opacity: .55; } }
@media (prefers-reduced-motion: reduce) { .sk { animation: none; } .screen-form { animation: none !important; } }

.state { margin-top: 18px; padding: 18px; border: 1px solid var(--line); border-radius: 12px; }
.state-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.btn-line {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: var(--tap);
  padding: 0 18px;
  border: 1px solid var(--edge);
  border-radius: var(--radius);
  background: transparent;
  text-decoration: none;
  font-weight: 700;
  cursor: pointer;
}
.btn-line:hover { border-color: var(--text); }

/* ---------- form ---------- */
.screen-form { animation: rise .22s ease-out; padding-bottom: 96px; }
/* opacity only: a transform here would pin the fixed Book bar to the form, not the screen */
@keyframes rise { from { opacity: 0; } to { opacity: 1; } }
.back {
  display: inline-flex; align-items: center; gap: 4px;
  min-height: var(--tap);
  padding: 0 10px 0 4px;
  margin-left: -4px;
  border: 0; border-radius: 8px;
  background: transparent; cursor: pointer; font-weight: 700;
}
.back:hover { background: var(--tile); }
.summary { margin: 12px 0 22px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.sum-line { font-size: 18px; font-weight: 700; }
.sum-place { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--muted); }
.link-btn {
  min-height: var(--tap);
  padding: 0 4px;
  border: 0; background: transparent;
  color: var(--text); text-decoration: underline; text-underline-offset: 3px;
  cursor: pointer;
}
.field { display: block; margin-bottom: 16px; font-weight: 700; }
.field input, .field textarea {
  display: block;
  width: 100%;
  margin-top: 6px;
  min-height: 48px;
  padding: 11px 12px;
  border: 1px solid var(--edge);
  border-radius: var(--radius);
  background: #1a1a1a;
  color: var(--text);
  font: 400 16px/1.4 "Arimo", "Helvetica Neue", Helvetica, Arial, sans-serif;
}
.field textarea { resize: vertical; min-height: 84px; }
.field input:focus-visible, .field textarea:focus-visible { outline: 2px solid var(--gold); outline-offset: 0; border-color: transparent; }
.field input[aria-invalid="true"] { border-color: #e5484d; }
.err { display: block; min-height: 0; margin-top: 4px; color: #ff8f8f; font-weight: 400; font-size: 16px; }
.err:empty { display: none; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.ts:empty { display: none; }
.ts { margin-bottom: 12px; }
.form-error { margin-bottom: 12px; padding: 12px; border: 1px solid #5a2a2a; border-radius: var(--radius); }
.form-error .state-actions { margin-top: 10px; }

.bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  padding: 12px 20px calc(12px + env(safe-area-inset-bottom));
  background: var(--bg);
  border-top: 1px solid var(--line);
  z-index: 5;
}
.book-btn {
  display: block;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  min-height: 52px;
  border: 0;
  border-radius: var(--radius);
  background: var(--green);
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
}
.book-btn:hover:not(:disabled) { background: var(--green-hover); }
.book-btn:disabled { opacity: .6; cursor: progress; }

/* ---------- done ---------- */
.screen-done { outline: none; }
.screen-done h2 { font-size: 24px; }
.done-when { font-size: 18px; font-weight: 700; margin-top: 14px; }
.done-where, .done-note { color: var(--muted); margin-top: 4px; }

/* phone: the form screen stands alone */
@media (max-width: 899px) {
  body.step-form .who-top, body.step-form .who-bottom, body.step-form .foot, body.step-form .preview-tag { display: none; }
  body.step-form .card { padding-top: 12px; }
}

/* ---------- desktop ---------- */
@media (min-width: 900px) {
  body { justify-content: center; }
  .card {
    max-width: 1040px;
    margin: 40px auto 0;
    padding: 0;
    grid-template-columns: 320px 1fr;
    grid-template-rows: auto 1fr;
    grid-template-areas: "top book" "bottom book";
    row-gap: 0;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 16px;
    min-height: 600px;
  }
  .who-top, .who-bottom { padding: 40px 36px 0; border-right: 1px solid var(--line); }
  .who-bottom { padding-top: 28px; padding-bottom: 36px; }
  h1 { font-size: 32px; }
  .contact { flex-direction: column; margin-top: 18px; }
  .links { flex-direction: column; margin-top: 18px; }
  .book { padding: 36px 36px 32px; }
  .book-head { flex-direction: row; align-items: center; justify-content: space-between; }
  .seg { width: 280px; }
  .chips { display: none; }
  .month { display: block; }
  .picker { display: grid; grid-template-columns: 1fr 200px; gap: 32px; margin-top: 22px; }
  .times { margin-top: 0; max-height: 500px; overflow-y: auto; padding-right: 4px; }
  .slots { grid-template-columns: 1fr; }
  .slot { min-height: 44px; }
  .group-label { margin-top: 14px; }
  .screen-form { padding-bottom: 0; animation: none; }
  .bar { position: static; padding: 8px 0 0; border: 0; background: none; display: flex; justify-content: flex-end; }
  .book-btn { width: auto; min-width: 180px; margin: 0; padding: 0 28px; }
  .field input, .field textarea { max-width: 520px; }
  .foot { margin-top: 16px; }
  .preview-tag { margin-top: 24px; }
}
