/*--------------------------
LORE ARCHIVES PAGE STYLES
--------------------------*/

:root {
    --bg: #000;
    --bg-alt: #0D0D14;
    --gold: #dfb345;
    --gold-dim: #8A7233;
    --text-primary: #E8E4D8;
    --text-muted: #A39B8B;
    --card-border: #3A3428;
    --accent-green: #7EC9A0;
    --forge-red: #C0522F;
    --confluence-blue: #5F8FB4;
    --veil-violet: #7D5F9C;
}

.mono {
    font-family: 'IBM Plex Mono', monospace;
}

/*--------------------------
CUSTOM SCROLLBARS
--------------------------*/

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--gold-dim) var(--bg);
}

/* WebKit (Chrome, Edge, Safari) */
*::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

*::-webkit-scrollbar-track {
    background: var(--bg);
    border-left: 1px solid var(--card-border);
}

*::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--gold-dim), var(--gold));
    border-radius: 4px;
    border: 2px solid var(--bg);
    transition: background 0.2s ease;
}

*::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--gold), var(--gold-dim));
}

*::-webkit-scrollbar-thumb:active {
    background: var(--gold);
}

*::-webkit-scrollbar-corner {
    background: var(--bg);
}

/* Panel-specific scrollbars (slide-in panels get a slightly different treatment) */
.order-panel::-webkit-scrollbar-track,
.fracture-panel::-webkit-scrollbar-track {
    background: var(--bg-alt);
    border-left: 1px solid var(--card-border);
}

.order-panel::-webkit-scrollbar-thumb,
.fracture-panel::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--gold-dim), var(--gold));
    border-radius: 4px;
    border: 2px solid var(--bg-alt);
}

/*--------------------------
LORE HERO SECTION
--------------------------*/
.lore-hero {
    background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 1)), url('/assets/oratory.jpg');
    background-size: cover;
    background-position: 100% 0%;
    min-height: 80vh;
    display: flex;
    align-items: center;
    position: relative;
    padding: 150px 0 100px;
}

.hero-text-block {
    padding: 40px 0;
}

.eyebrow {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 13px;
    letter-spacing: 3px;
    color: var(--gold);
    text-transform: uppercase;
    display: block;
    margin-bottom: 25px;
}

.lore-hero h1 {
    color: var(--gold);
    font-size: 64px;
    margin: 0 0 25px;
    text-transform: uppercase;
    letter-spacing: 2px;
    line-height: 1.1;
}

.hero-subtitle {
    color: var(--text-primary);
    font-size: 20px;
    margin: 0 0 40px;
    line-height: 1.3;
    max-width: 550px;
}

.hero-ctas {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.btn-cta {
    display: inline-block;
    padding: 14px 32px;
    font-family: 'Cinzel', serif;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
    transition: all 0.2s ease;
    position: relative;
}

.btn-cta.primary {
    background-color: var(--gold);
    color: #000;
}

.btn-cta.primary:hover {
    background-color: #d4b35a;
}

.btn-cta.secondary {
    background-color: transparent;
    color: var(--gold);
    border: 1px solid var(--gold);
}

.btn-cta.secondary:hover {
    background-color: rgba(201, 162, 75, 0.1);
}

/*--------------------------
SEAL INTEGRITY GAUGE
--------------------------*/
.seal-gauge-container {
    text-align: center;
    padding: 40px 20px;
}

.seal-gauge {
    position: relative;
    width: 220px;
    height: 220px;
    margin: 0 auto 20px;
}

.seal-svg {
    width: 100%;
    height: 100%;
}

.ward-ring {
    fill: none;
    stroke: var(--gold-dim);
    stroke-width: 1;
    opacity: 0.5;
}

.ward-ring.outer {
    stroke-dasharray: 4 8;
}

.ward-ring.inner {
    stroke-dasharray: 2 6;
}

.ward-line {
    stroke: var(--gold-dim);
    stroke-width: 1;
    opacity: 0.4;
}

.ward-line.diagonal {
    opacity: 0.3;
}

.gauge-track {
    fill: none;
    stroke: var(--card-border);
    stroke-width: 8;
}

.gauge-fill {
    fill: none;
    stroke: var(--accent-green);
    stroke-width: 8;
    stroke-linecap: round;
    transform: rotate(-90deg);
    transform-origin: 50% 50%;
    filter: drop-shadow(0 0 8px rgba(126, 201, 160, 0.5));
    animation: gaugePulse 5s ease-in-out infinite;
}

@keyframes gaugePulse {
    0%, 100% {
        filter: drop-shadow(0 0 6px rgba(126, 201, 160, 0.4));
        opacity: 0.9;
    }
    50% {
        filter: drop-shadow(0 0 14px rgba(126, 201, 160, 0.7));
        opacity: 1;
    }
}

.gauge-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.gauge-percent {
    font-family: 'Cinzel', serif;
    font-size: 48px;
    font-weight: 700;
    color: var(--accent-green);
    line-height: 1;
}

.gauge-symbol {
    font-family: 'Cinzel', serif;
    font-size: 24px;
    color: var(--accent-green);
}

.seal-label {
    font-family: 'Cinzel', serif;
    font-size: 14px;
    letter-spacing: 3px;
    color: var(--text-muted);
    text-transform: uppercase;
    margin: 0 0 8px;
}

.seal-ticker {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    letter-spacing: 1px;
    color: var(--accent-green);
    margin: 0;
    opacity: 0.8;
}

/*--------------------------
LORE INTRO SECTION
--------------------------*/
.lore-intro {
    padding: 120px 0;
    position: relative;
    background: #000;
}

.lore-intro-content {
    padding: 80px 100px;
    text-align: center;
    border: 1px solid var(--gold);
    position: relative;
    background: #000;
}

.lore-intro-content h2 {
    font-size: 42px;
    margin: 0 0 30px;
    color: var(--gold);
}

.lore-intro-content p {
    font-size: 22px;
    margin: 0 0 20px;
    color: #fff;
    line-height: 1.4;
}

.lore-intro-content p:last-of-type {
    margin-bottom: 0;
}

.corner-accent {
    position: absolute;
    width: 120px;
}

.corner-accent.top-left {
    top: -15px;
    left: -15px;
    transform: rotate(90deg);
}

.corner-accent.top-right {
    top: -15px;
    right: -15px;
    transform: rotate(180deg);
}

.corner-accent.bottom-left {
    bottom: -15px;
    left: -15px;
}

.corner-accent.bottom-right {
    bottom: -15px;
    right: -15px;
    transform: rotate(270deg);
}

/*--------------------------
SECTION COMMON STYLES
--------------------------*/
.section-title {
    text-align: center;
    font-size: 42px;
    color: var(--gold);
    margin: 0 0 15px;
    letter-spacing: 2px;
}

.section-subtext {
    text-align: center;
    font-size: 18px;
    color: var(--text-muted);
    margin: 0 0 20px;
    font-style: italic;
}

.title-divider {
    display: block;
    width: 180px;
    margin: 0 auto 50px;
}

/*--------------------------
ORDERS SECTION
--------------------------*/
.orders-section {
    padding: 120px 0;
    background: var(--bg-alt);
}

.order-card {
    border: 1px solid var(--gold);
    margin: 20px 10px;
    overflow: hidden;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: var(--bg);
    height: calc(100% - 40px);
    display: flex;
    flex-direction: column;
}

.order-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.order-accent-strip {
    height: 8px;
    width: 100%;
}

.order-card.forge .order-accent-strip {
    background-color: var(--forge-red);
}

.order-card.confluence .order-accent-strip {
    background-color: var(--confluence-blue);
}

.order-card.veil .order-accent-strip {
    background-color: var(--veil-violet);
}

.order-card .card-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

.order-card .card-content {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.order-leader {
    font-size: 11px;
    letter-spacing: 2px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.order-card h3 {
    font-size: 24px;
    margin: 0 0 15px;
    color: var(--gold);
}

.order-card p {
    font-size: 16px;
    margin: 0 0 15px;
    color: var(--text-primary);
    line-height: 1.6;
    flex: 1;
}

.closing-line {
    font-style: italic;
    color: var(--text-muted);
    font-size: 15px;
}

.card-link {
    display: block;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12px;
    letter-spacing: 1px;
    color: var(--gold);
    border: 1px solid var(--gold-dim);
    padding: 10px;
    text-align: center;
    margin-top: 20px;
    transition: all 0.2s ease;
}

.card-link:hover {
    background-color: rgba(201, 162, 75, 0.1);
    cursor: pointer;
}

/*--------------------------
FRACTURE SECTION / TIMELINE
--------------------------*/
.fracture-section {
    padding: 120px 0;
    position: relative;
    background: #000;
    overflow: hidden;
    background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.85)), url('/assets/shrine.jpg') ;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.fracture-section h2 {
    color: var(--gold);
}

.fracture-timeline {
    position: relative;
    padding: 60px 0 40px;
    max-width: 900px;
    margin: 0 auto;
}

.fracture-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, transparent, var(--gold-dim) 10%, var(--gold-dim) 90%, transparent);
    transform: translateX(-50%);
}

.fracture-event {
    position: relative;
    display: flex;
    align-items: center;
    margin-bottom: 60px;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fracture-event.visible {
    opacity: 1;
    transform: translateY(0);
}

.fracture-event:nth-child(odd) {
    flex-direction: row;
}

.fracture-event:nth-child(even) {
    flex-direction: row-reverse;
}

.fracture-event-content {
    width: calc(50% - 50px);
    padding: 30px;
    background: var(--bg-alt);
    border: 1px solid var(--card-border);
    position: relative;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.fracture-event-content:hover {
    border-color: var(--gold-dim);
    box-shadow: 0 4px 20px rgba(223, 179, 69, 0.1);
}

.fracture-event:nth-child(odd) .fracture-event-content {
    margin-right: auto;
    text-align: right;
}

.fracture-event:nth-child(even) .fracture-event-content {
    margin-left: auto;
    text-align: left;
}

.fracture-event.final .fracture-event-content {
    border-color: var(--forge-red);
    background: linear-gradient(135deg, var(--bg-alt), rgba(192, 82, 47, 0.1));
}

.event-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.fracture-event:nth-child(odd) .event-header {
    justify-content: flex-end;
}

.event-month {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    letter-spacing: 2px;
    color: var(--gold);
    text-transform: uppercase;
}

.event-number {
    font-family: 'Cinzel', serif;
    font-size: 28px;
    font-weight: 700;
    color: var(--gold-dim);
    opacity: 0.4;
    line-height: 1;
}

.event-title {
    font-family: 'Cinzel', serif;
    font-size: 22px;
    color: var(--text-primary);
    margin: 0 0 8px;
    letter-spacing: 1px;
}

.event-location {
    font-family: 'EB Garamond', serif;
    font-size: 16px;
    font-style: italic;
    color: var(--text-muted);
    display: block;
    margin-bottom: 15px;
}

.event-description {
    font-size: 18px;
    color: var(--text-primary);
    line-height: 1.4;
    margin: 0;
    opacity: 0.85;
}

.fracture-node {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 24px;
    z-index: 2;
    cursor: pointer;
}

.node-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(223, 179, 69, 0.3), transparent 70%);
    animation: nodePulse 3s ease-in-out infinite;
}

.fracture-event.final .node-glow {
    background: radial-gradient(circle, rgba(192, 82, 47, 0.4), transparent 70%);
    animation: nodePulseRed 2s ease-in-out infinite;
}

@keyframes nodePulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.6;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.3);
        opacity: 1;
    }
}

@keyframes nodePulseRed {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.7;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 1;
    }
}

.node-core {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--gold);
    border: 2px solid var(--bg);
    box-shadow: 0 0 10px rgba(223, 179, 69, 0.5);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.fracture-event.final .node-core {
    background: var(--forge-red);
    box-shadow: 0 0 12px rgba(192, 82, 47, 0.6);
}

.fracture-node:hover .node-core {
    transform: translate(-50%, -50%) scale(1.3);
    box-shadow: 0 0 16px rgba(223, 179, 69, 0.8);
}

.fracture-event.final .fracture-node:hover .node-core {
    box-shadow: 0 0 18px rgba(192, 82, 47, 0.9);
}

/*--------------------------
REALM SECTION
--------------------------*/
.realm-section {
    padding: 120px 0;
    background: var(--bg-alt);
}

/* Interactive Map Container */
.map-container {
    position: relative;
    border: 1px solid var(--gold);
    margin: 0 auto 40px;
    background: var(--bg);
    max-width: 1300px;
}

.map-viewport {
    max-width: 1300px;
    overflow: hidden;
    cursor: grab;
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.map-viewport.dragging {
    cursor: grabbing;
}

.map-image {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    display: block;
    transform-origin: center center;
    transition: none;
    will-change: transform;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
}

/* Map Controls */
.map-controls {
    position: absolute;
    top: 15px;
    right: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 10;
}

.map-zoom-btn {
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.85);
    border: 1px solid var(--gold);
    color: var(--gold);
    font-size: 20px;
    font-family: 'Cinzel', serif;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    padding: 0;
    line-height: 1;
}

.map-zoom-btn:hover {
    background: var(--gold);
    color: #000;
}

.map-download-btn {
    border-color: var(--accent-green) !important;
    color: var(--accent-green) !important;
}

.map-download-btn:hover {
    background: var(--accent-green) !important;
    color: #000 !important;
}

/* Map Hint */
.map-hint {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 11px;
    letter-spacing: 2px;
    color: var(--text-muted);
    background: rgba(0, 0, 0, 0.75);
    padding: 8px 16px;
    pointer-events: none;
    z-index: 10;
    white-space: nowrap;
}

/* Location List */
.location-list {
    padding: 20px 0;
}

.location-list--horizontal {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    justify-content: center;
}

.location-list--horizontal .location-item {
    flex: 0 1 auto;
    padding: 15px 30px;
    border: none;
    border-right: 1px solid var(--card-border);
}

.location-list--horizontal .location-item:last-child {
    border-right: none;
}

.location-list--horizontal .location-item:first-child {
    border-top: none;
}

.location-item {
    border-bottom: 1px solid var(--card-border);
    padding: 18px 0;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 20px;
}

.location-item:first-child {
    border-top: 1px solid var(--card-border);
}

.location-name {
    font-family: 'Cinzel', serif;
    font-size: 16px;
    color: var(--gold);
}

.location-hook {
    font-size: 14px;
    color: var(--text-muted);
    font-style: italic;
    text-align: right;
}

/*--------------------------
LORE CATEGORIES SECTION (EXISTING)
--------------------------*/
.lore-categories {
    padding: 120px 0;
    background: var(--bg);
    position: relative;
}

.lore-card {
    border: 1px solid var(--card-border);
    margin: 20px 10px;
    overflow: hidden;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: var(--bg-alt);
    height: calc(100% - 40px);
    display: flex;
    flex-direction: column;
}

.lore-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(201, 162, 75, 0.15);
}

.lore-card .card-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

.lore-card .card-content {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.lore-card h3 {
    font-size: 22px;
    margin: 0 0 15px;
    color: var(--gold);
    border-bottom: 1px solid var(--card-border);
    padding-bottom: 15px;
}

.lore-card p {
    font-size: 16px;
    margin: 0 0 20px;
    color: var(--text-primary);
    line-height: 1.6;
    flex: 1;
}

.card-status {
    display: block;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12px;
    letter-spacing: 1px;
    padding: 10px 15px;
    border: 1px dashed var(--gold-dim);
    color: var(--gold-dim);
    text-transform: uppercase;
    text-align: center;
    margin-top: auto;
}

/*--------------------------
MERCS SECTION
--------------------------*/
.mercs-section {
    padding: 0 0 120px;
    background: var(--bg-alt);
}

.merc-card {
    border: 1px solid var(--card-border);
    padding: 20px;
    margin: 10px;
    text-align: center;
    background: var(--bg);
    transition: all 0.2s ease;
    height: calc(100% - 20px);
}

.merc-card:hover {
    border-color: var(--gold-dim);
}

.merc-card h4 {
    font-size: 16px;
    margin: 0 0 12px;
    color: var(--text-primary);
}

.merc-tag {
    display: inline-block;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10px;
    letter-spacing: 1px;
    padding: 4px 10px;
    text-transform: uppercase;
}

.merc-tag.neutral {
    border: 1px solid var(--gold-dim);
    color: var(--gold-dim);
}

.merc-tag.unknown {
    border: 1px solid var(--text-muted);
    color: var(--text-muted);
}

.merc-tag.forge {
    border: 1px solid var(--forge-red);
    color: var(--forge-red);
}

.merc-tag.confluence {
    border: 1px solid var(--confluence-blue);
    color: var(--confluence-blue);
}

.merc-tag.veil {
    border: 1px solid var(--veil-violet);
    color: var(--veil-violet);
}

.merc-tag.wild {
    border: 1px solid var(--accent-green);
    color: var(--accent-green);
}

.view-all-link {
    display: block;
    text-align: center;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 13px;
    letter-spacing: 2px;
    color: var(--gold);
    text-decoration: none;
    margin-top: 40px;
    padding: 15px;
    border: 1px solid var(--card-border);
    transition: all 0.2s ease;
}

.view-all-link:hover {
    border-color: var(--gold);
    background: rgba(201, 162, 75, 0.05);
}

/*--------------------------
QUESTIONS SECTION
--------------------------*/
.questions-section {
    padding: 120px 0;
    position: relative;
    background: var(--bg);
}

.question-card {
    border: 1px solid var(--card-border);
    padding: 35px;
    margin: 20px 10px;
    background: var(--bg-alt);
    height: calc(100% - 40px);
}

.question-tag {
    font-size: 11px;
    letter-spacing: 2px;
    color: var(--text-muted);
    margin-bottom: 15px;
    display: block;
}

.question-card h3 {
    font-size: 24px;
    margin: 0 0 15px;
    color: var(--gold);
}

.question-card p {
    font-size: 18px;
    margin: 0;
    color: var(--text-primary);
    line-height: 1.4;
}

/*--------------------------
FEATURED CHRONICLE SECTION
--------------------------*/
.lore-featured {
    padding: 120px 0;
    position: relative;
    background: var(--bg-alt);
}

.featured-content {
    text-align: center;
    padding: 60px;
    border: 1px solid var(--card-border);
    position: relative;
    background: rgba(21, 42, 95, 0.15);
}

.featured-content h2 {
    font-size: 36px;
    margin: 0 0 20px;
    color: var(--gold);
}

.featured-divider {
    display: block;
    width: 150px;
    margin: 0 auto 40px;
}

.featured-text {
    max-width: 800px;
    margin: 0 auto;
    text-align: left;
}

.featured-text h3 {
    font-size: 28px;
    margin: 0 0 25px;
    color: var(--text-primary);
    text-align: center;
}

.featured-text p {
    font-size: 18px;
    margin: 0 0 20px;
    color: var(--text-primary);
    line-height: 1.8;
}

.featured-text p:last-child {
    margin-bottom: 0;
}

/*--------------------------
MOBILE RESPONSIVE
--------------------------*/
@media(max-width: 900px) {
    .lore-hero {
        min-height: auto;
        padding: 75px 20px 30px;
    }

    .lore-hero h1 {
        font-size: 36px;
    }

    .hero-subtitle {
        font-size: 17px;
    }

    .eyebrow {
        font-size: 11px;
    }

    .seal-gauge-container {
        padding: 20px;
    }

    .seal-gauge {
        width: 180px;
        height: 180px;
    }

    .gauge-percent {
        font-size: 36px;
    }

    .lore-intro {
        padding: 50px 0;
    }

    .lore-intro-content {
        padding: 40px 25px;
    }

    .lore-intro-content h2 {
        font-size: 28px;
    }

    .lore-intro-content p {
        font-size: 17px;
    }

    .corner-accent {
        width: 70px;
    }

    .orders-section,
    .fracture-section,
    .realm-section,
    .lore-categories,
    .mercs-section,
    .questions-section,
    .lore-featured {
        padding: 50px 0;
    }

    .section-title {
        font-size: 28px;
    }

    .section-subtext {
        font-size: 16px;
    }

    html .fracture-panel, html .order-panel {
        max-width: 100vw;
    }

    html .fracture-panel-content, html .order-panel-content {
        padding: 20px;
    }

    .order-card,
    .lore-card {
        margin: 15px 0;
        height: auto;
    }

    /* Fracture timeline mobile - single column */
    .fracture-timeline {
        padding: 40px 0 20px;
    }

    .fracture-line {
        left: 20px;
    }

    .fracture-event,
    .fracture-event:nth-child(odd),
    .fracture-event:nth-child(even) {
        flex-direction: row;
    }

    .fracture-event-content,
    .fracture-event:nth-child(odd) .fracture-event-content,
    .fracture-event:nth-child(even) .fracture-event-content {
        width: calc(100% - 60px);
        margin-left: auto;
        text-align: left;
        padding: 20px;
        margin-right: 10px;
    }

    .fracture-event:nth-child(odd) .event-header {
        justify-content: flex-start;
    }

    .fracture-node {
        left: 20px;
    }

    .event-title {
        font-size: 18px;
    }

    .event-description {
        font-size: 14px;
    }

    /* Map and locations stack */
    .map-viewport {
        height: auto;
    }

    .map-container {
        margin: 0 auto;
    }

    .map-controls {
        top: 10px;
        right: 10px;
    }

    .map-zoom-btn {
        width: 34px;
        height: 34px;
        font-size: 16px;
    }

    .map-hint {
        font-size: 9px;
        padding: 6px 12px;
    }

    .location-list--horizontal {
        flex-direction: column;
    }

    .location-list--horizontal .location-item {
        border-right: none;
        border-bottom: 1px solid var(--card-border);
        padding: 15px 20px;
    }

    .location-list--horizontal .location-item:last-child {
        border-bottom: none;
    }

    .location-item {
        flex-direction: column;
        gap: 5px;
    }

    .location-hook {
        text-align: left;
    }

    /* Mercs grid */
    .merc-card {
        margin: 8px;
        padding: 15px;
    }

    .merc-card h4 {
        font-size: 14px;
    }

    .merc-tag {
        font-size: 9px;
    }

    /* Questions stack */
    .question-card {
        margin: 15px 0;
        padding: 25px;
        height: auto;
    }

    .featured-content {
        padding: 30px 20px;
    }

    .featured-content h2 {
        font-size: 24px;
    }

    .featured-text h3 {
        font-size: 22px;
    }

    .featured-text p {
        font-size: 16px;
    }
}

@media(max-width: 480px) {
    .lore-hero h1 {
        font-size: 28px;
    }

    .hero-ctas {
        flex-direction: column;
    }

    .btn-cta {
        text-align: center;
    }

    .seal-gauge {
        width: 150px;
        height: 150px;
    }

    .gauge-percent {
        font-size: 28px;
    }
}

/*--------------------------
ORDER PROFILE SLIDE-IN PANEL
--------------------------*/
.order-panel-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(3px);
}

.order-panel-overlay.active {
    pointer-events: all;
    opacity: 1;
}

.order-panel-overlay.active .order-panel-backdrop {
    opacity: 1;
}

.order-panel-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.order-panel {
    position: absolute;
    top: 0;
    right: 0;
    width: 650px;
    max-width: 90vw;
    height: 100%;
    background: var(--bg);
    border-left: 1px solid var(--gold);
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    overflow-y: auto;
    overflow-x: hidden;
}

.order-panel-overlay.active .order-panel {
    transform: translateX(0);
}

.order-panel-close {
    position: sticky;
    top: 10px;
    float: right;
    margin: 15px 15px 0 0;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.85);
    border: 1px solid var(--gold);
    color: var(--gold);
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
    padding: 0;
    line-height: 1;
}

.order-panel-close:hover {
    background: var(--gold);
    color: #000;
}

.order-panel-content {
    padding: 30px 40px 60px;
}

.order-panel-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--card-border);
}

.order-panel-header .panel-accent-bar {
    height: 4px;
    width: 80px;
    margin-bottom: 20px;
}

.order-panel-header h2 {
    font-size: 32px;
    margin: 0 0 8px;
    color: var(--gold);
    letter-spacing: 1px;
}

.order-panel-header .panel-tagline {
    font-size: 16px;
    font-style: italic;
    color: var(--text-muted);
    margin: 0;
}

.order-panel-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 30px;
}

.order-panel-meta .meta-item {
    padding: 12px 15px;
    background: var(--bg-alt);
    border: 1px solid var(--card-border);
}

.order-panel-meta .meta-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10px;
    letter-spacing: 2px;
    color: var(--text-muted);
    text-transform: uppercase;
    display: block;
    margin-bottom: 6px;
}

.order-panel-meta .meta-value {
    font-size: 15px;
    color: var(--text-primary);
    margin: 0;
}

.order-panel-section {
    margin-bottom: 30px;
}

.order-panel-section h3 {
    font-size: 18px;
    color: var(--gold);
    margin: 0 0 15px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.order-panel-section p {
    font-size: 18px;
    color: var(--text-primary);
    line-height: 1.4;
    margin: 0 0 15px;
}

.order-panel-section p:last-child {
    margin-bottom: 0;
}

.order-panel-closing {
    font-style: italic;
    color: var(--text-muted);
    font-size: 15px;
    padding: 15px;
    border-left: 2px solid var(--gold-dim);
    margin: 20px 0;
}

.order-panel-character {
    padding: 20px;
    background: var(--bg-alt);
    border: 1px solid var(--card-border);
    margin: 15px 0;
}

.order-panel-character h4 {
    font-size: 20px;
    color: var(--gold);
    margin: 0 0 5px;
}

.order-panel-character .character-role {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    letter-spacing: 0;
    color: var(--text-muted);
    display: block;
    margin-bottom: 10px;
}

.order-panel-character p {
    font-size: 16px;
    color: var(--text-primary);
    line-height: 1.4;
    margin: 0 0 10px;
}

.order-panel-character .character-status {
    font-size: 16px;
    color: var(--accent-green);
    margin: 0;
}

.order-panel-settlements {
    list-style: none;
    padding: 0;
    margin: 0;
}

.order-panel-settlements li {
    padding: 10px 0;
    border-bottom: 1px solid var(--card-border);
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 15px;
}

.order-panel-settlements li:last-child {
    border-bottom: none;
}

.order-panel-settlements .settlement-name {
    font-family: 'Cinzel', serif;
    font-size: 14px;
    color: var(--gold);
    white-space: nowrap;
}

.order-panel-settlements .settlement-type {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10px;
    letter-spacing: 1px;
    color: var(--text-muted);
    text-transform: uppercase;
    white-space: nowrap;
}

.order-panel-settlements .settlement-desc {
    font-size: 13px;
    color: var(--text-muted);
    font-style: italic;
    flex: 1;
}

/*--------------------------
FRACTURE AUDIO PLAYER
--------------------------*/
.fracture-audio-player {
    position: sticky;
    top: 0;
    z-index: 5;
    background: linear-gradient(180deg, #0D0D14 0%, rgba(13, 13, 20, 0.98) 100%);
    border-bottom: 1px solid var(--card-border);
    padding: 15px 40px;
}

/* Close button inside the audio player sits at the top-right */
.fracture-audio-player .fracture-panel-close {
    position: absolute;
    top: 10px;
    right: 10px;
    float: none;
    margin: 0;
}

.audio-player-header {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.audio-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10px;
    letter-spacing: 2px;
    color: var(--gold);
    text-transform: uppercase;
    white-space: nowrap;
}

.audio-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.audio-play-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--gold);
    border: none;
    color: #000;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
    padding: 0;
    line-height: 1;
}

.audio-play-btn:hover {
    background: #d4b35a;
    transform: scale(1.05);
}

.audio-play-btn.playing {
    background: var(--forge-red);
}

.audio-play-btn.playing:hover {
    background: #d45a3a;
}

.audio-progress-bar {
    flex: 1;
    height: 6px;
    background: var(--card-border);
    border-radius: 3px;
    cursor: pointer;
    position: relative;
    min-width: 60px;
    max-width: 150px;
}

.audio-progress-fill {
    height: 100%;
    background: var(--gold);
    border-radius: 3px;
    width: 0%;
    transition: width 0.1s linear;
    position: relative;
}

.audio-progress-thumb {
    position: absolute;
    top: 50%;
    right: -6px;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--gold);
    box-shadow: 0 0 6px rgba(223, 179, 69, 0.5);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.audio-progress-bar:hover .audio-progress-thumb {
    opacity: 1;
}

.audio-time {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
    flex-shrink: 0;
}

/* Mobile responsive for audio player */
@media(max-width: 900px) {
    .fracture-audio-player {
        padding: 25px;
    }

    .audio-progress-bar {
        display: none;
    }

    .audio-player-header {
        gap: 10px;
    }

    .audio-label {
        font-size: 9px;
        width: 100%;
    }

    .audio-controls {
        width: 100%;
    }

    .audio-play-btn {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }

    .audio-time {
        font-size: 11px;
    }
}

/*--------------------------
FRACTURE SLIDE-IN PANEL
--------------------------*/
.fracture-panel-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(3px);
}

.fracture-panel-overlay.active {
    pointer-events: all;
    opacity: 1;
}

.fracture-panel-overlay.active .fracture-panel-backdrop {
    opacity: 1;
}

.fracture-panel-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.fracture-panel {
    position: absolute;
    top: 0;
    right: 0;
    width: 700px;
    max-width: 90vw;
    height: 100%;
    background: var(--bg);
    border-left: 1px solid var(--gold);
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    overflow-y: auto;
    overflow-x: hidden;
}

.fracture-panel-overlay.active .fracture-panel {
    transform: translateX(0);
}

.fracture-panel-close {
    position: sticky;
    top: 10px;
    float: right;
    margin: 15px 15px 0 0;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.85);
    border: 1px solid var(--gold);
    color: var(--gold);
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
    padding: 0;
    line-height: 1;
}

.fracture-panel-close:hover {
    background: var(--gold);
    color: #000;
}

.fracture-panel-content {
    padding: 30px 40px 60px;
}

.fracture-panel-content h2 {
    font-size: 28px;
    color: var(--gold);
    margin: 30px 0 15px;
    letter-spacing: 1px;
}

.fracture-panel-content h2:first-child {
    margin-top: 0;
}

.fracture-panel-content h3 {
    font-size: 20px;
    color: var(--gold);
    margin: 25px 0 12px;
    letter-spacing: 1px;
}

.fracture-panel-content p {
    font-size: 18px;
    color: var(--text-primary);
    line-height: 1.4;
    margin: 0 0 15px;
}

.fracture-panel-content strong {
    color: var(--gold);
    font-weight: 700;
}

.fracture-panel-content hr {
    border: none;
    border-top: 1px solid var(--card-border);
    margin: 30px 0;
}

.fracture-panel-content ul {
    list-style: none;
    padding: 0;
    margin: 15px 0;
}

.fracture-panel-content ul li {
    padding: 8px 0 8px 20px;
    position: relative;
    color: var(--text-primary);
    font-size: 18px;
    line-height: 1.4;
}

.fracture-panel-content ul li::before {
    content: '—';
    position: absolute;
    left: 0;
    color: var(--gold-dim);
}

/*--------------------------
REDUCED MOTION
--------------------------*/
@media (prefers-reduced-motion: reduce) {
    .gauge-fill {
        animation: none;
    }

    .timeline-detail {
        transition: none;
    }

    .order-card,
    .lore-card,
    .merc-card {
        transition: none;
    }
}