/* Diamond Challenge milestone figure */
.dp-figure {
    margin: 30px 0 0;
}

.dp-figure img {
    display: block;
    width: 100%;
    height: auto;
}

/* the milestone chart (diamond/chart.js), shown at its final frame: its page scales its own 1920x1080 stage to the
   frame, and clicks are kept away from it (they would step its slides) */
.dc-frame {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    border: 0;
    border-radius: 8px;
    background: #f5f5f4;
    pointer-events: none;
}

/* Diamond Challenge player (diamond/diamond.js) */
.dp-tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin: 10px 0 16px;
}

.dp-tabs button {
    font: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 7px 14px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background: #f5f5f5;
    color: #333;
    cursor: pointer;
}

.dp-tabs button[aria-selected="true"] {
    background: #007acc;
    border-color: #007acc;
    color: #fff;
}

.dp-tabs .dp-sub {
    font-weight: 400;
    opacity: 0.8;
}

.dp-screen {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.dp-screen video {
    display: block;
    width: 100%;
    aspect-ratio: 1280 / 360;
    cursor: pointer;
}

.dp-label {
    position: absolute;
    top: 8px;
    padding: 2px 8px;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 500;
    pointer-events: none;
}

.dp-label.plan { left: 8px; }
.dp-label.exec { left: calc(50% + 8px); }

.dp-speed {
    margin-left: 6px;
    padding-left: 6px;
    border-left: 1px solid rgba(255, 255, 255, 0.4);
}

.dp-speed.fast { color: #ffd166; }

.dp-controls {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    margin-top: 6px;
}

.dp-play {
    flex: none;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: #007acc;
    cursor: pointer;
    position: relative;
}

/* pause bars while playing, a triangle while paused */
.dp-play::before,
.dp-play::after {
    content: "";
    position: absolute;
    top: 10px;
    width: 4px;
    height: 12px;
    background: #fff;
}

.dp-play::before { left: 11px; }
.dp-play::after { left: 17px; }

.dp-play.paused::after { display: none; }

.dp-play.paused::before {
    left: 12px;
    width: 0;
    height: 0;
    background: none;
    border-style: solid;
    border-width: 6px 0 6px 10px;
    border-color: transparent transparent transparent #fff;
}

.dp-bar {
    position: relative;
    flex: 1;
    height: 40px;
    cursor: pointer;
    touch-action: none;
}

.dp-bar::before,
.dp-fill {
    content: "";
    position: absolute;
    left: 0;
    bottom: 10px;
    height: 6px;
    border-radius: 3px;
}

.dp-bar::before {
    right: 0;
    background: #e5e5e5;
}

.dp-fill {
    width: 0;
    background: #007acc;
}

.dp-marks button {
    position: absolute;
    top: 0;
    width: 22px;
    height: 22px;
    padding: 0;
    border: none;
    background: none;
    transform: translateX(-50%);
    cursor: pointer;
    opacity: 0.35;
}

.dp-marks button.got { opacity: 1; }

.dp-marks img {
    width: 100%;
    height: 100%;
    image-rendering: pixelated;
}

.dp-info {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin: 6px 0 4px 44px;
    font-size: 0.9rem;
    color: #444;
}

.dp-clock {
    color: #666;
    font-variant-numeric: tabular-nums;
}

.dp-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-left: 44px;
}

.dp-strip button {
    width: 40px;
    height: 40px;
    padding: 2px;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    background: #fafafa;
    cursor: pointer;
}

.dp-strip img {
    width: 100%;
    height: 100%;
    image-rendering: pixelated;
    opacity: 0.25;
    filter: grayscale(1);
}

.dp-strip button.got img {
    opacity: 1;
    filter: none;
}

.dp-strip button:disabled {
    cursor: default;
    opacity: 0.4;
}

.dp-caption {
    margin-top: 12px;
}

@media (max-width: 768px) {
    .dp-info,
    .dp-strip {
        margin-left: 0;
    }

    .dp-strip button {
        width: 32px;
        height: 32px;
    }
}
