/* Самостійна публічна сторінка ridmi.ua/@нік — дизайн прототипу «профіль книжкового блогера».
   Без стилів сайту: свої токени, світла й темна тема (системна або збережений вибір сайту: html[data-theme]). */
:root{
  --bg:#E9F2FB; --surface:#FFFFFF; --ink:#27324A; --muted:#56698F; --line:#C9DEF4;
  --blue:#56698F; --blue-ink:#FFFFFF; --coral:#F08365; --yellow:#FECC00; --lemon:#FEF6B5; --rose:#FBE4E4;
  --ok:#2E8B57; --bad:#D1462F;
  --display:'Roboto','Arial Black',system-ui,sans-serif;
  --body:'Comfortaa',system-ui,-apple-system,'Segoe UI',sans-serif;
  color-scheme:light;
}
@media (prefers-color-scheme:dark){
  :root:not([data-theme="light"]){ --bg:#18203A; --surface:#222C47; --ink:#E9F2FB; --muted:#C9DEF4; --line:#34426A;
    --blue:#C9DEF4; --blue-ink:#18203A; --lemon:#3A3A2A; --rose:#3A2E3E; color-scheme:dark; }
}
:root[data-theme="dark"]{ --bg:#18203A; --surface:#222C47; --ink:#E9F2FB; --muted:#C9DEF4; --line:#34426A;
  --blue:#C9DEF4; --blue-ink:#18203A; --lemon:#3A3A2A; --rose:#3A2E3E; color-scheme:dark; }

*,*::before,*::after{ box-sizing:border-box; }
html{ -webkit-text-size-adjust:100%; }
body{ margin:0; min-height:100vh; background:var(--bg); color:var(--ink); font-family:var(--body); font-size:15px;
  line-height:1.55; -webkit-font-smoothing:antialiased; padding:env(safe-area-inset-top,0) 0 env(safe-area-inset-bottom,0); }
a{ color:inherit; }
button{ font:inherit; color:inherit; cursor:pointer; }
:focus-visible{ outline:3px solid var(--coral); outline-offset:2px; }
@media (prefers-reduced-motion:reduce){ *{ transition:none !important; animation:none !important; } }

.rpf-app{ max-width:560px; margin:0 auto; padding:0 16px 40px; }
/* на телефоні сторінка не «їздить» уліво-вправо, навіть якщо щось випадково ширше за екран
   (clip, а не hidden: не робить контейнер прокрутним і не ламає position:sticky шапки) */
html, body{ overflow-x:clip; }

/* верх: логотип і адреса сторінки */
.rpf-top{ position:sticky; top:0; z-index:20; background:var(--bg); padding:10px 0; display:flex; justify-content:space-between;
  align-items:center; gap:10px; border-bottom:1px solid var(--line); }
.rpf-logo{ display:block; text-decoration:none; flex:0 0 auto; }
.rpf-logo img{ display:block; height:30px; width:auto; }
@media (prefers-color-scheme:dark){ :root:not([data-theme="light"]) .rpf-logo img{ filter:brightness(0) invert(.92); } }
:root[data-theme="dark"] .rpf-logo img{ filter:brightness(0) invert(.92); }
.rpf-where{ font-size:13px; color:var(--muted); min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
button.rpf-where{ padding:6px 0 6px 8px; border:0; background:none; font-family:inherit; cursor:pointer; text-align:right; }
button.rpf-where:hover{ color:var(--ink); text-decoration:underline; text-underline-offset:3px; }
button.rpf-where.is-copied{ color:var(--ok); text-decoration:none; }

/* плашка «бачите лише ви / тестування» */
.rpf-note{ margin-top:18px; background:var(--lemon); border-radius:16px; padding:12px 14px; font-size:14px; }

/* плашка профілю. Коло — фоном (radial-gradient): елемент за межами блоку з overflow:hidden робив його
   прокручуваним, і фокус на кнопці мови зсував вміст */
.rpf-hero{ margin-top:18px; position:relative; overflow:hidden; border-radius:28px; padding:22px 20px 20px; color:#fff;
  background:radial-gradient(circle 85px at calc(100% - 45px) 45px, var(--hero2, var(--yellow)) 99%, transparent 100%),
             var(--hero, var(--coral)); }
.rpf-hero__top{ display:flex; gap:14px; align-items:center; padding-right:86px; }
.rpf-avatar{ flex:0 0 auto; width:72px; height:72px; border-radius:24px; background:#fff; color:var(--hero, var(--coral));
  display:grid; place-items:center; font:900 26px/1 var(--display); }
.rpf-hero__who{ min-width:0; }
.rpf-name{ margin:0; font:900 27px/1.05 var(--display); overflow-wrap:anywhere; }
.rpf-handle{ margin-top:4px; font-size:13px; opacity:.9; overflow-wrap:anywhere; }
.rpf-bio{ margin:14px 0 0; max-width:60ch; overflow-wrap:anywhere; }
.rpf-nums{ display:flex; gap:18px; flex-wrap:wrap; margin-top:14px; font-size:13px; }
.rpf-nums b{ display:block; font:900 20px/1.2 var(--display); }

/* перемикач мови — без перезавантаження */
.rpf-langs{ position:absolute; right:14px; top:14px; z-index:2; display:inline-flex; border-radius:999px; overflow:hidden;
  background:rgba(255,255,255,.9); }
.rpf-langs button{ border:0; margin:0; background:none; min-width:38px; min-height:30px; padding:4px 10px;
  font:700 12px/1 var(--body); color:#27324A; }
.rpf-langs button[aria-pressed="true"]{ background:#27324A; color:#fff; }

/* заклик створити свою сторінку */
.rpf-cta{ margin-top:30px; background:var(--lemon); border-radius:22px; padding:18px; text-align:center; }
.rpf-cta h3{ margin:0 0 10px; font:700 18px/1.3 var(--display); }
.rpf-btn{ display:inline-flex; align-items:center; justify-content:center; gap:6px; min-height:46px; padding:12px 18px; border:0;
  border-radius:16px; background:var(--coral); color:#fff; font-weight:700; text-decoration:none; }

/* помилка */
.rpf-error{ margin-top:48px; text-align:center; }
.rpf-error__code{ font:900 64px/1 var(--display); color:var(--coral); }
.rpf-error__title{ margin:12px 0 8px; font:900 24px/1.2 var(--display); }
.rpf-error__text{ margin:0 0 18px; color:var(--muted); }

.rpf-foot{ margin:18px 0 0; text-align:center; font-size:13px; color:var(--muted); }

@media (max-width:420px){
  .rpf-name{ font-size:23px; }
  .rpf-avatar{ width:60px; height:60px; border-radius:20px; font-size:22px; }
  .rpf-hero__top{ padding-right:0; margin-top:26px; }
}

/* фото з профілю замість ініціалів */
.rpf-avatar--img{ overflow:hidden; background:var(--surface); }
.rpf-avatar img{ display:block; width:100%; height:100%; object-fit:cover; }

/* соцмережі (плитки з ніком) і контакти («пігулки») — як у прототипі */
.rpf-linkbox{ margin-top:14px; }
.rpf-links{ display:grid; grid-template-columns:minmax(0, 1fr); gap:8px; }
.rpf-link{ display:flex; justify-content:space-between; align-items:center; gap:12px; min-width:0; min-height:48px; padding:13px 16px;
  background:var(--surface); border:1px solid var(--line); border-radius:16px; color:var(--ink); font-weight:700; text-decoration:none; }
.rpf-link > span{ min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--muted); font-weight:400; font-size:13px; }
.rpf-contacts{ display:flex; flex-wrap:wrap; gap:8px; margin-top:10px; }
.rpf-links + .rpf-contacts{ margin-top:10px; }
.rpf-linkbox > .rpf-contacts:first-child{ margin-top:0; }
.rpf-contact{ display:inline-flex; align-items:center; gap:6px; min-height:40px; padding:9px 14px; background:var(--surface);
  border:1px solid var(--line); border-radius:999px; color:var(--ink); font-weight:700; font-size:14px; text-decoration:none; }
@media (hover:hover){ .rpf-link:hover, .rpf-contact:hover{ border-color:var(--muted); } }

/* вішлісти: вкладки між вішлістами, книжки «сторінками» по 6 із гортанням (як у прототипі) */
.rpf-wl{ margin-top:26px; }
.rpf-wl__head{ display:flex; justify-content:space-between; align-items:center; gap:10px; margin-bottom:10px; }
.rpf-h2{ margin:0; font:900 21px/1.2 var(--display); }
.rpf-arrows{ display:flex; gap:6px; }
.rpf-arrows button, .rpf-bnav > button{ width:40px; height:40px; border-radius:50%; border:1.5px solid var(--line); background:var(--surface);
  font-size:22px; line-height:1; font-weight:700; color:var(--ink); padding:0; }
.rpf-arrows button:disabled, .rpf-bnav > button:disabled{ opacity:.35; cursor:default; }
.rpf-wltabs{ display:flex; gap:8px; overflow-x:auto; scrollbar-width:none; margin:0 -16px 12px; padding:2px 16px; scroll-padding:0 16px; }
.rpf-wltabs::-webkit-scrollbar{ display:none; }
.rpf-wltabs button{ flex:0 0 auto; max-width:220px; border:1.5px solid var(--line); background:var(--surface); border-radius:14px;
  padding:8px 12px; text-align:left; }
.rpf-wltabs b{ display:block; font-size:13px; line-height:1.25; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.rpf-wltabs span{ font-size:11px; color:var(--muted); }
.rpf-wltabs button[aria-selected="true"]{ background:var(--coral); border-color:var(--coral); color:#fff; }
.rpf-wltabs button[aria-selected="true"] span{ color:#fff; opacity:.9; }
.rpf-wlpanel[hidden]{ display:none; }
.rpf-wl__name{ margin:0 0 4px; font:700 16px/1.3 var(--display); }
.rpf-wl__desc{ margin:0 0 8px; font-size:14px; overflow-wrap:anywhere; }
.rpf-wl__sub{ margin:0 0 10px; font-size:13px; color:var(--muted); }
.rpf-bpages{ display:flex; overflow-x:auto; scroll-snap-type:x mandatory; scrollbar-width:none; overscroll-behavior-x:contain;
  -webkit-overflow-scrolling:touch; }
.rpf-bpages::-webkit-scrollbar{ display:none; }
.rpf-bpage{ flex:0 0 100%; scroll-snap-align:start; scroll-snap-stop:always; padding:2px 1px; }
.rpf-books{ display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:12px; }
@media (min-width:480px){ .rpf-books{ grid-template-columns:repeat(3, minmax(0, 1fr)); } }
.rpf-book{ display:flex; flex-direction:column; gap:8px; padding:10px; background:var(--surface); border:1px solid var(--line); border-radius:18px;
  color:var(--ink); text-decoration:none; min-width:0; }
.rpf-book.is-out{ opacity:.55; }
.rpf-book__cover{ display:block; aspect-ratio:2/3; border-radius:4px 10px 10px 4px; overflow:hidden; background:var(--bg);
  box-shadow:inset 6px 0 0 rgba(0,0,0,.06); }
.rpf-book__cover img{ display:block; width:100%; height:100%; object-fit:cover; }
.rpf-book__title{ font-weight:700; font-size:13px; line-height:1.3; min-height:34px; display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical;
  overflow:hidden; overflow-wrap:anywhere; }
.rpf-book__state{ font-size:12px; font-weight:700; color:var(--muted); }
.rpf-book__state--gift{ color:var(--blue); }
.rpf-bnav{ display:flex; align-items:center; justify-content:center; gap:10px; margin-top:12px; }
.rpf-bdots{ display:flex; gap:6px; }
.rpf-bdots button{ width:8px; height:8px; border-radius:50%; border:0; padding:0; background:var(--line); }
.rpf-bdots button.is-on{ width:22px; border-radius:4px; background:var(--coral); }
.rpf-bcount{ min-width:42px; text-align:center; font-size:13px; font-weight:700; color:var(--muted); }
.rpf-wl__gift{ width:100%; margin-top:14px; }
.rpf-empty{ border:1.5px dashed var(--line); border-radius:16px; padding:18px; text-align:center; color:var(--muted); font-size:14px; }
/* приватний вішліст: замок із паролем (як у прототипі) і броні книжок */
.rpf-lock{ background:var(--surface); border:2px solid var(--line); border-radius:22px; padding:22px 18px; text-align:center; }
.rpf-lock__ic{ font-size:34px; line-height:1; }
.rpf-lock__badge{ display:block; margin:8px 0 4px; font:700 16px/1.3 var(--display); }
.rpf-lock__text{ margin:0; font-size:13px; color:var(--muted); }
.rpf-lock__demo{ margin:10px 0 0; font-size:13px; }
.rpf-lock__demo b{ font:900 16px/1 var(--display); letter-spacing:.12em; }
.rpf-pin{ display:flex; gap:8px; max-width:300px; width:100%; margin:14px auto 0; }
.rpf-pin input{ flex:1 1 auto; min-width:0; width:auto; height:48px; padding:0 12px; border:1.5px solid var(--line); border-radius:14px;
  background:var(--bg); color:var(--ink); text-align:center; font:900 22px/1 var(--display); letter-spacing:.3em; }
.rpf-pin input:focus{ outline:none; border-color:var(--coral); }
.rpf-pin button{ flex:0 0 auto; height:48px; padding:0 16px; border:0; border-radius:14px; background:var(--coral); color:#fff;
  font:700 14px/1 var(--body); cursor:pointer; }
.rpf-pin button:disabled{ opacity:.6; }
.rpf-pin.is-shake{ animation:rpf-shake .35s; }
@keyframes rpf-shake{ 25%{ transform:translateX(-8px); } 75%{ transform:translateX(8px); } }
@media (prefers-reduced-motion:reduce){ .rpf-pin.is-shake{ animation:none; } }
.rpf-lock__err{ min-height:18px; margin-top:8px; font-size:13px; font-weight:700; color:var(--bad); }
.rpf-pwbody[hidden]{ display:none; }
.rpf-pw-note{ margin:0 0 12px; padding:10px 12px; border-radius:14px; background:var(--lemon); font-size:13px; line-height:1.45; }
.rpf-pwact{ display:flex; flex-direction:column; gap:6px; }
.rpf-book__state--mine{ color:var(--ok); }
.rpf-res{ min-height:38px; padding:7px 10px; border:1.5px solid var(--line); border-radius:12px; background:var(--surface); color:var(--ink);
  font:700 13px/1.2 var(--body); cursor:pointer; }
.rpf-res:disabled, .rpf-unres:disabled{ opacity:.6; }
.rpf-unres{ align-self:flex-start; padding:2px 0; border:0; background:none; color:var(--muted); font:700 12px/1.3 var(--body);
  text-decoration:underline; cursor:pointer; }
/* своя бронь: «Обрати» в подарунок видно й поза режимом вибору */
.rpf-wl .rpf-pwact .rpf-pick{ display:block; }

/* «Читаю зараз»: обкладинки в ряд із гортанням */
.rpf-sec{ margin-top:26px; }
.rpf-sec > .rpf-h2{ margin-bottom:10px; }
.rpf-now{ display:flex; gap:12px; overflow-x:auto; scrollbar-width:none; padding-bottom:4px; scroll-snap-type:x proximity; }
.rpf-now::-webkit-scrollbar{ display:none; }
.rpf-now__book{ flex:0 0 108px; display:grid; gap:6px; align-content:start; color:var(--ink); text-decoration:none; scroll-snap-align:start; }
.rpf-now__title{ font-size:12px; font-weight:700; line-height:1.25; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.rpf-book__cover b{ display:block; padding:10px 8px; font:900 13px/1.15 var(--display); color:var(--ink); }

/* полиця «Прочитане»: палітурні корінці із золотим тисненням на дерев'яній дошці. Товщина — за кількістю сторінок,
   колір (--c) і оздоблення (sp-d0…sp-d5) — з profilesBooks::spine(). Корінець не перевертаємо (лише назву), тож «верх»
   у стилях — справді верх книжки. */
.rpf-shelfbox{ position:relative; }
.rpf-shelf{ display:flex; align-items:flex-end; gap:2px; padding:14px 8px 0; min-height:150px; border-bottom:12px solid #8C6A4F;
  border-radius:0 0 6px 6px; box-shadow:0 10px 16px -10px rgba(0,0,0,.55);
  overflow-x:auto; overflow-y:hidden; -webkit-overflow-scrolling:touch; overscroll-behavior-x:contain;
  scroll-snap-type:x proximity; scrollbar-width:none; }
.rpf-shelf::-webkit-scrollbar{ display:none; }
.rpf-spine{ --g1:#9C7A2C; --g2:#F6DE92; --g3:#C29A45; --gold:linear-gradient(90deg, var(--g1), var(--g2) 45%, var(--g3));
  --pt:16px; --pb:16px;
  position:relative; flex:0 0 auto; display:flex; align-items:center; justify-content:center; box-sizing:border-box;
  padding:var(--pt) 0 var(--pb); border-radius:6px 6px 2px 2px / 5px 5px 2px 2px;
  /* об'єм: темні краї, відблиск ліворуч від центру */
  background:linear-gradient(90deg, rgba(0,0,0,.45) 0%, rgba(0,0,0,.12) 9%, rgba(255,255,255,.24) 23%, rgba(255,255,255,.07) 36%,
    rgba(255,255,255,0) 55%, rgba(0,0,0,.14) 80%, rgba(0,0,0,.5) 100%), var(--c, #3C3F46);
  box-shadow:inset 0 2px 0 rgba(255,255,255,.22), inset 0 -1px 0 rgba(0,0,0,.35), 1px 0 2px rgba(0,0,0,.35);
  color:#F2D27B; font-family:var(--display); font-weight:700; text-decoration:none; overflow:hidden;
  transition:transform .15s; scroll-snap-align:start; }
.rpf-spine span{ position:relative; z-index:2; writing-mode:vertical-rl; transform:rotate(180deg); white-space:nowrap;
  overflow:hidden; text-overflow:ellipsis; max-height:100%; line-height:1.2; letter-spacing:.02em; text-align:center;
  text-shadow:0 1px 1px rgba(0,0,0,.55); }
.rpf-spine.is-light{ --g1:#6E5018; --g2:#C9A24A; --g3:#8E6B25; color:#2E2233; }
.rpf-spine.is-light span{ text-shadow:0 1px 0 rgba(255,255,255,.35); }
.rpf-spine.is-bright{ color:#FFF6E0; }
.rpf-spine.is-bright span{ text-shadow:0 1px 2px rgba(0,0,0,.45); }
.rpf-spine::before, .rpf-spine::after{ content:""; position:absolute; pointer-events:none; z-index:1; }
@media (hover:hover){ .rpf-spine:hover{ transform:translateY(-6px); } }
/* 0 — парні смуги вгорі й унизу */
.sp-d0{ --pt:30px; --pb:30px; }
.sp-d0::before{ left:0; right:0; top:10px; height:7px; background:var(--gold) 0 0/100% 2px no-repeat, var(--gold) 0 100%/100% 2px no-repeat; }
.sp-d0::after{ left:0; right:0; bottom:10px; height:7px; background:var(--gold) 0 0/100% 2px no-repeat, var(--gold) 0 100%/100% 2px no-repeat; }
/* 1 — рамка-панель по центру і ромбик угорі */
.sp-d1{ --pt:34px; --pb:22px; }
.sp-d1::before{ left:5px; right:5px; top:26px; bottom:14px; border:1px solid var(--g3); border-radius:2px; box-shadow:inset 0 0 0 1px rgba(0,0,0,.18); }
.sp-d1::after{ left:50%; top:10px; width:7px; height:7px; margin-left:-3.5px; transform:rotate(45deg); background:var(--g3); }
/* 2 — широкий золотий ярлик угорі, тонкі смуги внизу */
.sp-d2{ --pt:36px; --pb:26px; }
.sp-d2::before{ left:0; right:0; top:14px; height:10px; background:var(--gold); box-shadow:0 1px 0 rgba(0,0,0,.25); }
.sp-d2::after{ left:0; right:0; bottom:10px; height:6px; background:var(--gold) 0 0/100% 2px no-repeat, var(--gold) 0 100%/100% 1px no-repeat; }
/* 3 — решітка вгорі й унизу, назва на гладкій середині */
.sp-d3{ --pt:40px; --pb:40px; }
.sp-d3::before{ left:3px; right:3px; top:6px; bottom:6px;
  background:repeating-linear-gradient(45deg, transparent 0 6px, rgba(242,210,123,.75) 6px 7px),
    repeating-linear-gradient(-45deg, transparent 0 6px, rgba(242,210,123,.75) 6px 7px);
  -webkit-mask:linear-gradient(#000 0 26px, transparent 26px calc(100% - 26px), #000 calc(100% - 26px));
  mask:linear-gradient(#000 0 26px, transparent 26px calc(100% - 26px), #000 calc(100% - 26px)); }
.sp-d3::after{ left:3px; right:3px; top:32px; bottom:32px; border-top:2px solid var(--g3); border-bottom:2px solid var(--g3); }
/* 4 — закладка-стрічка, золота крапка вгорі й смужка внизу */
.sp-d4{ --pt:24px; --pb:22px; }
.sp-d4::before{ right:22%; top:0; bottom:0; width:4px; background:var(--r, #2E55C8);
  box-shadow:inset 1px 0 0 rgba(255,255,255,.35), inset -1px 0 0 rgba(0,0,0,.3); }
.sp-d4::after{ left:0; right:0; top:10px; bottom:10px;
  background:radial-gradient(circle, var(--g2) 0 2px, var(--g3) 2.5px, transparent 3.2px) 50% 0/8px 8px no-repeat,
    var(--gold) 0 100%/100% 2px no-repeat; }
/* 5 — кольоровий блок унизу й золота смуга над ним */
.sp-d5{ --pt:22px; --pb:44px; }
.sp-d5::before{ left:0; right:0; bottom:0; height:28px; background:var(--tail, #C99A2E); box-shadow:inset 0 2px 0 rgba(255,255,255,.25); }
.sp-d5::after{ left:0; right:0; bottom:33px; height:2px; background:var(--gold); }
.rpf-shelfbox::after{ content:""; position:absolute; right:0; top:0; bottom:12px; width:36px; pointer-events:none; opacity:0;
  background:linear-gradient(to right, transparent, var(--bg)); transition:opacity .2s; }
.rpf-shelfbox.is-more::after{ opacity:1; }
/* під полицею — лише «N книжок, гортайте →», коли полиця не вміщається */
.rpf-shelfhint{ display:flex; justify-content:flex-end; align-items:center; gap:10px; margin-top:8px; font-size:13px; color:var(--muted); }
.rpf-shelfmore{ font-weight:700; white-space:nowrap; color:var(--ink); }

/* колір плашки: текст — білий чи темний з контрастом ≥ 4.5:1 (--hero-ink рахує сервер і скрипт) */
.rpf-hero{ color:var(--hero-ink, #fff); }
.rpf-hero:focus-visible{ outline:3px solid var(--ink); outline-offset:3px; }
.rpf-hero--edit{ touch-action:pan-y; -webkit-user-select:none; user-select:none; cursor:ew-resize; }
.rpf-hero--edit a, .rpf-hero--edit button{ cursor:pointer; }
.rpf-hero__tools{ display:flex; flex-wrap:wrap; gap:8px; align-items:center; margin-top:14px; }
.rpf-hue-hint, .rpf-hue-reset{ display:inline-block; border:0; border-radius:999px; padding:5px 10px; background:rgba(255,255,255,.9); color:#27324A;
  font:700 12px/1.3 var(--body); }
.rpf-hue-hint{ pointer-events:none; }
.rpf-hue-hint[hidden], .rpf-hue-reset[hidden]{ display:none; }
.rpf-hue-msg{ font-size:12px; font-weight:700; }
.rpf-hue-msg:empty{ display:none; }
.rpf-sr{ position:absolute !important; width:1px; height:1px; margin:-1px; padding:0; overflow:hidden; clip:rect(0, 0, 0, 0); white-space:nowrap; border:0; }

/* читацький челендж року — як у прототипі */
.rpf-challenge{ margin-top:26px; padding:16px 18px 18px; border-radius:22px; background:var(--blue); color:var(--blue-ink); }
.rpf-challenge__title{ font-size:13px; opacity:.85; }
.rpf-challenge__num{ margin-top:4px; font:900 36px/1 var(--display); }
.rpf-challenge__num > span{ font-size:17px; font-weight:500; }
.rpf-challenge__bar{ height:10px; margin-top:12px; overflow:hidden; border-radius:99px; background:rgba(255,255,255,.3); }
.rpf-challenge__bar i{ display:block; height:100%; border-radius:99px; background:var(--yellow); }
.rpf-challenge__done{ margin:10px 0 0; font-weight:700; font-size:14px; }
@media (prefers-color-scheme:dark){ :root:not([data-theme="light"]) .rpf-challenge__bar{ background:rgba(24,32,58,.18); } }
:root[data-theme="dark"] .rpf-challenge__bar{ background:rgba(24,32,58,.18); }

/* вікно книжки (клік по книжці) — нижня шторка, як у прототипі */
.rpf-scrim{ position:fixed; inset:0; z-index:50; display:flex; align-items:flex-end; justify-content:center; background:rgba(20,26,45,.55); }
.rpf-sheet{ width:100%; max-width:560px; max-height:90vh; overflow:auto; padding:20px 18px calc(22px + env(safe-area-inset-bottom, 0px));
  border-radius:28px 28px 0 0; background:var(--surface); color:var(--ink); animation:rpf-up .22s ease-out; overscroll-behavior:contain; }
@keyframes rpf-up{ from{ transform:translateY(40px); opacity:0; } }
.rpf-sheet__head{ display:flex; justify-content:space-between; align-items:flex-start; gap:10px; margin-bottom:12px; }
.rpf-sheet__head h2{ margin:0; font:900 20px/1.2 var(--display); overflow-wrap:anywhere; }
.rpf-x{ flex:0 0 auto; margin:-4px -4px 0 0; padding:0 6px; border:0; background:none; color:var(--muted); font-size:30px; line-height:1; }
.rpf-bksheet{ display:grid; grid-template-columns:110px minmax(0, 1fr); gap:14px; margin-bottom:14px; }
.rpf-bksheet .rpf-book__cover{ width:110px; }
.rpf-bksheet__meta{ display:grid; gap:4px; align-content:start; min-width:0; }
.rpf-bksheet__author{ color:var(--muted); overflow-wrap:anywhere; }
.rpf-bksheet__pages{ font-size:13px; color:var(--muted); }
.rpf-bksheet__st{ margin:6px 0 0; font-weight:700; }
.rpf-bksheet__sum{ margin:6px 0 0; font-size:14px; line-height:1.5; overflow-wrap:anywhere; }
.rpf-sum{ display:flex; justify-content:space-between; gap:10px; margin:6px 0 14px; padding:12px; border-radius:14px; background:var(--bg); font-size:14px; }
.rpf-sum b{ font:900 17px/1.2 var(--display); }
.rpf-stack{ display:grid; gap:8px; }
.rpf-stack .rpf-btn{ width:100%; }
.rpf-btn--blue{ background:var(--blue); color:var(--blue-ink); }
.rpf-sheet__note{ margin:0; font-size:14px; color:var(--muted); text-align:center; }
@media (prefers-reduced-motion:reduce){ .rpf-sheet{ animation:none; } }
@media (min-width:600px){ .rpf-scrim{ align-items:center; } .rpf-sheet{ border-radius:28px; } }

/* подарунок просто на сторінці — той самий кошик дарувальника, що й на сторінці вішліста */
.rpf-book{ position:relative; }
.rpf-book__link{ display:flex; flex-direction:column; gap:8px; min-width:0; color:inherit; text-decoration:none; }
.rpf-book.is-sel{ border:2px solid var(--coral); padding:9px; }
.rpf-check{ position:absolute; top:16px; right:16px; z-index:1; width:32px; height:32px; display:grid; place-items:center; padding:0;
  border:2px solid var(--coral); border-radius:50%; background:#fff; color:transparent; font-weight:900; font-size:16px; line-height:1;
  box-shadow:0 2px 6px rgba(0,0,0,.15); }
.rpf-check[aria-pressed="true"]{ background:var(--coral); color:#fff; }
.rpf-book.is-sel .rpf-check{ top:15px; right:15px; }
/* кнопки вибору — лише в режимі подарунка (після «Подарувати» хоч на одній книжці) */
.rpf-wl:not(.is-gifting) .rpf-pick, .rpf-wl:not(.is-gifting) .rpf-check{ display:none; }
.rpf-pick{ min-height:38px; padding:7px 10px; border:1.5px solid var(--line); border-radius:12px; background:var(--surface); color:var(--ink);
  font:700 13px/1.2 var(--body); }
.rpf-pick[aria-pressed="true"]{ background:var(--coral); border-color:var(--coral); color:#fff; }
.rpf-pick:disabled{ opacity:.6; }
.rpf-giftbar{ position:fixed; left:0; right:0; bottom:calc(12px + env(safe-area-inset-bottom, 0px)); z-index:25; padding:0 16px; pointer-events:none; }
.rpf-giftbar__in{ max-width:528px; margin:0 auto; display:flex; justify-content:space-between; align-items:center; gap:10px;
  padding:10px 10px 10px 16px; border-radius:18px; background:var(--ink); color:var(--bg); pointer-events:auto;
  box-shadow:0 14px 30px -14px rgba(0,0,0,.5); }
.rpf-giftbar small{ display:block; font-size:12px; opacity:.85; }
.rpf-giftbar b{ font:900 18px/1.2 var(--display); }
body.has-giftbar .rpf-app{ padding-bottom:110px; }
.rpf-gsum{ display:grid; gap:4px; }
.rpf-gsum div{ display:flex; justify-content:space-between; gap:10px; }
.rpf-gsum div span:first-child{ min-width:0; overflow-wrap:anywhere; }
.rpf-gsum div span:last-child{ white-space:nowrap; }
.rpf-gsum .is-total{ margin-top:6px; padding-top:6px; border-top:1px solid var(--line); font-weight:700; font-size:16px; }
.rpf-gform{ display:grid; gap:10px; }
.rpf-gform label{ display:grid; gap:4px; font-size:13px; font-weight:700; }
.rpf-gform input{ width:100%; min-height:46px; padding:11px 12px; border:1px solid var(--line); border-radius:14px; background:var(--bg);
  color:var(--ink); font:inherit; font-size:16px; }
.rpf-gform input:focus{ outline:2px solid var(--coral); outline-offset:1px; }
.rpf-gmsg{ margin:0; font-size:14px; color:var(--bad); }
.rpf-gmsg:empty{ display:none; }
.rpf-toast{ position:fixed; left:50%; bottom:calc(90px + env(safe-area-inset-bottom, 0px)); z-index:60; transform:translate(-50%, 20px);
  max-width:calc(100% - 32px); padding:11px 16px; border-radius:14px; background:var(--ink); color:var(--bg); font-size:14px; font-weight:700;
  text-align:center; opacity:0; transition:.25s; pointer-events:none; }
.rpf-toast.is-show{ opacity:1; transform:translate(-50%, 0); }

/* власник на своїй сторінці: «✎ Змінити» на блоках і «+ Додати» замість порожніх */
.rpf-edit{ display:inline-flex; align-items:center; gap:5px; min-height:30px; padding:4px 11px; border:1px solid var(--line); border-radius:999px;
  background:var(--surface); color:var(--muted); font:700 12px/1.2 var(--body); text-decoration:none; white-space:nowrap; }
@media (hover:hover){ .rpf-edit:hover{ color:var(--ink); border-color:var(--muted); } }
.rpf-hero .rpf-edit{ margin-top:8px; border:0; background:rgba(255,255,255,.9); color:#27324A; }
.rpf-edit--push{ margin-left:auto; }
.rpf-edit--card{ border:0; background:rgba(255,255,255,.55); color:inherit; }
.rpf-add{ display:flex; align-items:center; justify-content:center; min-height:48px; margin-top:14px; padding:12px 16px; border:2px dashed var(--line);
  border-radius:16px; color:var(--ink); font-weight:700; font-size:14px; text-align:center; text-decoration:none; }
@media (hover:hover){ .rpf-add:hover{ border-color:var(--muted); } }
.rpf-add--hero{ border-color:currentColor; color:inherit; opacity:.9; }
.rpf-avatar-wrap{ position:relative; flex:0 0 auto; }
.rpf-avatar-edit{ position:absolute; right:-6px; bottom:-6px; width:28px; height:28px; display:grid; place-items:center; border-radius:50%;
  background:#fff; color:#27324A; font-size:14px; text-decoration:none; box-shadow:0 2px 6px rgba(0,0,0,.2); }
.rpf-ownrow{ display:flex; justify-content:flex-end; margin-top:12px; }
.rpf-ownrow + .rpf-linkbox{ margin-top:8px; }
.rpf-sec__head{ display:flex; justify-content:space-between; align-items:center; gap:10px; margin-bottom:10px; }
.rpf-sec__head .rpf-h2{ margin:0; }
.rpf-challenge__head{ display:flex; justify-content:space-between; align-items:center; gap:10px; }

/* блог: вкладка сторінки й записи — як у прототипі (картка з обрізанням до 4 рядків, мініатюра книжки, шторка з повним записом) */
.rpf-nums__a{ color:inherit; text-decoration:none; }
.rpf-nums__a span{ text-decoration:underline; text-underline-offset:3px; text-decoration-thickness:1px; }
.rpf-authorbar{ display:flex; align-items:center; justify-content:space-between; gap:10px; margin-top:18px; }
.rpf-author{ display:flex; align-items:center; gap:12px; min-width:0; color:inherit; text-decoration:none; }
.rpf-author__ava{ flex:0 0 auto; width:44px; height:44px; border-radius:15px; overflow:hidden; display:grid; place-items:center;
  background:var(--hero, var(--coral)); color:var(--hero-ink, #fff); font:900 17px/1 var(--display); }
.rpf-author__ava.is-img{ background:var(--surface); }
.rpf-author__ava img{ display:block; width:100%; height:100%; object-fit:cover; }
.rpf-author__who{ display:grid; min-width:0; }
.rpf-author__who b{ font:900 17px/1.2 var(--display); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.rpf-author__who small{ font-size:13px; color:var(--muted); }
.rpf-langs--bar{ position:static; flex:0 0 auto; border:1px solid var(--line); }
.rpf-authorbar + .rpf-sec{ margin-top:22px; }
.rpf-fullpost{ white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.7; font-size:15px; }
.rpf-posts{ display:grid; gap:12px; }
.rpf-post__link{ display:grid; gap:6px; padding:16px; border-radius:18px; background:var(--surface); border:1px solid var(--line);
  color:var(--ink); text-decoration:none; }
@media (hover:hover){ .rpf-post__link:hover{ border-color:var(--muted); } }
.rpf-post.has-book .rpf-post__link{ grid-template-columns:minmax(0, 1fr) 64px; column-gap:14px; }
.rpf-post.has-book .rpf-post__link > *{ grid-column:1; }
.rpf-post.has-book .rpf-mini{ grid-column:2; grid-row:1 / span 5; align-self:start; }
.rpf-post__date{ font-size:12px; color:var(--muted); }
.rpf-post__title{ margin:0; font:900 17px/1.25 var(--display); overflow-wrap:anywhere; }
.rpf-post__text{ margin:0; white-space:pre-line; overflow-wrap:anywhere; display:-webkit-box; -webkit-line-clamp:4; -webkit-box-orient:vertical; overflow:hidden; }
.rpf-post__more{ font-size:13px; font-weight:700; }
/* запис з адреси /blog/<id> — першим і повністю */
.rpf-post.is-open .rpf-post__link{ border:2px solid var(--coral); }
.rpf-post.is-open .rpf-post__text{ display:block; -webkit-line-clamp:unset; overflow:visible; line-height:1.7; }
/* повний запис з розміткою редактора: у списку прихований, у відкритому записі — замість прев'ю */
/* бонусна програма: «Мій код у ridmi» — код копіюється натиском */
.rpf-promo{ display:flex; align-items:center; justify-content:space-between; gap:12px; width:100%; margin-top:12px; padding:14px 16px;
  border:1.5px solid color-mix(in srgb, var(--hero, var(--coral)) 55%, transparent); border-radius:18px;
  background:color-mix(in srgb, var(--hero, var(--coral)) 12%, var(--surface)); color:var(--ink); text-align:left; font:inherit; cursor:pointer;
  -webkit-tap-highlight-color:transparent; transition:transform .12s; }
.rpf-promo:active{ transform:scale(.98); }
.rpf-promo__txt{ display:grid; gap:2px; min-width:0; }
.rpf-promo__txt b{ font:900 16px/1.2 var(--display); }
.rpf-promo__txt small{ font-size:13px; color:var(--muted); }
.rpf-promo__code{ flex:0 0 auto; display:grid; justify-items:center; gap:4px; padding:9px 14px; border-radius:12px;
  background:var(--hero, var(--coral)); color:var(--hero-ink, #fff); }
.rpf-promo__code > span{ font:900 16px/1 var(--display); letter-spacing:.06em; }
.rpf-promo__code small{ font-size:11px; line-height:1; opacity:.85; }
.rpf-promo.is-copied .rpf-promo__code{ background:#1f9d55; color:#fff; }
.rpf-post__full{ display:none; }
.rpf-post.is-open .rpf-post__text{ display:none; }
.rpf-post.is-open .rpf-post__full{ display:block; margin:0; white-space:pre-line; overflow-wrap:anywhere; line-height:1.7; }
.rpf-post__full blockquote, .rpf-fullpost blockquote{ margin:8px 0; padding:6px 0 6px 14px; border-left:3px solid var(--coral);
  font-style:italic; color:var(--ink); white-space:pre-line; }
.rpf-post__full u, .rpf-fullpost u{ text-underline-offset:3px; }
.rpf-post.is-open .rpf-post__more{ display:none; }
.rpf-mini{ flex:0 0 auto; display:flex; align-items:flex-end; aspect-ratio:2 / 3; overflow:hidden; padding:5px; border-radius:3px 8px 8px 3px;
  box-shadow:inset 4px 0 0 rgba(0,0,0,.14); color:#fff; font:900 8px/1.1 var(--display); background:var(--blue); }
.rpf-mini.is-light{ color:#27324A; }
.rpf-mini.is-img{ padding:0; background:var(--bg); }
.rpf-mini img{ display:block; width:100%; height:100%; object-fit:cover; }
.rpf-mini > span{ overflow:hidden; overflow-wrap:anywhere; }
.rpf-postbook{ display:flex; gap:12px; align-items:center; width:100%; margin-top:16px; padding:10px; border:1px solid var(--line);
  border-radius:14px; background:var(--bg); color:var(--ink); text-align:left; text-decoration:none; font:inherit; }
.rpf-postbook > span:last-child{ display:grid; min-width:0; }
.rpf-postbook small{ font-size:12px; color:var(--muted); }
.rpf-postbook b{ overflow-wrap:anywhere; }
.rpf-post__permalink{ display:inline-block; margin-top:14px; font-size:13px; color:var(--muted); }
.rpf-ownctl{ margin-bottom:14px; padding:12px 14px; border:2px dashed var(--line); border-radius:16px; }
.rpf-switch{ display:flex; justify-content:space-between; align-items:center; gap:12px; font-weight:700; font-size:14px; cursor:pointer; }
.rpf-switch input{ appearance:none; -webkit-appearance:none; flex:0 0 auto; position:relative; width:46px; height:28px; margin:0; border-radius:99px;
  background:var(--line); cursor:pointer; transition:background .15s; }
.rpf-switch input::after{ content:""; position:absolute; top:3px; left:3px; width:22px; height:22px; border-radius:50%; background:#fff;
  box-shadow:0 1px 3px rgba(0,0,0,.25); transition:transform .15s; }
.rpf-switch input:checked{ background:var(--ok); }
.rpf-switch input:checked::after{ transform:translateX(18px); }
.rpf-switch input:disabled{ opacity:.6; }
.rpf-ownctl__note{ margin:6px 0 0; font-size:13px; color:var(--muted); }
.rpf-ownctl__note.is-off{ color:var(--bad); font-weight:700; }
.rpf-pager{ display:grid; gap:10px; justify-items:center; margin-top:16px; font-size:14px; font-weight:700; }
.rpf-pager a{ color:var(--ink); }
.rpf-more{ display:flex; align-items:center; justify-content:center; width:100%; min-height:46px; padding:11px 16px; border:1.5px solid var(--line);
  border-radius:16px; background:var(--surface); text-decoration:none; }
.rpf-more[aria-busy="true"]{ opacity:.6; pointer-events:none; }
/* нижнє меню «Сторінка / Блог» — як у прототипі */
.rpf-nav{ position:fixed; left:0; right:0; bottom:0; z-index:30; background:var(--surface); border-top:1px solid var(--line);
  padding-bottom:env(safe-area-inset-bottom, 0px); }
.rpf-nav__in{ max-width:560px; margin:0 auto; display:flex; }
.rpf-nav a{ flex:1; position:relative; padding:14px 4px 15px; text-align:center; font-size:13px; font-weight:700; color:var(--muted); text-decoration:none; }
.rpf-nav a[aria-current="page"]{ color:var(--ink); }
.rpf-nav a[aria-current="page"]::before{ content:""; position:absolute; top:0; left:24%; right:24%; height:4px; border-radius:0 0 4px 4px; background:var(--coral); }
.rpf-app:has(.rpf-nav){ padding-bottom:90px; }
body:has(.rpf-nav) .rpf-giftbar{ bottom:calc(64px + env(safe-area-inset-bottom, 0px)); }
body:has(.rpf-nav) .rpf-toast{ bottom:calc(140px + env(safe-area-inset-bottom, 0px)); }
body.has-giftbar:has(.rpf-nav) .rpf-app{ padding-bottom:170px; }

/* справжні іконки соцмереж і месенджерів (Simple Icons, CC0): кольори брендів, чорні знаки — кольором тексту */
.rpf-ico{ flex:0 0 auto; width:20px; height:20px; display:block; }
.rpf-link__name{ display:inline-flex; align-items:center; gap:9px; min-width:0; }
.rpf-contact .rpf-ico{ width:18px; height:18px; }

/* «Співпраця»: прайс власника (як .svc у прототипі) */
.rpf-collab__sub{ margin:0 0 12px; font-size:14px; color:var(--muted); }
.rpf-svcs{ display:grid; gap:10px; }
.rpf-svc{ display:grid; grid-template-columns:minmax(0, 1fr) auto; gap:2px 12px; align-items:start; padding:14px;
  background:var(--surface); border:1px solid var(--line); border-radius:18px; }
.rpf-svc__name{ font-size:15px; overflow-wrap:anywhere; }
.rpf-svc__price{ font:900 17px/1.2 var(--display); text-align:right; max-width:45vw; overflow-wrap:anywhere; }
.rpf-svc__terms{ grid-column:1 / -1; margin:4px 0 0; font-size:13px; color:var(--muted); white-space:pre-line; overflow-wrap:anywhere; }
.rpf-collab__contact{ width:100%; margin-top:14px; }

/* демо-сторінка: «Створити свою сторінку» на першому екрані й закріплена внизу (над нижнім меню вкладок) */
.rpf-democta{ display:flex; width:100%; margin-top:12px; }
.rpf-stickycta{ position:fixed; left:0; right:0; bottom:calc(12px + env(safe-area-inset-bottom, 0px)); z-index:26; padding:0 16px; pointer-events:none; }
.rpf-stickycta .rpf-btn{ pointer-events:auto; display:flex; width:100%; max-width:528px; margin:0 auto; box-shadow:0 8px 24px rgba(20,26,45,.35); }
body:has(.rpf-nav) .rpf-stickycta{ bottom:calc(64px + env(safe-area-inset-bottom, 0px)); }
.rpf-app:has(.rpf-stickycta){ padding-bottom:160px; }
body.has-giftbar .rpf-stickycta{ display:none; }

/* скелетони порожніх розділів — лише власнику (profile.html): сірі обриси того, що з'явиться, і кнопка «+ Додати» */
.rpf-ghost .rpf-h2, .rpf-ghost .rpf-challenge__title{ opacity:.55; }
.rpf-ghost .rpf-add{ margin-top:12px; }
.rpf-ghost .sk{ display:block; border-radius:8px; background:color-mix(in srgb, var(--muted) 16%, transparent); }
.rpf-ghost__books{ display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:10px; margin-top:12px; }
.rpf-ghost__book{ display:grid; gap:6px; align-content:start; padding:10px; border:1.5px dashed var(--line); border-radius:18px; }
.rpf-ghost__now{ display:flex; gap:12px; margin-top:4px; }
.rpf-ghost__now .rpf-ghost__book{ flex:0 0 108px; padding:0; border:0; }
.rpf-ghost .sk-cover{ aspect-ratio:2/3; border-radius:4px 10px 10px 4px; }
.rpf-ghost .sk-line{ height:9px; border-radius:5px; }
.rpf-ghost .sk-line--short{ width:60%; }
.rpf-ghost__shelf{ display:flex; align-items:flex-end; gap:3px; padding:14px 8px 0; border-bottom:12px solid color-mix(in srgb, var(--muted) 22%, transparent); border-radius:0 0 6px 6px; }
.rpf-ghost__shelf .sk{ flex:0 0 auto; width:26px; border-radius:6px 6px 2px 2px; }
.rpf-ghost--ch{ margin-top:26px; padding:16px 18px 18px; border:1.5px dashed var(--line); border-radius:22px; }
.rpf-ghost .sk-num{ width:84px; height:30px; margin:8px 0 12px; }
.rpf-ghost .sk-bar{ height:10px; border-radius:6px; }
/* частково заповнено — сірі місця під ще книжки (лише власнику) */
.rpf-ghostitem__cover{ display:flex !important; align-items:center; justify-content:center; border:1.5px dashed var(--line);
  background:color-mix(in srgb, var(--muted) 10%, transparent) !important; color:var(--muted); font:300 30px/1 var(--display); }
.rpf-ghostspine{ flex:0 0 auto; width:26px; border-radius:6px 6px 2px 2px; border:1.5px dashed var(--line); border-bottom:0;
  background:color-mix(in srgb, var(--muted) 12%, transparent); }
@media (hover:hover){ .rpf-ghostitem:hover .rpf-ghostitem__cover, .rpf-ghostspine:hover{ border-color:var(--muted); } }

/* демо (власник 11.10): рядок над карткою, мітка «приклад», тизер статистики, соцмережі — рядком значків. Лише [data-rpf-demo] */
.rpf-demohead{ margin:14px 2px 0; color:var(--ink); font-size:14px; line-height:1.4; }
.rpf-demohead + .rpf-stickycta + .rpf-tabpanel .rpf-hero, .rpf-demohead + .rpf-tabpanel .rpf-hero{ margin-top:10px; }
.rpf-hero__demo{ position:absolute; left:18px; top:16px; z-index:2; padding:4px 11px; border-radius:99px; background:#FEF6B5; color:#27324A; font:700 12px/1.3 system-ui, sans-serif; }
.rpf[data-rpf-demo] .rpf-hero__top{ margin-top:22px; }
.rpf-anteaser{ display:flex; align-items:center; gap:12px; margin-top:12px; padding:14px 16px; border:1px solid var(--line); border-radius:20px;
  background:var(--surface); color:var(--ink); text-decoration:none; }
.rpf-anteaser__ico{ flex:0 0 auto; display:flex; align-items:center; justify-content:center; width:44px; height:44px; border-radius:14px; background:#FEF6B5; font-size:22px; }
.rpf-anteaser__txt{ flex:1 1 auto; min-width:0; font-size:14px; line-height:1.35; }
.rpf-anteaser__txt b{ display:block; font:900 16px/1.25 var(--display); }
.rpf-anteaser__txt b span{ font-weight:700; }
.rpf-anteaser__txt small{ display:block; margin-top:3px; color:var(--muted); font-size:12.5px; }
.rpf-anteaser__go{ flex:0 0 auto; color:var(--coral); font-size:26px; line-height:1; }
@media (hover:hover){ .rpf-anteaser:hover{ border-color:var(--muted); } }
.rpf[data-rpf-demo] .rpf-linkbox{ display:flex; flex-wrap:wrap; justify-content:center; gap:10px; }
.rpf[data-rpf-demo] .rpf-links, .rpf[data-rpf-demo] .rpf-contacts{ display:contents; }
.rpf[data-rpf-demo] .rpf-link, .rpf[data-rpf-demo] .rpf-contact{ position:relative; justify-content:center; width:48px; height:48px; min-height:0; padding:0; gap:0; border-radius:50%; }
.rpf[data-rpf-demo] .rpf-link__name{ display:flex; }
.rpf[data-rpf-demo] .rpf-link > span, .rpf[data-rpf-demo] .rpf-link__name > span, .rpf[data-rpf-demo] .rpf-contact__label{
  position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }
.rpf[data-rpf-demo] .rpf-link svg, .rpf[data-rpf-demo] .rpf-contact svg{ width:24px; height:24px; }
.rpf[data-rpf-demo] .rpf-promo{ margin-top:22px; }

/* шторка «Створити свою сторінку» на демо (js/signup.js; кроки входу всередині — форма smsauth, css/inline.css плагіна) */
.su-top{ display:flex; align-items:center; gap:10px; margin-bottom:6px; }
.su-back{ flex:0 0 auto; width:36px; height:36px; margin:-4px 0 0 -6px; border:0; border-radius:50%; background:none; color:var(--muted); font-size:22px; line-height:1; }
.su-back[hidden]{ display:none; }
.su-dots{ display:flex; gap:6px; flex:1 1 auto; }
.su-dots i{ flex:1 1 0; height:4px; border-radius:4px; background:var(--line); }
.su-dots i.is-on{ background:var(--coral); }
.su-name[hidden], .su-auth[hidden], .su-end[hidden]{ display:none; }
.su-h{ margin:6px 0 4px; font:900 22px/1.2 var(--display); }
.su-sub{ margin:0 0 14px; color:var(--muted); font-size:14px; line-height:1.5; }
.su-addr{ display:flex; align-items:center; gap:10px; margin:0 0 14px; padding:12px 14px; border-radius:16px; background:var(--bg); text-align:left; }
.su-ava{ flex:0 0 auto; display:flex; align-items:center; justify-content:center; width:42px; height:42px; border-radius:14px;
  background:linear-gradient(135deg, var(--coral), #F6B26B); color:#fff; font:900 18px var(--display); }
.su-addr b{ display:block; font:900 16px/1.2 var(--display); overflow-wrap:anywhere; }
.su-addr small{ display:block; color:var(--muted); font-size:13px; overflow-wrap:anywhere; }
.su-addr small em{ font-style:normal; color:var(--ink); font-weight:700; }
.su-f{ display:grid; gap:6px; margin-bottom:10px; }
.su-f > span:first-child{ font-size:13px; font-weight:700; }
.su-in{ display:flex; align-items:center; min-height:50px; padding:0 14px; border:2px solid var(--line); border-radius:16px; background:var(--surface); }
.su-in:focus-within{ border-color:var(--coral); }
.su-in input{ flex:1 1 auto; min-width:0; height:46px; border:0; outline:none; background:transparent; color:var(--ink); font:inherit; font-size:17px; }
.su-pre{ color:var(--muted); font-size:15px; white-space:nowrap; margin-right:2px; }
.su-hint{ min-height:18px; font-size:13px; color:var(--muted); }
.su-hint.is-ok{ color:var(--ok); } .su-hint.is-bad{ color:var(--bad); }
.su-btn{ width:100%; margin-top:4px; }
.su-btn[disabled]{ opacity:.6; }
.su-small{ margin:12px 0 0; text-align:center; font-size:12px; color:var(--muted); line-height:1.5; }
.su-wait{ display:flex; flex-direction:column; align-items:center; gap:14px; padding:30px 0 20px; color:var(--muted); }
.su-spin{ width:40px; height:40px; border:4px solid var(--line); border-top-color:var(--coral); border-radius:50%; animation:su-r .8s linear infinite; }
@keyframes su-r{ to{ transform:rotate(360deg); } }
.su-done{ text-align:center; }
.su-check{ display:inline-flex; align-items:center; justify-content:center; width:64px; height:64px; margin:4px 0 8px; border-radius:50%; background:var(--ok); color:#fff; font-size:34px; }
.su-next{ display:grid; gap:8px; margin-top:4px; }
.su-next .rpf-btn{ width:100%; }
.su-ghost{ display:flex; align-items:center; justify-content:center; min-height:46px; padding:10px 14px; border:2px solid var(--line); border-radius:16px;
  background:var(--surface); color:var(--ink); font-weight:700; font-size:15px; text-decoration:none; }
.su-todo{ margin:14px 0 0; padding:12px 14px; border-radius:16px; background:var(--bg); text-align:left; font-size:14px; }
.su-todo b{ display:block; margin-bottom:6px; font:900 15px var(--display); }
.su-todo ul{ margin:0; padding:0 0 0 18px; }
.su-todo li{ margin:4px 0 0; }
@media (prefers-reduced-motion:reduce){ .su-spin{ animation-duration:2s; } }
/* «Це твоя сторінка?» (js/twin.js) — у шторці на демо й на вітальному екрані кабінету */
.rtw .su-in input{ text-align:center; letter-spacing:.35em; font-size:22px; font-weight:700; }
.rtw .su-ghost{ width:100%; cursor:pointer; font-family:inherit; }
.rtw .su-ghost[disabled], .rtw .rpf-btn[disabled]{ opacity:.55; cursor:default; }
.rtw .su-hint{ margin:0 0 8px; }
.rpc-twin{ max-width:420px; margin:0 auto; }

/* демо: вкладка «Аналітика» — приклад того, що власник бачить у кабінеті (profile.html, #rpf-tab-stats) */
.rpf-an .rpf-an__head{ margin-bottom:8px; }
.rpf-an__head{ display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:12px; }
.rpf-an__tag{ display:inline-block; flex:0 0 auto; padding:3px 10px; border-radius:99px; background:var(--lemon); color:var(--ink); font:700 12px/1.3 system-ui, sans-serif; vertical-align:middle; }
.rpf-an__kpis{ display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:8px; }
.rpf-an__kpis > div{ display:grid; gap:2px; padding:10px 12px; border-radius:14px; background:var(--surface); }
.rpf-an__kpis > div.is-main{ grid-column:1 / -1; background:var(--lemon); }
.rpf-an__kpis b{ font:900 22px/1.1 var(--display); }
.rpf-an__kpis span{ font-size:12px; color:var(--muted); line-height:1.3; }
.rpf-an__chart{ display:flex; align-items:flex-end; gap:2px; height:64px; margin-top:12px; padding:6px; border-radius:14px; background:var(--surface); }
.rpf-an .rpf-an__chart{ height:110px; }
.rpf-an__chart i{ flex:1 1 0; min-width:1px; border-radius:3px 3px 0 0; background:var(--blue); opacity:.7; }
.rpf-an__chart i.is-pk{ background:var(--coral); opacity:1; }
.rpf-an__axis{ display:flex; justify-content:space-between; margin-top:4px; font-size:11px; color:var(--muted); }
.rpf-an__note{ margin:0 0 12px; font-size:13px; line-height:1.45; color:var(--muted); }
.rpf-an__h3{ margin:18px 0 8px; font:700 15px/1.3 var(--display); }
.rpf-an__gap{ margin-top:12px; }
.rpf-an__bars{ display:grid; gap:8px; }
.rpf-an__bar{ display:grid; grid-template-columns:minmax(0, 1fr) auto; gap:4px 10px; font-size:13px; }
.rpf-an__bar > span:first-child{ min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.rpf-an__track{ grid-column:1 / -1; height:8px; overflow:hidden; border-radius:99px; background:var(--surface); }
.rpf-an__track i{ display:block; height:100%; border-radius:99px; background:var(--coral); }

/* демо: шторка «Залишити демо-сторінку?» перед переходом на інший домен (js/profiles.js) */
.rpf-leave__text{ margin:0 0 14px; font-size:15px; line-height:1.5; color:var(--muted); }
.rpf-leave__cta{ margin:0; padding:0; background:none; }
.rpf-leave__cta .rpf-btn{ width:100%; }
.rpf-leave__stay{ min-height:44px; border:0; background:none; color:var(--muted); font:inherit; font-size:15px; text-decoration:underline; text-underline-offset:3px; }
