/* ═══════════════════════════════════════════════════════════
    FRIEREN ARCHIVE — THEME: MANGA CHAPTER LAYOUT
    Philosophy: Inky black panels · White typography drops ·
                Rough panel gutters · Splash page quote ·
                Silver & violet on near-black
 ═══════════════════════════════════════════════════════════ */

.project-detail-section.frieren-theme * { box-sizing: border-box; }

/* ── TOKENS ─────────────────────────────────────────────── */
.project-detail-section.frieren-theme
{
    --fa-bg:          #08080d;
    --fa-ink:         #0e0e16;
    --fa-panel:       #111118;
    --fa-gutter:      #1a1a24;

    --fa-white:       #f5f5fa;
    --fa-silver:      #c8cee8;
    --fa-silver-soft: rgba(200,206,232,0.7);
    --fa-silver-dim:  rgba(200,206,232,0.4);

    --fa-violet:      #9b7fd4;
    --fa-violet-soft: rgba(155,127,212,0.6);
    --fa-violet-dim:  rgba(155,127,212,0.2);

    --fa-gold:        #c8913a;
    --fa-gold-soft:   rgba(200,145,58,0.6);

    --fa-text:        #ededf5;
    --fa-text-soft:   rgba(230,230,245,0.85);
    --fa-text-dim:    rgba(180,184,210,0.6);

    --fa-border:      rgba(200,206,232,0.14);
    --fa-border-hi:   rgba(220,225,250,0.4);

    /* Manga ink-wash panel gradient */
    --fa-panel-bg: linear-gradient(175deg, #0e0e18 0%, #08080e 100%);

    position: relative !important;
    overflow: hidden !important;
    background: var(--fa-bg) !important;
    color: var(--fa-text) !important;
    font-family: var(--font-ghost, "Courier New", monospace) !important;
    padding: 0 0 6rem !important;
    min-height: 100vh !important;
}

/* ── GLOBAL BG — Ink wash + halftone dot hint ────────────── */
.project-detail-section.frieren-theme::before
{
    content: '';
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    /* Subtle halftone dot pattern — manga printed texture */
    background-image: radial-gradient(circle, rgba(200,206,232,0.08) 0.8px, transparent 0.8px), radial-gradient(circle, rgba(155,127,212,0.05) 0.5px, transparent 0.5px);
    background-size: 22px 22px, 11px 11px;
    background-position: 0 0, 5.5px 5.5px;
    opacity: 0.6;
}

/* ── PANEL GUTTER LINES (vertical) ─────────────────────── */
.project-detail-section.frieren-theme::after
{
    content: '';
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image:
            repeating-linear-gradient(90deg, transparent 0px,
            transparent calc(50% - 1px), rgba(200,206,232,0.04) calc(50% - 1px), rgba(200,206,232,0.04) calc(50% + 1px), transparent calc(50% + 1px), transparent 100%);
    opacity: 1;
}

/* ── SHARED WIDTHS ───────────────────────────────────────── */
.project-detail-section.frieren-theme .tech-section,
.project-detail-section.frieren-theme .features-section,
.project-detail-section.frieren-theme .frieren-quote-block,
.project-detail-section.frieren-theme .gallery-section,
.project-detail-section.frieren-theme .github-notice-section
{
    position: relative;
    z-index: 2;
    max-width: 1120px;
    width: calc(100% - 4rem);
    margin: 0 auto;
    padding: 4rem 2rem 3rem;
    /* Panel left/right borders */
    border-left:  3px solid rgba(200,206,232,0.08);
    border-right: 3px solid rgba(200,206,232,0.08);
}

/* ═══════════════════════════════════════════════════════════
   PANEL DIVIDERS between sections
   Acts like manga gutter gap
═══════════════════════════════════════════════════════════ */
.project-detail-section.frieren-theme .spell-seal-divider
{
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    height: 18px;
    position: relative;
    z-index: 2;
    background: var(--fa-gutter);
    border-top: 1px solid rgba(200,206,232,0.06);
    border-bottom: 1px solid rgba(200,206,232,0.06);
    overflow: hidden;
}

.project-detail-section.frieren-theme .spell-seal-divider--major
{
    height: 28px;
}

/* Hide the SVG seals — we use pure CSS gutter lines instead */
.project-detail-section.frieren-theme .spell-seal-svg {
    display: none;
}

/* Gutter scratch marks */
.project-detail-section.frieren-theme .spell-seal-divider::before,
.project-detail-section.frieren-theme .spell-seal-divider::after {
    content: '— ✦ —';
    font-size: 0.65rem;
    letter-spacing: 0.6em;
    color: rgba(155,127,212,0.35);
    font-family: var(--font-ghost, monospace);
}

/* ═══════════════════════════════════════════════════════════
   HERO — Full-bleed Splash Panel
═══════════════════════════════════════════════════════════ */
.project-detail-section.frieren-theme .project-hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background-size: cover;
    background-position: center top;
    background-attachment: fixed;
    isolation: isolate;
    /* Hard panel border at bottom */
    border-bottom: 6px solid var(--fa-gutter);
}

/* Ink wash overlay */
.project-detail-section.frieren-theme .project-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(to bottom, rgba(5,5,10,0.55) 0%, rgba(8,8,14,0.88) 55%, rgba(8,8,12,0.98) 100%);
}

/* Manga speed-line effect radiating from top-center */
.project-detail-section.frieren-theme .project-hero::after
{
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: repeating-conic-gradient(from 0deg at 50% 0%, rgba(200,206,232,0.015) 0deg, transparent 0.8deg, transparent 1.8deg);
    opacity: 0.7;
}

/* Particle canvas */
.project-detail-section.frieren-theme .hero-particle-canvas
{
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    width: 100%; height: 100%;
}

/* Hero content — NO box, text drops straight over the panel */
.project-detail-section.frieren-theme .hero-content
{
    position: relative;
    z-index: 3;
    max-width: 920px;
    width: calc(100% - 4rem);
    margin: 0 auto;
    padding: 8rem 0 6rem;
    background: none;
    border: none;
    box-shadow: none;
    clip-path: none;
    border-radius: 0;
}

/* Drop cap chapter number above title */
.project-detail-section.frieren-theme .hero-content::before
{
    content: 'CHAPTER I';
    display: block;
    font-size: 0.72rem;
    letter-spacing: 0.55em;
    color: rgba(155,127,212,0.6);
    font-family: var(--font-ghost, monospace);
    text-transform: uppercase;
    margin-bottom: 1.4rem;
    border-left: 3px solid rgba(155,127,212,0.5);
    padding-left: 0.8rem;
}

/* Two-column hero layout */
.project-detail-section.frieren-theme .hero-header
{
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 3rem;
}
.project-detail-section.frieren-theme .hero-main { flex: 2; }
.project-detail-section.frieren-theme .hero-side
{
    flex: 1;
    max-width: 280px;
    align-self: stretch;
    padding-left: 2rem;
    /* Manga panel divider */
    border-left: 4px solid rgba(200,206,232,0.12);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Breadcrumb */
.project-detail-section.frieren-theme .breadcrumb
{
    margin-bottom: 2rem;
    font-size: 0.76rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}
.project-detail-section.frieren-theme .breadcrumb a
{
    color: var(--fa-text-dim);
    text-decoration: none;
    transition: color 0.3s;
}
.project-detail-section.frieren-theme .breadcrumb a:hover { color: var(--fa-white); }

/* Title — huge chapter title drop */
.project-detail-section.frieren-theme .project-title {
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 900;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin: 0 0 0.5rem;
    color: var(--fa-white);
    line-height: 1.0;
    /* Dramatic manga drop shadow */
    text-shadow: 4px 4px 0px rgba(0,0,0,0.9), 0 0 40px rgba(155,127,212,0.4);
}

/* Subtitle — chapter subtitle style */
.project-detail-section.frieren-theme .project-subtitle {
    font-size: 0.85rem;
    letter-spacing: 0.4em;
    text-transform: uppercase;
    color: var(--fa-silver-dim);
    margin: 0 0 1.6rem;
    padding-bottom: 1.2rem;
    border-bottom: 1px solid rgba(200,206,232,0.12);
}

/* Description */
.project-detail-section.frieren-theme .project-description {
    font-family: system-ui, -apple-system, sans-serif;
    font-size: 1rem;
    line-height: 1.9;
    color: var(--fa-text-soft);
    margin: 0 0 1.8rem;
}

/* Meta row */
.project-detail-section.frieren-theme .project-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.8rem;
    margin-bottom: 2.4rem;
}
.project-detail-section.frieren-theme .meta-item {
    font-size: 0.75rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--fa-text-dim);
    display: flex;
    align-items: center;
    gap: 0.45rem;
}
.project-detail-section.frieren-theme .meta-item i {
    color: var(--fa-silver-soft);
    font-size: 0.78rem;
}

/* Hero actions */
.project-detail-section.frieren-theme .hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

/* Buttons — manga panel style, sharp corners, thick border */
.project-detail-section.frieren-theme .cyber-button {
    border-color: rgba(200,206,232,0.6) !important;
    border-radius: 0 !important;
    color: var(--fa-white) !important;
    clip-path: none !important;
    border-width: 2px !important;
    letter-spacing: 0.2em !important;
    transition: background 0.2s, border-color 0.2s, color 0.2s !important;
}
.project-detail-section.frieren-theme .cyber-button:hover {
    background: rgba(155,127,212,0.2) !important;
    border-color: var(--fa-violet) !important;
    color: #fff !important;
}

/* Glyph card — styled as a manga inset panel */
.project-detail-section.frieren-theme .hero-glyph-card {
    background: rgba(14,14,24,0.95);
    border: 2px solid rgba(200,206,232,0.18);
    border-radius: 0;
    padding: 1.4rem;
    position: relative;
    overflow: hidden;
}
.project-detail-section.frieren-theme .hero-glyph-card::before {
    content: 'INFO';
    position: absolute;
    top: 0; left: 0;
    font-size: 0.58rem;
    letter-spacing: 0.3em;
    background: rgba(155,127,212,0.9);
    color: #fff;
    padding: 2px 8px;
}
.hero-glyph-label { font-size: 0; } /* hidden — replaced by ::before */
.hero-glyph-main {
    font-size: 0.92rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--fa-silver);
    margin-top: 1.4rem;
    display: block;
}
.hero-glyph-sub {
    font-family: system-ui, sans-serif;
    font-size: 0.82rem;
    line-height: 1.65;
    color: var(--fa-text-soft);
    margin-top: 0.4rem;
    display: block;
}
.hero-glyph-meta {
    margin-top: 0.7rem;
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--fa-text-dim);
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding-top: 0.6rem;
    border-top: 1px solid rgba(200,206,232,0.1);
}

/* ═══════════════════════════════════════════════════════════
   SECTION TITLES — Bold manga chapter headings
═══════════════════════════════════════════════════════════ */
.project-detail-section.frieren-theme .section-title {
    font-size: clamp(1.6rem, 3vw, 2.4rem) !important;
    font-weight: 900 !important;
    letter-spacing: 0.08em !important;
    text-transform: uppercase !important;
    margin: 0 0 0.4rem !important;
    color: var(--fa-white) !important;
    background: none !important;
    -webkit-text-fill-color: var(--fa-white) !important;
    text-shadow: 3px 3px 0 rgba(0,0,0,0.9), 0 0 30px rgba(155,127,212,0.3) !important;
}

.project-detail-section.frieren-theme .section-line {
    height: 3px !important;
    margin: 0 0 2.5rem !important;
    border: none !important;
    background: rgba(200,206,232,0.15) !important;
    position: relative !important;
}

.project-detail-section.frieren-theme .section-line::after {
    content: '';
    position: absolute;
    left: 0; top: 0;
    width: 60px; height: 100%;
    background: var(--fa-violet);
}

/* ═══════════════════════════════════════════════════════════
   TECH GRID — Manga panel tags
═══════════════════════════════════════════════════════════ */
.project-detail-section.frieren-theme .tech-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    column-gap: 4px;
    row-gap: 4px;
}

.project-detail-section.frieren-theme .tech-item
{
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.8rem 1rem;
    min-height: 64px;
    background: var(--fa-panel);
    border: 2px solid rgba(200,206,232,0.1);
    border-radius: 0;
    font-size: 0.82rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--fa-text-soft);
    cursor: default;
    transition: border-color 0.2s, background 0.2s;
    overflow: hidden;
}

/* Panel corner notch */
.project-detail-section.frieren-theme .tech-item::before {
    content: '';
    position: absolute;
    bottom: 0; right: 0;
    width: 0; height: 0;
    border-style: solid;
    border-width: 0 0 12px 12px;
    border-color: transparent transparent rgba(155,127,212,0.4) transparent;
    opacity: 1;
    pointer-events: none;
    transition: border-color 0.2s;
}

.project-detail-section.frieren-theme .tech-item::after { display: none; }

.project-detail-section.frieren-theme .tech-item i {
    color: var(--fa-violet-soft);
    font-size: 0.88rem;
    flex-shrink: 0;
}

.project-detail-section.frieren-theme .tech-item:hover {
    border-color: var(--fa-violet);
    background: rgba(155,127,212,0.08);
}
.project-detail-section.frieren-theme .tech-item:hover::before {
    border-color: transparent transparent var(--fa-violet) transparent;
}

.project-detail-section.frieren-theme .tech-item.tech-linked {
    border-color: rgba(155,127,212,0.7);
    background: rgba(155,127,212,0.06);
}

/* ═══════════════════════════════════════════════════════════
   RUNE RITUAL / SPELL BUTTON — Manga "action panel"
═══════════════════════════════════════════════════════════ */
.project-detail-section.frieren-theme .spell-cast-wrap {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem 0 3rem;
    gap: 1.4rem;
    position: relative;
}

/* Background action panel lines */
.project-detail-section.frieren-theme .spell-cast-wrap::before
{
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-conic-gradient(from 0deg at 50% 50%, rgba(155,127,212,0.03) 0deg, transparent 0.6deg, transparent 1.5deg);
    pointer-events: none;
}

.project-detail-section.frieren-theme .rune-ritual-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 240px;
    height: 240px;
}

.project-detail-section.frieren-theme .rune-ritual-svg
{
    position: absolute;
    inset: 0;
    width: 100%; height: 100%;
    pointer-events: none;
}

.project-detail-section.frieren-theme .rune-r-outer,
.project-detail-section.frieren-theme .rune-r-mid,
.project-detail-section.frieren-theme .rune-r-inner
{
    fill: none;
    stroke: rgba(200,206,232,0.14);
    stroke-width: 1.5;
    transition: stroke 0.4s;
}
.project-detail-section.frieren-theme .rune-r-outer { stroke-dasharray: 12 5; }
.project-detail-section.frieren-theme .rune-r-mid   { stroke-dasharray: 6 6;  stroke: rgba(155,127,212,0.1); }
.project-detail-section.frieren-theme .rune-r-inner { stroke-dasharray: 4 4;  stroke: rgba(155,127,212,0.14); }

.project-detail-section.frieren-theme .rune-r-glyph
{
    fill: rgba(200,206,232,0.22);
    font-size: 11px;
    font-family: var(--font-ghost, monospace);
    transition: fill 0.4s;
}

.project-detail-section.frieren-theme .rune-ritual-wrap:hover .rune-r-outer { stroke: rgba(200,206,232,0.5); }
.project-detail-section.frieren-theme .rune-ritual-wrap:hover .rune-r-inner { stroke: rgba(155,127,212,0.5); }
.project-detail-section.frieren-theme .rune-ritual-wrap:hover .rune-r-glyph { fill: rgba(155,127,212,0.7); }

.project-detail-section.frieren-theme .rune-ritual-wrap.ritual-casting .rune-r-outer {
    stroke: rgba(155,127,212,0.95);
    animation: faRuneOuter 3s linear forwards;
}
.project-detail-section.frieren-theme .rune-ritual-wrap.ritual-casting .rune-r-inner {
    stroke: rgba(200,145,58,0.95);
    animation: faRuneInner 3s linear forwards;
}
.project-detail-section.frieren-theme .rune-ritual-wrap.ritual-casting .rune-r-glyph { fill: rgba(255,255,255,0.9); }

@keyframes faRuneOuter {
    from { transform: rotate(0deg);    transform-origin: center; }
    to   { transform: rotate(360deg);  transform-origin: center; }
}
@keyframes faRuneInner {
    from { transform: rotate(0deg);    transform-origin: center; }
    to   { transform: rotate(-360deg); transform-origin: center; }
}

.project-detail-section.frieren-theme .rune-ritual-wrap.ritual-done .rune-r-outer,
.project-detail-section.frieren-theme .rune-ritual-wrap.ritual-done .rune-r-inner,
.project-detail-section.frieren-theme .rune-ritual-wrap.ritual-done .rune-r-mid {
    stroke: rgba(200,206,232,0.04);
    transition: stroke 1.5s ease;
}

/* Spell Cast Button — manga action bubble */
.project-detail-section.frieren-theme .spell-cast-btn
{
    font-family: var(--font-ghost, monospace);
    font-size: 0.84rem;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    color: var(--fa-white);
    background: rgba(155,127,212,0.12);
    border: 2px solid rgba(155,127,212,0.7);
    border-radius: 0;
    clip-path: none;
    padding: 1rem 3rem;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.25s ease;
    z-index: 1;
}
.project-detail-section.frieren-theme .spell-cast-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--fa-violet);
    opacity: 0;
    transition: opacity 0.25s;
}
.project-detail-section.frieren-theme .spell-cast-btn span,
.project-detail-section.frieren-theme .spell-cast-btn i { position: relative; z-index: 1; }

.project-detail-section.frieren-theme .spell-cast-btn:hover:not(:disabled) {
    border-color: var(--fa-violet);
    box-shadow: 0 0 24px rgba(155,127,212,0.5);
}
.project-detail-section.frieren-theme .spell-cast-btn:hover::before { opacity: 0.18; }

/* ═══════════════════════════════════════════════════════════
   FEATURE CARDS — Manga panels
═══════════════════════════════════════════════════════════ */
.project-detail-section.frieren-theme .features-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 4px;
}

.project-detail-section.frieren-theme .feature-card {
    perspective: none;
    opacity: 0.1;
    transform: translateY(12px);
    transition: opacity 0.5s ease, transform 0.5s ease;
    position: relative;
    min-height: 220px;
}
.project-detail-section.frieren-theme .feature-card.revealed {
    opacity: 1;
    transform: translateY(0);
}

.project-detail-section.frieren-theme .feature-card-inner {
    position: relative;
    width: 100%; min-height: 220px;
}

.project-detail-section.frieren-theme .feature-card-front,
.project-detail-section.frieren-theme .feature-card-back {
    position: static;
    border-radius: 0;
    border: 2px solid rgba(200,206,232,0.1);
    overflow: hidden;
    clip-path: none;
    background: var(--fa-panel-bg);
}

/* Manga panel corner badge */
.project-detail-section.frieren-theme .feature-card-front::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 0; height: 0;
    border-style: solid;
    border-width: 28px 28px 0 0;
    border-color: rgba(155,127,212,0.55) transparent transparent transparent;
}
.project-detail-section.frieren-theme .feature-card-front::after {
    content: '';
    position: absolute;
    bottom: 0; right: 0;
    width: 0; height: 0;
    border-style: solid;
    border-width: 0 0 16px 16px;
    border-color: transparent transparent rgba(200,145,58,0.3) transparent;
}
.project-detail-section.frieren-theme .feature-card-back { display: none; }

.project-detail-section.frieren-theme .feature-card.revealed:hover .feature-card-front {
    border-color: rgba(155,127,212,0.6);
    background: linear-gradient(160deg, rgba(155,127,212,0.06), rgba(14,14,24,0.98));
}
.project-detail-section.frieren-theme .feature-card.feature-next .feature-card-front {
    border-color: rgba(200,145,58,0.8);
    box-shadow: 0 0 20px rgba(200,145,58,0.35);
}

.project-detail-section.frieren-theme .rune-ring { opacity: 0; }
.project-detail-section.frieren-theme .feature-card.casting .rune-ring {
    opacity: 0.4;
    animation: faRuneRingPulse 0.7s ease;
}
@keyframes faRuneRingPulse {
    0%   { transform: translate(-50%,-50%) scale(0.5); opacity: 0; }
    50%  { transform: translate(-50%,-50%) scale(1.1); opacity: 0.5; }
    100% { transform: translate(-50%,-50%) scale(1.0); opacity: 0.4; }
}

.project-detail-section.frieren-theme .feature-content {
    padding: 1.4rem 1.5rem;
    position: relative; z-index: 1;
}

.project-detail-section.frieren-theme .feature-icon {
    width: 38px; height: 38px;
    border: 2px solid rgba(155,127,212,0.4);
    border-radius: 0;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 0.85rem;
    background: rgba(155,127,212,0.06);
    clip-path: none;
}
.project-detail-section.frieren-theme .feature-icon i {
    color: var(--fa-violet-soft);
    font-size: 0.95rem;
}

.project-detail-section.frieren-theme .feature-title {
    font-size: 0.9rem; font-weight: 800;
    letter-spacing: 0.1em; text-transform: uppercase;
    color: var(--fa-white); margin: 0 0 0.5rem;
}
.project-detail-section.frieren-theme .feature-description {
    font-family: system-ui, sans-serif;
    font-size: 0.875rem; line-height: 1.75;
    color: var(--fa-text-soft); margin: 0;
}
.project-detail-section.frieren-theme .feature-lore-inline {
    margin-top: 0.8rem;
    font-family: system-ui, sans-serif;
    font-size: 0.82rem; line-height: 1.7;
    color: rgba(155,127,212,0.85); font-style: italic;
}

/* ═══════════════════════════════════════════════════════════
   QUOTE — Full-bleed splash page panel
═══════════════════════════════════════════════════════════ */
.project-detail-section.frieren-theme .frieren-quote-block {
    position: relative; z-index: 2;
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border-top: 6px solid var(--fa-gutter);
    border-bottom: 6px solid var(--fa-gutter);
}

.project-detail-section.frieren-theme .frieren-quote-inner {
    position: relative;
    padding: 5rem 2rem;
    border-radius: 0;
    clip-path: none;
    border: none;
    background: radial-gradient(ellipse at 30% 50%, rgba(155,127,212,0.06), transparent 55%), rgba(10,10,18,0.98);
    box-shadow: none;
    overflow: hidden;
    text-align: center;
}

/* Faint speed lines for action feel */
.project-detail-section.frieren-theme .frieren-quote-inner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-conic-gradient(from 0deg at 50% 50%, rgba(155,127,212,0.025) 0deg, transparent 0.5deg, transparent 1.5deg);
    pointer-events: none;
}

.project-detail-section.frieren-theme .frieren-quote-mark {
    display: block;
    color: var(--fa-gold);
    font-size: 2rem;
    opacity: 0.7;
    margin-bottom: 1rem;
}

.project-detail-section.frieren-theme .quote-rune-bg
{
    position: absolute; inset: 0;
    pointer-events: none; opacity: 0;
    transition: opacity 1s ease;
    background: radial-gradient(ellipse at center, rgba(155,127,212,0.14) 0%, transparent 60%);
}
.project-detail-section.frieren-theme .frieren-quote-inner.quote-done .quote-rune-bg { opacity: 1; }

.project-detail-section.frieren-theme blockquote
{
    margin: 0.6rem auto 0;
    padding: 0; border: none !important; background: none !important;
    font-size: clamp(1.3rem, 3vw, 2rem);
    font-style: italic; line-height: 1.8;
    color: var(--fa-white);
    max-width: 760px;
    position: relative; z-index: 1;
    text-shadow: 2px 2px 0 rgba(0,0,0,0.8);
}

.project-detail-section.frieren-theme .typed-quote-text { color: var(--fa-white); }
.project-detail-section.frieren-theme .typed-cursor
{
    display: inline-block; width: 2px; height: 1.1em;
    background: var(--fa-silver);
    vertical-align: text-bottom; margin-left: 2px;
    animation: faCursorBlink 0.9s step-end infinite;
}
@keyframes faCursorBlink { 0%,100% { opacity:1; } 50% { opacity:0; } }

.project-detail-section.frieren-theme cite {
    display: block; margin-top: 1.4rem;
    font-size: 0.76rem; letter-spacing: 0.28em;
    text-transform: uppercase;
    color: rgba(155,127,212,0.6); font-style: normal;
    position: relative; z-index: 1;
}

.project-detail-section.frieren-theme .rune-char {
    color: rgba(155,127,212,0.85);
    transition: color 0.15s;
}
.project-detail-section.frieren-theme .rune-char.rune-resolved
{
    color: var(--fa-white);
}

/* ═══════════════════════════════════════════════════════════
   MEMORY ARCHIVE — Panel strip
═══════════════════════════════════════════════════════════ */
.project-detail-section.frieren-theme .gallery-carousel
{
    overflow: hidden; position: relative;
}
.project-detail-section.frieren-theme .memory-scroll-track
{
    display: flex; flex-direction: column; gap: 4px;
}
.project-detail-section.frieren-theme .memory-frame
{
    border-radius: 0;
    clip-path: none;
    border: 2px solid rgba(200,206,232,0.08);
    background: rgba(8,8,14,0.99);
    opacity: 0; transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
    position: relative; overflow: hidden;
}
.project-detail-section.frieren-theme .memory-frame::before
{
    content: '';
    position: absolute; inset: 0; z-index: 2;
    pointer-events: none; opacity: 0;
    background: rgba(155,127,212,0.2);
    transition: opacity 0.2s;
}
.project-detail-section.frieren-theme .memory-frame.memory-flash::before { opacity: 1; }
.project-detail-section.frieren-theme .memory-frame.memory-visible {
    opacity: 1; transform: translateY(0);
}
.project-detail-section.frieren-theme .memory-frame img {
    display: block; width: 100%; height: auto;
    filter: saturate(0.15) brightness(0.6) contrast(1.1);
    transition: filter 1.2s ease;
}
.project-detail-section.frieren-theme .memory-frame.memory-visible img {
    filter: saturate(1) brightness(0.9);
}
.project-detail-section.frieren-theme .memory-caption {
    display: flex; justify-content: space-between; align-items: center;
    padding: 0.5rem 1rem; font-size: 0.72rem;
    letter-spacing: 0.2em; text-transform: uppercase;
    background: rgba(8,8,14,0.95);
    border-top: 2px solid rgba(200,206,232,0.08);
}
.project-detail-section.frieren-theme .memory-num  { color: rgba(200,206,232,0.7); }
.project-detail-section.frieren-theme .memory-label { color: rgba(155,127,212,0.7); }
.project-detail-section.frieren-theme .memory-divider { display: none; }

.project-detail-section.frieren-theme .memory-rewind-btn {
    margin: 0.8rem auto 0; display: inline-block;
    padding: 0.5rem 1.6rem;
    font-family: var(--font-ghost, monospace);
    font-size: 0.75rem; letter-spacing: 0.26em;
    text-transform: uppercase; background: transparent;
    color: var(--fa-text); border: 2px solid rgba(200,206,232,0.4);
    clip-path: none; border-radius: 0; cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}
.project-detail-section.frieren-theme .memory-rewind-btn:hover {
    border-color: var(--fa-violet);
    background: rgba(155,127,212,0.1);
}

/* ═══════════════════════════════════════════════════════════
   YOUTUBE EMBED — BULLETPROOF
═══════════════════════════════════════════════════════════ */

.project-detail-section.frieren-theme .video-section {
    position: relative;
    z-index: 2;
    max-width: 1120px;
    width: calc(100% - 4rem);
    margin: 0 auto;
    padding: 4rem 2rem 3rem;
    border-left: 3px solid rgba(200,206,232,0.08);
    border-right: 3px solid rgba(200,206,232,0.08);
    background: var(--fa-panel-bg) !important;
}

.project-detail-section.frieren-theme .video-section .video-container {
    position: relative !important;
    display: block !important;
    width: 100% !important;
    max-width: 900px !important;
    height: 506px !important;
    margin: 2rem auto !important;
    padding: 0 !important;           /* kills any old padding-bottom hack */
    background: var(--fa-gutter) !important;
    border: 2px solid rgba(200,206,232,0.18) !important;
    border-radius: 0 !important;
    overflow: hidden !important;
    box-shadow: 0 0 0 1px rgba(200,206,232,0.06), 0 0 40px rgba(155,127,212,0.3) !important;
}

.project-detail-section.frieren-theme .video-section .video-container iframe {

    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 506px !important;
    border: none !important;
    background: transparent !important;
    display: block !important;
}

.project-detail-section.frieren-theme .video-caption
{
    display: block;
    max-width: 700px;
    margin: 1.5rem auto 0;
    text-align: center;
    font-size: 0.875rem;
    line-height: 1.7;
    color: var(--fa-text-soft) !important;
    font-style: italic;
    letter-spacing: 0.08em;
    opacity: 0.9;
}

/* ── Tablet ─────────────────────────────────────────────── */
@media (max-width: 1024px)
{
    .project-detail-section.frieren-theme .video-section
    {
        width: calc(100% - 3rem);
    }
    .project-detail-section.frieren-theme .video-section .video-container
    {
        max-width: 100% !important;
        height: 450px !important;
    }
    .project-detail-section.frieren-theme .video-section .video-container iframe
    {
        min-height: 450px !important;
    }
}

/* ── Mobile ─────────────────────────────────────────────── */
@media (max-width: 768px)
{
    .project-detail-section.frieren-theme .video-section
    {
        width: calc(100% - 2rem);
        padding: 2.5rem 0.8rem 1.5rem;
    }
    .project-detail-section.frieren-theme .video-section .video-container
    {
        max-width: 100% !important;
        height: 320px !important;
        margin: 1.5rem auto !important;
    }
    .project-detail-section.frieren-theme .video-section .video-container iframe
    {
        min-height: 320px !important;
    }
}

/* ── Small mobile ───────────────────────────────────────── */
@media (max-width: 480px) {
    .project-detail-section.frieren-theme .video-section .video-container
    {
        height: 220px !important;
    }
    .project-detail-section.frieren-theme .video-section .video-container iframe
    {
        min-height: 220px !important;
    }
    .project-detail-section.frieren-theme .video-caption
    {
        font-size: 0.8rem;
    }
}
/* ═══════════════════════════════════════════════════════════
   GRIMOIRE TOME — GitHub panel
═══════════════════════════════════════════════════════════ */
.project-detail-section.frieren-theme .grimoire-tome
{
    display: flex !important; gap: 0;
    border-radius: 0; overflow: hidden;
    border: 2px solid rgba(200,206,232,0.12);
    position: relative; cursor: default;
    clip-path: none; background: none;
    transition: border-color 0.3s;
}

.project-detail-section.frieren-theme .grimoire-tome
{
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.project-detail-section.frieren-theme .grimoire-tome::before
{
    content: '';
    position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, var(--fa-violet), var(--fa-gold));
    opacity: 0.7; z-index: 1;
}
.project-detail-section.frieren-theme .grimoire-tome:hover
{
    border-color: rgba(155,127,212,0.5);
}

.project-detail-section.frieren-theme .tome-spine
{
    width: 42px; min-height: 100%;
    background: rgba(155,127,212,0.08);
    border-right: 2px solid rgba(155,127,212,0.2);
    display: flex; flex-direction: column;
    align-items: center; justify-content: space-between;
    padding: 1.2rem 0; flex-shrink: 0;
    transition: background 0.3s;
}
.project-detail-section.frieren-theme .grimoire-tome:hover .tome-spine
{
    background: rgba(155,127,212,0.14);
}
.project-detail-section.frieren-theme .tome-spine-title
{
    font-family: var(--font-ghost, monospace); font-size: 0.58rem;
    letter-spacing: 0.22em; color: rgba(155,127,212,0.5);
    text-transform: uppercase; writing-mode: vertical-rl;
    transform: rotate(180deg); transition: color 0.3s;
}
.project-detail-section.frieren-theme .grimoire-tome:hover .tome-spine-title { color: rgba(155,127,212,0.8); }
.project-detail-section.frieren-theme .tome-spine-rune
{
    color: rgba(155,127,212,0.4); font-size: 0.9rem; transition: color 0.3s;
}
.project-detail-section.frieren-theme .grimoire-tome:hover .tome-spine-rune
{
    color: rgba(155,127,212,0.8);
}
.project-detail-section.frieren-theme .tome-page
{
    flex: 1; padding: 2rem 2.4rem; position: relative;
    background: rgba(12,12,20,0.98);
    transition: none;
}
.project-detail-section.frieren-theme .tome-clasp
{
    position: absolute; right: -1px; width: 6px; height: 20px;
    background: rgba(200,206,232,0.08);
    border: 1px solid rgba(200,206,232,0.2);
    border-radius: 0; transition: background 0.3s;
}
.project-detail-section.frieren-theme .tome-clasp-top  { top: 18px; }
.project-detail-section.frieren-theme .tome-clasp-bottom { bottom: 18px; }
.project-detail-section.frieren-theme .grimoire-tome:hover .tome-clasp
{
    background: rgba(155,127,212,0.2);
    border-color: rgba(155,127,212,0.5);
}
.project-detail-section.frieren-theme .grimoire-tome.tome-open .tome-page
{
    transform: none;
}
.project-detail-section.frieren-theme .tome-page-inner
{
    display: flex; gap: 1.6rem; align-items: flex-start;
}
.project-detail-section.frieren-theme .notice-icon
{
    width: 52px; height: 52px;
    border: 2px solid rgba(155,127,212,0.4);
    border-radius: 0; clip-path: none;
    display: flex; align-items: center; justify-content: center;
    background: rgba(155,127,212,0.06);
    color: var(--fa-violet-soft); font-size: 1.4rem;
    flex-shrink: 0; transition: color 0.3s, border-color 0.3s;
}
.project-detail-section.frieren-theme .grimoire-tome:hover .notice-icon
{
    color: var(--fa-gold); border-color: rgba(200,145,58,0.8);
}
.project-detail-section.frieren-theme .tome-content h3
{
    font-size: 0.9rem; font-weight: 800; letter-spacing: 0.12em;
    text-transform: uppercase; color: var(--fa-white); margin: 0 0 0.5rem;
}
.project-detail-section.frieren-theme .tome-content p
{
    font-family: system-ui, sans-serif; font-size: 0.875rem;
    line-height: 1.8; color: var(--fa-text-soft); margin: 0 0 0.9rem;
}
.project-detail-section.frieren-theme .tome-content strong { color: var(--fa-silver); }
.project-detail-section.frieren-theme .tome-stats
{
    display: flex; align-items: center; gap: 0.8rem;
    margin-bottom: 1.2rem;
    font-family: var(--font-ghost, monospace);
    font-size: 0.82rem; letter-spacing: 0.14em; color: var(--fa-text-dim);
}
.project-detail-section.frieren-theme .tome-stat { display: flex; align-items: center; gap: 0.4rem; }
.project-detail-section.frieren-theme .tome-stat i { color: var(--fa-violet-soft); font-size: 0.78rem; }
.project-detail-section.frieren-theme .tome-stat-label { opacity: 0.6; font-size: 0.7rem; }
.project-detail-section.frieren-theme .tome-stat-divider { color: rgba(200,206,232,0.25); }
.project-detail-section.frieren-theme .tome-starfall-layer
{
    position: absolute; inset: -10px 0 40px;
    pointer-events: none; overflow: hidden;
}
.project-detail-section.frieren-theme .tome-star
{
    position: absolute; top: -10px; width: 1px; height: 40px;
    background: linear-gradient(to bottom, rgba(240,240,255,0.9), transparent);
    opacity: 0.8; animation: faTomeStar 0.8s ease-out forwards;
}
@keyframes faTomeStar
{
    0%   { transform: translateY(0);    opacity: 0.9; }
    100% { transform: translateY(80px); opacity: 0;   }
}
.project-detail-section.frieren-theme .tome-note
{
    margin-top: 0.4rem; font-size: 0.78rem; letter-spacing: 0.16em;
    text-transform: uppercase; color: var(--fa-text-dim);
}

/* ═══════════════════════════════════════════════════════════
   CHAPTER MARKERS RAIL
═══════════════════════════════════════════════════════════ */
.fa-chapter-rail
{
    position: fixed; right: 1.2rem; top: 50%;
    transform: translateY(-50%);
    display: flex; flex-direction: column; gap: 4px; z-index: 9990;
}
.fa-chapter-dot
{
    width: 20px; height: 20px;
    border-radius: 0;
    border: 2px solid rgba(200,206,232,0.4);
    background: rgba(8,8,14,0.95);
    color: rgba(224,224,245,0.8);
    font-size: 0.58rem; cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}
.fa-chapter-dot.active,
.fa-chapter-dot:hover
{
    background: var(--fa-violet);
    border-color: var(--fa-violet);
    color: #fff;
}

/* ── IDLE ───────────────────────────────────────────────── */
.project-detail-section.frieren-theme.frieren-idle::after { opacity: 0.85; }
.project-detail-section.frieren-theme.frieren-idle .hero-particle-canvas { filter: brightness(1.1); }

/* ── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 768px) {
    .project-detail-section.frieren-theme .tech-section,
    .project-detail-section.frieren-theme .features-section,
    .project-detail-section.frieren-theme .frieren-quote-block,
    .project-detail-section.frieren-theme .gallery-section,
    .project-detail-section.frieren-theme .github-notice-section
    {
        width: calc(100% - 2.4rem); padding: 2.5rem 0.8rem 1.5rem;
    }
    .project-detail-section.frieren-theme .hero-content { padding: 6rem 0 4rem; }
    .project-detail-section.frieren-theme .project-hero { background-attachment: scroll; min-height: 90vh; }
    .project-detail-section.frieren-theme::after { animation: none; }
    .project-detail-section.frieren-theme .hero-header { flex-direction: column; gap: 2rem; }
    .project-detail-section.frieren-theme .hero-side { max-width: none; padding-left: 0; border-left: none; }
    .project-detail-section.frieren-theme .features-grid { grid-template-columns: 1fr; }
    .project-detail-section.frieren-theme .tech-grid { grid-template-columns: repeat(auto-fill, minmax(130px,1fr)); }
    .project-detail-section.frieren-theme .tome-page-inner { flex-direction: column; }
    .project-detail-section.frieren-theme .hero-actions { flex-direction: column; }
    .project-detail-section.frieren-theme .frieren-quote-inner { padding: 3rem 1.4rem; }
    .project-detail-section.frieren-theme .rune-ritual-wrap { width: 200px; height: 200px; }
    .fa-chapter-rail { display: none; }
}
