:root {
  --bg: #050711;
  --bg-2: #080b16;
  --panel: #0d1220;
  --panel-2: #12192a;
  --panel-3: #171f34;
  --line: rgba(151, 166, 210, .16);
  --line-strong: rgba(144, 112, 255, .42);
  --text: #f4f6ff;
  --muted: #929bb2;
  --accent: #7d3cff;
  --accent-2: #b84dff;
  --pink: #ff3e86;
  --danger: #ff496f;
  --warning: #ffd36d;
  --success: #55d993;
  --reader-font-size: 19px;
  --reader-width: 780px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 50% -12%, rgba(124, 54, 255, .18), transparent 36rem),
    radial-gradient(circle at 90% 12%, rgba(184, 77, 255, .08), transparent 28rem),
    linear-gradient(180deg, #050711, #060914 45%, #04060d);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow-x: hidden;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .24;
  background-image: linear-gradient(rgba(255,255,255,.012) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.012) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: linear-gradient(to bottom, #000, transparent 72%);
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button, a, input, textarea, select { -webkit-tap-highlight-color: transparent; }
::selection { background: rgba(124, 60, 255, .45); }
:focus-visible { outline: 2px solid #b98aff; outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.shell { width: min(2200px, calc(100% - 28px)); margin: 0 auto; }

.header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(255,255,255,.065);
  background: rgba(4, 6, 13, .88);
  backdrop-filter: blur(18px) saturate(130%);
  box-shadow: 0 12px 36px rgba(0,0,0,.26);
}
.header__row { min-height: 68px; display: flex; align-items: center; gap: 24px; }
.logo {
  flex: none;
  font-weight: 950;
  font-size: 24px;
  letter-spacing: .09em;
  background: linear-gradient(100deg, #fff 0%, #e9d9ff 46%, #b25cff 76%, #6b37ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 28px rgba(150, 75, 255, .24);
}
.logo span { color: inherit; }
.nav { display: flex; align-items: center; gap: 20px; color: #bbc1d2; font-size: 13px; font-weight: 750; }
.nav a { padding: 8px 0; transition: color .16s ease; }
.nav a:hover, .nav a[aria-current="page"] { color: #fff; }
.header-search {
  position: relative;
  margin-left: auto;
  width: min(330px, 28vw);
  height: 38px;
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: visible;
  background: rgba(14, 18, 31, .72);
}

.header-search:focus-within { border-color: rgba(137, 81, 255, .66); box-shadow: 0 0 0 3px rgba(124, 60, 255, .1); }
.header-search input { flex: 1; min-width: 0; height: 100%; padding: 0 12px; border: 0; outline: 0; color: var(--text); background: transparent; font-size: 12px; }
.header-search input::placeholder { color: #6f7890; }
.header-search button { position: relative; width: 42px; height: 100%; display: grid; place-items: center; border: 0; color: #bfc7da; background: transparent; font-size: 0; cursor: pointer; }
.header-search button::before { content: ""; width: 15px; height: 15px; border: 2px solid currentColor; border-radius: 50%; transform: translate(-2px, -2px); }
.header-search button::after { content: ""; position: absolute; width: 9px; height: 2px; border-radius: 2px; background: currentColor; transform: translate(7px, 7px) rotate(45deg); transform-origin: center; }
.header-search__results {
  position: absolute;
  z-index: 120;
  top: calc(100% + 8px);
  left: -1px;
  right: -1px;
  display: grid;
  gap: 3px;
  max-height: min(420px, 60vh);
  padding: 7px;
  overflow-y: auto;
  border: 1px solid rgba(137, 81, 255, .34);
  border-radius: 12px;
  background: rgba(13, 16, 29, .98);
  box-shadow: 0 18px 46px rgba(0, 0, 0, .36);
  backdrop-filter: blur(18px) saturate(130%);
}
.header-search__results[hidden] { display: none; }
.header-search__result {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding: 7px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
  transition: background .15s ease, border-color .15s ease;
}
.header-search__result:hover,
.header-search__result:focus-visible,
.header-search__result.is-active {
  border-color: rgba(173, 117, 255, .38);
  background: rgba(125, 60, 255, .18);
  outline: 0;
}
.header-search__result img {
  width: 36px;
  height: 48px;
  object-fit: cover;
  border-radius: 6px;
  background: #20263a;
}
.header-search__result-copy {
  display: grid;
  min-width: 0;
  gap: 3px;
}
.header-search__result-copy strong,
.header-search__result-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.header-search__result-copy strong { color: #f2edff; font-size: 12px; line-height: 1.25; }
.header-search__result-copy small { color: #9da7bd; font-size: 10px; line-height: 1.2; }
.header-search__empty { padding: 11px 9px; color: #aeb6ca; font-size: 12px; }
.header__account { display: flex; align-items: center; gap: 10px; }
.menu-toggle { display: none; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: #fff; }
.balance-pill {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: #d8c4ff;
  background: rgba(14,19,32,.76);
  font-size: 14px;
  font-weight: 900;
  text-decoration: none;
  transition: border-color .16s ease, background .16s ease, transform .16s ease;
}
.balance-pill:hover {
  border-color: var(--line-strong);
  background: rgba(125,60,255,.12);
  transform: translateY(-1px);
}
.balance-pill .spark-glyph {
  color: #ffd866;
  font-size: 17px;
  text-shadow: 0 0 12px rgba(255,216,102,.65);
}

/* Keep the proposal action visible beside top-up without crowding the account menu. */
.header-propose {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 12px;
  border: 1px solid rgba(175, 122, 255, .42);
  border-radius: 10px;
  color: #e8d9ff;
  background: rgba(125, 60, 255, .12);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  transition: border-color .16s ease, background .16s ease, transform .16s ease;
}
.header-propose > span:first-child { color: #d8aeff; font-size: 17px; line-height: 1; }
.header-propose:hover { border-color: rgba(211, 168, 255, .78); background: rgba(125, 60, 255, .22); transform: translateY(-1px); }

.main { padding: 22px 0 66px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }
.btn {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--text);
  background: linear-gradient(180deg, rgba(25,32,51,.95), rgba(14,19,32,.95));
  font-weight: 820;
  transition: transform .16s ease, border-color .16s ease, filter .16s ease;
}
.btn:hover { transform: translateY(-1px); border-color: rgba(151,112,255,.62); filter: brightness(1.06); }
.btn--primary { border-color: transparent; background: linear-gradient(135deg, #7c31ff, #5a26e7 56%, #8e39ff); box-shadow: 0 10px 28px rgba(94, 38, 230, .26); }
.btn--danger { color: #ffd7e0; border-color: rgba(255,55,112,.52); background: linear-gradient(180deg, rgba(128,20,56,.42), rgba(65,12,34,.58)); }
.btn--soft { border-color: rgba(124,92,255,.35); background: rgba(124,92,255,.1); }
.btn--glass { min-height: 50px; background: rgba(9, 11, 21, .56); backdrop-filter: blur(12px); }
.btn--outline { background: transparent; border-color: rgba(139, 78, 255, .5); color: #d3baff; }
.btn--small { min-height: 36px; padding: 8px 12px; font-size: 12px; }
.btn--hero { min-width: 220px; min-height: 50px; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 5px 9px;
  border: 1px solid rgba(187, 145, 255, .34);
  border-radius: 7px;
  color: #f0e6ff;
  background: linear-gradient(135deg, rgba(123, 49, 255, .88), rgba(91, 28, 214, .84));
  font-size: 10px;
  font-weight: 950;
  letter-spacing: .08em;
}
.eyebrow--soft { color: #cdb8ff; background: rgba(124,92,255,.1); }
.eyebrow--danger { color: #ffd4df; border-color: rgba(255,70,123,.42); background: rgba(156,20,61,.32); }
.muted { color: var(--muted); }
.badges { display: flex; gap: 7px; flex-wrap: wrap; }
.badge { display: inline-flex; align-items: center; min-height: 25px; padding: 4px 8px; border: 1px solid rgba(144,160,201,.18); border-radius: 7px; color: #cfd5e7; background: rgba(18,25,43,.76); font-size: 10px; }
.badge--free { color: #78e8a4; border-color: rgba(57,190,104,.34); background: rgba(31,111,60,.18); }
.badge--paid { color: #ffe09c; border-color: rgba(255,204,83,.3); background: rgba(132,93,18,.18); }
.badge--frozen { color: #ffb4c4; border-color: rgba(255,73,111,.35); background: rgba(131,20,48,.2); }

.storefront-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 12px; align-items: start; }
.storefront-main { min-width: 0; }
.anime-hero {
  min-height: 560px;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  align-items: center;
  border: 1px solid rgba(143, 92, 255, .33);
  border-radius: 14px;
  background-image:
    linear-gradient(90deg, rgba(4,5,12,.98) 0%, rgba(5,6,14,.91) 32%, rgba(7,7,17,.41) 63%, rgba(5,6,13,.08) 100%),
    url('/public/novelis-hero-v03.webp');
  background-size: cover;
  background-position: center 38%;
  box-shadow: 0 28px 76px rgba(18, 5, 52, .45), inset 0 0 75px rgba(133, 53, 255, .12);
}
.anime-hero::after { content: ""; position: absolute; inset: auto 0 0; height: 100px; z-index: 0; background: linear-gradient(transparent, rgba(5,7,15,.91)); }
.anime-hero__aurora { position: absolute; width: 520px; height: 520px; right: 4%; top: 2%; border-radius: 50%; z-index: 0; background: radial-gradient(circle, rgba(155,65,255,.22), transparent 66%); filter: blur(16px); animation: breathe 6s ease-in-out infinite; }
.anime-hero__particles { position: absolute; inset: 0; z-index: 0; opacity: .5; background-image: radial-gradient(circle at 73% 22%, #fff 0 1px, transparent 2px), radial-gradient(circle at 87% 42%, #c277ff 0 1px, transparent 2px), radial-gradient(circle at 61% 64%, #fff 0 1px, transparent 2px), radial-gradient(circle at 90% 77%, #c277ff 0 1px, transparent 2px); background-size: 120px 120px, 160px 160px, 210px 210px, 260px 260px; }
.anime-hero__content { position: relative; z-index: 2; width: min(720px, 58%); padding: 56px 58px; }
.anime-hero h1 { margin: 14px 0 14px; font-size: clamp(38px, 3.15vw, 62px); line-height: 1.08; letter-spacing: -.045em; text-shadow: 0 4px 30px rgba(0,0,0,.8); }
.anime-hero p { max-width: 650px; margin: 0; color: #c8cedd; font-size: 15px; line-height: 1.72; text-shadow: 0 2px 16px rgba(0,0,0,.82); }
.anime-hero__badges { margin-top: 18px; }
.anime-hero__actions { margin-top: 24px; }
.hero-dots { position: absolute; z-index: 3; left: 50%; bottom: 18px; display: flex; gap: 8px; transform: translateX(-50%); }
.hero-dots i { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.42); box-shadow: 0 0 12px rgba(255,255,255,.3); }
.hero-dots i.is-active { width: 22px; border-radius: 10px; background: #fff; }

.storefront-rail { display: grid; gap: 10px; }
.rail-card { padding: 15px; border: 1px solid var(--line); border-radius: 11px; background: linear-gradient(145deg, rgba(15,20,34,.96), rgba(9,13,24,.97)); box-shadow: 0 14px 36px rgba(0,0,0,.16); }
.rail-card > strong, .rail-head strong { font-size: 13px; }
.rail-card p { margin: 6px 0 11px; color: #aeb5c7; font-size: 11px; line-height: 1.55; }
.rail-card small { color: var(--muted); font-size: 10px; }
.rail-head { display: flex; justify-content: space-between; gap: 10px; align-items: center; margin-bottom: 8px; }
.rail-head a { color: #b989ff; font-size: 10px; font-weight: 800; }
.rail-wide { width: 100%; }
.balance-card { display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; align-items: center; }
.balance-card > span, .balance-card > small { grid-column: 1; }
.balance-card > strong { grid-column: 1; color: #a761ff; font-size: 25px; line-height: 1; }
.balance-card > strong small { color: #ad8dff; font-size: 11px; }
.balance-card .btn { grid-column: 2; grid-row: 1 / 4; }
.pack-row { min-height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 8px; border-top: 1px solid rgba(255,255,255,.055); }
.pack-row:first-of-type { border-top: 0; }
.pack-row > span { display: grid; grid-template-columns: auto 1fr; gap: 1px 7px; color: #9e6cff; font-size: 12px; }
.pack-row b { color: #e8eafb; font-size: 11px; }
.pack-row small { grid-column: 2; }
.pack-row > strong { color: #b985ff; font-size: 11px; }
.gift-card { position: relative; overflow: hidden; min-height: 108px; display: flex; align-items: center; background: radial-gradient(circle at 88% 50%, rgba(224,53,255,.23), transparent 40%), linear-gradient(120deg, rgba(48,22,84,.88), rgba(31,10,49,.9)); }
.gift-card::after { content:""; position:absolute; right:-28px; bottom:-42px; width:110px; height:110px; border-radius:50%; background:rgba(221,58,255,.12); filter:blur(10px); }
.gift-icon { margin-left: auto; color: #e459ff; font-size: 46px; line-height: 1; text-shadow: 0 0 28px rgba(230,78,255,.66); }
.next-list { display: grid; gap: 7px; }
.next-list a { min-height: 48px; display: grid; grid-template-columns: 37px 1fr auto; gap: 8px; align-items: center; }
.next-thumb { width: 37px; height: 48px; border-radius: 5px; background-image: linear-gradient(180deg, transparent, rgba(5,7,15,.65)), url('/public/novelis-hero-v03.webp'); background-size: 200px auto; background-position: calc(var(--cover-shift, 65%)) center; }
.next-list span:nth-child(2) { min-width: 0; }
.next-list b { display: block; overflow: hidden; color: #e2e5f0; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.next-list small { display: block; margin-top: 4px; }
.next-list time { color: #6f778b; font-size: 9px; }
.rights-card { border-color: rgba(255,51,103,.28); background: radial-gradient(circle at 96% 12%, rgba(255,63,112,.24), transparent 42%), linear-gradient(135deg, rgba(61,16,35,.94), rgba(28,12,28,.96)); }
.payment-card div { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.payment-card div span { font-size: 11px; font-weight: 950; color: #c7c9d3; }
.payment-card div span:first-child { color: #68d791; }

.store-section { margin-top: 10px; padding: 14px; border: 1px solid rgba(255,255,255,.055); border-radius: 11px; background: rgba(8,12,22,.66); }
.section { margin-top: 38px; }
.section__head { margin-bottom: 14px; display: flex; align-items: end; justify-content: space-between; gap: 16px; }
.section__head.compact { align-items: center; margin-bottom: 13px; }
h1, h2, h3 { letter-spacing: -.03em; }
h2 { margin: 0; font-size: 20px; }
.section-link { color: #a96fff; font-size: 10px; font-weight: 850; }

.showcase-grid { display: grid; grid-template-columns: repeat(6, minmax(0,1fr)); gap: 10px; }
.showcase-card { min-width: 0; overflow: hidden; border: 1px solid rgba(255,255,255,.075); border-radius: 8px; background: linear-gradient(180deg, #111728, #0b101c); transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.showcase-card:hover { transform: translateY(-4px); border-color: rgba(143,81,255,.64); box-shadow: 0 15px 30px rgba(31,8,78,.35); }
.showcase-card__cover { position: relative; aspect-ratio: 3 / 4.25; overflow: hidden; background-image: linear-gradient(180deg, rgba(5,7,15,.03), rgba(5,7,15,.2) 55%, rgba(5,7,15,.96)), url('/public/novelis-hero-v03.webp'); background-size: auto 122%; background-position: var(--cover-shift) center; }
.showcase-card__cover::before { content:""; position:absolute; inset:0; background: radial-gradient(circle at 50% 60%, transparent, rgba(7,7,17,.18) 58%, rgba(4,5,12,.58)); }
.showcase-card__cover::after { content:""; position:absolute; inset:0; box-shadow: inset 0 0 35px rgba(126,40,255,.2); }
.ribbon { position: absolute; z-index: 2; left: 7px; top: 7px; padding: 4px 6px; border-radius: 5px; color: #fff; background: linear-gradient(135deg, #7d3cff, #5424dc); font-size: 8px; font-weight: 950; }
.ribbon--hot { background: linear-gradient(135deg, #ff3f85, #cf234f); }
.showcase-card__title { position: absolute; z-index: 2; left: 9px; right: 9px; bottom: 10px; color: #ffd53f; font-size: clamp(9px, .8vw, 12px); font-weight: 1000; line-height: 1.08; text-shadow: 0 2px 5px #000, 0 0 12px rgba(119,56,255,.7); }
.showcase-card__body { min-height: 113px; padding: 9px; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.showcase-card__body h3 { margin: 0; display: -webkit-box; overflow: hidden; color: #e5e8f1; font-size: 10px; line-height: 1.32; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.showcase-card__body .muted { margin-top: auto; font-size: 9px; }
.showcase-card__body .badge { min-height: 20px; padding: 3px 6px; font-size: 8px; }

.popular-row { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 10px; }
.popular-card { min-width: 0; display: grid; grid-template-columns: 30px 82px 1fr; gap: 8px; align-items: stretch; position: relative; }
.popular-card__rank { width: 30px; height: 30px; display: grid; place-items: center; position: absolute; z-index: 2; left: 0; top: 0; border-radius: 7px 0 7px 0; color: #fff; background: linear-gradient(135deg, #ffbf22, #d17600); font-size: 14px; font-weight: 950; box-shadow: 0 5px 18px rgba(255,168,0,.25); }
.popular-card:nth-child(n+4) .popular-card__rank { background: linear-gradient(135deg, #576176, #292f3c); box-shadow: none; }
.popular-card__art { grid-column: 1 / 3; width: 112px; aspect-ratio: 3 / 4; border: 1px solid rgba(255,255,255,.08); border-radius: 7px; background-image: linear-gradient(180deg, transparent, rgba(5,7,14,.63)), url('/public/novelis-hero-v03.webp'); background-size: auto 118%; background-position: var(--cover-shift) center; }
.popular-card > div:last-child { min-width: 0; padding: 5px 0; display: flex; flex-direction: column; align-items: flex-start; gap: 5px; }
.popular-card strong { display: -webkit-box; overflow: hidden; font-size: 10px; line-height: 1.28; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.popular-card small { margin-top: auto; color: #939caf; font-size: 9px; }
.popular-card b { color: #ffc62b; font-size: 10px; }
.popular-card em { padding: 3px 5px; border-radius: 5px; color: #65dc8c; background: rgba(30,115,56,.18); font-size: 8px; font-style: normal; }

.home-benefits { margin-top: 12px; display: grid; grid-template-columns: repeat(4,1fr); border: 1px solid rgba(255,255,255,.075); border-radius: 11px; background: linear-gradient(145deg, rgba(15,20,34,.94), rgba(8,12,22,.94)); }
.home-benefits > div { min-height: 82px; padding: 14px 18px; display: grid; grid-template-columns: 40px 1fr; align-content: center; column-gap: 12px; border-right: 1px solid rgba(255,255,255,.055); }
.home-benefits > div:last-child { border-right: 0; }
.home-benefits span { grid-row: 1 / 3; width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid rgba(145,78,255,.42); border-radius: 11px; color: #c67aff; background: rgba(126,52,255,.09); font-size: 21px; box-shadow: 0 0 20px rgba(126,52,255,.11); }
.home-benefits strong { font-size: 12px; }
.home-benefits small { margin-top: 3px; color: var(--muted); font-size: 9px; }

/* shared catalogue and book pages */
.grid { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 16px; }
.card, .panel { border: 1px solid var(--line); border-radius: 15px; background: rgba(14,19,32,.92); }
.panel { padding: 20px; }
.book-card { overflow: hidden; transition: transform .18s ease, border-color .18s ease; }
.book-card:hover { transform: translateY(-4px); border-color: rgba(138,80,255,.64); }
.book-card__cover { aspect-ratio: 2 / 3; overflow: hidden; background: #0a0d16; }
.book-card__cover img { width: 100%; height: 100%; object-fit: cover; }
.book-card__body { padding: 14px; }
.book-card h3 { margin: 0 0 8px; font-size: 15px; line-height: 1.32; }
.genre-cloud { margin-bottom: 18px; display: flex; flex-wrap: wrap; gap: 8px; }
.genre-cloud span { padding: 7px 10px; border: 1px solid rgba(127,72,255,.25); border-radius: 999px; color: #c9b4f5; background: rgba(127,72,255,.07); font-size: 12px; }
.book-hero { display: grid; grid-template-columns: 230px 1fr; gap: 30px; }
.book-cover { overflow: hidden; aspect-ratio: 2 / 3; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); }
.book-cover img { width: 100%; height: 100%; object-fit: cover; }
.book-info h1 { margin: 0 0 12px; font-size: clamp(30px,4vw,48px); line-height: 1.06; }
.book-info__description { max-width: 820px; color: #c6ccdc; line-height: 1.75; }
.meta-line { margin: 14px 0; display: flex; flex-wrap: wrap; gap: 12px 20px; color: var(--muted); }
.chapter-list { display: grid; gap: 7px; }
.chapter { min-height: 54px; padding: 10px 13px; display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 10px; background: rgba(18,25,43,.72); }
.chapter:hover { border-color: rgba(130,86,236,.48); }
.chapter__title { flex: 1; min-width: 0; }
.chapter__title strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chapter__title span { color: var(--muted); font-size: 11px; }
.chapter__price { min-width: 72px; text-align: right; font-weight: 800; }
.pagination { margin-top: 18px; display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }

/* forms */
.form { display: grid; gap: 15px; }
.field { display: grid; gap: 7px; }
.field label { color: #d8dced; font-size: 12px; font-weight: 800; }
.input, textarea, select { width: 100%; padding: 12px 13px; border: 1px solid var(--line); border-radius: 10px; outline: 0; color: var(--text); background: #090e19; }
.input:focus, textarea:focus, select:focus { border-color: #8448ff; box-shadow: 0 0 0 3px rgba(132,72,255,.12); }
textarea { min-height: 140px; resize: vertical; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.field-hint { color: var(--muted); font-size: 11px; line-height: 1.45; }
.check-row { display: grid; grid-template-columns: 19px 1fr; gap: 10px; align-items: start; color: #c9cedd; font-size: 12px; line-height: 1.55; }
.check-row input { width: 17px; height: 17px; margin: 2px 0 0; accent-color: #7e40ff; }
.check-row a, .prose a { color: #bb91ff; text-decoration: underline; text-decoration-color: rgba(187,145,255,.45); text-underline-offset: 3px; }
.auth { width: min(510px, 100%); margin: 26px auto; }
.auth h1 { margin-bottom: 8px; }
fieldset { min-width: 0; margin: 0; padding: 18px; border: 1px solid var(--line); border-radius: 12px; }
legend { padding: 0 8px; color: #c8a6ff; font-size: 13px; font-weight: 900; }
.claims-shell { width: min(1100px, calc(100% - 34px)); }
.claims-intro { margin: 18px 0 22px; display: grid; grid-template-columns: 1.2fr .8fr; gap: 30px; align-items: end; }
.claims-intro h1 { margin: 12px 0; font-size: clamp(34px,5vw,58px); line-height: 1.03; }
.claims-intro p { max-width: 700px; color: #b7becf; line-height: 1.65; }
.claim-steps { display: grid; gap: 8px; }
.claim-steps span { min-height: 52px; display: flex; align-items: center; gap: 12px; padding: 10px 13px; border: 1px solid var(--line); border-radius: 10px; background: rgba(15,20,34,.8); font-size: 12px; }
.claim-steps b { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: linear-gradient(135deg,#863fff,#5c21d8); }
.claim-form { padding: 24px; }

.flash { position: fixed; z-index: 200; right: 20px; top: 82px; max-width: min(440px, calc(100% - 40px)); padding: 13px 16px; border: 1px solid #3b4c6a; border-radius: 10px; background: #172238; box-shadow: 0 18px 50px rgba(0,0,0,.38); transition: opacity .3s, transform .3s; }
.flash--error { border-color: rgba(255,73,111,.6); }
.flash--hide { opacity: 0; transform: translateY(-8px); pointer-events: none; }
.notice { padding: 14px 16px; border-left: 4px solid var(--warning); border-radius: 8px; color: #f2deb0; background: rgba(255,202,99,.08); }
.notice--danger { border-color: var(--danger); color: #ffc0cd; background: rgba(255,73,111,.08); }
.notice--success { border-color: var(--success); color: #bff2d1; background: rgba(85,217,147,.08); }
.stat-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; }
.stat { padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.stat strong { display: block; margin-top: 5px; font-size: 27px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .05em; }
.code { color: #b8c5d8; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }

/* reader */
.reader-shell { width: min(var(--reader-width), calc(100% - 32px)); margin: 0 auto; }
.reader-toolbar { position: sticky; top: 78px; z-index: 20; display: flex; gap: 8px; flex-wrap: wrap; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: rgba(14,19,32,.95); backdrop-filter: blur(12px); }
.reader { margin-top: 18px; padding: clamp(22px,5vw,56px); border: 1px solid var(--line); border-radius: 16px; background: #101622; font-family: Georgia, "Times New Roman", serif; font-size: var(--reader-font-size); line-height: 1.82; }
.reader h1 { font-family: Inter, ui-sans-serif, system-ui, sans-serif; line-height: 1.2; }
.reader p { margin: 0 0 1.1em; }
.reader-nav { margin-top: 18px; display: flex; justify-content: space-between; gap: 12px; }
.reader-completion { margin-top: 28px; padding: 24px; border: 1px solid rgba(145,87,255,.32); border-radius: 16px; background: linear-gradient(145deg,rgba(27,24,51,.92),rgba(13,18,32,.96)); }
.reader-completion__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.reader-completion__head h2 { margin: 5px 0 6px; font-size: 24px; }
.reader-completion__head p { max-width: 650px; margin: 0; line-height: 1.55; }
.completion-recommendations { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.completion-recommendation { min-width: 0; display: grid; grid-template-columns: 64px minmax(0,1fr); gap: 12px; align-items: center; padding: 10px; border: 1px solid rgba(151,166,210,.16); border-radius: 12px; color: var(--text); background: rgba(8,12,24,.62); transition: border-color .16s ease, transform .16s ease, background .16s ease; }
.completion-recommendation:hover { border-color: rgba(174,119,255,.68); background: rgba(119,57,205,.16); transform: translateY(-2px); }
.completion-recommendation img { width: 64px; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 8px; background: #111728; }
.completion-recommendation span { min-width: 0; display: grid; gap: 4px; }
.completion-recommendation strong { display: -webkit-box; overflow: hidden; font-size: 13px; line-height: 1.3; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.completion-recommendation small { overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.completion-recommendation em { color: #c9a9ff; font-size: 11px; font-style: normal; font-weight: 800; }
.reader-completion__empty { padding: 16px; border: 1px dashed rgba(151,166,210,.24); border-radius: 10px; color: var(--muted); }

/* legal */
.prose { color: #cbd0df; line-height: 1.75; }
.prose h2 { margin: 34px 0 10px; color: #f3f4fb; font-size: 24px; }
.legal-page { max-width: 980px; }
.legal-page > h1 { font-size: clamp(36px,5vw,60px); line-height: 1.04; }
.legal-heading { margin: 22px 0 36px; display: grid; grid-template-columns: 1fr 300px; gap: 30px; align-items: end; }
.legal-heading h1 { margin: 12px 0 8px; font-size: clamp(38px,5vw,62px); line-height: 1.03; }
.legal-status { padding: 16px; border: 1px solid rgba(255,202,99,.25); border-radius: 12px; color: #ead8b2; background: rgba(255,202,99,.065); font-size: 12px; line-height: 1.55; }
.data-table { display: grid; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.data-table > div { display: grid; grid-template-columns: 170px 1fr; gap: 15px; padding: 14px; border-bottom: 1px solid var(--line); }
.data-table > div:last-child { border-bottom: 0; }
.data-table b { color: #d8c3ff; }

.footer { margin-top: 18px; padding: 34px 0 18px; border-top: 1px solid rgba(255,255,255,.07); color: #858da2; background: rgba(3,5,11,.58); }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(4,1fr); gap: 38px; }
.footer-grid > div:not(.footer-brand) { display: grid; align-content: start; gap: 10px; font-size: 11px; }
.footer-grid strong { color: #dde1ed; font-size: 12px; }
.footer-grid a:hover { color: #c9a5ff; }
.footer-brand p { max-width: 240px; margin: 14px 0; font-size: 11px; line-height: 1.65; }
.socials { display: flex; gap: 7px; }
.socials span { width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 8px; color: #c8cde0; background: #0c101b; font-size: 9px; font-weight: 900; }
.footer-bottom { margin-top: 26px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.055); display: flex; justify-content: space-between; gap: 20px; font-size: 10px; }

@keyframes breathe { 0%,100% { transform: scale(.94); opacity:.65; } 50% { transform: scale(1.05); opacity:1; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }

@media (max-width: 1240px) {
  .shell { width: min(1180px, calc(100% - 28px)); }
  .header-search { width: 240px; }
  .showcase-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .popular-row { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
  .footer-grid { grid-template-columns: 1.4fr repeat(2,1fr); }
}
@media (max-width: 980px) {
  .storefront-layout { grid-template-columns: 1fr; }
  .storefront-rail { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .payment-card, .rights-card { grid-column: span 1; }
  .header-search { display: none; }
  .nav { gap: 14px; }
  .home-benefits { grid-template-columns: repeat(2,1fr); }
  .home-benefits > div:nth-child(2) { border-right: 0; }
  .home-benefits > div:nth-child(-n+2) { border-bottom: 1px solid rgba(255,255,255,.055); }
  .grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .book-hero { grid-template-columns: 170px 1fr; }
  .stat-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .claims-intro, .legal-heading { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .header__row { min-height: 62px; gap: 10px; position: relative; }
  .menu-toggle { display: grid; place-items: center; order: 3; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: calc(100% + 1px); padding: 14px; flex-direction: column; align-items: stretch; gap: 2px; border: 1px solid var(--line); border-radius: 0 0 14px 14px; background: rgba(7,10,18,.98); box-shadow: 0 20px 40px rgba(0,0,0,.45); }
  .nav.is-open { display: flex; }
  .nav a { padding: 10px; }
  .header__account { margin-left: auto; }
  .balance-pill { display: none; }
  .anime-hero { min-height: 570px; align-items: flex-end; background-image: linear-gradient(0deg, rgba(4,5,12,.99) 0%, rgba(5,6,14,.9) 42%, rgba(5,6,14,.14) 82%), url('/public/novelis-hero-v03.webp'); background-position: 66% center; }
  .anime-hero__content { width: 100%; padding: 250px 22px 38px; }
  .anime-hero h1 { font-size: 34px; }
  .anime-hero__actions .btn { width: 100%; }
  .showcase-grid, .popular-row { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .storefront-rail { grid-template-columns: 1fr; }
  .grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
  .form-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-bottom { flex-direction: column; }
  .data-table > div { grid-template-columns: 1fr; gap: 4px; }
}

.ranks-shell { max-width: 980px; }
.rank-overview { display:grid; grid-template-columns:minmax(0,1fr) minmax(220px,360px); gap:24px; align-items:end; margin:20px 0 26px; }
.rank-overview h2 { margin:8px 0; }
.rank-ladder { display:grid; gap:12px; }
.rank-row { display:grid; grid-template-columns:44px minmax(0,1fr) auto; gap:16px; align-items:center; padding:18px 20px; }
.rank-row.is-current { border-color:rgba(170,118,255,.72); box-shadow:0 0 0 1px rgba(170,118,255,.15),0 12px 30px rgba(73,32,132,.22); }
.rank-row__mark { width:34px; height:34px; display:grid; place-items:center; border-radius:50%; color:#aef4e9; background:rgba(71,203,173,.14); font-weight:800; }
.rank-row:not(.is-earned) .rank-row__mark { color:#9ba2b9; background:rgba(150,160,190,.12); }
.rank-row__head { display:flex; gap:12px; align-items:baseline; justify-content:space-between; }
.rank-row__head h2 { margin:0; font-size:18px; }
.rank-row__head span { color:var(--muted); font-size:12px; white-space:nowrap; }
.rank-row__main p { margin:7px 0 0; color:var(--muted); font-size:13px; line-height:1.55; }
.rank-upgrade-notice { display:flex; justify-content:space-between; gap:20px; align-items:center; margin:18px 0; border-color:rgba(244,190,85,.58); background:linear-gradient(110deg,rgba(115,72,23,.22),rgba(14,19,32,.94)); }
.rank-upgrade-notice h2 { margin:6px 0; }
.rank-upgrade-notice p { margin:0; color:var(--muted); }
.rank-admin-form { display:grid; gap:10px; overflow-x:auto; }
.rank-admin-head,.rank-admin-row { min-width:980px; display:grid; grid-template-columns:28px 1.5fr 90px 1fr 110px 100px 1fr 100px; gap:8px; align-items:center; }
.rank-admin-head { color:var(--muted); font-size:11px; padding:0 8px; }
.rank-admin-row { padding:8px; border:1px solid var(--line); border-radius:10px; background:rgba(7,10,19,.42); }
.rank-admin-row .check-row { margin:0; font-size:11px; }
@media (max-width: 680px) {
  .rank-overview { grid-template-columns:1fr; }
  .rank-row { grid-template-columns:34px minmax(0,1fr); gap:12px; }
  .rank-row > .badge { grid-column:2; justify-self:start; }
  .rank-row__head { display:block; }
  .rank-row__head span { display:block; margin-top:4px; }
  .rank-upgrade-notice { display:block; }
  .rank-upgrade-notice .btn { margin-top:14px; width:100%; }
}
@media (max-width: 520px) {
  .shell, .claims-shell { width: min(100% - 18px, 1460px); }
  .header__account .btn:first-child { display: flex; }
  .header__account { gap: 6px; }
  .header__account .btn--small { min-height: 40px; padding: 9px 10px; font-size: 12px; }
  .header-propose { width: 40px; min-width: 40px; height: 40px; min-height: 40px; padding: 0; }
  .header-propose > span:last-child { display: none; }
  .logo { font-size: 18px; }
  .anime-hero { border-radius: 12px; }
  .anime-hero__content { padding: 245px 17px 36px; }
  .anime-hero h1 { font-size: 30px; }
  .store-section { padding: 10px; }
  .showcase-grid { gap: 7px; }
  .popular-row { grid-template-columns: 1fr; }
  .popular-card { grid-template-columns: 30px 94px 1fr; }
  .popular-card__art { width: 124px; }
  .home-benefits { grid-template-columns: 1fr; }
  .home-benefits > div { border-right: 0; border-bottom: 1px solid rgba(255,255,255,.055); }
  .home-benefits > div:last-child { border-bottom: 0; }
  .book-hero { grid-template-columns: 105px 1fr; gap: 15px; }
  .book-info h1 { font-size: 26px; }
  .book-info__description { grid-column: 1 / -1; }
  .chapter { align-items: flex-start; flex-wrap: wrap; }
  .chapter__price { margin-left: auto; }
  .stat-grid { grid-template-columns: 1fr; }
  .claim-form { padding: 14px; }
  fieldset { padding: 13px; }
  .reader-shell { width: 100%; }
  .reader-toolbar { top: 68px; margin: 0 9px; }
  .reader { padding: 22px 16px; border-left: 0; border-right: 0; border-radius: 0; }
  .reader-nav { padding: 0 9px; }
  .reader-completion { margin: 22px 9px 0; padding: 18px 14px; }
  .reader-completion__head { display: grid; gap: 12px; }
  .reader-completion__head .btn { justify-self: start; }
  .completion-recommendations { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-brand { grid-column: auto; }
}

html, body { overflow-x: hidden; }

.premium-book-grid.ranoteka-book-rail-static-v12 {
  display: flex;
  flex-wrap: nowrap;
  gap: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
}

.premium-book-grid.ranoteka-book-rail-static-v12 > .premium-book-card {
  flex: 0 0 clamp(176px, 13vw, 208px);
}

@media (max-width: 680px) {
  .premium-book-grid.ranoteka-book-rail-static-v12 > .premium-book-card {
    flex-basis: min(44vw, 176px);
  }
}

/* CSP-safe cover positioning: no inline style attributes are required. */
.showcase-card--1, .popular-card__art--1 { --cover-shift: 52%; }
.showcase-card--2, .popular-card__art--2 { --cover-shift: 21%; }
.showcase-card--3, .popular-card__art--3 { --cover-shift: 73%; }
.showcase-card--4, .popular-card__art--4 { --cover-shift: 36%; }
.showcase-card--5, .popular-card__art--5 { --cover-shift: 84%; }
.showcase-card--6 { --cover-shift: 10%; }

/* v0.6 — mobile community, production core and messaging */
.avatar { display: inline-grid; flex: none; place-items: center; overflow: hidden; border-radius: 50%; object-fit: cover; background: linear-gradient(135deg,#7437f5,#d046ff); color:#fff; font-weight:950; }
.avatar--fallback { text-shadow: 0 1px 8px rgba(0,0,0,.4); }
.avatar--header { width:34px; height:34px; font-size:11px; border:1px solid rgba(255,255,255,.16); }
.avatar--bottom { width:24px; height:24px; font-size:8px; }
.header-icon { width:42px; height:42px; position:relative; display:grid; place-items:center; border:1px solid var(--line); border-radius:11px; background:rgba(14,19,32,.76); font-size:19px; }
.header-icon .header-mail-glyph { display:block; color:#ffd34f; font-size:25px; line-height:1; text-shadow:0 0 12px rgba(255,211,79,.3); }
.header-icon:hover { border-color:var(--line-strong); background:rgba(125,60,255,.12); }
.header-icon b, .mobile-bottom-nav b { min-width:17px; height:17px; padding:0 4px; position:absolute; right:-5px; top:-5px; display:grid; place-items:center; border:2px solid #080b14; border-radius:999px; background:#ff3e86; color:#fff; font-size:9px; }
.profile-chip { min-width:0; display:flex; align-items:center; gap:8px; }
.profile-chip > span { min-width:0; display:grid; }
.profile-chip b { max-width:130px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:11px; }
.profile-chip small { max-width:170px; overflow:hidden; color:var(--muted); text-overflow:ellipsis; white-space:nowrap; font-size:8px; }
.mobile-bottom-nav { display:none; }
.reader-mini-head { display:flex; align-items:center; gap:10px; }
.avatar--rail { width:44px; height:44px; font-size:13px; }
.reader-mini-head > div { display:grid; }
.reader-mini-head small { margin-top:3px; }
.rank-pill { width:max-content; max-width:100%; margin-top:12px; padding:6px 9px; border:1px solid rgba(186,126,255,.35); border-radius:999px; color:#d9beff; background:rgba(125,60,255,.1); font-size:10px; font-weight:900; }
.rank-progress { height:7px; margin:10px 0 7px; overflow:hidden; border-radius:999px; background:#080b14; box-shadow:inset 0 0 0 1px rgba(255,255,255,.07); }
.rank-progress i { height:100%; display:block; border-radius:inherit; background:linear-gradient(90deg,#7134ef,#d84dff); box-shadow:0 0 15px rgba(175,72,255,.5); }
.rail-quick-links { margin-top:10px; display:grid; grid-template-columns:1fr 1fr; gap:6px; }
.rail-quick-links a { padding:7px; border:1px solid var(--line); border-radius:8px; color:#c7cce0; font-size:9px; text-align:center; }
.rail-quick-links a:last-child { grid-column:1 / -1; }
.continue-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; }
.continue-card { min-width:0; min-height:112px; padding:10px; display:grid; grid-template-columns:62px 1fr; gap:11px; border:1px solid var(--line); border-radius:12px; background:linear-gradient(145deg,rgba(20,27,45,.92),rgba(10,14,26,.94)); }
.continue-card:hover { border-color:var(--line-strong); transform:translateY(-1px); }
.continue-card img { width:62px; height:92px; border-radius:7px; object-fit:cover; background:#090c15; }
.continue-card > span { min-width:0; display:flex; flex-direction:column; align-items:flex-start; justify-content:center; gap:6px; }
.continue-card strong { display:-webkit-box; overflow:hidden; font-size:11px; line-height:1.3; -webkit-line-clamp:2; -webkit-box-orient:vertical; }
.continue-card small { color:var(--muted); font-size:9px; }
.continue-card i { margin-top:auto; color:#b889ff; font-size:9px; font-style:normal; font-weight:850; }
.compact-grid { grid-template-columns:repeat(4,minmax(0,1fr)); }
.book-card { position:relative; }
.book-card__main { display:block; }
.bookmark-form { position:absolute; z-index:4; right:8px; top:8px; }
.bookmark-button { width:38px; height:38px; display:grid; place-items:center; border:1px solid rgba(255,255,255,.22); border-radius:11px; color:#fff; background:rgba(5,7,15,.78); backdrop-filter:blur(10px); font-size:22px; line-height:1; box-shadow:0 8px 20px rgba(0,0,0,.28); }
.bookmark-button:hover,.bookmark-button.is-active { color:#ffd45c; border-color:rgba(255,212,92,.55); background:rgba(82,60,5,.72); }
.book-actions { margin-top:20px; }
.empty-state { padding:34px; text-align:center; }
.reader-book-title { margin-bottom:10px; color:#aa7dff; font-family:Inter,ui-sans-serif,system-ui,sans-serif; font-size:12px; font-weight:900; letter-spacing:.05em; text-transform:uppercase; }
.auth-shell { min-height:60vh; display:grid; place-items:start center; }
.auth--wide { width:min(780px,100%); }
.auth-switch,.auth-links { margin-top:18px; color:var(--muted); font-size:12px; }
.auth-switch a,.auth-links a { color:#c69cff; }
.auth-links { display:flex; justify-content:space-between; gap:15px; }
.consent-box { padding:16px; display:grid; gap:10px; border:1px solid rgba(133,78,255,.24); border-radius:12px; background:rgba(108,54,212,.055); }
.consent-box h2 { font-size:16px; }
.check-row--optional { opacity:.9; }
.bot-field { padding:14px; border:1px dashed rgba(170,124,255,.34); border-radius:12px; background:rgba(125,60,255,.045); }
.mail-illustration { width:70px; height:70px; margin:0 auto 18px; display:grid; place-items:center; border:1px solid rgba(176,115,255,.35); border-radius:22px; background:rgba(125,60,255,.11); font-size:32px; box-shadow:0 0 40px rgba(125,60,255,.16); }
.profile-hero { display:grid; grid-template-columns:auto 1fr auto; gap:24px; align-items:center; background:radial-gradient(circle at 15% 15%,rgba(126,54,255,.2),transparent 30%),rgba(14,19,32,.94); }
.profile-avatar-wrap { position:relative; }
.avatar--profile { width:118px; height:118px; border:3px solid rgba(178,111,255,.45); font-size:30px; box-shadow:0 0 40px rgba(126,54,255,.22); }
.online-dot { width:17px; height:17px; position:absolute; right:7px; bottom:8px; border:3px solid #111727; border-radius:50%; background:#51d78c; }
.profile-main h1 { margin:8px 0 10px; font-size:38px; }
.profile-meta { display:flex; flex-wrap:wrap; gap:8px; color:var(--muted); font-size:11px; }
.profile-meta span { padding:5px 8px; border:1px solid var(--line); border-radius:8px; background:rgba(255,255,255,.025); }
.rank-large { margin-top:17px; display:flex; align-items:center; gap:10px; }
.rank-large > span { width:44px; height:44px; display:grid; place-items:center; border:1px solid rgba(187,117,255,.36); border-radius:13px; color:#e3c8ff; background:rgba(125,60,255,.1); font-size:20px; }
.rank-large > div { display:grid; }
.rank-large strong { font-size:16px; }
.rank-large small { color:var(--muted); font-size:10px; }
.rank-progress--large { max-width:480px; height:9px; }
.profile-actions { display:grid; gap:8px; }
.account-columns { display:grid; grid-template-columns:1fr 1fr; gap:16px; }
.panel hr { margin:24px 0; border:0; border-top:1px solid var(--line); }
.mini-book-row { min-height:72px; padding:8px 0; display:flex; align-items:center; gap:12px; border-bottom:1px solid var(--line); }
.mini-book-row:last-child { border-bottom:0; }
.mini-book-row img { width:42px; height:62px; border-radius:6px; object-fit:cover; }
.mini-book-row span { min-width:0; display:grid; gap:4px; }
.mini-book-row strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:12px; }
.mini-book-row small { color:var(--muted); font-size:9px; }
.library-tabs { min-height:420px; }
.tab-buttons { margin-bottom:18px; display:flex; gap:8px; overflow-x:auto; scrollbar-width:none; }
.tab-buttons button { min-height:42px; flex:none; padding:9px 14px; border:1px solid var(--line); border-radius:10px; color:#b7bed0; background:#0d1220; font-weight:800; }
.tab-buttons button.is-active { color:#fff; border-color:rgba(147,89,255,.6); background:linear-gradient(135deg,#7132eb,#9d40ff); }
.tab-panel { display:none; }
.tab-panel.is-active { display:block; }
.narrow-shell { max-width:900px; }
.notification-filters { margin-bottom:16px; display:flex; gap:8px; flex-wrap:wrap; }
.campaign-preview { margin:0; font-size:11px; line-height:1.5; }
.notification-list { display:grid; gap:8px; }
.notification-item { min-height:96px; padding:14px; display:grid; grid-template-columns:46px 1fr auto; gap:13px; align-items:center; border:1px solid var(--line); border-radius:13px; background:rgba(14,19,32,.86); }
.notification-item.is-unread { border-color:rgba(153,91,255,.48); background:linear-gradient(120deg,rgba(82,32,161,.18),rgba(14,19,32,.94)); }
.notification-icon { width:44px; height:44px; display:grid; place-items:center; border:1px solid rgba(161,100,255,.34); border-radius:13px; color:#d3b2ff; background:rgba(125,60,255,.1); font-size:18px; font-weight:950; }
.notification-item strong { font-size:15px; }
.notification-item p { margin:5px 0; color:#aeb6ca; font-size:13px; line-height:1.5; }
.notification-item small { color:#6f798f; font-size:10px; }
.notification-item > i { padding:4px 7px; border-radius:999px; color:#fff; background:#8138f4; font-size:8px; font-style:normal; }
.messages-shell { width:min(1180px,calc(100% - 34px)); }
.messages-layout { min-height:650px; padding:0; display:grid; grid-template-columns:330px 1fr; overflow:hidden; }
.conversation-list { min-width:0; padding:16px; border-right:1px solid var(--line); background:rgba(8,12,22,.65); }
.conversation-head { display:flex; justify-content:space-between; align-items:center; gap:10px; }
.conversation-head h1 { margin:0; font-size:24px; }
.new-message-search { margin:15px 0; display:grid; gap:7px; }
.new-message-search label { color:var(--muted); font-size:10px; }
.conversation-users { display:grid; gap:6px; }
.conversation-user { min-width:0; padding:9px; display:grid; grid-template-columns:42px 1fr auto; gap:9px; align-items:center; border:1px solid transparent; border-radius:11px; }
.conversation-user:hover,.conversation-user.is-active { border-color:rgba(145,85,255,.4); background:rgba(125,60,255,.08); }
.avatar--message { width:42px; height:42px; font-size:11px; }
.conversation-user span { min-width:0; display:grid; gap:3px; }
.conversation-user strong,.conversation-user small { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.conversation-user strong { font-size:11px; }
.conversation-user small { color:var(--muted); font-size:8px; }
.conversation-user > b { min-width:21px; height:21px; display:grid; place-items:center; border-radius:999px; background:#8439f5; font-size:9px; }
.chat-panel { min-width:0; min-height:650px; display:grid; grid-template-rows:auto 1fr auto; background:radial-gradient(circle at 50% 20%,rgba(87,38,168,.08),transparent 40%),#0c111e; }
.chat-header { min-height:72px; padding:14px 18px; display:flex; align-items:center; gap:11px; border-bottom:1px solid var(--line); }
.chat-header > div { display:grid; gap:3px; }
.chat-header small { color:var(--muted); font-size:9px; }
.chat-messages { max-height:560px; padding:20px; display:flex; flex-direction:column; gap:9px; overflow-y:auto; }
.chat-bubble { width:max-content; max-width:min(72%,620px); padding:10px 13px; align-self:flex-start; border:1px solid var(--line); border-radius:5px 14px 14px 14px; background:#151d2d; }
.chat-bubble.is-own { align-self:flex-end; border-color:rgba(150,88,255,.38); border-radius:14px 5px 14px 14px; background:linear-gradient(135deg,#6530cc,#893ceb); }
.chat-bubble p { margin:0; font-size:12px; line-height:1.55; }
.chat-bubble small { margin-top:6px; display:block; color:#98a0b4; font-size:8px; text-align:right; }
.chat-bubble.is-own small { color:#dfccff; }
.chat-compose { padding:13px; display:grid; grid-template-columns:1fr auto; gap:10px; border-top:1px solid var(--line); }
.chat-compose textarea { min-height:52px; max-height:130px; resize:vertical; }
.chat-placeholder,.empty-chat { display:grid; place-items:center; align-content:center; text-align:center; color:var(--muted); }
.chat-placeholder > span { font-size:48px; opacity:.45; }
.chat-placeholder h2 { margin:12px 0 4px; color:#e7e9f2; }
.empty-chat { min-height:100%; padding:30px; font-size:11px; }
.catalog-search .actions { flex-wrap:nowrap; }
.catalog-filter-grid { margin-top:16px; display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; }
.catalog-filter-grid fieldset { min-width:0; margin:0; padding:12px; border:1px solid var(--line); border-radius:10px; }
.catalog-filter-grid legend { padding:0 6px; color:#d9dced; font-size:11px; font-weight:800; }
.catalog-options { max-height:150px; display:grid; gap:6px; overflow:auto; }
.catalog-option { display:flex; align-items:flex-start; gap:7px; color:var(--muted); font-size:11px; line-height:1.35; cursor:pointer; }
.catalog-option input { margin:2px 0 0; accent-color:#995cff; }
.catalog-active-filters { margin:16px 0 2px; display:flex; align-items:center; flex-wrap:wrap; gap:7px; }
.catalog-active-filters .badge { text-decoration:none; }

@media (max-width: 1100px) {
  .profile-chip > span { display:none; }
  .continue-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .compact-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .messages-layout { grid-template-columns:280px 1fr; }
}
@media (max-width: 760px) {
  body { padding-bottom:calc(66px + env(safe-area-inset-bottom)); }
  .main { padding-top:12px; padding-bottom:35px; }
  .footer { padding-bottom:90px; }
  .mobile-bottom-nav { height:calc(60px + env(safe-area-inset-bottom)); padding:5px 8px env(safe-area-inset-bottom); position:fixed; z-index:150; left:0; right:0; bottom:0; display:grid; grid-template-columns:repeat(5,1fr); border-top:1px solid rgba(255,255,255,.1); background:rgba(7,9,17,.94); backdrop-filter:blur(18px); box-shadow:0 -12px 32px rgba(0,0,0,.35); }
  .mobile-bottom-nav a { min-width:0; position:relative; display:grid; place-items:center; align-content:center; gap:2px; color:#a6aec1; font-size:18px; }
  .mobile-bottom-nav a span { font-size:8px; font-weight:800; }
  .mobile-bottom-nav .avatar { margin:auto; }
  .header-icon,.profile-chip { display:none; }
  .header-propose { min-height: 40px; padding: 0 9px; font-size: 11px; }
  .header-propose > span:first-child { font-size: 16px; }
  .header__account { gap:6px; }
  .continue-grid { grid-template-columns:1fr; }
  .compact-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .profile-hero { grid-template-columns:auto 1fr; gap:14px; padding:16px; }
  .profile-actions { grid-column:1 / -1; grid-template-columns:1fr 1fr; }
  .avatar--profile { width:82px; height:82px; font-size:22px; }
  .profile-main h1 { font-size:27px; }
  .rank-large { margin-top:11px; }
  .account-columns { grid-template-columns:1fr; }
  .messages-shell { width:100%; }
  .messages-layout { min-height:calc(100vh - 140px); grid-template-columns:1fr; border-left:0; border-right:0; border-radius:0; }
  .conversation-list { border-right:0; }
  .chat-panel { min-height:540px; border-top:1px solid var(--line); }
  .conversation-users { max-height:230px; overflow-y:auto; }
  .chat-messages { max-height:430px; }
  .chat-bubble { max-width:88%; }
  .notification-item { grid-template-columns:40px 1fr; }
  .notification-item > i { grid-column:2; width:max-content; }
  .notification-icon { width:40px; height:40px; }
  .auth--wide { padding:17px; }
  .consent-box { padding:12px; }
  .catalog-search .actions { flex-wrap:wrap; }
  .catalog-filter-grid { grid-template-columns:1fr 1fr; }
}
@media (max-width: 520px) {
  .continue-card { grid-template-columns:54px 1fr; min-height:102px; }
  .continue-card img { width:54px; height:82px; }
  .profile-hero { grid-template-columns:1fr; text-align:center; }
  .profile-avatar-wrap { margin:auto; }
  .profile-meta,.rank-large { justify-content:center; }
  .rank-progress--large { margin-left:auto; margin-right:auto; }
  .profile-actions { grid-template-columns:1fr; }
  .auth-links { flex-direction:column; }
  .tab-buttons { margin-left:-9px; margin-right:-9px; padding:0 9px; }
  .notification-item { padding:11px; }
  .chat-compose { grid-template-columns:1fr; }
  .chat-compose .btn { width:100%; }
  .catalog-filter-grid { grid-template-columns:1fr; }
}


/* v0.6: крупный рабочий desktop layout и панель готовности */
.readiness-panel { padding: 20px; }
.readiness-list { margin: 12px 0 0; padding-left: 24px; display: grid; gap: 8px; color: #d9deec; }
.readiness-list li::marker { color: var(--warning); font-weight: 900; }
.infra-grid { margin-top: 16px; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; }
.infra-grid > div { padding: 13px; border: 1px solid var(--line); border-radius: 10px; background: rgba(7,10,19,.48); }
.infra-grid span { display:block; color:var(--muted); font-size:11px; }
.infra-grid strong { display:block; margin-top:5px; overflow-wrap:anywhere; }
.table-actions { display:flex; flex-wrap:wrap; gap:7px; min-width:180px; }
.table-actions form { margin:0; }

@media (min-width: 1600px) {
  .header__row { min-height: 74px; }
  .nav { font-size: 14px; gap: 24px; }
  .header-search { width: min(440px, 28vw); height: 42px; }
  .storefront-rail { gap: 12px; }
  .rail-card { padding: 18px; }
}
@media (max-width: 980px) {
  .infra-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 520px) {
  .infra-grid { grid-template-columns: 1fr; }
}

/* ===== Ranoteka legacy v0.7: readable desktop scale, top-read carousel, social and admin ===== */
.shell { width: min(2260px, calc(100% - 36px)); }
.header__row { min-height: 76px; }
.nav { font-size: 15px; gap: 25px; }
.header-search { height: 44px; width: min(420px, 30vw); }
.header-search input { font-size: 14px; }
.btn { min-height: 48px; padding: 12px 18px; border-radius: 12px; font-size: 14px; }
.btn--small { min-height: 40px; padding: 9px 14px; font-size: 12px; }
.btn--hero { min-width: 235px; min-height: 56px; font-size: 15px; }
.btn--large { min-height: 58px; padding-inline: 24px; font-size: 15px; }
.storefront-layout { grid-template-columns: minmax(0, 1fr) 370px; gap: 16px; }
.store-section { padding: 18px; }
.section__head.compact h2 { font-size: 22px; }
.section-link { font-size: 12px; }
.rail-card { padding: 18px; border-radius: 14px; }
.rail-card > strong, .rail-head strong { font-size: 15px; }
.rail-card p { font-size: 12px; }
.rail-card small { font-size: 11px; line-height: 1.45; }
.pack-row { min-height: 58px; }
.pack-row span b { font-size: 13px; }
.pack-row > strong { font-size: 13px; }
.balance-card strong { font-size: 30px; }

.top-hero { position: relative; min-height: clamp(540px, 44vw, 760px); overflow: hidden; border: 1px solid rgba(136,77,255,.48); border-radius: 18px; background: #090b16; box-shadow: 0 28px 70px rgba(0,0,0,.35); isolation: isolate; }
.top-hero__slides { position: absolute; inset: 0; }
.top-hero__slide { position: absolute; inset: 0; display: flex; align-items: center; opacity: 0; visibility: hidden; transform: scale(1.018); transition: opacity .7s ease, transform 1.15s ease, visibility .7s; background-image: linear-gradient(90deg,rgba(4,5,13,.99) 0%,rgba(4,5,13,.91) 34%,rgba(4,5,13,.36) 64%,rgba(4,5,13,.08)), var(--hero-image); background-size: cover; background-position: center; }
.top-hero__slide::before { content:""; position:absolute; inset:0; background: radial-gradient(circle at 75% 30%,rgba(167,72,255,.19),transparent 28rem), linear-gradient(0deg,rgba(4,6,13,.78),transparent 42%); }
.top-hero__slide.is-active { opacity: 1; visibility: visible; transform: scale(1); z-index: 1; }
.top-hero__shade { position:absolute; inset:0; background-image: radial-gradient(circle at 24% 24%,rgba(115,53,255,.12),transparent 23rem), radial-gradient(circle at 78% 72%,rgba(226,61,255,.12),transparent 28rem); }
.top-hero__content { position:relative; z-index:2; width:min(810px,61%); padding:64px 72px 82px; }
.top-hero h1 { margin:16px 0; font-size:clamp(42px,3.6vw,72px); line-height:1.04; letter-spacing:-.048em; text-shadow:0 5px 32px rgba(0,0,0,.86); }
.top-hero p { max-width:720px; margin:0; color:#d1d6e6; font-size:16px; line-height:1.72; text-shadow:0 2px 16px rgba(0,0,0,.9); display:-webkit-box; -webkit-line-clamp:4; -webkit-box-orient:vertical; overflow:hidden; }
.top-hero__badges { margin-top:20px; }
.top-hero__actions { margin-top:26px; }
.hero-stats { margin-top:20px; display:flex; flex-wrap:wrap; gap:10px 18px; align-items:center; color:#e4e7f4; font-size:13px; }
.hero-stats > span { display:inline-flex; align-items:center; gap:6px; }
.stars { color:#ffc94a; letter-spacing:.08em; white-space:nowrap; }
.hero-arrow { position:absolute; z-index:5; top:50%; width:50px; height:64px; margin-top:-32px; border:1px solid rgba(255,255,255,.14); color:#fff; background:rgba(5,7,15,.56); backdrop-filter:blur(10px); border-radius:14px; font-size:37px; transition:background .18s,transform .18s; }
.hero-arrow:hover { background:rgba(113,50,240,.7); transform:scale(1.04); }
.hero-arrow--prev { left:15px; }
.hero-arrow--next { right:15px; }
.top-hero .hero-dots { position:absolute; z-index:5; left:50%; bottom:25px; transform:translateX(-50%); display:flex; gap:8px; }
.top-hero .hero-dots button { width:10px; height:10px; padding:0; border:0; border-radius:999px; background:rgba(255,255,255,.35); transition:width .25s,background .25s; }
.top-hero .hero-dots button.is-active { width:34px; background:#fff; }
.hero-progress { position:absolute; z-index:5; left:0; right:0; bottom:0; height:3px; background:rgba(255,255,255,.08); }
.hero-progress i { display:block; width:0; height:100%; background:linear-gradient(90deg,#6d36ff,#e55cff); }
.top-hero.is-running .hero-progress i { animation:heroTimer var(--hero-interval,5s) linear forwards; }
@keyframes heroTimer { to { width:100%; } }

.showcase-grid { grid-template-columns: repeat(6,minmax(0,1fr)); gap:14px; }
.showcase-card { display:flex; min-height:100%; flex-direction:column; border-radius:12px; }
.showcase-card__cover { aspect-ratio:2 / 3; background-size:cover; background-position:center; }
.showcase-card__body { min-height:146px; padding:12px; }
.showcase-card__body h3 { font-size:13px; line-height:1.35; min-height:35px; }
.showcase-card__body .muted { margin-top:0; font-size:10px; }
.showcase-card__body .badge { margin-top:auto; min-height:24px; font-size:9px; }
.showcase-card__title { font-size:clamp(10px,.72vw,14px); }
.showcase-card__meta { width:100%; display:flex; justify-content:space-between; gap:7px; color:#bfc7d9; font-size:9px; }
.top-grid .ribbon { background:linear-gradient(135deg,#e9a400,#ffcf42); color:#191005; }
.ribbon { font-size:9px; padding:6px 8px; }

.rights-bottom { margin-top:16px; padding:24px 28px; display:flex; align-items:center; justify-content:space-between; gap:28px; border:1px solid rgba(255,55,112,.34); border-radius:16px; background:linear-gradient(105deg,rgba(94,13,45,.74),rgba(38,9,28,.84) 58%,rgba(17,9,25,.94)); box-shadow:0 18px 44px rgba(54,0,21,.2); }
.rights-bottom h2 { margin:10px 0 6px; font-size:22px; }
.rights-bottom p { margin:0; color:#c7aeb8; font-size:12px; }

.book-rating-line { margin:10px 0 14px; display:flex; align-items:center; flex-wrap:wrap; gap:8px 14px; color:#bec5d7; font-size:13px; }
.book-rating-line__metric { display:inline-flex; align-items:center; gap:6px; }
.book-rating-line__metric > small { color:var(--muted); font-size:11px; font-weight:800; }
.book-rating-line__metric--translation .stars { color:#bf91ff; }
.book-rating-line b { color:#ffd45f; font-size:18px; }
.rating-panel { margin-top:22px; padding:14px; display:flex; align-items:center; justify-content:space-between; gap:20px; border:1px solid var(--line); border-radius:14px; background:rgba(13,18,32,.72); }
.rating-panel--dual { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); align-items:stretch; gap:12px; }
.rating-panel__item { display:grid; gap:14px; min-width:0; padding:15px; border:1px solid var(--line); border-radius:12px; background:rgba(18,25,42,.58); }
.rating-panel__heading { display:flex; align-items:center; justify-content:space-between; gap:14px; }
.rating-panel__heading > div:first-child { display:grid; gap:4px; min-width:0; }
.rating-panel__heading > div:first-child > strong { font-size:15px; color:var(--text); }
.rating-panel__heading > div:first-child > small { color:var(--muted); font-size:11px; line-height:1.35; }
.rating-panel__item .rating-score { flex:0 0 auto; }
.rating-panel__item .rating-score > strong { font-size:28px; }
.rating-panel__item--translation .stars { color:#bf91ff; }
.rating-panel__item .rating-form { justify-content:flex-start; }
.rating-score { display:flex; align-items:center; gap:12px; }
.rating-score > strong { font-size:34px; color:#ffd05a; }
.rating-score > div { display:grid; gap:3px; }
.rating-score small { color:var(--muted); }
.rating-form { display:flex; align-items:center; flex-wrap:wrap; gap:9px; }
.rating-form > span { color:#cfd4e4; font-size:12px; font-weight:800; }
.rating-choices { display:flex; gap:5px; }
.rating-choices input { position:absolute; opacity:0; pointer-events:none; }
.rating-choices span { min-width:40px; height:36px; display:grid; place-items:center; border:1px solid var(--line); border-radius:9px; color:#b9c0d3; background:#0b101c; font-size:11px; }
.rating-choices input:checked + span { color:#211600; border-color:#ffd05a; background:#ffd05a; font-weight:900; }
.package-panel { margin-bottom:20px; display:grid; grid-template-columns:1fr; gap:16px; align-items:start; }
.package-panel h3 { margin:0 0 5px; }
.package-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; }
.promo-book-panel { margin:0; border:1px solid var(--line); border-radius:12px; background:rgba(8,12,24,.42); overflow:hidden; }
.promo-book-panel summary { min-height:58px; padding:12px 15px; display:flex; align-items:center; justify-content:space-between; gap:14px; cursor:pointer; list-style:none; }
.promo-book-panel summary::-webkit-details-marker { display:none; }
.promo-book-panel summary:hover { background:rgba(125,60,255,.08); }
.promo-book-panel__summary-copy { display:grid; gap:3px; }
.promo-book-panel__summary-copy strong { color:var(--text); font-size:14px; }
.promo-book-panel__summary-copy small { color:var(--muted); font-size:11px; }
.promo-book-panel__chevron { color:var(--muted); font-size:20px; line-height:1; transition:transform .18s ease; }
.promo-book-panel[open] .promo-book-panel__chevron { transform:rotate(180deg); }
.promo-book-panel__body { display:grid; gap:12px; padding:0 15px 15px; border-top:1px solid var(--line); }
.promo-book-panel__body > p { margin:12px 0 0; }
.promo-book-panel__body .actions { margin:0; }
.package-button { width:100%; min-height:96px; padding:13px; display:grid; grid-template-columns:1fr auto; align-items:center; gap:5px 12px; border:1px solid rgba(134,77,255,.34); border-radius:12px; color:#fff; background:linear-gradient(145deg,rgba(34,24,68,.9),rgba(14,17,31,.98)); text-align:left; }
.package-button:hover { border-color:#a76cff; }
.package-button span { display:grid; gap:4px; }
.package-button small { color:#bca4ed; }
.package-button strong { color:#f0d8ff; }
.package-button del { grid-column:2; color:#6f7890; font-size:10px; }
.remaining-package-offer { display:grid; gap:12px; border-color:rgba(255,193,79,.34); background:linear-gradient(145deg,rgba(67,42,13,.42),rgba(20,17,29,.84)); }
.remaining-package-offer__head { display:flex; align-items:flex-start; justify-content:space-between; gap:14px; }
.remaining-package-offer__head h3 { margin:4px 0 5px; }
.remaining-package-offer__head p { max-width:720px; margin:0; }
.remaining-package-offer__count { min-width:52px; height:52px; display:grid; place-items:center; border:1px solid rgba(255,211,79,.42); border-radius:14px; color:#ffd45f; background:rgba(255,194,74,.12); font-size:18px; }
.remaining-package-offer__summary { display:flex; align-items:baseline; flex-wrap:wrap; gap:10px 16px; }
.remaining-package-offer__summary > span { color:var(--muted); font-size:11px; }
.remaining-package-offer__summary > strong { color:#ffd45f; font-size:24px; }
.remaining-package-offer__summary > small { color:#d4b76d; font-size:11px; }
.remaining-package-offer__actions { display:flex; align-items:center; flex-wrap:wrap; gap:10px; }

.discussion,.reader-discussion { margin-top:34px; }
.discussion-count { min-width:42px; height:42px; display:grid; place-items:center; border:1px solid var(--line); border-radius:50%; color:#d7c6ff; background:rgba(121,61,255,.1); font-weight:900; }
.comment-form { margin-bottom:16px; padding:18px; }
.comment-form h3 { margin:0 0 12px; }
.comment-form textarea { min-height:105px; }
.comment-form__bottom { margin-top:10px; display:flex; justify-content:space-between; align-items:center; gap:12px; }
.comment-form__bottom small { color:var(--muted); }
.comment-list { display:grid; gap:10px; }
.comment { padding:14px; display:grid; grid-template-columns:42px 1fr; gap:12px; border:1px solid var(--line); border-radius:13px; background:rgba(12,17,30,.78); }
.comment__body { min-width:0; }
.comment__body header { display:flex; align-items:flex-start; flex-wrap:wrap; gap:6px 14px; }
.comment__body header > div { display:grid; }
.comment__body header span,.comment__body time { color:var(--muted); font-size:10px; }
.comment__body time { margin-left:auto; }
.comment__body p { margin:10px 0 0; color:#d3d7e4; line-height:1.62; font-size:13px; overflow-wrap:anywhere; }
.avatar--comment { width:42px; height:42px; border-radius:50%; }
.comment-delete { padding:0; border:0; color:#ff7897; background:transparent; font-size:10px; }
.empty-comments { padding:28px; border:1px dashed var(--line); border-radius:13px; text-align:center; color:#c6cada; }
.empty-comments p { color:var(--muted); }
.comment-login { display:flex; align-items:center; justify-content:space-between; gap:15px; margin-bottom:15px; }
.reader-discussion { padding-bottom:30px; }

.admin-create .panel { padding:24px; }
.admin-book-row { min-height:88px; padding:10px 0; display:grid; grid-template-columns:54px minmax(0,1fr) auto auto; align-items:center; gap:13px; border-bottom:1px solid var(--line); }
.admin-book-row:last-child { border-bottom:0; }
.admin-book-row img { width:54px; aspect-ratio:2/3; object-fit:cover; border-radius:7px; }
.admin-book-row > div { display:grid; gap:3px; }
.admin-book-row span,.admin-book-row small { color:var(--muted); }
.admin-side-stack { display:grid; gap:15px; }
.admin-cover-preview { width:170px; aspect-ratio:2/3; overflow:hidden; border:1px solid var(--line); border-radius:12px; }
.admin-cover-preview img { width:100%; height:100%; object-fit:cover; }

.footer-grid > div:not(.footer-brand) { font-size:13px; gap:13px; }
.footer-grid strong { font-size:14px; }
.footer-brand p { font-size:13px; }
.footer-legal-link { color:#ff9db4; font-weight:850; }
.footer-bottom { font-size:11px; }

@media (max-width: 1500px) {
  .showcase-grid { grid-template-columns:repeat(5,minmax(0,1fr)); }
  .storefront-layout { grid-template-columns:minmax(0,1fr) 340px; }
  .top-hero__content { padding-left:58px; }
}
@media (max-width: 1240px) {
  .shell { width:min(1180px,calc(100% - 28px)); }
  .showcase-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .top-hero { min-height:610px; }
  .top-hero__content { width:68%; }
}
@media (max-width: 980px) {
  .storefront-layout { grid-template-columns:1fr; }
  .storefront-rail { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .top-hero__content { width:72%; padding:50px 54px 75px; }
  .rights-bottom { align-items:flex-start; flex-direction:column; }
  .rights-bottom .btn { width:100%; }
}
@media (max-width: 760px) {
  .shell { width:min(100% - 20px,720px); }
  .top-hero { min-height:650px; border-radius:14px; }
  .top-hero__slide { align-items:flex-end; background-image:linear-gradient(0deg,rgba(4,5,13,.99) 0%,rgba(4,5,13,.92) 45%,rgba(4,5,13,.15) 82%),var(--hero-image); background-position:center top; }
  .top-hero__content { width:100%; padding:270px 22px 72px; }
  .top-hero h1 { font-size:36px; }
  .top-hero p { font-size:14px; -webkit-line-clamp:3; }
  .hero-arrow { top:42%; width:42px; height:52px; }
  .showcase-grid { display:flex; gap:11px; overflow-x:auto; scroll-snap-type:x mandatory; padding-bottom:8px; }
  .showcase-card { flex:0 0 min(62vw,245px); scroll-snap-align:start; }
  .storefront-rail { grid-template-columns:1fr; }
  .rating-panel { align-items:stretch; flex-direction:column; }
  .rating-panel--dual { grid-template-columns:1fr; }
  .rating-panel__heading { align-items:flex-start; flex-direction:column; gap:9px; }
  .rating-form { align-items:flex-start; flex-direction:column; }
  .package-grid { grid-template-columns:1fr; }
  .comment-form__bottom { align-items:stretch; flex-direction:column; }
  .comment-form__bottom .btn { width:100%; }
  .admin-book-row { grid-template-columns:46px minmax(0,1fr); }
  .admin-book-row > .badge,.admin-book-row > .btn { grid-column:2; justify-self:start; }
  .rights-bottom { padding:20px; }
}
@media (max-width: 520px) {
  .top-hero { min-height:620px; }
  .top-hero__content { padding:245px 17px 68px; }
  .top-hero h1 { font-size:30px; }
  .top-hero__actions .btn { width:100%; }
  .hero-stats { font-size:11px; }
  .showcase-card { flex-basis:72vw; }
  .comment { grid-template-columns:34px 1fr; }
  .avatar--comment { width:34px; height:34px; }
}

/* ─────────────────────────────────────────────────────────────
   Ranoteka legacy v0.8 — readable UI, guest mascot and simpler signup
   The mascot is built only with HTML/CSS shapes; no generated image.
   ───────────────────────────────────────────────────────────── */

/* The small desktop labels from v0.7 were too hard to read. */
.header__account .btn--small { min-height: 43px; padding: 10px 16px; font-size: 14px; }
.balance-pill { font-size: 14px; }

.rail-card { padding: 20px; }
.rail-card > strong,
.rail-head strong { font-size: 17px; line-height: 1.3; }
.rail-card p { margin: 8px 0 13px; font-size: 14px; line-height: 1.58; }
.rail-card small { font-size: 12.5px; line-height: 1.5; }
.rail-head a { font-size: 12px; }
.balance-card { gap: 9px 13px; }
.balance-card > span { font-size: 15px; }
.balance-card > strong { font-size: 34px; }
.balance-card > strong small { font-size: 13px; }
.balance-card .btn { min-height: 46px; padding-inline: 18px; font-size: 14px; }
.pack-row { min-height: 68px; gap: 12px; }
.pack-row > span { gap: 3px 9px; font-size: 14px; }
.pack-row b,
.pack-row span b { font-size: 15px; }
.pack-row > strong { font-size: 15px; white-space: nowrap; }
.pack-row small { font-size: 12px; }
.gift-card strong { font-size: 17px; }
.next-list a { min-height: 58px; }
.next-list b { font-size: 13px; }
.next-list small,
.next-list time { font-size: 11.5px; }

.home-benefits > div { min-height: 102px; padding: 18px 22px; grid-template-columns: 48px 1fr; column-gap: 15px; }
.home-benefits span { width: 46px; height: 46px; font-size: 25px; border-radius: 13px; }
.home-benefits strong { font-size: 16px; line-height: 1.28; }
.home-benefits small { margin-top: 5px; font-size: 12.5px; line-height: 1.4; }

.footer { padding-top: 46px; }
.footer-grid { gap: clamp(34px, 4vw, 72px); }
.footer-grid > div:not(.footer-brand) { gap: 15px; font-size: 15px; line-height: 1.45; }
.footer-grid strong { font-size: 16px; }
.footer-brand p { max-width: 310px; font-size: 15px; line-height: 1.65; }
.footer .socials span { min-width: 39px; min-height: 36px; font-size: 12px; }
.footer-bottom { margin-top: 34px; padding-top: 22px; font-size: 13px; line-height: 1.45; }

/* Registration page */
.auth-story-shell {
  width: min(1280px, calc(100% - 28px));
  min-height: 72vh;
  margin: 0 auto;
  padding: 24px 0 36px;
  display: grid;
  grid-template-columns: minmax(340px, 430px) minmax(0, 790px);
  align-items: start;
  justify-content: center;
  gap: 28px;
}
.auth--registration { width: 100%; margin: 0; padding: clamp(24px, 3vw, 38px); }
.auth--registration h1 { margin: 15px 0 8px; font-size: clamp(32px, 3vw, 44px); }
.auth--registration > p { font-size: 15px; line-height: 1.6; }
.auth--registration .form { gap: 19px; }
.auth--registration .field label { font-size: 14px; }
.input--large { min-height: 54px; padding: 14px 16px; font-size: 16px; }
.auth--registration .field-hint { font-size: 12.5px; }
.password-field { position: relative; }
.password-field .input { padding-right: 105px; }
.password-toggle {
  position: absolute;
  top: 7px;
  right: 7px;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid rgba(151,166,210,.18);
  border-radius: 8px;
  color: #d8dcef;
  background: #151b2b;
  font-size: 12px;
  font-weight: 800;
}
.password-toggle:hover { border-color: rgba(153,103,255,.58); }
.bot-passive { display: none; }
.bot-field--turnstile { padding: 15px; }
.consent-box--compact { padding: 17px; gap: 13px; }
.consent-box--compact .check-row { font-size: 13px; line-height: 1.58; }
.check-row--legal input { width: 19px; height: 19px; }
.btn--register { width: 100%; min-height: 56px; font-size: 16px; }
.auth-switch { font-size: 14px; text-align: center; }

/* Novi: a small CSS-only anime-style helper. */
.novi-guide {
  color: var(--text);
}
.novi-guide__visual {
  min-height: 300px;
  display: grid;
  place-items: center;
}
.novi-guide__visual--compact { min-height: 170px; }
.novi-character {
  --novi-scale: 1;
  position: relative;
  width: 190px;
  height: 280px;
  transform-origin: 50% 100%;
  animation: noviFloat 3.4s ease-in-out infinite;
}
.novi-guide__visual--compact .novi-character { width: 118px; height: 170px; --novi-scale: .62; }
.novi-character__hair-back {
  position: absolute;
  z-index: 1;
  left: 24px;
  top: 13px;
  width: 142px;
  height: 178px;
  border-radius: 48% 52% 42% 44%;
  background:
    radial-gradient(circle at 64% 19%, rgba(188,108,255,.9), transparent 20%),
    linear-gradient(135deg, #32145c 0%, #6a2aae 45%, #241142 100%);
  box-shadow: 0 18px 42px rgba(67,18,119,.46), inset -18px -12px 24px rgba(15,5,31,.42);
}
.novi-character__face {
  position: absolute;
  z-index: 3;
  left: 47px;
  top: 36px;
  width: 100px;
  height: 111px;
  border-radius: 44% 44% 48% 48%;
  background: linear-gradient(145deg, #ffe7df, #f8c8c5);
  box-shadow: inset -8px -7px 16px rgba(195,95,119,.14);
}
.novi-character__ear {
  position: absolute;
  z-index: 2;
  top: 73px;
  width: 25px;
  height: 33px;
  border-radius: 50%;
  background: #f7c9c7;
}
.novi-character__ear--left { left: 36px; }
.novi-character__ear--right { right: 34px; }
.novi-character__bang {
  position: absolute;
  z-index: 4;
  top: -8px;
  width: 35px;
  height: 58px;
  border-radius: 80% 20% 70% 30%;
  background: linear-gradient(150deg, #7a36c1, #3c1768);
  transform-origin: top center;
}
.novi-character__bang--one { left: 4px; transform: rotate(15deg); }
.novi-character__bang--two { left: 32px; height: 66px; transform: rotate(-6deg); }
.novi-character__bang--three { right: 4px; transform: rotate(-21deg) scaleX(-1); }
.novi-character__eye {
  position: absolute;
  z-index: 5;
  top: 54px;
  width: 24px;
  height: 30px;
  border-radius: 52% 52% 48% 48%;
  border: 3px solid #3b244f;
  background:
    radial-gradient(circle at 55% 31%, #fff 0 2px, transparent 3px),
    radial-gradient(circle at 50% 66%, #7e34dd 0 6px, #331858 7px 11px, #fff 12px);
  box-shadow: 0 2px 0 rgba(69,35,82,.13);
}
.novi-character__eye--left { left: 18px; }
.novi-character__eye--right { right: 18px; }
.novi-character__blush {
  position: absolute;
  z-index: 5;
  top: 84px;
  width: 18px;
  height: 7px;
  border-radius: 50%;
  background: rgba(244,105,145,.26);
}
.novi-character__blush--left { left: 9px; }
.novi-character__blush--right { right: 9px; }
.novi-character__mouth {
  position: absolute;
  z-index: 5;
  left: 44px;
  top: 90px;
  width: 14px;
  height: 8px;
  border-bottom: 2px solid #a55070;
  border-radius: 0 0 50% 50%;
}
.novi-character__neck {
  position: absolute;
  z-index: 2;
  left: 81px;
  top: 137px;
  width: 31px;
  height: 30px;
  border-radius: 10px;
  background: #f7c9c7;
}
.novi-character__body {
  position: absolute;
  z-index: 2;
  left: 42px;
  top: 157px;
  width: 108px;
  height: 116px;
  border-radius: 38px 38px 20px 20px;
  background:
    linear-gradient(90deg, transparent 46%, rgba(255,255,255,.12) 47% 53%, transparent 54%),
    linear-gradient(145deg, #6d31d5, #35126f 65%, #20103e);
  box-shadow: 0 20px 38px rgba(49,13,93,.36);
}
.novi-character__collar {
  position: absolute;
  top: 4px;
  width: 37px;
  height: 28px;
  border-radius: 4px 14px;
  background: #f1e6ff;
}
.novi-character__collar--left { left: 20px; transform: rotate(18deg); }
.novi-character__collar--right { right: 20px; transform: rotate(-18deg) scaleX(-1); }
.novi-character__arm {
  position: absolute;
  z-index: 4;
  right: 12px;
  top: 170px;
  width: 67px;
  height: 24px;
  border-radius: 999px;
  background: linear-gradient(90deg, #5d26b7 0 58%, #f7c9c7 59%);
  transform: rotate(-27deg);
  transform-origin: left center;
}
.novi-character__hand {
  position: absolute;
  z-index: 6;
  right: 1px;
  top: 136px;
  font-size: 32px;
  transform: rotate(18deg);
  filter: drop-shadow(0 5px 8px rgba(0,0,0,.22));
}
.novi-character__spark {
  position: absolute;
  z-index: 8;
  color: #d6adff;
  font-style: normal;
  text-shadow: 0 0 16px #a24dff;
  animation: noviSpark 2.2s ease-in-out infinite;
}
.novi-character__spark--one { left: 1px; top: 42px; font-size: 25px; }
.novi-character__spark--two { right: 0; top: 92px; font-size: 21px; animation-delay: -.8s; }
.novi-guide__visual--compact .novi-character > * { transform-origin: top left; }
.novi-guide__visual--compact .novi-character { --novi-scale: .62; }

.novi-guide__bubble {
  position: relative;
  padding: 20px;
  border: 1px solid rgba(163,101,255,.48);
  border-radius: 19px;
  background: linear-gradient(145deg, rgba(24,20,48,.98), rgba(11,14,28,.98));
  box-shadow: 0 22px 55px rgba(0,0,0,.34), 0 0 36px rgba(111,42,222,.14);
}
.novi-guide__bubble::before {
  content: "";
  position: absolute;
  left: -12px;
  top: 45%;
  width: 22px;
  height: 22px;
  border-left: 1px solid rgba(163,101,255,.48);
  border-bottom: 1px solid rgba(163,101,255,.48);
  background: #16142e;
  transform: rotate(45deg);
}
.novi-guide__name { display: block; margin-bottom: 8px; color: #c99bff; font-size: 12px; font-weight: 900; letter-spacing: .055em; text-transform: uppercase; }
.novi-guide__bubble p { margin: 0; color: #e6e8f5; font-size: 14px; line-height: 1.58; }
.novi-guide__button { width: 100%; margin-top: 14px; min-height: 48px; font-size: 14px; }
.novi-guide__login { display: block; margin-top: 10px; color: #b8bed1; font-size: 12px; text-align: center; }
.novi-guide__login:hover { color: #fff; }
.novi-guide__close {
  position: absolute;
  top: 7px;
  right: 9px;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  color: #b7bdd0;
  background: rgba(255,255,255,.06);
  font-size: 21px;
}
.novi-guide__close:hover { color: #fff; background: rgba(255,255,255,.11); }

.novi-guide--guest {
  position: fixed;
  z-index: 94;
  right: 22px;
  bottom: 22px;
  width: min(470px, calc(100vw - 30px));
  display: grid;
  grid-template-columns: 125px minmax(0,1fr);
  align-items: end;
  gap: 0;
  transition: opacity .22s ease, transform .22s ease;
}
.novi-guide--guest.is-hidden { opacity: 0; transform: translateY(18px); pointer-events: none; }
.novi-guide--guest .novi-guide__visual { margin-right: -5px; }

.novi-guide--register {
  position: sticky;
  top: 94px;
  min-height: 600px;
  padding: 24px 24px 26px;
  border: 1px solid rgba(142,79,255,.32);
  border-radius: 20px;
  background:
    radial-gradient(circle at 50% 13%, rgba(164,76,255,.22), transparent 16rem),
    linear-gradient(155deg, rgba(17,17,38,.98), rgba(8,11,24,.98));
  overflow: hidden;
}
.novi-guide--register .novi-guide__bubble { margin-top: -5px; }
.novi-guide--register .novi-guide__bubble::before { left: 50%; top: -12px; transform: translateX(-50%) rotate(135deg); }
.novi-guide__steps { margin-top: 18px; display: grid; gap: 10px; }
.novi-guide__steps span { min-height: 42px; display: flex; align-items: center; gap: 10px; color: #cfd3e3; font-size: 13px; }
.novi-guide__steps b { width: 28px; height: 28px; flex: none; display: grid; place-items: center; border: 1px solid rgba(167,109,255,.44); border-radius: 50%; color: #d9b9ff; background: rgba(126,59,239,.13); }

@keyframes noviFloat { 0%,100% { transform: translateY(0) rotate(-1deg) scale(var(--novi-scale)); } 50% { transform: translateY(-8px) rotate(1deg) scale(var(--novi-scale)); } }
@keyframes noviSpark { 0%,100% { opacity:.45; transform:scale(.8) rotate(0); } 50% { opacity:1; transform:scale(1.18) rotate(16deg); } }

@media (max-width: 1120px) {
  .auth-story-shell { grid-template-columns: 310px minmax(0,720px); }
  .novi-guide--register { padding-inline: 18px; }
  .footer-grid { grid-template-columns: 1.25fr repeat(2,1fr); }
  .footer-grid > div:nth-child(4), .footer-grid > div:nth-child(5) { margin-top: 12px; }
}
@media (max-width: 820px) {
  .auth-story-shell { width: min(100% - 20px,760px); grid-template-columns: 1fr; gap: 15px; padding-top: 12px; }
  .novi-guide--register { position: relative; top: auto; min-height: 0; display: grid; grid-template-columns: 150px minmax(0,1fr); align-items: center; padding: 15px; }
  .novi-guide--register .novi-guide__visual { min-height: 190px; }
  .novi-guide--register .novi-character { --novi-scale: .66; }
  .novi-guide--register .novi-guide__bubble { margin: 0; }
  .novi-guide--register .novi-guide__bubble::before { left: -12px; top: 45%; transform: rotate(45deg); }
  .novi-guide__steps { grid-column: 1 / -1; grid-template-columns: repeat(3,1fr); }
  .home-benefits { grid-template-columns: 1fr 1fr; }
  .home-benefits > div:nth-child(2) { border-right: 0; }
  .home-benefits > div:nth-child(-n+2) { border-bottom: 1px solid rgba(255,255,255,.055); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-bottom { flex-direction: column; }
}
@media (max-width: 560px) {
  .rail-card { padding: 18px; }
  .home-benefits { grid-template-columns: 1fr; }
  .home-benefits > div { border-right: 0; border-bottom: 1px solid rgba(255,255,255,.055); }
  .home-benefits > div:last-child { border-bottom: 0; }
  .footer-grid { grid-template-columns: 1fr; gap: 29px; }
  .footer-brand { grid-column: auto; }
  .footer-grid > div:nth-child(4), .footer-grid > div:nth-child(5) { margin-top: 0; }
  .novi-guide--guest { right: 10px; bottom: 10px; width: calc(100vw - 20px); grid-template-columns: 84px minmax(0,1fr); }
  .novi-guide--guest .novi-guide__visual { min-height: 116px; overflow: visible; }
  .novi-guide--guest .novi-character { --novi-scale: .44; }
  .novi-guide--guest .novi-guide__bubble { padding: 16px 15px 14px; border-radius: 16px; }
  .novi-guide--guest .novi-guide__name { padding-right: 22px; font-size: 10px; }
  .novi-guide--guest .novi-guide__bubble p { font-size: 12.5px; line-height: 1.45; }
  .novi-guide--guest .novi-guide__button { min-height: 43px; margin-top: 10px; font-size: 12.5px; }
  .novi-guide--register { grid-template-columns: 100px minmax(0,1fr); }
  .novi-guide--register .novi-guide__visual { min-height: 145px; overflow: hidden; }
  .novi-guide--register .novi-character { --novi-scale: .49; }
  .novi-guide--register .novi-guide__bubble { padding: 15px; }
  .novi-guide--register .novi-guide__bubble p { font-size: 13px; }
  .novi-guide__steps { display: none; }
  .auth--registration { padding: 22px 17px; }
  .auth--registration h1 { font-size: 31px; }
}

/* RANOTEKA_RAIL_INTERACTION_FINAL: the viewport owns horizontal scrolling. */
.premium-section,
.premium-book-strip { overflow: visible !important; }
.premium-book-grid,
.premium-book-grid.ranoteka-book-rail-static-v12 {
  overflow-x: auto !important;
  overflow-y: hidden !important;
  touch-action: pan-x !important;
  cursor: grab !important;
  overscroll-behavior-inline: contain !important;
  -webkit-overflow-scrolling: touch !important;
}
.premium-book-grid.is-dragging { cursor: grabbing !important; scroll-behavior: auto !important; }
.premium-book-grid > .premium-book-card { flex: 0 0 154px !important; width: 154px !important; min-width: 154px !important; }
@media (max-width: 700px) {
  .premium-book-grid > .premium-book-card { flex-basis: 128px !important; width: 128px !important; min-width: 128px !important; }
}

/* RANOTEKA_FANDOM_CARD_SIZE_V1: match fandom covers to book-card covers. */
.premium-fandoms__grid {
  grid-template-columns: repeat(auto-fill, minmax(154px, 154px)) !important;
  justify-content: start !important;
}
.premium-fandom {
  width: 154px !important;
}
.premium-fandom__cover {
  width: 154px !important;
  aspect-ratio: 2 / 3 !important;
}
@media (max-width: 700px) {
  .premium-fandoms__grid { grid-template-columns: repeat(auto-fill, minmax(128px, 128px)) !important; }
  .premium-fandom { width: 128px !important; }
  .premium-fandom__cover { width: 128px !important; }
}

/* RANOTEKA_PROMO_COPY_READABLE_V1: make banner descriptions easier to scan. */
.premium-promos--carousel .premium-promo small {
  max-width: 300px !important;
  color: #e1e2ed !important;
  font-size: 13px !important;
  line-height: 1.4 !important;
}
@media (max-width: 700px) {
  .premium-promos--carousel .premium-promo small { font-size: 12px !important; }
}

/* RANOTEKA_PROMO_FREE_SCROLL_FINAL: never pull a released banner to an edge. */
.premium-promos--carousel { scroll-snap-type: none !important; }
.premium-promos--carousel > .premium-promo { scroll-snap-align: none !important; }

/* Reader connections and presence. */
.profile-presence { margin: 0 0 8px; }
.presence-status { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 11px; font-weight: 750; }
.presence-status i { width: 8px; height: 8px; flex: none; display: block; border-radius: 50%; background: #8992a8; box-shadow: 0 0 0 3px rgba(137,146,168,.12); }
.presence-status--online { color: #4fda91; }
.presence-status--online i { background: #4fda91; box-shadow: 0 0 0 3px rgba(79,218,145,.13); }
.presence-status--hidden { color: var(--muted); }
.profile-social-actions { align-items: center; }
.profile-social-actions .friend-inline-form,
.profile-social-actions .friend-request-actions { display: inline-flex; gap: 8px; }
.friend-inline-form { margin: 0; }
.friend-request-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.friends-panel { margin-top: 18px; padding: 22px; }
.friends-panel .section__head { margin-bottom: 14px; }
.friends-panel .section__head h2 { margin: 4px 0 5px; }
.friends-count { min-width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid rgba(175,122,255,.34); border-radius: 50%; color: #d8c5ff; background: rgba(125,60,255,.12); font-size: 13px; font-weight: 900; }
.friends-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
.friend-card,
.friend-request { min-width: 0; display: flex; align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.025); }
.friend-card__main { min-width: 0; flex: 1; display: grid; gap: 4px; }
.friend-card__main > a,
.friend-request__identity a { min-width: 0; overflow: hidden; color: var(--text); text-decoration: none; text-overflow: ellipsis; white-space: nowrap; }
.friend-card__main .user-name,
.friend-request__identity .user-name { display: inline-flex; }
.friend-card .btn { flex: none; }
.friends-requests { display: grid; gap: 8px; margin-bottom: 12px; }
.friends-requests h3 { margin: 0 0 2px; font-size: 14px; }
.friend-request { justify-content: space-between; }
.friend-request__identity { min-width: 0; display: flex; align-items: center; gap: 10px; }
.friend-request__identity > div { min-width: 0; display: grid; gap: 4px; }
.friend-request__actions { display: flex; flex-wrap: wrap; gap: 7px; flex: none; }
.friends-sent { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.friend-pending { padding: 6px 9px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); font-size: 11px; }
.friend-pending a { color: var(--text); }
.friends-empty { padding: 14px; border: 1px dashed var(--line); border-radius: 9px; color: var(--muted); font-size: 12px; line-height: 1.5; }
@media (max-width: 680px) {
  .friends-grid { grid-template-columns: 1fr; }
  .friend-request { align-items: flex-start; flex-direction: column; }
  .friend-request__actions { width: 100%; }
  .friend-request__actions form { flex: 1; }
  .friend-request__actions .btn { width: 100%; }
  .profile-social-actions { align-items: stretch; }
  .profile-social-actions > .btn,
  .profile-social-actions .friend-inline-form,
  .profile-social-actions .friend-request-actions { width: 100%; }
  .profile-social-actions .friend-inline-form .btn,
  .profile-social-actions .friend-request-actions form { flex: 1; }
}

/* Keep the large home hero clean; the cover itself keeps its own border. */
.home-premium .premium-hero {
  border: 0 !important;
  box-shadow: none !important;
}

/* Keep the promo rail flush with the page. The artwork cards provide their
 * own edge treatment; remove the old rail padding and drop shadow that read
 * as grey frames around the banners. */
.premium-promos-shell,
.premium-promos--carousel {
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
.premium-promos--carousel > .premium-promo,
.premium-promo {
  box-shadow: none !important;
}

/* RANOTEKA_PROFILE_RANK_SCALE_V1: make rank progress and rewards readable
   beside the profile identity without changing the surrounding layout. */
.profile-main .rank-large {
  margin-top: 22px;
  gap: 14px;
}
.profile-main .rank-large > span {
  width: 56px;
  height: 56px;
  border-radius: 15px;
  font-size: 26px;
}
.profile-main .rank-large strong {
  font-size: 21px;
  line-height: 1.2;
}
.profile-main .rank-large small {
  margin-top: 3px;
  font-size: 14px;
  line-height: 1.3;
}
.profile-main .profile-meta {
  gap: 10px;
  font-size: 13px;
}
.profile-main .profile-meta span {
  padding: 7px 10px;
}
.profile-main .rank-progress--large {
  max-width: 560px;
  height: 12px;
  margin: 14px 0 10px;
}
.profile-main > small.muted,
.profile-main > p.muted {
  margin: 10px 0 0;
  font-size: 14px;
  line-height: 1.5;
}
.profile-main > .btn.btn--small {
  min-height: 42px;
  margin-top: 14px;
  padding: 10px 16px;
  font-size: 13px;
}

@media (max-width: 560px) {
  .profile-main .rank-large { margin-top: 16px; gap: 11px; }
  .profile-main .rank-large > span {
    width: 50px;
    height: 50px;
    font-size: 23px;
  }
  .profile-main .rank-large strong { font-size: 19px; }
  .profile-main .rank-large small { font-size: 13px; }
  .profile-main .profile-meta { gap: 8px; font-size: 12px; }
  .profile-main .profile-meta span { padding: 6px 9px; }
  .profile-main .rank-progress--large { height: 10px; margin-top: 12px; }
  .profile-main > small.muted,
  .profile-main > p.muted { font-size: 13px; }
}

/* RANOTEKA_LIBRARY_CONTINUE_CARDS_V1: continuation uses the same vertical
   card proportions as the saved-library and purchase tabs. */
.library-tabs .continue-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 16px;
  align-items: stretch;
}
.library-tabs .continue-card {
  min-width: 0;
  min-height: 390px;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--panel);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.library-tabs .continue-card:hover {
  transform: translateY(-4px);
  border-color: rgba(138,80,255,.64);
  box-shadow: 0 15px 30px rgba(0,0,0,.16);
}
.library-tabs .continue-card img {
  display: block;
  width: 100%;
  height: 250px;
  flex: 0 0 250px;
  aspect-ratio: auto;
  border-radius: 0;
  object-fit: cover;
  background: #0a0d16;
}
.library-tabs .continue-card > span {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 0;
  padding: 14px;
}
.library-tabs .continue-card strong {
  display: -webkit-box;
  max-width: 100%;
  overflow: hidden;
  color: var(--text);
  font-size: 15px;
  line-height: 1.32;
  text-overflow: ellipsis;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}
.library-tabs .continue-card small {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.25;
}
.library-tabs .continue-card i {
  margin-top: auto;
  padding-top: 12px;
  color: #b889ff;
  font-size: 11px;
  font-style: normal;
  font-weight: 850;
}

@media (max-width: 560px) {
  .library-tabs .continue-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .library-tabs .continue-card { min-height: 320px; }
  .library-tabs .continue-card img {
    height: 190px;
    flex-basis: 190px;
  }
  .library-tabs .continue-card > span { padding: 10px; }
  .library-tabs .continue-card strong { font-size: 14px; }
  .library-tabs .continue-card small { font-size: 9px; }
  .library-tabs .continue-card i { font-size: 10px; }
}

/* The story picker is a dedicated page now; never expand the home card. */
.premium-promos--carousel > .premium-promo--stories .premium-story-shelf,
.premium-promo--stories .premium-story-shelf { display: none !important; }
.premium-promos--carousel > .premium-promo--stories.is-open { height: 220px !important; min-height: 220px !important; }

/* RANOTEKA_FINAL_LAYOUT_V16_LAST: final cascade for compact, aligned cards
   and the visible infinite promo rail. */
.premium-book-card { height: auto !important; min-height: 0 !important; align-self: flex-start !important; }
.premium-book-card__cover { aspect-ratio: 2 / 3 !important; height: auto !important; min-height: 0 !important; flex: 0 0 auto !important; }
.premium-book-card__body { box-sizing: border-box !important; display: block !important; height: 52px !important; min-height: 52px !important; padding: 8px 6px 10px !important; }
.premium-book-card__title { display: -webkit-box !important; min-height: 0 !important; max-height: 2.56em !important; overflow: hidden !important; font-size: 13px !important; line-height: 1.28 !important; -webkit-box-orient: vertical !important; -webkit-line-clamp: 2 !important; }
.premium-book-card__ratings, .premium-book-card__footer, .premium-book-card__taxonomy, .premium-book-card__cover-title, .premium-book-card__badge { display: none !important; }
.book-card { height: auto !important; min-height: 0 !important; align-self: start !important; }
.book-card__cover { aspect-ratio: 2 / 3 !important; height: auto !important; }
.book-card__body { min-height: 0 !important; padding: 9px 10px 12px !important; }
.premium-fandoms__grid { display: grid !important; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)) !important; align-items: start !important; gap: 18px 14px !important; }
.premium-fandom { display: grid !important; grid-template-rows: auto 50px !important; align-self: start !important; gap: 8px !important; min-width: 0 !important; min-height: 0 !important; padding: 0 !important; border: 0 !important; background: transparent !important; }
.premium-fandom__cover { display: block !important; width: 100% !important; aspect-ratio: 2 / 3 !important; min-height: 0 !important; border-radius: 10px !important; background-size: cover !important; background-position: center !important; }
.premium-fandom__body { display: grid !important; grid-template-rows: 2.5em 1.2em !important; align-content: start !important; gap: 3px !important; min-height: 50px !important; height: 50px !important; padding: 0 2px !important; }
.premium-fandom__body strong { display: -webkit-box !important; max-height: 2.5em !important; overflow: hidden !important; font-size: 13px !important; line-height: 1.25 !important; -webkit-box-orient: vertical !important; -webkit-line-clamp: 2 !important; }
.premium-fandom__body span { display: block !important; height: 1.2em !important; overflow: hidden !important; font-size: 11px !important; line-height: 1.2 !important; white-space: nowrap !important; text-overflow: ellipsis !important; }
.premium-promos--carousel { position: relative !important; display: flex !important; flex-wrap: nowrap !important; align-items: stretch !important; gap: 12px !important; width: 100% !important; min-width: 0 !important; padding: 2px 4px 9px !important; overflow-x: auto !important; overflow-y: visible !important; scroll-behavior: smooth !important; scroll-snap-type: x proximity !important; scrollbar-width: none !important; -webkit-overflow-scrolling: touch !important; touch-action: pan-x !important; cursor: grab !important; overscroll-behavior-inline: contain !important; overflow-anchor: none !important; }
.premium-promos--carousel::-webkit-scrollbar { display: none !important; }
.premium-promos--carousel.is-dragging { cursor: grabbing !important; scroll-behavior: auto !important; scroll-snap-type: none !important; user-select: none !important; }
.premium-promos--carousel > .premium-promo { flex: 0 0 calc((100% - 24px) / 3) !important; width: calc((100% - 24px) / 3) !important; min-width: 0 !important; height: 220px !important; min-height: 220px !important; scroll-snap-align: start !important; }
.premium-promos--carousel > .premium-promo.is-open { height: auto !important; min-height: 220px !important; }
.premium-promos--carousel > .premium-promo .premium-promo__body { min-height: 220px !important; }
.premium-promos__arrow { position: absolute !important; top: 50% !important; z-index: 20 !important; display: grid !important; place-items: center !important; width: 34px !important; height: 48px !important; padding: 0 !important; color: #fff !important; border: 1px solid rgba(255,255,255,.24) !important; border-radius: 10px !important; background: rgba(8,10,24,.86) !important; box-shadow: 0 10px 24px rgba(0,0,0,.38) !important; cursor: pointer !important; opacity: .9 !important; transform: translateY(-50%) !important; }
.premium-promos__arrow:hover { border-color: rgba(221,159,255,.85) !important; background: rgba(88,40,155,.94) !important; }
.premium-promos__arrow--prev { left: 2px !important; } .premium-promos__arrow--next { right: 2px !important; }
@media (max-width: 1100px) { .premium-promos--carousel > .premium-promo { flex-basis: calc((100% - 12px) / 2) !important; width: calc((100% - 12px) / 2) !important; } }
@media (max-width: 700px) {
  .premium-book-card__body { height: 48px !important; min-height: 48px !important; padding: 7px 4px 8px !important; }
  .premium-book-card__title { font-size: 12px !important; }
  .premium-fandoms__grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 16px 12px !important; }
  .premium-promos--carousel { gap: 10px !important; padding-inline: 2px !important; }
  .premium-promos--carousel > .premium-promo { flex-basis: 88% !important; width: 88% !important; min-width: 88% !important; height: 200px !important; min-height: 200px !important; }
  .premium-promos--carousel > .premium-promo .premium-promo__body { min-height: 200px !important; }
  .premium-promos__arrow { display: none !important; }
}

/* RANOTEKA_FINAL_LAYOUT_V16_LAST: final cascade for the requested compact,
   aligned cards and the visible infinite promo rail. */
.premium-book-card { height: auto !important; min-height: 0 !important; align-self: flex-start !important; }
.premium-book-card__cover { aspect-ratio: 2 / 3 !important; height: auto !important; min-height: 0 !important; flex: 0 0 auto !important; }
.premium-book-card__body { box-sizing: border-box !important; display: block !important; height: 52px !important; min-height: 52px !important; padding: 8px 6px 10px !important; }
.premium-book-card__title { display: -webkit-box !important; min-height: 0 !important; max-height: 2.56em !important; overflow: hidden !important; font-size: 13px !important; line-height: 1.28 !important; -webkit-box-orient: vertical !important; -webkit-line-clamp: 2 !important; }
.premium-book-card__ratings, .premium-book-card__footer, .premium-book-card__taxonomy, .premium-book-card__cover-title, .premium-book-card__badge { display: none !important; }
.book-card { height: auto !important; min-height: 0 !important; align-self: start !important; }
.book-card__cover { aspect-ratio: 2 / 3 !important; height: auto !important; }
.book-card__body { min-height: 0 !important; padding: 9px 10px 12px !important; }

.premium-fandoms__grid { display: grid !important; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)) !important; align-items: start !important; gap: 18px 14px !important; }
.premium-fandom { display: grid !important; grid-template-rows: auto 50px !important; align-self: start !important; gap: 8px !important; min-width: 0 !important; min-height: 0 !important; padding: 0 !important; border: 0 !important; background: transparent !important; }
.premium-fandom__cover { display: block !important; width: 100% !important; aspect-ratio: 2 / 3 !important; min-height: 0 !important; border-radius: 10px !important; background-size: cover !important; background-position: center !important; }
.premium-fandom__body { display: grid !important; grid-template-rows: 2.5em 1.2em !important; align-content: start !important; gap: 3px !important; min-height: 50px !important; height: 50px !important; padding: 0 2px !important; }
.premium-fandom__body strong { display: -webkit-box !important; max-height: 2.5em !important; overflow: hidden !important; font-size: 13px !important; line-height: 1.25 !important; -webkit-box-orient: vertical !important; -webkit-line-clamp: 2 !important; }
.premium-fandom__body span { display: block !important; height: 1.2em !important; overflow: hidden !important; font-size: 11px !important; line-height: 1.2 !important; white-space: nowrap !important; text-overflow: ellipsis !important; }

.premium-promos--carousel { position: relative !important; display: flex !important; flex-wrap: nowrap !important; align-items: stretch !important; gap: 12px !important; width: 100% !important; min-width: 0 !important; padding: 2px 4px 9px !important; overflow-x: auto !important; overflow-y: visible !important; scroll-behavior: smooth !important; scroll-snap-type: x proximity !important; scrollbar-width: none !important; -webkit-overflow-scrolling: touch !important; touch-action: pan-x !important; cursor: grab !important; overscroll-behavior-inline: contain !important; }
.premium-promos--carousel::-webkit-scrollbar { display: none !important; }
.premium-promos--carousel.is-dragging { cursor: grabbing !important; scroll-behavior: auto !important; scroll-snap-type: none !important; user-select: none !important; }
.premium-promos--carousel > .premium-promo { flex: 0 0 calc((100% - 24px) / 3) !important; width: calc((100% - 24px) / 3) !important; min-width: 0 !important; height: 220px !important; min-height: 220px !important; scroll-snap-align: start !important; }
.premium-promos--carousel > .premium-promo.is-open { height: auto !important; min-height: 220px !important; }
.premium-promos--carousel > .premium-promo .premium-promo__body { min-height: 220px !important; }
.premium-promos__arrow { position: absolute !important; top: 50% !important; z-index: 20 !important; display: grid !important; place-items: center !important; width: 34px !important; height: 48px !important; padding: 0 !important; color: #fff !important; border: 1px solid rgba(255,255,255,.24) !important; border-radius: 10px !important; background: rgba(8,10,24,.86) !important; box-shadow: 0 10px 24px rgba(0,0,0,.38) !important; cursor: pointer !important; opacity: .9 !important; transform: translateY(-50%) !important; }
.premium-promos__arrow:hover { border-color: rgba(221,159,255,.85) !important; background: rgba(88,40,155,.94) !important; }
.premium-promos__arrow--prev { left: 2px !important; } .premium-promos__arrow--next { right: 2px !important; }
@media (max-width: 1100px) { .premium-promos--carousel > .premium-promo { flex-basis: calc((100% - 12px) / 2) !important; width: calc((100% - 12px) / 2) !important; } }
@media (max-width: 700px) {
  .premium-book-card__body { height: 48px !important; min-height: 48px !important; padding: 7px 4px 8px !important; }
  .premium-book-card__title { font-size: 12px !important; }
  .premium-fandoms__grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 16px 12px !important; }
  .premium-promos--carousel { gap: 10px !important; padding-inline: 2px !important; }
  .premium-promos--carousel > .premium-promo { flex-basis: 88% !important; width: 88% !important; min-width: 88% !important; height: 200px !important; min-height: 200px !important; }
  .premium-promos--carousel > .premium-promo .premium-promo__body { min-height: 200px !important; }
  .premium-promos__arrow { display: none !important; }
}

/* RANOTEKA_FINAL_LAYOUT_V16: compact cards, aligned fandoms and the visible
   home promo rail. These rules intentionally come last to win over the older
   experimental layout layers above. */
.premium-book-card {
  height: auto !important;
  min-height: 0 !important;
  align-self: flex-start !important;
}
.premium-book-card__cover {
  aspect-ratio: 2 / 3 !important;
  height: auto !important;
  min-height: 0 !important;
}
.premium-book-card__body {
  box-sizing: border-box !important;
  display: block !important;
  height: 52px !important;
  min-height: 52px !important;
  padding: 8px 6px 10px !important;
}
.premium-book-card__title {
  display: -webkit-box !important;
  min-height: 0 !important;
  max-height: 2.56em !important;
  overflow: hidden !important;
  font-size: 13px !important;
  line-height: 1.28 !important;
  -webkit-box-orient: vertical !important;
  -webkit-line-clamp: 2 !important;
  text-overflow: ellipsis !important;
}
.premium-book-card__ratings,
.premium-book-card__footer,
.premium-book-card__taxonomy,
.premium-book-card__cover-title,
.premium-book-card__badge { display: none !important; }

.book-card {
  height: auto !important;
  min-height: 0 !important;
  align-self: start !important;
}
.book-card__cover { aspect-ratio: 2 / 3 !important; height: auto !important; }
.book-card__body { min-height: 0 !important; padding: 9px 10px 12px !important; }

.premium-fandoms__grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)) !important;
  align-items: start !important;
  gap: 18px 14px !important;
}
.premium-fandom {
  display: grid !important;
  grid-template-rows: auto 50px !important;
  align-self: start !important;
  gap: 8px !important;
  width: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  padding: 0 !important;
}
.premium-fandom__cover {
  display: block !important;
  width: 100% !important;
  aspect-ratio: 2 / 3 !important;
  min-height: 0 !important;
  border-radius: 10px !important;
  background-size: cover !important;
  background-position: center !important;
}
.premium-fandom__body {
  display: grid !important;
  grid-template-rows: 2.5em 1.2em !important;
  align-content: start !important;
  gap: 3px !important;
  min-height: 50px !important;
  height: 50px !important;
  padding: 0 2px !important;
}
.premium-fandom__body strong {
  display: -webkit-box !important;
  max-height: 2.5em !important;
  overflow: hidden !important;
  font-size: 13px !important;
  line-height: 1.25 !important;
  -webkit-box-orient: vertical !important;
  -webkit-line-clamp: 2 !important;
}
.premium-fandom__body span {
  display: block !important;
  height: 1.2em !important;
  overflow: hidden !important;
  font-size: 11px !important;
  line-height: 1.2 !important;
  white-space: nowrap !important;
  text-overflow: ellipsis !important;
}

.premium-promos--carousel {
  position: relative !important;
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: stretch !important;
  gap: 12px !important;
  width: 100% !important;
  min-width: 0 !important;
  padding: 2px 4px 9px !important;
  overflow-x: auto !important;
  overflow-y: visible !important;
  scroll-behavior: smooth !important;
  scroll-snap-type: x proximity !important;
  scrollbar-width: none !important;
  -webkit-overflow-scrolling: touch !important;
  touch-action: pan-x !important;
  cursor: grab !important;
  overscroll-behavior-inline: contain !important;
}
.premium-promos--carousel::-webkit-scrollbar { display: none !important; }
.premium-promos--carousel.is-dragging {
  cursor: grabbing !important;
  scroll-behavior: auto !important;
  scroll-snap-type: none !important;
  user-select: none !important;
}
.premium-promos--carousel > .premium-promo {
  flex: 0 0 calc((100% - 24px) / 3) !important;
  width: calc((100% - 24px) / 3) !important;
  min-width: 0 !important;
  height: 220px !important;
  min-height: 220px !important;
  scroll-snap-align: start !important;
}
.premium-promos--carousel > .premium-promo.is-open {
  height: auto !important;
  min-height: 220px !important;
}
.premium-promos--carousel > .premium-promo .premium-promo__body { min-height: 220px !important; }
.premium-promos__arrow {
  position: absolute !important;
  top: 50% !important;
  z-index: 20 !important;
  display: grid !important;
  place-items: center !important;
  width: 34px !important;
  height: 48px !important;
  padding: 0 !important;
  color: #fff !important;
  border: 1px solid rgba(255,255,255,.24) !important;
  border-radius: 10px !important;
  background: rgba(8,10,24,.86) !important;
  box-shadow: 0 10px 24px rgba(0,0,0,.38) !important;
  cursor: pointer !important;
  opacity: .9 !important;
  transform: translateY(-50%) !important;
}
.premium-promos__arrow:hover { border-color: rgba(221,159,255,.85) !important; background: rgba(88,40,155,.94) !important; }
.premium-promos__arrow--prev { left: 2px !important; }
.premium-promos__arrow--next { right: 2px !important; }

@media (max-width: 1100px) {
  .premium-promos--carousel > .premium-promo { flex-basis: calc((100% - 12px) / 2) !important; width: calc((100% - 12px) / 2) !important; }
}
@media (max-width: 700px) {
  .premium-book-card__body { height: 48px !important; min-height: 48px !important; padding: 7px 4px 8px !important; }
  .premium-book-card__title { font-size: 12px !important; }
  .premium-fandoms__grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 16px 12px !important; }
  .premium-promos--carousel { gap: 10px !important; padding-inline: 2px !important; }
  .premium-promos--carousel > .premium-promo { flex-basis: 88% !important; width: 88% !important; min-width: 88% !important; height: 200px !important; min-height: 200px !important; }
  .premium-promos--carousel > .premium-promo .premium-promo__body { min-height: 200px !important; }
  .premium-promos__arrow { display: none !important; }
}

/* RANOTEKA_BOOK_RAIL_INFINITY_FINAL_V1 */
.premium-book-grid.ranoteka-book-rail-infinite-final {
  scroll-snap-type: none !important;
  scroll-behavior: auto !important;
  overscroll-behavior-x: contain !important;
  touch-action: pan-x pan-y !important;
}
.premium-book-grid.ranoteka-book-rail-infinite-final > .premium-book-card {
  scroll-snap-align: none !important;
}
.premium-book-grid.ranoteka-book-rail-infinite-final.is-dragging,
.premium-book-grid.ranoteka-book-rail-infinite-final.ranoteka-dragging-final {
  cursor: grabbing !important;
  user-select: none !important;
}
/* RANOTEKA_BOOK_RAIL_INFINITY_FINAL_V1_END */

/* RANOTEKA_CARD_LAYOUT_FINAL_V2: reserve stable rows so long titles never
   collide with ratings or the reader/chapter footer. */
.premium-book-card {
  height: 342px !important;
  display: flex !important;
  flex-direction: column !important;
}
.premium-book-card__cover {
  flex: 0 0 205px !important;
  height: 205px !important;
  min-height: 205px !important;
  aspect-ratio: auto !important;
}
.premium-book-card__body {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  display: grid !important;
  grid-template-rows: 54px 40px minmax(0, 1fr) !important;
  gap: 0 !important;
  padding: 10px 11px 8px !important;
  overflow: hidden !important;
}
.premium-book-card__title {
  display: -webkit-box !important;
  height: 54px !important;
  min-height: 54px !important;
  max-height: 54px !important;
  overflow: hidden !important;
  -webkit-box-orient: vertical !important;
  -webkit-line-clamp: 3 !important;
  overflow-wrap: anywhere !important;
  font-size: 14px !important;
  line-height: 1.28 !important;
}
.premium-book-card__ratings {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  align-items: start !important;
  gap: 6px !important;
  height: 40px !important;
  min-height: 40px !important;
  margin: 0 !important;
  padding: 5px 0 0 !important;
  overflow: hidden !important;
}
.premium-book-card__ratings span {
  min-width: 0 !important;
  display: grid !important;
  align-content: start !important;
  gap: 2px !important;
  overflow: hidden !important;
}
.premium-book-card__ratings b,
.premium-book-card__ratings small {
  display: block !important;
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}
.premium-book-card__ratings b { font-size: 11px !important; line-height: 1.15 !important; }
.premium-book-card__ratings small { font-size: 9px !important; line-height: 1.1 !important; }
.premium-book-card__footer {
  align-self: end !important;
  width: 100% !important;
  min-height: 14px !important;
  margin: 0 !important;
  overflow: hidden !important;
  font-size: 9px !important;
  line-height: 1.15 !important;
}
.premium-book-card__footer span {
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

/* Keep the primary hero actions visually above the lower frame edge. */
.premium-hero__content {
  padding-top: 30px !important;
  padding-bottom: 52px !important;
}
.premium-hero__actions { transform: translateY(-4px); }

@media (max-width: 700px) {
  .premium-book-card {
    height: 310px !important;
  }
  .premium-book-card__cover {
    flex-basis: 171px !important;
    height: 171px !important;
    min-height: 171px !important;
  }
  .premium-book-card__body {
    grid-template-rows: 46px 36px minmax(0, 1fr) !important;
    padding: 8px 8px 7px !important;
  }
  .premium-book-card__title {
    height: 46px !important;
    min-height: 46px !important;
    max-height: 46px !important;
    font-size: 12px !important;
    line-height: 1.28 !important;
  }
  .premium-book-card__ratings {
    height: 36px !important;
    min-height: 36px !important;
    gap: 4px !important;
    padding-top: 3px !important;
  }
  .premium-book-card__ratings b { font-size: 10px !important; }
  .premium-book-card__ratings small { font-size: 8px !important; }
  .premium-book-card__footer { font-size: 8px !important; }
  .premium-hero__content { padding-bottom: 42px !important; }
}

/* RANOTEKA_RAIL_INTERACTION_FINAL: the viewport owns horizontal scrolling. */
.premium-section,
.premium-book-strip { overflow: visible !important; }
.premium-book-grid,
.premium-book-grid.ranoteka-book-rail-static-v12 {
  overflow-x: auto !important;
  overflow-y: hidden !important;
  touch-action: pan-x !important;
  cursor: grab !important;
  overscroll-behavior-inline: contain !important;
  -webkit-overflow-scrolling: touch !important;
}
.premium-book-grid.is-dragging { cursor: grabbing !important; scroll-behavior: auto !important; }
.premium-book-grid > .premium-book-card { flex: 0 0 154px !important; width: 154px !important; min-width: 154px !important; }
@media (max-width: 700px) {
  .premium-book-grid > .premium-book-card { flex-basis: 128px !important; width: 128px !important; min-width: 128px !important; }
}

/* Fandom landing pages and the canonical book-card surface. */
.premium-book-card__cover-title { display: none !important; }
.premium-book-card__ratings { min-height: 30px; }
.premium-book-card__ratings span { min-width: 0; }
.premium-book-card__ratings b { white-space: nowrap; }
.book-card { display: flex; flex-direction: column; height: 100%; }
.book-card__main { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }
.book-card__body { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }
.book-card__ratings { display: flex; gap: 14px; min-height: 34px; margin: 2px 0 10px; align-items: start; }
.book-card__ratings span { display: grid; gap: 2px; min-width: 0; }
.book-card__ratings b { color: #f8c849; font-size: 12px; line-height: 1.1; white-space: nowrap; }
.book-card__ratings span:nth-child(2) b { color: #cba5ff; }
.book-card__ratings small { color: var(--muted); font-size: 10px; }
.book-card__body > .badges { margin-top: auto; }
.fandom-page { display: grid; gap: 24px; }
.fandom-hero {
  position: relative;
  min-height: 260px;
  display: flex;
  align-items: end;
  overflow: hidden;
  border: 1px solid rgba(178,120,255,.35);
  border-radius: 18px;
  background: #0c1020 var(--fandom-cover) center / cover no-repeat;
  box-shadow: 0 18px 50px rgba(0,0,0,.28);
}
.fandom-hero__shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(8,9,20,.96) 0%, rgba(8,9,20,.78) 45%, rgba(8,9,20,.2) 100%), linear-gradient(0deg, rgba(8,9,20,.9), transparent 60%); }
.fandom-hero__content { position: relative; z-index: 1; max-width: 620px; padding: 34px; }
.fandom-hero__content h1 { margin: 6px 0 8px; font-size: clamp(30px, 5vw, 54px); line-height: 1.02; }
.fandom-hero__content p { margin: 0 0 18px; }
.fandom-page__head { margin: 0; }
.fandom-page__books { margin: 0; }
.fandom-hero__description { max-width: 600px; margin: 22px 0 22px; }
.fandom-hero__description i { display: block; width: 46px; height: 3px; margin-bottom: 14px; border-radius: 99px; background: #b86cff; box-shadow: 0 0 14px rgba(184,108,255,.8); }
.fandom-hero__description p { margin: 0; color: rgba(235,238,255,.84); font-size: 16px; line-height: 1.55; white-space: pre-line; }
.fandom-hero { background-size: contain; background-position: right center; background-color: #0c1020; }
.fandom-hero__shade { z-index: 0; background: linear-gradient(90deg, rgba(8,9,20,.98) 0%, rgba(8,9,20,.84) 40%, rgba(8,9,20,.12) 78%, rgba(8,9,20,.02) 100%), linear-gradient(0deg, rgba(8,9,20,.82), transparent 58%); }
.fandom-hero__content { z-index: 1; }
@media (max-width: 560px) {
  .fandom-hero { min-height: 220px; }
  .fandom-hero__content { padding: 22px; }
  .fandom-hero__content h1 { font-size: 30px; }
  .fandom-hero__description { margin: 16px 0 18px; }
  .fandom-hero__description p { font-size: 14px; line-height: 1.45; }
}
@media (prefers-reduced-motion: reduce) {
  .novi-character, .novi-character__spark { animation: none !important; }
}


/* ─────────────────────────────────────────────────────────────
   Ranoteka v0.9 — real image guide instead of CSS-drawn mascot
   The image is a local public-domain asset, not AI-generated.
   ───────────────────────────────────────────────────────────── */
.novi-guide__visual {
  position: relative;
  isolation: isolate;
  overflow: visible;
}
.novi-guide__glow {
  position: absolute;
  z-index: 0;
  width: 78%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(172,89,255,.34), rgba(82,42,174,.16) 43%, transparent 72%);
  filter: blur(14px);
  animation: ranikoGlow 3.8s ease-in-out infinite;
}
.novi-guide__girl {
  position: relative;
  z-index: 1;
  width: min(100%, 320px);
  max-height: 390px;
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(0 24px 30px rgba(0,0,0,.44)) drop-shadow(0 0 24px rgba(127,64,239,.2));
  animation: ranikoFloat 3.6s ease-in-out infinite;
  transform-origin: 50% 100%;
}
.novi-guide__visual--compact .novi-guide__girl {
  width: 152px;
  max-height: 190px;
  object-position: center bottom;
}
.novi-guide--guest .novi-guide__visual { min-height: 182px; }
.novi-guide--guest .novi-guide__girl { margin-right: -10px; }
.novi-guide--register .novi-guide__visual { min-height: 330px; align-items: end; }
.novi-guide--register .novi-guide__girl { width: 330px; max-height: 355px; }
.novi-guide--register::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 55%, rgba(8,11,24,.55));
}
.novi-guide--register > * { position: relative; z-index: 1; }
@keyframes ranikoFloat { 0%,100% { transform: translateY(0) rotate(-.4deg); } 50% { transform: translateY(-8px) rotate(.5deg); } }
@keyframes ranikoGlow { 0%,100% { opacity:.7; transform:scale(.94); } 50% { opacity:1; transform:scale(1.04); } }
@media (max-width:820px) {
  .novi-guide--register .novi-guide__girl { width: 175px; max-height: 190px; }
  .novi-guide--register .novi-guide__visual { min-height: 190px; }
}
@media (max-width:560px) {
  .novi-guide--guest .novi-guide__girl { width: 100px; max-height: 128px; }
  .novi-guide--register .novi-guide__girl { width: 118px; max-height: 142px; }
  .novi-guide--register .novi-guide__visual { min-height: 145px; }
}
@media (prefers-reduced-motion: reduce) {
  .novi-guide__girl, .novi-guide__glow { animation:none !important; }
}


/* ─────────────────────────────────────────────────────────────
   Ranoteka v0.9.1 — animated Raniko, no new image generation
   The existing local public-domain PNG is reused. Motion, direction
   and emoji trail are implemented only with CSS/HTML.
   ───────────────────────────────────────────────────────────── */
.novi-guide__visual {
  --raniko-flip: -1;
  --raniko-accent: #c98cff;
  contain: layout paint;
}
.novi-guide__girl {
  transform: scaleX(var(--raniko-flip));
  animation: ranikoAlive 3.15s cubic-bezier(.45,.05,.2,1) infinite;
  will-change: transform, filter;
}
.novi-guide:hover .novi-guide__girl,
.novi-guide:focus-within .novi-guide__girl {
  animation-duration: 2.25s;
  filter: drop-shadow(0 26px 34px rgba(0,0,0,.46)) drop-shadow(0 0 31px rgba(159,84,255,.35));
}
.novi-guide__emotes {
  position: absolute;
  z-index: 3;
  left: 48%;
  top: 37%;
  width: 52%;
  height: 36%;
  pointer-events: none;
  overflow: visible;
  font-family: "Segoe UI Emoji", "Apple Color Emoji", sans-serif;
}
.novi-guide__emote {
  position: absolute;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  opacity: 0;
  color: #f4dcff;
  font-style: normal;
  font-size: 20px;
  line-height: 1;
  filter: drop-shadow(0 0 8px rgba(187,105,255,.9));
  animation: ranikoEmojiTrail 3.3s ease-in-out infinite;
  will-change: transform, opacity;
}
.novi-guide__emote--spark { left: 0%; top: 42%; animation-delay: 0s; font-size: 19px; }
.novi-guide__emote--heart { left: 18%; top: 18%; animation-delay: .42s; font-size: 17px; }
.novi-guide__emote--book  { left: 36%; top: 46%; animation-delay: .83s; font-size: 18px; }
.novi-guide__emote--shine { left: 57%; top: 12%; animation-delay: 1.25s; font-size: 19px; }
.novi-guide__emote--arrow { left: 72%; top: 48%; animation-delay: 1.66s; font-size: 24px; color: #e4b7ff; }
.novi-guide__bubble {
  transition: border-color .25s ease, box-shadow .25s ease, transform .25s ease;
}
.novi-guide:hover .novi-guide__bubble,
.novi-guide:focus-within .novi-guide__bubble {
  border-color: rgba(177,103,255,.62);
  box-shadow: 0 18px 50px rgba(0,0,0,.34), 0 0 28px rgba(122,49,238,.13);
}
.novi-guide__button {
  position: relative;
  overflow: hidden;
  animation: ranikoActionPulse 3.25s ease-in-out infinite;
}
.novi-guide__button::after {
  content: "";
  position: absolute;
  inset: -35% auto -35% -35%;
  width: 24%;
  transform: skewX(-20deg);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.42), transparent);
  animation: ranikoButtonShine 3.25s ease-in-out infinite;
  pointer-events: none;
}
.novi-guide--register .novi-guide__emotes {
  left: 52%;
  top: 32%;
  width: 50%;
  height: 34%;
}
.novi-guide--guest .novi-guide__emotes {
  left: 47%;
  top: 30%;
  width: 65%;
  height: 44%;
}
.novi-guide--register .novi-guide__girl,
.novi-guide--guest .novi-guide__girl {
  object-position: center bottom;
}
@keyframes ranikoAlive {
  0%,100% { transform: translate3d(0,0,0) rotate(.45deg) scaleX(var(--raniko-flip)) scaleY(1); }
  28% { transform: translate3d(0,-7px,0) rotate(-.7deg) scaleX(var(--raniko-flip)) scaleY(1.012); }
  52% { transform: translate3d(1px,-10px,0) rotate(.7deg) scaleX(var(--raniko-flip)) scaleY(.995); }
  76% { transform: translate3d(-1px,-4px,0) rotate(-.15deg) scaleX(var(--raniko-flip)) scaleY(1.006); }
}
@keyframes ranikoEmojiTrail {
  0%,12% { opacity: 0; transform: translate3d(-8px,10px,0) scale(.55) rotate(-8deg); }
  28% { opacity: .95; }
  58% { opacity: .9; transform: translate3d(16px,-6px,0) scale(1.03) rotate(5deg); }
  82%,100% { opacity: 0; transform: translate3d(38px,-13px,0) scale(.72) rotate(11deg); }
}
@keyframes ranikoActionPulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(150,69,255,0); }
  48% { box-shadow: 0 0 0 7px rgba(150,69,255,.09), 0 10px 28px rgba(91,35,184,.27); }
}
@keyframes ranikoButtonShine {
  0%,42% { left: -35%; opacity: 0; }
  52% { opacity: .8; }
  72%,100% { left: 125%; opacity: 0; }
}
@media (max-width: 820px) {
  .novi-guide__emotes { transform: scale(.82); transform-origin: left center; }
  .novi-guide--register .novi-guide__emotes { left: 45%; top: 28%; width: 62%; }
}
@media (max-width: 560px) {
  .novi-guide--guest .novi-guide__emotes { left: 39%; top: 25%; width: 77%; transform: scale(.68); }
  .novi-guide--register .novi-guide__emotes { left: 40%; top: 23%; width: 75%; transform: scale(.7); }
  .novi-guide__emote--book { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .novi-guide__girl,
  .novi-guide__glow,
  .novi-guide__emote,
  .novi-guide__button,
  .novi-guide__button::after { animation: none !important; }
  .novi-guide__girl { transform: scaleX(var(--raniko-flip)); }
  .novi-guide__emote { opacity: .72; }
  .novi-guide__emote--arrow { opacity: 1; }
}

/* Ranoteka v0.10 — Admin Studio */
.badge--sale { color:#fff0f6; background:linear-gradient(135deg,#ff3f85,#b41d5d); border-color:rgba(255,99,153,.55); box-shadow:0 6px 18px rgba(255,47,122,.18); }
.sale-banner { display:flex; justify-content:space-between; gap:16px; align-items:center; padding:14px 18px; border:1px solid rgba(255,79,145,.45); border-radius:16px; background:linear-gradient(110deg,rgba(122,19,73,.62),rgba(64,24,109,.58)); box-shadow:0 14px 35px rgba(21,5,36,.28); }
.sale-banner strong { color:#fff; font-size:18px; }
.sale-banner span { color:#ffd9e8; }
.admin-publish-grid { display:grid; grid-template-columns:minmax(0,1.5fr) minmax(280px,.7fr); gap:16px; }
.admin-publication-card { border-color:rgba(138,77,255,.55); background:linear-gradient(155deg,rgba(18,20,38,.98),rgba(29,17,53,.96)); }
.admin-publication-summary { align-self:stretch; background:linear-gradient(155deg,rgba(14,17,30,.98),rgba(19,25,45,.96)); }
.admin-summary-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin:18px 0; }
.admin-summary-grid > div { padding:12px; border:1px solid var(--line); border-radius:12px; background:rgba(255,255,255,.025); }
.admin-summary-grid span { display:block; margin-bottom:5px; color:var(--muted); font-size:12px; }
.admin-summary-grid strong { font-size:17px; }
.admin-checks { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; margin:4px 0 16px; }
.admin-checks .check-row { min-height:52px; padding:10px 12px; border:1px solid var(--line); border-radius:12px; background:rgba(255,255,255,.025); }
.admin-chapter-row { grid-template-columns:minmax(0,1fr) auto auto auto; }
.admin-chapter-row form { margin:0; }
.admin-create { position:relative; }
.admin-create::before { content:"ADMIN STUDIO"; position:absolute; right:22px; top:16px; z-index:2; color:rgba(181,145,255,.2); font-size:24px; font-weight:1000; letter-spacing:.08em; pointer-events:none; }
@media (max-width:900px) {
  .admin-publish-grid { grid-template-columns:1fr; }
  .admin-checks { grid-template-columns:1fr; }
  .admin-chapter-row { grid-template-columns:minmax(0,1fr) auto; }
  .admin-chapter-row .chapter__price { grid-column:1; }
  .admin-chapter-row form { grid-column:2; }
  .sale-banner { align-items:flex-start; flex-direction:column; }
}

/* v0.10.1 login fix */
[hidden], .bot-passive { display: none !important; }

/* Ranoteka v0.10.2 — simplified book administration */
.admin-book-simple { max-width: 1500px; }
.admin-book-heading { margin-bottom: 18px; }
.admin-simple-progress { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; margin:18px 0 20px; }
.admin-progress-card { display:flex; align-items:center; gap:12px; min-height:70px; padding:14px 16px; border:1px solid var(--line); border-radius:15px; background:rgba(255,255,255,.025); }
.admin-progress-card > span { display:grid; place-items:center; width:34px; height:34px; flex:0 0 34px; border-radius:50%; border:1px solid rgba(166,104,255,.45); color:#d9baff; font-weight:900; }
.admin-progress-card strong,.admin-progress-card small { display:block; }
.admin-progress-card small { margin-top:3px; color:var(--muted); }
.admin-progress-card.is-current { border-color:rgba(135,74,255,.75); background:linear-gradient(135deg,rgba(87,36,170,.24),rgba(255,255,255,.025)); box-shadow:0 0 0 3px rgba(122,60,235,.08); }
.admin-progress-card.is-done > span { background:linear-gradient(135deg,#6c31e8,#a845ff); color:white; }
.admin-step { margin:14px 0; border:1px solid var(--line); border-radius:18px; background:rgba(11,15,29,.92); overflow:hidden; }
.admin-step > summary { list-style:none; display:flex; align-items:center; gap:14px; min-height:86px; padding:18px 22px; cursor:pointer; user-select:none; }
.admin-step > summary::-webkit-details-marker { display:none; }
.admin-step > summary:hover { background:rgba(255,255,255,.025); }
.admin-step[open] > summary { border-bottom:1px solid var(--line); background:linear-gradient(100deg,rgba(73,31,139,.2),transparent); }
.admin-step-number { display:grid; place-items:center; width:38px; height:38px; flex:0 0 38px; border-radius:12px; background:linear-gradient(135deg,#6c31e8,#a845ff); color:white; font-size:18px; font-weight:1000; }
.admin-step summary strong { display:block; font-size:20px; }
.admin-step summary small { display:block; margin-top:5px; color:var(--muted); font-size:14px; }
.admin-step-chevron { margin-left:auto; font-size:26px; color:#b891ff; transition:transform .2s ease; }
.admin-step[open] .admin-step-chevron { transform:rotate(180deg); }
.admin-step-body { padding:18px; }
.admin-upload-primary { max-width:980px; margin:0 auto; border-color:rgba(132,73,255,.7); background:linear-gradient(145deg,rgba(31,20,56,.98),rgba(15,19,34,.98)); }
.admin-recommended span { display:inline-flex; padding:5px 9px; border-radius:999px; background:#7433ef; color:white; font-size:11px; font-weight:1000; letter-spacing:.06em; }
.admin-recommended h2 { margin:10px 0 6px; font-size:26px; }
.admin-recommended p { margin:0 0 18px; color:var(--muted); font-size:15px; line-height:1.55; }
.admin-optional,.admin-extra-methods { margin:14px 0; border:1px solid var(--line); border-radius:13px; background:rgba(255,255,255,.018); }
.admin-optional > summary,.admin-extra-methods > summary { padding:13px 15px; cursor:pointer; color:#cfb3ff; font-weight:800; }
.admin-optional[open] > summary,.admin-extra-methods[open] > summary { border-bottom:1px solid var(--line); }
.admin-optional > div,.admin-extra-methods > div { padding:14px; }
.admin-extra-methods { margin-top:18px; }
.admin-extra-grid { padding:16px !important; }
.admin-chapters-simple { margin-top:18px; }
.admin-empty-state { display:flex; flex-direction:column; align-items:center; justify-content:center; min-height:130px; gap:6px; border:1px dashed rgba(160,110,255,.35); border-radius:14px; color:var(--muted); }
.admin-empty-state strong { color:#fff; font-size:18px; }
.admin-main-settings { align-items:start; }
.admin-cover-card { position:sticky; top:90px; }
@media (max-width:900px) {
  .admin-simple-progress { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .admin-cover-card { position:static; }
}
@media (max-width:560px) {
  .admin-simple-progress { grid-template-columns:1fr; }
  .admin-step > summary { padding:15px; min-height:76px; }
  .admin-step summary strong { font-size:17px; }
  .admin-step summary small { font-size:12px; }
  .admin-step-body { padding:12px; }
}

/* Ranoteka v0.10.3 — import of finished translation ZIP archives */
.admin-zip-import .panel { border-color:rgba(71,205,255,.42); background:linear-gradient(145deg,rgba(12,31,48,.98),rgba(24,18,48,.98)); box-shadow:0 18px 55px rgba(0,0,0,.22); }
.admin-zip-import .section__head { align-items:flex-start; }
.admin-import-summary { display:flex; align-items:center; justify-content:space-between; gap:18px; margin:14px 0 18px; border-color:rgba(71,205,255,.3); background:linear-gradient(120deg,rgba(24,45,64,.72),rgba(43,25,70,.72)); }
.admin-import-summary p { margin:6px 0 0; }
.admin-import-summary .notice { margin:0; max-width:560px; }
@media (max-width:760px) {
  .admin-import-summary { align-items:flex-start; flex-direction:column; }
}

/* Ranoteka v0.10.4 — automatic import from Desktop/КНИГИ/ПЕРЕВЕДЕННЫЕ */
.admin-folder-import .panel { border-color:rgba(110,77,255,.55); background:linear-gradient(145deg,rgba(22,18,52,.98),rgba(10,24,44,.98)); box-shadow:0 18px 55px rgba(0,0,0,.24); }
.admin-folder-import .section__head { align-items:flex-start; }
.local-import-paths { display:grid; grid-template-columns:1fr 1fr; gap:12px; margin:14px 0; }
.local-import-paths > div { display:flex; flex-direction:column; gap:6px; padding:13px 15px; border:1px solid var(--border); border-radius:14px; background:rgba(5,9,22,.45); min-width:0; }
.local-import-paths span { color:var(--muted); font-size:12px; }
.local-import-paths code { color:#fff; white-space:normal; overflow-wrap:anywhere; }
.local-import-found { margin:12px 0; padding:14px 16px; border:1px solid rgba(116,74,255,.3); border-radius:14px; background:rgba(85,43,170,.12); }
.local-import-found ul { margin:9px 0 0; padding-left:20px; columns:2; column-gap:30px; }
.local-import-found li { margin:4px 0; break-inside:avoid; }
.local-import-result { display:flex; flex-direction:column; gap:5px; margin-top:14px; padding:13px 15px; border-radius:14px; background:rgba(0,0,0,.2); border:1px solid var(--border); }
.local-import-result span,.local-import-result small { color:var(--muted); }
.local-import-panel button[disabled] { opacity:.55; cursor:not-allowed; filter:saturate(.55); }
@media (max-width:760px) {
  .local-import-paths { grid-template-columns:1fr; }
  .local-import-found ul { columns:1; }
}

/* v0.10.5: ясные жанры/теги/фэндом и проверка глав администратором */
.book-taxonomy {
  display: grid;
  gap: 10px;
  margin: 16px 0 18px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(12, 17, 31, .5);
}
.book-taxonomy__row {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
}
.book-taxonomy__label {
  padding-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .045em;
}
.book-taxonomy__row .badges { margin: 0; }
.badge--fandom {
  border-color: rgba(169, 107, 255, .55);
  background: rgba(119, 57, 205, .18);
  color: #eadcff;
}
.chapter > .btn { flex: 0 0 auto; }
@media (max-width: 620px) {
  .book-taxonomy__row { grid-template-columns: 1fr; gap: 6px; }
  .book-taxonomy__label { padding-top: 0; }
  .chapter > .btn { width: 100%; }
}


/* Ranoteka v0.10.7 — подтверждение перед списанием Искр */
.confirm-modal[hidden] { display:none !important; }
.confirm-modal { position:fixed; inset:0; z-index:5000; display:grid; place-items:center; padding:20px; }
.confirm-modal__backdrop { position:absolute; inset:0; background:rgba(2,4,12,.76); backdrop-filter:blur(7px); }
.confirm-modal__dialog { position:relative; width:min(460px,100%); padding:28px; border:1px solid rgba(145,87,255,.65); border-radius:22px; background:linear-gradient(145deg,#171d32,#201735); color:#f4f6ff; box-shadow:0 28px 90px rgba(0,0,0,.58); text-align:center; }
.confirm-modal__icon { display:grid; place-items:center; width:50px; height:50px; margin:0 auto 14px; border-radius:16px; background:linear-gradient(135deg,#6f35eb,#ad49ff); color:white; font-size:24px; box-shadow:0 12px 28px rgba(118,54,235,.32); }
.confirm-modal__dialog h2 { margin:0 0 10px; color:#f4f6ff; font-size:25px; }
.confirm-modal__dialog p { margin:0; color:#c6cde0; font-size:15px; line-height:1.6; white-space:pre-line; }
.confirm-modal__actions { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-top:22px; }
.confirm-modal__actions .btn { width:100%; }
.confirm-modal-open { overflow:hidden; }
@media (max-width:520px) {
  .confirm-modal { padding:12px; align-items:end; }
  .confirm-modal__dialog { padding:22px 18px 18px; border-radius:20px 20px 14px 14px; }
  .confirm-modal__actions { grid-template-columns:1fr; }
}

/* RANOTEKA_TOPUP_CTA */
.topup-cta {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  padding: 0 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 215, 120, .72);
  border-radius: 12px;
  background: linear-gradient(135deg, #6534e9, #922ee9 56%, #e7853f);
  box-shadow: 0 8px 24px rgba(116, 52, 235, .30);
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: .02em;
  text-decoration: none;
  white-space: nowrap;
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}

.topup-cta::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: -70%;
  bottom: -70%;
  left: -45%;
  width: 32%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255,255,255,.46),
    transparent
  );
  transform: rotate(18deg);
  transition: left .45s ease;
}

.topup-cta:hover {
  transform: translateY(-2px);
  filter: saturate(1.12);
  box-shadow:
    0 12px 30px rgba(116, 52, 235, .44),
    0 0 18px rgba(255, 181, 70, .20);
}

.topup-cta:hover::before {
  left: 118%;
}

.topup-cta:active {
  transform: translateY(0) scale(.95);
}

.topup-cta:focus-visible {
  outline: 3px solid rgba(255, 215, 120, .42);
  outline-offset: 3px;
}

.topup-cta__spark {
  color: #ffe29a;
  font-size: 16px;
  text-shadow: 0 0 10px rgba(255, 218, 120, .85);
  transition: transform .25s ease;
}

.topup-cta:hover .topup-cta__spark {
  transform: rotate(20deg) scale(1.15);
}

.topup-cta__letters {
  display: inline-flex;
}

.topup-cta__letters > span {
  display: inline-block;
  transform-origin: center bottom;
}

.topup-cta:hover .topup-cta__letters > span {
  animation: topup-letter-hop .48s ease both;
  animation-delay: calc(var(--i) * 35ms);
}

/* The proposal link shares the letter animation but remains a normal link. */
.proposal-cta:hover .topup-cta__spark {
  transform: rotate(20deg) scale(1.15);
}
.proposal-cta:hover .topup-cta__letters > span {
  animation: topup-letter-hop .48s ease both;
  animation-delay: calc(var(--i) * 35ms);
}
.header-propose.topup-cta > .topup-cta__spark {
  color: #ffe29a;
  font-size: 16px;
}

@keyframes topup-letter-hop {
  0%, 100% { transform: translateY(0) scale(1); }
  45% { transform: translateY(-5px) scale(1.06); }
  70% { transform: translateY(1px) scale(.98); }
}

@media (max-width: 570px) {
  .topup-cta {
    width: 40px;
    min-width: 40px;
    height: 40px;
    min-height: 40px;
    padding: 0;
  }

  .topup-cta__letters {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .topup-cta,
  .topup-cta::before,
  .topup-cta__spark,
  .topup-cta__letters > span {
    animation: none !important;
    transition-duration: .01ms !important;
  }
}

/* RANOTEKA_TOPUP_DISCLOSURE */
.topup-disclosure {
  width: 100%;
  scroll-margin-top: 94px;
}

.topup-disclosure__summary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  min-height: 52px;
  padding: 12px 18px;
  cursor: pointer;
  list-style: none;
  border: 1px solid rgba(151, 83, 255, .68);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(93, 43, 220, .96), rgba(136, 39, 241, .96));
  box-shadow:
    0 10px 26px rgba(116, 52, 235, .25),
    inset 0 1px 0 rgba(255, 255, 255, .16);
  color: #fff;
  font-weight: 900;
  text-align: center;
  user-select: none;
  transition:
    transform .18s ease,
    box-shadow .18s ease,
    border-color .18s ease,
    filter .18s ease;
}

.topup-disclosure__summary::-webkit-details-marker {
  display: none;
}

.topup-disclosure__summary:hover {
  transform: translateY(-2px);
  filter: saturate(1.08);
  border-color: rgba(255, 207, 111, .82);
  box-shadow:
    0 14px 32px rgba(116, 52, 235, .38),
    0 0 18px rgba(255, 181, 70, .14);
}

.topup-disclosure__summary:active {
  transform: translateY(0) scale(.98);
}

.topup-disclosure__summary:focus-visible {
  outline: 3px solid rgba(255, 211, 113, .38);
  outline-offset: 3px;
}

.topup-disclosure__icon {
  color: #ffe092;
  font-size: 18px;
  text-shadow: 0 0 12px rgba(255, 218, 120, .85);
}

.topup-disclosure__label {
  font-size: 15px;
}

.topup-disclosure__chevron {
  margin-left: 2px;
  font-size: 18px;
  transition: transform .22s ease;
}

.topup-disclosure[open] .topup-disclosure__chevron {
  transform: rotate(180deg);
}

.topup-disclosure__body {
  margin-top: 12px;
  animation: topup-disclosure-open .22s ease both;
}

.topup-disclosure__body h2 {
  margin-top: 0;
}

@keyframes topup-disclosure-open {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .topup-disclosure__summary,
  .topup-disclosure__chevron,
  .topup-disclosure__body {
    animation: none !important;
    transition-duration: .01ms !important;
  }
}

/* RANOTEKA_SPARKS_CAROUSEL */
.sparks-topup-head {
  margin-bottom: 18px;
}

.sparks-topup-head__eyebrow,
.sparks-custom-amount__eyebrow {
  display: block;
  margin-bottom: 6px;
  color: #c99cff;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .12em;
}

.sparks-topup-head h2 {
  margin: 0 0 7px;
  font-size: clamp(22px, 3vw, 31px);
}

.sparks-topup-head p {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.sparks-carousel {
  position: relative;
}

.sparks-carousel__controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: 10px;
}

.sparks-carousel__arrow {
  display: grid;
  place-items: center;
  width: 42px;
  height: 38px;
  padding: 0;
  cursor: pointer;
  border: 1px solid rgba(150, 91, 255, .48);
  border-radius: 11px;
  background: rgba(113, 55, 235, .12);
  color: #f3eaff;
  font-size: 18px;
  transition:
    transform .16s ease,
    border-color .16s ease,
    background .16s ease,
    opacity .16s ease;
}

.sparks-carousel__arrow:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: rgba(255, 211, 118, .76);
  background: rgba(125, 57, 255, .25);
}

.sparks-carousel__arrow:active:not(:disabled) {
  transform: scale(.94);
}

.sparks-carousel__arrow:disabled {
  cursor: default;
  opacity: .32;
}

.sparks-carousel__position {
  display: flex;
  align-items: baseline;
  justify-content: center;
  min-width: 54px;
  color: var(--muted);
  font-size: 12px;
}

.sparks-carousel__position strong {
  color: #fff;
  font-size: 17px;
}

.sparks-carousel__viewport {
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: none;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  touch-action: pan-x;
  cursor: grab;
}

.sparks-carousel__viewport:active { cursor: grabbing; }

.sparks-carousel__viewport::-webkit-scrollbar {
  display: none;
}

.sparks-carousel__track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 100%;
}

.spark-package-card {
  min-width: 0;
  margin: 0;
  scroll-snap-align: start;
}

.spark-package-card__button {
  position: relative;
  isolation: isolate;
  display: grid;
  width: 100%;
  min-height: 300px;
  padding: 22px;
  overflow: hidden;
  cursor: pointer;
  border: 1px solid rgba(166, 111, 255, .48);
  border-radius: 20px;
  color: #fff;
  text-align: left;
  background:
    radial-gradient(circle at 78% 10%, rgba(176, 125, 255, .25), transparent 34%),
    linear-gradient(145deg, #171027, #0d1322 70%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .08),
    0 18px 42px rgba(0, 0, 0, .22);
  transition:
    transform .2s ease,
    border-color .2s ease,
    box-shadow .2s ease;
}

.spark-package-card__button::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background-image: linear-gradient(135deg, rgba(8, 10, 24, .18), rgba(8, 10, 24, .86)), var(--spark-package-image, none);
  background-size: cover;
  background-position: center;
  opacity: .72;
}

.spark-package-card__button:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 211, 117, .74);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .12),
    0 22px 50px rgba(0, 0, 0, .30),
    0 0 25px rgba(126, 62, 255, .15);
}

.spark-package-card__button:active {
  transform: translateY(0) scale(.99);
}

.spark-package-card__button:focus-visible {
  outline: 3px solid rgba(255, 211, 117, .36);
  outline-offset: 3px;
}

.spark-package-card__glow {
  position: absolute;
  z-index: -1;
  width: 300px;
  height: 300px;
  right: -120px;
  bottom: -170px;
  border-radius: 50%;
  background: rgba(130, 61, 255, .28);
  filter: blur(12px);
}

.spark-package-card--impulse .spark-package-card__button {
  background:
    radial-gradient(circle at 77% 13%, rgba(87, 189, 255, .28), transparent 35%),
    linear-gradient(145deg, #111d38, #0d1322 72%);
}

.spark-package-card--flame .spark-package-card__button {
  background:
    radial-gradient(circle at 77% 13%, rgba(255, 126, 58, .30), transparent 36%),
    linear-gradient(145deg, #32151d, #0d1322 72%);
}

.spark-package-card--supernova .spark-package-card__button {
  background:
    radial-gradient(circle at 77% 13%, rgba(255, 76, 188, .27), transparent 36%),
    linear-gradient(145deg, #2b1238, #0d1322 72%);
}

.spark-package-card--infinity .spark-package-card__button {
  background:
    radial-gradient(circle at 77% 13%, rgba(255, 213, 100, .26), transparent 37%),
    linear-gradient(145deg, #2b2411, #11101d 72%);
}

.spark-package-card__top,
.spark-package-card__bottom,
.spark-package-card__content {
  position: relative;
  z-index: 1;
}

.spark-package-card__top,
.spark-package-card__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.spark-package-card__number {
  color: rgba(255, 255, 255, .58);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.spark-package-card__bonus-percent {
  padding: 6px 9px;
  border: 1px solid rgba(255, 219, 132, .38);
  border-radius: 999px;
  color: #ffe29a;
  background: rgba(255, 201, 91, .09);
  font-size: 12px;
  font-weight: 900;
}

.spark-package-card__content {
  display: grid;
  grid-template-columns: minmax(105px, 30%) 1fr;
  align-items: center;
  gap: 24px;
  margin: 20px 0;
}

.spark-package-card__figure {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(151, 85, 255, .34), rgba(151, 85, 255, .04) 66%);
  box-shadow:
    inset 0 0 32px rgba(255, 255, 255, .05),
    0 0 32px rgba(126, 63, 255, .18);
}

.spark-package-card__figure > span {
  font-size: clamp(46px, 8vw, 82px);
  line-height: 1;
  filter: drop-shadow(0 0 16px rgba(190, 135, 255, .42));
}

.spark-package-card__details {
  display: grid;
  gap: 7px;
}

.spark-package-card__name {
  color: #d9bbff;
  font-size: clamp(18px, 2.5vw, 25px);
  font-weight: 900;
}

.spark-package-card__sparks {
  color: #fff;
  font-size: clamp(36px, 6vw, 64px);
  font-weight: 950;
  line-height: .95;
  letter-spacing: -.04em;
}

.spark-package-card__sparks small {
  display: block;
  margin-top: 8px;
  color: rgba(255, 255, 255, .64);
  font-size: 14px;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.spark-package-card__bonus {
  color: #ffd982;
  font-size: 13px;
  font-weight: 800;
}

.spark-package-card__price {
  font-size: 20px;
  font-weight: 950;
}

.spark-package-card__pay {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 13px;
  border-radius: 11px;
  background: linear-gradient(135deg, #7135ed, #9b32ee);
  font-size: 12px;
  font-weight: 900;
}

.sparks-custom-amount {
  margin-top: 14px;
  padding: 16px;
  border: 1px solid rgba(140, 83, 239, .28);
  border-radius: 15px;
  background: rgba(11, 17, 31, .56);
}

.sparks-custom-amount__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.sparks-custom-amount__head h3 {
  margin: 0;
  font-size: 19px;
}

.sparks-custom-amount__hint {
  padding: 6px 10px;
  border-radius: 999px;
  color: #d9bbff;
  background: rgba(126, 61, 255, .13);
  font-size: 12px;
  font-weight: 800;
}

.sparks-custom-amount__description {
  margin: 7px 0 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.sparks-custom-amount > .form,
.sparks-custom-amount__form {
  margin-top: 0;
  gap: 10px;
}

.sparks-custom-amount__form > .btn {
  justify-self: start;
}

.sparks-payment-status {
  margin-top: 12px;
  padding: 11px 14px;
}

.sparks-payment-status p {
  margin: 3px 0 0;
  font-size: 12px;
  line-height: 1.4;
}

.payment-redirect {
  display: grid;
  min-height: 100vh;
  margin: 0;
  place-items: center;
  color: var(--text);
  background: #080d19;
  font-family: inherit;
}

.payment-redirect main {
  padding: 20px;
  color: var(--muted);
  text-align: center;
}
.payment-alt-divider { display:flex; align-items:center; gap:12px; margin:18px 0; color:var(--muted,#8c93a6); font-size:12px; text-transform:uppercase; letter-spacing:.08em; }
.payment-alt-divider::before, .payment-alt-divider::after { content:""; height:1px; flex:1; background:rgba(255,255,255,.12); }
.payment-alt-form { margin-top:0; }
.cloudpayments-widget { margin-top:16px; }
.cloudpayments-widget [data-cloudpayments-error] { margin-top:14px; }

.payment-redirect p { margin: 0; }

.sparks-selection {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 4px;
  padding: 15px 17px;
  border: 1px solid rgba(119, 220, 176, .34);
  border-radius: 14px;
  color: #e9fff5;
  background: linear-gradient(135deg, rgba(26, 91, 73, .34), rgba(20, 30, 48, .72));
}

.sparks-selection[hidden] { display: none; }
.sparks-selection > div { display: grid; gap: 4px; min-width: 0; }
.sparks-selection strong { font-size: 15px; }
.sparks-selection span { color: #b7d9ce; font-size: 12px; line-height: 1.45; }
.sparks-selection .btn { flex: none; white-space: nowrap; }

@media (max-width: 650px) {
  .spark-package-card__button {
    min-height: 360px;
    padding: 18px;
  }

  .spark-package-card__content {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .spark-package-card__figure {
    width: 112px;
  }

  .spark-package-card__bottom {
    align-items: flex-end;
  }

  .spark-package-card__pay {
    padding: 9px 10px;
  }

  .sparks-selection { align-items: stretch; flex-direction: column; }
  .sparks-selection .btn { width: 100%; }
  .sparks-custom-amount__form > .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .sparks-carousel__viewport {
    scroll-behavior: auto;
  }

  .spark-package-card__button,
  .sparks-carousel__arrow {
    transition-duration: .01ms !important;
  }
}

/* RANOTEKA_SPARKS_MODAL_STAGE */
.topup-launcher {
  width: 100%;
}

.topup-launcher__button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  min-height: 52px;
  padding: 12px 18px;
  cursor: pointer;
  border: 1px solid rgba(255, 211, 113, .72);
  border-radius: 14px;
  background: linear-gradient(135deg, #6534e9, #922ee9 56%, #e7853f);
  box-shadow:
    0 10px 27px rgba(116, 52, 235, .28),
    inset 0 1px 0 rgba(255, 255, 255, .17);
  color: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 900;
  transition:
    transform .18s ease,
    box-shadow .18s ease,
    filter .18s ease;
}

.topup-launcher__button > span:first-child {
  color: #ffe092;
  font-size: 18px;
  text-shadow: 0 0 12px rgba(255, 218, 120, .85);
}

.topup-launcher__button:hover {
  transform: translateY(-2px);
  filter: saturate(1.1);
  box-shadow:
    0 14px 34px rgba(116, 52, 235, .42),
    0 0 20px rgba(255, 181, 70, .16);
}

.topup-launcher__button:active {
  transform: translateY(0) scale(.98);
}

.sparks-modal {
  width: min(1120px, calc(100vw - 28px));
  max-width: none;
  max-height: calc(100vh - 28px);
  padding: 0;
  overflow: visible;
  border: 0;
  color: var(--text);
  background: transparent;
}

.sparks-modal::backdrop {
  background: rgba(2, 5, 15, .84);
  backdrop-filter: blur(11px);
  animation: sparks-backdrop-in .22s ease both;
}

.sparks-modal[open] {
  animation: sparks-modal-in .25s ease both;
}

.sparks-modal__shell {
  position: relative;
  max-height: calc(100vh - 28px);
  overflow-x: hidden;
  overflow-y: auto;
  border: 1px solid rgba(151, 87, 255, .50);
  border-radius: 25px;
  background:
    radial-gradient(
      circle at 50% -12%,
      rgba(123, 63, 255, .22),
      transparent 38%
    ),
    #0b101d;
  box-shadow:
    0 34px 100px rgba(0, 0, 0, .66),
    0 0 60px rgba(111, 51, 235, .18),
    inset 0 1px 0 rgba(255, 255, 255, .07);
  scrollbar-width: thin;
}

.sparks-modal__content {
  padding: 28px 30px 32px;
}

.sparks-modal__close {
  position: sticky;
  z-index: 20;
  top: 14px;
  float: right;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin: 14px 14px -56px 0;
  padding: 0;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 50%;
  background: rgba(8, 12, 24, .86);
  box-shadow: 0 8px 25px rgba(0, 0, 0, .28);
  color: #fff;
  font-size: 27px;
  line-height: 1;
  backdrop-filter: blur(8px);
  transition:
    transform .16s ease,
    border-color .16s ease,
    background .16s ease;
}

.sparks-modal__close:hover {
  transform: rotate(7deg) scale(1.06);
  border-color: rgba(255, 211, 113, .62);
  background: rgba(112, 49, 229, .74);
}

/* Карусель с видимыми соседними карточками */
.sparks-modal .sparks-carousel {
  position: relative;
  margin: 4px -30px 0;
  padding-bottom: 12px;
}

.sparks-modal .sparks-carousel__viewport {
  box-sizing: border-box;
  padding: 12px 12% 22px;
  overflow-x: auto;
  scroll-padding-inline: 12%;
}

.sparks-modal .sparks-carousel__track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 76%;
  gap: 20px;
}

.sparks-modal .spark-package-card {
  opacity: .28;
  filter: saturate(.55) brightness(.72);
  transform: scale(.90);
  transform-origin: center;
  transition:
    opacity .28s ease,
    filter .28s ease,
    transform .28s ease;
}

.sparks-modal .spark-package-card.is-active {
  z-index: 2;
  opacity: 1;
  filter: none;
  transform: scale(1);
}

.sparks-modal
.spark-package-card:not(.is-active)
.spark-package-card__button {
  pointer-events: none;
}

.sparks-modal .spark-package-card__button {
  min-height: 330px;
}

/* Стрелки поверх карточек — слева и справа */
.sparks-modal .sparks-carousel__controls {
  position: absolute;
  z-index: 10;
  inset: 0;
  display: block;
  margin: 0;
  pointer-events: none;
}

.sparks-modal .sparks-carousel__arrow {
  position: absolute;
  top: 50%;
  width: 50px;
  height: 58px;
  pointer-events: auto;
  border-color: rgba(205, 166, 255, .55);
  background: rgba(9, 13, 27, .87);
  box-shadow:
    0 10px 28px rgba(0, 0, 0, .38),
    0 0 20px rgba(119, 55, 241, .18);
  font-size: 24px;
  backdrop-filter: blur(9px);
}

.sparks-modal [data-sparks-prev] {
  left: 16px;
  transform: translateY(-50%);
}

.sparks-modal [data-sparks-next] {
  right: 16px;
  transform: translateY(-50%);
}

.sparks-modal
.sparks-carousel__arrow:hover:not(:disabled) {
  transform: translateY(-50%) scale(1.07);
}

.sparks-modal
.sparks-carousel__arrow:active:not(:disabled) {
  transform: translateY(-50%) scale(.94);
}

.sparks-modal .sparks-carousel__position {
  position: absolute;
  bottom: 1px;
  left: 50%;
  min-width: 65px;
  padding: 5px 10px;
  pointer-events: none;
  border: 1px solid rgba(156, 93, 255, .28);
  border-radius: 999px;
  background: rgba(5, 9, 19, .82);
  transform: translateX(-50%);
  backdrop-filter: blur(7px);
}

@keyframes sparks-modal-in {
  from {
    opacity: 0;
    transform: translateY(18px) scale(.96);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes sparks-backdrop-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (max-width: 720px) {
  .sparks-modal {
    width: calc(100vw - 14px);
    max-height: calc(100vh - 14px);
  }

  .sparks-modal__shell {
    max-height: calc(100vh - 14px);
    border-radius: 19px;
  }

  .sparks-modal__content {
    padding: 22px 16px 25px;
  }

  .sparks-modal .sparks-carousel {
    margin-right: -16px;
    margin-left: -16px;
  }

  .sparks-modal .sparks-carousel__viewport {
    padding-right: 7%;
    padding-left: 7%;
    scroll-padding-inline: 7%;
  }

  .sparks-modal .sparks-carousel__track {
    grid-auto-columns: 86%;
    gap: 12px;
  }

  .sparks-modal .spark-package-card__button {
    min-height: 390px;
  }

  .sparks-modal .sparks-carousel__arrow {
    width: 43px;
    height: 51px;
  }

  .sparks-modal [data-sparks-prev] {
    left: 5px;
  }

  .sparks-modal [data-sparks-next] {
    right: 5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sparks-modal,
  .sparks-modal::backdrop,
  .sparks-modal .spark-package-card {
    animation: none !important;
    transition-duration: .01ms !important;
  }
}


/* RANOTEKA_PREMIUM_HOME_V1_START */

/* ---------------------------------------------------------
   RANOTEKA PREMIUM HOME V1
   --------------------------------------------------------- */

.home-premium {
  width: 100%;
  display: grid;
  gap: 18px;
  padding-bottom: 34px;
}


/* ===== PROFILE DRAWER ===== */

.account-drawer {
  position: relative;
  z-index: 80;
}

.account-drawer > summary {
  list-style: none;
}

.account-drawer > summary::-webkit-details-marker {
  display: none;
}

.account-drawer__trigger {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 5px 8px;
  border-radius: 14px;
  transition:
    background .18s ease,
    border-color .18s ease;
}

.account-drawer__trigger:hover {
  background: rgba(157,78,255,.08);
}

.account-drawer__chevron {
  margin-left: 3px;
  color: #c7b7ef;
  font-size: 16px;
  transition: transform .2s ease;
}

.account-drawer[open] .account-drawer__chevron {
  transform: rotate(180deg);
}

.account-drawer__panel {
  position: absolute;
  top: calc(100% + 15px);
  right: 0;
  width: 286px;
  max-height: calc(100vh - 92px);
  overflow-y: auto;
  padding: 12px;
  border: 1px solid rgba(168,85,247,.42);
  border-radius: 20px;
  background:
    linear-gradient(
      180deg,
      rgba(18,17,39,.985),
      rgba(7,9,20,.995)
    );
  box-shadow:
    0 26px 80px rgba(0,0,0,.55),
    0 0 0 1px rgba(255,255,255,.02),
    0 0 42px rgba(139,92,246,.14);
  backdrop-filter: blur(20px);
}

.account-drawer__label {
  padding: 8px 12px 11px;
  color: #b78cff;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .14em;
}

.account-drawer__panel a,
.account-drawer__logout {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 0 12px;
  color: #e9e9f5;
  text-decoration: none;
  border-radius: 12px;
  font-weight: 700;
  transition:
    background .16s ease,
    color .16s ease,
    transform .16s ease;
}

.account-drawer__logout-form {
  margin: 0;
}

.account-drawer__logout {
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.account-drawer__panel a span,
.account-drawer__logout span {
  flex: 0 0 24px;
  width: 24px;
  font-size: 19px;
  line-height: 1;
  color: #b86cff;
  text-align: center;
}

.account-drawer__panel a:hover,
.account-drawer__panel a.is-current,
.account-drawer__logout:hover {
  color: #fff;
  background:
    linear-gradient(
      90deg,
      rgba(236,72,153,.13),
      rgba(124,58,237,.12)
    );
  transform: translateX(2px);
}

.account-drawer__separator {
  height: 1px;
  margin: 8px 6px;
  background: rgba(255,255,255,.075);
}

/* The desktop header already shows the balance; expose the same information
   in the compact mobile account menu where the header pill is hidden. */
.account-drawer__balance {
  display: none !important;
}

@media (max-width: 760px) {
  .account-drawer__panel a.account-drawer__balance {
    display: flex !important;
    align-items: center;
    gap: 10px !important;
    min-height: 58px;
    margin: 0 0 8px;
    padding: 7px 12px !important;
    border: 1px solid rgba(255,216,102,.28);
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(255,216,102,.12), rgba(125,60,255,.12));
    color: var(--text);
    transform: none;
  }

  .account-drawer__panel a.account-drawer__balance:hover {
    border-color: rgba(255,216,102,.52);
    background: linear-gradient(135deg, rgba(255,216,102,.18), rgba(125,60,255,.16));
    transform: none;
  }

  .account-drawer__panel a.account-drawer__balance > span {
    width: auto;
    font-size: inherit;
  }

  .account-drawer__panel a.account-drawer__balance > .account-drawer__balance-icon {
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    color: #ffd866;
    background: rgba(255,216,102,.14);
    font-size: 21px;
    font-weight: 900;
    line-height: 1;
    text-shadow: 0 0 12px rgba(255,216,102,.65);
  }

  .account-drawer__panel a.account-drawer__balance > .account-drawer__balance-copy {
    min-width: 0;
    flex: 1 1 auto;
    display: grid;
    gap: 2px;
    text-align: left;
  }

  .account-drawer__balance-copy small {
    color: var(--muted);
    font-size: 11px;
    font-weight: 750;
    line-height: 1.1;
  }

  .account-drawer__balance-copy strong {
    color: var(--text);
    font-size: 15px;
    line-height: 1.1;
  }

  .account-drawer__panel a.account-drawer__balance > .account-drawer__balance-action {
    flex: 0 0 auto;
    color: #ffd866;
    font-size: 11px;
    font-weight: 850;
    white-space: nowrap;
  }
}

.collection-index-card {
  display: block;
  min-height: 170px;
  transition: border-color .16s ease, transform .16s ease, background .16s ease;
}

.collection-index-card:hover {
  border-color: var(--line-strong);
  background: linear-gradient(145deg, rgba(26,21,52,.94), rgba(10,14,26,.96));
  transform: translateY(-2px);
}

.collection-index-card h2 {
  margin: 4px 0 8px;
}

.collection-index-card__count {
  display: inline-block;
  margin-top: 14px;
  color: #c894ff;
  font-size: 12px;
  font-weight: 850;
}


/* ===== HERO ===== */

.premium-hero {
  position: relative;
  min-height: 430px;
  overflow: hidden;
  border: 1px solid rgba(124,58,237,.25);
  border-radius: 22px;
  background: #070916;
  box-shadow:
    0 18px 70px rgba(0,0,0,.35),
    inset 0 1px 0 rgba(255,255,255,.035);
}

.home-premium .premium-hero__slide {
  position: absolute;
  inset: 0;
  min-height: 430px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity .45s ease;
}

.home-premium .premium-hero__slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

.premium-hero__art {
  position: absolute;
  inset: 0;
  background-image: var(--premium-hero-cover);
  background-size: cover;
  background-position: center 24%;
  transform: scale(1.015);
}

.premium-hero__shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      90deg,
      rgba(4,5,14,.98) 0%,
      rgba(4,5,14,.92) 20%,
      rgba(4,5,14,.60) 41%,
      rgba(4,5,14,.10) 68%,
      rgba(4,5,14,.18) 100%
    ),
    linear-gradient(
      0deg,
      rgba(4,5,14,.62),
      transparent 48%
    );
}

.premium-hero__content {
  position: relative;
  z-index: 3;
  width: min(620px, 46%);
  min-height: 430px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 44px 0 44px 72px;
}

.premium-kicker,
.premium-promo__eyebrow,
.premium-section__eyebrow {
  font-size: 11px;
  line-height: 1;
  font-weight: 950;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #d7b4ff;
}

.premium-kicker {
  align-self: flex-start;
  padding: 8px 10px;
  margin-bottom: 15px;
  border-radius: 7px;
  color: #fff;
  background:
    linear-gradient(135deg,#f43f73,#db2777);
  box-shadow: 0 8px 25px rgba(236,72,153,.22);
}

.premium-hero h1 {
  margin: 0;
  max-width: 610px;
  color: #fff;
  font-size: clamp(34px,3.5vw,58px);
  line-height: .98;
  letter-spacing: -.035em;
  text-transform: uppercase;
  text-wrap: balance;
}

.premium-hero__description {
  max-width: 510px;
  margin: 18px 0 13px;
  color: #c4c5d5;
  font-size: 15px;
  line-height: 1.62;
}

.premium-hero__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 15px;
}

.premium-hero__tags span {
  padding: 6px 10px;
  color: #d7d7e3;
  font-size: 11px;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 999px;
  background: rgba(10,12,25,.62);
  backdrop-filter: blur(8px);
}

.premium-hero__stats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  margin: 3px 0 18px;
  color: #b9bbca;
  font-size: 13px;
}

.premium-hero__stats b {
  margin-right: 3px;
  color: #ffc21c;
}

.premium-hero__history-rating {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #ff4f9a !important;
}

.premium-hero__history-rating > span {
  color: #ff4f9a !important;
  font-size: 18px;
  line-height: 1;
  text-shadow: 0 0 12px rgba(255, 79, 154, .45);
}

.premium-hero__stats span:nth-child(2) b {
  color: #b45cff;
}

.premium-hero__actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.premium-hero__read {
  min-width: 190px;
  justify-content: center;
  background:
    linear-gradient(135deg,#f00663,#c51c8f) !important;
  box-shadow:
    0 13px 35px rgba(236,0,96,.24);
}

.premium-hero__heart {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  color: #fff;
  text-decoration: none;
  font-size: 22px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 12px;
  background: rgba(8,10,23,.64);
  backdrop-filter: blur(8px);
  padding: 0;
  font: inherit;
  cursor: pointer;
  transition: color .16s ease, border-color .16s ease, background .16s ease, transform .16s ease;
}

.premium-hero__bookmark-form {
  display: flex;
  margin: 0;
}

.premium-hero__heart:hover,
.premium-hero__heart.is-active {
  color: #ff5b78;
  border-color: rgba(255,91,120,.72);
  background: rgba(105,16,42,.72);
  transform: translateY(-1px);
}

.premium-hero__dots {
  position: absolute;
  z-index: 9;
  left: 50%;
  bottom: 15px;
  transform: translateX(-50%);
}


/* ===== THREE PROMO BANNERS ===== */

.premium-promos {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 12px;
}

.premium-promo {
  position: relative;
  min-height: 190px;
  overflow: hidden;
  display: block;
  color: #fff;
  text-decoration: none;
  border: 1px solid rgba(142,71,244,.34);
  border-radius: 18px;
  background: #0b0d1c;
  box-shadow:
    0 12px 38px rgba(0,0,0,.25);
  isolation: isolate;
  transition:
    transform .22s ease,
    border-color .22s ease,
    box-shadow .22s ease;
}

.premium-promo:hover {
  transform: translateY(-3px);
  border-color: rgba(185,92,255,.72);
  box-shadow:
    0 18px 48px rgba(0,0,0,.38),
    0 0 32px rgba(139,92,246,.13);
}

.premium-promo__art {
  position: absolute;
  inset: 0;
  z-index: -3;
  background-image: var(--promo-cover);
  background-size: cover;
  background-position: center 28%;
  transition: transform .45s ease;
}

.premium-promo:hover .premium-promo__art {
  transform: scale(1.035);
}

.premium-promo__shade {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(
      90deg,
      rgba(5,6,16,.96),
      rgba(5,6,16,.73) 53%,
      rgba(5,6,16,.16)
    );
}

.premium-promo__body {
  position: relative;
  z-index: 2;
  min-height: 190px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 22px;
}

.premium-promo__eyebrow {
  display: inline-flex;
  padding: 6px 8px;
  margin-bottom: 10px;
  border-radius: 6px;
  color: #fff;
  background: rgba(124,58,237,.88);
}

.premium-promo strong {
  max-width: 320px;
  color: #fff;
  font-size: clamp(22px,2vw,31px);
  line-height: 1.03;
  letter-spacing: -.02em;
}

.premium-promo small {
  max-width: 290px;
  margin-top: 9px;
  color: #c6c7d5;
  font-size: 13px;
  line-height: 1.45;
}

.premium-promo b {
  margin-top: 15px;
  padding: 9px 12px;
  color: #fff;
  font-size: 12px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 9px;
  background: rgba(4,6,16,.45);
  backdrop-filter: blur(8px);
}

.premium-promo--free {
  background:
    radial-gradient(
      circle at 72% 45%,
      rgba(247,177,38,.36),
      transparent 25%
    ),
    radial-gradient(
      circle at 44% 88%,
      rgba(90,62,255,.36),
      transparent 36%
    ),
    linear-gradient(
      135deg,
      #10213a,
      #0b1020 45%,
      #28114b
    );
}

.premium-promo--free::before {
  content: "✦";
  position: absolute;
  z-index: 0;
  right: 42px;
  top: 24px;
  color: #ffd566;
  font-size: 94px;
  text-shadow:
    0 0 26px rgba(255,197,78,.42);
  transform: rotate(10deg);
  opacity: .82;
}

.premium-promo--free .premium-promo__eyebrow {
  color: #201600;
  background: #ffbf22;
}

.premium-promo--reader .premium-promo__eyebrow {
  background:
    linear-gradient(135deg,#ec4899,#a855f7);
}


/* ===== SECTIONS ===== */

.premium-section {
  margin-top: 2px;
}

.premium-section__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 10px;
}

.premium-section__head h2 {
  margin: 3px 0 0;
  color: #f7f7fb;
  font-size: 28px;
  line-height: 1;
  letter-spacing: -.025em;
}

.premium-section__head > a {
  color: #c56cff;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.premium-section__eyebrow--hot {
  color: #ff4c78;
  display: inline-flex;
  align-items: center;
  padding: 6px 9px;
  border: 1px solid rgba(255, 76, 120, .26);
  border-radius: 999px;
  background: rgba(255, 76, 120, .13);
  box-shadow: 0 5px 14px rgba(255, 76, 120, .10);
}


/* ===== FILTERS ===== */

.premium-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 12px 0 14px;
}

.premium-filter {
  padding: 8px 13px;
  color: #b7b9c8;
  font-size: 12px;
  font-weight: 750;
  text-decoration: none;
  border: 1px solid rgba(255,255,255,.075);
  border-radius: 9px;
  background: #0c0f1d;
  transition:
    color .16s ease,
    border-color .16s ease,
    background .16s ease;
}

.premium-filter:hover {
  color: #fff;
  border-color: rgba(168,85,247,.4);
}

.premium-filter.is-active {
  color: #fff;
  border-color: transparent;
  background:
    linear-gradient(135deg,#7c2cff,#9c2fff);
  box-shadow:
    0 7px 20px rgba(124,44,255,.2);
}

.premium-filter--advanced {
  color: #d8b4fe;
  border-color: rgba(168,85,247,.28);
}


/* ===== BOOK GRID ===== */

.premium-book-grid {
  display: grid;
  grid-template-columns: repeat(6,minmax(0,1fr));
  gap: 11px;
}

.premium-book-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.075);
  border-radius: 14px;
  background:
    linear-gradient(
      180deg,
      rgba(14,17,32,.98),
      rgba(8,10,21,.98)
    );
  box-shadow:
    0 9px 30px rgba(0,0,0,.18);
  transition:
    transform .2s ease,
    border-color .2s ease,
    box-shadow .2s ease;
}

.premium-book-card:hover {
  transform: translateY(-4px);
  border-color: rgba(163,84,255,.35);
  box-shadow:
    0 17px 42px rgba(0,0,0,.35),
    0 0 25px rgba(126,55,255,.08);
}

.premium-book-card__cover {
  position: relative;
  min-height: 200px;
  display: flex;
  align-items: flex-end;
  padding: 14px;
  overflow: hidden;
  color: #fff;
  text-decoration: none;
  background-size: cover;
  background-position: center 25%;
  transition: background-size .25s ease;
}

.premium-book-card__badge {
  position: absolute;
  top: 9px;
  left: 9px;
  padding: 5px 7px;
  color: #fff;
  font-size: 10px;
  font-weight: 950;
  border-radius: 6px;
  background:
    linear-gradient(135deg,#f43f5e,#db2777);
}

.premium-book-card:nth-child(2) .premium-book-card__badge,
.premium-book-card:nth-child(3) .premium-book-card__badge {
  color: #1e1300;
  background:
    linear-gradient(135deg,#ffbb19,#f59e0b);
}

.premium-book-card__bookmark {
  position: absolute;
  top: 9px;
  right: 9px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  color: #fff;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 8px;
  background: rgba(4,5,14,.55);
  backdrop-filter: blur(6px);
}

.premium-book-card__cover-title {
  position: relative;
  z-index: 2;
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.22;
  text-wrap: balance;
}

.premium-book-card__body {
  padding: 12px 13px 13px;
}

.premium-book-card__title {
  min-height: 38px;
  display: block;
  color: #f4f4fa;
  font-size: 13px;
  font-weight: 850;
  line-height: 1.35;
  text-decoration: none;
}

.premium-book-card__ratings {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 9px;
}

.premium-book-card__ratings span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #a8aaba;
  font-size: 10px;
}

.premium-book-card__ratings b {
  color: #ffc018;
  font-size: 12px;
}

.premium-book-card__ratings span:nth-child(2) b {
  color: #b55cff;
}

.premium-book-card__ratings small {
  color: #8f92a4;
  font-size: 9px;
}

.premium-book-card__footer {
  display: flex;
  justify-content: space-between;
  gap: 7px;
  margin-top: 8px;
  color: #85899c;
  font-size: 10px;
}


/* ===== CONTINUE READING ===== */

.premium-continue__grid {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 10px;
}

.premium-continue__card {
  min-width: 0;
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 13px;
  padding: 9px;
  color: #fff;
  text-decoration: none;
  border: 1px solid rgba(255,255,255,.075);
  border-radius: 13px;
  background: #0b0e1b;
}

.premium-continue__card img {
  width: 74px;
  height: 92px;
  object-fit: cover;
  border-radius: 9px;
}

.premium-continue__card > span {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.premium-continue__card strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.premium-continue__card small {
  margin: 4px 0 9px;
  color: #9195a8;
}

.premium-continue__card b {
  color: #c66bff;
  font-size: 12px;
}


/* ===== HEADER REBALANCE ===== */

header form[method="get"][action="/catalog"] {
  flex: 1 1 520px;
  max-width: 620px;
  margin-inline: auto;
}


/* ===== RESPONSIVE ===== */

@media (max-width: 1450px) {
  .premium-book-grid {
    grid-template-columns: repeat(5,minmax(0,1fr));
  }

  .premium-hero__content {
    width: 52%;
  }
}

@media (max-width: 1180px) {
  .premium-promos {
    grid-template-columns: 1fr 1fr;
  }

  .premium-promo:last-child {
    grid-column: 1 / -1;
  }

  .premium-book-grid {
    grid-template-columns: repeat(4,minmax(0,1fr));
  }

  .premium-hero__content {
    width: 63%;
    padding-left: 46px;
  }

  .premium-hero__shade {
    background:
      linear-gradient(
        90deg,
        rgba(4,5,14,.98),
        rgba(4,5,14,.82) 52%,
        rgba(4,5,14,.30)
      );
  }
}

@media (max-width: 820px) {
  .home-premium {
    gap: 13px;
  }

  .premium-hero,
  .home-premium .premium-hero__slide {
    min-height: 500px;
  }

  .premium-hero__content {
    width: auto;
    min-height: 500px;
    justify-content: flex-end;
    padding: 90px 24px 42px;
  }

  .premium-hero__shade {
    background:
      linear-gradient(
        0deg,
        rgba(4,5,14,.99) 0%,
        rgba(4,5,14,.86) 52%,
        rgba(4,5,14,.16) 100%
      );
  }

  .premium-hero h1 {
    font-size: clamp(31px,9vw,45px);
  }

  .premium-promos {
    grid-template-columns: 1fr;
  }

  .premium-promo:last-child {
    grid-column: auto;
  }

  .premium-book-grid {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }

  .premium-continue__grid {
    grid-template-columns: 1fr;
  }

  .premium-section__head h2 {
    font-size: 24px;
  }

  .account-drawer__panel {
    position: fixed;
    top: 72px;
    right: 12px;
    left: auto;
    width: min(286px, calc(100vw - 24px));
    max-width: calc(100vw - 24px);
  }
}

@media (max-width: 520px) {
  .premium-book-grid {
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 8px;
  }

  .premium-book-card__cover {
    min-height: 170px;
  }

  .premium-book-card__footer {
    display: block;
  }

  .premium-book-card__footer span {
    display: block;
    margin-top: 2px;
  }
}

/* RANOTEKA_PREMIUM_HOME_V1_END */


/* RANOTEKA_PREMIUM_COMPACT_V2_START */


/* =========================================================
   MAIN CONTENT WIDTH
   ========================================================= */

.home-premium {
  width: min(1440px, calc(100% - 34px)) !important;
  margin-inline: auto !important;
  gap: 14px !important;
  padding-top: 2px !important;
  padding-bottom: 18px !important;
}


/* =========================================================
   HERO — LESS EMPTY, MORE PREMIUM
   ========================================================= */

.premium-hero {
  min-height: 350px !important;
  border-radius: 18px !important;
}

.home-premium .premium-hero__slide {
  min-height: 350px !important;
}

.premium-hero__art {
  background-position:
    var(--premium-hero-position, 70% 30%) !important;

  background-size: cover !important;
}

.premium-hero__content {
  width: min(590px, 49%) !important;
  min-height: 350px !important;
  padding:
    30px 0
    34px 48px !important;
}

.premium-hero h1 {
  max-width: 560px !important;
  font-size:
    clamp(32px, 3vw, 50px) !important;
  line-height: .98 !important;
}

.premium-hero__description {
  max-width: 480px !important;
  margin:
    11px 0 9px !important;
  font-size: 13px !important;
  line-height: 1.48 !important;
}

.premium-hero__tags {
  margin-bottom: 10px !important;
}

.premium-hero__tags span {
  padding: 5px 9px !important;
  font-size: 10px !important;
}

.premium-hero__stats {
  gap: 14px !important;
  margin:
    0 0 13px !important;
  font-size: 11px !important;
}

.premium-hero__actions {
  gap: 8px !important;
}

.premium-hero__actions .btn {
  min-height: 40px !important;
  padding:
    0 15px !important;
  font-size: 12px !important;
}

.premium-hero__read {
  min-width: 166px !important;
}

.premium-hero__heart {
  width: 40px !important;
  height: 40px !important;
  border-radius: 10px !important;
}


/* =========================================================
   PROMO BANNERS
   ========================================================= */

.premium-promos {
  gap: 10px !important;
}

.premium-promo {
  min-height: 150px !important;
  border-radius: 16px !important;
}

.premium-promo__body {
  min-height: 150px !important;
  padding: 17px 19px !important;
}

.premium-promo strong {
  max-width: 280px !important;
  font-size:
    clamp(19px, 1.65vw, 26px) !important;
}

.premium-promo small {
  max-width: 270px !important;
  margin-top: 6px !important;
  font-size: 11px !important;
  line-height: 1.38 !important;
}

.premium-promo b {
  margin-top: 10px !important;
  padding: 7px 10px !important;
  font-size: 10px !important;
}

.premium-promo__eyebrow {
  padding: 5px 7px !important;
  margin-bottom: 7px !important;
  font-size: 9px !important;
}

.premium-promo--free::before {
  right: 34px !important;
  top: 18px !important;
  font-size: 76px !important;
}


/* =========================================================
   SECTION HEADERS
   ========================================================= */

.premium-section {
  margin-top: 7px !important;
}

.premium-section__head {
  margin-bottom: 8px !important;
}

.premium-section__head h2 {
  font-size: 25px !important;
}

.premium-section__eyebrow {
  font-size: 10px !important;
}


/* =========================================================
   FILTERS
   ========================================================= */

.premium-filter-row {
  gap: 6px !important;
  margin:
    9px 0 11px !important;
}

.premium-filter {
  padding:
    8px 12px !important;
  font-size: 11px !important;
  border-radius: 9px !important;
}


/* =========================================================
   BOOK CARDS
   ========================================================= */

.premium-book-grid {
  grid-template-columns:
    repeat(6, minmax(0, 1fr)) !important;

  gap: 10px !important;
}

.premium-book-card {
  border-radius: 12px !important;
}

.premium-book-card__cover {
  min-height: 165px !important;
  padding: 11px !important;
  background-size: cover !important;
}

.premium-book-card__cover::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;

  background:
    linear-gradient(
      180deg,
      rgba(7,8,20,.02) 20%,
      rgba(7,8,20,.14) 55%,
      rgba(5,6,16,.88) 100%
    );
}

.premium-book-card:nth-child(6n + 1)
.premium-book-card__cover::before,
.premium-book-card:nth-child(6n + 2)
.premium-book-card__cover::before,
.premium-book-card:nth-child(6n + 3)
.premium-book-card__cover::before,
.premium-book-card:nth-child(6n + 4)
.premium-book-card__cover::before,
.premium-book-card:nth-child(6n + 5)
.premium-book-card__cover::before,
.premium-book-card:nth-child(6n + 6)
.premium-book-card__cover::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  mix-blend-mode: color;
  opacity: .26;
}

.premium-book-card:nth-child(6n + 1)
.premium-book-card__cover::before {
  background: #385eff;
}

.premium-book-card:nth-child(6n + 2)
.premium-book-card__cover::before {
  background: #7c2cff;
}

.premium-book-card:nth-child(6n + 3)
.premium-book-card__cover::before {
  background: #05a9ad;
}

.premium-book-card:nth-child(6n + 4)
.premium-book-card__cover::before {
  background: #d52b55;
}

.premium-book-card:nth-child(6n + 5)
.premium-book-card__cover::before {
  background: #d39423;
}

.premium-book-card:nth-child(6n + 6)
.premium-book-card__cover::before {
  background: #a53fff;
}

.premium-book-card__cover-title,
.premium-book-card__badge,
.premium-book-card__bookmark {
  z-index: 2 !important;
}

.premium-book-card__cover-title {
  font-size: 12px !important;
}

.premium-book-card__body {
  padding:
    9px 10px 10px !important;
}

.premium-book-card__title {
  min-height: 32px !important;
  font-size: 11px !important;
}

.premium-book-card__ratings {
  gap: 8px !important;
  margin-top: 6px !important;
}

.premium-book-card__ratings b {
  font-size: 11px !important;
}

.premium-book-card__ratings small {
  font-size: 8px !important;
}

.premium-book-card__footer {
  margin-top: 6px !important;
  font-size: 8px !important;
}


/* =========================================================
   CONTINUE READING
   ========================================================= */

.premium-continue__card {
  grid-template-columns:
    62px 1fr !important;

  padding: 7px !important;
}

.premium-continue__card img {
  width: 62px !important;
  height: 78px !important;
}


/* =========================================================
   FOOTER COMPACT
   ========================================================= */

footer {
  margin-top: 24px !important;
  padding-top: 28px !important;
  padding-bottom: 18px !important;
}

footer h2,
footer h3,
footer h4 {
  margin-top: 0 !important;
  margin-bottom: 10px !important;
}

footer p {
  margin:
    4px 0 !important;
  line-height: 1.45 !important;
}

footer ul,
footer nav {
  margin-top: 7px !important;
}

footer li {
  margin:
    5px 0 !important;
}


/* =========================================================
   LARGE MONITORS
   ========================================================= */

@media (min-width: 1700px) {
  .home-premium {
    width: 1420px !important;
  }
}


/* =========================================================
   NOTEBOOK
   ========================================================= */

@media (max-width: 1450px) {
  .home-premium {
    width:
      min(1320px, calc(100% - 26px)) !important;
  }

  .premium-book-grid {
    grid-template-columns:
      repeat(5, minmax(0, 1fr)) !important;
  }
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 1100px) {
  .premium-book-grid {
    grid-template-columns:
      repeat(4, minmax(0, 1fr)) !important;
  }

  .premium-hero__content {
    width: 58% !important;
  }
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 820px) {
  .home-premium {
    width:
      calc(100% - 18px) !important;
  }

  .premium-hero,
  .home-premium .premium-hero__slide {
    min-height: 470px !important;
  }

  .premium-hero__content {
    width: auto !important;
    min-height: 470px !important;
    padding:
      150px 20px 35px !important;
  }

  .premium-promos {
    grid-template-columns:
      1fr !important;
  }

  .premium-promo {
    min-height: 145px !important;
  }

  .premium-book-grid {
    grid-template-columns:
      repeat(2, minmax(0, 1fr)) !important;
  }
}


/* RANOTEKA_PREMIUM_COMPACT_V2_END */


/* RANOTEKA_PREMIUM_V3_START */


/* ===== BOOK SECTIONS: ONE PREMIUM ROW ===== */

.premium-book-grid {
  display: flex !important;
  grid-template-columns: none !important;

  gap: 10px !important;

  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;

  padding:
    2px 2px 12px !important;

  scroll-snap-type: x proximity;
  scroll-behavior: smooth;

  cursor: grab;

  scrollbar-width: thin;
  scrollbar-color:
    rgba(157,78,255,.45)
    rgba(255,255,255,.025);
}

.premium-book-grid:active {
  cursor: grabbing;
}

.premium-book-grid::-webkit-scrollbar {
  height: 5px;
}

.premium-book-grid::-webkit-scrollbar-track {
  background:
    rgba(255,255,255,.025);
  border-radius: 99px;
}

.premium-book-grid::-webkit-scrollbar-thumb {
  background:
    linear-gradient(
      90deg,
      #7c3aed,
      #c026d3
    );

  border-radius: 99px;
}


/* 6 cards visible on normal desktop */

.premium-book-card {
  flex:
    0 0
    calc((100% - 50px) / 6) !important;

  width:
    calc((100% - 50px) / 6) !important;

  min-width: 0 !important;

  scroll-snap-align: start;
}


/* ===== SECTION EDGE EFFECT ===== */

.premium-section {
  position: relative;
}

.premium-section::after {
  content: "";
  position: absolute;

  top: 72px;
  right: 0;
  bottom: 10px;

  width: 34px;

  pointer-events: none;

  background:
    linear-gradient(
      90deg,
      transparent,
      rgba(5,7,17,.90)
    );

  opacity: .75;
}


/* ===== SECTION HEAD ===== */

.premium-section__head {
  min-height: 38px;
}

.premium-section__head > a {
  padding:
    7px 10px;

  border-radius: 8px;

  transition:
    background .18s ease,
    color .18s ease;
}

.premium-section__head > a:hover {
  color: #fff;

  background:
    rgba(157,78,255,.11);
}


/* ===== CARD POLISH ===== */

.premium-book-card {
  background:
    linear-gradient(
      180deg,
      #0d1020,
      #080a14
    ) !important;

  box-shadow:
    0 8px 26px rgba(0,0,0,.22) !important;
}

.premium-book-card:hover {
  transform:
    translateY(-3px)
    scale(1.008) !important;

  border-color:
    rgba(176,92,255,.48) !important;

  box-shadow:
    0 17px 38px rgba(0,0,0,.38),
    0 0 24px rgba(126,55,255,.10) !important;
}


/* duplicate title becomes visually secondary */

.premium-book-card__title {
  color: #eeeef7 !important;
  font-weight: 760 !important;
}

.premium-book-card__cover-title {
  text-shadow:
    0 2px 10px rgba(0,0,0,.85);
}


/* ===== PROMOS: MORE VISUAL DEPTH ===== */

.premium-promo {
  box-shadow:
    0 10px 32px rgba(0,0,0,.27),
    inset 0 1px 0 rgba(255,255,255,.035) !important;
}

.premium-promo::after {
  content: "";
  position: absolute;
  inset: 0;

  pointer-events: none;

  border-radius: inherit;

  background:
    linear-gradient(
      115deg,
      rgba(255,255,255,.055),
      transparent 25%,
      transparent 72%,
      rgba(169,77,255,.055)
    );
}


/* ===== HERO POLISH ===== */

.premium-hero {
  box-shadow:
    0 18px 55px rgba(0,0,0,.34),
    0 0 34px rgba(83,44,180,.06),
    inset 0 1px 0 rgba(255,255,255,.035) !important;
}


/* ===== LESS EMPTY SPACE BEFORE FOOTER ===== */

.home-premium {
  padding-bottom: 8px !important;
}

footer {
  margin-top: 12px !important;
}


/* ===== FOOTER SMALLER ===== */

footer {
  padding-top: 24px !important;
  padding-bottom: 14px !important;
}

footer > div,
footer .footer-inner,
footer .footer-grid {
  row-gap: 14px !important;
}

footer h3,
footer h4 {
  margin-bottom: 8px !important;
}

footer a,
footer p,
footer li {
  line-height: 1.38 !important;
}


/* ===== 5 CARDS ON SMALLER LAPTOPS ===== */

@media (max-width: 1450px) {
  .premium-book-card {
    flex-basis:
      calc((100% - 40px) / 5) !important;

    width:
      calc((100% - 40px) / 5) !important;
  }
}


/* ===== 4 CARDS ===== */

@media (max-width: 1100px) {
  .premium-book-card {
    flex-basis:
      calc((100% - 30px) / 4) !important;

    width:
      calc((100% - 30px) / 4) !important;
  }
}


/* ===== MOBILE ===== */

@media (max-width: 720px) {
  .premium-book-grid {
    gap: 8px !important;
  }

  .premium-book-card {
    flex-basis:
      46% !important;

    width:
      46% !important;
  }

  .premium-section::after {
    width: 18px;
  }
}


/* RANOTEKA_PREMIUM_V3_END */




/* RANOTEKA_PREMIUM_V4_START */

/* скрываем техническую полосу прокрутки */
.premium-book-grid {
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
  padding-bottom: 3px !important;
}

.premium-book-grid::-webkit-scrollbar {
  display: none !important;
}

/* контейнер книжной карусели */
.premium-book-strip {
  position: relative;
  width: 100%;
}

/* стрелки */
.premium-book-strip__arrow {
  position: absolute;
  z-index: 30;
  top: 50%;

  width: 38px;
  height: 58px;

  display: grid;
  place-items: center;

  transform: translateY(-50%);

  border: 1px solid rgba(181,92,255,.42);
  border-radius: 12px;

  color: #fff;
  font-size: 25px;

  background:
    linear-gradient(
      180deg,
      rgba(20,19,43,.96),
      rgba(7,8,19,.98)
    );

  box-shadow:
    0 14px 38px rgba(0,0,0,.48),
    0 0 25px rgba(135,62,255,.12);

  backdrop-filter: blur(14px);
  cursor: pointer;

  transition:
    transform .18s ease,
    border-color .18s ease,
    background .18s ease,
    opacity .18s ease;
}

.premium-book-strip__arrow:hover {
  border-color: rgba(211,113,255,.88);

  background:
    linear-gradient(
      180deg,
      rgba(92,38,165,.97),
      rgba(28,14,60,.99)
    );
}

.premium-book-strip__arrow:active {
  transform: translateY(-50%) scale(.94);
}

.premium-book-strip__arrow--prev {
  left: -19px;
}

.premium-book-strip__arrow--next {
  right: -19px;
}

.premium-book-strip__arrow[hidden] {
  display: none !important;
}

/* старый затемняющий край больше не нужен */
.premium-section::after {
  display: none !important;
}

/* низ карточек */
.premium-book-card__footer {
  min-height: 13px;
}

.premium-book-card__footer span[hidden] {
  display: none !important;
}

/* меньше пустоты перед footer */
.home-premium {
  padding-bottom: 0 !important;
  margin-bottom: 0 !important;
}

body:has(.home-premium) footer {
  margin-top: 4px !important;
  padding-top: 16px !important;
  padding-bottom: 10px !important;
}

body:has(.home-premium) footer h3,
body:has(.home-premium) footer h4 {
  margin-bottom: 5px !important;
}

body:has(.home-premium) footer p,
body:has(.home-premium) footer li {
  margin-top: 2px !important;
  margin-bottom: 2px !important;
  line-height: 1.34 !important;
}

@media (max-width: 1500px) {
  .premium-book-strip__arrow--prev {
    left: 5px;
  }

  .premium-book-strip__arrow--next {
    right: 5px;
  }
}

@media (max-width: 720px) {
  .premium-book-strip__arrow {
    width: 34px;
    height: 50px;
    font-size: 21px;
  }
}

/* RANOTEKA_PREMIUM_V4_END */


/* RANOTEKA_PREMIUM_V5_CODED_ART_START */


/* =========================================================
   HERO TEST ART
   ========================================================= */

.premium-hero__art {
  background-image:
    url('/public/test-art/hero-cultivator.svg') !important;

  background-position:
    center center !important;

  background-size:
    cover !important;
}


/* ещё сильнее защищаем текст слева */
.premium-hero__shade {
  background:
    linear-gradient(
      90deg,
      rgba(4,5,14,.99) 0%,
      rgba(4,5,14,.94) 24%,
      rgba(4,5,14,.68) 42%,
      rgba(4,5,14,.15) 67%,
      rgba(4,5,14,.05) 100%
    ),
    linear-gradient(
      0deg,
      rgba(4,5,14,.42),
      transparent 48%
    ) !important;
}


/* =========================================================
   PROMO ART
   ========================================================= */

.premium-promo--content .premium-promo__art {
  background-image:
    url('/public/test-art/promo-dark-week.svg') !important;

  background-position:
    center !important;

  background-size:
    cover !important;
}


.premium-promo--reader .premium-promo__art {
  background-image:
    url('/public/test-art/promo-reader-pick.svg') !important;

  background-position:
    center !important;

  background-size:
    cover !important;
}


/* средний баннер остаётся графическим */
.premium-promo--free {
  background:
    radial-gradient(
      circle at 74% 44%,
      rgba(255,187,52,.32),
      transparent 20%
    ),
    radial-gradient(
      circle at 46% 105%,
      rgba(116,61,255,.40),
      transparent 42%
    ),
    linear-gradient(
      135deg,
      #0a172a,
      #10152b 48%,
      #30134e
    ) !important;
}


/* Убираем старые цветовые фильтры поверх серверных обложек */
.premium-book-card__cover::before {
  opacity: .06 !important;
}


/* чуть более дорогая рамка вокруг арта */
.premium-book-card__cover {
  border-bottom:
    1px solid rgba(255,255,255,.055);

  background-position:
    center 22% !important;

  background-size:
    cover !important;
}


/* =========================================================
   CARD TITLE POLISH
   ========================================================= */

.premium-book-card__cover-title {
  max-width: 92%;

  font-size:
    13px !important;

  line-height:
    1.15 !important;

  letter-spacing:
    -.015em;

  text-shadow:
    0 3px 14px rgba(0,0,0,.98),
    0 1px 2px #000;
}


/* =========================================================
   ARROW LESS AGGRESSIVE UNTIL HOVER
   ========================================================= */

.premium-book-strip__arrow {
  opacity: .62;
}

.premium-book-strip:hover
.premium-book-strip__arrow {
  opacity: 1;
}


/* =========================================================
   SMALL LIGHT EDGE TO PROMOS
   ========================================================= */

.premium-promo {
  border-color:
    rgba(157,78,255,.32) !important;
}

.premium-promo:hover {
  border-color:
    rgba(192,104,255,.68) !important;
}


/* RANOTEKA_PREMIUM_V5_CODED_ART_END */


/* RANOTEKA_MOBILE_V1_START */


/* ==========================================================
   RANIKO NAV
   ========================================================== */

.raniko-nav {
  position: relative;
  flex: 0 0 auto;
}

.raniko-nav__button {
  width: 42px;
  height: 42px;

  display: grid;
  place-items: center;

  padding: 0;
  overflow: hidden;

  border:
    1px solid rgba(167,95,255,.42);

  border-radius: 50%;

  background:
    linear-gradient(
      145deg,
      #261147,
      #6d28d9
    );

  box-shadow:
    0 0 22px rgba(139,72,246,.18);

  cursor: pointer;
}

.raniko-nav__button img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.raniko-nav__bubble {
  position: absolute;
  z-index: 200;

  top: calc(100% + 12px);
  right: 0;

  width: 240px;

  padding: 12px 14px;

  border:
    1px solid rgba(167,95,255,.35);

  border-radius: 14px;

  background:
    rgba(10,10,24,.97);

  box-shadow:
    0 18px 50px rgba(0,0,0,.46);

  color: #f5f2ff;

  font-size: 12px;
  line-height: 1.45;
}

.raniko-nav__bubble[hidden] {
  display: none !important;
}


/* ==========================================================
   TRUE MOBILE LAYOUT
   ========================================================== */

@media (max-width: 720px) {

  html {
    width: 100% !important;
    max-width: 100% !important;

    overflow-x: hidden !important;
  }

  body {
    width: 100% !important;
    max-width: 100% !important;

    margin: 0 !important;

    overflow-x: hidden !important;
  }

  body * {
    box-sizing: border-box;
  }


  /* --------------------------------------------------------
     HEADER
     -------------------------------------------------------- */

  header {
    width: 100% !important;
    max-width: 100vw !important;

    overflow: visible !important;
  }

  header > * {
    max-width: 100% !important;
  }

  .raniko-nav__button {
    width: 38px;
    height: 38px;
  }

  .raniko-nav__bubble {
    position: fixed;

    top: 78px;
    right: 12px;

    width:
      min(260px, calc(100vw - 24px));
  }


  /* --------------------------------------------------------
     MAIN
     -------------------------------------------------------- */

  .home-premium {
    width: 100% !important;
    max-width: 100% !important;

    margin: 0 auto !important;

    padding:
      12px 12px 0 !important;

    overflow: hidden !important;
  }

  .home-premium > * {
    min-width: 0 !important;
    max-width: 100% !important;
  }


  /* --------------------------------------------------------
     HERO
     -------------------------------------------------------- */

  .premium-hero {
    position: relative !important;

    width: 100% !important;
    max-width: 100% !important;

    min-width: 0 !important;
    min-height: 0 !important;

    height: auto !important;

    overflow: hidden !important;

    border-radius: 17px !important;
  }

  .premium-hero__slide {
    position: relative !important;

    display: block !important;

    width: 100% !important;
    max-width: 100% !important;

    min-width: 0 !important;

    min-height: 535px !important;

    overflow: hidden !important;
  }

  .premium-hero__art {
    position: absolute !important;

    inset: 0 !important;

    width: 100% !important;
    height: 100% !important;

    max-width: none !important;

    background-size:
      cover !important;

    background-position:
      67% center !important;

    transform: none !important;
  }

  .premium-hero__shade {
    position: absolute !important;
    inset: 0 !important;

    width: 100% !important;
    height: 100% !important;

    background:
      linear-gradient(
        180deg,
        rgba(4,5,14,.10) 0%,
        rgba(4,5,14,.20) 25%,
        rgba(4,5,14,.78) 55%,
        rgba(4,5,14,.98) 100%
      ) !important;
  }

  .premium-hero__content {
    position: relative !important;
    z-index: 5 !important;

    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-end !important;

    width: 100% !important;
    max-width: none !important;

    min-width: 0 !important;
    min-height: 535px !important;

    padding:
      190px 18px 30px !important;

    overflow: hidden !important;
  }

  .premium-hero h1 {
    width: 100% !important;
    max-width: 100% !important;

    margin:
      7px 0 10px !important;

    font-size:
      clamp(31px, 8.8vw, 42px) !important;

    line-height:
      .98 !important;

    letter-spacing:
      -.045em !important;

    overflow-wrap:
      break-word !important;

    word-break:
      normal !important;
  }

  .premium-hero__description {
    width: 100% !important;
    max-width: 100% !important;

    font-size:
      13px !important;

    line-height:
      1.45 !important;
  }

  .premium-hero__tags {
    display: flex !important;
    flex-wrap: wrap !important;

    width: 100% !important;
    max-width: 100% !important;

    gap: 6px !important;
  }

  .premium-hero__stats {
    display: flex !important;
    flex-wrap: wrap !important;

    width: 100% !important;

    gap:
      7px 14px !important;
  }

  .premium-hero__actions {
    display: grid !important;

    grid-template-columns:
      minmax(0, 1fr)
      auto
      44px !important;

    width: 100% !important;

    gap: 8px !important;
  }

  .premium-hero__actions .btn {
    min-width: 0 !important;

    padding:
      0 11px !important;

    white-space:
      nowrap !important;
  }

  .premium-hero__read {
    min-width: 0 !important;
  }

  .premium-hero__heart {
    width: 44px !important;
    height: 44px !important;
  }

  .premium-hero__dots {
    left: 18px !important;
    right: auto !important;

    bottom: 14px !important;

    transform:
      translateY(42px) !important;
  }


  /* --------------------------------------------------------
     PROMOS
     -------------------------------------------------------- */

  .premium-promos {
    display: grid !important;

    grid-template-columns:
      minmax(0, 1fr) !important;

    width: 100% !important;

    gap: 10px !important;

    margin-top:
      10px !important;
  }

  .premium-promo {
    position: relative !important;

    width: 100% !important;
    max-width: 100% !important;

    min-width: 0 !important;
    min-height: 176px !important;

    overflow: hidden !important;
  }

  .premium-promo__art {
    position: absolute !important;

    inset: 0 !important;

    width: 100% !important;
    height: 100% !important;

    max-width: none !important;

    background-size:
      cover !important;

    background-position:
      center !important;
  }

  .premium-promo__body {
    position: relative !important;
    z-index: 4 !important;

    width: 100% !important;
    max-width: 100% !important;

    min-width: 0 !important;

    min-height: 176px !important;

    padding:
      18px !important;

    background:
      linear-gradient(
        90deg,
        rgba(5,6,16,.94),
        rgba(5,6,16,.76) 58%,
        rgba(5,6,16,.15)
      );
  }

  .premium-promo strong {
    max-width:
      82% !important;
  }


  /* --------------------------------------------------------
     SECTION
     -------------------------------------------------------- */

  .premium-section {
    width: 100% !important;
    max-width: 100% !important;

    min-width: 0 !important;

    overflow: hidden !important;

    margin-top:
      20px !important;
  }

  .premium-section__head {
    width: 100% !important;
    max-width: 100% !important;

    gap: 10px !important;
  }

  .premium-section__head h2 {
    font-size:
      28px !important;
  }


  /* --------------------------------------------------------
     FILTERS
     -------------------------------------------------------- */

  .premium-filter-row {
    display: flex !important;

    width: 100% !important;
    max-width: 100% !important;

    flex-wrap: nowrap !important;

    gap: 6px !important;

    overflow-x: auto !important;
    overflow-y: hidden !important;

    padding-bottom:
      5px !important;

    scrollbar-width:
      none !important;

    -webkit-overflow-scrolling:
      touch;
  }

  .premium-filter-row::-webkit-scrollbar {
    display: none !important;
  }

  .premium-filter {
    flex:
      0 0 auto !important;

    white-space:
      nowrap !important;
  }


  /* --------------------------------------------------------
     BOOK CAROUSEL
     -------------------------------------------------------- */

  .premium-book-strip {
    width: 100% !important;
    max-width: 100% !important;

    min-width: 0 !important;

    overflow: hidden !important;
  }

  .premium-book-grid {
    display: flex !important;

    width: 100% !important;
    max-width: 100% !important;

    min-width: 0 !important;

    gap: 10px !important;

    overflow-x: auto !important;
    overflow-y: hidden !important;

    padding:
      2px 1px 8px !important;

    scroll-snap-type:
      x mandatory !important;

    scrollbar-width:
      none !important;

    -webkit-overflow-scrolling:
      touch;
  }

  .premium-book-grid::-webkit-scrollbar {
    display: none !important;
  }

  .premium-book-card {
    flex:
      0 0 82vw !important;

    width:
      82vw !important;

    min-width:
      82vw !important;

    max-width:
      82vw !important;

    scroll-snap-align:
      start !important;
  }

  .premium-book-card__cover {
    min-height:
      260px !important;
  }

  .premium-book-strip__arrow {
    display:
      none !important;
  }


  /* --------------------------------------------------------
     FOOTER
     -------------------------------------------------------- */

  footer {
    width: 100% !important;
    max-width: 100% !important;

    overflow: hidden !important;

    margin-top:
      18px !important;

    padding:
      24px 15px 18px !important;
  }

  footer * {
    max-width:
      100% !important;
  }

  footer .footer-grid {
    display: grid !important;

    grid-template-columns:
      repeat(2, minmax(0, 1fr)) !important;

    gap:
      26px 20px !important;
  }

  footer h2 {
    font-size:
      24px !important;
  }

  footer h3,
  footer h4 {
    font-size:
      16px !important;
  }

  footer p,
  footer a,
  footer li {
    font-size:
      13px !important;

    line-height:
      1.45 !important;
  }


  /* --------------------------------------------------------
     FINAL OVERFLOW GUARD
     -------------------------------------------------------- */

  img,
  svg,
  video,
  canvas {
    max-width:
      100% !important;
  }

}


/* extra narrow phones */
@media (max-width: 420px) {

  .home-premium {
    padding-left:
      10px !important;

    padding-right:
      10px !important;
  }

  .premium-hero h1 {
    font-size:
      clamp(29px, 8.7vw, 38px) !important;
  }

  .premium-hero__actions {
    grid-template-columns:
      1fr auto 42px !important;
  }

  .premium-book-card {
    flex-basis:
      84vw !important;

    width:
      84vw !important;

    min-width:
      84vw !important;

    max-width:
      84vw !important;
  }

}


/* RANOTEKA_MOBILE_V1_END */


/* RANOTEKA_MOBILE_FINAL_START */


/* ============================================================
   DESKTOP НЕ ТРОГАЕМ
   ============================================================ */


/* ============================================================
   MOBILE
   ============================================================ */

@media (max-width: 720px) {

  html,
  body {
    width: 100% !important;
    max-width: 100% !important;

    overflow-x: hidden !important;
  }

  body {
    margin: 0 !important;
  }


  /* ----------------------------------------------------------
     HEADER
     ---------------------------------------------------------- */

  header {
    width: 100% !important;
    max-width: 100vw !important;
  }

  header * {
    box-sizing: border-box;
  }

  .raniko-original-nav {
    flex: 0 0 auto;

    width: 36px;
    height: 36px;

    display: grid;
    place-items: center;

    overflow: hidden;

    border:
      1px solid rgba(178,92,255,.46);

    border-radius: 50%;

    background:
      radial-gradient(
        circle at 50% 30%,
        rgba(163,76,255,.30),
        rgba(18,10,35,.95)
      );

    box-shadow:
      0 0 20px rgba(131,61,255,.18);
  }

  .raniko-original-nav > *,
  .raniko-original-nav img,
  .raniko-original-nav svg,
  .raniko-original-nav picture {
    display: block !important;

    width: 100% !important;
    height: 100% !important;

    max-width: none !important;
    max-height: none !important;

    object-fit: cover !important;

    margin: 0 !important;
    padding: 0 !important;
  }


  /* ----------------------------------------------------------
     HOME WIDTH
     ---------------------------------------------------------- */

  .home-premium {
    width: 100% !important;
    max-width: 100% !important;

    min-width: 0 !important;

    margin: 0 !important;

    padding:
      12px 12px 0 !important;

    overflow: hidden !important;
  }

  .home-premium > * {
    min-width: 0 !important;
    max-width: 100% !important;
  }


  /* ==========================================================
     HERO — ГЛАВНЫЙ FIX
     Неактивные слайды вообще не занимают место.
     ========================================================== */

  .premium-hero {
    position: relative !important;

    width: 100% !important;
    max-width: 100% !important;

    height: 500px !important;
    min-height: 500px !important;

    overflow: hidden !important;

    border-radius: 18px !important;
  }

  .premium-hero__slide {
    position: absolute !important;

    inset: 0 !important;

    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;

    margin: 0 !important;

    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;

    overflow: hidden !important;
  }

  .premium-hero__slide.is-active {
    position: absolute !important;

    display: block !important;

    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
  }

  .premium-hero__slide:not(.is-active) {
    display: none !important;
  }


  /* ART */

  .premium-hero__art {
    position: absolute !important;

    inset: 0 !important;

    width: 100% !important;
    height: 100% !important;

    background-size: cover !important;
    background-position: 67% center !important;

    transform: none !important;
  }


  /* Затемнение под текст */

  .premium-hero__shade {
    position: absolute !important;

    inset: 0 !important;

    width: 100% !important;
    height: 100% !important;

    background:
      linear-gradient(
        180deg,
        rgba(4,5,14,.05) 0%,
        rgba(4,5,14,.12) 25%,
        rgba(4,5,14,.62) 47%,
        rgba(4,5,14,.95) 72%,
        rgba(4,5,14,.99) 100%
      ) !important;
  }


  /* CONTENT */

  .premium-hero__content {
    position: absolute !important;
    z-index: 5 !important;

    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;

    width: 100% !important;
    max-width: 100% !important;

    min-height: 0 !important;

    padding:
      18px 18px 26px !important;

    overflow: visible !important;
  }

  .premium-hero h1 {
    width: 100% !important;
    max-width: 100% !important;

    margin:
      7px 0 10px !important;

    font-size:
      clamp(30px, 8.5vw, 39px) !important;

    line-height:
      .99 !important;

    letter-spacing:
      -.04em !important;

    white-space: normal !important;

    overflow-wrap: normal !important;
    word-break: normal !important;
  }

  .premium-hero__description {
    width: 100% !important;
    max-width: 100% !important;

    margin-bottom:
      10px !important;

    font-size:
      13px !important;

    line-height:
      1.42 !important;

    display: -webkit-box;

    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;

    overflow: hidden;
  }

  .premium-hero__tags {
    display: flex !important;
    flex-wrap: wrap !important;

    gap: 6px !important;

    margin-bottom:
      9px !important;
  }

  .premium-hero__stats {
    display: flex !important;
    flex-wrap: wrap !important;

    gap:
      6px 13px !important;

    margin-bottom:
      12px !important;
  }

  .premium-hero__actions {
    display: grid !important;

    grid-template-columns:
      minmax(0, 1fr)
      auto
      46px !important;

    gap: 8px !important;

    width: 100% !important;
  }

  .premium-hero__actions .btn {
    min-width: 0 !important;

    height: 46px !important;

    padding:
      0 12px !important;

    font-size:
      12px !important;

    white-space:
      nowrap !important;
  }

  .premium-hero__heart {
    width: 46px !important;
    height: 46px !important;
  }


  /* dots теперь внутри Hero */

  .premium-hero__dots {
    position: absolute !important;

    z-index: 20 !important;

    left: auto !important;
    right: 16px !important;
    bottom: 16px !important;

    transform: none !important;
  }


  /* ==========================================================
     PROMOS — НЕ 3 ОГРОМНЫХ БЛОКА В СТОЛБИК.
     Одна карточка + кусок следующей.
     ========================================================== */

  .premium-promos {
    display: flex !important;

    grid-template-columns: none !important;

    width: 100% !important;
    max-width: 100% !important;

    gap: 10px !important;

    margin-top:
      10px !important;

    padding:
      0 0 5px !important;

    overflow-x: auto !important;
    overflow-y: hidden !important;

    scroll-snap-type:
      x mandatory !important;

    scrollbar-width:
      none !important;

    -webkit-overflow-scrolling:
      touch;
  }

  .premium-promos::-webkit-scrollbar {
    display: none !important;
  }

  .premium-promo {
    flex:
      0 0 88% !important;

    width:
      88% !important;

    min-width:
      88% !important;

    max-width:
      88% !important;

    min-height:
      178px !important;

    scroll-snap-align:
      start !important;

    border-radius:
      17px !important;
  }

  .premium-promo__body {
    min-height:
      178px !important;

    padding:
      17px !important;
  }

  .premium-promo strong {
    max-width:
      76% !important;

    font-size:
      23px !important;

    line-height:
      1.03 !important;
  }

  .premium-promo small {
    max-width:
      75% !important;
  }


  /* ==========================================================
     POPULAR SECTION
     ========================================================== */

  .premium-section {
    width: 100% !important;
    max-width: 100% !important;

    min-width: 0 !important;

    margin-top:
      20px !important;

    overflow: hidden !important;
  }

  .premium-section__head {
    display: flex !important;

    align-items: end !important;
    justify-content: space-between !important;

    width: 100% !important;

    gap: 10px !important;
  }

  .premium-section__head h2 {
    font-size:
      28px !important;

    line-height:
      1 !important;
  }

  .premium-section__head > a {
    flex:
      0 0 auto !important;

    font-size:
      12px !important;

    white-space:
      nowrap !important;
  }


  /* ==========================================================
     FILTERS
     ========================================================== */

  .premium-filter-row {
    display: flex !important;

    flex-wrap: nowrap !important;

    width: 100% !important;

    gap: 6px !important;

    overflow-x: auto !important;
    overflow-y: hidden !important;

    padding:
      2px 0 6px !important;

    scrollbar-width:
      none !important;

    -webkit-overflow-scrolling:
      touch;
  }

  .premium-filter-row::-webkit-scrollbar {
    display: none !important;
  }

  .premium-filter {
    flex:
      0 0 auto !important;

    white-space:
      nowrap !important;
  }


  /* ==========================================================
     BOOKS — MOBILE SWIPE
     ========================================================== */

  .premium-book-strip {
    width: 100% !important;
    max-width: 100% !important;

    min-width: 0 !important;

    overflow: hidden !important;
  }

  .premium-book-grid {
    display: flex !important;

    grid-template-columns:
      none !important;

    width: 100% !important;
    max-width: 100% !important;

    gap: 10px !important;

    overflow-x: auto !important;
    overflow-y: hidden !important;

    padding:
      2px 0 8px !important;

    scroll-snap-type:
      x mandatory !important;

    scrollbar-width:
      none !important;

    -webkit-overflow-scrolling:
      touch;
  }

  .premium-book-grid::-webkit-scrollbar {
    display: none !important;
  }

  .premium-book-card {
    flex:
      0 0 78% !important;

    width:
      78% !important;

    min-width:
      78% !important;

    max-width:
      78% !important;

    scroll-snap-align:
      start !important;
  }

  .premium-book-card__cover {
    min-height:
      245px !important;
  }

  .premium-book-strip__arrow {
    display:
      none !important;
  }


  /* ==========================================================
     FOOTER — КОМПАКТНЕЕ
     ========================================================== */

  footer {
    width: 100% !important;
    max-width: 100% !important;

    margin-top:
      18px !important;

    padding:
      24px 16px 18px !important;

    overflow: hidden !important;
  }

  footer .footer-grid {
    display: grid !important;

    grid-template-columns:
      repeat(2, minmax(0,1fr)) !important;

    gap:
      25px 18px !important;
  }

  footer h2 {
    font-size:
      22px !important;
  }

  footer h3,
  footer h4 {
    font-size:
      16px !important;
  }

  footer p,
  footer a,
  footer li {
    font-size:
      12.5px !important;

    line-height:
      1.42 !important;
  }


  /* ==========================================================
     GLOBAL SAFETY
     ========================================================== */

  img,
  svg,
  picture,
  video,
  canvas {
    max-width: 100%;
  }

}


/* narrow iPhones */

@media (max-width: 420px) {

  .home-premium {
    padding-left:
      10px !important;

    padding-right:
      10px !important;
  }

  .premium-hero {
    height:
      485px !important;

    min-height:
      485px !important;
  }

  .premium-hero h1 {
    font-size:
      clamp(29px, 8.2vw, 37px) !important;
  }

  .premium-promo {
    flex-basis:
      90% !important;

    width:
      90% !important;

    min-width:
      90% !important;

    max-width:
      90% !important;
  }

  .premium-book-card {
    flex-basis:
      82% !important;

    width:
      82% !important;

    min-width:
      82% !important;

    max-width:
      82% !important;
  }

}


/* RANOTEKA_MOBILE_FINAL_END */


/* RANOTEKA_HOME_FINISH_V1_START */


/* ==========================================================
   HERO CAROUSEL — SOFT FADE
   ========================================================== */

.premium-hero {
  position: relative;
}

.premium-hero__slide {
  transition:
    opacity .42s ease,
    visibility .42s ease;
}

.premium-hero__dots button,
.hero-dots button,
[data-hero-dot] {
  width: 8px;
  height: 8px;

  padding: 0;

  border: 0;
  border-radius: 999px;

  background:
    rgba(255,255,255,.32);

  transition:
    width .25s ease,
    background .25s ease,
    opacity .25s ease,
    box-shadow .25s ease;
}

.premium-hero__dots button.is-active,
.hero-dots button.is-active,
[data-hero-dot].is-active {
  width: 29px;

  background:
    linear-gradient(
      90deg,
      #ffffff,
      #eadcff
    );

  box-shadow:
    0 0 14px rgba(197,139,255,.32);
}


/* ==========================================================
   FOOTER ACCORDION — DESKTOP HIDDEN
   ========================================================== */

.mobile-footer-toggle {
  display: none;
}

.mobile-footer-content {
  display: contents;
}


/* ==========================================================
   MOBILE
   ========================================================== */

@media (max-width: 720px) {

  /*
    КРИТИЧЕСКИ ВАЖНО:
    все hero slides absolute.
    Поэтому они не создают огромных пустых блоков,
    но могут красиво fade-переключаться.
  */

  .premium-hero__slide {
    display: block !important;

    position: absolute !important;
    inset: 0 !important;

    width: 100% !important;
    height: 100% !important;

    opacity: 0 !important;
    visibility: hidden !important;

    pointer-events: none !important;
  }

  .premium-hero__slide.is-active {
    display: block !important;

    opacity: 1 !important;
    visibility: visible !important;

    pointer-events: auto !important;
  }

  /*
    Перебиваем прошлое правило
    display:none для неактивного slide.
  */

  .premium-hero__slide:not(.is-active) {
    display: block !important;
  }


  /* --------------------------------------------------------
     HERO DOTS
     -------------------------------------------------------- */

  .premium-hero__dots,
  .hero-dots {
    display: flex !important;

    align-items: center !important;

    gap: 7px !important;
  }

  .premium-hero__dots button,
  .hero-dots button,
  [data-hero-dot] {
    flex: 0 0 auto;

    width: 8px;
    height: 8px;

    min-width: 8px;

    cursor: pointer;
  }

  .premium-hero__dots button.is-active,
  .hero-dots button.is-active,
  [data-hero-dot].is-active {
    width: 29px;
  }


  /* --------------------------------------------------------
     CLEANER BOOK CARDS

     Временная картинка + название поверх картинки +
     название ещё раз снизу выглядели дублированием.
     На мобильном оставляем название в нормальной
     информационной части карточки.
     -------------------------------------------------------- */

  .premium-book-card__cover-title {
    display: none !important;
  }


  /* ========================================================
     MOBILE FOOTER
     ======================================================== */

  footer {
    padding:
      20px 16px 18px !important;
  }

  footer .footer-grid {
    display: block !important;
  }

  /*
    Первый блок с логотипом Ranoteka всегда открыт.
  */

  footer .footer-grid > :first-child {
    margin-bottom:
      17px !important;
  }


  .mobile-footer-group {
    position: relative;

    border-top:
      1px solid rgba(255,255,255,.075);

    padding:
      0 !important;

    margin:
      0 !important;
  }


  /*
    Старый heading остаётся нужен desktop,
    но на телефоне вместо него интерактивная строка.
  */

  .mobile-footer-group >
  h2,

  .mobile-footer-group >
  h3,

  .mobile-footer-group >
  h4 {
    display:
      none !important;
  }


  .mobile-footer-toggle {
    width: 100%;

    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 15px;

    padding:
      15px 2px;

    border: 0;

    color:
      #f4f1ff;

    background:
      transparent;

    font:
      inherit;

    font-size:
      15px;

    font-weight:
      800;

    text-align:
      left;

    cursor:
      pointer;
  }


  .mobile-footer-toggle__arrow {
    flex:
      0 0 auto;

    color:
      #c474ff;

    font-size:
      17px;

    transition:
      transform .22s ease;
  }


  .mobile-footer-group:not(.is-collapsed)
  .mobile-footer-toggle__arrow {
    transform:
      rotate(180deg);
  }


  .mobile-footer-content {
    display: block;

    overflow: hidden;

    padding:
      0 2px 15px;
  }


  .mobile-footer-group.is-collapsed
  .mobile-footer-content {
    display:
      none !important;
  }


  .mobile-footer-content a,
  .mobile-footer-content p,
  .mobile-footer-content li {
    font-size:
      13px !important;

    line-height:
      1.42 !important;
  }


  /*
    Нижняя юридическая строка
    не должна занимать пол-экрана.
  */

  footer > :last-child {
    font-size:
      10.5px !important;

    line-height:
      1.4 !important;
  }

}


/* RANOTEKA_HOME_FINISH_V1_END */


/* RANOTEKA_HERO_PREMIUM_MOTION_V2_START */


/* ============================================================
   HERO LAYERS
   ============================================================ */

.premium-hero {
  isolation: isolate;
}

.premium-hero__slide {
  z-index: 1;

  opacity: 0;
  visibility: hidden;

  transition:
    opacity .72s cubic-bezier(.22,.61,.36,1),
    visibility 0s linear .72s !important;

  will-change: opacity;
}

.premium-hero__slide.is-active {
  z-index: 3;

  opacity: 1 !important;
  visibility: visible !important;

  transition:
    opacity .72s cubic-bezier(.22,.61,.36,1),
    visibility 0s linear 0s !important;
}


/*
   Старый слайд остаётся видимым во время fade-out.
   Поэтому больше нет жёсткого "щёлк".
*/

.premium-hero__slide.is-leaving {
  z-index: 2;

  opacity: 0 !important;
  visibility: visible !important;

  pointer-events: none !important;

  transition:
    opacity .72s cubic-bezier(.22,.61,.36,1) !important;
}


/* ============================================================
   ART MOTION
   Очень лёгкий cinematic drift.
   ============================================================ */

.premium-hero__slide .premium-hero__art {
  transform:
    scale(1.018);

  transition:
    transform 4.4s cubic-bezier(.20,.65,.30,1),
    filter .72s ease !important;

  will-change:
    transform;
}

.premium-hero__slide.is-active .premium-hero__art {
  transform:
    scale(1.045) translate3d(-.35%,0,0);
}

.premium-hero__slide.is-leaving .premium-hero__art {
  transform:
    scale(1.055) translate3d(-.65%,0,0);

  filter:
    brightness(.78);
}


/* ============================================================
   SHADE CROSSFADE
   ============================================================ */

.premium-hero__shade {
  transition:
    opacity .72s ease !important;
}

.premium-hero__slide.is-leaving
.premium-hero__shade {
  opacity:
    .82;
}


/* ============================================================
   CONTENT

   Никаких крупных вылетов текста.
   Только 8px + fade.
   ============================================================ */

.premium-hero__content {
  will-change:
    transform,
    opacity;
}

.premium-hero__slide.is-entering
.premium-hero__content {
  animation:
    ranotekaHeroContentIn
    .72s
    cubic-bezier(.22,.61,.36,1)
    both;
}

@keyframes ranotekaHeroContentIn {

  0% {
    opacity: 0;
    transform:
      translate3d(0,8px,0);
  }

  100% {
    opacity: 1;
    transform:
      translate3d(0,0,0);
  }

}


/* ============================================================
   DOTS
   ============================================================ */

.premium-hero__dots,
.hero-dots,
.top-hero__dots {
  display: flex;

  align-items: center;

  gap: 7px;
}


/*
   Неактивные точки.
*/

.premium-hero__dots button,
.hero-dots button,
.top-hero__dots button,
[data-hero-dot] {
  position: relative;

  overflow: hidden;

  width: 8px;
  min-width: 8px;
  height: 8px;

  padding: 0;

  border: 0;
  border-radius: 999px;

  background:
    rgba(255,255,255,.28);

  box-shadow:
    none;

  transition:
    width .28s cubic-bezier(.22,.61,.36,1),
    background .28s ease,
    opacity .28s ease !important;
}


/*
   Текущий слайд становится капсулой.
   Тёмное полупрозрачное основание.
*/

.premium-hero__dots button.is-active,
.hero-dots button.is-active,
.top-hero__dots button.is-active,
[data-hero-dot].is-active {
  width: 38px;
  min-width: 38px;

  background:
    rgba(255,255,255,.19);

  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.10);
}


/*
   Вот сам ПРОГРЕСС.

   Полоска реально идёт слева направо ровно 4 секунды.
*/

.premium-hero__dots button.is-active::after,
.hero-dots button.is-active::after,
.top-hero__dots button.is-active::after,
[data-hero-dot].is-active::after {
  content: "";

  position: absolute;

  inset: 0;

  border-radius: inherit;

  background:
    linear-gradient(
      90deg,
      rgba(255,255,255,.98),
      rgba(238,221,255,.98)
    );

  transform:
    scaleX(0);

  transform-origin:
    left center;

  animation:
    ranotekaHeroProgress
    4s
    linear
    forwards;
}

@keyframes ranotekaHeroProgress {

  from {
    transform:
      scaleX(0);
  }

  to {
    transform:
      scaleX(1);
  }

}


/*
   Когда пользователь держит мышь над Hero —
   timer у нас останавливается.
   Вместе с ним замораживаем и полоску.
*/

.premium-hero.is-autoplay-paused
.premium-hero__dots
button.is-active::after,

.premium-hero.is-autoplay-paused
[data-hero-dot].is-active::after {
  animation-play-state:
    paused;
}


/* ============================================================
   MOBILE
   ============================================================ */

@media (max-width: 720px) {

  /*
    На телефоне transition чуть быстрее,
    чтобы интерфейс не чувствовался вязким.
  */

  .premium-hero__slide {
    transition:
      opacity .58s cubic-bezier(.22,.61,.36,1),
      visibility 0s linear .58s !important;
  }

  .premium-hero__slide.is-active {
    transition:
      opacity .58s cubic-bezier(.22,.61,.36,1),
      visibility 0s linear 0s !important;
  }

  .premium-hero__slide.is-leaving {
    transition:
      opacity .58s cubic-bezier(.22,.61,.36,1) !important;
  }

  .premium-hero__slide.is-entering
  .premium-hero__content {
    animation-duration:
      .58s;
  }

  /*
    Art двигаем ещё меньше —
    на маленьком экране нужен спокойный фон.
  */

  .premium-hero__slide .premium-hero__art {
    transform:
      scale(1.01);
  }

  .premium-hero__slide.is-active .premium-hero__art {
    transform:
      scale(1.027) translate3d(-.2%,0,0);
  }

  .premium-hero__slide.is-leaving .premium-hero__art {
    transform:
      scale(1.035) translate3d(-.35%,0,0);
  }

}


/* ============================================================
   REDUCED MOTION
   ============================================================ */

@media (prefers-reduced-motion: reduce) {

  .premium-hero__slide,
  .premium-hero__art,
  .premium-hero__content {
    animation:
      none !important;

    transition:
      none !important;

    transform:
      none !important;
  }

  .premium-hero__dots button.is-active::after,
  .hero-dots button.is-active::after,
  .top-hero__dots button.is-active::after,
  [data-hero-dot].is-active::after {
    animation:
      none !important;

    transform:
      scaleX(1);
  }

}


/* RANOTEKA_HERO_PREMIUM_MOTION_V2_END */










/* RANOTEKA_RANIKO_PREMIUM_FINAL_START */


/* ============================================================
   УБИРАЕМ СТАРУЮ РАНИКО ИЗ HEADER
   ============================================================ */

.header-raniko-real,
.header-raniko-original,
.raniko-nav,
.raniko-original-nav {
  display: none !important;
}


/* ============================================================
   RANIKO — PREMIUM FLOATING GUIDE
   ============================================================ */

.raniko-premium-guide {
  position: fixed;

  z-index: 980;

  right: 22px;
  bottom: 22px;

  width: 420px;

  max-width:
    calc(100vw - 32px);

  opacity: 0;

  transform:
    translate3d(22px,14px,0)
    scale(.965);

  pointer-events: none;

  transition:
    opacity .42s cubic-bezier(.22,.61,.36,1),
    transform .42s cubic-bezier(.22,.61,.36,1);
}


.raniko-premium-guide.is-visible {
  opacity: 1;

  transform:
    translate3d(0,0,0)
    scale(1);
}


.raniko-premium-guide.is-leaving {
  opacity: 0;

  transform:
    translate3d(18px,10px,0)
    scale(.97);
}


/* ============================================================
   CARD
   ============================================================ */

.raniko-premium-guide__card {
  position: relative;

  min-height: 178px;

  display: grid;

  grid-template-columns:
    minmax(0,1fr) 150px;

  align-items: stretch;

  overflow: visible;

  border:
    1px solid rgba(205,122,255,.72);

  border-radius:
    20px;

  background:
    linear-gradient(
      135deg,
      rgba(17,12,42,.985) 0%,
      rgba(16,12,41,.98) 48%,
      rgba(42,14,72,.965) 100%
    );

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.055),
    0 0 0 1px rgba(145,64,255,.08),
    0 22px 55px rgba(0,0,0,.48),
    0 0 34px rgba(174,71,255,.23);

  pointer-events: auto;

  isolation: isolate;

  transition:
    border-color .2s ease,
    box-shadow .2s ease,
    transform .2s ease;
}


.raniko-premium-guide__card:hover {
  border-color:
    rgba(220,151,255,.90);

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.07),
    0 0 0 1px rgba(160,76,255,.11),
    0 25px 62px rgba(0,0,0,.50),
    0 0 42px rgba(182,80,255,.31);
}


/* мягкое свечение в левом верхнем углу */

.raniko-premium-guide__card::before {
  content: "";

  position: absolute;

  z-index: -1;

  top: -20px;
  left: -18px;

  width: 190px;
  height: 120px;

  border-radius: 50%;

  background:
    radial-gradient(
      circle,
      rgba(193,87,255,.22),
      transparent 68%
    );

  filter: blur(12px);

  pointer-events: none;
}


/* ============================================================
   COPY
   ============================================================ */

.raniko-premium-guide__copy {
  position: relative;

  z-index: 10;

  padding:
    21px 4px 18px 20px;

  min-width: 0;
}


.raniko-premium-guide__eyebrow {
  max-width: 215px;

  margin-bottom: 9px;

  color:
    #d98dff;

  font-size:
    10px;

  line-height:
    1.28;

  font-weight:
    900;

  letter-spacing:
    .105em;

  text-transform:
    uppercase;

  text-shadow:
    0 0 16px rgba(204,99,255,.34);
}


.raniko-premium-guide__text {
  max-width: 225px;

  margin:
    0 0 14px;

  color:
    rgba(249,246,255,.92);

  font-size:
    12px;

  line-height:
    1.46;

  font-weight:
    500;
}


/* ============================================================
   CTA
   ============================================================ */

.raniko-premium-guide__cta {
  min-height: 39px;

  display: inline-flex;

  align-items: center;
  justify-content: center;

  gap: 8px;

  padding:
    0 15px;

  border:
    1px solid rgba(255,255,255,.08);

  border-radius:
    11px;

  color:
    #fff;

  background:
    linear-gradient(
      110deg,
      #7c36ff 0%,
      #9e38ff 48%,
      #cf43ef 100%
    );

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.14),
    0 8px 22px rgba(137,47,255,.32),
    0 0 20px rgba(188,62,255,.14);

  font-size:
    11px;

  font-weight:
    850;

  text-decoration:
    none;

  white-space:
    nowrap;

  transition:
    transform .18s ease,
    box-shadow .18s ease,
    filter .18s ease;
}


.raniko-premium-guide__cta span {
  transition:
    transform .18s ease;
}


.raniko-premium-guide__cta:hover {
  transform:
    translateY(-1px);

  filter:
    brightness(1.07);

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.17),
    0 11px 28px rgba(137,47,255,.42),
    0 0 25px rgba(194,73,255,.20);
}


.raniko-premium-guide__cta:hover span {
  transform:
    translateX(3px);
}


/* ============================================================
   CLOSE
   ============================================================ */

.raniko-premium-guide__close {
  position: absolute;

  z-index: 30;

  top: 9px;
  right: 9px;

  width: 25px;
  height: 25px;

  display: grid;

  place-items: center;

  padding: 0;

  border:
    1px solid rgba(221,172,255,.30);

  border-radius:
    8px;

  color:
    rgba(249,240,255,.82);

  background:
    rgba(7,6,20,.60);

  box-shadow:
    0 5px 14px rgba(0,0,0,.25);

  font-size:
    16px;

  line-height: 1;

  cursor: pointer;

  transition:
    background .18s ease,
    border-color .18s ease,
    transform .18s ease;
}


.raniko-premium-guide__close:hover {
  transform:
    rotate(4deg) scale(1.06);

  border-color:
    rgba(226,167,255,.55);

  background:
    rgba(31,17,54,.88);
}


/* ============================================================
   CHARACTER
   ============================================================ */

.raniko-premium-guide__character {
  position: relative;

  z-index: 7;

  align-self: stretch;

  min-height: 178px;

  overflow: visible;

  pointer-events: none;
}


/*
  ВАЖНО:
  оригинальная Ранико смотрела в другую сторону.

  Ставим её СПРАВА и зеркалим:
  теперь жест направлен внутрь карточки / к CTA.
*/

.raniko-premium-guide__character img {
  position: absolute;

  z-index: 8;

  right: -7px;
  bottom: -2px;

  width: 171px;
  height: 187px;

  max-width: none;

  object-fit: contain;
  object-position: center bottom;

  transform:
    scaleX(-1);

  transform-origin:
    center bottom;

  filter:
    drop-shadow(
      0 11px 13px rgba(0,0,0,.36)
    );

  animation:
    ranikoPremiumFloat
    3.3s
    ease-in-out
    infinite;
}


@keyframes ranikoPremiumFloat {

  0%,
  100% {
    transform:
      scaleX(-1)
      translate3d(0,0,0)
      rotate(.15deg);
  }

  50% {
    transform:
      scaleX(-1)
      translate3d(0,-6px,0)
      rotate(-.25deg);
  }

}


/* ============================================================
   AURA
   ============================================================ */

.raniko-premium-guide__aura {
  position: absolute;

  z-index: 1;

  right: -4px;
  bottom: -7px;

  width: 160px;
  height: 160px;

  border-radius: 50%;

  background:
    radial-gradient(
      circle,
      rgba(192,94,255,.38) 0%,
      rgba(128,47,222,.18) 38%,
      rgba(95,30,180,.06) 58%,
      transparent 72%
    );

  filter:
    blur(3px);

  animation:
    ranikoPremiumAura
    2.8s
    ease-in-out
    infinite;
}


@keyframes ranikoPremiumAura {

  0%,
  100% {
    opacity: .62;
    transform: scale(.93);
  }

  50% {
    opacity: 1;
    transform: scale(1.07);
  }

}


/* ============================================================
   SPARKS
   ============================================================ */

.raniko-premium-guide__spark,
.raniko-premium-guide__heart {
  position: absolute;

  z-index: 12;

  pointer-events: none;

  color:
    #e99aff;

  text-shadow:
    0 0 7px #b64cff,
    0 0 15px rgba(200,78,255,.85);

  animation:
    ranikoPremiumSpark
    2.5s
    ease-in-out
    infinite;
}


.raniko-premium-guide__spark--1 {
  right: 10px;
  top: 9px;

  font-size: 18px;
}


.raniko-premium-guide__spark--2 {
  right: 41px;
  top: -8px;

  font-size: 15px;

  animation-delay:
    .55s;
}


.raniko-premium-guide__spark--3 {
  right: -7px;
  top: 45px;

  font-size: 12px;

  animation-delay:
    1.05s;
}


.raniko-premium-guide__heart {
  left: -3px;
  top: 60px;

  font-size: 18px;

  color:
    #c95aff;

  animation-delay:
    .30s;
}


@keyframes ranikoPremiumSpark {

  0%,
  100% {
    opacity: .28;

    transform:
      translate3d(0,5px,0)
      scale(.78)
      rotate(-6deg);
  }

  50% {
    opacity: 1;

    transform:
      translate3d(1px,-5px,0)
      scale(1.12)
      rotate(5deg);
  }

}


/* ============================================================
   FALLBACK IF IMAGE IS MISSING
   ============================================================ */

.raniko-premium-guide.is-image-missing
.raniko-premium-guide__character {
  display: none;
}


.raniko-premium-guide.is-image-missing
.raniko-premium-guide__card {
  grid-template-columns:
    1fr;
}


.raniko-premium-guide.is-image-missing
.raniko-premium-guide__copy {
  padding-right:
    20px;
}


/* ============================================================
   MOBILE
   ============================================================ */

@media (max-width: 720px) {

  .raniko-premium-guide {
    right:
      10px;

    bottom:
      calc(
        82px +
        env(safe-area-inset-bottom, 0px)
      );

    width:
      min(
        350px,
        calc(100vw - 20px)
      );
  }


  .raniko-premium-guide__card {
    min-height:
      145px;

    grid-template-columns:
      minmax(0,1fr) 105px;

    border-radius:
      18px;
  }


  .raniko-premium-guide__copy {
    padding:
      16px 0 14px 16px;
  }


  .raniko-premium-guide__eyebrow {
    max-width:
      190px;

    margin-bottom:
      6px;

    font-size:
      8.8px;

    line-height:
      1.25;
  }


  .raniko-premium-guide__text {
    max-width:
      205px;

    margin-bottom:
      10px;

    font-size:
      10.5px;

    line-height:
      1.4;
  }


  .raniko-premium-guide__cta {
    min-height:
      35px;

    padding:
      0 12px;

    border-radius:
      10px;

    font-size:
      10px;
  }


  .raniko-premium-guide__character {
    min-height:
      145px;
  }


  .raniko-premium-guide__character img {
    right:
      -8px;

    bottom:
      -1px;

    width:
      121px;

    height:
      151px;
  }


  .raniko-premium-guide__aura {
    right:
      -9px;

    bottom:
      -4px;

    width:
      118px;

    height:
      118px;
  }


  .raniko-premium-guide__heart {
    left:
      -2px;

    top:
      47px;

    font-size:
      14px;
  }


  .raniko-premium-guide__spark--1 {
    right:
      5px;

    top:
      9px;
  }


  .raniko-premium-guide__spark--2 {
    right:
      30px;

    top:
      -4px;
  }

}


/* Очень узкий iPhone */

@media (max-width: 390px) {

  .raniko-premium-guide {
    right:
      7px;

    width:
      calc(100vw - 14px);
  }


  .raniko-premium-guide__card {
    grid-template-columns:
      minmax(0,1fr) 92px;
  }


  .raniko-premium-guide__character img {
    width:
      106px;
  }


  .raniko-premium-guide__text {
    font-size:
      10px;
  }

}


/* ============================================================
   ACCESSIBILITY
   ============================================================ */

@media (prefers-reduced-motion: reduce) {

  .raniko-premium-guide,
  .raniko-premium-guide__character img,
  .raniko-premium-guide__aura,
  .raniko-premium-guide__spark,
  .raniko-premium-guide__heart {
    animation:
      none !important;

    transition:
      none !important;
  }

}


/* RANOTEKA_RANIKO_PREMIUM_FINAL_END */


/* RANOTEKA_RANIKO_PREMIUM_POLISH_V2_START */


/* ============================================================
   КОМПОЗИЦИЯ
   ============================================================ */

.raniko-premium-guide {
  width: 456px !important;

  right: 24px !important;
  bottom: 24px !important;
}


.raniko-premium-guide__card {
  min-height: 188px !important;

  grid-template-columns:
    minmax(0, 1fr) 158px !important;

  border-radius: 21px !important;

  background:
    linear-gradient(
      132deg,
      rgba(13,10,36,.99) 0%,
      rgba(20,12,48,.985) 52%,
      rgba(50,16,78,.97) 100%
    ) !important;

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.07),
    0 0 0 1px rgba(171,85,255,.10),
    0 22px 60px rgba(0,0,0,.50),
    0 0 38px rgba(172,72,255,.25) !important;
}


/*
  Очень лёгкая "звёздная пыль".
  Она не должна выглядеть как новогодняя гирлянда.
*/

.raniko-premium-guide__card::after {
  content: "✦   ·   ✧";

  position: absolute;

  z-index: 1;

  right: 15px;
  top: 8px;

  color:
    rgba(228,173,255,.47);

  font-size:
    11px;

  letter-spacing:
    8px;

  pointer-events:
    none;

  text-shadow:
    0 0 10px rgba(198,91,255,.60);

  animation:
    ranikoTinyStarsV2
    3.2s
    ease-in-out
    infinite;
}


@keyframes ranikoTinyStarsV2 {
  0%,
  100% {
    opacity: .35;
  }

  50% {
    opacity: .85;
  }
}


/* ============================================================
   ТЕКСТ
   ============================================================ */

.raniko-premium-guide__copy {
  padding:
    20px 4px 18px 20px !important;
}


.raniko-premium-guide__eyebrow {
  max-width: 235px !important;

  margin-bottom: 9px !important;

  color:
    #df91ff !important;

  font-size:
    9.5px !important;

  letter-spacing:
    .11em !important;
}


.raniko-premium-guide__text {
  max-width: 254px !important;

  margin-bottom:
    13px !important;

  color:
    rgba(248,245,255,.90) !important;

  font-size:
    11.5px !important;

  line-height:
    1.43 !important;
}


.raniko-premium-guide__text strong {
  color:
    #ffffff;

  font-weight:
    850;
}


.raniko-premium-guide__soft-line {
  display: block;

  margin-top: 6px;

  color:
    rgba(230,202,255,.90);

  font-size:
    10.5px;

  line-height:
    1.35;
}


/* ============================================================
   КНОПКА
   ============================================================ */

.raniko-premium-guide__cta {
  position: relative;

  z-index: 20;

  min-height:
    38px !important;

  padding:
    0 15px !important;

  border-radius:
    11px !important;

  background:
    linear-gradient(
      110deg,
      #7531ff 0%,
      #9636ff 48%,
      #ca46ef 100%
    ) !important;

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.16),
    0 8px 24px rgba(136,45,255,.34),
    0 0 20px rgba(190,66,255,.18) !important;
}


/* ============================================================
   РАНИКО

   У текущего PNG исходное направление как раз нужное.
   Поэтому УБИРАЕМ прошлое зеркалирование.
   Теперь она смотрит/указывает ВНУТРЬ карточки.
   ============================================================ */

.raniko-premium-guide__character {
  min-height:
    188px !important;
}


.raniko-premium-guide__character img {
  right:
    -3px !important;

  bottom:
    -3px !important;

  width:
    174px !important;

  height:
    194px !important;

  transform:
    none !important;

  animation:
    ranikoPremiumFloatV2
    3.4s
    ease-in-out
    infinite !important;

  filter:
    drop-shadow(
      0 12px 16px rgba(0,0,0,.38)
    ) !important;
}


@keyframes ranikoPremiumFloatV2 {

  0%,
  100% {
    transform:
      translate3d(0,0,0)
      rotate(-.15deg);
  }

  50% {
    transform:
      translate3d(0,-6px,0)
      rotate(.22deg);
  }

}


/* ============================================================
   СВЕЧЕНИЕ ВОКРУГ РАНИКО
   ============================================================ */

.raniko-premium-guide__aura {
  right:
    -8px !important;

  bottom:
    -7px !important;

  width:
    174px !important;

  height:
    174px !important;

  background:
    radial-gradient(
      circle,
      rgba(213,111,255,.38) 0%,
      rgba(142,55,234,.20) 37%,
      rgba(94,35,184,.07) 58%,
      transparent 73%
    ) !important;
}


/* немного переносим сердечко к жесту */

.raniko-premium-guide__heart {
  left:
    -7px !important;

  top:
    62px !important;

  color:
    #d65cff !important;
}


/* ============================================================
   MOBILE
   ============================================================ */

@media (max-width: 720px) {

  .raniko-premium-guide {
    width:
      min(
        342px,
        calc(100vw - 18px)
      ) !important;

    right:
      9px !important;

    bottom:
      calc(
        78px +
        env(safe-area-inset-bottom, 0px)
      ) !important;
  }


  .raniko-premium-guide__card {
    min-height:
      153px !important;

    grid-template-columns:
      minmax(0,1fr) 100px !important;

    border-radius:
      17px !important;
  }


  .raniko-premium-guide__copy {
    padding:
      15px 0 14px 15px !important;
  }


  .raniko-premium-guide__eyebrow {
    max-width:
      178px !important;

    font-size:
      8px !important;

    margin-bottom:
      6px !important;
  }


  .raniko-premium-guide__text {
    max-width:
      205px !important;

    margin-bottom:
      9px !important;

    font-size:
      9.8px !important;

    line-height:
      1.36 !important;
  }


  .raniko-premium-guide__soft-line {
    margin-top:
      4px;

    font-size:
      9px;
  }


  .raniko-premium-guide__cta {
    min-height:
      34px !important;

    padding:
      0 11px !important;

    font-size:
      9.5px !important;
  }


  .raniko-premium-guide__character {
    min-height:
      153px !important;
  }


  .raniko-premium-guide__character img {
    right:
      -5px !important;

    bottom:
      -2px !important;

    width:
      119px !important;

    height:
      155px !important;
  }


  .raniko-premium-guide__aura {
    width:
      118px !important;

    height:
      118px !important;
  }

}


/* маленький iPhone */

@media (max-width: 390px) {

  .raniko-premium-guide {
    width:
      calc(100vw - 14px) !important;

    right:
      7px !important;
  }


  .raniko-premium-guide__card {
    grid-template-columns:
      minmax(0,1fr) 89px !important;
  }


  .raniko-premium-guide__text {
    max-width:
      195px !important;

    font-size:
      9.4px !important;
  }


  .raniko-premium-guide__character img {
    width:
      106px !important;
  }

}


/* RANOTEKA_RANIKO_PREMIUM_POLISH_V2_END */













/* RANIKO_FINAL_V6_START */

/* =========================================================
   FINAL RANIKO V6
   ========================================================= */

.raniko-premium-guide.raniko-v6 {
  position: fixed !important;
  z-index: 9998 !important;

  right: 18px !important;
  bottom: 18px !important;
  left: auto !important;
  top: auto !important;

  width: 438px !important;
  max-width: calc(100vw - 28px) !important;

  margin: 0 !important;

  opacity: 1 !important;

  transform:
    translate3d(0,0,0) !important;

  filter:
    drop-shadow(0 22px 45px rgba(0,0,0,.48)) !important;
}


.raniko-v6 .raniko-premium-guide__card {
  position: relative !important;

  min-height: 196px !important;

  display: grid !important;

  grid-template-columns:
    minmax(0,1fr) 164px !important;

  align-items: stretch !important;

  overflow: hidden !important;

  border:
    1px solid rgba(205,124,255,.76) !important;

  border-radius:
    20px !important;

  background:
    radial-gradient(
      circle at 84% 46%,
      rgba(124,42,204,.23),
      transparent 39%
    ),
    linear-gradient(
      135deg,
      rgba(15,10,38,.99),
      rgba(22,12,49,.985) 55%,
      rgba(42,15,71,.98)
    ) !important;

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.06),
    0 0 0 1px rgba(154,70,255,.10),
    0 0 36px rgba(166,65,255,.23),
    0 20px 55px rgba(0,0,0,.46) !important;

  animation:
    ranikoV6CardBreath
    6.8s
    ease-in-out
    infinite !important;
}


@keyframes ranikoV6CardBreath {
  0%,100% {
    box-shadow:
      inset 0 1px 0 rgba(255,255,255,.06),
      0 0 0 1px rgba(154,70,255,.10),
      0 0 28px rgba(166,65,255,.18),
      0 20px 55px rgba(0,0,0,.46);
  }

  50% {
    box-shadow:
      inset 0 1px 0 rgba(255,255,255,.08),
      0 0 0 1px rgba(190,102,255,.16),
      0 0 46px rgba(188,76,255,.32),
      0 22px 60px rgba(0,0,0,.48);
  }
}


/* ================= TEXT ================= */

.raniko-v6 .raniko-premium-guide__copy {
  position: relative !important;
  z-index: 10 !important;

  padding:
    19px 4px 17px 19px !important;
}


.raniko-v6 .raniko-premium-guide__eyebrow {
  max-width: 225px !important;

  margin-bottom:
    8px !important;

  color:
    #df92ff !important;

  font-size:
    9px !important;

  line-height:
    1.25 !important;

  letter-spacing:
    .11em !important;

  text-shadow:
    0 0 14px rgba(207,98,255,.32);
}


.raniko-v6 .raniko-premium-guide__text {
  max-width:
    245px !important;

  margin:
    0 0 12px !important;

  color:
    rgba(248,245,255,.94) !important;

  font-size:
    11px !important;

  line-height:
    1.42 !important;

  font-weight:
    520 !important;
}


.raniko-v6 .raniko-premium-guide__text strong {
  color:
    #fff !important;

  font-weight:
    850 !important;
}


.raniko-v6__soft {
  display:
    block;

  margin-top:
    6px;

  color:
    rgba(232,204,255,.92);

  font-size:
    10px;

  line-height:
    1.35;
}


/* ================= NEW RANIKO ================= */

.raniko-v6 .raniko-premium-guide__character {
  position:
    relative !important;

  z-index:
    3 !important;

  min-height:
    196px !important;

  overflow:
    visible !important;

  animation:
    ranikoV6CharacterContainer
    5.2s
    cubic-bezier(.45,.05,.22,1)
    infinite !important;

  will-change:
    transform;
}


@keyframes ranikoV6CharacterContainer {
  0%,100% {
    transform:
      translate3d(0,0,0);
  }

  25% {
    transform:
      translate3d(-2px,-3px,0);
  }

  50% {
    transform:
      translate3d(1px,-7px,0);
  }

  75% {
    transform:
      translate3d(-3px,-4px,0);
  }
}


.raniko-v6 .raniko-premium-guide__character img {
  position:
    absolute !important;

  z-index:
    4 !important;

  right:
    -7px !important;

  bottom:
    -22px !important;

  width:
    157px !important;

  height:
    auto !important;

  max-width:
    none !important;

  object-fit:
    contain !important;

  opacity:
    .98 !important;

  transform-origin:
    45% 62% !important;

  mix-blend-mode:
    screen;

  -webkit-mask-image:
    linear-gradient(
      to right,
      transparent 0%,
      rgba(0,0,0,.50) 7%,
      #000 19%,
      #000 100%
    );

  mask-image:
    linear-gradient(
      to right,
      transparent 0%,
      rgba(0,0,0,.50) 7%,
      #000 19%,
      #000 100%
    );

  filter:
    drop-shadow(
      0 12px 18px rgba(0,0,0,.30)
    ) !important;

  animation:
    ranikoV6Alive
    4.4s
    cubic-bezier(.42,0,.23,1)
    infinite !important;

  will-change:
    transform;
}


@keyframes ranikoV6Alive {
  0%,100% {
    transform:
      translate3d(0,0,0)
      rotate(0deg)
      scale(1);
  }

  18% {
    transform:
      translate3d(-1px,-3px,0)
      rotate(-.35deg)
      scale(1.004);
  }

  38% {
    transform:
      translate3d(-4px,-7px,0)
      rotate(-.8deg)
      scale(1.009);
  }

  55% {
    transform:
      translate3d(-6px,-9px,0)
      rotate(-1.1deg)
      scale(1.013);
  }

  72% {
    transform:
      translate3d(-2px,-5px,0)
      rotate(-.40deg)
      scale(1.007);
  }

  88% {
    transform:
      translate3d(1px,-2px,0)
      rotate(.22deg)
      scale(1.002);
  }
}


/* ================= HAND PULSE ================= */

.raniko-v6-hand {
  position:
    absolute;

  z-index:
    12;

  left:
    1px;

  top:
    105px;

  width:
    12px;

  height:
    12px;

  border-radius:
    999px;

  background:
    radial-gradient(
      circle,
      #fff 0%,
      #e4a5ff 25%,
      #c65cff 52%,
      transparent 73%
    );

  box-shadow:
    0 0 10px rgba(230,160,255,.95),
    0 0 22px rgba(190,73,255,.72);

  pointer-events:
    none;

  animation:
    ranikoV6HandPulse
    1.65s
    ease-in-out
    infinite;
}


@keyframes ranikoV6HandPulse {
  0%,100% {
    opacity:
      .38;

    transform:
      scale(.58);
  }

  50% {
    opacity:
      1;

    transform:
      scale(1.25);
  }
}


/* ================= SPARKS FROM HAND TO CTA ================= */

.raniko-v6-fx {
  position:
    absolute;

  z-index:
    9;

  inset:
    0;

  pointer-events:
    none;

  overflow:
    hidden;
}


.raniko-v6-spark {
  position:
    absolute;

  left:
    calc(100% - 169px);

  top:
    111px;

  width:
    5px;

  height:
    5px;

  border-radius:
    50%;

  opacity:
    0;

  background:
    radial-gradient(
      circle,
      #fff 0%,
      #edc7ff 28%,
      #ca67ff 58%,
      transparent 78%
    );

  box-shadow:
    0 0 8px rgba(231,169,255,.95),
    0 0 16px rgba(182,75,255,.65);

  animation:
    ranikoV6SparkFly
    2.45s
    cubic-bezier(.20,.62,.34,1)
    infinite;
}


.raniko-v6-spark.s1 {
  --tx: -123px;
  --ty: 38px;
  animation-delay: 0s;
}

.raniko-v6-spark.s2 {
  --tx: -143px;
  --ty: 48px;
  animation-delay: .38s;
  width: 7px;
  height: 7px;
}

.raniko-v6-spark.s3 {
  --tx: -105px;
  --ty: 26px;
  animation-delay: .76s;
  width: 4px;
  height: 4px;
}

.raniko-v6-spark.s4 {
  --tx: -156px;
  --ty: 55px;
  animation-delay: 1.14s;
}

.raniko-v6-spark.s5 {
  --tx: -132px;
  --ty: 33px;
  animation-delay: 1.52s;
  width: 4px;
  height: 4px;
}

.raniko-v6-spark.s6 {
  --tx: -169px;
  --ty: 45px;
  animation-delay: 1.90s;
  width: 6px;
  height: 6px;
}


@keyframes ranikoV6SparkFly {
  0% {
    opacity:
      0;

    transform:
      translate3d(0,0,0)
      scale(.25);
  }

  12% {
    opacity:
      1;
  }

  52% {
    opacity:
      .88;
  }

  100% {
    opacity:
      0;

    transform:
      translate3d(
        var(--tx),
        var(--ty),
        0
      )
      scale(1.15);
  }
}


/* ================= CTA ================= */

.raniko-v6 .raniko-premium-guide__cta {
  position:
    relative !important;

  z-index:
    14 !important;

  min-height:
    38px !important;

  display:
    inline-flex !important;

  align-items:
    center !important;

  gap:
    7px !important;

  padding:
    0 32px 0 14px !important;

  overflow:
    visible !important;

  border-radius:
    11px !important;

  background:
    linear-gradient(
      110deg,
      #7932ff,
      #9e3cff 52%,
      #d143ea
    ) !important;

  box-shadow:
    0 9px 25px rgba(139,49,255,.40),
    0 0 24px rgba(205,78,255,.22) !important;

  animation:
    ranikoV6CtaBreath
    2.7s
    ease-in-out
    infinite !important;
}


@keyframes ranikoV6CtaBreath {
  0%,100% {
    transform:
      translateY(0)
      scale(1);
  }

  50% {
    transform:
      translateY(-1px)
      scale(1.012);
  }
}


.raniko-v6-target {
  position:
    absolute;

  z-index:
    20;

  right:
    10px;

  top:
    50%;

  width:
    9px;

  height:
    9px;

  border:
    1px solid rgba(255,255,255,.90);

  border-radius:
    50%;

  transform:
    translateY(-50%);

  pointer-events:
    none;

  animation:
    ranikoV6Target
    1.8s
    ease-out
    infinite;
}


.raniko-v6-target::after {
  content:
    "";

  position:
    absolute;

  inset:
    -1px;

  border:
    1px solid rgba(237,188,255,.75);

  border-radius:
    50%;

  animation:
    ranikoV6TargetRing
    1.8s
    ease-out
    infinite;
}


@keyframes ranikoV6Target {
  0%,100% {
    opacity:
      .95;
  }

  65% {
    opacity:
      .55;
  }
}


@keyframes ranikoV6TargetRing {
  0% {
    opacity:
      .9;

    transform:
      scale(.8);
  }

  100% {
    opacity:
      0;

    transform:
      scale(2.6);
  }
}


/* ================= CLOSE ================= */

.raniko-v6 .raniko-premium-guide__close {
  z-index:
    30 !important;

  top:
    8px !important;

  right:
    8px !important;
}


/* =========================================================
   PHONE — REAL BOTTOM-RIGHT COMPACT POSITION
   ========================================================= */

@media (max-width: 720px) {

  .raniko-premium-guide.raniko-v6 {
    position:
      fixed !important;

    right:
      8px !important;

    bottom:
      calc(
        72px +
        env(safe-area-inset-bottom, 0px)
      ) !important;

    left:
      auto !important;

    top:
      auto !important;

    width:
      min(
        334px,
        calc(100vw - 16px)
      ) !important;

    max-width:
      none !important;

    margin:
      0 !important;

    transform:
      none !important;
  }


  .raniko-v6 .raniko-premium-guide__card {
    min-height:
      168px !important;

    grid-template-columns:
      minmax(0,1fr)
      112px !important;

    border-radius:
      17px !important;
  }


  .raniko-v6 .raniko-premium-guide__copy {
    padding:
      14px 3px 13px 14px !important;
  }


  .raniko-v6 .raniko-premium-guide__eyebrow {
    max-width:
      180px !important;

    margin-bottom:
      6px !important;

    font-size:
      7.8px !important;
  }


  .raniko-v6 .raniko-premium-guide__text {
    max-width:
      202px !important;

    margin-bottom:
      9px !important;

    font-size:
      9.4px !important;

    line-height:
      1.34 !important;
  }


  .raniko-v6__soft {
    margin-top:
      4px;

    font-size:
      8.7px;

    line-height:
      1.30;
  }


  .raniko-v6 .raniko-premium-guide__character {
    min-height:
      168px !important;
  }


  .raniko-v6 .raniko-premium-guide__character img {
    right:
      -7px !important;

    bottom:
      -13px !important;

    width:
      126px !important;
  }


  .raniko-v6-hand {
    left:
      -2px;

    top:
      91px;

    width:
      10px;

    height:
      10px;
  }


  .raniko-v6-spark {
    left:
      calc(100% - 119px);

    top:
      97px;
  }


  .raniko-v6-spark.s1 {
    --tx: -82px;
    --ty: 28px;
  }

  .raniko-v6-spark.s2 {
    --tx: -100px;
    --ty: 37px;
  }

  .raniko-v6-spark.s3 {
    --tx: -73px;
    --ty: 19px;
  }

  .raniko-v6-spark.s4 {
    --tx: -108px;
    --ty: 41px;
  }

  .raniko-v6-spark.s5 {
    --tx: -91px;
    --ty: 25px;
  }

  .raniko-v6-spark.s6 {
    --tx: -115px;
    --ty: 34px;
  }


  .raniko-v6 .raniko-premium-guide__cta {
    min-height:
      34px !important;

    padding:
      0 29px 0 11px !important;

    font-size:
      9.2px !important;
  }

}


@media (max-width: 390px) {

  .raniko-premium-guide.raniko-v6 {
    right:
      6px !important;

    width:
      calc(100vw - 12px)
      !important;
  }


  .raniko-v6 .raniko-premium-guide__card {
    grid-template-columns:
      minmax(0,1fr)
      104px !important;
  }


  .raniko-v6 .raniko-premium-guide__text {
    font-size:
      9px !important;
  }


  .raniko-v6 .raniko-premium-guide__character img {
    width:
      117px !important;
  }

}


/* RANIKO_FINAL_V6_END */



/* RANIKO_V7_SIZE_START */


/* ===== DESKTOP ===== */

.raniko-premium-guide.raniko-v6 {
  width: 470px !important;
}


.raniko-v6 .raniko-premium-guide__card {
  min-height: 202px !important;

  grid-template-columns:
    minmax(0,1fr) 150px !important;
}


.raniko-v6 .raniko-premium-guide__copy {
  padding:
    20px 7px 18px 20px !important;
}


.raniko-v6 .raniko-premium-guide__eyebrow {
  max-width: 265px !important;

  font-size: 10.5px !important;

  line-height: 1.25 !important;

  margin-bottom: 9px !important;
}


.raniko-v6 .raniko-premium-guide__text {
  max-width: 278px !important;

  font-size: 13px !important;

  line-height: 1.43 !important;

  margin-bottom: 13px !important;
}


.raniko-v6__soft {
  margin-top: 7px !important;

  font-size: 11.5px !important;

  line-height: 1.35 !important;
}


.raniko-v6 .raniko-premium-guide__cta {
  min-height: 41px !important;

  padding:
    0 34px 0 15px !important;

  font-size: 12px !important;
}


/* Ранико чуть меньше */

.raniko-v6 .raniko-premium-guide__character img {
  width: 142px !important;

  right: 2px !important;

  bottom: -13px !important;
}


/* немного поправляем магию под новую позицию */

.raniko-v6-hand {
  left: 4px !important;
  top: 110px !important;
}

.raniko-v6-spark {
  left: calc(100% - 151px) !important;
  top: 116px !important;
}


/* ===== MOBILE ===== */

@media (max-width: 720px) {

  .raniko-premium-guide.raniko-v6 {
    width:
      min(
        350px,
        calc(100vw - 14px)
      ) !important;

    right: 7px !important;
  }


  .raniko-v6 .raniko-premium-guide__card {
    min-height: 181px !important;

    grid-template-columns:
      minmax(0,1fr)
      100px !important;
  }


  .raniko-v6 .raniko-premium-guide__copy {
    padding:
      15px 4px 14px 15px !important;
  }


  .raniko-v6 .raniko-premium-guide__eyebrow {
    max-width: 205px !important;

    font-size: 9px !important;

    line-height: 1.25 !important;

    margin-bottom: 7px !important;
  }


  .raniko-v6 .raniko-premium-guide__text {
    max-width: 225px !important;

    font-size: 11.3px !important;

    line-height: 1.37 !important;

    margin-bottom: 10px !important;
  }


  .raniko-v6__soft {
    margin-top: 5px !important;

    font-size: 10px !important;

    line-height: 1.32 !important;
  }


  .raniko-v6 .raniko-premium-guide__cta {
    min-height: 37px !important;

    padding:
      0 30px 0 12px !important;

    font-size: 10.5px !important;
  }


  /* На телефоне персонаж был реально крупноват */

  .raniko-v6 .raniko-premium-guide__character img {
    width: 109px !important;

    right: 0 !important;

    bottom: -7px !important;
  }


  .raniko-v6-hand {
    left: -1px !important;
    top: 97px !important;
  }


  .raniko-v6-spark {
    left: calc(100% - 106px) !important;
    top: 102px !important;
  }

}


@media (max-width: 390px) {

  .raniko-premium-guide.raniko-v6 {
    width:
      calc(100vw - 10px) !important;

    right:
      5px !important;
  }


  .raniko-v6 .raniko-premium-guide__card {
    grid-template-columns:
      minmax(0,1fr)
      94px !important;
  }


  .raniko-v6 .raniko-premium-guide__text {
    font-size:
      11px !important;
  }


  .raniko-v6 .raniko-premium-guide__character img {
    width:
      103px !important;
  }

}


/* RANIKO_V7_SIZE_END */



/* RANIKO_MOBILE_DOCK_V8_START */


/* ============================================================
   DESKTOP — НЕ ТРОГАЕМ
   ============================================================ */

.raniko-mobile-dock-v8 {
  display: none;
}


/* ============================================================
   MOBILE
   ============================================================ */

@media (max-width: 720px) {

  /*
    Теперь карточка — настоящий fixed UI.
    Не зависит от Hero, баннеров и прокрутки.
  */

  .raniko-premium-guide.raniko-v6 {
    position: fixed !important;

    z-index: 9998 !important;

    top: auto !important;
    left: auto !important;

    right: 8px !important;

    bottom:
      calc(
        82px +
        env(safe-area-inset-bottom, 0px)
      ) !important;

    width:
      min(
        326px,
        calc(100vw - 16px)
      ) !important;

    max-width: none !important;

    margin: 0 !important;

    transform-origin:
      right bottom !important;

    transition:
      opacity .28s ease,
      transform .38s
        cubic-bezier(.16,1,.30,1),
      filter .30s ease !important;
  }


  /*
    Карточка ниже и компактнее.
    Текст при этом НЕ делаем микроскопическим.
  */

  .raniko-v6
  .raniko-premium-guide__card {
    min-height:
      164px !important;

    grid-template-columns:
      minmax(0,1fr)
      94px !important;

    border-radius:
      17px !important;
  }


  .raniko-v6
  .raniko-premium-guide__copy {
    padding:
      14px 2px 13px 14px !important;
  }


  .raniko-v6
  .raniko-premium-guide__eyebrow {
    max-width:
      195px !important;

    margin-bottom:
      6px !important;

    font-size:
      8.4px !important;

    line-height:
      1.23 !important;

    letter-spacing:
      .10em !important;
  }


  .raniko-v6
  .raniko-premium-guide__text {
    max-width:
      214px !important;

    margin-bottom:
      9px !important;

    font-size:
      10.6px !important;

    line-height:
      1.34 !important;
  }


  /*
    Последнюю фразу не убираем,
    но делаем компактнее.
  */

  .raniko-v6__soft {
    margin-top:
      4px !important;

    font-size:
      9.4px !important;

    line-height:
      1.28 !important;
  }


  .raniko-v6
  .raniko-premium-guide__cta {
    min-height:
      36px !important;

    padding:
      0 29px 0 12px !important;

    font-size:
      10.2px !important;

    border-radius:
      10px !important;
  }


  /*
    Ранико уменьшаем.
    Она украшает карточку,
    а не занимает половину окна.
  */

  .raniko-v6
  .raniko-premium-guide__character {
    min-height:
      164px !important;
  }


  .raniko-v6
  .raniko-premium-guide__character img {
    width:
      100px !important;

    right:
      -1px !important;

    bottom:
      -4px !important;
  }


  /*
    Пересаживаем glow/частицы
    под новую позицию руки.
  */

  .raniko-v6-hand {
    left:
      -3px !important;

    top:
      91px !important;

    width:
      9px !important;

    height:
      9px !important;
  }


  .raniko-v6-spark {
    left:
      calc(100% - 100px)
      !important;

    top:
      96px !important;

    width:
      4px !important;

    height:
      4px !important;
  }


  .raniko-v6-spark.s1 {
    --tx: -78px !important;
    --ty: 25px !important;
  }

  .raniko-v6-spark.s2 {
    --tx: -92px !important;
    --ty: 33px !important;
  }

  .raniko-v6-spark.s3 {
    --tx: -68px !important;
    --ty: 18px !important;
  }

  .raniko-v6-spark.s4 {
    --tx: -101px !important;
    --ty: 37px !important;
  }

  .raniko-v6-spark.s5 {
    --tx: -85px !important;
    --ty: 23px !important;
  }

  .raniko-v6-spark.s6 {
    --tx: -107px !important;
    --ty: 31px !important;
  }


  /*
    Крестик не должен залезать на лицо.
  */

  .raniko-v6
  .raniko-premium-guide__close {
    top:
      7px !important;

    right:
      7px !important;

    width:
      27px !important;

    height:
      27px !important;
  }


  /* =========================================================
     СВОРАЧИВАНИЕ
     ========================================================= */

  .raniko-premium-guide.raniko-v6.is-mobile-docked-v8 {
    opacity:
      0 !important;

    transform:
      translate3d(
        14px,
        9px,
        0
      )
      scale(.86)
      !important;

    filter:
      blur(2px) !important;

    pointer-events:
      none !important;
  }


  .raniko-premium-guide.raniko-v6.is-mobile-open-v8 {
    opacity:
      1 !important;

    transform:
      translate3d(0,0,0)
      scale(1)
      !important;

    filter:
      blur(0) !important;
  }


  /* =========================================================
     MINI RANIKO
     ========================================================= */

  .raniko-mobile-dock-v8 {
    position:
      fixed;

    z-index:
      9999;

    right:
      9px;

    bottom:
      calc(
        82px +
        env(safe-area-inset-bottom, 0px)
      );

    min-height:
      48px;

    display:
      flex;

    align-items:
      center;

    gap:
      7px;

    padding:
      4px 12px 4px 4px;

    border:
      1px solid
      rgba(202,119,255,.65);

    border-radius:
      999px;

    color:
      #fff;

    background:
      linear-gradient(
        125deg,
        rgba(20,12,49,.985),
        rgba(50,18,87,.985)
      );

    box-shadow:
      0 14px 34px
        rgba(0,0,0,.45),
      0 0 28px
        rgba(164,68,255,.24);

    opacity:
      0;

    transform:
      translate3d(
        15px,
        7px,
        0
      )
      scale(.90);

    pointer-events:
      none;

    cursor:
      pointer;

    transition:
      opacity .28s ease,
      transform .40s
        cubic-bezier(.16,1,.30,1);
  }


  .raniko-mobile-dock-v8.is-visible {
    opacity:
      1;

    transform:
      translate3d(0,0,0)
      scale(1);

    pointer-events:
      auto;
  }


  .raniko-mobile-dock-v8__portrait {
    position:
      relative;

    width:
      39px;

    height:
      39px;

    flex:
      0 0 39px;

    overflow:
      hidden;

    display:
      grid;

    place-items:
      center;

    border:
      1px solid
      rgba(226,165,255,.58);

    border-radius:
      50%;

    background:
      radial-gradient(
        circle,
        rgba(178,86,255,.35),
        rgba(18,10,39,.96) 70%
      );
  }


  .raniko-mobile-dock-v8__portrait img {
    width:
      45px;

    max-width:
      none;

    transform:
      translateY(5px);

    animation:
      ranikoV8MiniGirl
      3.4s
      ease-in-out
      infinite;
  }


  @keyframes ranikoV8MiniGirl {

    0%,
    100% {
      transform:
        translateY(5px)
        scale(1);
    }

    50% {
      transform:
        translateY(2px)
        scale(1.025);
    }

  }


  .raniko-mobile-dock-v8__name {
    font-size:
      11px;

    font-weight:
      850;

    letter-spacing:
      .01em;
  }


  .raniko-mobile-dock-v8__magic {
    color:
      #e7a4ff;

    font-size:
      12px;

    text-shadow:
      0 0 10px
        rgba(220,130,255,.9);

    animation:
      ranikoV8MiniMagic
      2.2s
      ease-in-out
      infinite;
  }


  @keyframes ranikoV8MiniMagic {

    0%,
    100% {
      opacity:
        .35;

      transform:
        scale(.75)
        rotate(0deg);
    }

    50% {
      opacity:
        1;

      transform:
        scale(1.2)
        rotate(15deg);
    }

  }

}


/* ============================================================
   SMALL IPHONE
   ============================================================ */

@media (max-width: 390px) {

  .raniko-premium-guide.raniko-v6 {
    right:
      6px !important;

    width:
      calc(100vw - 12px)
      !important;
  }


  .raniko-v6
  .raniko-premium-guide__card {
    grid-template-columns:
      minmax(0,1fr)
      90px !important;
  }


  .raniko-v6
  .raniko-premium-guide__text {
    font-size:
      10.2px !important;
  }


  .raniko-v6
  .raniko-premium-guide__character img {
    width:
      96px !important;
  }


  .raniko-mobile-dock-v8 {
    right:
      7px;
  }

}


/* ============================================================
   VERY SHORT MOBILE VIEWPORT
   ============================================================ */

@media
  (max-width: 720px)
  and (max-height: 700px) {

  .raniko-premium-guide.raniko-v6 {
    bottom:
      calc(
        68px +
        env(safe-area-inset-bottom, 0px)
      ) !important;
  }


  .raniko-v6__soft {
    display:
      none !important;
  }


  .raniko-mobile-dock-v8 {
    bottom:
      calc(
        68px +
        env(safe-area-inset-bottom, 0px)
      );
  }

}


/* RANIKO_MOBILE_DOCK_V8_END */


/* RANIKO_MOBILE_FINAL_POSITION_START */

@media (max-width: 720px) {

  .raniko-premium-guide.raniko-v6 {
    position: fixed !important;

    top: auto !important;
    left: auto !important;

    right: 7px !important;

    bottom:
      calc(
        16px +
        env(safe-area-inset-bottom, 0px)
      ) !important;

    width:
      min(
        310px,
        calc(100vw - 14px)
      ) !important;

    max-width: none !important;

    margin: 0 !important;

    z-index: 9999 !important;
  }


  .raniko-v6
  .raniko-premium-guide__card {
    min-height: 154px !important;

    grid-template-columns:
      minmax(0,1fr)
      86px !important;

    border-radius: 16px !important;
  }


  .raniko-v6
  .raniko-premium-guide__copy {
    padding:
      12px 2px 12px 12px !important;
  }


  .raniko-v6
  .raniko-premium-guide__eyebrow {
    max-width: 185px !important;

    margin-bottom: 5px !important;

    font-size: 8px !important;

    line-height: 1.2 !important;
  }


  .raniko-v6
  .raniko-premium-guide__text {
    max-width: 205px !important;

    margin-bottom: 8px !important;

    font-size: 10.2px !important;

    line-height: 1.31 !important;
  }


  .raniko-v6__soft {
    margin-top: 3px !important;

    font-size: 9px !important;

    line-height: 1.25 !important;
  }


  .raniko-v6
  .raniko-premium-guide__cta {
    min-height: 34px !important;

    padding:
      0 27px 0 11px !important;

    font-size: 9.8px !important;

    border-radius: 10px !important;
  }


  .raniko-v6
  .raniko-premium-guide__character {
    min-height: 154px !important;
  }


  .raniko-v6
  .raniko-premium-guide__character img {
    width: 91px !important;

    right: 0 !important;

    bottom: -3px !important;
  }


  .raniko-v6-hand {
    left: -3px !important;
    top: 86px !important;

    width: 8px !important;
    height: 8px !important;
  }


  .raniko-v6-spark {
    left:
      calc(100% - 91px) !important;

    top: 90px !important;
  }


  .raniko-v6
  .raniko-premium-guide__close {
    top: 6px !important;
    right: 6px !important;

    width: 25px !important;
    height: 25px !important;
  }


  /* маленькая свернутая Ранико тоже ниже */

  .raniko-mobile-dock-v8 {
    right: 8px !important;

    bottom:
      calc(
        16px +
        env(safe-area-inset-bottom, 0px)
      ) !important;
  }

}


@media (max-width: 390px) {

  .raniko-premium-guide.raniko-v6 {
    right: 5px !important;

    width:
      calc(100vw - 10px) !important;
  }

}

/* RANIKO_MOBILE_FINAL_POSITION_END */



/* RANIKO_MOBILE_COLLAPSE_V9_START */

@media (max-width: 720px) {

  /*
    Полная карточка:
    плавное исчезновение в сторону мини-Ранико.
  */

  .raniko-premium-guide.raniko-v6 {
    will-change:
      opacity,
      transform,
      filter !important;

    transition:
      opacity .30s ease,
      filter .34s ease,
      transform .46s
        cubic-bezier(.16,1,.30,1)
      !important;
  }


  .raniko-premium-guide.raniko-v6.is-mobile-docked-v8 {
    opacity:
      0 !important;

    transform:
      translate3d(
        18px,
        12px,
        0
      )
      scale(.80)
      !important;

    filter:
      blur(3px)
      saturate(.85)
      !important;

    pointer-events:
      none !important;
  }


  .raniko-premium-guide.raniko-v6.is-mobile-open-v8 {
    opacity:
      1 !important;

    transform:
      translate3d(0,0,0)
      scale(1)
      !important;

    filter:
      blur(0)
      saturate(1)
      !important;
  }


  /*
    Мини-Ранико появляется не резко,
    а как будто карточка свернулась в неё.
  */

  .raniko-mobile-dock-v8 {
    opacity:
      0;

    transform:
      translate3d(
        18px,
        10px,
        0
      )
      scale(.72);

    filter:
      blur(3px);

    transition:
      opacity .30s ease,
      filter .38s ease,
      transform .48s
        cubic-bezier(.16,1,.30,1)
      !important;
  }


  .raniko-mobile-dock-v8.is-visible {
    opacity:
      1;

    transform:
      translate3d(0,0,0)
      scale(1);

    filter:
      blur(0);
  }


  /*
    Лёгкое живое свечение мини-кнопки.
  */

  .raniko-mobile-dock-v8.is-visible {
    animation:
      ranikoMiniDockBreathV9
      4.2s
      ease-in-out
      infinite;
  }


  @keyframes ranikoMiniDockBreathV9 {

    0%,
    100% {
      box-shadow:
        0 12px 30px rgba(0,0,0,.42),
        0 0 20px rgba(164,68,255,.18);

      transform:
        translate3d(0,0,0)
        scale(1);
    }

    50% {
      box-shadow:
        0 14px 34px rgba(0,0,0,.45),
        0 0 30px rgba(190,84,255,.30);

      transform:
        translate3d(0,-1px,0)
        scale(1.015);
    }

  }


  /*
    Портрет Ранико в свернутом состоянии
    слегка "дышит".
  */

  .raniko-mobile-dock-v8__portrait img {
    animation:
      ranikoMiniPortraitV9
      3.6s
      ease-in-out
      infinite
      !important;
  }


  @keyframes ranikoMiniPortraitV9 {

    0%,
    100% {
      transform:
        translateY(5px)
        scale(1);
    }

    50% {
      transform:
        translateY(2px)
        scale(1.035);
    }

  }


  /*
    Звёздочка иногда подмигивает.
  */

  .raniko-mobile-dock-v8__magic {
    animation:
      ranikoMiniStarV9
      2.4s
      ease-in-out
      infinite
      !important;
  }


  @keyframes ranikoMiniStarV9 {

    0%,
    100% {
      opacity:
        .35;

      transform:
        rotate(0deg)
        scale(.75);
    }

    45% {
      opacity:
        1;

      transform:
        rotate(15deg)
        scale(1.25);
    }

    65% {
      opacity:
        .75;

      transform:
        rotate(8deg)
        scale(.95);
    }

  }

}


/* RANIKO_MOBILE_COLLAPSE_V9_END */









/* RANOTEKA_FULL_WIDTH_RAIL_V4_START */


/* ==========================================================
   RANOTEKA — FULL WIDTH BOOK RAIL
   ПК: 10-12 карточек видно + ещё справа
   MOBILE: около 3 карточек видно
   В ленте: до 20 книг
   ========================================================== */


/* ----------------------------------------------------------
   ОСНОВНАЯ ЛЕНТА
   ---------------------------------------------------------- */

html body .showcase-grid {

    display: flex !important;

    grid-template-columns: none !important;
    grid-auto-columns: unset !important;
    grid-auto-flow: unset !important;

    justify-content: flex-start !important;
    align-items: flex-start !important;

    flex-wrap: nowrap !important;

    gap: 10px !important;

    overflow-x: auto !important;
    overflow-y: hidden !important;

    width: calc(100vw - 24px) !important;
    max-width: none !important;

    /*
      Вырываем ленту из центрального контейнера
      почти на всю ширину монитора.
    */

    margin-left:
      calc(50% - 50vw + 12px) !important;

    margin-right:
      0 !important;

    padding:
      4px 12px 13px !important;

    box-sizing:
      border-box !important;

    scroll-snap-type:
      x proximity !important;

    scroll-behavior:
      smooth !important;

    overscroll-behavior-x:
      contain !important;

    scrollbar-width:
      none !important;

    -ms-overflow-style:
      none !important;

    -webkit-overflow-scrolling:
      touch !important;
}


html body .showcase-grid::-webkit-scrollbar {
    display: none !important;
}


/* ----------------------------------------------------------
   КАРТОЧКА ПК
   ---------------------------------------------------------- */

html body
.showcase-grid
.showcase-card {

    flex:
      0 0 148px !important;

    width:
      148px !important;

    min-width:
      148px !important;

    max-width:
      148px !important;

    height:
      auto !important;

    margin:
      0 !important;

    scroll-snap-align:
      start !important;

    overflow:
      hidden !important;

    border-radius:
      12px !important;

    background:
      rgba(7,9,22,.96) !important;

    transition:
      transform .22s ease,
      border-color .22s ease,
      box-shadow .22s ease !important;
}


@media (hover:hover) {

    html body
    .showcase-grid
    .showcase-card:hover {

        transform:
          translateY(-4px) !important;

        border-color:
          rgba(169,88,255,.55) !important;

        box-shadow:
          0 15px 32px rgba(0,0,0,.34),
          0 0 22px rgba(135,62,233,.15)
          !important;
    }

}


/* ----------------------------------------------------------
   ОБЛОЖКА
   ---------------------------------------------------------- */

html body
.showcase-grid
.showcase-card__cover {

    display:
      block !important;

    position:
      relative !important;

    width:
      100% !important;

    height:
      auto !important;

    min-height:
      0 !important;

    aspect-ratio:
      2 / 3 !important;

    margin:
      0 !important;

    padding:
      0 !important;

    overflow:
      hidden !important;

    border-radius:
      11px 11px 0 0 !important;

    background-size:
      cover !important;

    background-position:
      center !important;

    background-repeat:
      no-repeat !important;
}


/*
  Текст поверх временной обложки убираем.
  Когда поставим настоящие арты,
  они сами будут визуально работать.
*/

html body
.showcase-grid
.showcase-card__cover
.showcase-card__title {

    display:
      none !important;
}


/* ----------------------------------------------------------
   НИЖНЯЯ ЧАСТЬ
   ---------------------------------------------------------- */

html body
.showcase-grid
.showcase-card__body {

    min-height:
      82px !important;

    padding:
      8px 8px 8px !important;

    box-sizing:
      border-box !important;
}


html body
.showcase-grid
.showcase-card__body h3 {

    display:
      -webkit-box !important;

    overflow:
      hidden !important;

    margin:
      0 0 6px !important;

    min-height:
      30px !important;

    max-height:
      30px !important;

    color:
      #f7f5ff !important;

    font-size:
      10.5px !important;

    line-height:
      1.4 !important;

    font-weight:
      800 !important;

    -webkit-line-clamp:
      2 !important;

    -webkit-box-orient:
      vertical !important;
}


html body
.showcase-grid
.showcase-card__meta {

    display:
      flex !important;

    align-items:
      center !important;

    justify-content:
      space-between !important;

    gap:
      4px !important;

    margin:
      0 !important;

    font-size:
      7.5px !important;
}


html body
.showcase-grid
.showcase-card
.muted {

    font-size:
      7.5px !important;

    line-height:
      1.25 !important;
}


/* TOP / NEW */

html body
.showcase-grid
.showcase-card
.ribbon {

    top:
      6px !important;

    left:
      6px !important;

    padding:
      4px 6px !important;

    border-radius:
      6px !important;

    font-size:
      7px !important;

    line-height:
      1 !important;
}


/* ----------------------------------------------------------
   БЛОК СТАНОВИТСЯ ПЛОТНЕЕ
   ---------------------------------------------------------- */

html body .store-section {

    margin-bottom:
      20px !important;
}


html body
.store-section
.section__head {

    margin-bottom:
      8px !important;
}


/* ==========================================================
   БОЛЬШИЕ МОНИТОРЫ
   ещё больше книг одновременно
   ========================================================== */

@media (min-width: 1500px) {

    html body
    .showcase-grid
    .showcase-card {

        flex-basis:
          142px !important;

        width:
          142px !important;

        min-width:
          142px !important;

        max-width:
          142px !important;
    }

}


/* ==========================================================
   MOBILE — ТРИ КНИГИ
   ========================================================== */

@media (max-width: 720px) {

    html body .showcase-grid {

        gap:
          7px !important;

        width:
          calc(100vw - 10px) !important;

        max-width:
          none !important;

        margin-left:
          calc(50% - 50vw + 5px)
          !important;

        margin-right:
          0 !important;

        padding:
          3px 5px 10px !important;

        scroll-snap-type:
          x mandatory !important;
    }


    html body
    .showcase-grid
    .showcase-card {

        /*
          На обычном телефоне:
          примерно 3 карточки одновременно.
        */

        flex:
          0 0
          clamp(
            108px,
            29vw,
            124px
          ) !important;

        width:
          clamp(
            108px,
            29vw,
            124px
          ) !important;

        min-width:
          clamp(
            108px,
            29vw,
            124px
          ) !important;

        max-width:
          clamp(
            108px,
            29vw,
            124px
          ) !important;

        border-radius:
          10px !important;
    }


    html body
    .showcase-grid
    .showcase-card__cover {

        aspect-ratio:
          2 / 3 !important;

        border-radius:
          9px 9px 0 0 !important;
    }


    html body
    .showcase-grid
    .showcase-card__body {

        min-height:
          66px !important;

        padding:
          6px 6px 7px !important;
    }


    html body
    .showcase-grid
    .showcase-card__body h3 {

        min-height:
          27px !important;

        max-height:
          27px !important;

        margin-bottom:
          4px !important;

        font-size:
          9px !important;

        line-height:
          1.38 !important;
    }


    html body
    .showcase-grid
    .showcase-card__meta {

        gap:
          2px !important;

        font-size:
          7px !important;
    }


    html body
    .showcase-grid
    .showcase-card
    .muted {

        font-size:
          7px !important;
    }


    html body
    .showcase-grid
    .showcase-card
    .ribbon {

        top:
          5px !important;

        left:
          5px !important;

        padding:
          4px 5px !important;

        font-size:
          6.5px !important;
    }


    html body .store-section {

        margin-bottom:
          17px !important;
    }

}


/* iPhone поменьше */

@media (max-width: 390px) {

    html body
    .showcase-grid
    .showcase-card {

        flex-basis:
          108px !important;

        width:
          108px !important;

        min-width:
          108px !important;

        max-width:
          108px !important;
    }

}


/*
   HERO / баннеры / Ранико вообще не трогаем.
*/

/* RANOTEKA_FULL_WIDTH_RAIL_V4_END */








/* RANOTEKA_BOOK_MOUSE_DRAG_V6_START */


@media (hover:hover) and (pointer:fine) {

  html body .showcase-grid {

    cursor:
      grab !important;

    user-select:
      none !important;

    -webkit-user-select:
      none !important;

    -webkit-user-drag:
      none !important;
  }


  html body
  .showcase-grid * {

    -webkit-user-drag:
      none !important;
  }


  html body
  .showcase-grid img,

  html body
  .showcase-grid a {

    -webkit-user-drag:
      none !important;
  }


  html body
  .showcase-grid
  .showcase-card {

    cursor:
      grab !important;
  }


  html body
  .showcase-grid.ranoteka-mouse-dragging-v6,

  html body
  .showcase-grid.ranoteka-mouse-dragging-v6
  .showcase-card {

    cursor:
      grabbing !important;
  }


  html body
  .showcase-grid.ranoteka-mouse-dragging-v6 {

    scroll-snap-type:
      none !important;

    scroll-behavior:
      auto !important;
  }


  html.ranoteka-global-dragging-v6,

  html.ranoteka-global-dragging-v6 body,

  html.ranoteka-global-dragging-v6 body * {

    cursor:
      grabbing !important;
  }

}


/*
  На телефоне ничего не ломаем.
  Там остаётся обычный свайп пальцем.
*/

@media (pointer:coarse) {

  html body .showcase-grid {

    touch-action:
      pan-x pan-y !important;

  }

}


/* RANOTEKA_BOOK_MOUSE_DRAG_V6_END */


/* RANOTEKA_RAIL_REAL_TEST_V7_START */


/* =========================================================
   ПК
   ========================================================= */

@media (hover:hover) and (pointer:fine) {

  html body
  .showcase-grid.ranoteka-real-drag-v7 {

    cursor:
      grab !important;

    user-select:
      none !important;

    -webkit-user-select:
      none !important;

    scroll-behavior:
      auto !important;
  }


  html body
  .showcase-grid.ranoteka-real-drag-v7
  .showcase-card,

  html body
  .showcase-grid.ranoteka-real-drag-v7
  .showcase-card * {

    -webkit-user-drag:
      none !important;
  }


  html body
  .showcase-grid.ranoteka-real-drag-v7
  img {

    pointer-events:
      none !important;

    -webkit-user-drag:
      none !important;
  }


  html body
  .showcase-grid.ranoteka-real-drag-v7
  .showcase-card {

    cursor:
      grab !important;
  }


  html body
  .showcase-grid.ranoteka-real-drag-v7.is-grabbing-v7,

  html body
  .showcase-grid.ranoteka-real-drag-v7.is-grabbing-v7
  .showcase-card {

    cursor:
      grabbing !important;

    scroll-snap-type:
      none !important;
  }

}


/* =========================================================
   MOBILE

   Нативный свайп пальцем.
   ========================================================= */

@media (pointer:coarse) {

  html body
  .showcase-grid {

    touch-action:
      pan-x pan-y !important;

    overscroll-behavior-x:
      contain !important;
  }

}


/*
  Временные дубликаты визуально ничем
  не отличаются от настоящих.
*/

.ranoteka-demo-clone-v7 {
  opacity: 1;
}


/* RANOTEKA_RAIL_REAL_TEST_V7_END */



/* ============================================================
   RANOTEKA_PREMIUM_RAIL_V8_CSS_START
   Real DOM:
   .premium-book-grid
   .premium-book-card
   ============================================================ */

body.ranoteka-home-rail-v8 .ranoteka-premium-rail-shell-v8 {
  position: relative;
  width: 100%;
  min-width: 0;
}

body.ranoteka-home-rail-v8 .premium-book-grid.ranoteka-premium-rail-v8 {
  display: flex !important;
  grid-template-columns: none !important;
  grid-auto-flow: unset !important;

  width: 100% !important;
  max-width: none !important;

  gap: 12px !important;

  overflow-x: auto !important;
  overflow-y: hidden !important;

  padding: 5px 2px 14px !important;
  margin: 0 !important;

  scroll-behavior: smooth;
  scroll-snap-type: x proximity;
  overscroll-behavior-x: contain;

  -webkit-overflow-scrolling: touch;

  scrollbar-width: none;

  cursor: grab;

  touch-action: pan-x pan-y;
}

body.ranoteka-home-rail-v8
.premium-book-grid.ranoteka-premium-rail-v8::-webkit-scrollbar {
  display: none;
}

body.ranoteka-home-rail-v8
.premium-book-grid.ranoteka-premium-rail-v8
> .premium-book-card {
  box-sizing: border-box !important;

  flex-grow: 0 !important;
  flex-shrink: 0 !important;

  min-width: 0 !important;
  max-width: none !important;

  margin: 0 !important;

  scroll-snap-align: start;
}

/* ------------------------------------------------------------
   LARGE DESKTOP
   около 10 книг одновременно
   ------------------------------------------------------------ */

@media (min-width: 1280px) {

  body.ranoteka-home-rail-v8
  .premium-book-grid.ranoteka-premium-rail-v8
  > .premium-book-card {
    flex-basis: calc((100% - 108px) / 10) !important;
    width: calc((100% - 108px) / 10) !important;
  }

}

/* ------------------------------------------------------------
   NORMAL DESKTOP / NOTEBOOK
   около 9 книг одновременно
   ------------------------------------------------------------ */

@media (min-width: 900px) and (max-width: 1279px) {

  body.ranoteka-home-rail-v8
  .premium-book-grid.ranoteka-premium-rail-v8 {
    gap: 10px !important;
  }

  body.ranoteka-home-rail-v8
  .premium-book-grid.ranoteka-premium-rail-v8
  > .premium-book-card {
    flex-basis: calc((100% - 80px) / 9) !important;
    width: calc((100% - 80px) / 9) !important;
  }

}

/* ------------------------------------------------------------
   TABLET
   ------------------------------------------------------------ */

@media (min-width: 701px) and (max-width: 899px) {

  body.ranoteka-home-rail-v8
  .premium-book-grid.ranoteka-premium-rail-v8 {
    gap: 10px !important;
  }

  body.ranoteka-home-rail-v8
  .premium-book-grid.ranoteka-premium-rail-v8
  > .premium-book-card {
    flex-basis: calc((100% - 40px) / 5) !important;
    width: calc((100% - 40px) / 5) !important;
  }

}

/* ------------------------------------------------------------
   MOBILE
   ровно около 3 книг одновременно
   ------------------------------------------------------------ */

@media (max-width: 700px) {

  body.ranoteka-home-rail-v8
  .premium-book-grid.ranoteka-premium-rail-v8 {
    gap: 8px !important;

    padding-left: 0 !important;
    padding-right: 0 !important;

    scroll-snap-type: x mandatory;

    cursor: auto;
  }

  body.ranoteka-home-rail-v8
  .premium-book-grid.ranoteka-premium-rail-v8
  > .premium-book-card {
    flex-basis: calc((100% - 16px) / 3) !important;
    width: calc((100% - 16px) / 3) !important;

    scroll-snap-align: start;
  }

}

/* ------------------------------------------------------------
   COVER
   ------------------------------------------------------------ */

body.ranoteka-home-rail-v8
.premium-book-grid.ranoteka-premium-rail-v8
.premium-book-card__cover {
  width: 100% !important;

  aspect-ratio: 2 / 3;

  overflow: hidden;

  border-radius: 10px;
}

body.ranoteka-home-rail-v8
.premium-book-grid.ranoteka-premium-rail-v8
.premium-book-card__cover img {
  width: 100% !important;
  height: 100% !important;

  display: block;

  object-fit: cover;
}

/* ------------------------------------------------------------
   TITLE
   ------------------------------------------------------------ */

body.ranoteka-home-rail-v8
.premium-book-grid.ranoteka-premium-rail-v8
.premium-book-card__title {
  display: -webkit-box !important;

  overflow: hidden !important;

  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;

  line-height: 1.25 !important;

  min-height: 2.5em;
  max-height: 2.5em;

  margin-top: 7px !important;
}

/* ------------------------------------------------------------
   COMPACT META
   ------------------------------------------------------------ */

body.ranoteka-home-rail-v8
.premium-book-grid.ranoteka-premium-rail-v8
.premium-book-card__ratings,
body.ranoteka-home-rail-v8
.premium-book-grid.ranoteka-premium-rail-v8
.premium-book-card__footer {
  font-size: 12px !important;
  line-height: 1.25 !important;
}

/* ------------------------------------------------------------
   ACTIVE MOUSE DRAG
   ------------------------------------------------------------ */

body.ranoteka-home-rail-v8
.premium-book-grid.ranoteka-premium-rail-v8.ranoteka-dragging-v8 {
  cursor: grabbing !important;

  user-select: none !important;
  -webkit-user-select: none !important;

  scroll-behavior: auto !important;
  scroll-snap-type: none !important;
}

body.ranoteka-home-rail-v8
.premium-book-grid.ranoteka-premium-rail-v8.ranoteka-dragging-v8 * {
  user-select: none !important;
  -webkit-user-select: none !important;
}

/* ------------------------------------------------------------
   ARROWS
   ------------------------------------------------------------ */

.ranoteka-premium-rail-arrow-v8 {
  position: absolute;

  top: 43%;

  z-index: 30;

  width: 42px;
  height: 54px;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 0;

  border: 1px solid rgba(255,255,255,.14);
  border-radius: 14px;

  background:
    linear-gradient(
      180deg,
      rgba(24,18,38,.94),
      rgba(9,8,18,.94)
    );

  backdrop-filter: blur(12px);

  box-shadow:
    0 10px 30px rgba(0,0,0,.38),
    0 0 20px rgba(163,76,255,.15);

  color: #fff;

  font-size: 28px;
  font-weight: 300;
  line-height: 1;

  cursor: pointer;

  opacity: .84;

  transform: translateY(-50%);

  transition:
    opacity .18s ease,
    transform .18s ease,
    border-color .18s ease,
    box-shadow .18s ease;
}

.ranoteka-premium-rail-arrow-v8:hover {
  opacity: 1;

  border-color: rgba(216,112,255,.48);

  box-shadow:
    0 12px 34px rgba(0,0,0,.46),
    0 0 26px rgba(190,70,255,.30);
}

.ranoteka-premium-rail-arrow-v8:active {
  transform: translateY(-50%) scale(.94);
}

.ranoteka-premium-rail-arrow-v8.left {
  left: -13px;
}

.ranoteka-premium-rail-arrow-v8.right {
  right: -13px;
}

/* Телефону стрелки не нужны — там нативный свайп */

@media (max-width: 700px) {
  .ranoteka-premium-rail-arrow-v8 {
    display: none !important;
  }
}

/* чуть компактнее текст на телефоне */

@media (max-width: 700px) {

  body.ranoteka-home-rail-v8
  .premium-book-grid.ranoteka-premium-rail-v8
  .premium-book-card__title {
    font-size: 12px !important;

    margin-top: 5px !important;
  }

  body.ranoteka-home-rail-v8
  .premium-book-grid.ranoteka-premium-rail-v8
  .premium-book-card__ratings,
  body.ranoteka-home-rail-v8
  .premium-book-grid.ranoteka-premium-rail-v8
  .premium-book-card__footer {
    font-size: 10px !important;
  }

}

/* RANOTEKA_PREMIUM_RAIL_V8_CSS_END */



/* ============================================================
   RANOTEKA_RAIL_V8_1_COMPACT_START

   V8 mechanics are working.
   This patch changes ONLY visual density.
   ============================================================ */


/* ------------------------------------------------------------
   УБИРАЕМ ДОБАВЛЕННЫЕ V8 СТРЕЛКИ.
   Старые стрелки сайта уже работали до V8.
   ------------------------------------------------------------ */

.ranoteka-premium-rail-arrow-v8 {
    display: none !important;
}


/* ------------------------------------------------------------
   ОСНОВНАЯ ЛЕНТА
   ------------------------------------------------------------ */

body.ranoteka-home-rail-v8
.premium-book-grid.ranoteka-premium-rail-v8 {

    display: flex !important;

    gap: 10px !important;

    width: 100% !important;
    max-width: none !important;

    overflow-x: auto !important;
    overflow-y: hidden !important;

    padding:
        4px
        2px
        12px
        2px !important;

    scrollbar-width: none !important;

    align-items: flex-start !important;
}

body.ranoteka-home-rail-v8
.premium-book-grid.ranoteka-premium-rail-v8::-webkit-scrollbar {
    display: none !important;
}


/* ============================================================
   DESKTOP
   ============================================================ */

@media (min-width: 901px) {

    body.ranoteka-home-rail-v8
    .premium-book-grid.ranoteka-premium-rail-v8
    > .premium-book-card {

        flex:
            0
            0
            clamp(118px, 8.15vw, 142px)
            !important;

        width:
            clamp(118px, 8.15vw, 142px)
            !important;

        min-width:
            clamp(118px, 8.15vw, 142px)
            !important;

        max-width:
            clamp(118px, 8.15vw, 142px)
            !important;

        margin: 0 !important;
    }

}


/* ============================================================
   TABLET
   ============================================================ */

@media (min-width: 701px) and (max-width: 900px) {

    body.ranoteka-home-rail-v8
    .premium-book-grid.ranoteka-premium-rail-v8 {

        gap: 9px !important;
    }

    body.ranoteka-home-rail-v8
    .premium-book-grid.ranoteka-premium-rail-v8
    > .premium-book-card {

        flex:
            0
            0
            118px
            !important;

        width:
            118px
            !important;

        min-width:
            118px
            !important;

        max-width:
            118px
            !important;
    }

}


/* ============================================================
   MOBILE
   примерно 3.15 карточки:
   видно 3 книги + понятно, что справа есть продолжение
   ============================================================ */

@media (max-width: 700px) {

    body.ranoteka-home-rail-v8
    .premium-book-grid.ranoteka-premium-rail-v8 {

        gap: 7px !important;

        padding:
            3px
            0
            10px
            0 !important;

        scroll-padding-left: 0 !important;
    }

    body.ranoteka-home-rail-v8
    .premium-book-grid.ranoteka-premium-rail-v8
    > .premium-book-card {

        flex:
            0
            0
            calc((100% - 28px) / 3.15)
            !important;

        width:
            calc((100% - 28px) / 3.15)
            !important;

        min-width:
            calc((100% - 28px) / 3.15)
            !important;

        max-width:
            calc((100% - 28px) / 3.15)
            !important;

        margin: 0 !important;
    }

}


/* ============================================================
   САМА КАРТОЧКА
   ============================================================ */

body.ranoteka-home-rail-v8
.premium-book-grid.ranoteka-premium-rail-v8
> .premium-book-card {

    box-sizing: border-box !important;

    border-radius: 10px !important;

    overflow: hidden !important;
}


/* ============================================================
   ОБЛОЖКА
   ============================================================ */

body.ranoteka-home-rail-v8
.premium-book-grid.ranoteka-premium-rail-v8
.premium-book-card__cover {

    width: 100% !important;

    aspect-ratio: 2 / 3 !important;

    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;

    border-radius:
        9px
        9px
        0
        0 !important;

    overflow: hidden !important;
}


/* картинки / фон внутри */

body.ranoteka-home-rail-v8
.premium-book-grid.ranoteka-premium-rail-v8
.premium-book-card__cover img {

    display: block !important;

    width: 100% !important;
    height: 100% !important;

    object-fit: cover !important;
}


/* ============================================================
   НАЗВАНИЕ НА ОБЛОЖКЕ УБИРАЕМ.

   Сейчас оно повторяется второй раз под картинкой.
   Нам нужен только нормальный title снизу.
   ============================================================ */

body.ranoteka-home-rail-v8
.premium-book-grid.ranoteka-premium-rail-v8
.premium-book-card__cover-title {

    display: none !important;
}


/* ============================================================
   BODY КАРТОЧКИ
   ============================================================ */

body.ranoteka-home-rail-v8
.premium-book-grid.ranoteka-premium-rail-v8
.premium-book-card__body {

    padding:
        7px
        7px
        6px
        7px
        !important;

    min-height: 0 !important;
}


/* ============================================================
   TITLE
   ============================================================ */

body.ranoteka-home-rail-v8
.premium-book-grid.ranoteka-premium-rail-v8
.premium-book-card__title {

    display: -webkit-box !important;

    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 2 !important;

    overflow: hidden !important;

    height: auto !important;
    min-height: 2.45em !important;
    max-height: 2.45em !important;

    margin:
        0
        0
        6px
        0
        !important;

    padding: 0 !important;

    font-size: 12px !important;
    font-weight: 700 !important;

    line-height: 1.22 !important;
}


/* ============================================================
   РЕЙТИНГ
   ============================================================ */

body.ranoteka-home-rail-v8
.premium-book-grid.ranoteka-premium-rail-v8
.premium-book-card__ratings {

    display: flex !important;

    align-items: center !important;

    gap: 4px !important;

    margin:
        0
        0
        4px
        0
        !important;

    padding: 0 !important;

    font-size: 10.5px !important;

    line-height: 1.2 !important;
}


/* ============================================================
   FOOTER / ЧИТАТЕЛИ
   ============================================================ */

body.ranoteka-home-rail-v8
.premium-book-grid.ranoteka-premium-rail-v8
.premium-book-card__footer {

    margin: 0 !important;

    padding: 0 !important;

    min-height: 0 !important;

    font-size: 10px !important;

    line-height: 1.2 !important;
}


/* ============================================================
   BADGES
   ============================================================ */

body.ranoteka-home-rail-v8
.premium-book-grid.ranoteka-premium-rail-v8
.premium-book-card__badge {

    top: 6px !important;
    left: 6px !important;

    padding:
        4px
        6px
        !important;

    border-radius: 6px !important;

    font-size: 9px !important;

    line-height: 1 !important;
}


/* ============================================================
   BOOKMARK
   ============================================================ */

body.ranoteka-home-rail-v8
.premium-book-grid.ranoteka-premium-rail-v8
.premium-book-card__bookmark {

    top: 6px !important;
    right: 6px !important;

    width: 27px !important;
    height: 27px !important;

    min-width: 27px !important;
    min-height: 27px !important;
}


/* ============================================================
   ЕЩЁ КОМПАКТНЕЕ НА ТЕЛЕФОНЕ
   ============================================================ */

@media (max-width: 700px) {

    body.ranoteka-home-rail-v8
    .premium-book-grid.ranoteka-premium-rail-v8
    .premium-book-card__body {

        padding:
            5px
            5px
            5px
            5px
            !important;
    }


    body.ranoteka-home-rail-v8
    .premium-book-grid.ranoteka-premium-rail-v8
    .premium-book-card__title {

        font-size: 10.5px !important;

        min-height: 2.4em !important;
        max-height: 2.4em !important;

        margin-bottom: 4px !important;
    }


    body.ranoteka-home-rail-v8
    .premium-book-grid.ranoteka-premium-rail-v8
    .premium-book-card__ratings {

        font-size: 9px !important;

        gap: 2px !important;

        margin-bottom: 3px !important;
    }


    body.ranoteka-home-rail-v8
    .premium-book-grid.ranoteka-premium-rail-v8
    .premium-book-card__footer {

        font-size: 8.5px !important;
    }


    body.ranoteka-home-rail-v8
    .premium-book-grid.ranoteka-premium-rail-v8
    .premium-book-card__badge {

        top: 4px !important;
        left: 4px !important;

        padding:
            3px
            5px
            !important;

        font-size: 8px !important;
    }


    body.ranoteka-home-rail-v8
    .premium-book-grid.ranoteka-premium-rail-v8
    .premium-book-card__bookmark {

        top: 4px !important;
        right: 4px !important;

        width: 24px !important;
        height: 24px !important;

        min-width: 24px !important;
        min-height: 24px !important;
    }

}


/* RANOTEKA_RAIL_V8_1_COMPACT_END */



/* ============================================================
   RANOTEKA_BOOK_RAIL_V9_CSS_START
   CLEAN REAL-DOM RAIL
   ============================================================ */


/* V8 shell больше не участвует в layout */

.ranoteka-premium-rail-shell-v8 {
    display: contents !important;
}

.ranoteka-premium-rail-arrow-v8 {
    display: none !important;
}


/* ------------------------------------------------------------
   V9 REAL RAIL
   ------------------------------------------------------------ */

.premium-book-grid.ranoteka-book-rail-v9 {

    display: flex !important;

    grid-template-columns: none !important;
    grid-auto-flow: unset !important;

    align-items: flex-start !important;

    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;

    box-sizing: border-box !important;

    gap: 9px !important;

    margin: 0 !important;

    padding:
        4px
        1px
        12px
        1px
        !important;

    overflow-x: auto !important;
    overflow-y: hidden !important;

    overscroll-behavior-x: contain;

    -webkit-overflow-scrolling: touch;

    scrollbar-width: none !important;

    scroll-snap-type: x proximity;

    cursor: grab;

    touch-action: pan-x pan-y;
}

.premium-book-grid.ranoteka-book-rail-v9::-webkit-scrollbar {
    display: none !important;
}


/* ------------------------------------------------------------
   DESKTOP
   около 11–12 книг
   ------------------------------------------------------------ */

@media (min-width: 1101px) {

    .premium-book-grid.ranoteka-book-rail-v9
    > .premium-book-card {

        flex:
            0
            0
            clamp(108px, 6.6vw, 126px)
            !important;

        width:
            clamp(108px, 6.6vw, 126px)
            !important;

        min-width:
            clamp(108px, 6.6vw, 126px)
            !important;

        max-width:
            clamp(108px, 6.6vw, 126px)
            !important;
    }

}


/* ------------------------------------------------------------
   NOTEBOOK
   ------------------------------------------------------------ */

@media (min-width: 701px) and (max-width: 1100px) {

    .premium-book-grid.ranoteka-book-rail-v9
    > .premium-book-card {

        flex:
            0
            0
            108px
            !important;

        width:
            108px
            !important;

        min-width:
            108px
            !important;

        max-width:
            108px
            !important;
    }

}


/* ------------------------------------------------------------
   MOBILE
   3 полноценные + кусок следующей
   ------------------------------------------------------------ */

@media (max-width: 700px) {

    .premium-book-grid.ranoteka-book-rail-v9 {

        gap: 7px !important;

        padding:
            2px
            0
            9px
            0
            !important;

        scroll-snap-type: x mandatory;

        cursor: auto;
    }

    .premium-book-grid.ranoteka-book-rail-v9
    > .premium-book-card {

        flex:
            0
            0
            calc((100% - 24px) / 3.35)
            !important;

        width:
            calc((100% - 24px) / 3.35)
            !important;

        min-width:
            calc((100% - 24px) / 3.35)
            !important;

        max-width:
            calc((100% - 24px) / 3.35)
            !important;

        scroll-snap-align: start;
    }

}


/* ------------------------------------------------------------
   CARD
   ------------------------------------------------------------ */

.premium-book-grid.ranoteka-book-rail-v9
> .premium-book-card {

    box-sizing: border-box !important;

    margin: 0 !important;

    border-radius: 9px !important;

    overflow: hidden !important;
}


/* ------------------------------------------------------------
   COVER 2:3
   ------------------------------------------------------------ */

.premium-book-grid.ranoteka-book-rail-v9
.premium-book-card__cover {

    position: relative !important;

    display: block !important;

    width: 100% !important;

    aspect-ratio: 2 / 3 !important;

    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;

    overflow: hidden !important;

    border-radius:
        9px
        9px
        0
        0
        !important;
}

.premium-book-grid.ranoteka-book-rail-v9
.premium-book-card__cover img {

    display: block !important;

    width: 100% !important;
    height: 100% !important;

    object-fit: cover !important;
}


/* Название поверх будущей нормальной обложки не нужно */

.premium-book-grid.ranoteka-book-rail-v9
.premium-book-card__cover-title {
    display: none !important;
}


/* ------------------------------------------------------------
   BODY
   ------------------------------------------------------------ */

.premium-book-grid.ranoteka-book-rail-v9
.premium-book-card__body {

    min-height: 0 !important;

    padding:
        6px
        6px
        6px
        6px
        !important;
}


/* ------------------------------------------------------------
   TITLE
   ------------------------------------------------------------ */

.premium-book-grid.ranoteka-book-rail-v9
.premium-book-card__title {

    display: -webkit-box !important;

    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 2 !important;

    overflow: hidden !important;

    margin:
        0
        0
        5px
        0
        !important;

    padding: 0 !important;

    min-height: 2.35em !important;
    max-height: 2.35em !important;

    font-size: 11px !important;
    font-weight: 700 !important;

    line-height: 1.18 !important;
}


/* ------------------------------------------------------------
   RATINGS
   ------------------------------------------------------------ */

.premium-book-grid.ranoteka-book-rail-v9
.premium-book-card__ratings {

    display: flex !important;

    align-items: center !important;

    gap: 3px !important;

    margin:
        0
        0
        3px
        0
        !important;

    padding: 0 !important;

    font-size: 9.5px !important;

    line-height: 1.15 !important;
}


/* ------------------------------------------------------------
   FOOTER
   ------------------------------------------------------------ */

.premium-book-grid.ranoteka-book-rail-v9
.premium-book-card__footer {

    margin: 0 !important;
    padding: 0 !important;

    min-height: 0 !important;

    font-size: 9px !important;

    line-height: 1.15 !important;
}


/* ------------------------------------------------------------
   BADGE
   ------------------------------------------------------------ */

.premium-book-grid.ranoteka-book-rail-v9
.premium-book-card__badge {

    top: 5px !important;
    left: 5px !important;

    padding:
        3px
        5px
        !important;

    border-radius: 5px !important;

    font-size: 8px !important;

    line-height: 1 !important;
}


/* ------------------------------------------------------------
   BOOKMARK
   ------------------------------------------------------------ */

.premium-book-grid.ranoteka-book-rail-v9
.premium-book-card__bookmark {

    top: 5px !important;
    right: 5px !important;

    width: 24px !important;
    height: 24px !important;

    min-width: 24px !important;
    min-height: 24px !important;
}


/* ------------------------------------------------------------
   ACTIVE DRAG
   ------------------------------------------------------------ */

.premium-book-grid.ranoteka-book-rail-v9.ranoteka-book-dragging-v9 {

    cursor: grabbing !important;

    user-select: none !important;
    -webkit-user-select: none !important;

    scroll-behavior: auto !important;

    scroll-snap-type: none !important;
}

.premium-book-grid.ranoteka-book-rail-v9.ranoteka-book-dragging-v9 * {

    user-select: none !important;
    -webkit-user-select: none !important;
}


/* ------------------------------------------------------------
   MOBILE EXTRA COMPACT
   ------------------------------------------------------------ */

@media (max-width: 700px) {

    .premium-book-grid.ranoteka-book-rail-v9
    .premium-book-card__body {

        padding:
            5px
            4px
            5px
            4px
            !important;
    }

    .premium-book-grid.ranoteka-book-rail-v9
    .premium-book-card__title {

        font-size: 9.5px !important;

        min-height: 2.3em !important;
        max-height: 2.3em !important;

        margin-bottom: 3px !important;
    }

    .premium-book-grid.ranoteka-book-rail-v9
    .premium-book-card__ratings {

        font-size: 8px !important;

        margin-bottom: 2px !important;
    }

    .premium-book-grid.ranoteka-book-rail-v9
    .premium-book-card__footer {

        font-size: 7.5px !important;
    }

    .premium-book-grid.ranoteka-book-rail-v9
    .premium-book-card__bookmark {

        width: 21px !important;
        height: 21px !important;

        min-width: 21px !important;
        min-height: 21px !important;
    }

}


/* RANOTEKA_BOOK_RAIL_V9_CSS_END */



/* ============================================================
   RANOTEKA_RAILS_V10_CSS_START

   ONLY:
   1. popular book rail
   2. home promo rail

   Hero / header / Raniko / footer untouched.
   ============================================================ */


/* ============================================================
   1. POPULAR BOOK RAIL
   ============================================================ */

.premium-book-grid.ranoteka-book-rail-v10 {

    display: flex !important;

    grid-template-columns: none !important;
    grid-auto-flow: unset !important;

    align-items: flex-start !important;

    /*
       Не растягиваем ленту на всю бесконечную ширину монитора.
    */
    width: calc(100% - 56px) !important;
    max-width: 1500px !important;
    min-width: 0 !important;

    box-sizing: border-box !important;

    margin-left: auto !important;
    margin-right: auto !important;

    gap: 10px !important;

    padding:
        4px
        1px
        12px
        1px
        !important;

    overflow-x: auto !important;
    overflow-y: hidden !important;

    overscroll-behavior-x: contain !important;

    -webkit-overflow-scrolling: touch !important;

    scrollbar-width: none !important;

    scroll-snap-type: x proximity !important;

    cursor: grab !important;
}

.premium-book-grid.ranoteka-book-rail-v10::-webkit-scrollbar {
    display: none !important;
}


/* ПК — около 10–11 нормальных карточек */

@media (min-width: 1101px) {

    .premium-book-grid.ranoteka-book-rail-v10
    > .premium-book-card {

        flex:
            0
            0
            128px
            !important;

        width:
            128px
            !important;

        min-width:
            128px
            !important;

        max-width:
            128px
            !important;

        margin: 0 !important;
    }

}


/* ноутбук */

@media (min-width: 701px) and (max-width: 1100px) {

    .premium-book-grid.ranoteka-book-rail-v10 {

        width: calc(100% - 30px) !important;
    }

    .premium-book-grid.ranoteka-book-rail-v10
    > .premium-book-card {

        flex:
            0
            0
            116px
            !important;

        width:
            116px
            !important;

        min-width:
            116px
            !important;

        max-width:
            116px
            !important;
    }

}


/* телефон — 3 книги + немного следующей */

@media (max-width: 700px) {

    .premium-book-grid.ranoteka-book-rail-v10 {

        width: 100% !important;
        max-width: none !important;

        gap: 7px !important;

        margin: 0 !important;

        padding:
            3px
            0
            10px
            0
            !important;

        scroll-snap-type: x mandatory !important;

        cursor: auto !important;
    }


    .premium-book-grid.ranoteka-book-rail-v10
    > .premium-book-card {

        flex:
            0
            0
            calc((100% - 24px) / 3.2)
            !important;

        width:
            calc((100% - 24px) / 3.2)
            !important;

        min-width:
            calc((100% - 24px) / 3.2)
            !important;

        max-width:
            calc((100% - 24px) / 3.2)
            !important;

        margin: 0 !important;

        scroll-snap-align: start !important;
    }

}


/* активный drag */

.premium-book-grid.ranoteka-book-rail-v10.ranoteka-active-drag-v10 {

    cursor: grabbing !important;

    user-select: none !important;
    -webkit-user-select: none !important;

    scroll-snap-type: none !important;

    scroll-behavior: auto !important;
}



/* ============================================================
   2. PROMO RAIL
   Подборка недели / Для новых историй / Выбор читателей
   ============================================================ */

.ranoteka-promo-rail-v10 {

    display: flex !important;

    align-items: stretch !important;

    width: calc(100% - 56px) !important;
    max-width: 1500px !important;
    min-width: 0 !important;

    box-sizing: border-box !important;

    margin-left: auto !important;
    margin-right: auto !important;

    gap: 12px !important;

    overflow-x: auto !important;
    overflow-y: hidden !important;

    padding:
        3px
        1px
        8px
        1px
        !important;

    scrollbar-width: none !important;

    -webkit-overflow-scrolling: touch !important;

    overscroll-behavior-x: contain !important;

    scroll-snap-type: x proximity !important;

    cursor: grab !important;
}

.ranoteka-promo-rail-v10::-webkit-scrollbar {
    display: none !important;
}


/*
   На твоём широком ПК сейчас promo-карточки слишком огромные.
   Делаем примерно по 520px.
   Три карточки уже не помещаются полностью —
   поэтому появляется настоящая горизонтальная лента.
*/

.ranoteka-promo-rail-v10
> .ranoteka-promo-card-v10 {

    flex:
        0
        0
        520px
        !important;

    width:
        520px
        !important;

    min-width:
        520px
        !important;

    max-width:
        520px
        !important;

    box-sizing: border-box !important;

    margin: 0 !important;

    scroll-snap-align: start !important;
}


/* чуть меньше на обычном ноутбуке */

@media (min-width: 701px) and (max-width: 1200px) {

    .ranoteka-promo-rail-v10 {

        width: calc(100% - 30px) !important;
    }

    .ranoteka-promo-rail-v10
    > .ranoteka-promo-card-v10 {

        flex-basis: 440px !important;

        width: 440px !important;
        min-width: 440px !important;
        max-width: 440px !important;
    }

}


/* телефон */

@media (max-width: 700px) {

    .ranoteka-promo-rail-v10 {

        width: 100% !important;
        max-width: none !important;

        gap: 9px !important;

        margin: 0 !important;

        padding:
            2px
            0
            8px
            0
            !important;

        scroll-snap-type: x mandatory !important;

        cursor: auto !important;
    }


    .ranoteka-promo-rail-v10
    > .ranoteka-promo-card-v10 {

        flex:
            0
            0
            84vw
            !important;

        width:
            84vw
            !important;

        min-width:
            84vw
            !important;

        max-width:
            84vw
            !important;
    }

}


/* mouse drag */

.ranoteka-promo-rail-v10.ranoteka-active-drag-v10 {

    cursor: grabbing !important;

    user-select: none !important;
    -webkit-user-select: none !important;

    scroll-snap-type: none !important;

    scroll-behavior: auto !important;
}


/* ============================================================
   RANOTEKA_RAILS_V10_CSS_END
   ============================================================ */



/* ============================================================
   RANOTEKA_RAILS_V11_CSS_START
   Только:
   - Популярное
   - три promo-карточки
   ============================================================ */


/* ============================================================
   POPULAR
   ============================================================ */

.premium-book-grid.ranoteka-book-rail-v11 {

    display: flex !important;

    grid-template-columns: none !important;
    grid-auto-flow: unset !important;

    align-items: flex-start !important;

    width: calc(100% - 40px) !important;
    max-width: 1420px !important;
    min-width: 0 !important;

    box-sizing: border-box !important;

    margin-left: auto !important;
    margin-right: auto !important;

    padding: 4px 1px 12px !important;

    gap: 10px !important;

    overflow-x: auto !important;
    overflow-y: hidden !important;

    scrollbar-width: none !important;

    -webkit-overflow-scrolling: touch !important;

    overscroll-behavior-x: contain !important;

    scroll-snap-type: x proximity !important;

    cursor: grab !important;

    touch-action: pan-x pan-y !important;
}


.premium-book-grid.ranoteka-book-rail-v11::-webkit-scrollbar {
    display: none !important;
}


.premium-book-grid.ranoteka-book-rail-v11
> .premium-book-card {

    flex: 0 0 126px !important;

    width: 126px !important;
    min-width: 126px !important;
    max-width: 126px !important;

    margin: 0 !important;

    scroll-snap-align: start !important;
}


.premium-book-grid.ranoteka-book-rail-v11
img {

    -webkit-user-drag: none !important;

    user-select: none !important;
    -webkit-user-select: none !important;
}


.premium-book-grid.ranoteka-book-rail-v11.ranoteka-dragging-v11 {

    cursor: grabbing !important;

    scroll-snap-type: none !important;

    scroll-behavior: auto !important;

    user-select: none !important;
    -webkit-user-select: none !important;
}


/* ============================================================
   PROMO
   ============================================================ */

.ranoteka-promo-rail-v11 {

    display: flex !important;

    align-items: stretch !important;

    width: calc(100% - 40px) !important;
    max-width: 1420px !important;
    min-width: 0 !important;

    box-sizing: border-box !important;

    margin-left: auto !important;
    margin-right: auto !important;

    padding: 3px 1px 9px !important;

    gap: 12px !important;

    overflow-x: auto !important;
    overflow-y: hidden !important;

    scrollbar-width: none !important;

    -webkit-overflow-scrolling: touch !important;

    overscroll-behavior-x: contain !important;

    scroll-snap-type: x proximity !important;

    cursor: grab !important;

    touch-action: pan-x pan-y !important;
}


.ranoteka-promo-rail-v11::-webkit-scrollbar {
    display: none !important;
}


.ranoteka-promo-rail-v11
> .ranoteka-promo-card-v11 {

    flex: 0 0 430px !important;

    width: 430px !important;
    min-width: 430px !important;
    max-width: 430px !important;

    box-sizing: border-box !important;

    margin: 0 !important;

    scroll-snap-align: start !important;
}


.ranoteka-promo-rail-v11.ranoteka-dragging-v11 {

    cursor: grabbing !important;

    scroll-snap-type: none !important;

    scroll-behavior: auto !important;

    user-select: none !important;
    -webkit-user-select: none !important;
}


/* ============================================================
   MOBILE
   ============================================================ */

@media (max-width: 700px) {

    .premium-book-grid.ranoteka-book-rail-v11 {

        width: 100% !important;
        max-width: none !important;

        margin: 0 !important;

        gap: 7px !important;

        padding: 3px 0 9px !important;

        scroll-snap-type: x mandatory !important;

        cursor: auto !important;
    }


    .premium-book-grid.ranoteka-book-rail-v11
    > .premium-book-card {

        flex:
            0 0
            calc((100% - 23px) / 3.2)
            !important;

        width:
            calc((100% - 23px) / 3.2)
            !important;

        min-width:
            calc((100% - 23px) / 3.2)
            !important;

        max-width:
            calc((100% - 23px) / 3.2)
            !important;
    }


    .ranoteka-promo-rail-v11 {

        width: 100% !important;
        max-width: none !important;

        margin: 0 !important;

        gap: 8px !important;

        padding: 2px 0 8px !important;

        scroll-snap-type: x mandatory !important;

        cursor: auto !important;
    }


    .ranoteka-promo-rail-v11
    > .ranoteka-promo-card-v11 {

        flex: 0 0 78vw !important;

        width: 78vw !important;
        min-width: 78vw !important;
        max-width: 78vw !important;
    }

}


/* RANOTEKA_RAILS_V11_CSS_END */



/* ============================================================
   RANOTEKA_PROMO_INFINITY_V11_1_CSS_START

   ONLY central promo rail.
   Popular / Hero / Raniko / footer untouched.
   ============================================================ */

.ranoteka-promo-rail-v11.ranoteka-promo-infinite-v11-1 {

    overflow-x: auto !important;
    overflow-y: hidden !important;

    scroll-behavior: auto !important;

    overscroll-behavior-x: contain !important;

    -webkit-overflow-scrolling: touch !important;

    scrollbar-width: none !important;

    cursor: grab !important;
}


.ranoteka-promo-rail-v11.ranoteka-promo-infinite-v11-1::-webkit-scrollbar {
    display: none !important;
}


.ranoteka-promo-rail-v11.ranoteka-promo-infinite-v11-1
> .ranoteka-promo-card-v11 {

    flex-shrink: 0 !important;

    scroll-snap-align: start !important;
}


.ranoteka-promo-rail-v11.ranoteka-promo-infinite-v11-1.ranoteka-promo-loop-dragging {

    cursor: grabbing !important;

    scroll-snap-type: none !important;

    user-select: none !important;
    -webkit-user-select: none !important;
}


.ranoteka-promo-rail-v11.ranoteka-promo-infinite-v11-1
img {

    -webkit-user-drag: none !important;

    user-select: none !important;
    -webkit-user-select: none !important;
}


@media (max-width: 700px) {

    .ranoteka-promo-rail-v11.ranoteka-promo-infinite-v11-1 {

        cursor: auto !important;

        scroll-snap-type: x mandatory !important;
    }

}


/* RANOTEKA_PROMO_INFINITY_V11_1_CSS_END */



/* ============================================================
   RANOTEKA_RAIL_ENGINE_V12_CSS_START

   V12:
   - no hard scroll snap
   - natural free drag
   - infinite promo
   - infinite books
   - visual dimensions inherited from current V11
   ============================================================ */


/* ============================================================
   BOOKS
   ============================================================ */

.premium-book-grid.ranoteka-infinite-v12 {

    overflow-x: auto !important;
    overflow-y: hidden !important;

    scrollbar-width: none !important;

    -webkit-overflow-scrolling: touch !important;

    overscroll-behavior-x: contain !important;

    /*
       ГЛАВНОЕ:
       браузер больше НЕ имеет права резко
       притягивать нас к следующей карточке.
    */
    scroll-snap-type: none !important;

    scroll-behavior: auto !important;

    cursor: grab !important;

    touch-action: pan-x pan-y !important;
}

.premium-book-grid.ranoteka-infinite-v12::-webkit-scrollbar {
    display: none !important;
}


.premium-book-grid.ranoteka-infinite-v12
> .premium-book-card {

    /*
       Старые scroll-snap-align могут оставаться,
       но родительский snap отключён.
    */
    scroll-snap-align: none !important;

    flex-shrink: 0 !important;
}


.premium-book-grid.ranoteka-infinite-v12
img {

    -webkit-user-drag: none !important;

    user-select: none !important;
    -webkit-user-select: none !important;
}



/* ============================================================
   PROMO
   ============================================================ */

.ranoteka-promo-rail-v12 {

    overflow-x: auto !important;
    overflow-y: hidden !important;

    scrollbar-width: none !important;

    -webkit-overflow-scrolling: touch !important;

    overscroll-behavior-x: contain !important;

    scroll-snap-type: none !important;

    scroll-behavior: auto !important;

    cursor: grab !important;

    touch-action: pan-x pan-y !important;
}


.ranoteka-promo-rail-v12::-webkit-scrollbar {
    display: none !important;
}


.ranoteka-promo-rail-v12
> .ranoteka-promo-card-v11 {

    scroll-snap-align: none !important;

    flex-shrink: 0 !important;
}


.ranoteka-promo-rail-v12
img {

    -webkit-user-drag: none !important;

    user-select: none !important;
    -webkit-user-select: none !important;
}



/* ============================================================
   ACTIVE MOUSE DRAG
   ============================================================ */

.ranoteka-infinite-v12.ranoteka-dragging-v12,
.ranoteka-promo-rail-v12.ranoteka-dragging-v12 {

    cursor: grabbing !important;

    user-select: none !important;
    -webkit-user-select: none !important;

    scroll-snap-type: none !important;

    scroll-behavior: auto !important;
}


.ranoteka-infinite-v12.ranoteka-dragging-v12 *,
.ranoteka-promo-rail-v12.ranoteka-dragging-v12 * {

    user-select: none !important;
    -webkit-user-select: none !important;
}



/* ============================================================
   MOBILE
   Оставляем нативное движение пальцем,
   но БЕЗ жёсткого snap.
   ============================================================ */

@media (max-width: 700px) {

    .premium-book-grid.ranoteka-infinite-v12,
    .ranoteka-promo-rail-v12 {

        cursor: auto !important;

        scroll-snap-type: none !important;

        -webkit-overflow-scrolling: touch !important;
    }

}


/* RANOTEKA_RAIL_ENGINE_V12_CSS_END */

/* Community and earned profile appearance. */
.user-name { display:inline-flex; align-items:center; gap:6px; flex-wrap:wrap; font-weight:800; text-decoration:none; }
.user-name strong { color:inherit; }
.user-name small { color:var(--muted,#9da7bd); font-size:.78em; font-weight:600; }
.user-name--default { color:inherit; }
.user-name--blue { color:#67b8ff; }
.user-name--green { color:#72e2a4; }
.user-name--orange { color:#ffad62; }
.user-name--pink { color:#f59bff; }
.user-name--red { color:#ff6d7f; }
.user-name--gold { color:#ffd86e; }
.user-name--legend { color:#f7e8ff; text-shadow:0 0 12px rgba(230,157,255,.6); }
.user-crown { display:inline-block; line-height:1; font-size:1.05em; }
.user-crown--gold,.user-crown--exclusive { color:#ffd86e; }
.account-drawer__id { color:var(--muted,#9da7bd); font-size:12px; }
.public-chat { display:grid; gap:8px; }
.public-chat__message { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:2px 12px; padding:7px 0; border-bottom:1px solid var(--line,#22293b); }
.public-chat__message:last-child { border-bottom:0; }
.public-chat__author { display:flex; align-items:center; gap:6px; min-width:0; }
.public-chat__message p { grid-column:1 / -1; margin:0; color:var(--text,#eef1ff); line-height:1.35; overflow-wrap:anywhere; }
.public-chat__message time { grid-column:2; grid-row:1; color:var(--muted,#9da7bd); font-size:12px; }
.public-chat__head { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; }
.public-chat__avatar-link { flex:none; border-radius:50%; }
.public-chat__author-main { min-width:0; display:flex; align-items:center; flex-wrap:wrap; gap:5px; }
.public-chat__author-main .user-name { min-width:0; }
.public-chat__write { color:#bc91ff; font-size:10px; font-weight:800; }
.public-chat__write:hover { color:#fff; text-decoration:underline; }
.public-chat__quote { grid-column:1 / -1; min-width:0; margin:1px 0 0; padding:5px 8px; display:grid; gap:2px; border-left:3px solid rgba(173,117,255,.65); border-radius:0 7px 7px 0; color:var(--muted); background:rgba(125,60,255,.08); }
.public-chat__quote span { font-size:10px; font-weight:800; color:#b993ff; }
.public-chat__quote strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--text); font-size:11px; font-weight:600; }
.public-chat__forwarded { grid-column:1 / -1; margin:1px 0 0; color:var(--muted); font-size:10px; }
.public-chat__forwarded > span { color:#b993ff; font-size:14px; font-weight:900; }
.public-chat__forwarded a { color:#c69cff; font-weight:800; }
.public-chat__actions { grid-column:1 / -1; display:flex; align-items:center; gap:3px; min-height:22px; margin-top:0; }
.public-chat__action { min-height:22px; padding:2px 6px; border:1px solid transparent; border-radius:6px; color:var(--muted); background:transparent; font-size:10px; font-weight:750; transition:color .16s ease, border-color .16s ease, background .16s ease; }
.public-chat__action:hover,.public-chat__action:focus-visible { border-color:rgba(173,117,255,.35); color:var(--text); background:rgba(125,60,255,.1); }
.public-chat__action--like { display:inline-flex; align-items:center; gap:4px; }
.public-chat__action--like span:first-child { color:#ff7c9e; font-size:14px; line-height:1; }
.public-chat__action--like.is-liked { border-color:rgba(255,92,132,.35); color:#ff7696; background:rgba(255,62,111,.1); }
.public-chat__action--like.is-liked span:first-child { color:#ff416f; }
.chat-compose__context { grid-column:1 / -1; min-width:0; display:flex; align-items:center; justify-content:space-between; gap:10px; padding:8px 10px; border-left:3px solid rgba(173,117,255,.65); border-radius:0 7px 7px 0; color:#c6a3ff; background:rgba(125,60,255,.1); font-size:11px; }
.chat-compose__context.is-error { border-left-color:var(--danger); color:#ff9db3; background:rgba(255,62,111,.1); }
.chat-compose__context span { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.chat-compose__cancel { width:25px; height:25px; flex:none; border:0; border-radius:7px; color:var(--muted); background:transparent; font-size:18px; line-height:1; }
.chat-compose__cancel:hover { color:var(--text); background:rgba(255,255,255,.08); }
.public-chat-preview > .panel { padding:12px 18px; }
.appearance-form { max-width:620px; }

/* Profile settings: one compact workspace for identity, appearance and access. */
.settings-shell { max-width:1180px; }
.settings-page-head { align-items:flex-end; }
.settings-page-head h1 { margin-bottom:7px; }
.settings-grid { display:grid; grid-template-columns:minmax(0,1.18fr) minmax(320px,.82fr); gap:16px; align-items:start; }
.settings-card { min-width:0; padding:24px; }
.settings-card--profile { grid-row:span 2; }
.settings-card__head { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; margin-bottom:20px; }
.settings-card__head h2 { margin:5px 0 6px; font-size:22px; }
.settings-card__head p { max-width:620px; margin:0; font-size:12px; line-height:1.55; }
.settings-card__kicker { color:#b692ff; font-size:10px; font-weight:900; letter-spacing:.1em; }
.settings-profile-layout { display:grid; grid-template-columns:180px minmax(0,1fr); gap:24px; align-items:start; }
.settings-avatar-column { display:grid; justify-items:center; min-width:0; }
.settings-avatar-preview { width:156px; height:156px; display:grid; place-items:center; overflow:hidden; border:3px solid rgba(178,111,255,.44); border-radius:50%; background:linear-gradient(145deg,rgba(125,60,255,.32),rgba(216,77,255,.16)); box-shadow:0 15px 40px rgba(0,0,0,.2); }
.avatar--settings { width:100%; height:100%; font-size:43px; }
.settings-avatar-actions { display:flex; justify-content:center; flex-wrap:wrap; gap:7px; margin-top:13px; }
.settings-avatar-status { margin:8px 0 0; text-align:center; font-size:10px; line-height:1.35; }
.has-avatar-crop-dialog { overflow:hidden; }
.avatar-crop-dialog { position:fixed; inset:0; z-index:500; display:grid; place-items:center; padding:18px; }
.avatar-crop-dialog__backdrop { position:absolute; inset:0; background:rgba(4,6,14,.76); backdrop-filter:blur(10px); }
.avatar-crop-dialog__panel { position:relative; width:min(520px,100%); max-height:min(760px,calc(100vh - 36px)); overflow:auto; border:1px solid rgba(184,139,255,.36); border-radius:18px; background:linear-gradient(150deg,#171b31,#0e1221); box-shadow:0 28px 90px rgba(0,0,0,.48); }
.avatar-crop-dialog__head { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; padding:20px 22px 8px; }
.avatar-crop-dialog__head h2 { margin:5px 0 0; color:var(--text); font-size:21px; }
.avatar-crop-dialog__close { width:34px; height:34px; display:grid; place-items:center; flex:none; border:1px solid var(--line); border-radius:10px; color:var(--muted); background:transparent; font-size:24px; line-height:1; cursor:pointer; }
.avatar-crop-dialog__close:hover { color:var(--text); border-color:var(--line-strong); background:rgba(255,255,255,.06); }
.avatar-crop-dialog__body { display:grid; justify-items:center; gap:18px; padding:16px 22px 20px; }
.avatar-crop-stage { width:min(320px,76vw); aspect-ratio:1; overflow:hidden; border:3px solid rgba(181,125,255,.82); border-radius:50%; background:#101426; box-shadow:0 0 0 8px rgba(125,60,255,.11),0 18px 45px rgba(0,0,0,.32); }
.avatar-crop-canvas { display:block; width:100%; height:100%; touch-action:none; cursor:grab; }
.avatar-crop-canvas.is-dragging { cursor:grabbing; }
.avatar-crop-zoom { width:min(320px,76vw); display:grid; gap:8px; color:var(--muted); font-size:11px; font-weight:800; }
.avatar-crop-zoom input { width:100%; accent-color:#a66aff; cursor:pointer; }
.avatar-crop-dialog__hint { max-width:100%; overflow:hidden; color:var(--muted); font-size:10px; line-height:1.35; text-overflow:ellipsis; white-space:nowrap; }
.avatar-crop-dialog__actions { display:flex; justify-content:flex-end; gap:9px; padding:15px 22px 20px; border-top:1px solid var(--line); }
.settings-profile-fields { min-width:0; display:grid; gap:16px; }
.settings-upload { position:relative; min-height:122px; overflow:hidden; border:1px dashed rgba(175,122,255,.45); border-radius:13px; background:rgba(125,60,255,.06); transition:border-color .16s ease, background .16s ease; }
.settings-upload:hover,.settings-upload.is-dragover { border-color:rgba(205,164,255,.9); background:rgba(125,60,255,.13); }
.settings-upload__input { position:absolute; inset:0; z-index:2; width:100%; height:100%; opacity:0; cursor:pointer; }
.settings-upload__label { min-height:122px; padding:18px; display:flex; align-items:center; gap:13px; pointer-events:none; }
.settings-upload__icon { width:42px; height:42px; flex:none; display:grid; place-items:center; border:1px solid rgba(183,133,255,.42); border-radius:12px; color:#d9baff; background:rgba(125,60,255,.18); font-size:25px; font-weight:700; }
.settings-upload__label span:last-child { min-width:0; display:grid; gap:5px; }
.settings-upload__label strong { color:var(--text); font-size:14px; }
.settings-upload__label small { color:var(--muted); font-size:11px; line-height:1.4; }
.settings-file-info { position:relative; z-index:3; margin:0 18px 13px; color:var(--muted); font-size:10px; line-height:1.45; pointer-events:none; }
.settings-file-info.is-error { color:var(--danger); }
.settings-file-info.is-ready { color:var(--success); }
.settings-form-actions { display:flex; align-items:center; flex-wrap:wrap; gap:12px; }
.settings-save-hint { color:var(--muted); font-size:10px; line-height:1.4; }
.settings-choice-group { min-width:0; margin:0; padding:0; border:0; }
.settings-choice-group legend { margin-bottom:9px; color:var(--text); font-size:13px; font-weight:800; }
.settings-theme-options { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.settings-theme-option { min-width:0; position:relative; display:grid; grid-template-columns:minmax(0,1fr) auto; gap:8px; align-items:center; padding:12px; border:1px solid var(--line); border-radius:11px; background:rgba(255,255,255,.025); cursor:pointer; transition:border-color .16s ease, background .16s ease, transform .16s ease; }
.settings-theme-option:hover { transform:translateY(-1px); border-color:var(--line-strong); }
.settings-theme-option input { position:absolute; opacity:0; pointer-events:none; }
.settings-theme-option:focus-within { outline:2px solid #b98aff; outline-offset:2px; }
.settings-theme-option span { min-width:0; display:grid; gap:4px; }
.settings-theme-option strong { color:var(--text); font-size:12px; }
.settings-theme-option small { color:var(--muted); font-size:10px; line-height:1.35; }
.settings-theme-option i { color:#c7a6ff; font-size:21px; font-style:normal; }
.settings-theme-option.is-selected { border-color:rgba(167,111,255,.65); background:rgba(125,60,255,.13); box-shadow:inset 0 0 0 1px rgba(167,111,255,.12); }
.settings-form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.settings-security-form .settings-form-grid { align-items:start; }
.settings-security-form .field { align-content:start; }
.settings-security-form .field > .input { min-height:48px; }
.settings-inline-link { flex:none; color:#c49bff; font-size:11px; font-weight:800; }
.settings-inline-link:hover { color:#fff; }
.settings-notes { margin-top:16px; display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; }
.settings-notes { gap:12px; }
.settings-notes > div { min-width:0; min-height:92px; display:flex; flex-direction:column; justify-content:center; padding:17px 18px; border:1px solid var(--line); border-radius:12px; background:rgba(14,19,32,.48); }
.settings-notes strong { display:block; margin-bottom:7px; color:var(--text); font-size:12px; line-height:1.25; }
.settings-notes span { display:block; color:var(--muted); font-size:11px; line-height:1.55; }

@media (max-width:900px) {
  .settings-grid { grid-template-columns:1fr; }
  .settings-card--profile { grid-row:auto; }
  .settings-notes { grid-template-columns:1fr 1fr; }
  .settings-notes > div:last-child { grid-column:1 / -1; }
}
@media (max-width:620px) {
  .settings-card { padding:17px; }
  .settings-profile-layout { grid-template-columns:1fr; gap:18px; }
  .settings-avatar-column { justify-items:center; }
  .settings-form-grid,.settings-theme-options { grid-template-columns:1fr; }
  .settings-notes { grid-template-columns:1fr; }
  .settings-notes > div:last-child { grid-column:auto; }
  .settings-card__head { margin-bottom:16px; }
  .settings-card__head h2 { font-size:20px; }
  .settings-save-hint { flex-basis:100%; }
  .settings-notes > div { min-height:0; padding:15px 16px; }
  .avatar-crop-dialog { padding:10px; }
  .avatar-crop-dialog__panel { max-height:calc(100vh - 20px); border-radius:15px; }
  .avatar-crop-dialog__head { padding:16px 16px 5px; }
  .avatar-crop-dialog__body { padding:12px 16px 16px; }
  .avatar-crop-dialog__actions { padding:12px 16px 16px; }
}

/* RANOTEKA_HOME_RAIL_V13
   One compact rail for real catalogue cards. The older experimental rail
   rules remain above for rollback, but these final dimensions keep the
   visible cards stable and leave room for the arrow controls. */
.premium-book-grid {
  display: flex !important;
  flex-wrap: nowrap !important;
  width: 100% !important;
  min-width: 0 !important;
  gap: 10px !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  padding: 2px 4px 8px !important;
  scroll-behavior: smooth !important;
  scroll-snap-type: x proximity !important;
  scrollbar-width: none !important;
  -webkit-overflow-scrolling: touch !important;
}

.premium-book-grid::-webkit-scrollbar { display: none !important; }

.premium-book-card {
  flex: 0 0 154px !important;
  width: 154px !important;
  min-width: 154px !important;
  max-width: 154px !important;
  scroll-snap-align: start !important;
}

.premium-book-card__cover {
  aspect-ratio: 3 / 4 !important;
  height: auto !important;
  min-height: 0 !important;
}

.premium-book-strip {
  position: relative !important;
  min-width: 0 !important;
  padding-inline: 18px !important;
}

.premium-book-strip__arrow {
  display: grid !important;
  z-index: 6 !important;
  width: 34px !important;
  height: 52px !important;
}

.top-hero__arrow {
  position: absolute !important;
  top: 50% !important;
  z-index: 20 !important;
  display: grid !important;
  place-items: center !important;
  width: 42px !important;
  height: 42px !important;
  padding: 0 !important;
  transform: translateY(-50%) !important;
  border: 1px solid rgba(255,255,255,.2) !important;
  border-radius: 12px !important;
  color: #fff !important;
  background: rgba(8,10,24,.78) !important;
  box-shadow: 0 8px 24px rgba(0,0,0,.35) !important;
  cursor: pointer !important;
  pointer-events: auto !important;
}

.top-hero__arrow:hover {
  border-color: rgba(210,153,255,.8) !important;
  background: rgba(92,39,155,.9) !important;
}

.top-hero__arrow--prev { left: 16px !important; }
.top-hero__arrow--next { right: 16px !important; }

@media (max-width: 700px) {
  .premium-book-grid {
    gap: 8px !important;
    padding-inline: 2px !important;
    scroll-snap-type: x proximity !important;
  }

  .premium-book-card {
    flex-basis: 128px !important;
    width: 128px !important;
    min-width: 128px !important;
    max-width: 128px !important;
  }

  .premium-book-card__body { padding: 8px 8px 9px !important; }
  .premium-book-card__title { font-size: 10px !important; }
  .premium-book-card__footer { font-size: 8px !important; }
}

/* RANOTEKA_HOME_UX_V14 */
.premium-section,
.premium-book-strip {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  overflow: hidden !important;
}

.premium-book-grid,
.premium-book-grid.ranoteka-infinite-v12,
.ranoteka-book-rail-v11 {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  flex: 0 1 auto !important;
  cursor: default !important;
  touch-action: pan-x pan-y !important;
}

.premium-book-strip {
  position: relative;
  min-width: 0;
}

.premium-book-strip__arrow {
  position: absolute;
  top: 50%;
  z-index: 8;
  display: grid;
  place-items: center;
  width: 36px;
  height: 54px;
  padding: 0;
  color: #fff;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 12px;
  background: rgba(10,12,27,.9);
  box-shadow: 0 10px 28px rgba(0,0,0,.35);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-50%);
  transition: opacity .18s ease, background .18s ease;
}

.premium-book-strip__arrow:hover { background: rgba(112,48,193,.92); }
.premium-book-strip__arrow:disabled { opacity: .28; cursor: default; }
.premium-book-strip:not(.is-scrollable) .premium-book-strip__arrow { opacity: 0 !important; pointer-events: none !important; }
.premium-book-strip.is-scrollable .premium-book-strip__arrow { opacity: 1; pointer-events: auto; }
.premium-book-strip__arrow--prev { left: 0; }
.premium-book-strip__arrow--next { right: 0; }

.premium-book-card {
  height: 342px !important;
  display: flex !important;
  flex-direction: column !important;
  position: relative !important;
}

.premium-book-card__cover { flex: 0 0 auto !important; }
.premium-book-card__body { flex: 1 1 auto !important; display: flex; flex-direction: column; min-height: 0; }
.premium-book-card__footer { margin-top: auto !important; }
.premium-book-card__taxonomy {
  display: flex;
  gap: 5px;
  min-height: 19px;
  margin-top: 8px;
  overflow: hidden;
}
.premium-book-card__taxonomy span {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 3px 6px;
  color: #dbc5ff;
  border: 1px solid rgba(178,120,255,.35);
  border-radius: 6px;
  background: rgba(122,62,215,.17);
  font-size: 11px;
  font-weight: 750;
  line-height: 1.1;
}

.premium-book-card__bookmark-form {
  position: absolute;
  z-index: 6;
  top: 9px;
  right: 9px;
  margin: 0;
}
.premium-book-card__bookmark-form input[type="hidden"] { display: none; }
.premium-book-card__bookmark[data-guest-bookmark] { cursor: pointer; }
.premium-book-card__bookmark.is-active,
.premium-book-card__bookmark-form .premium-book-card__bookmark:hover,
.premium-book-card__bookmark[data-guest-bookmark]:hover {
  color: #ffd45c;
  border-color: rgba(255,212,92,.62);
  background: rgba(82,60,5,.78);
}
.raniko-premium-guide.raniko-bookmark-prompt { z-index: 10002 !important; }

.premium-promo__summary { display: block; min-height: 190px; color: inherit; cursor: pointer; list-style: none; }
.premium-promo__summary::-webkit-details-marker { display: none; }
.premium-promo__summary > .premium-promo__body { min-height: 190px; }
.premium-promo--stories[open] { z-index: 10; overflow: visible; }
.premium-promo--stories[open] .premium-promo__summary b span { display: inline-block; transform: rotate(180deg); }
.premium-story-picker {
  position: absolute;
  z-index: 12;
  right: 12px;
  bottom: 12px;
  left: 12px;
  display: grid;
  gap: 6px;
  max-height: min(330px, 52vh);
  padding: 10px;
  overflow: auto;
  border: 1px solid rgba(203,133,255,.38);
  border-radius: 12px;
  background: rgba(9,8,24,.97);
  box-shadow: 0 18px 42px rgba(0,0,0,.5);
}
.premium-story-picker__item { display: grid; grid-template-columns: 24px minmax(0,1fr) auto; align-items: center; gap: 8px; padding: 8px; color: #fff; border: 1px solid rgba(255,255,255,.09); border-radius: 9px; text-decoration: none; background: rgba(255,255,255,.035); }
.premium-story-picker__item:hover { border-color: rgba(210,145,255,.65); background: rgba(122,62,215,.2); }
.premium-story-picker__index { display: grid; place-items: center; width: 22px; height: 22px; color: #e7caff; border-radius: 50%; background: rgba(139,78,232,.35); font-size: 11px; font-weight: 850; }
.premium-story-picker__item strong, .premium-story-picker__item small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.premium-story-picker__item strong { font-size: 12px; }
.premium-story-picker__item small { margin-top: 2px; color: #a8abc0; font-size: 10px; }

.premium-fandoms__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.premium-fandom { display: grid; gap: 5px; padding: 14px; color: #fff; border: 1px solid rgba(178,120,255,.28); border-radius: 12px; background: linear-gradient(135deg, rgba(53,25,83,.55), rgba(19,25,51,.72)); text-decoration: none; }
.premium-fandom:hover { border-color: rgba(210,145,255,.68); transform: translateY(-2px); }
.premium-fandom strong { font-size: 15px; }
.premium-fandom span { color: #b8bbcf; font-size: 12px; }
.premium-fandoms__empty { display: grid; gap: 6px; padding: 18px; }
.premium-fandoms__empty span { color: #a8abc0; font-size: 13px; }

.auth-raniko-register { min-width: 0; }
.raniko-premium-guide--inline { position: relative !important; inset: auto !important; width: 100% !important; max-width: none !important; opacity: 1 !important; transform: none !important; filter: none !important; }
.raniko-premium-guide--inline .raniko-premium-guide__card { min-height: 330px !important; grid-template-columns: minmax(0,1fr) 118px !important; border-radius: 18px !important; }
.raniko-premium-guide--inline .raniko-premium-guide__copy { padding: 20px 8px 18px 18px !important; }
.raniko-premium-guide--inline .raniko-premium-guide__text { max-width: 100% !important; font-size: 12px !important; }
.raniko-premium-guide--inline .raniko-premium-guide__character { min-height: 330px !important; }
.raniko-premium-guide--inline .raniko-premium-guide__character img { width: 125px !important; right: -5px !important; bottom: -20px !important; }
.raniko-premium-guide--inline .raniko-premium-guide__cta { max-width: 190px; font-size: 11px; }

@media (max-width: 820px) {
  .premium-fandoms__grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .raniko-premium-guide--inline .raniko-premium-guide__card { min-height: 245px !important; grid-template-columns: minmax(0,1fr) 110px !important; }
  .raniko-premium-guide--inline .raniko-premium-guide__character { min-height: 245px !important; }
  .raniko-premium-guide--inline .raniko-premium-guide__character img { width: 120px !important; }
}

@media (max-width: 560px) {
  .premium-book-card { height: 310px !important; }
  .premium-book-card__taxonomy span { font-size: 9px; }
  .premium-book-strip__arrow { width: 30px; height: 46px; }
  .premium-fandoms__grid { grid-template-columns: 1fr; }
  .raniko-premium-guide--inline .raniko-premium-guide__card { min-height: 210px !important; grid-template-columns: minmax(0,1fr) 92px !important; }
  .raniko-premium-guide--inline .raniko-premium-guide__character { min-height: 210px !important; }
  .raniko-premium-guide--inline .raniko-premium-guide__character img { width: 102px !important; }
}

/* RANOTEKA_PROMO_SHELF_V1 */
.premium-promo--stories {
  grid-column: 1 / -1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(260px, .72fr) minmax(0, 1.28fr);
  align-items: stretch;
}
.premium-promo--stories > .premium-promo__body { min-height: 210px; }
.premium-story-shelf {
  position: relative;
  z-index: 3;
  display: flex;
  gap: 10px;
  min-width: 0;
  align-items: stretch;
  overflow-x: auto;
  padding: 18px 18px 18px 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(190,112,255,.55) transparent;
}
.premium-story-shelf__item {
  flex: 0 0 min(220px, 42%);
  min-width: 160px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  padding: 10px;
  color: #fff;
  text-decoration: none;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 12px;
  background: rgba(6,8,20,.58);
  transition: border-color .18s ease, transform .18s ease, background .18s ease;
}
.premium-story-shelf__item:hover { border-color: rgba(211,137,255,.72); background: rgba(75,35,130,.36); transform: translateY(-2px); }
.premium-story-shelf__cover, .premium-story-shelf__cover img { width: 42px; height: 58px; border-radius: 7px; object-fit: cover; background: #101426; }
.premium-story-shelf__item strong, .premium-story-shelf__item small { display: block; overflow: hidden; text-overflow: ellipsis; }
.premium-story-shelf__item strong { display: -webkit-box; font-size: 12px; line-height: 1.25; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.premium-story-shelf__item small { margin-top: 5px; color: #b5b8cc; font-size: 10px; white-space: nowrap; }
.premium-promo-carousel { position: relative; margin-top: 14px; }
.premium-promo-carousel__head { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.premium-promo-carousel__head h2 { margin: 3px 0 0; font-size: 20px; }
.premium-promo-carousel__controls { display: flex; gap: 6px; }
.premium-promo-carousel__arrow { width: 36px; height: 34px; display: grid; place-items: center; color: #fff; border: 1px solid rgba(186,112,255,.45); border-radius: 9px; background: rgba(18,15,38,.86); cursor: pointer; }
.premium-promo-carousel__arrow:hover { border-color: rgba(225,164,255,.9); background: rgba(109,52,184,.78); }
.premium-promo-carousel__track { display: flex; gap: 12px; overflow-x: auto; padding: 2px 2px 8px; scroll-behavior: smooth; scroll-snap-type: x proximity; scrollbar-width: thin; scrollbar-color: rgba(190,112,255,.55) transparent; cursor: grab; touch-action: pan-y; user-select: none; }
.premium-promo-carousel__track.is-dragging { cursor: grabbing; scroll-behavior: auto; scroll-snap-type: none; }
.premium-promo-carousel__track.is-dragging .premium-promo { pointer-events: none; }
.premium-promo-carousel__track .premium-promo { flex: 0 0 min(560px, calc(50% - 6px)); min-height: 190px; scroll-snap-align: start; }
.premium-promo-carousel__track .premium-promo__body { min-height: 190px; }
.premium-promo-carousel__track::-webkit-scrollbar, .premium-story-shelf::-webkit-scrollbar { height: 5px; }
.premium-promo-carousel__track::-webkit-scrollbar-thumb, .premium-story-shelf::-webkit-scrollbar-thumb { background: rgba(190,112,255,.52); border-radius: 999px; }
.ranoteka-promo-rail-v10 > .premium-promo--stories,
.ranoteka-promo-rail-v11 > .premium-promo--stories { flex: 0 0 min(100%, 1500px) !important; width: min(100%, 1500px) !important; min-width: min(100%, 1500px) !important; max-width: min(100%, 1500px) !important; }
.auth-raniko-login { min-width: 0; }
.auth-login-shell { align-items: start; }
.auth--login { width: 100%; max-width: 620px; margin: 0; padding: clamp(24px, 3vw, 38px); }
.auth--login h1 { margin: 14px 0 8px; font-size: clamp(32px, 3vw, 44px); }
.auth--login > p { font-size: 15px; line-height: 1.6; }
.profile-hero { padding: clamp(22px, 3vw, 36px) !important; border-color: rgba(158,105,255,.25) !important; box-shadow: 0 18px 50px rgba(0,0,0,.2), inset 0 1px 0 rgba(255,255,255,.04); }
.profile-main h1 { letter-spacing: -.02em; }
.profile-actions .btn { min-width: 168px; justify-content: flex-start; }

/* Auth guides are intentionally compact, horizontal cards. */
.auth-story-shell {
  grid-template-columns: minmax(320px, 430px) minmax(560px, 760px) !important;
  align-items: center !important;
  min-height: 0 !important;
  padding-block: 28px 34px !important;
}
.auth-raniko-register,
.auth-raniko-login { align-self: start; }
.raniko-premium-guide.raniko-premium-guide--inline .raniko-premium-guide__card {
  min-height: 230px !important;
  height: 230px !important;
  grid-template-columns: minmax(0,1fr) 138px !important;
}
.raniko-premium-guide.raniko-premium-guide--inline .raniko-premium-guide__character,
.raniko-premium-guide.raniko-premium-guide--inline .raniko-premium-guide__character img { min-height: 230px !important; }
.raniko-premium-guide.raniko-premium-guide--inline .raniko-premium-guide__character img { width: 132px !important; bottom: -8px !important; }
.raniko-premium-guide--login .raniko-premium-guide__character img { object-fit: contain !important; object-position: right bottom !important; }
.raniko-premium-guide--register .raniko-premium-guide__character img { object-fit: cover !important; object-position: 70% 55% !important; }
.auth-story-shell .novi-guide__steps { margin-top: 14px; }
.auth-story-shell .auth--login,
.auth-story-shell .auth--registration { align-self: center; margin-inline: auto; }

/* Consistent library cards and continuation tiles. */
.library-tabs .grid { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); align-items: stretch; }
.library-tabs .book-card { height: 100%; min-height: 390px; }
.library-tabs .book-card__cover { height: 250px; aspect-ratio: auto; }
.library-tabs .book-card__body { min-height: 128px; }
.continue-grid { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.continue-card { min-height: 132px; height: 132px; }

.spark-glyph,
.spark-inline,
.topup-cta__spark { color: #ffd866; font-weight: 950; text-shadow: 0 0 12px rgba(255,216,102,.55); }
.spark-glyph { display: inline-block; font-size: .95em; transform: rotate(-8deg); }
.spark-inline { margin-right: 4px; }
.topup-launcher__button > span:first-child { color: #ffd866; }
.spark-package-card__figure span { color: #ffd866; }

/* Rich fandom tiles even when only a few books are currently tagged. */
.premium-fandoms__grid { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)) !important; }
.premium-fandom { min-height: 118px; align-content: end; overflow: hidden; position: relative; background: radial-gradient(circle at 85% 18%, rgba(190,112,255,.42), transparent 42%), linear-gradient(135deg, rgba(60,28,112,.84), rgba(11,17,42,.95)); }
.premium-fandom::after { content: '✦'; position: absolute; right: 16px; top: 10px; color: rgba(255,220,130,.9); font-size: 36px; text-shadow: 0 0 24px rgba(198,122,255,.65); }
.premium-fandom:nth-child(2) { background: radial-gradient(circle at 82% 20%, rgba(235,77,77,.5), transparent 44%), linear-gradient(135deg, #43152c, #101936); }
.premium-fandom:nth-child(3) { background: radial-gradient(circle at 82% 18%, rgba(70,160,255,.5), transparent 44%), linear-gradient(135deg, #122d58, #10152d); }
.premium-fandom:nth-child(4) { background: radial-gradient(circle at 82% 18%, rgba(255,188,63,.45), transparent 44%), linear-gradient(135deg, #4b2b0c, #15182f); }
.premium-fandom:nth-child(5) { background: radial-gradient(circle at 82% 18%, rgba(66,223,163,.45), transparent 44%), linear-gradient(135deg, #0e3c3b, #121a32); }
.premium-fandom { background-image: linear-gradient(180deg, rgba(8,10,28,.08), rgba(8,10,28,.88)), var(--fandom-cover); background-size: cover; background-position: center; }

/* Fandom tiles keep the artwork clear; the title sits below the image, outside its frame. */
.premium-fandom {
  min-height: 0 !important;
  display: grid !important;
  grid-template-rows: auto auto !important;
  gap: 8px !important;
  padding: 0 !important;
  overflow: visible !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  transition: none !important;
}
.premium-fandom:hover { transform: none !important; }
.premium-fandom::after { display: none !important; }
.premium-fandom__cover {
  display: block;
  width: 100%;
  aspect-ratio: 2 / 3;
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgba(178,120,255,.38);
  border-radius: 12px;
  background-color: #10182f;
  background-image: var(--fandom-cover);
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  box-shadow: 0 8px 22px rgba(0,0,0,.22);
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.premium-fandom:hover .premium-fandom__cover { border-color: rgba(225,164,255,.82); box-shadow: 0 14px 28px rgba(0,0,0,.34); transform: translateY(-2px); }
.premium-fandom__body {
  display: grid;
  gap: 4px;
  min-width: 0;
  min-height: 0;
  padding: 0 3px 2px !important;
  background: transparent !important;
}
.premium-fandom__body strong {
  min-width: 0;
  overflow: hidden;
  color: #fff;
  font-size: 14px;
  line-height: 1.25;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.premium-fandom__body span {
  min-width: 0;
  overflow: hidden;
  color: #b8bbcf;
  font-size: 11px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 900px) {
  .auth-story-shell { grid-template-columns: 1fr !important; max-width: 720px; }
  .auth-raniko-register, .auth-raniko-login { width: min(100%, 520px); margin-inline: auto; }
  .auth-story-shell .auth--login, .auth-story-shell .auth--registration { width: min(100%, 680px); }
}
@media (max-width: 560px) {
  .raniko-premium-guide.raniko-premium-guide--inline .raniko-premium-guide__card { min-height: 180px !important; height: 180px !important; grid-template-columns: minmax(0,1fr) 100px !important; }
  .raniko-premium-guide.raniko-premium-guide--inline .raniko-premium-guide__character,
  .raniko-premium-guide.raniko-premium-guide--inline .raniko-premium-guide__character img { min-height: 180px !important; }
  .raniko-premium-guide.raniko-premium-guide--inline .raniko-premium-guide__character img { width: 96px !important; }
  .library-tabs .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .library-tabs .book-card { min-height: 320px; }
  .library-tabs .book-card__cover { height: 190px; }
  .premium-fandom { min-height: 0 !important; }
  .premium-fandom__body { min-height: 0; padding: 0 2px 1px !important; }
  .premium-fandom__body strong { font-size: 13px; }
  .premium-fandom__body span { font-size: 10px; }
}
@media (max-width: 820px) {
  .premium-promo--stories { grid-column: auto; display: block; }
  .premium-promo--stories > .premium-promo__body { min-height: 176px; }
  .premium-story-shelf { padding: 0 14px 14px; }
  .premium-story-shelf__item { flex-basis: 74%; }
  .premium-promo-carousel__track .premium-promo { flex-basis: 88%; }
}
@media (max-width: 560px) {
  .premium-promo-carousel__track .premium-promo { flex-basis: 94%; }
  .auth-login-shell { padding-top: 12px; }
}

/* RANOTEKA_UX_STABILITY_V15: final rules intentionally live last. */
.premium-promos {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  align-items: start !important;
  gap: 12px !important;
  overflow: visible !important;
}
.premium-promos > .premium-promo {
  min-width: 0 !important;
  min-height: 220px !important;
  height: 220px !important;
}
.premium-promos > .premium-promo .premium-promo__body {
  min-height: 220px !important;
  padding: 20px !important;
}
.premium-promo__action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding: 9px 12px;
  color: #fff;
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 9px;
  background: rgba(4,6,16,.48);
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}
.premium-promo__action:hover,
.premium-promo__action:focus-visible { border-color: rgba(226,167,255,.8); background: rgba(104,47,177,.65); }
.premium-promo--stories {
  grid-column: auto !important;
  display: flex !important;
  flex-direction: column !important;
  min-height: 220px !important;
  height: 220px !important;
}
.premium-promo--stories > .premium-promo__body {
  flex: 1 1 auto !important;
  min-height: 220px !important;
}
.premium-story-shelf {
  display: none !important;
  flex: 0 0 auto !important;
  width: 100% !important;
  box-sizing: border-box !important;
  padding: 12px 16px 16px !important;
  gap: 10px !important;
  overflow-x: auto !important;
  background: rgba(5,6,17,.56);
}
.premium-promo--stories.is-open {
  grid-column: 1 / -1 !important;
  height: auto !important;
  min-height: 220px !important;
}
.premium-promo--stories.is-open > .premium-promo__body {
  flex: 0 0 220px !important;
}
.premium-promo--stories.is-open .premium-story-shelf { display: flex !important; }
.premium-story-shelf__item {
  flex: 0 0 190px !important;
  min-width: 190px !important;
  min-height: 76px !important;
}

.premium-section { overflow: visible !important; }
.premium-book-strip { overflow: visible !important; }
.premium-book-grid { cursor: default !important; }
.premium-book-strip.is-scrollable .premium-book-strip__arrow {
  opacity: 1 !important;
  pointer-events: auto !important;
}
.premium-book-strip__arrow[hidden] { display: none !important; }

/* Inline Raniko must stay in the auth grid; only guest prompts are fixed. */
.raniko-premium-guide.raniko-v6.raniko-premium-guide--inline {
  position: relative !important;
  inset: auto !important;
  right: auto !important;
  bottom: auto !important;
  left: auto !important;
  top: auto !important;
  z-index: 1 !important;
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  opacity: 1 !important;
  transform: none !important;
  pointer-events: auto !important;
}
.raniko-premium-guide.raniko-v6.raniko-premium-guide--inline .raniko-premium-guide__card {
  min-height: 250px !important;
  grid-template-columns: minmax(0, 1fr) 124px !important;
}
.raniko-premium-guide.raniko-v6.raniko-premium-guide--inline .raniko-premium-guide__character,
.raniko-premium-guide.raniko-v6.raniko-premium-guide--inline .raniko-premium-guide__character img {
  min-height: 250px !important;
}
.raniko-premium-guide.raniko-v6.raniko-premium-guide--inline .raniko-premium-guide__character img {
  width: 122px !important;
  right: -2px !important;
  bottom: -10px !important;
}
.auth-raniko-register,
.auth-raniko-login { width: 100%; min-width: 0; }

/* Keep the home guide readable without covering cards or footer. */
.raniko-premium-guide:not(.raniko-premium-guide--inline) {
  width: min(380px, calc(100vw - 32px)) !important;
  right: 18px !important;
  bottom: 18px !important;
}

@media (max-width: 820px) {
  .premium-promos {
    display: flex !important;
    overflow-x: auto !important;
    overflow-y: visible !important;
    align-items: flex-start !important;
    scroll-snap-type: x proximity !important;
    padding-bottom: 6px !important;
  }
  .premium-promos > .premium-promo {
    flex: 0 0 min(88%, 480px) !important;
    width: min(88%, 480px) !important;
    height: 200px !important;
    min-height: 200px !important;
    scroll-snap-align: start !important;
  }
  .premium-promos > .premium-promo .premium-promo__body,
  .premium-promo--stories > .premium-promo__body { min-height: 200px !important; }
  .premium-promo--stories.is-open { width: min(88%, 480px) !important; min-width: min(88%, 480px) !important; }
  .premium-promo--stories.is-open > .premium-promo__body { flex-basis: 200px !important; }
  .premium-story-shelf__item { flex-basis: 172px !important; min-width: 172px !important; }
  .raniko-premium-guide.raniko-v6.raniko-premium-guide--inline .raniko-premium-guide__card {
    min-height: 220px !important;
    grid-template-columns: minmax(0, 1fr) 108px !important;
  }
  .raniko-premium-guide.raniko-v6.raniko-premium-guide--inline .raniko-premium-guide__character,
  .raniko-premium-guide.raniko-v6.raniko-premium-guide--inline .raniko-premium-guide__character img { min-height: 220px !important; }
  .raniko-premium-guide.raniko-v6.raniko-premium-guide--inline .raniko-premium-guide__character img { width: 108px !important; }
}

@media (max-width: 560px) {
  .premium-promos > .premium-promo { flex-basis: 94% !important; width: 94% !important; min-width: 94% !important; }
  .premium-promo--stories.is-open { width: 94% !important; min-width: 94% !important; }
  .raniko-premium-guide:not(.raniko-premium-guide--inline) {
    width: calc(100vw - 24px) !important;
    right: 12px !important;
    bottom: calc(74px + env(safe-area-inset-bottom, 0px)) !important;
  }
}

/* RANOTEKA_CARD_ALIGNMENT_FINAL */

/* RANOTEKA_HERO_BOOKSHOWCASE_V1: книга дня с отдельной обложкой 2:3. */
.home-premium .premium-hero {
  height: clamp(420px, 31vw, 470px) !important;
  min-height: 420px !important;
  background: #0a0d1c !important;
}
.home-premium .premium-hero__slide {
  display: grid !important;
  grid-template-columns: minmax(180px, 230px) minmax(0, 1fr) !important;
  align-items: center !important;
  gap: clamp(26px, 4vw, 58px) !important;
  box-sizing: border-box !important;
  padding: 28px clamp(30px, 5vw, 72px) 46px !important;
  background: linear-gradient(120deg, #0e1226 0%, #10142a 48%, #171231 100%) !important;
}
.home-premium .premium-hero__art {
  position: relative !important;
  inset: auto !important;
  grid-column: 1 !important;
  grid-row: 1 !important;
  justify-self: center !important;
  width: clamp(180px, 16vw, 230px) !important;
  height: auto !important;
  aspect-ratio: 2 / 3 !important;
  border: 1px solid rgba(255,255,255,.16) !important;
  border-radius: 14px !important;
  background-image: var(--premium-hero-cover) !important;
  background-size: cover !important;
  background-position: center !important;
  box-shadow: 0 22px 44px rgba(0,0,0,.48), 0 0 0 6px rgba(255,255,255,.025) !important;
  transform: none !important;
  z-index: 2 !important;
}
.home-premium .premium-hero__art::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255,255,255,.08), transparent 28%, rgba(0,0,0,.22));
  pointer-events: none;
}
.home-premium .premium-hero__shade {
  z-index: 0 !important;
  pointer-events: none !important;
  background: radial-gradient(circle at 15% 18%, rgba(134,80,255,.18), transparent 26%), radial-gradient(circle at 82% 78%, rgba(227,65,210,.14), transparent 30%), linear-gradient(90deg, rgba(5,7,16,.16), rgba(5,7,16,.02)) !important;
}
.home-premium .premium-hero__content {
  position: relative !important;
  inset: auto !important;
  grid-column: 2 !important;
  grid-row: 1 !important;
  width: auto !important;
  min-height: 0 !important;
  max-width: 650px !important;
  padding: 0 !important;
  justify-content: center !important;
  z-index: 3 !important;
}
.home-premium .premium-kicker {
  margin-bottom: 12px !important;
  padding: 7px 10px !important;
  font-size: 10px !important;
  letter-spacing: .07em !important;
}
.home-premium .premium-hero h1 {
  max-width: 620px !important;
  margin: 0 0 14px !important;
  font-size: clamp(28px, 2.7vw, 42px) !important;
  line-height: 1.08 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  display: -webkit-box !important;
  -webkit-box-orient: vertical !important;
  -webkit-line-clamp: 3 !important;
  overflow: hidden !important;
}
.home-premium .premium-hero__description {
  max-width: 590px !important;
  margin: 0 0 18px !important;
  font-size: 15px !important;
  line-height: 1.58 !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 3 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
}
.home-premium .premium-hero__tags { display: none !important; }
.home-premium .premium-hero__stats { margin: 0 0 20px !important; }
.home-premium .premium-hero__actions { transform: translateY(-8px) !important; }
.home-premium .top-hero__arrow { width: 40px !important; height: 44px !important; }

@media (max-width: 900px) and (min-width: 721px) {
  .home-premium .premium-hero { height: 440px !important; min-height: 440px !important; }
  .home-premium .premium-hero__slide { grid-template-columns: 210px minmax(0, 1fr) !important; gap: 28px !important; padding-inline: 46px !important; }
  .home-premium .premium-hero__art { width: 210px !important; }
  .home-premium .premium-hero h1 { font-size: 34px !important; }
}

@media (max-width: 720px) {
  .home-premium .premium-hero {
    height: 565px !important;
    min-height: 565px !important;
  }
  .home-premium .premium-hero__slide {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: 225px minmax(0, 1fr) !important;
    align-content: start !important;
    gap: 20px !important;
    padding: 24px 20px 44px !important;
  }
  .home-premium .premium-hero__art {
    grid-column: 1 !important;
    grid-row: 1 !important;
    width: 150px !important;
    justify-self: center !important;
  }
  .home-premium .premium-hero__content {
    grid-column: 1 !important;
    grid-row: 2 !important;
    align-self: start !important;
  }
  .home-premium .premium-hero h1 { font-size: clamp(27px, 8vw, 36px) !important; line-height: 1.08 !important; }
  .home-premium .premium-hero__description { font-size: 13px !important; -webkit-line-clamp: 3 !important; }
  .home-premium .premium-hero__stats { gap: 8px 13px !important; font-size: 12px !important; }
  .home-premium .premium-hero__actions { display: grid !important; grid-template-columns: minmax(0, 1fr) auto 44px !important; gap: 8px !important; }
  .home-premium .premium-hero__actions .btn { min-width: 0 !important; padding-inline: 10px !important; font-size: 12px !important; }
  .home-premium .top-hero__arrow { top: 34% !important; width: 36px !important; height: 40px !important; }
  .home-premium .top-hero__arrow--prev { left: 8px !important; }
  .home-premium .top-hero__arrow--next { right: 8px !important; }
}
.premium-book-card__title { font-size: 14px !important; line-height: 1.28 !important; }
.premium-book-card__ratings { margin-top: auto !important; padding-top: 8px !important; }
.premium-book-card__bookmark.is-active,
.bookmark-button.is-active { color: #ff5b78 !important; border-color: rgba(255,91,120,.72) !important; background: rgba(105,16,42,.72) !important; }
.premium-book-card__bookmark, .bookmark-button { cursor: pointer !important; }
.book-card__ratings { margin-top: auto !important; }
.fandom-cover-admin-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.fandom-cover-admin-card { display: grid; gap: 10px; }
.fandom-cover-admin-card h3 { margin: 0; font-size: 16px; }
.fandom-cover-admin-card__preview { aspect-ratio: 2 / 3; max-height: 180px; border-radius: 10px; background: #101426 center / cover no-repeat; border: 1px solid rgba(178,120,255,.3); }
.fandom-cover-admin-card__heading { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.fandom-cover-admin-card__heading h3 { min-width: 0; overflow-wrap: anywhere; }
.fandom-cover-admin-card__heading span { color: var(--muted, #78809a); font-size: 12px; text-align: right; }
.fandom-cover-admin-card.is-hidden { opacity: .68; }
.fandom-admin-inline { display: grid; gap: 8px; }
.fandom-admin-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.fandom-description-editor { margin: 10px 0; border-top: 1px solid var(--line); }
.fandom-description-editor > summary { padding: 10px 0 4px; color: #cfb3ff; font-size: 12px; font-weight: 800; cursor: pointer; list-style: none; }
.fandom-description-editor > summary::-webkit-details-marker { display: none; }
.fandom-description-editor[open] > summary { padding-bottom: 10px; }
.fandom-description-editor textarea { min-height: 92px; resize: vertical; }
.premium-promos-shell { position: relative !important; width: 100% !important; min-width: 0 !important; }
.premium-promos-shell > .premium-promos { width: 100% !important; max-width: 100% !important; }

/* RANOTEKA_FINAL_LAYOUT_V16_LAST: final cascade for compact, aligned cards
   and the visible infinite promo rail. */
.premium-book-card { height: auto !important; min-height: 0 !important; align-self: flex-start !important; }
.premium-book-card__cover { aspect-ratio: 2 / 3 !important; height: auto !important; min-height: 0 !important; flex: 0 0 auto !important; }
.premium-book-card__body { box-sizing: border-box !important; display: block !important; height: 52px !important; min-height: 52px !important; padding: 8px 6px 10px !important; }
.premium-book-card__title { display: -webkit-box !important; min-height: 0 !important; max-height: 2.56em !important; overflow: hidden !important; font-size: 13px !important; line-height: 1.28 !important; -webkit-box-orient: vertical !important; -webkit-line-clamp: 2 !important; }
.premium-book-card__ratings, .premium-book-card__footer, .premium-book-card__taxonomy, .premium-book-card__cover-title, .premium-book-card__badge { display: none !important; }
.book-card { height: auto !important; min-height: 0 !important; align-self: start !important; }
.book-card__cover { aspect-ratio: 2 / 3 !important; height: auto !important; }
.book-card__body { min-height: 0 !important; padding: 9px 10px 12px !important; }
.premium-fandoms__grid { display: grid !important; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)) !important; align-items: start !important; gap: 18px 14px !important; }
.premium-fandom { display: grid !important; grid-template-rows: auto 50px !important; align-self: start !important; gap: 8px !important; min-width: 0 !important; min-height: 0 !important; padding: 0 !important; border: 0 !important; background: transparent !important; }
.premium-fandom__cover { display: block !important; width: 100% !important; aspect-ratio: 2 / 3 !important; min-height: 0 !important; border-radius: 10px !important; background-size: cover !important; background-position: center !important; }
.premium-fandom__body { display: grid !important; grid-template-rows: 2.5em 1.2em !important; align-content: start !important; gap: 3px !important; min-height: 50px !important; height: 50px !important; padding: 0 2px !important; }
.premium-fandom__body strong { display: -webkit-box !important; max-height: 2.5em !important; overflow: hidden !important; font-size: 13px !important; line-height: 1.25 !important; -webkit-box-orient: vertical !important; -webkit-line-clamp: 2 !important; }
.premium-fandom__body span { display: block !important; height: 1.2em !important; overflow: hidden !important; font-size: 11px !important; line-height: 1.2 !important; white-space: nowrap !important; text-overflow: ellipsis !important; }
.premium-promos--carousel { position: relative !important; display: flex !important; flex-wrap: nowrap !important; align-items: stretch !important; gap: 12px !important; width: 100% !important; min-width: 0 !important; padding: 2px 4px 9px !important; overflow-x: auto !important; overflow-y: visible !important; scroll-behavior: smooth !important; scroll-snap-type: x proximity !important; scrollbar-width: none !important; -webkit-overflow-scrolling: touch !important; touch-action: pan-x !important; cursor: grab !important; overscroll-behavior-inline: contain !important; }
.premium-promos--carousel::-webkit-scrollbar { display: none !important; }
.premium-promos--carousel.is-dragging { cursor: grabbing !important; scroll-behavior: auto !important; scroll-snap-type: none !important; user-select: none !important; }
.premium-promos--carousel > .premium-promo { flex: 0 0 calc((100% - 24px) / 3) !important; width: calc((100% - 24px) / 3) !important; min-width: 0 !important; height: 220px !important; min-height: 220px !important; scroll-snap-align: start !important; }
.premium-promos--carousel > .premium-promo.is-open { height: auto !important; min-height: 220px !important; }
.premium-promos--carousel > .premium-promo .premium-promo__body { min-height: 220px !important; }
.premium-promos__arrow { position: absolute !important; top: 50% !important; z-index: 20 !important; display: grid !important; place-items: center !important; width: 34px !important; height: 48px !important; padding: 0 !important; color: #fff !important; border: 1px solid rgba(255,255,255,.24) !important; border-radius: 10px !important; background: rgba(8,10,24,.86) !important; box-shadow: 0 10px 24px rgba(0,0,0,.38) !important; cursor: pointer !important; opacity: .9 !important; transform: translateY(-50%) !important; }
.premium-promos__arrow:hover { border-color: rgba(221,159,255,.85) !important; background: rgba(88,40,155,.94) !important; }
.premium-promos__arrow--prev { left: 2px !important; } .premium-promos__arrow--next { right: 2px !important; }
@media (max-width: 1100px) { .premium-promos--carousel > .premium-promo { flex-basis: calc((100% - 12px) / 2) !important; width: calc((100% - 12px) / 2) !important; } }
@media (max-width: 700px) {
  .premium-book-card__body { height: 48px !important; min-height: 48px !important; padding: 7px 4px 8px !important; }
  .premium-book-card__title { font-size: 12px !important; }
  .premium-fandoms__grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 16px 12px !important; }
  .premium-promos--carousel { gap: 10px !important; padding-inline: 2px !important; }
  .premium-promos--carousel > .premium-promo { flex-basis: 88% !important; width: 88% !important; min-width: 88% !important; height: 200px !important; min-height: 200px !important; }
  .premium-promos--carousel > .premium-promo .premium-promo__body { min-height: 200px !important; }
  .premium-promos__arrow { display: none !important; }
}

/* RANOTEKA_RAIL_INTERACTION_FINAL: the viewport owns horizontal scrolling. */
.premium-section,
.premium-book-strip { overflow: visible !important; }
.premium-book-grid,
.premium-book-grid.ranoteka-book-rail-static-v12 {
  overflow-x: auto !important;
  overflow-y: hidden !important;
  touch-action: pan-x !important;
  cursor: grab !important;
  overscroll-behavior-inline: contain !important;
  -webkit-overflow-scrolling: touch !important;
}
.premium-book-grid.is-dragging { cursor: grabbing !important; scroll-behavior: auto !important; }
.premium-book-grid > .premium-book-card { flex: 0 0 154px !important; width: 154px !important; min-width: 154px !important; }
@media (max-width: 700px) {
  .premium-book-grid > .premium-book-card { flex-basis: 128px !important; width: 128px !important; min-width: 128px !important; }
}
.site-mode-panel { overflow: hidden; border-color: rgba(102, 73, 198, .34); background: linear-gradient(145deg, rgba(28, 23, 54, .92), rgba(13, 17, 34, .96)); }
.site-mode-panel.is-paused { border-color: rgba(255, 180, 83, .55); background: linear-gradient(145deg, rgba(60, 41, 30, .86), rgba(20, 21, 37, .96)); }
.site-mode-panel__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.site-mode-panel__head h2 { margin: 6px 0 8px; }
.site-mode-status { display: inline-flex; align-items: center; gap: 8px; flex: none; padding: 9px 12px; border: 1px solid rgba(88, 220, 169, .32); border-radius: 999px; color: #9eeac8; background: rgba(31, 159, 108, .12); font-size: 12px; font-weight: 800; white-space: nowrap; }
.site-mode-status.is-paused { border-color: rgba(255, 190, 90, .4); color: #ffd795; background: rgba(187, 116, 35, .16); }
.site-mode-status i, .maintenance-card__dot { width: 8px; height: 8px; display: inline-block; border-radius: 50%; background: #72e3b1; box-shadow: 0 0 0 4px rgba(114, 227, 177, .12), 0 0 16px rgba(114, 227, 177, .52); }
.site-mode-status.is-paused i { background: #ffc267; box-shadow: 0 0 0 4px rgba(255, 194, 103, .12), 0 0 16px rgba(255, 194, 103, .48); }
.site-mode-form { display: grid; gap: 18px; margin-top: 22px; }
.site-mode-form__grid, .site-mode-form__copy { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.site-mode-switch { min-height: 76px; display: flex; align-items: center; gap: 13px; padding: 13px 15px; border: 1px solid rgba(178, 137, 255, .25); border-radius: 13px; background: rgba(125, 60, 255, .08); cursor: pointer; }
.site-mode-switch > input { position: absolute; opacity: 0; pointer-events: none; }
.site-mode-switch > span:last-child { display: grid; gap: 4px; }
.site-mode-switch strong { color: var(--text); font-size: 14px; }
.site-mode-switch small { color: var(--muted); font-size: 11px; line-height: 1.35; }
.site-mode-switch__track { width: 42px; height: 24px; position: relative; flex: none; border-radius: 999px; background: rgba(136, 146, 178, .28); transition: background .18s ease; }
.site-mode-switch__track i { width: 18px; height: 18px; position: absolute; top: 3px; left: 3px; border-radius: 50%; background: #d7dbee; box-shadow: 0 2px 7px rgba(0,0,0,.3); transition: transform .18s ease, background .18s ease; }
.site-mode-switch > input:checked + .site-mode-switch__track { background: #c77931; }
.site-mode-switch > input:checked + .site-mode-switch__track i { transform: translateX(18px); background: #fff1d4; }
.site-mode-switch:focus-within { outline: 2px solid rgba(194, 148, 255, .7); outline-offset: 2px; }
.site-mode-form__copy textarea { min-height: 110px; resize: vertical; }
.site-mode-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.site-mode-preview { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 21px; padding: 15px 17px; border: 1px solid rgba(191, 156, 255, .18); border-radius: 12px; background: rgba(7, 10, 23, .32); }
.site-mode-preview > div { display: grid; gap: 4px; min-width: 0; }
.site-mode-preview strong { color: var(--text); font-size: 15px; }
.site-mode-preview p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.site-mode-preview__lock { flex: none; color: #bfa5eb; font-size: 11px; font-weight: 750; }
.maintenance-shell { min-height: min(640px, calc(100vh - 180px)); display: grid; place-items: center; padding-top: clamp(28px, 7vw, 86px); padding-bottom: clamp(44px, 9vw, 110px); }
.maintenance-card { width: min(680px, 100%); position: relative; overflow: hidden; padding: clamp(30px, 6vw, 62px); text-align: center; border: 1px solid rgba(178, 137, 255, .3); border-radius: 24px; background: radial-gradient(circle at 50% -20%, rgba(168, 103, 255, .28), transparent 48%), linear-gradient(145deg, rgba(26, 24, 55, .96), rgba(12, 16, 32, .98)); box-shadow: 0 28px 90px rgba(0,0,0,.3), inset 0 1px 0 rgba(255,255,255,.07); }
.maintenance-card::before { content: ''; width: 220px; height: 220px; position: absolute; left: 50%; top: -150px; transform: translateX(-50%); border-radius: 50%; border: 1px solid rgba(206, 168, 255, .2); box-shadow: 0 0 0 22px rgba(168, 103, 255, .04), 0 0 0 45px rgba(168, 103, 255, .025); pointer-events: none; }
.maintenance-card__mark { width: 72px; height: 72px; display: grid; place-items: center; margin: 0 auto 24px; border: 1px solid rgba(255, 197, 111, .5); border-radius: 20px; color: #ffd18a; background: rgba(196, 117, 38, .17); box-shadow: 0 12px 35px rgba(188, 111, 42, .2); }
.maintenance-card__mark span { font-size: 34px; text-shadow: 0 0 18px rgba(255, 191, 91, .48); }
.maintenance-card h1 { margin: 9px 0 14px; color: #fff8ee; font-size: clamp(28px, 5vw, 44px); line-height: 1.08; }
.maintenance-card__message { max-width: 540px; margin: 0 auto; color: #d9d8e9; font-size: 16px; line-height: 1.65; }
.maintenance-card__status { display: inline-flex; align-items: center; gap: 9px; margin-top: 28px; padding: 9px 13px; border: 1px solid rgba(114, 227, 177, .22); border-radius: 999px; color: #a9e9ca; background: rgba(31, 159, 108, .1); font-size: 12px; font-weight: 800; }
.maintenance-card__hint { max-width: 460px; margin: 19px auto 0; color: #989bb4; font-size: 12px; line-height: 1.5; }
@media (max-width: 700px) { .site-mode-panel__head, .site-mode-preview { align-items: flex-start; flex-direction: column; } .site-mode-form__grid, .site-mode-form__copy { grid-template-columns: 1fr; } .site-mode-actions .btn { width: 100%; } .maintenance-card { border-radius: 18px; } }

/* RANOTEKA_MOBILE_PROFILE_HEADER_V1: keep the signed-in identity readable
   beside the compact header actions on narrow screens. */
@media (max-width: 760px) {
  .header__row,
  .header__account,
  .account-drawer,
  .account-drawer__trigger {
    min-width: 0;
  }

  .header__row { gap: 8px; }
  .header__account { gap: 5px; }
  .account-drawer { width: 96px; max-width: 96px; }
  .account-drawer__trigger {
    width: 100%;
    max-width: 96px;
    gap: 5px;
    padding: 3px 2px;
    overflow: hidden;
  }
  .account-drawer__trigger .avatar--header {
    width: 29px;
    height: 29px;
    font-size: 9px;
  }
  .account-drawer__trigger .user-name {
    min-width: 0;
    display: grid;
    gap: 1px;
    overflow: hidden;
    line-height: 1.08;
  }
  .account-drawer__trigger .user-name strong,
  .account-drawer__trigger .user-name small {
    display: block;
    min-width: 0;
    max-width: 59px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .account-drawer__trigger .user-name strong {
    font-size: 10px;
    font-weight: 850;
  }
  .account-drawer__trigger .user-name small {
    color: var(--muted, #9da7bd);
    font-size: 8px;
    font-weight: 650;
  }
  .account-drawer__id,
  .account-drawer__chevron { display: none; }
}

@media (max-width: 520px) {
  /* The account drawer already contains the mobile navigation links. */
  .header__row .menu-toggle { display: none; }
  .logo { font-size: 17px; }
  .account-drawer,
  .account-drawer__trigger { width: 90px; max-width: 90px; }
  .account-drawer__trigger .user-name strong,
  .account-drawer__trigger .user-name small { max-width: 54px; }
}

/* RANOTEKA_CONVERSATION_PREVIEW_V1: make each private dialog scannable. */
.conversation-user {
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
}

/* RANOTEKA_CONVERSATION_TYPE_SCALE_V1: make the reader name the primary cue. */
.conversation-user__copy > strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 850;
  line-height: 1.2;
}
.conversation-user__copy > small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.2;
}
.conversation-user__preview { font-size: 10px !important; }
@media (max-width: 760px) {
  .conversation-user__copy > strong { font-size: 13px; }
  .conversation-user__copy > small { font-size: 9px; }
  .conversation-user__preview { font-size: 9px !important; }
}

/* RANOTEKA_LOGO_RESTORE_V1: restore the original wide gradient wordmark. */
.logo {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif !important;
  font-size: 24px !important;
  font-weight: 950 !important;
  letter-spacing: .09em !important;
  color: transparent !important;
  background: linear-gradient(100deg, #fff 0%, #e9d9ff 46%, #b25cff 76%, #6b37ff 100%) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  text-shadow: 0 0 28px rgba(150, 75, 255, .24) !important;
}
.logo span { color: inherit !important; }
html[data-theme="light"] .logo {
  background: linear-gradient(100deg, #27334e 0%, #6340bb 62%, #a34fcf 100%) !important;
  text-shadow: none !important;
}
@media (max-width: 760px) {
  .logo { font-size: 18px !important; }
}
@media (max-width: 380px) {
  .logo { font-size: 16px !important; letter-spacing: .06em !important; }
}
.conversation-user__copy {
  min-width: 0;
  display: grid !important;
  gap: 3px !important;
  align-content: center;
}
.conversation-user__copy > strong {
  font-size: 11px;
  line-height: 1.2;
}
.conversation-user__copy > small {
  font-size: 8px;
  line-height: 1.2;
}
.conversation-user__preview {
  min-width: 0;
  display: block !important;
  overflow: hidden;
  color: #8f98ad;
  font-size: 9px !important;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.conversation-user__side {
  min-width: 24px;
  height: 100%;
  display: flex !important;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 6px !important;
}
.conversation-user__unread {
  min-width: 21px;
  height: 21px;
  padding: 0 6px;
  display: grid !important;
  place-items: center;
  border: 1px solid rgba(227, 211, 255, .35);
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #8439f5, #a85cff);
  box-shadow: 0 5px 14px rgba(132, 57, 245, .28);
  font-size: 9px;
  line-height: 1;
}
.conversation-user:has(.conversation-user__unread) {
  border-color: rgba(145, 85, 255, .5);
  background: linear-gradient(120deg, rgba(104, 47, 205, .16), rgba(125, 60, 255, .05));
}
.conversation-user:has(.conversation-user__unread) .conversation-user__preview {
  color: #cbb7f5;
  font-weight: 700;
}
@media (max-width: 760px) {
  .conversation-user {
    grid-template-columns: 38px minmax(0, 1fr) auto;
    gap: 8px;
    padding: 8px 7px;
  }
  .conversation-user .avatar--message {
    width: 38px;
    height: 38px;
  }
  .conversation-user__preview { font-size: 8px !important; }
}

@media (max-width: 380px) {
  .header__row { gap: 5px; }
  .logo { font-size: 16px; letter-spacing: .06em; }
  .header__account { gap: 4px; }
  .account-drawer,
  .account-drawer__trigger { width: 84px; max-width: 84px; }
  .account-drawer__trigger .avatar--header { width: 27px; height: 27px; }
  .account-drawer__trigger .user-name strong,
  .account-drawer__trigger .user-name small { max-width: 50px; }
  .account-drawer__trigger .user-name strong { font-size: 9px; }
  .account-drawer__trigger .user-name small { font-size: 7px; }
}

/* RANOTEKA_HEADER_BALANCE_V1: show a compact sparks balance directly below
 * the avatar, reusing the same spark artwork as the top-up control. */
.account-drawer__identity {
  flex: 0 0 auto;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 1px;
  min-width: 34px;
}

.account-drawer__identity .avatar--header {
  display: block;
  flex: 0 0 auto;
}

.account-drawer__mini-balance {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 13px;
  color: #f6d978;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
  text-shadow: 0 0 8px rgba(255, 211, 93, .34);
}

.account-drawer__mini-balance-icon {
  width: 15px !important;
  height: 15px !important;
  margin: 0 !important;
  filter: drop-shadow(0 1px 5px rgba(255, 207, 87, .58)) !important;
}

@media (max-width: 760px) {
  .account-drawer__trigger {
    align-items: center;
    gap: 5px;
  }

  .account-drawer__identity { min-width: 34px; }
  .account-drawer__mini-balance { font-size: 9px; }
  .account-drawer__mini-balance-icon { width: 14px !important; height: 14px !important; }
}

@media (max-width: 380px) {
  .account-drawer__identity { min-width: 31px; }
  .account-drawer__mini-balance { font-size: 8px; }
  .account-drawer__mini-balance-icon { width: 13px !important; height: 13px !important; }
}

/* RANOTEKA_LIBRARY_CONTINUE_COVER_RATIO_V1: continuation cards use the same
   full 2:3 cover format as the saved-library and purchase cards. */
.library-tabs .continue-card {
  min-height: 0;
  height: 100%;
}
.library-tabs .continue-card img {
  width: 100%;
  height: auto;
  flex: 0 0 auto;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}
.library-tabs .continue-card > span {
  min-height: 128px;
}

/* RANOTEKA_CATALOG_FILTERS_DISCLOSURE_V1: keep the title search prominent
   while advanced taxonomy filters stay available in a compact disclosure. */
.catalog-filters-panel {
  margin-top: 14px;
  border-top: 1px solid var(--line);
}
.catalog-filters-panel > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 2px 4px;
  color: var(--text);
  cursor: pointer;
  list-style: none;
  font-size: 13px;
  font-weight: 850;
}
.catalog-filters-panel > summary::-webkit-details-marker { display: none; }
.catalog-filters-panel > summary::after {
  content: '+';
  flex: none;
  color: var(--accent);
  font-size: 20px;
  font-weight: 500;
  line-height: 1;
}
.catalog-filters-panel[open] > summary::after { content: '−'; }
.catalog-filters-panel > summary small {
  min-width: 0;
  margin-left: auto;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.catalog-filters-panel .catalog-filter-grid {
  margin-top: 12px;
}
.catalog-filter-actions {
  margin-top: 12px;
}
@media (max-width: 560px) {
  .catalog-filters-panel > summary {
    padding-top: 10px;
    font-size: 12px;
  }
  .catalog-filters-panel > summary small {
    max-width: 48%;
    font-size: 10px;
  }
}

/* RANOTEKA_PROPOSAL_HOVER_MATCH_V1: proposal CTA mirrors the top-up CTA on
   hover instead of falling back to its legacy translucent background. */
.header-propose.topup-cta:hover {
  border-color: rgba(255, 215, 120, .72);
  background: linear-gradient(135deg, #6534e9, #922ee9 56%, #e7853f);
  box-shadow:
    0 12px 30px rgba(116, 52, 235, .44),
    0 0 18px rgba(255, 181, 70, .20);
  filter: saturate(1.12);
  transform: translateY(-2px);
}

/* RANOTEKA_RANKING_PERIODS_LAYOUT_V1: keep period navigation together with
   the heading and turn it into a comfortable segmented control on mobile. */
.ranking-page__head {
  align-items: flex-start;
}
.ranking-page__periods {
  flex: none;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.ranking-page__periods .btn {
  min-width: 92px;
  justify-content: center;
  text-align: center;
}
@media (max-width: 760px) {
  .ranking-page__head {
    display: grid;
    gap: 14px;
    align-items: start;
    margin-bottom: 16px;
  }
  .ranking-page__periods {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }
  .ranking-page__periods .btn {
    min-width: 0;
    min-height: 44px;
    padding: 9px 7px;
    border-radius: 11px;
    font-size: 12px;
  }
}

/* RANOTEKA_MOBILE_CHAT_DENSITY_V1: fit more public-chat messages without
   making the actions or composer difficult to use on touch screens. */
@media (max-width: 760px) {
  .chat-public-shell .public-chat {
    gap: 4px;
    padding: 10px 12px;
  }
  .chat-public-shell .chat-messages {
    gap: 0;
    padding: 0;
  }
  .chat-public-shell .public-chat__message {
    gap: 1px 8px;
    padding: 5px 0;
  }
  .chat-public-shell .avatar--message {
    width: 30px;
    height: 30px;
    font-size: 9px;
  }
  .chat-public-shell .public-chat__author { gap: 4px; }
  .chat-public-shell .public-chat__author-main {
    gap: 3px;
    line-height: 1.05;
  }
  .chat-public-shell .public-chat__author-main .user-name {
    gap: 3px;
    font-size: 12px;
  }
  .chat-public-shell .public-chat__author-main .user-name small {
    font-size: 9px;
  }
  .chat-public-shell .public-chat__write { font-size: 9px; }
  .chat-public-shell .public-chat__message time { font-size: 10px; }
  .chat-public-shell .public-chat__message p {
    font-size: 13px;
    line-height: 1.25;
  }
  .chat-public-shell .public-chat__quote {
    gap: 1px;
    margin-top: 0;
    padding: 3px 6px;
  }
  .chat-public-shell .public-chat__quote span { font-size: 9px; }
  .chat-public-shell .public-chat__quote strong { font-size: 10px; }
  .chat-public-shell .public-chat__forwarded {
    margin-top: 0;
    font-size: 9px;
  }
  .chat-public-shell .public-chat__forwarded > span { font-size: 12px; }
  .chat-public-shell .public-chat__actions {
    min-height: 18px;
    gap: 2px;
  }
  .chat-public-shell .public-chat__action {
    min-height: 18px;
    padding: 1px 5px;
    font-size: 9px;
  }
  .chat-public-shell .public-chat__action--like span:first-child { font-size: 12px; }
  .chat-public-shell .chat-compose {
    gap: 7px;
    padding: 9px 0 0;
  }
  .chat-public-shell .chat-compose textarea { min-height: 46px; }
  .chat-public-shell .chat-compose .btn { min-height: 44px; }
}

/* RANOTEKA_PROMO_ARROWS_GUTTER_V1: keep carousel controls beside the cards,
   so the arrows never cover a title, description, or action. */
.premium-promos-shell {
  box-sizing: border-box !important;
  padding-inline: 48px !important;
}

.premium-promos__arrow {
  display: grid !important;
  place-items: center !important;
  width: 32px !important;
  height: 46px !important;
  padding: 0 !important;
  color: var(--text) !important;
  border: 1px solid var(--line-strong) !important;
  border-radius: 11px !important;
  background: var(--panel) !important;
  box-shadow: 0 8px 22px rgba(7, 10, 25, .18) !important;
  font-size: 22px !important;
  line-height: 1 !important;
  opacity: .96 !important;
  transform: translateY(-50%) !important;
}

.premium-promos__arrow:hover,
.premium-promos__arrow:focus-visible {
  color: var(--text) !important;
  border-color: var(--line-strong) !important;
  background: var(--panel-2) !important;
  box-shadow: 0 10px 24px rgba(7, 10, 25, .24) !important;
}

.premium-promos__arrow--prev { left: 8px !important; }
.premium-promos__arrow--next { right: 8px !important; }

@media (max-width: 700px) {
  .premium-promos-shell { padding-inline: 0 !important; }
}

/* RANOTEKA_DIRECT_CHAT_TYPE_V1: make the private conversation header and
   message text readable without changing the denser public chat feed. */
.messages-shell .chat-header {
  min-height: 86px !important;
  padding: 16px 20px !important;
  gap: 14px !important;
}

.messages-shell .chat-header > .avatar--message {
  width: 52px !important;
  height: 52px !important;
  font-size: 14px !important;
}

.messages-shell .chat-header > div {
  gap: 5px !important;
}

.messages-shell .chat-header strong {
  color: var(--text) !important;
  font-size: 16px !important;
  line-height: 1.2 !important;
}

.messages-shell .chat-header small {
  color: var(--muted) !important;
  font-size: 11px !important;
  line-height: 1.3 !important;
}

.messages-shell .chat-bubble {
  padding: 12px 15px !important;
}

.messages-shell .chat-bubble p {
  font-size: 15px !important;
  line-height: 1.5 !important;
}

.messages-shell .chat-bubble small {
  margin-top: 7px !important;
  font-size: 10px !important;
}

@media (max-width: 760px) {
  .messages-shell .chat-header {
    min-height: 78px !important;
    padding: 13px 16px !important;
  }
  .messages-shell .chat-header > .avatar--message {
    width: 48px !important;
    height: 48px !important;
  }
  .messages-shell .chat-header strong { font-size: 15px !important; }
  .messages-shell .chat-header small { font-size: 10px !important; }
  .messages-shell .chat-bubble p { font-size: 14px !important; }
}

/* RANOTEKA_PUBLIC_CHAT_COMPACT_V1: let the public chat frame follow its
   messages instead of reserving a tall empty area for a short feed. */
.chat-public-shell .public-chat {
  gap: 4px !important;
  padding: 12px 14px !important;
}

.chat-public-shell .chat-messages {
  min-height: 0 !important;
  max-height: 430px !important;
  padding: 10px 12px !important;
  gap: 2px !important;
  justify-content: flex-start !important;
}

.chat-public-shell .public-chat__message {
  flex: 0 0 auto !important;
  gap: 1px 10px !important;
  padding: 5px 0 !important;
}

.chat-public-shell .public-chat__message p {
  line-height: 1.3 !important;
}

.chat-public-shell .public-chat__actions {
  min-height: 18px !important;
}

.chat-public-shell .public-chat__action {
  min-height: 18px !important;
  padding: 1px 5px !important;
}

@media (max-width: 760px) {
  .chat-public-shell .public-chat { padding: 9px 11px !important; }
  .chat-public-shell .chat-messages {
    max-height: 360px !important;
    padding: 7px 9px !important;
  }
}

/* RANOTEKA_MESSAGES_EMPTY_COMPACT_V1: keep an unselected dialog from
   reserving most of the viewport for an empty placeholder. */
.messages-shell .messages-layout,
.messages-shell .chat-panel {
  min-height: 480px !important;
}

@media (max-width: 760px) {
  .messages-shell .messages-layout,
  .messages-shell .chat-panel {
    min-height: 420px !important;
  }
}

/* RANOTEKA_FANDOM_GRID_ALIGNMENT_FINAL: every fandom card fills its grid
   track, including the two-column mobile layout. */
.premium-fandoms__grid { justify-items: stretch !important; }
.premium-fandom { width: 100% !important; }

/* RANOTEKA_BOOK_CARD_EQUAL_HEIGHT_V1: title length must not change the
   height of neighbouring catalogue, ranking, or fandom cards. */
.book-card {
  display: flex !important;
  flex-direction: column !important;
  height: auto !important;
  min-height: 0 !important;
  align-self: stretch !important;
}
.book-card__main {
  display: flex !important;
  flex: 1 1 auto !important;
  flex-direction: column !important;
  min-height: 0 !important;
}
.book-card__cover {
  flex: 0 0 auto !important;
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 2 / 3 !important;
}
.book-card__body {
  flex: 0 0 128px !important;
  height: 128px !important;
  min-height: 128px !important;
  overflow: hidden !important;
  padding: 12px !important;
}
.book-card__body h3 {
  display: -webkit-box !important;
  max-height: 5.28em !important;
  overflow: hidden !important;
  margin: 0 !important;
  line-height: 1.32 !important;
  -webkit-box-orient: vertical !important;
  -webkit-line-clamp: 4 !important;
}

/* Preserve the deliberately larger library card format while keeping its
   title area aligned with the other cards. */
.library-tabs .book-card {
  height: 100% !important;
  min-height: 390px !important;
}
.library-tabs .book-card__cover {
  width: 100% !important;
  height: 250px !important;
  aspect-ratio: auto !important;
}
.library-tabs .book-card__body {
  flex: 1 1 auto !important;
  height: auto !important;
  min-height: 128px !important;
}

/* RANOTEKA_RANKING_POSITION_BADGES_V1: make every ranking position visible
   without changing the card's cover geometry. */
.book-card__cover { position: relative !important; }
.book-card__rank {
  position: absolute;
  z-index: 2;
  top: 10px;
  left: 10px;
  display: inline-flex;
  align-items: center;
  min-height: 27px;
  padding: 4px 8px;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, rgba(116,76,220,.96), rgba(66,42,142,.96));
  box-shadow: 0 6px 16px rgba(0,0,0,.3);
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}
.book-card__rank--1 { border-color: rgba(255,224,126,.78); color: #fff8d5; background: linear-gradient(135deg, #d99d1e, #9c5e00); }
.book-card__rank--2 { border-color: rgba(224,233,246,.7); color: #f1f5ff; background: linear-gradient(135deg, #8190a8, #4f5b70); }
.book-card__rank--3 { border-color: rgba(244,191,139,.7); color: #fff0df; background: linear-gradient(135deg, #b36d43, #75412a); }
@media (max-width: 560px) {
  .book-card__rank { top: 8px; left: 8px; min-height: 25px; padding: 4px 7px; font-size: 10px; }
}

/* RANOTEKA_RAIL_ARROWS_HIDDEN_V1: rails remain swipe/scrollable without overlay buttons. */
.premium-book-strip__arrow,
.top-hero__arrow,
.premium-promo-carousel__arrow,
.premium-promos__arrow { display: none !important; }

/* Promo cards are still draggable, but never reserve a gutter for removed
   controls or reveal the duplicated track before its middle cycle is placed. */
.premium-promos-shell { padding-inline: 0 !important; }
.premium-promos--carousel.is-initializing { visibility: hidden !important; }

/* Keep the first daily story stable while the hero controller attaches. */
.top-hero.is-initializing .top-hero__slide { transition: none !important; }

/* RANOTEKA_BOOK_MOBILE_LAYOUT_V1: compact, centered book details and chapter rows. */
@media (max-width: 760px) {
  .book-page .book-hero {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    gap: 18px;
    text-align: center;
  }

  .book-page .book-cover {
    width: min(176px, 48vw);
    margin-inline: auto;
    border-radius: 14px;
  }

  .book-page .book-info {
    display: grid;
    justify-items: center;
    width: 100%;
    min-width: 0;
  }

  .book-page .book-info h1 {
    width: 100%;
    margin: 0 0 14px;
    font-size: clamp(27px, 8vw, 38px);
    line-height: 1.08;
    text-align: center;
  }

  .book-page .book-rating-line {
    width: 100%;
    justify-content: center;
    gap: 10px 14px;
    margin: 0 0 12px;
  }

  .book-page .book-rating-line__metric {
    justify-content: center;
    flex-wrap: wrap;
  }

  .book-page .meta-line {
    width: 100%;
    justify-content: center;
    margin: 0 0 12px;
  }

  .book-page .book-taxonomy {
    width: 100%;
    margin: 0 0 16px;
    text-align: left;
  }

  .book-page .book-taxonomy__row {
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 8px;
  }

  .book-page .book-taxonomy__label { font-size: 11px; }

  .book-page .book-info__description {
    width: 100%;
    margin: 0 0 14px;
    text-align: left;
    line-height: 1.6;
  }

  .book-page .book-actions {
    width: 100%;
    justify-content: center;
    align-items: center;
    margin-top: 4px;
  }

  .book-page .rating-panel {
    width: 100%;
    margin-top: 18px;
    padding: 12px;
    text-align: left;
  }

  .book-page .rating-panel--dual { gap: 10px; }
  .book-page .rating-panel__item { gap: 11px; padding: 13px; }

  .book-page .chapter-list { gap: 8px; }

  .book-page .chapter {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 6px 12px;
    min-height: 0;
    padding: 11px 12px;
  }

  .book-page .chapter__title {
    grid-column: 1;
    grid-row: 1 / span 2;
    min-width: 0;
  }

  .book-page .chapter__title strong {
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
    font-size: 13px;
    line-height: 1.3;
  }

  .book-page .chapter__title span {
    display: block;
    margin-top: 4px;
    line-height: 1.35;
  }

  .book-page .chapter__price {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
    margin: 0;
    text-align: right;
    font-size: 11px;
  }

  .book-page .chapter > .btn {
    grid-column: 2;
    grid-row: 2;
    width: auto;
    min-width: 74px;
    min-height: 32px;
    padding: 7px 10px;
    font-size: 11px;
    white-space: nowrap;
    justify-self: end;
  }

  .book-page .pagination { justify-content: center; }
}

.fandom-cover-upload-preview {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 220px;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border: 1px solid rgba(178,120,255,.42);
  border-radius: 12px;
  background: #101426 center / cover no-repeat;
  cursor: grab;
  touch-action: none;
  user-select: none;
}
.fandom-cover-upload-preview.is-dragging { cursor: grabbing; }
.fandom-cover-upload-preview--empty { background: #101426; }
.fandom-cover-upload-preview__hint {
  max-width: 80%;
  padding: 8px 11px;
  color: rgba(255,255,255,.82);
  font-size: 12px;
  line-height: 1.35;
  text-align: center;
  border-radius: 8px;
  background: rgba(8,10,24,.76);
  pointer-events: none;
}
.fandom-cover-upload-preview__hint.is-hidden { display: none; }
.fandom-cover-admin-card__preview { cursor: default; }
.fandom-cover-admin-card .fandom-cover-upload-preview { cursor: grab; }
.fandom-hero { background-position: right center !important; }
.premium-fandom__cover { background-position: var(--fandom-position, center) !important; }
.fandom-admin-layout { grid-template-columns: minmax(280px, 360px) minmax(0, 1fr); align-items: start; }
.fandom-admin-layout > .fandom-cover-upload-form { align-self: start; height: max-content; }
.fandom-admin-layout > .fandom-cover-admin-grid { min-width: 0; align-self: start; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
@media (max-width: 980px) {
  .fandom-admin-layout { grid-template-columns: 1fr; }
}

/* RANOTEKA_SPARK_ICON_V2: a crisp animated spark for both themes. */
.spark-glyph,
.spark-inline,
.topup-cta__spark-image,
.account-drawer__balance-icon,
.spark-heading-icon,
.spark-package-icon,
.spark-package-admin-icon {
  display: inline-block;
  width: 1.25em;
  height: 1.25em;
  max-width: 100%;
  object-fit: contain;
  object-position: center;
  vertical-align: middle;
  flex: 0 0 auto;
  filter: drop-shadow(0 2px 5px rgba(97, 39, 201, .28));
}

.spark-glyph { width: 1.05em; height: 1.05em; margin-right: 2px; }
.spark-inline { width: 1.08em; height: 1.08em; margin-right: 4px; }
.topup-cta__spark { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; }
.topup-cta__spark-image { width: 20px; height: 20px; transition: transform .25s ease; }
.topup-cta:hover .topup-cta__spark-image { transform: none; }
.header-propose .topup-cta__spark-image { display: none; }
.account-drawer__balance-icon { width: 32px !important; height: 32px !important; object-fit: contain; }
.spark-heading-icon { width: 18px; height: 18px; margin-right: 4px; }
.spark-package-icon { width: min(76%, 150px); height: min(76%, 150px); filter: drop-shadow(0 5px 13px rgba(190, 135, 255, .34)); }
.spark-package-admin-icon { width: 58px; height: 58px; filter: drop-shadow(0 3px 10px rgba(190, 135, 255, .36)); }
.spark-package-card__figure > span { display: none; }
.spark-package-card__figure > img { display: block; }

html[data-theme="light"] .spark-glyph,
html[data-theme="light"] .spark-inline,
html[data-theme="light"] .topup-cta__spark-image,
html[data-theme="light"] .account-drawer__balance-icon,
html[data-theme="light"] .spark-heading-icon,
html[data-theme="light"] .spark-package-icon,
html[data-theme="light"] .spark-package-admin-icon {
  filter: drop-shadow(0 2px 5px rgba(77, 49, 153, .24));
}

/* The spark is a small piece of identity, not a miniature bitmap. Keep the
   motion quiet at rest and let the top-up control amplify it on interaction. */
.spark-icon-svg {
  overflow: visible;
  shape-rendering: geometricPrecision;
  transform-origin: 50% 50%;
}
.spark-icon-svg__aura {
  fill: #b965ff;
  opacity: .13;
  transform-box: fill-box;
  transform-origin: center;
  animation: spark-aura-breathe 3.8s ease-in-out infinite;
}
.spark-icon-svg__orbit {
  fill: none;
  stroke: #c579ff;
  stroke-width: 1.15;
  stroke-linecap: round;
  stroke-dasharray: 1.5 5.8;
  opacity: .84;
  transform-box: fill-box;
  transform-origin: center;
  animation: spark-orbit-drift 5.2s linear infinite;
}
.spark-icon-svg__orbit--second {
  stroke: #ffd976;
  stroke-width: .75;
  stroke-dasharray: 1 7;
  opacity: .76;
  animation-duration: 4.1s;
  animation-direction: reverse;
}
.spark-icon-svg__ray {
  fill: #9c4df0;
  stroke: #eab1ff;
  stroke-width: .65;
  stroke-linejoin: round;
  opacity: .92;
  transform-box: fill-box;
  transform-origin: center;
  animation: spark-ray-breathe 3.8s ease-in-out infinite;
}
.spark-icon-svg__core {
  fill: #ffe9a4;
  stroke: #fff7d8;
  stroke-width: .35;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 2px rgba(255, 218, 117, .9));
  transform-box: fill-box;
  transform-origin: center;
  animation: spark-core-glint 2.7s ease-in-out infinite;
}
.spark-icon-svg__particle {
  fill: #ffd978;
  opacity: .78;
  transform-box: fill-box;
  transform-origin: center;
  animation: spark-particle-twinkle 2.4s ease-in-out infinite;
}
.spark-icon-svg__particle--one { fill: #d58aff; animation-delay: -.8s; }
.spark-icon-svg__particle--two { animation-delay: -1.5s; }
.spark-icon-svg__particle--three { fill: #c879ff; animation-delay: -.25s; }
.topup-cta:hover .spark-icon-svg__aura,
.topup-cta:focus-visible .spark-icon-svg__aura {
  animation-duration: 1.2s;
  opacity: .26;
}
.topup-cta:hover .spark-icon-svg__orbit,
.topup-cta:focus-visible .spark-icon-svg__orbit {
  animation-duration: 1.35s;
  opacity: 1;
}
.topup-cta:hover .spark-icon-svg__ray,
.topup-cta:focus-visible .spark-icon-svg__ray {
  animation: spark-ray-burst .62s cubic-bezier(.2, .8, .2, 1) both;
}
.topup-cta:hover .spark-icon-svg__core,
.topup-cta:focus-visible .spark-icon-svg__core {
  animation: spark-core-burst .72s cubic-bezier(.2, .8, .2, 1) both;
}
.topup-cta:hover .spark-icon-svg__particle,
.topup-cta:focus-visible .spark-icon-svg__particle {
  animation-duration: .82s;
}

@keyframes spark-aura-breathe {
  0%, 100% { transform: scale(.86); opacity: .08; }
  50% { transform: scale(1.08); opacity: .18; }
}
@keyframes spark-orbit-drift {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@keyframes spark-ray-breathe {
  0%, 100% { transform: rotate(0deg) scale(.94); }
  50% { transform: rotate(7deg) scale(1.02); }
}
@keyframes spark-ray-burst {
  0% { transform: rotate(0deg) scale(.92); }
  55% { transform: rotate(18deg) scale(1.13); }
  100% { transform: rotate(0deg) scale(1); }
}
@keyframes spark-core-glint {
  0%, 100% { transform: scale(.9); opacity: .82; }
  45% { transform: scale(1.08); opacity: 1; }
}
@keyframes spark-core-burst {
  0% { transform: scale(.88); }
  48% { transform: scale(1.28); }
  100% { transform: scale(1); }
}
@keyframes spark-particle-twinkle {
  0%, 100% { transform: scale(.55) translateY(1px); opacity: .3; }
  45% { transform: scale(1.25) translateY(-1px); opacity: 1; }
}

html[data-theme="light"] .spark-icon-svg__aura { opacity: .1; }
html[data-theme="light"] .spark-icon-svg__orbit { opacity: .9; }

@media (prefers-reduced-motion: reduce) {
  .spark-icon-svg__aura,
  .spark-icon-svg__orbit,
  .spark-icon-svg__ray,
  .spark-icon-svg__core,
  .spark-icon-svg__particle {
    animation: none !important;
    transition: none !important;
  }
}

/* RANOTEKA_INSTANT_COVERS_V1 */
picture.cover-image-wrap { display: contents; }
.cover-image {
  background: #11162a;
  opacity: .84;
  filter: blur(8px);
  transform: scale(1.025);
  transition: opacity .28s ease, filter .38s ease, transform .38s ease;
}
.cover-image.is-loaded {
  opacity: 1;
  filter: none;
  transform: none;
}

/* RANOTEKA_FANDOM_WORLDS_V1 */
.fandom-hero__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 14px 0 4px;
  color: rgba(235, 238, 255, .72);
  font-size: 12px;
}
.fandom-hero__stats span { display: inline-flex; align-items: baseline; gap: 5px; }
.fandom-hero__stats b { color: #ffe19a; font-size: 16px; font-weight: 900; }
.fandom-world-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, .75fr);
  gap: 16px;
}
.fandom-world-card {
  min-width: 0;
  padding: 20px;
  border-color: rgba(184, 108, 255, .24);
  background: linear-gradient(145deg, rgba(24, 20, 49, .92), rgba(11, 16, 31, .94));
}
.fandom-world-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.fandom-world-card h2 { margin: 4px 0 0; font-size: 20px; }
.fandom-world-card--threads h2 { margin: 4px 0 10px; }
.fandom-world-card--threads p { margin: 0; line-height: 1.55; }
.fandom-world-card__live {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #bfffe1;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .08em;
}
.fandom-world-card__live i { width: 6px; height: 6px; border-radius: 50%; background: #63e7aa; box-shadow: 0 0 9px rgba(99, 231, 170, .8); }
.fandom-world-pulse__list { display: grid; gap: 7px; }
.fandom-world-pulse__item {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 7px 8px;
  border: 1px solid rgba(170, 133, 255, .14);
  border-radius: 9px;
  color: inherit;
  text-decoration: none;
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}
.fandom-world-pulse__item:hover { border-color: rgba(220, 157, 255, .46); background: rgba(126, 66, 207, .16); transform: translateX(2px); }
.fandom-world-pulse__cover,
.fandom-world-pulse__cover img { display: block; width: 38px; height: 52px; border-radius: 6px; object-fit: cover; overflow: hidden; }
.fandom-world-pulse__item strong,
.fandom-world-pulse__item small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fandom-world-pulse__item strong { font-size: 12px; }
.fandom-world-pulse__item small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.fandom-world-pulse__item i { color: #d7a9ff; font-size: 17px; font-style: normal; }
.fandom-topic-list { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 16px; }
.fandom-topic-list a,
.fandom-topic-list span {
  display: inline-flex;
  min-height: 27px;
  align-items: center;
  padding: 0 9px;
  border: 1px solid rgba(203, 144, 255, .24);
  border-radius: 999px;
  color: #e1c8ff;
  background: rgba(135, 70, 220, .12);
  font-size: 11px;
  text-decoration: none;
}
.fandom-topic-list a:hover { border-color: rgba(238, 190, 255, .56); background: rgba(146, 78, 229, .24); }

/* RANOTEKA_CHAPTER_REACTIONS_V1 */
.chapter-reactions {
  margin: 22px auto 0;
  padding: 15px 16px;
  border: 1px solid rgba(194, 132, 255, .24);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(32, 24, 58, .82), rgba(12, 18, 34, .88));
}
.chapter-reactions__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 11px;
}
.chapter-reactions__head strong,
.chapter-reactions__head small { display: block; }
.chapter-reactions__head strong { color: #f3eaff; font-size: 14px; }
.chapter-reactions__head small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.chapter-reactions__status { flex: 0 0 auto; color: #d9b9ff; font-size: 11px; text-align: right; }
.chapter-reactions__list { display: flex; flex-wrap: wrap; gap: 7px; }
.chapter-reaction {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid rgba(205, 160, 255, .22);
  border-radius: 9px;
  color: #e8def8;
  background: rgba(255, 255, 255, .045);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}
.chapter-reaction:hover:not(:disabled) { border-color: rgba(235, 190, 255, .66); background: rgba(153, 83, 235, .22); transform: translateY(-1px); }
.chapter-reaction:disabled { cursor: wait; opacity: .62; }
.chapter-reaction.is-active { border-color: rgba(255, 215, 116, .82); color: #fff1bf; background: rgba(174, 103, 255, .24); box-shadow: 0 0 0 2px rgba(255, 215, 116, .08); }
.chapter-reaction__glyph { color: #ffd979; font-size: 15px; line-height: 1; }
.chapter-reaction b { min-width: 1ch; color: #cda8ff; font-size: 11px; text-align: center; }
.chapter-reaction.is-active b { color: #ffe49b; }
.chapter-reactions__login { color: #d8b9ff; font-size: 12px; }

html[data-theme="light"] .fandom-world-card,
html[data-theme="light"] .chapter-reactions { border-color: rgba(108, 67, 175, .2); background: linear-gradient(145deg, rgba(255, 255, 255, .98), rgba(246, 242, 255, .98)); }
html[data-theme="light"] .fandom-world-card h2,
html[data-theme="light"] .chapter-reactions__head strong { color: #291648; }
html[data-theme="light"] .fandom-world-pulse__item { border-color: rgba(108, 67, 175, .14); }
html[data-theme="light"] .chapter-reaction { border-color: rgba(108, 67, 175, .22); color: #3d2d56; background: rgba(115, 70, 190, .06); }
html[data-theme="light"] .chapter-reaction.is-active { color: #4d2b05; background: rgba(179, 121, 255, .16); }

@media (max-width: 760px) {
  .fandom-world-grid { grid-template-columns: 1fr; }
  .fandom-world-card { padding: 16px; }
  .chapter-reactions { margin-inline: 9px; }
  .chapter-reactions__head { display: grid; gap: 5px; }
  .chapter-reactions__status { text-align: left; }
  .chapter-reaction { flex: 1 1 calc(50% - 7px); justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  .cover-image { transition: none; }
  .fandom-world-pulse__item,
  .chapter-reaction { transition: none; }
}

/* RANOTEKA_PROPOSAL_BOOK_ICON_V1 */
.header-propose .proposal-book-icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  font-size: 0;
  color: #ffd978;
  overflow: visible;
}
.proposal-book-icon {
  display: block;
  width: 27px;
  height: 27px;
  overflow: visible;
  transform: translateY(0) scale(.96);
  transform-origin: center bottom;
  filter: drop-shadow(0 3px 7px rgba(74, 32, 155, .30));
}
.proposal-book-icon__book {
  transform-box: view-box;
  transform-origin: 36px 46px;
  transition: transform .62s cubic-bezier(.22, .76, .25, 1);
}
.proposal-book-icon__cover {
  fill: #7c3ff0;
  stroke: #edc46b;
  stroke-width: 1.5;
  stroke-linejoin: round;
  transform-box: view-box;
  transform-origin: 36px 46px;
  transition: transform .62s cubic-bezier(.22, .76, .25, 1), fill .3s ease;
}
.proposal-book-icon__cover--right { fill: #652bd0; }
.proposal-book-icon__pages {
  fill: #fff7df;
  stroke: rgba(255, 224, 148, .82);
  stroke-width: .7;
  transition: transform .62s cubic-bezier(.22, .76, .25, 1), opacity .3s ease;
}
.proposal-book-icon__pages--right { fill: #f4e9c7; }
.proposal-book-icon__page-flip {
  fill: #fffdf4;
  stroke: rgba(255, 217, 119, .8);
  stroke-width: .7;
  opacity: 0;
  transform-box: view-box;
  transform-origin: 36px 19px;
}
.proposal-book-icon__spine {
  fill: none;
  stroke: #ffe49a;
  stroke-width: 1.4;
  stroke-linecap: round;
  opacity: .95;
}
.proposal-book-icon__spark {
  fill: #ffe58c;
  stroke: #f6a8ff;
  stroke-width: .8;
  opacity: 0;
  transform-box: view-box;
  transform-origin: 36px 12px;
}
.proposal-book-icon__particles { fill: #d995ff; opacity: 0; }
.proposal-book-icon__particles circle:nth-child(2) { fill: #ffe28a; }

.header-propose:is(:hover, :focus-visible) .proposal-book-icon__book {
  transform: translateY(-2px) scale(1.02);
}
.header-propose:is(:hover, :focus-visible) .proposal-book-icon__cover--left {
  transform: rotate(-17deg) translate(-1px, -1px);
}
.header-propose:is(:hover, :focus-visible) .proposal-book-icon__cover--right {
  transform: rotate(17deg) translate(1px, -1px);
}
.header-propose:is(:hover, :focus-visible) .proposal-book-icon__page-flip--one {
  animation: proposal-book-page-one .92s cubic-bezier(.22, .76, .25, 1) both;
}
.header-propose:is(:hover, :focus-visible) .proposal-book-icon__page-flip--two {
  animation: proposal-book-page-two 1s .08s cubic-bezier(.22, .76, .25, 1) both;
}
.header-propose:is(:hover, :focus-visible) .proposal-book-icon__spark {
  animation: proposal-book-spark .96s .12s cubic-bezier(.22, .76, .25, 1) both;
}
.header-propose:is(:hover, :focus-visible) .proposal-book-icon__particles {
  animation: proposal-book-particles .96s .16s ease-out both;
}
.header-propose.is-activating .proposal-book-icon__book {
  animation: proposal-book-click-lift .38s cubic-bezier(.18, .82, .25, 1) both;
}
.header-propose.is-activating .proposal-book-icon__cover--left {
  animation: proposal-book-click-left .38s cubic-bezier(.18, .82, .25, 1) both;
}
.header-propose.is-activating .proposal-book-icon__cover--right {
  animation: proposal-book-click-right .38s cubic-bezier(.18, .82, .25, 1) both;
}
.header-propose.is-activating .proposal-book-icon__page-flip--one {
  animation: proposal-book-page-one .42s ease-out both;
}
.header-propose.is-activating .proposal-book-icon__page-flip--two {
  animation: proposal-book-page-two .44s .04s ease-out both;
}
.header-propose.is-activating .proposal-book-icon__spark {
  animation: proposal-book-spark .46s .04s ease-out both;
}
.header-propose.is-activating .proposal-book-icon__particles {
  animation: proposal-book-particles .46s .05s ease-out both;
}
@keyframes proposal-book-page-one {
  0% { opacity: 0; transform: rotateY(88deg) scaleX(.2); }
  44% { opacity: 1; transform: rotateY(-16deg) scaleX(1); }
  100% { opacity: .82; transform: rotateY(0) scaleX(1); }
}
@keyframes proposal-book-page-two {
  0% { opacity: 0; transform: rotateY(-88deg) scaleX(.2); }
  48% { opacity: 1; transform: rotateY(16deg) scaleX(1); }
  100% { opacity: .78; transform: rotateY(0) scaleX(1); }
}
@keyframes proposal-book-spark {
  0% { opacity: 0; transform: translateY(8px) scale(.2) rotate(-18deg); }
  38% { opacity: 1; transform: translateY(-1px) scale(1.08) rotate(8deg); }
  100% { opacity: .94; transform: translateY(-4px) scale(.86) rotate(0); }
}
@keyframes proposal-book-particles {
  0% { opacity: 0; transform: translateY(6px) scale(.2); }
  42% { opacity: 1; transform: translateY(-2px) scale(1); }
  100% { opacity: 0; transform: translateY(-8px) scale(.65); }
}
@keyframes proposal-book-click-lift {
  0% { transform: translateY(0) scale(.96); }
  55% { transform: translateY(-4px) scale(1.08); }
  100% { transform: translateY(-2px) scale(1.02); }
}
@keyframes proposal-book-click-left {
  0% { transform: rotate(0); }
  60% { transform: rotate(-24deg) translate(-2px, -2px); }
  100% { transform: rotate(-17deg) translate(-1px, -1px); }
}
@keyframes proposal-book-click-right {
  0% { transform: rotate(0); }
  60% { transform: rotate(24deg) translate(2px, -2px); }
  100% { transform: rotate(17deg) translate(1px, -1px); }
}
html[data-theme="light"] .proposal-book-icon { filter: drop-shadow(0 3px 7px rgba(64, 39, 139, .22)); }
html[data-theme="light"] .proposal-book-icon__cover { stroke: #b16c16; }
@media (max-width: 570px) {
  .header-propose .proposal-book-icon-wrap { width: 22px; height: 22px; flex-basis: 22px; }
  .proposal-book-icon { width: 24px; height: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  .proposal-book-icon__book,
  .proposal-book-icon__cover,
  .proposal-book-icon__pages,
  .proposal-book-icon__page-flip,
  .proposal-book-icon__spark,
  .proposal-book-icon__particles { animation: none !important; transition: none !important; }
  .proposal-book-icon__page-flip,
  .proposal-book-icon__spark,
  .proposal-book-icon__particles { opacity: 0; }
}

/* RANOTEKA_HOME_ICON_V1 */
.menu-home-icon {
  display: block;
  width: 21px;
  height: 21px;
  overflow: visible;
  fill: rgba(169, 105, 255, .28);
  stroke: currentColor;
  stroke-width: 1.35;
  stroke-linejoin: round;
  filter: drop-shadow(0 2px 5px rgba(96, 45, 194, .26));
}
.menu-home-icon__door { fill: rgba(8, 10, 26, .62); stroke: none; }
.menu-home-icon__shine { fill: #ffe28a; stroke: none; }
.account-drawer__panel a:hover .menu-home-icon,
.account-drawer__panel a.is-current .menu-home-icon { filter: drop-shadow(0 3px 8px rgba(170, 91, 255, .42)); }
.mobile-bottom-nav .menu-home-icon { width: 20px; height: 20px; color: #d9c3ff; }
html[data-theme="light"] .menu-home-icon { fill: rgba(123, 76, 206, .16); color: #6c45be; filter: drop-shadow(0 2px 5px rgba(77, 49, 153, .18)); }
html[data-theme="light"] .menu-home-icon__door { fill: rgba(255, 255, 255, .76); }
html[data-theme="light"] .mobile-bottom-nav .menu-home-icon { color: #6240b2; }

/* RANOTEKA_CATALOG_ICON_V1 */
.menu-catalog-icon {
  display: block;
  width: 21px;
  height: 21px;
  overflow: visible;
  fill: rgba(169, 105, 255, .30);
  stroke: currentColor;
  stroke-width: 1.15;
  filter: drop-shadow(0 2px 5px rgba(96, 45, 194, .24));
}
.menu-catalog-icon__shine { fill: #ffe28a; stroke: none; }
.account-drawer__panel a:hover .menu-catalog-icon,
.account-drawer__panel a.is-current .menu-catalog-icon { filter: drop-shadow(0 3px 8px rgba(170, 91, 255, .42)); }
.mobile-bottom-nav .menu-catalog-icon { width: 20px; height: 20px; color: #d9c3ff; }
html[data-theme="light"] .menu-catalog-icon { fill: rgba(123, 76, 206, .16); color: #6c45be; filter: drop-shadow(0 2px 5px rgba(77, 49, 153, .18)); }
html[data-theme="light"] .mobile-bottom-nav .menu-catalog-icon { color: #6240b2; }

/* RANOTEKA_NEW_ICON_V1 */
.menu-new-icon {
  display: block;
  width: 21px;
  height: 21px;
  overflow: visible;
  fill: #a96cff;
  stroke: #f1c872;
  stroke-width: 1.1;
  stroke-linejoin: round;
  filter: drop-shadow(0 2px 6px rgba(124, 58, 237, .34));
}
.menu-new-icon__spark { fill: #ffe28a; stroke: none; }
.account-drawer__panel a:hover .menu-new-icon,
.account-drawer__panel a.is-current .menu-new-icon { filter: drop-shadow(0 3px 9px rgba(209, 124, 255, .54)); }
html[data-theme="light"] .menu-new-icon { fill: #7b4ccf; stroke: #b16c16; filter: drop-shadow(0 2px 5px rgba(77, 49, 153, .20)); }
html[data-theme="light"] .menu-new-icon__spark { fill: #d89920; }

/* RANOTEKA_POPULAR_ICON_V1 */
.menu-popular-icon {
  display: block;
  width: 21px;
  height: 21px;
  overflow: visible;
  fill: #9b58f4;
  stroke: #e9b960;
  stroke-width: 1.05;
  stroke-linejoin: round;
  filter: drop-shadow(0 2px 6px rgba(124, 58, 237, .34));
}
.menu-popular-icon__core { fill: #ffe28a; stroke: none; }
.account-drawer__panel a:hover .menu-popular-icon,
.account-drawer__panel a.is-current .menu-popular-icon { filter: drop-shadow(0 3px 9px rgba(255, 183, 84, .54)); }
html[data-theme="light"] .menu-popular-icon { fill: #7041c0; stroke: #b16c16; filter: drop-shadow(0 2px 5px rgba(77, 49, 153, .20)); }
html[data-theme="light"] .menu-popular-icon__core { fill: #d89920; }

/* RANOTEKA_LIBRARY_ICON_V1 */
.menu-library-icon {
  display: block;
  width: 21px;
  height: 21px;
  overflow: visible;
  fill: rgba(169, 105, 255, .28);
  stroke: #e7bd67;
  stroke-width: 1.05;
  stroke-linejoin: round;
  stroke-linecap: round;
  filter: drop-shadow(0 2px 6px rgba(124, 58, 237, .30));
}
.menu-library-icon__bookmark { fill: #ffe28a; stroke: none; }
.menu-library-icon__line { fill: none; stroke: rgba(255, 245, 214, .72); stroke-width: .8; }
.account-drawer__panel a:hover .menu-library-icon,
.account-drawer__panel a.is-current .menu-library-icon { filter: drop-shadow(0 3px 9px rgba(211, 137, 255, .52)); }
html[data-theme="light"] .menu-library-icon { fill: rgba(123, 76, 206, .15); stroke: #b16c16; filter: drop-shadow(0 2px 5px rgba(77, 49, 153, .18)); }
html[data-theme="light"] .menu-library-icon__bookmark { fill: #d89920; }
html[data-theme="light"] .menu-library-icon__line { stroke: rgba(92, 60, 154, .65); }

/* RANOTEKA_MESSAGES_ICON_V1 */
.menu-messages-icon {
  display: block;
  width: 21px;
  height: 21px;
  overflow: visible;
  fill: rgba(169, 105, 255, .24);
  stroke: #e7bd67;
  stroke-width: 1.05;
  stroke-linejoin: round;
  stroke-linecap: round;
  filter: drop-shadow(0 2px 6px rgba(124, 58, 237, .28));
}
.menu-messages-icon__line { fill: none; stroke: rgba(255, 245, 214, .82); stroke-width: .85; }
.menu-messages-icon__dot { fill: #ffe28a; stroke: none; }
.header-icon .menu-messages-icon { width: 24px; height: 24px; }
.profile-actions .menu-messages-icon { width: 18px; height: 18px; margin-right: 5px; vertical-align: -4px; }
.chat-placeholder > .menu-messages-icon { width: 34px; height: 34px; margin: 0 auto 8px; }
.account-drawer__panel a:hover .menu-messages-icon,
.account-drawer__panel a.is-current .menu-messages-icon { filter: drop-shadow(0 3px 9px rgba(211, 137, 255, .52)); }
html[data-theme="light"] .menu-messages-icon { fill: rgba(123, 76, 206, .14); stroke: #b16c16; filter: drop-shadow(0 2px 5px rgba(77, 49, 153, .18)); }
html[data-theme="light"] .menu-messages-icon__line { stroke: rgba(92, 60, 154, .70); }
html[data-theme="light"] .menu-messages-icon__dot { fill: #d89920; }

/* RANOTEKA_CHAT_ICON_V1 */
.menu-chat-icon {
  display: block;
  width: 21px;
  height: 21px;
  overflow: visible;
  fill: rgba(169, 105, 255, .24);
  stroke: #e7bd67;
  stroke-width: 1.05;
  stroke-linejoin: round;
  stroke-linecap: round;
  filter: drop-shadow(0 2px 6px rgba(124, 58, 237, .28));
}
.menu-chat-icon__dots { fill: none; stroke: #ffe28a; stroke-width: 2.2; stroke-linecap: round; }
.menu-chat-icon__shine { fill: #ffe28a; stroke: none; }
.messages-mode-switch .menu-chat-icon,
.messages-mode-switch .menu-messages-icon { width: 18px; height: 18px; margin-right: 6px; vertical-align: -4px; }
.account-drawer__panel a:hover .menu-chat-icon,
.account-drawer__panel a.is-current .menu-chat-icon { filter: drop-shadow(0 3px 9px rgba(211, 137, 255, .52)); }
html[data-theme="light"] .menu-chat-icon { fill: rgba(123, 76, 206, .14); stroke: #b16c16; filter: drop-shadow(0 2px 5px rgba(77, 49, 153, .18)); }
html[data-theme="light"] .menu-chat-icon__dots { stroke: #6f48bb; }
html[data-theme="light"] .menu-chat-icon__shine { fill: #d89920; }

/* RANOTEKA_PROFILE_ICON_ASSET_V1 */
.menu-profile-icon {
  display: block;
  width: 23px;
  height: 23px;
  object-fit: contain;
  object-position: center;
  filter: drop-shadow(0 2px 6px rgba(105, 50, 207, .34));
}
.account-drawer__panel a:hover .menu-profile-icon,
.account-drawer__panel a.is-current .menu-profile-icon { filter: drop-shadow(0 3px 9px rgba(211, 137, 255, .60)); transform: scale(1.04); }
html[data-theme="light"] .menu-profile-icon { filter: drop-shadow(0 2px 5px rgba(77, 49, 153, .24)); }

/* RANOTEKA_SETTINGS_ICON_ASSET_V1 */
.menu-settings-icon {
  display: block;
  width: 23px;
  height: 23px;
  object-fit: contain;
  object-position: center;
  filter: drop-shadow(0 2px 6px rgba(105, 50, 207, .34));
}
.account-drawer__panel a:hover .menu-settings-icon,
.account-drawer__panel a.is-current .menu-settings-icon { filter: drop-shadow(0 3px 9px rgba(211, 137, 255, .60)); transform: scale(1.04); }
.profile-actions .menu-settings-icon { width: 18px; height: 18px; margin-right: 5px; vertical-align: -4px; }
html[data-theme="light"] .menu-settings-icon { filter: drop-shadow(0 2px 5px rgba(77, 49, 153, .24)); }

/* RANIKO_AUTH_IMAGE_FULL: keep the original character uncropped on auth pages. */
.raniko-premium-guide.raniko-v6.raniko-premium-guide--inline .raniko-premium-guide__character img {
  display: block !important;
  right: 0 !important;
  bottom: 0 !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  aspect-ratio: 220 / 358 !important;
  object-fit: contain !important;
  object-position: center bottom !important;
}

/* RANOTEKA_RAIL_ARROWS_VISIBLE_V1: controls are created by the infinite
 * rail script and must remain visible on scrollable book strips. */
.premium-book-strip.is-scrollable .premium-book-strip__arrow {
  display: grid !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

/* RANOTEKA_MOBILE_DRAWER_COMPACT_V2: keep the full desktop destination set,
 * while using a compact right-aligned panel on narrow screens. */
@media (max-width: 520px) {
  .account-drawer__panel {
    max-height: calc(100vh - 132px);
    max-height: calc(100dvh - 132px);
    padding: 8px;
    border-radius: 16px;
  }

  .account-drawer__label {
    padding: 5px 9px 7px;
    font-size: 10px;
  }

  .account-drawer__panel a,
  .account-drawer__logout {
    min-height: 36px;
    height: 36px;
    padding: 0 9px;
    gap: 9px;
    border-radius: 10px;
    font-size: 13px;
  }

  .account-drawer__panel a span,
  .account-drawer__logout span {
    flex-basis: 21px;
    width: 21px;
    font-size: 17px;
  }

  .account-drawer__separator {
    margin: 5px 4px;
  }

  .account-drawer__panel a.account-drawer__balance {
    min-height: 50px;
    height: 50px;
    margin: 0 0 5px;
    padding: 5px 9px !important;
  }

  .account-drawer__panel a.account-drawer__balance > .account-drawer__balance-icon {
    flex-basis: 28px;
    width: 28px;
    height: 28px;
    font-size: 18px;
  }

  .account-drawer__balance-copy small { font-size: 10px; }
  .account-drawer__balance-copy strong { font-size: 14px; }
  .account-drawer__panel a.account-drawer__balance > .account-drawer__balance-action { font-size: 10px; }
}

/* RANOTEKA_MOBILE_COMPACT_FINAL_V1: four equal navigation slots, a smaller
 * profile drawer, and tighter home gutters on phone screens. */
@media (max-width: 760px) {
  .mobile-bottom-nav {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    align-items: stretch !important;
    width: 100% !important;
    height: calc(56px + env(safe-area-inset-bottom)) !important;
    min-height: calc(56px + env(safe-area-inset-bottom)) !important;
    padding: 3px 4px env(safe-area-inset-bottom) !important;
    gap: 2px !important;
    overflow: hidden !important;
  }

.mobile-bottom-nav a {
    position: relative !important;
    display: grid !important;
    grid-template-rows: 22px auto !important;
    place-items: center !important;
    align-content: center !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    height: 50px !important;
    padding: 2px 1px !important;
    gap: 1px !important;
    font-size: 18px !important;
  }

  .mobile-bottom-nav a span {
    width: 100% !important;
    max-width: none !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    text-align: center !important;
    font-size: 9px !important;
    line-height: 1.1 !important;
  }

  .mobile-bottom-nav a svg,
  .mobile-bottom-nav a img { width: 20px !important; height: 20px !important; }
  .mobile-bottom-nav b { right: calc(50% - 19px) !important; top: 0 !important; }
}

@media (max-width: 700px) {
  .home-premium {
    width: 100% !important;
    padding-left: 6px !important;
    padding-right: 6px !important;
  }

  .home-premium > .premium-section {
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 10px !important;
    padding-right: 10px !important;
  }

  .home-premium > .premium-hero { margin-left: 0 !important; margin-right: 0 !important; }
  .home-premium .premium-book-grid > .premium-book-card {
    flex-basis: calc((100vw - 48px) / 3) !important;
    width: calc((100vw - 48px) / 3) !important;
    min-width: calc((100vw - 48px) / 3) !important;
    max-width: calc((100vw - 48px) / 3) !important;
  }
}

/* RANOTEKA_HOME_ART_AND_HEADER_FIX_V1
 * Use the real per-book artwork in the hero and managed promo cards. The
 * old test-art override used a wide SVG inside a portrait frame, leaving
 * only a thin vertical slice visible. */
.home-premium .premium-hero__art {
  background-image: var(--premium-hero-cover) !important;
  background-repeat: no-repeat !important;
  background-size: cover !important;
  background-position: center !important;
}

.home-premium .premium-promo--content .premium-promo__art,
.home-premium .premium-promo--reader .premium-promo__art {
  background-image: var(--promo-cover) !important;
  background-repeat: no-repeat !important;
  background-size: cover !important;
  background-position: center !important;
}

/* The balance already appears in the header pill on desktop. Keep the
 * compact copy only for the mobile identity block, where it is useful. */
.account-drawer__mini-balance { display: none !important; }

.logo {
  font-family: Georgia, "Times New Roman", serif !important;
  font-size: 24px !important;
  font-weight: 800 !important;
  letter-spacing: .04em !important;
  color: #f5efff !important;
  background: none !important;
  -webkit-background-clip: initial !important;
  background-clip: initial !important;
  text-shadow: none !important;
}
.logo span { color: #c19aff !important; }

@media (max-width: 760px) {
  .account-drawer__mini-balance {
    display: inline-flex !important;
    min-height: 17px !important;
    gap: 3px !important;
    font-size: 12px !important;
  }

  .account-drawer__mini-balance-icon {
    width: 19px !important;
    height: 19px !important;
  }

  .account-drawer__identity { min-width: 40px !important; }
  .logo { font-size: 18px !important; }
}

@media (max-width: 380px) {
  .account-drawer__mini-balance { font-size: 11px !important; }
  .account-drawer__mini-balance-icon { width: 18px !important; height: 18px !important; }
  .account-drawer__identity { min-width: 38px !important; }
  .logo { font-size: 17px !important; }
}

/* RANOTEKA_HERO_WIDTH_GUARD_V1: the hero is a grid item with legacy auto
 * margins; make its content box fill the home column on every viewport. */
.home-premium > .premium-hero {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  justify-self: stretch !important;
}

@media (max-width: 520px) {
  .account-drawer__panel {
    width: min(246px, calc(100vw - 18px)) !important;
    max-width: calc(100vw - 18px) !important;
    right: 6px !important;
    top: 62px !important;
    max-height: calc(100dvh - 104px) !important;
    padding: 6px !important;
    border-radius: 14px !important;
  }

  .account-drawer__label { padding: 4px 7px 5px !important; font-size: 9px !important; }
  .account-drawer__panel a,
  .account-drawer__logout {
    min-height: 33px !important;
    height: 33px !important;
    padding: 0 7px !important;
    gap: 7px !important;
    border-radius: 8px !important;
    font-size: 12px !important;
  }
  .account-drawer__panel a span,
  .account-drawer__logout span { flex-basis: 19px !important; width: 19px !important; font-size: 15px !important; }
  .account-drawer__separator { margin: 4px 3px !important; }
  .account-drawer__panel a.account-drawer__balance {
    min-height: 44px !important;
    height: 44px !important;
    margin-bottom: 4px !important;
    padding: 4px 7px !important;
  }
  .account-drawer__panel a.account-drawer__balance > .account-drawer__balance-icon { width: 24px !important; height: 24px !important; flex-basis: 24px !important; }
  .account-drawer__balance-copy small { font-size: 9px !important; }
  .account-drawer__balance-copy strong { font-size: 12px !important; }
  .account-drawer__panel a.account-drawer__balance > .account-drawer__balance-action { font-size: 9px !important; }
}

/* Final guarantee: controls stay hidden while rails remain swipeable. */
.premium-book-strip__arrow,
.top-hero__arrow,
.premium-promo-carousel__arrow,
.premium-promos__arrow,
.sparks-carousel__arrow,
.ranoteka-premium-rail-arrow-v8,
[data-book-rail-prev], [data-book-rail-next],
[data-hero-prev], [data-hero-next] {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* RANOTEKA_HIDE_CAROUSEL_ARROWS_V2: rails stay swipeable/scrollable, but
 * carousel navigation buttons are intentionally absent on every viewport. */
.premium-book-strip__arrow,
.top-hero__arrow,
.premium-promo-carousel__arrow,
.premium-promos__arrow,
.sparks-carousel__arrow,
.ranoteka-premium-rail-arrow-v8,
[data-book-rail-prev],
[data-book-rail-next],
[data-hero-prev],
[data-hero-next] {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* RANOTEKA_CONTINUE_READING_LIMITS_V1: keep the home continuation shelf
 * dense on desktop and prevent it from becoming a long mobile feed. */
.premium-continue__grid {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}
.premium-continue__grid > :nth-child(n + 7) {
  display: none !important;
}

@media (max-width: 700px) {
  .premium-continue__grid {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }

  .premium-continue__grid > :nth-child(n + 4) {
    display: none !important;
  }

  .premium-continue__card {
    grid-template-columns: 58px minmax(0, 1fr) !important;
    min-height: 88px !important;
    padding: 7px !important;
    gap: 9px !important;
  }

  .premium-continue__card img {
    width: 58px !important;
    height: 74px !important;
    border-radius: 7px !important;
  }

  .premium-continue__card strong { font-size: 11px !important; }
  .premium-continue__card small,
  .premium-continue__card b { font-size: 9px !important; }
}

/* RANOTEKA_COVER_FULL_FRAME_V1: keep supplied covers readable on every card. */
.premium-book-card__cover {
  background-size: contain !important;
  background-repeat: no-repeat !important;
  background-color: #0b0e18 !important;
}
.premium-book-card__cover::before,
.premium-book-card__cover::after {
  display: none !important;
}
.book-card__cover img,
.book-cover img,
.completion-recommendation img,
.continue-card img,
.mini-book-row img {
  object-fit: contain !important;
  background: #0b0e18;
}
@media (max-width: 720px) {
  .premium-book-card__cover { background-size: contain !important; }
}

/* RANOTEKA_MOBILE_MENU_PARITY_V1: keep the same core destinations as the
 * desktop account menu while making the bottom bar compact and swipeable. */
@media (max-width: 760px) {
  .mobile-bottom-nav {
    height: calc(58px + env(safe-area-inset-bottom)) !important;
    display: flex !important;
    align-items: stretch;
    justify-content: flex-start;
    gap: 2px;
    padding: 4px 6px env(safe-area-inset-bottom) !important;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
  }

  .mobile-bottom-nav::-webkit-scrollbar { display: none; }

  .mobile-bottom-nav a {
    flex: 0 0 64px;
    min-width: 64px;
    height: 50px;
    padding: 3px 2px;
    border-radius: 9px;
    gap: 1px;
    font-size: 17px;
    color: #a6aec1;
  }

  .mobile-bottom-nav a span {
    max-width: 64px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 7px;
    line-height: 1.1;
  }

  .mobile-bottom-nav a.is-current,
  .mobile-bottom-nav a:focus-visible {
    color: #f3d78b;
    background: rgba(139, 82, 220, .22);
    outline: none;
  }

  .mobile-bottom-nav a.is-current svg,
  .mobile-bottom-nav a.is-current .avatar { filter: drop-shadow(0 2px 6px rgba(228, 181, 91, .35)); }
  .mobile-bottom-nav .avatar { width: 21px; height: 21px; }
  .mobile-bottom-nav b { right: 8px; top: 1px; }
}

/* RANOTEKA_MOBILE_BOTTOM_FULLWIDTH_V1: override the legacy flex rail so the
 * four requested destinations fill the viewport evenly. */
@media (max-width: 760px) {
  .mobile-bottom-nav {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    width: 100vw !important;
    max-width: 100vw !important;
    left: 0 !important;
    right: 0 !important;
    box-sizing: border-box !important;
    padding-left: 4px !important;
    padding-right: 4px !important;
    overflow: hidden !important;
  }

  .mobile-bottom-nav a {
    flex: 1 1 0 !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
  }
}
/* RANOTEKA_LOGO_RESTORE_V1_FINAL: keep the original wide gradient wordmark
 * as the final logo rule so later compatibility overrides cannot replace it. */
.logo {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif !important;
  font-size: 24px !important;
  font-weight: 950 !important;
  letter-spacing: .09em !important;
  color: transparent !important;
  background: linear-gradient(100deg, #fff 0%, #e9d9ff 46%, #b25cff 76%, #6b37ff 100%) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  text-shadow: 0 0 28px rgba(150, 75, 255, .24) !important;
}
.logo span { color: inherit !important; }
html[data-theme="light"] .logo {
  background: linear-gradient(100deg, #27334e 0%, #6340bb 62%, #a34fcf 100%) !important;
  text-shadow: none !important;
}
@media (max-width: 760px) {
  .logo { font-size: 18px !important; }
}
@media (max-width: 380px) {
  .logo { font-size: 16px !important; letter-spacing: .06em !important; }
}
/* RANOTEKA_CONVERSATION_SCALE_V2: readable dialog list on desktop and mobile. */
.conversation-list { padding: 18px !important; }
.conversation-users { gap: 10px !important; }
.conversation-user { grid-template-columns: 50px minmax(0, 1fr) auto !important; gap: 11px !important; padding: 11px 10px !important; border-radius: 13px !important; }
.conversation-user .avatar--message { width: 50px !important; height: 50px !important; font-size: 14px !important; }
.conversation-user__copy { gap: 4px !important; }
.conversation-user__copy > strong { font-size: 15px !important; line-height: 1.2 !important; }
.conversation-user__copy > small { font-size: 11px !important; line-height: 1.25 !important; }
.conversation-user__preview { font-size: 11px !important; line-height: 1.3 !important; }
.conversation-user__side { gap: 7px !important; }
.conversation-user__unread { min-width: 23px !important; height: 23px !important; font-size: 10px !important; }
@media (max-width: 760px) {
  .conversation-list { padding: 16px 14px !important; }
  .conversation-user { grid-template-columns: 50px minmax(0, 1fr) auto !important; gap: 11px !important; padding: 11px 9px !important; }
  .conversation-user .avatar--message { width: 50px !important; height: 50px !important; }
  .conversation-user__copy > strong { font-size: 15px !important; }
  .conversation-user__copy > small { font-size: 11px !important; }
  .conversation-user__preview { font-size: 11px !important; }
}
@media (max-width: 380px) {
  .conversation-list { padding-inline: 10px !important; }
  .conversation-user { grid-template-columns: 46px minmax(0, 1fr) auto !important; gap: 10px !important; }
  .conversation-user .avatar--message { width: 46px !important; height: 46px !important; }
  .conversation-user__copy > strong { font-size: 14px !important; }
  .conversation-user__copy > small, .conversation-user__preview { font-size: 10px !important; }
}
/* RANOTEKA_SPARKS_MODAL_BRIGHT_V1: improve contrast in the purchase modal. */
.sparks-modal::backdrop {
  background: rgba(2, 5, 15, .76) !important;
  backdrop-filter: blur(8px) !important;
}
.sparks-modal__shell {
  background:
    radial-gradient(circle at 50% -12%, rgba(135, 76, 255, .28), transparent 38%),
    #0e1424 !important;
}
.sparks-modal .spark-package-card {
  opacity: .62 !important;
  filter: saturate(.88) brightness(.9) !important;
}
.sparks-modal .spark-package-card.is-active {
  opacity: 1 !important;
  filter: none !important;
}
.sparks-modal .spark-package-card__button::before {
  background-image: linear-gradient(135deg, rgba(8, 10, 24, .08), rgba(8, 10, 24, .46)), var(--spark-package-image, none) !important;
  opacity: .9 !important;
}
.sparks-modal .spark-package-card__number { color: rgba(255, 255, 255, .78) !important; }
.sparks-modal .spark-package-card__name { color: #ead5ff !important; }
.sparks-modal .spark-package-card__sparks { color: #fff !important; }
.sparks-modal .spark-package-card__sparks small { color: rgba(255, 255, 255, .82) !important; }
.sparks-modal .spark-package-card__price { color: #fff !important; }
.sparks-modal .spark-package-card__pay { box-shadow: 0 8px 22px rgba(125, 55, 238, .3) !important; }
.sparks-modal .sparks-custom-amount {
  border-color: rgba(153, 100, 255, .48) !important;
  background: rgba(15, 22, 40, .82) !important;
}
/* RANOTEKA_SPARKS_PACKAGE_DEAL_V1: make paid amount and bonus explicit. */
.sparks-modal .spark-package-card__deal {
  display: block !important;
  color: #f5dcff !important;
  font-size: 14px !important;
  font-weight: 900 !important;
  line-height: 1.3 !important;
}
.sparks-modal .spark-package-card__bonus {
  color: #ffd982 !important;
  font-size: 13px !important;
  font-weight: 850 !important;
}
@media (max-width: 720px) {
  .sparks-modal .spark-package-card__deal { font-size: 13px !important; }
  .sparks-modal .spark-package-card__bonus { font-size: 12px !important; }
}

/* RANOTEKA_SPARKS_PACKAGE_COPY_V2: make the payment and bonus relationship
   readable at a glance on every package card. */
.sparks-modal .spark-package-card__sparks small {
  color: rgba(255, 255, 255, .78) !important;
  font-size: 11px !important;
  letter-spacing: .02em !important;
  text-transform: none !important;
}
.sparks-modal .spark-package-card__deal {
  display: block !important;
  max-width: 100%;
  padding: 9px 10px !important;
  border: 1px solid rgba(194, 145, 255, .34) !important;
  border-radius: 10px !important;
  color: #f8eaff !important;
  background: rgba(115, 53, 221, .18) !important;
  font-size: 13px !important;
  font-weight: 900 !important;
  line-height: 1.35 !important;
  letter-spacing: 0 !important;
}
.sparks-modal .spark-package-card__bonus {
  display: inline-flex !important;
  width: max-content;
  max-width: 100%;
  padding: 4px 8px !important;
  border: 1px solid rgba(255, 217, 130, .28) !important;
  border-radius: 999px !important;
  color: #ffe29a !important;
  background: rgba(255, 201, 91, .10) !important;
  font-size: 11px !important;
  font-weight: 850 !important;
  line-height: 1.25 !important;
}
@media (max-width: 720px) {
  .sparks-modal .spark-package-card__deal {
    padding: 8px 9px !important;
    font-size: 12px !important;
  }
  .sparks-modal .spark-package-card__bonus { font-size: 10px !important; }
}

/* RANOTEKA_SPARKS_TOPUP_V3: package cards are informational; the lower block
   is the single, clear place where the reader enters an amount and pays. */
.sparks-modal .spark-package-card__button {
  cursor: grab !important;
}
.sparks-modal .spark-package-card__button:active { cursor: grabbing !important; }
.sparks-modal .spark-package-card__pay { display: none !important; }
.sparks-modal .sparks-custom-amount {
  margin-top: 18px !important;
  padding: 20px !important;
  border: 1px solid rgba(156, 100, 255, .46) !important;
  border-radius: 17px !important;
  background: linear-gradient(145deg, rgba(27, 20, 58, .9), rgba(12, 19, 34, .96)) !important;
}
.sparks-bonus-scale {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0 16px;
}
.sparks-bonus-scale span {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 9px 8px;
  border: 1px solid rgba(176, 125, 255, .22);
  border-radius: 10px;
  background: rgba(8, 12, 25, .42);
}
.sparks-bonus-scale strong { color: #eee5ff; font-size: 11px; white-space: nowrap; }
.sparks-bonus-scale small { color: #ffd982; font-size: 12px; font-weight: 900; }
.sparks-custom-amount__form {
  grid-template-columns: minmax(0, 1fr) minmax(210px, auto) auto;
  align-items: end;
  gap: 12px;
}
.sparks-custom-amount__form .field { min-width: 0; }
.sparks-custom-amount__preview {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 217, 130, .30);
  border-radius: 10px;
  color: #ffe7a9;
  background: rgba(126, 79, 22, .18);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.35;
}
.sparks-custom-amount__form > .btn { min-height: 46px; white-space: nowrap; }
@media (max-width: 720px) {
  .sparks-custom-amount { padding: 16px !important; }
  .sparks-bonus-scale { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
  .sparks-bonus-scale span { padding: 8px 7px; }
  .sparks-bonus-scale strong { font-size: 10px; }
  .sparks-custom-amount__form { grid-template-columns: 1fr; }
  .sparks-custom-amount__preview,
  .sparks-custom-amount__form > .btn { width: 100%; }
}

/* RANOTEKA_TOP_BLOCK_REPAIR_V1: restore the desktop hero canvas and keep the
 * compact balance only on mobile, where the header has no balance pill. */
@media (min-width: 761px) {
  .home-premium > .premium-hero {
    position: relative !important;
    display: block !important;
    width: 100% !important;
    height: clamp(420px, 31vw, 470px) !important;
    min-height: 420px !important;
    max-height: 470px !important;
    overflow: hidden !important;
  }

  .home-premium .premium-hero__slide {
    position: absolute !important;
    inset: 0 !important;
    display: grid !important;
    grid-template-columns: minmax(180px, 230px) minmax(0, 1fr) !important;
    align-items: center !important;
    gap: clamp(26px, 4vw, 58px) !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    box-sizing: border-box !important;
    padding: 28px clamp(30px, 5vw, 72px) 46px !important;
    overflow: hidden !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }

  .home-premium .premium-hero__slide.is-active {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
  }

  .home-premium .premium-hero__art {
    position: relative !important;
    inset: auto !important;
    display: block !important;
    grid-column: 1 !important;
    grid-row: 1 !important;
    justify-self: center !important;
    width: clamp(180px, 16vw, 230px) !important;
    min-width: 180px !important;
    height: auto !important;
    aspect-ratio: 2 / 3 !important;
    transform: none !important;
  }

  .home-premium .premium-hero__content {
    position: relative !important;
    inset: auto !important;
    display: flex !important;
    grid-column: 2 !important;
    grid-row: 1 !important;
    width: auto !important;
    min-width: 0 !important;
    min-height: 0 !important;
    height: auto !important;
    padding: 0 !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
  }

  .home-premium .premium-hero__shade {
    position: absolute !important;
    inset: 0 !important;
  }

  .home-premium .premium-hero__dots {
    position: absolute !important;
    left: 50% !important;
    bottom: 18px !important;
    z-index: 8 !important;
    transform: translateX(-50%) !important;
  }

  .account-drawer__trigger {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    min-height: 42px !important;
    padding: 0 4px !important;
    white-space: nowrap !important;
  }

  .account-drawer__identity {
    display: flex !important;
    align-items: center !important;
    min-width: 34px !important;
  }

  .account-drawer__trigger .avatar--header {
    width: 34px !important;
    height: 34px !important;
  }

  .account-drawer__mini-balance {
    display: none !important;
  }
}

/* The carousel is swipe/auto-play driven; keep navigation arrows out of both
 * layouts as agreed. */
.home-premium .top-hero__arrow,
.home-premium .premium-hero__arrow {
  display: none !important;
}
