html, body.popout-body {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

body.popout-body {
    display: flex;
    align-items: stretch;
    justify-content: stretch;
    min-height: 100%;
    background: var(--bg);
    font-family: 'Consolas', 'Courier New', monospace;
    color: var(--text);
    padding: 0;
}

.popout-bg-grid {
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 70% at 50% 40%, rgba(255, 26, 26, 0.07) 0%, transparent 70%),
        repeating-linear-gradient(0deg, transparent, transparent 28px, rgba(255, 26, 26, 0.02) 28px, rgba(255, 26, 26, 0.02) 29px),
        repeating-linear-gradient(90deg, transparent, transparent 28px, rgba(255, 26, 26, 0.02) 28px, rgba(255, 26, 26, 0.02) 29px);
    pointer-events: none;
    z-index: 0;
}

.popout-scanline {
    position: fixed;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(255, 26, 26, 0.012) 2px,
        rgba(255, 26, 26, 0.012) 4px
    );
    pointer-events: none;
    z-index: 1;
    animation: scanMove 8s linear infinite;
}

.popout-shell {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 0;
    box-sizing: border-box;
}

.popout-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    background: rgba(13, 13, 13, 0.95);
    border-bottom: 1px solid var(--line);
    flex-shrink: 0;
}

.popout-brand {
    font-size: 0.85rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    background: linear-gradient(135deg, #ff1a1a, #ff4444);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.popout-brand .accent {
    -webkit-text-fill-color: var(--text);
    color: var(--text);
}

.popout-tag {
    font-size: 0.5rem;
    color: var(--dim);
    letter-spacing: 0.22em;
    font-weight: 700;
}

.popout-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 14px;
    background: rgba(13, 13, 13, 0.88);
    border-left: 2px solid var(--red);
    margin: 12px;
    min-height: 0;
    position: relative;
    overflow: hidden;
}

.popout-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--red), transparent);
    opacity: 0.8;
}

.popout-meta {
    flex: 1;
    min-height: 0;
    align-items: center;
}

.popout-cover {
    width: 72px;
    height: 72px;
    box-shadow: 0 0 20px rgba(255, 26, 26, 0.12);
}

.popout-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 14px;
    background: rgba(13, 13, 13, 0.95);
    border-top: 1px solid var(--line);
    flex-shrink: 0;
}

.popout-footer span {
    font-size: 0.48rem;
    color: var(--dim);
    letter-spacing: 0.18em;
}

.popout-close {
    font-family: inherit;
    font-size: 0.55rem;
    letter-spacing: 0.12em;
    color: var(--dim);
    background: transparent;
    border: 1px solid var(--line);
    padding: 5px 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.popout-close:hover {
    color: var(--red);
    border-color: var(--red);
    background: var(--soft);
}

.popout-card .radio-player-wrap {
    flex-shrink: 0;
}

.popout-card .radio-song {
    font-size: 0.78rem;
    max-height: 2.8em;
    overflow: hidden;
}
