/* Vesper Reading Experience — v1.5.0 */
/* ============================================
   VESPER READING EXPERIENCE — Phase 3
   The core product. Everything else leads here.
   ============================================ */


/* ============================================
   THEME MODE OVERRIDES FOR READING
   Explicit !important rules to override any
   plugin or block-editor CSS that might set
   hardcoded colors on the story page.
   ============================================ */

body.v-reading-mode,
body.v-reading-mode .site,
body.v-reading-mode .entry-content,
body.v-reading-mode .wp-site-blocks,
body.v-reading-mode #site-content,
body.v-reading-mode main {
    background-color: var(--v-bg) !important;
    color: var(--v-text) !important;
}

/* Dark mode (default) */
[data-theme="dark"] body.v-reading-mode,
[data-theme="dark"] .v-reading-mode {
    background-color: #080c14 !important;
    color: #f0e6d2 !important;
}

/* Light mode */
[data-theme="light"] body.v-reading-mode,
[data-theme="light"] .v-reading-mode,
body.v-reading-mode[data-theme="light"],
html[data-theme="light"] body.v-reading-mode {
    background-color: #f5f0e8 !important;
    color: #2a2520 !important;
}

html[data-theme="light"] body.v-reading-mode .v-prose,
html[data-theme="light"] body.v-reading-mode .v-prose p,
html[data-theme="light"] body.v-reading-mode .v-story-header,
html[data-theme="light"] body.v-reading-mode .v-story-header__tagline,
html[data-theme="light"] body.v-reading-mode .entry-content,
html[data-theme="light"] body.v-reading-mode .entry-content p,
html[data-theme="light"] body.v-reading-mode article,
html[data-theme="light"] body.v-reading-mode article p {
    color: #2a2520 !important;
}

html[data-theme="light"] body.v-reading-mode .v-story-header__meta {
    color: #8a7e70 !important;
}

html[data-theme="light"] body.v-reading-mode .v-story-end__themes {
    color: #5a5044 !important;
}

/* Sepia mode */
[data-theme="sepia"] body.v-reading-mode,
[data-theme="sepia"] .v-reading-mode,
body.v-reading-mode[data-theme="sepia"],
html[data-theme="sepia"] body.v-reading-mode {
    background-color: #f4ecd8 !important;
    color: #3d3329 !important;
}

html[data-theme="sepia"] body.v-reading-mode .v-prose,
html[data-theme="sepia"] body.v-reading-mode .v-prose p,
html[data-theme="sepia"] body.v-reading-mode .v-story-header,
html[data-theme="sepia"] body.v-reading-mode .v-story-header__tagline,
html[data-theme="sepia"] body.v-reading-mode .entry-content,
html[data-theme="sepia"] body.v-reading-mode .entry-content p,
html[data-theme="sepia"] body.v-reading-mode article,
html[data-theme="sepia"] body.v-reading-mode article p {
    color: #3d3329 !important;
}

html[data-theme="sepia"] body.v-reading-mode .v-story-header__meta {
    color: #9a8a78 !important;
}

html[data-theme="sepia"] body.v-reading-mode .v-story-end__themes {
    color: #6b5d4f !important;
}

/* Header and footer should also respond in reading mode */
html[data-theme="light"] body.v-reading-mode .v-header,
html[data-theme="light"] body.v-reading-mode .v-footer,
html[data-theme="light"] body.v-reading-mode .v-reading-toolbar {
    background-color: #f5f0e8 !important;
}

html[data-theme="sepia"] body.v-reading-mode .v-header,
html[data-theme="sepia"] body.v-reading-mode .v-footer,
html[data-theme="sepia"] body.v-reading-mode .v-reading-toolbar {
    background-color: #f4ecd8 !important;
}

/* Scrolled header backdrop */
html[data-theme="light"] body.v-reading-mode .v-header--scrolled {
    background-color: rgba(245, 240, 232, 0.92) !important;
}

html[data-theme="sepia"] body.v-reading-mode .v-header--scrolled {
    background-color: rgba(244, 236, 216, 0.92) !important;
}

/* Story footer links */
html[data-theme="light"] body.v-reading-mode .v-story-link,
html[data-theme="light"] body.v-reading-mode .v-story-resource {
    background-color: #ffffff !important;
    border-color: rgba(42, 37, 32, 0.12) !important;
}

html[data-theme="sepia"] body.v-reading-mode .v-story-link,
html[data-theme="sepia"] body.v-reading-mode .v-story-resource {
    background-color: #faf5e8 !important;
    border-color: rgba(61, 51, 41, 0.12) !important;
}

/* Content gate */
html[data-theme="light"] body.v-reading-mode .v-prose--gated::after {
    background: linear-gradient(to bottom, transparent, #f5f0e8) !important;
}

html[data-theme="sepia"] body.v-reading-mode .v-prose--gated::after {
    background: linear-gradient(to bottom, transparent, #f4ecd8) !important;
}


/* ============================================
   READING TOOLBAR
   Sticky bar with theme/font/size controls.
   Sits BELOW the header. Fades in on scroll.
   ============================================ */

.v-reading-toolbar {
    position: fixed;
    top: 48px; /* Below the compact scrolled header */
    left: 0;
    right: 0;
    z-index: calc(var(--v-z-nav) - 1);
    background: var(--v-bg);
    border-bottom: 1px solid var(--v-border);
    padding: 0.5rem 0;
    transform: translateY(-100%);
    opacity: 0;
    transition: transform 0.4s var(--v-ease),
                opacity 0.3s var(--v-ease),
                background-color var(--v-duration) var(--v-ease);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

/* WP Admin bar offset */
body.admin-bar .v-reading-toolbar {
    top: calc(48px + 32px);
}

@media (max-width: 782px) {
    body.admin-bar .v-reading-toolbar {
        top: calc(44px + 46px);
    }
}

.v-reading-toolbar.is-visible {
    transform: translateY(0);
    opacity: 1;
}

/* When site header is scrolled away, toolbar takes over */
body.v-reading-mode .v-header--scrolled ~ .v-reading-toolbar.is-visible,
body.v-reading-mode .v-reading-toolbar.is-visible {
    /* toolbar appears cleanly */
}

.v-reading-toolbar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 960px;
    margin: 0 auto;
    padding: 0 var(--v-space-lg);
    gap: var(--v-space-md);
}

/* Left: story title (truncated) */
.v-reading-toolbar__title {
    font-family: var(--v-font-display);
    font-size: 1rem;
    color: var(--v-text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
    font-style: italic;
}

/* Right: controls cluster */
.v-reading-toolbar__controls {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-shrink: 0;
}

/* Individual control button */
.v-reading-ctrl {
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid var(--v-border);
    border-radius: 3px;
    color: var(--v-text-muted);
    cursor: pointer;
    padding: 0.3rem 0.55rem;
    font-family: var(--v-font-ui);
    font-size: 0.65rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    transition: all var(--v-duration) var(--v-ease);
    line-height: 1;
    min-height: 28px;
}

.v-reading-ctrl:hover {
    border-color: var(--v-border-strong);
    color: var(--v-text-secondary);
}

.v-reading-ctrl.is-active {
    border-color: var(--v-accent);
    color: var(--v-accent);
    background: rgba(212, 149, 106, 0.08);
}

/* Font size buttons */
.v-reading-ctrl--size {
    font-size: 0.7rem;
    padding: 0.3rem 0.4rem;
    min-width: 28px;
}

.v-reading-ctrl--size-sm {
    font-size: 0.6rem;
}

.v-reading-ctrl--size-lg {
    font-size: 0.85rem;
}

/* Separator between control groups */
.v-reading-ctrl-sep {
    width: 1px;
    height: 16px;
    background: var(--v-border);
    margin: 0 0.25rem;
    flex-shrink: 0;
}

/* Ambient audio button */
.v-reading-ctrl--audio {
    font-size: 0.85rem;
    padding: 0.3rem 0.5rem;
    min-width: 28px;
    position: relative;
}

.v-reading-ctrl--audio.is-playing {
    border-color: var(--v-accent);
    color: var(--v-accent);
    background: rgba(212, 149, 106, 0.08);
}

.v-audio-icon {
    display: inline-block;
    line-height: 1;
}


/* ============================================
   READING PROGRESS BAR
   Hair-thin line at very top of viewport.
   ============================================ */

.v-reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    background: var(--v-accent);
    z-index: calc(var(--v-z-nav) + 1);
    width: 0%;
    opacity: 0;
    transition: width 0.1s linear, opacity 0.4s var(--v-ease);
}

body.admin-bar .v-reading-progress {
    top: 32px;
}

@media (max-width: 782px) {
    body.admin-bar .v-reading-progress {
        top: 46px;
    }
}

.v-reading-progress.is-visible {
    opacity: 1;
}


/* ============================================
   STORY HEADER
   Title, metadata, atmospheric opening.
   ============================================ */

.v-story-header {
    padding-top: calc(80px + var(--v-space-2xl));
    padding-bottom: var(--v-space-md);
    text-align: center;
    max-width: var(--v-reading-max-width);
    margin: 0 auto;
    padding-left: var(--v-space-lg);
    padding-right: var(--v-space-lg);
}

body.admin-bar .v-story-header {
    padding-top: calc(80px + 32px + var(--v-space-2xl));
}

@media (max-width: 782px) {
    body.admin-bar .v-story-header {
        padding-top: calc(60px + 46px + var(--v-space-xl));
    }
}

.v-story-header__type {
    font-family: var(--v-font-ui);
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--v-accent);
    margin-bottom: var(--v-space-sm);
}

.v-story-header__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: var(--v-space-lg);
    justify-content: center;
}

.v-story-header__tag {
    font-family: var(--v-font-ui);
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--v-text-muted);
    border: 1px solid rgba(240,230,210,0.12);
    border-radius: 2px;
    padding: 0.25em 0.7em;
    line-height: 1;
}

.v-story-header__title {
    font-family: var(--v-font-display);
    font-size: 2.8rem;
    font-weight: 300;
    letter-spacing: 0.03em;
    line-height: 1.15;
    color: var(--v-text);
    margin-bottom: var(--v-space-md);
}

.v-story-header__tagline {
    font-family: var(--v-font-display);
    font-size: 1.15rem;
    font-style: italic;
    color: var(--v-text-secondary);
    line-height: 1.5;
    max-width: 480px;
    margin: 0 auto var(--v-space-lg);
}

.v-story-header__divider {
    width: 40px;
    height: 1px;
    background: var(--v-accent);
    margin: 0 auto var(--v-space-md);
    opacity: 0.6;
}

.v-story-header__characters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0;
    margin-bottom: var(--v-space-md);
}

.v-story-header__char {
    display: inline-flex;
    align-items: center;
    background: none;
    border: none;
    border-radius: 0;
    cursor: pointer;
    font-family: var(--v-font-display);
    font-size: 0.95rem;
    color: var(--v-text-secondary);
    padding: 0;
    transition: color 0.3s ease;
    text-decoration: none;
    line-height: 1.3;
    white-space: nowrap;
}

.v-story-header__char:hover {
    color: var(--v-accent);
}

/* Dot separator between character names */
.v-story-header__char + .v-story-header__char::before,
.v-story-header__char + .v-story-header__char-more::before {
    content: '\00B7';
    margin: 0 0.6em;
    color: var(--v-text-muted);
    pointer-events: none;
}

.v-story-header__char-more {
    display: inline-flex;
    align-items: center;
    font-family: var(--v-font-ui);
    font-size: 0.7rem;
    color: var(--v-text-muted);
}

.v-story-header__meta {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.4rem 1rem;
    font-family: var(--v-font-ui);
    font-size: 0.7rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--v-text-muted);
    margin-bottom: var(--v-space-md);
}

.v-story-header__meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.3em;
}

/* Content rating badge */
.v-badge {
    display: inline-block;
    padding: 0.15em 0.55em;
    border-radius: 2px;
    font-family: var(--v-font-ui);
    font-size: 0.6rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    line-height: 1.4;
}

.v-badge--general {
    border: 1px solid var(--v-border-strong);
    color: var(--v-text-muted);
}

.v-badge--mature {
    border: 1px solid rgba(212, 149, 106, 0.3);
    color: var(--v-accent);
}

.v-badge--explicit {
    border: 1px solid rgba(180, 80, 80, 0.4);
    color: #c47070;
}


/* ============================================
   FEATURED IMAGE — Full-width hero artwork
   ============================================ */

.v-story-featured {
    width: 100%;
    max-width: 940px;
    margin: 0 auto var(--v-space-lg);
    overflow: hidden;
    position: relative;
    padding: 0 var(--v-space-lg);
}

.v-story-featured__img {
    width: 100%;
    height: auto !important;
    max-height: none !important;
    object-fit: unset !important;
    display: block;
    cursor: zoom-in;
    border-radius: 3px;
}

.v-story-featured__caption {
    font-family: var(--v-font-ui);
    font-size: 0.7rem;
    letter-spacing: 0.04em;
    color: var(--v-text-muted);
    text-align: center;
    margin-top: var(--v-space-sm);
    padding: 0 var(--v-space-lg);
    font-style: italic;
}

/* Lightbox overlay */
.v-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    cursor: zoom-out;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s var(--v-ease), visibility 0.3s;
}

.v-lightbox.is-open {
    opacity: 1;
    visibility: visible;
}

.v-lightbox__img {
    max-width: 95vw;
    max-height: 92vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 2px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
}

.v-lightbox__close {
    position: absolute;
    top: 1.2rem;
    right: 1.5rem;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.8rem;
    cursor: pointer;
    line-height: 1;
    padding: 0.5rem;
    transition: color 0.2s;
}

.v-lightbox__close:hover {
    color: rgba(255, 255, 255, 0.95);
}

@media (max-width: 768px) {
    .v-lightbox {
        padding: 0.5rem;
    }
    .v-lightbox__close {
        top: 0.8rem;
        right: 1rem;
    }
}


/* ============================================
   STORY BODY — THE READING EXPERIENCE
   ============================================ */

/* Prior reading suggestion */
.v-prior-reading {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.4rem 0.8rem;
    padding: 0.7rem 1.2rem;
    margin: 0 auto var(--v-space-lg);
    max-width: var(--v-reading-max-width);
    background: var(--v-bg-elevated);
    border: 1px solid var(--v-border);
    border-left: 3px solid var(--v-accent);
    border-radius: 2px;
    font-family: var(--v-font-ui);
    font-size: 0.75rem;
}

.v-prior-reading__label {
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--v-accent);
    font-size: 0.6rem;
    font-weight: 500;
}

.v-prior-reading__link {
    color: var(--v-text-secondary);
    text-decoration: none;
    transition: color var(--v-duration) var(--v-ease);
    font-family: var(--v-font-display);
    font-size: 0.95rem;
    font-style: italic;
}

.v-prior-reading__link:hover {
    color: var(--v-accent);
}

.v-prior-reading__link + .v-prior-reading__link::before {
    content: '\2022';
    color: var(--v-text-muted);
    margin-right: 0.8rem;
    font-style: normal;
    font-size: 0.5rem;
    vertical-align: middle;
}

.v-story-body {
    padding: 0 var(--v-space-lg) var(--v-space-2xl);
}

/* Font family switching */
body.v-reading-mode .v-prose,
body.v-reading-mode .entry-content,
body.v-reading-mode article {
    font-family: var(--v-font-body);
}

/* Sans-serif mode */
body.v-reading-mode [data-font="sans"],
body.v-reading-mode [data-font="sans"] p,
body.v-reading-mode [data-font="sans"] blockquote {
    font-family: var(--v-font-reading-sans) !important;
    font-weight: 400;
    letter-spacing: 0.005em;
}

/* Serif mode (explicit reset) */
body.v-reading-mode [data-font="serif"],
body.v-reading-mode [data-font="serif"] p,
body.v-reading-mode [data-font="serif"] blockquote {
    font-family: var(--v-font-body) !important;
}

/* Font size override from toolbar */
body.v-reading-mode [data-size="small"],
body.v-reading-mode [data-size="small"] p {
    font-size: calc(var(--v-reading-size) - 0.1rem) !important;
}

body.v-reading-mode [data-size="medium"],
body.v-reading-mode [data-size="medium"] p {
    font-size: var(--v-reading-size) !important;
}

body.v-reading-mode [data-size="large"],
body.v-reading-mode [data-size="large"] p {
    font-size: calc(var(--v-reading-size) + 0.12rem) !important;
    line-height: calc(var(--v-reading-line-height) + 0.05);
}

/* Prose refinements for reading page */
.v-story-body .v-prose p {
    margin-bottom: 1.3em;
    hanging-punctuation: first;
}

/* Dialogue — em dashes and quotes */
.v-story-body .v-prose p:first-child {
    /* No indent on opening paragraph */
}

/* Scene breaks — centered ornament */
body.v-reading-mode hr {
    border: none !important;
    height: auto !important;
    background: none !important;
    background-color: transparent !important;
    text-align: center !important;
    margin: 2.5rem auto !important;
    max-width: none !important;
    opacity: 1 !important;
    display: block !important;
}

body.v-reading-mode hr::after {
    content: '\2022\2002\2002\2022\2002\2002\2022' !important;
    font-size: 0.75rem;
    color: var(--v-accent);
    opacity: 0.8;
    display: block;
    text-align: center;
}

/* Story images — inline artwork at emotional beats */
.v-story-body .v-prose .v-story-image {
    margin: var(--v-space-2xl) calc(-1 * var(--v-space-xl));
    max-width: calc(100% + var(--v-space-xl) * 2);
}

/* Images inserted via the classic editor (Add Media) */
body.v-reading-mode .v-prose img,
body.v-reading-mode .v-prose .wp-caption {
    max-width: calc(100% + 4rem);
    margin-left: -2rem;
    margin-right: -2rem;
    margin-top: var(--v-space-xl);
    margin-bottom: var(--v-space-xl);
    height: auto;
    display: block;
    border-radius: 2px;
}

body.v-reading-mode .v-prose .wp-caption img {
    margin: 0;
    max-width: 100%;
}

body.v-reading-mode .v-prose .wp-caption-text,
body.v-reading-mode .v-prose figcaption {
    font-family: var(--v-font-ui);
    font-size: 0.7rem;
    letter-spacing: 0.04em;
    color: var(--v-text-muted);
    text-align: center;
    margin-top: var(--v-space-sm);
    font-style: italic;
}

/* Centered images (aligncenter from editor) */
body.v-reading-mode .v-prose .aligncenter {
    margin-left: auto;
    margin-right: auto;
    display: block;
}

/* Full-width images (alignfull or alignwide) */
body.v-reading-mode .v-prose .alignfull {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

@media (max-width: 768px) {
    body.v-reading-mode .v-prose img,
    body.v-reading-mode .v-prose .wp-caption {
        max-width: calc(100% + 2rem);
        margin-left: -1rem;
        margin-right: -1rem;
    }
}


.v-story-body .v-prose .v-story-image img {
    width: 100%;
    border-radius: 2px;
    opacity: 0.95;
}

.v-story-body .v-prose .v-story-image figcaption {
    font-family: var(--v-font-ui);
    font-size: 0.7rem;
    letter-spacing: 0.04em;
    color: var(--v-text-muted);
    text-align: center;
    margin-top: var(--v-space-sm);
    font-style: italic;
}

/* Drop cap — first letter of story */
.v-story-body .v-prose .v-dropcap::first-letter,
body.v-reading-mode .v-prose .v-dropcap::first-letter,
body.v-reading-mode .v-dropcap::first-letter {
    font-family: var(--v-font-display);
    font-size: 3.6em;
    float: left;
    line-height: 0.75;
    margin-right: 0.08em;
    margin-top: 0.08em;
    color: var(--v-accent);
    font-weight: 400;
}

/* Emphasis — italics within dialogue */
.v-story-body .v-prose em {
    font-style: italic;
}

/* Bold — rare, for emphasis */
.v-story-body .v-prose strong {
    font-weight: 600;
    color: var(--v-text);
}


/* ============================================
   CONTEXT NOTE — shown only to unoriented readers
   ============================================ */

.v-context-note {
    max-width: var(--v-reading-max-width);
    margin: 0 auto;
    padding: 0 var(--v-space-lg) var(--v-space-md);
}

.v-context-note__text {
    font-family: var(--v-font-body);
    font-size: 0.95rem;
    font-style: italic;
    line-height: 1.6;
    color: var(--v-text-muted);
    margin: 0;
}


/* ============================================
   STORY END MARKER
   ============================================ */

.v-story-end {
    text-align: center;
    padding: var(--v-space-lg) 0 var(--v-space-md);
    max-width: var(--v-reading-max-width);
    margin: 0 auto;
}

.v-story-end__mark {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: var(--v-accent);
    opacity: 0.5;
}

.v-story-end__themes {
    font-family: var(--v-font-display);
    font-size: 1.1rem;
    font-style: italic;
    color: var(--v-text-secondary) !important;
    margin-top: var(--v-space-lg);
    line-height: 1.7;
    padding: 0 var(--v-space-lg);
}

.v-story-end__themes::before {
    content: 'Themes: ';
    font-style: normal;
    font-size: 0.65rem;
    font-family: var(--v-font-ui);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--v-accent) !important;
    display: block;
    margin-bottom: 0.4rem;
}


/* ============================================
   STORY FOOTER — LINKS & RESOURCES
   Characters, locations, analysis, PDF.
   ============================================ */

.v-story-footer {
    max-width: var(--v-reading-max-width);
    margin: 0 auto;
    padding: 0 var(--v-space-lg) var(--v-space-xl);
}

.v-story-footer__divider {
    width: 60px;
    height: 1px;
    background: var(--v-border-strong);
    margin: 0 auto var(--v-space-lg);
}

/* Section heading for footer blocks */
.v-story-footer__heading {
    font-family: var(--v-font-ui);
    font-size: 0.8rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--v-accent);
    opacity: 0.7;
    margin-bottom: var(--v-space-md);
}

/* Linked items — full width stack */
.v-story-links {
    display: flex;
    flex-direction: column;
    gap: var(--v-space-sm);
    margin-bottom: var(--v-space-lg);
}

/* Individual link card */
.v-story-link {
    display: flex;
    align-items: center;
    gap: var(--v-space-md);
    padding: var(--v-space-md) var(--v-space-md);
    background: var(--v-bg-elevated);
    border: 1px solid var(--v-border);
    border-radius: 3px;
    text-decoration: none;
    transition: border-color var(--v-duration) var(--v-ease),
                transform var(--v-duration) var(--v-ease);
}

.v-story-link:hover {
    border-color: var(--v-border-strong);
    transform: translateY(-1px);
}

.v-story-link__icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--v-bg-surface);
    color: var(--v-accent);
    font-size: 0.9rem;
}

.v-story-link__text {
    flex: 1;
    min-width: 0;
}

.v-story-link__name {
    font-family: var(--v-font-display);
    font-size: 1.3rem;
    color: var(--v-text);
    margin-bottom: 0.15rem;
    line-height: 1.3;
}

.v-story-link__desc {
    font-family: var(--v-font-body);
    font-size: 0.95rem;
    color: var(--v-text-muted);
    line-height: 1.4;
}

/* Character links — with avatar */
.v-story-link--character .v-story-link__icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--v-bg-surface);
}

.v-story-link--character .v-story-link__icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Location links — with round image */
.v-story-link--location .v-story-link__icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--v-bg-surface);
}

.v-story-link--location .v-story-link__icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Related story links — with round image */
.v-story-link--story .v-story-link__icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--v-bg-surface);
}

.v-story-link--story .v-story-link__icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Resource links row (analysis, PDF) */
.v-story-resources {
    display: flex;
    flex-wrap: wrap;
    gap: var(--v-space-sm);
    margin-bottom: var(--v-space-xl);
}

.v-story-resource {
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    padding: 0.5em 1em;
    border: 1px solid var(--v-border);
    border-radius: 3px;
    font-family: var(--v-font-ui);
    font-size: 0.7rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--v-text-secondary);
    text-decoration: none;
    transition: all var(--v-duration) var(--v-ease);
}

.v-story-resource:hover {
    border-color: var(--v-accent);
    color: var(--v-accent);
}

.v-story-resource__icon {
    font-size: 0.85rem;
    line-height: 1;
}


/* ============================================
   NEXT STORY / EXPLORE MORE
   ============================================ */

.v-story-next {
    border-top: 1px solid var(--v-border);
    padding: var(--v-space-xl) var(--v-space-lg);
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.v-story-next__label {
    font-family: var(--v-font-ui);
    font-size: 0.6rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--v-text-muted);
    margin-bottom: var(--v-space-md);
}

.v-story-next__title {
    font-family: var(--v-font-display);
    font-size: 1.6rem;
    font-weight: 300;
    margin-bottom: var(--v-space-sm);
}

.v-story-next__title a {
    color: var(--v-text);
    transition: color var(--v-duration) var(--v-ease);
}

.v-story-next__title a:hover {
    color: var(--v-accent);
}

.v-story-next__tagline {
    font-family: var(--v-font-display);
    font-size: 0.95rem;
    font-style: italic;
    color: var(--v-text-secondary);
}


/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .v-story-header {
        padding-top: calc(60px + var(--v-space-xl));
    }

    .v-story-header__title {
        font-size: 2rem;
    }

    .v-story-header__tagline {
        font-size: 1rem;
    }

    .v-story-body .v-prose .v-story-image {
        margin-left: calc(-1 * var(--v-space-md));
        margin-right: calc(-1 * var(--v-space-md));
        max-width: calc(100% + var(--v-space-md) * 2);
    }

    .v-story-body .v-prose .v-dropcap::first-letter {
        font-size: 3em;
    }

    .v-reading-toolbar__inner {
        padding: 0 var(--v-space-md);
    }

    .v-reading-toolbar__title {
        font-size: 0.85rem;
        max-width: 140px;
    }

    /* Stack some controls on very small screens */
    .v-reading-ctrl-sep:nth-of-type(1) {
        display: none;
    }
}

@media (max-width: 480px) {
    .v-story-header__title {
        font-size: 1.7rem;
    }

    .v-story-header__meta {
        font-size: 0.6rem;
        gap: 0.3rem 0.6rem;
    }

    .v-reading-toolbar__controls {
        gap: 0.25rem;
    }

    .v-reading-ctrl {
        padding: 0.25rem 0.4rem;
        font-size: 0.6rem;
        min-height: 26px;
    }

    .v-reading-ctrl--size-lg {
        font-size: 0.75rem;
        padding: 0.2rem 0.35rem;
    }

    .v-story-resources {
        flex-direction: column;
    }
}


/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
    .v-reading-toolbar,
    .v-reading-progress,
    .v-header,
    .v-footer,
    .v-story-footer,
    .v-story-next {
        display: none !important;
    }

    .v-story-body .v-prose {
        font-size: 11pt;
        line-height: 1.6;
        max-width: none;
        color: #000;
    }

    .v-story-header {
        padding-top: 2cm;
    }

    .v-story-header__title {
        font-size: 24pt;
    }
}


/* ============================================
   RESUME READING TOAST
   ============================================ */

.v-resume-toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(1rem);
    font-family: 'EB Garamond', Georgia, serif;
    font-size: 0.9rem;
    font-style: italic;
    color: rgba(240,230,210,0.8);
    background: rgba(6,10,18,0.85);
    border: 1px solid rgba(208,139,85,0.25);
    padding: 0.7em 1.5em;
    border-radius: 4px;
    opacity: 0;
    transition: opacity 0.5s ease, transform 0.5s ease;
    z-index: 9999;
    pointer-events: none;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.v-resume-toast.is-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.v-resume-toast__sep {
    color: rgba(208,139,85,0.3);
}

.v-resume-toast__top {
    color: #d08b55;
    text-decoration: none;
    font-style: normal;
    cursor: pointer;
    pointer-events: auto;
    transition: color 0.2s ease;
}

.v-resume-toast__top:hover {
    color: #e0a87d;
}

/* Light/sepia theme toast adjustments */
[data-theme="light"] .v-resume-toast {
    color: rgba(30,30,30,0.8);
    background: rgba(255,255,255,0.9);
    border-color: rgba(180,140,100,0.3);
}

[data-theme="sepia"] .v-resume-toast {
    color: rgba(60,40,20,0.8);
    background: rgba(245,235,220,0.9);
    border-color: rgba(180,140,100,0.3);
}


/* ============================================
   ARTICLE TEMPLATE
   ============================================ */

.v-article-back {
    max-width: var(--v-reading-max-width);
    margin: 0 auto;
    padding: 6rem 2rem 0;
}

body.admin-bar .v-article-back {
    padding-top: calc(6rem + 32px);
}

.v-article-back__link {
    font-family: var(--v-font-ui);
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--v-text-muted);
    text-decoration: none;
    transition: color var(--v-duration) var(--v-ease);
}

.v-article-back__link:hover {
    color: var(--v-accent);
}

.v-article-header {
    text-align: center;
    padding: 2rem 2rem 0;
    max-width: calc(var(--v-reading-max-width) + 4rem);
    margin: 0 auto;
}

/* If there's no back link above, add top padding for the header */
.v-article-header:first-child {
    padding-top: 6rem;
}

body.admin-bar .v-article-header:first-child {
    padding-top: calc(6rem + 32px);
}

.v-article-header__type {
    font-family: var(--v-font-ui);
    font-size: 0.65rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--v-accent);
    opacity: 0.6;
    margin-bottom: 0.8rem;
}

.v-article-header__title {
    font-family: var(--v-font-display);
    font-size: 2.4rem;
    font-weight: 400;
    letter-spacing: 0.02em;
    color: var(--v-text);
    margin: 0 0 0.5rem;
    line-height: 1.2;
}

.v-article-header__subtitle {
    font-family: var(--v-font-body);
    font-size: 1.1rem;
    font-style: italic;
    color: var(--v-text-muted);
    margin: 0;
}

.v-article-header__divider {
    width: 50px;
    height: 1px;
    background: var(--v-accent);
    margin: 1.5rem auto 0;
    opacity: 0.4;
}

.v-article-featured {
    max-width: var(--v-reading-max-width);
    margin: 2rem auto;
    padding: 0 2rem;
}

.v-article-featured__img {
    width: 100%;
    border-radius: 3px;
}

.v-article-featured__caption {
    font-family: var(--v-font-ui);
    font-size: 0.65rem;
    letter-spacing: 0.05em;
    color: var(--v-text-muted);
    text-align: center;
    margin-top: 0.6rem;
}

.v-article-footer-back {
    padding: 2rem 0 0;
    border-top: 1px solid var(--v-border);
    margin-top: 1.5rem;
}

.v-article-footer-back__link {
    font-family: var(--v-font-ui);
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--v-text-muted);
    text-decoration: none;
    transition: color var(--v-duration) var(--v-ease);
}

.v-article-footer-back__link:hover {
    color: var(--v-accent);
}

@media (max-width: 768px) {
    .v-article-header__title { font-size: 1.8rem; }
    .v-article-back { padding-top: 5rem; }
}
