/* Wilayat Waves web portal.
   The family look of wilayatwaves.com: malachite night, gold for honour, Fraunces for titles, Manrope for reading.
   Each cover lights its own page, so the colour comes from the books and not from decoration. */
:root {
    --bg: #07120D; --bg-2: #0B1913; --card: #0F1E18; --card-2: #152820; --surface: #1C3029; --surface-2: #294036;
    --pri: #4CB17A; --mint: #52DF81; --alt: #C1CA8E; --gold: #E0BC6A; --gold-soft: #F0DBA2;
    --grad: linear-gradient(135deg, #52DF81, #C1CA8E);
    --tx: #F8F4E8; --tx-2: #C9CFC2; --tx-3: #93A096; --line: rgba(240, 235, 215, .1); --line-2: rgba(240, 235, 215, .2); --err: #E53935;
    --acc: #52DF81; --tint: 76, 177, 122;
    --gutter: 18px; --top: 0px; --tabs: calc(80px + env(safe-area-inset-bottom)); --mini: 0px;
    --ease: cubic-bezier(.2, .8, .2, 1); --spring: cubic-bezier(.34, 1.56, .64, 1);
    --display: Fraunces, Georgia, serif; --body: Manrope, system-ui, sans-serif; --arabic: Amiri, serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); color-scheme: dark; -webkit-text-size-adjust: 100%; scrollbar-color: var(--surface-2) transparent; scroll-behavior: auto; }
body { margin: 0; min-height: 100svh; font: 500 15px/1.55 var(--body); color: var(--tx); background: var(--bg); overscroll-behavior-y: none; -webkit-tap-highlight-color: transparent; touch-action: manipulation; -webkit-font-smoothing: antialiased; overflow-x: clip; }
body.has-mini { --mini: 70px; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, h4, p { margin: 0; }
i { font-style: normal; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 8px; }
.view:focus { outline: 0; }
.skip { position: fixed; top: -60px; left: 12px; z-index: 300; padding: 10px 14px; border-radius: 10px; background: var(--pri); color: #06140c; font-weight: 700; }
.skip:focus { top: 12px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.ms { font: normal 24px/1 'Material Symbols Rounded'; display: inline-block; flex: none; width: 1em; height: 1em; overflow: hidden; white-space: nowrap; font-feature-settings: 'liga'; font-variation-settings: 'FILL' 0; }
.ms.fill { font-variation-settings: 'FILL' 1; }
html:not(.icons-ready) body[data-signed-in] .ms { visibility: hidden; }

#progress { position: fixed; inset: 0 0 auto; z-index: 250; height: 3px; background: var(--grad); transform: scaleX(0); transform-origin: left; opacity: 0; transition: transform .4s var(--ease), opacity .3s; }
#progress.is-on { opacity: 1; }
#ambient { position: fixed; inset: 0; z-index: -2; pointer-events: none; overflow: hidden; }
#ambient i { position: absolute; inset: -10% -10% auto; height: 80svh; opacity: 0; transition: opacity 1s ease; background: radial-gradient(70% 70% at 50% 0, rgba(var(--c, 76, 177, 122), .3), transparent 72%); }
#ambient i.is-on { opacity: 1; }
#field { position: fixed; inset: 0; z-index: -1; width: 100%; height: 100%; pointer-events: none; opacity: .55; }
.grain { position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .04; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E"); }
.view { min-height: 100svh; padding: var(--top) 0 calc(var(--tabs) + var(--mini) + 28px); }
.view.is-leaving { opacity: .4; transition: opacity .15s; }
.view.is-entering { animation: enter .4s var(--ease); }
@keyframes enter { from { opacity: 0; transform: translate3d(0, 12px, 0); } }
.wrap { width: 100%; padding-inline: var(--gutter); }
.wrap.doc > * { max-width: 860px; }
.topnav { display: none; }

/* ---- Phone tab bar ---- */
.tabs { position: fixed; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 60; display: grid; grid-template-columns: repeat(5, 1fr); height: 64px; padding: 0 4px; border-radius: 24px; background: rgba(14, 28, 22, .88); box-shadow: 0 16px 40px rgba(0, 0, 0, .6), inset 0 0 0 1px var(--line-2); backdrop-filter: blur(26px) saturate(1.5); -webkit-backdrop-filter: blur(26px) saturate(1.5); view-transition-name: tabs; }
.tabs a { position: relative; z-index: 1; display: grid; align-content: center; justify-items: center; gap: 3px; font-size: 10.5px; font-weight: 700; line-height: 1; color: rgba(248, 244, 232, .58); transition: color .25s; }
.tabs .ms { font-size: 24px; transition: transform .3s var(--spring); }
.tabs a.is-on { color: var(--mint); }
.tabs a.is-on .ms { transform: translateY(-1px) scale(1.08); font-variation-settings: 'FILL' 1; }
.tabs a:active .ms { transform: scale(.82); }
.tabs-glow { position: absolute; top: 6px; bottom: 6px; left: calc(4px + (100% - 8px) / 5 * var(--tab, 0)); width: calc((100% - 8px) / 5); border-radius: 18px; background: rgba(82, 223, 129, .14); transition: left .42s var(--ease), opacity .2s; }

/* ---- Pieces ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 24px; border-radius: 14px; font-weight: 800; font-size: 15px; white-space: nowrap; transition: transform .18s var(--spring), background .2s, box-shadow .2s, opacity .2s; }
.btn:active { transform: scale(.96); }
.btn-primary { color: #05140C; background: var(--mint); box-shadow: 0 14px 34px rgba(82, 223, 129, .28); }
.btn-primary:hover { background: #6BEA97; box-shadow: 0 18px 44px rgba(82, 223, 129, .42); }
.btn-ghost { background: rgba(255, 255, 255, .1); box-shadow: inset 0 0 0 1px var(--line-2); }
.btn-ghost:hover { background: rgba(255, 255, 255, .17); }
.btn-danger { color: #fff; background: var(--err); }
.btn[disabled] { opacity: .5; pointer-events: none; }
.icon-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 13px; color: var(--tx-2); transition: background .2s, transform .18s var(--spring), color .2s; }
.icon-btn:hover { background: rgba(255, 255, 255, .09); color: #fff; }
.icon-btn:active { transform: scale(.88); }
.icon-btn.boxed { background: rgba(255, 255, 255, .08); color: #fff; box-shadow: inset 0 0 0 1px var(--line); }
.icon-btn.is-on { color: var(--mint); }
.glass-btn { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; color: #fff; background: rgba(5, 14, 10, .5); box-shadow: inset 0 0 0 1px var(--line-2); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); transition: transform .18s var(--spring), background .2s; }
.glass-btn:hover { background: rgba(5, 14, 10, .75); }
.glass-btn:active { transform: scale(.88); }
.page-top { display: flex; align-items: center; gap: 10px; min-height: 72px; padding-top: env(safe-area-inset-top); }
.page-top h1 { flex: 1; min-width: 0; font: 600 34px/1.08 var(--display); letter-spacing: -.8px; }
.page-actions { display: flex; gap: 8px; }
.page-intro { max-width: 72ch; margin-bottom: 14px; }
.sec { margin-top: 36px; }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; margin: 0 0 14px; }
.sec-head small { display: block; font-size: 13px; font-weight: 700; color: var(--gold); }
.sec-head h2 { font: 600 25px/1.15 var(--display); letter-spacing: -.4px; }
.sec-link { flex: none; font-size: 14px; font-weight: 700; color: var(--mint); }
.sec-link:hover { color: var(--gold-soft); }
.field { display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 16px; border-radius: 14px; background: rgba(255, 255, 255, .07); box-shadow: inset 0 0 0 1px var(--line); color: var(--tx-3); transition: box-shadow .2s, background .2s; }
.field:focus-within { box-shadow: inset 0 0 0 2px var(--mint); background: rgba(255, 255, 255, .09); color: var(--mint); }
.field input { flex: 1; min-width: 0; height: 100%; background: none; border: 0; outline: 0; font-size: 15px; font-weight: 500; color: #fff; }
.field input::placeholder { color: var(--tx-3); }
.field input::-webkit-search-cancel-button { display: none; }
.field .pw-eye { display: grid; color: var(--tx-3); }
.chips { display: flex; gap: 8px; margin: 0 calc(var(--gutter) * -1); padding: 2px var(--gutter); overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; scroll-padding-inline: var(--gutter); }
.chips::-webkit-scrollbar, .rail::-webkit-scrollbar, .seg::-webkit-scrollbar, .stage-thumbs::-webkit-scrollbar, .shelf::-webkit-scrollbar { display: none; }
.chip { flex: none; scroll-snap-align: start; padding: 9px 16px; border-radius: 12px; font-size: 13.5px; font-weight: 700; white-space: nowrap; color: var(--tx-2); background: rgba(255, 255, 255, .07); transition: background .2s, color .2s, transform .18s var(--spring); }
.chip:hover { color: #fff; background: rgba(255, 255, 255, .13); }
.chip:active { transform: scale(.95); }
.chip.is-on { color: #05140C; background: var(--mint); }
.chip small { font-size: 11.5px; opacity: .65; }
.seg { display: flex; gap: 2px; padding: 4px; border-radius: 15px; background: rgba(255, 255, 255, .06); overflow-x: auto; scrollbar-width: none; }
.seg button, .seg a { flex: 1 0 auto; padding: 10px 18px; border-radius: 11px; font-size: 14px; font-weight: 700; text-align: center; white-space: nowrap; color: var(--tx-2); transition: color .2s, background .2s; }
.seg button:hover, .seg a:hover { color: #fff; }
.seg .is-on, .seg .is-on:hover { color: #05140C; background: var(--acc); }
.empty { display: grid; justify-items: center; gap: 8px; padding: 56px 20px; text-align: center; }
.empty-icon { display: grid; place-items: center; width: 80px; height: 80px; margin-bottom: 8px; border-radius: 26px; color: var(--mint); background: rgba(82, 223, 129, .1); }
.empty-icon .ms { font-size: 36px; }
.empty h3 { font: 600 23px var(--display); }
.empty p { max-width: 380px; color: var(--tx-3); }
.empty .btn { margin-top: 12px; }
.card { padding: 20px; border-radius: 22px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }

/* ---- A real book ---- */
.b3d { --w: 240px; --d: calc(var(--w) * .1); --rx: 0deg; --ry: -24deg; display: block; width: var(--w); aspect-ratio: 5 / 7; perspective: 1400px; }
.b3d-in { position: relative; display: block; width: 100%; height: 100%; transform-style: preserve-3d; transform: rotateX(var(--rx)) rotateY(var(--ry)); transition: transform .55s var(--ease); }
.b3d-front, .b3d-back, .b3d-spine, .b3d-pages { position: absolute; backface-visibility: hidden; }
.b3d-front { inset: 0; overflow: hidden; border-radius: 2px 6px 6px 2px; transform: translateZ(calc(var(--d) / 2)); background: var(--surface); }
.b3d-front img { width: 100%; height: 100%; object-fit: cover; }
.b3d-front::after { content: ''; position: absolute; inset: 0 auto 0 0; width: 6%; background: linear-gradient(90deg, rgba(0, 0, 0, .3), rgba(255, 255, 255, .14) 60%, rgba(0, 0, 0, .16)); }
.b3d-glare { position: absolute; inset: 0; z-index: 2; background: radial-gradient(70% 70% at var(--gx, 30%) var(--gy, 12%), rgba(255, 255, 255, .22), transparent 62%); mix-blend-mode: screen; pointer-events: none; }
.b3d-shade { position: absolute; inset: 0; z-index: 3; background: #030705; opacity: calc(var(--a, 0) * .22); transition: opacity .7s; pointer-events: none; }
.b3d-back { inset: 0; border-radius: 6px 2px 2px 6px; background: #1b1b16; transform: translateZ(calc(var(--d) / -2)) rotateY(180deg); }
.b3d-spine { top: 0; bottom: 0; left: calc(var(--d) / -2); width: var(--d); background: linear-gradient(90deg, rgba(0, 0, 0, .6), rgb(var(--tint)) 45%, rgba(0, 0, 0, .35)); transform: rotateY(-90deg); }
.b3d-spine em { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 8px 0; font: 600 calc(var(--d) * .36)/1 var(--display); font-style: normal; color: #fff; white-space: nowrap; overflow: hidden; writing-mode: vertical-rl; text-shadow: 0 1px 2px rgba(0, 0, 0, .7); }
.b3d-pages { top: 3px; bottom: 3px; right: calc(var(--d) / -2 + 3px); width: var(--d); background: repeating-linear-gradient(90deg, #EFE8D2 0 1px, #C4BBA0 1px 2px); transform: rotateY(90deg); }

/* ---- Book tiles ---- */
.rail-wrap { position: relative; }
.rail-arrow { display: none; }
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: 138px; gap: 14px; margin: 0 calc(var(--gutter) * -1); padding: 6px var(--gutter) 14px; overflow-x: auto; scroll-snap-type: x proximity; scroll-padding-inline: var(--gutter); scrollbar-width: none; }
.rail > * { scroll-snap-align: start; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 14px; }
.bk { display: block; min-width: 0; perspective: 900px; }
.bk-cover { --rx: 0deg; --ry: 0deg; position: relative; display: block; aspect-ratio: 5 / 7; border-radius: 10px; overflow: hidden; background: var(--surface); box-shadow: 0 14px 28px rgba(0, 0, 0, .5); transform: rotateX(var(--rx)) rotateY(var(--ry)); transition: transform .35s var(--ease), box-shadow .35s; }
.bk:active .bk-cover { transform: scale(.95); }
.bk-cover img { width: 100%; height: 100%; object-fit: cover; }
.bk-glare { position: absolute; inset: 0; z-index: 2; opacity: 0; background: radial-gradient(60% 60% at var(--gx, 50%) var(--gy, 0), rgba(255, 255, 255, .28), transparent 65%); mix-blend-mode: screen; pointer-events: none; transition: opacity .25s; }
.cover-empty { display: grid; place-items: center; height: 100%; color: var(--tx-3); }
.bk-badge { position: absolute; top: 8px; left: 8px; z-index: 3; padding: 3px 8px; border-radius: 6px; font-size: 11px; font-weight: 800; color: #1A1305; background: var(--gold-soft); }
.bk-progress { position: absolute; inset: auto 0 0; z-index: 3; height: 4px; background: rgba(0, 0, 0, .5); }
.bk-progress b { display: block; height: 100%; background: var(--mint); }
.bk-play { position: absolute; right: 10px; bottom: 10px; z-index: 3; display: none; place-items: center; width: 48px; height: 48px; border-radius: 50%; color: #05140C; background: var(--mint); box-shadow: 0 10px 24px rgba(0, 0, 0, .55); opacity: 0; transform: translate3d(0, 10px, 0) scale(.8); transition: opacity .2s, transform .3s var(--spring); }
.bk-play .ms { font-size: 28px; font-variation-settings: 'FILL' 1; }
.bk-title { display: -webkit-box; margin-top: 10px; font-size: 14px; font-weight: 700; line-height: 1.3; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bk-author { display: block; margin-top: 2px; font-size: 12.5px; font-weight: 500; color: var(--tx-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bk-tag { display: flex; align-items: center; gap: 4px; order: 3; margin-top: 4px; font-size: 12px; font-weight: 600; color: var(--pri); }
.bk-tag .ms { font-size: 14px; }
.bk { display: flex; flex-direction: column; }
.bk > .bk-cover { order: 0; }
.bk > .bk-title { order: 1; }
.bk > .bk-author { order: 2; }
@media (hover: hover) {
    .bk:hover .bk-cover { box-shadow: 0 30px 50px rgba(0, 0, 0, .7), 0 0 0 2px rgba(240, 219, 162, .55); transform: rotateX(var(--rx)) rotateY(var(--ry)) translateY(-6px) scale(1.03); }
    .bk:hover .bk-glare { opacity: 1; }
    .bk:hover .bk-play { opacity: 1; transform: none; }
    .bk-play { display: grid; }
    .bk:hover .bk-title { color: var(--gold-soft); }
}
.row { display: flex; align-items: center; gap: 14px; padding: 8px; border-radius: 14px; transition: background .2s; }
.row:hover { background: rgba(255, 255, 255, .06); }
.row-cover { flex: none; width: 52px; height: 72px; border-radius: 8px; overflow: hidden; background: var(--surface); }
.row-cover img { width: 100%; height: 100%; object-fit: cover; }
.row-main { flex: 1; min-width: 0; display: grid; gap: 2px; }
.row-main strong { font-size: 15px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-main small { font-size: 13px; color: var(--tx-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-go { color: var(--tx-3); font-size: 13px; }
.rows { display: grid; gap: 2px; }

/* ---- Home: the billboard ---- */
.home-top { position: relative; z-index: 5; display: flex; align-items: center; gap: 8px; min-height: 68px; padding-top: env(safe-area-inset-top); }
.home-top img { width: 42px; height: 42px; border-radius: 12px; }
.home-hello { flex: 1; min-width: 0; line-height: 1.2; }
.home-hello small { display: block; font-size: 12.5px; font-weight: 600; color: var(--gold-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.home-hello strong { display: block; font: 600 20px var(--display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.notif-btn { position: relative; }
.dot { position: absolute; top: 9px; right: 9px; width: 9px; height: 9px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 8px var(--mint); }
.stage { position: relative; isolation: isolate; margin: -68px calc(var(--gutter) * -1) 0; padding: 68px var(--gutter) 0; overflow: hidden; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.stage-bg { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
.stage-bg img { position: absolute; inset: -8%; width: 116%; height: 116%; max-width: none; object-fit: cover; filter: blur(34px) saturate(1.5) brightness(.72); opacity: 0; transform: scale(1.06); transition: opacity 1.1s ease, transform 7s linear; }
.stage-bg img.is-on { opacity: 1; transform: scale(1.18); }
.stage-bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(7, 18, 13, .35), rgba(7, 18, 13, .2) 40%, var(--bg) 96%); }
.stage-inner { position: relative; display: flex; flex-direction: column; }
.stage-floor { position: relative; order: 1; height: min(86vw, 390px); perspective: 1300px; }
.stage-info { position: relative; order: 2; z-index: 21; min-height: 190px; text-align: center; }
.stage-book { --o: 0; --a: 0; --r: 0deg; --w: min(52vw, 235px); --sx: min(30vw, 150px); --sz: 150px; position: absolute; left: 50%; top: 50%; z-index: calc(20 - var(--a)); width: var(--w); margin-left: calc(var(--w) / -2); transform: translate3d(calc(var(--o) * var(--sx)), -50%, calc(var(--a) * var(--sz) * -1)) rotateY(var(--r)); transition: transform .8s var(--ease), opacity .5s; transform-style: preserve-3d; cursor: pointer; }
.stage-book .b3d { --w: inherit; width: 100%; --ry: 0deg; perspective: none; transform-style: preserve-3d; }
.stage-book img { pointer-events: none; -webkit-user-drag: none; }
.stage-book.is-off { opacity: 0; pointer-events: none; }
.stage-book.is-on { filter: drop-shadow(0 34px 34px rgba(0, 0, 0, .6)); }
.stage-slide { display: none; }
.stage-slide.is-on { display: block; animation: rise .6s var(--ease); }
@keyframes rise { from { opacity: 0; transform: translate3d(0, 18px, 0); } }
.stage-rank { display: inline-flex; align-items: center; gap: 5px; padding: 5px 12px; border-radius: 10px; font-size: 12.5px; font-weight: 800; color: #1A1305; background: var(--gold-soft); }
.stage-rank .ms { font-size: 15px; font-variation-settings: 'FILL' 1; }
.stage-title { margin-top: 10px; font: 600 33px/1.08 var(--display); letter-spacing: -.8px; }
.stage-meta { margin-top: 8px; font-size: 14px; font-weight: 600; color: var(--tx); }
.stage-desc { display: none; }
.stage-cta { display: flex; justify-content: center; gap: 8px; margin-top: 16px; }
.stage-cta .btn-primary { flex: 1; max-width: 240px; }
.stage-more { display: none; }
.stage-add { display: grid; place-items: center; flex: none; width: 50px; height: 50px; border-radius: 14px; background: rgba(255, 255, 255, .13); box-shadow: inset 0 0 0 1px var(--line-2); transition: transform .18s var(--spring), color .2s, background .2s; }
.stage-add:hover { background: rgba(255, 255, 255, .22); }
.stage-add:active { transform: scale(.88); }
.stage-add.is-on { color: var(--mint); }
.stage-thumbs { position: relative; z-index: 22; display: flex; justify-content: center; gap: 8px; margin: 18px calc(var(--gutter) * -1) 0; padding: 4px var(--gutter) 8px; overflow-x: auto; scrollbar-width: none; }
.stage-thumb { position: relative; flex: none; width: 38px; height: 53px; border-radius: 6px; overflow: hidden; opacity: .55; transition: opacity .3s, transform .3s var(--ease), box-shadow .3s; }
.stage-thumb img { width: 100%; height: 100%; object-fit: cover; }
.stage-thumb:hover { opacity: .9; }
.stage-thumb.is-on { opacity: 1; transform: translateY(-3px); box-shadow: 0 0 0 2px var(--gold-soft); }
.stage-thumb i { position: absolute; inset: auto 0 0; height: 3px; background: var(--mint); transform: scaleX(0); transform-origin: left; }
.stage-thumb.is-on i { animation: thumb-time 6.5s linear forwards; }
@keyframes thumb-time { to { transform: scaleX(1); } }

/* Daily wisdom beneath an arch */
.bento { display: grid; gap: 12px; margin-top: 36px; }
.wisdom { position: relative; padding: 26px 22px; border-radius: 24px; overflow: hidden; text-align: center; background: radial-gradient(90% 90% at 50% 0, rgba(224, 188, 106, .2), transparent 70%), linear-gradient(170deg, #14352A, #0B1913); box-shadow: inset 0 0 0 1px rgba(224, 188, 106, .3); }
.wisdom-arch { position: absolute; left: 50%; top: 12px; bottom: -50%; width: min(86%, 620px); translate: -50% 0; border-radius: 999px 999px 0 0; box-shadow: inset 0 0 0 1px rgba(240, 219, 162, .22), inset 0 0 0 9px rgba(7, 18, 13, .16), inset 0 0 0 10px rgba(240, 219, 162, .12); pointer-events: none; }
.wisdom > *:not(.wisdom-arch) { position: relative; }
.wisdom small { font-size: 13px; font-weight: 700; color: var(--gold); }
.wisdom .ar { margin: 12px 0; font: 700 31px/1.7 var(--arabic); color: var(--gold-soft); direction: rtl; }
.wisdom blockquote { margin: 0 auto; max-width: 56ch; font: 500 19px/1.45 var(--display); }
.wisdom footer { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 12px; font-size: 13px; color: var(--tx-3); }
.occasion { display: flex; gap: 14px; align-items: center; padding: 18px; border-radius: 22px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.occasion .ar { display: block; margin-bottom: 2px; font: 700 17px var(--arabic); color: var(--gold-soft); }
.occasion strong { display: block; font: 600 19px/1.25 var(--display); }
.occasion p { margin-top: 2px; font-size: 13.5px; color: var(--tx-3); }
.occasion-icon { flex: none; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; color: var(--gold-soft); background: rgba(224, 188, 106, .14); }
.ask-card { display: block; padding: 20px; border-radius: 22px; background: linear-gradient(120deg, rgba(76, 177, 122, .24), rgba(193, 202, 142, .08)); box-shadow: inset 0 0 0 1px rgba(76, 177, 122, .3); transition: transform .25s var(--ease); }
.ask-card:hover { transform: translateY(-3px); }
.ask-card h3 { display: flex; align-items: center; gap: 8px; font: 600 21px var(--display); }
.ask-card h3 .ms { color: var(--gold-soft); }
.ask-card p { margin: 4px 0 12px; font-size: 14px; color: var(--tx-2); }

.rail-continue { grid-auto-columns: 292px; }
.cont { display: flex; align-items: center; gap: 14px; padding: 10px; border-radius: 18px; text-align: left; background: var(--card-2); box-shadow: inset 0 0 0 1px var(--line); transition: background .2s, transform .2s var(--ease); }
.cont:hover { background: var(--surface); transform: translateY(-3px); }
.cont-cover { flex: none; width: 66px; height: 92px; border-radius: 9px; overflow: hidden; box-shadow: 0 8px 18px rgba(0, 0, 0, .45); }
.cont-cover img { width: 100%; height: 100%; object-fit: cover; }
.cont-main { flex: 1; min-width: 0; display: grid; gap: 3px; }
.cont-main strong { font-size: 15px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cont-main small { font-size: 13px; color: var(--tx-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.meter { display: block; height: 5px; margin-top: 6px; border-radius: 3px; background: rgba(255, 255, 255, .13); overflow: hidden; }
.meter b { display: block; height: 100%; border-radius: inherit; background: var(--mint); transition: width .7s var(--ease); }
.cont-play { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; color: #05140C; background: var(--mint); }
.rail-top { grid-auto-columns: 172px; }
.top { position: relative; display: block; padding-left: 54px; }
.top-num { position: absolute; left: -4px; bottom: 44px; z-index: 0; font: 700 128px/.8 var(--display); letter-spacing: -8px; color: var(--bg); -webkit-text-stroke: 2px var(--gold); }
.top .bk-cover { z-index: 1; }
.top strong { display: block; margin-top: 10px; font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top small { display: block; font-size: 12.5px; color: var(--tx-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rail-people { grid-auto-columns: 112px; }
.banner { display: block; border-radius: 22px; overflow: hidden; aspect-ratio: 16 / 7; background: var(--surface); }
.banner img { width: 100%; height: 100%; object-fit: cover; }
.cat-panel { animation: rise .45s var(--ease); }
.sub-chips { margin-top: 10px; margin-bottom: 8px; }

/* ---- Shelves ---- */
.shelf { display: flex; align-items: flex-end; padding: 26px var(--gutter) 0; margin: 0 calc(var(--gutter) * -1); overflow-x: auto; scrollbar-width: none; }
.shelf-book { --w: 116px; position: relative; flex: none; width: calc(var(--w) * .48); height: calc(var(--w) * 1.4); perspective: 900px; transition: width .45s var(--ease); z-index: 1; }
.shelf-book .b3d { --d: 26px; --ry: 54deg; width: var(--w); }
.shelf-book .b3d-in { transform-origin: 0 50%; }
.shelf-book .b3d-glare { opacity: .4; }
@media (hover: hover) {
    .shelf-book:hover, .shelf-book:focus-visible { width: var(--w); z-index: 5; }
    .shelf-book:hover .b3d-in, .shelf-book:focus-visible .b3d-in { transform: translate3d(0, -14px, 70px) rotateY(0) rotateX(0); }
}
.shelf-book:active .b3d-in { transform: translate3d(0, -8px, 40px) rotateY(10deg); }
.plank { display: block; height: 16px; margin: 0 calc(var(--gutter) * -1); background: linear-gradient(180deg, #57432A, #2A2013 55%, transparent); box-shadow: inset 0 1px 0 rgba(240, 219, 162, .5), 0 24px 40px rgba(0, 0, 0, .5); }

/* ---- Explore ---- */
.cat-jump { position: sticky; top: var(--top); z-index: 15; padding-block: 10px; background: linear-gradient(180deg, var(--bg) 72%, transparent); }
.cat-sec { scroll-margin-top: calc(var(--top) + 70px); }
.cats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.topic-cloud { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---- Authors ---- */
.people { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px 12px; }
.person { display: grid; justify-items: center; gap: 2px; min-width: 0; text-align: center; }
.person-pic { display: block; width: 100%; max-width: 112px; aspect-ratio: 4 / 5; margin-bottom: 8px; padding: 2px; border-radius: 999px 999px 16px 16px; background: linear-gradient(180deg, var(--gold), rgba(76, 177, 122, .3)); transition: transform .3s var(--ease), box-shadow .3s; }
.person:hover .person-pic { transform: translateY(-6px); box-shadow: 0 20px 36px rgba(0, 0, 0, .55), 0 0 34px rgba(224, 188, 106, .25); }
.person:active .person-pic { transform: scale(.95); }
.person-pic img, .avatar-initials { display: grid; place-items: center; width: 100%; height: 100%; border-radius: inherit; object-fit: cover; background: var(--surface); }
.avatar-initials { font: 600 26px var(--display); color: var(--gold-soft); }
.person strong { display: -webkit-box; font-size: 13.5px; font-weight: 700; line-height: 1.25; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.person small { font-size: 12px; color: var(--tx-3); }
.ah { display: flex; gap: 18px; align-items: center; padding-top: 4px; }
.ah-pic { flex: none; display: block; width: 120px; aspect-ratio: 4 / 5; padding: 3px; border-radius: 999px 999px 18px 18px; background: linear-gradient(180deg, var(--gold), rgba(76, 177, 122, .35)); }
.ah-pic img, .ah-pic .avatar-initials { width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
.ah h1 { font: 600 30px/1.1 var(--display); letter-spacing: -.6px; }
.ah small { color: var(--gold); font-weight: 700; font-size: 14px; }
.ah-actions { display: flex; gap: 8px; margin-top: 12px; }
.ah-actions .btn { min-height: 44px; padding: 0 18px; font-size: 14px; }
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.stat { display: flex; align-items: center; gap: 12px; padding: 16px; border-radius: 18px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.stat > .ms { width: 42px; height: 42px; border-radius: 13px; font-size: 22px; line-height: 42px; text-align: center; color: var(--mint); background: rgba(82, 223, 129, .13); }
.stat strong { display: block; font: 600 21px/1.15 var(--display); }
.stat small { font-size: 12.5px; color: var(--tx-3); }
.prose { color: var(--tx-2); line-height: 1.75; font-size: 15px; font-weight: 500; }
.prose.is-clamped { display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }
.more-btn { margin-top: 8px; font-size: 14px; font-weight: 800; color: var(--gold-soft); }
.graph-grid { display: grid; gap: 14px; margin-top: 14px; }
.graph-grid h4 { margin-bottom: 6px; font-size: 13px; font-weight: 800; color: var(--gold); }
.graph-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.graph-tags span { padding: 6px 11px; border-radius: 10px; font-size: 13px; color: var(--tx-2); background: rgba(255, 255, 255, .07); }

/* ---- Book ---- */
.book-page { position: relative; }
.bd-hero { position: relative; isolation: isolate; overflow: hidden; }
.bd-backdrop { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
.bd-backdrop img { position: absolute; inset: -10%; width: 120%; height: 120%; max-width: none; object-fit: cover; filter: blur(38px) saturate(1.6) brightness(.78); }
.bd-backdrop::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(7, 18, 13, .15), rgba(7, 18, 13, .35) 55%, var(--bg)); }
.bd-top { display: flex; justify-content: space-between; padding: calc(10px + env(safe-area-inset-top)) var(--gutter) 0; }
.bd-head { display: grid; gap: 6px; padding-bottom: 8px; }
.bd-art { display: grid; place-items: center; padding: 6px 0 16px; }
.bd-art .b3d { --w: min(52vw, 220px); --ry: -22deg; }
.bd-art .b3d-in { animation: book-in 1.3s var(--ease) both; }
@keyframes book-in { from { transform: rotateY(-200deg) rotateX(10deg) scale(.7); opacity: 0; } }
.bd-art::after { content: ''; width: min(46vw, 190px); height: 22px; margin-top: 12px; border-radius: 50%; background: rgba(0, 0, 0, .55); filter: blur(14px); }
.bd-lead { min-width: 0; text-align: center; }
.bd-crumbs { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 8px; font-size: 13.5px; font-weight: 700; color: var(--gold-soft); }
.bd-crumbs a:hover { color: #fff; }
.bd-crumbs i { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: .6; }
.bd-name { margin-top: 6px; font: 600 35px/1.06 var(--display); letter-spacing: -.9px; }
.bd-by { display: inline-flex; align-items: center; gap: 9px; margin-top: 10px; font-size: 15px; font-weight: 700; }
.bd-by:hover { color: var(--gold-soft); }
.bd-by span { width: 30px; height: 30px; border-radius: 50%; overflow: hidden; }
.bd-by img, .bd-by .avatar-initials { width: 100%; height: 100%; object-fit: cover; font-size: 12px; }
.bd-facts { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; margin: 14px 0 0; padding: 0; list-style: none; }
.bd-facts li { display: inline-flex; align-items: center; gap: 4px; padding: 5px 11px; border-radius: 9px; font-size: 13px; background: rgba(0, 0, 0, .28); }
.bd-facts b { font-weight: 700; }
.bd-facts .ms { font-size: 15px; color: var(--gold); }
.bd-facts .is-rank { color: #1A1305; background: var(--gold-soft); }
.bd-cta { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 16px; }
.bd-resume { grid-column: 1 / -1; min-height: 56px; color: #05140C; background: var(--acc); box-shadow: 0 14px 34px rgba(var(--tint), .35); }
.bd-resume:hover { filter: brightness(1.1); }
.bd-resume .ms { font-size: 28px; }
.bd-action { display: grid; justify-items: center; gap: 3px; padding: 10px 2px; border-radius: 13px; font-size: 12px; font-weight: 700; color: var(--tx); background: rgba(255, 255, 255, .1); transition: background .2s, transform .18s var(--spring), color .2s; }
.bd-action:hover { background: rgba(255, 255, 255, .17); }
.bd-action:active { transform: scale(.93); }
.bd-action .ms { font-size: 22px; }
.bd-action.is-on { color: var(--mint); }
.bd-action.is-on .ms { font-variation-settings: 'FILL' 1; }
.bd-action-share { display: none; }
.bd-body { display: grid; gap: 24px; }
.bd-main { min-width: 0; }
.bd-side { display: none; }
.bd-tabs { position: sticky; top: var(--top); z-index: 20; margin: 8px calc(var(--gutter) * -1) 14px; padding: calc(8px + env(safe-area-inset-top)) var(--gutter) 8px; background: linear-gradient(180deg, var(--bg) 78%, transparent); }
.ep-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.ep-head h2 { font: 600 24px var(--display); }
.ep-count { font-size: 14px; font-weight: 700; color: var(--tx-3); }
.eps { display: grid; }
.ep { display: flex; align-items: center; gap: 14px; width: 100%; padding: 13px 8px; text-align: left; box-shadow: inset 0 -1px 0 var(--line); cursor: pointer; transition: background .2s; border-radius: 4px; }
.ep:hover { background: rgba(255, 255, 255, .06); }
.ep-num { position: relative; flex: none; display: grid; place-items: center; width: 34px; height: 34px; font: 600 16px var(--display); color: var(--tx-3); border-radius: 50%; }
.ep:hover .ep-num { color: var(--mint); }
.ep-main { flex: 1; min-width: 0; display: grid; gap: 3px; }
.ep-main strong { font-size: 15px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ep-main small { display: flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 600; color: var(--tx-3); }
.ep-main small .ms { font-size: 14px; }
.ep-meter { height: 3px; margin-top: 3px; border-radius: 2px; background: rgba(255, 255, 255, .12); overflow: hidden; }
.ep-meter b { display: block; height: 100%; background: var(--acc); }
.ep-tick { flex: none; color: var(--tx-3); }
.ep:hover .ep-tick { color: var(--mint); }
.ep.is-done .ep-tick { color: var(--pri); font-variation-settings: 'FILL' 1; }
.ep.is-now { background: rgba(var(--tint), .16); box-shadow: inset 3px 0 0 var(--acc); }
.ep.is-now strong { color: #fff; }
.ep.is-now .ep-num { color: transparent; background: var(--acc); }
.eq { position: absolute; inset: 0; display: none; align-items: flex-end; justify-content: center; gap: 2px; padding-bottom: 9px; }
.ep.is-now .eq { display: flex; }
.eq b { width: 3px; height: 15px; border-radius: 2px; background: #05140C; transform-origin: bottom; animation: eq 1s ease-in-out infinite; }
.eq b:nth-child(2) { animation-duration: .8s; }
.eq b:nth-child(3) { animation-duration: 1.2s; }
.is-paused .eq b { animation-play-state: paused; }
@keyframes eq { 0%, 100% { transform: scaleY(.3); } 50% { transform: scaleY(1); } }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.fact { padding: 13px 15px; border-radius: 16px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.fact small { display: block; font-size: 12.5px; color: var(--tx-3); }
.fact strong { font-size: 15px; font-weight: 700; }
.side-card { display: block; padding: 22px; border-radius: 22px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.side-card h2 { margin-bottom: 10px; font: 600 22px var(--display); }
.side-author { display: flex; align-items: center; gap: 16px; transition: background .2s; }
.side-author:hover { background: var(--card-2); }
.side-author .person-pic { flex: none; width: 74px; margin: 0; }
.side-author small { display: block; font-size: 12.5px; font-weight: 700; color: var(--gold); }
.side-author strong { display: block; font: 600 19px/1.2 var(--display); }
.side-author em { font-style: normal; font-size: 13px; color: var(--tx-3); }
.rv-top { display: flex; align-items: center; gap: 16px; padding: 18px; border-radius: 20px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.rv-score { font: 600 44px/1 var(--display); }
.stars { color: var(--gold); letter-spacing: 1px; font-size: 15px; }
.rv-list { display: grid; gap: 10px; margin-top: 12px; }
.rv { padding: 16px; border-radius: 18px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.rv header { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; font-weight: 700; }
.rv h4 { margin-top: 6px; font-size: 15px; }
.rv p { margin-top: 4px; color: var(--tx-2); white-space: pre-line; }
.rate { display: flex; gap: 2px; font-size: 34px; }
.rate button { color: rgba(255, 255, 255, .22); line-height: 1; transition: transform .2s var(--spring), color .15s; }
.rate button.is-on { color: var(--gold); }
.rate button:active { transform: scale(.8); }
textarea.input, input.input, select.input { width: 100%; padding: 13px 14px; border: 0; border-radius: 13px; font-weight: 500; background: rgba(255, 255, 255, .08); box-shadow: inset 0 0 0 1px var(--line); outline: 0; resize: vertical; }
textarea.input:focus, input.input:focus, select.input:focus { box-shadow: inset 0 0 0 2px var(--mint); }
select.input { appearance: none; -webkit-appearance: none; padding-right: 34px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23C9CFC2' stroke-width='1.8'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; cursor: pointer; }
select.input option { color: #111; }
.form-stack { display: grid; gap: 12px; }
.mark { display: flex; align-items: flex-start; gap: 12px; width: 100%; padding: 13px; border-radius: 16px; text-align: left; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); cursor: pointer; }
.mark + .mark { margin-top: 8px; }
.mark-time { flex: none; padding: 4px 8px; border-radius: 8px; font: 700 12.5px ui-monospace, Menlo, monospace; color: var(--mint); background: rgba(82, 223, 129, .14); }
.mark-main { flex: 1; min-width: 0; display: grid; gap: 2px; }
.mark-main strong { font-size: 14.5px; font-weight: 700; }
.mark-main small { font-size: 12.5px; color: var(--gold); }
.mark-main p { font-size: 13.5px; color: var(--tx-2); }
.tag-pick { display: flex; flex-wrap: wrap; gap: 6px; }

/* ---- Filters and lists ---- */
.browse { display: grid; gap: 14px; margin-top: 6px; }
.browse-main { min-width: 0; }
.lib-tools { display: grid; gap: 12px; }
.lib-seg { width: fit-content; max-width: 100%; }
.lib-pl { min-height: 44px; padding: 0 16px; font-size: 14px; }
.f-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.f-search { flex: 1 1 100%; }
.f-open { flex: 1; min-height: 46px; padding: 0 14px; font-size: 14px; }
.f-bar select.f-sort { flex: 1; width: auto; height: 46px; padding-block: 0; font-size: 14px; font-weight: 700; }
.f-active { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-height: 34px; margin: 12px 0 16px; }
.result-line { margin: 0 0 12px; font-size: 14px; font-weight: 700; color: var(--tx-3); }
.f-active .result-line { margin: 0; }
#active-filters { display: contents; }
.f-tag { display: inline-flex; align-items: center; gap: 4px; padding: 5px 8px 5px 12px; border-radius: 10px; font-size: 13px; font-weight: 700; color: #05140C; background: var(--mint); }
.f-tag .ms { font-size: 16px; }
.filters { --gutter: 20px; position: fixed; inset: auto 0 0; z-index: 140; display: flex; flex-direction: column; gap: 20px; max-height: 86dvh; padding: 18px var(--gutter) calc(18px + env(safe-area-inset-bottom)); overflow-y: auto; border-radius: 26px 26px 0 0; background: #122219; box-shadow: 0 -30px 70px rgba(0, 0, 0, .7), inset 0 1px 0 rgba(240, 219, 162, .2); transform: translate3d(0, 104%, 0); transition: transform .42s var(--ease); }
.filters.is-open { transform: none; }
.filters-head { display: flex; align-items: center; gap: 10px; }
.filters-head h2 { flex: 1; font: 600 24px var(--display); }
.f-group h3 { margin-bottom: 8px; font-size: 13px; font-weight: 800; color: var(--gold); }
.f-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.tree { display: grid; gap: 2px; }
.tree a, .tree button { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; min-height: 42px; padding: 7px 10px; border-radius: 11px; font-size: 14.5px; font-weight: 600; text-align: left; color: var(--tx-2); transition: background .2s, color .2s; }
.tree a:hover, .tree button:hover { color: #fff; background: rgba(255, 255, 255, .07); }
.tree small { font-size: 12px; font-weight: 600; color: var(--tx-3); }
.tree .is-on, .tree .is-on:hover { color: #05140C; background: var(--mint); font-weight: 800; }
.tree .is-on small { color: rgba(5, 20, 12, .7); }
.tree-cat summary { display: flex; align-items: center; list-style: none; cursor: pointer; }
.tree-cat summary::-webkit-details-marker { display: none; }
.tree-cat summary > a, .tree-cat summary > button { flex: 1; font-weight: 700; color: var(--tx); }
.tree-arrow { flex: none; width: 32px; font-size: 22px; color: var(--tx-3); text-align: center; transition: transform .25s var(--ease); }
.tree-cat[open] .tree-arrow { transform: rotate(180deg); }
.tree-subs { display: grid; gap: 1px; margin: 2px 0 6px 12px; padding-left: 8px; box-shadow: inset 1px 0 0 var(--line-2); }
.tree-subs a, .tree-subs button { min-height: 36px; font-size: 14px; }
.grid.is-list { grid-template-columns: minmax(0, 1fr); gap: 4px; }
.grid.is-list .bk { display: grid; grid-template-columns: 58px minmax(0, 1fr); column-gap: 14px; align-items: center; padding: 6px; border-radius: 12px; }
.grid.is-list .bk:hover { background: rgba(255, 255, 255, .06); }
.grid.is-list .bk-cover { grid-row: 1 / span 3; width: 58px; }
.grid.is-list .bk-play, .grid.is-list .bk-badge { display: none; }
.grid.is-list .bk-tag, .grid.is-list .bk-title, .grid.is-list .bk-author { grid-column: 2; margin: 0; }
.signin-note { display: grid; gap: 10px; padding: 22px; border-radius: 22px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.signin-note h2 { font: 600 24px var(--display); }
.signin-note p { color: var(--tx-3); }
.pl-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.pl { position: relative; display: block; min-height: 150px; padding: 18px; border-radius: 22px; overflow: hidden; text-align: left; background: linear-gradient(150deg, #1B4432, #0F1E18); box-shadow: inset 0 0 0 1px rgba(76, 177, 122, .25); transition: transform .25s var(--ease); }
.pl:hover { transform: translateY(-4px); }
.pl strong { font: 600 21px/1.2 var(--display); }
.pl small { display: block; margin-top: 4px; color: var(--tx-3); }

/* ---- My Space ---- */
.me { padding: 22px; border-radius: 26px; background: radial-gradient(80% 130% at 100% 0, rgba(224, 188, 106, .2), transparent 60%), linear-gradient(135deg, #1C4A36, #0F1E18 72%); box-shadow: inset 0 0 0 1px rgba(76, 177, 122, .3); }
.me-top { display: flex; align-items: center; gap: 16px; }
.ring { position: relative; flex: none; display: grid; place-items: center; width: 88px; height: 88px; border-radius: 50%; background: conic-gradient(var(--gold-soft), var(--mint) calc(var(--p, 0) * 1%), rgba(255, 255, 255, .12) 0); }
.ring i { display: grid; place-items: center; width: 74px; height: 74px; border-radius: 50%; font: 600 30px var(--display); background: #173A2B; }
.me h2 { font: 600 27px/1.15 var(--display); }
.me p { font-size: 13.5px; color: var(--tx-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.level-pill { display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; padding: 4px 11px; border-radius: 10px; font-size: 13px; font-weight: 800; color: #1A1305; background: var(--gold-soft); }
.xp-line { display: flex; justify-content: space-between; margin: 18px 0 8px; font-size: 14px; color: var(--tx-2); }
.xp-line b { color: #fff; }
.me .meter { height: 9px; margin: 0; }
.goal { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.goal h3 { font: 600 21px var(--display); }
.goal p { font-size: 13.5px; color: var(--tx-3); }
.goal-ring { flex: none; display: grid; place-items: center; width: 60px; height: 60px; border-radius: 50%; background: conic-gradient(var(--mint) calc(var(--p, 0) * 1%), rgba(255, 255, 255, .12) 0); }
.goal-ring i { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; color: var(--mint); background: var(--card); }
.week { position: relative; display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; align-items: end; height: 124px; }
.week-goal { position: absolute; left: 0; right: 0; border-top: 1px dashed rgba(255, 255, 255, .28); }
.day { display: grid; grid-template-rows: 1fr auto; justify-items: center; gap: 6px; height: 100%; font-size: 12.5px; font-weight: 700; color: var(--tx-3); }
.day i { align-self: end; width: 100%; max-width: 26px; min-height: 5px; border-radius: 8px; background: rgba(82, 223, 129, .16); transition: height .7s var(--ease); }
.day.is-some i { background: rgba(82, 223, 129, .6); }
.day.is-goal i { background: var(--mint); }
.day.is-later i { background: rgba(255, 255, 255, .06); }
.day.is-today { color: var(--mint); }
.week-note { margin-top: 10px; font-size: 13px; color: var(--tx-3); }
.recap-top { display: flex; align-items: flex-start; justify-content: space-between; }
.recap-top small { font-size: 13px; font-weight: 800; color: var(--gold); }
.recap-top strong { display: block; font: 600 38px/1.1 var(--display); }
.recap-top p { font-size: 13px; color: var(--tx-3); }
.recap-stats { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 14px; }
.recap-stats strong { display: block; font: 600 21px var(--display); }
.recap-stats small { font-size: 12.5px; color: var(--tx-3); }
.medal { --m: #3A3D44; flex: none; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; color: rgba(0, 0, 0, .7); background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--m), #fff 30%), var(--m) 55%, color-mix(in srgb, var(--m), #000 45%)); box-shadow: 0 0 16px color-mix(in srgb, var(--m), transparent 62%); }
.medal.is-locked { color: rgba(255, 255, 255, .35); box-shadow: none; }
.next-up { display: flex; align-items: center; gap: 14px; padding: 18px; border-radius: 20px; background: linear-gradient(90deg, color-mix(in srgb, var(--m), transparent 82%), var(--card)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--m), transparent 62%); }
.next-up .medal { width: 58px; height: 58px; }
.next-up small { font-size: 12.5px; font-weight: 800; color: var(--m); }
.next-up strong { display: block; font: 600 19px var(--display); }
.next-up .meter b { background: var(--m); }
.next-up p { margin-top: 4px; font-size: 13px; color: var(--tx-3); }
.tracks { margin-top: 12px; padding: 6px 0; }
.track { display: flex; align-items: center; gap: 14px; width: 100%; padding: 12px 16px; text-align: left; }
.track:hover { background: rgba(255, 255, 255, .05); }
.track-main { flex: 1; min-width: 0; }
.track-main header { display: flex; justify-content: space-between; font-size: 15px; font-weight: 700; }
.track-main header small { font-weight: 600; color: var(--tx-3); }
.track-main p { margin-top: 3px; font-size: 13px; color: var(--tx-3); }
.medal-wall { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px 12px; padding: 6px 0 10px; }
.medal-wall div { display: grid; justify-items: center; gap: 3px; width: 82px; text-align: center; }
.medal-wall .medal { width: 56px; height: 56px; }
.medal-wall b { font-size: 12.5px; }
.medal-wall small { font-size: 12px; color: var(--tx-3); }
.menu { overflow: hidden; border-radius: 20px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.menu a, .menu button { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 58px; padding: 8px 16px; text-align: left; font-size: 15px; font-weight: 600; transition: background .2s; }
.menu a + a, .menu a + button, .menu button + a, .menu button + button { box-shadow: inset 0 1px 0 var(--line); }
.menu a:hover, .menu button:hover { background: rgba(255, 255, 255, .06); }
.menu-icon { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; color: var(--mint); background: rgba(82, 223, 129, .13); }
.menu-icon .ms { font-size: 21px; }
.menu span.grow { flex: 1; min-width: 0; }
.menu .row-go { font-size: 21px; }
.menu .danger { color: #FF8F8C; }
.menu .danger .menu-icon { color: #FF8F8C; background: rgba(229, 57, 53, .15); }
.profile-columns { display: grid; gap: 14px; }
.profile-col { display: grid; gap: 14px; min-width: 0; align-content: start; }
.tier { margin-top: 28px; }
.tier-head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.tier-head i { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; color: #05140C; background: var(--c, var(--mint)); }
.tier-head h2 { flex: 1; font: 600 24px var(--display); }
.tier-head small { font-weight: 700; color: var(--tx-3); }
.done-tick { color: var(--pri); font-variation-settings: 'FILL' 1; }

/* ---- Text pages ---- */
.doc h3 { margin-top: 24px; font: 600 21px var(--display); }
.doc p { margin-top: 8px; color: var(--tx-2); line-height: 1.75; }
.doc p[dir=rtl] { margin: 8px 0 18px; font: 700 32px/1.6 var(--arabic); text-align: center; color: var(--gold-soft); }
.doc-body div { margin-top: 14px; padding: 4px 18px 16px; border-radius: 18px; background: var(--card); }
.doc-body div div { padding: 0; margin: 10px 0 0; background: none; }
.doc strong { color: #fff; font-weight: 800; }
.doc-updated { color: var(--tx-3); font-size: 13px; }

/* ---- Search ---- */
.search-top { position: sticky; top: var(--top); z-index: 20; display: flex; gap: 8px; align-items: center; padding: calc(10px + env(safe-area-inset-top)) 0 10px; background: var(--bg); }
.search-top .field { flex: 1; height: 56px; font-size: 16px; }
.suggest { display: flex; flex-wrap: wrap; gap: 8px; }
.mic-on { color: var(--mint) !important; animation: pulse 1s infinite; }

/* ---- Sign in: a moving wall of covers beside the form ---- */
.auth { position: relative; display: grid; min-height: 100svh; overflow: hidden; }
.auth-card { --gutter: 24px; position: relative; z-index: 2; align-self: center; justify-self: center; width: min(100%, 440px); padding: 40px var(--gutter); }
.auth-head { display: grid; justify-items: center; gap: 4px; margin-bottom: 24px; text-align: center; }
.auth-head img { width: 84px; height: 84px; margin-bottom: 10px; border-radius: 24px; box-shadow: 0 20px 50px rgba(224, 188, 106, .22); }
.auth-head h1 { font: 600 40px/1.1 var(--display); letter-spacing: -.8px; }
.auth-head p { color: var(--tx-2); }
.auth .btn { width: 100%; }
.auth-or { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--tx-3); }
.auth-or::before, .auth-or::after { content: ''; flex: 1; height: 1px; background: var(--line-2); }
.auth-note { margin-top: 22px; text-align: center; color: var(--tx-2); }
.auth-note a, .auth-link { font-weight: 800; color: var(--mint); }
.auth-link { justify-self: end; font-size: 14px; }
.alert { display: flex; gap: 10px; padding: 12px 14px; border-radius: 13px; font-size: 14px; color: #FFC2C0; background: rgba(229, 57, 53, .16); }
.alert.ok { color: var(--alt); background: rgba(76, 177, 122, .16); }
.google-box { display: grid; gap: 8px; }
.google-btn { display: flex; justify-content: center; min-height: 44px; color-scheme: light; }
.auth-wall { position: absolute; inset: 0; z-index: 0; overflow: hidden; opacity: .28; }
.auth-wall::after { content: ''; position: absolute; inset: 0; background: radial-gradient(70% 60% at 50% 50%, var(--bg) 30%, rgba(7, 18, 13, .6)); }
.wall-tilt { position: absolute; inset: -30% -20%; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; transform: perspective(1400px) rotateX(18deg) rotateZ(-12deg); }
.wall-col { display: grid; gap: 16px; align-content: start; animation: wall-up 70s linear infinite; }
.wall-col:nth-child(2) { animation-direction: reverse; animation-duration: 90s; }
.wall-col img { width: 100%; aspect-ratio: 5 / 7; object-fit: cover; border-radius: 10px; }
@keyframes wall-up { to { transform: translate3d(0, -50%, 0); } }
.wall-copy { display: none; }

/* ---- Player bar ---- */
.mini { position: fixed; left: 10px; right: 10px; bottom: calc(var(--tabs) + 2px); z-index: 55; display: flex; align-items: center; gap: 4px; height: 64px; padding: 0 8px 0 8px; border-radius: 18px; background: linear-gradient(90deg, rgba(var(--tint), .42), rgba(22, 36, 30, .96) 60%); box-shadow: 0 14px 36px rgba(0, 0, 0, .6), inset 0 0 0 1px var(--line-2); backdrop-filter: blur(26px); -webkit-backdrop-filter: blur(26px); overflow: hidden; view-transition-name: mini; animation: mini-in .55s var(--ease); }
@keyframes mini-in { from { transform: translate3d(0, 120%, 0); } }
.mini-progress { position: absolute; inset: auto 0 0; height: 3px; background: rgba(255, 255, 255, .12); }
.mini-progress b { display: block; width: 100%; height: 100%; background: var(--mint); transform: scaleX(0); transform-origin: left; }
.mini-open { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; height: 100%; text-align: left; }
.mini-open img { flex: none; width: 40px; height: 52px; border-radius: 6px; object-fit: cover; background: var(--surface); box-shadow: 0 6px 14px rgba(0, 0, 0, .5); }
.mini-text { min-width: 0; display: grid; }
.mini-text strong { font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-text small { font-size: 12px; color: var(--tx-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-center, .mini-actions { flex: none; display: flex; align-items: center; gap: 2px; }
.mini-wide { display: none; }
.mini-play { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; color: #05140C; background: var(--mint); transition: transform .18s var(--spring); }
.mini-play .ms, .transport-play .ms, .car-play .ms { font-variation-settings: 'FILL' 1; }
.mini-play:active { transform: scale(.86); }
.is-loading .mini-play .ms, .is-loading .transport-play .ms { animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: .35; } }

/* ---- Full player ---- */
.player { position: fixed; inset: 0; z-index: 100; display: flex; flex-direction: column; height: 100dvh; background: #070807; transform: translate3d(0, 102%, 0); visibility: hidden; transition: transform .5s var(--ease), visibility 0s .5s; }
.player.is-open { transform: none; visibility: visible; transition: transform .5s var(--ease); }
.player.is-dragging { transition: none; }
.player-bg { position: absolute; inset: 0; overflow: hidden; background: rgba(var(--tint), .5); }
.player-bg img { width: 100%; height: 100%; object-fit: cover; filter: blur(70px) saturate(1.7) brightness(.68); transform: scale(1.4); }
.player-bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, .1), rgba(5, 8, 6, .6) 62%, #050805); }
.player-top { position: relative; display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: calc(12px + env(safe-area-inset-top)) var(--gutter) 4px; }
.player-where { min-width: 0; display: grid; justify-items: center; gap: 5px; }
.now-pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 11px; border-radius: 9px; font-size: 12px; font-weight: 800; color: #05140C; background: var(--acc); }
.now-pill i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: pulse 1.6s infinite; }
#player-book { max-width: 60vw; font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-body { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; padding: 2px var(--gutter) calc(12px + env(safe-area-inset-bottom)); }
.player-art { flex: 1 1 auto; min-height: 100px; display: flex; align-items: center; justify-content: center; width: 100%; padding: 8px 0 18px; }
.b3d-player { --w: min(30dvh, 60vw); --ry: -18deg; transition: transform .6s var(--ease); }
.b3d-player .b3d-in { translate: 0 0; animation: book-bob 8s ease-in-out infinite; }
@keyframes book-bob { 50% { translate: 0 -10px; } }
.is-paused .b3d-player { transform: scale(.92); }
.player-side { flex: none; width: min(100%, 520px); display: grid; justify-items: center; gap: 8px; }
.player-side h2 { font: 600 25px/1.18 var(--display); letter-spacing: -.4px; text-align: center; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.author-chip { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; padding: 4px 14px 4px 5px; border-radius: 22px; font-size: 13.5px; font-weight: 600; background: rgba(255, 255, 255, .11); }
.author-chip img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; }
.author-chip span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.scrub { display: grid; grid-template-columns: minmax(0, 1fr); width: 100%; }
.wave { grid-area: 1 / 1; display: flex; align-items: center; gap: 2px; height: 44px; pointer-events: none; }
.wave i { flex: 1; min-width: 1px; height: calc(var(--h) * 1%); border-radius: 2px; background: rgba(255, 255, 255, .2); transition: background .2s; }
.wave i.is-done { background: var(--acc); filter: brightness(1.25); }
#seek { grid-area: 1 / 1; position: relative; -webkit-appearance: none; appearance: none; display: block; width: 100%; height: 44px; margin: 0; padding: 0; background: none; cursor: pointer; }
#seek::-webkit-slider-runnable-track { height: 44px; background: none; }
#seek::-webkit-slider-thumb { -webkit-appearance: none; width: 4px; height: 44px; margin-top: 0; border-radius: 2px; background: #fff; box-shadow: 0 0 12px rgba(255, 255, 255, .7); }
#seek::-moz-range-track { height: 44px; background: none; }
#seek::-moz-range-thumb { width: 4px; height: 44px; border: 0; border-radius: 2px; background: #fff; }
.scrub-times { margin-top: 6px; display: flex; justify-content: space-between; font: 600 12.5px ui-monospace, Menlo, monospace; color: var(--tx-2); }
.time-left { color: #fff; }
.transport { display: flex; align-items: center; justify-content: center; gap: clamp(8px, 4vw, 26px); width: 100%; }
.transport button { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; transition: transform .18s var(--spring), background .2s; }
.transport button:hover { background: rgba(255, 255, 255, .1); }
.transport button:active { transform: scale(.84); }
.transport .ms { font-size: 31px; }
.transport button[data-player=prev] .ms, .transport button[data-player=next] .ms { font-size: 38px; font-variation-settings: 'FILL' 1; }
.transport .transport-play, .transport .transport-play:hover { width: 76px; height: 76px; color: #05140C; background: #fff; box-shadow: 0 14px 36px rgba(0, 0, 0, .4); }
.transport .transport-play:hover { transform: scale(1.05); }
.transport .transport-play .ms { font-size: 46px; }
.tools { display: flex; justify-content: flex-start; gap: 6px; width: 100%; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.tools::-webkit-scrollbar { display: none; }
.tool { flex: none; display: flex; align-items: center; justify-content: center; gap: 5px; min-width: 44px; height: 42px; padding: 0 10px; border-radius: 13px; background: rgba(255, 255, 255, .1); font-size: 13px; font-weight: 700; transition: background .2s, transform .18s var(--spring); }
.tool:hover { background: rgba(255, 255, 255, .18); }
.tool:active { transform: scale(.88); }
.tool .ms { font-size: 21px; }
.tool.is-on { color: #05140C; background: var(--acc); }
.tool.is-on .ms { font-variation-settings: 'FILL' 1; }
.upnext { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 12px; border-radius: 16px; text-align: left; background: rgba(255, 255, 255, .09); }
.upnext-icon { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; color: #05140C; background: var(--acc); }
.upnext-text { flex: 1; min-width: 0; display: grid; }
.upnext-text small { font-size: 12px; font-weight: 700; color: var(--tx-2); }
.upnext-text strong { font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-dock { display: none; }
@media (max-height: 720px) { .upnext { display: none; } .b3d-player { --w: min(24dvh, 50vw); } .player-side { gap: 5px; } .player-side h2 { font-size: 21px; } }
.car { position: absolute; inset: 0; z-index: 5; display: grid; grid-template-rows: auto auto 1fr; gap: 12px; padding: calc(16px + env(safe-area-inset-top)) 16px calc(16px + env(safe-area-inset-bottom)); background: #050505; }
.car-close { justify-self: end; }
.car p { font: 600 28px/1.25 var(--display); text-align: center; }
.car-grid { display: grid; grid-template-columns: 1fr 1.4fr 1fr; gap: 12px; align-self: center; height: min(60dvh, 340px); }
.car-grid button { display: grid; place-items: center; border-radius: 26px; background: var(--surface); }
.car-grid .ms { font-size: 64px; }
.car-grid .car-play { color: #05140C; background: var(--mint); }
.car-grid .car-play .ms { font-size: 96px; }

/* ---- Sheets ---- */
.sheet { position: fixed; inset: 0; z-index: 150; display: flex; align-items: flex-end; justify-content: center; }
.sheet-back { position: absolute; inset: 0; background: rgba(2, 6, 4, .72); opacity: 0; transition: opacity .3s; }
.sheet.is-open .sheet-back { opacity: 1; }
.sheet-panel { --gutter: 22px; position: relative; display: flex; flex-direction: column; width: min(100%, 560px); max-height: 86dvh; padding: 8px var(--gutter) calc(16px + env(safe-area-inset-bottom)); border-radius: 26px 26px 0 0; background: #122219; box-shadow: inset 0 1px 0 rgba(240, 219, 162, .22); transform: translate3d(0, 102%, 0); transition: transform .42s var(--ease); }
.sheet.is-open .sheet-panel { transform: none; }
.sheet-grab { flex: none; width: 42px; height: 5px; margin: 0 auto 8px; border-radius: 3px; background: rgba(255, 255, 255, .25); }
.sheet-head { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.sheet-head h3 { font: 600 24px var(--display); }
.sheet-body { min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding-bottom: 6px; }
.option { padding: 15px 8px; border-radius: 13px; font-weight: 700; font-size: 15px; background: rgba(255, 255, 255, .08); transition: background .2s, transform .18s var(--spring); }
.option:hover { background: rgba(255, 255, 255, .15); }
.option:active { transform: scale(.95); }
.option.is-on { color: #05140C; background: var(--mint); }
.options-wide { grid-template-columns: minmax(0, 1fr); }
.options-wide .option { display: flex; align-items: center; justify-content: space-between; padding: 16px; text-align: left; }
.queue-chips { position: sticky; top: 0; z-index: 2; margin-bottom: 8px; background: #122219; padding-block: 2px 8px; }
.q-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 10px; border-radius: 12px; text-align: left; transition: background .2s; }
.q-item:hover { background: rgba(255, 255, 255, .08); }
.q-item.is-now { background: rgba(255, 255, 255, .16); }
.q-num { flex: none; width: 26px; text-align: center; font: 600 14px var(--display); color: var(--tx-2); }
.q-item strong { flex: 1; min-width: 0; font-size: 14.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.q-item small { flex: none; font-size: 12.5px; color: var(--tx-2); }
.notice-img { width: 100%; max-height: 180px; margin-bottom: 12px; border-radius: 14px; object-fit: cover; }
.notice-msg { color: var(--tx-2); white-space: pre-line; }
.notice-icon { display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 12px; border-radius: 16px; color: #1A1305; background: var(--gold-soft); }
.notice-icon .ms { font-size: 28px; font-variation-settings: 'FILL' 1; }
.notice-text { display: grid; gap: 12px; font-size: 15.5px; line-height: 1.65; color: var(--tx-2); }
.notice-text p:last-child { font: 600 18px/1.4 var(--display); color: var(--gold-soft); }
.notice-foot { position: sticky; bottom: 0; margin-top: 8px; padding: 16px 0 2px; background: linear-gradient(180deg, transparent, #122219 34%); }
.notice-foot .btn { width: 100%; }
.notice-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.note-item { display: block; width: 100%; padding: 13px; border-radius: 13px; text-align: left; }
.note-item + .note-item { box-shadow: inset 0 1px 0 var(--line); }
.note-item.is-unread { background: rgba(82, 223, 129, .1); }
.note-item strong { display: block; font-size: 15px; font-weight: 700; }
.note-item p { font-size: 14px; color: var(--tx-2); }
.note-item small { font-size: 12px; color: var(--tx-3); }
.quote-canvas { display: block; width: 100%; max-width: 340px; margin: 0 auto 12px; border-radius: 16px; box-shadow: 0 16px 40px rgba(0, 0, 0, .5); }
.theme-dots { display: flex; justify-content: center; gap: 10px; margin: 10px 0; }
.theme-dots button { width: 32px; height: 32px; border-radius: 50%; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .25); transition: transform .2s var(--spring); }
.theme-dots button.is-on { transform: scale(1.2); box-shadow: inset 0 0 0 2px #fff; }
.toast { position: fixed; left: 50%; bottom: calc(var(--tabs) + var(--mini) + 16px); z-index: 300; max-width: calc(100vw - 32px); padding: 12px 18px; border-radius: 13px; font-size: 14px; font-weight: 700; color: #07120D; background: var(--gold-soft); box-shadow: 0 14px 36px rgba(0, 0, 0, .6); opacity: 0; transform: translate3d(-50%, 12px, 0); pointer-events: none; transition: opacity .22s, transform .3s var(--spring); }
.toast.is-on { opacity: 1; transform: translate3d(-50%, 0, 0); }

/* Sections ease up as they arrive; they are never fully hidden, so fast scrolling never shows a blank page */
.js3d .rv3d { opacity: .55; transform: perspective(1400px) rotateX(6deg) translate3d(0, 34px, 0); transform-origin: 50% 100%; transition: opacity .6s var(--ease), transform .8s var(--ease); }
.js3d .rv3d.is-in { opacity: 1; transform: none; }

/* ---- Tablet ---- */
@media (min-width: 640px) {
    :root { --gutter: 28px; }
    .rail { grid-auto-columns: 160px; gap: 16px; }
    .rail-top { grid-auto-columns: 190px; }
    .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 26px 16px; }
    .people { grid-template-columns: repeat(5, minmax(0, 1fr)); }
    .cats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .facts { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .pl-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .f-search { flex: 1 1 260px; }
    .f-open, .f-bar select.f-sort { flex: none; }
    .f-bar select.f-sort { width: 190px; }
    .grid.is-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---- Desktop ---- */
@media (min-width: 1000px) {
    :root { --top: 80px; --tabs: 0px; --gutter: max(48px, calc((100vw - 1560px) / 2)); }
    body { font-size: 16px; }
    body.has-mini { --mini: 92px; }
    .tabs, .home-top { display: none; }
    .view { padding-bottom: calc(var(--mini) + 72px); }
    #field { opacity: .7; }

    /* Top navigation: every destination named */
    .topnav { position: fixed; inset: 0 0 auto; z-index: 70; display: flex; align-items: center; gap: 10px; height: var(--top); padding-inline: var(--gutter); background: linear-gradient(180deg, rgba(5, 14, 10, .78), transparent); transition: background .25s, box-shadow .25s; view-transition-name: topnav; }
    body.is-scrolled .topnav { background: rgba(7, 18, 13, .94); box-shadow: 0 1px 0 var(--line), 0 18px 40px rgba(0, 0, 0, .35); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
    .tn-brand { flex: none; display: flex; align-items: center; gap: 11px; margin-right: 16px; }
    .tn-brand img { width: 44px; height: 44px; border-radius: 12px; }
    .tn-brand strong { font: 600 21px var(--display); letter-spacing: -.3px; white-space: nowrap; }
    .tn-links { display: flex; align-items: center; gap: 2px; }
    .tn-links a[data-nav] { position: relative; display: flex; align-items: center; gap: 2px; height: 44px; padding: 0 14px; border-radius: 11px; font-size: 15px; font-weight: 700; color: rgba(248, 244, 232, .78); white-space: nowrap; transition: color .2s, background .2s; }
    .tn-links a[data-nav]:hover { color: #fff; background: rgba(255, 255, 255, .09); }
    .tn-links a[data-nav].is-on { color: #fff; }
    .tn-links a[data-nav].is-on::after { content: ''; position: absolute; left: 14px; right: 14px; bottom: 4px; height: 3px; border-radius: 2px; background: var(--mint); }
    .tn-links .ms { font-size: 20px; transition: transform .25s var(--ease); }
    .tn-browse { position: relative; }
    .tn-browse:hover .ms { transform: rotate(180deg); }
    .mega { position: fixed; left: var(--gutter); right: var(--gutter); top: calc(var(--top) - 4px); display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 24px; padding: 28px; border-radius: 22px; background: #122219; box-shadow: 0 40px 90px rgba(0, 0, 0, .75), inset 0 0 0 1px var(--line-2); opacity: 0; visibility: hidden; transform: translateY(-8px); transition: opacity .18s, transform .28s var(--ease), visibility 0s .18s; }
    .tn-browse:hover .mega, .tn-browse:focus-within .mega { opacity: 1; visibility: visible; transform: none; transition: opacity .18s, transform .28s var(--ease); }
    .mega::before { content: ''; position: absolute; left: 0; right: 0; top: -16px; height: 16px; }
    .mega-col { display: grid; gap: 2px; align-content: start; }
    .mega-cat { margin-bottom: 8px; padding-bottom: 8px; font: 600 21px var(--display); box-shadow: inset 0 -1px 0 var(--line-2); }
    .mega-cat:hover { color: var(--gold-soft); }
    .mega-sub { padding: 5px 0; font-size: 14.5px; font-weight: 600; color: var(--tx-2); transition: color .15s, transform .2s var(--ease); }
    .mega-sub:hover { color: var(--mint); transform: translateX(3px); }
    .tn-search { flex: 1; display: flex; align-items: center; gap: 10px; min-width: 150px; max-width: 420px; height: 46px; margin-left: auto; padding: 0 14px; border-radius: 13px; color: var(--tx-2); background: rgba(255, 255, 255, .1); transition: background .2s; }
    .tn-search:hover { background: rgba(255, 255, 255, .17); }
    .tn-search span { flex: 1; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .tn-search kbd { padding: 2px 7px; border-radius: 6px; font: 700 11.5px var(--body); background: rgba(255, 255, 255, .12); }
    .tn-icon { position: relative; flex: none; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 13px; transition: background .2s; }
    .tn-icon:hover { background: rgba(255, 255, 255, .12); }
    .tn-user { position: relative; flex: none; }
    .tn-avatar { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; font: 600 21px var(--display); color: #05140C; background: var(--gold-soft); transition: transform .2s var(--spring); }
    .tn-avatar:hover { transform: scale(1.06); }
    .tn-menu { position: absolute; right: 0; top: calc(100% + 10px); width: 260px; padding: 8px; border-radius: 18px; background: #122219; box-shadow: 0 30px 70px rgba(0, 0, 0, .7), inset 0 0 0 1px var(--line-2); opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity .18s, transform .25s var(--ease), visibility 0s .18s; }
    .tn-menu::before { content: ''; position: absolute; inset: -12px 0 auto; height: 12px; }
    .tn-user:hover .tn-menu, .tn-user:focus-within .tn-menu { opacity: 1; visibility: visible; transform: none; transition: opacity .18s, transform .25s var(--ease); }
    .tn-menu p { padding: 10px 12px 12px; box-shadow: inset 0 -1px 0 var(--line); margin-bottom: 6px; }
    .tn-menu strong { display: block; font-size: 15px; }
    .tn-menu p span { font-size: 13px; color: var(--gold-soft); }
    .tn-menu a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 11px; font-size: 14.5px; font-weight: 600; }
    .tn-menu a:hover { background: rgba(255, 255, 255, .08); }
    .tn-menu .ms { font-size: 21px; color: var(--tx-2); }
    .tn-signin { min-height: 46px; padding: 0 22px; font-size: 14.5px; }

    /* Player bar: edge to edge, three zones */
    .mini { left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 16px; height: 88px; padding: 0 var(--gutter); border-radius: 0; background: linear-gradient(90deg, rgba(var(--tint), .34), rgba(14, 28, 22, .98) 45%); box-shadow: 0 -18px 40px rgba(0, 0, 0, .4), inset 0 1px 0 var(--line-2); }
    .mini-progress { inset: 0 0 auto; }
    .mini-open img { width: 50px; height: 66px; }
    .mini-text strong { font-size: 15.5px; }
    .mini-text small { font-size: 13px; }
    .mini-actions { justify-content: flex-end; gap: 6px; }
    .mini-center { gap: 8px; }
    .mini-wide { display: inline-grid; }
    .mini-time.mini-wide { display: block; margin-right: 8px; font: 600 13px ui-monospace, Menlo, monospace; color: var(--tx-2); }
    .mini-play { width: 54px; height: 54px; }
    .mini-play .ms { font-size: 32px; }

    /* Billboard */
    .stage { margin: calc(var(--top) * -1) calc(var(--gutter) * -1) 0; padding: var(--top) var(--gutter) 0; min-height: min(100svh, 880px); display: flex; flex-direction: column; justify-content: center; }
    .stage-bg::after { background: linear-gradient(90deg, rgba(7, 18, 13, .86), rgba(7, 18, 13, .34) 58%, rgba(7, 18, 13, .1)), linear-gradient(180deg, transparent 58%, var(--bg)); }
    .stage-bg img { filter: blur(28px) saturate(1.55) brightness(.82); }
    .stage-inner { display: grid; grid-template-columns: minmax(0, 46%) minmax(0, 1fr); align-items: center; gap: 24px; }
    .stage-info { order: 0; min-height: 0; text-align: left; }
    .stage-floor { order: 0; height: clamp(440px, 60svh, 620px); perspective: 1500px; }
    .stage-book { --w: clamp(250px, 21vw, 340px); --sx: clamp(90px, 8.6vw, 140px); --sz: 170px; left: 42%; }
    .stage-title { margin-top: 18px; font-size: clamp(50px, 5.4vw, 88px); line-height: 1; letter-spacing: -2.2px; }
    .stage-title a:hover { color: var(--gold-soft); }
    .stage-meta { margin-top: 16px; font-size: 17px; }
    .stage-desc { display: -webkit-box; max-width: 56ch; margin-top: 14px; font-size: 16.5px; line-height: 1.6; color: var(--tx-2); -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
    .stage-cta { justify-content: flex-start; margin-top: 26px; }
    .stage-cta .btn { flex: none; min-height: 58px; font-size: 16.5px; }
    .stage-cta .btn-primary { min-width: 190px; max-width: none; }
    .stage-more { display: inline-flex; padding: 0 28px; }
    .stage-add { width: 58px; height: 58px; }
    .stage-rank { font-size: 14px; padding: 6px 14px; }
    .stage-thumbs { justify-content: flex-start; margin: 22px 0 28px; padding: 4px 0; gap: 10px; overflow: visible; }
    .stage-thumb { width: 54px; height: 76px; border-radius: 8px; }

    /* Rails */
    .sec { margin-top: 56px; }
    .sec-head { margin-bottom: 18px; }
    .sec-head h2 { font-size: 36px; letter-spacing: -.8px; }
    .rail { grid-auto-columns: clamp(170px, 14.2vw, 232px); gap: 24px; padding-top: 14px; padding-bottom: 20px; }
    .rail-top { grid-auto-columns: clamp(220px, 18vw, 290px); }
    .top { padding-left: 76px; }
    .top-num { font-size: clamp(170px, 14vw, 220px); letter-spacing: -12px; bottom: 46px; left: -8px; }
    .rail-continue { grid-auto-columns: 400px; }
    .rail-continue .cont { padding: 12px; }
    .cont-cover { width: 76px; height: 106px; }
    .cont-main strong { font-size: 16.5px; }
    .rail-people { grid-auto-columns: 158px; }
    .rail-arrow { position: absolute; top: 30%; z-index: 6; display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; color: #05140C; background: var(--gold-soft); box-shadow: 0 14px 34px rgba(0, 0, 0, .6); opacity: 0; transition: opacity .2s, transform .2s var(--spring); }
    .rail-arrow.prev { left: -27px; }
    .rail-arrow.next { right: -27px; }
    .rail-wrap:hover .rail-arrow:not([hidden]) { opacity: 1; }
    .rail-arrow:hover { transform: scale(1.1); }
    .grid { grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 34px 24px; }
    .people { grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 38px 20px; }
    .person-pic { max-width: 158px; }
    .person strong { font-size: 15px; }
    .bk-title { font-size: 15.5px; }
    .bk-author { font-size: 13.5px; }
    .page-top { min-height: 104px; }
    .page-top h1 { font-size: 58px; letter-spacing: -1.6px; }
    .page-top a[data-back] { display: none; }
    .shelf-book { --w: clamp(164px, 13vw, 210px); }
    .shelf { padding-top: 44px; }
    .plank { height: 22px; }
    .pl-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
    .bento { grid-template-columns: minmax(0, 1fr); gap: 16px; margin-top: 56px; }
    .bento:has(.occasion:not([hidden])) { grid-template-columns: 1.7fr 1fr; }
    .wisdom { padding: 48px 40px; border-radius: 30px; }
    .wisdom .ar { font-size: 50px; }
    .wisdom blockquote { font-size: 28px; }
    .occasion { padding: 28px; border-radius: 26px; }
    .occasion strong { font-size: 25px; }
    .ask-card { padding: 28px; border-radius: 26px; }
    .ask-card h3 { font-size: 28px; }

    /* Book: billboard over two columns */
    .bd-top { display: none; }
    .bd-head { grid-template-columns: minmax(280px, 30%) minmax(0, 1fr); gap: 56px; align-items: center; min-height: 560px; padding-block: 28px 36px; }
    .bd-art .b3d { --w: clamp(250px, 22vw, 360px); --ry: -26deg; }
    .bd-art::after { width: 76%; height: 34px; margin-top: 22px; filter: blur(22px); }
    .bd-lead { text-align: left; }
    .bd-crumbs { justify-content: flex-start; font-size: 15px; }
    .bd-name { margin-top: 10px; font-size: clamp(50px, 5.6vw, 92px); line-height: 1; letter-spacing: -2.2px; }
    .bd-by { margin-top: 18px; font-size: 18px; }
    .bd-by span { width: 38px; height: 38px; }
    .bd-facts { justify-content: flex-start; margin-top: 18px; gap: 8px; }
    .bd-facts li { padding: 7px 13px; font-size: 14.5px; }
    .bd-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 26px; }
    .bd-resume { min-height: 60px; padding: 0 32px; font-size: 17px; }
    .bd-action { display: inline-flex; align-items: center; gap: 8px; height: 60px; padding: 0 18px; font-size: 14.5px; }
    .bd-action-share { display: inline-flex; }
    .bd-body { grid-template-columns: minmax(0, 1fr) minmax(320px, 400px); gap: 48px; align-items: start; }
    .bd-side { position: sticky; top: calc(var(--top) + 18px); display: grid; gap: 14px; padding-top: 12px; }
    .bd-tabs { position: static; margin: 12px 0 18px; padding: 0; background: none; }
    .bd-tabs .seg { width: fit-content; }
    .tab-details { display: none; }
    .ep { padding: 15px 12px; gap: 18px; }
    .ep-main strong { font-size: 16.5px; }
    .bd-main .grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }

    /* Filters */
    .browse { grid-template-columns: 296px minmax(0, 1fr); gap: 40px; align-items: start; }
    .filters { position: sticky; inset: auto; top: calc(var(--top) + 12px); z-index: 2; max-height: calc(100svh - var(--top) - var(--mini) - 28px); padding: 20px; border-radius: 22px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); transform: none; scrollbar-width: thin; }
    .filters-close, .filters-apply, .f-open { display: none; }

    /* Full player: artwork, controls and dock */
    .player-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(400px, 480px) minmax(330px, 420px); gap: clamp(24px, 3vw, 56px); align-items: center; padding: 0 var(--gutter) 36px; }
    .player-top { padding-inline: var(--gutter); }
    .player-art { height: 100%; padding: 0; }
    .b3d-player { --w: clamp(240px, 24vw, 400px); --ry: -24deg; }
    .player-side { width: 100%; justify-items: start; gap: 14px; }
    .player-side h2 { font-size: 40px; line-height: 1.08; letter-spacing: -1px; text-align: left; }
    .upnext { display: none; }
    .tools { flex-wrap: wrap; }
    #player-book { max-width: 40vw; }
    .player-dock { display: flex; flex-direction: column; gap: 10px; align-self: stretch; min-height: 0; margin-block: 8px; padding: 12px; border-radius: 24px; background: rgba(5, 10, 8, .55); box-shadow: inset 0 0 0 1px var(--line-2); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); }
    .dock-seg button { padding: 9px 8px; font-size: 13px; }
    .dock-body { flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: thin; }

    .sheet { align-items: center; }
    .sheet-panel { padding-inline: 28px; }
    .sheet.is-notice .sheet-panel { width: min(100%, 620px); }
    .sheet-panel { border-radius: 26px; padding-bottom: 20px; box-shadow: 0 40px 90px rgba(0, 0, 0, .7), inset 0 0 0 1px var(--line-2); transform: translate3d(0, 24px, 0) scale(.96); opacity: 0; transition: transform .32s var(--ease), opacity .22s; }
    .sheet.is-open .sheet-panel { opacity: 1; transform: none; }
    .sheet-grab { display: none; }
    .profile-columns { grid-template-columns: minmax(0, 1fr) 380px; gap: 24px; align-items: start; }
    .ah-pic { width: 190px; }
    .ah h1 { font-size: 64px; letter-spacing: -1.6px; }
    .graph-grid { grid-template-columns: repeat(2, 1fr); }
    .toast { bottom: calc(var(--mini) + 22px); }

    /* Sign in: wall on the left, form on the right */
    .auth { grid-template-columns: minmax(0, 1.15fr) minmax(520px, 1fr); }
    .auth-card { width: min(100%, 480px); }
    .auth .field { height: 56px; }
    .auth .btn { min-height: 56px; }
    .auth-head img { width: 76px; height: 76px; }
    .auth-head h1 { font-size: 46px; }
    .auth-head p { font-size: 17px; }
    .auth-note { text-align: left; }
    .auth-wall { position: relative; inset: auto; grid-column: 1; opacity: 1; }
    .auth-wall::after { background: linear-gradient(90deg, rgba(7, 18, 13, .25), rgba(7, 18, 13, .55) 60%, var(--bg)), linear-gradient(0deg, rgba(7, 18, 13, .9), transparent 50%); }
    .wall-copy { position: absolute; left: 56px; right: 56px; bottom: 56px; z-index: 2; display: block; }
    .wall-copy p { font: 700 34px var(--arabic); color: var(--gold-soft); }
    .wall-copy h2 { max-width: 16em; font: 600 clamp(38px, 3.8vw, 60px)/1.05 var(--display); letter-spacing: -1.2px; }
    .auth-card { grid-column: 2; }
    .auth-head { justify-items: start; text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
    .js3d .rv3d { opacity: 1; transform: none; }
    #field { display: none; }
}

::view-transition-old(root) { animation: 120ms ease both vt-out; }
::view-transition-new(root) { animation: 300ms var(--ease) both vt-in; }
::view-transition-group(cover) { animation-duration: 420ms; animation-timing-function: var(--ease); z-index: 40; }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; transform: translateY(10px); } }
