/*
 * Guru Parampara tree (inc/parampara.php).
 * DOM order is founder -> present. Default view is present-first
 * (column-reverse): crown on top, founder at the roots below.
 * [data-order="founder"] flips it.
 */
.sp-pp {
    --pp-bg: #0d0f17;
    --pp-trunk: linear-gradient(180deg, #f59e0b, #b45309 55%, #6b3a12);
    --pp-gold: #f5b544;
    --pp-saffron: #f97316;
    --pp-text: #f5f1e8;
    --pp-muted: #b9b1a3;
    --pp-card: rgba(255, 255, 255, .045);
    --pp-line: rgba(245, 181, 68, .28);
    position: relative;
    clear: both;
    margin: 2rem 0 0;
    padding: clamp(1.25rem, 3.5vw, 3rem);
    border-radius: 22px;
    background:
        radial-gradient(ellipse at 50% 0%, rgba(249, 115, 22, .18), transparent 60%),
        radial-gradient(ellipse at 50% 100%, rgba(180, 83, 9, .22), transparent 55%),
        var(--pp-bg);
    color: var(--pp-text);
    overflow: hidden;
    isolation: isolate;
}

.sp-pp::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image: radial-gradient(rgba(255, 255, 255, .55) 1px, transparent 1.5px);
    background-size: 46px 46px;
    opacity: .08;
    pointer-events: none;
}

.sp-pp__head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: clamp(1.25rem, 3vw, 2.25rem);
}

.sp-pp__eyebrow {
    margin: 0 0 .35rem;
    font-size: .75rem;
    font-weight: 800;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--pp-gold);
}

body.sp-future .sp-pp h2,
.sp-pp h2 {
    margin: 0;
    font-family: Georgia, "Noto Serif", serif;
    font-size: clamp(1.5rem, 3.4vw, 2.3rem);
    font-weight: 600;
    color: var(--pp-text);
}

.sp-pp__count {
    margin: .4rem 0 0;
    color: var(--pp-muted);
}

.sp-pp__rotate {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    padding: .7rem 1.1rem;
    border: 1px solid var(--pp-line);
    border-radius: 999px;
    background: rgba(245, 181, 68, .1);
    color: var(--pp-text);
    font-weight: 700;
    cursor: pointer;
    transition: background .2s, transform .2s, border-color .2s;
}

.sp-pp__rotate:hover,
.sp-pp__rotate:focus-visible {
    background: rgba(245, 181, 68, .2);
    border-color: var(--pp-gold);
    transform: translateY(-1px);
}

.sp-pp__rotate:focus-visible {
    outline: 2px solid var(--pp-gold);
    outline-offset: 3px;
}

.sp-pp__rotate-icon {
    width: 18px;
    height: 18px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    transition: transform .5s ease;
}

.sp-pp[data-order="founder"] .sp-pp__rotate-icon {
    transform: rotate(180deg);
}

/* ---------- Tree layout ---------- */
.sp-pp__stage {
    perspective: 1400px;
}

.sp-pp__list {
    display: flex;
    flex-direction: column-reverse;
    gap: .9rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.sp-pp[data-order="founder"] .sp-pp__list {
    flex-direction: column;
}

.sp-pp__tree {
    position: relative;
    padding: .5rem 0;
}

/* The trunk. */
.sp-pp__tree::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 6px;
    margin-left: -3px;
    border-radius: 6px;
    background: var(--pp-trunk);
    box-shadow: 0 0 24px rgba(245, 158, 11, .35);
}

.sp-pp[data-order="founder"] .sp-pp__tree::before {
    transform: scaleY(-1);
}

.sp-pp__node {
    position: relative;
    width: calc(50% - 34px);
}

.sp-pp__list>.sp-pp__node:nth-child(even) {
    margin-left: auto;
}

.sp-pp__leaf {
    position: absolute;
    top: 22px;
    right: -42px;
    width: 18px;
    height: 18px;
    border-radius: 0 100% 0 100%;
    background: linear-gradient(135deg, #84cc16, #3f6212);
    box-shadow: 0 0 0 3px var(--pp-bg);
    transform: rotate(45deg);
}

.sp-pp__list>.sp-pp__node:nth-child(even) .sp-pp__leaf {
    right: auto;
    left: -42px;
    border-radius: 100% 0 100% 0;
}

/* Branch from trunk to card. */
.sp-pp__node::after {
    content: "";
    position: absolute;
    top: 30px;
    right: -26px;
    width: 26px;
    height: 2px;
    background: var(--pp-line);
}

.sp-pp__list>.sp-pp__node:nth-child(even)::after {
    right: auto;
    left: -26px;
}

.sp-pp__card {
    display: flex;
    gap: .85rem;
    align-items: flex-start;
    padding: .9rem 1rem;
    border: 1px solid rgba(255, 255, 255, .09);
    border-radius: 14px;
    background: var(--pp-card);
    backdrop-filter: blur(4px);
    transition: transform .25s ease, border-color .25s ease, background .25s ease;
}

.sp-pp__card:hover {
    transform: translateY(-2px);
    border-color: var(--pp-line);
    background: rgba(255, 255, 255, .07);
}

.sp-pp__n {
    flex: none;
    display: grid;
    place-items: center;
    min-width: 40px;
    height: 40px;
    padding: 0 .4rem;
    border-radius: 12px;
    background: rgba(245, 181, 68, .14);
    color: var(--pp-gold);
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.sp-pp__body {
    display: grid;
    gap: .2rem;
    min-width: 0;
}

.sp-pp__name {
    color: var(--pp-text);
    font-size: 1.02rem;
    line-height: 1.35;
}

.sp-pp__period {
    color: var(--pp-muted);
    font-size: .86rem;
}

.sp-pp__note {
    color: var(--pp-muted);
    font-size: .86rem;
    line-height: 1.5;
}

.sp-pp__chip {
    justify-self: start;
    padding: .15rem .55rem;
    border-radius: 999px;
    background: rgba(249, 115, 22, .18);
    color: #fdba74;
    font-size: .7rem;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

body.sp-future .sp-pp a.sp-pp__link,
.sp-pp__link {
    justify-self: start;
    margin-top: .25rem;
    color: var(--pp-gold);
    font-weight: 700;
    font-size: .88rem;
    text-decoration: none;
}

.sp-pp__link:hover {
    text-decoration: underline;
}

/* Present Acharya: glowing crown leaf. */
.sp-pp__node--present .sp-pp__card,
.sp-pp__node.is-current .sp-pp__card {
    border-color: rgba(245, 181, 68, .55);
    background: linear-gradient(135deg, rgba(249, 115, 22, .2), rgba(245, 181, 68, .08));
    box-shadow: 0 0 0 1px rgba(245, 181, 68, .25), 0 18px 40px -18px rgba(249, 115, 22, .6);
}

.sp-pp__node--present .sp-pp__leaf {
    background: radial-gradient(circle, #fde68a, #f59e0b);
    animation: sp-pp-glow 2.6s ease-in-out infinite;
}

.sp-pp__node--designate .sp-pp__chip {
    background: rgba(132, 204, 22, .16);
    color: #bef264;
}

.sp-pp__node--claimant .sp-pp__chip {
    background: rgba(148, 163, 184, .18);
    color: #cbd5e1;
}

.sp-pp__node--gap .sp-pp__card {
    border-style: dashed;
    background: transparent;
}

.sp-pp__node--gap .sp-pp__leaf {
    background: transparent;
    border: 2px dashed var(--pp-line);
}

.sp-pp__node--gap .sp-pp__name {
    color: var(--pp-muted);
    font-style: italic;
    font-weight: 600;
}

/* ---------- Roots (founder) and crown (present) ---------- */
.sp-pp__root {
    position: relative;
    z-index: 1;
    display: grid;
    justify-items: center;
    gap: .5rem;
    padding-top: .25rem;
}

.sp-pp__card--root {
    display: grid;
    justify-items: center;
    gap: .3rem;
    width: min(520px, 100%);
    padding: 1.1rem 1.25rem;
    border: 1px solid rgba(245, 181, 68, .5);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(120, 53, 15, .55), rgba(30, 20, 10, .9));
    text-align: center;
}

.sp-pp__card--root .sp-pp__name {
    font-family: Georgia, "Noto Serif", serif;
    font-size: clamp(1.15rem, 2.4vw, 1.45rem);
}

.sp-pp__roots {
    display: block;
    order: 2;
    width: min(260px, 70%);
}

.sp-pp__roots svg {
    display: block;
    width: 100%;
    height: auto;
    fill: none;
    stroke: #92400e;
    stroke-width: 5;
    stroke-linecap: round;
}

.sp-pp[data-order="founder"] .sp-pp__roots {
    order: -1;
    transform: scaleY(-1);
}

.sp-pp__crown {
    display: grid;
    justify-items: center;
}

.sp-pp__crown span {
    display: block;
    width: 120px;
    height: 70px;
    border-radius: 60% 60% 45% 45%;
    background:
        radial-gradient(circle at 30% 60%, rgba(132, 204, 22, .55), transparent 45%),
        radial-gradient(circle at 70% 55%, rgba(101, 163, 13, .55), transparent 45%),
        radial-gradient(circle at 50% 30%, rgba(190, 242, 100, .45), transparent 50%);
    filter: blur(1px);
}

/* ---------- Folded middle ---------- */
.sp-pp__fold {
    position: relative;
    z-index: 1;
}

.sp-pp__fold>details>summary {
    display: block;
    width: max-content;
    max-width: 100%;
    margin: 0 auto;
    padding: .6rem 1.1rem;
    border: 1px dashed var(--pp-line);
    border-radius: 999px;
    background: var(--pp-bg);
    color: var(--pp-gold);
    font-weight: 700;
    cursor: pointer;
    list-style: none;
    text-align: center;
}

.sp-pp__fold>details>summary::-webkit-details-marker {
    display: none;
}

.sp-pp__fold>details[open]>summary {
    margin-bottom: .9rem;
}

.sp-pp__fold>details>.sp-pp__list {
    max-height: 70vh;
    overflow-y: auto;
    padding: .25rem 0;
    scrollbar-color: var(--pp-gold) transparent;
}

/* ---------- Fork (two succession lines) ---------- */
.sp-pp__fork {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    padding: 1rem;
    border: 1px solid var(--pp-line);
    border-radius: 18px;
    background: rgba(13, 15, 23, .92);
}

.sp-pp__branch-label {
    margin: 0 0 .75rem;
    color: var(--pp-gold);
    font-weight: 800;
    font-size: .82rem;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.sp-pp__fork .sp-pp__node {
    width: 100%;
    margin-left: 0 !important;
}

.sp-pp__fork .sp-pp__leaf,
.sp-pp__fork .sp-pp__node::after {
    display: none;
}

/* ---------- Footnotes ---------- */
.sp-pp__notice {
    margin: 1.5rem 0 0;
    padding: .85rem 1rem;
    border-left: 3px solid var(--pp-gold);
    border-radius: 8px;
    background: rgba(245, 181, 68, .08);
    color: var(--pp-text);
}

.sp-pp__basis {
    margin: 1rem 0 0;
    color: var(--pp-muted);
    font-size: .85rem;
}

/* ---------- Reveal + rotate motion ---------- */
.sp-pp.is-ready .sp-pp__node {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity .5s ease, transform .5s ease;
}

.sp-pp.is-ready .sp-pp__node.is-in {
    opacity: 1;
    transform: none;
}

.sp-pp__stage.is-flipping {
    animation: sp-pp-flip .7s ease-in-out;
}

@keyframes sp-pp-flip {
    0% {
        transform: rotateX(0);
        opacity: 1;
    }

    45% {
        transform: rotateX(88deg);
        opacity: .15;
    }

    55% {
        transform: rotateX(-88deg);
        opacity: .15;
    }

    100% {
        transform: rotateX(0);
        opacity: 1;
    }
}

@keyframes sp-pp-glow {

    0%,
    100% {
        box-shadow: 0 0 0 3px var(--pp-bg), 0 0 10px rgba(245, 158, 11, .6);
    }

    50% {
        box-shadow: 0 0 0 3px var(--pp-bg), 0 0 22px rgba(253, 230, 138, .95);
    }
}

@media (prefers-reduced-motion: reduce) {

    .sp-pp__stage.is-flipping,
    .sp-pp__node--present .sp-pp__leaf {
        animation: none;
    }

    .sp-pp.is-ready .sp-pp__node {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* ---------- Tablet / mobile: trunk on the left, cards on one side ---------- */
@media (max-width: 760px) {
    .sp-pp__tree::before {
        left: 18px;
    }

    .sp-pp__node,
    .sp-pp__list>.sp-pp__node:nth-child(even) {
        width: auto;
        margin-left: 46px;
    }

    .sp-pp__leaf,
    .sp-pp__list>.sp-pp__node:nth-child(even) .sp-pp__leaf {
        left: -37px;
        right: auto;
    }

    .sp-pp__node::after,
    .sp-pp__list>.sp-pp__node:nth-child(even)::after {
        left: -22px;
        right: auto;
        width: 22px;
    }

    .sp-pp__root,
    .sp-pp__crown {
        justify-items: start;
    }

    .sp-pp__card--root {
        justify-items: start;
        text-align: left;
    }

    .sp-pp__fork {
        grid-template-columns: 1fr;
        margin-left: 0;
    }

    .sp-pp {
        padding-inline: .85rem;
    }

    .sp-pp__card {
        gap: .6rem;
        padding: .75rem .8rem;
    }

    .sp-pp__n {
        min-width: 32px;
        height: 32px;
        border-radius: 10px;
        font-size: .82rem;
    }

    .sp-pp__name {
        font-size: .96rem;
        hyphens: auto;
    }

    .sp-pp__head {
        align-items: stretch;
    }

    .sp-pp__rotate {
        justify-content: center;
        width: 100%;
    }
}

/* ---------- Acharya profile: place in the parampara ---------- */
.sp-pp-pos {
    margin: 1.25rem 0;
    padding: clamp(1rem, 2.5vw, 1.5rem);
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(120, 53, 15, .35), rgba(13, 15, 23, .95));
    border: 1px solid rgba(245, 181, 68, .3);
    color: #f5f1e8;
}

.sp-pp-pos .sp-pp__eyebrow {
    color: #f5b544;
}

.sp-pp-pos__chain {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: .75rem;
    margin: .5rem 0 1rem;
    padding: 0;
    list-style: none;
    counter-reset: none;
}

.sp-pp-pos__item {
    position: relative;
    display: grid;
    gap: .2rem;
    padding: .85rem 1rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, .05);
    border: 1px solid rgba(255, 255, 255, .08);
}

.sp-pp-pos__item--self {
    background: linear-gradient(135deg, rgba(249, 115, 22, .25), rgba(245, 181, 68, .1));
    border-color: rgba(245, 181, 68, .55);
}

.sp-pp-pos__label {
    color: #f5b544;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.sp-pp-pos__item strong {
    color: #f5f1e8;
}

.sp-pp-pos .sp-pp__period {
    color: #b9b1a3;
}

body.sp-future .sp-pp-pos a.sp-pp-pos__all,
.sp-pp-pos__all {
    color: #f5b544;
    font-weight: 700;
    text-decoration: none;
}

.sp-pp-pos__all:hover {
    text-decoration: underline;
}

/* ---------- Peeth / Sampradaya header: founding block and fresh hero ---------- */
.sp-dharma-profile--peeth .sp-wiki__head,
.sp-dharma-profile--sampradaya .sp-wiki__head {
    position: relative;
    margin: calc(-1 * clamp(1.25rem, 3vw, 2.25rem)) calc(-1 * clamp(1.25rem, 3vw, 2.25rem)) 1.5rem;
    padding: clamp(1.5rem, 4vw, 3rem) clamp(1.25rem, 3vw, 2.25rem) 1.5rem;
    border-bottom: 0;
    border-radius: 18px 18px 0 0;
    background:
        radial-gradient(ellipse at 85% 0%, rgba(249, 115, 22, .22), transparent 55%),
        linear-gradient(180deg, #fff4e3, #fffdf8);
    overflow: hidden;
}

.sp-dharma-profile--peeth .sp-wiki__head::after,
.sp-dharma-profile--sampradaya .sp-wiki__head::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    background: linear-gradient(90deg, #f97316, #f5b544, transparent);
}

.sp-wiki__founding {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
    margin: 1rem 0 0;
}

.sp-wiki__founding>div {
    display: grid;
    gap: .1rem;
    padding: .55rem .9rem;
    border: 1px solid rgba(194, 65, 12, .22);
    border-radius: 12px;
    background: rgba(255, 255, 255, .7);
    transition: transform .2s ease, box-shadow .2s ease;
}

.sp-wiki__founding>div:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px -14px rgba(194, 65, 12, .5);
}

.sp-wiki__founding dt {
    color: #9a3412;
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.sp-wiki__founding dd {
    margin: 0;
    color: #1c1917;
    font-weight: 700;
}

body.sp-future .sp-wiki__founding a {
    color: #c2410c;
    text-decoration: none;
}

.sp-wiki__section,
.sp-folio__card {
    transition: box-shadow .25s ease;
}

.sp-wiki__people a {
    transition: transform .2s ease, box-shadow .2s ease;
}

.sp-wiki__people a:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 26px -16px rgba(28, 25, 23, .45);
}

@media (prefers-reduced-motion: reduce) {

    .sp-wiki__founding>div,
    .sp-wiki__people a {
        transition: none;
    }
}
/* ---- 3D Guru Parampara tree (Peetham pages) ---- */
.sp-pp3d { margin: 0 0 1.5rem; }
.sp-pp3d__view {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    max-height: 640px;
    border-radius: 18px;
    overflow: hidden;
    background: radial-gradient(120% 90% at 50% 15%, #4a2a12 0%, #241409 55%, #120a05 100%);
    box-shadow: inset 0 0 0 1px rgba(246, 195, 91, .18);
    touch-action: pan-y;
}
.sp-pp3d__canvas { display: block; width: 100%; height: 100%; cursor: grab; }
.sp-pp3d__canvas:active { cursor: grabbing; }
.sp-pp3d__loading {
    position: absolute; inset: 0; display: grid; place-items: center; margin: 0;
    color: #f6dcae; font-size: .95rem; letter-spacing: .04em;
}
.sp-pp3d.is-ready .sp-pp3d__loading { display: none; }
.sp-pp3d__card {
    position: absolute; left: 14px; bottom: 14px; max-width: min(340px, calc(100% - 28px));
    display: grid; gap: 2px; padding: 10px 14px; border-radius: 12px;
    background: rgba(18, 10, 5, .72); color: #fff3df; backdrop-filter: blur(6px);
    box-shadow: 0 0 0 1px rgba(246, 195, 91, .3);
    opacity: 0; transition: opacity .3s;
}
.sp-pp3d.is-ready .sp-pp3d__card { opacity: 1; }
.sp-pp3d__num { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: #f6c35b; }
.sp-pp3d__name { font-size: 1.05rem; line-height: 1.25; }
.sp-pp3d__period { font-size: .85rem; opacity: .85; }
.sp-pp3d__link { font-size: .85rem; color: #ffc85c; text-decoration: underline; }
.sp-pp3d__time { margin-top: .8rem; }
.sp-pp3d__label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: .35rem; }
.sp-pp3d__range { width: 100%; accent-color: #e8761a; min-height: 32px; }
.sp-pp3d__ends { display: flex; justify-content: space-between; gap: 1rem; font-size: .78rem; opacity: .75; }
.sp-pp3d__credit { margin: .4rem 0 0; font-size: .75rem; opacity: .65; }
@media (max-width: 1024px) { .sp-pp3d__view { aspect-ratio: 4 / 3; } }
@media (max-width: 600px) {
    .sp-pp3d__view { aspect-ratio: 4 / 5; border-radius: 14px; }
    .sp-pp3d__card { left: 10px; right: 10px; bottom: 10px; max-width: none; }
    .sp-pp3d__name { font-size: .98rem; }
}
.sp-pp3d__time { padding: .8rem 1rem .6rem; border-radius: 14px; background: #1d120a; color: #f6dcae; }
.sp-pp3d__label { color: #ffe3b3; }
.sp-pp3d__ends { color: #f6dcae; }
@media (max-width: 600px) {
    .sp-pp3d__card { position: static; margin-top: .6rem; opacity: 1; background: #1d120a; }
    .sp-pp3d__view { overflow: visible; aspect-ratio: auto; background: none; box-shadow: none; }
    .sp-pp3d__canvas { aspect-ratio: 4 / 5; border-radius: 14px; background: radial-gradient(120% 90% at 50% 15%, #4a2a12 0%, #241409 55%, #120a05 100%); }
    .sp-pp3d__loading { bottom: auto; height: 60%; }
}
@media (min-width: 601px) and (max-width: 1024px) {
    .sp-pp3d__view { overflow: visible; aspect-ratio: auto; background: none; box-shadow: none; }
    .sp-pp3d__canvas { aspect-ratio: 4 / 3; border-radius: 18px; background: radial-gradient(120% 90% at 50% 15%, #4a2a12 0%, #241409 55%, #120a05 100%); }
    .sp-pp3d__card { position: static; margin-top: .6rem; max-width: none; opacity: 1; background: #1d120a; }
    .sp-pp3d__loading { bottom: auto; height: 70%; }
}
/* ---- Realistic Guru Parampara tree (v2) ---- */
.sp-pp3t { margin: 0 0 1.5rem; color: #fff3df; }
.sp-pp3t__main { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 14px; }
.sp-pp3t__stage {
    position: relative; aspect-ratio: 16 / 10; max-height: 640px; border-radius: 18px; overflow: hidden;
    background: linear-gradient(#6fa6d6, #f2d9b0 70%, #6d8a3f 70%); touch-action: pan-y;
    box-shadow: 0 0 0 1px rgba(246, 195, 91, .25);
}
.sp-pp3t__canvas { display: block; width: 100%; height: 100%; cursor: grab; }
.sp-pp3t__canvas:active { cursor: grabbing; }
.sp-pp3t__loading { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; color: #3b2614; font-weight: 600; }
.sp-pp3t.is-ready .sp-pp3t__loading { display: none; }
.sp-pp3t__tags { position: absolute; inset: 0; pointer-events: none; }
.sp-pp3t__tag {
    position: absolute; left: 0; top: 0; display: grid; gap: 1px; max-width: 220px; padding: 6px 10px; border-radius: 10px;
    background: rgba(24, 13, 5, .78); box-shadow: 0 0 0 1px rgba(255, 200, 92, .55), 0 6px 18px rgba(0, 0, 0, .25);
    color: #fff3df; font-size: .82rem; line-height: 1.25; transition: opacity .3s;
}
.sp-pp3t__tag strong { font-size: .92rem; color: #ffe1a3; }
.sp-pp3t__tag span { font-size: .78rem; opacity: .9; }
.sp-pp3t__tag--1 { opacity: .7; transform-origin: left; font-size: .75rem; }
.sp-pp3t__tag--2 { opacity: .45; font-size: .75rem; }
.sp-pp3t__tag--1 strong, .sp-pp3t__tag--2 strong { font-size: .8rem; color: #fff3df; }
.sp-pp3t__now {
    position: absolute; left: 14px; top: 14px; display: grid; gap: 2px; max-width: min(360px, calc(100% - 120px));
    padding: 10px 14px; border-radius: 12px; background: rgba(24, 13, 5, .8); backdrop-filter: blur(6px);
    box-shadow: 0 0 0 1px rgba(246, 195, 91, .35);
}
.sp-pp3t__num { font-size: .75rem; text-transform: uppercase; letter-spacing: .1em; color: #f6c35b; }
.sp-pp3t__name { font-size: 1.15rem; line-height: 1.25; }
.sp-pp3t__period { font-size: 1rem; font-weight: 600; color: #ffd27a; }
.sp-pp3t__link { font-size: .85rem; color: #ffc85c; text-decoration: underline; }
.sp-pp3t__play {
    position: absolute; right: 14px; top: 14px; min-height: 40px; padding: 0 16px; border: 0; border-radius: 999px;
    background: rgba(24, 13, 5, .8); color: #ffe1a3; font-weight: 600; font-size: .9rem; cursor: pointer;
    box-shadow: 0 0 0 1px rgba(246, 195, 91, .45);
}
.sp-pp3t__play:focus-visible, .sp-pp3t__list button:focus-visible, .sp-pp3t__seg:focus-visible { outline: 3px solid #ffb347; outline-offset: 2px; }
.sp-pp3t__list {
    list-style: none; margin: 0; padding: 6px; border-radius: 18px; background: #1d120a; overflow-y: auto;
    height: 0; min-height: 100%; scrollbar-width: thin; position: relative;
}
.sp-pp3t__list li { margin: 0; }
.sp-pp3t__list button {
    display: grid; grid-template-columns: auto 1fr; column-gap: 8px; width: 100%; padding: 7px 10px; border: 0; border-radius: 10px;
    background: none; color: #f6dcae; text-align: left; font: inherit; cursor: pointer; transition: background .2s;
}
.sp-pp3t__list button span { grid-row: span 2; min-width: 3.4em; font-size: .75rem; color: #c9a36a; padding-top: 2px; }
.sp-pp3t__list button strong { font-size: .88rem; font-weight: 600; line-height: 1.25; }
.sp-pp3t__list button em { font-style: normal; font-size: .78rem; opacity: .8; }
.sp-pp3t__list button:hover { background: rgba(255, 200, 92, .1); }
.sp-pp3t__list button.is-current { background: #e8761a; color: #fff; }
.sp-pp3t__list button.is-current span { color: #fff3df; }
.sp-pp3t__list .is-gap button { opacity: .6; }
.sp-pp3t__era { margin-top: 12px; padding: 12px 14px 8px; border-radius: 14px; background: #1d120a; }
.sp-pp3t__era-title { margin: 0 0 8px; font-size: .85rem; font-weight: 600; color: #ffe3b3; }
.sp-pp3t__bar { display: flex; gap: 2px; height: 26px; }
.sp-pp3t__seg { flex: 1 1 0; min-width: 3px; padding: 0; border: 0; border-radius: 3px; background: #4a3a2a; cursor: pointer; transition: background .3s, transform .3s; }
.sp-pp3t__seg.is-unknown { background: repeating-linear-gradient(45deg, #4a3a2a 0 3px, #2b2016 3px 6px); }
.sp-pp3t__seg.is-lit { background: #d9a441; }
.sp-pp3t__seg.is-present.is-lit { background: #ff8a2a; }
.sp-pp3t__seg.is-current { background: #fff3df; transform: scaleY(1.25); }
.sp-pp3t__ticks { position: relative; height: 18px; margin-top: 4px; font-size: .75rem; color: #c9a36a; }
.sp-pp3t__ticks span { position: absolute; top: 0; transform: translateX(-50%); white-space: nowrap; }
.sp-pp3t__ticks span::before { content: ""; position: absolute; left: 50%; top: -6px; width: 1px; height: 5px; background: #c9a36a; }
.sp-pp3t__credit { margin: .5rem 0 0; font-size: .78rem; opacity: .75; color: inherit; }
@media (max-width: 1024px) {
    .sp-pp3t__main { grid-template-columns: 1fr; }
    .sp-pp3t__stage { aspect-ratio: 4 / 3; }
    .sp-pp3t__list { height: auto; min-height: 0; max-height: 300px; }
    .sp-pp3t__ticks span:nth-child(even) { display: none; }
}
@media (max-width: 600px) {
    .sp-pp3t__stage { aspect-ratio: 4 / 5; border-radius: 14px; }
    .sp-pp3t__now { left: 10px; top: 10px; max-width: calc(100% - 100px); padding: 8px 10px; }
    .sp-pp3t__name { font-size: 1rem; }
    .sp-pp3t__period { font-size: .9rem; }
    .sp-pp3t__play { right: 10px; top: 10px; padding: 0 12px; }
    .sp-pp3t__tag--1, .sp-pp3t__tag--2 { display: none; }
    .sp-pp3t__tag { max-width: 170px; }
    .sp-pp3t__ticks span:nth-child(odd) { display: inline; }
    .sp-pp3t__ticks span:nth-child(even) { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    .sp-pp3t__seg, .sp-pp3t__tag, .sp-pp3t__list button { transition: none; }
}
.sp-pp3t__note { font-size: .8rem; line-height: 1.4; color: #f3dcb6; max-width: 34ch; }
.sp-pp3t__mini {
    position: absolute; left: 0; top: 0; max-width: 190px; padding: 3px 8px; border-radius: 8px;
    background: rgba(24, 13, 5, .72); color: #fff3df; font-size: .75rem; line-height: 1.25;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none;
}
.sp-pp3t__mini span { display: block; color: #ffd27a; opacity: .9; }
.sp-pp3t__mini.is-gap { color: #cfc6b8; font-style: italic; }
.sp-pp3t__zoom { position: absolute; right: 14px; top: 62px; display: grid; gap: 6px; }
.sp-pp3t__zoom button {
    width: 40px; height: 40px; border: 0; border-radius: 50%; background: rgba(24, 13, 5, .8);
    color: #ffe1a3; font-size: 1.3rem; line-height: 1; cursor: pointer; box-shadow: 0 0 0 1px rgba(246, 195, 91, .45);
}
.sp-pp3t__zoom button:focus-visible { outline: 3px solid #ffb347; outline-offset: 2px; }
.sp-pp3t__hint {
    position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); margin: 0; padding: 4px 12px;
    border-radius: 999px; background: rgba(24, 13, 5, .65); color: #ffe1a3; font-size: .75rem;
    pointer-events: none; transition: opacity .4s; white-space: nowrap;
}
.sp-pp3t.is-zoomed .sp-pp3t__hint { opacity: 0; }
.sp-pp3t__list button small { grid-column: 2; font-size: .75rem; line-height: 1.35; opacity: .75; }
.sp-pp3t.is-flat .sp-pp3t__main { grid-template-columns: 1fr; }
.sp-pp3t.is-flat .sp-pp3t__list { height: auto; max-height: 520px; }
@media (max-width: 600px) {
    .sp-pp3t__zoom { right: 10px; top: 56px; }
    .sp-pp3t__mini { max-width: 140px; }
    .sp-pp3t__now .sp-pp3t__note { display: none; }
}
.sp-pp3t__list button span { grid-row: span 3; }
.sp-pp3t .sp-pp3t__zoom button:hover, .sp-pp3t .sp-pp3t__zoom button:focus, .sp-pp3t .sp-pp3t__zoom button:active,
.sp-pp3t .sp-pp3t__play:hover, .sp-pp3t .sp-pp3t__play:focus { background: rgba(24, 13, 5, .9); color: #ffe1a3; }
/* Responsive pass: the tree keeps most of the screen on every device and
   the overlays stay clear of it. */
.sp-pp3t__stage { max-height: min(680px, 82vh); max-height: min(680px, 82svh); contain: layout paint; }
.sp-pp3t__canvas { touch-action: pan-y; }
.sp-pp3t__tag, .sp-pp3t__mini { will-change: transform; }
@media (min-width: 1025px) and (max-width: 1280px) {
    .sp-pp3t__main { grid-template-columns: minmax(0, 1fr) 260px; }
}
@media (min-width: 601px) and (max-width: 1024px) {
    .sp-pp3t__stage { aspect-ratio: 16 / 11; }
    .sp-pp3t__list { max-height: 340px; display: grid; grid-template-columns: 1fr 1fr; align-content: start; column-gap: 4px; }
    .sp-pp3t__list li:first-child { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
    .sp-pp3t__stage { aspect-ratio: 3 / 4; max-height: 78svh; }
    .sp-pp3t__now {
        top: auto; bottom: 10px; left: 10px; right: 10px; max-width: none;
        grid-template-columns: auto 1fr; column-gap: 8px; align-items: baseline;
    }
    .sp-pp3t__now .sp-pp3t__num { grid-row: span 2; }
    .sp-pp3t__now .sp-pp3t__link, .sp-pp3t__now .sp-pp3t__note { grid-column: 2; }
    .sp-pp3t__now .sp-pp3t__note {
        display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; max-width: none;
    }
    .sp-pp3t__now:not(.has-note) .sp-pp3t__note { display: none; }
    .sp-pp3t__hint { top: 12px; bottom: auto; left: 12px; transform: none; font-size: .7rem; }
    .sp-pp3t__play { min-height: 44px; }
    .sp-pp3t__zoom { top: 62px; }
    .sp-pp3t__zoom button { width: 44px; height: 44px; }
    .sp-pp3t__list { max-height: 46svh; }
    .sp-pp3t__list button { padding: 9px 10px; }
    .sp-pp3t__bar { height: 30px; }
    .sp-pp3t__era-title { font-size: .8rem; }
}
.sp-pp3t__bar.is-dense { gap: 1px; }
.sp-pp3t__bar.is-dense .sp-pp3t__seg { min-width: 0; border-radius: 1px; }
.sp-pp3t__ticks span.is-end { transform: translateX(-100%); }
.sp-pp3t__ticks span.is-end::before { left: 100%; }
.sp-pp3t__ticks span.is-start { transform: none; }
.sp-pp3t__ticks span.is-start::before { left: 0; }
.sp-pp3t__era { overflow: hidden; }
.sp-pp3t__tag[hidden], .sp-pp3t__mini[hidden] { display: none; }
@media (max-width: 600px) { .sp-pp3t .sp-pp3t__stage .sp-pp3t__hint { right: 104px; width: auto; max-width: none; white-space: normal; line-height: 1.3; } }
