@font-face {
    font-family: "Vazir";
    src: url("../fonts/Vazir.woff2") format("woff2"),
         url("../fonts/Vazir.woff") format("woff");
    font-display: swap;
    font-weight: 400;
    font-style: normal;
}

:root {
    --bg: #edf2f7;
    --surface: #ffffff;
    --surface-soft: #f4f7fb;
    --surface-raised: #fbfdff;
    --text: #152238;
    --muted: #63738a;
    --line: #d3dde8;
    --line-strong: #b9c7d6;
    --primary: #5b56d6;
    --primary-dark: #4540ae;
    --teal: #1e9d90;
    --teal-soft: #e4f7f4;
    --gold: #f2bc5a;
    --gold-soft: #fff4dc;
    --hero-start: #111a38;
    --hero-end: #1c7b82;
    --shadow-sm: 0 .5rem 1.3rem rgba(19, 34, 56, .085);
    --shadow-md: 0 1.2rem 3rem rgba(19, 34, 56, .13);
    --reader-font-size: 1.12rem;
}

html[data-theme="dark"] {
    color-scheme: dark;
    --bg: #080d19;
    --surface: #101a2c;
    --surface-soft: #16243a;
    --surface-raised: #1c2d47;
    --text: #f5f8ff;
    --muted: #a9b8ce;
    --line: rgba(183, 205, 235, .17);
    --line-strong: rgba(183, 205, 235, .3);
    --primary: #9b93ff;
    --primary-dark: #b5b0ff;
    --teal: #43d2c1;
    --teal-soft: rgba(67, 210, 193, .15);
    --gold: #f6cf78;
    --gold-soft: rgba(246, 207, 120, .16);
    --hero-start: #070b18;
    --hero-end: #125d69;
    --shadow-sm: 0 .45rem 1.25rem rgba(0, 0, 0, .24);
    --shadow-md: 0 1.2rem 3rem rgba(0, 0, 0, .38);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: "Vazir", Tahoma, sans-serif;
    font-size: 15px;
    transition: background-color .25s ease, color .25s ease;
}

.site-loader {
    position: fixed;
    z-index: 3000;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 1.25rem;
    background:
        radial-gradient(circle at 20% 12%, rgba(91, 86, 214, .34), transparent 30%),
        radial-gradient(circle at 84% 88%, rgba(57, 196, 181, .26), transparent 34%),
        linear-gradient(145deg, #080d20, #14274b 58%, #0e5d68);
    opacity: 1;
    visibility: visible;
    transition: opacity .62s ease, visibility .62s ease;
}

.site-loader.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.site-loader-card {
    width: min(90vw, 350px);
    display: flex;
    align-items: center;
    flex-direction: column;
    padding: 2.1rem 1.5rem 1.5rem;
    border: 1px solid rgba(255, 255, 255, .17);
    border-radius: 28px;
    color: #fff;
    background: linear-gradient(150deg, rgba(255, 255, 255, .13), rgba(255, 255, 255, .045));
    box-shadow: 0 1.5rem 4rem rgba(0, 0, 0, .28);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.site-loader-orbit {
    position: relative;
    width: 92px;
    height: 92px;
    display: grid;
    place-items: center;
    margin-bottom: 1rem;
}

.site-loader-orbit::before,
.site-loader-orbit::after {
    position: absolute;
    inset: 0;
    content: "";
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 50%;
}

.site-loader-orbit::before {
    border-top-color: var(--gold);
    border-right-color: transparent;
    animation: site-loader-spin 1.65s linear infinite;
}

.site-loader-orbit::after {
    inset: 10px;
    border-right-color: var(--teal);
    border-bottom-color: transparent;
    animation: site-loader-spin-reverse 1.35s linear infinite;
}

.site-loader-symbol {
    width: 58px;
    height: 58px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 241, 188, .7);
    border-radius: 19px;
    color: #202641;
    background: linear-gradient(145deg, #fff6cb, #efbb5c);
    box-shadow: 0 .7rem 1.4rem rgba(242, 188, 90, .25);
    font-size: 1.45rem;
}

.site-loader-orbit-dot {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--teal);
    box-shadow: 0 0 0 5px rgba(57, 196, 181, .12);
}

.site-loader-orbit-dot-one {
    top: 8px;
    right: 16px;
}

.site-loader-orbit-dot-two {
    bottom: 13px;
    left: 10px;
    background: var(--gold);
    box-shadow: 0 0 0 5px rgba(242, 188, 90, .12);
}

.site-loader-kicker {
    color: #9ee6dc;
    font-size: .72rem;
    font-weight: 800;
}

.site-loader-title {
    margin-top: .35rem;
    color: #fff;
    font-size: 1.15rem;
    font-weight: 900;
}

.site-loader-caption {
    margin-top: .45rem;
    color: rgba(255, 255, 255, .65);
    font-size: .75rem;
}

.site-loader-progress {
    width: min(100%, 190px);
    height: 4px;
    display: block;
    overflow: hidden;
    margin-top: 1.25rem;
    border-radius: 99px;
    background: rgba(255, 255, 255, .14);
}

.site-loader-progress span {
    width: 42%;
    height: 100%;
    display: block;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--teal), var(--gold));
    animation: site-loader-progress 1.5s ease-in-out infinite;
}

@keyframes site-loader-spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes site-loader-spin-reverse {
    to {
        transform: rotate(-360deg);
    }
}

@keyframes site-loader-progress {
    0%,
    100% {
        transform: translateX(-155%);
    }

    50% {
        transform: translateX(235%);
    }
}

.bi::before {
    vertical-align: 0;
}

body.ajax-loading {
    cursor: progress;
}

body.ajax-loading::before {
    position: fixed;
    z-index: 2000;
    inset: 0;
    content: "";
    background: rgba(8, 15, 35, .2);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    animation: ajax-overlay-in .22s ease both;
    pointer-events: all;
}

body.ajax-loading::after {
    position: fixed;
    z-index: 2001;
    top: 50%;
    left: 50%;
    width: 34px;
    height: 34px;
    content: "";
    border: 3px solid rgba(255, 255, 255, .35);
    border-top-color: var(--primary);
    border-radius: 50%;
    box-shadow: 0 .5rem 1.5rem rgba(9, 15, 35, .22);
    animation: ajax-spinner .82s linear infinite;
    transform: translate(-50%, -50%);
}

body.ajax-loading main {
    opacity: .48;
    transform: translateY(6px) scale(.998);
    transition: opacity .32s ease, transform .32s ease;
}

main.ajax-page-enter {
    animation: ajax-page-enter .48s cubic-bezier(.22, .75, .25, 1) both;
}

@keyframes ajax-overlay-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes ajax-spinner {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

@keyframes ajax-page-enter {
    from {
        opacity: 0;
        transform: translateY(14px) scale(.995);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

a {
    text-decoration: none;
}

.fw-black {
    font-weight: 900;
}

.site-navbar {
    position: sticky;
    top: 0;
    z-index: 1030;
    border-bottom: 1px solid rgba(255, 255, 255, .14);
    background:
        radial-gradient(circle at 12% 0%, rgba(141, 135, 255, .24), transparent 28%),
        radial-gradient(circle at 86% 120%, rgba(57, 196, 181, .19), transparent 32%),
        linear-gradient(125deg, rgba(10, 16, 39, .84), rgba(32, 43, 91, .7) 58%, rgba(23, 111, 119, .74));
    box-shadow: 0 .65rem 2rem rgba(8, 16, 39, .2);
    backdrop-filter: blur(18px) saturate(1.25);
    -webkit-backdrop-filter: blur(18px) saturate(1.25);
    transition: transform .42s cubic-bezier(.22, .75, .25, 1), opacity .34s ease, box-shadow .3s ease;
    will-change: transform;
}

.site-navbar.is-hidden {
    transform: translate3d(0, calc(-100% - .75rem), 0);
    opacity: 0;
}

.site-navbar.menu-open {
    transform: translate3d(0, 0, 0);
}

.site-navbar::after {
    position: absolute;
    z-index: -1;
    inset: 0;
    content: "";
    border-bottom: 1px solid rgba(255, 255, 255, .05);
    background: linear-gradient(180deg, rgba(255, 255, 255, .07), transparent 70%);
    pointer-events: none;
}

.site-navbar > .container {
    position: relative;
    z-index: 1;
}

.site-navbar > .container-fluid {
    position: relative;
    z-index: 1;
}

.site-navbar .navbar-toggler {
    width: 36px;
    height: 36px;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, .16) !important;
    border-radius: 12px;
    background: rgba(255, 255, 255, .08);
}

.site-navbar .navbar-toggler:hover,
.site-navbar .navbar-toggler:focus {
    background: rgba(255, 255, 255, .15);
    box-shadow: 0 0 0 .2rem rgba(255, 255, 255, .08);
}

.site-menu-backdrop,
.admin-menu-backdrop {
    display: none;
}

.site-menu-close,
.admin-sidebar-close,
.admin-menu-toggle {
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    align-items: center;
    justify-content: center;
    padding: 0;
    border-radius: 11px;
}

.site-menu-close,
.admin-sidebar-close {
    display: none;
}

.brand-mark {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    color: #171c3b;
    background: linear-gradient(145deg, #fff7dc, #f0bd62);
    border-radius: 12px;
    box-shadow: 0 8px 18px rgba(242, 188, 90, .22);
    font-size: 1.1rem;
}

.brand-title {
    color: #fff;
    font-size: 1.03rem;
    font-weight: 900;
}

.brand-subtitle {
    color: rgba(255, 255, 255, .62);
    font-size: .7rem;
}

.nav-link-light {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    color: rgba(255, 255, 255, .76);
    border-radius: 999px;
    padding-inline: .8rem !important;
    transition: background-color .2s ease, color .2s ease;
}

.nav-link-light > .bi {
    margin-inline: 0 !important;
}

.nav-link-light:hover,
.nav-link-light:focus {
    color: #fff;
    background: rgba(255, 255, 255, .1);
}

.site-navbar .btn.btn-sm {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 36px;
    padding: 0;
    border-radius: 50% !important;
    line-height: 1;
}

.theme-toggle i,
.theme-toggle i::before {
    display: block;
    line-height: 1;
    vertical-align: 0;
}

.mobile-theme-toggle {
    display: none !important;
}

.hero {
    position: relative;
    overflow: hidden;
    color: #fff;
    background:
        radial-gradient(circle at 84% 18%, rgba(242, 188, 90, .24), transparent 22%),
        radial-gradient(circle at 8% 82%, rgba(57, 196, 181, .22), transparent 28%),
        linear-gradient(125deg, var(--hero-start), var(--hero-end));
}

.hero::before,
.hero::after {
    content: "";
    position: absolute;
    border: 1px solid rgba(255, 255, 255, .13);
    border-radius: 50%;
    pointer-events: none;
}

.hero::before {
    width: 560px;
    height: 560px;
    right: -190px;
    top: -355px;
}

.hero::after {
    width: 420px;
    height: 420px;
    left: -205px;
    bottom: -305px;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 760px;
}

.hero-badge,
.reader-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    color: #f7d994;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .01em;
}

.hero-badge {
    padding: .45rem .78rem;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 999px;
    background: rgba(255, 255, 255, .08);
}

.hero h1 {
    max-width: 680px;
    font-size: clamp(2rem, 4.2vw, 3.6rem);
    line-height: 1.4;
    font-weight: 900;
}

.hero p {
    max-width: 650px;
    color: rgba(255, 255, 255, .76);
    font-size: 1rem;
    line-height: 2;
}

.home-hero {
    min-height: min(500px, calc(100vh - 74px));
    display: flex;
    align-items: center;
    isolation: isolate;
}

.home-hero .container {
    position: relative;
    z-index: 1;
    padding-top: 1.8rem !important;
    padding-bottom: 1.8rem !important;
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(300px, .92fr);
    align-items: center;
    gap: clamp(2rem, 6vw, 6rem);
}

.hero-content {
    max-width: 700px;
}

.hero-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.hero-note {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    color: rgba(255, 255, 255, .7);
    font-size: .82rem;
}

.hero-orb {
    position: absolute;
    z-index: 0;
    border-radius: 50%;
    pointer-events: none;
}

.hero-orb-one {
    width: 380px;
    height: 380px;
    right: -120px;
    top: 10%;
    background: radial-gradient(circle, rgba(141, 135, 255, .26), transparent 68%);
}

.hero-orb-two {
    width: 320px;
    height: 320px;
    left: 4%;
    bottom: -100px;
    background: radial-gradient(circle, rgba(57, 196, 181, .24), transparent 68%);
}

.hero-visual {
    position: relative;
    min-height: 270px;
    display: grid;
    place-items: center;
    z-index: 1;
}

.home-hero h1 {
    max-width: 620px;
    font-size: clamp(1.9rem, 3.7vw, 3.1rem);
}

.home-hero p {
    max-width: 600px;
    line-height: 1.85;
}

.hero-visual-glow {
    position: absolute;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(242, 188, 90, .24), transparent 68%);
    filter: blur(8px);
}

.hero-book-shape {
    position: relative;
    width: min(280px, 70vw);
    aspect-ratio: .76;
    filter: drop-shadow(0 2rem 2rem rgba(0, 0, 0, .25));
    transform: rotate(-7deg);
}

.hero-book-shape::before,
.hero-book-shape::after {
    position: absolute;
    content: "";
    border-radius: 24px 10px 10px 24px;
}

.hero-book-shape::before {
    inset: 11px -18px 11px 14px;
    background: linear-gradient(180deg, #eee8d5, #c8c2ae);
    box-shadow: 0 1rem 1.5rem rgba(6, 14, 35, .15);
    transform: rotate(2deg);
}

.hero-book-shape::after {
    inset: 21px -28px 21px 26px;
    background: linear-gradient(180deg, #a9a38f, #716e67);
    opacity: .6;
    transform: rotate(4deg);
}

.hero-book-cover {
    position: absolute;
    z-index: 2;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .8rem;
    border: 1px solid rgba(255, 255, 255, .25);
    border-radius: 24px 12px 12px 24px;
    color: #fff;
    background: linear-gradient(145deg, #25215f, #127d7a);
    box-shadow:
        inset 12px 0 0 rgba(255, 255, 255, .08),
        inset -1px 0 0 rgba(255, 255, 255, .18);
}

.hero-book-symbol {
    width: 78px;
    height: 78px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 24px;
    color: #222744;
    background: linear-gradient(145deg, #fff5cc, #f0bc60);
    box-shadow: 0 .8rem 1.4rem rgba(6, 14, 35, .18);
    font-size: 2rem;
}

.hero-book-label {
    color: rgba(255, 255, 255, .92);
    font-size: 1.25rem;
    font-weight: 900;
    letter-spacing: .02em;
}

.hero-book-line {
    width: 88px;
    height: 3px;
    border-radius: 99px;
    background: rgba(255, 255, 255, .58);
}

.hero-floating-note {
    position: absolute;
    z-index: 3;
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 17px;
    color: #fff;
    background: rgba(255, 255, 255, .13);
    box-shadow: 0 .7rem 1.4rem rgba(7, 15, 39, .22);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    font-size: 1.2rem;
}

.hero-floating-note-one {
    right: -20px;
    top: 12%;
    transform: rotate(10deg);
}

.hero-floating-note-two {
    left: -20px;
    bottom: 10%;
    color: #1b213c;
    background: linear-gradient(145deg, #fff5cb, #efbc60);
    transform: rotate(-10deg);
}

.hero-quote-card {
    position: absolute;
    z-index: 3;
    right: 0;
    bottom: 0;
    max-width: 240px;
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .75rem .9rem;
    border: 1px solid rgba(255, 255, 255, .17);
    border-radius: 16px;
    color: rgba(255, 255, 255, .86);
    background: rgba(255, 255, 255, .09);
    box-shadow: 0 .8rem 1.8rem rgba(7, 15, 39, .2);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    font-size: .75rem;
    line-height: 1.8;
}

.hero-quote-card i {
    flex: 0 0 auto;
    color: #f7d994;
    font-size: 1.2rem;
}

.testaments-section {
    scroll-margin-top: 96px;
}

.testament-card {
    background: linear-gradient(145deg, var(--surface), var(--surface-soft));
}

.testament-card p {
    max-width: 510px;
    line-height: 1.95;
}

.testament-card-arrow {
    position: absolute;
    left: 1.25rem;
    bottom: 1.15rem;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 50%;
    color: var(--primary);
    background: var(--surface-soft);
    transition: color .2s ease, background-color .2s ease, transform .2s ease, border-color .2s ease;
}

.testament-card:hover .testament-card-arrow,
.testament-card:focus-within .testament-card-arrow {
    color: #fff;
    border-color: var(--primary);
    background: var(--primary);
    transform: translateX(-3px);
}

.books-section {
    scroll-margin-top: 96px;
    animation: books-appear .45s ease both;
}

@keyframes books-appear {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.daily-verse-section {
    position: relative;
}

.daily-verse-card {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    min-height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(1.35rem, 3vw, 2.2rem);
    border: 1px solid rgba(141, 135, 255, .32);
    border-radius: 28px;
    color: #fff;
    background:
        radial-gradient(circle at 88% 20%, rgba(242, 188, 90, .2), transparent 25%),
        linear-gradient(135deg, #171b45, #1a626b 72%, #197a78);
    box-shadow: 0 1.25rem 2.7rem rgba(22, 33, 77, .18);
}

.daily-verse-content {
    position: relative;
    z-index: 1;
    width: min(100%, 900px);
}

.daily-verse-heading,
.daily-verse-footer {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 1rem;
    text-align: right;
}

.daily-verse-content {
    margin-inline: auto;
    text-align: right;
}

.daily-verse-badge {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .4rem .72rem;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 999px;
    color: #1d2442;
    background: linear-gradient(145deg, #fff5c8, #f2bd64);
    font-size: .78rem;
    font-weight: 900;
}

.daily-verse-kicker {
    color: rgba(255, 255, 255, .64);
    font-size: .78rem;
}

.daily-verse-text {
    max-width: 850px;
    margin: 1rem 0 1.1rem;
    color: rgba(255, 255, 255, .95);
    font-size: clamp(1.05rem, 2vw, 1.42rem);
    font-weight: 700;
    line-height: 2.1;
}

.daily-verse-reference {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: .4rem;
    color: rgba(255, 255, 255, .78);
    font-size: .8rem;
    transition: color .2s ease;
}

.daily-verse-reference:hover,
.daily-verse-reference:focus {
    color: #fff;
}

.daily-verse-card .verse-actions {
    align-items: center;
    justify-content: center;
}

.daily-verse-card .verse-actions .btn {
    color: #202641;
    border-color: rgba(255, 255, 255, .2);
    background: rgba(255, 255, 255, .9);
}

.daily-verse-card .verse-actions .btn:hover,
.daily-verse-card .verse-actions .btn:focus-visible {
    color: #202641;
    background: #fff;
    transform: translateY(-2px);
}

.daily-verse-glow {
    position: absolute;
    z-index: -1;
    width: 330px;
    height: 330px;
    left: -120px;
    bottom: -170px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 50%;
    box-shadow: 0 0 0 35px rgba(255, 255, 255, .03), 0 0 0 70px rgba(255, 255, 255, .025);
}

.daily-verse-mark {
    position: absolute;
    z-index: 0;
    top: 1rem;
    left: clamp(1rem, 4vw, 3rem);
    color: rgba(255, 255, 255, .09);
    font-size: clamp(6rem, 14vw, 10rem);
    line-height: 1;
}

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.15rem;
}

.section-heading h2,
.section-heading h3 {
    margin-bottom: .35rem;
    color: var(--text);
    font-size: 1.22rem;
    font-weight: 900;
}

.section-heading p {
    margin: 0;
    color: var(--muted);
    font-size: .83rem;
}

.search-panel {
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.search-panel .form-label {
    color: var(--text);
    font-size: .82rem;
    font-weight: 800;
}

.search-panel .input-group-text {
    min-width: 44px;
    justify-content: center;
}

.verse-search-panel {
    background: var(--surface-soft);
}

.testament-card,
.book-card,
.feature-card,
.reader-shell,
.admin-card {
    border: 1px solid var(--line);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.testament-card {
    position: relative;
    min-height: 190px;
    overflow: hidden;
    border-radius: 24px;
    transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

.testament-card::before {
    content: "";
    position: absolute;
    width: 170px;
    height: 170px;
    left: -48px;
    bottom: -78px;
    border-radius: 50%;
    background: rgba(30, 157, 144, .12);
}

.testament-card.new::before {
    background: rgba(91, 86, 214, .14);
}

.testament-card:hover,
.book-card:hover {
    transform: translateY(-4px);
    border-color: rgba(91, 86, 214, .28);
    box-shadow: var(--shadow-md);
}

.testament-icon,
.book-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.testament-icon {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    color: #fff;
    background: linear-gradient(145deg, #2bb8a7, #15776f);
    font-size: 1.45rem;
}

.testament-card.new .testament-icon {
    color: #fff;
    background: linear-gradient(145deg, #8c83ff, #5049bf);
}

.book-card {
    position: relative;
    height: 100%;
    overflow: hidden;
    border-radius: 19px;
    transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

.book-card .book-index {
    color: var(--muted);
    font-size: .74rem;
}

.book-card .book-icon {
    width: 40px;
    height: 40px;
    border-radius: 13px;
    color: var(--teal);
    background: var(--teal-soft);
}

.book-card.new .book-icon {
    color: var(--primary);
    background: rgba(91, 86, 214, .12);
}

.book-card h3 {
    color: var(--text);
    font-size: .98rem;
    font-weight: 800;
}

.book-card small {
    color: var(--muted);
}

.reader-shell {
    --reader-sticky-top: 72px;
    overflow: hidden;
    overflow: clip;
    border-radius: 25px;
    box-shadow: var(--shadow-md);
}

body.navbar-hidden .reader-shell {
    --reader-sticky-top: .75rem;
}

.reader-header {
    color: #fff;
    background:
        radial-gradient(circle at 90% 0%, rgba(141, 135, 255, .23), transparent 26%),
        linear-gradient(125deg, #101733, #1a5369);
}

.reader-header .verse-search-panel {
    border-color: rgba(255, 255, 255, .16);
    background: rgba(8, 17, 43, .26);
    box-shadow: none;
}

.reader-header .verse-search-panel .form-label {
    color: rgba(255, 255, 255, .72);
}

.reader-header .verse-search-panel .input-group-text,
.reader-header .verse-search-panel .form-control {
    color: #fff;
    border-color: rgba(255, 255, 255, .2);
    background: rgba(255, 255, 255, .09);
}

.reader-header .verse-search-panel .form-control::placeholder {
    color: rgba(255, 255, 255, .56);
}

.reader-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.reader-heading {
    min-width: 0;
}

.reader-eyebrow {
    margin-bottom: .35rem;
    color: rgba(255, 255, 255, .64);
    font-size: .72rem;
}

.reader-title {
    margin: 0;
    color: #fff;
    font-size: 1.18rem;
    font-weight: 900;
}

.reader-chapter-current {
    display: inline-flex;
    align-items: center;
    margin-right: .45rem;
    padding: .26rem .55rem;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 999px;
    color: #f6d58f;
    background: rgba(255, 255, 255, .08);
    font-size: .72rem;
    font-weight: 700;
    vertical-align: middle;
}

.reader-actions,
.font-size-control,
.player-options {
    display: flex;
    align-items: center;
    gap: .45rem;
}

.font-size-control .btn {
    min-width: 40px;
    min-height: 40px;
}

.font-size-control {
    height: 48px;
    display: inline-flex;
    align-items: center;
    padding: .25rem;
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 16px;
    background: rgba(8, 17, 43, .32);
    box-shadow: 0 .45rem 1rem rgba(5, 10, 27, .16);
}

.font-size-button {
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 11px;
    font-family: Arial, "Vazir", sans-serif;
    font-size: 1.55rem;
    font-weight: 900;
    line-height: 1;
    text-align: center;
    transition: transform .2s ease, background-color .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.font-size-button-decrease {
    color: var(--text);
    border-color: var(--line);
    background: var(--surface-raised);
    box-shadow: 0 .25rem .65rem rgba(19, 34, 56, .08);
}

.font-size-button-increase {
    color: #1b213c;
    border-color: rgba(242, 188, 90, .75);
    background: linear-gradient(145deg, #fff1bc, #f2bc5a);
    box-shadow: 0 .35rem .75rem rgba(242, 188, 90, .2);
}

.font-size-button:hover,
.font-size-button:focus-visible {
    transform: translateY(-2px);
}

.font-size-button-decrease:hover,
.font-size-button-decrease:focus-visible {
    color: var(--primary-dark);
    border-color: color-mix(in srgb, var(--primary) 42%, var(--line));
    background: var(--surface-soft);
    box-shadow: 0 .35rem .8rem rgba(19, 34, 56, .12);
}

.font-size-button-increase:hover,
.font-size-button-increase:focus-visible {
    color: #1b213c;
    border-color: #fff1bc;
    background: linear-gradient(145deg, #fff8dc, #f7cf78);
}

.reader-font-toolbar {
    position: sticky;
    top: var(--reader-sticky-top, 72px);
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin: .85rem clamp(.75rem, 2.5vw, 1.5rem);
    padding: .45rem .65rem .45rem .85rem;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--surface);
    background: color-mix(in srgb, var(--surface) 94%, transparent);
    box-shadow: 0 .55rem 1.4rem rgba(13, 25, 48, .1);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.reader-shell.has-sticky-audio .reader-font-toolbar {
    top: calc(
        var(--reader-sticky-top, 72px)
        + var(--audio-player-sticky-height, 0px)
        + 1rem
    );
}

.reader-font-label {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    color: var(--muted);
    font-size: .78rem;
    font-weight: 800;
    white-space: nowrap;
}

.reader-font-label .bi {
    color: var(--teal);
    font-size: .95rem;
}

.reader-font-toolbar .font-size-control {
    height: 44px;
    padding: .18rem;
    border-color: var(--line);
    background: var(--surface-soft);
    box-shadow: none;
}

.reader-font-toolbar .font-size-button {
    width: 38px;
    height: 38px;
    min-width: 38px;
    min-height: 38px;
}

html[data-theme="dark"] .reader-font-toolbar .font-size-button-decrease {
    color: rgba(255, 255, 255, .92);
    border-color: rgba(255, 255, 255, .22);
    background: rgba(255, 255, 255, .1);
    box-shadow: none;
}

html[data-theme="dark"] .reader-font-toolbar .font-size-button-decrease:hover,
html[data-theme="dark"] .reader-font-toolbar .font-size-button-decrease:focus-visible {
    color: #fff;
    border-color: rgba(255, 255, 255, .5);
    background: rgba(255, 255, 255, .18);
    box-shadow: none;
}

.chapter-picker {
    display: flex;
    align-items: center;
    gap: .85rem;
    margin-top: .9rem;
    padding-top: .85rem;
    border-top: 1px solid rgba(255, 255, 255, .13);
}

.chapter-picker-label {
    flex: 0 0 auto;
    color: rgba(255, 255, 255, .62);
    font-size: .86rem;
    font-weight: 800;
    white-space: nowrap;
}

.chapter-nav {
    display: flex;
    flex: 1;
    flex-wrap: wrap;
    gap: .4rem;
    min-width: 0;
    overflow: visible;
    padding-bottom: 0;
}

.chapter-nav .btn {
    flex: 0 0 auto;
    min-width: 42px;
    min-height: 40px;
    padding-inline: .7rem;
    color: #fff;
    border-color: rgba(255, 255, 255, .42);
    background: rgba(255, 255, 255, .1);
    border-radius: 10px;
    font-size: .9rem;
    font-weight: 800;
}

.chapter-nav .btn:hover,
.chapter-nav .btn:focus {
    color: #152238;
    border-color: #fff;
    background: #fff;
}

.chapter-nav .btn.btn-light,
.chapter-nav .btn.btn-light:hover,
.chapter-nav .btn.btn-light:focus {
    color: #152238 !important;
    border-color: #fff !important;
    background: #fff !important;
}

.verse-list {
    background: var(--surface);
}

.verse-card {
    position: relative;
    display: flex;
    gap: .9rem;
    padding: 1rem clamp(.9rem, 2.8vw, 1.6rem);
    scroll-margin-top: 110px;
    border-bottom: 1px solid var(--line);
    background: var(--surface);
    transition: background .2s ease, box-shadow .2s ease;
}

.verse-card:last-child {
    border-bottom: 0;
}

.verse-card.is-active {
    background: linear-gradient(90deg, var(--teal-soft), var(--surface));
    box-shadow: inset -4px 0 0 var(--teal);
}

.verse-card.is-highlighted {
    background: linear-gradient(90deg, rgba(242, 188, 90, .16), var(--surface));
    box-shadow: inset -4px 0 0 var(--gold);
    animation: verse-highlight .8s ease both;
}

@keyframes verse-highlight {
    from {
        filter: brightness(1.16);
    }

    to {
        filter: brightness(1);
    }
}

.verse-number {
    flex: 0 0 36px;
    height: 36px;
    display: grid;
    place-items: center;
    line-height: 1;
    padding: 0;
    border-radius: 11px;
    color: var(--teal);
    background: var(--teal-soft);
    font-size: .83rem;
    font-weight: 900;
}

.verse-content {
    flex: 1;
    min-width: 0;
}

.verse-text {
    margin: 0;
    color: var(--text);
    font-size: var(--reader-font-size);
    font-weight: 500;
    line-height: 2.25;
    letter-spacing: .01em;
    transition: font-size .2s ease;
}

.verse-card-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .75rem;
    margin-top: .75rem;
}

.verse-reference-short {
    min-width: 0;
    color: var(--muted);
    font-size: .7rem;
}

.verse-actions {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: .3rem;
}

.verse-actions .verse-action-trigger {
    min-width: 108px;
    color: var(--muted);
    background: var(--surface-soft);
    border: 1px solid var(--line);
}

.verse-actions .verse-action-trigger:hover,
.verse-actions .verse-action-trigger:focus-visible {
    color: var(--primary-dark);
    background: var(--teal-soft);
    border-color: var(--primary);
    transform: translateY(-1px);
}

.verse-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    color: var(--muted);
    background: var(--surface-soft);
    border: 1px solid var(--line);
    font-size: .72rem;
    white-space: nowrap;
}

.verse-actions .btn:hover,
.verse-actions .btn:focus {
    color: var(--teal);
    background: var(--teal-soft);
    border-color: transparent;
}

.verse-action-modal {
    position: fixed;
    z-index: 2200;
    inset: 0;
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    display: grid;
    place-items: center;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 1rem;
    visibility: hidden;
    pointer-events: none;
    transition: visibility .32s ease;
}

.verse-action-modal.is-open {
    visibility: visible;
    pointer-events: auto;
}

.verse-action-modal-backdrop {
    position: absolute;
    inset: 0;
    opacity: 0;
    background: rgba(6, 12, 30, 0);
    backdrop-filter: blur(0);
    -webkit-backdrop-filter: blur(0);
    transition:
        opacity .32s ease,
        background-color .32s ease,
        backdrop-filter .32s ease,
        -webkit-backdrop-filter .32s ease;
}

.verse-action-modal.is-open .verse-action-modal-backdrop {
    opacity: 1;
    background: rgba(6, 12, 30, .68);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.verse-action-dialog {
    position: relative;
    z-index: 1;
    width: min(100%, 540px);
    max-height: min(90vh, 760px);
    overflow: auto;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 30px;
    color: var(--text);
    background:
        radial-gradient(circle at 50% 0%, rgba(246, 207, 120, .16), transparent 32%),
        linear-gradient(155deg, var(--surface-raised), var(--surface));
    box-shadow: 0 1.8rem 5rem rgba(5, 11, 31, .38);
    text-align: center;
    opacity: 0;
    transform: translateY(18px) scale(.95);
    transition:
        opacity .32s ease,
        transform .32s cubic-bezier(.2, .8, .2, 1);
}

.verse-action-modal.is-open .verse-action-dialog {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.verse-action-modal-close {
    position: absolute;
    z-index: 2;
    top: .9rem;
    inset-inline-end: .9rem;
    width: 38px;
    height: 38px;
    display: inline-grid;
    place-items: center;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 50%;
    color: var(--muted);
    background: var(--surface-soft);
    line-height: 0;
    text-align: center;
    vertical-align: middle;
    transition: color .2s ease, background .2s ease, transform .2s ease;
}

.verse-action-modal-close i {
    width: 1em;
    height: 1em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    line-height: 1;
    text-align: center;
    transform: translateY(0);
}

.verse-action-modal-close i::before {
    display: block;
    line-height: 1;
    vertical-align: 0;
}

.verse-action-modal-close:hover,
.verse-action-modal-close:focus-visible {
    color: #fff;
    background: var(--primary);
    transform: rotate(6deg);
}

.verse-action-modal-heading {
    display: flex;
    align-items: center;
    flex-direction: column;
    gap: .35rem;
    padding-inline: 2rem;
}

.verse-action-modal-icon {
    width: 62px;
    height: 62px;
    display: inline-grid;
    place-items: center;
    margin-bottom: .2rem;
    border: 1px solid rgba(246, 207, 120, .55);
    border-radius: 22px;
    color: #26315f;
    background: linear-gradient(145deg, #ffe8a8, #f2b65e);
    box-shadow: 0 .8rem 1.5rem rgba(242, 188, 90, .22);
    font-size: 1.7rem;
}

.verse-action-modal-kicker {
    color: var(--teal);
    font-size: .76rem;
    font-weight: 800;
}

.verse-action-modal-heading h2 {
    margin: 0;
    color: var(--text);
    font-size: clamp(1.25rem, 3vw, 1.6rem);
    font-weight: 900;
}

.verse-action-modal-heading p {
    margin: 0;
    color: var(--muted);
    font-size: .85rem;
    font-weight: 700;
}

.verse-action-modal-preview {
    display: flex;
    align-items: center;
    flex-direction: column;
    gap: .65rem;
    margin: 1.25rem 0;
    padding: 1rem 1.1rem;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: var(--surface-soft);
    text-align: center;
}

.verse-action-modal-number {
    width: 40px;
    height: 40px;
    display: inline-grid;
    place-items: center;
    border-radius: 13px;
    color: #fff;
    background: linear-gradient(145deg, var(--primary), var(--teal));
    font-size: .95rem;
    font-weight: 900;
}

.verse-action-modal-preview p {
    max-height: 210px;
    overflow: auto;
    margin: 0;
    color: var(--text);
    font-size: clamp(1rem, 2.3vw, 1.18rem);
    font-weight: 600;
    line-height: 2.05;
}

.verse-action-modal-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .65rem;
}

.verse-action-modal-actions .btn {
    min-height: 52px;
    justify-content: center;
    padding: .7rem .8rem;
    border: 1px solid var(--line);
    color: var(--text);
    background: var(--surface-soft);
    font-size: .82rem;
    font-weight: 800;
    transition: color .2s ease, background .2s ease, border-color .2s ease, transform .2s ease;
}

.verse-action-modal-actions .btn:hover,
.verse-action-modal-actions .btn:focus-visible {
    color: #fff;
    border-color: var(--primary);
    background: linear-gradient(135deg, var(--primary), var(--teal));
    transform: translateY(-2px);
}

.verse-modal-action-copy {
    --modal-action-color: #6371d9;
}

.verse-modal-action-share {
    --modal-action-color: #269c91;
}

.verse-modal-action-image-share {
    --modal-action-color: #bf8b31;
}

.verse-modal-action-image-save {
    --modal-action-color: #cf6b6b;
}

.verse-action-modal-actions .btn > .bi {
    color: var(--modal-action-color, var(--teal));
    font-size: 1.05rem;
    transition: color .2s ease;
}

.verse-action-modal-actions .btn:hover > .bi,
.verse-action-modal-actions .btn:focus-visible > .bi {
    color: #fff;
}

html.verse-modal-open,
body.verse-modal-open {
    overflow: hidden;
}

.client-toast {
    position: fixed;
    z-index: 2100;
    right: 50%;
    bottom: 1.25rem;
    max-width: min(90vw, 420px);
    padding: .75rem 1rem;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 14px;
    color: #fff;
    background: rgba(13, 22, 49, .94);
    box-shadow: 0 1rem 2.5rem rgba(5, 10, 27, .25);
    transform: translateX(50%);
    animation: toast-in .25s ease both;
}

@keyframes toast-in {
    from {
        opacity: 0;
        transform: translate(50%, 12px);
    }

    to {
        opacity: 1;
        transform: translate(50%, 0);
    }
}

.floating-player {
    position: sticky;
    bottom: 1rem;
    z-index: 10;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 17px;
    background: rgba(16, 27, 55, .96);
    box-shadow: 0 1rem 2.5rem rgba(9, 15, 35, .23);
    backdrop-filter: blur(14px);
}

.player-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .8rem;
}

.player-options {
    flex-wrap: wrap;
    justify-content: flex-end;
}

.floating-player .form-select {
    min-height: 33px;
    width: auto;
    min-width: 108px;
    padding-top: .2rem;
    padding-bottom: .2rem;
    color: #fff;
    border-color: rgba(255, 255, 255, .14);
    background-color: rgba(255, 255, 255, .09);
}

.floating-player .form-select option {
    color: #152238;
}

.audio-player {
    position: relative;
    overflow: hidden;
    padding: .85rem 1rem !important;
    border: 1px solid rgba(91, 86, 214, .34);
    border-radius: 20px;
    color: var(--text);
    background:
        radial-gradient(circle at 8% 0%, rgba(91, 86, 214, .23), transparent 36%),
        linear-gradient(135deg, rgba(57, 196, 181, .14), rgba(141, 135, 255, .12)),
        var(--surface-raised);
    box-shadow: 0 1rem 2.2rem rgba(28, 35, 90, .13);
}

.audio-player.is-sticky {
    position: sticky;
    top: var(--reader-sticky-top, 72px);
    z-index: 24;
    box-shadow: 0 .8rem 1.8rem rgba(28, 35, 90, .2);
}

.audio-player::after {
    position: absolute;
    right: -35px;
    bottom: -55px;
    width: 150px;
    height: 150px;
    content: "";
    border: 1px solid rgba(57, 196, 181, .17);
    border-radius: 50%;
    pointer-events: none;
}

.audio-player-heading {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .8rem;
    margin-bottom: .75rem;
}

.audio-player-title-wrap {
    display: flex;
    align-items: center;
    gap: .65rem;
    min-width: 0;
}

.audio-player-icon {
    width: 38px;
    height: 38px;
    display: inline-flex;
    flex: 0 0 38px;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(57, 196, 181, .24);
    border-radius: 13px;
    color: #fff;
    background: linear-gradient(145deg, var(--teal), var(--primary));
    box-shadow: 0 .45rem 1rem rgba(57, 196, 181, .18);
}

.audio-player-kicker {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    color: var(--teal);
    font-size: .72rem;
    font-weight: 800;
}

.audio-player-title {
    margin-top: .1rem;
    color: var(--text);
    font-size: .92rem;
}

.audio-player-status {
    flex: 0 0 auto;
    padding: .3rem .6rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    background: var(--surface);
    font-size: .7rem;
    white-space: nowrap;
}

.audio-player-main {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: auto auto minmax(0, 1fr) auto;
    align-items: center;
    gap: .7rem;
    direction: ltr;
}

.audio-player-play {
    width: 48px;
    height: 48px;
    display: inline-flex;
    flex: 0 0 48px;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(145deg, var(--primary), var(--teal));
    box-shadow: 0 .6rem 1.2rem rgba(91, 86, 214, .25);
    font-size: 1.45rem;
    line-height: 0;
    transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}

.audio-player-play i,
.audio-player-stop i {
    width: 1em;
    height: 1em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    line-height: 1;
    text-align: center;
    transform: none;
}

.audio-player-play i::before,
.audio-player-stop i::before {
    display: block;
    line-height: 1;
    vertical-align: 0;
}

.audio-player-play:hover,
.audio-player-play:focus-visible {
    color: #fff;
    filter: brightness(1.08);
    transform: translateY(-2px);
    box-shadow: 0 .8rem 1.35rem rgba(91, 86, 214, .32);
}

.audio-player-play.is-playing {
    background: linear-gradient(145deg, #e0a53e, #ef6f61);
}

.chapter-audio {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.audio-player-track {
    min-width: 0;
}

.audio-player-track-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    margin-bottom: .35rem;
    color: var(--muted);
    font-size: .72rem;
}

.audio-player-time {
    color: var(--text);
    font-size: .7rem;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.audio-player-time-separator {
    margin-inline: .2rem;
    color: var(--muted);
}

.audio-progress {
    width: 100%;
    height: 7px;
    display: block;
    appearance: none;
    cursor: pointer;
    border: 0;
    border-radius: 999px;
    outline: none;
    direction: ltr;
    background: linear-gradient(
        to right,
        var(--primary) 0 var(--audio-progress, 0%),
        var(--line) var(--audio-progress, 0%) 100%
    );
}

.audio-progress::-webkit-slider-runnable-track {
    height: 7px;
    border-radius: 999px;
    background: transparent;
}

.audio-progress::-webkit-slider-thumb {
    width: 16px;
    height: 16px;
    margin-top: -4.5px;
    appearance: none;
    border: 3px solid var(--surface);
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 2px 8px rgba(91, 86, 214, .35);
}

.audio-progress::-moz-range-track {
    height: 7px;
    border-radius: 999px;
    background: var(--line);
}

.audio-progress::-moz-range-progress {
    height: 7px;
    border-radius: 999px;
    background: var(--primary);
}

.audio-progress::-moz-range-thumb {
    width: 12px;
    height: 12px;
    border: 3px solid var(--surface);
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 2px 8px rgba(91, 86, 214, .35);
}

.audio-player-stop {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 12px;
    color: var(--muted);
    background: var(--surface);
    font-size: 1rem;
    line-height: 0;
    direction: ltr;
    transition: color .2s ease, background-color .2s ease, transform .2s ease;
}

.audio-player-stop:hover,
.audio-player-stop:focus-visible {
    color: #ef6f61;
    background: var(--surface-raised);
    transform: translateY(-1px);
}

.audio-speed-label {
    display: flex;
    align-items: center;
    gap: .35rem;
    padding: .2rem .35rem .2rem .45rem;
    border: 1px solid var(--line);
    border-radius: 12px;
    color: var(--muted);
    background: var(--surface);
    font-size: .9rem;
}

.audio-speed-label .form-select {
    width: auto;
    min-width: 68px;
    min-height: 32px;
    padding: .15rem .3rem;
    border: 0;
    color: var(--text);
    background: transparent;
    box-shadow: none;
}

.audio-missing,
.empty-audio-state {
    display: flex;
    align-items: center;
    gap: .65rem;
    color: var(--muted);
    border: 1px dashed var(--line);
    border-radius: 15px;
    background: var(--surface-soft);
}

.audio-missing {
    font-size: .84rem;
}

.audio-missing i {
    color: var(--gold);
    font-size: 1.1rem;
}

.audio-preview-card {
    border: 1px solid var(--line);
    border-radius: 15px;
    background: var(--surface-soft);
}

.empty-audio-state {
    display: block;
    padding: 2.5rem 1rem;
    text-align: center;
}

.empty-audio-state i {
    color: var(--muted);
}

.empty-state {
    padding: 3.5rem 1.25rem;
    color: var(--muted);
    text-align: center;
    background: var(--surface);
}

.site-footer {
    background: #0b1126;
}

.back-to-top {
    position: fixed;
    z-index: 1020;
    left: clamp(.75rem, 3vw, 1.4rem);
    bottom: clamp(.75rem, 3vw, 1.4rem);
    width: 46px;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 15px;
    color: #fff;
    background: linear-gradient(145deg, var(--primary), var(--teal));
    box-shadow: 0 .7rem 1.5rem rgba(20, 29, 72, .24);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(12px);
    transition: opacity .38s cubic-bezier(.22, .75, .25, 1), visibility .38s ease, transform .38s cubic-bezier(.22, .75, .25, 1), filter .2s ease;
}

.back-to-top.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

.back-to-top:hover,
.back-to-top:focus-visible {
    color: #fff;
    filter: brightness(1.1);
    transform: translateY(-3px);
}

.back-to-top .bi {
    font-size: 1.15rem;
    line-height: 1;
}

.admin-body {
    background: var(--bg);
}

.admin-shell {
    min-height: calc(100vh - 76px);
}

.admin-sidebar {
    width: 260px;
    flex: 0 0 260px;
    background: var(--surface);
    border-left: 1px solid var(--line);
}

.admin-sidebar .nav-link {
    display: flex;
    align-items: center;
    gap: .7rem;
    color: var(--muted);
    border-radius: 12px;
    padding: .7rem .85rem;
}

.admin-sidebar .nav-link i {
    display: inline-block;
    margin-inline: 0 !important;
}

.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
    color: var(--primary);
    background: rgba(91, 86, 214, .11);
}

.admin-main {
    flex: 1;
    min-width: 0;
}

.admin-stat {
    position: relative;
    overflow: hidden;
    min-height: 136px;
    border: 0;
    border-radius: 20px;
    color: #fff;
    background: linear-gradient(135deg, #29246e, #625bda);
    box-shadow: var(--shadow-sm);
}

.admin-stat.gold {
    background: linear-gradient(135deg, #a26d18, #e0ad4d);
}

.admin-stat.teal {
    background: linear-gradient(135deg, #0b6a66, #2bb8a7);
}

.admin-stat .stat-icon {
    position: absolute;
    left: 1.2rem;
    bottom: .65rem;
    color: rgba(255, 255, 255, .19);
    font-size: 3.8rem;
}

.admin-stat .stat-value {
    font-size: 1.95rem;
    font-weight: 900;
}

.admin-card {
    border-radius: 20px;
}

.backup-status-badge {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .55rem .8rem;
    border: 1px solid rgba(30, 157, 144, .22);
    border-radius: 999px;
    color: var(--teal);
    background: var(--teal-soft);
    font-size: .78rem;
    font-weight: 800;
    white-space: nowrap;
}

.backup-action-card {
    background:
        radial-gradient(circle at 100% 0, rgba(91, 86, 214, .09), transparent 34%),
        var(--surface);
}

.backup-icon,
.backup-file-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.backup-icon {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    font-size: 1.25rem;
}

.backup-icon-primary {
    color: #fff;
    background: linear-gradient(145deg, var(--primary), var(--teal));
    box-shadow: 0 .6rem 1.35rem rgba(91, 86, 214, .18);
}

.backup-icon-warning {
    color: #6a4a12;
    background: var(--gold-soft);
}

html[data-theme="dark"] .backup-icon-warning {
    color: var(--gold);
}

.backup-feature-list {
    display: grid;
    gap: .65rem;
    padding: 0;
    list-style: none;
}

.backup-feature-list li {
    display: flex;
    align-items: center;
    gap: .5rem;
}

.backup-feature-list i {
    color: var(--teal);
    font-size: 1rem;
}

.backup-list {
    display: grid;
}

.backup-list-item {
    display: flex;
    align-items: center;
    gap: .85rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--line);
}

.backup-list-item:last-child {
    border-bottom: 0;
}

.backup-list-item strong {
    color: var(--text);
    font-size: .83rem;
}

.backup-actions {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    gap: .45rem;
}

.backup-actions form {
    display: inline-flex;
}

.backup-file-icon {
    width: 42px;
    height: 42px;
    border-radius: 13px;
    color: var(--primary);
    background: rgba(91, 86, 214, .1);
    font-size: 1.2rem;
}

.profile-heading {
    display: flex;
    align-items: center;
    gap: .85rem;
}

.profile-avatar {
    width: 52px;
    height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 52px;
    border-radius: 17px;
    color: #fff;
    background: linear-gradient(145deg, var(--primary), var(--teal));
    box-shadow: 0 .55rem 1.2rem rgba(91, 86, 214, .2);
    font-size: 1.35rem;
}

.profile-divider {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin: 1.4rem 0 1rem;
    color: var(--muted);
    font-size: .75rem;
    font-weight: 800;
}

.profile-divider::before,
.profile-divider::after {
    flex: 1;
    height: 1px;
    content: "";
    background: var(--line);
}

.profile-info-list {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 16px;
}

.profile-info-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .85rem 1rem;
    border-bottom: 1px solid var(--line);
}

.profile-info-row:last-child {
    border-bottom: 0;
}

.profile-info-row span {
    color: var(--muted);
    font-size: .78rem;
}

.profile-info-row strong {
    color: var(--text);
    font-size: .82rem;
    text-align: end;
}

.profile-security-note {
    display: flex;
    align-items: flex-start;
    gap: .65rem;
    padding: .85rem 1rem;
    border: 1px solid rgba(30, 157, 144, .2);
    border-radius: 15px;
    color: var(--muted);
    background: var(--teal-soft);
    font-size: .76rem;
    line-height: 1.9;
}

.profile-security-note i {
    flex: 0 0 auto;
    color: var(--teal);
    font-size: 1rem;
}

.admin-table {
    --bs-table-bg: var(--surface);
    --bs-table-color: var(--text);
    --bs-table-border-color: var(--line);
}

.admin-table thead th {
    color: var(--muted);
    background: var(--surface-soft);
    font-size: .78rem;
    font-weight: 800;
    white-space: nowrap;
}

.admin-table td {
    vertical-align: middle;
}

.admin-table .d-inline-flex.gap-1 > .btn.btn-sm,
.admin-table .d-inline-flex.gap-1 > form > .btn.btn-sm {
    width: 38px;
    height: 38px;
    min-width: 38px;
    min-height: 38px;
    padding: 0;
    border-radius: 10px;
}

.admin-table .d-inline-flex.gap-1 > .btn.btn-light,
.admin-table .d-inline-flex.gap-1 > form > .btn.btn-light {
    color: var(--muted);
    border-color: var(--line);
    background: var(--surface-raised);
}

.admin-table .d-inline-flex.gap-1 > .btn.btn-light:hover,
.admin-table .d-inline-flex.gap-1 > .btn.btn-light:focus-visible,
.admin-table .d-inline-flex.gap-1 > form > .btn.btn-light:hover,
.admin-table .d-inline-flex.gap-1 > form > .btn.btn-light:focus-visible {
    color: var(--primary);
    border-color: rgba(155, 147, 255, .5);
    background: var(--teal-soft);
    transform: translateY(-1px);
}

.admin-table .d-inline-flex.gap-1 > .btn.text-danger:hover,
.admin-table .d-inline-flex.gap-1 > .btn.text-danger:focus-visible,
.admin-table .d-inline-flex.gap-1 > form > .btn.text-danger:hover,
.admin-table .d-inline-flex.gap-1 > form > .btn.text-danger:focus-visible {
    color: #fff !important;
    border-color: #d85b70;
    background: #c9435b;
}

.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 1.5rem;
    background:
        radial-gradient(circle at 15% 20%, rgba(57, 196, 181, .28), transparent 30%),
        radial-gradient(circle at 85% 80%, rgba(141, 135, 255, .25), transparent 25%),
        linear-gradient(135deg, #090f23, #1d5869);
}

.login-card {
    width: min(100%, 430px);
    border: 1px solid var(--line);
    border-radius: 25px;
    background: var(--surface);
    box-shadow: 0 1.5rem 4rem rgba(0, 0, 0, .25);
}

.form-control,
.form-select {
    min-height: 44px;
    color: var(--text);
    border-color: var(--line);
    border-radius: 11px;
    background: var(--surface);
}

.form-control-sm,
.form-select-sm {
    min-height: 38px;
}

.form-control::placeholder {
    color: var(--muted);
}

.form-control::file-selector-button {
    color: var(--text);
    background: var(--surface-raised);
    border-color: var(--line);
}

.form-control:focus,
.form-select:focus {
    color: var(--text);
    border-color: var(--primary);
    background: var(--surface);
    box-shadow: 0 0 0 .2rem rgba(91, 86, 214, .14);
}

.searchable-field {
    min-height: 44px;
}

.searchable-field.is-invalid {
    border-color: #dc3545;
    box-shadow: 0 0 0 .2rem rgba(220, 53, 69, .12);
}

.input-group-text {
    color: var(--muted);
    border-color: var(--line);
    background: var(--surface);
}

.btn {
    border-radius: 11px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
}

.btn > .bi,
.nav-link-light > .bi,
.admin-sidebar .nav-link > .bi,
.badge > .bi {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    line-height: 1;
    vertical-align: 0;
    margin-inline: 0 !important;
}

.btn > .bi::before,
.nav-link-light > .bi::before,
.admin-sidebar .nav-link > .bi::before,
.badge > .bi::before {
    vertical-align: 0;
}

.site-menu-close {
    display: none;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
}

.badge > .bi {
    margin-inline: 0 !important;
}

.btn.btn-sm {
    min-height: 38px;
}

.btn.btn-lg {
    min-height: 48px;
}

.reader-actions > .btn,
.font-size-control > .font-size-button {
    height: 40px;
    min-height: 40px;
}

.reader-actions > .btn {
    padding-block: 0;
}

.font-size-button {
    min-height: 40px;
}

.audio-player .btn.btn-sm {
    min-height: 36px;
}

.btn-primary {
    --bs-btn-bg: var(--primary);
    --bs-btn-border-color: var(--primary);
    --bs-btn-hover-bg: var(--primary-dark);
    --bs-btn-hover-border-color: var(--primary-dark);
}

.btn-gold {
    color: #1b213c;
    background: var(--gold);
    border-color: var(--gold);
}

.btn-gold:hover,
.btn-gold:focus {
    color: #1b213c;
    background: #f7d487;
    border-color: #f7d487;
}

.text-muted-custom {
    color: var(--muted) !important;
}

html[data-theme="dark"] .text-dark {
    color: var(--text) !important;
}

html[data-theme="dark"] body {
    background:
        radial-gradient(circle at 8% 0%, rgba(67, 210, 193, .06), transparent 25%),
        radial-gradient(circle at 92% 18%, rgba(155, 147, 255, .08), transparent 28%),
        var(--bg);
}

html[data-theme="dark"] .bg-light,
html[data-theme="dark"] .text-bg-light {
    color: var(--text) !important;
    background-color: var(--surface-soft) !important;
}

html[data-theme="dark"] .btn-light {
    --bs-btn-color: var(--text);
    --bs-btn-bg: var(--surface-raised);
    --bs-btn-border-color: var(--line);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--primary);
    --bs-btn-hover-border-color: var(--primary);
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: var(--primary-dark);
    --bs-btn-active-border-color: var(--primary-dark);
}

html[data-theme="dark"] .btn-outline-secondary {
    --bs-btn-color: var(--muted);
    --bs-btn-border-color: var(--line);
    --bs-btn-hover-color: var(--text);
    --bs-btn-hover-bg: var(--surface-raised);
    --bs-btn-hover-border-color: var(--primary);
}

html[data-theme="dark"] .chapter-nav .btn.btn-light,
html[data-theme="dark"] .chapter-nav .btn.btn-light:hover,
html[data-theme="dark"] .chapter-nav .btn.btn-light:focus {
    color: #0b1126 !important;
    border-color: #f5f7ff !important;
    background: #f5f7ff !important;
}

html[data-theme="dark"] .alert {
    color: var(--text);
}

html[data-theme="dark"] .form-text {
    color: var(--muted) !important;
}

@media (max-width: 991.98px) {
    .site-navbar .navbar-toggler {
        display: inline-flex;
    }

    .site-navbar .mobile-theme-toggle {
        width: 36px;
        height: 36px;
        min-width: 36px;
        min-height: 36px;
        display: inline-flex !important;
        flex: 0 0 36px;
        margin-inline-start: 0;
        margin-inline-end: .35rem;
        border-radius: 50% !important;
    }

    .site-menu-panel .theme-toggle {
        display: none !important;
    }

    .site-navbar.menu-open {
        z-index: 1050;
    }

    .site-menu-backdrop,
    .admin-menu-backdrop {
        position: fixed;
        z-index: 1040;
        inset: 0;
        display: block;
        visibility: hidden;
        opacity: 0;
        background: rgba(3, 8, 20, .62);
        transition: opacity .25s ease, visibility .25s ease;
    }

    .site-menu-backdrop.is-visible,
    .admin-menu-backdrop.is-visible {
        visibility: visible;
        opacity: 1;
        pointer-events: auto;
    }

    .site-menu-panel {
        position: fixed;
        z-index: 1041;
        top: 0;
        right: 0;
        bottom: 0;
        width: min(88vw, 360px);
        height: 100dvh;
        display: flex !important;
        visibility: hidden;
        align-items: stretch;
        flex-direction: column;
        overflow-y: auto;
        padding: 5rem 1rem 1.25rem;
        border-left: 1px solid var(--line);
        background:
            radial-gradient(circle at 10% 0%, var(--teal-soft), transparent 32%),
            linear-gradient(160deg, var(--surface), var(--surface-raised));
        box-shadow: -1rem 0 3rem rgba(0, 0, 0, .22);
        transform: translateX(105%);
        transition: transform .28s ease, visibility .28s ease;
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
    }

    .site-menu-panel.is-open {
        visibility: visible;
        transform: translateX(0);
    }

    .site-menu-close {
        position: absolute;
        top: 1rem;
        left: 1rem;
        display: inline-flex;
    }

    .site-menu-panel .navbar-nav {
        width: 100%;
        display: flex;
        align-items: stretch !important;
        flex-direction: column;
        gap: .45rem;
        margin: 0 !important;
    }

    .site-menu-panel .nav-link-light,
    .site-menu-panel .navbar-nav > .btn:not(.theme-toggle) {
        width: 100%;
        min-height: 44px;
        color: var(--text);
        justify-content: flex-start;
        margin: 0 !important;
        padding-inline: .9rem !important;
        border-radius: 14px;
    }

    .site-menu-panel .nav-link-light:hover,
    .site-menu-panel .nav-link-light:focus,
    .site-menu-panel .btn-outline-light:hover,
    .site-menu-panel .btn-outline-light:focus-visible {
        color: var(--text);
        border-color: var(--line);
        background: var(--surface-soft);
    }

    .site-menu-panel .btn-outline-light {
        color: var(--text);
        border-color: var(--line);
    }

    .site-menu-panel .nav-link-light {
        color: #25314a;
        border: 1px solid rgba(91, 86, 214, .08);
        background: rgba(255, 255, 255, .68);
        box-shadow: 0 .45rem 1.2rem rgba(43, 58, 89, .06);
    }

    .site-menu-panel .nav-link-light:hover,
    .site-menu-panel .nav-link-light:focus {
        color: var(--primary-dark);
        border-color: rgba(91, 86, 214, .22);
        background: #fff;
        box-shadow: 0 .55rem 1.35rem rgba(43, 58, 89, .1);
    }

    .site-menu-panel .navbar-nav > .btn-light {
        color: #25314a;
        border-color: rgba(91, 86, 214, .12);
        background: #fff;
        box-shadow: 0 .45rem 1.2rem rgba(43, 58, 89, .08);
    }

    .site-menu-panel .theme-toggle {
        color: var(--primary);
        border-color: rgba(91, 86, 214, .22);
        background: rgba(91, 86, 214, .1);
    }

    .site-menu-panel .theme-toggle:hover,
    .site-menu-panel .theme-toggle:focus-visible {
        color: var(--primary-dark);
        border-color: rgba(91, 86, 214, .4);
        background: rgba(91, 86, 214, .17);
    }

    .site-menu-panel .site-menu-close {
        color: #25314a;
        border-color: rgba(91, 86, 214, .16);
        background: rgba(255, 255, 255, .72);
    }

    .site-menu-panel .site-menu-close:hover,
    .site-menu-panel .site-menu-close:focus-visible {
        color: var(--primary-dark);
        border-color: rgba(91, 86, 214, .35);
        background: #fff;
    }

    html[data-theme="dark"] .site-menu-panel .nav-link-light {
        color: var(--text);
        border-color: rgba(183, 205, 235, .1);
        background: rgba(255, 255, 255, .045);
        box-shadow: none;
    }

    html[data-theme="dark"] .site-menu-panel .nav-link-light:hover,
    html[data-theme="dark"] .site-menu-panel .nav-link-light:focus {
        color: #fff;
        border-color: rgba(67, 210, 193, .34);
        background: rgba(67, 210, 193, .13);
    }

    html[data-theme="dark"] .site-menu-panel .navbar-nav > .btn-light {
        color: var(--text);
        border-color: var(--line);
        background: var(--surface-raised);
        box-shadow: none;
    }

    html[data-theme="dark"] .site-menu-panel .theme-toggle {
        color: var(--gold);
        border-color: rgba(246, 207, 120, .28);
        background: rgba(246, 207, 120, .1);
    }

    html[data-theme="dark"] .site-menu-panel .theme-toggle:hover,
    html[data-theme="dark"] .site-menu-panel .theme-toggle:focus-visible {
        color: var(--gold);
        border-color: rgba(246, 207, 120, .52);
        background: rgba(246, 207, 120, .17);
    }

    html[data-theme="dark"] .site-menu-panel .site-menu-close {
        color: var(--text);
        border-color: var(--line);
        background: rgba(255, 255, 255, .06);
    }

    .site-menu-panel .theme-toggle {
        width: 44px;
        height: 44px;
        min-width: 44px;
        min-height: 44px;
        flex: 0 0 44px;
        margin: .25rem 0 0 !important;
        align-self: flex-start;
        border-radius: 13px !important;
    }

    body.mobile-menu-open,
    body.admin-menu-open {
        overflow: hidden;
    }

    .hero-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .hero-content {
        max-width: 780px;
        margin-inline: auto;
        text-align: center;
    }

    .hero-content .hero-badge,
    .hero-actions {
        justify-content: center;
    }

    .hero-visual {
        min-height: 250px;
    }

    .admin-shell {
        display: block !important;
    }

    .admin-sidebar {
        position: fixed;
        z-index: 1041;
        top: 0;
        right: 0;
        bottom: 0;
        width: min(88vw, 330px);
        height: 100dvh;
        flex-basis: auto;
        overflow-y: auto;
        border: 0;
        visibility: hidden;
        box-shadow: -1rem 0 3rem rgba(0, 0, 0, .28);
        transform: translateX(105%);
        transition: transform .28s ease, visibility .28s ease;
    }

    .admin-sidebar.is-open {
        visibility: visible;
        transform: translateX(0);
    }

    .admin-sidebar-close {
        position: absolute;
        top: 1rem;
        left: 1rem;
        display: inline-flex;
    }

    .admin-sidebar > .small {
        padding-inline-end: 2.5rem;
    }

    .admin-sidebar .nav {
        display: flex;
        flex-direction: column;
        gap: .35rem;
    }

    .admin-header-actions {
        gap: .4rem !important;
    }

    .admin-menu-toggle {
        display: inline-flex;
    }
}

@media (max-width: 767.98px) {
    .home-hero {
        min-height: auto;
    }

    .hero-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .hero-content {
        max-width: 100%;
    }

    .hero-visual {
        display: none;
    }

    .testaments-section {
        padding-top: 2rem !important;
        padding-bottom: .75rem !important;
    }

    .testaments-section > .row {
        margin-bottom: .5rem !important;
    }

    .testaments-section + .site-footer {
        margin-top: .75rem !important;
    }

    .home-hero .container {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }

    .daily-verse-card {
        align-items: flex-start;
    }

    .daily-verse-heading,
    .daily-verse-footer {
        align-items: flex-start;
        flex-direction: column;
        text-align: right;
    }

    .daily-verse-footer {
        gap: .85rem;
    }

    .verse-card {
        display: block;
    }

    .verse-number {
        width: 36px;
        flex: 0 0 auto;
        margin-bottom: .55rem;
    }

    .verse-content {
        width: 100%;
    }

    .verse-card-footer {
        align-items: center;
        flex-direction: row;
        gap: .5rem;
    }

    .verse-reference-short {
        flex: 1 1 auto;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .verse-actions {
        width: 100%;
        justify-content: center;
    }

    .reader-topline {
        align-items: flex-start;
        flex-direction: column;
    }

    .reader-actions {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .reader-font-toolbar {
        margin-inline: .75rem;
    }

    .reader-shell {
        --reader-sticky-top: 64px;
    }

    .chapter-picker {
        display: block;
    }

    .chapter-picker-label {
        display: block;
        margin-bottom: .55rem;
    }

    .player-main {
        align-items: flex-start;
        flex-direction: column;
    }

    .player-options {
        width: 100%;
        justify-content: flex-start;
    }

    .audio-player-main {
        grid-template-columns: auto auto minmax(0, 1fr);
    }

    .audio-player-track {
        grid-column: 3;
        grid-row: 1;
    }

    .audio-speed-label {
        grid-column: 1 / -1;
        grid-row: 2;
        justify-self: end;
        margin-top: .1rem;
    }
}

@media (max-width: 575.98px) {
    .back-to-top {
        width: 42px;
        height: 42px;
        border-radius: 13px;
    }

    .hero h1 {
        font-size: clamp(2rem, 9vw, 2.7rem);
    }

    .hero p {
        font-size: .92rem;
    }

    .hero-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .hero-actions .btn {
        width: 100%;
    }

    .hero-note {
        justify-content: center;
    }

    .hero-visual {
        min-height: 215px;
    }

    .hero-book-shape {
        width: 195px;
    }

    .hero-book-symbol {
        width: 64px;
        height: 64px;
        border-radius: 20px;
        font-size: 1.65rem;
    }

    .hero-book-label {
        font-size: 1.05rem;
    }

    .hero-floating-note {
        width: 44px;
        height: 44px;
        border-radius: 14px;
    }

    .hero-floating-note-one {
        right: calc(50% - 124px);
    }

    .hero-floating-note-two {
        left: calc(50% - 124px);
    }

    .hero-quote-card {
        max-width: 220px;
        font-size: .7rem;
    }

    .daily-verse-card {
        border-radius: 22px;
        padding: 1.1rem;
    }

    .daily-verse-text {
        font-size: 1rem;
        line-height: 2;
    }

    .daily-verse-card .verse-actions > .btn:not(.verse-action-trigger) > span,
    .verse-card .verse-actions > .btn:not(.verse-action-trigger) > span {
        display: none;
    }

    .daily-verse-card .verse-actions > .btn:not(.verse-action-trigger),
    .verse-card .verse-actions > .btn:not(.verse-action-trigger) {
        width: 38px;
        min-width: 38px;
        padding-inline: 0;
    }

    .verse-card {
        gap: .6rem;
        padding: .9rem .8rem;
    }

    .verse-number {
        flex-basis: 33px;
        height: 33px;
        border-radius: 10px;
        font-size: .78rem;
    }

    .verse-text {
        line-height: 2.15;
    }

    .font-size-control .btn {
        min-width: 40px;
        min-height: 40px;
    }

    .verse-action-dialog {
        width: min(100%, 480px);
        padding: 1.2rem .9rem;
        border-radius: 24px;
    }

    .verse-action-modal-heading {
        padding-inline: 1.2rem;
    }

    .verse-action-modal-actions {
        grid-template-columns: 1fr;
    }

    .verse-action-modal-preview p {
        max-height: 180px;
        font-size: 1rem;
    }

    .reader-font-toolbar {
        gap: .65rem;
        padding-inline-start: .7rem;
    }

    .reader-font-label {
        font-size: .72rem;
    }

    .reader-font-toolbar .font-size-control {
        height: 42px;
    }

    .reader-font-toolbar .font-size-button {
        width: 36px;
        height: 36px;
        min-width: 36px;
        min-height: 36px;
        font-size: 1.35rem;
    }

    .player-options {
        align-items: stretch;
        flex-direction: column;
    }

    .player-options label {
        justify-content: space-between;
    }

    .floating-player .form-select {
        flex: 1;
    }

    .audio-player-heading {
        align-items: flex-start;
    }

    .audio-player-main {
        gap: .55rem;
    }

    .audio-player-play {
        width: 44px;
        height: 44px;
        flex-basis: 44px;
    }

    .audio-player-track {
        min-width: 0;
    }

    .audio-player-status {
        padding-inline: .45rem;
        font-size: .64rem;
    }

    .audio-speed-label {
        margin-inline-start: 0;
        justify-self: stretch;
        justify-content: space-between;
    }

    .audio-speed-label .form-select {
        flex: 1;
    }

    .backup-status-badge {
        align-self: flex-start;
    }

    .backup-list-item {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .backup-list-item .btn {
        min-width: 0;
    }

    .backup-actions {
        width: 100%;
        margin-inline-start: 3.1rem;
        justify-content: flex-start;
    }

    .admin-header-actions .btn {
        width: 36px;
        min-width: 36px;
        height: 36px;
        min-height: 36px;
        padding-inline: 0 !important;
    }
}

@media (min-width: 992px) {
    .site-menu-panel .site-menu-close,
    .admin-sidebar-close {
        display: none !important;
    }
}

@media (max-width: 991.98px) {
    .site-menu-panel .site-menu-close {
        display: inline-flex !important;
    }
}

/*
 * Light theme contrast
 * The dark theme already has its own contrast system. These rules keep
 * light surfaces, borders, controls and admin sections visually separated.
 */
html:not([data-theme="dark"]) .testament-card,
html:not([data-theme="dark"]) .book-card,
html:not([data-theme="dark"]) .feature-card,
html:not([data-theme="dark"]) .reader-shell,
html:not([data-theme="dark"]) .admin-card,
html:not([data-theme="dark"]) .search-panel {
    border-color: var(--line-strong);
    box-shadow: var(--shadow-sm);
}

html:not([data-theme="dark"]) .testament-card,
html:not([data-theme="dark"]) .book-card,
html:not([data-theme="dark"]) .feature-card,
html:not([data-theme="dark"]) .reader-shell,
html:not([data-theme="dark"]) .admin-card {
    background-color: var(--surface);
}

html:not([data-theme="dark"]) .testament-card:hover,
html:not([data-theme="dark"]) .book-card:hover {
    border-color: rgba(91, 86, 214, .42);
    box-shadow: var(--shadow-md);
}

html:not([data-theme="dark"]) .search-panel {
    background: #fff;
}

html:not([data-theme="dark"]) .verse-search-panel {
    border-color: #c6d2df;
    background: #eef3f8;
}

html:not([data-theme="dark"]) .reader-font-toolbar {
    border-color: var(--line-strong);
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 .65rem 1.5rem rgba(19, 34, 56, .12);
}

html:not([data-theme="dark"]) .reader-font-toolbar .font-size-control {
    border-color: var(--line-strong);
    background: #edf2f7;
}

html:not([data-theme="dark"]) .verse-list {
    background: #fff;
}

html:not([data-theme="dark"]) .verse-card {
    border-bottom-color: #d8e1eb;
}

html:not([data-theme="dark"]) .verse-card:hover {
    background: #f7faff;
}

html:not([data-theme="dark"]) .form-label {
    color: #43546b;
}

html:not([data-theme="dark"]) .form-control,
html:not([data-theme="dark"]) .form-select {
    color: var(--text);
    border-color: var(--line-strong);
    background: #fff;
    box-shadow: inset 0 1px 2px rgba(19, 34, 56, .035);
}

html:not([data-theme="dark"]) .form-control::placeholder {
    color: #7a899b;
}

html:not([data-theme="dark"]) .form-control::file-selector-button {
    color: #43546b;
    border-inline-end: 1px solid var(--line-strong);
    background: #edf2f7;
}

html:not([data-theme="dark"]) .form-control:focus,
html:not([data-theme="dark"]) .form-select:focus {
    border-color: var(--primary);
    background: #fff;
    box-shadow:
        0 0 0 .2rem rgba(91, 86, 214, .16),
        inset 0 1px 2px rgba(19, 34, 56, .035);
}

html:not([data-theme="dark"]) .form-control:disabled,
html:not([data-theme="dark"]) .form-select:disabled {
    color: #7a899b;
    border-color: #d0d9e4;
    background: #eef2f6;
}

html:not([data-theme="dark"]) .input-group-text {
    color: #5a6b80;
    border-color: var(--line-strong);
    background: #edf2f7;
}

html:not([data-theme="dark"]) .form-check-input {
    border-color: var(--line-strong);
    background-color: #fff;
}

html:not([data-theme="dark"]) .form-check-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 .2rem rgba(91, 86, 214, .14);
}

html:not([data-theme="dark"]) .form-check-input:checked {
    border-color: var(--primary);
    background-color: var(--primary);
}

html:not([data-theme="dark"]) .admin-sidebar {
    background: #f8fafc;
    border-left-color: var(--line-strong);
}

html:not([data-theme="dark"]) .admin-sidebar .nav-link {
    color: #5e6e83;
    border: 1px solid transparent;
}

html:not([data-theme="dark"]) .admin-sidebar .nav-link:hover {
    color: var(--primary-dark);
    border-color: #d2dce8;
    background: #e9eff6;
}

html:not([data-theme="dark"]) .admin-sidebar .nav-link.active {
    color: var(--primary-dark);
    border-color: rgba(91, 86, 214, .24);
    background: #ececff;
}

html:not([data-theme="dark"]) .admin-main .bg-light,
html:not([data-theme="dark"]) .admin-sidebar .bg-light {
    color: var(--text) !important;
    border: 1px solid var(--line-strong) !important;
    background: #eef3f8 !important;
}

html:not([data-theme="dark"]) .admin-main a.bg-light {
    text-decoration: none;
    transition: background-color .2s ease, border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

html:not([data-theme="dark"]) .admin-main a.bg-light:hover,
html:not([data-theme="dark"]) .admin-main a.bg-light:focus-visible {
    border-color: rgba(91, 86, 214, .34) !important;
    background: #fff !important;
    box-shadow: 0 .5rem 1.15rem rgba(19, 34, 56, .09);
    transform: translateY(-2px);
}

html:not([data-theme="dark"]) .admin-table thead th {
    color: #52637a;
    border-bottom-color: var(--line-strong);
    background: #e7eef6;
}

html:not([data-theme="dark"]) .admin-table tbody tr {
    --bs-table-hover-bg: #f5f8fb;
}

html:not([data-theme="dark"]) .admin-table tbody tr:hover > * {
    background-color: #f5f8fb;
}

html:not([data-theme="dark"]) .admin-table .d-inline-flex.gap-1 > .btn.btn-light,
html:not([data-theme="dark"]) .admin-table .d-inline-flex.gap-1 > form > .btn.btn-light {
    color: #5e6e83;
    border-color: var(--line-strong);
    background: #fff;
}

html:not([data-theme="dark"]) .login-card {
    border-color: var(--line-strong);
    box-shadow: 0 1.5rem 4rem rgba(19, 34, 56, .2);
}

html:not([data-theme="dark"]) .profile-info-list {
    border-color: var(--line-strong);
}

html:not([data-theme="dark"]) .site-menu-panel {
    border-left-color: var(--line-strong);
}

html:not([data-theme="dark"]) .site-menu-panel .nav-link-light {
    color: #3f5067;
    border-color: #d0dbe7;
    background: #f2f6fa;
    box-shadow: 0 .45rem 1.15rem rgba(43, 58, 89, .08);
}

html:not([data-theme="dark"]) .site-menu-panel .nav-link-light:hover,
html:not([data-theme="dark"]) .site-menu-panel .nav-link-light:focus,
html:not([data-theme="dark"]) .site-menu-panel .navbar-nav > .btn-light:hover,
html:not([data-theme="dark"]) .site-menu-panel .navbar-nav > .btn-light:focus-visible {
    color: var(--primary-dark);
    border-color: rgba(91, 86, 214, .34);
    background: #fff;
}

html:not([data-theme="dark"]) .site-menu-panel .navbar-nav > .btn-light,
html:not([data-theme="dark"]) .site-menu-panel .site-menu-close {
    color: #3f5067;
    border-color: #d0dbe7;
    background: #fff;
}

html:not([data-theme="dark"]) .reader-header .reader-verse-filter {
    border: 1px solid #b8c7d7;
    background: #ffffff;
    box-shadow: 0 .65rem 1.45rem rgba(7, 20, 43, .2);
}

html:not([data-theme="dark"]) .reader-header .reader-verse-filter .form-label {
    color: #3f5067;
}

html:not([data-theme="dark"]) .reader-header .reader-verse-filter .input-group-text,
html:not([data-theme="dark"]) .reader-header .reader-verse-filter .form-control,
html:not([data-theme="dark"]) .reader-header .reader-verse-filter .form-select {
    color: var(--text);
    border-color: #b9c7d6;
    background: #f8fafc;
}

html:not([data-theme="dark"]) .reader-header .reader-verse-filter .form-control::placeholder {
    color: #7a899b;
}

html:not([data-theme="dark"]) .reader-header .reader-verse-filter .form-control:focus,
html:not([data-theme="dark"]) .reader-header .reader-verse-filter .form-select:focus {
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 .2rem rgba(91, 86, 214, .16);
}

html:not([data-theme="dark"]) .reader-header .reader-verse-filter .btn-light {
    color: #52637a;
    border-color: #b9c7d6;
    background: #edf2f7;
}

/*
 * Shared visual polish
 * Keep every interactive control on the same baseline and give the
 * repeated surfaces a consistent, calm interaction language.
 */
.btn {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .55rem;
    line-height: 1.2;
    vertical-align: middle;
    transition:
        color .2s ease,
        background-color .2s ease,
        border-color .2s ease,
        box-shadow .2s ease,
        transform .2s ease,
        filter .2s ease;
}

.btn:not(:disabled):not(.disabled):active {
    transform: translateY(1px);
}

.btn:focus-visible {
    box-shadow:
        0 0 0 .2rem rgba(91, 86, 214, .17),
        0 .35rem .85rem rgba(19, 34, 56, .1);
}

.btn:disabled,
.btn.disabled {
    cursor: not-allowed;
    filter: saturate(.7);
    opacity: .62;
}

.btn-primary,
.btn-gold,
.btn-outline-primary,
.btn-outline-secondary,
.btn-outline-danger,
.btn-light {
    box-shadow: 0 .25rem .7rem rgba(19, 34, 56, .08);
}

.btn-primary:hover,
.btn-gold:hover,
.btn-outline-primary:hover,
.btn-outline-secondary:hover,
.btn-outline-danger:hover,
.btn-light:hover {
    transform: translateY(-1px);
}

.btn > .bi,
.nav-link-light > .bi,
.admin-sidebar .nav-link > .bi,
.badge > .bi,
.input-group-text > .bi,
.site-menu-close > .bi,
.admin-sidebar-close > .bi,
.admin-menu-toggle > .bi,
.navbar-toggler > .bi,
.verse-action-modal-close > .bi,
.back-to-top > .bi {
    width: 1.1em;
    height: 1.1em;
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    margin: 0 !important;
    line-height: 1;
    vertical-align: middle;
}

.btn > .bi::before,
.nav-link-light > .bi::before,
.admin-sidebar .nav-link > .bi::before,
.badge > .bi::before,
.input-group-text > .bi::before,
.site-menu-close > .bi::before,
.admin-sidebar-close > .bi::before,
.admin-menu-toggle > .bi::before,
.navbar-toggler > .bi::before,
.verse-action-modal-close > .bi::before,
.back-to-top > .bi::before {
    display: block;
    line-height: 1;
    vertical-align: 0;
}

.nav-link-light,
.admin-sidebar .nav-link {
    line-height: 1.25;
}

.admin-sidebar .nav-link {
    min-height: 44px;
    font-weight: 700;
    transition:
        color .2s ease,
        background-color .2s ease,
        border-color .2s ease,
        box-shadow .2s ease,
        transform .2s ease;
}

.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link:focus-visible {
    transform: translateX(-2px);
}

.admin-sidebar .nav-link > .bi {
    width: 1.25rem;
    height: 1.25rem;
    font-size: 1rem;
}

.badge {
    min-height: 28px;
    line-height: 1;
}

.input-group-text {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.form-control,
.form-select,
.input-group-text {
    transition:
        color .2s ease,
        background-color .2s ease,
        border-color .2s ease,
        box-shadow .2s ease;
}

.search-panel {
    background: linear-gradient(145deg, var(--surface), var(--surface-soft));
    transition:
        border-color .2s ease,
        box-shadow .2s ease,
        transform .2s ease;
}

.search-panel:focus-within {
    border-color: color-mix(in srgb, var(--primary) 55%, var(--line));
    box-shadow:
        0 .7rem 1.65rem rgba(19, 34, 56, .1),
        0 0 0 .18rem rgba(91, 86, 214, .08);
}

.testament-card,
.book-card,
.feature-card {
    transition:
        transform .24s cubic-bezier(.22, .75, .25, 1),
        border-color .24s ease,
        box-shadow .24s ease,
        background-color .24s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    border-color: rgba(91, 86, 214, .34);
    box-shadow: var(--shadow-md);
}

.reader-shell,
.admin-card {
    transition:
        border-color .24s ease,
        box-shadow .24s ease;
}

.reader-shell:focus-within,
.admin-card:focus-within {
    border-color: color-mix(in srgb, var(--primary) 35%, var(--line));
}

.admin-main {
    background:
        radial-gradient(circle at 100% 0, rgba(91, 86, 214, .035), transparent 28rem),
        radial-gradient(circle at 0 100%, rgba(30, 157, 144, .035), transparent 25rem),
        var(--bg);
}

.admin-stat {
    transition:
        transform .24s cubic-bezier(.22, .75, .25, 1),
        box-shadow .24s ease,
        filter .24s ease;
}

.admin-stat::before {
    position: absolute;
    top: -78px;
    right: -52px;
    width: 190px;
    height: 190px;
    content: "";
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 50%;
    box-shadow: 0 0 0 24px rgba(255, 255, 255, .035);
    pointer-events: none;
}

.admin-stat:hover {
    filter: brightness(1.04);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.admin-table tbody tr {
    transition: background-color .2s ease, box-shadow .2s ease;
}

.admin-table tbody tr > td {
    transition: background-color .2s ease, color .2s ease;
}

.admin-table .d-inline-flex.gap-1 > .btn.btn-sm,
.admin-table .d-inline-flex.gap-1 > form > .btn.btn-sm {
    line-height: 1;
}

.admin-table .d-inline-flex.gap-1 > .btn.btn-sm > .bi,
.admin-table .d-inline-flex.gap-1 > form > .btn.btn-sm > .bi {
    width: 1.15em;
    height: 1.15em;
}

.alert {
    border-radius: 15px;
    box-shadow: 0 .35rem 1rem rgba(19, 34, 56, .06);
}

.alert .btn-close {
    width: 1rem;
    height: 1rem;
    min-width: 1rem;
    min-height: 1rem;
    padding: .3rem;
    border-radius: 50%;
    opacity: .7;
}

.empty-state {
    border: 1px dashed var(--line-strong);
    border-radius: 20px;
}

.empty-state > i {
    color: var(--primary);
    opacity: .8;
}

.audio-player,
.audio-preview-card,
.audio-missing,
.empty-audio-state {
    transition:
        border-color .22s ease,
        box-shadow .22s ease,
        transform .22s ease;
}

.audio-player:hover,
.audio-preview-card:hover {
    border-color: color-mix(in srgb, var(--primary) 58%, var(--line));
}

.audio-player-stop,
.audio-speed-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.audio-player-stop > .bi {
    width: 1.05em;
    height: 1.05em;
}

.theme-toggle,
.site-menu-close,
.admin-sidebar-close,
.admin-menu-toggle,
.navbar-toggler,
.back-to-top,
.verse-action-modal-close {
    line-height: 1;
}

.admin-header-actions > .btn {
    height: 38px;
    min-height: 38px;
}

.admin-header-actions > .theme-toggle {
    width: 38px;
    min-width: 38px;
    flex-basis: 38px;
    height: 38px;
}

@media (max-width: 575.98px) {
    .admin-header-actions > .btn {
        width: 36px;
        min-width: 36px;
        height: 36px;
        min-height: 36px;
    }

    .admin-header-actions > .theme-toggle {
        width: 36px;
        min-width: 36px;
        flex-basis: 36px;
        height: 36px;
    }
}

/* Audio speed control */
.audio-speed-label {
    min-height: 42px;
    gap: .45rem;
    padding: .28rem .35rem .28rem .48rem;
    border: 1px solid color-mix(in srgb, var(--primary) 24%, var(--line));
    border-radius: 14px;
    color: var(--muted);
    background:
        linear-gradient(145deg, color-mix(in srgb, var(--teal-soft) 68%, var(--surface)), var(--surface)),
        var(--surface);
    box-shadow: 0 .3rem .8rem rgba(19, 34, 56, .08);
    font-size: .78rem;
    font-weight: 800;
    transition:
        border-color .2s ease,
        background-color .2s ease,
        box-shadow .2s ease,
        transform .2s ease;
}

.audio-speed-label > .bi {
    width: 30px;
    height: 30px;
    display: inline-flex;
    flex: 0 0 30px;
    align-items: center;
    justify-content: center;
    border: 1px solid color-mix(in srgb, var(--teal) 30%, var(--line));
    border-radius: 10px;
    color: var(--teal);
    background: var(--teal-soft);
    font-size: .92rem;
    line-height: 1;
}

.audio-speed-caption {
    color: var(--muted);
    white-space: nowrap;
}

.audio-speed-label .form-select {
    width: auto;
    min-width: 82px;
    min-height: 32px;
    padding: .32rem 1.7rem .32rem .55rem;
    border: 1px solid color-mix(in srgb, var(--primary) 25%, var(--line));
    border-radius: 9px;
    color: var(--text);
    background-color: var(--surface-raised);
    box-shadow: none;
    font-size: .78rem;
    font-weight: 900;
    line-height: 1;
}

.audio-speed-label .form-select:hover {
    border-color: color-mix(in srgb, var(--primary) 52%, var(--line));
}

.audio-speed-label:focus-within {
    border-color: color-mix(in srgb, var(--primary) 62%, var(--line));
    box-shadow:
        0 0 0 .18rem rgba(91, 86, 214, .1),
        0 .45rem 1rem rgba(19, 34, 56, .1);
    transform: translateY(-1px);
}

.audio-speed-label .form-select option {
    color: var(--text);
    background: var(--surface);
    font-weight: 700;
}

html[data-theme="dark"] .audio-speed-label {
    border-color: rgba(155, 147, 255, .32);
    background:
        linear-gradient(145deg, rgba(67, 210, 193, .14), rgba(155, 147, 255, .11)),
        var(--surface-raised);
    box-shadow: 0 .35rem .9rem rgba(0, 0, 0, .22);
}

html[data-theme="dark"] .audio-speed-label > .bi {
    border-color: rgba(67, 210, 193, .28);
    color: var(--teal);
    background: rgba(67, 210, 193, .13);
}

html[data-theme="dark"] .audio-speed-label .form-select {
    border-color: rgba(183, 205, 235, .24);
    color: var(--text);
    background-color: var(--surface);
}

html[data-theme="dark"] .audio-speed-label .form-select option {
    color: var(--text);
    background: var(--surface-raised);
}

html:not([data-theme="dark"]) .audio-speed-label {
    border-color: #b9c7d6;
    background:
        linear-gradient(145deg, #ffffff, #edf5f8),
        #ffffff;
    box-shadow: 0 .35rem .9rem rgba(19, 34, 56, .1);
}

html:not([data-theme="dark"]) .audio-speed-label > .bi {
    border-color: rgba(30, 157, 144, .28);
    color: #137d74;
    background: #e1f5f1;
}

html:not([data-theme="dark"]) .audio-speed-label .form-select {
    border-color: #b9c7d6;
    color: #253650;
    background-color: #ffffff;
}

html:not([data-theme="dark"]) .audio-speed-label .form-select option {
    color: #253650;
    background: #ffffff;
}

@media (max-width: 575.98px) {
    .audio-speed-label {
        min-height: 44px;
        gap: .55rem;
        padding-inline: .45rem;
    }

    .audio-speed-label .form-select {
        min-height: 34px;
        min-width: 88px;
    }
}

@media (min-width: 992px) {
    html:not([data-theme="dark"]) .site-menu-panel .nav-link-light {
        color: rgba(255, 255, 255, .76);
        border-color: transparent;
        background: transparent;
        box-shadow: none;
    }

    html:not([data-theme="dark"]) .site-menu-panel .nav-link-light:hover,
    html:not([data-theme="dark"]) .site-menu-panel .nav-link-light:focus-visible {
        color: #fff;
        border-color: transparent;
        background: rgba(255, 255, 255, .1);
        box-shadow: none;
    }
}

/* User account pages */
.account-page {
    min-height: calc(100vh - 170px);
    display: flex;
    align-items: center;
}

.account-shell {
    width: min(100%, 1060px);
    display: grid;
    grid-template-columns: minmax(280px, .78fr) minmax(0, 1.22fr);
    margin-inline: auto;
    overflow: hidden;
    border: 1px solid var(--line-strong);
    border-radius: 30px;
    background: var(--surface);
    box-shadow: 0 1.4rem 3.5rem rgba(19, 34, 56, .12);
}

.account-shell-compact {
    max-width: 980px;
}

.account-intro {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    min-height: 100%;
    padding: clamp(2rem, 5vw, 3.5rem) clamp(1.5rem, 4vw, 2.75rem);
    color: #fff;
    background:
        radial-gradient(circle at 88% 8%, rgba(246, 207, 120, .2), transparent 26%),
        radial-gradient(circle at 0 100%, rgba(67, 210, 193, .2), transparent 32%),
        linear-gradient(145deg, #111733, #1a5369 72%, #126d70);
}

.account-intro::before,
.account-intro::after {
    position: absolute;
    z-index: -1;
    content: "";
    border: 1px solid rgba(255, 255, 255, .13);
    border-radius: 50%;
    pointer-events: none;
}

.account-intro::before {
    width: 300px;
    height: 300px;
    top: -150px;
    left: -120px;
}

.account-intro::after {
    width: 220px;
    height: 220px;
    right: -115px;
    bottom: -105px;
}

.account-intro-icon {
    width: 58px;
    height: 58px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.35rem;
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 19px;
    color: #202641;
    background: linear-gradient(145deg, #fff5ca, #efbb5d);
    box-shadow: 0 .8rem 1.6rem rgba(5, 12, 32, .2);
    font-size: 1.45rem;
}

.account-kicker,
.account-card-kicker {
    display: block;
    color: var(--teal);
    font-size: .75rem;
    font-weight: 900;
    letter-spacing: .01em;
}

.account-intro .account-kicker {
    color: #a4ebe0;
}

.account-intro h1 {
    max-width: 380px;
    margin: .45rem 0 .9rem;
    color: #fff;
    font-size: clamp(1.55rem, 3vw, 2.25rem);
    font-weight: 900;
    line-height: 1.55;
}

.account-intro p {
    max-width: 390px;
    margin: 0;
    color: rgba(255, 255, 255, .72);
    line-height: 2;
}

.account-benefits {
    display: grid;
    gap: .8rem;
    margin-top: 2rem;
    color: rgba(255, 255, 255, .84);
    font-size: .8rem;
    font-weight: 700;
}

.account-benefits span {
    display: flex;
    align-items: center;
    gap: .55rem;
}

.account-benefits i {
    color: #f5d58b;
    font-size: 1rem;
}

.account-card {
    min-width: 0;
    padding: clamp(1.35rem, 4vw, 2.5rem);
    border: 1px solid var(--line-strong);
    border-radius: 24px;
    color: var(--text);
    background:
        linear-gradient(145deg, color-mix(in srgb, var(--surface) 94%, var(--surface-soft)), var(--surface)),
        var(--surface);
    box-shadow: var(--shadow-sm);
}

.account-shell > .account-card {
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.account-card-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.account-card-heading h2 {
    margin: .25rem 0 0;
    color: var(--text);
    font-size: clamp(1.15rem, 2.4vw, 1.5rem);
    font-weight: 900;
}

.account-step-badge,
.account-section-icon {
    width: 40px;
    height: 40px;
    display: inline-flex;
    flex: 0 0 40px;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(91, 86, 214, .24);
    border-radius: 13px;
    color: var(--primary);
    background: rgba(91, 86, 214, .1);
    font-size: .78rem;
    font-weight: 900;
}

.account-section-icon {
    font-size: 1.05rem;
}

.account-section-icon-teal {
    color: var(--teal);
    border-color: rgba(30, 157, 144, .24);
    background: var(--teal-soft);
}

.account-progress {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: .35rem;
    margin-bottom: 1.5rem;
}

.account-progress span {
    height: 5px;
    border-radius: 99px;
    background: var(--surface-soft);
    transition: background-color .2s ease, transform .2s ease;
}

.account-progress span.is-active {
    background: linear-gradient(90deg, var(--primary), var(--teal));
    transform: scaleY(1.15);
}

.account-card-description {
    margin: 0 0 1.25rem;
    color: var(--muted);
    font-size: .85rem;
    line-height: 2;
}

.account-input-group .input-group-text {
    min-width: 46px;
    border-color: var(--line-strong);
    background: var(--surface-soft);
}

.account-phone-note {
    display: flex;
    align-items: center;
    gap: .65rem;
    margin-bottom: 1rem;
    padding: .75rem .85rem;
    border: 1px solid rgba(30, 157, 144, .24);
    border-radius: 14px;
    color: var(--muted);
    background: var(--teal-soft);
    font-size: .8rem;
}

.account-phone-note i {
    flex: 0 0 auto;
    color: var(--teal);
    font-size: 1.05rem;
}

.account-phone-note strong {
    color: var(--text);
}

.otp-inputs {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(.45rem, 2vw, .8rem);
    margin: 1.5rem 0;
}

.otp-input {
    width: 58px;
    height: 62px;
    min-width: 0;
    padding: 0;
    border: 1px solid var(--line-strong);
    border-radius: 15px;
    color: var(--text);
    background: var(--surface);
    box-shadow: inset 0 1px 2px rgba(19, 34, 56, .035);
    font-family: Arial, "Vazir", sans-serif;
    font-size: 1.55rem;
    font-weight: 900;
    line-height: 1;
    text-align: center;
    direction: ltr;
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.otp-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow:
        0 0 0 .2rem rgba(91, 86, 214, .15),
        0 .45rem 1rem rgba(19, 34, 56, .1);
    transform: translateY(-2px);
}

.account-back-link,
.account-card-footer a {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    color: var(--primary);
    font-size: .8rem;
    font-weight: 800;
}

.account-back-link {
    margin-top: .25rem;
}

.account-back-link:hover,
.account-card-footer a:hover {
    color: var(--primary-dark);
}

.account-card-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    margin-top: 1.6rem;
    padding-top: 1.15rem;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: .8rem;
}

.profile-page-shell {
    width: min(100%, 1060px);
    margin-inline: auto;
}

.profile-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
    padding: clamp(1.25rem, 3vw, 2rem);
    border: 1px solid rgba(141, 135, 255, .3);
    border-radius: 26px;
    color: #fff;
    background:
        radial-gradient(circle at 90% 0, rgba(246, 207, 120, .2), transparent 28%),
        linear-gradient(135deg, #111733, #1a5369);
    box-shadow: 0 1rem 2.5rem rgba(19, 34, 56, .16);
}

.profile-hero-main {
    display: flex;
    align-items: center;
    gap: .9rem;
    min-width: 0;
}

.profile-user-avatar {
    width: 62px;
    height: 62px;
    display: inline-flex;
    flex: 0 0 62px;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, .24);
    border-radius: 20px;
    color: #202641;
    background: linear-gradient(145deg, #fff5cb, #efbb5d);
    box-shadow: 0 .65rem 1.35rem rgba(5, 12, 32, .2);
    font-size: 1.5rem;
}

.profile-hero h1 {
    margin: .25rem 0 .2rem;
    color: #fff;
    font-size: clamp(1.25rem, 3vw, 1.8rem);
    font-weight: 900;
}

.profile-hero p {
    color: rgba(255, 255, 255, .72);
    font-size: .8rem;
}

.profile-hero p strong {
    color: #f6d58f;
}

.profile-summary-card {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .8rem;
    padding: 1rem;
    border: 1px solid var(--line-strong);
    border-radius: 22px;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.profile-summary-item {
    display: flex;
    align-items: center;
    gap: .65rem;
    min-width: 0;
    padding: .7rem;
    border-radius: 15px;
    background: var(--surface-soft);
}

.profile-summary-icon {
    width: 36px;
    height: 36px;
    display: inline-flex;
    flex: 0 0 36px;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    color: var(--teal);
    background: var(--teal-soft);
}

.profile-summary-icon-gold {
    color: #9a6a17;
    background: var(--gold-soft);
}

.profile-summary-icon-primary {
    color: var(--primary);
    background: rgba(91, 86, 214, .1);
}

.profile-summary-item > span:last-child {
    display: grid;
    min-width: 0;
    gap: .2rem;
}

.profile-summary-item small {
    color: var(--muted);
    font-size: .7rem;
}

.profile-summary-item strong {
    overflow: hidden;
    color: var(--text);
    font-size: .78rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

html[data-theme="dark"] .account-shell,
html[data-theme="dark"] .profile-summary-card {
    box-shadow: 0 1.4rem 3.5rem rgba(0, 0, 0, .25);
}

@media (max-width: 991.98px) {
    .account-page {
        display: block;
    }

    .account-shell {
        grid-template-columns: 1fr;
    }

    .account-intro {
        min-height: auto;
        text-align: center;
    }

    .account-intro-icon {
        margin-bottom: .85rem;
    }

    .account-intro h1,
    .account-intro p {
        margin-inline: auto;
    }

    .account-benefits {
        max-width: 430px;
        margin-inline: auto;
        text-align: right;
    }
}

@media (max-width: 767.98px) {
    .profile-hero {
        align-items: flex-start;
        flex-direction: column;
    }

    .profile-hero .btn {
        width: 100%;
    }

    .profile-summary-card {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 575.98px) {
    .account-page {
        padding-top: 1rem !important;
        padding-bottom: 1.5rem !important;
    }

    .account-intro {
        padding: 1.6rem 1.2rem 1.8rem;
    }

    .account-card {
        padding: 1.2rem .95rem;
    }

    .account-card-heading h2 {
        font-size: 1.08rem;
    }

    .otp-inputs {
        gap: .45rem;
    }

    .otp-input {
        width: 51px;
        height: 56px;
        border-radius: 13px;
        font-size: 1.35rem;
    }

    .account-card-footer {
        flex-wrap: wrap;
    }

    .profile-hero {
        padding: 1.1rem;
        border-radius: 21px;
    }

    .profile-user-avatar {
        width: 52px;
        height: 52px;
        flex-basis: 52px;
        border-radius: 17px;
    }
}

/* Homepage global search */
.hero-search {
    width: min(100%, 690px);
    margin: 0 0 1.1rem;
}

.hero-search-box {
    position: relative;
    display: flex;
    align-items: center;
    gap: .55rem;
    padding: .35rem;
    border: 1px solid rgba(255, 255, 255, .23);
    border-radius: 17px;
    background: rgba(255, 255, 255, .1);
    box-shadow: 0 .75rem 1.8rem rgba(5, 12, 32, .16);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: border-color .2s ease, background-color .2s ease, box-shadow .2s ease;
}

.hero-search-box:focus-within {
    border-color: rgba(246, 207, 120, .72);
    background: rgba(255, 255, 255, .14);
    box-shadow:
        0 0 0 .2rem rgba(246, 207, 120, .12),
        0 .85rem 2rem rgba(5, 12, 32, .2);
}

.hero-search-icon {
    width: 30px;
    height: 30px;
    display: inline-flex;
    flex: 0 0 30px;
    align-items: center;
    justify-content: center;
    margin-inline: .45rem .1rem;
    color: rgba(255, 255, 255, .72);
    font-size: 1rem;
}

.hero-search .form-control {
    min-height: 48px;
    min-width: 0;
    padding: .7rem .35rem;
    color: #fff;
    border: 0;
    background: transparent;
    box-shadow: none;
    font-size: .88rem;
}

.hero-search .form-control::placeholder {
    color: rgba(255, 255, 255, .64);
}

.hero-search .form-control:focus {
    color: #fff;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.hero-search .btn {
    flex: 0 0 auto;
    min-height: 48px;
    padding-inline: 1rem;
    border-radius: 13px;
}

.hero-search-hint {
    display: block;
    margin-top: .5rem;
    padding-inline: .35rem;
    color: rgba(255, 255, 255, .65);
    font-size: .7rem;
}

.global-search-section {
    scroll-margin-top: 96px;
}

.global-search-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.35rem;
    padding: 1.1rem 1.25rem;
    border: 1px solid var(--line-strong);
    border-radius: 20px;
    background:
        radial-gradient(circle at 100% 0, rgba(91, 86, 214, .1), transparent 30%),
        linear-gradient(145deg, var(--surface), var(--surface-soft));
    box-shadow: var(--shadow-sm);
}

.global-search-kicker {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    color: var(--teal);
    font-size: .75rem;
    font-weight: 900;
}

.global-search-heading h2 {
    margin: .35rem 0 .25rem;
    color: var(--text);
    font-size: clamp(1.15rem, 2.5vw, 1.55rem);
    font-weight: 900;
}

.global-search-heading p {
    margin: 0;
    color: var(--muted);
    font-size: .78rem;
}

.global-search-heading .btn {
    flex: 0 0 auto;
}

.global-search-group + .global-search-group {
    margin-top: 2rem;
}

.global-search-book-card {
    min-height: 150px;
}

.global-search-verse-list {
    overflow: hidden;
    border: 1px solid var(--line-strong);
    border-radius: 20px;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.global-search-verse {
    display: flex;
    align-items: center;
    gap: .9rem;
    padding: 1rem 1.15rem;
    color: var(--text);
    border-bottom: 1px solid var(--line);
    background: var(--surface);
    transition:
        color .2s ease,
        background-color .2s ease,
        border-color .2s ease,
        transform .2s ease;
}

.global-search-verse:last-child {
    border-bottom: 0;
}

.global-search-verse:hover,
.global-search-verse:focus-visible {
    color: var(--text);
    background: var(--surface-soft);
    transform: translateX(-3px);
}

.global-search-verse-number {
    width: 38px;
    height: 38px;
    display: inline-flex;
    flex: 0 0 38px;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(30, 157, 144, .2);
    border-radius: 12px;
    color: var(--teal);
    background: var(--teal-soft);
    font-size: .8rem;
    font-weight: 900;
}

.global-search-verse-body {
    display: grid;
    min-width: 0;
    flex: 1;
    gap: .28rem;
}

.global-search-verse-reference {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    color: var(--primary);
    font-size: .73rem;
    font-weight: 900;
}

.global-search-verse-reference .bi {
    line-height: 1;
}

.global-search-verse-text {
    overflow: hidden;
    color: var(--text);
    font-size: .92rem;
    line-height: 2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.global-search-verse-arrow {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    transition: color .2s ease, transform .2s ease;
}

.global-search-verse:hover .global-search-verse-arrow,
.global-search-verse:focus-visible .global-search-verse-arrow {
    color: var(--primary);
    transform: translateX(-3px);
}

.global-search-empty {
    border-color: var(--line-strong);
    box-shadow: var(--shadow-sm);
}

@media (max-width: 767.98px) {
    .hero-search-box {
        align-items: stretch;
        flex-wrap: wrap;
    }

    .hero-search-icon {
        margin-inline-start: .35rem;
    }

    .hero-search .form-control {
        flex: 1 1 calc(100% - 45px);
    }

    .hero-search .btn {
        width: 100%;
    }

    .global-search-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .global-search-heading .btn {
        width: 100%;
    }

    .global-search-verse {
        align-items: flex-start;
        padding: .85rem;
    }

    .global-search-verse-text {
        overflow: visible;
        white-space: normal;
    }
}

/* Hero search contrast and theme-specific treatment */
.hero-search-box {
    border-color: rgba(255, 255, 255, .4);
    background: linear-gradient(
        135deg,
        rgba(11, 28, 64, .84),
        rgba(20, 112, 119, .74)
    );
    box-shadow:
        0 1rem 2.35rem rgba(5, 12, 32, .28),
        inset 0 1px 0 rgba(255, 255, 255, .15);
}

.hero-search-box:focus-within {
    border-color: var(--gold);
    background: linear-gradient(
        135deg,
        rgba(13, 31, 70, .92),
        rgba(21, 121, 126, .82)
    );
    box-shadow:
        0 0 0 .22rem rgba(246, 207, 120, .16),
        0 1.1rem 2.6rem rgba(5, 12, 32, .34),
        inset 0 1px 0 rgba(255, 255, 255, .18);
}

.hero-search .form-control,
.hero-search .form-control:focus,
.hero-search .form-control:active {
    color: #fff !important;
    -webkit-text-fill-color: #fff;
    caret-color: var(--gold);
}

.hero-search .form-control::placeholder {
    color: rgba(255, 255, 255, .8);
    opacity: 1;
}

.hero-search .form-control:-webkit-autofill,
.hero-search .form-control:-webkit-autofill:hover,
.hero-search .form-control:-webkit-autofill:focus {
    -webkit-text-fill-color: #fff;
    -webkit-box-shadow: 0 0 0 1000px rgba(13, 34, 72, .86) inset;
    transition: background-color 9999s ease-out 0s;
}

html[data-theme="dark"] .hero-search-box {
    border-color: rgba(155, 147, 255, .5);
    background: linear-gradient(
        135deg,
        rgba(12, 22, 43, .94),
        rgba(19, 54, 72, .88)
    );
    box-shadow:
        0 1rem 2.65rem rgba(0, 0, 0, .42),
        inset 0 1px 0 rgba(255, 255, 255, .1);
}

html[data-theme="dark"] .hero-search-box:focus-within {
    border-color: var(--gold);
    background: linear-gradient(
        135deg,
        rgba(15, 27, 51, .97),
        rgba(22, 63, 79, .92)
    );
    box-shadow:
        0 0 0 .22rem rgba(246, 207, 120, .18),
        0 1.15rem 2.8rem rgba(0, 0, 0, .5),
        inset 0 1px 0 rgba(255, 255, 255, .13);
}

html:not([data-theme="dark"]) .hero-search-box {
    border: 2px solid rgba(91, 86, 214, .24);
    background: #ffffff;
    box-shadow:
        0 .9rem 2rem rgba(7, 20, 43, .18),
        inset 0 1px 0 rgba(255, 255, 255, .9);
}

html:not([data-theme="dark"]) .hero-search-box:focus-within {
    border-color: var(--primary);
    background: #ffffff;
    box-shadow:
        0 0 0 .22rem rgba(91, 86, 214, .14),
        0 .95rem 2.4rem rgba(7, 20, 43, .24),
        inset 0 1px 0 rgba(255, 255, 255, .9);
}

html:not([data-theme="dark"]) .hero-search-icon {
    color: #586b82;
}

html:not([data-theme="dark"]) .hero-search .form-control,
html:not([data-theme="dark"]) .hero-search .form-control:focus,
html:not([data-theme="dark"]) .hero-search .form-control:active {
    color: #152238 !important;
    -webkit-text-fill-color: #152238;
    caret-color: var(--primary);
}

html:not([data-theme="dark"]) .hero-search .form-control::placeholder {
    color: #65778c;
    opacity: 1;
}

html:not([data-theme="dark"]) .hero-search .form-control:-webkit-autofill,
html:not([data-theme="dark"]) .hero-search .form-control:-webkit-autofill:hover,
html:not([data-theme="dark"]) .hero-search .form-control:-webkit-autofill:focus {
    -webkit-text-fill-color: #152238;
    -webkit-box-shadow: 0 0 0 1000px #ffffff inset;
}

@media (max-width: 767.98px) {
    .hero-search-box {
        display: grid;
        grid-template-columns: 38px minmax(0, 1fr);
        align-items: center;
        gap: .25rem .3rem;
        padding: .35rem;
        border-radius: 15px;
    }

    .hero-search-icon {
        width: 38px;
        height: 44px;
        margin: 0;
        align-self: center;
        justify-self: center;
        font-size: 1.05rem;
        line-height: 1;
    }

    .hero-search .form-control {
        width: 100%;
        min-height: 44px;
        padding: .55rem .4rem;
        flex: none;
    }

    .hero-search .btn {
        grid-column: 1 / -1;
        width: 100%;
        min-height: 44px;
        margin-top: .15rem;
    }
}

/* Keep the homepage opening area compact and remove the translation badge. */
.home-hero .hero-badge {
    display: none;
}

.home-hero .hero-content {
    padding-top: 1rem !important;
    padding-bottom: 1rem !important;
}

.home-hero h1 {
    margin-top: 0 !important;
}

/* Compact account access modal */
.site-navbar a[href*="/user/register.php"],
.site-navbar a[href*="/user/login.php"] {
    display: none !important;
}

.auth-modal[hidden] {
    display: none !important;
}

.auth-modal {
    position: fixed;
    z-index: 1080;
    inset: 0;
    display: grid;
    place-items: center;
    padding: .75rem;
    visibility: hidden;
    pointer-events: none;
    transition: visibility .32s ease;
}

.auth-modal.is-open {
    visibility: visible;
    pointer-events: auto;
}

.auth-modal-backdrop {
    position: absolute;
    inset: 0;
    opacity: 0;
    background: rgba(5, 12, 27, 0);
    backdrop-filter: blur(0);
    -webkit-backdrop-filter: blur(0);
    transition:
        opacity .32s ease,
        background-color .32s ease,
        backdrop-filter .32s ease,
        -webkit-backdrop-filter .32s ease;
}

.auth-modal.is-open .auth-modal-backdrop {
    opacity: 1;
    background: rgba(5, 12, 27, .68);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.auth-dialog {
    position: relative;
    z-index: 1;
    width: min(100%, 500px);
    height: min(650px, calc(100dvh - 1.5rem));
    min-height: 0;
    overflow-y: auto;
    padding: 1.35rem;
    box-sizing: border-box;
    border: 1px solid var(--line-strong);
    border-radius: 24px;
    color: var(--text);
    background:
        radial-gradient(circle at 100% 0, rgba(91, 86, 214, .13), transparent 32%),
        linear-gradient(145deg, var(--surface-raised), var(--surface));
    box-shadow: 0 1.5rem 4rem rgba(0, 0, 0, .32);
    opacity: 0;
    transform: translateY(16px) scale(.97);
    transition:
        opacity .28s ease,
        transform .28s cubic-bezier(.22, .75, .25, 1);
}

.auth-modal.is-open .auth-dialog {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.auth-modal-close {
    position: absolute;
    top: .75rem;
    left: .75rem;
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid var(--line-strong);
    border-radius: 11px;
    color: var(--muted);
    background: var(--surface-soft);
    line-height: 1;
    transition: color .2s ease, border-color .2s ease, background-color .2s ease, transform .2s ease;
}

.auth-modal-close:hover,
.auth-modal-close:focus-visible {
    color: var(--text);
    border-color: var(--primary);
    background: var(--surface-raised);
    transform: rotate(4deg);
}

.auth-dialog-heading {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding-inline-end: 2.2rem;
}

.auth-dialog-icon {
    width: 46px;
    height: 46px;
    display: inline-flex;
    flex: 0 0 46px;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(91, 86, 214, .25);
    border-radius: 15px;
    color: var(--primary);
    background: rgba(91, 86, 214, .12);
    font-size: 1.15rem;
}

.auth-dialog-kicker {
    display: block;
    color: var(--teal);
    font-size: .7rem;
    font-weight: 900;
}

.auth-dialog-heading h2 {
    margin: .15rem 0 .2rem;
    color: var(--text);
    font-size: 1.25rem;
    font-weight: 900;
}

.auth-dialog-heading p {
    margin: 0;
    color: var(--muted);
    font-size: .72rem;
}

.auth-tabs {
    position: relative;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: .35rem;
    margin: 1.1rem 0 .9rem;
    padding: .3rem;
    border: 1px solid var(--line);
    border-radius: 15px;
    background: var(--surface-soft);
}

.auth-modal .auth-tabs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    overflow: hidden;
    isolation: isolate;
}

.auth-tab-slider {
    position: absolute;
    z-index: 0;
    top: .3rem;
    bottom: .3rem;
    left: 0;
    width: 0;
    border-radius: 11px;
    background: linear-gradient(135deg, var(--primary), var(--teal));
    box-shadow: 0 .4rem 1rem rgba(91, 86, 214, .2);
    pointer-events: none;
    transition: width .32s ease, transform .35s cubic-bezier(.22, .75, .25, 1);
}

.auth-tab {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    padding: .45rem .7rem;
    border: 1px solid transparent;
    border-radius: 11px;
    color: var(--muted);
    background: transparent;
    font: inherit;
    font-size: .8rem;
    font-weight: 800;
    line-height: 1.35;
    text-align: center;
    transition: color .2s ease, background-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.auth-tab i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    line-height: 1;
}

.auth-modal .auth-tab {
    position: relative;
    z-index: 1;
}

.auth-tab:hover,
.auth-tab:focus-visible {
    color: var(--text);
}

.auth-modal .auth-tab.is-active {
    color: #fff;
    background: transparent;
    box-shadow: none;
}

.auth-tab.is-active {
    color: var(--primary);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.auth-login-step[hidden] {
    display: none !important;
}

.auth-login-step.is-active {
    animation: auth-step-enter .24s ease both;
}

.standalone-auth-tabs {
    margin: 0 0 1.25rem;
}

.standalone-auth-tabs .auth-tab {
    text-decoration: none;
}

.auth-status {
    margin-bottom: .85rem;
    padding: .65rem .75rem;
    border: 1px solid transparent;
    border-radius: 12px;
    font-size: .76rem;
    line-height: 1.8;
}

.auth-status-success {
    color: #16756b;
    border-color: rgba(30, 157, 144, .25);
    background: rgba(30, 157, 144, .11);
}

.auth-status-error {
    color: #a5384c;
    border-color: rgba(193, 62, 86, .25);
    background: rgba(193, 62, 86, .1);
}

html[data-theme="dark"] .auth-status-success {
    color: #8ce9dd;
}

html[data-theme="dark"] .auth-status-error {
    color: #ffb1bd;
}

.auth-view-stage {
    position: relative;
    overflow: hidden;
}

.auth-view[hidden],
.auth-register-step[hidden],
.auth-login-step[hidden] {
    display: none !important;
}

.auth-view.is-active {
    animation: auth-view-enter .28s ease both;
}

.auth-register-step.is-active {
    animation: auth-step-enter .24s ease both;
}

@keyframes auth-view-enter {
    from {
        opacity: 0;
        transform: translateX(16px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes auth-step-enter {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-field {
    margin-bottom: .8rem;
}

.auth-field .form-label {
    margin-bottom: .35rem;
    color: var(--text);
    font-size: .76rem;
    font-weight: 800;
}

.auth-input-group .input-group-text {
    min-width: 42px;
    color: var(--primary);
    border-color: var(--line-strong);
    background: var(--surface-soft);
}

.auth-input-group .form-control {
    min-height: 42px;
    font-size: .8rem;
}

.auth-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    min-height: 43px;
    margin-top: .35rem;
}

.auth-dialog .input-group-text,
.auth-dialog .auth-phone-note > i,
.auth-dialog .auth-back-link i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.auth-submit:disabled {
    cursor: wait;
    opacity: .7;
}

.auth-switch-note {
    margin: .9rem 0 0;
    color: var(--muted);
    text-align: center;
    font-size: .73rem;
}

.auth-switch-note button,
.auth-back-link {
    padding: 0;
    border: 0;
    color: var(--primary);
    background: transparent;
    font: inherit;
    font-weight: 900;
}

.auth-switch-note button:hover,
.auth-switch-note button:focus-visible,
.auth-back-link:hover,
.auth-back-link:focus-visible {
    color: var(--primary-dark);
    text-decoration: underline;
}

.auth-step-description {
    margin: 0 0 .9rem;
    color: var(--muted);
    font-size: .76rem;
    line-height: 1.9;
}

.auth-phone-note {
    display: flex;
    align-items: center;
    gap: .55rem;
    margin-bottom: .75rem;
    padding: .6rem .7rem;
    border: 1px solid rgba(30, 157, 144, .25);
    border-radius: 12px;
    color: var(--muted);
    background: var(--teal-soft);
    font-size: .73rem;
}

.auth-phone-note i {
    flex: 0 0 auto;
    color: var(--teal);
}

.auth-phone-note strong {
    color: var(--text);
}

.auth-phone-note-success {
    margin-bottom: .65rem;
}

.auth-otp-inputs {
    justify-content: center;
    gap: .55rem;
    margin: .8rem 0 .9rem;
}

.auth-otp-inputs .otp-input {
    width: 48px;
    height: 52px;
}

.auth-back-link {
    display: flex;
    align-items: center;
    gap: .35rem;
    margin: .75rem auto 0;
    font-size: .73rem;
}

.auth-dialog .row .form-control {
    min-height: 40px;
    font-size: .77rem;
}

.auth-dialog .row .form-label {
    margin-bottom: .3rem;
    color: var(--text);
    font-size: .7rem;
    font-weight: 800;
}

.auth-dialog .row small {
    color: var(--muted);
    font-weight: 400;
}

body.auth-modal-open {
    overflow: hidden;
}

@media (max-width: 575.98px) {
    .auth-modal {
        padding: .5rem;
    }

    .auth-dialog {
        height: calc(100dvh - 1rem);
        max-height: calc(100dvh - 1rem);
        padding: 1.05rem;
        border-radius: 20px;
    }

    .auth-modal .auth-tabs {
        gap: .2rem;
        padding: .25rem;
    }

    .auth-modal .auth-tab {
        min-height: 43px;
        gap: .25rem;
        padding: .35rem .25rem;
        font-size: .66rem;
    }

    .auth-modal .auth-tab i {
        font-size: .8rem;
    }

    .auth-dialog-heading h2 {
        font-size: 1.12rem;
    }

    .auth-dialog-heading p {
        font-size: .68rem;
    }

    .auth-otp-inputs .otp-input {
        width: 44px;
        height: 49px;
    }
}

/* Admin user management */
.user-stat-card {
    position: relative;
    min-height: 126px;
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    gap: .35rem;
    overflow: hidden;
    padding: 1rem 1.1rem;
    border: 1px solid var(--line-strong);
    border-radius: 18px;
    background:
        radial-gradient(circle at 100% 0, rgba(91, 86, 214, .12), transparent 38%),
        linear-gradient(145deg, var(--surface-raised), var(--surface));
    box-shadow: var(--shadow-sm);
}

.user-stat-card::after {
    position: absolute;
    right: -26px;
    bottom: -38px;
    width: 108px;
    height: 108px;
    content: "";
    border: 1px solid var(--line);
    border-radius: 50%;
    pointer-events: none;
}

.user-stat-icon {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: .15rem;
    border-radius: 12px;
    font-size: 1rem;
}

.user-stat-icon-primary {
    color: var(--primary);
    background: rgba(91, 86, 214, .13);
}

.user-stat-icon-teal {
    color: var(--teal);
    background: var(--teal-soft);
}

.user-stat-icon-gold {
    color: #a56c16;
    background: var(--gold-soft);
}

.user-stat-icon-blue {
    color: #2779b7;
    background: rgba(39, 121, 183, .12);
}

html[data-theme="dark"] .user-stat-icon-gold {
    color: var(--gold);
}

html[data-theme="dark"] .user-stat-icon-blue {
    color: #8bcaff;
}

.user-stat-label {
    color: var(--muted);
    font-size: .72rem;
    font-weight: 700;
}

.user-stat-card strong {
    color: var(--text);
    font-size: 1.35rem;
    font-weight: 900;
}

.user-editor-card {
    background:
        radial-gradient(circle at 100% 0, rgba(67, 210, 193, .09), transparent 34%),
        var(--surface);
}

.user-editor-icon {
    width: 46px;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 46px;
    border: 1px solid rgba(91, 86, 214, .24);
    border-radius: 15px;
    color: var(--primary);
    background: rgba(91, 86, 214, .11);
    font-size: 1.15rem;
}

.user-check-control {
    width: 100%;
    min-height: 44px;
    display: flex;
    align-items: center;
    gap: .55rem;
    margin-bottom: 0;
    padding: .55rem .7rem;
    border: 1px solid var(--line);
    border-radius: 11px;
    color: var(--muted);
    background: var(--surface-soft);
    cursor: pointer;
    font-size: .72rem;
    font-weight: 700;
}

.user-check-control input {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    accent-color: var(--primary);
}

.user-check-control span {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
}

.user-check-control i {
    color: var(--teal);
    font-size: .95rem;
}

.user-list-badge {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .45rem .7rem;
    border: 1px solid rgba(30, 157, 144, .22);
    border-radius: 999px;
    color: var(--teal);
    background: var(--teal-soft);
    font-size: .72rem;
    font-weight: 800;
    white-space: nowrap;
}

.user-filters {
    background: color-mix(in srgb, var(--surface-soft) 55%, var(--surface));
}

.admin-user-table {
    min-width: 830px;
}

.admin-user-table th,
.admin-user-table td {
    white-space: nowrap;
}

.admin-user-identity {
    min-width: 170px;
    display: flex;
    align-items: center;
    gap: .65rem;
}

.admin-user-avatar {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 40px;
    border: 1px solid rgba(91, 86, 214, .22);
    border-radius: 13px;
    color: var(--primary);
    background: rgba(91, 86, 214, .11);
    font-size: .95rem;
}

.admin-user-avatar.is-admin {
    color: #9a691d;
    border-color: rgba(242, 188, 90, .32);
    background: var(--gold-soft);
}

html[data-theme="dark"] .admin-user-avatar.is-admin {
    color: var(--gold);
}

.admin-user-name {
    max-width: 165px;
    color: var(--text);
    font-size: .8rem;
}

.admin-user-contact {
    display: grid;
    gap: .25rem;
    color: var(--muted);
    font-size: .7rem;
}

.admin-user-contact span {
    max-width: 180px;
    display: inline-flex;
    align-items: center;
    gap: .35rem;
}

.admin-user-contact i {
    flex: 0 0 auto;
    color: var(--teal);
}

.admin-user-badges {
    display: grid;
    justify-items: start;
    gap: .3rem;
}

.admin-user-badges .badge {
    min-height: 25px;
    font-size: .66rem;
}

.user-status-verified {
    color: #14766a;
    border: 1px solid rgba(30, 157, 144, .22);
    background: var(--teal-soft);
}

.user-status-unverified {
    color: var(--muted);
    border: 1px solid var(--line);
    background: var(--surface-soft);
}

html[data-theme="dark"] .user-status-verified {
    color: #8de9dd;
}

.user-empty-state {
    min-height: 250px;
    display: grid;
    place-content: center;
}

.user-empty-state > i {
    color: var(--primary);
}

@media (max-width: 767.98px) {
    .user-editor-card {
        padding: 1.1rem !important;
    }

    .user-filters .btn {
        min-width: 44px;
    }
}
