.course-room {
    width: min(1120px, calc(100% - 32px));
    margin: 30px auto;
    display: grid;
    grid-template-columns: minmax(0, .95fr) minmax(380px, 420px);
    gap: 16px;
    align-items: start;
}

.panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 16px;
}

.course-media {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 12px;
    overflow: hidden;
    background: #172033;
    margin-bottom: 14px;
}

.course-media iframe,
.hero-img {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}

.hero-img {
    object-fit: cover;
    object-position: center;
}

.title {
    font-size: 1.42rem;
    font-weight: 900;
    margin-bottom: 8px;
    line-height: 1.35;
}

.meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    color: var(--text-muted);
    margin-bottom: 14px;
}

.meta span,
.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    background: var(--surface-soft);
    border: 1px solid var(--border);
    font-size: .76rem;
    font-weight: 800;
}

.section {
    margin-top: 18px;
}

.section h2 {
    font-size: .98rem;
    margin-bottom: 10px;
}

.course-info-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.info-card {
    width: 100%;
    border: 1px solid #dfe4ee;
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
    min-width: 0;
    box-shadow: 0 8px 20px rgba(15, 23, 42, .04);
}

.info-card summary {
    height: 62px;
    padding: 0 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    list-style: none;
    direction: rtl;
}

.info-card summary::-webkit-details-marker {
    display: none;
}

.info-card-icon {
    order: 2;
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: var(--primary-light);
    color: var(--primary);
}

.info-card-title {
    order: 3;
    flex: 1 1 auto;
    min-width: 0;
    text-align: right;
    font-weight: 900;
    line-height: 1.4;
}

.info-card-arrow {
    order: 1;
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    color: var(--primary);
    transition: transform .18s ease;
}

.info-card[open] .info-card-arrow {
    transform: rotate(180deg);
}

.info-card-body {
    border-top: 1px solid #eef2f7;
    padding: 14px;
    color: var(--text-muted);
    line-height: 1.9;
    font-size: .9rem;
    background: #fff;
}

.info-card[open] {
    border-color: rgba(112, 66, 244, .32);
    box-shadow: 0 12px 28px rgba(15, 23, 42, .06);
}

.agreement {
    border: 1px solid #d8c9ff;
    background: #f6f1ff;
    color: #231942;
}

.agreement-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    font-weight: 900;
    margin-bottom: 8px;
}

.agreement-text {
    color: #4b3b72;
    line-height: 1.9;
    font-size: .9rem;
}

.quote {
    margin: 12px 0;
    padding: 12px 14px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid #e6dcff;
    color: #312450;
    font-weight: 800;
    line-height: 1.8;
}

.lesson-list {
    display: grid;
    gap: 10px;
}

.lesson {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 12px;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px;
    background: var(--surface-soft);
    text-decoration: none;
    color: inherit;
}

.lesson:hover {
    border-color: var(--primary);
    background: #fff;
}

.lesson.locked {
    opacity: .72;
}

.lesson-num {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 900;
}

.lesson-title {
    font-weight: 900;
}

.lesson-desc {
    color: var(--text-muted);
    font-size: .82rem;
    margin-top: 2px;
}

.lesson-action {
    color: var(--primary);
    font-weight: 900;
    font-size: .82rem;
    white-space: nowrap;
}

.side-stack {
    display: grid;
    gap: 14px;
    position: sticky;
    top: 92px;
}

.price {
    font-size: 1.5rem;
    font-weight: 900;
    margin-bottom: 2px;
}

.content-ack-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;
    place-items: center;
    padding: 20px;
}

.content-ack-modal.is-open {
    display: grid;
}

.content-ack-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(7, 12, 24, .64);
    backdrop-filter: blur(5px);
}

.content-ack-card {
    position: relative;
    z-index: 1;
    width: min(640px, 100%);
    max-height: min(86vh, 720px);
    overflow: auto;
    display: grid;
    gap: 12px;
    padding: 22px;
    border-radius: 14px;
    border: 1px solid #d8ccff;
    background: var(--brand-50);
    color: var(--brand-700);
    box-shadow: 0 28px 70px rgba(0, 0, 0, .24);
}

.content-ack-close {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 9px;
    background: rgba(112, 66, 244, .08);
    color: var(--brand-700);
    cursor: pointer;
    font-size: 1.25rem;
    line-height: 1;
}

.content-ack-head {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 900;
}

.content-ack-head i {
    color: var(--brand);
}

.content-ack-verse {
    margin: 0;
    line-height: 1.9;
    font-weight: 800;
}

.content-ack-verse span {
    display: block;
    margin-top: 2px;
    color: var(--brand-700);
    font-size: .78rem;
}

.content-ack-list {
    margin: 0;
    padding: 0 18px 0 0;
    color: var(--brand-700);
    line-height: 1.85;
    font-size: .86rem;
}

.content-ack-check {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    font-weight: 900;
    line-height: 1.7;
}

.content-ack-check input {
    width: 18px;
    height: 18px;
    margin-top: 4px;
    accent-color: var(--primary);
}

.content-ack-card:not(:has(.content-ack-check input:checked)) .content-ack-action {
    opacity: .62;
}

.training-installment-widgets {
    width: 100%;
    min-width: 0;
    margin: 12px 0 14px;
    overflow: hidden;
}

.training-installment-widgets .installment-widgets {
    display: grid;
    gap: 8px;
}

.training-installment-widgets .installment-official-widget {
    width: 106.4%;
    min-width: 0;
    overflow: hidden;
    border-radius: 12px;
    transform: scale(.94);
    transform-origin: top right;
    margin-bottom: -5px;
}

.security-list {
    display: grid;
    gap: 9px;
    margin-top: 10px;
    color: var(--text-muted);
    font-size: .86rem;
}

.security-list span {
    display: flex;
    align-items: center;
    gap: 8px;
}

@media(max-width:980px) {
    .course-room {
        grid-template-columns: 1fr;
    }

    .side-stack {
        order: -1;
        position: static;
    }

    .lesson {
        grid-template-columns: auto 1fr;
    }

    .lesson-action {
        grid-column: 2;
    }
}

@media(max-width:640px) {
    .course-room {
        width: calc(100% - 20px);
        margin: 16px auto 96px;
        gap: 12px;
    }

    .panel {
        padding: 12px;
    }

    .course-media {
        margin-bottom: 12px;
    }

    .course-info-cards {
        grid-template-columns: 1fr;
    }

    .title {
        font-size: 1.18rem;
    }

    .meta {
        gap: 6px;
        margin-bottom: 10px;
    }

    .meta span,
    .chip {
        font-size: .7rem;
        padding: 5px 8px;
    }

    .training-installment-widgets .installment-official-widget {
        width: 108.7%;
        transform: scale(.92);
    }
}
