/* Mnory Books — books.<domain> */
:root {
  --bk-ink: #1d1b26;
  --bk-muted: #6b6879;
  --bk-paper: #faf7f2;
  --bk-card: #ffffff;
  --bk-line: #ebe6dd;
  --bk-accent: #7b3fe4;
  --bk-accent-2: #f59e0b;
  --bk-ok: #0f9d58;
  --bk-radius: 14px;
  --bk-shadow: 0 6px 24px rgba(29, 27, 38, .07);
}
[data-theme="dark"] {
  --bk-ink: #ece9f5;
  --bk-muted: #a7a3b8;
  --bk-paper: #14121b;
  --bk-card: #1d1a27;
  --bk-line: #2c2838;
  --bk-shadow: 0 6px 24px rgba(0, 0, 0, .35);
}
html, body { background: var(--bk-paper); color: var(--bk-ink); }
body { font-family: "Cairo", "Plus Jakarta Sans", system-ui, sans-serif; }
a { color: inherit; }
.text-muted, .bk-muted { color: var(--bk-muted) !important; }
.ms { font-family: "Material Symbols Outlined"; font-size: 1.25em; vertical-align: -.2em; line-height: 1; }

/* Header */
.bk-header { position: sticky; top: 0; z-index: 1030; background: color-mix(in srgb, var(--bk-paper) 88%, transparent);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--bk-line); }
.bk-brand { font-weight: 800; font-size: 1.25rem; text-decoration: none; display: flex; align-items: center; gap: .4rem; }
.bk-brand .dot { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--bk-accent), #c03fe4); color: #fff; }
.bk-nav a { text-decoration: none; padding: .45rem .8rem; border-radius: 999px; color: var(--bk-muted); font-weight: 600; }
.bk-nav a:hover, .bk-nav a.active { color: var(--bk-ink); background: var(--bk-line); }
.bk-search { max-width: 340px; }
.bk-search input { border-radius: 999px; background: var(--bk-card); border-color: var(--bk-line); color: var(--bk-ink); }

/* Buttons */
.btn-bk { background: var(--bk-accent); color: #fff; border: 0; border-radius: 999px; font-weight: 700; padding: .6rem 1.3rem; }
.btn-bk:hover { background: #6930cc; color: #fff; }
.btn-bk-outline { border: 1.5px solid var(--bk-accent); color: var(--bk-accent); border-radius: 999px; font-weight: 700; padding: .55rem 1.2rem; background: transparent; }
.btn-bk-outline:hover { background: var(--bk-accent); color: #fff; }
.btn-bk-ghost { border-radius: 999px; border: 1px solid var(--bk-line); background: var(--bk-card); color: var(--bk-ink); font-weight: 600; }

/* Hero */
.bk-hero { padding: 4rem 0 3rem; background:
  radial-gradient(1000px 400px at 85% -10%, rgba(123, 63, 228, .18), transparent 60%),
  radial-gradient(700px 300px at 0% 0%, rgba(245, 158, 11, .14), transparent 60%); }
.bk-hero h1 { font-weight: 900; font-size: clamp(2rem, 4.5vw, 3.4rem); line-height: 1.15; }
.bk-hero .lead { color: var(--bk-muted); font-size: 1.15rem; }
.bk-pill { display: inline-flex; gap: .35rem; align-items: center; padding: .3rem .8rem; border-radius: 999px;
  background: var(--bk-card); border: 1px solid var(--bk-line); font-size: .85rem; font-weight: 600; }

/* Sections & shelves */
.bk-section { padding: 2rem 0; }
.bk-section-title { font-weight: 800; font-size: 1.4rem; display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.bk-section-title a { font-size: .9rem; color: var(--bk-accent); text-decoration: none; font-weight: 700; }
.bk-shelf { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(150px, 170px); gap: 1rem;
  overflow-x: auto; padding-bottom: .75rem; scroll-snap-type: x mandatory; }
.bk-shelf > * { scroll-snap-align: start; }
.bk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 1.25rem; }

/* Book card */
.bk-card { text-decoration: none; display: block; }
.bk-cover { aspect-ratio: 2 / 3; border-radius: 10px; overflow: hidden; background: linear-gradient(160deg, #e9e2f8, #f6e8d6);
  box-shadow: var(--bk-shadow); position: relative; }
.bk-cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.bk-card:hover .bk-cover img { transform: scale(1.04); }
.bk-cover .fallback { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center;
  padding: 1rem; text-align: center; font-weight: 800; color: #3b2a63; }
.bk-cover .badges { position: absolute; top: 8px; inset-inline-start: 8px; display: flex; gap: 4px; flex-wrap: wrap; }
.bk-badge { font-size: .7rem; font-weight: 700; padding: .15rem .5rem; border-radius: 999px; background: rgba(0,0,0,.65); color: #fff; }
.bk-badge.audio { background: var(--bk-accent); }
.bk-badge.early { background: var(--bk-accent-2); color: #1d1b26; }
.bk-card-title { font-weight: 700; font-size: .95rem; margin: .55rem 0 .1rem; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bk-card-sub { font-size: .8rem; color: var(--bk-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bk-progress { height: 5px; border-radius: 99px; background: var(--bk-line); overflow: hidden; margin-top: .4rem; }
.bk-progress > span { display: block; height: 100%; background: var(--bk-accent); }

/* Panels */
.bk-panel { background: var(--bk-card); border: 1px solid var(--bk-line); border-radius: var(--bk-radius); box-shadow: var(--bk-shadow); padding: 1.25rem; }
.bk-field-chip { display: flex; align-items: center; gap: .6rem; padding: .9rem 1rem; border-radius: var(--bk-radius);
  background: var(--bk-card); border: 1px solid var(--bk-line); text-decoration: none; font-weight: 700; }
.bk-field-chip:hover { border-color: var(--bk-accent); }

/* Filters */
.bk-filters .form-label { font-weight: 700; font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; color: var(--bk-muted); margin-bottom: .2rem; }
.bk-filters .form-select, .bk-filters .form-control { border-radius: 10px; background-color: var(--bk-card); border-color: var(--bk-line); color: var(--bk-ink); }

/* Pricing */
.bk-plan { position: relative; height: 100%; }
.bk-plan.featured { border: 2px solid var(--bk-accent); }
.bk-plan .ribbon { position: absolute; top: -12px; inset-inline-end: 16px; background: var(--bk-accent); color: #fff;
  padding: .2rem .7rem; border-radius: 999px; font-size: .75rem; font-weight: 800; }
.bk-price { font-size: 2.4rem; font-weight: 900; }
.bk-price small { font-size: 1rem; color: var(--bk-muted); font-weight: 600; }
.bk-strike { text-decoration: line-through; color: var(--bk-muted); }
.bk-perks { list-style: none; padding: 0; margin: 1rem 0; }
.bk-perks li { padding: .3rem 0; display: flex; gap: .5rem; }
.bk-perks li::before { content: "check_circle"; font-family: "Material Symbols Outlined"; color: var(--bk-ok); }

/* Detail */
.bk-detail-cover { max-width: 300px; }
.bk-meta { display: flex; flex-wrap: wrap; gap: .5rem; }
.bk-meta span { background: var(--bk-card); border: 1px solid var(--bk-line); border-radius: 999px; padding: .25rem .75rem; font-size: .85rem; }
.bk-chapter-list a { display: flex; justify-content: space-between; padding: .6rem .2rem; border-bottom: 1px dashed var(--bk-line); text-decoration: none; }

/* Reader */
.bk-reader { --reader-size: 1.15rem; --reader-bg: var(--bk-paper); }
.bk-reader[data-tone="sepia"] { --reader-bg: #f4ecd8; --bk-ink: #3b2f1e; }
.bk-reader[data-tone="night"] { --reader-bg: #101014; --bk-ink: #d8d4e6; }
.bk-reader-body { background: var(--reader-bg); color: var(--bk-ink); min-height: 70vh; position: relative;
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.bk-reader-text { max-width: 720px; margin: 0 auto; padding: 2.5rem 1.25rem 6rem; font-size: var(--reader-size); line-height: 1.85; font-family: Georgia, "Amiri", "Cairo", serif; }
.bk-reader-text p { margin-bottom: 1.1em; text-align: justify; }
.bk-reader-text h1, .bk-reader-text h2, .bk-reader-text h3 { font-family: "Cairo", sans-serif; font-weight: 800; margin: 1.5em 0 .8em; }
.bk-wm { display: block; text-align: center; font-size: .7rem; opacity: .35; margin: 1.2em 0; letter-spacing: .05em; }
.bk-wm-overlay { pointer-events: none; position: fixed; inset: 0; z-index: 5; opacity: .045; overflow: hidden;
  font-size: 15px; font-weight: 700; line-height: 6; word-spacing: 4rem; transform: rotate(-24deg) scale(1.6); white-space: normal; }
.bk-reader-bar { position: sticky; top: 64px; z-index: 10; background: var(--bk-card); border-bottom: 1px solid var(--bk-line); }
.bk-reader-progress { height: 3px; background: var(--bk-accent); width: 0; transition: width .2s; }
@media print { .bk-reader-body, .bk-reader-text { display: none !important; } body::after { content: "Printing is disabled."; } }

/* Player */
.bk-player { position: sticky; bottom: 0; background: var(--bk-card); border-top: 1px solid var(--bk-line); }
.bk-track { display: flex; justify-content: space-between; align-items: center; padding: .7rem .9rem; border-radius: 10px; cursor: pointer; }
.bk-track:hover, .bk-track.active { background: var(--bk-line); }
.bk-track.locked { opacity: .5; cursor: not-allowed; }

/* Vault */
.bk-vault-nav a { display: flex; align-items: center; gap: .6rem; padding: .65rem .9rem; border-radius: 10px; text-decoration: none; font-weight: 600; color: var(--bk-muted); }
.bk-vault-nav a.active, .bk-vault-nav a:hover { background: var(--bk-card); color: var(--bk-ink); box-shadow: var(--bk-shadow); }
.bk-vault-nav a.active .ms { color: var(--bk-accent); }
.bk-stat { font-size: 2rem; font-weight: 900; }
.bk-vault-hero { border-radius: var(--bk-radius); padding: 1.5rem; color: #fff; background: linear-gradient(135deg, #2c1a52, #7b3fe4 60%, #c03fe4); }
.bk-countdown { font-weight: 800; color: var(--bk-accent-2); }
.bk-tabs .nav-link { border-radius: 999px; font-weight: 700; color: var(--bk-muted); }
.bk-tabs .nav-link.active { background: var(--bk-ink); color: var(--bk-paper); }

/* Footer */
.bk-footer { border-top: 1px solid var(--bk-line); padding: 2.5rem 0; margin-top: 3rem; color: var(--bk-muted); }
.bk-footer a { color: var(--bk-muted); text-decoration: none; }
.bk-footer a:hover { color: var(--bk-ink); }

/* Certificate */
.bk-cert { max-width: 900px; margin: 2rem auto; padding: 3rem; background: #fff; color: #1d1b26; border: 10px double #c9a227; text-align: center; }
.bk-cert h1 { font-family: Georgia, serif; font-size: 2.6rem; }
@media print { .bk-header, .bk-footer, .no-print { display: none !important; } .bk-cert { margin: 0; } }

/* Screen-capture deterrent (reader): text blurs while the page is unfocused */
.bk-reader.bk-shield .bk-reader-text { filter: blur(14px); transition: filter .05s; }
.bk-reader .bk-reader-text { transition: filter .25s; }
