/* ShareBooks v2 - page styles (load after core.css). */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.6; color: var(--ink);
  background: var(--bg); overflow-x: hidden; -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; letter-spacing: -.02em; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; border-radius: 8px; }

/* ---------- section scaffolding */
.section { padding: 72px 0; position: relative; }
.section--first { padding-top: 36px; }
.section--tint::before { content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, .45) 18%, rgba(255, 255, 255, .45) 82%, transparent); }
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 30px; }
.head--center { justify-content: center; text-align: center; }
.head h2 { font-size: clamp(1.75rem, 3.4vw, 2.6rem); font-weight: 800; }
.sub { margin-top: 8px; color: var(--muted); max-width: 52ch; }
.eyebrow { display: inline-flex; align-items: center; gap: .45em; margin-bottom: 10px; font-size: .78rem; font-weight: 800;
  letter-spacing: .12em; text-transform: uppercase; color: var(--blue); }
.eyebrow--warm { color: var(--orange); }
.head--center .eyebrow { justify-content: center; }
.grad { background: linear-gradient(100deg, var(--blue) 0%, var(--violet) 45%, var(--orange) 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- hero */
.hero { padding: 48px 0 30px; }
.hero__in { display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: center; }
.hero h1 { font-size: clamp(2.5rem, 6vw, 4.6rem); font-weight: 800; letter-spacing: -.035em; }
.lead { margin-top: 18px; font-size: clamp(1rem, 1.5vw, 1.15rem); color: var(--ink-2); max-width: 50ch; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }

.search { display: flex; align-items: center; gap: 10px; margin-top: 28px; padding: 7px 7px 7px 18px; border-radius: 999px; max-width: 580px; }
.search > .i { width: 22px; height: 22px; color: var(--muted); }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font: inherit; font-size: 1rem; color: var(--ink); padding: .55em 0; }
.search input::placeholder { color: #8a94ad; }
.section .search { margin-top: 0; max-width: 720px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.chip { padding: .38em .9em; border-radius: 99px; font-size: .85rem; font-weight: 600; color: var(--ink-2);
  background: rgba(255, 255, 255, .6); border: 1px solid var(--stroke); transition: all .2s; }
.chip:hover, .chip.is-on { color: #fff; background: var(--blue); border-color: var(--blue); }
.section .chips { margin-bottom: 36px; }

/* 3D stage: covers orbiting the logo */
.stage { position: relative; height: 480px; perspective: 1400px; display: grid; place-items: center; }
.scene { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transform: rotateX(-14deg); display: grid; place-items: center; }
.ring { position: absolute; width: 0; height: 0; transform-style: preserve-3d; animation: spin 36s linear infinite; }
.stage:hover .ring { animation-play-state: paused; }
.ring__item { --rad: 270px; position: absolute; left: -52px; top: -73px; width: 104px; height: 146px; transform-style: preserve-3d;
  transform: rotateY(calc(var(--i) * 45deg)) translateZ(var(--rad)); }
.ring__item .book3d { --bw: 104px; --bd: 14px; animation: bob 5s ease-in-out infinite; animation-delay: calc(var(--i) * -.6s); }
@keyframes spin { to { transform: rotateY(-360deg); } }
@keyframes bob { 50% { transform: translateY(-12px) rotateY(-18deg); } }
.core { position: relative; width: 250px; height: 250px; border-radius: 50%; transform: translateZ(0);
  background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, .95), rgba(255, 255, 255, .45) 60%, rgba(255, 255, 255, .15));
  box-shadow: 0 40px 80px -30px rgba(63, 111, 209, .6), inset 0 0 0 1px rgba(255, 255, 255, .9); display: grid; place-items: center; }
.core img { width: 88%; height: auto; animation: float 6s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-10px); } }
.float { position: absolute; display: grid; grid-template-columns: auto 1fr; column-gap: 10px; align-items: center; padding: 12px 16px; border-radius: 16px; animation: float 7s ease-in-out infinite; z-index: 2; }
.float .i { grid-row: span 2; width: 34px; height: 34px; padding: 7px; border-radius: 10px; color: #fff; background: linear-gradient(135deg, var(--pink), var(--orange)); }
.float b { font-size: .95rem; line-height: 1.2; }
.float small { color: var(--muted); font-size: .78rem; line-height: 1.2; }
.float--a { left: 0; bottom: 70px; }
.float--b { right: 0; top: 40px; animation-delay: -3s; }
.float--b .i { background: linear-gradient(135deg, var(--teal), var(--blue)); }

.stats { list-style: none; margin: 30px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; }
.stats li { padding: 20px 22px; border-radius: var(--r); }
.stats b { display: block; font-size: clamp(1.7rem, 3vw, 2.3rem); font-weight: 800; letter-spacing: -.03em;
  background: linear-gradient(120deg, var(--blue), var(--violet)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stats span { color: var(--muted); font-size: .9rem; font-weight: 600; }

/* ---------- CSS 3D book: cover + page block + back board */
.book3d { --bw: 150px; --bd: 20px; position: relative; display: block; width: var(--bw); aspect-ratio: 5 / 7;
  transform-style: preserve-3d; transform: rotateY(-24deg); transition: transform .6s cubic-bezier(.2, .8, .2, 1); }
.book3d > img, .book3d > .gen { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 3px 8px 8px 3px;
  transform: translateZ(calc(var(--bd) / 2)); box-shadow: inset 4px 0 8px -4px rgba(0, 0, 0, .35); background: #dfe6f5; }
.book3d::before { content: ""; position: absolute; top: 3px; bottom: 3px; width: var(--bd); left: calc(100% - 3px - var(--bd) / 2);
  transform: rotateY(90deg); background: repeating-linear-gradient(90deg, #fff 0 2px, #e8e8ea 2px 3px); }
.book3d::after { content: ""; position: absolute; inset: 0; border-radius: 3px 8px 8px 3px; transform: translateZ(calc(var(--bd) / -2));
  background: #24345d; box-shadow: -14px 18px 36px -6px rgba(20, 33, 61, .45); }
.book3d--lg { --bw: 170px; --bd: 24px; }
.book3d--flat { transform: rotateY(-18deg); }
.gen { display: flex; flex-direction: column; justify-content: space-between; padding: 12% 10%; color: #fff; overflow: hidden;
  background: linear-gradient(150deg, hsl(var(--h) 70% 58%), hsl(calc(var(--h) + 40) 72% 42%)) !important; }
.gen::before { content: ""; position: absolute; width: 120%; aspect-ratio: 1; border-radius: 50%; right: -60%; top: -30%; background: rgba(255, 255, 255, .14); }
.gen small { position: relative; font-size: .62em; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; opacity: .85; }
.gen b { position: relative; font-size: .95em; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.gen i { position: relative; font-style: normal; font-size: .62em; font-weight: 700; opacity: .8; }

/* ---------- cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(236px, 1fr)); gap: 22px; }
.card { position: relative; display: flex; flex-direction: column; border-radius: var(--r); background: rgba(255, 255, 255, .7);
  border: 1px solid var(--stroke); box-shadow: var(--shadow); transform-style: preserve-3d;
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .35s, box-shadow .35s; }
.card:hover { box-shadow: var(--shadow-lg); }
.card__art { display: grid; place-items: center; padding: 28px 0 18px; perspective: 900px; border-radius: var(--r) var(--r) 0 0;
  background: radial-gradient(120% 90% at 50% 0%, rgba(100, 146, 216, .22), transparent 70%); }
.card:hover .book3d, .rank:hover .book3d { transform: rotateY(-6deg) translateZ(20px) translateY(-6px); }
.card__body { padding: 4px 18px 12px; flex: 1; }
.tag { display: inline-block; margin-bottom: 8px; padding: .2em .65em; border-radius: 6px; font-size: .72rem; font-weight: 800; letter-spacing: .04em;
  text-transform: uppercase; color: var(--blue); background: var(--blue-soft); }
.card__title { font-size: 1.05rem; font-weight: 700; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card__title a:hover { color: var(--blue); }
.card__sub { margin-top: 4px; color: var(--muted); font-size: .88rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card__loc { display: flex; align-items: center; gap: .35em; margin-top: 8px; font-size: .84rem; font-weight: 600; color: var(--teal); }
.card__loc .i { width: 15px; height: 15px; }
.card__foot { display: flex; align-items: center; gap: 8px; padding: 12px 14px 14px 18px; border-top: 1px solid var(--line); }
.free { margin-right: auto; font-weight: 800; color: #16a06b; }
.like { display: inline-flex; align-items: center; gap: .3em; padding: .4em .7em; border-radius: 99px; font-size: .85rem; font-weight: 700;
  color: var(--pink); background: rgba(242, 95, 138, .1); transition: transform .2s, background .2s; }
.like:hover { background: rgba(242, 95, 138, .18); }
.like.is-on .i { fill: currentColor; }
.like.pop { animation: pop .45s; }
@keyframes pop { 40% { transform: scale(1.3); } }

.heat { position: relative; height: 26px; margin-bottom: 10px; border-radius: 99px; background: rgba(255, 122, 47, .12); overflow: hidden; }
.heat span { position: absolute; inset: 0 auto 0 0; width: var(--p); border-radius: inherit; background: linear-gradient(90deg, #ffc38f, var(--orange)); }
.heat em { position: relative; display: flex; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; align-items: center; gap: .3em; height: 100%; padding-left: 10px; font-style: normal; font-size: .78rem; font-weight: 800; color: #7a2e00; }
.heat .i { width: 14px; height: 14px; }

/* ---------- top 10 rail */
.rail { list-style: none; margin: 0 -20px; padding: 16px 20px 36px; display: grid; grid-auto-flow: column; grid-auto-columns: 272px; gap: 22px;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: 20px; scrollbar-width: none; overscroll-behavior-x: contain; }
.rail::-webkit-scrollbar { display: none; }
.rail > * { scroll-snap-align: start; }
.rail-nav { display: flex; gap: 8px; }
.rank { position: relative; padding: 26px 18px 18px; border-radius: var(--r); background: rgba(255, 255, 255, .7); border: 1px solid var(--stroke);
  box-shadow: var(--shadow); transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .35s, box-shadow .35s; }
.rank:hover { box-shadow: var(--shadow-lg); }
.rank__no { position: absolute; left: 14px; top: 2px; font-size: 5.6rem; font-weight: 800; line-height: 1; letter-spacing: -.06em;
  color: transparent; -webkit-text-stroke: 2px rgba(63, 111, 209, .45); pointer-events: none; }
.rank:nth-child(-n+3) .rank__no { -webkit-text-stroke-color: rgba(255, 122, 47, .7); }
.rank__art { display: grid; justify-items: end; padding-right: 12px; perspective: 900px; }
.rank__meta { margin-top: 22px; }
.rank__meta h3 { font-size: 1.05rem; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em; }
.rank__meta h3 a:hover { color: var(--blue); }
.rank__row { display: flex; align-items: center; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.rank__row .btn { margin-left: auto; }
.metric { display: inline-flex; align-items: center; gap: .3em; font-size: .8rem; font-weight: 700; color: var(--orange); }
.metric .i { width: 15px; height: 15px; }

/* ---------- subjects */
.subjects { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.subject { position: relative; display: grid; gap: 2px; padding: 22px 18px; border-radius: var(--r);
  transform: perspective(700px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .3s, background .3s; }
.subject:hover { background: rgba(255, 255, 255, .8); }
.subject__cube { --c1: var(--blue-2); --c2: var(--blue); display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 12px; border-radius: 15px;
  color: #fff; background: linear-gradient(145deg, var(--c1), var(--c2)); box-shadow: 0 12px 20px -10px var(--c2), inset 0 -4px 0 rgba(0, 0, 0, .12), inset 0 2px 0 rgba(255, 255, 255, .35);
  transform: translateZ(30px); }
.subject__cube .i { width: 26px; height: 26px; }
.subject:nth-child(2) .subject__cube { --c1: #ff9ab6; --c2: var(--pink); }
.subject:nth-child(3) .subject__cube { --c1: #5fd6a4; --c2: #16a06b; }
.subject:nth-child(4) .subject__cube { --c1: #b3a4ff; --c2: var(--violet); }
.subject:nth-child(5) .subject__cube { --c1: #6fd9ea; --c2: var(--teal); }
.subject:nth-child(6) .subject__cube { --c1: var(--orange-2); --c2: var(--orange); }
.subject b { font-size: 1.02rem; }
.subject small { color: var(--muted); font-weight: 600; }
.subject__go { position: absolute; right: 16px; top: 22px; color: var(--muted); transition: transform .2s, color .2s; }
.subject:hover .subject__go { transform: translateX(4px); color: var(--blue); }

/* ---------- steps */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; counter-reset: s; }
.step { position: relative; padding: 30px 26px; border-radius: var(--r); overflow: hidden;
  transform: perspective(800px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .3s; }
.step__no { position: absolute; right: 16px; top: -6px; font-size: 5rem; font-weight: 800; letter-spacing: -.05em; color: transparent; -webkit-text-stroke: 2px rgba(63, 111, 209, .18); }
.step__ico { display: inline-grid; place-items: center; width: 54px; height: 54px; border-radius: 16px; color: #fff; margin-bottom: 18px;
  background: linear-gradient(145deg, var(--blue-2), var(--violet)); box-shadow: 0 14px 24px -12px var(--violet); }
.step__ico .i { width: 26px; height: 26px; }
.step:nth-child(2) .step__ico { background: linear-gradient(145deg, var(--orange-2), var(--pink)); box-shadow: 0 14px 24px -12px var(--pink); }
.step:nth-child(3) .step__ico { background: linear-gradient(145deg, #6fd9ea, var(--teal)); box-shadow: 0 14px 24px -12px var(--teal); }
.step h3 { font-size: 1.25rem; margin-bottom: 8px; }
.step p { color: var(--ink-2); }

/* ---------- impact */
.impact { display: grid; grid-template-columns: 1fr 1.2fr; gap: 30px; align-items: center; padding: 44px; border-radius: 32px; overflow: hidden; position: relative; }
.impact::before { content: ""; position: absolute; width: 420px; height: 420px; left: -120px; top: -120px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 162, 95, .45), transparent 65%); z-index: -1; }
.impact__art { perspective: 800px; display: grid; place-items: center; }
.impact__art img { width: 100%; max-width: 420px; height: auto; animation: float 6s ease-in-out infinite; filter: drop-shadow(0 30px 30px rgba(20, 33, 61, .25)); }
.impact h2 { font-size: clamp(1.7rem, 3.2vw, 2.5rem); font-weight: 800; }
.impact__copy > p:not(.eyebrow) { margin-top: 14px; color: var(--ink-2); }

/* ---------- testimonials */
.rail--quotes { grid-auto-columns: minmax(280px, 380px); }
.quote { margin: 0; display: flex; flex-direction: column; justify-content: space-between; gap: 20px; padding: 26px; border-radius: var(--r); }
.quote blockquote { margin: 0; font-size: 1rem; color: var(--ink-2); position: relative; padding-top: 26px; }
.quote blockquote::before { content: "“"; position: absolute; top: -18px; left: -4px; font-size: 4rem; line-height: 1; font-weight: 800; color: var(--orange); opacity: .5; }
.quote figcaption { display: flex; align-items: center; gap: 12px; }
.quote figcaption b, .quote figcaption small { display: block; line-height: 1.3; }
.quote figcaption small { color: var(--muted); }
.avatar { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 50%; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, var(--blue-2), var(--violet)); }

/* ---------- community + tools */
.tools { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 22px; }
.community { display: grid; grid-template-columns: 200px 1fr; gap: 22px; align-items: center; padding: 26px; border-radius: var(--r); }
.community h3 { font-size: 1.3rem; margin-bottom: 8px; }
.community p { color: var(--ink-2); margin-bottom: 16px; }
.tool { display: flex; flex-direction: column; gap: 4px; padding: 26px; border-radius: var(--r);
  transform: perspective(800px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .3s; }
.tool .step__ico { margin-bottom: 12px; }
.tool small { color: var(--muted); font-weight: 600; }
.tool b { font-size: 1.15rem; }
.tool__free { margin-top: auto; padding-top: 14px; display: inline-flex; align-items: center; gap: .35em; font-weight: 800; color: #16a06b; }

/* ---------- search results */
.empty { display: flex; align-items: center; gap: 26px; padding: 30px; border-radius: var(--r); }
.empty h3 { font-size: 1.4rem; margin-bottom: 6px; }
.empty p { color: var(--ink-2); margin-bottom: 16px; max-width: 56ch; }
.pager { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin-top: 40px; }
.pager a { display: grid; place-items: center; min-width: 44px; height: 44px; padding: 0 8px; border-radius: 12px; font-weight: 700;
  background: rgba(255, 255, 255, .7); border: 1px solid var(--stroke); }
.pager a.is-on { color: #fff; background: var(--blue); border-color: var(--blue); }

/* ---------- reveal on scroll (only when JS is running) */
.js .reveal { opacity: 0; transform: perspective(900px) translateY(36px) rotateX(10deg); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .8, .2, 1); }
.js .reveal.in { opacity: 1; transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); }
.js .reveal.in.tilting { transition: transform .12s linear, box-shadow .35s; }

/* ================================================================= shared page bits */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: .4em; margin-bottom: 22px; font-size: .88rem; font-weight: 600; color: var(--muted); }
.crumbs a:hover { color: var(--blue); }
.crumbs .i { width: 14px; height: 14px; }
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 14px 16px; border-radius: 14px; font-weight: 600; margin-bottom: 18px; }
.alert .i { width: 20px; height: 20px; margin-top: 2px; }
.alert--err { color: #9b1c3c; background: rgba(242, 95, 138, .12); border: 1px solid rgba(242, 95, 138, .25); }
.alert--ok { color: #0d6b48; background: rgba(22, 160, 107, .1); border: 1px solid rgba(22, 160, 107, .25); }
.alert--info { color: #23407f; background: rgba(63, 111, 209, .1); border: 1px solid rgba(63, 111, 209, .22); }
.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field label { font-size: .88rem; font-weight: 700; color: var(--ink-2); }
.field input, .field textarea { width: 100%; padding: .85em 1em; border-radius: 14px; border: 1px solid rgba(20, 33, 61, .12); background: rgba(255, 255, 255, .85);
  font: inherit; color: var(--ink); outline: 0; transition: border-color .2s, box-shadow .2s; }
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus, .field textarea:focus { border-color: var(--blue-2); box-shadow: 0 0 0 4px rgba(100, 146, 216, .22); }
.field__row { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }

/* ================================================================= isometric cover wall */
.shelf { position: relative; min-height: 480px; border-radius: 32px; overflow: hidden; display: flex; align-items: center; padding: 40px;
  background: radial-gradient(120% 90% at 80% 20%, #2a3f73 0%, #16223f 55%, #0f1a33 100%); box-shadow: var(--shadow-lg); isolation: isolate; }
.shelf::before { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(90deg, rgba(15, 26, 51, .92) 0%, rgba(15, 26, 51, .55) 38%, transparent 70%); }
.shelf__copy { position: relative; z-index: 2; max-width: 460px; padding: 30px; border-radius: 24px; }
.shelf__copy h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); font-weight: 800; }
.shelf__copy > p:not(.eyebrow) { margin-top: 10px; color: var(--ink-2); }
.wall { position: absolute; inset: 0; overflow: hidden; }
.wall__plane { position: absolute; top: 50%; left: 62%; display: flex; gap: 26px; transform: translate(-50%, -50%) rotateX(52deg) rotateZ(-38deg); transform-style: preserve-3d; }
.wall__col { display: flex; flex-direction: column; gap: 26px; animation: wallUp 38s linear infinite; }
.wall__col:nth-child(even) { animation-direction: reverse; animation-duration: 46s; margin-top: -120px; }
.wall__tile { display: block; width: 150px; aspect-ratio: 5 / 7; border-radius: 10px; overflow: hidden; background: #24345d;
  box-shadow: -18px 18px 0 -6px rgba(0, 0, 0, .25), -30px 34px 40px rgba(0, 0, 0, .35); }
.wall__tile img, .wall__tile .gen { width: 100%; height: 100%; object-fit: cover; }
@keyframes wallUp { to { transform: translateY(-50%); } }

/* ================================================================= book detail */
.bk { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 36px; align-items: start; }
.bk__stage { position: sticky; top: calc(var(--nav-h) + 20px); display: grid; place-items: center; min-height: 480px; padding: 40px; border-radius: 32px; perspective: 1200px; overflow: hidden; }
.bk__stage::before { content: ""; position: absolute; width: 70%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(100, 146, 216, .45), transparent 65%); }
.bk__stage .book3d { --bw: 250px; --bd: 34px; transform: rotateY(-28deg) rotateX(6deg); animation: turn 9s ease-in-out infinite; }
.bk__stage:hover .book3d { animation-play-state: paused; }
@keyframes turn { 50% { transform: rotateY(-8deg) rotateX(2deg) translateY(-10px); } }
.bk__shadow { position: absolute; bottom: 44px; width: 55%; height: 22px; border-radius: 50%; background: radial-gradient(closest-side, rgba(20, 33, 61, .35), transparent); }
.bk__info h1 { font-size: clamp(1.8rem, 3.6vw, 2.8rem); font-weight: 800; letter-spacing: -.03em; }
.bk__sub { margin-top: 8px; font-size: 1.1rem; color: var(--ink-2); }
.bk__by { margin-top: 6px; color: var(--muted); font-weight: 600; }
.facts { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0; padding: 0; list-style: none; }
.facts li { display: inline-flex; align-items: center; gap: .4em; padding: .45em .85em; border-radius: 99px; font-size: .86rem; font-weight: 700; color: var(--ink-2);
  background: rgba(255, 255, 255, .7); border: 1px solid var(--stroke); }
.facts .i { width: 16px; height: 16px; color: var(--blue); }
.price { display: flex; align-items: baseline; gap: 12px; margin: 6px 0 20px; }
.price b { font-size: 2rem; font-weight: 800; color: var(--green); letter-spacing: -.02em; }
.price small { color: var(--muted); font-weight: 600; }
.bk__actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.bk__actions .like { padding: .75em 1.1em; font-size: .95rem; }
.donor { display: flex; gap: 14px; align-items: center; margin-top: 26px; padding: 18px; border-radius: 20px; }
.donor .avatar { width: 52px; height: 52px; font-size: 1.2rem; }
.donor b { display: block; }
.donor small { display: flex; align-items: center; gap: .35em; color: var(--muted); font-weight: 600; }
.donor small .i { width: 14px; height: 14px; }
.tabs { margin-top: 56px; border-radius: 26px; padding: 8px; }
.tabs__bar { display: flex; gap: 6px; padding: 4px; }
.tabs__bar button { padding: .65em 1.2em; border-radius: 99px; font-weight: 700; color: var(--ink-2); }
.tabs__bar button[aria-selected="true"] { color: #fff; background: linear-gradient(135deg, var(--blue-2), var(--blue)); box-shadow: 0 8px 18px -10px var(--blue); }
.tabs__panel { padding: 22px 22px 26px; }
.tabs__panel[hidden] { display: none; }
.desc { color: var(--ink-2); max-width: 75ch; margin-bottom: 22px; }
.specs { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin: 0; }
.specs div { padding: 14px 16px; border-radius: 14px; background: rgba(255, 255, 255, .65); border: 1px solid var(--stroke); }
.specs dt { font-size: .75rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.specs dd { margin: 4px 0 0; font-weight: 600; word-break: break-word; }
.reviews { display: grid; gap: 14px; margin-bottom: 26px; }
.review { display: flex; gap: 14px; padding: 16px; border-radius: 16px; background: rgba(255, 255, 255, .65); border: 1px solid var(--stroke); }
.review header { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
.review p { margin-top: 6px; color: var(--ink-2); }
.review time { font-size: .8rem; color: var(--muted); }
.stars { display: inline-flex; gap: 2px; color: #f5b301; }
.stars .i { width: 16px; height: 16px; fill: currentColor; stroke-width: 1.5; }
.stars .off { color: #d5dbe8; }
.rate { display: inline-flex; flex-direction: row-reverse; gap: 4px; }
.rate input { position: absolute; opacity: 0; pointer-events: none; }
.rate label { cursor: pointer; color: #d5dbe8; transition: color .15s, transform .15s; }
.rate label .i { width: 28px; height: 28px; fill: currentColor; stroke-width: 1.2; }
.rate label:hover, .rate label:hover ~ label, .rate input:checked ~ label { color: #f5b301; }
.rate label:hover { transform: scale(1.12); }
.rate input:focus-visible + label { outline: 3px solid var(--orange); border-radius: 6px; }
.review-form { padding: 22px; border-radius: 20px; background: rgba(255, 255, 255, .55); border: 1px solid var(--stroke); }
.review-form h3 { font-size: 1.2rem; margin-bottom: 14px; }

/* ================================================================= auth pages */
.auth { display: grid; grid-template-columns: 1.05fr 1fr; min-height: 600px; border-radius: 32px; overflow: hidden; }
.auth__art { position: relative; display: flex; flex-direction: column; justify-content: flex-end; padding: 40px; color: #fff; overflow: hidden; isolation: isolate;
  background: radial-gradient(120% 90% at 80% 10%, #2a3f73 0%, #16223f 60%, #0f1a33 100%); }
.auth__art::after { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(0deg, rgba(15, 26, 51, .95) 5%, rgba(15, 26, 51, .2) 60%, transparent); }
.auth__art > :not(.wall) { position: relative; z-index: 2; }
.auth__art .wall__plane { left: 50%; top: 40%; }
.auth__art .wall__tile { width: 120px; }
.auth__art h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; }
.auth__art p { margin-top: 10px; color: #c9d3ea; max-width: 40ch; }
.auth__form { padding: 48px 44px; background: rgba(255, 255, 255, .72); display: flex; flex-direction: column; justify-content: center; }
.auth__form h1 { font-size: 2rem; font-weight: 800; letter-spacing: -.03em; }
.auth__form > p { margin: 6px 0 26px; color: var(--muted); }
.auth__alt { margin-top: 20px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; font-size: .92rem; color: var(--muted); }
.auth__alt a { font-weight: 700; color: var(--blue); }
.auth__perks { display: grid; gap: 10px; margin: 18px 0 0; padding: 0; list-style: none; }
.auth__perks li { display: flex; gap: 10px; align-items: center; font-weight: 600; color: #e3e9f7; }
.auth__perks .i { width: 22px; height: 22px; padding: 4px; border-radius: 50%; color: #fff; background: rgba(255, 255, 255, .15); }
.done { text-align: center; }
.done img { width: 150px; margin: 0 auto 12px; }

/* ================================================================= checkout */
.co__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 22px; }
.co__head h1 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); font-weight: 800; }
.credits { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-radius: 18px; }
.credits .i { width: 38px; height: 38px; padding: 8px; border-radius: 12px; color: #fff; background: linear-gradient(135deg, var(--orange-2), var(--orange)); }
.credits b { display: block; font-size: 1.3rem; line-height: 1.1; }
.credits small { color: var(--muted); font-weight: 600; }
.co { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 26px; align-items: start; }
.co__list { display: grid; gap: 14px; }
.co-row { display: grid; grid-template-columns: 90px minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 16px; border-radius: 22px; }
.co-row .book3d { --bw: 78px; --bd: 10px; }
.co-row h3 { font-size: 1.05rem; line-height: 1.3; }
.co-row p { color: var(--muted); font-size: .88rem; }
.co-row__act { display: grid; gap: 8px; justify-items: end; }
.co-row__rm { display: inline-flex; align-items: center; gap: .3em; font-size: .82rem; font-weight: 700; color: var(--muted); }
.co-row__rm:hover { color: var(--pink); }
.co-row__rm .i { width: 15px; height: 15px; }
.contact-card { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; padding: 14px; border-radius: 16px;
  background: linear-gradient(135deg, rgba(22, 160, 107, .1), rgba(10, 155, 181, .1)); border: 1px solid rgba(22, 160, 107, .25); animation: fade .4s; }
.contact-card div { display: flex; align-items: center; gap: .5em; font-weight: 600; word-break: break-word; }
.contact-card .i { color: var(--green); }
.co.is-locked .co__list { opacity: .55; }
.rules { padding: 24px; border-radius: 24px; position: sticky; top: calc(var(--nav-h) + 20px); }
.rules h2 { font-size: 1.2rem; margin-bottom: 14px; }
.rules ol { margin: 0; padding: 0; list-style: none; counter-reset: r; display: grid; gap: 12px; }
.rules li { counter-increment: r; display: grid; grid-template-columns: 28px 1fr; gap: 10px; font-size: .9rem; color: var(--ink-2); }
.rules li::before { content: counter(r); display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; font-size: .78rem; font-weight: 800; color: var(--blue); background: var(--blue-soft); }
.rules li b { display: block; color: var(--ink); }

/* ================================================================= message pages (thank you / 404) */
.msg { max-width: 640px; margin: 40px auto; padding: 44px 36px; border-radius: 32px; text-align: center; }
.msg img { width: 170px; margin: 0 auto 10px; }
.msg__code { font-size: clamp(4rem, 12vw, 7rem); font-weight: 800; line-height: 1; letter-spacing: -.05em; }
.msg h1 { font-size: clamp(1.6rem, 3.4vw, 2.2rem); font-weight: 800; margin-top: 6px; }
.msg p { margin: 10px auto 24px; color: var(--ink-2); max-width: 48ch; }
.msg .hero__cta { justify-content: center; }

@media (max-width: 920px) {
  .bk { grid-template-columns: minmax(0, 1fr); }
  .bk__stage { position: relative; top: 0; min-height: 380px; }
  .bk__stage .book3d { --bw: 200px; --bd: 28px; }
  .auth { grid-template-columns: minmax(0, 1fr); }
  .auth__art { min-height: 260px; padding: 28px; }
  .auth__perks { display: none; }
  .auth__form { padding: 32px 24px; }
  .co { grid-template-columns: minmax(0, 1fr); }
  .rules { position: static; }
  .shelf { min-height: 560px; align-items: flex-end; padding: 20px; }
  .shelf::before { background: linear-gradient(0deg, rgba(15, 26, 51, .92) 10%, rgba(15, 26, 51, .3) 55%, transparent 80%); }
  .wall__plane { left: 50%; top: 32%; }
}
@media (max-width: 600px) {
  .co-row { grid-template-columns: 70px minmax(0, 1fr); }
  .co-row .book3d { --bw: 62px; --bd: 8px; }
  .co-row__act { grid-column: 1 / -1; grid-template-columns: 1fr auto; align-items: center; justify-items: stretch; }
  .tabs__panel { padding: 16px 10px 20px; }
  .wall__tile { width: 110px; }
  .msg { padding: 32px 20px; }
}

/* ---------- responsive */
@media (max-width: 1100px) {
  .subjects { grid-template-columns: repeat(3, 1fr); }
  .tools { grid-template-columns: 1fr 1fr; }
  .community { grid-column: 1 / -1; }
}
@media (max-width: 920px) {
  .hero__in { grid-template-columns: minmax(0, 1fr); }
  .stage { overflow: hidden; }
  .stage { height: 360px; order: -1; margin: -10px -20px 0; }
  .ring__item { --rad: 190px; left: -45px; top: -64px; width: 90px; height: 128px; }
  .ring__item .book3d { --bw: 90px; --bd: 12px; }
  .core { width: 180px; height: 180px; }
  .float--a { left: 4px; bottom: 16px; }
  .float--b { right: 4px; top: 16px; }
  .stats { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
  .steps { grid-template-columns: 1fr; }
  .impact { grid-template-columns: 1fr; padding: 28px; }
  .section { padding: 56px 0; }
}
@media (max-width: 600px) {
  .rail { margin: 0 -16px; padding-inline: 16px; scroll-padding-inline: 16px; grid-auto-columns: 78%; }
  .stage { margin-inline: -16px; }
  .rail--quotes { grid-auto-columns: 86%; }
  .hero { padding-top: 20px; }
  .stage { height: 300px; }
  .ring__item { --rad: 150px; left: -36px; top: -52px; width: 72px; height: 104px; }
  .ring__item .book3d { --bw: 72px; --bd: 10px; }
  .core { width: 140px; height: 140px; }
  .float { padding: 8px 12px; }
  .float .i { width: 28px; height: 28px; padding: 6px; }
  .float small { display: none; }
  .search { padding-left: 14px; }
  .search .btn { padding-inline: 1em; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .card__art { padding: 20px 0 12px; }
  .card .book3d { --bw: 104px; --bd: 14px; }
  .card__body { padding: 2px 12px 10px; }
  .card__foot { padding: 10px 10px 12px 12px; gap: 6px; flex-wrap: wrap; }
  .card__foot .btn { padding: .45em .75em; }
  .card__title { font-size: .95rem; }
  .card__sub { display: none; }
  .subjects { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .tools { grid-template-columns: 1fr; }
  .community { grid-template-columns: 1fr; text-align: center; justify-items: center; }
  .community img { width: 220px; }
  .empty { flex-direction: column; text-align: center; }
  .head { flex-wrap: wrap; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; transform: none; }
}
