:root {
  --ink: #0d1619;
  --ink-2: #3b4447;
  --muted: #737b7e;
  --line: #e4e6e7;
  --line-2: #d3d6d8;
  --soft: #f5f6f6;
  --accent: #6950f3;
  --accent-soft: #f0edfe;
  --bg: #ffffff;
  --danger: #d4183d;
  --ok: #0f9d58;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(13, 22, 25, .06), 0 8px 24px rgba(13, 22, 25, .06);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 16px/1.45 Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-feature-settings: 'cv11', 'ss01';
  -webkit-font-smoothing: antialiased;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
[hidden] { display: none !important; }

/* ---------- header ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20; background: var(--bg);
  height: 72px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px;
}
.topbar.scrolled { box-shadow: 0 1px 0 var(--line); }
.icon-btn {
  width: 44px; height: 44px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--bg);
  display: inline-grid; place-items: center; text-decoration: none; transition: background .15s;
}
.icon-btn:hover { background: var(--soft); }
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn.invisible { visibility: hidden; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px 140px; }
.crumbs { display: flex; gap: 8px; align-items: center; font-size: 14px; color: var(--muted); margin: 4px 0 8px; flex-wrap: wrap; }
.crumbs span.on { color: var(--ink); font-weight: 600; }
.crumbs svg { width: 14px; height: 14px; opacity: .6; }
h1.title { font-size: 32px; line-height: 1.15; letter-spacing: -.025em; font-weight: 700; margin: 0 0 24px; }

.grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 56px; align-items: start; }

/* ---------- services ---------- */
.pills { display: flex; gap: 8px; margin: 0 0 20px; overflow-x: auto; scrollbar-width: none; }
.pill { border: 1px solid var(--line-2); background: var(--bg); padding: 8px 16px; border-radius: 999px; font-size: 15px; font-weight: 500; white-space: nowrap; }
.pill.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.section-h { font-size: 20px; font-weight: 700; letter-spacing: -.015em; margin: 8px 0 14px; }

.svc {
  display: flex; align-items: flex-start; gap: 16px; width: 100%; text-align: left;
  padding: 20px 20px 20px 24px; margin: 0 0 12px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--bg); transition: border-color .15s, box-shadow .15s, background .15s;
}
.svc:hover { border-color: var(--line-2); background: #fcfcfc; }
.svc.on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.svc .body { flex: 1; min-width: 0; }
.svc .name { font-size: 16px; font-weight: 600; }
.svc .meta { font-size: 14px; color: var(--muted); margin-top: 2px; }
.svc .desc { font-size: 14px; color: var(--muted); margin-top: 6px; }
.svc .price { font-size: 15px; font-weight: 600; margin-top: 10px; }
.svc .add {
  flex: none; width: 34px; height: 34px; border-radius: 999px; display: grid; place-items: center;
  background: var(--soft); transition: background .15s, transform .15s;
}
.svc .add svg { width: 18px; height: 18px; }
.svc.on .add { background: var(--accent); color: #fff; }
.svc:active .add { transform: scale(.92); }

/* ---------- summary card ---------- */
.summary {
  position: sticky; top: 88px; border: 1px solid var(--line); border-radius: 12px; padding: 24px;
  background: var(--bg);
}
.biz { display: flex; gap: 14px; align-items: center; padding-bottom: 20px; }
.biz img { width: 64px; height: 64px; border-radius: 8px; object-fit: cover; flex: none; }
.biz .n { font-weight: 700; font-size: 16px; }
.biz .a { color: var(--muted); font-size: 13px; margin-top: 2px; line-height: 1.35; }
.sum-when { border-top: 1px solid var(--line); padding: 16px 0 4px; font-size: 15px; }
.sum-when div { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; color: var(--ink-2); }
.sum-when svg { width: 18px; height: 18px; color: var(--muted); flex: none; }
.sum-list { border-top: 1px solid var(--line); padding: 16px 0 8px; min-height: 60px; }
.sum-item { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 12px; font-size: 15px; }
.sum-item .d { color: var(--muted); font-size: 13px; }
.sum-empty { color: var(--muted); font-size: 15px; padding: 4px 0 8px; }
.sum-total { border-top: 1px solid var(--line); padding: 16px 0 20px; display: flex; justify-content: space-between; font-weight: 700; font-size: 16px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 24px; border-radius: 999px; border: 1px solid transparent;
  font-weight: 600; font-size: 16px; text-decoration: none; transition: background .15s, opacity .15s, transform .1s;
}
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: #253033; }
.btn-primary:disabled { background: #c9cdcf; cursor: not-allowed; transform: none; }
.btn-ghost { background: var(--bg); border-color: var(--line-2); color: var(--ink); }
.btn-ghost:hover { background: var(--soft); }
.btn-danger { background: var(--bg); border-color: #f3c2cc; color: var(--danger); }
.btn-block { width: 100%; }

/* ---------- mobile bottom bar ---------- */
.bottombar {
  display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--bg);
  border-top: 1px solid var(--line); padding: 14px 20px calc(14px + env(safe-area-inset-bottom));
  align-items: center; justify-content: space-between; gap: 16px;
}
.bottombar .t { font-weight: 700; font-size: 16px; }
.bottombar .s { color: var(--muted); font-size: 13px; }

/* ---------- time step ---------- */
.month-row { display: flex; align-items: center; justify-content: space-between; margin: 0 0 16px; }
.month-row .m { font-size: 17px; font-weight: 600; }
.month-row .nav { display: flex; gap: 8px; }
.month-row .icon-btn { width: 40px; height: 40px; }
.month-row .icon-btn:disabled { opacity: .35; cursor: default; }

.days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; margin: 0 0 28px; }
.day { background: none; border: 0; padding: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.day .c {
  width: 64px; height: 64px; max-width: 100%; aspect-ratio: 1; border-radius: 999px; border: 1px solid var(--line-2);
  display: grid; place-items: center; font-size: 20px; font-weight: 600; transition: background .15s, border-color .15s;
}
.day .w { font-size: 14px; color: var(--ink-2); }
.day:hover .c { border-color: var(--ink); }
.day.on .c { background: var(--accent); border-color: var(--accent); color: #fff; }
.day.off .c { color: #b5babd; border-color: var(--line); position: relative; overflow: hidden; }
.day.off .c::after { content: ''; position: absolute; width: 140%; height: 1px; background: var(--line-2); transform: rotate(-45deg); }
.day.off .w { color: #b5babd; }
.day.today .w { font-weight: 700; }

.slots { display: grid; gap: 10px; }
.slot {
  width: 100%; text-align: left; padding: 17px 20px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--bg); font-size: 16px; font-weight: 600; transition: border-color .15s, box-shadow .15s;
}
.slot:hover { border-color: var(--ink); }
.slot.on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.day-part { font-size: 14px; font-weight: 600; color: var(--muted); margin: 10px 0 2px; }

.empty {
  border: 1px solid var(--line); border-radius: 12px; padding: 40px 24px; text-align: center;
}
.empty svg { width: 44px; height: 44px; color: var(--accent); }
.empty h3 { margin: 12px 0 6px; font-size: 18px; }
.empty p { margin: 0 0 20px; color: var(--muted); }

.skeleton { height: 58px; border-radius: var(--radius); background: linear-gradient(90deg, #f3f4f4 0%, #fafafa 50%, #f3f4f4 100%); background-size: 200% 100%; animation: sh 1.2s infinite; }
@keyframes sh { to { background-position: -200% 0; } }

/* ---------- form ---------- */
.form { display: grid; gap: 18px; max-width: 640px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field label { display: block; font-size: 14px; font-weight: 600; margin: 0 0 6px; }
.field input, .field textarea {
  width: 100%; height: 48px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--bg);
  outline: none; transition: border-color .15s, box-shadow .15s; font-size: 16px;
}
.field textarea { height: 96px; padding: 12px 14px; resize: vertical; }
.field input:focus, .field textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field.err input { border-color: var(--danger); }
.field .hint { font-size: 13px; color: var(--muted); margin-top: 6px; }
.phone { display: flex; }
.phone .cc { display: grid; place-items: center; padding: 0 14px; border: 1px solid var(--line-2); border-right: 0; border-radius: 8px 0 0 8px; background: var(--soft); font-size: 15px; color: var(--ink-2); }
.phone input { border-radius: 0 8px 8px 0; }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; color: var(--ink-2); }
.check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--accent); flex: none; }
.note-box { background: var(--soft); border-radius: 10px; padding: 14px 16px; font-size: 14px; color: var(--ink-2); display: flex; gap: 10px; }
.note-box svg { width: 18px; height: 18px; flex: none; margin-top: 1px; color: var(--muted); }
.error-box { background: #fdecef; color: #9b1030; border-radius: 10px; padding: 12px 16px; font-size: 14px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* ---------- done ---------- */
.done { max-width: 560px; margin: 24px auto 0; text-align: center; }
.done .badge { width: 72px; height: 72px; border-radius: 999px; background: var(--accent); color: #fff; display: grid; place-items: center; margin: 0 auto 20px; animation: pop .45s cubic-bezier(.2, 1.4, .4, 1); }
.done .badge.wait { background: #f5a524; }
.done .badge svg { width: 36px; height: 36px; }
@keyframes pop { from { transform: scale(.4); opacity: 0; } }
.done h1 { font-size: 30px; letter-spacing: -.025em; margin: 0 0 8px; }
.done p.lead { color: var(--muted); margin: 0 0 28px; }
.card { border: 1px solid var(--line); border-radius: 12px; padding: 22px 24px; text-align: left; }
.card .big { font-size: 18px; font-weight: 700; }
.card .sub { color: var(--ink-2); margin-top: 2px; }
.card hr { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }
.actions { display: grid; gap: 10px; margin-top: 20px; }

.status { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: var(--soft); }
.status.confirmed { background: #e7f6ee; color: #0b7a43; }
.status.pending { background: #fff4df; color: #9a5b00; }
.status.cancelled { background: #fdecef; color: #9b1030; }

.fade-in { animation: fi .25s ease; }
@keyframes fi { from { opacity: 0; transform: translateY(6px); } }

.footer-note { color: var(--muted); font-size: 13px; text-align: center; margin: 40px 0 0; }

@media (max-width: 900px) {
  .grid { grid-template-columns: minmax(0, 1fr); }
  .summary { display: none; }
  .bottombar { display: flex; }
  .topbar { padding: 0 16px; height: 64px; }
  .wrap { padding: 0 16px 120px; }
  h1.title { font-size: 28px; margin-bottom: 20px; }
  .day .c { width: 48px; height: 48px; font-size: 17px; }
  .day .w { font-size: 13px; }
  .row2 { grid-template-columns: 1fr; }
}

body[data-step="done"] .grid { grid-template-columns: minmax(0, 1fr); }
body[data-step="done"] .summary { display: none; }

/* ---------- účet ---------- */
.top-right { display: flex; gap: 10px; align-items: center; }
.acct { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px 0 6px; border: 1px solid var(--line-2); border-radius: 999px; text-decoration: none; font-weight: 600; font-size: 15px; background: var(--bg); }
.acct:hover { background: var(--soft); }
.acct.guest { padding: 0 18px; }
.av { width: 32px; height: 32px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-weight: 700; font-size: 13px; text-transform: uppercase; flex: none; }
.av.lg { width: 72px; height: 72px; font-size: 26px; }
.me-card { display: flex; gap: 14px; align-items: center; border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.me-card .n { font-weight: 700; }
.me-card .m { color: var(--muted); font-size: 14px; }
.me-card .grow { flex: 1; min-width: 0; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--accent); font-weight: 600; font-size: 14px; }
.old-new { display: grid; gap: 10px; }
.old-new .was { color: var(--muted); text-decoration: line-through; }
@media (max-width: 900px) { .acct .nm { display: none; } .acct { padding: 0 6px; } .acct.guest { padding: 0 14px; } }
