/* ── otii design system ── */

:root {
    --bg: #f8fafc;
    --bg2: #ffffff;
    --bg3: #f0f4f8;
    --header-height: 58px;
    --border: #dde3ea;
    --border2: #c4cdd8;
    --text: #111827;
    --text2: #111827;
    --text3: #111827;
    --blue: #1d6fd4;
    --blue-dk: #155bb5;
    --blue-dim: rgba(29, 111, 212, 0.07);
    --red: #dc2626;
    --amber: #d97706;
    --green: #16a34a;
    --sans: 'DM Sans', system-ui, sans-serif;
    --serif: 'Playfair Display', Georgia, serif;
}

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.browse-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    height: 100vh;
    z-index: 999;
}

.browse-dropdown-menu {
    z-index: 1000;
    min-width: 200px;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}
/* ── NAV (global — scoped CSS doesn't reach child components) ── */
.rc-nav {
    position: sticky;
    top: 0;
    z-index: 200;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 1.5rem;
    padding: 0 2.5rem;
    height: var(--header-height);
    background: rgba(248, 250, 252, 0.97);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
}

.rc-nav-left {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    min-width: 0;
}

.rc-nav-center {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.75rem;
    min-width: 0;
}

.rc-nav-right {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    justify-content: flex-end;
}

.rc-logo {
    font-family: var(--serif);
    font-size: 1.25rem;
    font-style: italic;
    color: var(--text);
    text-decoration: none;
    letter-spacing: -0.01em;
    flex-shrink: 0;
    white-space: nowrap;
}

.rc-logo-dot {
    color: var(--blue);
}

.rc-nav-links {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.rc-nav-link {
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 0 1rem;
    height: var(--header-height);
    display: flex;
    align-items: center;
    color: var(--text3);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    border-top: none;
    border-left: none;
    border-right: none;
    transition: color 0.15s;
    white-space: nowrap;
    background: none;
    cursor: pointer;
    font-family: var(--sans);
}

.rc-nav-link--stacked {
    flex-direction: column;
    justify-content: center;
    gap: 0.18rem;
    min-width: 64px;
    padding: 0 0.75rem;
}

.rc-nav-link-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
}

.rc-nav-link-label {
    font-size: 0.67rem;
    letter-spacing: 0.08em;
}

    .rc-nav-link:hover {
        color: var(--text2);
    }

    .rc-nav-link.active {
        color: var(--blue);
        border-bottom-color: var(--blue);
    }

.rc-profile-wrap {
    position: relative;
    flex-shrink: 0;
    /* Keep trigger and popup above the full-screen backdrop. */
    z-index: 320;
}

.rc-profile-backdrop {
    position: fixed;
    inset: 0;
    height: 100vh;
    border: none;
    background: transparent;
    padding: 0;
    margin: 0;
    /* Backdrop sits below the profile trigger/popup layer (z-index: 320). */
    z-index: 310;
}

.rc-profile-trigger {
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 50%;
    padding: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1d6fd4, #155bb5);
    color: white;
    font-family: var(--sans);
    font-size: 0.72rem;
    font-weight: 600;
    transition: box-shadow 0.15s ease;
    box-shadow: 0 0 0 2px var(--bg), 0 0 0 3px rgba(154, 166, 179, 0.45);
}

    .rc-profile-trigger:hover {
        box-shadow: 0 0 0 2px var(--bg), 0 0 0 3px rgba(29, 111, 212, 0.55);
    }

.rc-profile-trigger-image {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

.rc-profile-trigger-text {
    line-height: 1;
}

.rc-profile-popup {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: min(280px, calc(100vw - 2rem));
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 18px 48px rgba(15, 23, 42, 0.14), 0 4px 14px rgba(15, 23, 42, 0.08);
    z-index: 320;
    overflow: hidden;
}

.rc-profile-popup-header {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 1rem 1rem 0.8rem;
}

.rc-profile-popup-avatar {
    width: 52px;
    height: 52px;
    min-width: 52px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 0 0 2px rgba(154, 166, 179, 0.22);
}

.rc-profile-popup-avatar-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1d6fd4, #155bb5);
    color: white;
    font-size: 1rem;
    font-weight: 600;
}

.rc-profile-popup-info {
    min-width: 0;
}

.rc-profile-popup-name {
    color: var(--text);
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.2;
}

.rc-profile-popup-username {
    color: var(--text3);
    font-size: 0.86rem;
    margin-top: 0.15rem;
}

.rc-profile-popup-bio {
    color: var(--text2);
    font-size: 0.88rem;
    line-height: 1.5;
    padding: 0 1rem 1rem;
    border-bottom: 1px solid var(--border);
}

.rc-profile-popup-actions {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    padding: 1rem;
}

.rc-profile-popup-primary,
.rc-profile-popup-secondary {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border-radius: 8px;
    font-family: var(--sans);
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.rc-profile-popup-primary {
    border: 1px solid transparent;
    background: var(--blue);
    color: white;
}

    .rc-profile-popup-primary:hover {
        background: var(--blue-dk);
    }

.rc-profile-popup-secondary {
    border: 1px solid var(--border2);
    background: transparent;
    color: var(--text2);
}

    .rc-profile-popup-secondary:hover {
        background: var(--bg3);
        color: var(--text);
    }

.rc-join-btn {
    display: inline-flex;
    align-items: center;
    font-family: var(--sans);
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.45rem 1.25rem;
    background: var(--blue);
    color: #fff;
    border: none;
    border-radius: 3px;
    text-decoration: none;
}

    .rc-join-btn:hover {
        background: var(--blue-dk);
        color: #fff;
    }

.rc-body {
    position: relative;
    z-index: 1;
}

.rc-page-shell {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem 2.5rem 4rem;
}

.rc-page-shell--edge {
    padding: 0;
}

.rc-page-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 1.75rem;
}

.rc-page-title {
    font-family: var(--serif);
    font-size: 1.75rem;
    font-weight: 400;
    color: var(--text);
    margin-bottom: 0;
}

.connection-page {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.connection-header {
    margin-bottom: 0;
}

.connection-subtitle {
    margin: 0.35rem 0 0;
    color: var(--text2);
    font-size: 0.95rem;
}

.connection-state {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 16px;
    color: var(--text2);
    padding: 1.25rem 1.4rem;
}

.connection-state-error {
    color: var(--red);
    background: #fef2f2;
    border-color: #fecaca;
}

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

.connection-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.15rem 1.2rem;
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 18px;
    text-decoration: none;
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.connection-card:hover {
    border-color: var(--blue);
    box-shadow: 0 8px 24px rgba(29, 111, 212, 0.08);
    transform: translateY(-1px);
}

.connection-avatar {
    width: 56px;
    height: 56px;
    min-width: 56px;
    border-radius: 50%;
    object-fit: cover;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 600;
    font-family: var(--sans);
}

.connection-avatar-fallback {
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.4);
}

.connection-card-body {
    min-width: 0;
}

.connection-card-name {
    color: var(--text);
    font-family: var(--serif);
    font-size: 1.05rem;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.connection-card-username {
    color: var(--text3);
    font-size: 0.78rem;
    margin-top: 0.18rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.connection-card-meta {
    color: var(--text2);
    font-size: 0.83rem;
    margin-top: 0.45rem;
}

.connection-pagination {
    padding-top: 0.25rem;
}

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

.rc-page-subtitle {
    font-size: 0.85rem;
    color: var(--text3);
}

/* ── Shared header discovery (Browse + Search) ── */
.rc-header-discovery-overlay {
    position: fixed;
    inset: 0;
    z-index: 150;
}

.rc-header-discovery {
    position: relative;
    z-index: 160;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    min-width: 0;
    max-width: 640px;
}

.rc-header-browse {
    position: relative;
    flex-shrink: 0;
}

.rc-browse-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    min-height: 48px;
    font-family: var(--sans);
    font-size: 0.84rem;
    font-weight: 500;
    color: var(--text2);
    padding: 0.55rem 1rem;
    border-radius: 14px;
    background: var(--bg3);
    border: 1px solid rgba(15, 23, 42, 0.08);
    cursor: pointer;
    transition: background 0.12s, color 0.12s, border-color 0.12s, box-shadow 0.12s;
    white-space: nowrap;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

    .rc-browse-btn:hover,
    .rc-browse-btn--open {
        background: #eef4ff;
        color: var(--blue);
        border-color: rgba(29, 111, 212, 0.18);
        box-shadow: 0 4px 14px rgba(29, 111, 212, 0.1);
    }

.rc-chevron {
    transition: transform 0.2s ease;
}

.rc-chevron--up {
    transform: rotate(180deg);
}

.rc-browse-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 230px;
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1), 0 2px 8px rgba(0,0,0,0.06);
    z-index: 300;
    padding: 0.45rem 0;
}

.rc-dropdown-label {
    font-size: 0.62rem;
    font-weight: 500;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--text3);
    padding: 0.6rem 1rem 0.25rem;
}

.rc-dropdown-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 48px;
    padding: 0.7rem 1rem;
    font-family: var(--sans);
    font-size: 0.85rem;
    color: var(--text2);
    background: transparent;
    border: none;
    cursor: pointer;
    text-align: left;
    transition: background 0.1s, color 0.1s;
}

    .rc-dropdown-row:hover {
        background: var(--bg3);
        color: var(--text);
    }

.rc-dropdown-row--genres {
    position: relative;
}

    .rc-dropdown-row--genres:hover {
        background: var(--blue-dim);
        color: var(--blue);
    }

.rc-dropdown-divider {
    height: 1px;
    background: var(--border);
    margin: 0.25rem 0;
}

.rc-genres-flyout {
    position: absolute;
    top: -6px;
    left: calc(100% + 6px);
    width: 520px;
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1), 0 2px 8px rgba(0,0,0,0.06);
    padding: 0.75rem 0.75rem 0.5rem;
    z-index: 310;
}

.rc-flyout-header {
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.55rem;
    margin-bottom: 0.4rem;
}

.rc-flyout-all {
    border: none;
    background: transparent;
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--blue);
    cursor: pointer;
    padding: 0;
}

    .rc-flyout-all:hover {
        text-decoration: underline;
    }

.rc-genre-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
}

.rc-genre-flyout-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 48px;
    padding: 0.38rem 0.6rem;
    font-size: 0.83rem;
    color: var(--text2);
    border-radius: 3px;
    cursor: pointer;
    transition: background 0.1s, color 0.1s;
    border: none;
    background: transparent;
    text-align: left;
}

    .rc-genre-flyout-row:hover {
        background: var(--blue-dim);
        color: var(--blue);
    }

.rc-genre-count {
    font-size: 0.67rem;
    color: var(--text3);
}

.rc-search-shell {
    position: relative;
    flex: 1;
    min-width: 0;
    max-width: 520px;
}

.rc-mobile-search-trigger {
    display: none;
}

.rc-search-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    background: #f8fafc;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 16px;
    padding: 0.35rem 0.45rem 0.35rem 0.8rem;
    transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

    .rc-search-bar:focus-within {
        background: var(--bg2);
        border-color: rgba(29, 111, 212, 0.18);
        box-shadow: 0 0 0 3px rgba(29, 111, 212, 0.08);
    }

.rc-search-input {
    flex: 1;
    border: none;
    background: transparent;
    font-family: var(--sans);
    min-height: 48px;
    font-size: 0.82rem;
    color: var(--text);
    outline: none;
    min-width: 0;
}

    .rc-search-input::placeholder {
        color: var(--text3);
    }

.rc-search-clear {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text3);
    font-size: 0.75rem;
    min-width: 48px;
    min-height: 48px;
    padding: 0;
    line-height: 1;
    flex-shrink: 0;
}

.rc-search-clear:hover {
    color: var(--text2);
}

.rc-search-submit {
    min-height: 48px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: var(--bg2);
    color: var(--text2);
    border-radius: 12px;
    padding: 0.38rem 0.95rem;
    font-size: 0.75rem;
    font-family: var(--sans);
    cursor: pointer;
    flex-shrink: 0;
}

    .rc-search-submit:hover:not(:disabled) {
        border-color: var(--border2);
        color: var(--text);
    }

    .rc-search-submit:disabled {
        opacity: 0.55;
        cursor: not-allowed;
    }

.rc-search-suggestions {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.09);
    z-index: 220;
    padding: 0.35rem 0;
}

.rc-search-suggestion-loading {
    padding: 0.5rem 0.85rem;
    font-size: 0.78rem;
    color: var(--text3);
}

.rc-search-suggestion-section {
    font-size: 0.64rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text3);
    padding: 0.45rem 0.85rem 0.25rem;
}

.rc-search-suggestion-item {
    width: 100%;
    background: transparent;
    border: none;
    text-align: left;
    padding: 0.5rem 0.85rem;
    color: var(--text2);
    display: flex;
    align-items: center;
    gap: 0.7rem;
    cursor: pointer;
}

    .rc-search-suggestion-item:hover {
        background: var(--blue-dim);
        color: var(--blue);
    }

.rc-search-suggestion-cover {
    width: 24px;
    height: 36px;
    border-radius: 4px;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid rgba(14, 27, 56, 0.08);
    background: var(--bg3);
}

.rc-search-suggestion-cover--placeholder {
    background: linear-gradient(180deg, var(--bg3), rgba(14, 27, 56, 0.08));
}

.rc-search-suggestion-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.12rem;
}

.rc-search-suggestion-title {
    font-size: 0.82rem;
    line-height: 1.3;
}

.rc-search-suggestion-author {
    font-size: 0.72rem;
    color: var(--text3);
    line-height: 1.25;
}

.rc-search-suggestion-item:hover .rc-search-suggestion-author {
    color: var(--blue);
    opacity: 0.85;
}

.rc-search-loading-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    background: var(--blue);
    animation: rc-search-progress 600ms ease-in-out infinite;
}

@keyframes rc-search-progress {
    0% {
        width: 0;
    }

    50% {
        width: 60%;
    }

    100% {
        width: 0;
    }
}

@media (max-width: 960px) {
    .rc-nav {
        gap: 0.75rem;
        padding: 0.75rem 1rem;
    }

    .rc-nav-center {
        justify-content: flex-start;
        gap: 0.75rem;
    }

    .rc-nav-right {
        gap: 0.65rem;
    }

    .rc-header-discovery {
        flex: 0 0 auto;
        width: auto;
        max-width: none;
    }

    .rc-header-browse {
        display: none;
    }

    .rc-search-shell {
        flex: 0 0 auto;
        width: auto;
        max-width: none;
    }

    .rc-nav-links {
        gap: 0.25rem;
    }

    .rc-nav-link {
        height: auto;
        min-height: 48px;
        padding: 0.4rem 0.7rem;
        border: 1px solid transparent;
        border-radius: 999px;
    }

    .rc-nav-link.active {
        border-color: rgba(29, 111, 212, 0.22);
        background: var(--blue-dim);
    }

    .rc-page-shell {
        padding: 1.5rem 1rem 3rem;
    }

    .rc-page-header,
    .rc-grid-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .rc-breadcrumb {
        flex-wrap: wrap;
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .rc-breadcrumb-clear {
        margin-left: 0;
    }

    .rc-browse-dropdown {
        width: min(100%, 420px);
        min-width: 0;
    }

    .rc-genres-flyout {
        position: static;
        width: 100%;
        margin-top: 0.5rem;
        box-shadow: none;
    }

    .rc-mobile-search-trigger {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        background: none;
        border: none;
        color: var(--text2);
        min-width: 48px;
        min-height: 48px;
        padding: 0;
        line-height: 0;
        cursor: pointer;
    }

    .rc-search-shell:not(.rc-search-shell--mobile-open) .rc-search-bar {
        display: none;
    }

    .rc-search-shell--mobile-open {
        flex: 1;
        width: 100%;
        min-width: 0;
    }

    .rc-search-shell--mobile-open .rc-mobile-search-trigger {
        display: none;
    }

    .rc-nav.rc-nav--mobile-search-open .rc-nav-right {
        display: none;
    }

    .rc-nav.rc-nav--mobile-search-open .rc-nav-links {
        display: none;
    }

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

@media (max-width: 640px) {
    .rc-nav {
        gap: 0.55rem;
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    .rc-nav-right {
        gap: 0.5rem;
    }

    .rc-header-discovery {
        gap: 0.5rem;
    }

    .rc-search-shell {
        min-width: auto;
    }

    .rc-search-bar {
        flex-wrap: nowrap;
        gap: 0.35rem;
        padding: 0.45rem 0.65rem 0.45rem 0.7rem;
    }

    .rc-search-input {
        width: auto;
    }

    .rc-search-clear {
        margin-left: 0;
    }

    .rc-search-mobile-close {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        background: none;
        border: none;
        color: var(--text3);
        font-size: 0.85rem;
        line-height: 1;
        min-width: 48px;
        min-height: 48px;
        padding: 0;
        cursor: pointer;
        margin-left: 0;
    }

    .rc-search-submit {
        order: 3;
        display: none;
    }

    .rc-genre-grid {
        grid-template-columns: 1fr;
    }

    .rc-page-title {
        font-size: 1.45rem;
    }

    .rc-nav-link-label {
        display: none;
    }

    .rc-nav-link--stacked {
        min-width: 48px;
        padding: 0.4rem 0.55rem;
    }
}

.rc-search-mobile-close {
    display: none;
}
