:root{
  --pink:#FF4F93; --ink:#140F12; --bg:#FFF0F5; --card:#FFFFFF;
  --muted:#6B5A62; --ph:#7A6A72; --soft:#FFE0EC; --line:#F6DCE6; --danger:#C62A5E;
  --r-lg:32px; --r-md:24px;
  --head:'Comfortaa',system-ui,sans-serif;
}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html{background:var(--bg)}
body{margin:0;font-family:'Nunito',system-ui,-apple-system,'Segoe UI',sans-serif;color:var(--ink);background:var(--bg);font-size:16px;line-height:1.35}
a{color:inherit;text-decoration:none}
button{font:inherit;color:inherit;background:none;border:0;padding:0;margin:0;cursor:pointer}
input,select,textarea{font:inherit;color:var(--ink)}
input::placeholder,textarea::placeholder{color:var(--ph)}
h1,h2,h3{font-family:var(--head);font-weight:700;margin:0}
svg.i{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}

.page{max-width:480px;margin:0 auto;min-height:100vh;min-height:100dvh;display:flex;flex-direction:column;padding-bottom:calc(96px + env(safe-area-inset-bottom))}
.page.no-nav{padding-bottom:calc(24px + env(safe-area-inset-bottom))}

/* Шапка */
.hero{background:var(--pink);border-radius:0 0 var(--r-lg) var(--r-lg);padding:calc(18px + env(safe-area-inset-top)) 16px 20px;display:flex;flex-direction:column;gap:14px}
.hero-row{display:flex;align-items:center;justify-content:space-between;gap:12px}
.hero h1{font-size:23px;line-height:1.2}
.topbar{padding:calc(16px + env(safe-area-inset-top)) 16px 0;display:flex;align-items:center;justify-content:space-between;gap:8px}
.topbar .title{font-family:var(--head);font-weight:700;font-size:17px;text-align:center;flex:1}
.rb{width:44px;height:44px;border-radius:22px;background:var(--card);display:flex;align-items:center;justify-content:center;flex-shrink:0}
.rb.soft{background:var(--bg)}

/* Поиск */
.search-label{font-size:15px;font-weight:800}
.search{height:56px;border-radius:28px;background:var(--card);display:flex;align-items:center;gap:10px;padding:0 18px}
.search svg{color:var(--ph)}
.search input{flex:1;min-width:0;height:100%;border:0;outline:none;background:transparent;font-size:16px}
.search input::-webkit-search-cancel-button{display:none}
.chips{display:flex;gap:8px;overflow-x:auto;scrollbar-width:none;margin:0 -16px;padding:0 16px}
.chips::-webkit-scrollbar{display:none}
.chip{height:44px;padding:0 16px;border-radius:22px;background:rgba(255,255,255,.6);display:flex;align-items:center;font-size:14px;font-weight:800;white-space:nowrap;flex-shrink:0}

/* Блоки */
.section{padding:18px 16px 0;display:flex;flex-direction:column;gap:8px}
.section-head{display:flex;align-items:baseline;justify-content:space-between;gap:12px;padding:0 4px}
.section-head h2{font-size:19px}
.section-head .aside{font-size:14px;font-weight:700;color:var(--muted)}
.card{background:var(--card);border-radius:var(--r-md);padding:14px 16px}
.row{display:flex;align-items:center;gap:12px;min-height:64px;padding:10px 14px 10px 16px;border-radius:var(--r-md);background:var(--card)}
.row .main{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px;line-height:1.3}
.nm{font-size:16px;font-weight:800}
.ctx{font-size:13px;color:var(--muted)}
.muted{color:var(--muted)}
.empty{padding:18px 20px;border-radius:var(--r-md);background:rgba(255,255,255,.6);color:var(--muted);font-size:15px;text-align:center}
.av{width:44px;height:44px;border-radius:22px;background:var(--soft);display:flex;align-items:center;justify-content:center;font-family:var(--head);font-weight:700;font-size:15px;flex-shrink:0}
.av.lg{width:64px;height:64px;border-radius:32px;background:var(--card);font-size:22px}

/* Кнопки */
.btn{height:52px;border-radius:26px;display:flex;align-items:center;justify-content:center;gap:8px;font-size:16px;font-weight:800;padding:0 20px;width:100%}
.btn.pink{background:var(--pink)}
.btn.dark{background:var(--ink);color:#fff}
.btn.white{background:var(--card)}
.btn.ghost{background:transparent;border:1.5px solid var(--ink)}
.btn.small{height:44px;border-radius:22px;font-size:14px;width:auto;padding:0 16px}
.acts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.act{height:48px;border-radius:24px;background:var(--card);display:flex;align-items:center;justify-content:center;gap:6px;font-size:14px;font-weight:800}
.act.dark{background:var(--ink);color:#fff}
.act svg{width:18px;height:18px}

/* Формы */
.form{display:flex;flex-direction:column;gap:14px;padding:16px}
.field{display:flex;flex-direction:column;gap:6px}
.field label{font-size:14px;font-weight:800;padding-left:6px}
.field .hint{font-size:13px;color:var(--muted);padding-left:6px}
.inp{height:52px;border-radius:26px;border:0;background:var(--card);padding:0 18px;font-size:16px;outline:none;width:100%}
textarea.inp{height:auto;min-height:96px;border-radius:var(--r-md);padding:14px 18px;resize:vertical}
.inp:focus{box-shadow:0 0 0 2px var(--pink)}
.err{background:#fff;border:1.5px solid var(--danger);color:var(--danger);border-radius:var(--r-md);padding:12px 16px;font-size:15px;font-weight:700}
.warn{background:var(--ink);color:#fff;border-radius:var(--r-md);padding:14px 16px;display:flex;flex-direction:column;gap:10px}
.warn b{color:var(--pink)}

/* Сегменты */
.seg{display:flex;gap:6px;overflow-x:auto;scrollbar-width:none}
.seg::-webkit-scrollbar{display:none}
.seg a,.seg button{height:44px;padding:0 18px;border-radius:22px;background:var(--card);font-size:14px;font-weight:700;display:flex;align-items:center;white-space:nowrap;flex-shrink:0}
.seg .on{background:var(--ink);color:#fff;font-weight:800}

/* Нижнее меню */
.nav{position:fixed;left:0;right:0;bottom:0;padding:8px 16px calc(14px + env(safe-area-inset-bottom));pointer-events:none;z-index:20}
.nav-in{max-width:448px;margin:0 auto;height:60px;border-radius:30px;background:var(--card);display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px;padding:6px;box-shadow:0 6px 24px rgba(20,15,18,.10);pointer-events:auto}
.nav a{border-radius:24px;display:flex;align-items:center;justify-content:center;gap:6px;font-size:13px;font-weight:700;color:var(--muted)}
.nav a.on{background:var(--ink);color:#fff;font-weight:800}
.nav svg{width:18px;height:18px}

/* Прайс */
.price-row{display:flex;align-items:center;gap:10px;padding:12px 14px 12px 16px;border-radius:var(--r-md);background:var(--card);min-height:64px}
.price-row .main{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.price-row .pr{font-weight:800;white-space:nowrap}
.price-edit{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.price-edit .full{grid-column:1/-1}

/* Меню «Написать» */
.sheet-bg{position:fixed;inset:0;background:rgba(20,15,18,.45);z-index:40;display:flex;align-items:flex-end;justify-content:center}
.sheet{width:100%;max-width:480px;background:var(--bg);border-radius:var(--r-lg) var(--r-lg) 0 0;padding:18px 16px calc(20px + env(safe-area-inset-bottom));display:flex;flex-direction:column;gap:8px}
.sheet h3{font-size:17px;padding:0 6px 4px}
.sheet .btn{justify-content:flex-start}
.toast{position:fixed;left:16px;right:16px;bottom:calc(96px + env(safe-area-inset-bottom));max-width:448px;margin:0 auto;background:var(--ink);color:#fff;border-radius:var(--r-md);padding:14px 18px;font-weight:700;z-index:50}
.htmx-indicator{opacity:0;transition:opacity .2s}
.htmx-request .htmx-indicator,.htmx-request.htmx-indicator{opacity:1}
.sheet .btn.ghost{justify-content:center}
@media (max-width:380px){
  .act{font-size:13px;gap:4px}
  .act svg{width:16px;height:16px}
  .hero h1{font-size:21px}
}

/* Переключатели-чипсы на радио и галочках */
.seg label{height:44px;padding:0 16px;border-radius:22px;background:var(--card);font-size:14px;font-weight:700;display:flex;align-items:center;white-space:nowrap;flex-shrink:0;cursor:pointer;user-select:none}
.card .seg label{background:var(--bg)}
.seg label input{position:absolute;opacity:0;pointer-events:none;width:0;height:0}
.seg label:has(input:checked){background:var(--ink);color:#fff;font-weight:800}
.seg label:has(input:focus-visible){box-shadow:0 0 0 2px var(--pink)}
.zones{flex-wrap:wrap}

/* Календарь */
.week{display:grid;grid-template-columns:36px repeat(7,minmax(0,1fr)) 36px;gap:4px;align-items:center}
.week .arr{width:36px;height:44px;display:flex;align-items:center;justify-content:center;border-radius:18px}
.day{height:64px;border-radius:20px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;background:rgba(255,255,255,.35);font-weight:800;position:relative}
.day .wd{font-size:11px;font-weight:700;text-transform:uppercase}
.day .dn{font-family:var(--head);font-size:17px}
.day .dot{width:6px;height:6px;border-radius:3px;background:var(--ink);position:absolute;bottom:7px}
.day.off{opacity:.55}
.day.off .wd::after{content:" · вых"}
.day.today{box-shadow:inset 0 0 0 2px var(--ink)}
.day.sel{background:var(--card)}
.slot{display:flex;gap:14px;align-items:flex-start;padding:12px 16px;border-radius:var(--r-md);background:var(--card)}
.slot .tm{width:56px;flex-shrink:0;font-family:var(--head);font-weight:700;font-size:17px;line-height:1.3}
.slot .tm small{display:block;font-family:'Nunito',sans-serif;font-size:12px;color:var(--muted);font-weight:700}
.slot .main{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px;line-height:1.3}
.slot.cancelled{opacity:.5}
.slot.cancelled .nm{text-decoration:line-through}
.free{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:52px;padding:0 16px;border-radius:var(--r-md);border:1.5px dashed #F2A8C6;color:var(--muted);font-weight:700;font-size:14px}
.free b{color:var(--ink)}
.badge{display:inline-flex;align-items:center;height:24px;padding:0 10px;border-radius:12px;font-size:12px;font-weight:800;background:var(--soft);align-self:flex-start}
.badge.done{background:#DDF3E4}
.badge.cancelled,.badge.noshow{background:#EEE3E8;color:var(--muted)}
.pill{height:34px;padding:0 14px;border-radius:17px;display:inline-flex;align-items:center;font-size:14px;font-weight:800}
.pill.pink{background:var(--pink)}
.pill.line{border:1.5px solid var(--ink)}
