/* Kiwikit Booking: public page. Phone first; one accent colour per salon (set from the salon's config). */
:root {
  --bg: #fff8f5; --card: #ffffff; --ink: #22101a; --ink-2: #47313d; --muted: #6a5260; --line: #ecd9df;
  --accent: #c42c5c; --accent-ink: #ffffff; --accent-soft: #ffe9ec; --ok: #1f7a4d; --warn: #9a5b00; --bad: #b3261e;
  --r: 16px; --shadow: 0 18px 40px -24px rgba(90, 20, 50, .35);
  --sans: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", sans-serif; --serif: "Cormorant Garamond", Georgia, serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.5 var(--sans); min-height: 100vh; display: flex; flex-direction: column; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 2px; }

.top { display: flex; align-items: center; gap: 12px; padding: 18px 16px 10px; max-width: 640px; width: 100%; margin: 0 auto; }
.brand { flex: 1; min-width: 0; }
.brand h1 { font: 600 30px/1.05 var(--serif); margin: 0; letter-spacing: -.01em; }
.brand p { margin: 4px 0 0; color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lang { border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 8px 14px; font-weight: 600; font-size: 14px; min-height: 40px; }

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 0 16px; max-width: 640px; width: 100%; margin: 4px auto 0; }
.steps span { height: 4px; border-radius: 4px; background: var(--line); transition: background .25s; }
.steps span.on { background: var(--accent); }
.steps.hide { visibility: hidden; }

main { flex: 1; max-width: 640px; width: 100%; margin: 0 auto; padding: 14px 16px 40px; }
h2 { font: 600 26px/1.1 var(--serif); margin: 10px 0 4px; }
.sub { color: var(--muted); margin: 0 0 16px; font-size: 14px; }
.back { background: none; border: 0; color: var(--accent); font-weight: 600; padding: 8px 0; min-height: 40px; }

.cat { margin: 18px 0 6px; font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.cat small { letter-spacing: 0; text-transform: none; font-weight: 500; }
.list { display: grid; gap: 8px; }
.item { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
  padding: 14px; min-height: 64px; transition: border-color .15s, transform .15s; }
.item:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.item:active { transform: scale(.99); }
.item.sel { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.item .main { flex: 1; min-width: 0; }
.item .name { font-weight: 600; display: block; }
.item .meta { color: var(--muted); font-size: 13px; }
.item .price { font-weight: 700; white-space: nowrap; }
.item.off { opacity: .75; }
.item.off .meta { color: var(--warn); }
.avatar { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; background: var(--accent-soft); color: var(--accent); flex: none; }

.days { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 10px; margin: 0 -16px; padding-left: 16px; padding-right: 16px; scroll-snap-type: x proximity; scrollbar-width: none; }
.days::-webkit-scrollbar { display: none; }
.day { flex: none; width: 64px; scroll-snap-align: start; border: 1px solid var(--line); background: var(--card); border-radius: 14px; padding: 8px 0; text-align: center; min-height: 72px; }
.day b { display: block; font-size: 20px; line-height: 1.2; }
.day small { display: block; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.day.sel { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.day.sel small { color: inherit; opacity: .85; }
.day:disabled { opacity: .35; cursor: default; }
.slots-group { margin: 12px 0 4px; font-size: 13px; color: var(--muted); font-weight: 600; }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.slot { border: 1px solid var(--line); background: var(--card); border-radius: 12px; padding: 12px 0; font-weight: 600; min-height: 46px; }
.slot.sel { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.empty { background: var(--card); border: 1px dashed var(--line); border-radius: var(--r); padding: 18px; color: var(--muted); text-align: center; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; box-shadow: var(--shadow); }
.summary { display: grid; gap: 6px; font-size: 15px; }
.summary div { display: flex; justify-content: space-between; gap: 12px; }
.summary span { color: var(--muted); }
.summary b { text-align: right; }
form { display: grid; gap: 14px; margin-top: 16px; }
label { display: grid; gap: 6px; font-weight: 600; font-size: 14px; }
label small { font-weight: 400; color: var(--muted); }
input, textarea { width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 13px 14px; background: var(--card); font-size: 16px; min-height: 48px; }
input:focus, textarea:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
textarea { min-height: 70px; resize: vertical; }
.err { color: var(--bad); font-size: 14px; min-height: 1em; margin: 0; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 999px; padding: 14px 22px; font-weight: 700; min-height: 52px;
  background: var(--accent); color: var(--accent-ink); text-decoration: none; width: 100%; font-size: 16px; }
.btn[disabled] { opacity: .55; cursor: progress; }
.btn.ghost { background: var(--card); color: var(--ink); border: 1px solid var(--line); }
.btn.danger { background: var(--card); color: var(--bad); border: 1px solid color-mix(in srgb, var(--bad) 35%, var(--line)); }
.row { display: grid; gap: 10px; margin-top: 14px; }
.row.two { grid-template-columns: 1fr 1fr; }
.fine { color: var(--muted); font-size: 13px; }

.done-head { text-align: center; padding: 8px 0 14px; }
.check { width: 64px; height: 64px; border-radius: 50%; margin: 6px auto 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-size: 30px; }
.check.wait { color: var(--warn); background: #fff3d6; }
.check.x { color: var(--bad); background: #fde8e6; }
.linkbox { display: flex; gap: 8px; margin-top: 8px; }
.linkbox input { font-size: 13px; min-height: 44px; }
.linkbox button { flex: none; border: 1px solid var(--line); background: var(--card); border-radius: 12px; padding: 0 14px; font-weight: 600; }
.notice { background: #fff3d6; border: 1px solid #f0d9a4; color: #5c4300; border-radius: var(--r); padding: 14px; }
.callbar { display: flex; gap: 10px; align-items: center; justify-content: space-between; margin-top: 18px; padding: 14px; border-radius: var(--r); background: var(--accent-soft); }
.callbar a { color: var(--accent); font-weight: 700; text-decoration: none; }
#ts { min-height: 66px; }

.foot { text-align: center; color: var(--muted); font-size: 12px; padding: 18px 16px 28px; }
.toast { position: fixed; left: 50%; bottom: 20px; transform: translate(-50%, 20px); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px;
  opacity: 0; transition: .25s; pointer-events: none; max-width: calc(100% - 32px); font-size: 14px; z-index: 5; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.loading { display: flex; gap: 6px; justify-content: center; padding: 40px 0; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: b 1s infinite ease-in-out; }
.dot:nth-child(2) { animation-delay: .15s; } .dot:nth-child(3) { animation-delay: .3s; }
@keyframes b { 0%, 80%, 100% { opacity: .25; transform: scale(.8); } 40% { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
@media (min-width: 700px) { .brand h1 { font-size: 36px; } main { padding-top: 22px; } }
img.avatar { object-fit: cover; padding: 0; }
