/* ============ tokens ============ */
:root {
  --bg: #f7f1e6; --bg-2: #efe6d6; --card: rgba(255,255,255,.72); --card-2: rgba(255,255,255,.96);
  --line: rgba(31,36,48,.13); --text: #1f2430; --muted: #5f6675; --gold: #cf4a22; --gold-2: #ee6a3a;
  --danger: #d6342b; --ok: #1f8f5c; --radius: 16px;
  --serif: "Fraunces", "Iowan Old Style", Baskerville, Georgia, serif;
  --sans: "Inter", -apple-system, "Segoe UI", system-ui, sans-serif;
  --ease: cubic-bezier(.2,.8,.2,1);
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 15px/1.6 var(--sans); -webkit-font-smoothing: antialiased; min-height: 100vh; }
body.noscroll { overflow: hidden; }
img { max-width: 100%; display: block; }
a { color: var(--gold); text-decoration: none; } a:hover { color: var(--gold-2); }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.15; margin: 0; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 4.2vw, 3.2rem); } h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); } h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; } .muted { color: var(--muted); } .center { text-align: center; }
code { background: var(--card-2); padding: 1px 6px; border-radius: 5px; font-size: .9em; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
.wrap { width: min(1240px, 100% - 48px); margin-inline: auto; } .wrap.narrow { width: min(780px, 100% - 40px); }
.eyebrow { display: inline-block; font: 600 .72rem/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--gold); margin-bottom: 14px; }
.lead { font-size: 1.15rem; color: #3a4150; max-width: 56ch; }
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(900px 520px at 90% -8%, rgba(255,166,120,.30), transparent 62%), radial-gradient(800px 560px at -8% 28%, rgba(120,170,255,.20), transparent 62%); }

/* ============ buttons / forms ============ */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 600 .95rem/1 var(--sans); padding: 11px 20px; border-radius: 999px;
  border: 1px solid transparent; cursor: pointer; color: var(--text); background: none; transition: transform .15s, background .2s, border-color .2s, box-shadow .2s, color .2s; white-space: nowrap; }
.btn:active { transform: scale(.97); } .btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.primary { background: linear-gradient(135deg, var(--gold-2), var(--gold)); color: #fff; box-shadow: 0 8px 26px rgba(217,74,34,.25); }
.btn.primary:hover:not(:disabled) { box-shadow: 0 10px 34px rgba(217,74,34,.4); transform: translateY(-1px); color: #fff; }
.btn.ghost { border-color: var(--line); background: var(--card); } .btn.ghost:hover:not(:disabled) { border-color: rgba(31,36,48,.3); background: var(--card-2); color: var(--text); }
.btn.light { background: #fff; color: #222; } .btn.light:hover { background: #f1f1f1; color: #222; }
.btn.danger { background: var(--danger); color: #fff; } .btn.danger-ghost { border-color: rgba(255,123,112,.35); color: var(--danger); } .btn.danger-ghost:hover { background: rgba(255,123,112,.12); color: var(--danger); }
.btn.sm { padding: 9px 16px; font-size: .85rem; } .btn.lg { padding: 14px 26px; font-size: .98rem; } .btn.block { width: 100%; }
.linkbtn { background: none; border: 0; color: var(--muted); cursor: pointer; font: inherit; font-size: .88rem; padding: 4px 0; } .linkbtn:hover { color: var(--danger); }
.row { display: flex; gap: 10px; align-items: center; } .row.end { justify-content: flex-end; margin-top: 8px; } .grow { flex: 1; }
.stack { display: grid; gap: 16px; } .two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
label { display: grid; gap: 6px; font-size: .85rem; font-weight: 500; color: #3a4150; }
input[type=text], input[type=email], input[type=password], input[type=search], input[type=number], select, textarea, input:not([type]) {
  width: 100%; background: #fff; border: 1px solid var(--line); color: var(--text); font: 400 .95rem var(--sans); padding: 12px 14px; border-radius: 12px; transition: border-color .2s, background .2s; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--gold); background: #fff; box-shadow: 0 0 0 3px rgba(207,74,34,.14); }
select option { background: #ffffff; } textarea { resize: vertical; }
.check { display: flex; align-items: center; gap: 10px; align-self: end; padding-bottom: 12px; } .check input { width: 18px; height: 18px; accent-color: var(--gold); }
.hint-inline { color: var(--muted); font-weight: 400; } small { font-size: .78rem; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 4px; }
.swatches label { display: block; cursor: pointer; } .swatches input { position: absolute; opacity: 0; }
.swatches i { display: block; width: 30px; height: 30px; border-radius: 50%; border: 2px solid transparent; box-shadow: inset 0 0 0 2px rgba(50,35,20,0.16); transition: transform .15s; }
.swatches input:checked + i { border-color: #fff; transform: scale(1.12); } .swatches input:focus-visible + i { outline: 2px solid var(--gold); outline-offset: 2px; }

/* ============ header ============ */
.site-header { position: sticky; top: 0; z-index: 50; transition: background .3s, border-color .3s, backdrop-filter .3s; border-bottom: 1px solid transparent; }
.site-header.scrolled, .site-header.open { background: rgba(247,241,230,.88); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-color: var(--line); }
.bar { display: flex; align-items: center; gap: 24px; height: 62px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font: 600 1.45rem var(--serif); color: var(--text); letter-spacing: -.01em; } .brand:hover { color: var(--text); }
.nav { display: flex; gap: 6px; } .nav a { color: #3a4150; padding: 8px 14px; border-radius: 999px; font-size: .92rem; font-weight: 500; transition: background .2s, color .2s; }
.nav a:hover, .nav a.on { background: var(--card-2); color: var(--text); }
.hsearch { display: flex; align-items: center; gap: 8px; margin-left: auto; padding: 0 14px; height: 42px; width: 250px; border-radius: 999px; background: rgba(31,36,48,.06); border: 1px solid var(--line); color: var(--muted); transition: border-color .2s, width .3s var(--ease); }
.hsearch:focus-within { border-color: var(--gold); width: 300px; color: var(--text); }
.hsearch input { background: none !important; border: 0 !important; padding: 0 !important; height: 100%; font-size: .9rem; }
.acct { display: flex; align-items: center; gap: 10px; }
.avatar-wrap { position: relative; } .avatar { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--card-2); color: var(--gold); font: 600 .85rem var(--sans); cursor: pointer; overflow: hidden; padding: 0; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.menu { position: absolute; right: 0; top: 50px; min-width: 200px; background: #ffffff; border: 1px solid var(--line); border-radius: 14px; padding: 8px; box-shadow: 0 20px 50px rgba(50,35,20,0.23); }
.menu[hidden] { display: none; } .menu .who { margin: 0; padding: 8px 12px; font-size: .8rem; color: var(--muted); border-bottom: 1px solid var(--line); }
.menu a, .menu button { display: block; width: 100%; text-align: left; padding: 10px 12px; border-radius: 8px; color: var(--text); background: none; border: 0; font: inherit; font-size: .9rem; cursor: pointer; } .menu a:hover, .menu button:hover { background: var(--card-2); color: var(--text); }
.burger { display: none; width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); position: relative; cursor: pointer; }
.burger span { position: absolute; left: 11px; right: 11px; height: 2px; background: var(--text); border-radius: 2px; transition: transform .25s; } .burger span:first-child { top: 16px; } .burger span:last-child { top: 24px; }
.site-header.open .burger span:first-child { transform: translateY(4px) rotate(45deg); } .site-header.open .burger span:last-child { transform: translateY(-4px) rotate(-45deg); }

/* ============ shared hero bits ============ */
.cta { display: flex; flex-wrap: wrap; gap: 12px; }
.ticks { list-style: none; padding: 0; margin: 26px 0 0; display: flex; flex-wrap: wrap; gap: 8px 22px; color: #3a4150; font-size: .9rem; }
.ticks li::before { content: "✓"; color: var(--gold); margin-right: 8px; font-weight: 700; }

/* ============ sections ============ */
.section { padding: 70px 0; } .section.tight { padding: 28px 0 90px; } .section.alt { background: rgba(255,255,255,.45); border-block: 1px solid var(--line); }
.sec-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 36px; } .sec-head.center { flex-direction: column; align-items: center; text-align: center; }
.sec-head p { margin: 12px 0 0; } .more { font-weight: 600; font-size: .92rem; white-space: nowrap; }
.steps, .features { display: grid; gap: 20px; } .steps { grid-template-columns: repeat(3, 1fr); } .features { grid-template-columns: repeat(3, 1fr); }
.steps article, .features article { padding: 28px; border-radius: var(--radius); background: #fff; box-shadow: 0 1px 2px rgba(50,35,20,.05); border: 1px solid var(--line); transition: transform .3s var(--ease), border-color .3s, background .3s; }
.steps article:hover, .features article:hover { transform: translateY(-4px); border-color: rgba(217,74,34,.35); background: var(--card-2); }
.steps h3, .features h3 { margin: 14px 0 8px; } .steps p, .features p { color: var(--muted); margin: 0; font-size: .95rem; }
.num, .features i { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: rgba(217,74,34,.12); color: var(--gold); font: 600 1.15rem var(--serif); font-style: normal; border: 1px solid rgba(217,74,34,.25); }
.author-band { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; padding: 56px; border-radius: 28px; border: 1px solid rgba(217,74,34,.25);
  background: radial-gradient(600px 300px at 90% 20%, rgba(217,74,34,.18), transparent 70%), linear-gradient(135deg, #ffffff, #fbeadb); }
.author-band h2 { margin-bottom: 16px; } .author-band .btn { margin-top: 28px; }
.stack-books { position: relative; height: 330px; } .stack-books img { position: absolute; width: 190px; aspect-ratio: 3/4; object-fit: cover; border-radius: 4px 10px 10px 4px; box-shadow: 0 24px 50px rgba(50,35,20,0.25); }
.stack-books img:nth-child(1) { left: 8%; top: 40px; transform: rotate(-9deg); } .stack-books img:nth-child(2) { left: 32%; top: 0; z-index: 2; transform: rotate(2deg); } .stack-books img:nth-child(3) { left: 56%; top: 50px; transform: rotate(10deg); }
.faq { display: grid; gap: 12px; } .faq details { border: 1px solid var(--line); border-radius: 14px; background: var(--card); padding: 4px 22px; transition: border-color .2s; } .faq details[open] { border-color: rgba(217,74,34,.35); }
.faq summary { cursor: pointer; padding: 16px 0; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; } .faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--gold); font-size: 1.4rem; line-height: 1; transition: transform .25s; } .faq details[open] summary::after { transform: rotate(45deg); } .faq p { color: var(--muted); padding-bottom: 8px; }

/* ============ book cards (CSS 3D) ============ */
	.shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 26px 20px; } .grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 40px 24px; }
.bcard { display: block; color: var(--text); } .bcard:hover { color: var(--text); }
.bk { perspective: 1400px; padding: 8px 10px 14px 16px; }
.bk3d { position: relative; aspect-ratio: 3/4; transform-style: preserve-3d; transform: rotateY(-20deg); transition: transform .55s var(--ease); background: var(--c, #333); border-radius: 3px 7px 7px 3px; }
.bk3d img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 3px 7px 7px 3px; transform: translateZ(9px); box-shadow: inset 4px 0 6px -3px rgba(50,35,20,0.20), inset -1px 0 0 rgba(31,36,48,.1); }
.bk3d::before { content: ""; position: absolute; top: 0; left: 0; width: 18px; height: 100%; background: linear-gradient(90deg, rgba(50,35,20,0.16), rgba(31,36,48,.1) 40%, rgba(50,35,20,0.11)), var(--c); transform-origin: left; transform: translateZ(9px) rotateY(90deg); }
.bk3d::after { content: ""; position: absolute; top: 2%; right: 0; width: 18px; height: 96%; background: repeating-linear-gradient(0deg, #ece4cf 0 2px, #cfc5a8 2px 3px); transform-origin: right; transform: translateZ(9px) rotateY(-90deg); }
.bk::after { content: ""; display: block; height: 14px; margin: 6px 10% 0; background: radial-gradient(ellipse at center, rgba(50,35,20,0.23), transparent 70%); filter: blur(3px); transition: opacity .4s, transform .5s var(--ease); }
.bcard:hover .bk3d { transform: rotateY(-8deg) translateY(-8px) scale(1.03); } .bcard:hover .bk::after { opacity: .5; transform: scale(.85); }
.binfo { padding: 0 6px; } .binfo h3 { font-size: 1.02rem; margin: 6px 0 2px; } .binfo p { margin: 0 0 8px; color: var(--muted); font-size: .88rem; }
.chip { display: inline-block; padding: 5px 12px; border-radius: 999px; font: 500 .75rem/1 var(--sans); background: rgba(217,74,34,.12); color: var(--gold); border: 1px solid rgba(217,74,34,.22); }
.btn-chip { cursor: pointer; background: var(--card); color: #3a4150; border-color: var(--line); padding: 9px 16px; font-size: .84rem; transition: all .2s; } .btn-chip:hover { border-color: rgba(31,36,48,.3); } .btn-chip.on { background: var(--gold); color: #fff; border-color: var(--gold); font-weight: 600; }
.skel .bk3d { background: rgba(31,36,48,.08); animation: pulse 1.4s ease-in-out infinite; } .skel h3, .skel p { background: rgba(31,36,48,.06); border-radius: 6px; color: transparent; width: 70%; animation: pulse 1.4s ease-in-out infinite; } .skel .bk3d::before, .skel .bk3d::after, .skel .bk::after { display: none; }
.skel-lines i { display: block; height: 18px; border-radius: 8px; background: rgba(31,36,48,.08); margin: 14px 0; width: 60%; animation: pulse 1.4s ease-in-out infinite; } .skel-lines i:nth-child(2) { width: 85%; } .skel-lines i:nth-child(3) { width: 40%; }
@keyframes pulse { 50% { opacity: .45; } }

/* ============ browse ============ */
.page-head { padding: 54px 0 24px; } .page-head.slim { padding-bottom: 6px; } .page-head h1 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 26px; }
.filters { display: flex; gap: 12px; margin-bottom: 18px; } .field-search { flex: 1; } .filters select { width: 190px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; } .count { color: var(--muted); font-size: .9rem; margin: 0 0 22px; min-height: 1.4em; }
.empty { text-align: center; padding: 70px 20px; border: 1px dashed var(--line); border-radius: var(--radius); } .empty[hidden] { display: none; } .empty h3 { margin-bottom: 8px; }

/* ============ reader (shared by hero + book page) ============ */
.reader { position: relative; width: 100%; height: 100%; overflow: hidden; border-radius: inherit; background: radial-gradient(ellipse at 50% 38%, rgba(255,255,255,.95), transparent 66%), linear-gradient(180deg, #f6d9bf, #efe0c9); }
.reader-stage { position: absolute; inset: 0; } .reader-stage canvas { display: block; width: 100% !important; height: 100% !important; cursor: grab; outline: none; touch-action: pan-y; } .reader-stage canvas:active { cursor: grabbing; }
.reader:fullscreen { border-radius: 0; }
.reader-loader { position: absolute; inset: 0; display: grid; place-items: center; background: var(--bg); transition: opacity .6s, visibility .6s; z-index: 3; } .reader-loader.done { opacity: 0; visibility: hidden; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 2px solid rgba(31,36,48,.15); border-top-color: var(--gold); animation: spin .9s linear infinite; } @keyframes spin { to { transform: rotate(360deg); } }
.dock { position: absolute; z-index: 4; left: 50%; bottom: 40px; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; padding: 8px; width: min(540px, calc(100% - 24px));
  background: rgba(255,255,255,.82); border: 1px solid var(--line); border-radius: 999px; backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); box-shadow: 0 16px 44px rgba(50,35,20,0.20); }
.dock .icon { display: grid; place-items: center; width: 40px; height: 40px; flex: none; color: var(--text); background: rgba(31,36,48,.07); border: 1px solid var(--line); border-radius: 50%; cursor: pointer; transition: background .2s, color .2s, transform .15s, opacity .2s; padding: 0; }
.dock .icon:hover:not(:disabled) { background: var(--gold); color: #fff; } .dock .icon:active:not(:disabled) { transform: scale(.92); } .dock .icon:disabled { opacity: .3; cursor: default; }
.scrub { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; } .status { font-size: .72rem; letter-spacing: .06em; color: var(--muted); font-variant-numeric: tabular-nums; }
.slider { -webkit-appearance: none; appearance: none; width: 100%; height: 18px; background: transparent; cursor: pointer; margin: 0; padding: 0 !important; border: 0 !important; }
.slider::-webkit-slider-runnable-track { height: 4px; border-radius: 4px; background: linear-gradient(to right, var(--gold) var(--fill, 0%), rgba(31,36,48,.18) var(--fill, 0%)); }
.slider::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; margin-top: -6px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 4px rgba(217,74,34,.35); }
.slider::-moz-range-track { height: 4px; border-radius: 4px; background: rgba(31,36,48,.18); } .slider::-moz-range-progress { height: 4px; border-radius: 4px; background: var(--gold); }
.slider::-moz-range-thumb { width: 16px; height: 16px; border: 0; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 4px rgba(217,74,34,.25); }
.reader-hint { position: absolute; z-index: 2; bottom: 12px; left: 0; right: 0; margin: 0; text-align: center; font-size: .72rem; color: var(--muted); letter-spacing: .03em; transition: opacity .6s; pointer-events: none; padding: 0 12px; } .reader-hint.gone { opacity: 0; }

/* ============ book page ============ */
.bookpage { padding: 22px 0 80px; } .crumbs { display: flex; gap: 8px; font-size: .85rem; color: var(--muted); margin-bottom: 18px; } .crumbs a { color: var(--muted); } .crumbs a:hover { color: var(--text); }
.book-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(300px, 1fr); gap: 32px; align-items: start; }
.book-stage { height: min(74vh, 700px); min-height: 460px; border-radius: 28px; border: 1px solid var(--line); overflow: hidden; box-shadow: 0 40px 100px rgba(50,35,20,0.20); } #reader { height: 100%; border-radius: inherit; }
.book-side { position: sticky; top: 96px; padding: 4px 0; } .book-side h1 { font-size: clamp(1.9rem, 3vw, 2.6rem); margin: 14px 0 8px; } .by { color: var(--muted); font-size: 1.05rem; margin-bottom: 18px; } .by strong { color: var(--text); }
.desc { color: #3a4150; } .facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 24px 0; } .facts div { padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.facts dt { font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); } .facts dd { margin: 4px 0 0; font-weight: 600; font-size: .92rem; }
.share { display: flex; flex-wrap: wrap; gap: 10px; } .protect { margin: 22px 0 8px; color: var(--muted); font-size: .85rem; padding: 12px 14px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); }
.banner { padding: 12px 16px; border-radius: 12px; background: rgba(217,74,34,.1); border: 1px solid rgba(217,74,34,.3); color: var(--gold); font-size: .9rem; }
.more-books { margin-top: 80px; } .more-books[hidden], .notfound[hidden], .book-grid[hidden] { display: none; } .notfound { text-align: center; padding: 100px 0; } .notfound h1 { margin-bottom: 10px; } .notfound .btn { margin-top: 16px; }
.notfound-page { padding: 110px 0; } .notfound-page .lead { margin: 18px auto 30px; }

/* ============ dashboard ============ */
.dash { padding: 50px 0 100px; } .gate { text-align: center; padding: 80px 0; } .gate .lead { margin: 20px auto 30px; }
.dash-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 30px; } .dash-head h1 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 26px; } .stats div { padding: 20px 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.stats b { display: block; font: 600 2rem var(--serif); } .stats span { color: var(--muted); font-size: .85rem; }
.mybooks { display: grid; gap: 14px; } .mybook { display: grid; grid-template-columns: 70px 1fr auto; gap: 20px; align-items: center; padding: 14px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); transition: border-color .2s, background .2s; } .mybook:hover { background: var(--card-2); border-color: rgba(31,36,48,.2); }
.mybook img { width: 70px; aspect-ratio: 3/4; object-fit: cover; border-radius: 3px 6px 6px 3px; box-shadow: -3px 0 0 var(--c), 0 8px 20px rgba(50,35,20,0.18); }
.mb-info h3 { font-size: 1.1rem; margin-bottom: 2px; } .mb-info p { margin: 0 0 8px; font-size: .85rem; } .mb-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.pill { display: inline-block; padding: 4px 11px; border-radius: 999px; font-size: .72rem; font-weight: 600; letter-spacing: .04em; } .pill.published { background: rgba(111,211,160,.14); color: var(--ok); } .pill.draft { background: rgba(31,36,48,.08); color: var(--muted); }
.drop { display: grid; gap: 4px; place-items: center; text-align: center; padding: 26px 18px; border: 1.5px dashed rgba(217,74,34,.45); border-radius: 14px; background: rgba(217,74,34,.05); cursor: pointer; transition: background .2s; } .drop:hover { background: rgba(217,74,34,.1); } .drop b { color: var(--gold); font-size: .95rem; } .drop span { font-size: .82rem; font-weight: 400; }
.progress { display: grid; gap: 8px; } .progress[hidden], #opts[hidden] { display: none; } .pbar { height: 8px; border-radius: 8px; background: rgba(31,36,48,.1); overflow: hidden; } .pbar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--gold), var(--gold-2)); transition: width .25s; } .progress span { font-size: .85rem; color: var(--muted); }

/* ============ modal / toast ============ */
.modal-wrap { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: rgba(40,30,20,.45); backdrop-filter: blur(6px); animation: fade .2s; overflow-y: auto; }
.modal { position: relative; width: min(440px, 100%); max-height: calc(100vh - 40px); overflow-y: auto; padding: 34px 30px 26px; background: #ffffff; border: 1px solid var(--line); border-radius: 22px; box-shadow: 0 40px 100px rgba(50,35,20,0.27); animation: pop .3s var(--ease); } .modal.wide { width: min(640px, 100%); }
.modal h2 { font-size: 1.6rem; margin-bottom: 10px; } .modal > p { margin-bottom: 20px; font-size: .94rem; } .modal-x { position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--card-2); color: var(--text); font-size: 1.3rem; cursor: pointer; line-height: 1; }
.fine { font-size: .75rem; color: var(--muted); margin: 18px 0 0; text-align: center; } .or { display: flex; align-items: center; gap: 12px; margin: 18px 0; color: var(--muted); font-size: .8rem; } .or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
@keyframes fade { from { opacity: 0; } } @keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.97); } }
#toasts { position: fixed; z-index: 200; bottom: 24px; left: 50%; transform: translateX(-50%); display: grid; gap: 8px; justify-items: center; pointer-events: none; }
.toast { padding: 12px 20px; border-radius: 999px; background: #ffffff; border: 1px solid var(--line); box-shadow: 0 14px 40px rgba(50,35,20,0.23); font-size: .9rem; animation: pop .3s var(--ease); transition: opacity .4s, transform .4s; } .toast.error { border-color: rgba(255,123,112,.5); color: #ffd3cf; } .toast.out { opacity: 0; transform: translateY(8px); }


/* ============ footer / prose ============ */
.site-footer { border-top: 1px solid var(--line); padding: 64px 0 28px; margin-top: 40px; background: linear-gradient(180deg, transparent, rgba(50,35,20,0.11)); }
.fgrid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; } .fgrid h4 { font: 600 .75rem var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--gold); margin-bottom: 16px; }
.fgrid a { display: block; color: #3a4150; font-size: .92rem; padding: 4px 0; } .fgrid a:hover { color: #ff9b73; } .fbrand p { color: var(--muted); font-size: .9rem; max-width: 34ch; margin-top: 14px; }
.fbase { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 48px; padding-top: 22px; border-top: 1px solid var(--line); color: var(--muted); font-size: .82rem; }
.prose h2 { font-size: 1.35rem; margin: 36px 0 10px; } .prose p, .prose li { color: #3a4150; } .prose ul, .prose ol { padding-left: 1.3em; } .prose li { margin-bottom: 6px; }
.callout { padding: 14px 18px; border-radius: 12px; background: rgba(217,74,34,.08); border: 1px solid rgba(217,74,34,.25); font-size: .9rem; color: var(--gold) !important; }

/* ============ responsive ============ */
@media (max-width: 1080px) { .hsearch { width: 190px; } .hsearch:focus-within { width: 230px; } }
@media (max-width: 920px) {
  .hero-grid, .book-grid, .author-band { grid-template-columns: 1fr; } .hero { padding-top: 30px; } .hero-copy { text-align: center; } .hero .lead { margin-inline: auto; } .cta, .ticks { justify-content: center; }
  .steps, .features { grid-template-columns: 1fr; } .author-band { padding: 34px 24px; } .stack-books { height: 260px; } .stack-books img { width: 140px; }
  .book-side { position: static; } .fgrid { grid-template-columns: 1fr 1fr; }
  .burger { display: block; margin-left: auto; } .hsearch { display: none; }
  .nav, .acct { display: none; } .site-header.open .nav, .site-header.open .acct { display: flex; }
  .site-header.open .bar { flex-wrap: wrap; height: auto; padding: 14px 0 20px; gap: 12px; } .site-header.open .nav { order: 3; width: 100%; flex-direction: column; } .site-header.open .acct { order: 4; width: 100%; } .site-header.open .hsearch { display: flex; order: 5; width: 100%; margin: 0; }
}
@media (max-width: 600px) {
  .section { padding: 60px 0; } .shelf { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 20px 12px; } .grid { grid-template-columns: repeat(2, 1fr); gap: 28px 12px; }
  .sec-head { flex-direction: column; align-items: flex-start; } .filters { flex-direction: column; } .filters select { width: 100%; } .two { grid-template-columns: 1fr; }
  .mybook { grid-template-columns: 56px 1fr; } .mybook img { width: 56px; } .mb-actions { grid-column: 1 / -1; justify-content: flex-start; } .stats { gap: 8px; } .stats div { padding: 14px; } .dash-head { flex-direction: column; align-items: flex-start; }
  .book-stage { min-height: 440px; border-radius: 20px; } #hero-reader { border-radius: 20px; min-height: 380px; } .dock { bottom: 34px; gap: 6px; } .facts { grid-template-columns: 1fr; } .fgrid { grid-template-columns: 1fr; gap: 28px; } .modal { padding: 30px 20px 22px; }
  .acct .btn.primary { display: none; } .site-header.open .acct .btn.primary { display: inline-flex; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } html { scroll-behavior: auto; } }


main { min-height: 72vh; }
/* dark footer for contrast against the light page */
.site-footer { background: #1d2230; border-top: 0; color: #f3eee3; --text: #f3eee3; --muted: #aab0bd; --line: rgba(255,255,255,.12); margin-top: 60px; }
.site-footer .brand, .site-footer .brand:hover { color: #fff; } .fgrid a { color: #d8dce6; } .fgrid h4 { color: #ff9b73; }

.reader-close { position: absolute; z-index: 6; top: 14px; right: 16px; display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px 9px 12px; border-radius: 999px; cursor: pointer;
  font: 600 .85rem var(--sans); color: var(--text); background: rgba(255,255,255,.88); border: 1px solid var(--line); box-shadow: 0 8px 24px rgba(50,35,20,.14); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); transition: background .2s, color .2s, transform .15s; }
.reader-close[hidden] { display: none; } .reader-close:hover { background: var(--gold); color: #fff; } .reader-close:active { transform: scale(.95); }
.reader:fullscreen { background: radial-gradient(ellipse at 50% 38%, rgba(255,255,255,.95), transparent 66%), linear-gradient(180deg, #f6d9bf, #efe0c9) !important; }
.reader:fullscreen .reader-close { top: 20px; right: 24px; }


/* ============ big hero ============ */
.hero.big { position: relative; padding: 0; min-height: calc(100vh - 62px); min-height: calc(100svh - 62px); max-height: 820px; display: flex; overflow: hidden; }
.hero.big #hero-reader { position: absolute; inset: 0; height: auto; min-height: 0; border: 0; border-radius: 0; box-shadow: none; background: transparent; }
.hero.big .reader { background: transparent; }
.hero.big .reader-hint { display: none; }
.hero.big .dock { left: 50%; bottom: 28px; width: min(400px, 90%); }
.hero-overlay { position: relative; z-index: 3; display: flex; align-items: center; pointer-events: none; padding: 30px 0 110px; }
.hero-overlay .btn, .hero-overlay a { pointer-events: auto; }
.hero.big .hero-copy { max-width: 500px; text-align: left; transition: opacity .5s var(--ease), transform .6s var(--ease); }
.hero.big.reading .hero-copy { opacity: 0; transform: translateX(-40px); pointer-events: none; } .hero.big.reading .hero-copy * { pointer-events: none; }
.hero.big h1 { font-size: clamp(2.5rem, 5.2vw, 4.4rem); line-height: 1.02; letter-spacing: -.025em; }
.hero.big .lead { margin: 22px 0 28px; font-size: 1.08rem; } .hero.big .cta { justify-content: flex-start; }
.pill-eyebrow { padding: 7px 13px; border-radius: 999px; background: rgba(217,74,34,.1); border: 1px solid rgba(217,74,34,.25); }
.hero.big .featured-tag { text-align: left; margin-top: 22px; }

.aura { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.aura .blob { position: absolute; border-radius: 50%; filter: blur(60px); }
.aura .b1 { width: 52vmin; height: 52vmin; right: 12%; top: 18%; background: rgba(255,150,100,.38); } .aura .b2 { width: 40vmin; height: 40vmin; right: 34%; bottom: 6%; background: rgba(120,170,255,.28); }

.flip-me { position: absolute; z-index: 3; left: 68%; top: 14%; transform: rotate(6deg); display: flex; flex-direction: column; align-items: center; color: var(--gold);
  font: italic 600 1.15rem var(--serif); pointer-events: none; animation: nudge 2.4s ease-in-out infinite; transition: opacity .5s; } .flip-me.gone { opacity: 0; }
.flip-me svg { transform: rotate(10deg); } @keyframes nudge { 50% { transform: rotate(6deg) translateY(-7px); } }
.scroll-cue { position: absolute; z-index: 3; left: 50%; bottom: 10px; transform: translateX(-50%); width: 24px; height: 38px; border: 2px solid rgba(31,36,48,.3); border-radius: 14px; }
.scroll-cue span { position: absolute; left: 50%; top: 7px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--gold); animation: wheel 1.8s ease-in-out infinite; } @keyframes wheel { 60% { transform: translateY(11px); opacity: 0; } }

@media (max-width: 920px) {
  .hero.big { flex-direction: column; max-height: none; min-height: 0; }
  .hero.big #hero-reader { position: relative; inset: auto; order: 2; height: 105vw; min-height: 420px; max-height: 600px; }
  .hero-overlay { order: 1; padding: 30px 0 0; } .hero.big .hero-copy { text-align: center; margin-inline: auto; } .hero.big .cta { justify-content: center; } .hero.big .featured-tag { text-align: center; }
  .hero.big.reading .hero-copy { opacity: 1; transform: none; pointer-events: auto; } .hero.big.reading .hero-copy * { pointer-events: auto; }
  .flip-me, .scroll-cue { display: none; } .hero.big h1 { font-size: clamp(2.3rem, 10vw, 3.4rem); }
}

/* split hero: dock sits under the book; book recentres while reading */
.hero.big .dock { left: var(--book-x, 70%); bottom: 26px; width: min(420px, 90%); transition: left .7s var(--ease); }
.hero.big.reading .dock { left: 50%; }
.hero.big .reader-close { top: 14px; right: 18px; }
.hero.big .reader-loader { background: var(--bg); }
@media (max-width: 920px) { .hero.big .dock { left: 50%; } }

/* hint sits right under the book, above the control bar */
.hero.big .flip-me { left: var(--book-x, 70%); right: auto; top: auto; bottom: 96px; transform: translateX(-50%); display: block; padding: 7px 16px; border-radius: 999px; background: rgba(255,255,255,.85); border: 1px solid var(--line);
  font: 600 .82rem var(--sans); color: var(--gold); box-shadow: 0 8px 24px rgba(50,35,20,.12); animation: hintpulse 2.2s ease-in-out infinite; }
.hero.big .flip-me svg { display: none; }
@keyframes hintpulse { 50% { transform: translateX(-50%) translateY(-5px); } }
@media (max-width: 920px) { .hero.big .flip-me { left: 50%; display: none; } }

.fgrid .brand { display: inline-flex; padding: 0; color: #fff; } .fgrid .brand:hover { color: #fff; }
.demo-badge { margin-left: 8px; padding: 3px 9px; border-radius: 999px; background: rgba(207,74,34,.12); border: 1px solid rgba(207,74,34,.3); color: var(--gold); font: 600 .62rem var(--sans); letter-spacing: .1em; text-transform: uppercase; align-self: center; }
.hsearch { width: 230px; } .hsearch:focus-within { width: 280px; }
[hidden] { display: none !important; }

.two { align-items: start; } .swatches { padding-top: 6px; }
@media (max-width: 600px) { .reader-hint { display: none; } .dock { bottom: 22px; } }

/* fullscreen: book and control bar share the exact centre line */
.reader:fullscreen .dock, .hero.big .reader:fullscreen .dock { left: 50% !important; bottom: 28px; }

/* book page uses the home hero; small extras */
.hero.big .backlink { display: block; width: fit-content; margin-bottom: 14px; font-size: .88rem; color: var(--muted); } .hero.big .backlink:hover { color: var(--text); }
.hero.big .by { margin: 10px 0 0; color: var(--muted); font-size: 1.05rem; } .hero.big .by strong { color: var(--text); }
.hero.big h1.long { font-size: clamp(2.1rem, 4.2vw, 3.6rem); }
.hero.big .lead.clamp { display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; margin: 18px 0 24px; }
.hero.big .share { gap: 10px; }
.hero.big .featured-tag .linkbtn { color: var(--gold); padding: 0; font-size: inherit; } .hero.big .featured-tag .linkbtn:hover { color: var(--danger); }
.hero.big .banner { margin: 0 0 14px; }
.book-hero .reader-loader { background: var(--bg); }

@media (max-width: 920px) { .hero.big .dock { width: min(460px, 94%); } }

@media (max-width: 920px) { .hero.big .flip-me { display: block; left: 50%; bottom: 92px; } }
.hero.big .flip-me { white-space: nowrap; }


/* phones: when the book is open the stage grows and the home copy collapses, so one page can fill the screen */
@media (max-width: 920px) {
  .hero.big.reading .hero-overlay { max-height: 0; opacity: 0; padding: 0; pointer-events: none; overflow: hidden; }
  .hero.big #hero-reader { transition: height .5s var(--ease); }
  .hero.big.reading #hero-reader { height: 150vw; max-height: 760px; }
}

/* ============ fullscreen reading ============ */
.rd-tools { position: absolute; z-index: 6; top: 14px; left: 16px; display: none; align-items: center; gap: 8px; flex-wrap: wrap; max-width: calc(100% - 150px); }
.reader.is-full .rd-tools { display: flex; }
.rd-group, .rd-toggle { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: rgba(255,255,255,.9); box-shadow: 0 8px 24px rgba(50,35,20,.14); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.rd-tools button { font: 600 .85rem var(--sans); color: var(--text); background: none; border: 0; cursor: pointer; padding: 9px 13px; min-height: 38px; }
.rd-group button:hover, .rd-toggle:hover { background: rgba(207,74,34,.14); }
.rd-tools [aria-pressed="true"] { background: #1f2430; color: #fff; }
.rd-zoom { min-width: 3.3em; text-align: center; font: 600 .8rem var(--sans); font-variant-numeric: tabular-nums; }
.rd-tools button:focus-visible { outline: 3px solid var(--gold); outline-offset: -3px; }
.reader.fs-fallback { position: fixed !important; inset: 0 !important; z-index: 200; width: 100% !important; height: 100% !important; border-radius: 0 !important; }
.reader.is-full { background: radial-gradient(ellipse at 50% 38%, rgba(255,255,255,.95), transparent 66%), linear-gradient(180deg, #f6d9bf, #efe0c9) !important; }
.reader.is-full[data-theme="sepia"] { background: #e9dcbc !important; } .reader.is-full[data-theme="dark"] { background: #111318 !important; }
.reader.is-full .dock { left: 50% !important; bottom: 28px; } .reader.is-full .reader-close { top: 14px; right: 18px; }
@media (max-width: 700px) {
  .rd-tools { top: auto; bottom: 92px; left: 50%; transform: translateX(-50%); justify-content: center; max-width: calc(100% - 16px); gap: 6px; }
  .rd-tools button { padding: 8px 11px; min-height: 36px; font-size: .8rem; }
  .reader.is-full .dock { bottom: 20px; }
}

/* flat fallback (no WebGL) */
.flat { position: absolute; inset: 0 0 96px; display: flex; align-items: center; justify-content: center; gap: 4px; padding: 16px; }
.flat img { max-height: 100%; max-width: 46%; width: auto; height: auto; border-radius: 3px; box-shadow: 0 14px 40px rgba(50,35,20,.3); background: #fff; transform: scale(var(--m, 1)); transition: transform .2s; cursor: pointer; }
.flat:not(.open) img { max-width: 70%; max-height: 82%; } .flat img[hidden] { display: none; }
.flat-mode .reader-hint { display: block; }
@media (max-width: 700px) { .flat.open img + img { display: none; } .flat img { max-width: 92%; } }

.skip-link { position: fixed; left: 12px; top: -60px; z-index: 300; padding: 10px 16px; border-radius: 999px; background: #1f2430; color: #fff; font-weight: 600; transition: top .2s; } .skip-link:focus { top: 12px; color: #fff; }
main:focus { outline: none; }

/* ============ admin console ============ */
.admin { padding: 36px 0 90px; } .wrap.wide { width: min(1320px, 100% - 48px); }
.adm-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; } .adm-head h1 { font-size: clamp(1.7rem, 3vw, 2.4rem); } .adm-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.adm-tabs { display: flex; gap: 6px; margin: 18px 0 22px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.adm-tabs button { font: 600 .92rem var(--sans); color: var(--muted); background: none; border: 0; border-bottom: 3px solid transparent; padding: 12px 18px; cursor: pointer; white-space: nowrap; display: inline-flex; gap: 8px; align-items: center; } .adm-tabs button:hover { color: var(--text); } .adm-tabs button.on { color: var(--gold); border-color: var(--gold); }
.dot { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--danger); color: #fff; font-size: .7rem; }
.kpis { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin-bottom: 16px; }
.kpi { padding: 18px 20px; border-radius: 18px; background: #fff; border: 1px solid var(--line); display: grid; gap: 4px; } .kpi span { font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.kpi b { font: 600 1.9rem var(--serif); } .kpi small { color: var(--muted); font-size: .78rem; } .kpi.warn { border-color: rgba(214,52,43,.4); background: #fff5f4; } .kpi.warn b { color: var(--danger); }
.adm-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; } .card { padding: 22px; border-radius: 18px; background: #fff; border: 1px solid var(--line); min-width: 0; } .card h3 { font-size: 1rem; margin-bottom: 14px; } .card.wide2 { grid-column: span 2; }
.chart { width: 100%; height: 100px; display: block; } .chart rect { fill: var(--gold); opacity: .85; } .chart rect:hover { opacity: 1; } .chart-axis { display: flex; justify-content: space-between; font-size: .7rem; color: var(--muted); margin-top: 4px; }
.stat-big { font: 600 2rem var(--serif); margin: 0 0 10px; } .meter { height: 10px; border-radius: 10px; background: rgba(31,36,48,.1); overflow: hidden; margin-bottom: 8px; } .meter i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold-2), var(--gold)); }
.hbar { display: grid; grid-template-columns: 120px 1fr 28px; gap: 10px; align-items: center; font-size: .85rem; margin-bottom: 8px; } .hbar i { display: block; height: 10px; border-radius: 10px; background: var(--gold); opacity: .8; } .hbar b { text-align: right; }
.feed { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; } .feed li { display: flex; justify-content: space-between; gap: 10px; font-size: .88rem; border-bottom: 1px solid var(--line); padding-bottom: 8px; } .feed small, .block { display: block; } .feed small { color: var(--muted); text-align: right; }
.adm-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; } .adm-bar input { max-width: 300px; } .adm-bar select { width: auto; }
.tbl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; background: #fff; } .tbl { width: 100%; border-collapse: collapse; font-size: .88rem; } .tbl th { text-align: left; font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 12px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; } .tbl tr:last-child td { border-bottom: 0; } .tbl tbody tr:hover { background: rgba(31,36,48,.025); } .tbl small { font-size: .74rem; }
.thumb { width: 38px; aspect-ratio: 3/4; object-fit: cover; border-radius: 3px; box-shadow: 0 2px 6px rgba(50,35,20,.25); } .row-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 1100px) { .kpis { grid-template-columns: repeat(3, 1fr); } .adm-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 700px) { .kpis { grid-template-columns: repeat(2, 1fr); } .adm-grid { grid-template-columns: 1fr; } .card.wide2 { grid-column: auto; } }
.pill.taken { background: rgba(214,52,43,.12); color: var(--danger); }
.expander { background: none; border: 0; padding: 0; font: inherit; font-size: .88rem; color: var(--text); cursor: pointer; text-align: left; } .expander:hover { color: var(--gold); } .clip { max-width: 300px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tbl tr.open > td { background: rgba(217,74,34,.05); } .tbl tr.sub > td { background: rgba(31,36,48,.025); padding: 8px 16px 16px 40px; }
.ubooks { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 8px; } .ubooks li { display: grid; grid-template-columns: 40px 1fr auto auto; gap: 14px; align-items: center; padding: 8px 12px; border-radius: 12px; background: #fff; border: 1px solid var(--line); } .nowrap { white-space: nowrap; font-size: .82rem; }
@media (max-width: 700px) { .ubooks li { grid-template-columns: 40px 1fr; } .ubooks li > span, .ubooks li > .pill { grid-column: 2; justify-self: start; } }

.danger-zone { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 40px; padding: 20px 24px; border: 1px dashed rgba(214,52,43,.4); border-radius: 16px; background: rgba(214,52,43,.04); } .danger-zone h3 { font-size: 1rem; margin-bottom: 4px; } .danger-zone p { margin: 0; font-size: .88rem; }

/* analytics */
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: #fff; } .seg button { font: 600 .85rem var(--sans); padding: 9px 16px; border: 0; background: none; cursor: pointer; color: var(--muted); } .seg button.on { background: #1f2430; color: #fff; }
.check.inline { display: inline-flex; flex-direction: row; align-items: center; gap: 8px; padding: 0; font-size: .85rem; margin-left: auto; } .check.inline input { width: 16px; height: 16px; accent-color: var(--gold); }
.hbar.wide { grid-template-columns: minmax(90px, 140px) 1fr auto; } .hbar.wide span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .hbar.wide b { font-size: .82rem; white-space: nowrap; } .card h3.sub { margin-top: 18px; font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.kpi b { overflow-wrap: anywhere; } .kpi b:has(+ small) { line-height: 1.15; }

.pager { display: flex; justify-content: center; align-items: center; gap: 16px; margin-top: 14px; flex-wrap: wrap; } code.err { font-size: .78rem; background: rgba(214,52,43,.08); color: var(--danger); padding: 2px 6px; border-radius: 6px; word-break: break-word; }

/* ============ upload studio ============ */
.modal.studio { width: min(1100px, 100%); padding: 0; height: min(880px, calc(100vh - 36px)); max-height: none; overflow: hidden; display: flex; flex-direction: column; }
.modal.studio .modal-x { z-index: 5; top: 12px; right: 14px; }
#studio { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.stepper { list-style: none; margin: 0; padding: 16px 64px 0 26px; display: flex; gap: 6px; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.stepper li { position: relative; } .stepper button { display: inline-flex; align-items: center; gap: 9px; padding: 11px 14px 13px; background: none; border: 0; border-bottom: 3px solid transparent; font: 600 .88rem var(--sans); color: var(--muted); cursor: pointer; }
.stepper button:disabled { cursor: default; opacity: .55; } .stepper button span { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: rgba(31,36,48,.1); font-size: .75rem; }
.stepper li.on button { color: var(--text); border-color: var(--gold); } .stepper li.on button span { background: var(--gold); color: #fff; } .stepper li.done button span { background: var(--ok); color: #fff; } .stepper li.done button:not(:disabled):hover { color: var(--gold); }
.st-body { flex: 1; overflow-y: auto; padding: 24px 30px 30px; } .st-body h2 { font-size: 1.55rem; margin-bottom: 6px; } .st-body > p { margin-bottom: 18px; max-width: 70ch; }
.st-foot { display: flex; align-items: center; gap: 12px; padding: 14px 26px; border-top: 1px solid var(--line); background: rgba(255,255,255,.7); } .st-foot .grow { flex: 1; } .st-foot > .muted { flex: 1; font-size: .85rem; }
.req { color: var(--danger); }
.designs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 26px; }
.design { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 10px 14px; text-align: center; background: #fff; border: 2px solid var(--line); border-radius: 18px; cursor: pointer; font: inherit; color: var(--text); transition: border-color .2s, box-shadow .25s, transform .25s var(--ease); }
.design:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(60,40,20,.14); } .design.on { border-color: var(--gold); box-shadow: 0 0 0 4px rgba(207,74,34,.15), 0 14px 34px rgba(60,40,20,.14); }
.design .d3 { position: relative; width: 100%; height: 210px; border-radius: 12px; background: radial-gradient(ellipse at 50% 40%, #fff, #f4e6d2 85%); overflow: hidden; } .design b { margin-top: 8px; font: 600 1rem var(--serif); } .design small { color: var(--muted); font-size: .8rem; }
.tick { position: absolute; top: 14px; right: 14px; width: 28px; height: 28px; border-radius: 50%; background: var(--gold); color: #fff; display: grid; place-items: center; font-style: normal; font-weight: 700; transform: scale(0); transition: transform .25s var(--ease); } .design.on .tick { transform: scale(1); }
.st-form { display: grid; gap: 16px; max-width: 760px; }
.dz { position: relative; display: grid; place-items: center; gap: 4px; text-align: center; min-height: 190px; padding: 18px; border: 2px dashed rgba(207,74,34,.45); border-radius: 18px; background: rgba(207,74,34,.04); cursor: pointer; transition: background .2s, border-color .2s; overflow: hidden; }
.dz:hover, .dz.over { background: rgba(207,74,34,.1); border-color: var(--gold); } .dz.busy { opacity: .55; pointer-events: none; } .dz b { font-size: 1rem; color: var(--gold); } .dz small { font-size: .8rem; } .dz.wide { min-height: 110px; flex: 1; }
.dz.filled { border-style: solid; border-color: var(--line); background: #fff; padding: 8px; } .dz.filled img { max-height: 230px; max-width: 100%; border-radius: 6px; box-shadow: 0 8px 22px rgba(50,35,20,.25); }
.dz-x { position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; border-radius: 50%; border: 0; background: rgba(31,36,48,.8); color: #fff; cursor: pointer; }
.cv-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 24px; align-items: start; } .cv-drops { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.cv-view { display: grid; gap: 10px; justify-items: center; } .cv3d { position: relative; width: 100%; height: 360px; border-radius: 20px; background: radial-gradient(ellipse at 50% 40%, #fff, #f1dfc8 85%); border: 1px solid var(--line); overflow: hidden; }
.pg-add { display: flex; gap: 12px; flex-wrap: wrap; align-items: stretch; margin-bottom: 10px; } .pg-btns { display: flex; flex-direction: column; gap: 8px; justify-content: center; }
.import { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 12px 16px; border-radius: 14px; background: rgba(207,74,34,.08); border: 1px solid rgba(207,74,34,.25); margin: 8px 0; font-size: .9rem; } .import[hidden] { display: none; } .import input { width: 70px; padding: 8px 10px; }
.pg-meter { margin: 12px 0 16px; font-size: .9rem; } .pg-meter .warn { color: var(--danger); } .pg-meter .good { color: var(--ok); }
.spreads { display: grid; gap: 18px; } .spread { display: grid; gap: 6px; } .spread-l { color: var(--muted); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; }
.spread-pages { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; max-width: 520px; padding: 10px; border-radius: 12px; background: linear-gradient(90deg, #ebe2d0, #f6efe0 49%, #d9cfba 50%, #f6efe0 51%, #ebe2d0); box-shadow: 0 6px 18px rgba(60,40,20,.15); }
.cover-row .spread-pages { grid-template-columns: 1fr; max-width: 260px; background: #e7ddc9; }
.pg { position: relative; aspect-ratio: 3/4; border-radius: 4px; overflow: hidden; background: #fff; box-shadow: 0 2px 6px rgba(50,35,20,.22); cursor: grab; transition: transform .15s, box-shadow .15s; } .pg img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pg.empty { display: grid; place-items: center; background: repeating-linear-gradient(45deg, rgba(31,36,48,.04), rgba(31,36,48,.04) 8px, transparent 8px, transparent 16px); color: var(--muted); font-size: .8rem; box-shadow: none; cursor: default; } .pg.cvr { cursor: default; }
.pg.drag { opacity: .4; } .pg.over { box-shadow: 0 0 0 3px var(--gold); transform: scale(1.02); }
.pg-n { position: absolute; left: 6px; bottom: 6px; padding: 2px 8px; border-radius: 999px; background: rgba(31,36,48,.78); color: #fff; font: 600 .72rem var(--sans); }
.pg-tools { position: absolute; top: 5px; right: 5px; display: flex; gap: 4px; opacity: 0; transition: opacity .15s; } .pg:hover .pg-tools, .pg:focus-within .pg-tools { opacity: 1; }
.pg-tools button { width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(255,255,255,.95); color: var(--text); font-size: .7rem; cursor: pointer; box-shadow: 0 2px 6px rgba(0,0,0,.25); } .pg-tools button:hover:not(:disabled) { background: var(--gold); color: #fff; } .pg-tools button:disabled { opacity: .35; cursor: default; }
@media (hover: none) { .pg-tools { opacity: 1; } }
.pg-none { padding: 30px 10px; border: 1px dashed var(--line); border-radius: 14px; }
.permalink { display: flex; align-items: center; gap: 6px; padding: 6px 8px 6px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; } .permalink:focus-within { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(207,74,34,.14); }
.permalink .pl-base { color: var(--muted); font-size: .88rem; white-space: nowrap; } .permalink input { border: 0 !important; background: none !important; padding: 8px 4px !important; font-weight: 600; flex: 1; min-width: 80px; box-shadow: none !important; } .permalink input[readonly] { color: var(--text); }
.permalink.out { max-width: 560px; margin: 8px auto 20px; } .permalink.out input { font-size: .9rem; font-weight: 500; }
.slug-state { min-height: 1.4em; margin: 6px 2px 14px; font-size: .84rem; color: var(--muted); } .slug-state.good { color: var(--ok); } .slug-state.bad { color: var(--danger); } .plabel { display: block; margin-top: 18px; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; }
.pl-sum { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; } .pl-sum span { padding: 5px 12px; border-radius: 999px; background: var(--card-2); border: 1px solid var(--line); font-size: .8rem; }
.pv { display: grid; gap: 12px; } .pv-bar { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; padding-right: 36px; } .pv-stage { height: min(64vh, 560px); border-radius: 20px; overflow: hidden; border: 1px solid var(--line); position: relative; } #pv-reader { position: absolute; inset: 0; }
.modal.pvm { height: auto; padding: 24px 26px; overflow: auto; }
.st-center { flex: 1; display: grid; place-content: center; justify-items: center; gap: 12px; text-align: center; padding: 40px 24px; } .st-center .progress { width: min(460px, 80vw); } .spinner.big { width: 52px; height: 52px; border-width: 3px; }
.confetti { font-size: 3rem; animation: pop .5s var(--ease); } .center-row { justify-content: center; margin-top: 8px; }
@media (max-width: 860px) {
  .designs { grid-template-columns: repeat(2, 1fr); } .cv-grid { grid-template-columns: 1fr; } .design .d3 { height: 170px; }
}
@media (max-width: 560px) {
  .modal.studio { height: calc(100vh - 20px); border-radius: 16px; } .st-body { padding: 18px 16px 24px; } .stepper { padding: 10px 52px 0 8px; } .stepper button { padding: 8px 8px 10px; font-size: .78rem; } .stepper button span { width: 20px; height: 20px; }
  .st-foot { flex-wrap: wrap; padding: 12px 14px; } .st-foot .btn { flex: 1; } .cv-drops { grid-template-columns: 1fr 1fr; } .design .d3 { height: 140px; } .spread-pages { max-width: 100%; } .st-body h2 { font-size: 1.3rem; }
}
.designs > *, .cv-grid > *, .st-form > * { min-width: 0; }
.d3 canvas, .cv3d canvas, .pv-stage canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; display: block; }
.cover-row .spread-pages { max-width: 130px; padding: 6px; } .cover-row .pg.cvr { cursor: default; }
.modal.pubm { width: min(580px, 100%); }
.permalink.out { width: min(560px, 90%); }

.featured-tag { font-size: .88rem; color: var(--muted); } .featured-tag strong { color: var(--text); } .hero.big .hero-copy { font: 400 15px/1.6 var(--sans); }

/* author analytics */
.dash-tabs { margin-top: 26px; } .dash-tabs button { font-size: .95rem; }
.rank { margin-bottom: 14px; } .rank-tbl td { vertical-align: middle; } .rk { width: 34px; color: var(--muted); font: 600 1.1rem var(--serif); }
.bk-cell { display: flex; gap: 12px; align-items: center; min-width: 220px; } .bk-cell > div { min-width: 0; flex: 1; } .share-bar { height: 6px; border-radius: 6px; background: rgba(31,36,48,.08); margin-top: 7px; overflow: hidden; max-width: 260px; } .share-bar i { display: block; height: 100%; border-radius: 6px; }
.kpi-book { font-style: normal; display: block; font: 600 1.15rem/1.2 var(--serif); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 12px; font-size: .8rem; color: var(--muted); } .legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; }
.spark { display: block; overflow: visible; }
@media (max-width: 600px) { .rank-tbl th:nth-child(4), .rank-tbl td:nth-child(4), .rank-tbl th:nth-child(5), .rank-tbl td:nth-child(5), .rank-tbl th:nth-child(7), .rank-tbl td:nth-child(7), .rank-tbl th:nth-child(8), .rank-tbl td:nth-child(8) { display: none; } .bk-cell { min-width: 0; } .rank-tbl td, .rank-tbl th { padding: 10px 8px; } }
.binfo h3, .bcard h3 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; } .mb-info h3, .tbl b { overflow-wrap: anywhere; }
.otp-input { font: 700 24px/1 ui-monospace, Menlo, monospace; letter-spacing: .5em; text-align: center; }
[data-code][hidden], [data-email][hidden] { display: none; }
