/* Мини-приложение записи: мир B из брендбука. Цвет салона приходит в --acc / --acc-soft. */
:root {
  --ink: #141714; --mut: #646b66; --line: #e7e9e6; --soft: #f3f5f2; --fld: #cfd4cf;
  --acc: #1d5c3c; --acc-soft: #edf4ef;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: #fff; color: var(--ink);
  font: 400 16px/1.55 "Plus Jakarta Sans", system-ui, sans-serif; -webkit-font-smoothing: antialiased;
}
h1, h2 { margin: 0; font: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; text-align: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
button:disabled { cursor: default; }
a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
input { font: inherit; color: inherit; }
::selection { background: var(--acc-soft); }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }
svg.i { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
img { display: block; max-width: 100%; }

.page { max-width: 560px; margin: 0 auto; min-height: 100vh; position: relative; }
.pg { padding-bottom: 130px; }
.step { animation: stepin .2s ease-out; }
@keyframes stepin { from { transform: translateX(14px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .step { animation: none; } }

.ph { background-size: cover; background-position: center; background-color: #ddd; }
.sk, .sk0 { background: var(--soft); border-radius: 10px; }
.sk0 { border-radius: 0; }
.logo.sk0 { border-radius: 50%; }

/* шапка салона */
.cover { height: 150px; background-color: var(--acc-soft); }
.cover.ph:not([role]) { background-image: linear-gradient(135deg, var(--acc-soft), #fff 140%); }
.head { padding: 0 18px; }
.logo {
  width: 64px; height: 64px; border-radius: 50%; border: 3px solid #fff; margin-top: -32px; background: var(--acc); color: #fff;
  display: grid; place-items: center; font-weight: 600; font-size: 20px; overflow: hidden;
}
.logo img { width: 100%; height: 100%; object-fit: cover; }
.name { font-size: 24px; font-weight: 600; letter-spacing: -.02em; margin: 10px 0 4px; line-height: 1.2; }
.meta { font-size: 13.5px; color: var(--mut); display: flex; flex-direction: column; gap: 5px; }
.meta > span { display: flex; align-items: center; gap: 6px; }
.meta svg.i { width: 15px; height: 15px; }
.meta a { text-decoration: none; }
.open { color: var(--acc); font-weight: 500; }
.acts { display: flex; gap: 8px; margin: 14px 18px 0; }
.wa {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--fld);
  border-radius: 12px; padding: 10px 0; font-size: 14px; font-weight: 500; min-height: 44px;
}
.seg { display: flex; background: var(--soft); border-radius: 10px; padding: 3px; margin: 14px 18px 0; }
.seg button { flex: 1; text-align: center; padding: 8px 0; min-height: 40px; font-size: 14px; border-radius: 8px; color: var(--mut); }
.seg .on { background: #fff; color: var(--ink); font-weight: 500; box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }
.sec { display: block; font-size: 15px; font-weight: 600; margin: 18px 18px 10px; }
.slots { display: flex; gap: 8px; padding: 0 18px; overflow-x: auto; scrollbar-width: none; }
.slots::-webkit-scrollbar { display: none; }
.slot { flex: 0 0 auto; border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; font-size: 13.5px; line-height: 1.25; min-height: 44px; text-align: left; }
.slot small { display: block; color: var(--mut); font-size: 11.5px; }
.slot .short { display: none; }
.slot.on { border-color: var(--acc); background: var(--acc-soft); }
.svc { display: grid; grid-template-columns: 1fr auto; column-gap: 12px; align-items: center; padding: 12px 18px; border-top: 1px solid var(--line); }
.svc .t { grid-column: 1; grid-row: 1; }
.svc .n { font-size: 15px; font-weight: 500; }
.svc .d { font-size: 13px; color: var(--mut); }
.svc .pr { grid-column: 1; grid-row: 2; font-size: 14px; font-weight: 600; margin-top: 2px; }
.svc .pill { grid-column: 2; grid-row: 1 / span 2; }
.pill {
  border: 1px solid var(--fld); border-radius: 99px; padding: 7px 16px; font-size: 13.5px; font-weight: 500;
  min-height: 40px; display: inline-flex; align-items: center; justify-content: center;
}

/* нижняя панель */
.bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: #fff; border-top: 1px solid var(--line);
  padding: 12px 0 max(22px, env(safe-area-inset-bottom)); box-shadow: 0 -6px 16px -12px rgba(0, 0, 0, .18);
}
.bar .in { max-width: 560px; margin: 0 auto; padding: 0 18px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.bar small { font-size: 13px; color: var(--mut); line-height: 1.3; }
.bar small b { color: var(--ink); font-weight: 600; display: block; font-size: 14.5px; }
.cta {
  background: var(--acc); color: #fff; border-radius: 12px; padding: 12px 22px; font-size: 15px; font-weight: 500; white-space: nowrap;
  text-align: center; display: inline-flex; align-items: center; justify-content: center; min-height: 46px;
}
.cta:disabled { opacity: .4; }
.cta.full { display: flex; width: 100%; }
.ghost {
  border: 1px solid var(--fld); border-radius: 12px; padding: 12px 22px; font-size: 15px; font-weight: 500; text-align: center;
  display: inline-flex; align-items: center; justify-content: center; min-height: 46px;
}
.ghost.full { display: flex; width: 100%; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.lnk { color: var(--acc); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }

/* шаги */
.tb { display: flex; align-items: center; gap: 10px; padding: 16px 18px 12px; border-bottom: 1px solid var(--line); }
.tb .back { width: 40px; height: 40px; display: grid; place-items: center; margin: -8px 0 -8px -12px; border-radius: 10px; }
.tb .n { font-size: 15px; font-weight: 600; }
.tb .d { font-size: 13px; color: var(--mut); }
.sizes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 0 18px; }
.size { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font-size: 13px; color: var(--mut); line-height: 1.35; text-align: left; }
.size b { display: block; color: var(--ink); font-size: 16px; font-weight: 600; }
.size.on { border-color: var(--acc); box-shadow: inset 0 0 0 1px var(--acc); background: var(--acc-soft); }
.add { display: flex; align-items: center; gap: 12px; padding: 11px 18px; border-top: 1px solid var(--line); font-size: 14.5px; width: 100%; min-height: 56px; }
.add .t { flex: 1; }
.add small { display: block; color: var(--mut); font-size: 12.5px; }
.cb { width: 20px; height: 20px; border: 1.5px solid #b9bfb9; border-radius: 6px; flex: 0 0 auto; }
.cb.on { background: var(--acc); border-color: var(--acc); position: relative; }
.cb.on::after { content: ""; position: absolute; left: 6px; top: 2px; width: 5px; height: 10px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.days { display: flex; gap: 6px; padding: 0 18px; overflow-x: auto; scrollbar-width: none; }
.days::-webkit-scrollbar { display: none; }
.day { flex: 0 0 calc((100% - 24px) / 5); text-align: center; border: 1px solid var(--line); border-radius: 10px; padding: 7px 0; font-size: 12px; color: var(--mut); min-height: 52px; }
.day b { display: block; font-size: 16px; color: var(--ink); font-weight: 600; }
.day.on { background: var(--ink); border-color: var(--ink); color: #cfd2cf; }
.day.on b { color: #fff; }
.day.closed { opacity: .45; }
.times { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 0 18px; }
.times button, .times > div { text-align: center; border: 1px solid var(--line); border-radius: 9px; padding: 8px 0; font-size: 13.5px; min-height: 40px; }
.times .on { background: var(--acc); color: #fff; border-color: var(--acc); }
.times .gone { border-color: #e3b4a6; background: #fbefeb; color: #a2482a; text-decoration: line-through; }
.fld { display: block; margin: 0 18px 8px; border: 1px solid #d7dbd7; border-radius: 10px; padding: 8px 12px; cursor: text; }
.fld small { display: block; font-size: 11.5px; color: var(--mut); }
.fld input { width: 100%; border: 0; padding: 0; margin: 0; font-size: 16px; line-height: 1.4; outline: 0; background: transparent; }
.fld input::placeholder { color: #a3a9a4; }
.fld:focus-within { border-color: var(--acc); box-shadow: 0 0 0 3px var(--acc-soft); }
.hint { margin: 4px 18px 0; font-size: 12.5px; color: var(--mut); display: flex; gap: 6px; align-items: center; }
.hint svg.i { width: 14px; height: 14px; }
.hint.pick { color: var(--acc); font-weight: 500; margin: -2px 18px 8px; }
.alert { margin: 0 18px 12px; border-radius: 10px; padding: 10px 12px; background: #fbefeb; color: #7a3014; font-size: 13.5px; display: flex; gap: 8px; align-items: flex-start; }
.alert svg.i { width: 16px; height: 16px; margin-top: 2px; }
.okbox { margin: 0 0 12px; border-radius: 10px; padding: 10px 12px; background: var(--acc-soft); color: var(--acc); font-size: 13.5px; font-weight: 500; display: flex; gap: 8px; align-items: center; }
.note-box { margin: 0 18px; border-radius: 10px; padding: 12px; background: var(--soft); color: var(--mut); font-size: 13.5px; }
.note-box b { color: var(--ink); font-weight: 600; }
.owner { display: flex; align-items: center; gap: 10px; margin: 14px 18px 0; padding: 10px 12px; background: var(--soft); border-radius: 12px; font-size: 13.5px; }
.ava { width: 36px; height: 36px; border-radius: 50%; background: #dfe3df; display: grid; place-items: center; font-size: 13px; font-weight: 600; color: var(--mut); overflow: hidden; flex: 0 0 auto; }
.ava img { width: 100%; height: 100%; object-fit: cover; }
.owner small { display: block; color: var(--mut); font-size: 12.5px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 0 18px; }
.grid3 .ph { aspect-ratio: 1; border-radius: 8px; }

/* итоговые экраны */
.done { padding: 56px 22px 0; text-align: left; }
.tick { width: 52px; height: 52px; border-radius: 50%; background: var(--acc-soft); color: var(--acc); display: grid; place-items: center; margin-bottom: 18px; }
.tick svg.i { width: 26px; height: 26px; stroke-width: 2.2; }
.h { font-size: 24px; font-weight: 600; letter-spacing: -.02em; line-height: 1.2; margin: 0 0 8px; }
.h.dim { color: var(--mut); text-decoration: line-through; }
.p { font-size: 15px; color: var(--mut); margin: 0 0 18px; }
.sum { border: 1px solid var(--line); border-radius: 12px; margin: 0 0 14px; }
.sum > div { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 14px; font-size: 14px; border-top: 1px solid var(--line); }
.sum > div:first-child { border-top: 0; }
.sum span:first-child { color: var(--mut); flex: 0 0 auto; }
.sum span:last-child { text-align: right; }
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; border-radius: 99px; padding: 4px 10px; }
.badge svg.i { width: 14px; height: 14px; }
.b-wait { background: #fdf4e1; color: #7a5600; }
.b-ok { background: var(--acc-soft); color: var(--acc); }
.b-cancel { background: #f3f3f3; color: #5a5a5a; }
.map { display: block; height: 120px; border-radius: 12px; margin: 0 0 14px; background: #e9ece7; position: relative; overflow: hidden; }
.map::before { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 46%, #fff 46%, #fff 50%, transparent 50%), linear-gradient(20deg, transparent 60%, #fff 60%, #fff 63%, transparent 63%); }
.pin { position: absolute; left: 52%; top: 38%; width: 22px; height: 22px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--acc); }
.maplbl { position: absolute; left: 10px; bottom: 8px; font-size: 12px; background: #fff; border-radius: 6px; padding: 3px 8px; max-width: calc(100% - 20px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* шторка */
.scrim { position: fixed; inset: 0; z-index: 40; background: rgba(20, 23, 20, .4); display: flex; align-items: flex-end; justify-content: center; }
.sheet { width: 100%; max-width: 560px; background: #fff; border-radius: 16px 16px 0 0; padding: 22px 18px max(22px, env(safe-area-inset-bottom)); outline: 0; }

/* десктоп: две колонки (услуги слева, карточка записи справа) */
.dgrid { display: block; }
.dright { display: none; }
@media (min-width: 960px) {
  .page.salon { max-width: none; }
  .page.salon .bar, .m-only { display: none; }
  .page.salon .cover { height: 220px; }
  .page.salon .dgrid { max-width: 1120px; margin: 0 auto; padding: 0 24px; display: grid; grid-template-columns: 1fr 400px; gap: 56px; align-items: start; }
  .dleft { margin-top: -48px; min-width: 0; }
  .dleft .head { padding: 0; }
  .dleft .logo { width: 96px; height: 96px; font-size: 28px; margin-top: 0; }
  .dleft .name { font-size: 32px; margin-top: 14px; }
  .dleft .meta { font-size: 15px; flex-direction: row; gap: 20px; flex-wrap: wrap; }
  .dleft .meta svg.i { width: 16px; height: 16px; }
  .dleft .seg { margin: 20px 0 0; width: 260px; }
  .dleft .sec { font-size: 17px; margin: 20px 0 6px; }
  .dleft .hint.pick { margin: 0 0 8px; }
  .dleft .svc { padding-left: 0; padding-right: 0; grid-template-columns: 1fr auto auto; }
  .dleft .svc .pr { grid-column: 2; grid-row: 1 / span 2; margin: 0 16px 0 0; align-self: center; }
  .dleft .svc .pill { grid-column: 3; }
  .dleft .note-box { margin-left: 0 !important; margin-right: 0 !important; }
  .dleft .grid3 { padding: 0; grid-template-columns: repeat(4, 1fr); }
  .dright {
    display: block; margin-top: 24px; position: sticky; top: 24px; border: 1px solid var(--line); border-radius: 16px;
    padding: 22px; box-shadow: 0 10px 30px -18px rgba(0, 0, 0, .25); background: #fff;
  }
  .dright .rh { font-size: 18px; font-weight: 600; margin: 0 0 12px; }
  .dright .slots { padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; overflow: visible; }
  .dright .slot { text-align: center; padding: 8px 4px; min-height: 40px; border-radius: 9px; }
  .dright .slot small { display: inline; font-size: 13.5px; color: inherit; margin-right: 4px; }
  .dright .slot .full { display: none; }
  .dright .slot .short { display: inline; }
  .dright .slot.on { background: var(--acc); color: #fff; border-color: var(--acc); }
  .dright .owner { margin: 14px 0 0; }
  .dright .wa { display: flex; }
  .dright .note-box { margin: 0; }
  .page:not(.salon) { margin-top: 24px; }
  .page.pg:not(.salon) { border: 1px solid var(--line); border-radius: 16px; min-height: 0; padding-bottom: 130px; margin-bottom: 140px; overflow: hidden; }
}
