/* Пирсинг-помощник — дизайн v2 (11.2026): женственно и «как приложение».
   Палитры: rose (по умолчанию) и lilac. Всё на CSS-переменных. */

@property --p { syntax: "<number>"; inherits: true; initial-value: 0; }

:root {
  --bg: #FBF3F5; --bg-2: #F5E6EE;
  --surface: #FFFFFF; --surface-2: #FFF8FA;
  --ink: #3A2434; --ink-2: #6B4F62; --muted: #9A8292;
  --line: rgba(120, 62, 98, .10); --line-2: rgba(120, 62, 98, .17);
  --p-main: #E0789A; --p-deep: #C2537A; --p-soft: #FCE6EE; --p-glow: rgba(214, 98, 138, .38);
  --g-p: linear-gradient(135deg, #EE98B2 0%, #DA6A90 55%, #C2537A 100%);
  --g-hero: linear-gradient(140deg, #F2A1BA 0%, #DD7499 46%, #B585D3 100%);
  --blob1: rgba(247, 182, 202, .55); --blob2: rgba(214, 196, 245, .45); --blob3: rgba(250, 205, 196, .45);
  --lv1: #EFA0B6; --lv2: #DC6A8E; --lv3: #B5395F;
  --rose-a: #F6A6BD; --rose-b: #DE6E94;
  --peach-a: #F9C3AC; --peach-b: #EC8C86;
  --lilac-a: #CBB7F3; --lilac-b: #9A7DDF;
  --coral-a: #FBA8A2; --coral-b: #E35F79;
  --mauve-a: #E8B4DA; --mauve-b: #B479BE;
  --r-xl: 28px; --r-lg: 22px; --r-md: 18px; --r-sm: 13px;
  --sh-1: 0 1px 2px rgba(90, 40, 70, .05), 0 8px 20px -6px rgba(150, 70, 110, .14);
  --sh-2: 0 2px 6px rgba(90, 40, 70, .06), 0 18px 40px -12px rgba(150, 70, 110, .24);
  --nav-h: 66px;
  --safe-b: max(env(safe-area-inset-bottom, 0px), var(--tg-safe-bottom, 0px));
  --tg-top: #FBF3F5; --tg-bottom: #F7EBF0;
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --font: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-d: "Playfair Display", Georgia, "Times New Roman", serif;
  --pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cdefs%3E%3Cg id='f'%3E%3Ccircle cx='0' cy='-4.6' r='3.3'/%3E%3Ccircle cx='4.4' cy='-1.4' r='3.3'/%3E%3Ccircle cx='2.7' cy='3.7' r='3.3'/%3E%3Ccircle cx='-2.7' cy='3.7' r='3.3'/%3E%3Ccircle cx='-4.4' cy='-1.4' r='3.3'/%3E%3C/g%3E%3C/defs%3E%3Cg fill='%23D9869F' fill-opacity='.13'%3E%3Cuse href='%23f' transform='translate(40 52)'/%3E%3Cuse href='%23f' transform='translate(176 34) scale(.75)'/%3E%3Cuse href='%23f' transform='translate(128 140) scale(1.1)'/%3E%3Cuse href='%23f' transform='translate(30 190) scale(.7)'/%3E%3Cuse href='%23f' transform='translate(206 206) scale(.85)'/%3E%3C/g%3E%3Cg fill='%23C9789C' fill-opacity='.14'%3E%3Cpath d='M98 66l1.6 4 4 1.6-4 1.6-1.6 4-1.6-4-4-1.6 4-1.6z'/%3E%3Cpath d='M214 120l1.2 3 3 1.2-3 1.2-1.2 3-1.2-3-3-1.2 3-1.2z'/%3E%3Cpath d='M80 218l1.2 3 3 1.2-3 1.2-1.2 3-1.2-3-3-1.2 3-1.2z'/%3E%3C/g%3E%3C/svg%3E");
}
html[data-theme="lilac"] {
  --bg: #F7F3FC; --bg-2: #EDE6F9;
  --surface-2: #FAF8FE;
  --ink: #2F2442; --ink-2: #5E5078; --muted: #8E84A3;
  --line: rgba(90, 70, 140, .10); --line-2: rgba(90, 70, 140, .17);
  --p-main: #A58BE6; --p-deep: #7C5CC9; --p-soft: #EFE9FC; --p-glow: rgba(124, 92, 201, .36);
  --g-p: linear-gradient(135deg, #BDA8F2 0%, #9577DE 55%, #7C5CC9 100%);
  --g-hero: linear-gradient(140deg, #C6B2F4 0%, #9C80E0 48%, #E28FB2 100%);
  --blob1: rgba(210, 196, 250, .55); --blob2: rgba(247, 190, 212, .40); --blob3: rgba(196, 220, 250, .40);
  --lv1: #C3AEF2; --lv2: #9576DE; --lv3: #6A43BF;
  --tg-top: #F7F3FC; --tg-bottom: #F1EBFA;
  --pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cdefs%3E%3Cg id='f'%3E%3Ccircle cx='0' cy='-4.6' r='3.3'/%3E%3Ccircle cx='4.4' cy='-1.4' r='3.3'/%3E%3Ccircle cx='2.7' cy='3.7' r='3.3'/%3E%3Ccircle cx='-2.7' cy='3.7' r='3.3'/%3E%3Ccircle cx='-4.4' cy='-1.4' r='3.3'/%3E%3C/g%3E%3C/defs%3E%3Cg fill='%239F86DA' fill-opacity='.13'%3E%3Cuse href='%23f' transform='translate(40 52)'/%3E%3Cuse href='%23f' transform='translate(176 34) scale(.75)'/%3E%3Cuse href='%23f' transform='translate(128 140) scale(1.1)'/%3E%3Cuse href='%23f' transform='translate(30 190) scale(.7)'/%3E%3Cuse href='%23f' transform='translate(206 206) scale(.85)'/%3E%3C/g%3E%3Cg fill='%238E74CF' fill-opacity='.14'%3E%3Cpath d='M98 66l1.6 4 4 1.6-4 1.6-1.6 4-1.6-4-4-1.6 4-1.6z'/%3E%3Cpath d='M214 120l1.2 3 3 1.2-3 1.2-1.2 3-1.2-3-3-1.2 3-1.2z'/%3E%3Cpath d='M80 218l1.2 3 3 1.2-3 1.2-1.2 3-1.2-3-3-1.2 3-1.2z'/%3E%3C/g%3E%3C/svg%3E");
}

/* ---------- база ---------- */
*, *::before, *::after { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  min-height: 100vh; min-height: var(--vh, 100dvh);
  color: var(--ink); font-family: var(--font); font-size: 15px; line-height: 1.45;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  overscroll-behavior-y: none; touch-action: manipulation;
}
button { font: inherit; color: inherit; cursor: pointer; -webkit-user-select: none; user-select: none; }
img { display: block; max-width: 100%; }
.bgfx {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    var(--pattern),
    radial-gradient(70% 42% at 0% 0%, var(--blob1), transparent 70%),
    radial-gradient(60% 38% at 100% 22%, var(--blob2), transparent 72%),
    radial-gradient(80% 48% at 85% 100%, var(--blob3), transparent 70%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
  background-size: 240px 240px, auto, auto, auto, auto;
}
#view {
  position: relative; max-width: 560px; margin: 0 auto;
  padding: calc(14px + var(--tg-safe-top, 0px)) 16px calc(var(--nav-h) + var(--safe-b) + 34px);
}
.i { width: 22px; height: 22px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.i.fill { fill: currentColor; stroke: none; }
.muted { color: var(--muted); font-size: 13px; }
.gem { width: 1em; height: 1em; display: block; }

/* ---------- переходы страниц ---------- */
@keyframes in-fwd { from { opacity: 0; transform: translate3d(26px, 0, 0); } to { opacity: 1; transform: none; } }
@keyframes in-back { from { opacity: 0; transform: translate3d(-26px, 0, 0); } to { opacity: 1; transform: none; } }
@keyframes in-tab { from { opacity: 0; transform: translate3d(0, 8px, 0); } to { opacity: 1; transform: none; } }
@keyframes rise { from { opacity: 0; transform: translate3d(0, 14px, 0) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { 0% { transform: scale(.9); opacity: 0; } 60% { transform: scale(1.04); opacity: 1; } 100% { transform: none; } }
#view.anim-fwd { animation: in-fwd .42s var(--ease-out) both; }
#view.anim-back { animation: in-back .42s var(--ease-out) both; }
#view.anim-tab { animation: in-tab .36s var(--ease-out) both; }
.st { animation: rise .55s var(--ease-out) both; animation-delay: calc(var(--i, 0) * 42ms + 30ms); }

/* ---------- кнопка «Назад» + заголовок страницы ---------- */
.backchip {
  display: inline-flex; align-items: center; gap: 2px; height: 36px; padding: 0 14px 0 8px; margin: 0 0 12px;
  border-radius: 999px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, .78);
  color: var(--ink-2); font-weight: 700; font-size: 13.5px; box-shadow: var(--sh-1);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.backchip .i { width: 18px; height: 18px; }
.backchip:active { transform: scale(.96); }
.phead { display: flex; gap: 13px; align-items: center; margin: 0 0 16px; }
.phead h2 { margin: 0; font-family: var(--font-d); font-size: clamp(21px, 6.2vw, 25px); line-height: 1.15; font-weight: 700; letter-spacing: -.005em; }
.phead p { margin: 4px 0 0; color: var(--ink-2); font-size: 13.5px; line-height: 1.45; }
.lead { color: var(--ink-2); font-size: 14px; margin: -4px 2px 16px; line-height: 1.5; }
.subhead { font-size: 13px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 22px 4px 10px; }

/* иконки-«плитки» в градиенте (как иконки приложений) */
.gi {
  width: 48px; height: 48px; border-radius: 15px; flex: 0 0 auto; display: grid; place-items: center; color: #fff;
  background: linear-gradient(145deg, var(--a), var(--b));
  box-shadow: 0 10px 18px -8px var(--b), inset 0 1px 0 rgba(255, 255, 255, .45);
}
.gi .i { width: 24px; height: 24px; stroke-width: 1.9; }
.gi.sm { width: 40px; height: 40px; border-radius: 13px; }
.gi.sm .i { width: 20px; height: 20px; }
.t-rose { --a: var(--rose-a); --b: var(--rose-b); --tint: rgba(246, 166, 189, .55); }
.t-peach { --a: var(--peach-a); --b: var(--peach-b); --tint: rgba(249, 195, 172, .55); }
.t-lilac { --a: var(--lilac-a); --b: var(--lilac-b); --tint: rgba(203, 183, 243, .55); }
.t-coral { --a: var(--coral-a); --b: var(--coral-b); --tint: rgba(251, 168, 162, .55); }
.t-mauve { --a: var(--mauve-a); --b: var(--mauve-b); --tint: rgba(232, 180, 218, .55); }
.t-brand { --a: var(--p-main); --b: var(--p-deep); --tint: var(--p-soft); }

/* ---------- главная: герой ---------- */
.hero {
  position: relative; overflow: hidden; isolation: isolate; border-radius: var(--r-xl);
  padding: 16px 18px 22px; margin-bottom: 12px; color: #fff; background: var(--g-hero);
  box-shadow: 0 22px 44px -18px var(--p-glow), inset 0 1px 0 rgba(255, 255, 255, .35);
}
.hero .blob { position: absolute; z-index: -1; border-radius: 50%; pointer-events: none; animation: drift 14s ease-in-out infinite alternate; }
.hero .b1 { width: 240px; height: 240px; right: -80px; top: -110px; background: radial-gradient(circle, rgba(255, 228, 238, .75), transparent 65%); }
.hero .b2 { width: 260px; height: 260px; left: -110px; bottom: -160px; background: radial-gradient(circle, rgba(226, 210, 255, .7), transparent 65%); animation-duration: 18s; }
.hero .b3 { width: 160px; height: 160px; right: 18%; bottom: -90px; background: radial-gradient(circle, rgba(255, 214, 200, .6), transparent 65%); animation-duration: 11s; }
@keyframes drift { to { transform: translate3d(-18px, 14px, 0) scale(1.1); } }
.hero .spark { position: absolute; z-index: -1; color: rgba(255, 255, 255, .85); font-size: 12px; animation: twinkle 3.2s ease-in-out infinite; }
.hero .s1 { top: 22px; left: 54%; } .hero .s2 { top: 64%; right: 26px; font-size: 9px; animation-delay: 1.1s; } .hero .s3 { bottom: 14px; right: 18px; font-size: 8px; animation-delay: 2s; }
@keyframes twinkle { 0%, 100% { opacity: .25; transform: scale(.8); } 50% { opacity: 1; transform: scale(1.15); } }
.hero-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.hello {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px 0 9px; border-radius: 999px;
  background: rgba(255, 255, 255, .22); border: 1px solid rgba(255, 255, 255, .38);
  font-size: 12.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 74%;
}
.hello .i { width: 15px; height: 15px; }
.gemwrap {
  width: 54px; height: 54px; border-radius: 18px; flex: 0 0 auto; display: grid; place-items: center; font-size: 31px;
  background: rgba(255, 255, 255, .92); box-shadow: 0 12px 24px -10px rgba(90, 20, 60, .45), inset 0 -2px 0 rgba(200, 120, 160, .12);
  animation: bob 4.2s ease-in-out infinite;
}
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-4px) rotate(3deg); } }
.hero h1 {
  margin: 12px 0 6px; font-family: var(--font-d); font-weight: 700; letter-spacing: -.01em;
  font-size: clamp(29px, 9vw, 36px); line-height: 1.02; text-shadow: 0 2px 14px rgba(110, 25, 65, .18);
}
.hero p { margin: 0; font-size: 13.5px; font-weight: 600; opacity: .94; }

/* ближайшее напоминание */
.next {
  width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 12px; margin-bottom: 12px; text-align: left;
  border-radius: var(--r-md); border: 1px solid var(--line); background: rgba(255, 255, 255, .9); box-shadow: var(--sh-1);
  transition: transform .18s var(--ease-out);
}
.next:active { transform: scale(.98); }
.next-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.next-tx .lbl { font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--p-deep); }
.next-tx b { font-size: 14.5px; line-height: 1.3; }
.next-tx span:last-child { font-size: 12.5px; color: var(--muted); }
.pill { flex: 0 0 auto; height: 28px; padding: 0 11px; border-radius: 999px; display: inline-flex; align-items: center; font-size: 12px; font-weight: 800; white-space: nowrap; background: var(--p-soft); color: var(--p-deep); }
.pill.hot { background: var(--g-p); color: #fff; box-shadow: 0 6px 14px -6px var(--p-glow); }

/* ---------- плитки главной ---------- */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tile {
  position: relative; overflow: hidden; isolation: isolate; display: flex; flex-direction: column; align-items: flex-start; gap: 12px;
  min-height: 156px; padding: 16px 14px 16px 16px; text-align: left;
  border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--surface); box-shadow: var(--sh-1);
  transition: transform .2s var(--ease-out), box-shadow .2s;
}
.tile::after { content: ""; position: absolute; z-index: -1; right: -42px; top: -42px; width: 130px; height: 130px; border-radius: 50%; background: radial-gradient(circle, var(--tint) 0%, transparent 70%); }
.tile:active { transform: scale(.965); box-shadow: 0 1px 2px rgba(90, 40, 70, .05); }
.tile .tx { display: flex; flex-direction: column; gap: 4px; margin-top: auto; }
.tile b { font-size: 15px; line-height: 1.25; font-weight: 800; letter-spacing: -.005em; }
.tile .tx span { font-size: 12.5px; line-height: 1.35; color: var(--muted); }
.tile .go { position: absolute; top: 14px; right: 12px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; color: var(--ink-2); background: rgba(255, 255, 255, .8); border: 1px solid var(--line); }
.tile .go .i { width: 15px; height: 15px; stroke-width: 2.2; }
.tile.wide { grid-column: 1 / -1; flex-direction: row; align-items: center; min-height: 0; padding: 14px 16px; background: linear-gradient(120deg, #FFFFFF 0%, #FBF1F8 100%); }
.tile.wide .tx { margin-top: 0; flex: 1; }
.tile.wide .go { position: static; order: 3; flex: 0 0 auto; }
.gi.ava { padding: 2px; border-radius: 50%; overflow: hidden; }
.gi.ava img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; border: 2px solid #fff; }
.tile.sos { background: linear-gradient(160deg, #FFFFFF 40%, #FFF0F1 100%); }

/* ---------- карточки / списки ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-1); padding: 16px; }
.list { display: grid; gap: 10px; }
.row {
  width: 100%; display: flex; align-items: center; gap: 12px; padding: 13px 12px 13px 15px; text-align: left;
  border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface); box-shadow: var(--sh-1);
  transition: transform .15s var(--ease-out);
}
.row:active { transform: scale(.985); }
.row .main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.row .main b { font-size: 15px; font-weight: 700; line-height: 1.3; }
.row .main span { font-size: 12.5px; color: var(--muted); }
.row > .i { color: var(--muted); width: 18px; height: 18px; stroke-width: 2.2; }
.meter { display: block; height: 5px; margin-top: 4px; border-radius: 6px; background: var(--p-soft); overflow: hidden; max-width: 170px; }
.meter i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--lv1), var(--lv2), var(--lv3)); background-size: 170px 100%; }
.badge { flex: 0 0 auto; min-width: 46px; height: 32px; padding: 0 9px; border-radius: 11px; display: grid; place-items: center; font-weight: 800; font-size: 14px; color: #fff; }
.badge.base { background: var(--surface-2) !important; color: var(--ink-2); border: 1px dashed var(--line-2); box-shadow: none !important; }
.lvbg1 { background: var(--lv1); } .lvbg2 { background: var(--lv2); } .lvbg3 { background: var(--lv3); }
.badge.lvbg1, .badge.lvbg2, .badge.lvbg3 { box-shadow: 0 6px 12px -6px var(--lv2); }
.linkcard {
  width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 12px; margin-top: 10px; text-align: left;
  border-radius: var(--r-md); border: 1px solid var(--line-2); background: rgba(255, 255, 255, .9); box-shadow: var(--sh-1);
}
.linkcard b { flex: 1; font-size: 15px; font-weight: 800; }
.linkcard > .i { color: var(--muted); width: 18px; height: 18px; stroke-width: 2.2; }
.linkcard:active { transform: scale(.985); }

/* поиск + фильтры */
.search { position: relative; margin: 0 0 10px; }
.search .i { position: absolute; left: 14px; top: 50%; margin-top: -10px; width: 20px; height: 20px; color: var(--muted); pointer-events: none; }
.search input {
  width: 100%; height: 48px; padding: 0 14px 0 44px; border-radius: 15px; border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, .9); font: inherit; font-size: 16px; color: var(--ink); -webkit-appearance: none; appearance: none;
}
.search input::placeholder { color: var(--muted); }
.search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.chips { display: flex; gap: 8px; overflow-x: auto; margin: 0 -16px 12px; padding: 2px 16px 4px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto; height: 36px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, .8); font-size: 13.5px; font-weight: 700; color: var(--ink-2); transition: background .2s, color .2s;
}
.chip.on { background: var(--ink); color: #fff; border-color: transparent; box-shadow: 0 6px 14px -6px rgba(58, 36, 52, .5); }
input:focus, textarea:focus { outline: none; border-color: var(--p-main) !important; box-shadow: 0 0 0 4px var(--p-soft); }

/* ---------- болевая статистика: деталь ---------- */
.score { display: flex; align-items: center; gap: 16px; }
.ring {
  --p: 0; width: 112px; height: 112px; border-radius: 50%; flex: 0 0 auto; display: grid; place-items: center;
  background: conic-gradient(var(--lvc, var(--p-deep)) calc(var(--p) * 1%), var(--p-soft) 0);
  transition: --p 1s var(--ease-out); animation: ringin 1.1s var(--ease-out) both;
}
@keyframes ringin { from { --p: 0; } }
.ring.lv1 { --lvc: var(--lv1); } .ring.lv2 { --lvc: var(--lv2); } .ring.lv3 { --lvc: var(--lv3); }
.ring-in { width: calc(100% - 18px); height: calc(100% - 18px); border-radius: 50%; background: var(--surface); display: flex; flex-direction: column; align-items: center; justify-content: center; box-shadow: inset 0 2px 8px rgba(150, 70, 110, .08); }
.ring-in b { font-size: 30px; font-weight: 800; line-height: 1; letter-spacing: -.02em; }
.ring-in span { font-size: 11.5px; color: var(--muted); font-weight: 700; margin-top: 3px; }
.ring.sm { width: 84px; height: 84px; }
.ring.sm .ring-in { width: calc(100% - 14px); height: calc(100% - 14px); }
.ring.sm .ring-in b { font-size: 24px; }
.score-tx { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.lvword { align-self: flex-start; height: 28px; padding: 0 12px; border-radius: 999px; display: inline-flex; align-items: center; font-size: 13px; font-weight: 800; color: #fff; }
.drops { display: inline-flex; gap: 2px; flex-wrap: nowrap; }
.drops .i { width: 15px; height: 15px; color: var(--lv2); }
.drops .off { color: rgba(120, 62, 98, .14); }
.drops.sm .i { width: 12px; height: 12px; }

/* отзывы */
.review { background: var(--surface); border: 1px solid var(--line); border-radius: 20px 20px 20px 6px; padding: 12px 14px; box-shadow: var(--sh-1); }
.rv-top { display: flex; align-items: center; gap: 8px; }
.rv-top .badge { min-width: 0; height: 24px; padding: 0 8px; border-radius: 8px; font-size: 12px; }
.rv-top .ndate { margin-left: auto; }
.rvtext { font-size: 14.5px; margin-top: 8px; white-space: pre-wrap; line-height: 1.5; }
.ndate { font-size: 12px; color: var(--muted); white-space: nowrap; }
.empty-card { display: flex; gap: 12px; align-items: center; padding: 16px; border-radius: var(--r-md); border: 1px dashed var(--line-2); background: rgba(255, 255, 255, .6); color: var(--ink-2); font-size: 14px; }
.empty-card .i { color: var(--p-main); width: 26px; height: 26px; }
.empty-card p { margin: 0; }

/* ---------- оценка боли (шкала) ---------- */
.rate { position: relative; overflow: hidden; transition: background .5s; }
.rate[data-lv="1"] { background: linear-gradient(170deg, #FFFFFF 30%, #FFF2F6 100%); }
.rate[data-lv="2"] { background: linear-gradient(170deg, #FFFFFF 20%, #FFE7EF 100%); }
.rate[data-lv="3"] { background: linear-gradient(170deg, #FFFFFF 10%, #FFDCE7 100%); }
html[data-theme="lilac"] .rate[data-lv="1"] { background: linear-gradient(170deg, #FFFFFF 30%, #F5F1FE 100%); }
html[data-theme="lilac"] .rate[data-lv="2"] { background: linear-gradient(170deg, #FFFFFF 20%, #ECE5FC 100%); }
html[data-theme="lilac"] .rate[data-lv="3"] { background: linear-gradient(170deg, #FFFFFF 10%, #E2D7FA 100%); }
.rate-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; min-height: 64px; }
.rate-num { display: flex; align-items: baseline; gap: 2px; }
.rate-num b { font-size: 52px; line-height: .95; font-weight: 800; letter-spacing: -.03em; color: var(--lvc, var(--ink)); transition: color .3s; }
.rate-num span { font-size: 17px; font-weight: 700; color: var(--muted); }
.rate[data-lv="1"] { --lvc: var(--lv1); } .rate[data-lv="2"] { --lvc: var(--lv2); } .rate[data-lv="3"] { --lvc: var(--lv3); }
.rate-word { font-size: 15px; font-weight: 800; color: var(--ink-2); text-align: right; padding-bottom: 6px; }
.rate-word.pop { animation: pop .38s var(--ease-out); }
.scale { position: relative; height: 58px; margin: 14px 0 0; touch-action: none; cursor: pointer; }
.scale-track { position: absolute; left: 12px; right: 12px; top: 50%; height: 8px; margin-top: -4px; border-radius: 8px; background: var(--p-soft); overflow: hidden; }
.scale-track i { position: absolute; left: 0; top: 0; bottom: 0; width: calc(var(--k, 0) * 100%); border-radius: 8px; background: linear-gradient(90deg, var(--lv1), var(--lv2), var(--lv3)); transition: width .4s var(--ease-out); }
.scale .dots { position: absolute; inset: 0; display: flex; justify-content: space-between; align-items: center; }
.scale .dots button { width: 24px; height: 48px; padding: 0; border: 0; background: none; display: grid; place-items: center; }
.scale .dots button::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 2px var(--line-2); transition: box-shadow .2s, transform .2s; }
.scale .dots button.on::before { box-shadow: 0 0 0 2px #fff; transform: scale(.7); }
.knob {
  position: absolute; top: 50%; left: calc(12px + (100% - 24px) * var(--k, 0)); width: 44px; height: 44px; margin: -22px 0 0 -22px;
  border-radius: 50%; display: grid; place-items: center; background: #fff; color: var(--lvc, var(--p-deep));
  box-shadow: 0 8px 18px -4px var(--p-glow), 0 0 0 4px rgba(255, 255, 255, .6); pointer-events: none;
  transition: left .45s var(--ease-spring), color .3s, opacity .25s, transform .3s var(--ease-spring);
}
.knob .i { width: 22px; height: 22px; }
.rate[data-lv="0"] .knob { opacity: 0; transform: scale(.5); }
.scale-nums { display: flex; justify-content: space-between; margin-top: 2px; }
.scale-nums span { width: 24px; text-align: center; font-size: 11.5px; font-weight: 700; color: var(--muted); }
.scale-ends { display: flex; justify-content: space-between; margin: 6px 4px 0; font-size: 12px; color: var(--muted); font-weight: 600; }

/* поля */
.field { display: block; margin-top: 14px; }
.field > span { display: block; font-size: 13px; font-weight: 800; color: var(--ink-2); margin: 0 4px 7px; }
.field em { font-style: normal; color: var(--muted); font-weight: 600; }
.ta {
  display: block; width: 100%; min-height: 104px; padding: 13px 14px; border-radius: 16px; border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, .92); font: inherit; font-size: 16px; line-height: 1.45; color: var(--ink); resize: vertical; -webkit-appearance: none; appearance: none;
}
.ta::placeholder { color: var(--muted); }
.datecard { display: flex; align-items: center; gap: 12px; }
.datecard .dtx { flex: 1; min-width: 0; }
.datecard label { display: block; font-size: 13px; font-weight: 800; color: var(--ink-2); margin-bottom: 6px; }
.date {
  width: 100%; height: 46px; padding: 0 12px; border-radius: 13px; border: 1px solid var(--line-2); background: var(--surface-2);
  font: inherit; font-size: 16px; font-weight: 700; color: var(--ink); -webkit-appearance: none; appearance: none; min-width: 0;
}
.hint { display: block; margin-top: 6px; font-size: 12px; color: var(--muted); }

/* категории записи */
.cats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.cat {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; min-height: 92px; padding: 12px 6px;
  border-radius: 18px; border: 1px solid var(--line-2); background: var(--surface); box-shadow: var(--sh-1);
  font-size: 12.5px; font-weight: 800; line-height: 1.25; color: var(--ink-2); text-align: center;
  transition: background .25s, color .25s, transform .2s var(--ease-spring);
}
.cat .i { width: 26px; height: 26px; color: var(--p-deep); transition: color .25s; }
.cat.on { background: var(--g-p); color: #fff; border-color: transparent; box-shadow: 0 12px 22px -10px var(--p-glow); transform: translateY(-2px); }
.cat.on .i { color: #fff; }

/* записи трекера */
.note { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px 10px 12px 14px; box-shadow: var(--sh-1); }
.nhead { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; }
.ncat { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px 0 8px; border-radius: 999px; background: var(--p-soft); color: var(--p-deep); font-size: 12px; font-weight: 800; }
.ncat .i { width: 15px; height: 15px; }
.nhead .ndate { margin-left: auto; }
.ndel { width: 32px; height: 32px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); display: grid; place-items: center; }
.ndel .i { width: 18px; height: 18px; }
.ndel:active { background: var(--p-soft); color: var(--p-deep); }
.ntext { font-size: 14.5px; white-space: pre-wrap; line-height: 1.5; padding-right: 4px; }

/* ---------- трекер ---------- */
.tcard {
  width: 100%; display: block; text-align: left; padding: 15px; border-radius: var(--r-lg); border: 1px solid var(--line);
  background: linear-gradient(160deg, #FFFFFF 55%, var(--surface-2) 100%); box-shadow: var(--sh-1); transition: transform .18s var(--ease-out);
}
.tcard:active { transform: scale(.985); }
.tc-top { display: flex; align-items: center; gap: 12px; }
.tc-name { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.tc-name b { font-size: 16.5px; font-weight: 800; line-height: 1.25; }
.tc-name span { font-size: 12.5px; color: var(--muted); }
.daychip { flex: 0 0 auto; height: 28px; padding: 0 11px; border-radius: 999px; display: inline-flex; align-items: center; font-size: 12.5px; font-weight: 800; color: var(--ink); background: var(--surface-2); border: 1px solid var(--line-2); }
.tc-next { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin-top: 14px; }
.tc-next .lbl { display: block; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.tc-next b { font-size: 15px; font-weight: 800; }
.tc-when { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.tc-when b { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.tc-when span { font-size: 12px; font-weight: 800; color: var(--p-deep); }
.tc-next.done { justify-content: flex-start; align-items: center; gap: 8px; font-weight: 700; color: var(--ink-2); }
.tc-next.done .i { color: var(--p-deep); }
.progress { height: 8px; margin-top: 10px; border-radius: 8px; background: var(--p-soft); overflow: hidden; }
.progress i { display: block; height: 100%; border-radius: 8px; background: var(--g-p); animation: grow 1s var(--ease-out) both; transform-origin: left; }
@keyframes grow { from { transform: scaleX(0); } }
.tv { display: flex; align-items: center; gap: 14px; }
.tv-tx { min-width: 0; }
.eyebrow { display: block; font-size: 11px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--p-deep); }
.tv-tx h3 { margin: 2px 0 2px; font-family: var(--font-d); font-size: 23px; line-height: 1.15; }

/* таймлайн напоминаний */
.timeline { padding: 6px 14px; }
.tl { position: relative; display: flex; align-items: center; gap: 10px; padding: 11px 0 11px 28px; }
.tl + .tl { border-top: 1px dashed var(--line-2); }
.tl::before { content: ""; position: absolute; left: 7px; top: 0; bottom: 0; width: 2px; background: var(--line-2); }
.tl:first-child::before { top: 50%; } .tl:last-child::before { bottom: 50%; } .tl:only-child::before { display: none; }
.tl .dot { position: absolute; left: 1px; top: 50%; width: 14px; height: 14px; margin-top: -7px; border-radius: 50%; background: #fff; border: 2px solid var(--line-2); }
.tl.now .dot { background: var(--p-deep); border-color: var(--p-deep); box-shadow: 0 0 0 5px var(--p-soft); }
.tl-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.tl-tx b { font-size: 15px; font-weight: 800; }
.tl-tx span { font-size: 12.5px; color: var(--muted); }
.tl .pill { height: 26px; }

/* ---------- полезная информация (плавный аккордеон) ---------- */
.acc { display: grid; gap: 10px; }
.qa { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--sh-1); overflow: hidden; transition: border-color .25s; }
.qa.open { border-color: var(--line-2); }
.qa-h { width: 100%; display: flex; align-items: center; gap: 12px; padding: 15px 14px 15px 16px; border: 0; background: none; text-align: left; font-size: 15px; font-weight: 800; color: var(--ink); }
.qa-h span { flex: 1; }
.pm { position: relative; width: 28px; height: 28px; flex: 0 0 auto; border-radius: 50%; background: var(--p-soft); transition: transform .35s var(--ease-out), background .25s; }
.pm::before, .pm::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 2px; margin: -1px 0 0 -6px; border-radius: 2px; background: var(--p-deep); transition: transform .35s var(--ease-out), background .25s; }
.pm::after { transform: rotate(90deg); }
.qa.open .pm { background: var(--p-deep); transform: rotate(180deg); }
.qa.open .pm::before, .qa.open .pm::after { background: #fff; }
.qa.open .pm::after { transform: rotate(0); }
.qa-b { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .4s var(--ease-out); }
.qa.open .qa-b { grid-template-rows: 1fr; }
.qa-b > div { overflow: hidden; }
.qa-in { padding: 0 16px 16px; }
.qa-in p { margin: 0; font-size: 14.5px; line-height: 1.55; color: var(--ink-2); }
.qa-in img { width: 100%; border-radius: 14px; border: 1px solid var(--line); margin-bottom: 12px; background: #fff; }
.qa-in .btn { margin-top: 12px; }

/* ---------- экстренная помощь ---------- */
.sosbar {
  width: 100%; display: flex; align-items: center; gap: 12px; padding: 13px 14px; margin-bottom: 14px; text-align: left; color: #fff;
  border: 0; border-radius: var(--r-md); background: linear-gradient(120deg, #EF8A9D 0%, #DA5C7C 100%);
  box-shadow: 0 14px 26px -12px rgba(218, 92, 124, .7), inset 0 1px 0 rgba(255, 255, 255, .3);
}
html[data-theme="lilac"] .sosbar { background: linear-gradient(120deg, #EE8FA5 0%, #C565A8 100%); }
.sosbar .ic { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; background: rgba(255, 255, 255, .22); flex: 0 0 auto; }
.sosbar .tx { flex: 1; display: flex; flex-direction: column; gap: 1px; }
.sosbar b { font-size: 15px; font-weight: 800; }
.sosbar span { font-size: 12.5px; opacity: .92; }
.sosbar:active { transform: scale(.985); }
.callout { display: flex; gap: 10px; align-items: flex-start; padding: 13px 14px; margin-bottom: 12px; border-radius: var(--r-md); background: rgba(255, 255, 255, .72); border: 1px solid var(--line-2); }
.callout .i { color: var(--p-deep); margin-top: 1px; }
.callout p { margin: 0; font-size: 14.5px; line-height: 1.55; }
.steps { display: grid; gap: 14px; }
.step { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; line-height: 1.5; }
.step .n { flex: 0 0 28px; height: 28px; border-radius: 10px; display: grid; place-items: center; color: #fff; font-size: 13px; font-weight: 800; background: var(--g-p); box-shadow: 0 6px 12px -6px var(--p-glow); margin-top: -1px; }
.step.sub { padding-left: 40px; gap: 10px; font-size: 14.5px; color: var(--ink-2); margin-top: -4px; }
.step.sub .n { display: none; }
.step.sub::before { content: ""; flex: 0 0 7px; height: 7px; margin-top: 8px; border-radius: 50%; background: var(--p-main); }
.step .hl { font-weight: 800; color: var(--p-deep); background: var(--p-soft); border-radius: 6px; padding: 0 4px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.step-video { display: flex; width: max-content; max-width: 100%; align-items: center; gap: 7px; margin-top: 8px; padding: 8px 14px 8px 11px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--p-soft); color: var(--p-deep); font: inherit; font-size: 13.5px; font-weight: 700; line-height: 1.2; cursor: pointer; box-shadow: var(--sh-1); -webkit-tap-highlight-color: transparent; }
.step-video .i { width: 17px; height: 17px; flex: 0 0 17px; }
.step-video:active { transform: scale(.97); }
.gallery { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 16px -16px 0; padding: 0 16px 4px; scrollbar-width: none; }
.gallery::-webkit-scrollbar { display: none; }
.gallery img { flex: 0 0 78%; max-width: 320px; scroll-snap-align: center; border-radius: 16px; border: 1px solid var(--line); background: #fff; box-shadow: var(--sh-1); cursor: zoom-in; }
.gallery img:only-child { flex-basis: 100%; max-width: none; }
.gal-hint { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 12px; color: var(--muted); font-weight: 600; }
.gal-hint .i { width: 15px; height: 15px; }

/* мастер */
.profile { text-align: center; padding: 24px 18px 20px; }
.avatar { position: relative; width: 112px; height: 112px; margin: 0 auto 12px; }
.avatar::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(from 200deg, #F6A6BD, #B585D3, #F9C3AC, #F6A6BD); animation: spin 10s linear infinite; }
.avatar > div { position: absolute; inset: 4px; border-radius: 50%; overflow: hidden; background: #fff; display: grid; place-items: center; font-size: 46px; border: 3px solid #fff; }
.avatar > div img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.avatar-gem { position: absolute; right: -2px; bottom: 2px; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-size: 20px; background: #fff; box-shadow: 0 6px 14px -4px rgba(150, 70, 110, .45); }
@keyframes spin { to { transform: rotate(360deg); } }
.profile .sub-role { display: block; margin-top: 4px; font-size: 13.5px; font-weight: 700; color: var(--ink-2); }
.profile h3 { margin: 0; font-family: var(--font-d); font-size: 24px; }
.profile .handle { display: inline-flex; margin-top: 6px; height: 26px; padding: 0 10px; border-radius: 999px; align-items: center; background: var(--p-soft); color: var(--p-deep); font-size: 12.5px; font-weight: 800; }
.profile p { margin: 14px 0 0; color: var(--ink-2); font-size: 14.5px; line-height: 1.55; }

/* ---------- работы мастера ---------- */
.mcard { padding: 16px; }
.mc-top { display: flex; align-items: center; gap: 14px; }
.avatar.sm { width: 84px; height: 84px; margin: 0; flex: 0 0 auto; }
.avatar.sm > div { inset: 3px; border-width: 2px; }
.avatar.sm .avatar-gem { width: 28px; height: 28px; font-size: 15px; right: -4px; bottom: 0; }
.mc-id { min-width: 0; }
.mc-id h3 { margin: 2px 0 3px; font-family: var(--font-d); font-size: clamp(16px, 5.2vw, 21px); line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mc-id .sub-role { display: block; font-size: 13px; font-weight: 700; color: var(--ink-2); }
.mc-stats { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; margin-top: 14px; }
.mc-stats div { text-align: center; padding: 10px 4px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); }
.mc-stats b { display: block; font-size: 19px; font-weight: 800; line-height: 1.1; letter-spacing: -.01em; }
.mc-stats span { font-size: 11.5px; color: var(--muted); font-weight: 700; }
.mc-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.mc-tags span { height: 26px; padding: 0 10px; border-radius: 999px; display: inline-flex; align-items: center; background: var(--p-soft); color: var(--p-deep); font-size: 12px; font-weight: 800; }
.mc-btns { display: grid; grid-template-columns: 1.25fr 1fr; gap: 8px; margin-top: 14px; }
.btn.sm { min-height: 48px; margin-top: 0; padding: 0 12px; font-size: 15px; border-radius: 15px; }

.stackwrap { padding-top: 4px; }
.stackwrap { overflow-x: clip; margin: 0 -16px; padding-left: 16px; padding-right: 16px; }
.stack { position: relative; z-index: 0; isolation: isolate; width: min(72%, 320px); aspect-ratio: 3 / 4; margin: 8px auto 0; left: -14px; touch-action: pan-y; }
.sc {
  position: absolute; inset: 0; margin: 0; overflow: hidden; border-radius: 24px; background: #fff; border: 4px solid #fff;
  box-shadow: 0 18px 36px -16px rgba(120, 50, 90, .45), 0 2px 6px rgba(120, 50, 90, .08);
  transform: translate3d(calc(var(--k, 0) * 10px), calc(var(--k, 0) * -4px), 0) rotate(calc(var(--k, 0) * 3.2deg)) scale(calc(1 - var(--k, 0) * .045));
  transform-origin: 50% 100%; transition: transform .5s var(--ease-spring), opacity .3s;
  -webkit-user-select: none; user-select: none; cursor: grab;
}
.sc.drag { transition: none; cursor: grabbing; }
.sc.hide { opacity: 0; }
.sc:not(.top) { pointer-events: none; }
.sc img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; -webkit-user-drag: none; }
.sc figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 30px 14px 12px; color: #fff; font-size: 13px; font-weight: 700; background: linear-gradient(transparent, rgba(40, 15, 30, .55)); }
.sc.ph { display: grid; place-items: center; }
.sc.ph .ph-gem { font-size: 72px; filter: drop-shadow(0 10px 16px rgba(150, 60, 100, .3)); }
.sc.ph figcaption { background: none; color: var(--ink-2); text-align: center; font-weight: 800; }
.sc.ph0 { background: linear-gradient(160deg, #FFF3F7, #F9D4E1); }
.sc.ph1 { background: linear-gradient(160deg, #F7F1FE, #E3D5FA); }
.sc.ph2 { background: linear-gradient(160deg, #FFF5F0, #FBDCCF); }
.sc.ph3 { background: linear-gradient(160deg, #FDF0F8, #F1D2E8); }
.sc.ph4 { background: linear-gradient(160deg, #FFF2F3, #FAD3D9); }
.stack-ctrl { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 18px; }
.sbtn { width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line-2); background: rgba(255, 255, 255, .92); display: grid; place-items: center; color: var(--ink); box-shadow: var(--sh-1); }
.sbtn:active { transform: scale(.92); }
#scount { min-width: 64px; text-align: center; font-weight: 800; font-size: 15px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.gal-hint.center { justify-content: center; text-align: center; }

.book {
  position: relative; overflow: hidden; isolation: isolate; margin-top: 22px; padding: 20px 18px 16px;
  border-radius: var(--r-xl); color: #fff; background: var(--g-hero);
  box-shadow: 0 22px 44px -18px var(--p-glow), inset 0 1px 0 rgba(255, 255, 255, .35);
}
.book .blob { position: absolute; z-index: -1; border-radius: 50%; pointer-events: none; animation: drift 14s ease-in-out infinite alternate; }
.book .b1 { width: 230px; height: 230px; right: -90px; top: -110px; background: radial-gradient(circle, rgba(255, 228, 238, .7), transparent 65%); }
.book .b2 { width: 230px; height: 230px; left: -100px; bottom: -130px; background: radial-gradient(circle, rgba(226, 210, 255, .6), transparent 65%); animation-duration: 18s; }
.eyebrow.light { color: rgba(255, 255, 255, .88); }
.book h3 { margin: 4px 0 6px; font-family: var(--font-d); font-size: 26px; line-height: 1.1; text-shadow: 0 2px 12px rgba(110, 25, 65, .18); }
.book p { margin: 0; font-size: 14px; line-height: 1.5; opacity: .95; }
.svc { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.svc-chip {
  height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .6);
  background: rgba(255, 255, 255, .16); color: #fff; font-size: 13.5px; font-weight: 800;
  transition: background .2s, color .2s, transform .25s var(--ease-spring);
}
.svc-chip.on { background: #fff; color: var(--p-deep); border-color: #fff; transform: translateY(-1px); box-shadow: 0 6px 14px -6px rgba(60, 10, 40, .4); }
.btn.white { margin-top: 16px; background: #fff; color: var(--p-deep); box-shadow: 0 12px 24px -12px rgba(60, 10, 40, .45); }
.book-note { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 10px; font-size: 12px; font-weight: 700; opacity: .9; }
.book-note .i { width: 15px; height: 15px; }

/* ---------- кнопки ---------- */
.btn {
  position: relative; overflow: hidden; width: 100%; min-height: 54px; margin-top: 12px; padding: 0 18px;
  display: flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 17px;
  font-size: 16px; font-weight: 800; letter-spacing: .005em; transition: transform .16s var(--ease-out), box-shadow .2s;
}
.btn .i { width: 21px; height: 21px; stroke-width: 2.1; }
.btn:active { transform: scale(.975); }
.btn.primary { color: #fff; background: var(--g-p); box-shadow: 0 14px 26px -12px var(--p-glow), inset 0 1px 0 rgba(255, 255, 255, .32); }
.btn.primary::after { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, .38) 50%, transparent 70%); transform: translateX(-130%); animation: shine 4.5s ease-in-out 1.2s infinite; pointer-events: none; }
@keyframes shine { 0%, 62% { transform: translateX(-130%); } 100% { transform: translateX(130%); } }
.btn.soft { color: var(--ink); background: rgba(255, 255, 255, .92); border: 1px solid var(--line-2); box-shadow: var(--sh-1); }
.btn.soft .i { color: var(--p-deep); }
.btn.ghost { color: #B8466A; background: transparent; border: 1.5px dashed rgba(184, 70, 106, .32); min-height: 50px; font-size: 15px; }
html[data-theme="lilac"] .btn.ghost { color: #8A4FB3; border-color: rgba(138, 79, 179, .32); }

/* ---------- скелетоны / пусто ---------- */
.sk { height: 66px; border-radius: var(--r-md); border: 1px solid var(--line); background: linear-gradient(90deg, rgba(255, 255, 255, .55) 25%, rgba(255, 255, 255, .95) 40%, rgba(255, 255, 255, .55) 60%); background-size: 300% 100%; animation: sk 1.3s ease-in-out infinite; }
@keyframes sk { from { background-position: 100% 0; } to { background-position: 0 0; } }
.empty { text-align: center; color: var(--ink-2); padding: 28px 18px; border-radius: var(--r-lg); border: 1px dashed var(--line-2); background: rgba(255, 255, 255, .6); font-size: 14.5px; line-height: 1.5; }
.empty .gi { margin: 0 auto 12px; }

/* ---------- нижнее меню ---------- */
#tabbar {
  position: fixed; z-index: 60; left: 50%; bottom: calc(var(--safe-b) + 10px); transform: translateX(-50%);
  width: calc(100% - 20px); max-width: 480px; height: var(--nav-h); padding: 6px;
  display: grid; grid-template-columns: repeat(5, 1fr); border-radius: 24px;
  background: rgba(255, 255, 255, .84); -webkit-backdrop-filter: blur(20px) saturate(1.7); backdrop-filter: blur(20px) saturate(1.7);
  border: 1px solid rgba(255, 255, 255, .95);
  box-shadow: 0 14px 34px -10px rgba(110, 50, 85, .30), 0 2px 6px rgba(110, 50, 85, .07), inset 0 1px 0 #fff;
  transition: transform .35s var(--ease-out), opacity .25s;
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { #tabbar { background: rgba(255, 255, 255, .97); } }
#tabbar .ind {
  position: absolute; top: 6px; bottom: 6px; left: 6px; width: calc((100% - 12px) / 5); border-radius: 18px;
  background: var(--g-p); box-shadow: 0 10px 20px -8px var(--p-glow), inset 0 1px 0 rgba(255, 255, 255, .35);
  transform: translateX(calc(var(--ti, 0) * 100%)); transition: transform .55s var(--ease-spring);
}
#tabbar button {
  position: relative; z-index: 1; min-width: 0; border: 0; background: none; border-radius: 18px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--ink-2); font-size: 11px; font-weight: 800; letter-spacing: 0; transition: color .3s;
}
#tabbar button span { white-space: nowrap; }
#tabbar button .i { width: 23px; height: 23px; stroke-width: 1.9; transition: transform .45s var(--ease-spring); }
#tabbar button.active { color: #fff; }
#tabbar button.active .i { transform: translateY(-1px) scale(1.08); }
#tabbar button:active .i { transform: scale(.86); }
body.kb #tabbar { transform: translate(-50%, 150%); opacity: 0; pointer-events: none; }

/* ---------- тост / лайтбокс ---------- */
.toast {
  position: fixed; z-index: 150; left: 50%; bottom: calc(var(--nav-h) + var(--safe-b) + 22px); transform: translate(-50%, 12px);
  width: max-content; max-width: calc(100vw - 40px); display: flex; align-items: center; gap: 8px; padding: 11px 16px 11px 12px; border-radius: 15px;
  background: rgba(50, 30, 44, .93); color: #fff; font-size: 14px; font-weight: 700; opacity: 0; pointer-events: none;
  box-shadow: 0 12px 28px -8px rgba(50, 30, 44, .4); transition: opacity .25s, transform .4s var(--ease-spring);
}
.toast .i { width: 20px; height: 20px; color: #FFC1D3; stroke-width: 2.2; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
body.kb .toast { bottom: calc(var(--safe-b) + 18px); }
.lb { position: fixed; z-index: 200; inset: 0; display: grid; place-items: center; padding: 18px; background: rgba(40, 20, 32, .74); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); animation: fade .2s both; }
.lb img { max-height: 82vh; border-radius: 18px; background: #fff; animation: pop .35s var(--ease-out) both; }
.lb .x { position: absolute; top: calc(14px + var(--tg-safe-top, 0px)); right: 14px; width: 42px; height: 42px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .92); color: var(--ink); display: grid; place-items: center; }

/* переключатель палитр — только на localhost */
/* переключатель стиля (Роза / Лаванда) — вверху главной, выбор клиентки */
.themesw { display: flex; width: max-content; gap: 4px; margin: 0 auto 12px; padding: 4px; border-radius: 999px; background: rgba(255, 255, 255, .92); box-shadow: var(--sh-1); border: 1px solid var(--line); }
.themesw button { border: 0; height: 32px; padding: 0 14px; border-radius: 999px; background: none; font-size: 12.5px; font-weight: 800; color: var(--ink-2); transition: background .25s, color .25s; }
.themesw button.on { background: var(--ink); color: #fff; }

/* ---------- экраны ---------- */
@media (max-width: 350px) {
  #view { padding-left: 12px; padding-right: 12px; }
  .chips { margin: 0 -12px 12px; padding: 2px 12px 4px; }
  .stackwrap { margin: 0 -12px; padding-left: 12px; padding-right: 12px; }
  .gallery { margin-left: -16px; margin-right: -16px; }
  .tiles { gap: 10px; }
  .tile { min-height: 148px; padding: 14px 12px; }
  .tile b { font-size: 14px; }
  .tile .tx span { font-size: 11.5px; }
  .gi { width: 44px; height: 44px; border-radius: 14px; }
  #tabbar { width: calc(100% - 12px); padding: 5px; }
  #tabbar .ind { top: 5px; bottom: 5px; left: 5px; width: calc((100% - 10px) / 5); }
  #tabbar button { font-size: 9.8px; }
  #tabbar button .i { width: 21px; height: 21px; }
  .mc-stats b { font-size: 16px; }
  .book h3 { font-size: 23px; }
  .ring { width: 96px; height: 96px; }
  .ring-in b { font-size: 26px; }
  .score { gap: 12px; }
  .cat { font-size: 11.5px; }
}
@media (min-width: 600px) {
  .tile { min-height: 168px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ---------- трекер: отметки процедур, завершённые (10.11) ---------- */
.sublead { margin: -4px 2px 8px; font-size: 13px; color: var(--muted); }
.tl-when { font-style: normal; font-size: 12px; font-weight: 800; color: var(--p-deep); margin-top: 2px; }
.markbtn { flex: 0 0 auto; height: 30px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--p-soft); color: var(--p-deep); font: inherit; font-size: 12.5px; font-weight: 800; cursor: pointer; }
.markbtn:active { transform: scale(.96); }
.tl.done .dot { display: grid; place-items: center; background: var(--p-deep); border-color: var(--p-deep); color: #fff; }
.tl.done .dot .i { width: 9px; height: 9px; stroke-width: 3.2; }
.tl.done .tl-tx b { color: var(--ink-2); }
.pill.ok { border: 0; cursor: pointer; gap: 4px; font: inherit; font-size: 12px; font-weight: 800; background: #E6F4EC; color: #3D8B63; }
.pill.ok .i { width: 13px; height: 13px; stroke-width: 2.6; }
.tcard.ended { opacity: .82; }
.tcard.ended .tc-top { margin-bottom: 0; }
.sheet-bg { position: fixed; inset: 0; z-index: 80; background: rgba(40, 20, 34, .38); display: flex; align-items: flex-end; justify-content: center; animation: fadein .18s ease both; }
.sheet { width: 100%; max-width: 520px; background: var(--surface); border-radius: 24px 24px 0 0; padding: 10px 18px calc(18px + env(safe-area-inset-bottom)); display: grid; gap: 10px; box-shadow: 0 -12px 40px -16px rgba(80, 30, 60, .45); animation: sheetup .28s cubic-bezier(.2, .9, .3, 1.1) both; }
.sheet-grip { width: 40px; height: 4px; border-radius: 4px; background: var(--line-2); margin: 0 auto 4px; }
.sheet h3 { margin: 0; font-size: 17px; font-weight: 800; }
.sheet p { margin: -4px 0 2px; font-size: 13px; }
.sheet .date { width: 100%; font-size: 16px; }
@keyframes sheetup { from { transform: translateY(100%); } to { transform: none; } }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
.ring-in .ring-d { margin-top: 0; font-size: 10.5px; }

.startbtn { display: inline-flex; align-items: center; gap: 5px; padding: 0; border: 0; background: none; font: inherit; font-size: 13px; color: var(--p-deep); font-weight: 700; cursor: pointer; text-decoration: underline dotted; text-underline-offset: 3px; }
.startbtn .i { width: 15px; height: 15px; }

.btn.danger { color: #C24D63; background: rgba(255, 255, 255, .7); border: 1px solid rgba(194, 77, 99, .28); box-shadow: none; }
.btn.danger .i { color: #C24D63; }
