/* ReleaseHub — base CSS system
   Dark mode is the default (:root / [data-theme="dark"]).
   Light mode: [data-theme="light"]
   Typography: Manrope only (400 / 500 / 600 / 700).
*/

@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700&display=swap");

:root,
[data-theme="dark"] {
    /* Typography — Manrope only */
    --font-family: "Manrope", sans-serif;
    --font-weight-regular: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;

    /* Motion — keep between 150ms and 250ms */
    --theme-duration: 180ms;
    --theme-easing: ease;

    /* Surfaces — soft ink (media library, not admin dashboard) */
    --background: #121214;
    --surface: #1a1a1e;
    --card: #1a1a1e;

    /* Lines */
    --border: #2c2c32;
    --border-width: 1px;
    --radius-sm: 0.35rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;

    /* Text */
    --text: #ececef;
    --text-secondary: #b4b4bc;
    --text-muted: #8a8a94;

    /* Brand / status */
    --accent: #2dd4bf;
    --on-accent: #041016;
    --success: #3fb950;
    --warning: #d29922;
    --danger: #f85149;

    /* Type scale helpers */
    --meta-size: 0.78rem;
    --card-title-size: 0.95rem;
    --tap-min: 2.75rem;
    --gap-tight: 0.45rem;
}

[data-theme="light"] {
    /* Surfaces */
    --background: #f4f6f8;
    --surface: #ffffff;
    --card: #ffffff;

    /* Lines */
    --border: #d8dee6;

    /* Text */
    --text: #12161c;
    --text-secondary: #3d4754;
    --text-muted: #6b7583;

    /* Brand / status */
    --accent: #0f766e;
    --on-accent: #ffffff;
    --success: #15803d;
    --warning: #b45309;
    --danger: #b91c1c;
}

/* Default typeface — Manrope for all UI text */
html {
    font-family: var(--font-family);
    font-weight: var(--font-weight-regular);
    color: var(--text);
    background: var(--background);
}

body,
h1, h2, h3, h4, h5, h6,
button,
input,
select,
textarea,
label,
nav,
.metadata,
.countdown,
.form,
form,
a,
p,
span,
li,
td,
th,
dt,
dd,
code,
kbd,
samp,
pre,
small,
strong,
em,
blockquote,
table {
    font-family: var(--font-family);
}

button,
input,
select,
textarea {
    font-family: var(--font-family);
    font-weight: inherit;
}

/* Metadata line weight — consistently medium */
.metadata {
    font-family: var(--font-family);
    font-weight: var(--font-weight-medium);
}

/* Never allow browser monospace / alternate UI fonts */
code,
kbd,
samp,
pre,
tt {
    font-family: var(--font-family);
    font-weight: inherit;
}

/* Lucide icons — sole UI icon system (no emoji / other libraries) */
:root {
    --icon-size-sm: 1rem;
    --icon-size-md: 1.25rem;
    --icon-size-lg: 1.5rem;
    --icon-size-xl: 2rem;
    --icon-stroke: 1.75;

    /* Global page container */
    --container-max: 1400px;
    --container-pad-x: 1.25rem;
    --container-pad-y: 2rem;
    --page-gap: 2.5rem;
}

@media (min-width: 640px) {
    :root {
        --container-pad-x: 1.75rem;
        --container-pad-y: 2.5rem;
        --page-gap: 3rem;
    }
}

@media (min-width: 1024px) {
    :root {
        --container-pad-x: 2.5rem;
        --container-pad-y: 3rem;
        --page-gap: 3.5rem;
    }
}

@media (min-width: 1280px) {
    :root {
        --container-pad-x: 3rem;
        --container-pad-y: 3.5rem;
        --page-gap: 4rem;
    }
}

*,
*::before,
*::after {
    box-sizing: border-box;
    font-family: inherit;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background: var(--background);
}

/* Theme color fade only (150–250ms). No other global transitions. */
html.rh-theme-ready,
html.rh-theme-ready body {
    transition:
        background-color var(--theme-duration) var(--theme-easing),
        color var(--theme-duration) var(--theme-easing);
}

/* Global page container — single column, no sidebar */
.rh-container {
    width: 100%;
    max-width: var(--container-max);
    margin-inline: auto;
    padding-inline: var(--container-pad-x);
}

.rh-page {
    width: 100%;
    max-width: var(--container-max);
    margin-inline: auto;
    padding-inline: var(--container-pad-x);
    padding-block: var(--container-pad-y);
    display: flex;
    flex-direction: column;
    gap: var(--page-gap);
}

/* Public page intro — editorial, not inventory */
.rh-page-intro {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-width: 40rem;
}

.rh-page-intro h1 {
    margin: 0;
    font-size: clamp(1.75rem, 2vw + 1rem, 2.25rem);
    font-weight: var(--font-weight-bold);
    letter-spacing: -0.03em;
    line-height: 1.15;
    color: var(--text);
}

.rh-page-intro .metadata,
.rh-page-intro p {
    margin: 0;
    color: var(--text-muted);
    font-size: 1rem;
    font-weight: var(--font-weight-medium);
    line-height: 1.5;
}

.rh-icon,
i[data-lucide],
svg.rh-icon,
svg.lucide {
    width: var(--icon-size-md);
    height: var(--icon-size-md);
    stroke-width: var(--icon-stroke);
    flex-shrink: 0;
    display: inline-block;
    vertical-align: middle;
    color: currentColor;
}

.rh-icon--sm {
    width: var(--icon-size-sm);
    height: var(--icon-size-sm);
}

.rh-icon--md {
    width: var(--icon-size-md);
    height: var(--icon-size-md);
}

.rh-icon--lg {
    width: var(--icon-size-lg);
    height: var(--icon-size-lg);
}

.rh-icon--xl {
    width: var(--icon-size-xl);
    height: var(--icon-size-xl);
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Public top navigation — minimal + responsive */
.rh-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: color-mix(in srgb, var(--background) 92%, transparent);
    backdrop-filter: blur(8px);
}

.rh-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-height: 4rem;
    padding-block: 0.75rem;
    position: relative;
}

.rh-nav__brand {
    font-family: var(--font-family);
    font-size: 1.125rem;
    font-weight: var(--font-weight-bold);
    letter-spacing: -0.02em;
    color: var(--text);
    text-decoration: none;
    flex-shrink: 0;
    z-index: 1;
}

.rh-nav__brand:hover,
.rh-nav__brand.is-active {
    color: var(--accent);
}

.rh-nav__bar-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    margin-left: auto;
    flex-shrink: 0;
    z-index: 1;
}

.rh-nav__icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--tap-min);
    height: var(--tap-min);
    padding: 0;
    border: 0;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
}

.rh-nav__icon-btn:hover,
.rh-nav__icon-btn.is-active {
    color: var(--text);
}

.rh-nav__search-toggle.is-active {
    color: var(--accent);
}

.rh-nav__menu-icon {
    display: inline-flex;
}

.rh-nav__menu-icon[hidden] {
    display: none;
}

.rh-nav__panel {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex: 1;
    min-width: 0;
}

.rh-nav__links {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex: 1;
    min-width: 0;
}

.rh-nav__link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.55rem;
    border-radius: 0;
    color: var(--text-secondary);
    text-decoration: none;
    font-family: var(--font-family);
    font-size: 0.9375rem;
    font-weight: var(--font-weight-medium);
    white-space: nowrap;
}

.rh-nav__link:hover {
    color: var(--text);
    background: transparent;
}

.rh-nav__link.is-active {
    color: var(--text);
    background: transparent;
}

.rh-nav__search {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    min-width: 0;
    width: 100%;
    max-width: 40rem;
    padding: 0.35rem 0;
    border: 0;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
    background: transparent;
}

.rh-nav__search-label {
    display: inline-flex;
    color: var(--text-muted);
}

.rh-nav__search-input {
    width: 100%;
    min-width: 0;
    flex: 1 1 auto;
    border: 0;
    outline: none;
    background: transparent;
    color: var(--text);
    font-family: var(--font-family);
    font-size: 0.9375rem;
    font-weight: var(--font-weight-medium);
}

.rh-nav__search-input::placeholder {
    color: var(--text-muted);
}

.rh-nav__search-go,
.rh-search-form__submit {
    flex-shrink: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--text-secondary);
    font-family: var(--font-family);
    font-size: 0.875rem;
    font-weight: var(--font-weight-semibold);
    cursor: pointer;
}

.rh-nav__search-go {
    padding: 0.35rem 0.5rem;
}

.rh-nav__search-go:hover,
.rh-search-form__submit:hover {
    color: var(--accent);
}

.rh-nav__theme {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--tap-min);
    height: var(--tap-min);
    padding: 0;
    border: 0;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
}

.rh-nav__theme:hover {
    color: var(--text);
}

.rh-nav__theme-icon {
    display: inline-flex;
}

.rh-nav__theme-icon[hidden] {
    display: none;
}

.rh-nav__header-search {
    padding-bottom: 0.85rem;
}

.rh-nav__header-search[hidden] {
    display: none !important;
}

.rh-nav__header-search:not([hidden]) {
    display: block;
}

/* Mobile / tablet: logo · actions · slide-down menu
   Inline links collide with search/theme until ~1100px. */
@media (max-width: 1099px) {
    .rh-header {
        overflow: visible;
    }

    .rh-nav {
        justify-content: space-between;
        min-height: 3.5rem;
        padding-block: 0.65rem;
        gap: 0.5rem;
    }

    .rh-nav__brand {
        min-width: 0;
        max-width: calc(100% - 7.75rem);
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .rh-nav__panel {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0.25rem;
        margin: 0;
        padding: 0.35rem 0 0.85rem;
        border: 0;
        border-bottom: 1px solid var(--border);
        border-radius: 0;
        background: var(--background);
        box-shadow: none;
        opacity: 1;
        transform: none;
        pointer-events: none;
        z-index: 120;
    }

    .rh-nav__panel.is-open {
        pointer-events: auto;
    }

    .rh-nav__panel[hidden] {
        display: none;
    }

    .rh-nav__panel:not([hidden]) {
        display: flex;
    }

    .rh-nav__links {
        flex-direction: column;
        align-items: stretch;
        gap: 0.15rem;
    }

    .rh-nav__link {
        width: 100%;
        min-height: var(--tap-min);
        padding: 0.75rem 0.15rem;
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .rh-nav__icon-btn,
    .rh-nav__theme {
        width: var(--tap-min);
        height: var(--tap-min);
        flex-shrink: 0;
    }

    .rh-nav__header-search {
        padding-bottom: 0.75rem;
    }

    .rh-nav__search {
        gap: 0.35rem;
        padding: 0.45rem 0;
    }

    .rh-nav__search-go {
        min-height: 2.5rem;
        padding: 0.4rem 0.15rem 0.4rem 0.5rem;
        white-space: nowrap;
    }

    .rh-nav__search-input {
        font-size: 1rem; /* avoid iOS zoom */
    }
}

@media (min-width: 1100px) {
    .rh-nav__menu-toggle {
        display: none !important;
    }

    .rh-nav__panel,
    .rh-nav__panel[hidden] {
        display: flex !important;
        position: static;
        opacity: 1;
        transform: none;
        pointer-events: auto;
        border: 0;
        padding: 0;
        box-shadow: none;
        background: transparent;
    }
}

/* prefers-reduced-motion: instant theme change, no animations */
@media (prefers-reduced-motion: reduce) {
    :root,
    [data-theme="dark"],
    [data-theme="light"] {
        --theme-duration: 0ms;
    }

    *,
    *::before,
    *::after {
        animation: none !important;
        scroll-behavior: auto !important;
    }

    html.rh-theme-ready,
    html.rh-theme-ready body {
        transition: none !important;
    }
}

/* Admin login */
.rh-admin-login {
    min-height: calc(100vh - 2rem);
    justify-content: center;
    align-items: center;
}

.rh-admin-login__card {
    width: 100%;
    max-width: 26rem;
    padding: 2rem;
    border: var(--border-width) solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--card);
}

.rh-admin-login__card h1 {
    margin: 0 0 0.35rem;
    font-size: 1.5rem;
    font-weight: var(--font-weight-bold);
    letter-spacing: -0.02em;
}

.rh-admin-login__meta {
    margin: 0 0 1.5rem;
    color: var(--text-muted);
    font-size: 0.9375rem;
}

.rh-admin-login__error {
    margin: 0 0 1rem;
    padding: 0.75rem 0.9rem;
    border: var(--border-width) solid color-mix(in srgb, var(--danger) 35%, var(--border));
    border-radius: var(--radius-md);
    background: color-mix(in srgb, var(--danger) 12%, var(--card));
    color: var(--danger);
    font-size: 0.9375rem;
    font-weight: var(--font-weight-medium);
}

.rh-admin-login__form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.rh-admin-login__field {
    display: flex;
    flex-direction: column;
    gap: var(--gap-tight);
    font-size: 0.875rem;
    font-weight: var(--font-weight-medium);
    color: var(--text-secondary);
}

.rh-admin-login__field input {
    width: 100%;
    padding: 0.7rem 0.85rem;
    border: var(--border-width) solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
    color: var(--text);
    font-family: var(--font-family);
    font-size: 1rem;
    font-weight: var(--font-weight-regular);
}

.rh-admin-login__field input:focus {
    outline: 2px solid color-mix(in srgb, var(--accent) 55%, transparent);
    outline-offset: 1px;
}

.rh-admin-login__submit,
.rh-form__submit {
    margin-top: 0;
    padding: 0.75rem 1.2rem;
    border: 0;
    border-radius: var(--radius-md);
    background: var(--accent);
    color: var(--on-accent);
    font-family: var(--font-family);
    font-size: 0.9375rem;
    font-weight: var(--font-weight-semibold);
    cursor: pointer;
}

.rh-admin-login__submit {
    margin-top: 0.35rem;
}

.rh-admin-login__submit:hover,
.rh-form__submit:hover {
    filter: brightness(1.05);
}

/* Admin — same product shell as public (no corporate dashboard chrome) */
.rh-admin-body {
    min-height: 100vh;
    color: var(--text);
    background: var(--background);
}

.rh-admin-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-height: 4rem;
    padding-block: 0.75rem;
}

.rh-admin-nav__brand {
    flex-shrink: 0;
    color: var(--text);
    text-decoration: none;
    font-family: var(--font-family);
    font-size: 1.125rem;
    font-weight: var(--font-weight-bold);
    letter-spacing: -0.02em;
    white-space: nowrap;
}

.rh-admin-nav__brand:hover,
.rh-admin-nav__brand.is-active {
    color: var(--accent);
}

.rh-admin-nav__links {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex: 1;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
}

.rh-admin-nav__links::-webkit-scrollbar {
    display: none;
}

.rh-admin-nav__link,
.rh-admin-nav__logout {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.75rem;
    border-radius: 0;
    color: var(--text-secondary);
    text-decoration: none;
    font-family: var(--font-family);
    font-size: 0.9375rem;
    font-weight: var(--font-weight-medium);
    white-space: nowrap;
}

.rh-admin-nav__logout-form {
    margin-left: auto;
    flex-shrink: 0;
}

.rh-admin-nav__link:hover,
.rh-admin-nav__logout:hover {
    color: var(--text);
    background: color-mix(in srgb, var(--surface) 70%, transparent);
}

.rh-admin-nav__link.is-active {
    color: var(--text);
    background: var(--surface);
}

.rh-admin-nav__logout {
    margin-left: 0;
    flex-shrink: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.rh-admin-nav__icon {
    color: currentColor;
    opacity: 0.9;
}

/* Admin page container — same width, padding, and rhythm as public .rh-page */
.rh-admin-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: var(--page-gap);
}

.rh-admin-dashboard-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem 1rem;
    max-width: 40rem;
}

.rh-admin-dashboard-links__item {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    min-height: var(--tap-min);
    padding: 0.35rem 0.15rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-family: var(--font-family);
    font-size: 0.9375rem;
    font-weight: var(--font-weight-semibold);
}

.rh-admin-dashboard-links__item:hover {
    color: var(--accent);
}

@media (max-width: 900px) {
    .rh-admin-nav {
        flex-wrap: wrap;
        gap: 0.75rem 1rem;
        min-height: 0;
    }

    .rh-admin-nav__links {
        order: 3;
        flex: 1 1 100%;
        flex-wrap: wrap;
        overflow-x: visible;
        row-gap: 0.15rem;
    }

    .rh-admin-nav__logout-form {
        margin-left: 0;
    }

    .rh-admin-nav__logout {
        margin-left: 0;
    }
}

@media (max-width: 374px) {
    :root {
        --container-pad-x: 1rem;
        --container-pad-y: 1.5rem;
        --page-gap: 2rem;
    }

    .rh-nav__brand {
        font-size: 1.05rem;
    }
}

/* Shared admin / product forms */
.rh-form {
    width: 100%;
    max-width: 52rem;
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

.rh-form__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.15rem 1.25rem;
}

.rh-form__field {
    display: flex;
    flex-direction: column;
    gap: var(--gap-tight);
    font-size: 0.875rem;
    font-weight: var(--font-weight-medium);
    color: var(--text-secondary);
}

.rh-form__field--full {
    grid-column: 1 / -1;
}

.rh-form__field input,
.rh-form__field select,
.rh-form__field textarea {
    width: 100%;
    padding: 0.7rem 0.85rem;
    border: var(--border-width) solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
    color: var(--text);
    font-family: var(--font-family);
    font-size: 1rem;
    font-weight: var(--font-weight-regular);
    line-height: 1.4;
}

.rh-form__field textarea {
    resize: vertical;
    min-height: 7rem;
}

.rh-form__field input:focus,
.rh-form__field select:focus,
.rh-form__field textarea:focus {
    outline: 2px solid color-mix(in srgb, var(--accent) 55%, transparent);
    outline-offset: 1px;
}

.rh-form__field input::placeholder,
.rh-form__field textarea::placeholder {
    color: var(--text-muted);
}

.rh-form__title-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    align-items: stretch;
}

.rh-form__title-row input {
    flex: 1 1 14rem;
    min-width: 0;
}

.rh-form__generate {
    flex: 0 0 auto;
    min-height: var(--tap-min);
    padding: 0.55rem 1rem;
    border: var(--border-width) solid var(--border);
    border-radius: 0;
    background: var(--surface);
    color: var(--text);
    font-family: var(--font-family);
    font-size: 0.9375rem;
    font-weight: var(--font-weight-semibold);
    cursor: pointer;
}

.rh-form__generate:hover {
    color: var(--accent);
    border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
}

.rh-form__generate:disabled {
    opacity: 0.55;
    cursor: wait;
}

#title-generate-status.is-error {
    color: var(--danger);
}

.rh-form__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.85rem 1.1rem;
}

.rh-form__cancel {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: var(--font-weight-medium);
}

.rh-form__cancel:hover {
    color: var(--text);
}

.rh-form__alert {
    max-width: 52rem;
    padding: 0.85rem 1rem;
    border-radius: var(--radius-md);
    border: var(--border-width) solid var(--border);
}

.rh-form__alert p {
    margin: 0;
}

.rh-form__alert p + p {
    margin-top: 0.35rem;
}

.rh-form__alert--error {
    border-color: color-mix(in srgb, var(--danger) 35%, var(--border));
    background: color-mix(in srgb, var(--danger) 12%, var(--card));
    color: var(--danger);
    font-weight: var(--font-weight-medium);
}

.rh-form__alert-title {
    margin: 0 0 0.45rem;
    font-weight: var(--font-weight-semibold);
}

.rh-form__alert-list {
    margin: 0;
    padding-left: 1.15rem;
}

.rh-form__alert-list li + li {
    margin-top: 0.25rem;
}

.rh-form__req {
    color: var(--danger);
    text-decoration: none;
    font-weight: var(--font-weight-bold);
}

.rh-form__field.has-error input,
.rh-form__field.has-error select,
.rh-form__field.has-error textarea {
    border-color: color-mix(in srgb, var(--danger) 55%, var(--border));
}

.rh-form__error {
    margin: 0;
    color: var(--danger);
    font-size: 0.8125rem;
    font-weight: var(--font-weight-medium);
}

.rh-form__hint {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.8125rem;
    font-weight: var(--font-weight-medium);
}

.rh-form__hint code {
    color: var(--text-secondary);
    font-family: var(--font-family);
    font-weight: var(--font-weight-semibold);
}

.rh-form__hint-note {
    color: var(--text-muted);
    font-weight: var(--font-weight-regular);
}

/* Local poster preview (client-side only; uploads on submit) */
.rh-poster-preview {
    display: flex;
    align-items: flex-end;
    gap: 1rem;
    margin-top: 0.35rem;
}

.rh-poster-preview[hidden] {
    display: none;
}

.rh-poster-preview__frame {
    width: 7.5rem;
    aspect-ratio: 2 / 3;
    border: var(--border-width) solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
    overflow: hidden;
    flex-shrink: 0;
}

.rh-poster-preview__image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: none;
}

.rh-poster-preview__meta {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    min-width: 0;
}

.rh-poster-preview__name {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.8125rem;
    word-break: break-all;
}

.rh-poster-preview__clear {
    align-self: flex-start;
    padding: 0.35rem 0.7rem;
    border: var(--border-width) solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
    color: var(--text-secondary);
    font-family: var(--font-family);
    font-size: 0.8125rem;
    font-weight: var(--font-weight-medium);
    cursor: pointer;
}

.rh-form__check {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--text-secondary);
    font-size: 0.8125rem;
    font-weight: var(--font-weight-medium);
    cursor: pointer;
}

.rh-form__check input {
    width: auto;
    margin: 0;
}

.rh-form__legend {
    display: block;
    margin-bottom: 0.45rem;
    color: var(--text-secondary);
    font-size: 0.8125rem;
    font-weight: var(--font-weight-semibold);
}

/* Titles list */
.rh-titles-heading {
    max-width: none;
    width: 100%;
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.rh-titles-add {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    text-decoration: none;
}

.rh-titles-search {
    width: 100%;
    max-width: 36rem;
}

.rh-titles-search__row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.65rem;
    border: var(--border-width) solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
}

.rh-titles-search__icon {
    color: var(--text-muted);
    flex-shrink: 0;
}

.rh-titles-search__input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: none;
    background: transparent;
    color: var(--text);
    font-family: var(--font-family);
    font-size: 0.95rem;
    font-weight: var(--font-weight-medium);
}

.rh-titles-search__input::placeholder {
    color: var(--text-muted);
}

.rh-titles-search__submit {
    min-height: var(--tap-min);
    padding: 0.4rem 0.75rem;
    border: 0;
    border-radius: var(--radius-md);
    background: var(--accent);
    color: var(--on-accent);
    font-family: var(--font-family);
    font-size: 0.8125rem;
    font-weight: var(--font-weight-semibold);
    cursor: pointer;
}

.rh-titles-search__submit:hover {
    filter: brightness(1.05);
}

.rh-titles-search__clear {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.8125rem;
    font-weight: var(--font-weight-medium);
    white-space: nowrap;
}

.rh-titles-search__clear:hover {
    color: var(--text);
}

.rh-titles-search__count {
    margin: 0;
}

.rh-filters {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    width: 100%;
}

.rh-filters__group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.rh-filters__chip {
    display: inline-flex;
    align-items: center;
    min-height: var(--tap-min);
    padding: 0.35rem 0.15rem;
    border: 0;
    border-bottom: var(--border-width) solid transparent;
    border-radius: 0;
    background: transparent;
    color: var(--text-muted);
    text-decoration: none;
    font-family: var(--font-family);
    font-size: 0.8125rem;
    font-weight: var(--font-weight-semibold);
}

.rh-filters__chip:hover {
    color: var(--text);
}

.rh-filters__chip.is-active {
    color: var(--text);
    border-bottom-color: var(--accent);
    background: transparent;
}

.rh-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding-top: 0.25rem;
}

.rh-pagination__link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: var(--font-weight-semibold);
}

.rh-pagination__link:hover {
    color: var(--accent);
}

.rh-pagination__link.is-disabled {
    color: var(--text-muted);
    opacity: 0.55;
    pointer-events: none;
}

.rh-pagination__status {
    margin: 0;
    min-width: 3.5rem;
    text-align: center;
}

.rh-status--tbd,
.rh-status--announced {
    color: var(--text-muted);
}

.rh-empty {
    padding: 2rem 0;
    color: var(--text-muted);
}

.rh-empty a {
    color: var(--accent);
    font-weight: var(--font-weight-semibold);
    text-decoration: none;
}

.rh-table-wrap {
    width: 100%;
    overflow-x: auto;
    border: var(--border-width) solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--card);
}

.rh-table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--font-family);
    font-size: 0.9375rem;
}

.rh-table th,
.rh-table td {
    padding: 0.85rem 1rem;
    text-align: left;
    vertical-align: middle;
    border-bottom: 1px solid var(--border);
}

.rh-table th {
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: var(--font-weight-semibold);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    background: color-mix(in srgb, var(--surface) 70%, transparent);
}

.rh-table tbody tr:last-child td {
    border-bottom: 0;
}

.rh-titles-table__poster {
    width: 4.5rem;
}

.rh-titles-table__poster-img {
    display: block;
    width: 3rem;
    height: 4.5rem;
    object-fit: cover;
    border-radius: var(--radius-sm);
    border: var(--border-width) solid var(--border);
    background: var(--surface);
}

.rh-titles-table__poster-empty {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 4.5rem;
    border-radius: var(--radius-sm);
    border: var(--border-width) dashed var(--border);
    color: var(--text-muted);
    background: var(--surface);
}

.rh-titles-table__name {
    font-weight: var(--font-weight-semibold);
    color: var(--text);
}

.rh-titles-table__actions {
    white-space: nowrap;
}

.rh-table__delete-form,
.rh-table__favorite-form,
.rh-table__watchlist-form,
.rh-table__watched-form {
    display: inline-flex;
    margin: 0;
    vertical-align: middle;
}

.rh-table__action-btn {
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
    font: inherit;
}

.rh-table__action {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    margin-right: 0.65rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: var(--font-weight-medium);
    font-size: 0.875rem;
}

.rh-table__action:hover {
    color: var(--accent);
}

.rh-table__favorite.is-active {
    color: var(--warning);
}

.rh-table__favorite:hover {
    color: var(--warning);
}

.rh-table__watchlist.is-active {
    color: var(--accent);
}

.rh-table__watchlist:hover {
    color: var(--accent);
}

.rh-table__watched.is-active {
    color: var(--success);
}

.rh-table__watched:hover {
    color: var(--success);
}

.rh-table__action--danger:hover {
    color: var(--danger);
}

.rh-status {
    display: inline-flex;
    align-items: center;
    padding: 0;
    border-radius: 0;
    border: 0;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: var(--font-weight-semibold);
}

.rh-status--upcoming {
    color: var(--accent);
}

.rh-status--released {
    color: var(--success);
}

.rh-status--delayed {
    color: var(--warning);
}

.rh-status--cancelled {
    color: var(--danger);
}

@media (max-width: 820px) {
    .rh-table thead {
        display: none;
    }

    .rh-table,
    .rh-table tbody,
    .rh-table tr,
    .rh-table td {
        display: block;
        width: 100%;
    }

    .rh-table tr {
        padding: 0.85rem 0;
        border-bottom: 1px solid var(--border);
    }

    .rh-table tr:last-child {
        border-bottom: 0;
    }

    .rh-table td {
        display: flex;
        justify-content: space-between;
        gap: 1rem;
        padding: 0.35rem 1rem;
        border-bottom: 0;
    }

    .rh-table td::before {
        content: attr(data-label);
        color: var(--text-muted);
        font-size: 0.75rem;
        font-weight: var(--font-weight-semibold);
        text-transform: uppercase;
        letter-spacing: 0.04em;
    }

    .rh-titles-table__poster {
        width: auto;
    }
}

@media (max-width: 720px) {
    .rh-form__grid {
        grid-template-columns: 1fr;
    }
}

/* Countdown — Manrope, large numbers / small labels, minimal */
.rh-countdown,
.countdown {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0.75rem 1.25rem;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    font-family: var(--font-family);
    color: var(--text);
}

.rh-countdown__unit {
    display: flex;
    min-width: 3.25rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
}

.rh-countdown__value {
    font-family: var(--font-family);
    font-variant-numeric: tabular-nums;
    font-size: clamp(2rem, 4.5vw, 3rem);
    font-weight: var(--font-weight-bold);
    line-height: 1;
    letter-spacing: -0.03em;
    color: var(--text);
}

.rh-countdown__label {
    font-family: var(--font-family);
    font-size: 0.75rem;
    font-weight: var(--font-weight-medium);
    line-height: 1.2;
    letter-spacing: 0;
    text-transform: none;
    color: var(--text-muted);
}

.rh-countdown__released {
    font-family: var(--font-family);
    font-size: clamp(1.15rem, 2.5vw, 1.5rem);
    font-weight: var(--font-weight-semibold);
    letter-spacing: -0.01em;
    line-height: 1.2;
    text-transform: none;
    color: var(--text);
}

.rh-countdown.is-invalid {
    opacity: 0.55;
}

/* Compact countdown — same rules for home + title (tablet/phone) */
@media (max-width: 1099px) {
    .rh-home-next__countdown.rh-countdown,
    .rh-home-next .rh-countdown,
    .rh-title-hero__countdown.rh-countdown,
    .rh-title-hero .rh-countdown {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        width: 100%;
        max-width: 22rem;
        gap: var(--gap-tight) 0.5rem;
    }

    .rh-home-next .rh-countdown__unit,
    .rh-title-hero .rh-countdown__unit {
        min-width: 0;
        width: 100%;
    }

    .rh-home-next .rh-countdown__value,
    .rh-title-hero .rh-countdown__value {
        font-size: clamp(1.45rem, 7vw, 1.85rem);
    }

    .rh-home-next .rh-countdown__label,
    .rh-title-hero .rh-countdown__label {
        font-size: 0.68rem;
        line-height: 1.25;
    }

    .rh-home-next .rh-countdown__released,
    .rh-title-hero .rh-countdown__released {
        font-size: 1.15rem;
    }
}

/* No flash / pulse / blink on tick or complete */
.rh-countdown,
.rh-countdown *,
.countdown,
.countdown * {
    animation: none;
    transition: none;
}

/* ========== Public homepage — media release library ========== */
.rh-home-body {
    overflow-x: hidden;
}

.rh-home {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.rh-home-next {
    position: relative;
    isolation: isolate;
    display: flex;
    min-height: min(92vh, 54rem);
    align-items: center;
    padding-block: clamp(3rem, 8vh, 5.5rem) clamp(2.5rem, 6vh, 4rem);
    background:
        radial-gradient(100% 70% at 85% 15%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 50%),
        var(--background);
    color: var(--text);
    overflow: hidden;
}

.rh-home-next__atmosphere {
    position: absolute;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.rh-home-next__atmosphere img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    filter: blur(28px) saturate(0.85) brightness(0.45);
    opacity: 0.5;
}

.rh-home-next.has-poster::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        linear-gradient(
            180deg,
            color-mix(in srgb, var(--background) 55%, transparent) 0%,
            color-mix(in srgb, var(--background) 82%, transparent) 55%,
            var(--background) 100%
        );
}

.rh-home-next__layout {
    position: relative;
    z-index: 1;
    display: flex;
    width: 100%;
    flex-direction: column;
    gap: clamp(1.5rem, 3vw, 2.25rem);
}

.rh-home-next__brand {
    margin: 0;
    font-size: clamp(2.35rem, 6.5vw, 4.25rem);
    font-weight: var(--font-weight-bold);
    letter-spacing: -0.045em;
    line-height: 0.95;
    color: var(--text);
}

.rh-home-next__feature {
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(1.5rem, 4vw, 2.75rem);
    align-items: end;
}

@media (min-width: 860px) {
    .rh-home-next__feature {
        grid-template-columns: minmax(14rem, 22rem) minmax(0, 1fr);
        align-items: center;
        gap: clamp(2rem, 5vw, 3.5rem);
    }
}

.rh-home-next__poster {
    position: relative;
    width: min(100%, 22rem);
    margin-inline: auto;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: color-mix(in srgb, var(--surface) 70%, var(--background));
}

@media (min-width: 860px) {
    .rh-home-next__poster {
        width: 100%;
        margin-inline: 0;
    }
}

.rh-home-next__poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.rh-home-next__poster-empty {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

.rh-home-next__details {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    max-width: 36rem;
    min-width: 0;
    width: 100%;
}

.rh-home-next__title {
    margin: 0;
    font-size: clamp(1.75rem, 3.6vw, 2.75rem);
    font-weight: var(--font-weight-bold);
    letter-spacing: -0.035em;
    line-height: 1.1;
    color: var(--text);
    overflow-wrap: anywhere;
    word-break: break-word;
}

.rh-home-next__meta {
    margin: 0.15rem 0 0;
    padding: 0;
    font-size: 1.05rem;
    font-weight: var(--font-weight-medium);
    line-height: 1.45;
    color: var(--text-secondary);
}

.rh-home-next__eyebrow {
    margin: 0;
    font-size: 0.85rem;
    font-weight: var(--font-weight-medium);
    color: var(--text-muted);
}

.rh-home-next__countdown {
    margin-top: 0.35rem;
}

.rh-home-next__cta {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.35rem;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--text-secondary);
    font-weight: var(--font-weight-semibold);
    font-size: 0.9rem;
    text-decoration: none;
}

.rh-home-next__cta:hover {
    color: var(--accent);
}

.rh-home-next__empty {
    display: flex;
    max-width: 32rem;
    flex-direction: column;
    gap: 0.75rem;
}

.rh-home-library {
    display: flex;
    flex-direction: column;
    gap: clamp(2.75rem, 6vw, 4.25rem);
    padding-block: clamp(2.25rem, 5vw, 3.5rem) clamp(3rem, 7vw, 5rem);
}

.rh-home-section {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

/* Homepage — phone layout */
@media (max-width: 639px) {
    :root {
        --container-pad-x: 1rem;
    }

    .rh-home-next {
        min-height: 0;
        align-items: flex-start;
        padding-block: 1.75rem 2rem;
        overflow: hidden;
    }

    .rh-home-next__layout {
        gap: 1.25rem;
    }

    .rh-home-next__brand {
        font-size: clamp(1.65rem, 8.5vw, 2.35rem);
        line-height: 1.05;
        max-width: 100%;
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    .rh-home-next__feature {
        gap: 1.25rem;
        align-items: start;
    }

    .rh-home-next__poster {
        width: min(100%, 13.5rem);
    }

    .rh-home-next__details {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        gap: 0.75rem;
    }

    .rh-home-next__title {
        font-size: clamp(1.4rem, 6.2vw, 1.85rem);
        line-height: 1.15;
        max-width: 100%;
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    .rh-home-next__meta,
    .rh-home-next__eyebrow {
        max-width: 100%;
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    .rh-home-next__meta {
        font-size: 0.95rem;
        margin-top: 0;
    }

    .rh-home-next__cta {
        min-height: var(--tap-min);
        padding: 0.35rem 0;
        font-size: 0.95rem;
    }

    .rh-home-library {
        gap: 2.25rem;
        padding-block: 1.75rem 2.75rem;
    }

    .rh-home-section {
        gap: 1rem;
    }

    .rh-home-section__head h2 {
        font-size: 1.15rem;
    }

    .rh-poster-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1rem 0.65rem;
    }

    .rh-poster-card {
        gap: 0.4rem;
    }

    .rh-poster-card__link {
        gap: 0.4rem;
    }

    .rh-poster-card__title {
        font-size: 0.84rem;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        overflow: hidden;
    }

    .rh-poster-card__type,
    .rh-poster-card__date {
        font-size: 0.72rem;
    }

    .rh-week__day-head {
        flex-wrap: wrap;
        gap: 0.25rem 0.5rem;
    }

    .rh-week-row__meta {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

.rh-home-section__head {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    max-width: 36rem;
}

.rh-home-section__head h2 {
    margin: 0;
    font-size: clamp(1.35rem, 2vw + 0.6rem, 1.75rem);
    font-weight: var(--font-weight-bold);
    letter-spacing: -0.03em;
    line-height: 1.2;
    color: var(--text);
}

.rh-home-section__head .metadata {
    margin: 0;
    color: var(--text-muted);
}

.rh-home-empty {
    margin: 0;
}

/* Public poster card — reusable (2:3, object-fit: cover) */
.rh-poster-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem 0.85rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

/* Tablet: 4 columns */
@media (min-width: 768px) {
    .rh-poster-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 1.5rem 1.1rem;
    }
}

/* Desktop: 6 columns when space allows */
@media (min-width: 1200px) {
    .rh-poster-grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
        gap: 1.75rem 1.25rem;
    }
}

.rh-poster-card {
    display: flex;
    height: 100%;
    flex-direction: column;
    gap: 0.55rem;
    min-width: 0;
}

.rh-poster-card__link {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 0.55rem;
    min-width: 0;
    color: inherit;
    text-decoration: none;
}

.rh-poster-card__poster {
    position: relative;
    display: block;
    overflow: hidden;
    width: 100%;
    aspect-ratio: 2 / 3;
    background: color-mix(in srgb, var(--surface) 80%, var(--background));
}

.rh-poster-card__poster img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
}

.rh-poster-card__poster-empty {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

.rh-poster-card__body {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.rh-poster-card__title {
    font-size: var(--card-title-size);
    font-weight: var(--font-weight-semibold);
    letter-spacing: -0.015em;
    line-height: 1.3;
    color: var(--text);
    overflow-wrap: anywhere;
    word-break: break-word;
}

.rh-poster-card__link:hover .rh-poster-card__title,
.rh-poster-card__link:focus-visible .rh-poster-card__title {
    color: var(--accent);
}

.rh-poster-card__type,
.rh-poster-card__date {
    font-size: var(--meta-size);
    font-weight: var(--font-weight-medium);
    color: var(--text-muted);
    overflow-wrap: anywhere;
}

/* This Week — compact chronological day groups */
.rh-week {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
    max-width: 44rem;
}

.rh-week__day {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.rh-week__day-head {
    display: flex;
    align-items: baseline;
    gap: 0.55rem;
    padding-bottom: 0.15rem;
    border-bottom: 0;
}

.rh-week__day-label {
    font-size: 0.95rem;
    font-weight: var(--font-weight-semibold);
    letter-spacing: -0.01em;
    text-transform: none;
    color: var(--text);
}

.rh-week__day-date {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.rh-week__today {
    margin-left: auto;
    font-size: 0.78rem;
    font-weight: var(--font-weight-medium);
    letter-spacing: 0;
    text-transform: none;
    color: var(--accent);
}

.rh-week__list {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.rh-week-row {
    display: grid;
    grid-template-columns: 2.5rem minmax(0, 1fr);
    gap: 0.7rem;
    align-items: center;
    min-height: var(--tap-min);
    padding: 0.35rem 0.15rem;
    color: inherit;
    text-decoration: none;
}

.rh-week-row:hover .rh-week-row__title {
    color: var(--accent);
}

.rh-week-row__poster {
    display: block;
    overflow: hidden;
    width: 2.5rem;
    aspect-ratio: 2 / 3;
    background: color-mix(in srgb, var(--surface) 80%, var(--background));
}

.rh-week-row__poster img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rh-week-row__poster-empty {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

.rh-week-row__main {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 0.1rem;
}

.rh-week-row__title {
    font-size: var(--card-title-size);
    font-weight: var(--font-weight-semibold);
    letter-spacing: -0.01em;
    line-height: 1.25;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rh-week-row__meta {
    display: block;
    font-size: var(--meta-size);
    color: var(--text-muted);
}

/* Public title detail — /title.php?slug=... */
.rh-title-page {
    gap: clamp(2rem, 4vw, 3rem);
}

.rh-title-page code {
    font-family: var(--font-family);
    font-size: 0.92em;
    color: var(--text-secondary);
}

.rh-title-page__back {
    color: var(--text-secondary);
    font-weight: var(--font-weight-semibold);
    text-decoration: none;
    border-bottom: 0;
}

.rh-title-page__back:hover {
    color: var(--accent);
}

/* Title hero — large poster left, info right (desktop) */
.rh-title-hero {
    position: relative;
    isolation: isolate;
    margin-inline: calc(-1 * var(--container-pad-x));
    padding: clamp(1.5rem, 4vw, 2.5rem) var(--container-pad-x);
    overflow: hidden;
}

.rh-title-hero__atmosphere {
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

.rh-title-hero__atmosphere img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(36px) saturate(0.8) brightness(0.4);
    opacity: 0.45;
}

.rh-title-hero.has-poster::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background: linear-gradient(
        180deg,
        color-mix(in srgb, var(--background) 55%, transparent) 0%,
        color-mix(in srgb, var(--background) 88%, transparent) 70%,
        var(--background) 100%
    );
}

.rh-title-hero__layout {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-areas:
        "poster"
        "info";
    gap: clamp(1.5rem, 4vw, 2.5rem);
    align-items: start;
    max-width: var(--container-max);
    margin-inline: auto;
}

.rh-title-hero__poster {
    grid-area: poster;
    width: min(100%, 22rem);
    margin-inline: auto;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: color-mix(in srgb, var(--surface) 75%, var(--background));
}

.rh-title-hero__info {
    grid-area: info;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.1rem;
    max-width: 38rem;
    width: 100%;
    min-width: 0;
    padding-bottom: 0.25rem;
}

@media (min-width: 900px) {
    .rh-title-hero__layout {
        grid-template-columns: minmax(16rem, 24rem) minmax(0, 1fr);
        grid-template-areas: "poster info";
        gap: clamp(2.25rem, 5vw, 4rem);
        align-items: end;
    }

    .rh-title-hero__poster {
        width: 100%;
        max-width: 24rem;
        margin-inline: 0;
    }
}

.rh-title-hero__poster img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rh-title-hero__poster-empty {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

.rh-title-hero__title {
    margin: 0;
    font-size: clamp(2rem, 4.5vw, 3.25rem);
    font-weight: var(--font-weight-bold);
    letter-spacing: -0.04em;
    line-height: 1.05;
    color: var(--text);
    overflow-wrap: anywhere;
    word-break: break-word;
}

.rh-title-hero__meta {
    margin: 0;
    padding: 0;
    font-size: 1.05rem;
    font-weight: var(--font-weight-medium);
    line-height: 1.45;
    color: var(--text-secondary);
    overflow-wrap: anywhere;
    word-break: break-word;
}

.rh-title-hero__status-block {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    min-height: 2.5rem;
    margin-top: 0.25rem;
    max-width: 100%;
}

.rh-title-hero__status {
    font-size: 0.8rem;
}

/* Description — open prose, no card chrome */
.rh-title-description {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    max-width: 38rem;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
}

.rh-title-description__heading,
.rh-title-rating__heading,
.rh-title-review__heading,
.rh-title-info__heading,
.rh-title-trailer__heading {
    margin: 0;
    font-family: var(--font-family);
    font-size: 1.05rem;
    font-weight: var(--font-weight-semibold);
    letter-spacing: -0.02em;
    text-transform: none;
    color: var(--text);
}

.rh-title-description__body {
    margin: 0;
    padding: 0;
}

.rh-title-description__body p {
    margin: 0;
    font-family: var(--font-family);
    font-size: clamp(1.05rem, 0.4vw + 1rem, 1.175rem);
    font-weight: var(--font-weight-regular);
    line-height: 1.7;
    letter-spacing: -0.01em;
    color: var(--text-secondary);
    overflow-wrap: anywhere;
    word-break: break-word;
}

.rh-title-description__body p + p {
    margin-top: 1em;
}

/* Personal rating — not an official score */
.rh-title-rating {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    max-width: 22rem;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
}

.rh-title-rating__score {
    display: flex;
    align-items: baseline;
    gap: 0.35rem;
    margin: 0;
    font-family: var(--font-family);
    line-height: 1;
}

.rh-title-rating__value {
    font-size: clamp(1.75rem, 2vw + 1rem, 2.15rem);
    font-weight: var(--font-weight-bold);
    letter-spacing: -0.03em;
    color: var(--text);
}

.rh-title-rating__scale {
    font-size: 1rem;
    font-weight: var(--font-weight-medium);
    color: var(--text-muted);
}

/* Personal review — typography-focused */
.rh-title-review {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    max-width: 38rem;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
}

.rh-title-review__body {
    margin: 0;
    padding: 0;
}

.rh-title-review__body p {
    margin: 0;
    font-family: var(--font-family);
    font-size: clamp(1.05rem, 0.4vw + 1rem, 1.175rem);
    font-weight: var(--font-weight-regular);
    line-height: 1.7;
    letter-spacing: -0.01em;
    color: var(--text-secondary);
    overflow-wrap: anywhere;
    word-break: break-word;
}

.rh-title-review__body p + p {
    margin-top: 1em;
}

/* Extra title details — prose line */
.rh-title-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-width: 38rem;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
}

.rh-title-info__line {
    margin: 0;
    font-size: 1rem;
    font-weight: var(--font-weight-medium);
    line-height: 1.5;
    color: var(--text-secondary);
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* YouTube trailer embed — only when URL exists; no autoplay; 16:9 */
.rh-title-trailer {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    width: 100%;
    max-width: 44rem;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
}

.rh-title-trailer__media {
    width: 100%;
    max-width: 100%;
}

.rh-title-trailer__frame {
    position: relative;
    width: 100%;
    max-width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: color-mix(in srgb, var(--surface) 80%, var(--background));
}

.rh-title-trailer__frame iframe {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}

.rh-title-trailer__link-wrap {
    margin: 0;
}

/* Title detail — phone: poster first, info below */
@media (max-width: 899px) {
    .rh-title-page {
        gap: 1.75rem;
    }

    .rh-title-hero {
        padding-block: 1.25rem 1.5rem;
    }

    .rh-title-hero__layout {
        grid-template-columns: 1fr;
        grid-template-areas:
            "poster"
            "info";
        gap: 1.25rem;
        align-items: start;
    }

    .rh-title-hero__poster {
        width: min(100%, 14.5rem);
        margin-inline: auto;
        order: 0;
    }

    .rh-title-hero__info {
        width: 100%;
        max-width: 100%;
        gap: 0.75rem;
        order: 1;
    }

    .rh-title-hero__title {
        font-size: clamp(1.55rem, 6.5vw, 2rem);
        line-height: 1.12;
    }

    .rh-title-hero__meta {
        font-size: 0.95rem;
    }

    .rh-title-description,
    .rh-title-rating,
    .rh-title-review,
    .rh-title-info,
    .rh-title-trailer {
        width: 100%;
        max-width: 100%;
    }

    .rh-title-description__heading,
    .rh-title-rating__heading,
    .rh-title-review__heading,
    .rh-title-info__heading,
    .rh-title-trailer__heading {
        font-size: 1.05rem;
    }

    .rh-title-rating {
        gap: 0.45rem;
    }

    .rh-title-rating__value {
        font-size: clamp(2rem, 8vw, 2.35rem);
    }

    .rh-title-rating__scale {
        font-size: 1.05rem;
    }

    .rh-title-description__body p,
    .rh-title-review__body p {
        font-size: 1.0625rem;
        line-height: 1.7;
    }

    .rh-title-info__line {
        font-size: 0.95rem;
        line-height: 1.55;
    }

    .rh-title-trailer__frame {
        aspect-ratio: 16 / 9;
        width: 100%;
    }

    .rh-title-trailer__link-wrap a {
        display: inline-flex;
        min-height: 2.5rem;
        align-items: center;
    }
}

/* Public search — /search.php */
.rh-search-page {
    gap: clamp(1.5rem, 3vw, 2.25rem);
}

.rh-search-intro {
    max-width: 36rem;
}

.rh-search-form {
    width: 100%;
    max-width: 40rem;
}

.rh-search-form__row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.55rem;
    padding: 0.25rem 0;
    border: 0;
    border-bottom: 1px solid var(--border);
    background: transparent;
}

.rh-search-form__input {
    width: 100%;
    min-width: 0;
    padding: 0.65rem 0.25rem;
    border: 0;
    background: transparent;
    color: var(--text);
    font-family: var(--font-family);
    font-size: 1rem;
    font-weight: var(--font-weight-medium);
}

.rh-search-form__input:focus {
    outline: none;
}

.rh-search-form__row:focus-within {
    border-color: var(--accent);
}

.rh-search-form__submit {
    padding: 0.65rem 0.15rem 0.65rem 0.85rem;
    min-height: var(--tap-min);
}

.rh-search-empty {
    margin: 0;
}

.rh-search-results {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.rh-search-results__head {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.rh-search-results__head h2 {
    margin: 0;
    font-size: clamp(1.2rem, 1.5vw + 0.7rem, 1.5rem);
    font-weight: var(--font-weight-bold);
    letter-spacing: -0.02em;
    color: var(--text);
}

.rh-search-results__head .metadata {
    margin: 0;
}

/* Public browse — /browse.php */
.rh-browse-page {
    gap: clamp(1.5rem, 3vw, 2.25rem);
}

.rh-browse-intro {
    max-width: 36rem;
}

.rh-browse-facets {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    max-width: 42rem;
}

.rh-browse-facets__row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem 1rem;
}

.rh-browse-facets__row--quiet {
    gap: 0.45rem 0.85rem;
}

.rh-browse-facets__link {
    display: inline-flex;
    align-items: center;
    min-height: var(--tap-min);
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: var(--font-weight-medium);
}

.rh-browse-facets__row--quiet .rh-browse-facets__link {
    font-size: 0.85rem;
}

.rh-browse-facets__link:hover {
    color: var(--text);
}

.rh-browse-facets__link.is-active {
    color: var(--text);
    text-decoration: underline;
    text-underline-offset: 0.22em;
}

.rh-browse-facets__more {
    margin: 0;
}

.rh-browse-facets__more > summary {
    cursor: pointer;
    list-style: none;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: var(--font-weight-medium);
}

.rh-browse-facets__more > summary::-webkit-details-marker {
    display: none;
}

.rh-browse-facets__more[open] > summary {
    margin-bottom: 0.65rem;
    color: var(--text-secondary);
}

.rh-browse-facets__more .rh-browse-facets__row {
    margin-bottom: 0.55rem;
}

.rh-browse-empty {
    margin: 0;
}

.rh-browse-grid {
    width: 100%;
}

/* Public favorites — /favorites.php */
.rh-favorites-page {
    gap: clamp(1.5rem, 3vw, 2.25rem);
}

.rh-favorites-intro {
    max-width: 36rem;
}

.rh-favorites-grid {
    width: 100%;
}

/* Public watchlist — /watchlist.php */
.rh-watchlist-page {
    gap: clamp(1.5rem, 3vw, 2.25rem);
}

.rh-watchlist-intro {
    max-width: 36rem;
}

.rh-watchlist-grid {
    width: 100%;
}

/* Public watched — /watched.php */
.rh-watched-page {
    gap: clamp(1.5rem, 3vw, 2.25rem);
}

.rh-watched-intro {
    max-width: 36rem;
}

.rh-watched-grid {
    width: 100%;
}

/* Public calendar — /calendar.php */
.rh-calendar-page {
    display: flex;
    flex-direction: column;
    gap: clamp(1.35rem, 2.5vw, 2rem);
}

.rh-calendar-intro {
    max-width: 36rem;
}

.rh-cal {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
    max-width: 42rem;
}

.rh-cal__head {
    display: grid;
    grid-template-columns: 2.75rem minmax(0, 1fr) 2.75rem;
    align-items: center;
    gap: 0.5rem;
}

.rh-cal__today-wrap {
    display: flex;
    justify-content: center;
    margin: 0;
}

.rh-cal__month {
    margin: 0;
    font-size: 1.15rem;
    font-weight: var(--font-weight-semibold);
    letter-spacing: -0.02em;
    line-height: 1.2;
    color: var(--text);
    text-align: center;
    overflow-wrap: anywhere;
}

.rh-cal__nav,
.rh-cal__today {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    margin: 0;
    font: inherit;
    cursor: pointer;
    color: var(--text-secondary);
    border: 0;
    border-radius: 0;
    background: transparent;
}

.rh-cal__nav {
    width: var(--tap-min);
    height: var(--tap-min);
    padding: 0;
    flex-shrink: 0;
}

.rh-cal__today {
    min-height: var(--tap-min);
    height: auto;
    padding: 0.35rem 0.5rem;
    font-size: 0.875rem;
    font-weight: var(--font-weight-medium);
    letter-spacing: 0;
    text-decoration: underline;
    text-underline-offset: 0.2em;
}

.rh-cal__nav:hover,
.rh-cal__today:hover:not(:disabled) {
    color: var(--text);
}

.rh-cal__today:disabled {
    cursor: default;
    color: var(--accent);
    opacity: 1;
}

.rh-cal__noscript {
    margin: 0;
    text-align: center;
}

.rh-cal__noscript a {
    color: var(--text-secondary);
}

.rh-cal__noscript a:hover {
    color: var(--accent);
}

.rh-cal__weekdays,
.rh-cal__grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.2rem;
    width: 100%;
}

.rh-cal__weekday {
    text-align: center;
    font-size: 0.8rem;
    font-weight: var(--font-weight-medium);
    letter-spacing: 0;
    text-transform: none;
    color: var(--text-muted);
    padding-block: 0.35rem;
}

.rh-cal__cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    min-height: 3.25rem;
    padding: 0.4rem 0.1rem;
    color: var(--text-secondary);
    text-decoration: none;
    border: 0;
    border-radius: 0;
    background: transparent;
    -webkit-tap-highlight-color: transparent;
}

.rh-cal__cell.is-empty {
    pointer-events: none;
    min-height: 3.25rem;
}

.rh-cal__cell:hover {
    color: var(--text);
    background: transparent;
}

.rh-cal__cell.is-today {
    color: var(--accent);
}

.rh-cal__cell.is-selected {
    color: var(--text);
    background: color-mix(in srgb, var(--text) 8%, transparent);
}

.rh-cal__cell.is-selected.is-today {
    color: var(--accent);
}

.rh-cal__day {
    font-size: 1rem;
    font-weight: var(--font-weight-semibold);
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.rh-cal__indicators {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.18rem;
    min-height: 0.4rem;
}

.rh-cal__indicators--empty {
    visibility: hidden;
}

.rh-cal__dot {
    width: 0.35rem;
    height: 0.35rem;
    border-radius: 50%;
    background: var(--text-muted);
}

.rh-cal__cell.has-releases .rh-cal__dot {
    background: var(--accent);
}

/* Selected day releases — always below the month grid */
.rh-cal-day {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    width: 100%;
    max-width: 42rem;
}

.rh-cal-day__head {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.rh-cal-day__head h2 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: var(--font-weight-bold);
    letter-spacing: -0.02em;
    color: var(--text);
    overflow-wrap: anywhere;
}

.rh-cal-day__head .metadata {
    margin: 0;
}

.rh-cal-day__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.rh-cal-day__item {
    display: grid;
    grid-template-columns: 3.5rem minmax(0, 1fr);
    align-items: start;
    gap: 0.85rem;
    padding: 0.45rem 0;
    color: inherit;
    text-decoration: none;
    border: 0;
    border-radius: 0;
}

.rh-cal-day__item:hover {
    background: transparent;
}

.rh-cal-day__item:hover .rh-cal-day__title {
    color: var(--accent);
}

.rh-cal-day__poster {
    width: 3.5rem;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 0;
    background: color-mix(in srgb, var(--surface) 80%, var(--background));
    border: 0;
}

.rh-cal-day__poster img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rh-cal-day__poster-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: var(--text-muted);
}

.rh-cal-day__body {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
    padding-block: 0.1rem;
}

.rh-cal-day__title {
    font-size: var(--card-title-size);
    font-weight: var(--font-weight-semibold);
    line-height: 1.25;
    color: var(--text);
    overflow-wrap: anywhere;
    word-break: break-word;
}

.rh-cal-day__meta {
    display: block;
    margin: 0;
    font-size: var(--meta-size);
    font-weight: var(--font-weight-medium);
    line-height: 1.4;
    color: var(--text-muted);
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* Calendar — phone: usable tap targets, readable dates */
@media (max-width: 639px) {
    .rh-calendar-page {
        gap: 1.75rem;
    }

    .rh-cal {
        max-width: 100%;
        gap: 0.85rem;
    }

    .rh-cal__month {
        font-size: 1.05rem;
    }

    .rh-cal__weekdays,
    .rh-cal__grid {
        gap: 0.15rem;
    }

    .rh-cal__weekday {
        font-size: 0.75rem;
        padding-block: 0.4rem;
    }

    .rh-cal__cell,
    .rh-cal__cell.is-empty {
        min-height: 3.5rem; /* ~56px — usable tap target */
        padding: 0.45rem 0.05rem;
        gap: 0.3rem;
    }

    .rh-cal__day {
        font-size: 1.05rem; /* readable day numbers */
    }

    .rh-cal__dot {
        width: 0.4rem;
        height: 0.4rem;
    }

    .rh-cal-day {
        max-width: 100%;
        gap: 1rem;
        padding-top: 0.35rem;
        border-top: 1px solid var(--border);
    }

    .rh-cal-day__head h2 {
        font-size: 1.1rem;
    }

    .rh-cal-day__item {
        grid-template-columns: 3.25rem minmax(0, 1fr);
        gap: 0.75rem;
        padding: 0.6rem 0;
    }

    .rh-cal-day__poster {
        width: 3.25rem;
    }

    .rh-cal-day__title {
        font-size: 1rem;
    }

    .rh-cal-day__meta {
        font-size: 0.8125rem;
    }
}

@media (min-width: 640px) {
    .rh-cal__weekdays,
    .rh-cal__grid {
        gap: 0.25rem;
    }

    .rh-cal__cell,
    .rh-cal__cell.is-empty {
        min-height: 3.5rem;
        padding: 0.5rem 0.2rem;
    }

    .rh-cal__day {
        font-size: 1.05rem;
    }
}

/* Public timeline — /timeline.php */
.rh-timeline-page {
    gap: clamp(1.35rem, 2.5vw, 2rem);
}

.rh-timeline-intro {
    max-width: 36rem;
}

.rh-timeline {
    display: flex;
    flex-direction: column;
    gap: clamp(1.5rem, 3vw, 2.25rem);
    max-width: 42rem;
}

.rh-timeline__day {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.rh-timeline__day-head {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding-bottom: 0.25rem;
    border-bottom: 0;
}

.rh-timeline__day.is-today .rh-timeline__day-head {
    border-bottom-color: transparent;
}

.rh-timeline__date {
    margin: 0;
    font-size: 1.05rem;
    font-weight: var(--font-weight-bold);
    letter-spacing: -0.02em;
    line-height: 1.2;
    color: var(--text);
}

.rh-timeline__weekday {
    margin: 0;
    font-size: 0.85rem;
}

.rh-timeline__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.rh-timeline__item {
    display: grid;
    grid-template-columns: 4rem minmax(0, 1fr);
    align-items: start;
    gap: 0.85rem;
    padding: 0.5rem 0;
    color: inherit;
    text-decoration: none;
    border: 0;
    border-radius: 0;
}

.rh-timeline__item:hover {
    background: transparent;
}

.rh-timeline__item:hover .rh-timeline__title {
    color: var(--accent);
}

.rh-timeline__poster {
    width: 4rem;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 0;
    background: color-mix(in srgb, var(--surface) 80%, var(--background));
    border: 0;
}

.rh-timeline__poster img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rh-timeline__poster-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: var(--text-muted);
}

.rh-timeline__body {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
    padding-block: 0.05rem;
}

.rh-timeline__title {
    font-size: var(--card-title-size);
    font-weight: var(--font-weight-semibold);
    line-height: 1.25;
    color: var(--text);
}

.rh-timeline__meta {
    display: block;
    margin: 0;
    font-size: var(--meta-size);
    font-weight: var(--font-weight-medium);
    line-height: 1.4;
    color: var(--text-muted);
}

.rh-timeline-empty {
    margin: 0;
}

.rh-timeline-empty a {
    color: var(--text-secondary);
}

.rh-timeline-empty a:hover {
    color: var(--accent);
}

