html, body {
    height: 100%;
    margin: 0;
    background: #111;
    color: #eee;
    font-family: system-ui, Segoe UI, Roboto, Arial;
}

#canvas-container {
    width: 100%;
    height: 100vh;
    display: block;
    position: relative;
}

#info {
    position: absolute;
    left: 12px;
    top: 12px;
    background: rgba(0, 0, 0, 0.5);
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.4;
    max-width: 320px;
}

#legend {
    margin-top: 8px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap
}

.chip {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    padding: 4px 8px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.04);
}

.color-box {
    width: 14px;
    height: 14px;
    border-radius: 3px;
    display: inline-block;
}

#footer {
    position: absolute;
    right: 12px;
    bottom: 12px;
    color: #bbb;
    font-size: 12px;
    background: rgba(0, 0, 0, 0.35);
    padding: 6px 8px;
    border-radius: 6px;
}

/* ── Playback control bar ─────────────────────────────── */
#playbar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: rgba(10, 10, 15, 0.88);
    backdrop-filter: blur(6px);
    border-top: 1px solid rgba(255,255,255,0.08);
    z-index: 100;
    font-size: 13px;
    color: #ccc;
}

.playbar-btn {
    background: rgba(255,255,255,0.08);
    border: none;
    color: #eee;
    width: 36px;
    height: 36px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.15s;
}
.playbar-btn:hover { background: rgba(255,255,255,0.18); }

.playbar-progress-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.playbar-progress-bar {
    height: 4px;
    background: rgba(255,255,255,0.12);
    border-radius: 2px;
    overflow: hidden;
}

.playbar-progress-fill {
    height: 100%;
    background: #5599ff;
    border-radius: 2px;
    transition: width 0.3s ease;
    width: 0%;
}

.playbar-label {
    font-size: 12px;
    color: #aaa;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.playbar-speed-label {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    font-size: 12px;
    color: #aaa;
}
.playbar-speed-label input[type=range] {
    width: 72px;
    accent-color: #5599ff;
    cursor: pointer;
}

/* ── Item chips ───────────────────────────────────────── */
.chip--pending { opacity: 0.35; }
.chip--active  { outline: 1px solid rgba(85,153,255,0.7); background: rgba(85,153,255,0.12); opacity: 1; }
