.project-detail-head,
.preview-head,
.section-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 22px;
}
.project-detail-head { margin-bottom: 28px; }
.project-detail-head h1 {
    margin: .15em 0;
    font-size: clamp(2.2rem, 5vw, 4rem);
    overflow-wrap: anywhere;
}
.project-expiry {
    display: flex;
    align-items: flex-end;
    flex-direction: column;
    gap: 12px;
}
.project-notice { margin: 24px 0; padding: 28px; }
.mode-explainer {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin: 28px 0;
}
.compact-card { padding: 24px; }
.compact-card h2 { margin: .15em 0 .5em; }
.moments-section,
.generated-section { margin-top: 42px; }
.section-heading h2 { margin: .1em 0 20px; }
.duration-group {
    margin-bottom: 14px;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 15px;
    background: rgba(17, 23, 34, .72);
    overflow: hidden;
}
.duration-group summary {
    display: flex;
    justify-content: space-between;
    padding: 18px 20px;
    cursor: pointer;
    font-weight: 800;
}
.duration-group summary span { color: var(--muted); font-size: .85rem; }
.candidate-list { border-top: 1px solid rgba(255, 255, 255, .08); }
.candidate-row {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) auto;
    align-items: center;
    gap: 20px;
    padding: 18px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, .07);
}
.candidate-row:last-child { border-bottom: 0; }
.candidate-row > div {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 7px 14px;
}
.candidate-row span,
.candidate-row small { color: var(--muted); }
.candidate-row form {
    display: flex;
    gap: 9px;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.secondary-button { background: #26304a; box-shadow: none; }
.preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
    gap: 20px;
}
.preview-card { padding: 20px; }
.preview-head h3 { margin: .1em 0; }
.preview-head p { margin: .3em 0; color: var(--muted); }
.preview-card video {
    display: block;
    width: 100%;
    max-height: 590px;
    margin: 18px auto;
    border-radius: 12px;
    background: #05070b;
}
.analysis-failed { color: #ffadb9; }
.compact-empty { padding: 38px; }
.project-open { display: inline-flex; margin-top: 20px; }

@media (max-width: 680px) {
    .project-detail-head,
    .preview-head { flex-direction: column; }
    .project-expiry { align-items: flex-start; }
    .mode-explainer { grid-template-columns: 1fr; }
    .candidate-row { grid-template-columns: 1fr; }
    .candidate-row form { justify-content: flex-start; }
    .candidate-row form .button { width: 100%; justify-content: center; }
    .section-heading { display: block; }
}
