body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #222;
}

/* Preserve Book to Screen identity */
.site-header {
    font-family: Georgia, "Times New Roman", serif;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 42px 20px;
}

@media (max-width: 640px) {
    .container {
        padding-top: 18px;
    }
}

.trailers-shell {
    max-width: 1320px;
    margin: 0 auto;
    padding: 42px 20px;
}

@media (max-width: 640px) {

    .trailers-shell {
        width: min(100% - 24px, 1100px);
        padding-top: 18px;
    }
}

.trailers-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 32px;
}

.container h1 {
    margin-bottom: 5px;
}

.subtitle {
    margin-bottom: 30px;
}

.stats {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 15px 18px;
    margin-bottom: 25px;
}

.author-discovery {
    margin-bottom: 25px;
    padding: 16px 18px;

    background: #fffaf3;
    border: 1px solid #ded2c2;
    border-radius: 10px;
}

.author-discovery__heading {
    margin: 0 0 4px;
    font-size: 1.1rem;
    color: #2b2118;
}

.author-discovery__intro {
    margin: 0 0 12px;
    font-size: 0.85rem;
    color: #5d5146;
}

.author-discovery__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.author-discovery__chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;

    padding: 8px 14px;
    border: 1px solid #d7c7b2;
    border-radius: 999px;

    background: #fff;
    color: #2b2118;

    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
}

.author-discovery__chip:hover,
.author-discovery__chip:focus-visible {
    background: #2b2118;
    border-color: #2b2118;
    color: #fff;
}

.author-discovery__count {
    font-weight: 400;
    opacity: 0.8;
}

@media (max-width: 640px) {
    .author-discovery__chip {
        flex: 1 1 calc(50% - 8px);
        justify-content: center;
        text-align: center;
    }
}

.trailer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
}

.trailer-grid .card {
    padding: 0;
    overflow: hidden;
}

.trailer-grid .poster-link {
    display: block;
}

.trailer-grid .poster {
    display: block;
    width: 100%;
    margin: 0;
    border-radius: 0;
}

.trailer-grid .card-body {
    padding: 22px;
}

.trailer-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 12px;
    overflow: hidden;
}

.poster {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    background: #eee;
}

.no-poster {
    width: 100%;
    aspect-ratio: 2 / 3;
    background: #eee;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #888;
}

.poster-link {
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
    text-align: inherit;
}

.trailer-button {
    font: inherit;
    cursor: pointer;
}

.poster-link .poster {
    transition: opacity 0.15s ease;
}

.poster-link:hover .poster {
    opacity: 0.9;
}

.trailer-card-body {
    padding: 15px;
}

.title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 6px;
}

.meta {
    font-size: 13px;
    color: #666;
    margin-bottom: 10px;
}

.book-source {
    margin: 12px 0;
    font-size: 0.9rem;
    line-height: 1.5;
}

.author-link {
    color: inherit;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.author-link:hover {
    text-decoration-thickness: 2px;
}

.overview {
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 14px;
}

.actions {
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.actions a,
.actions button {
    display: block;
    width: 100%;
    padding: 8px 12px;
    background: #222;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-size: 13px;
    text-align: left;
}

.actions a:hover,
.actions button:hover {
    background: #444;
}

.tmdb-id {
    margin-top: 10px;
    font-size: 11px;
    color: #999;
}

.trailer-search {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.trailer-search__input {
    flex: 1;
    min-width: 0;
    max-width: 520px;
    padding: 10px 13px;

    border: 1px solid #d7c7b2;
    border-radius: 8px;

    background: #fff;
    color: #222;

    font: inherit;
    font-size: 14px;

    outline: none;
}

.trailer-search__input:focus {
    border-color: #7a5c3e;
    box-shadow: 0 0 0 2px rgba(122, 92, 62, 0.12);
}

.trailer-search__button,
.trailer-search__clear {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 10px 14px;
    border: 1px solid #d7c7b2;
    border-radius: 8px;

    font: inherit;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;

    text-decoration: none;
}

.trailer-search__button {
    background: #2b2118;
    border-color: #2b2118;
    color: #fff;
    cursor: pointer;

    appearance: none;
    -webkit-appearance: none;
}

.trailer-search__button:hover {
    background: #4a392b;
    border-color: #4a392b;
}

.trailer-search__clear {
    background: #fff;
    color: #2b2118;
}

.trailer-search__clear:hover {
    background: #f1ece6;
}

.no-results {
    padding: 40px 24px;
    margin-top: 10px;

    background: #fff;
    border: 1px solid #ddd;
    border-radius: 10px;

    text-align: center;
}

.no-results h2 {
    margin: 0 0 10px;
    font-size: 1.25rem;
}

.no-results p {
    margin: 0 0 20px;
    color: #666;
    line-height: 1.5;
}

.no-results__clear {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 9px 14px;
    border-radius: 999px;

    background: #2b2118;
    color: #fff;

    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

.no-results__clear:hover {
    background: #4a392b;
}

.trailer-controls {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .trailer-search {
        display: grid;
        grid-template-columns: 1fr auto;
    }

    .trailer-search__input {
        max-width: none;
    }

    .trailer-search__clear {
        grid-column: 1 / -1;
        justify-self: start;
    }

    .trailer-controls {
        flex-wrap: wrap;
    }

    .shuffle-link {
        flex: 1 1 auto;
        min-width: 120px;
        text-align: center;
    }
}

.shuffle-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 14px;
    line-height: 1.2;
    margin-bottom: 4px;
    border: 1px solid #d7c7b2;
    border-radius: 999px;
    background: #fff;
    color: #2b2118;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

.shuffle-link:hover {
    background: #2b2118;
    border-color: #2b2118;
    color: #fff;
}

.sort-control {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
}

.sort-control__label {
    font-size: 13px;
    font-weight: 700;
    color: #2b2118;
    white-space: nowrap;
}

.sort-control__select {
    padding: 9px 10px;
    border: 1px solid #d7c7b2;
    border-radius: 999px;
    background: #fff;
    color: #2b2118;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
    appearance: auto;
    -webkit-appearance: auto;
}

.sort-control__select:focus {
    outline: none;
    border-color: #7a5c3e;
    box-shadow: 0 0 0 2px rgba(122, 92, 62, 0.12);
}

@media (max-width: 768px) {
    .sort-control {
        flex: 1 1 100%;
        order: -1;
    }

    .sort-control__select {
        flex: 1;
        min-width: 0;
    }
}

.vibe-button {
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}

.vibe-button.shimmer-button::after {
    background: linear-gradient(
        120deg,
        transparent,
        rgba(122, 92, 62, 0.12),
        transparent
    );
}

.back-link {
    display: inline-block;
    color: #7a5c3e;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

.back-link:hover {
    color: #2b2118;
    text-decoration: underline;
}