/* "Certificate of mastery": warm bone paper, near-black ink, and one oxblood
   accent for primary actions. Fraunces for display type, DM Sans for the UI.
   This matches the design first built in Lovable. */
:root {
  --radius: 0.25rem;
  --paper: oklch(0.965 0.014 85);
  --paper-90: oklch(0.965 0.014 85 / 0.9);
  --paper-95: oklch(0.965 0.014 85 / 0.95);
  --ink: oklch(0.19 0.012 60);
  --rule: oklch(0.19 0.012 60 / 0.18);
  --card: oklch(0.982 0.009 85);
  --primary: oklch(0.38 0.115 22);
  --primary-90: oklch(0.38 0.115 22 / 0.9);
  --on-primary: oklch(0.975 0.01 85);
  --muted-fg: oklch(0.43 0.015 60);
  --accent: oklch(0.915 0.02 78);
  --accent-40: oklch(0.915 0.02 78 / 0.4);
  --destructive: oklch(0.5 0.17 27);
  --destructive-90: oklch(0.5 0.17 27 / 0.9);
  --success: oklch(0.45 0.08 150);
  --border: oklch(0.19 0.012 60 / 0.16);
  --input: oklch(0.19 0.012 60 / 0.28);
  --ring: oklch(0.38 0.115 22);
  --shadow-paper: 0 1px 0 oklch(1 0 0 / 0.6) inset, 0 18px 40px -28px oklch(0.19 0.012 60 / 0.35);
  --display: "Fraunces", ui-serif, Georgia, serif;
  --sans: "DM Sans", ui-sans-serif, system-ui, sans-serif;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; border-color: var(--border); }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1rem/1.5 var(--sans);
  font-feature-settings: "ss01";
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { margin: 0; font-family: var(--display); font-optical-sizing: auto; font-weight: 400; letter-spacing: -0.01em; }
p { margin: 0; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
/* Headings that render() moves focus to after a page or step change: focusable, but not controls. */
[data-focus]:focus { outline: none; }
[hidden] { display: none !important; }

.container { width: 100%; max-width: 64rem; margin: 0 auto; padding-left: 1.25rem; padding-right: 1.25rem; }
.container.wide { max-width: 48rem; }
.narrow { width: 100%; max-width: 36rem; margin: 0 auto; padding: 2rem 1.25rem 4rem; }
main h1 { font-size: 1.875rem; line-height: 2.25rem; }

/* Typography helpers */
.eyebrow {
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted-fg);
}
.eyebrow.ink { color: var(--ink); }
.display-italic { font-family: var(--display); font-style: italic; font-variation-settings: "SOFT" 100, "WONK" 1; }
.muted { color: var(--muted-fg); }
.small { font-size: 0.875rem; line-height: 1.25rem; }
.tiny { font-size: 0.75rem; line-height: 1rem; }
.pre { white-space: pre-line; }
.underline { text-decoration: underline; text-underline-offset: 4px; }
.leader { flex: 1 1 auto; min-width: 1rem; border-bottom: 1px dotted var(--rule); transform: translateY(-0.3em); }
.gap { margin-top: 1.5rem; }
.gap-sm { margin-top: 1rem; }
.error { margin-top: 1rem; color: var(--destructive); font-size: 0.875rem; font-weight: 500; }
.note { font-size: 0.875rem; color: var(--muted-fg); }
.empty { padding: 1.5rem 0; color: var(--muted-fg); }

/* Double hairline frame, like a printed certificate */
.certificate, .card, .panel {
  position: relative;
  border: 1px solid var(--rule);
  background: var(--card);
  box-shadow: var(--shadow-paper);
}
.certificate::before, .card::before, .panel::before {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid var(--rule);
  pointer-events: none;
}

.rule-label { display: flex; align-items: center; gap: 1rem; }
.rule-label::before, .rule-label::after { content: ""; height: 1px; flex: 1; background: var(--rule); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 2.5rem;
  padding: 0 1rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: var(--primary);
  color: var(--on-primary);
  font: 500 0.875rem/1.25rem var(--sans);
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.btn:hover { background: var(--primary-90); }
.btn.lg { height: 2.75rem; padding: 0 2rem; }
.btn.sm, .btn.small { height: 2.25rem; padding: 0 0.75rem; }
.btn.outline, .btn.quiet { background: var(--paper); border-color: var(--input); color: var(--ink); }
.btn.outline:hover, .btn.quiet:hover { background: var(--accent); }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--accent); }
.btn.danger { background: var(--destructive); color: var(--on-primary); }
.btn.danger:hover { background: var(--destructive-90); }
.btn.block { display: flex; width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid var(--rule);
  background: var(--paper-90);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  padding-top: env(safe-area-inset-top, 0px);
}
.site-header .bar { display: flex; height: 4rem; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: flex; min-width: 0; flex-direction: column; line-height: 1; text-decoration: none; }
.brand-name {
  overflow: hidden;
  font-family: var(--display);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.brand .eyebrow { margin-top: 0.25rem; font-size: 0.6rem; }

/* Hero */
.hero { padding-top: 3rem; padding-bottom: 4rem; }
.hero-name { margin-top: 1.25rem; font-size: 3.4rem; line-height: 0.92; font-weight: 500; overflow-wrap: anywhere; }
.hero-name.mid { font-size: 2.75rem; }
.hero-name.long { font-size: 2.1rem; line-height: 1; }
.byline { margin-top: 2rem; display: flex; align-items: center; gap: 1rem; }
.byline-rule { flex: none; width: 2.5rem; height: 1px; background: var(--ink); }
.byline p { font-size: 1.125rem; line-height: 1.75rem; }
.byline-name { font-weight: 600; }
.byline-title { font-size: 1.25rem; }
.tagline { margin-top: 1.5rem; max-width: 28rem; font-size: 1.125rem; line-height: 1.75rem; color: var(--muted-fg); }
.hero-actions { margin-top: 2.5rem; display: flex; flex-direction: column; gap: 0.75rem; }
.mine { margin-top: 2.5rem; display: grid; gap: 0.75rem; }
.mine-card { display: block; padding: 1.25rem 1.5rem; text-decoration: none; }
.mine-card > span { display: block; }
.mine-title { margin-top: 0.5rem; font-family: var(--display); font-size: 1.25rem; line-height: 1.75rem; }
.mine-link { margin-top: 0.5rem; color: var(--primary); font-weight: 500; text-decoration: underline; text-underline-offset: 4px; }

/* Sections */
.section { padding-top: 3.5rem; padding-bottom: 3.5rem; }
#services { scroll-margin-top: 5rem; }
.section-title { margin-top: 2rem; font-size: 2.25rem; line-height: 2.5rem; }
.section-title.tight { margin-top: 0; }
.menu-grid { margin-top: 2.5rem; display: grid; gap: 3rem; }
.menu-list { margin: 1rem 0 0; padding: 0; list-style: none; }
.menu-list li { border-bottom: 1px solid var(--rule); }
.menu-list li:last-child { border-bottom: 0; }
.menu-item {
  display: block;
  width: 100%;
  padding: 1rem 0;
  border: 0;
  background: none;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.15s ease;
}
.menu-item:hover, .menu-item:focus-visible { background: var(--accent-40); }
.menu-line { display: flex; align-items: baseline; gap: 0.75rem; }
.menu-name, .menu-price { font-family: var(--display); font-size: 1.125rem; line-height: 1.75rem; }
.menu-price { font-variant-numeric: tabular-nums; }
.menu-meta { display: block; margin-top: 0.25rem; font-size: 0.875rem; line-height: 1.25rem; color: var(--muted-fg); }

.about-grid { margin-top: 2.5rem; display: grid; gap: 2.5rem; align-items: center; }
.portrait { margin: 0 auto; display: flex; width: 100%; max-width: 280px; aspect-ratio: 4 / 5; align-items: center; justify-content: center; }
.portrait span { font-size: 6rem; line-height: 1; color: var(--primary); }
.about-title { margin-top: 0.5rem; font-size: 1.125rem; color: var(--muted-fg); }
.bio { margin-top: 1.5rem; max-width: 65ch; line-height: 1.625; white-space: pre-line; }

.two-col { display: grid; gap: 3rem; }
.hours { margin: 1.5rem 0 0; padding: 0; list-style: none; }
.hours li { display: flex; align-items: baseline; gap: 0.75rem; padding: 0.75rem 0; border-bottom: 1px solid var(--rule); }
.hours li:last-child { border-bottom: 0; }
.hours-day { flex: none; width: 7rem; }
.tabular { font-variant-numeric: tabular-nums; }
.visit { margin-top: 1.5rem; display: grid; gap: 0.5rem; }
.visit-address { font-family: var(--display); font-size: 1.25rem; line-height: 1.75rem; }
.policy { margin-top: 2rem; padding: 1.5rem; }
.policy p + p { margin-top: 0.75rem; font-size: 0.875rem; line-height: 1.625; white-space: pre-line; }

/* Footer */
.site-footer { border-top: 1px solid var(--rule); }
.footer-inner { padding-top: 3rem; padding-bottom: 3rem; }
.footer-name { font-family: var(--display); font-size: 1.5rem; line-height: 2rem; }
.footer-list { margin: 1.5rem 0 0; padding: 0; list-style: none; display: grid; gap: 0.75rem; font-size: 0.875rem; }
.footer-list li { display: flex; align-items: flex-start; gap: 0.75rem; }
.footer-list a, .footer-base a { text-decoration: none; text-underline-offset: 4px; }
.footer-list a:hover { text-decoration: underline; }
.footer-base a:hover { color: var(--ink); }
.icon { flex: none; width: 1rem; height: 1rem; margin-top: 0.125rem; }
.footer-base {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--muted-fg);
}

/* Sticky booking bar on phones */
.home { padding-bottom: 6rem; }
.bookbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  border-top: 1px solid var(--rule);
  background: var(--paper-95);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  padding: 0.75rem;
  padding-bottom: max(0.75rem, env(safe-area-inset-bottom, 0px));
}

/* Booking flow */
.progress { display: flex; gap: 0.375rem; }
.progress span { height: 0.25rem; flex: 1; background: var(--rule); }
.progress span.on { background: var(--primary); }
.step-row { margin-top: 0.75rem; min-height: 2.25rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.pick-list { margin: 1.5rem 0 0; padding: 0; list-style: none; display: grid; gap: 0.5rem; }
.pick { display: flex; width: 100%; align-items: baseline; gap: 0.75rem; padding: 1.25rem; text-align: left; cursor: pointer; }
.pick-name, .pick-price { font-family: var(--display); font-size: 1.125rem; line-height: 1.75rem; }
.pick-name, .pick-meta { display: block; }
.pick-meta { font-size: 0.875rem; color: var(--muted-fg); }
.date-grid { margin-top: 1.5rem; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.5rem; }
.date {
  display: flex;
  min-height: 4rem;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--card);
  font-size: 0.875rem;
  cursor: pointer;
}
.date:disabled { opacity: 0.3; cursor: not-allowed; }
.date-wd { font-size: 0.75rem; line-height: 1rem; }
.date-day { font-family: var(--display); font-size: 1.125rem; line-height: 1.75rem; }
.date-mo { font-size: 0.65rem; }
.step-title { margin-top: 1.5rem; font-size: 1.5rem; line-height: 2rem; }
.time-grid { margin-top: 1rem; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.5rem; }
.time {
  height: 3rem;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--card);
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}
.date[aria-pressed="true"], .time[aria-pressed="true"] { border-color: var(--primary); background: var(--primary); color: var(--on-primary); }
.summary { padding: 1.5rem; display: grid; gap: 0.75rem; }
.summary-title { font-family: var(--display); font-size: 1.5rem; line-height: 2rem; }
.stack { margin-top: 1.5rem; display: grid; gap: 0.5rem; }
.stack .tiny { margin-top: 0.5rem; }

/* Appointment page: confirmation after booking, and the client's manage page */
.confirm-head { display: grid; gap: 0.5rem; }
.confirm-head.fresh { justify-items: center; text-align: center; padding-top: 0.5rem; }
.success-mark {
  display: inline-flex;
  width: 4rem;
  height: 4rem;
  margin-bottom: 0.5rem;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: oklch(0.45 0.08 150 / 0.12);
  color: var(--success);
  animation: success-pop 0.4s ease-out both;
}
.success-mark .icon { width: 2rem; height: 2rem; margin: 0; stroke-width: 2.5; }
.success-text { color: var(--success); }
main .confirm-title { font-size: 2rem; line-height: 2.5rem; }
.confirm-sub { max-width: 26rem; color: var(--muted-fg); text-wrap: balance; }
.summary.faded { opacity: 0.7; }
.details { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 0.5rem 1rem; font-size: 0.9375rem; }
.details dt { padding-top: 0.15rem; color: var(--muted-fg); font-size: 0.7rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; }
.details dd { margin: 0; overflow-wrap: anywhere; }
.confirm-section { margin-top: 2rem; font-size: 1.25rem; line-height: 1.75rem; }
.cal-row { margin-top: 0.75rem; display: grid; gap: 0.5rem; }
.cal-row .icon, .keep-note .icon { margin-top: 0; }
.keep-note {
  margin-top: 1rem;
  padding: 1rem;
  display: grid;
  gap: 0.75rem;
  justify-items: start;
  border: 1px dashed var(--rule);
  border-radius: var(--radius);
  font-size: 0.875rem;
  line-height: 1.25rem;
}
.keep-note .btn { margin-left: -0.75rem; }
.cancel-area { margin-top: 2.5rem; padding-top: 1.25rem; display: grid; justify-items: center; gap: 0.25rem; border-top: 1px solid var(--rule); text-align: center; }
.btn.text-danger { color: var(--destructive); text-decoration: underline; text-underline-offset: 4px; }
@keyframes success-pop {
  from { opacity: 0; transform: scale(0.6); }
  to { opacity: 1; transform: none; }
}
@media (min-width: 480px) {
  .cal-row { grid-template-columns: 1fr 1fr; }
}

/* Forms */
.form { margin-top: 1.5rem; }
label.field { display: block; margin-bottom: 1rem; font-size: 0.875rem; font-weight: 500; }
label.field > span:first-child { display: block; }
label.field .hint { color: var(--muted-fg); font-weight: 400; }
input:not([type="checkbox"]), select, textarea {
  display: block;
  width: 100%;
  min-height: 3rem;
  margin-top: 0.25rem;
  padding: 0.6rem 0.85rem;
  border: 1px solid var(--input);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--ink);
  font: 400 1rem/1.5 var(--sans);
}
textarea { min-height: 5.5rem; resize: vertical; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--ring); outline-offset: 1px; }
input[type="checkbox"] { width: 1.25rem; height: 1.25rem; margin: 0; accent-color: var(--primary); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(5.5rem + env(safe-area-inset-bottom, 0px));
  z-index: 50;
  max-width: calc(100% - 2rem);
  transform: translateX(-50%);
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: var(--card);
  color: var(--ink);
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: 0 10px 30px -12px oklch(0.19 0.012 60 / 0.35);
}

/* Owner dashboard */
.auth { max-width: 24rem; padding-top: 3rem; }
.auth h1 + p { margin-top: 0.75rem; color: var(--muted-fg); }
.auth form, .auth .actions { margin-top: 1.5rem; }
.tabs-bar { border-bottom: 1px solid var(--rule); }
.tabs { display: flex; gap: 0.25rem; overflow-x: auto; }
.tab {
  flex: none;
  margin-bottom: -1px;
  padding: 0.85rem 0.75rem;
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  color: var(--muted-fg);
  font: 500 0.875rem/1.25rem var(--sans);
  cursor: pointer;
}
.tab[aria-selected="true"] { border-bottom-color: var(--primary); color: var(--ink); }
.dash { padding-top: 2rem; padding-bottom: 4rem; }
.dash h1 + .note { margin-top: 0.5rem; }
.dash > form { margin-top: 1.5rem; }
.dash .section { margin-top: 1.5rem; padding: 0; }
.actions { margin-top: 0.75rem; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.daynav { margin-bottom: 1rem; display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.daynav input { width: auto; min-width: 9rem; min-height: 2.25rem; flex: 1; margin-top: 0; padding: 0.25rem 0.6rem; }
.week { margin-bottom: 1.5rem; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0.375rem; }
.week button {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.5rem 0.125rem;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--card);
  cursor: pointer;
}
.week b { font-size: 0.7rem; font-weight: 500; color: var(--muted-fg); }
.week span { font-family: var(--display); font-size: 1.125rem; line-height: 1.5rem; }
.week small { min-height: 1rem; font-size: 0.7rem; font-weight: 600; color: var(--primary); }
.week button[aria-pressed="true"] { border-color: var(--primary); background: var(--primary); color: var(--on-primary); }
.week button[aria-pressed="true"] b, .week button[aria-pressed="true"] small { color: var(--on-primary); }
.card { margin: 0 0 0.75rem; padding: 1.25rem; }
.card.cancelled { opacity: 0.6; }
.card.block { background: transparent; box-shadow: none; border-style: dashed; }
.card.block::before { border-style: dashed; }
.card-title { margin-top: 0.25rem; font-family: var(--display); font-size: 1.25rem; line-height: 1.75rem; }
.card-line { margin-top: 0.25rem; font-size: 0.875rem; }
.status.booked { color: var(--primary); }
.status.completed { color: var(--success); }
.panel { margin: 0 0 1.25rem; padding: 1.5rem; }
.panel h3 { margin-bottom: 1rem; font-size: 1.25rem; line-height: 1.75rem; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.check { margin-bottom: 1rem; display: flex; align-items: center; gap: 0.625rem; font-size: 0.875rem; font-weight: 500; }
.hours-edit { display: grid; gap: 0.5rem; }
.hours-edit .row { display: grid; grid-template-columns: 6rem 1fr 1fr; gap: 0.5rem; align-items: center; }
.hours-edit .row label { display: flex; align-items: center; gap: 0.5rem; font-size: 0.875rem; font-weight: 500; }
.hours-edit input[type="time"] { min-height: 2.75rem; margin-top: 0; padding: 0.4rem 0.6rem; }
h2.sub { margin: 2.5rem 0 1rem; font-size: 1.5rem; line-height: 2rem; }
h2.sub:first-child { margin-top: 0; }
.search { margin: 1rem 0; }
.history { margin: 0.75rem 0; padding: 0; list-style: none; }
.history li { padding: 0.4rem 0; border-bottom: 1px solid var(--rule); font-size: 0.875rem; }
.site-header .actions { margin-top: 0; flex-wrap: nowrap; }
/* Date and time inputs have a wide minimum size in desktop Chrome: let the columns
   shrink below it, and stack the hours under each day on narrow screens. */
.pair { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.hours-edit .row { grid-template-columns: 6rem minmax(0, 1fr) minmax(0, 1fr); }
.pair input, .hours-edit input[type="time"] { min-width: 0; }
@media (max-width: 479.98px) {
  .hours-edit .row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .hours-edit .row label { grid-column: 1 / -1; }
}

@media (min-width: 640px) {
  .hero-name { font-size: 4.5rem; }
  .hero-name.mid { font-size: 3.75rem; }
  .hero-name.long { font-size: 2.75rem; }
  .hero-actions { flex-direction: row; }
  .date-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); }
}
@media (min-width: 768px) {
  .hero { padding-top: 5rem; }
  .hero-name { font-size: 6rem; }
  .hero-name.mid { font-size: 4.5rem; }
  .hero-name.long { font-size: 3.25rem; }
  .menu-grid, .two-col { grid-template-columns: 1fr 1fr; }
  .about-grid { grid-template-columns: 280px 1fr; }
  .home { padding-bottom: 0; }
  .bookbar { display: none; }
  .toast { left: auto; right: 1.5rem; bottom: 1.5rem; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .btn, .menu-item { transition: none; }
  .success-mark { animation: none; }
}
