.sh-wrap {
    max-width: 1100px;
    margin: 0 auto;
    padding: 18px 16px 56px;
}

.sh-head {
    display: grid;
    gap: 8px;
    margin-bottom: 12px;
    padding: 14px;
    border: 1px solid rgba(255, 183, 212, 0.2);
    border-radius: 14px;
    background:
        radial-gradient(circle at 92% 8%, rgba(255, 119, 171, 0.14), transparent 34%),
        linear-gradient(145deg, rgba(90, 29, 58, 0.78), rgba(48, 17, 35, 0.9));
}

.sh-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
    color: #707a84;
    font-size: 0.74rem;
    font-weight: 750;
}

.sh-breadcrumb a {
    color: #8a4c54;
    text-decoration: none;
}

.sh-breadcrumb a:hover,
.sh-breadcrumb a:focus-visible {
    color: #c54f62;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.sh-breadcrumb a:focus-visible {
    outline: 2px solid #ff9bc1;
    outline-offset: 2px;
}

.sh-title {
    margin: 0;
    color: #fff;
    font-size: clamp(1.45rem, 3vw, 1.75rem);
    line-height: 1.08;
}

.sh-sub,
.sh-context {
    max-width: 780px;
    margin: 0;
    color: #f4d2e2;
    font-size: 0.86rem;
    line-height: 1.42;
}

.sh-context-secondary {
    color: rgba(255, 222, 236, 0.76);
    font-size: 0.79rem;
}

.sh-kpis,
.sh-links {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.sh-kpi {
    display: inline-flex;
    min-height: 30px;
    align-items: center;
    padding: 0 10px;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 999px;
    color: #ffe8f1;
    background: rgba(38, 12, 27, 0.46);
    font-size: 0.75rem;
    font-weight: 850;
}

.sh-find {
    position: relative;
    max-width: 560px;
}

.sh-find input {
    width: 100%;
    min-height: 46px;
    border: 1px solid rgba(255, 255, 255, 0.19);
    border-radius: 10px;
    background: rgba(38, 12, 27, 0.72);
    color: #fff;
    padding: 0 84px 0 13px;
    font: inherit;
    font-size: 0.86rem;
    font-weight: 700;
}

.sh-find input::placeholder {
    color: rgba(255, 231, 241, 0.62);
}

.sh-find input:focus-visible {
    outline: 2px solid #ff9bc1;
    outline-offset: 2px;
}

.sh-clear {
    position: absolute;
    top: 1px;
    right: 1px;
    min-width: 72px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 9px;
    color: #fff;
    background: #8f3d64;
    padding: 0 11px;
    font: inherit;
    font-size: 0.75rem;
    font-weight: 900;
    cursor: pointer;
}

.sh-clear[hidden] {
    display: none;
}

.sh-links a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    border: 1px solid #ae6789;
    border-radius: 999px;
    color: #ffe3ef;
    background: rgba(91, 29, 57, 0.54);
    text-decoration: none;
    font-size: 0.78rem;
    font-weight: 850;
}

.sh-links-primary a:first-child {
    border-color: transparent;
    color: #fff;
    background: linear-gradient(135deg, #e95a94, #d95476);
}

.sh-links a:hover,
.sh-links a:focus-visible {
    border-color: #ffd1e3;
    color: #fff;
    background: rgba(126, 53, 83, 0.9);
}

.sh-links a:focus-visible,
.sh-card:focus-visible,
.sh-path-card:focus-visible,
.sh-mini a:focus-visible,
.sh-clear:focus-visible {
    outline: 2px solid #ff9bc1;
    outline-offset: 2px;
}

.sh-grid-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 8px;
}

.sh-grid-head h2 {
    margin: 0;
    color: #fff;
    font-size: 1rem;
    line-height: 1.25;
}

.sh-grid-head span {
    flex: 0 0 auto;
    color: #f6cadf;
    font-size: 0.76rem;
    font-weight: 850;
}

.sh-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 9px;
}

.sh-card {
    min-width: 0;
    display: flex;
    flex-direction: column;
    padding: 7px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 11px;
    color: inherit;
    background: linear-gradient(145deg, rgba(101, 35, 65, 0.94), rgba(58, 20, 42, 0.94));
    text-decoration: none;
    content-visibility: auto;
    contain-intrinsic-size: 1px 216px;
    transition: border-color 140ms ease, transform 140ms ease, background-color 140ms ease;
}

.sh-card:hover,
.sh-card:focus-visible {
    border-color: rgba(255, 180, 211, 0.76);
    background: linear-gradient(145deg, rgba(123, 45, 79, 0.98), rgba(73, 24, 51, 0.97));
    transform: translateY(-1px);
}

.sh-card[hidden] {
    display: none !important;
}

.sh-card img {
    display: block;
    width: 100%;
    height: 132px;
    border-radius: 8px;
    object-fit: cover;
    object-position: center 28%;
    background: #321326;
}

.sh-name {
    margin-top: 7px;
    overflow: hidden;
    color: #fff;
    font-size: 0.86rem;
    font-weight: 900;
    line-height: 1.18;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sh-meta {
    margin-top: 3px;
    overflow: hidden;
    color: #efc6da;
    font-size: 0.7rem;
    font-weight: 750;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sh-state {
    align-self: flex-start;
    min-height: 23px;
    display: inline-flex;
    align-items: center;
    margin-top: 7px;
    padding: 0 8px;
    border: 1px solid rgba(255, 207, 227, 0.25);
    border-radius: 999px;
    color: #ffeaf3;
    background: rgba(31, 10, 23, 0.55);
    font-size: 0.65rem;
    font-weight: 900;
    line-height: 1;
}

.sh-empty-search {
    display: none;
    margin: 10px 0 0;
    color: #f4d2e2;
    font-size: 0.84rem;
}

.sh-empty-search.is-visible {
    display: block;
}

.sh-links-secondary {
    margin: 14px 0 0;
}

.sh-links-secondary a {
    color: #f7d5e5;
    background: rgba(61, 20, 43, 0.58);
}

.sh-paths {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 9px;
    margin-top: 16px;
}

.sh-path-card {
    min-width: 0;
    min-height: 82px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    padding: 11px 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 11px;
    color: #eec9da;
    background: rgba(64, 22, 45, 0.62);
    text-decoration: none;
    font-size: 0.75rem;
    line-height: 1.35;
}

.sh-path-card strong {
    color: #fff;
    font-size: 0.85rem;
}

.sh-path-card:hover,
.sh-path-card:focus-visible {
    border-color: rgba(255, 180, 211, 0.72);
    color: #ffe8f1;
    background: rgba(91, 31, 61, 0.84);
}

.sh-subgrid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 18px;
}

.sh-mini {
    min-width: 0;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    background: rgba(49, 17, 36, 0.58);
}

.sh-mini h3 {
    margin: 0 0 6px;
    color: #fff;
    font-size: 0.9rem;
}

.sh-mini a {
    min-height: 44px;
    display: flex;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: #f1cadd;
    text-decoration: none;
    font-size: 0.76rem;
    font-weight: 750;
}

.sh-mini a:hover,
.sh-mini a:focus-visible {
    color: #fff;
}

@media (max-width: 990px) {
    .sh-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .sh-paths {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    .sh-wrap {
        padding: 10px 10px 44px;
    }

    .sh-head {
        gap: 7px;
        margin-bottom: 10px;
        padding: 11px;
        border-radius: 12px;
    }

    .sh-title {
        font-size: 1.4rem;
    }

    .sh-sub {
        font-size: 0.8rem;
        line-height: 1.35;
    }

    .sh-context {
        display: none;
    }

    .sh-kpis {
        gap: 5px;
    }

    .sh-kpi {
        min-height: 27px;
        padding: 0 8px;
        font-size: 0.67rem;
    }

    .sh-find input {
        min-height: 46px;
        font-size: 0.8rem;
    }

    .sh-clear {
        min-height: 44px;
    }

    .sh-links {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 6px;
    }

    .sh-links a {
        width: 100%;
        padding: 0 7px;
        border-radius: 9px;
        font-size: 0.69rem;
        line-height: 1.15;
        text-align: center;
    }

    .sh-grid-head {
        margin-bottom: 7px;
    }

    .sh-grid-head h2 {
        font-size: 0.9rem;
    }

    .sh-grid-head span {
        font-size: 0.69rem;
    }

    .sh-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 7px;
    }

    .sh-card {
        padding: 6px;
        contain-intrinsic-size: 1px 208px;
    }

    .sh-card img {
        height: 128px;
    }

    .sh-name {
        font-size: 0.81rem;
    }

    .sh-meta {
        font-size: 0.65rem;
    }

    .sh-state {
        margin-top: 6px;
        font-size: 0.62rem;
    }

    .sh-links-secondary {
        margin-top: 12px;
    }

    .sh-paths,
    .sh-subgrid {
        grid-template-columns: 1fr;
    }

    .sh-paths {
        gap: 7px;
        margin-top: 14px;
    }

    .sh-path-card {
        min-height: 72px;
    }
}

/* Friendly series detail hub. */
.sh-wrap {
    color: var(--text);
}

.sh-head {
    border: 1px solid #eadfd9;
    border-left: 4px solid #ff7568;
    border-radius: 16px;
    background: linear-gradient(135deg, #fff, #fff5f1);
    box-shadow: 0 14px 34px rgba(88, 62, 52, 0.07);
}

.sh-title,
.sh-name,
.sh-grid-head h2,
.sh-mini h2,
.sh-path-card strong {
    color: #242b32;
}

.sh-title {
    font-size: clamp(2rem, 5vw, 3.45rem);
    letter-spacing: -0.055em;
}

.sh-meta,
.sh-sub,
.sh-context,
.sh-context-primary,
.sh-context-secondary {
    color: #707a84;
}

.sh-kpi,
.sh-find input,
.sh-clear,
.sh-links a,
.sh-state {
    border-color: #eadfd9;
    border-radius: 10px;
    background: #fff;
    color: #59636d;
}

.sh-find input {
    color: #242b32;
}

.sh-links-primary a:first-child {
    border-color: #ef6257;
    background: linear-gradient(180deg, #ff7b6e, #ef6257);
    color: #fff;
}

.sh-card {
    border-color: #eadfd9;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 11px 28px rgba(88, 62, 52, 0.07);
}

.sh-card:hover,
.sh-card:focus-visible {
    border-color: #f4b1a6;
    background: #fffaf7;
}

.sh-card img {
    border-radius: 10px;
    background: #f4ede8;
}

.sh-path-card,
.sh-mini {
    border-color: #eadfd9;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 10px 26px rgba(88, 62, 52, 0.06);
}

@media (max-width: 620px) {
    .sh-context-primary {
        color: #707a84;
    }
}

/* Public-safe Series guide: text-first context, no mature gallery media. */
.sh-public-shell {
    color: var(--zb-ink, #20262e);
}

.sh-public-breadcrumb {
    display: flex;
    min-width: 0;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
    margin: 2px 0 16px;
    color: var(--zb-muted, #68727c);
    font-size: 0.76rem;
    font-weight: 800;
}

.sh-public-breadcrumb a {
    color: #8a4c54;
    text-decoration: none;
}

.sh-public-breadcrumb a:hover,
.sh-public-breadcrumb a:focus-visible {
    color: #c54f62;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.sh-public-breadcrumb a:focus-visible,
.sh-public-actions a:focus-visible,
.sh-public-related a:focus-visible,
.sh-public-final > a:focus-visible,
.sh-not-found a:focus-visible {
    outline: 3px solid #ff9bc1;
    outline-offset: 3px;
}

.sh-public-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(260px, 0.58fr);
    gap: clamp(24px, 5vw, 64px);
    align-items: end;
    padding: clamp(24px, 5vw, 56px) 0;
    border-block: 1px solid var(--zb-line, #eadfd9);
}

.sh-public-copy {
    min-width: 0;
}

.sh-public-eyebrow {
    margin: 0 0 8px;
    color: #c54f62;
    font-size: 0.72rem;
    font-weight: 950;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.sh-public-copy h1 {
    max-width: 850px;
    margin: 0;
    color: var(--zb-ink, #20262e);
    font-size: clamp(2.6rem, 8vw, 6.8rem);
    letter-spacing: -0.07em;
    line-height: 0.9;
    overflow-wrap: anywhere;
}

.sh-public-copy > p:not(.sh-public-eyebrow) {
    max-width: 720px;
    margin: 18px 0 0;
    color: var(--zb-muted, #68727c);
    font-size: clamp(0.96rem, 1.8vw, 1.12rem);
    line-height: 1.62;
}

.sh-public-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 24px;
}

.sh-public-actions a,
.sh-public-final > a {
    display: inline-flex;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    padding: 10px 15px;
    border: 1px solid var(--zb-line, #eadfd9);
    border-radius: 11px;
    background: var(--zb-paper, #fff);
    color: #8a4c54;
    font-size: 0.8rem;
    font-weight: 900;
    text-decoration: none;
}

.sh-public-actions a.is-primary,
.sh-public-final > a {
    border-color: #c54f62;
    background: #c54f62;
    color: #fff;
}

.sh-public-actions a:hover,
.sh-public-actions a:focus-visible,
.sh-public-final > a:hover,
.sh-public-final > a:focus-visible {
    border-color: #a93d51;
    background: #fff5f3;
    color: #a93d51;
}

.sh-public-actions a.is-primary:hover,
.sh-public-actions a.is-primary:focus-visible,
.sh-public-final > a:hover,
.sh-public-final > a:focus-visible {
    background: #a93d51;
    color: #fff;
}

.sh-public-status {
    padding: 18px 0 4px 20px;
    border-left: 3px solid #82c6c1;
}

.sh-public-status span {
    display: block;
    margin-bottom: 8px;
    color: #287d70;
    font-size: 0.7rem;
    font-weight: 950;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.sh-public-status strong {
    display: block;
    color: var(--zb-ink, #20262e);
    font-size: 1.08rem;
    line-height: 1.25;
}

.sh-public-status p {
    margin: 8px 0 0;
    color: var(--zb-muted, #68727c);
    font-size: 0.82rem;
    line-height: 1.5;
}

.sh-public-overview,
.sh-public-roster,
.sh-public-related,
.sh-public-final {
    padding: clamp(28px, 5vw, 52px) 0;
    border-bottom: 1px solid var(--zb-line, #eadfd9);
}

.sh-public-overview {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 0.72fr);
    gap: clamp(28px, 5vw, 64px);
    align-items: end;
}

.sh-public-overview h2,
.sh-public-section-head h2,
.sh-public-final h2,
.sh-not-found h1 {
    margin: 0;
    color: var(--zb-ink, #20262e);
    font-size: clamp(1.65rem, 3.6vw, 2.75rem);
    letter-spacing: -0.045em;
    line-height: 1.03;
}

.sh-public-overview > div > p:last-child,
.sh-public-section-head > p,
.sh-public-final p,
.sh-not-found p {
    margin: 12px 0 0;
    color: var(--zb-muted, #68727c);
    line-height: 1.58;
}

.sh-public-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    margin: 0;
    overflow: hidden;
    border: 1px solid var(--zb-line, #eadfd9);
    border-radius: 14px;
    background: var(--zb-line, #eadfd9);
}

.sh-public-metrics div {
    min-width: 0;
    padding: 16px;
    background: var(--zb-paper, #fff);
}

.sh-public-metrics dt {
    color: var(--zb-muted, #68727c);
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.sh-public-metrics dd {
    margin: 5px 0 0;
    color: var(--zb-ink, #20262e);
    font-size: clamp(1.4rem, 4vw, 2rem);
    font-weight: 950;
    line-height: 1;
}

.sh-public-section-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 0.58fr);
    gap: 24px;
    align-items: end;
}

.sh-public-roster ul,
.sh-public-related nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 22px 0 0;
    padding: 0;
    list-style: none;
}

.sh-public-roster li,
.sh-public-related nav a,
.sh-public-section-head > a {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    padding: 9px 13px;
    border: 1px solid var(--zb-line, #eadfd9);
    border-radius: 999px;
    background: var(--zb-paper, #fff);
    color: var(--zb-ink, #20262e);
    font-size: 0.78rem;
    font-weight: 850;
    text-decoration: none;
}

.sh-public-related nav a,
.sh-public-section-head > a {
    min-height: 44px;
    color: #8a4c54;
}

.sh-public-related nav a:hover,
.sh-public-related nav a:focus-visible,
.sh-public-section-head > a:hover,
.sh-public-section-head > a:focus-visible {
    border-color: #f4b1a6;
    background: #fff5f3;
    color: #a93d51;
}

.sh-public-section-head > a {
    width: fit-content;
    justify-self: end;
}

.sh-public-more {
    margin: 14px 0 0;
    color: var(--zb-muted, #68727c);
    font-size: 0.8rem;
    font-weight: 750;
}

.sh-public-final {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    border-bottom: 0;
}

.sh-public-final > div {
    max-width: 720px;
}

.sh-not-found {
    width: min(calc(100% - 32px), 760px);
    margin: 0 auto;
    padding: 72px 0;
    text-align: center;
}

.sh-not-found a {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    margin-top: 18px;
    padding: 9px 14px;
    border-radius: 10px;
    background: #c54f62;
    color: #fff;
    font-weight: 900;
    text-decoration: none;
}

html[data-theme="dark"] .sh-public-shell,
html[data-theme="dark"] .sh-public-copy h1,
html[data-theme="dark"] .sh-public-status strong,
html[data-theme="dark"] .sh-public-overview h2,
html[data-theme="dark"] .sh-public-section-head h2,
html[data-theme="dark"] .sh-public-final h2,
html[data-theme="dark"] .sh-public-metrics dd,
html[data-theme="dark"] .sh-not-found h1 {
    color: #fff8f4;
}

html[data-theme="dark"] .sh-public-metrics,
html[data-theme="dark"] .sh-public-metrics div,
html[data-theme="dark"] .sh-public-roster li,
html[data-theme="dark"] .sh-public-related nav a,
html[data-theme="dark"] .sh-public-section-head > a {
    border-color: #3d3439;
    background: #191318;
}

html[data-theme="dark"] .sh-public-roster li {
    color: #f8e9ef;
}

@media (max-width: 760px) {
    .sh-public-hero,
    .sh-public-overview,
    .sh-public-section-head {
        grid-template-columns: 1fr;
    }

    .sh-public-copy h1 {
        font-size: clamp(2.5rem, 15vw, 5rem);
    }

    .sh-public-status {
        padding: 16px 0 0;
        border-top: 3px solid #82c6c1;
        border-left: 0;
    }

    .sh-public-section-head > a {
        justify-self: start;
    }

    .sh-public-final {
        align-items: stretch;
        flex-direction: column;
    }

    .sh-public-final > a {
        width: 100%;
    }
}

@media (max-width: 420px) {
    .sh-public-shell {
        padding-inline: 12px;
    }

    .sh-public-actions {
        display: grid;
    }

    .sh-public-actions a {
        width: 100%;
    }

    .sh-public-metrics {
        grid-template-columns: 1fr;
    }

    .sh-public-roster ul,
    .sh-public-related nav {
        display: grid;
    }

    .sh-public-roster li,
    .sh-public-related nav a {
        width: 100%;
        border-radius: 11px;
    }
}

/* Phase 3B: progressive identity-first browsing with one complete route grid. */
.sh-catalog-tools {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.sh-grid-head .sh-catalog-count {
    min-width: 0;
    max-width: 100%;
    color: #707a84;
    text-align: right;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.sh-view-switch {
    display: inline-grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 3px;
    border: 1px solid #eadfd9;
    border-radius: 12px;
    background: #f6efeb;
    box-shadow: inset 0 1px 2px rgba(88, 62, 52, 0.05);
}

.sh-view-switch[hidden] {
    display: none;
}

.sh-view-switch button {
    min-width: 94px;
    min-height: 44px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #707a84;
    padding: 0 13px;
    font: inherit;
    font-size: 0.75rem;
    font-weight: 900;
    line-height: 1.1;
    overflow-wrap: anywhere;
    cursor: pointer;
}

.sh-view-switch button[aria-pressed="true"] {
    background: linear-gradient(180deg, #ff7b6e, #ef6257);
    color: #fff;
    box-shadow: 0 5px 12px rgba(197, 79, 98, 0.2);
}

.sh-view-switch button:focus-visible {
    outline: 2px solid #c54f62;
    outline-offset: 2px;
}

.sh-card-copy {
    min-width: 0;
}

.sh-card-copy-identity {
    display: none;
}

.sh-grid[data-sh-catalog-view="characters"] .sh-card-copy-art {
    display: none;
}

.sh-grid[data-sh-catalog-view="characters"] .sh-card-copy-identity {
    display: block;
}

html[data-theme="dark"] body.zb-route-series-hub .sh-view-switch {
    border-color: var(--zb-line, #343c49);
    background: #14171d;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.26);
}

html[data-theme="dark"] body.zb-route-series-hub .sh-view-switch button {
    color: var(--zb-muted, #aeb6c4);
}

html[data-theme="dark"] body.zb-route-series-hub .sh-view-switch button[aria-pressed="true"] {
    background: linear-gradient(180deg, #ff857a, #e85e55);
    color: #fff;
    box-shadow: 0 5px 14px rgba(0, 0, 0, 0.28);
}

html[data-theme="dark"] body.zb-route-series-hub .sh-view-switch button:focus-visible {
    outline-color: #ffaaa1;
}

html[data-theme="dark"] body.zb-route-series-hub .sh-grid-head .sh-catalog-count {
    color: var(--zb-muted, #aeb6c4);
}

@media (max-width: 720px) {
    .sh-grid-head {
        align-items: stretch;
        flex-direction: column;
        gap: 8px;
    }

    .sh-catalog-tools {
        width: 100%;
        justify-content: space-between;
    }

    .sh-view-switch {
        flex: 1 1 auto;
        max-width: 260px;
    }

    .sh-view-switch button {
        min-width: 0;
    }
}

@media (max-width: 620px) {
    .sh-catalog-tools {
        align-items: stretch;
        flex-direction: column;
        gap: 6px;
    }

    .sh-view-switch {
        width: 100%;
        max-width: none;
    }

    .sh-grid-head .sh-catalog-count {
        width: 100%;
        text-align: left;
    }
}

/* Phase 2: identity-level Series discovery before the complete art-route list. */
.sh-discovery {
    margin: 18px 0 20px;
}

.sh-section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 10px;
}

.sh-section-head h2,
.sh-grid-head h2 {
    margin: 2px 0 0;
    color: #242b32;
    font-size: clamp(1.05rem, 2vw, 1.32rem);
    line-height: 1.15;
}

.sh-section-head > p {
    max-width: 360px;
    margin: 0;
    color: #707a84;
    font-size: 0.78rem;
    line-height: 1.42;
    text-align: right;
}

.sh-section-kicker {
    display: block;
    color: #c54f62;
    font-size: 0.67rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    line-height: 1.2;
    text-transform: uppercase;
}

.sh-shelf-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.sh-shelf {
    min-width: 0;
    padding: 12px;
    border: 1px solid #eadfd9;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 10px 26px rgba(88, 62, 52, 0.06);
}

.sh-shelf-head {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 9px;
}

.sh-shelf-head h3,
.sh-shelf-head p {
    margin: 0;
}

.sh-shelf-head h3 {
    font-size: 0.92rem;
    line-height: 1.2;
}

.sh-shelf-head h3 a {
    color: #8a4c54;
    text-decoration: none;
}

.sh-shelf-head h3 a:hover,
.sh-shelf-head h3 a:focus-visible {
    color: #c54f62;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.sh-shelf-head p {
    margin-top: 3px;
    color: #707a84;
    font-size: 0.7rem;
    line-height: 1.3;
}

.sh-shelf-head > span {
    display: inline-flex;
    min-width: 28px;
    min-height: 28px;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border-radius: 999px;
    background: #fff0eb;
    color: #9c4655;
    font-size: 0.7rem;
    font-weight: 900;
}

.sh-shelf-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
}

.sh-shelf-card {
    display: grid;
    min-width: 0;
    min-height: 74px;
    grid-template-columns: 58px minmax(0, 1fr);
    align-items: center;
    gap: 9px;
    padding: 5px;
    border: 1px solid #eee3dd;
    border-radius: 10px;
    background: #fffaf7;
    color: #242b32;
    text-decoration: none;
    transition: border-color 150ms ease, background 150ms ease, transform 150ms ease;
}

.sh-shelf-card:hover,
.sh-shelf-card:focus-visible {
    border-color: #f4b1a6;
    background: #fff4ef;
    transform: translateY(-1px);
}

.sh-shelf-card:focus-visible,
.sh-shelf-head h3 a:focus-visible {
    outline: 3px solid #ff9bc1;
    outline-offset: 2px;
}

.sh-shelf-card img {
    width: 58px;
    height: 64px;
    object-fit: cover;
    border-radius: 7px;
    background: #f4ede8;
}

.sh-shelf-card > span {
    display: grid;
    min-width: 0;
    gap: 3px;
}

.sh-shelf-card strong {
    overflow: hidden;
    color: #242b32;
    font-size: 0.76rem;
    line-height: 1.18;
    text-overflow: ellipsis;
}

.sh-shelf-card small {
    color: #707a84;
    font-size: 0.65rem;
    font-weight: 800;
    line-height: 1.2;
}

.sh-grid-head > div {
    min-width: 0;
}

html[data-theme="dark"] body.zb-route-series-hub .sh-section-head h2,
html[data-theme="dark"] body.zb-route-series-hub .sh-grid-head h2,
html[data-theme="dark"] body.zb-route-series-hub .sh-shelf-card strong {
    color: var(--zb-ink, #f5f7fb);
}

html[data-theme="dark"] body.zb-route-series-hub :where(.sh-section-head > p, .sh-shelf-head p, .sh-shelf-card small) {
    color: var(--zb-muted, #aeb6c4);
}

html[data-theme="dark"] body.zb-route-series-hub .sh-section-kicker,
html[data-theme="dark"] body.zb-route-series-hub .sh-shelf-head h3 a {
    color: #ffaaa1;
}

html[data-theme="dark"] body.zb-route-series-hub .sh-shelf {
    border-color: var(--zb-line, #343c49);
    background: #181c24;
    box-shadow: var(--zb-shadow-xs, 0 8px 24px rgba(0, 0, 0, 0.22));
}

html[data-theme="dark"] body.zb-route-series-hub .sh-shelf-head > span {
    background: #2a2228;
    color: #ffaaa1;
}

html[data-theme="dark"] body.zb-route-series-hub .sh-shelf-card {
    border-color: #343c49;
    background: #202630;
    color: var(--zb-ink, #f5f7fb);
}

html[data-theme="dark"] body.zb-route-series-hub .sh-shelf-card:hover,
html[data-theme="dark"] body.zb-route-series-hub .sh-shelf-card:focus-visible {
    border-color: #ff948a;
    background: #252c37;
}

html[data-theme="dark"] body.zb-route-series-hub .sh-shelf-card img {
    background: #242a34;
}

@media (max-width: 720px) {
    .sh-section-head {
        align-items: start;
        flex-direction: column;
        gap: 5px;
    }

    .sh-section-head > p {
        max-width: none;
        text-align: left;
    }

    .sh-shelf-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 350px) {
    .sh-shelf-list {
        grid-template-columns: 1fr;
    }

    .sh-shelf-card {
        min-height: 72px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sh-shelf-card {
        transition: none;
    }
}

.sh-continuity {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, auto);
    gap: 18px;
    align-items: center;
    margin-top: 18px;
    padding: 18px;
    border: 1px solid rgba(239, 104, 155, 0.32);
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(239, 104, 155, 0.11), rgba(73, 199, 190, 0.07));
}

.sh-continuity-kicker {
    margin: 0 0 4px;
    color: #e95788;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.sh-continuity h2,
.sh-continuity p { margin: 0; }
.sh-continuity h2 { font-size: clamp(1rem, 2vw, 1.3rem); }
.sh-continuity > div > p:last-child { margin-top: 6px; color: #6f6870; font-size: 0.86rem; }
.sh-continuity nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.sh-continuity nav a,
.sh-watch-series { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; padding: 9px 13px; border: 1px solid rgba(255,255,255,.14); border-radius: 10px; color: #f8dbe7; text-decoration: none; font: inherit; font-weight: 800; }
.sh-continuity nav a { border-color: #d8c6cd; background: #fff; color: #6b304b; }
.sh-continuity nav a.is-primary { border-color: transparent; background: #e95788; color: #fff; }
.sh-watch-series { cursor: pointer; border-color: #d8c6cd; background: #fff; color: #6b304b; }
.sh-watch-series.is-watching { border-color: transparent; background: #287d70; color: #fff; }
.sh-watch-series:disabled { cursor: wait; opacity: .68; }
.sh-watch-series-status { flex: 1 0 100%; min-height: 1.2em; color: #6f6870; font-size: .78rem; text-align: right; }
.sh-continuity nav :is(a, .sh-watch-series):focus-visible { outline: 3px solid #9ddbd7; outline-offset: 2px; }
html[data-theme="dark"] .sh-watch-series { border-color: rgba(255,255,255,.16); background: #221920; color: #f8dbe7; }
html[data-theme="dark"] .sh-watch-series.is-watching { border-color: transparent; background: #287d70; color: #fff; }
html[data-theme="dark"] .sh-watch-series-status { color: #aeb6c4; }
html[data-theme="dark"] .sh-continuity > div > p:last-child { color: #aeb6c4; }
html[data-theme="dark"] .sh-continuity nav a { border-color: rgba(255,255,255,.14); background: transparent; color: #f8dbe7; }
html[data-theme="dark"] .sh-continuity nav a.is-primary { border-color: transparent; background: #e95788; color: #fff; }

@media (max-width: 720px) {
    .sh-continuity { grid-template-columns: 1fr; }
    .sh-continuity nav { justify-content: flex-start; }
    .sh-watch-series-status { text-align: left; }
}

/* Authored hub polish: preserve every signal on quieter, art-led surfaces. */
.sh-head {
    border-color: rgba(255, 255, 255, 0.11);
    border-left: 3px solid #e95788;
    border-radius: 8px;
    background: #191318;
}

.sh-parent-collections {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
    margin: 8px 0 10px;
    font-size: 0.72rem;
    font-weight: 850;
}

.sh-parent-collections > span {
    color: #707a84;
}

.sh-parent-collections a {
    display: inline-flex;
    min-height: 30px;
    align-items: center;
    padding: 5px 10px;
    border: 1px solid #cce2df;
    border-radius: 999px;
    background: #f1faf8;
    color: #286d6b;
    text-decoration: none;
}

.sh-parent-collections a:hover,
.sh-parent-collections a:focus-visible {
    border-color: #82c6c1;
    color: #155a57;
}

.sh-parent-collections a:focus-visible {
    outline: 3px solid #ff9bc1;
    outline-offset: 2px;
}

html[data-theme="dark"] body.zb-route-series-hub .sh-parent-collections > span {
    color: var(--zb-muted, #aeb6c4);
}

html[data-theme="dark"] body.zb-route-series-hub .sh-parent-collections a {
    border-color: #315653;
    background: #1d3333;
    color: #9ddbd7;
}

.sh-kpi,
.sh-find input,
.sh-clear,
.sh-links a,
.sh-state {
    border-radius: 5px;
}

.sh-find input {
    border-color: rgba(255, 255, 255, 0.13);
    background: #141014;
}

.sh-links a {
    background: #211820;
}

.sh-links-primary a:first-child {
    background: #e95788;
}

.sh-card {
    border-color: rgba(255, 255, 255, 0.1);
    border-radius: 7px;
    background: #191318;
}

.sh-card:hover,
.sh-card:focus-visible {
    border-color: rgba(239, 104, 155, 0.58);
    background: #21171f;
}

.sh-card img {
    border-radius: 4px;
    background: #0f0c0f;
}

.sh-path-card,
.sh-mini {
    border-radius: 7px;
    background: #191318;
}

@media (max-width: 340px) {
    .sh-grid {
        grid-template-columns: 1fr;
    }

    .sh-card img {
        height: 170px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sh-card {
        transition: none;
    }
}

/* Keep the authoritative series context visible on phones. */
@media (max-width: 620px) {
    .sh-context-primary {
        display: block;
        color: rgba(255, 239, 246, 0.86);
        font-size: 0.74rem;
        line-height: 1.38;
    }

    .sh-context-secondary {
        display: none;
    }
}

/* Friendly series hub final cascade. */
.sh-head {
    border: 1px solid #eadfd9;
    border-left: 4px solid #ff7568;
    border-radius: 16px;
    background: linear-gradient(135deg, #fff, #fff5f1);
    box-shadow: 0 14px 34px rgba(88, 62, 52, 0.07);
}

.sh-kpi,
.sh-find input,
.sh-clear,
.sh-links a,
.sh-state {
    border-color: #eadfd9;
    border-radius: 10px;
    background: #fff;
    color: #59636d;
}

.sh-find input {
    background: #fff;
    color: #242b32;
}

.sh-links-primary a:first-child {
    border-color: #ef6257;
    background: linear-gradient(180deg, #ff7b6e, #ef6257);
    color: #fff;
}

.sh-card,
.sh-path-card,
.sh-mini {
    border-color: #eadfd9;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 11px 28px rgba(88, 62, 52, 0.07);
}

.sh-card:hover,
.sh-card:focus-visible {
    border-color: #f4b1a6;
    background: #fffaf7;
}

.sh-card img {
    border-radius: 10px;
    background: #f4ede8;
}

@media (max-width: 620px) {
    .sh-context-primary {
        color: #707a84;
    }
}
