@import url('https://fonts.googleapis.com/css2?family=Marck+Script&family=Russo+One&family=PT+Serif:wght@400;700&display=swap');

:root{
  --orange:#ff6a1d;
  --purple:#6d0cff;
}
*{box-sizing:border-box}
html,body{margin:0;min-height:100%;background:#130b06;color:#fff;font-family:Arial,Helvetica,sans-serif}
button,a{-webkit-tap-highlight-color:transparent}
button{font:inherit}

.anbook{position:relative;min-height:100svh;overflow:hidden}
.anbook-bg{position:absolute;inset:0;background:url('https://nodzone-cloud.github.io/anita/alexnode-book-v7-emphasis/assets/book-bg-ru-support.png?v=20260913-3') center/cover no-repeat;z-index:0}
.anbook.lang-en .anbook-bg{background-image:url('https://nodzone-cloud.github.io/anita/alexnode-book-v7-emphasis/assets/book-bg-eng-support.png?v=20260913-3') !important}
.anbook-shade{position:absolute;inset:0;background:linear-gradient(180deg,rgba(0,0,0,.12),rgba(0,0,0,.02) 58%,rgba(0,0,0,.20));z-index:1;pointer-events:none}

/* compact live logo/header, matching the approved reference more closely */
.topbar{position:relative;z-index:20;height:110px;display:grid;grid-template-columns:330px 1fr auto;align-items:start;padding:22px 48px 0;gap:22px}
.brand{display:inline-flex;align-items:center;gap:10px;width:max-content;color:#fff;text-decoration:none;filter:drop-shadow(0 2px 5px #0006)}
.brand-an{font-family:'Russo One',Arial,sans-serif;font-size:43px;line-height:.92;letter-spacing:-1px}
.brand-line{width:1px;height:38px;background:rgba(255,255,255,.78)}
.brand-copy{display:flex;flex-direction:column;justify-content:center}
.brand-name{font-family:'Russo One',Arial,sans-serif;font-size:24px;line-height:1;letter-spacing:2px}
.brand-sub{font-size:7.4px;letter-spacing:1.05px;margin-top:5px;font-weight:700}

.nav{align-self:center;justify-self:center;display:flex;gap:34px;margin-top:0}
.nav a{color:#fff;text-decoration:none;font-size:14px;padding:9px 0;position:relative;text-shadow:0 1px 5px #000}
.nav a.active::after{content:'';position:absolute;left:0;right:0;bottom:0;height:3px;background:var(--orange);border-radius:3px}

.top-actions{display:flex;gap:20px;align-items:center;justify-self:end}
.buy-button{display:inline-flex;align-items:center;gap:9px;color:#fff;text-decoration:none;background:linear-gradient(90deg,var(--purple),#c418db,var(--orange));padding:13px 23px;border-radius:27px;font-weight:700;box-shadow:0 8px 24px #0004}
.cart{font-size:18px}
.languages{display:flex;gap:16px}
.languages button{border:0;background:none;color:#fff;cursor:pointer;padding:5px 0;font-weight:700;opacity:.82}
.languages button.active{opacity:1}

/* Handwritten slogan is baked into the background image. */
.tagline{display:none!important}

.hero{position:relative;z-index:5;min-height:calc(100svh - 110px);padding:0 58px 112px}

/* initial floating book */
.book-dock{position:absolute;left:72px;top:28px;width:250px;height:505px;display:flex;align-items:flex-start;justify-content:center}
.floating-cover{border:0;background:none;padding:0;cursor:pointer;filter:drop-shadow(0 22px 24px rgba(0,0,0,.54));animation:floatBook 3.6s ease-in-out infinite}
.floating-cover img{display:block;width:225px;max-height:490px;object-fit:contain}
@keyframes floatBook{0%,100%{transform:translateY(0) rotate(-1deg)}50%{transform:translateY(-10px) rotate(.75deg)}}

/* preview after book flies into the middle */
.focus-zone{position:absolute;left:50%;top:48%;transform:translate(-50%,-50%) scale(.86);display:grid;grid-template-columns:minmax(210px,350px) minmax(210px,290px) minmax(210px,350px);align-items:center;gap:28px;opacity:0;pointer-events:none;transition:opacity .42s ease,transform .62s cubic-bezier(.2,.85,.18,1);width:min(1110px,88vw)}
.focus-zone.show{opacity:1;pointer-events:auto;transform:translate(-50%,-50%) scale(1)}
.focus-cover{border:0;background:none;padding:0;cursor:pointer}
.focus-cover img{display:block;width:100%;max-height:69vh;object-fit:contain;filter:drop-shadow(0 27px 29px rgba(0,0,0,.58))}
.focus-copy{text-align:center;background:rgba(12,7,4,.43);backdrop-filter:blur(10px);padding:20px;border:1px solid rgba(255,255,255,.13);border-radius:20px}
.focus-copy h1{font-family:'Russo One',sans-serif;font-size:27px;margin:0 0 10px}
.focus-copy p{font-size:14px;line-height:1.45}
.primary-cta{border:0;color:#fff;background:linear-gradient(90deg,var(--purple),var(--orange));padding:11px 19px;border-radius:22px;font-weight:700;cursor:pointer}

/* reader: arrows exist ONLY here, never on initial/preview screen */
.reader{position:absolute;inset:4px 0 88px;display:flex;align-items:center;justify-content:center;gap:18px;opacity:0;visibility:hidden;pointer-events:none;transform:scale(.96);transition:opacity .35s ease,transform .35s ease,visibility .35s}
.reader.show{opacity:1;visibility:visible;pointer-events:auto;transform:scale(1)}
.reader-close{position:absolute;right:48px;top:4px;width:38px;height:38px;border-radius:50%;border:1px solid #ffffff55;background:#0008;color:#fff;font-size:27px;cursor:pointer!important;z-index:30;pointer-events:auto}

.book-open{width:min(1040px,78vw);height:min(69vh,650px);display:grid;grid-template-columns:1fr 14px 1fr;filter:drop-shadow(0 28px 38px rgba(0,0,0,.55));transform-origin:center;transition:transform .2s}
.book-open.zoomed{transform:scale(1.08)}
.page{position:relative;background:linear-gradient(90deg,#eee9df 0%,#fff 10%,#fff 92%,#e7e1d6 100%);color:#181614;overflow:hidden}
.page-left{border-radius:12px 0 0 12px;box-shadow:inset -12px 0 18px rgba(0,0,0,.07)}
.page-right{border-radius:0 12px 12px 0;box-shadow:inset 12px 0 18px rgba(0,0,0,.07)}
.spine{background:linear-gradient(90deg,#c9c1b4,#f8f3eb 47%,#c9c1b4);box-shadow:0 0 9px #0003}

/* readable page typography + safe bottom area */
.page-inner{height:100%;overflow:hidden;padding:42px 40px 50px;font-family:'PT Serif',Georgia,serif;font-size:14.5px;line-height:1.38}
.page-inner p{
  margin:0 0 .82em;
  text-align:left;
  text-wrap:pretty;
  orphans:3;
  widows:3;
}
.page-inner .book-title{font-size:25px;line-height:1.06;font-weight:700;margin:0 0 4px}
.page-inner .book-subtitle{font-size:27px;line-height:1.04;font-weight:700;margin:0 0 18px}

/* Every chapter gets a clear, book-like opening and never visually merges with old text. */
.page-inner .chapter-head{
  margin:4px 0 20px;
  padding-top:4px;
}
.page-inner .chapter-label{
  display:block;
  font-size:15px;
  line-height:1.15;
  font-weight:700;
  margin:0 0 6px;
}
.page-inner .chapter-title{
  display:block;
  font-size:28px;
  line-height:1.04;
  font-weight:700;
  margin:0;
  max-width:95%;
}

/* Deliberate emphasis is NOT a heading: same size as story text. */
.page-inner .emphasis-line{
  margin:.35em 0 .9em;
  font-size:1em;
  line-height:1.42;
  font-weight:700;
  font-style:italic;
}

/* Quoted speech/thoughts stay readable but visibly emphasized. */
.page-inner .spoken,
.page-inner .spoken-block{
  font-size:1em;
  line-height:1.42;
  font-weight:700;
  font-style:italic;
}
.page-inner .spoken-block{
  margin:.35em 0 .9em;
}

.page-inner strong{font-weight:700}
.page-inner em{font-style:italic}
.chapter-hero-wrap{display:flex;justify-content:center;align-items:center;width:100%;height:calc(100% - 90px);margin-top:10px}
.chapter-hero-image{display:block;max-width:92%;max-height:100%;width:auto;height:auto;object-fit:contain;border-radius:4px}
.page-num{position:absolute;bottom:16px;left:0;right:0;text-align:center;font-family:'PT Serif',serif;font-size:12px;color:#1c1a18}

.page-arrow{width:52px;height:52px;flex:0 0 52px;border-radius:50%;border:1px solid #ffffffba;background:#0006;color:#fff;font-size:36px;line-height:1;display:grid;place-items:center;cursor:pointer;backdrop-filter:blur(8px)}
.page-arrow:disabled{opacity:.25;cursor:default}
.mobile-hint{display:none;position:absolute;bottom:0;font-size:11px;opacity:.75}

.bottom-left,.bottom-right,.bottom-center{position:absolute;z-index:25;bottom:18px}
.bottom-left{left:26px;display:flex;flex-direction:column;align-items:center;gap:5px;font-size:11px}
.round-control{width:42px;height:42px;border-radius:50%;border:0;background:#0006;color:#fff;font-size:19px;cursor:pointer}
.bottom-right{right:28px;display:flex;gap:18px}
.bottom-tool{border:0;background:none;color:#fff;display:flex;flex-direction:column;align-items:center;gap:5px;cursor:pointer;font-size:11px}
.tool-icon{display:grid;place-items:center;width:40px;height:40px;border-radius:50%;background:#0006;font-size:21px}
.bottom-center{left:50%;transform:translateX(-50%);padding:6px 16px;border-radius:20px;background:#0006;font-size:12px;transition:opacity .2s}
.hidden{opacity:0!important;visibility:hidden!important;pointer-events:none!important}

.exit-fullscreen{display:none;position:fixed;left:50%;bottom:75px;transform:translateX(-50%);z-index:99999;border:1px solid #ffffff55;background:#000d;color:#fff;padding:11px 18px;border-radius:22px;cursor:pointer}
:fullscreen .exit-fullscreen{display:block}
:-webkit-full-screen .exit-fullscreen{display:block}

.contents-panel{position:fixed;inset:0;z-index:99998;background:#000b;backdrop-filter:blur(8px);display:none;place-items:center}
.contents-panel.show{display:grid}
.contents-card{width:min(620px,90vw);max-height:78vh;overflow:auto;background:#fff;color:#171717;border-radius:18px;padding:30px;position:relative}
.contents-close{position:absolute;right:12px;top:8px;border:0;background:none;font-size:30px;cursor:pointer}
.content-link{width:100%;text-align:left;padding:10px 5px;border:0;border-bottom:1px solid #ddd;background:none;cursor:pointer}

.page-tester{position:fixed!important;visibility:hidden!important;pointer-events:none!important;left:-99999px!important;top:0!important;z-index:-100!important}

@media(max-width:900px){
  .topbar{height:84px;padding:16px 16px 0;grid-template-columns:auto 1fr}
  .brand{gap:7px}.brand-an{font-size:31px}.brand-line{height:29px}.brand-name{font-size:16px;letter-spacing:1.3px}.brand-sub{font-size:6px;letter-spacing:.65px;margin-top:3px}
  .nav{display:none}.top-actions{grid-column:2;grid-row:1;gap:8px}.buy-button{display:none}.tagline{display:none}
  .hero{min-height:calc(100svh - 84px);padding:0 10px 94px}
  .book-dock{left:12px;top:23px;width:145px;height:315px}.floating-cover img{width:140px;max-height:305px}
  .focus-zone{top:48%;grid-template-columns:1fr 1fr;gap:6px;width:94vw}.focus-copy{grid-column:1/-1;grid-row:2;padding:13px 11px}.focus-copy h1{font-size:19px}.focus-copy p{font-size:12px}.focus-cover img{max-height:48svh}
  .reader{inset:0 0 75px;gap:0}.reader-close{right:10px;top:3px}
  .book-open{width:min(92vw,520px);height:min(69svh,610px);display:block}.page{width:100%;height:100%;border-radius:13px!important}.page-right,.spine{display:none}
  .page-inner{padding:30px 24px 43px;font-size:13.5px;line-height:1.4}.page-inner .chapter-label{font-size:15px}.page-inner .chapter-title{font-size:27px}.page-inner .book-title{font-size:22px}.page-inner .book-subtitle{font-size:24px}
  .page-arrow{display:none}.mobile-hint{display:block}
  .bottom-right{right:12px;gap:9px}.bottom-left{left:10px}.bottom-tool span:last-child{display:none}.bottom-center{bottom:20px}.languages{gap:9px}.languages button{font-size:11px}
}


/* =========================================================
   BACK COVER CLICK-TO-ZOOM
   Click once = enlarge in the center.
   Click again = return to normal.
   ========================================================= */
.focus-cover.back{
  cursor:zoom-in;
  transition:filter .22s ease;
}

.focus-zone.back-zoom-active::before{
  content:'';
  position:fixed;
  inset:0;
  z-index:9997;
  background:rgba(0,0,0,.68);
  backdrop-filter:blur(4px);
}

.focus-zone.back-zoom-active .focus-cover.back{
  position:fixed;
  left:50%;
  top:50%;
  width:min(540px,78vw);
  height:min(86vh,820px);
  transform:translate(-50%,-50%);
  z-index:9999;
  cursor:zoom-out;
  display:flex;
  align-items:center;
  justify-content:center;
  margin:0;
}

.focus-zone.back-zoom-active .focus-cover.back img{
  width:auto;
  height:auto;
  max-width:100%;
  max-height:100%;
  object-fit:contain;
  filter:drop-shadow(0 30px 45px rgba(0,0,0,.75));
}

.focus-zone.back-zoom-active .focus-cover.front,
.focus-zone.back-zoom-active .focus-copy{
  pointer-events:none;
}

/* Mobile: keep the enlarged back cover inside the viewport. */
@media(max-width:900px){
  .focus-zone.back-zoom-active .focus-cover.back{
    width:88vw;
    height:80svh;
  }
}


/* =========================================================
   RETURN TO BOOK LIST
   Visible only after a book has been selected.
   ========================================================= */
.return-books-btn{
  position:absolute;
  left:24%;
  top:48%;
  transform:translate(-50%,-50%);
  z-index:40;
  width:54px;
  height:54px;
  border-radius:50%;
  border:1px solid rgba(255,255,255,.72);
  background:rgba(0,0,0,.42);
  color:#fff;
  font-size:38px;
  line-height:1;
  display:grid;
  place-items:center;
  cursor:pointer;
  opacity:0;
  visibility:hidden;
  pointer-events:none;
  backdrop-filter:blur(8px);
  transition:
    opacity .25s ease,
    transform .25s ease,
    background .2s ease;
}

.return-books-btn.show{
  opacity:1;
  visibility:visible;
  pointer-events:auto;
}

.return-books-btn:hover{
  background:rgba(0,0,0,.65);
  transform:translate(-50%,-50%) scale(1.08);
}

@media(max-width:900px){
  .return-books-btn{
    left:24px;
    top:47%;
    transform:translateY(-50%);
    width:46px;
    height:46px;
    font-size:32px;
  }

  .return-books-btn:hover{
    transform:translateY(-50%);
  }
}


/* =========================================================
   AN BOOK HUB — LIST / GALLERY / REVIEWS / BUY
   ========================================================= */
.dock-actions{
  position:absolute;
  left:50%;
  transform:translateX(-50%);
  top:485px;
  width:max-content;
  z-index:8;
}
.mini-action,.secondary-btn{
  border:1px solid rgba(255,255,255,.28);
  background:rgba(0,0,0,.48);
  color:#fff;
  padding:8px 13px;
  border-radius:18px;
  cursor:pointer;
  backdrop-filter:blur(8px);
}
.mini-action:hover,.secondary-btn:hover{background:rgba(0,0,0,.68)}

.section-view{
  position:absolute;
  z-index:10;
  left:0;right:0;
  top:110px;
  bottom:72px;
  display:none;
  align-items:center;
  justify-content:center;
  padding:25px 5vw 35px;
}
.section-view.show{display:flex}

.section-card{
  width:min(850px,92vw);
  max-height:calc(100svh - 190px);
  overflow:auto;
  color:#fff;
  background:rgba(11,7,5,.62);
  border:1px solid rgba(255,255,255,.18);
  border-radius:24px;
  padding:30px;
  box-shadow:0 28px 60px rgba(0,0,0,.35);
  backdrop-filter:blur(14px);
}
.section-card.wide{width:min(1150px,92vw)}
.section-card h1{margin:0 0 8px;font-family:'Russo One',Arial,sans-serif;font-size:30px}
.section-lead{margin:0 0 24px;opacity:.86;line-height:1.5}

.gallery-grid{
  min-height:360px;
  border:1px dashed rgba(255,255,255,.22);
  border-radius:18px;
}

.books-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(210px,260px));
  justify-content:center;
  gap:26px;
}
.book-card{
  background:rgba(0,0,0,.28);
  border:1px solid rgba(255,255,255,.14);
  border-radius:20px;
  padding:18px;
  text-align:center;
}
.book-card-cover{
  border:0;background:none;padding:0;cursor:pointer;width:100%;
}
.book-card-cover img{
  display:block;width:100%;height:330px;object-fit:contain;
  filter:drop-shadow(0 16px 18px rgba(0,0,0,.48));
}
.book-card h3{margin:12px 0 10px}
.book-card-actions{display:flex;justify-content:center;gap:8px;flex-wrap:wrap}

.review-book-row{
  display:grid;
  grid-template-columns:120px 1fr;
  gap:22px;
  align-items:center;
  margin:20px 0;
}
.review-book-cover{width:110px;max-height:180px;object-fit:contain}
.field-label{display:block;margin:12px 0 6px;font-weight:700}
.hub-field{
  width:100%;
  border:1px solid rgba(255,255,255,.22);
  color:#fff;
  background:rgba(0,0,0,.42);
  border-radius:12px;
  padding:11px 12px;
  outline:none;
}
select.hub-field option{color:#111;background:#fff}
.review-text{min-height:110px;resize:vertical}
.review-form{margin:12px 0 28px}
.stars{display:flex;gap:5px;margin:4px 0 10px}
.stars button{
  border:0;background:none;color:#ffffff55;
  font-size:31px;line-height:1;cursor:pointer;padding:2px;
}
.stars button.on{color:#ffc842}
.review-status{min-height:20px;margin-top:10px;font-size:13px;opacity:.86}
.review-list-head{display:flex;align-items:center;justify-content:space-between;gap:18px}
.review-list-head h2{margin:10px 0 12px}
.review-average{font-weight:700}
.reviews-list{display:grid;gap:12px}
.review-item{
  padding:15px 16px;
  border-radius:15px;
  background:rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.10);
}
.review-item-top{display:flex;justify-content:space-between;gap:12px;margin-bottom:7px}
.review-item-stars{color:#ffc842;letter-spacing:1px}
.review-item p{margin:0;line-height:1.5;white-space:pre-wrap}

@media(max-width:900px){
  .dock-actions{top:300px}
  .section-view{top:84px;bottom:68px;padding:12px 10px 25px}
  .section-card{padding:20px 16px;max-height:calc(100svh - 170px)}
  .section-card h1{font-size:24px}
  .review-book-row{grid-template-columns:78px 1fr;gap:12px}
  .review-book-cover{width:72px}
  .book-card-cover img{height:260px}
}


/* =========================================================
   v5 — TWO LANGUAGE EDITIONS ON THE BOOK LIST
   RU / EN are labels, NOT buttons.
   ========================================================= */
.editions-dock{
  width:auto !important;
  height:auto !important;
  left:68px !important;
  top:26px !important;
  display:flex !important;
  align-items:flex-start !important;
  justify-content:flex-start !important;
  gap:24px;
}

.edition-item{
  position:relative;
  width:190px;
  min-height:430px;
  display:flex;
  flex-direction:column;
  align-items:center;
}

.edition-cover{
  width:180px;
}

.edition-cover img{
  width:180px !important;
  max-height:390px !important;
}

.edition-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  margin-top:7px;
  min-width:43px;
  padding:5px 11px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.24);
  background:rgba(0,0,0,.55);
  color:#fff;
  font:800 12px/1 Arial,Helvetica,sans-serif;
  letter-spacing:1.1px;
  pointer-events:none;
  user-select:none;
  box-shadow:0 6px 16px rgba(0,0,0,.22);
}

.edition-share{
  position:absolute;
  right:7px;
  bottom:3px;
  width:32px;
  height:32px;
  border-radius:50%;
  border:1px solid rgba(255,255,255,.23);
  background:rgba(0,0,0,.5);
  color:#fff;
  cursor:pointer;
  font-size:17px;
}

.book-language-badge{
  display:inline-flex;
  margin:0 auto 10px;
  padding:5px 10px;
  border-radius:14px;
  background:rgba(255,255,255,.10);
  border:1px solid rgba(255,255,255,.18);
  font-size:11px;
  font-weight:800;
  letter-spacing:1px;
  pointer-events:none;
  user-select:none;
}

/* In Buy mode the preview is intentionally not a full-book reader. */
.focus-zone.buy-preview-mode .focus-cover.front{
  cursor:default;
}

/* Mobile editions */
@media(max-width:900px){
  .editions-dock{
    left:10px !important;
    top:20px !important;
    gap:10px;
  }

  .edition-item{
    width:95px;
    min-height:245px;
  }

  .edition-cover,
  .edition-cover img{
    width:90px !important;
    max-height:210px !important;
  }

  .edition-badge{
    margin-top:3px;
    padding:4px 8px;
    min-width:36px;
    font-size:10px;
  }

  .edition-share{
    width:27px;
    height:27px;
    font-size:14px;
    right:0;
    bottom:0;
  }
}


/* =========================================================
   v6 — RU + EN ON MAIN LIST AND IN BUY
   ========================================================= */
.editions-dock{
  left:70px !important;
  top:28px !important;
  gap:34px !important;
}

.edition-item{
  width:180px !important;
}

.edition-cover,
.edition-cover img{
  width:170px !important;
}

.edition-badge{
  cursor:default !important;
  pointer-events:none !important;
}

.book-card-actions{
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  gap:8px;
}

.book-card-actions .direct-buy-btn{
  cursor:pointer;
  border:0;
}

.focus-zone.buy-preview-mode .focus-cover.front{
  cursor:default !important;
}

@media(max-width:900px){
  .editions-dock{
    left:10px !important;
    gap:12px !important;
  }

  .edition-item{
    width:96px !important;
  }

  .edition-cover,
  .edition-cover img{
    width:90px !important;
  }
}


/* =========================================================
   v10 — MAIN /boook: TWO REAL FLOATING BOOK EDITIONS
   ========================================================= */
.hero .editions-dock{
  position:absolute !important;
  left:58px !important;
  top:120px !important;
  width:auto !important;
  height:auto !important;
  display:flex !important;
  gap:34px !important;
  align-items:flex-start !important;
  z-index:7 !important;
}

.hero .edition-item{
  position:relative !important;
  width:170px !important;
  min-height:385px !important;
  display:flex !important;
  flex-direction:column !important;
  align-items:center !important;
}

.hero .edition-cover{
  width:160px !important;
  border:0 !important;
  background:transparent !important;
  padding:0 !important;
  cursor:pointer !important;
}

.hero .edition-cover img{
  display:block !important;
  width:160px !important;
  max-height:350px !important;
  object-fit:contain !important;
}

.hero .edition-badge{
  display:inline-flex !important;
  margin-top:7px !important;
  padding:5px 11px !important;
  min-width:42px !important;
  justify-content:center !important;
  border-radius:16px !important;
  border:1px solid rgba(255,255,255,.24) !important;
  background:rgba(0,0,0,.55) !important;
  color:#fff !important;
  font:800 12px/1 Arial,Helvetica,sans-serif !important;
  letter-spacing:1px !important;
  pointer-events:none !important;
}

.hero .edition-share{
  position:absolute !important;
  right:-2px !important;
  bottom:3px !important;
  width:31px !important;
  height:31px !important;
  border-radius:50% !important;
  border:1px solid rgba(255,255,255,.2) !important;
  background:rgba(0,0,0,.5) !important;
  color:#fff !important;
  cursor:pointer !important;
}

@media(max-width:900px){
  .hero .editions-dock{
    left:8px !important;
    top:110px !important;
    gap:8px !important;
  }
  .hero .edition-item{
    width:82px !important;
    min-height:205px !important;
  }
  .hero .edition-cover,
  .hero .edition-cover img{
    width:78px !important;
    max-height:180px !important;
  }
  .hero .edition-badge{
    font-size:9px !important;
    min-width:32px !important;
    padding:4px 7px !important;
  }
  .hero .edition-share{
    width:25px !important;
    height:25px !important;
    font-size:12px !important;
  }
}


/* =========================================================
   v11 — robust two-book home list
   The list is generated from CONFIG.BOOKS by JS, so stale HTML
   cannot collapse it back to a single cover.
   ========================================================= */
#bookDock.editions-dock{
  display:flex !important;
  flex-direction:row !important;
  flex-wrap:nowrap !important;
  align-items:flex-start !important;
  justify-content:flex-start !important;
  gap:26px !important;
  width:max-content !important;
  overflow:visible !important;
}

#bookDock .edition-item{
  flex:0 0 168px !important;
  width:168px !important;
  display:flex !important;
  flex-direction:column !important;
  align-items:center !important;
  visibility:visible !important;
  opacity:1 !important;
}

#bookDock .edition-cover{
  position:relative !important;
  display:block !important;
  width:158px !important;
  visibility:visible !important;
  opacity:1 !important;
}

#bookDock .edition-cover img{
  display:block !important;
  width:158px !important;
  height:auto !important;
  max-height:360px !important;
  object-fit:contain !important;
}

#bookDock .edition-badge{
  display:inline-flex !important;
  visibility:visible !important;
  opacity:1 !important;
  pointer-events:none !important;
}

@media(max-width:900px){
  #bookDock.editions-dock{
    gap:8px !important;
  }
  #bookDock .edition-item{
    flex-basis:82px !important;
    width:82px !important;
  }
  #bookDock .edition-cover,
  #bookDock .edition-cover img{
    width:78px !important;
    max-height:180px !important;
  }
}


/* =========================================================
   v12 fixes
   ========================================================= */

/* Keep the complete background visible on wide screens.
   This prevents the baked-in signature from being cut off. */
.anbook-bg{
  background-image:url('https://nodzone-cloud.github.io/anita/alexnode-book-v7-emphasis/assets/book-bg-ru-support.png?v=20260913-3') !important;
  background-size:100% 100% !important;
  background-position:center center !important;
  background-repeat:no-repeat !important;
}

.anbook.lang-en .anbook-bg{
  background-image:url('https://nodzone-cloud.github.io/anita/alexnode-book-v7-emphasis/assets/book-bg-eng-support.png?v=20260913-3') !important;
  background-size:100% 100% !important;
  background-position:center center !important;
}

/* No little share-arrow circles under books on Home. */
#bookDock .edition-share{
  display:none !important;
}

/* =========================================================
   v13 — stable visibility / input / pagination fixes
   ========================================================= */

/* IMPORTANT: v11 uses display:flex !important on the dock.
   Inline display:none could not override it. This class can. */
#bookDock.is-hidden{
  display:none !important;
}

/* Never allow horizontal page drift from trackpads/mice. */
.anbook,
.hero,
.reader,
.book-open{
  overscroll-behavior-x:none;
}

/* Safer text wrapping: long words/URLs must stay inside pages. */
.page-inner{
  overflow-wrap:anywhere;
  word-break:normal;
  hyphens:auto;
}

/* Alex Node & ANITA Book Hub v13 — based on v12 stable baseline. */

/* =========================================================
   v14 — MOBILE-ONLY BACKGROUND FIX
   Desktop/PC backgrounds remain unchanged.
   Mobile uses dedicated portrait backgrounds to avoid stretching.
   ========================================================= */
@media (max-width:900px){
  .anbook-bg{
    background-image:url('https://nodzone-cloud.github.io/anita/alexnode-book-v7-emphasis/assets/mobile-bg-ru.png?v=20260913-3') !important;
    background-size:cover !important;
    background-position:center top !important;
    background-repeat:no-repeat !important;
  }

  .anbook.lang-en .anbook-bg{
    background-image:url('https://nodzone-cloud.github.io/anita/alexnode-book-v7-emphasis/assets/mobile-bg-en.png?v=20260913-3') !important;
    background-size:cover !important;
    background-position:center top !important;
    background-repeat:no-repeat !important;
  }
}


/* =========================================================
   v17 — MOBILE ABOUT COMPACT LAYOUT
   Background image rules remain untouched. Only the selected
   book composition is positioned; extra space is painted below.
   ========================================================= */
@media(max-width:900px){
  .anbook{overflow:visible !important;}
  .hero{overflow:visible !important;}

  .hero:has(.focus-zone.show)::after{
    content:'';
    position:absolute;
    left:-10px;
    right:-10px;
    top:100%;
    height:360px;
    z-index:-1;
    background:linear-gradient(180deg,#251108 0%,#130905 100%);
    pointer-events:none;
  }

  .focus-zone.show{
    top:245px !important;
    transform:translate(-50%,0) scale(1) !important;
    grid-template-columns:1fr 1fr !important;
    gap:8px !important;
    align-items:start !important;
    width:94vw !important;
  }

  .focus-zone.show .focus-cover img{
    max-height:330px !important;
  }

  .focus-zone.show .focus-copy{
    grid-column:1/-1 !important;
    grid-row:2 !important;
    margin-top:10px !important;
    padding:16px 12px !important;
  }

  .focus-zone.show .focus-copy p{
    max-height:none !important;
    overflow:visible !important;
  }

  .return-books-btn.show{
    top:500px !important;
  }
}

@media(max-width:640px){
  .focus-zone.show{
    top:235px !important;
  }

  .focus-zone.show .focus-cover img{
    max-height:315px !important;
  }

  .return-books-btn.show{
    top:485px !important;
  }
}
