.story-image-container img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

.story-audio-placeholder {
    float: left;
    width: 100%;
    margin: 25px 0;
}

.story-audio-placeholder .audio-container {
    margin: 0;
}

/* Style native audio controls for streaming */
.story-audio-placeholder audio[controls] {
    width: 100%;
    margin: 15px 0;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(106, 252, 255, 0.2);
}

/* WebKit (Chrome, Safari, Edge) */
.story-audio-placeholder audio::-webkit-media-controls-panel {
    background: rgba(0, 0, 0, 0.5);
    border-radius: 6px;
}

/* Firefox */
.story-audio-placeholder audio::-moz-media-controls {
    background: rgba(0, 0, 0, 0.5);
}


/* Story Preview Block Styles */
.story-preview-block {
    margin-bottom: 15px;
}

.story-preview-image {
    width: 120px;
    height: 120px;
    text-align: center;
    margin: 15px auto;
}

.story-preview-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.story-preview-audio {
    float: left;
    width: 100%;
    margin-bottom: 15px;
}

.story-preview-text {
    float: left;
    overflow: hidden;
    font-size: 0.95em;
    line-height: 1.5;
}

.story-series-meta {
    display: inline-block;
    margin-top: 25px;
}

.story-tree-link {
    text-decoration: none;
}

.story-nav-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.story-nav-link,
.story-tree-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    text-decoration: none;
    color: inherit;
    transition: background 0.2s ease;
}

.story-nav-link:hover,
.story-tree-link:hover {
    background: rgba(255, 255, 255, 0.15);
}

.story-nav-icon {
    width: 16px;
    height: 16px;
    filter: brightness(0) invert(1);
    opacity: 0.8;
}

.story-nav-link svg,
.story-tree-link svg {
    width: 18px;
    height: 18px;
    vertical-align: middle;
    margin-right: 4px;
}

.story-tree-icon,
.story-book-icon {
    transition: filter 0.2s ease;
}

.story-nav-link:hover .story-book-icon,
.story-tree-link:hover .story-tree-icon {
    filter: brightness(1.3);
}

h1 .story-book-icon,
h1 .story-tree-icon {
    width: 32px;
    height: 32px;
    vertical-align: middle;
    margin-right: 8px;
}

.series-header h1 svg,
.tree-header h1 svg {
    width: 32px;
    height: 32px;
}

.story-series-meta,
.series-header,
.story-part {
    float: left;
    width: 100%;
}

.story-text {
    margin-top: 20px;
}

.story .output-item:last-of-type {
    margin-bottom: 50px;
}

.story-content-text {
    text-align: left;
    margin: 15px 0 0;
}

.story-nav-container {
    display: flex;
    justify-content: space-between;
    margin: 25px 0;
}

.story-nav-container a {
    text-decoration: none;
}

.story-nav-container a:hover svg.lucide path {
    stroke: #f0f0f0;
}

#save-story-context-btn {
    margin-top: 15px;
}

.story-header-container a {
    text-decoration: none;
}

.story-part-count {
    float: left;
    margin: 0 0 15px;
}

/* .dl-full-audio-btn {
    margin-bottom: 15px;
} */

.contenteditable#story-context {
    margin-bottom: 15px;
}