.asg-preview,
.asg-photo-page {
    font-family: var(--asg-font-family);
}

.asg-preview {
    --asg-accent: #d7263d;
    --asg-accent-dark: #a61d2e;
    --asg-bg: #ffffff;
    --asg-surface: #f8fafc;
    --asg-text: #101828;
    --asg-muted: #475467;
    margin: 28px 0;
    padding: 14px;
    border: 1px solid #e5e7eb;
    border-radius: 24px;
    background: var(--asg-bg);
    box-shadow: 0 14px 36px rgba(15, 23, 42, 0.08);
}

.asg-preview__label {
    margin-bottom: 12px;
    font-size: 15px;
    font-weight: 900;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--asg-accent);
}

.asg-preview__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 12px minmax(0, 1fr);
    gap: 12px;
    margin-bottom: 12px;
    align-items: stretch;
}

.asg-preview__divider {
    align-self: stretch;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0), var(--asg-accent), rgba(255, 255, 255, 0));
    opacity: 0.6;
}

.asg-preview__item {
    display: block;
    min-height: 170px;
    overflow: hidden;
    border-radius: 18px;
    border: 2px solid #eef2f6;
    background: var(--asg-surface);
    text-decoration: none;
}

.asg-preview__item img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 170px;
    object-fit: cover;
}

.asg-preview__bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 16px 18px;
    border-radius: 18px;
    background: linear-gradient(90deg, var(--asg-accent), var(--asg-accent-dark));
    color: #fff;
}

.asg-preview__left,
.asg-preview__right {
    display: grid;
    gap: 4px;
}

.asg-preview__title {
    font-size: 24px;
    line-height: 1.12;
}

.asg-preview__count {
    font-size: 14px;
    font-weight: 700;
    opacity: 0.95;
}

.asg-preview__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 56px;
    padding: 0 24px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    border: 2px solid rgba(255, 255, 255, 0.38);
    color: #fff;
    text-decoration: none;
    font-size: 16px;
    font-weight: 900;
    letter-spacing: 0.08em;
}

.asg-photo-page {
    --asg-accent: #d7263d;
    --asg-accent-dark: #a61d2e;
    --asg-bg: #ffffff;
    --asg-surface: #f8fafc;
    --asg-text: #101828;
    --asg-muted: #475467;
    margin: 36px auto;
}

.asg-photo-page__wrap {
    width: min(1120px, calc(100% - 24px));
    margin: 0 auto;
    padding: 24px;
    background: var(--asg-bg);
    border-radius: 28px;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.12);
}

.asg-photo-page__top-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 18px;
}

.asg-photo-page__action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 50px;
    padding: 0 18px;
    border-radius: 999px;
    text-decoration: none;
    font-size: 15px;
    font-weight: 900;
    letter-spacing: 0.03em;
}

.asg-photo-page__action--primary {
    background: var(--asg-accent);
    color: #fff;
}

.asg-photo-page__action--secondary {
    background: #fff;
    color: var(--asg-accent);
    border: 2px solid var(--asg-accent);
}

.asg-photo-page__ad {
    margin: 0 0 20px;
    padding: 12px;
    border-radius: 20px;
    border: 1px solid #eaecf0;
    background: #ffffff;
    overflow: hidden;
}

.asg-photo-page__ad--rect {
    width: min(100%, 960px);
    margin-left: auto;
    margin-right: auto;
}

.asg-ad-slot {
    width: 100%;
    overflow: hidden;
    border-radius: 14px;
    background: var(--asg-surface);
}

.asg-ad-slot--rect {
    position: relative;
    aspect-ratio: 16 / 9;
    min-height: 140px;
    max-height: 420px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.asg-ad-slot--rect > * {
    max-width: 100%;
}

.asg-ad-slot--rect iframe,
.asg-ad-slot--rect img,
.asg-ad-slot--rect ins {
    display: block;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
}

.asg-photo-page__ad--below,
.asg-photo-page__ad--interval,
.asg-photo-page__ad--multiplex {
    margin-top: 22px;
}

.asg-photo-page__head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 18px;
}

.asg-photo-page__gallery-title {
    margin: 0;
    color: var(--asg-text);
    font-size: clamp(1.8rem, 2.6vw, 2.7rem);
    line-height: 1.08;
}

.asg-photo-page__counter {
    padding: 9px 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.96);
    color: var(--asg-accent);
    font-weight: 900;
    white-space: nowrap;
    border: 1px solid #eaecf0;
}

.asg-photo-page__frame {
    position: relative;
    border-radius: 26px;
    overflow: hidden;
    background: #0f172a;
}

.asg-photo-page__image-wrap {
    min-height: 380px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.asg-photo-page__image {
    display: block;
    width: 100%;
    max-height: 80vh;
    object-fit: contain;
}

.asg-photo-page__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 56px;
    height: 56px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-decoration: none;
    font-size: 28px;
    font-weight: 700;
    background: var(--asg-accent);
    box-shadow: 0 14px 26px rgba(15, 23, 42, 0.24);
}

.asg-photo-page__nav--prev { left: 14px; }
.asg-photo-page__nav--next { right: 14px; }

.asg-photo-page__caption {
    margin-top: 18px;
    font-size: 19px;
    line-height: 1.65;
    color: var(--asg-text);
}

.asg-rating-box {
    margin-top: 22px;
    padding: 18px 20px;
    border: 1px solid #eaecf0;
    border-radius: 22px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.asg-rating-box__question {
    margin-bottom: 12px;
    font-size: 18px;
    line-height: 1.35;
    font-weight: 900;
    color: var(--asg-text);
}

.asg-rating-box__notice {
    margin-bottom: 12px;
    font-size: 13px;
    font-weight: 800;
    color: var(--asg-accent);
}

.asg-rating-box__form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.asg-rating-box__form--voted {
    justify-content: space-between;
}

.asg-rating-box__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 18px;
    border-radius: 999px;
    border: 0;
    text-decoration: none;
    font-size: 15px;
    font-weight: 900;
    cursor: pointer;
    transition: transform 0.16s ease, box-shadow 0.16s ease, opacity 0.16s ease;
}

.asg-rating-box__button:hover {
    transform: translateY(-1px);
    opacity: 0.96;
}

.asg-rating-box__button--like,
.asg-rating-box__button--dislike {
    color: #fff;
    background: linear-gradient(90deg, var(--asg-accent), var(--asg-accent-dark));
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.16);
}

.asg-rating-box__button--ghost {
    background: #fff;
    color: var(--asg-accent);
    border: 2px solid var(--asg-accent);
}

.asg-rating-box__voted-tag {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 0 14px;
    border-radius: 999px;
    background: #fff;
    color: var(--asg-accent);
    font-size: 13px;
    font-weight: 900;
}

.asg-rating-box__results {
    margin-top: 14px;
    padding: 14px 16px;
    border-radius: 16px;
    background: #fff;
    border: 1px solid #eaecf0;
    font-size: 15px;
    color: var(--asg-text);
}


.asg-photo-page__thumbs {
    margin-top: 24px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(84px, 1fr));
    gap: 10px;
}

.asg-photo-page__thumb {
    display: block;
    border-radius: 16px;
    overflow: hidden;
    border: 3px solid transparent;
    text-decoration: none;
    background: var(--asg-surface);
}

.asg-photo-page__thumb.is-current {
    border-color: var(--asg-accent);
}

.asg-photo-page__thumb img {
    width: 100%;
    height: 78px;
    object-fit: cover;
    display: block;
}

.asg-theme-red { --asg-accent: #d7263d; --asg-accent-dark: #a61d2e; }
.asg-theme-blue { --asg-accent: #2563eb; --asg-accent-dark: #1d4ed8; }
.asg-theme-green { --asg-accent: #16a34a; --asg-accent-dark: #15803d; }
.asg-theme-gray { --asg-accent: #475467; --asg-accent-dark: #344054; }
.asg-theme-yellow { --asg-accent: #ca8a04; --asg-accent-dark: #a16207; }
.asg-theme-black { --asg-accent: #111827; --asg-accent-dark: #030712; }
.asg-theme-purple { --asg-accent: #7c3aed; --asg-accent-dark: #5b21b6; }
.asg-theme-orange { --asg-accent: #ea580c; --asg-accent-dark: #c2410c; }
.asg-theme-teal { --asg-accent: #0f766e; --asg-accent-dark: #115e59; }
.asg-theme-burgundy { --asg-accent: #9f1239; --asg-accent-dark: #881337; }

.asg-font-system { --asg-font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
.asg-font-arial { --asg-font-family: Arial, Helvetica, sans-serif; }
.asg-font-helvetica { --asg-font-family: Helvetica, Arial, sans-serif; }
.asg-font-verdana { --asg-font-family: Verdana, Geneva, sans-serif; }
.asg-font-georgia { --asg-font-family: Georgia, serif; }
.asg-font-times { --asg-font-family: "Times New Roman", Times, serif; }
.asg-font-trebuchet { --asg-font-family: "Trebuchet MS", sans-serif; }
.asg-font-tahoma { --asg-font-family: Tahoma, Geneva, sans-serif; }
.asg-font-palatino { --asg-font-family: "Palatino Linotype", Palatino, serif; }
.asg-font-gillsans { --asg-font-family: "Gill Sans", "Gill Sans MT", Calibri, sans-serif; }

@media (max-width: 782px) {
    .asg-preview__grid {
        grid-template-columns: 1fr;
    }

    .asg-preview__divider {
        display: none;
    }

    .asg-preview__bar,
    .asg-photo-page__head {
        flex-direction: column;
        align-items: stretch;
    }

    .asg-photo-page__wrap {
        padding: 18px;
    }

    .asg-photo-page__nav {
        width: 48px;
        height: 48px;
    }

    .asg-rating-box__form {
        align-items: stretch;
    }

    .asg-rating-box__button {
        width: 100%;
    }

    .asg-rating-box__form--voted {
        align-items: stretch;
    }

    .asg-ad-slot--rect {
        min-height: 120px;
    }
}
