/* Both public cover variants use the same geometry as the crop editor. */
.course-image-frame {
    display: block;
    position: relative;
    min-width: 0;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: var(--radius-control);
    background: #e6e6e3;
}
.course-image-frame[data-cover-frame="card"] { aspect-ratio: 2.36 / 1; }
.course-image-frame > img {
    position: absolute;
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    min-height: 0;
    aspect-ratio: auto;
    object-fit: contain;
    border: 0;
    border-radius: 0;
    background: transparent;
}
.admin-content .admin-course-detail-main {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 26rem), 1fr));
}
.admin-content .admin-course-detail-main > *,
.admin-content .section-head > *,
.admin-content .meta-list > * { min-width: 0; overflow-wrap: anywhere; }
.admin-content .meta-list { grid-template-columns: minmax(6rem, .8fr) minmax(0, 1.2fr); }
.admin-content .meta-list .badge { white-space: normal; max-width: 100%; overflow-wrap: anywhere; }
.admin-content .admin-course-overview .section-head { flex-wrap: wrap; }
.admin-content .admin-course-cover-content {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
}
.admin-course-cover-preview.course-image-frame { border: 0; }
.cover-crop-variants { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); gap: 1rem; margin-top: 1rem; }
.cover-crop-variants form { display: grid; align-content: start; justify-items: start; gap: .5rem; min-width: 0; }
.cover-crop-variants h3 { margin: 0; font-size: 1rem; }
.cover-crop-preview { display: block; padding: 0; width: 100%; border: 1px solid var(--line); border-radius: var(--radius-control); background: #e6e6e3; overflow: hidden; }
.cover-crop-preview:is(:hover, :focus-visible) { border-color: var(--color-forest); background: #e6e6e3; }
.cover-crop-dialog { width: min(70rem, calc(100vw - 2rem)); max-width: calc(100vw - 2rem); max-height: calc(100dvh - 2rem); padding: 1rem; overflow: auto; border: 1px solid var(--line); border-radius: var(--radius-panel); background: var(--panel); color: var(--ink); }
.cover-crop-dialog::backdrop { background: rgb(0 0 0 / 55%); }
.cover-crop-dialog .section-head { display: flex; justify-content: space-between; gap: 1rem; align-items: center; }
.cover-crop-dialog h2 { margin: 0; font-size: 1.25rem; }
.cover-crop-workspace { display: grid; grid-template-columns: minmax(0, 2fr) minmax(12rem, 1fr); gap: 1rem; }
.cover-crop-stage { position: relative; height: clamp(16rem, 44vh, 28rem); overflow: hidden; touch-action: none; border-radius: var(--radius-control); background: #dededb; isolation: isolate; }
.cover-crop-stage > img { position: absolute; max-width: none; pointer-events: none; user-select: none; }
.cover-crop-window { position: absolute; border: 2px solid white; outline: 1px solid var(--color-forest); box-shadow: 0 0 0 100vmax rgb(0 0 0 / 35%); cursor: move; touch-action: none; }
.cover-crop-window:focus-visible { outline: 3px solid var(--color-focus); }
.cover-crop-handle { position: absolute; width: 1.25rem; height: 1.25rem; background: white; border: 2px solid var(--color-forest); border-radius: 3px; }
.cover-crop-handle--nw { top: -.625rem; left: -.625rem; cursor: nwse-resize; }
.cover-crop-handle--ne { top: -.625rem; right: -.625rem; cursor: nesw-resize; }
.cover-crop-handle--se { bottom: -.625rem; right: -.625rem; cursor: nwse-resize; }
.cover-crop-handle--sw { bottom: -.625rem; left: -.625rem; cursor: nesw-resize; }
.cover-crop-result { display: grid; align-content: start; gap: .75rem; min-width: 0; }
.cover-crop-dialog .form-actions { margin-top: 1rem; }
@media (max-width: 1100px) { html { font-size: 96.875%; } }
@media (max-width: 720px) {
    html { font-size: 93.75%; }
    .cover-crop-workspace { grid-template-columns: minmax(0, 1fr); }
    .cover-crop-stage { height: 17rem; }
    .cover-crop-result .course-image-frame { max-width: 20rem; }
}
