/* Site de agendamento: pensado para o celular, com o "cartão de horário" como peça central.
   As cores nascem da cor da marca de cada cliente (--accent, definida no painel). */
:root { --accent: #2f6f5e; --on-accent: #fff; }
body[data-theme="escuro"] {
  --bg: color-mix(in srgb, var(--accent) 14%, #17181c);
  --raised: color-mix(in srgb, var(--accent) 20%, #202126);
  --line: color-mix(in srgb, var(--accent) 22%, #3a3b42);
  --text: #f6f5f2;
  --muted: color-mix(in srgb, var(--accent) 12%, #b4b4b8);
  --card: #f6f3ec;
  --card-text: #1d1c1a;
}
body[data-theme="claro"] {
  --bg: color-mix(in srgb, var(--accent) 7%, #fff);
  --raised: #fff;
  --line: color-mix(in srgb, var(--accent) 22%, #d9d9de);
  --text: #1b1b1f;
  --muted: color-mix(in srgb, var(--accent) 16%, #64646c);
  --card: color-mix(in srgb, var(--accent) 12%, #1b1b1f);
  --card-text: #f6f5f2;
}
body[data-font="elegante"] { --title: "Gloock", Georgia, serif; --title-weight: 400; }
body[data-font="moderna"] { --title: "Bricolage Grotesque", system-ui, sans-serif; --title-weight: 800; }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.45 "Figtree", system-ui, sans-serif; -webkit-tap-highlight-color: transparent; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; text-align: inherit; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
main:focus { outline: none; }
h2 { margin: 0; font: var(--title-weight) clamp(30px, 8.6vw, 38px)/1.08 var(--title); letter-spacing: -.01em; }
h3 { margin: 0 0 8px; font-size: 17px; font-weight: 700; }

/* ---------- Marca ---------- */
.stage { position: relative; display: flex; flex-direction: column; justify-content: space-between; min-height: 38svh; padding: calc(14px + env(safe-area-inset-top)) 20px 44px; color: var(--on-accent); background: var(--accent); overflow: hidden; }
.stage.photo { color: #fff; background: #000 var(--cover) center / cover no-repeat; }
.stage.photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(rgb(0 0 0 / .35), transparent 30%, rgb(0 0 0 / .72)); }
.stage > * { position: relative; z-index: 1; }
.stage-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; }
.stage-top img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.my-link { margin-left: auto; min-height: 44px; padding: 0 16px; border: 1.5px solid currentColor; border-radius: 22px; font-size: 15px; font-weight: 600; }
.stage-name h1 { margin: 0; font: var(--title-weight) var(--name-size, 15vw)/.98 var(--title); letter-spacing: -.02em; overflow-wrap: anywhere; }
.stage-name p { margin: 10px 0 0; max-width: 32ch; font-size: 17px; }
body:not([data-view="home"]) .stage { display: none; }

#view { padding: 0 20px calc(116px + env(safe-area-inset-bottom)); }
.step { padding-top: calc(10px + env(safe-area-inset-top)); animation: enter .22s ease-out; }
.step.back { animation-name: enter-back; }
@keyframes enter { from { transform: translateX(28px); opacity: 0; } }
@keyframes enter-back { from { transform: translateX(-28px); opacity: 0; } }
.nav { display: flex; align-items: center; justify-content: space-between; min-height: 56px; margin: 0 -12px 6px; }
.back-btn { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; font-size: 26px; line-height: 1; }
.lead { margin: 6px 0 20px; color: var(--muted); }

/* ---------- O cartão de horário ---------- */
.ticket { --notch: 11px; position: relative; display: grid; grid-template-columns: 1fr auto; color: var(--card-text); background: var(--card); border-radius: 14px;
  -webkit-mask: radial-gradient(circle var(--notch) at var(--cut) 0, transparent 98%, #000) top / 100% 51% no-repeat, radial-gradient(circle var(--notch) at var(--cut) 100%, transparent 98%, #000) bottom / 100% 51% no-repeat;
  mask: radial-gradient(circle var(--notch) at var(--cut) 0, transparent 98%, #000) top / 100% 51% no-repeat, radial-gradient(circle var(--notch) at var(--cut) 100%, transparent 98%, #000) bottom / 100% 51% no-repeat;
  --cut: calc(100% - 112px); }
.ticket-main { min-width: 0; padding: 16px 18px; }
.ticket-main strong { display: block; font: var(--title-weight) 23px/1.15 var(--title); overflow-wrap: anywhere; }
.ticket-main span { display: block; margin-top: 4px; font-size: 15px; opacity: .78; }
.ticket-stub { display: grid; place-content: center; width: 112px; padding: 12px 6px; text-align: center; border-left: 2px dashed color-mix(in srgb, currentColor 32%, transparent); }
.ticket-stub b { font: var(--title-weight) 29px/1 var(--title); font-variant-numeric: tabular-nums; }
.ticket-stub small { margin-top: 4px; font-size: 14px; opacity: .78; }
.ticket.empty .ticket-stub b { opacity: .35; }
.ticket.stamped { animation: stamp .42s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes stamp { from { transform: scale(.9) rotate(-2.5deg); opacity: 0; } }

.home-ticket { position: relative; z-index: 2; margin: -28px 0 24px; width: 100%; text-align: left; }
.notice { margin: 0 0 24px; padding-left: 12px; border-left: 4px solid var(--accent); }

/* ---------- Serviços ---------- */
.rows { margin: 0 -20px; border-top: 1px solid var(--line); }
.row-btn { display: grid; grid-template-columns: 1fr auto; gap: 2px 16px; width: 100%; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.row-btn:active { background: var(--raised); }
.row-btn strong { font: var(--title-weight) 21px/1.2 var(--title); }
.row-btn .price { font-size: 18px; font-weight: 700; white-space: nowrap; }
.row-btn small { grid-column: 1 / -1; color: var(--muted); font-size: 15px; }
.time { display: inline-flex; align-items: center; gap: 5px; margin-right: 6px; white-space: nowrap; }
.clock { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Dia e hora ---------- */
.days { display: flex; gap: 8px; margin: 0 -20px 26px; padding: 2px 20px 6px; overflow-x: auto; scroll-snap-type: x proximity; scroll-padding-left: 20px; scrollbar-width: none; }
.days::-webkit-scrollbar { display: none; }
.day { flex: 0 0 66px; min-height: 84px; padding: 8px 2px; text-align: center; border: 1.5px solid var(--line); border-radius: 14px; scroll-snap-align: start; }
.day span { display: block; color: var(--muted); font-size: 14px; }
.day b { display: block; font: var(--title-weight) 27px/1.2 var(--title); }
.day[aria-pressed="true"] { color: var(--on-accent); background: var(--accent); border-color: var(--accent); }
.day[aria-pressed="true"] span { color: inherit; }
.day.full { border-style: dashed; }
.day.ended { opacity: .6; border-style: dashed; }
.day.ended span:last-child { font-size: 11px; }
.period { margin-bottom: 22px; }
.period h3 { color: var(--muted); font-size: 15px; font-weight: 600; }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.slot { min-height: 52px; text-align: center; font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; background: var(--raised); border: 1.5px solid var(--line); border-radius: 12px; }
.slot:active { color: var(--on-accent); background: var(--accent); }

/* ---------- Formulários e ações ---------- */
label { display: block; margin-bottom: 16px; font-size: 15px; font-weight: 600; }
input, textarea { display: block; width: 100%; margin-top: 6px; padding: 14px; font-size: 17px; font-weight: 400; background: var(--raised); border: 1.5px solid var(--line); border-radius: 12px; }
.hp { position: absolute; left: -9999px; }
.dock { position: fixed; z-index: 5; inset: auto 0 0 0; padding: 12px 20px calc(12px + env(safe-area-inset-bottom)); background: linear-gradient(transparent, var(--bg) 26%); }
.primary { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 56px; padding: 0 20px; color: var(--on-accent); text-align: center; text-decoration: none; font-size: 18px; font-weight: 700; background: var(--accent); border-radius: 14px; }
.primary:active { filter: brightness(.9); }
.primary:disabled { opacity: .6; }
.secondary { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 52px; margin-top: 10px; padding: 0 16px; text-decoration: none; font-weight: 600; border: 1.5px solid var(--line); border-radius: 14px; }
.quiet { min-height: 44px; font-size: 15px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.hint { margin: 10px 0 0; color: var(--muted); font-size: 15px; }

/* ---------- Informações e avaliações ---------- */
.block { margin-top: 30px; }
.about { margin: 0; white-space: pre-line; }
.info { margin: 8px 0 0; }
.info a, .info p { display: block; margin: 0; padding: 12px 0; border-bottom: 1px solid var(--line); text-decoration: none; }
.info a { font-weight: 600; }
.score { display: flex; align-items: baseline; gap: 10px; }
.score b { font: var(--title-weight) 44px/1 var(--title); }
.score span { color: var(--muted); font-size: 15px; }
.review { padding: 14px 0; border-bottom: 1px solid var(--line); }
.review p { margin: 4px 0 0; }
.stars { color: var(--accent); letter-spacing: 1px; }
body[data-theme="escuro"] .stars { color: color-mix(in srgb, var(--accent) 45%, #fff); }
.pick { display: flex; gap: 2px; margin: 4px 0 12px; }
.pick button { width: 48px; height: 48px; font-size: 30px; text-align: center; color: var(--line); }
.pick button.on { color: var(--accent); }
.past { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.past small { display: block; color: var(--muted); font-size: 14px; }
.mine + .mine { margin-top: 12px; }
.mine-actions { margin-top: 2px; text-align: right; }

.block > h2 { margin-bottom: 12px; font-size: 26px; }
.block.first { margin-top: 28px; }
.block .lead { margin: -6px 0 12px; }
.map { overflow: hidden; background: var(--raised); border: 1.5px solid var(--line); border-radius: 16px; }
.map iframe { display: block; width: 100%; height: 220px; border: 0; }
body[data-theme="escuro"] .map iframe { filter: invert(.92) hue-rotate(180deg) saturate(.75); }
.map-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; }
.map-foot p { margin: 0; min-width: 0; font-size: 15px; }
.map-go { flex: none; display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; color: var(--on-accent); text-decoration: none; font-size: 15px; font-weight: 700; background: var(--accent); border-radius: 12px; }
.status { margin: 0 0 8px; font-weight: 600; color: var(--muted); }
.status.on { color: var(--text); }
.status.on::before { content: ""; display: inline-block; width: 9px; height: 9px; margin-right: 8px; border-radius: 50%; background: #2fb36b; }
.hours { border-top: 1px solid var(--line); }
.hour { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; color: var(--muted); border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.hour span:first-child { text-transform: capitalize; }
.hour.today { color: var(--text); font-weight: 700; }
.contacts .secondary:first-child { margin-top: 0; }

.promos { display: flex; gap: 10px; margin: 0 -20px; padding: 2px 20px 6px; overflow-x: auto; scroll-snap-type: x proximity; scroll-padding-left: 20px; scrollbar-width: none; }
.promos::-webkit-scrollbar { display: none; }
.promo { flex: 0 0 min(78%, 280px); display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; min-height: 150px; padding: 16px; color: var(--on-accent); background: var(--accent); border-radius: 16px; scroll-snap-align: start; }
.promo.photo { color: #fff; background: linear-gradient(transparent 15%, rgb(0 0 0 / .78)), var(--promo) center / cover no-repeat; }
.promo strong { font: var(--title-weight) 23px/1.12 var(--title); overflow-wrap: anywhere; }
.promo span { font-size: 15px; }
.promo b { margin-top: 4px; font-size: 20px; }
.promo small { font-size: 14px; opacity: .85; }
.products { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.product { min-width: 0; }
.product img, .product-empty { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; background: var(--raised); border: 1px solid var(--line); border-radius: 14px; }
.product strong { display: block; margin-top: 8px; font-size: 16px; font-weight: 600; line-height: 1.25; overflow-wrap: anywhere; }
.product b { display: block; margin-top: 2px; font-size: 17px; }

.toast { position: fixed; z-index: 9; left: 16px; right: 16px; top: calc(12px + env(safe-area-inset-top)); max-width: 420px; margin: auto; padding: 14px 16px; color: var(--bg); background: var(--text); border-radius: 12px; font-size: 15px; font-weight: 600; }

/* ---------- PC: a marca fica fixa à esquerda, o app à direita ---------- */
@media (min-width: 900px) {
  .app { display: grid; grid-template-columns: minmax(0, 1fr) minmax(420px, 520px); min-height: 100vh; }
  .stage, body:not([data-view="home"]) .stage { display: flex; position: sticky; top: 0; height: 100vh; min-height: 0; padding: 28px 44px 48px; }
  .stage-name h1 { font-size: min(var(--name-size-wide, 7vw), calc(112px * var(--name-scale, 1))); }
  #view { position: relative; padding: 28px 40px 120px; }
  .home-ticket { margin-top: 0; }
  .rows { margin: 0; border-top: 1px solid var(--line); }
  .row-btn { padding-inline: 0; }
  .row-btn:hover strong { text-decoration: underline; text-underline-offset: 3px; }
  .days { margin-inline: 0; padding-inline: 0; flex-wrap: wrap; overflow: visible; }
  .dock { position: sticky; bottom: 0; margin: 24px -40px 0; padding: 12px 40px 20px; }
  .slot:hover, .day:hover { border-color: var(--accent); }
  h2 { font-size: 36px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; }
}

/* Cliente já conhecido neste aparelho */
.known { margin: 0 0 16px; line-height: 1.5; }
.known .link { display: inline; margin-left: 6px; font-size: .9em; text-decoration: underline; opacity: .75; }
[hidden] { display: none !important; }
