.hub-toolbar, .yt-toolbar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.hub-toolbar input, .yt-toolbar input, .hub-toolbar select, .yt-toolbar select,
.tool-card input, .tool-card textarea, .tool-card select {
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--panel-border);
    color: #fff;
    border-radius: 12px;
    padding: 10px 12px;
    font: inherit;
}

.yt-toolbar input, .hub-search { flex: 1; min-width: 180px; }

.hub-grid, .media-grid, .yt-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}

.hub-tile, .yt-card, .media-card {
    background: var(--bg-glass-card);
    border: 1px solid var(--panel-border);
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    text-align: left;
    color: inherit;
}

.hub-tile { padding: 16px; min-height: 110px; }
.hub-tile h3, .yt-card h3, .media-card h3 { font-size: 0.95rem; margin-top: 8px; }
.hub-tile p, .yt-meta, .media-card p { color: var(--text-dim); font-size: 0.8rem; }

.yt-card img, .media-card img {
    width: 100%;
    height: 110px;
    object-fit: cover;
    background: #111;
    display: block;
}

.chip-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.chip-row button, .hub-back {
    border: 1px solid var(--panel-border);
    background: transparent;
    color: #fff;
    border-radius: 999px;
    padding: 6px 12px;
    cursor: pointer;
}
.chip-row button.active { background: rgba(229,9,20,0.2); border-color: rgba(229,9,20,0.5); }

.hub-status { color: var(--text-dim); min-height: 1.2em; margin-bottom: 10px; }
.tool-card { background: var(--bg-glass-card); border: 1px solid var(--panel-border); border-radius: 16px; padding: 16px; margin-bottom: 12px; }
#hub-map { height: 420px; border-radius: 16px; background: #111; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-day { padding: 8px; border-radius: 10px; background: rgba(255,255,255,0.03); min-height: 64px; font-size: 0.8rem; }
.cal-day strong { display: block; }
.note-item { padding: 8px 0; border-bottom: 1px solid var(--panel-border); cursor: pointer; }
#mirror-canvas, #game-canvas { width: 100%; max-height: 520px; background: #000; border-radius: 16px; }
.tesla-dock { max-width: calc(100vw - 24px); overflow-x: auto; }
.theater-layout {
    align-items: stretch;
}
.theater-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}
.theater-topbar .deck-mode-toggle { margin-bottom: 0; }
.theater-top-tools { display: flex; align-items: center; gap: 8px; }
.theater-stage {
    position: relative;
    height: min(70vh, 780px);
    min-height: 460px;
    background:
        radial-gradient(900px 420px at 80% 0%, rgba(232, 33, 39, 0.16), transparent 60%),
        #050507;
    border-radius: 28px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 30px 80px rgba(0,0,0,0.45);
}
.theater-stage #player-wrapper,
.theater-stage .audio-visualizer-deck {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
    border: none;
    border-radius: 0;
}
.theater-stage .controls-bar {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 6;
    border: none;
    border-radius: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(5,5,7,0.55) 28%, rgba(5,5,7,0.94) 100%);
    padding: 54px 22px 16px;
}
.theater-now {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}
.theater-now-copy { min-width: 0; flex: 1; }
.theater-title-row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.theater-title-row h2 {
    margin: 0;
    font-size: clamp(1.2rem, 2vw, 1.7rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.player-prepare {
    display: none;
    position: absolute;
    inset: 0;
    z-index: 5;
    flex-direction: column;
    justify-content: flex-end;
    padding: 36px 28px 150px;
    background: linear-gradient(180deg, rgba(5,5,7,0.15), rgba(5,5,7,0.82));
}
.player-prepare.is-on { display: flex; }
.player-prepare-kicker {
    color: #e82127;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}
.player-prepare h3 {
    margin: 8px 0 14px;
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    letter-spacing: -0.04em;
    max-width: 16ch;
}
.prepare-track {
    width: min(420px, 80%);
    height: 4px;
    border-radius: 4px;
    background: rgba(255,255,255,0.12);
    overflow: hidden;
}
.prepare-track span {
    display: block;
    height: 100%;
    width: 35%;
    border-radius: 4px;
    background: linear-gradient(90deg, #a3141a, #e82127);
    animation: prepare-slide 1.3s ease-in-out infinite;
}
.player-prepare p:last-child { color: rgba(255,255,255,0.62); margin-top: 12px; max-width: 46ch; }
@keyframes prepare-slide {
    0% { transform: translateX(-120%); }
    100% { transform: translateX(320%); }
}
body.cinema-mode .theater-topbar { display: none; }
body.cinema-mode .theater-stage { height: calc(100vh - 12px); min-height: 0; border-radius: 16px; }
body.cinema-mode .theater-stage #player-wrapper { height: 100%; }
.theater-layout .queue-panel { min-height: 0; }
.theater-layout .queue-list { max-height: min(64vh, 680px); }

.player-weather {
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid var(--panel-border);
    background: rgba(255,255,255,0.04);
    white-space: nowrap;
}
.player-weather strong { font-size: 1rem; }
.player-weather span { color: var(--text-dim); font-size: 0.82rem; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }

.player-speed {
    background: transparent;
    color: #fff;
    border: 1px solid var(--panel-border);
    border-radius: 999px;
    padding: 6px 8px;
}
