/* Audio Kotha — Library / History / Bookmarked platform */
.lp-page {
    --lp-ink: #0B1B3A;
    --lp-muted: #6E7F9B;
    --lp-blue: #1D4ED8;
    --lp-line: rgba(37, 99, 235, .12);
    background:
        radial-gradient(900px 380px at 8% 0%, rgba(59, 130, 246, .07), transparent 65%),
        linear-gradient(180deg, #F7FAFF 0%, #F2F6FC 48%, #F8FAFE 100%);
    color: var(--lp-ink);
    padding-bottom: 48px;
}

.lp-page .container {
    width: min(1180px, calc(100% - 48px));
}

/* The required three-button platform bar */
.lp-tabs {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.16fr) minmax(0, 1fr);
    gap: 8px;
    width: min(720px, 100%);
    margin: 0 auto;
    padding: 6px;
    border-radius: 19px;
    background: rgba(255, 255, 255, .66);
    border: 1px solid rgba(255, 255, 255, .92);
    box-shadow: 0 18px 44px -34px rgba(15, 35, 95, .55), inset 0 1px 0 #fff;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.lp-tab {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 0;
    min-height: 48px;
    padding: 8px 10px;
    border-radius: 14px;
    text-decoration: none;
    color: #526783;
    border: 1px solid transparent;
    transition: background .2s, color .2s, transform .2s, border-color .2s;
}

.lp-tab:hover {
    background: rgba(37, 99, 235, .06);
    color: #1D4ED8;
}

.lp-tab.is-active {
    color: #F8FAFF;
    background: linear-gradient(135deg, #163D89, #1D4ED8 58%, #4F46E5);
    border-color: rgba(147, 197, 253, .22);
    box-shadow: 0 14px 28px -20px rgba(29, 78, 216, .8), inset 0 1px 0 rgba(255, 255, 255, .2);
}

.lp-tab-ico {
    width: 30px;
    height: 30px;
    flex: none;
    display: grid;
    place-items: center;
    border-radius: 9px;
    color: #1D4ED8;
    background: rgba(37, 99, 235, .08);
    border: 1px solid rgba(37, 99, 235, .1);
}

.lp-tab.is-active .lp-tab-ico {
    color: #fff;
    background: rgba(255, 255, 255, .14);
    border-color: rgba(255, 255, 255, .15);
}

.lp-tab-copy {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
    text-align: left;
}

.lp-tab-copy strong {
    font-size: 10px;
    line-height: 1.2;
    font-weight: 850;
    letter-spacing: -.012em;
    white-space: nowrap;
}

.lp-tab-copy small {
    font-size: 7px;
    line-height: 1.25;
    color: #8898AF;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lp-tab.is-active .lp-tab-copy small {
    color: rgba(219, 234, 254, .72);
}

/* Center History is the prominent action */
.lp-tab-history {
    position: relative;
    z-index: 1;
    margin: -4px 0;
    min-height: 57px;
    border-color: rgba(37, 99, 235, .13);
    background: linear-gradient(150deg, rgba(255, 255, 255, .98), rgba(239, 246, 255, .9));
    box-shadow: 0 18px 32px -26px rgba(15, 35, 95, .65), inset 0 1px 0 #fff;
}

.lp-tab-history .lp-tab-ico {
    width: 35px;
    height: 35px;
    color: #1D4ED8;
    background: linear-gradient(145deg, #EFF6FF, #DBEAFE);
}

.lp-tab-history.is-active {
    background: linear-gradient(135deg, #0F2C6B, #1D4ED8 52%, #6D3BE8);
    border-color: rgba(191, 219, 254, .25);
    box-shadow: 0 24px 44px -18px rgba(29, 78, 216, .85), inset 0 1px 0 rgba(255, 255, 255, .23);
    transform: translateY(-1px);
}

.lp-tab-history.is-active .lp-tab-ico {
    color: #fff;
    background: rgba(255, 255, 255, .16);
    border-color: rgba(255, 255, 255, .18);
}

.lp-tab-spark {
    position: absolute;
    top: 10px;
    right: 11px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #93C5FD;
    box-shadow: 0 0 0 4px rgba(147, 197, 253, .14);
    opacity: .75;
}

.lp-tab-history.is-active .lp-tab-spark {
    background: #FDE68A;
    box-shadow: 0 0 0 4px rgba(253, 230, 138, .13);
}

/* Page intro */
.lp-intro {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    padding: 23px 0 15px;
}

.lp-intro h1 {
    margin: 0;
    font-family: var(--serif);
    font-size: 30px;
    font-weight: 600;
    letter-spacing: -.04em;
    color: var(--lp-ink);
}

.lp-intro p {
    margin: 5px 0 0;
    font-size: 10.5px;
    line-height: 1.6;
    color: var(--lp-muted);
}

.lp-kicker {
    display: block;
    margin-bottom: 5px;
    font-size: 7.5px;
    letter-spacing: .18em;
    font-weight: 850;
    color: #6B84A6;
}

.lp-count {
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 10px;
    border-radius: 99px;
    font-size: 8px;
    font-weight: 850;
    color: #1D4ED8;
    background: rgba(37, 99, 235, .07);
    border: 1px solid rgba(37, 99, 235, .12);
    white-space: nowrap;
}

/* History hero */
.lp-history-hero {
    position: relative;
    overflow: hidden;
    padding: 38px 0 42px;
    background:
        radial-gradient(700px 320px at 84% 8%, rgba(59, 130, 246, .26), transparent 62%),
        radial-gradient(520px 280px at 6% 110%, rgba(109, 59, 232, .18), transparent 62%),
        linear-gradient(135deg, #07142D 0%, #0B2350 54%, #102C60 100%);
    color: #F4F8FF;
}

.lp-history-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: .32;
    background-image:
        linear-gradient(rgba(147, 197, 253, .1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(147, 197, 253, .1) 1px, transparent 1px);
    background-size: 58px 58px;
    mask-image: linear-gradient(90deg, transparent, #000 34%, #000 78%, transparent);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 34%, #000 78%, transparent);
}

.lp-history-hero .container {
    position: relative;
    z-index: 1;
}

.lp-history-hero h1 {
    max-width: 16ch;
    margin: 9px 0 9px;
    font-family: var(--serif);
    font-size: clamp(35px, 5vw, 55px);
    line-height: 1.02;
    letter-spacing: -.045em;
    font-weight: 500;
    color: #F8FAFF;
}

.lp-history-hero h1 em {
    font-style: italic;
    color: #93C5FD;
}

.lp-history-hero p {
    max-width: 57ch;
    margin: 0;
    font-size: 11px;
    line-height: 1.7;
    color: rgba(219, 231, 249, .68);
}

.lp-history-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 17px;
    font-size: 8.5px;
    color: rgba(210, 226, 249, .64);
}

.lp-history-meta span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.lp-history-meta svg {
    color: #93C5FD;
}

/* Collections */
.lp-section {
    padding-top: 25px;
}

.lp-section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 12px;
}

.lp-section-head h2 {
    margin: 0;
    font-family: var(--serif);
    font-size: 23px;
    letter-spacing: -.035em;
    font-weight: 600;
    color: var(--lp-ink);
}

.lp-grid {
    margin-top: 1px;
}

.lp-chapter {
    margin-top: 23px;
}

.lp-chapter-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 9px;
}

.lp-chapter-head span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 8px;
    border-radius: 99px;
    font-size: 7px;
    font-weight: 850;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #1D4ED8;
    background: rgba(37, 99, 235, .07);
    border: 1px solid rgba(37, 99, 235, .1);
}

.lp-chapter-head h3 {
    margin: 0;
    font-size: 12px;
    font-weight: 850;
    letter-spacing: -.01em;
    color: #20365D;
}

.lp-chapter-head em {
    margin-left: auto;
    font-style: normal;
    font-size: 8px;
    color: #8A9BB4;
}

/* Empty / bookmarked */
.lp-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 260px;
    margin-top: 15px;
    padding: 30px 20px;
    border-radius: 19px;
    border: 1px dashed rgba(37, 99, 235, .2);
    background: rgba(255, 255, 255, .65);
}

.lp-empty-ico {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    margin-bottom: 10px;
    border-radius: 14px;
    color: #1D4ED8;
    background: #EFF6FF;
    border: 1px solid rgba(37, 99, 235, .12);
}

.lp-empty h2 {
    margin: 0;
    font-family: var(--serif);
    font-size: 22px;
    color: var(--lp-ink);
}

.lp-empty p {
    max-width: 40ch;
    margin: 5px 0 14px;
    font-size: 10px;
    line-height: 1.6;
    color: var(--lp-muted);
}

.lp-bookmarked-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 15px;
    padding: 23px 0 16px;
}

.lp-bookmarked-head h1 {
    margin: 0;
    font-family: var(--serif);
    font-size: 31px;
    letter-spacing: -.04em;
    font-weight: 600;
    color: var(--lp-ink);
}

.lp-bookmarked-head p {
    margin: 4px 0 0;
    font-size: 10.5px;
    color: var(--lp-muted);
}

.lp-footnote {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    margin-top: 24px;
    padding-top: 13px;
    border-top: 1px solid rgba(37, 99, 235, .09);
    color: #7C8CA7;
    font-size: 8.5px;
    line-height: 1.55;
}

.lp-footnote svg {
    flex: none;
    color: #4F8CFF;
    margin-top: 1px;
}

/* Library page bar */
.lp-library-bar {
    padding: 20px 0 4px;
}

/* Responsive */
@media (max-width: 900px) {
    .lp-tabs {
        width: 100%;
    }
    .lp-tab-copy small {
        display: none;
    }
    .lp-tab {
        min-height: 45px;
        gap: 6px;
        padding: 7px;
    }
    .lp-tab-history {
        min-height: 52px;
    }
    .lp-tab-ico {
        width: 28px;
        height: 28px;
    }
    .lp-tab-history .lp-tab-ico {
        width: 32px;
        height: 32px;
    }
}

@media (max-width: 680px) {
    .lp-page .container {
        width: min(100% - 28px, 1180px);
    }
    .lp-tabs {
        gap: 5px;
        padding: 5px;
        border-radius: 16px;
    }
    .lp-tab {
        min-height: 43px;
        gap: 4px;
        padding: 6px 5px;
        border-radius: 11px;
    }
    .lp-tab-history {
        min-height: 49px;
        margin: -3px 0;
    }
    .lp-tab-ico {
        width: 25px;
        height: 25px;
        border-radius: 8px;
    }
    .lp-tab-history .lp-tab-ico {
        width: 29px;
        height: 29px;
    }
    .lp-tab-copy strong {
        font-size: 8.8px;
    }
    .lp-tab-copy small {
        display: none;
    }
    .lp-tab-spark {
        top: 7px;
        right: 7px;
    }
    .lp-intro {
        padding: 17px 0 12px;
    }
    .lp-intro h1 {
        font-size: 25px;
    }
    .lp-intro p {
        font-size: 9.5px;
    }
    .lp-count {
        font-size: 7px;
        padding: 5px 8px;
    }
    .lp-history-hero {
        padding: 28px 0 30px;
    }
    .lp-history-hero h1 {
        font-size: clamp(32px, 10vw, 44px);
    }
    .lp-history-hero p {
        font-size: 10px;
    }
    .lp-section {
        padding-top: 19px;
    }
    .lp-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 9px !important;
    }
    .lp-section-head h2 {
        font-size: 21px;
    }
    .lp-chapter {
        margin-top: 19px;
    }
    .lp-bookmarked-head {
        padding: 18px 0 12px;
    }
    .lp-bookmarked-head h1 {
        font-size: 26px;
    }
    .lp-library-bar {
        padding-top: 14px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .lp-tab,
    .lp-tab-history,
    .lp-tab-ico {
        transition: none !important;
    }
    .lp-tab-history.is-active,
    .lp-tab:hover {
        transform: none !important;
    }
}

/* Dedicated Stories platform bottom navigation */
.lp-page {
    padding-bottom: calc(108px + env(safe-area-inset-bottom));
}

.browse-body.lp-with-bottom {
    padding-bottom: calc(108px + env(safe-area-inset-bottom));
}

.lp-bottomnav {
    position: fixed;
    left: 50%;
    right: auto;
    bottom: 14px;
    transform: translateX(-50%);
    z-index: 90;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.18fr) minmax(0, 1fr);
    align-items: end;
    gap: 5px;
    width: min(620px, calc(100% - 24px));
    padding: 7px;
    border-radius: 22px;
    background: rgba(249, 252, 255, .93);
    border: 1px solid rgba(255, 255, 255, .98);
    box-shadow: 0 22px 55px -26px rgba(6, 20, 48, .62), 0 3px 14px -8px rgba(15, 35, 95, .2), inset 0 1px 0 #fff;
    backdrop-filter: blur(20px) saturate(1.1);
    -webkit-backdrop-filter: blur(20px) saturate(1.1);
}

.lp-bottomnav .lp-tab {
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    min-height: 60px;
    padding: 5px 4px;
    border-radius: 16px;
    text-align: center;
}

.lp-bottomnav .lp-tab-copy {
    align-items: center;
    text-align: center;
    gap: 0;
}

.lp-bottomnav .lp-tab-copy strong {
    font-size: 9px;
    letter-spacing: -.005em;
}

.lp-bottomnav .lp-tab-copy small {
    display: none;
}

.lp-bottomnav .lp-tab-ico {
    width: 27px;
    height: 27px;
    border-radius: 8px;
}

.lp-bottomnav .lp-tab-history {
    min-height: 72px;
    margin: 0 0 1px;
    border-radius: 18px;
    background: linear-gradient(145deg, #F7FAFF, #EAF2FF);
    border-color: rgba(37, 99, 235, .16);
    box-shadow: 0 -7px 20px -16px rgba(37, 99, 235, .55), inset 0 1px 0 #fff;
}

.lp-bottomnav .lp-tab-history .lp-tab-ico {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: linear-gradient(145deg, #EFF6FF, #DBEAFE);
    color: #1D4ED8;
}

.lp-bottomnav .lp-tab-history .lp-tab-copy strong {
    font-size: 10px;
    font-weight: 900;
}

.lp-bottomnav .lp-tab-history.is-active {
    background: linear-gradient(135deg, #0F2C6B, #1D4ED8 52%, #6D3BE8);
    border-color: rgba(191, 219, 254, .25);
    box-shadow: 0 20px 40px -18px rgba(29, 78, 216, .85), inset 0 1px 0 rgba(255, 255, 255, .22);
    transform: translateY(-3px);
}

.lp-bottomnav .lp-tab-history.is-active .lp-tab-ico {
    color: #fff;
    background: rgba(255, 255, 255, .16);
    border-color: rgba(255, 255, 255, .18);
}

.lp-bottomnav .lp-tab-spark {
    top: 8px;
    right: 16px;
}

@media (max-width: 680px) {
    .lp-bottomnav {
        left: 0;
        bottom: 0;
        transform: none;
        width: 100%;
        padding: 6px 9px calc(6px + env(safe-area-inset-bottom));
        border-radius: 18px 18px 0 0;
        border-left: 0;
        border-right: 0;
        border-bottom: 0;
    }
    .lp-bottomnav .lp-tab {
        min-height: 52px;
        border-radius: 13px;
    }
    .lp-bottomnav .lp-tab-history {
        min-height: 62px;
        border-radius: 15px;
    }
    .lp-bottomnav .lp-tab-ico {
        width: 23px;
        height: 23px;
    }
    .lp-bottomnav .lp-tab-history .lp-tab-ico {
        width: 29px;
        height: 29px;
    }
    .lp-bottomnav .lp-tab-copy strong {
        font-size: 8px;
    }
    .lp-bottomnav .lp-tab-history .lp-tab-copy strong {
        font-size: 8.5px;
    }
    .lp-page,
    .browse-body.lp-with-bottom {
        padding-bottom: calc(82px + env(safe-area-inset-bottom));
    }
}

@media (prefers-reduced-motion: reduce) {
    .lp-bottomnav .lp-tab-history.is-active {
        transform: none !important;
    }
}

/* History button removed from the Stories bottom bar */
.lp-bottomnav {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    width: min(430px, calc(100% - 24px));
}

.lp-bottomnav .lp-tab {
    min-height: 60px;
}

@media (max-width: 680px) {
    .lp-bottomnav {
        width: 100%;
    }
}

/* Four-button portal bar: Home · Library · Bookmarked · Profile */
.lp-bottomnav {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: min(620px, calc(100% - 24px));
}

.lp-bottomnav .lp-tab {
    min-height: 60px;
}

.lp-bottomnav .lp-tab-copy strong {
    font-size: 8.6px;
}

@media (max-width: 680px) {
    .lp-bottomnav {
        width: 100%;
        padding-left: 7px;
        padding-right: 7px;
    }
    .lp-bottomnav .lp-tab {
        min-height: 53px;
        padding-left: 2px;
        padding-right: 2px;
    }
    .lp-bottomnav .lp-tab-copy strong {
        font-size: 7.8px;
        letter-spacing: -.01em;
    }
    .lp-bottomnav .lp-tab-ico {
        width: 22px;
        height: 22px;
    }
}

@media (max-width: 370px) {
    .lp-bottomnav .lp-tab-copy strong {
        font-size: 7.2px;
    }
}

/* Five-button portal bar: Home · Library · Trending · Bookmarked · Profile */
.lp-bottomnav {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    width: min(720px, calc(100% - 24px));
}

.lp-bottomnav .lp-tab {
    min-height: 58px;
    padding-left: 3px;
    padding-right: 3px;
    gap: 2px;
}

.lp-bottomnav .lp-tab-copy strong {
    font-size: 8.1px;
}

.lp-bottomnav .lp-tab-history {
    min-height: 68px;
}

@media (max-width: 680px) {
    .lp-bottomnav {
        width: 100%;
        padding-left: 5px;
        padding-right: 5px;
    }
    .lp-bottomnav .lp-tab {
        min-height: 52px;
    }
    .lp-bottomnav .lp-tab-history {
        min-height: 61px;
    }
    .lp-bottomnav .lp-tab-copy strong {
        font-size: 7.3px;
        letter-spacing: -.02em;
    }
    .lp-bottomnav .lp-tab-ico {
        width: 21px;
        height: 21px;
    }
    .lp-bottomnav .lp-tab-history .lp-tab-ico {
        width: 27px;
        height: 27px;
    }
}

@media (max-width: 350px) {
    .lp-bottomnav .lp-tab-copy strong {
        font-size: 6.8px;
    }
    .lp-bottomnav .lp-tab {
        min-height: 49px;
    }
}

/* Compact five-icon portal bar */
.lp-bottomnav {
    gap: 2px;
    padding: 3px 6px;
    border-radius: 16px;
    align-items: center;
}

.lp-bottomnav .lp-tab {
    min-height: 44px;
    padding: 3px 2px;
    gap: 1px;
    border-radius: 11px;
}

.lp-bottomnav .lp-tab-history {
    min-height: 50px;
    margin: 0;
    border-radius: 13px;
}

.lp-bottomnav .lp-tab-ico {
    width: 21px;
    height: 21px;
    border-radius: 7px;
}

.lp-bottomnav .lp-tab-history .lp-tab-ico {
    width: 25px;
    height: 25px;
    border-radius: 8px;
}

.lp-bottomnav .lp-tab-copy {
    gap: 0;
}

.lp-bottomnav .lp-tab-copy strong {
    font-size: 7.4px;
    line-height: 1.1;
}

.lp-bottomnav .lp-tab-spark {
    top: 4px;
    right: 12px;
}

.lp-page,
.browse-body.lp-with-bottom {
    padding-bottom: calc(68px + env(safe-area-inset-bottom));
}

@media (max-width: 680px) {
    .lp-bottomnav {
        padding: 3px 5px calc(3px + env(safe-area-inset-bottom));
        border-radius: 14px 14px 0 0;
    }
    .lp-bottomnav .lp-tab {
        min-height: 42px;
        padding: 2px 1px;
    }
    .lp-bottomnav .lp-tab-history {
        min-height: 48px;
    }
    .lp-bottomnav .lp-tab-ico {
        width: 20px;
        height: 20px;
    }
    .lp-bottomnav .lp-tab-history .lp-tab-ico {
        width: 24px;
        height: 24px;
    }
    .lp-bottomnav .lp-tab-copy strong {
        font-size: 7.1px;
        line-height: 1.08;
    }
    .lp-page,
    .browse-body.lp-with-bottom {
        padding-bottom: calc(62px + env(safe-area-inset-bottom));
    }
}

@media (prefers-reduced-motion: reduce) {
    .lp-bottomnav .lp-tab,
    .lp-bottomnav .lp-tab-history {
        transition: none !important;
    }
}

/* Flat active Library: no shadow, background or raised center styling */
.lp-bottomnav .lp-tab-library,
.lp-bottomnav .lp-tab-library.is-active {
    min-height: 42px;
    margin: 0;
    border-color: transparent;
    background: transparent;
    box-shadow: none;
    transform: none;
    color: #1D4ED8;
}

.lp-bottomnav .lp-tab-library .lp-tab-ico,
.lp-bottomnav .lp-tab-library.is-active .lp-tab-ico {
    width: 20px;
    height: 20px;
    color: #1D4ED8;
    background: rgba(37, 99, 235, .08);
    border-color: rgba(37, 99, 235, .1);
    box-shadow: none;
}

.lp-bottomnav .lp-tab-library .lp-tab-copy strong,
.lp-bottomnav .lp-tab-library.is-active .lp-tab-copy strong {
    color: #526783;
}

.lp-bottomnav .lp-tab-library.is-active .lp-tab-copy strong {
    color: #1D4ED8;
}

@media (max-width: 680px) {
    .lp-bottomnav .lp-tab-library,
    .lp-bottomnav .lp-tab-library.is-active {
        min-height: 42px;
    }
    .lp-bottomnav .lp-tab-library .lp-tab-ico,
    .lp-bottomnav .lp-tab-library.is-active .lp-tab-ico {
        width: 20px;
        height: 20px;
    }
}
