.explore-modes {
    display: inline-flex;
    gap: 6px;
    margin: 14px 24px 0 14px;
}

.explore-mode-btn {
    border: none;
    background: none;
    color: var(--muted);
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    padding: 6px 10px;
    border-radius: var(--radius);
    cursor: pointer;
}

.explore-mode-btn:hover { color: var(--text); }

.explore-mode-btn.active {
    background: var(--accent-pale);
    color: var(--accent);
}

.explore-shell {
    display: flex;
    min-height: calc(100dvh - 52px);
}

.explore-shell .live-channel-rail {
    position: sticky;
    top: 52px;
    align-self: flex-start;
    height: calc(100dvh - 52px);
}

body.explore-framed .explore-shell .live-channel-rail {
    top: 0;
    height: 100dvh;
}

@media (max-width: 900px) {
    .live-channel-rail { display: none; }
}

.explore-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.explore-main {
    flex: 1;
    min-width: 0;
    padding: 20px 24px 40px;
}

.explore-drill {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
}

.explore-drill.hidden { display: none; }

.explore-back {
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    font-family: inherit;
    font-size: 13px;
    padding: 6px 12px;
    border-radius: var(--radius);
    cursor: pointer;
}

.explore-back:hover { border-color: var(--accent); color: var(--accent); }

.explore-drill-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
}

.explore-empty {
    padding: 80px 20px;
    text-align: center;
    color: var(--muted);
    font-size: 15px;
}

.explore-empty.hidden { display: none; }

.explore-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 18px;
}

.explore-stream-card {
    position: relative;
    min-width: 0;
}

.explore-stream-card > .explore-card {
    box-sizing: border-box;
    height: 100%;
}

.explore-card {
    display: block;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
    padding: 0;
    transition: border-color .15s;
}

.explore-preview-layer {
    position: absolute;
    z-index: 1;
    top: 1px;
    right: 1px;
    left: 1px;
    width: auto;
    aspect-ratio: 16 / 9;
    border-radius: var(--radius) var(--radius) 0 0;
    overflow: hidden;
    pointer-events: none;
}

.explore-preview-frame {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    background: #000;
    opacity: 0;
    pointer-events: none;
    transition: opacity .15s ease;
}

.explore-stream-card.preview-playing .explore-preview-frame {
    opacity: 1;
}

.explore-preview-status {
    position: absolute;
    z-index: 1;
    right: 8px;
    bottom: 8px;
    max-width: calc(100% - 16px);
    padding: 3px 7px;
    border-radius: 3px;
    background: rgba(0, 0, 0, .78);
    color: #e5e5e5;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.3;
    pointer-events: none;
}

.explore-card:hover { border-color: var(--accent); text-decoration: none; }
a.explore-card:hover, a.explore-card:hover * { text-decoration: none; }

.explore-thumb {
    position: relative;
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, #1c1c1c, #101010);
    overflow: hidden;
}

.explore-thumb img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.explore-card-body {
    padding: 9px 13px 10px;
}

.explore-card-username {
    flex: 1;
    min-width: 0;
    font-size: 15px;
    line-height: 1.4;
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.explore-card-identity {
    display: flex;
    align-items: center;
    gap: 10px;
}

.explore-card-language {
    flex-shrink: 0;
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 2px 7px;
    font-size: 11px;
    line-height: 1.3;
    color: var(--muted);
    white-space: nowrap;
}

.explore-card-language[hidden] { display: none; }

.explore-card-title {
    margin-top: 1px;
    font-size: 13px;
    line-height: 1.4;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.explore-card-meta {
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.explore-tag {
    font-size: 11.5px;
    color: #e5e5e5;
    background: rgba(0, 0, 0, .72);
    border-radius: 3px;
    padding: 2px 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.explore-viewers {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.explore-thumb .explore-tag {
    position: absolute;
    z-index: 2;
    top: 8px;
    left: 8px;
    max-width: calc(100% - 16px);
}

.explore-thumb .explore-viewers {
    position: absolute;
    z-index: 2;
    bottom: 8px;
    left: 8px;
    background: rgba(0, 0, 0, .72);
    border-radius: 3px;
    padding: 2px 8px;
    color: #e5e5e5;
}

.explore-viewers svg {
    width: 13px;
    height: 13px;
    fill: currentColor;
    stroke: none;
    stroke-width: 1.6;
}

.explore-category-thumb {
    aspect-ratio: 3 / 4;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.explore-category-art {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.explore-grid.explore-grid-portrait {
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
}

.explore-category-name {
    max-width: 100%;
    color: #fff;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.35;
    text-align: center;
    overflow: hidden;
    overflow-wrap: anywhere;
    word-break: break-word;
    hyphens: auto;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.explore-category-name[hidden] {
    display: none;
}

@media (max-width: 480px) {
    .explore-modes { margin: 12px 16px 0 6px; }
    .explore-main { padding: 16px 16px 32px; }
    .explore-grid { grid-template-columns: 1fr; }
    .explore-grid.explore-grid-portrait { grid-template-columns: repeat(2, 1fr); }
    .explore-category-name { font-size: 15px; }
}

@media (prefers-reduced-motion: reduce) {
    .explore-preview-frame { transition: none; }
}

body.explore-framed .site-nav { display: none; }
