/*
Theme Name: Popcorn Jedi
Author: Max & KP Lott
Description: A lightweight classic WordPress theme created for Popcorn Jedi, with daily branding and native Light/Dark colour modes.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: popcorn-jedi
*/
:root{--pj-purple:#6f42c1;--pj-purple-deep:#40206f;--pj-purple-soft:#8e67cf;--pj-gold:#d4af37;--pj-gold-bright:#f1cd56;--pj-bg:#fff;--pj-surface:rgba(250,248,252,.94);--pj-surface-raised:rgba(255,255,255,.97);--pj-text:#18151d;--pj-muted:#625d69;--pj-border:rgba(80,49,105,.45);--pj-link:#5b2fa3;--pj-header-bg:#17121d;--pj-header-text:#fff;--pj-max-width:1440px;--pj-sidebar-width:340px;--pj-radius:12px;--pj-shadow:0 3px 8px rgba(23,18,29,.30),0 14px 34px rgba(23,18,29,.28);--pj-image-shadow:0 2px 7px rgba(0,0,0,.55),0 8px 20px rgba(0,0,0,.38);--pj-feature-shadow:0 3px 9px rgba(0,0,0,.68),0 12px 28px rgba(0,0,0,.42)}
html[data-pj-mode=dark]{--pj-bg:#121015;--pj-surface:rgba(29,24,34,.95);--pj-surface-raised:rgba(33,26,39,.97);--pj-text:#f4f0f7;--pj-muted:#c6bdcc;--pj-border:rgba(220,205,231,.48);--pj-link:#f1cd56;--pj-shadow:0 2px 7px rgba(255,255,255,.34),0 12px 32px rgba(255,255,255,.23);--pj-image-shadow:0 2px 8px rgba(255,255,255,.44),0 9px 22px rgba(255,255,255,.27);--pj-feature-shadow:0 3px 10px rgba(255,255,255,.54),0 12px 30px rgba(255,255,255,.32)}
*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;color:var(--pj-text);font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;line-height:1.65;background-color:transparent;background-image:none;position:relative;min-height:100%}body::before{content:"";position:fixed;inset:0;z-index:-2;background-image:linear-gradient(rgba(8,5,12,.18),rgba(8,5,12,.18)),var(--pj-daily-background);background-position:center;background-repeat:no-repeat;background-size:cover;pointer-events:none}html{min-height:100%;background:var(--pj-bg)}body{isolation:isolate}a{color:var(--pj-link);text-underline-offset:.16em}a:hover{color:var(--pj-purple-soft)}a:focus-visible,button:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{outline:3px solid var(--pj-gold);outline-offset:3px}img{max-width:100%;height:auto}.pj-container{width:min(calc(100% - 3rem),var(--pj-max-width));margin-inline:auto}.screen-reader-text{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.pj-skip-link{position:absolute;left:1rem;top:-10rem;z-index:9999;padding:.75rem 1rem;background:var(--pj-gold);color:#17120a;font-weight:800}.pj-skip-link:focus{top:1rem}
.site-header{position:relative;z-index:3;color:var(--pj-header-text);border-bottom:3px solid var(--pj-gold)}.pj-branding-shell{min-height:210px;display:flex;align-items:center;background-image:linear-gradient(90deg,rgba(0,0,0,.32),rgba(0,0,0,.12)),var(--pj-daily-header);background-position:center;background-repeat:no-repeat;background-size:cover;box-shadow:inset 0 -20px 45px rgba(0,0,0,.35)}.pj-branding-shell__inner{min-height:210px;display:flex;align-items:flex-end;justify-content:space-between;gap:2rem;padding-block:1.5rem}.site-branding{max-width:650px}.site-title{margin:0;font-size:clamp(2rem,4.8vw,4.2rem);line-height:.95}.site-title a{color:#fff;text-decoration:none;text-shadow:0 3px 16px rgba(0,0,0,.8)}.site-description{margin:.55rem 0 0;color:var(--pj-gold-bright);font-weight:800;letter-spacing:.08em;text-transform:uppercase;text-shadow:0 2px 8px rgba(0,0,0,.8)}.pj-title-banner{flex:0 1 52%;display:flex;align-items:center;justify-content:flex-end}.pj-title-banner img{display:block;width:min(100%,1080px);max-height:145px;object-fit:contain;object-position:right center;filter:drop-shadow(0 4px 8px rgba(0,0,0,.7))}.pj-nav-shell{position:relative;z-index:5;background:linear-gradient(180deg,#5b2e88,#40206f);border-bottom:2px solid var(--pj-gold);box-shadow:0 5px 16px rgba(0,0,0,.35)}.site-navigation{width:100%;overflow:visible}.primary-menu{display:flex;align-items:stretch;flex-wrap:wrap;margin:0;padding:0;list-style:none}.primary-menu li{position:relative}.primary-menu>li>a{display:flex;align-items:center;min-height:48px;padding:.65rem .9rem;color:#fff;font-weight:800;text-decoration:none}.primary-menu>li>a:hover,.primary-menu>li>a:focus-visible,.primary-menu>.current-menu-item>a,.primary-menu>.current-menu-ancestor>a{color:var(--pj-gold-bright);background:rgba(0,0,0,.2);box-shadow:inset 0 -3px 0 var(--pj-gold)}.primary-menu .sub-menu{position:absolute;z-index:20;top:100%;left:0;min-width:220px;margin:0;padding:.35rem;list-style:none;background:#2b1648;border:1px solid rgba(255,215,0,.32);border-top:2px solid var(--pj-gold);border-radius:0 0 var(--pj-radius) var(--pj-radius);box-shadow:0 10px 24px rgba(0,0,0,.5);opacity:0;visibility:hidden;transform:translateY(5px);transition:.16s}.primary-menu li:hover>.sub-menu,.primary-menu li:focus-within>.sub-menu{opacity:1;visibility:visible;transform:none}.primary-menu .sub-menu a{display:block;padding:.6rem .72rem;color:#fff;font-weight:700;text-decoration:none;border-radius:4px}.primary-menu .sub-menu a:hover{color:var(--pj-gold-bright);background:rgba(255,255,255,.07)}
.site-main{padding:2rem 0 3rem}.pj-site-grid{display:grid;grid-template-columns:minmax(0,1fr) var(--pj-sidebar-width);gap:clamp(1.75rem,3vw,3rem);align-items:start}.pj-content-column,.pj-sidebar{min-width:0}.post-card,.single-entry,.pj-widget,.post-navigation{background:var(--pj-surface);backdrop-filter:blur(7px);border:1px solid var(--pj-border);border-radius:var(--pj-radius);box-shadow:var(--pj-shadow);padding:clamp(1rem,3vw,2rem);margin-bottom:1.5rem}.pj-page-heading,.single-entry{border-top:4px solid var(--pj-gold)}.entry-title{margin-top:0;line-height:1.2}.entry-title a{color:var(--pj-text);text-decoration:none}.entry-meta{color:var(--pj-gold);font-size:.86rem;font-weight:800;letter-spacing:.04em;margin-bottom:1rem}.entry-thumbnail{margin:0 0 1.5rem}.entry-thumbnail img{display:block;width:100%;border-radius:9px;box-shadow:var(--pj-image-shadow)}.entry-summary{color:var(--pj-muted)}.single-entry .entry-content{font-size:1.03rem;line-height:1.75}.single-entry .entry-thumbnail img{width:750px;max-width:none;transform:perspective(530px) rotateY(10deg) scaleX(1.2);transform-origin:center left;box-shadow:var(--pj-feature-shadow);animation:pj-featured-flicker 2.6s infinite}.pj-widget{padding:1.25rem}.pj-widget__title{margin:0 0 1rem;padding-bottom:.55rem;color:var(--pj-gold-bright);border-bottom:1px solid var(--pj-gold);font-size:1rem}.pj-sidebar img{max-width:100%;border-radius:9px}.pj-mode-control{margin:0 0 1rem;text-align:right}.pj-dark-toggle-wrap{display:flex;width:100%;justify-content:flex-end;min-height:60px;max-width:100%}.pj-icon-toggle{display:none;align-items:center;justify-content:center;cursor:pointer;flex:0 0 50px;width:50px;max-width:50px;padding:0;margin:0;background:transparent;border:0;line-height:0}.pj-icon-toggle:not([hidden]){display:inline-flex}.pj-mode-icon,.pj-halloween-icon,.pj-christmas-icon,.pj-newyear-icon,.pj-valentine-icon,.pj-patrick-icon,.pj-easter-icon,.pj-may4-icon{display:inline-flex;align-items:center;justify-content:center;width:50px;height:50px;margin-top:10px}.pj-icon-toggle svg{display:block;width:100%;height:100%;transition:filter .2s}.pj-everyday-moon{color:#18151d}.pj-everyday-sun{color:#FFD700}.pj-pumpkin{color:#ff7518}.pj-ghost{color:#f2f2f2}.pj-tree{color:#168821}.pj-snowflake{color:#8fddff}.pj-firework{color:#d4a017}.pj-starburst{color:#c0c0c0}.pj-heart-red{color:#d71920}.pj-heart-pink{color:#ff69b4}.pj-shamrock{color:#169b62}.pj-horseshoe{color:#d4a017}.pj-easter-egg{color:#ffb7d5}.pj-easter-bunny{color:#dfcbf5}.pj-twin-suns{color:#e0a82e}.pj-galactic-star{color:#e21b22}.pj-icon-toggle:hover svg{filter:drop-shadow(0 0 7px currentColor)}.site-footer{border-top:3px solid var(--pj-gold);background:rgba(16,11,21,.95);color:rgba(255,255,255,.8)}.site-footer__inner{padding:1.5rem 0;text-align:center}.pj-footer-credit{color:var(--pj-gold-bright)}input,textarea,select{max-width:100%;color:var(--pj-text);background:var(--pj-surface-raised);border:1px solid var(--pj-border);border-radius:7px;padding:.65rem .75rem}button,input[type=submit]{border:0;border-radius:7px;padding:.68rem 1rem;background:var(--pj-purple);color:#fff;font-weight:700;cursor:pointer}
@keyframes pj-featured-flicker{0%,30%,100%{opacity:1}5%{opacity:.92}10%{opacity:.97}15%{opacity:.90}20%{opacity:.98}25%{opacity:.94}40%{opacity:.93}50%{opacity:.99}60%{opacity:.91}70%{opacity:.96}80%{opacity:.93}90%{opacity:.99}}
@media(min-width:1081px){.post-card:not(.pj-page-heading){display:grid;grid-template-columns:minmax(240px,34%) minmax(0,1fr);column-gap:clamp(1.25rem,2vw,2rem);align-items:start}.post-card:not(.pj-page-heading) .entry-thumbnail{grid-column:1;grid-row:1/span 4;margin:0}.post-card:not(.pj-page-heading)>.entry-header,.post-card:not(.pj-page-heading)>.entry-summary{grid-column:2}.pj-sidebar{position:sticky;top:1.5rem;max-height:none;overflow:visible}}
@media(max-width:1080px){.pj-site-grid{grid-template-columns:1fr}.pj-sidebar{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem;position:static;max-height:none;overflow:visible}.pj-mode-control{grid-column:1/-1}}
@media(max-width:820px){.pj-branding-shell,.pj-branding-shell__inner{min-height:180px}.pj-title-banner{display:none}.site-branding{max-width:100%}.primary-menu{justify-content:center}.single-entry .entry-thumbnail img{width:100%;transform:perspective(700px) rotateY(4deg) scaleX(1.01)}}
@media(max-width:560px){.pj-container{width:min(calc(100% - 1.25rem),var(--pj-max-width))}.pj-sidebar{grid-template-columns:1fr}.primary-menu{display:block;padding:.4rem 0}.primary-menu .sub-menu{position:static;min-width:0;opacity:1;visibility:visible;transform:none;border:0;box-shadow:none;background:rgba(0,0,0,.14);padding-left:.75rem}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}.single-entry .entry-thumbnail img{animation:none;transition:none}.pj-icon-toggle svg{transition:none}}


/* ==========================================================
   v0.12.4 RECOVERY: CENTRED DAILY BRANDING
   ========================================================== */
.pj-branding-shell__inner {
    min-height: 210px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    text-align: center;
}

.pj-title-banner {
    width: min(90%, 1080px);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pj-title-banner img {
    display: block;
    width: min(100%, 900px);
    max-height: 132px;
    height: auto;
    object-fit: contain;
    margin: 0 auto;
}

.site-branding {
    width: 100%;
    margin: 0 auto;
    text-align: center;
}

.site-title,
.site-description {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.site-description {
    font-size: clamp(1rem, 2vw, 1.3rem);
}

/* The graphical daily banner is the visible identity; the WordPress
   Site Title setting is retained for metadata and accessibility. */
.site-title {
    margin-top: 0.15rem;
}

/* The toggle sits over the persistent daily artwork. */
.pj-everyday-moon {
    color: #ffffff;
}

@media (max-width: 820px) {
    .pj-branding-shell__inner {
        min-height: 180px;
        padding-top: 1rem;
        padding-bottom: 1rem;
    }

    .pj-title-banner {
        display: flex;
        width: min(96%, 760px);
    }

    .pj-title-banner img {
        max-height: 105px;
    }
}

@media (max-width: 520px) {
    .pj-branding-shell__inner {
        min-height: 155px;
    }

    .pj-title-banner img {
        max-height: 82px;
    }
}


/* ==========================================================
   v0.12.5 RECOVERY POLISH
   ========================================================== */
.pj-title-banner__link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    text-decoration: none;
}
.pj-title-banner__link img {
    display: block;
}


/* ==========================================================
   v0.12.6 NATIVE POPCORN JEDI LIGHTBOX
   Main-site architecture: PHP marks eligible image links,
   JavaScript handles the overlay and gallery behaviour.
   ========================================================== */
html.pj-lightbox-open,
html.pj-lightbox-open body {
    overflow: hidden;
}

.pj-lightbox-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(1rem, 3vw, 2.5rem);
    background: rgba(4, 3, 8, 0.94);
    animation: pj-lightbox-fade-in 0.2s ease both;
}

.pj-lightbox-overlay.pj-fade-out {
    animation: pj-lightbox-fade-out 0.25s ease both;
}

.pj-lightbox-inner {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: min(92vw, 1500px);
    max-height: 92vh;
}

.pj-lightbox-image {
    display: block;
    width: auto;
    max-width: min(88vw, 1450px);
    height: auto;
    max-height: 82vh;
    object-fit: contain;
    cursor: zoom-in;
    opacity: 0;
    transform: scale(0.985);
    transition: opacity 0.22s ease, transform 0.22s ease;
    border-radius: 4px;
    box-shadow:
        0 0 10px rgba(0, 180, 255, 0.72),
        0 0 28px rgba(51, 102, 255, 0.58),
        0 0 52px rgba(111, 66, 193, 0.46);
}

.pj-lightbox-image.pj-loaded {
    opacity: 1;
    transform: none;
}

.pj-lightbox-inner.zoomed {
    overflow: auto;
    align-items: flex-start;
    justify-content: flex-start;
    max-height: 90vh;
}

.pj-lightbox-inner.zoomed .pj-lightbox-image {
    max-width: none;
    max-height: none;
    cursor: zoom-out;
}

.pj-lightbox-caption {
    max-width: min(88vw, 1100px);
    margin-top: 0.9rem;
    padding: 0.45rem 0.75rem;
    color: #fff;
    background: rgba(17, 13, 24, 0.78);
    border: 1px solid rgba(212, 175, 55, 0.55);
    border-radius: 7px;
    text-align: center;
    line-height: 1.45;
}

.pj-lightbox-close,
.pj-lightbox-prev,
.pj-lightbox-next {
    position: absolute;
    z-index: 3;
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    padding: 0;
    border: 1px solid rgba(241, 205, 86, 0.75);
    border-radius: 50%;
    color: #fff;
    background: rgba(64, 32, 111, 0.92);
    box-shadow: 0 0 16px rgba(111, 66, 193, 0.72);
    font-size: 1.7rem;
    line-height: 1;
}

.pj-lightbox-close:hover,
.pj-lightbox-prev:hover,
.pj-lightbox-next:hover {
    color: #17120a;
    background: var(--pj-gold-bright);
}

.pj-lightbox-close { top: 1rem; right: 1rem; }
.pj-lightbox-prev { left: 0.35rem; top: 50%; transform: translateY(-50%); }
.pj-lightbox-next { right: 0.35rem; top: 50%; transform: translateY(-50%); }

@keyframes pj-lightbox-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes pj-lightbox-fade-out { from { opacity: 1; } to { opacity: 0; } }

@media (max-width: 700px) {
    .pj-lightbox-overlay { padding: 0.75rem; }
    .pj-lightbox-image { max-width: 92vw; max-height: 78vh; }
    .pj-lightbox-prev,
    .pj-lightbox-next { width: 42px; height: 42px; font-size: 1.35rem; }
}

@media (prefers-reduced-motion: reduce) {
    .pj-lightbox-overlay,
    .pj-lightbox-overlay.pj-fade-out,
    .pj-lightbox-image { animation: none; transition: none; }
}

/* ==========================================================
   v0.12.7 GALLERY PRESENTATION
   Presentation only. The native lightbox engine is unchanged.
   ========================================================== */
.gallery,
.wp-block-gallery,
.tiled-gallery,
.wp-block-jetpack-tiled-gallery {
    margin-top: 1.5rem;
    margin-bottom: 1.75rem;
}

/* Classic WordPress galleries. */
.gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: flex-start;
    justify-content: center;
}

.gallery-item {
    margin: 0 !important;
    text-align: center;
}

.gallery-icon {
    line-height: 0;
}

/* Block galleries. */
.wp-block-gallery {
    gap: 20px !important;
}

.wp-block-gallery .wp-block-image,
.wp-block-gallery figure {
    margin: 0 !important;
}

/* Jetpack tiled galleries. */
.tiled-gallery,
.wp-block-jetpack-tiled-gallery {
    margin-left: auto;
    margin-right: auto;
}

.tiled-gallery .gallery-row {
    margin-bottom: 20px !important;
}

/* Shared gallery image treatment. */
.gallery img,
.wp-block-gallery img,
.tiled-gallery img,
.tiled-gallery__item img,
.wp-block-jetpack-tiled-gallery img {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 20px;
    transition: box-shadow 0.25s ease, border-color 0.25s ease, filter 0.25s ease;
}

/* Light mode: prominent dark depth with a restrained purple accent. */
html[data-pj-mode="light"] .gallery img,
html[data-pj-mode="light"] .wp-block-gallery img,
html[data-pj-mode="light"] .tiled-gallery img,
html[data-pj-mode="light"] .tiled-gallery__item img,
html[data-pj-mode="light"] .wp-block-jetpack-tiled-gallery img {
    border: 1px solid rgba(107, 33, 168, 0.32);
    box-shadow:
        0 5px 14px rgba(0, 0, 0, 0.7),
        0 0 11px rgba(124, 58, 237, 0.38);
}

/* Dark mode: light separation with a blue-violet luminous edge. */
html[data-pj-mode="dark"] .gallery img,
html[data-pj-mode="dark"] .wp-block-gallery img,
html[data-pj-mode="dark"] .tiled-gallery img,
html[data-pj-mode="dark"] .tiled-gallery__item img,
html[data-pj-mode="dark"] .wp-block-jetpack-tiled-gallery img {
    border: 1px solid rgba(216, 180, 254, 0.48);
    box-shadow:
        0 5px 14px rgba(255, 255, 255, 0.3),
        0 0 13px rgba(139, 92, 246, 0.62);
}

/* Hover/focus remains within the image box, avoiding layout overflow. */
.gallery a:hover img,
.gallery a:focus-visible img,
.wp-block-gallery a:hover img,
.wp-block-gallery a:focus-visible img,
.tiled-gallery a:hover img,
.tiled-gallery a:focus-visible img,
.wp-block-jetpack-tiled-gallery a:hover img,
.wp-block-jetpack-tiled-gallery a:focus-visible img {
    filter: brightness(1.06);
}

/* Captions. */
.gallery-caption,
.wp-block-gallery figcaption,
.tiled-gallery .tiled-gallery-caption,
.wp-block-jetpack-tiled-gallery figcaption {
    margin-top: 8px;
    padding: 4px 8px;
    font-size: 0.82rem;
    line-height: 1.45;
    text-align: center;
    border-radius: 8px;
}

html[data-pj-mode="light"] .gallery-caption,
html[data-pj-mode="light"] .wp-block-gallery figcaption,
html[data-pj-mode="light"] .tiled-gallery .tiled-gallery-caption,
html[data-pj-mode="light"] .wp-block-jetpack-tiled-gallery figcaption {
    color: #3f3f46;
    background: rgba(255, 255, 255, 0.9);
}

html[data-pj-mode="dark"] .gallery-caption,
html[data-pj-mode="dark"] .wp-block-gallery figcaption,
html[data-pj-mode="dark"] .tiled-gallery .tiled-gallery-caption,
html[data-pj-mode="dark"] .wp-block-jetpack-tiled-gallery figcaption {
    color: #f4f4f5;
    background: rgba(17, 17, 22, 0.9);
}

@media (max-width: 720px) {
    .gallery,
    .wp-block-gallery {
        gap: 14px !important;
    }

    .tiled-gallery .gallery-row {
        margin-bottom: 14px !important;
    }

    .gallery img,
    .wp-block-gallery img,
    .tiled-gallery img,
    .tiled-gallery__item img,
    .wp-block-jetpack-tiled-gallery img {
        border-radius: 14px;
    }
}

@media (max-width: 480px) {
    .gallery,
    .wp-block-gallery {
        gap: 10px !important;
    }

    .tiled-gallery .gallery-row {
        margin-bottom: 10px !important;
    }
}

/* ==========================================================
   HOLOCRON + CINEMATIC PRESENTATION
   Theme presentation for WPCode-generated Popcorn Jedi markup.
   ========================================================== */
.pj-holocron-link {
    position: relative;
    color: #3b82f6;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.25s ease, text-shadow 0.25s ease;
    animation: pj-holocron-pulse 2.4s ease-in-out infinite;
    will-change: text-shadow, color;
}

.pj-holocron-link:hover,
.pj-holocron-link:focus-visible {
    color: #1e40af;
    text-shadow: 0 0 8px rgba(59, 130, 246, 0.72);
}

html[data-pj-mode="dark"] .pj-holocron-link {
    color: #8fddff;
}

html[data-pj-mode="dark"] .pj-holocron-link:hover,
html[data-pj-mode="dark"] .pj-holocron-link:focus-visible {
    color: #c9f0ff;
    text-shadow: 0 0 10px rgba(143, 221, 255, 0.9);
}

@keyframes pj-holocron-pulse {
    0%, 100% { text-shadow: 0 0 4px rgba(59, 130, 246, 0.4); }
    50% { text-shadow: 0 0 10px rgba(59, 130, 246, 0.82); }
}

.pj-top-holo {
    position: relative;
    overflow: hidden;
}

.pj-top-holo::after {
    content: "";
    position: absolute;
    inset: 0 auto 0 -150%;
    width: 150%;
    pointer-events: none;
    background: linear-gradient(120deg, transparent 0%, rgba(0, 180, 255, 0.35) 50%, transparent 100%);
    animation: pj-top-shimmer 4s infinite;
}

@keyframes pj-top-shimmer {
    0% { left: -150%; }
    60%, 100% { left: 150%; }
}

.sw-galaxy-font {
    font-family: "sf-distant-galaxy", "Trebuchet MS", sans-serif !important;
    text-transform: uppercase !important;
    letter-spacing: 0.08em !important;
}

.sw-title-row {
    display: flex !important;
    align-items: center !important;
    width: 100% !important;
    line-height: 1 !important;
    margin: 0 !important;
}

.sw-title-row::before,
.sw-title-row::after {
    content: "" !important;
    height: 2px !important;
    background-color: #3366ff !important;
    opacity: 0.7 !important;
}

.top-brand-left::before,
.bottom-brand-right::after { display: none !important; }

.top-brand-left::after {
    flex: 1 !important;
    margin-left: 1.5rem !important;
}

.bottom-brand-right::before {
    flex: 1 !important;
    margin-right: 1.5rem !important;
}

.sw-brand-text {
    font-size: 1.15rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.12em !important;
    white-space: nowrap !important;
}

.holonet-ticker {
    width: 100%;
    overflow: hidden;
    padding: 8px 0;
    color: #0ff;
    background: #111;
    border-top: 2px solid #0ff;
    border-bottom: 2px solid #0ff;
    font-family: "Orbitron", sans-serif;
    white-space: nowrap;
    box-shadow: var(--pj-shadow);
}

.holonet-track {
    display: inline-block;
    min-width: 200%;
    animation: holonet-scroll 60s linear infinite;
}

.holonet-track span {
    display: inline-block;
    margin-right: 60px;
}

@keyframes holonet-scroll {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

@media (max-width: 650px) {
    .sw-brand-text { white-space: normal !important; }
    .top-brand-left,
    .bottom-brand-right { justify-content: center !important; }
    .top-brand-left::after,
    .bottom-brand-right::before { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
    .pj-holocron-link,
    .pj-top-holo::after,
    .holonet-track {
        animation: none !important;
    }
}

/* ==========================================================
   POPCORN JEDI VISUAL IDENTITY MIGRATION
   Main-site reference treatments adapted to native theme markup.
   ========================================================== */

/* Nasalization remains a Popcorn Jedi display font. */
@font-face {
    font-family: "Nasalization";
    src: url("https://popcornjedi.com/wp-content/uploads/2023/12/nasalization-rg.otf") format("opentype");
    font-display: swap;
}

/* Home/archive card image perspective, adapted from .blog-card-left. */
@media (min-width: 1081px) {
    .post-card:not(.pj-page-heading) .entry-thumbnail {
        position: relative;
        z-index: 1;
        overflow: visible;
    }

    .post-card:not(.pj-page-heading) .entry-thumbnail img {
        width: 220px;
        max-width: none;
        height: auto;
        transform: perspective(100px) rotateY(8deg) scaleX(1.9);
        transform-origin: center left;
        box-shadow: var(--pj-image-shadow);
    }
}

/* Main-site Movie Quote/Profile image treatment. */
img.pj-profile-quote-thumb {
    display: block;
    width: 100px !important;
    height: 100px !important;
    margin: 0 auto 10px;
    object-fit: cover !important;
    border-radius: 50% !important;
    box-shadow: var(--pj-image-shadow);
}

/* Dark mode Holocron links get a stronger halo without changing timing. */
html[data-pj-mode="dark"] .pj-holocron-link {
    color: #9fe6ff;
    text-shadow: 0 0 6px rgba(96, 200, 255, 0.58);
    animation-name: pj-holocron-pulse-dark;
}

html[data-pj-mode="dark"] .pj-holocron-link:hover,
html[data-pj-mode="dark"] .pj-holocron-link:focus-visible {
    color: #d7f5ff;
    text-shadow:
        0 0 8px rgba(143, 221, 255, 0.95),
        0 0 16px rgba(59, 130, 246, 0.72);
}

@keyframes pj-holocron-pulse-dark {
    0%, 100% {
        text-shadow:
            0 0 5px rgba(96, 200, 255, 0.55),
            0 0 10px rgba(59, 130, 246, 0.30);
    }
    50% {
        text-shadow:
            0 0 10px rgba(143, 221, 255, 0.95),
            0 0 20px rgba(59, 130, 246, 0.62);
    }
}

@media (max-width: 1080px) {
    .post-card:not(.pj-page-heading) .entry-thumbnail img {
        width: 100%;
        max-width: 100%;
        transform: none;
    }
}

/* ==========================================================
   POPCORN JEDI - POST CATEGORY PILLS
   Restores the category links used by the main-site templates.
   ========================================================== */
.pj-post-categories {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
    margin: 0 0 0.8rem;
}

.pj-post-categories a {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0.28rem 0.68rem;
    color: #4a2b00;
    background: linear-gradient(180deg, var(--pj-gold-bright), var(--pj-gold));
    border: 1px solid rgba(64, 32, 111, 0.55);
    border-radius: 999px;
    box-shadow:
        0 2px 5px rgba(0, 0, 0, 0.34),
        inset 0 1px 0 rgba(255, 255, 255, 0.35);
    font-size: 0.73rem;
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: 0.055em;
    text-decoration: none;
    text-transform: uppercase;
    transition:
        color 0.2s ease,
        background 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.pj-post-categories a:hover,
.pj-post-categories a:focus-visible {
    color: #fff;
    background: linear-gradient(180deg, var(--pj-purple), var(--pj-purple-deep));
    border-color: var(--pj-gold-bright);
    box-shadow:
        0 0 0 1px rgba(241, 205, 86, 0.36),
        0 0 12px rgba(111, 66, 193, 0.58);
}

html[data-pj-mode="dark"] .pj-post-categories a {
    color: #f8e8a7;
    background: linear-gradient(180deg, rgba(111, 66, 193, 0.96), rgba(64, 32, 111, 0.98));
    border-color: rgba(241, 205, 86, 0.78);
    box-shadow:
        0 2px 7px rgba(255, 255, 255, 0.20),
        0 0 9px rgba(111, 66, 193, 0.42);
}

html[data-pj-mode="dark"] .pj-post-categories a:hover,
html[data-pj-mode="dark"] .pj-post-categories a:focus-visible {
    color: #241606;
    background: linear-gradient(180deg, #ffe27b, var(--pj-gold));
    border-color: #fff0ad;
    box-shadow:
        0 0 0 1px rgba(255, 240, 173, 0.52),
        0 0 14px rgba(241, 205, 86, 0.66);
}

@media (max-width: 560px) {
    .pj-post-categories {
        gap: 0.35rem;
        margin-bottom: 0.7rem;
    }

    .pj-post-categories a {
        padding: 0.26rem 0.58rem;
        font-size: 0.69rem;
    }
}



/* ==========================================================
   POPCORN JEDI - VIDEO EMBED PRESENTATION
   Presentation only: sizing remains controlled by WordPress/embed output.
   ========================================================== */
.single-entry .entry-content iframe:not(.jetpack-likes-widget-wrapper iframe),
.single-entry .entry-content .wp-block-embed-youtube iframe,
.single-entry .entry-content .wp-block-embed__wrapper iframe {
    display: block;
    margin: 1.5rem auto 1.75rem;
    max-width: 100%;
    border: 0;
    border-radius: 20px;
    box-shadow: var(--pj-image-shadow);
}

html[data-pj-mode="light"] .single-entry .entry-content iframe {
    box-shadow:
        0 5px 14px rgba(0, 0, 0, 0.70),
        0 0 11px rgba(124, 58, 237, 0.30);
}

html[data-pj-mode="dark"] .single-entry .entry-content iframe {
    box-shadow:
        0 5px 14px rgba(255, 255, 255, 0.30),
        0 0 13px rgba(139, 92, 246, 0.58);
}

/* Utility/service iframes should not inherit the cinema treatment. */
.single-entry .entry-content iframe.jetpack-likes-widget,
.single-entry .entry-content .jetpack-likes-widget-wrapper iframe {
    margin: 0;
    border-radius: 0;
    box-shadow: none;
}

@media (max-width: 720px) {
    .single-entry .entry-content iframe {
        border-radius: 14px;
    }
}

/* ==========================================================
   POPCORN JEDI - ARCHIVE CONTINUE GRAPHIC
   Right-aligned graphical continuation link for home/archive cards.
   ========================================================== */

.pj-continue-link-wrap {
    grid-column: 2 / -1;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-top: 0.85rem;
}

.pj-continue-link {
    display: block;
    width: fit-content;
    max-width: 100%;
    margin-left: auto;
    line-height: 0;
    text-decoration: none;
    border-radius: 14px;
}

.pj-continue-image {
    display: block;
    width: clamp(120px, 12vw, 170px);
    max-width: 100%;
    height: auto;
    margin-left: auto;
    border-radius: 12px;
    box-shadow: none;
    transition:
        transform 0.2s ease,
        filter 0.2s ease;
}

.pj-continue-link:hover .pj-continue-image,
.pj-continue-link:focus-visible .pj-continue-image {
    transform: translateY(-2px);
    filter: drop-shadow(0 0 8px rgba(241, 205, 86, 0.55));
}

@media (max-width: 1080px) {
    .pj-continue-link-wrap {
        grid-column: 1 / -1;
        width: 100%;
        justify-content: flex-end;
    }
}

@media (max-width: 560px) {
    .pj-continue-image {
        width: clamp(110px, 34vw, 150px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .pj-continue-image {
        transition: none;
    }

    .pj-continue-link:hover .pj-continue-image,
    .pj-continue-link:focus-visible .pj-continue-image {
        transform: none;
    }
}



/* ==========================================================
   POPCORN JEDI - SPECIALIST CONTENT IMAGES
   Existing classes used by channel/title artwork in posts.
   ========================================================== */
img.titlesw,
img.titlesw.size-full {
    border-radius: 0 !important;
    box-shadow: none !important;
}

img.titleyt,
img.titleyt.size-full {
    border-radius: 50% !important;
    box-shadow: var(--pj-image-shadow);
}

html[data-pj-mode="light"] img.titleyt,
html[data-pj-mode="light"] img.titleyt.size-full {
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.68),
        0 0 20px rgba(0, 0, 0, 0.32);
}

html[data-pj-mode="dark"] img.titleyt,
html[data-pj-mode="dark"] img.titleyt.size-full {
    box-shadow:
        0 4px 12px rgba(255, 255, 255, 0.30),
        0 0 20px rgba(139, 92, 246, 0.62);
}

/* ==========================================================
   POPCORN JEDI - SINGLE POST NAVIGATION
   Native Previous / Next layout inspired by the main-site Clearer treatment.
   ========================================================== */
.single .post-navigation .nav-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(1rem, 2vw, 2rem);
    align-items: stretch;
}

.single .post-navigation .nav-previous,
.single .post-navigation .nav-next {
    min-width: 0;
}

.single .post-navigation .nav-previous {
    text-align: left;
}

.single .post-navigation .nav-next {
    text-align: right;
}

.single .post-navigation a {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    height: 100%;
    padding: 0.85rem 1rem;
    color: var(--pj-text);
    text-decoration: none;
    border: 1px solid transparent;
    border-radius: calc(var(--pj-radius) - 3px);
    transition:
        color 0.2s ease,
        background 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.2s ease;
}

.single .post-navigation .nav-previous a {
    align-items: flex-start;
}

.single .post-navigation .nav-next a {
    align-items: flex-end;
}

.single .post-navigation .nav-subtitle {
    color: var(--pj-gold-bright);
    font-size: 0.78rem;
    font-weight: 900;
    line-height: 1.2;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.single .post-navigation .nav-previous .nav-subtitle::before {
    content: "← ";
}

.single .post-navigation .nav-next .nav-subtitle::after {
    content: " →";
}

.single .post-navigation .nav-title {
    display: block;
    max-width: 100%;
    color: var(--pj-text);
    font-size: 0.96rem;
    font-weight: 750;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.single .post-navigation a:hover,
.single .post-navigation a:focus-visible {
    color: var(--pj-text);
    background: rgba(111, 66, 193, 0.10);
    border-color: rgba(212, 175, 55, 0.62);
    box-shadow: 0 0 12px rgba(111, 66, 193, 0.30);
    transform: translateY(-1px);
}

html[data-pj-mode="dark"] .single .post-navigation a:hover,
html[data-pj-mode="dark"] .single .post-navigation a:focus-visible {
    background: rgba(111, 66, 193, 0.24);
    border-color: rgba(241, 205, 86, 0.72);
    box-shadow:
        0 0 10px rgba(241, 205, 86, 0.20),
        0 0 16px rgba(139, 92, 246, 0.42);
}

@media (max-width: 700px) {
    .single .post-navigation .nav-links {
        grid-template-columns: 1fr;
    }

    .single .post-navigation .nav-next,
    .single .post-navigation .nav-next a {
        text-align: left;
        align-items: flex-start;
    }
}

@media (prefers-reduced-motion: reduce) {
    .single .post-navigation a {
        transition: none;
    }

    .single .post-navigation a:hover,
    .single .post-navigation a:focus-visible {
        transform: none;
    }
}

/* ==========================================================
   POPCORN JEDI - NAVIGATION ABOVE KATLA
   Keeps dropdown menus in front of the news ticker.
   ========================================================== */

.site-header {
    position: relative;
    z-index: 100;
}

.pj-nav-shell {
    position: relative;
    z-index: 200;
}

.site-navigation {
    position: relative;
    z-index: 201;
}

.primary-menu .sub-menu {
    z-index: 1000;
}

.pj-katla-region,
.katla-ticker {
    position: relative;
    z-index: 1;
}

/* Katla - readable ticker links in both colour modes */

html[data-pj-mode="light"] .pj-katla-strip .katla-ticker__content a,
html[data-pj-mode="light"] .pj-katla-strip .katla-ticker__group a {
    color: var(--pj-purple-deep) !important;
}

html[data-pj-mode="dark"] .pj-katla-strip .katla-ticker__content a,
html[data-pj-mode="dark"] .pj-katla-strip .katla-ticker__group a {
    color: var(--pj-gold-bright) !important;
}

html[data-pj-mode="light"] .pj-katla-strip .katla-ticker__title {
    color: var(--pj-purple-deep) !important;
}

html[data-pj-mode="dark"] .pj-katla-strip .katla-ticker__title {
    color: var(--pj-gold-bright) !important;
}

/* ==========================================================
   POPCORN JEDI - AKISMET COMMENT NOTICE
   Keeps Akismet privacy information beneath the full comment form.
   ========================================================== */

#comments .comment-respond,
#comments #respond {
    display: block;
    width: 100%;
}

#comments .comment-form {
    display: block;
    width: 100%;
}

#comments .comment-form-comment,
#comments .logged-in-as,
#comments .form-submit {
    width: 100%;
}

#comments .comment-form-comment textarea {
    width: 100%;
    min-height: 150px;
    resize: vertical;
}

#comments .akismet_comment_form_privacy_notice {
    display: block;
    width: 100%;
    clear: both;
    margin: 1rem 0 0;
    padding: 0.8rem 0 0;
    border-top: 1px solid var(--pj-border);
    color: var(--pj-muted);
    font-size: 0.82rem;
    line-height: 1.5;
}

#comments .akismet_comment_form_privacy_notice a {
    color: var(--pj-link);
}

#comments .akismet_comment_form_privacy_notice a:hover,
#comments .akismet_comment_form_privacy_notice a:focus-visible {
    color: var(--pj-purple-soft);
}

/* ==========================================================
   POPCORN JEDI - COMMENTS LAYOUT
   Prevent archive-card grid styling from splitting the
   comment form and Akismet privacy notice into columns.
   ========================================================== */

#comments.comments-area {
    display: block;
    width: 100%;
}

#comments .comment-respond,
#comments .comment-form {
    display: block;
    width: 100%;
    max-width: none;
}

#comments .jetpack-comments,
#comments .jetpack-comments__box,
#comments .jetpack-comments__textarea {
    width: 100%;
    max-width: none;
}

#comments .akismet_comment_form_privacy_notice {
    display: block;
    width: 100%;
    margin: 1rem 0 0;
    padding-top: 0.85rem;
    border-top: 1px solid var(--pj-border);
    color: var(--pj-muted);
    font-size: 0.84rem;
    line-height: 1.5;
}

#comments .akismet_comment_form_privacy_notice a {
    color: var(--pj-link);
}