/* Цвета — только через переменные. Значения ниже = тема «Пудра» (дефолт и фолбэк);
   активная тема переопределяет их инлайн-<style> в base.html (app.themes). */
:root{
  --bg:#FFF0F5; --card:#FFFFFF; --text:#140F12; --muted:#6B5A62; --ph:#7A6A72; --line:#F6DCE6;
  --veil:rgba(255,255,255,.6); --veil-soft:rgba(255,255,255,.35);
  --overlay:rgba(20,15,18,.45); --shade:rgba(20,15,18,.045);
  --shadow:rgba(20,15,18,.10); --shadow-strong:rgba(20,15,18,.25);
  --accent:#FF4F93; --on-accent:#140F12; --accent-soft:#FFE0EC; --accent-border:#F2A8C6;
  --today-tint:rgba(255,79,147,.05);
  --invert:#140F12; --on-invert:#FFFFFF; --invert-text:#F3E6EC; --invert-muted:#CDBAC3;
  --invert-accent:#FF4F93;
  --danger:#C62A5E; --ok-bg:#DDF3E4; --off-bg:#EEE3E8; --ev-done:#FFB3CF; --now:#E5484D;
  --note-bg:#EDE7EA; --note-border:#BCAFB6;
  --own-bg:#FFE9A8; --own-text:#140F12; --own-soft:#FFF1C9; --own-border:#E8B421;
  --lightbox:#0B080A; --lightbox-text:#FFFFFF; --lightbox-nav:rgba(255,255,255,.08);
  --photo-veil:rgba(20,15,18,.5); --photo-veil-strong:rgba(20,15,18,.7);
  --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(--text);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(--text)}
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(--accent);color:var(--on-accent);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);color:var(--text);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:var(--veil);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:var(--veil);color:var(--muted);font-size:15px;text-align:center}
.av{width:44px;height:44px;border-radius:22px;background:var(--accent-soft);color:var(--text);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(--accent);color:var(--on-accent)}
.btn.dark{background:var(--invert);color:var(--on-invert)}
.btn.white{background:var(--card);color:var(--text)}
.btn.ghost{background:transparent;border:1.5px solid var(--text)}
.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);color:var(--text);display:flex;align-items:center;justify-content:center;gap:6px;font-size:14px;font-weight:800}
.act.dark{background:var(--invert);color:var(--on-invert)}
.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);color:var(--text);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(--accent)}
.err{background:var(--card);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(--invert);color:var(--on-invert);border-radius:var(--r-md);padding:14px 16px;display:flex;flex-direction:column;gap:10px}
.warn b{color:var(--invert-accent)}

/* Сегменты */
.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);color:var(--text);font-size:14px;font-weight:700;display:flex;align-items:center;white-space:nowrap;flex-shrink:0}
.seg .on{background:var(--invert);color:var(--on-invert);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 var(--shadow);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(--invert);color:var(--on-invert);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:var(--overlay);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(--invert);color:var(--on-invert);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);color:var(--text);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(--invert);color:var(--on-invert);font-weight:800}
.seg label:has(input:focus-visible){box-shadow:0 0 0 2px var(--accent)}
.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:var(--veil-soft);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(--text);position:absolute;bottom:7px}
.day.off{opacity:.55}
.day.off .wd::after{content:" · вых"}
.day.today{box-shadow:inset 0 0 0 2px var(--text)}
.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 var(--accent-border);color:var(--muted);font-weight:700;font-size:14px}
.free b{color:var(--text)}
.badge{display:inline-flex;align-items:center;height:24px;padding:0 10px;border-radius:12px;font-size:12px;font-weight:800;background:var(--accent-soft);align-self:flex-start}
.badge.done{background:var(--ok-bg)}
.badge.cancelled,.badge.noshow{background:var(--off-bg);color:var(--muted)}
.pill{min-height:34px;padding:6px 14px;border-radius:17px;display:inline-flex;align-items:center;font-size:14px;font-weight:800;line-height:1.25}
.pill.pink{background:var(--accent);color:var(--on-accent)}
.pill.line{border:1.5px solid var(--text)}

/* Фото и видео */
.mgrid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
.mgrid.small{grid-template-columns:repeat(4,minmax(0,1fr));gap:4px}
.mtile{position:relative;aspect-ratio:1;border-radius:16px;overflow:hidden;background:var(--accent-soft);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;text-align:center;font-size:12px;font-weight:800;color:var(--muted);padding:0}
.mgrid.small .mtile{border-radius:12px}
.mtile img{width:100%;height:100%;object-fit:cover;display:block}
.mtile .play{position:absolute;left:6px;bottom:6px;background:var(--photo-veil-strong);color:var(--lightbox-text);border-radius:10px;padding:2px 8px;font-size:11px}
.mtile .more{position:absolute;inset:0;background:var(--photo-veil);color:var(--lightbox-text);display:flex;align-items:center;justify-content:center;font-size:18px}
.mtile.off{padding:8px;background:var(--veil)}
.mtile.add{background:var(--card);border:1.5px dashed var(--accent-border);cursor:pointer;color:var(--text)}
.spin{width:22px;height:22px;border-radius:50%;border:3px solid var(--accent-soft);border-top-color:var(--accent);animation:sp 1s linear infinite}
@keyframes sp{to{transform:rotate(360deg)}}
.media-block{display:flex;flex-direction:column;gap:8px}
.lb{position:fixed;inset:0;z-index:60;background:var(--lightbox);display:flex;flex-direction:column}
.lb-top{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:calc(10px + env(safe-area-inset-top)) 12px 10px;color:var(--lightbox-text)}
.lb .rb{color:var(--text);font-size:18px;font-weight:800}
.lb-count{font-weight:800;font-size:14px}
.lb-body{flex:1;min-height:0;display:flex;align-items:center;justify-content:center;padding-bottom:env(safe-area-inset-bottom)}
.lb-body img,.lb-body video{max-width:100%;max-height:100%;object-fit:contain}
.lb-nav{position:absolute;top:50%;transform:translateY(-50%);width:44px;height:64px;color:var(--lightbox-text);font-size:40px;background:var(--lightbox-nav);border-radius:16px}
.lb-nav.prev{left:6px}.lb-nav.next{right:6px}
img.av{display:block}

/* Аналитика */
.stat-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.stat{background:var(--card);border-radius:var(--r-md);padding:14px 16px;display:flex;flex-direction:column;gap:2px;min-width:0}
.stat.wide{grid-column:1/-1}
.stat.dark{background:var(--invert);color:var(--on-invert)}
.stat.pink{background:var(--accent);color:var(--on-accent)}
.stat.light{background:var(--veil)}
.stat-label{font-size:13px;font-weight:800;color:var(--muted)}
.stat.dark .stat-label{color:var(--invert-accent)}
.stat.pink .stat-label{color:var(--on-accent)}
.stat-num{font-family:var(--head);font-weight:700;font-size:24px;line-height:1.25;white-space:nowrap}
.stat.dark .stat-num{font-size:34px}
.plan-row{display:grid;grid-template-columns:1fr auto auto;gap:12px;align-items:baseline;min-height:44px;padding:10px 0;border-bottom:1px solid var(--line)}
.plan-row:last-child{border-bottom:0}
.plan-row b{white-space:nowrap}
@media (max-width:380px){.stat-num{font-size:21px}}
.price-edit{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
.price-edit .inp{min-width:0}
input[type=date].inp,input[type=time].inp{padding:0 12px;-webkit-appearance:none;appearance:none}

/* Вид недели */
.view-switch a{background:var(--veil)}
.view-switch .on{background:var(--invert)}
.week-list{gap:10px}
.wday{background:var(--card);border-radius:var(--r-md);padding:12px 16px;display:flex;flex-direction:column;gap:4px}
.wday.is-today{box-shadow:inset 0 0 0 2px var(--text)}
.wday.is-off{background:var(--veil)}
.wday-head{display:flex;justify-content:space-between;align-items:baseline;gap:10px;padding-bottom:6px;border-bottom:1px solid var(--line);min-height:32px}
.wday-date{font-family:var(--head);font-size:17px}
.wday-date b{font-size:13px;color:var(--accent);margin-right:4px}
.wline{display:flex;gap:10px;align-items:baseline;font-size:15px;line-height:1.35;min-height:32px;padding:4px 0}
.wline b{font-family:var(--head);min-width:44px;flex-shrink:0}
.note-line{color:var(--muted)}
.note-line b{color:var(--accent)}
.note-line.done span{text-decoration:line-through}
/* Заметки */
.notes{display:flex;flex-direction:column;gap:6px}
.note{display:flex;align-items:center;gap:10px;min-height:44px}
.note-check{width:28px;height:28px;border-radius:14px;border:2px solid var(--text);flex-shrink:0;display:flex;align-items:center;justify-content:center;font-weight:800;font-size:14px}
.note.done .note-check{background:var(--invert);color:var(--on-invert);border-color:var(--invert)}
.note-text{flex:1;min-width:0;font-size:15px;line-height:1.35;word-break:break-word}
.note.done .note-text{text-decoration:line-through;color:var(--muted)}
.note-del{width:36px;height:36px;color:var(--muted);flex-shrink:0;font-size:14px}
.note-add{display:flex;gap:8px;align-items:center}
.note-add .inp{height:44px}

/* ---------- Календарь: день / неделя / месяц ---------- */
.page.wide{max-width:1200px}
.cal-hero{gap:12px}
.cal-top{display:flex;align-items:center;gap:8px}
.cal-top h1{flex:1;text-align:center;font-size:20px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cal-today{order:5}
.view-switch{justify-content:center}
.cal-card{padding:8px 8px 10px;overflow:hidden}
.tgrid{display:grid;grid-template-columns:40px minmax(0,1fr);padding-top:8px}
.tg-hours{position:relative}
.tg-hours span{position:absolute;right:6px;transform:translateY(-7px);font-size:11px;color:var(--muted);font-weight:700}
.tg-cols{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr)}
.tg-col{position:relative;border-left:1px solid var(--line);cursor:pointer;
  background-image:repeating-linear-gradient(to bottom,var(--line) 0,var(--line) 1px,transparent 1px,transparent var(--hour))}
.tg-col.is-today{background-color:var(--today-tint)}
.tg-shade{position:absolute;left:0;right:0;background:var(--shade);pointer-events:none}
.tg-free{position:absolute;left:4px;right:4px;border:1.5px dashed var(--accent-border);border-radius:12px;color:var(--muted);font-size:12px;font-weight:700;padding:4px 8px;overflow:hidden;background:var(--veil)}
.tg-ev{position:absolute;z-index:2;background:var(--accent);color:var(--on-accent);border-radius:10px;padding:4px 7px;overflow:hidden;font-size:12px;line-height:1.25;display:flex;flex-direction:column;gap:1px;box-shadow:0 1px 3px var(--shadow)}
.tg-ev b{font-family:var(--head);font-size:12px}
.tg-ev.done{background:var(--ev-done);color:var(--text)}
.tg-ev.noshow{background:var(--off-bg);color:var(--muted);text-decoration:line-through}
.tg-name{font-weight:800;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tg-svc{font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tg-now{position:absolute;left:0;right:0;height:2px;background:var(--now);z-index:3;pointer-events:none}
.tg-now::before{content:"";position:absolute;left:-4px;top:-3px;width:8px;height:8px;border-radius:4px;background:var(--now)}
/* неделя */
.wk-head,.wk-allday{display:grid;grid-template-columns:40px repeat(7,minmax(0,1fr))}
.wk-day{display:flex;flex-direction:column;align-items:center;gap:1px;padding:2px 0 6px;font-size:11px;color:var(--muted);font-weight:700}
.wk-day b{font-family:var(--head);font-size:16px;color:var(--text);width:30px;height:30px;border-radius:15px;display:flex;align-items:center;justify-content:center}
.wk-day.is-today b{background:var(--accent);color:var(--on-accent)}
.wk-day.is-off{opacity:.55}
.wk-allday{border-top:1px solid var(--line);border-bottom:1px solid var(--line);min-height:30px}
.allday-label{font-size:10px;font-weight:800;color:var(--muted);padding:6px 4px 0 0;text-align:right}
.wk-notes{display:flex;flex-direction:column;gap:2px;padding:3px 2px;border-left:1px solid var(--line);min-width:0}
.allday-note{background:var(--note-bg);border-radius:6px;padding:2px 6px;font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block}
.allday-note.done{text-decoration:line-through;opacity:.6}
.wk-notes .allday-note{font-size:10px;padding:1px 4px}
.allday{display:flex;gap:10px;align-items:flex-start;padding:10px 14px}
.allday .allday-label{padding-top:3px;font-size:12px}
.allday-items{display:flex;flex-wrap:wrap;gap:6px;min-width:0;flex:1}
@media (max-width:600px){
  .wk-head .wk-day span{font-size:10px}
  .tgrid .tg-cols:has(.tg-col:nth-child(2)) .tg-ev{padding:2px 3px;font-size:10px;border-radius:6px}
  .tgrid .tg-cols:has(.tg-col:nth-child(2)) .tg-ev b{font-size:10px}
}
/* месяц */
.mcal-head{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));font-size:11px;font-weight:800;text-align:center;color:var(--muted);padding:2px 0 6px}
.mcal-row{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));border-top:1px solid var(--line)}
.mc{min-height:86px;padding:3px;border-left:1px solid var(--line);display:flex;flex-direction:column;gap:2px;overflow:hidden;min-width:0}
.mc:first-child{border-left:0}
.mc.out{opacity:.4}
.mc.is-off{background:var(--shade)}
.mc-num{font-size:12px;font-weight:800;align-self:flex-end;min-width:22px;height:20px;border-radius:10px;display:flex;align-items:center;justify-content:center;padding:0 5px}
.mc.is-today .mc-num{background:var(--accent);color:var(--on-accent)}
.mc-ev{font-size:10px;line-height:1.3;background:var(--accent-soft);border-left:3px solid var(--accent);border-radius:4px;padding:1px 3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mc-ev b{font-weight:800}
.mc-ev.done{border-left-color:var(--ev-done)}
.mc-ev.noshow{opacity:.5;text-decoration:line-through}
.mc-note{font-size:10px;line-height:1.3;background:var(--note-bg);border-left:3px solid var(--note-border);border-radius:4px;padding:1px 3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mc-note.done{text-decoration:line-through;opacity:.6}
.mc-more{font-size:10px;color:var(--muted);font-weight:700}
@media (min-width:700px){.mc{min-height:118px;padding:5px}.mc-ev,.mc-note,.mc-more{font-size:12px}}
.fab{position:fixed;right:max(20px,calc(50% - 580px));bottom:calc(92px + env(safe-area-inset-bottom));width:56px;height:56px;border-radius:28px;background:var(--invert);color:var(--on-invert);display:flex;align-items:center;justify-content:center;box-shadow:0 6px 18px var(--shadow-strong);z-index:25}
/* заметки: дата и время */
.note-add{flex-direction:column;align-items:stretch}
.note-when{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto;gap:8px;align-items:end}
.note-when label{display:flex;flex-direction:column;gap:4px;min-width:0}
.note-when label span{font-size:12px;font-weight:700;color:var(--muted);padding-left:6px}
.note-when .inp{height:44px}
.note-text b{font-family:var(--head)}

.cal-top h1{font-size:18px}
.cal-today{padding:0 12px}
.mc-ev{padding:1px 2px;border-left-width:2px}
.mc-ev b{margin-right:2px}
.mcal .mc{min-height:78px}

.tg-ev.own{background:var(--own-bg);color:var(--own-text)}
.mc-ev.own{background:var(--own-soft);border-left-color:var(--own-border)}

.mc-note{padding:1px 3px}

/* Обучение-подсказки (coach marks) */
.guide-card{position:fixed;left:16px;right:16px;bottom:calc(78px + env(safe-area-inset-bottom));max-width:448px;margin:0 auto;background:var(--card);color:var(--text);border-radius:var(--r-md);padding:14px 16px;display:flex;flex-direction:column;gap:8px;box-shadow:0 8px 30px var(--shadow-strong);z-index:30;border:1.5px solid var(--accent-border)}
.guide-num{font-size:12px;font-weight:800;color:var(--accent)}
.guide-text{font-size:14px;line-height:1.45}
.guide-skip{background:none;border:0;color:var(--muted);font-size:13px;font-weight:700;padding:6px;cursor:pointer}
@keyframes gpulse{0%,100%{box-shadow:0 0 0 2px var(--accent)}50%{box-shadow:0 0 0 7px var(--accent-border)}}
.guide-pulse{animation:gpulse 1.2s ease-in-out infinite;position:relative;z-index:31}

/* ---------- индикация окончания подписки ---------- */
.subdate{padding:2px 8px;border-radius:10px;font-weight:800;white-space:nowrap}
.subdate.warn{background:var(--own-bg);color:var(--own-text)}
.subdate.crit{background:color-mix(in srgb, var(--danger) 14%, var(--card));color:var(--danger)}
.subchip{display:flex;align-items:center;gap:8px;padding:12px 16px;border-radius:18px;font-size:14.5px;font-weight:700;line-height:1.4;text-decoration:none}
.subchip.warn{background:var(--own-bg);color:var(--own-text);border:1.5px solid var(--own-border)}
.subchip.crit{background:color-mix(in srgb, var(--danger) 14%, var(--card));color:var(--danger);border:1.5px solid var(--danger)}
@media (prefers-reduced-motion: no-preference){
  .subdate.crit,.subchip.crit .subdate{animation:subBlink 1.1s ease-in-out infinite}
}
@keyframes subBlink{0%,100%{opacity:1}50%{opacity:.3}}
