/* BookFlip v0.18 — cinematic discovery + reader community */
:root{--bf-night:#0b1511;--bf-night-2:#12221b;--bf-panel:#182b22;--bf-panel-2:#20372c;--bf-cream:#f6f0df;--bf-muted:#b8c2b5;--bf-yellow:#e8c65a;--bf-green:#28483d;--bf-line:#ffffff20;--bf-radius:18px}
html[data-bf-edition=forest],html[data-bf-edition=forest] body{background:var(--bf-night);color:var(--bf-cream);color-scheme:dark}
html[data-bf-edition=forest] body{font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;letter-spacing:-.012em}
html[data-bf-edition=forest] .wrap{width:min(88rem,calc(100% - 3.2rem))}
html[data-bf-edition=forest] .site{background:rgba(11,21,17,.94);border-bottom:1px solid var(--bf-line);box-shadow:0 12px 40px #0005;backdrop-filter:blur(20px)}
html[data-bf-edition=forest] .header{min-height:82px;gap:1.2rem}
html[data-bf-edition=forest] .wordmark{font:800 1.8rem/1 Georgia,serif;color:var(--bf-cream);letter-spacing:-.07em}
html[data-bf-edition=forest] .wordmark img{width:2.55rem;height:2.55rem;filter:drop-shadow(0 3px 8px #0005)}
html[data-bf-edition=forest] .site nav{gap:.3rem}
html[data-bf-edition=forest] .site nav a{font-size:.88rem;color:#c5d0c5;padding:.62rem .85rem;border-radius:999px;transition:.2s ease}
html[data-bf-edition=forest] .site nav a:hover{background:#ffffff12;color:white;text-decoration:none}
html[data-bf-edition=forest] .site nav a[aria-current]{background:var(--bf-yellow);color:#14251c;text-decoration:none}
html[data-bf-edition=forest] .bf-view-switch{border:1px solid #ffffff2c;color:#d9e1d7;border-radius:999px;padding:.5rem .85rem}
html[data-bf-edition=forest] main{padding:clamp(1.6rem,3vw,2.8rem) 0 0;min-height:68vh}
html[data-bf-edition=forest] main>.eyebrow{font-size:.68rem;letter-spacing:.2em;color:var(--bf-yellow);font-weight:850}
html[data-bf-edition=forest] main>h1{font:750 clamp(2.6rem,5vw,4.7rem)/.98 Georgia,serif;color:var(--bf-cream);letter-spacing:-.065em;max-width:18ch;margin:.25rem 0 .6rem}
html[data-bf-edition=forest] main>.lead{font-size:1rem;color:#b9c5b9;max-width:65ch;line-height:1.65;margin-bottom:1.5rem}
html[data-bf-edition=forest] h1,html[data-bf-edition=forest] h2,html[data-bf-edition=forest] h3{font-family:Georgia,"Times New Roman",serif;letter-spacing:-.045em}
html[data-bf-edition=forest] h2{color:var(--bf-cream);font-size:clamp(1.65rem,3vw,2.35rem)}
html[data-bf-edition=forest] h3{color:var(--bf-cream)}
html[data-bf-edition=forest] p{color:#c0cabe}
html[data-bf-edition=forest] a{color:inherit}
html[data-bf-edition=forest] button,html[data-bf-edition=forest] .button{background:var(--bf-yellow);color:#15271e;border:1px solid transparent;border-radius:999px;font-weight:800;padding:.76rem 1.2rem;min-height:2.85rem}
html[data-bf-edition=forest] button:hover,html[data-bf-edition=forest] .button:hover{background:#f2d879;transform:translateY(-2px);box-shadow:0 9px 24px #0004}
html[data-bf-edition=forest] .secondary,html[data-bf-edition=forest] .bf-secondary-link{background:transparent;color:var(--bf-cream);border:1px solid #ffffff40}
html[data-bf-edition=forest] input:not([type=checkbox]),html[data-bf-edition=forest] select,html[data-bf-edition=forest] textarea{background:#13241c;color:var(--bf-cream);border:1px solid #ffffff30;border-radius:12px}
html[data-bf-edition=forest] .filters{gap:.8rem;margin:1.3rem 0}
html[data-bf-edition=forest] .book,html[data-bf-edition=forest] .tile,html[data-bf-edition=forest] .panel{background:var(--bf-panel);color:var(--bf-cream);border:1px solid var(--bf-line);border-radius:16px;box-shadow:0 10px 28px #0003}
html[data-bf-edition=forest] .book{padding:1rem;transition:transform .22s ease,border-color .22s ease,box-shadow .22s ease}
html[data-bf-edition=forest] .book:hover{transform:translateY(-4px);border-color:#e8c65a80;box-shadow:0 18px 38px #0006}
html[data-bf-edition=forest] .book p,html[data-bf-edition=forest] .small{color:#b5c1b6}
html[data-bf-edition=forest] .book-heading{display:flex;align-items:flex-start;gap:1rem}
html[data-bf-edition=forest] .book-tile{width:clamp(5.2rem,10vw,7.2rem);aspect-ratio:2/3;flex:0 0 auto;overflow:hidden;border-radius:8px;background:linear-gradient(145deg,#334f40,#17271f);box-shadow:0 8px 18px #0005;position:relative;display:grid;place-items:center}
html[data-bf-edition=forest] .book-tile img{width:100%;height:100%;object-fit:cover;display:block;position:absolute;inset:0}
html[data-bf-edition=forest] .book-tile-placeholder{color:#e8c65a;font:700 2rem Georgia,serif;opacity:.85}
html[data-bf-edition=forest] .results{grid-template-columns:repeat(auto-fill,minmax(min(100%,17rem),1fr));gap:1rem}
html[data-bf-edition=forest] .footer{border-top:1px solid var(--bf-line);color:#aab8ad;margin-top:4rem;padding:1.5rem 0}
html[data-bf-edition=forest] .footer a{color:#d8e0d4}
html[data-bf-edition=forest] .footer .bookflip-build{color:var(--bf-yellow);font-weight:850;letter-spacing:.08em}
/* Discover hero and editorial rails */
.bf-discover-masthead{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(240px,.85fr);gap:2rem;align-items:center;min-height:290px;margin:1.5rem 0 2.8rem;padding:clamp(1.6rem,4vw,3.2rem);border-radius:24px;overflow:hidden;background:radial-gradient(circle at 80% 10%,#4c7255 0,transparent 35%),linear-gradient(120deg,#1b392c,#0f2119 70%);border:1px solid #ffffff18;box-shadow:0 24px 70px #0006}
.bf-discover-mast-copy h2{font-size:clamp(2rem,4vw,3.7rem);line-height:1.02;max-width:12ch;margin:.25rem 0 1rem}
.bf-discover-mast-copy p:not(.eyebrow){max-width:52ch;color:#d0d9ce;line-height:1.65}
.bf-discover-mast-copy .button{display:inline-flex;margin:.5rem .6rem .1rem 0;text-decoration:none}
.bf-discover-mast-art{min-height:220px;display:flex;align-items:center;justify-content:center;gap:.45rem;transform:rotate(-7deg);position:relative}
.mast-art-word{display:grid;place-items:center;width:clamp(4.5rem,9vw,7rem);height:clamp(8rem,18vw,13rem);border-radius:7px;background:linear-gradient(145deg,#d9bd72,#8e663e);color:#1b2c21;font:900 clamp(.8rem,2vw,1.25rem) Georgia,serif;writing-mode:vertical-rl;box-shadow:inset 7px 0 0 #0002,10px 18px 24px #0005}
.mast-art-word:nth-child(2){height:clamp(9rem,20vw,14rem);background:linear-gradient(145deg,#d6d9c0,#607f69);transform:translateY(-12px)}
.mast-art-word:nth-child(3){background:linear-gradient(145deg,#c9896d,#6e3f36);transform:translateY(9px)}
.discover-section{margin:2.5rem 0 3rem;padding:0;background:transparent;border:0;box-shadow:none;border-radius:0}
.discover-section-heading{display:flex;align-items:end;justify-content:space-between;gap:1rem;margin-bottom:.3rem}
.discover-section-heading h2{margin:0;font-size:clamp(1.55rem,2.8vw,2.25rem)}
.discover-section .bf-edition-label{font-size:.65rem;letter-spacing:.19em;color:var(--bf-yellow);font-weight:850;margin:0 0 .35rem}
.discover-section-detail{margin:.35rem 0 1.2rem;color:#aebcaf;font-size:.92rem}
.bf-discover-book-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,16rem),1fr));gap:1rem;margin-top:1rem}
.bf-discover-book-grid .book{min-width:0}
.bf-discover-shelf .bf-picks-rail{margin-top:1rem}
.bf-discover-shelf .bf-picks-viewport{scrollbar-width:thin;scrollbar-color:#506c58 transparent}
.discover-ranking{padding-left:2.3rem;display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,18rem),1fr));gap:1rem}
.discover-ranking li{background:var(--bf-panel);padding:1rem;border:1px solid var(--bf-line);border-radius:14px}
.discover-ranking .book-heading{align-items:center}
.discover-ranking .book-tile{width:4.6rem}
/* Creators: a clear, honest preview of the social product direction */
.creator-hero{display:grid;grid-template-columns:minmax(0,1fr) minmax(190px,.65fr);gap:2rem;align-items:center;padding:clamp(1.6rem,4vw,3rem);margin:1.3rem 0 1.6rem;border-radius:24px;background:radial-gradient(circle at 80% 30%,#715d38 0,transparent 35%),linear-gradient(125deg,#203d30,#101e17);border:1px solid #ffffff1b}
.creator-hero h2{font-size:clamp(2rem,4vw,3.3rem);line-height:1.02;max-width:15ch;margin:.3rem 0 .8rem}
.creator-hero p:not(.eyebrow){max-width:55ch;line-height:1.65}
.creator-hero-actions{display:flex;gap:.8rem;align-items:center;flex-wrap:wrap;margin-top:1.3rem}
.creator-text-link{color:var(--bf-cream);font-weight:750;text-underline-offset:4px}
.creator-play-art{width:min(100%,260px);aspect-ratio:1;border-radius:50%;display:grid;place-items:center;justify-self:center;background:radial-gradient(circle,#e8c65a 0 4%,#e8c65a22 4.5% 25%,#e8c65a12 25.5% 42%,transparent 42.5%);color:var(--bf-yellow);font-size:4rem;text-shadow:0 8px 30px #0008;position:relative}
.creator-play-art:before,.creator-play-art:after{content:"";position:absolute;inset:10%;border:1px solid #e8c65a55;border-radius:50%}.creator-play-art:after{inset:22%}
.creator-tabs{display:flex;gap:.55rem;overflow:auto;padding:.6rem 0 1rem;border-bottom:1px solid var(--bf-line)}
.creator-tab{white-space:nowrap;padding:.65rem 1rem;border-radius:999px;text-decoration:none;color:#c6d0c5;border:1px solid #ffffff2a;font-weight:750;font-size:.88rem}
.creator-tab[aria-current]{background:var(--bf-yellow);color:#14251c;border-color:var(--bf-yellow)}
.creator-feed{margin:2.4rem 0}
.creator-section-heading{display:flex;justify-content:space-between;align-items:end;gap:1rem;margin-bottom:1rem}
.creator-section-heading h2{margin:0}
.creator-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1rem}
.creator-post{overflow:hidden;background:var(--bf-panel);border:1px solid var(--bf-line);border-radius:18px;box-shadow:0 12px 32px #0003}
.creator-post-visual{min-height:190px;aspect-ratio:16/9;display:flex;align-items:center;justify-content:center;position:relative;overflow:hidden;background:linear-gradient(135deg,#59445f,#1a2821)}
.creator-post-visual:before{content:"";position:absolute;width:70%;aspect-ratio:1;border:1px solid #ffffff35;border-radius:50%;box-shadow:0 0 0 22px #ffffff08,0 0 0 48px #ffffff06}
.creator-post-visual.gold{background:linear-gradient(135deg,#8b6b32,#2a3023)}.creator-post-visual.sage{background:linear-gradient(135deg,#466b55,#17291f)}
.creator-post-kind,.creator-preview-mark{position:absolute;left:1rem;top:1rem;font-size:.62rem;font-weight:900;letter-spacing:.14em;color:#fff;background:#08130f99;padding:.4rem .55rem;border-radius:5px}
.creator-preview-mark{top:auto;bottom:1rem;left:auto;right:1rem;font-size:.55rem;color:#e8c65a}
.creator-post-play{display:grid;place-items:center;width:3.6rem;height:3.6rem;border-radius:50%;background:#e8c65a;color:#14251c;padding-left:.2rem;font-size:1.2rem;box-shadow:0 8px 25px #0005;z-index:1}
.creator-post-body{padding:1.15rem}
.creator-demo-label{font-size:.57rem;letter-spacing:.12em;color:#e8c65a!important;font-weight:900;margin:0 0 .55rem}
.creator-post-body h3{font-size:1.35rem;line-height:1.1;margin:.1rem 0 .55rem}
.creator-post-body>p:not(.creator-demo-label){font-size:.88rem;line-height:1.55;color:#b9c4b8}
.creator-byline{display:flex;align-items:center;gap:.65rem;margin:1rem 0}
.creator-avatar{display:grid;place-items:center;width:2.3rem;height:2.3rem;border-radius:50%;background:#e8c65a;color:#14251c;font-size:.72rem;font-weight:900}
.creator-byline-text{display:grid;gap:.1rem}.creator-byline-text strong{font-size:.8rem;color:var(--bf-cream)}.creator-byline-text small{font-size:.72rem;color:#aab8ad}
.creator-book-mention{display:grid;gap:.15rem;padding:.7rem .8rem;background:#ffffff09;border:1px solid #ffffff17;border-radius:10px}
.creator-book-mention span{font-size:.57rem;letter-spacing:.12em;color:#aebcaf}.creator-book-mention strong{font:700 1rem Georgia,serif;color:var(--bf-cream)}
.creator-book-link{display:inline-block;margin-top:.7rem;color:var(--bf-yellow)!important;font-size:.82rem;font-weight:800}
.creator-join{margin:3rem 0;padding:clamp(1.5rem,4vw,2.7rem);border:1px solid #e8c65a45;border-radius:20px;background:linear-gradient(120deg,#1b3529,#14251c)}
.creator-join h2{margin:.2rem 0 .6rem}.creator-join>p:not(.eyebrow){max-width:70ch}
/* Existing journal, search and club pages inherit the new system without removing controls. */
html[data-bf-edition=forest] .journal-nav a{display:inline-block;padding:.55rem .85rem;border:1px solid var(--bf-line);border-radius:999px;text-decoration:none;color:#d8e0d5}
html[data-bf-edition=forest] .journal-nav a[aria-current]{background:var(--bf-yellow);color:#14251c;border-color:var(--bf-yellow)}
html[data-bf-edition=forest] dialog{background:#14251c;color:var(--bf-cream);border:1px solid #ffffff30;border-radius:18px}
html[data-bf-edition=forest] dialog label,html[data-bf-edition=forest] dialog legend{color:var(--bf-cream)}
html[data-bf-edition=forest] .bookflip-view-switch,html[data-bf-edition=forest] .bf-view-switch{transition:background .2s ease}
@media(max-width:850px){.creator-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.bf-discover-masthead{grid-template-columns:1fr .65fr}}
@media(max-width:620px){html[data-bf-edition=forest] .wrap{width:calc(100% - 1.25rem)}html[data-bf-edition=forest] .header{justify-content:center;padding:.8rem 0}.header nav{width:100%;justify-content:center;gap:.2rem}.header nav a{padding:.5rem .58rem!important;font-size:.78rem!important}.bf-discover-masthead,.creator-hero{grid-template-columns:1fr}.bf-discover-mast-art{min-height:145px}.creator-play-art{width:170px}.creator-grid{grid-template-columns:1fr}.creator-post-visual{min-height:170px}.creator-section-heading{align-items:start;flex-direction:column}.discover-section{margin:2rem 0}.creator-tabs{margin:0 -.25rem}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{scroll-behavior:auto!important;transition:none!important;animation:none!important}}


/* v0.18.1 — app-first refinement */
html[data-bookflip-view=app] {
  --app-width: 32rem;
  --app-gutter: 1rem;
  --app-bar: 5.15rem;
  background: #0b1511;
  color: #f6f0df;
  color-scheme: dark;
  scroll-padding-bottom: calc(var(--app-bar) + env(safe-area-inset-bottom) + 1rem);
}
html[data-bookflip-view=app] body {
  width: min(100%, var(--app-width));
  min-height: 100dvh;
  margin-inline: auto;
  padding-bottom: calc(var(--app-bar) + env(safe-area-inset-bottom) + 1.25rem);
  background: #0b1511;
  color: #f6f0df;
  box-shadow: 0 0 70px #0008;
}
html[data-bookflip-view=app] .wrap { width: calc(100% - 2 * var(--app-gutter)); }
html[data-bookflip-view=app] .site {
  position: relative;
  z-index: 20;
  background: #101f18;
  color: #f6f0df;
  border: 0;
  border-bottom: 1px solid #ffffff16;
  box-shadow: 0 8px 26px #0004;
}
html[data-bookflip-view=app] .site .header {
  min-height: 3.9rem;
  padding: .65rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
}
html[data-bookflip-view=app] .wordmark {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  color: #f6f0df;
  font-size: 1.45rem;
}
html[data-bookflip-view=app] .wordmark img { width: 1.9rem; height: 1.9rem; }
html[data-bookflip-view=app] .bf-view-switch {
  padding: .35rem .62rem;
  color: #dce5d8;
  background: #ffffff08;
  border: 1px solid #ffffff27;
  font-size: .68rem;
}
html[data-bookflip-view=app] .site nav[aria-label="Main navigation"] {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  z-index: 60;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: stretch;
  gap: .1rem;
  width: min(100%, var(--app-width));
  min-height: var(--app-bar);
  padding: .4rem .3rem calc(.4rem + env(safe-area-inset-bottom));
  border-top: 1px solid #ffffff20;
  background: rgba(15, 29, 22, .97);
  color: #c6d1c5;
  box-shadow: 0 -12px 34px #0007;
  backdrop-filter: blur(18px);
}
html[data-bookflip-view=app] .site nav a {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .22rem;
  padding: .28rem .08rem;
  border-radius: .75rem;
  color: #c6d1c5;
  font-size: .64rem;
  font-weight: 720;
  line-height: 1.05;
  text-align: center;
  white-space: normal;
  text-decoration: none;
}
html[data-bookflip-view=app] .site nav a::before {
  content: '';
  display: block;
  flex: 0 0 auto;
  width: 1.22rem;
  height: 1.22rem;
  background: currentColor;
  mask: var(--app-icon) center / contain no-repeat;
}
html[data-bookflip-view=app] .site nav a[aria-current] {
  color: #f0d26c;
  background: #ffffff0b;
  text-decoration: none;
}
html[data-bookflip-view=app] [data-nav=discover] { --app-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='m15.7 8.3-2 5.4-5.4 2 2-5.4z'/%3E%3C/svg%3E"); }
html[data-bookflip-view=app] [data-nav=journal] { --app-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linejoin='round'%3E%3Cpath d='M6 4.5A2.5 2.5 0 0 1 8.5 2H20v18H8.5A2.5 2.5 0 0 1 6 17.5z'/%3E%3Cpath d='M6 5H4v14h2m4-12h5m-5 4h6'/%3E%3C/svg%3E"); }
html[data-bookflip-view=app] [data-nav=search] { --app-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.2'/%3E%3Cpath d='m15 15 4.5 4.5'/%3E%3C/svg%3E"); }
html[data-bookflip-view=app] [data-nav=connect] { --app-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='8' r='3'/%3E%3Cpath d='M3 20c0-3.3 2.7-5.5 6-5.5s6 2.2 6 5.5M16 5.5a3 3 0 0 1 0 5.8m2 3.2c1.9.8 3 2.6 3 5.5'/%3E%3C/svg%3E"); }
html[data-bookflip-view=app] [data-nav=clubs] { --app-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linejoin='round'%3E%3Cpath d='M20 6H4v11h5l3 3 3-3h5zM8 10h8m-8 3h5'/%3E%3C/svg%3E"); }
html[data-bookflip-view=app] #main {
  min-height: 55vh;
  padding: 1rem 0 2rem;
  overflow-wrap: anywhere;
}
html[data-bookflip-view=app] #main h1,
html[data-bookflip-view=app] #main h2,
html[data-bookflip-view=app] #main h3 { color: #f6f0df; }
html[data-bookflip-view=app] #main p,
html[data-bookflip-view=app] #main .lead { color: #c7d2c7; }
html[data-bookflip-view=app] #main .results,
html[data-bookflip-view=app] .bf-room-grid { grid-template-columns: minmax(0, 1fr); }
html[data-bookflip-view=app] .book,
html[data-bookflip-view=app] .tile,
html[data-bookflip-view=app] .panel,
html[data-bookflip-view=app] .discover-ranking li {
  background: #182b22;
  color: #f6f0df;
  border-color: #ffffff1c;
}
html[data-bookflip-view=app] .book h3,
html[data-bookflip-view=app] .book strong,
html[data-bookflip-view=app] .tile strong { color: #fff9e9; }
html[data-bookflip-view=app] .book p,
html[data-bookflip-view=app] .small,
html[data-bookflip-view=app] .tile p { color: #c2cec2; }
html[data-bookflip-view=app] input:not([type=checkbox]),
html[data-bookflip-view=app] select,
html[data-bookflip-view=app] textarea {
  background: #13241c;
  color: #fff9e9;
  border-color: #ffffff36;
}
html[data-bookflip-view=app] .footer { display: none; }
html[data-bookflip-view=app] dialog { background: #14251c; color: #f6f0df; border-color: #ffffff35; }

/* Discover: clean title first, cinematic featured reel second, then four clear shelves. */
.bf-discover-masthead {
  display: block;
  margin: .15rem 0 2rem;
  padding: 0;
  border: 0;
  border-radius: 0;
  overflow: visible;
  background: transparent;
  box-shadow: none;
}
.bf-discover-mast-copy {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: .3rem;
  padding: .5rem .3rem 1rem;
}
.bf-discover-mast-copy .eyebrow {
  margin: 0;
  color: #e8c65a;
  letter-spacing: .22em;
  font-size: .68rem;
}
.bf-discover-mast-copy h1 {
  margin: 0;
  max-width: none;
  color: #fff9e9;
  font: 800 clamp(2.4rem, 8vw, 3.7rem)/.98 Georgia, serif;
  letter-spacing: -.055em;
}
.bf-discover-hero-line { margin: .1rem 0 0; color: #c7d2c7; font-size: .92rem; }
.bf-featured-stage {
  position: relative;
  overflow: hidden;
  border: 1px solid #ffffff1e;
  border-radius: 1.2rem;
  padding: .9rem 0 .75rem;
  min-height: 14.5rem;
  background:
    radial-gradient(ellipse at 50% 0%, #456c51 0, transparent 62%),
    linear-gradient(135deg, #1a3327, #0d1913 76%);
  box-shadow: 0 18px 42px #0006;
}
.bf-featured-stage::before,
.bf-featured-stage::after {
  content: '';
  position: absolute;
  z-index: 2;
  top: 0;
  bottom: 0;
  width: 2.2rem;
  pointer-events: none;
}
.bf-featured-stage::before { left: 0; background: linear-gradient(90deg, #10221a, transparent); }
.bf-featured-stage::after { right: 0; background: linear-gradient(270deg, #10221a, transparent); }
.bf-featured-stage-top {
  display: flex;
  justify-content: space-between;
  gap: .6rem;
  padding: 0 1rem .7rem;
  color: #f0d26c;
  font-size: .58rem;
  font-weight: 900;
  letter-spacing: .15em;
}
.bf-featured-reel { overflow: hidden; width: 100%; }
.bf-featured-track { display: flex; width: max-content; }
.bf-featured-group { display: flex; flex: 0 0 auto; align-items: flex-start; gap: .8rem; padding: 0 .45rem; }
.bf-featured-book { flex: 0 0 6.7rem; width: 6.7rem; min-width: 0; }
.bf-featured-book .book-tile {
  display: block;
  width: 100%;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: .28rem .48rem .48rem .28rem;
  background: linear-gradient(145deg, #48624c, #17271f);
  box-shadow: 0 8px 18px #0007, inset .25rem 0 #ffffff17;
}
.bf-featured-book .book-tile img { width: 100%; height: 100%; object-fit: cover; }
.bf-featured-book-meta { display: grid; gap: .15rem; padding-top: .42rem; text-align: left; }
.bf-featured-book-meta strong {
  overflow: hidden;
  color: #fff9e9;
  font-size: .7rem;
  line-height: 1.15;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.bf-featured-book-meta span { overflow: hidden; color: #c1cdbf; font-size: .6rem; white-space: nowrap; text-overflow: ellipsis; }
.bf-featured-book-meta small { color: #efd36f; font-size: .6rem; }
.bf-featured-loading { margin: 1rem 1rem .3rem; color: #d1dbd0; font-size: .8rem; text-align: center; }
.bf-featured-reel.is-playing .bf-featured-track { animation: bf-featured-drift 64s linear infinite; }
.bf-featured-reel:hover .bf-featured-track,
.bf-featured-reel:focus-within .bf-featured-track { animation-play-state: paused; }
@keyframes bf-featured-drift { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.discover-section { margin: 2.1rem 0 2.6rem; }
.discover-section-heading {
  display: block;
  margin: 0 0 .9rem;
  padding: 0 0 .7rem;
  border-bottom: 1px solid #ffffff22;
}
.discover-section-heading h2 {
  margin: 0;
  max-width: 100%;
  color: #fff9e9;
  font: 750 clamp(1.35rem, 5.5vw, 1.8rem)/1.12 Georgia, serif;
  letter-spacing: -.035em;
  overflow-wrap: normal;
}
.discover-section-detail,
.discover-section .bf-edition-label { display: none !important; }
.bf-discover-book-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
.bf-discover-book-grid .book { min-width: 0; padding: .75rem; }
.discover-ranking { padding-left: 1.85rem; gap: .65rem; }
.discover-ranking li { padding: .75rem; }
.discover-ranking .book-tile { width: 3.8rem; }
@media (min-width: 680px) and (max-width: 1100px) {
  html[data-bookflip-view=app] { --app-width: 34rem; }
}
@media (max-width: 420px) {
  html[data-bookflip-view=app] { --app-gutter: .8rem; --app-bar: 4.9rem; }
  html[data-bookflip-view=app] .site nav a { font-size: .59rem; }
  .bf-featured-book { flex-basis: 6.1rem; width: 6.1rem; }
  .bf-featured-stage { min-height: 13.3rem; }
  .bf-discover-mast-copy h1 { font-size: 2.65rem; }
}
@media (prefers-reduced-motion: reduce) {
  .bf-featured-reel.is-playing .bf-featured-track { animation: none; }
}

html[data-bookflip-view=app] .bookflip-app-version {
  display: inline-flex;
  align-items: center;
  padding: .23rem .42rem;
  border: 1px solid #e8c65a55;
  border-radius: 999px;
  color: #efd36f;
  font-size: .56rem;
  font-weight: 850;
  letter-spacing: .08em;
}


/* v0.18.1 — app-first Discover polish */
html[data-bookflip-view=app] body{padding-bottom:calc(5.8rem + env(safe-area-inset-bottom))}
html[data-bookflip-view=app] .site{position:static;height:0;min-height:0;border:0;background:transparent;box-shadow:none;overflow:visible}
html[data-bookflip-view=app] .site .header{display:block;min-height:0;height:0;padding:0}
html[data-bookflip-view=app] .site .wordmark,
html[data-bookflip-view=app] .site .bookflip-app-version,
html[data-bookflip-view=app] .site .bf-view-switch{display:none!important}
html[data-bookflip-view=app] .site nav[aria-label="Main navigation"]{
 position:fixed;z-index:1000;left:50%;bottom:calc(.65rem + env(safe-area-inset-bottom));transform:translateX(-50%);
 width:min(34rem,calc(100% - 1.25rem));display:grid;grid-template-columns:repeat(5,minmax(0,1fr));
 gap:.2rem;padding:.5rem .4rem;border:1px solid #ffffff20;border-radius:22px;
 background:rgba(12,27,20,.96);box-shadow:0 12px 42px #0009;backdrop-filter:blur(22px)
}
html[data-bookflip-view=app] .site nav[aria-label="Main navigation"] a{
 min-width:0;min-height:3.1rem;display:flex;align-items:center;justify-content:center;
 padding:.35rem .15rem;border-radius:14px;color:#e3e9df;font-size:clamp(.58rem,2.2vw,.72rem);
 font-weight:750;line-height:1.15;text-align:center;white-space:normal
}
html[data-bookflip-view=app] .site nav[aria-label="Main navigation"] a[aria-current]{
 color:#18281f;background:#e8c65a;box-shadow:0 3px 12px #0004
}
html[data-bookflip-view=app] main{padding-top:.8rem;padding-bottom:1rem;min-height:0}
html[data-bookflip-view=app] main>.bf-discover-masthead{margin:.25rem 0 1.25rem}
html[data-bookflip-view=app] .footer{display:none}
html[data-bookflip-view=app] .bf-discover-masthead{
 display:flex;flex-direction:column;gap:.8rem;min-height:0;padding:1.15rem .85rem 1rem;
 margin:.25rem 0 1.25rem;border-radius:20px;text-align:center;
 background:linear-gradient(180deg,#19382b,#10231a 88%);box-shadow:0 14px 34px #0005
}
html[data-bookflip-view=app] .bf-discover-mast-copy{width:100%}
html[data-bookflip-view=app] .bf-discover-mast-copy h1{font:800 clamp(2.3rem,9vw,3.2rem)/.98 Georgia,serif;color:#fff8e9;margin:.2rem 0 .45rem;letter-spacing:-.055em}
html[data-bookflip-view=app] .bf-discover-mast-copy .eyebrow{color:#f2d879;font-size:.62rem;letter-spacing:.2em}
html[data-bookflip-view=app] .bf-discover-hero-line{color:#f0f2e9!important;font-size:.84rem;line-height:1.45;margin:.25rem auto .7rem;max-width:34ch}
html[data-bookflip-view=app] .bf-featured-stage{width:100%;min-width:0;padding:.75rem .65rem .55rem;border:1px solid #ffffff20;border-radius:16px;background:#0b1c14}
html[data-bookflip-view=app] .bf-featured-stage-top{display:flex;justify-content:space-between;gap:.5rem;color:#f2d879;font-size:.57rem;font-weight:900;letter-spacing:.12em}
html[data-bookflip-view=app] .bf-featured-reel{overflow:hidden}
html[data-bookflip-view=app] .bf-featured-book{width:clamp(5.4rem,24vw,7.2rem);flex:0 0 auto}
html[data-bookflip-view=app] .bf-featured-book .book-tile{width:100%;aspect-ratio:2/3}
html[data-bookflip-view=app] .bf-featured-book-meta strong{color:#fff8e9;font-size:.68rem}
html[data-bookflip-view=app] .bf-featured-book-meta span{color:#d5dfd3;font-size:.58rem}
html[data-bookflip-view=app] .bf-featured-book-meta small{color:#f2d879}
html[data-bookflip-view=app] .discover-section.bf-discover-shelf{
 margin:1.1rem 0 1.3rem;padding:1rem .8rem 1.05rem;border-radius:18px;
 background:#183328;border:1px solid #ffffff12;box-shadow:0 8px 24px #0003
}
html[data-bookflip-view=app] .discover-section-heading{margin:0 0 .75rem}
html[data-bookflip-view=app] .discover-section-heading h2{
 color:#fff8e9;font-size:clamp(1.45rem,6vw,1.9rem);line-height:1.06;letter-spacing:-.045em
}
html[data-bookflip-view=app] .bf-discover-shelf .bf-picks-rail{margin-top:.2rem}
html[data-bookflip-view=app] .bf-discover-shelf .bf-picks-viewport{overflow-x:auto;scrollbar-width:none}
html[data-bookflip-view=app] .bf-discover-shelf .bf-picks-viewport::-webkit-scrollbar{display:none}
html[data-bookflip-view=app] .bf-discover-shelf .bf-picks-set{gap:.65rem}
html[data-bookflip-view=app] .bf-discover-shelf button.bf-picks-cover{
 width:clamp(6.1rem,28vw,7.8rem);grid-template-rows:auto 1.55rem;gap:.35rem
}
html[data-bookflip-view=app] .bf-discover-shelf .book-tile{
 width:100%;aspect-ratio:2/3;border-radius:9px;background:#10251b;border:1px solid #ffffff24
}
html[data-bookflip-view=app] .bf-discover-shelf .bf-pick-rating{color:#fff8e9;font-size:.75rem}
html[data-bookflip-view=app] .bf-discover-shelf .bf-picks-controls{margin-top:.4rem}
html[data-bookflip-view=app] .bf-discover-shelf .bf-picks-controls button{background:#10251b;color:#fff8e9;border-color:#ffffff30}
html[data-bookflip-view=app] .bf-discover-shelf .bf-rating-source{display:none!important}
html[data-bookflip-view=app] .bf-discover-shelf .bf-discover-book-grid{display:none}
html[data-bookflip-view=app] .discover-section .discover-ranking{display:flex;overflow-x:auto}
html[data-bookflip-view=app] .bf-discover-shelf>a{display:inline-flex;margin-top:.7rem;color:#f2d879;font-weight:750}
@media(min-width:700px){
 html[data-bookflip-view=app] main{max-width:42rem;margin-inline:auto}
 html[data-bookflip-view=app] .bf-discover-shelf button.bf-picks-cover{width:8rem}
}


/* v0.18.3 — persistent bottom app navigation, independent of the hidden site header */
html[data-bookflip-view="app"] body {
  padding-bottom: calc(6.6rem + env(safe-area-inset-bottom)) !important;
}
html[data-bookflip-view="app"] .bf-bottom-nav {
  position: fixed !important;
  z-index: 9999 !important;
  left: 50% !important;
  bottom: 0 !important;
  transform: translateX(-50%) !important;
  width: min(100%, var(--app-width, 32rem)) !important;
  min-height: calc(4.65rem + env(safe-area-inset-bottom)) !important;
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  align-items: center !important;
  gap: .12rem !important;
  padding: .42rem .45rem calc(.42rem + env(safe-area-inset-bottom)) !important;
  margin: 0 !important;
  border: 0 !important;
  border-top: 1px solid rgba(255,255,255,.13) !important;
  border-radius: 0 !important;
  background: rgba(12,27,20,.97) !important;
  box-shadow: 0 -12px 34px rgba(0,0,0,.42) !important;
  backdrop-filter: blur(22px) !important;
  -webkit-backdrop-filter: blur(22px) !important;
}
html[data-bookflip-view="app"] .bf-bottom-nav a {
  display: flex !important;
  min-width: 0 !important;
  min-height: 3.55rem !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: .26rem !important;
  padding: .35rem .08rem !important;
  border: 0 !important;
  border-radius: 13px !important;
  background: transparent !important;
  color: #dce5d9 !important;
  font: 700 clamp(.56rem, 2.25vw, .7rem)/1.1 Inter, ui-sans-serif, system-ui, sans-serif !important;
  text-align: center !important;
  text-decoration: none !important;
  white-space: nowrap !important;
}
html[data-bookflip-view="app"] .bf-bottom-nav a[aria-current="page"] {
  color: #17291f !important;
  background: #e8c65a !important;
  box-shadow: 0 3px 12px rgba(0,0,0,.28) !important;
}
html[data-bookflip-view="app"] .bf-bottom-nav .bf-nav-icon {
  display: block !important;
  width: 1.22rem !important;
  height: 1.22rem !important;
  line-height: 0 !important;
}
html[data-bookflip-view="app"] .bf-bottom-nav svg {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 1.65 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
}
html[data-bookflip-view="web"] .bf-bottom-nav,
html:not([data-bookflip-view="app"]) .bf-bottom-nav { display: none !important; }
@media (min-width: 700px) {
  html[data-bookflip-view="app"] .bf-bottom-nav {
    width: min(100%, var(--app-width, 42rem)) !important;
  }
}

html[data-bf-edition=forest] .book-tile-placeholder{font:600 clamp(10px,2.4vw,16px)/1.2 system-ui,sans-serif;padding:.45rem;overflow-wrap:anywhere;white-space:normal;text-align:center;color:#f6f0df;background:#28483d;}

/* v0.22: a real two-leaf book, with the selected cover hinged at its spine. */
html[data-bf-edition=forest] .bf-book-dialog{width:min(43rem,calc(100% - 1.1rem));max-height:88dvh;padding:8px;background:#1a3027;color:#24372c;border:1px solid #6c8065;box-shadow:0 20px 70px #000b;border-radius:12px;overflow:auto;perspective:1200px}
html[data-bookflip-view=app] .bf-book-dialog{width:min(36rem,calc(100% - 1.1rem))}
.bf-book-dialog[open]{animation:bf-spread-arrive .72s cubic-bezier(.2,.8,.2,1) both}
.bf-book-dialog::backdrop{background:#07120cd4;backdrop-filter:blur(4px)}
.bf-book-dialog .bf-book-pages{position:relative;display:grid;grid-template-columns:55% 45%;overflow:visible;perspective:1100px;transform-style:preserve-3d;min-height:clamp(280px,48vh,420px);border-radius:7px;isolation:isolate}
html[data-bf-edition=forest] .bf-book-dialog .bf-book-page{padding:clamp(12px,3vw,24px);color:#24372c;min-height:0;animation:none;overflow-wrap:anywhere;box-sizing:border-box}
.bf-book-dialog .bf-book-left{background:linear-gradient(90deg,#f6efdb 0%,#fff9e9 7%,#f7efdb 89%,#b5a68a 100%);box-shadow:inset 4px 0 #e1d6b8}
.bf-book-dialog .bf-book-right{background:linear-gradient(90deg,#b3a486,#f7efdb 12%,#fff9e9 96%,#e0d4b8);display:flex;flex-direction:column;justify-content:center;gap:14px}
html[data-bf-edition=forest] .bf-book-dialog h2{color:#193328;font-size:clamp(18px,4vw,27px);line-height:1.13;margin:0 0 6px}
html[data-bf-edition=forest] .bf-book-dialog .bf-book-author{color:#56654e;font-size:clamp(11px,2.4vw,14px)}
html[data-bf-edition=forest] .bf-book-dialog .bf-book-summary{color:#26372c;font-family:Georgia,serif;font-size:clamp(13px,2.6vw,16px);line-height:1.52}
.bf-book-dialog a{color:#244b39!important;font-size:11px}
.bf-book-kicker{font-size:10px;letter-spacing:.11em;font-weight:700;color:#56654e;text-align:center}
html[data-bf-edition=forest] .bf-book-dialog .actions button{background:#234437;color:#fff9e8;border:1px solid #234437;min-height:44px;font-size:clamp(11px,2.6vw,14px);padding:8px 4px}
html[data-bf-edition=forest] .bf-book-dialog .actions button[aria-pressed=true]{background:#e8c65a;color:#142c27}
html[data-bf-edition=forest] .bf-book-dialog .book-save-status{color:#334f40;font-size:11px}
html[data-bf-edition=forest] .bf-book-dialog .bf-book-close{z-index:5;top:10px;right:10px;background:#fff9e9;color:#142c27;min-width:36px;min-height:36px;font-size:20px}
html[data-bf-edition=forest] .bf-book-dialog .bf-description-retry{background:transparent;color:#244b39;border:1px solid #567161;font-size:11px;margin-top:8px;padding:7px}
.bf-opening-jacket{position:absolute;inset:0 0 0 55%;transform-origin:left center;transform-style:preserve-3d;pointer-events:none;z-index:3;animation:bf-jacket-open .72s cubic-bezier(.22,.7,.25,1) both}
.bf-opening-front,.bf-opening-back{position:absolute;inset:0;backface-visibility:hidden;border-radius:2px 6px 6px 2px;box-shadow:4px 6px 12px #0005}
.bf-opening-front{background:#254637;color:#f6efdb;display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;padding:8px;overflow:hidden}
.bf-opening-front img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;background:#17382b}
.bf-opening-front strong{font:700 clamp(15px,4vw,24px) Georgia,serif}
.bf-opening-front span{font-size:11px;margin-top:8px}
.bf-opening-back{background:linear-gradient(90deg,#b3a486,#f7efdb 15%,#f7efdb);transform:rotateY(180deg)}
@keyframes bf-jacket-open{0%,12%{transform:rotateY(0);opacity:1}78%{transform:rotateY(-173deg);opacity:1}100%{transform:rotateY(-180deg);opacity:0}}
@keyframes bf-spread-arrive{0%{transform:scale(.88) translateY(12px)}100%{transform:none}}
.bf-book-dialog.bf-closing .bf-opening-jacket{animation:bf-jacket-close .46s ease-in both}
.bf-book-dialog.bf-closing{animation:bf-spread-close .46s ease-in both}
@keyframes bf-jacket-close{0%{transform:rotateY(-180deg);opacity:0}20%{opacity:1}100%{transform:rotateY(0);opacity:1}}
@keyframes bf-spread-close{to{transform:scale(.88) translateY(12px);opacity:.2}}
@media(prefers-reduced-motion:reduce){.bf-book-dialog[open],.bf-book-dialog.bf-closing{animation:none}.bf-opening-jacket{display:none}}

/* Reveal the inside spread as the jacket swings away from its starting center. */
.bf-book-dialog[open] .bf-book-left{animation:bf-paper-reveal .72s ease both}
@keyframes bf-paper-reveal{0%,14%{opacity:0}55%,100%{opacity:1}}
@keyframes bf-spread-arrive{0%{transform:translateX(-22%) scale(.91)}100%{transform:none}}
.bf-book-dialog.bf-closing .bf-book-left{animation:bf-paper-hide .46s ease both}
@keyframes bf-paper-hide{0%,45%{opacity:1}100%{opacity:0}}
@media(prefers-reduced-motion:reduce){.bf-book-dialog[open] .bf-book-left,.bf-book-dialog.bf-closing .bf-book-left{animation:none}}

/* Shared Discover and My Journal book spread. */
.bf-book-dialog.bf-shared-book-dialog[open] { animation: bf-shared-spread-in .24s ease-out both; }
.bf-book-dialog.bf-shared-book-dialog.bf-shared-book-closing { animation: bf-shared-spread-in .18s ease-in reverse both; }
html[data-bf-edition=forest] .bf-shared-book-dialog .bf-book-page { animation: none; }
.bf-shared-book-dialog .bf-book-pages { overflow: hidden; }
.bf-shared-book-dialog .actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  gap: .6rem;
}
.bf-shared-book-dialog .actions button {
  width: 100%;
  min-width: 0;
  white-space: normal;
}
html[data-bf-edition=forest] .bf-shared-book-dialog .actions button[data-edit-book] {
  background: #e8c65a;
  border-color: #e8c65a;
  color: #142c27;
}
html[data-bf-edition=forest] .bf-shared-book-dialog button.bf-book-close {
  position: absolute;
  inset-inline-end: 10px;
  padding: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid #6c8065;
}
@keyframes bf-shared-spread-in {
  from { opacity: 0; transform: scale(.96); }
  to { opacity: 1; transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .bf-book-dialog.bf-shared-book-dialog[open] { animation: none; }
}
